react-dom 18.2.0-next-be229c565-20220613 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/react-dom-server-legacy.browser.development.js +1 -1
- package/cjs/react-dom-server-legacy.browser.production.min.js +1 -1
- package/cjs/react-dom-server-legacy.node.development.js +1 -1
- package/cjs/react-dom-server-legacy.node.production.min.js +1 -1
- package/cjs/react-dom-server.browser.development.js +1 -1
- package/cjs/react-dom-server.browser.production.min.js +1 -1
- package/cjs/react-dom-server.node.development.js +1 -1
- package/cjs/react-dom-server.node.production.min.js +1 -1
- package/cjs/react-dom.development.js +67 -37
- package/cjs/react-dom.production.min.js +158 -158
- package/cjs/react-dom.profiling.min.js +173 -173
- package/package.json +3 -3
- package/umd/react-dom-server-legacy.browser.development.js +1 -1
- package/umd/react-dom-server-legacy.browser.production.min.js +1 -1
- package/umd/react-dom-server.browser.development.js +1 -1
- package/umd/react-dom-server.browser.production.min.js +1 -1
- package/umd/react-dom.development.js +67 -37
- package/umd/react-dom.production.min.js +139 -139
- package/umd/react-dom.profiling.min.js +131 -131
|
@@ -16,7 +16,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
16
16
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
|
|
19
|
-
var ReactVersion = '18.2.0
|
|
19
|
+
var ReactVersion = '18.2.0';
|
|
20
20
|
|
|
21
21
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
22
22
|
|
|
@@ -90,4 +90,4 @@ for(h=0;h<da.length;h++)if(!Qb(f,g,mb,da[h])){h++;da.splice(0,h);var nb=!1;break
|
|
|
90
90
|
function Rb(a,b){try{var c=a.abortableTasks;c.forEach(function(c){return Lb(c,a,b)});c.clear();null!==a.destination&&Mb(a,a.destination)}catch(d){V(a,d),W(a,d)}}function Sb(){}
|
|
91
91
|
function Tb(a,b,c,d){var f=!1,e=null,g="",h={push:function(a){null!==a&&(g+=a);return!0},destroy:function(a){f=!0;e=a}},k=!1;a=Ab(a,Ea(c,b?b.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},Infinity,Sb,void 0,function(){k=!0},void 0,void 0);Cb(a);Rb(a,d);if(1===a.status)a.status=2,h.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=h;try{Mb(a,h)}catch(m){V(a,m),W(a,m)}}if(f)throw e;if(!k)throw Error(l(426));return g}
|
|
92
92
|
exports.renderToNodeStream=function(){throw Error(l(207));};exports.renderToStaticMarkup=function(a,b){return Tb(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};exports.renderToStaticNodeStream=function(){throw Error(l(208));};exports.renderToString=function(a,b){return Tb(a,b,!1,'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')};
|
|
93
|
-
exports.version="18.2.0
|
|
93
|
+
exports.version="18.2.0";
|
|
@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
var stream = require('stream');
|
|
19
19
|
|
|
20
|
-
var ReactVersion = '18.2.0
|
|
20
|
+
var ReactVersion = '18.2.0';
|
|
21
21
|
|
|
22
22
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
23
23
|
|
|
@@ -98,4 +98,4 @@ function Vb(a,b,c,d){var f=!1,e=null,g="",h=!1;a=Cb(a,Fa(c,b?b.identifierPrefix:
|
|
|
98
98
|
function Wb(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;a.__proto__=b}var Xb=function(a){function b(){var b=a.call(this,{})||this;b.request=null;b.startedFlowing=!1;return b}Wb(b,a);var c=b.prototype;c._destroy=function(a,b){Tb(this.request);b(a)};c._read=function(){this.startedFlowing&&Sb(this.request,this)};return b}(fa.Readable);function Yb(){}
|
|
99
99
|
function Zb(a,b){var c=new Xb,d=Cb(a,Fa(!1,b?b.identifierPrefix:void 0),Ga(),Infinity,Yb,function(){c.startedFlowing=!0;Sb(d,c)},void 0,void 0);c.request=d;Eb(d);return c}exports.renderToNodeStream=function(a,b){return Zb(a,b)};exports.renderToStaticMarkup=function(a,b){return Vb(a,b,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server')};
|
|
100
100
|
exports.renderToStaticNodeStream=function(a,b){return Zb(a,b)};exports.renderToString=function(a,b){return Vb(a,b,!1,'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 "renderToPipeableStream" which supports Suspense on the server')};
|
|
101
|
-
exports.version="18.2.0
|
|
101
|
+
exports.version="18.2.0";
|
|
@@ -16,7 +16,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
16
16
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
|
|
19
|
-
var ReactVersion = '18.2.0
|
|
19
|
+
var ReactVersion = '18.2.0';
|
|
20
20
|
|
|
21
21
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
22
22
|
|
|
@@ -93,4 +93,4 @@ Mb));if(null===m)throw Error(k(395));p(d,m);p(d,Ob);if(q||r||v)p(d,Qb),p(d,u(Sb(
|
|
|
93
93
|
g,G,ma[h])){h++;ma.splice(0,h);var Fb=!1;break a}ma.splice(0,h);Fb=!0}if(!Fb){a.destination=null;e++;F.splice(0,e);return}}F.splice(0,e);var na=a.completedBoundaries;for(e=0;e<na.length;e++)if(!jd(a,b,na[e])){a.destination=null;e++;na.splice(0,e);return}na.splice(0,e)}finally{ba(b),0===a.allPendingTasks&&0===a.pingedTasks.length&&0===a.clientRenderedBoundaries.length&&0===a.completedBoundaries.length&&b.close()}}
|
|
94
94
|
function ld(a,b){try{var c=a.abortableTasks;c.forEach(function(c){return ed(c,a,b)});c.clear();null!==a.destination&&fd(a,a.destination)}catch(d){Y(a,d),Vc(a,d)}}
|
|
95
95
|
exports.renderToReadableStream=function(a,b){return new Promise(function(c,d){var f,e,g=new Promise(function(a,b){e=a;f=b}),h=Rc(a,za(b?b.identifierPrefix:void 0,b?b.nonce:void 0,b?b.bootstrapScriptContent:void 0,b?b.bootstrapScripts:void 0,b?b.bootstrapModules:void 0),Aa(b?b.namespaceURI:void 0),b?b.progressiveChunkSize:void 0,b?b.onError:void 0,e,function(){var a=new ReadableStream({type:"bytes",pull:function(a){if(1===h.status)h.status=2,da(a,h.fatalError);else if(2!==h.status&&null===h.destination){h.destination=
|
|
96
|
-
a;try{fd(h,a)}catch(A){Y(h,A),Vc(h,A)}}},cancel:function(){ld(h)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},f);if(b&&b.signal){var m=b.signal,q=function(){ld(h,m.reason);m.removeEventListener("abort",q)};m.addEventListener("abort",q)}Uc(h)})};exports.version="18.2.0
|
|
96
|
+
a;try{fd(h,a)}catch(A){Y(h,A),Vc(h,A)}}},cancel:function(){ld(h)}},{highWaterMark:0});a.allReady=g;c(a)},function(a){g.catch(function(){});d(a)},f);if(b&&b.signal){var m=b.signal,q=function(){ld(h,m.reason);m.removeEventListener("abort",q)};m.addEventListener("abort",q)}Uc(h)})};exports.version="18.2.0";
|
|
@@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
17
17
|
var React = require('react');
|
|
18
18
|
var util = require('util');
|
|
19
19
|
|
|
20
|
-
var ReactVersion = '18.2.0
|
|
20
|
+
var ReactVersion = '18.2.0';
|
|
21
21
|
|
|
22
22
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
23
23
|
|
|
@@ -99,4 +99,4 @@ b.end()}}function jd(a){setImmediate(function(){return Qc(a)})}function kd(a,b){
|
|
|
99
99
|
function od(a,b){var c=b?b.identifierPrefix:void 0,d=b?b.nonce:void 0,f=b?b.bootstrapScriptContent:void 0,e=b?b.bootstrapScripts:void 0;var g=b?b.bootstrapModules:void 0;c=void 0===c?"":c;d=void 0===d?ra:x('<script nonce="'+F(d)+'">');var h=[];void 0!==f&&h.push(d,(""+f).replace(wa,xa),sa);if(void 0!==e)for(f=0;f<e.length;f++)h.push(ta,F(e[f]),va);if(void 0!==g)for(e=0;e<g.length;e++)h.push(ua,F(g[e]),va);g={bootstrapChunks:h,startInlineScript:d,placeholderPrefix:x(c+"P:"),segmentPrefix:x(c+"S:"),
|
|
100
100
|
boundaryPrefix:c+"B:",idPrefix:c,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1};e=b?b.namespaceURI:void 0;e=G("http://www.w3.org/2000/svg"===e?2:"http://www.w3.org/1998/Math/MathML"===e?3:0,null);f=b?b.progressiveChunkSize:void 0;d=b?b.onError:void 0;h=b?b.onAllReady:void 0;var m=b?b.onShellReady:void 0,n=b?b.onShellError:void 0;b=[];c=new Set;g={destination:null,responseState:g,progressiveChunkSize:void 0===f?12800:f,status:0,fatalError:null,
|
|
101
101
|
nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:c,pingedTasks:b,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:void 0===d?Oc:d,onAllReady:void 0===h?X:h,onShellReady:void 0===m?X:m,onShellError:void 0===n?X:n,onFatalError:X};e=Sc(g,0,null,e,!1,!1);e.parentFlushed=!0;a=Rc(g,a,null,e,c,hc,null,qc);b.push(a);return g}
|
|
102
|
-
exports.renderToPipeableStream=function(a,b){var c=od(a,b),d=!1;jd(c);return{pipe:function(a){if(d)throw Error("React currently only supports piping to one writable stream.");d=!0;kd(c,a);a.on("drain",md(a,c));a.on("error",nd(c,Error("The destination stream errored while writing data.")));a.on("close",nd(c,Error("The destination stream closed early.")));return a},abort:function(a){ld(c,a)}}};exports.version="18.2.0
|
|
102
|
+
exports.renderToPipeableStream=function(a,b){var c=od(a,b),d=!1;jd(c);return{pipe:function(a){if(d)throw Error("React currently only supports piping to one writable stream.");d=!0;kd(c,a);a.on("drain",md(a,c));a.on("error",nd(c,Error("The destination stream errored while writing data.")));a.on("close",nd(c,Error("The destination stream closed early.")));return a},abort:function(a){ld(c,a)}}};exports.version="18.2.0";
|
|
@@ -117,6 +117,8 @@ var CacheComponent = 24;
|
|
|
117
117
|
var TracingMarkerComponent = 25;
|
|
118
118
|
|
|
119
119
|
// -----------------------------------------------------------------------------
|
|
120
|
+
|
|
121
|
+
var enableClientRenderFallbackOnTextMismatch = true; // TODO: Need to review this code one more time before landing
|
|
120
122
|
// the react-reconciler package.
|
|
121
123
|
|
|
122
124
|
var enableNewReconciler = false; // Support legacy Primer support on internal FB www
|
|
@@ -9639,7 +9641,7 @@ function checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldW
|
|
|
9639
9641
|
}
|
|
9640
9642
|
}
|
|
9641
9643
|
|
|
9642
|
-
if (isConcurrentMode) {
|
|
9644
|
+
if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {
|
|
9643
9645
|
// In concurrent roots, we throw when there's a text mismatch and revert to
|
|
9644
9646
|
// client rendering, up to the nearest Suspense boundary.
|
|
9645
9647
|
throw new Error('Text content does not match server-rendered HTML.');
|
|
@@ -13381,13 +13383,7 @@ function enqueueConcurrentRenderForLane(fiber, lane) {
|
|
|
13381
13383
|
var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;
|
|
13382
13384
|
|
|
13383
13385
|
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
|
|
13384
|
-
//
|
|
13385
|
-
// has already unmounted. This isn't really necessary but it happens to be the
|
|
13386
|
-
// current behavior we've used for several release cycles. Consider not
|
|
13387
|
-
// performing this check if the updated fiber already unmounted, since it's
|
|
13388
|
-
// not possible for that to cause an infinite update loop.
|
|
13389
|
-
throwIfInfiniteUpdateLoopDetected(); // Update the source fiber's lanes
|
|
13390
|
-
|
|
13386
|
+
// Update the source fiber's lanes
|
|
13391
13387
|
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
|
|
13392
13388
|
var alternate = sourceFiber.alternate;
|
|
13393
13389
|
|
|
@@ -14506,7 +14502,11 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
14506
14502
|
}
|
|
14507
14503
|
|
|
14508
14504
|
if (typeof instance.componentDidMount === 'function') {
|
|
14509
|
-
var fiberFlags = Update
|
|
14505
|
+
var fiberFlags = Update;
|
|
14506
|
+
|
|
14507
|
+
{
|
|
14508
|
+
fiberFlags |= LayoutStatic;
|
|
14509
|
+
}
|
|
14510
14510
|
|
|
14511
14511
|
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
|
|
14512
14512
|
fiberFlags |= MountLayoutDev;
|
|
@@ -14554,7 +14554,11 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
14554
14554
|
// If an update was already in progress, we should schedule an Update
|
|
14555
14555
|
// effect even though we're bailing out, so that cWU/cDU are called.
|
|
14556
14556
|
if (typeof instance.componentDidMount === 'function') {
|
|
14557
|
-
var fiberFlags = Update
|
|
14557
|
+
var fiberFlags = Update;
|
|
14558
|
+
|
|
14559
|
+
{
|
|
14560
|
+
fiberFlags |= LayoutStatic;
|
|
14561
|
+
}
|
|
14558
14562
|
|
|
14559
14563
|
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
|
|
14560
14564
|
fiberFlags |= MountLayoutDev;
|
|
@@ -14587,7 +14591,11 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
14587
14591
|
}
|
|
14588
14592
|
|
|
14589
14593
|
if (typeof instance.componentDidMount === 'function') {
|
|
14590
|
-
var _fiberFlags = Update
|
|
14594
|
+
var _fiberFlags = Update;
|
|
14595
|
+
|
|
14596
|
+
{
|
|
14597
|
+
_fiberFlags |= LayoutStatic;
|
|
14598
|
+
}
|
|
14591
14599
|
|
|
14592
14600
|
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
|
|
14593
14601
|
_fiberFlags |= MountLayoutDev;
|
|
@@ -14599,7 +14607,11 @@ function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
|
|
|
14599
14607
|
// If an update was already in progress, we should schedule an Update
|
|
14600
14608
|
// effect even though we're bailing out, so that cWU/cDU are called.
|
|
14601
14609
|
if (typeof instance.componentDidMount === 'function') {
|
|
14602
|
-
var _fiberFlags2 = Update
|
|
14610
|
+
var _fiberFlags2 = Update;
|
|
14611
|
+
|
|
14612
|
+
{
|
|
14613
|
+
_fiberFlags2 |= LayoutStatic;
|
|
14614
|
+
}
|
|
14603
14615
|
|
|
14604
14616
|
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
|
|
14605
14617
|
_fiberFlags2 |= MountLayoutDev;
|
|
@@ -17095,7 +17107,11 @@ function updateInsertionEffect(create, deps) {
|
|
|
17095
17107
|
}
|
|
17096
17108
|
|
|
17097
17109
|
function mountLayoutEffect(create, deps) {
|
|
17098
|
-
var fiberFlags = Update
|
|
17110
|
+
var fiberFlags = Update;
|
|
17111
|
+
|
|
17112
|
+
{
|
|
17113
|
+
fiberFlags |= LayoutStatic;
|
|
17114
|
+
}
|
|
17099
17115
|
|
|
17100
17116
|
if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
|
|
17101
17117
|
fiberFlags |= MountLayoutDev;
|
|
@@ -17145,7 +17161,11 @@ function mountImperativeHandle(ref, create, deps) {
|
|
|
17145
17161
|
|
|
17146
17162
|
|
|
17147
17163
|
var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
|
|
17148
|
-
var fiberFlags = Update
|
|
17164
|
+
var fiberFlags = Update;
|
|
17165
|
+
|
|
17166
|
+
{
|
|
17167
|
+
fiberFlags |= LayoutStatic;
|
|
17168
|
+
}
|
|
17149
17169
|
|
|
17150
17170
|
if ( (currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
|
|
17151
17171
|
fiberFlags |= MountLayoutDev;
|
|
@@ -19526,7 +19546,10 @@ function markRef(current, workInProgress) {
|
|
|
19526
19546
|
if (current === null && ref !== null || current !== null && current.ref !== ref) {
|
|
19527
19547
|
// Schedule a Ref effect
|
|
19528
19548
|
workInProgress.flags |= Ref;
|
|
19529
|
-
|
|
19549
|
+
|
|
19550
|
+
{
|
|
19551
|
+
workInProgress.flags |= RefStatic;
|
|
19552
|
+
}
|
|
19530
19553
|
}
|
|
19531
19554
|
}
|
|
19532
19555
|
|
|
@@ -21692,7 +21715,11 @@ function markUpdate(workInProgress) {
|
|
|
21692
21715
|
}
|
|
21693
21716
|
|
|
21694
21717
|
function markRef$1(workInProgress) {
|
|
21695
|
-
workInProgress.flags |= Ref
|
|
21718
|
+
workInProgress.flags |= Ref;
|
|
21719
|
+
|
|
21720
|
+
{
|
|
21721
|
+
workInProgress.flags |= RefStatic;
|
|
21722
|
+
}
|
|
21696
21723
|
}
|
|
21697
21724
|
|
|
21698
21725
|
var appendAllChildren;
|
|
@@ -22722,10 +22749,6 @@ function unwindWork(current, workInProgress, renderLanes) {
|
|
|
22722
22749
|
|
|
22723
22750
|
return null;
|
|
22724
22751
|
|
|
22725
|
-
case TracingMarkerComponent:
|
|
22726
|
-
|
|
22727
|
-
return null;
|
|
22728
|
-
|
|
22729
22752
|
default:
|
|
22730
22753
|
return null;
|
|
22731
22754
|
}
|
|
@@ -22795,6 +22818,7 @@ var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
|
|
|
22795
22818
|
didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
|
|
22796
22819
|
} // Used during the commit phase to track the state of the Offscreen component stack.
|
|
22797
22820
|
// Allows us to avoid traversing the return path to find the nearest Offscreen ancestor.
|
|
22821
|
+
// Only used when enableSuspenseLayoutEffectSemantics is enabled.
|
|
22798
22822
|
|
|
22799
22823
|
|
|
22800
22824
|
var offscreenSubtreeIsHidden = false;
|
|
@@ -23233,7 +23257,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committe
|
|
|
23233
23257
|
case ForwardRef:
|
|
23234
23258
|
case SimpleMemoComponent:
|
|
23235
23259
|
{
|
|
23236
|
-
if (!offscreenSubtreeWasHidden) {
|
|
23260
|
+
if ( !offscreenSubtreeWasHidden) {
|
|
23237
23261
|
// At this point layout effects have already been destroyed (during mutation phase).
|
|
23238
23262
|
// This is done to prevent sibling component effects from interfering with each other,
|
|
23239
23263
|
// e.g. a destroy function in one component should never override a ref set
|
|
@@ -23473,7 +23497,7 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork, committe
|
|
|
23473
23497
|
}
|
|
23474
23498
|
}
|
|
23475
23499
|
|
|
23476
|
-
if (!offscreenSubtreeWasHidden) {
|
|
23500
|
+
if ( !offscreenSubtreeWasHidden) {
|
|
23477
23501
|
{
|
|
23478
23502
|
if (finishedWork.flags & Ref) {
|
|
23479
23503
|
commitAttachRef(finishedWork);
|
|
@@ -24119,7 +24143,8 @@ function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, dele
|
|
|
24119
24143
|
|
|
24120
24144
|
case OffscreenComponent:
|
|
24121
24145
|
{
|
|
24122
|
-
if (
|
|
24146
|
+
if ( // TODO: Remove this dead flag
|
|
24147
|
+
deletedFiber.mode & ConcurrentMode) {
|
|
24123
24148
|
// If this offscreen component is hidden, we already unmounted it. Before
|
|
24124
24149
|
// deleting the children, track that it's already unmounted so that we
|
|
24125
24150
|
// don't attempt to unmount the effects again.
|
|
@@ -24475,7 +24500,8 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
24475
24500
|
{
|
|
24476
24501
|
var _wasHidden = current !== null && current.memoizedState !== null;
|
|
24477
24502
|
|
|
24478
|
-
if (
|
|
24503
|
+
if ( // TODO: Remove this dead flag
|
|
24504
|
+
finishedWork.mode & ConcurrentMode) {
|
|
24479
24505
|
// Before committing the children, track on the stack whether this
|
|
24480
24506
|
// offscreen subtree was already hidden, so that we don't unmount the
|
|
24481
24507
|
// effects again.
|
|
@@ -24500,16 +24526,18 @@ function commitMutationEffectsOnFiber(finishedWork, root, lanes) {
|
|
|
24500
24526
|
|
|
24501
24527
|
_offscreenInstance.isHidden = _isHidden;
|
|
24502
24528
|
|
|
24503
|
-
|
|
24504
|
-
if (
|
|
24505
|
-
if (
|
|
24506
|
-
|
|
24507
|
-
|
|
24508
|
-
|
|
24509
|
-
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
|
|
24529
|
+
{
|
|
24530
|
+
if (_isHidden) {
|
|
24531
|
+
if (!_wasHidden) {
|
|
24532
|
+
if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {
|
|
24533
|
+
nextEffect = offscreenBoundary;
|
|
24534
|
+
var offscreenChild = offscreenBoundary.child;
|
|
24535
|
+
|
|
24536
|
+
while (offscreenChild !== null) {
|
|
24537
|
+
nextEffect = offscreenChild;
|
|
24538
|
+
disappearLayoutEffects_begin(offscreenChild);
|
|
24539
|
+
offscreenChild = offscreenChild.sibling;
|
|
24540
|
+
}
|
|
24513
24541
|
}
|
|
24514
24542
|
}
|
|
24515
24543
|
}
|
|
@@ -24594,7 +24622,7 @@ function commitLayoutEffects_begin(subtreeRoot, root, committedLanes) {
|
|
|
24594
24622
|
var fiber = nextEffect;
|
|
24595
24623
|
var firstChild = fiber.child;
|
|
24596
24624
|
|
|
24597
|
-
if (fiber.tag === OffscreenComponent && isModernRoot) {
|
|
24625
|
+
if ( fiber.tag === OffscreenComponent && isModernRoot) {
|
|
24598
24626
|
// Keep track of the current Offscreen stack's state.
|
|
24599
24627
|
var isHidden = fiber.memoizedState !== null;
|
|
24600
24628
|
var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;
|
|
@@ -25444,6 +25472,8 @@ function requestRetryLane(fiber) {
|
|
|
25444
25472
|
}
|
|
25445
25473
|
|
|
25446
25474
|
function scheduleUpdateOnFiber(root, fiber, lane, eventTime) {
|
|
25475
|
+
checkForNestedUpdates();
|
|
25476
|
+
|
|
25447
25477
|
{
|
|
25448
25478
|
if (isRunningInsertionEffect) {
|
|
25449
25479
|
error('useInsertionEffect must not schedule updates.');
|
|
@@ -27255,7 +27285,7 @@ function jnd(timeElapsed) {
|
|
|
27255
27285
|
return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
|
|
27256
27286
|
}
|
|
27257
27287
|
|
|
27258
|
-
function
|
|
27288
|
+
function checkForNestedUpdates() {
|
|
27259
27289
|
if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
|
|
27260
27290
|
nestedUpdateCount = 0;
|
|
27261
27291
|
rootWithNestedUpdates = null;
|
|
@@ -28652,7 +28682,7 @@ identifierPrefix, onRecoverableError, transitionCallbacks) {
|
|
|
28652
28682
|
return root;
|
|
28653
28683
|
}
|
|
28654
28684
|
|
|
28655
|
-
var ReactVersion = '18.2.0
|
|
28685
|
+
var ReactVersion = '18.2.0';
|
|
28656
28686
|
|
|
28657
28687
|
function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
|
|
28658
28688
|
implementation) {
|