From 10b9308eb9145c3d47e0d7e40c1c6d30a1c5eca8 Mon Sep 17 00:00:00 2001 From: Andrei Shikov Date: Tue, 11 May 2021 11:18:54 -0700 Subject: [PATCH] React Native sync for revisions 2a7bb41...b8fda6c Summary: This sync includes the following changes: - **[b8fda6cab](https://github.com/facebook/react/commit/b8fda6cab )**: [React Native] Set allowConcurrentByDefault = true ([#21491](https://github.com/facebook/react/pull/21491)) //// - **[1bb8987cc](https://github.com/facebook/react/commit/1bb8987cc )**: Renamed function in error log issue #21446 ([#21449](https://github.com/facebook/react/pull/21449)) //// - **[bd070eb2c](https://github.com/facebook/react/commit/bd070eb2c )**: Enable setJSResponder/setIsJSResponder for React Native Fabric ([#21439](https://github.com/facebook/react/pull/21439)) //// - **[e9a4a44aa](https://github.com/facebook/react/commit/e9a4a44aa )**: Add back root override for strict mode ([#21428](https://github.com/facebook/react/pull/21428)) //// - **[d1542de3a](https://github.com/facebook/react/commit/d1542de3a )**: Unify React.memo and React.forwardRef display name logic ([#21392](https://github.com/facebook/react/pull/21392)) //// - **[9a130e1de](https://github.com/facebook/react/commit/9a130e1de )**: StrictMode includes strict effects by default ([#21418](https://github.com/facebook/react/pull/21418)) //// - **[15fb8c304](https://github.com/facebook/react/commit/15fb8c304 )**: createRoot API is no longer strict by default ([#21417](https://github.com/facebook/react/pull/21417)) //// - **[aea7c2aab](https://github.com/facebook/react/commit/aea7c2aab )**: Re-land "Support nesting of startTransition and flushSync (alt) ([#21149](https://github.com/facebook/react/pull/21149))" //// - **[bacc87068](https://github.com/facebook/react/commit/bacc87068 )**: Re-land "Flush discrete passive effects before paint ([#21150](https://github.com/facebook/react/pull/21150))" //// - **[098600c42](https://github.com/facebook/react/commit/098600c42 )**: Re-land "Fix: flushSync changes priority inside effect ([#21122](https://github.com/facebook/react/pull/21122))" //// - **[df420bc0a](https://github.com/facebook/react/commit/df420bc0a )**: Re-land "Delete LanePriority type ([#21090](https://github.com/facebook/react/pull/21090))" //// - **[ab5b37927](https://github.com/facebook/react/commit/ab5b37927 )**: Re-land "Clean up host pointers in level 2 of clean-up flag ([#21112](https://github.com/facebook/react/pull/21112))" //// - **[fd907c1f1](https://github.com/facebook/react/commit/fd907c1f1 )**: Re-land "Use highest priority lane to detect interruptions ([#21088](https://github.com/facebook/react/pull/21088))"" //// - **[269dd6ec5](https://github.com/facebook/react/commit/269dd6ec5 )**: subtreeFlag warning: Fix legacy suspense false positive ([#21388](https://github.com/facebook/react/pull/21388)) //// - **[9e9dac650](https://github.com/facebook/react/commit/9e9dac650 )**: Add unstable_concurrentUpdatesByDefault ([#21227](https://github.com/facebook/react/pull/21227)) //// - **[86f3385d9](https://github.com/facebook/react/commit/86f3385d9 )**: Revert "Use highest priority lane to detect interruptions ([#21088](https://github.com/facebook/react/pull/21088))" //// - **[c6702656f](https://github.com/facebook/react/commit/c6702656f )**: Revert "Clean up host pointers in level 2 of clean-up flag ([#21112](https://github.com/facebook/react/pull/21112))" //// - **[1bd41c664](https://github.com/facebook/react/commit/1bd41c664 )**: Revert "Delete LanePriority type ([#21090](https://github.com/facebook/react/pull/21090))" //// - **[e7e0a90bd](https://github.com/facebook/react/commit/e7e0a90bd )**: Revert "Fix: flushSync changes priority inside effect ([#21122](https://github.com/facebook/react/pull/21122))" //// - **[7bac7607a](https://github.com/facebook/react/commit/7bac7607a )**: Revert "Flush discrete passive effects before paint ([#21150](https://github.com/facebook/react/pull/21150))" //// - **[207d4c3a5](https://github.com/facebook/react/commit/207d4c3a5 )**: Revert "Support nesting of startTransition and flushSync (alt) ([#21149](https://github.com/facebook/react/pull/21149))" //// Changelog: [General][Changed] - React Native sync for revisions 2a7bb41...b8fda6c jest_e2e[run_all_tests] Reviewed By: yungsters Differential Revision: D28351439 fbshipit-source-id: 29620f96c9fb9f02b0d856111d3882d3c69fd1c5 --- Libraries/Renderer/REVISION | 2 +- .../implementations/ReactFabric-dev.fb.js | 171 +++++++++++------- .../implementations/ReactFabric-dev.js | 155 +++++++++------- .../implementations/ReactFabric-prod.fb.js | 118 +++++++----- .../implementations/ReactFabric-prod.js | 81 +++++---- .../ReactFabric-profiling.fb.js | 118 +++++++----- .../implementations/ReactFabric-profiling.js | 81 +++++---- .../ReactNativeRenderer-dev.fb.js | 150 ++++++++------- .../ReactNativeRenderer-dev.js | 134 +++++++------- .../ReactNativeRenderer-prod.fb.js | 89 +++++---- .../ReactNativeRenderer-prod.js | 52 +++--- .../ReactNativeRenderer-profiling.fb.js | 89 +++++---- .../ReactNativeRenderer-profiling.js | 52 +++--- 13 files changed, 743 insertions(+), 549 deletions(-) diff --git a/Libraries/Renderer/REVISION b/Libraries/Renderer/REVISION index b96667b908e3af..13340e04258d5f 100644 --- a/Libraries/Renderer/REVISION +++ b/Libraries/Renderer/REVISION @@ -1 +1 @@ -2a7bb4154809f1f4e17ffbdde1342bd4ce91ea37 \ No newline at end of file +b8fda6cabc7efc53356d87c6516d6a3d7eb1253c \ No newline at end of file diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index 13168357caa799..f58fb300433bb1 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<8974e8c964125552d627281e52405ecc>> */ 'use strict'; @@ -2515,8 +2515,25 @@ var ReactFabricGlobalResponderHandler = { fromOrToStateNode && fromOrToStateNode.canonical._internalInstanceHandle ); - if (isFabric); - else { + if (isFabric) { + if (from) { + // equivalent to clearJSResponder + nativeFabricUIManager.setIsJSResponder( + from.stateNode.node, + false, + blockNativeResponder || false + ); + } + + if (to) { + // equivalent to setJSResponder + nativeFabricUIManager.setIsJSResponder( + to.stateNode.node, + true, + blockNativeResponder || false + ); + } + } else { if (to !== null) { var tag = to.stateNode.canonical._nativeTag; ReactNativePrivateInterface.UIManager.setJSResponder( @@ -2620,11 +2637,16 @@ function getIteratorFn(maybeIterable) { } function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; - return ( - outerType.displayName || - (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName) - ); + return functionName !== "" + ? wrapperName + "(" + functionName + ")" + : wrapperName; } // Keep in sync with react-reconciler/getComponentNameFromFiber function getContextName(type) { @@ -2640,7 +2662,7 @@ function getComponentNameFromType(type) { { if (typeof type.tag === "number") { error( - "Received an unexpected object in getComponentName(). " + + "Received an unexpected object in getComponentNameFromType(). " + "This is likely a bug in React. Please file an issue." ); } @@ -2691,7 +2713,13 @@ function getComponentNameFromType(type) { return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); + var outerName = type.displayName || null; + + if (outerName !== null) { + return outerName; + } + + return getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type; @@ -4009,6 +4037,29 @@ function onCommitUnmount(fiber) { } } +var NoMode = + /* */ + 0; // TODO: Remove ConcurrentMode by reading from the root tag instead + +var ConcurrentMode = + /* */ + 1; +var ProfileMode = + /* */ + 2; +var DebugTracingMode = + /* */ + 4; +var StrictLegacyMode = + /* */ + 8; +var StrictEffectsMode = + /* */ + 16; +var ConcurrentUpdatesByDefaultMode = + /* */ + 32; + // If those values are changed that package should be rebuilt and redeployed. var TotalLanes = 31; @@ -4260,6 +4311,15 @@ function getNextLanes(root, wipLanes) { return wipLanes; } } + + if ((root.current.mode & ConcurrentUpdatesByDefaultMode) !== NoMode); + else if ((nextLanes & InputContinuousLane) !== NoLanes) { + // When updates are sync by default, we entangle continuous priority updates + // and default updates, so they render in the same batch. The only reason + // they use separate lanes is because continuous updates should interrupt + // transitions, but default updates should not. + nextLanes |= pendingLanes & DefaultLane; + } // Check for entangled lanes and add them to the batch. // // A lane is said to be entangled with another when it's not allowed to render // in a batch that does not also include the other lane. Typically we do this @@ -4448,9 +4508,17 @@ function shouldTimeSlice(root, lanes) { return false; } - { + if ((root.current.mode & ConcurrentUpdatesByDefaultMode) !== NoMode) { + // Concurrent updates by default always use time slicing. return true; } + + var SyncDefaultLanes = + InputContinuousHydrationLane | + InputContinuousLane | + DefaultHydrationLane | + DefaultLane; + return (lanes & SyncDefaultLanes) === NoLanes; } function isTransitionLane(lane) { return (lane & TransitionLanes) !== 0; @@ -5744,27 +5812,7 @@ var Passive$1 = /* */ 4; -var ReactVersion = "17.0.3-2a7bb4154"; - -var NoMode = - /* */ - 0; // TODO: Remove ConcurrentMode by reading from the root tag instead - -var ConcurrentMode = - /* */ - 1; -var ProfileMode = - /* */ - 2; -var DebugTracingMode = - /* */ - 4; -var StrictLegacyMode = - /* */ - 8; -var StrictEffectsMode = - /* */ - 16; +var ReactVersion = "17.0.3-b8fda6cab"; var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; var NoTransition = 0; @@ -10148,7 +10196,12 @@ function renderWithHooks( if ( current !== null && - (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) + (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird + // and creates false positives. To make this work in legacy mode, we'd + // need to mark fibers that commit in an incomplete state, somehow. For + // now I'll disable the warning that most of the bugs that would trigger + // it are either exclusive to concurrent mode or exist in both. + (current.mode & ConcurrentMode) !== NoMode ) { error( "Internal React error: Expected static flag was missing. Please " + @@ -21092,27 +21145,27 @@ function resetWorkInProgress(workInProgress, renderLanes) { return workInProgress; } -function createHostRootFiber(tag, strictModeLevelOverride) { +function createHostRootFiber( + tag, + isStrictMode, + concurrentUpdatesByDefaultOverride +) { var mode; if (tag === ConcurrentRoot) { mode = ConcurrentMode; - if (strictModeLevelOverride !== null) { - if (strictModeLevelOverride >= 1) { - mode |= StrictLegacyMode; - } + if (isStrictMode === true) { + mode |= StrictLegacyMode; { - if (strictModeLevelOverride >= 2) { - mode |= StrictEffectsMode; - } - } - } else { - { - mode |= StrictLegacyMode; + mode |= StrictEffectsMode; } } + + { + mode |= ConcurrentUpdatesByDefaultMode; + } } else { mode = NoMode; } @@ -21163,22 +21216,8 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: - fiberTag = Mode; // Legacy strict mode ( without any level prop) defaults to level 1. - - var level = - pendingProps.unstable_level == null ? 1 : pendingProps.unstable_level; // Levels cascade; higher levels inherit all lower level modes. - // It is explicitly not supported to lower a mode with nesting, only to increase it. - - if (level >= 1) { - mode |= StrictLegacyMode; - } - - { - if (level >= 2) { - mode |= StrictEffectsMode; - } - } - + fiberTag = Mode; + mode |= StrictLegacyMode | StrictEffectsMode; break; case REACT_PROFILER_TYPE: @@ -21470,12 +21509,13 @@ function createFiberRoot( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { var root = new FiberRootNode(containerInfo, tag, hydrate); // stateNode is any. - var uninitializedFiber = createHostRootFiber(tag, strictModeLevelOverride); + var uninitializedFiber = createHostRootFiber(tag, isStrictMode); root.current = uninitializedFiber; uninitializedFiber.stateNode = root; @@ -21613,14 +21653,15 @@ function createContainer( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { return createFiberRoot( containerInfo, tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode ); } function updateContainer(element, container, parentComponent, callback) { @@ -22385,7 +22426,7 @@ function render(element, containerTag, callback) { if (!root) { // TODO (bvaughn): If we decide to keep the wrapper component, // We could create a wrapper for containerTag as well to reduce special casing. - root = createContainer(containerTag, LegacyRoot, false, null, null); + root = createContainer(containerTag, LegacyRoot, false, null, false); roots.set(containerTag, root); } diff --git a/Libraries/Renderer/implementations/ReactFabric-dev.js b/Libraries/Renderer/implementations/ReactFabric-dev.js index 34f5935d37270b..035ca80bc2f0ad 100644 --- a/Libraries/Renderer/implementations/ReactFabric-dev.js +++ b/Libraries/Renderer/implementations/ReactFabric-dev.js @@ -8,7 +8,7 @@ * @nolint * @providesModule ReactFabric-dev * @preventMunge - * @generated SignedSource<<91d83bccddacf5f66e76dba78c2eb920>> + * @generated SignedSource<<0b8cd409f26ccc8dbab26e2f700f6c68>> */ 'use strict'; @@ -2516,8 +2516,25 @@ var ReactFabricGlobalResponderHandler = { fromOrToStateNode && fromOrToStateNode.canonical._internalInstanceHandle ); - if (isFabric); - else { + if (isFabric) { + if (from) { + // equivalent to clearJSResponder + nativeFabricUIManager.setIsJSResponder( + from.stateNode.node, + false, + blockNativeResponder || false + ); + } + + if (to) { + // equivalent to setJSResponder + nativeFabricUIManager.setIsJSResponder( + to.stateNode.node, + true, + blockNativeResponder || false + ); + } + } else { if (to !== null) { var tag = to.stateNode.canonical._nativeTag; ReactNativePrivateInterface.UIManager.setJSResponder( @@ -2621,11 +2638,16 @@ function getIteratorFn(maybeIterable) { } function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; - return ( - outerType.displayName || - (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName) - ); + return functionName !== "" + ? wrapperName + "(" + functionName + ")" + : wrapperName; } // Keep in sync with react-reconciler/getComponentNameFromFiber function getContextName(type) { @@ -2641,7 +2663,7 @@ function getComponentNameFromType(type) { { if (typeof type.tag === "number") { error( - "Received an unexpected object in getComponentName(). " + + "Received an unexpected object in getComponentNameFromType(). " + "This is likely a bug in React. Please file an issue." ); } @@ -2692,7 +2714,13 @@ function getComponentNameFromType(type) { return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); + var outerName = type.displayName || null; + + if (outerName !== null) { + return outerName; + } + + return getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type; @@ -4000,6 +4028,26 @@ function onCommitUnmount(fiber) { } } +var NoMode = + /* */ + 0; // TODO: Remove ConcurrentMode by reading from the root tag instead + +var ConcurrentMode = + /* */ + 1; +var ProfileMode = + /* */ + 2; +var DebugTracingMode = + /* */ + 4; +var StrictLegacyMode = + /* */ + 8; +var StrictEffectsMode = + /* */ + 16; + // If those values are changed that package should be rebuilt and redeployed. var TotalLanes = 31; @@ -4252,12 +4300,8 @@ function getNextLanes(root, wipLanes) { } } - if ( - // TODO: Check for root override, once that lands - (nextLanes & InputContinuousLane) !== - NoLanes - ) { - // When updates are sync by default, we entangle continous priority updates + if ((nextLanes & InputContinuousLane) !== NoLanes) { + // When updates are sync by default, we entangle continuous priority updates // and default updates, so they render in the same batch. The only reason // they use separate lanes is because continuous updates should interrupt // transitions, but default updates should not. @@ -4451,15 +4495,12 @@ function shouldTimeSlice(root, lanes) { return false; } - { - var SyncDefaultLanes = - InputContinuousHydrationLane | - InputContinuousLane | - DefaultHydrationLane | - DefaultLane; // TODO: Check for root override, once that lands - - return (lanes & SyncDefaultLanes) === NoLanes; - } + var SyncDefaultLanes = + InputContinuousHydrationLane | + InputContinuousLane | + DefaultHydrationLane | + DefaultLane; + return (lanes & SyncDefaultLanes) === NoLanes; } function isTransitionLane(lane) { return (lane & TransitionLanes) !== 0; @@ -5656,24 +5697,7 @@ var Passive$1 = /* */ 4; -var ReactVersion = "17.0.3-2a7bb4154"; - -var NoMode = - /* */ - 0; // TODO: Remove ConcurrentMode by reading from the root tag instead - -var ConcurrentMode = - /* */ - 1; -var ProfileMode = - /* */ - 2; -var DebugTracingMode = - /* */ - 4; -var StrictLegacyMode = - /* */ - 8; +var ReactVersion = "17.0.3-b8fda6cab"; var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; var NoTransition = 0; @@ -9979,7 +10003,12 @@ function renderWithHooks( if ( current !== null && - (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) + (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird + // and creates false positives. To make this work in legacy mode, we'd + // need to mark fibers that commit in an incomplete state, somehow. For + // now I'll disable the warning that most of the bugs that would trigger + // it are either exclusive to concurrent mode or exist in both. + (current.mode & ConcurrentMode) !== NoMode ) { error( "Internal React error: Expected static flag was missing. Please " + @@ -20612,20 +20641,18 @@ function resetWorkInProgress(workInProgress, renderLanes) { return workInProgress; } -function createHostRootFiber(tag, strictModeLevelOverride) { +function createHostRootFiber( + tag, + isStrictMode, + concurrentUpdatesByDefaultOverride +) { var mode; if (tag === ConcurrentRoot) { mode = ConcurrentMode; - if (strictModeLevelOverride !== null) { - if (strictModeLevelOverride >= 1) { - mode |= StrictLegacyMode; - } - } else { - { - mode |= StrictLegacyMode; - } + if (isStrictMode === true) { + mode |= StrictLegacyMode; } } else { mode = NoMode; @@ -20677,16 +20704,8 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: - fiberTag = Mode; // Legacy strict mode ( without any level prop) defaults to level 1. - - var level = - pendingProps.unstable_level == null ? 1 : pendingProps.unstable_level; // Levels cascade; higher levels inherit all lower level modes. - // It is explicitly not supported to lower a mode with nesting, only to increase it. - - if (level >= 1) { - mode |= StrictLegacyMode; - } - + fiberTag = Mode; + mode |= StrictLegacyMode | StrictEffectsMode; break; case REACT_PROFILER_TYPE: @@ -20978,12 +20997,13 @@ function createFiberRoot( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { var root = new FiberRootNode(containerInfo, tag, hydrate); // stateNode is any. - var uninitializedFiber = createHostRootFiber(tag, strictModeLevelOverride); + var uninitializedFiber = createHostRootFiber(tag, isStrictMode); root.current = uninitializedFiber; uninitializedFiber.stateNode = root; @@ -21121,14 +21141,15 @@ function createContainer( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { return createFiberRoot( containerInfo, tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode ); } function updateContainer(element, container, parentComponent, callback) { @@ -21893,7 +21914,7 @@ function render(element, containerTag, callback) { if (!root) { // TODO (bvaughn): If we decide to keep the wrapper component, // We could create a wrapper for containerTag as well to reduce special casing. - root = createContainer(containerTag, LegacyRoot, false, null, null); + root = createContainer(containerTag, LegacyRoot, false, null, false); roots.set(containerTag, root); } diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 19c80d8aefd3a2..871cfffe9c8410 100644 --- a/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<162e8fe0b21fb97be1e9fa859e58204d>> + * @generated SignedSource<<2dc7c402c6aee869836656b83828b0a5>> */ "use strict"; @@ -1007,14 +1007,27 @@ getNodeFromInstance = function(inst) { }; ResponderEventPlugin.injection.injectGlobalResponderHandler({ onChange: function(from, to, blockNativeResponder) { - ((from = (from = from || to) && from.stateNode) && - from.canonical._internalInstanceHandle) || - (null !== to - ? ReactNativePrivateInterface.UIManager.setJSResponder( - to.stateNode.canonical._nativeTag, - blockNativeResponder - ) - : ReactNativePrivateInterface.UIManager.clearJSResponder()); + var fromOrTo = from || to; + (fromOrTo = fromOrTo && fromOrTo.stateNode) && + fromOrTo.canonical._internalInstanceHandle + ? (from && + nativeFabricUIManager.setIsJSResponder( + from.stateNode.node, + !1, + blockNativeResponder || !1 + ), + to && + nativeFabricUIManager.setIsJSResponder( + to.stateNode.node, + !0, + blockNativeResponder || !1 + )) + : null !== to + ? ReactNativePrivateInterface.UIManager.setJSResponder( + to.stateNode.canonical._nativeTag, + blockNativeResponder + ) + : ReactNativePrivateInterface.UIManager.clearJSResponder(); } }); var ReactSharedInternals = @@ -1091,13 +1104,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -1673,18 +1691,19 @@ function getNextLanes(root, wipLanes) { suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes, nonIdlePendingLanes = pendingLanes & 268435455; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + if (0 !== nonIdlePendingLanes) { + var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes; + 0 !== nonIdleUnblockedLanes + ? (nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))); + } else + (nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))); + (nextLanes = getHighestPriorityLanes(pingedLanes)); if (0 === nextLanes) return 0; if ( 0 !== wipLanes && @@ -1696,13 +1715,16 @@ function getNextLanes(root, wipLanes) { (16 === suspendedLanes && 0 !== (pingedLanes & 4194240))) ) return wipLanes; + 0 === (root.current.mode & 32) && + 0 !== (nextLanes & 4) && + (nextLanes |= pendingLanes & 16); wipLanes = root.entangledLanes; if (0 !== wipLanes) for (root = root.entanglements, wipLanes &= nextLanes; 0 < wipLanes; ) - (suspendedLanes = 31 - clz32(wipLanes)), - (pingedLanes = 1 << suspendedLanes), - (nextLanes |= root[suspendedLanes]), - (wipLanes &= ~pingedLanes); + (pendingLanes = 31 - clz32(wipLanes)), + (suspendedLanes = 1 << pendingLanes), + (nextLanes |= root[pendingLanes]), + (wipLanes &= ~suspendedLanes); return nextLanes; } function computeExpirationTime(lane, currentTime) { @@ -6109,7 +6131,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { root === workInProgressRoot ? workInProgressRootRenderLanes : 0 ); if (0 === lanes) return null; - var JSCompiler_inline_result = 0 !== (lanes & root.expiredLanes) ? !1 : !0; + var JSCompiler_inline_result = + 0 !== (lanes & root.expiredLanes) + ? !1 + : 0 !== (root.current.mode & 32) + ? !0 + : 0 === (lanes & 30); if (JSCompiler_inline_result && !didTimeout) { didTimeout = lanes; JSCompiler_inline_result = executionContext; @@ -7519,10 +7546,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -7744,10 +7768,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_940 = { + devToolsConfig$jscomp$inline_942 = { findFiberByHostInstance: getInstanceFromInstance, bundleType: 0, - version: "17.0.3-2a7bb4154", + version: "17.0.3-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -7762,11 +7786,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1178 = { - bundleType: devToolsConfig$jscomp$inline_940.bundleType, - version: devToolsConfig$jscomp$inline_940.version, - rendererPackageName: devToolsConfig$jscomp$inline_940.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_940.rendererConfig, +var internals$jscomp$inline_1180 = { + bundleType: devToolsConfig$jscomp$inline_942.bundleType, + version: devToolsConfig$jscomp$inline_942.version, + rendererPackageName: devToolsConfig$jscomp$inline_942.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_942.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -7781,26 +7805,26 @@ var internals$jscomp$inline_1178 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_940.findFiberByHostInstance || + devToolsConfig$jscomp$inline_942.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-2a7bb4154" + reconcilerVersion: "17.0.3-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1179 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1181 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1179.isDisabled && - hook$jscomp$inline_1179.supportsFiber + !hook$jscomp$inline_1181.isDisabled && + hook$jscomp$inline_1181.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1179.inject( - internals$jscomp$inline_1178 + (rendererID = hook$jscomp$inline_1181.inject( + internals$jscomp$inline_1180 )), - (injectedHook = hook$jscomp$inline_1179); + (injectedHook = hook$jscomp$inline_1181); } catch (err) {} } exports.createPortal = function(children, containerTag) { diff --git a/Libraries/Renderer/implementations/ReactFabric-prod.js b/Libraries/Renderer/implementations/ReactFabric-prod.js index b2c1540be76588..e498f78dd5aa14 100644 --- a/Libraries/Renderer/implementations/ReactFabric-prod.js +++ b/Libraries/Renderer/implementations/ReactFabric-prod.js @@ -8,7 +8,7 @@ * @nolint * @providesModule ReactFabric-prod * @preventMunge - * @generated SignedSource<<73c8a64b90ccdf69b1db99ffeefc7603>> + * @generated SignedSource<<13b77909c1b0f4c0d620f64b4cb52c31>> */ "use strict"; @@ -1008,14 +1008,27 @@ getNodeFromInstance = function(inst) { }; ResponderEventPlugin.injection.injectGlobalResponderHandler({ onChange: function(from, to, blockNativeResponder) { - ((from = (from = from || to) && from.stateNode) && - from.canonical._internalInstanceHandle) || - (null !== to - ? ReactNativePrivateInterface.UIManager.setJSResponder( - to.stateNode.canonical._nativeTag, - blockNativeResponder - ) - : ReactNativePrivateInterface.UIManager.clearJSResponder()); + var fromOrTo = from || to; + (fromOrTo = fromOrTo && fromOrTo.stateNode) && + fromOrTo.canonical._internalInstanceHandle + ? (from && + nativeFabricUIManager.setIsJSResponder( + from.stateNode.node, + !1, + blockNativeResponder || !1 + ), + to && + nativeFabricUIManager.setIsJSResponder( + to.stateNode.node, + !0, + blockNativeResponder || !1 + )) + : null !== to + ? ReactNativePrivateInterface.UIManager.setJSResponder( + to.stateNode.canonical._nativeTag, + blockNativeResponder + ) + : ReactNativePrivateInterface.UIManager.clearJSResponder(); } }); var ReactSharedInternals = @@ -1092,13 +1105,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -7523,10 +7541,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -7748,10 +7763,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_941 = { + devToolsConfig$jscomp$inline_942 = { findFiberByHostInstance: getInstanceFromInstance, bundleType: 0, - version: "17.0.3-experimental-2a7bb4154", + version: "17.0.3-experimental-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -7766,11 +7781,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1179 = { - bundleType: devToolsConfig$jscomp$inline_941.bundleType, - version: devToolsConfig$jscomp$inline_941.version, - rendererPackageName: devToolsConfig$jscomp$inline_941.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_941.rendererConfig, +var internals$jscomp$inline_1180 = { + bundleType: devToolsConfig$jscomp$inline_942.bundleType, + version: devToolsConfig$jscomp$inline_942.version, + rendererPackageName: devToolsConfig$jscomp$inline_942.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_942.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -7785,26 +7800,26 @@ var internals$jscomp$inline_1179 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_941.findFiberByHostInstance || + devToolsConfig$jscomp$inline_942.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-experimental-2a7bb4154" + reconcilerVersion: "17.0.3-experimental-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1180 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1181 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1180.isDisabled && - hook$jscomp$inline_1180.supportsFiber + !hook$jscomp$inline_1181.isDisabled && + hook$jscomp$inline_1181.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1180.inject( - internals$jscomp$inline_1179 + (rendererID = hook$jscomp$inline_1181.inject( + internals$jscomp$inline_1180 )), - (injectedHook = hook$jscomp$inline_1180); + (injectedHook = hook$jscomp$inline_1181); } catch (err) {} } exports.createPortal = function(children, containerTag) { diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index c53386398d1e46..4432ac450c54a3 100644 --- a/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<3af5433de7d35648e98b087381c1ce59>> + * @generated SignedSource<> */ "use strict"; @@ -1007,14 +1007,27 @@ getNodeFromInstance = function(inst) { }; ResponderEventPlugin.injection.injectGlobalResponderHandler({ onChange: function(from, to, blockNativeResponder) { - ((from = (from = from || to) && from.stateNode) && - from.canonical._internalInstanceHandle) || - (null !== to - ? ReactNativePrivateInterface.UIManager.setJSResponder( - to.stateNode.canonical._nativeTag, - blockNativeResponder - ) - : ReactNativePrivateInterface.UIManager.clearJSResponder()); + var fromOrTo = from || to; + (fromOrTo = fromOrTo && fromOrTo.stateNode) && + fromOrTo.canonical._internalInstanceHandle + ? (from && + nativeFabricUIManager.setIsJSResponder( + from.stateNode.node, + !1, + blockNativeResponder || !1 + ), + to && + nativeFabricUIManager.setIsJSResponder( + to.stateNode.node, + !0, + blockNativeResponder || !1 + )) + : null !== to + ? ReactNativePrivateInterface.UIManager.setJSResponder( + to.stateNode.canonical._nativeTag, + blockNativeResponder + ) + : ReactNativePrivateInterface.UIManager.clearJSResponder(); } }); var ReactSharedInternals = @@ -1091,13 +1104,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -1691,18 +1709,19 @@ function getNextLanes(root, wipLanes) { suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes, nonIdlePendingLanes = pendingLanes & 268435455; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + if (0 !== nonIdlePendingLanes) { + var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes; + 0 !== nonIdleUnblockedLanes + ? (nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))); + } else + (nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))); + (nextLanes = getHighestPriorityLanes(pingedLanes)); if (0 === nextLanes) return 0; if ( 0 !== wipLanes && @@ -1714,13 +1733,16 @@ function getNextLanes(root, wipLanes) { (16 === suspendedLanes && 0 !== (pingedLanes & 4194240))) ) return wipLanes; + 0 === (root.current.mode & 32) && + 0 !== (nextLanes & 4) && + (nextLanes |= pendingLanes & 16); wipLanes = root.entangledLanes; if (0 !== wipLanes) for (root = root.entanglements, wipLanes &= nextLanes; 0 < wipLanes; ) - (suspendedLanes = 31 - clz32(wipLanes)), - (pingedLanes = 1 << suspendedLanes), - (nextLanes |= root[suspendedLanes]), - (wipLanes &= ~pingedLanes); + (pendingLanes = 31 - clz32(wipLanes)), + (suspendedLanes = 1 << pendingLanes), + (nextLanes |= root[pendingLanes]), + (wipLanes &= ~suspendedLanes); return nextLanes; } function computeExpirationTime(lane, currentTime) { @@ -6223,7 +6245,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { root === workInProgressRoot ? workInProgressRootRenderLanes : 0 ); if (0 === lanes) return null; - var JSCompiler_inline_result = 0 !== (lanes & root.expiredLanes) ? !1 : !0; + var JSCompiler_inline_result = + 0 !== (lanes & root.expiredLanes) + ? !1 + : 0 !== (root.current.mode & 32) + ? !0 + : 0 === (lanes & 30); if (JSCompiler_inline_result && !didTimeout) { didTimeout = lanes; JSCompiler_inline_result = executionContext; @@ -7669,10 +7696,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -7895,10 +7919,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_964 = { + devToolsConfig$jscomp$inline_966 = { findFiberByHostInstance: getInstanceFromInstance, bundleType: 0, - version: "17.0.3-2a7bb4154", + version: "17.0.3-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -7913,11 +7937,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1206 = { - bundleType: devToolsConfig$jscomp$inline_964.bundleType, - version: devToolsConfig$jscomp$inline_964.version, - rendererPackageName: devToolsConfig$jscomp$inline_964.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_964.rendererConfig, +var internals$jscomp$inline_1208 = { + bundleType: devToolsConfig$jscomp$inline_966.bundleType, + version: devToolsConfig$jscomp$inline_966.version, + rendererPackageName: devToolsConfig$jscomp$inline_966.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_966.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -7932,26 +7956,26 @@ var internals$jscomp$inline_1206 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_964.findFiberByHostInstance || + devToolsConfig$jscomp$inline_966.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-2a7bb4154" + reconcilerVersion: "17.0.3-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1207 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1209 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1207.isDisabled && - hook$jscomp$inline_1207.supportsFiber + !hook$jscomp$inline_1209.isDisabled && + hook$jscomp$inline_1209.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1207.inject( - internals$jscomp$inline_1206 + (rendererID = hook$jscomp$inline_1209.inject( + internals$jscomp$inline_1208 )), - (injectedHook = hook$jscomp$inline_1207); + (injectedHook = hook$jscomp$inline_1209); } catch (err) {} } exports.createPortal = function(children, containerTag) { diff --git a/Libraries/Renderer/implementations/ReactFabric-profiling.js b/Libraries/Renderer/implementations/ReactFabric-profiling.js index 57070e03dc126c..b640985cabd3c5 100644 --- a/Libraries/Renderer/implementations/ReactFabric-profiling.js +++ b/Libraries/Renderer/implementations/ReactFabric-profiling.js @@ -8,7 +8,7 @@ * @nolint * @providesModule ReactFabric-profiling * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<> */ "use strict"; @@ -1008,14 +1008,27 @@ getNodeFromInstance = function(inst) { }; ResponderEventPlugin.injection.injectGlobalResponderHandler({ onChange: function(from, to, blockNativeResponder) { - ((from = (from = from || to) && from.stateNode) && - from.canonical._internalInstanceHandle) || - (null !== to - ? ReactNativePrivateInterface.UIManager.setJSResponder( - to.stateNode.canonical._nativeTag, - blockNativeResponder - ) - : ReactNativePrivateInterface.UIManager.clearJSResponder()); + var fromOrTo = from || to; + (fromOrTo = fromOrTo && fromOrTo.stateNode) && + fromOrTo.canonical._internalInstanceHandle + ? (from && + nativeFabricUIManager.setIsJSResponder( + from.stateNode.node, + !1, + blockNativeResponder || !1 + ), + to && + nativeFabricUIManager.setIsJSResponder( + to.stateNode.node, + !0, + blockNativeResponder || !1 + )) + : null !== to + ? ReactNativePrivateInterface.UIManager.setJSResponder( + to.stateNode.canonical._nativeTag, + blockNativeResponder + ) + : ReactNativePrivateInterface.UIManager.clearJSResponder(); } }); var ReactSharedInternals = @@ -1092,13 +1105,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -7673,10 +7691,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -7899,10 +7914,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_965 = { + devToolsConfig$jscomp$inline_966 = { findFiberByHostInstance: getInstanceFromInstance, bundleType: 0, - version: "17.0.3-experimental-2a7bb4154", + version: "17.0.3-experimental-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -7917,11 +7932,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1207 = { - bundleType: devToolsConfig$jscomp$inline_965.bundleType, - version: devToolsConfig$jscomp$inline_965.version, - rendererPackageName: devToolsConfig$jscomp$inline_965.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_965.rendererConfig, +var internals$jscomp$inline_1208 = { + bundleType: devToolsConfig$jscomp$inline_966.bundleType, + version: devToolsConfig$jscomp$inline_966.version, + rendererPackageName: devToolsConfig$jscomp$inline_966.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_966.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -7936,26 +7951,26 @@ var internals$jscomp$inline_1207 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_965.findFiberByHostInstance || + devToolsConfig$jscomp$inline_966.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-experimental-2a7bb4154" + reconcilerVersion: "17.0.3-experimental-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1208 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1209 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1208.isDisabled && - hook$jscomp$inline_1208.supportsFiber + !hook$jscomp$inline_1209.isDisabled && + hook$jscomp$inline_1209.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1208.inject( - internals$jscomp$inline_1207 + (rendererID = hook$jscomp$inline_1209.inject( + internals$jscomp$inline_1208 )), - (injectedHook = hook$jscomp$inline_1208); + (injectedHook = hook$jscomp$inline_1209); } catch (err) {} } exports.createPortal = function(children, containerTag) { diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index 785ad03a26c044..44974a5b22df1c 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<9ed67b3272b99880d9584ed24f7f2d25>> + * @generated SignedSource<<8033e694383dc0dfd8e2862436d6a7f5>> */ 'use strict'; @@ -2927,11 +2927,16 @@ function getIteratorFn(maybeIterable) { } function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; - return ( - outerType.displayName || - (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName) - ); + return functionName !== "" + ? wrapperName + "(" + functionName + ")" + : wrapperName; } // Keep in sync with react-reconciler/getComponentNameFromFiber function getContextName(type) { @@ -2947,7 +2952,7 @@ function getComponentNameFromType(type) { { if (typeof type.tag === "number") { error( - "Received an unexpected object in getComponentName(). " + + "Received an unexpected object in getComponentNameFromType(). " + "This is likely a bug in React. Please file an issue." ); } @@ -2998,7 +3003,13 @@ function getComponentNameFromType(type) { return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); + var outerName = type.displayName || null; + + if (outerName !== null) { + return outerName; + } + + return getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type; @@ -4269,6 +4280,29 @@ function onCommitUnmount(fiber) { } } +var NoMode = + /* */ + 0; // TODO: Remove ConcurrentMode by reading from the root tag instead + +var ConcurrentMode = + /* */ + 1; +var ProfileMode = + /* */ + 2; +var DebugTracingMode = + /* */ + 4; +var StrictLegacyMode = + /* */ + 8; +var StrictEffectsMode = + /* */ + 16; +var ConcurrentUpdatesByDefaultMode = + /* */ + 32; + // If those values are changed that package should be rebuilt and redeployed. var TotalLanes = 31; @@ -4520,6 +4554,15 @@ function getNextLanes(root, wipLanes) { return wipLanes; } } + + if ((root.current.mode & ConcurrentUpdatesByDefaultMode) !== NoMode); + else if ((nextLanes & InputContinuousLane) !== NoLanes) { + // When updates are sync by default, we entangle continuous priority updates + // and default updates, so they render in the same batch. The only reason + // they use separate lanes is because continuous updates should interrupt + // transitions, but default updates should not. + nextLanes |= pendingLanes & DefaultLane; + } // Check for entangled lanes and add them to the batch. // // A lane is said to be entangled with another when it's not allowed to render // in a batch that does not also include the other lane. Typically we do this @@ -4708,9 +4751,17 @@ function shouldTimeSlice(root, lanes) { return false; } - { + if ((root.current.mode & ConcurrentUpdatesByDefaultMode) !== NoMode) { + // Concurrent updates by default always use time slicing. return true; } + + var SyncDefaultLanes = + InputContinuousHydrationLane | + InputContinuousLane | + DefaultHydrationLane | + DefaultLane; + return (lanes & SyncDefaultLanes) === NoLanes; } function isTransitionLane(lane) { return (lane & TransitionLanes) !== 0; @@ -6049,27 +6100,7 @@ var Passive$1 = /* */ 4; -var ReactVersion = "17.0.3-2a7bb4154"; - -var NoMode = - /* */ - 0; // TODO: Remove ConcurrentMode by reading from the root tag instead - -var ConcurrentMode = - /* */ - 1; -var ProfileMode = - /* */ - 2; -var DebugTracingMode = - /* */ - 4; -var StrictLegacyMode = - /* */ - 8; -var StrictEffectsMode = - /* */ - 16; +var ReactVersion = "17.0.3-b8fda6cab"; var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; var NoTransition = 0; @@ -10453,7 +10484,12 @@ function renderWithHooks( if ( current !== null && - (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) + (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird + // and creates false positives. To make this work in legacy mode, we'd + // need to mark fibers that commit in an incomplete state, somehow. For + // now I'll disable the warning that most of the bugs that would trigger + // it are either exclusive to concurrent mode or exist in both. + (current.mode & ConcurrentMode) !== NoMode ) { error( "Internal React error: Expected static flag was missing. Please " + @@ -21700,27 +21736,27 @@ function resetWorkInProgress(workInProgress, renderLanes) { return workInProgress; } -function createHostRootFiber(tag, strictModeLevelOverride) { +function createHostRootFiber( + tag, + isStrictMode, + concurrentUpdatesByDefaultOverride +) { var mode; if (tag === ConcurrentRoot) { mode = ConcurrentMode; - if (strictModeLevelOverride !== null) { - if (strictModeLevelOverride >= 1) { - mode |= StrictLegacyMode; - } + if (isStrictMode === true) { + mode |= StrictLegacyMode; { - if (strictModeLevelOverride >= 2) { - mode |= StrictEffectsMode; - } - } - } else { - { - mode |= StrictLegacyMode; + mode |= StrictEffectsMode; } } + + { + mode |= ConcurrentUpdatesByDefaultMode; + } } else { mode = NoMode; } @@ -21771,22 +21807,8 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: - fiberTag = Mode; // Legacy strict mode ( without any level prop) defaults to level 1. - - var level = - pendingProps.unstable_level == null ? 1 : pendingProps.unstable_level; // Levels cascade; higher levels inherit all lower level modes. - // It is explicitly not supported to lower a mode with nesting, only to increase it. - - if (level >= 1) { - mode |= StrictLegacyMode; - } - - { - if (level >= 2) { - mode |= StrictEffectsMode; - } - } - + fiberTag = Mode; + mode |= StrictLegacyMode | StrictEffectsMode; break; case REACT_PROFILER_TYPE: @@ -22078,12 +22100,13 @@ function createFiberRoot( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { var root = new FiberRootNode(containerInfo, tag, hydrate); // stateNode is any. - var uninitializedFiber = createHostRootFiber(tag, strictModeLevelOverride); + var uninitializedFiber = createHostRootFiber(tag, isStrictMode); root.current = uninitializedFiber; uninitializedFiber.stateNode = root; @@ -22221,14 +22244,15 @@ function createContainer( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { return createFiberRoot( containerInfo, tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode ); } function updateContainer(element, container, parentComponent, callback) { @@ -22985,7 +23009,7 @@ function render(element, containerTag, callback) { if (!root) { // TODO (bvaughn): If we decide to keep the wrapper component, // We could create a wrapper for containerTag as well to reduce special casing. - root = createContainer(containerTag, LegacyRoot, false, null, null); + root = createContainer(containerTag, LegacyRoot, false, null, false); roots.set(containerTag, root); } diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js index 24826602ffe8e7..cb403b72b203e0 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js @@ -8,7 +8,7 @@ * @nolint * @providesModule ReactNativeRenderer-dev * @preventMunge - * @generated SignedSource<<4866569f7b25f2bac582b603d23f6555>> + * @generated SignedSource<> */ 'use strict'; @@ -2928,11 +2928,16 @@ function getIteratorFn(maybeIterable) { } function getWrappedName(outerType, innerType, wrapperName) { + var displayName = outerType.displayName; + + if (displayName) { + return displayName; + } + var functionName = innerType.displayName || innerType.name || ""; - return ( - outerType.displayName || - (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName) - ); + return functionName !== "" + ? wrapperName + "(" + functionName + ")" + : wrapperName; } // Keep in sync with react-reconciler/getComponentNameFromFiber function getContextName(type) { @@ -2948,7 +2953,7 @@ function getComponentNameFromType(type) { { if (typeof type.tag === "number") { error( - "Received an unexpected object in getComponentName(). " + + "Received an unexpected object in getComponentNameFromType(). " + "This is likely a bug in React. Please file an issue." ); } @@ -2999,7 +3004,13 @@ function getComponentNameFromType(type) { return getWrappedName(type, type.render, "ForwardRef"); case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); + var outerName = type.displayName || null; + + if (outerName !== null) { + return outerName; + } + + return getComponentNameFromType(type.type) || "Memo"; case REACT_LAZY_TYPE: { var lazyComponent = type; @@ -4260,6 +4271,26 @@ function onCommitUnmount(fiber) { } } +var NoMode = + /* */ + 0; // TODO: Remove ConcurrentMode by reading from the root tag instead + +var ConcurrentMode = + /* */ + 1; +var ProfileMode = + /* */ + 2; +var DebugTracingMode = + /* */ + 4; +var StrictLegacyMode = + /* */ + 8; +var StrictEffectsMode = + /* */ + 16; + // If those values are changed that package should be rebuilt and redeployed. var TotalLanes = 31; @@ -4512,12 +4543,8 @@ function getNextLanes(root, wipLanes) { } } - if ( - // TODO: Check for root override, once that lands - (nextLanes & InputContinuousLane) !== - NoLanes - ) { - // When updates are sync by default, we entangle continous priority updates + if ((nextLanes & InputContinuousLane) !== NoLanes) { + // When updates are sync by default, we entangle continuous priority updates // and default updates, so they render in the same batch. The only reason // they use separate lanes is because continuous updates should interrupt // transitions, but default updates should not. @@ -4711,15 +4738,12 @@ function shouldTimeSlice(root, lanes) { return false; } - { - var SyncDefaultLanes = - InputContinuousHydrationLane | - InputContinuousLane | - DefaultHydrationLane | - DefaultLane; // TODO: Check for root override, once that lands - - return (lanes & SyncDefaultLanes) === NoLanes; - } + var SyncDefaultLanes = + InputContinuousHydrationLane | + InputContinuousLane | + DefaultHydrationLane | + DefaultLane; + return (lanes & SyncDefaultLanes) === NoLanes; } function isTransitionLane(lane) { return (lane & TransitionLanes) !== 0; @@ -5961,24 +5985,7 @@ var Passive$1 = /* */ 4; -var ReactVersion = "17.0.3-experimental-2a7bb4154"; - -var NoMode = - /* */ - 0; // TODO: Remove ConcurrentMode by reading from the root tag instead - -var ConcurrentMode = - /* */ - 1; -var ProfileMode = - /* */ - 2; -var DebugTracingMode = - /* */ - 4; -var StrictLegacyMode = - /* */ - 8; +var ReactVersion = "17.0.3-experimental-b8fda6cab"; var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; var NoTransition = 0; @@ -10284,7 +10291,12 @@ function renderWithHooks( if ( current !== null && - (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) + (current.flags & StaticMask) !== (workInProgress.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird + // and creates false positives. To make this work in legacy mode, we'd + // need to mark fibers that commit in an incomplete state, somehow. For + // now I'll disable the warning that most of the bugs that would trigger + // it are either exclusive to concurrent mode or exist in both. + (current.mode & ConcurrentMode) !== NoMode ) { error( "Internal React error: Expected static flag was missing. Please " + @@ -21220,20 +21232,18 @@ function resetWorkInProgress(workInProgress, renderLanes) { return workInProgress; } -function createHostRootFiber(tag, strictModeLevelOverride) { +function createHostRootFiber( + tag, + isStrictMode, + concurrentUpdatesByDefaultOverride +) { var mode; if (tag === ConcurrentRoot) { mode = ConcurrentMode; - if (strictModeLevelOverride !== null) { - if (strictModeLevelOverride >= 1) { - mode |= StrictLegacyMode; - } - } else { - { - mode |= StrictLegacyMode; - } + if (isStrictMode === true) { + mode |= StrictLegacyMode; } } else { mode = NoMode; @@ -21285,16 +21295,8 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: - fiberTag = Mode; // Legacy strict mode ( without any level prop) defaults to level 1. - - var level = - pendingProps.unstable_level == null ? 1 : pendingProps.unstable_level; // Levels cascade; higher levels inherit all lower level modes. - // It is explicitly not supported to lower a mode with nesting, only to increase it. - - if (level >= 1) { - mode |= StrictLegacyMode; - } - + fiberTag = Mode; + mode |= StrictLegacyMode | StrictEffectsMode; break; case REACT_PROFILER_TYPE: @@ -21586,12 +21588,13 @@ function createFiberRoot( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { var root = new FiberRootNode(containerInfo, tag, hydrate); // stateNode is any. - var uninitializedFiber = createHostRootFiber(tag, strictModeLevelOverride); + var uninitializedFiber = createHostRootFiber(tag, isStrictMode); root.current = uninitializedFiber; uninitializedFiber.stateNode = root; @@ -21729,14 +21732,15 @@ function createContainer( tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode, + concurrentUpdatesByDefaultOverride ) { return createFiberRoot( containerInfo, tag, hydrate, hydrationCallbacks, - strictModeLevelOverride + isStrictMode ); } function updateContainer(element, container, parentComponent, callback) { @@ -22493,7 +22497,7 @@ function render(element, containerTag, callback) { if (!root) { // TODO (bvaughn): If we decide to keep the wrapper component, // We could create a wrapper for containerTag as well to reduce special casing. - root = createContainer(containerTag, LegacyRoot, false, null, null); + root = createContainer(containerTag, LegacyRoot, false, null, false); roots.set(containerTag, root); } diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 0a11d8ab65aba4..61498925ce7232 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<> + * @generated SignedSource<<59cfc9a453cf45eb8d4cd09410777f21>> */ "use strict"; @@ -1208,13 +1208,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -1767,18 +1772,19 @@ function getNextLanes(root, wipLanes) { suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes, nonIdlePendingLanes = pendingLanes & 268435455; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + if (0 !== nonIdlePendingLanes) { + var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes; + 0 !== nonIdleUnblockedLanes + ? (nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))); + } else + (nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))); + (nextLanes = getHighestPriorityLanes(pingedLanes)); if (0 === nextLanes) return 0; if ( 0 !== wipLanes && @@ -1790,13 +1796,16 @@ function getNextLanes(root, wipLanes) { (16 === suspendedLanes && 0 !== (pingedLanes & 4194240))) ) return wipLanes; + 0 === (root.current.mode & 32) && + 0 !== (nextLanes & 4) && + (nextLanes |= pendingLanes & 16); wipLanes = root.entangledLanes; if (0 !== wipLanes) for (root = root.entanglements, wipLanes &= nextLanes; 0 < wipLanes; ) - (suspendedLanes = 31 - clz32(wipLanes)), - (pingedLanes = 1 << suspendedLanes), - (nextLanes |= root[suspendedLanes]), - (wipLanes &= ~pingedLanes); + (pendingLanes = 31 - clz32(wipLanes)), + (suspendedLanes = 1 << pendingLanes), + (nextLanes |= root[pendingLanes]), + (wipLanes &= ~suspendedLanes); return nextLanes; } function computeExpirationTime(lane, currentTime) { @@ -6333,7 +6342,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { root === workInProgressRoot ? workInProgressRootRenderLanes : 0 ); if (0 === lanes) return null; - var JSCompiler_inline_result = 0 !== (lanes & root.expiredLanes) ? !1 : !0; + var JSCompiler_inline_result = + 0 !== (lanes & root.expiredLanes) + ? !1 + : 0 !== (root.current.mode & 32) + ? !0 + : 0 === (lanes & 30); if (JSCompiler_inline_result && !didTimeout) { didTimeout = lanes; JSCompiler_inline_result = executionContext; @@ -7743,10 +7757,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -7975,10 +7986,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_984 = { + devToolsConfig$jscomp$inline_986 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "17.0.3-2a7bb4154", + version: "17.0.3-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -7993,11 +8004,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1241 = { - bundleType: devToolsConfig$jscomp$inline_984.bundleType, - version: devToolsConfig$jscomp$inline_984.version, - rendererPackageName: devToolsConfig$jscomp$inline_984.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_984.rendererConfig, +var internals$jscomp$inline_1243 = { + bundleType: devToolsConfig$jscomp$inline_986.bundleType, + version: devToolsConfig$jscomp$inline_986.version, + rendererPackageName: devToolsConfig$jscomp$inline_986.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_986.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8012,26 +8023,26 @@ var internals$jscomp$inline_1241 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_984.findFiberByHostInstance || + devToolsConfig$jscomp$inline_986.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-2a7bb4154" + reconcilerVersion: "17.0.3-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1242 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1244 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1242.isDisabled && - hook$jscomp$inline_1242.supportsFiber + !hook$jscomp$inline_1244.isDisabled && + hook$jscomp$inline_1244.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1242.inject( - internals$jscomp$inline_1241 + (rendererID = hook$jscomp$inline_1244.inject( + internals$jscomp$inline_1243 )), - (injectedHook = hook$jscomp$inline_1242); + (injectedHook = hook$jscomp$inline_1244); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js index ec63a6029e2ba1..92da38d93bfc86 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js @@ -8,7 +8,7 @@ * @nolint * @providesModule ReactNativeRenderer-prod * @preventMunge - * @generated SignedSource<<5b43b00ffda366247921c6aaf524b5ab>> + * @generated SignedSource<> */ "use strict"; @@ -1209,13 +1209,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -7747,10 +7752,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -7979,10 +7981,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_985 = { + devToolsConfig$jscomp$inline_986 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "17.0.3-experimental-2a7bb4154", + version: "17.0.3-experimental-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -7997,11 +7999,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1242 = { - bundleType: devToolsConfig$jscomp$inline_985.bundleType, - version: devToolsConfig$jscomp$inline_985.version, - rendererPackageName: devToolsConfig$jscomp$inline_985.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_985.rendererConfig, +var internals$jscomp$inline_1243 = { + bundleType: devToolsConfig$jscomp$inline_986.bundleType, + version: devToolsConfig$jscomp$inline_986.version, + rendererPackageName: devToolsConfig$jscomp$inline_986.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_986.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8016,26 +8018,26 @@ var internals$jscomp$inline_1242 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_985.findFiberByHostInstance || + devToolsConfig$jscomp$inline_986.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-experimental-2a7bb4154" + reconcilerVersion: "17.0.3-experimental-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1243 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1244 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1243.isDisabled && - hook$jscomp$inline_1243.supportsFiber + !hook$jscomp$inline_1244.isDisabled && + hook$jscomp$inline_1244.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1243.inject( - internals$jscomp$inline_1242 + (rendererID = hook$jscomp$inline_1244.inject( + internals$jscomp$inline_1243 )), - (injectedHook = hook$jscomp$inline_1243); + (injectedHook = hook$jscomp$inline_1244); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 04871f830f58ed..a32f14b7054251 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -7,7 +7,7 @@ * @noflow * @nolint * @preventMunge - * @generated SignedSource<<3edf91c7123cf41e201981f807941641>> + * @generated SignedSource<<6cad811dbb0701b65f3ecc4aca877fe5>> */ "use strict"; @@ -1208,13 +1208,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -1785,18 +1790,19 @@ function getNextLanes(root, wipLanes) { suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes, nonIdlePendingLanes = pendingLanes & 268435455; - 0 !== nonIdlePendingLanes - ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes), - 0 !== pendingLanes - ? (nextLanes = getHighestPriorityLanes(pendingLanes)) - : ((pingedLanes &= nonIdlePendingLanes), - 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes)))) - : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes), + if (0 !== nonIdlePendingLanes) { + var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes; + 0 !== nonIdleUnblockedLanes + ? (nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes)) + : ((pingedLanes &= nonIdlePendingLanes), + 0 !== pingedLanes && + (nextLanes = getHighestPriorityLanes(pingedLanes))); + } else + (nonIdlePendingLanes = pendingLanes & ~suspendedLanes), 0 !== nonIdlePendingLanes ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes)) : 0 !== pingedLanes && - (nextLanes = getHighestPriorityLanes(pingedLanes))); + (nextLanes = getHighestPriorityLanes(pingedLanes)); if (0 === nextLanes) return 0; if ( 0 !== wipLanes && @@ -1808,13 +1814,16 @@ function getNextLanes(root, wipLanes) { (16 === suspendedLanes && 0 !== (pingedLanes & 4194240))) ) return wipLanes; + 0 === (root.current.mode & 32) && + 0 !== (nextLanes & 4) && + (nextLanes |= pendingLanes & 16); wipLanes = root.entangledLanes; if (0 !== wipLanes) for (root = root.entanglements, wipLanes &= nextLanes; 0 < wipLanes; ) - (suspendedLanes = 31 - clz32(wipLanes)), - (pingedLanes = 1 << suspendedLanes), - (nextLanes |= root[suspendedLanes]), - (wipLanes &= ~pingedLanes); + (pendingLanes = 31 - clz32(wipLanes)), + (suspendedLanes = 1 << pendingLanes), + (nextLanes |= root[pendingLanes]), + (wipLanes &= ~suspendedLanes); return nextLanes; } function computeExpirationTime(lane, currentTime) { @@ -6447,7 +6456,12 @@ function performConcurrentWorkOnRoot(root, didTimeout) { root === workInProgressRoot ? workInProgressRootRenderLanes : 0 ); if (0 === lanes) return null; - var JSCompiler_inline_result = 0 !== (lanes & root.expiredLanes) ? !1 : !0; + var JSCompiler_inline_result = + 0 !== (lanes & root.expiredLanes) + ? !1 + : 0 !== (root.current.mode & 32) + ? !0 + : 0 === (lanes & 30); if (JSCompiler_inline_result && !didTimeout) { didTimeout = lanes; JSCompiler_inline_result = executionContext; @@ -7893,10 +7907,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -8126,10 +8137,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1008 = { + devToolsConfig$jscomp$inline_1010 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "17.0.3-2a7bb4154", + version: "17.0.3-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -8144,11 +8155,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1269 = { - bundleType: devToolsConfig$jscomp$inline_1008.bundleType, - version: devToolsConfig$jscomp$inline_1008.version, - rendererPackageName: devToolsConfig$jscomp$inline_1008.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1008.rendererConfig, +var internals$jscomp$inline_1271 = { + bundleType: devToolsConfig$jscomp$inline_1010.bundleType, + version: devToolsConfig$jscomp$inline_1010.version, + rendererPackageName: devToolsConfig$jscomp$inline_1010.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1010.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8163,26 +8174,26 @@ var internals$jscomp$inline_1269 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1008.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1010.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-2a7bb4154" + reconcilerVersion: "17.0.3-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1270 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1272 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1270.isDisabled && - hook$jscomp$inline_1270.supportsFiber + !hook$jscomp$inline_1272.isDisabled && + hook$jscomp$inline_1272.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1270.inject( - internals$jscomp$inline_1269 + (rendererID = hook$jscomp$inline_1272.inject( + internals$jscomp$inline_1271 )), - (injectedHook = hook$jscomp$inline_1270); + (injectedHook = hook$jscomp$inline_1272); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { diff --git a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js index 1eb72db7df125c..f9acf6f8d85f4e 100644 --- a/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +++ b/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js @@ -8,7 +8,7 @@ * @nolint * @providesModule ReactNativeRenderer-profiling * @preventMunge - * @generated SignedSource<<9fd0d28f692b02776473983891f4fc66>> + * @generated SignedSource<> */ "use strict"; @@ -1209,13 +1209,18 @@ function getComponentNameFromType(type) { return (type._context.displayName || "Context") + ".Provider"; case REACT_FORWARD_REF_TYPE: var innerType = type.render; - innerType = innerType.displayName || innerType.name || ""; + type = type.displayName; + type || + ((type = innerType.displayName || innerType.name || ""), + (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef")); + return type; + case REACT_MEMO_TYPE: return ( - type.displayName || - ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef") + (innerType = type.displayName || null), + null !== innerType + ? innerType + : getComponentNameFromType(type.type) || "Memo" ); - case REACT_MEMO_TYPE: - return getComponentNameFromType(type.type); case REACT_LAZY_TYPE: innerType = type._payload; type = type._init; @@ -7897,10 +7902,7 @@ function createFiberFromTypeAndProps( break; case REACT_STRICT_MODE_TYPE: fiberTag = 8; - 1 <= - (null == pendingProps.unstable_level - ? 1 - : pendingProps.unstable_level) && (mode |= 8); + mode |= 24; break; case REACT_PROFILER_TYPE: return ( @@ -8130,10 +8132,10 @@ batchedUpdatesImpl = function(fn, a) { } }; var roots = new Map(), - devToolsConfig$jscomp$inline_1009 = { + devToolsConfig$jscomp$inline_1010 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "17.0.3-experimental-2a7bb4154", + version: "17.0.3-experimental-b8fda6cab", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function() { @@ -8148,11 +8150,11 @@ var roots = new Map(), }.bind(null, findNodeHandle) } }; -var internals$jscomp$inline_1270 = { - bundleType: devToolsConfig$jscomp$inline_1009.bundleType, - version: devToolsConfig$jscomp$inline_1009.version, - rendererPackageName: devToolsConfig$jscomp$inline_1009.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1009.rendererConfig, +var internals$jscomp$inline_1271 = { + bundleType: devToolsConfig$jscomp$inline_1010.bundleType, + version: devToolsConfig$jscomp$inline_1010.version, + rendererPackageName: devToolsConfig$jscomp$inline_1010.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1010.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -8167,26 +8169,26 @@ var internals$jscomp$inline_1270 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1009.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1010.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "17.0.3-experimental-2a7bb4154" + reconcilerVersion: "17.0.3-experimental-b8fda6cab" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1271 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1272 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1271.isDisabled && - hook$jscomp$inline_1271.supportsFiber + !hook$jscomp$inline_1272.isDisabled && + hook$jscomp$inline_1272.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1271.inject( - internals$jscomp$inline_1270 + (rendererID = hook$jscomp$inline_1272.inject( + internals$jscomp$inline_1271 )), - (injectedHook = hook$jscomp$inline_1271); + (injectedHook = hook$jscomp$inline_1272); } catch (err) {} } exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {