react-is 16.6.0-alpha.8af6728 → 16.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.
|
|
1
|
+
/** @license React v16.6.1
|
|
2
2
|
* react-is.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -28,15 +28,17 @@ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeac
|
|
|
28
28
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
29
29
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
30
30
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
31
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
31
32
|
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
32
33
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
33
34
|
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
34
|
-
var
|
|
35
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
36
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
35
37
|
|
|
36
38
|
function isValidElementType(type) {
|
|
37
39
|
return typeof type === 'string' || typeof type === 'function' ||
|
|
38
40
|
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
39
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (typeof
|
|
41
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_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);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
/**
|
|
@@ -101,6 +103,7 @@ function typeOf(object) {
|
|
|
101
103
|
var type = object.type;
|
|
102
104
|
|
|
103
105
|
switch (type) {
|
|
106
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
104
107
|
case REACT_CONCURRENT_MODE_TYPE:
|
|
105
108
|
case REACT_FRAGMENT_TYPE:
|
|
106
109
|
case REACT_PROFILER_TYPE:
|
|
@@ -126,8 +129,8 @@ function typeOf(object) {
|
|
|
126
129
|
return undefined;
|
|
127
130
|
}
|
|
128
131
|
|
|
129
|
-
// AsyncMode
|
|
130
|
-
var AsyncMode =
|
|
132
|
+
// AsyncMode is deprecated along with isAsyncMode
|
|
133
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
131
134
|
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
132
135
|
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
133
136
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
@@ -148,7 +151,7 @@ function isAsyncMode(object) {
|
|
|
148
151
|
lowPriorityWarning$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.');
|
|
149
152
|
}
|
|
150
153
|
}
|
|
151
|
-
return isConcurrentMode(object);
|
|
154
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
152
155
|
}
|
|
153
156
|
function isConcurrentMode(object) {
|
|
154
157
|
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.
|
|
1
|
+
/** @license React v16.6.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';Object.defineProperty(exports,"__esModule",{value:!0});
|
|
11
|
-
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.
|
|
12
|
-
function
|
|
13
|
-
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===
|
|
14
|
-
exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return
|
|
11
|
+
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,r=b?Symbol.for("react.memo"):
|
|
12
|
+
60115,t=b?Symbol.for("react.lazy"):60116;function u(a){if("object"===typeof a&&null!==a){var q=a.$$typeof;switch(q){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return q}}case d:return q}}}function v(a){return u(a)===m}exports.typeOf=u;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;
|
|
13
|
+
exports.Profiler=g;exports.Portal=d;exports.StrictMode=f;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||u(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return u(a)===k};exports.isContextProvider=function(a){return u(a)===h};
|
|
14
|
+
exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return u(a)===n};exports.isFragment=function(a){return u(a)===e};exports.isProfiler=function(a){return u(a)===g};exports.isPortal=function(a){return u(a)===d};exports.isStrictMode=function(a){return u(a)===f};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-is",
|
|
3
|
-
"version": "16.6.
|
|
3
|
+
"version": "16.6.3",
|
|
4
4
|
"description": "Brand checking of React Elements.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "facebook/react",
|
|
@@ -18,5 +18,22 @@
|
|
|
18
18
|
"index.js",
|
|
19
19
|
"cjs/",
|
|
20
20
|
"umd/"
|
|
21
|
-
]
|
|
22
|
-
|
|
21
|
+
],
|
|
22
|
+
"buildInfo": {
|
|
23
|
+
"buildID": "0c756fb-f7f79fd",
|
|
24
|
+
"checksum": "d94496cd35663b7e3250c3d4a9069d8229b72b27",
|
|
25
|
+
"unstable": false,
|
|
26
|
+
"partial": false,
|
|
27
|
+
"packages": [
|
|
28
|
+
"create-subscription",
|
|
29
|
+
"jest-react",
|
|
30
|
+
"react",
|
|
31
|
+
"react-art",
|
|
32
|
+
"react-dom",
|
|
33
|
+
"react-is",
|
|
34
|
+
"react-reconciler",
|
|
35
|
+
"react-test-renderer",
|
|
36
|
+
"scheduler"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.
|
|
1
|
+
/** @license React v16.6.1
|
|
2
2
|
* react-is.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -26,15 +26,17 @@ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeac
|
|
|
26
26
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
27
27
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
28
28
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
29
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
29
30
|
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
30
31
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
31
32
|
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
32
|
-
var
|
|
33
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
34
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
33
35
|
|
|
34
36
|
function isValidElementType(type) {
|
|
35
37
|
return typeof type === 'string' || typeof type === 'function' ||
|
|
36
38
|
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
37
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (typeof
|
|
39
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_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);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
/**
|
|
@@ -99,6 +101,7 @@ function typeOf(object) {
|
|
|
99
101
|
var type = object.type;
|
|
100
102
|
|
|
101
103
|
switch (type) {
|
|
104
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
102
105
|
case REACT_CONCURRENT_MODE_TYPE:
|
|
103
106
|
case REACT_FRAGMENT_TYPE:
|
|
104
107
|
case REACT_PROFILER_TYPE:
|
|
@@ -124,8 +127,8 @@ function typeOf(object) {
|
|
|
124
127
|
return undefined;
|
|
125
128
|
}
|
|
126
129
|
|
|
127
|
-
// AsyncMode
|
|
128
|
-
var AsyncMode =
|
|
130
|
+
// AsyncMode is deprecated along with isAsyncMode
|
|
131
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
129
132
|
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
130
133
|
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
131
134
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
@@ -146,7 +149,7 @@ function isAsyncMode(object) {
|
|
|
146
149
|
lowPriorityWarning$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.');
|
|
147
150
|
}
|
|
148
151
|
}
|
|
149
|
-
return isConcurrentMode(object);
|
|
152
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
150
153
|
}
|
|
151
154
|
function isConcurrentMode(object) {
|
|
152
155
|
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.6.
|
|
1
|
+
/** @license React v16.6.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
'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 n:switch(a=a.type,a){case e:case f:case g:case h:return a;default:switch(a=a&&a.$$typeof,a){case k:case l:case m:return a;default:return b}}case
|
|
10
|
-
n=d?Symbol.for("react.element"):60103,
|
|
11
|
-
m;b.Element=n;b.ForwardRef=l;b.Fragment=f;b.Profiler=g;b.Portal=
|
|
12
|
-
typeof a&&null!==a&&a.$$typeof===n};b.isForwardRef=function(a){return c(a)===l};b.isFragment=function(a){return c(a)===f};b.isProfiler=function(a){return c(a)===g};b.isPortal=function(a){return c(a)===
|
|
9
|
+
'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 n:switch(a=a.type,a){case p:case e:case f:case g:case h:return a;default:switch(a=a&&a.$$typeof,a){case k:case l:case m:return a;default:return b}}case q:return b}}}function r(a){return c(a)===e}var d="function"===typeof Symbol&&Symbol.for,
|
|
10
|
+
n=d?Symbol.for("react.element"):60103,q=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,m=d?Symbol.for("react.provider"):60109,k=d?Symbol.for("react.context"):60110,p=d?Symbol.for("react.async_mode"):60111,e=d?Symbol.for("react.concurrent_mode"):60111,l=d?Symbol.for("react.forward_ref"):60112,t=d?Symbol.for("react.suspense"):60113,u=d?Symbol.for("react.memo"):60115,v=d?Symbol.for("react.lazy"):
|
|
11
|
+
60116;b.typeOf=c;b.AsyncMode=p;b.ConcurrentMode=e;b.ContextConsumer=k;b.ContextProvider=m;b.Element=n;b.ForwardRef=l;b.Fragment=f;b.Profiler=g;b.Portal=q;b.StrictMode=h;b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===f||a===e||a===g||a===h||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===v||a.$$typeof===u||a.$$typeof===m||a.$$typeof===k||a.$$typeof===l)};b.isAsyncMode=function(a){return r(a)||c(a)===p};b.isConcurrentMode=r;b.isContextConsumer=function(a){return c(a)===
|
|
12
|
+
k};b.isContextProvider=function(a){return c(a)===m};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===n};b.isForwardRef=function(a){return c(a)===l};b.isFragment=function(a){return c(a)===f};b.isProfiler=function(a){return c(a)===g};b.isPortal=function(a){return c(a)===q};b.isStrictMode=function(a){return c(a)===h};Object.defineProperty(b,"__esModule",{value:!0})});
|