Implement Partial Hydration for Activity (#32863)

Stacked on #32862 and #32842.

This means that Activity boundaries now act as boundaries which can have
their effects mounted independently. Just like Suspense boundaries, we
hydrate the outer content first and then start hydrating the content in
an Offscreen lane. Flowing props or interacting with the content
increases the priority just like Suspense boundaries.

This skips emitting even the comments for `<Activity mode="hidden">` so
we don't hydrate those. Instead those are deferred to a later client
render.

The implementation are just forked copies of the SuspenseComponent
branches and then carefully going through each line and tweaking it.

The main interesting bit is that, unlike Suspense, Activity boundaries
don't have fallbacks so all those branches where you might commit a
suspended tree disappears. Instead, if something suspends while
hydration, we can just leave the dehydrated content in place. However,
if something does suspend during client rendering then it should bubble
up to the parent. Therefore, we have to be careful to only
pushSuspenseHandler when hydrating. That's really the main difference.

This just uses the existing basic Activity tests but I've started work
on port all of the applicable Suspense tests in SelectiveHydration-test
and PartialHydration-test to Activity versions.

DiffTrain build for [3ef31d196a](https://github.com/facebook/react/commit/3ef31d196a83e45d4c70b300a265a9c657c386b4)
This commit is contained in:
sebmarkbage
2025-04-22 18:07:17 -07:00
parent 1bc9b2ad48
commit ccc770d61e
36 changed files with 13657 additions and 7899 deletions
+1 -1
View File
@@ -1 +1 @@
17f88c80ed20b4e5f21255d9e1268542a2fbc1bd
3ef31d196a83e45d4c70b300a265a9c657c386b4
+1 -1
View File
@@ -1 +1 @@
17f88c80ed20b4e5f21255d9e1268542a2fbc1bd
3ef31d196a83e45d4c70b300a265a9c657c386b4
+1 -1
View File
@@ -1538,7 +1538,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -1538,7 +1538,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+1 -1
View File
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
+1 -1
View File
@@ -636,4 +636,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -640,7 +640,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+385 -161
View File
@@ -661,6 +661,50 @@ __DEV__ &&
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
if (0 !== (renderLane & 42)) renderLane = 1;
else
switch (renderLane) {
case 2:
renderLane = 1;
break;
case 8:
renderLane = 4;
break;
case 32:
renderLane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
renderLane = 128;
break;
case 268435456:
renderLane = 134217728;
break;
default:
renderLane = 0;
}
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function addFiberToLanesMap(root, fiber, lanes) {
if (isDevToolsPresent)
for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
@@ -4540,6 +4584,11 @@ __DEV__ &&
handler
);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current, fiber);
push(suspenseHandlerStackCursor, fiber, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),
@@ -6394,6 +6443,7 @@ __DEV__ &&
returnFiber = suspenseHandlerStackCursor.current;
if (null !== returnFiber) {
switch (returnFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -6906,6 +6956,42 @@ __DEV__ &&
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
var hiddenProp = nextProps.hidden;
void 0 !== hiddenProp &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === hiddenProp
? "hidden"
: !1 === hiddenProp
? "hidden={false}"
: "hidden={...}",
hiddenProp ? 'mode="hidden"' : 'mode="visible"'
);
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(
workInProgress,
workInProgress.pendingProps
);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -7712,10 +7798,10 @@ __DEV__ &&
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
(showFallback = workInProgress.child),
(showFallback.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -7729,9 +7815,9 @@ __DEV__ &&
((current = enableTransitionTracing
? markerInstanceStack.current
: null),
(renderLanes = nextPrimaryChildren.updateQueue),
(renderLanes = showFallback.updateQueue),
null === renderLanes
? (nextPrimaryChildren.updateQueue = {
? (showFallback.updateQueue = {
transitions: workInProgress,
markerInstances: current,
retryQueue: null
@@ -7749,10 +7835,10 @@ __DEV__ &&
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
(showFallback = workInProgress.child),
(showFallback.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -7787,22 +7873,22 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(showFallback = workInProgress.mode),
(showFallback = nextProps.fallback),
(nextPrimaryChildren = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
showFallback
nextPrimaryChildren
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
(showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2),
(showFallback.flags |= 2),
(nextProps.return = workInProgress),
(nextPrimaryChildren.return = workInProgress),
(nextProps.sibling = nextPrimaryChildren),
(showFallback.return = workInProgress),
(nextProps.sibling = showFallback),
(workInProgress.child = nextProps),
reconcileChildFibers(
workInProgress,
@@ -7819,31 +7905,32 @@ __DEV__ &&
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress = nextPrimaryChildren));
(workInProgress = showFallback));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isSuspenseInstanceFallback())
)
(showFallback = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = showFallback.digest),
(nextPrimaryChildren = showFallback.message),
(nextProps = showFallback.stack),
(showFallback = showFallback.componentStack),
(nextPrimaryChildren = nextPrimaryChildren
? Error(nextPrimaryChildren)
(nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = nextPrimaryChildren.digest),
(showFallback = nextPrimaryChildren.message),
(nextProps = nextPrimaryChildren.stack),
(nextPrimaryChildren = nextPrimaryChildren.componentStack),
(showFallback = showFallback
? Error(showFallback)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
)),
(nextPrimaryChildren.stack = nextProps || ""),
(nextPrimaryChildren.digest = JSCompiler_temp),
(JSCompiler_temp = void 0 === showFallback ? null : showFallback),
(showFallback.stack = nextProps || ""),
(showFallback.digest = JSCompiler_temp),
(JSCompiler_temp =
void 0 === nextPrimaryChildren ? null : nextPrimaryChildren),
(nextProps = {
value: nextPrimaryChildren,
value: showFallback,
source: null,
stack: JSCompiler_temp
}),
"string" === typeof JSCompiler_temp &&
CapturedStacks.set(nextPrimaryChildren, nextProps),
CapturedStacks.set(showFallback, nextProps),
null === hydrationErrors
? (hydrationErrors = [nextProps])
: hydrationErrors.push(nextProps),
@@ -7864,58 +7951,20 @@ __DEV__ &&
didReceiveUpdate || JSCompiler_temp)
) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
nextProps = 1;
break;
case 8:
nextProps = 4;
break;
case 32:
nextProps = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
nextProps = 128;
break;
case 268435456:
nextProps = 134217728;
break;
default:
nextProps = 0;
}
nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps;
if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
}
if (
null !== JSCompiler_temp &&
((nextProps = getBumpedLaneForHydration(
JSCompiler_temp,
renderLanes
)),
0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
isSuspenseInstancePending() || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -7936,37 +7985,37 @@ __DEV__ &&
}
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
showFallback = workInProgress.mode;
showFallback = nextProps.fallback;
nextPrimaryChildren = workInProgress.mode;
didSuspend = current.child;
var currentFallbackChildFragment = didSuspend.sibling;
nextProps = createWorkInProgress(didSuspend, {
nextProps = updateWorkInProgressOffscreenFiber(didSuspend, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712;
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
? (showFallback = createWorkInProgress(
currentFallbackChildFragment,
nextPrimaryChildren
showFallback
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
: ((showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2));
nextPrimaryChildren.return = workInProgress;
(showFallback.flags |= 2));
showFallback.return = workInProgress;
nextProps.return = workInProgress;
nextProps.sibling = nextPrimaryChildren;
nextProps.sibling = showFallback;
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = showFallback.cachePool),
nextProps = showFallback;
showFallback = workInProgress.child;
nextPrimaryChildren = current.child.memoizedState;
null === nextPrimaryChildren
? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = nextPrimaryChildren.cachePool),
null !== didSuspend
? ((currentFallbackChildFragment = CacheContext._currentValue2),
(didSuspend =
@@ -7977,42 +8026,43 @@ __DEV__ &&
}
: didSuspend))
: (didSuspend = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
(nextPrimaryChildren = {
baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
cachePool: didSuspend
}));
nextPrimaryChildren.memoizedState = showFallback;
showFallback.memoizedState = nextPrimaryChildren;
if (
enableTransitionTracing &&
((showFallback = enableTransitionTracing
((nextPrimaryChildren = enableTransitionTracing
? transitionStack.current
: null),
null !== showFallback)
null !== nextPrimaryChildren)
) {
didSuspend = enableTransitionTracing
? markerInstanceStack.current
: null;
currentFallbackChildFragment = nextPrimaryChildren.updateQueue;
currentFallbackChildFragment = showFallback.updateQueue;
var currentOffscreenQueue = current.updateQueue;
null === currentFallbackChildFragment
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue: null
})
: currentFallbackChildFragment === currentOffscreenQueue
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue:
null !== currentOffscreenQueue
? currentOffscreenQueue.retryQueue
: null
})
: ((currentFallbackChildFragment.transitions = showFallback),
: ((currentFallbackChildFragment.transitions =
nextPrimaryChildren),
(currentFallbackChildFragment.markerInstances = didSuspend));
}
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -8023,7 +8073,7 @@ __DEV__ &&
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, {
mode: "visible",
children: nextProps.children
});
@@ -8081,6 +8131,9 @@ __DEV__ &&
};
return offscreenProps;
}
function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
return createWorkInProgress(current, offscreenProps);
}
function retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -8401,6 +8454,14 @@ __DEV__ &&
stateNode.effectDuration = -0;
stateNode.passiveEffectDuration = -0;
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
stateNode = workInProgress.memoizedState;
if (null !== stateNode) {
@@ -8649,10 +8710,10 @@ __DEV__ &&
current.$$typeof === REACT_LAZY_TYPE &&
(workInProgress =
" Did you wrap a component in React.lazy() more than once?");
current = getComponentNameFromType(current) || current;
renderLanes = getComponentNameFromType(current) || current;
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
current +
renderLanes +
". Lazy element type must resolve to a class or function." +
workInProgress
);
@@ -8952,40 +9013,83 @@ __DEV__ &&
workInProgress.child
);
case 31:
return (
(renderLanes = workInProgress.pendingProps),
(returnFiber = renderLanes.hidden),
void 0 !== returnFiber &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === returnFiber
? "hidden"
: !1 === returnFiber
? "hidden={false}"
: "hidden={...}",
returnFiber ? 'mode="hidden"' : 'mode="visible"'
),
(returnFiber = workInProgress.mode),
(renderLanes = {
mode: renderLanes.mode,
children: renderLanes.children
}),
null === current
? ((current = mountWorkInProgressOffscreenFiber(
prevSibling = workInProgress.pendingProps;
nextProps = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
workInProgress = mountActivityChildren(workInProgress, prevSibling);
else if (
((returnFiber = current.memoizedState), null !== returnFiber)
)
b: {
pushDehydratedActivitySuspenseHandler(workInProgress);
if (nextProps) {
if (workInProgress.flags & 256) {
workInProgress.flags &= -257;
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
break b;
}
if (null !== workInProgress.memoizedState) {
workInProgress.child = current.child;
workInProgress.flags |= 128;
workInProgress = null;
break b;
}
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
returnFiber
!1
);
nextProps = 0 !== (renderLanes & current.childLanes);
if (didReceiveUpdate || nextProps) {
prevSibling = workInProgressRoot;
if (
null !== prevSibling &&
((nextProps = getBumpedLaneForHydration(
prevSibling,
renderLanes
)),
0 !== nextProps && nextProps !== returnFiber.retryLane)
)
throw (
((returnFiber.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(prevSibling, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
} else
(workInProgress = mountActivityChildren(
workInProgress,
prevSibling
)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current))
: ((current = createWorkInProgress(current.child, renderLanes)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current)),
workInProgress
);
(workInProgress.flags |= 4096);
}
else
(renderLanes = updateWorkInProgressOffscreenFiber(current.child, {
mode: prevSibling.mode,
children: prevSibling.children
})),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes);
return workInProgress;
case 22:
return updateOffscreenComponent(
current,
@@ -9500,7 +9604,48 @@ __DEV__ &&
bubbleProperties(workInProgress);
return null;
case 31:
return bubbleProperties(workInProgress), null;
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
if (null !== renderLanes) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
);
throw Error(
"Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(renderLanes = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== renderLanes &&
((current = workInProgress.child),
null !== current &&
(workInProgress.treeBaseDuration -=
current.treeBaseDuration));
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -9508,7 +9653,8 @@ __DEV__ &&
(null !== current.memoizedState &&
null !== current.memoizedState.dehydrated)
) {
if (null !== newProps && null !== newProps.dehydrated) {
instance = newProps;
if (null !== instance && null !== instance.dehydrated) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
@@ -9519,11 +9665,11 @@ __DEV__ &&
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null);
(instance = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== newProps &&
null !== instance &&
((instance = workInProgress.child),
null !== instance &&
(workInProgress.treeBaseDuration -=
@@ -9808,6 +9954,22 @@ __DEV__ &&
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (
null !== workInProgress.memoizedState &&
(popSuspenseHandler(workInProgress),
null === workInProgress.alternate)
)
throw Error(
"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
);
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128),
0 !== (workInProgress.mode & 2) &&
transferActualDuration(workInProgress),
workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -9891,6 +10053,10 @@ __DEV__ &&
case 4:
popHostContainer(interruptedWork);
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -10731,16 +10897,19 @@ __DEV__ &&
}
}
function isHydratingParent(current, finishedWork) {
return 13 === finishedWork.tag
? ((current = current.memoizedState),
(finishedWork = finishedWork.memoizedState),
null !== current &&
null !== current.dehydrated &&
(null === finishedWork || null === finishedWork.dehydrated))
: 3 === finishedWork.tag
? current.memoizedState.isDehydrated &&
0 === (finishedWork.flags & 256)
: !1;
return 31 === finishedWork.tag
? ((finishedWork = finishedWork.memoizedState),
null !== current.memoizedState && null === finishedWork)
: 13 === finishedWork.tag
? ((current = current.memoizedState),
(finishedWork = finishedWork.memoizedState),
null !== current &&
null !== current.dehydrated &&
(null === finishedWork || null === finishedWork.dehydrated))
: 3 === finishedWork.tag
? current.memoizedState.isDehydrated &&
0 === (finishedWork.flags & 256)
: !1;
}
function commitBeforeMutationEffects(root, firstChild, committedLanes) {
focusedInstanceHandle = null;
@@ -11047,6 +11216,9 @@ __DEV__ &&
}
} else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 64 &&
@@ -11558,6 +11730,7 @@ __DEV__ &&
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -11792,6 +11965,15 @@ __DEV__ &&
finishedWork.stateNode.effectDuration +=
bubbleNestedEffectDurations(flags);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
@@ -12225,6 +12407,13 @@ __DEV__ &&
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -12598,6 +12787,40 @@ __DEV__ &&
endTime
);
break;
case 31:
flags = inHydratedSubtree;
enableComponentPerformanceTrack &&
((prevProfilerEffectDuration =
null !== finishedWork.alternate
? finishedWork.alternate.memoizedState
: null),
(wasInHydratedSubtree = finishedWork.memoizedState),
null !== prevProfilerEffectDuration && null === wasInHydratedSubtree
? ((wasInHydratedSubtree = finishedWork.deletions),
null !== wasInHydratedSubtree &&
0 < wasInHydratedSubtree.length &&
18 === wasInHydratedSubtree[0].tag
? ((inHydratedSubtree = !1),
(prevProfilerEffectDuration =
prevProfilerEffectDuration.hydrationErrors),
null !== prevProfilerEffectDuration &&
logComponentErrored(
finishedWork,
finishedWork.actualStartTime,
endTime,
prevProfilerEffectDuration
))
: (inHydratedSubtree = !0))
: (inHydratedSubtree = !1));
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
endTime
);
enableComponentPerformanceTrack && (inHydratedSubtree = flags);
break;
case 13:
flags = inHydratedSubtree;
enableComponentPerformanceTrack &&
@@ -15476,6 +15699,7 @@ __DEV__ &&
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -18576,10 +18800,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-www-classic-17f88c80-20250422",
version: "19.2.0-www-classic-3ef31d19-20250422",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18613,7 +18837,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+385 -161
View File
@@ -661,6 +661,50 @@ __DEV__ &&
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
if (0 !== (renderLane & 42)) renderLane = 1;
else
switch (renderLane) {
case 2:
renderLane = 1;
break;
case 8:
renderLane = 4;
break;
case 32:
renderLane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
renderLane = 128;
break;
case 268435456:
renderLane = 134217728;
break;
default:
renderLane = 0;
}
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function addFiberToLanesMap(root, fiber, lanes) {
if (isDevToolsPresent)
for (root = root.pendingUpdatersLaneMap; 0 < lanes; ) {
@@ -4446,6 +4490,11 @@ __DEV__ &&
handler
);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current, fiber);
push(suspenseHandlerStackCursor, fiber, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),
@@ -6300,6 +6349,7 @@ __DEV__ &&
returnFiber = suspenseHandlerStackCursor.current;
if (null !== returnFiber) {
switch (returnFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -6812,6 +6862,42 @@ __DEV__ &&
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
var hiddenProp = nextProps.hidden;
void 0 !== hiddenProp &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === hiddenProp
? "hidden"
: !1 === hiddenProp
? "hidden={false}"
: "hidden={...}",
hiddenProp ? 'mode="hidden"' : 'mode="visible"'
);
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(
workInProgress,
workInProgress.pendingProps
);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -7543,10 +7629,10 @@ __DEV__ &&
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
(showFallback = workInProgress.child),
(showFallback.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -7560,9 +7646,9 @@ __DEV__ &&
((current = enableTransitionTracing
? markerInstanceStack.current
: null),
(renderLanes = nextPrimaryChildren.updateQueue),
(renderLanes = showFallback.updateQueue),
null === renderLanes
? (nextPrimaryChildren.updateQueue = {
? (showFallback.updateQueue = {
transitions: workInProgress,
markerInstances: current,
retryQueue: null
@@ -7580,10 +7666,10 @@ __DEV__ &&
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
(showFallback = workInProgress.child),
(showFallback.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -7618,22 +7704,22 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(showFallback = workInProgress.mode),
(showFallback = nextProps.fallback),
(nextPrimaryChildren = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
showFallback
nextPrimaryChildren
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
(showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2),
(showFallback.flags |= 2),
(nextProps.return = workInProgress),
(nextPrimaryChildren.return = workInProgress),
(nextProps.sibling = nextPrimaryChildren),
(showFallback.return = workInProgress),
(nextProps.sibling = showFallback),
(workInProgress.child = nextProps),
reconcileChildFibers(
workInProgress,
@@ -7650,31 +7736,32 @@ __DEV__ &&
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress = nextPrimaryChildren));
(workInProgress = showFallback));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isSuspenseInstanceFallback())
)
(showFallback = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = showFallback.digest),
(nextPrimaryChildren = showFallback.message),
(nextProps = showFallback.stack),
(showFallback = showFallback.componentStack),
(nextPrimaryChildren = nextPrimaryChildren
? Error(nextPrimaryChildren)
(nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = nextPrimaryChildren.digest),
(showFallback = nextPrimaryChildren.message),
(nextProps = nextPrimaryChildren.stack),
(nextPrimaryChildren = nextPrimaryChildren.componentStack),
(showFallback = showFallback
? Error(showFallback)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
)),
(nextPrimaryChildren.stack = nextProps || ""),
(nextPrimaryChildren.digest = JSCompiler_temp),
(JSCompiler_temp = void 0 === showFallback ? null : showFallback),
(showFallback.stack = nextProps || ""),
(showFallback.digest = JSCompiler_temp),
(JSCompiler_temp =
void 0 === nextPrimaryChildren ? null : nextPrimaryChildren),
(nextProps = {
value: nextPrimaryChildren,
value: showFallback,
source: null,
stack: JSCompiler_temp
}),
"string" === typeof JSCompiler_temp &&
CapturedStacks.set(nextPrimaryChildren, nextProps),
CapturedStacks.set(showFallback, nextProps),
null === hydrationErrors
? (hydrationErrors = [nextProps])
: hydrationErrors.push(nextProps),
@@ -7695,58 +7782,20 @@ __DEV__ &&
didReceiveUpdate || JSCompiler_temp)
) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
nextProps = 1;
break;
case 8:
nextProps = 4;
break;
case 32:
nextProps = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
nextProps = 128;
break;
case 268435456:
nextProps = 134217728;
break;
default:
nextProps = 0;
}
nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps;
if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
}
if (
null !== JSCompiler_temp &&
((nextProps = getBumpedLaneForHydration(
JSCompiler_temp,
renderLanes
)),
0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
isSuspenseInstancePending() || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -7767,37 +7816,37 @@ __DEV__ &&
}
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
showFallback = workInProgress.mode;
showFallback = nextProps.fallback;
nextPrimaryChildren = workInProgress.mode;
didSuspend = current.child;
var currentFallbackChildFragment = didSuspend.sibling;
nextProps = createWorkInProgress(didSuspend, {
nextProps = updateWorkInProgressOffscreenFiber(didSuspend, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712;
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
? (showFallback = createWorkInProgress(
currentFallbackChildFragment,
nextPrimaryChildren
showFallback
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
: ((showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2));
nextPrimaryChildren.return = workInProgress;
(showFallback.flags |= 2));
showFallback.return = workInProgress;
nextProps.return = workInProgress;
nextProps.sibling = nextPrimaryChildren;
nextProps.sibling = showFallback;
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = showFallback.cachePool),
nextProps = showFallback;
showFallback = workInProgress.child;
nextPrimaryChildren = current.child.memoizedState;
null === nextPrimaryChildren
? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = nextPrimaryChildren.cachePool),
null !== didSuspend
? ((currentFallbackChildFragment = CacheContext._currentValue2),
(didSuspend =
@@ -7808,42 +7857,43 @@ __DEV__ &&
}
: didSuspend))
: (didSuspend = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
(nextPrimaryChildren = {
baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
cachePool: didSuspend
}));
nextPrimaryChildren.memoizedState = showFallback;
showFallback.memoizedState = nextPrimaryChildren;
if (
enableTransitionTracing &&
((showFallback = enableTransitionTracing
((nextPrimaryChildren = enableTransitionTracing
? transitionStack.current
: null),
null !== showFallback)
null !== nextPrimaryChildren)
) {
didSuspend = enableTransitionTracing
? markerInstanceStack.current
: null;
currentFallbackChildFragment = nextPrimaryChildren.updateQueue;
currentFallbackChildFragment = showFallback.updateQueue;
var currentOffscreenQueue = current.updateQueue;
null === currentFallbackChildFragment
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue: null
})
: currentFallbackChildFragment === currentOffscreenQueue
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue:
null !== currentOffscreenQueue
? currentOffscreenQueue.retryQueue
: null
})
: ((currentFallbackChildFragment.transitions = showFallback),
: ((currentFallbackChildFragment.transitions =
nextPrimaryChildren),
(currentFallbackChildFragment.markerInstances = didSuspend));
}
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -7854,7 +7904,7 @@ __DEV__ &&
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, {
mode: "visible",
children: nextProps.children
});
@@ -7912,6 +7962,9 @@ __DEV__ &&
};
return offscreenProps;
}
function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
return createWorkInProgress(current, offscreenProps);
}
function retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -8231,6 +8284,14 @@ __DEV__ &&
stateNode.effectDuration = -0;
stateNode.passiveEffectDuration = -0;
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
stateNode = workInProgress.memoizedState;
if (null !== stateNode) {
@@ -8478,10 +8539,10 @@ __DEV__ &&
current.$$typeof === REACT_LAZY_TYPE &&
(workInProgress =
" Did you wrap a component in React.lazy() more than once?");
current = getComponentNameFromType(current) || current;
renderLanes = getComponentNameFromType(current) || current;
throw Error(
"Element type is invalid. Received a promise that resolves to: " +
current +
renderLanes +
". Lazy element type must resolve to a class or function." +
workInProgress
);
@@ -8784,40 +8845,83 @@ __DEV__ &&
workInProgress.child
);
case 31:
return (
(renderLanes = workInProgress.pendingProps),
(returnFiber = renderLanes.hidden),
void 0 !== returnFiber &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === returnFiber
? "hidden"
: !1 === returnFiber
? "hidden={false}"
: "hidden={...}",
returnFiber ? 'mode="hidden"' : 'mode="visible"'
),
(returnFiber = workInProgress.mode),
(renderLanes = {
mode: renderLanes.mode,
children: renderLanes.children
}),
null === current
? ((current = mountWorkInProgressOffscreenFiber(
prevSibling = workInProgress.pendingProps;
nextProps = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
workInProgress = mountActivityChildren(workInProgress, prevSibling);
else if (
((returnFiber = current.memoizedState), null !== returnFiber)
)
b: {
pushDehydratedActivitySuspenseHandler(workInProgress);
if (nextProps) {
if (workInProgress.flags & 256) {
workInProgress.flags &= -257;
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
break b;
}
if (null !== workInProgress.memoizedState) {
workInProgress.child = current.child;
workInProgress.flags |= 128;
workInProgress = null;
break b;
}
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
returnFiber
!1
);
nextProps = 0 !== (renderLanes & current.childLanes);
if (didReceiveUpdate || nextProps) {
prevSibling = workInProgressRoot;
if (
null !== prevSibling &&
((nextProps = getBumpedLaneForHydration(
prevSibling,
renderLanes
)),
0 !== nextProps && nextProps !== returnFiber.retryLane)
)
throw (
((returnFiber.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(prevSibling, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
} else
(workInProgress = mountActivityChildren(
workInProgress,
prevSibling
)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current))
: ((current = createWorkInProgress(current.child, renderLanes)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current)),
workInProgress
);
(workInProgress.flags |= 4096);
}
else
(renderLanes = updateWorkInProgressOffscreenFiber(current.child, {
mode: prevSibling.mode,
children: prevSibling.children
})),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes);
return workInProgress;
case 22:
return updateOffscreenComponent(
current,
@@ -9326,7 +9430,48 @@ __DEV__ &&
bubbleProperties(workInProgress);
return null;
case 31:
return bubbleProperties(workInProgress), null;
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
if (null !== renderLanes) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
);
throw Error(
"Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(renderLanes = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== renderLanes &&
((current = workInProgress.child),
null !== current &&
(workInProgress.treeBaseDuration -=
current.treeBaseDuration));
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -9334,7 +9479,8 @@ __DEV__ &&
(null !== current.memoizedState &&
null !== current.memoizedState.dehydrated)
) {
if (null !== newProps && null !== newProps.dehydrated) {
instance = newProps;
if (null !== instance && null !== instance.dehydrated) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
@@ -9345,11 +9491,11 @@ __DEV__ &&
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null);
(instance = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== newProps &&
null !== instance &&
((instance = workInProgress.child),
null !== instance &&
(workInProgress.treeBaseDuration -=
@@ -9631,6 +9777,22 @@ __DEV__ &&
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (
null !== workInProgress.memoizedState &&
(popSuspenseHandler(workInProgress),
null === workInProgress.alternate)
)
throw Error(
"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
);
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128),
0 !== (workInProgress.mode & 2) &&
transferActualDuration(workInProgress),
workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -9709,6 +9871,10 @@ __DEV__ &&
case 4:
popHostContainer(interruptedWork);
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -10549,16 +10715,19 @@ __DEV__ &&
}
}
function isHydratingParent(current, finishedWork) {
return 13 === finishedWork.tag
? ((current = current.memoizedState),
(finishedWork = finishedWork.memoizedState),
null !== current &&
null !== current.dehydrated &&
(null === finishedWork || null === finishedWork.dehydrated))
: 3 === finishedWork.tag
? current.memoizedState.isDehydrated &&
0 === (finishedWork.flags & 256)
: !1;
return 31 === finishedWork.tag
? ((finishedWork = finishedWork.memoizedState),
null !== current.memoizedState && null === finishedWork)
: 13 === finishedWork.tag
? ((current = current.memoizedState),
(finishedWork = finishedWork.memoizedState),
null !== current &&
null !== current.dehydrated &&
(null === finishedWork || null === finishedWork.dehydrated))
: 3 === finishedWork.tag
? current.memoizedState.isDehydrated &&
0 === (finishedWork.flags & 256)
: !1;
}
function commitBeforeMutationEffects(root, firstChild, committedLanes) {
focusedInstanceHandle = null;
@@ -10865,6 +11034,9 @@ __DEV__ &&
}
} else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 64 &&
@@ -11376,6 +11548,7 @@ __DEV__ &&
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -11610,6 +11783,15 @@ __DEV__ &&
finishedWork.stateNode.effectDuration +=
bubbleNestedEffectDurations(flags);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
@@ -12043,6 +12225,13 @@ __DEV__ &&
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -12416,6 +12605,40 @@ __DEV__ &&
endTime
);
break;
case 31:
flags = inHydratedSubtree;
enableComponentPerformanceTrack &&
((prevProfilerEffectDuration =
null !== finishedWork.alternate
? finishedWork.alternate.memoizedState
: null),
(wasInHydratedSubtree = finishedWork.memoizedState),
null !== prevProfilerEffectDuration && null === wasInHydratedSubtree
? ((wasInHydratedSubtree = finishedWork.deletions),
null !== wasInHydratedSubtree &&
0 < wasInHydratedSubtree.length &&
18 === wasInHydratedSubtree[0].tag
? ((inHydratedSubtree = !1),
(prevProfilerEffectDuration =
prevProfilerEffectDuration.hydrationErrors),
null !== prevProfilerEffectDuration &&
logComponentErrored(
finishedWork,
finishedWork.actualStartTime,
endTime,
prevProfilerEffectDuration
))
: (inHydratedSubtree = !0))
: (inHydratedSubtree = !1));
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions,
endTime
);
enableComponentPerformanceTrack && (inHydratedSubtree = flags);
break;
case 13:
flags = inHydratedSubtree;
enableComponentPerformanceTrack &&
@@ -15290,6 +15513,7 @@ __DEV__ &&
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -18348,10 +18572,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-www-modern-17f88c80-20250422",
version: "19.2.0-www-modern-3ef31d19-20250422",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18385,7 +18609,7 @@ __DEV__ &&
exports.Shape = Shape;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
+357 -199
View File
@@ -558,6 +558,50 @@ function markRootEntangled(root, entangledLanes) {
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
if (0 !== (renderLane & 42)) renderLane = 1;
else
switch (renderLane) {
case 2:
renderLane = 1;
break;
case 8:
renderLane = 4;
break;
case 32:
renderLane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
renderLane = 128;
break;
case 268435456:
renderLane = 134217728;
break;
default:
renderLane = 0;
}
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function getTransitionsForLanes(root, lanes) {
if (!enableTransitionTracing) return null;
for (var transitionsForLanes = []; 0 < lanes; ) {
@@ -2853,6 +2897,11 @@ function pushPrimaryTreeSuspenseHandler(handler) {
? push(suspenseHandlerStackCursor, handler)
: push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current);
push(suspenseHandlerStackCursor, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current),
@@ -4461,6 +4510,7 @@ function throwException(
returnFiber = suspenseHandlerStackCursor.current;
if (null !== returnFiber) {
switch (returnFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -4919,6 +4969,28 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(workInProgress, workInProgress.pendingProps);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -5372,10 +5444,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback = workInProgress.child),
(showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)),
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -5389,9 +5460,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
((current = enableTransitionTracing
? markerInstanceStack.current
: null),
(renderLanes = nextPrimaryChildren.updateQueue),
(renderLanes = showFallback.updateQueue),
null === renderLanes
? (nextPrimaryChildren.updateQueue = {
? (showFallback.updateQueue = {
transitions: workInProgress,
markerInstances: current,
retryQueue: null
@@ -5409,10 +5480,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback = workInProgress.child),
(showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)),
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -5441,22 +5511,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(showFallback = workInProgress.mode),
(showFallback = nextProps.fallback),
(nextPrimaryChildren = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
showFallback
nextPrimaryChildren
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
(showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2),
(showFallback.flags |= 2),
(nextProps.return = workInProgress),
(nextPrimaryChildren.return = workInProgress),
(nextProps.sibling = nextPrimaryChildren),
(showFallback.return = workInProgress),
(nextProps.sibling = showFallback),
(workInProgress.child = nextProps),
reconcileChildFibers(
workInProgress,
@@ -5473,7 +5543,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress = nextPrimaryChildren));
(workInProgress = showFallback));
else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2()))
(JSCompiler_temp = shim$2().digest),
(nextProps = Error(formatProdErrorMessage(419))),
@@ -5495,58 +5565,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didReceiveUpdate || JSCompiler_temp)
) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
nextProps = 1;
break;
case 8:
nextProps = 4;
break;
case 32:
nextProps = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
nextProps = 128;
break;
case 268435456:
nextProps = 134217728;
break;
default:
nextProps = 0;
}
nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps;
if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
}
if (
null !== JSCompiler_temp &&
((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),
0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
shim$2() || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -5567,37 +5596,37 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
}
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
showFallback = workInProgress.mode;
showFallback = nextProps.fallback;
nextPrimaryChildren = workInProgress.mode;
didSuspend = current.child;
var currentFallbackChildFragment = didSuspend.sibling;
nextProps = createWorkInProgress(didSuspend, {
nextProps = updateWorkInProgressOffscreenFiber(didSuspend, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712;
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
? (showFallback = createWorkInProgress(
currentFallbackChildFragment,
nextPrimaryChildren
showFallback
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
: ((showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2));
nextPrimaryChildren.return = workInProgress;
(showFallback.flags |= 2));
showFallback.return = workInProgress;
nextProps.return = workInProgress;
nextProps.sibling = nextPrimaryChildren;
nextProps.sibling = showFallback;
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = showFallback.cachePool),
nextProps = showFallback;
showFallback = workInProgress.child;
nextPrimaryChildren = current.child.memoizedState;
null === nextPrimaryChildren
? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = nextPrimaryChildren.cachePool),
null !== didSuspend
? ((currentFallbackChildFragment = CacheContext._currentValue2),
(didSuspend =
@@ -5608,40 +5637,40 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
}
: didSuspend))
: (didSuspend = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
(nextPrimaryChildren = {
baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
cachePool: didSuspend
}));
nextPrimaryChildren.memoizedState = showFallback;
showFallback.memoizedState = nextPrimaryChildren;
if (
enableTransitionTracing &&
((showFallback = enableTransitionTracing
((nextPrimaryChildren = enableTransitionTracing
? transitionStack.current
: null),
null !== showFallback)
null !== nextPrimaryChildren)
) {
didSuspend = enableTransitionTracing ? markerInstanceStack.current : null;
currentFallbackChildFragment = nextPrimaryChildren.updateQueue;
currentFallbackChildFragment = showFallback.updateQueue;
var currentOffscreenQueue = current.updateQueue;
null === currentFallbackChildFragment
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue: null
})
: currentFallbackChildFragment === currentOffscreenQueue
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue:
null !== currentOffscreenQueue
? currentOffscreenQueue.retryQueue
: null
})
: ((currentFallbackChildFragment.transitions = showFallback),
: ((currentFallbackChildFragment.transitions = nextPrimaryChildren),
(currentFallbackChildFragment.markerInstances = didSuspend));
}
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -5652,7 +5681,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, {
mode: "visible",
children: nextProps.children
});
@@ -5709,6 +5738,9 @@ function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
};
return offscreenProps;
}
function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
return createWorkInProgress(current, offscreenProps);
}
function retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -5906,10 +5938,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
workInProgress.memoizedProps.value
);
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
var state = workInProgress.memoizedState;
if (null !== state) {
if (null !== state.dehydrated)
var state$80 = workInProgress.memoizedState;
if (null !== state$80) {
if (null !== state$80.dehydrated)
return (
pushPrimaryTreeSuspenseHandler(workInProgress),
(workInProgress.flags |= 128),
@@ -5929,17 +5969,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
break;
case 19:
var didSuspendBefore = 0 !== (current.flags & 128);
state = 0 !== (renderLanes & workInProgress.childLanes);
state ||
state$80 = 0 !== (renderLanes & workInProgress.childLanes);
state$80 ||
(propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
),
(state = 0 !== (renderLanes & workInProgress.childLanes)));
(state$80 = 0 !== (renderLanes & workInProgress.childLanes)));
if (didSuspendBefore) {
if (state)
if (state$80)
return updateSuspenseListComponent(
current,
workInProgress,
@@ -5953,7 +5993,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
(didSuspendBefore.tail = null),
(didSuspendBefore.lastEffect = null));
push(suspenseStackCursor, suspenseStackCursor.current);
if (state) break;
if (state$80) break;
else return null;
case 22:
return (
@@ -5970,8 +6010,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
break;
case 25:
if (enableTransitionTracing) {
state = workInProgress.stateNode;
null !== state && pushMarkerInstance(workInProgress, state);
state$80 = workInProgress.stateNode;
null !== state$80 && pushMarkerInstance(workInProgress, state$80);
break;
}
case 23:
@@ -6279,26 +6319,73 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress.child
);
case 31:
return (
(props = workInProgress.pendingProps),
(renderLanes = workInProgress.mode),
(props = { mode: props.mode, children: props.children }),
null === current
? ((renderLanes = mountWorkInProgressOffscreenFiber(
props,
init = workInProgress.pendingProps;
nextProps = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
workInProgress = mountActivityChildren(workInProgress, init);
else if (((props = current.memoizedState), null !== props))
b: {
pushDehydratedActivitySuspenseHandler(workInProgress);
if (nextProps) {
if (workInProgress.flags & 256) {
workInProgress.flags &= -257;
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
break b;
}
if (null !== workInProgress.memoizedState) {
workInProgress.child = current.child;
workInProgress.flags |= 128;
workInProgress = null;
break b;
}
throw Error(formatProdErrorMessage(558));
}
didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
);
nextProps = 0 !== (renderLanes & current.childLanes);
if (didReceiveUpdate || nextProps) {
init = workInProgressRoot;
if (
null !== init &&
((nextProps = getBumpedLaneForHydration(init, renderLanes)),
0 !== nextProps && nextProps !== props.retryLane)
)
throw (
((props.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(init, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
)),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes))
: ((renderLanes = createWorkInProgress(current.child, props)),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes)),
workInProgress
);
);
} else
(workInProgress = mountActivityChildren(workInProgress, init)),
(workInProgress.flags |= 4096);
}
else
(renderLanes = updateWorkInProgressOffscreenFiber(current.child, {
mode: init.mode,
children: init.children
})),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes);
return workInProgress;
case 22:
return updateOffscreenComponent(
current,
@@ -6550,14 +6637,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
break;
case "collapsed":
lastTailNode = renderState.tail;
for (var lastTailNode$90 = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (lastTailNode$90 = lastTailNode),
for (var lastTailNode$91 = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (lastTailNode$91 = lastTailNode),
(lastTailNode = lastTailNode.sibling);
null === lastTailNode$90
null === lastTailNode$91
? hasRenderedATailFallback || null === renderState.tail
? (renderState.tail = null)
: (renderState.tail.sibling = null)
: (lastTailNode$90.sibling = null);
: (lastTailNode$91.sibling = null);
}
}
function bubbleProperties(completedWork) {
@@ -6567,19 +6654,19 @@ function bubbleProperties(completedWork) {
newChildLanes = 0,
subtreeFlags = 0;
if (didBailout)
for (var child$91 = completedWork.child; null !== child$91; )
(newChildLanes |= child$91.lanes | child$91.childLanes),
(subtreeFlags |= child$91.subtreeFlags & 65011712),
(subtreeFlags |= child$91.flags & 65011712),
(child$91.return = completedWork),
(child$91 = child$91.sibling);
for (var child$92 = completedWork.child; null !== child$92; )
(newChildLanes |= child$92.lanes | child$92.childLanes),
(subtreeFlags |= child$92.subtreeFlags & 65011712),
(subtreeFlags |= child$92.flags & 65011712),
(child$92.return = completedWork),
(child$92 = child$92.sibling);
else
for (child$91 = completedWork.child; null !== child$91; )
(newChildLanes |= child$91.lanes | child$91.childLanes),
(subtreeFlags |= child$91.subtreeFlags),
(subtreeFlags |= child$91.flags),
(child$91.return = completedWork),
(child$91 = child$91.sibling);
for (child$92 = completedWork.child; null !== child$92; )
(newChildLanes |= child$92.lanes | child$92.childLanes),
(subtreeFlags |= child$92.subtreeFlags),
(subtreeFlags |= child$92.flags),
(child$92.return = completedWork),
(child$92 = child$92.sibling);
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
@@ -6718,7 +6805,35 @@ function completeWork(current, workInProgress, renderLanes) {
bubbleProperties(workInProgress);
return null;
case 31:
return bubbleProperties(workInProgress), null;
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
if (null !== renderLanes) {
if (null === current) {
throw Error(formatProdErrorMessage(318));
throw Error(formatProdErrorMessage(556));
}
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(formatProdErrorMessage(558));
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -6761,11 +6876,11 @@ function completeWork(current, workInProgress, renderLanes) {
null !== newProps.alternate.memoizedState &&
null !== newProps.alternate.memoizedState.cachePool &&
(instance = newProps.alternate.memoizedState.cachePool.pool);
var cache$96 = null;
var cache$99 = null;
null !== newProps.memoizedState &&
null !== newProps.memoizedState.cachePool &&
(cache$96 = newProps.memoizedState.cachePool.pool);
cache$96 !== instance && (newProps.flags |= 2048);
(cache$99 = newProps.memoizedState.cachePool.pool);
cache$99 !== instance && (newProps.flags |= 2048);
}
renderLanes !== current &&
(enableTransitionTracing && (workInProgress.child.flags |= 2048),
@@ -6793,8 +6908,8 @@ function completeWork(current, workInProgress, renderLanes) {
instance = workInProgress.memoizedState;
if (null === instance) return bubbleProperties(workInProgress), null;
newProps = 0 !== (workInProgress.flags & 128);
cache$96 = instance.rendering;
if (null === cache$96)
cache$99 = instance.rendering;
if (null === cache$99)
if (newProps) cutOffTailIfNeeded(instance, !1);
else {
if (
@@ -6802,11 +6917,11 @@ function completeWork(current, workInProgress, renderLanes) {
(null !== current && 0 !== (current.flags & 128))
)
for (current = workInProgress.child; null !== current; ) {
cache$96 = findFirstSuspended(current);
if (null !== cache$96) {
cache$99 = findFirstSuspended(current);
if (null !== cache$99) {
workInProgress.flags |= 128;
cutOffTailIfNeeded(instance, !1);
current = cache$96.updateQueue;
current = cache$99.updateQueue;
workInProgress.updateQueue = current;
scheduleRetryEffect(workInProgress, current);
workInProgress.subtreeFlags = 0;
@@ -6831,7 +6946,7 @@ function completeWork(current, workInProgress, renderLanes) {
}
else {
if (!newProps)
if (((current = findFirstSuspended(cache$96)), null !== current)) {
if (((current = findFirstSuspended(cache$99)), null !== current)) {
if (
((workInProgress.flags |= 128),
(newProps = !0),
@@ -6841,7 +6956,7 @@ function completeWork(current, workInProgress, renderLanes) {
cutOffTailIfNeeded(instance, !0),
null === instance.tail &&
"hidden" === instance.tailMode &&
!cache$96.alternate)
!cache$99.alternate)
)
return bubbleProperties(workInProgress), null;
} else
@@ -6853,13 +6968,13 @@ function completeWork(current, workInProgress, renderLanes) {
cutOffTailIfNeeded(instance, !1),
(workInProgress.lanes = 4194304));
instance.isBackwards
? ((cache$96.sibling = workInProgress.child),
(workInProgress.child = cache$96))
? ((cache$99.sibling = workInProgress.child),
(workInProgress.child = cache$99))
: ((current = instance.last),
null !== current
? (current.sibling = cache$96)
: (workInProgress.child = cache$96),
(instance.last = cache$96));
? (current.sibling = cache$99)
: (workInProgress.child = cache$99),
(instance.last = cache$99));
}
if (null !== instance.tail)
return (
@@ -6982,6 +7097,16 @@ function unwindWork(current, workInProgress) {
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (
null !== workInProgress.memoizedState &&
(popSuspenseHandler(workInProgress), null === workInProgress.alternate)
)
throw Error(formatProdErrorMessage(340));
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -7059,6 +7184,10 @@ function unwindInterruptedWork(current, interruptedWork) {
case 4:
popHostContainer();
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -7231,8 +7360,8 @@ function safelyDetachRef(current, nearestMountedAncestor) {
else if ("function" === typeof ref)
try {
ref(null);
} catch (error$115) {
captureCommitPhaseError(current, nearestMountedAncestor, error$115);
} catch (error$119) {
captureCommitPhaseError(current, nearestMountedAncestor, error$119);
}
else ref.current = null;
}
@@ -7678,11 +7807,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
current,
finishedRoot.__reactInternalSnapshotBeforeUpdate
);
} catch (error$113) {
} catch (error$117) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error$113
error$117
);
}
}
@@ -7721,6 +7850,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
case 12:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 64 &&
@@ -8133,6 +8265,7 @@ function commitDeletionEffectsOnFiber(
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -8285,6 +8418,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
@@ -8491,12 +8633,12 @@ function commitReconciliationEffects(finishedWork) {
break;
case 3:
case 4:
var parent$116 = hostParentFiber.stateNode.containerInfo,
before$117 = getHostSibling(finishedWork);
var parent$120 = hostParentFiber.stateNode.containerInfo,
before$121 = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(
finishedWork,
before$117,
parent$116
before$121,
parent$120
);
break;
default:
@@ -8636,6 +8778,13 @@ function recursivelyTraverseReappearLayoutEffects(
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -8886,6 +9035,14 @@ function commitPassiveMountOnFiber(
committedTransitions
);
break;
case 31:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -8909,14 +9066,14 @@ function commitPassiveMountOnFiber(
);
break;
case 22:
var instance$124 = finishedWork.stateNode,
current$125 = finishedWork.alternate;
var instance$129 = finishedWork.stateNode,
current$130 = finishedWork.alternate;
null !== finishedWork.memoizedState
? (isViewTransitionEligible &&
null !== current$125 &&
null === current$125.memoizedState &&
restoreEnterOrExitViewTransitions(current$125),
instance$124._visibility & 2
null !== current$130 &&
null === current$130.memoizedState &&
restoreEnterOrExitViewTransitions(current$130),
instance$129._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
@@ -8928,17 +9085,17 @@ function commitPassiveMountOnFiber(
finishedWork
))
: (isViewTransitionEligible &&
null !== current$125 &&
null !== current$125.memoizedState &&
null !== current$130 &&
null !== current$130.memoizedState &&
restoreEnterOrExitViewTransitions(finishedWork),
instance$124._visibility & 2
instance$129._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
)
: ((instance$124._visibility |= 2),
: ((instance$129._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -8948,9 +9105,9 @@ function commitPassiveMountOnFiber(
)));
flags & 2048 &&
commitOffscreenPassiveMountEffects(
current$125,
current$130,
finishedWork,
instance$124
instance$129
);
break;
case 24:
@@ -9038,9 +9195,9 @@ function recursivelyTraverseReconnectPassiveEffects(
);
break;
case 22:
var instance$127 = finishedWork.stateNode;
var instance$132 = finishedWork.stateNode;
null !== finishedWork.memoizedState
? instance$127._visibility & 2
? instance$132._visibility & 2
? recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -9052,7 +9209,7 @@ function recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork
)
: ((instance$127._visibility |= 2),
: ((instance$132._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -9065,7 +9222,7 @@ function recursivelyTraverseReconnectPassiveEffects(
commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork,
instance$127
instance$132
);
break;
case 24:
@@ -10014,8 +10171,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) {
workLoopSync();
exitStatus = workInProgressRootExitStatus;
break;
} catch (thrownValue$139) {
handleThrow(root, thrownValue$139);
} catch (thrownValue$144) {
handleThrow(root, thrownValue$144);
}
while (1);
lanes && root.shellSuspendCounter++;
@@ -10130,8 +10287,8 @@ function renderRootConcurrent(root, lanes) {
}
workLoopConcurrentByScheduler();
break;
} catch (thrownValue$141) {
handleThrow(root, thrownValue$141);
} catch (thrownValue$146) {
handleThrow(root, thrownValue$146);
}
while (1);
lastContextDependency = currentlyRenderingFiber$1 = null;
@@ -10697,6 +10854,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) {
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -11252,24 +11410,24 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component);
var internals$jscomp$inline_1613 = {
var internals$jscomp$inline_1619 = {
bundleType: 0,
version: "19.2.0-www-classic-17f88c80-20250422",
version: "19.2.0-www-classic-3ef31d19-20250422",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1614 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1620 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1614.isDisabled &&
hook$jscomp$inline_1614.supportsFiber
!hook$jscomp$inline_1620.isDisabled &&
hook$jscomp$inline_1620.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1614.inject(
internals$jscomp$inline_1613
(rendererID = hook$jscomp$inline_1620.inject(
internals$jscomp$inline_1619
)),
(injectedHook = hook$jscomp$inline_1614);
(injectedHook = hook$jscomp$inline_1620);
} catch (err) {}
}
var Path = Mode$1.Path;
@@ -11283,4 +11441,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
+357 -199
View File
@@ -486,6 +486,50 @@ function markRootEntangled(root, entangledLanes) {
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
if (0 !== (renderLane & 42)) renderLane = 1;
else
switch (renderLane) {
case 2:
renderLane = 1;
break;
case 8:
renderLane = 4;
break;
case 32:
renderLane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
renderLane = 128;
break;
case 268435456:
renderLane = 134217728;
break;
default:
renderLane = 0;
}
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function getTransitionsForLanes(root, lanes) {
if (!enableTransitionTracing) return null;
for (var transitionsForLanes = []; 0 < lanes; ) {
@@ -2708,6 +2752,11 @@ function pushPrimaryTreeSuspenseHandler(handler) {
? push(suspenseHandlerStackCursor, handler)
: push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current);
push(suspenseHandlerStackCursor, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current),
@@ -4316,6 +4365,7 @@ function throwException(
returnFiber = suspenseHandlerStackCursor.current;
if (null !== returnFiber) {
switch (returnFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -4774,6 +4824,28 @@ function deferHiddenOffscreenComponent(
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(workInProgress, workInProgress.pendingProps);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -5150,10 +5222,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback = workInProgress.child),
(showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)),
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -5167,9 +5238,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
((current = enableTransitionTracing
? markerInstanceStack.current
: null),
(renderLanes = nextPrimaryChildren.updateQueue),
(renderLanes = showFallback.updateQueue),
null === renderLanes
? (nextPrimaryChildren.updateQueue = {
? (showFallback.updateQueue = {
transitions: workInProgress,
markerInstances: current,
retryQueue: null
@@ -5187,10 +5258,9 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend,
renderLanes
)),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback = workInProgress.child),
(showFallback.memoizedState = mountSuspenseOffscreenState(renderLanes)),
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -5219,22 +5289,22 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(showFallback = workInProgress.mode),
(showFallback = nextProps.fallback),
(nextPrimaryChildren = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
showFallback
nextPrimaryChildren
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
(showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2),
(showFallback.flags |= 2),
(nextProps.return = workInProgress),
(nextPrimaryChildren.return = workInProgress),
(nextProps.sibling = nextPrimaryChildren),
(showFallback.return = workInProgress),
(nextProps.sibling = showFallback),
(workInProgress.child = nextProps),
reconcileChildFibers(
workInProgress,
@@ -5251,7 +5321,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress = nextPrimaryChildren));
(workInProgress = showFallback));
else if ((pushPrimaryTreeSuspenseHandler(workInProgress), shim$2()))
(JSCompiler_temp = shim$2().digest),
(nextProps = Error(formatProdErrorMessage(419))),
@@ -5273,58 +5343,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didReceiveUpdate || JSCompiler_temp)
) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
nextProps = 1;
break;
case 8:
nextProps = 4;
break;
case 32:
nextProps = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
nextProps = 128;
break;
case 268435456:
nextProps = 134217728;
break;
default:
nextProps = 0;
}
nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps;
if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
}
if (
null !== JSCompiler_temp &&
((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),
0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
shim$2() || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -5345,37 +5374,37 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
}
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
showFallback = workInProgress.mode;
showFallback = nextProps.fallback;
nextPrimaryChildren = workInProgress.mode;
didSuspend = current.child;
var currentFallbackChildFragment = didSuspend.sibling;
nextProps = createWorkInProgress(didSuspend, {
nextProps = updateWorkInProgressOffscreenFiber(didSuspend, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712;
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
? (showFallback = createWorkInProgress(
currentFallbackChildFragment,
nextPrimaryChildren
showFallback
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
: ((showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2));
nextPrimaryChildren.return = workInProgress;
(showFallback.flags |= 2));
showFallback.return = workInProgress;
nextProps.return = workInProgress;
nextProps.sibling = nextPrimaryChildren;
nextProps.sibling = showFallback;
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = showFallback.cachePool),
nextProps = showFallback;
showFallback = workInProgress.child;
nextPrimaryChildren = current.child.memoizedState;
null === nextPrimaryChildren
? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = nextPrimaryChildren.cachePool),
null !== didSuspend
? ((currentFallbackChildFragment = CacheContext._currentValue2),
(didSuspend =
@@ -5386,40 +5415,40 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
}
: didSuspend))
: (didSuspend = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
(nextPrimaryChildren = {
baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
cachePool: didSuspend
}));
nextPrimaryChildren.memoizedState = showFallback;
showFallback.memoizedState = nextPrimaryChildren;
if (
enableTransitionTracing &&
((showFallback = enableTransitionTracing
((nextPrimaryChildren = enableTransitionTracing
? transitionStack.current
: null),
null !== showFallback)
null !== nextPrimaryChildren)
) {
didSuspend = enableTransitionTracing ? markerInstanceStack.current : null;
currentFallbackChildFragment = nextPrimaryChildren.updateQueue;
currentFallbackChildFragment = showFallback.updateQueue;
var currentOffscreenQueue = current.updateQueue;
null === currentFallbackChildFragment
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue: null
})
: currentFallbackChildFragment === currentOffscreenQueue
? (nextPrimaryChildren.updateQueue = {
transitions: showFallback,
? (showFallback.updateQueue = {
transitions: nextPrimaryChildren,
markerInstances: didSuspend,
retryQueue:
null !== currentOffscreenQueue
? currentOffscreenQueue.retryQueue
: null
})
: ((currentFallbackChildFragment.transitions = showFallback),
: ((currentFallbackChildFragment.transitions = nextPrimaryChildren),
(currentFallbackChildFragment.markerInstances = didSuspend));
}
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -5430,7 +5459,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, {
mode: "visible",
children: nextProps.children
});
@@ -5487,6 +5516,9 @@ function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
};
return offscreenProps;
}
function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
return createWorkInProgress(current, offscreenProps);
}
function retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -5680,10 +5712,18 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
workInProgress.memoizedProps.value
);
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
var state = workInProgress.memoizedState;
if (null !== state) {
if (null !== state.dehydrated)
var state$80 = workInProgress.memoizedState;
if (null !== state$80) {
if (null !== state$80.dehydrated)
return (
pushPrimaryTreeSuspenseHandler(workInProgress),
(workInProgress.flags |= 128),
@@ -5703,17 +5743,17 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
break;
case 19:
var didSuspendBefore = 0 !== (current.flags & 128);
state = 0 !== (renderLanes & workInProgress.childLanes);
state ||
state$80 = 0 !== (renderLanes & workInProgress.childLanes);
state$80 ||
(propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
),
(state = 0 !== (renderLanes & workInProgress.childLanes)));
(state$80 = 0 !== (renderLanes & workInProgress.childLanes)));
if (didSuspendBefore) {
if (state)
if (state$80)
return updateSuspenseListComponent(
current,
workInProgress,
@@ -5727,7 +5767,7 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
(didSuspendBefore.tail = null),
(didSuspendBefore.lastEffect = null));
push(suspenseStackCursor, suspenseStackCursor.current);
if (state) break;
if (state$80) break;
else return null;
case 22:
return (
@@ -5744,8 +5784,8 @@ function attemptEarlyBailoutIfNoScheduledUpdate(
break;
case 25:
if (enableTransitionTracing) {
state = workInProgress.stateNode;
null !== state && pushMarkerInstance(workInProgress, state);
state$80 = workInProgress.stateNode;
null !== state$80 && pushMarkerInstance(workInProgress, state$80);
break;
}
case 23:
@@ -6050,26 +6090,73 @@ function beginWork(current, workInProgress, renderLanes) {
workInProgress.child
);
case 31:
return (
(props = workInProgress.pendingProps),
(renderLanes = workInProgress.mode),
(props = { mode: props.mode, children: props.children }),
null === current
? ((renderLanes = mountWorkInProgressOffscreenFiber(
props,
init = workInProgress.pendingProps;
nextProps = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
workInProgress = mountActivityChildren(workInProgress, init);
else if (((props = current.memoizedState), null !== props))
b: {
pushDehydratedActivitySuspenseHandler(workInProgress);
if (nextProps) {
if (workInProgress.flags & 256) {
workInProgress.flags &= -257;
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
break b;
}
if (null !== workInProgress.memoizedState) {
workInProgress.child = current.child;
workInProgress.flags |= 128;
workInProgress = null;
break b;
}
throw Error(formatProdErrorMessage(558));
}
didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
);
nextProps = 0 !== (renderLanes & current.childLanes);
if (didReceiveUpdate || nextProps) {
init = workInProgressRoot;
if (
null !== init &&
((nextProps = getBumpedLaneForHydration(init, renderLanes)),
0 !== nextProps && nextProps !== props.retryLane)
)
throw (
((props.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(init, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
)),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes))
: ((renderLanes = createWorkInProgress(current.child, props)),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes)),
workInProgress
);
);
} else
(workInProgress = mountActivityChildren(workInProgress, init)),
(workInProgress.flags |= 4096);
}
else
(renderLanes = updateWorkInProgressOffscreenFiber(current.child, {
mode: init.mode,
children: init.children
})),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
(workInProgress = renderLanes);
return workInProgress;
case 22:
return updateOffscreenComponent(
current,
@@ -6321,14 +6408,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
break;
case "collapsed":
lastTailNode = renderState.tail;
for (var lastTailNode$90 = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (lastTailNode$90 = lastTailNode),
for (var lastTailNode$91 = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (lastTailNode$91 = lastTailNode),
(lastTailNode = lastTailNode.sibling);
null === lastTailNode$90
null === lastTailNode$91
? hasRenderedATailFallback || null === renderState.tail
? (renderState.tail = null)
: (renderState.tail.sibling = null)
: (lastTailNode$90.sibling = null);
: (lastTailNode$91.sibling = null);
}
}
function bubbleProperties(completedWork) {
@@ -6338,19 +6425,19 @@ function bubbleProperties(completedWork) {
newChildLanes = 0,
subtreeFlags = 0;
if (didBailout)
for (var child$91 = completedWork.child; null !== child$91; )
(newChildLanes |= child$91.lanes | child$91.childLanes),
(subtreeFlags |= child$91.subtreeFlags & 65011712),
(subtreeFlags |= child$91.flags & 65011712),
(child$91.return = completedWork),
(child$91 = child$91.sibling);
for (var child$92 = completedWork.child; null !== child$92; )
(newChildLanes |= child$92.lanes | child$92.childLanes),
(subtreeFlags |= child$92.subtreeFlags & 65011712),
(subtreeFlags |= child$92.flags & 65011712),
(child$92.return = completedWork),
(child$92 = child$92.sibling);
else
for (child$91 = completedWork.child; null !== child$91; )
(newChildLanes |= child$91.lanes | child$91.childLanes),
(subtreeFlags |= child$91.subtreeFlags),
(subtreeFlags |= child$91.flags),
(child$91.return = completedWork),
(child$91 = child$91.sibling);
for (child$92 = completedWork.child; null !== child$92; )
(newChildLanes |= child$92.lanes | child$92.childLanes),
(subtreeFlags |= child$92.subtreeFlags),
(subtreeFlags |= child$92.flags),
(child$92.return = completedWork),
(child$92 = child$92.sibling);
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
@@ -6482,7 +6569,35 @@ function completeWork(current, workInProgress, renderLanes) {
bubbleProperties(workInProgress);
return null;
case 31:
return bubbleProperties(workInProgress), null;
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
if (null !== renderLanes) {
if (null === current) {
throw Error(formatProdErrorMessage(318));
throw Error(formatProdErrorMessage(556));
}
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(formatProdErrorMessage(558));
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -6525,11 +6640,11 @@ function completeWork(current, workInProgress, renderLanes) {
null !== newProps.alternate.memoizedState &&
null !== newProps.alternate.memoizedState.cachePool &&
(instance = newProps.alternate.memoizedState.cachePool.pool);
var cache$96 = null;
var cache$99 = null;
null !== newProps.memoizedState &&
null !== newProps.memoizedState.cachePool &&
(cache$96 = newProps.memoizedState.cachePool.pool);
cache$96 !== instance && (newProps.flags |= 2048);
(cache$99 = newProps.memoizedState.cachePool.pool);
cache$99 !== instance && (newProps.flags |= 2048);
}
renderLanes !== current &&
(enableTransitionTracing && (workInProgress.child.flags |= 2048),
@@ -6557,8 +6672,8 @@ function completeWork(current, workInProgress, renderLanes) {
instance = workInProgress.memoizedState;
if (null === instance) return bubbleProperties(workInProgress), null;
newProps = 0 !== (workInProgress.flags & 128);
cache$96 = instance.rendering;
if (null === cache$96)
cache$99 = instance.rendering;
if (null === cache$99)
if (newProps) cutOffTailIfNeeded(instance, !1);
else {
if (
@@ -6566,11 +6681,11 @@ function completeWork(current, workInProgress, renderLanes) {
(null !== current && 0 !== (current.flags & 128))
)
for (current = workInProgress.child; null !== current; ) {
cache$96 = findFirstSuspended(current);
if (null !== cache$96) {
cache$99 = findFirstSuspended(current);
if (null !== cache$99) {
workInProgress.flags |= 128;
cutOffTailIfNeeded(instance, !1);
current = cache$96.updateQueue;
current = cache$99.updateQueue;
workInProgress.updateQueue = current;
scheduleRetryEffect(workInProgress, current);
workInProgress.subtreeFlags = 0;
@@ -6595,7 +6710,7 @@ function completeWork(current, workInProgress, renderLanes) {
}
else {
if (!newProps)
if (((current = findFirstSuspended(cache$96)), null !== current)) {
if (((current = findFirstSuspended(cache$99)), null !== current)) {
if (
((workInProgress.flags |= 128),
(newProps = !0),
@@ -6605,7 +6720,7 @@ function completeWork(current, workInProgress, renderLanes) {
cutOffTailIfNeeded(instance, !0),
null === instance.tail &&
"hidden" === instance.tailMode &&
!cache$96.alternate)
!cache$99.alternate)
)
return bubbleProperties(workInProgress), null;
} else
@@ -6617,13 +6732,13 @@ function completeWork(current, workInProgress, renderLanes) {
cutOffTailIfNeeded(instance, !1),
(workInProgress.lanes = 4194304));
instance.isBackwards
? ((cache$96.sibling = workInProgress.child),
(workInProgress.child = cache$96))
? ((cache$99.sibling = workInProgress.child),
(workInProgress.child = cache$99))
: ((current = instance.last),
null !== current
? (current.sibling = cache$96)
: (workInProgress.child = cache$96),
(instance.last = cache$96));
? (current.sibling = cache$99)
: (workInProgress.child = cache$99),
(instance.last = cache$99));
}
if (null !== instance.tail)
return (
@@ -6742,6 +6857,16 @@ function unwindWork(current, workInProgress) {
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (
null !== workInProgress.memoizedState &&
(popSuspenseHandler(workInProgress), null === workInProgress.alternate)
)
throw Error(formatProdErrorMessage(340));
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -6811,6 +6936,10 @@ function unwindInterruptedWork(current, interruptedWork) {
case 4:
popHostContainer();
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -6983,8 +7112,8 @@ function safelyDetachRef(current, nearestMountedAncestor) {
else if ("function" === typeof ref)
try {
ref(null);
} catch (error$115) {
captureCommitPhaseError(current, nearestMountedAncestor, error$115);
} catch (error$119) {
captureCommitPhaseError(current, nearestMountedAncestor, error$119);
}
else ref.current = null;
}
@@ -7430,11 +7559,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
current,
finishedRoot.__reactInternalSnapshotBeforeUpdate
);
} catch (error$113) {
} catch (error$117) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error$113
error$117
);
}
}
@@ -7473,6 +7602,9 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
case 12:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 64 &&
@@ -7885,6 +8017,7 @@ function commitDeletionEffectsOnFiber(
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -8037,6 +8170,15 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
@@ -8243,12 +8385,12 @@ function commitReconciliationEffects(finishedWork) {
break;
case 3:
case 4:
var parent$116 = hostParentFiber.stateNode.containerInfo,
before$117 = getHostSibling(finishedWork);
var parent$120 = hostParentFiber.stateNode.containerInfo,
before$121 = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(
finishedWork,
before$117,
parent$116
before$121,
parent$120
);
break;
default:
@@ -8388,6 +8530,13 @@ function recursivelyTraverseReappearLayoutEffects(
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -8638,6 +8787,14 @@ function commitPassiveMountOnFiber(
committedTransitions
);
break;
case 31:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -8661,14 +8818,14 @@ function commitPassiveMountOnFiber(
);
break;
case 22:
var instance$124 = finishedWork.stateNode,
current$125 = finishedWork.alternate;
var instance$129 = finishedWork.stateNode,
current$130 = finishedWork.alternate;
null !== finishedWork.memoizedState
? (isViewTransitionEligible &&
null !== current$125 &&
null === current$125.memoizedState &&
restoreEnterOrExitViewTransitions(current$125),
instance$124._visibility & 2
null !== current$130 &&
null === current$130.memoizedState &&
restoreEnterOrExitViewTransitions(current$130),
instance$129._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
@@ -8680,17 +8837,17 @@ function commitPassiveMountOnFiber(
finishedWork
))
: (isViewTransitionEligible &&
null !== current$125 &&
null !== current$125.memoizedState &&
null !== current$130 &&
null !== current$130.memoizedState &&
restoreEnterOrExitViewTransitions(finishedWork),
instance$124._visibility & 2
instance$129._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
)
: ((instance$124._visibility |= 2),
: ((instance$129._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -8700,9 +8857,9 @@ function commitPassiveMountOnFiber(
)));
flags & 2048 &&
commitOffscreenPassiveMountEffects(
current$125,
current$130,
finishedWork,
instance$124
instance$129
);
break;
case 24:
@@ -8790,9 +8947,9 @@ function recursivelyTraverseReconnectPassiveEffects(
);
break;
case 22:
var instance$127 = finishedWork.stateNode;
var instance$132 = finishedWork.stateNode;
null !== finishedWork.memoizedState
? instance$127._visibility & 2
? instance$132._visibility & 2
? recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -8804,7 +8961,7 @@ function recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork
)
: ((instance$127._visibility |= 2),
: ((instance$132._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -8817,7 +8974,7 @@ function recursivelyTraverseReconnectPassiveEffects(
commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork,
instance$127
instance$132
);
break;
case 24:
@@ -9766,8 +9923,8 @@ function renderRootSync(root, lanes, shouldYieldForPrerendering) {
workLoopSync();
exitStatus = workInProgressRootExitStatus;
break;
} catch (thrownValue$139) {
handleThrow(root, thrownValue$139);
} catch (thrownValue$144) {
handleThrow(root, thrownValue$144);
}
while (1);
lanes && root.shellSuspendCounter++;
@@ -9882,8 +10039,8 @@ function renderRootConcurrent(root, lanes) {
}
workLoopConcurrentByScheduler();
break;
} catch (thrownValue$141) {
handleThrow(root, thrownValue$141);
} catch (thrownValue$146) {
handleThrow(root, thrownValue$146);
}
while (1);
lastContextDependency = currentlyRenderingFiber$1 = null;
@@ -10445,6 +10602,7 @@ function retryDehydratedSuspenseBoundary(boundaryFiber) {
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -10965,24 +11123,24 @@ var slice = Array.prototype.slice,
};
return Text;
})(React.Component);
var internals$jscomp$inline_1586 = {
var internals$jscomp$inline_1592 = {
bundleType: 0,
version: "19.2.0-www-modern-17f88c80-20250422",
version: "19.2.0-www-modern-3ef31d19-20250422",
rendererPackageName: "react-art",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1587 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1593 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1587.isDisabled &&
hook$jscomp$inline_1587.supportsFiber
!hook$jscomp$inline_1593.isDisabled &&
hook$jscomp$inline_1593.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1587.inject(
internals$jscomp$inline_1586
(rendererID = hook$jscomp$inline_1593.inject(
internals$jscomp$inline_1592
)),
(injectedHook = hook$jscomp$inline_1587);
(injectedHook = hook$jscomp$inline_1593);
} catch (err) {}
}
var Path = Mode$1.Path;
@@ -10996,4 +11154,4 @@ exports.RadialGradient = RadialGradient;
exports.Shape = TYPES.SHAPE;
exports.Surface = Surface;
exports.Text = Text;
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -5591,16 +5591,14 @@ __DEV__ &&
renderNode(request, task, props.children, -1);
task.keyPath = prevKeyPath$jscomp$2;
}
} else {
} else if ("hidden" !== props.mode) {
request.renderState.generateStaticMarkup ||
segment$jscomp$0.chunks.push("\x3c!--&--\x3e");
segment$jscomp$0.lastPushedText = !1;
if ("hidden" !== props.mode) {
var _prevKeyPath3 = task.keyPath;
task.keyPath = keyPath;
renderNode(request, task, props.children, -1);
task.keyPath = _prevKeyPath3;
}
var _prevKeyPath3 = task.keyPath;
task.keyPath = keyPath;
renderNode(request, task, props.children, -1);
task.keyPath = _prevKeyPath3;
request.renderState.generateStaticMarkup ||
segment$jscomp$0.chunks.push("\x3c!--/&--\x3e");
segment$jscomp$0.lastPushedText = !1;
@@ -9440,5 +9438,5 @@ __DEV__ &&
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
})();
@@ -5530,16 +5530,14 @@ __DEV__ &&
renderNode(request, task, props.children, -1);
task.keyPath = prevKeyPath$jscomp$2;
}
} else {
} else if ("hidden" !== props.mode) {
request.renderState.generateStaticMarkup ||
segment$jscomp$0.chunks.push("\x3c!--&--\x3e");
segment$jscomp$0.lastPushedText = !1;
if ("hidden" !== props.mode) {
var _prevKeyPath3 = task.keyPath;
task.keyPath = keyPath;
renderNode(request, task, props.children, -1);
task.keyPath = _prevKeyPath3;
}
var _prevKeyPath3 = task.keyPath;
task.keyPath = keyPath;
renderNode(request, task, props.children, -1);
task.keyPath = _prevKeyPath3;
request.renderState.generateStaticMarkup ||
segment$jscomp$0.chunks.push("\x3c!--/&--\x3e");
segment$jscomp$0.lastPushedText = !1;
@@ -9369,5 +9367,5 @@ __DEV__ &&
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
})();
@@ -4324,14 +4324,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = type))
: (request.renderState.generateStaticMarkup ||
: "hidden" !== props.mode &&
(request.renderState.generateStaticMarkup ||
type.chunks.push("\x3c!--&--\x3e"),
(type.lastPushedText = !1),
"hidden" !== props.mode &&
((contextKey = task.keyPath),
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = contextKey)),
(contextKey = task.keyPath),
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = contextKey),
request.renderState.generateStaticMarkup ||
type.chunks.push("\x3c!--/&--\x3e"),
(type.lastPushedText = !1));
@@ -6200,4 +6200,4 @@ exports.renderToString = function (children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
@@ -4257,14 +4257,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = type))
: (request.renderState.generateStaticMarkup ||
: "hidden" !== props.mode &&
(request.renderState.generateStaticMarkup ||
type.chunks.push("\x3c!--&--\x3e"),
(type.lastPushedText = !1),
"hidden" !== props.mode &&
((newProps = task.keyPath),
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = newProps)),
(newProps = task.keyPath),
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = newProps),
request.renderState.generateStaticMarkup ||
type.chunks.push("\x3c!--/&--\x3e"),
(type.lastPushedText = !1));
@@ -6112,4 +6112,4 @@ exports.renderToString = function (children, options) {
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
);
};
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
@@ -5259,15 +5259,13 @@ __DEV__ &&
renderNode(request, task, props.children, -1);
task.keyPath = prevKeyPath$jscomp$2;
}
} else {
} else if ("hidden" !== props.mode) {
segment$jscomp$0.chunks.push("\x3c!--&--\x3e");
segment$jscomp$0.lastPushedText = !1;
if ("hidden" !== props.mode) {
var _prevKeyPath3 = task.keyPath;
task.keyPath = keyPath;
renderNode(request, task, props.children, -1);
task.keyPath = _prevKeyPath3;
}
var _prevKeyPath3 = task.keyPath;
task.keyPath = keyPath;
renderNode(request, task, props.children, -1);
task.keyPath = _prevKeyPath3;
segment$jscomp$0.chunks.push("\x3c!--/&--\x3e");
segment$jscomp$0.lastPushedText = !1;
}
@@ -4100,13 +4100,13 @@ function renderElement(request, task, keyPath, type, props, ref) {
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = type))
: (type.chunks.push("\x3c!--&--\x3e"),
: "hidden" !== props.mode &&
(type.chunks.push("\x3c!--&--\x3e"),
(type.lastPushedText = !1),
"hidden" !== props.mode &&
((newProps = task.keyPath),
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = newProps)),
(newProps = task.keyPath),
(task.keyPath = keyPath),
renderNode(request, task, props.children, -1),
(task.keyPath = newProps),
type.chunks.push("\x3c!--/&--\x3e"),
(type.lastPushedText = !1));
return;
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -619,6 +619,14 @@ module.exports = function ($$$config) {
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
renderLane =
0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function getBumpedLaneForHydrationByLane(lane) {
switch (lane) {
case 2:
@@ -981,6 +989,14 @@ module.exports = function ($$$config) {
(treeContextId = idStack[--idStackIndex]),
(idStack[idStackIndex] = null);
}
function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextId = suspendedContext.id;
treeContextOverflow = suspendedContext.overflow;
treeContextProvider = workInProgress;
}
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance);
push(contextFiberStackCursor, fiber);
@@ -1040,6 +1056,7 @@ module.exports = function ($$$config) {
for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
switch (hydrationParentFiber.tag) {
case 5:
case 31:
case 13:
rootOrSingletonContext = !1;
return;
@@ -1047,8 +1064,6 @@ module.exports = function ($$$config) {
case 3:
rootOrSingletonContext = !0;
return;
case 31:
return;
default:
hydrationParentFiber = hydrationParentFiber.return;
}
@@ -1079,18 +1094,22 @@ module.exports = function ($$$config) {
if (!fiber) throw Error(formatProdErrorMessage(317));
nextHydratableInstance =
getNextHydratableInstanceAfterSuspenseInstance(fiber);
} else if (31 === tag) {
fiber = fiber.memoizedState;
fiber = null !== fiber ? fiber.dehydrated : null;
if (!fiber) throw Error(formatProdErrorMessage(317));
nextHydratableInstance =
getNextHydratableInstanceAfterActivityInstance(fiber);
} else
nextHydratableInstance =
31 === tag
? getNextHydratableInstanceAfterActivityInstance(fiber.stateNode)
: supportsSingletons && 27 === tag
? getNextHydratableSiblingAfterSingleton(
fiber.type,
nextHydratableInstance
)
: hydrationParentFiber
? getNextHydratableSibling(fiber.stateNode)
: null;
supportsSingletons && 27 === tag
? getNextHydratableSiblingAfterSingleton(
fiber.type,
nextHydratableInstance
)
: hydrationParentFiber
? getNextHydratableSibling(fiber.stateNode)
: null;
return !0;
}
function resetHydrationState() {
@@ -2839,6 +2858,11 @@ module.exports = function ($$$config) {
? push(suspenseHandlerStackCursor, handler)
: push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current);
push(suspenseHandlerStackCursor, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current),
@@ -4172,6 +4196,7 @@ module.exports = function ($$$config) {
sourceFiber = suspenseHandlerStackCursor.current;
if (null !== sourceFiber) {
switch (sourceFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -4616,10 +4641,19 @@ module.exports = function ($$$config) {
renderLanes
);
}
if (
0 === (renderLanes & 536870912) ||
(isHydrating && "unstable-defer-without-hiding" !== nextProps.mode)
)
if (0 !== (renderLanes & 536870912))
(workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
null !== current &&
pushTransition(
workInProgress,
null !== prevState ? prevState.cachePool : null,
null
),
null !== prevState
? pushHiddenContext(workInProgress, prevState)
: reuseHiddenContextOnStack(),
pushOffscreenSuspenseHandler(workInProgress);
else
return (
(workInProgress.lanes = workInProgress.childLanes = 536870912),
deferHiddenOffscreenComponent(
@@ -4631,17 +4665,6 @@ module.exports = function ($$$config) {
renderLanes
)
);
workInProgress.memoizedState = { baseLanes: 0, cachePool: null };
null !== current &&
pushTransition(
workInProgress,
null !== prevState ? prevState.cachePool : null,
null
);
null !== prevState
? pushHiddenContext(workInProgress, prevState)
: reuseHiddenContextOnStack();
pushOffscreenSuspenseHandler(workInProgress);
} else if (null !== prevState) {
nextProps = prevState.cachePool;
var transitions = null;
@@ -4689,6 +4712,31 @@ module.exports = function ($$$config) {
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(
workInProgress,
workInProgress.pendingProps
);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -5172,8 +5220,7 @@ module.exports = function ($$$config) {
retryLane: 536870912,
hydrationErrors: null
}),
(renderLanes = createFiber(18, null, null, 0)),
(renderLanes.stateNode = current),
(renderLanes = createFiberFromDehydratedFragment(current)),
(renderLanes.return = workInProgress),
(workInProgress.child = renderLanes),
(hydrationParentFiber = workInProgress),
@@ -5270,14 +5317,14 @@ module.exports = function ($$$config) {
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(nextFallbackChildren = workInProgress.mode),
(showFallback = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
nextFallbackChildren
showFallback
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
nextFallbackChildren,
showFallback,
renderLanes,
null
)),
@@ -5331,15 +5378,10 @@ module.exports = function ($$$config) {
JSCompiler_temp = workInProgressRoot;
if (
null !== JSCompiler_temp &&
((nextProps = renderLanes & -renderLanes),
(nextProps =
0 !== (nextProps & 42)
? 1
: getBumpedLaneForHydrationByLane(nextProps)),
(nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps),
((nextProps = getBumpedLaneForHydration(
JSCompiler_temp,
renderLanes
)),
0 !== nextProps && nextProps !== nextFallbackChildren.retryLane)
)
throw (
@@ -5371,12 +5413,7 @@ module.exports = function ($$$config) {
(hydrationErrors = null),
(rootOrSingletonContext = !1),
null !== current &&
((idStack[idStackIndex++] = treeContextId),
(idStack[idStackIndex++] = treeContextOverflow),
(idStack[idStackIndex++] = treeContextProvider),
(treeContextId = current.id),
(treeContextOverflow = current.overflow),
(treeContextProvider = workInProgress))),
restoreSuspendedTreeContext(workInProgress, current)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
nextProps.children
@@ -5387,14 +5424,14 @@ module.exports = function ($$$config) {
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
nextFallbackChildren = workInProgress.mode;
showFallback = current.child;
didSuspend = showFallback.sibling;
nextProps = createWorkInProgress(showFallback, {
showFallback = workInProgress.mode;
nextFallbackChildren = current.child;
didSuspend = nextFallbackChildren.sibling;
nextProps = createWorkInProgress(nextFallbackChildren, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712;
nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712;
null !== didSuspend
? (nextPrimaryChildren = createWorkInProgress(
didSuspend,
@@ -5402,7 +5439,7 @@ module.exports = function ($$$config) {
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
nextFallbackChildren,
showFallback,
renderLanes,
null
)),
@@ -5413,53 +5450,53 @@ module.exports = function ($$$config) {
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
nextFallbackChildren = current.child.memoizedState;
null === nextFallbackChildren
? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes))
: ((showFallback = nextFallbackChildren.cachePool),
null !== showFallback
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((nextFallbackChildren = showFallback.cachePool),
null !== nextFallbackChildren
? ((didSuspend = isPrimaryRenderer
? CacheContext._currentValue
: CacheContext._currentValue2),
(showFallback =
showFallback.parent !== didSuspend
(nextFallbackChildren =
nextFallbackChildren.parent !== didSuspend
? { parent: didSuspend, pool: didSuspend }
: showFallback))
: (showFallback = getSuspendedCache()),
(nextFallbackChildren = {
baseLanes: nextFallbackChildren.baseLanes | renderLanes,
cachePool: showFallback
: nextFallbackChildren))
: (nextFallbackChildren = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
cachePool: nextFallbackChildren
}));
nextPrimaryChildren.memoizedState = nextFallbackChildren;
nextPrimaryChildren.memoizedState = showFallback;
if (
enableTransitionTracing &&
((nextFallbackChildren = enableTransitionTracing
((showFallback = enableTransitionTracing
? transitionStack.current
: null),
null !== nextFallbackChildren)
null !== showFallback)
) {
showFallback = enableTransitionTracing
nextFallbackChildren = enableTransitionTracing
? markerInstanceStack.current
: null;
didSuspend = nextPrimaryChildren.updateQueue;
var currentOffscreenQueue = current.updateQueue;
null === didSuspend
? (nextPrimaryChildren.updateQueue = {
transitions: nextFallbackChildren,
markerInstances: showFallback,
transitions: showFallback,
markerInstances: nextFallbackChildren,
retryQueue: null
})
: didSuspend === currentOffscreenQueue
? (nextPrimaryChildren.updateQueue = {
transitions: nextFallbackChildren,
markerInstances: showFallback,
transitions: showFallback,
markerInstances: nextFallbackChildren,
retryQueue:
null !== currentOffscreenQueue
? currentOffscreenQueue.retryQueue
: null
})
: ((didSuspend.transitions = nextFallbackChildren),
(didSuspend.markerInstances = showFallback));
: ((didSuspend.transitions = showFallback),
(didSuspend.markerInstances = nextFallbackChildren));
}
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
current,
@@ -5731,10 +5768,18 @@ module.exports = function ($$$config) {
workInProgress.memoizedProps.value
);
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
var state = workInProgress.memoizedState;
if (null !== state) {
if (null !== state.dehydrated)
var state$96 = workInProgress.memoizedState;
if (null !== state$96) {
if (null !== state$96.dehydrated)
return (
pushPrimaryTreeSuspenseHandler(workInProgress),
(workInProgress.flags |= 128),
@@ -5758,17 +5803,17 @@ module.exports = function ($$$config) {
break;
case 19:
var didSuspendBefore = 0 !== (current.flags & 128);
state = 0 !== (renderLanes & workInProgress.childLanes);
state ||
state$96 = 0 !== (renderLanes & workInProgress.childLanes);
state$96 ||
(propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
),
(state = 0 !== (renderLanes & workInProgress.childLanes)));
(state$96 = 0 !== (renderLanes & workInProgress.childLanes)));
if (didSuspendBefore) {
if (state)
if (state$96)
return updateSuspenseListComponent(
current,
workInProgress,
@@ -5782,7 +5827,7 @@ module.exports = function ($$$config) {
(didSuspendBefore.tail = null),
(didSuspendBefore.lastEffect = null));
push(suspenseStackCursor, suspenseStackCursor.current);
if (state) break;
if (state$96) break;
else return null;
case 22:
return (
@@ -5799,8 +5844,8 @@ module.exports = function ($$$config) {
break;
case 25:
if (enableTransitionTracing) {
state = workInProgress.stateNode;
null !== state && pushMarkerInstance(workInProgress, state);
state$96 = workInProgress.stateNode;
null !== state$96 && pushMarkerInstance(workInProgress, state$96);
break;
}
case 23:
@@ -6291,33 +6336,107 @@ module.exports = function ($$$config) {
workInProgress.child
);
case 31:
props = workInProgress.pendingProps;
renderLanes = workInProgress.mode;
props = { mode: props.mode, children: props.children };
if (null === current) {
init = workInProgress.pendingProps;
nextState = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
if (isHydrating) {
if ("hidden" === init.mode)
mountActivityChildren(workInProgress, init);
else if (
(pushDehydratedActivitySuspenseHandler(workInProgress),
(renderLanes = nextHydratableInstance)
? ((renderLanes = canHydrateActivityInstance(
renderLanes,
rootOrSingletonContext
)),
null !== renderLanes &&
((workInProgress.memoizedState = {
dehydrated: renderLanes,
treeContext:
null !== treeContextProvider
? { id: treeContextId, overflow: treeContextOverflow }
: null,
retryLane: 536870912,
hydrationErrors: null
}),
(current = createFiberFromDehydratedFragment(renderLanes)),
(current.return = workInProgress),
(workInProgress.child = current),
(hydrationParentFiber = workInProgress),
(nextHydratableInstance = null)))
: (renderLanes = null),
null === renderLanes)
)
throw throwOnHydrationMismatch(workInProgress);
workInProgress.lanes = 536870912;
workInProgress = null;
} else workInProgress = mountActivityChildren(workInProgress, init);
else if (((props = current.memoizedState), null !== props))
if (
isHydrating &&
((current = nextHydratableInstance)
? ((current = canHydrateActivityInstance(
current,
rootOrSingletonContext
)),
null !== current &&
((workInProgress.stateNode = current),
(hydrationParentFiber = workInProgress),
(nextHydratableInstance =
getFirstHydratableChildWithinActivityInstance(current))))
: (current = null),
null === current)
((nextProps = props.dehydrated),
pushDehydratedActivitySuspenseHandler(workInProgress),
nextState)
)
throw throwOnHydrationMismatch(workInProgress);
renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes);
renderLanes.ref = workInProgress.ref;
workInProgress.child = renderLanes;
renderLanes.return = workInProgress;
workInProgress = renderLanes;
} else
(renderLanes = createWorkInProgress(current.child, props)),
if (workInProgress.flags & 256)
(workInProgress.flags &= -257),
(workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
));
else if (null !== workInProgress.memoizedState)
(workInProgress.child = current.child),
(workInProgress.flags |= 128),
(workInProgress = null);
else throw Error(formatProdErrorMessage(558));
else if (
(didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
),
(nextState = 0 !== (renderLanes & current.childLanes)),
didReceiveUpdate || nextState)
) {
init = workInProgressRoot;
if (
null !== init &&
((nextProps = getBumpedLaneForHydration(init, renderLanes)),
0 !== nextProps && nextProps !== props.retryLane)
)
throw (
((props.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(init, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
} else
(renderLanes = props.treeContext),
supportsHydration &&
((nextHydratableInstance =
getFirstHydratableChildWithinActivityInstance(nextProps)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
(hydrationErrors = null),
(rootOrSingletonContext = !1),
null !== renderLanes &&
restoreSuspendedTreeContext(workInProgress, renderLanes)),
(workInProgress = mountActivityChildren(workInProgress, init)),
(workInProgress.flags |= 4096);
else
(renderLanes = createWorkInProgress(current.child, {
mode: init.mode,
children: init.children
})),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
@@ -7004,17 +7123,17 @@ module.exports = function ($$$config) {
if (popHydrationState(workInProgress))
prepareToHydrateHostInstance(workInProgress, nextResource);
else {
var instance$121 = createInstance(
var instance$122 = createInstance(
type,
newProps,
rootInstanceStackCursor.current,
nextResource,
workInProgress
);
appendAllChildren(instance$121, workInProgress, !1, !1);
workInProgress.stateNode = instance$121;
appendAllChildren(instance$122, workInProgress, !1, !1);
workInProgress.stateNode = instance$122;
finalizeInitialChildren(
instance$121,
instance$122,
type,
newProps,
nextResource
@@ -7082,11 +7201,41 @@ module.exports = function ($$$config) {
bubbleProperties(workInProgress);
return null;
case 31:
return (
null === current && popHydrationState(workInProgress),
bubbleProperties(workInProgress),
null
);
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
newProps = popHydrationState(workInProgress);
if (null !== renderLanes) {
if (null === current) {
if (!newProps) throw Error(formatProdErrorMessage(318));
if (!supportsHydration) throw Error(formatProdErrorMessage(556));
current = workInProgress.memoizedState;
current = null !== current ? current.dehydrated : null;
if (!current) throw Error(formatProdErrorMessage(557));
hydrateActivityInstance(current, workInProgress);
} else
resetHydrationState(),
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null),
(workInProgress.flags |= 4);
bubbleProperties(workInProgress);
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(formatProdErrorMessage(558));
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -7376,6 +7525,17 @@ module.exports = function ($$$config) {
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (null !== workInProgress.memoizedState) {
popSuspenseHandler(workInProgress);
if (null === workInProgress.alternate)
throw Error(formatProdErrorMessage(340));
resetHydrationState();
}
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -7454,6 +7614,10 @@ module.exports = function ($$$config) {
case 4:
popHostContainer();
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -7627,8 +7791,8 @@ module.exports = function ($$$config) {
else if ("function" === typeof ref)
try {
ref(null);
} catch (error$145) {
captureCommitPhaseError(current, nearestMountedAncestor, error$145);
} catch (error$148) {
captureCommitPhaseError(current, nearestMountedAncestor, error$148);
}
else ref.current = null;
}
@@ -8440,11 +8604,11 @@ module.exports = function ($$$config) {
current,
finishedRoot.__reactInternalSnapshotBeforeUpdate
);
} catch (error$143) {
} catch (error$146) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error$143
error$146
);
}
}
@@ -8488,6 +8652,11 @@ module.exports = function ($$$config) {
case 12:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 &&
commitActivityHydrationCallbacks(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 &&
@@ -8974,6 +9143,31 @@ module.exports = function ($$$config) {
);
}
}
function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
if (supportsHydration && null === finishedWork.memoizedState) {
var current = finishedWork.alternate;
if (
null !== current &&
((current = current.memoizedState), null !== current)
) {
current = current.dehydrated;
try {
commitHydratedActivityInstance(current);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
try {
var hydrationCallbacks = finishedRoot.hydrationCallbacks;
if (null !== hydrationCallbacks) {
var onHydrated = hydrationCallbacks.onHydrated;
onHydrated && onHydrated(current);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
}
function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
if (supportsHydration && null === finishedWork.memoizedState) {
var current = finishedWork.alternate;
@@ -9001,6 +9195,7 @@ module.exports = function ($$$config) {
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -9285,6 +9480,15 @@ module.exports = function ($$$config) {
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
@@ -9492,25 +9696,25 @@ module.exports = function ($$$config) {
break;
}
case 5:
var parent$146 = hostParentFiber.stateNode;
var parent$149 = hostParentFiber.stateNode;
hostParentFiber.flags & 32 &&
(resetTextContent(parent$146), (hostParentFiber.flags &= -33));
var before$147 = getHostSibling(finishedWork);
(resetTextContent(parent$149), (hostParentFiber.flags &= -33));
var before$150 = getHostSibling(finishedWork);
insertOrAppendPlacementNode(
finishedWork,
before$147,
parent$146,
before$150,
parent$149,
parentFragmentInstances
);
break;
case 3:
case 4:
var parent$148 = hostParentFiber.stateNode.containerInfo,
before$149 = getHostSibling(finishedWork);
var parent$151 = hostParentFiber.stateNode.containerInfo,
before$152 = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(
finishedWork,
before$149,
parent$148,
before$152,
parent$151,
parentFragmentInstances
);
break;
@@ -9782,6 +9986,16 @@ module.exports = function ($$$config) {
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
includeWorkInProgressEffects &&
flags & 4 &&
commitActivityHydrationCallbacks(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -10036,6 +10250,14 @@ module.exports = function ($$$config) {
committedTransitions
);
break;
case 31:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -10059,14 +10281,14 @@ module.exports = function ($$$config) {
);
break;
case 22:
var instance$162 = finishedWork.stateNode,
current$163 = finishedWork.alternate;
var instance$166 = finishedWork.stateNode,
current$167 = finishedWork.alternate;
null !== finishedWork.memoizedState
? (isViewTransitionEligible &&
null !== current$163 &&
null === current$163.memoizedState &&
restoreEnterOrExitViewTransitions(current$163),
instance$162._visibility & 2
null !== current$167 &&
null === current$167.memoizedState &&
restoreEnterOrExitViewTransitions(current$167),
instance$166._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
@@ -10078,17 +10300,17 @@ module.exports = function ($$$config) {
finishedWork
))
: (isViewTransitionEligible &&
null !== current$163 &&
null !== current$163.memoizedState &&
null !== current$167 &&
null !== current$167.memoizedState &&
restoreEnterOrExitViewTransitions(finishedWork),
instance$162._visibility & 2
instance$166._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
)
: ((instance$162._visibility |= 2),
: ((instance$166._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -10098,9 +10320,9 @@ module.exports = function ($$$config) {
)));
flags & 2048 &&
commitOffscreenPassiveMountEffects(
current$163,
current$167,
finishedWork,
instance$162
instance$166
);
break;
case 24:
@@ -10195,9 +10417,9 @@ module.exports = function ($$$config) {
);
break;
case 22:
var instance$166 = finishedWork.stateNode;
var instance$170 = finishedWork.stateNode;
null !== finishedWork.memoizedState
? instance$166._visibility & 2
? instance$170._visibility & 2
? recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -10209,7 +10431,7 @@ module.exports = function ($$$config) {
finishedRoot,
finishedWork
)
: ((instance$166._visibility |= 2),
: ((instance$170._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -10222,7 +10444,7 @@ module.exports = function ($$$config) {
commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork,
instance$166
instance$170
);
break;
case 24:
@@ -11351,8 +11573,8 @@ module.exports = function ($$$config) {
workLoopSync();
exitStatus = workInProgressRootExitStatus;
break;
} catch (thrownValue$183) {
handleThrow(root, thrownValue$183);
} catch (thrownValue$187) {
handleThrow(root, thrownValue$187);
}
while (1);
lanes && root.shellSuspendCounter++;
@@ -11473,8 +11695,8 @@ module.exports = function ($$$config) {
}
workLoopConcurrentByScheduler();
break;
} catch (thrownValue$185) {
handleThrow(root, thrownValue$185);
} catch (thrownValue$189) {
handleThrow(root, thrownValue$189);
}
while (1);
lastContextDependency = currentlyRenderingFiber$1 = null;
@@ -12101,6 +12323,7 @@ module.exports = function ($$$config) {
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -12445,6 +12668,11 @@ module.exports = function ($$$config) {
content.lanes = lanes;
return content;
}
function createFiberFromDehydratedFragment(dehydratedNode) {
var fiber = createFiber(18, null, null, 0);
fiber.stateNode = dehydratedNode;
return fiber;
}
function createFiberFromPortal(portal, mode, lanes) {
mode = createFiber(
4,
@@ -12817,16 +13045,16 @@ module.exports = function ($$$config) {
canHydrateActivityInstance = $$$config.canHydrateActivityInstance,
canHydrateSuspenseInstance = $$$config.canHydrateSuspenseInstance,
hydrateInstance = $$$config.hydrateInstance,
hydrateTextInstance = $$$config.hydrateTextInstance;
$$$config.hydrateActivityInstance;
var hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance,
hydrateTextInstance = $$$config.hydrateTextInstance,
hydrateActivityInstance = $$$config.hydrateActivityInstance,
hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance,
getNextHydratableInstanceAfterActivityInstance =
$$$config.getNextHydratableInstanceAfterActivityInstance,
getNextHydratableInstanceAfterSuspenseInstance =
$$$config.getNextHydratableInstanceAfterSuspenseInstance,
commitHydratedContainer = $$$config.commitHydratedContainer;
$$$config.commitHydratedActivityInstance;
var commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance;
commitHydratedContainer = $$$config.commitHydratedContainer,
commitHydratedActivityInstance = $$$config.commitHydratedActivityInstance,
commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance;
$$$config.clearActivityBoundary;
var clearSuspenseBoundary = $$$config.clearSuspenseBoundary;
$$$config.clearActivityBoundaryFromContainer;
@@ -13512,14 +13740,14 @@ module.exports = function ($$$config) {
? createFiberImplObject
: createFiberImplClass;
exports.attemptContinuousHydration = function (fiber) {
if (13 === fiber.tag) {
if (13 === fiber.tag || 31 === fiber.tag) {
var root = enqueueConcurrentRenderForLane(fiber, 67108864);
null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
markRetryLaneIfNotHydrated(fiber, 67108864);
}
};
exports.attemptHydrationAtCurrentPriority = function (fiber) {
if (13 === fiber.tag) {
if (13 === fiber.tag || 31 === fiber.tag) {
var lane = requestUpdateLane();
lane = getBumpedLaneForHydrationByLane(lane);
var root = enqueueConcurrentRenderForLane(fiber, lane);
@@ -13547,6 +13775,7 @@ module.exports = function ($$$config) {
}
}
break;
case 31:
case 13:
(lanes = enqueueConcurrentRenderForLane(fiber, 2)),
null !== lanes && scheduleUpdateOnFiber(lanes, fiber, 2),
@@ -13859,7 +14088,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -478,6 +478,14 @@ module.exports = function ($$$config) {
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
renderLane =
0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function getBumpedLaneForHydrationByLane(lane) {
switch (lane) {
case 2:
@@ -840,6 +848,14 @@ module.exports = function ($$$config) {
(treeContextId = idStack[--idStackIndex]),
(idStack[idStackIndex] = null);
}
function restoreSuspendedTreeContext(workInProgress, suspendedContext) {
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextId = suspendedContext.id;
treeContextOverflow = suspendedContext.overflow;
treeContextProvider = workInProgress;
}
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance);
push(contextFiberStackCursor, fiber);
@@ -899,6 +915,7 @@ module.exports = function ($$$config) {
for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
switch (hydrationParentFiber.tag) {
case 5:
case 31:
case 13:
rootOrSingletonContext = !1;
return;
@@ -906,8 +923,6 @@ module.exports = function ($$$config) {
case 3:
rootOrSingletonContext = !0;
return;
case 31:
return;
default:
hydrationParentFiber = hydrationParentFiber.return;
}
@@ -938,18 +953,22 @@ module.exports = function ($$$config) {
if (!fiber) throw Error(formatProdErrorMessage(317));
nextHydratableInstance =
getNextHydratableInstanceAfterSuspenseInstance(fiber);
} else if (31 === tag) {
fiber = fiber.memoizedState;
fiber = null !== fiber ? fiber.dehydrated : null;
if (!fiber) throw Error(formatProdErrorMessage(317));
nextHydratableInstance =
getNextHydratableInstanceAfterActivityInstance(fiber);
} else
nextHydratableInstance =
31 === tag
? getNextHydratableInstanceAfterActivityInstance(fiber.stateNode)
: supportsSingletons && 27 === tag
? getNextHydratableSiblingAfterSingleton(
fiber.type,
nextHydratableInstance
)
: hydrationParentFiber
? getNextHydratableSibling(fiber.stateNode)
: null;
supportsSingletons && 27 === tag
? getNextHydratableSiblingAfterSingleton(
fiber.type,
nextHydratableInstance
)
: hydrationParentFiber
? getNextHydratableSibling(fiber.stateNode)
: null;
return !0;
}
function resetHydrationState() {
@@ -2698,6 +2717,11 @@ module.exports = function ($$$config) {
? push(suspenseHandlerStackCursor, handler)
: push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current);
push(suspenseHandlerStackCursor, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current),
@@ -4031,6 +4055,7 @@ module.exports = function ($$$config) {
sourceFiber = suspenseHandlerStackCursor.current;
if (null !== sourceFiber) {
switch (sourceFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -4475,10 +4500,19 @@ module.exports = function ($$$config) {
renderLanes
);
}
if (
0 === (renderLanes & 536870912) ||
(isHydrating && "unstable-defer-without-hiding" !== nextProps.mode)
)
if (0 !== (renderLanes & 536870912))
(workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),
null !== current &&
pushTransition(
workInProgress,
null !== prevState ? prevState.cachePool : null,
null
),
null !== prevState
? pushHiddenContext(workInProgress, prevState)
: reuseHiddenContextOnStack(),
pushOffscreenSuspenseHandler(workInProgress);
else
return (
(workInProgress.lanes = workInProgress.childLanes = 536870912),
deferHiddenOffscreenComponent(
@@ -4490,17 +4524,6 @@ module.exports = function ($$$config) {
renderLanes
)
);
workInProgress.memoizedState = { baseLanes: 0, cachePool: null };
null !== current &&
pushTransition(
workInProgress,
null !== prevState ? prevState.cachePool : null,
null
);
null !== prevState
? pushHiddenContext(workInProgress, prevState)
: reuseHiddenContextOnStack();
pushOffscreenSuspenseHandler(workInProgress);
} else if (null !== prevState) {
nextProps = prevState.cachePool;
var transitions = null;
@@ -4548,6 +4571,31 @@ module.exports = function ($$$config) {
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(
workInProgress,
workInProgress.pendingProps
);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -4947,8 +4995,7 @@ module.exports = function ($$$config) {
retryLane: 536870912,
hydrationErrors: null
}),
(renderLanes = createFiber(18, null, null, 0)),
(renderLanes.stateNode = current),
(renderLanes = createFiberFromDehydratedFragment(current)),
(renderLanes.return = workInProgress),
(workInProgress.child = renderLanes),
(hydrationParentFiber = workInProgress),
@@ -5045,14 +5092,14 @@ module.exports = function ($$$config) {
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(nextFallbackChildren = workInProgress.mode),
(showFallback = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
nextFallbackChildren
showFallback
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
nextFallbackChildren,
showFallback,
renderLanes,
null
)),
@@ -5106,15 +5153,10 @@ module.exports = function ($$$config) {
JSCompiler_temp = workInProgressRoot;
if (
null !== JSCompiler_temp &&
((nextProps = renderLanes & -renderLanes),
(nextProps =
0 !== (nextProps & 42)
? 1
: getBumpedLaneForHydrationByLane(nextProps)),
(nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps),
((nextProps = getBumpedLaneForHydration(
JSCompiler_temp,
renderLanes
)),
0 !== nextProps && nextProps !== nextFallbackChildren.retryLane)
)
throw (
@@ -5146,12 +5188,7 @@ module.exports = function ($$$config) {
(hydrationErrors = null),
(rootOrSingletonContext = !1),
null !== current &&
((idStack[idStackIndex++] = treeContextId),
(idStack[idStackIndex++] = treeContextOverflow),
(idStack[idStackIndex++] = treeContextProvider),
(treeContextId = current.id),
(treeContextOverflow = current.overflow),
(treeContextProvider = workInProgress))),
restoreSuspendedTreeContext(workInProgress, current)),
(workInProgress = mountSuspensePrimaryChildren(
workInProgress,
nextProps.children
@@ -5162,14 +5199,14 @@ module.exports = function ($$$config) {
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
nextFallbackChildren = workInProgress.mode;
showFallback = current.child;
didSuspend = showFallback.sibling;
nextProps = createWorkInProgress(showFallback, {
showFallback = workInProgress.mode;
nextFallbackChildren = current.child;
didSuspend = nextFallbackChildren.sibling;
nextProps = createWorkInProgress(nextFallbackChildren, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = showFallback.subtreeFlags & 65011712;
nextProps.subtreeFlags = nextFallbackChildren.subtreeFlags & 65011712;
null !== didSuspend
? (nextPrimaryChildren = createWorkInProgress(
didSuspend,
@@ -5177,7 +5214,7 @@ module.exports = function ($$$config) {
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
nextFallbackChildren,
showFallback,
renderLanes,
null
)),
@@ -5188,53 +5225,53 @@ module.exports = function ($$$config) {
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
nextFallbackChildren = current.child.memoizedState;
null === nextFallbackChildren
? (nextFallbackChildren = mountSuspenseOffscreenState(renderLanes))
: ((showFallback = nextFallbackChildren.cachePool),
null !== showFallback
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((nextFallbackChildren = showFallback.cachePool),
null !== nextFallbackChildren
? ((didSuspend = isPrimaryRenderer
? CacheContext._currentValue
: CacheContext._currentValue2),
(showFallback =
showFallback.parent !== didSuspend
(nextFallbackChildren =
nextFallbackChildren.parent !== didSuspend
? { parent: didSuspend, pool: didSuspend }
: showFallback))
: (showFallback = getSuspendedCache()),
(nextFallbackChildren = {
baseLanes: nextFallbackChildren.baseLanes | renderLanes,
cachePool: showFallback
: nextFallbackChildren))
: (nextFallbackChildren = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
cachePool: nextFallbackChildren
}));
nextPrimaryChildren.memoizedState = nextFallbackChildren;
nextPrimaryChildren.memoizedState = showFallback;
if (
enableTransitionTracing &&
((nextFallbackChildren = enableTransitionTracing
((showFallback = enableTransitionTracing
? transitionStack.current
: null),
null !== nextFallbackChildren)
null !== showFallback)
) {
showFallback = enableTransitionTracing
nextFallbackChildren = enableTransitionTracing
? markerInstanceStack.current
: null;
didSuspend = nextPrimaryChildren.updateQueue;
var currentOffscreenQueue = current.updateQueue;
null === didSuspend
? (nextPrimaryChildren.updateQueue = {
transitions: nextFallbackChildren,
markerInstances: showFallback,
transitions: showFallback,
markerInstances: nextFallbackChildren,
retryQueue: null
})
: didSuspend === currentOffscreenQueue
? (nextPrimaryChildren.updateQueue = {
transitions: nextFallbackChildren,
markerInstances: showFallback,
transitions: showFallback,
markerInstances: nextFallbackChildren,
retryQueue:
null !== currentOffscreenQueue
? currentOffscreenQueue.retryQueue
: null
})
: ((didSuspend.transitions = nextFallbackChildren),
(didSuspend.markerInstances = showFallback));
: ((didSuspend.transitions = showFallback),
(didSuspend.markerInstances = nextFallbackChildren));
}
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
current,
@@ -5505,10 +5542,18 @@ module.exports = function ($$$config) {
workInProgress.memoizedProps.value
);
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
var state = workInProgress.memoizedState;
if (null !== state) {
if (null !== state.dehydrated)
var state$96 = workInProgress.memoizedState;
if (null !== state$96) {
if (null !== state$96.dehydrated)
return (
pushPrimaryTreeSuspenseHandler(workInProgress),
(workInProgress.flags |= 128),
@@ -5532,17 +5577,17 @@ module.exports = function ($$$config) {
break;
case 19:
var didSuspendBefore = 0 !== (current.flags & 128);
state = 0 !== (renderLanes & workInProgress.childLanes);
state ||
state$96 = 0 !== (renderLanes & workInProgress.childLanes);
state$96 ||
(propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
),
(state = 0 !== (renderLanes & workInProgress.childLanes)));
(state$96 = 0 !== (renderLanes & workInProgress.childLanes)));
if (didSuspendBefore) {
if (state)
if (state$96)
return updateSuspenseListComponent(
current,
workInProgress,
@@ -5556,7 +5601,7 @@ module.exports = function ($$$config) {
(didSuspendBefore.tail = null),
(didSuspendBefore.lastEffect = null));
push(suspenseStackCursor, suspenseStackCursor.current);
if (state) break;
if (state$96) break;
else return null;
case 22:
return (
@@ -5573,8 +5618,8 @@ module.exports = function ($$$config) {
break;
case 25:
if (enableTransitionTracing) {
state = workInProgress.stateNode;
null !== state && pushMarkerInstance(workInProgress, state);
state$96 = workInProgress.stateNode;
null !== state$96 && pushMarkerInstance(workInProgress, state$96);
break;
}
case 23:
@@ -6065,33 +6110,107 @@ module.exports = function ($$$config) {
workInProgress.child
);
case 31:
props = workInProgress.pendingProps;
renderLanes = workInProgress.mode;
props = { mode: props.mode, children: props.children };
if (null === current) {
init = workInProgress.pendingProps;
nextState = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
if (isHydrating) {
if ("hidden" === init.mode)
mountActivityChildren(workInProgress, init);
else if (
(pushDehydratedActivitySuspenseHandler(workInProgress),
(renderLanes = nextHydratableInstance)
? ((renderLanes = canHydrateActivityInstance(
renderLanes,
rootOrSingletonContext
)),
null !== renderLanes &&
((workInProgress.memoizedState = {
dehydrated: renderLanes,
treeContext:
null !== treeContextProvider
? { id: treeContextId, overflow: treeContextOverflow }
: null,
retryLane: 536870912,
hydrationErrors: null
}),
(current = createFiberFromDehydratedFragment(renderLanes)),
(current.return = workInProgress),
(workInProgress.child = current),
(hydrationParentFiber = workInProgress),
(nextHydratableInstance = null)))
: (renderLanes = null),
null === renderLanes)
)
throw throwOnHydrationMismatch(workInProgress);
workInProgress.lanes = 536870912;
workInProgress = null;
} else workInProgress = mountActivityChildren(workInProgress, init);
else if (((props = current.memoizedState), null !== props))
if (
isHydrating &&
((current = nextHydratableInstance)
? ((current = canHydrateActivityInstance(
current,
rootOrSingletonContext
)),
null !== current &&
((workInProgress.stateNode = current),
(hydrationParentFiber = workInProgress),
(nextHydratableInstance =
getFirstHydratableChildWithinActivityInstance(current))))
: (current = null),
null === current)
((nextProps = props.dehydrated),
pushDehydratedActivitySuspenseHandler(workInProgress),
nextState)
)
throw throwOnHydrationMismatch(workInProgress);
renderLanes = mountWorkInProgressOffscreenFiber(props, renderLanes);
renderLanes.ref = workInProgress.ref;
workInProgress.child = renderLanes;
renderLanes.return = workInProgress;
workInProgress = renderLanes;
} else
(renderLanes = createWorkInProgress(current.child, props)),
if (workInProgress.flags & 256)
(workInProgress.flags &= -257),
(workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
));
else if (null !== workInProgress.memoizedState)
(workInProgress.child = current.child),
(workInProgress.flags |= 128),
(workInProgress = null);
else throw Error(formatProdErrorMessage(558));
else if (
(didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
!1
),
(nextState = 0 !== (renderLanes & current.childLanes)),
didReceiveUpdate || nextState)
) {
init = workInProgressRoot;
if (
null !== init &&
((nextProps = getBumpedLaneForHydration(init, renderLanes)),
0 !== nextProps && nextProps !== props.retryLane)
)
throw (
((props.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(init, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
} else
(renderLanes = props.treeContext),
supportsHydration &&
((nextHydratableInstance =
getFirstHydratableChildWithinActivityInstance(nextProps)),
(hydrationParentFiber = workInProgress),
(isHydrating = !0),
(hydrationErrors = null),
(rootOrSingletonContext = !1),
null !== renderLanes &&
restoreSuspendedTreeContext(workInProgress, renderLanes)),
(workInProgress = mountActivityChildren(workInProgress, init)),
(workInProgress.flags |= 4096);
else
(renderLanes = createWorkInProgress(current.child, {
mode: init.mode,
children: init.children
})),
(renderLanes.ref = workInProgress.ref),
(workInProgress.child = renderLanes),
(renderLanes.return = workInProgress),
@@ -6771,17 +6890,17 @@ module.exports = function ($$$config) {
if (popHydrationState(workInProgress))
prepareToHydrateHostInstance(workInProgress, nextResource);
else {
var instance$121 = createInstance(
var instance$122 = createInstance(
type,
newProps,
rootInstanceStackCursor.current,
nextResource,
workInProgress
);
appendAllChildren(instance$121, workInProgress, !1, !1);
workInProgress.stateNode = instance$121;
appendAllChildren(instance$122, workInProgress, !1, !1);
workInProgress.stateNode = instance$122;
finalizeInitialChildren(
instance$121,
instance$122,
type,
newProps,
nextResource
@@ -6849,11 +6968,41 @@ module.exports = function ($$$config) {
bubbleProperties(workInProgress);
return null;
case 31:
return (
null === current && popHydrationState(workInProgress),
bubbleProperties(workInProgress),
null
);
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
newProps = popHydrationState(workInProgress);
if (null !== renderLanes) {
if (null === current) {
if (!newProps) throw Error(formatProdErrorMessage(318));
if (!supportsHydration) throw Error(formatProdErrorMessage(556));
current = workInProgress.memoizedState;
current = null !== current ? current.dehydrated : null;
if (!current) throw Error(formatProdErrorMessage(557));
hydrateActivityInstance(current, workInProgress);
} else
resetHydrationState(),
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null),
(workInProgress.flags |= 4);
bubbleProperties(workInProgress);
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(formatProdErrorMessage(558));
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -7139,6 +7288,17 @@ module.exports = function ($$$config) {
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (null !== workInProgress.memoizedState) {
popSuspenseHandler(workInProgress);
if (null === workInProgress.alternate)
throw Error(formatProdErrorMessage(340));
resetHydrationState();
}
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128), workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -7209,6 +7369,10 @@ module.exports = function ($$$config) {
case 4:
popHostContainer();
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -7382,8 +7546,8 @@ module.exports = function ($$$config) {
else if ("function" === typeof ref)
try {
ref(null);
} catch (error$145) {
captureCommitPhaseError(current, nearestMountedAncestor, error$145);
} catch (error$148) {
captureCommitPhaseError(current, nearestMountedAncestor, error$148);
}
else ref.current = null;
}
@@ -8195,11 +8359,11 @@ module.exports = function ($$$config) {
current,
finishedRoot.__reactInternalSnapshotBeforeUpdate
);
} catch (error$143) {
} catch (error$146) {
captureCommitPhaseError(
finishedWork,
finishedWork.return,
error$143
error$146
);
}
}
@@ -8243,6 +8407,11 @@ module.exports = function ($$$config) {
case 12:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 &&
commitActivityHydrationCallbacks(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 4 &&
@@ -8729,6 +8898,31 @@ module.exports = function ($$$config) {
);
}
}
function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
if (supportsHydration && null === finishedWork.memoizedState) {
var current = finishedWork.alternate;
if (
null !== current &&
((current = current.memoizedState), null !== current)
) {
current = current.dehydrated;
try {
commitHydratedActivityInstance(current);
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
try {
var hydrationCallbacks = finishedRoot.hydrationCallbacks;
if (null !== hydrationCallbacks) {
var onHydrated = hydrationCallbacks.onHydrated;
onHydrated && onHydrated(current);
}
} catch (error) {
captureCommitPhaseError(finishedWork, finishedWork.return, error);
}
}
}
}
function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
if (supportsHydration && null === finishedWork.memoizedState) {
var current = finishedWork.alternate;
@@ -8756,6 +8950,7 @@ module.exports = function ($$$config) {
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -9040,6 +9235,15 @@ module.exports = function ($$$config) {
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork, lanes);
commitReconciliationEffects(finishedWork);
@@ -9247,25 +9451,25 @@ module.exports = function ($$$config) {
break;
}
case 5:
var parent$146 = hostParentFiber.stateNode;
var parent$149 = hostParentFiber.stateNode;
hostParentFiber.flags & 32 &&
(resetTextContent(parent$146), (hostParentFiber.flags &= -33));
var before$147 = getHostSibling(finishedWork);
(resetTextContent(parent$149), (hostParentFiber.flags &= -33));
var before$150 = getHostSibling(finishedWork);
insertOrAppendPlacementNode(
finishedWork,
before$147,
parent$146,
before$150,
parent$149,
parentFragmentInstances
);
break;
case 3:
case 4:
var parent$148 = hostParentFiber.stateNode.containerInfo,
before$149 = getHostSibling(finishedWork);
var parent$151 = hostParentFiber.stateNode.containerInfo,
before$152 = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(
finishedWork,
before$149,
parent$148,
before$152,
parent$151,
parentFragmentInstances
);
break;
@@ -9537,6 +9741,16 @@ module.exports = function ($$$config) {
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
includeWorkInProgressEffects &&
flags & 4 &&
commitActivityHydrationCallbacks(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -9791,6 +10005,14 @@ module.exports = function ($$$config) {
committedTransitions
);
break;
case 31:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -9814,14 +10036,14 @@ module.exports = function ($$$config) {
);
break;
case 22:
var instance$162 = finishedWork.stateNode,
current$163 = finishedWork.alternate;
var instance$166 = finishedWork.stateNode,
current$167 = finishedWork.alternate;
null !== finishedWork.memoizedState
? (isViewTransitionEligible &&
null !== current$163 &&
null === current$163.memoizedState &&
restoreEnterOrExitViewTransitions(current$163),
instance$162._visibility & 2
null !== current$167 &&
null === current$167.memoizedState &&
restoreEnterOrExitViewTransitions(current$167),
instance$166._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
@@ -9833,17 +10055,17 @@ module.exports = function ($$$config) {
finishedWork
))
: (isViewTransitionEligible &&
null !== current$163 &&
null !== current$163.memoizedState &&
null !== current$167 &&
null !== current$167.memoizedState &&
restoreEnterOrExitViewTransitions(finishedWork),
instance$162._visibility & 2
instance$166._visibility & 2
? recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
)
: ((instance$162._visibility |= 2),
: ((instance$166._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -9853,9 +10075,9 @@ module.exports = function ($$$config) {
)));
flags & 2048 &&
commitOffscreenPassiveMountEffects(
current$163,
current$167,
finishedWork,
instance$162
instance$166
);
break;
case 24:
@@ -9950,9 +10172,9 @@ module.exports = function ($$$config) {
);
break;
case 22:
var instance$166 = finishedWork.stateNode;
var instance$170 = finishedWork.stateNode;
null !== finishedWork.memoizedState
? instance$166._visibility & 2
? instance$170._visibility & 2
? recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -9964,7 +10186,7 @@ module.exports = function ($$$config) {
finishedRoot,
finishedWork
)
: ((instance$166._visibility |= 2),
: ((instance$170._visibility |= 2),
recursivelyTraverseReconnectPassiveEffects(
finishedRoot,
finishedWork,
@@ -9977,7 +10199,7 @@ module.exports = function ($$$config) {
commitOffscreenPassiveMountEffects(
finishedWork.alternate,
finishedWork,
instance$166
instance$170
);
break;
case 24:
@@ -11106,8 +11328,8 @@ module.exports = function ($$$config) {
workLoopSync();
exitStatus = workInProgressRootExitStatus;
break;
} catch (thrownValue$183) {
handleThrow(root, thrownValue$183);
} catch (thrownValue$187) {
handleThrow(root, thrownValue$187);
}
while (1);
lanes && root.shellSuspendCounter++;
@@ -11228,8 +11450,8 @@ module.exports = function ($$$config) {
}
workLoopConcurrentByScheduler();
break;
} catch (thrownValue$185) {
handleThrow(root, thrownValue$185);
} catch (thrownValue$189) {
handleThrow(root, thrownValue$189);
}
while (1);
lastContextDependency = currentlyRenderingFiber$1 = null;
@@ -11852,6 +12074,7 @@ module.exports = function ($$$config) {
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -12196,6 +12419,11 @@ module.exports = function ($$$config) {
content.lanes = lanes;
return content;
}
function createFiberFromDehydratedFragment(dehydratedNode) {
var fiber = createFiber(18, null, null, 0);
fiber.stateNode = dehydratedNode;
return fiber;
}
function createFiberFromPortal(portal, mode, lanes) {
mode = createFiber(
4,
@@ -12537,16 +12765,16 @@ module.exports = function ($$$config) {
canHydrateActivityInstance = $$$config.canHydrateActivityInstance,
canHydrateSuspenseInstance = $$$config.canHydrateSuspenseInstance,
hydrateInstance = $$$config.hydrateInstance,
hydrateTextInstance = $$$config.hydrateTextInstance;
$$$config.hydrateActivityInstance;
var hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance,
hydrateTextInstance = $$$config.hydrateTextInstance,
hydrateActivityInstance = $$$config.hydrateActivityInstance,
hydrateSuspenseInstance = $$$config.hydrateSuspenseInstance,
getNextHydratableInstanceAfterActivityInstance =
$$$config.getNextHydratableInstanceAfterActivityInstance,
getNextHydratableInstanceAfterSuspenseInstance =
$$$config.getNextHydratableInstanceAfterSuspenseInstance,
commitHydratedContainer = $$$config.commitHydratedContainer;
$$$config.commitHydratedActivityInstance;
var commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance;
commitHydratedContainer = $$$config.commitHydratedContainer,
commitHydratedActivityInstance = $$$config.commitHydratedActivityInstance,
commitHydratedSuspenseInstance = $$$config.commitHydratedSuspenseInstance;
$$$config.clearActivityBoundary;
var clearSuspenseBoundary = $$$config.clearSuspenseBoundary;
$$$config.clearActivityBoundaryFromContainer;
@@ -13229,14 +13457,14 @@ module.exports = function ($$$config) {
? createFiberImplObject
: createFiberImplClass;
exports.attemptContinuousHydration = function (fiber) {
if (13 === fiber.tag) {
if (13 === fiber.tag || 31 === fiber.tag) {
var root = enqueueConcurrentRenderForLane(fiber, 67108864);
null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);
markRetryLaneIfNotHydrated(fiber, 67108864);
}
};
exports.attemptHydrationAtCurrentPriority = function (fiber) {
if (13 === fiber.tag) {
if (13 === fiber.tag || 31 === fiber.tag) {
var lane = requestUpdateLane();
lane = getBumpedLaneForHydrationByLane(lane);
var root = enqueueConcurrentRenderForLane(fiber, lane);
@@ -13264,6 +13492,7 @@ module.exports = function ($$$config) {
}
}
break;
case 31:
case 13:
(lanes = enqueueConcurrentRenderForLane(fiber, 2)),
null !== lanes && scheduleUpdateOnFiber(lanes, fiber, 2),
@@ -13576,7 +13805,7 @@ module.exports = function ($$$config) {
version: rendererVersion,
rendererPackageName: rendererPackageName,
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -13,7 +13,7 @@
"use strict";
__DEV__ &&
(function () {
function JSCompiler_object_inline_createNodeMock_1141() {
function JSCompiler_object_inline_createNodeMock_1158() {
return null;
}
function findHook(fiber, id) {
@@ -669,6 +669,50 @@ __DEV__ &&
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
if (0 !== (renderLane & 42)) renderLane = 1;
else
switch (renderLane) {
case 2:
renderLane = 1;
break;
case 8:
renderLane = 4;
break;
case 32:
renderLane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
renderLane = 128;
break;
case 268435456:
renderLane = 134217728;
break;
default:
renderLane = 0;
}
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function lanesToEventPriority(lanes) {
lanes &= -lanes;
return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes
@@ -3961,6 +4005,11 @@ __DEV__ &&
handler
);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current, fiber);
push(suspenseHandlerStackCursor, fiber, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),
@@ -5792,6 +5841,7 @@ __DEV__ &&
returnFiber = suspenseHandlerStackCursor.current;
if (null !== returnFiber) {
switch (returnFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -6133,6 +6183,42 @@ __DEV__ &&
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
var hiddenProp = nextProps.hidden;
void 0 !== hiddenProp &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === hiddenProp
? "hidden"
: !1 === hiddenProp
? "hidden={false}"
: "hidden={...}",
hiddenProp ? 'mode="hidden"' : 'mode="visible"'
);
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(
workInProgress,
workInProgress.pendingProps
);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -6921,10 +7007,10 @@ __DEV__ &&
(nextProps.return = workInProgress),
(nextPrimaryChildren.sibling = nextProps),
(workInProgress.child = nextPrimaryChildren),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
(showFallback = workInProgress.child),
(showFallback.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -6958,22 +7044,22 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(showFallback = workInProgress.mode),
(showFallback = nextProps.fallback),
(nextPrimaryChildren = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
showFallback
nextPrimaryChildren
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
(showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2),
(showFallback.flags |= 2),
(nextProps.return = workInProgress),
(nextPrimaryChildren.return = workInProgress),
(nextProps.sibling = nextPrimaryChildren),
(showFallback.return = workInProgress),
(nextProps.sibling = showFallback),
(workInProgress.child = nextProps),
reconcileChildFibers(
workInProgress,
@@ -6990,31 +7076,32 @@ __DEV__ &&
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress = nextPrimaryChildren));
(workInProgress = showFallback));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isSuspenseInstanceFallback())
)
(showFallback = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = showFallback.digest),
(nextPrimaryChildren = showFallback.message),
(nextProps = showFallback.stack),
(showFallback = showFallback.componentStack),
(nextPrimaryChildren = nextPrimaryChildren
? Error(nextPrimaryChildren)
(nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = nextPrimaryChildren.digest),
(showFallback = nextPrimaryChildren.message),
(nextProps = nextPrimaryChildren.stack),
(nextPrimaryChildren = nextPrimaryChildren.componentStack),
(showFallback = showFallback
? Error(showFallback)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
)),
(nextPrimaryChildren.stack = nextProps || ""),
(nextPrimaryChildren.digest = JSCompiler_temp),
(JSCompiler_temp = void 0 === showFallback ? null : showFallback),
(showFallback.stack = nextProps || ""),
(showFallback.digest = JSCompiler_temp),
(JSCompiler_temp =
void 0 === nextPrimaryChildren ? null : nextPrimaryChildren),
(nextProps = {
value: nextPrimaryChildren,
value: showFallback,
source: null,
stack: JSCompiler_temp
}),
"string" === typeof JSCompiler_temp &&
CapturedStacks.set(nextPrimaryChildren, nextProps),
CapturedStacks.set(showFallback, nextProps),
null === hydrationErrors
? (hydrationErrors = [nextProps])
: hydrationErrors.push(nextProps),
@@ -7035,58 +7122,20 @@ __DEV__ &&
didReceiveUpdate || JSCompiler_temp)
) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
nextProps = 1;
break;
case 8:
nextProps = 4;
break;
case 32:
nextProps = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
nextProps = 128;
break;
case 268435456:
nextProps = 134217728;
break;
default:
nextProps = 0;
}
nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps;
if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
}
if (
null !== JSCompiler_temp &&
((nextProps = getBumpedLaneForHydration(
JSCompiler_temp,
renderLanes
)),
0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
isSuspenseInstancePending() || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -7107,37 +7156,37 @@ __DEV__ &&
}
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
showFallback = workInProgress.mode;
showFallback = nextProps.fallback;
nextPrimaryChildren = workInProgress.mode;
didSuspend = current.child;
var currentFallbackChildFragment = didSuspend.sibling;
nextProps = createWorkInProgress(didSuspend, {
nextProps = updateWorkInProgressOffscreenFiber(didSuspend, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712;
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
? (showFallback = createWorkInProgress(
currentFallbackChildFragment,
nextPrimaryChildren
showFallback
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
: ((showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2));
nextPrimaryChildren.return = workInProgress;
(showFallback.flags |= 2));
showFallback.return = workInProgress;
nextProps.return = workInProgress;
nextProps.sibling = nextPrimaryChildren;
nextProps.sibling = showFallback;
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = showFallback.cachePool),
nextProps = showFallback;
showFallback = workInProgress.child;
nextPrimaryChildren = current.child.memoizedState;
null === nextPrimaryChildren
? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = nextPrimaryChildren.cachePool),
null !== didSuspend
? ((currentFallbackChildFragment = CacheContext._currentValue2),
(didSuspend =
@@ -7148,12 +7197,12 @@ __DEV__ &&
}
: didSuspend))
: (didSuspend = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
(nextPrimaryChildren = {
baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
cachePool: didSuspend
}));
nextPrimaryChildren.memoizedState = showFallback;
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
showFallback.memoizedState = nextPrimaryChildren;
showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -7164,7 +7213,7 @@ __DEV__ &&
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, {
mode: "visible",
children: nextProps.children
});
@@ -7199,6 +7248,9 @@ __DEV__ &&
};
return offscreenProps;
}
function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
return createWorkInProgress(current, offscreenProps);
}
function retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -7514,6 +7566,14 @@ __DEV__ &&
stateNode.effectDuration = -0;
stateNode.passiveEffectDuration = -0;
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
stateNode = workInProgress.memoizedState;
if (null !== stateNode) {
@@ -7963,40 +8023,83 @@ __DEV__ &&
workInProgress.child
);
case 31:
return (
(renderLanes = workInProgress.pendingProps),
(returnFiber = renderLanes.hidden),
void 0 !== returnFiber &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === returnFiber
? "hidden"
: !1 === returnFiber
? "hidden={false}"
: "hidden={...}",
returnFiber ? 'mode="hidden"' : 'mode="visible"'
),
(returnFiber = workInProgress.mode),
(renderLanes = {
mode: renderLanes.mode,
children: renderLanes.children
}),
null === current
? ((current = mountWorkInProgressOffscreenFiber(
prevSibling = workInProgress.pendingProps;
nextProps = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
workInProgress = mountActivityChildren(workInProgress, prevSibling);
else if (
((returnFiber = current.memoizedState), null !== returnFiber)
)
b: {
pushDehydratedActivitySuspenseHandler(workInProgress);
if (nextProps) {
if (workInProgress.flags & 256) {
workInProgress.flags &= -257;
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
break b;
}
if (null !== workInProgress.memoizedState) {
workInProgress.child = current.child;
workInProgress.flags |= 128;
workInProgress = null;
break b;
}
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
returnFiber
!1
);
nextProps = 0 !== (renderLanes & current.childLanes);
if (didReceiveUpdate || nextProps) {
prevSibling = workInProgressRoot;
if (
null !== prevSibling &&
((nextProps = getBumpedLaneForHydration(
prevSibling,
renderLanes
)),
0 !== nextProps && nextProps !== returnFiber.retryLane)
)
throw (
((returnFiber.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(prevSibling, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
} else
(workInProgress = mountActivityChildren(
workInProgress,
prevSibling
)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current))
: ((current = createWorkInProgress(current.child, renderLanes)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current)),
workInProgress
);
(workInProgress.flags |= 4096);
}
else
(current = updateWorkInProgressOffscreenFiber(current.child, {
mode: prevSibling.mode,
children: prevSibling.children
})),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current);
return workInProgress;
case 22:
return updateOffscreenComponent(
current,
@@ -8395,7 +8498,48 @@ __DEV__ &&
bubbleProperties(workInProgress);
return null;
case 31:
return bubbleProperties(workInProgress), null;
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
if (null !== renderLanes) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
);
throw Error(
"Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(renderLanes = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== renderLanes &&
((current = workInProgress.child),
null !== current &&
(workInProgress.treeBaseDuration -=
current.treeBaseDuration));
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -8403,7 +8547,8 @@ __DEV__ &&
(null !== current.memoizedState &&
null !== current.memoizedState.dehydrated)
) {
if (null !== newProps && null !== newProps.dehydrated) {
child = newProps;
if (null !== child && null !== child.dehydrated) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
@@ -8414,11 +8559,11 @@ __DEV__ &&
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null);
(child = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== newProps &&
null !== child &&
((child = workInProgress.child),
null !== child &&
(workInProgress.treeBaseDuration -= child.treeBaseDuration));
@@ -8679,6 +8824,22 @@ __DEV__ &&
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (
null !== workInProgress.memoizedState &&
(popSuspenseHandler(workInProgress),
null === workInProgress.alternate)
)
throw Error(
"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
);
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128),
0 !== (workInProgress.mode & 2) &&
transferActualDuration(workInProgress),
workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -8746,6 +8907,10 @@ __DEV__ &&
case 4:
popHostContainer(interruptedWork);
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -9452,6 +9617,9 @@ __DEV__ &&
}
} else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 64 &&
@@ -9688,6 +9856,7 @@ __DEV__ &&
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -9894,6 +10063,15 @@ __DEV__ &&
finishedWork.stateNode.effectDuration +=
bubbleNestedEffectDurations(flags);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
@@ -10249,6 +10427,13 @@ __DEV__ &&
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -10411,6 +10596,14 @@ __DEV__ &&
committedTransitions
);
break;
case 31:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -12198,6 +12391,7 @@ __DEV__ &&
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -15147,10 +15341,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-www-classic-17f88c80-20250422",
version: "19.2.0-www-classic-3ef31d19-20250422",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-classic-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-classic-3ef31d19-20250422"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15170,7 +15364,7 @@ __DEV__ &&
exports._Scheduler = Scheduler;
exports.act = act;
exports.create = function (element, options) {
var createNodeMock = JSCompiler_object_inline_createNodeMock_1141,
var createNodeMock = JSCompiler_object_inline_createNodeMock_1158,
isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT,
isConcurrent = isConcurrentOnly,
isStrictMode = !1;
@@ -15285,5 +15479,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.version = "19.2.0-www-classic-17f88c80-20250422";
exports.version = "19.2.0-www-classic-3ef31d19-20250422";
})();
@@ -13,7 +13,7 @@
"use strict";
__DEV__ &&
(function () {
function JSCompiler_object_inline_createNodeMock_1141() {
function JSCompiler_object_inline_createNodeMock_1158() {
return null;
}
function findHook(fiber, id) {
@@ -669,6 +669,50 @@ __DEV__ &&
rootEntangledLanes &= ~lane;
}
}
function getBumpedLaneForHydration(root, renderLanes) {
var renderLane = renderLanes & -renderLanes;
if (0 !== (renderLane & 42)) renderLane = 1;
else
switch (renderLane) {
case 2:
renderLane = 1;
break;
case 8:
renderLane = 4;
break;
case 32:
renderLane = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
renderLane = 128;
break;
case 268435456:
renderLane = 134217728;
break;
default:
renderLane = 0;
}
return 0 !== (renderLane & (root.suspendedLanes | renderLanes))
? 0
: renderLane;
}
function lanesToEventPriority(lanes) {
lanes &= -lanes;
return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes
@@ -3961,6 +4005,11 @@ __DEV__ &&
handler
);
}
function pushDehydratedActivitySuspenseHandler(fiber) {
push(suspenseStackCursor, suspenseStackCursor.current, fiber);
push(suspenseHandlerStackCursor, fiber, fiber);
null === shellBoundary && (shellBoundary = fiber);
}
function pushOffscreenSuspenseHandler(fiber) {
22 === fiber.tag
? (push(suspenseStackCursor, suspenseStackCursor.current, fiber),
@@ -5792,6 +5841,7 @@ __DEV__ &&
returnFiber = suspenseHandlerStackCursor.current;
if (null !== returnFiber) {
switch (returnFiber.tag) {
case 31:
case 13:
return (
null === shellBoundary
@@ -6133,6 +6183,42 @@ __DEV__ &&
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
return null;
}
function mountActivityChildren(workInProgress, nextProps) {
var hiddenProp = nextProps.hidden;
void 0 !== hiddenProp &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === hiddenProp
? "hidden"
: !1 === hiddenProp
? "hidden={false}"
: "hidden={...}",
hiddenProp ? 'mode="hidden"' : 'mode="visible"'
);
nextProps = mountWorkInProgressOffscreenFiber(
{ mode: nextProps.mode, children: nextProps.children },
workInProgress.mode
);
nextProps.ref = workInProgress.ref;
workInProgress.child = nextProps;
nextProps.return = workInProgress;
return nextProps;
}
function retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
) {
reconcileChildFibers(workInProgress, current.child, null, renderLanes);
current = mountActivityChildren(
workInProgress,
workInProgress.pendingProps
);
current.flags |= 2;
popSuspenseHandler(workInProgress);
workInProgress.memoizedState = null;
return current;
}
function markRef(current, workInProgress) {
var ref = workInProgress.ref;
if (null === ref)
@@ -6921,10 +7007,10 @@ __DEV__ &&
(nextProps.return = workInProgress),
(nextPrimaryChildren.sibling = nextProps),
(workInProgress.child = nextPrimaryChildren),
(nextPrimaryChildren = workInProgress.child),
(nextPrimaryChildren.memoizedState =
(showFallback = workInProgress.child),
(showFallback.memoizedState =
mountSuspenseOffscreenState(renderLanes)),
(nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
(showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -6958,22 +7044,22 @@ __DEV__ &&
(workInProgress.flags |= 128),
(workInProgress = null))
: (reuseSuspenseHandlerOnStack(workInProgress),
(nextPrimaryChildren = nextProps.fallback),
(showFallback = workInProgress.mode),
(showFallback = nextProps.fallback),
(nextPrimaryChildren = workInProgress.mode),
(nextProps = mountWorkInProgressOffscreenFiber(
{ mode: "visible", children: nextProps.children },
showFallback
nextPrimaryChildren
)),
(nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
(showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2),
(showFallback.flags |= 2),
(nextProps.return = workInProgress),
(nextPrimaryChildren.return = workInProgress),
(nextProps.sibling = nextPrimaryChildren),
(showFallback.return = workInProgress),
(nextProps.sibling = showFallback),
(workInProgress.child = nextProps),
reconcileChildFibers(
workInProgress,
@@ -6990,31 +7076,32 @@ __DEV__ &&
renderLanes
)),
(workInProgress.memoizedState = SUSPENDED_MARKER),
(workInProgress = nextPrimaryChildren));
(workInProgress = showFallback));
else if (
(pushPrimaryTreeSuspenseHandler(workInProgress),
isSuspenseInstanceFallback())
)
(showFallback = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = showFallback.digest),
(nextPrimaryChildren = showFallback.message),
(nextProps = showFallback.stack),
(showFallback = showFallback.componentStack),
(nextPrimaryChildren = nextPrimaryChildren
? Error(nextPrimaryChildren)
(nextPrimaryChildren = getSuspenseInstanceFallbackErrorDetails()),
(JSCompiler_temp = nextPrimaryChildren.digest),
(showFallback = nextPrimaryChildren.message),
(nextProps = nextPrimaryChildren.stack),
(nextPrimaryChildren = nextPrimaryChildren.componentStack),
(showFallback = showFallback
? Error(showFallback)
: Error(
"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
)),
(nextPrimaryChildren.stack = nextProps || ""),
(nextPrimaryChildren.digest = JSCompiler_temp),
(JSCompiler_temp = void 0 === showFallback ? null : showFallback),
(showFallback.stack = nextProps || ""),
(showFallback.digest = JSCompiler_temp),
(JSCompiler_temp =
void 0 === nextPrimaryChildren ? null : nextPrimaryChildren),
(nextProps = {
value: nextPrimaryChildren,
value: showFallback,
source: null,
stack: JSCompiler_temp
}),
"string" === typeof JSCompiler_temp &&
CapturedStacks.set(nextPrimaryChildren, nextProps),
CapturedStacks.set(showFallback, nextProps),
null === hydrationErrors
? (hydrationErrors = [nextProps])
: hydrationErrors.push(nextProps),
@@ -7035,58 +7122,20 @@ __DEV__ &&
didReceiveUpdate || JSCompiler_temp)
) {
JSCompiler_temp = workInProgressRoot;
if (null !== JSCompiler_temp) {
nextProps = renderLanes & -renderLanes;
if (0 !== (nextProps & 42)) nextProps = 1;
else
switch (nextProps) {
case 2:
nextProps = 1;
break;
case 8:
nextProps = 4;
break;
case 32:
nextProps = 16;
break;
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
nextProps = 128;
break;
case 268435456:
nextProps = 134217728;
break;
default:
nextProps = 0;
}
nextProps =
0 !== (nextProps & (JSCompiler_temp.suspendedLanes | renderLanes))
? 0
: nextProps;
if (0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
}
if (
null !== JSCompiler_temp &&
((nextProps = getBumpedLaneForHydration(
JSCompiler_temp,
renderLanes
)),
0 !== nextProps && nextProps !== nextPrimaryChildren.retryLane)
)
throw (
((nextPrimaryChildren.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),
SelectiveHydrationException)
);
isSuspenseInstancePending() || renderDidSuspendDelayIfPossible();
workInProgress = retrySuspenseComponentWithoutHydrating(
current,
@@ -7107,37 +7156,37 @@ __DEV__ &&
}
if (showFallback) {
reuseSuspenseHandlerOnStack(workInProgress);
nextPrimaryChildren = nextProps.fallback;
showFallback = workInProgress.mode;
showFallback = nextProps.fallback;
nextPrimaryChildren = workInProgress.mode;
didSuspend = current.child;
var currentFallbackChildFragment = didSuspend.sibling;
nextProps = createWorkInProgress(didSuspend, {
nextProps = updateWorkInProgressOffscreenFiber(didSuspend, {
mode: "hidden",
children: nextProps.children
});
nextProps.subtreeFlags = didSuspend.subtreeFlags & 65011712;
null !== currentFallbackChildFragment
? (nextPrimaryChildren = createWorkInProgress(
? (showFallback = createWorkInProgress(
currentFallbackChildFragment,
nextPrimaryChildren
showFallback
))
: ((nextPrimaryChildren = createFiberFromFragment(
nextPrimaryChildren,
: ((showFallback = createFiberFromFragment(
showFallback,
nextPrimaryChildren,
renderLanes,
null
)),
(nextPrimaryChildren.flags |= 2));
nextPrimaryChildren.return = workInProgress;
(showFallback.flags |= 2));
showFallback.return = workInProgress;
nextProps.return = workInProgress;
nextProps.sibling = nextPrimaryChildren;
nextProps.sibling = showFallback;
workInProgress.child = nextProps;
nextProps = nextPrimaryChildren;
nextPrimaryChildren = workInProgress.child;
showFallback = current.child.memoizedState;
null === showFallback
? (showFallback = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = showFallback.cachePool),
nextProps = showFallback;
showFallback = workInProgress.child;
nextPrimaryChildren = current.child.memoizedState;
null === nextPrimaryChildren
? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))
: ((didSuspend = nextPrimaryChildren.cachePool),
null !== didSuspend
? ((currentFallbackChildFragment = CacheContext._currentValue2),
(didSuspend =
@@ -7148,12 +7197,12 @@ __DEV__ &&
}
: didSuspend))
: (didSuspend = getSuspendedCache()),
(showFallback = {
baseLanes: showFallback.baseLanes | renderLanes,
(nextPrimaryChildren = {
baseLanes: nextPrimaryChildren.baseLanes | renderLanes,
cachePool: didSuspend
}));
nextPrimaryChildren.memoizedState = showFallback;
nextPrimaryChildren.childLanes = getRemainingWorkInPrimaryTree(
showFallback.memoizedState = nextPrimaryChildren;
showFallback.childLanes = getRemainingWorkInPrimaryTree(
current,
JSCompiler_temp,
renderLanes
@@ -7164,7 +7213,7 @@ __DEV__ &&
pushPrimaryTreeSuspenseHandler(workInProgress);
renderLanes = current.child;
current = renderLanes.sibling;
renderLanes = createWorkInProgress(renderLanes, {
renderLanes = updateWorkInProgressOffscreenFiber(renderLanes, {
mode: "visible",
children: nextProps.children
});
@@ -7199,6 +7248,9 @@ __DEV__ &&
};
return offscreenProps;
}
function updateWorkInProgressOffscreenFiber(current, offscreenProps) {
return createWorkInProgress(current, offscreenProps);
}
function retrySuspenseComponentWithoutHydrating(
current,
workInProgress,
@@ -7514,6 +7566,14 @@ __DEV__ &&
stateNode.effectDuration = -0;
stateNode.passiveEffectDuration = -0;
break;
case 31:
if (null !== workInProgress.memoizedState)
return (
(workInProgress.flags |= 128),
pushDehydratedActivitySuspenseHandler(workInProgress),
null
);
break;
case 13:
stateNode = workInProgress.memoizedState;
if (null !== stateNode) {
@@ -7963,40 +8023,83 @@ __DEV__ &&
workInProgress.child
);
case 31:
return (
(renderLanes = workInProgress.pendingProps),
(returnFiber = renderLanes.hidden),
void 0 !== returnFiber &&
console.error(
'<Activity> doesn\'t accept a hidden prop. Use mode="hidden" instead.\n- <Activity %s>\n+ <Activity %s>',
!0 === returnFiber
? "hidden"
: !1 === returnFiber
? "hidden={false}"
: "hidden={...}",
returnFiber ? 'mode="hidden"' : 'mode="visible"'
),
(returnFiber = workInProgress.mode),
(renderLanes = {
mode: renderLanes.mode,
children: renderLanes.children
}),
null === current
? ((current = mountWorkInProgressOffscreenFiber(
prevSibling = workInProgress.pendingProps;
nextProps = 0 !== (workInProgress.flags & 128);
workInProgress.flags &= -129;
if (null === current)
workInProgress = mountActivityChildren(workInProgress, prevSibling);
else if (
((returnFiber = current.memoizedState), null !== returnFiber)
)
b: {
pushDehydratedActivitySuspenseHandler(workInProgress);
if (nextProps) {
if (workInProgress.flags & 256) {
workInProgress.flags &= -257;
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
break b;
}
if (null !== workInProgress.memoizedState) {
workInProgress.child = current.child;
workInProgress.flags |= 128;
workInProgress = null;
break b;
}
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
didReceiveUpdate ||
propagateParentContextChanges(
current,
workInProgress,
renderLanes,
returnFiber
!1
);
nextProps = 0 !== (renderLanes & current.childLanes);
if (didReceiveUpdate || nextProps) {
prevSibling = workInProgressRoot;
if (
null !== prevSibling &&
((nextProps = getBumpedLaneForHydration(
prevSibling,
renderLanes
)),
0 !== nextProps && nextProps !== returnFiber.retryLane)
)
throw (
((returnFiber.retryLane = nextProps),
enqueueConcurrentRenderForLane(current, nextProps),
scheduleUpdateOnFiber(prevSibling, current, nextProps),
SelectiveHydrationException)
);
renderDidSuspendDelayIfPossible();
workInProgress = retryActivityComponentWithoutHydrating(
current,
workInProgress,
renderLanes
);
} else
(workInProgress = mountActivityChildren(
workInProgress,
prevSibling
)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current))
: ((current = createWorkInProgress(current.child, renderLanes)),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current)),
workInProgress
);
(workInProgress.flags |= 4096);
}
else
(current = updateWorkInProgressOffscreenFiber(current.child, {
mode: prevSibling.mode,
children: prevSibling.children
})),
(current.ref = workInProgress.ref),
(workInProgress.child = current),
(current.return = workInProgress),
(workInProgress = current);
return workInProgress;
case 22:
return updateOffscreenComponent(
current,
@@ -8395,7 +8498,48 @@ __DEV__ &&
bubbleProperties(workInProgress);
return null;
case 31:
return bubbleProperties(workInProgress), null;
renderLanes = workInProgress.memoizedState;
if (null === current || null !== current.memoizedState) {
if (null !== renderLanes) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
);
throw Error(
"Expected prepareToHydrateHostActivityInstance() to never be called. This error is likely caused by a bug in React. Please file an issue."
);
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(renderLanes = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== renderLanes &&
((current = workInProgress.child),
null !== current &&
(workInProgress.treeBaseDuration -=
current.treeBaseDuration));
current = !1;
} else
(renderLanes = upgradeHydrationErrorsToRecoverable()),
null !== current &&
null !== current.memoizedState &&
(current.memoizedState.hydrationErrors = renderLanes),
(current = !0);
if (!current) {
if (workInProgress.flags & 256)
return popSuspenseHandler(workInProgress), workInProgress;
popSuspenseHandler(workInProgress);
return null;
}
if (0 !== (workInProgress.flags & 128))
throw Error(
"Client rendering an Activity suspended it again. This is a bug in React."
);
}
bubbleProperties(workInProgress);
return null;
case 13:
newProps = workInProgress.memoizedState;
if (
@@ -8403,7 +8547,8 @@ __DEV__ &&
(null !== current.memoizedState &&
null !== current.memoizedState.dehydrated)
) {
if (null !== newProps && null !== newProps.dehydrated) {
child = newProps;
if (null !== child && null !== child.dehydrated) {
if (null === current) {
throw Error(
"A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
@@ -8414,11 +8559,11 @@ __DEV__ &&
}
emitPendingHydrationWarnings();
0 === (workInProgress.flags & 128) &&
(workInProgress.memoizedState = null);
(child = workInProgress.memoizedState = null);
workInProgress.flags |= 4;
bubbleProperties(workInProgress);
0 !== (workInProgress.mode & 2) &&
null !== newProps &&
null !== child &&
((child = workInProgress.child),
null !== child &&
(workInProgress.treeBaseDuration -= child.treeBaseDuration));
@@ -8679,6 +8824,22 @@ __DEV__ &&
case 27:
case 5:
return popHostContext(workInProgress), null;
case 31:
if (
null !== workInProgress.memoizedState &&
(popSuspenseHandler(workInProgress),
null === workInProgress.alternate)
)
throw Error(
"Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
);
current = workInProgress.flags;
return current & 65536
? ((workInProgress.flags = (current & -65537) | 128),
0 !== (workInProgress.mode & 2) &&
transferActualDuration(workInProgress),
workInProgress)
: null;
case 13:
popSuspenseHandler(workInProgress);
current = workInProgress.memoizedState;
@@ -8746,6 +8907,10 @@ __DEV__ &&
case 4:
popHostContainer(interruptedWork);
break;
case 31:
null !== interruptedWork.memoizedState &&
popSuspenseHandler(interruptedWork);
break;
case 13:
popSuspenseHandler(interruptedWork);
break;
@@ -9452,6 +9617,9 @@ __DEV__ &&
}
} else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 31:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
break;
case 13:
recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
flags & 64 &&
@@ -9688,6 +9856,7 @@ __DEV__ &&
}
function getRetryCache(finishedWork) {
switch (finishedWork.tag) {
case 31:
case 13:
case 19:
var retryCache = finishedWork.stateNode;
@@ -9894,6 +10063,15 @@ __DEV__ &&
finishedWork.stateNode.effectDuration +=
bubbleNestedEffectDurations(flags);
break;
case 31:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
flags & 4 &&
((flags = finishedWork.updateQueue),
null !== flags &&
((finishedWork.updateQueue = null),
attachSuspenseRetryListeners(finishedWork, flags)));
break;
case 13:
recursivelyTraverseMutationEffects(root, finishedWork);
commitReconciliationEffects(finishedWork);
@@ -10249,6 +10427,13 @@ __DEV__ &&
includeWorkInProgressEffects
);
break;
case 31:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
finishedWork,
includeWorkInProgressEffects
);
break;
case 13:
recursivelyTraverseReappearLayoutEffects(
finishedRoot,
@@ -10411,6 +10596,14 @@ __DEV__ &&
committedTransitions
);
break;
case 31:
recursivelyTraversePassiveMountEffects(
finishedRoot,
finishedWork,
committedLanes,
committedTransitions
);
break;
case 13:
recursivelyTraversePassiveMountEffects(
finishedRoot,
@@ -12198,6 +12391,7 @@ __DEV__ &&
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = 0;
switch (boundaryFiber.tag) {
case 31:
case 13:
var retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
@@ -15147,10 +15341,10 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.2.0-www-modern-17f88c80-20250422",
version: "19.2.0-www-modern-3ef31d19-20250422",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.2.0-www-modern-17f88c80-20250422"
reconcilerVersion: "19.2.0-www-modern-3ef31d19-20250422"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15170,7 +15364,7 @@ __DEV__ &&
exports._Scheduler = Scheduler;
exports.act = act;
exports.create = function (element, options) {
var createNodeMock = JSCompiler_object_inline_createNodeMock_1141,
var createNodeMock = JSCompiler_object_inline_createNodeMock_1158,
isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT,
isConcurrent = isConcurrentOnly,
isStrictMode = !1;
@@ -15285,5 +15479,5 @@ __DEV__ &&
exports.unstable_batchedUpdates = function (fn, a) {
return fn(a);
};
exports.version = "19.2.0-www-modern-17f88c80-20250422";
exports.version = "19.2.0-www-modern-3ef31d19-20250422";
})();
+1 -1
View File
@@ -1 +1 @@
19.2.0-www-classic-17f88c80-20250422
19.2.0-www-classic-3ef31d19-20250422
+1 -1
View File
@@ -1 +1 @@
19.2.0-www-modern-17f88c80-20250422
19.2.0-www-modern-3ef31d19-20250422