From 74e25ca142bb15da9a6ccf7f38ad1ef418c46ab0 Mon Sep 17 00:00:00 2001 From: sebmarkbage Date: Mon, 8 Apr 2024 23:27:08 +0000 Subject: [PATCH] Flatten ReactSharedInternals (#28783) This is similar to #28771 but for isomorphic. We need a make over for these dispatchers anyway so this is the first step. Also helps flush out some internals usage that will break anyway. It flattens the inner mutable objects onto the ReactSharedInternals. DiffTrain build for [d50323eb845c5fde0d720cae888bf35dedd05506](https://github.com/facebook/react/commit/d50323eb845c5fde0d720cae888bf35dedd05506) --- .../facebook-www/JSXDEVRuntime-dev.classic.js | 39 +- .../facebook-www/JSXDEVRuntime-dev.modern.js | 39 +- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/React-dev.classic.js | 222 ++++------- compiled/facebook-www/React-dev.modern.js | 212 ++++------ compiled/facebook-www/React-prod.classic.js | 87 ++--- compiled/facebook-www/React-prod.modern.js | 87 ++--- .../facebook-www/React-profiling.classic.js | 87 ++--- .../facebook-www/React-profiling.modern.js | 87 ++--- compiled/facebook-www/ReactART-dev.classic.js | 334 ++++++++-------- compiled/facebook-www/ReactART-dev.modern.js | 330 +++++++--------- .../facebook-www/ReactART-prod.classic.js | 108 +++--- compiled/facebook-www/ReactART-prod.modern.js | 108 +++--- compiled/facebook-www/ReactDOM-dev.classic.js | 363 ++++++++---------- compiled/facebook-www/ReactDOM-dev.modern.js | 357 ++++++++--------- .../facebook-www/ReactDOM-prod.classic.js | 143 +++---- compiled/facebook-www/ReactDOM-prod.modern.js | 145 +++---- .../ReactDOM-profiling.classic.js | 129 +++---- .../facebook-www/ReactDOM-profiling.modern.js | 131 +++---- .../ReactDOMServer-dev.classic.js | 40 +- .../facebook-www/ReactDOMServer-dev.modern.js | 40 +- .../ReactDOMServer-prod.classic.js | 16 +- .../ReactDOMServer-prod.modern.js | 16 +- .../ReactDOMServerStreaming-dev.modern.js | 38 +- .../ReactDOMServerStreaming-prod.modern.js | 14 +- .../ReactDOMTesting-dev.classic.js | 363 ++++++++---------- .../ReactDOMTesting-dev.modern.js | 357 ++++++++--------- .../ReactDOMTesting-prod.classic.js | 131 +++---- .../ReactDOMTesting-prod.modern.js | 133 +++---- .../ReactFlightDOMServer-dev.modern.js | 38 +- .../ReactFlightDOMServer-prod.modern.js | 26 +- .../facebook-www/ReactServer-dev.modern.js | 138 +++---- .../facebook-www/ReactServer-prod.modern.js | 116 +++--- .../ReactTestRenderer-dev.classic.js | 336 ++++++++-------- .../ReactTestRenderer-dev.modern.js | 336 ++++++++-------- .../ReactTestUtils-dev.classic.js | 4 +- .../facebook-www/ReactTestUtils-dev.modern.js | 4 +- 37 files changed, 2234 insertions(+), 2922 deletions(-) diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js index dfaa72c78fea3..219eafe5057de 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.classic.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.classic.js @@ -87,9 +87,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -486,7 +484,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -540,13 +537,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -739,7 +736,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -967,8 +964,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); var specialPropKeyWarningShown; var specialPropRefWarningShown; @@ -1012,12 +1007,12 @@ if (__DEV__) { { if ( typeof config.ref === "string" && - ReactCurrentOwner.current && + ReactSharedInternals.owner && self && - ReactCurrentOwner.current.stateNode !== self + ReactSharedInternals.owner.stateNode !== self ) { var componentName = getComponentNameFromType( - ReactCurrentOwner.current.type + ReactSharedInternals.owner.type ); if (!didWarnAboutStringRefs[componentName]) { @@ -1028,7 +1023,7 @@ if (__DEV__) { "We ask you to manually fix this case by using useRef() or createRef() instead. " + "Learn more about using refs safely here: " + "https://react.dev/link/strict-mode-string-ref", - getComponentNameFromType(ReactCurrentOwner.current.type), + getComponentNameFromType(ReactSharedInternals.owner.type), config.ref ); @@ -1381,7 +1376,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1415,7 +1410,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -1459,7 +1454,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1473,8 +1468,8 @@ if (__DEV__) { function getDeclarationErrorAddendum() { { - if (ReactCurrentOwner.current) { - var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (ReactSharedInternals.owner) { + var name = getComponentNameFromType(ReactSharedInternals.owner.type); if (name) { return "\n\nCheck the render method of `" + name + "`."; @@ -1589,7 +1584,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -1619,9 +1614,9 @@ if (__DEV__) { { if (element) { var stack = describeUnknownElementTypeFrameInDEV(element.type); - ReactDebugCurrentFrame.setExtraStackFrame(stack); + ReactSharedInternals.setExtraStackFrame(stack); } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + ReactSharedInternals.setExtraStackFrame(null); } } } diff --git a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js index 7e5f1724fdc96..6e8602be27a46 100644 --- a/compiled/facebook-www/JSXDEVRuntime-dev.modern.js +++ b/compiled/facebook-www/JSXDEVRuntime-dev.modern.js @@ -87,9 +87,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -486,7 +484,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -540,13 +537,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -739,7 +736,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -969,8 +966,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); var specialPropKeyWarningShown; var specialPropRefWarningShown; @@ -1014,12 +1009,12 @@ if (__DEV__) { { if ( typeof config.ref === "string" && - ReactCurrentOwner.current && + ReactSharedInternals.owner && self && - ReactCurrentOwner.current.stateNode !== self + ReactSharedInternals.owner.stateNode !== self ) { var componentName = getComponentNameFromType( - ReactCurrentOwner.current.type + ReactSharedInternals.owner.type ); if (!didWarnAboutStringRefs[componentName]) { @@ -1030,7 +1025,7 @@ if (__DEV__) { "We ask you to manually fix this case by using useRef() or createRef() instead. " + "Learn more about using refs safely here: " + "https://react.dev/link/strict-mode-string-ref", - getComponentNameFromType(ReactCurrentOwner.current.type), + getComponentNameFromType(ReactSharedInternals.owner.type), config.ref ); @@ -1383,7 +1378,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1417,7 +1412,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -1461,7 +1456,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1475,8 +1470,8 @@ if (__DEV__) { function getDeclarationErrorAddendum() { { - if (ReactCurrentOwner.current) { - var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (ReactSharedInternals.owner) { + var name = getComponentNameFromType(ReactSharedInternals.owner.type); if (name) { return "\n\nCheck the render method of `" + name + "`."; @@ -1591,7 +1586,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -1621,9 +1616,9 @@ if (__DEV__) { { if (element) { var stack = describeUnknownElementTypeFrameInDEV(element.type); - ReactDebugCurrentFrame.setExtraStackFrame(stack); + ReactSharedInternals.setExtraStackFrame(stack); } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + ReactSharedInternals.setExtraStackFrame(null); } } } diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 2606e34abec25..adba7d17dc418 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -f62cf8c62052ae780d351090013f7155cf9a868c +d50323eb845c5fde0d720cae888bf35dedd05506 diff --git a/compiled/facebook-www/React-dev.classic.js b/compiled/facebook-www/React-dev.classic.js index 4083348c90803..652bdd39b95f4 100644 --- a/compiled/facebook-www/React-dev.classic.js +++ b/compiled/facebook-www/React-dev.classic.js @@ -24,7 +24,7 @@ if (__DEV__) { ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = "19.0.0-www-classic-87084f69"; + var ReactVersion = "19.0.0-www-classic-16596e68"; // ATTENTION // When adding new symbols to this file, @@ -112,9 +112,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -626,75 +624,38 @@ if (__DEV__) { return null; } - /** - * Keeps track of the current dispatcher. - */ - var ReactCurrentDispatcher$1 = { - current: null - }; - - /** - * Keeps track of the current Cache dispatcher. - */ - var ReactCurrentCache = { - current: null - }; - - /** - * Keeps track of the current batch's configuration such as how long an update - * should suspend for if it needs to. - */ - var ReactCurrentBatchConfig = { - transition: null - }; - - var ReactCurrentActQueue = { - current: null, - // Used to reproduce behavior of `batchedUpdates` in legacy mode. - isBatchingLegacy: false, - didScheduleLegacyUpdate: false, - // Tracks whether something called `use` during the current batch of work. - // Determines whether we should yield to microtasks to unwrap already resolved - // promises without suspending. - didUsePromise: false, - // Track first uncaught error within this act - thrownErrors: [] - }; - - /** - * Keeps track of the current owner. - * - * The current owner is the component who should own any components that are - * currently being constructed. - */ - var ReactCurrentOwner$1 = { - /** - * @internal - * @type {ReactComponent} - */ - current: null + var ReactSharedInternals = { + H: null, + C: null, + T: null }; - var ReactDebugCurrentFrame$1 = {}; - var currentExtraStackFrame = null; + { + ReactSharedInternals.owner = null; + } { - ReactDebugCurrentFrame$1.setExtraStackFrame = function (stack) { - { - currentExtraStackFrame = stack; - } + ReactSharedInternals.actQueue = null; + ReactSharedInternals.isBatchingLegacy = false; + ReactSharedInternals.didScheduleLegacyUpdate = false; + ReactSharedInternals.didUsePromise = false; + ReactSharedInternals.thrownErrors = []; + var currentExtraStackFrame = null; + + ReactSharedInternals.setExtraStackFrame = function (stack) { + currentExtraStackFrame = stack; }; // Stack implementation injected by the current renderer. - ReactDebugCurrentFrame$1.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; - ReactDebugCurrentFrame$1.getStackAddendum = function () { + ReactSharedInternals.getStackAddendum = function () { var stack = ""; // Add an extra top frame while an element is being validated if (currentExtraStackFrame) { stack += currentExtraStackFrame; } // Delegate to the injected renderer-specific implementation - var impl = ReactDebugCurrentFrame$1.getCurrentStack; + var impl = ReactSharedInternals.getCurrentStack; if (impl) { stack += impl() || ""; @@ -704,18 +665,6 @@ if (__DEV__) { }; } - var ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher$1, - ReactCurrentCache: ReactCurrentCache, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: ReactCurrentOwner$1 - }; - - { - ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1; - ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; - } - // $FlowFixMe[method-unbinding] var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -858,7 +807,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -912,13 +860,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -1111,7 +1059,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -1339,8 +1287,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); var specialPropKeyWarningShown; var specialPropRefWarningShown; @@ -1384,12 +1330,12 @@ if (__DEV__) { { if ( typeof config.ref === "string" && - ReactCurrentOwner.current && + ReactSharedInternals.owner && self && - ReactCurrentOwner.current.stateNode !== self + ReactSharedInternals.owner.stateNode !== self ) { var componentName = getComponentNameFromType( - ReactCurrentOwner.current.type + ReactSharedInternals.owner.type ); if (!didWarnAboutStringRefs[componentName]) { @@ -1400,7 +1346,7 @@ if (__DEV__) { "We ask you to manually fix this case by using useRef() or createRef() instead. " + "Learn more about using refs safely here: " + "https://react.dev/link/strict-mode-string-ref", - getComponentNameFromType(ReactCurrentOwner.current.type), + getComponentNameFromType(ReactSharedInternals.owner.type), config.ref ); @@ -1789,7 +1735,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1823,7 +1769,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -1867,7 +1813,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1953,7 +1899,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1984,7 +1930,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -2048,7 +1994,7 @@ if (__DEV__) { ref, undefined, undefined, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -2104,7 +2050,7 @@ if (__DEV__) { } } - owner = ReactCurrentOwner.current; + owner = ReactSharedInternals.owner; } if (hasValidKey(config)) { @@ -2197,8 +2143,8 @@ if (__DEV__) { function getDeclarationErrorAddendum() { { - if (ReactCurrentOwner.current) { - var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (ReactSharedInternals.owner) { + var name = getComponentNameFromType(ReactSharedInternals.owner.type); if (name) { return "\n\nCheck the render method of `" + name + "`."; @@ -2313,7 +2259,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -2343,9 +2289,9 @@ if (__DEV__) { { if (element) { var stack = describeUnknownElementTypeFrameInDEV(element.type); - ReactDebugCurrentFrame.setExtraStackFrame(stack); + ReactSharedInternals.setExtraStackFrame(stack); } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + ReactSharedInternals.setExtraStackFrame(null); } } } @@ -3247,7 +3193,7 @@ if (__DEV__) { var cache = noopCache; function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -3268,7 +3214,7 @@ if (__DEV__) { } function getCacheForType(resourceType) { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; if (!dispatcher) { // If there is no dispatcher, then we treat this as not being cached. @@ -3425,26 +3371,26 @@ if (__DEV__) { }; function startTransition(scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition; // Each renderer registers a callback to receive the return value of + var prevTransition = ReactSharedInternals.T; // Each renderer registers a callback to receive the return value of // the scope function. This is used to implement async actions. var callbacks = new Set(); var transition = { _callbacks: callbacks }; - ReactCurrentBatchConfig.transition = transition; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = transition; + var currentTransition = ReactSharedInternals.T; { - ReactCurrentBatchConfig.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { // $FlowFixMe[incompatible-use] found when upgrading Flow - ReactCurrentBatchConfig.transition.name = options.name; // $FlowFixMe[incompatible-use] found when upgrading Flow + ReactSharedInternals.T.name = options.name; // $FlowFixMe[incompatible-use] found when upgrading Flow - ReactCurrentBatchConfig.transition.startTime = -1; + ReactSharedInternals.T.startTime = -1; } } @@ -3466,7 +3412,7 @@ if (__DEV__) { reportGlobalError(error); } finally { warnAboutTransitionSubscriptions(prevTransition, currentTransition); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } } @@ -3553,7 +3499,7 @@ if (__DEV__) { function act(callback) { { - // When ReactCurrentActQueue.current is not null, it signals to React that + // When ReactSharedInternals.actQueue is not null, it signals to React that // we're currently inside an `act` scope. React will push all its tasks to // this queue instead of scheduling them with platform APIs. // @@ -3562,18 +3508,18 @@ if (__DEV__) { // `act` calls can be nested. // // If we're already inside an `act` scope, reuse the existing queue. - var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy; - var prevActQueue = ReactCurrentActQueue.current; + var prevIsBatchingLegacy = ReactSharedInternals.isBatchingLegacy; + var prevActQueue = ReactSharedInternals.actQueue; var prevActScopeDepth = actScopeDepth; actScopeDepth++; - var queue = (ReactCurrentActQueue.current = + var queue = (ReactSharedInternals.actQueue = prevActQueue !== null ? prevActQueue : []); // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only // set to `true` while the given callback is executed, not for updates // triggered during an async event, because this is how the legacy // implementation of `act` behaved. { - ReactCurrentActQueue.isBatchingLegacy = true; + ReactSharedInternals.isBatchingLegacy = true; } var result; // This tracks whether the `act` call is awaited. In certain cases, not @@ -3586,12 +3532,12 @@ if (__DEV__) { // only place we ever read this fields is just below, right after running // the callback. So we don't need to reset after the callback runs. if (!disableLegacyMode) { - ReactCurrentActQueue.didScheduleLegacyUpdate = false; + ReactSharedInternals.didScheduleLegacyUpdate = false; } result = callback(); var didScheduleLegacyUpdate = !disableLegacyMode - ? ReactCurrentActQueue.didScheduleLegacyUpdate + ? ReactSharedInternals.didScheduleLegacyUpdate : false; // Replicate behavior of original `act` implementation in legacy mode, // which flushed updates immediately after the scope function exits, even // if it's an async function. @@ -3604,24 +3550,24 @@ if (__DEV__) { // delete legacy mode!! if (!disableLegacyMode) { - ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; + ReactSharedInternals.isBatchingLegacy = prevIsBatchingLegacy; } } catch (error) { // `isBatchingLegacy` gets reset using the regular stack, not the async // one used to track `act` scopes. Why, you may be wondering? Because // that's how it worked before version 18. Yes, it's confusing! We should // delete legacy mode!! - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { { - ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy; + ReactSharedInternals.isBatchingLegacy = prevIsBatchingLegacy; } popActScope(prevActQueue, prevActScopeDepth); - var thrownError = aggregateErrors(ReactCurrentActQueue.thrownErrors); - ReactCurrentActQueue.thrownErrors.length = 0; + var thrownError = aggregateErrors(ReactSharedInternals.thrownErrors); + ReactSharedInternals.thrownErrors.length = 0; throw thrownError; } @@ -3677,15 +3623,15 @@ if (__DEV__) { // `thenable` might not be a real promise, and `flushActQueue` // might throw, so we need to wrap `flushActQueue` in a // try/catch. - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { var _thrownError = aggregateErrors( - ReactCurrentActQueue.thrownErrors + ReactSharedInternals.thrownErrors ); - ReactCurrentActQueue.thrownErrors.length = 0; + ReactSharedInternals.thrownErrors.length = 0; reject(_thrownError); } } else { @@ -3695,12 +3641,12 @@ if (__DEV__) { function (error) { popActScope(prevActQueue, prevActScopeDepth); - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { var _thrownError2 = aggregateErrors( - ReactCurrentActQueue.thrownErrors + ReactSharedInternals.thrownErrors ); - ReactCurrentActQueue.thrownErrors.length = 0; + ReactSharedInternals.thrownErrors.length = 0; reject(_thrownError2); } else { reject(error); @@ -3754,15 +3700,15 @@ if (__DEV__) { // TODO: In a future version, consider always requiring all `act` calls // to be awaited, regardless of whether the callback is sync or async. - ReactCurrentActQueue.current = null; + ReactSharedInternals.actQueue = null; } - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { var _thrownError3 = aggregateErrors( - ReactCurrentActQueue.thrownErrors + ReactSharedInternals.thrownErrors ); - ReactCurrentActQueue.thrownErrors.length = 0; + ReactSharedInternals.thrownErrors.length = 0; throw _thrownError3; } @@ -3773,7 +3719,7 @@ if (__DEV__) { if (prevActScopeDepth === 0) { // If the `act` call is awaited, restore the queue we were // using before (see long comment above) so we can flush it. - ReactCurrentActQueue.current = queue; + ReactSharedInternals.actQueue = queue; enqueueTask(function () { return ( // Recursively flush tasks scheduled by a microtask. @@ -3805,7 +3751,7 @@ if (__DEV__) { function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { { // Check if any tasks were scheduled asynchronously. - var queue = ReactCurrentActQueue.current; + var queue = ReactSharedInternals.actQueue; if (queue !== null) { if (queue.length !== 0) { @@ -3825,17 +3771,17 @@ if (__DEV__) { return; } catch (error) { // Leave remaining tasks on the queue if something throws. - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } } else { // The queue is empty. We can finish. - ReactCurrentActQueue.current = null; + ReactSharedInternals.actQueue = null; } } - if (ReactCurrentActQueue.thrownErrors.length > 0) { - var thrownError = aggregateErrors(ReactCurrentActQueue.thrownErrors); - ReactCurrentActQueue.thrownErrors.length = 0; + if (ReactSharedInternals.thrownErrors.length > 0) { + var thrownError = aggregateErrors(ReactSharedInternals.thrownErrors); + ReactSharedInternals.thrownErrors.length = 0; reject(thrownError); } else { resolve(returnValue); @@ -3857,11 +3803,11 @@ if (__DEV__) { var callback = queue[i]; do { - ReactCurrentActQueue.didUsePromise = false; + ReactSharedInternals.didUsePromise = false; var continuation = callback(false); if (continuation !== null) { - if (ReactCurrentActQueue.didUsePromise) { + if (ReactSharedInternals.didUsePromise) { // The component just suspended. Yield to the main thread in // case the promise is already resolved. If so, it will ping in // a microtask and we can resume without unwinding the stack. @@ -3881,7 +3827,7 @@ if (__DEV__) { } catch (error) { // If something throws, leave the remaining callbacks on the queue. queue.splice(0, i + 1); - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } finally { isFlushing = false; } diff --git a/compiled/facebook-www/React-dev.modern.js b/compiled/facebook-www/React-dev.modern.js index 6c8790db9df3a..542842060a56f 100644 --- a/compiled/facebook-www/React-dev.modern.js +++ b/compiled/facebook-www/React-dev.modern.js @@ -24,7 +24,7 @@ if (__DEV__) { ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } - var ReactVersion = "19.0.0-www-modern-7116ae62"; + var ReactVersion = "19.0.0-www-modern-4ab6e189"; // ATTENTION // When adding new symbols to this file, @@ -112,9 +112,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -626,75 +624,38 @@ if (__DEV__) { return null; } - /** - * Keeps track of the current dispatcher. - */ - var ReactCurrentDispatcher$1 = { - current: null - }; - - /** - * Keeps track of the current Cache dispatcher. - */ - var ReactCurrentCache = { - current: null - }; - - /** - * Keeps track of the current batch's configuration such as how long an update - * should suspend for if it needs to. - */ - var ReactCurrentBatchConfig = { - transition: null - }; - - var ReactCurrentActQueue = { - current: null, - // Used to reproduce behavior of `batchedUpdates` in legacy mode. - isBatchingLegacy: false, - didScheduleLegacyUpdate: false, - // Tracks whether something called `use` during the current batch of work. - // Determines whether we should yield to microtasks to unwrap already resolved - // promises without suspending. - didUsePromise: false, - // Track first uncaught error within this act - thrownErrors: [] - }; - - /** - * Keeps track of the current owner. - * - * The current owner is the component who should own any components that are - * currently being constructed. - */ - var ReactCurrentOwner$1 = { - /** - * @internal - * @type {ReactComponent} - */ - current: null + var ReactSharedInternals = { + H: null, + C: null, + T: null }; - var ReactDebugCurrentFrame$1 = {}; - var currentExtraStackFrame = null; + { + ReactSharedInternals.owner = null; + } { - ReactDebugCurrentFrame$1.setExtraStackFrame = function (stack) { - { - currentExtraStackFrame = stack; - } + ReactSharedInternals.actQueue = null; + ReactSharedInternals.isBatchingLegacy = false; + ReactSharedInternals.didScheduleLegacyUpdate = false; + ReactSharedInternals.didUsePromise = false; + ReactSharedInternals.thrownErrors = []; + var currentExtraStackFrame = null; + + ReactSharedInternals.setExtraStackFrame = function (stack) { + currentExtraStackFrame = stack; }; // Stack implementation injected by the current renderer. - ReactDebugCurrentFrame$1.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; - ReactDebugCurrentFrame$1.getStackAddendum = function () { + ReactSharedInternals.getStackAddendum = function () { var stack = ""; // Add an extra top frame while an element is being validated if (currentExtraStackFrame) { stack += currentExtraStackFrame; } // Delegate to the injected renderer-specific implementation - var impl = ReactDebugCurrentFrame$1.getCurrentStack; + var impl = ReactSharedInternals.getCurrentStack; if (impl) { stack += impl() || ""; @@ -704,18 +665,6 @@ if (__DEV__) { }; } - var ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher$1, - ReactCurrentCache: ReactCurrentCache, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: ReactCurrentOwner$1 - }; - - { - ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1; - ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; - } - // $FlowFixMe[method-unbinding] var hasOwnProperty = Object.prototype.hasOwnProperty; @@ -858,7 +807,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -912,13 +860,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -1111,7 +1059,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -1341,8 +1289,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); var specialPropKeyWarningShown; var specialPropRefWarningShown; @@ -1386,12 +1332,12 @@ if (__DEV__) { { if ( typeof config.ref === "string" && - ReactCurrentOwner.current && + ReactSharedInternals.owner && self && - ReactCurrentOwner.current.stateNode !== self + ReactSharedInternals.owner.stateNode !== self ) { var componentName = getComponentNameFromType( - ReactCurrentOwner.current.type + ReactSharedInternals.owner.type ); if (!didWarnAboutStringRefs[componentName]) { @@ -1402,7 +1348,7 @@ if (__DEV__) { "We ask you to manually fix this case by using useRef() or createRef() instead. " + "Learn more about using refs safely here: " + "https://react.dev/link/strict-mode-string-ref", - getComponentNameFromType(ReactCurrentOwner.current.type), + getComponentNameFromType(ReactSharedInternals.owner.type), config.ref ); @@ -1791,7 +1737,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1825,7 +1771,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -1869,7 +1815,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1955,7 +1901,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1986,7 +1932,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -2050,7 +1996,7 @@ if (__DEV__) { ref, undefined, undefined, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -2106,7 +2052,7 @@ if (__DEV__) { } } - owner = ReactCurrentOwner.current; + owner = ReactSharedInternals.owner; } if (hasValidKey(config)) { @@ -2199,8 +2145,8 @@ if (__DEV__) { function getDeclarationErrorAddendum() { { - if (ReactCurrentOwner.current) { - var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (ReactSharedInternals.owner) { + var name = getComponentNameFromType(ReactSharedInternals.owner.type); if (name) { return "\n\nCheck the render method of `" + name + "`."; @@ -2315,7 +2261,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -2345,9 +2291,9 @@ if (__DEV__) { { if (element) { var stack = describeUnknownElementTypeFrameInDEV(element.type); - ReactDebugCurrentFrame.setExtraStackFrame(stack); + ReactSharedInternals.setExtraStackFrame(stack); } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + ReactSharedInternals.setExtraStackFrame(null); } } } @@ -3249,7 +3195,7 @@ if (__DEV__) { var cache = noopCache; function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -3270,7 +3216,7 @@ if (__DEV__) { } function getCacheForType(resourceType) { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; if (!dispatcher) { // If there is no dispatcher, then we treat this as not being cached. @@ -3427,26 +3373,26 @@ if (__DEV__) { }; function startTransition(scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition; // Each renderer registers a callback to receive the return value of + var prevTransition = ReactSharedInternals.T; // Each renderer registers a callback to receive the return value of // the scope function. This is used to implement async actions. var callbacks = new Set(); var transition = { _callbacks: callbacks }; - ReactCurrentBatchConfig.transition = transition; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = transition; + var currentTransition = ReactSharedInternals.T; { - ReactCurrentBatchConfig.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { // $FlowFixMe[incompatible-use] found when upgrading Flow - ReactCurrentBatchConfig.transition.name = options.name; // $FlowFixMe[incompatible-use] found when upgrading Flow + ReactSharedInternals.T.name = options.name; // $FlowFixMe[incompatible-use] found when upgrading Flow - ReactCurrentBatchConfig.transition.startTime = -1; + ReactSharedInternals.T.startTime = -1; } } @@ -3468,7 +3414,7 @@ if (__DEV__) { reportGlobalError(error); } finally { warnAboutTransitionSubscriptions(prevTransition, currentTransition); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } } @@ -3555,7 +3501,7 @@ if (__DEV__) { function act(callback) { { - // When ReactCurrentActQueue.current is not null, it signals to React that + // When ReactSharedInternals.actQueue is not null, it signals to React that // we're currently inside an `act` scope. React will push all its tasks to // this queue instead of scheduling them with platform APIs. // @@ -3565,10 +3511,10 @@ if (__DEV__) { // // If we're already inside an `act` scope, reuse the existing queue. var prevIsBatchingLegacy = false; - var prevActQueue = ReactCurrentActQueue.current; + var prevActQueue = ReactSharedInternals.actQueue; var prevActScopeDepth = actScopeDepth; actScopeDepth++; - var queue = (ReactCurrentActQueue.current = + var queue = (ReactSharedInternals.actQueue = prevActQueue !== null ? prevActQueue : []); // Used to reproduce behavior of `batchedUpdates` in legacy mode. Only var result; // This tracks whether the `act` call is awaited. In certain cases, not @@ -3584,7 +3530,7 @@ if (__DEV__) { result = callback(); var didScheduleLegacyUpdate = !disableLegacyMode - ? ReactCurrentActQueue.didScheduleLegacyUpdate + ? ReactSharedInternals.didScheduleLegacyUpdate : false; // Replicate behavior of original `act` implementation in legacy mode, // which flushed updates immediately after the scope function exits, even // if it's an async function. @@ -3602,13 +3548,13 @@ if (__DEV__) { // one used to track `act` scopes. Why, you may be wondering? Because // that's how it worked before version 18. Yes, it's confusing! We should // delete legacy mode!! - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { popActScope(prevActQueue, prevActScopeDepth); - var thrownError = aggregateErrors(ReactCurrentActQueue.thrownErrors); - ReactCurrentActQueue.thrownErrors.length = 0; + var thrownError = aggregateErrors(ReactSharedInternals.thrownErrors); + ReactSharedInternals.thrownErrors.length = 0; throw thrownError; } @@ -3664,15 +3610,15 @@ if (__DEV__) { // `thenable` might not be a real promise, and `flushActQueue` // might throw, so we need to wrap `flushActQueue` in a // try/catch. - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { var _thrownError = aggregateErrors( - ReactCurrentActQueue.thrownErrors + ReactSharedInternals.thrownErrors ); - ReactCurrentActQueue.thrownErrors.length = 0; + ReactSharedInternals.thrownErrors.length = 0; reject(_thrownError); } } else { @@ -3682,12 +3628,12 @@ if (__DEV__) { function (error) { popActScope(prevActQueue, prevActScopeDepth); - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { var _thrownError2 = aggregateErrors( - ReactCurrentActQueue.thrownErrors + ReactSharedInternals.thrownErrors ); - ReactCurrentActQueue.thrownErrors.length = 0; + ReactSharedInternals.thrownErrors.length = 0; reject(_thrownError2); } else { reject(error); @@ -3741,15 +3687,15 @@ if (__DEV__) { // TODO: In a future version, consider always requiring all `act` calls // to be awaited, regardless of whether the callback is sync or async. - ReactCurrentActQueue.current = null; + ReactSharedInternals.actQueue = null; } - if (ReactCurrentActQueue.thrownErrors.length > 0) { + if (ReactSharedInternals.thrownErrors.length > 0) { var _thrownError3 = aggregateErrors( - ReactCurrentActQueue.thrownErrors + ReactSharedInternals.thrownErrors ); - ReactCurrentActQueue.thrownErrors.length = 0; + ReactSharedInternals.thrownErrors.length = 0; throw _thrownError3; } @@ -3760,7 +3706,7 @@ if (__DEV__) { if (prevActScopeDepth === 0) { // If the `act` call is awaited, restore the queue we were // using before (see long comment above) so we can flush it. - ReactCurrentActQueue.current = queue; + ReactSharedInternals.actQueue = queue; enqueueTask(function () { return ( // Recursively flush tasks scheduled by a microtask. @@ -3792,7 +3738,7 @@ if (__DEV__) { function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { { // Check if any tasks were scheduled asynchronously. - var queue = ReactCurrentActQueue.current; + var queue = ReactSharedInternals.actQueue; if (queue !== null) { if (queue.length !== 0) { @@ -3812,17 +3758,17 @@ if (__DEV__) { return; } catch (error) { // Leave remaining tasks on the queue if something throws. - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } } else { // The queue is empty. We can finish. - ReactCurrentActQueue.current = null; + ReactSharedInternals.actQueue = null; } } - if (ReactCurrentActQueue.thrownErrors.length > 0) { - var thrownError = aggregateErrors(ReactCurrentActQueue.thrownErrors); - ReactCurrentActQueue.thrownErrors.length = 0; + if (ReactSharedInternals.thrownErrors.length > 0) { + var thrownError = aggregateErrors(ReactSharedInternals.thrownErrors); + ReactSharedInternals.thrownErrors.length = 0; reject(thrownError); } else { resolve(returnValue); @@ -3844,11 +3790,11 @@ if (__DEV__) { var callback = queue[i]; do { - ReactCurrentActQueue.didUsePromise = false; + ReactSharedInternals.didUsePromise = false; var continuation = callback(false); if (continuation !== null) { - if (ReactCurrentActQueue.didUsePromise) { + if (ReactSharedInternals.didUsePromise) { // The component just suspended. Yield to the main thread in // case the promise is already resolved. If so, it will ping in // a microtask and we can resume without unwinding the stack. @@ -3868,7 +3814,7 @@ if (__DEV__) { } catch (error) { // If something throws, leave the remaining callbacks on the queue. queue.splice(0, i + 1); - ReactCurrentActQueue.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); } finally { isFlushing = false; } diff --git a/compiled/facebook-www/React-prod.classic.js b/compiled/facebook-www/React-prod.classic.js index 59c83ad2209bc..60920b7cea2eb 100644 --- a/compiled/facebook-www/React-prod.classic.js +++ b/compiled/facebook-www/React-prod.classic.js @@ -87,17 +87,8 @@ var isArrayImpl = Array.isArray, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, - ReactCurrentDispatcher = { current: null }, - ReactCurrentCache = { current: null }, - ReactCurrentBatchConfig = { transition: null }, - ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher, - ReactCurrentCache: ReactCurrentCache, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: { current: null } - }, - hasOwnProperty = Object.prototype.hasOwnProperty, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + ReactSharedInternals = { H: null, C: null, T: null, owner: null }, + hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, _ref, self, source, owner, props) { enableRefAsProp && ((_ref = props.ref), (_ref = void 0 !== _ref ? _ref : null)); @@ -118,7 +109,7 @@ function jsxProd(type, config, maybeKey) { void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))); + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))); maybeKey = {}; for (var propName in config) "key" === propName || @@ -126,7 +117,7 @@ function jsxProd(type, config, maybeKey) { (enableRefAsProp && "ref" === propName ? (maybeKey.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (maybeKey[propName] = config[propName])); @@ -142,7 +133,7 @@ function jsxProd(type, config, maybeKey) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, maybeKey ); } @@ -468,7 +459,7 @@ exports.cloneElement = function (element, config, children) { void 0 !== config.ref && (enableRefAsProp || ((ref = config.ref), (ref = coerceStringRef(ref, owner, element.type))), - (owner = ReactCurrentOwner.current)); + (owner = ReactSharedInternals.owner)); void 0 !== config.key && (key = "" + config.key); if ( !disableDefaultPropsExceptForClasses && @@ -535,7 +526,7 @@ exports.createElement = function (type, config, children) { for (propName in (void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))), + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))), void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && @@ -546,7 +537,7 @@ exports.createElement = function (type, config, children) { (enableRefAsProp && "ref" === propName ? (props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (props[propName] = config[propName])); @@ -567,7 +558,7 @@ exports.createElement = function (type, config, children) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); }; @@ -575,7 +566,7 @@ exports.createRef = function () { return { current: null }; }; exports.experimental_useEffectEvent = function (callback) { - return ReactCurrentDispatcher.current.useEffectEvent(callback); + return ReactSharedInternals.H.useEffectEvent(callback); }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; @@ -599,15 +590,15 @@ exports.memo = function (type, compare) { }; }; exports.startTransition = function (scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, callbacks = new Set(); - ReactCurrentBatchConfig.transition = { _callbacks: callbacks }; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = { _callbacks: callbacks }; + var currentTransition = ReactSharedInternals.T; enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig.transition.name = options.name), - (ReactCurrentBatchConfig.transition.startTime = -1)); + ((ReactSharedInternals.T.name = options.name), + (ReactSharedInternals.T.startTime = -1)); try { var returnValue = scope(); "object" === typeof returnValue && @@ -620,7 +611,7 @@ exports.startTransition = function (scope, options) { } catch (error) { reportGlobalError(error); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } }; exports.unstable_Activity = REACT_OFFSCREEN_TYPE; @@ -630,77 +621,73 @@ exports.unstable_Scope = REACT_SCOPE_TYPE; exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE; exports.unstable_TracingMarker = REACT_TRACING_MARKER_TYPE; exports.unstable_getCacheForType = function (resourceType) { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType(); }; exports.unstable_useCacheRefresh = function () { - return ReactCurrentDispatcher.current.useCacheRefresh(); + return ReactSharedInternals.H.useCacheRefresh(); }; exports.unstable_useMemoCache = function (size) { - return ReactCurrentDispatcher.current.useMemoCache(size); + return ReactSharedInternals.H.useMemoCache(size); }; exports.use = function (usable) { - return ReactCurrentDispatcher.current.use(usable); + return ReactSharedInternals.H.use(usable); }; exports.useActionState = function (action, initialState, permalink) { - return ReactCurrentDispatcher.current.useActionState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useActionState(action, initialState, permalink); }; exports.useCallback = function (callback, deps) { - return ReactCurrentDispatcher.current.useCallback(callback, deps); + return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useContext = function (Context) { - return ReactCurrentDispatcher.current.useContext(Context); + return ReactSharedInternals.H.useContext(Context); }; exports.useDebugValue = function () {}; exports.useDeferredValue = function (value, initialValue) { - return ReactCurrentDispatcher.current.useDeferredValue(value, initialValue); + return ReactSharedInternals.H.useDeferredValue(value, initialValue); }; exports.useEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useEffect(create, deps); + return ReactSharedInternals.H.useEffect(create, deps); }; exports.useId = function () { - return ReactCurrentDispatcher.current.useId(); + return ReactSharedInternals.H.useId(); }; exports.useImperativeHandle = function (ref, create, deps) { - return ReactCurrentDispatcher.current.useImperativeHandle(ref, create, deps); + return ReactSharedInternals.H.useImperativeHandle(ref, create, deps); }; exports.useInsertionEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useInsertionEffect(create, deps); + return ReactSharedInternals.H.useInsertionEffect(create, deps); }; exports.useLayoutEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useLayoutEffect(create, deps); + return ReactSharedInternals.H.useLayoutEffect(create, deps); }; exports.useMemo = function (create, deps) { - return ReactCurrentDispatcher.current.useMemo(create, deps); + return ReactSharedInternals.H.useMemo(create, deps); }; exports.useOptimistic = function (passthrough, reducer) { - return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer); + return ReactSharedInternals.H.useOptimistic(passthrough, reducer); }; exports.useReducer = function (reducer, initialArg, init) { - return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init); + return ReactSharedInternals.H.useReducer(reducer, initialArg, init); }; exports.useRef = function (initialValue) { - return ReactCurrentDispatcher.current.useRef(initialValue); + return ReactSharedInternals.H.useRef(initialValue); }; exports.useState = function (initialState) { - return ReactCurrentDispatcher.current.useState(initialState); + return ReactSharedInternals.H.useState(initialState); }; exports.useSyncExternalStore = function ( subscribe, getSnapshot, getServerSnapshot ) { - return ReactCurrentDispatcher.current.useSyncExternalStore( + return ReactSharedInternals.H.useSyncExternalStore( subscribe, getSnapshot, getServerSnapshot ); }; exports.useTransition = function () { - return ReactCurrentDispatcher.current.useTransition(); + return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-544fd05e"; +exports.version = "19.0.0-www-classic-a06f4067"; diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index 98a7961afc292..2bd4f9b13a5f0 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -87,17 +87,8 @@ var isArrayImpl = Array.isArray, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, - ReactCurrentDispatcher = { current: null }, - ReactCurrentCache = { current: null }, - ReactCurrentBatchConfig = { transition: null }, - ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher, - ReactCurrentCache: ReactCurrentCache, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: { current: null } - }, - hasOwnProperty = Object.prototype.hasOwnProperty, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + ReactSharedInternals = { H: null, C: null, T: null, owner: null }, + hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, _ref, self, source, owner, props) { enableRefAsProp && ((_ref = props.ref), (_ref = void 0 !== _ref ? _ref : null)); @@ -118,7 +109,7 @@ function jsxProd(type, config, maybeKey) { void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))); + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))); maybeKey = {}; for (var propName in config) "key" === propName || @@ -126,7 +117,7 @@ function jsxProd(type, config, maybeKey) { (enableRefAsProp && "ref" === propName ? (maybeKey.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (maybeKey[propName] = config[propName])); @@ -142,7 +133,7 @@ function jsxProd(type, config, maybeKey) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, maybeKey ); } @@ -468,7 +459,7 @@ exports.cloneElement = function (element, config, children) { void 0 !== config.ref && (enableRefAsProp || ((ref = config.ref), (ref = coerceStringRef(ref, owner, element.type))), - (owner = ReactCurrentOwner.current)); + (owner = ReactSharedInternals.owner)); void 0 !== config.key && (key = "" + config.key); if ( !disableDefaultPropsExceptForClasses && @@ -535,7 +526,7 @@ exports.createElement = function (type, config, children) { for (propName in (void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))), + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))), void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && @@ -546,7 +537,7 @@ exports.createElement = function (type, config, children) { (enableRefAsProp && "ref" === propName ? (props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (props[propName] = config[propName])); @@ -567,7 +558,7 @@ exports.createElement = function (type, config, children) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); }; @@ -575,7 +566,7 @@ exports.createRef = function () { return { current: null }; }; exports.experimental_useEffectEvent = function (callback) { - return ReactCurrentDispatcher.current.useEffectEvent(callback); + return ReactSharedInternals.H.useEffectEvent(callback); }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; @@ -599,15 +590,15 @@ exports.memo = function (type, compare) { }; }; exports.startTransition = function (scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, callbacks = new Set(); - ReactCurrentBatchConfig.transition = { _callbacks: callbacks }; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = { _callbacks: callbacks }; + var currentTransition = ReactSharedInternals.T; enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig.transition.name = options.name), - (ReactCurrentBatchConfig.transition.startTime = -1)); + ((ReactSharedInternals.T.name = options.name), + (ReactSharedInternals.T.startTime = -1)); try { var returnValue = scope(); "object" === typeof returnValue && @@ -620,7 +611,7 @@ exports.startTransition = function (scope, options) { } catch (error) { reportGlobalError(error); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } }; exports.unstable_Activity = REACT_OFFSCREEN_TYPE; @@ -630,77 +621,73 @@ exports.unstable_Scope = REACT_SCOPE_TYPE; exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE; exports.unstable_TracingMarker = REACT_TRACING_MARKER_TYPE; exports.unstable_getCacheForType = function (resourceType) { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType(); }; exports.unstable_useCacheRefresh = function () { - return ReactCurrentDispatcher.current.useCacheRefresh(); + return ReactSharedInternals.H.useCacheRefresh(); }; exports.unstable_useMemoCache = function (size) { - return ReactCurrentDispatcher.current.useMemoCache(size); + return ReactSharedInternals.H.useMemoCache(size); }; exports.use = function (usable) { - return ReactCurrentDispatcher.current.use(usable); + return ReactSharedInternals.H.use(usable); }; exports.useActionState = function (action, initialState, permalink) { - return ReactCurrentDispatcher.current.useActionState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useActionState(action, initialState, permalink); }; exports.useCallback = function (callback, deps) { - return ReactCurrentDispatcher.current.useCallback(callback, deps); + return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useContext = function (Context) { - return ReactCurrentDispatcher.current.useContext(Context); + return ReactSharedInternals.H.useContext(Context); }; exports.useDebugValue = function () {}; exports.useDeferredValue = function (value, initialValue) { - return ReactCurrentDispatcher.current.useDeferredValue(value, initialValue); + return ReactSharedInternals.H.useDeferredValue(value, initialValue); }; exports.useEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useEffect(create, deps); + return ReactSharedInternals.H.useEffect(create, deps); }; exports.useId = function () { - return ReactCurrentDispatcher.current.useId(); + return ReactSharedInternals.H.useId(); }; exports.useImperativeHandle = function (ref, create, deps) { - return ReactCurrentDispatcher.current.useImperativeHandle(ref, create, deps); + return ReactSharedInternals.H.useImperativeHandle(ref, create, deps); }; exports.useInsertionEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useInsertionEffect(create, deps); + return ReactSharedInternals.H.useInsertionEffect(create, deps); }; exports.useLayoutEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useLayoutEffect(create, deps); + return ReactSharedInternals.H.useLayoutEffect(create, deps); }; exports.useMemo = function (create, deps) { - return ReactCurrentDispatcher.current.useMemo(create, deps); + return ReactSharedInternals.H.useMemo(create, deps); }; exports.useOptimistic = function (passthrough, reducer) { - return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer); + return ReactSharedInternals.H.useOptimistic(passthrough, reducer); }; exports.useReducer = function (reducer, initialArg, init) { - return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init); + return ReactSharedInternals.H.useReducer(reducer, initialArg, init); }; exports.useRef = function (initialValue) { - return ReactCurrentDispatcher.current.useRef(initialValue); + return ReactSharedInternals.H.useRef(initialValue); }; exports.useState = function (initialState) { - return ReactCurrentDispatcher.current.useState(initialState); + return ReactSharedInternals.H.useState(initialState); }; exports.useSyncExternalStore = function ( subscribe, getSnapshot, getServerSnapshot ) { - return ReactCurrentDispatcher.current.useSyncExternalStore( + return ReactSharedInternals.H.useSyncExternalStore( subscribe, getSnapshot, getServerSnapshot ); }; exports.useTransition = function () { - return ReactCurrentDispatcher.current.useTransition(); + return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-544fd05e"; +exports.version = "19.0.0-www-modern-a06f4067"; diff --git a/compiled/facebook-www/React-profiling.classic.js b/compiled/facebook-www/React-profiling.classic.js index 911af10b78114..adb3bd4cad80a 100644 --- a/compiled/facebook-www/React-profiling.classic.js +++ b/compiled/facebook-www/React-profiling.classic.js @@ -91,17 +91,8 @@ var isArrayImpl = Array.isArray, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, - ReactCurrentDispatcher = { current: null }, - ReactCurrentCache = { current: null }, - ReactCurrentBatchConfig = { transition: null }, - ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher, - ReactCurrentCache: ReactCurrentCache, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: { current: null } - }, - hasOwnProperty = Object.prototype.hasOwnProperty, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + ReactSharedInternals = { H: null, C: null, T: null, owner: null }, + hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, _ref, self, source, owner, props) { enableRefAsProp && ((_ref = props.ref), (_ref = void 0 !== _ref ? _ref : null)); @@ -122,7 +113,7 @@ function jsxProd(type, config, maybeKey) { void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))); + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))); maybeKey = {}; for (var propName in config) "key" === propName || @@ -130,7 +121,7 @@ function jsxProd(type, config, maybeKey) { (enableRefAsProp && "ref" === propName ? (maybeKey.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (maybeKey[propName] = config[propName])); @@ -146,7 +137,7 @@ function jsxProd(type, config, maybeKey) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, maybeKey ); } @@ -472,7 +463,7 @@ exports.cloneElement = function (element, config, children) { void 0 !== config.ref && (enableRefAsProp || ((ref = config.ref), (ref = coerceStringRef(ref, owner, element.type))), - (owner = ReactCurrentOwner.current)); + (owner = ReactSharedInternals.owner)); void 0 !== config.key && (key = "" + config.key); if ( !disableDefaultPropsExceptForClasses && @@ -539,7 +530,7 @@ exports.createElement = function (type, config, children) { for (propName in (void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))), + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))), void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && @@ -550,7 +541,7 @@ exports.createElement = function (type, config, children) { (enableRefAsProp && "ref" === propName ? (props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (props[propName] = config[propName])); @@ -571,7 +562,7 @@ exports.createElement = function (type, config, children) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); }; @@ -579,7 +570,7 @@ exports.createRef = function () { return { current: null }; }; exports.experimental_useEffectEvent = function (callback) { - return ReactCurrentDispatcher.current.useEffectEvent(callback); + return ReactSharedInternals.H.useEffectEvent(callback); }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; @@ -603,15 +594,15 @@ exports.memo = function (type, compare) { }; }; exports.startTransition = function (scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, callbacks = new Set(); - ReactCurrentBatchConfig.transition = { _callbacks: callbacks }; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = { _callbacks: callbacks }; + var currentTransition = ReactSharedInternals.T; enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig.transition.name = options.name), - (ReactCurrentBatchConfig.transition.startTime = -1)); + ((ReactSharedInternals.T.name = options.name), + (ReactSharedInternals.T.startTime = -1)); try { var returnValue = scope(); "object" === typeof returnValue && @@ -624,7 +615,7 @@ exports.startTransition = function (scope, options) { } catch (error) { reportGlobalError(error); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } }; exports.unstable_Activity = REACT_OFFSCREEN_TYPE; @@ -634,80 +625,76 @@ exports.unstable_Scope = REACT_SCOPE_TYPE; exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE; exports.unstable_TracingMarker = REACT_TRACING_MARKER_TYPE; exports.unstable_getCacheForType = function (resourceType) { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType(); }; exports.unstable_useCacheRefresh = function () { - return ReactCurrentDispatcher.current.useCacheRefresh(); + return ReactSharedInternals.H.useCacheRefresh(); }; exports.unstable_useMemoCache = function (size) { - return ReactCurrentDispatcher.current.useMemoCache(size); + return ReactSharedInternals.H.useMemoCache(size); }; exports.use = function (usable) { - return ReactCurrentDispatcher.current.use(usable); + return ReactSharedInternals.H.use(usable); }; exports.useActionState = function (action, initialState, permalink) { - return ReactCurrentDispatcher.current.useActionState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useActionState(action, initialState, permalink); }; exports.useCallback = function (callback, deps) { - return ReactCurrentDispatcher.current.useCallback(callback, deps); + return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useContext = function (Context) { - return ReactCurrentDispatcher.current.useContext(Context); + return ReactSharedInternals.H.useContext(Context); }; exports.useDebugValue = function () {}; exports.useDeferredValue = function (value, initialValue) { - return ReactCurrentDispatcher.current.useDeferredValue(value, initialValue); + return ReactSharedInternals.H.useDeferredValue(value, initialValue); }; exports.useEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useEffect(create, deps); + return ReactSharedInternals.H.useEffect(create, deps); }; exports.useId = function () { - return ReactCurrentDispatcher.current.useId(); + return ReactSharedInternals.H.useId(); }; exports.useImperativeHandle = function (ref, create, deps) { - return ReactCurrentDispatcher.current.useImperativeHandle(ref, create, deps); + return ReactSharedInternals.H.useImperativeHandle(ref, create, deps); }; exports.useInsertionEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useInsertionEffect(create, deps); + return ReactSharedInternals.H.useInsertionEffect(create, deps); }; exports.useLayoutEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useLayoutEffect(create, deps); + return ReactSharedInternals.H.useLayoutEffect(create, deps); }; exports.useMemo = function (create, deps) { - return ReactCurrentDispatcher.current.useMemo(create, deps); + return ReactSharedInternals.H.useMemo(create, deps); }; exports.useOptimistic = function (passthrough, reducer) { - return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer); + return ReactSharedInternals.H.useOptimistic(passthrough, reducer); }; exports.useReducer = function (reducer, initialArg, init) { - return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init); + return ReactSharedInternals.H.useReducer(reducer, initialArg, init); }; exports.useRef = function (initialValue) { - return ReactCurrentDispatcher.current.useRef(initialValue); + return ReactSharedInternals.H.useRef(initialValue); }; exports.useState = function (initialState) { - return ReactCurrentDispatcher.current.useState(initialState); + return ReactSharedInternals.H.useState(initialState); }; exports.useSyncExternalStore = function ( subscribe, getSnapshot, getServerSnapshot ) { - return ReactCurrentDispatcher.current.useSyncExternalStore( + return ReactSharedInternals.H.useSyncExternalStore( subscribe, getSnapshot, getServerSnapshot ); }; exports.useTransition = function () { - return ReactCurrentDispatcher.current.useTransition(); + return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-classic-c3069b6b"; +exports.version = "19.0.0-www-classic-8ec1e334"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index ba597845b89c9..ea453bf228542 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -91,17 +91,8 @@ var isArrayImpl = Array.isArray, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, - ReactCurrentDispatcher = { current: null }, - ReactCurrentCache = { current: null }, - ReactCurrentBatchConfig = { transition: null }, - ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher, - ReactCurrentCache: ReactCurrentCache, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: { current: null } - }, - hasOwnProperty = Object.prototype.hasOwnProperty, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; + ReactSharedInternals = { H: null, C: null, T: null, owner: null }, + hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, _ref, self, source, owner, props) { enableRefAsProp && ((_ref = props.ref), (_ref = void 0 !== _ref ? _ref : null)); @@ -122,7 +113,7 @@ function jsxProd(type, config, maybeKey) { void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))); + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))); maybeKey = {}; for (var propName in config) "key" === propName || @@ -130,7 +121,7 @@ function jsxProd(type, config, maybeKey) { (enableRefAsProp && "ref" === propName ? (maybeKey.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (maybeKey[propName] = config[propName])); @@ -146,7 +137,7 @@ function jsxProd(type, config, maybeKey) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, maybeKey ); } @@ -472,7 +463,7 @@ exports.cloneElement = function (element, config, children) { void 0 !== config.ref && (enableRefAsProp || ((ref = config.ref), (ref = coerceStringRef(ref, owner, element.type))), - (owner = ReactCurrentOwner.current)); + (owner = ReactSharedInternals.owner)); void 0 !== config.key && (key = "" + config.key); if ( !disableDefaultPropsExceptForClasses && @@ -539,7 +530,7 @@ exports.createElement = function (type, config, children) { for (propName in (void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))), + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))), void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && @@ -550,7 +541,7 @@ exports.createElement = function (type, config, children) { (enableRefAsProp && "ref" === propName ? (props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (props[propName] = config[propName])); @@ -571,7 +562,7 @@ exports.createElement = function (type, config, children) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); }; @@ -579,7 +570,7 @@ exports.createRef = function () { return { current: null }; }; exports.experimental_useEffectEvent = function (callback) { - return ReactCurrentDispatcher.current.useEffectEvent(callback); + return ReactSharedInternals.H.useEffectEvent(callback); }; exports.forwardRef = function (render) { return { $$typeof: REACT_FORWARD_REF_TYPE, render: render }; @@ -603,15 +594,15 @@ exports.memo = function (type, compare) { }; }; exports.startTransition = function (scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, callbacks = new Set(); - ReactCurrentBatchConfig.transition = { _callbacks: callbacks }; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = { _callbacks: callbacks }; + var currentTransition = ReactSharedInternals.T; enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig.transition.name = options.name), - (ReactCurrentBatchConfig.transition.startTime = -1)); + ((ReactSharedInternals.T.name = options.name), + (ReactSharedInternals.T.startTime = -1)); try { var returnValue = scope(); "object" === typeof returnValue && @@ -624,7 +615,7 @@ exports.startTransition = function (scope, options) { } catch (error) { reportGlobalError(error); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } }; exports.unstable_Activity = REACT_OFFSCREEN_TYPE; @@ -634,80 +625,76 @@ exports.unstable_Scope = REACT_SCOPE_TYPE; exports.unstable_SuspenseList = REACT_SUSPENSE_LIST_TYPE; exports.unstable_TracingMarker = REACT_TRACING_MARKER_TYPE; exports.unstable_getCacheForType = function (resourceType) { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; return dispatcher ? dispatcher.getCacheForType(resourceType) : resourceType(); }; exports.unstable_useCacheRefresh = function () { - return ReactCurrentDispatcher.current.useCacheRefresh(); + return ReactSharedInternals.H.useCacheRefresh(); }; exports.unstable_useMemoCache = function (size) { - return ReactCurrentDispatcher.current.useMemoCache(size); + return ReactSharedInternals.H.useMemoCache(size); }; exports.use = function (usable) { - return ReactCurrentDispatcher.current.use(usable); + return ReactSharedInternals.H.use(usable); }; exports.useActionState = function (action, initialState, permalink) { - return ReactCurrentDispatcher.current.useActionState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useActionState(action, initialState, permalink); }; exports.useCallback = function (callback, deps) { - return ReactCurrentDispatcher.current.useCallback(callback, deps); + return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useContext = function (Context) { - return ReactCurrentDispatcher.current.useContext(Context); + return ReactSharedInternals.H.useContext(Context); }; exports.useDebugValue = function () {}; exports.useDeferredValue = function (value, initialValue) { - return ReactCurrentDispatcher.current.useDeferredValue(value, initialValue); + return ReactSharedInternals.H.useDeferredValue(value, initialValue); }; exports.useEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useEffect(create, deps); + return ReactSharedInternals.H.useEffect(create, deps); }; exports.useId = function () { - return ReactCurrentDispatcher.current.useId(); + return ReactSharedInternals.H.useId(); }; exports.useImperativeHandle = function (ref, create, deps) { - return ReactCurrentDispatcher.current.useImperativeHandle(ref, create, deps); + return ReactSharedInternals.H.useImperativeHandle(ref, create, deps); }; exports.useInsertionEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useInsertionEffect(create, deps); + return ReactSharedInternals.H.useInsertionEffect(create, deps); }; exports.useLayoutEffect = function (create, deps) { - return ReactCurrentDispatcher.current.useLayoutEffect(create, deps); + return ReactSharedInternals.H.useLayoutEffect(create, deps); }; exports.useMemo = function (create, deps) { - return ReactCurrentDispatcher.current.useMemo(create, deps); + return ReactSharedInternals.H.useMemo(create, deps); }; exports.useOptimistic = function (passthrough, reducer) { - return ReactCurrentDispatcher.current.useOptimistic(passthrough, reducer); + return ReactSharedInternals.H.useOptimistic(passthrough, reducer); }; exports.useReducer = function (reducer, initialArg, init) { - return ReactCurrentDispatcher.current.useReducer(reducer, initialArg, init); + return ReactSharedInternals.H.useReducer(reducer, initialArg, init); }; exports.useRef = function (initialValue) { - return ReactCurrentDispatcher.current.useRef(initialValue); + return ReactSharedInternals.H.useRef(initialValue); }; exports.useState = function (initialState) { - return ReactCurrentDispatcher.current.useState(initialState); + return ReactSharedInternals.H.useState(initialState); }; exports.useSyncExternalStore = function ( subscribe, getSnapshot, getServerSnapshot ) { - return ReactCurrentDispatcher.current.useSyncExternalStore( + return ReactSharedInternals.H.useSyncExternalStore( subscribe, getSnapshot, getServerSnapshot ); }; exports.useTransition = function () { - return ReactCurrentDispatcher.current.useTransition(); + return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-www-modern-c3069b6b"; +exports.version = "19.0.0-www-modern-8ec1e334"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 89145b8837618..09997e90135aa 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-classic-52633ec3"; + var ReactVersion = "19.0.0-www-classic-c315fb9e"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -123,9 +123,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -667,7 +665,6 @@ if (__DEV__) { var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -709,7 +706,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$2.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -3604,7 +3601,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -3663,13 +3659,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -3862,7 +3858,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -5083,7 +5079,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -5122,7 +5117,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -5143,9 +5138,9 @@ if (__DEV__) { scheduleTaskForRootDuringMicrotask(root, now$1()); } - if (ReactCurrentActQueue$4.isBatchingLegacy && root.tag === LegacyRoot) { + if (ReactSharedInternals.isBatchingLegacy && root.tag === LegacyRoot) { // Special `act` case: Record whenever a legacy update is scheduled. - ReactCurrentActQueue$4.didScheduleLegacyUpdate = true; + ReactSharedInternals.didScheduleLegacyUpdate = true; } } function flushSyncWorkOnAllRoots() { @@ -5336,7 +5331,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$4.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -5403,11 +5398,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$2(priorityLevel, callback) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$4.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -5422,13 +5417,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$4.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -6220,7 +6215,6 @@ if (__DEV__) { return true; } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -6252,14 +6246,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -6634,8 +6628,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -6689,8 +6681,8 @@ if (__DEV__) { function noop() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$3.current !== null) { - ReactCurrentActQueue$3.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -8811,8 +8803,6 @@ if (__DEV__) { /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -9113,17 +9103,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -9195,7 +9184,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -9368,7 +9357,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -9390,7 +9379,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -9430,7 +9419,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -9603,7 +9592,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -10412,14 +10401,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -10477,7 +10466,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -11119,7 +11108,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -11131,19 +11120,19 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { - ReactCurrentBatchConfig$2.transition.name = options.name; - ReactCurrentBatchConfig$2.transition.startTime = now$1(); + currentTransition.name = options.name; + currentTransition.startTime = now$1(); } } { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -11189,7 +11178,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -11411,11 +11400,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -11446,7 +11435,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -11720,27 +11709,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11751,14 +11738,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11889,27 +11875,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11920,14 +11904,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12050,27 +12033,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12081,14 +12062,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12220,27 +12200,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12251,14 +12229,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12401,28 +12378,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12435,14 +12410,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12589,28 +12563,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12623,14 +12595,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12777,28 +12748,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12811,14 +12780,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -14391,8 +14359,6 @@ if (__DEV__) { console["error"](error); }; - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function logUncaughtError(root, errorInfo) { @@ -14406,10 +14372,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -15184,7 +15150,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -15317,7 +15282,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -15996,7 +15961,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -16219,7 +16184,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$1.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -18043,7 +18011,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -19543,10 +19511,8 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -25526,7 +25492,6 @@ if (__DEV__) { symbolFor("selector.text"); } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isLegacyActEnvironment(fiber) { { // Legacy mode. We preserve the behavior of React 17's act. It assumes an @@ -25549,7 +25514,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -25563,11 +25528,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -25992,7 +25952,7 @@ if (__DEV__) { warnIfUpdatesNotWrappedWithActDEV(fiber); if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig.transition; + var transition = ReactSharedInternals.T; if (transition !== null && transition.name != null) { if (transition.startTime === -1) { @@ -26037,7 +25997,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -26719,7 +26679,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -26871,8 +26834,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -26885,20 +26848,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -27325,7 +27288,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -27410,7 +27373,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -27538,7 +27503,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -27748,12 +27715,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -27763,7 +27730,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -27907,14 +27874,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -27965,7 +27934,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -28155,16 +28124,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -28919,7 +28888,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -28932,7 +28901,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -28966,7 +28935,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -29001,7 +28970,7 @@ if (__DEV__) { if ( root.tag !== LegacyRoot && isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -30715,7 +30684,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -30730,7 +30698,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index 1e6310dc87138..fbd3e7c036e83 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -66,7 +66,7 @@ if (__DEV__) { return self; } - var ReactVersion = "19.0.0-www-modern-58b66322"; + var ReactVersion = "19.0.0-www-modern-582f65a8"; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -123,9 +123,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -667,7 +665,6 @@ if (__DEV__) { var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -706,7 +703,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$2.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -3367,7 +3364,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -3426,13 +3422,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -3625,7 +3621,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -4846,7 +4842,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -4885,7 +4880,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -5087,7 +5082,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$4.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -5154,11 +5149,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$2(priorityLevel, callback) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$4.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -5173,13 +5168,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$4.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -5971,7 +5966,6 @@ if (__DEV__) { return true; } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -6003,14 +5997,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -6385,8 +6379,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -6440,8 +6432,8 @@ if (__DEV__) { function noop() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$3.current !== null) { - ReactCurrentActQueue$3.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -8562,8 +8554,6 @@ if (__DEV__) { /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -8864,17 +8854,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -8946,7 +8935,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -9119,7 +9108,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -9141,7 +9130,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -9181,7 +9170,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -9354,7 +9343,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -10163,14 +10152,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -10228,7 +10217,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -10870,7 +10859,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -10882,19 +10871,19 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { - ReactCurrentBatchConfig$2.transition.name = options.name; - ReactCurrentBatchConfig$2.transition.startTime = now$1(); + currentTransition.name = options.name; + currentTransition.startTime = now$1(); } } { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -10940,7 +10929,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -11162,11 +11151,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -11197,7 +11186,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -11471,27 +11460,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11502,14 +11489,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11640,27 +11626,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11671,14 +11655,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11801,27 +11784,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11832,14 +11813,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11971,27 +11951,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12002,14 +11980,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12152,28 +12129,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12186,14 +12161,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12340,28 +12314,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12374,14 +12346,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -12528,28 +12499,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -12562,14 +12531,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -14101,8 +14069,6 @@ if (__DEV__) { console["error"](error); }; - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function logUncaughtError(root, errorInfo) { @@ -14116,10 +14082,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -14798,7 +14764,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -14931,7 +14896,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -15572,7 +15537,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -15787,7 +15752,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$1.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -17490,7 +17458,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -18943,10 +18911,8 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -24762,7 +24728,6 @@ if (__DEV__) { symbolFor("selector.text"); } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isConcurrentActEnvironment() { { var isReactActEnvironmentGlobal = // $FlowFixMe[cannot-resolve-name] Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global @@ -24772,7 +24737,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -24786,11 +24751,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -25200,7 +25160,7 @@ if (__DEV__) { warnIfUpdatesNotWrappedWithActDEV(fiber); if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig.transition; + var transition = ReactSharedInternals.T; if (transition !== null && transition.name != null) { if (transition.startTime === -1) { @@ -25245,7 +25205,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -25926,7 +25886,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -26078,8 +26041,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -26092,20 +26055,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -26532,7 +26495,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -26617,7 +26580,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -26736,7 +26701,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -26946,12 +26913,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -26961,7 +26928,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -27105,14 +27072,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -27163,7 +27132,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -27350,16 +27319,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -28050,7 +28019,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -28063,7 +28032,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -28075,7 +28044,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -28109,7 +28078,7 @@ if (__DEV__) { { if ( isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -29814,7 +29783,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -29829,7 +29797,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index 69f98c9c9be2c..2239da41c3206 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -2539,9 +2539,7 @@ function findFirstSuspended(row) { } return null; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -2573,7 +2571,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -2591,7 +2589,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -2618,13 +2616,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -2713,7 +2711,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -3006,9 +3004,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$2.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -3041,7 +3039,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -3312,15 +3310,15 @@ function startTransition( var previousPriority = currentUpdatePriority; currentUpdatePriority = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$2.transition.name = options.name), - (ReactCurrentBatchConfig$2.transition.startTime = now())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now())); try { var returnValue = callback(); if ( @@ -3343,7 +3341,7 @@ function startTransition( }); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -4340,8 +4338,7 @@ function pushMarkerInstance(workInProgress, markerInstance) { markerInstanceStack.current.concat(markerInstance) )); } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -4868,7 +4865,7 @@ function finishClassComponent( bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); shouldUpdate = workInProgress.stateNode; - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; var nextChildren = didCaptureError && "function" !== typeof Component.getDerivedStateFromError ? null @@ -6330,9 +6327,8 @@ function releaseCache(cache) { cache.controller.abort(); }); } -var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -8902,10 +8898,6 @@ var DefaultCacheDispatcher = { } }, PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -9031,7 +9023,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig.transition; + var transition = ReactSharedInternals.T; if ( null !== transition && null != transition.name && @@ -9405,8 +9397,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; if (thrownValue === SuspenseException) { thrownValue = getSuspendedThenable(); var handler = suspenseHandlerStackCursor.current; @@ -9444,13 +9436,13 @@ function handleThrow(root, thrownValue) { )); } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -9503,8 +9495,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); workInProgressRoot = null; workInProgressRootRenderLanes = 0; @@ -9607,8 +9599,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return 0; workInProgressRoot = null; @@ -9624,7 +9616,7 @@ function performUnitOfWork(unitOfWork) { var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes); unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; @@ -9680,7 +9672,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -9767,11 +9759,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; try { (currentUpdatePriority = 2), - (ReactCurrentBatchConfig.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -9781,7 +9773,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -9825,13 +9817,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = currentUpdatePriority; currentUpdatePriority = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; commitBeforeMutationEffects(root, finishedWork); commitMutationEffectsOnFiber(finishedWork, root); root.current = finishedWork; @@ -9839,7 +9831,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -9886,17 +9878,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { return ( (currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -10602,10 +10594,10 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "19.0.0-www-classic-05d06035", + version: "19.0.0-www-classic-2cc2d08f", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1323 = { +var internals$jscomp$inline_1322 = { bundleType: devToolsConfig$jscomp$inline_1114.bundleType, version: devToolsConfig$jscomp$inline_1114.version, rendererPackageName: devToolsConfig$jscomp$inline_1114.rendererPackageName, @@ -10619,7 +10611,7 @@ var internals$jscomp$inline_1323 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentFiberUsingSlowPath(fiber); fiber = null !== fiber ? findCurrentHostFiberImpl(fiber) : null; @@ -10633,19 +10625,19 @@ var internals$jscomp$inline_1323 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-05d06035" + reconcilerVersion: "19.0.0-www-classic-2cc2d08f" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1324 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1324.isDisabled && - hook$jscomp$inline_1324.supportsFiber + !hook$jscomp$inline_1323.isDisabled && + hook$jscomp$inline_1323.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1324.inject( - internals$jscomp$inline_1323 + (rendererID = hook$jscomp$inline_1323.inject( + internals$jscomp$inline_1322 )), - (injectedHook = hook$jscomp$inline_1324); + (injectedHook = hook$jscomp$inline_1323); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index eb8c7a77561a5..241ad53c61d0d 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -2337,9 +2337,7 @@ function findFirstSuspended(row) { } return null; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -2371,7 +2369,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -2389,7 +2387,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -2416,13 +2414,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -2511,7 +2509,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -2804,9 +2802,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$2.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -2839,7 +2837,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -3110,15 +3108,15 @@ function startTransition( var previousPriority = currentUpdatePriority; currentUpdatePriority = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$2.transition.name = options.name), - (ReactCurrentBatchConfig$2.transition.startTime = now())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now())); try { var returnValue = callback(); if ( @@ -3141,7 +3139,7 @@ function startTransition( }); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -4036,8 +4034,7 @@ function pushMarkerInstance(workInProgress, markerInstance) { markerInstanceStack.current.concat(markerInstance) )); } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -4567,7 +4564,7 @@ function updateClassComponent( nextProps = 0 !== (workInProgress.flags & 128); context || nextProps ? ((context = workInProgress.stateNode), - (ReactCurrentOwner$1.current = workInProgress), + (ReactSharedInternals.owner = workInProgress), (Component = nextProps && "function" !== typeof Component.getDerivedStateFromError ? null @@ -5918,9 +5915,8 @@ function releaseCache(cache) { cache.controller.abort(); }); } -var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -8437,10 +8433,6 @@ var DefaultCacheDispatcher = { } }, PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -8566,7 +8558,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { if (0 === (executionContext & 2) || root !== workInProgressRoot) { if ( enableTransitionTracing && - ((fiber = ReactCurrentBatchConfig.transition), + ((fiber = ReactSharedInternals.T), null !== fiber && null != fiber.name && (-1 === fiber.startTime && (fiber.startTime = now()), @@ -8933,8 +8925,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; if (thrownValue === SuspenseException) { thrownValue = getSuspendedThenable(); var handler = suspenseHandlerStackCursor.current; @@ -8972,13 +8964,13 @@ function handleThrow(root, thrownValue) { )); } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -9031,8 +9023,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); workInProgressRoot = null; workInProgressRootRenderLanes = 0; @@ -9135,8 +9127,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return 0; workInProgressRoot = null; @@ -9152,7 +9144,7 @@ function performUnitOfWork(unitOfWork) { var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes); unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; @@ -9204,7 +9196,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -9291,11 +9283,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = currentUpdatePriority; try { (currentUpdatePriority = 2), - (ReactCurrentBatchConfig.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -9305,7 +9297,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -9349,13 +9341,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = currentUpdatePriority; currentUpdatePriority = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; commitBeforeMutationEffects(root, finishedWork); commitMutationEffectsOnFiber(finishedWork, root); root.current = finishedWork; @@ -9363,7 +9355,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -9408,17 +9400,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { return ( (currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -10081,10 +10073,10 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "19.0.0-www-modern-33a45327", + version: "19.0.0-www-modern-69dc4b82", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1308 = { +var internals$jscomp$inline_1307 = { bundleType: devToolsConfig$jscomp$inline_1079.bundleType, version: devToolsConfig$jscomp$inline_1079.version, rendererPackageName: devToolsConfig$jscomp$inline_1079.rendererPackageName, @@ -10098,7 +10090,7 @@ var internals$jscomp$inline_1308 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentFiberUsingSlowPath(fiber); fiber = null !== fiber ? findCurrentHostFiberImpl(fiber) : null; @@ -10112,19 +10104,19 @@ var internals$jscomp$inline_1308 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-33a45327" + reconcilerVersion: "19.0.0-www-modern-69dc4b82" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1309 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1308 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1309.isDisabled && - hook$jscomp$inline_1309.supportsFiber + !hook$jscomp$inline_1308.isDisabled && + hook$jscomp$inline_1308.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1309.inject( - internals$jscomp$inline_1308 + (rendererID = hook$jscomp$inline_1308.inject( + internals$jscomp$inline_1307 )), - (injectedHook = hook$jscomp$inline_1309); + (injectedHook = hook$jscomp$inline_1308); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 29e004b58f032..84add01d2c40e 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -81,9 +81,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -632,7 +630,6 @@ if (__DEV__) { var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -696,7 +693,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$3.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -1016,7 +1013,6 @@ if (__DEV__) { return event === currentReplayingEvent; } - var ReactCurrentDispatcher$3 = ReactSharedInternals.ReactCurrentDispatcher; // Since the "not pending" value is always the same, we can reuse the // same object across all transitions. var sharedNotPendingObject = { @@ -1030,7 +1026,7 @@ if (__DEV__) { function resolveDispatcher() { // Copied from react/src/ReactHooks.js. It's the same thing but in a // different package. - var dispatcher = ReactCurrentDispatcher$3.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -3467,7 +3463,6 @@ if (__DEV__) { setValueForAttribute(node, name, value); } - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -3526,13 +3521,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -3725,7 +3720,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -3818,7 +3813,6 @@ if (__DEV__) { } } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -3850,14 +3844,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -9698,7 +9692,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -9737,7 +9730,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -9758,9 +9751,9 @@ if (__DEV__) { scheduleTaskForRootDuringMicrotask(root, now$1()); } - if (ReactCurrentActQueue$4.isBatchingLegacy && root.tag === LegacyRoot) { + if (ReactSharedInternals.isBatchingLegacy && root.tag === LegacyRoot) { // Special `act` case: Record whenever a legacy update is scheduled. - ReactCurrentActQueue$4.didScheduleLegacyUpdate = true; + ReactSharedInternals.didScheduleLegacyUpdate = true; } } function flushSyncWorkOnAllRoots() { @@ -9951,7 +9944,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$4.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -10018,11 +10011,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$2(priorityLevel, callback) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$4.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -10037,13 +10030,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$4.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -11211,8 +11204,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -11266,8 +11257,8 @@ if (__DEV__) { function noop$2() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$3.current !== null) { - ReactCurrentActQueue$3.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -13425,8 +13416,6 @@ if (__DEV__) { /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -13729,17 +13718,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -13811,7 +13799,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -13984,7 +13972,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -14006,7 +13994,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -14054,7 +14042,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -14228,7 +14216,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -15070,14 +15058,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -15135,7 +15123,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -15794,7 +15782,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -15806,19 +15794,19 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { - ReactCurrentBatchConfig$3.transition.name = options.name; - ReactCurrentBatchConfig$3.transition.startTime = now$1(); + currentTransition.name = options.name; + currentTransition.startTime = now$1(); } } { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -15864,7 +15852,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -16160,11 +16148,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -16195,7 +16183,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -16469,27 +16457,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -16500,14 +16486,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -16642,27 +16627,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -16673,14 +16656,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -16807,27 +16789,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -16838,14 +16818,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -16981,27 +16960,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17012,14 +16989,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -17166,28 +17142,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17200,14 +17174,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -17358,28 +17331,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17392,14 +17363,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -17550,28 +17520,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17584,14 +17552,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -19169,8 +19136,6 @@ if (__DEV__) { console["error"](error); }; - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function defaultOnUncaughtError(error, errorInfo) { @@ -19235,10 +19200,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -20091,7 +20056,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -20225,7 +20189,7 @@ if (__DEV__) { } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -20910,7 +20874,7 @@ if (__DEV__) { } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -21143,7 +21107,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$2.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -23181,7 +23148,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -24701,10 +24668,8 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentBatchConfig$2 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$2.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -31202,7 +31167,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isLegacyActEnvironment(fiber) { { // Legacy mode. We preserve the behavior of React 17's act. It assumes an @@ -31227,7 +31191,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -31259,12 +31223,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -31692,7 +31650,7 @@ if (__DEV__) { warnIfUpdatesNotWrappedWithActDEV(fiber); if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if (transition !== null && transition.name != null) { if (transition.startTime === -1) { @@ -31737,7 +31695,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -32357,7 +32315,7 @@ if (__DEV__) { if ( executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. - !ReactCurrentActQueue.isBatchingLegacy + !ReactSharedInternals.isBatchingLegacy ) { resetRenderTimer(); flushSyncWorkOnLegacyRootsOnly(); @@ -32384,12 +32342,12 @@ if (__DEV__) { var prevExecutionContext = executionContext; executionContext |= BatchedContext; - var prevTransition = ReactCurrentBatchConfig$1.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; if (fn) { return fn(); @@ -32398,7 +32356,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. // Note that this will happen even if batchedUpdates is higher up // the stack. @@ -32542,7 +32500,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner$1.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -32694,8 +32655,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -32708,20 +32669,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -33148,7 +33109,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -33233,7 +33194,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -33361,7 +33324,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -33571,12 +33536,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig$1.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -33586,7 +33551,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -33730,14 +33695,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner$1.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -33799,7 +33766,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -34026,16 +33993,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig$1.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -34790,7 +34757,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -34803,7 +34770,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -34837,7 +34804,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -34872,7 +34839,7 @@ if (__DEV__) { if ( root.tag !== LegacyRoot && isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -36178,7 +36145,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-2300aa8f"; + var ReactVersion = "19.0.0-www-classic-62ca9930"; function createPortal$1( children, @@ -36889,7 +36856,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -36904,7 +36870,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -48004,8 +47970,6 @@ if (__DEV__) { } } - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these? - var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra. // We'd like to remove this but it's not clear if this is safe. @@ -48052,8 +48016,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -48061,7 +48025,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -48071,8 +48035,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -48080,7 +48044,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -49337,7 +49301,6 @@ if (__DEV__) { ) ); } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; var topLevelUpdateWarnings; { @@ -49535,7 +49498,7 @@ if (__DEV__) { function findDOMNode(componentOrElement) { { - var owner = ReactCurrentOwner.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.stateNode !== null) { var warnedAboutRefsInRender = diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 6618ef69378d0..f847863480ce4 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -79,9 +79,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -2311,7 +2309,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -2372,7 +2369,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$2.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -2633,7 +2630,6 @@ if (__DEV__) { return isArrayImpl(a); } - var ReactCurrentDispatcher$3 = ReactSharedInternals.ReactCurrentDispatcher; // Since the "not pending" value is always the same, we can reuse the // same object across all transitions. var sharedNotPendingObject = { @@ -2647,7 +2643,7 @@ if (__DEV__) { function resolveDispatcher() { // Copied from react/src/ReactHooks.js. It's the same thing but in a // different package. - var dispatcher = ReactCurrentDispatcher$3.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -3640,7 +3636,6 @@ if (__DEV__) { setValueForAttribute(node, name, value); } - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -3699,13 +3694,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -3898,7 +3893,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -3991,7 +3986,6 @@ if (__DEV__) { } } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -4023,14 +4017,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -18002,8 +17996,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -18057,8 +18049,8 @@ if (__DEV__) { function noop$1() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$4.current !== null) { - ReactCurrentActQueue$4.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -20306,7 +20298,6 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -20345,7 +20336,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$3.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -20547,7 +20538,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$3.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -20614,11 +20605,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$1(priorityLevel, callback) { - if (ReactCurrentActQueue$3.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$3.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -20633,13 +20624,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$3.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$3.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -20810,10 +20801,8 @@ if (__DEV__) { return currentEntangledActionThenable; } - var ReactCurrentBatchConfig$4 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$4.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -20984,8 +20973,6 @@ if (__DEV__) { }; } - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -21288,17 +21275,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -21370,7 +21356,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -21543,7 +21529,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -21565,7 +21551,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -21613,7 +21599,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -21787,7 +21773,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -22629,14 +22615,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -22694,7 +22680,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -23353,7 +23339,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -23365,19 +23351,19 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { - ReactCurrentBatchConfig$3.transition.name = options.name; - ReactCurrentBatchConfig$3.transition.startTime = now$1(); + currentTransition.name = options.name; + currentTransition.startTime = now$1(); } } { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -23423,7 +23409,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -23719,11 +23705,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -23754,7 +23740,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -24028,27 +24014,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24059,14 +24043,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24201,27 +24184,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24232,14 +24213,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24366,27 +24346,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24397,14 +24375,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24540,27 +24517,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24571,14 +24546,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24725,28 +24699,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24759,14 +24731,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24917,28 +24888,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24951,14 +24920,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -25109,28 +25077,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -25143,14 +25109,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -25443,8 +25408,6 @@ if (__DEV__) { return baseProps; } - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function defaultOnUncaughtError(error, errorInfo) { @@ -25509,10 +25472,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -26062,7 +26025,6 @@ if (__DEV__) { return false; } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -26196,7 +26158,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -26843,7 +26805,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -27068,7 +27030,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$1.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -28985,7 +28950,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -39013,7 +38978,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isConcurrentActEnvironment() { { var isReactActEnvironmentGlobal = // $FlowFixMe[cannot-resolve-name] Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global @@ -39023,7 +38987,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -39055,12 +39019,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig$2 = - ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -39470,7 +39428,7 @@ if (__DEV__) { warnIfUpdatesNotWrappedWithActDEV(fiber); if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig$2.transition; + var transition = ReactSharedInternals.T; if (transition !== null && transition.name != null) { if (transition.startTime === -1) { @@ -39515,7 +39473,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -40259,7 +40217,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -40411,8 +40372,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -40425,20 +40386,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -40865,7 +40826,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -40950,7 +40911,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -41069,7 +41032,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -41279,12 +41244,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig$2.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -41294,7 +41259,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -41438,14 +41403,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig$2.transition; - ReactCurrentBatchConfig$2.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -41507,7 +41474,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -41731,16 +41698,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig$2.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -42431,7 +42398,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -42444,7 +42411,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -42456,7 +42423,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -42490,7 +42457,7 @@ if (__DEV__) { { if ( isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -45674,7 +45641,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-8fd9a43e"; + var ReactVersion = "19.0.0-www-modern-69957e35"; function createPortal$1( children, @@ -46288,7 +46255,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -46303,7 +46269,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -46320,9 +46286,6 @@ if (__DEV__) { }); } - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these? - var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra. // We'd like to remove this but it's not clear if this is safe. @@ -46369,8 +46332,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -46378,7 +46341,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -46388,8 +46351,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -46397,7 +46360,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -47607,15 +47570,13 @@ if (__DEV__) { } } - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - function flushSyncImpl(fn) { - var previousTransition = ReactCurrentBatchConfig.transition; + var previousTransition = ReactSharedInternals.T; var previousUpdatePriority = Internals.p; /* ReactDOMCurrentUpdatePriority */ try { - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; Internals.p = /* ReactDOMCurrentUpdatePriority */ DiscreteEventPriority; @@ -47626,7 +47587,7 @@ if (__DEV__) { return undefined; } } finally { - ReactCurrentBatchConfig.transition = previousTransition; + ReactSharedInternals.T = previousTransition; Internals.p = /* ReactDOMCurrentUpdatePriority */ previousUpdatePriority; diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index f6e0c513da6c9..f2ef97c8c5b35 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -347,7 +347,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var currentReplayingEvent = null, - ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, sharedNotPendingObject = { pending: !1, data: null, @@ -3266,9 +3265,7 @@ function findFirstSuspended(row) { } return null; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -3301,7 +3298,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -3319,7 +3316,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -3346,13 +3343,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -3446,7 +3443,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -3750,9 +3747,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$3.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -3785,7 +3782,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -4104,15 +4101,15 @@ function startTransition( var previousPriority = Internals.p; Internals.p = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$3.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$3.transition.name = options.name), - (ReactCurrentBatchConfig$3.transition.startTime = now())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now())); try { var returnValue = callback(); if ( @@ -4134,8 +4131,7 @@ function startTransition( reason: error }); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$3.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function startHostTransition(formFiber, pendingState, callback, formData) { @@ -5265,8 +5261,7 @@ function pushMarkerInstance(workInProgress, markerInstance) { markerInstanceStack.current.concat(markerInstance) )); } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -5799,7 +5794,7 @@ function finishClassComponent( bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); shouldUpdate = workInProgress.stateNode; - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; var nextChildren = didCaptureError && "function" !== typeof Component.getDerivedStateFromError ? null @@ -7498,9 +7493,8 @@ function releaseCache(cache) { cache.controller.abort(); }); } -var ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$2.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -10704,10 +10698,6 @@ function schedulePostPaintCallback(callback) { })); } var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -10833,7 +10823,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if ( null !== transition && null != transition.name && @@ -11239,8 +11229,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = @@ -11284,13 +11274,13 @@ function shouldRemainOnPreviousScreen() { : !1; } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -11343,8 +11333,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); workInProgressRoot = null; workInProgressRootRenderLanes = 0; @@ -11447,8 +11437,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return 0; workInProgressRoot = null; @@ -11464,7 +11454,7 @@ function performUnitOfWork(unitOfWork) { var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes); unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; @@ -11520,7 +11510,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -11607,11 +11597,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig$1.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = Internals.p; try { (Internals.p = 2), - (ReactCurrentBatchConfig$1.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -11621,7 +11611,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (Internals.p = previousUpdateLanePriority); } return null; @@ -11665,13 +11655,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = Internals.p; Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; var shouldFireAfterActiveInstanceBlur$195 = commitBeforeMutationEffects( root, finishedWork @@ -11689,7 +11679,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; Internals.p = spawnedLane; - ReactCurrentBatchConfig$1.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -11753,17 +11743,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig$1.transition, + prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { return ( (Internals.p = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig$1.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root$196, remainingLanes); } } @@ -16641,8 +16631,7 @@ function retryIfBlockedOn(unblocked) { } } } -var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig, - _enabled = !0; +var _enabled = !0; function createEventListenerWrapperWithPriority( targetContainer, domEventName, @@ -16671,15 +16660,14 @@ function dispatchDiscreteEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 2), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchContinuousEvent( @@ -16688,15 +16676,14 @@ function dispatchContinuousEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 8), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchEvent( @@ -17004,10 +16991,10 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1727 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-4bf8f875", + version: "19.0.0-www-classic-6a81abec", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2156 = { +var internals$jscomp$inline_2155 = { bundleType: devToolsConfig$jscomp$inline_1727.bundleType, version: devToolsConfig$jscomp$inline_1727.version, rendererPackageName: devToolsConfig$jscomp$inline_1727.rendererPackageName, @@ -17021,7 +17008,7 @@ var internals$jscomp$inline_2156 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -17034,19 +17021,19 @@ var internals$jscomp$inline_2156 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-4bf8f875" + reconcilerVersion: "19.0.0-www-classic-6a81abec" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2157 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2156 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2157.isDisabled && - hook$jscomp$inline_2157.supportsFiber + !hook$jscomp$inline_2156.isDisabled && + hook$jscomp$inline_2156.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2157.inject( - internals$jscomp$inline_2156 + (rendererID = hook$jscomp$inline_2156.inject( + internals$jscomp$inline_2155 )), - (injectedHook = hook$jscomp$inline_2157); + (injectedHook = hook$jscomp$inline_2156); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17246,16 +17233,16 @@ exports.flushSync = function (fn) { flushPassiveEffects(); var prevExecutionContext = executionContext; executionContext |= 1; - var prevTransition = ReactCurrentBatchConfig$1.transition, + var prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { Internals.p = 2; - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; var JSCompiler_inline_result = fn ? fn() : void 0; break a; } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (executionContext = prevExecutionContext), 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(!1); } @@ -17491,13 +17478,9 @@ exports.unstable_renderSubtreeIntoContainer = function ( }; exports.unstable_runWithPriority = runWithPriority; exports.useFormState = function (action, initialState, permalink) { - return ReactCurrentDispatcher$2.current.useFormState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useFormState(action, initialState, permalink); }; exports.useFormStatus = function () { - return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); + return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-4bf8f875"; +exports.version = "19.0.0-www-classic-6a81abec"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index 91e48ca48b6af..c814a2b6c7b94 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -521,7 +521,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var isArrayImpl = Array.isArray, - ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, sharedNotPendingObject = { pending: !1, data: null, @@ -5829,9 +5828,8 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } -var ReactCurrentBatchConfig$4 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$4.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -5876,9 +5874,7 @@ function getSuspendedCache() { ? null : { parent: CacheContext._currentValue, pool: cacheFromPool }; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -5911,7 +5907,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -5929,7 +5925,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -5956,13 +5952,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -6056,7 +6052,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -6360,9 +6356,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$3.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -6395,7 +6391,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -6714,15 +6710,15 @@ function startTransition( var previousPriority = Internals.p; Internals.p = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$3.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$3.transition.name = options.name), - (ReactCurrentBatchConfig$3.transition.startTime = now())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now())); try { var returnValue = callback(); if ( @@ -6744,8 +6740,7 @@ function startTransition( reason: error }); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$3.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function startHostTransition(formFiber, pendingState, callback, formData) { @@ -7470,8 +7465,7 @@ function throwException( } while (null !== sourceFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -8007,7 +8001,7 @@ function updateClassComponent( nextProps = 0 !== (workInProgress.flags & 128); context || nextProps ? ((context = workInProgress.stateNode), - (ReactCurrentOwner$1.current = workInProgress), + (ReactSharedInternals.owner = workInProgress), (Component = nextProps && "function" !== typeof Component.getDerivedStateFromError ? null @@ -13311,10 +13305,6 @@ function schedulePostPaintCallback(callback) { })); } var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -13440,7 +13430,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { if (0 === (executionContext & 2) || root !== workInProgressRoot) { if ( enableTransitionTracing && - ((fiber = ReactCurrentBatchConfig$2.transition), + ((fiber = ReactSharedInternals.T), null !== fiber && null != fiber.name && (-1 === fiber.startTime && (fiber.startTime = now()), @@ -13827,8 +13817,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = @@ -13872,13 +13862,13 @@ function shouldRemainOnPreviousScreen() { : !1; } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -13931,8 +13921,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); workInProgressRoot = null; workInProgressRootRenderLanes = 0; @@ -14035,8 +14025,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return 0; workInProgressRoot = null; @@ -14052,7 +14042,7 @@ function performUnitOfWork(unitOfWork) { var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes); unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; @@ -14104,7 +14094,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -14191,11 +14181,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = Internals.p; try { (Internals.p = 2), - (ReactCurrentBatchConfig$2.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -14205,7 +14195,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig$2.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (Internals.p = previousUpdateLanePriority); } return null; @@ -14249,13 +14239,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig$2.transition; - ReactCurrentBatchConfig$2.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = Internals.p; Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; var shouldFireAfterActiveInstanceBlur$252 = commitBeforeMutationEffects( root, finishedWork @@ -14273,7 +14263,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; Internals.p = spawnedLane; - ReactCurrentBatchConfig$2.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -14335,17 +14325,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig$2.transition, + prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { return ( (Internals.p = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig$2.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root$253, remainingLanes); } } @@ -15681,8 +15671,7 @@ function attemptContinuousHydration(fiber) { function emptyFindFiberByHostInstance() { return null; } -var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig, - _enabled = !0; +var _enabled = !0; function createEventListenerWrapperWithPriority( targetContainer, domEventName, @@ -15711,15 +15700,14 @@ function dispatchDiscreteEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 2), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchContinuousEvent( @@ -15728,15 +15716,14 @@ function dispatchContinuousEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 8), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchEvent( @@ -16334,7 +16321,6 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { listenerSet.add(listenerSetKey)); } else throw Error(formatProdErrorMessage(369)); } -var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) @@ -16367,10 +16353,10 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1720 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-120e5878", + version: "19.0.0-www-modern-894215c6", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2158 = { +var internals$jscomp$inline_2157 = { bundleType: devToolsConfig$jscomp$inline_1720.bundleType, version: devToolsConfig$jscomp$inline_1720.version, rendererPackageName: devToolsConfig$jscomp$inline_1720.rendererPackageName, @@ -16384,7 +16370,7 @@ var internals$jscomp$inline_2158 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -16397,19 +16383,19 @@ var internals$jscomp$inline_2158 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-120e5878" + reconcilerVersion: "19.0.0-www-modern-894215c6" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2159 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2158 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2159.isDisabled && - hook$jscomp$inline_2159.supportsFiber + !hook$jscomp$inline_2158.isDisabled && + hook$jscomp$inline_2158.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2159.inject( - internals$jscomp$inline_2158 + (rendererID = hook$jscomp$inline_2158.inject( + internals$jscomp$inline_2157 )), - (injectedHook = hook$jscomp$inline_2159); + (injectedHook = hook$jscomp$inline_2158); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -16489,13 +16475,12 @@ exports.createRoot = function (container, options) { return new ReactDOMRoot(options); }; exports.flushSync = function (fn) { - var previousTransition = ReactCurrentBatchConfig.transition, + var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p; try { - if (((ReactCurrentBatchConfig.transition = null), (Internals.p = 2), fn)) - return fn(); + if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); } finally { - (ReactCurrentBatchConfig.transition = previousTransition), + (ReactSharedInternals.T = previousTransition), (Internals.p = previousUpdatePriority), Internals.d.f(); } @@ -16697,13 +16682,9 @@ exports.unstable_createEventHandle = function (type, options) { }; exports.unstable_runWithPriority = runWithPriority; exports.useFormState = function (action, initialState, permalink) { - return ReactCurrentDispatcher$2.current.useFormState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useFormState(action, initialState, permalink); }; exports.useFormStatus = function () { - return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); + return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-120e5878"; +exports.version = "19.0.0-www-modern-894215c6"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index c17544e7b924e..b74d4f4743c50 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -352,7 +352,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var currentReplayingEvent = null, - ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, sharedNotPendingObject = { pending: !1, data: null, @@ -3402,9 +3401,7 @@ function findFirstSuspended(row) { } return null; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -3437,7 +3434,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -3455,7 +3452,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -3482,13 +3479,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -3582,7 +3579,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -3886,9 +3883,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$3.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -3921,7 +3918,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -4240,15 +4237,15 @@ function startTransition( var previousPriority = Internals.p; Internals.p = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$3.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$3.transition.name = options.name), - (ReactCurrentBatchConfig$3.transition.startTime = now$1())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now$1())); try { var returnValue = callback(); if ( @@ -4270,8 +4267,7 @@ function startTransition( reason: error }); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$3.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function startHostTransition(formFiber, pendingState, callback, formData) { @@ -5474,8 +5470,7 @@ function pushMarkerInstance(workInProgress, markerInstance) { markerInstanceStack.current.concat(markerInstance) )); } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -6014,7 +6009,7 @@ function finishClassComponent( bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); shouldUpdate = workInProgress.stateNode; - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; if ( didCaptureError && "function" !== typeof Component.getDerivedStateFromError @@ -7746,9 +7741,8 @@ function releaseCache(cache) { cache.controller.abort(); }); } -var ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$2.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -11294,10 +11288,6 @@ function schedulePostPaintCallback(callback) { })); } var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -11425,7 +11415,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { if (0 === (executionContext & 2) || root !== workInProgressRoot) { isDevToolsPresent && addFiberToLanesMap(root, fiber, lane); if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if ( null !== transition && null != transition.name && @@ -11834,8 +11824,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = @@ -11909,13 +11899,13 @@ function shouldRemainOnPreviousScreen() { : !1; } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -11977,8 +11967,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); enableSchedulingProfiler && markRenderStopped(); workInProgressRoot = null; @@ -12092,8 +12082,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return ( @@ -12125,7 +12115,7 @@ function performUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate, @@ -12184,7 +12174,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -12280,11 +12270,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig$1.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = Internals.p; try { (Internals.p = 2), - (ReactCurrentBatchConfig$1.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -12294,7 +12284,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (Internals.p = previousUpdateLanePriority); } return null; @@ -12344,13 +12334,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = Internals.p; Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; var shouldFireAfterActiveInstanceBlur$215 = commitBeforeMutationEffects( root, finishedWork @@ -12379,7 +12369,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; Internals.p = spawnedLane; - ReactCurrentBatchConfig$1.transition = transitions; + ReactSharedInternals.T = transitions; } else (root.current = finishedWork), (commitTime = now()); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -12446,17 +12436,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig$1.transition, + prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { return ( (Internals.p = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig$1.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root$216, remainingLanes); } } @@ -17389,8 +17379,7 @@ function retryIfBlockedOn(unblocked) { } } } -var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig, - _enabled = !0; +var _enabled = !0; function createEventListenerWrapperWithPriority( targetContainer, domEventName, @@ -17419,15 +17408,14 @@ function dispatchDiscreteEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 2), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchContinuousEvent( @@ -17436,15 +17424,14 @@ function dispatchContinuousEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 8), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchEvent( @@ -17752,7 +17739,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1813 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-7e57af88", + version: "19.0.0-www-classic-1b1d15f9", rendererPackageName: "react-dom" }; (function (internals) { @@ -17783,7 +17770,7 @@ var devToolsConfig$jscomp$inline_1813 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -17796,7 +17783,7 @@ var devToolsConfig$jscomp$inline_1813 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-7e57af88" + reconcilerVersion: "19.0.0-www-classic-1b1d15f9" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17995,16 +17982,16 @@ exports.flushSync = function (fn) { flushPassiveEffects(); var prevExecutionContext = executionContext; executionContext |= 1; - var prevTransition = ReactCurrentBatchConfig$1.transition, + var prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { Internals.p = 2; - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; var JSCompiler_inline_result = fn ? fn() : void 0; break a; } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (executionContext = prevExecutionContext), 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(!1); } @@ -18240,16 +18227,12 @@ exports.unstable_renderSubtreeIntoContainer = function ( }; exports.unstable_runWithPriority = runWithPriority; exports.useFormState = function (action, initialState, permalink) { - return ReactCurrentDispatcher$2.current.useFormState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useFormState(action, initialState, permalink); }; exports.useFormStatus = function () { - return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); + return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-7e57af88"; +exports.version = "19.0.0-www-classic-1b1d15f9"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index 5d2c945a652aa..8aaabce51ac57 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -657,7 +657,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var isArrayImpl = Array.isArray, - ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, sharedNotPendingObject = { pending: !1, data: null, @@ -5965,9 +5964,8 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } -var ReactCurrentBatchConfig$4 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$4.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -6012,9 +6010,7 @@ function getSuspendedCache() { ? null : { parent: CacheContext._currentValue, pool: cacheFromPool }; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -6047,7 +6043,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -6065,7 +6061,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -6092,13 +6088,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -6192,7 +6188,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -6496,9 +6492,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$3.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -6531,7 +6527,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -6850,15 +6846,15 @@ function startTransition( var previousPriority = Internals.p; Internals.p = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$3.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$3.transition.name = options.name), - (ReactCurrentBatchConfig$3.transition.startTime = now$1())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now$1())); try { var returnValue = callback(); if ( @@ -6880,8 +6876,7 @@ function startTransition( reason: error }); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$3.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function startHostTransition(formFiber, pendingState, callback, formData) { @@ -7672,8 +7667,7 @@ function throwException( } while (null !== sourceFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -8215,7 +8209,7 @@ function updateClassComponent( nextProps = 0 !== (workInProgress.flags & 128); context || nextProps ? ((context = workInProgress.stateNode), - (ReactCurrentOwner$1.current = workInProgress), + (ReactSharedInternals.owner = workInProgress), nextProps && "function" !== typeof Component.getDerivedStateFromError ? ((Component = null), (profilerStartTime = -1)) : (enableSchedulingProfiler && @@ -13896,10 +13890,6 @@ function schedulePostPaintCallback(callback) { })); } var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -14027,7 +14017,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { isDevToolsPresent && addFiberToLanesMap(root, fiber, lane); if ( enableTransitionTracing && - ((fiber = ReactCurrentBatchConfig$2.transition), + ((fiber = ReactSharedInternals.T), null !== fiber && null != fiber.name && (-1 === fiber.startTime && (fiber.startTime = now$1()), @@ -14417,8 +14407,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = @@ -14492,13 +14482,13 @@ function shouldRemainOnPreviousScreen() { : !1; } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -14560,8 +14550,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); enableSchedulingProfiler && markRenderStopped(); workInProgressRoot = null; @@ -14675,8 +14665,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return ( @@ -14708,7 +14698,7 @@ function performUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate, @@ -14763,7 +14753,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -14859,11 +14849,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = Internals.p; try { (Internals.p = 2), - (ReactCurrentBatchConfig$2.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -14873,7 +14863,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig$2.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (Internals.p = previousUpdateLanePriority); } return null; @@ -14923,13 +14913,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig$2.transition; - ReactCurrentBatchConfig$2.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = Internals.p; Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; var shouldFireAfterActiveInstanceBlur$272 = commitBeforeMutationEffects( root, finishedWork @@ -14958,7 +14948,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; Internals.p = spawnedLane; - ReactCurrentBatchConfig$2.transition = transitions; + ReactSharedInternals.T = transitions; } else (root.current = finishedWork), (commitTime = now()); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -15023,17 +15013,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig$2.transition, + prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { return ( (Internals.p = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig$2.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root$273, remainingLanes); } } @@ -16412,8 +16402,7 @@ function attemptContinuousHydration(fiber) { function emptyFindFiberByHostInstance() { return null; } -var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig, - _enabled = !0; +var _enabled = !0; function createEventListenerWrapperWithPriority( targetContainer, domEventName, @@ -16442,15 +16431,14 @@ function dispatchDiscreteEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 2), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchContinuousEvent( @@ -16459,15 +16447,14 @@ function dispatchContinuousEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 8), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchEvent( @@ -17065,7 +17052,6 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { listenerSet.add(listenerSetKey)); } else throw Error(formatProdErrorMessage(369)); } -var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) @@ -17098,7 +17084,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1806 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-b500b477", + version: "19.0.0-www-modern-452efeb4", rendererPackageName: "react-dom" }; (function (internals) { @@ -17129,7 +17115,7 @@ var devToolsConfig$jscomp$inline_1806 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -17142,7 +17128,7 @@ var devToolsConfig$jscomp$inline_1806 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-b500b477" + reconcilerVersion: "19.0.0-www-modern-452efeb4" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17221,13 +17207,12 @@ exports.createRoot = function (container, options) { return new ReactDOMRoot(options); }; exports.flushSync = function (fn) { - var previousTransition = ReactCurrentBatchConfig.transition, + var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p; try { - if (((ReactCurrentBatchConfig.transition = null), (Internals.p = 2), fn)) - return fn(); + if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); } finally { - (ReactCurrentBatchConfig.transition = previousTransition), + (ReactSharedInternals.T = previousTransition), (Internals.p = previousUpdatePriority), Internals.d.f(); } @@ -17429,16 +17414,12 @@ exports.unstable_createEventHandle = function (type, options) { }; exports.unstable_runWithPriority = runWithPriority; exports.useFormState = function (action, initialState, permalink) { - return ReactCurrentDispatcher$2.current.useFormState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useFormState(action, initialState, permalink); }; exports.useFormStatus = function () { - return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); + return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-b500b477"; +exports.version = "19.0.0-www-modern-452efeb4"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 81285e12f2f3b..6ee92857d7f2a 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "19.0.0-www-classic-dda4ebf9"; + var ReactVersion = "19.0.0-www-classic-4c664f73"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -66,9 +66,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -10878,7 +10876,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -10932,13 +10929,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$1.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -11131,7 +11128,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$1.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -11190,9 +11187,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; // Linked list representing the identity of a component given the component/tag name and key. // The name might be minified but we assume that it's going to be the same generated name. Typically // because it's just the same compiled output in practice. // resume with segmentID at the index @@ -14001,22 +13995,22 @@ if (__DEV__) { } var prevContext = getActiveContext(); - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; - var prevCacheDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = HooksDispatcher; + var prevCacheDispatcher = null; { - prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; } var prevRequest = currentRequest; currentRequest = request; - var prevGetCurrentStackImpl; + var prevGetCurrentStackImpl = null; { - prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; - ReactDebugCurrentFrame.getCurrentStack = getCurrentStackInDEV; + prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; } var prevResumableState = currentResumableState; @@ -14042,14 +14036,14 @@ if (__DEV__) { fatalError(request, error); } finally { setCurrentResumableState(prevResumableState); - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } { - ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; + ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl; } if (prevDispatcher === HooksDispatcher) { diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 6ba0c58adaaef..dd5063424d2f7 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "19.0.0-www-modern-b5e17d1d"; + var ReactVersion = "19.0.0-www-modern-59ad2540"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -66,9 +66,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -10799,7 +10797,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -10853,13 +10850,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$1.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -11052,7 +11049,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$1.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -11111,9 +11108,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; // Linked list representing the identity of a component given the component/tag name and key. // The name might be minified but we assume that it's going to be the same generated name. Typically // because it's just the same compiled output in practice. // resume with segmentID at the index @@ -13906,22 +13900,22 @@ if (__DEV__) { } var prevContext = getActiveContext(); - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; - var prevCacheDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = HooksDispatcher; + var prevCacheDispatcher = null; { - prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; } var prevRequest = currentRequest; currentRequest = request; - var prevGetCurrentStackImpl; + var prevGetCurrentStackImpl = null; { - prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; - ReactDebugCurrentFrame.getCurrentStack = getCurrentStackInDEV; + prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; } var prevResumableState = currentResumableState; @@ -13947,14 +13941,14 @@ if (__DEV__) { fatalError(request, error); } finally { setCurrentResumableState(prevResumableState); - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } { - ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; + ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl; } if (prevDispatcher === HooksDispatcher) { diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 535af152c44bb..5361a024272b2 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -3448,8 +3448,6 @@ function describeNativeComponentFrame(fn, construct) { ? describeBuiltInComponentFrame(previousPrepareStackTrace) : ""; } -var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; function defaultErrorHandler(error) { console.error(error); return null; @@ -4961,10 +4959,10 @@ function finishedTask(request, boundary, segment) { function performWork(request$jscomp$2) { if (2 !== request$jscomp$2.status) { var prevContext = currentActiveSnapshot, - prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = HooksDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; var prevRequest = currentRequest; currentRequest = request$jscomp$2; var prevResumableState = currentResumableState; @@ -5117,8 +5115,8 @@ function performWork(request$jscomp$2) { fatalError(request$jscomp$2, error); } finally { (currentResumableState = prevResumableState), - (ReactCurrentDispatcher.current = prevDispatcher), - (ReactCurrentCache.current = prevCacheDispatcher), + (ReactSharedInternals.H = prevDispatcher), + (ReactSharedInternals.C = prevCacheDispatcher), prevDispatcher === HooksDispatcher && switchContext(prevContext), (currentRequest = prevRequest); } @@ -5677,4 +5675,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-classic-8d6ed462"; +exports.version = "19.0.0-www-classic-cfa5e2a0"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 19e9ec0005817..b97c7f120643f 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -3440,8 +3440,6 @@ function describeNativeComponentFrame(fn, construct) { ? describeBuiltInComponentFrame(previousPrepareStackTrace) : ""; } -var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; function defaultErrorHandler(error) { console.error(error); return null; @@ -4939,10 +4937,10 @@ function finishedTask(request, boundary, segment) { function performWork(request$jscomp$2) { if (2 !== request$jscomp$2.status) { var prevContext = currentActiveSnapshot, - prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = HooksDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; var prevRequest = currentRequest; currentRequest = request$jscomp$2; var prevResumableState = currentResumableState; @@ -5095,8 +5093,8 @@ function performWork(request$jscomp$2) { fatalError(request$jscomp$2, error); } finally { (currentResumableState = prevResumableState), - (ReactCurrentDispatcher.current = prevDispatcher), - (ReactCurrentCache.current = prevCacheDispatcher), + (ReactSharedInternals.H = prevDispatcher), + (ReactSharedInternals.C = prevCacheDispatcher), prevDispatcher === HooksDispatcher && switchContext(prevContext), (currentRequest = prevRequest); } @@ -5655,4 +5653,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-modern-2f688027"; +exports.version = "19.0.0-www-modern-51ee11c6"; diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js index cf6e0774aaa88..698687d09bd99 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js @@ -64,9 +64,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -10681,7 +10679,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -10735,13 +10732,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$1.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -10934,7 +10931,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$1.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -10993,9 +10990,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; // Linked list representing the identity of a component given the component/tag name and key. // The name might be minified but we assume that it's going to be the same generated name. Typically // because it's just the same compiled output in practice. // resume with segmentID at the index @@ -13785,22 +13779,22 @@ if (__DEV__) { } var prevContext = getActiveContext(); - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; - var prevCacheDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = HooksDispatcher; + var prevCacheDispatcher = null; { - prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; } var prevRequest = currentRequest; currentRequest = request; - var prevGetCurrentStackImpl; + var prevGetCurrentStackImpl = null; { - prevGetCurrentStackImpl = ReactDebugCurrentFrame.getCurrentStack; - ReactDebugCurrentFrame.getCurrentStack = getCurrentStackInDEV; + prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack; + ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; } var prevResumableState = currentResumableState; @@ -13826,14 +13820,14 @@ if (__DEV__) { fatalError(request, error); } finally { setCurrentResumableState(prevResumableState); - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } { - ReactDebugCurrentFrame.getCurrentStack = prevGetCurrentStackImpl; + ReactSharedInternals.getCurrentStack = prevGetCurrentStackImpl; } if (prevDispatcher === HooksDispatcher) { diff --git a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js index 891ca033bac4c..f8537df7e247b 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js @@ -3331,8 +3331,6 @@ function describeNativeComponentFrame(fn, construct) { ? describeBuiltInComponentFrame(previousPrepareStackTrace) : ""; } -var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; function defaultErrorHandler(error) { console.error(error); return null; @@ -5263,10 +5261,10 @@ exports.renderNextChunk = function (stream) { stream = stream.destination; if (2 !== request.status) { var prevContext = currentActiveSnapshot, - prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = HooksDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; var prevRequest = currentRequest; currentRequest = request; var prevResumableState = currentResumableState; @@ -5420,8 +5418,8 @@ exports.renderNextChunk = function (stream) { logRecoverableError(request, error, {}), fatalError(request, error); } finally { (currentResumableState = prevResumableState), - (ReactCurrentDispatcher.current = prevDispatcher), - (ReactCurrentCache.current = prevCacheDispatcher), + (ReactSharedInternals.H = prevDispatcher), + (ReactSharedInternals.C = prevCacheDispatcher), prevDispatcher === HooksDispatcher && switchContext(prevContext), (currentRequest = prevRequest); } diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index cf9575c651a0f..2216ee0e4c420 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -73,9 +73,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -624,7 +622,6 @@ if (__DEV__) { var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -688,7 +685,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$3.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -1008,7 +1005,6 @@ if (__DEV__) { return event === currentReplayingEvent; } - var ReactCurrentDispatcher$3 = ReactSharedInternals.ReactCurrentDispatcher; // Since the "not pending" value is always the same, we can reuse the // same object across all transitions. var sharedNotPendingObject = { @@ -1022,7 +1018,7 @@ if (__DEV__) { function resolveDispatcher() { // Copied from react/src/ReactHooks.js. It's the same thing but in a // different package. - var dispatcher = ReactCurrentDispatcher$3.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -3604,7 +3600,6 @@ if (__DEV__) { setValueForAttribute(node, name, value); } - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -3663,13 +3658,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -3862,7 +3857,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -3955,7 +3950,6 @@ if (__DEV__) { } } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -3987,14 +3981,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -9835,7 +9829,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -9874,7 +9867,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -9895,9 +9888,9 @@ if (__DEV__) { scheduleTaskForRootDuringMicrotask(root, now$1()); } - if (ReactCurrentActQueue$4.isBatchingLegacy && root.tag === LegacyRoot) { + if (ReactSharedInternals.isBatchingLegacy && root.tag === LegacyRoot) { // Special `act` case: Record whenever a legacy update is scheduled. - ReactCurrentActQueue$4.didScheduleLegacyUpdate = true; + ReactSharedInternals.didScheduleLegacyUpdate = true; } } function flushSyncWorkOnAllRoots() { @@ -10088,7 +10081,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$4.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -10155,11 +10148,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$2(priorityLevel, callback) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$4.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -10174,13 +10167,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$4.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -11348,8 +11341,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -11403,8 +11394,8 @@ if (__DEV__) { function noop$3() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$3.current !== null) { - ReactCurrentActQueue$3.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -13562,8 +13553,6 @@ if (__DEV__) { /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -13866,17 +13855,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -13948,7 +13936,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -14121,7 +14109,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -14143,7 +14131,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -14191,7 +14179,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -14365,7 +14353,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -15207,14 +15195,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -15272,7 +15260,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -15931,7 +15919,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -15943,19 +15931,19 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { - ReactCurrentBatchConfig$3.transition.name = options.name; - ReactCurrentBatchConfig$3.transition.startTime = now$1(); + currentTransition.name = options.name; + currentTransition.startTime = now$1(); } } { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -16001,7 +15989,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -16297,11 +16285,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -16332,7 +16320,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -16606,27 +16594,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -16637,14 +16623,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -16779,27 +16764,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -16810,14 +16793,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -16944,27 +16926,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -16975,14 +16955,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -17118,27 +17097,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17149,14 +17126,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -17303,28 +17279,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17337,14 +17311,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -17495,28 +17468,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17529,14 +17500,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -17687,28 +17657,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -17721,14 +17689,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -19306,8 +19273,6 @@ if (__DEV__) { console["error"](error); }; - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function defaultOnUncaughtError(error, errorInfo) { @@ -19372,10 +19337,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -20228,7 +20193,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -20362,7 +20326,7 @@ if (__DEV__) { } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -21047,7 +21011,7 @@ if (__DEV__) { } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -21280,7 +21244,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$2.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -23318,7 +23285,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -24838,10 +24805,8 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentBatchConfig$2 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$2.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -31826,7 +31791,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isLegacyActEnvironment(fiber) { { // Legacy mode. We preserve the behavior of React 17's act. It assumes an @@ -31851,7 +31815,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -31883,12 +31847,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -32316,7 +32274,7 @@ if (__DEV__) { warnIfUpdatesNotWrappedWithActDEV(fiber); if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if (transition !== null && transition.name != null) { if (transition.startTime === -1) { @@ -32361,7 +32319,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -32981,7 +32939,7 @@ if (__DEV__) { if ( executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. - !ReactCurrentActQueue.isBatchingLegacy + !ReactSharedInternals.isBatchingLegacy ) { resetRenderTimer(); flushSyncWorkOnLegacyRootsOnly(); @@ -33008,12 +32966,12 @@ if (__DEV__) { var prevExecutionContext = executionContext; executionContext |= BatchedContext; - var prevTransition = ReactCurrentBatchConfig$1.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; if (fn) { return fn(); @@ -33022,7 +32980,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. // Note that this will happen even if batchedUpdates is higher up // the stack. @@ -33166,7 +33124,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner$1.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -33318,8 +33279,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -33332,20 +33293,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -33772,7 +33733,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -33857,7 +33818,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -33985,7 +33948,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -34195,12 +34160,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig$1.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -34210,7 +34175,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -34354,14 +34319,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner$1.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -34423,7 +34390,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -34650,16 +34617,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig$1.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -35414,7 +35381,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -35427,7 +35394,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -35461,7 +35428,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -35496,7 +35463,7 @@ if (__DEV__) { if ( root.tag !== LegacyRoot && isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -36802,7 +36769,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-ccb65869"; + var ReactVersion = "19.0.0-www-classic-5996c382"; function createPortal$1( children, @@ -37513,7 +37480,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -37528,7 +37494,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -48760,8 +48726,6 @@ if (__DEV__) { } } - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these? - var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra. // We'd like to remove this but it's not clear if this is safe. @@ -48808,8 +48772,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -48817,7 +48781,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -48827,8 +48791,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -48836,7 +48800,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -50067,7 +50031,6 @@ if (__DEV__) { defaultOnCaughtError(error, errorInfo); } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; var topLevelUpdateWarnings; { @@ -50265,7 +50228,7 @@ if (__DEV__) { function findDOMNode$1(componentOrElement) { { - var owner = ReactCurrentOwner.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.stateNode !== null) { var warnedAboutRefsInRender = diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index ab90cc5975f89..6b2c2c818a548 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -71,9 +71,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -2303,7 +2301,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -2364,7 +2361,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$2.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -2625,7 +2622,6 @@ if (__DEV__) { return isArrayImpl(a); } - var ReactCurrentDispatcher$3 = ReactSharedInternals.ReactCurrentDispatcher; // Since the "not pending" value is always the same, we can reuse the // same object across all transitions. var sharedNotPendingObject = { @@ -2639,7 +2635,7 @@ if (__DEV__) { function resolveDispatcher() { // Copied from react/src/ReactHooks.js. It's the same thing but in a // different package. - var dispatcher = ReactCurrentDispatcher$3.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -3777,7 +3773,6 @@ if (__DEV__) { setValueForAttribute(node, name, value); } - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -3836,13 +3831,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -4035,7 +4030,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -4128,7 +4123,6 @@ if (__DEV__) { } } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -4160,14 +4154,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -18139,8 +18133,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -18194,8 +18186,8 @@ if (__DEV__) { function noop$2() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$4.current !== null) { - ReactCurrentActQueue$4.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -20443,7 +20435,6 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -20482,7 +20473,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$3.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -20684,7 +20675,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$3.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -20751,11 +20742,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$1(priorityLevel, callback) { - if (ReactCurrentActQueue$3.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$3.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -20770,13 +20761,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$3.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$3.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -20947,10 +20938,8 @@ if (__DEV__) { return currentEntangledActionThenable; } - var ReactCurrentBatchConfig$4 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$4.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -21121,8 +21110,6 @@ if (__DEV__) { }; } - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -21425,17 +21412,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -21507,7 +21493,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -21680,7 +21666,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -21702,7 +21688,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -21750,7 +21736,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -21924,7 +21910,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -22766,14 +22752,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -22831,7 +22817,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -23490,7 +23476,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$3.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -23502,19 +23488,19 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { - ReactCurrentBatchConfig$3.transition.name = options.name; - ReactCurrentBatchConfig$3.transition.startTime = now$1(); + currentTransition.name = options.name; + currentTransition.startTime = now$1(); } } { - ReactCurrentBatchConfig$3.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -23560,7 +23546,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -23856,11 +23842,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -23891,7 +23877,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -24165,27 +24151,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24196,14 +24180,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24338,27 +24321,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24369,14 +24350,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24503,27 +24483,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24534,14 +24512,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24677,27 +24654,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24708,14 +24683,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -24862,28 +24836,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -24896,14 +24868,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -25054,28 +25025,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -25088,14 +25057,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -25246,28 +25214,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -25280,14 +25246,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -25580,8 +25545,6 @@ if (__DEV__) { return baseProps; } - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function defaultOnUncaughtError(error, errorInfo) { @@ -25646,10 +25609,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -26199,7 +26162,6 @@ if (__DEV__) { return false; } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -26333,7 +26295,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -26980,7 +26942,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -27205,7 +27167,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$1.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -29122,7 +29087,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -39637,7 +39602,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isConcurrentActEnvironment() { { var isReactActEnvironmentGlobal = // $FlowFixMe[cannot-resolve-name] Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global @@ -39647,7 +39611,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -39679,12 +39643,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig$2 = - ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -40094,7 +40052,7 @@ if (__DEV__) { warnIfUpdatesNotWrappedWithActDEV(fiber); if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig$2.transition; + var transition = ReactSharedInternals.T; if (transition !== null && transition.name != null) { if (transition.startTime === -1) { @@ -40139,7 +40097,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -40883,7 +40841,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -41035,8 +40996,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -41049,20 +41010,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -41489,7 +41450,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -41574,7 +41535,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -41693,7 +41656,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -41903,12 +41868,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig$2.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -41918,7 +41883,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -42062,14 +42027,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig$2.transition; - ReactCurrentBatchConfig$2.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -42131,7 +42098,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -42355,16 +42322,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig$2.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -43055,7 +43022,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -43068,7 +43035,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -43080,7 +43047,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -43114,7 +43081,7 @@ if (__DEV__) { { if ( isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -46430,7 +46397,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-b1d8ef8c"; + var ReactVersion = "19.0.0-www-modern-5fefe6d6"; function createPortal$1( children, @@ -47044,7 +47011,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -47059,7 +47025,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -47076,9 +47042,6 @@ if (__DEV__) { }); } - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; // TODO: can we stop exporting these? - var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra. // We'd like to remove this but it's not clear if this is safe. @@ -47125,8 +47088,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -47134,7 +47097,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -47144,8 +47107,8 @@ if (__DEV__) { container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); try { @@ -47153,7 +47116,7 @@ if (__DEV__) { dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$1.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } @@ -48363,15 +48326,13 @@ if (__DEV__) { } } - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - function flushSyncImpl(fn) { - var previousTransition = ReactCurrentBatchConfig.transition; + var previousTransition = ReactSharedInternals.T; var previousUpdatePriority = Internals$1.p; /* ReactDOMCurrentUpdatePriority */ try { - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; Internals$1.p = /* ReactDOMCurrentUpdatePriority */ DiscreteEventPriority; @@ -48382,7 +48343,7 @@ if (__DEV__) { return undefined; } } finally { - ReactCurrentBatchConfig.transition = previousTransition; + ReactSharedInternals.T = previousTransition; Internals$1.p = /* ReactDOMCurrentUpdatePriority */ previousUpdatePriority; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index 77d35b302a0d2..3675fbfb77ffb 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -347,7 +347,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var currentReplayingEvent = null, - ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, sharedNotPendingObject = { pending: !1, data: null, @@ -3352,9 +3351,7 @@ function findFirstSuspended(row) { } return null; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -3387,7 +3384,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -3405,7 +3402,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -3432,13 +3429,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -3532,7 +3529,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -3836,9 +3833,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$3.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -3871,7 +3868,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -4190,15 +4187,15 @@ function startTransition( var previousPriority = Internals.p; Internals.p = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$3.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$3.transition.name = options.name), - (ReactCurrentBatchConfig$3.transition.startTime = now())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now())); try { var returnValue = callback(); if ( @@ -4220,8 +4217,7 @@ function startTransition( reason: error }); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$3.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function startHostTransition(formFiber, pendingState, callback, formData) { @@ -5351,8 +5347,7 @@ function pushMarkerInstance(workInProgress, markerInstance) { markerInstanceStack.current.concat(markerInstance) )); } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -5885,7 +5880,7 @@ function finishClassComponent( bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); shouldUpdate = workInProgress.stateNode; - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; var nextChildren = didCaptureError && "function" !== typeof Component.getDerivedStateFromError ? null @@ -7584,9 +7579,8 @@ function releaseCache(cache) { cache.controller.abort(); }); } -var ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$2.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -10976,10 +10970,6 @@ function schedulePostPaintCallback(callback) { })); } var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -11105,7 +11095,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) { if (enableTransitionTracing) { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if ( null !== transition && null != transition.name && @@ -11511,8 +11501,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = @@ -11556,13 +11546,13 @@ function shouldRemainOnPreviousScreen() { : !1; } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -11615,8 +11605,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); workInProgressRoot = null; workInProgressRootRenderLanes = 0; @@ -11719,8 +11709,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return 0; workInProgressRoot = null; @@ -11736,7 +11726,7 @@ function performUnitOfWork(unitOfWork) { var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes); unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; @@ -11792,7 +11782,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -11879,11 +11869,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig$1.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = Internals.p; try { (Internals.p = 2), - (ReactCurrentBatchConfig$1.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -11893,7 +11883,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (Internals.p = previousUpdateLanePriority); } return null; @@ -11937,13 +11927,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = Internals.p; Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; var shouldFireAfterActiveInstanceBlur$196 = commitBeforeMutationEffects( root, finishedWork @@ -11961,7 +11951,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; Internals.p = spawnedLane; - ReactCurrentBatchConfig$1.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -12025,17 +12015,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig$1.transition, + prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { return ( (Internals.p = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig$1.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root$197, remainingLanes); } } @@ -12805,7 +12795,7 @@ function injectIntoDevTools(devToolsConfig) { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: devToolsConfig.findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -12814,7 +12804,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-b965c923" + reconcilerVersion: "19.0.0-www-classic-9e4a61b5" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -17014,8 +17004,7 @@ function retryIfBlockedOn(unblocked) { } } } -var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig, - _enabled = !0; +var _enabled = !0; function createEventListenerWrapperWithPriority( targetContainer, domEventName, @@ -17044,15 +17033,14 @@ function dispatchDiscreteEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 2), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchContinuousEvent( @@ -17061,15 +17049,14 @@ function dispatchContinuousEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 8), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchEvent( @@ -17377,7 +17364,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-b965c923", + version: "19.0.0-www-classic-9e4a61b5", rendererPackageName: "react-dom" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17510,7 +17497,7 @@ assign(Internals, { injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-b965c923", + version: "19.0.0-www-classic-9e4a61b5", rendererPackageName: "react-dom" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -17660,16 +17647,16 @@ exports.flushSync = function (fn) { flushPassiveEffects(); var prevExecutionContext = executionContext; executionContext |= 1; - var prevTransition = ReactCurrentBatchConfig$1.transition, + var prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { Internals.p = 2; - ReactCurrentBatchConfig$1.transition = null; + ReactSharedInternals.T = null; var JSCompiler_inline_result = fn ? fn() : void 0; break a; } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (executionContext = prevExecutionContext), 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(!1); } @@ -17971,13 +17958,9 @@ exports.unstable_renderSubtreeIntoContainer = function ( }; exports.unstable_runWithPriority = runWithPriority; exports.useFormState = function (action, initialState, permalink) { - return ReactCurrentDispatcher$2.current.useFormState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useFormState(action, initialState, permalink); }; exports.useFormStatus = function () { - return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); + return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-b965c923"; +exports.version = "19.0.0-www-classic-9e4a61b5"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index eaeef0df45a01..1cd3a827d9431 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -580,7 +580,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var isArrayImpl = Array.isArray, - ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, sharedNotPendingObject = { pending: !1, data: null, @@ -5974,9 +5973,8 @@ function chainThenableValue(thenable, result) { ); return thenableWithOverride; } -var ReactCurrentBatchConfig$4 = ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$4.transition; + var transition = ReactSharedInternals.T; null !== transition && transition._callbacks.add(handleAsyncAction); return transition; } @@ -6021,9 +6019,7 @@ function getSuspendedCache() { ? null : { parent: CacheContext._currentValue, pool: cacheFromPool }; } -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, - renderLanes = 0, +var renderLanes = 0, currentlyRenderingFiber$1 = null, currentHook = null, workInProgressHook = null, @@ -6056,7 +6052,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -6074,7 +6070,7 @@ function renderWithHooks( return nextRenderLanes; } function finishRenderingHooks(current) { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -6101,13 +6097,13 @@ function renderWithHooksAgain(workInProgress, Component, props, secondArg) { numberOfReRenders += 1; workInProgressHook = currentHook = null; workInProgress.updateQueue = null; - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerender; + ReactSharedInternals.H = HooksDispatcherOnRerender; var children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); return children; } function TransitionAwareHostComponent() { - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -6201,7 +6197,7 @@ function useThenable(thenable) { (null === workInProgressHook ? null === currentlyRenderingFiber$1.memoizedState : null === workInProgressHook.next) && - (ReactCurrentDispatcher$1.current = HooksDispatcherOnMount); + (ReactSharedInternals.H = HooksDispatcherOnMount); return thenable; } function use(usable) { @@ -6505,9 +6501,9 @@ function dispatchActionState( function runActionStateAction(actionQueue, setPendingState, setState, payload) { var action = actionQueue.action, prevState = actionQueue.state, - prevTransition = ReactCurrentBatchConfig$3.transition, + prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; setPendingState(!0); try { var returnValue = action(prevState, payload); @@ -6540,7 +6536,7 @@ function runActionStateAction(actionQueue, setPendingState, setState, payload) { setState({ then: function () {}, status: "rejected", reason: error }), finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$3.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } function finishRunningActionStateAction( @@ -6859,15 +6855,15 @@ function startTransition( var previousPriority = Internals.p; Internals.p = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$3.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$3.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, !1, queue, pendingState); enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig$3.transition.name = options.name), - (ReactCurrentBatchConfig$3.transition.startTime = now())); + ((currentTransition.name = options.name), + (currentTransition.startTime = now())); try { var returnValue = callback(); if ( @@ -6889,8 +6885,7 @@ function startTransition( reason: error }); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$3.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function startHostTransition(formFiber, pendingState, callback, formData) { @@ -7615,8 +7610,7 @@ function throwException( } while (null !== sourceFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error(formatProdErrorMessage(461)), +var SelectiveHydrationException = Error(formatProdErrorMessage(461)), didReceiveUpdate = !1; function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { workInProgress.child = @@ -8152,7 +8146,7 @@ function updateClassComponent( nextProps = 0 !== (workInProgress.flags & 128); context || nextProps ? ((context = workInProgress.stateNode), - (ReactCurrentOwner$1.current = workInProgress), + (ReactSharedInternals.owner = workInProgress), (Component = nextProps && "function" !== typeof Component.getDerivedStateFromError ? null @@ -13642,10 +13636,6 @@ function schedulePostPaintCallback(callback) { })); } var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentCache = ReactSharedInternals.ReactCurrentCache, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig, executionContext = 0, workInProgressRoot = null, workInProgress = null, @@ -13771,7 +13761,7 @@ function scheduleUpdateOnFiber(root, fiber, lane) { if (0 === (executionContext & 2) || root !== workInProgressRoot) { if ( enableTransitionTracing && - ((fiber = ReactCurrentBatchConfig$2.transition), + ((fiber = ReactSharedInternals.T), null !== fiber && null != fiber.name && (-1 === fiber.startTime && (fiber.startTime = now()), @@ -14158,8 +14148,8 @@ function prepareFreshStack(root, lanes) { } function handleThrow(root, thrownValue) { currentlyRenderingFiber$1 = null; - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - ReactCurrentOwner.current = null; + ReactSharedInternals.H = ContextOnlyDispatcher; + ReactSharedInternals.owner = null; thrownValue === SuspenseException ? ((thrownValue = getSuspendedThenable()), (workInProgressSuspendedReason = @@ -14203,13 +14193,13 @@ function shouldRemainOnPreviousScreen() { : !1; } function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher; } function pushCacheDispatcher() { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } function renderDidSuspendDelayIfPossible() { @@ -14262,8 +14252,8 @@ function renderRootSync(root, lanes) { lanes && root.shellSuspendCounter++; resetContextDependencies(); executionContext = prevExecutionContext; - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; if (null !== workInProgress) throw Error(formatProdErrorMessage(261)); workInProgressRoot = null; workInProgressRootRenderLanes = 0; @@ -14366,8 +14356,8 @@ function renderRootConcurrent(root, lanes) { } while (1); resetContextDependencies(); - ReactCurrentDispatcher.current = prevDispatcher; - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.H = prevDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; executionContext = prevExecutionContext; if (null !== workInProgress) return 0; workInProgressRoot = null; @@ -14383,7 +14373,7 @@ function performUnitOfWork(unitOfWork) { var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes); unitOfWork.memoizedProps = unitOfWork.pendingProps; null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate; @@ -14435,7 +14425,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -14522,11 +14512,11 @@ function commitRoot( didIncludeRenderPhaseUpdate, spawnedLane ) { - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, previousUpdateLanePriority = Internals.p; try { (Internals.p = 2), - (ReactCurrentBatchConfig$2.transition = null), + (ReactSharedInternals.T = null), commitRootImpl( root, recoverableErrors, @@ -14536,7 +14526,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig$2.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (Internals.p = previousUpdateLanePriority); } return null; @@ -14580,13 +14570,13 @@ function commitRootImpl( })); transitions = 0 !== (finishedWork.flags & 15990); if (0 !== (finishedWork.subtreeFlags & 15990) || transitions) { - transitions = ReactCurrentBatchConfig$2.transition; - ReactCurrentBatchConfig$2.transition = null; + transitions = ReactSharedInternals.T; + ReactSharedInternals.T = null; spawnedLane = Internals.p; Internals.p = 2; var prevExecutionContext = executionContext; executionContext |= 4; - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; var shouldFireAfterActiveInstanceBlur$253 = commitBeforeMutationEffects( root, finishedWork @@ -14604,7 +14594,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; Internals.p = spawnedLane; - ReactCurrentBatchConfig$2.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -14666,17 +14656,17 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig$2.transition, + prevTransition = ReactSharedInternals.T, previousPriority = Internals.p; try { return ( (Internals.p = 32 > renderPriority ? 32 : renderPriority), - (ReactCurrentBatchConfig$2.transition = null), + (ReactSharedInternals.T = null), flushPassiveEffectsImpl() ); } finally { (Internals.p = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root$254, remainingLanes); } } @@ -16088,7 +16078,7 @@ function injectIntoDevTools(devToolsConfig) { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: devToolsConfig.findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -16097,7 +16087,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-ad1a3067" + reconcilerVersion: "19.0.0-www-modern-111db2f1" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -16113,8 +16103,7 @@ function injectIntoDevTools(devToolsConfig) { } return devToolsConfig; } -var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig, - _enabled = !0; +var _enabled = !0; function createEventListenerWrapperWithPriority( targetContainer, domEventName, @@ -16143,15 +16132,14 @@ function dispatchDiscreteEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 2), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchContinuousEvent( @@ -16160,15 +16148,14 @@ function dispatchContinuousEvent( container, nativeEvent ) { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = Internals.p; try { (Internals.p = 8), dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent); } finally { - (Internals.p = previousPriority), - (ReactCurrentBatchConfig$1.transition = prevTransition); + (Internals.p = previousPriority), (ReactSharedInternals.T = prevTransition); } } function dispatchEvent( @@ -16766,7 +16753,6 @@ function registerReactDOMEvent(target, domEventName, isCapturePhaseListener) { listenerSet.add(listenerSetKey)); } else throw Error(formatProdErrorMessage(369)); } -var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; function getCrossOriginStringAs(as, input) { if ("font" === as) return ""; if ("string" === typeof input) @@ -16799,7 +16785,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-ad1a3067", + version: "19.0.0-www-modern-111db2f1", rendererPackageName: "react-dom" }); if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) @@ -16807,7 +16793,7 @@ if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-ad1a3067", + version: "19.0.0-www-modern-111db2f1", rendererPackageName: "react-dom" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; @@ -16943,13 +16929,12 @@ exports.findBoundingRects = function (hostRoot, selectors) { return hostRoot; }; exports.flushSync = function (fn) { - var previousTransition = ReactCurrentBatchConfig.transition, + var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p; try { - if (((ReactCurrentBatchConfig.transition = null), (Internals.p = 2), fn)) - return fn(); + if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn(); } finally { - (ReactCurrentBatchConfig.transition = previousTransition), + (ReactSharedInternals.T = previousTransition), (Internals.p = previousUpdatePriority), Internals.d.f(); } @@ -17216,13 +17201,9 @@ exports.unstable_createEventHandle = function (type, options) { return eventHandle; }; exports.useFormState = function (action, initialState, permalink) { - return ReactCurrentDispatcher$2.current.useFormState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useFormState(action, initialState, permalink); }; exports.useFormStatus = function () { - return ReactCurrentDispatcher$2.current.useHostTransitionStatus(); + return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-ad1a3067"; +exports.version = "19.0.0-www-modern-111db2f1"; diff --git a/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js b/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js index f272fc65f5c0b..6623ec5f6a0d6 100644 --- a/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js @@ -89,9 +89,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -1148,19 +1146,10 @@ if (__DEV__) { return "\n " + str; } - var ReactSharedInternals = + var ReactSharedInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - var ReactSharedServerInternals = // $FlowFixMe: It's defined in the one we resolve to. - React.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - - if (!ReactSharedServerInternals) { - throw new Error( - 'The "react" package in this environment is not configured correctly. ' + - 'The "react-server" condition must be enabled in any environment that ' + - "runs React Server Components." - ); - } + var ReactSharedInternals = ReactSharedInternals$1; function patchConsole(consoleInst, methodName) { var descriptor = Object.getOwnPropertyDescriptor(consoleInst, methodName); @@ -1204,7 +1193,7 @@ if (__DEV__) { // refer to previous logs in debug info to associate them with a component. var id = request.nextChunkId++; - var owner = ReactCurrentOwner.current; + var owner = ReactSharedInternals.owner; emitConsoleChunk(request, id, methodName, owner, stack, arguments); } // $FlowFixMe[prop-missing] @@ -1253,9 +1242,6 @@ if (__DEV__) { var SEEN_BUT_NOT_YET_OUTLINED = -1; var NEVER_OUTLINED = -2; - var ReactCurrentCache = ReactSharedServerInternals.ReactCurrentCache; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; function defaultErrorHandler(error) { console["error"](error); // Don't transform to our wrapper @@ -1277,15 +1263,15 @@ if (__DEV__) { environmentName ) { if ( - ReactCurrentCache.current !== null && - ReactCurrentCache.current !== DefaultCacheDispatcher + ReactSharedInternals.C !== null && + ReactSharedInternals.C !== DefaultCacheDispatcher ) { throw new Error( "Currently React only supports one RSC renderer at a time." ); } - ReactCurrentCache.current = DefaultCacheDispatcher; + ReactSharedInternals.C = DefaultCacheDispatcher; var abortSet = new Set(); var pingedTasks = []; var cleanupQueue = []; @@ -1550,12 +1536,12 @@ if (__DEV__) { var result; { - ReactCurrentOwner.current = componentDebugInfo; + ReactSharedInternals.owner = componentDebugInfo; try { result = Component(props, secondArg); } finally { - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } } @@ -3036,8 +3022,8 @@ if (__DEV__) { } function performWork(request) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = HooksDispatcher; var prevRequest = currentRequest; currentRequest = request; prepareToUseHooksForRequest(request); @@ -3058,7 +3044,7 @@ if (__DEV__) { logRecoverableError(request, error); fatalError(request, error); } finally { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; resetHooksForRequest(); currentRequest = prevRequest; } diff --git a/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js b/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js index ba01e7ce68a11..235a09e26fe6f 100644 --- a/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js @@ -430,18 +430,10 @@ function describeObjectForErrorMessage(objectOrArray, expandedName) { "\n " + str + "\n " + objectOrArray) : "\n " + str; } -var ReactSharedInternals = +var ReactSharedInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, - ReactSharedServerInternals = - React.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; -if (!ReactSharedServerInternals) - throw Error( - 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' - ); -var ObjectPrototype = Object.prototype, - stringify = JSON.stringify, - ReactCurrentCache = ReactSharedServerInternals.ReactCurrentCache, - ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; + ObjectPrototype = Object.prototype, + stringify = JSON.stringify; function defaultErrorHandler(error) { console.error(error); } @@ -1026,8 +1018,8 @@ function retryTask(request, task) { } } function performWork(request) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = HooksDispatcher; + var prevDispatcher = ReactSharedInternals$1.H; + ReactSharedInternals$1.H = HooksDispatcher; var prevRequest = currentRequest; currentRequest$1 = currentRequest = request; try { @@ -1040,7 +1032,7 @@ function performWork(request) { } catch (error) { logRecoverableError(request, error), fatalError(request, error); } finally { - (ReactCurrentDispatcher.current = prevDispatcher), + (ReactSharedInternals$1.H = prevDispatcher), (currentRequest$1 = null), (currentRequest = prevRequest); } @@ -1093,11 +1085,11 @@ exports.renderToDestination = function (destination, model, options) { ); var onError = options ? options.onError : void 0; if ( - null !== ReactCurrentCache.current && - ReactCurrentCache.current !== DefaultCacheDispatcher + null !== ReactSharedInternals$1.C && + ReactSharedInternals$1.C !== DefaultCacheDispatcher ) throw Error("Currently React only supports one RSC renderer at a time."); - ReactCurrentCache.current = DefaultCacheDispatcher; + ReactSharedInternals$1.C = DefaultCacheDispatcher; var abortSet = new Set(); options = []; var hints = new Set(); diff --git a/compiled/facebook-www/ReactServer-dev.modern.js b/compiled/facebook-www/ReactServer-dev.modern.js index cfe9a58eaaa21..0b4dacb6264ca 100644 --- a/compiled/facebook-www/ReactServer-dev.modern.js +++ b/compiled/facebook-www/ReactServer-dev.modern.js @@ -61,9 +61,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -92,54 +90,32 @@ if (__DEV__) { var disableStringRefs = false; - /** - * Keeps track of the current Cache dispatcher. - */ - var ReactCurrentCache = { - current: null - }; - - /** - * Keeps track of the current dispatcher. - */ - var ReactCurrentDispatcher$1 = { - current: null - }; - - /** - * Keeps track of the current owner. - * - * The current owner is the component who should own any components that are - * currently being constructed. - */ - var ReactCurrentOwner$1 = { - /** - * @internal - * @type {ReactComponent} - */ - current: null + var ReactSharedInternals = { + H: null, + C: null }; - var ReactDebugCurrentFrame$1 = {}; - var currentExtraStackFrame = null; + { + ReactSharedInternals.owner = null; + } { - ReactDebugCurrentFrame$1.setExtraStackFrame = function (stack) { - { - currentExtraStackFrame = stack; - } + var currentExtraStackFrame = null; + + ReactSharedInternals.setExtraStackFrame = function (stack) { + currentExtraStackFrame = stack; }; // Stack implementation injected by the current renderer. - ReactDebugCurrentFrame$1.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; - ReactDebugCurrentFrame$1.getStackAddendum = function () { + ReactSharedInternals.getStackAddendum = function () { var stack = ""; // Add an extra top frame while an element is being validated if (currentExtraStackFrame) { stack += currentExtraStackFrame; } // Delegate to the injected renderer-specific implementation - var impl = ReactDebugCurrentFrame$1.getCurrentStack; + var impl = ReactSharedInternals.getCurrentStack; if (impl) { stack += impl() || ""; @@ -149,19 +125,6 @@ if (__DEV__) { }; } - var ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher$1, - ReactCurrentOwner: ReactCurrentOwner$1 - }; - - { - ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1; - } - - var ReactServerSharedInternals = { - ReactCurrentCache: ReactCurrentCache - }; - var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare function isArray(a) { @@ -568,7 +531,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -622,13 +584,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -821,7 +783,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -1051,8 +1013,6 @@ if (__DEV__) { return null; } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"); var specialPropKeyWarningShown; var specialPropRefWarningShown; @@ -1096,12 +1056,12 @@ if (__DEV__) { { if ( typeof config.ref === "string" && - ReactCurrentOwner.current && + ReactSharedInternals.owner && self && - ReactCurrentOwner.current.stateNode !== self + ReactSharedInternals.owner.stateNode !== self ) { var componentName = getComponentNameFromType( - ReactCurrentOwner.current.type + ReactSharedInternals.owner.type ); if (!didWarnAboutStringRefs[componentName]) { @@ -1112,7 +1072,7 @@ if (__DEV__) { "We ask you to manually fix this case by using useRef() or createRef() instead. " + "Learn more about using refs safely here: " + "https://react.dev/link/strict-mode-string-ref", - getComponentNameFromType(ReactCurrentOwner.current.type), + getComponentNameFromType(ReactSharedInternals.owner.type), config.ref ); @@ -1501,7 +1461,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1535,7 +1495,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -1579,7 +1539,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1665,7 +1625,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1696,7 +1656,7 @@ if (__DEV__) { if (enableRefAsProp && !disableStringRefs && propName === "ref") { props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type ); } else { @@ -1760,7 +1720,7 @@ if (__DEV__) { ref, undefined, undefined, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1816,7 +1776,7 @@ if (__DEV__) { } } - owner = ReactCurrentOwner.current; + owner = ReactSharedInternals.owner; } if (hasValidKey(config)) { @@ -1909,8 +1869,8 @@ if (__DEV__) { function getDeclarationErrorAddendum() { { - if (ReactCurrentOwner.current) { - var name = getComponentNameFromType(ReactCurrentOwner.current.type); + if (ReactSharedInternals.owner) { + var name = getComponentNameFromType(ReactSharedInternals.owner.type); if (name) { return "\n\nCheck the render method of `" + name + "`."; @@ -2025,7 +1985,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -2055,9 +2015,9 @@ if (__DEV__) { { if (element) { var stack = describeUnknownElementTypeFrameInDEV(element.type); - ReactDebugCurrentFrame.setExtraStackFrame(stack); + ReactSharedInternals.setExtraStackFrame(stack); } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + ReactSharedInternals.setExtraStackFrame(null); } } } @@ -2618,7 +2578,7 @@ if (__DEV__) { } function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -2929,7 +2889,7 @@ if (__DEV__) { function cache(fn) { return function () { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; if (!dispatcher) { // If there is no dispatcher, then we treat this as not being cached. @@ -3014,14 +2974,6 @@ if (__DEV__) { }; } - /** - * Keeps track of the current batch's configuration such as how long an update - * should suspend for if it needs to. - */ - var ReactCurrentBatchConfig = { - transition: null - }; - var reportGlobalError = typeof reportError === "function" // In modern browsers, reportError will dispatch an error event, ? // emulating an uncaught JavaScript error. @@ -3062,26 +3014,26 @@ if (__DEV__) { }; function startTransition(scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition; // Each renderer registers a callback to receive the return value of + var prevTransition = ReactSharedInternals.T; // Each renderer registers a callback to receive the return value of // the scope function. This is used to implement async actions. var callbacks = new Set(); var transition = { _callbacks: callbacks }; - ReactCurrentBatchConfig.transition = transition; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = transition; + var currentTransition = ReactSharedInternals.T; { - ReactCurrentBatchConfig.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { // $FlowFixMe[incompatible-use] found when upgrading Flow - ReactCurrentBatchConfig.transition.name = options.name; // $FlowFixMe[incompatible-use] found when upgrading Flow + ReactSharedInternals.T.name = options.name; // $FlowFixMe[incompatible-use] found when upgrading Flow - ReactCurrentBatchConfig.transition.startTime = -1; + ReactSharedInternals.T.startTime = -1; } } @@ -3103,7 +3055,7 @@ if (__DEV__) { reportGlobalError(error); } finally { warnAboutTransitionSubscriptions(prevTransition, currentTransition); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } } @@ -3131,7 +3083,7 @@ if (__DEV__) { function noop() {} - var ReactVersion = "19.0.0-www-modern-c9d5711a"; + var ReactVersion = "19.0.0-www-modern-85fbc52f"; // Patch fetch var Children = { @@ -3155,8 +3107,6 @@ if (__DEV__) { exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; - exports.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = - ReactServerSharedInternals; exports.cache = cache; exports.cloneElement = cloneElement; exports.createElement = createElement; diff --git a/compiled/facebook-www/ReactServer-prod.modern.js b/compiled/facebook-www/ReactServer-prod.modern.js index e2986473cd977..459649b3428c0 100644 --- a/compiled/facebook-www/ReactServer-prod.modern.js +++ b/compiled/facebook-www/ReactServer-prod.modern.js @@ -17,13 +17,7 @@ var assign = Object.assign, enableRefAsProp = dynamicFeatureFlags.enableRefAsProp, disableDefaultPropsExceptForClasses = dynamicFeatureFlags.disableDefaultPropsExceptForClasses, - ReactCurrentCache = { current: null }, - ReactCurrentDispatcher = { current: null }, - ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher, - ReactCurrentOwner: { current: null } - }, - ReactServerSharedInternals = { ReactCurrentCache: ReactCurrentCache }; + ReactSharedInternals = { H: null, C: null, owner: null }; function formatProdErrorMessage(code) { var url = "https://react.dev/errors/" + code; if (1 < arguments.length) { @@ -57,8 +51,7 @@ function getIteratorFn(maybeIterable) { maybeIterable["@@iterator"]; return "function" === typeof maybeIterable ? maybeIterable : null; } -var hasOwnProperty = Object.prototype.hasOwnProperty, - ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; +var hasOwnProperty = Object.prototype.hasOwnProperty; function ReactElement(type, key, _ref, self, source, owner, props) { enableRefAsProp && ((_ref = props.ref), (_ref = void 0 !== _ref ? _ref : null)); @@ -79,7 +72,7 @@ function jsxProd(type, config, maybeKey) { void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))); + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))); maybeKey = {}; for (var propName in config) "key" === propName || @@ -87,7 +80,7 @@ function jsxProd(type, config, maybeKey) { (enableRefAsProp && "ref" === propName ? (maybeKey.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (maybeKey[propName] = config[propName])); @@ -103,7 +96,7 @@ function jsxProd(type, config, maybeKey) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, maybeKey ); } @@ -331,36 +324,35 @@ function createCacheRoot() { function createCacheNode() { return { s: 0, v: void 0, o: null, p: null }; } -var ReactCurrentBatchConfig = { transition: null }, - reportGlobalError = - "function" === typeof reportError - ? reportError - : function (error) { - if ( - "object" === typeof window && - "function" === typeof window.ErrorEvent - ) { - var event = new window.ErrorEvent("error", { - bubbles: !0, - cancelable: !0, - message: - "object" === typeof error && - null !== error && - "string" === typeof error.message - ? String(error.message) - : String(error), - error: error - }); - if (!window.dispatchEvent(event)) return; - } else if ( - "object" === typeof process && - "function" === typeof process.emit - ) { - process.emit("uncaughtException", error); - return; - } - console.error(error); - }; +var reportGlobalError = + "function" === typeof reportError + ? reportError + : function (error) { + if ( + "object" === typeof window && + "function" === typeof window.ErrorEvent + ) { + var event = new window.ErrorEvent("error", { + bubbles: !0, + cancelable: !0, + message: + "object" === typeof error && + null !== error && + "string" === typeof error.message + ? String(error.message) + : String(error), + error: error + }); + if (!window.dispatchEvent(event)) return; + } else if ( + "object" === typeof process && + "function" === typeof process.emit + ) { + process.emit("uncaughtException", error); + return; + } + console.error(error); + }; function noop() {} exports.Children = { map: mapChildren, @@ -398,11 +390,9 @@ exports.StrictMode = REACT_STRICT_MODE_TYPE; exports.Suspense = REACT_SUSPENSE_TYPE; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; -exports.__SECRET_SERVER_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = - ReactServerSharedInternals; exports.cache = function (fn) { return function () { - var dispatcher = ReactCurrentCache.current; + var dispatcher = ReactSharedInternals.C; if (!dispatcher) return fn.apply(null, arguments); var fnMap = dispatcher.getCacheForType(createCacheRoot); dispatcher = fnMap.get(fn); @@ -451,7 +441,7 @@ exports.cloneElement = function (element, config, children) { void 0 !== config.ref && (enableRefAsProp || ((ref = config.ref), (ref = coerceStringRef(ref, owner, element.type))), - (owner = ReactCurrentOwner.current)); + (owner = ReactSharedInternals.owner)); void 0 !== config.key && (key = "" + config.key); if ( !disableDefaultPropsExceptForClasses && @@ -496,7 +486,7 @@ exports.createElement = function (type, config, children) { for (propName in (void 0 === config.ref || enableRefAsProp || ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))), + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))), void 0 !== config.key && (key = "" + config.key), config)) hasOwnProperty.call(config, propName) && @@ -507,7 +497,7 @@ exports.createElement = function (type, config, children) { (enableRefAsProp && "ref" === propName ? (props.ref = coerceStringRef( config[propName], - ReactCurrentOwner.current, + ReactSharedInternals.owner, type )) : (props[propName] = config[propName])); @@ -528,7 +518,7 @@ exports.createElement = function (type, config, children) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); }; @@ -557,15 +547,15 @@ exports.memo = function (type, compare) { }; }; exports.startTransition = function (scope, options) { - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, callbacks = new Set(); - ReactCurrentBatchConfig.transition = { _callbacks: callbacks }; - var currentTransition = ReactCurrentBatchConfig.transition; + ReactSharedInternals.T = { _callbacks: callbacks }; + var currentTransition = ReactSharedInternals.T; enableTransitionTracing && void 0 !== options && void 0 !== options.name && - ((ReactCurrentBatchConfig.transition.name = options.name), - (ReactCurrentBatchConfig.transition.startTime = -1)); + ((ReactSharedInternals.T.name = options.name), + (ReactSharedInternals.T.startTime = -1)); try { var returnValue = scope(); "object" === typeof returnValue && @@ -578,27 +568,23 @@ exports.startTransition = function (scope, options) { } catch (error) { reportGlobalError(error); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } }; exports.use = function (usable) { - return ReactCurrentDispatcher.current.use(usable); + return ReactSharedInternals.H.use(usable); }; exports.useActionState = function (action, initialState, permalink) { - return ReactCurrentDispatcher.current.useActionState( - action, - initialState, - permalink - ); + return ReactSharedInternals.H.useActionState(action, initialState, permalink); }; exports.useCallback = function (callback, deps) { - return ReactCurrentDispatcher.current.useCallback(callback, deps); + return ReactSharedInternals.H.useCallback(callback, deps); }; exports.useDebugValue = function () {}; exports.useId = function () { - return ReactCurrentDispatcher.current.useId(); + return ReactSharedInternals.H.useId(); }; exports.useMemo = function (create, deps) { - return ReactCurrentDispatcher.current.useMemo(create, deps); + return ReactSharedInternals.H.useMemo(create, deps); }; -exports.version = "19.0.0-www-modern-9b5f5653"; +exports.version = "19.0.0-www-modern-fc045344"; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 8759306e2fa3e..c4ba2d291cbbd 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -65,9 +65,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -582,7 +580,6 @@ if (__DEV__) { var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -624,7 +621,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$2.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -2583,7 +2580,6 @@ if (__DEV__) { var objectIs = typeof Object.is === "function" ? Object.is : is; // $FlowFixMe[method-unbinding] - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -2642,13 +2638,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -2841,7 +2837,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -4058,7 +4054,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -4097,7 +4092,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -4110,9 +4105,9 @@ if (__DEV__) { } } - if (ReactCurrentActQueue$4.isBatchingLegacy && root.tag === LegacyRoot) { + if (ReactSharedInternals.isBatchingLegacy && root.tag === LegacyRoot) { // Special `act` case: Record whenever a legacy update is scheduled. - ReactCurrentActQueue$4.didScheduleLegacyUpdate = true; + ReactSharedInternals.didScheduleLegacyUpdate = true; } } function flushSyncWorkOnAllRoots() { @@ -4303,7 +4298,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$4.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -4370,11 +4365,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$2(priorityLevel, callback) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$4.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -4389,13 +4384,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$4.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -5167,7 +5162,6 @@ if (__DEV__) { return true; } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -5199,14 +5193,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -5581,8 +5575,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -5636,8 +5628,8 @@ if (__DEV__) { function noop() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$3.current !== null) { - ReactCurrentActQueue$3.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -7752,8 +7744,6 @@ if (__DEV__) { /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -8054,17 +8044,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -8119,7 +8108,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -8270,7 +8259,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -8292,7 +8281,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -8332,7 +8321,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -8505,7 +8494,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -9314,14 +9303,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -9379,7 +9368,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -9965,7 +9954,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -9977,12 +9966,12 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -10028,7 +10017,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -10248,11 +10237,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -10283,7 +10272,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -10534,27 +10523,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -10565,14 +10552,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -10693,27 +10679,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -10724,14 +10708,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -10845,27 +10828,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -10876,14 +10857,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11005,27 +10985,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11036,14 +11014,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11176,28 +11153,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11210,14 +11185,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11354,28 +11328,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11388,14 +11360,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11532,28 +11503,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11566,14 +11535,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -13033,8 +13001,6 @@ if (__DEV__) { console["error"](error); }; - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function defaultOnUncaughtError(error, errorInfo) { @@ -13099,10 +13065,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -13637,7 +13603,6 @@ if (__DEV__) { return false; } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -13752,7 +13717,7 @@ if (__DEV__) { prepareToReadContext(workInProgress, renderLanes); { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -14338,7 +14303,7 @@ if (__DEV__) { prepareToReadContext(workInProgress, renderLanes); { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -14549,7 +14514,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$1.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -16225,7 +16193,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -17306,10 +17274,8 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -22486,7 +22452,6 @@ if (__DEV__) { symbolFor("selector.text"); } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isLegacyActEnvironment(fiber) { { // Legacy mode. We preserve the behavior of React 17's act. It assumes an @@ -22511,7 +22476,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -22525,11 +22490,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -22826,7 +22786,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -23366,7 +23326,7 @@ if (__DEV__) { if ( executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. - !ReactCurrentActQueue.isBatchingLegacy + !ReactSharedInternals.isBatchingLegacy ) { resetRenderTimer(); flushSyncWorkOnLegacyRootsOnly(); @@ -23393,12 +23353,12 @@ if (__DEV__) { var prevExecutionContext = executionContext; executionContext |= BatchedContext; - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (fn) { return fn(); @@ -23407,7 +23367,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. // Note that this will happen even if batchedUpdates is higher up // the stack. @@ -23542,7 +23502,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -23666,8 +23629,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -23680,20 +23643,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -24058,7 +24021,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -24127,7 +24090,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -24253,7 +24218,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -24463,12 +24430,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -24478,7 +24445,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -24600,14 +24567,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -24636,7 +24605,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -24809,16 +24778,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -25388,7 +25357,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -25401,7 +25370,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -25435,7 +25404,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -25470,7 +25439,7 @@ if (__DEV__) { if ( root.tag !== LegacyRoot && isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -26676,7 +26645,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-53c7b6b2"; + var ReactVersion = "19.0.0-www-classic-142ddea8"; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol @@ -27196,7 +27165,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -27211,7 +27179,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index c8b18ee6e2c53..9a2da19dde3aa 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -65,9 +65,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -582,7 +580,6 @@ if (__DEV__) { var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -624,7 +621,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$2.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -2583,7 +2580,6 @@ if (__DEV__) { var objectIs = typeof Object.is === "function" ? Object.is : is; // $FlowFixMe[method-unbinding] - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { { @@ -2642,13 +2638,13 @@ if (__DEV__) { var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined. Error.prepareStackTrace = undefined; - var previousDispatcher; + var previousDispatcher = null; { - previousDispatcher = ReactCurrentDispatcher$2.current; // Set the dispatcher in DEV because this might be call in the render function + previousDispatcher = ReactSharedInternals.H; // Set the dispatcher in DEV because this might be call in the render function // for warnings. - ReactCurrentDispatcher$2.current = null; + ReactSharedInternals.H = null; disableLogs(); } /** @@ -2841,7 +2837,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -4058,7 +4054,6 @@ if (__DEV__) { } } - var ReactCurrentActQueue$4 = ReactSharedInternals.ReactCurrentActQueue; // A linked list of all the roots with pending work. In an idiomatic app, // there's only a single root, but we do support multi root apps, hence this // extra complexity. But this module is optimized for the single root case. @@ -4097,7 +4092,7 @@ if (__DEV__) { mightHavePendingSyncWork = true; // At the end of the current event, go through each of the roots and ensure // there's a task scheduled for each one at the correct priority. - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // We're inside an `act` scope. if (!didScheduleMicrotask_act) { didScheduleMicrotask_act = true; @@ -4110,9 +4105,9 @@ if (__DEV__) { } } - if (ReactCurrentActQueue$4.isBatchingLegacy && root.tag === LegacyRoot) { + if (ReactSharedInternals.isBatchingLegacy && root.tag === LegacyRoot) { // Special `act` case: Record whenever a legacy update is scheduled. - ReactCurrentActQueue$4.didScheduleLegacyUpdate = true; + ReactSharedInternals.didScheduleLegacyUpdate = true; } } function flushSyncWorkOnAllRoots() { @@ -4303,7 +4298,7 @@ if (__DEV__) { // Scheduler task, rather than an `act` task, cancel it and re-schedule // on the `act` queue. !( - ReactCurrentActQueue$4.current !== null && + ReactSharedInternals.actQueue !== null && existingCallbackNode !== fakeActCallbackNode$1 ) ) { @@ -4370,11 +4365,11 @@ if (__DEV__) { var fakeActCallbackNode$1 = {}; function scheduleCallback$2(priorityLevel, callback) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: We're inside an `act` scope (a testing utility). // Instead of scheduling work in the host environment, add it to a // fake internal queue that's managed by the `act` implementation. - ReactCurrentActQueue$4.current.push(callback); + ReactSharedInternals.actQueue.push(callback); return fakeActCallbackNode$1; } else { return scheduleCallback$3(priorityLevel, callback); @@ -4389,13 +4384,13 @@ if (__DEV__) { } function scheduleImmediateTask(cb) { - if (ReactCurrentActQueue$4.current !== null) { + if (ReactSharedInternals.actQueue !== null) { // Special case: Inside an `act` scope, we push microtasks to the fake `act` // callback queue. This is because we currently support calling `act` // without awaiting the result. The plan is to deprecate that, and require // that you always await the result so that the microtasks have a chance to // run. But it hasn't happened yet. - ReactCurrentActQueue$4.current.push(function () { + ReactSharedInternals.actQueue.push(function () { cb(); return null; }); @@ -5167,7 +5162,6 @@ if (__DEV__) { return true; } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -5199,14 +5193,14 @@ if (__DEV__) { function resetCurrentFiber() { { - ReactDebugCurrentFrame.getCurrentStack = null; + ReactSharedInternals.getCurrentStack = null; current = null; isRendering = false; } } function setCurrentFiber(fiber) { { - ReactDebugCurrentFrame.getCurrentStack = + ReactSharedInternals.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev; current = fiber; isRendering = false; @@ -5581,8 +5575,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -5636,8 +5628,8 @@ if (__DEV__) { function noop() {} function trackUsedThenable(thenableState, thenable, index) { - if (ReactCurrentActQueue$3.current !== null) { - ReactCurrentActQueue$3.didUsePromise = true; + if (ReactSharedInternals.actQueue !== null) { + ReactSharedInternals.didUsePromise = true; } var trackedThenables = getThenablesFromState(thenableState); @@ -7752,8 +7744,6 @@ if (__DEV__) { /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -8054,17 +8044,16 @@ if (__DEV__) { { if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; + ReactSharedInternals.H = HooksDispatcherOnUpdateInDEV; } else if (hookTypesDev !== null) { // This dispatcher handles an edge case where a component is updating, // but no stateful hooks have been used. // We want to match the production code behavior (which will use HooksDispatcherOnMount), // but with the extra DEV validation to ensure hooks ordering hasn't changed. // This dispatcher does that. - ReactCurrentDispatcher$1.current = - HooksDispatcherOnMountWithHookTypesInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountWithHookTypesInDEV; } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } // In Strict Mode, during development, user functions are double invoked to // help detect side effects. The logic for how this is implemented for in @@ -8119,7 +8108,7 @@ if (__DEV__) { } // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. + ReactSharedInternals.H = ContextOnlyDispatcher; // This check uses currentHook so that it works the same in DEV and prod bundles. // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. var didRenderTooFewHooks = @@ -8270,7 +8259,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -8292,7 +8281,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -8332,7 +8321,7 @@ if (__DEV__) { currentlyRenderingFiber$1 = null; // We can assume the previous dispatcher is always this one, since we set it // at the beginning of the render phase and there's no re-entrance. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; } function resetHooksOnUnwind(workInProgress) { if (didScheduleRenderPhaseUpdate) { @@ -8505,7 +8494,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -9314,14 +9303,14 @@ if (__DEV__) { var action = actionQueue.action; var prevState = actionQueue.state; // This is a fork of startTransition - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + ReactSharedInternals.T._updatedFibers = new Set(); } // Optimistically update the pending state, similar to useTransition. // This will be reverted automatically when all actions are finished. @@ -9379,7 +9368,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -9965,7 +9954,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -9977,12 +9966,12 @@ if (__DEV__) { // optimistic update anyway to make it less likely the behavior accidentally // diverges; for example, both an optimistic update and this one should // share the same lane. - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; dispatchOptimisticSetState(fiber, false, queue, pendingState); } { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -10028,7 +10017,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -10248,11 +10237,11 @@ if (__DEV__) { var lastRenderedReducer = queue.lastRenderedReducer; if (lastRenderedReducer !== null) { - var prevDispatcher; + var prevDispatcher = null; { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = + prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; } @@ -10283,7 +10272,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -10534,27 +10523,25 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; mountHookTypesDev(); checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -10565,14 +10552,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -10693,27 +10679,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -10724,14 +10708,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -10845,27 +10828,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -10876,14 +10857,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11005,27 +10985,25 @@ if (__DEV__) { useMemo: function (create, deps) { currentHookNameInDev = "useMemo"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11036,14 +11014,13 @@ if (__DEV__) { useState: function (initialState) { currentHookNameInDev = "useState"; updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnRerenderInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11176,28 +11153,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11210,14 +11185,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnMountInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV; try { return mountState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11354,28 +11328,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11388,14 +11360,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -11532,28 +11503,26 @@ if (__DEV__) { currentHookNameInDev = "useMemo"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return updateMemo(create, deps); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useReducer: function (reducer, initialArg, init) { currentHookNameInDev = "useReducer"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderReducer(reducer, initialArg, init); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useRef: function (initialValue) { @@ -11566,14 +11535,13 @@ if (__DEV__) { currentHookNameInDev = "useState"; warnInvalidHookAccess(); updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = - InvalidNestedHooksDispatcherOnUpdateInDEV; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV; try { return rerenderState(initialState); } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } }, useDebugValue: function (value, formatterFn) { @@ -13033,8 +13001,6 @@ if (__DEV__) { console["error"](error); }; - var ReactCurrentActQueue$2 = ReactSharedInternals.ReactCurrentActQueue; // Side-channel since I'm not sure we want to make this part of the public API - var componentName = null; var errorBoundaryName = null; function defaultOnUncaughtError(error, errorInfo) { @@ -13099,10 +13065,10 @@ if (__DEV__) { var error = errorInfo.value; - if (true && ReactCurrentActQueue$2.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // For uncaught errors inside act, we track them on the act and then // rethrow them into the test. - ReactCurrentActQueue$2.thrownErrors.push(error); + ReactSharedInternals.thrownErrors.push(error); return; } @@ -13637,7 +13603,6 @@ if (__DEV__) { return false; } - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; // A special exception that's used to unwind the stack when an update flows // into a dehydrated boundary. var SelectiveHydrationException = new Error( @@ -13752,7 +13717,7 @@ if (__DEV__) { prepareToReadContext(workInProgress, renderLanes); { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -14338,7 +14303,7 @@ if (__DEV__) { prepareToReadContext(workInProgress, renderLanes); { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -14549,7 +14514,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$1.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -16225,7 +16193,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -17306,10 +17274,8 @@ if (__DEV__) { popProvider(CacheContext, workInProgress); } - var ReactCurrentBatchConfig$1 = - ReactSharedInternals.ReactCurrentBatchConfig; function requestCurrentTransition() { - var transition = ReactCurrentBatchConfig$1.transition; + var transition = ReactSharedInternals.T; if (transition !== null) { // Whenever a transition update is scheduled, register a callback on the @@ -22486,7 +22452,6 @@ if (__DEV__) { symbolFor("selector.text"); } - var ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue; function isLegacyActEnvironment(fiber) { { // Legacy mode. We preserve the behavior of React 17's act. It assumes an @@ -22511,7 +22476,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -22525,11 +22490,6 @@ if (__DEV__) { } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -22826,7 +22786,7 @@ if (__DEV__) { !disableLegacyMode && (fiber.mode & ConcurrentMode) === NoMode ) { - if (ReactCurrentActQueue.isBatchingLegacy); + if (ReactSharedInternals.isBatchingLegacy); else { // Flush the synchronous work now, unless we're already working or inside // a batch. This is intentionally inside scheduleUpdateOnFiber instead of @@ -23366,7 +23326,7 @@ if (__DEV__) { if ( executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. - !ReactCurrentActQueue.isBatchingLegacy + !ReactSharedInternals.isBatchingLegacy ) { resetRenderTimer(); flushSyncWorkOnLegacyRootsOnly(); @@ -23393,12 +23353,12 @@ if (__DEV__) { var prevExecutionContext = executionContext; executionContext |= BatchedContext; - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (fn) { return fn(); @@ -23407,7 +23367,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. // Note that this will happen even if batchedUpdates is higher up // the stack. @@ -23542,7 +23502,10 @@ if (__DEV__) { // when React is executing user code. resetHooksAfterThrow(); resetCurrentFiber(); - ReactCurrentOwner.current = null; + + { + ReactSharedInternals.owner = null; + } if (thrownValue === SuspenseException) { // This is a special type of exception used for Suspense. For historical @@ -23666,8 +23629,8 @@ if (__DEV__) { } function pushDispatcher(container) { - var prevDispatcher = ReactCurrentDispatcher.current; - ReactCurrentDispatcher.current = ContextOnlyDispatcher; + var prevDispatcher = ReactSharedInternals.H; + ReactSharedInternals.H = ContextOnlyDispatcher; if (prevDispatcher === null) { // The React isomorphic package does not include a default dispatcher. @@ -23680,20 +23643,20 @@ if (__DEV__) { } function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } function pushCacheDispatcher() { { - var prevCacheDispatcher = ReactCurrentCache.current; - ReactCurrentCache.current = DefaultCacheDispatcher; + var prevCacheDispatcher = ReactSharedInternals.C; + ReactSharedInternals.C = DefaultCacheDispatcher; return prevCacheDispatcher; } } function popCacheDispatcher(prevCacheDispatcher) { { - ReactCurrentCache.current = prevCacheDispatcher; + ReactSharedInternals.C = prevCacheDispatcher; } } @@ -24058,7 +24021,7 @@ if (__DEV__) { } } - if (true && ReactCurrentActQueue.current !== null) { + if (true && ReactSharedInternals.actQueue !== null) { // `act` special case: If we're inside an `act` scope, don't consult // `shouldYield`. Always keep working until the render is complete. // This is not just an optimization: in a unit test environment, we @@ -24127,7 +24090,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -24253,7 +24218,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -24463,12 +24430,12 @@ if (__DEV__) { ) { // TODO: This no longer makes any sense. We already wrap the mutation and // layout phases. Should be able to remove. - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousUpdateLanePriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(DiscreteEventPriority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; commitRootImpl( root, recoverableErrors, @@ -24478,7 +24445,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -24600,14 +24567,16 @@ if (__DEV__) { NoFlags$1; if (subtreeHasEffects || rootHasEffect) { - var prevTransition = ReactCurrentBatchConfig.transition; - ReactCurrentBatchConfig.transition = null; + var prevTransition = ReactSharedInternals.T; + ReactSharedInternals.T = null; var previousPriority = getCurrentUpdatePriority(); setCurrentUpdatePriority(DiscreteEventPriority); var prevExecutionContext = executionContext; executionContext |= CommitContext; // Reset this to null before calling lifecycles - ReactCurrentOwner.current = null; // The commit phase is broken into several sub-phases. We do a separate pass + { + ReactSharedInternals.owner = null; + } // The commit phase is broken into several sub-phases. We do a separate pass // of the effect list for each phase: all mutation effects come before all // layout effects, and so on. // The first phase a "before mutation" phase. We use this phase to read the @@ -24636,7 +24605,7 @@ if (__DEV__) { executionContext = prevExecutionContext; // Reset the priority to the previous non-sync value. setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else { // No effects. root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were @@ -24809,16 +24778,16 @@ if (__DEV__) { pendingPassiveEffectsRemainingLanes = NoLanes; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes); var priority = lowerEventPriority(DefaultEventPriority, renderPriority); - var prevTransition = ReactCurrentBatchConfig.transition; + var prevTransition = ReactSharedInternals.T; var previousPriority = getCurrentUpdatePriority(); try { setCurrentUpdatePriority(priority); - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; return flushPassiveEffectsImpl(); } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig.transition = prevTransition; // Once passive effects have run for the tree - giving components a + ReactSharedInternals.T = prevTransition; // Once passive effects have run for the tree - giving components a // chance to retain cache instances they use - release the pooled // cache at the root (if there is one) @@ -25388,7 +25357,7 @@ if (__DEV__) { { // If we're currently inside an `act` scope, bypass Scheduler and push to // the `act` queue instead. - var actQueue = ReactCurrentActQueue.current; + var actQueue = ReactSharedInternals.actQueue; if (actQueue !== null) { actQueue.push(callback); @@ -25401,7 +25370,7 @@ if (__DEV__) { function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -25435,7 +25404,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -25470,7 +25439,7 @@ if (__DEV__) { if ( root.tag !== LegacyRoot && isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -26676,7 +26645,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-53c7b6b2"; + var ReactVersion = "19.0.0-www-modern-142ddea8"; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol @@ -27196,7 +27165,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -27211,7 +27179,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, diff --git a/compiled/facebook-www/ReactTestUtils-dev.classic.js b/compiled/facebook-www/ReactTestUtils-dev.classic.js index 6479f8e0e3ec0..8aeb1ee43c8e7 100644 --- a/compiled/facebook-www/ReactTestUtils-dev.classic.js +++ b/compiled/facebook-www/ReactTestUtils-dev.classic.js @@ -64,9 +64,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; diff --git a/compiled/facebook-www/ReactTestUtils-dev.modern.js b/compiled/facebook-www/ReactTestUtils-dev.modern.js index 6479f8e0e3ec0..8aeb1ee43c8e7 100644 --- a/compiled/facebook-www/ReactTestUtils-dev.modern.js +++ b/compiled/facebook-www/ReactTestUtils-dev.modern.js @@ -64,9 +64,7 @@ if (__DEV__) { React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Defensive in case this is fired before React is initialized. if (ReactSharedInternals != null) { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s";