7
7
* @noflow
8
8
* @nolint
9
9
* @preventMunge
10
- * @generated SignedSource<<e849805d384d655a0b454ba748de33e0 >>
10
+ * @generated SignedSource<<8974e8c964125552d627281e52405ecc >>
11
11
*/
12
12
13
13
'use strict';
@@ -2515,8 +2515,25 @@ var ReactFabricGlobalResponderHandler = {
2515
2515
fromOrToStateNode && fromOrToStateNode.canonical._internalInstanceHandle
2516
2516
);
2517
2517
2518
- if (isFabric);
2519
- else {
2518
+ if (isFabric) {
2519
+ if (from) {
2520
+ // equivalent to clearJSResponder
2521
+ nativeFabricUIManager.setIsJSResponder(
2522
+ from.stateNode.node,
2523
+ false,
2524
+ blockNativeResponder || false
2525
+ );
2526
+ }
2527
+
2528
+ if (to) {
2529
+ // equivalent to setJSResponder
2530
+ nativeFabricUIManager.setIsJSResponder(
2531
+ to.stateNode.node,
2532
+ true,
2533
+ blockNativeResponder || false
2534
+ );
2535
+ }
2536
+ } else {
2520
2537
if (to !== null) {
2521
2538
var tag = to.stateNode.canonical._nativeTag;
2522
2539
ReactNativePrivateInterface.UIManager.setJSResponder(
@@ -2620,11 +2637,16 @@ function getIteratorFn(maybeIterable) {
2620
2637
}
2621
2638
2622
2639
function getWrappedName(outerType, innerType, wrapperName) {
2640
+ var displayName = outerType.displayName;
2641
+
2642
+ if (displayName) {
2643
+ return displayName;
2644
+ }
2645
+
2623
2646
var functionName = innerType.displayName || innerType.name || "";
2624
- return (
2625
- outerType.displayName ||
2626
- (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName)
2627
- );
2647
+ return functionName !== ""
2648
+ ? wrapperName + "(" + functionName + ")"
2649
+ : wrapperName;
2628
2650
} // Keep in sync with react-reconciler/getComponentNameFromFiber
2629
2651
2630
2652
function getContextName(type) {
@@ -2640,7 +2662,7 @@ function getComponentNameFromType(type) {
2640
2662
{
2641
2663
if (typeof type.tag === "number") {
2642
2664
error(
2643
- "Received an unexpected object in getComponentName (). " +
2665
+ "Received an unexpected object in getComponentNameFromType (). " +
2644
2666
"This is likely a bug in React. Please file an issue."
2645
2667
);
2646
2668
}
@@ -2691,7 +2713,13 @@ function getComponentNameFromType(type) {
2691
2713
return getWrappedName(type, type.render, "ForwardRef");
2692
2714
2693
2715
case REACT_MEMO_TYPE:
2694
- return getComponentNameFromType(type.type);
2716
+ var outerName = type.displayName || null;
2717
+
2718
+ if (outerName !== null) {
2719
+ return outerName;
2720
+ }
2721
+
2722
+ return getComponentNameFromType(type.type) || "Memo";
2695
2723
2696
2724
case REACT_LAZY_TYPE: {
2697
2725
var lazyComponent = type;
@@ -4009,6 +4037,29 @@ function onCommitUnmount(fiber) {
4009
4037
}
4010
4038
}
4011
4039
4040
+ var NoMode =
4041
+ /* */
4042
+ 0; // TODO: Remove ConcurrentMode by reading from the root tag instead
4043
+
4044
+ var ConcurrentMode =
4045
+ /* */
4046
+ 1;
4047
+ var ProfileMode =
4048
+ /* */
4049
+ 2;
4050
+ var DebugTracingMode =
4051
+ /* */
4052
+ 4;
4053
+ var StrictLegacyMode =
4054
+ /* */
4055
+ 8;
4056
+ var StrictEffectsMode =
4057
+ /* */
4058
+ 16;
4059
+ var ConcurrentUpdatesByDefaultMode =
4060
+ /* */
4061
+ 32;
4062
+
4012
4063
// If those values are changed that package should be rebuilt and redeployed.
4013
4064
4014
4065
var TotalLanes = 31;
@@ -4260,6 +4311,15 @@ function getNextLanes(root, wipLanes) {
4260
4311
return wipLanes;
4261
4312
}
4262
4313
}
4314
+
4315
+ if ((root.current.mode & ConcurrentUpdatesByDefaultMode) !== NoMode);
4316
+ else if ((nextLanes & InputContinuousLane) !== NoLanes) {
4317
+ // When updates are sync by default, we entangle continuous priority updates
4318
+ // and default updates, so they render in the same batch. The only reason
4319
+ // they use separate lanes is because continuous updates should interrupt
4320
+ // transitions, but default updates should not.
4321
+ nextLanes |= pendingLanes & DefaultLane;
4322
+ } // Check for entangled lanes and add them to the batch.
4263
4323
//
4264
4324
// A lane is said to be entangled with another when it's not allowed to render
4265
4325
// in a batch that does not also include the other lane. Typically we do this
@@ -4448,9 +4508,17 @@ function shouldTimeSlice(root, lanes) {
4448
4508
return false;
4449
4509
}
4450
4510
4451
- {
4511
+ if ((root.current.mode & ConcurrentUpdatesByDefaultMode) !== NoMode) {
4512
+ // Concurrent updates by default always use time slicing.
4452
4513
return true;
4453
4514
}
4515
+
4516
+ var SyncDefaultLanes =
4517
+ InputContinuousHydrationLane |
4518
+ InputContinuousLane |
4519
+ DefaultHydrationLane |
4520
+ DefaultLane;
4521
+ return (lanes & SyncDefaultLanes) === NoLanes;
4454
4522
}
4455
4523
function isTransitionLane(lane) {
4456
4524
return (lane & TransitionLanes) !== 0;
@@ -5744,27 +5812,7 @@ var Passive$1 =
5744
5812
/* */
5745
5813
4;
5746
5814
5747
- var ReactVersion = "17.0.3-2a7bb4154";
5748
-
5749
- var NoMode =
5750
- /* */
5751
- 0; // TODO: Remove ConcurrentMode by reading from the root tag instead
5752
-
5753
- var ConcurrentMode =
5754
- /* */
5755
- 1;
5756
- var ProfileMode =
5757
- /* */
5758
- 2;
5759
- var DebugTracingMode =
5760
- /* */
5761
- 4;
5762
- var StrictLegacyMode =
5763
- /* */
5764
- 8;
5765
- var StrictEffectsMode =
5766
- /* */
5767
- 16;
5815
+ var ReactVersion = "17.0.3-b8fda6cab";
5768
5816
5769
5817
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
5770
5818
var NoTransition = 0;
@@ -10148,7 +10196,12 @@ function renderWithHooks(
10148
10196
10149
10197
if (
10150
10198
current !== null &&
10151
- (current.flags & StaticMask) !== (workInProgress.flags & StaticMask)
10199
+ (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird
10200
+ // and creates false positives. To make this work in legacy mode, we'd
10201
+ // need to mark fibers that commit in an incomplete state, somehow. For
10202
+ // now I'll disable the warning that most of the bugs that would trigger
10203
+ // it are either exclusive to concurrent mode or exist in both.
10204
+ (current.mode & ConcurrentMode) !== NoMode
10152
10205
) {
10153
10206
error(
10154
10207
"Internal React error: Expected static flag was missing. Please " +
@@ -21092,27 +21145,27 @@ function resetWorkInProgress(workInProgress, renderLanes) {
21092
21145
21093
21146
return workInProgress;
21094
21147
}
21095
- function createHostRootFiber(tag, strictModeLevelOverride) {
21148
+ function createHostRootFiber(
21149
+ tag,
21150
+ isStrictMode,
21151
+ concurrentUpdatesByDefaultOverride
21152
+ ) {
21096
21153
var mode;
21097
21154
21098
21155
if (tag === ConcurrentRoot) {
21099
21156
mode = ConcurrentMode;
21100
21157
21101
- if (strictModeLevelOverride !== null) {
21102
- if (strictModeLevelOverride >= 1) {
21103
- mode |= StrictLegacyMode;
21104
- }
21158
+ if (isStrictMode === true) {
21159
+ mode |= StrictLegacyMode;
21105
21160
21106
21161
{
21107
- if (strictModeLevelOverride >= 2) {
21108
- mode |= StrictEffectsMode;
21109
- }
21110
- }
21111
- } else {
21112
- {
21113
- mode |= StrictLegacyMode;
21162
+ mode |= StrictEffectsMode;
21114
21163
}
21115
21164
}
21165
+
21166
+ {
21167
+ mode |= ConcurrentUpdatesByDefaultMode;
21168
+ }
21116
21169
} else {
21117
21170
mode = NoMode;
21118
21171
}
@@ -21163,22 +21216,8 @@ function createFiberFromTypeAndProps(
21163
21216
break;
21164
21217
21165
21218
case REACT_STRICT_MODE_TYPE:
21166
- fiberTag = Mode; // Legacy strict mode (<StrictMode> without any level prop) defaults to level 1.
21167
-
21168
- var level =
21169
- pendingProps.unstable_level == null ? 1 : pendingProps.unstable_level; // Levels cascade; higher levels inherit all lower level modes.
21170
- // It is explicitly not supported to lower a mode with nesting, only to increase it.
21171
-
21172
- if (level >= 1) {
21173
- mode |= StrictLegacyMode;
21174
- }
21175
-
21176
- {
21177
- if (level >= 2) {
21178
- mode |= StrictEffectsMode;
21179
- }
21180
- }
21181
-
21219
+ fiberTag = Mode;
21220
+ mode |= StrictLegacyMode | StrictEffectsMode;
21182
21221
break;
21183
21222
21184
21223
case REACT_PROFILER_TYPE:
@@ -21470,12 +21509,13 @@ function createFiberRoot(
21470
21509
tag,
21471
21510
hydrate,
21472
21511
hydrationCallbacks,
21473
- strictModeLevelOverride
21512
+ isStrictMode,
21513
+ concurrentUpdatesByDefaultOverride
21474
21514
) {
21475
21515
var root = new FiberRootNode(containerInfo, tag, hydrate);
21476
21516
// stateNode is any.
21477
21517
21478
- var uninitializedFiber = createHostRootFiber(tag, strictModeLevelOverride );
21518
+ var uninitializedFiber = createHostRootFiber(tag, isStrictMode );
21479
21519
root.current = uninitializedFiber;
21480
21520
uninitializedFiber.stateNode = root;
21481
21521
@@ -21613,14 +21653,15 @@ function createContainer(
21613
21653
tag,
21614
21654
hydrate,
21615
21655
hydrationCallbacks,
21616
- strictModeLevelOverride
21656
+ isStrictMode,
21657
+ concurrentUpdatesByDefaultOverride
21617
21658
) {
21618
21659
return createFiberRoot(
21619
21660
containerInfo,
21620
21661
tag,
21621
21662
hydrate,
21622
21663
hydrationCallbacks,
21623
- strictModeLevelOverride
21664
+ isStrictMode
21624
21665
);
21625
21666
}
21626
21667
function updateContainer(element, container, parentComponent, callback) {
@@ -22385,7 +22426,7 @@ function render(element, containerTag, callback) {
22385
22426
if (!root) {
22386
22427
// TODO (bvaughn): If we decide to keep the wrapper component,
22387
22428
// We could create a wrapper for containerTag as well to reduce special casing.
22388
- root = createContainer(containerTag, LegacyRoot, false, null, null );
22429
+ root = createContainer(containerTag, LegacyRoot, false, null, false );
22389
22430
roots.set(containerTag, root);
22390
22431
}
22391
22432
0 commit comments