diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index 53c56582110fc..40cc8cea405f2 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<80d7175505ee7b5092250e0e58c47878>> + * @generated SignedSource<<6e42bfca9701ca8864d4f9604499cd79>> */ "use strict"; @@ -67,9 +67,7 @@ if (__DEV__) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -585,7 +583,6 @@ if (__DEV__) { var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -627,7 +624,7 @@ if (__DEV__) { } function isMounted(component) { { - var owner = ReactCurrentOwner$2.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -4123,7 +4120,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. @@ -4162,7 +4158,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; @@ -4183,9 +4179,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() { @@ -4376,7 +4372,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 ) ) { @@ -4443,11 +4439,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); @@ -4462,13 +4458,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; }); @@ -5240,7 +5236,6 @@ if (__DEV__) { return true; } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -5272,14 +5267,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; @@ -5654,8 +5649,6 @@ if (__DEV__) { }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -5709,8 +5702,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); @@ -7800,8 +7793,6 @@ if (__DEV__) { /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -8102,17 +8093,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 @@ -8167,7 +8157,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 = @@ -8318,7 +8308,7 @@ if (__DEV__) { hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -8340,7 +8330,7 @@ if (__DEV__) { ); } function TransitionAwareHostComponent() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -8380,7 +8370,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) { @@ -8553,7 +8543,7 @@ if (__DEV__) { // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -9362,14 +9352,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. @@ -9427,7 +9417,7 @@ if (__DEV__) { setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -9995,7 +9985,7 @@ if (__DEV__) { setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -10007,12 +9997,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 { @@ -10058,7 +10048,7 @@ if (__DEV__) { } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -10282,11 +10272,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; } @@ -10317,7 +10307,7 @@ if (__DEV__) { // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -10578,27 +10568,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) { @@ -10609,14 +10597,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) { @@ -10737,27 +10724,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) { @@ -10768,14 +10753,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) { @@ -10889,27 +10873,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) { @@ -10920,14 +10902,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) { @@ -11049,27 +11030,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) { @@ -11080,14 +11059,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) { @@ -11220,28 +11198,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) { @@ -11254,14 +11230,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) { @@ -11398,28 +11373,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) { @@ -11432,14 +11405,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) { @@ -11576,28 +11548,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) { @@ -11610,14 +11580,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) { @@ -13089,8 +13058,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) { @@ -13155,10 +13122,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; } @@ -13693,7 +13660,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( @@ -13812,7 +13778,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -14406,7 +14372,7 @@ if (__DEV__) { } { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -14629,7 +14595,10 @@ if (__DEV__) { var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$1.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -16350,7 +16319,7 @@ if (__DEV__) { var newChildren; { - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -17425,10 +17394,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 @@ -22370,7 +22337,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 @@ -22395,7 +22361,7 @@ if (__DEV__) { if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -22409,11 +22375,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; @@ -22710,7 +22671,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 @@ -23250,7 +23211,7 @@ if (__DEV__) { if ( executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. - !ReactCurrentActQueue.isBatchingLegacy + !ReactSharedInternals.isBatchingLegacy ) { resetRenderTimer(); flushSyncWorkOnLegacyRootsOnly(); @@ -23277,12 +23238,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(); @@ -23291,7 +23252,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. @@ -23426,7 +23387,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 @@ -23578,8 +23542,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. @@ -23592,20 +23556,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; } } @@ -23982,7 +23946,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 @@ -24061,7 +24025,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -24187,7 +24153,9 @@ if (__DEV__) { workInProgress = next; } - ReactCurrentOwner.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -24397,12 +24365,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, @@ -24412,7 +24380,7 @@ if (__DEV__) { spawnedLane ); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -24542,14 +24510,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 @@ -24586,7 +24556,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 @@ -24763,16 +24733,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) @@ -25350,7 +25320,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); @@ -25363,7 +25333,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) { @@ -25397,7 +25367,7 @@ if (__DEV__) { } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -25432,7 +25402,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 " + @@ -26620,7 +26590,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-canary-5acb30be"; + var ReactVersion = "19.0.0-canary-0c4d3f45"; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol @@ -27144,7 +27114,6 @@ if (__DEV__) { function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -27159,7 +27128,7 @@ if (__DEV__) { setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index 3c9d4ce01c0da..f469034fdd158 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<493cdb9fbf258eb499287015c0434886>> + * @generated SignedSource<<87f2bb9cd01d048068daf2853de59b90>> */ "use strict"; @@ -2133,9 +2133,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, @@ -2169,7 +2167,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -2187,7 +2185,7 @@ function renderWithHooks( return current; } function finishRenderingHooks() { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -2213,13 +2211,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; @@ -2310,7 +2308,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) { @@ -2610,9 +2608,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); @@ -2645,7 +2643,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( @@ -2882,9 +2880,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { 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); try { var returnValue = callback(); @@ -2908,7 +2906,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { }); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -3744,8 +3742,7 @@ function throwException( } while (null !== returnFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error( +var SelectiveHydrationException = Error( "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue." ), didReceiveUpdate = !1; @@ -4242,7 +4239,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 @@ -5438,9 +5435,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; } @@ -7383,10 +7379,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, @@ -7740,18 +7732,14 @@ function flushSyncFromReconciler(fn) { flushPassiveEffects(); var prevExecutionContext = executionContext; executionContext |= 1; - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { - if ( - ((currentUpdatePriority = 2), - (ReactCurrentBatchConfig.transition = null), - fn) - ) + if (((currentUpdatePriority = 2), (ReactSharedInternals.T = null), fn)) return fn(); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (executionContext = prevExecutionContext), 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(!1); } @@ -7817,8 +7805,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; @@ -7856,13 +7844,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() { @@ -7914,8 +7902,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( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." @@ -8021,8 +8009,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; @@ -8038,7 +8026,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; @@ -8092,7 +8080,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -8179,11 +8167,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, @@ -8193,7 +8181,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -8240,13 +8228,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; @@ -8254,7 +8242,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -8299,11 +8287,11 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority; - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { @@ -8338,7 +8326,7 @@ function flushPassiveEffects() { return JSCompiler_inline_result; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -9153,10 +9141,10 @@ var devToolsConfig$jscomp$inline_1000 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-0c75b31c", + version: "19.0.0-canary-3a10429d", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1222 = { +var internals$jscomp$inline_1221 = { bundleType: devToolsConfig$jscomp$inline_1000.bundleType, version: devToolsConfig$jscomp$inline_1000.version, rendererPackageName: devToolsConfig$jscomp$inline_1000.rendererPackageName, @@ -9170,7 +9158,7 @@ var internals$jscomp$inline_1222 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentFiberUsingSlowPath(fiber); fiber = null !== fiber ? findCurrentHostFiberImpl(fiber) : null; @@ -9184,19 +9172,19 @@ var internals$jscomp$inline_1222 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-0c75b31c" + reconcilerVersion: "19.0.0-canary-3a10429d" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1223 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1222 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1223.isDisabled && - hook$jscomp$inline_1223.supportsFiber + !hook$jscomp$inline_1222.isDisabled && + hook$jscomp$inline_1222.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1223.inject( - internals$jscomp$inline_1222 + (rendererID = hook$jscomp$inline_1222.inject( + internals$jscomp$inline_1221 )), - (injectedHook = hook$jscomp$inline_1223); + (injectedHook = hook$jscomp$inline_1222); } catch (err) {} } exports._Scheduler = Scheduler; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 943b9ce5016a8..d71824d0f4b54 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4431ac600b9b830957ac137277654c1b>> + * @generated SignedSource<<144679f7b56e93b28582f8c11b73acdb>> */ "use strict"; @@ -2221,9 +2221,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, @@ -2257,7 +2255,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -2275,7 +2273,7 @@ function renderWithHooks( return current; } function finishRenderingHooks() { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -2301,13 +2299,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; @@ -2398,7 +2396,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) { @@ -2698,9 +2696,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); @@ -2733,7 +2731,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( @@ -2970,9 +2968,9 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { 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); try { var returnValue = callback(); @@ -2996,7 +2994,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { }); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -3902,8 +3900,7 @@ function throwException( } while (null !== returnFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error( +var SelectiveHydrationException = Error( "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue." ), didReceiveUpdate = !1; @@ -4406,7 +4403,7 @@ function finishClassComponent( bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); shouldUpdate = workInProgress.stateNode; - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; if ( didCaptureError && "function" !== typeof Component.getDerivedStateFromError @@ -5633,9 +5630,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; } @@ -7853,10 +7849,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, @@ -8214,18 +8206,14 @@ function flushSyncFromReconciler(fn) { flushPassiveEffects(); var prevExecutionContext = executionContext; executionContext |= 1; - var prevTransition = ReactCurrentBatchConfig.transition, + var prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { - if ( - ((currentUpdatePriority = 2), - (ReactCurrentBatchConfig.transition = null), - fn) - ) + if (((currentUpdatePriority = 2), (ReactSharedInternals.T = null), fn)) return fn(); } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (executionContext = prevExecutionContext), 0 === (executionContext & 6) && flushSyncWorkAcrossRoots_impl(!1); } @@ -8291,8 +8279,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; @@ -8359,13 +8347,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() { @@ -8418,8 +8406,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( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." @@ -8527,8 +8515,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 ( @@ -8558,7 +8546,7 @@ function performUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate, @@ -8615,7 +8603,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -8711,11 +8699,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, @@ -8725,7 +8713,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -8775,13 +8763,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); commitTime = now(); commitMutationEffectsOnFiber(finishedWork, root); @@ -8798,7 +8786,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else (root.current = finishedWork), (commitTime = now()); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -8845,11 +8833,11 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority; - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { @@ -8928,7 +8916,7 @@ function flushPassiveEffects() { return JSCompiler_inline_result; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -9769,7 +9757,7 @@ var devToolsConfig$jscomp$inline_1082 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-canary-091aeabc", + version: "19.0.0-canary-3f0332e8", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -9799,7 +9787,7 @@ var devToolsConfig$jscomp$inline_1082 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentFiberUsingSlowPath(fiber); fiber = null !== fiber ? findCurrentHostFiberImpl(fiber) : null; @@ -9813,7 +9801,7 @@ var devToolsConfig$jscomp$inline_1082 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-091aeabc" + reconcilerVersion: "19.0.0-canary-3f0332e8" }); exports._Scheduler = Scheduler; exports.act = act; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js index eb9dd8200d50a..0571a405c27d4 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXDEVRuntime-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<89ab70059fbd85b63bf80748a754cb73>> + * @generated SignedSource<> */ "use strict"; @@ -81,9 +81,7 @@ if (__DEV__) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -477,7 +475,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { if (enableComponentStackLocations) { @@ -533,13 +530,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(); } /** @@ -732,7 +729,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -968,8 +965,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; @@ -1011,12 +1006,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]) { @@ -1027,7 +1022,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 ); @@ -1309,7 +1304,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1370,7 +1365,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1384,8 +1379,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 + "`."; @@ -1500,7 +1495,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -1530,9 +1525,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-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js index cf5a10a7e2507..2ab61a356782b 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<793e5defde71fd400afe9a6583a3e6cb>> + * @generated SignedSource<> */ "use strict"; @@ -81,9 +81,7 @@ if (__DEV__) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -477,7 +475,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { if (enableComponentStackLocations) { @@ -533,13 +530,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(); } /** @@ -732,7 +729,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -968,8 +965,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; @@ -1011,12 +1006,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]) { @@ -1027,7 +1022,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 ); @@ -1345,7 +1340,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1406,7 +1401,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1420,8 +1415,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 + "`."; @@ -1536,7 +1531,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -1566,9 +1561,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-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js index 49a2478a958f4..8d0929c5d0290 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8e9fc6c30cb3a1a336d8532aee527031>> + * @generated SignedSource<<6a9bb0dff181629a2d212a3aa8871904>> */ "use strict"; @@ -32,8 +32,8 @@ function formatProdErrorMessage(code) { } var disableDefaultPropsExceptForClasses = dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, - ReactCurrentOwner = - React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner; + ReactSharedInternals = + React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function jsxProd(type, config, maybeKey) { var key = null, ref = null; @@ -48,7 +48,7 @@ function jsxProd(type, config, maybeKey) { null, ref, type, - ReactCurrentOwner.current + ReactSharedInternals.owner ); } maybeKey = {}; @@ -68,7 +68,7 @@ function jsxProd(type, config, maybeKey) { key: key, ref: ref, props: maybeKey, - _owner: ReactCurrentOwner.current + _owner: ReactSharedInternals.owner }; } function stringRefAsCallbackRef(stringRef, type, owner, value) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js index 49a2478a958f4..8d0929c5d0290 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/JSXRuntime-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<8e9fc6c30cb3a1a336d8532aee527031>> + * @generated SignedSource<<6a9bb0dff181629a2d212a3aa8871904>> */ "use strict"; @@ -32,8 +32,8 @@ function formatProdErrorMessage(code) { } var disableDefaultPropsExceptForClasses = dynamicFlagsUntyped.disableDefaultPropsExceptForClasses, - ReactCurrentOwner = - React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner; + ReactSharedInternals = + React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function jsxProd(type, config, maybeKey) { var key = null, ref = null; @@ -48,7 +48,7 @@ function jsxProd(type, config, maybeKey) { null, ref, type, - ReactCurrentOwner.current + ReactSharedInternals.owner ); } maybeKey = {}; @@ -68,7 +68,7 @@ function jsxProd(type, config, maybeKey) { key: key, ref: ref, props: maybeKey, - _owner: ReactCurrentOwner.current + _owner: ReactSharedInternals.owner }; } function stringRefAsCallbackRef(stringRef, type, owner, value) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js index c6e1ea0dbf195..bee75481d0421 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<0301515ac101d5b3682c687183627ea7>> + * @generated SignedSource<<1ca38f577582e221f06ba8c0f86a202c>> */ "use strict"; @@ -26,7 +26,7 @@ if (__DEV__) { } var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"); - var ReactVersion = "19.0.0-canary-91afb935"; + var ReactVersion = "19.0.0-canary-700d733d"; // ATTENTION // When adding new symbols to this file, @@ -69,75 +69,57 @@ 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 - }; + // Re-export dynamic flags from the internal module. + var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on + // the exports object every time a flag is read. - /** - * 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 enableAsyncActions = dynamicFlags.enableAsyncActions, + enableComponentStackLocations = + dynamicFlags.enableComponentStackLocations, + enableRenderableContext = dynamicFlags.enableRenderableContext, + disableDefaultPropsExceptForClasses = + dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. + var enableDebugTracing = false; + var enableScopeAPI = false; + var enableLegacyHidden = false; + var enableTransitionTracing = false; + // because JSX is an extremely hot path. - 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: [] - }; + var enableRefAsProp = false; + var disableLegacyMode = false; - /** - * 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() || ""; @@ -147,18 +129,6 @@ if (__DEV__) { }; } - var ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher$1, - ReactCurrentCache: ReactCurrentCache, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: ReactCurrentOwner$1 - }; - - { - ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame$1; - ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue; - } - // by calls to these methods by a Babel plugin. // // In PROD (or in packages without access to React internals), @@ -203,9 +173,7 @@ if (__DEV__) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -579,25 +547,6 @@ if (__DEV__) { } } - // Re-export dynamic flags from the internal module. - var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on - // the exports object every time a flag is read. - - var enableAsyncActions = dynamicFlags.enableAsyncActions, - enableComponentStackLocations = - dynamicFlags.enableComponentStackLocations, - enableRenderableContext = dynamicFlags.enableRenderableContext, - disableDefaultPropsExceptForClasses = - dynamicFlags.disableDefaultPropsExceptForClasses; // The rest of the flags are static for better dead code elimination. - var enableDebugTracing = false; - var enableScopeAPI = false; - var enableLegacyHidden = false; - var enableTransitionTracing = false; - // because JSX is an extremely hot path. - - var enableRefAsProp = false; - var disableLegacyMode = false; - function getWrappedName$1(outerType, innerType, wrapperName) { var displayName = outerType.displayName; @@ -863,7 +812,6 @@ if (__DEV__) { } } - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { if (enableComponentStackLocations) { @@ -919,13 +867,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(); } /** @@ -1118,7 +1066,7 @@ if (__DEV__) { reentry = false; { - ReactCurrentDispatcher.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -1354,8 +1302,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; @@ -1397,12 +1343,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]) { @@ -1413,7 +1359,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 ); @@ -1731,7 +1677,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1792,7 +1738,7 @@ if (__DEV__) { ref, self, source, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -1878,7 +1824,7 @@ if (__DEV__) { ref = config.ref; { - ref = coerceStringRef(ref, ReactCurrentOwner.current, type); + ref = coerceStringRef(ref, ReactSharedInternals.owner, type); } } @@ -1967,7 +1913,7 @@ if (__DEV__) { ref, undefined, undefined, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); @@ -2023,7 +1969,7 @@ if (__DEV__) { } } - owner = ReactCurrentOwner.current; + owner = ReactSharedInternals.owner; } if (hasValidKey(config)) { @@ -2110,8 +2056,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 + "`."; @@ -2226,7 +2172,7 @@ if (__DEV__) { if ( element && element._owner != null && - element._owner !== ReactCurrentOwner.current + element._owner !== ReactSharedInternals.owner ) { var ownerName = null; @@ -2256,9 +2202,9 @@ if (__DEV__) { { if (element) { var stack = describeUnknownElementTypeFrameInDEV(element.type); - ReactDebugCurrentFrame.setExtraStackFrame(stack); + ReactSharedInternals.setExtraStackFrame(stack); } else { - ReactDebugCurrentFrame.setExtraStackFrame(null); + ReactSharedInternals.setExtraStackFrame(null); } } } @@ -3160,7 +3106,7 @@ if (__DEV__) { var cache = noopCache; function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; { if (dispatcher === null) { @@ -3181,7 +3127,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. @@ -3340,18 +3286,18 @@ 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 (enableAsyncActions) { @@ -3372,7 +3318,7 @@ if (__DEV__) { reportGlobalError(error); } finally { warnAboutTransitionSubscriptions(prevTransition, currentTransition); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } else { // When async actions are not enabled, startTransition does not @@ -3381,7 +3327,7 @@ if (__DEV__) { scope(); } finally { warnAboutTransitionSubscriptions(prevTransition, currentTransition); - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } } } @@ -3468,7 +3414,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. // @@ -3477,18 +3423,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 @@ -3501,12 +3447,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. @@ -3519,24 +3465,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; } @@ -3592,15 +3538,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 { @@ -3610,12 +3556,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); @@ -3669,15 +3615,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; } @@ -3688,7 +3634,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. @@ -3720,7 +3666,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) { @@ -3740,17 +3686,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); @@ -3772,11 +3718,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. @@ -3796,7 +3742,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-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js index d6bcfa127c808..1d57fb49287c2 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<68b673436655d580c5a9bcf2c90d6d00>> + * @generated SignedSource<<87e5d01f9dfe9dfb349c364fc2fdafbf>> */ "use strict"; @@ -86,17 +86,8 @@ var isArrayImpl = Array.isArray, enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, disableDefaultPropsExceptForClasses = dynamicFlagsUntyped.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) { return { $$typeof: REACT_ELEMENT_TYPE, @@ -114,7 +105,7 @@ function jsxProd(type, config, maybeKey) { void 0 !== config.key && (key = "" + config.key); void 0 !== config.ref && ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))); + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))); maybeKey = {}; for (var propName in config) "key" !== propName && @@ -132,7 +123,7 @@ function jsxProd(type, config, maybeKey) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, maybeKey ); } @@ -458,7 +449,7 @@ exports.cloneElement = function (element, config, children) { void 0 !== config.ref && ((ref = config.ref), (ref = coerceStringRef(ref, owner, element.type)), - (owner = ReactCurrentOwner.current)); + (owner = ReactSharedInternals.owner)); void 0 !== config.key && (key = "" + config.key); if ( !disableDefaultPropsExceptForClasses && @@ -518,7 +509,7 @@ exports.createElement = function (type, config, children) { if (null != config) for (propName in (void 0 !== config.ref && ((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) && @@ -544,7 +535,7 @@ exports.createElement = function (type, config, children) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); }; @@ -552,7 +543,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 }; @@ -576,10 +567,10 @@ exports.memo = function (type, compare) { }; }; exports.startTransition = function (scope) { - 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; if (enableAsyncActions) try { var returnValue = scope(); @@ -593,13 +584,13 @@ exports.startTransition = function (scope) { } catch (error) { reportGlobalError(error); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else try { scope(); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } }; exports.unstable_Activity = REACT_OFFSCREEN_TYPE; @@ -609,21 +600,21 @@ 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) { if (enableAsyncActions) - return ReactCurrentDispatcher.current.useActionState( + return ReactSharedInternals.H.useActionState( action, initialState, permalink @@ -631,57 +622,57 @@ exports.useActionState = function (action, initialState, permalink) { throw Error("Not implemented."); }; 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-canary-2d37c214"; +exports.version = "19.0.0-canary-fb236a46"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js index 7dce071a38e3f..d4af3458dc671 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<4a9b3767e8f6d17ecebea9050a477787>> */ "use strict"; @@ -90,17 +90,8 @@ var isArrayImpl = Array.isArray, enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext, disableDefaultPropsExceptForClasses = dynamicFlagsUntyped.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) { return { $$typeof: REACT_ELEMENT_TYPE, @@ -118,7 +109,7 @@ function jsxProd(type, config, maybeKey) { void 0 !== config.key && (key = "" + config.key); void 0 !== config.ref && ((ref = config.ref), - (ref = coerceStringRef(ref, ReactCurrentOwner.current, type))); + (ref = coerceStringRef(ref, ReactSharedInternals.owner, type))); maybeKey = {}; for (var propName in config) "key" !== propName && @@ -136,7 +127,7 @@ function jsxProd(type, config, maybeKey) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, maybeKey ); } @@ -462,7 +453,7 @@ exports.cloneElement = function (element, config, children) { void 0 !== config.ref && ((ref = config.ref), (ref = coerceStringRef(ref, owner, element.type)), - (owner = ReactCurrentOwner.current)); + (owner = ReactSharedInternals.owner)); void 0 !== config.key && (key = "" + config.key); if ( !disableDefaultPropsExceptForClasses && @@ -522,7 +513,7 @@ exports.createElement = function (type, config, children) { if (null != config) for (propName in (void 0 !== config.ref && ((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) && @@ -548,7 +539,7 @@ exports.createElement = function (type, config, children) { ref, void 0, void 0, - ReactCurrentOwner.current, + ReactSharedInternals.owner, props ); }; @@ -556,7 +547,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 }; @@ -580,10 +571,10 @@ exports.memo = function (type, compare) { }; }; exports.startTransition = function (scope) { - 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; if (enableAsyncActions) try { var returnValue = scope(); @@ -597,13 +588,13 @@ exports.startTransition = function (scope) { } catch (error) { reportGlobalError(error); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } else try { scope(); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; } }; exports.unstable_Activity = REACT_OFFSCREEN_TYPE; @@ -613,21 +604,21 @@ 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) { if (enableAsyncActions) - return ReactCurrentDispatcher.current.useActionState( + return ReactSharedInternals.H.useActionState( action, initialState, permalink @@ -635,60 +626,60 @@ exports.useActionState = function (action, initialState, permalink) { throw Error("Not implemented."); }; 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-canary-f3e1f261"; +exports.version = "19.0.0-canary-7ccf7b86"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 156f8812b1efc..adba7d17dc418 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -4c12339ce3fa398050d1026c616ea43d43dcaf4a +d50323eb845c5fde0d720cae888bf35dedd05506 diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 5f80961dd073b..8b4ef9d240097 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<0a8d8b8854497345c20ddcfdc4519d53>> */ "use strict"; @@ -83,9 +83,7 @@ if (__DEV__) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -5417,7 +5415,6 @@ to return true:wantsResponderID| | return null; } - var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -5459,7 +5456,7 @@ to return true:wantsResponderID| | } function isMounted(component) { { - var owner = ReactCurrentOwner$3.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -6045,7 +6042,6 @@ to return true:wantsResponderID| | var objectIs = typeof Object.is === "function" ? Object.is : is; // $FlowFixMe[method-unbinding] - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { if (enableComponentStackLocations) { @@ -6106,13 +6102,13 @@ to return true:wantsResponderID| | 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(); } /** @@ -6305,7 +6301,7 @@ to return true:wantsResponderID| | reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -7535,7 +7531,6 @@ to return true:wantsResponderID| | } } - 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. @@ -7574,7 +7569,7 @@ to return true:wantsResponderID| | 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; @@ -7595,9 +7590,9 @@ to return true:wantsResponderID| | 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() { @@ -7788,7 +7783,7 @@ to return true:wantsResponderID| | // 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 ) ) { @@ -7855,11 +7850,11 @@ to return true:wantsResponderID| | 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); @@ -7874,13 +7869,13 @@ to return true:wantsResponderID| | } 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; }); @@ -8696,7 +8691,6 @@ to return true:wantsResponderID| | return true; } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -8728,14 +8722,14 @@ to return true:wantsResponderID| | 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; @@ -9110,8 +9104,6 @@ to return true:wantsResponderID| | }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -9165,8 +9157,8 @@ to return true:wantsResponderID| | 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); @@ -11256,8 +11248,6 @@ to return true:wantsResponderID| | /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -11558,17 +11548,16 @@ to return true:wantsResponderID| | { 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 @@ -11640,7 +11629,7 @@ to return true:wantsResponderID| | } // 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 = @@ -11791,7 +11780,7 @@ to return true:wantsResponderID| | hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -11821,7 +11810,7 @@ to return true:wantsResponderID| | throw new Error("Not implemented."); } - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -11861,7 +11850,7 @@ to return true:wantsResponderID| | 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) { @@ -12034,7 +12023,7 @@ to return true:wantsResponderID| | // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -12843,14 +12832,14 @@ to return true:wantsResponderID| | 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. @@ -12908,7 +12897,7 @@ to return true:wantsResponderID| | setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -13494,7 +13483,7 @@ to return true:wantsResponderID| | setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -13506,16 +13495,16 @@ to return true:wantsResponderID| | // 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); } else { - ReactCurrentBatchConfig$2.transition = null; + ReactSharedInternals.T = null; dispatchSetState(fiber, queue, pendingState); - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; } { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -13569,7 +13558,7 @@ to return true:wantsResponderID| | } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -13797,11 +13786,11 @@ to return true:wantsResponderID| | 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; } @@ -13832,7 +13821,7 @@ to return true:wantsResponderID| | // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -14093,27 +14082,25 @@ to return true:wantsResponderID| | 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) { @@ -14124,14 +14111,13 @@ to return true:wantsResponderID| | 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) { @@ -14252,27 +14238,25 @@ to return true:wantsResponderID| | 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) { @@ -14283,14 +14267,13 @@ to return true:wantsResponderID| | 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) { @@ -14404,27 +14387,25 @@ to return true:wantsResponderID| | 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) { @@ -14435,14 +14416,13 @@ to return true:wantsResponderID| | 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) { @@ -14564,27 +14544,25 @@ to return true:wantsResponderID| | 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) { @@ -14595,14 +14573,13 @@ to return true:wantsResponderID| | 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) { @@ -14735,28 +14712,26 @@ to return true:wantsResponderID| | 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) { @@ -14769,14 +14744,13 @@ to return true:wantsResponderID| | 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) { @@ -14913,28 +14887,26 @@ to return true:wantsResponderID| | 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) { @@ -14947,14 +14919,13 @@ to return true:wantsResponderID| | 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) { @@ -15091,28 +15062,26 @@ to return true:wantsResponderID| | 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) { @@ -15125,14 +15094,13 @@ to return true:wantsResponderID| | 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) { @@ -16648,8 +16616,6 @@ to return true:wantsResponderID| | 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) { @@ -16714,10 +16680,10 @@ to return true:wantsResponderID| | 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; } @@ -17259,7 +17225,6 @@ to return true:wantsResponderID| | return false; } - 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( @@ -17378,7 +17343,7 @@ to return true:wantsResponderID| | } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -17973,7 +17938,7 @@ to return true:wantsResponderID| | } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -18196,7 +18161,10 @@ to return true:wantsResponderID| | var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$2.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -19934,7 +19902,7 @@ to return true:wantsResponderID| | var newChildren; { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -21014,10 +20982,8 @@ to return true:wantsResponderID| | 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 @@ -25830,7 +25796,6 @@ to return true:wantsResponderID| | 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 @@ -25853,7 +25818,7 @@ to return true:wantsResponderID| | if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -25867,11 +25832,6 @@ to return true:wantsResponderID| | } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -26180,7 +26140,7 @@ to return true:wantsResponderID| | !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 @@ -26749,7 +26709,7 @@ to return true:wantsResponderID| | if ( executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. - !ReactCurrentActQueue.isBatchingLegacy + !ReactSharedInternals.isBatchingLegacy ) { resetRenderTimer(); flushSyncWorkOnLegacyRootsOnly(); @@ -26879,7 +26839,10 @@ to return true:wantsResponderID| | // 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 @@ -27031,8 +26994,8 @@ to return true:wantsResponderID| | } 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. @@ -27045,20 +27008,20 @@ to return true:wantsResponderID| | } 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; } } @@ -27467,7 +27430,7 @@ to return true:wantsResponderID| | } } - 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 @@ -27546,7 +27509,9 @@ to return true:wantsResponderID| | workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -27674,7 +27639,9 @@ to return true:wantsResponderID| | workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -27884,12 +27851,12 @@ to return true:wantsResponderID| | ) { // 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, @@ -27899,7 +27866,7 @@ to return true:wantsResponderID| | spawnedLane ); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -28031,14 +27998,16 @@ to return true:wantsResponderID| | 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$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 @@ -28075,7 +28044,7 @@ to return true:wantsResponderID| | 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 @@ -28259,16 +28228,16 @@ to return true:wantsResponderID| | 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) @@ -28991,7 +28960,7 @@ to return true:wantsResponderID| | { // 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); @@ -29004,7 +28973,7 @@ to return true:wantsResponderID| | function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -29038,7 +29007,7 @@ to return true:wantsResponderID| | } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -29073,7 +29042,7 @@ to return true:wantsResponderID| | if ( root.tag !== LegacyRoot && isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -30268,7 +30237,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-2732d460"; + var ReactVersion = "19.0.0-canary-ba45b8b0"; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol @@ -30887,7 +30856,6 @@ to return true:wantsResponderID| | function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -30902,7 +30870,7 @@ to return true:wantsResponderID| | setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -30925,10 +30893,9 @@ to return true:wantsResponderID| | return instanceCache.get(tag) || null; } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; function findHostInstance_DEPRECATED(componentOrHandle) { { - var owner = ReactCurrentOwner.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.stateNode !== null) { if (!owner.stateNode._warnedAboutRefsInRender) { @@ -30979,7 +30946,7 @@ to return true:wantsResponderID| | } function findNodeHandle(componentOrHandle) { { - var owner = ReactCurrentOwner.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.stateNode !== null) { if (!owner.stateNode._warnedAboutRefsInRender) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 44d776916439b..682fbb972f729 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<2aece110942a0616726b0f38c6fd0861>> */ "use strict"; @@ -3656,9 +3656,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, @@ -3692,7 +3690,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -3710,7 +3708,7 @@ function renderWithHooks( return current; } function finishRenderingHooks() { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -3736,14 +3734,14 @@ 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() { if (!enableAsyncActions) throw Error("Not implemented."); - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -3834,7 +3832,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) { @@ -4168,9 +4166,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); @@ -4203,7 +4201,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( @@ -4443,14 +4441,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { var previousPriority = currentUpdatePriority; currentUpdatePriority = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; enableAsyncActions - ? ((ReactCurrentBatchConfig$2.transition = currentTransition), + ? ((ReactSharedInternals.T = currentTransition), dispatchOptimisticSetState(fiber, !1, queue, pendingState)) - : ((ReactCurrentBatchConfig$2.transition = null), + : ((ReactSharedInternals.T = null), dispatchSetState(fiber, queue, pendingState), - (ReactCurrentBatchConfig$2.transition = currentTransition)); + (ReactSharedInternals.T = currentTransition)); try { if (enableAsyncActions) { var returnValue = callback(); @@ -4477,7 +4475,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { else throw error; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -5297,8 +5295,7 @@ function throwException( } while (null !== returnFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error( +var SelectiveHydrationException = Error( "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue." ), didReceiveUpdate = !1; @@ -5795,7 +5792,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 @@ -7007,9 +7004,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; } @@ -8947,10 +8943,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, @@ -9365,8 +9357,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; @@ -9404,13 +9396,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() { @@ -9462,8 +9454,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( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." @@ -9569,8 +9561,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; @@ -9586,7 +9578,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; @@ -9642,7 +9634,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -9729,11 +9721,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, @@ -9743,7 +9735,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -9791,13 +9783,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; @@ -9805,7 +9797,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -9852,11 +9844,11 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority; - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { @@ -9891,7 +9883,7 @@ function flushPassiveEffects() { return JSCompiler_inline_result; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -10580,7 +10572,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1099 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-0d66f5f0", + version: "19.0.0-canary-aab30f5e", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10596,7 +10588,7 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1367 = { +var internals$jscomp$inline_1366 = { bundleType: devToolsConfig$jscomp$inline_1099.bundleType, version: devToolsConfig$jscomp$inline_1099.version, rendererPackageName: devToolsConfig$jscomp$inline_1099.rendererPackageName, @@ -10610,7 +10602,7 @@ var internals$jscomp$inline_1367 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -10623,19 +10615,19 @@ var internals$jscomp$inline_1367 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-0d66f5f0" + reconcilerVersion: "19.0.0-canary-aab30f5e" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1368 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1367 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1368.isDisabled && - hook$jscomp$inline_1368.supportsFiber + !hook$jscomp$inline_1367.isDisabled && + hook$jscomp$inline_1367.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1368.inject( - internals$jscomp$inline_1367 + (rendererID = hook$jscomp$inline_1367.inject( + internals$jscomp$inline_1366 )), - (injectedHook = hook$jscomp$inline_1368); + (injectedHook = hook$jscomp$inline_1367); } catch (err) {} } exports.createPortal = function (children, containerTag) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 4fdbbba1c1944..e349e96ff04cb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<11f9b3ce7d938263affa5e40f5e350aa>> + * @generated SignedSource<<2f6df52d0f4a771089641b8f6aacfd39>> */ "use strict"; @@ -3778,9 +3778,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, @@ -3814,7 +3812,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -3832,7 +3830,7 @@ function renderWithHooks( return current; } function finishRenderingHooks() { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -3858,14 +3856,14 @@ 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() { if (!enableAsyncActions) throw Error("Not implemented."); - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -3956,7 +3954,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) { @@ -4290,9 +4288,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); @@ -4325,7 +4323,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( @@ -4565,14 +4563,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { var previousPriority = currentUpdatePriority; currentUpdatePriority = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; enableAsyncActions - ? ((ReactCurrentBatchConfig$2.transition = currentTransition), + ? ((ReactSharedInternals.T = currentTransition), dispatchOptimisticSetState(fiber, !1, queue, pendingState)) - : ((ReactCurrentBatchConfig$2.transition = null), + : ((ReactSharedInternals.T = null), dispatchSetState(fiber, queue, pendingState), - (ReactCurrentBatchConfig$2.transition = currentTransition)); + (ReactSharedInternals.T = currentTransition)); try { if (enableAsyncActions) { var returnValue = callback(); @@ -4599,7 +4597,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { else throw error; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -5490,8 +5488,7 @@ function throwException( } while (null !== returnFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error( +var SelectiveHydrationException = Error( "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue." ), didReceiveUpdate = !1; @@ -5994,7 +5991,7 @@ function finishClassComponent( bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); shouldUpdate = workInProgress.stateNode; - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; if ( didCaptureError && "function" !== typeof Component.getDerivedStateFromError @@ -7237,9 +7234,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; } @@ -9474,10 +9470,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, @@ -9897,8 +9889,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; @@ -9965,13 +9957,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() { @@ -10033,8 +10025,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( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." @@ -10151,8 +10143,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 ( @@ -10182,7 +10174,7 @@ function performUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate, @@ -10241,7 +10233,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -10337,11 +10329,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, @@ -10351,7 +10343,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -10402,13 +10394,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); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); @@ -10423,7 +10415,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else (root.current = finishedWork), (commitTime = now()); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -10473,11 +10465,11 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority; - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { @@ -10561,7 +10553,7 @@ function flushPassiveEffects() { return JSCompiler_inline_result; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -11285,7 +11277,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1179 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-canary-50a9e045", + version: "19.0.0-canary-c33d2f1a", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11328,7 +11320,7 @@ var roots = new Map(), setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -11341,7 +11333,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-50a9e045" + reconcilerVersion: "19.0.0-canary-c33d2f1a" }); exports.createPortal = function (children, containerTag) { return createPortal$1( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 3783b420255c9..7a17bd889b903 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -83,9 +83,7 @@ if (__DEV__) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { - var ReactDebugCurrentFrame = - ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); + var stack = ReactSharedInternals.getStackAddendum(); if (stack !== "") { format += "%s"; @@ -3131,7 +3129,6 @@ to return true:wantsResponderID| | var StaticMask = LayoutStatic | PassiveStatic | RefStatic | MaySuspendCommit; - var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; function getNearestMountedFiber(fiber) { var node = fiber; var nearestMounted = fiber; @@ -3173,7 +3170,7 @@ to return true:wantsResponderID| | } function isMounted(component) { { - var owner = ReactCurrentOwner$3.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.tag === ClassComponent) { var ownerFiber = owner; @@ -6340,7 +6337,6 @@ to return true:wantsResponderID| | var objectIs = typeof Object.is === "function" ? Object.is : is; // $FlowFixMe[method-unbinding] - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher; var prefix; function describeBuiltInComponentFrame(name) { if (enableComponentStackLocations) { @@ -6401,13 +6397,13 @@ to return true:wantsResponderID| | 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(); } /** @@ -6600,7 +6596,7 @@ to return true:wantsResponderID| | reentry = false; { - ReactCurrentDispatcher$2.current = previousDispatcher; + ReactSharedInternals.H = previousDispatcher; reenableLogs(); } @@ -7830,7 +7826,6 @@ to return true:wantsResponderID| | } } - 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. @@ -7869,7 +7864,7 @@ to return true:wantsResponderID| | 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; @@ -7890,9 +7885,9 @@ to return true:wantsResponderID| | 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() { @@ -8083,7 +8078,7 @@ to return true:wantsResponderID| | // 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 ) ) { @@ -8150,11 +8145,11 @@ to return true:wantsResponderID| | 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); @@ -8169,13 +8164,13 @@ to return true:wantsResponderID| | } 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; }); @@ -8967,7 +8962,6 @@ to return true:wantsResponderID| | return true; } - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var current = null; var isRendering = false; function getCurrentFiberOwnerNameInDevOrNull() { @@ -8999,14 +8993,14 @@ to return true:wantsResponderID| | 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; @@ -9381,8 +9375,6 @@ to return true:wantsResponderID| | }; } - var ReactCurrentActQueue$3 = ReactSharedInternals.ReactCurrentActQueue; - function getThenablesFromState(state) { { var devState = state; @@ -9436,8 +9428,8 @@ to return true:wantsResponderID| | 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); @@ -11527,8 +11519,6 @@ to return true:wantsResponderID| | /* */ 8; - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig; var didWarnAboutMismatchedHooksForComponent; var didWarnUncachedGetSnapshot; var didWarnAboutUseWrappedInTryCatch; @@ -11829,17 +11819,16 @@ to return true:wantsResponderID| | { 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 @@ -11911,7 +11900,7 @@ to return true:wantsResponderID| | } // 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 = @@ -12062,7 +12051,7 @@ to return true:wantsResponderID| | hookTypesUpdateIndexDev = -1; } - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; + ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV; children = Component(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); @@ -12092,7 +12081,7 @@ to return true:wantsResponderID| | throw new Error("Not implemented."); } - var dispatcher = ReactCurrentDispatcher$1.current; + var dispatcher = ReactSharedInternals.H; var _dispatcher$useState = dispatcher.useState(), maybeThenable = _dispatcher$useState[0]; @@ -12132,7 +12121,7 @@ to return true:wantsResponderID| | 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) { @@ -12305,7 +12294,7 @@ to return true:wantsResponderID| | // time (perhaps because it threw). Subsequent Hook calls should use the // mount dispatcher. { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; + ReactSharedInternals.H = HooksDispatcherOnMountInDEV; } } @@ -13114,14 +13103,14 @@ to return true:wantsResponderID| | 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. @@ -13179,7 +13168,7 @@ to return true:wantsResponderID| | setState(rejectedThenable); finishRunningActionStateAction(actionQueue, setPendingState, setState); } finally { - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -13765,7 +13754,7 @@ to return true:wantsResponderID| | setCurrentUpdatePriority( higherEventPriority(previousPriority, ContinuousEventPriority) ); - var prevTransition = ReactCurrentBatchConfig$2.transition; + var prevTransition = ReactSharedInternals.T; var currentTransition = { _callbacks: new Set() }; @@ -13777,16 +13766,16 @@ to return true:wantsResponderID| | // 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); } else { - ReactCurrentBatchConfig$2.transition = null; + ReactSharedInternals.T = null; dispatchSetState(fiber, queue, pendingState); - ReactCurrentBatchConfig$2.transition = currentTransition; + ReactSharedInternals.T = currentTransition; } { - ReactCurrentBatchConfig$2.transition._updatedFibers = new Set(); + currentTransition._updatedFibers = new Set(); } try { @@ -13840,7 +13829,7 @@ to return true:wantsResponderID| | } } finally { setCurrentUpdatePriority(previousPriority); - ReactCurrentBatchConfig$2.transition = prevTransition; + ReactSharedInternals.T = prevTransition; { if (prevTransition === null && currentTransition._updatedFibers) { @@ -14068,11 +14057,11 @@ to return true:wantsResponderID| | 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; } @@ -14103,7 +14092,7 @@ to return true:wantsResponderID| | // Suppress the error. It will throw again in the render phase. } finally { { - ReactCurrentDispatcher$1.current = prevDispatcher; + ReactSharedInternals.H = prevDispatcher; } } } @@ -14364,27 +14353,25 @@ to return true:wantsResponderID| | 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) { @@ -14395,14 +14382,13 @@ to return true:wantsResponderID| | 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) { @@ -14523,27 +14509,25 @@ to return true:wantsResponderID| | 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) { @@ -14554,14 +14538,13 @@ to return true:wantsResponderID| | 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) { @@ -14675,27 +14658,25 @@ to return true:wantsResponderID| | 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) { @@ -14706,14 +14687,13 @@ to return true:wantsResponderID| | 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) { @@ -14835,27 +14815,25 @@ to return true:wantsResponderID| | 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) { @@ -14866,14 +14844,13 @@ to return true:wantsResponderID| | 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) { @@ -15006,28 +14983,26 @@ to return true:wantsResponderID| | 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) { @@ -15040,14 +15015,13 @@ to return true:wantsResponderID| | 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) { @@ -15184,28 +15158,26 @@ to return true:wantsResponderID| | 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) { @@ -15218,14 +15190,13 @@ to return true:wantsResponderID| | 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) { @@ -15362,28 +15333,26 @@ to return true:wantsResponderID| | 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) { @@ -15396,14 +15365,13 @@ to return true:wantsResponderID| | 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) { @@ -16919,8 +16887,6 @@ to return true:wantsResponderID| | 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) { @@ -16985,10 +16951,10 @@ to return true:wantsResponderID| | 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; } @@ -17530,7 +17496,6 @@ to return true:wantsResponderID| | return false; } - 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( @@ -17649,7 +17614,7 @@ to return true:wantsResponderID| | } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -18244,7 +18209,7 @@ to return true:wantsResponderID| | } { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); nextChildren = renderWithHooks( current, @@ -18467,7 +18432,10 @@ to return true:wantsResponderID| | var instance = workInProgress.stateNode; // Rerender - ReactCurrentOwner$2.current = workInProgress; + { + ReactSharedInternals.owner = workInProgress; + } + var nextChildren; if ( @@ -20205,7 +20173,7 @@ to return true:wantsResponderID| | var newChildren; { - ReactCurrentOwner$2.current = workInProgress; + ReactSharedInternals.owner = workInProgress; setIsRendering(true); newChildren = render(newValue); setIsRendering(false); @@ -21284,10 +21252,8 @@ to return true:wantsResponderID| | 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 @@ -26268,7 +26234,6 @@ to return true:wantsResponderID| | 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 @@ -26293,7 +26258,7 @@ to return true:wantsResponderID| | if ( !isReactActEnvironmentGlobal && - ReactCurrentActQueue$1.current !== null + ReactSharedInternals.actQueue !== null ) { // TODO: Include link to relevant documentation page. error( @@ -26307,11 +26272,6 @@ to return true:wantsResponderID| | } var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var ReactCurrentCache = ReactSharedInternals.ReactCurrentCache; - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue; var NoContext = /* */ 0; @@ -26620,7 +26580,7 @@ to return true:wantsResponderID| | !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 @@ -27189,7 +27149,7 @@ to return true:wantsResponderID| | if ( executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode. - !ReactCurrentActQueue.isBatchingLegacy + !ReactSharedInternals.isBatchingLegacy ) { resetRenderTimer(); flushSyncWorkOnLegacyRootsOnly(); @@ -27319,7 +27279,10 @@ to return true:wantsResponderID| | // 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 @@ -27471,8 +27434,8 @@ to return true:wantsResponderID| | } 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. @@ -27485,20 +27448,20 @@ to return true:wantsResponderID| | } 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; } } @@ -27907,7 +27870,7 @@ to return true:wantsResponderID| | } } - 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 @@ -27986,7 +27949,9 @@ to return true:wantsResponderID| | workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function replaySuspendedUnitOfWork(unitOfWork) { @@ -28114,7 +28079,9 @@ to return true:wantsResponderID| | workInProgress = next; } - ReactCurrentOwner$1.current = null; + { + ReactSharedInternals.owner = null; + } } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { @@ -28324,12 +28291,12 @@ to return true:wantsResponderID| | ) { // 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, @@ -28339,7 +28306,7 @@ to return true:wantsResponderID| | spawnedLane ); } finally { - ReactCurrentBatchConfig.transition = prevTransition; + ReactSharedInternals.T = prevTransition; setCurrentUpdatePriority(previousUpdateLanePriority); } @@ -28471,14 +28438,16 @@ to return true:wantsResponderID| | 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$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 @@ -28515,7 +28484,7 @@ to return true:wantsResponderID| | 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 @@ -28699,16 +28668,16 @@ to return true:wantsResponderID| | 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) @@ -29431,7 +29400,7 @@ to return true:wantsResponderID| | { // 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); @@ -29444,7 +29413,7 @@ to return true:wantsResponderID| | function shouldForceFlushFallbacksInDEV() { // Never force flush in production. This function should get stripped out. - return ReactCurrentActQueue.current !== null; + return ReactSharedInternals.actQueue !== null; } function warnIfUpdatesNotWrappedWithActDEV(fiber) { @@ -29478,7 +29447,7 @@ to return true:wantsResponderID| | } } - if (ReactCurrentActQueue.current === null) { + if (ReactSharedInternals.actQueue === null) { var previousFiber = current; try { @@ -29513,7 +29482,7 @@ to return true:wantsResponderID| | if ( root.tag !== LegacyRoot && isConcurrentActEnvironment() && - ReactCurrentActQueue.current === null + ReactSharedInternals.actQueue === null ) { error( "A suspended resource finished loading inside a test, but the event " + @@ -30708,7 +30677,7 @@ to return true:wantsResponderID| | return root; } - var ReactVersion = "19.0.0-canary-f244dd57"; + var ReactVersion = "19.0.0-canary-e9c8d4c9"; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol @@ -31327,7 +31296,6 @@ to return true:wantsResponderID| | function injectIntoDevTools(devToolsConfig) { var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; return injectInternals({ bundleType: devToolsConfig.bundleType, version: devToolsConfig.version, @@ -31342,7 +31310,7 @@ to return true:wantsResponderID| | setErrorHandler: setErrorHandler, setSuspenseHandler: setSuspenseHandler, scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: findHostInstanceByFiber, findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, @@ -31359,10 +31327,9 @@ to return true:wantsResponderID| | }); } - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; function findHostInstance_DEPRECATED(componentOrHandle) { { - var owner = ReactCurrentOwner.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.stateNode !== null) { if (!owner.stateNode._warnedAboutRefsInRender) { @@ -31413,7 +31380,7 @@ to return true:wantsResponderID| | } function findNodeHandle(componentOrHandle) { { - var owner = ReactCurrentOwner.current; + var owner = ReactSharedInternals.owner; if (owner !== null && owner.stateNode !== null) { if (!owner.stateNode._warnedAboutRefsInRender) { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 6677bcf3f8a49..df7b924957c58 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<78175246ead1a1bfe578c85bb5fb349a>> + * @generated SignedSource<> */ "use strict"; @@ -3709,9 +3709,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, @@ -3745,7 +3743,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -3763,7 +3761,7 @@ function renderWithHooks( return current; } function finishRenderingHooks() { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -3789,14 +3787,14 @@ 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() { if (!enableAsyncActions) throw Error("Not implemented."); - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -3887,7 +3885,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) { @@ -4221,9 +4219,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); @@ -4256,7 +4254,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( @@ -4496,14 +4494,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { var previousPriority = currentUpdatePriority; currentUpdatePriority = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; enableAsyncActions - ? ((ReactCurrentBatchConfig$2.transition = currentTransition), + ? ((ReactSharedInternals.T = currentTransition), dispatchOptimisticSetState(fiber, !1, queue, pendingState)) - : ((ReactCurrentBatchConfig$2.transition = null), + : ((ReactSharedInternals.T = null), dispatchSetState(fiber, queue, pendingState), - (ReactCurrentBatchConfig$2.transition = currentTransition)); + (ReactSharedInternals.T = currentTransition)); try { if (enableAsyncActions) { var returnValue = callback(); @@ -4530,7 +4528,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { else throw error; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -5350,8 +5348,7 @@ function throwException( } while (null !== returnFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error( +var SelectiveHydrationException = Error( "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue." ), didReceiveUpdate = !1; @@ -5848,7 +5845,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 @@ -7060,9 +7057,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; } @@ -9157,10 +9153,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, @@ -9577,8 +9569,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; @@ -9616,13 +9608,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() { @@ -9674,8 +9666,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( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." @@ -9781,8 +9773,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; @@ -9798,7 +9790,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; @@ -9854,7 +9846,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -9941,11 +9933,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, @@ -9955,7 +9947,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -10003,13 +9995,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; @@ -10017,7 +10009,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else root.current = finishedWork; rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -10064,11 +10056,11 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority; - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { @@ -10103,7 +10095,7 @@ function flushPassiveEffects() { return JSCompiler_inline_result; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -10799,7 +10791,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1168 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-3e69835e", + version: "19.0.0-canary-426576e1", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10815,7 +10807,7 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1453 = { +var internals$jscomp$inline_1452 = { bundleType: devToolsConfig$jscomp$inline_1168.bundleType, version: devToolsConfig$jscomp$inline_1168.version, rendererPackageName: devToolsConfig$jscomp$inline_1168.rendererPackageName, @@ -10829,7 +10821,7 @@ var internals$jscomp$inline_1453 = { setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -10842,19 +10834,19 @@ var internals$jscomp$inline_1453 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-3e69835e" + reconcilerVersion: "19.0.0-canary-426576e1" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1454 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1453 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1454.isDisabled && - hook$jscomp$inline_1454.supportsFiber + !hook$jscomp$inline_1453.isDisabled && + hook$jscomp$inline_1453.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1454.inject( - internals$jscomp$inline_1453 + (rendererID = hook$jscomp$inline_1453.inject( + internals$jscomp$inline_1452 )), - (injectedHook = hook$jscomp$inline_1454); + (injectedHook = hook$jscomp$inline_1453); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 8625458b9b27f..24cfe7aeb4dea 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<246ff222d964caca595687a09c5fa75f>> + * @generated SignedSource<<2934352e960aa81c300ffcd8ccccd03f>> */ "use strict"; @@ -3831,9 +3831,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, @@ -3867,7 +3865,7 @@ function renderWithHooks( workInProgress.memoizedState = null; workInProgress.updateQueue = null; workInProgress.lanes = 0; - ReactCurrentDispatcher$1.current = + ReactSharedInternals.H = null === current || null === current.memoizedState ? HooksDispatcherOnMount : HooksDispatcherOnUpdate; @@ -3885,7 +3883,7 @@ function renderWithHooks( return current; } function finishRenderingHooks() { - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; + ReactSharedInternals.H = ContextOnlyDispatcher; var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next; renderLanes = 0; workInProgressHook = currentHook = currentlyRenderingFiber$1 = null; @@ -3911,14 +3909,14 @@ 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() { if (!enableAsyncActions) throw Error("Not implemented."); - var maybeThenable = ReactCurrentDispatcher$1.current.useState()[0]; + var maybeThenable = ReactSharedInternals.H.useState()[0]; return "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable; @@ -4009,7 +4007,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) { @@ -4343,9 +4341,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); @@ -4378,7 +4376,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( @@ -4618,14 +4616,14 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { var previousPriority = currentUpdatePriority; currentUpdatePriority = 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8; - var prevTransition = ReactCurrentBatchConfig$2.transition, + var prevTransition = ReactSharedInternals.T, currentTransition = { _callbacks: new Set() }; enableAsyncActions - ? ((ReactCurrentBatchConfig$2.transition = currentTransition), + ? ((ReactSharedInternals.T = currentTransition), dispatchOptimisticSetState(fiber, !1, queue, pendingState)) - : ((ReactCurrentBatchConfig$2.transition = null), + : ((ReactSharedInternals.T = null), dispatchSetState(fiber, queue, pendingState), - (ReactCurrentBatchConfig$2.transition = currentTransition)); + (ReactSharedInternals.T = currentTransition)); try { if (enableAsyncActions) { var returnValue = callback(); @@ -4652,7 +4650,7 @@ function startTransition(fiber, queue, pendingState, finishedState, callback) { else throw error; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig$2.transition = prevTransition); + (ReactSharedInternals.T = prevTransition); } } function useHostTransitionStatus() { @@ -5543,8 +5541,7 @@ function throwException( } while (null !== returnFiber); return !1; } -var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner, - SelectiveHydrationException = Error( +var SelectiveHydrationException = Error( "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue." ), didReceiveUpdate = !1; @@ -6047,7 +6044,7 @@ function finishClassComponent( bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) ); shouldUpdate = workInProgress.stateNode; - ReactCurrentOwner$1.current = workInProgress; + ReactSharedInternals.owner = workInProgress; if ( didCaptureError && "function" !== typeof Component.getDerivedStateFromError @@ -7290,9 +7287,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; } @@ -9685,10 +9681,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, @@ -10110,8 +10102,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; @@ -10178,13 +10170,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() { @@ -10246,8 +10238,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( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." @@ -10364,8 +10356,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 ( @@ -10395,7 +10387,7 @@ function performUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function replaySuspendedUnitOfWork(unitOfWork) { var current = unitOfWork.alternate, @@ -10454,7 +10446,7 @@ function replaySuspendedUnitOfWork(unitOfWork) { null === current ? completeUnitOfWork(unitOfWork) : (workInProgress = current); - ReactCurrentOwner.current = null; + ReactSharedInternals.owner = null; } function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) { resetContextDependencies(); @@ -10550,11 +10542,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, @@ -10564,7 +10556,7 @@ function commitRoot( spawnedLane ); } finally { - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), (currentUpdatePriority = previousUpdateLanePriority); } return null; @@ -10615,13 +10607,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); commitTime = now(); commitMutationEffects(root, finishedWork, lanes); @@ -10636,7 +10628,7 @@ function commitRootImpl( requestPaint(); executionContext = prevExecutionContext; currentUpdatePriority = spawnedLane; - ReactCurrentBatchConfig.transition = transitions; + ReactSharedInternals.T = transitions; } else (root.current = finishedWork), (commitTime = now()); rootDoesHavePassiveEffects ? ((rootDoesHavePassiveEffects = !1), @@ -10686,11 +10678,11 @@ function flushPassiveEffects() { remainingLanes = pendingPassiveEffectsRemainingLanes; pendingPassiveEffectsRemainingLanes = 0; var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes), - prevTransition = ReactCurrentBatchConfig.transition, + prevTransition = ReactSharedInternals.T, previousPriority = currentUpdatePriority; try { currentUpdatePriority = 32 > renderPriority ? 32 : renderPriority; - ReactCurrentBatchConfig.transition = null; + ReactSharedInternals.T = null; if (null === rootWithPendingPassiveEffects) var JSCompiler_inline_result = !1; else { @@ -10774,7 +10766,7 @@ function flushPassiveEffects() { return JSCompiler_inline_result; } finally { (currentUpdatePriority = previousPriority), - (ReactCurrentBatchConfig.transition = prevTransition), + (ReactSharedInternals.T = prevTransition), releaseRootPooledCache(root, remainingLanes); } } @@ -11505,7 +11497,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1248 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-canary-1ddc5337", + version: "19.0.0-canary-4c230c9b", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11548,7 +11540,7 @@ var roots = new Map(), setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher, + currentDispatcherRef: ReactSharedInternals, findHostInstanceByFiber: function (fiber) { fiber = findCurrentHostFiber(fiber); return null === fiber ? null : fiber.stateNode; @@ -11561,7 +11553,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-canary-1ddc5337" + reconcilerVersion: "19.0.0-canary-4c230c9b" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {