chore: remove node_modules from repo
This commit is contained in:
17
node_modules/.bin/tsc
generated
vendored
17
node_modules/.bin/tsc
generated
vendored
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -z "$NODE_PATH" ]; then
|
|
||||||
export NODE_PATH="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules"
|
|
||||||
else
|
|
||||||
export NODE_PATH="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
||||||
fi
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../typescript/bin/tsc" "$@"
|
|
||||||
fi
|
|
||||||
12
node_modules/.bin/tsc.CMD
generated
vendored
12
node_modules/.bin/tsc.CMD
generated
vendored
@@ -1,12 +0,0 @@
|
|||||||
@SETLOCAL
|
|
||||||
@IF NOT DEFINED NODE_PATH (
|
|
||||||
@SET "NODE_PATH=C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\bin\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules"
|
|
||||||
) ELSE (
|
|
||||||
@SET "NODE_PATH=C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\bin\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
||||||
)
|
|
||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\typescript\bin\tsc" %*
|
|
||||||
) ELSE (
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\typescript\bin\tsc" %*
|
|
||||||
)
|
|
||||||
41
node_modules/.bin/tsc.ps1
generated
vendored
41
node_modules/.bin/tsc.ps1
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
$pathsep=":"
|
|
||||||
$env_node_path=$env:NODE_PATH
|
|
||||||
$new_node_path="C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\bin\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules"
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
$pathsep=";"
|
|
||||||
} else {
|
|
||||||
$new_node_path="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules"
|
|
||||||
}
|
|
||||||
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
||||||
$env:NODE_PATH=$new_node_path
|
|
||||||
} else {
|
|
||||||
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
||||||
}
|
|
||||||
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../typescript/bin/tsc" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
$env:NODE_PATH=$env_node_path
|
|
||||||
exit $ret
|
|
||||||
17
node_modules/.bin/tsserver
generated
vendored
17
node_modules/.bin/tsserver
generated
vendored
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -z "$NODE_PATH" ]; then
|
|
||||||
export NODE_PATH="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules"
|
|
||||||
else
|
|
||||||
export NODE_PATH="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
||||||
fi
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../typescript/bin/tsserver" "$@"
|
|
||||||
fi
|
|
||||||
12
node_modules/.bin/tsserver.CMD
generated
vendored
12
node_modules/.bin/tsserver.CMD
generated
vendored
@@ -1,12 +0,0 @@
|
|||||||
@SETLOCAL
|
|
||||||
@IF NOT DEFINED NODE_PATH (
|
|
||||||
@SET "NODE_PATH=C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\bin\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules"
|
|
||||||
) ELSE (
|
|
||||||
@SET "NODE_PATH=C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\bin\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
||||||
)
|
|
||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\typescript\bin\tsserver" %*
|
|
||||||
) ELSE (
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\typescript\bin\tsserver" %*
|
|
||||||
)
|
|
||||||
41
node_modules/.bin/tsserver.ps1
generated
vendored
41
node_modules/.bin/tsserver.ps1
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
$pathsep=":"
|
|
||||||
$env_node_path=$env:NODE_PATH
|
|
||||||
$new_node_path="C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\bin\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules\typescript\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\typescript@5.9.3\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules"
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
$pathsep=";"
|
|
||||||
} else {
|
|
||||||
$new_node_path="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/typescript@5.9.3/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules"
|
|
||||||
}
|
|
||||||
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
||||||
$env:NODE_PATH=$new_node_path
|
|
||||||
} else {
|
|
||||||
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
||||||
}
|
|
||||||
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../typescript/bin/tsserver" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
$env:NODE_PATH=$env_node_path
|
|
||||||
exit $ret
|
|
||||||
21
node_modules/@types/react/LICENSE
generated
vendored
21
node_modules/@types/react/LICENSE
generated
vendored
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) Microsoft Corporation.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE
|
|
||||||
15
node_modules/@types/react/README.md
generated
vendored
15
node_modules/@types/react/README.md
generated
vendored
@@ -1,15 +0,0 @@
|
|||||||
# Installation
|
|
||||||
> `npm install --save @types/react`
|
|
||||||
|
|
||||||
# Summary
|
|
||||||
This package contains type definitions for react (https://react.dev/).
|
|
||||||
|
|
||||||
# Details
|
|
||||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react/v18.
|
|
||||||
|
|
||||||
### Additional Details
|
|
||||||
* Last updated: Tue, 18 Nov 2025 02:14:41 GMT
|
|
||||||
* Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [csstype](https://npmjs.com/package/csstype)
|
|
||||||
|
|
||||||
# Credits
|
|
||||||
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock).
|
|
||||||
166
node_modules/@types/react/canary.d.ts
generated
vendored
166
node_modules/@types/react/canary.d.ts
generated
vendored
@@ -1,166 +0,0 @@
|
|||||||
/**
|
|
||||||
* These are types for things that are present in the React `canary` release channel.
|
|
||||||
*
|
|
||||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
|
||||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
|
||||||
* is to add `"react/canary"` to the `"types"` array.
|
|
||||||
*
|
|
||||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
|
||||||
* This module does not exist in reality, which is why the {} is important:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* import {} from 'react/canary'
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* It is also possible to include it through a triple-slash reference:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* /// <reference types="react/canary" />
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
|
||||||
|
|
||||||
import React = require(".");
|
|
||||||
|
|
||||||
export {};
|
|
||||||
|
|
||||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
|
||||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
||||||
|
|
||||||
type NativeToggleEvent = ToggleEvent;
|
|
||||||
|
|
||||||
declare module "." {
|
|
||||||
export type Usable<T> = PromiseLike<T> | Context<T>;
|
|
||||||
|
|
||||||
export function use<T>(usable: Usable<T>): T;
|
|
||||||
|
|
||||||
interface ServerContextJSONArray extends ReadonlyArray<ServerContextJSONValue> {}
|
|
||||||
export type ServerContextJSONValue =
|
|
||||||
| string
|
|
||||||
| boolean
|
|
||||||
| number
|
|
||||||
| null
|
|
||||||
| ServerContextJSONArray
|
|
||||||
| { [key: string]: ServerContextJSONValue };
|
|
||||||
export interface ServerContext<T extends ServerContextJSONValue> {
|
|
||||||
Provider: Provider<T>;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Accepts a context object (the value returned from `React.createContext` or `React.createServerContext`) and returns the current
|
|
||||||
* context value, as given by the nearest context provider for the given context.
|
|
||||||
*
|
|
||||||
* @version 16.8.0
|
|
||||||
* @see https://react.dev/reference/react/useContext
|
|
||||||
*/
|
|
||||||
function useContext<T extends ServerContextJSONValue>(context: ServerContext<T>): T;
|
|
||||||
export function createServerContext<T extends ServerContextJSONValue>(
|
|
||||||
globalName: string,
|
|
||||||
defaultValue: T,
|
|
||||||
): ServerContext<T>;
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
||||||
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
|
|
||||||
|
|
||||||
export function unstable_useCacheRefresh(): () => void;
|
|
||||||
|
|
||||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {
|
|
||||||
functions: (formData: FormData) => void | Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TransitionStartFunction {
|
|
||||||
/**
|
|
||||||
* Marks all state updates inside the async function as transitions
|
|
||||||
*
|
|
||||||
* @see {https://react.dev/reference/react/useTransition#starttransition}
|
|
||||||
*
|
|
||||||
* @param callback
|
|
||||||
*/
|
|
||||||
(callback: () => Promise<VoidOrUndefinedOnly>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Similar to `useTransition` but allows uses where hooks are not available.
|
|
||||||
*
|
|
||||||
* @param callback An _asynchronous_ function which causes state updates that can be deferred.
|
|
||||||
*/
|
|
||||||
export function startTransition(scope: () => Promise<VoidOrUndefinedOnly>): void;
|
|
||||||
|
|
||||||
export function useOptimistic<State>(
|
|
||||||
passthrough: State,
|
|
||||||
): [State, (action: State | ((pendingState: State) => State)) => void];
|
|
||||||
export function useOptimistic<State, Action>(
|
|
||||||
passthrough: State,
|
|
||||||
reducer: (state: State, action: Action) => State,
|
|
||||||
): [State, (action: Action) => void];
|
|
||||||
|
|
||||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
|
|
||||||
cleanup: () => VoidOrUndefinedOnly;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function useActionState<State>(
|
|
||||||
action: (state: Awaited<State>) => State | Promise<State>,
|
|
||||||
initialState: Awaited<State>,
|
|
||||||
permalink?: string,
|
|
||||||
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
|
||||||
export function useActionState<State, Payload>(
|
|
||||||
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
|
|
||||||
initialState: Awaited<State>,
|
|
||||||
permalink?: string,
|
|
||||||
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
|
|
||||||
|
|
||||||
interface DOMAttributes<T> {
|
|
||||||
// Transition Events
|
|
||||||
onTransitionCancel?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionCancelCapture?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionRun?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionRunCapture?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionStart?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionStartCapture?: TransitionEventHandler<T> | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
type ToggleEventHandler<T = Element> = EventHandler<ToggleEvent<T>>;
|
|
||||||
|
|
||||||
interface HTMLAttributes<T> {
|
|
||||||
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
||||||
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
||||||
popoverTarget?: string | undefined;
|
|
||||||
onToggle?: ToggleEventHandler<T> | undefined;
|
|
||||||
onBeforeToggle?: ToggleEventHandler<T> | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ToggleEvent<T = Element> extends SyntheticEvent<T, NativeToggleEvent> {
|
|
||||||
oldState: "closed" | "open";
|
|
||||||
newState: "closed" | "open";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface LinkHTMLAttributes<T> {
|
|
||||||
precedence?: string | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StyleHTMLAttributes<T> {
|
|
||||||
href?: string | undefined;
|
|
||||||
precedence?: string | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal Use `Awaited<ReactNode>` instead
|
|
||||||
*/
|
|
||||||
// Helper type to enable `Awaited<ReactNode>`.
|
|
||||||
// Must be a copy of the non-thenables of `ReactNode`.
|
|
||||||
type AwaitedReactNode =
|
|
||||||
| ReactElement
|
|
||||||
| string
|
|
||||||
| number
|
|
||||||
| Iterable<AwaitedReactNode>
|
|
||||||
| ReactPortal
|
|
||||||
| boolean
|
|
||||||
| null
|
|
||||||
| undefined;
|
|
||||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
|
|
||||||
promises: Promise<AwaitedReactNode>;
|
|
||||||
bigints: bigint;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
132
node_modules/@types/react/experimental.d.ts
generated
vendored
132
node_modules/@types/react/experimental.d.ts
generated
vendored
@@ -1,132 +0,0 @@
|
|||||||
/**
|
|
||||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
|
||||||
* on a stable build.
|
|
||||||
*
|
|
||||||
* Once they are promoted to stable they can just be moved to the main index file.
|
|
||||||
*
|
|
||||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
|
||||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
|
||||||
* is to add `"react/experimental"` to the `"types"` array.
|
|
||||||
*
|
|
||||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
|
||||||
* This module does not exist in reality, which is why the {} is important:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* import {} from 'react/experimental'
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* It is also possible to include it through a triple-slash reference:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* /// <reference types="react/experimental" />
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
|
||||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
|
||||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
|
||||||
//
|
|
||||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
|
||||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
|
||||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
|
||||||
//
|
|
||||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
|
||||||
|
|
||||||
import React = require("./canary");
|
|
||||||
|
|
||||||
export {};
|
|
||||||
|
|
||||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
|
||||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
||||||
|
|
||||||
declare module "." {
|
|
||||||
export interface SuspenseProps {
|
|
||||||
/**
|
|
||||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
|
||||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
|
||||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
|
||||||
*/
|
|
||||||
unstable_expectedLoadTime?: number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together";
|
|
||||||
export type SuspenseListTailMode = "collapsed" | "hidden";
|
|
||||||
|
|
||||||
export interface SuspenseListCommonProps {
|
|
||||||
/**
|
|
||||||
* Note that SuspenseList require more than one child;
|
|
||||||
* it is a runtime warning to provide only a single child.
|
|
||||||
*
|
|
||||||
* It does, however, allow those children to be wrapped inside a single
|
|
||||||
* level of `<React.Fragment>`.
|
|
||||||
*/
|
|
||||||
children: ReactElement | Iterable<ReactElement>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
|
||||||
/**
|
|
||||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
||||||
*/
|
|
||||||
revealOrder: "forwards" | "backwards";
|
|
||||||
/**
|
|
||||||
* Dictates how unloaded items in a SuspenseList is shown.
|
|
||||||
*
|
|
||||||
* - By default, `SuspenseList` will show all fallbacks in the list.
|
|
||||||
* - `collapsed` shows only the next fallback in the list.
|
|
||||||
* - `hidden` doesn’t show any unloaded items.
|
|
||||||
*/
|
|
||||||
tail?: SuspenseListTailMode | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
|
||||||
/**
|
|
||||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
||||||
*/
|
|
||||||
revealOrder?: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
|
|
||||||
/**
|
|
||||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
|
||||||
*/
|
|
||||||
tail?: never | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
|
||||||
* in which these components are revealed to the user.
|
|
||||||
*
|
|
||||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
|
||||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
|
||||||
* until previous items have been displayed (this behavior is adjustable).
|
|
||||||
*
|
|
||||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
|
||||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
|
||||||
*/
|
|
||||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
||||||
export function experimental_useEffectEvent<T extends Function>(event: T): T;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Warning: Only available in development builds.
|
|
||||||
*/
|
|
||||||
function captureOwnerStack(): string | null;
|
|
||||||
|
|
||||||
type Reference = object;
|
|
||||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
|
||||||
function experimental_taintUniqueValue(
|
|
||||||
message: string | undefined,
|
|
||||||
lifetime: Reference,
|
|
||||||
value: TaintableUniqueValue,
|
|
||||||
): void;
|
|
||||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
|
||||||
|
|
||||||
export interface HTMLAttributes<T> {
|
|
||||||
/**
|
|
||||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert
|
|
||||||
*/
|
|
||||||
inert?: boolean | undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
161
node_modules/@types/react/global.d.ts
generated
vendored
161
node_modules/@types/react/global.d.ts
generated
vendored
@@ -1,161 +0,0 @@
|
|||||||
/*
|
|
||||||
React projects that don't include the DOM library need these interfaces to compile.
|
|
||||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
|
||||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
|
||||||
|
|
||||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
|
||||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
|
||||||
*/
|
|
||||||
|
|
||||||
interface Event {}
|
|
||||||
interface AnimationEvent extends Event {}
|
|
||||||
interface ClipboardEvent extends Event {}
|
|
||||||
interface CompositionEvent extends Event {}
|
|
||||||
interface DragEvent extends Event {}
|
|
||||||
interface FocusEvent extends Event {}
|
|
||||||
interface InputEvent extends Event {}
|
|
||||||
interface KeyboardEvent extends Event {}
|
|
||||||
interface MouseEvent extends Event {}
|
|
||||||
interface TouchEvent extends Event {}
|
|
||||||
interface PointerEvent extends Event {}
|
|
||||||
interface ToggleEvent extends Event {}
|
|
||||||
interface TransitionEvent extends Event {}
|
|
||||||
interface UIEvent extends Event {}
|
|
||||||
interface WheelEvent extends Event {}
|
|
||||||
|
|
||||||
interface EventTarget {}
|
|
||||||
interface Document {}
|
|
||||||
interface DataTransfer {}
|
|
||||||
interface StyleMedia {}
|
|
||||||
|
|
||||||
interface Element {}
|
|
||||||
interface DocumentFragment {}
|
|
||||||
|
|
||||||
interface HTMLElement extends Element {}
|
|
||||||
interface HTMLAnchorElement extends HTMLElement {}
|
|
||||||
interface HTMLAreaElement extends HTMLElement {}
|
|
||||||
interface HTMLAudioElement extends HTMLElement {}
|
|
||||||
interface HTMLBaseElement extends HTMLElement {}
|
|
||||||
interface HTMLBodyElement extends HTMLElement {}
|
|
||||||
interface HTMLBRElement extends HTMLElement {}
|
|
||||||
interface HTMLButtonElement extends HTMLElement {}
|
|
||||||
interface HTMLCanvasElement extends HTMLElement {}
|
|
||||||
interface HTMLDataElement extends HTMLElement {}
|
|
||||||
interface HTMLDataListElement extends HTMLElement {}
|
|
||||||
interface HTMLDetailsElement extends HTMLElement {}
|
|
||||||
interface HTMLDialogElement extends HTMLElement {}
|
|
||||||
interface HTMLDivElement extends HTMLElement {}
|
|
||||||
interface HTMLDListElement extends HTMLElement {}
|
|
||||||
interface HTMLEmbedElement extends HTMLElement {}
|
|
||||||
interface HTMLFieldSetElement extends HTMLElement {}
|
|
||||||
interface HTMLFormElement extends HTMLElement {}
|
|
||||||
interface HTMLHeadingElement extends HTMLElement {}
|
|
||||||
interface HTMLHeadElement extends HTMLElement {}
|
|
||||||
interface HTMLHRElement extends HTMLElement {}
|
|
||||||
interface HTMLHtmlElement extends HTMLElement {}
|
|
||||||
interface HTMLIFrameElement extends HTMLElement {}
|
|
||||||
interface HTMLImageElement extends HTMLElement {}
|
|
||||||
interface HTMLInputElement extends HTMLElement {}
|
|
||||||
interface HTMLModElement extends HTMLElement {}
|
|
||||||
interface HTMLLabelElement extends HTMLElement {}
|
|
||||||
interface HTMLLegendElement extends HTMLElement {}
|
|
||||||
interface HTMLLIElement extends HTMLElement {}
|
|
||||||
interface HTMLLinkElement extends HTMLElement {}
|
|
||||||
interface HTMLMapElement extends HTMLElement {}
|
|
||||||
interface HTMLMetaElement extends HTMLElement {}
|
|
||||||
interface HTMLMeterElement extends HTMLElement {}
|
|
||||||
interface HTMLObjectElement extends HTMLElement {}
|
|
||||||
interface HTMLOListElement extends HTMLElement {}
|
|
||||||
interface HTMLOptGroupElement extends HTMLElement {}
|
|
||||||
interface HTMLOptionElement extends HTMLElement {}
|
|
||||||
interface HTMLOutputElement extends HTMLElement {}
|
|
||||||
interface HTMLParagraphElement extends HTMLElement {}
|
|
||||||
interface HTMLParamElement extends HTMLElement {}
|
|
||||||
interface HTMLPreElement extends HTMLElement {}
|
|
||||||
interface HTMLProgressElement extends HTMLElement {}
|
|
||||||
interface HTMLQuoteElement extends HTMLElement {}
|
|
||||||
interface HTMLSlotElement extends HTMLElement {}
|
|
||||||
interface HTMLScriptElement extends HTMLElement {}
|
|
||||||
interface HTMLSelectElement extends HTMLElement {}
|
|
||||||
interface HTMLSourceElement extends HTMLElement {}
|
|
||||||
interface HTMLSpanElement extends HTMLElement {}
|
|
||||||
interface HTMLStyleElement extends HTMLElement {}
|
|
||||||
interface HTMLTableElement extends HTMLElement {}
|
|
||||||
interface HTMLTableColElement extends HTMLElement {}
|
|
||||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
|
||||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
|
||||||
interface HTMLTableRowElement extends HTMLElement {}
|
|
||||||
interface HTMLTableSectionElement extends HTMLElement {}
|
|
||||||
interface HTMLTemplateElement extends HTMLElement {}
|
|
||||||
interface HTMLTextAreaElement extends HTMLElement {}
|
|
||||||
interface HTMLTimeElement extends HTMLElement {}
|
|
||||||
interface HTMLTitleElement extends HTMLElement {}
|
|
||||||
interface HTMLTrackElement extends HTMLElement {}
|
|
||||||
interface HTMLUListElement extends HTMLElement {}
|
|
||||||
interface HTMLVideoElement extends HTMLElement {}
|
|
||||||
interface HTMLWebViewElement extends HTMLElement {}
|
|
||||||
|
|
||||||
interface SVGElement extends Element {}
|
|
||||||
interface SVGSVGElement extends SVGElement {}
|
|
||||||
interface SVGCircleElement extends SVGElement {}
|
|
||||||
interface SVGClipPathElement extends SVGElement {}
|
|
||||||
interface SVGDefsElement extends SVGElement {}
|
|
||||||
interface SVGDescElement extends SVGElement {}
|
|
||||||
interface SVGEllipseElement extends SVGElement {}
|
|
||||||
interface SVGFEBlendElement extends SVGElement {}
|
|
||||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
|
||||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
|
||||||
interface SVGFECompositeElement extends SVGElement {}
|
|
||||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
|
||||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
|
||||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
|
||||||
interface SVGFEDistantLightElement extends SVGElement {}
|
|
||||||
interface SVGFEDropShadowElement extends SVGElement {}
|
|
||||||
interface SVGFEFloodElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncAElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncBElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncGElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncRElement extends SVGElement {}
|
|
||||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
|
||||||
interface SVGFEImageElement extends SVGElement {}
|
|
||||||
interface SVGFEMergeElement extends SVGElement {}
|
|
||||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
|
||||||
interface SVGFEMorphologyElement extends SVGElement {}
|
|
||||||
interface SVGFEOffsetElement extends SVGElement {}
|
|
||||||
interface SVGFEPointLightElement extends SVGElement {}
|
|
||||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
|
||||||
interface SVGFESpotLightElement extends SVGElement {}
|
|
||||||
interface SVGFETileElement extends SVGElement {}
|
|
||||||
interface SVGFETurbulenceElement extends SVGElement {}
|
|
||||||
interface SVGFilterElement extends SVGElement {}
|
|
||||||
interface SVGForeignObjectElement extends SVGElement {}
|
|
||||||
interface SVGGElement extends SVGElement {}
|
|
||||||
interface SVGImageElement extends SVGElement {}
|
|
||||||
interface SVGLineElement extends SVGElement {}
|
|
||||||
interface SVGLinearGradientElement extends SVGElement {}
|
|
||||||
interface SVGMarkerElement extends SVGElement {}
|
|
||||||
interface SVGMaskElement extends SVGElement {}
|
|
||||||
interface SVGMetadataElement extends SVGElement {}
|
|
||||||
interface SVGPathElement extends SVGElement {}
|
|
||||||
interface SVGPatternElement extends SVGElement {}
|
|
||||||
interface SVGPolygonElement extends SVGElement {}
|
|
||||||
interface SVGPolylineElement extends SVGElement {}
|
|
||||||
interface SVGRadialGradientElement extends SVGElement {}
|
|
||||||
interface SVGRectElement extends SVGElement {}
|
|
||||||
interface SVGSetElement extends SVGElement {}
|
|
||||||
interface SVGStopElement extends SVGElement {}
|
|
||||||
interface SVGSwitchElement extends SVGElement {}
|
|
||||||
interface SVGSymbolElement extends SVGElement {}
|
|
||||||
interface SVGTextElement extends SVGElement {}
|
|
||||||
interface SVGTextPathElement extends SVGElement {}
|
|
||||||
interface SVGTSpanElement extends SVGElement {}
|
|
||||||
interface SVGUseElement extends SVGElement {}
|
|
||||||
interface SVGViewElement extends SVGElement {}
|
|
||||||
|
|
||||||
interface FormData {}
|
|
||||||
interface Text {}
|
|
||||||
interface TouchList {}
|
|
||||||
interface WebGLRenderingContext {}
|
|
||||||
interface WebGL2RenderingContext {}
|
|
||||||
|
|
||||||
interface TrustedHTML {}
|
|
||||||
4587
node_modules/@types/react/index.d.ts
generated
vendored
4587
node_modules/@types/react/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
@@ -1,45 +0,0 @@
|
|||||||
import * as React from "./";
|
|
||||||
export { Fragment } from "./";
|
|
||||||
|
|
||||||
export namespace JSX {
|
|
||||||
type ElementType = React.JSX.ElementType;
|
|
||||||
interface Element extends React.JSX.Element {}
|
|
||||||
interface ElementClass extends React.JSX.ElementClass {}
|
|
||||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
|
||||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
|
||||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
|
||||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
|
||||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
|
||||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface JSXSource {
|
|
||||||
/**
|
|
||||||
* The source file where the element originates from.
|
|
||||||
*/
|
|
||||||
fileName?: string | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The line number where the element was created.
|
|
||||||
*/
|
|
||||||
lineNumber?: number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The column number where the element was created.
|
|
||||||
*/
|
|
||||||
columnNumber?: number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a React element.
|
|
||||||
*
|
|
||||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
|
||||||
*/
|
|
||||||
export function jsxDEV(
|
|
||||||
type: React.ElementType,
|
|
||||||
props: unknown,
|
|
||||||
key: React.Key | undefined,
|
|
||||||
isStatic: boolean,
|
|
||||||
source?: JSXSource,
|
|
||||||
self?: unknown,
|
|
||||||
): React.ReactElement;
|
|
||||||
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
@@ -1,36 +0,0 @@
|
|||||||
import * as React from "./";
|
|
||||||
export { Fragment } from "./";
|
|
||||||
|
|
||||||
export namespace JSX {
|
|
||||||
type ElementType = React.JSX.ElementType;
|
|
||||||
interface Element extends React.JSX.Element {}
|
|
||||||
interface ElementClass extends React.JSX.ElementClass {}
|
|
||||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
|
||||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
|
||||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
|
||||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
|
||||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
|
||||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a React element.
|
|
||||||
*
|
|
||||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
|
||||||
*/
|
|
||||||
export function jsx(
|
|
||||||
type: React.ElementType,
|
|
||||||
props: unknown,
|
|
||||||
key?: React.Key,
|
|
||||||
): React.ReactElement;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a React element.
|
|
||||||
*
|
|
||||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
|
||||||
*/
|
|
||||||
export function jsxs(
|
|
||||||
type: React.ElementType,
|
|
||||||
props: unknown,
|
|
||||||
key?: React.Key,
|
|
||||||
): React.ReactElement;
|
|
||||||
206
node_modules/@types/react/package.json
generated
vendored
206
node_modules/@types/react/package.json
generated
vendored
@@ -1,206 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@types/react",
|
|
||||||
"version": "18.3.27",
|
|
||||||
"description": "TypeScript definitions for react",
|
|
||||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
|
||||||
"license": "MIT",
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Asana",
|
|
||||||
"url": "https://asana.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "AssureSign",
|
|
||||||
"url": "http://www.assuresign.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Microsoft",
|
|
||||||
"url": "https://microsoft.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "John Reilly",
|
|
||||||
"githubUsername": "johnnyreilly",
|
|
||||||
"url": "https://github.com/johnnyreilly"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Benoit Benezech",
|
|
||||||
"githubUsername": "bbenezech",
|
|
||||||
"url": "https://github.com/bbenezech"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Patricio Zavolinsky",
|
|
||||||
"githubUsername": "pzavolinsky",
|
|
||||||
"url": "https://github.com/pzavolinsky"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Eric Anderson",
|
|
||||||
"githubUsername": "ericanderson",
|
|
||||||
"url": "https://github.com/ericanderson"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Dovydas Navickas",
|
|
||||||
"githubUsername": "DovydasNavickas",
|
|
||||||
"url": "https://github.com/DovydasNavickas"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Josh Rutherford",
|
|
||||||
"githubUsername": "theruther4d",
|
|
||||||
"url": "https://github.com/theruther4d"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Guilherme Hübner",
|
|
||||||
"githubUsername": "guilhermehubner",
|
|
||||||
"url": "https://github.com/guilhermehubner"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Ferdy Budhidharma",
|
|
||||||
"githubUsername": "ferdaber",
|
|
||||||
"url": "https://github.com/ferdaber"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Johann Rakotoharisoa",
|
|
||||||
"githubUsername": "jrakotoharisoa",
|
|
||||||
"url": "https://github.com/jrakotoharisoa"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Olivier Pascal",
|
|
||||||
"githubUsername": "pascaloliv",
|
|
||||||
"url": "https://github.com/pascaloliv"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Martin Hochel",
|
|
||||||
"githubUsername": "hotell",
|
|
||||||
"url": "https://github.com/hotell"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Frank Li",
|
|
||||||
"githubUsername": "franklixuefei",
|
|
||||||
"url": "https://github.com/franklixuefei"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Jessica Franco",
|
|
||||||
"githubUsername": "Jessidhia",
|
|
||||||
"url": "https://github.com/Jessidhia"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Saransh Kataria",
|
|
||||||
"githubUsername": "saranshkataria",
|
|
||||||
"url": "https://github.com/saranshkataria"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Kanitkorn Sujautra",
|
|
||||||
"githubUsername": "lukyth",
|
|
||||||
"url": "https://github.com/lukyth"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Sebastian Silbermann",
|
|
||||||
"githubUsername": "eps1lon",
|
|
||||||
"url": "https://github.com/eps1lon"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Kyle Scully",
|
|
||||||
"githubUsername": "zieka",
|
|
||||||
"url": "https://github.com/zieka"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Cong Zhang",
|
|
||||||
"githubUsername": "dancerphil",
|
|
||||||
"url": "https://github.com/dancerphil"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Dimitri Mitropoulos",
|
|
||||||
"githubUsername": "dimitropoulos",
|
|
||||||
"url": "https://github.com/dimitropoulos"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "JongChan Choi",
|
|
||||||
"githubUsername": "disjukr",
|
|
||||||
"url": "https://github.com/disjukr"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Victor Magalhães",
|
|
||||||
"githubUsername": "vhfmag",
|
|
||||||
"url": "https://github.com/vhfmag"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Priyanshu Rav",
|
|
||||||
"githubUsername": "priyanshurav",
|
|
||||||
"url": "https://github.com/priyanshurav"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Dmitry Semigradsky",
|
|
||||||
"githubUsername": "Semigradsky",
|
|
||||||
"url": "https://github.com/Semigradsky"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Matt Pocock",
|
|
||||||
"githubUsername": "mattpocock",
|
|
||||||
"url": "https://github.com/mattpocock"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"main": "",
|
|
||||||
"types": "index.d.ts",
|
|
||||||
"typesVersions": {
|
|
||||||
"<=5.0": {
|
|
||||||
"*": [
|
|
||||||
"ts5.0/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"types@<=5.0": {
|
|
||||||
"default": "./ts5.0/index.d.ts"
|
|
||||||
},
|
|
||||||
"types": {
|
|
||||||
"default": "./index.d.ts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"./canary": {
|
|
||||||
"types@<=5.0": {
|
|
||||||
"default": "./ts5.0/canary.d.ts"
|
|
||||||
},
|
|
||||||
"types": {
|
|
||||||
"default": "./canary.d.ts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"./experimental": {
|
|
||||||
"types@<=5.0": {
|
|
||||||
"default": "./ts5.0/experimental.d.ts"
|
|
||||||
},
|
|
||||||
"types": {
|
|
||||||
"default": "./experimental.d.ts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"./jsx-runtime": {
|
|
||||||
"types@<=5.0": {
|
|
||||||
"default": "./ts5.0/jsx-runtime.d.ts"
|
|
||||||
},
|
|
||||||
"types": {
|
|
||||||
"default": "./jsx-runtime.d.ts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"./jsx-dev-runtime": {
|
|
||||||
"types@<=5.0": {
|
|
||||||
"default": "./ts5.0/jsx-dev-runtime.d.ts"
|
|
||||||
},
|
|
||||||
"types": {
|
|
||||||
"default": "./jsx-dev-runtime.d.ts"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"./package.json": "./package.json"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
|
||||||
"directory": "types/react"
|
|
||||||
},
|
|
||||||
"scripts": {},
|
|
||||||
"dependencies": {
|
|
||||||
"@types/prop-types": "*",
|
|
||||||
"csstype": "^3.2.2"
|
|
||||||
},
|
|
||||||
"peerDependencies": {},
|
|
||||||
"typesPublisherContentHash": "f54240dfb13d919fc80763ffd09b6a809f75acc94a1fe3aa944e732e4abca02f",
|
|
||||||
"typeScriptVersion": "5.2"
|
|
||||||
}
|
|
||||||
166
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
166
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
@@ -1,166 +0,0 @@
|
|||||||
/**
|
|
||||||
* These are types for things that are present in the React `canary` release channel.
|
|
||||||
*
|
|
||||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
|
||||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
|
||||||
* is to add `"react/canary"` to the `"types"` array.
|
|
||||||
*
|
|
||||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
|
||||||
* This module does not exist in reality, which is why the {} is important:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* import {} from 'react/canary'
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* It is also possible to include it through a triple-slash reference:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* /// <reference types="react/canary" />
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
|
||||||
|
|
||||||
import React = require(".");
|
|
||||||
|
|
||||||
export {};
|
|
||||||
|
|
||||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
|
||||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
||||||
|
|
||||||
type NativeToggleEvent = ToggleEvent;
|
|
||||||
|
|
||||||
declare module "." {
|
|
||||||
export type Usable<T> = PromiseLike<T> | Context<T>;
|
|
||||||
|
|
||||||
export function use<T>(usable: Usable<T>): T;
|
|
||||||
|
|
||||||
interface ServerContextJSONArray extends ReadonlyArray<ServerContextJSONValue> {}
|
|
||||||
export type ServerContextJSONValue =
|
|
||||||
| string
|
|
||||||
| boolean
|
|
||||||
| number
|
|
||||||
| null
|
|
||||||
| ServerContextJSONArray
|
|
||||||
| { [key: string]: ServerContextJSONValue };
|
|
||||||
export interface ServerContext<T extends ServerContextJSONValue> {
|
|
||||||
Provider: Provider<T>;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Accepts a context object (the value returned from `React.createContext` or `React.createServerContext`) and returns the current
|
|
||||||
* context value, as given by the nearest context provider for the given context.
|
|
||||||
*
|
|
||||||
* @version 16.8.0
|
|
||||||
* @see https://react.dev/reference/react/useContext
|
|
||||||
*/
|
|
||||||
function useContext<T extends ServerContextJSONValue>(context: ServerContext<T>): T;
|
|
||||||
export function createServerContext<T extends ServerContextJSONValue>(
|
|
||||||
globalName: string,
|
|
||||||
defaultValue: T,
|
|
||||||
): ServerContext<T>;
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
||||||
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
|
|
||||||
|
|
||||||
export function unstable_useCacheRefresh(): () => void;
|
|
||||||
|
|
||||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {
|
|
||||||
functions: (formData: FormData) => void | Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TransitionStartFunction {
|
|
||||||
/**
|
|
||||||
* Marks all state updates inside the async function as transitions
|
|
||||||
*
|
|
||||||
* @see {https://react.dev/reference/react/useTransition#starttransition}
|
|
||||||
*
|
|
||||||
* @param callback
|
|
||||||
*/
|
|
||||||
(callback: () => Promise<VoidOrUndefinedOnly>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Similar to `useTransition` but allows uses where hooks are not available.
|
|
||||||
*
|
|
||||||
* @param callback An _asynchronous_ function which causes state updates that can be deferred.
|
|
||||||
*/
|
|
||||||
export function startTransition(scope: () => Promise<VoidOrUndefinedOnly>): void;
|
|
||||||
|
|
||||||
export function useOptimistic<State>(
|
|
||||||
passthrough: State,
|
|
||||||
): [State, (action: State | ((pendingState: State) => State)) => void];
|
|
||||||
export function useOptimistic<State, Action>(
|
|
||||||
passthrough: State,
|
|
||||||
reducer: (state: State, action: Action) => State,
|
|
||||||
): [State, (action: Action) => void];
|
|
||||||
|
|
||||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
|
|
||||||
cleanup: () => VoidOrUndefinedOnly;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function useActionState<State>(
|
|
||||||
action: (state: Awaited<State>) => State | Promise<State>,
|
|
||||||
initialState: Awaited<State>,
|
|
||||||
permalink?: string,
|
|
||||||
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
|
||||||
export function useActionState<State, Payload>(
|
|
||||||
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
|
|
||||||
initialState: Awaited<State>,
|
|
||||||
permalink?: string,
|
|
||||||
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
|
|
||||||
|
|
||||||
interface DOMAttributes<T> {
|
|
||||||
// Transition Events
|
|
||||||
onTransitionCancel?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionCancelCapture?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionRun?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionRunCapture?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionStart?: TransitionEventHandler<T> | undefined;
|
|
||||||
onTransitionStartCapture?: TransitionEventHandler<T> | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
type ToggleEventHandler<T = Element> = EventHandler<ToggleEvent<T>>;
|
|
||||||
|
|
||||||
interface HTMLAttributes<T> {
|
|
||||||
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
||||||
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
||||||
popoverTarget?: string | undefined;
|
|
||||||
onToggle?: ToggleEventHandler<T> | undefined;
|
|
||||||
onBeforeToggle?: ToggleEventHandler<T> | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ToggleEvent<T = Element> extends SyntheticEvent<T, NativeToggleEvent> {
|
|
||||||
oldState: "closed" | "open";
|
|
||||||
newState: "closed" | "open";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface LinkHTMLAttributes<T> {
|
|
||||||
precedence?: string | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StyleHTMLAttributes<T> {
|
|
||||||
href?: string | undefined;
|
|
||||||
precedence?: string | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal Use `Awaited<ReactNode>` instead
|
|
||||||
*/
|
|
||||||
// Helper type to enable `Awaited<ReactNode>`.
|
|
||||||
// Must be a copy of the non-thenables of `ReactNode`.
|
|
||||||
type AwaitedReactNode =
|
|
||||||
| ReactElement
|
|
||||||
| string
|
|
||||||
| number
|
|
||||||
| Iterable<AwaitedReactNode>
|
|
||||||
| ReactPortal
|
|
||||||
| boolean
|
|
||||||
| null
|
|
||||||
| undefined;
|
|
||||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
|
|
||||||
promises: Promise<AwaitedReactNode>;
|
|
||||||
bigints: bigint;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
132
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
132
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
@@ -1,132 +0,0 @@
|
|||||||
/**
|
|
||||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
|
||||||
* on a stable build.
|
|
||||||
*
|
|
||||||
* Once they are promoted to stable they can just be moved to the main index file.
|
|
||||||
*
|
|
||||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
|
||||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
|
||||||
* is to add `"react/experimental"` to the `"types"` array.
|
|
||||||
*
|
|
||||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
|
||||||
* This module does not exist in reality, which is why the {} is important:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* import {} from 'react/experimental'
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* It is also possible to include it through a triple-slash reference:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* /// <reference types="react/experimental" />
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
|
||||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
|
||||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
|
||||||
//
|
|
||||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
|
||||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
|
||||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
|
||||||
//
|
|
||||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
|
||||||
|
|
||||||
import React = require("./canary");
|
|
||||||
|
|
||||||
export {};
|
|
||||||
|
|
||||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
|
||||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
|
||||||
|
|
||||||
declare module "." {
|
|
||||||
export interface SuspenseProps {
|
|
||||||
/**
|
|
||||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
|
||||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
|
||||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
|
||||||
*/
|
|
||||||
unstable_expectedLoadTime?: number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together";
|
|
||||||
export type SuspenseListTailMode = "collapsed" | "hidden";
|
|
||||||
|
|
||||||
export interface SuspenseListCommonProps {
|
|
||||||
/**
|
|
||||||
* Note that SuspenseList require more than one child;
|
|
||||||
* it is a runtime warning to provide only a single child.
|
|
||||||
*
|
|
||||||
* It does, however, allow those children to be wrapped inside a single
|
|
||||||
* level of `<React.Fragment>`.
|
|
||||||
*/
|
|
||||||
children: ReactElement | Iterable<ReactElement>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
|
||||||
/**
|
|
||||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
||||||
*/
|
|
||||||
revealOrder: "forwards" | "backwards";
|
|
||||||
/**
|
|
||||||
* Dictates how unloaded items in a SuspenseList is shown.
|
|
||||||
*
|
|
||||||
* - By default, `SuspenseList` will show all fallbacks in the list.
|
|
||||||
* - `collapsed` shows only the next fallback in the list.
|
|
||||||
* - `hidden` doesn’t show any unloaded items.
|
|
||||||
*/
|
|
||||||
tail?: SuspenseListTailMode | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
|
||||||
/**
|
|
||||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
|
||||||
*/
|
|
||||||
revealOrder?: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
|
|
||||||
/**
|
|
||||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
|
||||||
*/
|
|
||||||
tail?: never | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
|
||||||
* in which these components are revealed to the user.
|
|
||||||
*
|
|
||||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
|
||||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
|
||||||
* until previous items have been displayed (this behavior is adjustable).
|
|
||||||
*
|
|
||||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
|
||||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
|
||||||
*/
|
|
||||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
||||||
export function experimental_useEffectEvent<T extends Function>(event: T): T;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Warning: Only available in development builds.
|
|
||||||
*/
|
|
||||||
function captureOwnerStack(): string | null;
|
|
||||||
|
|
||||||
type Reference = object;
|
|
||||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
|
||||||
function experimental_taintUniqueValue(
|
|
||||||
message: string | undefined,
|
|
||||||
lifetime: Reference,
|
|
||||||
value: TaintableUniqueValue,
|
|
||||||
): void;
|
|
||||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
|
||||||
|
|
||||||
export interface HTMLAttributes<T> {
|
|
||||||
/**
|
|
||||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert
|
|
||||||
*/
|
|
||||||
inert?: boolean | undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
161
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
161
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
@@ -1,161 +0,0 @@
|
|||||||
/*
|
|
||||||
React projects that don't include the DOM library need these interfaces to compile.
|
|
||||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
|
||||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
|
||||||
|
|
||||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
|
||||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
|
||||||
*/
|
|
||||||
|
|
||||||
interface Event {}
|
|
||||||
interface AnimationEvent extends Event {}
|
|
||||||
interface ClipboardEvent extends Event {}
|
|
||||||
interface CompositionEvent extends Event {}
|
|
||||||
interface DragEvent extends Event {}
|
|
||||||
interface FocusEvent extends Event {}
|
|
||||||
interface InputEvent extends Event {}
|
|
||||||
interface KeyboardEvent extends Event {}
|
|
||||||
interface MouseEvent extends Event {}
|
|
||||||
interface TouchEvent extends Event {}
|
|
||||||
interface PointerEvent extends Event {}
|
|
||||||
interface ToggleEvent extends Event {}
|
|
||||||
interface TransitionEvent extends Event {}
|
|
||||||
interface UIEvent extends Event {}
|
|
||||||
interface WheelEvent extends Event {}
|
|
||||||
|
|
||||||
interface EventTarget {}
|
|
||||||
interface Document {}
|
|
||||||
interface DataTransfer {}
|
|
||||||
interface StyleMedia {}
|
|
||||||
|
|
||||||
interface Element {}
|
|
||||||
interface DocumentFragment {}
|
|
||||||
|
|
||||||
interface HTMLElement extends Element {}
|
|
||||||
interface HTMLAnchorElement extends HTMLElement {}
|
|
||||||
interface HTMLAreaElement extends HTMLElement {}
|
|
||||||
interface HTMLAudioElement extends HTMLElement {}
|
|
||||||
interface HTMLBaseElement extends HTMLElement {}
|
|
||||||
interface HTMLBodyElement extends HTMLElement {}
|
|
||||||
interface HTMLBRElement extends HTMLElement {}
|
|
||||||
interface HTMLButtonElement extends HTMLElement {}
|
|
||||||
interface HTMLCanvasElement extends HTMLElement {}
|
|
||||||
interface HTMLDataElement extends HTMLElement {}
|
|
||||||
interface HTMLDataListElement extends HTMLElement {}
|
|
||||||
interface HTMLDetailsElement extends HTMLElement {}
|
|
||||||
interface HTMLDialogElement extends HTMLElement {}
|
|
||||||
interface HTMLDivElement extends HTMLElement {}
|
|
||||||
interface HTMLDListElement extends HTMLElement {}
|
|
||||||
interface HTMLEmbedElement extends HTMLElement {}
|
|
||||||
interface HTMLFieldSetElement extends HTMLElement {}
|
|
||||||
interface HTMLFormElement extends HTMLElement {}
|
|
||||||
interface HTMLHeadingElement extends HTMLElement {}
|
|
||||||
interface HTMLHeadElement extends HTMLElement {}
|
|
||||||
interface HTMLHRElement extends HTMLElement {}
|
|
||||||
interface HTMLHtmlElement extends HTMLElement {}
|
|
||||||
interface HTMLIFrameElement extends HTMLElement {}
|
|
||||||
interface HTMLImageElement extends HTMLElement {}
|
|
||||||
interface HTMLInputElement extends HTMLElement {}
|
|
||||||
interface HTMLModElement extends HTMLElement {}
|
|
||||||
interface HTMLLabelElement extends HTMLElement {}
|
|
||||||
interface HTMLLegendElement extends HTMLElement {}
|
|
||||||
interface HTMLLIElement extends HTMLElement {}
|
|
||||||
interface HTMLLinkElement extends HTMLElement {}
|
|
||||||
interface HTMLMapElement extends HTMLElement {}
|
|
||||||
interface HTMLMetaElement extends HTMLElement {}
|
|
||||||
interface HTMLMeterElement extends HTMLElement {}
|
|
||||||
interface HTMLObjectElement extends HTMLElement {}
|
|
||||||
interface HTMLOListElement extends HTMLElement {}
|
|
||||||
interface HTMLOptGroupElement extends HTMLElement {}
|
|
||||||
interface HTMLOptionElement extends HTMLElement {}
|
|
||||||
interface HTMLOutputElement extends HTMLElement {}
|
|
||||||
interface HTMLParagraphElement extends HTMLElement {}
|
|
||||||
interface HTMLParamElement extends HTMLElement {}
|
|
||||||
interface HTMLPreElement extends HTMLElement {}
|
|
||||||
interface HTMLProgressElement extends HTMLElement {}
|
|
||||||
interface HTMLQuoteElement extends HTMLElement {}
|
|
||||||
interface HTMLSlotElement extends HTMLElement {}
|
|
||||||
interface HTMLScriptElement extends HTMLElement {}
|
|
||||||
interface HTMLSelectElement extends HTMLElement {}
|
|
||||||
interface HTMLSourceElement extends HTMLElement {}
|
|
||||||
interface HTMLSpanElement extends HTMLElement {}
|
|
||||||
interface HTMLStyleElement extends HTMLElement {}
|
|
||||||
interface HTMLTableElement extends HTMLElement {}
|
|
||||||
interface HTMLTableColElement extends HTMLElement {}
|
|
||||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
|
||||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
|
||||||
interface HTMLTableRowElement extends HTMLElement {}
|
|
||||||
interface HTMLTableSectionElement extends HTMLElement {}
|
|
||||||
interface HTMLTemplateElement extends HTMLElement {}
|
|
||||||
interface HTMLTextAreaElement extends HTMLElement {}
|
|
||||||
interface HTMLTimeElement extends HTMLElement {}
|
|
||||||
interface HTMLTitleElement extends HTMLElement {}
|
|
||||||
interface HTMLTrackElement extends HTMLElement {}
|
|
||||||
interface HTMLUListElement extends HTMLElement {}
|
|
||||||
interface HTMLVideoElement extends HTMLElement {}
|
|
||||||
interface HTMLWebViewElement extends HTMLElement {}
|
|
||||||
|
|
||||||
interface SVGElement extends Element {}
|
|
||||||
interface SVGSVGElement extends SVGElement {}
|
|
||||||
interface SVGCircleElement extends SVGElement {}
|
|
||||||
interface SVGClipPathElement extends SVGElement {}
|
|
||||||
interface SVGDefsElement extends SVGElement {}
|
|
||||||
interface SVGDescElement extends SVGElement {}
|
|
||||||
interface SVGEllipseElement extends SVGElement {}
|
|
||||||
interface SVGFEBlendElement extends SVGElement {}
|
|
||||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
|
||||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
|
||||||
interface SVGFECompositeElement extends SVGElement {}
|
|
||||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
|
||||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
|
||||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
|
||||||
interface SVGFEDistantLightElement extends SVGElement {}
|
|
||||||
interface SVGFEDropShadowElement extends SVGElement {}
|
|
||||||
interface SVGFEFloodElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncAElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncBElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncGElement extends SVGElement {}
|
|
||||||
interface SVGFEFuncRElement extends SVGElement {}
|
|
||||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
|
||||||
interface SVGFEImageElement extends SVGElement {}
|
|
||||||
interface SVGFEMergeElement extends SVGElement {}
|
|
||||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
|
||||||
interface SVGFEMorphologyElement extends SVGElement {}
|
|
||||||
interface SVGFEOffsetElement extends SVGElement {}
|
|
||||||
interface SVGFEPointLightElement extends SVGElement {}
|
|
||||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
|
||||||
interface SVGFESpotLightElement extends SVGElement {}
|
|
||||||
interface SVGFETileElement extends SVGElement {}
|
|
||||||
interface SVGFETurbulenceElement extends SVGElement {}
|
|
||||||
interface SVGFilterElement extends SVGElement {}
|
|
||||||
interface SVGForeignObjectElement extends SVGElement {}
|
|
||||||
interface SVGGElement extends SVGElement {}
|
|
||||||
interface SVGImageElement extends SVGElement {}
|
|
||||||
interface SVGLineElement extends SVGElement {}
|
|
||||||
interface SVGLinearGradientElement extends SVGElement {}
|
|
||||||
interface SVGMarkerElement extends SVGElement {}
|
|
||||||
interface SVGMaskElement extends SVGElement {}
|
|
||||||
interface SVGMetadataElement extends SVGElement {}
|
|
||||||
interface SVGPathElement extends SVGElement {}
|
|
||||||
interface SVGPatternElement extends SVGElement {}
|
|
||||||
interface SVGPolygonElement extends SVGElement {}
|
|
||||||
interface SVGPolylineElement extends SVGElement {}
|
|
||||||
interface SVGRadialGradientElement extends SVGElement {}
|
|
||||||
interface SVGRectElement extends SVGElement {}
|
|
||||||
interface SVGSetElement extends SVGElement {}
|
|
||||||
interface SVGStopElement extends SVGElement {}
|
|
||||||
interface SVGSwitchElement extends SVGElement {}
|
|
||||||
interface SVGSymbolElement extends SVGElement {}
|
|
||||||
interface SVGTextElement extends SVGElement {}
|
|
||||||
interface SVGTextPathElement extends SVGElement {}
|
|
||||||
interface SVGTSpanElement extends SVGElement {}
|
|
||||||
interface SVGUseElement extends SVGElement {}
|
|
||||||
interface SVGViewElement extends SVGElement {}
|
|
||||||
|
|
||||||
interface FormData {}
|
|
||||||
interface Text {}
|
|
||||||
interface TouchList {}
|
|
||||||
interface WebGLRenderingContext {}
|
|
||||||
interface WebGL2RenderingContext {}
|
|
||||||
|
|
||||||
interface TrustedHTML {}
|
|
||||||
4573
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
4573
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
@@ -1,44 +0,0 @@
|
|||||||
import * as React from "./";
|
|
||||||
export { Fragment } from "./";
|
|
||||||
|
|
||||||
export namespace JSX {
|
|
||||||
interface Element extends React.JSX.Element {}
|
|
||||||
interface ElementClass extends React.JSX.ElementClass {}
|
|
||||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
|
||||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
|
||||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
|
||||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
|
||||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
|
||||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface JSXSource {
|
|
||||||
/**
|
|
||||||
* The source file where the element originates from.
|
|
||||||
*/
|
|
||||||
fileName?: string | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The line number where the element was created.
|
|
||||||
*/
|
|
||||||
lineNumber?: number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The column number where the element was created.
|
|
||||||
*/
|
|
||||||
columnNumber?: number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a React element.
|
|
||||||
*
|
|
||||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
|
||||||
*/
|
|
||||||
export function jsxDEV(
|
|
||||||
type: React.ElementType,
|
|
||||||
props: unknown,
|
|
||||||
key: React.Key | undefined,
|
|
||||||
isStatic: boolean,
|
|
||||||
source?: JSXSource,
|
|
||||||
self?: unknown,
|
|
||||||
): React.ReactElement;
|
|
||||||
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
@@ -1,35 +0,0 @@
|
|||||||
import * as React from "./";
|
|
||||||
export { Fragment } from "./";
|
|
||||||
|
|
||||||
export namespace JSX {
|
|
||||||
interface Element extends React.JSX.Element {}
|
|
||||||
interface ElementClass extends React.JSX.ElementClass {}
|
|
||||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
|
||||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
|
||||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
|
||||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
|
||||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
|
||||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a React element.
|
|
||||||
*
|
|
||||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
|
||||||
*/
|
|
||||||
export function jsx(
|
|
||||||
type: React.ElementType,
|
|
||||||
props: unknown,
|
|
||||||
key?: React.Key,
|
|
||||||
): React.ReactElement;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a React element.
|
|
||||||
*
|
|
||||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
|
||||||
*/
|
|
||||||
export function jsxs(
|
|
||||||
type: React.ElementType,
|
|
||||||
props: unknown,
|
|
||||||
key?: React.Key,
|
|
||||||
): React.ReactElement;
|
|
||||||
25
node_modules/@vkontakte/vk-bridge/LICENSE
generated
vendored
25
node_modules/@vkontakte/vk-bridge/LICENSE
generated
vendored
@@ -1,25 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2017-present, V Kontakte, LLC.
|
|
||||||
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
200
node_modules/@vkontakte/vk-bridge/README.md
generated
vendored
200
node_modules/@vkontakte/vk-bridge/README.md
generated
vendored
@@ -1,200 +0,0 @@
|
|||||||
# VK Bridge Core
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
import bridge from '@vkontakte/vk-bridge';
|
|
||||||
|
|
||||||
// Sends event to client
|
|
||||||
bridge.send('VKWebAppInit');
|
|
||||||
|
|
||||||
// Subscribes to event, sended by client
|
|
||||||
bridge.subscribe((e) => console.log(e));
|
|
||||||
```
|
|
||||||
|
|
||||||
For use in a browser, include the file [`dist/browser.min.js`](https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js) and use as follows
|
|
||||||
|
|
||||||
```html
|
|
||||||
<script src="https://unpkg.com/@vkontakte/vk-bridge/dist/browser.min.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// Sends event to client
|
|
||||||
vkBridge.send('VKWebAppInit');
|
|
||||||
</script>
|
|
||||||
```
|
|
||||||
|
|
||||||
## API Reference
|
|
||||||
|
|
||||||
### `bridge.send(method[, params])`
|
|
||||||
|
|
||||||
Sends a message to native client and returns the `Promise` object with response data
|
|
||||||
|
|
||||||
**Parameters**
|
|
||||||
|
|
||||||
- `method` _required_ The VK Bridge method
|
|
||||||
- `params` _optional_ Message data object
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
// Sending event to client
|
|
||||||
bridge
|
|
||||||
.send('VKWebAppGetEmail')
|
|
||||||
.then((data) => {
|
|
||||||
// Handling received data
|
|
||||||
console.log(data.email);
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
// Handling an error
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also use imperative way
|
|
||||||
|
|
||||||
```js
|
|
||||||
try {
|
|
||||||
const data = await bridge.send('VKWebAppGetEmail');
|
|
||||||
|
|
||||||
// Handling received data
|
|
||||||
console.log(data.email);
|
|
||||||
} catch (error) {
|
|
||||||
// Handling an error
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### `bridge.subscribe(fn)`
|
|
||||||
|
|
||||||
Subscribes a function to events listening
|
|
||||||
|
|
||||||
**Parameters**
|
|
||||||
|
|
||||||
- `fn` _required_ Function to be subscribed to events
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
// Subscribing to receiving events
|
|
||||||
bridge.subscribe((event) => {
|
|
||||||
if (!event.detail) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { type, data } = event.detail;
|
|
||||||
|
|
||||||
if (type === 'VKWebAppOpenCodeReaderResult') {
|
|
||||||
// Reading result of the Code Reader
|
|
||||||
console.log(data.code_data);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'VKWebAppOpenCodeReaderFailed') {
|
|
||||||
// Catching the error
|
|
||||||
console.log(data.error_type, data.error_data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Sending method
|
|
||||||
bridge.send('VKWebAppOpenCodeReader', {});
|
|
||||||
```
|
|
||||||
|
|
||||||
### `bridge.unsubscribe(fn)`
|
|
||||||
|
|
||||||
Unsubscribes a function from events listening
|
|
||||||
|
|
||||||
**Parameters**
|
|
||||||
|
|
||||||
- `fn` _required_ Event subscribed function
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
const fn = (event) => {
|
|
||||||
// ...
|
|
||||||
};
|
|
||||||
|
|
||||||
// Subscribing
|
|
||||||
bridge.subscribe(fn);
|
|
||||||
|
|
||||||
// Unsubscribing
|
|
||||||
bridge.unsubscribe(fn);
|
|
||||||
```
|
|
||||||
|
|
||||||
### `bridge.supports(method)`
|
|
||||||
|
|
||||||
Checks if an event is available on the current device
|
|
||||||
|
|
||||||
**Parameters**
|
|
||||||
|
|
||||||
- `method` _required_ The VK Bridge method
|
|
||||||
|
|
||||||
### `bridge.isWebView()`
|
|
||||||
|
|
||||||
Returns `true` if VK Bridge is running in mobile app, or `false` if not
|
|
||||||
|
|
||||||
### `bridge.isIframe()`
|
|
||||||
|
|
||||||
Returns `true` if VK Bridge is running in iframe, or `false` if not
|
|
||||||
|
|
||||||
### `bridge.isEmbedded()`
|
|
||||||
|
|
||||||
Returns `true` if VK Bridge is running in embedded app, or `false` if not
|
|
||||||
|
|
||||||
### `bridge.isStandalone()`
|
|
||||||
|
|
||||||
Returns `true` if VK Bridge is running in standalone app, or `false` if not
|
|
||||||
|
|
||||||
## Middleware API
|
|
||||||
|
|
||||||
_Middlewares_ are pieces of code that intercept and process data between sending and receiving. Thus, by creating middlewares, you can easily log data, modify data before sending it, talking to an asynchronous API, etc. If you've used Redux, you were also probably already familiar with the concept—a similar is used here.
|
|
||||||
|
|
||||||
### `applyMiddleware(middleware1, ..., middlewareN)`
|
|
||||||
|
|
||||||
Creates the VK Bridge enhancer that applies middleware to the `send`
|
|
||||||
method. This is handy for a variety of task such as logging every sent
|
|
||||||
event. Returns the VK Bridge enhancer applying the middleware.
|
|
||||||
|
|
||||||
**Parameters**
|
|
||||||
|
|
||||||
- `middlewareN` A middleware to be applied
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
import bridge, { applyMiddleware } from '@vkontakte/vk-bridge';
|
|
||||||
|
|
||||||
// Logs the result of each sent event
|
|
||||||
const logger =
|
|
||||||
({ send, subscribe }) =>
|
|
||||||
(next) =>
|
|
||||||
async (method, props) => {
|
|
||||||
const result = await next(method, props);
|
|
||||||
console.log(result);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
const enhancedBridge = applyMiddleware(logger)(bridge);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
|
|
||||||
### `parseURLSearchParamsForGetLaunchParams(urlSearchParams: string)`
|
|
||||||
|
|
||||||
Parse URL search params for get provided to mini app [launch params](https://dev.vk.ru/mini-apps/development/launch-params).
|
|
||||||
|
|
||||||
**Parameters**
|
|
||||||
|
|
||||||
- `urlSearchParams` a.k.a `window.location.search`.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```js
|
|
||||||
import { parseURLSearchParamsForGetLaunchParams } from '@vkontakte/vk-bridge';
|
|
||||||
|
|
||||||
// https://exmample-mini-app.io/?vk_platform=desktop_web&vk_is_app_user=1&vk_user_id=12345
|
|
||||||
const { vk_platform, vk_viewer_group_role, vk_user_id } = parseURLSearchParamsForGetLaunchParams(
|
|
||||||
window.location.search,
|
|
||||||
);
|
|
||||||
|
|
||||||
console.log(vk_platform); // 'desktop_web'
|
|
||||||
console.log(vk_is_app_user); // 1
|
|
||||||
console.log(vk_user_id); // 12345
|
|
||||||
```
|
|
||||||
2
node_modules/@vkontakte/vk-bridge/dist/browser.min.js
generated
vendored
2
node_modules/@vkontakte/vk-bridge/dist/browser.min.js
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@vkontakte/vk-bridge/dist/browser.min.js.map
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/browser.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
715
node_modules/@vkontakte/vk-bridge/dist/index.es.js
generated
vendored
715
node_modules/@vkontakte/vk-bridge/dist/index.es.js
generated
vendored
@@ -1,715 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
||||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
||||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
||||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
||||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
***************************************************************************** */
|
|
||||||
/* global Reflect, Promise */
|
|
||||||
|
|
||||||
|
|
||||||
var __assign = function() {
|
|
||||||
__assign = Object.assign || function __assign(t) {
|
|
||||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
||||||
s = arguments[i];
|
|
||||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
};
|
|
||||||
return __assign.apply(this, arguments);
|
|
||||||
};
|
|
||||||
|
|
||||||
function __rest(s, e) {
|
|
||||||
var t = {};
|
|
||||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
||||||
t[p] = s[p];
|
|
||||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
||||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
||||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
||||||
t[p[i]] = s[p[i]];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
function __awaiter(thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function __generator(thisArg, body) {
|
|
||||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
||||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
||||||
function step(op) {
|
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
|
||||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
||||||
switch (op[0]) {
|
|
||||||
case 0: case 1: t = op; break;
|
|
||||||
case 4: _.label++; return { value: op[1], done: false };
|
|
||||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
||||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
||||||
default:
|
|
||||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
||||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
||||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
||||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
||||||
if (t[2]) _.ops.pop();
|
|
||||||
_.trys.pop(); continue;
|
|
||||||
}
|
|
||||||
op = body.call(thisArg, _);
|
|
||||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
||||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function __spreadArray(to, from, pack) {
|
|
||||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
||||||
if (ar || !(i in from)) {
|
|
||||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
||||||
ar[i] = from[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return to.concat(ar || Array.prototype.slice.call(from));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates counter interface.
|
|
||||||
*/
|
|
||||||
function createCounter() {
|
|
||||||
return {
|
|
||||||
current: 0,
|
|
||||||
next: function () {
|
|
||||||
return ++this.current;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Creates interface for resolving request promises by request id's (or not).
|
|
||||||
*
|
|
||||||
* @param instanceId Uniq bridge instance ID.
|
|
||||||
*/
|
|
||||||
function createRequestResolver(instanceId) {
|
|
||||||
var counter = createCounter();
|
|
||||||
var promiseControllers = {};
|
|
||||||
return {
|
|
||||||
/**
|
|
||||||
* Adds new controller with resolve/reject methods.
|
|
||||||
*
|
|
||||||
* @param controller Object with `resolve` and `reject` functions
|
|
||||||
* @param customId Custom `request_id`
|
|
||||||
* @returns New request id of the added controller.
|
|
||||||
*/
|
|
||||||
add: function (controller, customId) {
|
|
||||||
var id = customId != null ? customId : "".concat(counter.next(), "_").concat(instanceId);
|
|
||||||
promiseControllers[id] = controller;
|
|
||||||
return id;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Resolves/rejects an added promise by request id and the `isSuccess`
|
|
||||||
* predicate.
|
|
||||||
*
|
|
||||||
* @param requestId Request ID.
|
|
||||||
* @param data Data to pass to the resolve- or reject-function.
|
|
||||||
* @param isSuccess Predicate to select the desired function.
|
|
||||||
*/
|
|
||||||
resolve: function (requestId, data, isSuccess) {
|
|
||||||
var requestPromise = promiseControllers[requestId];
|
|
||||||
if (requestPromise) {
|
|
||||||
if (isSuccess(data)) {
|
|
||||||
requestPromise.resolve(data);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
requestPromise.reject(data);
|
|
||||||
}
|
|
||||||
promiseControllers[requestId] = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns send function that returns promises.
|
|
||||||
*
|
|
||||||
* @param sendEvent Send event function.
|
|
||||||
* @param subscribe Subscribe event function.
|
|
||||||
* @param instanceId Uniq bridge instance ID.
|
|
||||||
* @returns Send function which returns the Promise object.
|
|
||||||
*/
|
|
||||||
function promisifySend(sendEvent, subscribe, instanceId) {
|
|
||||||
var requestResolver = createRequestResolver(instanceId);
|
|
||||||
// Subscribe to receive a data
|
|
||||||
subscribe(function (event) {
|
|
||||||
if (!event.detail || !event.detail.data || typeof event.detail.data !== 'object') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// There is no request_id in receive-only events, so we check its existence.
|
|
||||||
if ('request_id' in event.detail.data) {
|
|
||||||
var _a = event.detail.data, requestId = _a.request_id, data = __rest(_a, ["request_id"]);
|
|
||||||
if (requestId) {
|
|
||||||
requestResolver.resolve(requestId, data, function (data) { return !('error_type' in data); });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return function promisifiedSend(method, props) {
|
|
||||||
if (props === void 0) { props = {}; }
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
var requestId = requestResolver.add({ resolve: resolve, reject: reject }, props.request_id);
|
|
||||||
sendEvent(method, __assign(__assign({}, props), { request_id: requestId }));
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function createInstanceId() {
|
|
||||||
var allNumbersAndLetters = 36;
|
|
||||||
var positionAfterZeroAnDot = 2;
|
|
||||||
var keyLength = 3;
|
|
||||||
return Math.random()
|
|
||||||
.toString(allNumbersAndLetters)
|
|
||||||
.substring(positionAfterZeroAnDot, positionAfterZeroAnDot + keyLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Is the client side runtime environment */
|
|
||||||
var IS_CLIENT_SIDE = typeof window !== 'undefined';
|
|
||||||
/** Is the runtime environment an Android app */
|
|
||||||
var IS_ANDROID_WEBVIEW = Boolean(IS_CLIENT_SIDE && window.AndroidBridge);
|
|
||||||
/** Is the runtime environment an iOS app */
|
|
||||||
var IS_IOS_WEBVIEW = Boolean(IS_CLIENT_SIDE &&
|
|
||||||
window.webkit &&
|
|
||||||
window.webkit.messageHandlers &&
|
|
||||||
window.webkit.messageHandlers.VKWebAppClose);
|
|
||||||
var IS_REACT_NATIVE_WEBVIEW = Boolean(IS_CLIENT_SIDE &&
|
|
||||||
window.ReactNativeWebView &&
|
|
||||||
typeof window.ReactNativeWebView.postMessage === 'function');
|
|
||||||
/** Is the runtime environment a browser */
|
|
||||||
var IS_WEB = IS_CLIENT_SIDE && !IS_ANDROID_WEBVIEW && !IS_IOS_WEBVIEW;
|
|
||||||
/** Is the runtime environment m.vk.ru */
|
|
||||||
var IS_MVK = IS_WEB && /(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search);
|
|
||||||
/** Is the runtime environment vk.ru */
|
|
||||||
var IS_DESKTOP_VK = IS_WEB && !IS_MVK;
|
|
||||||
/** Type of subscribe event */
|
|
||||||
var EVENT_TYPE = IS_WEB ? 'message' : 'VKWebAppEvent';
|
|
||||||
/** Methods supported on the desktop */
|
|
||||||
var DESKTOP_METHODS = __spreadArray([
|
|
||||||
'VKWebAppInit',
|
|
||||||
'VKWebAppGetCommunityAuthToken',
|
|
||||||
'VKWebAppAddToCommunity',
|
|
||||||
'VKWebAppAddToHomeScreenInfo',
|
|
||||||
'VKWebAppClose',
|
|
||||||
'VKWebAppCopyText',
|
|
||||||
'VKWebAppCreateHash',
|
|
||||||
'VKWebAppGetUserInfo',
|
|
||||||
'VKWebAppSetLocation',
|
|
||||||
'VKWebAppSendToClient',
|
|
||||||
'VKWebAppGetClientVersion',
|
|
||||||
'VKWebAppGetPhoneNumber',
|
|
||||||
'VKWebAppGetEmail',
|
|
||||||
'VKWebAppGetGroupInfo',
|
|
||||||
'VKWebAppGetGeodata',
|
|
||||||
'VKWebAppGetCommunityToken',
|
|
||||||
'VKWebAppGetConfig',
|
|
||||||
'VKWebAppGetLaunchParams',
|
|
||||||
'VKWebAppSetTitle',
|
|
||||||
'VKWebAppGetAuthToken',
|
|
||||||
'VKWebAppCallAPIMethod',
|
|
||||||
'VKWebAppJoinGroup',
|
|
||||||
'VKWebAppLeaveGroup',
|
|
||||||
'VKWebAppAllowMessagesFromGroup',
|
|
||||||
'VKWebAppDenyNotifications',
|
|
||||||
'VKWebAppAllowNotifications',
|
|
||||||
'VKWebAppOpenPayForm',
|
|
||||||
'VKWebAppOpenApp',
|
|
||||||
'VKWebAppShare',
|
|
||||||
'VKWebAppShowWallPostBox',
|
|
||||||
'VKWebAppScroll',
|
|
||||||
'VKWebAppShowOrderBox',
|
|
||||||
'VKWebAppShowLeaderBoardBox',
|
|
||||||
'VKWebAppShowInviteBox',
|
|
||||||
'VKWebAppShowRequestBox',
|
|
||||||
'VKWebAppAddToFavorites',
|
|
||||||
'VKWebAppShowStoryBox',
|
|
||||||
'VKWebAppStorageGet',
|
|
||||||
'VKWebAppStorageGetKeys',
|
|
||||||
'VKWebAppStorageSet',
|
|
||||||
'VKWebAppFlashGetInfo',
|
|
||||||
'VKWebAppSubscribeStoryApp',
|
|
||||||
'VKWebAppOpenWallPost',
|
|
||||||
'VKWebAppCheckAllowedScopes',
|
|
||||||
'VKWebAppCheckBannerAd',
|
|
||||||
'VKWebAppHideBannerAd',
|
|
||||||
'VKWebAppShowBannerAd',
|
|
||||||
'VKWebAppCheckNativeAds',
|
|
||||||
'VKWebAppShowNativeAds',
|
|
||||||
'VKWebAppRetargetingPixel',
|
|
||||||
'VKWebAppConversionHit',
|
|
||||||
'VKWebAppShowSubscriptionBox',
|
|
||||||
'VKWebAppCheckSurvey',
|
|
||||||
'VKWebAppShowSurvey',
|
|
||||||
'VKWebAppScrollTop',
|
|
||||||
'VKWebAppScrollTopStart',
|
|
||||||
'VKWebAppScrollTopStop',
|
|
||||||
'VKWebAppShowSlidesSheet',
|
|
||||||
'VKWebAppTranslate',
|
|
||||||
'VKWebAppRecommend',
|
|
||||||
'VKWebAppAddToProfile',
|
|
||||||
'VKWebAppGetFriends'
|
|
||||||
], (IS_DESKTOP_VK
|
|
||||||
? [
|
|
||||||
'VKWebAppResizeWindow',
|
|
||||||
'VKWebAppAddToMenu',
|
|
||||||
'VKWebAppShowInstallPushBox',
|
|
||||||
'VKWebAppShowCommunityWidgetPreviewBox',
|
|
||||||
'VKWebAppCallStart',
|
|
||||||
'VKWebAppCallJoin',
|
|
||||||
'VKWebAppCallGetStatus',
|
|
||||||
]
|
|
||||||
: ['VKWebAppShowImages']), true);
|
|
||||||
/** Cache for supported methods */
|
|
||||||
var supportedHandlers;
|
|
||||||
/** Android VK Bridge interface. */
|
|
||||||
var androidBridge = IS_CLIENT_SIDE ? window.AndroidBridge : undefined;
|
|
||||||
/** iOS VK Bridge interface. */
|
|
||||||
var iosBridge = IS_IOS_WEBVIEW ? window.webkit.messageHandlers : undefined;
|
|
||||||
/** Web VK Bridge interface. */
|
|
||||||
var webBridge = IS_WEB
|
|
||||||
? parent
|
|
||||||
: undefined;
|
|
||||||
// [Примечание 1] Отключили использование в этом PR https://github.com/VKCOM/vk-bridge/pull/262
|
|
||||||
// let webSdkHandlers: string[] | undefined;
|
|
||||||
/**
|
|
||||||
* Creates a VK Bridge API that holds functions for interact with runtime
|
|
||||||
* environment.
|
|
||||||
*
|
|
||||||
* @param version Version of the package
|
|
||||||
*/
|
|
||||||
function createVKBridge(version) {
|
|
||||||
/** Current frame id. */
|
|
||||||
var webFrameId = undefined;
|
|
||||||
/** List of functions that subscribed on events. */
|
|
||||||
var subscribers = [];
|
|
||||||
/** Uniq instance ID */
|
|
||||||
var instanceId = createInstanceId();
|
|
||||||
/**
|
|
||||||
* Sends an event to the runtime env. In the case of Android/iOS application
|
|
||||||
* env is the application itself. In the case of the browser, the parent
|
|
||||||
* frame in which the event handlers is located.
|
|
||||||
*
|
|
||||||
* @param method The method (event) name to send
|
|
||||||
* @param [props] Method properties
|
|
||||||
*/
|
|
||||||
function send(method, props) {
|
|
||||||
// Sending data through Android bridge
|
|
||||||
if (androidBridge && androidBridge[method]) {
|
|
||||||
androidBridge[method](JSON.stringify(props));
|
|
||||||
}
|
|
||||||
// Sending data through iOS bridge
|
|
||||||
else if (iosBridge &&
|
|
||||||
iosBridge[method] &&
|
|
||||||
typeof iosBridge[method].postMessage === 'function') {
|
|
||||||
iosBridge[method].postMessage(props);
|
|
||||||
}
|
|
||||||
// Sending data through React Native bridge
|
|
||||||
else if (IS_REACT_NATIVE_WEBVIEW) {
|
|
||||||
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
||||||
handler: method,
|
|
||||||
params: props,
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
// Sending data through web bridge
|
|
||||||
else if (webBridge && typeof webBridge.postMessage === 'function') {
|
|
||||||
webBridge.postMessage({
|
|
||||||
handler: method,
|
|
||||||
params: props,
|
|
||||||
type: 'vk-connect',
|
|
||||||
webFrameId: webFrameId,
|
|
||||||
connectVersion: version,
|
|
||||||
}, '*');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Adds an event listener. It will be called any time a data is received.
|
|
||||||
*
|
|
||||||
* @param listener A callback to be invoked on every event receive.
|
|
||||||
*/
|
|
||||||
function subscribe(listener) {
|
|
||||||
subscribers.push(listener);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Removes an event listener which has been subscribed for event listening.
|
|
||||||
*
|
|
||||||
* @param listener A callback to unsubscribe.
|
|
||||||
*/
|
|
||||||
function unsubscribe(listener) {
|
|
||||||
var index = subscribers.indexOf(listener);
|
|
||||||
if (index > -1) {
|
|
||||||
subscribers.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function supportsInner(method) {
|
|
||||||
if (IS_ANDROID_WEBVIEW) {
|
|
||||||
// Android support check
|
|
||||||
return !!(androidBridge && typeof androidBridge[method] === 'function');
|
|
||||||
}
|
|
||||||
else if (IS_IOS_WEBVIEW) {
|
|
||||||
// iOS support check
|
|
||||||
return !!(iosBridge &&
|
|
||||||
iosBridge[method] &&
|
|
||||||
typeof iosBridge[method].postMessage === 'function');
|
|
||||||
}
|
|
||||||
else if (IS_WEB) {
|
|
||||||
// Web support check
|
|
||||||
return DESKTOP_METHODS.includes(method);
|
|
||||||
// см. Примечание 1
|
|
||||||
// if (!webSdkHandlers) {
|
|
||||||
// console.error('You should call bridge.send("VKWebAppInit") first');
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// return webSdkHandlers.includes(method);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Checks if a method is supported on runtime platform.
|
|
||||||
*
|
|
||||||
* @param method Method (event) name to check.
|
|
||||||
* @returns Result of checking.
|
|
||||||
* @deprecated This method is deprecated. Use supportsAsync instead.
|
|
||||||
*/
|
|
||||||
function supports(method) {
|
|
||||||
console.warn('bridge.supports method is deprecated. Use bridge.supportsAsync instead.');
|
|
||||||
return supportsInner(method);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Checks whether the runtime is a WebView.
|
|
||||||
*
|
|
||||||
* @returns Result of checking.
|
|
||||||
*/
|
|
||||||
function isWebView() {
|
|
||||||
return IS_IOS_WEBVIEW || IS_ANDROID_WEBVIEW;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Checks whether the runtime is an iframe.
|
|
||||||
*
|
|
||||||
* @returns Result of checking.
|
|
||||||
*/
|
|
||||||
function isIframe() {
|
|
||||||
return IS_WEB && window.parent !== window;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Checks whether the runtime is embedded.
|
|
||||||
*
|
|
||||||
* @returns Result of checking.
|
|
||||||
*/
|
|
||||||
function isEmbedded() {
|
|
||||||
return isWebView() || isIframe();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Checks whether the runtime is standalone.
|
|
||||||
*
|
|
||||||
* @returns Result of checking.
|
|
||||||
*/
|
|
||||||
function isStandalone() {
|
|
||||||
return !isEmbedded();
|
|
||||||
}
|
|
||||||
function handleEvent(event) {
|
|
||||||
if (IS_IOS_WEBVIEW || IS_ANDROID_WEBVIEW) {
|
|
||||||
// If it's webview
|
|
||||||
return __spreadArray([], subscribers, true).map(function (fn) { return fn.call(null, event); });
|
|
||||||
}
|
|
||||||
var bridgeEventData = event === null || event === void 0 ? void 0 : event.data;
|
|
||||||
if (!IS_WEB || !bridgeEventData) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (IS_REACT_NATIVE_WEBVIEW && typeof bridgeEventData === 'string') {
|
|
||||||
try {
|
|
||||||
bridgeEventData = JSON.parse(bridgeEventData);
|
|
||||||
}
|
|
||||||
catch (_a) { }
|
|
||||||
}
|
|
||||||
var type = bridgeEventData.type, data = bridgeEventData.data, frameId = bridgeEventData.frameId;
|
|
||||||
if (!type) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// см. Примечание 1
|
|
||||||
// if (type === 'SetSupportedHandlers') {
|
|
||||||
// webSdkHandlers = data.supportedHandlers;
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
if (type === 'VKWebAppSettings') {
|
|
||||||
webFrameId = frameId;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
__spreadArray([], subscribers, true).map(function (fn) { return fn({ detail: { type: type, data: data } }); });
|
|
||||||
}
|
|
||||||
// Subscribes to listening messages from a runtime for calling each
|
|
||||||
// subscribed event listener.
|
|
||||||
if (IS_REACT_NATIVE_WEBVIEW && /(android)/i.test(navigator.userAgent)) {
|
|
||||||
document.addEventListener(EVENT_TYPE, handleEvent);
|
|
||||||
}
|
|
||||||
else if (typeof window !== 'undefined' && 'addEventListener' in window) {
|
|
||||||
window.addEventListener(EVENT_TYPE, handleEvent);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Enhanced send functions for the ability to receive response data in
|
|
||||||
* the Promise object.
|
|
||||||
*/
|
|
||||||
var sendPromise = promisifySend(send, subscribe, instanceId);
|
|
||||||
function supportsAsync(method) {
|
|
||||||
return __awaiter(this, void 0, void 0, function () {
|
|
||||||
var response;
|
|
||||||
return __generator(this, function (_a) {
|
|
||||||
switch (_a.label) {
|
|
||||||
case 0:
|
|
||||||
if (IS_ANDROID_WEBVIEW || IS_IOS_WEBVIEW) {
|
|
||||||
return [2 /*return*/, supportsInner(method)];
|
|
||||||
}
|
|
||||||
if (supportedHandlers) {
|
|
||||||
return [2 /*return*/, supportedHandlers.has(method)];
|
|
||||||
}
|
|
||||||
_a.label = 1;
|
|
||||||
case 1:
|
|
||||||
_a.trys.push([1, 3, , 4]);
|
|
||||||
return [4 /*yield*/, sendPromise('SetSupportedHandlers')];
|
|
||||||
case 2:
|
|
||||||
response = _a.sent();
|
|
||||||
supportedHandlers = new Set(response.supportedHandlers);
|
|
||||||
return [3 /*break*/, 4];
|
|
||||||
case 3:
|
|
||||||
_a.sent();
|
|
||||||
supportedHandlers = new Set(['VKWebAppInit']);
|
|
||||||
return [3 /*break*/, 4];
|
|
||||||
case 4: return [2 /*return*/, supportedHandlers.has(method)];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
subscribe(function (event) {
|
|
||||||
if (!event.detail) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
switch (event.detail.type) {
|
|
||||||
case 'SetSupportedHandlers':
|
|
||||||
supportedHandlers = new Set(event.detail.data.supportedHandlers);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
send: sendPromise,
|
|
||||||
sendPromise: sendPromise,
|
|
||||||
subscribe: subscribe,
|
|
||||||
unsubscribe: unsubscribe,
|
|
||||||
supports: supports,
|
|
||||||
supportsAsync: supportsAsync,
|
|
||||||
isWebView: isWebView,
|
|
||||||
isIframe: isIframe,
|
|
||||||
isEmbedded: isEmbedded,
|
|
||||||
isStandalone: isStandalone,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var version = "2.15.11";
|
|
||||||
|
|
||||||
var EAdsFormats;
|
|
||||||
(function (EAdsFormats) {
|
|
||||||
EAdsFormats["REWARD"] = "reward";
|
|
||||||
EAdsFormats["INTERSTITIAL"] = "interstitial";
|
|
||||||
})(EAdsFormats || (EAdsFormats = {}));
|
|
||||||
var BannerAdLayoutType;
|
|
||||||
(function (BannerAdLayoutType) {
|
|
||||||
BannerAdLayoutType["RESIZE"] = "resize";
|
|
||||||
BannerAdLayoutType["OVERLAY"] = "overlay";
|
|
||||||
})(BannerAdLayoutType || (BannerAdLayoutType = {}));
|
|
||||||
var BannerAdLocation;
|
|
||||||
(function (BannerAdLocation) {
|
|
||||||
BannerAdLocation["TOP"] = "top";
|
|
||||||
BannerAdLocation["BOTTOM"] = "bottom";
|
|
||||||
})(BannerAdLocation || (BannerAdLocation = {}));
|
|
||||||
var BannerAdAlign;
|
|
||||||
(function (BannerAdAlign) {
|
|
||||||
BannerAdAlign["LEFT"] = "left";
|
|
||||||
BannerAdAlign["RIGHT"] = "right";
|
|
||||||
BannerAdAlign["CENTER"] = "center";
|
|
||||||
})(BannerAdAlign || (BannerAdAlign = {}));
|
|
||||||
var BannerAdHeightType;
|
|
||||||
(function (BannerAdHeightType) {
|
|
||||||
BannerAdHeightType["COMPACT"] = "compact";
|
|
||||||
BannerAdHeightType["REGULAR"] = "regular";
|
|
||||||
})(BannerAdHeightType || (BannerAdHeightType = {}));
|
|
||||||
var BannerAdOrientation;
|
|
||||||
(function (BannerAdOrientation) {
|
|
||||||
BannerAdOrientation["HORIZONTAL"] = "horizontal";
|
|
||||||
BannerAdOrientation["VERTICAL"] = "vertical";
|
|
||||||
})(BannerAdOrientation || (BannerAdOrientation = {}));
|
|
||||||
var EGrantedPermission;
|
|
||||||
(function (EGrantedPermission) {
|
|
||||||
EGrantedPermission["CAMERA"] = "camera";
|
|
||||||
EGrantedPermission["LOCATION"] = "location";
|
|
||||||
EGrantedPermission["PHOTO"] = "photo";
|
|
||||||
})(EGrantedPermission || (EGrantedPermission = {}));
|
|
||||||
var EGetLaunchParamsResponseLanguages;
|
|
||||||
(function (EGetLaunchParamsResponseLanguages) {
|
|
||||||
EGetLaunchParamsResponseLanguages["RU"] = "ru";
|
|
||||||
EGetLaunchParamsResponseLanguages["UK"] = "uk";
|
|
||||||
EGetLaunchParamsResponseLanguages["UA"] = "ua";
|
|
||||||
EGetLaunchParamsResponseLanguages["EN"] = "en";
|
|
||||||
EGetLaunchParamsResponseLanguages["BE"] = "be";
|
|
||||||
EGetLaunchParamsResponseLanguages["KZ"] = "kz";
|
|
||||||
EGetLaunchParamsResponseLanguages["PT"] = "pt";
|
|
||||||
EGetLaunchParamsResponseLanguages["ES"] = "es";
|
|
||||||
})(EGetLaunchParamsResponseLanguages || (EGetLaunchParamsResponseLanguages = {}));
|
|
||||||
var EGetLaunchParamsResponseGroupRole;
|
|
||||||
(function (EGetLaunchParamsResponseGroupRole) {
|
|
||||||
EGetLaunchParamsResponseGroupRole["ADMIN"] = "admin";
|
|
||||||
EGetLaunchParamsResponseGroupRole["EDITOR"] = "editor";
|
|
||||||
EGetLaunchParamsResponseGroupRole["MEMBER"] = "member";
|
|
||||||
EGetLaunchParamsResponseGroupRole["MODER"] = "moder";
|
|
||||||
EGetLaunchParamsResponseGroupRole["NONE"] = "none";
|
|
||||||
})(EGetLaunchParamsResponseGroupRole || (EGetLaunchParamsResponseGroupRole = {}));
|
|
||||||
var EGetLaunchParamsResponsePlatforms;
|
|
||||||
(function (EGetLaunchParamsResponsePlatforms) {
|
|
||||||
EGetLaunchParamsResponsePlatforms["DESKTOP_WEB"] = "desktop_web";
|
|
||||||
EGetLaunchParamsResponsePlatforms["DESKTOP_WEB_MESSENGER"] = "desktop_web_messenger";
|
|
||||||
EGetLaunchParamsResponsePlatforms["DESKTOP_APP_MESSENGER"] = "desktop_app_messenger";
|
|
||||||
EGetLaunchParamsResponsePlatforms["MOBILE_WEB"] = "mobile_web";
|
|
||||||
EGetLaunchParamsResponsePlatforms["MOBILE_ANDROID"] = "mobile_android";
|
|
||||||
EGetLaunchParamsResponsePlatforms["MOBILE_ANDROID_MESSENGER"] = "mobile_android_messenger";
|
|
||||||
EGetLaunchParamsResponsePlatforms["MOBILE_IPHONE"] = "mobile_iphone";
|
|
||||||
EGetLaunchParamsResponsePlatforms["MOBILE_IPHONE_MESSENGER"] = "mobile_iphone_messenger";
|
|
||||||
EGetLaunchParamsResponsePlatforms["MOBILE_IPAD"] = "mobile_ipad";
|
|
||||||
})(EGetLaunchParamsResponsePlatforms || (EGetLaunchParamsResponsePlatforms = {}));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates the VK Bridge enhancer that applies middleware to the `send`
|
|
||||||
* method. This is handy for a variety of task such as logging every sent
|
|
||||||
* event.
|
|
||||||
*
|
|
||||||
* @param middlewares The middleware chain to be applied.
|
|
||||||
* @returns The VK Bridge enhancer applying the middleware.
|
|
||||||
*/
|
|
||||||
function applyMiddleware() {
|
|
||||||
var middlewares = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
middlewares[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
if (middlewares.includes(undefined) || middlewares.includes(null)) {
|
|
||||||
return applyMiddleware.apply(void 0, middlewares.filter(function (item) { return typeof item === 'function'; }));
|
|
||||||
}
|
|
||||||
return function (bridge) {
|
|
||||||
if (middlewares.length === 0) {
|
|
||||||
return bridge;
|
|
||||||
}
|
|
||||||
var send = function () {
|
|
||||||
throw new Error('Sending events while constructing your middleware is not allowed. ' +
|
|
||||||
'Other middleware would not be applied to this send.');
|
|
||||||
};
|
|
||||||
var middlewareAPI = {
|
|
||||||
subscribe: bridge.subscribe,
|
|
||||||
send: function () {
|
|
||||||
var args = [];
|
|
||||||
for (var _i = 0; _i < arguments.length; _i++) {
|
|
||||||
args[_i] = arguments[_i];
|
|
||||||
}
|
|
||||||
return bridge.send.apply(bridge, args);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
var chain = middlewares
|
|
||||||
.filter(function (item) { return typeof item === 'function'; })
|
|
||||||
.map(function (middleware) { return middleware(middlewareAPI); }) //
|
|
||||||
.reduce(function (a, b) { return function (send) { return a(b(send)); }; });
|
|
||||||
send = chain(bridge.send);
|
|
||||||
return __assign(__assign({}, bridge), { send: send });
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see https://dev.vk.ru/mini-apps/development/launch-params
|
|
||||||
*/
|
|
||||||
var parseURLSearchParamsForGetLaunchParams = function (searchParams) {
|
|
||||||
var launchParams = {};
|
|
||||||
try {
|
|
||||||
var parsedSearchParams = new URLSearchParams(searchParams);
|
|
||||||
var convertToggleStateFromStringToNumber_1 = function (value) {
|
|
||||||
switch (value) {
|
|
||||||
case '0':
|
|
||||||
return 0;
|
|
||||||
case '1':
|
|
||||||
return 1;
|
|
||||||
default:
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
parsedSearchParams.forEach(function (value, query) {
|
|
||||||
switch (query) {
|
|
||||||
case 'vk_ts':
|
|
||||||
case 'vk_is_recommended':
|
|
||||||
case 'vk_profile_id':
|
|
||||||
case 'vk_has_profile_button':
|
|
||||||
case 'vk_testing_group_id':
|
|
||||||
case 'vk_user_id':
|
|
||||||
case 'vk_app_id':
|
|
||||||
case 'vk_group_id':
|
|
||||||
launchParams[query] = Number(value);
|
|
||||||
break;
|
|
||||||
case 'sign':
|
|
||||||
case 'vk_chat_id':
|
|
||||||
case 'vk_ref':
|
|
||||||
case 'vk_access_token_settings':
|
|
||||||
launchParams[query] = value;
|
|
||||||
break;
|
|
||||||
case 'odr_enabled':
|
|
||||||
launchParams['odr_enabled'] = value === '1' ? 1 : undefined;
|
|
||||||
break;
|
|
||||||
case 'vk_is_app_user':
|
|
||||||
case 'vk_are_notifications_enabled':
|
|
||||||
case 'vk_is_favorite': {
|
|
||||||
launchParams[query] = convertToggleStateFromStringToNumber_1(value);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'vk_language': {
|
|
||||||
var validateVKLanguage = function (value) {
|
|
||||||
return Object.values(EGetLaunchParamsResponseLanguages).some(function (i) { return i === value; });
|
|
||||||
};
|
|
||||||
launchParams['vk_language'] = validateVKLanguage(value) ? value : undefined;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'vk_viewer_group_role': {
|
|
||||||
var validateVKViewerGroupRole = function (value) {
|
|
||||||
return Object.values(EGetLaunchParamsResponseGroupRole).some(function (i) { return i === value; });
|
|
||||||
};
|
|
||||||
launchParams['vk_viewer_group_role'] = validateVKViewerGroupRole(value)
|
|
||||||
? value
|
|
||||||
: undefined;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'vk_platform': {
|
|
||||||
var validateVKPlatform = function (value) {
|
|
||||||
return Object.values(EGetLaunchParamsResponsePlatforms).some(function (i) { return i === value; });
|
|
||||||
};
|
|
||||||
launchParams['vk_platform'] = validateVKPlatform(value) ? value : undefined;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
console.warn(e);
|
|
||||||
}
|
|
||||||
return launchParams;
|
|
||||||
};
|
|
||||||
|
|
||||||
// VK Bridge API
|
|
||||||
var bridge = createVKBridge(version);
|
|
||||||
|
|
||||||
export { BannerAdAlign, BannerAdHeightType, BannerAdLayoutType, BannerAdLocation, BannerAdOrientation, EAdsFormats, EGetLaunchParamsResponseGroupRole, EGetLaunchParamsResponseLanguages, EGetLaunchParamsResponsePlatforms, EGrantedPermission, applyMiddleware, bridge as default, parseURLSearchParamsForGetLaunchParams };
|
|
||||||
//# sourceMappingURL=index.es.js.map
|
|
||||||
1
node_modules/@vkontakte/vk-bridge/dist/index.es.js.map
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/index.es.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@vkontakte/vk-bridge/dist/index.js
generated
vendored
2
node_modules/@vkontakte/vk-bridge/dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@vkontakte/vk-bridge/dist/index.js.map
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@vkontakte/vk-bridge/dist/index.umd.js
generated
vendored
2
node_modules/@vkontakte/vk-bridge/dist/index.umd.js
generated
vendored
File diff suppressed because one or more lines are too long
1
node_modules/@vkontakte/vk-bridge/dist/index.umd.js.map
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/index.umd.js.map
generated
vendored
File diff suppressed because one or more lines are too long
11
node_modules/@vkontakte/vk-bridge/dist/types/src/applyMiddleware.d.ts
generated
vendored
11
node_modules/@vkontakte/vk-bridge/dist/types/src/applyMiddleware.d.ts
generated
vendored
@@ -1,11 +0,0 @@
|
|||||||
import { VKBridge } from './types/bridge';
|
|
||||||
import { Middleware } from './types/middleware';
|
|
||||||
/**
|
|
||||||
* Creates the VK Bridge enhancer that applies middleware to the `send`
|
|
||||||
* method. This is handy for a variety of task such as logging every sent
|
|
||||||
* event.
|
|
||||||
*
|
|
||||||
* @param middlewares The middleware chain to be applied.
|
|
||||||
* @returns The VK Bridge enhancer applying the middleware.
|
|
||||||
*/
|
|
||||||
export declare function applyMiddleware(...middlewares: Array<Middleware | undefined | null>): (bridge: VKBridge) => VKBridge;
|
|
||||||
25
node_modules/@vkontakte/vk-bridge/dist/types/src/bridge.d.ts
generated
vendored
25
node_modules/@vkontakte/vk-bridge/dist/types/src/bridge.d.ts
generated
vendored
@@ -1,25 +0,0 @@
|
|||||||
import { VKBridge } from './types/bridge';
|
|
||||||
/** Is the client side runtime environment */
|
|
||||||
export declare const IS_CLIENT_SIDE: boolean;
|
|
||||||
/** Is the runtime environment an Android app */
|
|
||||||
export declare const IS_ANDROID_WEBVIEW: boolean;
|
|
||||||
/** Is the runtime environment an iOS app */
|
|
||||||
export declare const IS_IOS_WEBVIEW: boolean;
|
|
||||||
export declare const IS_REACT_NATIVE_WEBVIEW: boolean;
|
|
||||||
/** Is the runtime environment a browser */
|
|
||||||
export declare const IS_WEB: boolean;
|
|
||||||
/** Is the runtime environment m.vk.ru */
|
|
||||||
export declare const IS_MVK: boolean;
|
|
||||||
/** Is the runtime environment vk.ru */
|
|
||||||
export declare const IS_DESKTOP_VK: boolean;
|
|
||||||
/** Type of subscribe event */
|
|
||||||
export declare const EVENT_TYPE: string;
|
|
||||||
/** Methods supported on the desktop */
|
|
||||||
export declare const DESKTOP_METHODS: string[];
|
|
||||||
/**
|
|
||||||
* Creates a VK Bridge API that holds functions for interact with runtime
|
|
||||||
* environment.
|
|
||||||
*
|
|
||||||
* @param version Version of the package
|
|
||||||
*/
|
|
||||||
export declare function createVKBridge(version: string): VKBridge;
|
|
||||||
1
node_modules/@vkontakte/vk-bridge/dist/types/src/browser.d.ts
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/types/src/browser.d.ts
generated
vendored
@@ -1 +0,0 @@
|
|||||||
export {};
|
|
||||||
8
node_modules/@vkontakte/vk-bridge/dist/types/src/index.d.ts
generated
vendored
8
node_modules/@vkontakte/vk-bridge/dist/types/src/index.d.ts
generated
vendored
@@ -1,8 +0,0 @@
|
|||||||
declare const bridge: import("./types/bridge").VKBridge;
|
|
||||||
export * from './types/data';
|
|
||||||
export * from './types/bridge';
|
|
||||||
export * from './types/middleware';
|
|
||||||
export * from './types/deprecated';
|
|
||||||
export { applyMiddleware } from './applyMiddleware';
|
|
||||||
export { parseURLSearchParamsForGetLaunchParams } from './parseURLSearchParamsForGetLaunchParams';
|
|
||||||
export { bridge as default };
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import type { GetLaunchParamsResponse } from './types/data';
|
|
||||||
export interface LaunchParams extends GetLaunchParamsResponse {
|
|
||||||
vk_chat_id: string;
|
|
||||||
vk_is_recommended: number;
|
|
||||||
vk_profile_id: number;
|
|
||||||
vk_has_profile_button: number;
|
|
||||||
vk_testing_group_id: number;
|
|
||||||
odr_enabled: undefined | 1;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @see https://dev.vk.ru/mini-apps/development/launch-params
|
|
||||||
*/
|
|
||||||
export declare const parseURLSearchParamsForGetLaunchParams: (searchParams: string) => Partial<LaunchParams>;
|
|
||||||
10
node_modules/@vkontakte/vk-bridge/dist/types/src/promisifySend.d.ts
generated
vendored
10
node_modules/@vkontakte/vk-bridge/dist/types/src/promisifySend.d.ts
generated
vendored
@@ -1,10 +0,0 @@
|
|||||||
import { VKBridgeSubscribeHandler, AnyRequestMethodName, RequestProps, RequestIdProp, ReceiveData, AnyReceiveMethodName } from './types/bridge';
|
|
||||||
/**
|
|
||||||
* Returns send function that returns promises.
|
|
||||||
*
|
|
||||||
* @param sendEvent Send event function.
|
|
||||||
* @param subscribe Subscribe event function.
|
|
||||||
* @param instanceId Uniq bridge instance ID.
|
|
||||||
* @returns Send function which returns the Promise object.
|
|
||||||
*/
|
|
||||||
export declare function promisifySend(sendEvent: <K extends AnyRequestMethodName>(method: K, props?: RequestProps<K> & RequestIdProp) => void, subscribe: (fn: VKBridgeSubscribeHandler) => void, instanceId: string): <K extends keyof import(".").RequestPropsMap>(method: K, props?: RequestProps<K> & RequestIdProp) => Promise<K extends keyof import(".").ReceiveDataMap ? ReceiveData<K> : void>;
|
|
||||||
207
node_modules/@vkontakte/vk-bridge/dist/types/src/types/bridge.d.ts
generated
vendored
207
node_modules/@vkontakte/vk-bridge/dist/types/src/types/bridge.d.ts
generated
vendored
@@ -1,207 +0,0 @@
|
|||||||
import { RequestPropsMap, ReceiveDataMap, ReceiveEventMap } from './data';
|
|
||||||
/**
|
|
||||||
* Name of a method that can be sent.
|
|
||||||
*/
|
|
||||||
export type AnyRequestMethodName = keyof RequestPropsMap;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be received.
|
|
||||||
*/
|
|
||||||
export type AnyReceiveMethodName = keyof ReceiveDataMap;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only sent.
|
|
||||||
*/
|
|
||||||
export type AnyRequestOnlyMethodName = Exclude<AnyRequestMethodName, AnyReceiveMethodName>;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only received.
|
|
||||||
*/
|
|
||||||
export type AnyReceiveOnlyMethodName = Exclude<AnyReceiveMethodName, AnyRequestMethodName>;
|
|
||||||
/**
|
|
||||||
* Name of a method which contains properties
|
|
||||||
*/
|
|
||||||
export type AnyRequestMethodNameWithProps = {
|
|
||||||
[K in keyof RequestPropsMap]: keyof RequestPropsMap[K] extends never ? never : K;
|
|
||||||
}[keyof RequestPropsMap];
|
|
||||||
/**
|
|
||||||
* Name of a method which doesn't contain properties
|
|
||||||
*/
|
|
||||||
export type AnyRequestMethodNameWithoutProps = Exclude<AnyRequestMethodName, AnyRequestMethodNameWithProps>;
|
|
||||||
/**
|
|
||||||
* Type of any method name.
|
|
||||||
*/
|
|
||||||
export type AnyMethodName = AnyRequestMethodName | AnyReceiveMethodName;
|
|
||||||
/**
|
|
||||||
* The name of the method that can be both sent and received.
|
|
||||||
*/
|
|
||||||
export type AnyIOMethodName = AnyRequestMethodName & AnyReceiveMethodName;
|
|
||||||
/**
|
|
||||||
* Any failed event method name.
|
|
||||||
*/
|
|
||||||
export type AnyFailedResponseEventName = FailedResponseEventName<AnyRequestMethodName>;
|
|
||||||
/**
|
|
||||||
* Any result response event method name.
|
|
||||||
*/
|
|
||||||
export type AnyResultResponseEventName = ResultResponseEventName<AnyRequestMethodName>;
|
|
||||||
/**
|
|
||||||
* Getter of failed event name of a method.
|
|
||||||
*/
|
|
||||||
export type FailedResponseEventName<M extends AnyRequestMethodName> = M extends keyof ReceiveEventMap ? ReceiveEventMap[M]['failed'] : never;
|
|
||||||
/**
|
|
||||||
* Getter of result event name of a method.
|
|
||||||
*/
|
|
||||||
export type ResultResponseEventName<M extends AnyRequestMethodName> = M extends keyof ReceiveEventMap ? ReceiveEventMap[M]['result'] : never;
|
|
||||||
/**
|
|
||||||
* Getter of request properties of a method.
|
|
||||||
*/
|
|
||||||
export type RequestProps<M extends AnyRequestMethodName = AnyRequestMethodName> = RequestPropsMap[M];
|
|
||||||
/**
|
|
||||||
* Getter of response data of a method.
|
|
||||||
*/
|
|
||||||
export type ReceiveData<M extends AnyReceiveMethodName> = ReceiveDataMap[M];
|
|
||||||
/**
|
|
||||||
* Property for matching sent request and received message.
|
|
||||||
*/
|
|
||||||
export type RequestIdProp = {
|
|
||||||
request_id?: number | string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Client error data.
|
|
||||||
*/
|
|
||||||
export type ErrorDataClientError = {
|
|
||||||
error_code: number;
|
|
||||||
error_reason: string;
|
|
||||||
error_description?: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* API error data.
|
|
||||||
*/
|
|
||||||
export type ErrorDataAPIError = {
|
|
||||||
error_code: number;
|
|
||||||
error_msg: string;
|
|
||||||
request_params: string[];
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Auth error data.
|
|
||||||
*/
|
|
||||||
export type ErrorDataAuthError = {
|
|
||||||
error_code: number;
|
|
||||||
error_reason: string;
|
|
||||||
error_description?: string[];
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Type of error data
|
|
||||||
*/
|
|
||||||
export type ErrorData = {
|
|
||||||
error_type: 'client_error';
|
|
||||||
error_data: ErrorDataClientError;
|
|
||||||
request_id?: number | string;
|
|
||||||
} | {
|
|
||||||
error_type: 'api_error';
|
|
||||||
error_data: ErrorDataAPIError;
|
|
||||||
request_id?: number | string;
|
|
||||||
} | {
|
|
||||||
error_type: 'auth_error';
|
|
||||||
error_data: ErrorDataAuthError;
|
|
||||||
request_id?: number | string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Generic event type for creating event types.
|
|
||||||
*/
|
|
||||||
export type VKBridgeEventBase<Type extends string, Data> = {
|
|
||||||
detail: {
|
|
||||||
type: Type;
|
|
||||||
data: Data;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Type of error event data
|
|
||||||
*/
|
|
||||||
export type VKBridgeErrorEvent<M extends AnyReceiveMethodName> = VKBridgeEventBase<M extends AnyRequestMethodName ? FailedResponseEventName<M> : never, ErrorData>;
|
|
||||||
/**
|
|
||||||
* Type of event that is a response to a request
|
|
||||||
*/
|
|
||||||
export type VKBridgeIOEvent<M extends AnyIOMethodName> = {
|
|
||||||
[K in M]: VKBridgeEventBase<ResultResponseEventName<K>, ReceiveData<K> & RequestIdProp>;
|
|
||||||
}[M];
|
|
||||||
/**
|
|
||||||
* Type of event that is not a response to a request
|
|
||||||
*/
|
|
||||||
export type VKBridgeReceiveOnlyEvent<M extends AnyReceiveOnlyMethodName> = {
|
|
||||||
[K in M]: VKBridgeEventBase<K, ReceiveData<K>>;
|
|
||||||
}[M];
|
|
||||||
/**
|
|
||||||
* Type of result event data
|
|
||||||
*/
|
|
||||||
export type VKBridgeResultEvent<M extends AnyReceiveMethodName> = M extends AnyReceiveOnlyMethodName ? VKBridgeReceiveOnlyEvent<M> : M extends AnyIOMethodName ? VKBridgeIOEvent<M> : never;
|
|
||||||
/**
|
|
||||||
* VK Bridge event.
|
|
||||||
*/
|
|
||||||
export type VKBridgeEvent<M extends AnyReceiveMethodName> = VKBridgeErrorEvent<M> | VKBridgeResultEvent<M>;
|
|
||||||
/**
|
|
||||||
* Type of function that will be subscribed to VK Bridge events.
|
|
||||||
*/
|
|
||||||
export type VKBridgeSubscribeHandler = (event: VKBridgeEvent<AnyReceiveMethodName>) => void;
|
|
||||||
/**
|
|
||||||
* Type of send function for methods that have props.
|
|
||||||
*
|
|
||||||
* @param method The method (event) name to send.
|
|
||||||
* @param props Method properties.
|
|
||||||
* @returns The Promise object with response data.
|
|
||||||
*/
|
|
||||||
export type VKBridgeSend = <K extends AnyRequestMethodName>(method: K, props?: RequestProps<K> & RequestIdProp) => Promise<K extends AnyReceiveMethodName ? ReceiveData<K> : void>;
|
|
||||||
/**
|
|
||||||
* VK Bridge interface.
|
|
||||||
*/
|
|
||||||
export interface VKBridge {
|
|
||||||
/**
|
|
||||||
* Sends an event to the runtime env and returns the Promise object with
|
|
||||||
* response data. In the case of Android/iOS application env is the
|
|
||||||
* application itself. In the case of the browser, the parent frame in which
|
|
||||||
* the event handlers is located.
|
|
||||||
*
|
|
||||||
* @param method The method (event) name to send.
|
|
||||||
* @param [props] Method properties.
|
|
||||||
* @returns The Promise object with response data.
|
|
||||||
*/
|
|
||||||
send: VKBridgeSend;
|
|
||||||
/**
|
|
||||||
* @alias send
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
sendPromise: VKBridgeSend;
|
|
||||||
/**
|
|
||||||
* Adds an event listener. It will be called any time a data is received.
|
|
||||||
*
|
|
||||||
* @param listener A callback to be invoked on every event receive.
|
|
||||||
*/
|
|
||||||
subscribe: (listener: VKBridgeSubscribeHandler) => void;
|
|
||||||
/**
|
|
||||||
* Removes an event listener which has been subscribed for event listening.
|
|
||||||
*
|
|
||||||
* @param listener A callback to unsubscribe.
|
|
||||||
*/
|
|
||||||
unsubscribe: (listener: VKBridgeSubscribeHandler) => void;
|
|
||||||
/**
|
|
||||||
* Checks if a method is supported on runtime platform.
|
|
||||||
*
|
|
||||||
* @param method Method (event) name to check.
|
|
||||||
* @returns Result of checking.
|
|
||||||
* @deprecated This method is deprecated. Use supportsAsync instead.
|
|
||||||
*/
|
|
||||||
supports: <K extends AnyRequestMethodName>(method: K) => boolean;
|
|
||||||
/**
|
|
||||||
* Checks if a method is supported on runtime platform.
|
|
||||||
*
|
|
||||||
* @param method Method (event) name to check.
|
|
||||||
* @returns The Promise object with result of checking.
|
|
||||||
*/
|
|
||||||
supportsAsync: <K extends AnyRequestMethodName>(method: K) => Promise<boolean>;
|
|
||||||
/**
|
|
||||||
* Checks whether the runtime is a WebView.
|
|
||||||
*
|
|
||||||
* @returns Result of checking.
|
|
||||||
*/
|
|
||||||
isWebView: () => boolean;
|
|
||||||
isIframe: () => boolean;
|
|
||||||
isEmbedded: () => boolean;
|
|
||||||
isStandalone: () => boolean;
|
|
||||||
}
|
|
||||||
1445
node_modules/@vkontakte/vk-bridge/dist/types/src/types/data.d.ts
generated
vendored
1445
node_modules/@vkontakte/vk-bridge/dist/types/src/types/data.d.ts
generated
vendored
File diff suppressed because one or more lines are too long
56
node_modules/@vkontakte/vk-bridge/dist/types/src/types/deprecated.d.ts
generated
vendored
56
node_modules/@vkontakte/vk-bridge/dist/types/src/types/deprecated.d.ts
generated
vendored
@@ -1,56 +0,0 @@
|
|||||||
import { AnyRequestMethodName, AnyReceiveMethodName, AnyRequestMethodNameWithProps, AnyRequestMethodNameWithoutProps, AnyMethodName, AnyIOMethodName, AnyRequestOnlyMethodName, AnyReceiveOnlyMethodName } from './bridge';
|
|
||||||
import { CommunityWidgetType } from './data';
|
|
||||||
/**
|
|
||||||
* Name of a method that can be sent.
|
|
||||||
* @alias AnyRequestMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type RequestMethodName = AnyRequestMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be received.
|
|
||||||
* @alias AnyReceiveMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type ReceiveMethodName = AnyReceiveMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only sent.
|
|
||||||
* @alias AnyRequestOnlyMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type RequestOnlyMethodName = AnyRequestOnlyMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only received.
|
|
||||||
* @alias AnyReceiveOnlyMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type ReceiveOnlyMethodName = AnyReceiveOnlyMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method which contains properties
|
|
||||||
* @alias AnyRequestMethodNameWithProps
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type RequestMethodNameWithProps = AnyRequestMethodNameWithProps;
|
|
||||||
/**
|
|
||||||
* Name of a method which doesn't contain properties
|
|
||||||
* @alias AnyRequestMethodNameWithoutProps
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type RequestMethodNameWithoutProps = AnyRequestMethodNameWithoutProps;
|
|
||||||
/**
|
|
||||||
* Type of any method name.
|
|
||||||
* @alias AnyMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type MethodName = AnyMethodName;
|
|
||||||
/**
|
|
||||||
* The name of the method that can be both sent and received.
|
|
||||||
* @alias AnyIOMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type IOMethodName = AnyIOMethodName;
|
|
||||||
/**
|
|
||||||
* Community widget type
|
|
||||||
* @alias CommunityWidgetType
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export type WidgetType = CommunityWidgetType;
|
|
||||||
13
node_modules/@vkontakte/vk-bridge/dist/types/src/types/middleware.d.ts
generated
vendored
13
node_modules/@vkontakte/vk-bridge/dist/types/src/types/middleware.d.ts
generated
vendored
@@ -1,13 +0,0 @@
|
|||||||
import { VKBridgeSend, VKBridgeSubscribeHandler } from './bridge';
|
|
||||||
/**
|
|
||||||
* API that can use middleware.
|
|
||||||
*/
|
|
||||||
export interface MiddlewareAPI<S extends VKBridgeSend = VKBridgeSend, L extends VKBridgeSubscribeHandler = VKBridgeSubscribeHandler> {
|
|
||||||
send: S;
|
|
||||||
subscribe(listener: L): void;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* A middleware is a higher-order function that composes a dispatch function
|
|
||||||
* to return a new `send` function.
|
|
||||||
*/
|
|
||||||
export type Middleware<S extends VKBridgeSend = VKBridgeSend> = (api: MiddlewareAPI<S>) => (next: S) => S;
|
|
||||||
1
node_modules/@vkontakte/vk-bridge/dist/types/src/utils.d.ts
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/types/src/utils.d.ts
generated
vendored
@@ -1 +0,0 @@
|
|||||||
export declare function createInstanceId(): string;
|
|
||||||
11
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/applyMiddleware.d.ts
generated
vendored
11
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/applyMiddleware.d.ts
generated
vendored
@@ -1,11 +0,0 @@
|
|||||||
import { VKBridge } from './types/bridge';
|
|
||||||
import { Middleware } from './types/middleware';
|
|
||||||
/**
|
|
||||||
* Creates the VK Bridge enhancer that applies middleware to the `send`
|
|
||||||
* method. This is handy for a variety of task such as logging every sent
|
|
||||||
* event.
|
|
||||||
*
|
|
||||||
* @param middlewares The middleware chain to be applied.
|
|
||||||
* @returns The VK Bridge enhancer applying the middleware.
|
|
||||||
*/
|
|
||||||
export declare function applyMiddleware(...middlewares: Array<Middleware | undefined | null>): (bridge: VKBridge) => VKBridge;
|
|
||||||
25
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/bridge.d.ts
generated
vendored
25
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/bridge.d.ts
generated
vendored
@@ -1,25 +0,0 @@
|
|||||||
import { VKBridge } from './types/bridge';
|
|
||||||
/** Is the client side runtime environment */
|
|
||||||
export declare const IS_CLIENT_SIDE: boolean;
|
|
||||||
/** Is the runtime environment an Android app */
|
|
||||||
export declare const IS_ANDROID_WEBVIEW: boolean;
|
|
||||||
/** Is the runtime environment an iOS app */
|
|
||||||
export declare const IS_IOS_WEBVIEW: boolean;
|
|
||||||
export declare const IS_REACT_NATIVE_WEBVIEW: boolean;
|
|
||||||
/** Is the runtime environment a browser */
|
|
||||||
export declare const IS_WEB: boolean;
|
|
||||||
/** Is the runtime environment m.vk.ru */
|
|
||||||
export declare const IS_MVK: boolean;
|
|
||||||
/** Is the runtime environment vk.ru */
|
|
||||||
export declare const IS_DESKTOP_VK: boolean;
|
|
||||||
/** Type of subscribe event */
|
|
||||||
export declare const EVENT_TYPE: string;
|
|
||||||
/** Methods supported on the desktop */
|
|
||||||
export declare const DESKTOP_METHODS: string[];
|
|
||||||
/**
|
|
||||||
* Creates a VK Bridge API that holds functions for interact with runtime
|
|
||||||
* environment.
|
|
||||||
*
|
|
||||||
* @param version Version of the package
|
|
||||||
*/
|
|
||||||
export declare function createVKBridge(version: string): VKBridge;
|
|
||||||
1
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/browser.d.ts
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/browser.d.ts
generated
vendored
@@ -1 +0,0 @@
|
|||||||
export {};
|
|
||||||
8
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/index.d.ts
generated
vendored
8
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/index.d.ts
generated
vendored
@@ -1,8 +0,0 @@
|
|||||||
declare const bridge: import("./types/bridge").VKBridge;
|
|
||||||
export * from './types/data';
|
|
||||||
export * from './types/bridge';
|
|
||||||
export * from './types/middleware';
|
|
||||||
export * from './types/deprecated';
|
|
||||||
export { applyMiddleware } from './applyMiddleware';
|
|
||||||
export { parseURLSearchParamsForGetLaunchParams } from './parseURLSearchParamsForGetLaunchParams';
|
|
||||||
export { bridge as default };
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import type { GetLaunchParamsResponse } from './types/data';
|
|
||||||
export interface LaunchParams extends GetLaunchParamsResponse {
|
|
||||||
vk_chat_id: string;
|
|
||||||
vk_is_recommended: number;
|
|
||||||
vk_profile_id: number;
|
|
||||||
vk_has_profile_button: number;
|
|
||||||
vk_testing_group_id: number;
|
|
||||||
odr_enabled: undefined | 1;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @see https://dev.vk.ru/mini-apps/development/launch-params
|
|
||||||
*/
|
|
||||||
export declare const parseURLSearchParamsForGetLaunchParams: (searchParams: string) => Partial<LaunchParams>;
|
|
||||||
10
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/promisifySend.d.ts
generated
vendored
10
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/promisifySend.d.ts
generated
vendored
File diff suppressed because one or more lines are too long
207
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/bridge.d.ts
generated
vendored
207
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/bridge.d.ts
generated
vendored
@@ -1,207 +0,0 @@
|
|||||||
import { RequestPropsMap, ReceiveDataMap, ReceiveEventMap } from './data';
|
|
||||||
/**
|
|
||||||
* Name of a method that can be sent.
|
|
||||||
*/
|
|
||||||
export declare type AnyRequestMethodName = keyof RequestPropsMap;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be received.
|
|
||||||
*/
|
|
||||||
export declare type AnyReceiveMethodName = keyof ReceiveDataMap;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only sent.
|
|
||||||
*/
|
|
||||||
export declare type AnyRequestOnlyMethodName = Exclude<AnyRequestMethodName, AnyReceiveMethodName>;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only received.
|
|
||||||
*/
|
|
||||||
export declare type AnyReceiveOnlyMethodName = Exclude<AnyReceiveMethodName, AnyRequestMethodName>;
|
|
||||||
/**
|
|
||||||
* Name of a method which contains properties
|
|
||||||
*/
|
|
||||||
export declare type AnyRequestMethodNameWithProps = {
|
|
||||||
[K in keyof RequestPropsMap]: keyof RequestPropsMap[K] extends never ? never : K;
|
|
||||||
}[keyof RequestPropsMap];
|
|
||||||
/**
|
|
||||||
* Name of a method which doesn't contain properties
|
|
||||||
*/
|
|
||||||
export declare type AnyRequestMethodNameWithoutProps = Exclude<AnyRequestMethodName, AnyRequestMethodNameWithProps>;
|
|
||||||
/**
|
|
||||||
* Type of any method name.
|
|
||||||
*/
|
|
||||||
export declare type AnyMethodName = AnyRequestMethodName | AnyReceiveMethodName;
|
|
||||||
/**
|
|
||||||
* The name of the method that can be both sent and received.
|
|
||||||
*/
|
|
||||||
export declare type AnyIOMethodName = AnyRequestMethodName & AnyReceiveMethodName;
|
|
||||||
/**
|
|
||||||
* Any failed event method name.
|
|
||||||
*/
|
|
||||||
export declare type AnyFailedResponseEventName = FailedResponseEventName<AnyRequestMethodName>;
|
|
||||||
/**
|
|
||||||
* Any result response event method name.
|
|
||||||
*/
|
|
||||||
export declare type AnyResultResponseEventName = ResultResponseEventName<AnyRequestMethodName>;
|
|
||||||
/**
|
|
||||||
* Getter of failed event name of a method.
|
|
||||||
*/
|
|
||||||
export declare type FailedResponseEventName<M extends AnyRequestMethodName> = M extends keyof ReceiveEventMap ? ReceiveEventMap[M]['failed'] : never;
|
|
||||||
/**
|
|
||||||
* Getter of result event name of a method.
|
|
||||||
*/
|
|
||||||
export declare type ResultResponseEventName<M extends AnyRequestMethodName> = M extends keyof ReceiveEventMap ? ReceiveEventMap[M]['result'] : never;
|
|
||||||
/**
|
|
||||||
* Getter of request properties of a method.
|
|
||||||
*/
|
|
||||||
export declare type RequestProps<M extends AnyRequestMethodName = AnyRequestMethodName> = RequestPropsMap[M];
|
|
||||||
/**
|
|
||||||
* Getter of response data of a method.
|
|
||||||
*/
|
|
||||||
export declare type ReceiveData<M extends AnyReceiveMethodName> = ReceiveDataMap[M];
|
|
||||||
/**
|
|
||||||
* Property for matching sent request and received message.
|
|
||||||
*/
|
|
||||||
export declare type RequestIdProp = {
|
|
||||||
request_id?: number | string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Client error data.
|
|
||||||
*/
|
|
||||||
export declare type ErrorDataClientError = {
|
|
||||||
error_code: number;
|
|
||||||
error_reason: string;
|
|
||||||
error_description?: string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* API error data.
|
|
||||||
*/
|
|
||||||
export declare type ErrorDataAPIError = {
|
|
||||||
error_code: number;
|
|
||||||
error_msg: string;
|
|
||||||
request_params: string[];
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Auth error data.
|
|
||||||
*/
|
|
||||||
export declare type ErrorDataAuthError = {
|
|
||||||
error_code: number;
|
|
||||||
error_reason: string;
|
|
||||||
error_description?: string[];
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Type of error data
|
|
||||||
*/
|
|
||||||
export declare type ErrorData = {
|
|
||||||
error_type: 'client_error';
|
|
||||||
error_data: ErrorDataClientError;
|
|
||||||
request_id?: number | string;
|
|
||||||
} | {
|
|
||||||
error_type: 'api_error';
|
|
||||||
error_data: ErrorDataAPIError;
|
|
||||||
request_id?: number | string;
|
|
||||||
} | {
|
|
||||||
error_type: 'auth_error';
|
|
||||||
error_data: ErrorDataAuthError;
|
|
||||||
request_id?: number | string;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Generic event type for creating event types.
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeEventBase<Type extends string, Data> = {
|
|
||||||
detail: {
|
|
||||||
type: Type;
|
|
||||||
data: Data;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Type of error event data
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeErrorEvent<M extends AnyReceiveMethodName> = VKBridgeEventBase<M extends AnyRequestMethodName ? FailedResponseEventName<M> : never, ErrorData>;
|
|
||||||
/**
|
|
||||||
* Type of event that is a response to a request
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeIOEvent<M extends AnyIOMethodName> = {
|
|
||||||
[K in M]: VKBridgeEventBase<ResultResponseEventName<K>, ReceiveData<K> & RequestIdProp>;
|
|
||||||
}[M];
|
|
||||||
/**
|
|
||||||
* Type of event that is not a response to a request
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeReceiveOnlyEvent<M extends AnyReceiveOnlyMethodName> = {
|
|
||||||
[K in M]: VKBridgeEventBase<K, ReceiveData<K>>;
|
|
||||||
}[M];
|
|
||||||
/**
|
|
||||||
* Type of result event data
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeResultEvent<M extends AnyReceiveMethodName> = M extends AnyReceiveOnlyMethodName ? VKBridgeReceiveOnlyEvent<M> : M extends AnyIOMethodName ? VKBridgeIOEvent<M> : never;
|
|
||||||
/**
|
|
||||||
* VK Bridge event.
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeEvent<M extends AnyReceiveMethodName> = VKBridgeErrorEvent<M> | VKBridgeResultEvent<M>;
|
|
||||||
/**
|
|
||||||
* Type of function that will be subscribed to VK Bridge events.
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeSubscribeHandler = (event: VKBridgeEvent<AnyReceiveMethodName>) => void;
|
|
||||||
/**
|
|
||||||
* Type of send function for methods that have props.
|
|
||||||
*
|
|
||||||
* @param method The method (event) name to send.
|
|
||||||
* @param props Method properties.
|
|
||||||
* @returns The Promise object with response data.
|
|
||||||
*/
|
|
||||||
export declare type VKBridgeSend = <K extends AnyRequestMethodName>(method: K, props?: RequestProps<K> & RequestIdProp) => Promise<K extends AnyReceiveMethodName ? ReceiveData<K> : void>;
|
|
||||||
/**
|
|
||||||
* VK Bridge interface.
|
|
||||||
*/
|
|
||||||
export interface VKBridge {
|
|
||||||
/**
|
|
||||||
* Sends an event to the runtime env and returns the Promise object with
|
|
||||||
* response data. In the case of Android/iOS application env is the
|
|
||||||
* application itself. In the case of the browser, the parent frame in which
|
|
||||||
* the event handlers is located.
|
|
||||||
*
|
|
||||||
* @param method The method (event) name to send.
|
|
||||||
* @param [props] Method properties.
|
|
||||||
* @returns The Promise object with response data.
|
|
||||||
*/
|
|
||||||
send: VKBridgeSend;
|
|
||||||
/**
|
|
||||||
* @alias send
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
sendPromise: VKBridgeSend;
|
|
||||||
/**
|
|
||||||
* Adds an event listener. It will be called any time a data is received.
|
|
||||||
*
|
|
||||||
* @param listener A callback to be invoked on every event receive.
|
|
||||||
*/
|
|
||||||
subscribe: (listener: VKBridgeSubscribeHandler) => void;
|
|
||||||
/**
|
|
||||||
* Removes an event listener which has been subscribed for event listening.
|
|
||||||
*
|
|
||||||
* @param listener A callback to unsubscribe.
|
|
||||||
*/
|
|
||||||
unsubscribe: (listener: VKBridgeSubscribeHandler) => void;
|
|
||||||
/**
|
|
||||||
* Checks if a method is supported on runtime platform.
|
|
||||||
*
|
|
||||||
* @param method Method (event) name to check.
|
|
||||||
* @returns Result of checking.
|
|
||||||
* @deprecated This method is deprecated. Use supportsAsync instead.
|
|
||||||
*/
|
|
||||||
supports: <K extends AnyRequestMethodName>(method: K) => boolean;
|
|
||||||
/**
|
|
||||||
* Checks if a method is supported on runtime platform.
|
|
||||||
*
|
|
||||||
* @param method Method (event) name to check.
|
|
||||||
* @returns The Promise object with result of checking.
|
|
||||||
*/
|
|
||||||
supportsAsync: <K extends AnyRequestMethodName>(method: K) => Promise<boolean>;
|
|
||||||
/**
|
|
||||||
* Checks whether the runtime is a WebView.
|
|
||||||
*
|
|
||||||
* @returns Result of checking.
|
|
||||||
*/
|
|
||||||
isWebView: () => boolean;
|
|
||||||
isIframe: () => boolean;
|
|
||||||
isEmbedded: () => boolean;
|
|
||||||
isStandalone: () => boolean;
|
|
||||||
}
|
|
||||||
1445
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/data.d.ts
generated
vendored
1445
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/data.d.ts
generated
vendored
File diff suppressed because one or more lines are too long
56
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/deprecated.d.ts
generated
vendored
56
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/deprecated.d.ts
generated
vendored
@@ -1,56 +0,0 @@
|
|||||||
import { AnyRequestMethodName, AnyReceiveMethodName, AnyRequestMethodNameWithProps, AnyRequestMethodNameWithoutProps, AnyMethodName, AnyIOMethodName, AnyRequestOnlyMethodName, AnyReceiveOnlyMethodName } from './bridge';
|
|
||||||
import { CommunityWidgetType } from './data';
|
|
||||||
/**
|
|
||||||
* Name of a method that can be sent.
|
|
||||||
* @alias AnyRequestMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type RequestMethodName = AnyRequestMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be received.
|
|
||||||
* @alias AnyReceiveMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type ReceiveMethodName = AnyReceiveMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only sent.
|
|
||||||
* @alias AnyRequestOnlyMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type RequestOnlyMethodName = AnyRequestOnlyMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method that can be only received.
|
|
||||||
* @alias AnyReceiveOnlyMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type ReceiveOnlyMethodName = AnyReceiveOnlyMethodName;
|
|
||||||
/**
|
|
||||||
* Name of a method which contains properties
|
|
||||||
* @alias AnyRequestMethodNameWithProps
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type RequestMethodNameWithProps = AnyRequestMethodNameWithProps;
|
|
||||||
/**
|
|
||||||
* Name of a method which doesn't contain properties
|
|
||||||
* @alias AnyRequestMethodNameWithoutProps
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type RequestMethodNameWithoutProps = AnyRequestMethodNameWithoutProps;
|
|
||||||
/**
|
|
||||||
* Type of any method name.
|
|
||||||
* @alias AnyMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type MethodName = AnyMethodName;
|
|
||||||
/**
|
|
||||||
* The name of the method that can be both sent and received.
|
|
||||||
* @alias AnyIOMethodName
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type IOMethodName = AnyIOMethodName;
|
|
||||||
/**
|
|
||||||
* Community widget type
|
|
||||||
* @alias CommunityWidgetType
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export declare type WidgetType = CommunityWidgetType;
|
|
||||||
13
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/middleware.d.ts
generated
vendored
13
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/types/middleware.d.ts
generated
vendored
@@ -1,13 +0,0 @@
|
|||||||
import { VKBridgeSend, VKBridgeSubscribeHandler } from './bridge';
|
|
||||||
/**
|
|
||||||
* API that can use middleware.
|
|
||||||
*/
|
|
||||||
export interface MiddlewareAPI<S extends VKBridgeSend = VKBridgeSend, L extends VKBridgeSubscribeHandler = VKBridgeSubscribeHandler> {
|
|
||||||
send: S;
|
|
||||||
subscribe(listener: L): void;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* A middleware is a higher-order function that composes a dispatch function
|
|
||||||
* to return a new `send` function.
|
|
||||||
*/
|
|
||||||
export declare type Middleware<S extends VKBridgeSend = VKBridgeSend> = (api: MiddlewareAPI<S>) => (next: S) => S;
|
|
||||||
1
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/utils.d.ts
generated
vendored
1
node_modules/@vkontakte/vk-bridge/dist/types3.8.3/src/utils.d.ts
generated
vendored
@@ -1 +0,0 @@
|
|||||||
export declare function createInstanceId(): string;
|
|
||||||
37
node_modules/@vkontakte/vk-bridge/package.json
generated
vendored
37
node_modules/@vkontakte/vk-bridge/package.json
generated
vendored
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@vkontakte/vk-bridge",
|
|
||||||
"version": "2.15.11",
|
|
||||||
"description": "Connects a Mini App with VK client",
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"browser": "dist/index.umd.js",
|
|
||||||
"module": "dist/index.es.js",
|
|
||||||
"umdName": "vkBridge",
|
|
||||||
"types": "dist/types/src/index.d.ts",
|
|
||||||
"typesVersions": {
|
|
||||||
"<4.0": {
|
|
||||||
"*": [
|
|
||||||
"dist/types3.8.3/src/index.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"dist"
|
|
||||||
],
|
|
||||||
"scripts": {
|
|
||||||
"watch": "yarn run --top-level rollup -c -w",
|
|
||||||
"build": "NODE_ENV=production yarn run --top-level rollup -c && yarn run build:legacy-types",
|
|
||||||
"build:legacy-types": "yarn run --top-level rollup -c rollup.config-legacy-types.mjs >/dev/null",
|
|
||||||
"prepack": "yarn run build",
|
|
||||||
"test": "yarn run --top-level jest --config ../../jest.config.js"
|
|
||||||
},
|
|
||||||
"author": {
|
|
||||||
"name": "VK",
|
|
||||||
"url": "https://vk.ru"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/VKCOM/vk-bridge",
|
|
||||||
"directory": "packages/core"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
21
node_modules/react/LICENSE
generated
vendored
21
node_modules/react/LICENSE
generated
vendored
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
37
node_modules/react/README.md
generated
vendored
37
node_modules/react/README.md
generated
vendored
@@ -1,37 +0,0 @@
|
|||||||
# `react`
|
|
||||||
|
|
||||||
React is a JavaScript library for creating user interfaces.
|
|
||||||
|
|
||||||
The `react` package contains only the functionality necessary to define React components. It is typically used together with a React renderer like `react-dom` for the web, or `react-native` for the native environments.
|
|
||||||
|
|
||||||
**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
```js
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { createRoot } from 'react-dom/client';
|
|
||||||
|
|
||||||
function Counter() {
|
|
||||||
const [count, setCount] = useState(0);
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<h1>{count}</h1>
|
|
||||||
<button onClick={() => setCount(count + 1)}>
|
|
||||||
Increment
|
|
||||||
</button>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const root = createRoot(document.getElementById('root'));
|
|
||||||
root.render(<App />);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
See https://reactjs.org/
|
|
||||||
|
|
||||||
## API
|
|
||||||
|
|
||||||
See https://reactjs.org/docs/react-api.html
|
|
||||||
1315
node_modules/react/cjs/react-jsx-dev-runtime.development.js
generated
vendored
1315
node_modules/react/cjs/react-jsx-dev-runtime.development.js
generated
vendored
File diff suppressed because it is too large
Load Diff
10
node_modules/react/cjs/react-jsx-dev-runtime.production.min.js
generated
vendored
10
node_modules/react/cjs/react-jsx-dev-runtime.production.min.js
generated
vendored
@@ -1,10 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react-jsx-dev-runtime.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
|
|
||||||
10
node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js
generated
vendored
10
node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js
generated
vendored
@@ -1,10 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react-jsx-dev-runtime.profiling.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
|
|
||||||
1333
node_modules/react/cjs/react-jsx-runtime.development.js
generated
vendored
1333
node_modules/react/cjs/react-jsx-runtime.development.js
generated
vendored
File diff suppressed because it is too large
Load Diff
11
node_modules/react/cjs/react-jsx-runtime.production.min.js
generated
vendored
11
node_modules/react/cjs/react-jsx-runtime.production.min.js
generated
vendored
@@ -1,11 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react-jsx-runtime.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
||||||
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
|
|
||||||
11
node_modules/react/cjs/react-jsx-runtime.profiling.min.js
generated
vendored
11
node_modules/react/cjs/react-jsx-runtime.profiling.min.js
generated
vendored
@@ -1,11 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react-jsx-runtime.profiling.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
||||||
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
|
|
||||||
2740
node_modules/react/cjs/react.development.js
generated
vendored
2740
node_modules/react/cjs/react.development.js
generated
vendored
File diff suppressed because it is too large
Load Diff
26
node_modules/react/cjs/react.production.min.js
generated
vendored
26
node_modules/react/cjs/react.production.min.js
generated
vendored
@@ -1,26 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
'use strict';var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null}
|
|
||||||
var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};
|
|
||||||
E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;
|
|
||||||
H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};
|
|
||||||
function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}
|
|
||||||
function N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
|
|
||||||
function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k=
|
|
||||||
a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}
|
|
||||||
function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}
|
|
||||||
var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};function X(){throw Error("act(...) is not supported in production builds of React.");}
|
|
||||||
exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=p;exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;
|
|
||||||
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;exports.act=X;
|
|
||||||
exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);
|
|
||||||
for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};
|
|
||||||
exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=X;exports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};
|
|
||||||
exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};exports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};
|
|
||||||
exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};exports.useTransition=function(){return U.current.useTransition()};exports.version="18.3.1";
|
|
||||||
20
node_modules/react/cjs/react.shared-subset.development.js
generated
vendored
20
node_modules/react/cjs/react.shared-subset.development.js
generated
vendored
@@ -1,20 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react.shared-subset.development.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== "production") {
|
|
||||||
(function() {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
// eslint-disable-next-line react-internal/prod-error-codes
|
|
||||||
throw new Error('This entry point is not yet supported outside of experimental channels');
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
10
node_modules/react/cjs/react.shared-subset.production.min.js
generated
vendored
10
node_modules/react/cjs/react.shared-subset.production.min.js
generated
vendored
@@ -1,10 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react.shared-subset.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
'use strict';throw Error("This entry point is not yet supported outside of experimental channels");
|
|
||||||
7
node_modules/react/index.js
generated
vendored
7
node_modules/react/index.js
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
module.exports = require('./cjs/react.production.min.js');
|
|
||||||
} else {
|
|
||||||
module.exports = require('./cjs/react.development.js');
|
|
||||||
}
|
|
||||||
7
node_modules/react/jsx-dev-runtime.js
generated
vendored
7
node_modules/react/jsx-dev-runtime.js
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');
|
|
||||||
} else {
|
|
||||||
module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
|
|
||||||
}
|
|
||||||
7
node_modules/react/jsx-runtime.js
generated
vendored
7
node_modules/react/jsx-runtime.js
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
module.exports = require('./cjs/react-jsx-runtime.production.min.js');
|
|
||||||
} else {
|
|
||||||
module.exports = require('./cjs/react-jsx-runtime.development.js');
|
|
||||||
}
|
|
||||||
17
node_modules/react/node_modules/.bin/loose-envify
generated
vendored
17
node_modules/react/node_modules/.bin/loose-envify
generated
vendored
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
||||||
|
|
||||||
case `uname` in
|
|
||||||
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -z "$NODE_PATH" ]; then
|
|
||||||
export NODE_PATH="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/loose-envify@1.4.0/node_modules/loose-envify/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/loose-envify@1.4.0/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules"
|
|
||||||
else
|
|
||||||
export NODE_PATH="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/loose-envify@1.4.0/node_modules/loose-envify/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/loose-envify@1.4.0/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
||||||
fi
|
|
||||||
if [ -x "$basedir/node" ]; then
|
|
||||||
exec "$basedir/node" "$basedir/../../../../../loose-envify@1.4.0/node_modules/loose-envify/cli.js" "$@"
|
|
||||||
else
|
|
||||||
exec node "$basedir/../../../../../loose-envify@1.4.0/node_modules/loose-envify/cli.js" "$@"
|
|
||||||
fi
|
|
||||||
12
node_modules/react/node_modules/.bin/loose-envify.CMD
generated
vendored
12
node_modules/react/node_modules/.bin/loose-envify.CMD
generated
vendored
@@ -1,12 +0,0 @@
|
|||||||
@SETLOCAL
|
|
||||||
@IF NOT DEFINED NODE_PATH (
|
|
||||||
@SET "NODE_PATH=C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\loose-envify@1.4.0\node_modules\loose-envify\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\loose-envify@1.4.0\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules"
|
|
||||||
) ELSE (
|
|
||||||
@SET "NODE_PATH=C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\loose-envify@1.4.0\node_modules\loose-envify\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\loose-envify@1.4.0\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules;%NODE_PATH%"
|
|
||||||
)
|
|
||||||
@IF EXIST "%~dp0\node.exe" (
|
|
||||||
"%~dp0\node.exe" "%~dp0\..\..\..\..\..\loose-envify@1.4.0\node_modules\loose-envify\cli.js" %*
|
|
||||||
) ELSE (
|
|
||||||
@SET PATHEXT=%PATHEXT:;.JS;=;%
|
|
||||||
node "%~dp0\..\..\..\..\..\loose-envify@1.4.0\node_modules\loose-envify\cli.js" %*
|
|
||||||
)
|
|
||||||
41
node_modules/react/node_modules/.bin/loose-envify.ps1
generated
vendored
41
node_modules/react/node_modules/.bin/loose-envify.ps1
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env pwsh
|
|
||||||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
||||||
|
|
||||||
$exe=""
|
|
||||||
$pathsep=":"
|
|
||||||
$env_node_path=$env:NODE_PATH
|
|
||||||
$new_node_path="C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\loose-envify@1.4.0\node_modules\loose-envify\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\loose-envify@1.4.0\node_modules;C:\Users\Localhost\WebstormProjects\unified-ui\node_modules\.pnpm\node_modules"
|
|
||||||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|
||||||
# Fix case when both the Windows and Linux builds of Node
|
|
||||||
# are installed in the same directory
|
|
||||||
$exe=".exe"
|
|
||||||
$pathsep=";"
|
|
||||||
} else {
|
|
||||||
$new_node_path="/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/loose-envify@1.4.0/node_modules/loose-envify/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/loose-envify@1.4.0/node_modules:/mnt/c/Users/Localhost/WebstormProjects/unified-ui/node_modules/.pnpm/node_modules"
|
|
||||||
}
|
|
||||||
if ([string]::IsNullOrEmpty($env_node_path)) {
|
|
||||||
$env:NODE_PATH=$new_node_path
|
|
||||||
} else {
|
|
||||||
$env:NODE_PATH="$new_node_path$pathsep$env_node_path"
|
|
||||||
}
|
|
||||||
|
|
||||||
$ret=0
|
|
||||||
if (Test-Path "$basedir/node$exe") {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "$basedir/node$exe" "$basedir/../../../../../loose-envify@1.4.0/node_modules/loose-envify/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "$basedir/node$exe" "$basedir/../../../../../loose-envify@1.4.0/node_modules/loose-envify/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
} else {
|
|
||||||
# Support pipeline input
|
|
||||||
if ($MyInvocation.ExpectingInput) {
|
|
||||||
$input | & "node$exe" "$basedir/../../../../../loose-envify@1.4.0/node_modules/loose-envify/cli.js" $args
|
|
||||||
} else {
|
|
||||||
& "node$exe" "$basedir/../../../../../loose-envify@1.4.0/node_modules/loose-envify/cli.js" $args
|
|
||||||
}
|
|
||||||
$ret=$LASTEXITCODE
|
|
||||||
}
|
|
||||||
$env:NODE_PATH=$env_node_path
|
|
||||||
exit $ret
|
|
||||||
47
node_modules/react/package.json
generated
vendored
47
node_modules/react/package.json
generated
vendored
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "react",
|
|
||||||
"description": "React is a JavaScript library for building user interfaces.",
|
|
||||||
"keywords": [
|
|
||||||
"react"
|
|
||||||
],
|
|
||||||
"version": "18.3.1",
|
|
||||||
"homepage": "https://reactjs.org/",
|
|
||||||
"bugs": "https://github.com/facebook/react/issues",
|
|
||||||
"license": "MIT",
|
|
||||||
"files": [
|
|
||||||
"LICENSE",
|
|
||||||
"README.md",
|
|
||||||
"index.js",
|
|
||||||
"cjs/",
|
|
||||||
"umd/",
|
|
||||||
"jsx-runtime.js",
|
|
||||||
"jsx-dev-runtime.js",
|
|
||||||
"react.shared-subset.js"
|
|
||||||
],
|
|
||||||
"main": "index.js",
|
|
||||||
"exports": {
|
|
||||||
".": {
|
|
||||||
"react-server": "./react.shared-subset.js",
|
|
||||||
"default": "./index.js"
|
|
||||||
},
|
|
||||||
"./package.json": "./package.json",
|
|
||||||
"./jsx-runtime": "./jsx-runtime.js",
|
|
||||||
"./jsx-dev-runtime": "./jsx-dev-runtime.js"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/facebook/react.git",
|
|
||||||
"directory": "packages/react"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"loose-envify": "^1.1.0"
|
|
||||||
},
|
|
||||||
"browserify": {
|
|
||||||
"transform": [
|
|
||||||
"loose-envify"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
7
node_modules/react/react.shared-subset.js
generated
vendored
7
node_modules/react/react.shared-subset.js
generated
vendored
@@ -1,7 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
module.exports = require('./cjs/react.shared-subset.production.min.js');
|
|
||||||
} else {
|
|
||||||
module.exports = require('./cjs/react.shared-subset.development.js');
|
|
||||||
}
|
|
||||||
3343
node_modules/react/umd/react.development.js
generated
vendored
3343
node_modules/react/umd/react.development.js
generated
vendored
File diff suppressed because it is too large
Load Diff
31
node_modules/react/umd/react.production.min.js
generated
vendored
31
node_modules/react/umd/react.production.min.js
generated
vendored
@@ -1,31 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react.production.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=V&&a[V]||a["@@iterator"];return"function"===typeof a?a:null}function w(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Y(){}function K(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Z(a,b,
|
|
||||||
e){var m,d={},c=null,h=null;if(null!=b)for(m in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(c=""+b.key),b)aa.call(b,m)&&!ba.hasOwnProperty(m)&&(d[m]=b[m]);var l=arguments.length-2;if(1===l)d.children=e;else if(1<l){for(var f=Array(l),k=0;k<l;k++)f[k]=arguments[k+2];d.children=f}if(a&&a.defaultProps)for(m in l=a.defaultProps,l)void 0===d[m]&&(d[m]=l[m]);return{$$typeof:y,type:a,key:c,ref:h,props:d,_owner:L.current}}function oa(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}
|
|
||||||
function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===y}function pa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?pa(""+a.key):b.toString(36)}function B(a,b,e,m,d){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var h=!1;if(null===a)h=!0;else switch(c){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case y:case qa:h=!0}}if(h)return h=a,d=d(h),a=""===m?"."+
|
|
||||||
N(h,0):m,ca(d)?(e="",null!=a&&(e=a.replace(da,"$&/")+"/"),B(d,b,e,"",function(a){return a})):null!=d&&(M(d)&&(d=oa(d,e+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(da,"$&/")+"/")+a)),b.push(d)),1;h=0;m=""===m?".":m+":";if(ca(a))for(var l=0;l<a.length;l++){c=a[l];var f=m+N(c,l);h+=B(c,b,e,f,d)}else if(f=x(a),"function"===typeof f)for(a=f.call(a),l=0;!(c=a.next()).done;)c=c.value,f=m+N(c,l++),h+=B(c,b,e,f,d);else if("object"===c)throw b=String(a),Error("Objects are not valid as a React child (found: "+
|
|
||||||
("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}function C(a,b,e){if(null==a)return a;var c=[],d=0;B(a,c,"","",function(a){return b.call(e,a,d++)});return c}function ra(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=
|
|
||||||
0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function O(a,b){var e=a.length;a.push(b);a:for(;0<e;){var c=e-1>>>1,d=a[c];if(0<D(d,b))a[c]=b,a[e]=d,e=c;else break a}}function p(a){return 0===a.length?null:a[0]}function E(a){if(0===a.length)return null;var b=a[0],e=a.pop();if(e!==b){a[0]=e;a:for(var c=0,d=a.length,k=d>>>1;c<k;){var h=2*(c+1)-1,l=a[h],f=h+1,g=a[f];if(0>D(l,e))f<d&&0>D(g,l)?(a[c]=g,a[f]=e,c=f):(a[c]=l,a[h]=e,c=h);else if(f<d&&0>D(g,e))a[c]=g,a[f]=e,c=f;else break a}}return b}
|
|
||||||
function D(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function P(a){for(var b=p(r);null!==b;){if(null===b.callback)E(r);else if(b.startTime<=a)E(r),b.sortIndex=b.expirationTime,O(q,b);else break;b=p(r)}}function Q(a){z=!1;P(a);if(!u)if(null!==p(q))u=!0,R(S);else{var b=p(r);null!==b&&T(Q,b.startTime-a)}}function S(a,b){u=!1;z&&(z=!1,ea(A),A=-1);F=!0;var c=k;try{P(b);for(n=p(q);null!==n&&(!(n.expirationTime>b)||a&&!fa());){var m=n.callback;if("function"===typeof m){n.callback=null;
|
|
||||||
k=n.priorityLevel;var d=m(n.expirationTime<=b);b=v();"function"===typeof d?n.callback=d:n===p(q)&&E(q);P(b)}else E(q);n=p(q)}if(null!==n)var g=!0;else{var h=p(r);null!==h&&T(Q,h.startTime-b);g=!1}return g}finally{n=null,k=c,F=!1}}function fa(){return v()-ha<ia?!1:!0}function R(a){G=a;H||(H=!0,I())}function T(a,b){A=ja(function(){a(v())},b)}function ka(a){throw Error("act(...) is not supported in production builds of React.");}var y=Symbol.for("react.element"),qa=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),
|
|
||||||
ta=Symbol.for("react.strict_mode"),ua=Symbol.for("react.profiler"),va=Symbol.for("react.provider"),wa=Symbol.for("react.context"),xa=Symbol.for("react.forward_ref"),ya=Symbol.for("react.suspense"),za=Symbol.for("react.memo"),Aa=Symbol.for("react.lazy"),V=Symbol.iterator,X={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,m){},enqueueSetState:function(a,b,c,m){}},la=Object.assign,W={};w.prototype.isReactComponent={};w.prototype.setState=function(a,
|
|
||||||
b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};w.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Y.prototype=w.prototype;var t=K.prototype=new Y;t.constructor=K;la(t,w.prototype);t.isPureReactComponent=!0;var ca=Array.isArray,aa=Object.prototype.hasOwnProperty,L={current:null},
|
|
||||||
ba={key:!0,ref:!0,__self:!0,__source:!0},da=/\/+/g,g={current:null},J={transition:null};if("object"===typeof performance&&"function"===typeof performance.now){var Ba=performance;var v=function(){return Ba.now()}}else{var ma=Date,Ca=ma.now();v=function(){return ma.now()-Ca}}var q=[],r=[],Da=1,n=null,k=3,F=!1,u=!1,z=!1,ja="function"===typeof setTimeout?setTimeout:null,ea="function"===typeof clearTimeout?clearTimeout:null,na="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&
|
|
||||||
void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var H=!1,G=null,A=-1,ia=5,ha=-1,U=function(){if(null!==G){var a=v();ha=a;var b=!0;try{b=G(!0,a)}finally{b?I():(H=!1,G=null)}}else H=!1};if("function"===typeof na)var I=function(){na(U)};else if("undefined"!==typeof MessageChannel){t=new MessageChannel;var Ea=t.port2;t.port1.onmessage=U;I=function(){Ea.postMessage(null)}}else I=function(){ja(U,0)};t={ReactCurrentDispatcher:g,
|
|
||||||
ReactCurrentOwner:L,ReactCurrentBatchConfig:J,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=k;k=a;try{return b()}finally{k=c}},unstable_next:function(a){switch(k){case 1:case 2:case 3:var b=3;break;default:b=k}var c=k;k=b;try{return a()}finally{k=c}},unstable_scheduleCallback:function(a,
|
|
||||||
b,c){var e=v();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?e+c:e):c=e;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:Da++,callback:b,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>e?(a.sortIndex=c,O(r,a),null===p(q)&&a===p(r)&&(z?(ea(A),A=-1):z=!0,T(Q,c-e))):(a.sortIndex=d,O(q,a),u||F||(u=!0,R(S)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=
|
|
||||||
k;return function(){var c=k;k=b;try{return a.apply(this,arguments)}finally{k=c}}},unstable_getCurrentPriorityLevel:function(){return k},unstable_shouldYield:fa,unstable_requestPaint:function(){},unstable_continueExecution:function(){u||F||(u=!0,R(S))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},get unstable_now(){return v},unstable_forceFrameRate:function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):
|
|
||||||
ia=0<a?Math.floor(1E3/a):5},unstable_Profiling:null}};c.Children={map:C,forEach:function(a,b,c){C(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;C(a,function(){b++});return b},toArray:function(a){return C(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};c.Component=w;c.Fragment=sa;c.Profiler=ua;c.PureComponent=K;c.StrictMode=ta;c.Suspense=ya;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=
|
|
||||||
t;c.act=ka;c.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var e=la({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=L.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(f in b)aa.call(b,f)&&!ba.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==l?l[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){l=
|
|
||||||
Array(f);for(var g=0;g<f;g++)l[g]=arguments[g+2];e.children=l}return{$$typeof:y,type:a.type,key:d,ref:k,props:e,_owner:h}};c.createContext=function(a){a={$$typeof:wa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:va,_context:a};return a.Consumer=a};c.createElement=Z;c.createFactory=function(a){var b=Z.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.forwardRef=function(a){return{$$typeof:xa,
|
|
||||||
render:a}};c.isValidElement=M;c.lazy=function(a){return{$$typeof:Aa,_payload:{_status:-1,_result:a},_init:ra}};c.memo=function(a,b){return{$$typeof:za,type:a,compare:void 0===b?null:b}};c.startTransition=function(a,b){b=J.transition;J.transition={};try{a()}finally{J.transition=b}};c.unstable_act=ka;c.useCallback=function(a,b){return g.current.useCallback(a,b)};c.useContext=function(a){return g.current.useContext(a)};c.useDebugValue=function(a,b){};c.useDeferredValue=function(a){return g.current.useDeferredValue(a)};
|
|
||||||
c.useEffect=function(a,b){return g.current.useEffect(a,b)};c.useId=function(){return g.current.useId()};c.useImperativeHandle=function(a,b,c){return g.current.useImperativeHandle(a,b,c)};c.useInsertionEffect=function(a,b){return g.current.useInsertionEffect(a,b)};c.useLayoutEffect=function(a,b){return g.current.useLayoutEffect(a,b)};c.useMemo=function(a,b){return g.current.useMemo(a,b)};c.useReducer=function(a,b,c){return g.current.useReducer(a,b,c)};c.useRef=function(a){return g.current.useRef(a)};
|
|
||||||
c.useState=function(a){return g.current.useState(a)};c.useSyncExternalStore=function(a,b,c){return g.current.useSyncExternalStore(a,b,c)};c.useTransition=function(){return g.current.useTransition()};c.version="18.3.1"});
|
|
||||||
})();
|
|
||||||
31
node_modules/react/umd/react.profiling.min.js
generated
vendored
31
node_modules/react/umd/react.profiling.min.js
generated
vendored
@@ -1,31 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license React
|
|
||||||
* react.profiling.min.js
|
|
||||||
*
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=V&&a[V]||a["@@iterator"];return"function"===typeof a?a:null}function w(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Y(){}function K(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Z(a,b,
|
|
||||||
e){var m,d={},c=null,h=null;if(null!=b)for(m in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(c=""+b.key),b)aa.call(b,m)&&!ba.hasOwnProperty(m)&&(d[m]=b[m]);var l=arguments.length-2;if(1===l)d.children=e;else if(1<l){for(var f=Array(l),k=0;k<l;k++)f[k]=arguments[k+2];d.children=f}if(a&&a.defaultProps)for(m in l=a.defaultProps,l)void 0===d[m]&&(d[m]=l[m]);return{$$typeof:y,type:a,key:c,ref:h,props:d,_owner:L.current}}function oa(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}
|
|
||||||
function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===y}function pa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?pa(""+a.key):b.toString(36)}function B(a,b,e,m,d){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var h=!1;if(null===a)h=!0;else switch(c){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case y:case qa:h=!0}}if(h)return h=a,d=d(h),a=""===m?"."+
|
|
||||||
N(h,0):m,ca(d)?(e="",null!=a&&(e=a.replace(da,"$&/")+"/"),B(d,b,e,"",function(a){return a})):null!=d&&(M(d)&&(d=oa(d,e+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(da,"$&/")+"/")+a)),b.push(d)),1;h=0;m=""===m?".":m+":";if(ca(a))for(var l=0;l<a.length;l++){c=a[l];var f=m+N(c,l);h+=B(c,b,e,f,d)}else if(f=x(a),"function"===typeof f)for(a=f.call(a),l=0;!(c=a.next()).done;)c=c.value,f=m+N(c,l++),h+=B(c,b,e,f,d);else if("object"===c)throw b=String(a),Error("Objects are not valid as a React child (found: "+
|
|
||||||
("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}function C(a,b,e){if(null==a)return a;var c=[],d=0;B(a,c,"","",function(a){return b.call(e,a,d++)});return c}function ra(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=
|
|
||||||
0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function O(a,b){var e=a.length;a.push(b);a:for(;0<e;){var c=e-1>>>1,d=a[c];if(0<D(d,b))a[c]=b,a[e]=d,e=c;else break a}}function p(a){return 0===a.length?null:a[0]}function E(a){if(0===a.length)return null;var b=a[0],e=a.pop();if(e!==b){a[0]=e;a:for(var c=0,d=a.length,k=d>>>1;c<k;){var h=2*(c+1)-1,l=a[h],f=h+1,g=a[f];if(0>D(l,e))f<d&&0>D(g,l)?(a[c]=g,a[f]=e,c=f):(a[c]=l,a[h]=e,c=h);else if(f<d&&0>D(g,e))a[c]=g,a[f]=e,c=f;else break a}}return b}
|
|
||||||
function D(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function P(a){for(var b=p(r);null!==b;){if(null===b.callback)E(r);else if(b.startTime<=a)E(r),b.sortIndex=b.expirationTime,O(q,b);else break;b=p(r)}}function Q(a){z=!1;P(a);if(!u)if(null!==p(q))u=!0,R(S);else{var b=p(r);null!==b&&T(Q,b.startTime-a)}}function S(a,b){u=!1;z&&(z=!1,ea(A),A=-1);F=!0;var c=k;try{P(b);for(n=p(q);null!==n&&(!(n.expirationTime>b)||a&&!fa());){var m=n.callback;if("function"===typeof m){n.callback=null;
|
|
||||||
k=n.priorityLevel;var d=m(n.expirationTime<=b);b=v();"function"===typeof d?n.callback=d:n===p(q)&&E(q);P(b)}else E(q);n=p(q)}if(null!==n)var g=!0;else{var h=p(r);null!==h&&T(Q,h.startTime-b);g=!1}return g}finally{n=null,k=c,F=!1}}function fa(){return v()-ha<ia?!1:!0}function R(a){G=a;H||(H=!0,I())}function T(a,b){A=ja(function(){a(v())},b)}function ka(a){throw Error("act(...) is not supported in production builds of React.");}var y=Symbol.for("react.element"),qa=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),
|
|
||||||
ta=Symbol.for("react.strict_mode"),ua=Symbol.for("react.profiler"),va=Symbol.for("react.provider"),wa=Symbol.for("react.context"),xa=Symbol.for("react.forward_ref"),ya=Symbol.for("react.suspense"),za=Symbol.for("react.memo"),Aa=Symbol.for("react.lazy"),V=Symbol.iterator,X={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,m){},enqueueSetState:function(a,b,c,m){}},la=Object.assign,W={};w.prototype.isReactComponent={};w.prototype.setState=function(a,
|
|
||||||
b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};w.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Y.prototype=w.prototype;var t=K.prototype=new Y;t.constructor=K;la(t,w.prototype);t.isPureReactComponent=!0;var ca=Array.isArray,aa=Object.prototype.hasOwnProperty,L={current:null},
|
|
||||||
ba={key:!0,ref:!0,__self:!0,__source:!0},da=/\/+/g,g={current:null},J={transition:null};if("object"===typeof performance&&"function"===typeof performance.now){var Ba=performance;var v=function(){return Ba.now()}}else{var ma=Date,Ca=ma.now();v=function(){return ma.now()-Ca}}var q=[],r=[],Da=1,n=null,k=3,F=!1,u=!1,z=!1,ja="function"===typeof setTimeout?setTimeout:null,ea="function"===typeof clearTimeout?clearTimeout:null,na="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&
|
|
||||||
void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var H=!1,G=null,A=-1,ia=5,ha=-1,U=function(){if(null!==G){var a=v();ha=a;var b=!0;try{b=G(!0,a)}finally{b?I():(H=!1,G=null)}}else H=!1};if("function"===typeof na)var I=function(){na(U)};else if("undefined"!==typeof MessageChannel){t=new MessageChannel;var Ea=t.port2;t.port1.onmessage=U;I=function(){Ea.postMessage(null)}}else I=function(){ja(U,0)};t={ReactCurrentDispatcher:g,
|
|
||||||
ReactCurrentOwner:L,ReactCurrentBatchConfig:J,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=k;k=a;try{return b()}finally{k=c}},unstable_next:function(a){switch(k){case 1:case 2:case 3:var b=3;break;default:b=k}var c=k;k=b;try{return a()}finally{k=c}},unstable_scheduleCallback:function(a,
|
|
||||||
b,c){var e=v();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?e+c:e):c=e;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:Da++,callback:b,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>e?(a.sortIndex=c,O(r,a),null===p(q)&&a===p(r)&&(z?(ea(A),A=-1):z=!0,T(Q,c-e))):(a.sortIndex=d,O(q,a),u||F||(u=!0,R(S)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=
|
|
||||||
k;return function(){var c=k;k=b;try{return a.apply(this,arguments)}finally{k=c}}},unstable_getCurrentPriorityLevel:function(){return k},unstable_shouldYield:fa,unstable_requestPaint:function(){},unstable_continueExecution:function(){u||F||(u=!0,R(S))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},get unstable_now(){return v},unstable_forceFrameRate:function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):
|
|
||||||
ia=0<a?Math.floor(1E3/a):5},unstable_Profiling:null}};c.Children={map:C,forEach:function(a,b,c){C(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;C(a,function(){b++});return b},toArray:function(a){return C(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};c.Component=w;c.Fragment=sa;c.Profiler=ua;c.PureComponent=K;c.StrictMode=ta;c.Suspense=ya;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=
|
|
||||||
t;c.act=ka;c.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var e=la({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=L.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(f in b)aa.call(b,f)&&!ba.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==l?l[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){l=
|
|
||||||
Array(f);for(var g=0;g<f;g++)l[g]=arguments[g+2];e.children=l}return{$$typeof:y,type:a.type,key:d,ref:k,props:e,_owner:h}};c.createContext=function(a){a={$$typeof:wa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:va,_context:a};return a.Consumer=a};c.createElement=Z;c.createFactory=function(a){var b=Z.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.forwardRef=function(a){return{$$typeof:xa,
|
|
||||||
render:a}};c.isValidElement=M;c.lazy=function(a){return{$$typeof:Aa,_payload:{_status:-1,_result:a},_init:ra}};c.memo=function(a,b){return{$$typeof:za,type:a,compare:void 0===b?null:b}};c.startTransition=function(a,b){b=J.transition;J.transition={};try{a()}finally{J.transition=b}};c.unstable_act=ka;c.useCallback=function(a,b){return g.current.useCallback(a,b)};c.useContext=function(a){return g.current.useContext(a)};c.useDebugValue=function(a,b){};c.useDeferredValue=function(a){return g.current.useDeferredValue(a)};
|
|
||||||
c.useEffect=function(a,b){return g.current.useEffect(a,b)};c.useId=function(){return g.current.useId()};c.useImperativeHandle=function(a,b,c){return g.current.useImperativeHandle(a,b,c)};c.useInsertionEffect=function(a,b){return g.current.useInsertionEffect(a,b)};c.useLayoutEffect=function(a,b){return g.current.useLayoutEffect(a,b)};c.useMemo=function(a,b){return g.current.useMemo(a,b)};c.useReducer=function(a,b,c){return g.current.useReducer(a,b,c)};c.useRef=function(a){return g.current.useRef(a)};
|
|
||||||
c.useState=function(a){return g.current.useState(a)};c.useSyncExternalStore=function(a,b,c){return g.current.useSyncExternalStore(a,b,c)};c.useTransition=function(){return g.current.useTransition()};c.version="18.3.1"});
|
|
||||||
})();
|
|
||||||
55
node_modules/typescript/LICENSE.txt
generated
vendored
55
node_modules/typescript/LICENSE.txt
generated
vendored
@@ -1,55 +0,0 @@
|
|||||||
Apache License
|
|
||||||
|
|
||||||
Version 2.0, January 2004
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
||||||
|
|
||||||
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
||||||
|
|
||||||
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
||||||
|
|
||||||
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
50
node_modules/typescript/README.md
generated
vendored
50
node_modules/typescript/README.md
generated
vendored
@@ -1,50 +0,0 @@
|
|||||||
|
|
||||||
# TypeScript
|
|
||||||
|
|
||||||
[](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml)
|
|
||||||
[](https://www.npmjs.com/package/typescript)
|
|
||||||
[](https://www.npmjs.com/package/typescript)
|
|
||||||
[](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)
|
|
||||||
|
|
||||||
|
|
||||||
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
|
|
||||||
|
|
||||||
Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/).
|
|
||||||
|
|
||||||
## Installing
|
|
||||||
|
|
||||||
For the latest stable version:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install -D typescript
|
|
||||||
```
|
|
||||||
|
|
||||||
For our nightly builds:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm install -D typescript@next
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contribute
|
|
||||||
|
|
||||||
There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript.
|
|
||||||
* [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
|
||||||
* Review the [source code changes](https://github.com/microsoft/TypeScript/pulls).
|
|
||||||
* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
|
|
||||||
* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
|
|
||||||
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
|
|
||||||
* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md).
|
|
||||||
|
|
||||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
|
|
||||||
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
|
|
||||||
with any additional questions or comments.
|
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
* [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
|
|
||||||
* [Programming handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
|
|
||||||
* [Homepage](https://www.typescriptlang.org/)
|
|
||||||
|
|
||||||
## Roadmap
|
|
||||||
|
|
||||||
For details on our planned features and future direction, please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).
|
|
||||||
41
node_modules/typescript/SECURITY.md
generated
vendored
41
node_modules/typescript/SECURITY.md
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
|
|
||||||
|
|
||||||
## Security
|
|
||||||
|
|
||||||
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
|
|
||||||
|
|
||||||
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
|
|
||||||
|
|
||||||
## Reporting Security Issues
|
|
||||||
|
|
||||||
**Please do not report security vulnerabilities through public GitHub issues.**
|
|
||||||
|
|
||||||
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
|
|
||||||
|
|
||||||
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
|
|
||||||
|
|
||||||
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
|
|
||||||
|
|
||||||
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
|
|
||||||
|
|
||||||
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
|
||||||
* Full paths of source file(s) related to the manifestation of the issue
|
|
||||||
* The location of the affected source code (tag/branch/commit or direct URL)
|
|
||||||
* Any special configuration required to reproduce the issue
|
|
||||||
* Step-by-step instructions to reproduce the issue
|
|
||||||
* Proof-of-concept or exploit code (if possible)
|
|
||||||
* Impact of the issue, including how an attacker might exploit the issue
|
|
||||||
|
|
||||||
This information will help us triage your report more quickly.
|
|
||||||
|
|
||||||
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
|
|
||||||
|
|
||||||
## Preferred Languages
|
|
||||||
|
|
||||||
We prefer all communications to be in English.
|
|
||||||
|
|
||||||
## Policy
|
|
||||||
|
|
||||||
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
|
|
||||||
|
|
||||||
<!-- END MICROSOFT SECURITY.MD BLOCK -->
|
|
||||||
193
node_modules/typescript/ThirdPartyNoticeText.txt
generated
vendored
193
node_modules/typescript/ThirdPartyNoticeText.txt
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/typescript/bin/tsc
generated
vendored
2
node_modules/typescript/bin/tsc
generated
vendored
@@ -1,2 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
require('../lib/tsc.js')
|
|
||||||
2
node_modules/typescript/bin/tsserver
generated
vendored
2
node_modules/typescript/bin/tsserver
generated
vendored
@@ -1,2 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
require('../lib/tsserver.js')
|
|
||||||
133818
node_modules/typescript/lib/_tsc.js
generated
vendored
133818
node_modules/typescript/lib/_tsc.js
generated
vendored
File diff suppressed because one or more lines are too long
659
node_modules/typescript/lib/_tsserver.js
generated
vendored
659
node_modules/typescript/lib/_tsserver.js
generated
vendored
@@ -1,659 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
var __create = Object.create;
|
|
||||||
var __defProp = Object.defineProperty;
|
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
||||||
var __getProtoOf = Object.getPrototypeOf;
|
|
||||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
||||||
var __copyProps = (to, from, except, desc) => {
|
|
||||||
if (from && typeof from === "object" || typeof from === "function") {
|
|
||||||
for (let key of __getOwnPropNames(from))
|
|
||||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
||||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
};
|
|
||||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
||||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
||||||
// If the importer is in node compatibility mode or this is not an ESM
|
|
||||||
// file that has been converted to a CommonJS file using a Babel-
|
|
||||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
||||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
||||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
||||||
mod
|
|
||||||
));
|
|
||||||
|
|
||||||
// src/tsserver/server.ts
|
|
||||||
var import_os2 = __toESM(require("os"));
|
|
||||||
|
|
||||||
// src/typescript/typescript.ts
|
|
||||||
var typescript_exports = {};
|
|
||||||
__reExport(typescript_exports, require("./typescript.js"));
|
|
||||||
|
|
||||||
// src/tsserver/nodeServer.ts
|
|
||||||
var import_child_process = __toESM(require("child_process"));
|
|
||||||
var import_fs = __toESM(require("fs"));
|
|
||||||
var import_net = __toESM(require("net"));
|
|
||||||
var import_os = __toESM(require("os"));
|
|
||||||
var import_readline = __toESM(require("readline"));
|
|
||||||
|
|
||||||
// src/tsserver/common.ts
|
|
||||||
function getLogLevel(level) {
|
|
||||||
if (level) {
|
|
||||||
const l = level.toLowerCase();
|
|
||||||
for (const name in typescript_exports.server.LogLevel) {
|
|
||||||
if (isNaN(+name) && l === name.toLowerCase()) {
|
|
||||||
return typescript_exports.server.LogLevel[name];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return void 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/tsserver/nodeServer.ts
|
|
||||||
function parseLoggingEnvironmentString(logEnvStr) {
|
|
||||||
if (!logEnvStr) {
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
const logEnv = { logToFile: true };
|
|
||||||
const args = logEnvStr.split(" ");
|
|
||||||
const len = args.length - 1;
|
|
||||||
for (let i = 0; i < len; i += 2) {
|
|
||||||
const option = args[i];
|
|
||||||
const { value, extraPartCounter } = getEntireValue(i + 1);
|
|
||||||
i += extraPartCounter;
|
|
||||||
if (option && value) {
|
|
||||||
switch (option) {
|
|
||||||
case "-file":
|
|
||||||
logEnv.file = value;
|
|
||||||
break;
|
|
||||||
case "-level":
|
|
||||||
const level = getLogLevel(value);
|
|
||||||
logEnv.detailLevel = level !== void 0 ? level : typescript_exports.server.LogLevel.normal;
|
|
||||||
break;
|
|
||||||
case "-traceToConsole":
|
|
||||||
logEnv.traceToConsole = value.toLowerCase() === "true";
|
|
||||||
break;
|
|
||||||
case "-logToFile":
|
|
||||||
logEnv.logToFile = value.toLowerCase() === "true";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return logEnv;
|
|
||||||
function getEntireValue(initialIndex) {
|
|
||||||
let pathStart = args[initialIndex];
|
|
||||||
let extraPartCounter = 0;
|
|
||||||
if (pathStart.charCodeAt(0) === typescript_exports.CharacterCodes.doubleQuote && pathStart.charCodeAt(pathStart.length - 1) !== typescript_exports.CharacterCodes.doubleQuote) {
|
|
||||||
for (let i = initialIndex + 1; i < args.length; i++) {
|
|
||||||
pathStart += " ";
|
|
||||||
pathStart += args[i];
|
|
||||||
extraPartCounter++;
|
|
||||||
if (pathStart.charCodeAt(pathStart.length - 1) === typescript_exports.CharacterCodes.doubleQuote) break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { value: (0, typescript_exports.stripQuotes)(pathStart), extraPartCounter };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function parseServerMode() {
|
|
||||||
const mode = typescript_exports.server.findArgument("--serverMode");
|
|
||||||
if (!mode) return void 0;
|
|
||||||
switch (mode.toLowerCase()) {
|
|
||||||
case "semantic":
|
|
||||||
return typescript_exports.LanguageServiceMode.Semantic;
|
|
||||||
case "partialsemantic":
|
|
||||||
return typescript_exports.LanguageServiceMode.PartialSemantic;
|
|
||||||
case "syntactic":
|
|
||||||
return typescript_exports.LanguageServiceMode.Syntactic;
|
|
||||||
default:
|
|
||||||
return mode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function initializeNodeSystem() {
|
|
||||||
const sys4 = typescript_exports.Debug.checkDefined(typescript_exports.sys);
|
|
||||||
class Logger {
|
|
||||||
constructor(logFilename, traceToConsole, level) {
|
|
||||||
this.logFilename = logFilename;
|
|
||||||
this.traceToConsole = traceToConsole;
|
|
||||||
this.level = level;
|
|
||||||
this.seq = 0;
|
|
||||||
this.inGroup = false;
|
|
||||||
this.firstInGroup = true;
|
|
||||||
this.fd = -1;
|
|
||||||
if (this.logFilename) {
|
|
||||||
try {
|
|
||||||
this.fd = import_fs.default.openSync(this.logFilename, "w");
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
static padStringRight(str, padding) {
|
|
||||||
return (str + padding).slice(0, padding.length);
|
|
||||||
}
|
|
||||||
close() {
|
|
||||||
if (this.fd >= 0) {
|
|
||||||
import_fs.default.close(this.fd, typescript_exports.noop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getLogFileName() {
|
|
||||||
return this.logFilename;
|
|
||||||
}
|
|
||||||
perftrc(s) {
|
|
||||||
this.msg(s, typescript_exports.server.Msg.Perf);
|
|
||||||
}
|
|
||||||
info(s) {
|
|
||||||
this.msg(s, typescript_exports.server.Msg.Info);
|
|
||||||
}
|
|
||||||
err(s) {
|
|
||||||
this.msg(s, typescript_exports.server.Msg.Err);
|
|
||||||
}
|
|
||||||
startGroup() {
|
|
||||||
this.inGroup = true;
|
|
||||||
this.firstInGroup = true;
|
|
||||||
}
|
|
||||||
endGroup() {
|
|
||||||
this.inGroup = false;
|
|
||||||
}
|
|
||||||
loggingEnabled() {
|
|
||||||
return !!this.logFilename || this.traceToConsole;
|
|
||||||
}
|
|
||||||
hasLevel(level) {
|
|
||||||
return this.loggingEnabled() && this.level >= level;
|
|
||||||
}
|
|
||||||
msg(s, type = typescript_exports.server.Msg.Err) {
|
|
||||||
if (!this.canWrite()) return;
|
|
||||||
s = `[${typescript_exports.server.nowString()}] ${s}
|
|
||||||
`;
|
|
||||||
if (!this.inGroup || this.firstInGroup) {
|
|
||||||
const prefix = Logger.padStringRight(type + " " + this.seq.toString(), " ");
|
|
||||||
s = prefix + s;
|
|
||||||
}
|
|
||||||
this.write(s, type);
|
|
||||||
if (!this.inGroup) {
|
|
||||||
this.seq++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
canWrite() {
|
|
||||||
return this.fd >= 0 || this.traceToConsole;
|
|
||||||
}
|
|
||||||
write(s, _type) {
|
|
||||||
if (this.fd >= 0) {
|
|
||||||
const buf = Buffer.from(s);
|
|
||||||
import_fs.default.writeSync(
|
|
||||||
this.fd,
|
|
||||||
buf,
|
|
||||||
0,
|
|
||||||
buf.length,
|
|
||||||
/*position*/
|
|
||||||
null
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (this.traceToConsole) {
|
|
||||||
console.warn(s);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const libDirectory = (0, typescript_exports.getDirectoryPath)((0, typescript_exports.normalizePath)(sys4.getExecutingFilePath()));
|
|
||||||
const useWatchGuard = process.platform === "win32";
|
|
||||||
const originalWatchDirectory = sys4.watchDirectory.bind(sys4);
|
|
||||||
const logger = createLogger();
|
|
||||||
typescript_exports.Debug.loggingHost = {
|
|
||||||
log(level, s) {
|
|
||||||
switch (level) {
|
|
||||||
case typescript_exports.LogLevel.Error:
|
|
||||||
case typescript_exports.LogLevel.Warning:
|
|
||||||
return logger.msg(s, typescript_exports.server.Msg.Err);
|
|
||||||
case typescript_exports.LogLevel.Info:
|
|
||||||
case typescript_exports.LogLevel.Verbose:
|
|
||||||
return logger.msg(s, typescript_exports.server.Msg.Info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const pending = (0, typescript_exports.createQueue)();
|
|
||||||
let canWrite = true;
|
|
||||||
if (useWatchGuard) {
|
|
||||||
const currentDrive = extractWatchDirectoryCacheKey(
|
|
||||||
sys4.resolvePath(sys4.getCurrentDirectory()),
|
|
||||||
/*currentDriveKey*/
|
|
||||||
void 0
|
|
||||||
);
|
|
||||||
const statusCache = /* @__PURE__ */ new Map();
|
|
||||||
sys4.watchDirectory = (path, callback, recursive, options) => {
|
|
||||||
const cacheKey = extractWatchDirectoryCacheKey(path, currentDrive);
|
|
||||||
let status = cacheKey && statusCache.get(cacheKey);
|
|
||||||
if (status === void 0) {
|
|
||||||
if (logger.hasLevel(typescript_exports.server.LogLevel.verbose)) {
|
|
||||||
logger.info(`${cacheKey} for path ${path} not found in cache...`);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const args = [(0, typescript_exports.combinePaths)(libDirectory, "watchGuard.js"), path];
|
|
||||||
if (logger.hasLevel(typescript_exports.server.LogLevel.verbose)) {
|
|
||||||
logger.info(`Starting ${process.execPath} with args:${typescript_exports.server.stringifyIndented(args)}`);
|
|
||||||
}
|
|
||||||
import_child_process.default.execFileSync(process.execPath, args, { stdio: "ignore", env: { ELECTRON_RUN_AS_NODE: "1" } });
|
|
||||||
status = true;
|
|
||||||
if (logger.hasLevel(typescript_exports.server.LogLevel.verbose)) {
|
|
||||||
logger.info(`WatchGuard for path ${path} returned: OK`);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
status = false;
|
|
||||||
if (logger.hasLevel(typescript_exports.server.LogLevel.verbose)) {
|
|
||||||
logger.info(`WatchGuard for path ${path} returned: ${e.message}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (cacheKey) {
|
|
||||||
statusCache.set(cacheKey, status);
|
|
||||||
}
|
|
||||||
} else if (logger.hasLevel(typescript_exports.server.LogLevel.verbose)) {
|
|
||||||
logger.info(`watchDirectory for ${path} uses cached drive information.`);
|
|
||||||
}
|
|
||||||
if (status) {
|
|
||||||
return watchDirectorySwallowingException(path, callback, recursive, options);
|
|
||||||
} else {
|
|
||||||
return typescript_exports.noopFileWatcher;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
sys4.watchDirectory = watchDirectorySwallowingException;
|
|
||||||
}
|
|
||||||
sys4.write = (s) => writeMessage(Buffer.from(s, "utf8"));
|
|
||||||
sys4.setTimeout = setTimeout;
|
|
||||||
sys4.clearTimeout = clearTimeout;
|
|
||||||
sys4.setImmediate = setImmediate;
|
|
||||||
sys4.clearImmediate = clearImmediate;
|
|
||||||
if (typeof global !== "undefined" && global.gc) {
|
|
||||||
sys4.gc = () => {
|
|
||||||
var _a;
|
|
||||||
return (_a = global.gc) == null ? void 0 : _a.call(global);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const cancellationToken = createCancellationToken(sys4.args);
|
|
||||||
const localeStr = typescript_exports.server.findArgument("--locale");
|
|
||||||
if (localeStr) {
|
|
||||||
(0, typescript_exports.validateLocaleAndSetLanguage)(localeStr, sys4);
|
|
||||||
}
|
|
||||||
const modeOrUnknown = parseServerMode();
|
|
||||||
let serverMode;
|
|
||||||
let unknownServerMode;
|
|
||||||
if (modeOrUnknown !== void 0) {
|
|
||||||
if (typeof modeOrUnknown === "number") serverMode = modeOrUnknown;
|
|
||||||
else unknownServerMode = modeOrUnknown;
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
args: process.argv,
|
|
||||||
logger,
|
|
||||||
cancellationToken,
|
|
||||||
serverMode,
|
|
||||||
unknownServerMode,
|
|
||||||
startSession: startNodeSession
|
|
||||||
};
|
|
||||||
function createLogger() {
|
|
||||||
const cmdLineLogFileName = typescript_exports.server.findArgument("--logFile");
|
|
||||||
const cmdLineVerbosity = getLogLevel(typescript_exports.server.findArgument("--logVerbosity"));
|
|
||||||
const envLogOptions = parseLoggingEnvironmentString(process.env.TSS_LOG);
|
|
||||||
const unsubstitutedLogFileName = cmdLineLogFileName ? (0, typescript_exports.stripQuotes)(cmdLineLogFileName) : envLogOptions.logToFile ? envLogOptions.file || libDirectory + "/.log" + process.pid.toString() : void 0;
|
|
||||||
const substitutedLogFileName = unsubstitutedLogFileName ? unsubstitutedLogFileName.replace("PID", process.pid.toString()) : void 0;
|
|
||||||
const logVerbosity = cmdLineVerbosity || envLogOptions.detailLevel;
|
|
||||||
return new Logger(substitutedLogFileName, envLogOptions.traceToConsole, logVerbosity);
|
|
||||||
}
|
|
||||||
function writeMessage(buf) {
|
|
||||||
if (!canWrite) {
|
|
||||||
pending.enqueue(buf);
|
|
||||||
} else {
|
|
||||||
canWrite = false;
|
|
||||||
process.stdout.write(buf, setCanWriteFlagAndWriteMessageIfNecessary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function setCanWriteFlagAndWriteMessageIfNecessary() {
|
|
||||||
canWrite = true;
|
|
||||||
if (!pending.isEmpty()) {
|
|
||||||
writeMessage(pending.dequeue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function extractWatchDirectoryCacheKey(path, currentDriveKey) {
|
|
||||||
path = (0, typescript_exports.normalizeSlashes)(path);
|
|
||||||
if (isUNCPath(path)) {
|
|
||||||
const firstSlash = path.indexOf(typescript_exports.directorySeparator, 2);
|
|
||||||
return firstSlash !== -1 ? (0, typescript_exports.toFileNameLowerCase)(path.substring(0, firstSlash)) : path;
|
|
||||||
}
|
|
||||||
const rootLength = (0, typescript_exports.getRootLength)(path);
|
|
||||||
if (rootLength === 0) {
|
|
||||||
return currentDriveKey;
|
|
||||||
}
|
|
||||||
if (path.charCodeAt(1) === typescript_exports.CharacterCodes.colon && path.charCodeAt(2) === typescript_exports.CharacterCodes.slash) {
|
|
||||||
return (0, typescript_exports.toFileNameLowerCase)(path.charAt(0));
|
|
||||||
}
|
|
||||||
if (path.charCodeAt(0) === typescript_exports.CharacterCodes.slash && path.charCodeAt(1) !== typescript_exports.CharacterCodes.slash) {
|
|
||||||
return currentDriveKey;
|
|
||||||
}
|
|
||||||
return void 0;
|
|
||||||
}
|
|
||||||
function isUNCPath(s) {
|
|
||||||
return s.length > 2 && s.charCodeAt(0) === typescript_exports.CharacterCodes.slash && s.charCodeAt(1) === typescript_exports.CharacterCodes.slash;
|
|
||||||
}
|
|
||||||
function watchDirectorySwallowingException(path, callback, recursive, options) {
|
|
||||||
try {
|
|
||||||
return originalWatchDirectory(path, callback, recursive, options);
|
|
||||||
} catch (e) {
|
|
||||||
logger.info(`Exception when creating directory watcher: ${e.message}`);
|
|
||||||
return typescript_exports.noopFileWatcher;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function parseEventPort(eventPortStr) {
|
|
||||||
const eventPort = eventPortStr === void 0 ? void 0 : parseInt(eventPortStr);
|
|
||||||
return eventPort !== void 0 && !isNaN(eventPort) ? eventPort : void 0;
|
|
||||||
}
|
|
||||||
function startNodeSession(options, logger, cancellationToken) {
|
|
||||||
const rl = import_readline.default.createInterface({
|
|
||||||
input: process.stdin,
|
|
||||||
output: process.stdout,
|
|
||||||
terminal: false
|
|
||||||
});
|
|
||||||
const _NodeTypingsInstallerAdapter = class _NodeTypingsInstallerAdapter extends typescript_exports.server.TypingsInstallerAdapter {
|
|
||||||
constructor(telemetryEnabled2, logger2, host, globalTypingsCacheLocation, typingSafeListLocation2, typesMapLocation2, npmLocation2, validateDefaultNpmLocation2, event) {
|
|
||||||
super(
|
|
||||||
telemetryEnabled2,
|
|
||||||
logger2,
|
|
||||||
host,
|
|
||||||
globalTypingsCacheLocation,
|
|
||||||
event,
|
|
||||||
_NodeTypingsInstallerAdapter.maxActiveRequestCount
|
|
||||||
);
|
|
||||||
this.typingSafeListLocation = typingSafeListLocation2;
|
|
||||||
this.typesMapLocation = typesMapLocation2;
|
|
||||||
this.npmLocation = npmLocation2;
|
|
||||||
this.validateDefaultNpmLocation = validateDefaultNpmLocation2;
|
|
||||||
}
|
|
||||||
createInstallerProcess() {
|
|
||||||
if (this.logger.hasLevel(typescript_exports.server.LogLevel.requestTime)) {
|
|
||||||
this.logger.info("Binding...");
|
|
||||||
}
|
|
||||||
const args = [typescript_exports.server.Arguments.GlobalCacheLocation, this.globalTypingsCacheLocation];
|
|
||||||
if (this.telemetryEnabled) {
|
|
||||||
args.push(typescript_exports.server.Arguments.EnableTelemetry);
|
|
||||||
}
|
|
||||||
if (this.logger.loggingEnabled() && this.logger.getLogFileName()) {
|
|
||||||
args.push(typescript_exports.server.Arguments.LogFile, (0, typescript_exports.combinePaths)((0, typescript_exports.getDirectoryPath)((0, typescript_exports.normalizeSlashes)(this.logger.getLogFileName())), `ti-${process.pid}.log`));
|
|
||||||
}
|
|
||||||
if (this.typingSafeListLocation) {
|
|
||||||
args.push(typescript_exports.server.Arguments.TypingSafeListLocation, this.typingSafeListLocation);
|
|
||||||
}
|
|
||||||
if (this.typesMapLocation) {
|
|
||||||
args.push(typescript_exports.server.Arguments.TypesMapLocation, this.typesMapLocation);
|
|
||||||
}
|
|
||||||
if (this.npmLocation) {
|
|
||||||
args.push(typescript_exports.server.Arguments.NpmLocation, this.npmLocation);
|
|
||||||
}
|
|
||||||
if (this.validateDefaultNpmLocation) {
|
|
||||||
args.push(typescript_exports.server.Arguments.ValidateDefaultNpmLocation);
|
|
||||||
}
|
|
||||||
const execArgv = [];
|
|
||||||
for (const arg of process.execArgv) {
|
|
||||||
const match = /^--((?:debug|inspect)(?:-brk)?)(?:=(\d+))?$/.exec(arg);
|
|
||||||
if (match) {
|
|
||||||
const currentPort = match[2] !== void 0 ? +match[2] : match[1].charAt(0) === "d" ? 5858 : 9229;
|
|
||||||
execArgv.push(`--${match[1]}=${currentPort + 1}`);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const typingsInstaller = (0, typescript_exports.combinePaths)((0, typescript_exports.getDirectoryPath)(typescript_exports.sys.getExecutingFilePath()), "typingsInstaller.js");
|
|
||||||
this.installer = import_child_process.default.fork(typingsInstaller, args, { execArgv });
|
|
||||||
this.installer.on("message", (m) => this.handleMessage(m));
|
|
||||||
this.host.setImmediate(() => this.event({ pid: this.installer.pid }, "typingsInstallerPid"));
|
|
||||||
process.on("exit", () => {
|
|
||||||
this.installer.kill();
|
|
||||||
});
|
|
||||||
return this.installer;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// This number is essentially arbitrary. Processing more than one typings request
|
|
||||||
// at a time makes sense, but having too many in the pipe results in a hang
|
|
||||||
// (see https://github.com/nodejs/node/issues/7657).
|
|
||||||
// It would be preferable to base our limit on the amount of space left in the
|
|
||||||
// buffer, but we have yet to find a way to retrieve that value.
|
|
||||||
_NodeTypingsInstallerAdapter.maxActiveRequestCount = 10;
|
|
||||||
let NodeTypingsInstallerAdapter = _NodeTypingsInstallerAdapter;
|
|
||||||
class IOSession extends typescript_exports.server.Session {
|
|
||||||
constructor() {
|
|
||||||
const event = (body, eventName) => {
|
|
||||||
this.event(body, eventName);
|
|
||||||
};
|
|
||||||
const host = typescript_exports.sys;
|
|
||||||
const typingsInstaller = disableAutomaticTypingAcquisition ? void 0 : new NodeTypingsInstallerAdapter(telemetryEnabled, logger, host, getGlobalTypingsCacheLocation(), typingSafeListLocation, typesMapLocation, npmLocation, validateDefaultNpmLocation, event);
|
|
||||||
super({
|
|
||||||
host,
|
|
||||||
cancellationToken,
|
|
||||||
...options,
|
|
||||||
typingsInstaller,
|
|
||||||
byteLength: Buffer.byteLength,
|
|
||||||
hrtime: process.hrtime,
|
|
||||||
logger,
|
|
||||||
canUseEvents: true,
|
|
||||||
typesMapLocation
|
|
||||||
});
|
|
||||||
this.eventPort = eventPort;
|
|
||||||
if (this.canUseEvents && this.eventPort) {
|
|
||||||
const s = import_net.default.connect({ port: this.eventPort }, () => {
|
|
||||||
this.eventSocket = s;
|
|
||||||
if (this.socketEventQueue) {
|
|
||||||
for (const event2 of this.socketEventQueue) {
|
|
||||||
this.writeToEventSocket(event2.body, event2.eventName);
|
|
||||||
}
|
|
||||||
this.socketEventQueue = void 0;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.constructed = true;
|
|
||||||
}
|
|
||||||
event(body, eventName) {
|
|
||||||
typescript_exports.Debug.assert(!!this.constructed, "Should only call `IOSession.prototype.event` on an initialized IOSession");
|
|
||||||
if (this.canUseEvents && this.eventPort) {
|
|
||||||
if (!this.eventSocket) {
|
|
||||||
if (this.logger.hasLevel(typescript_exports.server.LogLevel.verbose)) {
|
|
||||||
this.logger.info(`eventPort: event "${eventName}" queued, but socket not yet initialized`);
|
|
||||||
}
|
|
||||||
(this.socketEventQueue || (this.socketEventQueue = [])).push({ body, eventName });
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
typescript_exports.Debug.assert(this.socketEventQueue === void 0);
|
|
||||||
this.writeToEventSocket(body, eventName);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
super.event(body, eventName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
writeToEventSocket(body, eventName) {
|
|
||||||
this.eventSocket.write(typescript_exports.server.formatMessage(typescript_exports.server.toEvent(eventName, body), this.logger, this.byteLength, this.host.newLine), "utf8");
|
|
||||||
}
|
|
||||||
exit() {
|
|
||||||
var _a;
|
|
||||||
this.logger.info("Exiting...");
|
|
||||||
this.projectService.closeLog();
|
|
||||||
(_a = typescript_exports.tracing) == null ? void 0 : _a.stopTracing();
|
|
||||||
process.exit(0);
|
|
||||||
}
|
|
||||||
listen() {
|
|
||||||
rl.on("line", (input) => {
|
|
||||||
const message = input.trim();
|
|
||||||
this.onMessage(message);
|
|
||||||
});
|
|
||||||
rl.on("close", () => {
|
|
||||||
this.exit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
class IpcIOSession extends IOSession {
|
|
||||||
writeMessage(msg) {
|
|
||||||
const verboseLogging = logger.hasLevel(typescript_exports.server.LogLevel.verbose);
|
|
||||||
if (verboseLogging) {
|
|
||||||
const json = JSON.stringify(msg);
|
|
||||||
logger.info(`${msg.type}:${typescript_exports.server.indent(json)}`);
|
|
||||||
}
|
|
||||||
process.send(msg);
|
|
||||||
}
|
|
||||||
parseMessage(message) {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
toStringMessage(message) {
|
|
||||||
return JSON.stringify(message, void 0, 2);
|
|
||||||
}
|
|
||||||
listen() {
|
|
||||||
process.on("message", (e) => {
|
|
||||||
this.onMessage(e);
|
|
||||||
});
|
|
||||||
process.on("disconnect", () => {
|
|
||||||
this.exit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const eventPort = parseEventPort(typescript_exports.server.findArgument("--eventPort"));
|
|
||||||
const typingSafeListLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypingSafeListLocation);
|
|
||||||
const typesMapLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypesMapLocation) || (0, typescript_exports.combinePaths)((0, typescript_exports.getDirectoryPath)(typescript_exports.sys.getExecutingFilePath()), "typesMap.json");
|
|
||||||
const npmLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.NpmLocation);
|
|
||||||
const validateDefaultNpmLocation = typescript_exports.server.hasArgument(typescript_exports.server.Arguments.ValidateDefaultNpmLocation);
|
|
||||||
const disableAutomaticTypingAcquisition = typescript_exports.server.hasArgument("--disableAutomaticTypingAcquisition");
|
|
||||||
const useNodeIpc = typescript_exports.server.hasArgument("--useNodeIpc");
|
|
||||||
const telemetryEnabled = typescript_exports.server.hasArgument(typescript_exports.server.Arguments.EnableTelemetry);
|
|
||||||
const commandLineTraceDir = typescript_exports.server.findArgument("--traceDirectory");
|
|
||||||
const traceDir = commandLineTraceDir ? (0, typescript_exports.stripQuotes)(commandLineTraceDir) : process.env.TSS_TRACE;
|
|
||||||
if (traceDir) {
|
|
||||||
(0, typescript_exports.startTracing)("server", traceDir);
|
|
||||||
}
|
|
||||||
const ioSession = useNodeIpc ? new IpcIOSession() : new IOSession();
|
|
||||||
process.on("uncaughtException", (err) => {
|
|
||||||
ioSession.logError(err, "unknown");
|
|
||||||
});
|
|
||||||
process.noAsar = true;
|
|
||||||
ioSession.listen();
|
|
||||||
function getGlobalTypingsCacheLocation() {
|
|
||||||
switch (process.platform) {
|
|
||||||
case "win32": {
|
|
||||||
const basePath = process.env.LOCALAPPDATA || process.env.APPDATA || import_os.default.homedir && import_os.default.homedir() || process.env.USERPROFILE || process.env.HOMEDRIVE && process.env.HOMEPATH && (0, typescript_exports.normalizeSlashes)(process.env.HOMEDRIVE + process.env.HOMEPATH) || import_os.default.tmpdir();
|
|
||||||
return (0, typescript_exports.combinePaths)((0, typescript_exports.combinePaths)((0, typescript_exports.normalizeSlashes)(basePath), "Microsoft/TypeScript"), typescript_exports.versionMajorMinor);
|
|
||||||
}
|
|
||||||
case "openbsd":
|
|
||||||
case "freebsd":
|
|
||||||
case "netbsd":
|
|
||||||
case "darwin":
|
|
||||||
case "linux":
|
|
||||||
case "android": {
|
|
||||||
const cacheLocation = getNonWindowsCacheLocation(process.platform === "darwin");
|
|
||||||
return (0, typescript_exports.combinePaths)((0, typescript_exports.combinePaths)(cacheLocation, "typescript"), typescript_exports.versionMajorMinor);
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return typescript_exports.Debug.fail(`unsupported platform '${process.platform}'`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function getNonWindowsCacheLocation(platformIsDarwin) {
|
|
||||||
if (process.env.XDG_CACHE_HOME) {
|
|
||||||
return process.env.XDG_CACHE_HOME;
|
|
||||||
}
|
|
||||||
const usersDir = platformIsDarwin ? "Users" : "home";
|
|
||||||
const homePath = import_os.default.homedir && import_os.default.homedir() || process.env.HOME || (process.env.LOGNAME || process.env.USER) && `/${usersDir}/${process.env.LOGNAME || process.env.USER}` || import_os.default.tmpdir();
|
|
||||||
const cacheFolder = platformIsDarwin ? "Library/Caches" : ".cache";
|
|
||||||
return (0, typescript_exports.combinePaths)((0, typescript_exports.normalizeSlashes)(homePath), cacheFolder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function pipeExists(name) {
|
|
||||||
return import_fs.default.existsSync(name);
|
|
||||||
}
|
|
||||||
function createCancellationToken(args) {
|
|
||||||
let cancellationPipeName;
|
|
||||||
for (let i = 0; i < args.length - 1; i++) {
|
|
||||||
if (args[i] === "--cancellationPipeName") {
|
|
||||||
cancellationPipeName = args[i + 1];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!cancellationPipeName) {
|
|
||||||
return typescript_exports.server.nullCancellationToken;
|
|
||||||
}
|
|
||||||
if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") {
|
|
||||||
const namePrefix = cancellationPipeName.slice(0, -1);
|
|
||||||
if (namePrefix.length === 0 || namePrefix.includes("*")) {
|
|
||||||
throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'.");
|
|
||||||
}
|
|
||||||
let perRequestPipeName;
|
|
||||||
let currentRequestId;
|
|
||||||
return {
|
|
||||||
isCancellationRequested: () => perRequestPipeName !== void 0 && pipeExists(perRequestPipeName),
|
|
||||||
setRequest(requestId) {
|
|
||||||
currentRequestId = requestId;
|
|
||||||
perRequestPipeName = namePrefix + requestId;
|
|
||||||
},
|
|
||||||
resetRequest(requestId) {
|
|
||||||
if (currentRequestId !== requestId) {
|
|
||||||
throw new Error(`Mismatched request id, expected ${currentRequestId}, actual ${requestId}`);
|
|
||||||
}
|
|
||||||
perRequestPipeName = void 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
return {
|
|
||||||
isCancellationRequested: () => pipeExists(cancellationPipeName),
|
|
||||||
setRequest: (_requestId) => void 0,
|
|
||||||
resetRequest: (_requestId) => void 0
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// src/tsserver/server.ts
|
|
||||||
function findArgumentStringArray(argName) {
|
|
||||||
const arg = typescript_exports.server.findArgument(argName);
|
|
||||||
if (arg === void 0) {
|
|
||||||
return typescript_exports.emptyArray;
|
|
||||||
}
|
|
||||||
return arg.split(",").filter((name) => name !== "");
|
|
||||||
}
|
|
||||||
function start({ args, logger, cancellationToken, serverMode, unknownServerMode, startSession: startServer }, platform) {
|
|
||||||
logger.info(`Starting TS Server`);
|
|
||||||
logger.info(`Version: ${typescript_exports.version}`);
|
|
||||||
logger.info(`Arguments: ${args.join(" ")}`);
|
|
||||||
logger.info(`Platform: ${platform} NodeVersion: ${process.version} CaseSensitive: ${typescript_exports.sys.useCaseSensitiveFileNames}`);
|
|
||||||
logger.info(`ServerMode: ${serverMode} hasUnknownServerMode: ${unknownServerMode}`);
|
|
||||||
typescript_exports.setStackTraceLimit();
|
|
||||||
if (typescript_exports.Debug.isDebugging) {
|
|
||||||
typescript_exports.Debug.enableDebugInfo();
|
|
||||||
}
|
|
||||||
if (typescript_exports.sys.tryEnableSourceMapsForHost && /^development$/i.test(typescript_exports.sys.getEnvironmentVariable("NODE_ENV"))) {
|
|
||||||
typescript_exports.sys.tryEnableSourceMapsForHost();
|
|
||||||
}
|
|
||||||
console.log = (...args2) => logger.msg(args2.length === 1 ? args2[0] : args2.join(", "), typescript_exports.server.Msg.Info);
|
|
||||||
console.warn = (...args2) => logger.msg(args2.length === 1 ? args2[0] : args2.join(", "), typescript_exports.server.Msg.Err);
|
|
||||||
console.error = (...args2) => logger.msg(args2.length === 1 ? args2[0] : args2.join(", "), typescript_exports.server.Msg.Err);
|
|
||||||
startServer(
|
|
||||||
{
|
|
||||||
globalPlugins: findArgumentStringArray("--globalPlugins"),
|
|
||||||
pluginProbeLocations: findArgumentStringArray("--pluginProbeLocations"),
|
|
||||||
allowLocalPluginLoads: typescript_exports.server.hasArgument("--allowLocalPluginLoads"),
|
|
||||||
useSingleInferredProject: typescript_exports.server.hasArgument("--useSingleInferredProject"),
|
|
||||||
useInferredProjectPerProjectRoot: typescript_exports.server.hasArgument("--useInferredProjectPerProjectRoot"),
|
|
||||||
suppressDiagnosticEvents: typescript_exports.server.hasArgument("--suppressDiagnosticEvents"),
|
|
||||||
noGetErrOnBackgroundUpdate: typescript_exports.server.hasArgument("--noGetErrOnBackgroundUpdate"),
|
|
||||||
canUseWatchEvents: typescript_exports.server.hasArgument("--canUseWatchEvents"),
|
|
||||||
serverMode
|
|
||||||
},
|
|
||||||
logger,
|
|
||||||
cancellationToken
|
|
||||||
);
|
|
||||||
}
|
|
||||||
typescript_exports.setStackTraceLimit();
|
|
||||||
start(initializeNodeSystem(), import_os2.default.platform());
|
|
||||||
//# sourceMappingURL=_tsserver.js.map
|
|
||||||
222
node_modules/typescript/lib/_typingsInstaller.js
generated
vendored
222
node_modules/typescript/lib/_typingsInstaller.js
generated
vendored
@@ -1,222 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
var __create = Object.create;
|
|
||||||
var __defProp = Object.defineProperty;
|
|
||||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
||||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
||||||
var __getProtoOf = Object.getPrototypeOf;
|
|
||||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
||||||
var __copyProps = (to, from, except, desc) => {
|
|
||||||
if (from && typeof from === "object" || typeof from === "function") {
|
|
||||||
for (let key of __getOwnPropNames(from))
|
|
||||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
||||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
};
|
|
||||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
||||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
||||||
// If the importer is in node compatibility mode or this is not an ESM
|
|
||||||
// file that has been converted to a CommonJS file using a Babel-
|
|
||||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
||||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
||||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
||||||
mod
|
|
||||||
));
|
|
||||||
|
|
||||||
// src/typingsInstaller/nodeTypingsInstaller.ts
|
|
||||||
var import_child_process = require("child_process");
|
|
||||||
var fs = __toESM(require("fs"));
|
|
||||||
var path = __toESM(require("path"));
|
|
||||||
|
|
||||||
// src/typescript/typescript.ts
|
|
||||||
var typescript_exports = {};
|
|
||||||
__reExport(typescript_exports, require("./typescript.js"));
|
|
||||||
|
|
||||||
// src/typingsInstaller/nodeTypingsInstaller.ts
|
|
||||||
var FileLog = class {
|
|
||||||
constructor(logFile) {
|
|
||||||
this.logFile = logFile;
|
|
||||||
this.isEnabled = () => {
|
|
||||||
return typeof this.logFile === "string";
|
|
||||||
};
|
|
||||||
this.writeLine = (text) => {
|
|
||||||
if (typeof this.logFile !== "string") return;
|
|
||||||
try {
|
|
||||||
fs.appendFileSync(this.logFile, `[${typescript_exports.server.nowString()}] ${text}${typescript_exports.sys.newLine}`);
|
|
||||||
} catch {
|
|
||||||
this.logFile = void 0;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
function getDefaultNPMLocation(processName, validateDefaultNpmLocation2, host) {
|
|
||||||
if (path.basename(processName).indexOf("node") === 0) {
|
|
||||||
const npmPath = path.join(path.dirname(process.argv[0]), "npm");
|
|
||||||
if (!validateDefaultNpmLocation2) {
|
|
||||||
return npmPath;
|
|
||||||
}
|
|
||||||
if (host.fileExists(npmPath)) {
|
|
||||||
return `"${npmPath}"`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return "npm";
|
|
||||||
}
|
|
||||||
function loadTypesRegistryFile(typesRegistryFilePath, host, log2) {
|
|
||||||
if (!host.fileExists(typesRegistryFilePath)) {
|
|
||||||
if (log2.isEnabled()) {
|
|
||||||
log2.writeLine(`Types registry file '${typesRegistryFilePath}' does not exist`);
|
|
||||||
}
|
|
||||||
return /* @__PURE__ */ new Map();
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const content = JSON.parse(host.readFile(typesRegistryFilePath));
|
|
||||||
return new Map(Object.entries(content.entries));
|
|
||||||
} catch (e) {
|
|
||||||
if (log2.isEnabled()) {
|
|
||||||
log2.writeLine(`Error when loading types registry file '${typesRegistryFilePath}': ${e.message}, ${e.stack}`);
|
|
||||||
}
|
|
||||||
return /* @__PURE__ */ new Map();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var typesRegistryPackageName = "types-registry";
|
|
||||||
function getTypesRegistryFileLocation(globalTypingsCacheLocation2) {
|
|
||||||
return (0, typescript_exports.combinePaths)((0, typescript_exports.normalizeSlashes)(globalTypingsCacheLocation2), `node_modules/${typesRegistryPackageName}/index.json`);
|
|
||||||
}
|
|
||||||
var NodeTypingsInstaller = class extends typescript_exports.server.typingsInstaller.TypingsInstaller {
|
|
||||||
constructor(globalTypingsCacheLocation2, typingSafeListLocation2, typesMapLocation2, npmLocation2, validateDefaultNpmLocation2, throttleLimit, log2) {
|
|
||||||
const libDirectory = (0, typescript_exports.getDirectoryPath)((0, typescript_exports.normalizePath)(typescript_exports.sys.getExecutingFilePath()));
|
|
||||||
super(
|
|
||||||
typescript_exports.sys,
|
|
||||||
globalTypingsCacheLocation2,
|
|
||||||
typingSafeListLocation2 ? (0, typescript_exports.toPath)(typingSafeListLocation2, "", (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)) : (0, typescript_exports.toPath)("typingSafeList.json", libDirectory, (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)),
|
|
||||||
typesMapLocation2 ? (0, typescript_exports.toPath)(typesMapLocation2, "", (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)) : (0, typescript_exports.toPath)("typesMap.json", libDirectory, (0, typescript_exports.createGetCanonicalFileName)(typescript_exports.sys.useCaseSensitiveFileNames)),
|
|
||||||
throttleLimit,
|
|
||||||
log2
|
|
||||||
);
|
|
||||||
this.npmPath = npmLocation2 !== void 0 ? npmLocation2 : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation2, this.installTypingHost);
|
|
||||||
if (this.npmPath.includes(" ") && this.npmPath[0] !== `"`) {
|
|
||||||
this.npmPath = `"${this.npmPath}"`;
|
|
||||||
}
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`Process id: ${process.pid}`);
|
|
||||||
this.log.writeLine(`NPM location: ${this.npmPath} (explicit '${typescript_exports.server.Arguments.NpmLocation}' ${npmLocation2 === void 0 ? "not " : ""} provided)`);
|
|
||||||
this.log.writeLine(`validateDefaultNpmLocation: ${validateDefaultNpmLocation2}`);
|
|
||||||
}
|
|
||||||
this.ensurePackageDirectoryExists(globalTypingsCacheLocation2);
|
|
||||||
try {
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`Updating ${typesRegistryPackageName} npm package...`);
|
|
||||||
}
|
|
||||||
this.execSyncAndLog(`${this.npmPath} install --ignore-scripts ${typesRegistryPackageName}@${this.latestDistTag}`, { cwd: globalTypingsCacheLocation2 });
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`Updated ${typesRegistryPackageName} npm package`);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`Error updating ${typesRegistryPackageName} package: ${e.message}`);
|
|
||||||
}
|
|
||||||
this.delayedInitializationError = {
|
|
||||||
kind: "event::initializationFailed",
|
|
||||||
message: e.message,
|
|
||||||
stack: e.stack
|
|
||||||
};
|
|
||||||
}
|
|
||||||
this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation2), this.installTypingHost, this.log);
|
|
||||||
}
|
|
||||||
handleRequest(req) {
|
|
||||||
if (this.delayedInitializationError) {
|
|
||||||
this.sendResponse(this.delayedInitializationError);
|
|
||||||
this.delayedInitializationError = void 0;
|
|
||||||
}
|
|
||||||
super.handleRequest(req);
|
|
||||||
}
|
|
||||||
sendResponse(response) {
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`Sending response:${typescript_exports.server.stringifyIndented(response)}`);
|
|
||||||
}
|
|
||||||
process.send(response);
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`Response has been sent.`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
installWorker(requestId, packageNames, cwd, onRequestCompleted) {
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`#${requestId} with cwd: ${cwd} arguments: ${JSON.stringify(packageNames)}`);
|
|
||||||
}
|
|
||||||
const start = Date.now();
|
|
||||||
const hasError = typescript_exports.server.typingsInstaller.installNpmPackages(this.npmPath, typescript_exports.version, packageNames, (command) => this.execSyncAndLog(command, { cwd }));
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`npm install #${requestId} took: ${Date.now() - start} ms`);
|
|
||||||
}
|
|
||||||
onRequestCompleted(!hasError);
|
|
||||||
}
|
|
||||||
/** Returns 'true' in case of error. */
|
|
||||||
execSyncAndLog(command, options) {
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(`Exec: ${command}`);
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
const stdout = (0, import_child_process.execSync)(command, { ...options, encoding: "utf-8" });
|
|
||||||
if (this.log.isEnabled()) {
|
|
||||||
this.log.writeLine(` Succeeded. stdout:${indent(typescript_exports.sys.newLine, stdout)}`);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} catch (error) {
|
|
||||||
const { stdout, stderr } = error;
|
|
||||||
this.log.writeLine(` Failed. stdout:${indent(typescript_exports.sys.newLine, stdout)}${typescript_exports.sys.newLine} stderr:${indent(typescript_exports.sys.newLine, stderr)}`);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var logFilePath = typescript_exports.server.findArgument(typescript_exports.server.Arguments.LogFile);
|
|
||||||
var globalTypingsCacheLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.GlobalCacheLocation);
|
|
||||||
var typingSafeListLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypingSafeListLocation);
|
|
||||||
var typesMapLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.TypesMapLocation);
|
|
||||||
var npmLocation = typescript_exports.server.findArgument(typescript_exports.server.Arguments.NpmLocation);
|
|
||||||
var validateDefaultNpmLocation = typescript_exports.server.hasArgument(typescript_exports.server.Arguments.ValidateDefaultNpmLocation);
|
|
||||||
var log = new FileLog(logFilePath);
|
|
||||||
if (log.isEnabled()) {
|
|
||||||
process.on("uncaughtException", (e) => {
|
|
||||||
log.writeLine(`Unhandled exception: ${e} at ${e.stack}`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
process.on("disconnect", () => {
|
|
||||||
if (log.isEnabled()) {
|
|
||||||
log.writeLine(`Parent process has exited, shutting down...`);
|
|
||||||
}
|
|
||||||
process.exit(0);
|
|
||||||
});
|
|
||||||
var installer;
|
|
||||||
process.on("message", (req) => {
|
|
||||||
installer ?? (installer = new NodeTypingsInstaller(
|
|
||||||
globalTypingsCacheLocation,
|
|
||||||
typingSafeListLocation,
|
|
||||||
typesMapLocation,
|
|
||||||
npmLocation,
|
|
||||||
validateDefaultNpmLocation,
|
|
||||||
/*throttleLimit*/
|
|
||||||
5,
|
|
||||||
log
|
|
||||||
));
|
|
||||||
installer.handleRequest(req);
|
|
||||||
});
|
|
||||||
function indent(newline, str) {
|
|
||||||
return str && str.length ? `${newline} ` + str.replace(/\r?\n/, `${newline} `) : "";
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=_typingsInstaller.js.map
|
|
||||||
2122
node_modules/typescript/lib/cs/diagnosticMessages.generated.json
generated
vendored
2122
node_modules/typescript/lib/cs/diagnosticMessages.generated.json
generated
vendored
File diff suppressed because it is too large
Load Diff
2122
node_modules/typescript/lib/de/diagnosticMessages.generated.json
generated
vendored
2122
node_modules/typescript/lib/de/diagnosticMessages.generated.json
generated
vendored
File diff suppressed because it is too large
Load Diff
2122
node_modules/typescript/lib/es/diagnosticMessages.generated.json
generated
vendored
2122
node_modules/typescript/lib/es/diagnosticMessages.generated.json
generated
vendored
File diff suppressed because it is too large
Load Diff
2122
node_modules/typescript/lib/fr/diagnosticMessages.generated.json
generated
vendored
2122
node_modules/typescript/lib/fr/diagnosticMessages.generated.json
generated
vendored
File diff suppressed because it is too large
Load Diff
2122
node_modules/typescript/lib/it/diagnosticMessages.generated.json
generated
vendored
2122
node_modules/typescript/lib/it/diagnosticMessages.generated.json
generated
vendored
File diff suppressed because it is too large
Load Diff
2122
node_modules/typescript/lib/ja/diagnosticMessages.generated.json
generated
vendored
2122
node_modules/typescript/lib/ja/diagnosticMessages.generated.json
generated
vendored
File diff suppressed because it is too large
Load Diff
2122
node_modules/typescript/lib/ko/diagnosticMessages.generated.json
generated
vendored
2122
node_modules/typescript/lib/ko/diagnosticMessages.generated.json
generated
vendored
File diff suppressed because it is too large
Load Diff
22
node_modules/typescript/lib/lib.d.ts
generated
vendored
22
node_modules/typescript/lib/lib.d.ts
generated
vendored
@@ -1,22 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
/// <reference no-default-lib="true"/>
|
|
||||||
|
|
||||||
/// <reference lib="es5" />
|
|
||||||
/// <reference lib="dom" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
384
node_modules/typescript/lib/lib.decorators.d.ts
generated
vendored
384
node_modules/typescript/lib/lib.decorators.d.ts
generated
vendored
@@ -1,384 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
/// <reference no-default-lib="true"/>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The decorator context types provided to class element decorators.
|
|
||||||
*/
|
|
||||||
type ClassMemberDecoratorContext =
|
|
||||||
| ClassMethodDecoratorContext
|
|
||||||
| ClassGetterDecoratorContext
|
|
||||||
| ClassSetterDecoratorContext
|
|
||||||
| ClassFieldDecoratorContext
|
|
||||||
| ClassAccessorDecoratorContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The decorator context types provided to any decorator.
|
|
||||||
*/
|
|
||||||
type DecoratorContext =
|
|
||||||
| ClassDecoratorContext
|
|
||||||
| ClassMemberDecoratorContext;
|
|
||||||
|
|
||||||
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
|
|
||||||
|
|
||||||
type DecoratorMetadata = typeof globalThis extends { Symbol: { readonly metadata: symbol; }; } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Context provided to a class decorator.
|
|
||||||
* @template Class The type of the decorated class associated with this context.
|
|
||||||
*/
|
|
||||||
interface ClassDecoratorContext<
|
|
||||||
Class extends abstract new (...args: any) => any = abstract new (...args: any) => any,
|
|
||||||
> {
|
|
||||||
/** The kind of element that was decorated. */
|
|
||||||
readonly kind: "class";
|
|
||||||
|
|
||||||
/** The name of the decorated class. */
|
|
||||||
readonly name: string | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked after the class definition has been finalized.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```ts
|
|
||||||
* function customElement(name: string): ClassDecoratorFunction {
|
|
||||||
* return (target, context) => {
|
|
||||||
* context.addInitializer(function () {
|
|
||||||
* customElements.define(name, this);
|
|
||||||
* });
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* @customElement("my-element")
|
|
||||||
* class MyElement {}
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: Class) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Context provided to a class method decorator.
|
|
||||||
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
||||||
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
||||||
* @template Value The type of the decorated class method.
|
|
||||||
*/
|
|
||||||
interface ClassMethodDecoratorContext<
|
|
||||||
This = unknown,
|
|
||||||
Value extends (this: This, ...args: any) => any = (this: This, ...args: any) => any,
|
|
||||||
> {
|
|
||||||
/** The kind of class element that was decorated. */
|
|
||||||
readonly kind: "method";
|
|
||||||
|
|
||||||
/** The name of the decorated class element. */
|
|
||||||
readonly name: string | symbol;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
||||||
readonly static: boolean;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element has a private name. */
|
|
||||||
readonly private: boolean;
|
|
||||||
|
|
||||||
/** An object that can be used to access the current value of the class element at runtime. */
|
|
||||||
readonly access: {
|
|
||||||
/**
|
|
||||||
* Determines whether an object has a property with the same name as the decorated element.
|
|
||||||
*/
|
|
||||||
has(object: This): boolean;
|
|
||||||
/**
|
|
||||||
* Gets the current value of the method from the provided object.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* let fn = context.access.get(instance);
|
|
||||||
*/
|
|
||||||
get(object: This): Value;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked either after static methods are defined but before
|
|
||||||
* static initializers are run (when decorating a `static` element), or before instance
|
|
||||||
* initializers are run (when decorating a non-`static` element).
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```ts
|
|
||||||
* const bound: ClassMethodDecoratorFunction = (value, context) {
|
|
||||||
* if (context.private) throw new TypeError("Not supported on private methods.");
|
|
||||||
* context.addInitializer(function () {
|
|
||||||
* this[context.name] = this[context.name].bind(this);
|
|
||||||
* });
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* class C {
|
|
||||||
* message = "Hello";
|
|
||||||
*
|
|
||||||
* @bound
|
|
||||||
* m() {
|
|
||||||
* console.log(this.message);
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: This) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Context provided to a class getter decorator.
|
|
||||||
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
||||||
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
||||||
* @template Value The property type of the decorated class getter.
|
|
||||||
*/
|
|
||||||
interface ClassGetterDecoratorContext<
|
|
||||||
This = unknown,
|
|
||||||
Value = unknown,
|
|
||||||
> {
|
|
||||||
/** The kind of class element that was decorated. */
|
|
||||||
readonly kind: "getter";
|
|
||||||
|
|
||||||
/** The name of the decorated class element. */
|
|
||||||
readonly name: string | symbol;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
||||||
readonly static: boolean;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element has a private name. */
|
|
||||||
readonly private: boolean;
|
|
||||||
|
|
||||||
/** An object that can be used to access the current value of the class element at runtime. */
|
|
||||||
readonly access: {
|
|
||||||
/**
|
|
||||||
* Determines whether an object has a property with the same name as the decorated element.
|
|
||||||
*/
|
|
||||||
has(object: This): boolean;
|
|
||||||
/**
|
|
||||||
* Invokes the getter on the provided object.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* let value = context.access.get(instance);
|
|
||||||
*/
|
|
||||||
get(object: This): Value;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked either after static methods are defined but before
|
|
||||||
* static initializers are run (when decorating a `static` element), or before instance
|
|
||||||
* initializers are run (when decorating a non-`static` element).
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: This) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Context provided to a class setter decorator.
|
|
||||||
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
||||||
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
||||||
* @template Value The type of the decorated class setter.
|
|
||||||
*/
|
|
||||||
interface ClassSetterDecoratorContext<
|
|
||||||
This = unknown,
|
|
||||||
Value = unknown,
|
|
||||||
> {
|
|
||||||
/** The kind of class element that was decorated. */
|
|
||||||
readonly kind: "setter";
|
|
||||||
|
|
||||||
/** The name of the decorated class element. */
|
|
||||||
readonly name: string | symbol;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
||||||
readonly static: boolean;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element has a private name. */
|
|
||||||
readonly private: boolean;
|
|
||||||
|
|
||||||
/** An object that can be used to access the current value of the class element at runtime. */
|
|
||||||
readonly access: {
|
|
||||||
/**
|
|
||||||
* Determines whether an object has a property with the same name as the decorated element.
|
|
||||||
*/
|
|
||||||
has(object: This): boolean;
|
|
||||||
/**
|
|
||||||
* Invokes the setter on the provided object.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* context.access.set(instance, value);
|
|
||||||
*/
|
|
||||||
set(object: This, value: Value): void;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked either after static methods are defined but before
|
|
||||||
* static initializers are run (when decorating a `static` element), or before instance
|
|
||||||
* initializers are run (when decorating a non-`static` element).
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: This) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Context provided to a class `accessor` field decorator.
|
|
||||||
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
||||||
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
||||||
* @template Value The type of decorated class field.
|
|
||||||
*/
|
|
||||||
interface ClassAccessorDecoratorContext<
|
|
||||||
This = unknown,
|
|
||||||
Value = unknown,
|
|
||||||
> {
|
|
||||||
/** The kind of class element that was decorated. */
|
|
||||||
readonly kind: "accessor";
|
|
||||||
|
|
||||||
/** The name of the decorated class element. */
|
|
||||||
readonly name: string | symbol;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
||||||
readonly static: boolean;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element has a private name. */
|
|
||||||
readonly private: boolean;
|
|
||||||
|
|
||||||
/** An object that can be used to access the current value of the class element at runtime. */
|
|
||||||
readonly access: {
|
|
||||||
/**
|
|
||||||
* Determines whether an object has a property with the same name as the decorated element.
|
|
||||||
*/
|
|
||||||
has(object: This): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invokes the getter on the provided object.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* let value = context.access.get(instance);
|
|
||||||
*/
|
|
||||||
get(object: This): Value;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invokes the setter on the provided object.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* context.access.set(instance, value);
|
|
||||||
*/
|
|
||||||
set(object: This, value: Value): void;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked immediately after the auto `accessor` being
|
|
||||||
* decorated is initialized (regardless if the `accessor` is `static` or not).
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: This) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes the target provided to class `accessor` field decorators.
|
|
||||||
* @template This The `this` type to which the target applies.
|
|
||||||
* @template Value The property type for the class `accessor` field.
|
|
||||||
*/
|
|
||||||
interface ClassAccessorDecoratorTarget<This, Value> {
|
|
||||||
/**
|
|
||||||
* Invokes the getter that was defined prior to decorator application.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* let value = target.get.call(instance);
|
|
||||||
*/
|
|
||||||
get(this: This): Value;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invokes the setter that was defined prior to decorator application.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* target.set.call(instance, value);
|
|
||||||
*/
|
|
||||||
set(this: This, value: Value): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes the allowed return value from a class `accessor` field decorator.
|
|
||||||
* @template This The `this` type to which the target applies.
|
|
||||||
* @template Value The property type for the class `accessor` field.
|
|
||||||
*/
|
|
||||||
interface ClassAccessorDecoratorResult<This, Value> {
|
|
||||||
/**
|
|
||||||
* An optional replacement getter function. If not provided, the existing getter function is used instead.
|
|
||||||
*/
|
|
||||||
get?(this: This): Value;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An optional replacement setter function. If not provided, the existing setter function is used instead.
|
|
||||||
*/
|
|
||||||
set?(this: This, value: Value): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An optional initializer mutator that is invoked when the underlying field initializer is evaluated.
|
|
||||||
* @param value The incoming initializer value.
|
|
||||||
* @returns The replacement initializer value.
|
|
||||||
*/
|
|
||||||
init?(this: This, value: Value): Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Context provided to a class field decorator.
|
|
||||||
* @template This The type on which the class element will be defined. For a static class element, this will be
|
|
||||||
* the type of the constructor. For a non-static class element, this will be the type of the instance.
|
|
||||||
* @template Value The type of the decorated class field.
|
|
||||||
*/
|
|
||||||
interface ClassFieldDecoratorContext<
|
|
||||||
This = unknown,
|
|
||||||
Value = unknown,
|
|
||||||
> {
|
|
||||||
/** The kind of class element that was decorated. */
|
|
||||||
readonly kind: "field";
|
|
||||||
|
|
||||||
/** The name of the decorated class element. */
|
|
||||||
readonly name: string | symbol;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */
|
|
||||||
readonly static: boolean;
|
|
||||||
|
|
||||||
/** A value indicating whether the class element has a private name. */
|
|
||||||
readonly private: boolean;
|
|
||||||
|
|
||||||
/** An object that can be used to access the current value of the class element at runtime. */
|
|
||||||
readonly access: {
|
|
||||||
/**
|
|
||||||
* Determines whether an object has a property with the same name as the decorated element.
|
|
||||||
*/
|
|
||||||
has(object: This): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value of the field on the provided object.
|
|
||||||
*/
|
|
||||||
get(object: This): Value;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value of the field on the provided object.
|
|
||||||
*/
|
|
||||||
set(object: This, value: Value): void;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked immediately after the field being decorated
|
|
||||||
* is initialized (regardless if the field is `static` or not).
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: This) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
22
node_modules/typescript/lib/lib.decorators.legacy.d.ts
generated
vendored
22
node_modules/typescript/lib/lib.decorators.legacy.d.ts
generated
vendored
@@ -1,22 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
/// <reference no-default-lib="true"/>
|
|
||||||
|
|
||||||
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
|
|
||||||
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
|
|
||||||
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
|
|
||||||
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
||||||
41
node_modules/typescript/lib/lib.dom.asynciterable.d.ts
generated
vendored
41
node_modules/typescript/lib/lib.dom.asynciterable.d.ts
generated
vendored
@@ -1,41 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
/// <reference no-default-lib="true"/>
|
|
||||||
|
|
||||||
/////////////////////////////
|
|
||||||
/// Window Async Iterable APIs
|
|
||||||
/////////////////////////////
|
|
||||||
|
|
||||||
interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FileSystemDirectoryHandle {
|
|
||||||
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
|
|
||||||
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
|
|
||||||
keys(): FileSystemDirectoryHandleAsyncIterator<string>;
|
|
||||||
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadableStream<R = any> {
|
|
||||||
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
|
||||||
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
|
||||||
}
|
|
||||||
39429
node_modules/typescript/lib/lib.dom.d.ts
generated
vendored
39429
node_modules/typescript/lib/lib.dom.d.ts
generated
vendored
File diff suppressed because it is too large
Load Diff
571
node_modules/typescript/lib/lib.dom.iterable.d.ts
generated
vendored
571
node_modules/typescript/lib/lib.dom.iterable.d.ts
generated
vendored
@@ -1,571 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
/// <reference no-default-lib="true"/>
|
|
||||||
|
|
||||||
/////////////////////////////
|
|
||||||
/// Window Iterable APIs
|
|
||||||
/////////////////////////////
|
|
||||||
|
|
||||||
interface AudioParam {
|
|
||||||
/**
|
|
||||||
* The **`setValueCurveAtTime()`** method of the following a curve defined by a list of values.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime)
|
|
||||||
*/
|
|
||||||
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AudioParamMap extends ReadonlyMap<string, AudioParam> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface BaseAudioContext {
|
|
||||||
/**
|
|
||||||
* The **`createIIRFilter()`** method of the BaseAudioContext interface creates an IIRFilterNode, which represents a general **infinite impulse response** (IIR) filter which can be configured to serve as various types of filter.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter)
|
|
||||||
*/
|
|
||||||
createIIRFilter(feedforward: Iterable<number>, feedback: Iterable<number>): IIRFilterNode;
|
|
||||||
/**
|
|
||||||
* The `createPeriodicWave()` method of the BaseAudioContext interface is used to create a PeriodicWave.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave)
|
|
||||||
*/
|
|
||||||
createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSKeyframesRule {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSKeyframeRule>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSNumericArray {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSNumericValue>;
|
|
||||||
entries(): ArrayIterator<[number, CSSNumericValue]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<CSSNumericValue>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSRuleList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSRule>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSStyleDeclaration {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSTransformValue {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSTransformComponent>;
|
|
||||||
entries(): ArrayIterator<[number, CSSTransformComponent]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<CSSTransformComponent>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSUnparsedValue {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSUnparsedSegment>;
|
|
||||||
entries(): ArrayIterator<[number, CSSUnparsedSegment]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<CSSUnparsedSegment>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Cache {
|
|
||||||
/**
|
|
||||||
* The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll)
|
|
||||||
*/
|
|
||||||
addAll(requests: Iterable<RequestInfo>): Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CanvasPath {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */
|
|
||||||
roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable<number | DOMPointInit>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CanvasPathDrawingStyles {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */
|
|
||||||
setLineDash(segments: Iterable<number>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CookieStoreManager {
|
|
||||||
/**
|
|
||||||
* The **`subscribe()`** method of the CookieStoreManager interface subscribes a ServiceWorkerRegistration to cookie change events.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe)
|
|
||||||
*/
|
|
||||||
subscribe(subscriptions: Iterable<CookieStoreGetOptions>): Promise<void>;
|
|
||||||
/**
|
|
||||||
* The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe)
|
|
||||||
*/
|
|
||||||
unsubscribe(subscriptions: Iterable<CookieStoreGetOptions>): Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CustomStateSet extends Set<string> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DOMRectList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<DOMRect>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DOMStringList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DOMTokenList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
entries(): ArrayIterator<[number, string]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DataTransferItemList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<DataTransferItem>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface EventCounts extends ReadonlyMap<string, number> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FileList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<File>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FontFaceSet extends Set<FontFace> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FormDataIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): FormDataIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FormData {
|
|
||||||
[Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the list. */
|
|
||||||
entries(): FormDataIterator<[string, FormDataEntryValue]>;
|
|
||||||
/** Returns a list of keys in the list. */
|
|
||||||
keys(): FormDataIterator<string>;
|
|
||||||
/** Returns a list of values in the list. */
|
|
||||||
values(): FormDataIterator<FormDataEntryValue>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLAllCollection {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Element>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLCollectionBase {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Element>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLCollectionOf<T extends Element> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLFormElement {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Element>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLSelectElement {
|
|
||||||
[Symbol.iterator](): ArrayIterator<HTMLOptionElement>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HeadersIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): HeadersIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Headers {
|
|
||||||
[Symbol.iterator](): HeadersIterator<[string, string]>;
|
|
||||||
/** Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
||||||
entries(): HeadersIterator<[string, string]>;
|
|
||||||
/** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
||||||
keys(): HeadersIterator<string>;
|
|
||||||
/** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
||||||
values(): HeadersIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Highlight extends Set<AbstractRange> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HighlightRegistry extends Map<string, Highlight> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IDBDatabase {
|
|
||||||
/**
|
|
||||||
* The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
|
|
||||||
*/
|
|
||||||
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IDBObjectStore {
|
|
||||||
/**
|
|
||||||
* The **`createIndex()`** method of the field/column defining a new data point for each database record to contain.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
|
|
||||||
*/
|
|
||||||
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ImageTrackList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<ImageTrack>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MIDIOutput {
|
|
||||||
/**
|
|
||||||
* The **`send()`** method of the MIDIOutput interface queues messages for the corresponding MIDI port.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutput/send)
|
|
||||||
*/
|
|
||||||
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MediaKeyStatusMapIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): MediaKeyStatusMapIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MediaKeyStatusMap {
|
|
||||||
[Symbol.iterator](): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
|
|
||||||
entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
|
|
||||||
keys(): MediaKeyStatusMapIterator<BufferSource>;
|
|
||||||
values(): MediaKeyStatusMapIterator<MediaKeyStatus>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MediaList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MessageEvent<T = any> {
|
|
||||||
/** @deprecated */
|
|
||||||
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MimeTypeArray {
|
|
||||||
[Symbol.iterator](): ArrayIterator<MimeType>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NamedNodeMap {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Attr>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Navigator {
|
|
||||||
/**
|
|
||||||
* The **`requestMediaKeySystemAccess()`** method of the Navigator interface returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
|
|
||||||
* Available only in secure contexts.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess)
|
|
||||||
*/
|
|
||||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
|
|
||||||
/**
|
|
||||||
* The **`vibrate()`** method of the Navigator interface pulses the vibration hardware on the device, if such hardware exists.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate)
|
|
||||||
*/
|
|
||||||
vibrate(pattern: Iterable<number>): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NodeList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Node>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the list. */
|
|
||||||
entries(): ArrayIterator<[number, Node]>;
|
|
||||||
/** Returns an list of keys in the list. */
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
/** Returns an list of values in the list. */
|
|
||||||
values(): ArrayIterator<Node>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NodeListOf<TNode extends Node> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<TNode>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the list. */
|
|
||||||
entries(): ArrayIterator<[number, TNode]>;
|
|
||||||
/** Returns an list of keys in the list. */
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
/** Returns an list of values in the list. */
|
|
||||||
values(): ArrayIterator<TNode>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Plugin {
|
|
||||||
[Symbol.iterator](): ArrayIterator<MimeType>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PluginArray {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Plugin>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RTCRtpTransceiver {
|
|
||||||
/**
|
|
||||||
* The **`setCodecPreferences()`** method of the RTCRtpTransceiver interface is used to set the codecs that the transceiver allows for decoding _received_ data, in order of decreasing preference.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences)
|
|
||||||
*/
|
|
||||||
setCodecPreferences(codecs: Iterable<RTCRtpCodec>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RTCStatsReport extends ReadonlyMap<string, any> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGLengthList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SVGLength>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGNumberList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SVGNumber>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGPointList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<DOMPoint>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGStringList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGTransformList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SVGTransform>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SourceBufferList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SourceBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SpeechRecognitionResult {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SpeechRecognitionAlternative>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SpeechRecognitionResultList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SpeechRecognitionResult>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StylePropertyMapReadOnlyIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): StylePropertyMapReadOnlyIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StylePropertyMapReadOnly {
|
|
||||||
[Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue>]>;
|
|
||||||
entries(): StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue>]>;
|
|
||||||
keys(): StylePropertyMapReadOnlyIterator<string>;
|
|
||||||
values(): StylePropertyMapReadOnlyIterator<Iterable<CSSStyleValue>>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StyleSheetList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSStyleSheet>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SubtleCrypto {
|
|
||||||
/**
|
|
||||||
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
|
|
||||||
*/
|
|
||||||
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
||||||
/**
|
|
||||||
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
||||||
*/
|
|
||||||
generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
|
|
||||||
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
|
|
||||||
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
||||||
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
|
|
||||||
/**
|
|
||||||
* The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
|
|
||||||
*/
|
|
||||||
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
|
|
||||||
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
||||||
/**
|
|
||||||
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
||||||
*/
|
|
||||||
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface TextTrackCueList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<TextTrackCue>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface TextTrackList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<TextTrack>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface TouchList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Touch>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface URLSearchParamsIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): URLSearchParamsIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface URLSearchParams {
|
|
||||||
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the search params. */
|
|
||||||
entries(): URLSearchParamsIterator<[string, string]>;
|
|
||||||
/** Returns a list of keys in the search params. */
|
|
||||||
keys(): URLSearchParamsIterator<string>;
|
|
||||||
/** Returns a list of values in the search params. */
|
|
||||||
values(): URLSearchParamsIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ViewTransitionTypeSet extends Set<string> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WEBGL_draw_buffers {
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL)
|
|
||||||
*/
|
|
||||||
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WEBGL_multi_draw {
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void;
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGL2RenderingContextBase {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
||||||
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: number): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
||||||
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: number): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
||||||
clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: number): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */
|
|
||||||
drawBuffers(buffers: Iterable<GLenum>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */
|
|
||||||
getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */
|
|
||||||
getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): GLuint[] | null;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */
|
|
||||||
invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */
|
|
||||||
invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */
|
|
||||||
transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
|
|
||||||
vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
|
|
||||||
vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGL2RenderingContextOverloads {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGLRenderingContextBase {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGLRenderingContextOverloads {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
||||||
}
|
|
||||||
147
node_modules/typescript/lib/lib.es2015.collection.d.ts
generated
vendored
147
node_modules/typescript/lib/lib.es2015.collection.d.ts
generated
vendored
@@ -1,147 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
/// <reference no-default-lib="true"/>
|
|
||||||
|
|
||||||
interface Map<K, V> {
|
|
||||||
clear(): void;
|
|
||||||
/**
|
|
||||||
* @returns true if an element in the Map existed and has been removed, or false if the element does not exist.
|
|
||||||
*/
|
|
||||||
delete(key: K): boolean;
|
|
||||||
/**
|
|
||||||
* Executes a provided function once per each key/value pair in the Map, in insertion order.
|
|
||||||
*/
|
|
||||||
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
|
|
||||||
/**
|
|
||||||
* Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
|
|
||||||
* @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
|
|
||||||
*/
|
|
||||||
get(key: K): V | undefined;
|
|
||||||
/**
|
|
||||||
* @returns boolean indicating whether an element with the specified key exists or not.
|
|
||||||
*/
|
|
||||||
has(key: K): boolean;
|
|
||||||
/**
|
|
||||||
* Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
|
|
||||||
*/
|
|
||||||
set(key: K, value: V): this;
|
|
||||||
/**
|
|
||||||
* @returns the number of elements in the Map.
|
|
||||||
*/
|
|
||||||
readonly size: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MapConstructor {
|
|
||||||
new (): Map<any, any>;
|
|
||||||
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
|
|
||||||
readonly prototype: Map<any, any>;
|
|
||||||
}
|
|
||||||
declare var Map: MapConstructor;
|
|
||||||
|
|
||||||
interface ReadonlyMap<K, V> {
|
|
||||||
forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
|
|
||||||
get(key: K): V | undefined;
|
|
||||||
has(key: K): boolean;
|
|
||||||
readonly size: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakMap<K extends WeakKey, V> {
|
|
||||||
/**
|
|
||||||
* Removes the specified element from the WeakMap.
|
|
||||||
* @returns true if the element was successfully removed, or false if it was not present.
|
|
||||||
*/
|
|
||||||
delete(key: K): boolean;
|
|
||||||
/**
|
|
||||||
* @returns a specified element.
|
|
||||||
*/
|
|
||||||
get(key: K): V | undefined;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether an element with the specified key exists or not.
|
|
||||||
*/
|
|
||||||
has(key: K): boolean;
|
|
||||||
/**
|
|
||||||
* Adds a new element with a specified key and value.
|
|
||||||
* @param key Must be an object or symbol.
|
|
||||||
*/
|
|
||||||
set(key: K, value: V): this;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakMapConstructor {
|
|
||||||
new <K extends WeakKey = WeakKey, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>;
|
|
||||||
readonly prototype: WeakMap<WeakKey, any>;
|
|
||||||
}
|
|
||||||
declare var WeakMap: WeakMapConstructor;
|
|
||||||
|
|
||||||
interface Set<T> {
|
|
||||||
/**
|
|
||||||
* Appends a new element with a specified value to the end of the Set.
|
|
||||||
*/
|
|
||||||
add(value: T): this;
|
|
||||||
|
|
||||||
clear(): void;
|
|
||||||
/**
|
|
||||||
* Removes a specified value from the Set.
|
|
||||||
* @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist.
|
|
||||||
*/
|
|
||||||
delete(value: T): boolean;
|
|
||||||
/**
|
|
||||||
* Executes a provided function once per each value in the Set object, in insertion order.
|
|
||||||
*/
|
|
||||||
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether an element with the specified value exists in the Set or not.
|
|
||||||
*/
|
|
||||||
has(value: T): boolean;
|
|
||||||
/**
|
|
||||||
* @returns the number of (unique) elements in Set.
|
|
||||||
*/
|
|
||||||
readonly size: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SetConstructor {
|
|
||||||
new <T = any>(values?: readonly T[] | null): Set<T>;
|
|
||||||
readonly prototype: Set<any>;
|
|
||||||
}
|
|
||||||
declare var Set: SetConstructor;
|
|
||||||
|
|
||||||
interface ReadonlySet<T> {
|
|
||||||
forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
|
|
||||||
has(value: T): boolean;
|
|
||||||
readonly size: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakSet<T extends WeakKey> {
|
|
||||||
/**
|
|
||||||
* Appends a new value to the end of the WeakSet.
|
|
||||||
*/
|
|
||||||
add(value: T): this;
|
|
||||||
/**
|
|
||||||
* Removes the specified element from the WeakSet.
|
|
||||||
* @returns Returns true if the element existed and has been removed, or false if the element does not exist.
|
|
||||||
*/
|
|
||||||
delete(value: T): boolean;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether a value exists in the WeakSet or not.
|
|
||||||
*/
|
|
||||||
has(value: T): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakSetConstructor {
|
|
||||||
new <T extends WeakKey = WeakKey>(values?: readonly T[] | null): WeakSet<T>;
|
|
||||||
readonly prototype: WeakSet<WeakKey>;
|
|
||||||
}
|
|
||||||
declare var WeakSet: WeakSetConstructor;
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user