React Native sync for revisions c9aab1c...f7cdc89

Summary:
This sync includes the following changes:
- **[f7cdc8936](https://github.com/facebook/react/commit/f7cdc8936 )**: Also turn off enableSyncDefaultUpdates in RN test renderer ([#21293](https://github.com/facebook/react/pull/21293)) //<Ricky>//
- **[4c9eb2af1](https://github.com/facebook/react/commit/4c9eb2af1 )**: Add dynamic flags to React Native ([#21291](https://github.com/facebook/react/pull/21291)) //<Ricky>//
- **[9eddfbf5a](https://github.com/facebook/react/commit/9eddfbf5a )**: [Fizz] Two More Fixes ([#21288](https://github.com/facebook/react/pull/21288)) //<Sebastian Markbåge>//
- **[11b07597e](https://github.com/facebook/react/commit/11b07597e )**: Fix classes ([#21283](https://github.com/facebook/react/pull/21283)) //<Sebastian Markbåge>//
- **[96d00b9bb](https://github.com/facebook/react/commit/96d00b9bb )**: [Fizz] Random Fixes ([#21277](https://github.com/facebook/react/pull/21277)) //<Sebastian Markbåge>//
- **[81ef53953](https://github.com/facebook/react/commit/81ef53953 )**: Always insert a dummy node with an ID into fallbacks ([#21272](https://github.com/facebook/react/pull/21272)) //<Sebastian Markbåge>//
- **[a4a940d7a](https://github.com/facebook/react/commit/a4a940d7a )**: [Fizz] Add unsupported Portal/Scope components ([#21261](https://github.com/facebook/react/pull/21261)) //<Sebastian Markbåge>//
- **[f4d7a0f1e](https://github.com/facebook/react/commit/f4d7a0f1e )**: Implement useOpaqueIdentifier ([#21260](https://github.com/facebook/react/pull/21260)) //<Sebastian Markbåge>//
- **[dde875dfb](https://github.com/facebook/react/commit/dde875dfb )**: [Fizz] Implement Hooks ([#21257](https://github.com/facebook/react/pull/21257)) //<Sebastian Markbåge>//
- **[a597c2f5d](https://github.com/facebook/react/commit/a597c2f5d )**: [Fizz] Fix reentrancy bug ([#21270](https://github.com/facebook/react/pull/21270)) //<Sebastian Markbåge>//
- **[15e779d92](https://github.com/facebook/react/commit/15e779d92 )**: Reconciler should inject its own version into DevTools hook ([#21268](https://github.com/facebook/react/pull/21268)) //<Brian Vaughn>//
- **[4f76a28c9](https://github.com/facebook/react/commit/4f76a28c9 )**: [Fizz] Implement New Context ([#21255](https://github.com/facebook/react/pull/21255)) //<Sebastian Markbåge>//
- **[82ef450e0](https://github.com/facebook/react/commit/82ef450e0 )**: remove obsolete SharedArrayBuffer ESLint config ([#21259](https://github.com/facebook/react/pull/21259)) //<Henry Q. Dineen>//
- **[dbadfa2c3](https://github.com/facebook/react/commit/dbadfa2c3 )**: [Fizz] Classes Follow Up ([#21253](https://github.com/facebook/react/pull/21253)) //<Sebastian Markbåge>//
- **[686b635b7](https://github.com/facebook/react/commit/686b635b7 )**: Prevent reading canonical property of null ([#21242](https://github.com/facebook/react/pull/21242)) //<Joshua Gross>//
- **[bb88ce95a](https://github.com/facebook/react/commit/bb88ce95a )**: Bugfix: Don't rely on `finishedLanes` for passive effects ([#21233](https://github.com/facebook/react/pull/21233)) //<Andrew Clark>//
- **[343710c92](https://github.com/facebook/react/commit/343710c92 )**: [Fizz] Fragments and Iterable support ([#21228](https://github.com/facebook/react/pull/21228)) //<Sebastian Markbåge>//
- **[933880b45](https://github.com/facebook/react/commit/933880b45 )**: Make time-slicing opt-in ([#21072](https://github.com/facebook/react/pull/21072)) //<Ricky>//
- **[b0407b55f](https://github.com/facebook/react/commit/b0407b55f )**: Support more empty types ([#21225](https://github.com/facebook/react/pull/21225)) //<Sebastian Markbåge>//
- **[39713716a](https://github.com/facebook/react/commit/39713716a )**: Merge isObject branches ([#21226](https://github.com/facebook/react/pull/21226)) //<Sebastian Markbåge>//
- **[8a4a59c72](https://github.com/facebook/react/commit/8a4a59c72 )**: Remove textarea special case from child fiber ([#21222](https://github.com/facebook/react/pull/21222)) //<Sebastian Markbåge>//
- **[dc108b0f5](https://github.com/facebook/react/commit/dc108b0f5 )**: Track which fibers scheduled the current render work ([#15658](https://github.com/facebook/react/pull/15658)) //<Brian Vaughn>//
- **[6ea749170](https://github.com/facebook/react/commit/6ea749170 )**: Fix typo in comment ([#21214](https://github.com/facebook/react/pull/21214)) //<inokawa>//
- **[b38ac13f9](https://github.com/facebook/react/commit/b38ac13f9 )**: DevTools: Add post-commit hook ([#21183](https://github.com/facebook/react/pull/21183)) //<Brian Vaughn>//
- **[b943aeba8](https://github.com/facebook/react/commit/b943aeba8 )**: Fix: Passive effect updates are never sync ([#21215](https://github.com/facebook/react/pull/21215)) //<Andrew Clark>//
- **[d389c54d1](https://github.com/facebook/react/commit/d389c54d1 )**: Offscreen: Use JS stack to track hidden/unhidden subtree state ([#21211](https://github.com/facebook/react/pull/21211)) //<Brian Vaughn>//
- **[c486dc1a4](https://github.com/facebook/react/commit/c486dc1a4 )**: Remove unnecessary processUpdateQueue ([#21199](https://github.com/facebook/react/pull/21199)) //<Sebastian Markbåge>//
- **[cf45a623a](https://github.com/facebook/react/commit/cf45a623a )**: [Fizz] Implement Classes ([#21200](https://github.com/facebook/react/pull/21200)) //<Sebastian Markbåge>//
- **[75c616554](https://github.com/facebook/react/commit/75c616554 )**: Include actual type of `Profiler#id` on type mismatch ([#20306](https://github.com/facebook/react/pull/20306)) //<Sebastian Silbermann>//
- **[1214b302e](https://github.com/facebook/react/commit/1214b302e )**: test: Fix "couldn't locate all inline snapshots" ([#21205](https://github.com/facebook/react/pull/21205)) //<Sebastian Silbermann>//
- **[1a02d2792](https://github.com/facebook/react/commit/1a02d2792 )**: style: delete unused isHost check ([#21203](https://github.com/facebook/react/pull/21203)) //<wangao>//
- **[782f689ca](https://github.com/facebook/react/commit/782f689ca )**: Don't double invoke getDerivedStateFromProps for module pattern ([#21193](https://github.com/facebook/react/pull/21193)) //<Sebastian Markbåge>//
- **[e90c76a65](https://github.com/facebook/react/commit/e90c76a65 )**: Revert "Offscreen: Use JS stack to track hidden/unhidden subtree state" ([#21194](https://github.com/facebook/react/pull/21194)) //<Brian Vaughn>//
- **[1f8583de8](https://github.com/facebook/react/commit/1f8583de8 )**: Offscreen: Use JS stack to track hidden/unhidden subtree state ([#21192](https://github.com/facebook/react/pull/21192)) //<Brian Vaughn>//
- **[ad6e6ec7b](https://github.com/facebook/react/commit/ad6e6ec7b )**: [Fizz] Prepare Recursive Loop for More Types ([#21186](https://github.com/facebook/react/pull/21186)) //<Sebastian Markbåge>//
- **[172e89b4b](https://github.com/facebook/react/commit/172e89b4b )**: Reland Remove redundant initial of isArray ([#21188](https://github.com/facebook/react/pull/21188)) //<Sebastian Markbåge>//
- **[7c1ba2b57](https://github.com/facebook/react/commit/7c1ba2b57 )**: Proposed new Suspense layout effect semantics ([#21079](https://github.com/facebook/react/pull/21079)) //<Brian Vaughn>//
- **[316aa3686](https://github.com/facebook/react/commit/316aa3686 )**: [Scheduler] Fix de-opt caused by out-of-bounds access ([#21147](https://github.com/facebook/react/pull/21147)) //<Andrey Marchenko>//
- **[b4f119cdf](https://github.com/facebook/react/commit/b4f119cdf )**: Revert "Remove redundant initial of isArray ([#21163](https://github.com/facebook/react/pull/21163))" //<Sebastian Markbage>//
- **[c03197063](https://github.com/facebook/react/commit/c03197063 )**: Revert "apply prettier ([#21165](https://github.com/facebook/react/pull/21165))" //<Sebastian Markbage>//
- **[94fd1214d](https://github.com/facebook/react/commit/94fd1214d )**: apply prettier ([#21165](https://github.com/facebook/react/pull/21165)) //<Behnam Mohammadi>//
- **[b130a0f5c](https://github.com/facebook/react/commit/b130a0f5c )**: Remove redundant initial of isArray ([#21163](https://github.com/facebook/react/pull/21163)) //<Behnam Mohammadi>//
- **[2c9fef32d](https://github.com/facebook/react/commit/2c9fef32d )**: Remove redundant initial of hasOwnProperty ([#21134](https://github.com/facebook/react/pull/21134)) //<Behnam Mohammadi>//
- **[1cf9978d8](https://github.com/facebook/react/commit/1cf9978d8 )**: Don't pass internals to callbacks ([#21161](https://github.com/facebook/react/pull/21161)) //<Sebastian Markbåge>//
- **[b9e4c10e9](https://github.com/facebook/react/commit/b9e4c10e9 )**: [Fizz] Implement all the DOM attributes and special cases ([#21153](https://github.com/facebook/react/pull/21153)) //<Sebastian Markbåge>//
- **[f8ef4ff57](https://github.com/facebook/react/commit/f8ef4ff57 )**: Flush discrete passive effects before paint ([#21150](https://github.com/facebook/react/pull/21150)) //<Andrew Clark>//
- **[b48b38af6](https://github.com/facebook/react/commit/b48b38af6 )**: Support nesting of startTransition and flushSync (alt) ([#21149](https://github.com/facebook/react/pull/21149)) //<Sebastian Markbåge>//

Changelog:
[General][Changed] - React Native sync for revisions c9aab1c...f7cdc89

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D27740113

fbshipit-source-id: 6e27204d78e3e16ed205170006cb97c0d6bfa957
This commit is contained in:
Andrei Shikov 2021-04-20 05:49:28 -07:00 коммит произвёл Facebook GitHub Bot
Родитель f1d1e23b27
Коммит de318cd318
7 изменённых файлов: 1826 добавлений и 1672 удалений

Просмотреть файл

@ -1 +1 @@
c9aab1c9d00ce407b1c61c385b356d49cd147f60
f7cdc893618e9701a8e3403b2b63bfc8233c6771

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b394a483ec190c4464de4b6f0ebd13bf>>
* @generated SignedSource<<90d01c86a28a69abef2fe93114ca8dd8>>
*/
"use strict";
@ -62,7 +62,8 @@ function invokeGuardedCallbackAndCatchFirstError(
hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
}
}
var getFiberCurrentPropsFromNode = null,
var isArrayImpl = Array.isArray,
getFiberCurrentPropsFromNode = null,
getInstanceFromNode = null,
getNodeFromInstance = null;
function executeDispatch(event, listener, inst) {
@ -74,7 +75,7 @@ function executeDispatch(event, listener, inst) {
function executeDirectDispatch(event) {
var dispatchListener = event._dispatchListeners,
dispatchInstance = event._dispatchInstances;
if (Array.isArray(dispatchListener))
if (isArrayImpl(dispatchListener))
throw Error("executeDirectDispatch(...): Invalid `event`.");
event.currentTarget = dispatchListener
? getNodeFromInstance(dispatchInstance)
@ -335,9 +336,9 @@ function accumulate(current, next) {
);
return null == current
? next
: Array.isArray(current)
: isArrayImpl(current)
? current.concat(next)
: Array.isArray(next)
: isArrayImpl(next)
? [current].concat(next)
: [current, next];
}
@ -347,12 +348,12 @@ function accumulateInto(current, next) {
"accumulateInto(...): Accumulated items must not be null or undefined."
);
if (null == current) return next;
if (Array.isArray(current)) {
if (Array.isArray(next)) return current.push.apply(current, next), current;
if (isArrayImpl(current)) {
if (isArrayImpl(next)) return current.push.apply(current, next), current;
current.push(next);
return current;
}
return Array.isArray(next) ? [current].concat(next) : [current, next];
return isArrayImpl(next) ? [current].concat(next) : [current, next];
}
function forEachAccumulated(arr, cb, scope) {
Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
@ -578,7 +579,7 @@ var ResponderEventPlugin = {
b: {
JSCompiler_temp = shouldSetEventType._dispatchListeners;
targetInst = shouldSetEventType._dispatchInstances;
if (Array.isArray(JSCompiler_temp))
if (isArrayImpl(JSCompiler_temp))
for (
depthA = 0;
depthA < JSCompiler_temp.length &&
@ -929,7 +930,7 @@ eventPluginOrder = Array.prototype.slice.call([
"ReactNativeBridgeEventPlugin"
]);
recomputePluginOrdering();
var injectedNamesToPlugins$jscomp$inline_214 = {
var injectedNamesToPlugins$jscomp$inline_215 = {
ResponderEventPlugin: ResponderEventPlugin,
ReactNativeBridgeEventPlugin: {
eventTypes: {},
@ -964,34 +965,34 @@ var injectedNamesToPlugins$jscomp$inline_214 = {
}
}
},
isOrderingDirty$jscomp$inline_215 = !1,
pluginName$jscomp$inline_216;
for (pluginName$jscomp$inline_216 in injectedNamesToPlugins$jscomp$inline_214)
isOrderingDirty$jscomp$inline_216 = !1,
pluginName$jscomp$inline_217;
for (pluginName$jscomp$inline_217 in injectedNamesToPlugins$jscomp$inline_215)
if (
injectedNamesToPlugins$jscomp$inline_214.hasOwnProperty(
pluginName$jscomp$inline_216
injectedNamesToPlugins$jscomp$inline_215.hasOwnProperty(
pluginName$jscomp$inline_217
)
) {
var pluginModule$jscomp$inline_217 =
injectedNamesToPlugins$jscomp$inline_214[pluginName$jscomp$inline_216];
var pluginModule$jscomp$inline_218 =
injectedNamesToPlugins$jscomp$inline_215[pluginName$jscomp$inline_217];
if (
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_216) ||
namesToPlugins[pluginName$jscomp$inline_216] !==
pluginModule$jscomp$inline_217
!namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_217) ||
namesToPlugins[pluginName$jscomp$inline_217] !==
pluginModule$jscomp$inline_218
) {
if (namesToPlugins[pluginName$jscomp$inline_216])
if (namesToPlugins[pluginName$jscomp$inline_217])
throw Error(
"EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
pluginName$jscomp$inline_216 +
pluginName$jscomp$inline_217 +
"`."
);
namesToPlugins[
pluginName$jscomp$inline_216
] = pluginModule$jscomp$inline_217;
isOrderingDirty$jscomp$inline_215 = !0;
pluginName$jscomp$inline_217
] = pluginModule$jscomp$inline_218;
isOrderingDirty$jscomp$inline_216 = !0;
}
}
isOrderingDirty$jscomp$inline_215 && recomputePluginOrdering();
isOrderingDirty$jscomp$inline_216 && recomputePluginOrdering();
function getInstanceFromInstance(instanceHandle) {
return instanceHandle;
}
@ -1006,7 +1007,8 @@ getNodeFromInstance = function(inst) {
};
ResponderEventPlugin.injection.injectGlobalResponderHandler({
onChange: function(from, to, blockNativeResponder) {
(from || to).stateNode.canonical._internalInstanceHandle ||
((from = (from = from || to) && from.stateNode) &&
from.canonical._internalInstanceHandle) ||
(null !== to
? ReactNativePrivateInterface.UIManager.setJSResponder(
to.stateNode.canonical._nativeTag,
@ -1307,7 +1309,7 @@ function restoreDeletedValuesInNestedArray(
node,
validAttributes
) {
if (Array.isArray(node))
if (isArrayImpl(node))
for (var i = node.length; i-- && 0 < removedKeyCount; )
restoreDeletedValuesInNestedArray(
updatePayload,
@ -1353,9 +1355,9 @@ function diffNestedProperty(
: prevProp
? clearNestedProperty(updatePayload, prevProp, validAttributes)
: updatePayload;
if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
if (!isArrayImpl(prevProp) && !isArrayImpl(nextProp))
return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
if (isArrayImpl(prevProp) && isArrayImpl(nextProp)) {
var minLength =
prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
i;
@ -1380,7 +1382,7 @@ function diffNestedProperty(
);
return updatePayload;
}
return Array.isArray(prevProp)
return isArrayImpl(prevProp)
? diffProperties(
updatePayload,
ReactNativePrivateInterface.flattenStyle(prevProp),
@ -1396,7 +1398,7 @@ function diffNestedProperty(
}
function addNestedProperty(updatePayload, nextProp, validAttributes) {
if (!nextProp) return updatePayload;
if (!Array.isArray(nextProp))
if (!isArrayImpl(nextProp))
return diffProperties(
updatePayload,
emptyObject,
@ -1413,7 +1415,7 @@ function addNestedProperty(updatePayload, nextProp, validAttributes) {
}
function clearNestedProperty(updatePayload, prevProp, validAttributes) {
if (!prevProp) return updatePayload;
if (!Array.isArray(prevProp))
if (!isArrayImpl(prevProp))
return diffProperties(
updatePayload,
prevProp,
@ -1531,7 +1533,7 @@ function executeDispatchesAndReleaseTopLevel(e) {
if (e) {
var dispatchListeners = e._dispatchListeners,
dispatchInstances = e._dispatchInstances;
if (Array.isArray(dispatchListeners))
if (isArrayImpl(dispatchListeners))
for (
var i = 0;
i < dispatchListeners.length && !e.isPropagationStopped();
@ -1591,6 +1593,28 @@ function dispatchEvent(target, topLevelType, nativeEvent) {
}
});
}
var scheduleCallback = Scheduler.unstable_scheduleCallback,
cancelCallback = Scheduler.unstable_cancelCallback,
shouldYield = Scheduler.unstable_shouldYield,
requestPaint = Scheduler.unstable_requestPaint,
now = Scheduler.unstable_now,
ImmediatePriority = Scheduler.unstable_ImmediatePriority,
UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
NormalPriority = Scheduler.unstable_NormalPriority,
IdlePriority = Scheduler.unstable_IdlePriority,
rendererID = null,
injectedHook = null;
function onCommitRoot(root) {
if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
try {
injectedHook.onCommitFiberRoot(
rendererID,
root,
void 0,
128 === (root.current.flags & 128)
);
} catch (err) {}
}
var nextTransitionLane = 64,
nextRetryLane = 4194304;
function getHighestPriorityLanes(lanes) {
@ -1905,7 +1929,8 @@ function describeFunctionComponentFrame(fn, source) {
? describeComponentFrame(fn.displayName || fn.name || null, source, null)
: "";
}
var valueStack = [],
var hasOwnProperty = Object.prototype.hasOwnProperty,
valueStack = [],
index = -1;
function createCursor(defaultValue) {
return { current: defaultValue };
@ -2001,28 +2026,6 @@ function invalidateContextProvider(workInProgress, type, didChange) {
: pop(didPerformWorkStackCursor);
push(didPerformWorkStackCursor, didChange);
}
var scheduleCallback = Scheduler.unstable_scheduleCallback,
cancelCallback = Scheduler.unstable_cancelCallback,
shouldYield = Scheduler.unstable_shouldYield,
requestPaint = Scheduler.unstable_requestPaint,
now = Scheduler.unstable_now,
ImmediatePriority = Scheduler.unstable_ImmediatePriority,
UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
NormalPriority = Scheduler.unstable_NormalPriority,
IdlePriority = Scheduler.unstable_IdlePriority,
rendererID = null,
injectedHook = null;
function onCommitRoot(root) {
if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
try {
injectedHook.onCommitFiberRoot(
rendererID,
root,
void 0,
128 === (root.current.flags & 128)
);
} catch (err) {}
}
var syncQueue = null,
isFlushingSyncQueue = !1;
function flushSyncCallbackQueue() {
@ -2053,8 +2056,7 @@ var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
var objectIs = "function" === typeof Object.is ? Object.is : is,
hasOwnProperty = Object.prototype.hasOwnProperty;
var objectIs = "function" === typeof Object.is ? Object.is : is;
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) return !0;
if (
@ -2547,7 +2549,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
? previousContext
: contextStackCursor.current),
(instance.context = getMaskedContext(workInProgress, contextType)));
processUpdateQueue(workInProgress, newProps, instance, renderLanes);
instance.state = workInProgress.memoizedState;
contextType = ctor.getDerivedStateFromProps;
"function" === typeof contextType &&
@ -2569,7 +2570,6 @@ function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
"function" === typeof instance.componentDidMount &&
(workInProgress.flags |= 4);
}
var isArray = Array.isArray;
function coerceRef(returnFiber, current, element) {
returnFiber = element.ref;
if (
@ -2622,15 +2622,14 @@ function coerceRef(returnFiber, current, element) {
return returnFiber;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
if ("textarea" !== returnFiber.type)
throw ((returnFiber = Object.prototype.toString.call(newChild)),
Error(
"Objects are not valid as a React child (found: " +
("[object Object]" === returnFiber
? "object with keys {" + Object.keys(newChild).join(", ") + "}"
: returnFiber) +
"). If you meant to render a collection of children, use an array instead."
));
returnFiber = Object.prototype.toString.call(newChild);
throw Error(
"Objects are not valid as a React child (found: " +
("[object Object]" === returnFiber
? "object with keys {" + Object.keys(newChild).join(", ") + "}"
: returnFiber) +
"). If you meant to render a collection of children, use an array instead."
);
}
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
@ -2792,7 +2791,7 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild
);
}
if (isArray(newChild) || getIteratorFn(newChild))
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(newChild = createFiberFromFragment(
newChild,
@ -2824,7 +2823,7 @@ function ChildReconciler(shouldTrackSideEffects) {
? updatePortal(returnFiber, oldFiber, newChild, lanes)
: null;
}
if (isArray(newChild) || getIteratorFn(newChild))
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return null !== key
? null
: updateFragment(returnFiber, oldFiber, newChild, lanes, null);
@ -2863,7 +2862,7 @@ function ChildReconciler(shouldTrackSideEffects) {
updatePortal(returnFiber, existingChildren, newChild, lanes)
);
}
if (isArray(newChild) || getIteratorFn(newChild))
if (isArrayImpl(newChild) || getIteratorFn(newChild))
return (
(existingChildren = existingChildren.get(newIdx) || null),
updateFragment(returnFiber, existingChildren, newChild, lanes, null)
@ -3046,20 +3045,19 @@ function ChildReconciler(shouldTrackSideEffects) {
newChild.type === REACT_FRAGMENT_TYPE &&
null === newChild.key;
isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
var isObject = "object" === typeof newChild && null !== newChild;
if (isObject)
if ("object" === typeof newChild && null !== newChild) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
a: {
isObject = newChild.key;
var key = newChild.key;
for (
isUnkeyedTopLevelFragment = currentFirstChild;
null !== isUnkeyedTopLevelFragment;
) {
if (isUnkeyedTopLevelFragment.key === isObject) {
isObject = newChild.type;
if (isObject === REACT_FRAGMENT_TYPE) {
if (isUnkeyedTopLevelFragment.key === key) {
key = newChild.type;
if (key === REACT_FRAGMENT_TYPE) {
if (7 === isUnkeyedTopLevelFragment.tag) {
deleteRemainingChildren(
returnFiber,
@ -3073,7 +3071,7 @@ function ChildReconciler(shouldTrackSideEffects) {
returnFiber = currentFirstChild;
break a;
}
} else if (isUnkeyedTopLevelFragment.elementType === isObject) {
} else if (isUnkeyedTopLevelFragment.elementType === key) {
deleteRemainingChildren(
returnFiber,
isUnkeyedTopLevelFragment.sibling
@ -3165,6 +3163,22 @@ function ChildReconciler(shouldTrackSideEffects) {
}
return placeSingleChild(returnFiber);
}
if (isArrayImpl(newChild))
return reconcileChildrenArray(
returnFiber,
currentFirstChild,
newChild,
lanes
);
if (getIteratorFn(newChild))
return reconcileChildrenIterator(
returnFiber,
currentFirstChild,
newChild,
lanes
);
throwOnInvalidObjectType(returnFiber, newChild);
}
if ("string" === typeof newChild || "number" === typeof newChild)
return (
(newChild = "" + newChild),
@ -3183,21 +3197,6 @@ function ChildReconciler(shouldTrackSideEffects) {
(returnFiber = currentFirstChild)),
placeSingleChild(returnFiber)
);
if (isArray(newChild))
return reconcileChildrenArray(
returnFiber,
currentFirstChild,
newChild,
lanes
);
if (getIteratorFn(newChild))
return reconcileChildrenIterator(
returnFiber,
currentFirstChild,
newChild,
lanes
);
isObject && throwOnInvalidObjectType(returnFiber, newChild);
if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
switch (returnFiber.tag) {
case 1:
@ -3662,7 +3661,7 @@ function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
hook.memoizedState = pushEffect(1 | hookFlags, create, destroy, deps);
}
function mountEffect(create, deps) {
return mountEffectImpl(263168, 4, create, deps);
return mountEffectImpl(1049600, 4, create, deps);
}
function updateEffect(create, deps) {
return updateEffectImpl(1024, 4, create, deps);
@ -4655,7 +4654,7 @@ function updateSuspenseFallbackChildren(
(primaryChildren.pendingProps = primaryChildProps),
(workInProgress.deletions = null))
: ((primaryChildren = createWorkInProgress(current, primaryChildProps)),
(primaryChildren.subtreeFlags = current.subtreeFlags & 262144));
(primaryChildren.subtreeFlags = current.subtreeFlags & 1835008));
null !== currentFallbackChildFragment
? (fallbackChildren = createWorkInProgress(
currentFallbackChildFragment,
@ -5015,14 +5014,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
break;
case "collapsed":
lastTailNode = renderState.tail;
for (var lastTailNode$62 = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (lastTailNode$62 = lastTailNode),
for (var lastTailNode$64 = null; null !== lastTailNode; )
null !== lastTailNode.alternate && (lastTailNode$64 = lastTailNode),
(lastTailNode = lastTailNode.sibling);
null === lastTailNode$62
null === lastTailNode$64
? hasRenderedATailFallback || null === renderState.tail
? (renderState.tail = null)
: (renderState.tail.sibling = null)
: (lastTailNode$62.sibling = null);
: (lastTailNode$64.sibling = null);
}
}
function bubbleProperties(completedWork) {
@ -5032,19 +5031,19 @@ function bubbleProperties(completedWork) {
newChildLanes = 0,
subtreeFlags = 0;
if (didBailout)
for (var child$63 = completedWork.child; null !== child$63; )
(newChildLanes |= child$63.lanes | child$63.childLanes),
(subtreeFlags |= child$63.subtreeFlags & 262144),
(subtreeFlags |= child$63.flags & 262144),
(child$63.return = completedWork),
(child$63 = child$63.sibling);
for (var child$65 = completedWork.child; null !== child$65; )
(newChildLanes |= child$65.lanes | child$65.childLanes),
(subtreeFlags |= child$65.subtreeFlags & 1835008),
(subtreeFlags |= child$65.flags & 1835008),
(child$65.return = completedWork),
(child$65 = child$65.sibling);
else
for (child$63 = completedWork.child; null !== child$63; )
(newChildLanes |= child$63.lanes | child$63.childLanes),
(subtreeFlags |= child$63.subtreeFlags),
(subtreeFlags |= child$63.flags),
(child$63.return = completedWork),
(child$63 = child$63.sibling);
for (child$65 = completedWork.child; null !== child$65; )
(newChildLanes |= child$65.lanes | child$65.childLanes),
(subtreeFlags |= child$65.subtreeFlags),
(subtreeFlags |= child$65.flags),
(child$65.return = completedWork),
(child$65 = child$65.sibling);
completedWork.subtreeFlags |= subtreeFlags;
completedWork.childLanes = newChildLanes;
return didBailout;
@ -5241,7 +5240,7 @@ function completeWork(current, workInProgress, renderLanes) {
for (newProps = workInProgress.child; null !== newProps; )
(renderLanes = newProps),
(type = current),
(renderLanes.flags &= 262146),
(renderLanes.flags &= 1835010),
(updatePayload = renderLanes.alternate),
null === updatePayload
? ((renderLanes.childLanes = 0),
@ -5615,8 +5614,8 @@ function commitHookEffectListMount(tag, finishedWork) {
var effect = (finishedWork = finishedWork.next);
do {
if ((effect.tag & tag) === tag) {
var create$80 = effect.create;
effect.destroy = create$80();
var create$82 = effect.create;
effect.destroy = create$82();
}
effect = effect.next;
} while (effect !== finishedWork);
@ -5868,8 +5867,8 @@ function commitLayoutEffects(finishedWork) {
commitUpdateQueue(firstChild, updateQueue, instance);
break;
case 3:
var updateQueue$81 = firstChild.updateQueue;
if (null !== updateQueue$81) {
var updateQueue$83 = firstChild.updateQueue;
if (null !== updateQueue$83) {
current = null;
if (null !== firstChild.child)
switch (firstChild.child.tag) {
@ -5879,7 +5878,7 @@ function commitLayoutEffects(finishedWork) {
case 1:
current = firstChild.child.stateNode;
}
commitUpdateQueue(firstChild, updateQueue$81, current);
commitUpdateQueue(firstChild, updateQueue$83, current);
}
break;
case 5:
@ -5942,6 +5941,7 @@ function commitLayoutEffects(finishedWork) {
var ceil = Math.ceil,
ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig,
executionContext = 0,
workInProgressRoot = null,
workInProgress = null,
@ -6393,15 +6393,15 @@ function handleError(root$jscomp$0, thrownValue) {
}
var hasInvisibleParentBoundary =
0 !== (suspenseStackCursor.current & 1),
workInProgress$75 = returnFiber;
workInProgress$77 = returnFiber;
do {
var JSCompiler_temp;
if ((JSCompiler_temp = 13 === workInProgress$75.tag)) {
var nextState = workInProgress$75.memoizedState;
if ((JSCompiler_temp = 13 === workInProgress$77.tag)) {
var nextState = workInProgress$77.memoizedState;
if (null !== nextState)
JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
else {
var props = workInProgress$75.memoizedProps;
var props = workInProgress$77.memoizedProps;
JSCompiler_temp =
void 0 === props.fallback
? !1
@ -6413,17 +6413,17 @@ function handleError(root$jscomp$0, thrownValue) {
}
}
if (JSCompiler_temp) {
var wakeables = workInProgress$75.updateQueue;
var wakeables = workInProgress$77.updateQueue;
if (null === wakeables) {
var updateQueue = new Set();
updateQueue.add(wakeable);
workInProgress$75.updateQueue = updateQueue;
workInProgress$77.updateQueue = updateQueue;
} else wakeables.add(wakeable);
if (
0 === (workInProgress$75.mode & 1) &&
workInProgress$75 !== returnFiber
0 === (workInProgress$77.mode & 1) &&
workInProgress$77 !== returnFiber
) {
workInProgress$75.flags |= 128;
workInProgress$77.flags |= 128;
sourceFiber.flags |= 32768;
sourceFiber.flags &= -10053;
if (1 === sourceFiber.tag)
@ -6456,12 +6456,12 @@ function handleError(root$jscomp$0, thrownValue) {
);
wakeable.then(ping, ping);
}
workInProgress$75.flags |= 16384;
workInProgress$75.lanes = thrownValue;
workInProgress$77.flags |= 16384;
workInProgress$77.lanes = thrownValue;
break a;
}
workInProgress$75 = workInProgress$75.return;
} while (null !== workInProgress$75);
workInProgress$77 = workInProgress$77.return;
} while (null !== workInProgress$77);
value = Error(
(getComponentNameFromFiber(sourceFiber) || "A React component") +
" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."
@ -6470,47 +6470,47 @@ function handleError(root$jscomp$0, thrownValue) {
5 !== workInProgressRootExitStatus &&
(workInProgressRootExitStatus = 2);
value = createCapturedValue(value, sourceFiber);
workInProgress$75 = returnFiber;
workInProgress$77 = returnFiber;
do {
switch (workInProgress$75.tag) {
switch (workInProgress$77.tag) {
case 3:
root = value;
workInProgress$75.flags |= 16384;
workInProgress$77.flags |= 16384;
thrownValue &= -thrownValue;
workInProgress$75.lanes |= thrownValue;
var update$76 = createRootErrorUpdate(
workInProgress$75,
workInProgress$77.lanes |= thrownValue;
var update$78 = createRootErrorUpdate(
workInProgress$77,
root,
thrownValue
);
enqueueCapturedUpdate(workInProgress$75, update$76);
enqueueCapturedUpdate(workInProgress$77, update$78);
break a;
case 1:
root = value;
var ctor = workInProgress$75.type,
instance = workInProgress$75.stateNode;
var ctor = workInProgress$77.type,
instance = workInProgress$77.stateNode;
if (
0 === (workInProgress$75.flags & 128) &&
0 === (workInProgress$77.flags & 128) &&
("function" === typeof ctor.getDerivedStateFromError ||
(null !== instance &&
"function" === typeof instance.componentDidCatch &&
(null === legacyErrorBoundariesThatAlreadyFailed ||
!legacyErrorBoundariesThatAlreadyFailed.has(instance))))
) {
workInProgress$75.flags |= 16384;
workInProgress$77.flags |= 16384;
thrownValue &= -thrownValue;
workInProgress$75.lanes |= thrownValue;
var update$79 = createClassErrorUpdate(
workInProgress$75,
workInProgress$77.lanes |= thrownValue;
var update$81 = createClassErrorUpdate(
workInProgress$77,
root,
thrownValue
);
enqueueCapturedUpdate(workInProgress$75, update$79);
enqueueCapturedUpdate(workInProgress$77, update$81);
break a;
}
}
workInProgress$75 = workInProgress$75.return;
} while (null !== workInProgress$75);
workInProgress$77 = workInProgress$77.return;
} while (null !== workInProgress$77);
}
completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
@ -6601,12 +6601,15 @@ function completeUnitOfWork(unitOfWork) {
0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);
}
function commitRoot(root) {
var previousUpdateLanePriority = currentUpdatePriority;
var previousUpdateLanePriority = currentUpdatePriority,
prevTransition = ReactCurrentBatchConfig$2.transition;
try {
(currentUpdatePriority = 1),
(ReactCurrentBatchConfig$2.transition = 0),
(currentUpdatePriority = 1),
commitRootImpl(root, previousUpdateLanePriority);
} finally {
currentUpdatePriority = previousUpdateLanePriority;
(ReactCurrentBatchConfig$2.transition = prevTransition),
(currentUpdatePriority = previousUpdateLanePriority);
}
return null;
}
@ -6641,7 +6644,9 @@ function commitRootImpl(root, renderPriorityLevel) {
}));
remainingLanes = 0 !== (finishedWork.flags & 8054);
if (0 !== (finishedWork.subtreeFlags & 8054) || remainingLanes) {
remainingLanes = currentUpdatePriority;
remainingLanes = ReactCurrentBatchConfig$2.transition;
ReactCurrentBatchConfig$2.transition = 0;
var previousPriority = currentUpdatePriority;
currentUpdatePriority = 1;
var prevExecutionContext = executionContext;
executionContext |= 16;
@ -6652,7 +6657,8 @@ function commitRootImpl(root, renderPriorityLevel) {
commitLayoutEffects(finishedWork, root, lanes);
requestPaint();
executionContext = prevExecutionContext;
currentUpdatePriority = remainingLanes;
currentUpdatePriority = previousPriority;
ReactCurrentBatchConfig$2.transition = remainingLanes;
} else root.current = finishedWork;
rootDoesHavePassiveEffects &&
((rootDoesHavePassiveEffects = !1),
@ -6673,26 +6679,31 @@ function commitRootImpl(root, renderPriorityLevel) {
(firstUncaughtError = null),
root);
if (0 !== (executionContext & 4)) return null;
0 !== (pendingPassiveEffectsLanes & 1) &&
0 !== root.tag &&
flushPassiveEffects();
flushSyncCallbackQueue();
return null;
}
function flushPassiveEffects() {
if (0 !== pendingPassiveEffectsLanes) {
var b = lanesToEventPriority(pendingPassiveEffectsLanes),
if (null !== rootWithPendingPassiveEffects) {
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes),
prevTransition = ReactCurrentBatchConfig$2.transition,
previousPriority = currentUpdatePriority;
try {
currentUpdatePriority = 16 < b ? 16 : b;
ReactCurrentBatchConfig$2.transition = 0;
currentUpdatePriority = 16 > renderPriority ? 16 : renderPriority;
if (null === rootWithPendingPassiveEffects)
var JSCompiler_inline_result = !1;
else {
var root = rootWithPendingPassiveEffects;
renderPriority = rootWithPendingPassiveEffects;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsLanes = 0;
if (0 !== (executionContext & 24))
throw Error("Cannot flush passive effects while already rendering.");
b = executionContext;
var prevExecutionContext = executionContext;
executionContext |= 16;
for (nextEffect = root.current; null !== nextEffect; ) {
for (nextEffect = renderPriority.current; null !== nextEffect; ) {
var fiber = nextEffect,
child = fiber.child;
if (0 !== (nextEffect.flags & 16)) {
@ -6767,7 +6778,7 @@ function flushPassiveEffects() {
nextEffect = fiber.return;
}
}
var finishedWork = root.current;
var finishedWork = renderPriority.current;
for (nextEffect = finishedWork; null !== nextEffect; ) {
child = nextEffect;
var firstChild = child.child;
@ -6800,13 +6811,21 @@ function flushPassiveEffects() {
nextEffect = deletions.return;
}
}
executionContext = b;
executionContext = prevExecutionContext;
flushSyncCallbackQueue();
if (
injectedHook &&
"function" === typeof injectedHook.onPostCommitFiberRoot
)
try {
injectedHook.onPostCommitFiberRoot(rendererID, renderPriority);
} catch (err) {}
JSCompiler_inline_result = !0;
}
return JSCompiler_inline_result;
} finally {
currentUpdatePriority = previousPriority;
(currentUpdatePriority = previousPriority),
(ReactCurrentBatchConfig$2.transition = prevTransition);
}
}
return !1;
@ -7025,14 +7044,6 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
? nextValue.state
: null;
initializeUpdateQueue(workInProgress);
var getDerivedStateFromProps = updateLanes.getDerivedStateFromProps;
"function" === typeof getDerivedStateFromProps &&
applyDerivedStateFromProps(
workInProgress,
updateLanes,
getDerivedStateFromProps,
current
);
nextValue.updater = classComponentUpdater;
workInProgress.stateNode = nextValue;
nextValue._reactInternals = workInProgress;
@ -7247,11 +7258,11 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateLanes = workInProgress.type._context;
nextValue = workInProgress.pendingProps;
hasContext = workInProgress.memoizedProps;
getDerivedStateFromProps = nextValue.value;
var newValue = nextValue.value;
push(valueCursor, updateLanes._currentValue2);
updateLanes._currentValue2 = getDerivedStateFromProps;
updateLanes._currentValue2 = newValue;
if (null !== hasContext)
if (objectIs(hasContext.value, getDerivedStateFromProps)) {
if (objectIs(hasContext.value, newValue)) {
if (
hasContext.children === nextValue.children &&
!didPerformWorkStackCursor.current
@ -7265,25 +7276,24 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
for (
getDerivedStateFromProps = workInProgress.child,
null !== getDerivedStateFromProps &&
(getDerivedStateFromProps.return = workInProgress);
null !== getDerivedStateFromProps;
newValue = workInProgress.child,
null !== newValue && (newValue.return = workInProgress);
null !== newValue;
) {
var list = getDerivedStateFromProps.dependencies;
var list = newValue.dependencies;
if (null !== list) {
hasContext = getDerivedStateFromProps.child;
hasContext = newValue.child;
for (
var dependency = list.firstContext;
null !== dependency;
) {
if (dependency.context === updateLanes) {
if (1 === getDerivedStateFromProps.tag) {
if (1 === newValue.tag) {
dependency = createUpdate(-1, renderLanes & -renderLanes);
dependency.tag = 2;
var updateQueue = getDerivedStateFromProps.updateQueue;
var updateQueue = newValue.updateQueue;
if (null !== updateQueue) {
updateQueue = updateQueue.shared;
var pending = updateQueue.pending;
@ -7294,13 +7304,10 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
updateQueue.pending = dependency;
}
}
getDerivedStateFromProps.lanes |= renderLanes;
dependency = getDerivedStateFromProps.alternate;
newValue.lanes |= renderLanes;
dependency = newValue.alternate;
null !== dependency && (dependency.lanes |= renderLanes);
scheduleWorkOnParentPath(
getDerivedStateFromProps.return,
renderLanes
);
scheduleWorkOnParentPath(newValue.return, renderLanes);
list.lanes |= renderLanes;
break;
}
@ -7308,32 +7315,27 @@ beginWork$1 = function(current, workInProgress, renderLanes) {
}
} else
hasContext =
10 === getDerivedStateFromProps.tag
? getDerivedStateFromProps.type === workInProgress.type
10 === newValue.tag
? newValue.type === workInProgress.type
? null
: getDerivedStateFromProps.child
: getDerivedStateFromProps.child;
if (null !== hasContext)
hasContext.return = getDerivedStateFromProps;
: newValue.child
: newValue.child;
if (null !== hasContext) hasContext.return = newValue;
else
for (
hasContext = getDerivedStateFromProps;
null !== hasContext;
) {
for (hasContext = newValue; null !== hasContext; ) {
if (hasContext === workInProgress) {
hasContext = null;
break;
}
getDerivedStateFromProps = hasContext.sibling;
if (null !== getDerivedStateFromProps) {
getDerivedStateFromProps.return = hasContext.return;
hasContext = getDerivedStateFromProps;
newValue = hasContext.sibling;
if (null !== newValue) {
newValue.return = hasContext.return;
hasContext = newValue;
break;
}
hasContext = hasContext.return;
}
getDerivedStateFromProps = hasContext;
newValue = hasContext;
}
reconcileChildren(
current,
@ -7472,7 +7474,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
workInProgress.flags = current.flags & 262144;
workInProgress.flags = current.flags & 1835008;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
@ -7736,7 +7738,7 @@ batchedUpdatesImpl = function(fn, a) {
}
};
var roots = new Map(),
devToolsConfig$jscomp$inline_940 = {
devToolsConfig$jscomp$inline_941 = {
findFiberByHostInstance: getInstanceFromInstance,
bundleType: 0,
version: "17.0.3",
@ -7754,11 +7756,11 @@ var roots = new Map(),
}.bind(null, findNodeHandle)
}
};
var internals$jscomp$inline_1171 = {
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_1175 = {
bundleType: devToolsConfig$jscomp$inline_941.bundleType,
version: devToolsConfig$jscomp$inline_941.version,
rendererPackageName: devToolsConfig$jscomp$inline_941.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_941.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
@ -7773,25 +7775,26 @@ var internals$jscomp$inline_1171 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_940.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_941.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null
getCurrentFiber: null,
reconcilerVersion: "17.0.3"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1172 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1176 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1172.isDisabled &&
hook$jscomp$inline_1172.supportsFiber
!hook$jscomp$inline_1176.isDisabled &&
hook$jscomp$inline_1176.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1172.inject(
internals$jscomp$inline_1171
(rendererID = hook$jscomp$inline_1176.inject(
internals$jscomp$inline_1175
)),
(injectedHook = hook$jscomp$inline_1172);
(injectedHook = hook$jscomp$inline_1176);
} catch (err) {}
}
exports.createPortal = function(children, containerTag) {

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу