react 0.0.0-experimental-241c4467e → 0.0.0-experimental-8d7535e54

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.
package/build-info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "branch": "master",
3
- "buildNumber": "80590",
4
- "checksum": "fcf66d8",
5
- "commit": "241c4467e",
3
+ "buildNumber": "90723",
4
+ "checksum": "348207c",
5
+ "commit": "8d7535e54",
6
6
  "environment": "ci",
7
- "reactVersion": "16.12.0-experimental-241c4467e"
7
+ "reactVersion": "16.12.0-experimental-8d7535e54"
8
8
  }
@@ -1,4 +1,4 @@
1
- /** @license React v0.0.0-experimental-241c4467e
1
+ /** @license React v0.0.0-experimental-8d7535e54
2
2
  * react.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -18,9 +18,7 @@ if (process.env.NODE_ENV !== "production") {
18
18
  var _assign = require('object-assign');
19
19
  var checkPropTypes = require('prop-types/checkPropTypes');
20
20
 
21
- // TODO: this is special because it gets imported during build.
22
-
23
- var ReactVersion = '16.12.0-experimental-241c4467e';
21
+ var ReactVersion = '16.12.0-experimental-8d7535e54';
24
22
 
25
23
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
26
24
  // nor polyfill, then a plain number is used for performance.
@@ -32,16 +30,13 @@ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeac
32
30
  var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
33
31
  var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
34
32
  var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
35
- // (unstable) APIs that have been removed. Can we remove the symbols?
36
-
37
-
38
33
  var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
39
34
  var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
40
35
  var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
41
36
  var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
42
37
  var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
43
38
  var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
44
- var REACT_CHUNK_TYPE = hasSymbol ? Symbol.for('react.chunk') : 0xead9;
39
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
45
40
  var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
46
41
  var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
47
42
  var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
@@ -95,7 +90,7 @@ var ReactCurrentOwner = {
95
90
  };
96
91
 
97
92
  var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
98
- var describeComponentFrame = function (name, source, ownerName) {
93
+ function describeComponentFrame (name, source, ownerName) {
99
94
  var sourceInfo = '';
100
95
 
101
96
  if (source) {
@@ -125,10 +120,9 @@ var describeComponentFrame = function (name, source, ownerName) {
125
120
  }
126
121
 
127
122
  return '\n in ' + (name || 'Unknown') + sourceInfo;
128
- };
123
+ }
129
124
 
130
125
  var Resolved = 1;
131
-
132
126
  function refineResolvedLazyComponent(lazyComponent) {
133
127
  return lazyComponent._status === Resolved ? lazyComponent._result : null;
134
128
  }
@@ -192,7 +186,7 @@ function getComponentName(type) {
192
186
  case REACT_MEMO_TYPE:
193
187
  return getComponentName(type.type);
194
188
 
195
- case REACT_CHUNK_TYPE:
189
+ case REACT_BLOCK_TYPE:
196
190
  return getComponentName(type.render);
197
191
 
198
192
  case REACT_LAZY_TYPE:
@@ -333,21 +327,6 @@ function printWarning(level, format, args) {
333
327
  }
334
328
  }
335
329
 
336
- // Do not require this module directly! Use normal `invariant` calls with
337
- // template literal strings. The messages will be replaced with error codes
338
- // during build.
339
-
340
- /**
341
- * Use invariant() to assert state which your program assumes to be true.
342
- *
343
- * Provide sprintf-style format (only %s is supported) and arguments
344
- * to provide information about what broke and what you were
345
- * expecting.
346
- *
347
- * The invariant message will be stripped in production, but the invariant
348
- * will remain to ensure logic does not differ in production.
349
- */
350
-
351
330
  var didWarnStateUpdateForUnmountedComponent = {};
352
331
 
353
332
  function warnNoop(publicInstance, callerName) {
@@ -485,7 +464,7 @@ Component.prototype.isReactComponent = {};
485
464
  Component.prototype.setState = function (partialState, callback) {
486
465
  if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
487
466
  {
488
- throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
467
+ throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
489
468
  }
490
469
  }
491
470
 
@@ -582,9 +561,7 @@ var RESERVED_PROPS = {
582
561
  __self: true,
583
562
  __source: true
584
563
  };
585
- var specialPropKeyWarningShown;
586
- var specialPropRefWarningShown;
587
- var didWarnAboutStringRefs;
564
+ var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
588
565
 
589
566
  {
590
567
  didWarnAboutStringRefs = {};
@@ -742,79 +719,6 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
742
719
 
743
720
  return element;
744
721
  };
745
- /**
746
- * https://github.com/reactjs/rfcs/pull/107
747
- * @param {*} type
748
- * @param {object} props
749
- * @param {string} key
750
- */
751
-
752
-
753
-
754
- /**
755
- * https://github.com/reactjs/rfcs/pull/107
756
- * @param {*} type
757
- * @param {object} props
758
- * @param {string} key
759
- */
760
-
761
- function jsxDEV(type, config, maybeKey, source, self) {
762
- var propName; // Reserved names are extracted
763
-
764
- var props = {};
765
- var key = null;
766
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
767
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
768
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
769
- // but as an intermediary step, we will use jsxDEV for everything except
770
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
771
- // key is explicitly declared to be undefined or not.
772
-
773
- if (maybeKey !== undefined) {
774
- key = '' + maybeKey;
775
- }
776
-
777
- if (hasValidKey(config)) {
778
- key = '' + config.key;
779
- }
780
-
781
- if (hasValidRef(config)) {
782
- ref = config.ref;
783
- warnIfStringRefCannotBeAutoConverted(config);
784
- } // Remaining properties are added to a new props object
785
-
786
-
787
- for (propName in config) {
788
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
789
- props[propName] = config[propName];
790
- }
791
- } // Resolve default props
792
-
793
-
794
- if (type && type.defaultProps) {
795
- var defaultProps = type.defaultProps;
796
-
797
- for (propName in defaultProps) {
798
- if (props[propName] === undefined) {
799
- props[propName] = defaultProps[propName];
800
- }
801
- }
802
- }
803
-
804
- if (key || ref) {
805
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
806
-
807
- if (key) {
808
- defineKeyPropWarningGetter(props, displayName);
809
- }
810
-
811
- if (ref) {
812
- defineRefPropWarningGetter(props, displayName);
813
- }
814
- }
815
-
816
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
817
- }
818
722
  /**
819
723
  * Create and return a new ReactElement of the given type.
820
724
  * See https://reactjs.org/docs/react-api.html#createelement
@@ -901,12 +805,6 @@ function createElement(type, config, children) {
901
805
 
902
806
  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
903
807
  }
904
- /**
905
- * Return a function that produces ReactElements of a given type.
906
- * See https://reactjs.org/docs/react-api.html#createfactory
907
- */
908
-
909
-
910
808
  function cloneAndReplaceKey(oldElement, newKey) {
911
809
  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
912
810
  return newElement;
@@ -919,7 +817,7 @@ function cloneAndReplaceKey(oldElement, newKey) {
919
817
  function cloneElement(element, config, children) {
920
818
  if (!!(element === null || element === undefined)) {
921
819
  {
922
- throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
820
+ throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
923
821
  }
924
822
  }
925
823
 
@@ -1128,11 +1026,12 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
1128
1026
  var iteratorFn = getIteratorFn(children);
1129
1027
 
1130
1028
  if (typeof iteratorFn === 'function') {
1029
+
1131
1030
  {
1132
1031
  // Warn about using Maps as children
1133
1032
  if (iteratorFn === children.entries) {
1134
1033
  if (!didWarnAboutMaps) {
1135
- error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');
1034
+ warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
1136
1035
  }
1137
1036
 
1138
1037
  didWarnAboutMaps = true;
@@ -1159,7 +1058,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
1159
1058
 
1160
1059
  {
1161
1060
  {
1162
- throw Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum);
1061
+ throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
1163
1062
  }
1164
1063
  }
1165
1064
  }
@@ -1349,7 +1248,7 @@ function toArray(children) {
1349
1248
  function onlyChild(children) {
1350
1249
  if (!isValidElement(children)) {
1351
1250
  {
1352
- throw Error("React.Children.only expected to receive a single React element child.");
1251
+ throw Error( "React.Children.only expected to receive a single React element child." );
1353
1252
  }
1354
1253
  }
1355
1254
 
@@ -1541,7 +1440,7 @@ function forwardRef(render) {
1541
1440
 
1542
1441
  function isValidElementType(type) {
1543
1442
  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1544
- 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_CHUNK_TYPE);
1443
+ 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);
1545
1444
  }
1546
1445
 
1547
1446
  function memo(type, compare) {
@@ -1558,33 +1457,33 @@ function memo(type, compare) {
1558
1457
  };
1559
1458
  }
1560
1459
 
1561
- function chunk(query, render) {
1460
+ function block(query, render) {
1562
1461
  {
1563
1462
  if (typeof query !== 'function') {
1564
- error('Chunks require a query function but was given %s.', query === null ? 'null' : typeof query);
1463
+ error('Blocks require a query function but was given %s.', query === null ? 'null' : typeof query);
1565
1464
  }
1566
1465
 
1567
1466
  if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
1568
- error('Chunks require a render function but received a `memo` ' + 'component. Use `memo` on an inner component instead.');
1467
+ error('Blocks require a render function but received a `memo` ' + 'component. Use `memo` on an inner component instead.');
1569
1468
  } else if (render != null && render.$$typeof === REACT_FORWARD_REF_TYPE) {
1570
- error('Chunks require a render function but received a `forwardRef` ' + 'component. Use `forwardRef` on an inner component instead.');
1469
+ error('Blocks require a render function but received a `forwardRef` ' + 'component. Use `forwardRef` on an inner component instead.');
1571
1470
  } else if (typeof render !== 'function') {
1572
- error('Chunks require a render function but was given %s.', render === null ? 'null' : typeof render);
1471
+ error('Blocks require a render function but was given %s.', render === null ? 'null' : typeof render);
1573
1472
  } else if (render.length !== 0 && render.length !== 2) {
1574
1473
  // Warn if it's not accepting two args.
1575
1474
  // Do not warn for 0 arguments because it could be due to usage of the 'arguments' object
1576
- error('Chunk render functions accept exactly two parameters: props and data. %s', render.length === 1 ? 'Did you forget to use the data parameter?' : 'Any additional parameter will be undefined.');
1475
+ error('Block render functions accept exactly two parameters: props and data. %s', render.length === 1 ? 'Did you forget to use the data parameter?' : 'Any additional parameter will be undefined.');
1577
1476
  }
1578
1477
 
1579
1478
  if (render != null && (render.defaultProps != null || render.propTypes != null)) {
1580
- error('Chunk render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
1479
+ error('Block render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
1581
1480
  }
1582
1481
  }
1583
1482
 
1584
1483
  return function () {
1585
1484
  var args = arguments;
1586
1485
  return {
1587
- $$typeof: REACT_CHUNK_TYPE,
1486
+ $$typeof: REACT_BLOCK_TYPE,
1588
1487
  query: function () {
1589
1488
  return query.apply(null, args);
1590
1489
  },
@@ -1598,7 +1497,7 @@ function resolveDispatcher() {
1598
1497
 
1599
1498
  if (!(dispatcher !== null)) {
1600
1499
  {
1601
- throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");
1500
+ throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
1602
1501
  }
1603
1502
  }
1604
1503
 
@@ -1666,20 +1565,6 @@ function useDebugValue(value, formatterFn) {
1666
1565
  return dispatcher.useDebugValue(value, formatterFn);
1667
1566
  }
1668
1567
  }
1669
- var emptyObject$1 = {};
1670
- function useResponder(responder, listenerProps) {
1671
- var dispatcher = resolveDispatcher();
1672
-
1673
- {
1674
- if (responder == null || responder.$$typeof !== REACT_RESPONDER_TYPE) {
1675
- error('useResponder: invalid first argument. Expected an event responder, but instead got %s', responder);
1676
-
1677
- return;
1678
- }
1679
- }
1680
-
1681
- return dispatcher.useResponder(responder, listenerProps || emptyObject$1);
1682
- }
1683
1568
  function useTransition(config) {
1684
1569
  var dispatcher = resolveDispatcher();
1685
1570
  return dispatcher.useTransition(config);
@@ -1700,20 +1585,12 @@ function withSuspenseConfig(scope, config) {
1700
1585
  }
1701
1586
  }
1702
1587
 
1703
- /**
1704
- * ReactElementValidator provides a wrapper around a element factory
1705
- * which validates the props passed to the element. This is intended to be
1706
- * used only in DEV and could be replaced by a static type checker for languages
1707
- * that support it.
1708
- */
1709
1588
  var propTypesMisspellWarningShown;
1710
1589
 
1711
1590
  {
1712
1591
  propTypesMisspellWarningShown = false;
1713
1592
  }
1714
1593
 
1715
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
1716
-
1717
1594
  function getDeclarationErrorAddendum() {
1718
1595
  if (ReactCurrentOwner.current) {
1719
1596
  var name = getComponentName(ReactCurrentOwner.current.type);
@@ -1929,104 +1806,6 @@ function validateFragmentProps(fragment) {
1929
1806
  setCurrentlyValidatingElement(null);
1930
1807
  }
1931
1808
  }
1932
-
1933
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
1934
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
1935
- // succeed and there will likely be errors in render.
1936
-
1937
- if (!validType) {
1938
- var info = '';
1939
-
1940
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
1941
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
1942
- }
1943
-
1944
- var sourceInfo = getSourceInfoErrorAddendum(source);
1945
-
1946
- if (sourceInfo) {
1947
- info += sourceInfo;
1948
- } else {
1949
- info += getDeclarationErrorAddendum();
1950
- }
1951
-
1952
- var typeString;
1953
-
1954
- if (type === null) {
1955
- typeString = 'null';
1956
- } else if (Array.isArray(type)) {
1957
- typeString = 'array';
1958
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
1959
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
1960
- info = ' Did you accidentally export a JSX literal instead of a component?';
1961
- } else {
1962
- typeString = typeof type;
1963
- }
1964
-
1965
- {
1966
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
1967
- }
1968
- }
1969
-
1970
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
1971
- // TODO: Drop this when these are no longer allowed as the type argument.
1972
-
1973
- if (element == null) {
1974
- return element;
1975
- } // Skip key warning if the type isn't valid since our key validation logic
1976
- // doesn't expect a non-string/function type and can throw confusing errors.
1977
- // We don't want exception behavior to differ between dev and prod.
1978
- // (Rendering will throw with a helpful message and as soon as the type is
1979
- // fixed, the key warnings will appear.)
1980
-
1981
-
1982
- if (validType) {
1983
- var children = props.children;
1984
-
1985
- if (children !== undefined) {
1986
- if (isStaticChildren) {
1987
- if (Array.isArray(children)) {
1988
- for (var i = 0; i < children.length; i++) {
1989
- validateChildKeys(children[i], type);
1990
- }
1991
-
1992
- if (Object.freeze) {
1993
- Object.freeze(children);
1994
- }
1995
- } else {
1996
- {
1997
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
1998
- }
1999
- }
2000
- } else {
2001
- validateChildKeys(children, type);
2002
- }
2003
- }
2004
- }
2005
-
2006
- if (hasOwnProperty$1.call(props, 'key')) {
2007
- {
2008
- error('React.jsx: Spreading a key to JSX is a deprecated pattern. ' + 'Explicitly pass a key after spreading props in your JSX call. ' + 'E.g. <ComponentName {...props} key={key} />');
2009
- }
2010
- }
2011
-
2012
- if (type === REACT_FRAGMENT_TYPE) {
2013
- validateFragmentProps(element);
2014
- } else {
2015
- validatePropTypes(element);
2016
- }
2017
-
2018
- return element;
2019
- } // These two functions exist to still get child warnings in dev
2020
- // even with the prod transform. This means that jsxDEV is purely
2021
- // opt-in behavior for better messages but that we won't stop
2022
- // giving you warnings if you use production apis.
2023
-
2024
- function jsxWithValidationStatic(type, props, key) {
2025
- return jsxWithValidation(type, props, key, true);
2026
- }
2027
- function jsxWithValidationDynamic(type, props, key) {
2028
- return jsxWithValidation(type, props, key, false);
2029
- }
2030
1809
  function createElementWithValidation(type, props, children) {
2031
1810
  var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
2032
1811
  // succeed and there will likely be errors in render.
@@ -2129,10 +1908,7 @@ function cloneElementWithValidation(element, props, children) {
2129
1908
  return newElement;
2130
1909
  }
2131
1910
 
2132
- var hasBadMapPolyfill;
2133
-
2134
1911
  {
2135
- hasBadMapPolyfill = false;
2136
1912
 
2137
1913
  try {
2138
1914
  var frozenObject = Object.freeze({});
@@ -2144,146 +1920,9 @@ var hasBadMapPolyfill;
2144
1920
  testMap.set(0, 0);
2145
1921
  testSet.add(0);
2146
1922
  } catch (e) {
2147
- // TODO: Consider warning about bad polyfills
2148
- hasBadMapPolyfill = true;
2149
- }
2150
- }
2151
-
2152
- function createFundamentalComponent(impl) {
2153
- // We use responder as a Map key later on. When we have a bad
2154
- // polyfill, then we can't use it as a key as the polyfill tries
2155
- // to add a property to the object.
2156
- if (true && !hasBadMapPolyfill) {
2157
- Object.freeze(impl);
2158
- }
2159
-
2160
- var fundamantalComponent = {
2161
- $$typeof: REACT_FUNDAMENTAL_TYPE,
2162
- impl: impl
2163
- };
2164
-
2165
- {
2166
- Object.freeze(fundamantalComponent);
2167
- }
2168
-
2169
- return fundamantalComponent;
2170
- }
2171
-
2172
- function createEventResponder(displayName, responderConfig) {
2173
- var getInitialState = responderConfig.getInitialState,
2174
- onEvent = responderConfig.onEvent,
2175
- onMount = responderConfig.onMount,
2176
- onUnmount = responderConfig.onUnmount,
2177
- onRootEvent = responderConfig.onRootEvent,
2178
- rootEventTypes = responderConfig.rootEventTypes,
2179
- targetEventTypes = responderConfig.targetEventTypes,
2180
- targetPortalPropagation = responderConfig.targetPortalPropagation;
2181
- var eventResponder = {
2182
- $$typeof: REACT_RESPONDER_TYPE,
2183
- displayName: displayName,
2184
- getInitialState: getInitialState || null,
2185
- onEvent: onEvent || null,
2186
- onMount: onMount || null,
2187
- onRootEvent: onRootEvent || null,
2188
- onUnmount: onUnmount || null,
2189
- rootEventTypes: rootEventTypes || null,
2190
- targetEventTypes: targetEventTypes || null,
2191
- targetPortalPropagation: targetPortalPropagation || false
2192
- }; // We use responder as a Map key later on. When we have a bad
2193
- // polyfill, then we can't use it as a key as the polyfill tries
2194
- // to add a property to the object.
2195
-
2196
- if (true && !hasBadMapPolyfill) {
2197
- Object.freeze(eventResponder);
2198
- }
2199
-
2200
- return eventResponder;
2201
- }
2202
-
2203
- function createScope() {
2204
- var scopeComponent = {
2205
- $$typeof: REACT_SCOPE_TYPE
2206
- };
2207
-
2208
- {
2209
- Object.freeze(scopeComponent);
2210
1923
  }
2211
-
2212
- return scopeComponent;
2213
1924
  }
2214
1925
 
2215
- // Helps identify side effects in render-phase lifecycle hooks and setState
2216
- // reducers by double invoking them in Strict Mode.
2217
-
2218
- // To preserve the "Pause on caught exceptions" behavior of the debugger, we
2219
- // replay the begin phase of a failed component inside invokeGuardedCallback.
2220
-
2221
- // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
2222
-
2223
- // Gather advanced timing metrics for Profiler subtrees.
2224
-
2225
- // Trace which interactions trigger each commit.
2226
-
2227
- // SSR experiments
2228
-
2229
-
2230
- // Flight experiments
2231
-
2232
- var enableChunksAPI = true; // Only used in www builds.
2233
-
2234
- // Only used in www builds.
2235
-
2236
- // Disable javascript: URL strings in href for XSS protection.
2237
-
2238
- // These APIs will no longer be "unstable" in the upcoming 16.7 release,
2239
- // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
2240
-
2241
- var exposeConcurrentModeAPIs = true;
2242
- // Experimental React Flare event system and event components support.
2243
-
2244
- var enableDeprecatedFlareAPI = false; // Experimental Host Component support.
2245
-
2246
- var enableFundamentalAPI = false; // Experimental Scope support.
2247
-
2248
- var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
2249
-
2250
- var enableJSXTransformAPI = false; // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
2251
- // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version
2252
-
2253
- // For tests, we flush suspense fallbacks in an act scope;
2254
- // *except* in some of our own tests, where we test incremental loading states.
2255
-
2256
- // Add a callback property to suspense to notify which promises are currently
2257
- // in the update queue. This allows reporting and tracing of what is causing
2258
- // the user to see a loading state.
2259
- // Also allows hydration callbacks to fire when a dehydrated boundary gets
2260
- // hydrated or deleted.
2261
-
2262
- // Part of the simplification of React.createElement so we can eventually move
2263
- // from React.createElement to React.jsx
2264
- // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
2265
-
2266
-
2267
-
2268
-
2269
- // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance
2270
-
2271
- // --------------------------
2272
- // Future APIs to be deprecated
2273
- // --------------------------
2274
- // Prevent the value and checked attributes from syncing
2275
- // with their related DOM properties
2276
-
2277
-
2278
-
2279
- // Disables React.createFactory
2280
-
2281
- var disableCreateFactory = false; // Disables children for <textarea> elements
2282
-
2283
- // Disables ReactDOM.unstable_renderSubtreeIntoContainer
2284
-
2285
- // Disables ReactDOM.unstable_createPortal
2286
-
2287
1926
  var React = {
2288
1927
  Children: {
2289
1928
  map: mapChildren,
@@ -2313,66 +1952,33 @@ var React = {
2313
1952
  Profiler: REACT_PROFILER_TYPE,
2314
1953
  StrictMode: REACT_STRICT_MODE_TYPE,
2315
1954
  Suspense: REACT_SUSPENSE_TYPE,
2316
- createElement: createElementWithValidation,
2317
- cloneElement: cloneElementWithValidation,
1955
+ createElement: createElementWithValidation ,
1956
+ cloneElement: cloneElementWithValidation ,
2318
1957
  isValidElement: isValidElement,
2319
1958
  version: ReactVersion,
2320
1959
  __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactSharedInternals
2321
1960
  };
2322
1961
 
2323
- if (!disableCreateFactory) {
2324
- React.createFactory = createFactoryWithValidation;
1962
+ {
1963
+ React.createFactory = createFactoryWithValidation ;
2325
1964
  }
2326
1965
 
2327
- if (exposeConcurrentModeAPIs) {
1966
+ {
2328
1967
  React.useTransition = useTransition;
2329
1968
  React.useDeferredValue = useDeferredValue;
2330
1969
  React.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
2331
1970
  React.unstable_withSuspenseConfig = withSuspenseConfig;
2332
1971
  }
2333
1972
 
2334
- if (enableChunksAPI) {
2335
- React.chunk = chunk;
2336
- }
2337
-
2338
- if (enableDeprecatedFlareAPI) {
2339
- React.DEPRECATED_useResponder = useResponder;
2340
- React.DEPRECATED_createResponder = createEventResponder;
2341
- }
2342
-
2343
- if (enableFundamentalAPI) {
2344
- React.unstable_createFundamental = createFundamentalComponent;
2345
- }
2346
-
2347
- if (enableScopeAPI) {
2348
- React.unstable_createScope = createScope;
2349
- } // Note: some APIs are added with feature flags.
2350
- // Make sure that stable builds for open source
2351
- // don't modify the React object to avoid deopts.
2352
- // Also let's not expose their names in stable builds.
2353
-
2354
-
2355
- if (enableJSXTransformAPI) {
2356
- {
2357
- React.jsxDEV = jsxWithValidation;
2358
- React.jsx = jsxWithValidationDynamic;
2359
- React.jsxs = jsxWithValidationStatic;
2360
- }
1973
+ {
1974
+ React.block = block;
2361
1975
  }
2362
1976
 
2363
-
2364
-
2365
- var React$2 = Object.freeze({
2366
- default: React
2367
- });
2368
-
2369
- var React$3 = ( React$2 && React ) || React$2;
2370
-
2371
1977
  // TODO: decide on the top-level export form.
2372
1978
  // This is hacky but makes it work with both Rollup and Jest.
2373
1979
 
2374
1980
 
2375
- var react = React$3.default || React$3;
1981
+ var react = React.default || React;
2376
1982
 
2377
1983
  module.exports = react;
2378
1984
  })();