feat: 氧化铝数字孪生系统监控大屏完成

This commit is contained in:
2026-04-08 21:44:08 +08:00
commit a48babc68d
67606 changed files with 3337335 additions and 0 deletions

21
node_modules/@types/babel__core/LICENSE generated vendored Normal file
View 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
View 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
View 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
View 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
View 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
View 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
View 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, dont 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 jsescs
* 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; its 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 wont 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
View 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
View 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
View 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
View 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
View 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
View 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
View 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

File diff suppressed because it is too large Load Diff

63
node_modules/@types/babel__traverse/package.json generated vendored Normal file
View 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/d3-array/LICENSE generated vendored Normal file
View 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/d3-array/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-array`
# Summary
This package contains type definitions for d3-array (https://github.com/d3/d3-array).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array.
### Additional Details
* Last updated: Fri, 12 Sep 2025 20:02:35 GMT
* Dependencies: none
# Credits
These definitions were written by [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [Tom Wanzek](https://github.com/tomwanzek), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).

1118
node_modules/@types/d3-array/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

56
node_modules/@types/d3-array/package.json generated vendored Normal file
View File

@@ -0,0 +1,56 @@
{
"name": "@types/d3-array",
"version": "3.2.2",
"description": "TypeScript definitions for d3-array",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array",
"license": "MIT",
"contributors": [
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Hugues Stefanski",
"githubUsername": "ledragon",
"url": "https://github.com/ledragon"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
},
{
"name": "Fil",
"githubUsername": "Fil",
"url": "https://github.com/Fil"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-array"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "d8ff015b14e99aec79f6ac45682bd8237145131c804b94de0ed1e6bc003d5190",
"typeScriptVersion": "5.2"
}

21
node_modules/@types/d3-axis/LICENSE generated vendored Normal file
View 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/d3-axis/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-axis`
# Summary
This package contains type definitions for d3-axis (https://github.com/d3/d3-axis/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-axis.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: [@types/d3-selection](https://npmjs.com/package/@types/d3-selection)
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).

293
node_modules/@types/d3-axis/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,293 @@
// Last module patch version validated against: 3.0.0
import { Selection, TransitionLike } from "d3-selection";
// --------------------------------------------------------------------------
// Shared Types and Interfaces
// --------------------------------------------------------------------------
/**
* A helper type to alias elements which can serve as a domain for an axis.
*/
export type AxisDomain = number | string | Date | { valueOf(): number };
/**
* A helper interface to describe the minimal contract to be met by a time interval
* which can be passed into the Axis.ticks(...) or Axis.tickArguments(...) methods when
* creating time series axes. Under normal circumstances the argument will be of type
* TimeInterval or CountableTimeInterval as defined in d3-time.
* NB: This helper interface has been created to avoid tight coupling of d3-axis to
* d3-time at the level of definition files. I.e. d3-time is not a
* dependency of d3-axis in the D3 Javascript implementation. This minimal contract
* is based on an analysis of how d3-axis passes a time interval argument into a time scale,
* if a time scale was set using Axis.scale(...). And in turn on how a time scale uses
* the time interval when creating ticks from it.
*/
export interface AxisTimeInterval {
range(start: Date, stop: Date, step?: number): Date[];
}
/**
* A helper interface to which a scale passed into axis must conform (at a minimum)
* for axis to use the scale without error.
*/
export interface AxisScale<Domain> {
(x: Domain): number | undefined;
domain(): Domain[];
range(): number[];
copy(): this;
bandwidth?(): number;
// TODO: Reconsider the below, note that the compiler does not differentiate the overloads w.r.t. optionality
// ticks?(count?: number): Domain[];
// ticks?(count?: AxisTimeInterval): Date[];
// tickFormat?(count?: number, specifier?: string): ((d: number) => string);
// tickFormat?(count?: number | AxisTimeInterval, specifier?: string): ((d: Date) => string);
}
/**
* A helper type to alias elements which can serve as a container for an axis.
*/
export type AxisContainerElement = SVGSVGElement | SVGGElement;
/**
* Interface defining an axis generator. The generic <Domain> is the type of the axis domain.
*/
export interface Axis<Domain> {
/**
* Render the axis to the given context.
*
* @param context A selection of or a transition defined on SVG containers (either SVG or G elements).
*/
(
context:
| Selection<SVGSVGElement, any, any, any>
| Selection<SVGGElement, any, any, any>
| TransitionLike<SVGSVGElement, any>
| TransitionLike<SVGGElement, any>,
): void;
/**
* Gets the current scale underlying the axis.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
scale<A extends AxisScale<Domain>>(): A;
/**
* Sets the scale and returns the axis.
*
* @param scale The scale to be used for axis generation.
*/
scale(scale: AxisScale<Domain>): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
*
* This method is also a convenience function for axis.tickArguments.
*
* @param count Number of ticks that should be rendered.
* @param specifier An optional format specifier to customize how the tick values are formatted.
*/
ticks(count: number, specifier?: string): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
* Use with a TIME SCALE ONLY.
*
* This method is also a convenience function for axis.tickArguments.
*
* @param interval A time interval used to generate date-based ticks. This is typically a TimeInterval/CountableTimeInterval as defined
* in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15).
* @param specifier An optional format specifier to customize how the tick values are formatted.
*/
// tslint:disable-next-line:unified-signatures
ticks(interval: AxisTimeInterval, specifier?: string): this;
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* The meaning of the arguments depends on the axis scale type: most commonly, the arguments are a suggested count for the number of ticks
* (or a time interval for time scales), and an optional format specifier to customize how the tick values are formatted.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
*
* To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat.
*
* This method is also a convenience function for axis.tickArguments.
*/
ticks(arg0: any, ...args: any[]): this;
/**
* Get an array containing the currently set arguments to be passed into scale.ticks and scale.tickFormat, which defaults to the empty array.
*/
tickArguments(): any[];
/**
* Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator.
*
* This method has no effect if the scale does not implement scale.ticks, as with band and point scales.
* To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat.
*
* See also axis.ticks.
*
* @param args The meaning of the arguments depends on the axis scale type: most commonly, the arguments are a
* suggested count for the number of ticks (or a time interval for time scales), and an optional format specifier to
* customize how the tick values are formatted.
*/
tickArguments(args: any[]): this;
/**
* Returns the current tick values, which defaults to null.
*/
tickValues(): Domain[] | null;
/**
* Specified values to be used for ticks rather than using the scales automatic tick generator.
* The explicit tick values take precedent over the tick arguments set by axis.tickArguments.
* However, any tick arguments will still be passed to the scales tickFormat function if a
* tick format is not also set.
*
* @param values An iterable with values from the Domain of the scale underlying the axis.
*/
tickValues(values: Iterable<Domain>): this;
/**
* Clears any previously-set explicit tick values and reverts back to the scales tick generator.
*
* @param values null
*/
tickValues(values: null): this;
/**
* Returns the currently set tick format function, which defaults to null.
*/
tickFormat(): ((domainValue: Domain, index: number) => string) | null;
/**
* Sets the tick format function and returns the axis.
*
* @param format A function mapping a value from the axis Domain to a formatted string
* for display purposes. When invoked, the format function is also passed a second argument representing the zero-based index
* of the tick label in the array of generated tick labels.
*/
tickFormat(format: (domainValue: Domain, index: number) => string): this;
/**
* Reset the tick format function. A null format indicates that the scales
* default formatter should be used, which is generated by calling scale.tickFormat.
* In this case, the arguments specified by axis.tickArguments
* are likewise passed to scale.tickFormat.
*
* @param format null
*/
tickFormat(format: null): this;
/**
* Get the current inner tick size, which defaults to 6.
*/
tickSize(): number;
/**
* Set the inner and outer tick size to the specified value and return the axis.
*
* @param size Tick size in pixels (Default is 6).
*/
tickSize(size: number): this;
/**
* Get the current inner tick size, which defaults to 6.
* The inner tick size controls the length of the tick lines,
* offset from the native position of the axis.
*/
tickSizeInner(): number;
/**
* Set the inner tick size to the specified value and return the axis.
* The inner tick size controls the length of the tick lines,
* offset from the native position of the axis.
*
* @param size Tick size in pixels (Default is 6).
*/
tickSizeInner(size: number): this;
/**
* Get the current outer tick size, which defaults to 6.
* The outer tick size controls the length of the square ends of the domain path,
* offset from the native position of the axis. Thus, the “outer ticks” are not actually
* ticks but part of the domain path, and their position is determined by the associated
* scales domain extent. Thus, outer ticks may overlap with the first or last inner tick.
* An outer tick size of 0 suppresses the square ends of the domain path,
* instead producing a straight line.
*/
tickSizeOuter(): number;
/**
* Set the current outer tick size and return the axis.
* The outer tick size controls the length of the square ends of the domain path,
* offset from the native position of the axis. Thus, the “outer ticks” are not actually
* ticks but part of the domain path, and their position is determined by the associated
* scales domain extent. Thus, outer ticks may overlap with the first or last inner tick.
* An outer tick size of 0 suppresses the square ends of the domain path,
* instead producing a straight line.
*
* @param size Tick size in pixels (Default is 6).
*/
tickSizeOuter(size: number): this;
/**
* Get the current padding, which defaults to 3.
*/
tickPadding(): number;
/**
* Set the current padding and return the axis.
*
* @param padding Padding in pixels (Default is 3).
*/
tickPadding(padding: number): this;
/**
* Returns the current offset which defaults to 0 on devices with a devicePixelRatio greater than 1, and 0.5px otherwise.
* This default offset ensures crisp edges on low-resolution devices.
*/
offset(): number;
/**
* Sets the offset to the specified value in pixels and returns the axis.
* Defaults to 0 on devices with a devicePixelRatio greater than 1, and 0.5px otherwise.
* This default offset ensures crisp edges on low-resolution devices.
*/
offset(offset: number): this;
}
/**
* Constructs a new top-oriented axis generator for the given scale, with empty tick arguments,
* a tick size of 6 and padding of 3. In this orientation, ticks are drawn above the horizontal domain path.
*
* @param scale The scale to be used for axis generation.
*/
export function axisTop<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>;
/**
* Constructs a new right-oriented axis generator for the given scale, with empty tick arguments,
* a tick size of 6 and padding of 3. In this orientation, ticks are drawn to the right of the vertical domain path.
*
* @param scale The scale to be used for axis generation.
*/
export function axisRight<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>;
/**
* Constructs a new bottom-oriented axis generator for the given scale, with empty tick arguments,
* a tick size of 6 and padding of 3. In this orientation, ticks are drawn below the horizontal domain path.
*
* @param scale The scale to be used for axis generation.
*/
export function axisBottom<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>;
/**
* Constructs a new left-oriented axis generator for the given scale, with empty tick arguments,
* a tick size of 6 and padding of 3. In this orientation, ticks are drawn to the left of the vertical domain path.
*
* @param scale The scale to be used for axis generation.
*/
export function axisLeft<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>;

47
node_modules/@types/d3-axis/package.json generated vendored Normal file
View File

@@ -0,0 +1,47 @@
{
"name": "@types/d3-axis",
"version": "3.0.6",
"description": "TypeScript definitions for d3-axis",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-axis",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-axis"
},
"scripts": {},
"dependencies": {
"@types/d3-selection": "*"
},
"typesPublisherContentHash": "54b1b488ceb700b459aa9157899d313ddf4dce4c5b9677facd2289f810392a79",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-brush/LICENSE generated vendored Normal file
View 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/d3-brush/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-brush`
# Summary
This package contains type definitions for d3-brush (https://github.com/d3/d3-brush/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-brush.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: [@types/d3-selection](https://npmjs.com/package/@types/d3-selection)
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

255
node_modules/@types/d3-brush/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,255 @@
// Last module patch version validated against: 3.0.0
import { Selection, TransitionLike, ValueFn } from "d3-selection";
/**
* Type alias for a BrushSelection. For a two-dimensional brush, it must be defined as [[x0, y0], [x1, y1]],
* where x0 is the minimum x-value, y0 is the minimum y-value, x1 is the maximum x-value, and y1 is the maximum y-value.
* For an x-brush, it must be defined as [x0, x1]; for a y-brush, it must be defined as [y0, y1].
*/
export type BrushSelection = [[number, number], [number, number]] | [number, number];
/**
* A D3 brush behavior
*
* The generic refers to the type of the datum for the group element on which brush behavior is defined.
*/
export interface BrushBehavior<Datum> {
/**
* Applies the brush to the specified group, which must be a selection of SVG G elements.
* This function is typically not invoked directly, and is instead invoked via selection.call.
*
* For details see: {@link https://github.com/d3/d3-brush#_brush}
*
* @param group A D3 selection of SVG G elements.
* @param args Optional arguments to be passed in.
*/
(group: Selection<SVGGElement, Datum, any, any>, ...args: any[]): void;
/**
* Clear the active selection of the brush on the specified SVG G element(s) selection.
*
* @param group A selection or a transition of SVG G elements
* @param selection The selection must be defined as an array of numbers, or null to clear the brush selection.
* For a two-dimensional brush, it must be defined as [[x0, y0], [x1, y1]], where x0 is the minimum x-value, y0 is the minimum y-value, x1 is the maximum x-value, and y1 is the maximum y-value.
* For an x-brush, it must be defined as [x0, x1]; for a y-brush, it must be defined as [y0, y1].
* The selection may also be specified as a function which returns such an array;
* if a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element.
* The returned array defines the brush selection for that element.
* @param event
*/
move(
group: Selection<SVGGElement, Datum, any, any> | TransitionLike<SVGGElement, Datum>,
selection: null | BrushSelection | ValueFn<SVGGElement, Datum, BrushSelection>,
event?: Event,
): void;
/**
* Clear the active selection of the brush on the specified SVG G element(s) selection.
*
* @param group A D3 selection of SVG G elements.
* @param event
*/
clear(group: Selection<SVGGElement, Datum, any, any>, event?: Event): void;
/**
* Returns the current extent accessor.
*/
extent(): ValueFn<SVGGElement, Datum, [[number, number], [number, number]]>;
/**
* Set the brushable extent to the specified array of points and returns this brush.
*
* The brush extent determines the size of the invisible overlay and also constrains the brush selection;
* the brush selection cannot go outside the brush extent.
*
* @param extent array of points [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner
* and [x1, y1] is the bottom-right corner.
*/
extent(extent: [[number, number], [number, number]]): this;
/**
* Set the brushable extent to the specified array of points returned by the accessor function
* evaluated for each element in the selection/transition and returns this brush.
*
* The brush extent determines the size of the invisible overlay and also constrains the brush selection;
* the brush selection cannot go outside the brush extent.
*
* @param extent An extent accessor function which is evaluated for each selected element,
* in order, being passed the current datum (d), the current index (i), and the current group (nodes),
* with this as the current DOM element. The function returns an array of points [[x0, y0], [x1, y1]],
* where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner.
*/
extent(extent: ValueFn<SVGGElement, Datum, [[number, number], [number, number]]>): this;
/**
* Returns the current filter function.
*/
filter(): (this: SVGGElement, event: any, d: Datum) => boolean;
/**
* Sets the filter to the specified filter function and returns the brush.
*
* If the filter returns falsey, the initiating event is ignored and no brush gesture is started.
* Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons,
* since those buttons are typically intended for other purposes, such as the context menu.
*
* @param filterFn A filter function which is evaluated for each selected element,
* in order, being passed the current event `event` and datum `d`, with the `this` context as the current DOM element.
* The function returns a boolean value.
*/
filter(filterFn: (this: SVGGElement, event: any, d: Datum) => boolean): this;
/**
* Returns the current touch support detector, which defaults to a function returning true,
* if the "ontouchstart" event is supported on the current element.
*/
touchable(): ValueFn<SVGGElement, Datum, boolean>;
/**
* Sets the touch support detector to the specified boolean value and returns the brush.
*
* Touch event listeners are only registered if the detector returns truthy for the corresponding element when the brush is applied.
* The default detector works well for most browsers that are capable of touch input, but not all; Chromes mobile device emulator, for example,
* fails detection.
*
* @param touchable A boolean value. true when touch event listeners should be applied to the corresponding element, otherwise false.
*/
touchable(touchable: boolean): this;
/**
* Sets the touch support detector to the specified function and returns the drag behavior.
*
* Touch event listeners are only registered if the detector returns truthy for the corresponding element when the brush is applied.
* The default detector works well for most browsers that are capable of touch input, but not all; Chromes mobile device emulator, for example,
* fails detection.
*
* @param touchable A touch support detector function, which returns true when touch event listeners should be applied to the corresponding element.
* The function is evaluated for each selected element to which the brush was applied, in order, being passed the current datum (d),
* the current index (i), and the current group (nodes), with this as the current DOM element. The function returns a boolean value.
*/
touchable(touchable: ValueFn<SVGGElement, Datum, boolean>): this;
/**
* Returns the current key modifiers flag.
*/
keyModifiers(): boolean;
/**
* Sets the key modifiers flag and returns the brush.
*
* The key modifiers flag determines whether the brush listens to key events during brushing.
* The default value is true.
*
* @param modifiers New value for key modifiers flag.
*/
keyModifiers(modifiers: boolean): this;
/**
* Returns the current handle size, which defaults to six.
*/
handleSize(): number;
/**
* Sets the size of the brush handles to the specified number and returns the brush.
*
* This method must be called before applying the brush to a selection;
* changing the handle size does not affect brushes that were previously rendered.
* The default size is 6.
*
* @param size Size of the handle.
*/
handleSize(size: number): this;
/**
* Returns the first currently-assigned listener matching the specified typenames, if any.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "brush.foo"" and "brush.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (at the start of a brush gesture, such as on mousedown), brush (when the brush moves, such as on mousemove), or
* end (at the end of a brush gesture, such as on mouseup.)
*/
on(typenames: string): ((this: SVGGElement, event: any, d: Datum) => void) | undefined;
/**
* Removes the current event listeners for the specified typenames, if any.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "brush.foo"" and "brush.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (at the start of a brush gesture, such as on mousedown), brush (when the brush moves, such as on mousemove), or
* end (at the end of a brush gesture, such as on mouseup.)
* @param listener Use null to remove the listener.
*/
on(typenames: string, listener: null): this;
/**
* Sets the event listener for the specified typenames and returns the brush.
* If an event listener was already registered for the same type and name,
* the existing listener is removed before the new listener is added.
* When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "brush.foo"" and "brush.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (at the start of a brush gesture, such as on mousedown), brush (when the brush moves, such as on mousemove), or
* end (at the end of a brush gesture, such as on mouseup.)
* @param listener An event listener function which is evaluated for each selected element,
* in order, being passed the current event `event` and datum `d`, with the `this` context as the current DOM element.
*/
on(typenames: string, listener: (this: SVGGElement, event: any, d: Datum) => void): this;
}
/**
* Create a new two-dimensional brush.
*
* The generic "Datum" refers to the type of the data of the selected svg:g element to
* which the returned BrushBehavior will be applied.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function brush<Datum>(): BrushBehavior<Datum>;
/**
* Creates a new one-dimensional brush along the x-dimension.
*
* The generic "Datum" refers to the type of the data of the selected svg:g element to
* which the returned BrushBehavior will be applied.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function brushX<Datum>(): BrushBehavior<Datum>;
/**
* Creates a new one-dimensional brush along the y-dimension.
*
* The generic "Datum" refers to the type of the data of the selected svg:g element to
* which the returned BrushBehavior will be applied.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function brushY<Datum>(): BrushBehavior<Datum>;
/**
* Return the current brush selection for the specified node. Internally, an elements brush state is stored as element.__brush;
* however, you should use this method rather than accessing it directly. If the given node has no selection, returns null.
* Otherwise, the selection is defined as an array of numbers.
*
* @param node The node for which the brush selection should be returned.
*/
export function brushSelection(node: SVGGElement): BrushSelection | null;
/**
* D3 brush event
*
* The generic refers to the type of the datum for the group element on which brush was defined.
*/
export interface D3BrushEvent<Datum> {
/**
* The BrushBehavior associated with the event
*/
target: BrushBehavior<Datum>;
/**
* The event type for the BrushEvent
*/
type: "start" | "brush" | "end" | string; // Leave failsafe string type for cases like 'brush.foo'
/**
* The current brush selection associated with the event.
* This is null when the selection is empty.
*/
selection: BrushSelection | null;
/**
* The underlying input event, such as mousemove or touchmove.
*/
sourceEvent: any;
/**
* The mode of the brush.
*/
mode: "drag" | "space" | "handle" | "center";
}

42
node_modules/@types/d3-brush/package.json generated vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "@types/d3-brush",
"version": "3.0.6",
"description": "TypeScript definitions for d3-brush",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-brush",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-brush"
},
"scripts": {},
"dependencies": {
"@types/d3-selection": "*"
},
"typesPublisherContentHash": "9236bf058564aa97984c8fb6e4ef96b84e6221485def99fbb4aebaccf68e0367",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-chord/LICENSE generated vendored Normal file
View 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/d3-chord/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-chord`
# Summary
This package contains type definitions for d3-chord (https://github.com/d3/d3-chord/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-chord.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

471
node_modules/@types/d3-chord/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,471 @@
// Last module patch version validated against: 3.0.1
// ---------------------------------------------------------------------
// Chord
// ---------------------------------------------------------------------
/**
* A chord subgroup serving as source or target of a chord between two nodes i an j (where i may be equal to j).
*/
export interface ChordSubgroup {
/**
* Start angle of the chord subgroup in radians
*/
startAngle: number;
/***
* End angle of the chord subgroup in radians
*/
endAngle: number;
/**
* The flow value in matrix[i][j] from node i to node j
*/
value: number;
/**
* The node index i
*/
index: number;
}
/**
* A chord represents the combined bidirectional flow between two nodes i and j (where i may be equal to j)
*/
export interface Chord {
/**
* Chord subgroup constituting the source of Chord
*/
source: ChordSubgroup;
/**
* Chord subgroup constituting the Target of Chord
*/
target: ChordSubgroup;
}
/**
* A chord group for a given node i representing the combined outflow for node i,
* corresponding to the elements matrix[i][0 … n - 1].
*/
export interface ChordGroup {
/**
* The start angle of the chord group in radians
*/
startAngle: number;
/**
* The end angle of the chord group in radians
*/
endAngle: number;
/**
* The total outgoing flow value for node i
*/
value: number;
/**
* The node index i
*/
index: number;
}
/**
* An array of chords, where each chord represents the combined bidirectional flow between two nodes i and j (where i may be equal to j).
* The chords are based on a (n x n) matrix of flows between nodes.
*
* The chords are typically passed to d3.ribbon to display the network relationships.
* The returned array includes only chord objects for which the value matrix[i][j] or matrix[j][i] is non-zero.
* Furthermore, the returned array only contains unique chords: a given chord ij represents the bidirectional flow from i to j and from j to i,
* and does not contain a duplicate chord ji; i and j are chosen such that the chords source always represents the larger of matrix[i][j] and matrix[j][i].
* In other words, chord.source.index equals chord.target.subindex, chord.source.subindex equals chord.target.index,
* chord.source.value is greater than or equal to chord.target.value, and chord.source.value is always greater than zero.
*/
export interface Chords extends Array<Chord> {
/**
* An array of length n, where each group represents the combined outflow for node i,
* corresponding to the elements matrix[i][0 … n - 1]
*/
groups: ChordGroup[];
}
/**
* A D3 chord diagram Layout to visualize relationships or network flow with an aesthetically-pleasing circular layout.
*
* The relationships are represented as a square matrix of size n×n, where the matrix represents the directed flow amongst a network (a complete digraph) of n nodes.
*/
export interface ChordLayout {
/**
* Computes the chord layout for the specified square matrix of size n×n, where the matrix represents the directed flow amongst a network (a complete digraph) of n nodes.
*
* @param matrix An (n x n) matrix representing the directed flow amongst a network (a complete digraph) of n nodes.The given matrix must be an array of length n,
* where each element matrix[i] is an array of n numbers, where each matrix[i][j] represents the flow from the ith node in the network to the jth node.
* Each number matrix[i][j] must be nonnegative, though it can be zero if there is no flow from node i to node j.
*/
(matrix: number[][]): Chords;
/**
* Returns the current pad angle in radians, which defaults to zero.
*/
padAngle(): number;
/**
* Sets the pad angle between adjacent groups to the specified number in radians and returns this chord layout.
*
* The default is zero.
*
* @param angle Pad angle between adjacent groups in radians.
*/
padAngle(angle: number): this;
/**
* Returns the current group comparator, which defaults to null.
*/
sortGroups(): ((a: number, b: number) => number) | null;
/**
* Sets the group comparator to the specified function or null and returns this chord layout.
* If the group comparator is non-null, it is used to sort the groups by their total outflow.
* See also d3.ascending and d3.descending.
*/
sortGroups(compare: null | ((a: number, b: number) => number)): this;
/**
* Returns the current subgroup comparator, which defaults to null.
*/
sortSubgroups(): ((a: number, b: number) => number) | null;
/**
* Sets the subgroup comparator to the specified function or null and returns this chord layout.
* If the subgroup comparator is non-null, it is used to sort the subgroups corresponding to matrix[i][0 … n - 1] for a given group i by their total outflow.
* See also d3.ascending and d3.descending.
*/
sortSubgroups(compare: null | ((a: number, b: number) => number)): this;
/**
* Returns the current chord comparator, which defaults to null.
*/
sortChords(): ((a: number, b: number) => number) | null;
/**
* Sets the chord comparator to the specified function or null and returns this chord layout.
* If the chord comparator is non-null, it is used to sort the chords by their combined flow; this only affects the z-order of the chords.
* See also d3.ascending and d3.descending.
*/
sortChords(compare: null | ((a: number, b: number) => number)): this;
}
/**
* Constructs a new chord diagram layout with the default settings.
*/
export function chord(): ChordLayout;
/**
* A chord layout for directional flows. The chord from i to j is generated from the value in matrix[i][j] only.
*/
export function chordDirected(): ChordLayout;
/**
* A transposed chord layout. Useful to highlight outgoing (rather than incoming) flows.
*/
export function chordTranspose(): ChordLayout;
// ---------------------------------------------------------------------
// Ribbon
// ---------------------------------------------------------------------
/**
* A minimal interface to support the default accessors used by RibbonGenerator for properties of
* source and target objects of a Ribbon.
*
* (Corresponds to ChordSubgroup)
*/
export interface RibbonSubgroup {
/**
* Start angle of the ribbon subgroup in radians
*/
startAngle: number;
/**
* End angle of the ribbon subgroup in radians
*/
endAngle: number;
/**
* Radius of the ribbon subgroup
*/
radius: number;
}
/**
* A minimal interface to support the default source and target accessors used by RibbonGenerator.
* (Corresponds to Chord)
*/
export interface Ribbon {
/**
* Ribbon subgroup constituting the source of the Ribbon
*/
source: RibbonSubgroup;
/**
* Ribbon subgroup constituting the target of the Ribbon
*/
target: RibbonSubgroup;
}
/**
* A ribbon generator to support rendering of chords in a chord diagram.
*
* The first generic corresponds to the type of the "this" context within which the ribbon generator and its accessor functions will be invoked.
*
* The second generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Ribbon.
*
* The third generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is RibbonSubgroup.
*/
export interface RibbonGenerator<This, RibbonDatum, RibbonSubgroupDatum> {
/**
* Generates a ribbon for the given arguments.
*
* IMPORTANT: If the ribbon generator has been configured with a rendering context,
* then the ribbon is rendered to this context as a sequence of path method calls and this function returns void.
*
* The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked.
* All arguments passed into this function, will be passed to the accessor functions of the generator.
*
* @param d The datum representing the chord for which the ribbon is to be generated.
*/
(this: This, d: RibbonDatum, ...args: any[]): void;
/**
* Generates a ribbon for the given arguments.
*
* IMPORTANT: If the rendering context of the ribbon generator is null,
* then the ribbon is returned as a path data string.
*
* The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked.
* All arguments passed into this function, will be passed to the accessor functions of the generator.
*
* @param d The datum representing the chord for which the ribbon is to be generated.
*/
(this: This, d: RibbonDatum, ...args: any[]): string | null;
/**
* Returns the current source accessor, which defaults to a function returning the "source" property of the first argument passed into the accessor.
*/
source(): (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum;
/**
* Sets the source accessor to the specified function and returns this ribbon generator.
*
* @param source An accessor function returning the source datum of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives the same arguments that were passed into the ribbon generator.
*/
source(source: (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum): this;
/**
* Returns the current target accessor, which defaults to a function returning the "target" property of the first argument passed into the accessor.
*/
target(): (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum;
/**
* Sets the target accessor to the specified function and returns this ribbon generator.
*
* @param target An accessor function returning the target datum of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives the same arguments that were passed into the ribbon generator.
*/
target(target: (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum): this;
/**
* Returns the current radius accessor, which defaults to a function returning the "radius" property (assumed to be a number) of the source or
* target object returned by the source or target accessor, respectively.
*/
radius(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number;
/**
* Sets the radius to a fixed number and returns this ribbon generator.
*
* @param radius A fixed numeric value for the radius.
*/
radius(radius: number): this;
/**
* Sets the radius accessor to the specified function and returns this ribbon generator.
*
* @param radius An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives as the first argument the source or target object returned by the respective source or target accessor function of the generator.
* It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself.
* The function returns the radius value.
*/
radius(radius: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this;
/**
* Returns the current source radius accessor, which defaults to a function returning the "radius" property (assumed to be a number) of the source or
* target object returned by the source or target accessor, respectively.
*/
sourceRadius(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number;
/**
* Sets the source radius to a fixed number and returns this ribbon generator.
*
* @param radius A fixed numeric value for the source radius.
*/
sourceRadius(radius: number): this;
/**
* Sets the source radius accessor to the specified function and returns this ribbon generator.
*
* @param radius An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives as the first argument the source or target object returned by the respective source or target accessor function of the generator.
* It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself.
* The function returns the source radius value.
*/
sourceRadius(radius: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this;
/**
* Returns the current target radius accessor, which defaults to a function returning the "radius" property (assumed to be a number) of the source or
* target object returned by the source or target accessor, respectively.
*/
targetRadius(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number;
/**
* Sets the target radius to a fixed number and returns this ribbon generator.
*
* @param radius A fixed numeric value for the target radius.
*/
targetRadius(radius: number): this;
/**
* Sets the target radius accessor to the specified function and returns this ribbon generator.
*
* @param radius An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives as the first argument the source or target object returned by the respective source or target accessor function of the generator.
* It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself.
* The function returns the target radius value.
*/
targetRadius(radius: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this;
/**
* Returns the current start angle accessor, which defaults to a function returning the "startAngle" property (assumed to be a number in radians) of the source or
* target object returned by the source or target accessor, respectively.
*/
startAngle(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number;
/**
* Sets the start angle to a fixed number in radians and returns this ribbon generator.
*
* @param angle A fixed numeric value for the start angle in radians.
*/
startAngle(angle: number): this;
/**
* Sets the start angle accessor to the specified function and returns this ribbon generator.
*
* @param angle An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives as the first argument the source or target object returned by the respective source or target accessor function of the generator.
* It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself.
* The function returns the start angle in radians.
*/
startAngle(angle: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this;
/**
* Returns the current end angle accessor, which defaults to a function returning the "endAngle" property (assumed to be a number in radians) of the source or
* target object returned by the source or target accessor, respectively.
*/
endAngle(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number;
/**
* Sets the end angle to a fixed number in radians and returns this ribbon generator.
*
* @param angle A fixed numeric value for the end angle in radians.
*/
endAngle(angle: number): this;
/**
* Sets the end angle accessor to the specified function and returns this ribbon generator.
*
* @param angle An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives as the first argument the source or target object returned by the respective source or target accessor function of the generator.
* It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself.
* The function returns the end angle in radians.
*/
endAngle(angle: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this;
/**
* Returns the current pad angle accessor, which defaults to a function returning 0.
*/
padAngle(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number;
/**
* Sets the pad angle to a fixed number in radians and returns this ribbon generator.
*
* @param angle A fixed numeric value for the pad angle in radians.
*/
padAngle(angle: number): this;
/**
* Sets the pad angle accessor to the specified function and returns this ribbon generator.
*
* @param angle An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and
* receives as the first argument the source or target object returned by the respective source or target accessor function of the generator.
* It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself.
* The function returns the pad angle in radians.
*/
padAngle(angle: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this;
/**
* Returns the current rendering context, which defaults to null.
*/
context(): CanvasRenderingContext2D | null;
/**
* Sets the context and returns this ribbon generator.
* If the context is not null, then the generated ribbon is rendered to this context as a sequence of path method calls.
* Otherwise, a path data string representing the generated ribbon is returned.
* See also d3-path.
*/
context(context: CanvasRenderingContext2D | null): this;
}
export interface RibbonArrowGenerator<This, RibbonDatum, RibbonSubgroupDatum>
extends RibbonGenerator<This, RibbonDatum, RibbonSubgroupDatum>
{
headRadius(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number;
headRadius(radius: number): this;
headRadius(radius: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this;
}
/**
* Creates a new ribbon generator with the default settings.
*/
export function ribbon(): RibbonGenerator<any, Ribbon, RibbonSubgroup>;
/**
* Creates a new ribbon generator with the default settings.
*
* Accessor functions must be configured for the ribbon generator, should the datum types differ from the defaults.
*
* The first generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Chord.
*
* The second generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is ChordSubgroup.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function ribbon<Datum, SubgroupDatum>(): RibbonGenerator<any, Datum, SubgroupDatum>;
/**
* Creates a new ribbon generator with the default settings.
*
* Accessor functions must be configured for the ribbon generator, should the datum types differ from the defaults.
*
* The first generic corresponds to the type of the "this" context within which the ribbon generator and its accessor functions will be invoked.
*
* The second generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Chord.
*
* The third generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is ChordSubgroup.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function ribbon<This, Datum, SubgroupDatum>(): RibbonGenerator<This, Datum, SubgroupDatum>;
/**
* Creates a new arrow ribbon generator with the default settings.
*/
export function ribbonArrow(): RibbonArrowGenerator<any, Ribbon, RibbonSubgroup>;
/**
* Creates a new arrow ribbon generator with the default settings.
*
* Accessor functions must be configured for the ribbon generator, should the datum types differ from the defaults.
*
* The first generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Chord.
*
* The second generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is ChordSubgroup.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function ribbonArrow<Datum, SubgroupDatum>(): RibbonArrowGenerator<any, Datum, SubgroupDatum>;
/**
* Creates a new arrow ribbon generator with the default settings.
*
* Accessor functions must be configured for the ribbon generator, should the datum types differ from the defaults.
*
* The first generic corresponds to the type of the "this" context within which the ribbon generator and its accessor functions will be invoked.
*
* The second generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Chord.
*
* The third generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is ChordSubgroup.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function ribbonArrow<This, Datum, SubgroupDatum>(): RibbonArrowGenerator<This, Datum, SubgroupDatum>;

40
node_modules/@types/d3-chord/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "@types/d3-chord",
"version": "3.0.6",
"description": "TypeScript definitions for d3-chord",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-chord",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-chord"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "4b753915a8486b9468d72bb011600af470757b5a78e0fefe46a9315e12c94140",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-color/LICENSE generated vendored Normal file
View 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/d3-color/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-color`
# Summary
This package contains type definitions for d3-color (https://github.com/d3/d3-color/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-color.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).

669
node_modules/@types/d3-color/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,669 @@
// Last module patch version validated against: 3.1.0
// ---------------------------------------------------------------------------
// Shared Type Definitions and Interfaces
// ---------------------------------------------------------------------------
/**
* Type allowing for color objects from a specified color space
*/
export type ColorSpaceObject = RGBColor | HSLColor | LabColor | HCLColor | CubehelixColor;
/**
* A helper interface of methods common to color objects (including colors defined outside the d3-color standard module,
* e.g. in d3-hsv). This interface
*/
export interface ColorCommonInstance {
/**
* Returns true if and only if the color is displayable on standard hardware.
* For example, this returns false for an RGB color if any channel value is less than zero or greater than 255, or if the opacity is not in the range [0, 1].
*/
displayable(): boolean;
/**
* Returns a string representing this color according to the CSS Object Model specification,
* such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2).
* If this color is not displayable, a suitable displayable color is returned instead.
* For example, RGB channel values greater than 255 are clamped to 255.
*/
toString(): string;
/**
* Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
* If k is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space.
*
* @param k A color space dependent number to determine, how much brighter the returned color should be.
*/
brighter(k?: number): this;
/**
* Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
* If k is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space.
*
* @param k A color space dependent number to determine, how much darker the returned color should be.
*/
darker(k?: number): this;
/**
* Returns the RGB equivalent of this color. For RGB colors, thats "this".
*/
rgb(): RGBColor;
/**
* Returns a hexadecimal string representing this color.
* If this color is not displayable, a suitable displayable color is returned instead.
* For example, RGB channel values greater than 255 are clamped to 255.
*/
hex(): string;
}
/**
* A Color object which serves as a base class for
* colorspace-specific sub-class implementations.
*/
export interface Color {
/**
* Returns true if and only if the color is displayable on standard hardware.
* For example, this returns false for an RGB color if any channel value is less than zero or greater than 255, or if the opacity is not in the range [0, 1].
*/
displayable(): boolean; // Note: While this method is used in prototyping for colors of specific colorspaces, it should not be called directly, as 'this.rgb' would not be implemented on Color
/**
* Returns a string representing this color according to the CSS Object Model specification,
* such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2).
* If this color is not displayable, a suitable displayable color is returned instead.
* For example, RGB channel values greater than 255 are clamped to 255.
*/
toString(): string; // Note: While this method is used in prototyping for colors of specific colorspaces, it should not be called directly, as 'this.rgb' would not be implemented on Color
/**
* Returns a hexadecimal string representing this color in RGB space, such as #f7eaba.
* If this color is not displayable, a suitable displayable color is returned instead.
* For example, RGB channel values greater than 255 are clamped to 255.
*/
formatHex(): string;
/**
* Returns a hexadecimal string representing this color in RGBA space, such as #f7eaba90.
* If this color is not displayable, a suitable displayable color is returned instead.
* For example, RGB channel values greater than 255 are clamped to 255.
*/
formatHex8(): string;
/**
* Returns a string representing this color according to the CSS Color Module Level 3 specification, such as hsl(257, 50%, 80%) or hsla(257, 50%, 80%, 0.2).
* If this color is not displayable, a suitable displayable color is returned instead by clamping S and L channel values to the interval [0, 100].
*/
formatHsl(): string;
/**
* Returns a string representing this color according to the CSS Object Model specification, such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2).
* If this color is not displayable, a suitable displayable color is returned instead by clamping RGB channel values to the interval [0, 255].
*/
formatRgb(): string;
/**
* @deprecated Use color.formatHex.
*/
hex(): string;
}
/**
* A Color factory object, which may also be used with instanceof to test if an object is a color instance.
*/
export interface ColorFactory extends Function {
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning an RGB or HSL color.
* If the specifier was not valid, null is returned.
*
* @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
*/
(cssColorSpecifier: string): RGBColor | HSLColor | null;
/**
* Converts the provided color instance and returns an RGB or HSL color.
*
* @param color A permissible color space instance.
*/
(color: ColorSpaceObject | ColorCommonInstance): RGBColor | HSLColor;
/**
* Prototype of the factory, which can be used for instanceof testing
*/
readonly prototype: Color;
}
/**
* An RGB color object.
*/
export interface RGBColor extends Color {
/**
* Value of red channel
*/
r: number;
/**
* Value of green channel
*/
g: number;
/**
* Value of blue channel
*/
b: number;
/**
* Opacity value
*/
opacity: number;
/**
* Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much brighter the returned color should be.
*/
brighter(k?: number): this;
/**
* Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much darker the returned color should be.
*/
darker(k?: number): this;
/**
* Returns the RGB equivalent of this color.
*/
rgb(): this;
/**
* Returns a copy of this color.
*
* @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
*/
copy(
values?: {
r?: number | undefined;
g?: number | undefined;
b?: number | undefined;
opacity?: number | undefined;
},
): this;
/**
* Returns a new RGB color where the r, g, and b channels are clamped to the range [0, 255] and rounded to the nearest integer value,
* and the opacity is clamped to the range [0, 1].
*/
clamp(): this;
}
/**
* An RGB color factory object, which may also be used with instanceof to test if an object
* is an RGB color instance.
*/
export interface RGBColorFactory extends Function {
/**
* Constructs a new RGB color based on the specified channel values and opacity.
*
* @param r Red channel value.
* @param g Green channel value.
* @param b Blue channel value.
* @param opacity Optional opacity value, defaults to 1.
*/
(r: number, g: number, b: number, opacity?: number): RGBColor;
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning an RGB color.
* If the specifier was not valid, null is returned.
*
* @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
*/
(cssColorSpecifier: string): RGBColor;
/**
* Converts the provided color instance and returns an RGB color. The color instance is converted to the RGB color space using color.rgb.
* Note that unlike color.rgb this method always returns a new instance, even if color is already an RGB color.
*
* @param color A permissible color space instance.
*/
// tslint:disable-next-line:unified-signatures
(color: ColorSpaceObject | ColorCommonInstance): RGBColor;
/**
* Prototype of the factory, which can be used for instanceof testing
*/
readonly prototype: RGBColor;
}
/**
* An HSL color object.
*/
export interface HSLColor extends Color {
/**
* Hue channel value.
*/
h: number;
/**
* Saturation channel value.
*/
s: number;
/**
* Lightness channel value.
*/
l: number;
/**
* Opacity value.
*/
opacity: number;
/**
* Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much brighter the returned color should be.
*/
brighter(k?: number): this;
/**
* Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much darker the returned color should be.
*/
darker(k?: number): this;
/**
* Returns the RGB color equivalent of this color.
*/
rgb(): RGBColor;
/**
* Returns a copy of this color.
*
* @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
*/
copy(
values?: {
h?: number | undefined;
s?: number | undefined;
l?: number | undefined;
opacity?: number | undefined;
},
): this;
/**
* Returns a new HSL color where the h channel is clamped to the range [0, 360), and the s, l, and opacity channels are clamped to the range [0, 1].
*/
clamp(): this;
}
/**
* An HSL color factory object, which may also be used with instanceof to test if an object
* is an HSL color instance.
*/
export interface HSLColorFactory extends Function {
/**
* Constructs a new HSL color based on the specified channel values and opacity.
*
* @param h Hue channel value.
* @param s Saturation channel value.
* @param l Lightness channel value.
* @param opacity Optional opacity value, defaults to 1.
*/
(h: number, s: number, l: number, opacity?: number): HSLColor;
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning an HSL color.
* If the specifier was not valid, null is returned.
*
* @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
*/
(cssColorSpecifier: string): HSLColor;
/**
* Converts the provided color instance and returns an HSL color.
* The color instance is converted to the RGB color space using color.rgb and then converted to HSL.
* (Colors already in the HSL color space skip the conversion to RGB.)
*
* @param color A permissible color space instance.
*/
// tslint:disable-next-line:unified-signatures
(color: ColorSpaceObject | ColorCommonInstance): HSLColor;
/**
* Prototype of the factory, which can be used for instanceof testing
*/
readonly prototype: HSLColor;
}
/**
* A Lab (CIELAB) color object.
*/
export interface LabColor extends Color {
/**
* Lightness typically in the range [0, 100].
*/
l: number;
/**
* Position between red/magenta and green typically in [-160, +160].
*/
a: number;
/**
* Position between yellow and blue typically in [-160, +160].
*/
b: number;
/**
* Opacity value
*/
opacity: number;
/**
* Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much brighter the returned color should be.
*/
brighter(k?: number): this;
/**
* Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much darker the returned color should be.
*/
darker(k?: number): this;
/**
* Returns the RGB color equivalent of this color.
*/
rgb(): RGBColor;
/**
* Returns a copy of this color.
*
* @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
*/
copy(
values?: {
l?: number | undefined;
a?: number | undefined;
b?: number | undefined;
opacity?: number | undefined;
},
): this;
}
/**
* A Lab (CIELAB) color factory object, which may also be used with instanceof to test if an object
* is a Lab color instance.
*/
export interface LabColorFactory extends Function {
/**
* Constructs a new CIELAB color based on the specified channel values and opacity.
*
* @param l Lightness typically in the range [0, 100].
* @param a Position between red/magenta and green typically in [-160, +160].
* @param b Position between yellow and blue typically in [-160, +160].
* @param opacity Optional opacity value, defaults to 1.
*/
(l: number, a: number, b: number, opacity?: number): LabColor;
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning a Lab color.
* If the specifier was not valid, null is returned.
*
* @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
*/
(cssColorSpecifier: string): LabColor;
/**
* Converts the provided color instance and returns a Lab color.
* The color instance is converted to the RGB color space using color.rgb and then converted to CIELAB.
* (Colors already in the Lab color space skip the conversion to RGB,
* and colors in the HCL color space are converted directly to CIELAB.)
*
* @param color A permissible color space instance.
*/
// tslint:disable-next-line:unified-signatures
(color: ColorSpaceObject | ColorCommonInstance): LabColor;
/**
* Prototype of the factory, which can be used for instanceof testing
*/
readonly prototype: LabColor;
}
/**
* A gray color factory for Lab (CIELAB) colors.
*/
export type GrayColorFactory =
/**
* Constructs a new CIELAB color with the specified l value and a = b = 0.
*
* @param l Lightness typically in the range [0, 100].
* @param opacity Optional opacity value, defaults to 1.
*/
(l: number, opacity?: number) => LabColor;
/**
* An HCL (CIELCH) color object.
*/
export interface HCLColor extends Color {
/**
* Hue channel value typically in [0, 360).
*/
h: number;
/**
* Chroma channel value typically in [0, 230].
*/
c: number;
/**
* Luminance channel value typically in the range [0, 100].
*/
l: number;
/**
* Opacity value
*/
opacity: number;
/**
* Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much brighter the returned color should be.
*/
brighter(k?: number): this;
/**
* Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much darker the returned color should be.
*/
darker(k?: number): this;
/**
* Returns the RGB color equivalent of this color.
*/
rgb(): RGBColor;
/**
* Returns a copy of this color.
*
* @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
*/
copy(
values?: {
h?: number | undefined;
c?: number | undefined;
l?: number | undefined;
opacity?: number | undefined;
},
): this;
}
/**
* An HCL (CIELCH) color factory object, which may also be used with instanceof to test if an object
* is an HCL color instance.
*/
export interface HCLColorFactory extends Function {
/**
* Constructs a new HCL color based on the specified channel values and opacity.
*
* @param h Hue channel value typically in [0, 360).
* @param c Chroma channel value typically in [0, 230].
* @param l Luminance channel value typically in the range [0, 100].
* @param opacity Optional opacity value, defaults to 1.
*/
(h: number, c: number, l: number, opacity?: number): HCLColor;
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning an HCL color.
* If the specifier was not valid, null is returned.
*
* @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
*/
(cssColorSpecifier: string): HCLColor;
/**
* Converts the provided color instance and returns an HCL color.
* The color instance is converted to the RGB color space using color.rgb and then converted to HCL.
* (Colors already in the HCL color space skip the conversion to RGB,
* and colors in the Lab color space are converted directly to HCL.)
*
* @param color A permissible color space instance.
*/
// tslint:disable-next-line:unified-signatures
(color: ColorSpaceObject | ColorCommonInstance): HCLColor;
/**
* Prototype of the factory, which can be used for instanceof testing
*/
readonly prototype: HCLColor;
}
/**
* An LCH (CIELCH) color factory function to create an HCL color object.
*/
export interface LCHColorFactory {
/**
* Constructs a new HCL color based on the specified channel values and opacity.
*
* @param l Luminance channel value typically in the range [0, 100].
* @param c Chroma channel value typically in [0, 230].
* @param h Hue channel value typically in [0, 360).
* @param opacity Optional opacity value, defaults to 1.
*/
(l: number, c: number, h: number, opacity?: number): HCLColor;
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning an HCL color.
* If the specifier was not valid, null is returned.
*
* @param cssColorSpecifier A CSS color Module Level 3 specifier string.
*/
(cssColorSpecifier: string): HCLColor;
/**
* Converts the provided color instance and returns an HCL color.
* The color instance is converted to the RGB color space using color.rgb and then converted to HCL.
* (Colors already in the HCL color space skip the conversion to RGB,
* and colors in the Lab color space are converted directly to HCL.)
*
* @param color A permissible color space instance.
*/
// tslint:disable-next-line:unified-signatures
(color: ColorSpaceObject | ColorCommonInstance): HCLColor;
}
/**
* Dave Greens Cubehelix color object.
*/
export interface CubehelixColor extends Color {
/**
* Hue channel value.
*/
h: number;
/**
* Saturation channel value.
*/
s: number;
/**
* Lightness channel value.
*/
l: number;
/**
* Opacity value.
*/
opacity: number;
/**
* Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much brighter the returned color should be.
*/
brighter(k?: number): this;
/**
* Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be.
* If k is not specified, it defaults to 1.
*
* @param k A color space dependent number to determine, how much darker the returned color should be.
*/
darker(k?: number): this;
/**
* Returns the RGB color equivalent of this color.
*/
rgb(): RGBColor;
/**
* Returns a copy of this color.
*
* @param values If values is specified, any enumerable own properties of values are assigned to the new returned color.
*/
copy(
values?: {
h?: number | undefined;
s?: number | undefined;
l?: number | undefined;
opacity?: number | undefined;
},
): this;
}
/**
* A color factory object for Dave Green's Cubehelix colors, which may also be used with instanceof to test if an object
* is a Cubehelix color instance.
*/
export interface CubehelixColorFactory extends Function {
/**
* Constructs a new Cubehelix color based on the specified channel values and opacity.
*
* @param h Hue channel value.
* @param s Saturation channel value.
* @param l Lightness channel value.
* @param opacity Optional opacity value, defaults to 1.
*/
(h: number, s: number, l: number, opacity?: number): CubehelixColor;
/**
* Parses the specified CSS Color Module Level 3 specifier string, returning an Cubehelix color.
* If the specifier was not valid, null is returned.
*
* @param cssColorSpecifier A CSS Color Module Level 3 specifier string.
*/
(cssColorSpecifier: string): CubehelixColor;
/**
* Converts the provided color instance and returns a Cubehelix color.
* The color instance is specified, it is converted to the RGB color space using color.rgb and then converted to Cubehelix.
* (Colors already in the Cubehelix color space skip the conversion to RGB.)
*
* @param color A permissible color space instance.
*/
// tslint:disable-next-line:unified-signatures
(color: ColorSpaceObject | ColorCommonInstance): CubehelixColor;
/**
* Prototype of the factory, which can be used for instanceof testing
*/
readonly prototype: CubehelixColor;
}
// --------------------------------------------------------------------------
// Color object factories
// --------------------------------------------------------------------------
/**
* A Color factory object, which may also be used with instanceof to test if an object is a color instance.
*/
export const color: ColorFactory;
/**
* An RGB color factory object, which may also be used with instanceof to test if an object
* is an RGB color instance.
*/
export const rgb: RGBColorFactory;
/**
* An HSL color factory object, which may also be used with instanceof to test if an object
* is an HSL color instance.
*/
export const hsl: HSLColorFactory;
/**
* A Lab (CIELAB) color factory object, which may also be used with instanceof to test if an object
* is a Lab color instance.
*/
export const lab: LabColorFactory;
/**
* A gray color factory for Lab (CIELAB) colors.
*/
export const gray: GrayColorFactory;
/**
* An HCL (CIELCH) color factory object, which may also be used with instanceof to test if an object
* is an HCL color instance.
*/
export const hcl: HCLColorFactory;
/**
* An LCH (CIELCH) color factory function to create an HCL color object.
*/
export const lch: LCHColorFactory;
/**
* A color factory object for Dave Green's Cubehelix colors, which may also be used with instanceof to test if an object
* is a Cubehelix color instance.
*/
export const cubehelix: CubehelixColorFactory;

55
node_modules/@types/d3-color/package.json generated vendored Normal file
View File

@@ -0,0 +1,55 @@
{
"name": "@types/d3-color",
"version": "3.1.3",
"description": "TypeScript definitions for d3-color",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-color",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Hugues Stefanski",
"githubUsername": "ledragon",
"url": "https://github.com/ledragon"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
},
{
"name": "Fil",
"githubUsername": "Fil",
"url": "https://github.com/Fil"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-color"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "89cf9357324cddaa31cfb539b1c33d118648ed55319f2a0d26f24b004975a947",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-contour/LICENSE generated vendored Normal file
View 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/d3-contour/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-contour`
# Summary
This package contains type definitions for d3-contour (https://d3js.org/d3-contour/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-contour.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: [@types/d3-array](https://npmjs.com/package/@types/d3-array), [@types/geojson](https://npmjs.com/package/@types/geojson)
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Hugues Stefanski](https://github.com/Ledragon), and [Nathan Bierema](https://github.com/Methuselah96).

222
node_modules/@types/d3-contour/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,222 @@
// Last module patch version validated against: 3.0.1
import { ThresholdCountGenerator, ThresholdNumberArrayGenerator } from "d3-array";
import { MultiPolygon } from "geojson";
/**
* An extended GeoJSON MultiPolygon representing a contour.
*/
export interface ContourMultiPolygon extends MultiPolygon {
/**
* Threshold value of the contour.
*/
value: number;
}
/**
* A contour generator which computes contour polygons by applying marching squares to a rectangular array of numeric values.
*
* For each threshold value, the contour generator constructs a GeoJSON MultiPolygon geometry object representing the area
* where the input values are greater than or equal to the threshold value.
* The geometry is in planar coordinates, where ⟨i + 0.5, j + 0.5⟩ corresponds to element i + jn in the input values array.
*/
export interface Contours {
/**
* Computes the contours for the given array of values, returning an array of GeoJSON MultiPolygon geometry objects.
* Each geometry object represents the area where the input values are greater than or equal to the corresponding threshold value;
* the threshold value for each geometry object is exposed as geometry.value.
*
* The returned geometry objects are typically passed to d3.geoPath to display,
* using null or d3.geoIdentity as the associated projection
*
* @param values Array of input values. The input values must be an array of length n×m where [n, m] is the contour generators size;
* furthermore, each values[i + jn] must represent the value at the position ⟨i, j⟩.
*/
(values: number[]): ContourMultiPolygon[];
/**
* Computes a single contour, returning a GeoJSON MultiPolygon geometry object.
* This geometry object represents the area where the input values are greater than or equal to the given threshold value;
* the threshold value for the geometry object is exposed as geometry.value.
*
* @param values Array of input values. The input values must be an array of length n×m where [n, m] is the contour generators size;
* furthermore, each values[i + jn] must represent the value at the position ⟨i, j⟩.
* @param threshold Threshold value.
*/
contour(values: number[], threshold: number): ContourMultiPolygon;
/**
* Return the expected size of the input values grid, which defaults to [1,1].
*/
size(): [number, number];
/**
* Sets the expected size of the input values grid to the contour generator and returns the contour generator.
*
* @param size Size of the input values grid specified as an array [n, m]
* where n is the number of columns in the grid and m is the number of rows; n and m must be positive integers.
*/
size(size: [number, number]): this;
/**
* Returns the current smoothing flag, which defaults to true.
*/
smooth(): boolean;
/**
* Sets whether or not the generated contour polygons are smoothed using linear interpolation and returns the contour generator.
*
* @param smooth Flag to enable linear interpolation. The default is "true".
*/
smooth(smooth: boolean): this;
/**
* Returns the current threshold generator, which by default implements Sturges formula.
*/
thresholds(): ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>;
/**
* Sets the threshold generator to the specified function or array and returns this contour generator.
* Thresholds are defined as an array of values [x0, x1, …].
* The first generated contour corresponds to the area where the input values are greater than or equal to x0;
* the second contour corresponds to the area where the input values are greater than or equal to x1, and so on.
* Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; the threshold value is exposed as geometry.value.
* If a count is specified instead of an array of thresholds, then the input values extent will be uniformly divided into approximately count bins; see d3.ticks.
*/
thresholds(
thresholds: number | number[] | ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>,
): this;
}
/**
* Construct a new contour generator with the default settings.
*/
export function contours(): Contours;
/**
* A contour generator for density estimates.
*
* The generic refers to the data type of an element in the data array
* used with the density contour generator. If omitted, the default setting assumes that,
* the elements of the data array used with the density contour generator are two-element arrays.
* The first element corresponds to the x-dimension, the second to the y-dimension.
*/
export interface ContourDensity<Datum = [number, number]> {
/**
* Estimates the density contours for the given array of data, returning an array of GeoJSON MultiPolygon geometry objects.
* Each geometry object represents the area where the estimated number of points per square pixel is greater than or equal to
* the corresponding threshold value; the threshold value for each geometry object is exposed as geometry.value.
* The returned geometry objects are typically passed to d3.geoPath to display, using null or d3.geoIdentity as the associated projection.
* See also d3.contours.
*
* The x- and y-coordinate for each data point are computed using density.x and density.y.
* The generated contours are only accurate within the estimators defined size.
*
* @param data Array of input data.
*/
(data: Datum[]): ContourMultiPolygon[];
/**
* Returns the current x-coordinate accessor.
* The default x-coordinate accessor is a functions which accepts as input a two-element array of numbers
* and returns the element at index 0.
*/
x(): (d: Datum) => number;
/**
* Sets the x-coordinate accessor and returns the density contour estimator.
*
* @param x An x-coordinate accessor function, which accepts as input an element of the input data array and returns the
* x-coordinate.
*/
x(x: (d: Datum) => number): this;
/**
* Returns the current y-coordinate accessor.
* The default y-coordinate accessor is a functions which accepts as input a two-element array of numbers
* and returns the element at index 1.
*/
y(): (d: Datum) => number;
/**
* Sets the y-coordinate accessor and returns the density contour estimator.
*
* @param y An y-coordinate accessor function, which accepts as input an element of the input data array and returns the
* y-coordinate.
*/
y(y: (d: Datum) => number): this;
/**
* Returns the current point weight accessor.
*/
weight(): (d: Datum) => number;
/**
* Sets the point weight accessor and returns the density contour estimator.
*
* @param weight A point weight accessor function.
*/
weight(weight: (d: Datum) => number): this;
/**
* Returns the current size, which defaults to [960, 500].
*/
size(): [number, number];
/**
* Sets the size of the density estimator to the specified bounds and returns the density contour estimator.
*
* @param size The size is specified as an array [width, height], where width is the maximum x-value and height is the maximum y-value.
*/
size(size: [number, number]): this;
/**
* Returns the current cell size, which defaults to 4.
*/
cellSize(): number;
/**
* Sets the size of individual cells in the underlying bin grid to the specified positive integer and returns the density contour estimator.
*
* The cell size is rounded down to the nearest power of two. Smaller cells produce more detailed contour polygons, but are more expensive to compute.
*
* @param cellSize Cell size, a positive integer.
*/
cellSize(cellSize: number): this;
/**
* Returns the current threshold generator, which by default generates about twenty nicely-rounded density thresholds.
*/
thresholds(): ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>;
/**
* Sets the threshold generator to the specified function or array and returns this contour generator.
* Thresholds are defined as an array of values [x0, x1, …].
* The first generated density contour corresponds to the area where the estimated density is greater than or equal to x0;
* the second contour corresponds to the area where the estimated density is greater than or equal to x1, and so on.
* Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; the threshold value is exposed as geometry.value.
* The first value x0 should typically be greater than zero.
* If a count is specified instead of an array of thresholds, then approximately count uniformly-spaced nicely-rounded thresholds will be generated; see d3.ticks.
*/
thresholds(
thresholds: number | number[] | ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>,
): this;
/**
* Returns the current bandwidth, which defaults to 20.4939….
*/
bandwidth(): number;
/**
* Sets the bandwidth (the standard deviation) of the Gaussian kernel and returns the density contour estimator.
*
* @param bandwidth Bandwidth (the standard deviation) of the Gaussian kernel.
* The specified bandwidth is currently rounded to the nearest supported value by this implementation, and must be nonnegative.
*/
bandwidth(bandwidth: number): this;
}
/**
* Construct a new contour generator for density estimates.
*
* The generic refers to the data type of an element in the data array
* used with the density contour generator. If omitted, the default setting assumes that,
* the elements of the data array used with the density contour generator are two-element arrays.
* The first element corresponds to the x-dimension, the second to the y-dimension.
*
* Important: ensure that the x- and y-accessor functions are configured to
* match the data type used for the generic Datum.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function contourDensity<Datum = [number, number]>(): ContourDensity<Datum>;

38
node_modules/@types/d3-contour/package.json generated vendored Normal file
View File

@@ -0,0 +1,38 @@
{
"name": "@types/d3-contour",
"version": "3.0.6",
"description": "TypeScript definitions for d3-contour",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-contour",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Hugues Stefanski",
"githubUsername": "Ledragon",
"url": "https://github.com/Ledragon"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-contour"
},
"scripts": {},
"dependencies": {
"@types/d3-array": "*",
"@types/geojson": "*"
},
"typesPublisherContentHash": "a2a836bf53d1aa8ce0ab664fbae003884449208333886bc8a93937935bc3df4e",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-delaunay/LICENSE generated vendored Normal file
View 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/d3-delaunay/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-delaunay`
# Summary
This package contains type definitions for d3-delaunay (https://github.com/d3/d3-delaunay).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-delaunay.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Bradley Odell](https://github.com/BTOdell), and [Nathan Bierema](https://github.com/Methuselah96).

316
node_modules/@types/d3-delaunay/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,316 @@
/**
* Delaunay triangulation
*/
export class Delaunay<P> {
/**
* Returns the Delaunay triangulation for the given flat array [x0, y0, x1, y1, …] of points.
*/
constructor(points: ArrayLike<number>);
/**
* Returns the Delaunay triangulation for the given array or iterable of points where each point is an array in the form: [x, y].
*/
static from(points: ArrayLike<Delaunay.Point> | Iterable<Delaunay.Point>): Delaunay<Delaunay.Point>;
/**
* Returns the Delaunay triangulation for the given array or iterable of points.
* Otherwise, the getX and getY functions are invoked for each point in order, and must return the respective x- and y-coordinate for each point.
* If that is specified, the functions getX and getY are invoked with that as this.
* (See Array.from for reference.)
*/
static from<P>(
points: ArrayLike<P> | Iterable<P>,
getX: Delaunay.GetCoordinate<P, ArrayLike<P> | Iterable<P>>,
getY: Delaunay.GetCoordinate<P, ArrayLike<P> | Iterable<P>>,
that?: any,
): Delaunay<P>;
/**
* The coordinates of the points as an array [x0, y0, x1, y1, ...].
* Typically, this is a Float64Array, however you can use any array-like type in the constructor.
*/
points: ArrayLike<number>;
/**
* The halfedge indices as an Int32Array [j0, j1, ...].
* For each index 0 <= i < halfedges.length, there is a halfedge from triangle vertex j = halfedges[i] to triangle vertex i.
*/
halfedges: Int32Array;
/**
* An Int32Array of point indexes that form the convex hull in counterclockwise order.
* If the points are collinear, returns them ordered.
*/
hull: Uint32Array;
/**
* The triangle vertex indices as an Uint32Array [i0, j0, k0, i1, j1, k1, ...].
* Each contiguous triplet of indices i, j, k forms a counterclockwise triangle.
* The coordinates of the triangle's points can be found by going through 'points'.
*/
triangles: Uint32Array;
/**
* The incoming halfedge indexes as a Int32Array [e0, e1, e2, ...].
* For each point i, inedges[i] is the halfedge index e of an incoming halfedge.
* For coincident points, the halfedge index is -1; for points on the convex hull, the incoming halfedge is on the convex hull; for other points, the choice of incoming halfedge is arbitrary.
*/
inedges: Int32Array;
/**
* Returns the index of the input point that is closest to the specified point ⟨x, y⟩.
* The search is started at the specified point i. If i is not specified, it defaults to zero.
*/
find(x: number, y: number, i?: number): number;
/**
* Returns an iterable over the indexes of the neighboring points to the specified point i.
* The iterable is empty if i is a coincident point.
*/
neighbors(i: number): IterableIterator<number>;
/**
* Renders the edges of the Delaunay triangulation to an SVG path string.
*/
render(): string;
/**
* Renders the edges of the Delaunay triangulation to the specified context.
* The specified context must implement the context.moveTo and context.lineTo methods from the CanvasPathMethods API.
*/
render(context: Delaunay.MoveContext & Delaunay.LineContext): void;
/**
* Renders the convex hull of the Delaunay triangulation to an SVG path string.
*/
renderHull(): string;
/**
* Renders the convex hull of the Delaunay triangulation to the specified context.
* The specified context must implement the context.moveTo and context.lineTo methods from the CanvasPathMethods API.
*/
renderHull(context: Delaunay.MoveContext & Delaunay.LineContext): void;
/**
* Renders triangle i of the Delaunay triangulation to an SVG path string.
*/
renderTriangle(i: number): string;
/**
* Renders triangle i of the Delaunay triangulation to the specified context.
* The specified context must implement the context.moveTo, context.lineTo and context.closePath methods from the CanvasPathMethods API.
*/
renderTriangle(i: number, context: Delaunay.MoveContext & Delaunay.LineContext & Delaunay.ClosableContext): void;
/**
* Renders the input points of the Delaunay triangulation to an SVG path string as circles with radius 2.
*/
renderPoints(): string;
/**
* Renders the input points of the Delaunay triangulation to an SVG path string as circles with the specified radius.
*/
renderPoints(context: undefined, radius: number): string;
/**
* Renders the input points of the Delaunay triangulation to the specified context as circles with the specified radius.
* If radius is not specified, it defaults to 2.
* The specified context must implement the context.moveTo and context.arc methods from the CanvasPathMethods API.
*/
renderPoints(context: Delaunay.MoveContext & Delaunay.ArcContext, radius?: number): void;
/**
* Returns the closed polygon [[x0, y0], [x1, y1], ..., [x0, y0]] representing the convex hull.
*/
hullPolygon(): Delaunay.Polygon;
/**
* Returns the closed polygon [[x0, y0], [x1, y1], [x2, y2], [x0, y0]] representing the triangle i.
*/
trianglePolygon(i: number): Delaunay.Triangle;
/**
* Returns an iterable over the polygons for each triangle, in order.
*/
trianglePolygons(): IterableIterator<Delaunay.Triangle>;
/**
* Updates the triangulation after the points have been modified in-place.
*/
update(): this;
/**
* Returns the Voronoi diagram for the associated points.
* When rendering, the diagram will be clipped to the specified bounds = [xmin, ymin, xmax, ymax].
* If bounds is not specified, it defaults to [0, 0, 960, 500].
* See To Infinity and Back Again for an interactive explanation of Voronoi cell clipping.
*/
voronoi(bounds?: Delaunay.Bounds): Voronoi<P>;
}
export namespace Delaunay {
/**
* A point represented as an array tuple [x, y].
*/
type Point = [number, number];
/**
* A closed polygon [[x0, y0], [x1, y1], [x2, y2], [x0, y0]] representing a triangle.
*/
type Triangle = Point[];
/**
* A closed polygon [[x0, y0], [x1, y1], ..., [x0, y0]].
*/
type Polygon = Point[];
/**
* A rectangular area [x, y, width, height].
*/
type Bounds = [number, number, number, number];
/**
* A function to extract a x- or y-coordinate from the specified point.
*/
type GetCoordinate<P, PS> = (point: P, i: number, points: PS) => number;
/**
* An interface for the rect() method of the CanvasPathMethods API.
*/
interface RectContext {
/**
* rect() method of the CanvasPathMethods API.
*/
rect(x: number, y: number, width: number, height: number): void;
}
/**
* An interface for the moveTo() method of the CanvasPathMethods API.
*/
interface MoveContext {
/**
* moveTo() method of the CanvasPathMethods API.
*/
moveTo(x: number, y: number): void;
}
/**
* An interface for the lineTo() method of the CanvasPathMethods API.
*/
interface LineContext {
/**
* lineTo() method of the CanvasPathMethods API.
*/
lineTo(x: number, y: number): void;
}
/**
* An interface for the arc() method of the CanvasPathMethods API.
*/
interface ArcContext {
/**
* arc() method of the CanvasPathMethods API.
*/
arc(
x: number,
y: number,
radius: number,
startAngle: number,
endAngle: number,
counterclockwise?: boolean,
): void;
}
/**
* An interface for the closePath() method of the CanvasPathMethods API.
*/
interface ClosableContext {
/**
* closePath() method of the CanvasPathMethods API.
*/
closePath(): void;
}
}
/**
* Voronoi regions
*/
export class Voronoi<P> {
/**
* The Voronoi diagrams associated Delaunay triangulation.
*/
delaunay: Delaunay<P>;
/**
* The circumcenters of the Delaunay triangles [cx0, cy0, cx1, cy1, ...].
* Each contiguous pair of coordinates cx, cy is the circumcenter for the corresponding triangle.
* These circumcenters form the coordinates of the Voronoi cell polygons.
*/
circumcenters: Float64Array;
/**
* An array [vx0, vy0, wx0, wy0, ...] where each non-zero quadruple describes an open (infinite) cell
* on the outer hull, giving the directions of two open half-lines.
*/
vectors: Float64Array;
/**
* The bounds of the viewport [xmin, ymin, xmax, ymax] for rendering the Voronoi diagram.
* These values only affect the rendering methods (voronoi.render, voronoi.renderBounds, cell.render).
*/
xmin: number;
ymin: number;
xmax: number;
ymax: number;
/**
* Returns true if the cell with the specified index i contains the specified point ⟨x, y⟩.
* (This method is not affected by the associated Voronoi diagrams viewport bounds.)
*/
contains(i: number, x: number, y: number): boolean;
/**
* Returns an iterable over the indexes of the cells that share a common edge with the specified cell i.
* Voronoi neighbors are always neighbors on the Delaunay graph, but the converse is false when the common edge has been clipped out by the Voronoi diagrams viewport.
*/
neighbors(i: number): Iterable<number>;
/**
* Renders the mesh of Voronoi cells to an SVG path string.
*/
render(): string;
/**
* Renders the mesh of Voronoi cells to the specified context.
* The specified context must implement the context.moveTo and context.lineTo methods from the CanvasPathMethods API.
*/
render(context: Delaunay.MoveContext & Delaunay.LineContext): void;
/**
* Renders the viewport extent to an SVG path string.
*/
renderBounds(): string;
/**
* Renders the viewport extent to the specified context.
* The specified context must implement the context.rect method from the CanvasPathMethods API.
* Equivalent to context.rect(voronoi.xmin, voronoi.ymin, voronoi.xmax - voronoi.xmin, voronoi.ymax - voronoi.ymin).
*/
renderBounds(context: Delaunay.RectContext): void;
/**
* Renders the cell with the specified index i to an SVG path string.
*/
renderCell(i: number): string;
/**
* Renders the cell with the specified index i to the specified context.
* The specified context must implement the context.moveTo, context.lineTo, and context.closePath methods from the CanvasPathMethods API.
*/
renderCell(i: number, context: Delaunay.MoveContext & Delaunay.LineContext & Delaunay.ClosableContext): void;
/**
* Returns an iterable over the non-empty polygons for each cell, with the cell index as property.
*/
cellPolygons(): IterableIterator<Delaunay.Polygon & { index: number }>;
/**
* Returns the convex, closed polygon [[x0, y0], [x1, y1], ..., [x0, y0]] representing the cell for the specified point i.
*/
cellPolygon(i: number): Delaunay.Polygon;
/**
* Updates the Voronoi diagram and underlying triangulation after the points have been modified in-place — useful for Lloyds relaxation.
*/
update(): this;
}

30
node_modules/@types/d3-delaunay/package.json generated vendored Normal file
View File

@@ -0,0 +1,30 @@
{
"name": "@types/d3-delaunay",
"version": "6.0.4",
"description": "TypeScript definitions for d3-delaunay",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-delaunay",
"license": "MIT",
"contributors": [
{
"name": "Bradley Odell",
"githubUsername": "BTOdell",
"url": "https://github.com/BTOdell"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-delaunay"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "3e9eae0049dbbb71f5268e23d09f4145f04bb5283a48d839914edcdd05b42211",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-dispatch/LICENSE generated vendored Normal file
View 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/d3-dispatch/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-dispatch`
# Summary
This package contains type definitions for d3-dispatch (https://github.com/d3/d3-dispatch/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-dispatch.
### Additional Details
* Last updated: Wed, 30 Jul 2025 13:15:13 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Nathan Bierema](https://github.com/Methuselah96), and [Kyle Hensel](https://github.com/k-yle).

96
node_modules/@types/d3-dispatch/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,96 @@
// Last module patch version validated against: 3.0.1
/** helper function, maps over a union type */
type MapUnion<K extends keyof T, T> = K extends any ? T[K] : never;
export namespace Dispatch {
/** given a string like `a.1 b c.2`, it returns a union like `'a' | 'b' | 'c'` */
type ExtractEventNames<Input extends string> = Input extends "" ? never
: Input extends `${infer A} ${infer B}` // multiple events
? ExtractEventNames<A> | ExtractEventNames<B>
: Input extends `${infer A}.${string}` // single event with a name
? A
: Input; // single event with no name
/**
* defines all the events that can be emitted.
* Each property is the arguments for that event.
*/
interface GenericEventMap {
[eventName: string]: any[];
}
}
export interface Dispatch<This extends object, EventMap extends Dispatch.GenericEventMap = Dispatch.GenericEventMap> {
/**
* Like `function.apply`, invokes each registered callback for the specified type,
* passing the callback the specified arguments, with `that` as the `this` context.
*
* @param type A specified event type.
* @param that The `this` context for the callback.
* @param args Additional arguments to be passed to the callback.
* @throws "unknown type" on unknown event type.
*/
apply<U extends keyof EventMap>(type: U, that?: This, args?: EventMap[U]): void;
/**
* Like `function.call`, invokes each registered callback for the specified type,
* passing the callback the specified arguments, with `that` as the `this` context.
* See dispatch.apply for more information.
*
* @param type A specified event type.
* @param that The `this` context for the callback.
* @param args Additional arguments to be passed to the callback.
* @throws "unknown type" on unknown event type.
*/
call<U extends keyof EventMap>(type: U, that?: This, ...args: EventMap[U]): void;
/**
* Returns a copy of this dispatch object.
* Changes to this dispatch do not affect the returned copy and vice versa.
*/
copy(): Dispatch<This, EventMap>;
/**
* Returns the callback for the specified typenames, if any.
* If multiple typenames are specified, the first matching callback is returned.
*/
on<Source extends string>(
typenames: Source,
): Dispatch.ExtractEventNames<Source> extends keyof EventMap
? ((this: This, ...args: MapUnion<Dispatch.ExtractEventNames<Source>, EventMap>) => void) | undefined
: never;
/**
* Adds or removes the callback for the specified typenames.
* If a callback function is specified, it is registered for the specified (fully-qualified) typenames.
* If a callback was already registered for the given typenames, the existing callback is removed before the new callback is added.
* The specified typenames is a string, such as start or end.foo.
* The type may be optionally followed by a period (.) and a name; the optional name allows multiple callbacks to be registered to receive events of the same type, such as start.foo and start.bar.
* To specify multiple typenames, separate typenames with spaces, such as start end or start.foo start.bar.
* To remove all callbacks for a given name foo, say dispatch.on(".foo", null).
*/
on<Source extends string>(
typenames: Source,
callback: Dispatch.ExtractEventNames<Source> extends keyof EventMap
? ((this: This, ...args: MapUnion<Dispatch.ExtractEventNames<Source>, EventMap>) => void) | null
: never,
): this;
}
/**
* Creates a new dispatch for the specified event types. Each type is a string, such as "start" or "end".
*
* @param types The event types.
* @throws "illegal type" on empty string or duplicated event types.
*/
/* eslint-disable @definitelytyped/no-unnecessary-generics */
export function dispatch<
This extends object,
EventMap extends Record<EventNames, any[]>,
const EventNames extends keyof any = keyof EventMap,
>(
...types: EventNames[]
): Dispatch<This, EventMap>;
export {};

51
node_modules/@types/d3-dispatch/package.json generated vendored Normal file
View File

@@ -0,0 +1,51 @@
{
"name": "@types/d3-dispatch",
"version": "3.0.7",
"description": "TypeScript definitions for d3-dispatch",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-dispatch",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
},
{
"name": "Kyle Hensel",
"githubUsername": "k-yle",
"url": "https://github.com/k-yle"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-dispatch"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "be4052c6f2bf18bd5e9b8e514a0c6e7d09cd01d684460cef8a794c71e73e3627",
"typeScriptVersion": "5.1"
}

21
node_modules/@types/d3-drag/LICENSE generated vendored Normal file
View 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/d3-drag/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-drag`
# Summary
This package contains type definitions for d3-drag (https://github.com/d3/d3-drag/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-drag.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: [@types/d3-selection](https://npmjs.com/package/@types/d3-selection)
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

395
node_modules/@types/d3-drag/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,395 @@
// Last module patch version validated against: 3.0.0
import { Selection, ValueFn } from "d3-selection";
// --------------------------------------------------------------------------
// Shared Type Definitions and Interfaces
// --------------------------------------------------------------------------
/**
* DraggedElementBaseType serves as an alias for the 'minimal' data type which can be selected
* without 'd3-drag' (and related code in 'd3-selection') trying to use properties internally which would otherwise not
* be supported.
*/
export type DraggedElementBaseType = Element;
/**
* Container element type usable for mouse/touch functions
*/
export type DragContainerElement = HTMLElement | SVGSVGElement | SVGGElement; // HTMLElement includes HTMLCanvasElement
/**
* The subject datum should at a minimum expose x and y properties, so that the relative position
* of the subject and the pointer can be preserved during the drag gesture.
*/
export interface SubjectPosition {
/**
* x-coordinate
*/
x: number;
/**
* y-coordinate
*/
y: number;
}
/**
* A D3 Drag Behavior
*
* The first generic refers to the type of element to be dragged.
* The second generic refers to the type of the datum of the dragged element.
* The third generic refers to the type of the drag behavior subject.
*
* The subject of a drag gesture represents the thing being dragged.
* It is computed when an initiating input event is received,
* such as a mousedown or touchstart, immediately before the drag gesture starts.
* The subject is then exposed as event.subject on subsequent drag events for this gesture.
*
* The default subject is the datum of the element in the originating selection (see drag)
* that received the initiating input event; if this datum is undefined,
* an object representing the coordinates of the pointer is created.
* When dragging circle elements in SVG, the default subject is thus the datum of the circle being dragged.
* With Canvas, the default subject is the canvas elements datum (regardless of where on the canvas you click).
* In this case, a custom subject accessor would be more appropriate,
* such as one that picks the closest circle to the mouse within a given search radius.
*/
export interface DragBehavior<GElement extends DraggedElementBaseType, Datum, Subject> extends Function {
/**
* Applies the drag behavior to the selected elements.
* This function is typically not invoked directly, and is instead invoked via selection.call.
*
* For details see: {@link https://github.com/d3/d3-drag#_drag}
*
* @param selection A D3 selection of elements.
* @param args Optional arguments to be passed in.
*/
(selection: Selection<GElement, Datum, any, any>, ...args: any[]): void;
/**
* Returns the current container accessor function.
*/
container(): ValueFn<GElement, Datum, DragContainerElement>;
/**
* Sets the container accessor to the specified function and returns the drag behavior.
*
* The container of a drag gesture determines the coordinate system of subsequent drag events, affecting event.x and event.y.
* The element returned by the container accessor is subsequently passed to d3.pointer to determine the local coordinates of the pointer.
*
* The default container accessor returns the parent node of the element in the originating selection (see drag)
* that received the initiating input event. This is often appropriate when dragging SVG or HTML elements,
* since those elements are typically positioned relative to a parent. For dragging graphical elements with a Canvas,
* however, you may want to redefine the container as the initiating element itself, using "this" in the accessor
* function.
*
* @param accessor A container accessor function which is evaluated for each selected element,
* in order, being passed the current datum (d), the current index (i), and the current group (nodes),
* with this as the current DOM element. The function returns the container element.
*/
container(accessor: ValueFn<GElement, Datum, DragContainerElement>): this;
/**
* Sets the container accessor to the specified object and returns the drag behavior.
*
* The container of a drag gesture determines the coordinate system of subsequent drag events, affecting event.x and event.y.
* The element returned by the container accessor is subsequently passed to d3.pointer to determine the local coordinates of the pointer.
*
* The default container accessor returns the parent node of the element in the originating selection (see drag)
* that received the initiating input event. This is often appropriate when dragging SVG or HTML elements,
* since those elements are typically positioned relative to a parent. For dragging graphical elements with a Canvas,
* however, you may want to redefine the container as the initiating element itself, such as drag.container(canvas).
*
* @param container Container element for the drag gesture.
*/
container(container: DragContainerElement): this;
/**
* Returns the current filter function.
*/
filter(): (this: GElement, event: any, d: Datum) => boolean;
/**
* Sets the event filter to the specified filter function and returns the drag behavior.
*
* If the filter returns falsey, the initiating event is ignored and no drag gesture is started.
* Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons,
* since those buttons are typically intended for other purposes, such as the context menu.
*
* @param filterFn A filter function which is evaluated for each selected element,
* in order, being passed the current event (event) and datum d, with the this context as the current DOM element.
* The function returns a boolean value.
*/
filter(filterFn: (this: GElement, event: any, d: Datum) => boolean): this;
/**
* Returns the current touch support detector, which defaults to a function returning true,
* if the "ontouchstart" event is supported on the current element.
*/
touchable(): ValueFn<GElement, Datum, boolean>;
/**
* Sets the touch support detector to the specified boolean value and returns the drag behavior.
*
* Touch event listeners are only registered if the detector returns truthy for the corresponding element when the drag behavior is applied.
* The default detector works well for most browsers that are capable of touch input, but not all; Chromes mobile device emulator, for example,
* fails detection.
*
* @param touchable A boolean value. true when touch event listeners should be applied to the corresponding element, otherwise false.
*/
touchable(touchable: boolean): this;
/**
* Sets the touch support detector to the specified function and returns the drag behavior.
*
* Touch event listeners are only registered if the detector returns truthy for the corresponding element when the drag behavior is applied.
* The default detector works well for most browsers that are capable of touch input, but not all; Chromes mobile device emulator, for example,
* fails detection.
*
* @param touchable A touch support detector function, which returns true when touch event listeners should be applied to the corresponding element.
* The function is evaluated for each selected element to which the drag behavior was applied, in order, being passed the current datum (d),
* the current index (i), and the current group (nodes), with this as the current DOM element. The function returns a boolean value.
*/
touchable(touchable: ValueFn<GElement, Datum, boolean>): this;
/**
* Returns the current subject accessor functions.
*/
subject(): (this: GElement, event: any, d: Datum) => Subject;
/**
* Sets the subject accessor to the specified function and returns the drag behavior.
*
* The subject of a drag gesture represents the thing being dragged.
* It is computed when an initiating input event is received,
* such as a mousedown or touchstart, immediately before the drag gesture starts.
* The subject is then exposed as event.subject on subsequent drag events for this gesture.
*
* The default subject is the datum of the element in the originating selection (see drag)
* that received the initiating input event; if this datum is undefined,
* an object representing the coordinates of the pointer is created.
* When dragging circle elements in SVG, the default subject is thus the datum of the circle being dragged.
* With Canvas, the default subject is the canvas elements datum (regardless of where on the canvas you click).
* In this case, a custom subject accessor would be more appropriate,
* such as one that picks the closest circle to the mouse within a given search radius.
*
* The subject of a drag gesture may not be changed after the gesture starts.
*
* During the evaluation of the subject accessor, event is a beforestart drag event.
* Use event.sourceEvent to access the initiating input event and event.identifier to access the touch identifier.
* The event.x and event.y are relative to the container, and are computed using d3.pointer.
*
* @param accessor An extent accessor function which is evaluated for each selected element,
* in order, being passed the current event (`event`) and datum `d`, with the `this` context as the current DOM element.
* The returned subject should be an object that exposes x and y properties,
* so that the relative position of the subject and the pointer can be preserved during the drag gesture.
* If the subject is null or undefined, no drag gesture is started for this pointer;
* however, other starting touches may yet start drag gestures.
*/
subject(accessor: (this: GElement, event: any, d: Datum) => Subject): this;
/**
* Return the current click distance threshold, which defaults to zero.
*/
clickDistance(): number;
/**
* Set the maximum distance that the mouse can move between mousedown and mouseup that will trigger
* a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to
* distance from its position on mousedown, the click event following mouseup will be suppressed.
*
* @param distance The distance threshold between mousedown and mouseup measured in client coordinates (event.clientX and event.clientY).
* The default is zero.
*/
clickDistance(distance: number): this;
/**
* Return the first currently-assigned listener matching the specified typenames, if any.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or
* end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].)
*/
on(typenames: string): ((this: GElement, event: any, d: Datum) => void) | undefined;
/**
* Remove the current event listeners for the specified typenames, if any, return the drag behavior.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or
* end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].)
* @param listener Use null to remove the listener.
*/
on(typenames: string, listener: null): this;
/**
* Set the event listener for the specified typenames and return the drag behavior.
* If an event listener was already registered for the same type and name,
* the existing listener is removed before the new listener is added.
* When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners.
*
* Changes to registered listeners via drag.on during a drag gesture do not affect the current drag gesture.
* Instead, you must use event.on, which also allows you to register temporary event listeners for the current drag gesture.
* Separate events are dispatched for each active pointer during a drag gesture.
* For example, if simultaneously dragging multiple subjects with multiple fingers, a start event is dispatched for each finger,
* even if both fingers start touching simultaneously.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or
* end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].)
* @param listener An event listener function which is evaluated for each selected element,
* in order, being passed the current event (event) and datum d, with the this context as the current DOM element.
*/
on(typenames: string, listener: (this: GElement, event: any, d: Datum) => void): this;
}
/**
* Creates a new drag behavior. The returned behavior, drag, is both an object and a function, and is
* typically applied to selected elements via selection.call.
*
* Use this signature when using the default subject accessor.
*
* The first generic refers to the type of element to be dragged.
* The second generic refers to the type of the datum of the dragged element.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function drag<GElement extends DraggedElementBaseType, Datum>(): DragBehavior<
GElement,
Datum,
Datum | SubjectPosition
>;
/**
* Creates a new drag behavior. The returned behavior, drag, is both an object and a function, and is
* typically applied to selected elements via selection.call.
*
* Use this signature when using a custom subject accessor.
*
* The first generic refers to the type of element to be dragged.
* The second generic refers to the type of the datum of the dragged element.
* The third generic refers to the type of the drag behavior subject.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function drag<GElement extends DraggedElementBaseType, Datum, Subject>(): DragBehavior<GElement, Datum, Subject>;
/**
* D3 Drag event
*
* The first generic refers to the type of element to be dragged.
* The second generic refers to the type of the datum of the dragged element.
* The third generic refers to the type of the drag behavior subject.
*/
export interface D3DragEvent<GElement extends DraggedElementBaseType, Datum, Subject> {
/**
* The DragBehavior associated with the event
*/
target: DragBehavior<GElement, Datum, Subject>;
/**
* The event type for the DragEvent
*/
type: "start" | "drag" | "end" | string; // Leave failsafe string type for cases like 'drag.foo'
/**
* The drag subject, defined by drag.subject.
*/
subject: Subject;
/**
* The new x-coordinate of the subject, relative to the container
*/
x: number;
/**
* The new y-coordinate of the subject, relative to the container
*/
y: number;
/**
* The change in x-coordinate since the previous drag event.
*/
dx: number;
/**
* The change in y-coordinate since the previous drag event.
*/
dy: number;
/**
* The string “mouse”, or a numeric touch identifier.
*/
identifier: "mouse" | number;
/**
* The number of currently active drag gestures (on start and end, not including this one).
*
* The event.active field is useful for detecting the first start event and the last end event
* in a sequence of concurrent drag gestures: it is zero when the first drag gesture starts,
* and zero when the last drag gesture ends.
*/
active: number;
/**
* The underlying input event, such as mousemove or touchmove.
*/
sourceEvent: any;
/**
* Return the first currently-assigned listener matching the specified typenames, if any.
*
* Equivalent to drag.on, but only applies to the current drag gesture. Before the drag gesture starts,
* a copy of the current drag event listeners is made. This copy is bound to the current drag gesture
* and modified by event.on. This is useful for temporary listeners that only receive events for the current drag gesture.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or
* end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].)
*/
on(typenames: string): ((this: GElement, event: any, d: Datum) => void) | undefined;
/**
* Remove the current event listeners for the specified typenames, if any, return the drag behavior.
*
* Equivalent to drag.on, but only applies to the current drag gesture. Before the drag gesture starts,
* a copy of the current drag event listeners is made. This copy is bound to the current drag gesture
* and modified by event.on. This is useful for temporary listeners that only receive events for the current drag gesture.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or
* end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].)
* @param listener Use null to remove the listener.
*/
on(typenames: string, listener: null): this;
/**
* Set the event listener for the specified typenames and return the drag behavior.
* If an event listener was already registered for the same type and name,
* the existing listener is removed before the new listener is added.
* When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners.
*
* Equivalent to drag.on, but only applies to the current drag gesture. Before the drag gesture starts,
* a copy of the current drag event listeners is made. This copy is bound to the current drag gesture
* and modified by event.on. This is useful for temporary listeners that only receive events for the current drag gesture.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace.
* Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar";
* the name allows multiple listeners to be registered for the same type. The type must be one of the following:
* start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or
* end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].)
* @param listener An event listener function which is evaluated for each selected element,
* in order, being passed the current event (event) and datum d, with the this context as the current DOM element.
*/
on(typenames: string, listener: (this: GElement, event: any, d: Datum) => void): this;
}
/**
* Prevents native drag-and-drop and text selection on the specified window.
* As an alternative to preventing the default action of mousedown events,
* this method prevents undesirable default actions following mousedown. In supported browsers,
* this means capturing dragstart and selectstart events, preventing the associated default actions,
* and immediately stopping their propagation. In browsers that do not support selection events,
* the user-select CSS property is set to none on the document element.
* This method is intended to be called on mousedown, followed by d3.dragEnable on mouseup.
*
* @param window The window for which drag should be disabled.
*/
export function dragDisable(window: Window): void;
/**
* Allows native drag-and-drop and text selection on the specified window; undoes the effect of d3.dragDisable.
* This method is intended to be called on mouseup, preceded by d3.dragDisable on mousedown.
* If noclick is true, this method also temporarily suppresses click events.
* The suppression of click events expires after a zero-millisecond timeout,
* such that it only suppress the click event that would immediately follow the current mouseup event, if any.
*
* @param window The window for which drag should be (re-)enabled.
* @param noClick An optional flag. If noclick is true, this method also temporarily suppresses click events.
*/
export function dragEnable(window: Window, noClick?: boolean): void;

42
node_modules/@types/d3-drag/package.json generated vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"name": "@types/d3-drag",
"version": "3.0.7",
"description": "TypeScript definitions for d3-drag",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-drag",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-drag"
},
"scripts": {},
"dependencies": {
"@types/d3-selection": "*"
},
"typesPublisherContentHash": "cbd098773821019893d7397be4129e19f5b62205943d423ef95a612ec9c9eac6",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-dsv/LICENSE generated vendored Normal file
View 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/d3-dsv/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-dsv`
# Summary
This package contains type definitions for d3-dsv (https://github.com/d3/d3-dsv/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-dsv.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).

482
node_modules/@types/d3-dsv/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,482 @@
// Last module patch version validated against: 3.0.1
// ------------------------------------------------------------------------------------------
// Shared Types and Interfaces
// ------------------------------------------------------------------------------------------
/**
* An object representing a DSV parsed row with values represented as strings.
*/
export type DSVRowString<Columns extends string = string> = {
[key in Columns]: string;
};
/**
* An object in raw format before parsing, that is with only string values.
*/
export type DSVRaw<T extends object> = {
[key in keyof T]: string;
};
/**
* An object representing a DSV parsed row with values represented as an arbitrary datatype, depending
* on the performed parsed row mapping.
*
* @deprecated Use `object` instead.
*/
export interface DSVRowAny {
[key: string]: any;
}
/**
* An array object representing all deserialized rows. The array is enhanced with a property listing
* the names of the parsed columns.
*/
export interface DSVRowArray<Columns extends string = string> extends Array<DSVRowString<Columns>> {
/**
* List of column names.
*/
columns: Columns[];
}
/**
* An array object representing all parsed rows. The array is enhanced with a property listing
* the names of the parsed columns.
*/
export interface DSVParsedArray<T> extends Array<T> {
/**
* List of column names.
*/
columns: Array<keyof T>;
}
// ------------------------------------------------------------------------------------------
// CSV Parsers and Formatters
// ------------------------------------------------------------------------------------------
// csvParse(...) ============================================================================
/**
* Parses the specified string, which must be in the comma-separated values format, returning an array of objects representing the parsed rows.
*
* Unlike csvParseRows, this method requires that the first line of the CSV content contains a comma-separated list of column names;
* these column names become the attributes on the returned objects.
*
* The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary).
*
* Equivalent to `dsvFormat(",").parse`.
* Note: requires unsafe-eval content security policy.
*
* @param csvString A string, which must be in the comma-separated values format.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function csvParse<Columns extends string>(csvString: string): DSVRowArray<Columns>;
/**
* Parses the specified string, which must be in the comma-separated values format, returning an array of objects representing the parsed rows.
*
* Unlike csvParseRows, this method requires that the first line of the CSV content contains a comma-separated list of column names;
* these column names become the attributes on the returned objects.
*
* The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary).
*
* Equivalent to `dsvFormat(",").parse`.
* Note: requires unsafe-eval content security policy.
*
* @param csvString A string, which must be in the comma-separated values format.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function csvParse<ParsedRow extends object, Columns extends string>(
csvString: string,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): DSVParsedArray<ParsedRow>;
// csvParseRows(...) ========================================================================
/**
* Parses the specified string, which must be in the comma-separated values format, returning an array of arrays representing the parsed rows.
*
* Unlike csvParse, this method treats the header line as a standard row, and should be used whenever CSV content does not contain a header.
* Each row is represented as an array rather than an object. Rows may have variable length.
*
* If a row conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types.
* In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the + operator), but better is to specify a row conversion function.
*
* Equivalent to `dsvFormat(",").parseRows`.
*
* @param csvString A string, which must be in the comma-separated values format.
*/
export function csvParseRows(csvString: string): string[][];
/**
* Parses the specified string, which must be in the comma-separated values format, returning an array of arrays representing the parsed rows.
*
* Unlike csvParse, this method treats the header line as a standard row, and should be used whenever CSV content does not contain a header.
* Each row is represented as an array rather than an object. Rows may have variable length.
*
* Equivalent to `dsvFormat(",").parseRows`.
*
* @param csvString A string, which must be in the comma-separated values format.
* @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i)
* starting at zero for the first row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function csvParseRows<ParsedRow extends object>(
csvString: string,
row: (rawRow: string[], index: number) => ParsedRow | undefined | null,
): ParsedRow[];
// csvFormat(...) ============================================================================
/**
* Formats the specified array of object rows as comma-separated values, returning a string.
* This operation is the inverse of csvParse. Each row will be separated by a newline (\n),
* and each column within each row will be separated by the comma-delimiter.
* Values that contain either the comma-delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* If columns is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in rows;
* the order of columns is nondeterministic.
*
* Equivalent to `dsvFormat(",").format`.
*
* @param rows Array of object rows.
* @param columns An array of strings representing the column names.
*/
export function csvFormat<T extends object>(rows: readonly T[], columns?: ReadonlyArray<keyof T>): string;
// csvFormatBody(...) ============================================================================
/**
* Equivalent to dsvFormat(",").formatBody.
*
* @param rows Array of object rows.
* @param columns An array of strings representing the column names.
*/
export function csvFormatBody<T extends object>(rows: readonly T[], columns?: ReadonlyArray<keyof T>): string;
// csvFormatRows(...) ========================================================================
/**
* Formats the specified array of array of string rows as comma-separated values, returning a string.
* This operation is the reverse of csvParseRows. Each row will be separated by a newline (\n),
* and each column within each row will be separated by the comma-delimiter.
* Values that contain either the comma-delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* To convert an array of objects to an array of arrays while explicitly specifying the columns, use array.map.
* If you like, you can also array.concat this result with an array of column names to generate the first row.
*
* Equivalent to `dsvFormat(",").formatRows`.
*
* @param rows An array of array of string rows.
*/
export function csvFormatRows(rows: readonly string[][]): string;
// csvFormatRow(...) ========================================================================
/**
* Equivalent to dsvFormat(",").formatRow.
*
* @param row An array of strings representing a row.
*/
export function csvFormatRow(row: readonly string[]): string;
// csvFormatValue(...) ========================================================================
/**
* Equivalent to dsvFormat(",").formatValue.
*
* @param value A value.
*/
export function csvFormatValue(value: string): string;
// ------------------------------------------------------------------------------------------
// TSV Parsers and Formatters
// ------------------------------------------------------------------------------------------
// tsvParse(...) ============================================================================
/**
* Parses the specified string, which must be in the tab-separated values format, returning an array of objects representing the parsed rows.
*
* Unlike tsvParseRows, this method requires that the first line of the TSV content contains a tab-separated list of column names;
* these column names become the attributes on the returned objects.
*
* The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary).
*
* Equivalent to `dsvFormat("\t").parse`.
* Note: requires unsafe-eval content security policy.
*
* @param tsvString A string, which must be in the tab-separated values format.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function tsvParse<Columns extends string>(tsvString: string): DSVRowArray<Columns>;
/**
* Parses the specified string, which must be in the tab-separated values format, returning an array of objects representing the parsed rows.
*
* Unlike tsvParseRows, this method requires that the first line of the TSV content contains a tab-separated list of column names;
* these column names become the attributes on the returned objects.
*
* The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary).
*
* Equivalent to `dsvFormat("\t").parse`.
* Note: requires unsafe-eval content security policy.
*
* @param tsvString A string, which must be in the tab-separated values format.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function tsvParse<ParsedRow extends object, Columns extends string>(
tsvString: string,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): DSVParsedArray<ParsedRow>;
// tsvParseRows(...) ========================================================================
/**
* Parses the specified string, which must be in the tab-separated values format, returning an array of arrays representing the parsed rows.
*
* Unlike tsvParse, this method treats the header line as a standard row, and should be used whenever TSV content does not contain a header.
* Each row is represented as an array rather than an object. Rows may have variable length.
*
* If a row conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types.
* In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the + operator), but better is to specify a row conversion function.
*
* Equivalent to `dsvFormat("\t").parseRows`.
*
* @param tsvString A string, which must be in the tab-separated values format.
*/
export function tsvParseRows(tsvString: string): string[][];
/**
* Parses the specified string, which must be in the tab-separated values format, returning an array of arrays representing the parsed rows.
*
* Unlike tsvParse, this method treats the header line as a standard row, and should be used whenever TSV content does not contain a header.
* Each row is represented as an array rather than an object. Rows may have variable length.
*
* Equivalent to `dsvFormat("\t").parseRows`.
*
* @param tsvString A string, which must be in the tab-separated values format.
* @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i)
* starting at zero for the first row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function tsvParseRows<ParsedRow extends object>(
tsvString: string,
row: (rawRow: string[], index: number) => ParsedRow | undefined | null,
): ParsedRow[];
// tsvFormat(...) ============================================================================
/**
* Formats the specified array of object rows as tab-separated values, returning a string.
* This operation is the inverse of tsvParse. Each row will be separated by a newline (\n),
* and each column within each row will be separated by the tab-delimiter.
* Values that contain either the tab-delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* If columns is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in rows;
* the order of columns is nondeterministic.
*
* Equivalent to `dsvFormat("\t").format`.
*
* @param rows Array of object rows.
* @param columns An array of strings representing the column names.
*/
export function tsvFormat<T extends object>(rows: readonly T[], columns?: ReadonlyArray<keyof T>): string;
// tsvFormatBody(...) ============================================================================
/**
* Equivalent to dsvFormat("\t").formatBody.
*
* @param rows Array of object rows.
* @param columns An array of strings representing the column names.
*/
export function tsvFormatBody<T extends object>(rows: readonly T[], columns?: ReadonlyArray<keyof T>): string;
// tsvFormatRows(...) ========================================================================
/**
* Formats the specified array of array of string rows as tab-separated values, returning a string.
* This operation is the reverse of tsvParseRows. Each row will be separated by a newline (\n),
* and each column within each row will be separated by the tab-delimiter.
* Values that contain either the tab-delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* To convert an array of objects to an array of arrays while explicitly specifying the columns, use array.map.
* If you like, you can also array.concat this result with an array of column names to generate the first row.
*
* Equivalent to `dsvFormat("\t").formatRows`.
*
* @param rows An array of array of string rows.
*/
export function tsvFormatRows(rows: readonly string[][]): string;
// tsvFormatRow(...) ========================================================================
/**
* Equivalent to dsvFormat("\t").formatRow.
*
* @param row An array of strings representing a row.
*/
export function tsvFormatRow(row: readonly string[]): string;
// tsvFormatValue(...) ========================================================================
/**
* Equivalent to dsvFormat("\t").formatValue.
*
* @param value A value.
*/
export function tsvFormatValue(value: string): string;
// ------------------------------------------------------------------------------------------
// DSV Generalized Parsers and Formatters
// ------------------------------------------------------------------------------------------
/**
* A DSV parser and formatter
*/
export interface DSV {
/**
* Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of objects representing the parsed rows.
*
* Unlike dsv.parseRows, this method requires that the first line of the DSV content contains a delimiter-separated list of column names;
* these column names become the attributes on the returned objects.
*
* The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary).
*
* If the column names are not unique, only the last value is returned for each name; to access all values, use dsv.parseRows instead.
*
* Note: requires unsafe-eval content security policy.
*
* @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
parse<Columns extends string>(dsvString: string): DSVRowArray<Columns>;
/**
* Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of objects representing the parsed rows.
*
* Unlike dsv.parseRows, this method requires that the first line of the DSV content contains a delimiter-separated list of column names;
* these column names become the attributes on the returned objects.
*
* The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary).
*
* If the column names are not unique, only the last value is returned for each name; to access all values, use dsv.parseRows instead.
*
* Note: requires unsafe-eval content security policy.
*
* @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
parse<ParsedRow extends object, Columns extends string>(
dsvString: string,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): DSVParsedArray<ParsedRow>;
/**
* Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of arrays representing the parsed rows.
*
* Unlike dsv.parse, this method treats the header line as a standard row, and should be used whenever DSV content does not contain a header.
* Each row is represented as an array rather than an object. Rows may have variable length.
*
* If a row conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types.
* In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the + operator), but better is to specify a row conversion function.
*
* @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter.
*/
parseRows(dsvString: string): string[][];
/**
* Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of arrays representing the parsed rows.
*
* Unlike dsv.parse, this method treats the header line as a standard row, and should be used whenever DSV content does not contain a header.
* Each row is represented as an array rather than an object. Rows may have variable length.
*
* @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter.
* @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i)
* starting at zero for the first row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
parseRows<ParsedRow extends object>(
dsvString: string,
row: (rawRow: string[], index: number) => ParsedRow | undefined | null,
): ParsedRow[];
/**
* Formats the specified array of object rows as delimiter-separated values, returning a string.
* This operation is the inverse of dsv.parse. Each row will be separated by a newline (\n),
* and each column within each row will be separated by the delimiter (such as a comma, ,).
* Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* If columns is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in rows;
* the order of columns is nondeterministic.
*
* @param rows Array of object rows.
* @param columns An array of strings representing the column names.
*/
format<T extends object>(rows: readonly T[], columns?: ReadonlyArray<keyof T>): string;
/**
* Equivalent to dsv.format, but omits the header row.
* This is useful, for example, when appending rows to an existing file.
*
* @param rows Array of object rows.
* @param columns An array of strings representing the column names.
*/
formatBody<T extends object>(rows: readonly T[], columns?: ReadonlyArray<keyof T>): string;
/**
* Formats the specified array of array of string rows as delimiter-separated values, returning a string.
* This operation is the reverse of dsv.parseRows. Each row will be separated by a newline (\n),
* and each column within each row will be separated by the delimiter (such as a comma, ,).
* Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* To convert an array of objects to an array of arrays while explicitly specifying the columns, use array.map.
* If you like, you can also array.concat this result with an array of column names to generate the first row.
*
* @param rows An array of array of string rows.
*/
formatRows(rows: readonly string[][]): string;
/**
* Formats a single array row of strings as delimiter-separated values, returning a string.
* Each column within the row will be separated by the delimiter (such as a comma, ,).
* Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* @param row An array of strings representing a row.
*/
formatRow(row: readonly string[]): string;
/**
* Format a single value or string as a delimiter-separated value, returning a string.
* A value that contains either the delimiter, a double-quote (") or a newline will be escaped using double-quotes.
*
* @param value A value.
*/
formatValue(value: string): string;
}
/**
* Constructs a new DSV parser and formatter for the specified delimiter.
*
* @param delimiter A delimiter character. The delimiter must be a single character (i.e., a single 16-bit code unit);
* so, ASCII delimiters are fine, but emoji delimiters are not.
*/
export function dsvFormat(delimiter: string): DSV;
/**
* Infers the types of values on the object and coerces them accordingly, returning the mutated object.
* This function is intended to be used as a row accessor function in conjunction with dsv.parse and dsv.parseRows.
*
* @param object An object (or array) representing a parsed row
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function autoType<ParsedRow extends object | undefined | null, Columns extends string>(
object: DSVRowString<Columns> | readonly string[],
): ParsedRow;

45
node_modules/@types/d3-dsv/package.json generated vendored Normal file
View File

@@ -0,0 +1,45 @@
{
"name": "@types/d3-dsv",
"version": "3.0.7",
"description": "TypeScript definitions for d3-dsv",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-dsv",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-dsv"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "e9b5b33060064f4b1a2d7d09112fff5edf59333c56449dc3dbeb10c8912024b1",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-ease/LICENSE generated vendored Normal file
View 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/d3-ease/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-ease`
# Summary
This package contains type definitions for d3-ease (https://github.com/d3/d3-ease/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-ease.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

316
node_modules/@types/d3-ease/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,316 @@
// Last module patch version validated against: 3.0.1
// --------------------------------------------------------------------------
// Easing Functions
// --------------------------------------------------------------------------
/**
* Linear easing; the identity function; linear(t) returns t.
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeLinear(normalizedTime: number): number;
/**
* Symmetric quadratic easing; scales quadIn for t in [0, 0.5] and quadOut for t in [0.5, 1]. Also equivalent to poly.exponent(2).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeQuad(normalizedTime: number): number;
/**
* Quadratic easing; equivalent to polyIn.exponent(2).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeQuadIn(normalizedTime: number): number;
/**
* Reverse quadratic easing; equivalent to 1 - quadIn(1 - t). Also equivalent to polyOut.exponent(2).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeQuadOut(normalizedTime: number): number;
/**
* Symmetric quadratic easing; scales quadIn for t in [0, 0.5] and quadOut for t in [0.5, 1]. Also equivalent to poly.exponent(2).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeQuadInOut(normalizedTime: number): number;
/**
* Symmetric cubic easing; scales cubicIn for t in [0, 0.5] and cubicOut for t in [0.5, 1]. Also equivalent to poly.exponent(3).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCubic(normalizedTime: number): number;
/**
* Cubic easing; equivalent to polyIn.exponent(3).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCubicIn(normalizedTime: number): number;
/**
* Reverse cubic easing; equivalent to 1 - cubicIn(1 - t). Also equivalent to polyOut.exponent(3).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCubicOut(normalizedTime: number): number;
/**
* Symmetric cubic easing; scales cubicIn for t in [0, 0.5] and cubicOut for t in [0.5, 1]. Also equivalent to poly.exponent(3).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCubicInOut(normalizedTime: number): number;
/**
* Polynomial easing function factory
*/
export interface PolynomialEasingFactory {
/**
* Calculate eased time.
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
(normalizedTime: number): number;
/**
* Returns a new polynomial easing with the specified exponent e.
* If the exponent is not specified, it defaults to 3, equivalent to cubic.
*
* @param e Exponent for polynomial easing.
*/
exponent(e: number): PolynomialEasingFactory;
}
/**
* Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1].
* If the exponent is not specified, it defaults to 3, equivalent to cubic.
*/
export const easePoly: PolynomialEasingFactory;
/**
* Polynomial easing/easing factory; raises t to the specified exponent.
* If the exponent is not specified, it defaults to 3, equivalent to cubicIn.
*/
export const easePolyIn: PolynomialEasingFactory;
/**
* Reverse polynomial easing/easing factory; equivalent to 1 - polyIn(1 - t).
* If the exponent is not specified, it defaults to 3, equivalent to cubicOut.
*/
export const easePolyOut: PolynomialEasingFactory;
/**
* Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1].
* If the exponent is not specified, it defaults to 3, equivalent to cubic.
*/
export const easePolyInOut: PolynomialEasingFactory;
/**
* Symmetric sinusoidal easing; scales sinIn for t in [0, 0.5] and sinOut for t in [0.5, 1].
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeSin(normalizedTime: number): number;
/**
* Sinusoidal easing; returns sin(t).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeSinIn(normalizedTime: number): number;
/**
* Reverse sinusoidal easing; equivalent to 1 - sinIn(1 - t).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeSinOut(normalizedTime: number): number;
/**
* Symmetric sinusoidal easing; scales sinIn for t in [0, 0.5] and sinOut for t in [0.5, 1].
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeSinInOut(normalizedTime: number): number;
/**
* Symmetric exponential easing; scales expIn for t in [0, 0.5] and expOut for t in [0.5, 1].
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeExp(normalizedTime: number): number;
/**
* Exponential easing; raises 2 to the exponent 10 * (t - 1).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeExpIn(normalizedTime: number): number;
/**
* Reverse exponential easing; equivalent to 1 - expIn(1 - t).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeExpOut(normalizedTime: number): number;
/**
* Symmetric exponential easing; scales expIn for t in [0, 0.5] and expOut for t in [0.5, 1].
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeExpInOut(normalizedTime: number): number;
/**
* Symmetric circular easing; scales circleIn for t in [0, 0.5] and circleOut for t in [0.5, 1].
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCircle(normalizedTime: number): number;
/**
* Circular easing.
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCircleIn(normalizedTime: number): number;
/**
* Reverse circular easing; equivalent to 1 - circleIn(1 - t).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCircleOut(normalizedTime: number): number;
/**
* Symmetric circular easing; scales circleIn for t in [0, 0.5] and circleOut for t in [0.5, 1].
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeCircleInOut(normalizedTime: number): number;
/**
* Reverse bounce easing; equivalent to 1 - bounceIn(1 - t).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeBounce(normalizedTime: number): number;
/**
* Bounce easing, like a rubber ball.
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeBounceIn(normalizedTime: number): number;
/**
* Reverse bounce easing; equivalent to 1 - bounceIn(1 - t).
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeBounceOut(normalizedTime: number): number;
/**
* Symmetric bounce easing; scales bounceIn for t in [0, 0.5] and bounceOut for t in [0.5, 1].
*
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
export function easeBounceInOut(normalizedTime: number): number;
/**
* Anticipatory easing function factory
*/
export interface BackEasingFactory {
/**
* Calculate eased time.
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
(normalizedTime: number): number;
/**
* Returns a new back easing with the specified overshoot s.
* The degree of overshoot is configurable; if not specified, it defaults to 1.70158.
*
* @param s Overshoot parameter
*/
overshoot(s: number): BackEasingFactory;
}
/**
* Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1].
* The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
*/
export const easeBack: BackEasingFactory;
/**
* Anticipatory easing, like a dancer bending their knees before jumping off the floor.
* The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
*/
export const easeBackIn: BackEasingFactory;
/**
* Reverse anticipatory easing; equivalent to 1 - backIn(1 - t).
* The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
*/
export const easeBackOut: BackEasingFactory;
/**
* Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1].
* The degree of overshoot is configurable; it not specified, it defaults to 1.70158.
*/
export const easeBackInOut: BackEasingFactory;
/**
* Elastic easing function factory
*/
export interface ElasticEasingFactory {
/**
* Calculate eased time.
* @param normalizedTime Normalized time typically in the range [0, 1]
*/
(normalizedTime: number): number;
/**
* Returns a new elastic easing with the specified amplitude a.
* Defaults to 1,if not specified.
*
* @param a Amplitude for elastic easing.
*/
amplitude(a: number): ElasticEasingFactory;
/**
* Returns a new elastic easing with the specified amplitude a.
* Defaults to 0.3,if not specified.
*
* @param p Period for elastic easing.
*/
period(p: number): ElasticEasingFactory;
}
/**
* Reverse elastic easing; equivalent to 1 - elasticIn(1 - t).
* The amplitude and period of the oscillation are configurable;
* if not specified, they default to 1 and 0.3, respectively.
*/
export const easeElastic: ElasticEasingFactory;
/**
* Elastic easing, like a rubber band.
* The amplitude and period of the oscillation are configurable;
* if not specified, they default to 1 and 0.3, respectively.
*/
export const easeElasticIn: ElasticEasingFactory;
/**
* Reverse elastic easing; equivalent to 1 - elasticIn(1 - t).
* The amplitude and period of the oscillation are configurable;
* if not specified, they default to 1 and 0.3, respectively.
*/
export const easeElasticOut: ElasticEasingFactory;
/**
* Symmetric elastic easing; scales elasticIn for t in [0, 0.5] and elasticOut for t in [0.5, 1].
* The amplitude and period of the oscillation are configurable;
* if not specified, they default to 1 and 0.3, respectively.
*/
export const easeElasticInOut: ElasticEasingFactory;

40
node_modules/@types/d3-ease/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "@types/d3-ease",
"version": "3.0.2",
"description": "TypeScript definitions for d3-ease",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-ease",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-ease"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "2995c518f8de4fa6f2abb2f13065cb4fe65acaea9422f9883b24414ef50cd1ab",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-fetch/LICENSE generated vendored Normal file
View 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/d3-fetch/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-fetch`
# Summary
This package contains type definitions for d3-fetch (https://d3js.org/d3-fetch/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-fetch.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: [@types/d3-dsv](https://npmjs.com/package/@types/d3-dsv)
# Credits
These definitions were written by [Hugues Stefanski](https://github.com/ledragon), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).

282
node_modules/@types/d3-fetch/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,282 @@
// Last module patch version validated against: 3.0.1
import { DSVParsedArray, DSVRowArray, DSVRowString } from "d3-dsv";
/**
* Fetches the binary file at the specified input URL and returns it as a Promise of a Blob.
* If init is specified, it is passed along to the underlying call to fetch.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
export function blob(url: string, init?: RequestInit): Promise<Blob>;
/**
* Fetches the binary file at the specified input URL and returns it as a Promise of an ArrayBuffer.
* If init is specified, it is passed along to the underlying call to fetch.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
export function buffer(url: string, init?: RequestInit): Promise<ArrayBuffer>;
/**
* Fetches the CSV file at the specified input URL and returns
* a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row
* objects are represented as strings.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* The generic parameter describes the column names as a union of string literal types.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function csv<Columns extends string>(
url: string,
init?: RequestInit,
): Promise<DSVRowArray<Columns>>;
/**
* Fetches the CSV file at the specified input URL and returns
* a promise of an array of objects representing the parsed rows.
*
* The specified row conversion function is used to map and filter row objects to a more-specific representation;
* see dsv.csvParse for details.
*
* The first generic parameter describes the type of the object representation of a parsed row.
* The second generic parameter describes the column names as a union of string literal types.
*
* @param url A valid URL string.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function csv<ParsedRow extends object, Columns extends string = string>(
url: string,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): Promise<DSVParsedArray<ParsedRow>>;
/**
* Fetches the CSV file at the specified input URL and returns
* a promise of an array of objects representing the parsed rows.
*
* The init object is passed along to the underlying call to fetch.
*
* The specified row conversion function is used to map and filter row objects to a more-specific representation;
* see dsv.csvParse for details.
*
* The first generic parameter describes the type of the object representation of a parsed row.
* The second generic parameter describes the column names as a union of string literal types.
*
* @param url A valid URL string.
* @param init An request initialization object.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function csv<ParsedRow extends object, Columns extends string = string>(
url: string,
init: RequestInit,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): Promise<DSVParsedArray<ParsedRow>>;
/**
* Fetches the DSV file with the specified delimiter character at the specified input URL and returns
* a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row
* objects are represented as strings.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* The generic parameter describes the column names as a union of string literal types.
*
* @param delimiter The delimiter character used in the DSV file to be fetched.
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function dsv<Columns extends string>(
delimiter: string,
url: string,
init?: RequestInit,
): Promise<DSVRowArray<Columns>>;
/**
* Fetches the DSV file with the specified delimiter character at the specified input URL and returns
* a promise of an array of objects representing the parsed rows.
*
* The specified row conversion function is used to map and filter row objects to a more-specific representation;
* see dsv.parse for details.
*
* The first generic parameter describes the type of the object representation of a parsed row.
* The second generic parameter describes the column names as a union of string literal types.
*
* @param delimiter The delimiter character used in the DSV file to be fetched.
* @param url A valid URL string.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function dsv<ParsedRow extends object, Columns extends string = string>(
delimiter: string,
url: string,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): Promise<DSVParsedArray<ParsedRow>>;
/**
* Fetches the DSV file with the specified delimiter character at the specified input URL and returns
* a promise of an array of objects representing the parsed rows.
*
* The init object is passed along to the underlying call to fetch.
*
* The specified row conversion function is used to map and filter row objects to a more-specific representation;
* see dsv.parse for details.
*
* The first generic parameter describes the type of the object representation of a parsed row.
* The second generic parameter describes the column names as a union of string literal types.
*
* @param delimiter The delimiter character used in the DSV file to be fetched.
* @param url A valid URL string.
* @param init An request initialization object.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function dsv<ParsedRow extends object, Columns extends string = string>(
delimiter: string,
url: string,
init: RequestInit,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): Promise<DSVParsedArray<ParsedRow>>;
/**
* Fetches the file at the specified input URL as text, parses it as HTML and returns a Promise of an HTML DOM Document.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
export function html(url: string, init?: RequestInit): Promise<Document>;
/**
* Fetches the image at the specified input URL and returns a promise of an HTML image element.
*
* If init is specified, sets any additional properties on the image before loading.
*
* @param url A valid URL string.
* @param init An optional object of image properties to set.
*/
export function image(url: string, init?: Partial<HTMLImageElement>): Promise<HTMLImageElement>;
/**
* Fetches the json file at the specified input URL and returns it as a Promise of a parsed JSON object.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* If the server returns a status code of [204 No Content](https://developer.mozilla.org/docs/Web/HTTP/Status/204)
* or [205 Reset Content](https://developer.mozilla.org/docs/Web/HTTP/Status/205), the promise resolves to `undefined`.
*
* The generic parameter describes the type of the object parsed from the returned JSON.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function json<ParsedJSONObject extends any>(
url: string,
init?: RequestInit,
): Promise<ParsedJSONObject | undefined>;
/**
* Fetches the file at the specified input URL as text, parses it as SVG and returns a Promise of an SVG Document.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
export function svg(url: string, init?: RequestInit): Promise<Document>;
/**
* Fetches the text file at the specified input URL and returns it as a Promise of a string.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
export function text(url: string, init?: RequestInit): Promise<string>;
/**
* Fetches the TSV file at the specified input URL and returns
* a promise of an array of objects representing the parsed rows.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* The generic parameter describes the column names as a union of string literal types.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function tsv<Columns extends string>(
url: string,
init?: RequestInit,
): Promise<DSVRowArray<Columns>>;
/**
* Fetches the TSV file at the specified input URL and returns
* a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row
* objects are represented as strings.
*
* The specified row conversion function is used to map and filter row objects to a more-specific representation;
* see dsv.tsvParse for details.
*
* The first generic parameter describes the type of the object representation of a parsed row.
* The second generic parameter describes the column names as a union of string literal types.
*
* @param url A valid URL string.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function tsv<ParsedRow extends object, Columns extends string = string>(
url: string,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): Promise<DSVParsedArray<ParsedRow>>;
/**
* Fetches the TSV file at the specified input URL and returns
* a promise of an array of objects representing the parsed rows.
*
* The init object is passed along to the underlying call to fetch.
*
* The specified row conversion function is used to map and filter row objects to a more-specific representation;
* see dsv.tsvParse for details.
*
* The first generic parameter describes the type of the object representation of a parsed row.
* The second generic parameter describes the column names as a union of string literal types.
*
* @param url A valid URL string.
* @param init An request initialization object.
* @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d),
* the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined,
* the row is skipped and will be omitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object.
* In effect, row is similar to applying a map and filter operator to the returned rows.
*/
export function tsv<ParsedRow extends object, Columns extends string = string>(
url: string,
init: RequestInit,
row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null,
): Promise<DSVParsedArray<ParsedRow>>;
/**
* Fetches the file at the specified input URL as text, parses it as XML and returns a Promise of an XML Document.
*
* If init is specified, it is passed along to the underlying call to fetch.
*
* @param url A valid URL string.
* @param init An optional request initialization object.
*/
export function xml(url: string, init?: RequestInit): Promise<XMLDocument>;

37
node_modules/@types/d3-fetch/package.json generated vendored Normal file
View File

@@ -0,0 +1,37 @@
{
"name": "@types/d3-fetch",
"version": "3.0.7",
"description": "TypeScript definitions for d3-fetch",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-fetch",
"license": "MIT",
"contributors": [
{
"name": "Hugues Stefanski",
"githubUsername": "ledragon",
"url": "https://github.com/ledragon"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-fetch"
},
"scripts": {},
"dependencies": {
"@types/d3-dsv": "*"
},
"typesPublisherContentHash": "0757ff56bd9c67608b51696a50c55993b4588c4d3ec13c6b6f8a3ddd75b375af",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-force/LICENSE generated vendored Normal file
View 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/d3-force/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-force`
# Summary
This package contains type definitions for d3-force (https://github.com/d3/d3-force/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-force.
### Additional Details
* Last updated: Mon, 17 Jun 2024 20:07:03 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).

899
node_modules/@types/d3-force/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,899 @@
// Last module patch version validated against: 3.0.0
// -----------------------------------------------------------------------
// Force Simulation
// -----------------------------------------------------------------------
/**
* The base data structure for the datum of a Simulation Node.
* The optional properties contained in this data structure are internally assigned
* by the Simulation upon (re-)initialization.
*
* When defining a data type to use for node data, it should be an extension of this interface
* and respect the already "earmarked" properties used by the simulation.
*
* IMPORTANT: Prior to initialization, the following properties are optional: index, x, y, vx, and vy.
* After initialization they will be defined. The optional properties fx and fy are ONLY defined,
* if the node's position has been fixed.
*/
export interface SimulationNodeDatum {
/**
* Nodes zero-based index into nodes array. This property is set during the initialization process of a simulation.
*/
index?: number | undefined;
/**
* Nodes current x-position
*/
x?: number | undefined;
/**
* Nodes current y-position
*/
y?: number | undefined;
/**
* Nodes current x-velocity
*/
vx?: number | undefined;
/**
* Nodes current y-velocity
*/
vy?: number | undefined;
/**
* Nodes fixed x-position (if position was fixed)
*/
fx?: number | null | undefined;
/**
* Nodes fixed y-position (if position was fixed)
*/
fy?: number | null | undefined;
}
/**
* The base data structure for the datum of a Simulation Link, as used by ForceLink.
* The optional properties contained in this data structure are internally assigned
* by when initializing with ForceLink.links(...)
*
* IMPORTANT: The source and target properties may be internally mutated in type during the
* ForceLink initialization process (possibly being changed from a node index in the nodes array,
* or a node id string to the simulation node object which was mapped in using the current
* ForceLink.id(...) accessor function.)
*/
export interface SimulationLinkDatum<NodeDatum extends SimulationNodeDatum> {
/**
* Links source node.
* For convenience, a links source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id.
* When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object
* is replaced by an object reference to the corresponding node with the given identifier.
* After initialization, the source property represents the source node object.
*/
source: NodeDatum | string | number;
/**
* Links source link
* For convenience, a links source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id.
* When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object
* is replaced by an object reference to the corresponding node with the given identifier.
* After initialization, the target property represents the target node object.
*/
target: NodeDatum | string | number;
/**
* The zero-based index into the links array. Internally generated when calling ForceLink.links(...)
*/
index?: number | undefined;
}
/**
* A Force Simulation
*
* The first generic refers to the type of the datum associated with a node in the simulation.
* The second generic refers to the type of the datum associated with a link in the simulation, if applicable.
*/
export interface Simulation<
NodeDatum extends SimulationNodeDatum,
LinkDatum extends SimulationLinkDatum<NodeDatum> | undefined,
> {
/**
* Restart the simulations internal timer and return the simulation.
* In conjunction with simulation.alphaTarget or simulation.alpha, this method can be used to “reheat” the simulation during interaction,
* such as when dragging a node, or to resume the simulation after temporarily pausing it with simulation.stop.
*/
restart(): this;
/**
* Stop the simulations internal timer, if it is running, and return the simulation. If the timer is already stopped, this method does nothing.
* This method is useful for running the simulation manually; see simulation.tick.
*/
stop(): this;
/**
* Manually steps the simulation by the specified number of *iterations*, and returns the simulation. If *iterations* is not specified, it defaults to 1 (single step).
*
* For each iteration, it increments the current alpha by (alphaTarget - alpha) × alphaDecay; then invokes each registered force, passing the new alpha;
* then decrements each nodes velocity by velocity × velocityDecay; lastly increments each nodes position by velocity.
*
* This method does not dispatch events; events are only dispatched by the internal timer when the simulation is started automatically upon
* creation or by calling simulation.restart. The natural number of ticks when the simulation is started is
* ⌈log(alphaMin) / log(1 - alphaDecay)⌉; by default, this is 300.
*/
tick(iterations?: number): this;
/**
* Returns the simulations array of nodes as specified to the constructor.
*/
nodes(): NodeDatum[];
/**
* Set the simulations nodes to the specified array of objects, initialize their positions and velocities if necessary,
* and then re-initialize any bound forces; Returns the simulation.
*
* Each node must be an object. The following properties are assigned by the simulation:
* - index (the nodes zero-based index into nodes)
* - x (the nodes current x-position)
* - y (the nodes current y-position)
* - vx (the nodes current x-velocity)
* - vy (the nodes current y-velocity)
*
* The position [x,y] and velocity [vx,vy] may be subsequently modified by forces and by the simulation.
* If either vx or vy is NaN, the velocity is initialized to [0,0]. If either x or y is NaN, the position is initialized in a phyllotaxis arrangement,
* so chosen to ensure a deterministic, uniform distribution.
*
* To fix a node in a given position, you may specify two additional properties:
* - fx (the nodes fixed x-position)
* - fy (the nodes fixed y-position)
*
* At the end of each tick, after the application of any forces, a node with a defined node.fx has node.x reset to this value and node.vx set to zero;
* likewise, a node with a defined node.fy has node.y reset to this value and node.vy set to zero.
* To unfix a node that was previously fixed, set node.fx and node.fy to null, or delete these properties.
*
* If the specified array of nodes is modified, such as when nodes are added to or removed from the simulation,
* this method must be called again with the new (or changed) array to notify the simulation and bound forces of the change;
* the simulation does not make a defensive copy of the specified array.
*/
nodes(nodesData: NodeDatum[]): this;
/**
* Return the current alpha of the simulation, which defaults to 1.
*
* alpha is roughly analogous to temperature in simulated annealing.
* It decreases over time as the simulation “cools down”.
* When alpha reaches alphaMin, the simulation stops; see simulation.restart.
*/
alpha(): number;
/**
* Set the current alpha to the specified number in the range [0,1] and return this simulation.
* The default is 1.
*
* alpha is roughly analogous to temperature in simulated annealing.
* It decreases over time as the simulation “cools down”.
* When alpha reaches alphaMin, the simulation stops; see simulation.restart.
*
* @param alpha Current alpha of simulation.
*/
alpha(alpha: number): this;
/**
* Return the current minimum alpha value, which defaults to 0.001.
*/
alphaMin(): number;
/**
* Set the minimum alpha to the specified number in the range [0,1] and return this simulation.
* The default is 0.001. The simulations internal timer stops when the current alpha is less than the minimum alpha.
* The default alpha decay rate of ~0.0228 corresponds to 300 iterations.
*
* @param min Minimum alpha of simulation.
*/
alphaMin(min: number): this;
/**
* Return the current alpha decay rate, which defaults to 0.0228… = 1 - pow(0.001, 1 / 300) where 0.001 is the default minimum alpha.
*/
alphaDecay(): number;
/**
* Set the alpha decay rate to the specified number in the range [0,1] and return this simulation.
* The default is 0.0228… = 1 - pow(0.001, 1 / 300) where 0.001 is the default minimum alpha.
*
* The alpha decay rate determines how quickly the current alpha interpolates towards the desired target alpha;
* since the default target alpha is zero, by default this controls how quickly the simulation cools.
* Higher decay rates cause the simulation to stabilize more quickly, but risk getting stuck in a local minimum;
* lower values cause the simulation to take longer to run, but typically converge on a better layout.
* To have the simulation run forever at the current alpha, set the decay rate to zero;
* alternatively, set a target alpha greater than the minimum alpha.
*
* @param decay Alpha decay rate.
*/
alphaDecay(decay: number): this;
/**
* Returns the current target alpha value, which defaults to 0.
*/
alphaTarget(): number;
/**
* Set the current target alpha to the specified number in the range [0,1] and return this simulation.
* The default is 0.
*
* @param target Alpha target value.
*/
alphaTarget(target: number): this;
/**
* Return the current target alpha value, which defaults to 0.4.
*/
velocityDecay(): number;
/**
* Set the velocity decay factor to the specified number in the range [0,1] and return this simulation.
* The default is 0.4.
*
* The decay factor is akin to atmospheric friction; after the application of any forces during a tick,
* each nodes velocity is multiplied by 1 - decay. As with lowering the alpha decay rate,
* less velocity decay may converge on a better solution, but risks numerical instabilities and oscillation.
*
* @param decay Velocity Decay.
*/
velocityDecay(decay: number): this;
/**
* Return the force with the specified name, or undefined if there is no such force.
* (By default, new simulations have no forces.)
*
* Given that it is in general not known, what type of force has been registered under
* a specified name, use the generic to cast the result to the appropriate type, if known.
*
* @param name Name of the registered force.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
force<F extends Force<NodeDatum, LinkDatum>>(name: string): F | undefined;
/**
* If force is specified, assigns the force for the specified name and returns this simulation.
* To remove the force with the given name, pass null as the force.
*/
force(name: string, force: null | Force<NodeDatum, LinkDatum>): this;
/**
* Return the node closest to the position [x,y] with the given search radius.
* If radius is not specified, it defaults to infinity.
* If there is no node within the search area, returns undefined.
*
* @param x x-coordinate
* @param y y-coordinate
* @param radius Optional search radius. Defaults to infinity.
*/
find(x: number, y: number, radius?: number): NodeDatum | undefined;
/**
* Returns this simulations current random source which defaults to a fixed-seed linear congruential generator.
* See also random.source.
*/
randomSource(): () => number;
/**
* Sets the function used to generate random numbers; this should be a function that returns a number between 0 (inclusive) and 1 (exclusive).
*
* @param source The function used to generate random numbers.
*/
randomSource(source: () => number): this;
/**
* Return the first currently-assigned listener matching the specified typenames, if any.
*
* @param typenames The typenames is a string containing one or more typename separated by whitespace. Each typename is a type,
* optionally followed by a period (.) and a name, such as "tick.foo" and "tick.bar"; the name allows multiple listeners to be registered for the same type.
* The type must be one of the following: "tick" (after each tick of the simulations internal timer) or
* "end" (after the simulations timer stops when alpha < alphaMin).
*/
on(typenames: "tick" | "end" | string): ((this: Simulation<NodeDatum, LinkDatum>) => void) | undefined;
/**
* Sets the event listener for the specified typenames and returns this simulation.
* If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added.
* If listener is null, removes the current event listeners for the specified typenames, if any.
* When a specified event is dispatched, each listener will be invoked with the this context as the simulation.
*/
on(typenames: "tick" | "end" | string, listener: null | ((this: this) => void)): this;
}
/**
* Create a new simulation with the specified array of nodes and no forces.
* If nodes is not specified, it defaults to the empty array.
* The simulator starts automatically; use simulation.on to listen for tick events as the simulation runs.
* If you wish to run the simulation manually instead, call simulation.stop, and then call simulation.tick as desired.
*
* Use this signature, when creating a simulation WITHOUT link force(s).
*
* The generic refers to the type of the data for a node.
*
* @param nodesData Optional array of nodes data, defaults to empty array.
*/
export function forceSimulation<NodeDatum extends SimulationNodeDatum>(
nodesData?: NodeDatum[],
): Simulation<NodeDatum, undefined>;
/**
* Create a new simulation with the specified array of nodes and no forces.
* If nodes is not specified, it defaults to the empty array.
* The simulator starts automatically; use simulation.on to listen for tick events as the simulation runs.
* If you wish to run the simulation manually instead, call simulation.stop, and then call simulation.tick as desired.
*
* Use this signature, when creating a simulation WITH link force(s).
*
* The first generic refers to the type of data for a node.
* The second generic refers to the type of data for a link.
*
* @param nodesData Optional array of nodes data, defaults to empty array.
*/
export function forceSimulation<
NodeDatum extends SimulationNodeDatum,
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
LinkDatum extends SimulationLinkDatum<NodeDatum>,
>(nodesData?: NodeDatum[]): Simulation<NodeDatum, LinkDatum>;
// ----------------------------------------------------------------------
// Forces
// ----------------------------------------------------------------------
/**
* A force is simply a function that modifies nodes positions or velocities; in this context, a force can apply a classical physical force such as electrical charge or gravity,
* or it can resolve a geometric constraint, such as keeping nodes within a bounding box or keeping linked nodes a fixed distance apart.
*
* Forces typically read the nodes current position [x,y] and then add to (or subtract from) the nodes velocity [vx,vy].
* However, forces may also “peek ahead” to the anticipated next position of the node, [x + vx,y + vy]; this is necessary for resolving geometric constraints through iterative relaxation.
* Forces may also modify the position directly, which is sometimes useful to avoid adding energy to the simulation, such as when recentering the simulation in the viewport.
*
* Forces may optionally implement force.initialize to receive the simulations array of nodes.
*/
export interface Force<
NodeDatum extends SimulationNodeDatum,
LinkDatum extends SimulationLinkDatum<NodeDatum> | undefined,
> {
/**
* Apply this force, optionally observing the specified alpha.
* Typically, the force is applied to the array of nodes previously passed to force.initialize,
* however, some forces may apply to a subset of nodes, or behave differently.
* For example, d3.forceLink applies to the source and target of each link.
*/
(alpha: number): void;
/**
* Supplies the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize?(nodes: NodeDatum[], random: () => number): void;
}
// Centering ------------------------------------------------------------
/**
* The centering force translates nodes uniformly so that the mean position of all nodes
* (the center of mass if all nodes have equal weight) is at the given position [x,y].
* This force modifies the positions of nodes on each application; it does not modify velocities,
* as doing so would typically cause the nodes to overshoot and oscillate around the desired center.
* This force helps keeps nodes in the center of the viewport, and unlike the positioning force,
* it does not distort their relative positions.
*
* The generic refers to the type of data for a node.
*/
export interface ForceCenter<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
/**
* Supplies the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize(nodes: NodeDatum[], random: () => number): void;
/**
* Return the current x-coordinate of the centering position, which defaults to zero.
*/
x(): number;
/**
* Set the x-coordinate of the centering position.
*
* @param x x-coordinate.
*/
x(x: number): this;
/**
* Return the current y-coordinate of the centering position, which defaults to zero.
*/
y(): number;
/**
* Set the y-coordinate of the centering position.
*
* @param y y-coordinate.
*/
y(y: number): this;
/**
* Returns the forces current strength, which defaults to 1.
*/
strength(): number;
/**
* Sets the centering forces strength.
* A reduced strength of e.g. 0.05 softens the movements on interactive graphs in which new nodes enter or exit the graph.
* @param strength The centering force's strength.
*/
strength(strength: number): this;
}
/**
* Create a new centering force with the specified x- and y- coordinates.
* If x and y are not specified, they default to [0,0].
*
* The centering force translates nodes uniformly so that the mean position of all nodes
* (the center of mass if all nodes have equal weight) is at the given position [x,y].
* This force modifies the positions of nodes on each application; it does not modify velocities,
* as doing so would typically cause the nodes to overshoot and oscillate around the desired center.
* This force helps keeps nodes in the center of the viewport, and unlike the positioning force,
* it does not distort their relative positions.
*
* The generic refers to the type of data for a node.
*
* @param x An optional x-coordinate for the centering position, defaults to 0.
* @param y An optional y-coordinate for the centering position, defaults to 0.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function forceCenter<NodeDatum extends SimulationNodeDatum>(x?: number, y?: number): ForceCenter<NodeDatum>;
// Collision ------------------------------------------------------------
/**
* The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping.
* More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b).
* To reduce jitter, this is by default a “soft” constraint with a configurable strength and iteration count.
*
* The generic refers to the type of data for a node.
*/
export interface ForceCollide<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
/**
* Supplies the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize(nodes: NodeDatum[], random: () => number): void;
/**
* Returns the current radius accessor function.
*/
radius(): (node: NodeDatum, i: number, nodes: NodeDatum[]) => number;
/**
* Sets the radius accessor to the specified number or function, re-evaluates the radius accessor for each node, and returns this force.
* The radius accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the radius of each node is only recomputed when the
* force is initialized or when this method is called with a new radius, and not on every application of the force.
*/
radius(radius: number | ((node: NodeDatum, i: number, nodes: NodeDatum[]) => number)): this;
/**
* Return the current strength, which defaults to 1.
*/
strength(): number;
/**
* Set the force strength to the specified number in the range [0,1] and return this force.
* The default strength is 1.
*
* Overlapping nodes are resolved through iterative relaxation.
* For each node, the other nodes that are anticipated to overlap at the next tick (using the anticipated positions [x + vx,y + vy]) are determined;
* the nodes velocity is then modified to push the node out of each overlapping node.
* The change in velocity is dampened by the forces strength such that the resolution of simultaneous overlaps can be blended together to find a stable solution.
*
* @param strength Strength.
*/
strength(strength: number): this;
/**
* Return the current iteration count which defaults to 1.
*/
iterations(): number;
/**
* Sets the number of iterations per application to the specified number and return this force.
*
* Increasing the number of iterations greatly increases the rigidity of the constraint and avoids partial overlap of nodes,
* but also increases the runtime cost to evaluate the force.
*
* @param iterations Number of iterations.
*/
iterations(iterations: number): this;
}
/**
* Creates a new circle collision force with the specified radius.
* If radius is not specified, it defaults to the constant one for all nodes.
*/
export function forceCollide<NodeDatum extends SimulationNodeDatum>(
radius?: number | ((node: NodeDatum, i: number, nodes: NodeDatum[]) => number),
): ForceCollide<NodeDatum>;
// Link ----------------------------------------------------------------
/**
* The link force pushes linked nodes together or apart according to the desired link distance.
* The strength of the force is proportional to the difference between the linked nodes distance and the target distance, similar to a spring force.
*
* The first generic refers to the type of data for a node.
* The second generic refers to the type of data for a link.
*/
export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum>>
extends Force<NodeDatum, LinkDatum>
{
/**
* Supplies the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize(nodes: NodeDatum[], random: () => number): void;
/**
* Return the current array of links, which defaults to the empty array.
*/
links(): LinkDatum[];
/**
* Set the array of links associated with this force, recompute the distance and strength parameters for each link, and return this force.
*
* Each link is an object with the following properties:
* * source - the links source node; see simulation.nodes
* * target - the links target node; see simulation.nodes
* * index - the zero-based index into links, assigned by this method
*
* For convenience, a links source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id.
* When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object
* is replaced by an object reference to the corresponding node with the given identifier.
* If the specified array of links is modified, such as when links are added to or removed from the simulation,
* this method must be called again with the new (or changed) array to notify the force of the change;
* the force does not make a defensive copy of the specified array.
*
* @param links An array of link data.
*/
links(links: LinkDatum[]): this;
/**
* Return the current node id accessor, which defaults to the numeric node.index.
*/
id(): (node: NodeDatum, i: number, nodesData: NodeDatum[]) => string | number;
/**
* Set the node id accessor to the specified function and return this force.
*
* The default id accessor allows each links source and target to be specified as a zero-based index
* into the nodes array.
*
* The id accessor is invoked for each node whenever the force is initialized,
* as when the nodes or links change, being passed the node, the zero-based index of the node in the node array, and the node array.
*
* @param id A node id accessor function which is invoked for each node in the simulation,
* being passed the node, the zero-based index of the node in the node array, and the node array. It returns a string or number to represent the node id which can be used
* for matching link source and link target strings during the ForceLink initialization.
*/
id(id: (node: NodeDatum, i: number, nodesData: NodeDatum[]) => string | number): this;
/**
* Return the current distance accessor, which defaults to implying a default distance of 30.
*/
distance(): (link: LinkDatum, i: number, links: LinkDatum[]) => number;
/**
* Sets the distance accessor to the specified number or function, re-evaluates the distance accessor for each link, and returns this force.
* The distance accessor is invoked for each link, being passed the link and its zero-based index.
* The resulting number is then stored internally, such that the distance of each link is only recomputed when the
* force is initialized or when this method is called with a new distance, and not on every application of the force.
*/
distance(distance: number | ((link: LinkDatum, i: number, links: LinkDatum[]) => number)): this;
/**
* Return the current strength accessor.
* For details regarding the default behavior see: {@link https://github.com/d3/d3-force#link_strength}
*/
strength(): (link: LinkDatum, i: number, links: LinkDatum[]) => number;
/**
* Sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each link, and returns this force.
* The strength accessor is invoked for each link, being passed the link and its zero-based index.
* The resulting number is then stored internally, such that the strength of each link is only recomputed when the
* force is initialized or when this method is called with a new strength, and not on every application of the force.
*/
strength(strength: number | ((link: LinkDatum, i: number, links: LinkDatum[]) => number)): this;
/**
* Return the current iteration count which defaults to 1.
*/
iterations(): number;
/**
* Sets the number of iterations per application to the specified number and return this force.
*
* Increasing the number of iterations greatly increases the rigidity of the constraint and is useful for complex structures such as lattices,
* but also increases the runtime cost to evaluate the force.
*
* @param iterations Number of iterations.
*/
iterations(iterations: number): this;
}
/**
* Creates a new link force with the specified links and default parameters.
* If links is not specified, it defaults to the empty array.
*/
export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum extends SimulationLinkDatum<NodeDatum>>(
links?: LinksDatum[],
): ForceLink<NodeDatum, LinksDatum>;
// Many Body ----------------------------------------------------------------
/**
* The many-body (or n-body) force applies mutually amongst all nodes. It can be used to simulate gravity (attraction) if the strength is positive,
* or electrostatic charge (repulsion) if the strength is negative. This implementation uses quadtrees and the BarnesHut approximation to greatly
* improve performance; the accuracy can be customized using the theta parameter.
*
* Unlike links, which only affect two linked nodes, the charge force is global: every node affects every other node, even if they are on disconnected subgraphs.
*
* The generic refers to the type of data for a node.
*/
export interface ForceManyBody<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
/**
* Supplies the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize(nodes: NodeDatum[], random: () => number): void;
/**
* Return the current strength accessor.
*
* For details regarding the default behavior see: {@link https://github.com/d3/d3-force#manyBody_strength}
*/
strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force.
* A positive value causes nodes to attract each other, similar to gravity, while a negative value causes nodes to repel each other, similar to electrostatic charge.
* The strength accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the strength of each node is only recomputed when the
* force is initialized or when this method is called with a new strength, and not on every application of the force.
*/
strength(strength: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
/**
* Return the current value of the BarnesHut approximation criterion , which defaults to 0.9
*/
theta(): number;
/**
* Set the BarnesHut approximation criterion to the specified number and returns this force.
*
* To accelerate computation, this force implements the BarnesHut approximation which takes O(n log n) per application
* where n is the number of nodes. For each application, a quadtree stores the current node positions;
* then for each node, the combined force of all other nodes on the given node is computed.
* For a cluster of nodes that is far away, the charge force can be approximated by treating the cluster as a single, larger node.
* The theta parameter determines the accuracy of the approximation:
* if the ratio w / l of the width w of the quadtree cell to the distance l from the node to the cells center of mass is less than theta,
* all nodes in the given cell are treated as a single node rather than individually.
*
* The default value is 0.9.
*
* @param theta Value for the theta parameter.
*/
theta(theta: number): this;
/**
* Returns the current minimum distance over which this force is considered, which defaults to 1.
*/
distanceMin(): number;
/**
* Sets the minimum distance between nodes over which this force is considered.
*
* A minimum distance establishes an upper bound on the strength of the force between two nearby nodes, avoiding instability.
* In particular, it avoids an infinitely-strong force if two nodes are exactly coincident; in this case, the direction of the force is random.
*
* The default value is 1.
*
* @param distance The minimum distance between nodes over which this force is considered.
*/
distanceMin(distance: number): this;
/**
* Returns the current maximum distance over which this force is considered, which defaults to infinity.
*/
distanceMax(): number;
/**
* Sets the maximum distance between nodes over which this force is considered.
*
* Specifying a finite maximum distance improves performance and produces a more localized layout.
*
* The default value is infinity.
*
* @param distance The maximum distance between nodes over which this force is considered.
*/
distanceMax(distance: number): this;
}
/**
* Creates a new many-body force with the default parameters.
*
* The many-body (or n-body) force applies mutually amongst all nodes. It can be used to simulate gravity (attraction) if the strength is positive,
* or electrostatic charge (repulsion) if the strength is negative. This implementation uses quadtrees and the BarnesHut approximation to greatly
* improve performance; the accuracy can be customized using the theta parameter.
*
* Unlike links, which only affect two linked nodes, the charge force is global: every node affects every other node, even if they are on disconnected subgraphs.
*
* The generic refers to the type of data for a node.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function forceManyBody<NodeDatum extends SimulationNodeDatum>(): ForceManyBody<NodeDatum>;
// Positioning ----------------------------------------------------------------
/**
* The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
* The strength of the force is proportional to the one-dimensional distance between the nodes position and the target position.
* While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
*
* The generic refers to the type of data for a node.
*/
export interface ForceX<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
/**
* Supplies the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize(nodes: NodeDatum[], random: () => number): void;
/**
* Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
*/
strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force.
* The strength determines how much to increment the nodes x-velocity: (x - node.x) × strength.
* For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application.
* Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
* A value outside the range [0,1] is not recommended.
* The strength accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the strength of each node is only recomputed when the
* force is initialized or when this method is called with a new strength, and not on every application of the force.
*/
strength(strength: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
/**
* Return the current x-accessor, which defaults to a function returning 0 for all nodes.
*/
x(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the x-coordinate accessor to the specified number or function, re-evaluates the x-accessor for each node, and returns this force.
* The x-accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the target x-coordinate of each node is only recomputed
* when the force is initialized or when this method is called with a new x, and not on every application of the force.
*/
x(x: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
}
/**
* Creates a new positioning force along the x-axis towards the given position x.
* If x is not specified, it defaults to 0.
*/
export function forceX<NodeDatum extends SimulationNodeDatum>(
x?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number),
): ForceX<NodeDatum>;
/**
* The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength.
* The strength of the force is proportional to the one-dimensional distance between the nodes position and the target position.
* While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
*
* The generic refers to the type of data for a node.
*/
export interface ForceY<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
/**
* Supplies the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize(nodes: NodeDatum[], random: () => number): void;
/**
* Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
*/
strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force.
* The strength determines how much to increment the nodes y-velocity: (y - node.y) × strength.
* For example, a value of 0.1 indicates that the node should move a tenth of the way from its current y-position to the target y-position with each application.
* Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
* A value outside the range [0,1] is not recommended.
* The strength accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the strength of each node is only recomputed when the
* force is initialized or when this method is called with a new strength, and not on every application of the force.
*/
strength(strength: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
/**
* Return the current y-accessor, which defaults to a function returning 0 for all nodes.
*/
y(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the y-coordinate accessor to the specified number or function, re-evaluates the y-accessor for each node, and returns this force.
* The y-accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the target y-coordinate of each node is only recomputed
* when the force is initialized or when this method is called with a new y, and not on every application of the force.
*/
y(y: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
}
/**
* Creates a new positioning force along the y-axis towards the given position y.
* If y is not specified, it defaults to 0.
*/
export function forceY<NodeDatum extends SimulationNodeDatum>(
y?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number),
): ForceY<NodeDatum>;
/**
* The radial force is similar to the x- and y-positioning forces, except it pushes nodes towards the closest point on a given circle.
* The circle is of the specified radius centered at ⟨x,y⟩. If x and y are not specified, they default to ⟨0,0⟩.
* The strength of the force is proportional to the one-dimensional distance between the nodes position and the target position.
* While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
*
* The generic refers to the type of data for a node.
*/
export interface ForceRadial<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> {
/**
* Assigns the array of nodes and random source to this force. This method is called when a force is bound to a simulation via simulation.force
* and when the simulations nodes change via simulation.nodes.
*
* A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force.
*/
initialize(nodes: NodeDatum[], random: () => number): void;
/**
* Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1.
*/
strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force.
* The strength determines how much to increment the nodes x- and y-velocity.
* For example, a value of 0.1 indicates that the node should move a tenth of the way from its current position to the closest point on the circle with each application.
* Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints.
* A value outside the range [0,1] is not recommended.
* The strength accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the strength of each node is only recomputed when the
* force is initialized or when this method is called with a new strength, and not on every application of the force.
*/
strength(strength: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
/**
* Return the current radius accessor for the circle.
*/
radius(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the circle radius to the specified number or function, re-evaluates the radius accessor for each node, and returns this force.
* The radius accessor is invoked for each node in the simulation, being passed the node and its zero-based index.
* The resulting number is then stored internally, such that the target radius of each node is only recomputed when
* the force is initialized or when this method is called with a new radius, and not on every application of the force.
*/
radius(radius: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
/**
* Return the current x-accessor for the circle center, which defaults to a function returning 0 for all nodes.
*/
x(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the x-coordinate of the circle center to the specified number and returns this force.
*/
x(x: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
/**
* Return the current y-accessor for the circle center, which defaults to a function returning 0 for all nodes.
*/
y(): (d: NodeDatum, i: number, data: NodeDatum[]) => number;
/**
* Sets the y-coordinate of the circle center to the specified number and returns this force.
*/
y(y: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): this;
}
/**
* Create a new radial positioning force towards a circle of the specified radius centered at ⟨x,y⟩.
* If x and y are not specified, they default to ⟨0,0⟩.
*
* The strength of the force is proportional to the one-dimensional distance between the nodes position and the target position.
* While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes.
*
* The generic refers to the type of data for a node.
*/
export function forceRadial<NodeDatum extends SimulationNodeDatum>(
radius: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number),
x?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number),
y?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number),
): ForceRadial<NodeDatum>;

45
node_modules/@types/d3-force/package.json generated vendored Normal file
View File

@@ -0,0 +1,45 @@
{
"name": "@types/d3-force",
"version": "3.0.10",
"description": "TypeScript definitions for d3-force",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-force",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-force"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "e5ee2e6a5e2d4ebb09e2aa2fe683219329b79c33bbd2f7f62e314bf2bcad5083",
"typeScriptVersion": "4.7"
}

21
node_modules/@types/d3-format/LICENSE generated vendored Normal file
View 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/d3-format/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-format`
# Summary
This package contains type definitions for d3-format (https://github.com/d3/d3-format/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-format.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).

337
node_modules/@types/d3-format/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,337 @@
// Last module patch version validated against: 3.0.1
/**
* Specification of locale to use when creating a new FormatLocaleObject
*/
export interface FormatLocaleDefinition {
/**
* The decimal point (e.g., ".")
*/
decimal: string;
/**
* The group separator (e.g., ","). Note that the thousands property is a misnomer, as
* the grouping definition allows groups other than thousands.
*/
thousands: string;
/**
* The array of group sizes (e.g., [3]), cycled as needed.
*/
grouping: number[];
/**
* The currency prefix and suffix (e.g., ["$", ""]).
*/
currency: [string, string];
/**
* An optional array of ten strings to replace the numerals 0-9.
*/
numerals?: string[] | undefined;
/**
* An optional symbol to replace the `percent` suffix; the percent suffix (defaults to "%").
*/
percent?: string | undefined;
/**
* Optional; the minus sign (defaults to "").
*/
minus?: string | undefined;
/**
* Optional; the not-a-number value (defaults "NaN").
*/
nan?: string | undefined;
}
/**
* A Format Locale Object
*/
export interface FormatLocaleObject {
/**
* Returns a new format function for the given string specifier. The returned function
* takes a number as the only argument, and returns a string representing the formatted number.
*
* @param specifier A Specifier string.
* @throws Error on invalid format specifier.
*/
format(specifier: string): (n: number | { valueOf(): number }) => string;
/**
* Returns a new format function for the given string specifier. The returned function
* takes a number as the only argument, and returns a string representing the formatted number.
* The returned function will convert values to the units of the appropriate SI prefix for the
* specified numeric reference value before formatting in fixed point notation.
*
* @param specifier A Specifier string.
* @param value The reference value to determine the appropriate SI prefix.
* @throws Error on invalid format specifier.
*/
formatPrefix(specifier: string, value: number): (n: number | { valueOf(): number }) => string;
}
/**
* A Format Specifier
*
* For details see: {@link https://github.com/d3/d3-format#locale_format}
*/
export interface FormatSpecifierObject {
/**
* fill can be any character. The presence of a fill character is signaled by the align character following it.
*/
fill?: string | undefined;
/**
* Alignment used for format, as set by choosing one of the following:
*
* '>' - Forces the field to be right-aligned within the available space. (Default behavior).
* '<' - Forces the field to be left-aligned within the available space.
* '^' - Forces the field to be centered within the available space.
* '=' - Like '>', but with any sign and symbol to the left of any padding.
*/
align?: string | undefined;
/**
* The sign can be:
*
* '-' - nothing for positive and a minus sign for negative. (Default behavior.)
* '+' - a plus sign for positive and a minus sign for negative.
* '(' - nothing for positive and parentheses for negative.
* ' ' (space) - a space for positive and a minus sign for negative.
*/
sign?: string | undefined;
/**
* The symbol can be:
*
* '$' - apply currency symbols per the locale definition.
* '#' - for binary, octal, or hexadecimal notation, prefix by 0b, 0o, or 0x, respectively.
* '' (none) - no symbol. (Default behavior.)
*/
symbol?: string | undefined;
/**
* The zero (0) option enables zero-padding; this implicitly sets fill to 0 and align to =.
*/
zero?: string | undefined;
/**
* The width defines the minimum field width;
* if not specified, then the width will be determined by the content.
*/
width?: string | undefined;
/**
* The comma (,) option enables the use of a group separator, such as a comma for thousands.
*/
comma?: string | undefined;
/**
* Depending on the type, the precision either indicates the number of digits that follow the decimal point (types 'f' and '%'),
* or the number of significant digits (types '' (none), 'e', 'g', 'r', 's' and 'p'). If the precision is not specified,
* it defaults to 6 for all types except '' (none), which defaults to 12.
* Precision is ignored for integer formats (types 'b', 'o', 'd', 'x', 'X' and 'c').
*
* See precisionFixed and precisionRound for help picking an appropriate precision.
*/
precision?: string | undefined;
/**
* The '~' option trims insignificant trailing zeros across all format types.
* This is most commonly used in conjunction with types 'r', 'e', 's' and '%'.
*/
trim?: string | undefined;
/**
* The available type values are:
*
* 'e' - exponent notation.
* 'f' - fixed point notation.
* 'g' - either decimal or exponent notation, rounded to significant digits.
* 'r' - decimal notation, rounded to significant digits.
* 's' - decimal notation with an SI prefix, rounded to significant digits.
* '%' - multiply by 100, and then decimal notation with a percent sign.
* 'p' - multiply by 100, round to significant digits, and then decimal notation with a percent sign.
* 'b' - binary notation, rounded to integer.
* 'o' - octal notation, rounded to integer.
* 'd' - decimal notation, rounded to integer.
* 'x' - hexadecimal notation, using lower-case letters, rounded to integer.
* 'X' - hexadecimal notation, using upper-case letters, rounded to integer.
* 'c' - converts the integer to the corresponding unicode character before printing.
*
* The type '' (none) is also supported as shorthand for '~g' (with a default precision of 12 instead of 6), and
* the type 'n' is shorthand for ',g'. For the 'g', 'n' and '' (none) types,
* decimal notation is used if the resulting string would have precision or fewer digits; otherwise, exponent notation is used.
*/
type?: string | undefined;
}
/**
* Create a new locale-based object which exposes format(...) and formatPrefix(...)
* methods for the specified locale.
*
* @param locale A Format locale definition.
*/
export function formatLocale(locale: FormatLocaleDefinition): FormatLocaleObject;
/**
* Create a new locale-based object which exposes format(...) and formatPrefix(...)
* methods for the specified locale definition. The specified locale definition will be
* set as the new default locale definition.
*
* @param defaultLocale A Format locale definition to be used as default.
*/
export function formatDefaultLocale(defaultLocale: FormatLocaleDefinition): FormatLocaleObject;
/**
* Returns a new format function for the given string specifier. The returned function
* takes a number as the only argument, and returns a string representing the formatted number.
*
* Uses the current default locale.
*
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type].
* For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
*
* @param specifier A Specifier string.
* @throws Error on invalid format specifier.
*/
export function format(specifier: string): (n: number | { valueOf(): number }) => string;
/**
* Returns a new format function for the given string specifier. The returned function
* takes a number as the only argument, and returns a string representing the formatted number.
* The returned function will convert values to the units of the appropriate SI prefix for the
* specified numeric reference value before formatting in fixed point notation.
*
* Uses the current default locale.
*
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type].
* For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
*
* @param specifier A Specifier string.
* @param value The reference value to determine the appropriate SI prefix.
* @throws Error on invalid format specifier.
*/
export function formatPrefix(specifier: string, value: number): (n: number | { valueOf(): number }) => string;
/**
* A Format Specifier
*
* For details see: {@link https://github.com/d3/d3-format#locale_format}
*/
export class FormatSpecifier {
/**
* Given the specified specifier object, returning an object with exposed fields that correspond to the format specification mini-language and a toString method that reconstructs the specifier.
* @param specifier A specifier object.
*/
constructor(specifier: FormatSpecifierObject);
/**
* fill can be any character. The presence of a fill character is signaled by the align character following it.
*/
fill: string;
/**
* Alignment used for format, as set by choosing one of the following:
*
* '>' - Forces the field to be right-aligned within the available space. (Default behavior).
* '<' - Forces the field to be left-aligned within the available space.
* '^' - Forces the field to be centered within the available space.
* '=' - Like '>', but with any sign and symbol to the left of any padding.
*/
align: ">" | "<" | "^" | "=";
/**
* The sign can be:
*
* '-' - nothing for positive and a minus sign for negative. (Default behavior.)
* '+' - a plus sign for positive and a minus sign for negative.
* '(' - nothing for positive and parentheses for negative.
* ' ' (space) - a space for positive and a minus sign for negative.
*/
sign: "-" | "+" | "(" | " ";
/**
* The symbol can be:
*
* '$' - apply currency symbols per the locale definition.
* '#' - for binary, octal, or hexadecimal notation, prefix by 0b, 0o, or 0x, respectively.
* '' (none) - no symbol. (Default behavior.)
*/
symbol: "$" | "#" | "";
/**
* The zero (0) option enables zero-padding; this implicitly sets fill to 0 and align to =.
*/
zero: boolean;
/**
* The width defines the minimum field width;
* if not specified, then the width will be determined by the content.
*/
width: number | undefined;
/**
* The comma (,) option enables the use of a group separator, such as a comma for thousands.
*/
comma: boolean;
/**
* Depending on the type, the precision either indicates the number of digits that follow the decimal point (types 'f' and '%'),
* or the number of significant digits (types '' (none), 'e', 'g', 'r', 's' and 'p'). If the precision is not specified,
* it defaults to 6 for all types except '' (none), which defaults to 12.
* Precision is ignored for integer formats (types 'b', 'o', 'd', 'x', 'X' and 'c').
*
* See precisionFixed and precisionRound for help picking an appropriate precision.
*/
precision: number | undefined;
/**
* The '~' option trims insignificant trailing zeros across all format types.
* This is most commonly used in conjunction with types 'r', 'e', 's' and '%'.
*/
trim: boolean;
/**
* The available type values are:
*
* 'e' - exponent notation.
* 'f' - fixed point notation.
* 'g' - either decimal or exponent notation, rounded to significant digits.
* 'r' - decimal notation, rounded to significant digits.
* 's' - decimal notation with an SI prefix, rounded to significant digits.
* '%' - multiply by 100, and then decimal notation with a percent sign.
* 'p' - multiply by 100, round to significant digits, and then decimal notation with a percent sign.
* 'b' - binary notation, rounded to integer.
* 'o' - octal notation, rounded to integer.
* 'd' - decimal notation, rounded to integer.
* 'x' - hexadecimal notation, using lower-case letters, rounded to integer.
* 'X' - hexadecimal notation, using upper-case letters, rounded to integer.
* 'c' - converts the integer to the corresponding unicode character before printing.
*
* The type '' (none) is also supported as shorthand for '~g' (with a default precision of 12 instead of 6), and
* the type 'n' is shorthand for ',g'. For the 'g', 'n' and '' (none) types,
* decimal notation is used if the resulting string would have precision or fewer digits; otherwise, exponent notation is used.
*/
type: "e" | "f" | "g" | "r" | "s" | "%" | "p" | "b" | "o" | "d" | "x" | "X" | "c" | "" | "n";
/**
* Return the object as a specifier string.
*/
toString(): string;
}
/**
* Parses the specified specifier, returning an object with exposed fields that correspond to the
* format specification mini-language and a toString method that reconstructs the specifier.
*
* The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type].
* For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties.
*
* @param specifier A specifier string.
* @throws Error on invalid format specifier.
*/
export function formatSpecifier(specifier: string): FormatSpecifier;
/**
* Returns a suggested decimal precision for fixed point notation given the specified numeric step value.
*
* @param step The step represents the minimum absolute difference between values that will be formatted.
* (This assumes that the values to be formatted are also multiples of step.)
*/
export function precisionFixed(step: number): number;
/**
* Returns a suggested decimal precision for use with locale.formatPrefix given the specified
* numeric step and reference value.
*
* @param step The step represents the minimum absolute difference between values that will be formatted.
* (This assumes that the values to be formatted are also multiples of step.)
* @param value Reference value determines which SI prefix will be used.
*/
export function precisionPrefix(step: number, value: number): number;
/**
* Returns a suggested decimal precision for format types that round to significant digits
* given the specified numeric step and max values.
*
* @param step The step represents the minimum absolute difference between values that will be formatted.
* (This assumes that the values to be formatted are also multiples of step.)
* @param max max represents the largest absolute value that will be formatted.
*/
export function precisionRound(step: number, max: number): number;

45
node_modules/@types/d3-format/package.json generated vendored Normal file
View File

@@ -0,0 +1,45 @@
{
"name": "@types/d3-format",
"version": "3.0.4",
"description": "TypeScript definitions for d3-format",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-format",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-format"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "0b15b96385739bcaef7d24730c61c78f55050d5d6613af26addf38d757a997c4",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-geo/LICENSE generated vendored Normal file
View 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/d3-geo/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-geo`
# Summary
This package contains type definitions for d3-geo (https://github.com/d3/d3-geo/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-geo.
### Additional Details
* Last updated: Sun, 12 Nov 2023 19:07:04 GMT
* Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson)
# Credits
These definitions were written by [Hugues Stefanski](https://github.com/ledragon), [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

1371
node_modules/@types/d3-geo/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

47
node_modules/@types/d3-geo/package.json generated vendored Normal file
View File

@@ -0,0 +1,47 @@
{
"name": "@types/d3-geo",
"version": "3.1.0",
"description": "TypeScript definitions for d3-geo",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-geo",
"license": "MIT",
"contributors": [
{
"name": "Hugues Stefanski",
"githubUsername": "ledragon",
"url": "https://github.com/ledragon"
},
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-geo"
},
"scripts": {},
"dependencies": {
"@types/geojson": "*"
},
"typesPublisherContentHash": "4d55e51247e0d5b1a39b6f087c57085a6ebca17b764aab81b7f1d2087dadb39a",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-hierarchy/LICENSE generated vendored Normal file
View 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/d3-hierarchy/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-hierarchy`
# Summary
This package contains type definitions for d3-hierarchy (https://github.com/d3/d3-hierarchy/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-hierarchy.
### Additional Details
* Last updated: Mon, 18 Mar 2024 18:36:06 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Nathan Bierema](https://github.com/Methuselah96), and [Fil](https://github.com/Fil).

928
node_modules/@types/d3-hierarchy/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,928 @@
// Last module patch version validated against: 3.1.2
// -----------------------------------------------------------------------
// Hierarchy
// -----------------------------------------------------------------------
export interface HierarchyLink<Datum> {
/**
* The source of the link.
*/
source: HierarchyNode<Datum>;
/**
* The target of the link.
*/
target: HierarchyNode<Datum>;
}
export interface HierarchyNode<Datum> {
new(data: Datum): this;
/**
* The associated data, as specified to the constructor.
*/
data: Datum;
/**
* Zero for the root node, and increasing by one for each descendant generation.
*/
readonly depth: number;
/**
* Zero for leaf nodes, and the greatest distance from any descendant leaf for internal nodes.
*/
readonly height: number;
/**
* The parent node, or null for the root node.
*/
parent: this | null;
/**
* An array of child nodes, if any; undefined for leaf nodes.
*/
children?: this[] | undefined;
/**
* Aggregated numeric value as calculated by `sum(value)` or `count()`, if previously invoked.
*/
readonly value?: number | undefined;
/**
* Optional node id string set by `StratifyOperator`, if hierarchical data was created from tabular data using stratify().
*/
readonly id?: string | undefined;
/**
* The x position of this node. Set after a tree has been laid out by `tree` or `cluster`.
*
* ```
* const root = d3.hierarchy(datum);
* const treeLayout = d3.tree();
* treeLayout(root);
* // x and y are now set on root and its descendants
* ```
*/
x?: number | undefined;
/**
* The y position of this node. Set after a tree has been laid out by `tree` or `cluster`.
*
* ```
* const root = d3.hierarchy(datum);
* const treeLayout = d3.tree();
* treeLayout(root);
* // x and y are now set on root and its descendants
* ```
*/
y?: number | undefined;
/**
* Returns the array of ancestors nodes, starting with this node, then followed by each parent up to the root.
*/
ancestors(): this[];
/**
* Returns the array of descendant nodes, starting with this node, then followed by each child in topological order.
*/
descendants(): this[];
/**
* Returns the array of leaf nodes in traversal order; leaves are nodes with no children.
*/
leaves(): this[];
/**
* Returns the first node in the hierarchy from this node for which the specified filter returns a truthy value. undefined if no such node is found.
* @param filter Filter.
*/
find(filter: (node: this) => boolean): this | undefined;
/**
* Returns the shortest path through the hierarchy from this node to the specified target node.
* The path starts at this node, ascends to the least common ancestor of this node and the target node, and then descends to the target node.
*
* @param target The target node.
*/
path(target: this): this[];
/**
* Returns an array of links for this node, where each link is an object that defines source and target properties.
* The source of each link is the parent node, and the target is a child node.
*/
links(): Array<HierarchyLink<Datum>>;
/**
* Evaluates the specified value function for this node and each descendant in post-order traversal, and returns this node.
* The `node.value` property of each node is set to the numeric value returned by the specified function plus the combined value of all descendants.
*
* @param value The value function is passed the nodes data, and must return a non-negative number.
*/
sum(value: (d: Datum) => number): this;
/**
* Computes the number of leaves under this node and assigns it to `node.value`, and similarly for every descendant of node.
* If this node is a leaf, its count is one. Returns this node.
*/
count(): this;
/**
* Sorts the children of this node, if any, and each of this nodes descendants children,
* in pre-order traversal using the specified compare function, and returns this node.
*
* @param compare The compare function is passed two nodes a and b to compare.
* If a should be before b, the function must return a value less than zero;
* if b should be before a, the function must return a value greater than zero;
* otherwise, the relative order of a and b are not specified. See `array.sort` for more.
*/
sort(compare: (a: this, b: this) => number): this;
/**
* Returns an iterator over the nodes descendants in breadth-first order.
*/
[Symbol.iterator](): Iterator<this>;
/**
* Invokes the specified function for node and each descendant in breadth-first order,
* such that a given node is only visited if all nodes of lesser depth have already been visited,
* as well as all preceding nodes of the same depth.
*
* @param func The specified function is passed the current descendant, the zero-based traversal index, and this node.
* @param that If that is specified, it is the this context of the callback.
*/
each<T = undefined>(func: (this: T, node: this, index: number, thisNode: this) => void, that?: T): this;
/**
* Invokes the specified function for node and each descendant in post-order traversal,
* such that a given node is only visited after all of its descendants have already been visited.
*
* @param func The specified function is passed the current descendant, the zero-based traversal index, and this node.
* @param that If that is specified, it is the this context of the callback.
*/
eachAfter<T = undefined>(func: (this: T, node: this, index: number, thisNode: this) => void, that?: T): this;
/**
* Invokes the specified function for node and each descendant in pre-order traversal,
* such that a given node is only visited after all of its ancestors have already been visited.
*
* @param func The specified function is passed the current descendant, the zero-based traversal index, and this node.
* @param that If that is specified, it is the this context of the callback.
*/
eachBefore<T = undefined>(func: (this: T, node: this, index: number, thisNode: this) => void, that?: T): this;
/**
* Return a deep copy of the subtree starting at this node. The returned deep copy shares the same data, however.
* The returned node is the root of a new tree; the returned nodes parent is always null and its depth is always zero.
*/
copy(): this;
}
/**
* Constructs a root node from the specified hierarchical data.
*
* @param data The root specified data.
* If *data* is a Map, it is implicitly converted to the entry [undefined, *data*],
* and the children accessor instead defaults to `(d) => Array.isArray(d) ? d[1] : null;`.
* @param children The specified children accessor function is invoked for each datum, starting with the root data,
* and must return an iterable of data representing the children, if any.
* If children is not specified, it defaults to: `(d) => d.children`.
*/
export function hierarchy<Datum>(
data: Datum,
children?: (d: Datum) => Iterable<Datum> | null | undefined,
): HierarchyNode<Datum>;
// -----------------------------------------------------------------------
// Stratify
// -----------------------------------------------------------------------
export interface StratifyOperator<Datum> {
/**
* Generates a new hierarchy from the specified tabular data. Each node in the returned object has a shallow copy of the properties
* from the corresponding data object, excluding the following reserved properties: id, parentId, children.
*
* @param data The root specified data.
* @throws Error on missing id, ambiguous id, cycle, multiple roots or no root.
*/
(data: Datum[]): HierarchyNode<Datum>;
/**
* Returns the current id accessor, which defaults to: `(d) => d.id`.
*/
id(): (d: Datum, i: number, data: Datum[]) => string | null | "" | undefined;
/**
* Sets the id accessor to the given function.
* The id accessor is invoked for each element in the input data passed to the stratify operator.
* The returned string is then used to identify the node's relationships in conjunction with the parent id.
* For leaf nodes, the id may be undefined, null or the empty string; otherwise, the id must be unique.
*
* @param id The id accessor.
*/
id(id: (d: Datum, i: number, data: Datum[]) => string | null | "" | undefined): this;
/**
* Returns the current parent id accessor, which defaults to: `(d) => d.parentId`.
*/
parentId(): (d: Datum, i: number, data: Datum[]) => string | null | "" | undefined;
/**
* Sets the parent id accessor to the given function.
* The parent id accessor is invoked for each element in the input data passed to the stratify operator.
* The returned string is then used to identify the node's relationships in conjunction with the id.
* For the root node, the parent id should be undefined, null or the empty string.
* There must be exactly one root node in the input data, and no circular relationships.
*
* @param parentId The parent id accessor.
*/
parentId(parentId: (d: Datum, i: number, data: Datum[]) => string | null | "" | undefined): this;
/**
* Returns the current path accessor, which defaults to undefined.
*/
path(): ((d: Datum, i: number, data: Datum[]) => string) | null | undefined;
/**
* If path is specified, sets the path accessor to the given function and returns this stratify operator.
* Otherwise, returns the current path accessor, which defaults to undefined.
* If a path accessor is set, the id and parentId arguments are ignored,
* and a unix-like hierarchy is computed on the slash-delimited strings
* returned by the path accessor, imputing parent nodes and ids as necessary.
*
* @param path The path accessor.
*/
path(path: ((d: Datum, i: number, data: Datum[]) => string) | null | undefined): this;
}
/**
* Constructs a new stratify operator with the default settings.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function stratify<Datum>(): StratifyOperator<Datum>;
// -----------------------------------------------------------------------
// Cluster
// -----------------------------------------------------------------------
export interface HierarchyPointLink<Datum> {
/**
* The source of the link.
*/
source: HierarchyPointNode<Datum>;
/**
* The target of the link.
*/
target: HierarchyPointNode<Datum>;
}
export interface HierarchyPointNode<Datum> extends HierarchyNode<Datum> {
/**
* The x-coordinate of the node.
*/
x: number;
/**
* The y-coordinate of the node.
*/
y: number;
/**
* Returns an array of links for this node, where each link is an object that defines source and target properties.
* The source of each link is the parent node, and the target is a child node.
*/
links(): Array<HierarchyPointLink<Datum>>;
}
export interface ClusterLayout<Datum> {
/**
* Lays out the specified root hierarchy.
* You may want to call `root.sort` before passing the hierarchy to the cluster layout.
*
* @param root The specified root hierarchy.
*/
(root: HierarchyNode<Datum>): HierarchyPointNode<Datum>;
/**
* Returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a node size will be used instead.
*/
size(): [number, number] | null;
/**
* Sets this cluster layouts size to the specified [width, height] array and returns the cluster layout.
* The size represent an arbitrary coordinate system; for example, to produce a radial layout,
* a size of [360, radius] corresponds to a breadth of 360° and a depth of radius.
*
* @param size The specified two-element size array.
*/
size(size: [number, number]): this;
/**
* Returns the current node size, which defaults to null. A node size of null indicates that a layout size will be used instead.
*/
nodeSize(): [number, number] | null;
/**
* Sets this cluster layouts node size to the specified [width, height] array and returns this cluster layout.
* When a node size is specified, the root node is always positioned at <0, 0>.
*
* @param size The specified two-element size array.
*/
nodeSize(size: [number, number]): this;
/**
* Returns the current separation accessor, which defaults to: `(a, b) => a.parent == b.parent ? 1 : 2`.
*/
separation(): (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number;
/**
* Sets the separation accessor to the specified function and returns this cluster layout.
* The separation accessor is used to separate neighboring leaves.
*
* @param separation The separation function is passed two leaves a and b, and must return the desired separation.
* The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent.
*/
separation(separation: (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number): this;
}
/**
* Creates a new cluster layout with default settings.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function cluster<Datum>(): ClusterLayout<Datum>;
// -----------------------------------------------------------------------
// Tree
// -----------------------------------------------------------------------
export interface TreeLayout<Datum> {
/**
* Lays out the specified root hierarchy.
* You may want to call `root.sort` before passing the hierarchy to the tree layout.
*
* @param root The specified root hierarchy.
*/
(root: HierarchyNode<Datum>): HierarchyPointNode<Datum>;
/**
* Returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a node size will be used instead.
*/
size(): [number, number] | null;
/**
* Sets this tree layouts size to the specified [width, height] array and returns the tree layout.
* The size represent an arbitrary coordinate system; for example, to produce a radial layout,
* a size of [360, radius] corresponds to a breadth of 360° and a depth of radius.
*
* @param size The specified two-element size array.
*/
size(size: [number, number]): this;
/**
* Returns the current node size, which defaults to null. A node size of null indicates that a layout size will be used instead.
*/
nodeSize(): [number, number] | null;
/**
* Sets this tree layouts node size to the specified [width, height] array and returns this tree layout.
* When a node size is specified, the root node is always positioned at <0, 0>.
*
* @param size The specified two-element size array.
*/
nodeSize(size: [number, number]): this;
/**
* Returns the current separation accessor, which defaults to: `(a, b) => a.parent == b.parent ? 1 : 2`.
*/
separation(): (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number;
/**
* Sets the separation accessor to the specified function and returns this tree layout.
* The separation accessor is used to separate neighboring nodes.
*
* @param separation The separation function is passed two nodes a and b, and must return the desired separation.
* The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent.
*/
separation(separation: (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number): this;
}
/**
* Creates a new tree layout with default settings.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function tree<Datum>(): TreeLayout<Datum>;
// -----------------------------------------------------------------------
// Treemap
// -----------------------------------------------------------------------
export interface HierarchyRectangularLink<Datum> {
/**
* The source of the link.
*/
source: HierarchyRectangularNode<Datum>;
/**
* The target of the link.
*/
target: HierarchyRectangularNode<Datum>;
}
export interface HierarchyRectangularNode<Datum> extends HierarchyNode<Datum> {
/**
* The left edge of the rectangle.
*/
x0: number;
/**
* The top edge of the rectangle
*/
y0: number;
/**
* The right edge of the rectangle.
*/
x1: number;
/**
* The bottom edge of the rectangle.
*/
y1: number;
/**
* Returns an array of links for this node, where each link is an object that defines source and target properties.
* The source of each link is the parent node, and the target is a child node.
*/
links(): Array<HierarchyRectangularLink<Datum>>;
}
export interface TreemapLayout<Datum> {
/**
* Lays out the specified root hierarchy.
* You must call `root.sum` before passing the hierarchy to the treemap layout.
* You probably also want to call `root.sort` to order the hierarchy before computing the layout.
*
* @param root The specified root hierarchy.
*/
(root: HierarchyNode<Datum>): HierarchyRectangularNode<Datum>;
/**
* Returns the current tiling method, which defaults to `d3.treemapSquarify` with the golden ratio.
*/
tile(): (node: HierarchyRectangularNode<Datum>, x0: number, y0: number, x1: number, y1: number) => void;
/**
* Sets the tiling method to the specified function and returns this treemap layout.
*
* @param tile The specified tiling function.
*/
tile(tile: (node: HierarchyRectangularNode<Datum>, x0: number, y0: number, x1: number, y1: number) => void): this;
/**
* Returns the current size, which defaults to [1, 1].
*/
size(): [number, number];
/**
* Sets this treemap layouts size to the specified [width, height] array and returns this treemap layout.
*
* @param size The specified two-element size array.
*/
size(size: [number, number]): this;
/**
* Returns the current rounding state, which defaults to false.
*/
round(): boolean;
/**
* Enables or disables rounding according to the given boolean and returns this treemap layout.
*
* @param round The specified boolean flag.
*/
round(round: boolean): this;
/**
* Returns the current inner padding function.
*/
padding(): (node: HierarchyRectangularNode<Datum>) => number;
/**
* Sets the inner and outer padding to the specified number and returns this treemap layout.
*
* @param padding The specified padding value.
*/
padding(padding: number): this;
/**
* Sets the inner and outer padding to the specified function and returns this treemap layout.
*
* @param padding The specified padding function.
*/
padding(padding: (node: HierarchyRectangularNode<Datum>) => number): this;
/**
* Returns the current inner padding function, which defaults to the constant zero.
*/
paddingInner(): (node: HierarchyRectangularNode<Datum>) => number;
/**
* Sets the inner padding to the specified number and returns this treemap layout.
* The inner padding is used to separate a nodes adjacent children.
*
* @param padding The specified inner padding value.
*/
paddingInner(padding: number): this;
/**
* Sets the inner padding to the specified function and returns this treemap layout.
* The function is invoked for each node with children, being passed the current node.
* The inner padding is used to separate a nodes adjacent children.
*
* @param padding The specified inner padding function.
*/
paddingInner(padding: (node: HierarchyRectangularNode<Datum>) => number): this;
/**
* Returns the current top padding function.
*/
paddingOuter(): (node: HierarchyRectangularNode<Datum>) => number;
/**
* Sets the top, right, bottom and left padding to the specified function and returns this treemap layout.
*
* @param padding The specified padding outer value.
*/
paddingOuter(padding: number): this;
/**
* Sets the top, right, bottom and left padding to the specified function and returns this treemap layout.
*
* @param padding The specified padding outer function.
*/
paddingOuter(padding: (node: HierarchyRectangularNode<Datum>) => number): this;
/**
* Returns the current top padding function, which defaults to the constant zero.
*/
paddingTop(): (node: HierarchyRectangularNode<Datum>) => number;
/**
* Sets the top padding to the specified number and returns this treemap layout.
* The top padding is used to separate the top edge of a node from its children.
*
* @param padding The specified top padding value.
*/
paddingTop(padding: number): this;
/**
* Sets the top padding to the specified function and returns this treemap layout.
* The function is invoked for each node with children, being passed the current node.
* The top padding is used to separate the top edge of a node from its children.
*
* @param padding The specified top padding function.
*/
paddingTop(padding: (node: HierarchyRectangularNode<Datum>) => number): this;
/**
* Returns the current right padding function, which defaults to the constant zero.
*/
paddingRight(): (node: HierarchyRectangularNode<Datum>) => number;
/**
* Sets the right padding to the specified number and returns this treemap layout.
* The right padding is used to separate the right edge of a node from its children.
*
* @param padding The specified right padding value.
*/
paddingRight(padding: number): this;
/**
* Sets the right padding to the specified function and returns this treemap layout.
* The function is invoked for each node with children, being passed the current node.
* The right padding is used to separate the right edge of a node from its children.
*
* @param padding The specified right padding function.
*/
paddingRight(padding: (node: HierarchyRectangularNode<Datum>) => number): this;
/**
* Returns the current bottom padding function, which defaults to the constant zero.
*/
paddingBottom(): (node: HierarchyRectangularNode<Datum>) => number;
/**
* Sets the bottom padding to the specified number and returns this treemap layout.
* The bottom padding is used to separate the bottom edge of a node from its children.
*
* @param padding The specified bottom padding value.
*/
paddingBottom(padding: number): this;
/**
* Sets the bottom padding to the specified function and returns this treemap layout.
* The function is invoked for each node with children, being passed the current node.
* The bottom padding is used to separate the bottom edge of a node from its children.
*
* @param padding The specified bottom padding function.
*/
paddingBottom(padding: (node: HierarchyRectangularNode<Datum>) => number): this;
/**
* Returns the current left padding function, which defaults to the constant zero.
*/
paddingLeft(): (node: HierarchyRectangularNode<Datum>) => number;
/**
* Sets the left padding to the specified number and returns this treemap layout.
* The left padding is used to separate the left edge of a node from its children.
*
* @param padding The specified left padding value.
*/
paddingLeft(padding: number): this;
/**
* Sets the left padding to the specified function and returns this treemap layout.
* The function is invoked for each node with children, being passed the current node.
* The left padding is used to separate the left edge of a node from its children.
*
* @param padding The specified left padding function.
*/
paddingLeft(padding: (node: HierarchyRectangularNode<Datum>) => number): this;
}
/**
* Creates a new treemap layout with default settings.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function treemap<Datum>(): TreemapLayout<Datum>;
// Tiling functions ------------------------------------------------------
/**
* Recursively partitions the specified nodes into an approximately-balanced binary tree,
* choosing horizontal partitioning for wide rectangles and vertical partitioning for tall rectangles.
*/
export function treemapBinary(
node: HierarchyRectangularNode<any>,
x0: number,
y0: number,
x1: number,
y1: number,
): void;
/**
* Divides the rectangular area specified by x0, y0, x1, y1 horizontally according the value of each of the specified nodes children.
* The children are positioned in order, starting with the left edge (x0) of the given rectangle.
* If the sum of the childrens values is less than the specified nodes value (i.e., if the specified node has a non-zero internal value),
* the remaining empty space will be positioned on the right edge (x1) of the given rectangle.
*/
export function treemapDice(node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void;
/**
* Divides the rectangular area specified by x0, y0, x1, y1 vertically according the value of each of the specified nodes children.
* The children are positioned in order, starting with the top edge (y0) of the given rectangle.
* If the sum of the childrens values is less than the specified nodes value (i.e., if the specified node has a non-zero internal value),
* the remaining empty space will be positioned on the bottom edge (y1) of the given rectangle.
*/
export function treemapSlice(node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void;
/**
* If the specified node has odd depth, delegates to treemapSlice; otherwise delegates to treemapDice.
*/
export function treemapSliceDice(
node: HierarchyRectangularNode<any>,
x0: number,
y0: number,
x1: number,
y1: number,
): void;
// TODO: Test Factory code
export interface RatioSquarifyTilingFactory {
(node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void;
/**
* Specifies the desired aspect ratio of the generated rectangles.
* Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio.
* Furthermore, the rectangles ratio are not guaranteed to have the exact specified aspect ratio.
* If not specified, the aspect ratio defaults to the golden ratio, φ = (1 + sqrt(5)) / 2, per Kong et al.
*
* @param ratio The specified ratio value greater than or equal to one.
*/
ratio(ratio: number): RatioSquarifyTilingFactory;
}
/**
* Implements the squarified treemap algorithm by Bruls et al., which seeks to produce rectangles of a given aspect ratio.
*/
export const treemapSquarify: RatioSquarifyTilingFactory;
/**
* Like `d3.treemapSquarify`, except preserves the topology (node adjacencies) of the previous layout computed by `d3.treemapResquarify`,
* if there is one and it used the same target aspect ratio. This tiling method is good for animating changes to treemaps because
* it only changes node sizes and not their relative positions, thus avoiding distracting shuffling and occlusion.
* The downside of a stable update, however, is a suboptimal layout for subsequent updates: only the first layout uses the Bruls et al. squarified algorithm.
*/
export const treemapResquarify: RatioSquarifyTilingFactory;
// -----------------------------------------------------------------------
// Partition
// -----------------------------------------------------------------------
export interface PartitionLayout<Datum> {
/**
* Lays out the specified root hierarchy.
* You must call `root.sum` before passing the hierarchy to the partition layout.
* You probably also want to call `root.sort` to order the hierarchy before computing the layout.
*
* @param root The specified root hierarchy.
*/
(root: HierarchyNode<Datum>): HierarchyRectangularNode<Datum>;
/**
* Returns the current size, which defaults to [1, 1].
*/
size(): [number, number];
/**
* Sets this partition layouts size to the specified [width, height] array and returns this partition layout.
*
* @param size The specified two-element size array.
*/
size(size: [number, number]): this;
/**
* Returns the current rounding state, which defaults to false.
*/
round(): boolean;
/**
* Enables or disables rounding according to the given boolean and returns this partition layout.
*
* @param round The specified boolean flag.
*/
round(round: boolean): this;
/**
* Returns the current padding, which defaults to zero.
*/
padding(): number;
/**
* Sets the padding to the specified number and returns this partition layout.
* The padding is used to separate a nodes adjacent children.
*
* @param padding The specified padding value.
*/
padding(padding: number): this;
}
/**
* Creates a new partition layout with the default settings.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function partition<Datum>(): PartitionLayout<Datum>;
// -----------------------------------------------------------------------
// Pack
// -----------------------------------------------------------------------
export interface HierarchyCircularLink<Datum> {
/**
* The source of the link.
*/
source: HierarchyCircularNode<Datum>;
/**
* The target of the link.
*/
target: HierarchyCircularNode<Datum>;
}
export interface HierarchyCircularNode<Datum> extends HierarchyNode<Datum> {
/**
* The x-coordinate of the circles center.
*/
x: number;
/**
* The y-coordinate of the circles center.
*/
y: number;
/**
* The radius of the circle.
*/
r: number;
/**
* Returns an array of links for this node, where each link is an object that defines source and target properties.
* The source of each link is the parent node, and the target is a child node.
*/
links(): Array<HierarchyCircularLink<Datum>>;
}
export interface PackLayout<Datum> {
/**
* Lays out the specified root hierarchy.
* You must call `root.sum` before passing the hierarchy to the pack layout.
* You probably also want to call `root.sort` to order the hierarchy before computing the layout.
*
* @param root The specified root hierarchy.
*/
(root: HierarchyNode<Datum>): HierarchyCircularNode<Datum>;
/**
* Returns the current radius accessor, which defaults to null.
*/
radius(): null | ((node: HierarchyCircularNode<Datum>) => number);
/**
* Sets the pack layouts radius accessor to the specified function and returns this pack layout.
* If the radius accessor is null, the radius of each leaf circle is derived from the leaf `node.value` (computed by `node.sum`);
* the radii are then scaled proportionally to fit the layout size.
* If the radius accessor is not null, the radius of each leaf circle is specified exactly by the function.
*
* @param radius The specified radius accessor.
*/
radius(radius: null | ((node: HierarchyCircularNode<Datum>) => number)): this;
/**
* Returns the current size, which defaults to [1, 1].
*/
size(): [number, number];
/**
* Sets this pack layouts size to the specified [width, height] array and returns this pack layout.
*
* @param size The specified two-element size array.
*/
size(size: [number, number]): this;
/**
* Returns the current padding accessor, which defaults to the constant zero.
*/
padding(): (node: HierarchyCircularNode<Datum>) => number;
/**
* Sets this pack layouts padding accessor to the specified number and returns this pack layout.
* Returns the current padding accessor, which defaults to the constant zero.
*
* When siblings are packed, tangent siblings will be separated by approximately the specified padding;
* the enclosing parent circle will also be separated from its children by approximately the specified padding.
* If an explicit radius is not specified, the padding is approximate because a two-pass algorithm
* is needed to fit within the layout size: the circles are first packed without padding;
* a scaling factor is computed and applied to the specified padding; and lastly the circles are re-packed with padding.
*
* @param padding The specified padding value.
*/
padding(padding: number): this;
/**
* Sets this pack layouts padding accessor to the specified function and returns this pack layout.
* Returns the current padding accessor, which defaults to the constant zero.
*
* When siblings are packed, tangent siblings will be separated by approximately the specified padding;
* the enclosing parent circle will also be separated from its children by approximately the specified padding.
* If an explicit radius is not specified, the padding is approximate because a two-pass algorithm
* is needed to fit within the layout size: the circles are first packed without padding;
* a scaling factor is computed and applied to the specified padding; and lastly the circles are re-packed with padding.
*
* @param padding The specified padding function.
*/
padding(padding: (node: HierarchyCircularNode<Datum>) => number): this;
}
/**
* Creates a new pack layout with the default settings.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function pack<Datum>(): PackLayout<Datum>;
// -----------------------------------------------------------------------
// Pack Siblings and Enclosure
// -----------------------------------------------------------------------
export interface PackRadius {
/**
* The radius of the circle.
*/
r: number;
/**
* The x-coordinate of the circles center.
*/
x?: number | undefined;
/**
* The y-coordinate of the circles center.
*/
y?: number | undefined;
}
export interface PackCircle {
/**
* The radius of the circle.
*/
r: number;
/**
* The x-coordinate of the circles center.
*/
x: number;
/**
* The y-coordinate of the circles center.
*/
y: number;
}
// TODO: Since packSiblings manipulates the circles array in place, technically the x and y properties
// are optional on invocation, but will be created after execution for each entry.
/**
* Packs the specified array of circles, each of which must have a `circle.r` property specifying the circles radius.
* The circles are positioned according to the front-chain packing algorithm by Wang et al.
*
* @param circles The specified array of circles to pack.
*/
export function packSiblings<Datum extends PackRadius>(circles: Datum[]): Array<Datum & PackCircle>;
/**
* Computes the smallest circle that encloses the specified array of circles, each of which must have
* a `circle.r` property specifying the circles radius, and `circle.x` and `circle.y` properties specifying the circles center.
* The enclosing circle is computed using the Matoušek-Sharir-Welzl algorithm. (See also Apollonius Problem.)
*
* @param circles The specified array of circles to pack.
*/
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
export function packEnclose<Datum extends PackCircle>(circles: Datum[]): PackCircle;

50
node_modules/@types/d3-hierarchy/package.json generated vendored Normal file
View File

@@ -0,0 +1,50 @@
{
"name": "@types/d3-hierarchy",
"version": "3.1.7",
"description": "TypeScript definitions for d3-hierarchy",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-hierarchy",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
},
{
"name": "Fil",
"githubUsername": "Fil",
"url": "https://github.com/Fil"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-hierarchy"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "30b5aaa4063194f57da2717775cb8f9f5dc675a0ec72d6ed619f7b87ad0baa40",
"typeScriptVersion": "4.7"
}

21
node_modules/@types/d3-interpolate/LICENSE generated vendored Normal file
View 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/d3-interpolate/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-interpolate`
# Summary
This package contains type definitions for d3-interpolate (https://github.com/d3/d3-interpolate/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-interpolate.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:37 GMT
* Dependencies: [@types/d3-color](https://npmjs.com/package/@types/d3-color)
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).

387
node_modules/@types/d3-interpolate/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,387 @@
// Last module patch version validated against: 3.0.1
import { ColorCommonInstance } from "d3-color";
// ---------------------------------------------------------------------------
// Shared Type Definitions and Interfaces
// ---------------------------------------------------------------------------
export interface ZoomInterpolator extends Function {
(t: number): ZoomView;
/**
* Recommended duration of zoom transition in milliseconds.
*/
duration: number;
/**
* Given a zoom interpolator, returns a new zoom interpolator using the specified curvature rho.
* When rho is close to 0, the interpolator is almost linear.
* The default curvature is sqrt(2).
* @param rho
*/
rho(rho: number): this;
}
export interface ColorGammaInterpolationFactory extends Function {
(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
/**
* Returns a new interpolator factory of the same type using the specified *gamma*.
* For example, to interpolate from purple to orange with a gamma of 2.2 in RGB space: `d3.interpolateRgb.gamma(2.2)("purple", "orange")`.
* See Eric Brasseurs article, [Gamma error in picture scaling](https://web.archive.org/web/20160112115812/http://www.4p8.com/eric.brasseur/gamma.html), for more on gamma correction.
*/
gamma(g: number): ColorGammaInterpolationFactory;
}
/**
* Type zoomView is used to represent a numeric array with three elements.
* In order of appearance the elements correspond to:
* - cx: *x*-coordinate of the center of the viewport
* - cy: *y*-coordinate of the center of the viewport
* - width: size of the viewport
*/
export type ZoomView = [number, number, number];
export type TypedArray =
| Int8Array
| Uint8Array
| Int16Array
| Uint16Array
| Int32Array
| Uint32Array
| Uint8ClampedArray
| Float32Array
| Float64Array;
export type NumberArray = TypedArray | DataView;
// ---------------------------------------------------------------------------
// Interpolation Function Factories
// ---------------------------------------------------------------------------
/**
* Returns an `null` constant interpolator.
*/
export function interpolate(a: any, b: null): (t: number) => null;
/**
* Returns an boolean constant interpolator of value `b`.
*/
export function interpolate(a: any, b: boolean): (t: number) => boolean;
/**
* Returns a `interpolateRgb` interpolator.
*/
export function interpolate(a: string | ColorCommonInstance, b: ColorCommonInstance): (t: number) => string;
/**
* Returns a `interpolateDate` interpolator.
*/
export function interpolate(a: Date, b: Date): (t: number) => Date;
/**
* Returns a `interpolateNumber` interpolator.
*/
export function interpolate(
a: number | { valueOf(): number },
b: number | { valueOf(): number },
): (t: number) => number;
/**
* Returns a `interpolateNumberArray` interpolator.
*/
export function interpolate<T extends NumberArray>(a: NumberArray | number[], b: T): (t: number) => T;
/**
* Returns a `interpolateString` interpolator. If `b` is a string coercible to a color use use `interpolateRgb`.
*/
export function interpolate(a: string | { toString(): string }, b: string): (t: number) => string;
/**
* Returns a `interpolateArray` interpolator.
*/
export function interpolate<U extends any[]>(a: any[], b: U): (t: number) => U;
/**
* Returns a `interpolateObject` interpolator.
*/
export function interpolate<U extends object>(a: any, b: U): (t: number) => U;
/**
* Returns an interpolator between the two numbers `a` and `b`.
* The returned interpolator is equivalent to: `(t) => a * (1 - t) + b * t`.
*/
export function interpolateNumber(
a: number | { valueOf(): number },
b: number | { valueOf(): number },
): (t: number) => number;
/**
* Returns an interpolator between the two numbers `a` and `b`; the interpolator is similar to `interpolateNumber`,
* except it will round the resulting value to the nearest integer.
*/
export function interpolateRound(
a: number | { valueOf(): number },
b: number | { valueOf(): number },
): (t: number) => number;
/**
* Returns an interpolator between the two strings `a` and `b`.
* The string interpolator finds numbers embedded in `a` and `b`, where each number is of the form understood by JavaScript.
* A few examples of numbers that will be detected within a string: `-1`, `42`, `3.14159`, and `6.0221413e+23`.
*
* For each number embedded in `b`, the interpolator will attempt to find a corresponding number in `a`.
* If a corresponding number is found, a numeric interpolator is created using `interpolateNumber`.
* The remaining parts of the string `b` are used as a template.
*
* For example, if `a` is `"300 12px sans-serif"`, and `b` is `"500 36px Comic-Sans"`, two embedded numbers are found.
* The remaining static parts (of string `b`) are a space between the two numbers (`" "`), and the suffix (`"px Comic-Sans"`).
* The result of the interpolator at `t` = 0.5 is `"400 24px Comic-Sans"`.
*/
export function interpolateString(
a: string | { toString(): string },
b: string | { toString(): string },
): (t: number) => string;
/**
* Returns an interpolator between the two dates `a` and `b`.
*
* Note: *no defensive copy* of the returned date is created; the same Date instance is returned for every evaluation of the interpolator.
* No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions.
*/
export function interpolateDate(a: Date, b: Date): (t: number) => Date;
export type ArrayInterpolator<A extends any[]> = (t: number) => A;
/**
* Returns an interpolator between the two arrays `a` and `b`. Internally, an array template is created that is the same length in `b`.
* For each element in `b`, if there exists a corresponding element in `a`, a generic interpolator is created for the two elements using `interpolate`.
* If there is no such element, the static value from `b` is used in the template.
* Then, for the given parameter `t`, the templates embedded interpolators are evaluated. The updated array template is then returned.
*
* For example, if `a` is the array `[0, 1]` and `b` is the array `[1, 10, 100]`, then the result of the interpolator for `t = 0.5` is the array `[0.5, 5.5, 100]`.
*
* Note: *no defensive copy* of the template array is created; modifications of the returned array may adversely affect subsequent evaluation of the interpolator.
* No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions.
*/
export function interpolateArray<A extends any[]>(a: any[], b: A): ArrayInterpolator<A>;
/**
* interpolateNumberArray is called
*/
export function interpolateArray<T extends NumberArray>(a: NumberArray | number[], b: T): (t: number) => T;
/**
* Returns an interpolator between the two arrays of numbers a and b.
* Internally, an array template is created that is the same type and length as b.
* For each element in b, if there exists a corresponding element in a, the values are directly interpolated in the array template.
* If there is no such element, the static value from b is copied.
* The updated array template is then returned.
*
* Note: For performance reasons, no defensive copy is made of the template array and the arguments a and b; modifications of these arrays may affect subsequent evaluation of the interpolator.
*/
export function interpolateNumberArray<T extends NumberArray | number[]>(
a: NumberArray | number[],
b: T,
): (t: number) => T;
/**
* Returns an interpolator between the two objects `a` and `b`. Internally, an object template is created that has the same properties as `b`.
* For each property in `b`, if there exists a corresponding property in `a`, a generic interpolator is created for the two elements using `interpolate`.
* If there is no such property, the static value from `b` is used in the template.
* Then, for the given parameter `t`, the template's embedded interpolators are evaluated and the updated object template is then returned.
*
* For example, if `a` is the object `{x: 0, y: 1}` and `b` is the object `{x: 1, y: 10, z: 100}`, the result of the interpolator for `t = 0.5` is the object `{x: 0.5, y: 5.5, z: 100}`.
*
* Note: *no defensive copy* of the template object is created; modifications of the returned object may adversely affect subsequent evaluation of the interpolator.
* No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions.
*/
export function interpolateObject<U extends object>(a: any, b: U): (t: number) => U;
/**
* Returns an interpolator between the two 2D CSS transforms represented by `a` and `b`.
* Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated.
* This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition).
*/
export function interpolateTransformCss(a: string, b: string): (t: number) => string;
/**
* Returns an interpolator between the two 2D SVG transforms represented by `a` and `b`.
* Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated.
* This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition).
*/
export function interpolateTransformSvg(a: string, b: string): (t: number) => string;
/**
* Returns an interpolator between the two views `a` and `b` of a two-dimensional plane,
* based on [“Smooth and efficient zooming and panning”](http://www.win.tue.nl/~vanwijk/zoompan.pdf).
* Each view is defined as an array of three numbers: *cx*, *cy* and *width*.
* The first two coordinates *cx*, *cy* represent the center of the viewport; the last coordinate *width* represents the size of the viewport.
*
* The returned interpolator exposes a *duration* property which encodes the recommended transition duration in milliseconds.
* This duration is based on the path length of the curved trajectory through *x,y* space.
* If you want to a slower or faster transition, multiply this by an arbitrary scale factor (*V* as described in the original paper).
*/
export function interpolateZoom(a: ZoomView, b: ZoomView): ZoomInterpolator;
/**
* Returns a discrete interpolator for the given array of values. The returned interpolator maps `t` in `[0, 1 / n)` to values[0],
* `t` in `[1 / n, 2 / n)` to `values[1]`, and so on, where `n = values.length`. In effect, this is a lightweight quantize scale with a fixed domain of [0, 1].
*/
export function interpolateDiscrete<T>(values: T[]): (t: number) => T;
// Sampling ------------------------------------------------------------------
/**
* Returns `n` uniformly-spaced samples from the specified `interpolator`, where `n` is an integer greater than one.
* The first sample is always at `t = 0`, and the last sample is always at `t = 1`.
* This can be useful in generating a fixed number of samples from a given interpolator,
* such as to derive the range of a [quantize scale](https://github.com/d3/d3-scale#quantize-scales) from a [continuous interpolator](https://github.com/d3/d3-scale#interpolateWarm).
*
* Caution: this method will not work with interpolators that do not return defensive copies of their output,
* such as `d3.interpolateArray`, `d3.interpolateDate` and `d3.interpolateObject`. For those interpolators, you must wrap the interpolator and create a copy for each returned value.
*/
export function quantize<T>(interpolator: (t: number) => T, n: number): T[];
// Color Spaces
/**
* Returns an RGB color space interpolator between the two colors `a` and `b` with a configurable gamma. If the gamma is not specified, it defaults to 1.0.
* The colors `a` and `b` need not be in RGB; they will be converted to RGB using [`d3.rgb`](https://github.com/d3/d3-color#rgb). The return value of the interpolator is an RGB string.
*/
export const interpolateRgb: ColorGammaInterpolationFactory;
/**
* Returns a uniform nonrational B-spline interpolator through the specified array of *colors*, which are converted to RGB color space.
* Implicit control points are generated such that the interpolator returns `colors[0]` at `t = 0` and `colors[colors.length - 1]` at `t = 1`.
* Opacity interpolation is not currently supported. See also `d3.interpolateBasis`, and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples.
*/
export function interpolateRgbBasis(colors: Array<string | ColorCommonInstance>): (t: number) => string;
/**
* Returns a uniform nonrational B-spline interpolator through the specified array of colors, which are converted to RGB color space.
* The control points are implicitly repeated such that the resulting spline has cyclical C² continuity when repeated around `t` in [0,1];
* this is useful, for example, to create cyclical color scales. Opacity interpolation is not currently supported.
* See also `d3.interpolateBasisClosed, and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples.
*/
export function interpolateRgbBasisClosed(colors: Array<string | ColorCommonInstance>): (t: number) => string;
/**
* Returns an HSL color space interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in HSL;
* they will be converted to HSL using `d3.hsl`. If either colors hue or saturation is NaN, the opposing colors channel value is used.
* The shortest path between hues is used. The return value of the interpolator is an RGB string.
*/
export function interpolateHsl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
/**
* Like `interpolateHsl`, but does not use the shortest path between hues.
*/
export function interpolateHslLong(
a: string | ColorCommonInstance,
b: string | ColorCommonInstance,
): (t: number) => string;
/**
* Returns a Lab color space interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in Lab;
* they will be converted to Lab using `d3.lab`. The return value of the interpolator is an RGB string.
*/
export function interpolateLab(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
/**
* Returns an HCL color space interpolator between the two colors `a` and `b`. The colors `a` and `b` need not be in HCL;
* they will be converted to HCL using `d3.hcl`. If either colors hue or chroma is NaN, the opposing colors channel value is used.
* The shortest path between hues is used. The return value of the interpolator is an RGB string.
*/
export function interpolateHcl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): (t: number) => string;
/**
* Like `interpolateHcl`, but does not use the shortest path between hues.
*/
export function interpolateHclLong(
a: string | ColorCommonInstance,
b: string | ColorCommonInstance,
): (t: number) => string;
/**
* Returns a Cubehelix color space interpolator between the two colors `a` and `b` using a configurable `gamma`.
* If the gamma is not specified, it defaults to 1.0. The colors `a` and `b` need not be in Cubehelix;
* they will be converted to Cubehelix using [`d3.cubehelix`](https://github.com/d3/d3-color#cubehelix).
* If either colors hue or saturation is NaN, the opposing colors channel value is used. The shortest path between hues is used. The return value of the interpolator is an RGB string.
*/
export const interpolateCubehelix: ColorGammaInterpolationFactory;
/**
* Like `interpolateCubehelix`, but does not use the shortest path between hues.
*/
export const interpolateCubehelixLong: ColorGammaInterpolationFactory;
/**
* Returns an interpolator between the two hue angles `a` and `b`. If either hue is NaN, the opposing value is used.
* The shortest path between hues is used. The return value of the interpolator is a number in `[0, 360)`.
*/
export function interpolateHue(a: number, b: number): (t: number) => number;
// Splines -------------------------------------------------------------------
/**
* Returns a uniform nonrational B-spline interpolator through the specified array of `values`, which must be numbers.
* Implicit control points are generated such that the interpolator returns `values[0]` at `t` = 0 and `values[values.length - 1]` at `t` = 1.
* See also [`d3.curveBasis`](https://github.com/d3/d3-shape#curveBasis).
*/
export function interpolateBasis(splineNodes: number[]): (t: number) => number;
/**
* Returns a uniform nonrational B-spline interpolator through the specified array of `values`, which must be numbers.
* The control points are implicitly repeated such that the resulting one-dimensional spline has cyclical C² continuity when repeated around `t` in [0,1].
* See also [`d3.curveBasisClosed`](https://github.com/d3/d3-shape#curveBasisClosed).
*/
export function interpolateBasisClosed(splineNodes: number[]): (t: number) => number;
// Piecewise -----------------------------------------------------------------
/**
* Returns a piecewise zoom interpolator, composing zoom interpolators for each adjacent pair of zoom view.
* The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
* and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
* For example, to blend through three different zoom views: `d3.piecewise(d3.interpolateZoom, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
*
* interpolate defaults to d3.interpolate.
*/
export function piecewise(values: ZoomView[]): ZoomInterpolator;
/**
* Returns a piecewise zoom interpolator, composing zoom interpolators for each adjacent pair of zoom view.
* The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
* and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
* For example, to blend through three different zoom views: `d3.piecewise(d3.interpolateZoom, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
*/
export function piecewise(
interpolate: (a: ZoomView, b: ZoomView) => ZoomInterpolator,
values: ZoomView[],
): ZoomInterpolator;
/**
* Returns a piecewise array interpolator, composing array interpolators for each adjacent pair of arrays.
* The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
* and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
* For example, to blend through three different arrays: `d3.piecewise(d3.interpolateArray, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
*
* interpolate defaults to d3.interpolate.
*/
export function piecewise<A extends any[]>(values: A[]): ArrayInterpolator<A>;
/**
* Returns a piecewise array interpolator, composing array interpolators for each adjacent pair of arrays.
* The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
* and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
* For example, to blend through three different arrays: `d3.piecewise(d3.interpolateArray, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`.
*/
export function piecewise<A extends any[]>(
interpolate: (a: any[], b: A) => ArrayInterpolator<A>,
values: A[],
): ArrayInterpolator<A>;
/**
* Returns a piecewise interpolator, composing interpolators for each adjacent pair of values.
* The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
* and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
* For example, to blend through red, green and blue: `d3.piecewise(d3.interpolateRgb.gamma(2.2), ["red", "green", "blue"])`.
*
* interpolate defaults to d3.interpolate.
*/
export function piecewise(values: unknown[]): (t: number) => any;
/**
* Returns a piecewise interpolator, composing interpolators for each adjacent pair of values.
* The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`,
* and so on, where `n = values.length`. In effect, this is a lightweight linear scale.
* For example, to blend through red, green and blue: `d3.piecewise(d3.interpolateRgb.gamma(2.2), ["red", "green", "blue"])`.
*/
export function piecewise<TData>(interpolate: (a: TData, b: TData) => unknown, values: TData[]): (t: number) => any;

47
node_modules/@types/d3-interpolate/package.json generated vendored Normal file
View File

@@ -0,0 +1,47 @@
{
"name": "@types/d3-interpolate",
"version": "3.0.4",
"description": "TypeScript definitions for d3-interpolate",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-interpolate",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-interpolate"
},
"scripts": {},
"dependencies": {
"@types/d3-color": "*"
},
"typesPublisherContentHash": "d315fc677144695b44f1447ef7429c9ff248886716c2e9f742d031abcb319115",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-path/LICENSE generated vendored Normal file
View 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/d3-path/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-path`
# Summary
This package contains type definitions for d3-path (https://github.com/d3/d3-path/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-path.
### Additional Details
* Last updated: Tue, 04 Feb 2025 22:02:37 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

108
node_modules/@types/d3-path/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,108 @@
// Last module patch version validated against: 3.1.0
/**
* A D3 path serializer implementing CanvasPathMethods
*/
export interface Path {
/**
* Move to the specified point ⟨x, y⟩. Equivalent to context.moveTo and SVGs “moveto” command.
*
* @param x x-Coordinate of point to move to
* @param y y-Coordinate of point to move to
*/
moveTo(x: number, y: number): void;
/**
* Ends the current subpath and causes an automatic straight line to be drawn from the current point to the initial point of the current subpath.
* Equivalent to context.closePath and SVGs “closepath” command.
*/
closePath(): void;
/**
* Draws a straight line from the current point to the specified point ⟨x, y⟩.
* Equivalent to context.lineTo and SVGs “lineto” command.
*
* @param x x-Coordinate of point to draw the line to
* @param y y-Coordinate of point to draw the line to
*/
lineTo(x: number, y: number): void;
/**
* Draws a quadratic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control point ⟨cpx, cpy⟩.
* Equivalent to context.quadraticCurveTo and SVGs quadratic Bézier curve commands.
*
* @param cpx x-Coordinate of the control point for the quadratic Bézier curve
* @param cpy y-Coordinate of the control point for the quadratic Bézier curve
* @param x x-Coordinate of point to draw the curve to
* @param y y-Coordinate of point to draw the curve to
*/
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
/**
* Draws a cubic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control points ⟨cpx1, cpy1⟩ and ⟨cpx2, cpy2⟩.
* Equivalent to context.bezierCurveTo and SVGs cubic Bézier curve commands.
*
* @param cpx1 x-Coordinate of the first control point for the Bézier curve
* @param cpy1 y-Coordinate of the first control point for the Bézier curve
* @param cpx2 x-Coordinate of the second control point for the Bézier curve
* @param cpy2 y-Coordinate of the second control point for the Bézier curve
* @param x x-Coordinate of point to draw the curve to
* @param y y-Coordinate of point to draw the curve to
*/
bezierCurveTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): void;
/**
* Draws a circular arc segment with the specified radius that starts tangent to the line between the current point and the specified point ⟨x1, y1⟩
* and ends tangent to the line between the specified points ⟨x1, y1⟩ and ⟨x2, y2⟩. If the first tangent point is not equal to the current point,
* a straight line is drawn between the current point and the first tangent point. Equivalent to context.arcTo and uses SVGs elliptical arc curve commands.
*
* @param x1 x-Coordinate of the first tangent point
* @param y1 y-Coordinate of the first tangent point
* @param x2 x-Coordinate of the second tangent point
* @param y2 y-Coordinate of the second tangent point
* @param radius Radius of the arc segment
*/
arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
/**
* Draws a circular arc segment with the specified center ⟨x, y⟩, radius, startAngle and endAngle. If anticlockwise is true,
* the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction.
* If the current point is not equal to the starting point of the arc, a straight line is drawn from the current point to the start of the arc.
* Equivalent to context.arc and uses SVGs elliptical arc curve commands.
*
* @param x x-Coordinate of the center point of the arc segment
* @param y y-Coordinate of the center point of the arc segment
* @param radius Radius of the arc segment
* @param startAngle Start angle of arc segment
* @param endAngle End angle of arc segment
* @param anticlockwise Flag indicating directionality (true = anti-clockwise, false = clockwise)
*/
arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
/**
* Creates a new subpath containing just the four points ⟨x, y⟩, ⟨x + w, y⟩, ⟨x + w, y + h⟩, ⟨x, y + h⟩,
* with those four points connected by straight lines, and then marks the subpath as closed. Equivalent to context.rect and uses SVGs “lineto” commands.
*
* @param x x-Coordinate of starting point for drawing the rectangle
* @param y y-Coordinate of starting point for drawing the rectangle
* @param w Width of rectangle
* @param h Height of rectangle
*/
rect(x: number, y: number, w: number, h: number): void;
/**
* Returns the string representation of this path according to SVGs path data specification.
*/
toString(): string;
}
/**
* Construct a D3 Path serializer
*/
export function path(): Path;
/**
* Like {@link path}, except limits the digits after the decimal to the specified number of digits.
* Useful for reducing the size of generated SVG path data.
*/
export function pathRound(digits?: number): Path;

41
node_modules/@types/d3-path/package.json generated vendored Normal file
View File

@@ -0,0 +1,41 @@
{
"name": "@types/d3-path",
"version": "3.1.1",
"description": "TypeScript definitions for d3-path",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-path",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-path"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "a49fc946781c1138c0dd932ed2a34ea60587bcc0b39790e4eb9a51cb32aaa90b",
"typeScriptVersion": "5.0"
}

21
node_modules/@types/d3-polygon/LICENSE generated vendored Normal file
View 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/d3-polygon/README.md generated vendored Normal file
View File

@@ -0,0 +1,60 @@
# Installation
> `npm install --save @types/d3-polygon`
# Summary
This package contains type definitions for d3-polygon (https://github.com/d3/d3-polygon/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-polygon.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-polygon/index.d.ts)
````ts
// Last module patch version validated against: 3.0.1
/**
* Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order
* (assuming a coordinate system where the origin <0,0> is in the top-left corner), the returned area is positive;
* otherwise it is negative, or zero.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonArea(polygon: Array<[number, number]>): number;
/**
* Returns the centroid of the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonCentroid(polygon: Array<[number, number]>): [number, number];
/**
* Returns the convex hull of the specified points using Andrews monotone chain algorithm.
* The returned hull is represented as an array containing a subset of the input points arranged in
* counterclockwise order. Returns null if points has fewer than three elements.
*
* @param points Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonHull(points: Array<[number, number]>): Array<[number, number]> | null;
/**
* Returns true if and only if the specified point is inside the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
* @param point Coordinates of point <x, y>.
*/
export function polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean;
/**
* Returns the length of the perimeter of the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonLength(polygon: Array<[number, number]>): number;
````
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:37 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

41
node_modules/@types/d3-polygon/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
// Last module patch version validated against: 3.0.1
/**
* Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order
* (assuming a coordinate system where the origin <0,0> is in the top-left corner), the returned area is positive;
* otherwise it is negative, or zero.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonArea(polygon: Array<[number, number]>): number;
/**
* Returns the centroid of the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonCentroid(polygon: Array<[number, number]>): [number, number];
/**
* Returns the convex hull of the specified points using Andrews monotone chain algorithm.
* The returned hull is represented as an array containing a subset of the input points arranged in
* counterclockwise order. Returns null if points has fewer than three elements.
*
* @param points Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonHull(points: Array<[number, number]>): Array<[number, number]> | null;
/**
* Returns true if and only if the specified point is inside the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
* @param point Coordinates of point <x, y>.
*/
export function polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean;
/**
* Returns the length of the perimeter of the specified polygon.
*
* @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on.
*/
export function polygonLength(polygon: Array<[number, number]>): number;

40
node_modules/@types/d3-polygon/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "@types/d3-polygon",
"version": "3.0.2",
"description": "TypeScript definitions for d3-polygon",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-polygon",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-polygon"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "5ed7378dfcd7812d13bc6d39c8ecab60a450c834f215daa96507f03327bc7ca1",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-quadtree/LICENSE generated vendored Normal file
View 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/d3-quadtree/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-quadtree`
# Summary
This package contains type definitions for d3-quadtree (https://github.com/d3/d3-quadtree/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-quadtree.
### Additional Details
* Last updated: Wed, 22 Nov 2023 00:24:48 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96).

204
node_modules/@types/d3-quadtree/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,204 @@
// Last module patch version validated against: 3.0.1
/**
* Leaf node of the quadtree.
*/
export interface QuadtreeLeaf<T> {
/**
* The data associated with this point, as passed to quadtree.add.
*/
data: T;
/**
* The next datum in this leaf, if any.
*/
next?: QuadtreeLeaf<T> | undefined;
/**
* The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes.
*/
length?: undefined;
}
/**
* Internal nodes of the quadtree are represented as four-element arrays in left-to-right, top-to-bottom order:
*
* 0 - the top-left quadrant, if any.
* 1 - the top-right quadrant, if any.
* 2 - the bottom-left quadrant, if any.
* 3 - the bottom-right quadrant, if any.
*
* A child quadrant may be undefined if it is empty.
*/
export interface QuadtreeInternalNode<T> extends Array<QuadtreeInternalNode<T> | QuadtreeLeaf<T> | undefined> {
/**
* The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes.
*/
length: 4;
}
export interface Quadtree<T> {
/**
* Returns the current x-accessor, which defaults to: `x(d) => d[0]`.
*/
x(): (d: T) => number;
/**
* Sets the current x-coordinate accessor and returns the quadtree.
* The x-accessors must be consistent, returning the same value given the same input.
*
* @param x The x-coordinate accessor.
*/
x(x: (d: T) => number): this;
/**
* Returns the current y-accessor, which defaults to: `y(d) => d[1]`.
*/
y(): (d: T) => number;
/**
* Sets the current y-coordinate accessor and returns the quadtree.
* The y-accessors must be consistent, returning the same value given the same input.
*
* @param y The y-coordinate accessor.
*/
y(y: (d: T) => number): this;
/**
* Returns the quadtree's current extent `[[x0, y0], [x1, y1]]`,
* where `x0` and `y0` are the inclusive lower bounds and `x1` and `y1` are the inclusive upper bounds,
* or `undefined` if the quadtree has no extent.
*/
extent(): [[number, number], [number, number]] | undefined;
/**
* Expands the quadtree to cover the specified points `[[x0, y0], [x1, y1]]` and returns the quadtree.
* The extent may also be expanded by calling `quadtree.cover` or `quadtree.add`.
*
* @param extend The specified points to cover.
*/
extent(extend: [[number, number], [number, number]]): this;
/**
* Expands the quadtree to cover the specified point ⟨x,y⟩, and returns the quadtree.
* * If the quadtrees extent already covers the specified point, this method does nothing.
* * If the quadtree has an extent, the extent is repeatedly doubled to cover the specified point, wrapping the root node as necessary.
* * If the quadtree is empty, the extent is initialized to the extent `[[⌊x⌋, ⌊y⌋], [⌈x⌉, ⌈y⌉]]`.
* Rounding is necessary such that if the extent is later doubled, the boundaries of existing quadrants do not change due to floating point error.
*
* @param x The x-coordinate for the specified point to cover.
* @param y The y-coordinate for the specified point to cover.
*/
cover(x: number, y: number): this;
/**
* Adds the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree.
* If the new point is outside the current extent of the quadtree, the quadtree is automatically expanded to cover the new point.
*
* @param datum The specified datum to add.
*/
add(datum: T): this;
/**
* Adds the specified array of data to the quadtree, deriving each elements coordinates ⟨x,y⟩ using the current x- and y-accessors, and return this quadtree.
* This is approximately equivalent to calling quadtree.add repeatedly.
* However, this method results in a more compact quadtree because the extent of the data is computed first before adding the data.
*
* @param data The specified array of data to add.
*/
addAll(data: T[]): this;
/**
* Removes the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree.
* If the specified datum does not exist in this quadtree, this method does nothing.
*
* @param datum The specified datum to remove.
*/
remove(datum: T): this;
/**
* Removes the specified data to the quadtree, deriving their coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree.
* If a specified datum does not exist in this quadtree, it is ignored.
*
* @param data The specified array of data to remove.
*/
removeAll(data: T[]): this;
/**
* Returns a copy of the quadtree. All nodes in the returned quadtree are identical copies of the corresponding node in the quadtree;
* however, any data in the quadtree is shared by reference and not copied.
*/
copy(): Quadtree<T>;
/**
* Returns the root node of the quadtree.
*/
root(): QuadtreeInternalNode<T> | QuadtreeLeaf<T>;
/**
* Returns an array of all data in the quadtree.
*/
data(): T[];
/**
* Returns the total number of data in the quadtree.
*/
size(): number;
/**
* Returns the datum closest to the position ⟨x,y⟩ with the given search radius. If radius is not specified, it defaults to infinity.
* If there is no datum within the search area, returns undefined.
*
* @param x The x-coordinate for the search position.
* @param y The y-coordinate for the search position.
* @param radius The optional search radius.
*/
find(x: number, y: number, radius?: number): T | undefined;
/**
* Visits each node in the quadtree in pre-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node,
* where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree.
*
* If the callback returns true for a given node, then the children of that node are not visited; otherwise, all child nodes are visited.
* This can be used to quickly visit only parts of the tree.
* Note, however, that child quadrants are always visited in sibling order: top-left, top-right, bottom-left, bottom-right.
* In cases such as search, visiting siblings in a specific order may be faster.
*
* @param callback The callback invoked for each node.
*/
visit(
callback: (
node: QuadtreeInternalNode<T> | QuadtreeLeaf<T>,
x0: number,
y0: number,
x1: number,
y1: number,
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
) => void | boolean,
): this;
/**
* Visits each node in the quadtree in post-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node,
* where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree.
*
* @param callback The callback invoked for each node.
*/
visitAfter(
callback: (
node: QuadtreeInternalNode<T> | QuadtreeLeaf<T>,
x0: number,
y0: number,
x1: number,
y1: number,
) => void,
): this;
}
/**
* Creates a new, empty quadtree with an empty extent and the default x- and y-accessors.
* If data is specified, adds the specified array of data to the quadtree.
*/
export function quadtree<T = [number, number]>(data?: T[]): Quadtree<T>;
/**
* Creates a new, empty quadtree with an empty extent and the default x- and y-accessors.
* Adds the specified array of data to the quadtree.
* Sets the x- and y- accessors to the specified functions before adding the specified array of data to the quadtree.
*/
export function quadtree<T = [number, number]>(data: T[], x: (d: T) => number, y: (d: T) => number): Quadtree<T>;

45
node_modules/@types/d3-quadtree/package.json generated vendored Normal file
View File

@@ -0,0 +1,45 @@
{
"name": "@types/d3-quadtree",
"version": "3.0.6",
"description": "TypeScript definitions for d3-quadtree",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-quadtree",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "denisname",
"githubUsername": "denisname",
"url": "https://github.com/denisname"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-quadtree"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "25e9fdfd9eb37b9d2cbd957331386544f3b889a4ec48a1c166416492df440709",
"typeScriptVersion": "4.5"
}

21
node_modules/@types/d3-random/LICENSE generated vendored Normal file
View 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/d3-random/README.md generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/d3-random`
# Summary
This package contains type definitions for d3-random (https://github.com/d3/d3-random/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-random.
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:37 GMT
* Dependencies: none
# Credits
These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96).

312
node_modules/@types/d3-random/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,312 @@
// Last module patch version validated against: 3.0.1
export interface RandomNumberGenerationSource {
/**
* Returns the same type of function for generating random numbers but where the given random number
* generator source is used as the source of randomness instead of Math.random.
* This is useful when a seeded random number generator is preferable to Math.random.
*
* @param source Source (pseudo-)random number generator implementing the Math.random interface.
* The given random number generator must implement the same interface as Math.random and
* only return values in the range [0, 1).
*/
source(source: () => number): this;
}
/**
* A configurable random number generator for the uniform distribution.
*/
export interface RandomUniform extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a uniform distribution.
* The minimum allowed value of a returned number is min (inclusive), and the maximum is max (exclusive).
* Min defaults to 0; if max is not specified, it defaults to 1.
*
* @param max The maximum allowed value of a returned number, defaults to 1.
*/
(max?: number): () => number;
/**
* Returns a function for generating random numbers with a uniform distribution.
* The minimum allowed value of a returned number is min (inclusive), and the maximum is max (exclusive).
*
* @param min The minimum allowed value of a returned number.
* @param max The maximum allowed value of a returned number.
*/
// tslint:disable-next-line:unified-signatures
(min: number, max: number): () => number;
}
export const randomUniform: RandomUniform;
/**
* A configurable random integer generator for the uniform distribution.
*/
export interface RandomInt extends RandomNumberGenerationSource {
/**
* Returns a function for generating random integers with a uniform distribution.
* The minimum allowed value of a returned number is ⌊min⌋ (inclusive), and the maximum is ⌊max - 1⌋ (inclusive)
* Min defaults to 0.
*
* @param max The maximum allowed value of a returned number.
*/
(max: number): () => number;
/**
* Returns a function for generating random integers with a uniform distribution.
* The minimum allowed value of a returned number is ⌊min⌋ (inclusive), and the maximum is ⌊max - 1⌋ (inclusive)
*
* @param min The minimum allowed value of a returned number.
* @param max The maximum allowed value of a returned number.
*/
// tslint:disable-next-line:unified-signatures
(min: number, max: number): () => number;
}
export const randomInt: RandomInt;
/**
* A configurable random number generator for the normal (Gaussian) distribution.
*/
export interface RandomNormal extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a normal (Gaussian) distribution.
* The expected value of the generated numbers is mu, with the given standard deviation sigma.
* If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
*
* @param mu Expected value, defaults to 0.
* @param sigma Standard deviation, defaults to 1.
*/
(mu?: number, sigma?: number): () => number;
}
export const randomNormal: RandomNormal;
/**
* A configurable random number generator for the log-normal distribution.
*/
export interface RandomLogNormal extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a log-normal distribution. The expected value of the random variables natural logarithm is mu,
* with the given standard deviation sigma. If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
*
* @param mu Expected value, defaults to 0.
* @param sigma Standard deviation, defaults to 1.
*/
(mu?: number, sigma?: number): () => number;
}
export const randomLogNormal: RandomLogNormal;
/**
* A configurable random number generator for the Bates distribution.
*/
export interface RandomBates extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a Bates distribution with n independent variables.
* The case of fractional n is handled as with d3.randomIrwinHall, and d3.randomBates(0) is equivalent to d3.randomUniform().
*
* @param n Number of independent random variables to use.
*/
(n: number): () => number;
}
export const randomBates: RandomBates;
/**
* A configurable random number generator for the IrwinHall distribution.
*/
export interface RandomIrwinHall extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with an IrwinHall distribution with n independent variables.
* If the fractional part of n is non-zero, this is treated as adding d3.randomUniform() times that fractional part to the integral part.
*
* @param n Number of independent random variables to use.
*/
(n: number): () => number;
}
export const randomIrwinHall: RandomIrwinHall;
/**
* A configurable random number generator for the exponential distribution.
*/
export interface RandomExponential extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with an exponential distribution with the rate lambda;
* equivalent to time between events in a Poisson process with a mean of 1 / lambda.
*
* @param lambda Expected time between events.
*/
(lambda: number): () => number;
}
export const randomExponential: RandomExponential;
/**
* A configurable random number generator with an Pareto distribution.
*/
export interface RandomPareto extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a Pareto distribution with the shape alpha.
* The value alpha must be a positive value.
*
* @param alpha alpha
*/
(alpha: number): () => number;
}
export const randomPareto: RandomPareto;
/**
* A configurable random 0 or 1 generator according to a Bernoulli distribution.
*/
export interface RandomBernoulli extends RandomNumberGenerationSource {
/**
* Returns a function for generating either 1 or 0 according to a Bernoulli distribution with 1 being returned with success probability p and 0 with failure probability q = 1 - p.
* The value p is in the range [0, 1].
*
* @param p p
*/
(p: number): () => number;
}
export const randomBernoulli: RandomBernoulli;
/**
* A configurable random number generator with a geometric distribution.
*/
export interface RandomGeometric extends RandomNumberGenerationSource {
/**
* Returns a function for generating numbers with a geometric distribution with success probability p.
* The value p is in the range [0, 1].
*
* @param p Success probability
*/
(p: number): () => number;
}
export const randomGeometric: RandomGeometric;
/**
* A configurable random number generator with a binomial distribution.
*/
export interface RandomBinomial extends RandomNumberGenerationSource {
/**
* Returns a function for generating numbers with a geometric distribution with success probability p.
* The value p is in the range (0, 1].
*
* @param p Success probability
*/
(p: number): () => number;
}
export const randomBinomial: RandomBinomial;
/**
* A configurable random number generator with a gamma distribution.
*/
export interface RandomGamma extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a gamma distribution with k the shape parameter and theta the scale parameter.
* The value k must be a positive value; if theta is not specified, it defaults to 1.
*
* @param k Shape parameter
* @param theta Scale paramter
*/
(k: number, theta?: number): () => number;
}
export const randomGamma: RandomGamma;
/**
* A configurable random number generator with a beta distribution.
*/
export interface RandomBeta extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a beta distribution with alpha and beta shape parameters, which must both be positive.
*
* @param alpha Shape parameter
* @param beta Shape paramter
*/
(alpha: number, beta: number): () => number;
}
export const randomBeta: RandomBeta;
/**
* A configurable random number generator with one of the generalized extreme value distributions.
*/
export interface RandomWeibull extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with one of the generalized extreme value distributions, depending on k:
* If k is positive, the Weibull distribution with shape parameter k
* If k is zero, the Gumbel distribution
* If k is negative, the Fréchet distribution with shape parameter k
* In all three cases, a is the location parameter and b is the scale parameter.
* If a is not specified, it defaults to 0; if b is not specified, it defaults to 1.
*
* @param k Shape parameter
* @param a Location parameter
* @param b Scale parameter
*/
(k: number, a?: number, b?: number): () => number;
}
export const randomWeibull: RandomWeibull;
/**
* A configurable random number generator with a Cauchy distribution.
*/
export interface RandomCauchy extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a Cauchy distribution.
* a and b have the same meanings and default values as in d3.randomWeibull.
*
* @param a Location parameter
* @param b Scale parameter
*/
(a?: number, b?: number): () => number;
}
export const randomCauchy: RandomCauchy;
/**
* A configurable random number generator with a logistic distribution.
*/
export interface RandomLogistic extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a logistic distribution.
* a and b have the same meanings and default values as in d3.randomWeibull.
*
* @param a Location parameter
* @param b Scale parameter
*/
(a?: number, b?: number): () => number;
}
export const randomLogistic: RandomLogistic;
/**
* A configurable random number generator with a Poisson distribution.
*/
export interface RandomPoisson extends RandomNumberGenerationSource {
/**
* Returns a function for generating random numbers with a Poisson distribution with mean lambda.
*
* @param lambda Mean
*/
(lambda: number): () => number;
}
export const randomPoisson: RandomPoisson;
/**
* Returns a linear congruential generator;
* this function can be called repeatedly to obtain pseudorandom values well-distributed on the interval [0,1) and with a long period (up to 1 billion numbers), similar to Math.random.
* A seed can be specified as a real number in the interval [0,1) or as any integer.
* In the latter case, only the lower 32 bits are considered.
* Two generators instanced with the same seed generate the same sequence, allowing to create reproducible pseudo-random experiments.
* If the seed is not specified, one is chosen using Math.random.
*
* @param seed A seed that is either a real number in the interval [0,1) or any integer.
*/
export function randomLcg(seed?: number): () => number;

40
node_modules/@types/d3-random/package.json generated vendored Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "@types/d3-random",
"version": "3.0.3",
"description": "TypeScript definitions for d3-random",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-random",
"license": "MIT",
"contributors": [
{
"name": "Tom Wanzek",
"githubUsername": "tomwanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"githubUsername": "gustavderdrache",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"githubUsername": "borisyankov",
"url": "https://github.com/borisyankov"
},
{
"name": "Nathan Bierema",
"githubUsername": "Methuselah96",
"url": "https://github.com/Methuselah96"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/d3-random"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "3804fff17d4569fb17e042ed259189e65562b47c2c7ae06a03ce9c2a9b482c74",
"typeScriptVersion": "4.5"
}

Some files were not shown because too many files have changed in this diff Show More