forked from phoenix/litellm-mirror
Delete node_modules directory
This folder should generally not be committed to Github
This commit is contained in:
parent
71db88115d
commit
775a18c2cd
111 changed files with 0 additions and 53206 deletions
1
node_modules/.bin/loose-envify
generated
vendored
1
node_modules/.bin/loose-envify
generated
vendored
|
@ -1 +0,0 @@
|
|||
../loose-envify/cli.js
|
114
node_modules/.package-lock.json
generated
vendored
114
node_modules/.package-lock.json
generated
vendored
|
@ -1,114 +0,0 @@
|
|||
{
|
||||
"name": "litellm",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"node_modules/@types/prop-types": {
|
||||
"version": "15.7.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz",
|
||||
"integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.2.73",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.73.tgz",
|
||||
"integrity": "sha512-XcGdod0Jjv84HOC7N5ziY3x+qL0AfmubvKOZ9hJjJ2yd5EE+KYjWhdOjt387e9HPheHkdggF9atTifMRtyAaRA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/react-copy-to-clipboard": {
|
||||
"version": "5.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.7.tgz",
|
||||
"integrity": "sha512-Gft19D+as4M+9Whq1oglhmK49vqPhcLzk8WfvfLvaYMIPYanyfLy0+CwFucMJfdKoSFyySPmkkWn8/E6voQXjQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/copy-to-clipboard": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz",
|
||||
"integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==",
|
||||
"dependencies": {
|
||||
"toggle-selection": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",
|
||||
"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||
},
|
||||
"node_modules/loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"dependencies": {
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"loose-envify": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prop-types": {
|
||||
"version": "15.8.1",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
||||
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.4.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"react-is": "^16.13.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
|
||||
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-copy-to-clipboard": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz",
|
||||
"integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==",
|
||||
"dependencies": {
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^15.3.0 || 16 || 17 || 18"
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
},
|
||||
"node_modules/toggle-selection": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
|
||||
"integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ=="
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/@types/prop-types/LICENSE
generated
vendored
21
node_modules/@types/prop-types/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
15
node_modules/@types/prop-types/README.md
generated
vendored
15
node_modules/@types/prop-types/README.md
generated
vendored
|
@ -1,15 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/prop-types`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for prop-types (https://github.com/reactjs/prop-types).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Fri, 22 Mar 2024 18:07:25 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [DovydasNavickas](https://github.com/DovydasNavickas), [Ferdy Budhidharma](https://github.com/ferdaber), and [Sebastian Silbermann](https://github.com/eps1lon).
|
109
node_modules/@types/prop-types/index.d.ts
generated
vendored
109
node_modules/@types/prop-types/index.d.ts
generated
vendored
|
@ -1,109 +0,0 @@
|
|||
export type ReactComponentLike =
|
||||
| string
|
||||
| ((props: any, context?: any) => any)
|
||||
| (new(props: any, context?: any) => any);
|
||||
|
||||
export interface ReactElementLike {
|
||||
type: ReactComponentLike;
|
||||
props: any;
|
||||
key: string | null;
|
||||
}
|
||||
|
||||
export interface ReactNodeArray extends Iterable<ReactNodeLike> {}
|
||||
|
||||
export type ReactNodeLike =
|
||||
| ReactElementLike
|
||||
| ReactNodeArray
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| null
|
||||
| undefined;
|
||||
|
||||
export const nominalTypeHack: unique symbol;
|
||||
|
||||
export type IsOptional<T> = undefined extends T ? true : false;
|
||||
|
||||
export type RequiredKeys<V> = {
|
||||
[K in keyof V]-?: Exclude<V[K], undefined> extends Validator<infer T> ? IsOptional<T> extends true ? never : K
|
||||
: never;
|
||||
}[keyof V];
|
||||
export type OptionalKeys<V> = Exclude<keyof V, RequiredKeys<V>>;
|
||||
export type InferPropsInner<V> = { [K in keyof V]-?: InferType<V[K]> };
|
||||
|
||||
export interface Validator<T> {
|
||||
(
|
||||
props: { [key: string]: any },
|
||||
propName: string,
|
||||
componentName: string,
|
||||
location: string,
|
||||
propFullName: string,
|
||||
): Error | null;
|
||||
[nominalTypeHack]?: {
|
||||
type: T;
|
||||
} | undefined;
|
||||
}
|
||||
|
||||
export interface Requireable<T> extends Validator<T | undefined | null> {
|
||||
isRequired: Validator<NonNullable<T>>;
|
||||
}
|
||||
|
||||
export type ValidationMap<T> = { [K in keyof T]?: Validator<T[K]> };
|
||||
|
||||
/**
|
||||
* Like {@link ValidationMap} but treats `undefined`, `null` and optional properties the same.
|
||||
* This type is only added as a migration path in React 19 where this type was removed from React.
|
||||
* Runtime and compile time types would mismatch since you could see `undefined` at runtime when your types don't expect this type.
|
||||
*/
|
||||
export type WeakValidationMap<T> = {
|
||||
[K in keyof T]?: null extends T[K] ? Validator<T[K] | null | undefined>
|
||||
: undefined extends T[K] ? Validator<T[K] | null | undefined>
|
||||
: Validator<T[K]>;
|
||||
};
|
||||
|
||||
export type InferType<V> = V extends Validator<infer T> ? T : any;
|
||||
export type InferProps<V> =
|
||||
& InferPropsInner<Pick<V, RequiredKeys<V>>>
|
||||
& Partial<InferPropsInner<Pick<V, OptionalKeys<V>>>>;
|
||||
|
||||
export const any: Requireable<any>;
|
||||
export const array: Requireable<any[]>;
|
||||
export const bool: Requireable<boolean>;
|
||||
export const func: Requireable<(...args: any[]) => any>;
|
||||
export const number: Requireable<number>;
|
||||
export const object: Requireable<object>;
|
||||
export const string: Requireable<string>;
|
||||
export const node: Requireable<ReactNodeLike>;
|
||||
export const element: Requireable<ReactElementLike>;
|
||||
export const symbol: Requireable<symbol>;
|
||||
export const elementType: Requireable<ReactComponentLike>;
|
||||
export function instanceOf<T>(expectedClass: new(...args: any[]) => T): Requireable<T>;
|
||||
export function oneOf<T>(types: readonly T[]): Requireable<T>;
|
||||
export function oneOfType<T extends Validator<any>>(types: T[]): Requireable<NonNullable<InferType<T>>>;
|
||||
export function arrayOf<T>(type: Validator<T>): Requireable<T[]>;
|
||||
export function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T }>;
|
||||
export function shape<P extends ValidationMap<any>>(type: P): Requireable<InferProps<P>>;
|
||||
export function exact<P extends ValidationMap<any>>(type: P): Requireable<Required<InferProps<P>>>;
|
||||
|
||||
/**
|
||||
* Assert that the values match with the type specs.
|
||||
* Error messages are memorized and will only be shown once.
|
||||
*
|
||||
* @param typeSpecs Map of name to a ReactPropType
|
||||
* @param values Runtime values that need to be type-checked
|
||||
* @param location e.g. "prop", "context", "child context"
|
||||
* @param componentName Name of the component for error messages
|
||||
* @param getStack Returns the component stack
|
||||
*/
|
||||
export function checkPropTypes(
|
||||
typeSpecs: any,
|
||||
values: any,
|
||||
location: string,
|
||||
componentName: string,
|
||||
getStack?: () => any,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Only available if NODE_ENV=production
|
||||
*/
|
||||
export function resetWarningCache(): void;
|
35
node_modules/@types/prop-types/package.json
generated
vendored
35
node_modules/@types/prop-types/package.json
generated
vendored
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"name": "@types/prop-types",
|
||||
"version": "15.7.12",
|
||||
"description": "TypeScript definitions for prop-types",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "DovydasNavickas",
|
||||
"githubUsername": "DovydasNavickas",
|
||||
"url": "https://github.com/DovydasNavickas"
|
||||
},
|
||||
{
|
||||
"name": "Ferdy Budhidharma",
|
||||
"githubUsername": "ferdaber",
|
||||
"url": "https://github.com/ferdaber"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"githubUsername": "eps1lon",
|
||||
"url": "https://github.com/eps1lon"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/prop-types"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "9f43a310cba2ddc63b5ca98d9cce503eaead853f72f038eb5c29c623dc2c01b6",
|
||||
"typeScriptVersion": "4.7"
|
||||
}
|
21
node_modules/@types/react-copy-to-clipboard/LICENSE
generated
vendored
21
node_modules/@types/react-copy-to-clipboard/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
43
node_modules/@types/react-copy-to-clipboard/README.md
generated
vendored
43
node_modules/@types/react-copy-to-clipboard/README.md
generated
vendored
|
@ -1,43 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/react-copy-to-clipboard`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for react-copy-to-clipboard (https://github.com/nkbt/react-copy-to-clipboard).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-copy-to-clipboard.
|
||||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-copy-to-clipboard/index.d.ts)
|
||||
````ts
|
||||
import * as React from "react";
|
||||
|
||||
export as namespace CopyToClipboard;
|
||||
|
||||
declare class CopyToClipboard extends React.PureComponent<CopyToClipboard.Props> {}
|
||||
|
||||
declare namespace CopyToClipboard {
|
||||
class CopyToClipboard extends React.PureComponent<Props> {}
|
||||
|
||||
interface Options {
|
||||
debug?: boolean | undefined;
|
||||
message?: string | undefined;
|
||||
format?: string | undefined; // MIME type
|
||||
}
|
||||
|
||||
interface Props {
|
||||
children?: React.ReactNode;
|
||||
text: string;
|
||||
onCopy?(text: string, result: boolean): void;
|
||||
options?: Options | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export = CopyToClipboard;
|
||||
|
||||
````
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT
|
||||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Meno Abels](https://github.com/mabels), [Bernabe](https://github.com/BernabeFelix), and [Ward Delabastita](https://github.com/wdlb).
|
24
node_modules/@types/react-copy-to-clipboard/index.d.ts
generated
vendored
24
node_modules/@types/react-copy-to-clipboard/index.d.ts
generated
vendored
|
@ -1,24 +0,0 @@
|
|||
import * as React from "react";
|
||||
|
||||
export as namespace CopyToClipboard;
|
||||
|
||||
declare class CopyToClipboard extends React.PureComponent<CopyToClipboard.Props> {}
|
||||
|
||||
declare namespace CopyToClipboard {
|
||||
class CopyToClipboard extends React.PureComponent<Props> {}
|
||||
|
||||
interface Options {
|
||||
debug?: boolean | undefined;
|
||||
message?: string | undefined;
|
||||
format?: string | undefined; // MIME type
|
||||
}
|
||||
|
||||
interface Props {
|
||||
children?: React.ReactNode;
|
||||
text: string;
|
||||
onCopy?(text: string, result: boolean): void;
|
||||
options?: Options | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export = CopyToClipboard;
|
37
node_modules/@types/react-copy-to-clipboard/package.json
generated
vendored
37
node_modules/@types/react-copy-to-clipboard/package.json
generated
vendored
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"name": "@types/react-copy-to-clipboard",
|
||||
"version": "5.0.7",
|
||||
"description": "TypeScript definitions for react-copy-to-clipboard",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-copy-to-clipboard",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Meno Abels",
|
||||
"githubUsername": "mabels",
|
||||
"url": "https://github.com/mabels"
|
||||
},
|
||||
{
|
||||
"name": "Bernabe",
|
||||
"githubUsername": "BernabeFelix",
|
||||
"url": "https://github.com/BernabeFelix"
|
||||
},
|
||||
{
|
||||
"name": "Ward Delabastita",
|
||||
"githubUsername": "wdlb",
|
||||
"url": "https://github.com/wdlb"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/react-copy-to-clipboard"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/react": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "9c2427baf2ab28c51502c6667588b85d26c86f5717a8375102c09943a5ed439d",
|
||||
"typeScriptVersion": "4.5"
|
||||
}
|
21
node_modules/@types/react/LICENSE
generated
vendored
21
node_modules/@types/react/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
15
node_modules/@types/react/README.md
generated
vendored
15
node_modules/@types/react/README.md
generated
vendored
|
@ -1,15 +0,0 @@
|
|||
# Installation
|
||||
> `npm install --save @types/react`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for react (https://react.dev/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 27 Mar 2024 16:37:53 GMT
|
||||
* Dependencies: [@types/prop-types](https://npmjs.com/package/@types/prop-types), [csstype](https://npmjs.com/package/csstype)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), [Microsoft](https://microsoft.com), [John Reilly](https://github.com/johnnyreilly), [Benoit Benezech](https://github.com/bbenezech), [Patricio Zavolinsky](https://github.com/pzavolinsky), [Eric Anderson](https://github.com/ericanderson), [Dovydas Navickas](https://github.com/DovydasNavickas), [Josh Rutherford](https://github.com/theruther4d), [Guilherme Hübner](https://github.com/guilhermehubner), [Ferdy Budhidharma](https://github.com/ferdaber), [Johann Rakotoharisoa](https://github.com/jrakotoharisoa), [Olivier Pascal](https://github.com/pascaloliv), [Martin Hochel](https://github.com/hotell), [Frank Li](https://github.com/franklixuefei), [Jessica Franco](https://github.com/Jessidhia), [Saransh Kataria](https://github.com/saranshkataria), [Kanitkorn Sujautra](https://github.com/lukyth), [Sebastian Silbermann](https://github.com/eps1lon), [Kyle Scully](https://github.com/zieka), [Cong Zhang](https://github.com/dancerphil), [Dimitri Mitropoulos](https://github.com/dimitropoulos), [JongChan Choi](https://github.com/disjukr), [Victor Magalhães](https://github.com/vhfmag), [Dale Tan](https://github.com/hellatan), [Priyanshu Rav](https://github.com/priyanshurav), [Dmitry Semigradsky](https://github.com/Semigradsky), and [Matt Pocock](https://github.com/mattpocock).
|
127
node_modules/@types/react/canary.d.ts
generated
vendored
127
node_modules/@types/react/canary.d.ts
generated
vendored
|
@ -1,127 +0,0 @@
|
|||
/**
|
||||
* These are types for things that are present in the React `canary` release channel.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/canary"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/canary" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
||||
|
||||
import React = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
interface ThenableImpl<T> {
|
||||
then(onFulfill: (value: T) => unknown, onReject: (error: unknown) => unknown): void | PromiseLike<unknown>;
|
||||
}
|
||||
interface UntrackedThenable<T> extends ThenableImpl<T> {
|
||||
status?: void;
|
||||
}
|
||||
|
||||
export interface PendingThenable<T> extends ThenableImpl<T> {
|
||||
status: "pending";
|
||||
}
|
||||
|
||||
export interface FulfilledThenable<T> extends ThenableImpl<T> {
|
||||
status: "fulfilled";
|
||||
value: T;
|
||||
}
|
||||
|
||||
export interface RejectedThenable<T> extends ThenableImpl<T> {
|
||||
status: "rejected";
|
||||
reason: unknown;
|
||||
}
|
||||
|
||||
export type Thenable<T> = UntrackedThenable<T> | PendingThenable<T> | FulfilledThenable<T> | RejectedThenable<T>;
|
||||
|
||||
export type Usable<T> = Thenable<T> | Context<T>;
|
||||
|
||||
export function use<T>(usable: Usable<T>): T;
|
||||
|
||||
interface ServerContextJSONArray extends ReadonlyArray<ServerContextJSONValue> {}
|
||||
export type ServerContextJSONValue =
|
||||
| string
|
||||
| boolean
|
||||
| number
|
||||
| null
|
||||
| ServerContextJSONArray
|
||||
| { [key: string]: ServerContextJSONValue };
|
||||
export interface ServerContext<T extends ServerContextJSONValue> {
|
||||
Provider: Provider<T>;
|
||||
}
|
||||
/**
|
||||
* Accepts a context object (the value returned from `React.createContext` or `React.createServerContext`) and returns the current
|
||||
* context value, as given by the nearest context provider for the given context.
|
||||
*
|
||||
* @version 16.8.0
|
||||
* @see https://react.dev/reference/react/useContext
|
||||
*/
|
||||
function useContext<T extends ServerContextJSONValue>(context: ServerContext<T>): T;
|
||||
export function createServerContext<T extends ServerContextJSONValue>(
|
||||
globalName: string,
|
||||
defaultValue: T,
|
||||
): ServerContext<T>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
|
||||
|
||||
export function unstable_useCacheRefresh(): () => void;
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {
|
||||
functions: (formData: FormData) => void;
|
||||
}
|
||||
|
||||
export interface TransitionStartFunction {
|
||||
/**
|
||||
* Marks all state updates inside the async function as transitions
|
||||
*
|
||||
* @see {https://react.dev/reference/react/useTransition#starttransition}
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
(callback: () => Promise<VoidOrUndefinedOnly>): void;
|
||||
}
|
||||
|
||||
export function useOptimistic<State>(
|
||||
passthrough: State,
|
||||
): [State, (action: State | ((pendingState: State) => State)) => void];
|
||||
export function useOptimistic<State, Action>(
|
||||
passthrough: State,
|
||||
reducer: (state: State, action: Action) => State,
|
||||
): [State, (action: Action) => void];
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
|
||||
cleanup: () => VoidOrUndefinedOnly;
|
||||
}
|
||||
|
||||
export function useActionState<State>(
|
||||
action: (state: Awaited<State>) => State | Promise<State>,
|
||||
initialState: Awaited<State>,
|
||||
permalink?: string,
|
||||
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
||||
export function useActionState<State, Payload>(
|
||||
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
|
||||
initialState: Awaited<State>,
|
||||
permalink?: string,
|
||||
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
|
||||
}
|
145
node_modules/@types/react/experimental.d.ts
generated
vendored
145
node_modules/@types/react/experimental.d.ts
generated
vendored
|
@ -1,145 +0,0 @@
|
|||
/**
|
||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
||||
* on a stable build.
|
||||
*
|
||||
* Once they are promoted to stable they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/experimental"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/experimental" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
||||
//
|
||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
||||
//
|
||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
||||
|
||||
import React = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
/**
|
||||
* @internal Use `Awaited<ReactNode>` instead
|
||||
*/
|
||||
// Helper type to enable `Awaited<ReactNode>`.
|
||||
// Must be a copy of the non-thenables of `ReactNode`.
|
||||
type AwaitedReactNode =
|
||||
| ReactElement
|
||||
| string
|
||||
| number
|
||||
| Iterable<AwaitedReactNode>
|
||||
| ReactPortal
|
||||
| boolean
|
||||
| null
|
||||
| undefined;
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
|
||||
promises: Promise<AwaitedReactNode>;
|
||||
}
|
||||
|
||||
export interface SuspenseProps {
|
||||
/**
|
||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
||||
*/
|
||||
unstable_expectedLoadTime?: number | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together";
|
||||
export type SuspenseListTailMode = "collapsed" | "hidden";
|
||||
|
||||
export interface SuspenseListCommonProps {
|
||||
/**
|
||||
* Note that SuspenseList require more than one child;
|
||||
* it is a runtime warning to provide only a single child.
|
||||
*
|
||||
* It does, however, allow those children to be wrapped inside a single
|
||||
* level of `<React.Fragment>`.
|
||||
*/
|
||||
children: ReactElement | Iterable<ReactElement>;
|
||||
}
|
||||
|
||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: "forwards" | "backwards";
|
||||
/**
|
||||
* Dictates how unloaded items in a SuspenseList is shown.
|
||||
*
|
||||
* - By default, `SuspenseList` will show all fallbacks in the list.
|
||||
* - `collapsed` shows only the next fallback in the list.
|
||||
* - `hidden` doesn’t show any unloaded items.
|
||||
*/
|
||||
tail?: SuspenseListTailMode | undefined;
|
||||
}
|
||||
|
||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder?: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
|
||||
/**
|
||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
||||
*/
|
||||
tail?: never | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
||||
|
||||
/**
|
||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
||||
* in which these components are revealed to the user.
|
||||
*
|
||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
||||
* until previous items have been displayed (this behavior is adjustable).
|
||||
*
|
||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
||||
*/
|
||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function experimental_useEffectEvent<T extends Function>(event: T): T;
|
||||
|
||||
type Reference = object;
|
||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
||||
function experimental_taintUniqueValue(
|
||||
message: string | undefined,
|
||||
lifetime: Reference,
|
||||
value: TaintableUniqueValue,
|
||||
): void;
|
||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
||||
|
||||
export interface HTMLAttributes<T> {
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert
|
||||
*/
|
||||
inert?: boolean | undefined;
|
||||
}
|
||||
}
|
159
node_modules/@types/react/global.d.ts
generated
vendored
159
node_modules/@types/react/global.d.ts
generated
vendored
|
@ -1,159 +0,0 @@
|
|||
/*
|
||||
React projects that don't include the DOM library need these interfaces to compile.
|
||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
||||
|
||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
||||
*/
|
||||
|
||||
interface Event {}
|
||||
interface AnimationEvent extends Event {}
|
||||
interface ClipboardEvent extends Event {}
|
||||
interface CompositionEvent extends Event {}
|
||||
interface DragEvent extends Event {}
|
||||
interface FocusEvent extends Event {}
|
||||
interface KeyboardEvent extends Event {}
|
||||
interface MouseEvent extends Event {}
|
||||
interface TouchEvent extends Event {}
|
||||
interface PointerEvent extends Event {}
|
||||
interface TransitionEvent extends Event {}
|
||||
interface UIEvent extends Event {}
|
||||
interface WheelEvent extends Event {}
|
||||
|
||||
interface EventTarget {}
|
||||
interface Document {}
|
||||
interface DataTransfer {}
|
||||
interface StyleMedia {}
|
||||
|
||||
interface Element {}
|
||||
interface DocumentFragment {}
|
||||
|
||||
interface HTMLElement extends Element {}
|
||||
interface HTMLAnchorElement extends HTMLElement {}
|
||||
interface HTMLAreaElement extends HTMLElement {}
|
||||
interface HTMLAudioElement extends HTMLElement {}
|
||||
interface HTMLBaseElement extends HTMLElement {}
|
||||
interface HTMLBodyElement extends HTMLElement {}
|
||||
interface HTMLBRElement extends HTMLElement {}
|
||||
interface HTMLButtonElement extends HTMLElement {}
|
||||
interface HTMLCanvasElement extends HTMLElement {}
|
||||
interface HTMLDataElement extends HTMLElement {}
|
||||
interface HTMLDataListElement extends HTMLElement {}
|
||||
interface HTMLDetailsElement extends HTMLElement {}
|
||||
interface HTMLDialogElement extends HTMLElement {}
|
||||
interface HTMLDivElement extends HTMLElement {}
|
||||
interface HTMLDListElement extends HTMLElement {}
|
||||
interface HTMLEmbedElement extends HTMLElement {}
|
||||
interface HTMLFieldSetElement extends HTMLElement {}
|
||||
interface HTMLFormElement extends HTMLElement {}
|
||||
interface HTMLHeadingElement extends HTMLElement {}
|
||||
interface HTMLHeadElement extends HTMLElement {}
|
||||
interface HTMLHRElement extends HTMLElement {}
|
||||
interface HTMLHtmlElement extends HTMLElement {}
|
||||
interface HTMLIFrameElement extends HTMLElement {}
|
||||
interface HTMLImageElement extends HTMLElement {}
|
||||
interface HTMLInputElement extends HTMLElement {}
|
||||
interface HTMLModElement extends HTMLElement {}
|
||||
interface HTMLLabelElement extends HTMLElement {}
|
||||
interface HTMLLegendElement extends HTMLElement {}
|
||||
interface HTMLLIElement extends HTMLElement {}
|
||||
interface HTMLLinkElement extends HTMLElement {}
|
||||
interface HTMLMapElement extends HTMLElement {}
|
||||
interface HTMLMetaElement extends HTMLElement {}
|
||||
interface HTMLMeterElement extends HTMLElement {}
|
||||
interface HTMLObjectElement extends HTMLElement {}
|
||||
interface HTMLOListElement extends HTMLElement {}
|
||||
interface HTMLOptGroupElement extends HTMLElement {}
|
||||
interface HTMLOptionElement extends HTMLElement {}
|
||||
interface HTMLOutputElement extends HTMLElement {}
|
||||
interface HTMLParagraphElement extends HTMLElement {}
|
||||
interface HTMLParamElement extends HTMLElement {}
|
||||
interface HTMLPreElement extends HTMLElement {}
|
||||
interface HTMLProgressElement extends HTMLElement {}
|
||||
interface HTMLQuoteElement extends HTMLElement {}
|
||||
interface HTMLSlotElement extends HTMLElement {}
|
||||
interface HTMLScriptElement extends HTMLElement {}
|
||||
interface HTMLSelectElement extends HTMLElement {}
|
||||
interface HTMLSourceElement extends HTMLElement {}
|
||||
interface HTMLSpanElement extends HTMLElement {}
|
||||
interface HTMLStyleElement extends HTMLElement {}
|
||||
interface HTMLTableElement extends HTMLElement {}
|
||||
interface HTMLTableColElement extends HTMLElement {}
|
||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
||||
interface HTMLTableRowElement extends HTMLElement {}
|
||||
interface HTMLTableSectionElement extends HTMLElement {}
|
||||
interface HTMLTemplateElement extends HTMLElement {}
|
||||
interface HTMLTextAreaElement extends HTMLElement {}
|
||||
interface HTMLTimeElement extends HTMLElement {}
|
||||
interface HTMLTitleElement extends HTMLElement {}
|
||||
interface HTMLTrackElement extends HTMLElement {}
|
||||
interface HTMLUListElement extends HTMLElement {}
|
||||
interface HTMLVideoElement extends HTMLElement {}
|
||||
interface HTMLWebViewElement extends HTMLElement {}
|
||||
|
||||
interface SVGElement extends Element {}
|
||||
interface SVGSVGElement extends SVGElement {}
|
||||
interface SVGCircleElement extends SVGElement {}
|
||||
interface SVGClipPathElement extends SVGElement {}
|
||||
interface SVGDefsElement extends SVGElement {}
|
||||
interface SVGDescElement extends SVGElement {}
|
||||
interface SVGEllipseElement extends SVGElement {}
|
||||
interface SVGFEBlendElement extends SVGElement {}
|
||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
||||
interface SVGFECompositeElement extends SVGElement {}
|
||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
||||
interface SVGFEDistantLightElement extends SVGElement {}
|
||||
interface SVGFEDropShadowElement extends SVGElement {}
|
||||
interface SVGFEFloodElement extends SVGElement {}
|
||||
interface SVGFEFuncAElement extends SVGElement {}
|
||||
interface SVGFEFuncBElement extends SVGElement {}
|
||||
interface SVGFEFuncGElement extends SVGElement {}
|
||||
interface SVGFEFuncRElement extends SVGElement {}
|
||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
||||
interface SVGFEImageElement extends SVGElement {}
|
||||
interface SVGFEMergeElement extends SVGElement {}
|
||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
||||
interface SVGFEMorphologyElement extends SVGElement {}
|
||||
interface SVGFEOffsetElement extends SVGElement {}
|
||||
interface SVGFEPointLightElement extends SVGElement {}
|
||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
||||
interface SVGFESpotLightElement extends SVGElement {}
|
||||
interface SVGFETileElement extends SVGElement {}
|
||||
interface SVGFETurbulenceElement extends SVGElement {}
|
||||
interface SVGFilterElement extends SVGElement {}
|
||||
interface SVGForeignObjectElement extends SVGElement {}
|
||||
interface SVGGElement extends SVGElement {}
|
||||
interface SVGImageElement extends SVGElement {}
|
||||
interface SVGLineElement extends SVGElement {}
|
||||
interface SVGLinearGradientElement extends SVGElement {}
|
||||
interface SVGMarkerElement extends SVGElement {}
|
||||
interface SVGMaskElement extends SVGElement {}
|
||||
interface SVGMetadataElement extends SVGElement {}
|
||||
interface SVGPathElement extends SVGElement {}
|
||||
interface SVGPatternElement extends SVGElement {}
|
||||
interface SVGPolygonElement extends SVGElement {}
|
||||
interface SVGPolylineElement extends SVGElement {}
|
||||
interface SVGRadialGradientElement extends SVGElement {}
|
||||
interface SVGRectElement extends SVGElement {}
|
||||
interface SVGSetElement extends SVGElement {}
|
||||
interface SVGStopElement extends SVGElement {}
|
||||
interface SVGSwitchElement extends SVGElement {}
|
||||
interface SVGSymbolElement extends SVGElement {}
|
||||
interface SVGTextElement extends SVGElement {}
|
||||
interface SVGTextPathElement extends SVGElement {}
|
||||
interface SVGTSpanElement extends SVGElement {}
|
||||
interface SVGUseElement extends SVGElement {}
|
||||
interface SVGViewElement extends SVGElement {}
|
||||
|
||||
interface FormData {}
|
||||
interface Text {}
|
||||
interface TouchList {}
|
||||
interface WebGLRenderingContext {}
|
||||
interface WebGL2RenderingContext {}
|
||||
|
||||
interface TrustedHTML {}
|
4484
node_modules/@types/react/index.d.ts
generated
vendored
4484
node_modules/@types/react/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load diff
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
45
node_modules/@types/react/jsx-dev-runtime.d.ts
generated
vendored
|
@ -1,45 +0,0 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
type ElementType = React.JSX.ElementType;
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
export interface JSXSource {
|
||||
/**
|
||||
* The source file where the element originates from.
|
||||
*/
|
||||
fileName?: string | undefined;
|
||||
|
||||
/**
|
||||
* The line number where the element was created.
|
||||
*/
|
||||
lineNumber?: number | undefined;
|
||||
|
||||
/**
|
||||
* The column number where the element was created.
|
||||
*/
|
||||
columnNumber?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxDEV(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key: React.Key | undefined,
|
||||
isStatic: boolean,
|
||||
source?: JSXSource,
|
||||
self?: unknown,
|
||||
): React.ReactElement;
|
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
36
node_modules/@types/react/jsx-runtime.d.ts
generated
vendored
|
@ -1,36 +0,0 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
type ElementType = React.JSX.ElementType;
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsx(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxs(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
210
node_modules/@types/react/package.json
generated
vendored
210
node_modules/@types/react/package.json
generated
vendored
|
@ -1,210 +0,0 @@
|
|||
{
|
||||
"name": "@types/react",
|
||||
"version": "18.2.73",
|
||||
"description": "TypeScript definitions for react",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Asana",
|
||||
"url": "https://asana.com"
|
||||
},
|
||||
{
|
||||
"name": "AssureSign",
|
||||
"url": "http://www.assuresign.com"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft",
|
||||
"url": "https://microsoft.com"
|
||||
},
|
||||
{
|
||||
"name": "John Reilly",
|
||||
"githubUsername": "johnnyreilly",
|
||||
"url": "https://github.com/johnnyreilly"
|
||||
},
|
||||
{
|
||||
"name": "Benoit Benezech",
|
||||
"githubUsername": "bbenezech",
|
||||
"url": "https://github.com/bbenezech"
|
||||
},
|
||||
{
|
||||
"name": "Patricio Zavolinsky",
|
||||
"githubUsername": "pzavolinsky",
|
||||
"url": "https://github.com/pzavolinsky"
|
||||
},
|
||||
{
|
||||
"name": "Eric Anderson",
|
||||
"githubUsername": "ericanderson",
|
||||
"url": "https://github.com/ericanderson"
|
||||
},
|
||||
{
|
||||
"name": "Dovydas Navickas",
|
||||
"githubUsername": "DovydasNavickas",
|
||||
"url": "https://github.com/DovydasNavickas"
|
||||
},
|
||||
{
|
||||
"name": "Josh Rutherford",
|
||||
"githubUsername": "theruther4d",
|
||||
"url": "https://github.com/theruther4d"
|
||||
},
|
||||
{
|
||||
"name": "Guilherme Hübner",
|
||||
"githubUsername": "guilhermehubner",
|
||||
"url": "https://github.com/guilhermehubner"
|
||||
},
|
||||
{
|
||||
"name": "Ferdy Budhidharma",
|
||||
"githubUsername": "ferdaber",
|
||||
"url": "https://github.com/ferdaber"
|
||||
},
|
||||
{
|
||||
"name": "Johann Rakotoharisoa",
|
||||
"githubUsername": "jrakotoharisoa",
|
||||
"url": "https://github.com/jrakotoharisoa"
|
||||
},
|
||||
{
|
||||
"name": "Olivier Pascal",
|
||||
"githubUsername": "pascaloliv",
|
||||
"url": "https://github.com/pascaloliv"
|
||||
},
|
||||
{
|
||||
"name": "Martin Hochel",
|
||||
"githubUsername": "hotell",
|
||||
"url": "https://github.com/hotell"
|
||||
},
|
||||
{
|
||||
"name": "Frank Li",
|
||||
"githubUsername": "franklixuefei",
|
||||
"url": "https://github.com/franklixuefei"
|
||||
},
|
||||
{
|
||||
"name": "Jessica Franco",
|
||||
"githubUsername": "Jessidhia",
|
||||
"url": "https://github.com/Jessidhia"
|
||||
},
|
||||
{
|
||||
"name": "Saransh Kataria",
|
||||
"githubUsername": "saranshkataria",
|
||||
"url": "https://github.com/saranshkataria"
|
||||
},
|
||||
{
|
||||
"name": "Kanitkorn Sujautra",
|
||||
"githubUsername": "lukyth",
|
||||
"url": "https://github.com/lukyth"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Silbermann",
|
||||
"githubUsername": "eps1lon",
|
||||
"url": "https://github.com/eps1lon"
|
||||
},
|
||||
{
|
||||
"name": "Kyle Scully",
|
||||
"githubUsername": "zieka",
|
||||
"url": "https://github.com/zieka"
|
||||
},
|
||||
{
|
||||
"name": "Cong Zhang",
|
||||
"githubUsername": "dancerphil",
|
||||
"url": "https://github.com/dancerphil"
|
||||
},
|
||||
{
|
||||
"name": "Dimitri Mitropoulos",
|
||||
"githubUsername": "dimitropoulos",
|
||||
"url": "https://github.com/dimitropoulos"
|
||||
},
|
||||
{
|
||||
"name": "JongChan Choi",
|
||||
"githubUsername": "disjukr",
|
||||
"url": "https://github.com/disjukr"
|
||||
},
|
||||
{
|
||||
"name": "Victor Magalhães",
|
||||
"githubUsername": "vhfmag",
|
||||
"url": "https://github.com/vhfmag"
|
||||
},
|
||||
{
|
||||
"name": "Dale Tan",
|
||||
"githubUsername": "hellatan",
|
||||
"url": "https://github.com/hellatan"
|
||||
},
|
||||
{
|
||||
"name": "Priyanshu Rav",
|
||||
"githubUsername": "priyanshurav",
|
||||
"url": "https://github.com/priyanshurav"
|
||||
},
|
||||
{
|
||||
"name": "Dmitry Semigradsky",
|
||||
"githubUsername": "Semigradsky",
|
||||
"url": "https://github.com/Semigradsky"
|
||||
},
|
||||
{
|
||||
"name": "Matt Pocock",
|
||||
"githubUsername": "mattpocock",
|
||||
"url": "https://github.com/mattpocock"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"typesVersions": {
|
||||
"<=5.0": {
|
||||
"*": [
|
||||
"ts5.0/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/index.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./index.d.ts"
|
||||
}
|
||||
},
|
||||
"./canary": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/canary.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./canary.d.ts"
|
||||
}
|
||||
},
|
||||
"./experimental": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/experimental.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./experimental.d.ts"
|
||||
}
|
||||
},
|
||||
"./jsx-runtime": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/jsx-runtime.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./jsx-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./jsx-dev-runtime": {
|
||||
"types@<=5.0": {
|
||||
"default": "./ts5.0/jsx-dev-runtime.d.ts"
|
||||
},
|
||||
"types": {
|
||||
"default": "./jsx-dev-runtime.d.ts"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/react"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/prop-types": "*",
|
||||
"csstype": "^3.0.2"
|
||||
},
|
||||
"typesPublisherContentHash": "9fb5bfea6e75766d22ab76ce27297701d372335892b8ce75ad990b3103e2155c",
|
||||
"typeScriptVersion": "4.7"
|
||||
}
|
127
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
127
node_modules/@types/react/ts5.0/canary.d.ts
generated
vendored
|
@ -1,127 +0,0 @@
|
|||
/**
|
||||
* These are types for things that are present in the React `canary` release channel.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/canary"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/canary'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/canary" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/main/packages/react/src/React.js to see how the exports are declared,
|
||||
|
||||
import React = require(".");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
interface ThenableImpl<T> {
|
||||
then(onFulfill: (value: T) => unknown, onReject: (error: unknown) => unknown): void | PromiseLike<unknown>;
|
||||
}
|
||||
interface UntrackedThenable<T> extends ThenableImpl<T> {
|
||||
status?: void;
|
||||
}
|
||||
|
||||
export interface PendingThenable<T> extends ThenableImpl<T> {
|
||||
status: "pending";
|
||||
}
|
||||
|
||||
export interface FulfilledThenable<T> extends ThenableImpl<T> {
|
||||
status: "fulfilled";
|
||||
value: T;
|
||||
}
|
||||
|
||||
export interface RejectedThenable<T> extends ThenableImpl<T> {
|
||||
status: "rejected";
|
||||
reason: unknown;
|
||||
}
|
||||
|
||||
export type Thenable<T> = UntrackedThenable<T> | PendingThenable<T> | FulfilledThenable<T> | RejectedThenable<T>;
|
||||
|
||||
export type Usable<T> = Thenable<T> | Context<T>;
|
||||
|
||||
export function use<T>(usable: Usable<T>): T;
|
||||
|
||||
interface ServerContextJSONArray extends ReadonlyArray<ServerContextJSONValue> {}
|
||||
export type ServerContextJSONValue =
|
||||
| string
|
||||
| boolean
|
||||
| number
|
||||
| null
|
||||
| ServerContextJSONArray
|
||||
| { [key: string]: ServerContextJSONValue };
|
||||
export interface ServerContext<T extends ServerContextJSONValue> {
|
||||
Provider: Provider<T>;
|
||||
}
|
||||
/**
|
||||
* Accepts a context object (the value returned from `React.createContext` or `React.createServerContext`) and returns the current
|
||||
* context value, as given by the nearest context provider for the given context.
|
||||
*
|
||||
* @version 16.8.0
|
||||
* @see https://react.dev/reference/react/useContext
|
||||
*/
|
||||
function useContext<T extends ServerContextJSONValue>(context: ServerContext<T>): T;
|
||||
export function createServerContext<T extends ServerContextJSONValue>(
|
||||
globalName: string,
|
||||
defaultValue: T,
|
||||
): ServerContext<T>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function cache<CachedFunction extends Function>(fn: CachedFunction): CachedFunction;
|
||||
|
||||
export function unstable_useCacheRefresh(): () => void;
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {
|
||||
functions: (formData: FormData) => void;
|
||||
}
|
||||
|
||||
export interface TransitionStartFunction {
|
||||
/**
|
||||
* Marks all state updates inside the async function as transitions
|
||||
*
|
||||
* @see {https://react.dev/reference/react/useTransition#starttransition}
|
||||
*
|
||||
* @param callback
|
||||
*/
|
||||
(callback: () => Promise<VoidOrUndefinedOnly>): void;
|
||||
}
|
||||
|
||||
export function useOptimistic<State>(
|
||||
passthrough: State,
|
||||
): [State, (action: State | ((pendingState: State) => State)) => void];
|
||||
export function useOptimistic<State, Action>(
|
||||
passthrough: State,
|
||||
reducer: (state: State, action: Action) => State,
|
||||
): [State, (action: Action) => void];
|
||||
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES {
|
||||
cleanup: () => VoidOrUndefinedOnly;
|
||||
}
|
||||
|
||||
export function useActionState<State>(
|
||||
action: (state: Awaited<State>) => State | Promise<State>,
|
||||
initialState: Awaited<State>,
|
||||
permalink?: string,
|
||||
): [state: Awaited<State>, dispatch: () => void, isPending: boolean];
|
||||
export function useActionState<State, Payload>(
|
||||
action: (state: Awaited<State>, payload: Payload) => State | Promise<State>,
|
||||
initialState: Awaited<State>,
|
||||
permalink?: string,
|
||||
): [state: Awaited<State>, dispatch: (payload: Payload) => void, isPending: boolean];
|
||||
}
|
145
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
145
node_modules/@types/react/ts5.0/experimental.d.ts
generated
vendored
|
@ -1,145 +0,0 @@
|
|||
/**
|
||||
* These are types for things that are present in the `experimental` builds of React but not yet
|
||||
* on a stable build.
|
||||
*
|
||||
* Once they are promoted to stable they can just be moved to the main index file.
|
||||
*
|
||||
* To load the types declared here in an actual project, there are three ways. The easiest one,
|
||||
* if your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
|
||||
* is to add `"react/experimental"` to the `"types"` array.
|
||||
*
|
||||
* Alternatively, a specific import syntax can to be used from a typescript file.
|
||||
* This module does not exist in reality, which is why the {} is important:
|
||||
*
|
||||
* ```ts
|
||||
* import {} from 'react/experimental'
|
||||
* ```
|
||||
*
|
||||
* It is also possible to include it through a triple-slash reference:
|
||||
*
|
||||
* ```ts
|
||||
* /// <reference types="react/experimental" />
|
||||
* ```
|
||||
*
|
||||
* Either the import or the reference only needs to appear once, anywhere in the project.
|
||||
*/
|
||||
|
||||
// See https://github.com/facebook/react/blob/master/packages/react/src/React.js to see how the exports are declared,
|
||||
// and https://github.com/facebook/react/blob/master/packages/shared/ReactFeatureFlags.js to verify which APIs are
|
||||
// flagged experimental or not. Experimental APIs will be tagged with `__EXPERIMENTAL__`.
|
||||
//
|
||||
// For the inputs of types exported as simply a fiber tag, the `beginWork` function of ReactFiberBeginWork.js
|
||||
// is a good place to start looking for details; it generally calls prop validation functions or delegates
|
||||
// all tasks done as part of the render phase (the concurrent part of the React update cycle).
|
||||
//
|
||||
// Suspense-related handling can be found in ReactFiberThrow.js.
|
||||
|
||||
import React = require("./canary");
|
||||
|
||||
export {};
|
||||
|
||||
declare const UNDEFINED_VOID_ONLY: unique symbol;
|
||||
type VoidOrUndefinedOnly = void | { [UNDEFINED_VOID_ONLY]: never };
|
||||
|
||||
declare module "." {
|
||||
/**
|
||||
* @internal Use `Awaited<ReactNode>` instead
|
||||
*/
|
||||
// Helper type to enable `Awaited<ReactNode>`.
|
||||
// Must be a copy of the non-thenables of `ReactNode`.
|
||||
type AwaitedReactNode =
|
||||
| ReactElement
|
||||
| string
|
||||
| number
|
||||
| Iterable<AwaitedReactNode>
|
||||
| ReactPortal
|
||||
| boolean
|
||||
| null
|
||||
| undefined;
|
||||
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {
|
||||
promises: Promise<AwaitedReactNode>;
|
||||
}
|
||||
|
||||
export interface SuspenseProps {
|
||||
/**
|
||||
* The presence of this prop indicates that the content is computationally expensive to render.
|
||||
* In other words, the tree is CPU bound and not I/O bound (e.g. due to fetching data).
|
||||
* @see {@link https://github.com/facebook/react/pull/19936}
|
||||
*/
|
||||
unstable_expectedLoadTime?: number | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListRevealOrder = "forwards" | "backwards" | "together";
|
||||
export type SuspenseListTailMode = "collapsed" | "hidden";
|
||||
|
||||
export interface SuspenseListCommonProps {
|
||||
/**
|
||||
* Note that SuspenseList require more than one child;
|
||||
* it is a runtime warning to provide only a single child.
|
||||
*
|
||||
* It does, however, allow those children to be wrapped inside a single
|
||||
* level of `<React.Fragment>`.
|
||||
*/
|
||||
children: ReactElement | Iterable<ReactElement>;
|
||||
}
|
||||
|
||||
interface DirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder: "forwards" | "backwards";
|
||||
/**
|
||||
* Dictates how unloaded items in a SuspenseList is shown.
|
||||
*
|
||||
* - By default, `SuspenseList` will show all fallbacks in the list.
|
||||
* - `collapsed` shows only the next fallback in the list.
|
||||
* - `hidden` doesn’t show any unloaded items.
|
||||
*/
|
||||
tail?: SuspenseListTailMode | undefined;
|
||||
}
|
||||
|
||||
interface NonDirectionalSuspenseListProps extends SuspenseListCommonProps {
|
||||
/**
|
||||
* Defines the order in which the `SuspenseList` children should be revealed.
|
||||
*/
|
||||
revealOrder?: Exclude<SuspenseListRevealOrder, DirectionalSuspenseListProps["revealOrder"]> | undefined;
|
||||
/**
|
||||
* The tail property is invalid when not using the `forwards` or `backwards` reveal orders.
|
||||
*/
|
||||
tail?: never | undefined;
|
||||
}
|
||||
|
||||
export type SuspenseListProps = DirectionalSuspenseListProps | NonDirectionalSuspenseListProps;
|
||||
|
||||
/**
|
||||
* `SuspenseList` helps coordinate many components that can suspend by orchestrating the order
|
||||
* in which these components are revealed to the user.
|
||||
*
|
||||
* When multiple components need to fetch data, this data may arrive in an unpredictable order.
|
||||
* However, if you wrap these items in a `SuspenseList`, React will not show an item in the list
|
||||
* until previous items have been displayed (this behavior is adjustable).
|
||||
*
|
||||
* @see https://reactjs.org/docs/concurrent-mode-reference.html#suspenselist
|
||||
* @see https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist
|
||||
*/
|
||||
export const unstable_SuspenseList: ExoticComponent<SuspenseListProps>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export function experimental_useEffectEvent<T extends Function>(event: T): T;
|
||||
|
||||
type Reference = object;
|
||||
type TaintableUniqueValue = string | bigint | ArrayBufferView;
|
||||
function experimental_taintUniqueValue(
|
||||
message: string | undefined,
|
||||
lifetime: Reference,
|
||||
value: TaintableUniqueValue,
|
||||
): void;
|
||||
function experimental_taintObjectReference(message: string | undefined, object: Reference): void;
|
||||
|
||||
export interface HTMLAttributes<T> {
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert
|
||||
*/
|
||||
inert?: boolean | undefined;
|
||||
}
|
||||
}
|
159
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
159
node_modules/@types/react/ts5.0/global.d.ts
generated
vendored
|
@ -1,159 +0,0 @@
|
|||
/*
|
||||
React projects that don't include the DOM library need these interfaces to compile.
|
||||
React Native applications use React, but there is no DOM available. The JavaScript runtime
|
||||
is ES6/ES2015 only. These definitions allow such projects to compile with only `--lib ES6`.
|
||||
|
||||
Warning: all of these interfaces are empty. If you want type definitions for various properties
|
||||
(such as HTMLInputElement.prototype.value), you need to add `--lib DOM` (via command line or tsconfig.json).
|
||||
*/
|
||||
|
||||
interface Event {}
|
||||
interface AnimationEvent extends Event {}
|
||||
interface ClipboardEvent extends Event {}
|
||||
interface CompositionEvent extends Event {}
|
||||
interface DragEvent extends Event {}
|
||||
interface FocusEvent extends Event {}
|
||||
interface KeyboardEvent extends Event {}
|
||||
interface MouseEvent extends Event {}
|
||||
interface TouchEvent extends Event {}
|
||||
interface PointerEvent extends Event {}
|
||||
interface TransitionEvent extends Event {}
|
||||
interface UIEvent extends Event {}
|
||||
interface WheelEvent extends Event {}
|
||||
|
||||
interface EventTarget {}
|
||||
interface Document {}
|
||||
interface DataTransfer {}
|
||||
interface StyleMedia {}
|
||||
|
||||
interface Element {}
|
||||
interface DocumentFragment {}
|
||||
|
||||
interface HTMLElement extends Element {}
|
||||
interface HTMLAnchorElement extends HTMLElement {}
|
||||
interface HTMLAreaElement extends HTMLElement {}
|
||||
interface HTMLAudioElement extends HTMLElement {}
|
||||
interface HTMLBaseElement extends HTMLElement {}
|
||||
interface HTMLBodyElement extends HTMLElement {}
|
||||
interface HTMLBRElement extends HTMLElement {}
|
||||
interface HTMLButtonElement extends HTMLElement {}
|
||||
interface HTMLCanvasElement extends HTMLElement {}
|
||||
interface HTMLDataElement extends HTMLElement {}
|
||||
interface HTMLDataListElement extends HTMLElement {}
|
||||
interface HTMLDetailsElement extends HTMLElement {}
|
||||
interface HTMLDialogElement extends HTMLElement {}
|
||||
interface HTMLDivElement extends HTMLElement {}
|
||||
interface HTMLDListElement extends HTMLElement {}
|
||||
interface HTMLEmbedElement extends HTMLElement {}
|
||||
interface HTMLFieldSetElement extends HTMLElement {}
|
||||
interface HTMLFormElement extends HTMLElement {}
|
||||
interface HTMLHeadingElement extends HTMLElement {}
|
||||
interface HTMLHeadElement extends HTMLElement {}
|
||||
interface HTMLHRElement extends HTMLElement {}
|
||||
interface HTMLHtmlElement extends HTMLElement {}
|
||||
interface HTMLIFrameElement extends HTMLElement {}
|
||||
interface HTMLImageElement extends HTMLElement {}
|
||||
interface HTMLInputElement extends HTMLElement {}
|
||||
interface HTMLModElement extends HTMLElement {}
|
||||
interface HTMLLabelElement extends HTMLElement {}
|
||||
interface HTMLLegendElement extends HTMLElement {}
|
||||
interface HTMLLIElement extends HTMLElement {}
|
||||
interface HTMLLinkElement extends HTMLElement {}
|
||||
interface HTMLMapElement extends HTMLElement {}
|
||||
interface HTMLMetaElement extends HTMLElement {}
|
||||
interface HTMLMeterElement extends HTMLElement {}
|
||||
interface HTMLObjectElement extends HTMLElement {}
|
||||
interface HTMLOListElement extends HTMLElement {}
|
||||
interface HTMLOptGroupElement extends HTMLElement {}
|
||||
interface HTMLOptionElement extends HTMLElement {}
|
||||
interface HTMLOutputElement extends HTMLElement {}
|
||||
interface HTMLParagraphElement extends HTMLElement {}
|
||||
interface HTMLParamElement extends HTMLElement {}
|
||||
interface HTMLPreElement extends HTMLElement {}
|
||||
interface HTMLProgressElement extends HTMLElement {}
|
||||
interface HTMLQuoteElement extends HTMLElement {}
|
||||
interface HTMLSlotElement extends HTMLElement {}
|
||||
interface HTMLScriptElement extends HTMLElement {}
|
||||
interface HTMLSelectElement extends HTMLElement {}
|
||||
interface HTMLSourceElement extends HTMLElement {}
|
||||
interface HTMLSpanElement extends HTMLElement {}
|
||||
interface HTMLStyleElement extends HTMLElement {}
|
||||
interface HTMLTableElement extends HTMLElement {}
|
||||
interface HTMLTableColElement extends HTMLElement {}
|
||||
interface HTMLTableDataCellElement extends HTMLElement {}
|
||||
interface HTMLTableHeaderCellElement extends HTMLElement {}
|
||||
interface HTMLTableRowElement extends HTMLElement {}
|
||||
interface HTMLTableSectionElement extends HTMLElement {}
|
||||
interface HTMLTemplateElement extends HTMLElement {}
|
||||
interface HTMLTextAreaElement extends HTMLElement {}
|
||||
interface HTMLTimeElement extends HTMLElement {}
|
||||
interface HTMLTitleElement extends HTMLElement {}
|
||||
interface HTMLTrackElement extends HTMLElement {}
|
||||
interface HTMLUListElement extends HTMLElement {}
|
||||
interface HTMLVideoElement extends HTMLElement {}
|
||||
interface HTMLWebViewElement extends HTMLElement {}
|
||||
|
||||
interface SVGElement extends Element {}
|
||||
interface SVGSVGElement extends SVGElement {}
|
||||
interface SVGCircleElement extends SVGElement {}
|
||||
interface SVGClipPathElement extends SVGElement {}
|
||||
interface SVGDefsElement extends SVGElement {}
|
||||
interface SVGDescElement extends SVGElement {}
|
||||
interface SVGEllipseElement extends SVGElement {}
|
||||
interface SVGFEBlendElement extends SVGElement {}
|
||||
interface SVGFEColorMatrixElement extends SVGElement {}
|
||||
interface SVGFEComponentTransferElement extends SVGElement {}
|
||||
interface SVGFECompositeElement extends SVGElement {}
|
||||
interface SVGFEConvolveMatrixElement extends SVGElement {}
|
||||
interface SVGFEDiffuseLightingElement extends SVGElement {}
|
||||
interface SVGFEDisplacementMapElement extends SVGElement {}
|
||||
interface SVGFEDistantLightElement extends SVGElement {}
|
||||
interface SVGFEDropShadowElement extends SVGElement {}
|
||||
interface SVGFEFloodElement extends SVGElement {}
|
||||
interface SVGFEFuncAElement extends SVGElement {}
|
||||
interface SVGFEFuncBElement extends SVGElement {}
|
||||
interface SVGFEFuncGElement extends SVGElement {}
|
||||
interface SVGFEFuncRElement extends SVGElement {}
|
||||
interface SVGFEGaussianBlurElement extends SVGElement {}
|
||||
interface SVGFEImageElement extends SVGElement {}
|
||||
interface SVGFEMergeElement extends SVGElement {}
|
||||
interface SVGFEMergeNodeElement extends SVGElement {}
|
||||
interface SVGFEMorphologyElement extends SVGElement {}
|
||||
interface SVGFEOffsetElement extends SVGElement {}
|
||||
interface SVGFEPointLightElement extends SVGElement {}
|
||||
interface SVGFESpecularLightingElement extends SVGElement {}
|
||||
interface SVGFESpotLightElement extends SVGElement {}
|
||||
interface SVGFETileElement extends SVGElement {}
|
||||
interface SVGFETurbulenceElement extends SVGElement {}
|
||||
interface SVGFilterElement extends SVGElement {}
|
||||
interface SVGForeignObjectElement extends SVGElement {}
|
||||
interface SVGGElement extends SVGElement {}
|
||||
interface SVGImageElement extends SVGElement {}
|
||||
interface SVGLineElement extends SVGElement {}
|
||||
interface SVGLinearGradientElement extends SVGElement {}
|
||||
interface SVGMarkerElement extends SVGElement {}
|
||||
interface SVGMaskElement extends SVGElement {}
|
||||
interface SVGMetadataElement extends SVGElement {}
|
||||
interface SVGPathElement extends SVGElement {}
|
||||
interface SVGPatternElement extends SVGElement {}
|
||||
interface SVGPolygonElement extends SVGElement {}
|
||||
interface SVGPolylineElement extends SVGElement {}
|
||||
interface SVGRadialGradientElement extends SVGElement {}
|
||||
interface SVGRectElement extends SVGElement {}
|
||||
interface SVGSetElement extends SVGElement {}
|
||||
interface SVGStopElement extends SVGElement {}
|
||||
interface SVGSwitchElement extends SVGElement {}
|
||||
interface SVGSymbolElement extends SVGElement {}
|
||||
interface SVGTextElement extends SVGElement {}
|
||||
interface SVGTextPathElement extends SVGElement {}
|
||||
interface SVGTSpanElement extends SVGElement {}
|
||||
interface SVGUseElement extends SVGElement {}
|
||||
interface SVGViewElement extends SVGElement {}
|
||||
|
||||
interface FormData {}
|
||||
interface Text {}
|
||||
interface TouchList {}
|
||||
interface WebGLRenderingContext {}
|
||||
interface WebGL2RenderingContext {}
|
||||
|
||||
interface TrustedHTML {}
|
4471
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
4471
node_modules/@types/react/ts5.0/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load diff
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
44
node_modules/@types/react/ts5.0/jsx-dev-runtime.d.ts
generated
vendored
|
@ -1,44 +0,0 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
export interface JSXSource {
|
||||
/**
|
||||
* The source file where the element originates from.
|
||||
*/
|
||||
fileName?: string | undefined;
|
||||
|
||||
/**
|
||||
* The line number where the element was created.
|
||||
*/
|
||||
lineNumber?: number | undefined;
|
||||
|
||||
/**
|
||||
* The column number where the element was created.
|
||||
*/
|
||||
columnNumber?: number | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxDEV(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key: React.Key | undefined,
|
||||
isStatic: boolean,
|
||||
source?: JSXSource,
|
||||
self?: unknown,
|
||||
): React.ReactElement;
|
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
35
node_modules/@types/react/ts5.0/jsx-runtime.d.ts
generated
vendored
|
@ -1,35 +0,0 @@
|
|||
import * as React from "./";
|
||||
export { Fragment } from "./";
|
||||
|
||||
export namespace JSX {
|
||||
interface Element extends React.JSX.Element {}
|
||||
interface ElementClass extends React.JSX.ElementClass {}
|
||||
interface ElementAttributesProperty extends React.JSX.ElementAttributesProperty {}
|
||||
interface ElementChildrenAttribute extends React.JSX.ElementChildrenAttribute {}
|
||||
type LibraryManagedAttributes<C, P> = React.JSX.LibraryManagedAttributes<C, P>;
|
||||
interface IntrinsicAttributes extends React.JSX.IntrinsicAttributes {}
|
||||
interface IntrinsicClassAttributes<T> extends React.JSX.IntrinsicClassAttributes<T> {}
|
||||
interface IntrinsicElements extends React.JSX.IntrinsicElements {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsx(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
||||
|
||||
/**
|
||||
* Create a React element.
|
||||
*
|
||||
* You should not use this function directly. Use JSX and a transpiler instead.
|
||||
*/
|
||||
export function jsxs(
|
||||
type: React.ElementType,
|
||||
props: unknown,
|
||||
key?: React.Key,
|
||||
): React.ReactElement;
|
33
node_modules/copy-to-clipboard/.travis.yml
generated
vendored
33
node_modules/copy-to-clipboard/.travis.yml
generated
vendored
|
@ -1,33 +0,0 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "4.2"
|
||||
|
||||
env:
|
||||
- E2E_BROWSER_VENDOR="internet explorer" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="internet explorer" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="MicrosoftEdge" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest-1"
|
||||
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest-1"
|
||||
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 8.1" E2E_BROWSER_VERSION="latest-1"
|
||||
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="Windows 10" E2E_BROWSER_VERSION="latest-1"
|
||||
# TODO: add workaround for chromedriver issue
|
||||
# - E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest"
|
||||
# - E2E_BROWSER_VENDOR="chrome" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest-1"
|
||||
# TODO: look into execCommand(“copy”) support in Safari
|
||||
# window.document.queryCommandSupported('copy') - false in 9.1.1
|
||||
# - E2E_BROWSER_VENDOR="safari" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest"
|
||||
- E2E_BROWSER_VENDOR="firefox" E2E_PLATFORM="OS X 10.11" E2E_BROWSER_VERSION="latest-1"
|
||||
|
||||
addons:
|
||||
sauce_connect:
|
||||
username: "sudodoki"
|
||||
access_key:
|
||||
secure: "MBHn7+lxuJ0uNuFC8HjIZtosuOHICNW52fEhvtnJhXmaGOUXGLrQFUCvECJOoGrdOWmkiFaGgYINdF57HbYpyAICmv51UBlzHYftkTspYooH5+vni0ezPPpvxqNpUM/dlwfrdzC/ag97VYDeIxdYRKREwhRsNd5npE0Zrx1xmvzmnpdqdVhQ7Z/wQUDjv7talKC2fkaIYP+wEhVblnr18u0phFLqyADNsCV7D9QmILQWC4ieSz6ylTW9fb69B4rZElLj+D8qGvyvgmLnu+dK4Vlh0WuTdmVZ8TZS4OeBRIbjq/Mi2vMVuQLXz3DTiGWRZeDOBB5PYm/orgjgsnNg5hPx6t7yc4ypcBYf2gHxc31lV9VZRb10py33D8qPtcmPptwIWlsCQ4ANDyOwxck0FejMpjT+Ktkyme4nAvt9op289x8KKI0w8W7nHIB930lEookJCeMHWjyycPLJDTwYe60zBS24vNRF46ixhfpeO1zGw8nEj5qqSoEltunCOQ3Uvl25tNEuk9R649TyWbegjTuS4txqAsSjUnVMGvRBcZef4YyOQsggos1YbJMNnFSvDH9VaPYiJbg/qR7tb0YJ8gtAC9/6iqba6EZadkJQe9DHs6qu5zuoiwfSgBZTON2oWL6AGwySADm44SL7ikKJN8Zb8bLjQ1o15KinBVKLuOk="
|
||||
|
||||
script:
|
||||
- REMOTE_SELENIUM=true npm test -- -e saucelabs
|
21
node_modules/copy-to-clipboard/LICENSE
generated
vendored
21
node_modules/copy-to-clipboard/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017 sudodoki <smd.deluzion@gmail.com>
|
||||
|
||||
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.
|
74
node_modules/copy-to-clipboard/README.md
generated
vendored
74
node_modules/copy-to-clipboard/README.md
generated
vendored
|
@ -1,74 +0,0 @@
|
|||
# Copy to clipboard [](https://travis-ci.org/sudodoki/copy-to-clipboard)
|
||||
|
||||
Simple module exposing `copy` function that will try to use [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#) with fallback to IE-specific `clipboardData` interface and finally, resort to usual `prompt` with proper text content and message.
|
||||
|
||||
> If you are building using [Electron](http://electronjs.org/), use [their API](https://www.electronjs.org/docs/api/clipboard).
|
||||
|
||||
# Example
|
||||
|
||||
```js
|
||||
import copy from 'copy-to-clipboard';
|
||||
|
||||
copy('Text');
|
||||
|
||||
// Copy with options
|
||||
copy('Text', {
|
||||
debug: true,
|
||||
message: 'Press #{key} to copy',
|
||||
});
|
||||
```
|
||||
|
||||
# API
|
||||
|
||||
`copy(text: string, options: object): boolean` — tries to copy text to clipboard. Returns `true` if no additional keystrokes were required from user (so, `execCommand`, IE's `clipboardData` worked) or `false`.
|
||||
|
||||
|Value |Default |Notes|
|
||||
|------|--------|-----|
|
||||
|options.debug |false| `Boolean`. Optional. Enable output to console. |
|
||||
|options.message|Copy to clipboard: `#{key}`, Enter| `String`. Optional. Prompt message. `*` |
|
||||
|options.format|"text/html"| `String`. Optional. Set the MIME type of what you want to copy as. Use `text/html` to copy as HTML, `text/plain` to avoid inherited styles showing when pasted into rich text editor. |
|
||||
|options.onCopy|null| `function onCopy(clipboardData: object): void`. Optional. Receives the clipboardData element for adding custom behavior such as additional formats |
|
||||
|
||||
`*` all occurrences of `#{key}` are replaced with `⌘+C` for macOS/iOS users, and `Ctrl+C` otherwise.
|
||||
|
||||
# [Browser support](http://caniuse.com/#feat=document-execcommand)
|
||||
|
||||
Works everywhere where `prompt`* is available. Works best (i.e. without additional keystrokes) in Chrome, FF, Safari 10+, and, supposedly, IE/Edge.
|
||||
|
||||
Note: **does not work on some older iOS devices.**
|
||||
`*` – even though **Safari 8** has `prompt`, you cannot specify prefilled content for prompt modal – thus it **doesn't work** as expected.
|
||||
|
||||
# Installation
|
||||
|
||||
+ Can be used as npm package and then leveraged using commonjs bundler/loader:
|
||||
```
|
||||
npm i --save copy-to-clipboard
|
||||
```
|
||||
+ Can be utilized using [wzrd.in](https://wzrd.in/). Add following script to your page:
|
||||
```html
|
||||
<script src="https://wzrd.in/standalone/copy-to-clipboard@latest" async></script>
|
||||
```
|
||||
You will have `window.copyToClipboard` exposed for you to use.
|
||||
|
||||
# UI components based on this package:
|
||||
+ [react-copy-to-clipboard](https://github.com/nkbt/react-copy-to-clipboard)
|
||||
+ [copy-button](https://github.com/sudodoki/copy-button)
|
||||
|
||||
# See also:
|
||||
+ [clipboard-copy](https://github.com/feross/clipboard-copy) by [@feross](https://github.com/feross)
|
||||
+ [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#Browser_Compatibility)
|
||||
+ [April 2015 update on Cut and Copy Commands](http://updates.html5rocks.com/2015/04/cut-and-copy-commands)
|
||||
|
||||
# Running Tests
|
||||
This project has some automated tests, that will run using [nightwatch](nightwatchjs.org) on top of [selenium](http://www.seleniumhq.org/).
|
||||
|
||||
```
|
||||
npm i
|
||||
npm test
|
||||
```
|
||||
# Typescript
|
||||
This library has built-in Typescript definitions.
|
||||
|
||||
```
|
||||
import * as copy from 'copy-to-clipboard';
|
||||
```
|
35
node_modules/copy-to-clipboard/example/example.css
generated
vendored
35
node_modules/copy-to-clipboard/example/example.css
generated
vendored
|
@ -1,35 +0,0 @@
|
|||
html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, dl,
|
||||
dt, dd, blockquote, address {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.container {
|
||||
overflow: hidden;
|
||||
}
|
||||
.half:first-child {
|
||||
padding-left: 20px;
|
||||
}
|
||||
.half:last-child {
|
||||
padding-right: 20px;
|
||||
}
|
||||
@media screen and (max-width: 568px) {
|
||||
.half {
|
||||
width: 100% !important;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.half {
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding: 10px;
|
||||
}
|
||||
.code {
|
||||
font-size: 18px;
|
||||
min-height: 150px;
|
||||
}
|
1
node_modules/copy-to-clipboard/example/index.js
generated
vendored
1
node_modules/copy-to-clipboard/example/index.js
generated
vendored
|
@ -1 +0,0 @@
|
|||
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).copyToClipboard=e()}(function(){return function n(r,a,c){function i(t,e){if(!a[t]){if(!r[t]){var o="function"==typeof require&&require;if(!e&&o)return o(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}o=a[t]={exports:{}},r[t][0].call(o.exports,function(e){return i(r[t][1][e]||e)},o,o.exports,n,r,a,c)}return a[t].exports}for(var l="function"==typeof require&&require,e=0;e<c.length;e++)i(c[e]);return i}({1:[function(e,t,o){"use strict";var d=e("toggle-selection"),f={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(o,n){var t,e,r,a,c=!1,i=(n=n||{}).debug||!1;try{var l=d(),s=document.createRange(),u=document.getSelection();if((e=document.createElement("span")).textContent=o,e.ariaHidden="true",e.style.all="unset",e.style.position="fixed",e.style.top=0,e.style.clip="rect(0, 0, 0, 0)",e.style.whiteSpace="pre",e.style.webkitUserSelect="text",e.style.MozUserSelect="text",e.style.msUserSelect="text",e.style.userSelect="text",e.addEventListener("copy",function(e){var t;e.stopPropagation(),n.format&&(e.preventDefault(),void 0===e.clipboardData?(i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),t=f[n.format]||f.default,window.clipboardData.setData(t,o)):(e.clipboardData.clearData(),e.clipboardData.setData(n.format,o))),n.onCopy&&(e.preventDefault(),n.onCopy(e.clipboardData))}),document.body.appendChild(e),s.selectNodeContents(e),u.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(e){i&&console.error("unable to copy using execCommand: ",e),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",o),n.onCopy&&n.onCopy(window.clipboardData),c=!0}catch(e){i&&console.error("unable to copy using clipboardData: ",e),i&&console.error("falling back to prompt"),r="message"in n?n.message:"Copy to clipboard: #{key}, Enter",a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",t=r.replace(/#{\s*key\s*}/g,a),window.prompt(t,o)}}finally{u&&("function"==typeof u.removeRange?u.removeRange(s):u.removeAllRanges()),e&&document.body.removeChild(e),l()}return c}},{"toggle-selection":2}],2:[function(e,t,o){t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,o=[],n=0;n<t.rangeCount;n++)o.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||o.forEach(function(e){t.addRange(e)}),e&&e.focus()}}},{}]},{},[1])(1)});
|
14
node_modules/copy-to-clipboard/index.d.ts
generated
vendored
14
node_modules/copy-to-clipboard/index.d.ts
generated
vendored
|
@ -1,14 +0,0 @@
|
|||
// Type definitions for copy-to-clipboard 3.0
|
||||
// Project: https://github.com/sudodoki/copy-to-clipboard
|
||||
// Definitions by: Denis Carriere <https://github.com/DenisCarriere>, MartynasZilinskas <https://github.com/MartynasZilinskas>
|
||||
|
||||
interface Options {
|
||||
debug?: boolean;
|
||||
message?: string;
|
||||
format?: string; // MIME type
|
||||
onCopy?: (clipboardData: object) => void;
|
||||
}
|
||||
|
||||
declare function copy(text: string, options?: Options): boolean;
|
||||
declare namespace copy { }
|
||||
export = copy;
|
115
node_modules/copy-to-clipboard/index.js
generated
vendored
115
node_modules/copy-to-clipboard/index.js
generated
vendored
|
@ -1,115 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var deselectCurrent = require("toggle-selection");
|
||||
|
||||
var clipboardToIE11Formatting = {
|
||||
"text/plain": "Text",
|
||||
"text/html": "Url",
|
||||
"default": "Text"
|
||||
}
|
||||
|
||||
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
||||
|
||||
function format(message) {
|
||||
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
||||
return message.replace(/#{\s*key\s*}/g, copyKey);
|
||||
}
|
||||
|
||||
function copy(text, options) {
|
||||
var debug,
|
||||
message,
|
||||
reselectPrevious,
|
||||
range,
|
||||
selection,
|
||||
mark,
|
||||
success = false;
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
debug = options.debug || false;
|
||||
try {
|
||||
reselectPrevious = deselectCurrent();
|
||||
|
||||
range = document.createRange();
|
||||
selection = document.getSelection();
|
||||
|
||||
mark = document.createElement("span");
|
||||
mark.textContent = text;
|
||||
// avoid screen readers from reading out loud the text
|
||||
mark.ariaHidden = "true"
|
||||
// reset user styles for span element
|
||||
mark.style.all = "unset";
|
||||
// prevents scrolling to the end of the page
|
||||
mark.style.position = "fixed";
|
||||
mark.style.top = 0;
|
||||
mark.style.clip = "rect(0, 0, 0, 0)";
|
||||
// used to preserve spaces and line breaks
|
||||
mark.style.whiteSpace = "pre";
|
||||
// do not inherit user-select (it may be `none`)
|
||||
mark.style.webkitUserSelect = "text";
|
||||
mark.style.MozUserSelect = "text";
|
||||
mark.style.msUserSelect = "text";
|
||||
mark.style.userSelect = "text";
|
||||
mark.addEventListener("copy", function(e) {
|
||||
e.stopPropagation();
|
||||
if (options.format) {
|
||||
e.preventDefault();
|
||||
if (typeof e.clipboardData === "undefined") { // IE 11
|
||||
debug && console.warn("unable to use e.clipboardData");
|
||||
debug && console.warn("trying IE specific stuff");
|
||||
window.clipboardData.clearData();
|
||||
var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
|
||||
window.clipboardData.setData(format, text);
|
||||
} else { // all other browsers
|
||||
e.clipboardData.clearData();
|
||||
e.clipboardData.setData(options.format, text);
|
||||
}
|
||||
}
|
||||
if (options.onCopy) {
|
||||
e.preventDefault();
|
||||
options.onCopy(e.clipboardData);
|
||||
}
|
||||
});
|
||||
|
||||
document.body.appendChild(mark);
|
||||
|
||||
range.selectNodeContents(mark);
|
||||
selection.addRange(range);
|
||||
|
||||
var successful = document.execCommand("copy");
|
||||
if (!successful) {
|
||||
throw new Error("copy command was unsuccessful");
|
||||
}
|
||||
success = true;
|
||||
} catch (err) {
|
||||
debug && console.error("unable to copy using execCommand: ", err);
|
||||
debug && console.warn("trying IE specific stuff");
|
||||
try {
|
||||
window.clipboardData.setData(options.format || "text", text);
|
||||
options.onCopy && options.onCopy(window.clipboardData);
|
||||
success = true;
|
||||
} catch (err) {
|
||||
debug && console.error("unable to copy using clipboardData: ", err);
|
||||
debug && console.error("falling back to prompt");
|
||||
message = format("message" in options ? options.message : defaultMessage);
|
||||
window.prompt(message, text);
|
||||
}
|
||||
} finally {
|
||||
if (selection) {
|
||||
if (typeof selection.removeRange == "function") {
|
||||
selection.removeRange(range);
|
||||
} else {
|
||||
selection.removeAllRanges();
|
||||
}
|
||||
}
|
||||
|
||||
if (mark) {
|
||||
document.body.removeChild(mark);
|
||||
}
|
||||
reselectPrevious();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
module.exports = copy;
|
43
node_modules/copy-to-clipboard/package.json
generated
vendored
43
node_modules/copy-to-clipboard/package.json
generated
vendored
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"name": "copy-to-clipboard",
|
||||
"version": "3.3.3",
|
||||
"description": "Copy stuff into clipboard using JS with fallbacks",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"scripts": {
|
||||
"pretest": "browserify ./index.js --standalone copyToClipboard | uglifyjs -cm > example/index.js",
|
||||
"test": "nightwatch"
|
||||
},
|
||||
"keywords": [
|
||||
"clipboard",
|
||||
"copy",
|
||||
"browser"
|
||||
],
|
||||
"author": "sudodoki <smd.deluzion@gmail.com>",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sudodoki/copy-to-clipboard"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Aleksej Shvajka",
|
||||
"url": "https://github.com/shvaikalesh"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"toggle-selection": "^1.0.6"
|
||||
},
|
||||
"directories": {
|
||||
"example": "example"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^13.0.1",
|
||||
"minimist": "^1.2.6",
|
||||
"nightwatch": "^2.3.0",
|
||||
"@brettz9/node-static": "^0.1.1",
|
||||
"optimist": "^0.5.2",
|
||||
"selenium-server-standalone-jar": "2.53.0",
|
||||
"uglify-js": "^3.5.3"
|
||||
}
|
||||
}
|
19
node_modules/csstype/LICENSE
generated
vendored
19
node_modules/csstype/LICENSE
generated
vendored
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2017-2018 Fredrik Nicol
|
||||
|
||||
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.
|
277
node_modules/csstype/README.md
generated
vendored
277
node_modules/csstype/README.md
generated
vendored
|
@ -1,277 +0,0 @@
|
|||
# CSSType
|
||||
|
||||
[](https://www.npmjs.com/package/csstype)
|
||||
|
||||
TypeScript and Flow definitions for CSS, generated by [data from MDN](https://github.com/mdn/data). It provides autocompletion and type checking for CSS properties and values.
|
||||
|
||||
**TypeScript**
|
||||
|
||||
```ts
|
||||
import type * as CSS from 'csstype';
|
||||
|
||||
const style: CSS.Properties = {
|
||||
colour: 'white', // Type error on property
|
||||
textAlign: 'middle', // Type error on value
|
||||
};
|
||||
```
|
||||
|
||||
**Flow**
|
||||
|
||||
```js
|
||||
// @flow strict
|
||||
import * as CSS from 'csstype';
|
||||
|
||||
const style: CSS.Properties<> = {
|
||||
colour: 'white', // Type error on property
|
||||
textAlign: 'middle', // Type error on value
|
||||
};
|
||||
```
|
||||
|
||||
_Further examples below will be in TypeScript!_
|
||||
|
||||
## Getting started
|
||||
|
||||
```sh
|
||||
$ npm install csstype
|
||||
```
|
||||
|
||||
## Table of content
|
||||
|
||||
- [Style types](#style-types)
|
||||
- [At-rule types](#at-rule-types)
|
||||
- [Pseudo types](#pseudo-types)
|
||||
- [Generics](#generics)
|
||||
- [Usage](#usage)
|
||||
- [What should I do when I get type errors?](#what-should-i-do-when-i-get-type-errors)
|
||||
- [Version 3.0](#version-30)
|
||||
- [Contributing](#contributing)
|
||||
|
||||
## Style types
|
||||
|
||||
Properties are categorized in different uses and in several technical variations to provide typings that suits as many as possible.
|
||||
|
||||
| | Default | `Hyphen` | `Fallback` | `HyphenFallback` |
|
||||
| -------------- | -------------------- | -------------------------- | ---------------------------- | ---------------------------------- |
|
||||
| **All** | `Properties` | `PropertiesHyphen` | `PropertiesFallback` | `PropertiesHyphenFallback` |
|
||||
| **`Standard`** | `StandardProperties` | `StandardPropertiesHyphen` | `StandardPropertiesFallback` | `StandardPropertiesHyphenFallback` |
|
||||
| **`Vendor`** | `VendorProperties` | `VendorPropertiesHyphen` | `VendorPropertiesFallback` | `VendorPropertiesHyphenFallback` |
|
||||
| **`Obsolete`** | `ObsoleteProperties` | `ObsoletePropertiesHyphen` | `ObsoletePropertiesFallback` | `ObsoletePropertiesHyphenFallback` |
|
||||
| **`Svg`** | `SvgProperties` | `SvgPropertiesHyphen` | `SvgPropertiesFallback` | `SvgPropertiesHyphenFallback` |
|
||||
|
||||
Categories:
|
||||
|
||||
- **All** - Includes `Standard`, `Vendor`, `Obsolete` and `Svg`
|
||||
- **`Standard`** - Current properties and extends subcategories `StandardLonghand` and `StandardShorthand` _(e.g. `StandardShorthandProperties`)_
|
||||
- **`Vendor`** - Vendor prefixed properties and extends subcategories `VendorLonghand` and `VendorShorthand` _(e.g. `VendorShorthandProperties`)_
|
||||
- **`Obsolete`** - Removed or deprecated properties
|
||||
- **`Svg`** - SVG-specific properties
|
||||
|
||||
Variations:
|
||||
|
||||
- **Default** - JavaScript (camel) cased property names
|
||||
- **`Hyphen`** - CSS (kebab) cased property names
|
||||
- **`Fallback`** - Also accepts array of values e.g. `string | string[]`
|
||||
|
||||
## At-rule types
|
||||
|
||||
At-rule interfaces with descriptors.
|
||||
|
||||
**TypeScript**: These will be found in the `AtRule` namespace, e.g. `AtRule.Viewport`.
|
||||
**Flow**: These will be prefixed with `AtRule$`, e.g. `AtRule$Viewport`.
|
||||
|
||||
| | Default | `Hyphen` | `Fallback` | `HyphenFallback` |
|
||||
| -------------------- | -------------- | -------------------- | ---------------------- | ---------------------------- |
|
||||
| **`@counter-style`** | `CounterStyle` | `CounterStyleHyphen` | `CounterStyleFallback` | `CounterStyleHyphenFallback` |
|
||||
| **`@font-face`** | `FontFace` | `FontFaceHyphen` | `FontFaceFallback` | `FontFaceHyphenFallback` |
|
||||
| **`@viewport`** | `Viewport` | `ViewportHyphen` | `ViewportFallback` | `ViewportHyphenFallback` |
|
||||
|
||||
## Pseudo types
|
||||
|
||||
String literals of pseudo classes and pseudo elements
|
||||
|
||||
- `Pseudos`
|
||||
|
||||
Extends:
|
||||
|
||||
- `AdvancedPseudos`
|
||||
|
||||
Function-like pseudos e.g. `:not(:first-child)`. The string literal contains the value excluding the parenthesis: `:not`. These are separated because they require an argument that results in infinite number of variations.
|
||||
|
||||
- `SimplePseudos`
|
||||
|
||||
Plain pseudos e.g. `:hover` that can only be **one** variation.
|
||||
|
||||
## Generics
|
||||
|
||||
All interfaces has two optional generic argument to define length and time: `CSS.Properties<TLength = string | 0, TTime = string>`
|
||||
|
||||
- **Length** is the first generic parameter and defaults to `string | 0` because `0` is the only [length where the unit identifier is optional](https://drafts.csswg.org/css-values-3/#lengths). You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit.
|
||||
```tsx
|
||||
const style: CSS.Properties<string | number> = {
|
||||
width: 100,
|
||||
};
|
||||
```
|
||||
- **Time** is the second generic argument and defaults to `string`. You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit.
|
||||
```tsx
|
||||
const style: CSS.Properties<string | number, number> = {
|
||||
transitionDuration: 1000,
|
||||
};
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import type * as CSS from 'csstype';
|
||||
|
||||
const style: CSS.Properties = {
|
||||
width: '10px',
|
||||
margin: '1em',
|
||||
};
|
||||
```
|
||||
|
||||
In some cases, like for CSS-in-JS libraries, an array of values is a way to provide fallback values in CSS. Using `CSS.PropertiesFallback` instead of `CSS.Properties` will add the possibility to use any property value as an array of values.
|
||||
|
||||
```ts
|
||||
import type * as CSS from 'csstype';
|
||||
|
||||
const style: CSS.PropertiesFallback = {
|
||||
display: ['-webkit-flex', 'flex'],
|
||||
color: 'white',
|
||||
};
|
||||
```
|
||||
|
||||
There's even string literals for pseudo selectors and elements.
|
||||
|
||||
```ts
|
||||
import type * as CSS from 'csstype';
|
||||
|
||||
const pseudos: { [P in CSS.SimplePseudos]?: CSS.Properties } = {
|
||||
':hover': {
|
||||
display: 'flex',
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
Hyphen cased (kebab cased) properties are provided in `CSS.PropertiesHyphen` and `CSS.PropertiesHyphenFallback`. It's not **not** added by default in `CSS.Properties`. To allow both of them, you can simply extend with `CSS.PropertiesHyphen` or/and `CSS.PropertiesHyphenFallback`.
|
||||
|
||||
```ts
|
||||
import type * as CSS from 'csstype';
|
||||
|
||||
interface Style extends CSS.Properties, CSS.PropertiesHyphen {}
|
||||
|
||||
const style: Style = {
|
||||
'flex-grow': 1,
|
||||
'flex-shrink': 0,
|
||||
'font-weight': 'normal',
|
||||
backgroundColor: 'white',
|
||||
};
|
||||
```
|
||||
|
||||
Adding type checked CSS properties to a `HTMLElement`.
|
||||
|
||||
```ts
|
||||
import type * as CSS from 'csstype';
|
||||
|
||||
const style: CSS.Properties = {
|
||||
color: 'red',
|
||||
margin: '1em',
|
||||
};
|
||||
|
||||
let button = document.createElement('button');
|
||||
|
||||
Object.assign(button.style, style);
|
||||
```
|
||||
|
||||
## What should I do when I get type errors?
|
||||
|
||||
The goal is to have as perfect types as possible and we're trying to do our best. But with CSS Custom Properties, the CSS specification changing frequently and vendors implementing their own specifications with new releases sometimes causes type errors even if it should work. Here's some steps you could take to get it fixed:
|
||||
|
||||
_If you're using CSS Custom Properties you can step directly to step 3._
|
||||
|
||||
1. **First of all, make sure you're doing it right.** A type error could also indicate that you're not :wink:
|
||||
|
||||
- Some CSS specs that some vendors has implemented could have been officially rejected or haven't yet received any official acceptance and are therefor not included
|
||||
- If you're using TypeScript, [type widening](https://blog.mariusschulz.com/2017/02/04/TypeScript-2-1-literal-type-widening) could be the reason you get `Type 'string' is not assignable to...` errors
|
||||
|
||||
2. **Have a look in [issues](https://github.com/frenic/csstype/issues) to see if an issue already has been filed. If not, create a new one.** To help us out, please refer to any information you have found.
|
||||
3. Fix the issue locally with **TypeScript** (Flow further down):
|
||||
|
||||
- The recommended way is to use **module augmentation**. Here's a few examples:
|
||||
|
||||
```ts
|
||||
// My css.d.ts file
|
||||
import type * as CSS from 'csstype';
|
||||
|
||||
declare module 'csstype' {
|
||||
interface Properties {
|
||||
// Add a missing property
|
||||
WebkitRocketLauncher?: string;
|
||||
|
||||
// Add a CSS Custom Property
|
||||
'--theme-color'?: 'black' | 'white';
|
||||
|
||||
// Allow namespaced CSS Custom Properties
|
||||
[index: `--theme-${string}`]: any;
|
||||
|
||||
// Allow any CSS Custom Properties
|
||||
[index: `--${string}`]: any;
|
||||
|
||||
// ...or allow any other property
|
||||
[index: string]: any;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- The alternative way is to use **type assertion**. Here's a few examples:
|
||||
|
||||
```ts
|
||||
const style: CSS.Properties = {
|
||||
// Add a missing property
|
||||
['WebkitRocketLauncher' as any]: 'launching',
|
||||
|
||||
// Add a CSS Custom Property
|
||||
['--theme-color' as any]: 'black',
|
||||
};
|
||||
```
|
||||
|
||||
Fix the issue locally with **Flow**:
|
||||
|
||||
- Use **type assertion**. Here's a few examples:
|
||||
|
||||
```js
|
||||
const style: $Exact<CSS.Properties<*>> = {
|
||||
// Add a missing property
|
||||
[('WebkitRocketLauncher': any)]: 'launching',
|
||||
|
||||
// Add a CSS Custom Property
|
||||
[('--theme-color': any)]: 'black',
|
||||
};
|
||||
```
|
||||
|
||||
## Version 3.0
|
||||
|
||||
- **All property types are exposed with namespace**
|
||||
TypeScript: `Property.AlignContent` (was `AlignContentProperty` before)
|
||||
Flow: `Property$AlignContent`
|
||||
- **All at-rules are exposed with namespace**
|
||||
TypeScript: `AtRule.FontFace` (was `FontFace` before)
|
||||
Flow: `AtRule$FontFace`
|
||||
- **Data types are NOT exposed**
|
||||
E.g. `Color` and `Box`. Because the generation of data types may suddenly be removed or renamed.
|
||||
- **TypeScript hack for autocompletion**
|
||||
Uses `(string & {})` for literal string unions and `(number & {})` for literal number unions ([related issue](https://github.com/microsoft/TypeScript/issues/29729)). Utilize `PropertyValue<T>` to unpack types from e.g. `(string & {})` to `string`.
|
||||
- **New generic for time**
|
||||
Read more on the ["Generics"](#generics) section.
|
||||
- **Flow types improvements**
|
||||
Flow Strict enabled and exact types are used.
|
||||
|
||||
## Contributing
|
||||
|
||||
**Never modify `index.d.ts` and `index.js.flow` directly. They are generated automatically and committed so that we can easily follow any change it results in.** Therefor it's important that you run `$ git config merge.ours.driver true` after you've forked and cloned. That setting prevents merge conflicts when doing rebase.
|
||||
|
||||
### Commands
|
||||
|
||||
- `npm run build` Generates typings and type checks them
|
||||
- `npm run watch` Runs build on each save
|
||||
- `npm run test` Runs the tests
|
||||
- `npm run lazy` Type checks, lints and formats everything
|
21297
node_modules/csstype/index.d.ts
generated
vendored
21297
node_modules/csstype/index.d.ts
generated
vendored
File diff suppressed because it is too large
Load diff
6612
node_modules/csstype/index.js.flow
generated
vendored
6612
node_modules/csstype/index.js.flow
generated
vendored
File diff suppressed because it is too large
Load diff
66
node_modules/csstype/package.json
generated
vendored
66
node_modules/csstype/package.json
generated
vendored
|
@ -1,66 +0,0 @@
|
|||
{
|
||||
"name": "csstype",
|
||||
"version": "3.1.3",
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"description": "Strict TypeScript and Flow types for style based on MDN data",
|
||||
"repository": "https://github.com/frenic/csstype",
|
||||
"author": "Fredrik Nicol <fredrik.nicol@gmail.com>",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/chokidar": "^2.1.3",
|
||||
"@types/css-tree": "^2.3.1",
|
||||
"@types/jest": "^29.5.0",
|
||||
"@types/jsdom": "^21.1.1",
|
||||
"@types/node": "^16.18.23",
|
||||
"@types/prettier": "^2.7.2",
|
||||
"@types/request": "^2.48.8",
|
||||
"@types/turndown": "^5.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
||||
"@typescript-eslint/parser": "^5.57.0",
|
||||
"chalk": "^4.1.2",
|
||||
"chokidar": "^3.5.3",
|
||||
"eslint": "^8.37.0",
|
||||
"css-tree": "^2.3.1",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"fast-glob": "^3.2.12",
|
||||
"flow-bin": "^0.203.1",
|
||||
"jest": "^29.5.0",
|
||||
"jsdom": "^21.1.1",
|
||||
"mdn-browser-compat-data": "git+https://github.com/mdn/browser-compat-data.git#1bf44517bd08de735e9ec20dbfe8e86c96341054",
|
||||
"mdn-data": "git+https://github.com/mdn/data.git#7f0c865a3c4b5d891285c93308ee5c25cb5cfee8",
|
||||
"prettier": "^2.8.7",
|
||||
"request": "^2.88.2",
|
||||
"ts-jest": "^29.0.5",
|
||||
"ts-node": "^10.9.1",
|
||||
"turndown": "^7.1.2",
|
||||
"typescript": "~5.0.3"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "npm install --prefix __tests__ && npm install --prefix __tests__/__fixtures__",
|
||||
"prepublishOnly": "tsc && npm run test:src && npm run build && ts-node --files prepublish.ts",
|
||||
"update": "ts-node --files update.ts",
|
||||
"build": "ts-node --files build.ts --start",
|
||||
"watch": "ts-node --files build.ts --watch",
|
||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
|
||||
"pretty": "prettier --write build.ts **/*.{ts,js,json,md}",
|
||||
"lazy": "tsc && npm run lint",
|
||||
"test": "jest --runInBand",
|
||||
"test:src": "jest src.*.ts",
|
||||
"test:dist": "jest dist.*.ts --runInBand"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"index.js.flow"
|
||||
],
|
||||
"keywords": [
|
||||
"css",
|
||||
"style",
|
||||
"typescript",
|
||||
"flow",
|
||||
"typings",
|
||||
"types",
|
||||
"definitions"
|
||||
]
|
||||
}
|
151
node_modules/js-tokens/CHANGELOG.md
generated
vendored
151
node_modules/js-tokens/CHANGELOG.md
generated
vendored
|
@ -1,151 +0,0 @@
|
|||
### Version 4.0.0 (2018-01-28) ###
|
||||
|
||||
- Added: Support for ES2018. The only change needed was recognizing the `s`
|
||||
regex flag.
|
||||
- Changed: _All_ tokens returned by the `matchToToken` function now have a
|
||||
`closed` property. It is set to `undefined` for the tokens where “closed”
|
||||
doesn’t make sense. This means that all tokens objects have the same shape,
|
||||
which might improve performance.
|
||||
|
||||
These are the breaking changes:
|
||||
|
||||
- `'/a/s'.match(jsTokens)` no longer returns `['/', 'a', '/', 's']`, but
|
||||
`['/a/s']`. (There are of course other variations of this.)
|
||||
- Code that rely on some token objects not having the `closed` property could
|
||||
now behave differently.
|
||||
|
||||
|
||||
### Version 3.0.2 (2017-06-28) ###
|
||||
|
||||
- No code changes. Just updates to the readme.
|
||||
|
||||
|
||||
### Version 3.0.1 (2017-01-30) ###
|
||||
|
||||
- Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched
|
||||
correctly.
|
||||
|
||||
|
||||
### Version 3.0.0 (2017-01-11) ###
|
||||
|
||||
This release contains one breaking change, that should [improve performance in
|
||||
V8][v8-perf]:
|
||||
|
||||
> So how can you, as a JavaScript developer, ensure that your RegExps are fast?
|
||||
> If you are not interested in hooking into RegExp internals, make sure that
|
||||
> neither the RegExp instance, nor its prototype is modified in order to get the
|
||||
> best performance:
|
||||
>
|
||||
> ```js
|
||||
> var re = /./g;
|
||||
> re.exec(''); // Fast path.
|
||||
> re.new_property = 'slow';
|
||||
> ```
|
||||
|
||||
This module used to export a single regex, with `.matchToToken` bolted
|
||||
on, just like in the above example. This release changes the exports of
|
||||
the module to avoid this issue.
|
||||
|
||||
Before:
|
||||
|
||||
```js
|
||||
import jsTokens from "js-tokens"
|
||||
// or:
|
||||
var jsTokens = require("js-tokens")
|
||||
var matchToToken = jsTokens.matchToToken
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```js
|
||||
import jsTokens, {matchToToken} from "js-tokens"
|
||||
// or:
|
||||
var jsTokens = require("js-tokens").default
|
||||
var matchToToken = require("js-tokens").matchToToken
|
||||
```
|
||||
|
||||
[v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html
|
||||
|
||||
|
||||
### Version 2.0.0 (2016-06-19) ###
|
||||
|
||||
- Added: Support for ES2016. In other words, support for the `**` exponentiation
|
||||
operator.
|
||||
|
||||
These are the breaking changes:
|
||||
|
||||
- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`.
|
||||
- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`.
|
||||
|
||||
|
||||
### Version 1.0.3 (2016-03-27) ###
|
||||
|
||||
- Improved: Made the regex ever so slightly smaller.
|
||||
- Updated: The readme.
|
||||
|
||||
|
||||
### Version 1.0.2 (2015-10-18) ###
|
||||
|
||||
- Improved: Limited npm package contents for a smaller download. Thanks to
|
||||
@zertosh!
|
||||
|
||||
|
||||
### Version 1.0.1 (2015-06-20) ###
|
||||
|
||||
- Fixed: Declared an undeclared variable.
|
||||
|
||||
|
||||
### Version 1.0.0 (2015-02-26) ###
|
||||
|
||||
- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That
|
||||
type is now equivalent to the Punctuator token in the ECMAScript
|
||||
specification. (Backwards-incompatible change.)
|
||||
- Fixed: A `-` followed by a number is now correctly matched as a punctuator
|
||||
followed by a number. It used to be matched as just a number, but there is no
|
||||
such thing as negative number literals. (Possibly backwards-incompatible
|
||||
change.)
|
||||
|
||||
|
||||
### Version 0.4.1 (2015-02-21) ###
|
||||
|
||||
- Added: Support for the regex `u` flag.
|
||||
|
||||
|
||||
### Version 0.4.0 (2015-02-21) ###
|
||||
|
||||
- Improved: `jsTokens.matchToToken` performance.
|
||||
- Added: Support for octal and binary number literals.
|
||||
- Added: Support for template strings.
|
||||
|
||||
|
||||
### Version 0.3.1 (2015-01-06) ###
|
||||
|
||||
- Fixed: Support for unicode spaces. They used to be allowed in names (which is
|
||||
very confusing), and some unicode newlines were wrongly allowed in strings and
|
||||
regexes.
|
||||
|
||||
|
||||
### Version 0.3.0 (2014-12-19) ###
|
||||
|
||||
- Changed: The `jsTokens.names` array has been replaced with the
|
||||
`jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no
|
||||
longer part of the public API; instead use said function. See this [gist] for
|
||||
an example. (Backwards-incompatible change.)
|
||||
- Changed: The empty string is now considered an “invalid” token, instead an
|
||||
“empty” token (its own group). (Backwards-incompatible change.)
|
||||
- Removed: component support. (Backwards-incompatible change.)
|
||||
|
||||
[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
|
||||
|
||||
|
||||
### Version 0.2.0 (2014-06-19) ###
|
||||
|
||||
- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own
|
||||
category (“functionArrow”), for simplicity. (Backwards-incompatible change.)
|
||||
- Added: ES6 splats (`...`) are now matched as an operator (instead of three
|
||||
punctuations). (Backwards-incompatible change.)
|
||||
|
||||
|
||||
### Version 0.1.0 (2014-03-08) ###
|
||||
|
||||
- Initial release.
|
21
node_modules/js-tokens/LICENSE
generated
vendored
21
node_modules/js-tokens/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell
|
||||
|
||||
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.
|
240
node_modules/js-tokens/README.md
generated
vendored
240
node_modules/js-tokens/README.md
generated
vendored
|
@ -1,240 +0,0 @@
|
|||
Overview [](https://travis-ci.org/lydell/js-tokens)
|
||||
========
|
||||
|
||||
A regex that tokenizes JavaScript.
|
||||
|
||||
```js
|
||||
var jsTokens = require("js-tokens").default
|
||||
|
||||
var jsString = "var foo=opts.foo;\n..."
|
||||
|
||||
jsString.match(jsTokens)
|
||||
// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...]
|
||||
```
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
`npm install js-tokens`
|
||||
|
||||
```js
|
||||
import jsTokens from "js-tokens"
|
||||
// or:
|
||||
var jsTokens = require("js-tokens").default
|
||||
```
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
### `jsTokens` ###
|
||||
|
||||
A regex with the `g` flag that matches JavaScript tokens.
|
||||
|
||||
The regex _always_ matches, even invalid JavaScript and the empty string.
|
||||
|
||||
The next match is always directly after the previous.
|
||||
|
||||
### `var token = matchToToken(match)` ###
|
||||
|
||||
```js
|
||||
import {matchToToken} from "js-tokens"
|
||||
// or:
|
||||
var matchToToken = require("js-tokens").matchToToken
|
||||
```
|
||||
|
||||
Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:
|
||||
String, value: String}` object. The following types are available:
|
||||
|
||||
- string
|
||||
- comment
|
||||
- regex
|
||||
- number
|
||||
- name
|
||||
- punctuator
|
||||
- whitespace
|
||||
- invalid
|
||||
|
||||
Multi-line comments and strings also have a `closed` property indicating if the
|
||||
token was closed or not (see below).
|
||||
|
||||
Comments and strings both come in several flavors. To distinguish them, check if
|
||||
the token starts with `//`, `/*`, `'`, `"` or `` ` ``.
|
||||
|
||||
Names are ECMAScript IdentifierNames, that is, including both identifiers and
|
||||
keywords. You may use [is-keyword-js] to tell them apart.
|
||||
|
||||
Whitespace includes both line terminators and other whitespace.
|
||||
|
||||
[is-keyword-js]: https://github.com/crissdev/is-keyword-js
|
||||
|
||||
|
||||
ECMAScript support
|
||||
==================
|
||||
|
||||
The intention is to always support the latest ECMAScript version whose feature
|
||||
set has been finalized.
|
||||
|
||||
If adding support for a newer version requires changes, a new version with a
|
||||
major verion bump will be released.
|
||||
|
||||
Currently, ECMAScript 2018 is supported.
|
||||
|
||||
|
||||
Invalid code handling
|
||||
=====================
|
||||
|
||||
Unterminated strings are still matched as strings. JavaScript strings cannot
|
||||
contain (unescaped) newlines, so unterminated strings simply end at the end of
|
||||
the line. Unterminated template strings can contain unescaped newlines, though,
|
||||
so they go on to the end of input.
|
||||
|
||||
Unterminated multi-line comments are also still matched as comments. They
|
||||
simply go on to the end of the input.
|
||||
|
||||
Unterminated regex literals are likely matched as division and whatever is
|
||||
inside the regex.
|
||||
|
||||
Invalid ASCII characters have their own capturing group.
|
||||
|
||||
Invalid non-ASCII characters are treated as names, to simplify the matching of
|
||||
names (except unicode spaces which are treated as whitespace). Note: See also
|
||||
the [ES2018](#es2018) section.
|
||||
|
||||
Regex literals may contain invalid regex syntax. They are still matched as
|
||||
regex literals. They may also contain repeated regex flags, to keep the regex
|
||||
simple.
|
||||
|
||||
Strings may contain invalid escape sequences.
|
||||
|
||||
|
||||
Limitations
|
||||
===========
|
||||
|
||||
Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be
|
||||
perfect. But that’s not the point either.
|
||||
|
||||
You may compare jsTokens with [esprima] by using `esprima-compare.js`.
|
||||
See `npm run esprima-compare`!
|
||||
|
||||
[esprima]: http://esprima.org/
|
||||
|
||||
### Template string interpolation ###
|
||||
|
||||
Template strings are matched as single tokens, from the starting `` ` `` to the
|
||||
ending `` ` ``, including interpolations (whose tokens are not matched
|
||||
individually).
|
||||
|
||||
Matching template string interpolations requires recursive balancing of `{` and
|
||||
`}`—something that JavaScript regexes cannot do. Only one level of nesting is
|
||||
supported.
|
||||
|
||||
### Division and regex literals collision ###
|
||||
|
||||
Consider this example:
|
||||
|
||||
```js
|
||||
var g = 9.82
|
||||
var number = bar / 2/g
|
||||
|
||||
var regex = / 2/g
|
||||
```
|
||||
|
||||
A human can easily understand that in the `number` line we’re dealing with
|
||||
division, and in the `regex` line we’re dealing with a regex literal. How come?
|
||||
Because humans can look at the whole code to put the `/` characters in context.
|
||||
A JavaScript regex cannot. It only sees forwards. (Well, ES2018 regexes can also
|
||||
look backwards. See the [ES2018](#es2018) section).
|
||||
|
||||
When the `jsTokens` regex scans throught the above, it will see the following
|
||||
at the end of both the `number` and `regex` rows:
|
||||
|
||||
```js
|
||||
/ 2/g
|
||||
```
|
||||
|
||||
It is then impossible to know if that is a regex literal, or part of an
|
||||
expression dealing with division.
|
||||
|
||||
Here is a similar case:
|
||||
|
||||
```js
|
||||
foo /= 2/g
|
||||
foo(/= 2/g)
|
||||
```
|
||||
|
||||
The first line divides the `foo` variable with `2/g`. The second line calls the
|
||||
`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only
|
||||
sees forwards, it cannot tell the two cases apart.
|
||||
|
||||
There are some cases where we _can_ tell division and regex literals apart,
|
||||
though.
|
||||
|
||||
First off, we have the simple cases where there’s only one slash in the line:
|
||||
|
||||
```js
|
||||
var foo = 2/g
|
||||
foo /= 2
|
||||
```
|
||||
|
||||
Regex literals cannot contain newlines, so the above cases are correctly
|
||||
identified as division. Things are only problematic when there are more than
|
||||
one non-comment slash in a single line.
|
||||
|
||||
Secondly, not every character is a valid regex flag.
|
||||
|
||||
```js
|
||||
var number = bar / 2/e
|
||||
```
|
||||
|
||||
The above example is also correctly identified as division, because `e` is not a
|
||||
valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`
|
||||
(any letter) as flags, but it is not worth it since it increases the amount of
|
||||
ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are
|
||||
allowed. This means that the above example will be identified as division as
|
||||
long as you don’t rename the `e` variable to some permutation of `gmiyus` 1 to 6
|
||||
characters long.
|
||||
|
||||
Lastly, we can look _forward_ for information.
|
||||
|
||||
- If the token following what looks like a regex literal is not valid after a
|
||||
regex literal, but is valid in a division expression, then the regex literal
|
||||
is treated as division instead. For example, a flagless regex cannot be
|
||||
followed by a string, number or name, but all of those three can be the
|
||||
denominator of a division.
|
||||
- Generally, if what looks like a regex literal is followed by an operator, the
|
||||
regex literal is treated as division instead. This is because regexes are
|
||||
seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division
|
||||
could likely be part of such an expression.
|
||||
|
||||
Please consult the regex source and the test cases for precise information on
|
||||
when regex or division is matched (should you need to know). In short, you
|
||||
could sum it up as:
|
||||
|
||||
If the end of a statement looks like a regex literal (even if it isn’t), it
|
||||
will be treated as one. Otherwise it should work as expected (if you write sane
|
||||
code).
|
||||
|
||||
### ES2018 ###
|
||||
|
||||
ES2018 added some nice regex improvements to the language.
|
||||
|
||||
- [Unicode property escapes] should allow telling names and invalid non-ASCII
|
||||
characters apart without blowing up the regex size.
|
||||
- [Lookbehind assertions] should allow matching telling division and regex
|
||||
literals apart in more cases.
|
||||
- [Named capture groups] might simplify some things.
|
||||
|
||||
These things would be nice to do, but are not critical. They probably have to
|
||||
wait until the oldest maintained Node.js LTS release supports those features.
|
||||
|
||||
[Unicode property escapes]: http://2ality.com/2017/07/regexp-unicode-property-escapes.html
|
||||
[Lookbehind assertions]: http://2ality.com/2017/05/regexp-lookbehind-assertions.html
|
||||
[Named capture groups]: http://2ality.com/2017/05/regexp-named-capture-groups.html
|
||||
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
[MIT](LICENSE).
|
23
node_modules/js-tokens/index.js
generated
vendored
23
node_modules/js-tokens/index.js
generated
vendored
|
@ -1,23 +0,0 @@
|
|||
// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell
|
||||
// License: MIT. (See LICENSE.)
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
})
|
||||
|
||||
// This regex comes from regex.coffee, and is inserted here by generate-index.js
|
||||
// (run `npm run build`).
|
||||
exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
|
||||
|
||||
exports.matchToToken = function(match) {
|
||||
var token = {type: "invalid", value: match[0], closed: undefined}
|
||||
if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4])
|
||||
else if (match[ 5]) token.type = "comment"
|
||||
else if (match[ 6]) token.type = "comment", token.closed = !!match[7]
|
||||
else if (match[ 8]) token.type = "regex"
|
||||
else if (match[ 9]) token.type = "number"
|
||||
else if (match[10]) token.type = "name"
|
||||
else if (match[11]) token.type = "punctuator"
|
||||
else if (match[12]) token.type = "whitespace"
|
||||
return token
|
||||
}
|
30
node_modules/js-tokens/package.json
generated
vendored
30
node_modules/js-tokens/package.json
generated
vendored
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"name": "js-tokens",
|
||||
"version": "4.0.0",
|
||||
"author": "Simon Lydell",
|
||||
"license": "MIT",
|
||||
"description": "A regex that tokenizes JavaScript.",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
"js",
|
||||
"token",
|
||||
"tokenize",
|
||||
"regex"
|
||||
],
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"repository": "lydell/js-tokens",
|
||||
"scripts": {
|
||||
"test": "mocha --ui tdd",
|
||||
"esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
|
||||
"build": "node generate-index.js",
|
||||
"dev": "npm run build && npm test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coffeescript": "2.1.1",
|
||||
"esprima": "4.0.0",
|
||||
"everything.js": "1.0.3",
|
||||
"mocha": "5.0.0"
|
||||
}
|
||||
}
|
21
node_modules/loose-envify/LICENSE
generated
vendored
21
node_modules/loose-envify/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Andres Suarez <zertosh@gmail.com>
|
||||
|
||||
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.
|
45
node_modules/loose-envify/README.md
generated
vendored
45
node_modules/loose-envify/README.md
generated
vendored
|
@ -1,45 +0,0 @@
|
|||
# loose-envify
|
||||
|
||||
[](https://travis-ci.org/zertosh/loose-envify)
|
||||
|
||||
Fast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.
|
||||
|
||||
## Gotchas
|
||||
|
||||
* Doesn't handle broken syntax.
|
||||
* Doesn't look inside embedded expressions in template strings.
|
||||
- **this won't work:**
|
||||
```js
|
||||
console.log(`the current env is ${process.env.NODE_ENV}`);
|
||||
```
|
||||
* Doesn't replace oddly-spaced or oddly-commented expressions.
|
||||
- **this won't work:**
|
||||
```js
|
||||
console.log(process./*won't*/env./*work*/NODE_ENV);
|
||||
```
|
||||
|
||||
## Usage/Options
|
||||
|
||||
loose-envify has the exact same interface as [envify](https://github.com/hughsk/envify), including the CLI.
|
||||
|
||||
## Benchmark
|
||||
|
||||
```
|
||||
envify:
|
||||
|
||||
$ for i in {1..5}; do node bench/bench.js 'envify'; done
|
||||
708ms
|
||||
727ms
|
||||
791ms
|
||||
719ms
|
||||
720ms
|
||||
|
||||
loose-envify:
|
||||
|
||||
$ for i in {1..5}; do node bench/bench.js '../'; done
|
||||
51ms
|
||||
52ms
|
||||
52ms
|
||||
52ms
|
||||
52ms
|
||||
```
|
16
node_modules/loose-envify/cli.js
generated
vendored
16
node_modules/loose-envify/cli.js
generated
vendored
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
var looseEnvify = require('./');
|
||||
var fs = require('fs');
|
||||
|
||||
if (process.argv[2]) {
|
||||
fs.createReadStream(process.argv[2], {encoding: 'utf8'})
|
||||
.pipe(looseEnvify(process.argv[2]))
|
||||
.pipe(process.stdout);
|
||||
} else {
|
||||
process.stdin.resume()
|
||||
process.stdin
|
||||
.pipe(looseEnvify(__filename))
|
||||
.pipe(process.stdout);
|
||||
}
|
4
node_modules/loose-envify/custom.js
generated
vendored
4
node_modules/loose-envify/custom.js
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
// envify compatibility
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./loose-envify');
|
3
node_modules/loose-envify/index.js
generated
vendored
3
node_modules/loose-envify/index.js
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = require('./loose-envify')(process.env);
|
36
node_modules/loose-envify/loose-envify.js
generated
vendored
36
node_modules/loose-envify/loose-envify.js
generated
vendored
|
@ -1,36 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var stream = require('stream');
|
||||
var util = require('util');
|
||||
var replace = require('./replace');
|
||||
|
||||
var jsonExtRe = /\.json$/;
|
||||
|
||||
module.exports = function(rootEnv) {
|
||||
rootEnv = rootEnv || process.env;
|
||||
return function (file, trOpts) {
|
||||
if (jsonExtRe.test(file)) {
|
||||
return stream.PassThrough();
|
||||
}
|
||||
var envs = trOpts ? [rootEnv, trOpts] : [rootEnv];
|
||||
return new LooseEnvify(envs);
|
||||
};
|
||||
};
|
||||
|
||||
function LooseEnvify(envs) {
|
||||
stream.Transform.call(this);
|
||||
this._data = '';
|
||||
this._envs = envs;
|
||||
}
|
||||
util.inherits(LooseEnvify, stream.Transform);
|
||||
|
||||
LooseEnvify.prototype._transform = function(buf, enc, cb) {
|
||||
this._data += buf;
|
||||
cb();
|
||||
};
|
||||
|
||||
LooseEnvify.prototype._flush = function(cb) {
|
||||
var replaced = replace(this._data, this._envs);
|
||||
this.push(replaced);
|
||||
cb();
|
||||
};
|
36
node_modules/loose-envify/package.json
generated
vendored
36
node_modules/loose-envify/package.json
generated
vendored
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"name": "loose-envify",
|
||||
"version": "1.4.0",
|
||||
"description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST",
|
||||
"keywords": [
|
||||
"environment",
|
||||
"variables",
|
||||
"browserify",
|
||||
"browserify-transform",
|
||||
"transform",
|
||||
"source",
|
||||
"configuration"
|
||||
],
|
||||
"homepage": "https://github.com/zertosh/loose-envify",
|
||||
"license": "MIT",
|
||||
"author": "Andres Suarez <zertosh@gmail.com>",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"loose-envify": "cli.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/zertosh/loose-envify.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browserify": "^13.1.1",
|
||||
"envify": "^3.4.0",
|
||||
"tap": "^8.0.0"
|
||||
}
|
||||
}
|
65
node_modules/loose-envify/replace.js
generated
vendored
65
node_modules/loose-envify/replace.js
generated
vendored
|
@ -1,65 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var jsTokens = require('js-tokens').default;
|
||||
|
||||
var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
|
||||
var spaceOrCommentRe = /^(?:\s|\/[/*])/;
|
||||
|
||||
function replace(src, envs) {
|
||||
if (!processEnvRe.test(src)) {
|
||||
return src;
|
||||
}
|
||||
|
||||
var out = [];
|
||||
var purge = envs.some(function(env) {
|
||||
return env._ && env._.indexOf('purge') !== -1;
|
||||
});
|
||||
|
||||
jsTokens.lastIndex = 0
|
||||
var parts = src.match(jsTokens);
|
||||
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
if (parts[i ] === 'process' &&
|
||||
parts[i + 1] === '.' &&
|
||||
parts[i + 2] === 'env' &&
|
||||
parts[i + 3] === '.') {
|
||||
var prevCodeToken = getAdjacentCodeToken(-1, parts, i);
|
||||
var nextCodeToken = getAdjacentCodeToken(1, parts, i + 4);
|
||||
var replacement = getReplacementString(envs, parts[i + 4], purge);
|
||||
if (prevCodeToken !== '.' &&
|
||||
nextCodeToken !== '.' &&
|
||||
nextCodeToken !== '=' &&
|
||||
typeof replacement === 'string') {
|
||||
out.push(replacement);
|
||||
i += 4;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
out.push(parts[i]);
|
||||
}
|
||||
|
||||
return out.join('');
|
||||
}
|
||||
|
||||
function getAdjacentCodeToken(dir, parts, i) {
|
||||
while (true) {
|
||||
var part = parts[i += dir];
|
||||
if (!spaceOrCommentRe.test(part)) {
|
||||
return part;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getReplacementString(envs, name, purge) {
|
||||
for (var j = 0; j < envs.length; j++) {
|
||||
var env = envs[j];
|
||||
if (typeof env[name] !== 'undefined') {
|
||||
return JSON.stringify(env[name]);
|
||||
}
|
||||
}
|
||||
if (purge) {
|
||||
return 'undefined';
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = replace;
|
90
node_modules/object-assign/index.js
generated
vendored
90
node_modules/object-assign/index.js
generated
vendored
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
/* eslint-disable no-unused-vars */
|
||||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
|
||||
function toObject(val) {
|
||||
if (val === null || val === undefined) {
|
||||
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||||
}
|
||||
|
||||
return Object(val);
|
||||
}
|
||||
|
||||
function shouldUseNative() {
|
||||
try {
|
||||
if (!Object.assign) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Detect buggy property enumeration order in older V8 versions.
|
||||
|
||||
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
||||
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
||||
test1[5] = 'de';
|
||||
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||||
var test2 = {};
|
||||
for (var i = 0; i < 10; i++) {
|
||||
test2['_' + String.fromCharCode(i)] = i;
|
||||
}
|
||||
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
||||
return test2[n];
|
||||
});
|
||||
if (order2.join('') !== '0123456789') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||||
var test3 = {};
|
||||
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
||||
test3[letter] = letter;
|
||||
});
|
||||
if (Object.keys(Object.assign({}, test3)).join('') !==
|
||||
'abcdefghijklmnopqrst') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (err) {
|
||||
// We don't expect any of the above to throw, but better to be safe.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
||||
var from;
|
||||
var to = toObject(target);
|
||||
var symbols;
|
||||
|
||||
for (var s = 1; s < arguments.length; s++) {
|
||||
from = Object(arguments[s]);
|
||||
|
||||
for (var key in from) {
|
||||
if (hasOwnProperty.call(from, key)) {
|
||||
to[key] = from[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (getOwnPropertySymbols) {
|
||||
symbols = getOwnPropertySymbols(from);
|
||||
for (var i = 0; i < symbols.length; i++) {
|
||||
if (propIsEnumerable.call(from, symbols[i])) {
|
||||
to[symbols[i]] = from[symbols[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return to;
|
||||
};
|
21
node_modules/object-assign/license
generated
vendored
21
node_modules/object-assign/license
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
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.
|
42
node_modules/object-assign/package.json
generated
vendored
42
node_modules/object-assign/package.json
generated
vendored
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
"name": "object-assign",
|
||||
"version": "4.1.1",
|
||||
"description": "ES2015 `Object.assign()` ponyfill",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/object-assign",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava",
|
||||
"bench": "matcha bench.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"object",
|
||||
"assign",
|
||||
"extend",
|
||||
"properties",
|
||||
"es2015",
|
||||
"ecmascript",
|
||||
"harmony",
|
||||
"ponyfill",
|
||||
"prollyfill",
|
||||
"polyfill",
|
||||
"shim",
|
||||
"browser"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^0.16.0",
|
||||
"lodash": "^4.16.4",
|
||||
"matcha": "^0.7.0",
|
||||
"xo": "^0.16.0"
|
||||
}
|
||||
}
|
61
node_modules/object-assign/readme.md
generated
vendored
61
node_modules/object-assign/readme.md
generated
vendored
|
@ -1,61 +0,0 @@
|
|||
# object-assign [](https://travis-ci.org/sindresorhus/object-assign)
|
||||
|
||||
> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
|
||||
|
||||
|
||||
## Use the built-in
|
||||
|
||||
Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
|
||||
support `Object.assign()` :tada:. If you target only those environments, then by all
|
||||
means, use `Object.assign()` instead of this package.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save object-assign
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const objectAssign = require('object-assign');
|
||||
|
||||
objectAssign({foo: 0}, {bar: 1});
|
||||
//=> {foo: 0, bar: 1}
|
||||
|
||||
// multiple sources
|
||||
objectAssign({foo: 0}, {bar: 1}, {baz: 2});
|
||||
//=> {foo: 0, bar: 1, baz: 2}
|
||||
|
||||
// overwrites equal keys
|
||||
objectAssign({foo: 0}, {foo: 1}, {foo: 2});
|
||||
//=> {foo: 2}
|
||||
|
||||
// ignores null and undefined sources
|
||||
objectAssign({foo: 0}, null, {bar: 1}, undefined);
|
||||
//=> {foo: 0, bar: 1}
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### objectAssign(target, [source, ...])
|
||||
|
||||
Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
21
node_modules/prop-types/LICENSE
generated
vendored
21
node_modules/prop-types/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2013-present, Facebook, Inc.
|
||||
|
||||
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.
|
302
node_modules/prop-types/README.md
generated
vendored
302
node_modules/prop-types/README.md
generated
vendored
|
@ -1,302 +0,0 @@
|
|||
# prop-types [](https://travis-ci.org/facebook/prop-types)
|
||||
|
||||
Runtime type checking for React props and similar objects.
|
||||
|
||||
You can use prop-types to document the intended types of properties passed to
|
||||
components. React (and potentially other libraries—see the `checkPropTypes()`
|
||||
reference below) will check props passed to your components against those
|
||||
definitions, and warn in development if they don’t match.
|
||||
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
npm install --save prop-types
|
||||
```
|
||||
|
||||
## Importing
|
||||
|
||||
```js
|
||||
import PropTypes from 'prop-types'; // ES6
|
||||
var PropTypes = require('prop-types'); // ES5 with npm
|
||||
```
|
||||
|
||||
### CDN
|
||||
|
||||
If you prefer to exclude `prop-types` from your application and use it
|
||||
globally via `window.PropTypes`, the `prop-types` package provides
|
||||
single-file distributions, which are hosted on the following CDNs:
|
||||
|
||||
* [**unpkg**](https://unpkg.com/prop-types/)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://unpkg.com/prop-types@15.6/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
* [**cdnjs**](https://cdnjs.com/libraries/prop-types)
|
||||
```html
|
||||
<!-- development version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.js"></script>
|
||||
|
||||
<!-- production version -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.min.js"></script>
|
||||
```
|
||||
|
||||
To load a specific version of `prop-types` replace `15.6.0` with the version number.
|
||||
|
||||
## Usage
|
||||
|
||||
PropTypes was originally exposed as part of the React core module, and is
|
||||
commonly used with React components.
|
||||
Here is an example of using PropTypes with a React component, which also
|
||||
documents the different validators provided:
|
||||
|
||||
```js
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
class MyComponent extends React.Component {
|
||||
render() {
|
||||
// ... do things with the props
|
||||
}
|
||||
}
|
||||
|
||||
MyComponent.propTypes = {
|
||||
// You can declare that a prop is a specific JS primitive. By default, these
|
||||
// are all optional.
|
||||
optionalArray: PropTypes.array,
|
||||
optionalBigInt: PropTypes.bigint,
|
||||
optionalBool: PropTypes.bool,
|
||||
optionalFunc: PropTypes.func,
|
||||
optionalNumber: PropTypes.number,
|
||||
optionalObject: PropTypes.object,
|
||||
optionalString: PropTypes.string,
|
||||
optionalSymbol: PropTypes.symbol,
|
||||
|
||||
// Anything that can be rendered: numbers, strings, elements or an array
|
||||
// (or fragment) containing these types.
|
||||
// see https://reactjs.org/docs/rendering-elements.html for more info
|
||||
optionalNode: PropTypes.node,
|
||||
|
||||
// A React element (ie. <MyComponent />).
|
||||
optionalElement: PropTypes.element,
|
||||
|
||||
// A React element type (eg. MyComponent).
|
||||
// a function, string, or "element-like" object (eg. React.Fragment, Suspense, etc.)
|
||||
// see https://github.com/facebook/react/blob/HEAD/packages/shared/isValidElementType.js
|
||||
optionalElementType: PropTypes.elementType,
|
||||
|
||||
// You can also declare that a prop is an instance of a class. This uses
|
||||
// JS's instanceof operator.
|
||||
optionalMessage: PropTypes.instanceOf(Message),
|
||||
|
||||
// You can ensure that your prop is limited to specific values by treating
|
||||
// it as an enum.
|
||||
optionalEnum: PropTypes.oneOf(['News', 'Photos']),
|
||||
|
||||
// An object that could be one of many types
|
||||
optionalUnion: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.number,
|
||||
PropTypes.instanceOf(Message)
|
||||
]),
|
||||
|
||||
// An array of a certain type
|
||||
optionalArrayOf: PropTypes.arrayOf(PropTypes.number),
|
||||
|
||||
// An object with property values of a certain type
|
||||
optionalObjectOf: PropTypes.objectOf(PropTypes.number),
|
||||
|
||||
// You can chain any of the above with `isRequired` to make sure a warning
|
||||
// is shown if the prop isn't provided.
|
||||
|
||||
// An object taking on a particular shape
|
||||
optionalObjectWithShape: PropTypes.shape({
|
||||
optionalProperty: PropTypes.string,
|
||||
requiredProperty: PropTypes.number.isRequired
|
||||
}),
|
||||
|
||||
// An object with warnings on extra properties
|
||||
optionalObjectWithStrictShape: PropTypes.exact({
|
||||
optionalProperty: PropTypes.string,
|
||||
requiredProperty: PropTypes.number.isRequired
|
||||
}),
|
||||
|
||||
requiredFunc: PropTypes.func.isRequired,
|
||||
|
||||
// A value of any data type
|
||||
requiredAny: PropTypes.any.isRequired,
|
||||
|
||||
// You can also specify a custom validator. It should return an Error
|
||||
// object if the validation fails. Don't `console.warn` or throw, as this
|
||||
// won't work inside `oneOfType`.
|
||||
customProp: function(props, propName, componentName) {
|
||||
if (!/matchme/.test(props[propName])) {
|
||||
return new Error(
|
||||
'Invalid prop `' + propName + '` supplied to' +
|
||||
' `' + componentName + '`. Validation failed.'
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
// You can also supply a custom validator to `arrayOf` and `objectOf`.
|
||||
// It should return an Error object if the validation fails. The validator
|
||||
// will be called for each key in the array or object. The first two
|
||||
// arguments of the validator are the array or object itself, and the
|
||||
// current item's key.
|
||||
customArrayProp: PropTypes.arrayOf(function(propValue, key, componentName, location, propFullName) {
|
||||
if (!/matchme/.test(propValue[key])) {
|
||||
return new Error(
|
||||
'Invalid prop `' + propFullName + '` supplied to' +
|
||||
' `' + componentName + '`. Validation failed.'
|
||||
);
|
||||
}
|
||||
})
|
||||
};
|
||||
```
|
||||
|
||||
Refer to the [React documentation](https://facebook.github.io/react/docs/typechecking-with-proptypes.html) for more information.
|
||||
|
||||
## Migrating from React.PropTypes
|
||||
|
||||
Check out [Migrating from React.PropTypes](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes) for details on how to migrate to `prop-types` from `React.PropTypes`.
|
||||
|
||||
Note that this blog posts **mentions a codemod script that performs the conversion automatically**.
|
||||
|
||||
There are also important notes below.
|
||||
|
||||
## How to Depend on This Package?
|
||||
|
||||
For apps, we recommend putting it in `dependencies` with a caret range.
|
||||
For example:
|
||||
|
||||
```js
|
||||
"dependencies": {
|
||||
"prop-types": "^15.5.7"
|
||||
}
|
||||
```
|
||||
|
||||
For libraries, we *also* recommend leaving it in `dependencies`:
|
||||
|
||||
```js
|
||||
"dependencies": {
|
||||
"prop-types": "^15.5.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^15.5.0"
|
||||
}
|
||||
```
|
||||
|
||||
**Note:** there are known issues in versions before 15.5.7 so we recommend using it as the minimal version.
|
||||
|
||||
Make sure that the version range uses a caret (`^`) and thus is broad enough for npm to efficiently deduplicate packages.
|
||||
|
||||
For UMD bundles of your components, make sure you **don’t** include `PropTypes` in the build. Usually this is done by marking it as an external (the specifics depend on your bundler), just like you do with React.
|
||||
|
||||
## Compatibility
|
||||
|
||||
### React 0.14
|
||||
|
||||
This package is compatible with **React 0.14.9**. Compared to 0.14.8 (which was released in March of 2016), there are no other changes in 0.14.9, so it should be a painless upgrade.
|
||||
|
||||
```shell
|
||||
# ATTENTION: Only run this if you still use React 0.14!
|
||||
npm install --save react@^0.14.9 react-dom@^0.14.9
|
||||
```
|
||||
|
||||
### React 15+
|
||||
|
||||
This package is compatible with **React 15.3.0** and higher.
|
||||
|
||||
```
|
||||
npm install --save react@^15.3.0 react-dom@^15.3.0
|
||||
```
|
||||
|
||||
### What happens on other React versions?
|
||||
|
||||
It outputs warnings with the message below even though the developer doesn’t do anything wrong. Unfortunately there is no solution for this other than updating React to either 15.3.0 or higher, or 0.14.9 if you’re using React 0.14.
|
||||
|
||||
## Difference from `React.PropTypes`: Don’t Call Validator Functions
|
||||
|
||||
First of all, **which version of React are you using**? You might be seeing this message because a component library has updated to use `prop-types` package, but your version of React is incompatible with it. See the [above section](#compatibility) for more details.
|
||||
|
||||
Are you using either React 0.14.9 or a version higher than React 15.3.0? Read on.
|
||||
|
||||
When you migrate components to use the standalone `prop-types`, **all validator functions will start throwing an error if you call them directly**. This makes sure that nobody relies on them in production code, and it is safe to strip their implementations to optimize the bundle size.
|
||||
|
||||
Code like this is still fine:
|
||||
|
||||
```js
|
||||
MyComponent.propTypes = {
|
||||
myProp: PropTypes.bool
|
||||
};
|
||||
```
|
||||
|
||||
However, code like this will not work with the `prop-types` package:
|
||||
|
||||
```js
|
||||
// Will not work with `prop-types` package!
|
||||
var errorOrNull = PropTypes.bool(42, 'myProp', 'MyComponent', 'prop');
|
||||
```
|
||||
|
||||
It will throw an error:
|
||||
|
||||
```
|
||||
Calling PropTypes validators directly is not supported by the `prop-types` package.
|
||||
Use PropTypes.checkPropTypes() to call them.
|
||||
```
|
||||
|
||||
(If you see **a warning** rather than an error with this message, please check the [above section about compatibility](#compatibility).)
|
||||
|
||||
This is new behavior, and you will only encounter it when you migrate from `React.PropTypes` to the `prop-types` package. For the vast majority of components, this doesn’t matter, and if you didn’t see [this warning](https://facebook.github.io/react/warnings/dont-call-proptypes.html) in your components, your code is safe to migrate. This is not a breaking change in React because you are only opting into this change for a component by explicitly changing your imports to use `prop-types`. If you temporarily need the old behavior, you can keep using `React.PropTypes` until React 16.
|
||||
|
||||
**If you absolutely need to trigger the validation manually**, call `PropTypes.checkPropTypes()`. Unlike the validators themselves, this function is safe to call in production, as it will be replaced by an empty function:
|
||||
|
||||
```js
|
||||
// Works with standalone PropTypes
|
||||
PropTypes.checkPropTypes(MyComponent.propTypes, props, 'prop', 'MyComponent');
|
||||
```
|
||||
See below for more info.
|
||||
|
||||
**If you DO want to use validation in production**, you can choose to use the **development version** by importing/requiring `prop-types/prop-types` instead of `prop-types`.
|
||||
|
||||
**You might also see this error** if you’re calling a `PropTypes` validator from your own custom `PropTypes` validator. In this case, the fix is to make sure that you are passing *all* of the arguments to the inner function. There is a more in-depth explanation of how to fix it [on this page](https://facebook.github.io/react/warnings/dont-call-proptypes.html#fixing-the-false-positive-in-third-party-proptypes). Alternatively, you can temporarily keep using `React.PropTypes` until React 16, as it would still only warn in this case.
|
||||
|
||||
If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
|
||||
|
||||
## PropTypes.checkPropTypes
|
||||
|
||||
React will automatically check the propTypes you set on the component, but if
|
||||
you are using PropTypes without React then you may want to manually call
|
||||
`PropTypes.checkPropTypes`, like so:
|
||||
|
||||
```js
|
||||
const myPropTypes = {
|
||||
name: PropTypes.string,
|
||||
age: PropTypes.number,
|
||||
// ... define your prop validations
|
||||
};
|
||||
|
||||
const props = {
|
||||
name: 'hello', // is valid
|
||||
age: 'world', // not valid
|
||||
};
|
||||
|
||||
// Let's say your component is called 'MyComponent'
|
||||
|
||||
// Works with standalone PropTypes
|
||||
PropTypes.checkPropTypes(myPropTypes, props, 'prop', 'MyComponent');
|
||||
// This will warn as follows:
|
||||
// Warning: Failed prop type: Invalid prop `age` of type `string` supplied to
|
||||
// `MyComponent`, expected `number`.
|
||||
```
|
||||
|
||||
## PropTypes.resetWarningCache()
|
||||
|
||||
`PropTypes.checkPropTypes(...)` only `console.error`s a given message once. To reset the error warning cache in tests, call `PropTypes.resetWarningCache()`
|
||||
|
||||
### License
|
||||
|
||||
prop-types is [MIT licensed](./LICENSE).
|
103
node_modules/prop-types/checkPropTypes.js
generated
vendored
103
node_modules/prop-types/checkPropTypes.js
generated
vendored
|
@ -1,103 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var printWarning = function() {};
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
|
||||
var loggedTypeFailures = {};
|
||||
var has = require('./lib/has');
|
||||
|
||||
printWarning = function(text) {
|
||||
var message = 'Warning: ' + text;
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) { /**/ }
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Assert that the values match with the type specs.
|
||||
* Error messages are memorized and will only be shown once.
|
||||
*
|
||||
* @param {object} typeSpecs Map of name to a ReactPropType
|
||||
* @param {object} values Runtime values that need to be type-checked
|
||||
* @param {string} location e.g. "prop", "context", "child context"
|
||||
* @param {string} componentName Name of the component for error messages.
|
||||
* @param {?Function} getStack Returns the component stack.
|
||||
* @private
|
||||
*/
|
||||
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
for (var typeSpecName in typeSpecs) {
|
||||
if (has(typeSpecs, typeSpecName)) {
|
||||
var error;
|
||||
// Prop type validation may throw. In case they do, we don't want to
|
||||
// fail the render phase where it didn't fail before. So we log it.
|
||||
// After these have been cleaned up, we'll let them throw.
|
||||
try {
|
||||
// This is intentionally an invariant that gets caught. It's the same
|
||||
// behavior as without this statement except with a better message.
|
||||
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
||||
var err = Error(
|
||||
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
||||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
||||
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
||||
);
|
||||
err.name = 'Invariant Violation';
|
||||
throw err;
|
||||
}
|
||||
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
||||
} catch (ex) {
|
||||
error = ex;
|
||||
}
|
||||
if (error && !(error instanceof Error)) {
|
||||
printWarning(
|
||||
(componentName || 'React class') + ': type specification of ' +
|
||||
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
||||
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
||||
'You may have forgotten to pass an argument to the type checker ' +
|
||||
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
||||
'shape all require an argument).'
|
||||
);
|
||||
}
|
||||
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
||||
// Only monitor this failure once because there tends to be a lot of the
|
||||
// same error.
|
||||
loggedTypeFailures[error.message] = true;
|
||||
|
||||
var stack = getStack ? getStack() : '';
|
||||
|
||||
printWarning(
|
||||
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets warning cache when testing.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
checkPropTypes.resetWarningCache = function() {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
loggedTypeFailures = {};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = checkPropTypes;
|
19
node_modules/prop-types/factory.js
generated
vendored
19
node_modules/prop-types/factory.js
generated
vendored
|
@ -1,19 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
// React 15.5 references this module, and assumes PropTypes are still callable in production.
|
||||
// Therefore we re-export development-only version with all the PropTypes checks here.
|
||||
// However if one is migrating to the `prop-types` npm library, they will go through the
|
||||
// `index.js` entry point, and it will branch depending on the environment.
|
||||
var factory = require('./factoryWithTypeCheckers');
|
||||
module.exports = function(isValidElement) {
|
||||
// It is still allowed in 15.5.
|
||||
var throwOnDirectAccess = false;
|
||||
return factory(isValidElement, throwOnDirectAccess);
|
||||
};
|
65
node_modules/prop-types/factoryWithThrowingShims.js
generated
vendored
65
node_modules/prop-types/factoryWithThrowingShims.js
generated
vendored
|
@ -1,65 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
|
||||
|
||||
function emptyFunction() {}
|
||||
function emptyFunctionWithReset() {}
|
||||
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
||||
|
||||
module.exports = function() {
|
||||
function shim(props, propName, componentName, location, propFullName, secret) {
|
||||
if (secret === ReactPropTypesSecret) {
|
||||
// It is still safe when called from React.
|
||||
return;
|
||||
}
|
||||
var err = new Error(
|
||||
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
||||
'Use PropTypes.checkPropTypes() to call them. ' +
|
||||
'Read more at http://fb.me/use-check-prop-types'
|
||||
);
|
||||
err.name = 'Invariant Violation';
|
||||
throw err;
|
||||
};
|
||||
shim.isRequired = shim;
|
||||
function getShim() {
|
||||
return shim;
|
||||
};
|
||||
// Important!
|
||||
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
||||
var ReactPropTypes = {
|
||||
array: shim,
|
||||
bigint: shim,
|
||||
bool: shim,
|
||||
func: shim,
|
||||
number: shim,
|
||||
object: shim,
|
||||
string: shim,
|
||||
symbol: shim,
|
||||
|
||||
any: shim,
|
||||
arrayOf: getShim,
|
||||
element: shim,
|
||||
elementType: shim,
|
||||
instanceOf: getShim,
|
||||
node: shim,
|
||||
objectOf: getShim,
|
||||
oneOf: getShim,
|
||||
oneOfType: getShim,
|
||||
shape: getShim,
|
||||
exact: getShim,
|
||||
|
||||
checkPropTypes: emptyFunctionWithReset,
|
||||
resetWarningCache: emptyFunction
|
||||
};
|
||||
|
||||
ReactPropTypes.PropTypes = ReactPropTypes;
|
||||
|
||||
return ReactPropTypes;
|
||||
};
|
610
node_modules/prop-types/factoryWithTypeCheckers.js
generated
vendored
610
node_modules/prop-types/factoryWithTypeCheckers.js
generated
vendored
|
@ -1,610 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var ReactIs = require('react-is');
|
||||
var assign = require('object-assign');
|
||||
|
||||
var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
|
||||
var has = require('./lib/has');
|
||||
var checkPropTypes = require('./checkPropTypes');
|
||||
|
||||
var printWarning = function() {};
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
printWarning = function(text) {
|
||||
var message = 'Warning: ' + text;
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// --- Welcome to debugging React ---
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch (x) {}
|
||||
};
|
||||
}
|
||||
|
||||
function emptyFunctionThatReturnsNull() {
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports = function(isValidElement, throwOnDirectAccess) {
|
||||
/* global Symbol */
|
||||
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||||
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
||||
|
||||
/**
|
||||
* Returns the iterator method function contained on the iterable object.
|
||||
*
|
||||
* Be sure to invoke the function with the iterable as context:
|
||||
*
|
||||
* var iteratorFn = getIteratorFn(myIterable);
|
||||
* if (iteratorFn) {
|
||||
* var iterator = iteratorFn.call(myIterable);
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* @param {?object} maybeIterable
|
||||
* @return {?function}
|
||||
*/
|
||||
function getIteratorFn(maybeIterable) {
|
||||
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
||||
if (typeof iteratorFn === 'function') {
|
||||
return iteratorFn;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Collection of methods that allow declaration and validation of props that are
|
||||
* supplied to React components. Example usage:
|
||||
*
|
||||
* var Props = require('ReactPropTypes');
|
||||
* var MyArticle = React.createClass({
|
||||
* propTypes: {
|
||||
* // An optional string prop named "description".
|
||||
* description: Props.string,
|
||||
*
|
||||
* // A required enum prop named "category".
|
||||
* category: Props.oneOf(['News','Photos']).isRequired,
|
||||
*
|
||||
* // A prop named "dialog" that requires an instance of Dialog.
|
||||
* dialog: Props.instanceOf(Dialog).isRequired
|
||||
* },
|
||||
* render: function() { ... }
|
||||
* });
|
||||
*
|
||||
* A more formal specification of how these methods are used:
|
||||
*
|
||||
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
||||
* decl := ReactPropTypes.{type}(.isRequired)?
|
||||
*
|
||||
* Each and every declaration produces a function with the same signature. This
|
||||
* allows the creation of custom validation functions. For example:
|
||||
*
|
||||
* var MyLink = React.createClass({
|
||||
* propTypes: {
|
||||
* // An optional string or URI prop named "href".
|
||||
* href: function(props, propName, componentName) {
|
||||
* var propValue = props[propName];
|
||||
* if (propValue != null && typeof propValue !== 'string' &&
|
||||
* !(propValue instanceof URI)) {
|
||||
* return new Error(
|
||||
* 'Expected a string or an URI for ' + propName + ' in ' +
|
||||
* componentName
|
||||
* );
|
||||
* }
|
||||
* }
|
||||
* },
|
||||
* render: function() {...}
|
||||
* });
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
|
||||
var ANONYMOUS = '<<anonymous>>';
|
||||
|
||||
// Important!
|
||||
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
||||
var ReactPropTypes = {
|
||||
array: createPrimitiveTypeChecker('array'),
|
||||
bigint: createPrimitiveTypeChecker('bigint'),
|
||||
bool: createPrimitiveTypeChecker('boolean'),
|
||||
func: createPrimitiveTypeChecker('function'),
|
||||
number: createPrimitiveTypeChecker('number'),
|
||||
object: createPrimitiveTypeChecker('object'),
|
||||
string: createPrimitiveTypeChecker('string'),
|
||||
symbol: createPrimitiveTypeChecker('symbol'),
|
||||
|
||||
any: createAnyTypeChecker(),
|
||||
arrayOf: createArrayOfTypeChecker,
|
||||
element: createElementTypeChecker(),
|
||||
elementType: createElementTypeTypeChecker(),
|
||||
instanceOf: createInstanceTypeChecker,
|
||||
node: createNodeChecker(),
|
||||
objectOf: createObjectOfTypeChecker,
|
||||
oneOf: createEnumTypeChecker,
|
||||
oneOfType: createUnionTypeChecker,
|
||||
shape: createShapeTypeChecker,
|
||||
exact: createStrictShapeTypeChecker,
|
||||
};
|
||||
|
||||
/**
|
||||
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
||||
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
||||
*/
|
||||
/*eslint-disable no-self-compare*/
|
||||
function is(x, y) {
|
||||
// SameValue algorithm
|
||||
if (x === y) {
|
||||
// Steps 1-5, 7-10
|
||||
// Steps 6.b-6.e: +0 != -0
|
||||
return x !== 0 || 1 / x === 1 / y;
|
||||
} else {
|
||||
// Step 6.a: NaN == NaN
|
||||
return x !== x && y !== y;
|
||||
}
|
||||
}
|
||||
/*eslint-enable no-self-compare*/
|
||||
|
||||
/**
|
||||
* We use an Error-like object for backward compatibility as people may call
|
||||
* PropTypes directly and inspect their output. However, we don't use real
|
||||
* Errors anymore. We don't inspect their stack anyway, and creating them
|
||||
* is prohibitively expensive if they are created too often, such as what
|
||||
* happens in oneOfType() for any type before the one that matched.
|
||||
*/
|
||||
function PropTypeError(message, data) {
|
||||
this.message = message;
|
||||
this.data = data && typeof data === 'object' ? data: {};
|
||||
this.stack = '';
|
||||
}
|
||||
// Make `instanceof Error` still work for returned errors.
|
||||
PropTypeError.prototype = Error.prototype;
|
||||
|
||||
function createChainableTypeChecker(validate) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
var manualPropTypeCallCache = {};
|
||||
var manualPropTypeWarningCount = 0;
|
||||
}
|
||||
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
||||
componentName = componentName || ANONYMOUS;
|
||||
propFullName = propFullName || propName;
|
||||
|
||||
if (secret !== ReactPropTypesSecret) {
|
||||
if (throwOnDirectAccess) {
|
||||
// New behavior only for users of `prop-types` package
|
||||
var err = new Error(
|
||||
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
||||
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
||||
'Read more at http://fb.me/use-check-prop-types'
|
||||
);
|
||||
err.name = 'Invariant Violation';
|
||||
throw err;
|
||||
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
||||
// Old behavior for people using React.PropTypes
|
||||
var cacheKey = componentName + ':' + propName;
|
||||
if (
|
||||
!manualPropTypeCallCache[cacheKey] &&
|
||||
// Avoid spamming the console because they are often not actionable except for lib authors
|
||||
manualPropTypeWarningCount < 3
|
||||
) {
|
||||
printWarning(
|
||||
'You are manually calling a React.PropTypes validation ' +
|
||||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
||||
'and will throw in the standalone `prop-types` package. ' +
|
||||
'You may be seeing this warning due to a third-party PropTypes ' +
|
||||
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
||||
);
|
||||
manualPropTypeCallCache[cacheKey] = true;
|
||||
manualPropTypeWarningCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (props[propName] == null) {
|
||||
if (isRequired) {
|
||||
if (props[propName] === null) {
|
||||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
||||
}
|
||||
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
return validate(props, propName, componentName, location, propFullName);
|
||||
}
|
||||
}
|
||||
|
||||
var chainedCheckType = checkType.bind(null, false);
|
||||
chainedCheckType.isRequired = checkType.bind(null, true);
|
||||
|
||||
return chainedCheckType;
|
||||
}
|
||||
|
||||
function createPrimitiveTypeChecker(expectedType) {
|
||||
function validate(props, propName, componentName, location, propFullName, secret) {
|
||||
var propValue = props[propName];
|
||||
var propType = getPropType(propValue);
|
||||
if (propType !== expectedType) {
|
||||
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
||||
// check, but we can offer a more precise error message here rather than
|
||||
// 'of type `object`'.
|
||||
var preciseType = getPreciseType(propValue);
|
||||
|
||||
return new PropTypeError(
|
||||
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
||||
{expectedType: expectedType}
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createAnyTypeChecker() {
|
||||
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
||||
}
|
||||
|
||||
function createArrayOfTypeChecker(typeChecker) {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
if (typeof typeChecker !== 'function') {
|
||||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
||||
}
|
||||
var propValue = props[propName];
|
||||
if (!Array.isArray(propValue)) {
|
||||
var propType = getPropType(propValue);
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
||||
}
|
||||
for (var i = 0; i < propValue.length; i++) {
|
||||
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
||||
if (error instanceof Error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createElementTypeChecker() {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
var propValue = props[propName];
|
||||
if (!isValidElement(propValue)) {
|
||||
var propType = getPropType(propValue);
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createElementTypeTypeChecker() {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
var propValue = props[propName];
|
||||
if (!ReactIs.isValidElementType(propValue)) {
|
||||
var propType = getPropType(propValue);
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createInstanceTypeChecker(expectedClass) {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
if (!(props[propName] instanceof expectedClass)) {
|
||||
var expectedClassName = expectedClass.name || ANONYMOUS;
|
||||
var actualClassName = getClassName(props[propName]);
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createEnumTypeChecker(expectedValues) {
|
||||
if (!Array.isArray(expectedValues)) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (arguments.length > 1) {
|
||||
printWarning(
|
||||
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
||||
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
||||
);
|
||||
} else {
|
||||
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
||||
}
|
||||
}
|
||||
return emptyFunctionThatReturnsNull;
|
||||
}
|
||||
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
var propValue = props[propName];
|
||||
for (var i = 0; i < expectedValues.length; i++) {
|
||||
if (is(propValue, expectedValues[i])) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
||||
var type = getPreciseType(value);
|
||||
if (type === 'symbol') {
|
||||
return String(value);
|
||||
}
|
||||
return value;
|
||||
});
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createObjectOfTypeChecker(typeChecker) {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
if (typeof typeChecker !== 'function') {
|
||||
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
||||
}
|
||||
var propValue = props[propName];
|
||||
var propType = getPropType(propValue);
|
||||
if (propType !== 'object') {
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
||||
}
|
||||
for (var key in propValue) {
|
||||
if (has(propValue, key)) {
|
||||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||||
if (error instanceof Error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
||||
if (!Array.isArray(arrayOfTypeCheckers)) {
|
||||
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
||||
return emptyFunctionThatReturnsNull;
|
||||
}
|
||||
|
||||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||||
var checker = arrayOfTypeCheckers[i];
|
||||
if (typeof checker !== 'function') {
|
||||
printWarning(
|
||||
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
||||
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
||||
);
|
||||
return emptyFunctionThatReturnsNull;
|
||||
}
|
||||
}
|
||||
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
var expectedTypes = [];
|
||||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
||||
var checker = arrayOfTypeCheckers[i];
|
||||
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
||||
if (checkerResult == null) {
|
||||
return null;
|
||||
}
|
||||
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
||||
expectedTypes.push(checkerResult.data.expectedType);
|
||||
}
|
||||
}
|
||||
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createNodeChecker() {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
if (!isNode(props[propName])) {
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
||||
return new PropTypeError(
|
||||
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
||||
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
||||
);
|
||||
}
|
||||
|
||||
function createShapeTypeChecker(shapeTypes) {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
var propValue = props[propName];
|
||||
var propType = getPropType(propValue);
|
||||
if (propType !== 'object') {
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||||
}
|
||||
for (var key in shapeTypes) {
|
||||
var checker = shapeTypes[key];
|
||||
if (typeof checker !== 'function') {
|
||||
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
||||
}
|
||||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||||
if (error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function createStrictShapeTypeChecker(shapeTypes) {
|
||||
function validate(props, propName, componentName, location, propFullName) {
|
||||
var propValue = props[propName];
|
||||
var propType = getPropType(propValue);
|
||||
if (propType !== 'object') {
|
||||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
||||
}
|
||||
// We need to check all keys in case some are required but missing from props.
|
||||
var allKeys = assign({}, props[propName], shapeTypes);
|
||||
for (var key in allKeys) {
|
||||
var checker = shapeTypes[key];
|
||||
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
||||
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
||||
}
|
||||
if (!checker) {
|
||||
return new PropTypeError(
|
||||
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
||||
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
||||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
||||
);
|
||||
}
|
||||
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
||||
if (error) {
|
||||
return error;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
return createChainableTypeChecker(validate);
|
||||
}
|
||||
|
||||
function isNode(propValue) {
|
||||
switch (typeof propValue) {
|
||||
case 'number':
|
||||
case 'string':
|
||||
case 'undefined':
|
||||
return true;
|
||||
case 'boolean':
|
||||
return !propValue;
|
||||
case 'object':
|
||||
if (Array.isArray(propValue)) {
|
||||
return propValue.every(isNode);
|
||||
}
|
||||
if (propValue === null || isValidElement(propValue)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var iteratorFn = getIteratorFn(propValue);
|
||||
if (iteratorFn) {
|
||||
var iterator = iteratorFn.call(propValue);
|
||||
var step;
|
||||
if (iteratorFn !== propValue.entries) {
|
||||
while (!(step = iterator.next()).done) {
|
||||
if (!isNode(step.value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Iterator will provide entry [k,v] tuples rather than values.
|
||||
while (!(step = iterator.next()).done) {
|
||||
var entry = step.value;
|
||||
if (entry) {
|
||||
if (!isNode(entry[1])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isSymbol(propType, propValue) {
|
||||
// Native Symbol.
|
||||
if (propType === 'symbol') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// falsy value can't be a Symbol
|
||||
if (!propValue) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
||||
if (propValue['@@toStringTag'] === 'Symbol') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Fallback for non-spec compliant Symbols which are polyfilled.
|
||||
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Equivalent of `typeof` but with special handling for array and regexp.
|
||||
function getPropType(propValue) {
|
||||
var propType = typeof propValue;
|
||||
if (Array.isArray(propValue)) {
|
||||
return 'array';
|
||||
}
|
||||
if (propValue instanceof RegExp) {
|
||||
// Old webkits (at least until Android 4.0) return 'function' rather than
|
||||
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
||||
// passes PropTypes.object.
|
||||
return 'object';
|
||||
}
|
||||
if (isSymbol(propType, propValue)) {
|
||||
return 'symbol';
|
||||
}
|
||||
return propType;
|
||||
}
|
||||
|
||||
// This handles more types than `getPropType`. Only used for error messages.
|
||||
// See `createPrimitiveTypeChecker`.
|
||||
function getPreciseType(propValue) {
|
||||
if (typeof propValue === 'undefined' || propValue === null) {
|
||||
return '' + propValue;
|
||||
}
|
||||
var propType = getPropType(propValue);
|
||||
if (propType === 'object') {
|
||||
if (propValue instanceof Date) {
|
||||
return 'date';
|
||||
} else if (propValue instanceof RegExp) {
|
||||
return 'regexp';
|
||||
}
|
||||
}
|
||||
return propType;
|
||||
}
|
||||
|
||||
// Returns a string that is postfixed to a warning about an invalid type.
|
||||
// For example, "undefined" or "of type array"
|
||||
function getPostfixForTypeWarning(value) {
|
||||
var type = getPreciseType(value);
|
||||
switch (type) {
|
||||
case 'array':
|
||||
case 'object':
|
||||
return 'an ' + type;
|
||||
case 'boolean':
|
||||
case 'date':
|
||||
case 'regexp':
|
||||
return 'a ' + type;
|
||||
default:
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
// Returns class name of the object, if any.
|
||||
function getClassName(propValue) {
|
||||
if (!propValue.constructor || !propValue.constructor.name) {
|
||||
return ANONYMOUS;
|
||||
}
|
||||
return propValue.constructor.name;
|
||||
}
|
||||
|
||||
ReactPropTypes.checkPropTypes = checkPropTypes;
|
||||
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
||||
ReactPropTypes.PropTypes = ReactPropTypes;
|
||||
|
||||
return ReactPropTypes;
|
||||
};
|
19
node_modules/prop-types/index.js
generated
vendored
19
node_modules/prop-types/index.js
generated
vendored
|
@ -1,19 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
var ReactIs = require('react-is');
|
||||
|
||||
// By explicitly using `prop-types` you are opting into new development behavior.
|
||||
// http://fb.me/prop-types-in-prod
|
||||
var throwOnDirectAccess = true;
|
||||
module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);
|
||||
} else {
|
||||
// By explicitly using `prop-types` you are opting into new production behavior.
|
||||
// http://fb.me/prop-types-in-prod
|
||||
module.exports = require('./factoryWithThrowingShims')();
|
||||
}
|
12
node_modules/prop-types/lib/ReactPropTypesSecret.js
generated
vendored
12
node_modules/prop-types/lib/ReactPropTypesSecret.js
generated
vendored
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
||||
|
||||
module.exports = ReactPropTypesSecret;
|
1
node_modules/prop-types/lib/has.js
generated
vendored
1
node_modules/prop-types/lib/has.js
generated
vendored
|
@ -1 +0,0 @@
|
|||
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
60
node_modules/prop-types/package.json
generated
vendored
60
node_modules/prop-types/package.json
generated
vendored
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
"name": "prop-types",
|
||||
"version": "15.8.1",
|
||||
"description": "Runtime type checking for React props and similar objects.",
|
||||
"sideEffects": false,
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"checkPropTypes.js",
|
||||
"factory.js",
|
||||
"factoryWithThrowingShims.js",
|
||||
"factoryWithTypeCheckers.js",
|
||||
"index.js",
|
||||
"prop-types.js",
|
||||
"prop-types.min.js",
|
||||
"lib"
|
||||
],
|
||||
"repository": "facebook/prop-types",
|
||||
"keywords": [
|
||||
"react"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/prop-types/issues"
|
||||
},
|
||||
"homepage": "https://facebook.github.io/react/",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.4.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"react-is": "^16.13.1"
|
||||
},
|
||||
"scripts": {
|
||||
"pretest": "npm run lint",
|
||||
"lint": "eslint .",
|
||||
"test": "npm run tests-only",
|
||||
"tests-only": "jest",
|
||||
"umd": "NODE_ENV=development browserify index.js -t loose-envify --standalone PropTypes -o prop-types.js",
|
||||
"umd-min": "NODE_ENV=production browserify index.js -t loose-envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js",
|
||||
"build": "yarn umd && yarn umd-min",
|
||||
"prepublish": "not-in-publish || yarn build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "^19.0.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"browserify": "^16.5.0",
|
||||
"bundle-collapser": "^1.4.0",
|
||||
"eslint": "^8.6.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"jest": "^19.0.2",
|
||||
"react": "^15.7.0",
|
||||
"uglifyify": "^5.0.2",
|
||||
"uglifyjs": "^2.4.11"
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
"loose-envify"
|
||||
]
|
||||
}
|
||||
}
|
1315
node_modules/prop-types/prop-types.js
generated
vendored
1315
node_modules/prop-types/prop-types.js
generated
vendored
File diff suppressed because it is too large
Load diff
1
node_modules/prop-types/prop-types.min.js
generated
vendored
1
node_modules/prop-types/prop-types.min.js
generated
vendored
|
@ -1 +0,0 @@
|
|||
!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PropTypes=f()}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var p="function"==typeof require&&require;if(!f&&p)return p(i,!0);if(u)return u(i,!0);throw(p=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",p}p=n[i]={exports:{}},e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";var ReactPropTypesSecret=require(3);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,module.exports=function(){function e(e,t,n,r,o,c){if(c!==ReactPropTypesSecret){c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return n.PropTypes=n}},{3:3}],2:[function(require,module,exports){module.exports=require(1)()},{1:1}],3:[function(require,module,exports){"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}]},{},[2])(2)});
|
22
node_modules/react-copy-to-clipboard/LICENSE
generated
vendored
22
node_modules/react-copy-to-clipboard/LICENSE
generated
vendored
|
@ -1,22 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Nik Butenko
|
||||
|
||||
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.
|
||||
|
156
node_modules/react-copy-to-clipboard/README.md
generated
vendored
156
node_modules/react-copy-to-clipboard/README.md
generated
vendored
|
@ -1,156 +0,0 @@
|
|||
# react-copy-to-clipboard [](https://www.npmjs.com/package/react-copy-to-clipboard)
|
||||
|
||||
[](https://gitter.im/nkbt/help)
|
||||
|
||||
[](https://circleci.com/gh/nkbt/react-copy-to-clipboard)
|
||||
[](https://david-dm.org/nkbt/react-copy-to-clipboard)
|
||||
[](https://david-dm.org/nkbt/react-copy-to-clipboard#info=devDependencies)
|
||||
|
||||
Copy to clipboard React component
|
||||
|
||||
Based on [copy-to-clipboard](https://npm.im/copy-to-clipboard)
|
||||
|
||||
> Would try to use execCommand with fallback to IE specific clipboardData interface and finally, fallback to simple prompt with proper text content & 'Copy to clipboard: Ctrl+C, Enter'
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### NPM
|
||||
|
||||
```sh
|
||||
npm install --save react-copy-to-clipboard
|
||||
```
|
||||
|
||||
Don't forget to manually install peer dependencies (`react`) if you use npm@3.
|
||||
|
||||
|
||||
### 1998 Script Tag:
|
||||
```html
|
||||
<script src="https://unpkg.com/react@16.0.0/umd/react.production.min.js"></script>
|
||||
<script src="https://unpkg.com/react-copy-to-clipboard/build/react-copy-to-clipboard.js"></script>
|
||||
(Module exposed as `CopyToClipboard`)
|
||||
```
|
||||
|
||||
## Live design system demo
|
||||
|
||||
[https://www.jinno.io/app/18/](https://www.jinno.io/app/18/?source=react-copy-to-clipboard)
|
||||
|
||||
## Simple web demo
|
||||
|
||||
[http://nkbt.github.io/react-copy-to-clipboard](http://nkbt.github.io/react-copy-to-clipboard)
|
||||
|
||||
## Codepen demo
|
||||
|
||||
[http://codepen.io/nkbt/pen/eNPoQv](http://codepen.io/nkbt/pen/eNPoQv?editors=0010)
|
||||
|
||||
## Usage
|
||||
```js
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import {CopyToClipboard} from 'react-copy-to-clipboard';
|
||||
|
||||
class App extends React.Component {
|
||||
state = {
|
||||
value: '',
|
||||
copied: false,
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<input value={this.state.value}
|
||||
onChange={({target: {value}}) => this.setState({value, copied: false})} />
|
||||
|
||||
<CopyToClipboard text={this.state.value}
|
||||
onCopy={() => this.setState({copied: true})}>
|
||||
<span>Copy to clipboard with span</span>
|
||||
</CopyToClipboard>
|
||||
|
||||
<CopyToClipboard text={this.state.value}
|
||||
onCopy={() => this.setState({copied: true})}>
|
||||
<button>Copy to clipboard with button</button>
|
||||
</CopyToClipboard>
|
||||
|
||||
{this.state.copied ? <span style={{color: 'red'}}>Copied.</span> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const appRoot = document.createElement('div');
|
||||
document.body.appendChild(appRoot);
|
||||
ReactDOM.render(<App />, appRoot);
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
|
||||
#### `text`: PropTypes.string.isRequired
|
||||
|
||||
Text to be copied to clipboard
|
||||
|
||||
|
||||
#### `onCopy`: PropTypes.func
|
||||
|
||||
Optional callback, will be called when text is copied
|
||||
|
||||
```
|
||||
onCopy(text, result)
|
||||
```
|
||||
`result (bool)`: Returns `true` if copied successfully, else `false`.
|
||||
|
||||
|
||||
#### `options`: PropTypes.shape({debug: bool, message: string})
|
||||
|
||||
Optional [copy-to-clipboard](https://npm.im/copy-to-clipboard) options.
|
||||
|
||||
See [API docs](https://npm.im/copy-to-clipboard#api) for details
|
||||
|
||||
#### `children`: PropTypes.node.isRequired
|
||||
|
||||
CopyToClipboard is a simple wrapping component, it does not render any tags, so it requires the only child element to be present, which will be used to capture clicks.
|
||||
|
||||
```js
|
||||
<CopyToClipboard text="Hello!">
|
||||
<button>Copy to clipboard</button>
|
||||
</CopyToClipboard>
|
||||
```
|
||||
|
||||
## Development and testing
|
||||
|
||||
Currently is being developed and tested with the latest stable `Node 8` on `OSX`.
|
||||
|
||||
To run example covering all `CopyToClipboard` features, use `yarn start`, which will compile `example/Example.js`
|
||||
|
||||
```bash
|
||||
git clone git@github.com:nkbt/react-copy-to-clipboard.git
|
||||
cd react-copy-to-clipboard
|
||||
yarn install
|
||||
yarn start
|
||||
|
||||
# then
|
||||
open http://localhost:8080
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
# to run ESLint check
|
||||
yarn lint
|
||||
|
||||
# to run tests
|
||||
yarn test
|
||||
|
||||
# to run end-to-end tests
|
||||
# first, run `selenium/standalone-firefox:3.4.0` docker image
|
||||
docker run -p 4444:4444 selenium/standalone-firefox:3.4.0
|
||||
# then run test
|
||||
yarn e2e
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
390
node_modules/react-copy-to-clipboard/build/react-copy-to-clipboard.js
generated
vendored
390
node_modules/react-copy-to-clipboard/build/react-copy-to-clipboard.js
generated
vendored
|
@ -1,390 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory(require("React"));
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(["React"], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["CopyToClipboard"] = factory(require("React"));
|
||||
else
|
||||
root["CopyToClipboard"] = factory(root["React"]);
|
||||
})(self, (__WEBPACK_EXTERNAL_MODULE_react__) => {
|
||||
return /******/ (() => { // webpackBootstrap
|
||||
/******/ var __webpack_modules__ = ({
|
||||
|
||||
/***/ "./src/Component.js":
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "CopyToClipboard": () => (/* binding */ CopyToClipboard)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var copy_to_clipboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/copy-to-clipboard/index.js");
|
||||
/* harmony import */ var copy_to_clipboard__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(copy_to_clipboard__WEBPACK_IMPORTED_MODULE_1__);
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
||||
|
||||
var _excluded = ["text", "onCopy", "options", "children"];
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
|
||||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
|
||||
|
||||
var CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {
|
||||
_inherits(CopyToClipboard, _React$PureComponent);
|
||||
|
||||
var _super = _createSuper(CopyToClipboard);
|
||||
|
||||
function CopyToClipboard() {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, CopyToClipboard);
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _super.call.apply(_super, [this].concat(args));
|
||||
|
||||
_defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
|
||||
var _this$props = _this.props,
|
||||
text = _this$props.text,
|
||||
onCopy = _this$props.onCopy,
|
||||
children = _this$props.children,
|
||||
options = _this$props.options;
|
||||
var elem = react__WEBPACK_IMPORTED_MODULE_0___default().Children.only(children);
|
||||
var result = copy_to_clipboard__WEBPACK_IMPORTED_MODULE_1___default()(text, options);
|
||||
|
||||
if (onCopy) {
|
||||
onCopy(text, result);
|
||||
} // Bypass onClick if it was present
|
||||
|
||||
|
||||
if (elem && elem.props && typeof elem.props.onClick === 'function') {
|
||||
elem.props.onClick(event);
|
||||
}
|
||||
});
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(CopyToClipboard, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props2 = this.props,
|
||||
_text = _this$props2.text,
|
||||
_onCopy = _this$props2.onCopy,
|
||||
_options = _this$props2.options,
|
||||
children = _this$props2.children,
|
||||
props = _objectWithoutProperties(_this$props2, _excluded);
|
||||
|
||||
var elem = react__WEBPACK_IMPORTED_MODULE_0___default().Children.only(children);
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(elem, _objectSpread(_objectSpread({}, props), {}, {
|
||||
onClick: this.onClick
|
||||
}));
|
||||
}
|
||||
}]);
|
||||
|
||||
return CopyToClipboard;
|
||||
}((react__WEBPACK_IMPORTED_MODULE_0___default().PureComponent));
|
||||
|
||||
_defineProperty(CopyToClipboard, "defaultProps", {
|
||||
onCopy: undefined,
|
||||
options: undefined
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/index.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
var _require = __webpack_require__("./src/Component.js"),
|
||||
CopyToClipboard = _require.CopyToClipboard;
|
||||
|
||||
CopyToClipboard.CopyToClipboard = CopyToClipboard;
|
||||
module.exports = CopyToClipboard;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/copy-to-clipboard/index.js":
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var deselectCurrent = __webpack_require__("./node_modules/toggle-selection/index.js");
|
||||
|
||||
var clipboardToIE11Formatting = {
|
||||
"text/plain": "Text",
|
||||
"text/html": "Url",
|
||||
"default": "Text"
|
||||
}
|
||||
|
||||
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
||||
|
||||
function format(message) {
|
||||
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
||||
return message.replace(/#{\s*key\s*}/g, copyKey);
|
||||
}
|
||||
|
||||
function copy(text, options) {
|
||||
var debug,
|
||||
message,
|
||||
reselectPrevious,
|
||||
range,
|
||||
selection,
|
||||
mark,
|
||||
success = false;
|
||||
if (!options) {
|
||||
options = {};
|
||||
}
|
||||
debug = options.debug || false;
|
||||
try {
|
||||
reselectPrevious = deselectCurrent();
|
||||
|
||||
range = document.createRange();
|
||||
selection = document.getSelection();
|
||||
|
||||
mark = document.createElement("span");
|
||||
mark.textContent = text;
|
||||
// reset user styles for span element
|
||||
mark.style.all = "unset";
|
||||
// prevents scrolling to the end of the page
|
||||
mark.style.position = "fixed";
|
||||
mark.style.top = 0;
|
||||
mark.style.clip = "rect(0, 0, 0, 0)";
|
||||
// used to preserve spaces and line breaks
|
||||
mark.style.whiteSpace = "pre";
|
||||
// do not inherit user-select (it may be `none`)
|
||||
mark.style.webkitUserSelect = "text";
|
||||
mark.style.MozUserSelect = "text";
|
||||
mark.style.msUserSelect = "text";
|
||||
mark.style.userSelect = "text";
|
||||
mark.addEventListener("copy", function(e) {
|
||||
e.stopPropagation();
|
||||
if (options.format) {
|
||||
e.preventDefault();
|
||||
if (typeof e.clipboardData === "undefined") { // IE 11
|
||||
debug && console.warn("unable to use e.clipboardData");
|
||||
debug && console.warn("trying IE specific stuff");
|
||||
window.clipboardData.clearData();
|
||||
var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
|
||||
window.clipboardData.setData(format, text);
|
||||
} else { // all other browsers
|
||||
e.clipboardData.clearData();
|
||||
e.clipboardData.setData(options.format, text);
|
||||
}
|
||||
}
|
||||
if (options.onCopy) {
|
||||
e.preventDefault();
|
||||
options.onCopy(e.clipboardData);
|
||||
}
|
||||
});
|
||||
|
||||
document.body.appendChild(mark);
|
||||
|
||||
range.selectNodeContents(mark);
|
||||
selection.addRange(range);
|
||||
|
||||
var successful = document.execCommand("copy");
|
||||
if (!successful) {
|
||||
throw new Error("copy command was unsuccessful");
|
||||
}
|
||||
success = true;
|
||||
} catch (err) {
|
||||
debug && console.error("unable to copy using execCommand: ", err);
|
||||
debug && console.warn("trying IE specific stuff");
|
||||
try {
|
||||
window.clipboardData.setData(options.format || "text", text);
|
||||
options.onCopy && options.onCopy(window.clipboardData);
|
||||
success = true;
|
||||
} catch (err) {
|
||||
debug && console.error("unable to copy using clipboardData: ", err);
|
||||
debug && console.error("falling back to prompt");
|
||||
message = format("message" in options ? options.message : defaultMessage);
|
||||
window.prompt(message, text);
|
||||
}
|
||||
} finally {
|
||||
if (selection) {
|
||||
if (typeof selection.removeRange == "function") {
|
||||
selection.removeRange(range);
|
||||
} else {
|
||||
selection.removeAllRanges();
|
||||
}
|
||||
}
|
||||
|
||||
if (mark) {
|
||||
document.body.removeChild(mark);
|
||||
}
|
||||
reselectPrevious();
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
module.exports = copy;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/toggle-selection/index.js":
|
||||
/***/ ((module) => {
|
||||
|
||||
|
||||
module.exports = function () {
|
||||
var selection = document.getSelection();
|
||||
if (!selection.rangeCount) {
|
||||
return function () {};
|
||||
}
|
||||
var active = document.activeElement;
|
||||
|
||||
var ranges = [];
|
||||
for (var i = 0; i < selection.rangeCount; i++) {
|
||||
ranges.push(selection.getRangeAt(i));
|
||||
}
|
||||
|
||||
switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML
|
||||
case 'INPUT':
|
||||
case 'TEXTAREA':
|
||||
active.blur();
|
||||
break;
|
||||
|
||||
default:
|
||||
active = null;
|
||||
break;
|
||||
}
|
||||
|
||||
selection.removeAllRanges();
|
||||
return function () {
|
||||
selection.type === 'Caret' &&
|
||||
selection.removeAllRanges();
|
||||
|
||||
if (!selection.rangeCount) {
|
||||
ranges.forEach(function(range) {
|
||||
selection.addRange(range);
|
||||
});
|
||||
}
|
||||
|
||||
active &&
|
||||
active.focus();
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "react":
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
||||
|
||||
/***/ })
|
||||
|
||||
/******/ });
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||
/******/ if (cachedModule !== undefined) {
|
||||
/******/ return cachedModule.exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||
/******/ // no module.id needed
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/compat get default export */
|
||||
/******/ (() => {
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = (module) => {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ () => (module['default']) :
|
||||
/******/ () => (module);
|
||||
/******/ __webpack_require__.d(getter, { a: getter });
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = (exports) => {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/
|
||||
/******/ // startup
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ // This entry module is referenced by other modules so it can't be inlined
|
||||
/******/ var __webpack_exports__ = __webpack_require__("./src/index.js");
|
||||
/******/
|
||||
/******/ return __webpack_exports__;
|
||||
/******/ })()
|
||||
;
|
||||
});
|
1
node_modules/react-copy-to-clipboard/build/react-copy-to-clipboard.min.js
generated
vendored
1
node_modules/react-copy-to-clipboard/build/react-copy-to-clipboard.min.js
generated
vendored
File diff suppressed because one or more lines are too long
114
node_modules/react-copy-to-clipboard/lib/Component.js
generated
vendored
114
node_modules/react-copy-to-clipboard/lib/Component.js
generated
vendored
|
@ -1,114 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.CopyToClipboard = void 0;
|
||||
|
||||
var _react = _interopRequireDefault(require("react"));
|
||||
|
||||
var _copyToClipboard = _interopRequireDefault(require("copy-to-clipboard"));
|
||||
|
||||
var _excluded = ["text", "onCopy", "options", "children"];
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
||||
|
||||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
var CopyToClipboard = /*#__PURE__*/function (_React$PureComponent) {
|
||||
_inherits(CopyToClipboard, _React$PureComponent);
|
||||
|
||||
var _super = _createSuper(CopyToClipboard);
|
||||
|
||||
function CopyToClipboard() {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, CopyToClipboard);
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _super.call.apply(_super, [this].concat(args));
|
||||
|
||||
_defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
|
||||
var _this$props = _this.props,
|
||||
text = _this$props.text,
|
||||
onCopy = _this$props.onCopy,
|
||||
children = _this$props.children,
|
||||
options = _this$props.options;
|
||||
|
||||
var elem = _react["default"].Children.only(children);
|
||||
|
||||
var result = (0, _copyToClipboard["default"])(text, options);
|
||||
|
||||
if (onCopy) {
|
||||
onCopy(text, result);
|
||||
} // Bypass onClick if it was present
|
||||
|
||||
|
||||
if (elem && elem.props && typeof elem.props.onClick === 'function') {
|
||||
elem.props.onClick(event);
|
||||
}
|
||||
});
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(CopyToClipboard, [{
|
||||
key: "render",
|
||||
value: function render() {
|
||||
var _this$props2 = this.props,
|
||||
_text = _this$props2.text,
|
||||
_onCopy = _this$props2.onCopy,
|
||||
_options = _this$props2.options,
|
||||
children = _this$props2.children,
|
||||
props = _objectWithoutProperties(_this$props2, _excluded);
|
||||
|
||||
var elem = _react["default"].Children.only(children);
|
||||
|
||||
return /*#__PURE__*/_react["default"].cloneElement(elem, _objectSpread(_objectSpread({}, props), {}, {
|
||||
onClick: this.onClick
|
||||
}));
|
||||
}
|
||||
}]);
|
||||
|
||||
return CopyToClipboard;
|
||||
}(_react["default"].PureComponent);
|
||||
|
||||
exports.CopyToClipboard = CopyToClipboard;
|
||||
|
||||
_defineProperty(CopyToClipboard, "defaultProps", {
|
||||
onCopy: undefined,
|
||||
options: undefined
|
||||
});
|
7
node_modules/react-copy-to-clipboard/lib/index.js
generated
vendored
7
node_modules/react-copy-to-clipboard/lib/index.js
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
var _require = require('./Component'),
|
||||
CopyToClipboard = _require.CopyToClipboard;
|
||||
|
||||
CopyToClipboard.CopyToClipboard = CopyToClipboard;
|
||||
module.exports = CopyToClipboard;
|
99
node_modules/react-copy-to-clipboard/package.json
generated
vendored
99
node_modules/react-copy-to-clipboard/package.json
generated
vendored
|
@ -1,99 +0,0 @@
|
|||
{
|
||||
"name": "react-copy-to-clipboard",
|
||||
"version": "5.1.0",
|
||||
"description": "Copy-to-clipboard React component",
|
||||
"main": "lib/index.js",
|
||||
"config": {
|
||||
"component": "CopyToClipboard",
|
||||
"externals": {
|
||||
"react": "React",
|
||||
"react-dom": "ReactDOM"
|
||||
},
|
||||
"include": [
|
||||
"https://unpkg.com/react/umd/react.production.min.js",
|
||||
"https://unpkg.com/react-dom/umd/react-dom.production.min.js"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn lib && yarn dist",
|
||||
"start": "NODE_ENV=development webpack-cli serve --config ./webpack/dev.config.js",
|
||||
"predist": "rm -rf ./build",
|
||||
"dist": "NODE_ENV=production webpack-cli --config ./webpack/dist.config.js && NODE_ENV=production webpack-cli --config ./webpack/min.config.js",
|
||||
"preghPages": "yarn pub",
|
||||
"ghPages": "gh-pages --dist ./pub --repo git@github.com:nkbt/react-copy-to-clipboard.git --user nik@butenko.me --branch gh-pages --message 'Publish examples' ",
|
||||
"prelib": "rm -rf ./lib",
|
||||
"lib": "NODE_ENV=production babel src --out-dir lib",
|
||||
"lint": "eslint .",
|
||||
"prepub": "rm -rf ./pub",
|
||||
"pub": "NODE_ENV=production webpack-cli --config ./webpack/pub.config.js",
|
||||
"test": "node test/Component-test.js",
|
||||
"prepublishOnly": "yarn build",
|
||||
"postversion": "git push --follow-tags",
|
||||
"deps": "depcheck",
|
||||
"check:deps": "[ ! $(depcheck | grep --invert-match 'No depcheck issue') ]"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nkbt/react-copy-to-clipboard.git"
|
||||
},
|
||||
"keywords": [
|
||||
"component",
|
||||
"react-component",
|
||||
"react",
|
||||
"copy to clipboard",
|
||||
"clipboard"
|
||||
],
|
||||
"author": "Nik Butenko <nik@butenko.me>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/nkbt/react-copy-to-clipboard/issues"
|
||||
},
|
||||
"homepage": "https://github.com/nkbt/react-copy-to-clipboard",
|
||||
"peerDependencies": {
|
||||
"react": "^15.3.0 || 16 || 17 || 18"
|
||||
},
|
||||
"dependencies": {
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.17.6",
|
||||
"@babel/core": "^7.17.9",
|
||||
"@babel/eslint-parser": "^7.17.0",
|
||||
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.17.3",
|
||||
"@babel/preset-env": "^7.16.11",
|
||||
"@babel/preset-react": "^7.16.7",
|
||||
"@babel/register": "^7.17.7",
|
||||
"babel-loader": "^8.2.4",
|
||||
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
||||
"css-loader": "^6.7.1",
|
||||
"depcheck": "^1.4.3",
|
||||
"eslint": "^8.13.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.29.4",
|
||||
"eslint-plugin-react-hooks": "^4.4.0",
|
||||
"gh-pages": "^3.2.3",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"html-webpack-tags-plugin": "^3.0.2",
|
||||
"mini-css-extract-plugin": "^2.6.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"tape": "^5.5.3",
|
||||
"webpack": "^5.72.0",
|
||||
"webpack-cli": "^4.9.2",
|
||||
"webpack-dev-server": "^4.8.1"
|
||||
},
|
||||
"files": [
|
||||
"build",
|
||||
"lib",
|
||||
"src",
|
||||
"LICENSE",
|
||||
"package.json",
|
||||
"README.md"
|
||||
],
|
||||
"packageManager": "yarn@3.2.0"
|
||||
}
|
60
node_modules/react-copy-to-clipboard/src/Component.js
generated
vendored
60
node_modules/react-copy-to-clipboard/src/Component.js
generated
vendored
|
@ -1,60 +0,0 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import copy from 'copy-to-clipboard';
|
||||
|
||||
|
||||
export class CopyToClipboard extends React.PureComponent {
|
||||
static propTypes = {
|
||||
text: PropTypes.string.isRequired,
|
||||
children: PropTypes.element.isRequired,
|
||||
onCopy: PropTypes.func,
|
||||
options: PropTypes.shape({
|
||||
debug: PropTypes.bool,
|
||||
message: PropTypes.string,
|
||||
format: PropTypes.string
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
static defaultProps = {
|
||||
onCopy: undefined,
|
||||
options: undefined
|
||||
};
|
||||
|
||||
|
||||
onClick = event => {
|
||||
const {
|
||||
text,
|
||||
onCopy,
|
||||
children,
|
||||
options
|
||||
} = this.props;
|
||||
|
||||
const elem = React.Children.only(children);
|
||||
|
||||
const result = copy(text, options);
|
||||
|
||||
if (onCopy) {
|
||||
onCopy(text, result);
|
||||
}
|
||||
|
||||
// Bypass onClick if it was present
|
||||
if (elem && elem.props && typeof elem.props.onClick === 'function') {
|
||||
elem.props.onClick(event);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const {
|
||||
text: _text,
|
||||
onCopy: _onCopy,
|
||||
options: _options,
|
||||
children,
|
||||
...props
|
||||
} = this.props;
|
||||
const elem = React.Children.only(children);
|
||||
|
||||
return React.cloneElement(elem, {...props, onClick: this.onClick});
|
||||
}
|
||||
}
|
6
node_modules/react-copy-to-clipboard/src/index.js
generated
vendored
6
node_modules/react-copy-to-clipboard/src/index.js
generated
vendored
|
@ -1,6 +0,0 @@
|
|||
|
||||
const {CopyToClipboard} = require('./Component');
|
||||
|
||||
|
||||
CopyToClipboard.CopyToClipboard = CopyToClipboard;
|
||||
module.exports = CopyToClipboard;
|
21
node_modules/react-is/LICENSE
generated
vendored
21
node_modules/react-is/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
104
node_modules/react-is/README.md
generated
vendored
104
node_modules/react-is/README.md
generated
vendored
|
@ -1,104 +0,0 @@
|
|||
# `react-is`
|
||||
|
||||
This package allows you to test arbitrary values and see if they're a particular React element type.
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
# Yarn
|
||||
yarn add react-is
|
||||
|
||||
# NPM
|
||||
npm install react-is
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Determining if a Component is Valid
|
||||
|
||||
```js
|
||||
import React from "react";
|
||||
import * as ReactIs from "react-is";
|
||||
|
||||
class ClassComponent extends React.Component {
|
||||
render() {
|
||||
return React.createElement("div");
|
||||
}
|
||||
}
|
||||
|
||||
const FunctionComponent = () => React.createElement("div");
|
||||
|
||||
const ForwardRefComponent = React.forwardRef((props, ref) =>
|
||||
React.createElement(Component, { forwardedRef: ref, ...props })
|
||||
);
|
||||
|
||||
const Context = React.createContext(false);
|
||||
|
||||
ReactIs.isValidElementType("div"); // true
|
||||
ReactIs.isValidElementType(ClassComponent); // true
|
||||
ReactIs.isValidElementType(FunctionComponent); // true
|
||||
ReactIs.isValidElementType(ForwardRefComponent); // true
|
||||
ReactIs.isValidElementType(Context.Provider); // true
|
||||
ReactIs.isValidElementType(Context.Consumer); // true
|
||||
ReactIs.isValidElementType(React.createFactory("div")); // true
|
||||
```
|
||||
|
||||
### Determining an Element's Type
|
||||
|
||||
#### Context
|
||||
|
||||
```js
|
||||
import React from "react";
|
||||
import * as ReactIs from 'react-is';
|
||||
|
||||
const ThemeContext = React.createContext("blue");
|
||||
|
||||
ReactIs.isContextConsumer(<ThemeContext.Consumer />); // true
|
||||
ReactIs.isContextProvider(<ThemeContext.Provider />); // true
|
||||
ReactIs.typeOf(<ThemeContext.Provider />) === ReactIs.ContextProvider; // true
|
||||
ReactIs.typeOf(<ThemeContext.Consumer />) === ReactIs.ContextConsumer; // true
|
||||
```
|
||||
|
||||
#### Element
|
||||
|
||||
```js
|
||||
import React from "react";
|
||||
import * as ReactIs from 'react-is';
|
||||
|
||||
ReactIs.isElement(<div />); // true
|
||||
ReactIs.typeOf(<div />) === ReactIs.Element; // true
|
||||
```
|
||||
|
||||
#### Fragment
|
||||
|
||||
```js
|
||||
import React from "react";
|
||||
import * as ReactIs from 'react-is';
|
||||
|
||||
ReactIs.isFragment(<></>); // true
|
||||
ReactIs.typeOf(<></>) === ReactIs.Fragment; // true
|
||||
```
|
||||
|
||||
#### Portal
|
||||
|
||||
```js
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import * as ReactIs from 'react-is';
|
||||
|
||||
const div = document.createElement("div");
|
||||
const portal = ReactDOM.createPortal(<div />, div);
|
||||
|
||||
ReactIs.isPortal(portal); // true
|
||||
ReactIs.typeOf(portal) === ReactIs.Portal; // true
|
||||
```
|
||||
|
||||
#### StrictMode
|
||||
|
||||
```js
|
||||
import React from "react";
|
||||
import * as ReactIs from 'react-is';
|
||||
|
||||
ReactIs.isStrictMode(<React.StrictMode />); // true
|
||||
ReactIs.typeOf(<React.StrictMode />) === ReactIs.StrictMode; // true
|
||||
```
|
8
node_modules/react-is/build-info.json
generated
vendored
8
node_modules/react-is/build-info.json
generated
vendored
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"branch": "pull/18344",
|
||||
"buildNumber": "106499",
|
||||
"checksum": "7fe5a2e",
|
||||
"commit": "da834083c",
|
||||
"environment": "ci",
|
||||
"reactVersion": "16.12.0-da834083c"
|
||||
}
|
181
node_modules/react-is/cjs/react-is.development.js
generated
vendored
181
node_modules/react-is/cjs/react-is.development.js
generated
vendored
|
@ -1,181 +0,0 @@
|
|||
/** @license React v16.13.1
|
||||
* react-is.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||||
// nor polyfill, then a plain number is used for performance.
|
||||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
||||
// (unstable) APIs that have been removed. Can we remove the symbols?
|
||||
|
||||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||||
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
||||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||||
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
||||
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
||||
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
||||
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
||||
|
||||
function isValidElementType(type) {
|
||||
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
||||
}
|
||||
|
||||
function typeOf(object) {
|
||||
if (typeof object === 'object' && object !== null) {
|
||||
var $$typeof = object.$$typeof;
|
||||
|
||||
switch ($$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
var type = object.type;
|
||||
|
||||
switch (type) {
|
||||
case REACT_ASYNC_MODE_TYPE:
|
||||
case REACT_CONCURRENT_MODE_TYPE:
|
||||
case REACT_FRAGMENT_TYPE:
|
||||
case REACT_PROFILER_TYPE:
|
||||
case REACT_STRICT_MODE_TYPE:
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return type;
|
||||
|
||||
default:
|
||||
var $$typeofType = type && type.$$typeof;
|
||||
|
||||
switch ($$typeofType) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return $$typeofType;
|
||||
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
case REACT_PORTAL_TYPE:
|
||||
return $$typeof;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
} // AsyncMode is deprecated along with isAsyncMode
|
||||
|
||||
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||||
var Element = REACT_ELEMENT_TYPE;
|
||||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||||
var Fragment = REACT_FRAGMENT_TYPE;
|
||||
var Lazy = REACT_LAZY_TYPE;
|
||||
var Memo = REACT_MEMO_TYPE;
|
||||
var Portal = REACT_PORTAL_TYPE;
|
||||
var Profiler = REACT_PROFILER_TYPE;
|
||||
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
var Suspense = REACT_SUSPENSE_TYPE;
|
||||
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
||||
|
||||
function isAsyncMode(object) {
|
||||
{
|
||||
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||||
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
||||
|
||||
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
||||
}
|
||||
}
|
||||
|
||||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||||
}
|
||||
function isConcurrentMode(object) {
|
||||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||||
}
|
||||
function isContextConsumer(object) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
}
|
||||
function isContextProvider(object) {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
}
|
||||
function isElement(object) {
|
||||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
function isForwardRef(object) {
|
||||
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||||
}
|
||||
function isFragment(object) {
|
||||
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||||
}
|
||||
function isLazy(object) {
|
||||
return typeOf(object) === REACT_LAZY_TYPE;
|
||||
}
|
||||
function isMemo(object) {
|
||||
return typeOf(object) === REACT_MEMO_TYPE;
|
||||
}
|
||||
function isPortal(object) {
|
||||
return typeOf(object) === REACT_PORTAL_TYPE;
|
||||
}
|
||||
function isProfiler(object) {
|
||||
return typeOf(object) === REACT_PROFILER_TYPE;
|
||||
}
|
||||
function isStrictMode(object) {
|
||||
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||||
}
|
||||
function isSuspense(object) {
|
||||
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||||
}
|
||||
|
||||
exports.AsyncMode = AsyncMode;
|
||||
exports.ConcurrentMode = ConcurrentMode;
|
||||
exports.ContextConsumer = ContextConsumer;
|
||||
exports.ContextProvider = ContextProvider;
|
||||
exports.Element = Element;
|
||||
exports.ForwardRef = ForwardRef;
|
||||
exports.Fragment = Fragment;
|
||||
exports.Lazy = Lazy;
|
||||
exports.Memo = Memo;
|
||||
exports.Portal = Portal;
|
||||
exports.Profiler = Profiler;
|
||||
exports.StrictMode = StrictMode;
|
||||
exports.Suspense = Suspense;
|
||||
exports.isAsyncMode = isAsyncMode;
|
||||
exports.isConcurrentMode = isConcurrentMode;
|
||||
exports.isContextConsumer = isContextConsumer;
|
||||
exports.isContextProvider = isContextProvider;
|
||||
exports.isElement = isElement;
|
||||
exports.isForwardRef = isForwardRef;
|
||||
exports.isFragment = isFragment;
|
||||
exports.isLazy = isLazy;
|
||||
exports.isMemo = isMemo;
|
||||
exports.isPortal = isPortal;
|
||||
exports.isProfiler = isProfiler;
|
||||
exports.isStrictMode = isStrictMode;
|
||||
exports.isSuspense = isSuspense;
|
||||
exports.isValidElementType = isValidElementType;
|
||||
exports.typeOf = typeOf;
|
||||
})();
|
||||
}
|
15
node_modules/react-is/cjs/react-is.production.min.js
generated
vendored
15
node_modules/react-is/cjs/react-is.production.min.js
generated
vendored
|
@ -1,15 +0,0 @@
|
|||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
||||
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
||||
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
|
||||
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
|
||||
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
||||
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
7
node_modules/react-is/index.js
generated
vendored
7
node_modules/react-is/index.js
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./cjs/react-is.production.min.js');
|
||||
} else {
|
||||
module.exports = require('./cjs/react-is.development.js');
|
||||
}
|
27
node_modules/react-is/package.json
generated
vendored
27
node_modules/react-is/package.json
generated
vendored
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"name": "react-is",
|
||||
"version": "16.13.1",
|
||||
"description": "Brand checking of React Elements.",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/react.git",
|
||||
"directory": "packages/react-is"
|
||||
},
|
||||
"keywords": [
|
||||
"react"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/facebook/react/issues"
|
||||
},
|
||||
"homepage": "https://reactjs.org/",
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"README.md",
|
||||
"build-info.json",
|
||||
"index.js",
|
||||
"cjs/",
|
||||
"umd/"
|
||||
]
|
||||
}
|
181
node_modules/react-is/umd/react-is.development.js
generated
vendored
181
node_modules/react-is/umd/react-is.development.js
generated
vendored
|
@ -1,181 +0,0 @@
|
|||
/** @license React v16.13.1
|
||||
* react-is.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = global || self, factory(global.ReactIs = {}));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||||
// nor polyfill, then a plain number is used for performance.
|
||||
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
||||
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
||||
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
||||
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
||||
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
||||
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
||||
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
||||
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
||||
// (unstable) APIs that have been removed. Can we remove the symbols?
|
||||
|
||||
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
||||
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
||||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
||||
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
||||
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
||||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
||||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
||||
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
||||
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
||||
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
||||
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
||||
|
||||
function isValidElementType(type) {
|
||||
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
||||
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
||||
}
|
||||
|
||||
function typeOf(object) {
|
||||
if (typeof object === 'object' && object !== null) {
|
||||
var $$typeof = object.$$typeof;
|
||||
|
||||
switch ($$typeof) {
|
||||
case REACT_ELEMENT_TYPE:
|
||||
var type = object.type;
|
||||
|
||||
switch (type) {
|
||||
case REACT_ASYNC_MODE_TYPE:
|
||||
case REACT_CONCURRENT_MODE_TYPE:
|
||||
case REACT_FRAGMENT_TYPE:
|
||||
case REACT_PROFILER_TYPE:
|
||||
case REACT_STRICT_MODE_TYPE:
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return type;
|
||||
|
||||
default:
|
||||
var $$typeofType = type && type.$$typeof;
|
||||
|
||||
switch ($$typeofType) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
case REACT_PROVIDER_TYPE:
|
||||
return $$typeofType;
|
||||
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
case REACT_PORTAL_TYPE:
|
||||
return $$typeof;
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
} // AsyncMode is deprecated along with isAsyncMode
|
||||
|
||||
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
||||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
||||
var ContextConsumer = REACT_CONTEXT_TYPE;
|
||||
var ContextProvider = REACT_PROVIDER_TYPE;
|
||||
var Element = REACT_ELEMENT_TYPE;
|
||||
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
||||
var Fragment = REACT_FRAGMENT_TYPE;
|
||||
var Lazy = REACT_LAZY_TYPE;
|
||||
var Memo = REACT_MEMO_TYPE;
|
||||
var Portal = REACT_PORTAL_TYPE;
|
||||
var Profiler = REACT_PROFILER_TYPE;
|
||||
var StrictMode = REACT_STRICT_MODE_TYPE;
|
||||
var Suspense = REACT_SUSPENSE_TYPE;
|
||||
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
||||
|
||||
function isAsyncMode(object) {
|
||||
{
|
||||
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
||||
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
||||
|
||||
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
||||
}
|
||||
}
|
||||
|
||||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
||||
}
|
||||
function isConcurrentMode(object) {
|
||||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
||||
}
|
||||
function isContextConsumer(object) {
|
||||
return typeOf(object) === REACT_CONTEXT_TYPE;
|
||||
}
|
||||
function isContextProvider(object) {
|
||||
return typeOf(object) === REACT_PROVIDER_TYPE;
|
||||
}
|
||||
function isElement(object) {
|
||||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
function isForwardRef(object) {
|
||||
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
||||
}
|
||||
function isFragment(object) {
|
||||
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
||||
}
|
||||
function isLazy(object) {
|
||||
return typeOf(object) === REACT_LAZY_TYPE;
|
||||
}
|
||||
function isMemo(object) {
|
||||
return typeOf(object) === REACT_MEMO_TYPE;
|
||||
}
|
||||
function isPortal(object) {
|
||||
return typeOf(object) === REACT_PORTAL_TYPE;
|
||||
}
|
||||
function isProfiler(object) {
|
||||
return typeOf(object) === REACT_PROFILER_TYPE;
|
||||
}
|
||||
function isStrictMode(object) {
|
||||
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
||||
}
|
||||
function isSuspense(object) {
|
||||
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
||||
}
|
||||
|
||||
exports.AsyncMode = AsyncMode;
|
||||
exports.ConcurrentMode = ConcurrentMode;
|
||||
exports.ContextConsumer = ContextConsumer;
|
||||
exports.ContextProvider = ContextProvider;
|
||||
exports.Element = Element;
|
||||
exports.ForwardRef = ForwardRef;
|
||||
exports.Fragment = Fragment;
|
||||
exports.Lazy = Lazy;
|
||||
exports.Memo = Memo;
|
||||
exports.Portal = Portal;
|
||||
exports.Profiler = Profiler;
|
||||
exports.StrictMode = StrictMode;
|
||||
exports.Suspense = Suspense;
|
||||
exports.isAsyncMode = isAsyncMode;
|
||||
exports.isConcurrentMode = isConcurrentMode;
|
||||
exports.isContextConsumer = isContextConsumer;
|
||||
exports.isContextProvider = isContextProvider;
|
||||
exports.isElement = isElement;
|
||||
exports.isForwardRef = isForwardRef;
|
||||
exports.isFragment = isFragment;
|
||||
exports.isLazy = isLazy;
|
||||
exports.isMemo = isMemo;
|
||||
exports.isPortal = isPortal;
|
||||
exports.isProfiler = isProfiler;
|
||||
exports.isStrictMode = isStrictMode;
|
||||
exports.isSuspense = isSuspense;
|
||||
exports.isValidElementType = isValidElementType;
|
||||
exports.typeOf = typeOf;
|
||||
|
||||
})));
|
13
node_modules/react-is/umd/react-is.production.min.js
generated
vendored
13
node_modules/react-is/umd/react-is.production.min.js
generated
vendored
|
@ -1,13 +0,0 @@
|
|||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
'use strict';(function(b,d){"object"===typeof exports&&"undefined"!==typeof module?d(exports):"function"===typeof define&&define.amd?define(["exports"],d):(b=b||self,d(b.ReactIs={}))})(this,function(b){function d(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case r:switch(a=a.type,a){case t:case e:case f:case g:case h:case k:return a;default:switch(a=a&&a.$$typeof,a){case l:case m:case n:case p:case q:return a;default:return b}}case u:return b}}}function v(a){return d(a)===e}var c=
|
||||
"function"===typeof Symbol&&Symbol.for,r=c?Symbol.for("react.element"):60103,u=c?Symbol.for("react.portal"):60106,f=c?Symbol.for("react.fragment"):60107,h=c?Symbol.for("react.strict_mode"):60108,g=c?Symbol.for("react.profiler"):60114,q=c?Symbol.for("react.provider"):60109,l=c?Symbol.for("react.context"):60110,t=c?Symbol.for("react.async_mode"):60111,e=c?Symbol.for("react.concurrent_mode"):60111,m=c?Symbol.for("react.forward_ref"):60112,k=c?Symbol.for("react.suspense"):60113,w=c?Symbol.for("react.suspense_list"):
|
||||
60120,p=c?Symbol.for("react.memo"):60115,n=c?Symbol.for("react.lazy"):60116,x=c?Symbol.for("react.block"):60121,y=c?Symbol.for("react.fundamental"):60117,z=c?Symbol.for("react.responder"):60118,A=c?Symbol.for("react.scope"):60119;b.AsyncMode=t;b.ConcurrentMode=e;b.ContextConsumer=l;b.ContextProvider=q;b.Element=r;b.ForwardRef=m;b.Fragment=f;b.Lazy=n;b.Memo=p;b.Portal=u;b.Profiler=g;b.StrictMode=h;b.Suspense=k;b.isAsyncMode=function(a){return v(a)||d(a)===t};b.isConcurrentMode=v;b.isContextConsumer=
|
||||
function(a){return d(a)===l};b.isContextProvider=function(a){return d(a)===q};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===r};b.isForwardRef=function(a){return d(a)===m};b.isFragment=function(a){return d(a)===f};b.isLazy=function(a){return d(a)===n};b.isMemo=function(a){return d(a)===p};b.isPortal=function(a){return d(a)===u};b.isProfiler=function(a){return d(a)===g};b.isStrictMode=function(a){return d(a)===h};b.isSuspense=function(a){return d(a)===k};b.isValidElementType=
|
||||
function(a){return"string"===typeof a||"function"===typeof a||a===f||a===e||a===g||a===h||a===k||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===n||a.$$typeof===p||a.$$typeof===q||a.$$typeof===l||a.$$typeof===m||a.$$typeof===y||a.$$typeof===z||a.$$typeof===A||a.$$typeof===x)};b.typeOf=d});
|
21
node_modules/react/LICENSE
generated
vendored
21
node_modules/react/LICENSE
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
37
node_modules/react/README.md
generated
vendored
37
node_modules/react/README.md
generated
vendored
|
@ -1,37 +0,0 @@
|
|||
# `react`
|
||||
|
||||
React is a JavaScript library for creating user interfaces.
|
||||
|
||||
The `react` package contains only the functionality necessary to define React components. It is typically used together with a React renderer like `react-dom` for the web, or `react-native` for the native environments.
|
||||
|
||||
**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import { useState } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
function Counter() {
|
||||
const [count, setCount] = useState(0);
|
||||
return (
|
||||
<>
|
||||
<h1>{count}</h1>
|
||||
<button onClick={() => setCount(count + 1)}>
|
||||
Increment
|
||||
</button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const root = createRoot(document.getElementById('root'));
|
||||
root.render(<App />);
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
See https://reactjs.org/
|
||||
|
||||
## API
|
||||
|
||||
See https://reactjs.org/docs/react-api.html
|
1296
node_modules/react/cjs/react-jsx-dev-runtime.development.js
generated
vendored
1296
node_modules/react/cjs/react-jsx-dev-runtime.development.js
generated
vendored
File diff suppressed because it is too large
Load diff
10
node_modules/react/cjs/react-jsx-dev-runtime.production.min.js
generated
vendored
10
node_modules/react/cjs/react-jsx-dev-runtime.production.min.js
generated
vendored
|
@ -1,10 +0,0 @@
|
|||
/**
|
||||
* @license React
|
||||
* react-jsx-dev-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
|
10
node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js
generated
vendored
10
node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js
generated
vendored
|
@ -1,10 +0,0 @@
|
|||
/**
|
||||
* @license React
|
||||
* react-jsx-dev-runtime.profiling.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
'use strict';var a=Symbol.for("react.fragment");exports.Fragment=a;exports.jsxDEV=void 0;
|
1314
node_modules/react/cjs/react-jsx-runtime.development.js
generated
vendored
1314
node_modules/react/cjs/react-jsx-runtime.development.js
generated
vendored
File diff suppressed because it is too large
Load diff
11
node_modules/react/cjs/react-jsx-runtime.production.min.js
generated
vendored
11
node_modules/react/cjs/react-jsx-runtime.production.min.js
generated
vendored
|
@ -1,11 +0,0 @@
|
|||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
||||
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
|
11
node_modules/react/cjs/react-jsx-runtime.profiling.min.js
generated
vendored
11
node_modules/react/cjs/react-jsx-runtime.profiling.min.js
generated
vendored
|
@ -1,11 +0,0 @@
|
|||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.profiling.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
'use strict';var f=require("react"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
||||
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
|
2739
node_modules/react/cjs/react.development.js
generated
vendored
2739
node_modules/react/cjs/react.development.js
generated
vendored
File diff suppressed because it is too large
Load diff
26
node_modules/react/cjs/react.production.min.js
generated
vendored
26
node_modules/react/cjs/react.production.min.js
generated
vendored
|
@ -1,26 +0,0 @@
|
|||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
'use strict';var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return"function"===typeof a?a:null}
|
||||
var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};
|
||||
E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;
|
||||
H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};
|
||||
function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}
|
||||
function N(a,b){return{$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
|
||||
function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k=
|
||||
a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c)}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}
|
||||
function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}
|
||||
var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};exports.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;S(a,function(){b++});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};exports.Component=E;exports.Fragment=p;
|
||||
exports.Profiler=r;exports.PureComponent=G;exports.StrictMode=q;exports.Suspense=w;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;
|
||||
exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);
|
||||
for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};exports.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};
|
||||
exports.forwardRef=function(a){return{$$typeof:v,render:a}};exports.isValidElement=O;exports.lazy=function(a){return{$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};exports.memo=function(a,b){return{$$typeof:x,type:a,compare:void 0===b?null:b}};exports.startTransition=function(a){var b=V.transition;V.transition={};try{a()}finally{V.transition=b}};exports.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};
|
||||
exports.useCallback=function(a,b){return U.current.useCallback(a,b)};exports.useContext=function(a){return U.current.useContext(a)};exports.useDebugValue=function(){};exports.useDeferredValue=function(a){return U.current.useDeferredValue(a)};exports.useEffect=function(a,b){return U.current.useEffect(a,b)};exports.useId=function(){return U.current.useId()};exports.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};
|
||||
exports.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};exports.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return U.current.useMemo(a,b)};exports.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};exports.useRef=function(a){return U.current.useRef(a)};exports.useState=function(a){return U.current.useState(a)};exports.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};
|
||||
exports.useTransition=function(){return U.current.useTransition()};exports.version="18.2.0";
|
20
node_modules/react/cjs/react.shared-subset.development.js
generated
vendored
20
node_modules/react/cjs/react.shared-subset.development.js
generated
vendored
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* @license React
|
||||
* react.shared-subset.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// eslint-disable-next-line react-internal/prod-error-codes
|
||||
throw new Error('This entry point is not yet supported outside of experimental channels');
|
||||
})();
|
||||
}
|
10
node_modules/react/cjs/react.shared-subset.production.min.js
generated
vendored
10
node_modules/react/cjs/react.shared-subset.production.min.js
generated
vendored
|
@ -1,10 +0,0 @@
|
|||
/**
|
||||
* @license React
|
||||
* react.shared-subset.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
'use strict';throw Error("This entry point is not yet supported outside of experimental channels");
|
7
node_modules/react/index.js
generated
vendored
7
node_modules/react/index.js
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./cjs/react.production.min.js');
|
||||
} else {
|
||||
module.exports = require('./cjs/react.development.js');
|
||||
}
|
7
node_modules/react/jsx-dev-runtime.js
generated
vendored
7
node_modules/react/jsx-dev-runtime.js
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');
|
||||
} else {
|
||||
module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
|
||||
}
|
7
node_modules/react/jsx-runtime.js
generated
vendored
7
node_modules/react/jsx-runtime.js
generated
vendored
|
@ -1,7 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./cjs/react-jsx-runtime.production.min.js');
|
||||
} else {
|
||||
module.exports = require('./cjs/react-jsx-runtime.development.js');
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue