diff --git a/.github/.react-version b/.github/.react-version index 65b1f527ed479..19e67ffc2f627 100644 --- a/.github/.react-version +++ b/.github/.react-version @@ -1 +1 @@ -19.0.0-rc-3208e73e-20240730 \ No newline at end of file +19.0.0-rc-06d0b89e-20240801 \ No newline at end of file diff --git a/examples/reproduction-template/package.json b/examples/reproduction-template/package.json index 1a549edf06382..03664e901ebfb 100644 --- a/examples/reproduction-template/package.json +++ b/examples/reproduction-template/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "next": "canary", - "react": "19.0.0-rc-3208e73e-20240730", - "react-dom": "19.0.0-rc-3208e73e-20240730" + "react": "19.0.0-rc-06d0b89e-20240801", + "react-dom": "19.0.0-rc-06d0b89e-20240801" }, "devDependencies": { "@types/node": "20.12.12", diff --git a/package.json b/package.json index 88a0d271bf3b6..2b1525e270cef 100644 --- a/package.json +++ b/package.json @@ -200,19 +200,19 @@ "pretty-bytes": "5.3.0", "pretty-ms": "7.0.0", "random-seed": "0.3.0", - "react": "19.0.0-rc-3208e73e-20240730", + "react": "19.0.0-rc-06d0b89e-20240801", "react-17": "npm:react@17.0.2", - "react-builtin": "npm:react@19.0.0-rc-3208e73e-20240730", - "react-dom": "19.0.0-rc-3208e73e-20240730", + "react-builtin": "npm:react@19.0.0-rc-06d0b89e-20240801", + "react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom-17": "npm:react-dom@17.0.2", - "react-dom-builtin": "npm:react-dom@19.0.0-rc-3208e73e-20240730", - "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-3208e73e-20240730", - "react-experimental-builtin": "npm:react@0.0.0-experimental-3208e73e-20240730", - "react-is-builtin": "npm:react-is@19.0.0-rc-3208e73e-20240730", - "react-server-dom-turbopack": "19.0.0-rc-3208e73e-20240730", - "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-3208e73e-20240730", - "react-server-dom-webpack": "19.0.0-rc-3208e73e-20240730", - "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-3208e73e-20240730", + "react-dom-builtin": "npm:react-dom@19.0.0-rc-06d0b89e-20240801", + "react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-06d0b89e-20240801", + "react-experimental-builtin": "npm:react@0.0.0-experimental-06d0b89e-20240801", + "react-is-builtin": "npm:react-is@19.0.0-rc-06d0b89e-20240801", + "react-server-dom-turbopack": "19.0.0-rc-06d0b89e-20240801", + "react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-06d0b89e-20240801", + "react-server-dom-webpack": "19.0.0-rc-06d0b89e-20240801", + "react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-06d0b89e-20240801", "react-ssr-prepass": "1.0.8", "react-virtualized": "9.22.3", "relay-compiler": "13.0.2", @@ -222,8 +222,8 @@ "resolve-from": "5.0.0", "sass": "1.54.0", "satori": "0.10.9", - "scheduler-builtin": "npm:scheduler@0.25.0-rc-3208e73e-20240730", - "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-3208e73e-20240730", + "scheduler-builtin": "npm:scheduler@0.25.0-rc-06d0b89e-20240801", + "scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-06d0b89e-20240801", "seedrandom": "3.0.5", "semver": "7.3.7", "shell-quote": "1.7.3", @@ -263,10 +263,10 @@ "@babel/traverse": "7.22.5", "@types/react": "npm:types-react@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", - "react": "19.0.0-rc-3208e73e-20240730", - "react-dom": "19.0.0-rc-3208e73e-20240730", - "react-is": "19.0.0-rc-3208e73e-20240730", - "scheduler": "0.25.0-rc-3208e73e-20240730" + "react": "19.0.0-rc-06d0b89e-20240801", + "react-dom": "19.0.0-rc-06d0b89e-20240801", + "react-is": "19.0.0-rc-06d0b89e-20240801", + "scheduler": "0.25.0-rc-06d0b89e-20240801" }, "patchedDependencies": { "webpack-sources@3.2.3": "patches/webpack-sources@3.2.3.patch" diff --git a/packages/create-next-app/templates/index.ts b/packages/create-next-app/templates/index.ts index e4f82db223174..6dbbb45582e70 100644 --- a/packages/create-next-app/templates/index.ts +++ b/packages/create-next-app/templates/index.ts @@ -184,8 +184,8 @@ export const installTemplate = async ({ * Default dependencies. */ dependencies: { - react: "19.0.0-rc-3208e73e-20240730", - "react-dom": "19.0.0-rc-3208e73e-20240730", + react: "19.0.0-rc-06d0b89e-20240801", + "react-dom": "19.0.0-rc-06d0b89e-20240801", next: version, }, devDependencies: {}, diff --git a/packages/next/package.json b/packages/next/package.json index 7e6108cd6d428..a3054e64884f5 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -108,8 +108,8 @@ "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", - "react": "19.0.0-rc-3208e73e-20240730", - "react-dom": "19.0.0-rc-3208e73e-20240730", + "react": "19.0.0-rc-06d0b89e-20240801", + "react-dom": "19.0.0-rc-06d0b89e-20240801", "sass": "^1.3.0" }, "peerDependenciesMeta": { diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js index a2492284190fd..b9511f09a3fdf 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.development.js @@ -95,20 +95,6 @@ }); return array.sort().join(", "); } - function findHostInstancesForRefresh(root, families) { - var hostInstances = new Set(); - families = new Set( - families.map(function (family) { - return family.current; - }) - ); - findHostInstancesForMatchingFibersRecursively( - root.current, - families, - hostInstances - ); - return hostInstances; - } function scheduleRoot(root, element) { root.context === emptyContextObject && (updateContainerSync(element, root, null, null), flushSyncWork$1()); @@ -858,7 +844,7 @@ (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber)); hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), - (HostTransitionContext._currentValue = null)); + (HostTransitionContext._currentValue = NotPendingTransition)); } function typeName(value) { return ( @@ -4012,83 +3998,6 @@ staleFamilies ); } - function findHostInstancesForMatchingFibersRecursively( - fiber, - types, - hostInstances - ) { - var child = fiber.child, - sibling = fiber.sibling, - type = fiber.type, - candidateType = null; - switch (fiber.tag) { - case 0: - case 15: - case 1: - candidateType = type; - break; - case 11: - candidateType = type.render; - } - type = !1; - null !== candidateType && types.has(candidateType) && (type = !0); - if (type) - a: { - b: for (child = fiber, candidateType = !1; ; ) { - if (5 === child.tag || 26 === child.tag || 27 === child.tag) - (candidateType = !0), hostInstances.add(child.stateNode); - else if (null !== child.child) { - child.child.return = child; - child = child.child; - continue; - } - if (child === fiber) { - child = candidateType; - break b; - } - for (; null === child.sibling; ) { - if (null === child.return || child.return === fiber) { - child = candidateType; - break b; - } - child = child.return; - } - child.sibling.return = child.return; - child = child.sibling; - } - if (!child) - for (;;) { - switch (fiber.tag) { - case 27: - case 5: - hostInstances.add(fiber.stateNode); - break a; - case 4: - hostInstances.add(fiber.stateNode.containerInfo); - break a; - case 3: - hostInstances.add(fiber.stateNode.containerInfo); - break a; - } - if (null === fiber.return) - throw Error("Expected to reach root first."); - fiber = fiber.return; - } - } - else - null !== child && - findHostInstancesForMatchingFibersRecursively( - child, - types, - hostInstances - ); - null !== sibling && - findHostInstancesForMatchingFibersRecursively( - sibling, - types, - hostInstances - ); - } function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { var stack = CapturedStacks.get(value); @@ -7211,8 +7120,7 @@ ]; } function useHostTransitionStatus() { - var status = readContext(HostTransitionContext); - return null !== status ? status : NotPendingTransition; + return readContext(HostTransitionContext); } function mountId() { var hook = mountWorkInProgressHook(), @@ -8787,33 +8695,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2314; - var JSCompiler_object_inline_stack_2313 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2300; + var JSCompiler_object_inline_stack_2299 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2311 = !1; + var JSCompiler_object_inline_message_2297 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2314 = didSuspend) || - (JSCompiler_object_inline_componentStack_2314 = + (JSCompiler_object_inline_componentStack_2300 = didSuspend) || + (JSCompiler_object_inline_componentStack_2300 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2314 && - ((JSCompiler_object_inline_message_2311 = !0), + JSCompiler_object_inline_componentStack_2300 && + ((JSCompiler_object_inline_message_2297 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2314 = + JSCompiler_object_inline_componentStack_2300 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2311 + JSCompiler_object_inline_message_2297 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2312 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2298 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2312)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2298)) { c: { - var instance = JSCompiler_object_inline_digest_2312; + var instance = JSCompiler_object_inline_digest_2298; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8854,19 +8762,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2312 + JSCompiler_object_inline_digest_2298 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2312 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2298 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2312 && - ((JSCompiler_object_inline_digest_2312 = - JSCompiler_object_inline_digest_2312.dehydrated), - null !== JSCompiler_object_inline_digest_2312) + null !== JSCompiler_object_inline_digest_2298 && + ((JSCompiler_object_inline_digest_2298 = + JSCompiler_object_inline_digest_2298.dehydrated), + null !== JSCompiler_object_inline_digest_2298) ) return ( - JSCompiler_object_inline_digest_2312.data === + JSCompiler_object_inline_digest_2298.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8874,68 +8782,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2312 = - JSCompiler_object_inline_stack_2313.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2313.fallback; - if (JSCompiler_object_inline_message_2311) + JSCompiler_object_inline_digest_2298 = + JSCompiler_object_inline_stack_2299.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2299.fallback; + if (JSCompiler_object_inline_message_2297) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2313 = + (JSCompiler_object_inline_stack_2299 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2312, + JSCompiler_object_inline_digest_2298, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2311 = workInProgress.child), - (JSCompiler_object_inline_message_2311.memoizedState = + (JSCompiler_object_inline_message_2297 = workInProgress.child), + (JSCompiler_object_inline_message_2297.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2311.childLanes = + (JSCompiler_object_inline_message_2297.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2314, + JSCompiler_object_inline_componentStack_2300, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2313 + JSCompiler_object_inline_stack_2299 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2313.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2299.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2313 = + (JSCompiler_object_inline_stack_2299 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2312, + JSCompiler_object_inline_digest_2298, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2311 = workInProgress.child), - (JSCompiler_object_inline_message_2311.memoizedState = + (JSCompiler_object_inline_message_2297 = workInProgress.child), + (JSCompiler_object_inline_message_2297.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2311.childLanes = + (JSCompiler_object_inline_message_2297.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2314, + JSCompiler_object_inline_componentStack_2300, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2313 + JSCompiler_object_inline_stack_2299 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2312 + JSCompiler_object_inline_digest_2298 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2312 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2312) + ((JSCompiler_object_inline_digest_2298 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2298) ) { if (didSuspend) workInProgress.flags & 256 @@ -8952,94 +8860,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2311 = - JSCompiler_object_inline_stack_2313.fallback), - (JSCompiler_object_inline_digest_2312 = workInProgress.mode), - (JSCompiler_object_inline_stack_2313 = + (JSCompiler_object_inline_message_2297 = + JSCompiler_object_inline_stack_2299.fallback), + (JSCompiler_object_inline_digest_2298 = workInProgress.mode), + (JSCompiler_object_inline_stack_2299 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2313.children + children: JSCompiler_object_inline_stack_2299.children }, - JSCompiler_object_inline_digest_2312 + JSCompiler_object_inline_digest_2298 )), - (JSCompiler_object_inline_message_2311 = + (JSCompiler_object_inline_message_2297 = createFiberFromFragment( - JSCompiler_object_inline_message_2311, - JSCompiler_object_inline_digest_2312, + JSCompiler_object_inline_message_2297, + JSCompiler_object_inline_digest_2298, renderLanes, null )), - (JSCompiler_object_inline_message_2311.flags |= 2), - (JSCompiler_object_inline_stack_2313.return = workInProgress), - (JSCompiler_object_inline_message_2311.return = workInProgress), - (JSCompiler_object_inline_stack_2313.sibling = - JSCompiler_object_inline_message_2311), - (workInProgress.child = JSCompiler_object_inline_stack_2313), + (JSCompiler_object_inline_message_2297.flags |= 2), + (JSCompiler_object_inline_stack_2299.return = workInProgress), + (JSCompiler_object_inline_message_2297.return = workInProgress), + (JSCompiler_object_inline_stack_2299.sibling = + JSCompiler_object_inline_message_2297), + (workInProgress.child = JSCompiler_object_inline_stack_2299), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2313 = workInProgress.child), - (JSCompiler_object_inline_stack_2313.memoizedState = + (JSCompiler_object_inline_stack_2299 = workInProgress.child), + (JSCompiler_object_inline_stack_2299.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2313.childLanes = + (JSCompiler_object_inline_stack_2299.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2314, + JSCompiler_object_inline_componentStack_2300, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2311)); + (workInProgress = JSCompiler_object_inline_message_2297)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2312.data === + JSCompiler_object_inline_digest_2298.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2314 = - JSCompiler_object_inline_digest_2312.nextSibling && - JSCompiler_object_inline_digest_2312.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2314) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2314.dgst; - var message = JSCompiler_object_inline_componentStack_2314.msg; - instance = JSCompiler_object_inline_componentStack_2314.stck; + JSCompiler_object_inline_componentStack_2300 = + JSCompiler_object_inline_digest_2298.nextSibling && + JSCompiler_object_inline_digest_2298.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2300) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2300.dgst; + var message = JSCompiler_object_inline_componentStack_2300.msg; + instance = JSCompiler_object_inline_componentStack_2300.stck; var componentStack = - JSCompiler_object_inline_componentStack_2314.cstck; + JSCompiler_object_inline_componentStack_2300.cstck; } - JSCompiler_object_inline_message_2311 = message; - JSCompiler_object_inline_digest_2312 = JSCompiler_temp; - JSCompiler_object_inline_stack_2313 = instance; - JSCompiler_object_inline_componentStack_2314 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2312 && - ((JSCompiler_object_inline_message_2311 = - JSCompiler_object_inline_message_2311 - ? Error(JSCompiler_object_inline_message_2311) + JSCompiler_object_inline_message_2297 = message; + JSCompiler_object_inline_digest_2298 = JSCompiler_temp; + JSCompiler_object_inline_stack_2299 = instance; + JSCompiler_object_inline_componentStack_2300 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2298 && + ((JSCompiler_object_inline_message_2297 = + JSCompiler_object_inline_message_2297 + ? Error(JSCompiler_object_inline_message_2297) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2311.stack = - JSCompiler_object_inline_stack_2313 || ""), - (JSCompiler_object_inline_message_2311.digest = - JSCompiler_object_inline_digest_2312), - (JSCompiler_object_inline_componentStack_2314 = - void 0 === JSCompiler_object_inline_componentStack_2314 + (JSCompiler_object_inline_message_2297.stack = + JSCompiler_object_inline_stack_2299 || ""), + (JSCompiler_object_inline_message_2297.digest = + JSCompiler_object_inline_digest_2298), + (JSCompiler_object_inline_componentStack_2300 = + void 0 === JSCompiler_object_inline_componentStack_2300 ? null - : JSCompiler_object_inline_componentStack_2314), - "string" === typeof JSCompiler_object_inline_componentStack_2314 && + : JSCompiler_object_inline_componentStack_2300), + "string" === typeof JSCompiler_object_inline_componentStack_2300 && CapturedStacks.set( - JSCompiler_object_inline_message_2311, - JSCompiler_object_inline_componentStack_2314 + JSCompiler_object_inline_message_2297, + JSCompiler_object_inline_componentStack_2300 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2311, + value: JSCompiler_object_inline_message_2297, source: null, - stack: JSCompiler_object_inline_componentStack_2314 + stack: JSCompiler_object_inline_componentStack_2300 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9054,25 +8962,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2314 = + (JSCompiler_object_inline_componentStack_2300 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2314) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2300) ) { - JSCompiler_object_inline_componentStack_2314 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2314) { - JSCompiler_object_inline_stack_2313 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2313 & 42)) - JSCompiler_object_inline_stack_2313 = 1; + JSCompiler_object_inline_componentStack_2300 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2300) { + JSCompiler_object_inline_stack_2299 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2299 & 42)) + JSCompiler_object_inline_stack_2299 = 1; else - switch (JSCompiler_object_inline_stack_2313) { + switch (JSCompiler_object_inline_stack_2299) { case 2: - JSCompiler_object_inline_stack_2313 = 1; + JSCompiler_object_inline_stack_2299 = 1; break; case 8: - JSCompiler_object_inline_stack_2313 = 4; + JSCompiler_object_inline_stack_2299 = 4; break; case 32: - JSCompiler_object_inline_stack_2313 = 16; + JSCompiler_object_inline_stack_2299 = 16; break; case 128: case 256: @@ -9093,40 +9001,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2313 = 64; + JSCompiler_object_inline_stack_2299 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2313 = 134217728; + JSCompiler_object_inline_stack_2299 = 134217728; break; default: - JSCompiler_object_inline_stack_2313 = 0; + JSCompiler_object_inline_stack_2299 = 0; } - JSCompiler_object_inline_stack_2313 = + JSCompiler_object_inline_stack_2299 = 0 !== - (JSCompiler_object_inline_stack_2313 & - (JSCompiler_object_inline_componentStack_2314.suspendedLanes | + (JSCompiler_object_inline_stack_2299 & + (JSCompiler_object_inline_componentStack_2300.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2313; + : JSCompiler_object_inline_stack_2299; if ( - 0 !== JSCompiler_object_inline_stack_2313 && - JSCompiler_object_inline_stack_2313 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2299 && + JSCompiler_object_inline_stack_2299 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2313), + ((prevState.retryLane = JSCompiler_object_inline_stack_2299), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2313 + JSCompiler_object_inline_stack_2299 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2314, + JSCompiler_object_inline_componentStack_2300, current, - JSCompiler_object_inline_stack_2313 + JSCompiler_object_inline_stack_2299 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2312.data === + JSCompiler_object_inline_digest_2298.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9134,7 +9042,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2312.data === + JSCompiler_object_inline_digest_2298.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9142,12 +9050,12 @@ null, current )), - (JSCompiler_object_inline_digest_2312._reactRetry = + (JSCompiler_object_inline_digest_2298._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2312.nextSibling + JSCompiler_object_inline_digest_2298.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9165,54 +9073,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2313.children + JSCompiler_object_inline_stack_2299.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2311) + if (JSCompiler_object_inline_message_2297) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2311 = - JSCompiler_object_inline_stack_2313.fallback), - (JSCompiler_object_inline_digest_2312 = workInProgress.mode), + (JSCompiler_object_inline_message_2297 = + JSCompiler_object_inline_stack_2299.fallback), + (JSCompiler_object_inline_digest_2298 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2313 = createWorkInProgress( + (JSCompiler_object_inline_stack_2299 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2313.children + children: JSCompiler_object_inline_stack_2299.children } )), - (JSCompiler_object_inline_stack_2313.subtreeFlags = + (JSCompiler_object_inline_stack_2299.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2311 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2297 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2311 + JSCompiler_object_inline_message_2297 )) - : ((JSCompiler_object_inline_message_2311 = createFiberFromFragment( - JSCompiler_object_inline_message_2311, - JSCompiler_object_inline_digest_2312, + : ((JSCompiler_object_inline_message_2297 = createFiberFromFragment( + JSCompiler_object_inline_message_2297, + JSCompiler_object_inline_digest_2298, renderLanes, null )), - (JSCompiler_object_inline_message_2311.flags |= 2)), - (JSCompiler_object_inline_message_2311.return = workInProgress), - (JSCompiler_object_inline_stack_2313.return = workInProgress), - (JSCompiler_object_inline_stack_2313.sibling = - JSCompiler_object_inline_message_2311), - (workInProgress.child = JSCompiler_object_inline_stack_2313), - (JSCompiler_object_inline_stack_2313 = - JSCompiler_object_inline_message_2311), - (JSCompiler_object_inline_message_2311 = workInProgress.child), - (JSCompiler_object_inline_digest_2312 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2312 - ? (JSCompiler_object_inline_digest_2312 = + (JSCompiler_object_inline_message_2297.flags |= 2)), + (JSCompiler_object_inline_message_2297.return = workInProgress), + (JSCompiler_object_inline_stack_2299.return = workInProgress), + (JSCompiler_object_inline_stack_2299.sibling = + JSCompiler_object_inline_message_2297), + (workInProgress.child = JSCompiler_object_inline_stack_2299), + (JSCompiler_object_inline_stack_2299 = + JSCompiler_object_inline_message_2297), + (JSCompiler_object_inline_message_2297 = workInProgress.child), + (JSCompiler_object_inline_digest_2298 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2298 + ? (JSCompiler_object_inline_digest_2298 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2312.cachePool), + JSCompiler_object_inline_digest_2298.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9220,38 +9128,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2312 = { + (JSCompiler_object_inline_digest_2298 = { baseLanes: - JSCompiler_object_inline_digest_2312.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2298.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2311.memoizedState = - JSCompiler_object_inline_digest_2312), - (JSCompiler_object_inline_message_2311.childLanes = + (JSCompiler_object_inline_message_2297.memoizedState = + JSCompiler_object_inline_digest_2298), + (JSCompiler_object_inline_message_2297.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2314, + JSCompiler_object_inline_componentStack_2300, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2313 + JSCompiler_object_inline_stack_2299 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2313.children + children: JSCompiler_object_inline_stack_2299.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2314 = + ((JSCompiler_object_inline_componentStack_2300 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2314 + null === JSCompiler_object_inline_componentStack_2300 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2314.push(current)); + : JSCompiler_object_inline_componentStack_2300.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -21092,14 +21000,6 @@ contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), - HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -24534,6 +24434,14 @@ LAST_PRECEDENCE = null, precedencesByRoot = null, NotPendingTransition = NotPending, + HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: NotPendingTransition, + _currentValue2: NotPendingTransition, + _threadCount: 0 + }, badgeFormat = "%c%s%c ", badgeStyle = "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", @@ -24696,11 +24604,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-3208e73e-20240730" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-06d0b89e-20240801" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-3208e73e-20240730\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-06d0b89e-20240801\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24737,11 +24645,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-3208e73e-20240730", + version: "19.0.0-experimental-06d0b89e-20240801", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-3208e73e-20240730" + reconcilerVersion: "19.0.0-experimental-06d0b89e-20240801" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24752,7 +24660,6 @@ internals.scheduleUpdate = scheduleUpdate; internals.setErrorHandler = setErrorHandler; internals.setSuspenseHandler = setSuspenseHandler; - internals.findHostInstancesForRefresh = findHostInstancesForRefresh; internals.scheduleRefresh = scheduleRefresh; internals.scheduleRoot = scheduleRoot; internals.setRefreshHandler = setRefreshHandler; @@ -24886,7 +24793,7 @@ listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; - exports.version = "19.0.0-experimental-3208e73e-20240730"; + exports.version = "19.0.0-experimental-06d0b89e-20240801"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js index d74320ab719b7..ea9cc276cfcd6 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-client.production.js @@ -439,15 +439,7 @@ function push(cursor, value) { var contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), - hostTransitionProviderCursor = createCursor(null), - HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; + hostTransitionProviderCursor = createCursor(null); function pushHostContainer(fiber, nextRootInstance) { push(rootInstanceStackCursor, nextRootInstance); push(contextFiberStackCursor, fiber); @@ -503,7 +495,7 @@ function popHostContext(fiber) { (pop(contextStackCursor), pop(contextFiberStackCursor)); hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor), - (HostTransitionContext._currentValue = null)); + (HostTransitionContext._currentValue = sharedNotPendingObject)); } var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, @@ -4602,8 +4594,7 @@ function requestFormReset$1(formFiber) { dispatchSetState(formFiber, resetStateQueue, {}); } function useHostTransitionStatus() { - var status = readContext(HostTransitionContext); - return null !== status ? status : sharedNotPendingObject; + return readContext(HostTransitionContext); } function updateId() { return updateWorkInProgressHook().memoizedState; @@ -14261,6 +14252,14 @@ function insertStylesheetIntoRoot(root, resource) { resource.state.loading |= 4; } } +var HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: sharedNotPendingObject, + _currentValue2: sharedNotPendingObject, + _threadCount: 0 +}; function FiberRootNode( containerInfo, tag, @@ -14994,14 +14993,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1640 = React.version; if ( - "19.0.0-experimental-3208e73e-20240730" !== + "19.0.0-experimental-06d0b89e-20240801" !== isomorphicReactPackageVersion$jscomp$inline_1640 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1640, - "19.0.0-experimental-3208e73e-20240730" + "19.0.0-experimental-06d0b89e-20240801" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15023,11 +15022,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_2039 = { bundleType: 0, - version: "19.0.0-experimental-3208e73e-20240730", + version: "19.0.0-experimental-06d0b89e-20240801", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-3208e73e-20240730" + reconcilerVersion: "19.0.0-experimental-06d0b89e-20240801" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2040 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -15131,4 +15130,4 @@ exports.hydrateRoot = function (container, initialChildren, options) { listenToAllSupportedEvents(container); return new ReactDOMHydrationRoot(initialChildren); }; -exports.version = "19.0.0-experimental-3208e73e-20240730"; +exports.version = "19.0.0-experimental-06d0b89e-20240801"; diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js index c07e5019d5a2b..2f191632c7b9e 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.development.js @@ -95,20 +95,6 @@ }); return array.sort().join(", "); } - function findHostInstancesForRefresh(root, families) { - var hostInstances = new Set(); - families = new Set( - families.map(function (family) { - return family.current; - }) - ); - findHostInstancesForMatchingFibersRecursively( - root.current, - families, - hostInstances - ); - return hostInstances; - } function scheduleRoot(root, element) { root.context === emptyContextObject && (updateContainerSync(element, root, null, null), flushSyncWork$1()); @@ -866,7 +852,7 @@ (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber)); hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), - (HostTransitionContext._currentValue = null)); + (HostTransitionContext._currentValue = NotPendingTransition)); } function typeName(value) { return ( @@ -4020,83 +4006,6 @@ staleFamilies ); } - function findHostInstancesForMatchingFibersRecursively( - fiber, - types, - hostInstances - ) { - var child = fiber.child, - sibling = fiber.sibling, - type = fiber.type, - candidateType = null; - switch (fiber.tag) { - case 0: - case 15: - case 1: - candidateType = type; - break; - case 11: - candidateType = type.render; - } - type = !1; - null !== candidateType && types.has(candidateType) && (type = !0); - if (type) - a: { - b: for (child = fiber, candidateType = !1; ; ) { - if (5 === child.tag || 26 === child.tag || 27 === child.tag) - (candidateType = !0), hostInstances.add(child.stateNode); - else if (null !== child.child) { - child.child.return = child; - child = child.child; - continue; - } - if (child === fiber) { - child = candidateType; - break b; - } - for (; null === child.sibling; ) { - if (null === child.return || child.return === fiber) { - child = candidateType; - break b; - } - child = child.return; - } - child.sibling.return = child.return; - child = child.sibling; - } - if (!child) - for (;;) { - switch (fiber.tag) { - case 27: - case 5: - hostInstances.add(fiber.stateNode); - break a; - case 4: - hostInstances.add(fiber.stateNode.containerInfo); - break a; - case 3: - hostInstances.add(fiber.stateNode.containerInfo); - break a; - } - if (null === fiber.return) - throw Error("Expected to reach root first."); - fiber = fiber.return; - } - } - else - null !== child && - findHostInstancesForMatchingFibersRecursively( - child, - types, - hostInstances - ); - null !== sibling && - findHostInstancesForMatchingFibersRecursively( - sibling, - types, - hostInstances - ); - } function createCapturedValueAtFiber(value, source) { if ("object" === typeof value && null !== value) { var stack = CapturedStacks.get(value); @@ -7219,8 +7128,7 @@ ]; } function useHostTransitionStatus() { - var status = readContext(HostTransitionContext); - return null !== status ? status : NotPendingTransition; + return readContext(HostTransitionContext); } function mountId() { var hook = mountWorkInProgressHook(), @@ -8795,33 +8703,33 @@ return current; } function updateSuspenseComponent(current, workInProgress, renderLanes) { - var JSCompiler_object_inline_componentStack_2319; - var JSCompiler_object_inline_stack_2318 = workInProgress.pendingProps; + var JSCompiler_object_inline_componentStack_2305; + var JSCompiler_object_inline_stack_2304 = workInProgress.pendingProps; shouldSuspendImpl(workInProgress) && (workInProgress.flags |= 128); - var JSCompiler_object_inline_message_2316 = !1; + var JSCompiler_object_inline_message_2302 = !1; var didSuspend = 0 !== (workInProgress.flags & 128); - (JSCompiler_object_inline_componentStack_2319 = didSuspend) || - (JSCompiler_object_inline_componentStack_2319 = + (JSCompiler_object_inline_componentStack_2305 = didSuspend) || + (JSCompiler_object_inline_componentStack_2305 = null !== current && null === current.memoizedState ? !1 : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback)); - JSCompiler_object_inline_componentStack_2319 && - ((JSCompiler_object_inline_message_2316 = !0), + JSCompiler_object_inline_componentStack_2305 && + ((JSCompiler_object_inline_message_2302 = !0), (workInProgress.flags &= -129)); - JSCompiler_object_inline_componentStack_2319 = + JSCompiler_object_inline_componentStack_2305 = 0 !== (workInProgress.flags & 32); workInProgress.flags &= -33; if (null === current) { if (isHydrating) { - JSCompiler_object_inline_message_2316 + JSCompiler_object_inline_message_2302 ? pushPrimaryTreeSuspenseHandler(workInProgress) : reuseSuspenseHandlerOnStack(workInProgress); if (isHydrating) { - var JSCompiler_object_inline_digest_2317 = nextHydratableInstance; + var JSCompiler_object_inline_digest_2303 = nextHydratableInstance; var JSCompiler_temp; - if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2317)) { + if (!(JSCompiler_temp = !JSCompiler_object_inline_digest_2303)) { c: { - var instance = JSCompiler_object_inline_digest_2317; + var instance = JSCompiler_object_inline_digest_2303; for ( JSCompiler_temp = rootOrSingletonContext; 8 !== instance.nodeType; @@ -8862,19 +8770,19 @@ JSCompiler_temp && (warnNonHydratedInstance( workInProgress, - JSCompiler_object_inline_digest_2317 + JSCompiler_object_inline_digest_2303 ), throwOnHydrationMismatch(workInProgress)); } - JSCompiler_object_inline_digest_2317 = workInProgress.memoizedState; + JSCompiler_object_inline_digest_2303 = workInProgress.memoizedState; if ( - null !== JSCompiler_object_inline_digest_2317 && - ((JSCompiler_object_inline_digest_2317 = - JSCompiler_object_inline_digest_2317.dehydrated), - null !== JSCompiler_object_inline_digest_2317) + null !== JSCompiler_object_inline_digest_2303 && + ((JSCompiler_object_inline_digest_2303 = + JSCompiler_object_inline_digest_2303.dehydrated), + null !== JSCompiler_object_inline_digest_2303) ) return ( - JSCompiler_object_inline_digest_2317.data === + JSCompiler_object_inline_digest_2303.data === SUSPENSE_FALLBACK_START_DATA ? (workInProgress.lanes = 16) : (workInProgress.lanes = 536870912), @@ -8882,68 +8790,68 @@ ); popSuspenseHandler(workInProgress); } - JSCompiler_object_inline_digest_2317 = - JSCompiler_object_inline_stack_2318.children; - JSCompiler_temp = JSCompiler_object_inline_stack_2318.fallback; - if (JSCompiler_object_inline_message_2316) + JSCompiler_object_inline_digest_2303 = + JSCompiler_object_inline_stack_2304.children; + JSCompiler_temp = JSCompiler_object_inline_stack_2304.fallback; + if (JSCompiler_object_inline_message_2302) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2318 = + (JSCompiler_object_inline_stack_2304 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2317, + JSCompiler_object_inline_digest_2303, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2316 = workInProgress.child), - (JSCompiler_object_inline_message_2316.memoizedState = + (JSCompiler_object_inline_message_2302 = workInProgress.child), + (JSCompiler_object_inline_message_2302.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2316.childLanes = + (JSCompiler_object_inline_message_2302.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2319, + JSCompiler_object_inline_componentStack_2305, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2318 + JSCompiler_object_inline_stack_2304 ); if ( "number" === - typeof JSCompiler_object_inline_stack_2318.unstable_expectedLoadTime + typeof JSCompiler_object_inline_stack_2304.unstable_expectedLoadTime ) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_stack_2318 = + (JSCompiler_object_inline_stack_2304 = mountSuspenseFallbackChildren( workInProgress, - JSCompiler_object_inline_digest_2317, + JSCompiler_object_inline_digest_2303, JSCompiler_temp, renderLanes )), - (JSCompiler_object_inline_message_2316 = workInProgress.child), - (JSCompiler_object_inline_message_2316.memoizedState = + (JSCompiler_object_inline_message_2302 = workInProgress.child), + (JSCompiler_object_inline_message_2302.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_message_2316.childLanes = + (JSCompiler_object_inline_message_2302.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2319, + JSCompiler_object_inline_componentStack_2305, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), (workInProgress.lanes = 4194304), - JSCompiler_object_inline_stack_2318 + JSCompiler_object_inline_stack_2304 ); pushPrimaryTreeSuspenseHandler(workInProgress); return mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_digest_2317 + JSCompiler_object_inline_digest_2303 ); } var prevState = current.memoizedState; if ( null !== prevState && - ((JSCompiler_object_inline_digest_2317 = prevState.dehydrated), - null !== JSCompiler_object_inline_digest_2317) + ((JSCompiler_object_inline_digest_2303 = prevState.dehydrated), + null !== JSCompiler_object_inline_digest_2303) ) { if (didSuspend) workInProgress.flags & 256 @@ -8960,94 +8868,94 @@ (workInProgress.flags |= 128), (workInProgress = null)) : (reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2316 = - JSCompiler_object_inline_stack_2318.fallback), - (JSCompiler_object_inline_digest_2317 = workInProgress.mode), - (JSCompiler_object_inline_stack_2318 = + (JSCompiler_object_inline_message_2302 = + JSCompiler_object_inline_stack_2304.fallback), + (JSCompiler_object_inline_digest_2303 = workInProgress.mode), + (JSCompiler_object_inline_stack_2304 = mountWorkInProgressOffscreenFiber( { mode: "visible", - children: JSCompiler_object_inline_stack_2318.children + children: JSCompiler_object_inline_stack_2304.children }, - JSCompiler_object_inline_digest_2317 + JSCompiler_object_inline_digest_2303 )), - (JSCompiler_object_inline_message_2316 = + (JSCompiler_object_inline_message_2302 = createFiberFromFragment( - JSCompiler_object_inline_message_2316, - JSCompiler_object_inline_digest_2317, + JSCompiler_object_inline_message_2302, + JSCompiler_object_inline_digest_2303, renderLanes, null )), - (JSCompiler_object_inline_message_2316.flags |= 2), - (JSCompiler_object_inline_stack_2318.return = workInProgress), - (JSCompiler_object_inline_message_2316.return = workInProgress), - (JSCompiler_object_inline_stack_2318.sibling = - JSCompiler_object_inline_message_2316), - (workInProgress.child = JSCompiler_object_inline_stack_2318), + (JSCompiler_object_inline_message_2302.flags |= 2), + (JSCompiler_object_inline_stack_2304.return = workInProgress), + (JSCompiler_object_inline_message_2302.return = workInProgress), + (JSCompiler_object_inline_stack_2304.sibling = + JSCompiler_object_inline_message_2302), + (workInProgress.child = JSCompiler_object_inline_stack_2304), reconcileChildFibers( workInProgress, current.child, null, renderLanes ), - (JSCompiler_object_inline_stack_2318 = workInProgress.child), - (JSCompiler_object_inline_stack_2318.memoizedState = + (JSCompiler_object_inline_stack_2304 = workInProgress.child), + (JSCompiler_object_inline_stack_2304.memoizedState = mountSuspenseOffscreenState(renderLanes)), - (JSCompiler_object_inline_stack_2318.childLanes = + (JSCompiler_object_inline_stack_2304.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2319, + JSCompiler_object_inline_componentStack_2305, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - (workInProgress = JSCompiler_object_inline_message_2316)); + (workInProgress = JSCompiler_object_inline_message_2302)); else if ( (pushPrimaryTreeSuspenseHandler(workInProgress), isHydrating && console.error( "We should not be hydrating here. This is a bug in React. Please file a bug." ), - JSCompiler_object_inline_digest_2317.data === + JSCompiler_object_inline_digest_2303.data === SUSPENSE_FALLBACK_START_DATA) ) { - JSCompiler_object_inline_componentStack_2319 = - JSCompiler_object_inline_digest_2317.nextSibling && - JSCompiler_object_inline_digest_2317.nextSibling.dataset; - if (JSCompiler_object_inline_componentStack_2319) { - JSCompiler_temp = JSCompiler_object_inline_componentStack_2319.dgst; - var message = JSCompiler_object_inline_componentStack_2319.msg; - instance = JSCompiler_object_inline_componentStack_2319.stck; + JSCompiler_object_inline_componentStack_2305 = + JSCompiler_object_inline_digest_2303.nextSibling && + JSCompiler_object_inline_digest_2303.nextSibling.dataset; + if (JSCompiler_object_inline_componentStack_2305) { + JSCompiler_temp = JSCompiler_object_inline_componentStack_2305.dgst; + var message = JSCompiler_object_inline_componentStack_2305.msg; + instance = JSCompiler_object_inline_componentStack_2305.stck; var componentStack = - JSCompiler_object_inline_componentStack_2319.cstck; + JSCompiler_object_inline_componentStack_2305.cstck; } - JSCompiler_object_inline_message_2316 = message; - JSCompiler_object_inline_digest_2317 = JSCompiler_temp; - JSCompiler_object_inline_stack_2318 = instance; - JSCompiler_object_inline_componentStack_2319 = componentStack; - "POSTPONE" !== JSCompiler_object_inline_digest_2317 && - ((JSCompiler_object_inline_message_2316 = - JSCompiler_object_inline_message_2316 - ? Error(JSCompiler_object_inline_message_2316) + JSCompiler_object_inline_message_2302 = message; + JSCompiler_object_inline_digest_2303 = JSCompiler_temp; + JSCompiler_object_inline_stack_2304 = instance; + JSCompiler_object_inline_componentStack_2305 = componentStack; + "POSTPONE" !== JSCompiler_object_inline_digest_2303 && + ((JSCompiler_object_inline_message_2302 = + JSCompiler_object_inline_message_2302 + ? Error(JSCompiler_object_inline_message_2302) : Error( "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering." )), - (JSCompiler_object_inline_message_2316.stack = - JSCompiler_object_inline_stack_2318 || ""), - (JSCompiler_object_inline_message_2316.digest = - JSCompiler_object_inline_digest_2317), - (JSCompiler_object_inline_componentStack_2319 = - void 0 === JSCompiler_object_inline_componentStack_2319 + (JSCompiler_object_inline_message_2302.stack = + JSCompiler_object_inline_stack_2304 || ""), + (JSCompiler_object_inline_message_2302.digest = + JSCompiler_object_inline_digest_2303), + (JSCompiler_object_inline_componentStack_2305 = + void 0 === JSCompiler_object_inline_componentStack_2305 ? null - : JSCompiler_object_inline_componentStack_2319), - "string" === typeof JSCompiler_object_inline_componentStack_2319 && + : JSCompiler_object_inline_componentStack_2305), + "string" === typeof JSCompiler_object_inline_componentStack_2305 && CapturedStacks.set( - JSCompiler_object_inline_message_2316, - JSCompiler_object_inline_componentStack_2319 + JSCompiler_object_inline_message_2302, + JSCompiler_object_inline_componentStack_2305 ), queueHydrationError({ - value: JSCompiler_object_inline_message_2316, + value: JSCompiler_object_inline_message_2302, source: null, - stack: JSCompiler_object_inline_componentStack_2319 + stack: JSCompiler_object_inline_componentStack_2305 })); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9062,25 +8970,25 @@ renderLanes, !1 ), - (JSCompiler_object_inline_componentStack_2319 = + (JSCompiler_object_inline_componentStack_2305 = 0 !== (renderLanes & current.childLanes)), - didReceiveUpdate || JSCompiler_object_inline_componentStack_2319) + didReceiveUpdate || JSCompiler_object_inline_componentStack_2305) ) { - JSCompiler_object_inline_componentStack_2319 = workInProgressRoot; - if (null !== JSCompiler_object_inline_componentStack_2319) { - JSCompiler_object_inline_stack_2318 = renderLanes & -renderLanes; - if (0 !== (JSCompiler_object_inline_stack_2318 & 42)) - JSCompiler_object_inline_stack_2318 = 1; + JSCompiler_object_inline_componentStack_2305 = workInProgressRoot; + if (null !== JSCompiler_object_inline_componentStack_2305) { + JSCompiler_object_inline_stack_2304 = renderLanes & -renderLanes; + if (0 !== (JSCompiler_object_inline_stack_2304 & 42)) + JSCompiler_object_inline_stack_2304 = 1; else - switch (JSCompiler_object_inline_stack_2318) { + switch (JSCompiler_object_inline_stack_2304) { case 2: - JSCompiler_object_inline_stack_2318 = 1; + JSCompiler_object_inline_stack_2304 = 1; break; case 8: - JSCompiler_object_inline_stack_2318 = 4; + JSCompiler_object_inline_stack_2304 = 4; break; case 32: - JSCompiler_object_inline_stack_2318 = 16; + JSCompiler_object_inline_stack_2304 = 16; break; case 128: case 256: @@ -9101,40 +9009,40 @@ case 8388608: case 16777216: case 33554432: - JSCompiler_object_inline_stack_2318 = 64; + JSCompiler_object_inline_stack_2304 = 64; break; case 268435456: - JSCompiler_object_inline_stack_2318 = 134217728; + JSCompiler_object_inline_stack_2304 = 134217728; break; default: - JSCompiler_object_inline_stack_2318 = 0; + JSCompiler_object_inline_stack_2304 = 0; } - JSCompiler_object_inline_stack_2318 = + JSCompiler_object_inline_stack_2304 = 0 !== - (JSCompiler_object_inline_stack_2318 & - (JSCompiler_object_inline_componentStack_2319.suspendedLanes | + (JSCompiler_object_inline_stack_2304 & + (JSCompiler_object_inline_componentStack_2305.suspendedLanes | renderLanes)) ? 0 - : JSCompiler_object_inline_stack_2318; + : JSCompiler_object_inline_stack_2304; if ( - 0 !== JSCompiler_object_inline_stack_2318 && - JSCompiler_object_inline_stack_2318 !== prevState.retryLane + 0 !== JSCompiler_object_inline_stack_2304 && + JSCompiler_object_inline_stack_2304 !== prevState.retryLane ) throw ( - ((prevState.retryLane = JSCompiler_object_inline_stack_2318), + ((prevState.retryLane = JSCompiler_object_inline_stack_2304), enqueueConcurrentRenderForLane( current, - JSCompiler_object_inline_stack_2318 + JSCompiler_object_inline_stack_2304 ), scheduleUpdateOnFiber( - JSCompiler_object_inline_componentStack_2319, + JSCompiler_object_inline_componentStack_2305, current, - JSCompiler_object_inline_stack_2318 + JSCompiler_object_inline_stack_2304 ), SelectiveHydrationException) ); } - JSCompiler_object_inline_digest_2317.data === + JSCompiler_object_inline_digest_2303.data === SUSPENSE_PENDING_START_DATA || renderDidSuspendDelayIfPossible(); workInProgress = retrySuspenseComponentWithoutHydrating( current, @@ -9142,7 +9050,7 @@ renderLanes ); } else - JSCompiler_object_inline_digest_2317.data === + JSCompiler_object_inline_digest_2303.data === SUSPENSE_PENDING_START_DATA ? ((workInProgress.flags |= 128), (workInProgress.child = current.child), @@ -9150,12 +9058,12 @@ null, current )), - (JSCompiler_object_inline_digest_2317._reactRetry = + (JSCompiler_object_inline_digest_2303._reactRetry = workInProgress), (workInProgress = null)) : ((current = prevState.treeContext), (nextHydratableInstance = getNextHydratable( - JSCompiler_object_inline_digest_2317.nextSibling + JSCompiler_object_inline_digest_2303.nextSibling )), (hydrationParentFiber = workInProgress), (isHydrating = !0), @@ -9173,54 +9081,54 @@ (treeContextProvider = workInProgress)), (workInProgress = mountSuspensePrimaryChildren( workInProgress, - JSCompiler_object_inline_stack_2318.children + JSCompiler_object_inline_stack_2304.children )), (workInProgress.flags |= 4096)); return workInProgress; } - if (JSCompiler_object_inline_message_2316) + if (JSCompiler_object_inline_message_2302) return ( reuseSuspenseHandlerOnStack(workInProgress), - (JSCompiler_object_inline_message_2316 = - JSCompiler_object_inline_stack_2318.fallback), - (JSCompiler_object_inline_digest_2317 = workInProgress.mode), + (JSCompiler_object_inline_message_2302 = + JSCompiler_object_inline_stack_2304.fallback), + (JSCompiler_object_inline_digest_2303 = workInProgress.mode), (JSCompiler_temp = current.child), (instance = JSCompiler_temp.sibling), - (JSCompiler_object_inline_stack_2318 = createWorkInProgress( + (JSCompiler_object_inline_stack_2304 = createWorkInProgress( JSCompiler_temp, { mode: "hidden", - children: JSCompiler_object_inline_stack_2318.children + children: JSCompiler_object_inline_stack_2304.children } )), - (JSCompiler_object_inline_stack_2318.subtreeFlags = + (JSCompiler_object_inline_stack_2304.subtreeFlags = JSCompiler_temp.subtreeFlags & 31457280), null !== instance - ? (JSCompiler_object_inline_message_2316 = createWorkInProgress( + ? (JSCompiler_object_inline_message_2302 = createWorkInProgress( instance, - JSCompiler_object_inline_message_2316 + JSCompiler_object_inline_message_2302 )) - : ((JSCompiler_object_inline_message_2316 = createFiberFromFragment( - JSCompiler_object_inline_message_2316, - JSCompiler_object_inline_digest_2317, + : ((JSCompiler_object_inline_message_2302 = createFiberFromFragment( + JSCompiler_object_inline_message_2302, + JSCompiler_object_inline_digest_2303, renderLanes, null )), - (JSCompiler_object_inline_message_2316.flags |= 2)), - (JSCompiler_object_inline_message_2316.return = workInProgress), - (JSCompiler_object_inline_stack_2318.return = workInProgress), - (JSCompiler_object_inline_stack_2318.sibling = - JSCompiler_object_inline_message_2316), - (workInProgress.child = JSCompiler_object_inline_stack_2318), - (JSCompiler_object_inline_stack_2318 = - JSCompiler_object_inline_message_2316), - (JSCompiler_object_inline_message_2316 = workInProgress.child), - (JSCompiler_object_inline_digest_2317 = current.child.memoizedState), - null === JSCompiler_object_inline_digest_2317 - ? (JSCompiler_object_inline_digest_2317 = + (JSCompiler_object_inline_message_2302.flags |= 2)), + (JSCompiler_object_inline_message_2302.return = workInProgress), + (JSCompiler_object_inline_stack_2304.return = workInProgress), + (JSCompiler_object_inline_stack_2304.sibling = + JSCompiler_object_inline_message_2302), + (workInProgress.child = JSCompiler_object_inline_stack_2304), + (JSCompiler_object_inline_stack_2304 = + JSCompiler_object_inline_message_2302), + (JSCompiler_object_inline_message_2302 = workInProgress.child), + (JSCompiler_object_inline_digest_2303 = current.child.memoizedState), + null === JSCompiler_object_inline_digest_2303 + ? (JSCompiler_object_inline_digest_2303 = mountSuspenseOffscreenState(renderLanes)) : ((JSCompiler_temp = - JSCompiler_object_inline_digest_2317.cachePool), + JSCompiler_object_inline_digest_2303.cachePool), null !== JSCompiler_temp ? ((instance = CacheContext._currentValue), (JSCompiler_temp = @@ -9228,38 +9136,38 @@ ? { parent: instance, pool: instance } : JSCompiler_temp)) : (JSCompiler_temp = getSuspendedCache()), - (JSCompiler_object_inline_digest_2317 = { + (JSCompiler_object_inline_digest_2303 = { baseLanes: - JSCompiler_object_inline_digest_2317.baseLanes | renderLanes, + JSCompiler_object_inline_digest_2303.baseLanes | renderLanes, cachePool: JSCompiler_temp })), - (JSCompiler_object_inline_message_2316.memoizedState = - JSCompiler_object_inline_digest_2317), - (JSCompiler_object_inline_message_2316.childLanes = + (JSCompiler_object_inline_message_2302.memoizedState = + JSCompiler_object_inline_digest_2303), + (JSCompiler_object_inline_message_2302.childLanes = getRemainingWorkInPrimaryTree( current, - JSCompiler_object_inline_componentStack_2319, + JSCompiler_object_inline_componentStack_2305, renderLanes )), (workInProgress.memoizedState = SUSPENDED_MARKER), - JSCompiler_object_inline_stack_2318 + JSCompiler_object_inline_stack_2304 ); pushPrimaryTreeSuspenseHandler(workInProgress); renderLanes = current.child; current = renderLanes.sibling; renderLanes = createWorkInProgress(renderLanes, { mode: "visible", - children: JSCompiler_object_inline_stack_2318.children + children: JSCompiler_object_inline_stack_2304.children }); renderLanes.return = workInProgress; renderLanes.sibling = null; null !== current && - ((JSCompiler_object_inline_componentStack_2319 = + ((JSCompiler_object_inline_componentStack_2305 = workInProgress.deletions), - null === JSCompiler_object_inline_componentStack_2319 + null === JSCompiler_object_inline_componentStack_2305 ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16)) - : JSCompiler_object_inline_componentStack_2319.push(current)); + : JSCompiler_object_inline_componentStack_2305.push(current)); workInProgress.child = renderLanes; workInProgress.memoizedState = null; return renderLanes; @@ -21149,14 +21057,6 @@ contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), - HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }, hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, @@ -24591,6 +24491,14 @@ LAST_PRECEDENCE = null, precedencesByRoot = null, NotPendingTransition = NotPending, + HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: NotPendingTransition, + _currentValue2: NotPendingTransition, + _threadCount: 0 + }, badgeFormat = "%c%s%c ", badgeStyle = "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", @@ -24753,11 +24661,11 @@ }; (function () { var isomorphicReactPackageVersion = React.version; - if ("19.0.0-experimental-3208e73e-20240730" !== isomorphicReactPackageVersion) + if ("19.0.0-experimental-06d0b89e-20240801" !== isomorphicReactPackageVersion) throw Error( 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + - "\n - react-dom: 19.0.0-experimental-3208e73e-20240730\nLearn more: https://react.dev/warnings/version-mismatch") + "\n - react-dom: 19.0.0-experimental-06d0b89e-20240801\nLearn more: https://react.dev/warnings/version-mismatch") ); })(); ("function" === typeof Map && @@ -24794,11 +24702,11 @@ !(function () { var internals = { bundleType: 1, - version: "19.0.0-experimental-3208e73e-20240730", + version: "19.0.0-experimental-06d0b89e-20240801", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-3208e73e-20240730" + reconcilerVersion: "19.0.0-experimental-06d0b89e-20240801" }; internals.overrideHookState = overrideHookState; internals.overrideHookStateDeletePath = overrideHookStateDeletePath; @@ -24809,7 +24717,6 @@ internals.scheduleUpdate = scheduleUpdate; internals.setErrorHandler = setErrorHandler; internals.setSuspenseHandler = setSuspenseHandler; - internals.findHostInstancesForRefresh = findHostInstancesForRefresh; internals.scheduleRefresh = scheduleRefresh; internals.scheduleRoot = scheduleRoot; internals.setRefreshHandler = setRefreshHandler; @@ -25273,7 +25180,7 @@ exports.useFormStatus = function () { return resolveDispatcher().useHostTransitionStatus(); }; - exports.version = "19.0.0-experimental-3208e73e-20240730"; + exports.version = "19.0.0-experimental-06d0b89e-20240801"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js index 8134ec06bb4bc..8c558f49950bd 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-profiling.profiling.js @@ -443,15 +443,7 @@ function push(cursor, value) { var contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), - hostTransitionProviderCursor = createCursor(null), - HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; + hostTransitionProviderCursor = createCursor(null); function pushHostContainer(fiber, nextRootInstance) { push(rootInstanceStackCursor, nextRootInstance); push(contextFiberStackCursor, fiber); @@ -507,7 +499,7 @@ function popHostContext(fiber) { (pop(contextStackCursor), pop(contextFiberStackCursor)); hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor), - (HostTransitionContext._currentValue = null)); + (HostTransitionContext._currentValue = sharedNotPendingObject)); } var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, @@ -4713,8 +4705,7 @@ function requestFormReset$2(formFiber) { dispatchSetState(formFiber, resetStateQueue, {}); } function useHostTransitionStatus() { - var status = readContext(HostTransitionContext); - return null !== status ? status : sharedNotPendingObject; + return readContext(HostTransitionContext); } function updateId() { return updateWorkInProgressHook().memoizedState; @@ -14945,6 +14936,14 @@ function insertStylesheetIntoRoot(root, resource) { resource.state.loading |= 4; } } +var HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: sharedNotPendingObject, + _currentValue2: sharedNotPendingObject, + _threadCount: 0 +}; function FiberRootNode( containerInfo, tag, @@ -15697,14 +15696,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) { }; var isomorphicReactPackageVersion$jscomp$inline_1729 = React.version; if ( - "19.0.0-experimental-3208e73e-20240730" !== + "19.0.0-experimental-06d0b89e-20240801" !== isomorphicReactPackageVersion$jscomp$inline_1729 ) throw Error( formatProdErrorMessage( 527, isomorphicReactPackageVersion$jscomp$inline_1729, - "19.0.0-experimental-3208e73e-20240730" + "19.0.0-experimental-06d0b89e-20240801" ) ); ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { @@ -15726,11 +15725,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) { }; var internals$jscomp$inline_1736 = { bundleType: 0, - version: "19.0.0-experimental-3208e73e-20240730", + version: "19.0.0-experimental-06d0b89e-20240801", rendererPackageName: "react-dom", currentDispatcherRef: ReactSharedInternals, findFiberByHostInstance: getClosestInstanceFromNode, - reconcilerVersion: "19.0.0-experimental-3208e73e-20240730", + reconcilerVersion: "19.0.0-experimental-06d0b89e-20240801", getLaneLabelMap: function () { for ( var map = new Map(), lane = 1, index$291 = 0; @@ -16010,7 +16009,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-experimental-3208e73e-20240730"; +exports.version = "19.0.0-experimental-06d0b89e-20240801"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js index 4f78b3ad3e9cb..648a593087486 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.development.js @@ -6482,28 +6482,6 @@ !1 ); } - function erroredTask(request, boundary, error, errorInfo, debugTask) { - if ( - "object" === typeof error && - null !== error && - error.$$typeof === REACT_POSTPONE_TYPE - ) { - logPostpone(request, error.message, errorInfo, debugTask); - var errorDigest = "POSTPONE"; - } else - errorDigest = logRecoverableError(request, error, errorInfo, debugTask); - null === boundary - ? fatalError(request, error, errorInfo, debugTask) - : (boundary.pendingTasks--, - boundary.status !== CLIENT_RENDERED && - ((boundary.status = CLIENT_RENDERED), - encodeErrorForBoundary(boundary, errorDigest, error, errorInfo, !1), - untrackBoundary(request, boundary), - boundary.parentFlushed && - request.clientRenderedBoundaries.push(boundary))); - request.allPendingTasks--; - 0 === request.allPendingTasks && completeAll(request); - } function abortTaskSoft(task) { var boundary = task.blockedBoundary; task = task.blockedSegment; @@ -6586,37 +6564,42 @@ if ( ((boundary = {}), 2 !== request.status && request.status !== CLOSED) ) { - task = task.replay; - if (null === task) { + var replay = task.replay; + if (null === replay) { "object" === typeof error && null !== error && error.$$typeof === REACT_POSTPONE_TYPE - ? ((task = Error( - "The render was aborted with postpone when the shell is incomplete. Reason: " + - error.message - )), - logRecoverableError(request, task, boundary, null), - fatalError(request, task, boundary, null)) + ? ((replay = request.trackedPostpones), + null !== replay && null !== segment + ? (logPostpone(request, error.message, boundary, null), + trackPostpone(request, replay, task, segment), + finishedTask(request, null, segment)) + : ((task = Error( + "The render was aborted with postpone when the shell is incomplete. Reason: " + + error.message + )), + logRecoverableError(request, task, boundary, null), + fatalError(request, task, boundary, null))) : (logRecoverableError(request, error, boundary, null), fatalError(request, error, boundary, null)); return; } - task.pendingTasks--; - 0 === task.pendingTasks && - 0 < task.nodes.length && + replay.pendingTasks--; + 0 === replay.pendingTasks && + 0 < replay.nodes.length && ("object" === typeof error && null !== error && error.$$typeof === REACT_POSTPONE_TYPE ? (logPostpone(request, error.message, boundary, null), - (segment = "POSTPONE")) - : (segment = logRecoverableError(request, error, boundary, null)), + (task = "POSTPONE")) + : (task = logRecoverableError(request, error, boundary, null)), abortRemainingReplayNodes( request, null, - task.nodes, - task.slots, + replay.nodes, + replay.slots, error, - segment, + task, boundary, !0 )); @@ -6779,53 +6762,54 @@ request.allPendingTasks--; 0 === request.allPendingTasks && completeAll(request); } - function performWork(request$jscomp$0) { - if (request$jscomp$0.status !== CLOSED && 2 !== request$jscomp$0.status) { + function performWork(request$jscomp$1) { + if (request$jscomp$1.status !== CLOSED && 2 !== request$jscomp$1.status) { var prevContext = currentActiveSnapshot, prevDispatcher = ReactSharedInternals.H; ReactSharedInternals.H = HooksDispatcher; var prevAsyncDispatcher = ReactSharedInternals.A; ReactSharedInternals.A = DefaultAsyncDispatcher; var prevRequest = currentRequest; - currentRequest = request$jscomp$0; + currentRequest = request$jscomp$1; var prevGetCurrentStackImpl = ReactSharedInternals.getCurrentStack; ReactSharedInternals.getCurrentStack = getCurrentStackInDEV; var prevResumableState = currentResumableState; - currentResumableState = request$jscomp$0.resumableState; + currentResumableState = request$jscomp$1.resumableState; try { - var pingedTasks = request$jscomp$0.pingedTasks, + var pingedTasks = request$jscomp$1.pingedTasks, i; for (i = 0; i < pingedTasks.length; i++) { - var request = request$jscomp$0, + var request = request$jscomp$1, task = pingedTasks[i], segment = task.blockedSegment; if (null === segment) { var prevTaskInDEV = void 0, - task$jscomp$0 = task; - if (0 !== task$jscomp$0.replay.pendingTasks) { - switchContext(task$jscomp$0.context); + request$jscomp$0 = request; + request = task; + if (0 !== request.replay.pendingTasks) { + switchContext(request.context); prevTaskInDEV = currentTaskInDEV; - currentTaskInDEV = task$jscomp$0; + currentTaskInDEV = request; try { - "number" === typeof task$jscomp$0.replay.slots + "number" === typeof request.replay.slots ? resumeNode( + request$jscomp$0, request, - task$jscomp$0, - task$jscomp$0.replay.slots, - task$jscomp$0.node, - task$jscomp$0.childIndex + request.replay.slots, + request.node, + request.childIndex ) - : retryNode(request, task$jscomp$0); + : retryNode(request$jscomp$0, request); if ( - 1 === task$jscomp$0.replay.pendingTasks && - 0 < task$jscomp$0.replay.nodes.length + 1 === request.replay.pendingTasks && + 0 < request.replay.nodes.length ) throw Error( "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering." ); - task$jscomp$0.replay.pendingTasks--; - task$jscomp$0.abortSet.delete(task$jscomp$0); - finishedTask(request, task$jscomp$0.blockedBoundary, null); + request.replay.pendingTasks--; + request.abortSet.delete(request); + finishedTask(request$jscomp$0, request.blockedBoundary, null); } catch (thrownValue) { resetHooksState(); var x = @@ -6837,27 +6821,28 @@ null !== x && "function" === typeof x.then ) { - var ping = task$jscomp$0.ping; + var ping = request.ping; x.then(ping, ping); - task$jscomp$0.thenableState = - getThenableStateAfterSuspending(); + request.thenableState = getThenableStateAfterSuspending(); } else { - task$jscomp$0.replay.pendingTasks--; - task$jscomp$0.abortSet.delete(task$jscomp$0); - var errorInfo = getThrownInfo(task$jscomp$0.componentStack); + request.replay.pendingTasks--; + request.abortSet.delete(request); + var errorInfo = getThrownInfo(request.componentStack); erroredReplay( - request, - task$jscomp$0.blockedBoundary, - x === AbortSigil ? request.fatalError : x, + request$jscomp$0, + request.blockedBoundary, + x === AbortSigil ? request$jscomp$0.fatalError : x, errorInfo, - task$jscomp$0.replay.nodes, - task$jscomp$0.replay.slots, - task$jscomp$0.debugTask + request.replay.nodes, + request.replay.slots, + request.debugTask ); - request.pendingRootTasks--; - 0 === request.pendingRootTasks && completeShell(request); - request.allPendingTasks--; - 0 === request.allPendingTasks && completeAll(request); + request$jscomp$0.pendingRootTasks--; + 0 === request$jscomp$0.pendingRootTasks && + completeShell(request$jscomp$0); + request$jscomp$0.allPendingTasks--; + 0 === request$jscomp$0.allPendingTasks && + completeAll(request$jscomp$0); } } finally { currentTaskInDEV = prevTaskInDEV; @@ -6865,13 +6850,13 @@ } } else a: { - prevTaskInDEV = void 0; - task$jscomp$0 = task; - var segment$jscomp$0 = segment; + request$jscomp$0 = prevTaskInDEV = void 0; + var task$jscomp$0 = task, + segment$jscomp$0 = segment; if (segment$jscomp$0.status === PENDING) { segment$jscomp$0.status = 6; switchContext(task$jscomp$0.context); - prevTaskInDEV = currentTaskInDEV; + request$jscomp$0 = currentTaskInDEV; currentTaskInDEV = task$jscomp$0; var childrenLength = segment$jscomp$0.children.length, chunkLength = segment$jscomp$0.chunks.length; @@ -6897,7 +6882,9 @@ var x$jscomp$0 = thrownValue === SuspenseException ? getSuspendedThenable() - : thrownValue; + : thrownValue === AbortSigil + ? request.fatalError + : thrownValue; if ("object" === typeof x$jscomp$0 && null !== x$jscomp$0) { if ("function" === typeof x$jscomp$0.then) { segment$jscomp$0.status = PENDING; @@ -6940,39 +6927,63 @@ task$jscomp$0.componentStack ); task$jscomp$0.abortSet.delete(task$jscomp$0); - x$jscomp$0 === AbortSigil - ? ((segment$jscomp$0.status = 3), - erroredTask( + segment$jscomp$0.status = 4; + var boundary = task$jscomp$0.blockedBoundary, + debugTask = task$jscomp$0.debugTask; + "object" === typeof x$jscomp$0 && + null !== x$jscomp$0 && + x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE + ? (logPostpone( request, - task$jscomp$0.blockedBoundary, - request.fatalError, + x$jscomp$0.message, errorInfo$jscomp$0, - task$jscomp$0.debugTask - )) - : ((segment$jscomp$0.status = 4), - erroredTask( + debugTask + ), + (prevTaskInDEV = "POSTPONE")) + : (prevTaskInDEV = logRecoverableError( request, - task$jscomp$0.blockedBoundary, x$jscomp$0, errorInfo$jscomp$0, - task$jscomp$0.debugTask + debugTask )); + null === boundary + ? fatalError( + request, + x$jscomp$0, + errorInfo$jscomp$0, + debugTask + ) + : (boundary.pendingTasks--, + boundary.status !== CLIENT_RENDERED && + ((boundary.status = CLIENT_RENDERED), + encodeErrorForBoundary( + boundary, + prevTaskInDEV, + x$jscomp$0, + errorInfo$jscomp$0, + !1 + ), + untrackBoundary(request, boundary), + boundary.parentFlushed && + request.clientRenderedBoundaries.push(boundary))); + request.allPendingTasks--; + 0 === request.allPendingTasks && completeAll(request); } finally { - currentTaskInDEV = prevTaskInDEV; + currentTaskInDEV = request$jscomp$0; } } } } pingedTasks.splice(0, i); - null !== request$jscomp$0.destination && + null !== request$jscomp$1.destination && flushCompletedQueues( - request$jscomp$0, - request$jscomp$0.destination + request$jscomp$1, + request$jscomp$1.destination ); } catch (error) { (pingedTasks = {}), - logRecoverableError(request$jscomp$0, error, pingedTasks, null), - fatalError(request$jscomp$0, error, pingedTasks, null); + logRecoverableError(request$jscomp$1, error, pingedTasks, null), + fatalError(request$jscomp$1, error, pingedTasks, null); } finally { (currentResumableState = prevResumableState), (ReactSharedInternals.H = prevDispatcher), @@ -9165,5 +9176,5 @@ 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; - exports.version = "19.0.0-experimental-3208e73e-20240730"; + exports.version = "19.0.0-experimental-06d0b89e-20240801"; })(); diff --git a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js index 521232a28a1ab..6d037224e0ade 100644 --- a/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js +++ b/packages/next/src/compiled/react-dom-experimental/cjs/react-dom-server-legacy.browser.production.js @@ -2668,16 +2668,16 @@ function createRenderState(resumableState, generateStaticMarkup) { "\x3c/script>" ); bootstrapScriptContent = idPrefix + "P:"; - var JSCompiler_object_inline_segmentPrefix_1632 = idPrefix + "S:"; + var JSCompiler_object_inline_segmentPrefix_1648 = idPrefix + "S:"; idPrefix += "B:"; - var JSCompiler_object_inline_preconnects_1646 = new Set(), - JSCompiler_object_inline_fontPreloads_1647 = new Set(), - JSCompiler_object_inline_highImagePreloads_1648 = new Set(), - JSCompiler_object_inline_styles_1649 = new Map(), - JSCompiler_object_inline_bootstrapScripts_1650 = new Set(), - JSCompiler_object_inline_scripts_1651 = new Set(), - JSCompiler_object_inline_bulkPreloads_1652 = new Set(), - JSCompiler_object_inline_preloads_1653 = { + var JSCompiler_object_inline_preconnects_1662 = new Set(), + JSCompiler_object_inline_fontPreloads_1663 = new Set(), + JSCompiler_object_inline_highImagePreloads_1664 = new Set(), + JSCompiler_object_inline_styles_1665 = new Map(), + JSCompiler_object_inline_bootstrapScripts_1666 = new Set(), + JSCompiler_object_inline_scripts_1667 = new Set(), + JSCompiler_object_inline_bulkPreloads_1668 = new Set(), + JSCompiler_object_inline_preloads_1669 = { images: new Map(), stylesheets: new Map(), scripts: new Map(), @@ -2714,7 +2714,7 @@ function createRenderState(resumableState, generateStaticMarkup) { scriptConfig.moduleScriptResources[href] = null; scriptConfig = []; pushLinkImpl(scriptConfig, props); - JSCompiler_object_inline_bootstrapScripts_1650.add(scriptConfig); + JSCompiler_object_inline_bootstrapScripts_1666.add(scriptConfig); bootstrapChunks.push('