@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
69
69
return self;
70
70
}
71
71
72
- var ReactVersion = "18.3.0-www-classic-7efa9e597 -20221215";
72
+ var ReactVersion = "18.3.0-www-classic-fabef7a6b -20221215";
73
73
74
74
var LegacyRoot = 0;
75
75
var ConcurrentRoot = 1;
@@ -1579,91 +1579,91 @@ var NoLanes =
1579
1579
var NoLane =
1580
1580
/* */
1581
1581
0;
1582
+ var SyncHydrationLane =
1583
+ /* */
1584
+ 1;
1582
1585
var SyncLane =
1583
1586
/* */
1584
- 1 ;
1587
+ 2 ;
1585
1588
var InputContinuousHydrationLane =
1586
1589
/* */
1587
- 2 ;
1590
+ 4 ;
1588
1591
var InputContinuousLane =
1589
1592
/* */
1590
- 4 ;
1593
+ 8 ;
1591
1594
var DefaultHydrationLane =
1592
1595
/* */
1593
- 8 ;
1596
+ 16 ;
1594
1597
var DefaultLane =
1595
1598
/* */
1596
- 16 ;
1599
+ 32 ;
1597
1600
var TransitionHydrationLane =
1598
1601
/* */
1599
- 32 ;
1602
+ 64 ;
1600
1603
var TransitionLanes =
1601
1604
/* */
1602
- 4194240 ;
1605
+ 8388480 ;
1603
1606
var TransitionLane1 =
1604
1607
/* */
1605
- 64 ;
1608
+ 128 ;
1606
1609
var TransitionLane2 =
1607
1610
/* */
1608
- 128 ;
1611
+ 256 ;
1609
1612
var TransitionLane3 =
1610
1613
/* */
1611
- 256 ;
1614
+ 512 ;
1612
1615
var TransitionLane4 =
1613
1616
/* */
1614
- 512 ;
1617
+ 1024 ;
1615
1618
var TransitionLane5 =
1616
1619
/* */
1617
- 1024 ;
1620
+ 2048 ;
1618
1621
var TransitionLane6 =
1619
1622
/* */
1620
- 2048 ;
1623
+ 4096 ;
1621
1624
var TransitionLane7 =
1622
1625
/* */
1623
- 4096 ;
1626
+ 8192 ;
1624
1627
var TransitionLane8 =
1625
1628
/* */
1626
- 8192 ;
1629
+ 16384 ;
1627
1630
var TransitionLane9 =
1628
1631
/* */
1629
- 16384 ;
1632
+ 32768 ;
1630
1633
var TransitionLane10 =
1631
1634
/* */
1632
- 32768 ;
1635
+ 65536 ;
1633
1636
var TransitionLane11 =
1634
1637
/* */
1635
- 65536 ;
1638
+ 131072 ;
1636
1639
var TransitionLane12 =
1637
1640
/* */
1638
- 131072 ;
1641
+ 262144 ;
1639
1642
var TransitionLane13 =
1640
1643
/* */
1641
- 262144 ;
1644
+ 524288 ;
1642
1645
var TransitionLane14 =
1643
1646
/* */
1644
- 524288 ;
1647
+ 1048576 ;
1645
1648
var TransitionLane15 =
1646
1649
/* */
1647
- 1048576 ;
1650
+ 2097152 ;
1648
1651
var TransitionLane16 =
1649
1652
/* */
1650
- 2097152 ;
1653
+ 4194304 ;
1651
1654
var RetryLanes =
1652
1655
/* */
1653
- 130023424 ;
1656
+ 125829120 ;
1654
1657
var RetryLane1 =
1655
- /* */
1656
- 4194304;
1657
- var RetryLane2 =
1658
1658
/* */
1659
1659
8388608;
1660
- var RetryLane3 =
1660
+ var RetryLane2 =
1661
1661
/* */
1662
1662
16777216;
1663
- var RetryLane4 =
1663
+ var RetryLane3 =
1664
1664
/* */
1665
1665
33554432;
1666
- var RetryLane5 =
1666
+ var RetryLane4 =
1667
1667
/* */
1668
1668
67108864;
1669
1669
var SomeRetryLane = RetryLane1;
@@ -1686,6 +1686,10 @@ var OffscreenLane =
1686
1686
1687
1687
function getLabelForLane(lane) {
1688
1688
if (enableSchedulingProfiler) {
1689
+ if (lane & SyncHydrationLane) {
1690
+ return "SyncHydrationLane";
1691
+ }
1692
+
1689
1693
if (lane & SyncLane) {
1690
1694
return "Sync";
1691
1695
}
@@ -1741,6 +1745,9 @@ var nextRetryLane = RetryLane1;
1741
1745
1742
1746
function getHighestPriorityLanes(lanes) {
1743
1747
switch (getHighestPriorityLane(lanes)) {
1748
+ case SyncHydrationLane:
1749
+ return SyncHydrationLane;
1750
+
1744
1751
case SyncLane:
1745
1752
return SyncLane;
1746
1753
@@ -1781,7 +1788,6 @@ function getHighestPriorityLanes(lanes) {
1781
1788
case RetryLane2:
1782
1789
case RetryLane3:
1783
1790
case RetryLane4:
1784
- case RetryLane5:
1785
1791
return lanes & RetryLanes;
1786
1792
1787
1793
case SelectiveHydrationLane:
@@ -1942,6 +1948,7 @@ function getMostRecentEventTime(root, lanes) {
1942
1948
1943
1949
function computeExpirationTime(lane, currentTime) {
1944
1950
switch (lane) {
1951
+ case SyncHydrationLane:
1945
1952
case SyncLane:
1946
1953
case InputContinuousHydrationLane:
1947
1954
case InputContinuousLane:
@@ -1981,7 +1988,6 @@ function computeExpirationTime(lane, currentTime) {
1981
1988
case RetryLane2:
1982
1989
case RetryLane3:
1983
1990
case RetryLane4:
1984
- case RetryLane5:
1985
1991
// TODO: Retries should be allowed to expire if they are CPU bound for
1986
1992
// too long, but when I made this change it caused a spike in browser
1987
1993
// crashes. There must be some other underlying bug; not super urgent but
@@ -2064,13 +2070,18 @@ function getLanesToRetrySynchronouslyOnError(root, originallyAttemptedLanes) {
2064
2070
2065
2071
return NoLanes;
2066
2072
}
2073
+ function includesSyncLane(lanes) {
2074
+ return (lanes & (SyncLane | SyncHydrationLane)) !== NoLanes;
2075
+ }
2067
2076
function includesNonIdleWork(lanes) {
2068
2077
return (lanes & NonIdleLanes) !== NoLanes;
2069
2078
}
2070
2079
function includesOnlyRetries(lanes) {
2071
2080
return (lanes & RetryLanes) === lanes;
2072
2081
}
2073
2082
function includesOnlyNonUrgentLanes(lanes) {
2083
+ // TODO: Should hydration lanes be included here? This function is only
2084
+ // used in `updateDeferredValueImpl`.
2074
2085
var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
2075
2086
return (lanes & UrgentLanes) === NoLanes;
2076
2087
}
@@ -2308,6 +2319,10 @@ function getBumpedLaneForHydration(root, renderLanes) {
2308
2319
var lane;
2309
2320
2310
2321
switch (renderLane) {
2322
+ case SyncLane:
2323
+ lane = SyncHydrationLane;
2324
+ break;
2325
+
2311
2326
case InputContinuousLane:
2312
2327
lane = InputContinuousHydrationLane;
2313
2328
break;
@@ -2336,7 +2351,6 @@ function getBumpedLaneForHydration(root, renderLanes) {
2336
2351
case RetryLane2:
2337
2352
case RetryLane3:
2338
2353
case RetryLane4:
2339
- case RetryLane5:
2340
2354
lane = TransitionHydrationLane;
2341
2355
break;
2342
2356
@@ -23460,7 +23474,7 @@ function ensureRootIsScheduled(root, currentTime) {
23460
23474
// TODO: Temporary until we confirm this warning is not fired.
23461
23475
if (
23462
23476
existingCallbackNode == null &&
23463
- existingCallbackPriority !== SyncLane
23477
+ !includesSyncLane(existingCallbackPriority)
23464
23478
) {
23465
23479
error(
23466
23480
"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) {
23478
23492
23479
23493
var newCallbackNode;
23480
23494
23481
- if (newCallbackPriority === SyncLane ) {
23495
+ if (includesSyncLane( newCallbackPriority) ) {
23482
23496
// Special case: Sync React callbacks are scheduled on a special
23483
23497
// internal queue
23484
23498
if (root.tag === LegacyRoot) {
@@ -24015,7 +24029,7 @@ function performSyncWorkOnRoot(root) {
24015
24029
flushPassiveEffects();
24016
24030
var lanes = getNextLanes(root, NoLanes);
24017
24031
24018
- if (!includesSomeLane (lanes, SyncLane )) {
24032
+ if (!includesSyncLane (lanes)) {
24019
24033
// There's no remaining sync work left.
24020
24034
ensureRootIsScheduled(root, now());
24021
24035
return null;
@@ -25317,16 +25331,13 @@ function commitRootImpl(
25317
25331
// currently schedule the callback in multiple places, will wait until those
25318
25332
// are consolidated.
25319
25333
25320
- if (
25321
- includesSomeLane(pendingPassiveEffectsLanes, SyncLane) &&
25322
- root.tag !== LegacyRoot
25323
- ) {
25334
+ if (includesSyncLane(pendingPassiveEffectsLanes) && root.tag !== LegacyRoot) {
25324
25335
flushPassiveEffects();
25325
25336
} // Read this again, since a passive effect might have updated it
25326
25337
25327
25338
remainingLanes = root.pendingLanes;
25328
25339
25329
- if (includesSomeLane (remainingLanes, SyncLane )) {
25340
+ if (includesSyncLane (remainingLanes)) {
25330
25341
{
25331
25342
markNestedUpdateScheduled();
25332
25343
} // Count the number of times the root synchronously re-renders without
0 commit comments