@ntbjs/react-components 2.0.0-rc.6 → 2.0.0-rc.9

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.
Files changed (47) hide show
  1. package/cjs/_virtual/index5.js +7 -0
  2. package/cjs/_virtual/react-is.development2.js +7 -0
  3. package/cjs/_virtual/react-is.production.min2.js +7 -0
  4. package/cjs/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
  5. package/cjs/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +54 -12
  6. package/cjs/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +10 -7
  7. package/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
  8. package/cjs/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
  9. package/cjs/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +20 -0
  10. package/cjs/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +2 -2
  11. package/cjs/node_modules/{react-is → hoist-non-react-statics/node_modules/react-is}/cjs/react-is.development.js +39 -81
  12. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +22 -0
  13. package/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +13 -0
  14. package/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  15. package/cjs/node_modules/prop-types/index.js +1 -1
  16. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +186 -0
  17. package/cjs/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +22 -0
  18. package/cjs/node_modules/{react-is → prop-types/node_modules/react-is}/index.js +3 -3
  19. package/cjs/node_modules/react-select/dist/Select-aab027f3.esm.js +12 -12
  20. package/cjs/node_modules/react-select/dist/index-641ee5b8.esm.js +47 -47
  21. package/cjs/node_modules/use-isomorphic-layout-effect/dist/{use-isomorphic-layout-effect.browser.esm.js → use-isomorphic-layout-effect.esm.js} +3 -1
  22. package/esm/_virtual/index5.js +3 -0
  23. package/esm/_virtual/react-is.development2.js +3 -0
  24. package/esm/_virtual/react-is.production.min2.js +3 -0
  25. package/esm/node_modules/@emotion/cache/dist/{emotion-cache.browser.esm.js → emotion-cache.esm.js} +61 -3
  26. package/esm/node_modules/@emotion/react/dist/{emotion-element-f0de968e.browser.esm.js → emotion-element-d59e098f.esm.js} +47 -5
  27. package/esm/node_modules/@emotion/react/dist/{emotion-react.browser.esm.js → emotion-react.esm.js} +3 -3
  28. package/esm/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/{emotion-use-insertion-effect-with-fallbacks.browser.esm.js → emotion-use-insertion-effect-with-fallbacks.esm.js} +3 -1
  29. package/esm/node_modules/@emotion/utils/dist/{emotion-utils.browser.esm.js → emotion-utils.esm.js} +12 -3
  30. package/esm/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js +16 -0
  31. package/esm/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +2 -2
  32. package/esm/node_modules/{react-is → hoist-non-react-statics/node_modules/react-is}/cjs/react-is.development.js +40 -82
  33. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +17 -0
  34. package/esm/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +11 -0
  35. package/esm/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
  36. package/esm/node_modules/prop-types/index.js +1 -1
  37. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +181 -0
  38. package/esm/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +17 -0
  39. package/esm/node_modules/prop-types/node_modules/react-is/index.js +11 -0
  40. package/esm/node_modules/react-select/dist/Select-aab027f3.esm.js +1 -1
  41. package/esm/node_modules/react-select/dist/index-641ee5b8.esm.js +2 -2
  42. package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.esm.js +8 -0
  43. package/package.json +2 -2
  44. package/cjs/node_modules/react-is/cjs/react-is.production.min.js +0 -22
  45. package/esm/node_modules/react-is/cjs/react-is.production.min.js +0 -17
  46. package/esm/node_modules/react-is/index.js +0 -11
  47. package/esm/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js +0 -6
@@ -5,6 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  require('../../react/index.js');
6
6
  var index$1 = require('../../../_virtual/index.js');
7
7
 
8
- var index = index$1.react.exports.useLayoutEffect ;
8
+ var isClient = typeof document !== 'undefined';
9
+
10
+ var index = isClient ? index$1.react.exports.useLayoutEffect : index$1.react.exports.useEffect;
9
11
 
10
12
  exports["default"] = index;
@@ -0,0 +1,3 @@
1
+ var reactIs = {exports: {}};
2
+
3
+ export { reactIs as r };
@@ -0,0 +1,3 @@
1
+ var reactIs_development = {};
2
+
3
+ export { reactIs_development as __exports };
@@ -0,0 +1,3 @@
1
+ var reactIs_production_min = {};
2
+
3
+ export { reactIs_production_min as __exports };
@@ -1,4 +1,6 @@
1
1
  import { StyleSheet } from '../../sheet/dist/emotion-sheet.esm.js';
2
+ import weakMemoize from '../../weak-memoize/dist/emotion-weak-memoize.esm.js';
3
+ import memoize from '../../memoize/dist/emotion-memoize.esm.js';
2
4
  import { middleware, rulesheet } from '../../../stylis/src/Middleware.js';
3
5
  import { RULESET, KEYFRAMES, DECLARATION, WEBKIT, MS, MOZ } from '../../../stylis/src/Enum.js';
4
6
  import { combine, replace, hash, charat, strlen, indexof, match, from } from '../../../stylis/src/Utility.js';
@@ -6,6 +8,8 @@ import { serialize, stringify } from '../../../stylis/src/Serializer.js';
6
8
  import { copy, dealloc, alloc, next, token, peek, delimit, slice, position } from '../../../stylis/src/Tokenizer.js';
7
9
  import { compile } from '../../../stylis/src/Parser.js';
8
10
 
11
+ var isBrowser = typeof document !== 'undefined';
12
+
9
13
  var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
10
14
  var previous = 0;
11
15
  var character = 0;
@@ -343,12 +347,17 @@ var prefixer = function prefixer(element, index, children, callback) {
343
347
  }
344
348
  };
345
349
 
350
+ var getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {
351
+ return memoize(function () {
352
+ return {};
353
+ });
354
+ });
346
355
  var defaultStylisPlugins = [prefixer];
347
356
 
348
357
  var createCache = function createCache(options) {
349
358
  var key = options.key;
350
359
 
351
- if (key === 'css') {
360
+ if (isBrowser && key === 'css') {
352
361
  var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
353
362
  // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
354
363
  // note this very very intentionally targets all style elements regardless of the key to ensure
@@ -378,7 +387,7 @@ var createCache = function createCache(options) {
378
387
  var container;
379
388
  var nodesToHydrate = [];
380
389
 
381
- {
390
+ if (isBrowser) {
382
391
  container = options.container || document.head;
383
392
  Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
384
393
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
@@ -397,7 +406,7 @@ var createCache = function createCache(options) {
397
406
 
398
407
  var omnipresentPlugins = [compat, removeLabel];
399
408
 
400
- {
409
+ if (!getServerStylisCache) {
401
410
  var currentSheet;
402
411
  var finalizingPlugins = [stringify, rulesheet(function (rule) {
403
412
  currentSheet.insert(rule);
@@ -417,6 +426,55 @@ var createCache = function createCache(options) {
417
426
  cache.inserted[serialized.name] = true;
418
427
  }
419
428
  };
429
+ } else {
430
+ var _finalizingPlugins = [stringify];
431
+
432
+ var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
433
+
434
+ var _stylis = function _stylis(styles) {
435
+ return serialize(compile(styles), _serializer);
436
+ };
437
+
438
+ var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
439
+
440
+ var getRules = function getRules(selector, serialized) {
441
+ var name = serialized.name;
442
+
443
+ if (serverStylisCache[name] === undefined) {
444
+ serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
445
+ }
446
+
447
+ return serverStylisCache[name];
448
+ };
449
+
450
+ _insert = function _insert(selector, serialized, sheet, shouldCache) {
451
+ var name = serialized.name;
452
+ var rules = getRules(selector, serialized);
453
+
454
+ if (cache.compat === undefined) {
455
+ // in regular mode, we don't set the styles on the inserted cache
456
+ // since we don't need to and that would be wasting memory
457
+ // we return them so that they are rendered in a style tag
458
+ if (shouldCache) {
459
+ cache.inserted[name] = true;
460
+ }
461
+
462
+ return rules;
463
+ } else {
464
+ // in compat mode, we put the styles on the inserted cache so
465
+ // that emotion-server can pull out the styles
466
+ // except when we don't want to cache it which was in Global but now
467
+ // is nowhere but we don't want to do a major right now
468
+ // and just in case we're going to leave the case here
469
+ // it's also not affecting client side bundle size
470
+ // so it's really not a big deal
471
+ if (shouldCache) {
472
+ cache.inserted[name] = rules;
473
+ } else {
474
+ return rules;
475
+ }
476
+ }
477
+ };
420
478
  }
421
479
 
422
480
  var cache = {
@@ -1,12 +1,14 @@
1
1
  import '../../../react/index.js';
2
- import createCache from '../../cache/dist/emotion-cache.browser.esm.js';
3
- import { getRegisteredStyles, registerStyles, insertStyles } from '../../utils/dist/emotion-utils.browser.esm.js';
2
+ import createCache from '../../cache/dist/emotion-cache.esm.js';
3
+ import { getRegisteredStyles, registerStyles, insertStyles } from '../../utils/dist/emotion-utils.esm.js';
4
4
  import { serializeStyles } from '../../serialize/dist/emotion-serialize.esm.js';
5
- import { useInsertionEffectAlwaysWithSyncFallback } from '../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js';
5
+ import { useInsertionEffectAlwaysWithSyncFallback } from '../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js';
6
6
  import { r as react } from '../../../../_virtual/index.js';
7
7
 
8
8
  var isDevelopment = false;
9
9
 
10
+ var isBrowser = typeof document !== 'undefined';
11
+
10
12
  var EmotionCacheContext = /* #__PURE__ */react.exports.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
11
13
  // because this module is primarily intended for the browser and node
12
14
  // but it's also required in react native and similar environments sometimes
@@ -27,6 +29,30 @@ var withEmotionCache = function withEmotionCache(func) {
27
29
  });
28
30
  };
29
31
 
32
+ if (!isBrowser) {
33
+ withEmotionCache = function withEmotionCache(func) {
34
+ return function (props) {
35
+ var cache = react.exports.useContext(EmotionCacheContext);
36
+
37
+ if (cache === null) {
38
+ // yes, we're potentially creating this on every render
39
+ // it doesn't actually matter though since it's only on the server
40
+ // so there will only every be a single render
41
+ // that could change in the future because of suspense and etc. but for now,
42
+ // this works and i don't want to optimise for a future thing that we aren't sure about
43
+ cache = createCache({
44
+ key: 'css'
45
+ });
46
+ return /*#__PURE__*/react.exports.createElement(EmotionCacheContext.Provider, {
47
+ value: cache
48
+ }, func(props, cache));
49
+ } else {
50
+ return func(props, cache);
51
+ }
52
+ };
53
+ };
54
+ }
55
+
30
56
  var ThemeContext = /* #__PURE__ */react.exports.createContext({});
31
57
 
32
58
  var hasOwn = {}.hasOwnProperty;
@@ -52,10 +78,26 @@ var Insertion = function Insertion(_ref) {
52
78
  serialized = _ref.serialized,
53
79
  isStringTag = _ref.isStringTag;
54
80
  registerStyles(cache, serialized, isStringTag);
55
- useInsertionEffectAlwaysWithSyncFallback(function () {
81
+ var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
56
82
  return insertStyles(cache, serialized, isStringTag);
57
83
  });
58
84
 
85
+ if (!isBrowser && rules !== undefined) {
86
+ var _ref2;
87
+
88
+ var serializedNames = serialized.name;
89
+ var next = serialized.next;
90
+
91
+ while (next !== undefined) {
92
+ serializedNames += ' ' + next.name;
93
+ next = next.next;
94
+ }
95
+
96
+ return /*#__PURE__*/react.exports.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
97
+ __html: rules
98
+ }, _ref2.nonce = cache.sheet.nonce, _ref2));
99
+ }
100
+
59
101
  return null;
60
102
  };
61
103
 
@@ -104,4 +146,4 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
104
146
 
105
147
  var Emotion$1 = Emotion;
106
148
 
107
- export { Emotion$1 as E, ThemeContext as T, createEmotionProps as c, hasOwn as h, isDevelopment as i, withEmotionCache as w };
149
+ export { Emotion$1 as E, ThemeContext as T, isDevelopment as a, createEmotionProps as c, hasOwn as h, isBrowser as i, withEmotionCache as w };
@@ -1,7 +1,7 @@
1
- import { h as hasOwn, E as Emotion$1, c as createEmotionProps } from './emotion-element-f0de968e.browser.esm.js';
2
- export { T as ThemeContext, w as withEmotionCache } from './emotion-element-f0de968e.browser.esm.js';
1
+ import { h as hasOwn, E as Emotion$1, c as createEmotionProps } from './emotion-element-d59e098f.esm.js';
2
+ export { T as ThemeContext, w as withEmotionCache } from './emotion-element-d59e098f.esm.js';
3
3
  import '../../../react/index.js';
4
- import '../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js';
4
+ import '../../use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.esm.js';
5
5
  import { serializeStyles } from '../../serialize/dist/emotion-serialize.esm.js';
6
6
  import '../../../hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js';
7
7
  import { r as react } from '../../../../_virtual/index.js';
@@ -1,10 +1,12 @@
1
1
  import * as index from '../../../react/index.js';
2
2
 
3
+ var isBrowser = typeof document !== 'undefined';
4
+
3
5
  var syncFallback = function syncFallback(create) {
4
6
  return create();
5
7
  };
6
8
 
7
9
  var useInsertionEffect = index['useInsertion' + 'Effect'] ? index['useInsertion' + 'Effect'] : false;
8
- var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
10
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser ? syncFallback : useInsertionEffect || syncFallback;
9
11
 
10
12
  export { useInsertionEffectAlwaysWithSyncFallback };
@@ -1,4 +1,4 @@
1
- var isBrowser = true;
1
+ var isBrowser = typeof document !== 'undefined';
2
2
 
3
3
  function getRegisteredStyles(registered, registeredStyles, classNames) {
4
4
  var rawClassName = '';
@@ -23,7 +23,7 @@ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
23
23
  // in node since emotion-server relies on whether a style is in
24
24
  // the registered cache to know whether a style is global or not
25
25
  // also, note that this check will be dead code eliminated in the browser
26
- isBrowser === false ) && cache.registered[className] === undefined) {
26
+ isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
27
27
  cache.registered[className] = serialized.styles;
28
28
  }
29
29
  };
@@ -32,13 +32,22 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
32
32
  var className = cache.key + "-" + serialized.name;
33
33
 
34
34
  if (cache.inserted[serialized.name] === undefined) {
35
+ var stylesForSSR = '';
35
36
  var current = serialized;
36
37
 
37
38
  do {
38
- cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
39
+ var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
40
+
41
+ if (!isBrowser && maybeStyles !== undefined) {
42
+ stylesForSSR += maybeStyles;
43
+ }
39
44
 
40
45
  current = current.next;
41
46
  } while (current !== undefined);
47
+
48
+ if (!isBrowser && stylesForSSR.length !== 0) {
49
+ return stylesForSSR;
50
+ }
42
51
  }
43
52
  };
44
53
 
@@ -0,0 +1,16 @@
1
+ var weakMemoize = function weakMemoize(func) {
2
+ var cache = new WeakMap();
3
+ return function (arg) {
4
+ if (cache.has(arg)) {
5
+ // Use non-null assertion because we just checked that the cache `has` it
6
+ // This allows us to remove `undefined` from the return value
7
+ return cache.get(arg);
8
+ }
9
+
10
+ var ret = func(arg);
11
+ cache.set(arg, ret);
12
+ return ret;
13
+ };
14
+ };
15
+
16
+ export { weakMemoize as default };
@@ -1,5 +1,5 @@
1
- import '../../react-is/index.js';
2
- import { r as reactIs$1 } from '../../../_virtual/index3.js';
1
+ import '../node_modules/react-is/index.js';
2
+ import { r as reactIs$1 } from '../../../_virtual/index5.js';
3
3
 
4
4
  var reactIs = reactIs$1.exports;
5
5
  var FORWARD_REF_STATICS = {
@@ -1,7 +1,7 @@
1
- import { __exports as reactIs_development } from '../../../_virtual/react-is.development.js';
2
- export { __exports as default } from '../../../_virtual/react-is.development.js';
1
+ import { __exports as reactIs_development } from '../../../../../_virtual/react-is.development2.js';
2
+ export { __exports as default } from '../../../../../_virtual/react-is.development2.js';
3
3
 
4
- /** @license React v17.0.2
4
+ /** @license React v16.13.1
5
5
  * react-is.development.js
6
6
  *
7
7
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -10,77 +10,38 @@ export { __exports as default } from '../../../_virtual/react-is.development.js'
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
12
 
13
+
14
+
13
15
  if (process.env.NODE_ENV !== "production") {
14
16
  (function() {
15
17
 
16
- // ATTENTION
17
- // When adding new symbols to this file,
18
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
19
18
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
20
19
  // nor polyfill, then a plain number is used for performance.
21
- var REACT_ELEMENT_TYPE = 0xeac7;
22
- var REACT_PORTAL_TYPE = 0xeaca;
23
- var REACT_FRAGMENT_TYPE = 0xeacb;
24
- var REACT_STRICT_MODE_TYPE = 0xeacc;
25
- var REACT_PROFILER_TYPE = 0xead2;
26
- var REACT_PROVIDER_TYPE = 0xeacd;
27
- var REACT_CONTEXT_TYPE = 0xeace;
28
- var REACT_FORWARD_REF_TYPE = 0xead0;
29
- var REACT_SUSPENSE_TYPE = 0xead1;
30
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
31
- var REACT_MEMO_TYPE = 0xead3;
32
- var REACT_LAZY_TYPE = 0xead4;
33
- var REACT_BLOCK_TYPE = 0xead9;
34
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
35
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
36
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
37
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
38
-
39
- if (typeof Symbol === 'function' && Symbol.for) {
40
- var symbolFor = Symbol.for;
41
- REACT_ELEMENT_TYPE = symbolFor('react.element');
42
- REACT_PORTAL_TYPE = symbolFor('react.portal');
43
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
44
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
45
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
46
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
47
- REACT_CONTEXT_TYPE = symbolFor('react.context');
48
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
49
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
50
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
51
- REACT_MEMO_TYPE = symbolFor('react.memo');
52
- REACT_LAZY_TYPE = symbolFor('react.lazy');
53
- REACT_BLOCK_TYPE = symbolFor('react.block');
54
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
55
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
56
- symbolFor('react.scope');
57
- symbolFor('react.opaque.id');
58
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
59
- symbolFor('react.offscreen');
60
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
61
- }
62
-
63
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
64
-
65
- var enableScopeAPI = false; // Experimental Create Event Handle API.
20
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
21
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
22
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
23
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
24
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
25
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
26
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
27
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
28
+ // (unstable) APIs that have been removed. Can we remove the symbols?
29
+
30
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
31
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
32
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
33
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
34
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
35
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
36
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
37
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
38
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
39
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
40
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
66
41
 
67
42
  function isValidElementType(type) {
68
- if (typeof type === 'string' || typeof type === 'function') {
69
- return true;
70
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
71
-
72
-
73
- 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 ) {
74
- return true;
75
- }
76
-
77
- if (typeof type === 'object' && type !== null) {
78
- 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 || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
79
- return true;
80
- }
81
- }
82
-
83
- return false;
43
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
44
+ 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);
84
45
  }
85
46
 
86
47
  function typeOf(object) {
@@ -92,11 +53,12 @@ function typeOf(object) {
92
53
  var type = object.type;
93
54
 
94
55
  switch (type) {
56
+ case REACT_ASYNC_MODE_TYPE:
57
+ case REACT_CONCURRENT_MODE_TYPE:
95
58
  case REACT_FRAGMENT_TYPE:
96
59
  case REACT_PROFILER_TYPE:
97
60
  case REACT_STRICT_MODE_TYPE:
98
61
  case REACT_SUSPENSE_TYPE:
99
- case REACT_SUSPENSE_LIST_TYPE:
100
62
  return type;
101
63
 
102
64
  default:
@@ -122,7 +84,10 @@ function typeOf(object) {
122
84
  }
123
85
 
124
86
  return undefined;
125
- }
87
+ } // AsyncMode is deprecated along with isAsyncMode
88
+
89
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
90
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
126
91
  var ContextConsumer = REACT_CONTEXT_TYPE;
127
92
  var ContextProvider = REACT_PROVIDER_TYPE;
128
93
  var Element = REACT_ELEMENT_TYPE;
@@ -134,30 +99,21 @@ var Portal = REACT_PORTAL_TYPE;
134
99
  var Profiler = REACT_PROFILER_TYPE;
135
100
  var StrictMode = REACT_STRICT_MODE_TYPE;
136
101
  var Suspense = REACT_SUSPENSE_TYPE;
137
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
138
- var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
102
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
139
103
 
140
104
  function isAsyncMode(object) {
141
105
  {
142
106
  if (!hasWarnedAboutDeprecatedIsAsyncMode) {
143
107
  hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
144
108
 
145
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
109
+ 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.');
146
110
  }
147
111
  }
148
112
 
149
- return false;
113
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
150
114
  }
151
115
  function isConcurrentMode(object) {
152
- {
153
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
154
- hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
155
-
156
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
157
- }
158
- }
159
-
160
- return false;
116
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
161
117
  }
162
118
  function isContextConsumer(object) {
163
119
  return typeOf(object) === REACT_CONTEXT_TYPE;
@@ -193,6 +149,8 @@ function isSuspense(object) {
193
149
  return typeOf(object) === REACT_SUSPENSE_TYPE;
194
150
  }
195
151
 
152
+ reactIs_development.AsyncMode = AsyncMode;
153
+ reactIs_development.ConcurrentMode = ConcurrentMode;
196
154
  reactIs_development.ContextConsumer = ContextConsumer;
197
155
  reactIs_development.ContextProvider = ContextProvider;
198
156
  reactIs_development.Element = Element;
@@ -0,0 +1,17 @@
1
+ import { __exports as reactIs_production_min } from '../../../../../_virtual/react-is.production.min2.js';
2
+ export { __exports as default } from '../../../../../_virtual/react-is.production.min2.js';
3
+
4
+ /** @license React v16.13.1
5
+ * react-is.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ 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?
13
+ 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;
14
+ 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}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
15
+ reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
16
+ reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
17
+ reactIs_production_min.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)};reactIs_production_min.typeOf=z;
@@ -0,0 +1,11 @@
1
+ import { r as reactIs } from '../../../../_virtual/index5.js';
2
+ import './cjs/react-is.production.min.js';
3
+ import './cjs/react-is.development.js';
4
+ import { __exports as reactIs_production_min } from '../../../../_virtual/react-is.production.min2.js';
5
+ import { __exports as reactIs_development } from '../../../../_virtual/react-is.development2.js';
6
+
7
+ if (process.env.NODE_ENV === 'production') {
8
+ reactIs.exports = reactIs_production_min;
9
+ } else {
10
+ reactIs.exports = reactIs_development;
11
+ }
@@ -1,4 +1,4 @@
1
- import '../react-is/index.js';
1
+ import './node_modules/react-is/index.js';
2
2
  import objectAssign from '../object-assign/index.js';
3
3
  import ReactPropTypesSecret_1 from './lib/ReactPropTypesSecret.js';
4
4
  import has$1 from './lib/has.js';
@@ -1,5 +1,5 @@
1
1
  import { p as propTypes } from '../../_virtual/index2.js';
2
- import '../react-is/index.js';
2
+ import './node_modules/react-is/index.js';
3
3
  import factoryWithTypeCheckers from './factoryWithTypeCheckers.js';
4
4
  import factoryWithThrowingShims from './factoryWithThrowingShims.js';
5
5
  import { r as reactIs } from '../../_virtual/index3.js';