react-is
Advanced tools
Comparing version 0.0.0-50b50c26f to 0.0.0-51ebccc37
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-50b50c26f | ||
/** @license React vundefined | ||
* react-is.development.js | ||
@@ -12,4 +12,2 @@ * | ||
if (process.env.NODE_ENV !== "production") { | ||
@@ -19,90 +17,86 @@ (function() { | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
// ATTENTION | ||
// When adding new symbols to this file, | ||
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' | ||
// 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 = 0xeac7; | ||
var REACT_PORTAL_TYPE = 0xeaca; | ||
var REACT_FRAGMENT_TYPE = 0xeacb; | ||
var REACT_STRICT_MODE_TYPE = 0xeacc; | ||
var REACT_PROFILER_TYPE = 0xead2; | ||
var REACT_PROVIDER_TYPE = 0xeacd; | ||
var REACT_CONTEXT_TYPE = 0xeace; | ||
var REACT_FORWARD_REF_TYPE = 0xead0; | ||
var REACT_SUSPENSE_TYPE = 0xead1; | ||
var REACT_SUSPENSE_LIST_TYPE = 0xead8; | ||
var REACT_MEMO_TYPE = 0xead3; | ||
var REACT_LAZY_TYPE = 0xead4; | ||
var REACT_SCOPE_TYPE = 0xead7; | ||
var REACT_OPAQUE_ID_TYPE = 0xeae0; | ||
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1; | ||
var REACT_OFFSCREEN_TYPE = 0xeae2; | ||
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3; | ||
var REACT_CACHE_TYPE = 0xeae4; | ||
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_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
var REACT_EVENT_COMPONENT_TYPE = hasSymbol ? Symbol.for('react.event_component') : 0xead5; | ||
var REACT_EVENT_TARGET_TYPE = hasSymbol ? Symbol.for('react.event_target') : 0xead6; | ||
if (typeof Symbol === 'function' && Symbol.for) { | ||
var symbolFor = Symbol.for; | ||
REACT_ELEMENT_TYPE = symbolFor('react.element'); | ||
REACT_PORTAL_TYPE = symbolFor('react.portal'); | ||
REACT_FRAGMENT_TYPE = symbolFor('react.fragment'); | ||
REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode'); | ||
REACT_PROFILER_TYPE = symbolFor('react.profiler'); | ||
REACT_PROVIDER_TYPE = symbolFor('react.provider'); | ||
REACT_CONTEXT_TYPE = symbolFor('react.context'); | ||
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref'); | ||
REACT_SUSPENSE_TYPE = symbolFor('react.suspense'); | ||
REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list'); | ||
REACT_MEMO_TYPE = symbolFor('react.memo'); | ||
REACT_LAZY_TYPE = symbolFor('react.lazy'); | ||
REACT_SCOPE_TYPE = symbolFor('react.scope'); | ||
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); | ||
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode'); | ||
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen'); | ||
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); | ||
REACT_CACHE_TYPE = symbolFor('react.cache'); | ||
} | ||
// React event targets | ||
// Filter certain DOM attributes (e.g. src, href) if their values are empty strings. | ||
var enableCache = false; // Only used in www builds. | ||
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 || 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_EVENT_COMPONENT_TYPE || type.$$typeof === REACT_EVENT_TARGET_TYPE); | ||
var enableScopeAPI = false; // Experimental Create Event Handle API. | ||
var REACT_MODULE_REFERENCE = 0; | ||
if (typeof Symbol === 'function') { | ||
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); | ||
} | ||
/** | ||
* 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. | ||
*/ | ||
function isValidElementType(type) { | ||
if (typeof type === 'string' || typeof type === 'function') { | ||
return true; | ||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | ||
var lowPriorityWarning = function () {}; | ||
{ | ||
var printWarning = function (format) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI || enableCache ) { | ||
return true; | ||
} | ||
var argIndex = 0; | ||
var message = 'Warning: ' + format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.warn(message); | ||
if (typeof type === 'object' && type !== null) { | ||
if (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 || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
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) {} | ||
}; | ||
} | ||
lowPriorityWarning = function (condition, format) { | ||
if (format === undefined) { | ||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
if (!condition) { | ||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { | ||
args[_key2 - 2] = arguments[_key2]; | ||
} | ||
printWarning.apply(undefined, [format].concat(args)); | ||
} | ||
}; | ||
return false; | ||
} | ||
var lowPriorityWarning$1 = lowPriorityWarning; | ||
function typeOf(object) { | ||
if (typeof object === 'object' && object !== null) { | ||
var $$typeof = object.$$typeof; | ||
switch ($$typeof) { | ||
@@ -113,4 +107,2 @@ case REACT_ELEMENT_TYPE: | ||
switch (type) { | ||
case REACT_ASYNC_MODE_TYPE: | ||
case REACT_CONCURRENT_MODE_TYPE: | ||
case REACT_FRAGMENT_TYPE: | ||
@@ -120,3 +112,5 @@ case REACT_PROFILER_TYPE: | ||
case REACT_SUSPENSE_TYPE: | ||
case REACT_SUSPENSE_LIST_TYPE: | ||
return type; | ||
default: | ||
@@ -128,10 +122,13 @@ var $$typeofType = type && type.$$typeof; | ||
case REACT_FORWARD_REF_TYPE: | ||
case REACT_LAZY_TYPE: | ||
case REACT_MEMO_TYPE: | ||
case REACT_PROVIDER_TYPE: | ||
return $$typeofType; | ||
default: | ||
return $$typeof; | ||
} | ||
} | ||
case REACT_LAZY_TYPE: | ||
case REACT_MEMO_TYPE: | ||
case REACT_PORTAL_TYPE: | ||
@@ -144,6 +141,2 @@ return $$typeof; | ||
} | ||
// AsyncMode is deprecated along with isAsyncMode | ||
var AsyncMode = REACT_ASYNC_MODE_TYPE; | ||
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | ||
var ContextConsumer = REACT_CONTEXT_TYPE; | ||
@@ -160,17 +153,27 @@ var ContextProvider = REACT_PROVIDER_TYPE; | ||
var Suspense = REACT_SUSPENSE_TYPE; | ||
var SuspenseList = REACT_SUSPENSE_LIST_TYPE; | ||
var hasWarnedAboutDeprecatedIsAsyncMode = false; | ||
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated | ||
// AsyncMode should be deprecated | ||
function isAsyncMode(object) { | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
hasWarnedAboutDeprecatedIsAsyncMode = true; | ||
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.'); | ||
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 18+.'); | ||
} | ||
} | ||
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | ||
return false; | ||
} | ||
function isConcurrentMode(object) { | ||
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsConcurrentMode) { | ||
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint | ||
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); | ||
} | ||
} | ||
return false; | ||
} | ||
@@ -210,6 +213,6 @@ function isContextConsumer(object) { | ||
} | ||
function isSuspenseList(object) { | ||
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; | ||
} | ||
exports.typeOf = typeOf; | ||
exports.AsyncMode = AsyncMode; | ||
exports.ConcurrentMode = ConcurrentMode; | ||
exports.ContextConsumer = ContextConsumer; | ||
@@ -226,3 +229,3 @@ exports.ContextProvider = ContextProvider; | ||
exports.Suspense = Suspense; | ||
exports.isValidElementType = isValidElementType; | ||
exports.SuspenseList = SuspenseList; | ||
exports.isAsyncMode = isAsyncMode; | ||
@@ -241,3 +244,6 @@ exports.isConcurrentMode = isConcurrentMode; | ||
exports.isSuspense = isSuspense; | ||
exports.isSuspenseList = isSuspenseList; | ||
exports.isValidElementType = isValidElementType; | ||
exports.typeOf = typeOf; | ||
})(); | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-50b50c26f | ||
/** @license React vundefined | ||
* react-is.production.min.js | ||
@@ -9,8 +9,6 @@ * | ||
*/ | ||
'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.memo"): | ||
60115,r=b?Symbol.for("react.lazy"):60116,t=b?Symbol.for("react.event_component"):60117,v=b?Symbol.for("react.event_target"):60118;function w(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 r:case q:case d:return u}}}function x(a){return w(a)===m}exports.typeOf=w;exports.AsyncMode=l;exports.ConcurrentMode=m; | ||
exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=r;exports.Memo=q;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||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===t||a.$$typeof===v)}; | ||
exports.isAsyncMode=function(a){return x(a)||w(a)===l};exports.isConcurrentMode=x;exports.isContextConsumer=function(a){return w(a)===k};exports.isContextProvider=function(a){return w(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return w(a)===n};exports.isFragment=function(a){return w(a)===e};exports.isLazy=function(a){return w(a)===r};exports.isMemo=function(a){return w(a)===q}; | ||
exports.isPortal=function(a){return w(a)===d};exports.isProfiler=function(a){return w(a)===g};exports.isStrictMode=function(a){return w(a)===f};exports.isSuspense=function(a){return w(a)===p}; | ||
'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60129,r=60131;if("function"===typeof Symbol&&Symbol.for){var u=Symbol.for;b=u("react.element");c=u("react.portal");d=u("react.fragment");e=u("react.strict_mode");f=u("react.profiler");g=u("react.provider");h=u("react.context");k=u("react.forward_ref");l=u("react.suspense");m=u("react.suspense_list");n=u("react.memo");p=u("react.lazy");q=u("react.debug_trace_mode");r=u("react.legacy_hidden")} | ||
var v=0;"function"===typeof Symbol&&(v=Symbol.for("react.module.reference"));function w(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var x=g,y=b,z=k,A=d,B=p,C=n,D=c,E=f,F=e,G=l,H=m;exports.ContextConsumer=h;exports.ContextProvider=x;exports.Element=y;exports.ForwardRef=z;exports.Fragment=A; | ||
exports.Lazy=B;exports.Memo=C;exports.Portal=D;exports.Profiler=E;exports.StrictMode=F;exports.Suspense=G;exports.SuspenseList=H;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return w(a)===h};exports.isContextProvider=function(a){return w(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return w(a)===k}; | ||
exports.isFragment=function(a){return w(a)===d};exports.isLazy=function(a){return w(a)===p};exports.isMemo=function(a){return w(a)===n};exports.isPortal=function(a){return w(a)===c};exports.isProfiler=function(a){return w(a)===f};exports.isStrictMode=function(a){return w(a)===e};exports.isSuspense=function(a){return w(a)===l};exports.isSuspenseList=function(a){return w(a)===m}; | ||
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===q||a===e||a===l||a===m||a===r||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===v||void 0!==a.getModuleId)?!0:!1};exports.typeOf=w; |
{ | ||
"name": "react-is", | ||
"version": "0.0.0-50b50c26f", | ||
"version": "0.0.0-51ebccc37", | ||
"description": "Brand checking of React Elements.", | ||
@@ -27,2 +27,2 @@ "main": "index.js", | ||
] | ||
} | ||
} |
@@ -29,3 +29,3 @@ # `react-is` | ||
const StatelessComponent = () => React.createElement("div"); | ||
const FunctionComponent = () => React.createElement("div"); | ||
@@ -40,3 +40,3 @@ const ForwardRefComponent = React.forwardRef((props, ref) => | ||
ReactIs.isValidElementType(ClassComponent); // true | ||
ReactIs.isValidElementType(StatelessComponent); // true | ||
ReactIs.isValidElementType(FunctionComponent); // true | ||
ReactIs.isValidElementType(ForwardRefComponent); // true | ||
@@ -43,0 +43,0 @@ ReactIs.isValidElementType(Context.Provider); // true |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-50b50c26f | ||
/** @license React vundefined | ||
* react-is.development.js | ||
@@ -9,226 +9,231 @@ * | ||
*/ | ||
'use strict'; | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(factory((global.ReactIs = {}))); | ||
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; | ||
// ATTENTION | ||
// When adding new symbols to this file, | ||
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' | ||
// 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 REACT_ELEMENT_TYPE = 0xeac7; | ||
var REACT_PORTAL_TYPE = 0xeaca; | ||
var REACT_FRAGMENT_TYPE = 0xeacb; | ||
var REACT_STRICT_MODE_TYPE = 0xeacc; | ||
var REACT_PROFILER_TYPE = 0xead2; | ||
var REACT_PROVIDER_TYPE = 0xeacd; | ||
var REACT_CONTEXT_TYPE = 0xeace; | ||
var REACT_FORWARD_REF_TYPE = 0xead0; | ||
var REACT_SUSPENSE_TYPE = 0xead1; | ||
var REACT_SUSPENSE_LIST_TYPE = 0xead8; | ||
var REACT_MEMO_TYPE = 0xead3; | ||
var REACT_LAZY_TYPE = 0xead4; | ||
var REACT_SCOPE_TYPE = 0xead7; | ||
var REACT_OPAQUE_ID_TYPE = 0xeae0; | ||
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1; | ||
var REACT_OFFSCREEN_TYPE = 0xeae2; | ||
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3; | ||
var REACT_CACHE_TYPE = 0xeae4; | ||
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_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
var REACT_EVENT_COMPONENT_TYPE = hasSymbol ? Symbol.for('react.event_component') : 0xead5; | ||
var REACT_EVENT_TARGET_TYPE = hasSymbol ? Symbol.for('react.event_target') : 0xead6; | ||
if (typeof Symbol === 'function' && Symbol.for) { | ||
var symbolFor = Symbol.for; | ||
REACT_ELEMENT_TYPE = symbolFor('react.element'); | ||
REACT_PORTAL_TYPE = symbolFor('react.portal'); | ||
REACT_FRAGMENT_TYPE = symbolFor('react.fragment'); | ||
REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode'); | ||
REACT_PROFILER_TYPE = symbolFor('react.profiler'); | ||
REACT_PROVIDER_TYPE = symbolFor('react.provider'); | ||
REACT_CONTEXT_TYPE = symbolFor('react.context'); | ||
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref'); | ||
REACT_SUSPENSE_TYPE = symbolFor('react.suspense'); | ||
REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list'); | ||
REACT_MEMO_TYPE = symbolFor('react.memo'); | ||
REACT_LAZY_TYPE = symbolFor('react.lazy'); | ||
REACT_SCOPE_TYPE = symbolFor('react.scope'); | ||
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); | ||
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode'); | ||
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen'); | ||
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); | ||
REACT_CACHE_TYPE = symbolFor('react.cache'); | ||
} | ||
// React event targets | ||
// Filter certain DOM attributes (e.g. src, href) if their values are empty strings. | ||
var enableCache = false; // Only used in www builds. | ||
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 || 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_EVENT_COMPONENT_TYPE || type.$$typeof === REACT_EVENT_TARGET_TYPE); | ||
} | ||
var enableScopeAPI = false; // Experimental Create Event Handle API. | ||
/** | ||
* 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 REACT_MODULE_REFERENCE = 0; | ||
var lowPriorityWarning = function () {}; | ||
if (typeof Symbol === 'function') { | ||
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); | ||
} | ||
{ | ||
var printWarning = function (format) { | ||
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
args[_key - 1] = arguments[_key]; | ||
} | ||
function isValidElementType(type) { | ||
if (typeof type === 'string' || typeof type === 'function') { | ||
return true; | ||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | ||
var argIndex = 0; | ||
var message = 'Warning: ' + format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.warn(message); | ||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI || enableCache ) { | ||
return true; | ||
} | ||
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) {} | ||
}; | ||
lowPriorityWarning = function (condition, format) { | ||
if (format === undefined) { | ||
throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
if (!condition) { | ||
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { | ||
args[_key2 - 2] = arguments[_key2]; | ||
if (typeof type === 'object' && type !== null) { | ||
if (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 || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
// we don't know which Flight build this will end up being used | ||
// with. | ||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { | ||
return true; | ||
} | ||
printWarning.apply(undefined, [format].concat(args)); | ||
} | ||
}; | ||
} | ||
var lowPriorityWarning$1 = lowPriorityWarning; | ||
return false; | ||
} | ||
function typeOf(object) { | ||
if (typeof object === 'object' && object !== null) { | ||
var $$typeof = object.$$typeof; | ||
switch ($$typeof) { | ||
case REACT_ELEMENT_TYPE: | ||
var type = object.type; | ||
function typeOf(object) { | ||
if (typeof object === 'object' && object !== null) { | ||
var $$typeof = object.$$typeof; | ||
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 ($$typeof) { | ||
case REACT_ELEMENT_TYPE: | ||
var type = object.type; | ||
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; | ||
switch (type) { | ||
case REACT_FRAGMENT_TYPE: | ||
case REACT_PROFILER_TYPE: | ||
case REACT_STRICT_MODE_TYPE: | ||
case REACT_SUSPENSE_TYPE: | ||
case REACT_SUSPENSE_LIST_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; | ||
} | ||
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 SuspenseList = REACT_SUSPENSE_LIST_TYPE; | ||
var hasWarnedAboutDeprecatedIsAsyncMode = false; | ||
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated | ||
return undefined; | ||
} | ||
function isAsyncMode(object) { | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | ||
// 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; | ||
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); | ||
} | ||
} | ||
var hasWarnedAboutDeprecatedIsAsyncMode = false; | ||
return false; | ||
} | ||
function isConcurrentMode(object) { | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsConcurrentMode) { | ||
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint | ||
// AsyncMode should be deprecated | ||
function isAsyncMode(object) { | ||
{ | ||
if (!hasWarnedAboutDeprecatedIsAsyncMode) { | ||
hasWarnedAboutDeprecatedIsAsyncMode = true; | ||
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.'); | ||
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); | ||
} | ||
} | ||
return false; | ||
} | ||
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; | ||
} | ||
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; | ||
} | ||
function isSuspenseList(object) { | ||
return typeOf(object) === REACT_SUSPENSE_LIST_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; | ||
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.SuspenseList = SuspenseList; | ||
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.isSuspenseList = isSuspenseList; | ||
exports.isValidElementType = isValidElementType; | ||
exports.typeOf = typeOf; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-50b50c26f | ||
/** @license React vundefined | ||
* react-is.production.min.js | ||
@@ -9,6 +9,7 @@ * | ||
*/ | ||
'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,q=d?Symbol.for("react.memo"):60115, | ||
p=d?Symbol.for("react.lazy"):60116,w=d?Symbol.for("react.event_component"):60117,x=d?Symbol.for("react.event_target"):60118;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||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===q||a.$$typeof=== | ||
n||a.$$typeof===l||a.$$typeof===m||a.$$typeof===w||a.$$typeof===x)};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})}); | ||
(function(){'use strict';(function(b,c){"object"===typeof exports&&"undefined"!==typeof module?c(exports):"function"===typeof define&&define.amd?define(["exports"],c):(b=b||self,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 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 t:return b}}}var r=60103,t=60106,e=60107,g=60108,f=60114, | ||
q=60109,l=60110,m=60112,h=60113,k=60120,p=60115,n=60116,u=60129,v=60131;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;r=d("react.element");t=d("react.portal");e=d("react.fragment");g=d("react.strict_mode");f=d("react.profiler");q=d("react.provider");l=d("react.context");m=d("react.forward_ref");h=d("react.suspense");k=d("react.suspense_list");p=d("react.memo");n=d("react.lazy");u=d("react.debug_trace_mode");v=d("react.legacy_hidden")}var w=0;"function"===typeof Symbol&&(w=Symbol.for("react.module.reference")); | ||
b.ContextConsumer=l;b.ContextProvider=q;b.Element=r;b.ForwardRef=m;b.Fragment=e;b.Lazy=n;b.Memo=p;b.Portal=t;b.Profiler=f;b.StrictMode=g;b.Suspense=h;b.SuspenseList=k;b.isAsyncMode=function(a){return!1};b.isConcurrentMode=function(a){return!1};b.isContextConsumer=function(a){return c(a)===l};b.isContextProvider=function(a){return c(a)===q};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)=== | ||
e};b.isLazy=function(a){return c(a)===n};b.isMemo=function(a){return c(a)===p};b.isPortal=function(a){return c(a)===t};b.isProfiler=function(a){return c(a)===f};b.isStrictMode=function(a){return c(a)===g};b.isSuspense=function(a){return c(a)===h};b.isSuspenseList=function(a){return c(a)===k};b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===f||a===u||a===g||a===h||a===k||a===v||"object"===typeof a&&null!==a&&(a.$$typeof===n||a.$$typeof===p||a.$$typeof=== | ||
q||a.$$typeof===l||a.$$typeof===m||a.$$typeof===w||void 0!==a.getModuleId)?!0:!1};b.typeOf=c}); | ||
})(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25533
8
465