react-test-renderer 0.0.0-experimental-941e1b4a-20240729 → 0.0.0-experimental-ab7c1663-20240730
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-test-renderer.development.js +210 -132
- package/cjs/react-test-renderer.production.js +275 -194
- package/package.json +4 -4
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"use strict";
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
|
13
13
|
(function () {
|
|
14
|
-
function
|
|
14
|
+
function JSCompiler_object_inline_createNodeMock_994() {
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function findHook(fiber, id) {
|
|
@@ -649,16 +649,6 @@
|
|
|
649
649
|
throw Error("Unable to find node on an unmounted component.");
|
|
650
650
|
return a.stateNode.current === a ? fiber : alternate;
|
|
651
651
|
}
|
|
652
|
-
function findCurrentHostFiberImpl(node) {
|
|
653
|
-
var tag = node.tag;
|
|
654
|
-
if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
|
|
655
|
-
for (node = node.child; null !== node; ) {
|
|
656
|
-
tag = findCurrentHostFiberImpl(node);
|
|
657
|
-
if (null !== tag) return tag;
|
|
658
|
-
node = node.sibling;
|
|
659
|
-
}
|
|
660
|
-
return null;
|
|
661
|
-
}
|
|
662
652
|
function injectInternals(internals) {
|
|
663
653
|
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
|
|
664
654
|
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
@@ -2544,7 +2534,7 @@
|
|
|
2544
2534
|
if (newChild.$$typeof === REACT_CONTEXT_TYPE)
|
|
2545
2535
|
return createChild(
|
|
2546
2536
|
returnFiber,
|
|
2547
|
-
readContextDuringReconciliation(returnFiber, newChild
|
|
2537
|
+
readContextDuringReconciliation(returnFiber, newChild),
|
|
2548
2538
|
lanes
|
|
2549
2539
|
);
|
|
2550
2540
|
throwOnInvalidObjectType(returnFiber, newChild);
|
|
@@ -2625,7 +2615,7 @@
|
|
|
2625
2615
|
return updateSlot(
|
|
2626
2616
|
returnFiber,
|
|
2627
2617
|
oldFiber,
|
|
2628
|
-
readContextDuringReconciliation(returnFiber, newChild
|
|
2618
|
+
readContextDuringReconciliation(returnFiber, newChild),
|
|
2629
2619
|
lanes
|
|
2630
2620
|
);
|
|
2631
2621
|
throwOnInvalidObjectType(returnFiber, newChild);
|
|
@@ -2722,7 +2712,7 @@
|
|
|
2722
2712
|
existingChildren,
|
|
2723
2713
|
returnFiber,
|
|
2724
2714
|
newIdx,
|
|
2725
|
-
readContextDuringReconciliation(returnFiber, newChild
|
|
2715
|
+
readContextDuringReconciliation(returnFiber, newChild),
|
|
2726
2716
|
lanes
|
|
2727
2717
|
);
|
|
2728
2718
|
throwOnInvalidObjectType(returnFiber, newChild);
|
|
@@ -3199,7 +3189,7 @@
|
|
|
3199
3189
|
return reconcileChildFibersImpl(
|
|
3200
3190
|
returnFiber,
|
|
3201
3191
|
currentFirstChild,
|
|
3202
|
-
readContextDuringReconciliation(returnFiber, newChild
|
|
3192
|
+
readContextDuringReconciliation(returnFiber, newChild),
|
|
3203
3193
|
lanes
|
|
3204
3194
|
);
|
|
3205
3195
|
throwOnInvalidObjectType(returnFiber, newChild);
|
|
@@ -3523,6 +3513,12 @@
|
|
|
3523
3513
|
throw Error(
|
|
3524
3514
|
"Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
|
|
3525
3515
|
);
|
|
3516
|
+
null === current ||
|
|
3517
|
+
didReceiveUpdate ||
|
|
3518
|
+
((current = current.dependencies),
|
|
3519
|
+
null !== current &&
|
|
3520
|
+
checkIfContextChanged(current) &&
|
|
3521
|
+
(didReceiveUpdate = !0));
|
|
3526
3522
|
needsToResetSuspendedThenableDEV
|
|
3527
3523
|
? ((needsToResetSuspendedThenableDEV = !1), (current = !0))
|
|
3528
3524
|
: (current = !1);
|
|
@@ -5103,6 +5099,14 @@
|
|
|
5103
5099
|
"object" === typeof value &&
|
|
5104
5100
|
"function" === typeof value.then
|
|
5105
5101
|
) {
|
|
5102
|
+
returnFiber = sourceFiber.alternate;
|
|
5103
|
+
null !== returnFiber &&
|
|
5104
|
+
propagateParentContextChanges(
|
|
5105
|
+
returnFiber,
|
|
5106
|
+
sourceFiber,
|
|
5107
|
+
rootRenderLanes,
|
|
5108
|
+
!0
|
|
5109
|
+
);
|
|
5106
5110
|
returnFiber = suspenseHandlerStackCursor.current;
|
|
5107
5111
|
if (null !== returnFiber) {
|
|
5108
5112
|
switch (returnFiber.tag) {
|
|
@@ -5245,7 +5249,7 @@
|
|
|
5245
5249
|
for (var key in nextProps)
|
|
5246
5250
|
"ref" !== key && (propsWithoutRef[key] = nextProps[key]);
|
|
5247
5251
|
} else propsWithoutRef = nextProps;
|
|
5248
|
-
prepareToReadContext(workInProgress
|
|
5252
|
+
prepareToReadContext(workInProgress);
|
|
5249
5253
|
nextProps = renderWithHooks(
|
|
5250
5254
|
current,
|
|
5251
5255
|
workInProgress,
|
|
@@ -5304,7 +5308,7 @@
|
|
|
5304
5308
|
return (workInProgress.child = current);
|
|
5305
5309
|
}
|
|
5306
5310
|
type = current.child;
|
|
5307
|
-
if (
|
|
5311
|
+
if (!checkScheduledUpdateOrContext(current, renderLanes)) {
|
|
5308
5312
|
var prevProps = type.memoizedProps;
|
|
5309
5313
|
Component = Component.compare;
|
|
5310
5314
|
Component = null !== Component ? Component : shallowEqual;
|
|
@@ -5341,7 +5345,7 @@
|
|
|
5341
5345
|
if (
|
|
5342
5346
|
((didReceiveUpdate = !1),
|
|
5343
5347
|
(workInProgress.pendingProps = nextProps = prevProps),
|
|
5344
|
-
|
|
5348
|
+
checkScheduledUpdateOrContext(current, renderLanes))
|
|
5345
5349
|
)
|
|
5346
5350
|
0 !== (current.flags & 131072) && (didReceiveUpdate = !0);
|
|
5347
5351
|
else
|
|
@@ -5367,21 +5371,22 @@
|
|
|
5367
5371
|
markRef(current, workInProgress);
|
|
5368
5372
|
if ("hidden" === nextProps.mode || nextIsDetached) {
|
|
5369
5373
|
if (0 !== (workInProgress.flags & 128)) {
|
|
5370
|
-
|
|
5374
|
+
nextProps =
|
|
5371
5375
|
null !== prevState
|
|
5372
5376
|
? prevState.baseLanes | renderLanes
|
|
5373
5377
|
: renderLanes;
|
|
5374
5378
|
if (null !== current) {
|
|
5375
|
-
|
|
5376
|
-
for (
|
|
5377
|
-
(
|
|
5378
|
-
|
|
5379
|
-
(
|
|
5380
|
-
workInProgress.childLanes =
|
|
5379
|
+
nextChildren = workInProgress.child = current.child;
|
|
5380
|
+
for (nextIsDetached = 0; null !== nextChildren; )
|
|
5381
|
+
(nextIsDetached =
|
|
5382
|
+
nextIsDetached | nextChildren.lanes | nextChildren.childLanes),
|
|
5383
|
+
(nextChildren = nextChildren.sibling);
|
|
5384
|
+
workInProgress.childLanes = nextIsDetached & ~nextProps;
|
|
5381
5385
|
} else (workInProgress.childLanes = 0), (workInProgress.child = null);
|
|
5382
5386
|
return deferHiddenOffscreenComponent(
|
|
5383
5387
|
current,
|
|
5384
5388
|
workInProgress,
|
|
5389
|
+
nextProps,
|
|
5385
5390
|
renderLanes
|
|
5386
5391
|
);
|
|
5387
5392
|
}
|
|
@@ -5404,7 +5409,8 @@
|
|
|
5404
5409
|
workInProgress,
|
|
5405
5410
|
null !== prevState
|
|
5406
5411
|
? prevState.baseLanes | renderLanes
|
|
5407
|
-
: renderLanes
|
|
5412
|
+
: renderLanes,
|
|
5413
|
+
renderLanes
|
|
5408
5414
|
)
|
|
5409
5415
|
);
|
|
5410
5416
|
} else
|
|
@@ -5422,7 +5428,8 @@
|
|
|
5422
5428
|
function deferHiddenOffscreenComponent(
|
|
5423
5429
|
current,
|
|
5424
5430
|
workInProgress,
|
|
5425
|
-
nextBaseLanes
|
|
5431
|
+
nextBaseLanes,
|
|
5432
|
+
renderLanes
|
|
5426
5433
|
) {
|
|
5427
5434
|
var JSCompiler_inline_result = peekCacheFromPool();
|
|
5428
5435
|
JSCompiler_inline_result =
|
|
@@ -5439,6 +5446,8 @@
|
|
|
5439
5446
|
null !== current && pushTransition(workInProgress, null);
|
|
5440
5447
|
reuseHiddenContextOnStack(workInProgress);
|
|
5441
5448
|
pushOffscreenSuspenseHandler(workInProgress);
|
|
5449
|
+
null !== current &&
|
|
5450
|
+
propagateParentContextChanges(current, workInProgress, renderLanes, !0);
|
|
5442
5451
|
return null;
|
|
5443
5452
|
}
|
|
5444
5453
|
function markRef(current, workInProgress) {
|
|
@@ -5491,7 +5500,7 @@
|
|
|
5491
5500
|
"%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",
|
|
5492
5501
|
componentName
|
|
5493
5502
|
))));
|
|
5494
|
-
prepareToReadContext(workInProgress
|
|
5503
|
+
prepareToReadContext(workInProgress);
|
|
5495
5504
|
Component = renderWithHooks(
|
|
5496
5505
|
current,
|
|
5497
5506
|
workInProgress,
|
|
@@ -5517,7 +5526,7 @@
|
|
|
5517
5526
|
secondArg,
|
|
5518
5527
|
renderLanes
|
|
5519
5528
|
) {
|
|
5520
|
-
prepareToReadContext(workInProgress
|
|
5529
|
+
prepareToReadContext(workInProgress);
|
|
5521
5530
|
hookTypesUpdateIndexDev = -1;
|
|
5522
5531
|
ignorePreviousDependencies =
|
|
5523
5532
|
null !== current && current.type !== workInProgress.type;
|
|
@@ -5573,7 +5582,7 @@
|
|
|
5573
5582
|
);
|
|
5574
5583
|
enqueueCapturedUpdate(workInProgress, lane);
|
|
5575
5584
|
}
|
|
5576
|
-
prepareToReadContext(workInProgress
|
|
5585
|
+
prepareToReadContext(workInProgress);
|
|
5577
5586
|
if (null === workInProgress.stateNode) {
|
|
5578
5587
|
_instance = emptyContextObject;
|
|
5579
5588
|
state = Component.contextType;
|
|
@@ -5955,7 +5964,12 @@
|
|
|
5955
5964
|
processUpdateQueue(workInProgress, nextProps, _instance, renderLanes);
|
|
5956
5965
|
suspendIfUpdateReadFromEntangledAsyncAction();
|
|
5957
5966
|
var newState = workInProgress.memoizedState;
|
|
5958
|
-
state !== newApiName ||
|
|
5967
|
+
state !== newApiName ||
|
|
5968
|
+
oldState !== newState ||
|
|
5969
|
+
hasForceUpdate ||
|
|
5970
|
+
(null !== current$jscomp$0 &&
|
|
5971
|
+
null !== current$jscomp$0.dependencies &&
|
|
5972
|
+
checkIfContextChanged(current$jscomp$0.dependencies))
|
|
5959
5973
|
? ("function" === typeof unresolvedOldProps &&
|
|
5960
5974
|
(applyDerivedStateFromProps(
|
|
5961
5975
|
workInProgress,
|
|
@@ -5975,7 +5989,9 @@
|
|
|
5975
5989
|
newState,
|
|
5976
5990
|
lane
|
|
5977
5991
|
) ||
|
|
5978
|
-
|
|
5992
|
+
(null !== current$jscomp$0 &&
|
|
5993
|
+
null !== current$jscomp$0.dependencies &&
|
|
5994
|
+
checkIfContextChanged(current$jscomp$0.dependencies)))
|
|
5979
5995
|
? (oldContext ||
|
|
5980
5996
|
("function" !== typeof _instance.UNSAFE_componentWillUpdate &&
|
|
5981
5997
|
"function" !== typeof _instance.componentWillUpdate) ||
|
|
@@ -6241,7 +6257,14 @@
|
|
|
6241
6257
|
renderLanes
|
|
6242
6258
|
));
|
|
6243
6259
|
else if (
|
|
6244
|
-
(
|
|
6260
|
+
(didReceiveUpdate ||
|
|
6261
|
+
propagateParentContextChanges(
|
|
6262
|
+
current,
|
|
6263
|
+
workInProgress,
|
|
6264
|
+
renderLanes,
|
|
6265
|
+
!1
|
|
6266
|
+
),
|
|
6267
|
+
(JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),
|
|
6245
6268
|
didReceiveUpdate || JSCompiler_temp)
|
|
6246
6269
|
) {
|
|
6247
6270
|
JSCompiler_temp = workInProgressRoot;
|
|
@@ -6643,7 +6666,19 @@
|
|
|
6643
6666
|
null !== current && (workInProgress.dependencies = current.dependencies);
|
|
6644
6667
|
profilerStartTime = -1;
|
|
6645
6668
|
workInProgressRootSkippedLanes |= workInProgress.lanes;
|
|
6646
|
-
if (0 === (renderLanes & workInProgress.childLanes))
|
|
6669
|
+
if (0 === (renderLanes & workInProgress.childLanes))
|
|
6670
|
+
if (null !== current) {
|
|
6671
|
+
if (
|
|
6672
|
+
(propagateParentContextChanges(
|
|
6673
|
+
current,
|
|
6674
|
+
workInProgress,
|
|
6675
|
+
renderLanes,
|
|
6676
|
+
!1
|
|
6677
|
+
),
|
|
6678
|
+
0 === (renderLanes & workInProgress.childLanes))
|
|
6679
|
+
)
|
|
6680
|
+
return null;
|
|
6681
|
+
} else return null;
|
|
6647
6682
|
if (null !== current && workInProgress.child !== current.child)
|
|
6648
6683
|
throw Error("Resuming work not yet implemented.");
|
|
6649
6684
|
if (null !== workInProgress.child) {
|
|
@@ -6659,6 +6694,11 @@
|
|
|
6659
6694
|
}
|
|
6660
6695
|
return workInProgress.child;
|
|
6661
6696
|
}
|
|
6697
|
+
function checkScheduledUpdateOrContext(current, renderLanes) {
|
|
6698
|
+
if (0 !== (current.lanes & renderLanes)) return !0;
|
|
6699
|
+
current = current.dependencies;
|
|
6700
|
+
return null !== current && checkIfContextChanged(current) ? !0 : !1;
|
|
6701
|
+
}
|
|
6662
6702
|
function attemptEarlyBailoutIfNoScheduledUpdate(
|
|
6663
6703
|
current,
|
|
6664
6704
|
workInProgress,
|
|
@@ -6726,8 +6766,17 @@
|
|
|
6726
6766
|
pushPrimaryTreeSuspenseHandler(workInProgress);
|
|
6727
6767
|
break;
|
|
6728
6768
|
case 19:
|
|
6769
|
+
var didSuspendBefore = 0 !== (current.flags & 128);
|
|
6729
6770
|
stateNode = 0 !== (renderLanes & workInProgress.childLanes);
|
|
6730
|
-
|
|
6771
|
+
stateNode ||
|
|
6772
|
+
(propagateParentContextChanges(
|
|
6773
|
+
current,
|
|
6774
|
+
workInProgress,
|
|
6775
|
+
renderLanes,
|
|
6776
|
+
!1
|
|
6777
|
+
),
|
|
6778
|
+
(stateNode = 0 !== (renderLanes & workInProgress.childLanes)));
|
|
6779
|
+
if (didSuspendBefore) {
|
|
6731
6780
|
if (stateNode)
|
|
6732
6781
|
return updateSuspenseListComponent(
|
|
6733
6782
|
current,
|
|
@@ -6736,11 +6785,11 @@
|
|
|
6736
6785
|
);
|
|
6737
6786
|
workInProgress.flags |= 128;
|
|
6738
6787
|
}
|
|
6739
|
-
|
|
6740
|
-
null !==
|
|
6741
|
-
((
|
|
6742
|
-
(
|
|
6743
|
-
(
|
|
6788
|
+
didSuspendBefore = workInProgress.memoizedState;
|
|
6789
|
+
null !== didSuspendBefore &&
|
|
6790
|
+
((didSuspendBefore.rendering = null),
|
|
6791
|
+
(didSuspendBefore.tail = null),
|
|
6792
|
+
(didSuspendBefore.lastEffect = null));
|
|
6744
6793
|
push(
|
|
6745
6794
|
suspenseStackCursor,
|
|
6746
6795
|
suspenseStackCursor.current,
|
|
@@ -6808,7 +6857,7 @@
|
|
|
6808
6857
|
didReceiveUpdate = !0;
|
|
6809
6858
|
else {
|
|
6810
6859
|
if (
|
|
6811
|
-
|
|
6860
|
+
!checkScheduledUpdateOrContext(current, renderLanes) &&
|
|
6812
6861
|
0 === (workInProgress.flags & 128)
|
|
6813
6862
|
)
|
|
6814
6863
|
return (
|
|
@@ -6939,7 +6988,12 @@
|
|
|
6939
6988
|
var nextCache = nextProps.cache;
|
|
6940
6989
|
pushProvider(workInProgress, CacheContext, nextCache);
|
|
6941
6990
|
nextCache !== prevSibling.cache &&
|
|
6942
|
-
|
|
6991
|
+
propagateContextChanges(
|
|
6992
|
+
workInProgress,
|
|
6993
|
+
[CacheContext],
|
|
6994
|
+
renderLanes,
|
|
6995
|
+
!0
|
|
6996
|
+
);
|
|
6943
6997
|
suspendIfUpdateReadFromEntangledAsyncAction();
|
|
6944
6998
|
prevSibling = nextProps.element;
|
|
6945
6999
|
prevSibling === returnFiber
|
|
@@ -6971,15 +7025,7 @@
|
|
|
6971
7025
|
null,
|
|
6972
7026
|
renderLanes
|
|
6973
7027
|
)),
|
|
6974
|
-
(HostTransitionContext._currentValue2 = prevSibling),
|
|
6975
|
-
didReceiveUpdate &&
|
|
6976
|
-
null !== current &&
|
|
6977
|
-
current.memoizedState.memoizedState !== prevSibling &&
|
|
6978
|
-
propagateContextChange(
|
|
6979
|
-
workInProgress,
|
|
6980
|
-
HostTransitionContext,
|
|
6981
|
-
renderLanes
|
|
6982
|
-
)),
|
|
7028
|
+
(HostTransitionContext._currentValue2 = prevSibling)),
|
|
6983
7029
|
markRef(current, workInProgress),
|
|
6984
7030
|
reconcileChildren(
|
|
6985
7031
|
current,
|
|
@@ -7058,43 +7104,25 @@
|
|
|
7058
7104
|
workInProgress.child
|
|
7059
7105
|
);
|
|
7060
7106
|
case 10:
|
|
7061
|
-
|
|
7062
|
-
returnFiber = workInProgress.type
|
|
7063
|
-
prevSibling = workInProgress.pendingProps
|
|
7064
|
-
nextProps =
|
|
7065
|
-
nextCache = prevSibling.value;
|
|
7107
|
+
return (
|
|
7108
|
+
(returnFiber = workInProgress.type),
|
|
7109
|
+
(prevSibling = workInProgress.pendingProps),
|
|
7110
|
+
(nextProps = prevSibling.value),
|
|
7066
7111
|
"value" in prevSibling ||
|
|
7067
7112
|
hasWarnedAboutUsingNoValuePropOnContextProvider ||
|
|
7068
7113
|
((hasWarnedAboutUsingNoValuePropOnContextProvider = !0),
|
|
7069
7114
|
console.error(
|
|
7070
7115
|
"The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
|
|
7071
|
-
))
|
|
7072
|
-
pushProvider(workInProgress, returnFiber,
|
|
7073
|
-
if (null !== nextProps)
|
|
7074
|
-
if (objectIs(nextProps.value, nextCache)) {
|
|
7075
|
-
if (nextProps.children === prevSibling.children) {
|
|
7076
|
-
workInProgress = bailoutOnAlreadyFinishedWork(
|
|
7077
|
-
current,
|
|
7078
|
-
workInProgress,
|
|
7079
|
-
renderLanes
|
|
7080
|
-
);
|
|
7081
|
-
break a;
|
|
7082
|
-
}
|
|
7083
|
-
} else
|
|
7084
|
-
propagateContextChange(
|
|
7085
|
-
workInProgress,
|
|
7086
|
-
returnFiber,
|
|
7087
|
-
renderLanes
|
|
7088
|
-
);
|
|
7116
|
+
)),
|
|
7117
|
+
pushProvider(workInProgress, returnFiber, nextProps),
|
|
7089
7118
|
reconcileChildren(
|
|
7090
7119
|
current,
|
|
7091
7120
|
workInProgress,
|
|
7092
7121
|
prevSibling.children,
|
|
7093
7122
|
renderLanes
|
|
7094
|
-
)
|
|
7095
|
-
workInProgress
|
|
7096
|
-
|
|
7097
|
-
return workInProgress;
|
|
7123
|
+
),
|
|
7124
|
+
workInProgress.child
|
|
7125
|
+
);
|
|
7098
7126
|
case 9:
|
|
7099
7127
|
return (
|
|
7100
7128
|
(prevSibling = workInProgress.type._context),
|
|
@@ -7103,7 +7131,7 @@
|
|
|
7103
7131
|
console.error(
|
|
7104
7132
|
"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
|
|
7105
7133
|
),
|
|
7106
|
-
prepareToReadContext(workInProgress
|
|
7134
|
+
prepareToReadContext(workInProgress),
|
|
7107
7135
|
(prevSibling = readContext(prevSibling)),
|
|
7108
7136
|
(returnFiber = callComponentInDEV(
|
|
7109
7137
|
returnFiber,
|
|
@@ -7145,7 +7173,7 @@
|
|
|
7145
7173
|
return updateOffscreenComponent(current, workInProgress, renderLanes);
|
|
7146
7174
|
case 24:
|
|
7147
7175
|
return (
|
|
7148
|
-
prepareToReadContext(workInProgress
|
|
7176
|
+
prepareToReadContext(workInProgress),
|
|
7149
7177
|
(returnFiber = readContext(CacheContext)),
|
|
7150
7178
|
null === current
|
|
7151
7179
|
? ((prevSibling = peekCacheFromPool()),
|
|
@@ -7183,10 +7211,11 @@
|
|
|
7183
7211
|
: ((returnFiber = nextProps.cache),
|
|
7184
7212
|
pushProvider(workInProgress, CacheContext, returnFiber),
|
|
7185
7213
|
returnFiber !== prevSibling.cache &&
|
|
7186
|
-
|
|
7214
|
+
propagateContextChanges(
|
|
7187
7215
|
workInProgress,
|
|
7188
|
-
CacheContext,
|
|
7189
|
-
renderLanes
|
|
7216
|
+
[CacheContext],
|
|
7217
|
+
renderLanes,
|
|
7218
|
+
!0
|
|
7190
7219
|
))),
|
|
7191
7220
|
reconcileChildren(
|
|
7192
7221
|
current,
|
|
@@ -7252,45 +7281,38 @@
|
|
|
7252
7281
|
"Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
|
|
7253
7282
|
);
|
|
7254
7283
|
}
|
|
7255
|
-
function
|
|
7284
|
+
function propagateContextChanges(
|
|
7285
|
+
workInProgress,
|
|
7286
|
+
contexts,
|
|
7287
|
+
renderLanes,
|
|
7288
|
+
forcePropagateEntireTree
|
|
7289
|
+
) {
|
|
7256
7290
|
var fiber = workInProgress.child;
|
|
7257
7291
|
null !== fiber && (fiber.return = workInProgress);
|
|
7258
7292
|
for (; null !== fiber; ) {
|
|
7259
7293
|
var list = fiber.dependencies;
|
|
7260
7294
|
if (null !== list) {
|
|
7261
7295
|
var nextFiber = fiber.child;
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7296
|
+
list = list.firstContext;
|
|
7297
|
+
a: for (; null !== list; ) {
|
|
7298
|
+
var dependency = list;
|
|
7299
|
+
list = fiber;
|
|
7300
|
+
for (var i = 0; i < contexts.length; i++)
|
|
7301
|
+
if (dependency.context === contexts[i]) {
|
|
7302
|
+
list.lanes |= renderLanes;
|
|
7303
|
+
dependency = list.alternate;
|
|
7304
|
+
null !== dependency && (dependency.lanes |= renderLanes);
|
|
7305
|
+
scheduleContextWorkOnParentPath(
|
|
7306
|
+
list.return,
|
|
7307
|
+
renderLanes,
|
|
7308
|
+
workInProgress
|
|
7309
|
+
);
|
|
7310
|
+
forcePropagateEntireTree || (nextFiber = null);
|
|
7311
|
+
break a;
|
|
7277
7312
|
}
|
|
7278
|
-
|
|
7279
|
-
dependency = fiber.alternate;
|
|
7280
|
-
null !== dependency && (dependency.lanes |= renderLanes);
|
|
7281
|
-
scheduleContextWorkOnParentPath(
|
|
7282
|
-
fiber.return,
|
|
7283
|
-
renderLanes,
|
|
7284
|
-
workInProgress
|
|
7285
|
-
);
|
|
7286
|
-
list.lanes |= renderLanes;
|
|
7287
|
-
break;
|
|
7288
|
-
}
|
|
7289
|
-
dependency = dependency.next;
|
|
7313
|
+
list = dependency.next;
|
|
7290
7314
|
}
|
|
7291
|
-
} else if (
|
|
7292
|
-
nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
|
|
7293
|
-
else if (18 === fiber.tag) {
|
|
7315
|
+
} else if (18 === fiber.tag) {
|
|
7294
7316
|
nextFiber = fiber.return;
|
|
7295
7317
|
if (null === nextFiber)
|
|
7296
7318
|
throw Error(
|
|
@@ -7304,7 +7326,7 @@
|
|
|
7304
7326
|
renderLanes,
|
|
7305
7327
|
workInProgress
|
|
7306
7328
|
);
|
|
7307
|
-
nextFiber =
|
|
7329
|
+
nextFiber = null;
|
|
7308
7330
|
} else nextFiber = fiber.child;
|
|
7309
7331
|
if (null !== nextFiber) nextFiber.return = fiber;
|
|
7310
7332
|
else
|
|
@@ -7324,14 +7346,76 @@
|
|
|
7324
7346
|
fiber = nextFiber;
|
|
7325
7347
|
}
|
|
7326
7348
|
}
|
|
7327
|
-
function
|
|
7349
|
+
function propagateParentContextChanges(
|
|
7350
|
+
current,
|
|
7351
|
+
workInProgress,
|
|
7352
|
+
renderLanes,
|
|
7353
|
+
forcePropagateEntireTree
|
|
7354
|
+
) {
|
|
7355
|
+
current = null;
|
|
7356
|
+
for (
|
|
7357
|
+
var parent = workInProgress, isInsidePropagationBailout = !1;
|
|
7358
|
+
null !== parent;
|
|
7359
|
+
|
|
7360
|
+
) {
|
|
7361
|
+
if (!isInsidePropagationBailout)
|
|
7362
|
+
if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;
|
|
7363
|
+
else if (0 !== (parent.flags & 262144)) break;
|
|
7364
|
+
if (10 === parent.tag) {
|
|
7365
|
+
var currentParent = parent.alternate;
|
|
7366
|
+
if (null === currentParent)
|
|
7367
|
+
throw Error("Should have a current fiber. This is a bug in React.");
|
|
7368
|
+
currentParent = currentParent.memoizedProps;
|
|
7369
|
+
if (null !== currentParent) {
|
|
7370
|
+
var context = parent.type;
|
|
7371
|
+
objectIs(parent.pendingProps.value, currentParent.value) ||
|
|
7372
|
+
(null !== current
|
|
7373
|
+
? current.push(context)
|
|
7374
|
+
: (current = [context]));
|
|
7375
|
+
}
|
|
7376
|
+
} else if (parent === hostTransitionProviderCursor.current) {
|
|
7377
|
+
currentParent = parent.alternate;
|
|
7378
|
+
if (null === currentParent)
|
|
7379
|
+
throw Error("Should have a current fiber. This is a bug in React.");
|
|
7380
|
+
currentParent.memoizedState.memoizedState !==
|
|
7381
|
+
parent.memoizedState.memoizedState &&
|
|
7382
|
+
(null !== current
|
|
7383
|
+
? current.push(HostTransitionContext)
|
|
7384
|
+
: (current = [HostTransitionContext]));
|
|
7385
|
+
}
|
|
7386
|
+
parent = parent.return;
|
|
7387
|
+
}
|
|
7388
|
+
null !== current &&
|
|
7389
|
+
propagateContextChanges(
|
|
7390
|
+
workInProgress,
|
|
7391
|
+
current,
|
|
7392
|
+
renderLanes,
|
|
7393
|
+
forcePropagateEntireTree
|
|
7394
|
+
);
|
|
7395
|
+
workInProgress.flags |= 262144;
|
|
7396
|
+
}
|
|
7397
|
+
function checkIfContextChanged(currentDependencies) {
|
|
7398
|
+
for (
|
|
7399
|
+
currentDependencies = currentDependencies.firstContext;
|
|
7400
|
+
null !== currentDependencies;
|
|
7401
|
+
|
|
7402
|
+
) {
|
|
7403
|
+
if (
|
|
7404
|
+
!objectIs(
|
|
7405
|
+
currentDependencies.context._currentValue2,
|
|
7406
|
+
currentDependencies.memoizedValue
|
|
7407
|
+
)
|
|
7408
|
+
)
|
|
7409
|
+
return !0;
|
|
7410
|
+
currentDependencies = currentDependencies.next;
|
|
7411
|
+
}
|
|
7412
|
+
return !1;
|
|
7413
|
+
}
|
|
7414
|
+
function prepareToReadContext(workInProgress) {
|
|
7328
7415
|
currentlyRenderingFiber = workInProgress;
|
|
7329
7416
|
lastFullyObservedContext = lastContextDependency = null;
|
|
7330
7417
|
workInProgress = workInProgress.dependencies;
|
|
7331
|
-
null !== workInProgress &&
|
|
7332
|
-
null !== workInProgress.firstContext &&
|
|
7333
|
-
(0 !== (workInProgress.lanes & renderLanes) && (didReceiveUpdate = !0),
|
|
7334
|
-
(workInProgress.firstContext = null));
|
|
7418
|
+
null !== workInProgress && (workInProgress.firstContext = null);
|
|
7335
7419
|
}
|
|
7336
7420
|
function readContext(context) {
|
|
7337
7421
|
isDisallowedContextReadInDEV &&
|
|
@@ -7340,9 +7424,8 @@
|
|
|
7340
7424
|
);
|
|
7341
7425
|
return readContextForConsumer(currentlyRenderingFiber, context);
|
|
7342
7426
|
}
|
|
7343
|
-
function readContextDuringReconciliation(consumer, context
|
|
7344
|
-
null === currentlyRenderingFiber &&
|
|
7345
|
-
prepareToReadContext(consumer, renderLanes);
|
|
7427
|
+
function readContextDuringReconciliation(consumer, context) {
|
|
7428
|
+
null === currentlyRenderingFiber && prepareToReadContext(consumer);
|
|
7346
7429
|
return readContextForConsumer(consumer, context);
|
|
7347
7430
|
}
|
|
7348
7431
|
function readContextForConsumer(consumer, context) {
|
|
@@ -7358,6 +7441,7 @@
|
|
|
7358
7441
|
);
|
|
7359
7442
|
lastContextDependency = context;
|
|
7360
7443
|
consumer.dependencies = { lanes: 0, firstContext: context };
|
|
7444
|
+
consumer.flags |= 524288;
|
|
7361
7445
|
} else lastContextDependency = lastContextDependency.next = context;
|
|
7362
7446
|
return value;
|
|
7363
7447
|
}
|
|
@@ -11974,11 +12058,6 @@
|
|
|
11974
12058
|
(scheduleUpdateOnFiber(element, rootFiber, lane),
|
|
11975
12059
|
entangleTransitions(element, rootFiber, lane));
|
|
11976
12060
|
}
|
|
11977
|
-
function findHostInstanceByFiber(fiber) {
|
|
11978
|
-
fiber = findCurrentFiberUsingSlowPath(fiber);
|
|
11979
|
-
fiber = null !== fiber ? findCurrentHostFiberImpl(fiber) : null;
|
|
11980
|
-
return null === fiber ? null : fiber.stateNode;
|
|
11981
|
-
}
|
|
11982
12061
|
function emptyFindFiberByHostInstance() {
|
|
11983
12062
|
return null;
|
|
11984
12063
|
}
|
|
@@ -14215,7 +14294,6 @@
|
|
|
14215
14294
|
setSuspenseHandler: setSuspenseHandler,
|
|
14216
14295
|
scheduleUpdate: scheduleUpdate,
|
|
14217
14296
|
currentDispatcherRef: ReactSharedInternals,
|
|
14218
|
-
findHostInstanceByFiber: findHostInstanceByFiber,
|
|
14219
14297
|
findFiberByHostInstance:
|
|
14220
14298
|
devToolsConfig.findFiberByHostInstance ||
|
|
14221
14299
|
emptyFindFiberByHostInstance,
|
|
@@ -14224,14 +14302,14 @@
|
|
|
14224
14302
|
scheduleRoot: scheduleRoot,
|
|
14225
14303
|
setRefreshHandler: setRefreshHandler,
|
|
14226
14304
|
getCurrentFiber: getCurrentFiberForDevTools,
|
|
14227
|
-
reconcilerVersion: "19.0.0-experimental-
|
|
14305
|
+
reconcilerVersion: "19.0.0-experimental-ab7c1663-20240730"
|
|
14228
14306
|
});
|
|
14229
14307
|
})({
|
|
14230
14308
|
findFiberByHostInstance: function () {
|
|
14231
14309
|
throw Error("TestRenderer does not support findFiberByHostInstance()");
|
|
14232
14310
|
},
|
|
14233
14311
|
bundleType: 1,
|
|
14234
|
-
version: "19.0.0-experimental-
|
|
14312
|
+
version: "19.0.0-experimental-ab7c1663-20240730",
|
|
14235
14313
|
rendererPackageName: "react-test-renderer"
|
|
14236
14314
|
});
|
|
14237
14315
|
exports._Scheduler = Scheduler;
|
|
@@ -14241,7 +14319,7 @@
|
|
|
14241
14319
|
console.error(
|
|
14242
14320
|
"react-test-renderer is deprecated. See https://react.dev/warnings/react-test-renderer"
|
|
14243
14321
|
);
|
|
14244
|
-
var createNodeMock =
|
|
14322
|
+
var createNodeMock = JSCompiler_object_inline_createNodeMock_994,
|
|
14245
14323
|
isConcurrentOnly = !0 !== global.IS_REACT_NATIVE_TEST_ENVIRONMENT,
|
|
14246
14324
|
isConcurrent = isConcurrentOnly,
|
|
14247
14325
|
isStrictMode = !1;
|