fix: bug
This commit is contained in:
21
node_modules/@types/babel__core/LICENSE
generated
vendored
Normal file
21
node_modules/@types/babel__core/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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/babel__core/README.md
generated
vendored
Normal file
15
node_modules/@types/babel__core/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/babel__core`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for @babel/core (https://github.com/babel/babel/tree/master/packages/babel-core).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 20 Nov 2023 23:36:23 GMT
|
||||
* Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types), [@types/babel__generator](https://npmjs.com/package/@types/babel__generator), [@types/babel__template](https://npmjs.com/package/@types/babel__template), [@types/babel__traverse](https://npmjs.com/package/@types/babel__traverse)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), [Jessica Franco](https://github.com/Jessidhia), and [Ifiok Jr.](https://github.com/ifiokjr).
|
||||
831
node_modules/@types/babel__core/index.d.ts
generated
vendored
Normal file
831
node_modules/@types/babel__core/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,831 @@
|
||||
import { GeneratorOptions } from "@babel/generator";
|
||||
import { ParserOptions } from "@babel/parser";
|
||||
import template from "@babel/template";
|
||||
import traverse, { Hub, NodePath, Scope, Visitor } from "@babel/traverse";
|
||||
import * as t from "@babel/types";
|
||||
|
||||
export { GeneratorOptions, NodePath, ParserOptions, t as types, template, traverse, Visitor };
|
||||
|
||||
export type Node = t.Node;
|
||||
export type ParseResult = ReturnType<typeof import("@babel/parser").parse>;
|
||||
export const version: string;
|
||||
export const DEFAULT_EXTENSIONS: [".js", ".jsx", ".es6", ".es", ".mjs"];
|
||||
|
||||
/**
|
||||
* Source map standard format as to revision 3
|
||||
* @see {@link https://sourcemaps.info/spec.html}
|
||||
* @see {@link https://github.com/mozilla/source-map/blob/HEAD/source-map.d.ts}
|
||||
*/
|
||||
interface InputSourceMap {
|
||||
version: number;
|
||||
sources: string[];
|
||||
names: string[];
|
||||
sourceRoot?: string | undefined;
|
||||
sourcesContent?: string[] | undefined;
|
||||
mappings: string;
|
||||
file: string;
|
||||
}
|
||||
|
||||
export interface TransformOptions {
|
||||
/**
|
||||
* Specify which assumptions it can make about your code, to better optimize the compilation result. **NOTE**: This replaces the various `loose` options in plugins in favor of
|
||||
* top-level options that can apply to multiple plugins
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/assumptions
|
||||
*/
|
||||
assumptions?: { [name: string]: boolean } | null | undefined;
|
||||
|
||||
/**
|
||||
* Include the AST in the returned object
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
ast?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Attach a comment after all non-user injected code
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
auxiliaryCommentAfter?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* Attach a comment before all non-user injected code
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
auxiliaryCommentBefore?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* Specify the "root" folder that defines the location to search for "babel.config.js", and the default folder to allow `.babelrc` files inside of.
|
||||
*
|
||||
* Default: `"."`
|
||||
*/
|
||||
root?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* This option, combined with the "root" value, defines how Babel chooses its project root.
|
||||
* The different modes define different ways that Babel can process the "root" value to get
|
||||
* the final project root.
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/next/options#rootmode
|
||||
*/
|
||||
rootMode?: "root" | "upward" | "upward-optional" | undefined;
|
||||
|
||||
/**
|
||||
* The config file to load Babel's config from. Defaults to searching for "babel.config.js" inside the "root" folder. `false` will disable searching for config files.
|
||||
*
|
||||
* Default: `undefined`
|
||||
*/
|
||||
configFile?: string | boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Specify whether or not to use .babelrc and
|
||||
* .babelignore files.
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
babelrc?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Specify which packages should be search for .babelrc files when they are being compiled. `true` to always search, or a path string or an array of paths to packages to search
|
||||
* inside of. Defaults to only searching the "root" package.
|
||||
*
|
||||
* Default: `(root)`
|
||||
*/
|
||||
babelrcRoots?: boolean | MatchPattern | MatchPattern[] | null | undefined;
|
||||
|
||||
/**
|
||||
* Toggles whether or not browserslist config sources are used, which includes searching for any browserslist files or referencing the browserslist key inside package.json.
|
||||
* This is useful for projects that use a browserslist config for files that won't be compiled with Babel.
|
||||
*
|
||||
* If a string is specified, it must represent the path of a browserslist configuration file. Relative paths are resolved relative to the configuration file which specifies
|
||||
* this option, or to `cwd` when it's passed as part of the programmatic options.
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
browserslistConfigFile?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* The Browserslist environment to use.
|
||||
*
|
||||
* Default: `undefined`
|
||||
*/
|
||||
browserslistEnv?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* By default `babel.transformFromAst` will clone the input AST to avoid mutations.
|
||||
* Specifying `cloneInputAst: false` can improve parsing performance if the input AST is not used elsewhere.
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
cloneInputAst?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Defaults to environment variable `BABEL_ENV` if set, or else `NODE_ENV` if set, or else it defaults to `"development"`
|
||||
*
|
||||
* Default: env vars
|
||||
*/
|
||||
envName?: string | undefined;
|
||||
|
||||
/**
|
||||
* If any of patterns match, the current configuration object is considered inactive and is ignored during config processing.
|
||||
*/
|
||||
exclude?: MatchPattern | MatchPattern[] | undefined;
|
||||
|
||||
/**
|
||||
* Enable code generation
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
code?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Output comments in generated output
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
comments?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Do not include superfluous whitespace characters and line terminators. When set to `"auto"` compact is set to `true` on input sizes of >500KB
|
||||
*
|
||||
* Default: `"auto"`
|
||||
*/
|
||||
compact?: boolean | "auto" | null | undefined;
|
||||
|
||||
/**
|
||||
* The working directory that Babel's programmatic options are loaded relative to.
|
||||
*
|
||||
* Default: `"."`
|
||||
*/
|
||||
cwd?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* Utilities may pass a caller object to identify themselves to Babel and
|
||||
* pass capability-related flags for use by configs, presets and plugins.
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/next/options#caller
|
||||
*/
|
||||
caller?: TransformCaller | undefined;
|
||||
|
||||
/**
|
||||
* This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { \/* specific options *\/ } } }`
|
||||
* which will use those options when the `envName` is `production`
|
||||
*
|
||||
* Default: `{}`
|
||||
*/
|
||||
env?: { [index: string]: TransformOptions | null | undefined } | null | undefined;
|
||||
|
||||
/**
|
||||
* A path to a `.babelrc` file to extend
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
extends?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* Filename for use in errors etc
|
||||
*
|
||||
* Default: `"unknown"`
|
||||
*/
|
||||
filename?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* Filename relative to `sourceRoot`
|
||||
*
|
||||
* Default: `(filename)`
|
||||
*/
|
||||
filenameRelative?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* An object containing the options to be passed down to the babel code generator, @babel/generator
|
||||
*
|
||||
* Default: `{}`
|
||||
*/
|
||||
generatorOpts?: GeneratorOptions | null | undefined;
|
||||
|
||||
/**
|
||||
* Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
getModuleId?: ((moduleName: string) => string | null | undefined) | null | undefined;
|
||||
|
||||
/**
|
||||
* ANSI highlight syntax error code frames
|
||||
*
|
||||
* Default: `true`
|
||||
*/
|
||||
highlightCode?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Opposite to the `only` option. `ignore` is disregarded if `only` is specified
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
ignore?: MatchPattern[] | null | undefined;
|
||||
|
||||
/**
|
||||
* This option is a synonym for "test"
|
||||
*/
|
||||
include?: MatchPattern | MatchPattern[] | undefined;
|
||||
|
||||
/**
|
||||
* A source map object that the output source map will be based on
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
inputSourceMap?: InputSourceMap | null | undefined;
|
||||
|
||||
/**
|
||||
* Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe)
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
minified?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Specify a custom name for module ids
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
moduleId?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules)
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
moduleIds?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions
|
||||
*
|
||||
* Default: `(sourceRoot)`
|
||||
*/
|
||||
moduleRoot?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* A glob, regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile
|
||||
* a non-matching file it's returned verbatim
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
only?: MatchPattern[] | null | undefined;
|
||||
|
||||
/**
|
||||
* Allows users to provide an array of options that will be merged into the current configuration one at a time.
|
||||
* This feature is best used alongside the "test"/"include"/"exclude" options to provide conditions for which an override should apply
|
||||
*/
|
||||
overrides?: TransformOptions[] | undefined;
|
||||
|
||||
/**
|
||||
* An object containing the options to be passed down to the babel parser, @babel/parser
|
||||
*
|
||||
* Default: `{}`
|
||||
*/
|
||||
parserOpts?: ParserOptions | null | undefined;
|
||||
|
||||
/**
|
||||
* List of plugins to load and use
|
||||
*
|
||||
* Default: `[]`
|
||||
*/
|
||||
plugins?: PluginItem[] | null | undefined;
|
||||
|
||||
/**
|
||||
* List of presets (a set of plugins) to load and use
|
||||
*
|
||||
* Default: `[]`
|
||||
*/
|
||||
presets?: PluginItem[] | null | undefined;
|
||||
|
||||
/**
|
||||
* Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE**: This will not retain the columns)
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
retainLines?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE**: This overrides the `comment` option when used
|
||||
*
|
||||
* Default: `null`
|
||||
*/
|
||||
shouldPrintComment?: ((commentContents: string) => boolean) | null | undefined;
|
||||
|
||||
/**
|
||||
* Set `sources[0]` on returned source map
|
||||
*
|
||||
* Default: `(filenameRelative)`
|
||||
*/
|
||||
sourceFileName?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `"both"`
|
||||
* then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!**
|
||||
*
|
||||
* Default: `false`
|
||||
*/
|
||||
sourceMaps?: boolean | "inline" | "both" | null | undefined;
|
||||
|
||||
/**
|
||||
* The root from which all sources are relative
|
||||
*
|
||||
* Default: `(moduleRoot)`
|
||||
*/
|
||||
sourceRoot?: string | null | undefined;
|
||||
|
||||
/**
|
||||
* Indicate the mode the code should be parsed in. Can be one of "script", "module", or "unambiguous". `"unambiguous"` will make Babel attempt to guess, based on the presence of ES6
|
||||
* `import` or `export` statements. Files with ES6 `import`s and `export`s are considered `"module"` and are otherwise `"script"`.
|
||||
*
|
||||
* Default: `("module")`
|
||||
*/
|
||||
sourceType?: "script" | "module" | "unambiguous" | null | undefined;
|
||||
|
||||
/**
|
||||
* If all patterns fail to match, the current configuration object is considered inactive and is ignored during config processing.
|
||||
*/
|
||||
test?: MatchPattern | MatchPattern[] | undefined;
|
||||
|
||||
/**
|
||||
* Describes the environments you support/target for your project.
|
||||
* This can either be a [browserslist-compatible](https://github.com/ai/browserslist) query (with [caveats](https://babeljs.io/docs/en/babel-preset-env#ineffective-browserslist-queries))
|
||||
*
|
||||
* Default: `{}`
|
||||
*/
|
||||
targets?:
|
||||
| string
|
||||
| string[]
|
||||
| {
|
||||
esmodules?: boolean;
|
||||
node?: Omit<string, "current"> | "current" | true;
|
||||
safari?: Omit<string, "tp"> | "tp";
|
||||
browsers?: string | string[];
|
||||
android?: string;
|
||||
chrome?: string;
|
||||
deno?: string;
|
||||
edge?: string;
|
||||
electron?: string;
|
||||
firefox?: string;
|
||||
ie?: string;
|
||||
ios?: string;
|
||||
opera?: string;
|
||||
rhino?: string;
|
||||
samsung?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* An optional callback that can be used to wrap visitor methods. **NOTE**: This is useful for things like introspection, and not really needed for implementing anything. Called as
|
||||
* `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`.
|
||||
*/
|
||||
wrapPluginVisitorMethod?:
|
||||
| ((
|
||||
pluginAlias: string,
|
||||
visitorType: "enter" | "exit",
|
||||
callback: (path: NodePath, state: any) => void,
|
||||
) => (path: NodePath, state: any) => void)
|
||||
| null
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface TransformCaller {
|
||||
// the only required property
|
||||
name: string;
|
||||
// e.g. set to true by `babel-loader` and false by `babel-jest`
|
||||
supportsStaticESM?: boolean | undefined;
|
||||
supportsDynamicImport?: boolean | undefined;
|
||||
supportsExportNamespaceFrom?: boolean | undefined;
|
||||
supportsTopLevelAwait?: boolean | undefined;
|
||||
// augment this with a "declare module '@babel/core' { ... }" if you need more keys
|
||||
}
|
||||
|
||||
export type FileResultCallback = (err: Error | null, result: BabelFileResult | null) => any;
|
||||
|
||||
export interface MatchPatternContext {
|
||||
envName: string;
|
||||
dirname: string;
|
||||
caller: TransformCaller | undefined;
|
||||
}
|
||||
export type MatchPattern = string | RegExp | ((filename: string | undefined, context: MatchPatternContext) => boolean);
|
||||
|
||||
/**
|
||||
* Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST.
|
||||
*/
|
||||
export function transform(code: string, callback: FileResultCallback): void;
|
||||
|
||||
/**
|
||||
* Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST.
|
||||
*/
|
||||
export function transform(code: string, opts: TransformOptions | undefined, callback: FileResultCallback): void;
|
||||
|
||||
/**
|
||||
* Here for backward-compatibility. Ideally use `transformSync` if you want a synchronous API.
|
||||
*/
|
||||
export function transform(code: string, opts?: TransformOptions): BabelFileResult | null;
|
||||
|
||||
/**
|
||||
* Transforms the passed in code. Returning an object with the generated code, source map, and AST.
|
||||
*/
|
||||
export function transformSync(code: string, opts?: TransformOptions): BabelFileResult | null;
|
||||
|
||||
/**
|
||||
* Transforms the passed in code. Calling a callback with an object with the generated code, source map, and AST.
|
||||
*/
|
||||
export function transformAsync(code: string, opts?: TransformOptions): Promise<BabelFileResult | null>;
|
||||
|
||||
/**
|
||||
* Asynchronously transforms the entire contents of a file.
|
||||
*/
|
||||
export function transformFile(filename: string, callback: FileResultCallback): void;
|
||||
|
||||
/**
|
||||
* Asynchronously transforms the entire contents of a file.
|
||||
*/
|
||||
export function transformFile(filename: string, opts: TransformOptions | undefined, callback: FileResultCallback): void;
|
||||
|
||||
/**
|
||||
* Synchronous version of `babel.transformFile`. Returns the transformed contents of the `filename`.
|
||||
*/
|
||||
export function transformFileSync(filename: string, opts?: TransformOptions): BabelFileResult | null;
|
||||
|
||||
/**
|
||||
* Asynchronously transforms the entire contents of a file.
|
||||
*/
|
||||
export function transformFileAsync(filename: string, opts?: TransformOptions): Promise<BabelFileResult | null>;
|
||||
|
||||
/**
|
||||
* Given an AST, transform it.
|
||||
*/
|
||||
export function transformFromAst(ast: Node, code: string | undefined, callback: FileResultCallback): void;
|
||||
|
||||
/**
|
||||
* Given an AST, transform it.
|
||||
*/
|
||||
export function transformFromAst(
|
||||
ast: Node,
|
||||
code: string | undefined,
|
||||
opts: TransformOptions | undefined,
|
||||
callback: FileResultCallback,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Here for backward-compatibility. Ideally use ".transformSync" if you want a synchronous API.
|
||||
*/
|
||||
export function transformFromAstSync(ast: Node, code?: string, opts?: TransformOptions): BabelFileResult | null;
|
||||
|
||||
/**
|
||||
* Given an AST, transform it.
|
||||
*/
|
||||
export function transformFromAstAsync(
|
||||
ast: Node,
|
||||
code?: string,
|
||||
opts?: TransformOptions,
|
||||
): Promise<BabelFileResult | null>;
|
||||
|
||||
// A babel plugin is a simple function which must return an object matching
|
||||
// the following interface. Babel will throw if it finds unknown properties.
|
||||
// The list of allowed plugin keys is here:
|
||||
// https://github.com/babel/babel/blob/4e50b2d9d9c376cee7a2cbf56553fe5b982ea53c/packages/babel-core/src/config/option-manager.js#L71
|
||||
export interface PluginObj<S = PluginPass> {
|
||||
name?: string | undefined;
|
||||
manipulateOptions?(opts: any, parserOpts: any): void;
|
||||
pre?(this: S, file: BabelFile): void;
|
||||
visitor: Visitor<S>;
|
||||
post?(this: S, file: BabelFile): void;
|
||||
inherits?: any;
|
||||
}
|
||||
|
||||
export interface BabelFile {
|
||||
ast: t.File;
|
||||
opts: TransformOptions;
|
||||
hub: Hub;
|
||||
metadata: object;
|
||||
path: NodePath<t.Program>;
|
||||
scope: Scope;
|
||||
inputMap: object | null;
|
||||
code: string;
|
||||
}
|
||||
|
||||
export interface PluginPass {
|
||||
file: BabelFile;
|
||||
key: string;
|
||||
opts: object;
|
||||
cwd: string;
|
||||
filename: string | undefined;
|
||||
get(key: unknown): any;
|
||||
set(key: unknown, value: unknown): void;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface BabelFileResult {
|
||||
ast?: t.File | null | undefined;
|
||||
code?: string | null | undefined;
|
||||
ignored?: boolean | undefined;
|
||||
map?:
|
||||
| {
|
||||
version: number;
|
||||
sources: string[];
|
||||
names: string[];
|
||||
sourceRoot?: string | undefined;
|
||||
sourcesContent?: string[] | undefined;
|
||||
mappings: string;
|
||||
file: string;
|
||||
}
|
||||
| null
|
||||
| undefined;
|
||||
metadata?: BabelFileMetadata | undefined;
|
||||
}
|
||||
|
||||
export interface BabelFileMetadata {
|
||||
usedHelpers: string[];
|
||||
marked: Array<{
|
||||
type: string;
|
||||
message: string;
|
||||
loc: object;
|
||||
}>;
|
||||
modules: BabelFileModulesMetadata;
|
||||
}
|
||||
|
||||
export interface BabelFileModulesMetadata {
|
||||
imports: object[];
|
||||
exports: {
|
||||
exported: object[];
|
||||
specifiers: object[];
|
||||
};
|
||||
}
|
||||
|
||||
export type FileParseCallback = (err: Error | null, result: ParseResult | null) => any;
|
||||
|
||||
/**
|
||||
* Given some code, parse it using Babel's standard behavior.
|
||||
* Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled.
|
||||
*/
|
||||
export function parse(code: string, callback: FileParseCallback): void;
|
||||
|
||||
/**
|
||||
* Given some code, parse it using Babel's standard behavior.
|
||||
* Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled.
|
||||
*/
|
||||
export function parse(code: string, options: TransformOptions | undefined, callback: FileParseCallback): void;
|
||||
|
||||
/**
|
||||
* Given some code, parse it using Babel's standard behavior.
|
||||
* Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled.
|
||||
*/
|
||||
export function parse(code: string, options?: TransformOptions): ParseResult | null;
|
||||
|
||||
/**
|
||||
* Given some code, parse it using Babel's standard behavior.
|
||||
* Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled.
|
||||
*/
|
||||
export function parseSync(code: string, options?: TransformOptions): ParseResult | null;
|
||||
|
||||
/**
|
||||
* Given some code, parse it using Babel's standard behavior.
|
||||
* Referenced presets and plugins will be loaded such that optional syntax plugins are automatically enabled.
|
||||
*/
|
||||
export function parseAsync(code: string, options?: TransformOptions): Promise<ParseResult | null>;
|
||||
|
||||
/**
|
||||
* Resolve Babel's options fully, resulting in an options object where:
|
||||
*
|
||||
* * opts.plugins is a full list of Plugin instances.
|
||||
* * opts.presets is empty and all presets are flattened into opts.
|
||||
* * It can be safely passed back to Babel. Fields like babelrc have been set to false so that later calls to Babel
|
||||
* will not make a second attempt to load config files.
|
||||
*
|
||||
* Plugin instances aren't meant to be manipulated directly, but often callers will serialize this opts to JSON to
|
||||
* use it as a cache key representing the options Babel has received. Caching on this isn't 100% guaranteed to
|
||||
* invalidate properly, but it is the best we have at the moment.
|
||||
*/
|
||||
export function loadOptions(options?: TransformOptions): object | null;
|
||||
|
||||
/**
|
||||
* To allow systems to easily manipulate and validate a user's config, this function resolves the plugins and
|
||||
* presets and proceeds no further. The expectation is that callers will take the config's .options, manipulate it
|
||||
* as then see fit and pass it back to Babel again.
|
||||
*
|
||||
* * `babelrc: string | void` - The path of the `.babelrc` file, if there was one.
|
||||
* * `babelignore: string | void` - The path of the `.babelignore` file, if there was one.
|
||||
* * `options: ValidatedOptions` - The partially resolved options, which can be manipulated and passed back
|
||||
* to Babel again.
|
||||
* * `plugins: Array<ConfigItem>` - See below.
|
||||
* * `presets: Array<ConfigItem>` - See below.
|
||||
* * It can be safely passed back to Babel. Fields like `babelrc` have been set to false so that later calls to
|
||||
* Babel will not make a second attempt to load config files.
|
||||
*
|
||||
* `ConfigItem` instances expose properties to introspect the values, but each item should be treated as
|
||||
* immutable. If changes are desired, the item should be removed from the list and replaced with either a normal
|
||||
* Babel config value, or with a replacement item created by `babel.createConfigItem`. See that function for
|
||||
* information about `ConfigItem` fields.
|
||||
*/
|
||||
export function loadPartialConfig(options?: TransformOptions): Readonly<PartialConfig> | null;
|
||||
export function loadPartialConfigAsync(options?: TransformOptions): Promise<Readonly<PartialConfig> | null>;
|
||||
|
||||
export interface PartialConfig {
|
||||
options: TransformOptions;
|
||||
babelrc?: string | undefined;
|
||||
babelignore?: string | undefined;
|
||||
config?: string | undefined;
|
||||
hasFilesystemConfig: () => boolean;
|
||||
}
|
||||
|
||||
export interface ConfigItem {
|
||||
/**
|
||||
* The name that the user gave the plugin instance, e.g. `plugins: [ ['env', {}, 'my-env'] ]`
|
||||
*/
|
||||
name?: string | undefined;
|
||||
|
||||
/**
|
||||
* The resolved value of the plugin.
|
||||
*/
|
||||
value: object | ((...args: any[]) => any);
|
||||
|
||||
/**
|
||||
* The options object passed to the plugin.
|
||||
*/
|
||||
options?: object | false | undefined;
|
||||
|
||||
/**
|
||||
* The path that the options are relative to.
|
||||
*/
|
||||
dirname: string;
|
||||
|
||||
/**
|
||||
* Information about the plugin's file, if Babel knows it.
|
||||
* *
|
||||
*/
|
||||
file?:
|
||||
| {
|
||||
/**
|
||||
* The file that the user requested, e.g. `"@babel/env"`
|
||||
*/
|
||||
request: string;
|
||||
|
||||
/**
|
||||
* The full path of the resolved file, e.g. `"/tmp/node_modules/@babel/preset-env/lib/index.js"`
|
||||
*/
|
||||
resolved: string;
|
||||
}
|
||||
| null
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export type PluginOptions = object | undefined | false;
|
||||
|
||||
export type PluginTarget = string | object | ((...args: any[]) => any);
|
||||
|
||||
export type PluginItem =
|
||||
| ConfigItem
|
||||
| PluginObj<any>
|
||||
| PluginTarget
|
||||
| [PluginTarget, PluginOptions]
|
||||
| [PluginTarget, PluginOptions, string | undefined];
|
||||
|
||||
export function resolvePlugin(name: string, dirname: string): string | null;
|
||||
export function resolvePreset(name: string, dirname: string): string | null;
|
||||
|
||||
export interface CreateConfigItemOptions {
|
||||
dirname?: string | undefined;
|
||||
type?: "preset" | "plugin" | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows build tooling to create and cache config items up front. If this function is called multiple times for a
|
||||
* given plugin, Babel will call the plugin's function itself multiple times. If you have a clear set of expected
|
||||
* plugins and presets to inject, pre-constructing the config items would be recommended.
|
||||
*/
|
||||
export function createConfigItem(
|
||||
value: PluginTarget | [PluginTarget, PluginOptions] | [PluginTarget, PluginOptions, string | undefined],
|
||||
options?: CreateConfigItemOptions,
|
||||
): ConfigItem;
|
||||
|
||||
// NOTE: the documentation says the ConfigAPI also exposes @babel/core's exports, but it actually doesn't
|
||||
/**
|
||||
* @see https://babeljs.io/docs/en/next/config-files#config-function-api
|
||||
*/
|
||||
export interface ConfigAPI {
|
||||
/**
|
||||
* The version string for the Babel version that is loading the config file.
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/next/config-files#apiversion
|
||||
*/
|
||||
version: string;
|
||||
/**
|
||||
* @see https://babeljs.io/docs/en/next/config-files#apicache
|
||||
*/
|
||||
cache: SimpleCacheConfigurator;
|
||||
/**
|
||||
* @see https://babeljs.io/docs/en/next/config-files#apienv
|
||||
*/
|
||||
env: EnvFunction;
|
||||
// undocumented; currently hardcoded to return 'false'
|
||||
// async(): boolean
|
||||
/**
|
||||
* This API is used as a way to access the `caller` data that has been passed to Babel.
|
||||
* Since many instances of Babel may be running in the same process with different `caller` values,
|
||||
* this API is designed to automatically configure `api.cache`, the same way `api.env()` does.
|
||||
*
|
||||
* The `caller` value is available as the first parameter of the callback function.
|
||||
* It is best used with something like this to toggle configuration behavior
|
||||
* based on a specific environment:
|
||||
*
|
||||
* @example
|
||||
* function isBabelRegister(caller?: { name: string }) {
|
||||
* return !!(caller && caller.name === "@babel/register")
|
||||
* }
|
||||
* api.caller(isBabelRegister)
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/next/config-files#apicallercb
|
||||
*/
|
||||
caller<T extends SimpleCacheKey>(callerCallback: (caller: TransformOptions["caller"]) => T): T;
|
||||
/**
|
||||
* While `api.version` can be useful in general, it's sometimes nice to just declare your version.
|
||||
* This API exposes a simple way to do that with:
|
||||
*
|
||||
* @example
|
||||
* api.assertVersion(7) // major version only
|
||||
* api.assertVersion("^7.2")
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/next/config-files#apiassertversionrange
|
||||
*/
|
||||
assertVersion(versionRange: number | string): boolean;
|
||||
// NOTE: this is an undocumented reexport from "@babel/parser" but it's missing from its types
|
||||
// tokTypes: typeof tokTypes
|
||||
}
|
||||
|
||||
/**
|
||||
* JS configs are great because they can compute a config on the fly,
|
||||
* but the downside there is that it makes caching harder.
|
||||
* Babel wants to avoid re-executing the config function every time a file is compiled,
|
||||
* because then it would also need to re-execute any plugin and preset functions
|
||||
* referenced in that config.
|
||||
*
|
||||
* To avoid this, Babel expects users of config functions to tell it how to manage caching
|
||||
* within a config file.
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/next/config-files#apicache
|
||||
*/
|
||||
export interface SimpleCacheConfigurator {
|
||||
// there is an undocumented call signature that is a shorthand for forever()/never()/using().
|
||||
// (ever: boolean): void
|
||||
// <T extends SimpleCacheKey>(callback: CacheCallback<T>): T
|
||||
/**
|
||||
* Permacache the computed config and never call the function again.
|
||||
*/
|
||||
forever(): void;
|
||||
/**
|
||||
* Do not cache this config, and re-execute the function every time.
|
||||
*/
|
||||
never(): void;
|
||||
/**
|
||||
* Any time the using callback returns a value other than the one that was expected,
|
||||
* the overall config function will be called again and a new entry will be added to the cache.
|
||||
*
|
||||
* @example
|
||||
* api.cache.using(() => process.env.NODE_ENV)
|
||||
*/
|
||||
using<T extends SimpleCacheKey>(callback: SimpleCacheCallback<T>): T;
|
||||
/**
|
||||
* Any time the using callback returns a value other than the one that was expected,
|
||||
* the overall config function will be called again and all entries in the cache will
|
||||
* be replaced with the result.
|
||||
*
|
||||
* @example
|
||||
* api.cache.invalidate(() => process.env.NODE_ENV)
|
||||
*/
|
||||
invalidate<T extends SimpleCacheKey>(callback: SimpleCacheCallback<T>): T;
|
||||
}
|
||||
|
||||
// https://github.com/babel/babel/blob/v7.3.3/packages/babel-core/src/config/caching.js#L231
|
||||
export type SimpleCacheKey = string | boolean | number | null | undefined;
|
||||
export type SimpleCacheCallback<T extends SimpleCacheKey> = () => T;
|
||||
|
||||
/**
|
||||
* Since `NODE_ENV` is a fairly common way to toggle behavior, Babel also includes an API function
|
||||
* meant specifically for that. This API is used as a quick way to check the `"envName"` that Babel
|
||||
* was loaded with, which takes `NODE_ENV` into account if no other overriding environment is set.
|
||||
*
|
||||
* @see https://babeljs.io/docs/en/next/config-files#apienv
|
||||
*/
|
||||
export interface EnvFunction {
|
||||
/**
|
||||
* @returns the current `envName` string
|
||||
*/
|
||||
(): string;
|
||||
/**
|
||||
* @returns `true` if the `envName` is `===` any of the given strings
|
||||
*/
|
||||
(envName: string | readonly string[]): boolean;
|
||||
// the official documentation is misleading for this one...
|
||||
// this just passes the callback to `cache.using` but with an additional argument.
|
||||
// it returns its result instead of necessarily returning a boolean.
|
||||
<T extends SimpleCacheKey>(envCallback: (envName: NonNullable<TransformOptions["envName"]>) => T): T;
|
||||
}
|
||||
|
||||
export type ConfigFunction = (api: ConfigAPI) => TransformOptions;
|
||||
|
||||
export as namespace babel;
|
||||
51
node_modules/@types/babel__core/package.json
generated
vendored
Normal file
51
node_modules/@types/babel__core/package.json
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "@types/babel__core",
|
||||
"version": "7.20.5",
|
||||
"description": "TypeScript definitions for @babel/core",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__core",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Troy Gerwien",
|
||||
"githubUsername": "yortus",
|
||||
"url": "https://github.com/yortus"
|
||||
},
|
||||
{
|
||||
"name": "Marvin Hagemeister",
|
||||
"githubUsername": "marvinhagemeister",
|
||||
"url": "https://github.com/marvinhagemeister"
|
||||
},
|
||||
{
|
||||
"name": "Melvin Groenhoff",
|
||||
"githubUsername": "mgroenhoff",
|
||||
"url": "https://github.com/mgroenhoff"
|
||||
},
|
||||
{
|
||||
"name": "Jessica Franco",
|
||||
"githubUsername": "Jessidhia",
|
||||
"url": "https://github.com/Jessidhia"
|
||||
},
|
||||
{
|
||||
"name": "Ifiok Jr.",
|
||||
"githubUsername": "ifiokjr",
|
||||
"url": "https://github.com/ifiokjr"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/babel__core"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.20.7",
|
||||
"@babel/types": "^7.20.7",
|
||||
"@types/babel__generator": "*",
|
||||
"@types/babel__template": "*",
|
||||
"@types/babel__traverse": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "3ece429b02ff9f70503a5644f2b303b04d10e6da7940c91a9eff5e52f2c76b91",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
21
node_modules/@types/babel__generator/LICENSE
generated
vendored
Normal file
21
node_modules/@types/babel__generator/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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/babel__generator/README.md
generated
vendored
Normal file
15
node_modules/@types/babel__generator/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/babel__generator`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for @babel/generator (https://github.com/babel/babel/tree/master/packages/babel-generator).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 03 Apr 2025 16:02:41 GMT
|
||||
* Dependencies: [@babel/types](https://npmjs.com/package/@babel/types)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Troy Gerwien](https://github.com/yortus), [Melvin Groenhoff](https://github.com/mgroenhoff), [Cameron Yan](https://github.com/khell), and [Lyanbin](https://github.com/Lyanbin).
|
||||
210
node_modules/@types/babel__generator/index.d.ts
generated
vendored
Normal file
210
node_modules/@types/babel__generator/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,210 @@
|
||||
import * as t from "@babel/types";
|
||||
|
||||
export interface GeneratorOptions {
|
||||
/**
|
||||
* Optional string to add as a block comment at the start of the output file.
|
||||
*/
|
||||
auxiliaryCommentBefore?: string | undefined;
|
||||
|
||||
/**
|
||||
* Optional string to add as a block comment at the end of the output file.
|
||||
*/
|
||||
auxiliaryCommentAfter?: string | undefined;
|
||||
|
||||
/**
|
||||
* Function that takes a comment (as a string) and returns true if the comment should be included in the output.
|
||||
* By default, comments are included if `opts.comments` is `true` or if `opts.minifed` is `false` and the comment
|
||||
* contains `@preserve` or `@license`.
|
||||
*/
|
||||
shouldPrintComment?(comment: string): boolean;
|
||||
|
||||
/**
|
||||
* Attempt to use the same line numbers in the output code as in the source code (helps preserve stack traces).
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
retainLines?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Retain parens around function expressions (could be used to change engine parsing behavior)
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
retainFunctionParens?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Should comments be included in output? Defaults to `true`.
|
||||
*/
|
||||
comments?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Set to true to avoid adding whitespace for formatting. Defaults to the value of `opts.minified`.
|
||||
*/
|
||||
compact?: boolean | "auto" | undefined;
|
||||
|
||||
/**
|
||||
* Should the output be minified. Defaults to `false`.
|
||||
*/
|
||||
minified?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Set to true to reduce whitespace (but not as much as opts.compact). Defaults to `false`.
|
||||
*/
|
||||
concise?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Used in warning messages
|
||||
*/
|
||||
filename?: string | undefined;
|
||||
|
||||
/**
|
||||
* Enable generating source maps. Defaults to `false`.
|
||||
*/
|
||||
sourceMaps?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* A root for all relative URLs in the source map.
|
||||
*/
|
||||
sourceRoot?: string | undefined;
|
||||
|
||||
/**
|
||||
* The filename for the source code (i.e. the code in the `code` argument).
|
||||
* This will only be used if `code` is a string.
|
||||
*/
|
||||
sourceFileName?: string | undefined;
|
||||
|
||||
/**
|
||||
* Set to true to run jsesc with "json": true to print "\u00A9" vs. "©";
|
||||
*/
|
||||
jsonCompatibleStrings?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Set to true to enable support for experimental decorators syntax before module exports.
|
||||
* Defaults to `false`.
|
||||
*/
|
||||
decoratorsBeforeExport?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The import attributes/assertions syntax to use.
|
||||
* When not specified, @babel/generator will try to match the style in the input code based on the AST shape.
|
||||
*/
|
||||
importAttributesKeyword?: "with" | "assert" | "with-legacy";
|
||||
|
||||
/**
|
||||
* Options for outputting jsesc representation.
|
||||
*/
|
||||
jsescOption?: {
|
||||
/**
|
||||
* The default value for the quotes option is 'single'. This means that any occurrences of ' in the input
|
||||
* string are escaped as \', so that the output can be used in a string literal wrapped in single quotes.
|
||||
*/
|
||||
quotes?: "single" | "double" | "backtick" | undefined;
|
||||
|
||||
/**
|
||||
* The default value for the numbers option is 'decimal'. This means that any numeric values are represented
|
||||
* using decimal integer literals. Other valid options are binary, octal, and hexadecimal, which result in
|
||||
* binary integer literals, octal integer literals, and hexadecimal integer literals, respectively.
|
||||
*/
|
||||
numbers?: "binary" | "octal" | "decimal" | "hexadecimal" | undefined;
|
||||
|
||||
/**
|
||||
* The wrap option takes a boolean value (true or false), and defaults to false (disabled). When enabled, the
|
||||
* output is a valid JavaScript string literal wrapped in quotes. The type of quotes can be specified through
|
||||
* the quotes setting.
|
||||
*/
|
||||
wrap?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The es6 option takes a boolean value (true or false), and defaults to false (disabled). When enabled, any
|
||||
* astral Unicode symbols in the input are escaped using ECMAScript 6 Unicode code point escape sequences
|
||||
* instead of using separate escape sequences for each surrogate half. If backwards compatibility with ES5
|
||||
* environments is a concern, don’t enable this setting. If the json setting is enabled, the value for the es6
|
||||
* setting is ignored (as if it was false).
|
||||
*/
|
||||
es6?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The escapeEverything option takes a boolean value (true or false), and defaults to false (disabled). When
|
||||
* enabled, all the symbols in the output are escaped — even printable ASCII symbols.
|
||||
*/
|
||||
escapeEverything?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The minimal option takes a boolean value (true or false), and defaults to false (disabled). When enabled,
|
||||
* only a limited set of symbols in the output are escaped: \0, \b, \t, \n, \f, \r, \\, \u2028, \u2029.
|
||||
*/
|
||||
minimal?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The isScriptContext option takes a boolean value (true or false), and defaults to false (disabled). When
|
||||
* enabled, occurrences of </script and </style in the output are escaped as <\/script and <\/style, and <!--
|
||||
* is escaped as \x3C!-- (or \u003C!-- when the json option is enabled). This setting is useful when jsesc’s
|
||||
* output ends up as part of a <script> or <style> element in an HTML document.
|
||||
*/
|
||||
isScriptContext?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The compact option takes a boolean value (true or false), and defaults to true (enabled). When enabled,
|
||||
* the output for arrays and objects is as compact as possible; it’s not formatted nicely.
|
||||
*/
|
||||
compact?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The indent option takes a string value, and defaults to '\t'. When the compact setting is enabled (true),
|
||||
* the value of the indent option is used to format the output for arrays and objects.
|
||||
*/
|
||||
indent?: string | undefined;
|
||||
|
||||
/**
|
||||
* The indentLevel option takes a numeric value, and defaults to 0. It represents the current indentation level,
|
||||
* i.e. the number of times the value of the indent option is repeated.
|
||||
*/
|
||||
indentLevel?: number | undefined;
|
||||
|
||||
/**
|
||||
* The json option takes a boolean value (true or false), and defaults to false (disabled). When enabled, the
|
||||
* output is valid JSON. Hexadecimal character escape sequences and the \v or \0 escape sequences are not used.
|
||||
* Setting json: true implies quotes: 'double', wrap: true, es6: false, although these values can still be
|
||||
* overridden if needed — but in such cases, the output won’t be valid JSON anymore.
|
||||
*/
|
||||
json?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* The lowercaseHex option takes a boolean value (true or false), and defaults to false (disabled). When enabled,
|
||||
* any alphabetical hexadecimal digits in escape sequences as well as any hexadecimal integer literals (see the
|
||||
* numbers option) in the output are in lowercase.
|
||||
*/
|
||||
lowercaseHex?: boolean | undefined;
|
||||
} | undefined;
|
||||
}
|
||||
|
||||
export class CodeGenerator {
|
||||
constructor(ast: t.Node, opts?: GeneratorOptions, code?: string);
|
||||
generate(): GeneratorResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns an AST into code, maintaining sourcemaps, user preferences, and valid output.
|
||||
* @param ast - the abstract syntax tree from which to generate output code.
|
||||
* @param opts - used for specifying options for code generation.
|
||||
* @param code - the original source code, used for source maps.
|
||||
* @returns - an object containing the output code and source map.
|
||||
*/
|
||||
export function generate(
|
||||
ast: t.Node,
|
||||
opts?: GeneratorOptions,
|
||||
code?: string | { [filename: string]: string },
|
||||
): GeneratorResult;
|
||||
|
||||
export default generate;
|
||||
|
||||
export interface GeneratorResult {
|
||||
code: string;
|
||||
map: {
|
||||
version: number;
|
||||
sources: string[];
|
||||
names: string[];
|
||||
sourceRoot?: string | undefined;
|
||||
sourcesContent?: string[] | undefined;
|
||||
mappings: string;
|
||||
file: string;
|
||||
} | null;
|
||||
}
|
||||
43
node_modules/@types/babel__generator/package.json
generated
vendored
Normal file
43
node_modules/@types/babel__generator/package.json
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@types/babel__generator",
|
||||
"version": "7.27.0",
|
||||
"description": "TypeScript definitions for @babel/generator",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__generator",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Troy Gerwien",
|
||||
"githubUsername": "yortus",
|
||||
"url": "https://github.com/yortus"
|
||||
},
|
||||
{
|
||||
"name": "Melvin Groenhoff",
|
||||
"githubUsername": "mgroenhoff",
|
||||
"url": "https://github.com/mgroenhoff"
|
||||
},
|
||||
{
|
||||
"name": "Cameron Yan",
|
||||
"githubUsername": "khell",
|
||||
"url": "https://github.com/khell"
|
||||
},
|
||||
{
|
||||
"name": "Lyanbin",
|
||||
"githubUsername": "Lyanbin",
|
||||
"url": "https://github.com/Lyanbin"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/babel__generator"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.0.0"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "b5c7deac65dbd6ab9b313d1d71c86afe4383b881dcb4e3b3ac51dab07b8f95fb",
|
||||
"typeScriptVersion": "5.1"
|
||||
}
|
||||
21
node_modules/@types/babel__template/LICENSE
generated
vendored
Normal file
21
node_modules/@types/babel__template/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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/babel__template/README.md
generated
vendored
Normal file
15
node_modules/@types/babel__template/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/babel__template`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for @babel/template (https://github.com/babel/babel/tree/master/packages/babel-template).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__template.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 06 Nov 2023 22:41:04 GMT
|
||||
* Dependencies: [@babel/parser](https://npmjs.com/package/@babel/parser), [@babel/types](https://npmjs.com/package/@babel/types)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Melvin Groenhoff](https://github.com/mgroenhoff), and [ExE Boss](https://github.com/ExE-Boss).
|
||||
92
node_modules/@types/babel__template/index.d.ts
generated
vendored
Normal file
92
node_modules/@types/babel__template/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import { ParserOptions } from "@babel/parser";
|
||||
import { Expression, Program, Statement } from "@babel/types";
|
||||
|
||||
export interface TemplateBuilderOptions extends ParserOptions {
|
||||
/**
|
||||
* A set of placeholder names to automatically accept.
|
||||
* Items in this list do not need to match `placeholderPattern`.
|
||||
*
|
||||
* This option cannot be used when using `%%foo%%` style placeholders.
|
||||
*/
|
||||
placeholderWhitelist?: Set<string> | null | undefined;
|
||||
|
||||
/**
|
||||
* A pattern to search for when looking for `Identifier` and `StringLiteral`
|
||||
* nodes that should be considered as placeholders.
|
||||
*
|
||||
* `false` will disable placeholder searching placeholders, leaving only
|
||||
* the `placeholderWhitelist` value to find replacements.
|
||||
*
|
||||
* This option cannot be used when using `%%foo%%` style placeholders.
|
||||
*
|
||||
* @default /^[_$A-Z0-9]+$/
|
||||
*/
|
||||
placeholderPattern?: RegExp | false | null | undefined;
|
||||
|
||||
/**
|
||||
* Set this to `true` to preserve comments from the template string
|
||||
* into the resulting AST, or `false` to automatically discard comments.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
preserveComments?: boolean | null | undefined;
|
||||
|
||||
/**
|
||||
* Set to `true` to use `%%foo%%` style placeholders, `false` to use legacy placeholders
|
||||
* described by `placeholderPattern` or `placeholderWhitelist`.
|
||||
*
|
||||
* When it is not set, it behaves as `true` if there are syntactic placeholders, otherwise as `false`.
|
||||
*
|
||||
* @since 7.4.0
|
||||
*/
|
||||
syntacticPlaceholders?: boolean | null | undefined;
|
||||
}
|
||||
|
||||
export interface TemplateBuilder<T> {
|
||||
/**
|
||||
* Build a new builder, merging the given options with the previous ones.
|
||||
*/
|
||||
(opts: TemplateBuilderOptions): TemplateBuilder<T>;
|
||||
|
||||
/**
|
||||
* Building from a string produces an AST builder function by default.
|
||||
*/
|
||||
(code: string, opts?: TemplateBuilderOptions): (arg?: PublicReplacements) => T;
|
||||
|
||||
/**
|
||||
* Building from a template literal produces an AST builder function by default.
|
||||
*/
|
||||
(tpl: TemplateStringsArray, ...args: unknown[]): (arg?: PublicReplacements) => T;
|
||||
|
||||
/**
|
||||
* Allow users to explicitly create templates that produce ASTs,
|
||||
* skipping the need for an intermediate function.
|
||||
*
|
||||
* Does not allow `%%foo%%` style placeholders.
|
||||
*/
|
||||
ast: {
|
||||
(tpl: string, opts?: TemplateBuilderOptions): T;
|
||||
(tpl: TemplateStringsArray, ...args: unknown[]): T;
|
||||
};
|
||||
}
|
||||
|
||||
export type PublicReplacements = { [index: string]: unknown } | unknown[];
|
||||
|
||||
export const smart: TemplateBuilder<Statement | Statement[]>;
|
||||
export const statement: TemplateBuilder<Statement>;
|
||||
export const statements: TemplateBuilder<Statement[]>;
|
||||
export const expression: TemplateBuilder<Expression>;
|
||||
export const program: TemplateBuilder<Program>;
|
||||
|
||||
type DefaultTemplateBuilder = typeof smart & {
|
||||
smart: typeof smart;
|
||||
statement: typeof statement;
|
||||
statements: typeof statements;
|
||||
expression: typeof expression;
|
||||
program: typeof program;
|
||||
ast: typeof smart.ast;
|
||||
};
|
||||
|
||||
declare const templateBuilder: DefaultTemplateBuilder;
|
||||
|
||||
export default templateBuilder;
|
||||
43
node_modules/@types/babel__template/package.json
generated
vendored
Normal file
43
node_modules/@types/babel__template/package.json
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@types/babel__template",
|
||||
"version": "7.4.4",
|
||||
"description": "TypeScript definitions for @babel/template",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__template",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Troy Gerwien",
|
||||
"githubUsername": "yortus",
|
||||
"url": "https://github.com/yortus"
|
||||
},
|
||||
{
|
||||
"name": "Marvin Hagemeister",
|
||||
"githubUsername": "marvinhagemeister",
|
||||
"url": "https://github.com/marvinhagemeister"
|
||||
},
|
||||
{
|
||||
"name": "Melvin Groenhoff",
|
||||
"githubUsername": "mgroenhoff",
|
||||
"url": "https://github.com/mgroenhoff"
|
||||
},
|
||||
{
|
||||
"name": "ExE Boss",
|
||||
"githubUsername": "ExE-Boss",
|
||||
"url": "https://github.com/ExE-Boss"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/babel__template"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.1.0",
|
||||
"@babel/types": "^7.0.0"
|
||||
},
|
||||
"typesPublisherContentHash": "5730d754b4d1fcd41676b093f9e32b340c749c4d37b126dfa312e394467e86c6",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
||||
21
node_modules/@types/babel__traverse/LICENSE
generated
vendored
Normal file
21
node_modules/@types/babel__traverse/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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/babel__traverse/README.md
generated
vendored
Normal file
15
node_modules/@types/babel__traverse/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/babel__traverse`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for @babel/traverse (https://github.com/babel/babel/tree/main/packages/babel-traverse).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 31 Jul 2025 21:02:30 GMT
|
||||
* Dependencies: [@babel/types](https://npmjs.com/package/@babel/types)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Ryan Petrich](https://github.com/rpetrich), [Melvin Groenhoff](https://github.com/mgroenhoff), [Dean L.](https://github.com/dlgrit), [Ifiok Jr.](https://github.com/ifiokjr), [ExE Boss](https://github.com/ExE-Boss), and [Daniel Tschinder](https://github.com/danez).
|
||||
1506
node_modules/@types/babel__traverse/index.d.ts
generated
vendored
Normal file
1506
node_modules/@types/babel__traverse/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
63
node_modules/@types/babel__traverse/package.json
generated
vendored
Normal file
63
node_modules/@types/babel__traverse/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "@types/babel__traverse",
|
||||
"version": "7.28.0",
|
||||
"description": "TypeScript definitions for @babel/traverse",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Troy Gerwien",
|
||||
"githubUsername": "yortus",
|
||||
"url": "https://github.com/yortus"
|
||||
},
|
||||
{
|
||||
"name": "Marvin Hagemeister",
|
||||
"githubUsername": "marvinhagemeister",
|
||||
"url": "https://github.com/marvinhagemeister"
|
||||
},
|
||||
{
|
||||
"name": "Ryan Petrich",
|
||||
"githubUsername": "rpetrich",
|
||||
"url": "https://github.com/rpetrich"
|
||||
},
|
||||
{
|
||||
"name": "Melvin Groenhoff",
|
||||
"githubUsername": "mgroenhoff",
|
||||
"url": "https://github.com/mgroenhoff"
|
||||
},
|
||||
{
|
||||
"name": "Dean L.",
|
||||
"githubUsername": "dlgrit",
|
||||
"url": "https://github.com/dlgrit"
|
||||
},
|
||||
{
|
||||
"name": "Ifiok Jr.",
|
||||
"githubUsername": "ifiokjr",
|
||||
"url": "https://github.com/ifiokjr"
|
||||
},
|
||||
{
|
||||
"name": "ExE Boss",
|
||||
"githubUsername": "ExE-Boss",
|
||||
"url": "https://github.com/ExE-Boss"
|
||||
},
|
||||
{
|
||||
"name": "Daniel Tschinder",
|
||||
"githubUsername": "danez",
|
||||
"url": "https://github.com/danez"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/babel__traverse"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.28.2"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "f8bf439253873b2b30a22c425df086f130320cf70d832d84412e82a51e410680",
|
||||
"typeScriptVersion": "5.1"
|
||||
}
|
||||
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
21
node_modules/@types/estree/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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/estree/README.md
generated
vendored
Normal file
15
node_modules/@types/estree/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/estree`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for estree (https://github.com/estree/estree).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 06 Jun 2025 00:04:33 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [RReverser](https://github.com/RReverser).
|
||||
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
167
node_modules/@types/estree/flow.d.ts
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
declare namespace ESTree {
|
||||
interface FlowTypeAnnotation extends Node {}
|
||||
|
||||
interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
|
||||
|
||||
interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
|
||||
|
||||
interface FlowDeclaration extends Declaration {}
|
||||
|
||||
interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ArrayTypeAnnotation extends FlowTypeAnnotation {
|
||||
elementType: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface ClassImplements extends Node {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface ClassProperty {
|
||||
key: Expression;
|
||||
value?: Expression | null;
|
||||
typeAnnotation?: TypeAnnotation | null;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface DeclareClass extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
body: ObjectTypeAnnotation;
|
||||
extends: InterfaceExtends[];
|
||||
}
|
||||
|
||||
interface DeclareFunction extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface DeclareModule extends FlowDeclaration {
|
||||
id: Literal | Identifier;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
interface DeclareVariable extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
|
||||
params: FunctionTypeParam[];
|
||||
returnType: FlowTypeAnnotation;
|
||||
rest?: FunctionTypeParam | null;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
}
|
||||
|
||||
interface FunctionTypeParam {
|
||||
name: Identifier;
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
interface GenericTypeAnnotation extends FlowTypeAnnotation {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceExtends extends Node {
|
||||
id: Identifier | QualifiedTypeIdentifier;
|
||||
typeParameters?: TypeParameterInstantiation | null;
|
||||
}
|
||||
|
||||
interface InterfaceDeclaration extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
extends: InterfaceExtends[];
|
||||
body: ObjectTypeAnnotation;
|
||||
}
|
||||
|
||||
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface NullableTypeAnnotation extends FlowTypeAnnotation {
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
||||
|
||||
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
|
||||
interface TupleTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
|
||||
argument: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAlias extends FlowDeclaration {
|
||||
id: Identifier;
|
||||
typeParameters?: TypeParameterDeclaration | null;
|
||||
right: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeAnnotation extends Node {
|
||||
typeAnnotation: FlowTypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeCastExpression extends Expression {
|
||||
expression: Expression;
|
||||
typeAnnotation: TypeAnnotation;
|
||||
}
|
||||
|
||||
interface TypeParameterDeclaration extends Node {
|
||||
params: Identifier[];
|
||||
}
|
||||
|
||||
interface TypeParameterInstantiation extends Node {
|
||||
params: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
|
||||
properties: ObjectTypeProperty[];
|
||||
indexers: ObjectTypeIndexer[];
|
||||
callProperties: ObjectTypeCallProperty[];
|
||||
}
|
||||
|
||||
interface ObjectTypeCallProperty extends Node {
|
||||
value: FunctionTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeIndexer extends Node {
|
||||
id: Identifier;
|
||||
key: FlowTypeAnnotation;
|
||||
value: FlowTypeAnnotation;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface ObjectTypeProperty extends Node {
|
||||
key: Expression;
|
||||
value: FlowTypeAnnotation;
|
||||
optional: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
interface QualifiedTypeIdentifier extends Node {
|
||||
qualification: Identifier | QualifiedTypeIdentifier;
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
interface UnionTypeAnnotation extends FlowTypeAnnotation {
|
||||
types: FlowTypeAnnotation[];
|
||||
}
|
||||
|
||||
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
|
||||
}
|
||||
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
694
node_modules/@types/estree/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,694 @@
|
||||
// This definition file follows a somewhat unusual format. ESTree allows
|
||||
// runtime type checks based on the `type` parameter. In order to explain this
|
||||
// to typescript we want to use discriminated union types:
|
||||
// https://github.com/Microsoft/TypeScript/pull/9163
|
||||
//
|
||||
// For ESTree this is a bit tricky because the high level interfaces like
|
||||
// Node or Function are pulling double duty. We want to pass common fields down
|
||||
// to the interfaces that extend them (like Identifier or
|
||||
// ArrowFunctionExpression), but you can't extend a type union or enforce
|
||||
// common fields on them. So we've split the high level interfaces into two
|
||||
// types, a base type which passes down inherited fields, and a type union of
|
||||
// all types which extend the base type. Only the type union is exported, and
|
||||
// the union is how other types refer to the collection of inheriting types.
|
||||
//
|
||||
// This makes the definitions file here somewhat more difficult to maintain,
|
||||
// but it has the notable advantage of making ESTree much easier to use as
|
||||
// an end user.
|
||||
|
||||
export interface BaseNodeWithoutComments {
|
||||
// Every leaf interface that extends BaseNode must specify a type property.
|
||||
// The type property should be a string literal. For example, Identifier
|
||||
// has: `type: "Identifier"`
|
||||
type: string;
|
||||
loc?: SourceLocation | null | undefined;
|
||||
range?: [number, number] | undefined;
|
||||
}
|
||||
|
||||
export interface BaseNode extends BaseNodeWithoutComments {
|
||||
leadingComments?: Comment[] | undefined;
|
||||
trailingComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface NodeMap {
|
||||
AssignmentProperty: AssignmentProperty;
|
||||
CatchClause: CatchClause;
|
||||
Class: Class;
|
||||
ClassBody: ClassBody;
|
||||
Expression: Expression;
|
||||
Function: Function;
|
||||
Identifier: Identifier;
|
||||
Literal: Literal;
|
||||
MethodDefinition: MethodDefinition;
|
||||
ModuleDeclaration: ModuleDeclaration;
|
||||
ModuleSpecifier: ModuleSpecifier;
|
||||
Pattern: Pattern;
|
||||
PrivateIdentifier: PrivateIdentifier;
|
||||
Program: Program;
|
||||
Property: Property;
|
||||
PropertyDefinition: PropertyDefinition;
|
||||
SpreadElement: SpreadElement;
|
||||
Statement: Statement;
|
||||
Super: Super;
|
||||
SwitchCase: SwitchCase;
|
||||
TemplateElement: TemplateElement;
|
||||
VariableDeclarator: VariableDeclarator;
|
||||
}
|
||||
|
||||
export type Node = NodeMap[keyof NodeMap];
|
||||
|
||||
export interface Comment extends BaseNodeWithoutComments {
|
||||
type: "Line" | "Block";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface SourceLocation {
|
||||
source?: string | null | undefined;
|
||||
start: Position;
|
||||
end: Position;
|
||||
}
|
||||
|
||||
export interface Position {
|
||||
/** >= 1 */
|
||||
line: number;
|
||||
/** >= 0 */
|
||||
column: number;
|
||||
}
|
||||
|
||||
export interface Program extends BaseNode {
|
||||
type: "Program";
|
||||
sourceType: "script" | "module";
|
||||
body: Array<Directive | Statement | ModuleDeclaration>;
|
||||
comments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface Directive extends BaseNode {
|
||||
type: "ExpressionStatement";
|
||||
expression: Literal;
|
||||
directive: string;
|
||||
}
|
||||
|
||||
export interface BaseFunction extends BaseNode {
|
||||
params: Pattern[];
|
||||
generator?: boolean | undefined;
|
||||
async?: boolean | undefined;
|
||||
// The body is either BlockStatement or Expression because arrow functions
|
||||
// can have a body that's either. FunctionDeclarations and
|
||||
// FunctionExpressions have only BlockStatement bodies.
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
|
||||
|
||||
export type Statement =
|
||||
| ExpressionStatement
|
||||
| BlockStatement
|
||||
| StaticBlock
|
||||
| EmptyStatement
|
||||
| DebuggerStatement
|
||||
| WithStatement
|
||||
| ReturnStatement
|
||||
| LabeledStatement
|
||||
| BreakStatement
|
||||
| ContinueStatement
|
||||
| IfStatement
|
||||
| SwitchStatement
|
||||
| ThrowStatement
|
||||
| TryStatement
|
||||
| WhileStatement
|
||||
| DoWhileStatement
|
||||
| ForStatement
|
||||
| ForInStatement
|
||||
| ForOfStatement
|
||||
| Declaration;
|
||||
|
||||
export interface BaseStatement extends BaseNode {}
|
||||
|
||||
export interface EmptyStatement extends BaseStatement {
|
||||
type: "EmptyStatement";
|
||||
}
|
||||
|
||||
export interface BlockStatement extends BaseStatement {
|
||||
type: "BlockStatement";
|
||||
body: Statement[];
|
||||
innerComments?: Comment[] | undefined;
|
||||
}
|
||||
|
||||
export interface StaticBlock extends Omit<BlockStatement, "type"> {
|
||||
type: "StaticBlock";
|
||||
}
|
||||
|
||||
export interface ExpressionStatement extends BaseStatement {
|
||||
type: "ExpressionStatement";
|
||||
expression: Expression;
|
||||
}
|
||||
|
||||
export interface IfStatement extends BaseStatement {
|
||||
type: "IfStatement";
|
||||
test: Expression;
|
||||
consequent: Statement;
|
||||
alternate?: Statement | null | undefined;
|
||||
}
|
||||
|
||||
export interface LabeledStatement extends BaseStatement {
|
||||
type: "LabeledStatement";
|
||||
label: Identifier;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BreakStatement extends BaseStatement {
|
||||
type: "BreakStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface ContinueStatement extends BaseStatement {
|
||||
type: "ContinueStatement";
|
||||
label?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface WithStatement extends BaseStatement {
|
||||
type: "WithStatement";
|
||||
object: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface SwitchStatement extends BaseStatement {
|
||||
type: "SwitchStatement";
|
||||
discriminant: Expression;
|
||||
cases: SwitchCase[];
|
||||
}
|
||||
|
||||
export interface ReturnStatement extends BaseStatement {
|
||||
type: "ReturnStatement";
|
||||
argument?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ThrowStatement extends BaseStatement {
|
||||
type: "ThrowStatement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface TryStatement extends BaseStatement {
|
||||
type: "TryStatement";
|
||||
block: BlockStatement;
|
||||
handler?: CatchClause | null | undefined;
|
||||
finalizer?: BlockStatement | null | undefined;
|
||||
}
|
||||
|
||||
export interface WhileStatement extends BaseStatement {
|
||||
type: "WhileStatement";
|
||||
test: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface DoWhileStatement extends BaseStatement {
|
||||
type: "DoWhileStatement";
|
||||
body: Statement;
|
||||
test: Expression;
|
||||
}
|
||||
|
||||
export interface ForStatement extends BaseStatement {
|
||||
type: "ForStatement";
|
||||
init?: VariableDeclaration | Expression | null | undefined;
|
||||
test?: Expression | null | undefined;
|
||||
update?: Expression | null | undefined;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface BaseForXStatement extends BaseStatement {
|
||||
left: VariableDeclaration | Pattern;
|
||||
right: Expression;
|
||||
body: Statement;
|
||||
}
|
||||
|
||||
export interface ForInStatement extends BaseForXStatement {
|
||||
type: "ForInStatement";
|
||||
}
|
||||
|
||||
export interface DebuggerStatement extends BaseStatement {
|
||||
type: "DebuggerStatement";
|
||||
}
|
||||
|
||||
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
||||
|
||||
export interface BaseDeclaration extends BaseStatement {}
|
||||
|
||||
export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
|
||||
type: "FunctionDeclaration";
|
||||
/** It is null when a function declaration is a part of the `export default function` statement */
|
||||
id: Identifier | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface VariableDeclaration extends BaseDeclaration {
|
||||
type: "VariableDeclaration";
|
||||
declarations: VariableDeclarator[];
|
||||
kind: "var" | "let" | "const" | "using" | "await using";
|
||||
}
|
||||
|
||||
export interface VariableDeclarator extends BaseNode {
|
||||
type: "VariableDeclarator";
|
||||
id: Pattern;
|
||||
init?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExpressionMap {
|
||||
ArrayExpression: ArrayExpression;
|
||||
ArrowFunctionExpression: ArrowFunctionExpression;
|
||||
AssignmentExpression: AssignmentExpression;
|
||||
AwaitExpression: AwaitExpression;
|
||||
BinaryExpression: BinaryExpression;
|
||||
CallExpression: CallExpression;
|
||||
ChainExpression: ChainExpression;
|
||||
ClassExpression: ClassExpression;
|
||||
ConditionalExpression: ConditionalExpression;
|
||||
FunctionExpression: FunctionExpression;
|
||||
Identifier: Identifier;
|
||||
ImportExpression: ImportExpression;
|
||||
Literal: Literal;
|
||||
LogicalExpression: LogicalExpression;
|
||||
MemberExpression: MemberExpression;
|
||||
MetaProperty: MetaProperty;
|
||||
NewExpression: NewExpression;
|
||||
ObjectExpression: ObjectExpression;
|
||||
SequenceExpression: SequenceExpression;
|
||||
TaggedTemplateExpression: TaggedTemplateExpression;
|
||||
TemplateLiteral: TemplateLiteral;
|
||||
ThisExpression: ThisExpression;
|
||||
UnaryExpression: UnaryExpression;
|
||||
UpdateExpression: UpdateExpression;
|
||||
YieldExpression: YieldExpression;
|
||||
}
|
||||
|
||||
export type Expression = ExpressionMap[keyof ExpressionMap];
|
||||
|
||||
export interface BaseExpression extends BaseNode {}
|
||||
|
||||
export type ChainElement = SimpleCallExpression | MemberExpression;
|
||||
|
||||
export interface ChainExpression extends BaseExpression {
|
||||
type: "ChainExpression";
|
||||
expression: ChainElement;
|
||||
}
|
||||
|
||||
export interface ThisExpression extends BaseExpression {
|
||||
type: "ThisExpression";
|
||||
}
|
||||
|
||||
export interface ArrayExpression extends BaseExpression {
|
||||
type: "ArrayExpression";
|
||||
elements: Array<Expression | SpreadElement | null>;
|
||||
}
|
||||
|
||||
export interface ObjectExpression extends BaseExpression {
|
||||
type: "ObjectExpression";
|
||||
properties: Array<Property | SpreadElement>;
|
||||
}
|
||||
|
||||
export interface PrivateIdentifier extends BaseNode {
|
||||
type: "PrivateIdentifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Property extends BaseNode {
|
||||
type: "Property";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: Expression | Pattern; // Could be an AssignmentProperty
|
||||
kind: "init" | "get" | "set";
|
||||
method: boolean;
|
||||
shorthand: boolean;
|
||||
computed: boolean;
|
||||
}
|
||||
|
||||
export interface PropertyDefinition extends BaseNode {
|
||||
type: "PropertyDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value?: Expression | null | undefined;
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface FunctionExpression extends BaseFunction, BaseExpression {
|
||||
id?: Identifier | null | undefined;
|
||||
type: "FunctionExpression";
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface SequenceExpression extends BaseExpression {
|
||||
type: "SequenceExpression";
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface UnaryExpression extends BaseExpression {
|
||||
type: "UnaryExpression";
|
||||
operator: UnaryOperator;
|
||||
prefix: true;
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface BinaryExpression extends BaseExpression {
|
||||
type: "BinaryExpression";
|
||||
operator: BinaryOperator;
|
||||
left: Expression | PrivateIdentifier;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface AssignmentExpression extends BaseExpression {
|
||||
type: "AssignmentExpression";
|
||||
operator: AssignmentOperator;
|
||||
left: Pattern | MemberExpression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface UpdateExpression extends BaseExpression {
|
||||
type: "UpdateExpression";
|
||||
operator: UpdateOperator;
|
||||
argument: Expression;
|
||||
prefix: boolean;
|
||||
}
|
||||
|
||||
export interface LogicalExpression extends BaseExpression {
|
||||
type: "LogicalExpression";
|
||||
operator: LogicalOperator;
|
||||
left: Expression;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export interface ConditionalExpression extends BaseExpression {
|
||||
type: "ConditionalExpression";
|
||||
test: Expression;
|
||||
alternate: Expression;
|
||||
consequent: Expression;
|
||||
}
|
||||
|
||||
export interface BaseCallExpression extends BaseExpression {
|
||||
callee: Expression | Super;
|
||||
arguments: Array<Expression | SpreadElement>;
|
||||
}
|
||||
export type CallExpression = SimpleCallExpression | NewExpression;
|
||||
|
||||
export interface SimpleCallExpression extends BaseCallExpression {
|
||||
type: "CallExpression";
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export interface NewExpression extends BaseCallExpression {
|
||||
type: "NewExpression";
|
||||
}
|
||||
|
||||
export interface MemberExpression extends BaseExpression, BasePattern {
|
||||
type: "MemberExpression";
|
||||
object: Expression | Super;
|
||||
property: Expression | PrivateIdentifier;
|
||||
computed: boolean;
|
||||
optional: boolean;
|
||||
}
|
||||
|
||||
export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
|
||||
|
||||
export interface BasePattern extends BaseNode {}
|
||||
|
||||
export interface SwitchCase extends BaseNode {
|
||||
type: "SwitchCase";
|
||||
test?: Expression | null | undefined;
|
||||
consequent: Statement[];
|
||||
}
|
||||
|
||||
export interface CatchClause extends BaseNode {
|
||||
type: "CatchClause";
|
||||
param: Pattern | null;
|
||||
body: BlockStatement;
|
||||
}
|
||||
|
||||
export interface Identifier extends BaseNode, BaseExpression, BasePattern {
|
||||
type: "Identifier";
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
||||
|
||||
export interface SimpleLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value: string | boolean | number | null;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface RegExpLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: RegExp | null | undefined;
|
||||
regex: {
|
||||
pattern: string;
|
||||
flags: string;
|
||||
};
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export interface BigIntLiteral extends BaseNode, BaseExpression {
|
||||
type: "Literal";
|
||||
value?: bigint | null | undefined;
|
||||
bigint: string;
|
||||
raw?: string | undefined;
|
||||
}
|
||||
|
||||
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
||||
|
||||
export type BinaryOperator =
|
||||
| "=="
|
||||
| "!="
|
||||
| "==="
|
||||
| "!=="
|
||||
| "<"
|
||||
| "<="
|
||||
| ">"
|
||||
| ">="
|
||||
| "<<"
|
||||
| ">>"
|
||||
| ">>>"
|
||||
| "+"
|
||||
| "-"
|
||||
| "*"
|
||||
| "/"
|
||||
| "%"
|
||||
| "**"
|
||||
| "|"
|
||||
| "^"
|
||||
| "&"
|
||||
| "in"
|
||||
| "instanceof";
|
||||
|
||||
export type LogicalOperator = "||" | "&&" | "??";
|
||||
|
||||
export type AssignmentOperator =
|
||||
| "="
|
||||
| "+="
|
||||
| "-="
|
||||
| "*="
|
||||
| "/="
|
||||
| "%="
|
||||
| "**="
|
||||
| "<<="
|
||||
| ">>="
|
||||
| ">>>="
|
||||
| "|="
|
||||
| "^="
|
||||
| "&="
|
||||
| "||="
|
||||
| "&&="
|
||||
| "??=";
|
||||
|
||||
export type UpdateOperator = "++" | "--";
|
||||
|
||||
export interface ForOfStatement extends BaseForXStatement {
|
||||
type: "ForOfStatement";
|
||||
await: boolean;
|
||||
}
|
||||
|
||||
export interface Super extends BaseNode {
|
||||
type: "Super";
|
||||
}
|
||||
|
||||
export interface SpreadElement extends BaseNode {
|
||||
type: "SpreadElement";
|
||||
argument: Expression;
|
||||
}
|
||||
|
||||
export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
|
||||
type: "ArrowFunctionExpression";
|
||||
expression: boolean;
|
||||
body: BlockStatement | Expression;
|
||||
}
|
||||
|
||||
export interface YieldExpression extends BaseExpression {
|
||||
type: "YieldExpression";
|
||||
argument?: Expression | null | undefined;
|
||||
delegate: boolean;
|
||||
}
|
||||
|
||||
export interface TemplateLiteral extends BaseExpression {
|
||||
type: "TemplateLiteral";
|
||||
quasis: TemplateElement[];
|
||||
expressions: Expression[];
|
||||
}
|
||||
|
||||
export interface TaggedTemplateExpression extends BaseExpression {
|
||||
type: "TaggedTemplateExpression";
|
||||
tag: Expression;
|
||||
quasi: TemplateLiteral;
|
||||
}
|
||||
|
||||
export interface TemplateElement extends BaseNode {
|
||||
type: "TemplateElement";
|
||||
tail: boolean;
|
||||
value: {
|
||||
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
|
||||
cooked?: string | null | undefined;
|
||||
raw: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface AssignmentProperty extends Property {
|
||||
value: Pattern;
|
||||
kind: "init";
|
||||
method: boolean; // false
|
||||
}
|
||||
|
||||
export interface ObjectPattern extends BasePattern {
|
||||
type: "ObjectPattern";
|
||||
properties: Array<AssignmentProperty | RestElement>;
|
||||
}
|
||||
|
||||
export interface ArrayPattern extends BasePattern {
|
||||
type: "ArrayPattern";
|
||||
elements: Array<Pattern | null>;
|
||||
}
|
||||
|
||||
export interface RestElement extends BasePattern {
|
||||
type: "RestElement";
|
||||
argument: Pattern;
|
||||
}
|
||||
|
||||
export interface AssignmentPattern extends BasePattern {
|
||||
type: "AssignmentPattern";
|
||||
left: Pattern;
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
export type Class = ClassDeclaration | ClassExpression;
|
||||
export interface BaseClass extends BaseNode {
|
||||
superClass?: Expression | null | undefined;
|
||||
body: ClassBody;
|
||||
}
|
||||
|
||||
export interface ClassBody extends BaseNode {
|
||||
type: "ClassBody";
|
||||
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
|
||||
}
|
||||
|
||||
export interface MethodDefinition extends BaseNode {
|
||||
type: "MethodDefinition";
|
||||
key: Expression | PrivateIdentifier;
|
||||
value: FunctionExpression;
|
||||
kind: "constructor" | "method" | "get" | "set";
|
||||
computed: boolean;
|
||||
static: boolean;
|
||||
}
|
||||
|
||||
export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
|
||||
type: "ClassDeclaration";
|
||||
/** It is null when a class declaration is a part of the `export default class` statement */
|
||||
id: Identifier | null;
|
||||
}
|
||||
|
||||
export interface ClassDeclaration extends MaybeNamedClassDeclaration {
|
||||
id: Identifier;
|
||||
}
|
||||
|
||||
export interface ClassExpression extends BaseClass, BaseExpression {
|
||||
type: "ClassExpression";
|
||||
id?: Identifier | null | undefined;
|
||||
}
|
||||
|
||||
export interface MetaProperty extends BaseExpression {
|
||||
type: "MetaProperty";
|
||||
meta: Identifier;
|
||||
property: Identifier;
|
||||
}
|
||||
|
||||
export type ModuleDeclaration =
|
||||
| ImportDeclaration
|
||||
| ExportNamedDeclaration
|
||||
| ExportDefaultDeclaration
|
||||
| ExportAllDeclaration;
|
||||
export interface BaseModuleDeclaration extends BaseNode {}
|
||||
|
||||
export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
|
||||
export interface BaseModuleSpecifier extends BaseNode {
|
||||
local: Identifier;
|
||||
}
|
||||
|
||||
export interface ImportDeclaration extends BaseModuleDeclaration {
|
||||
type: "ImportDeclaration";
|
||||
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface ImportSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportSpecifier";
|
||||
imported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ImportAttribute extends BaseNode {
|
||||
type: "ImportAttribute";
|
||||
key: Identifier | Literal;
|
||||
value: Literal;
|
||||
}
|
||||
|
||||
export interface ImportExpression extends BaseExpression {
|
||||
type: "ImportExpression";
|
||||
source: Expression;
|
||||
options?: Expression | null | undefined;
|
||||
}
|
||||
|
||||
export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportDefaultSpecifier";
|
||||
}
|
||||
|
||||
export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
|
||||
type: "ImportNamespaceSpecifier";
|
||||
}
|
||||
|
||||
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportNamedDeclaration";
|
||||
declaration?: Declaration | null | undefined;
|
||||
specifiers: ExportSpecifier[];
|
||||
attributes: ImportAttribute[];
|
||||
source?: Literal | null | undefined;
|
||||
}
|
||||
|
||||
export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
|
||||
type: "ExportSpecifier";
|
||||
local: Identifier | Literal;
|
||||
exported: Identifier | Literal;
|
||||
}
|
||||
|
||||
export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportDefaultDeclaration";
|
||||
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
|
||||
}
|
||||
|
||||
export interface ExportAllDeclaration extends BaseModuleDeclaration {
|
||||
type: "ExportAllDeclaration";
|
||||
exported: Identifier | Literal | null;
|
||||
attributes: ImportAttribute[];
|
||||
source: Literal;
|
||||
}
|
||||
|
||||
export interface AwaitExpression extends BaseExpression {
|
||||
type: "AwaitExpression";
|
||||
argument: Expression;
|
||||
}
|
||||
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
27
node_modules/@types/estree/package.json
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@types/estree",
|
||||
"version": "1.0.8",
|
||||
"description": "TypeScript definitions for estree",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "RReverser",
|
||||
"githubUsername": "RReverser",
|
||||
"url": "https://github.com/RReverser"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/estree"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "7a167b6e4a4d9f6e9a2cb9fd3fc45c885f89cbdeb44b3e5961bb057a45c082fd",
|
||||
"typeScriptVersion": "5.1",
|
||||
"nonNpm": true
|
||||
}
|
||||
21
node_modules/@types/prop-types/LICENSE
generated
vendored
Normal file
21
node_modules/@types/prop-types/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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/prop-types/README.md
generated
vendored
Normal file
15
node_modules/@types/prop-types/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/prop-types`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for prop-types (https://github.com/facebook/prop-types).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 09 Jun 2025 20:02:33 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [DovydasNavickas](https://github.com/DovydasNavickas), [Ferdy Budhidharma](https://github.com/ferdaber), and [Sebastian Silbermann](https://github.com/eps1lon).
|
||||
131
node_modules/@types/prop-types/index.d.ts
generated
vendored
Normal file
131
node_modules/@types/prop-types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
// eslint-disable-next-line @definitelytyped/export-just-namespace
|
||||
export = PropTypes;
|
||||
|
||||
declare namespace PropTypes {
|
||||
type ReactComponentLike =
|
||||
| string
|
||||
| ((props: any) => any)
|
||||
| (new(props: any, context: any) => any);
|
||||
|
||||
interface ReactElementLike {
|
||||
type: ReactComponentLike;
|
||||
props: unknown;
|
||||
key: string | null;
|
||||
}
|
||||
|
||||
interface ReactNodeArray extends Iterable<ReactNodeLike> {}
|
||||
|
||||
/**
|
||||
* @internal Use `Awaited<ReactNodeLike>` instead
|
||||
*/
|
||||
// Helper type to enable `Awaited<ReactNodeLike>`.
|
||||
// Must be a copy of the non-thenables of `ReactNodeLike`.
|
||||
type AwaitedReactNodeLike =
|
||||
| ReactElementLike
|
||||
| string
|
||||
| number
|
||||
| bigint
|
||||
| ReactNodeArray
|
||||
| boolean
|
||||
| null
|
||||
| undefined;
|
||||
|
||||
type ReactNodeLike =
|
||||
| ReactElementLike
|
||||
| ReactNodeArray
|
||||
| string
|
||||
| number
|
||||
| bigint
|
||||
| boolean
|
||||
| null
|
||||
| undefined
|
||||
| Promise<AwaitedReactNodeLike>;
|
||||
|
||||
const nominalTypeHack: unique symbol;
|
||||
|
||||
type IsOptional<T> = undefined extends T ? true : false;
|
||||
|
||||
type RequiredKeys<V> = {
|
||||
[K in keyof V]-?: Exclude<V[K], undefined> extends Validator<infer T> ? IsOptional<T> extends true ? never : K
|
||||
: never;
|
||||
}[keyof V];
|
||||
type OptionalKeys<V> = Exclude<keyof V, RequiredKeys<V>>;
|
||||
type InferPropsInner<V> = { [K in keyof V]-?: InferType<V[K]> };
|
||||
|
||||
interface Validator<T> {
|
||||
(
|
||||
props: { [key: string]: any },
|
||||
propName: string,
|
||||
componentName: string,
|
||||
location: string,
|
||||
propFullName: string,
|
||||
): Error | null;
|
||||
[nominalTypeHack]?: {
|
||||
type: T;
|
||||
} | undefined;
|
||||
}
|
||||
|
||||
interface Requireable<T> extends Validator<T | undefined | null> {
|
||||
isRequired: Validator<NonNullable<T>>;
|
||||
}
|
||||
|
||||
type ValidationMap<T> = { [K in keyof T]?: Validator<T[K]> };
|
||||
|
||||
/**
|
||||
* Like {@link ValidationMap} but treats `undefined`, `null` and optional properties the same.
|
||||
* This type is only added as a migration path in React 19 where this type was removed from React.
|
||||
* Runtime and compile time types would mismatch since you could see `undefined` at runtime when your types don't expect this type.
|
||||
*/
|
||||
type WeakValidationMap<T> = {
|
||||
[K in keyof T]?: null extends T[K] ? Validator<T[K] | null | undefined>
|
||||
: undefined extends T[K] ? Validator<T[K] | null | undefined>
|
||||
: Validator<T[K]>;
|
||||
};
|
||||
|
||||
type InferType<V> = V extends Validator<infer T> ? T : any;
|
||||
type InferProps<V> =
|
||||
& InferPropsInner<Pick<V, RequiredKeys<V>>>
|
||||
& Partial<InferPropsInner<Pick<V, OptionalKeys<V>>>>;
|
||||
|
||||
const any: Requireable<any>;
|
||||
const array: Requireable<any[]>;
|
||||
const bool: Requireable<boolean>;
|
||||
const func: Requireable<(...args: any[]) => any>;
|
||||
const number: Requireable<number>;
|
||||
const object: Requireable<object>;
|
||||
const string: Requireable<string>;
|
||||
const node: Requireable<ReactNodeLike>;
|
||||
const element: Requireable<ReactElementLike>;
|
||||
const symbol: Requireable<symbol>;
|
||||
const elementType: Requireable<ReactComponentLike>;
|
||||
function instanceOf<T>(expectedClass: new(...args: any[]) => T): Requireable<T>;
|
||||
function oneOf<T>(types: readonly T[]): Requireable<T>;
|
||||
function oneOfType<T extends Validator<any>>(types: T[]): Requireable<NonNullable<InferType<T>>>;
|
||||
function arrayOf<T>(type: Validator<T>): Requireable<T[]>;
|
||||
function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T }>;
|
||||
function shape<P extends ValidationMap<any>>(type: P): Requireable<InferProps<P>>;
|
||||
function exact<P extends ValidationMap<any>>(type: P): Requireable<Required<InferProps<P>>>;
|
||||
|
||||
/**
|
||||
* Assert that the values match with the type specs.
|
||||
* Error messages are memorized and will only be shown once.
|
||||
*
|
||||
* @param typeSpecs Map of name to a ReactPropType
|
||||
* @param values Runtime values that need to be type-checked
|
||||
* @param location e.g. "prop", "context", "child context"
|
||||
* @param componentName Name of the component for error messages
|
||||
* @param getStack Returns the component stack
|
||||
*/
|
||||
function checkPropTypes(
|
||||
typeSpecs: any,
|
||||
values: any,
|
||||
location: string,
|
||||
componentName: string,
|
||||
getStack?: () => any,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Only available if NODE_ENV=production
|
||||
*/
|
||||
function resetWarningCache(): void;
|
||||
}
|
||||
36
node_modules/@types/prop-types/package.json
generated
vendored
Normal file
36
node_modules/@types/prop-types/package.json
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "@types/prop-types",
|
||||
"version": "15.7.15",
|
||||
"description": "TypeScript definitions for prop-types",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "DovydasNavickas",
|
||||
"githubUsername": "DovydasNavickas",
|
||||
"url": "https://github.com/DovydasNavickas"
|
||||
},
|
||||
{
|
||||
"name": "Ferdy Budhidharma",
|
||||
"githubUsername": "ferdaber",
|
||||
"url": "https://github.com/ferdaber"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"githubUsername": "eps1lon",
|
||||
"url": "https://github.com/eps1lon"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/prop-types"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "92a20bc6f48f988ae6f314daa592e457e4b7ccb6ef115535bf69c7061375a248",
|
||||
"typeScriptVersion": "5.1"
|
||||
}
|
||||
21
node_modules/@types/react-dom/LICENSE
generated
vendored
Normal file
21
node_modules/@types/react-dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
16
node_modules/@types/react-dom/README.md
generated
vendored
Normal file
16
node_modules/@types/react-dom/README.md
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/react-dom`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for react-dom (https://reactjs.org).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom/v18.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 30 Apr 2025 10:37:29 GMT
|
||||
* Dependencies: none
|
||||
* Peer dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [MartynasZilinskas](https://github.com/MartynasZilinskas), [Josh Rutherford](https://github.com/theruther4d), [Jessica Franco](https://github.com/Jessidhia), and [Sebastian Silbermann](https://github.com/eps1lon).
|
||||
185
node_modules/@types/react-dom/canary.d.ts
generated
vendored
Normal file
185
node_modules/@types/react-dom/canary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
/**
|
||||
* These are types for things that are present in the upcoming React 18 release.
|
||||
*
|
||||
* Once React 18 is released 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-dom/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-dom/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react-dom/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-dom/index.js to see how the exports are declared,
|
||||
// but confirm with published source code (e.g. https://unpkg.com/react-dom@canary) that these exports end up in the published code
|
||||
|
||||
import React = require("react");
|
||||
import ReactDOM = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare const REACT_FORM_STATE_SIGIL: unique symbol;
|
||||
|
||||
declare module "." {
|
||||
function prefetchDNS(href: string): void;
|
||||
|
||||
interface PreconnectOptions {
|
||||
// Don't create a helper type.
|
||||
// It would have to be in module scope to be inlined in TS tooltips.
|
||||
// But then it becomes part of the public API.
|
||||
// TODO: Upstream to microsoft/TypeScript-DOM-lib-generator -> w3c/webref
|
||||
// since the spec has a notion of a dedicated type: https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
}
|
||||
function preconnect(href: string, options?: PreconnectOptions): void;
|
||||
|
||||
type PreloadAs =
|
||||
| "audio"
|
||||
| "document"
|
||||
| "embed"
|
||||
| "fetch"
|
||||
| "font"
|
||||
| "image"
|
||||
| "object"
|
||||
| "track"
|
||||
| "script"
|
||||
| "style"
|
||||
| "video"
|
||||
| "worker";
|
||||
interface PreloadOptions {
|
||||
as: PreloadAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
fetchPriority?: "high" | "low" | "auto" | undefined;
|
||||
// TODO: These should only be allowed with `as: 'image'` but it's not trivial to write tests against the full TS support matrix.
|
||||
imageSizes?: string | undefined;
|
||||
imageSrcSet?: string | undefined;
|
||||
integrity?: string | undefined;
|
||||
type?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
referrerPolicy?: ReferrerPolicy | undefined;
|
||||
media?: string | undefined;
|
||||
}
|
||||
function preload(href: string, options?: PreloadOptions): void;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/links.html#link-type-modulepreload
|
||||
type PreloadModuleAs = RequestDestination;
|
||||
interface PreloadModuleOptions {
|
||||
/**
|
||||
* @default "script"
|
||||
*/
|
||||
as: PreloadModuleAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
integrity?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
}
|
||||
function preloadModule(href: string, options?: PreloadModuleOptions): void;
|
||||
|
||||
type PreinitAs = "script" | "style";
|
||||
interface PreinitOptions {
|
||||
as: PreinitAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
fetchPriority?: "high" | "low" | "auto" | undefined;
|
||||
precedence?: string | undefined;
|
||||
integrity?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
}
|
||||
function preinit(href: string, options?: PreinitOptions): void;
|
||||
|
||||
// Will be expanded to include all of https://github.com/tc39/proposal-import-attributes
|
||||
type PreinitModuleAs = "script";
|
||||
interface PreinitModuleOptions {
|
||||
/**
|
||||
* @default "script"
|
||||
*/
|
||||
as?: PreinitModuleAs;
|
||||
crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
|
||||
integrity?: string | undefined;
|
||||
nonce?: string | undefined;
|
||||
}
|
||||
function preinitModule(href: string, options?: PreinitModuleOptions): void;
|
||||
|
||||
interface FormStatusNotPending {
|
||||
pending: false;
|
||||
data: null;
|
||||
method: null;
|
||||
action: null;
|
||||
}
|
||||
|
||||
interface FormStatusPending {
|
||||
pending: true;
|
||||
data: FormData;
|
||||
method: string;
|
||||
action: string | ((formData: FormData) => void | Promise<void>);
|
||||
}
|
||||
|
||||
type FormStatus = FormStatusPending | FormStatusNotPending;
|
||||
|
||||
function useFormStatus(): FormStatus;
|
||||
|
||||
function useFormState<State>(
|
||||
action: (state: Awaited<State>) => State | Promise<State>,
|
||||
initialState: Awaited<State>,
|
||||
permalink?: string,
|
||||
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
||||
function useFormState<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];
|
||||
|
||||
function requestFormReset(form: HTMLFormElement): void;
|
||||
}
|
||||
|
||||
declare module "./client" {
|
||||
interface ReactFormState {
|
||||
[REACT_FORM_STATE_SIGIL]: never;
|
||||
}
|
||||
|
||||
interface RootOptions {
|
||||
onUncaughtError?:
|
||||
| ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void)
|
||||
| undefined;
|
||||
onCaughtError?:
|
||||
| ((
|
||||
error: unknown,
|
||||
errorInfo: {
|
||||
componentStack?: string | undefined;
|
||||
errorBoundary?: React.Component<unknown> | undefined;
|
||||
},
|
||||
) => void)
|
||||
| undefined;
|
||||
}
|
||||
|
||||
interface HydrationOptions {
|
||||
formState?: ReactFormState | null;
|
||||
onUncaughtError?:
|
||||
| ((error: unknown, errorInfo: { componentStack?: string | undefined }) => void)
|
||||
| undefined;
|
||||
onCaughtError?:
|
||||
| ((
|
||||
error: unknown,
|
||||
errorInfo: {
|
||||
componentStack?: string | undefined;
|
||||
errorBoundary?: React.Component<unknown> | undefined;
|
||||
},
|
||||
) => void)
|
||||
| undefined;
|
||||
}
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS {
|
||||
document: Document;
|
||||
}
|
||||
}
|
||||
72
node_modules/@types/react-dom/client.d.ts
generated
vendored
Normal file
72
node_modules/@types/react-dom/client.d.ts
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* WARNING: This entrypoint is only available starting with `react-dom@18.0.0-rc.1`
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react-dom/client.js to see how the exports are declared,
|
||||
|
||||
import React = require("react");
|
||||
export interface HydrationOptions {
|
||||
/**
|
||||
* Prefix for `useId`.
|
||||
*/
|
||||
identifierPrefix?: string;
|
||||
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
|
||||
}
|
||||
|
||||
export interface RootOptions {
|
||||
/**
|
||||
* Prefix for `useId`.
|
||||
*/
|
||||
identifierPrefix?: string;
|
||||
onRecoverableError?: (error: unknown, errorInfo: ErrorInfo) => void;
|
||||
}
|
||||
|
||||
export interface ErrorInfo {
|
||||
digest?: string;
|
||||
componentStack?: string;
|
||||
}
|
||||
|
||||
export interface Root {
|
||||
render(children: React.ReactNode): void;
|
||||
unmount(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Different release channels declare additional types of ReactNode this particular release channel accepts.
|
||||
* App or library types should never augment this interface.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS {}
|
||||
|
||||
export type Container =
|
||||
| Element
|
||||
| DocumentFragment
|
||||
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS[
|
||||
keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_CREATE_ROOT_CONTAINERS
|
||||
];
|
||||
|
||||
/**
|
||||
* createRoot lets you create a root to display React components inside a browser DOM node.
|
||||
*
|
||||
* @see {@link https://react.dev/reference/react-dom/client/createRoot API Reference for `createRoot`}
|
||||
*/
|
||||
export function createRoot(container: Container, options?: RootOptions): Root;
|
||||
|
||||
/**
|
||||
* Same as `createRoot()`, but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer.
|
||||
*
|
||||
* React will attempt to attach event listeners to the existing markup.
|
||||
*
|
||||
* **Example Usage**
|
||||
*
|
||||
* ```jsx
|
||||
* hydrateRoot(document.querySelector('#root'), <App />)
|
||||
* ```
|
||||
*
|
||||
* @see https://reactjs.org/docs/react-dom-client.html#hydrateroot
|
||||
*/
|
||||
export function hydrateRoot(
|
||||
container: Element | Document,
|
||||
initialChildren: React.ReactNode,
|
||||
options?: HydrationOptions,
|
||||
): Root;
|
||||
36
node_modules/@types/react-dom/experimental.d.ts
generated
vendored
Normal file
36
node_modules/@types/react-dom/experimental.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* 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-dom/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-dom/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react-dom/experimental" />
|
||||
* ```
|
||||
*
|
||||
* 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-dom/index.experimental.js to see how the exports are declared,
|
||||
// but confirm with published source code (e.g. https://unpkg.com/react-dom@experimental) that these exports end up in the published code
|
||||
|
||||
import React = require("react");
|
||||
import ReactDOM = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare module "." {
|
||||
}
|
||||
150
node_modules/@types/react-dom/index.d.ts
generated
vendored
Normal file
150
node_modules/@types/react-dom/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
// NOTE: Users of the `experimental` builds of React should add a reference
|
||||
// to 'react-dom/experimental' in their project. See experimental.d.ts's top comment
|
||||
// for reference and documentation on how exactly to do it.
|
||||
|
||||
export as namespace ReactDOM;
|
||||
|
||||
import {
|
||||
CElement,
|
||||
Component,
|
||||
ComponentState,
|
||||
DOMAttributes,
|
||||
DOMElement,
|
||||
FunctionComponentElement,
|
||||
Key,
|
||||
ReactElement,
|
||||
ReactInstance,
|
||||
ReactNode,
|
||||
ReactPortal,
|
||||
} from "react";
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/reference/react-dom/findDOMNode#alternatives
|
||||
*/
|
||||
export function findDOMNode(instance: ReactInstance | null | undefined): Element | null | Text;
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
export function unmountComponentAtNode(container: Element | DocumentFragment): boolean;
|
||||
|
||||
export function createPortal(
|
||||
children: ReactNode,
|
||||
container: Element | DocumentFragment,
|
||||
key?: Key | null,
|
||||
): ReactPortal;
|
||||
|
||||
export const version: string;
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
export const render: Renderer;
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
export const hydrate: Renderer;
|
||||
|
||||
export function flushSync<R>(fn: () => R): R;
|
||||
|
||||
export function unstable_batchedUpdates<A, R>(callback: (a: A) => R, a: A): R;
|
||||
export function unstable_batchedUpdates<R>(callback: () => R): R;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export function unstable_renderSubtreeIntoContainer<T extends Element>(
|
||||
parentComponent: Component<any>,
|
||||
element: DOMElement<DOMAttributes<T>, T>,
|
||||
container: Element,
|
||||
callback?: (element: T) => any,
|
||||
): T;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export function unstable_renderSubtreeIntoContainer<P, T extends Component<P, ComponentState>>(
|
||||
parentComponent: Component<any>,
|
||||
element: CElement<P, T>,
|
||||
container: Element,
|
||||
callback?: (component: T) => any,
|
||||
): T;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
export function unstable_renderSubtreeIntoContainer<P>(
|
||||
parentComponent: Component<any>,
|
||||
element: ReactElement<P>,
|
||||
container: Element,
|
||||
callback?: (component?: Component<P, ComponentState> | Element) => any,
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
): Component<P, ComponentState> | Element | void;
|
||||
|
||||
export type Container = Element | Document | DocumentFragment;
|
||||
|
||||
export interface Renderer {
|
||||
// Deprecated(render): The return value is deprecated.
|
||||
// In future releases the render function's return type will be void.
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
<T extends Element>(
|
||||
element: DOMElement<DOMAttributes<T>, T>,
|
||||
container: Container | null,
|
||||
callback?: () => void,
|
||||
): T;
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
(
|
||||
element: Array<DOMElement<DOMAttributes<any>, any>>,
|
||||
container: Container | null,
|
||||
callback?: () => void,
|
||||
): Element;
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
(
|
||||
element: FunctionComponentElement<any> | Array<FunctionComponentElement<any>>,
|
||||
container: Container | null,
|
||||
callback?: () => void,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
<P, T extends Component<P, ComponentState>>(
|
||||
element: CElement<P, T>,
|
||||
container: Container | null,
|
||||
callback?: () => void,
|
||||
): T;
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
(
|
||||
element: Array<CElement<any, Component<any, ComponentState>>>,
|
||||
container: Container | null,
|
||||
callback?: () => void,
|
||||
): Component<any, ComponentState>;
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
<P>(
|
||||
element: ReactElement<P>,
|
||||
container: Container | null,
|
||||
callback?: () => void,
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
): Component<P, ComponentState> | Element | void;
|
||||
|
||||
/**
|
||||
* @deprecated See https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-client-rendering-apis
|
||||
*/
|
||||
(
|
||||
element: ReactElement[],
|
||||
container: Container | null,
|
||||
callback?: () => void,
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
): Component<any, ComponentState> | Element | void;
|
||||
}
|
||||
88
node_modules/@types/react-dom/package.json
generated
vendored
Normal file
88
node_modules/@types/react-dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
"name": "@types/react-dom",
|
||||
"version": "18.3.7",
|
||||
"description": "TypeScript definitions for react-dom",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Asana",
|
||||
"url": "https://asana.com"
|
||||
},
|
||||
{
|
||||
"name": "AssureSign",
|
||||
"url": "http://www.assuresign.com"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft",
|
||||
"url": "https://microsoft.com"
|
||||
},
|
||||
{
|
||||
"name": "MartynasZilinskas",
|
||||
"githubUsername": "MartynasZilinskas",
|
||||
"url": "https://github.com/MartynasZilinskas"
|
||||
},
|
||||
{
|
||||
"name": "Josh Rutherford",
|
||||
"githubUsername": "theruther4d",
|
||||
"url": "https://github.com/theruther4d"
|
||||
},
|
||||
{
|
||||
"name": "Jessica Franco",
|
||||
"githubUsername": "Jessidhia",
|
||||
"url": "https://github.com/Jessidhia"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"githubUsername": "eps1lon",
|
||||
"url": "https://github.com/eps1lon"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": {
|
||||
"default": "./index.d.ts"
|
||||
}
|
||||
},
|
||||
"./canary": {
|
||||
"types": {
|
||||
"default": "./canary.d.ts"
|
||||
}
|
||||
},
|
||||
"./client": {
|
||||
"types": {
|
||||
"default": "./client.d.ts"
|
||||
}
|
||||
},
|
||||
"./server": {
|
||||
"types": {
|
||||
"default": "./server.d.ts"
|
||||
}
|
||||
},
|
||||
"./experimental": {
|
||||
"types": {
|
||||
"default": "./experimental.d.ts"
|
||||
}
|
||||
},
|
||||
"./test-utils": {
|
||||
"types": {
|
||||
"default": "./test-utils/index.d.ts"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/react-dom"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18.0.0"
|
||||
},
|
||||
"typesPublisherContentHash": "091d1528d83863778f5cb9fbf6c81d6e64ed2394f4c3c73a57ed81d9871b4465",
|
||||
"typeScriptVersion": "5.1"
|
||||
}
|
||||
131
node_modules/@types/react-dom/server.d.ts
generated
vendored
Normal file
131
node_modules/@types/react-dom/server.d.ts
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
// forward declarations
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface ReadableStream {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface WritableStream {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface AbortSignal {}
|
||||
|
||||
/**
|
||||
* Stub for https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface ReadableStream {}
|
||||
}
|
||||
|
||||
import { ReactNode } from "react";
|
||||
import { ErrorInfo } from "./client";
|
||||
|
||||
export type BootstrapScriptDescriptor = {
|
||||
src: string;
|
||||
integrity?: string | undefined;
|
||||
crossOrigin?: string | undefined;
|
||||
};
|
||||
export interface RenderToPipeableStreamOptions {
|
||||
identifierPrefix?: string;
|
||||
namespaceURI?: string;
|
||||
nonce?: string;
|
||||
bootstrapScriptContent?: string;
|
||||
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
||||
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
||||
progressiveChunkSize?: number;
|
||||
onShellReady?: () => void;
|
||||
onShellError?: (error: unknown) => void;
|
||||
onAllReady?: () => void;
|
||||
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
||||
}
|
||||
|
||||
export interface PipeableStream {
|
||||
abort: (reason?: unknown) => void;
|
||||
pipe: <Writable extends NodeJS.WritableStream>(destination: Writable) => Writable;
|
||||
}
|
||||
|
||||
export interface ServerOptions {
|
||||
identifierPrefix?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only available in the environments with [Node.js Streams](https://nodejs.dev/learn/nodejs-streams).
|
||||
*
|
||||
* @see [API](https://reactjs.org/docs/react-dom-server.html#rendertopipeablestream)
|
||||
*
|
||||
* @param children
|
||||
* @param options
|
||||
*/
|
||||
export function renderToPipeableStream(children: ReactNode, options?: RenderToPipeableStreamOptions): PipeableStream;
|
||||
|
||||
/**
|
||||
* Render a React element to its initial HTML. This should only be used on the server.
|
||||
* React will return an HTML string. You can use this method to generate HTML on the server
|
||||
* and send the markup down on the initial request for faster page loads and to allow search
|
||||
* engines to crawl your pages for SEO purposes.
|
||||
*
|
||||
* If you call `ReactDOMClient.hydrateRoot()` on a node that already has this server-rendered markup,
|
||||
* React will preserve it and only attach event handlers, allowing you
|
||||
* to have a very performant first-load experience.
|
||||
*/
|
||||
export function renderToString(element: ReactNode, options?: ServerOptions): string;
|
||||
|
||||
/**
|
||||
* Render a React element to its initial HTML. Returns a Readable stream that outputs
|
||||
* an HTML string. The HTML output by this stream is exactly equal to what
|
||||
* `ReactDOMServer.renderToString()` would return.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
export function renderToNodeStream(element: ReactNode, options?: ServerOptions): NodeJS.ReadableStream;
|
||||
|
||||
/**
|
||||
* Similar to `renderToString`, except this doesn't create extra DOM attributes
|
||||
* such as `data-reactid`, that React uses internally. This is useful if you want
|
||||
* to use React as a simple static page generator, as stripping away the extra
|
||||
* attributes can save lots of bytes.
|
||||
*/
|
||||
export function renderToStaticMarkup(element: ReactNode, options?: ServerOptions): string;
|
||||
|
||||
/**
|
||||
* Similar to `renderToNodeStream`, except this doesn't create extra DOM attributes
|
||||
* such as `data-reactid`, that React uses internally. The HTML output by this stream
|
||||
* is exactly equal to what `ReactDOMServer.renderToStaticMarkup()` would return.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
export function renderToStaticNodeStream(element: ReactNode, options?: ServerOptions): NodeJS.ReadableStream;
|
||||
|
||||
export interface RenderToReadableStreamOptions {
|
||||
identifierPrefix?: string;
|
||||
namespaceURI?: string;
|
||||
nonce?: string;
|
||||
bootstrapScriptContent?: string;
|
||||
bootstrapScripts?: Array<string | BootstrapScriptDescriptor>;
|
||||
bootstrapModules?: Array<string | BootstrapScriptDescriptor>;
|
||||
progressiveChunkSize?: number;
|
||||
signal?: AbortSignal;
|
||||
onError?: (error: unknown, errorInfo: ErrorInfo) => string | void;
|
||||
}
|
||||
|
||||
export interface ReactDOMServerReadableStream extends ReadableStream {
|
||||
allReady: Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only available in the environments with [Web Streams](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API) (this includes browsers, Deno, and some modern edge runtimes).
|
||||
*
|
||||
* @see [API](https://reactjs.org/docs/react-dom-server.html#rendertoreadablestream)
|
||||
*/
|
||||
export function renderToReadableStream(
|
||||
children: ReactNode,
|
||||
options?: RenderToReadableStreamOptions,
|
||||
): Promise<ReactDOMServerReadableStream>;
|
||||
|
||||
export const version: string;
|
||||
|
||||
export as namespace ReactDOMServer;
|
||||
402
node_modules/@types/react-dom/test-utils/index.d.ts
generated
vendored
Normal file
402
node_modules/@types/react-dom/test-utils/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,402 @@
|
||||
import {
|
||||
AbstractView,
|
||||
CElement,
|
||||
ClassType,
|
||||
Component,
|
||||
ComponentClass,
|
||||
DOMAttributes,
|
||||
DOMElement,
|
||||
FC,
|
||||
FunctionComponentElement,
|
||||
ReactElement,
|
||||
ReactHTMLElement,
|
||||
ReactInstance,
|
||||
} from "react";
|
||||
|
||||
import * as ReactTestUtils from ".";
|
||||
|
||||
export {};
|
||||
|
||||
export interface OptionalEventProperties {
|
||||
bubbles?: boolean | undefined;
|
||||
cancelable?: boolean | undefined;
|
||||
currentTarget?: EventTarget | undefined;
|
||||
defaultPrevented?: boolean | undefined;
|
||||
eventPhase?: number | undefined;
|
||||
isTrusted?: boolean | undefined;
|
||||
nativeEvent?: Event | undefined;
|
||||
preventDefault?(): void;
|
||||
stopPropagation?(): void;
|
||||
target?: EventTarget | undefined;
|
||||
timeStamp?: Date | undefined;
|
||||
type?: string | undefined;
|
||||
}
|
||||
|
||||
export type ModifierKey =
|
||||
| "Alt"
|
||||
| "AltGraph"
|
||||
| "CapsLock"
|
||||
| "Control"
|
||||
| "Fn"
|
||||
| "FnLock"
|
||||
| "Hyper"
|
||||
| "Meta"
|
||||
| "NumLock"
|
||||
| "ScrollLock"
|
||||
| "Shift"
|
||||
| "Super"
|
||||
| "Symbol"
|
||||
| "SymbolLock";
|
||||
|
||||
export interface SyntheticEventData extends OptionalEventProperties {
|
||||
altKey?: boolean | undefined;
|
||||
button?: number | undefined;
|
||||
buttons?: number | undefined;
|
||||
clientX?: number | undefined;
|
||||
clientY?: number | undefined;
|
||||
changedTouches?: TouchList | undefined;
|
||||
charCode?: number | undefined;
|
||||
clipboardData?: DataTransfer | undefined;
|
||||
ctrlKey?: boolean | undefined;
|
||||
deltaMode?: number | undefined;
|
||||
deltaX?: number | undefined;
|
||||
deltaY?: number | undefined;
|
||||
deltaZ?: number | undefined;
|
||||
detail?: number | undefined;
|
||||
getModifierState?(key: ModifierKey): boolean;
|
||||
key?: string | undefined;
|
||||
keyCode?: number | undefined;
|
||||
locale?: string | undefined;
|
||||
location?: number | undefined;
|
||||
metaKey?: boolean | undefined;
|
||||
pageX?: number | undefined;
|
||||
pageY?: number | undefined;
|
||||
relatedTarget?: EventTarget | undefined;
|
||||
repeat?: boolean | undefined;
|
||||
screenX?: number | undefined;
|
||||
screenY?: number | undefined;
|
||||
shiftKey?: boolean | undefined;
|
||||
targetTouches?: TouchList | undefined;
|
||||
touches?: TouchList | undefined;
|
||||
view?: AbstractView | undefined;
|
||||
which?: number | undefined;
|
||||
}
|
||||
|
||||
export type EventSimulator = (element: Element | Component<any>, eventData?: SyntheticEventData) => void;
|
||||
|
||||
export interface MockedComponentClass {
|
||||
new(props: any): any;
|
||||
}
|
||||
|
||||
export interface ShallowRenderer {
|
||||
/**
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput<E extends ReactElement>(): E;
|
||||
/**
|
||||
* Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep.
|
||||
*/
|
||||
render(element: ReactElement, context?: any): void;
|
||||
unmount(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulate an event dispatch on a DOM node with optional `eventData` event data.
|
||||
* `Simulate` has a method for every event that React understands.
|
||||
*/
|
||||
export namespace Simulate {
|
||||
const abort: EventSimulator;
|
||||
const animationEnd: EventSimulator;
|
||||
const animationIteration: EventSimulator;
|
||||
const animationStart: EventSimulator;
|
||||
const blur: EventSimulator;
|
||||
const cancel: EventSimulator;
|
||||
const canPlay: EventSimulator;
|
||||
const canPlayThrough: EventSimulator;
|
||||
const change: EventSimulator;
|
||||
const click: EventSimulator;
|
||||
const close: EventSimulator;
|
||||
const compositionEnd: EventSimulator;
|
||||
const compositionStart: EventSimulator;
|
||||
const compositionUpdate: EventSimulator;
|
||||
const contextMenu: EventSimulator;
|
||||
const copy: EventSimulator;
|
||||
const cut: EventSimulator;
|
||||
const auxClick: EventSimulator;
|
||||
const doubleClick: EventSimulator;
|
||||
const drag: EventSimulator;
|
||||
const dragEnd: EventSimulator;
|
||||
const dragEnter: EventSimulator;
|
||||
const dragExit: EventSimulator;
|
||||
const dragLeave: EventSimulator;
|
||||
const dragOver: EventSimulator;
|
||||
const dragStart: EventSimulator;
|
||||
const drop: EventSimulator;
|
||||
const durationChange: EventSimulator;
|
||||
const emptied: EventSimulator;
|
||||
const encrypted: EventSimulator;
|
||||
const ended: EventSimulator;
|
||||
const error: EventSimulator;
|
||||
const focus: EventSimulator;
|
||||
const input: EventSimulator;
|
||||
const invalid: EventSimulator;
|
||||
const keyDown: EventSimulator;
|
||||
const keyPress: EventSimulator;
|
||||
const keyUp: EventSimulator;
|
||||
const load: EventSimulator;
|
||||
const loadStart: EventSimulator;
|
||||
const loadedData: EventSimulator;
|
||||
const loadedMetadata: EventSimulator;
|
||||
const mouseDown: EventSimulator;
|
||||
const mouseEnter: EventSimulator;
|
||||
const mouseLeave: EventSimulator;
|
||||
const mouseMove: EventSimulator;
|
||||
const mouseOut: EventSimulator;
|
||||
const mouseOver: EventSimulator;
|
||||
const mouseUp: EventSimulator;
|
||||
const paste: EventSimulator;
|
||||
const pause: EventSimulator;
|
||||
const play: EventSimulator;
|
||||
const playing: EventSimulator;
|
||||
const progress: EventSimulator;
|
||||
const pointerCancel: EventSimulator;
|
||||
const pointerDown: EventSimulator;
|
||||
const pointerUp: EventSimulator;
|
||||
const pointerMove: EventSimulator;
|
||||
const pointerOut: EventSimulator;
|
||||
const pointerOver: EventSimulator;
|
||||
const pointerEnter: EventSimulator;
|
||||
const pointerLeave: EventSimulator;
|
||||
const gotPointerCapture: EventSimulator;
|
||||
const lostPointerCapture: EventSimulator;
|
||||
const rateChange: EventSimulator;
|
||||
const reset: EventSimulator;
|
||||
const resize: EventSimulator;
|
||||
const scroll: EventSimulator;
|
||||
const toggle: EventSimulator;
|
||||
const seeked: EventSimulator;
|
||||
const seeking: EventSimulator;
|
||||
const select: EventSimulator;
|
||||
const beforeInput: EventSimulator;
|
||||
const stalled: EventSimulator;
|
||||
const submit: EventSimulator;
|
||||
const suspend: EventSimulator;
|
||||
const timeUpdate: EventSimulator;
|
||||
const touchCancel: EventSimulator;
|
||||
const touchEnd: EventSimulator;
|
||||
const touchMove: EventSimulator;
|
||||
const touchStart: EventSimulator;
|
||||
const transitionEnd: EventSimulator;
|
||||
const volumeChange: EventSimulator;
|
||||
const waiting: EventSimulator;
|
||||
const wheel: EventSimulator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a React element into a detached DOM node in the document. __This function requires a DOM__.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function renderIntoDocument<T extends Element>(
|
||||
element: DOMElement<any, T>,
|
||||
): T;
|
||||
/** @deprecated https://react.dev/warnings/react-dom-test-utils */
|
||||
export function renderIntoDocument(
|
||||
element: FunctionComponentElement<any>,
|
||||
): void;
|
||||
// If we replace `P` with `any` in this overload, then some tests fail because
|
||||
// calls to `renderIntoDocument` choose the last overload on the
|
||||
// subtype-relation pass and get an undesirably broad return type. Using `P`
|
||||
// allows this overload to match on the subtype-relation pass.
|
||||
/**
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function renderIntoDocument<P, T extends Component<P>>(
|
||||
element: CElement<P, T>,
|
||||
): T;
|
||||
/**
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function renderIntoDocument<P>(
|
||||
element: ReactElement<P>,
|
||||
): Component<P> | Element | void;
|
||||
|
||||
/**
|
||||
* Pass a mocked component module to this method to augment it with useful methods that allow it to
|
||||
* be used as a dummy React component. Instead of rendering as usual, the component will become
|
||||
* a simple `<div>` (or other tag if `mockTagName` is provided) containing any provided children.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function mockComponent(
|
||||
mocked: MockedComponentClass,
|
||||
mockTagName?: string,
|
||||
): typeof ReactTestUtils;
|
||||
|
||||
/**
|
||||
* Returns `true` if `element` is any React element.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isElement(element: any): boolean;
|
||||
|
||||
/**
|
||||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isElementOfType<T extends HTMLElement>(
|
||||
element: ReactElement,
|
||||
type: string,
|
||||
): element is ReactHTMLElement<T>;
|
||||
/**
|
||||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isElementOfType<P extends DOMAttributes<{}>, T extends Element>(
|
||||
element: ReactElement,
|
||||
type: string,
|
||||
): element is DOMElement<P, T>;
|
||||
/**
|
||||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isElementOfType<P>(
|
||||
element: ReactElement,
|
||||
type: FC<P>,
|
||||
): element is FunctionComponentElement<P>;
|
||||
/**
|
||||
* Returns `true` if `element` is a React element whose type is of a React `componentClass`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isElementOfType<P, T extends Component<P>, C extends ComponentClass<P>>(
|
||||
element: ReactElement,
|
||||
type: ClassType<P, T, C>,
|
||||
): element is CElement<P, T>;
|
||||
|
||||
/**
|
||||
* Returns `true` if `instance` is a DOM component (such as a `<div>` or `<span>`).
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isDOMComponent(instance: ReactInstance): instance is Element;
|
||||
/**
|
||||
* Returns `true` if `instance` is a user-defined component, such as a class or a function.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isCompositeComponent(instance: ReactInstance): instance is Component<any>;
|
||||
/**
|
||||
* Returns `true` if `instance` is a component whose type is of a React `componentClass`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function isCompositeComponentWithType<T extends Component<any>, C extends ComponentClass<any>>(
|
||||
instance: ReactInstance,
|
||||
type: ClassType<any, T, C>,
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Traverse all components in `tree` and accumulate all components where
|
||||
* `test(component)` is `true`. This is not that useful on its own, but it's used
|
||||
* as a primitive for other test utils.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function findAllInRenderedTree(
|
||||
root: Component<any>,
|
||||
fn: (i: ReactInstance) => boolean,
|
||||
): ReactInstance[];
|
||||
|
||||
/**
|
||||
* Finds all DOM elements of components in the rendered tree that are
|
||||
* DOM components with the class name matching `className`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function scryRenderedDOMComponentsWithClass(
|
||||
root: Component<any>,
|
||||
className: string,
|
||||
): Element[];
|
||||
/**
|
||||
* Like `scryRenderedDOMComponentsWithClass()` but expects there to be one result,
|
||||
* and returns that one result, or throws exception if there is any other
|
||||
* number of matches besides one.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function findRenderedDOMComponentWithClass(
|
||||
root: Component<any>,
|
||||
className: string,
|
||||
): Element;
|
||||
|
||||
/**
|
||||
* Finds all DOM elements of components in the rendered tree that are
|
||||
* DOM components with the tag name matching `tagName`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function scryRenderedDOMComponentsWithTag(
|
||||
root: Component<any>,
|
||||
tagName: string,
|
||||
): Element[];
|
||||
/**
|
||||
* Like `scryRenderedDOMComponentsWithTag()` but expects there to be one result,
|
||||
* and returns that one result, or throws exception if there is any other
|
||||
* number of matches besides one.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function findRenderedDOMComponentWithTag(
|
||||
root: Component<any>,
|
||||
tagName: string,
|
||||
): Element;
|
||||
|
||||
/**
|
||||
* Finds all instances of components with type equal to `componentClass`.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function scryRenderedComponentsWithType<T extends Component<any>, C extends ComponentClass<any>>(
|
||||
root: Component<any>,
|
||||
type: ClassType<any, T, C>,
|
||||
): T[];
|
||||
|
||||
/**
|
||||
* Same as `scryRenderedComponentsWithType()` but expects there to be one result
|
||||
* and returns that one result, or throws exception if there is any other
|
||||
* number of matches besides one.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function findRenderedComponentWithType<T extends Component<any>, C extends ComponentClass<any>>(
|
||||
root: Component<any>,
|
||||
type: ClassType<any, T, C>,
|
||||
): T;
|
||||
|
||||
/**
|
||||
* Call this in your tests to create a shallow renderer.
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function createRenderer(): ShallowRenderer;
|
||||
|
||||
// NOTES
|
||||
// - the order of these signatures matters - typescript will check the signatures in source order.
|
||||
// If the `() => VoidOrUndefinedOnly` signature is first, it'll erroneously match a Promise returning function for users with
|
||||
// `strictNullChecks: false`.
|
||||
// - VoidOrUndefinedOnly is there to forbid any non-void return values for users with `strictNullChecks: true`
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
/**
|
||||
* Wrap any code rendering and triggering updates to your components into `act()` calls.
|
||||
*
|
||||
* Ensures that the behavior in your tests matches what happens in the browser
|
||||
* more closely by executing pending `useEffect`s before returning. This also
|
||||
* reduces the amount of re-renders done.
|
||||
*
|
||||
* @param callback A synchronous, void callback that will execute as a single, complete React commit.
|
||||
*
|
||||
* @see https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks
|
||||
*
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
// While act does always return Thenable, if a void function is passed, we pretend the return value is also void to not trigger dangling Promise lint rules.
|
||||
export function act(callback: () => VoidOrUndefinedOnly): void;
|
||||
/**
|
||||
* @deprecated https://react.dev/warnings/react-dom-test-utils
|
||||
*/
|
||||
export function act<T>(callback: () => T | Promise<T>): Promise<T>;
|
||||
|
||||
// Intentionally doesn't extend PromiseLike<never>.
|
||||
// Ideally this should be as hard to accidentally use as possible.
|
||||
export interface DebugPromiseLike {
|
||||
// the actual then() in here is 0-ary, but that doesn't count as a PromiseLike.
|
||||
then(onfulfilled: (value: never) => never, onrejected: (reason: never) => never): never;
|
||||
}
|
||||
21
node_modules/@types/react/LICENSE
generated
vendored
Normal file
21
node_modules/@types/react/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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
Normal file
15
node_modules/@types/react/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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: Thu, 05 Feb 2026 09:44:59 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
Normal file
166
node_modules/@types/react/canary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
/**
|
||||
* 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 {@link 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
Normal file
132
node_modules/@types/react/experimental.d.ts
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* 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 {@link https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist}
|
||||
* @see {@link 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 {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert}
|
||||
*/
|
||||
inert?: boolean | undefined;
|
||||
}
|
||||
}
|
||||
161
node_modules/@types/react/global.d.ts
generated
vendored
Normal file
161
node_modules/@types/react/global.d.ts
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
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
Normal file
4587
node_modules/@types/react/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
Normal file
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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
Normal file
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
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
Normal file
206
node_modules/@types/react/package.json
generated
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
{
|
||||
"name": "@types/react",
|
||||
"version": "18.3.28",
|
||||
"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": "0ea06bef541d937c6628af8b44027771d39c4189db995868d91ac6157c442c8f",
|
||||
"typeScriptVersion": "5.2"
|
||||
}
|
||||
166
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
Normal file
166
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
/**
|
||||
* 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 {@link 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
Normal file
132
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* 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 {@link https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist}
|
||||
* @see {@link 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 {@link 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
Normal file
161
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
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
Normal file
4573
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
Normal file
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
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
Normal file
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
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;
|
||||
21
node_modules/@types/stats.js/LICENSE
generated
vendored
Normal file
21
node_modules/@types/stats.js/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
60
node_modules/@types/stats.js/README.md
generated
vendored
Normal file
60
node_modules/@types/stats.js/README.md
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
# Installation
|
||||
> `npm install --save @types/stats.js`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for stats.js (https://github.com/mrdoob/stats.js).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stats.js.
|
||||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stats.js/index.d.ts)
|
||||
````ts
|
||||
declare class Stats {
|
||||
constructor();
|
||||
|
||||
REVISION: number;
|
||||
dom: HTMLDivElement;
|
||||
|
||||
addPanel(panel: Stats.Panel): Stats.Panel;
|
||||
|
||||
/**
|
||||
* @param value 0:fps, 1: ms, 2: mb, 3+: custom
|
||||
*/
|
||||
showPanel(value: number): void;
|
||||
|
||||
begin(): void;
|
||||
end(): number;
|
||||
update(): void;
|
||||
|
||||
// Backwards Compatibility
|
||||
|
||||
/**
|
||||
* @deprecated Use `dom` instead.
|
||||
*/
|
||||
domElement: HTMLDivElement;
|
||||
|
||||
/**
|
||||
* @deprecated Use `showPanel` instead.
|
||||
*/
|
||||
setMode(value: number): void;
|
||||
}
|
||||
|
||||
declare namespace Stats {
|
||||
class Panel {
|
||||
constructor(name: string, foregroundColor: string, backgroundColor: string);
|
||||
dom: HTMLCanvasElement;
|
||||
update(value: number, maxValue: number): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "stats.js" {
|
||||
export = Stats;
|
||||
}
|
||||
|
||||
````
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 05 May 2025 20:35:19 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Gregory Dalton](https://github.com/gregolai), [Harm Berntsen](https://github.com/hberntsen), and [Dan Vanderkam](https://github.com/danvk).
|
||||
41
node_modules/@types/stats.js/index.d.ts
generated
vendored
Normal file
41
node_modules/@types/stats.js/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
declare class Stats {
|
||||
constructor();
|
||||
|
||||
REVISION: number;
|
||||
dom: HTMLDivElement;
|
||||
|
||||
addPanel(panel: Stats.Panel): Stats.Panel;
|
||||
|
||||
/**
|
||||
* @param value 0:fps, 1: ms, 2: mb, 3+: custom
|
||||
*/
|
||||
showPanel(value: number): void;
|
||||
|
||||
begin(): void;
|
||||
end(): number;
|
||||
update(): void;
|
||||
|
||||
// Backwards Compatibility
|
||||
|
||||
/**
|
||||
* @deprecated Use `dom` instead.
|
||||
*/
|
||||
domElement: HTMLDivElement;
|
||||
|
||||
/**
|
||||
* @deprecated Use `showPanel` instead.
|
||||
*/
|
||||
setMode(value: number): void;
|
||||
}
|
||||
|
||||
declare namespace Stats {
|
||||
class Panel {
|
||||
constructor(name: string, foregroundColor: string, backgroundColor: string);
|
||||
dom: HTMLCanvasElement;
|
||||
update(value: number, maxValue: number): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "stats.js" {
|
||||
export = Stats;
|
||||
}
|
||||
36
node_modules/@types/stats.js/package.json
generated
vendored
Normal file
36
node_modules/@types/stats.js/package.json
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "@types/stats.js",
|
||||
"version": "0.17.4",
|
||||
"description": "TypeScript definitions for stats.js",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stats.js",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Gregory Dalton",
|
||||
"githubUsername": "gregolai",
|
||||
"url": "https://github.com/gregolai"
|
||||
},
|
||||
{
|
||||
"name": "Harm Berntsen",
|
||||
"githubUsername": "hberntsen",
|
||||
"url": "https://github.com/hberntsen"
|
||||
},
|
||||
{
|
||||
"name": "Dan Vanderkam",
|
||||
"githubUsername": "danvk",
|
||||
"url": "https://github.com/danvk"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/stats.js"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "33db1076f265c7fe8fc161806c4b7bf2b877c76e5896c2a460c0e23b3b6ba840",
|
||||
"typeScriptVersion": "5.1"
|
||||
}
|
||||
21
node_modules/@types/three/LICENSE
generated
vendored
Normal file
21
node_modules/@types/three/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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/three/README.md
generated
vendored
Normal file
15
node_modules/@types/three/README.md
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
# Installation
|
||||
> `npm install --save @types/three`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for three (https://threejs.org/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 09 Jul 2025 18:02:54 GMT
|
||||
* Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Josh Ellis](https://github.com/joshuaellis), and [Nathan Bierema](https://github.com/Methuselah96).
|
||||
1
node_modules/@types/three/build/three.core.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.core.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.Core.js";
|
||||
1
node_modules/@types/three/build/three.core.min.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.core.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.Core.js";
|
||||
1
node_modules/@types/three/build/three.d.cts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.d.cts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.js";
|
||||
1
node_modules/@types/three/build/three.module.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.module.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.js";
|
||||
1
node_modules/@types/three/build/three.module.min.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.module.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.js";
|
||||
1
node_modules/@types/three/build/three.tsl.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.tsl.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.TSL.js";
|
||||
1
node_modules/@types/three/build/three.tsl.min.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.tsl.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.TSL.js";
|
||||
1
node_modules/@types/three/build/three.webgpu.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.webgpu.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.WebGPU.js";
|
||||
1
node_modules/@types/three/build/three.webgpu.min.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.webgpu.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.WebGPU.js";
|
||||
1
node_modules/@types/three/build/three.webgpu.nodes.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.webgpu.nodes.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.WebGPU.Nodes.js";
|
||||
1
node_modules/@types/three/build/three.webgpu.nodes.min.d.ts
generated
vendored
Normal file
1
node_modules/@types/three/build/three.webgpu.nodes.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "../src/Three.WebGPU.Nodes.js";
|
||||
286
node_modules/@types/three/examples/jsm/Addons.d.ts
generated
vendored
Normal file
286
node_modules/@types/three/examples/jsm/Addons.d.ts
generated
vendored
Normal file
@@ -0,0 +1,286 @@
|
||||
export * from "./animation/AnimationClipCreator.js";
|
||||
export * from "./animation/CCDIKSolver.js";
|
||||
|
||||
export { default as WebGL } from "./capabilities/WebGL.js";
|
||||
|
||||
export * from "./controls/ArcballControls.js";
|
||||
export * from "./controls/DragControls.js";
|
||||
export * from "./controls/FirstPersonControls.js";
|
||||
export * from "./controls/FlyControls.js";
|
||||
export * from "./controls/MapControls.js";
|
||||
export * from "./controls/OrbitControls.js";
|
||||
export * from "./controls/PointerLockControls.js";
|
||||
export * from "./controls/TrackballControls.js";
|
||||
export * from "./controls/TransformControls.js";
|
||||
|
||||
export * from "./csm/CSM.js";
|
||||
export * from "./csm/CSMFrustum.js";
|
||||
export * from "./csm/CSMHelper.js";
|
||||
export * from "./csm/CSMShader.js";
|
||||
|
||||
export * as Curves from "./curves/CurveExtras.js";
|
||||
export * from "./curves/NURBSCurve.js";
|
||||
export * from "./curves/NURBSSurface.js";
|
||||
export * as NURBSUtils from "./curves/NURBSUtils.js";
|
||||
export * from "./curves/NURBSVolume.js";
|
||||
|
||||
export * from "./effects/AnaglyphEffect.js";
|
||||
export * from "./effects/AsciiEffect.js";
|
||||
export * from "./effects/OutlineEffect.js";
|
||||
export * from "./effects/ParallaxBarrierEffect.js";
|
||||
export * from "./effects/StereoEffect.js";
|
||||
|
||||
export * from "./environments/DebugEnvironment.js";
|
||||
export * from "./environments/RoomEnvironment.js";
|
||||
|
||||
export * from "./exporters/DRACOExporter.js";
|
||||
export * from "./exporters/EXRExporter.js";
|
||||
export * from "./exporters/GLTFExporter.js";
|
||||
export * from "./exporters/KTX2Exporter.js";
|
||||
export * from "./exporters/OBJExporter.js";
|
||||
export * from "./exporters/PLYExporter.js";
|
||||
export * from "./exporters/STLExporter.js";
|
||||
export * from "./exporters/USDZExporter.js";
|
||||
|
||||
export * from "./geometries/BoxLineGeometry.js";
|
||||
export * from "./geometries/ConvexGeometry.js";
|
||||
export * from "./geometries/DecalGeometry.js";
|
||||
export * from "./geometries/ParametricFunctions.js";
|
||||
export * from "./geometries/ParametricGeometry.js";
|
||||
export * from "./geometries/RoundedBoxGeometry.js";
|
||||
export * from "./geometries/TeapotGeometry.js";
|
||||
export * from "./geometries/TextGeometry.js";
|
||||
|
||||
export * from "./helpers/LightProbeHelper.js";
|
||||
export * from "./helpers/OctreeHelper.js";
|
||||
export * from "./helpers/PositionalAudioHelper.js";
|
||||
export * from "./helpers/RectAreaLightHelper.js";
|
||||
export * from "./helpers/TextureHelper.js";
|
||||
export * from "./helpers/VertexNormalsHelper.js";
|
||||
export * from "./helpers/VertexTangentsHelper.js";
|
||||
export * from "./helpers/ViewHelper.js";
|
||||
|
||||
export * from "./interactive/HTMLMesh.js";
|
||||
export * from "./interactive/InteractiveGroup.js";
|
||||
export * from "./interactive/SelectionBox.js";
|
||||
export * from "./interactive/SelectionHelper.js";
|
||||
|
||||
export * from "./lights/LightProbeGenerator.js";
|
||||
export * from "./lights/RectAreaLightUniformsLib.js";
|
||||
|
||||
export * from "./lines/Line2.js";
|
||||
export * from "./lines/LineGeometry.js";
|
||||
export * from "./lines/LineMaterial.js";
|
||||
export * from "./lines/LineSegments2.js";
|
||||
export * from "./lines/LineSegmentsGeometry.js";
|
||||
export * from "./lines/Wireframe.js";
|
||||
export * from "./lines/WireframeGeometry2.js";
|
||||
|
||||
export * from "./loaders/3DMLoader.js";
|
||||
export * from "./loaders/3MFLoader.js";
|
||||
export * from "./loaders/AMFLoader.js";
|
||||
export * from "./loaders/BVHLoader.js";
|
||||
export * from "./loaders/ColladaLoader.js";
|
||||
export * from "./loaders/DDSLoader.js";
|
||||
export * from "./loaders/DRACOLoader.js";
|
||||
export * from "./loaders/EXRLoader.js";
|
||||
export * from "./loaders/FBXLoader.js";
|
||||
export * from "./loaders/FontLoader.js";
|
||||
export * from "./loaders/GCodeLoader.js";
|
||||
export * from "./loaders/GLTFLoader.js";
|
||||
export * from "./loaders/HDRCubeTextureLoader.js";
|
||||
export * from "./loaders/IESLoader.js";
|
||||
export * from "./loaders/KMZLoader.js";
|
||||
export * from "./loaders/KTX2Loader.js";
|
||||
export * from "./loaders/KTXLoader.js";
|
||||
export * from "./loaders/LDrawLoader.js";
|
||||
export * from "./loaders/LottieLoader.js";
|
||||
export * from "./loaders/LUT3dlLoader.js";
|
||||
export * from "./loaders/LUTCubeLoader.js";
|
||||
export * from "./loaders/LWOLoader.js";
|
||||
export * from "./loaders/MD2Loader.js";
|
||||
export * from "./loaders/MDDLoader.js";
|
||||
export * from "./loaders/MTLLoader.js";
|
||||
export * from "./loaders/NRRDLoader.js";
|
||||
export * from "./loaders/OBJLoader.js";
|
||||
export * from "./loaders/PCDLoader.js";
|
||||
export * from "./loaders/PDBLoader.js";
|
||||
export * from "./loaders/PLYLoader.js";
|
||||
export * from "./loaders/PVRLoader.js";
|
||||
export * from "./loaders/RGBELoader.js";
|
||||
export * from "./loaders/RGBMLoader.js";
|
||||
export * from "./loaders/STLLoader.js";
|
||||
export * from "./loaders/SVGLoader.js";
|
||||
export * from "./loaders/TDSLoader.js";
|
||||
export * from "./loaders/TGALoader.js";
|
||||
export * from "./loaders/TIFFLoader.js";
|
||||
export * from "./loaders/TTFLoader.js";
|
||||
export * from "./loaders/UltraHDRLoader.js";
|
||||
export * from "./loaders/USDZLoader.js";
|
||||
export * from "./loaders/VOXLoader.js";
|
||||
export * from "./loaders/VRMLLoader.js";
|
||||
export * from "./loaders/VTKLoader.js";
|
||||
export * from "./loaders/XYZLoader.js";
|
||||
|
||||
export * from "./materials/LDrawConditionalLineMaterial.js";
|
||||
export * from "./materials/MeshGouraudMaterial.js";
|
||||
export * from "./materials/MeshPostProcessingMaterial.js";
|
||||
|
||||
export * from "./math/Capsule.js";
|
||||
export * from "./math/ColorConverter.js";
|
||||
export * from "./math/ConvexHull.js";
|
||||
export * from "./math/ImprovedNoise.js";
|
||||
export * from "./math/Lut.js";
|
||||
export * from "./math/MeshSurfaceSampler.js";
|
||||
export * from "./math/OBB.js";
|
||||
export * from "./math/Octree.js";
|
||||
export * from "./math/SimplexNoise.js";
|
||||
|
||||
export * from "./misc/ConvexObjectBreaker.js";
|
||||
export * from "./misc/GPUComputationRenderer.js";
|
||||
export * from "./misc/Gyroscope.js";
|
||||
export * from "./misc/MD2Character.js";
|
||||
export * from "./misc/MD2CharacterComplex.js";
|
||||
export * from "./misc/MorphAnimMesh.js";
|
||||
export * from "./misc/MorphBlendMesh.js";
|
||||
export * from "./misc/ProgressiveLightMap.js";
|
||||
export * from "./misc/RollerCoaster.js";
|
||||
export * from "./misc/Timer.js";
|
||||
export * from "./misc/TubePainter.js";
|
||||
export * from "./misc/Volume.js";
|
||||
export * from "./misc/VolumeSlice.js";
|
||||
|
||||
export * from "./modifiers/CurveModifier.js";
|
||||
export * from "./modifiers/EdgeSplitModifier.js";
|
||||
export * from "./modifiers/SimplifyModifier.js";
|
||||
export * from "./modifiers/TessellateModifier.js";
|
||||
|
||||
export * from "./objects/GroundedSkybox.js";
|
||||
export * from "./objects/Lensflare.js";
|
||||
export * from "./objects/MarchingCubes.js";
|
||||
export * from "./objects/Reflector.js";
|
||||
export * from "./objects/ReflectorForSSRPass.js";
|
||||
export * from "./objects/Refractor.js";
|
||||
export * from "./objects/ShadowMesh.js";
|
||||
export * from "./objects/Sky.js";
|
||||
export * from "./objects/Water.js";
|
||||
export { Water as Water2 } from "./objects/Water2.js";
|
||||
export type { WaterOptions as Water2Options } from "./objects/Water2.js";
|
||||
|
||||
export * from "./physics/AmmoPhysics.js";
|
||||
export * from "./physics/RapierPhysics.js";
|
||||
|
||||
export * from "./postprocessing/AfterimagePass.js";
|
||||
export * from "./postprocessing/BloomPass.js";
|
||||
export * from "./postprocessing/BokehPass.js";
|
||||
export * from "./postprocessing/ClearPass.js";
|
||||
export * from "./postprocessing/CubeTexturePass.js";
|
||||
export * from "./postprocessing/DotScreenPass.js";
|
||||
export * from "./postprocessing/EffectComposer.js";
|
||||
export * from "./postprocessing/FilmPass.js";
|
||||
export * from "./postprocessing/GlitchPass.js";
|
||||
export * from "./postprocessing/GTAOPass.js";
|
||||
export * from "./postprocessing/HalftonePass.js";
|
||||
export * from "./postprocessing/LUTPass.js";
|
||||
export * from "./postprocessing/MaskPass.js";
|
||||
export * from "./postprocessing/OutlinePass.js";
|
||||
export * from "./postprocessing/OutputPass.js";
|
||||
export * from "./postprocessing/Pass.js";
|
||||
export * from "./postprocessing/RenderPass.js";
|
||||
export * from "./postprocessing/RenderPixelatedPass.js";
|
||||
export * from "./postprocessing/SAOPass.js";
|
||||
export * from "./postprocessing/SavePass.js";
|
||||
export * from "./postprocessing/ShaderPass.js";
|
||||
export * from "./postprocessing/SMAAPass.js";
|
||||
export * from "./postprocessing/SSAARenderPass.js";
|
||||
export * from "./postprocessing/SSAOPass.js";
|
||||
export * from "./postprocessing/SSRPass.js";
|
||||
export * from "./postprocessing/TAARenderPass.js";
|
||||
export * from "./postprocessing/TexturePass.js";
|
||||
export * from "./postprocessing/UnrealBloomPass.js";
|
||||
|
||||
export * from "./renderers/CSS2DRenderer.js";
|
||||
export * from "./renderers/CSS3DRenderer.js";
|
||||
export * from "./renderers/Projector.js";
|
||||
export * from "./renderers/SVGRenderer.js";
|
||||
|
||||
export * from "./shaders/ACESFilmicToneMappingShader.js";
|
||||
export * from "./shaders/AfterimageShader.js";
|
||||
export * from "./shaders/BasicShader.js";
|
||||
export * from "./shaders/BleachBypassShader.js";
|
||||
export * from "./shaders/BlendShader.js";
|
||||
export * from "./shaders/BokehShader.js";
|
||||
export { BokehShader as BokehShader2 } from "./shaders/BokehShader2.js";
|
||||
export * from "./shaders/BrightnessContrastShader.js";
|
||||
export * from "./shaders/ColorCorrectionShader.js";
|
||||
export * from "./shaders/ColorifyShader.js";
|
||||
export * from "./shaders/ConvolutionShader.js";
|
||||
export * from "./shaders/CopyShader.js";
|
||||
export * from "./shaders/DepthLimitedBlurShader.js";
|
||||
export * from "./shaders/DigitalGlitch.js";
|
||||
export * from "./shaders/DOFMipMapShader.js";
|
||||
export * from "./shaders/DotScreenShader.js";
|
||||
export * from "./shaders/ExposureShader.js";
|
||||
export * from "./shaders/FilmShader.js";
|
||||
export * from "./shaders/FocusShader.js";
|
||||
export * from "./shaders/FreiChenShader.js";
|
||||
export * from "./shaders/FXAAShader.js";
|
||||
export * from "./shaders/GammaCorrectionShader.js";
|
||||
export * from "./shaders/GodRaysShader.js";
|
||||
export * from "./shaders/GTAOShader.js";
|
||||
export * from "./shaders/HalftoneShader.js";
|
||||
export * from "./shaders/HorizontalBlurShader.js";
|
||||
export * from "./shaders/HorizontalTiltShiftShader.js";
|
||||
export * from "./shaders/HueSaturationShader.js";
|
||||
export * from "./shaders/KaleidoShader.js";
|
||||
export * from "./shaders/LuminosityHighPassShader.js";
|
||||
export * from "./shaders/LuminosityShader.js";
|
||||
export * from "./shaders/MirrorShader.js";
|
||||
export * from "./shaders/NormalMapShader.js";
|
||||
export * from "./shaders/OutputShader.js";
|
||||
export * from "./shaders/RGBShiftShader.js";
|
||||
export * from "./shaders/SAOShader.js";
|
||||
export * from "./shaders/SepiaShader.js";
|
||||
export * from "./shaders/SMAAShader.js";
|
||||
export * from "./shaders/SobelOperatorShader.js";
|
||||
export * from "./shaders/SSAOShader.js";
|
||||
export * from "./shaders/SSRShader.js";
|
||||
export * from "./shaders/SubsurfaceScatteringShader.js";
|
||||
export * from "./shaders/TechnicolorShader.js";
|
||||
export * from "./shaders/ToonShader.js";
|
||||
export * from "./shaders/TriangleBlurShader.js";
|
||||
export * from "./shaders/UnpackDepthRGBAShader.js";
|
||||
export * from "./shaders/VelocityShader.js";
|
||||
export * from "./shaders/VerticalBlurShader.js";
|
||||
export * from "./shaders/VerticalTiltShiftShader.js";
|
||||
export * from "./shaders/VignetteShader.js";
|
||||
export * from "./shaders/VolumeShader.js";
|
||||
export * from "./shaders/WaterRefractionShader.js";
|
||||
|
||||
export * from "./textures/FlakesTexture.js";
|
||||
|
||||
export * as BufferGeometryUtils from "./utils/BufferGeometryUtils.js";
|
||||
export * as CameraUtils from "./utils/CameraUtils.js";
|
||||
export * as GeometryCompressionUtils from "./utils/GeometryCompressionUtils.js";
|
||||
export * as GeometryUtils from "./utils/GeometryUtils.js";
|
||||
export * from "./utils/LDrawUtils.js";
|
||||
export * as SceneUtils from "./utils/SceneUtils.js";
|
||||
export * from "./utils/ShadowMapViewer.js";
|
||||
export * as SkeletonUtils from "./utils/SkeletonUtils.js";
|
||||
export * as SortUtils from "./utils/SortUtils.js";
|
||||
export * from "./utils/UVsDebug.js";
|
||||
export * from "./utils/WebGLTextureUtils.js";
|
||||
export * from "./utils/WorkerPool.js";
|
||||
|
||||
export * from "./webxr/ARButton.js";
|
||||
export * from "./webxr/OculusHandModel.js";
|
||||
export * from "./webxr/OculusHandPointerModel.js";
|
||||
export * from "./webxr/Text2D.js";
|
||||
export * from "./webxr/VRButton.js";
|
||||
export * from "./webxr/XRButton.js";
|
||||
export * from "./webxr/XRControllerModelFactory.js";
|
||||
export * from "./webxr/XREstimatedLight.js";
|
||||
export * from "./webxr/XRHandMeshModel.js";
|
||||
export * from "./webxr/XRHandModelFactory.js";
|
||||
export * from "./webxr/XRHandPrimitiveModel.js";
|
||||
export * from "./webxr/XRPlanes.js";
|
||||
12
node_modules/@types/three/examples/jsm/animation/AnimationClipCreator.d.ts
generated
vendored
Normal file
12
node_modules/@types/three/examples/jsm/animation/AnimationClipCreator.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { AnimationClip, Vector3 } from "three";
|
||||
|
||||
export interface AnimationClipCreator {
|
||||
CreateRotationAnimation(period: number, axis: string): AnimationClip;
|
||||
CreateScaleAxisAnimation(period: number, axis: string): AnimationClip;
|
||||
CreateShakeAnimation(duration: number, shakeScale: Vector3): AnimationClip;
|
||||
CreatePulsationAnimation(duration: number, pulseScale: number): AnimationClip;
|
||||
CreateVisibilityAnimation(duration: number): AnimationClip;
|
||||
CreateMaterialColorAnimation(duration: number, colors: number[]): AnimationClip;
|
||||
}
|
||||
|
||||
export const AnimationClipCreator: AnimationClipCreator;
|
||||
44
node_modules/@types/three/examples/jsm/animation/CCDIKSolver.d.ts
generated
vendored
Normal file
44
node_modules/@types/three/examples/jsm/animation/CCDIKSolver.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { LineBasicMaterial, MeshBasicMaterial, Object3D, SkinnedMesh, SphereGeometry, Vector3 } from "three";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
export interface IK {
|
||||
effector: number;
|
||||
iteration?: number | undefined;
|
||||
links: Array<{
|
||||
enabled?: boolean | undefined;
|
||||
index: number;
|
||||
limitation?: Vector3 | undefined;
|
||||
rotationMin?: Vector3 | undefined;
|
||||
rotationMax?: Vector3 | undefined;
|
||||
}>;
|
||||
minAngle?: number | undefined;
|
||||
maxAngle?: number | undefined;
|
||||
target: number;
|
||||
blendFactor?: number | undefined;
|
||||
}
|
||||
|
||||
export class CCDIKSolver {
|
||||
mesh: SkinnedMesh;
|
||||
iks: IK[];
|
||||
|
||||
constructor(mesh: SkinnedMesh, iks?: IK[]);
|
||||
|
||||
update(globalBlendFactor?: number): this;
|
||||
updateOne(ik: IK, overrideBlend?: number): this;
|
||||
createHelper(sphereSize?: number): CCDIKHelper;
|
||||
}
|
||||
|
||||
export class CCDIKHelper extends Object3D {
|
||||
root: SkinnedMesh;
|
||||
iks: IK[];
|
||||
|
||||
sphereGeometry: SphereGeometry;
|
||||
targetSphereMaterial: MeshBasicMaterial;
|
||||
effectorSphereMaterial: MeshBasicMaterial;
|
||||
linkSphereMaterial: MeshBasicMaterial;
|
||||
lineMaterial: LineBasicMaterial;
|
||||
|
||||
constructor(mesh: SkinnedMesh, iks?: IK[], sphereSize?: number);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
6
node_modules/@types/three/examples/jsm/capabilities/WebGL.d.ts
generated
vendored
Normal file
6
node_modules/@types/three/examples/jsm/capabilities/WebGL.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export default class WebGL {
|
||||
static isWebGL2Available(): boolean;
|
||||
static isColorSpaceAvailable(colorSpace: PredefinedColorSpace): boolean;
|
||||
static getWebGL2ErrorMessage(): HTMLElement;
|
||||
static getErrorMessage(version: number): HTMLElement;
|
||||
}
|
||||
7
node_modules/@types/three/examples/jsm/capabilities/WebGPU.d.ts
generated
vendored
Normal file
7
node_modules/@types/three/examples/jsm/capabilities/WebGPU.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// tslint:disable-next-line:no-unnecessary-class
|
||||
|
||||
export default class WebGPU {
|
||||
static isAvailable(): boolean;
|
||||
static getStaticAdapter(): unknown;
|
||||
static getErrorMessage(): HTMLElement;
|
||||
}
|
||||
208
node_modules/@types/three/examples/jsm/controls/ArcballControls.d.ts
generated
vendored
Normal file
208
node_modules/@types/three/examples/jsm/controls/ArcballControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
import { Camera, Controls, Raycaster, Scene } from "three";
|
||||
|
||||
export type ArcballControlsMouseActionOperation = "PAN" | "ROTATE" | "ZOOM" | "FOV";
|
||||
|
||||
export type ArcballControlsMouseActionMouse = 0 | 1 | 2 | "WHEEL";
|
||||
|
||||
export type ArcballControlsMouseActionKey = "SHIFT" | "CTRL";
|
||||
|
||||
export interface ArcballControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction was initiated.
|
||||
*/
|
||||
start: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction has finished.
|
||||
*/
|
||||
end: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Arcball controls allow the camera to be controlled by a virtual trackball with full touch support and advanced
|
||||
* navigation functionality.
|
||||
*/
|
||||
declare class ArcballControls extends Controls<ArcballControlsEventMap> {
|
||||
/**
|
||||
* The scene rendered by the camera.
|
||||
*/
|
||||
scene: Scene | null;
|
||||
|
||||
/**
|
||||
* The size of the gizmo relative to the screen width and height. Default is 0.67.
|
||||
*/
|
||||
radiusFactor: number;
|
||||
|
||||
/**
|
||||
* Duration time of focus animation.
|
||||
*/
|
||||
focusAnimationTime: number;
|
||||
|
||||
/**
|
||||
* If true, camera's near and far values will be adjusted every time zoom is performed trying to maintain the same
|
||||
* visible portion given by initial near and far values ( {@link PerspectiveCamera} only ). Default is false.
|
||||
*/
|
||||
adjustNearFar: boolean;
|
||||
|
||||
/**
|
||||
* The scaling factor used when performing zoom operation.
|
||||
*/
|
||||
scaleFactor: number;
|
||||
|
||||
/**
|
||||
* The damping inertia used if [page:.enableAnimations] is set to true.
|
||||
*/
|
||||
dampingFactor: number;
|
||||
|
||||
/**
|
||||
* Maximum angular velocity allowed on rotation animation start.
|
||||
*/
|
||||
wMax: number;
|
||||
|
||||
/**
|
||||
* Set to true to enable animations for rotation (damping) and focus operation. Default is true.
|
||||
*/
|
||||
enableAnimations: boolean;
|
||||
|
||||
/**
|
||||
* Enable or disable camera focusing on double-tap (or click) operations. Default is true.
|
||||
*/
|
||||
enableFocus: boolean;
|
||||
|
||||
/**
|
||||
* When set to true, a grid will appear when panning operation is being performed (desktop interaction only). Default is false.
|
||||
*/
|
||||
enableGrid: boolean;
|
||||
|
||||
/**
|
||||
* Set to true to make zoom become cursor centered.
|
||||
*/
|
||||
cursorZoom: boolean;
|
||||
|
||||
/**
|
||||
* Speed of rotation. Default is 1.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* Enable or disable camera panning. Default is true.
|
||||
*/
|
||||
enablePan: boolean;
|
||||
|
||||
/**
|
||||
* Enable or disable camera rotation. Default is true.
|
||||
*/
|
||||
enableRotate: boolean;
|
||||
|
||||
/**
|
||||
* Enable or disable zooming of the camera.
|
||||
*/
|
||||
enableZoom: boolean;
|
||||
|
||||
/**
|
||||
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is 0.
|
||||
*/
|
||||
minDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is 0.
|
||||
*/
|
||||
minZoom: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxZoom: number;
|
||||
|
||||
/**
|
||||
* @param camera The camera to be controlled. The camera must not be a child of another object, unless that object
|
||||
* is the scene itself.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
* @param scene The scene rendered by the camera. If not given, gizmos cannot be shown. (optional)
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement | null, scene?: Scene | null);
|
||||
|
||||
/**
|
||||
* Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of
|
||||
* conflict, replaces the existing one.
|
||||
* @param operation Operations can be specified as 'ROTATE', 'PAN', 'FOV' or 'ZOOM'.
|
||||
* @param mouse Mouse inputs can be specified as mouse buttons 0, 1 and 2 or 'WHEEL' for wheel notches.
|
||||
* @param key Keyboard modifiers can be specified as 'CTRL', 'SHIFT' or null if not needed.
|
||||
*/
|
||||
setMouseAction(
|
||||
operation: ArcballControlsMouseActionOperation,
|
||||
mouse: ArcballControlsMouseActionMouse,
|
||||
key?: ArcballControlsMouseActionKey | null,
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Removes a mouse action by specifying its mouse/key combination.
|
||||
* @param mouse Mouse inputs can be specified as mouse buttons 0, 1 and 2 or 'WHEEL' for wheel notches.
|
||||
* @param key Keyboard modifiers can be specified as 'CTRL', 'SHIFT' or null if not needed.
|
||||
*/
|
||||
unsetMouseAction(mouse: ArcballControlsMouseActionMouse, key?: ArcballControlsMouseActionKey | null): boolean;
|
||||
|
||||
/**
|
||||
* Make gizmos more or less visible.
|
||||
*/
|
||||
activateGizmos(isActive: boolean): void;
|
||||
|
||||
/**
|
||||
* Set the camera to be controlled. Must be called in order to set a new camera to be controlled.
|
||||
*/
|
||||
setCamera(camera: Camera): void;
|
||||
|
||||
/**
|
||||
* Set the visible property of gizmos.
|
||||
*/
|
||||
setGizmosVisible(value: boolean): void;
|
||||
|
||||
/**
|
||||
* Update the `radiusFactor` value, redraw the gizmo and send a `changeEvent` to visualize the changes.
|
||||
*/
|
||||
setTbRadius(value: number): void;
|
||||
|
||||
/**
|
||||
* Reset the controls to their state from either the last time the {@link .saveState} was called, or the initial
|
||||
* state.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Copy the current state to clipboard (as a readable JSON text).
|
||||
*/
|
||||
copyState(): void;
|
||||
|
||||
/**
|
||||
* Set the controls state from the clipboard, assumes that the clipboard stores a JSON text as saved from
|
||||
* {@link .copyState}.
|
||||
*/
|
||||
pasteState(): void;
|
||||
|
||||
/**
|
||||
* Save the current state of the controls. This can later be recovered with {@link .reset}.
|
||||
*/
|
||||
saveState(): void;
|
||||
|
||||
/**
|
||||
* Returns the {@link Raycaster} object that is used for user interaction. This object is shared between all
|
||||
* instances of ArcballControls. If you set the [.layers]{@link Object3D.layers} property of the
|
||||
* {@link ArcballControls}, you will also want to set the [.layers]{@link Raycaster.layers} property on the
|
||||
* {@link Raycaster} with a matching value, or else the {@link ArcballControls} won't work as expected.
|
||||
*/
|
||||
getRaycaster(): Raycaster;
|
||||
|
||||
update(): void;
|
||||
}
|
||||
|
||||
export { ArcballControls };
|
||||
111
node_modules/@types/three/examples/jsm/controls/DragControls.d.ts
generated
vendored
Normal file
111
node_modules/@types/three/examples/jsm/controls/DragControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
import { Camera, Controls, MOUSE, Object3D, Raycaster, TOUCH } from "three";
|
||||
|
||||
export interface DragControlsEventMap {
|
||||
/**
|
||||
* Fires when the pointer is moved onto a 3D object, or onto one of its children.
|
||||
*/
|
||||
hoveron: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the pointer is moved out of a 3D object.
|
||||
*/
|
||||
hoveroff: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the user starts to drag a 3D object.
|
||||
*/
|
||||
dragstart: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the user drags a 3D object.
|
||||
*/
|
||||
drag: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the user has finished dragging a 3D object.
|
||||
*/
|
||||
dragend: { object: Object3D };
|
||||
}
|
||||
|
||||
declare class DragControls extends Controls<DragControlsEventMap> {
|
||||
/**
|
||||
* An array of draggable 3D objects.
|
||||
*/
|
||||
objects: Object3D[];
|
||||
|
||||
/**
|
||||
* Whether children of draggable objects can be dragged independently from their parent. Default is `true`.
|
||||
*/
|
||||
recursive: boolean;
|
||||
|
||||
/**
|
||||
* This option only works if the {@link .objects} array contains a single draggable group object. If set to `true`,
|
||||
* {@link DragControls} does not transform individual objects but the entire group. Default is `false`.
|
||||
*/
|
||||
transformGroup: boolean;
|
||||
|
||||
/**
|
||||
* The speed at which the object will rotate when dragged in `rotate` mode. The higher the number the faster the
|
||||
* rotation. Default is `1`.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* The internal raycaster used for detecting 3D objects.
|
||||
*/
|
||||
raycaster: Raycaster;
|
||||
|
||||
/**
|
||||
* This object defines what type of actions are assigned to the available mouse buttons.
|
||||
*/
|
||||
mouseButtons: {
|
||||
LEFT?: MOUSE | null | undefined;
|
||||
MIDDLE?: MOUSE | null | undefined;
|
||||
RIGHT?: MOUSE | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* This object defines what type of actions are assigned to what kind of touch interaction.
|
||||
*/
|
||||
touches: { ONE?: TOUCH | null | undefined };
|
||||
|
||||
/**
|
||||
* Creates a new instance of DragControls.
|
||||
* @param objects An array of draggable 3D objects.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | null);
|
||||
|
||||
/**
|
||||
* Returns the internal {@link Raycaster} instance that is used for intersection tests.
|
||||
* @deprecated getRaycaster() has been deprecated. Use controls.raycaster instead.
|
||||
*/
|
||||
getRaycaster(): Raycaster;
|
||||
|
||||
/**
|
||||
* Sets an array of draggable objects by overwriting the existing one.
|
||||
* @deprecated setObjects() has been deprecated. Use controls.objects instead.
|
||||
*/
|
||||
setObjects(objects: readonly Object3D[]): void;
|
||||
|
||||
/**
|
||||
* Returns the array of draggable objects.
|
||||
* @deprecated getObjects() has been deprecated. Use controls.objects instead.
|
||||
*/
|
||||
getObjects(): Object3D[];
|
||||
|
||||
/**
|
||||
* Adds the event listeners of the controls.
|
||||
* @deprecated activate() has been renamed to connect().
|
||||
*/
|
||||
activate(): void;
|
||||
|
||||
/**
|
||||
* Removes the event listeners of the controls.
|
||||
* @deprecated deactivate() has been renamed to disconnect().
|
||||
*/
|
||||
deactivate(): void;
|
||||
}
|
||||
|
||||
export { DragControls };
|
||||
101
node_modules/@types/three/examples/jsm/controls/FirstPersonControls.d.ts
generated
vendored
Normal file
101
node_modules/@types/three/examples/jsm/controls/FirstPersonControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
import { Camera, Controls, Vector3 } from "three";
|
||||
|
||||
/**
|
||||
* This class is an alternative implementation of {@link FlyControls}.
|
||||
*/
|
||||
declare class FirstPersonControls extends Controls<{}> {
|
||||
/**
|
||||
* The movement speed. Default is *1*.
|
||||
*/
|
||||
movementSpeed: number;
|
||||
|
||||
/**
|
||||
* The look around speed. Default is `0.005`.
|
||||
*/
|
||||
lookSpeed: number;
|
||||
|
||||
/**
|
||||
* Whether or not it's possible to vertically look around. Default is `true`.
|
||||
*/
|
||||
lookVertical: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the camera is automatically moved forward. Default is `false`.
|
||||
*/
|
||||
autoForward: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not it's possible to look around. Default is `true`.
|
||||
*/
|
||||
activeLook: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the camera's height influences the forward movement speed. Default is `false`.
|
||||
* Use the properties {@link .heightCoef}, {@link .heightMin} and {@link .heightMax} for configuration
|
||||
*/
|
||||
heightSpeed: boolean;
|
||||
|
||||
/**
|
||||
* Determines how much faster the camera moves when it's y-component is near {@link .heightMax}. Default is *1*.
|
||||
*/
|
||||
heightCoef: number;
|
||||
|
||||
/**
|
||||
* Lower camera height limit used for movement speed adjustment. Default is *0*.
|
||||
*/
|
||||
heightMin: number;
|
||||
|
||||
/**
|
||||
* Upper camera height limit used for movement speed adjustment. Default is *1*.
|
||||
*/
|
||||
heightMax: number;
|
||||
|
||||
/**
|
||||
* Whether or not looking around is vertically constrained by [{@link .verticalMin}, {@link .verticalMax}]. Default
|
||||
* is `false`.
|
||||
*/
|
||||
constrainVertical: boolean;
|
||||
|
||||
/**
|
||||
* How far you can vertically look around, lower limit. Range is 0 to Math.PI radians. Default is *0*.
|
||||
*/
|
||||
verticalMin: number;
|
||||
|
||||
/**
|
||||
* How far you can vertically look around, upper limit. Range is 0 to Math.PI radians. Default is `Math.PI`.
|
||||
*/
|
||||
verticalMax: number;
|
||||
|
||||
/**
|
||||
* Whether or not the mouse is pressed down. Read-only property.
|
||||
*/
|
||||
mouseDragOn: boolean;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link FirstPersonControls}.
|
||||
* @param object The camera to be controlled.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(object: Camera, domElement?: HTMLElement);
|
||||
|
||||
/**
|
||||
* Should be called if the application window is resized.
|
||||
*/
|
||||
handleResize(): void;
|
||||
|
||||
/**
|
||||
* Ensures the controls orient the camera towards the defined target position.
|
||||
* @param vector A vector representing the target position.
|
||||
*/
|
||||
lookAt(vector: Vector3): this;
|
||||
|
||||
/**
|
||||
* Ensures the controls orient the camera towards the defined target position.
|
||||
* @param x The x component of the world space position.
|
||||
* @param y The y component of the world space position.
|
||||
* @param z The z component of the world space position.
|
||||
*/
|
||||
lookAt(x: number, y: number, z: number): this;
|
||||
}
|
||||
|
||||
export { FirstPersonControls };
|
||||
44
node_modules/@types/three/examples/jsm/controls/FlyControls.d.ts
generated
vendored
Normal file
44
node_modules/@types/three/examples/jsm/controls/FlyControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Camera, Controls } from "three";
|
||||
|
||||
export interface FlyControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link FlyControls} enables a navigation similar to fly modes in DCC tools like Blender. You can arbitrarily
|
||||
* transform the camera in 3D space without any limitations (e.g. focus on a specific target).
|
||||
*/
|
||||
declare class FlyControls extends Controls<FlyControlsEventMap> {
|
||||
/**
|
||||
* The movement speed. Default is `1`.
|
||||
*/
|
||||
movementSpeed: number;
|
||||
|
||||
/**
|
||||
* The rotation speed. Default is `0.005`.
|
||||
*/
|
||||
rollSpeed: number;
|
||||
|
||||
/**
|
||||
* If set to `true`, you can only look around by performing a drag interaction. Default is `false`.
|
||||
*/
|
||||
dragToLook: boolean;
|
||||
|
||||
/**
|
||||
* If set to `true`, the camera automatically moves forward (and does not stop) when initially translated. Default
|
||||
* is `false`.
|
||||
*/
|
||||
autoForward: boolean;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link FlyControls}.
|
||||
* @param object The camera to be controlled.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(object: Camera, domElement?: HTMLElement | null);
|
||||
}
|
||||
|
||||
export { FlyControls };
|
||||
21
node_modules/@types/three/examples/jsm/controls/MapControls.d.ts
generated
vendored
Normal file
21
node_modules/@types/three/examples/jsm/controls/MapControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Camera } from "three";
|
||||
import { OrbitControls } from "./OrbitControls.js";
|
||||
|
||||
/**
|
||||
* MapControls performs orbiting, dollying (zooming), and panning.
|
||||
* Unlike TrackballControls, it maintains the "up" direction
|
||||
* object.up (+Y by default).
|
||||
*
|
||||
* Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch:
|
||||
* two-finger rotate
|
||||
* Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
|
||||
* Pan - left mouse, or arrow keys / touch: one-finger move
|
||||
*
|
||||
* @param object - The camera to be controlled. The camera must not
|
||||
* be a child of another object, unless that object is the scene itself.
|
||||
* @param domElement - The HTML element used for
|
||||
* event listeners.
|
||||
*/
|
||||
export class MapControls extends OrbitControls {
|
||||
constructor(object: Camera, domElement?: HTMLElement);
|
||||
}
|
||||
256
node_modules/@types/three/examples/jsm/controls/OrbitControls.d.ts
generated
vendored
Normal file
256
node_modules/@types/three/examples/jsm/controls/OrbitControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
import { Camera, Controls, MOUSE, TOUCH, Vector3 } from "three";
|
||||
|
||||
export interface OrbitControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction was initiated.
|
||||
*/
|
||||
start: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction has finished.
|
||||
*/
|
||||
end: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Orbit controls allow the camera to orbit around a target.
|
||||
*/
|
||||
declare class OrbitControls extends Controls<OrbitControlsEventMap> {
|
||||
/**
|
||||
* The focus point of the controls, the {@link .object} orbits around this. It can be updated manually at any point
|
||||
* to change the focus of the controls.
|
||||
*/
|
||||
target: Vector3;
|
||||
|
||||
/**
|
||||
* The focus point of the {@link .minTargetRadius} and {@link .maxTargetRadius} limits. It can be updated manually
|
||||
* at any point to change the center of interest for the {@link .target}.
|
||||
*/
|
||||
cursor: Vector3;
|
||||
|
||||
/**
|
||||
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is 0.
|
||||
*/
|
||||
minDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is 0.
|
||||
*/
|
||||
minZoom: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxZoom: number;
|
||||
|
||||
/**
|
||||
* How close you can get the target to the 3D {@link .cursor}. Default is 0.
|
||||
*/
|
||||
minTargetRadius: number;
|
||||
|
||||
/**
|
||||
* How far you can move the target from the 3D {@link .cursor}. Default is Infinity.
|
||||
*/
|
||||
maxTargetRadius: number;
|
||||
|
||||
/**
|
||||
* How far you can orbit vertically, lower limit. Range is 0 to Math.PI radians, and default is 0.
|
||||
*/
|
||||
minPolarAngle: number;
|
||||
|
||||
/**
|
||||
* How far you can orbit vertically, upper limit. Range is 0 to Math.PI radians, and default is Math.PI.
|
||||
*/
|
||||
maxPolarAngle: number;
|
||||
|
||||
/**
|
||||
* How far you can orbit horizontally, lower limit. If set, the interval [ min, max ] must be a sub-interval of
|
||||
* [ - 2 PI, 2 PI ], with ( max - min < 2 PI ). Default is Infinity.
|
||||
*/
|
||||
minAzimuthAngle: number;
|
||||
|
||||
/**
|
||||
* How far you can orbit horizontally, upper limit. If set, the interval [ min, max ] must be a sub-interval of
|
||||
* [ - 2 PI, 2 PI ], with ( max - min < 2 PI ). Default is Infinity.
|
||||
*/
|
||||
maxAzimuthAngle: number;
|
||||
|
||||
/**
|
||||
* Set to true to enable damping (inertia), which can be used to give a sense of weight to the controls. Default is
|
||||
* false.
|
||||
* Note that if this is enabled, you must call {@link .update}() in your animation loop.
|
||||
*/
|
||||
enableDamping: boolean;
|
||||
|
||||
/**
|
||||
* The damping inertia used if .enableDamping is set to true. Default is `0.05`.
|
||||
* Note that for this to work, you must call {@link .update}() in your animation loop.
|
||||
*/
|
||||
dampingFactor: number;
|
||||
|
||||
/**
|
||||
* Enable or disable zooming (dollying) of the camera.
|
||||
*/
|
||||
enableZoom: boolean;
|
||||
|
||||
/**
|
||||
* Speed of zooming / dollying. Default is 1.
|
||||
*/
|
||||
zoomSpeed: number;
|
||||
|
||||
/**
|
||||
* Enable or disable horizontal and vertical rotation of the camera. Default is true.
|
||||
* Note that it is possible to disable a single axis by setting the min and max of the
|
||||
* [polar angle]{@link .minPolarAngle} or [azimuth angle]{@link .minAzimuthAngle} to the same value, which will
|
||||
* cause the vertical or horizontal rotation to be fixed at that value.
|
||||
*/
|
||||
enableRotate: boolean;
|
||||
|
||||
/**
|
||||
* Speed of rotation. Default is 1.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* How fast to rotate the camera when the keyboard is used. Default is 1.
|
||||
*/
|
||||
keyRotateSpeed: number;
|
||||
|
||||
/**
|
||||
* Enable or disable camera panning. Default is true.
|
||||
*/
|
||||
enablePan: boolean;
|
||||
|
||||
/**
|
||||
* Speed of panning. Default is 1.
|
||||
*/
|
||||
panSpeed: number;
|
||||
|
||||
/**
|
||||
* Defines how the camera's position is translated when panning. If true, the camera pans in screen space.
|
||||
* Otherwise, the camera pans in the plane orthogonal to the camera's up direction. Default is `true`.
|
||||
*/
|
||||
screenSpacePanning: boolean;
|
||||
|
||||
/**
|
||||
* How fast to pan the camera when the keyboard is used. Default is 7.0 pixels per keypress.
|
||||
*/
|
||||
keyPanSpeed: number;
|
||||
|
||||
/**
|
||||
* Setting this property to `true` allows to zoom to the cursor's position. Default is `false`.
|
||||
*/
|
||||
zoomToCursor: boolean;
|
||||
|
||||
/**
|
||||
* Set to true to automatically rotate around the target.
|
||||
* Note that if this is enabled, you must call {@link .update}() in your animation loop. If you want the auto-rotate speed
|
||||
* to be independent of the frame rate (the refresh rate of the display), you must pass the time `deltaTime`, in
|
||||
* seconds, to {@link .update}().
|
||||
*/
|
||||
autoRotate: boolean;
|
||||
|
||||
/**
|
||||
* How fast to rotate around the target if {@link .autoRotate} is true. Default is 2.0, which equates to 30 seconds
|
||||
* per orbit at 60fps.
|
||||
* Note that if {@link .autoRotate} is enabled, you must call {@link .update}() in your animation loop.
|
||||
*/
|
||||
autoRotateSpeed: number;
|
||||
|
||||
/**
|
||||
* This object contains references to the keycodes for controlling camera panning. Default is the 4 arrow keys.
|
||||
*/
|
||||
keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string };
|
||||
|
||||
/**
|
||||
* This object contains references to the mouse actions used by the controls.
|
||||
*/
|
||||
mouseButtons: {
|
||||
LEFT?: MOUSE | null | undefined;
|
||||
MIDDLE?: MOUSE | null | undefined;
|
||||
RIGHT?: MOUSE | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* This object contains references to the touch actions used by the controls.
|
||||
*/
|
||||
touches: { ONE?: TOUCH | null | undefined; TWO?: TOUCH | null | undefined };
|
||||
|
||||
/**
|
||||
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
||||
*/
|
||||
target0: Vector3;
|
||||
|
||||
/**
|
||||
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
||||
*/
|
||||
position0: Vector3;
|
||||
|
||||
/**
|
||||
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
||||
*/
|
||||
zoom0: number;
|
||||
|
||||
/**
|
||||
* @param object The camera to be controlled. The camera must not be a child of another object, unless that object
|
||||
* is the scene itself.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(object: Camera, domElement?: HTMLElement | null);
|
||||
|
||||
/**
|
||||
* Get the current vertical rotation, in radians.
|
||||
*/
|
||||
getPolarAngle(): number;
|
||||
|
||||
/**
|
||||
* Get the current horizontal rotation, in radians.
|
||||
*/
|
||||
getAzimuthalAngle(): number;
|
||||
|
||||
/**
|
||||
* Returns the distance from the camera to the target.
|
||||
*/
|
||||
getDistance(): number;
|
||||
|
||||
/**
|
||||
* Adds key event listeners to the given DOM element. `window` is a recommended argument for using this method.
|
||||
* @param domElement
|
||||
*/
|
||||
listenToKeyEvents(domElement: HTMLElement | Window): void;
|
||||
|
||||
/**
|
||||
* Removes the key event listener previously defined with {@link .listenToKeyEvents}().
|
||||
*/
|
||||
stopListenToKeyEvents(): void;
|
||||
|
||||
/**
|
||||
* Save the current state of the controls. This can later be recovered with {@link .reset}.
|
||||
*/
|
||||
saveState(): void;
|
||||
|
||||
/**
|
||||
* Reset the controls to their state from either the last time the {@link .saveState} was called, or the initial
|
||||
* state.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Update the controls. Must be called after any manual changes to the camera's transform, or in the update loop if
|
||||
* {@link .autoRotate} or {@link .enableDamping} are set. `deltaTime`, in seconds, is optional, and is only required
|
||||
* if you want the auto-rotate speed to be independent of the frame rate (the refresh rate of the display).
|
||||
*/
|
||||
update(deltaTime?: number | null): boolean;
|
||||
}
|
||||
|
||||
export { OrbitControls };
|
||||
89
node_modules/@types/three/examples/jsm/controls/PointerLockControls.d.ts
generated
vendored
Normal file
89
node_modules/@types/three/examples/jsm/controls/PointerLockControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
import { Camera, Controls, Vector3 } from "three";
|
||||
|
||||
export interface PointerLockControlsEventMap {
|
||||
/**
|
||||
* Fires when the user moves the mouse.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when the pointer lock status is "locked" (in other words: the mouse is captured).
|
||||
*/
|
||||
lock: {};
|
||||
|
||||
/**
|
||||
* Fires when the pointer lock status is "unlocked" (in other words: the mouse is not captured anymore).
|
||||
*/
|
||||
unlock: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The implementation of this class is based on the [Pointer Lock API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API}.
|
||||
* {@link PointerLockControls} is a perfect choice for first person 3D games.
|
||||
*/
|
||||
declare class PointerLockControls extends Controls<PointerLockControlsEventMap> {
|
||||
/**
|
||||
* Whether or not the controls are locked.
|
||||
*/
|
||||
isLocked: boolean;
|
||||
|
||||
/**
|
||||
* Camera pitch, lower limit. Range is 0 to Math.PI radians. Default is 0.
|
||||
*/
|
||||
minPolarAngle: number;
|
||||
|
||||
/**
|
||||
* Camera pitch, upper limit. Range is 0 to Math.PI radians. Default is Math.PI.
|
||||
*/
|
||||
maxPolarAngle: number;
|
||||
|
||||
/**
|
||||
* Multiplier for how much the pointer movement influences the camera rotation. Default is 1.
|
||||
*/
|
||||
pointerSpeed: number;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link PointerLockControls}.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners.
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement | null);
|
||||
|
||||
/**
|
||||
* @deprecated getObject() has been deprecated. Use controls.object instead.
|
||||
*/
|
||||
getObject(): Camera;
|
||||
|
||||
/**
|
||||
* Returns the look direction of the camera.
|
||||
* @param v The target vector.
|
||||
*/
|
||||
getDirection(v: Vector3): Vector3;
|
||||
|
||||
/**
|
||||
* Moves the camera forward parallel to the xz-plane. Assumes camera.up is y-up.
|
||||
* @param distance The signed distance.
|
||||
*/
|
||||
moveForward(distance: number): void;
|
||||
|
||||
/**
|
||||
* Moves the camera sidewards parallel to the xz-plane.
|
||||
* @param distance The signed distance.
|
||||
*/
|
||||
moveRight(distance: number): void;
|
||||
|
||||
/**
|
||||
* Activates the pointer lock.
|
||||
*
|
||||
* @param {boolean} [unadjustedMovement=false] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead.
|
||||
* Setting it to true will disable mouse acceleration.
|
||||
*/
|
||||
lock(unadjustedMovement?: boolean): void;
|
||||
|
||||
/**
|
||||
* Exits the pointer lock.
|
||||
*/
|
||||
unlock(): void;
|
||||
}
|
||||
|
||||
export { PointerLockControls };
|
||||
142
node_modules/@types/three/examples/jsm/controls/TrackballControls.d.ts
generated
vendored
Normal file
142
node_modules/@types/three/examples/jsm/controls/TrackballControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
import { Camera, Controls, MOUSE, Vector3 } from "three";
|
||||
|
||||
export interface TrackballControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction (e.g. touch) was initiated.
|
||||
*/
|
||||
start: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction has finished.
|
||||
*/
|
||||
end: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* TrackballControls is similar to {@link OrbitControls}. However, it does not maintain a constant camera
|
||||
* [up]{@link Object3D.up} vector. That means if the camera orbits over the “north” and “south” poles, it does not flip
|
||||
* to stay "right side up".
|
||||
*/
|
||||
declare class TrackballControls extends Controls<TrackballControlsEventMap> {
|
||||
/**
|
||||
* Represents the properties of the screen. Automatically set when {@link .handleResize}() is called.
|
||||
* - left: Represents the offset in pixels to the screen's left boundary.
|
||||
* - top: Represents the offset in pixels to the screen's top boundary.
|
||||
* - width: Represents the screen width in pixels.
|
||||
* - height: Represents the screen height in pixels.
|
||||
*/
|
||||
screen: { left: number; top: number; width: number; height: number };
|
||||
|
||||
/**
|
||||
* The rotation speed. Default is `1.0`.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* The zoom speed. Default is `1.2`.
|
||||
*/
|
||||
zoomSpeed: number;
|
||||
|
||||
/**
|
||||
* The pan speed. Default is `0.3`.
|
||||
*/
|
||||
panSpeed: number;
|
||||
|
||||
/**
|
||||
* Whether or not rotation is disabled. Default is `false`.
|
||||
*/
|
||||
noRotate: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not zooming is disabled. Default is `false`.
|
||||
*/
|
||||
noZoom: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not panning is disabled. Default is `false`.
|
||||
*/
|
||||
noPan: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not damping is disabled. Default is `false`.
|
||||
*/
|
||||
staticMoving: boolean;
|
||||
|
||||
/**
|
||||
* Defines the intensity of damping. Only considered if {@link .staticMoving} is set to `false`. Default is `0.2`.
|
||||
*/
|
||||
dynamicDampingFactor: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is *0*.
|
||||
*/
|
||||
minDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is `Infinity`.
|
||||
*/
|
||||
maxDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is `Infinity`.
|
||||
*/
|
||||
minZoom: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is *0*.
|
||||
*/
|
||||
maxZoom: number;
|
||||
|
||||
/**
|
||||
* This array holds keycodes for controlling interactions.
|
||||
* - When the first defined key is pressed, all mouse interactions (left, middle, right) performs orbiting.
|
||||
* - When the second defined key is pressed, all mouse interactions (left, middle, right) performs zooming.
|
||||
* - When the third defined key is pressed, all mouse interactions (left, middle, right) performs panning.
|
||||
*
|
||||
* Default is *KeyA, KeyS, KeyD* which represents A, S, D.
|
||||
*/
|
||||
keys: [string, string, string];
|
||||
|
||||
/**
|
||||
* This object contains references to the mouse actions used by the controls.
|
||||
* - .LEFT is assigned with `THREE.MOUSE.ROTATE`
|
||||
* - .MIDDLE is assigned with `THREE.MOUSE.ZOOM`
|
||||
* - .RIGHT is assigned with `THREE.MOUSE.PAN`
|
||||
*/
|
||||
mouseButtons: {
|
||||
LEFT?: MOUSE | null | undefined;
|
||||
MIDDLE?: MOUSE | null | undefined;
|
||||
RIGHT?: MOUSE | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The focus point of the controls.
|
||||
*/
|
||||
target: Vector3;
|
||||
|
||||
/**
|
||||
* Creates a new instance of TrackballControls.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement | null);
|
||||
|
||||
/**
|
||||
* Should be called if the application window is resized.
|
||||
*/
|
||||
handleResize(): void;
|
||||
|
||||
update(): void;
|
||||
|
||||
/**
|
||||
* Resets the controls to its initial state.
|
||||
*/
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
export { TrackballControls };
|
||||
308
node_modules/@types/three/examples/jsm/controls/TransformControls.d.ts
generated
vendored
Normal file
308
node_modules/@types/three/examples/jsm/controls/TransformControls.d.ts
generated
vendored
Normal file
@@ -0,0 +1,308 @@
|
||||
import { Camera, ColorRepresentation, Controls, Mesh, Object3D, Quaternion, Raycaster, Vector3 } from "three";
|
||||
|
||||
export type TransformControlsMode = "translate" | "rotate" | "scale";
|
||||
|
||||
export interface TransformControlsEventMap {
|
||||
/**
|
||||
* Fires if any type of change (object or property change) is performed. Property changes are separate events you
|
||||
* can add event listeners to. The event type is "propertyname-changed".
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires if a pointer (mouse/touch) becomes active.
|
||||
*/
|
||||
mouseDown: { mode: TransformControlsMode };
|
||||
|
||||
/**
|
||||
* Fires if a pointer (mouse/touch) is no longer active.
|
||||
*/
|
||||
mouseUp: { mode: TransformControlsMode };
|
||||
|
||||
/**
|
||||
* Fires if the controlled 3D object is changed.
|
||||
*/
|
||||
objectChange: {};
|
||||
|
||||
"camera-changed": { value: unknown };
|
||||
"object-changed": { value: unknown };
|
||||
"enabled-changed": { value: unknown };
|
||||
"axis-changed": { value: unknown };
|
||||
"mode-changed": { value: unknown };
|
||||
"translationSnap-changed": { value: unknown };
|
||||
"rotationSnap-changed": { value: unknown };
|
||||
"scaleSnap-changed": { value: unknown };
|
||||
"space-changed": { value: unknown };
|
||||
"size-changed": { value: unknown };
|
||||
"dragging-changed": { value: unknown };
|
||||
"showX-changed": { value: unknown };
|
||||
"showY-changed": { value: unknown };
|
||||
"showZ-changed": { value: unknown };
|
||||
"minX-changed": { value: unknown };
|
||||
"maxX-changed": { value: unknown };
|
||||
"minY-changed": { value: unknown };
|
||||
"maxY-changed": { value: unknown };
|
||||
"minZ-changed": { value: unknown };
|
||||
"maxZ-changed": { value: unknown };
|
||||
"worldPosition-changed": { value: unknown };
|
||||
"worldPositionStart-changed": { value: unknown };
|
||||
"worldQuaternion-changed": { value: unknown };
|
||||
"worldQuaternionStart-changed": { value: unknown };
|
||||
"cameraPosition-changed": { value: unknown };
|
||||
"cameraQuaternion-changed": { value: unknown };
|
||||
"pointStart-changed": { value: unknown };
|
||||
"pointEnd-changed": { value: unknown };
|
||||
"rotationAxis-changed": { value: unknown };
|
||||
"rotationAngle-changed": { value: unknown };
|
||||
"eye-changed": { value: unknown };
|
||||
}
|
||||
|
||||
/**
|
||||
* This class can be used to transform objects in 3D space by adapting a similar interaction model of DCC tools like
|
||||
* Blender. Unlike other controls, it is not intended to transform the scene's camera.
|
||||
*
|
||||
* TransformControls expects that its attached 3D object is part of the scene graph.
|
||||
*/
|
||||
declare class TransformControls extends Controls<TransformControlsEventMap> {
|
||||
/**
|
||||
* The camera of the rendered scene.
|
||||
*/
|
||||
camera: Camera;
|
||||
|
||||
/**
|
||||
* The current transformation axis.
|
||||
*/
|
||||
axis: "X" | "Y" | "Z" | "E" | "XY" | "YZ" | "XZ" | "XYZ" | "XYZE" | null;
|
||||
|
||||
/**
|
||||
* The current transformation mode. Possible values are "translate", "rotate" and "scale". Default is `translate`.
|
||||
*/
|
||||
mode: TransformControlsMode;
|
||||
|
||||
/**
|
||||
* By default, 3D objects are continuously translated. If you set this property to a numeric value (world units),
|
||||
* you can define in which steps the 3D object should be translated. Default is `null`.
|
||||
*/
|
||||
translationSnap: number | null;
|
||||
|
||||
/**
|
||||
* By default, 3D objects are continuously rotated. If you set this property to a numeric value (radians), you can
|
||||
* define in which steps the 3D object should be rotated. Default is `null`.
|
||||
*/
|
||||
rotationSnap: number | null;
|
||||
|
||||
/**
|
||||
* By default, 3D objects are continuously scaled. If you set this property to a numeric value, you can define in
|
||||
* which steps the 3D object should be scaled. Default is `null`.
|
||||
*/
|
||||
scaleSnap: number | null;
|
||||
|
||||
/**
|
||||
* Defines in which coordinate space transformations should be performed. Possible values are "world" and "local".
|
||||
* Default is `world`.
|
||||
*/
|
||||
space: "world" | "local";
|
||||
|
||||
/**
|
||||
* The size of the helper UI (axes/planes). Default is *1*.
|
||||
*/
|
||||
size: number;
|
||||
|
||||
/**
|
||||
* Whether or not dragging is currently performed. Read-only property.
|
||||
*/
|
||||
dragging: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the x-axis helper should be visible. Default is `true`.
|
||||
*/
|
||||
showX: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the y-axis helper should be visible. Default is `true`.
|
||||
*/
|
||||
showY: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the z-axis helper should be visible. Default is `true`.
|
||||
*/
|
||||
showZ: boolean;
|
||||
|
||||
/**
|
||||
* The minimum allowed X position during translation. Default is `-Infinity`.
|
||||
*/
|
||||
minx: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed X position during translation. Default is `Infinity`.
|
||||
*/
|
||||
maxX: number;
|
||||
|
||||
/**
|
||||
* The minimum allowed Y position during translation. Default is `-Infinity`.
|
||||
*/
|
||||
minY: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed Y position during translation. Default is `Infinity`.
|
||||
*/
|
||||
maxY: number;
|
||||
|
||||
/**
|
||||
* The minimum allowed Z position during translation. Default is `-Infinity`.
|
||||
*/
|
||||
minZ: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed Z position during translation. Default is `Infinity`.
|
||||
*/
|
||||
maxZ: number;
|
||||
|
||||
/**
|
||||
* Creates a new instance of TransformControls.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement);
|
||||
|
||||
/**
|
||||
* Returns the visual representation of the controls. Add the helper to your scene to visually transform the
|
||||
* attached 3D object.
|
||||
*/
|
||||
getHelper(): TransformControlsRoot;
|
||||
|
||||
pointerHover(pointer: PointerEvent | null): void;
|
||||
pointerDown(pointer: PointerEvent | null): void;
|
||||
pointerMove(pointer: PointerEvent | null): void;
|
||||
pointerUp(pointer: PointerEvent | null): void;
|
||||
|
||||
/**
|
||||
* Sets the 3D object that should be transformed and ensures the controls UI is visible.
|
||||
* @param object The 3D object that should be transformed.
|
||||
*/
|
||||
attach(object: Object3D): this;
|
||||
|
||||
/**
|
||||
* Removes the current 3D object from the controls and makes the helper UI invisible.
|
||||
*/
|
||||
detach(): this;
|
||||
|
||||
/**
|
||||
* Resets the object's position, rotation and scale to when the current transform began.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Returns the {@link Raycaster} object that is used for user interaction. This object is shared between all
|
||||
* instances of TransformControls. If you set the [.layers]{@link Object3D.layers} property of the
|
||||
* TransformControls, you will also want to set the [.layers]{@link Raycaster.layers} property on the
|
||||
* {@link Raycaster} with a matching value, or else the TransformControls won't work as expected.
|
||||
*/
|
||||
getRaycaster(): Raycaster;
|
||||
|
||||
/**
|
||||
* Returns the transformation mode.
|
||||
*/
|
||||
getMode(): TransformControlsMode;
|
||||
|
||||
/**
|
||||
* Sets the transformation mode.
|
||||
* @param mode The transformation mode.
|
||||
*/
|
||||
setMode(mode: TransformControlsMode): void;
|
||||
|
||||
/**
|
||||
* Sets the translation snap.
|
||||
* @param translationSnap The translation snap.
|
||||
*/
|
||||
setTranslationSnap(translationSnap: number | null): void;
|
||||
|
||||
/**
|
||||
* Sets the rotation snap.
|
||||
* @param rotationSnap The rotation snap.
|
||||
*/
|
||||
setRotationSnap(rotationSnap: number | null): void;
|
||||
|
||||
/**
|
||||
* Sets the scale snap.
|
||||
* @param scaleSnap The scale snap.
|
||||
*/
|
||||
setScaleSnap(scaleSnap: number | null): void;
|
||||
|
||||
/**
|
||||
* Sets the size of the helper UI.
|
||||
* @param size The size of the helper UI.
|
||||
*/
|
||||
setSize(size: number): void;
|
||||
|
||||
/**
|
||||
* Sets the coordinate space in which transformations are applied.
|
||||
* @param space The coordinate space in which transformations are applied.
|
||||
*/
|
||||
setSpace(space: "world" | "local"): void;
|
||||
|
||||
/**
|
||||
* Sets the colors of the control's gizmo.
|
||||
*
|
||||
* @param {number|Color|string} xAxis - The x-axis color.
|
||||
* @param {number|Color|string} yAxis - The y-axis color.
|
||||
* @param {number|Color|string} zAxis - The z-axis color.
|
||||
* @param {number|Color|string} active - The color for active elements.
|
||||
*/
|
||||
setColors(
|
||||
xAxis: ColorRepresentation,
|
||||
yAxis: ColorRepresentation,
|
||||
zAxis: ColorRepresentation,
|
||||
active: ColorRepresentation,
|
||||
): void;
|
||||
}
|
||||
|
||||
declare class TransformControlsRoot extends Object3D {
|
||||
readonly isTransformControlsRoot: true;
|
||||
|
||||
controls: TransformControls;
|
||||
|
||||
constructor(controls: TransformControls);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
declare class TransformControlsGizmo extends Object3D {
|
||||
isTransformControlsGizmo: true;
|
||||
|
||||
gizmo: {
|
||||
translate: Object3D;
|
||||
rotate: Object3D;
|
||||
scale: Object3D;
|
||||
};
|
||||
helper: {
|
||||
translate: Object3D;
|
||||
rotate: Object3D;
|
||||
scale: Object3D;
|
||||
};
|
||||
picker: {
|
||||
translate: Object3D;
|
||||
rotate: Object3D;
|
||||
scale: Object3D;
|
||||
};
|
||||
|
||||
constructor();
|
||||
}
|
||||
|
||||
declare class TransformControlsPlane extends Mesh {
|
||||
readonly isTransformControlsPlane: true;
|
||||
|
||||
constructor();
|
||||
|
||||
mode: TransformControlsMode;
|
||||
|
||||
axis: "X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ" | "E";
|
||||
|
||||
space: "local" | "world";
|
||||
|
||||
eye: Vector3;
|
||||
worldPosition: Vector3;
|
||||
worldQuaternion: Quaternion;
|
||||
}
|
||||
|
||||
export { TransformControls, TransformControlsGizmo, TransformControlsPlane };
|
||||
55
node_modules/@types/three/examples/jsm/csm/CSM.d.ts
generated
vendored
Normal file
55
node_modules/@types/three/examples/jsm/csm/CSM.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import { Camera, DirectionalLight, Material, Object3D, Vector2, Vector3 } from "three";
|
||||
import { CSMFrustum } from "./CSMFrustum.js";
|
||||
|
||||
export type CSMMode = "uniform" | "logarithmic" | "practical" | "custom";
|
||||
|
||||
export interface CSMParameters {
|
||||
camera?: Camera;
|
||||
parent?: Object3D;
|
||||
cascades?: number;
|
||||
maxFar?: number;
|
||||
mode?: CSMMode;
|
||||
shadowMapSize?: number;
|
||||
shadowBias?: number;
|
||||
lightDirection?: Vector3;
|
||||
lightIntensity?: number;
|
||||
lightNear?: number;
|
||||
lightFar?: number;
|
||||
lightMargin?: number;
|
||||
customSplitsCallback?: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
||||
}
|
||||
|
||||
export class CSM {
|
||||
constructor(data: CSMParameters);
|
||||
camera: Camera;
|
||||
parent: Object3D;
|
||||
cascades: number;
|
||||
maxFar: number;
|
||||
mode: CSMMode;
|
||||
shadowMapSize: number;
|
||||
shadowBias: number;
|
||||
lightDirection: Vector3;
|
||||
lightIntensity: number;
|
||||
lightNear: number;
|
||||
lightFar: number;
|
||||
lightMargin: number;
|
||||
customSplitsCallback: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
||||
fade: boolean;
|
||||
mainFrustum: CSMFrustum;
|
||||
frustums: CSMFrustum[];
|
||||
breaks: number[];
|
||||
lights: DirectionalLight[];
|
||||
shaders: Map<unknown, string>;
|
||||
createLights(): void;
|
||||
initCascades(): void;
|
||||
updateShadowBounds(): void;
|
||||
getBreaks(): void;
|
||||
update(): void;
|
||||
injectInclude(): void;
|
||||
setupMaterial(material: Material): void;
|
||||
updateUniforms(): void;
|
||||
getExtendedBreaks(target: Vector2[]): void;
|
||||
updateFrustums(): void;
|
||||
remove(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
25
node_modules/@types/three/examples/jsm/csm/CSMFrustum.d.ts
generated
vendored
Normal file
25
node_modules/@types/three/examples/jsm/csm/CSMFrustum.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Matrix4, Vector3 } from "three";
|
||||
|
||||
export interface CSMFrustumVerticies {
|
||||
near: Vector3[];
|
||||
far: Vector3[];
|
||||
}
|
||||
|
||||
export interface CSMFrustumParameters {
|
||||
webGL?: boolean;
|
||||
projectionMatrix?: Matrix4;
|
||||
maxFar?: number;
|
||||
}
|
||||
|
||||
declare class CSMFrustum {
|
||||
zNear: number;
|
||||
vertices: CSMFrustumVerticies;
|
||||
|
||||
constructor(data?: CSMFrustumParameters);
|
||||
|
||||
setFromProjectionMatrix(projectionMatrix: Matrix4, maxFar: number): CSMFrustumVerticies;
|
||||
split(breaks: number[], target: CSMFrustum[]): void;
|
||||
toSpace(cameraMatrix: Matrix4, target: CSMFrustum): void;
|
||||
}
|
||||
|
||||
export { CSMFrustum };
|
||||
28
node_modules/@types/three/examples/jsm/csm/CSMHelper.d.ts
generated
vendored
Normal file
28
node_modules/@types/three/examples/jsm/csm/CSMHelper.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import {
|
||||
Box3Helper,
|
||||
BufferGeometry,
|
||||
Group,
|
||||
LineBasicMaterial,
|
||||
LineSegments,
|
||||
Mesh,
|
||||
MeshBasicMaterial,
|
||||
PlaneGeometry,
|
||||
} from "three";
|
||||
|
||||
import { CSM } from "./CSM.js";
|
||||
import { CSMShadowNode } from "./CSMShadowNode.js";
|
||||
|
||||
export class CSMHelper<TCSM extends CSM | CSMShadowNode = CSM | CSMShadowNode> extends Group {
|
||||
constructor(csm: TCSM);
|
||||
csm: TCSM;
|
||||
displayFrustum: boolean;
|
||||
displayPlanes: boolean;
|
||||
displayShadowBounds: boolean;
|
||||
frustumLines: LineSegments<BufferGeometry, LineBasicMaterial>;
|
||||
cascadeLines: Box3Helper[];
|
||||
cascadePlanes: Array<Mesh<PlaneGeometry, MeshBasicMaterial>>;
|
||||
shadowLines: Box3Helper[];
|
||||
updateVisibility(): void;
|
||||
update(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
4
node_modules/@types/three/examples/jsm/csm/CSMShader.d.ts
generated
vendored
Normal file
4
node_modules/@types/three/examples/jsm/csm/CSMShader.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface CSMShader {
|
||||
lights_fragment_begin: string;
|
||||
lights_pars_begin: string;
|
||||
}
|
||||
44
node_modules/@types/three/examples/jsm/csm/CSMShadowNode.d.ts
generated
vendored
Normal file
44
node_modules/@types/three/examples/jsm/csm/CSMShadowNode.d.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Camera, DirectionalLightShadow, Light, Object3D, ShadowBaseNode } from "three/webgpu";
|
||||
import { CSMFrustum } from "./CSMFrustum.js";
|
||||
|
||||
export type CSMShadowNodeMode = "uniform" | "logarithmic" | "practical" | "custom";
|
||||
|
||||
export interface CSMShadowNodeData {
|
||||
cascades?: number | undefined;
|
||||
maxFar?: number | undefined;
|
||||
mode?: CSMShadowNodeMode | undefined;
|
||||
lightMargin?: number | undefined;
|
||||
customSplitsCallback?:
|
||||
| ((cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void)
|
||||
| undefined;
|
||||
}
|
||||
|
||||
declare class LwLight extends Object3D {
|
||||
target: Object3D;
|
||||
shadow?: DirectionalLightShadow;
|
||||
|
||||
constructor();
|
||||
}
|
||||
|
||||
declare class CSMShadowNode extends ShadowBaseNode {
|
||||
camera: Camera | null;
|
||||
cascades: number;
|
||||
maxFar: number;
|
||||
mode: CSMShadowNodeMode;
|
||||
lightMargin: number;
|
||||
customSplitsCallback: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
||||
|
||||
fade: boolean;
|
||||
|
||||
breaks: number[];
|
||||
mainFrustum: CSMFrustum | null;
|
||||
frustums: CSMFrustum[];
|
||||
|
||||
lights: LwLight[];
|
||||
|
||||
constructor(light: Light, data?: CSMShadowNodeData);
|
||||
|
||||
updateFrustums(): void;
|
||||
}
|
||||
|
||||
export { CSMShadowNode };
|
||||
68
node_modules/@types/three/examples/jsm/curves/CurveExtras.d.ts
generated
vendored
Normal file
68
node_modules/@types/three/examples/jsm/curves/CurveExtras.d.ts
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
import { Curve, Vector3 } from "three";
|
||||
|
||||
export class GrannyKnot extends Curve<Vector3> {
|
||||
constructor();
|
||||
}
|
||||
|
||||
export class HeartCurve extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class VivianiCurve extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class KnotCurve extends Curve<Vector3> {
|
||||
constructor();
|
||||
}
|
||||
|
||||
export class HelixCurve extends Curve<Vector3> {
|
||||
constructor();
|
||||
}
|
||||
|
||||
export class TrefoilKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class TorusKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class CinquefoilKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class TrefoilPolynomialKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class FigureEightPolynomialKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot4a extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot4b extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot5a extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot5c extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
28
node_modules/@types/three/examples/jsm/curves/NURBSCurve.d.ts
generated
vendored
Normal file
28
node_modules/@types/three/examples/jsm/curves/NURBSCurve.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Curve, CurveJSON, Vector2, Vector3, Vector4 } from "three";
|
||||
|
||||
export interface NURBSCurveJSON extends CurveJSON {
|
||||
degree: number;
|
||||
knots: number[];
|
||||
controlPoints: number[][];
|
||||
startKnot: number;
|
||||
endKnot: number;
|
||||
}
|
||||
|
||||
export class NURBSCurve extends Curve<Vector3> {
|
||||
degree: number;
|
||||
knots: number[];
|
||||
controlPoints: Vector2[] | Vector3[] | Vector4[];
|
||||
startKnot: number;
|
||||
endKnot: number;
|
||||
|
||||
constructor(
|
||||
degree: number,
|
||||
knots: number[],
|
||||
controlPoints: Vector2[] | Vector3[] | Vector4[],
|
||||
startKnot?: number,
|
||||
endKnot?: number,
|
||||
);
|
||||
|
||||
toJSON(): NURBSCurveJSON;
|
||||
fromJSON(json: NURBSCurveJSON): this;
|
||||
}
|
||||
13
node_modules/@types/three/examples/jsm/curves/NURBSSurface.d.ts
generated
vendored
Normal file
13
node_modules/@types/three/examples/jsm/curves/NURBSSurface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Vector2, Vector3, Vector4 } from "three";
|
||||
|
||||
export class NURBSSurface {
|
||||
constructor(
|
||||
degree1: number,
|
||||
degree2: number,
|
||||
knots1: number[],
|
||||
knots2: number[],
|
||||
controlPoints: Vector2[][] | Vector3[][] | Vector4[][],
|
||||
);
|
||||
|
||||
getPoint(t1: number, t2: number, target: Vector3): void;
|
||||
}
|
||||
146
node_modules/@types/three/examples/jsm/curves/NURBSUtils.d.ts
generated
vendored
Normal file
146
node_modules/@types/three/examples/jsm/curves/NURBSUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
import { Vector3, Vector4 } from "three";
|
||||
|
||||
/**
|
||||
* Finds knot vector span.
|
||||
* @param p degree
|
||||
* @param u parametric value
|
||||
* @param U knot vector
|
||||
* @returns the span
|
||||
*/
|
||||
export function findSpan(p: number, u: number, U: readonly number[]): number;
|
||||
|
||||
/**
|
||||
* Calculate basis functions. See The NURBS Book, page 70, algorithm A2.2
|
||||
* @param span span in which u lies
|
||||
* @param u parametric point
|
||||
* @param p degrees
|
||||
* @param U knot vector
|
||||
* @returns array[p+1] with basis function values
|
||||
*/
|
||||
export function calcBasisFunctions(span: number, u: number, p: number, U: readonly number[]): number[];
|
||||
|
||||
/**
|
||||
* Calculate B-Spline curve points. See The NURBS Book, page 82, algorithm A3.1.
|
||||
* @param p degree of B-Spline
|
||||
* @param U knot vector
|
||||
* @param P control points (x, y, z, w)
|
||||
* @param u parametric point
|
||||
* @returns point for given u
|
||||
*/
|
||||
export function calcBSplinePoint(p: number, U: readonly number[], P: readonly Vector4[], u: number): Vector4;
|
||||
|
||||
/**
|
||||
* Calculate basis functions derivatives. See The NURBS Book, page 72, algorithm A2.3.
|
||||
* @param span span in which u lies
|
||||
* @param u parametric point
|
||||
* @param p degree
|
||||
* @param n number of derivatives to calculate
|
||||
* @param U knot vector
|
||||
* @returns array[n+1][p+1] with basis functions derivatives
|
||||
*/
|
||||
export function calcBasisFunctionDerivatives(
|
||||
span: number,
|
||||
u: number,
|
||||
p: number,
|
||||
n: number,
|
||||
U: readonly number[],
|
||||
): number[][];
|
||||
|
||||
/**
|
||||
* Calculate derivatives of a B-Spline. See The NURBS Book, page 93, algorithm A3.2.
|
||||
* @param p degree
|
||||
* @param U knot vector
|
||||
* @param P control points
|
||||
* @param u Parametric points
|
||||
* @param nd number of derivatives
|
||||
* @returns array[d+1] with derivatives
|
||||
*/
|
||||
export function calcBSplineDerivatives(
|
||||
p: number,
|
||||
U: readonly number[],
|
||||
P: readonly Vector4[],
|
||||
u: number,
|
||||
nd: number,
|
||||
): Vector4[];
|
||||
|
||||
/**
|
||||
* Calculate "K over I"
|
||||
* @returns k!/(i!(k-i)!
|
||||
*/
|
||||
export function calcKoverI(k: number, i: number): number;
|
||||
|
||||
/**
|
||||
* Calculate derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2.
|
||||
* @param Pders result of function calcBSplineDerivatives
|
||||
* @returns array with derivatives for rational curve.
|
||||
*/
|
||||
export function calcRationalCurveDerivatives(Pders: readonly Vector4[]): Vector3[];
|
||||
|
||||
/**
|
||||
* Calculate NURBS curve derivatives. See The NURBS Book, page 127, algorithm A4.2.
|
||||
* @param p degree
|
||||
* @param U knot vector
|
||||
* @param P control points in homogeneous space
|
||||
* @param u parametric points
|
||||
* @param nd number of derivatives
|
||||
* @returns array with derivatives
|
||||
*/
|
||||
export function calcNURBSDerivatives(
|
||||
p: number,
|
||||
U: readonly number[],
|
||||
P: readonly Vector4[],
|
||||
u: number,
|
||||
nd: number,
|
||||
): Vector3[];
|
||||
|
||||
/**
|
||||
* Calculate rational B-Spline surface point. See The NURBS Book, page 134, algorithm A4.3.
|
||||
* @param p degree of B-Spline surface
|
||||
* @param q degree of B-Spline surface
|
||||
* @param U knot vector
|
||||
* @param V knot vector
|
||||
* @param P control points (x, y, z, w)
|
||||
* @param u parametric value
|
||||
* @param v parametric value
|
||||
* @param target
|
||||
* @returns point for given (u, v)
|
||||
*/
|
||||
export function calcSurfacePoint(
|
||||
p: number,
|
||||
q: number,
|
||||
U: readonly number[],
|
||||
V: readonly number[],
|
||||
P: readonly (readonly Vector4[])[],
|
||||
u: number,
|
||||
v: number,
|
||||
target: Vector3,
|
||||
): Vector3;
|
||||
|
||||
/**
|
||||
* Calculate rational B-Spline volume point. See The NURBS Book, page 134, algorithm A4.3.
|
||||
* @param p degree of B-Spline volume
|
||||
* @param q degree of B-Spline volume
|
||||
* @param r degree of B-Spline volume
|
||||
* @param U knot vector
|
||||
* @param V knot vector
|
||||
* @param W knot vector
|
||||
* @param P control points (x, y, z, w)
|
||||
* @param u parametric value
|
||||
* @param v parametric value
|
||||
* @param w parametric value
|
||||
* @param target
|
||||
* @returns point for given (u, v, w)
|
||||
*/
|
||||
export function calcVolumePoint(
|
||||
p: number,
|
||||
q: number,
|
||||
r: number,
|
||||
U: readonly number[],
|
||||
V: readonly number[],
|
||||
W: readonly number[],
|
||||
P: readonly (readonly (readonly Vector4[])[])[],
|
||||
u: number,
|
||||
v: number,
|
||||
w: number,
|
||||
target: Vector3,
|
||||
): Vector3;
|
||||
23
node_modules/@types/three/examples/jsm/curves/NURBSVolume.d.ts
generated
vendored
Normal file
23
node_modules/@types/three/examples/jsm/curves/NURBSVolume.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Vector3, Vector4 } from "three";
|
||||
|
||||
export class NURBSVolume {
|
||||
degree1: number;
|
||||
degree2: number;
|
||||
degree3: number;
|
||||
knots1: readonly number[];
|
||||
knots2: readonly number[];
|
||||
knots3: readonly number[];
|
||||
controlPoints: Vector4[][][];
|
||||
|
||||
constructor(
|
||||
degree1: number,
|
||||
degree2: number,
|
||||
degree3: number,
|
||||
knots1: readonly number[],
|
||||
knots2: readonly number[],
|
||||
knots3: readonly number[],
|
||||
controlPoints: Vector4[][][],
|
||||
);
|
||||
|
||||
getPoint(t1: number, t2: number, t3: number, target: Vector3): void;
|
||||
}
|
||||
17
node_modules/@types/three/examples/jsm/effects/AnaglyphEffect.d.ts
generated
vendored
Normal file
17
node_modules/@types/three/examples/jsm/effects/AnaglyphEffect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Camera, Matrix3, Scene, WebGLRenderer } from "three";
|
||||
|
||||
declare class AnaglyphEffect {
|
||||
colorMatrixLeft: Matrix3;
|
||||
|
||||
colorMatrixRight: Matrix3;
|
||||
|
||||
setSize: (width: number, height: number) => void;
|
||||
|
||||
render: (scene: Scene, camera: Camera) => void;
|
||||
|
||||
dispose: () => void;
|
||||
|
||||
constructor(renderer: WebGLRenderer, width?: number, height?: number);
|
||||
}
|
||||
|
||||
export { AnaglyphEffect };
|
||||
18
node_modules/@types/three/examples/jsm/effects/AsciiEffect.d.ts
generated
vendored
Normal file
18
node_modules/@types/three/examples/jsm/effects/AsciiEffect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Camera, Scene, WebGLRenderer } from "three";
|
||||
|
||||
export interface AsciiEffectOptions {
|
||||
resolution?: number;
|
||||
scale?: number;
|
||||
color?: boolean;
|
||||
alpha?: boolean;
|
||||
block?: boolean;
|
||||
invert?: boolean;
|
||||
}
|
||||
|
||||
export class AsciiEffect {
|
||||
constructor(renderer: WebGLRenderer, charSet?: string, options?: AsciiEffectOptions);
|
||||
domElement: HTMLElement;
|
||||
|
||||
render(scene: Scene, camera: Camera): void;
|
||||
setSize(width: number, height: number): void;
|
||||
}
|
||||
28
node_modules/@types/three/examples/jsm/effects/OutlineEffect.d.ts
generated
vendored
Normal file
28
node_modules/@types/three/examples/jsm/effects/OutlineEffect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Camera, Scene, Vector2, Vector4, WebGLRenderer, WebGLRenderTarget, WebGLShadowMap } from "three";
|
||||
|
||||
export interface OutlineEffectParameters {
|
||||
defaultThickness?: number | undefined;
|
||||
defaultColor?: number[] | undefined;
|
||||
defaultAlpha?: number | undefined;
|
||||
defaultKeepAlive?: boolean | undefined;
|
||||
}
|
||||
|
||||
export class OutlineEffect {
|
||||
constructor(renderer: WebGLRenderer, parameters?: OutlineEffectParameters);
|
||||
enabled: boolean;
|
||||
autoClear: boolean;
|
||||
domElement: HTMLElement;
|
||||
shadowMap: WebGLShadowMap;
|
||||
|
||||
clear(color?: boolean, depth?: boolean, stencil?: boolean): void;
|
||||
getPixelRatio(): number;
|
||||
getSize(target: Vector2): Vector2;
|
||||
render(scene: Scene, camera: Camera): void;
|
||||
renderOutline(scene: Scene, camera: Camera): void;
|
||||
setRenderTarget(renderTarget: WebGLRenderTarget | null): void;
|
||||
setPixelRatio(value: number): void;
|
||||
setScissor(x: Vector4 | number, y?: number, width?: number, height?: number): void;
|
||||
setScissorTest(enable: boolean): void;
|
||||
setSize(width: number, height: number, updateStyle?: boolean): void;
|
||||
setViewport(x: Vector4 | number, y?: number, width?: number, height?: number): void;
|
||||
}
|
||||
11
node_modules/@types/three/examples/jsm/effects/ParallaxBarrierEffect.d.ts
generated
vendored
Normal file
11
node_modules/@types/three/examples/jsm/effects/ParallaxBarrierEffect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Camera, Scene, WebGLRenderer } from "three";
|
||||
|
||||
declare class ParallaxBarrierEffect {
|
||||
setSize: (width: number, height: number) => void;
|
||||
render: (scene: Scene, camera: Camera) => void;
|
||||
dispose: () => void;
|
||||
|
||||
constructor(renderer: WebGLRenderer);
|
||||
}
|
||||
|
||||
export { ParallaxBarrierEffect };
|
||||
9
node_modules/@types/three/examples/jsm/effects/StereoEffect.d.ts
generated
vendored
Normal file
9
node_modules/@types/three/examples/jsm/effects/StereoEffect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Camera, Scene, WebGLRenderer } from "three";
|
||||
|
||||
export class StereoEffect {
|
||||
constructor(renderer: WebGLRenderer);
|
||||
|
||||
setEyeSeparation(eyeSep: number): void;
|
||||
render(scene: Scene, camera: Camera): void;
|
||||
setSize(width: number, height: number): void;
|
||||
}
|
||||
5
node_modules/@types/three/examples/jsm/environments/DebugEnvironment.d.ts
generated
vendored
Normal file
5
node_modules/@types/three/examples/jsm/environments/DebugEnvironment.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Scene } from "three";
|
||||
|
||||
export class DebugEnvironment extends Scene {
|
||||
constructor();
|
||||
}
|
||||
6
node_modules/@types/three/examples/jsm/environments/RoomEnvironment.d.ts
generated
vendored
Normal file
6
node_modules/@types/three/examples/jsm/environments/RoomEnvironment.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Scene } from "three";
|
||||
|
||||
export class RoomEnvironment extends Scene {
|
||||
constructor();
|
||||
dispose(): void;
|
||||
}
|
||||
17
node_modules/@types/three/examples/jsm/exporters/DRACOExporter.d.ts
generated
vendored
Normal file
17
node_modules/@types/three/examples/jsm/exporters/DRACOExporter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { Mesh, Points } from "three";
|
||||
|
||||
export interface DRACOExporterOptions {
|
||||
decodeSpeed?: number;
|
||||
encodeSpeed?: number;
|
||||
encoderMethod?: number;
|
||||
quantization?: number[];
|
||||
exportUvs?: boolean;
|
||||
exportNormals?: boolean;
|
||||
exportColor?: boolean;
|
||||
}
|
||||
|
||||
export class DRACOExporter {
|
||||
constructor();
|
||||
|
||||
parse(object: Mesh | Points, options?: DRACOExporterOptions): Int8Array;
|
||||
}
|
||||
27
node_modules/@types/three/examples/jsm/exporters/EXRExporter.d.ts
generated
vendored
Normal file
27
node_modules/@types/three/examples/jsm/exporters/EXRExporter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @author sciecode / https://github.com/sciecode
|
||||
*
|
||||
* EXR format references:
|
||||
* https://www.openexr.com/documentation/openexrfilelayout.pdf
|
||||
*/
|
||||
|
||||
import { DataTexture, TextureDataType, WebGLRenderer, WebGLRenderTarget } from "three";
|
||||
import { WebGPURenderer } from "three/webgpu";
|
||||
|
||||
export const NO_COMPRESSION: 0;
|
||||
export const ZIPS_COMPRESSION: 2;
|
||||
export const ZIP_COMPRESSION: 3;
|
||||
|
||||
export interface EXRExporterParseOptions {
|
||||
compression?: number;
|
||||
type?: TextureDataType;
|
||||
}
|
||||
|
||||
export class EXRExporter {
|
||||
parse(
|
||||
renderer: WebGLRenderer | WebGPURenderer,
|
||||
renderTarget: WebGLRenderTarget,
|
||||
options?: EXRExporterParseOptions,
|
||||
): Promise<Uint8Array>;
|
||||
parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array>;
|
||||
}
|
||||
156
node_modules/@types/three/examples/jsm/exporters/GLTFExporter.d.ts
generated
vendored
Normal file
156
node_modules/@types/three/examples/jsm/exporters/GLTFExporter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
import { AnimationClip, Material, Mesh, Object3D, Texture } from "three";
|
||||
|
||||
export interface GLTFExporterOptions {
|
||||
/**
|
||||
* Export position, rotation and scale instead of matrix per node. Default is false
|
||||
*/
|
||||
trs?: boolean;
|
||||
|
||||
/**
|
||||
* Export only visible objects. Default is true.
|
||||
*/
|
||||
onlyVisible?: boolean;
|
||||
|
||||
/**
|
||||
* Export just the attributes within the drawRange, if defined, instead of exporting the whole array. Default is true.
|
||||
*/
|
||||
truncateDrawRange?: boolean;
|
||||
|
||||
/**
|
||||
* Export in binary (.glb) format, returning an ArrayBuffer. Default is false.
|
||||
*/
|
||||
binary?: boolean;
|
||||
|
||||
/**
|
||||
* Export with images embedded into the glTF asset. Default is true.
|
||||
*/
|
||||
embedImages?: boolean;
|
||||
|
||||
/**
|
||||
* Restricts the image maximum size (both width and height) to the given value. This option works only if embedImages is true. Default is Infinity.
|
||||
*/
|
||||
maxTextureSize?: number;
|
||||
|
||||
/**
|
||||
* List of animations to be included in the export.
|
||||
*/
|
||||
animations?: AnimationClip[];
|
||||
|
||||
/**
|
||||
* Generate indices for non-index geometry and export with them. Default is false.
|
||||
*/
|
||||
forceIndices?: boolean;
|
||||
|
||||
/**
|
||||
* Export custom glTF extensions defined on an object's userData.gltfExtensions property. Default is false.
|
||||
*/
|
||||
includeCustomExtensions?: boolean;
|
||||
}
|
||||
|
||||
type TextureUtils = {
|
||||
decompress:
|
||||
| ((texture: Texture, maxTextureSize?: number) => Promise<void>)
|
||||
| ((texture: Texture, maxTextureSize?: number) => void);
|
||||
};
|
||||
|
||||
declare class GLTFExporter {
|
||||
textureUtils: TextureUtils | null;
|
||||
|
||||
constructor();
|
||||
|
||||
register(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
||||
unregister(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
||||
|
||||
setTextureUtils(utils: TextureUtils | null): this;
|
||||
|
||||
/**
|
||||
* Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
|
||||
*
|
||||
* @param input Scenes or objects to export. Valid options:
|
||||
* - Export scenes
|
||||
* ```js
|
||||
* exporter.parse( scene1, ... )
|
||||
* exporter.parse( [ scene1, scene2 ], ... )
|
||||
* ```
|
||||
* - Export objects (It will create a new Scene to hold all the objects)
|
||||
* ```js
|
||||
* exporter.parse( object1, ... )
|
||||
* exporter.parse( [ object1, object2 ], ... )
|
||||
* ```
|
||||
* - Mix scenes and objects (It will export the scenes as usual but it will create a new scene to hold all the single objects).
|
||||
* ```js
|
||||
* exporter.parse( [ scene1, object1, object2, scene2 ], ... )
|
||||
* ```
|
||||
* @param onDone Will be called when the export completes. The argument will be the generated glTF JSON or binary ArrayBuffer.
|
||||
* @param onError Will be called if there are any errors during the gltf generation.
|
||||
* @param options Export options
|
||||
*/
|
||||
parse(
|
||||
input: Object3D | Object3D[],
|
||||
onDone: (gltf: ArrayBuffer | { [key: string]: unknown }) => void,
|
||||
onError: (error: ErrorEvent) => void,
|
||||
options?: GLTFExporterOptions,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects).
|
||||
*
|
||||
* This is just like the {@link parse}() method, but instead of accepting callbacks it returns a promise that
|
||||
* resolves with the result, and otherwise accepts the same options.
|
||||
*/
|
||||
parseAsync(
|
||||
input: Object3D | Object3D[],
|
||||
options?: GLTFExporterOptions,
|
||||
): Promise<ArrayBuffer | { [key: string]: unknown }>;
|
||||
}
|
||||
|
||||
declare class GLTFWriter {
|
||||
textureUtils: TextureUtils | null;
|
||||
|
||||
extensionsUsed: { [name: string]: boolean };
|
||||
extensionsRequired: { [name: string]: boolean };
|
||||
|
||||
constructor();
|
||||
|
||||
setPlugins(plugins: GLTFExporterPlugin[]): void;
|
||||
|
||||
setTextureUtils(utils: TextureUtils | null): this;
|
||||
|
||||
/**
|
||||
* Process texture
|
||||
* @param map Map to process
|
||||
* @return Index of the processed texture in the "textures" array
|
||||
*/
|
||||
processTextureAsync(map: Texture): Promise<number>;
|
||||
|
||||
/**
|
||||
* Applies a texture transform, if present, to the map definition. Requires
|
||||
* the KHR_texture_transform extension.
|
||||
*/
|
||||
applyTextureTransform(mapDef: { [key: string]: unknown }, texture: Texture): void;
|
||||
|
||||
/**
|
||||
* Parse scenes and generate GLTF output
|
||||
*
|
||||
* @param input Scene or Array of THREE.Scenes
|
||||
* @param onDone Callback on completed
|
||||
* @param options options
|
||||
*/
|
||||
writeAsync(
|
||||
input: Object3D | Object3D[],
|
||||
onDone: (gltf: ArrayBuffer | { [key: string]: unknown }) => void,
|
||||
options?: GLTFExporterOptions,
|
||||
): Promise<void>;
|
||||
}
|
||||
|
||||
export interface GLTFExporterPlugin {
|
||||
writeTexture?: (map: Texture, textureDef: { [key: string]: unknown }) => void;
|
||||
writeMaterialAsync?: (material: Material, materialDef: { [key: string]: unknown }) => Promise<void>;
|
||||
writeMesh?: (mesh: Mesh, meshDef: { [key: string]: unknown }) => void;
|
||||
writeNode?: (object: Object3D, nodeDef: { [key: string]: unknown }) => void;
|
||||
beforeParse?: (input: Object3D | Object3D[]) => void;
|
||||
afterParse?: (input: Object3D | Object3D[]) => void;
|
||||
}
|
||||
|
||||
export { GLTFExporter };
|
||||
export type { GLTFWriter };
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user