mirror of
https://github.com/cachix/install-nix-action.git
synced 2025-06-08 09:54:28 +00:00
v5
This commit is contained in:
parent
d1407282e6
commit
08403cd828
6774 changed files with 1602535 additions and 1 deletions
21
node_modules/react-is/LICENSE
generated
vendored
Normal file
21
node_modules/react-is/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
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
Normal file
104
node_modules/react-is/README.md
generated
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
# `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
Normal file
8
node_modules/react-is/build-info.json
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"branch": "pull/16944",
|
||||
"buildNumber": "48896",
|
||||
"checksum": "2bf0c82",
|
||||
"commit": "d346d9208",
|
||||
"environment": "ci",
|
||||
"reactVersion": "16.9.0-canary-d346d9208"
|
||||
}
|
236
node_modules/react-is/cjs/react-is.development.js
generated
vendored
Normal file
236
node_modules/react-is/cjs/react-is.development.js
generated
vendored
Normal file
|
@ -0,0 +1,236 @@
|
|||
/** @license React v16.10.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';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
// 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_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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forked from fbjs/warning:
|
||||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
||||
*
|
||||
* Only change is we use console.warn instead of console.error,
|
||||
* and do nothing when 'console' is not supported.
|
||||
* This really simplifies the code.
|
||||
* ---
|
||||
* Similar to invariant but only logs a warning if the condition is not met.
|
||||
* This can be used to log issues in development environments in critical
|
||||
* paths. Removing the logging code for production environments will keep the
|
||||
* same logic and follow the same code paths.
|
||||
*/
|
||||
var lowPriorityWarningWithoutStack = function () {};
|
||||
|
||||
{
|
||||
var printWarning = function (format) {
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
|
||||
if (typeof console !== 'undefined') {
|
||||
console.warn(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) {}
|
||||
};
|
||||
|
||||
lowPriorityWarningWithoutStack = function (condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
printWarning.apply(void 0, [format].concat(args));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
|
||||
|
||||
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_PROVIDER_TYPE:
|
||||
return $$typeofType;
|
||||
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
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;
|
||||
lowPriorityWarningWithoutStack$1(false, '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.typeOf = typeOf;
|
||||
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.isValidElementType = isValidElementType;
|
||||
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;
|
||||
})();
|
||||
}
|
15
node_modules/react-is/cjs/react-is.production.min.js
generated
vendored
Normal file
15
node_modules/react-is/cjs/react-is.production.min.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/** @license React v16.10.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';Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
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.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(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 h:return a;default:return u}}case t:case r:case d:return u}}}function z(a){return y(a)===m}
|
||||
exports.typeOf=y;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.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===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
|
||||
exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
|
7
node_modules/react-is/index.js
generated
vendored
Normal file
7
node_modules/react-is/index.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
'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
Normal file
27
node_modules/react-is/package.json
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "react-is",
|
||||
"version": "16.10.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/"
|
||||
]
|
||||
}
|
236
node_modules/react-is/umd/react-is.development.js
generated
vendored
Normal file
236
node_modules/react-is/umd/react-is.development.js
generated
vendored
Normal file
|
@ -0,0 +1,236 @@
|
|||
/** @license React v16.10.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) :
|
||||
(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_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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forked from fbjs/warning:
|
||||
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
||||
*
|
||||
* Only change is we use console.warn instead of console.error,
|
||||
* and do nothing when 'console' is not supported.
|
||||
* This really simplifies the code.
|
||||
* ---
|
||||
* Similar to invariant but only logs a warning if the condition is not met.
|
||||
* This can be used to log issues in development environments in critical
|
||||
* paths. Removing the logging code for production environments will keep the
|
||||
* same logic and follow the same code paths.
|
||||
*/
|
||||
var lowPriorityWarningWithoutStack = function () {};
|
||||
|
||||
{
|
||||
var printWarning = function (format) {
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
args[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
||||
return args[argIndex++];
|
||||
});
|
||||
|
||||
if (typeof console !== 'undefined') {
|
||||
console.warn(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) {}
|
||||
};
|
||||
|
||||
lowPriorityWarningWithoutStack = function (condition, format) {
|
||||
if (format === undefined) {
|
||||
throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 2] = arguments[_key2];
|
||||
}
|
||||
|
||||
printWarning.apply(void 0, [format].concat(args));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
|
||||
|
||||
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_PROVIDER_TYPE:
|
||||
return $$typeofType;
|
||||
|
||||
default:
|
||||
return $$typeof;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
case REACT_LAZY_TYPE:
|
||||
case REACT_MEMO_TYPE:
|
||||
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;
|
||||
lowPriorityWarningWithoutStack$1(false, '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.typeOf = typeOf;
|
||||
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.isValidElementType = isValidElementType;
|
||||
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;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
13
node_modules/react-is/umd/react-is.production.min.js
generated
vendored
Normal file
13
node_modules/react-is/umd/react-is.production.min.js
generated
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
/** @license React v16.10.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,c){"object"===typeof exports&&"undefined"!==typeof module?c(exports):"function"===typeof define&&define.amd?define(["exports"],c):c(b.ReactIs={})})(this,function(b){function c(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:return a;default:return b}}case p:case q:case u:return b}}}function v(a){return c(a)===e}var d="function"===
|
||||
typeof Symbol&&Symbol.for,r=d?Symbol.for("react.element"):60103,u=d?Symbol.for("react.portal"):60106,f=d?Symbol.for("react.fragment"):60107,h=d?Symbol.for("react.strict_mode"):60108,g=d?Symbol.for("react.profiler"):60114,n=d?Symbol.for("react.provider"):60109,l=d?Symbol.for("react.context"):60110,t=d?Symbol.for("react.async_mode"):60111,e=d?Symbol.for("react.concurrent_mode"):60111,m=d?Symbol.for("react.forward_ref"):60112,k=d?Symbol.for("react.suspense"):60113,w=d?Symbol.for("react.suspense_list"):
|
||||
60120,q=d?Symbol.for("react.memo"):60115,p=d?Symbol.for("react.lazy"):60116,x=d?Symbol.for("react.fundamental"):60117,y=d?Symbol.for("react.responder"):60118,z=d?Symbol.for("react.scope"):60119;b.typeOf=c;b.AsyncMode=t;b.ConcurrentMode=e;b.ContextConsumer=l;b.ContextProvider=n;b.Element=r;b.ForwardRef=m;b.Fragment=f;b.Lazy=p;b.Memo=q;b.Portal=u;b.Profiler=g;b.StrictMode=h;b.Suspense=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===p||a.$$typeof===q||a.$$typeof===n||a.$$typeof===l||a.$$typeof===m||a.$$typeof===x||a.$$typeof===y||a.$$typeof===z)};b.isAsyncMode=function(a){return v(a)||c(a)===t};b.isConcurrentMode=v;b.isContextConsumer=function(a){return c(a)===l};b.isContextProvider=function(a){return c(a)===n};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===r};b.isForwardRef=function(a){return c(a)===m};b.isFragment=function(a){return c(a)===f};
|
||||
b.isLazy=function(a){return c(a)===p};b.isMemo=function(a){return c(a)===q};b.isPortal=function(a){return c(a)===u};b.isProfiler=function(a){return c(a)===g};b.isStrictMode=function(a){return c(a)===h};b.isSuspense=function(a){return c(a)===k};Object.defineProperty(b,"__esModule",{value:!0})});
|
Loading…
Add table
Add a link
Reference in a new issue