react 0.0.0-e2fd460cc → 0.0.0-experimental-4190a3458

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.
@@ -6,4 +6,18 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- 'use strict';throw Error("This entry point is not yet supported outside of experimental channels");
9
+ 'use strict';var l=require("object-assign"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60112;exports.Suspense=60113;exports.unstable_SuspenseList=60120;var r=60115,t=60116;exports.unstable_DebugTracingMode=60129;
10
+ if("function"===typeof Symbol&&Symbol.for){var u=Symbol.for;n=u("react.element");p=u("react.portal");exports.Fragment=u("react.fragment");exports.StrictMode=u("react.strict_mode");exports.Profiler=u("react.profiler");q=u("react.forward_ref");exports.Suspense=u("react.suspense");exports.unstable_SuspenseList=u("react.suspense_list");r=u("react.memo");t=u("react.lazy");exports.unstable_DebugTracingMode=u("react.debug_trace_mode")}var v="function"===typeof Symbol&&Symbol.iterator;
11
+ function w(a){if(null===a||"object"!==typeof a)return null;a=v&&a[v]||a["@@iterator"];return"function"===typeof a?a:null}function x(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,e=1;e<arguments.length;e++)b+="&args[]="+encodeURIComponent(arguments[e]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
12
+ var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z={};function A(a,b,e){this.props=a;this.context=b;this.refs=z;this.updater=e||y}A.prototype.isReactComponent={};A.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(x(85));this.updater.enqueueSetState(this,a,b,"setState")};A.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
13
+ function B(){}B.prototype=A.prototype;function C(a,b,e){this.props=a;this.context=b;this.refs=z;this.updater=e||y}var D=C.prototype=new B;D.constructor=C;l(D,A.prototype);D.isPureReactComponent=!0;var E={current:null},F=Object.prototype.hasOwnProperty,G={key:!0,ref:!0,__self:!0,__source:!0};function H(a,b){return{$$typeof:n,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function I(a){return"object"===typeof a&&null!==a&&a.$$typeof===n}
14
+ function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var J=/\/+/g;function K(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
15
+ function L(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case n:case p:h=!0}}if(h)return h=a,c=c(h),a=""===d?"."+K(h,0):d,Array.isArray(c)?(e="",null!=a&&(e=a.replace(J,"$&/")+"/"),L(c,b,e,"",function(a){return a})):null!=c&&(I(c)&&(c=H(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(J,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(Array.isArray(a))for(var g=
16
+ 0;g<a.length;g++){k=a[g];var f=d+K(k,g);h+=L(k,b,e,f,c)}else if(f=w(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+K(k,g++),h+=L(k,b,e,f,c);else if("object"===k)throw b=""+a,Error(x(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function M(a,b,e){if(null==a)return a;var d=[],c=0;L(a,d,"","",function(a){return b.call(e,a,c++)});return d}
17
+ function N(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var O={current:null},P={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:l};
18
+ exports.Children={map:M,forEach:function(a,b,e){M(a,function(){b.apply(this,arguments)},e)},count:function(a){var b=0;M(a,function(){b++});return b},toArray:function(a){return M(a,function(a){return a})||[]},only:function(a){if(!I(a))throw Error(x(143));return a}};exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P;
19
+ exports.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error(x(267,a));var d=l({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=E.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)F.call(b,f)&&!G.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g}return{$$typeof:n,type:a.type,
20
+ key:c,ref:k,props:d,_owner:h}};exports.createElement=function(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)F.call(b,d)&&!G.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return{$$typeof:n,type:a,key:k,ref:h,props:c,_owner:E.current}};exports.createRef=function(){return{current:null}};
21
+ exports.forwardRef=function(a){return{$$typeof:q,render:a}};exports.isValidElement=I;exports.lazy=function(a){return{$$typeof:t,_payload:{_status:-1,_result:a},_init:N}};exports.memo=function(a,b){return{$$typeof:r,type:a,compare:void 0===b?null:b}};exports.unstable_createMutableSource=function(a,b){return{_getVersion:b,_source:a,_workInProgressVersionPrimary:null,_workInProgressVersionSecondary:null}};exports.unstable_getCacheForType=function(a){return O.current.getCacheForType(a)};
22
+ exports.unstable_useDeferredValue=function(a){return O.current.useDeferredValue(a)};exports.unstable_useMutableSource=function(a,b,e){return O.current.useMutableSource(a,b,e)};exports.unstable_useOpaqueIdentifier=function(){return O.current.useOpaqueIdentifier()};exports.useCallback=function(a,b){return O.current.useCallback(a,b)};exports.useContext=function(a,b){return O.current.useContext(a,b)};exports.useDebugValue=function(){};exports.useMemo=function(a,b){return O.current.useMemo(a,b)};
23
+ exports.version="17.0.2-experimental-4190a3458";
@@ -15,7 +15,7 @@ if (process.env.NODE_ENV !== "production") {
15
15
 
16
16
  var _assign = require('object-assign');
17
17
 
18
- var ReactVersion = '17.0.2-e2fd460cc';
18
+ var ReactVersion = '17.0.2-experimental-4190a3458';
19
19
 
20
20
  // ATTENTION
21
21
  // When adding new symbols to this file,
@@ -31,15 +31,15 @@ var REACT_PROVIDER_TYPE = 0xeacd;
31
31
  var REACT_CONTEXT_TYPE = 0xeace;
32
32
  var REACT_FORWARD_REF_TYPE = 0xead0;
33
33
  exports.Suspense = 0xead1;
34
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
34
+ exports.unstable_SuspenseList = 0xead8;
35
35
  var REACT_MEMO_TYPE = 0xead3;
36
36
  var REACT_LAZY_TYPE = 0xead4;
37
37
  var REACT_SCOPE_TYPE = 0xead7;
38
38
  var REACT_OPAQUE_ID_TYPE = 0xeae0;
39
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
39
+ exports.unstable_DebugTracingMode = 0xeae1;
40
40
  var REACT_OFFSCREEN_TYPE = 0xeae2;
41
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
42
- var REACT_CACHE_TYPE = 0xeae4;
41
+ exports.unstable_LegacyHidden = 0xeae3;
42
+ exports.unstable_Cache = 0xeae4;
43
43
 
44
44
  if (typeof Symbol === 'function' && Symbol.for) {
45
45
  var symbolFor = Symbol.for;
@@ -52,15 +52,15 @@ if (typeof Symbol === 'function' && Symbol.for) {
52
52
  REACT_CONTEXT_TYPE = symbolFor('react.context');
53
53
  REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
54
54
  exports.Suspense = symbolFor('react.suspense');
55
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
55
+ exports.unstable_SuspenseList = symbolFor('react.suspense_list');
56
56
  REACT_MEMO_TYPE = symbolFor('react.memo');
57
57
  REACT_LAZY_TYPE = symbolFor('react.lazy');
58
58
  REACT_SCOPE_TYPE = symbolFor('react.scope');
59
59
  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
60
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
60
+ exports.unstable_DebugTracingMode = symbolFor('react.debug_trace_mode');
61
61
  REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
62
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
63
- REACT_CACHE_TYPE = symbolFor('react.cache');
62
+ exports.unstable_LegacyHidden = symbolFor('react.legacy_hidden');
63
+ exports.unstable_Cache = symbolFor('react.cache');
64
64
  }
65
65
 
66
66
  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
@@ -488,10 +488,10 @@ function getComponentName(type) {
488
488
  case exports.Suspense:
489
489
  return 'Suspense';
490
490
 
491
- case REACT_SUSPENSE_LIST_TYPE:
491
+ case exports.unstable_SuspenseList:
492
492
  return 'SuspenseList';
493
493
 
494
- case REACT_CACHE_TYPE:
494
+ case exports.unstable_Cache:
495
495
  return 'Cache';
496
496
  }
497
497
 
@@ -1407,7 +1407,6 @@ function forwardRef(render) {
1407
1407
  }
1408
1408
 
1409
1409
  // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
1410
- var enableCache = false; // Only used in www builds.
1411
1410
 
1412
1411
  var enableScopeAPI = false; // Experimental Create Event Handle API.
1413
1412
 
@@ -1423,7 +1422,7 @@ function isValidElementType(type) {
1423
1422
  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1424
1423
 
1425
1424
 
1426
- if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI || enableCache ) {
1425
+ if (type === exports.Fragment || type === exports.Profiler || type === exports.unstable_DebugTracingMode || type === exports.StrictMode || type === exports.Suspense || type === exports.unstable_SuspenseList || type === exports.unstable_LegacyHidden || enableScopeAPI || type === exports.unstable_Cache) {
1427
1426
  return true;
1428
1427
  }
1429
1428
 
@@ -1488,6 +1487,12 @@ function resolveDispatcher() {
1488
1487
 
1489
1488
  return dispatcher;
1490
1489
  }
1490
+
1491
+ function getCacheForType(resourceType) {
1492
+ var dispatcher = resolveDispatcher(); // $FlowFixMe This is unstable, thus optional
1493
+
1494
+ return dispatcher.getCacheForType(resourceType);
1495
+ }
1491
1496
  function useContext(Context, unstable_observedBits) {
1492
1497
  var dispatcher = resolveDispatcher();
1493
1498
 
@@ -1549,6 +1554,27 @@ function useDebugValue(value, formatterFn) {
1549
1554
  return dispatcher.useDebugValue(value, formatterFn);
1550
1555
  }
1551
1556
  }
1557
+ function useTransition() {
1558
+ var dispatcher = resolveDispatcher();
1559
+ return dispatcher.useTransition();
1560
+ }
1561
+ function useDeferredValue(value) {
1562
+ var dispatcher = resolveDispatcher();
1563
+ return dispatcher.useDeferredValue(value);
1564
+ }
1565
+ function useOpaqueIdentifier() {
1566
+ var dispatcher = resolveDispatcher();
1567
+ return dispatcher.useOpaqueIdentifier();
1568
+ }
1569
+ function useMutableSource(source, getSnapshot, subscribe) {
1570
+ var dispatcher = resolveDispatcher();
1571
+ return dispatcher.useMutableSource(source, getSnapshot, subscribe);
1572
+ }
1573
+ function useCacheRefresh() {
1574
+ var dispatcher = resolveDispatcher(); // $FlowFixMe This is unstable, thus optional
1575
+
1576
+ return dispatcher.useCacheRefresh();
1577
+ }
1552
1578
 
1553
1579
  // Helpers to patch console.logs to avoid logging during side-effect free
1554
1580
  // replaying on render function. This currently only patches the object
@@ -1853,7 +1879,7 @@ function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1853
1879
  case exports.Suspense:
1854
1880
  return describeBuiltInComponentFrame('Suspense');
1855
1881
 
1856
- case REACT_SUSPENSE_LIST_TYPE:
1882
+ case exports.unstable_SuspenseList:
1857
1883
  return describeBuiltInComponentFrame('SuspenseList');
1858
1884
  }
1859
1885
 
@@ -2286,6 +2312,37 @@ function cloneElementWithValidation(element, props, children) {
2286
2312
  return newElement;
2287
2313
  }
2288
2314
 
2315
+ function createMutableSource(source, getVersion) {
2316
+ var mutableSource = {
2317
+ _getVersion: getVersion,
2318
+ _source: source,
2319
+ _workInProgressVersionPrimary: null,
2320
+ _workInProgressVersionSecondary: null
2321
+ };
2322
+
2323
+ {
2324
+ mutableSource._currentPrimaryRenderer = null;
2325
+ mutableSource._currentSecondaryRenderer = null; // Used to detect side effects that update a mutable source during render.
2326
+ // See https://github.com/facebook/react/issues/19948
2327
+
2328
+ mutableSource._currentlyRenderingFiber = null;
2329
+ mutableSource._initialVersionAsOfFirstRender = null;
2330
+ }
2331
+
2332
+ return mutableSource;
2333
+ }
2334
+
2335
+ function startTransition(scope) {
2336
+ var prevTransition = ReactCurrentBatchConfig.transition;
2337
+ ReactCurrentBatchConfig.transition = 1;
2338
+
2339
+ try {
2340
+ scope();
2341
+ } finally {
2342
+ ReactCurrentBatchConfig.transition = prevTransition;
2343
+ }
2344
+ }
2345
+
2289
2346
  var createElement$1 = createElementWithValidation ;
2290
2347
  var cloneElement$1 = cloneElementWithValidation ;
2291
2348
  var createFactory = createFactoryWithValidation ;
@@ -2310,6 +2367,14 @@ exports.forwardRef = forwardRef;
2310
2367
  exports.isValidElement = isValidElement;
2311
2368
  exports.lazy = lazy;
2312
2369
  exports.memo = memo;
2370
+ exports.unstable_createMutableSource = createMutableSource;
2371
+ exports.unstable_getCacheForType = getCacheForType;
2372
+ exports.unstable_startTransition = startTransition;
2373
+ exports.unstable_useCacheRefresh = useCacheRefresh;
2374
+ exports.unstable_useDeferredValue = useDeferredValue;
2375
+ exports.unstable_useMutableSource = useMutableSource;
2376
+ exports.unstable_useOpaqueIdentifier = useOpaqueIdentifier;
2377
+ exports.unstable_useTransition = useTransition;
2313
2378
  exports.useCallback = useCallback;
2314
2379
  exports.useContext = useContext;
2315
2380
  exports.useDebugValue = useDebugValue;
@@ -6,18 +6,21 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- 'use strict';var l=require("object-assign"),m=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;
10
- if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;m=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");u=w("react.memo");v=w("react.lazy")}var x="function"===typeof Symbol&&Symbol.iterator;
11
- function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return"function"===typeof a?a:null}function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
12
- var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};function C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,"setState")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
13
- function D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;F.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};
9
+ 'use strict';var l=require("object-assign"),m=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;exports.unstable_SuspenseList=60120;var u=60115,v=60116;exports.unstable_DebugTracingMode=60129;exports.unstable_LegacyHidden=60131;exports.unstable_Cache=60132;
10
+ if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;m=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");exports.unstable_SuspenseList=w("react.suspense_list");u=w("react.memo");v=w("react.lazy");exports.unstable_DebugTracingMode=w("react.debug_trace_mode");exports.unstable_LegacyHidden=
11
+ w("react.legacy_hidden");exports.unstable_Cache=w("react.cache")}var x="function"===typeof Symbol&&Symbol.iterator;function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return"function"===typeof a?a:null}
12
+ function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};
13
+ function C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,"setState")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;
14
+ F.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};
14
15
  function J(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)H.call(b,e)&&!I.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),n=0;n<g;n++)f[n]=arguments[n+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:m,type:a,key:k,ref:h,props:d,_owner:G.current}}
15
16
  function K(a,b){return{$$typeof:m,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function L(a){return"object"===typeof a&&null!==a&&a.$$typeof===m}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var M=/\/+/g;function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
16
17
  function O(a,b,c,e,d){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case m:case p:h=!0}}if(h)return h=a,d=d(h),a=""===e?"."+N(h,0):e,Array.isArray(d)?(c="",null!=a&&(c=a.replace(M,"$&/")+"/"),O(d,b,c,"",function(a){return a})):null!=d&&(L(d)&&(d=K(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(M,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(Array.isArray(a))for(var g=
17
18
  0;g<a.length;g++){k=a[g];var f=e+N(k,g);h+=O(k,b,c,f,d)}else if(f=y(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+N(k,g++),h+=O(k,b,c,f,d);else if("object"===k)throw b=""+a,Error(z(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function P(a,b,c){if(null==a)return a;var e=[],d=0;O(a,e,"","",function(a){return b.call(c,a,d++)});return e}
18
- function Q(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var R={current:null},S={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:G,IsSomeRendererActing:{current:!1},assign:l};
19
- exports.Children={map:P,forEach:function(a,b,c){P(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;P(a,function(){b++});return b},toArray:function(a){return P(a,function(a){return a})||[]},only:function(a){if(!L(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=S;
19
+ function Q(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var R={current:null},S={transition:0},T={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:S,ReactCurrentOwner:G,IsSomeRendererActing:{current:!1},assign:l};
20
+ exports.Children={map:P,forEach:function(a,b,c){P(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;P(a,function(){b++});return b},toArray:function(a){return P(a,function(a){return a})||[]},only:function(a){if(!L(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T;
20
21
  exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(z(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=G.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)H.call(b,f)&&!I.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var n=0;n<f;n++)g[n]=arguments[n+2];e.children=g}return{$$typeof:m,type:a.type,
21
22
  key:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:r,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=J;exports.createFactory=function(a){var b=J.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=L;
22
- exports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:Q}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return R.current.useCallback(a,b)};exports.useContext=function(a,b){return R.current.useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return R.current.useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return R.current.useImperativeHandle(a,b,c)};
23
- exports.useLayoutEffect=function(a,b){return R.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return R.current.useMemo(a,b)};exports.useReducer=function(a,b,c){return R.current.useReducer(a,b,c)};exports.useRef=function(a){return R.current.useRef(a)};exports.useState=function(a){return R.current.useState(a)};exports.version="17.0.2-e2fd460cc";
23
+ exports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:Q}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.unstable_createMutableSource=function(a,b){return{_getVersion:b,_source:a,_workInProgressVersionPrimary:null,_workInProgressVersionSecondary:null}};exports.unstable_getCacheForType=function(a){return R.current.getCacheForType(a)};
24
+ exports.unstable_startTransition=function(a){var b=S.transition;S.transition=1;try{a()}finally{S.transition=b}};exports.unstable_useCacheRefresh=function(){return R.current.useCacheRefresh()};exports.unstable_useDeferredValue=function(a){return R.current.useDeferredValue(a)};exports.unstable_useMutableSource=function(a,b,c){return R.current.useMutableSource(a,b,c)};exports.unstable_useOpaqueIdentifier=function(){return R.current.useOpaqueIdentifier()};exports.unstable_useTransition=function(){return R.current.useTransition()};
25
+ exports.useCallback=function(a,b){return R.current.useCallback(a,b)};exports.useContext=function(a,b){return R.current.useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return R.current.useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return R.current.useImperativeHandle(a,b,c)};exports.useLayoutEffect=function(a,b){return R.current.useLayoutEffect(a,b)};exports.useMemo=function(a,b){return R.current.useMemo(a,b)};
26
+ exports.useReducer=function(a,b,c){return R.current.useReducer(a,b,c)};exports.useRef=function(a){return R.current.useRef(a)};exports.useState=function(a){return R.current.useState(a)};exports.version="17.0.2-experimental-4190a3458";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "0.0.0-e2fd460cc",
7
+ "version": "0.0.0-experimental-4190a3458",
8
8
  "homepage": "https://reactjs.org/",
9
9
  "bugs": "https://github.com/facebook/react/issues",
10
10
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  (global = global || self, factory(global.React = {}));
13
13
  }(this, (function (exports) { 'use strict';
14
14
 
15
- var ReactVersion = '17.0.2-e2fd460cc';
15
+ var ReactVersion = '17.0.2-experimental-4190a3458';
16
16
 
17
17
  // ATTENTION
18
18
  // When adding new symbols to this file,
@@ -28,15 +28,15 @@
28
28
  var REACT_CONTEXT_TYPE = 0xeace;
29
29
  var REACT_FORWARD_REF_TYPE = 0xead0;
30
30
  exports.Suspense = 0xead1;
31
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
31
+ exports.unstable_SuspenseList = 0xead8;
32
32
  var REACT_MEMO_TYPE = 0xead3;
33
33
  var REACT_LAZY_TYPE = 0xead4;
34
34
  var REACT_SCOPE_TYPE = 0xead7;
35
35
  var REACT_OPAQUE_ID_TYPE = 0xeae0;
36
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
36
+ exports.unstable_DebugTracingMode = 0xeae1;
37
37
  var REACT_OFFSCREEN_TYPE = 0xeae2;
38
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
39
- var REACT_CACHE_TYPE = 0xeae4;
38
+ exports.unstable_LegacyHidden = 0xeae3;
39
+ exports.unstable_Cache = 0xeae4;
40
40
 
41
41
  if (typeof Symbol === 'function' && Symbol.for) {
42
42
  var symbolFor = Symbol.for;
@@ -49,15 +49,15 @@
49
49
  REACT_CONTEXT_TYPE = symbolFor('react.context');
50
50
  REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
51
51
  exports.Suspense = symbolFor('react.suspense');
52
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
52
+ exports.unstable_SuspenseList = symbolFor('react.suspense_list');
53
53
  REACT_MEMO_TYPE = symbolFor('react.memo');
54
54
  REACT_LAZY_TYPE = symbolFor('react.lazy');
55
55
  REACT_SCOPE_TYPE = symbolFor('react.scope');
56
56
  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
57
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
57
+ exports.unstable_DebugTracingMode = symbolFor('react.debug_trace_mode');
58
58
  REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
59
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
60
- REACT_CACHE_TYPE = symbolFor('react.cache');
59
+ exports.unstable_LegacyHidden = symbolFor('react.legacy_hidden');
60
+ exports.unstable_Cache = symbolFor('react.cache');
61
61
  }
62
62
 
63
63
  var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
@@ -513,10 +513,10 @@
513
513
  case exports.Suspense:
514
514
  return 'Suspense';
515
515
 
516
- case REACT_SUSPENSE_LIST_TYPE:
516
+ case exports.unstable_SuspenseList:
517
517
  return 'SuspenseList';
518
518
 
519
- case REACT_CACHE_TYPE:
519
+ case exports.unstable_Cache:
520
520
  return 'Cache';
521
521
  }
522
522
 
@@ -1432,7 +1432,6 @@
1432
1432
  }
1433
1433
 
1434
1434
  // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
1435
- var enableCache = false; // Only used in www builds.
1436
1435
 
1437
1436
  var enableScopeAPI = false; // Experimental Create Event Handle API.
1438
1437
 
@@ -1448,7 +1447,7 @@
1448
1447
  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
1449
1448
 
1450
1449
 
1451
- if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI || enableCache ) {
1450
+ if (type === exports.Fragment || type === exports.Profiler || type === exports.unstable_DebugTracingMode || type === exports.StrictMode || type === exports.Suspense || type === exports.unstable_SuspenseList || type === exports.unstable_LegacyHidden || enableScopeAPI || type === exports.unstable_Cache) {
1452
1451
  return true;
1453
1452
  }
1454
1453
 
@@ -1513,6 +1512,12 @@
1513
1512
 
1514
1513
  return dispatcher;
1515
1514
  }
1515
+
1516
+ function getCacheForType(resourceType) {
1517
+ var dispatcher = resolveDispatcher(); // $FlowFixMe This is unstable, thus optional
1518
+
1519
+ return dispatcher.getCacheForType(resourceType);
1520
+ }
1516
1521
  function useContext(Context, unstable_observedBits) {
1517
1522
  var dispatcher = resolveDispatcher();
1518
1523
 
@@ -1574,6 +1579,27 @@
1574
1579
  return dispatcher.useDebugValue(value, formatterFn);
1575
1580
  }
1576
1581
  }
1582
+ function useTransition() {
1583
+ var dispatcher = resolveDispatcher();
1584
+ return dispatcher.useTransition();
1585
+ }
1586
+ function useDeferredValue(value) {
1587
+ var dispatcher = resolveDispatcher();
1588
+ return dispatcher.useDeferredValue(value);
1589
+ }
1590
+ function useOpaqueIdentifier() {
1591
+ var dispatcher = resolveDispatcher();
1592
+ return dispatcher.useOpaqueIdentifier();
1593
+ }
1594
+ function useMutableSource(source, getSnapshot, subscribe) {
1595
+ var dispatcher = resolveDispatcher();
1596
+ return dispatcher.useMutableSource(source, getSnapshot, subscribe);
1597
+ }
1598
+ function useCacheRefresh() {
1599
+ var dispatcher = resolveDispatcher(); // $FlowFixMe This is unstable, thus optional
1600
+
1601
+ return dispatcher.useCacheRefresh();
1602
+ }
1577
1603
 
1578
1604
  // Helpers to patch console.logs to avoid logging during side-effect free
1579
1605
  // replaying on render function. This currently only patches the object
@@ -1878,7 +1904,7 @@
1878
1904
  case exports.Suspense:
1879
1905
  return describeBuiltInComponentFrame('Suspense');
1880
1906
 
1881
- case REACT_SUSPENSE_LIST_TYPE:
1907
+ case exports.unstable_SuspenseList:
1882
1908
  return describeBuiltInComponentFrame('SuspenseList');
1883
1909
  }
1884
1910
 
@@ -2311,8 +2337,28 @@
2311
2337
  return newElement;
2312
2338
  }
2313
2339
 
2340
+ function createMutableSource(source, getVersion) {
2341
+ var mutableSource = {
2342
+ _getVersion: getVersion,
2343
+ _source: source,
2344
+ _workInProgressVersionPrimary: null,
2345
+ _workInProgressVersionSecondary: null
2346
+ };
2347
+
2348
+ {
2349
+ mutableSource._currentPrimaryRenderer = null;
2350
+ mutableSource._currentSecondaryRenderer = null; // Used to detect side effects that update a mutable source during render.
2351
+ // See https://github.com/facebook/react/issues/19948
2352
+
2353
+ mutableSource._currentlyRenderingFiber = null;
2354
+ mutableSource._initialVersionAsOfFirstRender = null;
2355
+ }
2356
+
2357
+ return mutableSource;
2358
+ }
2359
+
2314
2360
  var enableSchedulerDebugging = false;
2315
- var enableProfiling = true;
2361
+ var enableProfiling = false; // TODO: enable to fix https://github.com/facebook/react/issues/20756.
2316
2362
 
2317
2363
  function push(heap, node) {
2318
2364
  var index = heap.length;
@@ -2397,172 +2443,13 @@
2397
2443
  }
2398
2444
 
2399
2445
  // TODO: Use symbols?
2400
- var NoPriority = 0;
2401
2446
  var ImmediatePriority = 1;
2402
2447
  var UserBlockingPriority = 2;
2403
2448
  var NormalPriority = 3;
2404
2449
  var LowPriority = 4;
2405
2450
  var IdlePriority = 5;
2406
2451
 
2407
- var runIdCounter = 0;
2408
- var mainThreadIdCounter = 0;
2409
- var profilingStateSize = 4;
2410
- var sharedProfilingBuffer = // $FlowFixMe Flow doesn't know about SharedArrayBuffer
2411
- typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : // $FlowFixMe Flow doesn't know about ArrayBuffer
2412
- typeof ArrayBuffer === 'function' ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : null // Don't crash the init path on IE9
2413
- ;
2414
- var profilingState = sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks
2415
-
2416
- var PRIORITY = 0;
2417
- var CURRENT_TASK_ID = 1;
2418
- var CURRENT_RUN_ID = 2;
2419
- var QUEUE_SIZE = 3;
2420
-
2421
- {
2422
- profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue
2423
- // array might include canceled tasks.
2424
-
2425
- profilingState[QUEUE_SIZE] = 0;
2426
- profilingState[CURRENT_TASK_ID] = 0;
2427
- } // Bytes per element is 4
2428
-
2429
-
2430
- var INITIAL_EVENT_LOG_SIZE = 131072;
2431
- var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes
2432
-
2433
- var eventLogSize = 0;
2434
- var eventLogBuffer = null;
2435
- var eventLog = null;
2436
- var eventLogIndex = 0;
2437
- var TaskStartEvent = 1;
2438
- var TaskCompleteEvent = 2;
2439
- var TaskErrorEvent = 3;
2440
- var TaskCancelEvent = 4;
2441
- var TaskRunEvent = 5;
2442
- var TaskYieldEvent = 6;
2443
- var SchedulerSuspendEvent = 7;
2444
- var SchedulerResumeEvent = 8;
2445
-
2446
- function logEvent(entries) {
2447
- if (eventLog !== null) {
2448
- var offset = eventLogIndex;
2449
- eventLogIndex += entries.length;
2450
-
2451
- if (eventLogIndex + 1 > eventLogSize) {
2452
- eventLogSize *= 2;
2453
-
2454
- if (eventLogSize > MAX_EVENT_LOG_SIZE) {
2455
- // Using console['error'] to evade Babel and ESLint
2456
- console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
2457
- stopLoggingProfilingEvents();
2458
- return;
2459
- }
2460
-
2461
- var newEventLog = new Int32Array(eventLogSize * 4);
2462
- newEventLog.set(eventLog);
2463
- eventLogBuffer = newEventLog.buffer;
2464
- eventLog = newEventLog;
2465
- }
2466
-
2467
- eventLog.set(entries, offset);
2468
- }
2469
- }
2470
-
2471
- function startLoggingProfilingEvents() {
2472
- eventLogSize = INITIAL_EVENT_LOG_SIZE;
2473
- eventLogBuffer = new ArrayBuffer(eventLogSize * 4);
2474
- eventLog = new Int32Array(eventLogBuffer);
2475
- eventLogIndex = 0;
2476
- }
2477
- function stopLoggingProfilingEvents() {
2478
- var buffer = eventLogBuffer;
2479
- eventLogSize = 0;
2480
- eventLogBuffer = null;
2481
- eventLog = null;
2482
- eventLogIndex = 0;
2483
- return buffer;
2484
- }
2485
- function markTaskStart(task, ms) {
2486
- {
2487
- profilingState[QUEUE_SIZE]++;
2488
-
2489
- if (eventLog !== null) {
2490
- // performance.now returns a float, representing milliseconds. When the
2491
- // event is logged, it's coerced to an int. Convert to microseconds to
2492
- // maintain extra degrees of precision.
2493
- logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);
2494
- }
2495
- }
2496
- }
2497
- function markTaskCompleted(task, ms) {
2498
- {
2499
- profilingState[PRIORITY] = NoPriority;
2500
- profilingState[CURRENT_TASK_ID] = 0;
2501
- profilingState[QUEUE_SIZE]--;
2502
-
2503
- if (eventLog !== null) {
2504
- logEvent([TaskCompleteEvent, ms * 1000, task.id]);
2505
- }
2506
- }
2507
- }
2508
- function markTaskCanceled(task, ms) {
2509
- {
2510
- profilingState[QUEUE_SIZE]--;
2511
-
2512
- if (eventLog !== null) {
2513
- logEvent([TaskCancelEvent, ms * 1000, task.id]);
2514
- }
2515
- }
2516
- }
2517
2452
  function markTaskErrored(task, ms) {
2518
- {
2519
- profilingState[PRIORITY] = NoPriority;
2520
- profilingState[CURRENT_TASK_ID] = 0;
2521
- profilingState[QUEUE_SIZE]--;
2522
-
2523
- if (eventLog !== null) {
2524
- logEvent([TaskErrorEvent, ms * 1000, task.id]);
2525
- }
2526
- }
2527
- }
2528
- function markTaskRun(task, ms) {
2529
- {
2530
- runIdCounter++;
2531
- profilingState[PRIORITY] = task.priorityLevel;
2532
- profilingState[CURRENT_TASK_ID] = task.id;
2533
- profilingState[CURRENT_RUN_ID] = runIdCounter;
2534
-
2535
- if (eventLog !== null) {
2536
- logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);
2537
- }
2538
- }
2539
- }
2540
- function markTaskYield(task, ms) {
2541
- {
2542
- profilingState[PRIORITY] = NoPriority;
2543
- profilingState[CURRENT_TASK_ID] = 0;
2544
- profilingState[CURRENT_RUN_ID] = 0;
2545
-
2546
- if (eventLog !== null) {
2547
- logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);
2548
- }
2549
- }
2550
- }
2551
- function markSchedulerSuspended(ms) {
2552
- {
2553
- mainThreadIdCounter++;
2554
-
2555
- if (eventLog !== null) {
2556
- logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);
2557
- }
2558
- }
2559
- }
2560
- function markSchedulerUnsuspended(ms) {
2561
- {
2562
- if (eventLog !== null) {
2563
- logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);
2564
- }
2565
- }
2566
2453
  }
2567
2454
 
2568
2455
  /* eslint-disable no-var */
@@ -2642,11 +2529,6 @@
2642
2529
  pop(timerQueue);
2643
2530
  timer.sortIndex = timer.expirationTime;
2644
2531
  push(taskQueue, timer);
2645
-
2646
- {
2647
- markTaskStart(timer, currentTime);
2648
- timer.isQueued = true;
2649
- }
2650
2532
  } else {
2651
2533
  // Remaining timers are pending.
2652
2534
  return;
@@ -2675,9 +2557,6 @@
2675
2557
  }
2676
2558
 
2677
2559
  function flushWork(hasTimeRemaining, initialTime) {
2678
- {
2679
- markSchedulerUnsuspended(initialTime);
2680
- } // We'll need a host callback the next time work is scheduled.
2681
2560
 
2682
2561
 
2683
2562
  isHostCallbackScheduled = false;
@@ -2712,12 +2591,6 @@
2712
2591
  currentTask = null;
2713
2592
  currentPriorityLevel = previousPriorityLevel;
2714
2593
  isPerformingWork = false;
2715
-
2716
- {
2717
- var _currentTime = getCurrentTime();
2718
-
2719
- markSchedulerSuspended(_currentTime);
2720
- }
2721
2594
  }
2722
2595
  }
2723
2596
 
@@ -2738,18 +2611,13 @@
2738
2611
  currentTask.callback = null;
2739
2612
  currentPriorityLevel = currentTask.priorityLevel;
2740
2613
  var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
2741
- markTaskRun(currentTask, currentTime);
2614
+
2742
2615
  var continuationCallback = callback(didUserCallbackTimeout);
2743
2616
  currentTime = getCurrentTime();
2744
2617
 
2745
2618
  if (typeof continuationCallback === 'function') {
2746
2619
  currentTask.callback = continuationCallback;
2747
- markTaskYield(currentTask, currentTime);
2748
2620
  } else {
2749
- {
2750
- markTaskCompleted(currentTask, currentTime);
2751
- currentTask.isQueued = false;
2752
- }
2753
2621
 
2754
2622
  if (currentTask === peek(taskQueue)) {
2755
2623
  pop(taskQueue);
@@ -2894,10 +2762,6 @@
2894
2762
  sortIndex: -1
2895
2763
  };
2896
2764
 
2897
- {
2898
- newTask.isQueued = false;
2899
- }
2900
-
2901
2765
  if (startTime > currentTime) {
2902
2766
  // This is a delayed task.
2903
2767
  newTask.sortIndex = startTime;
@@ -2918,11 +2782,6 @@
2918
2782
  } else {
2919
2783
  newTask.sortIndex = expirationTime;
2920
2784
  push(taskQueue, newTask);
2921
-
2922
- {
2923
- markTaskStart(newTask, currentTime);
2924
- newTask.isQueued = true;
2925
- } // Schedule a host callback, if needed. If we're already performing work,
2926
2785
  // wait until the next time we yield.
2927
2786
 
2928
2787
 
@@ -2951,13 +2810,6 @@
2951
2810
  }
2952
2811
 
2953
2812
  function unstable_cancelCallback(task) {
2954
- {
2955
- if (task.isQueued) {
2956
- var currentTime = getCurrentTime();
2957
- markTaskCanceled(task, currentTime);
2958
- task.isQueued = false;
2959
- }
2960
- } // Null out the callback to indicate the task has been canceled. (Can't
2961
2813
  // remove from the queue because you can't remove arbitrary nodes from an
2962
2814
  // array based heap, only the first one.)
2963
2815
 
@@ -3028,7 +2880,7 @@
3028
2880
  if (hasMoreWork) {
3029
2881
  // If there's more work, schedule the next message event at the end
3030
2882
  // of the preceding one.
3031
- port.postMessage(null);
2883
+ schedulePerformWorkUntilDeadline();
3032
2884
  } else {
3033
2885
  isMessageLoopRunning = false;
3034
2886
  scheduledHostCallback = null;
@@ -3039,16 +2891,24 @@
3039
2891
  } // Yielding to the browser will give it a chance to paint, so we can
3040
2892
  };
3041
2893
 
3042
- var channel = new MessageChannel();
3043
- var port = channel.port2;
3044
- channel.port1.onmessage = performWorkUntilDeadline;
2894
+ var schedulePerformWorkUntilDeadline;
2895
+
2896
+ {
2897
+ var channel = new MessageChannel();
2898
+ var port = channel.port2;
2899
+ channel.port1.onmessage = performWorkUntilDeadline;
2900
+
2901
+ schedulePerformWorkUntilDeadline = function () {
2902
+ port.postMessage(null);
2903
+ };
2904
+ }
3045
2905
 
3046
2906
  function requestHostCallback(callback) {
3047
2907
  scheduledHostCallback = callback;
3048
2908
 
3049
2909
  if (!isMessageLoopRunning) {
3050
2910
  isMessageLoopRunning = true;
3051
- port.postMessage(null);
2911
+ schedulePerformWorkUntilDeadline();
3052
2912
  }
3053
2913
  }
3054
2914
 
@@ -3064,11 +2924,7 @@
3064
2924
  }
3065
2925
 
3066
2926
  var unstable_requestPaint = requestPaint;
3067
- var unstable_Profiling = {
3068
- startLoggingProfilingEvents: startLoggingProfilingEvents,
3069
- stopLoggingProfilingEvents: stopLoggingProfilingEvents,
3070
- sharedProfilingBuffer: sharedProfilingBuffer
3071
- } ;
2927
+ var unstable_Profiling = null;
3072
2928
 
3073
2929
 
3074
2930
 
@@ -3453,6 +3309,17 @@
3453
3309
  ReactSharedInternals$1.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
3454
3310
  }
3455
3311
 
3312
+ function startTransition(scope) {
3313
+ var prevTransition = ReactCurrentBatchConfig.transition;
3314
+ ReactCurrentBatchConfig.transition = 1;
3315
+
3316
+ try {
3317
+ scope();
3318
+ } finally {
3319
+ ReactCurrentBatchConfig.transition = prevTransition;
3320
+ }
3321
+ }
3322
+
3456
3323
  var createElement$1 = createElementWithValidation ;
3457
3324
  var cloneElement$1 = cloneElementWithValidation ;
3458
3325
  var createFactory = createFactoryWithValidation ;
@@ -3477,6 +3344,14 @@
3477
3344
  exports.isValidElement = isValidElement;
3478
3345
  exports.lazy = lazy;
3479
3346
  exports.memo = memo;
3347
+ exports.unstable_createMutableSource = createMutableSource;
3348
+ exports.unstable_getCacheForType = getCacheForType;
3349
+ exports.unstable_startTransition = startTransition;
3350
+ exports.unstable_useCacheRefresh = useCacheRefresh;
3351
+ exports.unstable_useDeferredValue = useDeferredValue;
3352
+ exports.unstable_useMutableSource = useMutableSource;
3353
+ exports.unstable_useOpaqueIdentifier = useOpaqueIdentifier;
3354
+ exports.unstable_useTransition = useTransition;
3480
3355
  exports.useCallback = useCallback;
3481
3356
  exports.useContext = useContext;
3482
3357
  exports.useDebugValue = useDebugValue;