@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969 return self;
7070}
7171
72- var ReactVersion = "18.3.0-www-classic-7efa9e597 -20221215";
72+ var ReactVersion = "18.3.0-www-classic-fabef7a6b -20221215";
7373
7474var LegacyRoot = 0;
7575var ConcurrentRoot = 1;
@@ -1579,91 +1579,91 @@ var NoLanes =
15791579var NoLane =
15801580 /* */
15811581 0;
1582+ var SyncHydrationLane =
1583+ /* */
1584+ 1;
15821585var SyncLane =
15831586 /* */
1584- 1 ;
1587+ 2 ;
15851588var InputContinuousHydrationLane =
15861589 /* */
1587- 2 ;
1590+ 4 ;
15881591var InputContinuousLane =
15891592 /* */
1590- 4 ;
1593+ 8 ;
15911594var DefaultHydrationLane =
15921595 /* */
1593- 8 ;
1596+ 16 ;
15941597var DefaultLane =
15951598 /* */
1596- 16 ;
1599+ 32 ;
15971600var TransitionHydrationLane =
15981601 /* */
1599- 32 ;
1602+ 64 ;
16001603var TransitionLanes =
16011604 /* */
1602- 4194240 ;
1605+ 8388480 ;
16031606var TransitionLane1 =
16041607 /* */
1605- 64 ;
1608+ 128 ;
16061609var TransitionLane2 =
16071610 /* */
1608- 128 ;
1611+ 256 ;
16091612var TransitionLane3 =
16101613 /* */
1611- 256 ;
1614+ 512 ;
16121615var TransitionLane4 =
16131616 /* */
1614- 512 ;
1617+ 1024 ;
16151618var TransitionLane5 =
16161619 /* */
1617- 1024 ;
1620+ 2048 ;
16181621var TransitionLane6 =
16191622 /* */
1620- 2048 ;
1623+ 4096 ;
16211624var TransitionLane7 =
16221625 /* */
1623- 4096 ;
1626+ 8192 ;
16241627var TransitionLane8 =
16251628 /* */
1626- 8192 ;
1629+ 16384 ;
16271630var TransitionLane9 =
16281631 /* */
1629- 16384 ;
1632+ 32768 ;
16301633var TransitionLane10 =
16311634 /* */
1632- 32768 ;
1635+ 65536 ;
16331636var TransitionLane11 =
16341637 /* */
1635- 65536 ;
1638+ 131072 ;
16361639var TransitionLane12 =
16371640 /* */
1638- 131072 ;
1641+ 262144 ;
16391642var TransitionLane13 =
16401643 /* */
1641- 262144 ;
1644+ 524288 ;
16421645var TransitionLane14 =
16431646 /* */
1644- 524288 ;
1647+ 1048576 ;
16451648var TransitionLane15 =
16461649 /* */
1647- 1048576 ;
1650+ 2097152 ;
16481651var TransitionLane16 =
16491652 /* */
1650- 2097152 ;
1653+ 4194304 ;
16511654var RetryLanes =
16521655 /* */
1653- 130023424 ;
1656+ 125829120 ;
16541657var RetryLane1 =
1655- /* */
1656- 4194304;
1657- var RetryLane2 =
16581658 /* */
16591659 8388608;
1660- var RetryLane3 =
1660+ var RetryLane2 =
16611661 /* */
16621662 16777216;
1663- var RetryLane4 =
1663+ var RetryLane3 =
16641664 /* */
16651665 33554432;
1666- var RetryLane5 =
1666+ var RetryLane4 =
16671667 /* */
16681668 67108864;
16691669var SomeRetryLane = RetryLane1;
@@ -1686,6 +1686,10 @@ var OffscreenLane =
16861686
16871687function getLabelForLane(lane) {
16881688 if (enableSchedulingProfiler) {
1689+ if (lane & SyncHydrationLane) {
1690+ return "SyncHydrationLane";
1691+ }
1692+
16891693 if (lane & SyncLane) {
16901694 return "Sync";
16911695 }
@@ -1741,6 +1745,9 @@ var nextRetryLane = RetryLane1;
17411745
17421746function getHighestPriorityLanes(lanes) {
17431747 switch (getHighestPriorityLane(lanes)) {
1748+ case SyncHydrationLane:
1749+ return SyncHydrationLane;
1750+
17441751 case SyncLane:
17451752 return SyncLane;
17461753
@@ -1781,7 +1788,6 @@ function getHighestPriorityLanes(lanes) {
17811788 case RetryLane2:
17821789 case RetryLane3:
17831790 case RetryLane4:
1784- case RetryLane5:
17851791 return lanes & RetryLanes;
17861792
17871793 case SelectiveHydrationLane:
@@ -1942,6 +1948,7 @@ function getMostRecentEventTime(root, lanes) {
19421948
19431949function computeExpirationTime(lane, currentTime) {
19441950 switch (lane) {
1951+ case SyncHydrationLane:
19451952 case SyncLane:
19461953 case InputContinuousHydrationLane:
19471954 case InputContinuousLane:
@@ -1981,7 +1988,6 @@ function computeExpirationTime(lane, currentTime) {
19811988 case RetryLane2:
19821989 case RetryLane3:
19831990 case RetryLane4:
1984- case RetryLane5:
19851991 // TODO: Retries should be allowed to expire if they are CPU bound for
19861992 // too long, but when I made this change it caused a spike in browser
19871993 // crashes. There must be some other underlying bug; not super urgent but
@@ -2064,13 +2070,18 @@ function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {
20642070
20652071 return NoLanes;
20662072}
2073+ function includesSyncLane(lanes) {
2074+ return (lanes & (SyncLane | SyncHydrationLane)) !== NoLanes;
2075+ }
20672076function includesNonIdleWork(lanes) {
20682077 return (lanes & NonIdleLanes) !== NoLanes;
20692078}
20702079function includesOnlyRetries(lanes) {
20712080 return (lanes & RetryLanes) === lanes;
20722081}
20732082function includesOnlyNonUrgentLanes(lanes) {
2083+ // TODO: Should hydration lanes be included here? This function is only
2084+ // used in `updateDeferredValueImpl`.
20742085 var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
20752086 return (lanes & UrgentLanes) === NoLanes;
20762087}
@@ -2308,6 +2319,10 @@ function getBumpedLaneForHydration(root, renderLanes) {
23082319 var lane;
23092320
23102321 switch (renderLane) {
2322+ case SyncLane:
2323+ lane = SyncHydrationLane;
2324+ break;
2325+
23112326 case InputContinuousLane:
23122327 lane = InputContinuousHydrationLane;
23132328 break;
@@ -2336,7 +2351,6 @@ function getBumpedLaneForHydration(root, renderLanes) {
23362351 case RetryLane2:
23372352 case RetryLane3:
23382353 case RetryLane4:
2339- case RetryLane5:
23402354 lane = TransitionHydrationLane;
23412355 break;
23422356
@@ -23460,7 +23474,7 @@ function ensureRootIsScheduled(root, currentTime) {
2346023474 // TODO: Temporary until we confirm this warning is not fired.
2346123475 if (
2346223476 existingCallbackNode == null &&
23463- existingCallbackPriority !== SyncLane
23477+ !includesSyncLane(existingCallbackPriority)
2346423478 ) {
2346523479 error(
2346623480 "Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue."
@@ -23478,7 +23492,7 @@ function ensureRootIsScheduled(root, currentTime) {
2347823492
2347923493 var newCallbackNode;
2348023494
23481- if (newCallbackPriority === SyncLane ) {
23495+ if (includesSyncLane( newCallbackPriority) ) {
2348223496 // Special case: Sync React callbacks are scheduled on a special
2348323497 // internal queue
2348423498 if (root.tag === LegacyRoot) {
@@ -24015,7 +24029,7 @@ function performSyncWorkOnRoot(root) {
2401524029 flushPassiveEffects();
2401624030 var lanes = getNextLanes(root, NoLanes);
2401724031
24018- if (!includesSomeLane (lanes, SyncLane )) {
24032+ if (!includesSyncLane (lanes)) {
2401924033 // There's no remaining sync work left.
2402024034 ensureRootIsScheduled(root, now());
2402124035 return null;
@@ -25317,16 +25331,13 @@ function commitRootImpl(
2531725331 // currently schedule the callback in multiple places, will wait until those
2531825332 // are consolidated.
2531925333
25320- if (
25321- includesSomeLane(pendingPassiveEffectsLanes, SyncLane) &&
25322- root.tag !== LegacyRoot
25323- ) {
25334+ if (includesSyncLane(pendingPassiveEffectsLanes) && root.tag !== LegacyRoot) {
2532425335 flushPassiveEffects();
2532525336 } // Read this again, since a passive effect might have updated it
2532625337
2532725338 remainingLanes = root.pendingLanes;
2532825339
25329- if (includesSomeLane (remainingLanes, SyncLane )) {
25340+ if (includesSyncLane (remainingLanes)) {
2533025341 {
2533125342 markNestedUpdateScheduled();
2533225343 } // Count the number of times the root synchronously re-renders without
0 commit comments