diff --git a/compiled-rn/VERSION_NATIVE_FB b/compiled-rn/VERSION_NATIVE_FB index a43c94cd7c..fe0a01e222 100644 --- a/compiled-rn/VERSION_NATIVE_FB +++ b/compiled-rn/VERSION_NATIVE_FB @@ -1 +1 @@ -19.0.0-native-fb-def67b9b32-20240603 \ No newline at end of file +19.0.0-native-fb-67b05be0d2-20240603 \ No newline at end of file diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js index bb82932645..16dd2d5b71 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<4f0513af0083cee8a14124a1d29b9df1>> + * @generated SignedSource<<296ca7b82c0faacaf7aac3a6e16abd82>> */ 'use strict'; @@ -8612,112 +8612,148 @@ function dispatchActionState(fiber, actionQueue, setPendingState, setState, payl throw new Error('Cannot update form state while rendering.'); } + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + // circular + isTransition: true, + status: 'pending', + value: null, + reason: null, + listeners: [], + then: function (listener) { + // We know the only thing that subscribes to these promises is `use` so + // this implementation is simpler than a generic thenable. E.g. we don't + // bother to check if the thenable is still pending because `use` already + // does that. + actionNode.listeners.push(listener); + } + }; // Check if we're inside a transition. If so, we'll need to restore the + // transition context when the action is run. + + var prevTransition = ReactSharedInternals.T; + + if (prevTransition !== null) { + // Optimistically update the pending state, similar to useTransition. + // This will be reverted automatically when all actions are finished. + setPendingState(true); // `actionNode` is a thenable that resolves to the return value of + // the action. + + setState(actionNode); + } else { + // This is not a transition. + actionNode.isTransition = false; + setState(actionNode); + } + var last = actionQueue.pending; if (last === null) { // There are no pending actions; this is the first one. We can run // it immediately. - var newLast = { - payload: payload, - action: actionQueue.action, - next: null // circular - - }; - newLast.next = actionQueue.pending = newLast; - runActionStateAction(actionQueue, setPendingState, setState, newLast); + actionNode.next = actionQueue.pending = actionNode; + runActionStateAction(actionQueue, actionNode); } else { // There's already an action running. Add to the queue. var first = last.next; - var _newLast = { - payload: payload, - action: actionQueue.action, - next: first - }; - actionQueue.pending = last.next = _newLast; + actionNode.next = first; + actionQueue.pending = last.next = actionNode; } } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - // This is a fork of startTransition - var prevTransition = ReactSharedInternals.T; - var currentTransition = {}; - ReactSharedInternals.T = currentTransition; - - { - ReactSharedInternals.T._updatedFibers = new Set(); - } // Optimistically update the pending state, similar to useTransition. - // This will be reverted automatically when all actions are finished. - - - setPendingState(true); // `node.action` represents the action function at the time it was dispatched. +function runActionStateAction(actionQueue, node) { + // `node.action` represents the action function at the time it was dispatched. // If this action was queued, it might be stale, i.e. it's not necessarily the // most current implementation of the action, stored on `actionQueue`. This is // intentional. The conceptual model for queued actions is that they are // queued in a remote worker; the dispatch happens immediately, only the // execution is delayed. - var action = node.action; var payload = node.payload; var prevState = actionQueue.state; - try { - var returnValue = action(prevState, payload); - var onStartTransitionFinish = ReactSharedInternals.S; - - if (onStartTransitionFinish !== null) { - onStartTransitionFinish(currentTransition, returnValue); - } - - if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding] - typeof returnValue.then === 'function') { - var thenable = returnValue; // Attach a listener to read the return state of the action. As soon as - // this resolves, we can run the next action in the sequence. - - thenable.then(function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction(actionQueue, setPendingState, setState); - }, function () { - return finishRunningActionStateAction(actionQueue, setPendingState, setState); - }); - setState(thenable); - } else { - setState(returnValue); - var nextState = returnValue; - actionQueue.state = nextState; - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } - } catch (error) { - // This is a trick to get the `useActionState` hook to rethrow the error. - // When it unwraps the thenable with the `use` algorithm, the error - // will be thrown. - var rejectedThenable = { - then: function () {}, - status: 'rejected', - reason: error // $FlowFixMe: Not sure why this doesn't work - - }; - setState(rejectedThenable); - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; + if (node.isTransition) { + // The original dispatch was part of a transition. We restore its + // transition context here. + // This is a fork of startTransition + var prevTransition = ReactSharedInternals.T; + var currentTransition = {}; + ReactSharedInternals.T = currentTransition; { - if (prevTransition === null && currentTransition._updatedFibers) { - var updatedFibersCount = currentTransition._updatedFibers.size; + ReactSharedInternals.T._updatedFibers = new Set(); + } - currentTransition._updatedFibers.clear(); + try { + var returnValue = action(prevState, payload); + var onStartTransitionFinish = ReactSharedInternals.S; - if (updatedFibersCount > 10) { - warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); + if (onStartTransitionFinish !== null) { + onStartTransitionFinish(currentTransition, returnValue); + } + + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + + { + if (prevTransition === null && currentTransition._updatedFibers) { + var updatedFibersCount = currentTransition._updatedFibers.size; + + currentTransition._updatedFibers.clear(); + + if (updatedFibersCount > 10) { + warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); + } } } } + } else { + // The original dispatch was not part of a transition. + try { + var _returnValue = action(prevState, payload); + + handleActionReturnValue(actionQueue, node, _returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } } } -function finishRunningActionStateAction(actionQueue, setPendingState, setState) { - // The action finished running. Pop it from the queue and run the next pending - // action, if there are any. +function handleActionReturnValue(actionQueue, node, returnValue) { + if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding] + typeof returnValue.then === 'function') { + var thenable = returnValue; // Attach a listener to read the return state of the action. As soon as + // this resolves, we can run the next action in the sequence. + + thenable.then(function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, function (error) { + return onActionError(actionQueue, node, error); + }); + + { + if (!node.isTransition) { + error('An async function was passed to useActionState, but it was ' + 'dispatched outside of an action context. This is likely not ' + 'what you intended. Either pass the dispatch function to an ' + '`action` prop, or dispatch manually inside `startTransition`'); + } + } + } else { + var nextState = returnValue; + onActionSuccess(actionQueue, node, nextState); + } +} + +function onActionSuccess(actionQueue, actionNode, nextState) { + // The action finished running. + actionNode.status = 'fulfilled'; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; // Pop the action from the queue and run the next pending action, if there + // are any. + var last = actionQueue.pending; if (last !== null) { @@ -8731,11 +8767,48 @@ function finishRunningActionStateAction(actionQueue, setPendingState, setState) var next = first.next; last.next = next; // Run the next action. - runActionStateAction(actionQueue, setPendingState, setState, next); + runActionStateAction(actionQueue, next); } } } +function onActionError(actionQueue, actionNode, error) { + actionNode.status = 'rejected'; + actionNode.reason = error; + notifyActionListeners(actionNode); // Pop the action from the queue and run the next pending action, if there + // are any. + // TODO: We should instead abort all the remaining actions in the queue. + + var last = actionQueue.pending; + + if (last !== null) { + var first = last.next; + + if (first === last) { + // This was the last action in the queue. + actionQueue.pending = null; + } else { + // Remove the first node from the circular queue. + var next = first.next; + last.next = next; // Run the next action. + + runActionStateAction(actionQueue, next); + } + } +} + +function notifyActionListeners(actionNode) { + // Notify React that the action has finished. + var listeners = actionNode.listeners; + + for (var i = 0; i < listeners.length; i++) { + // This is always a React internal listener, so we don't need to worry + // about it throwing. + var listener = listeners[i]; + listener(); + } +} + function actionStateReducer(oldState, newState) { return newState; } @@ -23495,7 +23568,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-def67b9b32-20240603'; +var ReactVersion = '19.0.0-rc-67b05be0d2-20240603'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js index 29a7219914..ea9e6e75ee 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9b8239d17d00b364225b2a367a7729a5>> + * @generated SignedSource<<8797f6b701596391f0ce6aaf8dbd0345>> */ "use strict"; @@ -2776,72 +2776,101 @@ function dispatchActionState( ) { if (isRenderPhaseUpdate(fiber)) throw Error("Cannot update form state while rendering."); + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + isTransition: !0, + status: "pending", + value: null, + reason: null, + listeners: [], + then: function (listener) { + actionNode.listeners.push(listener); + } + }; + null !== ReactSharedInternals.T + ? setPendingState(!0) + : (actionNode.isTransition = !1); + setState(actionNode); fiber = actionQueue.pending; null === fiber - ? ((payload = { payload: payload, action: actionQueue.action, next: null }), - (payload.next = actionQueue.pending = payload), - runActionStateAction(actionQueue, setPendingState, setState, payload)) - : (actionQueue.pending = fiber.next = - { payload: payload, action: actionQueue.action, next: fiber.next }); + ? ((actionNode.next = actionQueue.pending = actionNode), + runActionStateAction(actionQueue, actionNode)) + : ((actionNode.next = fiber.next), + (actionQueue.pending = fiber.next = actionNode)); } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - setPendingState(!0); - var action = node.action; - node = node.payload; - var prevState = actionQueue.state; - try { - var returnValue = action(prevState, node), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ? (returnValue.then( - function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - }, - function () { - return finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - } - ), - setState(returnValue)) - : (setState(returnValue), - (actionQueue.state = returnValue), - finishRunningActionStateAction(actionQueue, setPendingState, setState)); - } catch (error) { - setState({ then: function () {}, status: "rejected", reason: error }), - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; - } +function runActionStateAction(actionQueue, node) { + var action = node.action, + payload = node.payload, + prevState = actionQueue.state; + if (node.isTransition) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + try { + var returnValue = action(prevState, payload), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + } + } else + try { + (prevTransition = action(prevState, payload)), + handleActionReturnValue(actionQueue, node, prevTransition); + } catch (error$31) { + onActionError(actionQueue, node, error$31); + } } -function finishRunningActionStateAction( - actionQueue, - setPendingState, - setState -) { - var last = actionQueue.pending; - if (null !== last) { - var first = last.next; - first === last +function handleActionReturnValue(actionQueue, node, returnValue) { + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then + ? returnValue.then( + function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, + function (error) { + return onActionError(actionQueue, node, error); + } + ) + : onActionSuccess(actionQueue, node, returnValue); +} +function onActionSuccess(actionQueue, actionNode, nextState) { + actionNode.status = "fulfilled"; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; + actionNode = actionQueue.pending; + null !== actionNode && + ((nextState = actionNode.next), + nextState === actionNode ? (actionQueue.pending = null) - : ((first = first.next), - (last.next = first), - runActionStateAction(actionQueue, setPendingState, setState, first)); - } + : ((nextState = nextState.next), + (actionNode.next = nextState), + runActionStateAction(actionQueue, nextState))); +} +function onActionError(actionQueue, actionNode, error) { + actionNode.status = "rejected"; + actionNode.reason = error; + notifyActionListeners(actionNode); + actionNode = actionQueue.pending; + null !== actionNode && + ((error = actionNode.next), + error === actionNode + ? (actionQueue.pending = null) + : ((error = error.next), + (actionNode.next = error), + runActionStateAction(actionQueue, error))); +} +function notifyActionListeners(actionNode) { + actionNode = actionNode.listeners; + for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); } function actionStateReducer(oldState, newState) { return newState; @@ -3641,9 +3670,9 @@ function resolveClassComponentProps( } if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$32 in Component) - void 0 === newProps[propName$32] && - (newProps[propName$32] = Component[propName$32]); + for (var propName$33 in Component) + void 0 === newProps[propName$33] && + (newProps[propName$33] = Component[propName$33]); } return newProps; } @@ -5658,14 +5687,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$71 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$71 = lastTailNode), + for (var lastTailNode$72 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$72 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$71 + null === lastTailNode$72 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$71.sibling = null); + : (lastTailNode$72.sibling = null); } } function bubbleProperties(completedWork) { @@ -5675,19 +5704,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$72 = completedWork.child; null !== child$72; ) - (newChildLanes |= child$72.lanes | child$72.childLanes), - (subtreeFlags |= child$72.subtreeFlags & 31457280), - (subtreeFlags |= child$72.flags & 31457280), - (child$72.return = completedWork), - (child$72 = child$72.sibling); + for (var child$73 = completedWork.child; null !== child$73; ) + (newChildLanes |= child$73.lanes | child$73.childLanes), + (subtreeFlags |= child$73.subtreeFlags & 31457280), + (subtreeFlags |= child$73.flags & 31457280), + (child$73.return = completedWork), + (child$73 = child$73.sibling); else - for (child$72 = completedWork.child; null !== child$72; ) - (newChildLanes |= child$72.lanes | child$72.childLanes), - (subtreeFlags |= child$72.subtreeFlags), - (subtreeFlags |= child$72.flags), - (child$72.return = completedWork), - (child$72 = child$72.sibling); + for (child$73 = completedWork.child; null !== child$73; ) + (newChildLanes |= child$73.lanes | child$73.childLanes), + (subtreeFlags |= child$73.subtreeFlags), + (subtreeFlags |= child$73.flags), + (child$73.return = completedWork), + (child$73 = child$73.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -5850,11 +5879,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$76 = null; + var cache$77 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$76 = newProps.memoizedState.cachePool.pool); - cache$76 !== index && (newProps.flags |= 2048); + (cache$77 = newProps.memoizedState.cachePool.pool); + cache$77 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -5879,8 +5908,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$76 = index.rendering; - if (null === cache$76) + cache$77 = index.rendering; + if (null === cache$77) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -5888,11 +5917,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$76 = findFirstSuspended(current); - if (null !== cache$76) { + cache$77 = findFirstSuspended(current); + if (null !== cache$77) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$76.updateQueue; + current = cache$77.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -5917,7 +5946,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$76)), null !== current)) { + if (((current = findFirstSuspended(cache$77)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -5927,7 +5956,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$76.alternate) + !cache$77.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -5939,13 +5968,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$76.sibling = workInProgress.child), - (workInProgress.child = cache$76)) + ? ((cache$77.sibling = workInProgress.child), + (workInProgress.child = cache$77)) : ((current = index.last), null !== current - ? (current.sibling = cache$76) - : (workInProgress.child = cache$76), - (index.last = cache$76)); + ? (current.sibling = cache$77) + : (workInProgress.child = cache$77), + (index.last = cache$77)); } if (null !== index.tail) return ( @@ -6167,8 +6196,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$92) { - captureCommitPhaseError(current, nearestMountedAncestor, error$92); + } catch (error$93) { + captureCommitPhaseError(current, nearestMountedAncestor, error$93); } else ref.current = null; } @@ -6275,10 +6304,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$93 = effect.create, + var create$94 = effect.create, inst = effect.inst; - create$93 = create$93(); - inst.destroy = create$93; + create$94 = create$94(); + inst.destroy = create$94; } effect = effect.next; } while (effect !== finishedWork); @@ -6333,11 +6362,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$94) { + } catch (error$95) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$94 + error$95 ); } } @@ -6712,8 +6741,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$102) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$102); + } catch (error$103) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$103); } } break; @@ -6750,8 +6779,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { var type = finishedWork.type; try { (flags.type = type), (flags.props = existingHiddenCallbacks); - } catch (error$105) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$105); + } catch (error$106) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$106); } } break; @@ -6767,8 +6796,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { existingHiddenCallbacks = finishedWork.memoizedProps; try { flags.text = existingHiddenCallbacks; - } catch (error$106) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$106); + } catch (error$107) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$107); } } break; @@ -6854,11 +6883,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { wasHidden.stateNode.isHidden = existingHiddenCallbacks ? !0 : !1; - } catch (error$96) { + } catch (error$97) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$96 + error$97 ); } } else if ( @@ -6936,12 +6965,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$97 = JSCompiler_inline_result.stateNode.containerInfo, - before$98 = getHostSibling(finishedWork); + var parent$98 = JSCompiler_inline_result.stateNode.containerInfo, + before$99 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$98, - parent$97 + before$99, + parent$98 ); break; default: @@ -8057,8 +8086,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$114) { - handleThrow(root, thrownValue$114); + } catch (thrownValue$115) { + handleThrow(root, thrownValue$115); } while (1); lanes && root.shellSuspendCounter++; @@ -8170,8 +8199,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$116) { - handleThrow(root, thrownValue$116); + } catch (thrownValue$117) { + handleThrow(root, thrownValue$117); } while (1); resetContextDependencies(); @@ -9298,19 +9327,19 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1047 = { +var devToolsConfig$jscomp$inline_1048 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-rc-def67b9b32-20240603", + version: "19.0.0-rc-67b05be0d2-20240603", rendererPackageName: "react-test-renderer" }; -var internals$jscomp$inline_1234 = { - bundleType: devToolsConfig$jscomp$inline_1047.bundleType, - version: devToolsConfig$jscomp$inline_1047.version, - rendererPackageName: devToolsConfig$jscomp$inline_1047.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1047.rendererConfig, +var internals$jscomp$inline_1235 = { + bundleType: devToolsConfig$jscomp$inline_1048.bundleType, + version: devToolsConfig$jscomp$inline_1048.version, + rendererPackageName: devToolsConfig$jscomp$inline_1048.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1048.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9327,26 +9356,26 @@ var internals$jscomp$inline_1234 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1047.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1048.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-def67b9b32-20240603" + reconcilerVersion: "19.0.0-rc-67b05be0d2-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1235 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1236 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1235.isDisabled && - hook$jscomp$inline_1235.supportsFiber + !hook$jscomp$inline_1236.isDisabled && + hook$jscomp$inline_1236.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1235.inject( - internals$jscomp$inline_1234 + (rendererID = hook$jscomp$inline_1236.inject( + internals$jscomp$inline_1235 )), - (injectedHook = hook$jscomp$inline_1235); + (injectedHook = hook$jscomp$inline_1236); } catch (err) {} } exports._Scheduler = Scheduler; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js index 82b30d3b81..dede143553 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -2864,72 +2864,101 @@ function dispatchActionState( ) { if (isRenderPhaseUpdate(fiber)) throw Error("Cannot update form state while rendering."); + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + isTransition: !0, + status: "pending", + value: null, + reason: null, + listeners: [], + then: function (listener) { + actionNode.listeners.push(listener); + } + }; + null !== ReactSharedInternals.T + ? setPendingState(!0) + : (actionNode.isTransition = !1); + setState(actionNode); fiber = actionQueue.pending; null === fiber - ? ((payload = { payload: payload, action: actionQueue.action, next: null }), - (payload.next = actionQueue.pending = payload), - runActionStateAction(actionQueue, setPendingState, setState, payload)) - : (actionQueue.pending = fiber.next = - { payload: payload, action: actionQueue.action, next: fiber.next }); + ? ((actionNode.next = actionQueue.pending = actionNode), + runActionStateAction(actionQueue, actionNode)) + : ((actionNode.next = fiber.next), + (actionQueue.pending = fiber.next = actionNode)); } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - setPendingState(!0); - var action = node.action; - node = node.payload; - var prevState = actionQueue.state; - try { - var returnValue = action(prevState, node), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ? (returnValue.then( - function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - }, - function () { - return finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - } - ), - setState(returnValue)) - : (setState(returnValue), - (actionQueue.state = returnValue), - finishRunningActionStateAction(actionQueue, setPendingState, setState)); - } catch (error) { - setState({ then: function () {}, status: "rejected", reason: error }), - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; - } +function runActionStateAction(actionQueue, node) { + var action = node.action, + payload = node.payload, + prevState = actionQueue.state; + if (node.isTransition) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + try { + var returnValue = action(prevState, payload), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + } + } else + try { + (prevTransition = action(prevState, payload)), + handleActionReturnValue(actionQueue, node, prevTransition); + } catch (error$32) { + onActionError(actionQueue, node, error$32); + } } -function finishRunningActionStateAction( - actionQueue, - setPendingState, - setState -) { - var last = actionQueue.pending; - if (null !== last) { - var first = last.next; - first === last +function handleActionReturnValue(actionQueue, node, returnValue) { + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then + ? returnValue.then( + function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, + function (error) { + return onActionError(actionQueue, node, error); + } + ) + : onActionSuccess(actionQueue, node, returnValue); +} +function onActionSuccess(actionQueue, actionNode, nextState) { + actionNode.status = "fulfilled"; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; + actionNode = actionQueue.pending; + null !== actionNode && + ((nextState = actionNode.next), + nextState === actionNode ? (actionQueue.pending = null) - : ((first = first.next), - (last.next = first), - runActionStateAction(actionQueue, setPendingState, setState, first)); - } + : ((nextState = nextState.next), + (actionNode.next = nextState), + runActionStateAction(actionQueue, nextState))); +} +function onActionError(actionQueue, actionNode, error) { + actionNode.status = "rejected"; + actionNode.reason = error; + notifyActionListeners(actionNode); + actionNode = actionQueue.pending; + null !== actionNode && + ((error = actionNode.next), + error === actionNode + ? (actionQueue.pending = null) + : ((error = error.next), + (actionNode.next = error), + runActionStateAction(actionQueue, error))); +} +function notifyActionListeners(actionNode) { + actionNode = actionNode.listeners; + for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); } function actionStateReducer(oldState, newState) { return newState; @@ -3799,9 +3828,9 @@ function resolveClassComponentProps( } if ((Component = Component.defaultProps) && !alreadyResolvedDefaultProps) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$33 in Component) - void 0 === newProps[propName$33] && - (newProps[propName$33] = Component[propName$33]); + for (var propName$34 in Component) + void 0 === newProps[propName$34] && + (newProps[propName$34] = Component[propName$34]); } return newProps; } @@ -5853,14 +5882,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$73 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$73 = lastTailNode), + for (var lastTailNode$74 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$74 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$73 + null === lastTailNode$74 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$73.sibling = null); + : (lastTailNode$74.sibling = null); } } function bubbleProperties(completedWork) { @@ -5872,53 +5901,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$75 = completedWork.selfBaseDuration, - child$76 = completedWork.child; - null !== child$76; + var treeBaseDuration$76 = completedWork.selfBaseDuration, + child$77 = completedWork.child; + null !== child$77; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags & 31457280), - (subtreeFlags |= child$76.flags & 31457280), - (treeBaseDuration$75 += child$76.treeBaseDuration), - (child$76 = child$76.sibling); - completedWork.treeBaseDuration = treeBaseDuration$75; + (newChildLanes |= child$77.lanes | child$77.childLanes), + (subtreeFlags |= child$77.subtreeFlags & 31457280), + (subtreeFlags |= child$77.flags & 31457280), + (treeBaseDuration$76 += child$77.treeBaseDuration), + (child$77 = child$77.sibling); + completedWork.treeBaseDuration = treeBaseDuration$76; } else for ( - treeBaseDuration$75 = completedWork.child; - null !== treeBaseDuration$75; + treeBaseDuration$76 = completedWork.child; + null !== treeBaseDuration$76; ) (newChildLanes |= - treeBaseDuration$75.lanes | treeBaseDuration$75.childLanes), - (subtreeFlags |= treeBaseDuration$75.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$75.flags & 31457280), - (treeBaseDuration$75.return = completedWork), - (treeBaseDuration$75 = treeBaseDuration$75.sibling); + treeBaseDuration$76.lanes | treeBaseDuration$76.childLanes), + (subtreeFlags |= treeBaseDuration$76.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$76.flags & 31457280), + (treeBaseDuration$76.return = completedWork), + (treeBaseDuration$76 = treeBaseDuration$76.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$75 = completedWork.actualDuration; - child$76 = completedWork.selfBaseDuration; + treeBaseDuration$76 = completedWork.actualDuration; + child$77 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$75 += child.actualDuration), - (child$76 += child.treeBaseDuration), + (treeBaseDuration$76 += child.actualDuration), + (child$77 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$75; - completedWork.treeBaseDuration = child$76; + completedWork.actualDuration = treeBaseDuration$76; + completedWork.treeBaseDuration = child$77; } else for ( - treeBaseDuration$75 = completedWork.child; - null !== treeBaseDuration$75; + treeBaseDuration$76 = completedWork.child; + null !== treeBaseDuration$76; ) (newChildLanes |= - treeBaseDuration$75.lanes | treeBaseDuration$75.childLanes), - (subtreeFlags |= treeBaseDuration$75.subtreeFlags), - (subtreeFlags |= treeBaseDuration$75.flags), - (treeBaseDuration$75.return = completedWork), - (treeBaseDuration$75 = treeBaseDuration$75.sibling); + treeBaseDuration$76.lanes | treeBaseDuration$76.childLanes), + (subtreeFlags |= treeBaseDuration$76.subtreeFlags), + (subtreeFlags |= treeBaseDuration$76.flags), + (treeBaseDuration$76.return = completedWork), + (treeBaseDuration$76 = treeBaseDuration$76.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -6091,11 +6120,11 @@ function completeWork(current, workInProgress, renderLanes) { null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (index = newProps.alternate.memoizedState.cachePool.pool); - var cache$83 = null; + var cache$84 = null; null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && - (cache$83 = newProps.memoizedState.cachePool.pool); - cache$83 !== index && (newProps.flags |= 2048); + (cache$84 = newProps.memoizedState.cachePool.pool); + cache$84 !== index && (newProps.flags |= 2048); } renderLanes !== current && renderLanes && @@ -6125,8 +6154,8 @@ function completeWork(current, workInProgress, renderLanes) { index = workInProgress.memoizedState; if (null === index) return bubbleProperties(workInProgress), null; newProps = 0 !== (workInProgress.flags & 128); - cache$83 = index.rendering; - if (null === cache$83) + cache$84 = index.rendering; + if (null === cache$84) if (newProps) cutOffTailIfNeeded(index, !1); else { if ( @@ -6134,11 +6163,11 @@ function completeWork(current, workInProgress, renderLanes) { (null !== current && 0 !== (current.flags & 128)) ) for (current = workInProgress.child; null !== current; ) { - cache$83 = findFirstSuspended(current); - if (null !== cache$83) { + cache$84 = findFirstSuspended(current); + if (null !== cache$84) { workInProgress.flags |= 128; cutOffTailIfNeeded(index, !1); - current = cache$83.updateQueue; + current = cache$84.updateQueue; workInProgress.updateQueue = current; scheduleRetryEffect(workInProgress, current); workInProgress.subtreeFlags = 0; @@ -6163,7 +6192,7 @@ function completeWork(current, workInProgress, renderLanes) { } else { if (!newProps) - if (((current = findFirstSuspended(cache$83)), null !== current)) { + if (((current = findFirstSuspended(cache$84)), null !== current)) { if ( ((workInProgress.flags |= 128), (newProps = !0), @@ -6173,7 +6202,7 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !0), null === index.tail && "hidden" === index.tailMode && - !cache$83.alternate) + !cache$84.alternate) ) return bubbleProperties(workInProgress), null; } else @@ -6185,13 +6214,13 @@ function completeWork(current, workInProgress, renderLanes) { cutOffTailIfNeeded(index, !1), (workInProgress.lanes = 4194304)); index.isBackwards - ? ((cache$83.sibling = workInProgress.child), - (workInProgress.child = cache$83)) + ? ((cache$84.sibling = workInProgress.child), + (workInProgress.child = cache$84)) : ((current = index.last), null !== current - ? (current.sibling = cache$83) - : (workInProgress.child = cache$83), - (index.last = cache$83)); + ? (current.sibling = cache$84) + : (workInProgress.child = cache$84), + (index.last = cache$84)); } if (null !== index.tail) return ( @@ -6449,8 +6478,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$99) { - captureCommitPhaseError(current, nearestMountedAncestor, error$99); + } catch (error$100) { + captureCommitPhaseError(current, nearestMountedAncestor, error$100); } else ref.current = null; } @@ -6586,10 +6615,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$100 = effect.create, + var create$101 = effect.create, inst = effect.inst; - create$100 = create$100(); - inst.destroy = create$100; + create$101 = create$101(); + inst.destroy = create$101; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -6617,8 +6646,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$102) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$102); + } catch (error$103) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$103); } } function commitClassCallbacks(finishedWork) { @@ -6698,11 +6727,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$103) { + } catch (error$104) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$103 + error$104 ); } else { @@ -6720,11 +6749,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$104) { + } catch (error$105) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$104 + error$105 ); } recordLayoutEffectDuration(finishedWork); @@ -6735,11 +6764,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$105) { + } catch (error$106) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$105 + error$106 ); } } @@ -7128,22 +7157,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$114) { + } catch (error$115) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$114 + error$115 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$115) { + } catch (error$116) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$115 + error$116 ); } } @@ -7181,8 +7210,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { var type = finishedWork.type; try { (flags.type = type), (flags.props = existingHiddenCallbacks); - } catch (error$118) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$118); + } catch (error$119) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$119); } } break; @@ -7198,8 +7227,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { existingHiddenCallbacks = finishedWork.memoizedProps; try { flags.text = existingHiddenCallbacks; - } catch (error$119) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$119); + } catch (error$120) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$120); } } break; @@ -7285,11 +7314,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { wasHidden.stateNode.isHidden = existingHiddenCallbacks ? !0 : !1; - } catch (error$108) { + } catch (error$109) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$108 + error$109 ); } } else if ( @@ -7367,12 +7396,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$109 = JSCompiler_inline_result.stateNode.containerInfo, - before$110 = getHostSibling(finishedWork); + var parent$110 = JSCompiler_inline_result.stateNode.containerInfo, + before$111 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$110, - parent$109 + before$111, + parent$110 ); break; default: @@ -7552,8 +7581,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$123) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$123); + } catch (error$124) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$124); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -8561,8 +8590,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$128) { - handleThrow(root, thrownValue$128); + } catch (thrownValue$129) { + handleThrow(root, thrownValue$129); } while (1); lanes && root.shellSuspendCounter++; @@ -8676,8 +8705,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$131) { + handleThrow(root, thrownValue$131); } while (1); resetContextDependencies(); @@ -9037,7 +9066,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$101 = commitTime, + commitTime$102 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -9045,7 +9074,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$101 + commitTime$102 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -9920,12 +9949,12 @@ function wrapFiber(fiber) { fiberToWrapper.set(fiber, wrapper)); return wrapper; } -var devToolsConfig$jscomp$inline_1130 = { +var devToolsConfig$jscomp$inline_1131 = { findFiberByHostInstance: function () { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "19.0.0-rc-def67b9b32-20240603", + version: "19.0.0-rc-67b05be0d2-20240603", rendererPackageName: "react-test-renderer" }; (function (internals) { @@ -9942,10 +9971,10 @@ var devToolsConfig$jscomp$inline_1130 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1130.bundleType, - version: devToolsConfig$jscomp$inline_1130.version, - rendererPackageName: devToolsConfig$jscomp$inline_1130.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1130.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1131.bundleType, + version: devToolsConfig$jscomp$inline_1131.version, + rendererPackageName: devToolsConfig$jscomp$inline_1131.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1131.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -9962,14 +9991,14 @@ var devToolsConfig$jscomp$inline_1130 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1130.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1131.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-def67b9b32-20240603" + reconcilerVersion: "19.0.0-rc-67b05be0d2-20240603" }); exports._Scheduler = Scheduler; exports.act = act; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js index 1fd9750609..83b02873b1 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ 'use strict'; @@ -24,7 +24,7 @@ if ( } var dynamicFlagsUntyped = require('ReactNativeInternalFeatureFlags'); -var ReactVersion = '19.0.0-rc-def67b9b32-20240603'; +var ReactVersion = '19.0.0-rc-67b05be0d2-20240603'; // 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 diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js index b2c4307387..8f1b0dc4fb 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<390c3d9e32c6dd1322766c76c635606b>> */ "use strict"; @@ -604,4 +604,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-rc-def67b9b32-20240603"; +exports.version = "19.0.0-rc-67b05be0d2-20240603"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js index e15f26f7c2..ad3fc8fff9 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<26d0090211c030f0b8b05cd01e3277ea>> + * @generated SignedSource<<9fd7a37ab321c8aef0e0e0ec19601330>> */ "use strict"; @@ -608,7 +608,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactSharedInternals.H.useTransition(); }; -exports.version = "19.0.0-rc-def67b9b32-20240603"; +exports.version = "19.0.0-rc-67b05be0d2-20240603"; "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 6790c9b3a6..0bb7302f2a 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 @@ -def67b9b329c8aa204e611cd510c5a64680aee58 +67b05be0d216c4efebc4bb5acb12c861a18bd87c 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 929425b883..76c8d83c3b 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<<4b4309a822e47c7f6e816aa0fd324fbd>> + * @generated SignedSource<> */ 'use strict'; @@ -11352,112 +11352,148 @@ function dispatchActionState(fiber, actionQueue, setPendingState, setState, payl throw new Error('Cannot update form state while rendering.'); } + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + // circular + isTransition: true, + status: 'pending', + value: null, + reason: null, + listeners: [], + then: function (listener) { + // We know the only thing that subscribes to these promises is `use` so + // this implementation is simpler than a generic thenable. E.g. we don't + // bother to check if the thenable is still pending because `use` already + // does that. + actionNode.listeners.push(listener); + } + }; // Check if we're inside a transition. If so, we'll need to restore the + // transition context when the action is run. + + var prevTransition = ReactSharedInternals.T; + + if (prevTransition !== null) { + // Optimistically update the pending state, similar to useTransition. + // This will be reverted automatically when all actions are finished. + setPendingState(true); // `actionNode` is a thenable that resolves to the return value of + // the action. + + setState(actionNode); + } else { + // This is not a transition. + actionNode.isTransition = false; + setState(actionNode); + } + var last = actionQueue.pending; if (last === null) { // There are no pending actions; this is the first one. We can run // it immediately. - var newLast = { - payload: payload, - action: actionQueue.action, - next: null // circular - - }; - newLast.next = actionQueue.pending = newLast; - runActionStateAction(actionQueue, setPendingState, setState, newLast); + actionNode.next = actionQueue.pending = actionNode; + runActionStateAction(actionQueue, actionNode); } else { // There's already an action running. Add to the queue. var first = last.next; - var _newLast = { - payload: payload, - action: actionQueue.action, - next: first - }; - actionQueue.pending = last.next = _newLast; + actionNode.next = first; + actionQueue.pending = last.next = actionNode; } } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - // This is a fork of startTransition - var prevTransition = ReactSharedInternals.T; - var currentTransition = {}; - ReactSharedInternals.T = currentTransition; - - { - ReactSharedInternals.T._updatedFibers = new Set(); - } // Optimistically update the pending state, similar to useTransition. - // This will be reverted automatically when all actions are finished. - - - setPendingState(true); // `node.action` represents the action function at the time it was dispatched. +function runActionStateAction(actionQueue, node) { + // `node.action` represents the action function at the time it was dispatched. // If this action was queued, it might be stale, i.e. it's not necessarily the // most current implementation of the action, stored on `actionQueue`. This is // intentional. The conceptual model for queued actions is that they are // queued in a remote worker; the dispatch happens immediately, only the // execution is delayed. - var action = node.action; var payload = node.payload; var prevState = actionQueue.state; - try { - var returnValue = action(prevState, payload); - var onStartTransitionFinish = ReactSharedInternals.S; - - if (onStartTransitionFinish !== null) { - onStartTransitionFinish(currentTransition, returnValue); - } - - if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding] - typeof returnValue.then === 'function') { - var thenable = returnValue; // Attach a listener to read the return state of the action. As soon as - // this resolves, we can run the next action in the sequence. - - thenable.then(function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction(actionQueue, setPendingState, setState); - }, function () { - return finishRunningActionStateAction(actionQueue, setPendingState, setState); - }); - setState(thenable); - } else { - setState(returnValue); - var nextState = returnValue; - actionQueue.state = nextState; - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } - } catch (error) { - // This is a trick to get the `useActionState` hook to rethrow the error. - // When it unwraps the thenable with the `use` algorithm, the error - // will be thrown. - var rejectedThenable = { - then: function () {}, - status: 'rejected', - reason: error // $FlowFixMe: Not sure why this doesn't work - - }; - setState(rejectedThenable); - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; + if (node.isTransition) { + // The original dispatch was part of a transition. We restore its + // transition context here. + // This is a fork of startTransition + var prevTransition = ReactSharedInternals.T; + var currentTransition = {}; + ReactSharedInternals.T = currentTransition; { - if (prevTransition === null && currentTransition._updatedFibers) { - var updatedFibersCount = currentTransition._updatedFibers.size; + ReactSharedInternals.T._updatedFibers = new Set(); + } - currentTransition._updatedFibers.clear(); + try { + var returnValue = action(prevState, payload); + var onStartTransitionFinish = ReactSharedInternals.S; - if (updatedFibersCount > 10) { - warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); + if (onStartTransitionFinish !== null) { + onStartTransitionFinish(currentTransition, returnValue); + } + + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + + { + if (prevTransition === null && currentTransition._updatedFibers) { + var updatedFibersCount = currentTransition._updatedFibers.size; + + currentTransition._updatedFibers.clear(); + + if (updatedFibersCount > 10) { + warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); + } } } } + } else { + // The original dispatch was not part of a transition. + try { + var _returnValue = action(prevState, payload); + + handleActionReturnValue(actionQueue, node, _returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } } } -function finishRunningActionStateAction(actionQueue, setPendingState, setState) { - // The action finished running. Pop it from the queue and run the next pending - // action, if there are any. +function handleActionReturnValue(actionQueue, node, returnValue) { + if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding] + typeof returnValue.then === 'function') { + var thenable = returnValue; // Attach a listener to read the return state of the action. As soon as + // this resolves, we can run the next action in the sequence. + + thenable.then(function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, function (error) { + return onActionError(actionQueue, node, error); + }); + + { + if (!node.isTransition) { + error('An async function was passed to useActionState, but it was ' + 'dispatched outside of an action context. This is likely not ' + 'what you intended. Either pass the dispatch function to an ' + '`action` prop, or dispatch manually inside `startTransition`'); + } + } + } else { + var nextState = returnValue; + onActionSuccess(actionQueue, node, nextState); + } +} + +function onActionSuccess(actionQueue, actionNode, nextState) { + // The action finished running. + actionNode.status = 'fulfilled'; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; // Pop the action from the queue and run the next pending action, if there + // are any. + var last = actionQueue.pending; if (last !== null) { @@ -11471,11 +11507,48 @@ function finishRunningActionStateAction(actionQueue, setPendingState, setState) var next = first.next; last.next = next; // Run the next action. - runActionStateAction(actionQueue, setPendingState, setState, next); + runActionStateAction(actionQueue, next); } } } +function onActionError(actionQueue, actionNode, error) { + actionNode.status = 'rejected'; + actionNode.reason = error; + notifyActionListeners(actionNode); // Pop the action from the queue and run the next pending action, if there + // are any. + // TODO: We should instead abort all the remaining actions in the queue. + + var last = actionQueue.pending; + + if (last !== null) { + var first = last.next; + + if (first === last) { + // This was the last action in the queue. + actionQueue.pending = null; + } else { + // Remove the first node from the circular queue. + var next = first.next; + last.next = next; // Run the next action. + + runActionStateAction(actionQueue, next); + } + } +} + +function notifyActionListeners(actionNode) { + // Notify React that the action has finished. + var listeners = actionNode.listeners; + + for (var i = 0; i < listeners.length; i++) { + // This is always a React internal listener, so we don't need to worry + // about it throwing. + var listener = listeners[i]; + listener(); + } +} + function actionStateReducer(oldState, newState) { return newState; } @@ -26230,7 +26303,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-def67b9b32-20240603'; +var ReactVersion = '19.0.0-rc-67b05be0d2-20240603'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol 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 f97386fe26..fb762bdea0 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<<4a0728040effc09b25d8b1d148d800d7>> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_252 = { +var injectedNamesToPlugins$jscomp$inline_253 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_252 = { } } }, - isOrderingDirty$jscomp$inline_253 = !1, - pluginName$jscomp$inline_254; -for (pluginName$jscomp$inline_254 in injectedNamesToPlugins$jscomp$inline_252) + isOrderingDirty$jscomp$inline_254 = !1, + pluginName$jscomp$inline_255; +for (pluginName$jscomp$inline_255 in injectedNamesToPlugins$jscomp$inline_253) if ( - injectedNamesToPlugins$jscomp$inline_252.hasOwnProperty( - pluginName$jscomp$inline_254 + injectedNamesToPlugins$jscomp$inline_253.hasOwnProperty( + pluginName$jscomp$inline_255 ) ) { - var pluginModule$jscomp$inline_255 = - injectedNamesToPlugins$jscomp$inline_252[pluginName$jscomp$inline_254]; + var pluginModule$jscomp$inline_256 = + injectedNamesToPlugins$jscomp$inline_253[pluginName$jscomp$inline_255]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_254) || - namesToPlugins[pluginName$jscomp$inline_254] !== - pluginModule$jscomp$inline_255 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_255) || + namesToPlugins[pluginName$jscomp$inline_255] !== + pluginModule$jscomp$inline_256 ) { - if (namesToPlugins[pluginName$jscomp$inline_254]) + if (namesToPlugins[pluginName$jscomp$inline_255]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_254 + "`.") + (pluginName$jscomp$inline_255 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_254] = - pluginModule$jscomp$inline_255; - isOrderingDirty$jscomp$inline_253 = !0; + namesToPlugins[pluginName$jscomp$inline_255] = + pluginModule$jscomp$inline_256; + isOrderingDirty$jscomp$inline_254 = !0; } } -isOrderingDirty$jscomp$inline_253 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_254 && recomputePluginOrdering(); var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, consoleManagedByDevToolsDuringStrictMode = dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode, @@ -4157,72 +4157,101 @@ function dispatchActionState( ) { if (isRenderPhaseUpdate(fiber)) throw Error("Cannot update form state while rendering."); + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + isTransition: !0, + status: "pending", + value: null, + reason: null, + listeners: [], + then: function (listener) { + actionNode.listeners.push(listener); + } + }; + null !== ReactSharedInternals.T + ? setPendingState(!0) + : (actionNode.isTransition = !1); + setState(actionNode); fiber = actionQueue.pending; null === fiber - ? ((payload = { payload: payload, action: actionQueue.action, next: null }), - (payload.next = actionQueue.pending = payload), - runActionStateAction(actionQueue, setPendingState, setState, payload)) - : (actionQueue.pending = fiber.next = - { payload: payload, action: actionQueue.action, next: fiber.next }); + ? ((actionNode.next = actionQueue.pending = actionNode), + runActionStateAction(actionQueue, actionNode)) + : ((actionNode.next = fiber.next), + (actionQueue.pending = fiber.next = actionNode)); } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - setPendingState(!0); - var action = node.action; - node = node.payload; - var prevState = actionQueue.state; - try { - var returnValue = action(prevState, node), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ? (returnValue.then( - function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - }, - function () { - return finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - } - ), - setState(returnValue)) - : (setState(returnValue), - (actionQueue.state = returnValue), - finishRunningActionStateAction(actionQueue, setPendingState, setState)); - } catch (error) { - setState({ then: function () {}, status: "rejected", reason: error }), - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; - } +function runActionStateAction(actionQueue, node) { + var action = node.action, + payload = node.payload, + prevState = actionQueue.state; + if (node.isTransition) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + try { + var returnValue = action(prevState, payload), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + } + } else + try { + (prevTransition = action(prevState, payload)), + handleActionReturnValue(actionQueue, node, prevTransition); + } catch (error$33) { + onActionError(actionQueue, node, error$33); + } } -function finishRunningActionStateAction( - actionQueue, - setPendingState, - setState -) { - var last = actionQueue.pending; - if (null !== last) { - var first = last.next; - first === last +function handleActionReturnValue(actionQueue, node, returnValue) { + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then + ? returnValue.then( + function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, + function (error) { + return onActionError(actionQueue, node, error); + } + ) + : onActionSuccess(actionQueue, node, returnValue); +} +function onActionSuccess(actionQueue, actionNode, nextState) { + actionNode.status = "fulfilled"; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; + actionNode = actionQueue.pending; + null !== actionNode && + ((nextState = actionNode.next), + nextState === actionNode ? (actionQueue.pending = null) - : ((first = first.next), - (last.next = first), - runActionStateAction(actionQueue, setPendingState, setState, first)); - } + : ((nextState = nextState.next), + (actionNode.next = nextState), + runActionStateAction(actionQueue, nextState))); +} +function onActionError(actionQueue, actionNode, error) { + actionNode.status = "rejected"; + actionNode.reason = error; + notifyActionListeners(actionNode); + actionNode = actionQueue.pending; + null !== actionNode && + ((error = actionNode.next), + error === actionNode + ? (actionQueue.pending = null) + : ((error = error.next), + (actionNode.next = error), + runActionStateAction(actionQueue, error))); +} +function notifyActionListeners(actionNode) { + actionNode = actionNode.listeners; + for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); } function actionStateReducer(oldState, newState) { return newState; @@ -5045,9 +5074,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$34 in Component) - void 0 === newProps[propName$34] && - (newProps[propName$34] = Component[propName$34]); + for (var propName$35 in Component) + void 0 === newProps[propName$35] && + (newProps[propName$35] = Component[propName$35]); } return newProps; } @@ -7177,14 +7206,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$75 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), + for (var lastTailNode$76 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$76 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$75 + null === lastTailNode$76 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$75.sibling = null); + : (lastTailNode$76.sibling = null); } } function bubbleProperties(completedWork) { @@ -7194,19 +7223,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags & 31457280), - (subtreeFlags |= child$76.flags & 31457280), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (var child$77 = completedWork.child; null !== child$77; ) + (newChildLanes |= child$77.lanes | child$77.childLanes), + (subtreeFlags |= child$77.subtreeFlags & 31457280), + (subtreeFlags |= child$77.flags & 31457280), + (child$77.return = completedWork), + (child$77 = child$77.sibling); else - for (child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags), - (subtreeFlags |= child$76.flags), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (child$77 = completedWork.child; null !== child$77; ) + (newChildLanes |= child$77.lanes | child$77.childLanes), + (subtreeFlags |= child$77.subtreeFlags), + (subtreeFlags |= child$77.flags), + (child$77.return = completedWork), + (child$77 = child$77.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7744,8 +7773,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$98) { - captureCommitPhaseError(current, nearestMountedAncestor, error$98); + } catch (error$99) { + captureCommitPhaseError(current, nearestMountedAncestor, error$99); } else ref.current = null; } @@ -7850,10 +7879,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$99 = effect.create, + var create$100 = effect.create, inst = effect.inst; - create$99 = create$99(); - inst.destroy = create$99; + create$100 = create$100(); + inst.destroy = create$100; } effect = effect.next; } while (effect !== finishedWork); @@ -7917,11 +7946,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$101) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$101 ); } } @@ -8213,8 +8242,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$102) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$102); + } catch (error$103) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$103); } } break; @@ -9439,8 +9468,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$114) { - handleThrow(root, thrownValue$114); + } catch (thrownValue$115) { + handleThrow(root, thrownValue$115); } while (1); lanes && root.shellSuspendCounter++; @@ -9552,8 +9581,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$116) { - handleThrow(root, thrownValue$116); + } catch (thrownValue$117) { + handleThrow(root, thrownValue$117); } while (1); resetContextDependencies(); @@ -10553,10 +10582,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1124 = { + devToolsConfig$jscomp$inline_1125 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-rc-def67b9b32-20240603", + version: "19.0.0-rc-67b05be0d2-20240603", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10572,11 +10601,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1350 = { - bundleType: devToolsConfig$jscomp$inline_1124.bundleType, - version: devToolsConfig$jscomp$inline_1124.version, - rendererPackageName: devToolsConfig$jscomp$inline_1124.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1124.rendererConfig, +var internals$jscomp$inline_1351 = { + bundleType: devToolsConfig$jscomp$inline_1125.bundleType, + version: devToolsConfig$jscomp$inline_1125.version, + rendererPackageName: devToolsConfig$jscomp$inline_1125.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1125.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10592,26 +10621,26 @@ var internals$jscomp$inline_1350 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1124.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1125.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-def67b9b32-20240603" + reconcilerVersion: "19.0.0-rc-67b05be0d2-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1351 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1352 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1351.isDisabled && - hook$jscomp$inline_1351.supportsFiber + !hook$jscomp$inline_1352.isDisabled && + hook$jscomp$inline_1352.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1351.inject( - internals$jscomp$inline_1350 + (rendererID = hook$jscomp$inline_1352.inject( + internals$jscomp$inline_1351 )), - (injectedHook = hook$jscomp$inline_1351); + (injectedHook = hook$jscomp$inline_1352); } 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 22822db12f..74454a06d7 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<<82b65fee6941b01f63b3ec5dbd0a4e39>> + * @generated SignedSource<<01205321c598a9c8ebf74f7283551b8c>> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_268 = { +var injectedNamesToPlugins$jscomp$inline_269 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_268 = { } } }, - isOrderingDirty$jscomp$inline_269 = !1, - pluginName$jscomp$inline_270; -for (pluginName$jscomp$inline_270 in injectedNamesToPlugins$jscomp$inline_268) + isOrderingDirty$jscomp$inline_270 = !1, + pluginName$jscomp$inline_271; +for (pluginName$jscomp$inline_271 in injectedNamesToPlugins$jscomp$inline_269) if ( - injectedNamesToPlugins$jscomp$inline_268.hasOwnProperty( - pluginName$jscomp$inline_270 + injectedNamesToPlugins$jscomp$inline_269.hasOwnProperty( + pluginName$jscomp$inline_271 ) ) { - var pluginModule$jscomp$inline_271 = - injectedNamesToPlugins$jscomp$inline_268[pluginName$jscomp$inline_270]; + var pluginModule$jscomp$inline_272 = + injectedNamesToPlugins$jscomp$inline_269[pluginName$jscomp$inline_271]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_270) || - namesToPlugins[pluginName$jscomp$inline_270] !== - pluginModule$jscomp$inline_271 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_271) || + namesToPlugins[pluginName$jscomp$inline_271] !== + pluginModule$jscomp$inline_272 ) { - if (namesToPlugins[pluginName$jscomp$inline_270]) + if (namesToPlugins[pluginName$jscomp$inline_271]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_270 + "`.") + (pluginName$jscomp$inline_271 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_270] = - pluginModule$jscomp$inline_271; - isOrderingDirty$jscomp$inline_269 = !0; + namesToPlugins[pluginName$jscomp$inline_271] = + pluginModule$jscomp$inline_272; + isOrderingDirty$jscomp$inline_270 = !0; } } -isOrderingDirty$jscomp$inline_269 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_270 && recomputePluginOrdering(); var alwaysThrottleRetries = dynamicFlagsUntyped.alwaysThrottleRetries, consoleManagedByDevToolsDuringStrictMode = dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode, @@ -4279,72 +4279,101 @@ function dispatchActionState( ) { if (isRenderPhaseUpdate(fiber)) throw Error("Cannot update form state while rendering."); + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + isTransition: !0, + status: "pending", + value: null, + reason: null, + listeners: [], + then: function (listener) { + actionNode.listeners.push(listener); + } + }; + null !== ReactSharedInternals.T + ? setPendingState(!0) + : (actionNode.isTransition = !1); + setState(actionNode); fiber = actionQueue.pending; null === fiber - ? ((payload = { payload: payload, action: actionQueue.action, next: null }), - (payload.next = actionQueue.pending = payload), - runActionStateAction(actionQueue, setPendingState, setState, payload)) - : (actionQueue.pending = fiber.next = - { payload: payload, action: actionQueue.action, next: fiber.next }); + ? ((actionNode.next = actionQueue.pending = actionNode), + runActionStateAction(actionQueue, actionNode)) + : ((actionNode.next = fiber.next), + (actionQueue.pending = fiber.next = actionNode)); } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - setPendingState(!0); - var action = node.action; - node = node.payload; - var prevState = actionQueue.state; - try { - var returnValue = action(prevState, node), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ? (returnValue.then( - function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - }, - function () { - return finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - } - ), - setState(returnValue)) - : (setState(returnValue), - (actionQueue.state = returnValue), - finishRunningActionStateAction(actionQueue, setPendingState, setState)); - } catch (error) { - setState({ then: function () {}, status: "rejected", reason: error }), - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; - } +function runActionStateAction(actionQueue, node) { + var action = node.action, + payload = node.payload, + prevState = actionQueue.state; + if (node.isTransition) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + try { + var returnValue = action(prevState, payload), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + } + } else + try { + (prevTransition = action(prevState, payload)), + handleActionReturnValue(actionQueue, node, prevTransition); + } catch (error$36) { + onActionError(actionQueue, node, error$36); + } } -function finishRunningActionStateAction( - actionQueue, - setPendingState, - setState -) { - var last = actionQueue.pending; - if (null !== last) { - var first = last.next; - first === last +function handleActionReturnValue(actionQueue, node, returnValue) { + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then + ? returnValue.then( + function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, + function (error) { + return onActionError(actionQueue, node, error); + } + ) + : onActionSuccess(actionQueue, node, returnValue); +} +function onActionSuccess(actionQueue, actionNode, nextState) { + actionNode.status = "fulfilled"; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; + actionNode = actionQueue.pending; + null !== actionNode && + ((nextState = actionNode.next), + nextState === actionNode ? (actionQueue.pending = null) - : ((first = first.next), - (last.next = first), - runActionStateAction(actionQueue, setPendingState, setState, first)); - } + : ((nextState = nextState.next), + (actionNode.next = nextState), + runActionStateAction(actionQueue, nextState))); +} +function onActionError(actionQueue, actionNode, error) { + actionNode.status = "rejected"; + actionNode.reason = error; + notifyActionListeners(actionNode); + actionNode = actionQueue.pending; + null !== actionNode && + ((error = actionNode.next), + error === actionNode + ? (actionQueue.pending = null) + : ((error = error.next), + (actionNode.next = error), + runActionStateAction(actionQueue, error))); +} +function notifyActionListeners(actionNode) { + actionNode = actionNode.listeners; + for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); } function actionStateReducer(oldState, newState) { return newState; @@ -5237,9 +5266,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$37 in Component) - void 0 === newProps[propName$37] && - (newProps[propName$37] = Component[propName$37]); + for (var propName$38 in Component) + void 0 === newProps[propName$38] && + (newProps[propName$38] = Component[propName$38]); } return newProps; } @@ -7407,14 +7436,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$79 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$79 = lastTailNode), + for (var lastTailNode$80 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$80 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$79 + null === lastTailNode$80 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$79.sibling = null); + : (lastTailNode$80.sibling = null); } } function bubbleProperties(completedWork) { @@ -7426,53 +7455,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$81 = completedWork.selfBaseDuration, - child$82 = completedWork.child; - null !== child$82; + var treeBaseDuration$82 = completedWork.selfBaseDuration, + child$83 = completedWork.child; + null !== child$83; ) - (newChildLanes |= child$82.lanes | child$82.childLanes), - (subtreeFlags |= child$82.subtreeFlags & 31457280), - (subtreeFlags |= child$82.flags & 31457280), - (treeBaseDuration$81 += child$82.treeBaseDuration), - (child$82 = child$82.sibling); - completedWork.treeBaseDuration = treeBaseDuration$81; + (newChildLanes |= child$83.lanes | child$83.childLanes), + (subtreeFlags |= child$83.subtreeFlags & 31457280), + (subtreeFlags |= child$83.flags & 31457280), + (treeBaseDuration$82 += child$83.treeBaseDuration), + (child$83 = child$83.sibling); + completedWork.treeBaseDuration = treeBaseDuration$82; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$82 = completedWork.child; + null !== treeBaseDuration$82; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$81.flags & 31457280), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$82.lanes | treeBaseDuration$82.childLanes), + (subtreeFlags |= treeBaseDuration$82.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$82.flags & 31457280), + (treeBaseDuration$82.return = completedWork), + (treeBaseDuration$82 = treeBaseDuration$82.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$81 = completedWork.actualDuration; - child$82 = completedWork.selfBaseDuration; + treeBaseDuration$82 = completedWork.actualDuration; + child$83 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$81 += child.actualDuration), - (child$82 += child.treeBaseDuration), + (treeBaseDuration$82 += child.actualDuration), + (child$83 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$81; - completedWork.treeBaseDuration = child$82; + completedWork.actualDuration = treeBaseDuration$82; + completedWork.treeBaseDuration = child$83; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$82 = completedWork.child; + null !== treeBaseDuration$82; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags), - (subtreeFlags |= treeBaseDuration$81.flags), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$82.lanes | treeBaseDuration$82.childLanes), + (subtreeFlags |= treeBaseDuration$82.subtreeFlags), + (subtreeFlags |= treeBaseDuration$82.flags), + (treeBaseDuration$82.return = completedWork), + (treeBaseDuration$82 = treeBaseDuration$82.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -8063,8 +8092,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$107) { - captureCommitPhaseError(current, nearestMountedAncestor, error$107); + } catch (error$108) { + captureCommitPhaseError(current, nearestMountedAncestor, error$108); } else ref.current = null; } @@ -8198,10 +8227,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$108 = effect.create, + var create$109 = effect.create, inst = effect.inst; - create$108 = create$108(); - inst.destroy = create$108; + create$109 = create$109(); + inst.destroy = create$109; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -8229,8 +8258,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$110) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$110); + } catch (error$111) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$111); } } function commitClassCallbacks(finishedWork) { @@ -8319,11 +8348,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$111) { + } catch (error$112) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$111 + error$112 ); } else { @@ -8341,11 +8370,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$112) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$113 ); } recordLayoutEffectDuration(finishedWork); @@ -8356,11 +8385,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$113) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$114 ); } } @@ -8681,22 +8710,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$116) { + } catch (error$117) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$117 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$117) { + } catch (error$118) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$117 + error$118 ); } } @@ -8993,8 +9022,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$125) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$125); + } catch (error$126) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$126); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -10010,8 +10039,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$130) { - handleThrow(root, thrownValue$130); + } catch (thrownValue$131) { + handleThrow(root, thrownValue$131); } while (1); lanes && root.shellSuspendCounter++; @@ -10134,8 +10163,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$132) { - handleThrow(root, thrownValue$132); + } catch (thrownValue$133) { + handleThrow(root, thrownValue$133); } while (1); resetContextDependencies(); @@ -10497,7 +10526,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$109 = commitTime, + commitTime$110 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -10505,7 +10534,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$109 + commitTime$110 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -11259,10 +11288,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1205 = { + devToolsConfig$jscomp$inline_1206 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "19.0.0-rc-def67b9b32-20240603", + version: "19.0.0-rc-67b05be0d2-20240603", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11292,10 +11321,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1205.bundleType, - version: devToolsConfig$jscomp$inline_1205.version, - rendererPackageName: devToolsConfig$jscomp$inline_1205.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1205.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1206.bundleType, + version: devToolsConfig$jscomp$inline_1206.version, + rendererPackageName: devToolsConfig$jscomp$inline_1206.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1206.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11311,14 +11340,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1205.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1206.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-def67b9b32-20240603" + reconcilerVersion: "19.0.0-rc-67b05be0d2-20240603" }); 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 77542ee196..b5a77a3567 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<<55a74b1019d4ad0d3768c062bab33969>> + * @generated SignedSource<<6fa10300152888e6bc08503b84bba36b>> */ 'use strict'; @@ -11535,112 +11535,148 @@ function dispatchActionState(fiber, actionQueue, setPendingState, setState, payl throw new Error('Cannot update form state while rendering.'); } + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + // circular + isTransition: true, + status: 'pending', + value: null, + reason: null, + listeners: [], + then: function (listener) { + // We know the only thing that subscribes to these promises is `use` so + // this implementation is simpler than a generic thenable. E.g. we don't + // bother to check if the thenable is still pending because `use` already + // does that. + actionNode.listeners.push(listener); + } + }; // Check if we're inside a transition. If so, we'll need to restore the + // transition context when the action is run. + + var prevTransition = ReactSharedInternals.T; + + if (prevTransition !== null) { + // Optimistically update the pending state, similar to useTransition. + // This will be reverted automatically when all actions are finished. + setPendingState(true); // `actionNode` is a thenable that resolves to the return value of + // the action. + + setState(actionNode); + } else { + // This is not a transition. + actionNode.isTransition = false; + setState(actionNode); + } + var last = actionQueue.pending; if (last === null) { // There are no pending actions; this is the first one. We can run // it immediately. - var newLast = { - payload: payload, - action: actionQueue.action, - next: null // circular - - }; - newLast.next = actionQueue.pending = newLast; - runActionStateAction(actionQueue, setPendingState, setState, newLast); + actionNode.next = actionQueue.pending = actionNode; + runActionStateAction(actionQueue, actionNode); } else { // There's already an action running. Add to the queue. var first = last.next; - var _newLast = { - payload: payload, - action: actionQueue.action, - next: first - }; - actionQueue.pending = last.next = _newLast; + actionNode.next = first; + actionQueue.pending = last.next = actionNode; } } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - // This is a fork of startTransition - var prevTransition = ReactSharedInternals.T; - var currentTransition = {}; - ReactSharedInternals.T = currentTransition; - - { - ReactSharedInternals.T._updatedFibers = new Set(); - } // Optimistically update the pending state, similar to useTransition. - // This will be reverted automatically when all actions are finished. - - - setPendingState(true); // `node.action` represents the action function at the time it was dispatched. +function runActionStateAction(actionQueue, node) { + // `node.action` represents the action function at the time it was dispatched. // If this action was queued, it might be stale, i.e. it's not necessarily the // most current implementation of the action, stored on `actionQueue`. This is // intentional. The conceptual model for queued actions is that they are // queued in a remote worker; the dispatch happens immediately, only the // execution is delayed. - var action = node.action; var payload = node.payload; var prevState = actionQueue.state; - try { - var returnValue = action(prevState, payload); - var onStartTransitionFinish = ReactSharedInternals.S; - - if (onStartTransitionFinish !== null) { - onStartTransitionFinish(currentTransition, returnValue); - } - - if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding] - typeof returnValue.then === 'function') { - var thenable = returnValue; // Attach a listener to read the return state of the action. As soon as - // this resolves, we can run the next action in the sequence. - - thenable.then(function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction(actionQueue, setPendingState, setState); - }, function () { - return finishRunningActionStateAction(actionQueue, setPendingState, setState); - }); - setState(thenable); - } else { - setState(returnValue); - var nextState = returnValue; - actionQueue.state = nextState; - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } - } catch (error) { - // This is a trick to get the `useActionState` hook to rethrow the error. - // When it unwraps the thenable with the `use` algorithm, the error - // will be thrown. - var rejectedThenable = { - then: function () {}, - status: 'rejected', - reason: error // $FlowFixMe: Not sure why this doesn't work - - }; - setState(rejectedThenable); - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; + if (node.isTransition) { + // The original dispatch was part of a transition. We restore its + // transition context here. + // This is a fork of startTransition + var prevTransition = ReactSharedInternals.T; + var currentTransition = {}; + ReactSharedInternals.T = currentTransition; { - if (prevTransition === null && currentTransition._updatedFibers) { - var updatedFibersCount = currentTransition._updatedFibers.size; + ReactSharedInternals.T._updatedFibers = new Set(); + } - currentTransition._updatedFibers.clear(); + try { + var returnValue = action(prevState, payload); + var onStartTransitionFinish = ReactSharedInternals.S; - if (updatedFibersCount > 10) { - warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); + if (onStartTransitionFinish !== null) { + onStartTransitionFinish(currentTransition, returnValue); + } + + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + + { + if (prevTransition === null && currentTransition._updatedFibers) { + var updatedFibersCount = currentTransition._updatedFibers.size; + + currentTransition._updatedFibers.clear(); + + if (updatedFibersCount > 10) { + warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.'); + } } } } + } else { + // The original dispatch was not part of a transition. + try { + var _returnValue = action(prevState, payload); + + handleActionReturnValue(actionQueue, node, _returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } } } -function finishRunningActionStateAction(actionQueue, setPendingState, setState) { - // The action finished running. Pop it from the queue and run the next pending - // action, if there are any. +function handleActionReturnValue(actionQueue, node, returnValue) { + if (returnValue !== null && typeof returnValue === 'object' && // $FlowFixMe[method-unbinding] + typeof returnValue.then === 'function') { + var thenable = returnValue; // Attach a listener to read the return state of the action. As soon as + // this resolves, we can run the next action in the sequence. + + thenable.then(function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, function (error) { + return onActionError(actionQueue, node, error); + }); + + { + if (!node.isTransition) { + error('An async function was passed to useActionState, but it was ' + 'dispatched outside of an action context. This is likely not ' + 'what you intended. Either pass the dispatch function to an ' + '`action` prop, or dispatch manually inside `startTransition`'); + } + } + } else { + var nextState = returnValue; + onActionSuccess(actionQueue, node, nextState); + } +} + +function onActionSuccess(actionQueue, actionNode, nextState) { + // The action finished running. + actionNode.status = 'fulfilled'; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; // Pop the action from the queue and run the next pending action, if there + // are any. + var last = actionQueue.pending; if (last !== null) { @@ -11654,11 +11690,48 @@ function finishRunningActionStateAction(actionQueue, setPendingState, setState) var next = first.next; last.next = next; // Run the next action. - runActionStateAction(actionQueue, setPendingState, setState, next); + runActionStateAction(actionQueue, next); } } } +function onActionError(actionQueue, actionNode, error) { + actionNode.status = 'rejected'; + actionNode.reason = error; + notifyActionListeners(actionNode); // Pop the action from the queue and run the next pending action, if there + // are any. + // TODO: We should instead abort all the remaining actions in the queue. + + var last = actionQueue.pending; + + if (last !== null) { + var first = last.next; + + if (first === last) { + // This was the last action in the queue. + actionQueue.pending = null; + } else { + // Remove the first node from the circular queue. + var next = first.next; + last.next = next; // Run the next action. + + runActionStateAction(actionQueue, next); + } + } +} + +function notifyActionListeners(actionNode) { + // Notify React that the action has finished. + var listeners = actionNode.listeners; + + for (var i = 0; i < listeners.length; i++) { + // This is always a React internal listener, so we don't need to worry + // about it throwing. + var listener = listeners[i]; + listener(); + } +} + function actionStateReducer(oldState, newState) { return newState; } @@ -26586,7 +26659,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-rc-def67b9b32-20240603'; +var ReactVersion = '19.0.0-rc-67b05be0d2-20240603'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol 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 d29cf15126..bb9bff6be8 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<<83a4438deefdcaa6d259799a0552888c>> + * @generated SignedSource<<07f28ebce18043b018e2dc77ccf2cadf>> */ "use strict"; @@ -893,7 +893,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_260 = { +var injectedNamesToPlugins$jscomp$inline_261 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -939,32 +939,32 @@ var injectedNamesToPlugins$jscomp$inline_260 = { } } }, - isOrderingDirty$jscomp$inline_261 = !1, - pluginName$jscomp$inline_262; -for (pluginName$jscomp$inline_262 in injectedNamesToPlugins$jscomp$inline_260) + isOrderingDirty$jscomp$inline_262 = !1, + pluginName$jscomp$inline_263; +for (pluginName$jscomp$inline_263 in injectedNamesToPlugins$jscomp$inline_261) if ( - injectedNamesToPlugins$jscomp$inline_260.hasOwnProperty( - pluginName$jscomp$inline_262 + injectedNamesToPlugins$jscomp$inline_261.hasOwnProperty( + pluginName$jscomp$inline_263 ) ) { - var pluginModule$jscomp$inline_263 = - injectedNamesToPlugins$jscomp$inline_260[pluginName$jscomp$inline_262]; + var pluginModule$jscomp$inline_264 = + injectedNamesToPlugins$jscomp$inline_261[pluginName$jscomp$inline_263]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_262) || - namesToPlugins[pluginName$jscomp$inline_262] !== - pluginModule$jscomp$inline_263 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_263) || + namesToPlugins[pluginName$jscomp$inline_263] !== + pluginModule$jscomp$inline_264 ) { - if (namesToPlugins[pluginName$jscomp$inline_262]) + if (namesToPlugins[pluginName$jscomp$inline_263]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_262 + "`.") + (pluginName$jscomp$inline_263 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_262] = - pluginModule$jscomp$inline_263; - isOrderingDirty$jscomp$inline_261 = !0; + namesToPlugins[pluginName$jscomp$inline_263] = + pluginModule$jscomp$inline_264; + isOrderingDirty$jscomp$inline_262 = !0; } } -isOrderingDirty$jscomp$inline_261 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_262 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -4179,72 +4179,101 @@ function dispatchActionState( ) { if (isRenderPhaseUpdate(fiber)) throw Error("Cannot update form state while rendering."); + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + isTransition: !0, + status: "pending", + value: null, + reason: null, + listeners: [], + then: function (listener) { + actionNode.listeners.push(listener); + } + }; + null !== ReactSharedInternals.T + ? setPendingState(!0) + : (actionNode.isTransition = !1); + setState(actionNode); fiber = actionQueue.pending; null === fiber - ? ((payload = { payload: payload, action: actionQueue.action, next: null }), - (payload.next = actionQueue.pending = payload), - runActionStateAction(actionQueue, setPendingState, setState, payload)) - : (actionQueue.pending = fiber.next = - { payload: payload, action: actionQueue.action, next: fiber.next }); + ? ((actionNode.next = actionQueue.pending = actionNode), + runActionStateAction(actionQueue, actionNode)) + : ((actionNode.next = fiber.next), + (actionQueue.pending = fiber.next = actionNode)); } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - setPendingState(!0); - var action = node.action; - node = node.payload; - var prevState = actionQueue.state; - try { - var returnValue = action(prevState, node), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ? (returnValue.then( - function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - }, - function () { - return finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - } - ), - setState(returnValue)) - : (setState(returnValue), - (actionQueue.state = returnValue), - finishRunningActionStateAction(actionQueue, setPendingState, setState)); - } catch (error) { - setState({ then: function () {}, status: "rejected", reason: error }), - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; - } +function runActionStateAction(actionQueue, node) { + var action = node.action, + payload = node.payload, + prevState = actionQueue.state; + if (node.isTransition) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + try { + var returnValue = action(prevState, payload), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + } + } else + try { + (prevTransition = action(prevState, payload)), + handleActionReturnValue(actionQueue, node, prevTransition); + } catch (error$35) { + onActionError(actionQueue, node, error$35); + } } -function finishRunningActionStateAction( - actionQueue, - setPendingState, - setState -) { - var last = actionQueue.pending; - if (null !== last) { - var first = last.next; - first === last +function handleActionReturnValue(actionQueue, node, returnValue) { + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then + ? returnValue.then( + function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, + function (error) { + return onActionError(actionQueue, node, error); + } + ) + : onActionSuccess(actionQueue, node, returnValue); +} +function onActionSuccess(actionQueue, actionNode, nextState) { + actionNode.status = "fulfilled"; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; + actionNode = actionQueue.pending; + null !== actionNode && + ((nextState = actionNode.next), + nextState === actionNode ? (actionQueue.pending = null) - : ((first = first.next), - (last.next = first), - runActionStateAction(actionQueue, setPendingState, setState, first)); - } + : ((nextState = nextState.next), + (actionNode.next = nextState), + runActionStateAction(actionQueue, nextState))); +} +function onActionError(actionQueue, actionNode, error) { + actionNode.status = "rejected"; + actionNode.reason = error; + notifyActionListeners(actionNode); + actionNode = actionQueue.pending; + null !== actionNode && + ((error = actionNode.next), + error === actionNode + ? (actionQueue.pending = null) + : ((error = error.next), + (actionNode.next = error), + runActionStateAction(actionQueue, error))); +} +function notifyActionListeners(actionNode) { + actionNode = actionNode.listeners; + for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); } function actionStateReducer(oldState, newState) { return newState; @@ -5067,9 +5096,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$36 in Component) - void 0 === newProps[propName$36] && - (newProps[propName$36] = Component[propName$36]); + for (var propName$37 in Component) + void 0 === newProps[propName$37] && + (newProps[propName$37] = Component[propName$37]); } return newProps; } @@ -7088,14 +7117,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$75 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$75 = lastTailNode), + for (var lastTailNode$76 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$76 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$75 + null === lastTailNode$76 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$75.sibling = null); + : (lastTailNode$76.sibling = null); } } function bubbleProperties(completedWork) { @@ -7105,19 +7134,19 @@ function bubbleProperties(completedWork) { newChildLanes = 0, subtreeFlags = 0; if (didBailout) - for (var child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags & 31457280), - (subtreeFlags |= child$76.flags & 31457280), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (var child$77 = completedWork.child; null !== child$77; ) + (newChildLanes |= child$77.lanes | child$77.childLanes), + (subtreeFlags |= child$77.subtreeFlags & 31457280), + (subtreeFlags |= child$77.flags & 31457280), + (child$77.return = completedWork), + (child$77 = child$77.sibling); else - for (child$76 = completedWork.child; null !== child$76; ) - (newChildLanes |= child$76.lanes | child$76.childLanes), - (subtreeFlags |= child$76.subtreeFlags), - (subtreeFlags |= child$76.flags), - (child$76.return = completedWork), - (child$76 = child$76.sibling); + for (child$77 = completedWork.child; null !== child$77; ) + (newChildLanes |= child$77.lanes | child$77.childLanes), + (subtreeFlags |= child$77.subtreeFlags), + (subtreeFlags |= child$77.flags), + (child$77.return = completedWork), + (child$77 = child$77.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7615,8 +7644,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { else if ("function" === typeof ref) try { ref(null); - } catch (error$98) { - captureCommitPhaseError(current, nearestMountedAncestor, error$98); + } catch (error$99) { + captureCommitPhaseError(current, nearestMountedAncestor, error$99); } else ref.current = null; } @@ -7721,10 +7750,10 @@ function commitHookEffectListMount(flags, finishedWork) { var effect = (finishedWork = finishedWork.next); do { if ((effect.tag & flags) === flags) { - var create$99 = effect.create, + var create$100 = effect.create, inst = effect.inst; - create$99 = create$99(); - inst.destroy = create$99; + create$100 = create$100(); + inst.destroy = create$100; } effect = effect.next; } while (effect !== finishedWork); @@ -7779,11 +7808,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$100) { + } catch (error$101) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$100 + error$101 ); } } @@ -8244,8 +8273,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { } try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$108) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$108); + } catch (error$109) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$109); } } break; @@ -8291,8 +8320,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { viewConfig.uiViewClassName, updatePayload ); - } catch (error$111) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$111); + } catch (error$112) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$112); } } break; @@ -8312,8 +8341,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { "RCTRawText", { text: current } ); - } catch (error$112) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$112); + } catch (error$113) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$113); } } break; @@ -8425,11 +8454,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { throw Error("Not yet implemented."); - } catch (error$102) { + } catch (error$103) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$102 + error$103 ); } } else if ( @@ -8503,12 +8532,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$103 = JSCompiler_inline_result.stateNode.containerInfo, - before$104 = getHostSibling(finishedWork); + var parent$104 = JSCompiler_inline_result.stateNode.containerInfo, + before$105 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$104, - parent$103 + before$105, + parent$104 ); break; default: @@ -9624,8 +9653,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$120) { - handleThrow(root, thrownValue$120); + } catch (thrownValue$121) { + handleThrow(root, thrownValue$121); } while (1); lanes && root.shellSuspendCounter++; @@ -9737,8 +9766,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$122) { - handleThrow(root, thrownValue$122); + } catch (thrownValue$123) { + handleThrow(root, thrownValue$123); } while (1); resetContextDependencies(); @@ -10701,11 +10730,11 @@ function traverseOwnerTreeUp(hierarchy, instance) { traverseOwnerTreeUp(hierarchy, instance); } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-rc-def67b9b32-20240603" !== isomorphicReactPackageVersion) +if ("19.0.0-rc-67b05be0d2-20240603" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-rc-def67b9b32-20240603\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-rc-67b05be0d2-20240603\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -10752,10 +10781,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1192 = { + devToolsConfig$jscomp$inline_1193 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-rc-def67b9b32-20240603", + version: "19.0.0-rc-67b05be0d2-20240603", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -10771,11 +10800,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1439 = { - bundleType: devToolsConfig$jscomp$inline_1192.bundleType, - version: devToolsConfig$jscomp$inline_1192.version, - rendererPackageName: devToolsConfig$jscomp$inline_1192.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1192.rendererConfig, +var internals$jscomp$inline_1440 = { + bundleType: devToolsConfig$jscomp$inline_1193.bundleType, + version: devToolsConfig$jscomp$inline_1193.version, + rendererPackageName: devToolsConfig$jscomp$inline_1193.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1193.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10791,26 +10820,26 @@ var internals$jscomp$inline_1439 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1192.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1193.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-def67b9b32-20240603" + reconcilerVersion: "19.0.0-rc-67b05be0d2-20240603" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1440 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1441 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1440.isDisabled && - hook$jscomp$inline_1440.supportsFiber + !hook$jscomp$inline_1441.isDisabled && + hook$jscomp$inline_1441.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1440.inject( - internals$jscomp$inline_1439 + (rendererID = hook$jscomp$inline_1441.inject( + internals$jscomp$inline_1440 )), - (injectedHook = hook$jscomp$inline_1440); + (injectedHook = hook$jscomp$inline_1441); } 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 855a298bb2..e9ccd11ab4 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<<744b87428e029ef25ea789adf1f4b310>> + * @generated SignedSource<> */ "use strict"; @@ -897,7 +897,7 @@ eventPluginOrder = Array.prototype.slice.call([ "ReactNativeBridgeEventPlugin" ]); recomputePluginOrdering(); -var injectedNamesToPlugins$jscomp$inline_276 = { +var injectedNamesToPlugins$jscomp$inline_277 = { ResponderEventPlugin: ResponderEventPlugin, ReactNativeBridgeEventPlugin: { eventTypes: {}, @@ -943,32 +943,32 @@ var injectedNamesToPlugins$jscomp$inline_276 = { } } }, - isOrderingDirty$jscomp$inline_277 = !1, - pluginName$jscomp$inline_278; -for (pluginName$jscomp$inline_278 in injectedNamesToPlugins$jscomp$inline_276) + isOrderingDirty$jscomp$inline_278 = !1, + pluginName$jscomp$inline_279; +for (pluginName$jscomp$inline_279 in injectedNamesToPlugins$jscomp$inline_277) if ( - injectedNamesToPlugins$jscomp$inline_276.hasOwnProperty( - pluginName$jscomp$inline_278 + injectedNamesToPlugins$jscomp$inline_277.hasOwnProperty( + pluginName$jscomp$inline_279 ) ) { - var pluginModule$jscomp$inline_279 = - injectedNamesToPlugins$jscomp$inline_276[pluginName$jscomp$inline_278]; + var pluginModule$jscomp$inline_280 = + injectedNamesToPlugins$jscomp$inline_277[pluginName$jscomp$inline_279]; if ( - !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_278) || - namesToPlugins[pluginName$jscomp$inline_278] !== - pluginModule$jscomp$inline_279 + !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_279) || + namesToPlugins[pluginName$jscomp$inline_279] !== + pluginModule$jscomp$inline_280 ) { - if (namesToPlugins[pluginName$jscomp$inline_278]) + if (namesToPlugins[pluginName$jscomp$inline_279]) throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + - (pluginName$jscomp$inline_278 + "`.") + (pluginName$jscomp$inline_279 + "`.") ); - namesToPlugins[pluginName$jscomp$inline_278] = - pluginModule$jscomp$inline_279; - isOrderingDirty$jscomp$inline_277 = !0; + namesToPlugins[pluginName$jscomp$inline_279] = + pluginModule$jscomp$inline_280; + isOrderingDirty$jscomp$inline_278 = !0; } } -isOrderingDirty$jscomp$inline_277 && recomputePluginOrdering(); +isOrderingDirty$jscomp$inline_278 && recomputePluginOrdering(); var instanceCache = new Map(), instanceProps = new Map(); function getInstanceFromTag(tag) { @@ -4301,72 +4301,101 @@ function dispatchActionState( ) { if (isRenderPhaseUpdate(fiber)) throw Error("Cannot update form state while rendering."); + var actionNode = { + payload: payload, + action: actionQueue.action, + next: null, + isTransition: !0, + status: "pending", + value: null, + reason: null, + listeners: [], + then: function (listener) { + actionNode.listeners.push(listener); + } + }; + null !== ReactSharedInternals.T + ? setPendingState(!0) + : (actionNode.isTransition = !1); + setState(actionNode); fiber = actionQueue.pending; null === fiber - ? ((payload = { payload: payload, action: actionQueue.action, next: null }), - (payload.next = actionQueue.pending = payload), - runActionStateAction(actionQueue, setPendingState, setState, payload)) - : (actionQueue.pending = fiber.next = - { payload: payload, action: actionQueue.action, next: fiber.next }); + ? ((actionNode.next = actionQueue.pending = actionNode), + runActionStateAction(actionQueue, actionNode)) + : ((actionNode.next = fiber.next), + (actionQueue.pending = fiber.next = actionNode)); } -function runActionStateAction(actionQueue, setPendingState, setState, node) { - var prevTransition = ReactSharedInternals.T, - currentTransition = {}; - ReactSharedInternals.T = currentTransition; - setPendingState(!0); - var action = node.action; - node = node.payload; - var prevState = actionQueue.state; - try { - var returnValue = action(prevState, node), - onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && - onStartTransitionFinish(currentTransition, returnValue); - null !== returnValue && - "object" === typeof returnValue && - "function" === typeof returnValue.then - ? (returnValue.then( - function (nextState) { - actionQueue.state = nextState; - finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - }, - function () { - return finishRunningActionStateAction( - actionQueue, - setPendingState, - setState - ); - } - ), - setState(returnValue)) - : (setState(returnValue), - (actionQueue.state = returnValue), - finishRunningActionStateAction(actionQueue, setPendingState, setState)); - } catch (error) { - setState({ then: function () {}, status: "rejected", reason: error }), - finishRunningActionStateAction(actionQueue, setPendingState, setState); - } finally { - ReactSharedInternals.T = prevTransition; - } +function runActionStateAction(actionQueue, node) { + var action = node.action, + payload = node.payload, + prevState = actionQueue.state; + if (node.isTransition) { + var prevTransition = ReactSharedInternals.T, + currentTransition = {}; + ReactSharedInternals.T = currentTransition; + try { + var returnValue = action(prevState, payload), + onStartTransitionFinish = ReactSharedInternals.S; + null !== onStartTransitionFinish && + onStartTransitionFinish(currentTransition, returnValue); + handleActionReturnValue(actionQueue, node, returnValue); + } catch (error) { + onActionError(actionQueue, node, error); + } finally { + ReactSharedInternals.T = prevTransition; + } + } else + try { + (prevTransition = action(prevState, payload)), + handleActionReturnValue(actionQueue, node, prevTransition); + } catch (error$38) { + onActionError(actionQueue, node, error$38); + } } -function finishRunningActionStateAction( - actionQueue, - setPendingState, - setState -) { - var last = actionQueue.pending; - if (null !== last) { - var first = last.next; - first === last +function handleActionReturnValue(actionQueue, node, returnValue) { + null !== returnValue && + "object" === typeof returnValue && + "function" === typeof returnValue.then + ? returnValue.then( + function (nextState) { + onActionSuccess(actionQueue, node, nextState); + }, + function (error) { + return onActionError(actionQueue, node, error); + } + ) + : onActionSuccess(actionQueue, node, returnValue); +} +function onActionSuccess(actionQueue, actionNode, nextState) { + actionNode.status = "fulfilled"; + actionNode.value = nextState; + notifyActionListeners(actionNode); + actionQueue.state = nextState; + actionNode = actionQueue.pending; + null !== actionNode && + ((nextState = actionNode.next), + nextState === actionNode ? (actionQueue.pending = null) - : ((first = first.next), - (last.next = first), - runActionStateAction(actionQueue, setPendingState, setState, first)); - } + : ((nextState = nextState.next), + (actionNode.next = nextState), + runActionStateAction(actionQueue, nextState))); +} +function onActionError(actionQueue, actionNode, error) { + actionNode.status = "rejected"; + actionNode.reason = error; + notifyActionListeners(actionNode); + actionNode = actionQueue.pending; + null !== actionNode && + ((error = actionNode.next), + error === actionNode + ? (actionQueue.pending = null) + : ((error = error.next), + (actionNode.next = error), + runActionStateAction(actionQueue, error))); +} +function notifyActionListeners(actionNode) { + actionNode = actionNode.listeners; + for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])(); } function actionStateReducer(oldState, newState) { return newState; @@ -5259,9 +5288,9 @@ function resolveClassComponentProps( (disableDefaultPropsExceptForClasses || !alreadyResolvedDefaultProps) ) { newProps === baseProps && (newProps = assign({}, newProps)); - for (var propName$39 in Component) - void 0 === newProps[propName$39] && - (newProps[propName$39] = Component[propName$39]); + for (var propName$40 in Component) + void 0 === newProps[propName$40] && + (newProps[propName$40] = Component[propName$40]); } return newProps; } @@ -7318,14 +7347,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { break; case "collapsed": lastTailNode = renderState.tail; - for (var lastTailNode$79 = null; null !== lastTailNode; ) - null !== lastTailNode.alternate && (lastTailNode$79 = lastTailNode), + for (var lastTailNode$80 = null; null !== lastTailNode; ) + null !== lastTailNode.alternate && (lastTailNode$80 = lastTailNode), (lastTailNode = lastTailNode.sibling); - null === lastTailNode$79 + null === lastTailNode$80 ? hasRenderedATailFallback || null === renderState.tail ? (renderState.tail = null) : (renderState.tail.sibling = null) - : (lastTailNode$79.sibling = null); + : (lastTailNode$80.sibling = null); } } function bubbleProperties(completedWork) { @@ -7337,53 +7366,53 @@ function bubbleProperties(completedWork) { if (didBailout) if (0 !== (completedWork.mode & 2)) { for ( - var treeBaseDuration$81 = completedWork.selfBaseDuration, - child$82 = completedWork.child; - null !== child$82; + var treeBaseDuration$82 = completedWork.selfBaseDuration, + child$83 = completedWork.child; + null !== child$83; ) - (newChildLanes |= child$82.lanes | child$82.childLanes), - (subtreeFlags |= child$82.subtreeFlags & 31457280), - (subtreeFlags |= child$82.flags & 31457280), - (treeBaseDuration$81 += child$82.treeBaseDuration), - (child$82 = child$82.sibling); - completedWork.treeBaseDuration = treeBaseDuration$81; + (newChildLanes |= child$83.lanes | child$83.childLanes), + (subtreeFlags |= child$83.subtreeFlags & 31457280), + (subtreeFlags |= child$83.flags & 31457280), + (treeBaseDuration$82 += child$83.treeBaseDuration), + (child$83 = child$83.sibling); + completedWork.treeBaseDuration = treeBaseDuration$82; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$82 = completedWork.child; + null !== treeBaseDuration$82; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags & 31457280), - (subtreeFlags |= treeBaseDuration$81.flags & 31457280), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$82.lanes | treeBaseDuration$82.childLanes), + (subtreeFlags |= treeBaseDuration$82.subtreeFlags & 31457280), + (subtreeFlags |= treeBaseDuration$82.flags & 31457280), + (treeBaseDuration$82.return = completedWork), + (treeBaseDuration$82 = treeBaseDuration$82.sibling); else if (0 !== (completedWork.mode & 2)) { - treeBaseDuration$81 = completedWork.actualDuration; - child$82 = completedWork.selfBaseDuration; + treeBaseDuration$82 = completedWork.actualDuration; + child$83 = completedWork.selfBaseDuration; for (var child = completedWork.child; null !== child; ) (newChildLanes |= child.lanes | child.childLanes), (subtreeFlags |= child.subtreeFlags), (subtreeFlags |= child.flags), - (treeBaseDuration$81 += child.actualDuration), - (child$82 += child.treeBaseDuration), + (treeBaseDuration$82 += child.actualDuration), + (child$83 += child.treeBaseDuration), (child = child.sibling); - completedWork.actualDuration = treeBaseDuration$81; - completedWork.treeBaseDuration = child$82; + completedWork.actualDuration = treeBaseDuration$82; + completedWork.treeBaseDuration = child$83; } else for ( - treeBaseDuration$81 = completedWork.child; - null !== treeBaseDuration$81; + treeBaseDuration$82 = completedWork.child; + null !== treeBaseDuration$82; ) (newChildLanes |= - treeBaseDuration$81.lanes | treeBaseDuration$81.childLanes), - (subtreeFlags |= treeBaseDuration$81.subtreeFlags), - (subtreeFlags |= treeBaseDuration$81.flags), - (treeBaseDuration$81.return = completedWork), - (treeBaseDuration$81 = treeBaseDuration$81.sibling); + treeBaseDuration$82.lanes | treeBaseDuration$82.childLanes), + (subtreeFlags |= treeBaseDuration$82.subtreeFlags), + (subtreeFlags |= treeBaseDuration$82.flags), + (treeBaseDuration$82.return = completedWork), + (treeBaseDuration$82 = treeBaseDuration$82.sibling); completedWork.subtreeFlags |= subtreeFlags; completedWork.childLanes = newChildLanes; return didBailout; @@ -7934,8 +7963,8 @@ function safelyDetachRef(current, nearestMountedAncestor) { recordLayoutEffectDuration(current); } else ref(null); - } catch (error$107) { - captureCommitPhaseError(current, nearestMountedAncestor, error$107); + } catch (error$108) { + captureCommitPhaseError(current, nearestMountedAncestor, error$108); } else ref.current = null; } @@ -8069,10 +8098,10 @@ function commitHookEffectListMount(flags, finishedWork) { injectedProfilingHooks.markComponentLayoutEffectMountStarted( finishedWork ); - var create$108 = effect.create, + var create$109 = effect.create, inst = effect.inst; - create$108 = create$108(); - inst.destroy = create$108; + create$109 = create$109(); + inst.destroy = create$109; 0 !== (flags & 8) ? null !== injectedProfilingHooks && "function" === @@ -8100,8 +8129,8 @@ function commitHookLayoutEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$110) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$110); + } catch (error$111) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$111); } } function commitClassCallbacks(finishedWork) { @@ -8181,11 +8210,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { } else try { finishedRoot.componentDidMount(); - } catch (error$111) { + } catch (error$112) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$111 + error$112 ); } else { @@ -8203,11 +8232,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$112) { + } catch (error$113) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$112 + error$113 ); } recordLayoutEffectDuration(finishedWork); @@ -8218,11 +8247,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) { current, finishedRoot.__reactInternalSnapshotBeforeUpdate ); - } catch (error$113) { + } catch (error$114) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$113 + error$114 ); } } @@ -8712,22 +8741,22 @@ function commitMutationEffectsOnFiber(finishedWork, root) { try { startLayoutEffectTimer(), commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$122) { + } catch (error$123) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$122 + error$123 ); } recordLayoutEffectDuration(finishedWork); } else try { commitHookEffectListUnmount(5, finishedWork, finishedWork.return); - } catch (error$123) { + } catch (error$124) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$123 + error$124 ); } } @@ -8774,8 +8803,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { viewConfig.uiViewClassName, updatePayload ); - } catch (error$126) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$126); + } catch (error$127) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$127); } } break; @@ -8795,8 +8824,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) { "RCTRawText", { text: current } ); - } catch (error$127) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$127); + } catch (error$128) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$128); } } break; @@ -8908,11 +8937,11 @@ function commitMutationEffectsOnFiber(finishedWork, root) { if (null === current) try { throw Error("Not yet implemented."); - } catch (error$116) { + } catch (error$117) { captureCommitPhaseError( finishedWork, finishedWork.return, - error$116 + error$117 ); } } else if ( @@ -8986,12 +9015,12 @@ function commitReconciliationEffects(finishedWork) { break; case 3: case 4: - var parent$117 = JSCompiler_inline_result.stateNode.containerInfo, - before$118 = getHostSibling(finishedWork); + var parent$118 = JSCompiler_inline_result.stateNode.containerInfo, + before$119 = getHostSibling(finishedWork); insertOrAppendPlacementNodeIntoContainer( finishedWork, - before$118, - parent$117 + before$119, + parent$118 ); break; default: @@ -9177,8 +9206,8 @@ function commitHookPassiveMountEffects(finishedWork, hookFlags) { } else try { commitHookEffectListMount(hookFlags, finishedWork); - } catch (error$131) { - captureCommitPhaseError(finishedWork, finishedWork.return, error$131); + } catch (error$132) { + captureCommitPhaseError(finishedWork, finishedWork.return, error$132); } } function commitOffscreenPassiveMountEffects(current, finishedWork) { @@ -10196,8 +10225,8 @@ function renderRootSync(root, lanes) { } workLoopSync(); break; - } catch (thrownValue$136) { - handleThrow(root, thrownValue$136); + } catch (thrownValue$137) { + handleThrow(root, thrownValue$137); } while (1); lanes && root.shellSuspendCounter++; @@ -10320,8 +10349,8 @@ function renderRootConcurrent(root, lanes) { } workLoopConcurrent(); break; - } catch (thrownValue$138) { - handleThrow(root, thrownValue$138); + } catch (thrownValue$139) { + handleThrow(root, thrownValue$139); } while (1); resetContextDependencies(); @@ -10683,7 +10712,7 @@ function flushPassiveEffects() { _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit, - commitTime$109 = commitTime, + commitTime$110 = commitTime, phase = null === finishedWork.alternate ? "mount" : "update"; currentUpdateIsNested && (phase = "nested-update"); "function" === typeof onPostCommit && @@ -10691,7 +10720,7 @@ function flushPassiveEffects() { id, phase, passiveEffectDuration, - commitTime$109 + commitTime$110 ); var parentFiber = finishedWork.return; b: for (; null !== parentFiber; ) { @@ -11408,11 +11437,11 @@ function traverseOwnerTreeUp(hierarchy, instance) { traverseOwnerTreeUp(hierarchy, instance); } var isomorphicReactPackageVersion = React.version; -if ("19.0.0-rc-def67b9b32-20240603" !== isomorphicReactPackageVersion) +if ("19.0.0-rc-67b05be0d2-20240603" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-native-renderer: 19.0.0-rc-def67b9b32-20240603\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-native-renderer: 19.0.0-rc-67b05be0d2-20240603\nLearn more: https://react.dev/warnings/version-mismatch") ); if ( "function" !== @@ -11459,10 +11488,10 @@ batchedUpdatesImpl = function (fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1273 = { + devToolsConfig$jscomp$inline_1274 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "19.0.0-rc-def67b9b32-20240603", + version: "19.0.0-rc-67b05be0d2-20240603", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForInstance: getInspectorDataForInstance, @@ -11492,10 +11521,10 @@ var roots = new Map(), } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1273.bundleType, - version: devToolsConfig$jscomp$inline_1273.version, - rendererPackageName: devToolsConfig$jscomp$inline_1273.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1273.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1274.bundleType, + version: devToolsConfig$jscomp$inline_1274.version, + rendererPackageName: devToolsConfig$jscomp$inline_1274.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1274.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -11511,14 +11540,14 @@ var roots = new Map(), return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1273.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1274.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-rc-def67b9b32-20240603" + reconcilerVersion: "19.0.0-rc-67b05be0d2-20240603" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {