mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
This PR relands #28672 on top of the flag removal and the test
demonstrating a breakage in Suspense for legacy mode.
React has deprecated module pattern Function Components for many years
at this point. Supporting this pattern required React to have a concept
of an indeterminate component so that when a component first renders it
can turn into either a ClassComponent or a FunctionComponent depending
on what it returns. While this feature was deprecated and put behind a
flag it is still in stable. This change remvoes the flag, removes the
warnings, and removes the concept of IndeterminateComponent from the
React codebase.
While removing IndeterminateComponent type Seb and I discovered that we
needed a concept of IncompleteFunctionComponent to support Suspense in
legacy mode. This new work tag is only needed as long as legacy mode is
around and ideally any code that considers this tag will be excludable
from OSS builds once we land extra gates using `disableLegacyMode` flag.
DiffTrain build for [5998a77519](https://github.com/facebook/react/commit/5998a775194f491afa5d3badd9afe9ceaf12845e)
This commit is contained in:
@@ -1 +1 @@
|
||||
5fcaa0a832db9573364cb73738e0a3b4cf2d27f2
|
||||
5998a775194f491afa5d3badd9afe9ceaf12845e
|
||||
|
||||
@@ -66,7 +66,7 @@ if (__DEV__) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-classic-19a521f0";
|
||||
var ReactVersion = "19.0.0-www-classic-1a37f8de";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -198,8 +198,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -226,6 +224,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -496,7 +495,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -3760,7 +3758,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -6119,7 +6116,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -13852,17 +13848,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var isLegacyContextConsumer = false;
|
||||
var unmaskedContext = emptyContextObject;
|
||||
@@ -13938,7 +13923,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -14862,6 +14854,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -15395,7 +15395,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -15406,7 +15405,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -16118,6 +16116,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -16125,6 +16141,39 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
{
|
||||
@@ -16603,70 +16652,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16728,116 +16775,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
{
|
||||
var unmaskedContext = getUnmaskedContext(
|
||||
workInProgress,
|
||||
Component,
|
||||
false
|
||||
);
|
||||
context = getMaskedContext(workInProgress, unmaskedContext);
|
||||
}
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStarted(workInProgress);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStopped();
|
||||
} // React DevTools reads this flag.
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -16874,33 +16811,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -16909,16 +16845,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18796,15 +18732,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -18949,6 +18876,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -20545,10 +20490,10 @@ if (__DEV__) {
|
||||
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -27703,12 +27648,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -29069,7 +29008,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -29868,22 +29806,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -29968,7 +29892,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -30094,7 +30017,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ if (__DEV__) {
|
||||
return self;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-modern-55690e70";
|
||||
var ReactVersion = "19.0.0-www-modern-d5826a7d";
|
||||
|
||||
var LegacyRoot = 0;
|
||||
var ConcurrentRoot = 1;
|
||||
@@ -198,8 +198,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -226,6 +224,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -496,7 +495,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -3525,7 +3523,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -5884,7 +5881,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -13609,17 +13605,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var context = emptyContextObject;
|
||||
var contextType = ctor.contextType;
|
||||
@@ -13685,7 +13670,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -14586,6 +14578,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -15119,7 +15119,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -15130,7 +15129,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -15842,6 +15840,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -15849,6 +15865,47 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
"%s uses the legacy contextTypes API which was removed in React 19. " +
|
||||
"Use React.createContext() with React.useContext() instead.",
|
||||
getComponentNameFromType(Component) || "Unknown"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
var nextChildren;
|
||||
@@ -16297,70 +16354,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16421,117 +16476,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStarted(workInProgress);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStopped();
|
||||
} // React DevTools reads this flag.
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
"%s uses the legacy contextTypes API which was removed in React 19. " +
|
||||
"Use React.createContext() with React.useContext() instead.",
|
||||
getComponentNameFromType(Component) || "Unknown"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -16568,33 +16512,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -16603,16 +16546,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18484,15 +18427,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -18637,6 +18571,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -20233,10 +20185,10 @@ if (__DEV__) {
|
||||
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -27362,12 +27314,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -28719,7 +28665,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -29518,22 +29463,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -29618,7 +29549,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -29744,7 +29674,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
|
||||
@@ -226,7 +226,6 @@ function getComponentNameFromFiber(fiber) {
|
||||
case 1:
|
||||
case 0:
|
||||
case 17:
|
||||
case 2:
|
||||
case 14:
|
||||
case 15:
|
||||
if ("function" === typeof type)
|
||||
@@ -1661,7 +1660,6 @@ function describeFiber(fiber) {
|
||||
case 19:
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
case 0:
|
||||
case 2:
|
||||
case 15:
|
||||
return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber;
|
||||
case 11:
|
||||
@@ -4114,12 +4112,15 @@ function throwException(
|
||||
: ((value.flags |= 128),
|
||||
(sourceFiber.flags |= 131072),
|
||||
(sourceFiber.flags &= -52805),
|
||||
1 === sourceFiber.tag &&
|
||||
(null === sourceFiber.alternate
|
||||
1 === sourceFiber.tag
|
||||
? null === sourceFiber.alternate
|
||||
? (sourceFiber.tag = 17)
|
||||
: ((returnFiber = createUpdate(2)),
|
||||
(returnFiber.tag = 2),
|
||||
enqueueUpdate(sourceFiber, returnFiber, 2))),
|
||||
enqueueUpdate(sourceFiber, returnFiber, 2))
|
||||
: 0 === sourceFiber.tag &&
|
||||
null === sourceFiber.alternate &&
|
||||
(sourceFiber.tag = 28),
|
||||
(sourceFiber.lanes |= 2))
|
||||
: ((value.flags |= 65536), (value.lanes = rootRenderLanes)),
|
||||
wakeable === noopSuspenseyCommitThenable
|
||||
@@ -5603,107 +5604,91 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
else didReceiveUpdate = !1;
|
||||
workInProgress.lanes = 0;
|
||||
switch (workInProgress.tag) {
|
||||
case 2:
|
||||
var Component = workInProgress.type;
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
|
||||
current = workInProgress.pendingProps;
|
||||
var context = getMaskedContext(
|
||||
workInProgress,
|
||||
contextStackCursor$1.current
|
||||
);
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
current = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
workInProgress.flags |= 1;
|
||||
workInProgress.tag = 0;
|
||||
reconcileChildren(null, workInProgress, current, renderLanes);
|
||||
return workInProgress.child;
|
||||
case 16:
|
||||
Component = workInProgress.elementType;
|
||||
var elementType = workInProgress.elementType;
|
||||
a: {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
|
||||
current = workInProgress.pendingProps;
|
||||
context = Component._init;
|
||||
Component = context(Component._payload);
|
||||
workInProgress.type = Component;
|
||||
context = workInProgress.tag = resolveLazyComponentTag(Component);
|
||||
current = resolveDefaultProps(Component, current);
|
||||
switch (context) {
|
||||
case 0:
|
||||
workInProgress = updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
case 1:
|
||||
workInProgress = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
case 11:
|
||||
workInProgress = updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
case 14:
|
||||
workInProgress = updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, current),
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
var init = elementType._init;
|
||||
elementType = init(elementType._payload);
|
||||
workInProgress.type = elementType;
|
||||
current = resolveDefaultProps(elementType, current);
|
||||
if ("function" === typeof elementType)
|
||||
shouldConstruct(elementType)
|
||||
? ((workInProgress.tag = 1),
|
||||
(workInProgress = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
current,
|
||||
renderLanes
|
||||
)))
|
||||
: ((workInProgress.tag = 0),
|
||||
(workInProgress = updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
current,
|
||||
renderLanes
|
||||
)));
|
||||
else {
|
||||
if (void 0 !== elementType && null !== elementType)
|
||||
if (
|
||||
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
|
||||
) {
|
||||
workInProgress.tag = 11;
|
||||
workInProgress = updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
} else if (init === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = 14;
|
||||
workInProgress = updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
resolveDefaultProps(elementType.type, current),
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
throw Error(formatProdErrorMessage(306, elementType, ""));
|
||||
}
|
||||
throw Error(formatProdErrorMessage(306, Component, ""));
|
||||
}
|
||||
return workInProgress;
|
||||
case 0:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(context = workInProgress.pendingProps),
|
||||
(context =
|
||||
workInProgress.elementType === Component
|
||||
? context
|
||||
: resolveDefaultProps(Component, context)),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
Component,
|
||||
context,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
case 1:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(context = workInProgress.pendingProps),
|
||||
(context =
|
||||
workInProgress.elementType === Component
|
||||
? context
|
||||
: resolveDefaultProps(Component, context)),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
updateClassComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
Component,
|
||||
context,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
@@ -5711,8 +5696,8 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
pushHostRootContext(workInProgress);
|
||||
if (null === current) throw Error(formatProdErrorMessage(387));
|
||||
var nextProps = workInProgress.pendingProps;
|
||||
context = workInProgress.memoizedState;
|
||||
Component = context.element;
|
||||
init = workInProgress.memoizedState;
|
||||
elementType = init.element;
|
||||
cloneUpdateQueue(current, workInProgress);
|
||||
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
|
||||
nextProps = workInProgress.memoizedState;
|
||||
@@ -5721,17 +5706,17 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
enableTransitionTracing && pushRootMarkerInstance(workInProgress);
|
||||
var nextCache = nextProps.cache;
|
||||
pushProvider(workInProgress, CacheContext, nextCache);
|
||||
nextCache !== context.cache &&
|
||||
nextCache !== init.cache &&
|
||||
propagateContextChange(workInProgress, CacheContext, renderLanes);
|
||||
suspendIfUpdateReadFromEntangledAsyncAction();
|
||||
context = nextProps.element;
|
||||
context === Component
|
||||
init = nextProps.element;
|
||||
init === elementType
|
||||
? (workInProgress = bailoutOnAlreadyFinishedWork(
|
||||
current,
|
||||
workInProgress,
|
||||
renderLanes
|
||||
))
|
||||
: (reconcileChildren(current, workInProgress, context, renderLanes),
|
||||
: (reconcileChildren(current, workInProgress, init, renderLanes),
|
||||
(workInProgress = workInProgress.child));
|
||||
return workInProgress;
|
||||
case 26:
|
||||
@@ -5739,17 +5724,17 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
case 5:
|
||||
return (
|
||||
pushHostContext(workInProgress),
|
||||
(context = workInProgress.type),
|
||||
(init = workInProgress.type),
|
||||
(nextProps = workInProgress.pendingProps),
|
||||
(nextCache = null !== current ? current.memoizedProps : null),
|
||||
(Component = nextProps.children),
|
||||
shouldSetTextContent(context, nextProps)
|
||||
? (Component = null)
|
||||
(elementType = nextProps.children),
|
||||
shouldSetTextContent(init, nextProps)
|
||||
? (elementType = null)
|
||||
: null !== nextCache &&
|
||||
shouldSetTextContent(context, nextCache) &&
|
||||
shouldSetTextContent(init, nextCache) &&
|
||||
(workInProgress.flags |= 32),
|
||||
null !== workInProgress.memoizedState &&
|
||||
((context = renderWithHooks(
|
||||
((init = renderWithHooks(
|
||||
current,
|
||||
workInProgress,
|
||||
TransitionAwareHostComponent,
|
||||
@@ -5757,18 +5742,18 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
null,
|
||||
renderLanes
|
||||
)),
|
||||
(HostTransitionContext._currentValue2 = context),
|
||||
(HostTransitionContext._currentValue2 = init),
|
||||
enableLazyContextPropagation ||
|
||||
(didReceiveUpdate &&
|
||||
null !== current &&
|
||||
current.memoizedState.memoizedState !== context &&
|
||||
current.memoizedState.memoizedState !== init &&
|
||||
propagateContextChange(
|
||||
workInProgress,
|
||||
HostTransitionContext,
|
||||
renderLanes
|
||||
))),
|
||||
markRef(current, workInProgress),
|
||||
reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
reconcileChildren(current, workInProgress, elementType, renderLanes),
|
||||
workInProgress.child
|
||||
);
|
||||
case 6:
|
||||
@@ -5781,30 +5766,35 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
workInProgress,
|
||||
workInProgress.stateNode.containerInfo
|
||||
),
|
||||
(Component = workInProgress.pendingProps),
|
||||
(elementType = workInProgress.pendingProps),
|
||||
null === current
|
||||
? (workInProgress.child = reconcileChildFibers(
|
||||
workInProgress,
|
||||
null,
|
||||
Component,
|
||||
elementType,
|
||||
renderLanes
|
||||
))
|
||||
: reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
: reconcileChildren(
|
||||
current,
|
||||
workInProgress,
|
||||
elementType,
|
||||
renderLanes
|
||||
),
|
||||
workInProgress.child
|
||||
);
|
||||
case 11:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(context = workInProgress.pendingProps),
|
||||
(context =
|
||||
workInProgress.elementType === Component
|
||||
? context
|
||||
: resolveDefaultProps(Component, context)),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
updateForwardRef(
|
||||
current,
|
||||
workInProgress,
|
||||
Component,
|
||||
context,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
@@ -5840,17 +5830,17 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
);
|
||||
case 10:
|
||||
a: {
|
||||
Component = enableRenderableContext
|
||||
elementType = enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context;
|
||||
context = workInProgress.pendingProps;
|
||||
init = workInProgress.pendingProps;
|
||||
nextProps = workInProgress.memoizedProps;
|
||||
nextCache = context.value;
|
||||
pushProvider(workInProgress, Component, nextCache);
|
||||
nextCache = init.value;
|
||||
pushProvider(workInProgress, elementType, nextCache);
|
||||
if (!enableLazyContextPropagation && null !== nextProps)
|
||||
if (objectIs(nextProps.value, nextCache)) {
|
||||
if (
|
||||
nextProps.children === context.children &&
|
||||
nextProps.children === init.children &&
|
||||
!didPerformWorkStackCursor.current
|
||||
) {
|
||||
workInProgress = bailoutOnAlreadyFinishedWork(
|
||||
@@ -5860,39 +5850,35 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
);
|
||||
break a;
|
||||
}
|
||||
} else propagateContextChange(workInProgress, Component, renderLanes);
|
||||
reconcileChildren(
|
||||
current,
|
||||
workInProgress,
|
||||
context.children,
|
||||
renderLanes
|
||||
);
|
||||
} else
|
||||
propagateContextChange(workInProgress, elementType, renderLanes);
|
||||
reconcileChildren(current, workInProgress, init.children, renderLanes);
|
||||
workInProgress = workInProgress.child;
|
||||
}
|
||||
return workInProgress;
|
||||
case 9:
|
||||
return (
|
||||
(context = enableRenderableContext
|
||||
(init = enableRenderableContext
|
||||
? workInProgress.type._context
|
||||
: workInProgress.type),
|
||||
(Component = workInProgress.pendingProps.children),
|
||||
(elementType = workInProgress.pendingProps.children),
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
(context = readContext(context)),
|
||||
(Component = Component(context)),
|
||||
(init = readContext(init)),
|
||||
(elementType = elementType(init)),
|
||||
(workInProgress.flags |= 1),
|
||||
reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
reconcileChildren(current, workInProgress, elementType, renderLanes),
|
||||
workInProgress.child
|
||||
);
|
||||
case 14:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(context = resolveDefaultProps(Component, workInProgress.pendingProps)),
|
||||
(context = resolveDefaultProps(Component.type, context)),
|
||||
(elementType = workInProgress.type),
|
||||
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
|
||||
(init = resolveDefaultProps(elementType.type, init)),
|
||||
updateMemoComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
Component,
|
||||
context,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
@@ -5906,36 +5892,54 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
);
|
||||
case 17:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(context = workInProgress.pendingProps),
|
||||
(context =
|
||||
workInProgress.elementType === Component
|
||||
? context
|
||||
: resolveDefaultProps(Component, context)),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
|
||||
(workInProgress.tag = 1),
|
||||
isContextProvider(Component)
|
||||
isContextProvider(elementType)
|
||||
? ((current = !0), pushContextProvider(workInProgress))
|
||||
: (current = !1),
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
constructClassInstance(workInProgress, Component, context),
|
||||
mountClassInstance(workInProgress, Component, context, renderLanes),
|
||||
constructClassInstance(workInProgress, elementType, init),
|
||||
mountClassInstance(workInProgress, elementType, init, renderLanes),
|
||||
finishClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
elementType,
|
||||
!0,
|
||||
current,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
case 28:
|
||||
return (
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
|
||||
(workInProgress.tag = 0),
|
||||
updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
case 19:
|
||||
return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
||||
case 21:
|
||||
return (
|
||||
(Component = workInProgress.pendingProps.children),
|
||||
(elementType = workInProgress.pendingProps.children),
|
||||
markRef(current, workInProgress),
|
||||
reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
reconcileChildren(current, workInProgress, elementType, renderLanes),
|
||||
workInProgress.child
|
||||
);
|
||||
case 22:
|
||||
@@ -5945,39 +5949,39 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
case 24:
|
||||
return (
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
(Component = readContext(CacheContext)),
|
||||
(elementType = readContext(CacheContext)),
|
||||
null === current
|
||||
? ((context = peekCacheFromPool()),
|
||||
null === context &&
|
||||
((context = workInProgressRoot),
|
||||
? ((init = peekCacheFromPool()),
|
||||
null === init &&
|
||||
((init = workInProgressRoot),
|
||||
(nextProps = createCache()),
|
||||
(context.pooledCache = nextProps),
|
||||
(init.pooledCache = nextProps),
|
||||
nextProps.refCount++,
|
||||
null !== nextProps && (context.pooledCacheLanes |= renderLanes),
|
||||
(context = nextProps)),
|
||||
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
|
||||
(init = nextProps)),
|
||||
(workInProgress.memoizedState = {
|
||||
parent: Component,
|
||||
cache: context
|
||||
parent: elementType,
|
||||
cache: init
|
||||
}),
|
||||
initializeUpdateQueue(workInProgress),
|
||||
pushProvider(workInProgress, CacheContext, context))
|
||||
pushProvider(workInProgress, CacheContext, init))
|
||||
: (0 !== (current.lanes & renderLanes) &&
|
||||
(cloneUpdateQueue(current, workInProgress),
|
||||
processUpdateQueue(workInProgress, null, null, renderLanes),
|
||||
suspendIfUpdateReadFromEntangledAsyncAction()),
|
||||
(context = current.memoizedState),
|
||||
(init = current.memoizedState),
|
||||
(nextProps = workInProgress.memoizedState),
|
||||
context.parent !== Component
|
||||
? ((context = { parent: Component, cache: Component }),
|
||||
(workInProgress.memoizedState = context),
|
||||
init.parent !== elementType
|
||||
? ((init = { parent: elementType, cache: elementType }),
|
||||
(workInProgress.memoizedState = init),
|
||||
0 === workInProgress.lanes &&
|
||||
(workInProgress.memoizedState =
|
||||
workInProgress.updateQueue.baseState =
|
||||
context),
|
||||
pushProvider(workInProgress, CacheContext, Component))
|
||||
: ((Component = nextProps.cache),
|
||||
pushProvider(workInProgress, CacheContext, Component),
|
||||
Component !== context.cache &&
|
||||
init),
|
||||
pushProvider(workInProgress, CacheContext, elementType))
|
||||
: ((elementType = nextProps.cache),
|
||||
pushProvider(workInProgress, CacheContext, elementType),
|
||||
elementType !== init.cache &&
|
||||
propagateContextChange(
|
||||
workInProgress,
|
||||
CacheContext,
|
||||
@@ -5996,22 +6000,22 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
return (
|
||||
enableTransitionTracing
|
||||
? (null === current &&
|
||||
((Component = enableTransitionTracing
|
||||
((elementType = enableTransitionTracing
|
||||
? transitionStack.current
|
||||
: null),
|
||||
null !== Component &&
|
||||
((Component = {
|
||||
null !== elementType &&
|
||||
((elementType = {
|
||||
tag: 1,
|
||||
transitions: new Set(Component),
|
||||
transitions: new Set(elementType),
|
||||
pendingBoundaries: null,
|
||||
name: workInProgress.pendingProps.name,
|
||||
aborts: null
|
||||
}),
|
||||
(workInProgress.stateNode = Component),
|
||||
(workInProgress.stateNode = elementType),
|
||||
(workInProgress.flags |= 2048))),
|
||||
(Component = workInProgress.stateNode),
|
||||
null !== Component &&
|
||||
pushMarkerInstance(workInProgress, Component),
|
||||
(elementType = workInProgress.stateNode),
|
||||
null !== elementType &&
|
||||
pushMarkerInstance(workInProgress, elementType),
|
||||
reconcileChildren(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -6496,14 +6500,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
||||
break;
|
||||
case "collapsed":
|
||||
lastTailNode = renderState.tail;
|
||||
for (var lastTailNode$77 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode),
|
||||
for (var lastTailNode$81 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$81 = lastTailNode),
|
||||
(lastTailNode = lastTailNode.sibling);
|
||||
null === lastTailNode$77
|
||||
null === lastTailNode$81
|
||||
? hasRenderedATailFallback || null === renderState.tail
|
||||
? (renderState.tail = null)
|
||||
: (renderState.tail.sibling = null)
|
||||
: (lastTailNode$77.sibling = null);
|
||||
: (lastTailNode$81.sibling = null);
|
||||
}
|
||||
}
|
||||
function bubbleProperties(completedWork) {
|
||||
@@ -6513,19 +6517,19 @@ function bubbleProperties(completedWork) {
|
||||
newChildLanes = 0,
|
||||
subtreeFlags = 0;
|
||||
if (didBailout)
|
||||
for (var child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$78.flags & 31457280),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (var child$82 = completedWork.child; null !== child$82; )
|
||||
(newChildLanes |= child$82.lanes | child$82.childLanes),
|
||||
(subtreeFlags |= child$82.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$82.flags & 31457280),
|
||||
(child$82.return = completedWork),
|
||||
(child$82 = child$82.sibling);
|
||||
else
|
||||
for (child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags),
|
||||
(subtreeFlags |= child$78.flags),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (child$82 = completedWork.child; null !== child$82; )
|
||||
(newChildLanes |= child$82.lanes | child$82.childLanes),
|
||||
(subtreeFlags |= child$82.subtreeFlags),
|
||||
(subtreeFlags |= child$82.flags),
|
||||
(child$82.return = completedWork),
|
||||
(child$82 = child$82.sibling);
|
||||
completedWork.subtreeFlags |= subtreeFlags;
|
||||
completedWork.childLanes = newChildLanes;
|
||||
return didBailout;
|
||||
@@ -6533,10 +6537,10 @@ function bubbleProperties(completedWork) {
|
||||
function completeWork(current, workInProgress, renderLanes) {
|
||||
var newProps = workInProgress.pendingProps;
|
||||
switch (workInProgress.tag) {
|
||||
case 2:
|
||||
case 16:
|
||||
case 15:
|
||||
case 0:
|
||||
case 28:
|
||||
case 11:
|
||||
case 7:
|
||||
case 8:
|
||||
@@ -6703,11 +6707,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
null !== newProps.alternate.memoizedState &&
|
||||
null !== newProps.alternate.memoizedState.cachePool &&
|
||||
(instance = newProps.alternate.memoizedState.cachePool.pool);
|
||||
var cache$82 = null;
|
||||
var cache$86 = null;
|
||||
null !== newProps.memoizedState &&
|
||||
null !== newProps.memoizedState.cachePool &&
|
||||
(cache$82 = newProps.memoizedState.cachePool.pool);
|
||||
cache$82 !== instance && (newProps.flags |= 2048);
|
||||
(cache$86 = newProps.memoizedState.cachePool.pool);
|
||||
cache$86 !== instance && (newProps.flags |= 2048);
|
||||
}
|
||||
renderLanes !== current &&
|
||||
(enableTransitionTracing && (workInProgress.child.flags |= 2048),
|
||||
@@ -6741,8 +6745,8 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
instance = workInProgress.memoizedState;
|
||||
if (null === instance) return bubbleProperties(workInProgress), null;
|
||||
newProps = 0 !== (workInProgress.flags & 128);
|
||||
cache$82 = instance.rendering;
|
||||
if (null === cache$82)
|
||||
cache$86 = instance.rendering;
|
||||
if (null === cache$86)
|
||||
if (newProps) cutOffTailIfNeeded(instance, !1);
|
||||
else {
|
||||
if (
|
||||
@@ -6750,11 +6754,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
(null !== current && 0 !== (current.flags & 128))
|
||||
)
|
||||
for (current = workInProgress.child; null !== current; ) {
|
||||
cache$82 = findFirstSuspended(current);
|
||||
if (null !== cache$82) {
|
||||
cache$86 = findFirstSuspended(current);
|
||||
if (null !== cache$86) {
|
||||
workInProgress.flags |= 128;
|
||||
cutOffTailIfNeeded(instance, !1);
|
||||
current = cache$82.updateQueue;
|
||||
current = cache$86.updateQueue;
|
||||
workInProgress.updateQueue = current;
|
||||
scheduleRetryEffect(workInProgress, current);
|
||||
workInProgress.subtreeFlags = 0;
|
||||
@@ -6779,7 +6783,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
}
|
||||
else {
|
||||
if (!newProps)
|
||||
if (((current = findFirstSuspended(cache$82)), null !== current)) {
|
||||
if (((current = findFirstSuspended(cache$86)), null !== current)) {
|
||||
if (
|
||||
((workInProgress.flags |= 128),
|
||||
(newProps = !0),
|
||||
@@ -6789,7 +6793,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !0),
|
||||
null === instance.tail &&
|
||||
"hidden" === instance.tailMode &&
|
||||
!cache$82.alternate)
|
||||
!cache$86.alternate)
|
||||
)
|
||||
return bubbleProperties(workInProgress), null;
|
||||
} else
|
||||
@@ -6801,13 +6805,13 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !1),
|
||||
(workInProgress.lanes = 4194304));
|
||||
instance.isBackwards
|
||||
? ((cache$82.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$82))
|
||||
? ((cache$86.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$86))
|
||||
: ((current = instance.last),
|
||||
null !== current
|
||||
? (current.sibling = cache$82)
|
||||
: (workInProgress.child = cache$82),
|
||||
(instance.last = cache$82));
|
||||
? (current.sibling = cache$86)
|
||||
: (workInProgress.child = cache$86),
|
||||
(instance.last = cache$86));
|
||||
}
|
||||
if (null !== instance.tail)
|
||||
return (
|
||||
@@ -7070,8 +7074,8 @@ function safelyDetachRef(current, nearestMountedAncestor) {
|
||||
else if ("function" === typeof ref)
|
||||
try {
|
||||
ref(null);
|
||||
} catch (error$100) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$100);
|
||||
} catch (error$104) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$104);
|
||||
}
|
||||
else ref.current = null;
|
||||
}
|
||||
@@ -7273,11 +7277,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
|
||||
current,
|
||||
finishedRoot.__reactInternalSnapshotBeforeUpdate
|
||||
);
|
||||
} catch (error$101) {
|
||||
} catch (error$105) {
|
||||
captureCommitPhaseError(
|
||||
finishedWork,
|
||||
finishedWork.return,
|
||||
error$101
|
||||
error$105
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7870,8 +7874,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
}
|
||||
try {
|
||||
commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
||||
} catch (error$109) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$109);
|
||||
} catch (error$113) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$113);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7905,8 +7909,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
finishedWork.updateQueue = null;
|
||||
try {
|
||||
flags._applyProps(flags, newProps, current);
|
||||
} catch (error$112) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$112);
|
||||
} catch (error$116) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$116);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7942,8 +7946,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
null !== retryQueue && suspenseCallback(new Set(retryQueue));
|
||||
}
|
||||
}
|
||||
} catch (error$114) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$114);
|
||||
} catch (error$118) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$118);
|
||||
}
|
||||
flags = finishedWork.updateQueue;
|
||||
null !== flags &&
|
||||
@@ -8083,12 +8087,12 @@ function commitReconciliationEffects(finishedWork) {
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
var parent$104 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$105 = getHostSibling(finishedWork);
|
||||
var parent$108 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$109 = getHostSibling(finishedWork);
|
||||
insertOrAppendPlacementNodeIntoContainer(
|
||||
finishedWork,
|
||||
before$105,
|
||||
parent$104
|
||||
before$109,
|
||||
parent$108
|
||||
);
|
||||
break;
|
||||
default:
|
||||
@@ -8549,9 +8553,9 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
);
|
||||
break;
|
||||
case 22:
|
||||
var instance$120 = finishedWork.stateNode;
|
||||
var instance$124 = finishedWork.stateNode;
|
||||
null !== finishedWork.memoizedState
|
||||
? instance$120._visibility & 4
|
||||
? instance$124._visibility & 4
|
||||
? recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8564,7 +8568,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork
|
||||
)
|
||||
: ((instance$120._visibility |= 4),
|
||||
: ((instance$124._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8572,7 +8576,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
committedTransitions,
|
||||
includeWorkInProgressEffects
|
||||
))
|
||||
: ((instance$120._visibility |= 4),
|
||||
: ((instance$124._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8585,7 +8589,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
commitOffscreenPassiveMountEffects(
|
||||
finishedWork.alternate,
|
||||
finishedWork,
|
||||
instance$120
|
||||
instance$124
|
||||
);
|
||||
break;
|
||||
case 24:
|
||||
@@ -9506,8 +9510,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$128) {
|
||||
handleThrow(root, thrownValue$128);
|
||||
} catch (thrownValue$132) {
|
||||
handleThrow(root, thrownValue$132);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -9612,8 +9616,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$130) {
|
||||
handleThrow(root, thrownValue$130);
|
||||
} catch (thrownValue$134) {
|
||||
handleThrow(root, thrownValue$134);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -9639,8 +9643,6 @@ function performUnitOfWork(unitOfWork) {
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate;
|
||||
switch (unitOfWork.tag) {
|
||||
case 2:
|
||||
unitOfWork.tag = 0;
|
||||
case 15:
|
||||
case 0:
|
||||
var Component = unitOfWork.type,
|
||||
@@ -10113,16 +10115,6 @@ function shouldConstruct(Component) {
|
||||
Component = Component.prototype;
|
||||
return !(!Component || !Component.isReactComponent);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if ("function" === typeof Component)
|
||||
return shouldConstruct(Component) ? 1 : 0;
|
||||
if (void 0 !== Component && null !== Component) {
|
||||
Component = Component.$$typeof;
|
||||
if (Component === REACT_FORWARD_REF_TYPE) return 11;
|
||||
if (Component === REACT_MEMO_TYPE) return 14;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
var workInProgress = current.alternate;
|
||||
null === workInProgress
|
||||
@@ -10200,7 +10192,7 @@ function createFiberFromTypeAndProps(
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = 2;
|
||||
var fiberTag = 0;
|
||||
owner = type;
|
||||
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
|
||||
else if ("string" === typeof type) fiberTag = 5;
|
||||
@@ -10652,19 +10644,19 @@ var slice = Array.prototype.slice,
|
||||
};
|
||||
return Text;
|
||||
})(React.Component),
|
||||
devToolsConfig$jscomp$inline_1119 = {
|
||||
devToolsConfig$jscomp$inline_1117 = {
|
||||
findFiberByHostInstance: function () {
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-classic-26116729",
|
||||
version: "19.0.0-www-classic-da81c41b",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1313 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1119.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1119.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1119.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1119.rendererConfig,
|
||||
var internals$jscomp$inline_1308 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1117.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1117.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1117.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1117.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10681,26 +10673,26 @@ var internals$jscomp$inline_1313 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1119.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1117.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-www-classic-26116729"
|
||||
reconcilerVersion: "19.0.0-www-classic-da81c41b"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1314 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1309 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1314.isDisabled &&
|
||||
hook$jscomp$inline_1314.supportsFiber
|
||||
!hook$jscomp$inline_1309.isDisabled &&
|
||||
hook$jscomp$inline_1309.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1314.inject(
|
||||
internals$jscomp$inline_1313
|
||||
(rendererID = hook$jscomp$inline_1309.inject(
|
||||
internals$jscomp$inline_1308
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1314);
|
||||
(injectedHook = hook$jscomp$inline_1309);
|
||||
} catch (err) {}
|
||||
}
|
||||
var Path = Mode$1.Path;
|
||||
|
||||
@@ -1459,7 +1459,6 @@ function describeFiber(fiber) {
|
||||
case 19:
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
case 0:
|
||||
case 2:
|
||||
case 15:
|
||||
return (fiber = describeNativeComponentFrame(fiber.type, !1)), fiber;
|
||||
case 11:
|
||||
@@ -3897,12 +3896,15 @@ function throwException(
|
||||
: ((value.flags |= 128),
|
||||
(sourceFiber.flags |= 131072),
|
||||
(sourceFiber.flags &= -52805),
|
||||
1 === sourceFiber.tag &&
|
||||
(null === sourceFiber.alternate
|
||||
1 === sourceFiber.tag
|
||||
? null === sourceFiber.alternate
|
||||
? (sourceFiber.tag = 17)
|
||||
: ((returnFiber = createUpdate(2)),
|
||||
(returnFiber.tag = 2),
|
||||
enqueueUpdate(sourceFiber, returnFiber, 2))),
|
||||
enqueueUpdate(sourceFiber, returnFiber, 2))
|
||||
: 0 === sourceFiber.tag &&
|
||||
null === sourceFiber.alternate &&
|
||||
(sourceFiber.tag = 28),
|
||||
(sourceFiber.lanes |= 2))
|
||||
: ((value.flags |= 65536), (value.lanes = rootRenderLanes)),
|
||||
wakeable === noopSuspenseyCommitThenable
|
||||
@@ -5347,102 +5349,90 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
else didReceiveUpdate = !1;
|
||||
workInProgress.lanes = 0;
|
||||
switch (workInProgress.tag) {
|
||||
case 2:
|
||||
var Component = workInProgress.type;
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
|
||||
current = workInProgress.pendingProps;
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
current = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
void 0,
|
||||
renderLanes
|
||||
);
|
||||
workInProgress.flags |= 1;
|
||||
workInProgress.tag = 0;
|
||||
reconcileChildren(null, workInProgress, current, renderLanes);
|
||||
return workInProgress.child;
|
||||
case 16:
|
||||
Component = workInProgress.elementType;
|
||||
var elementType = workInProgress.elementType;
|
||||
a: {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress);
|
||||
current = workInProgress.pendingProps;
|
||||
var init = Component._init;
|
||||
Component = init(Component._payload);
|
||||
workInProgress.type = Component;
|
||||
init = workInProgress.tag = resolveLazyComponentTag(Component);
|
||||
current = resolveDefaultProps(Component, current);
|
||||
switch (init) {
|
||||
case 0:
|
||||
workInProgress = updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
case 1:
|
||||
workInProgress = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
case 11:
|
||||
workInProgress = updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
case 14:
|
||||
workInProgress = updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, current),
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
var init = elementType._init;
|
||||
elementType = init(elementType._payload);
|
||||
workInProgress.type = elementType;
|
||||
current = resolveDefaultProps(elementType, current);
|
||||
if ("function" === typeof elementType)
|
||||
shouldConstruct(elementType)
|
||||
? ((workInProgress.tag = 1),
|
||||
(workInProgress = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
current,
|
||||
renderLanes
|
||||
)))
|
||||
: ((workInProgress.tag = 0),
|
||||
(workInProgress = updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
current,
|
||||
renderLanes
|
||||
)));
|
||||
else {
|
||||
if (void 0 !== elementType && null !== elementType)
|
||||
if (
|
||||
((init = elementType.$$typeof), init === REACT_FORWARD_REF_TYPE)
|
||||
) {
|
||||
workInProgress.tag = 11;
|
||||
workInProgress = updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
current,
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
} else if (init === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = 14;
|
||||
workInProgress = updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
resolveDefaultProps(elementType.type, current),
|
||||
renderLanes
|
||||
);
|
||||
break a;
|
||||
}
|
||||
throw Error(formatProdErrorMessage(306, elementType, ""));
|
||||
}
|
||||
throw Error(formatProdErrorMessage(306, Component, ""));
|
||||
}
|
||||
return workInProgress;
|
||||
case 0:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === Component
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(Component, init)),
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
Component,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
case 1:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === Component
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(Component, init)),
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
updateClassComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
Component,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
@@ -5452,7 +5442,7 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
if (null === current) throw Error(formatProdErrorMessage(387));
|
||||
var nextProps = workInProgress.pendingProps;
|
||||
init = workInProgress.memoizedState;
|
||||
Component = init.element;
|
||||
elementType = init.element;
|
||||
cloneUpdateQueue(current, workInProgress);
|
||||
processUpdateQueue(workInProgress, nextProps, null, renderLanes);
|
||||
nextProps = workInProgress.memoizedState;
|
||||
@@ -5465,7 +5455,7 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
propagateContextChange(workInProgress, CacheContext, renderLanes);
|
||||
suspendIfUpdateReadFromEntangledAsyncAction();
|
||||
init = nextProps.element;
|
||||
init === Component
|
||||
init === elementType
|
||||
? (workInProgress = bailoutOnAlreadyFinishedWork(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -5482,9 +5472,9 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
(init = workInProgress.type),
|
||||
(nextProps = workInProgress.pendingProps),
|
||||
(nextCache = null !== current ? current.memoizedProps : null),
|
||||
(Component = nextProps.children),
|
||||
(elementType = nextProps.children),
|
||||
shouldSetTextContent(init, nextProps)
|
||||
? (Component = null)
|
||||
? (elementType = null)
|
||||
: null !== nextCache &&
|
||||
shouldSetTextContent(init, nextCache) &&
|
||||
(workInProgress.flags |= 32),
|
||||
@@ -5508,7 +5498,7 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
renderLanes
|
||||
))),
|
||||
markRef(current, workInProgress),
|
||||
reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
reconcileChildren(current, workInProgress, elementType, renderLanes),
|
||||
workInProgress.child
|
||||
);
|
||||
case 6:
|
||||
@@ -5521,26 +5511,37 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
workInProgress,
|
||||
workInProgress.stateNode.containerInfo
|
||||
),
|
||||
(Component = workInProgress.pendingProps),
|
||||
(elementType = workInProgress.pendingProps),
|
||||
null === current
|
||||
? (workInProgress.child = reconcileChildFibers(
|
||||
workInProgress,
|
||||
null,
|
||||
Component,
|
||||
elementType,
|
||||
renderLanes
|
||||
))
|
||||
: reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
: reconcileChildren(
|
||||
current,
|
||||
workInProgress,
|
||||
elementType,
|
||||
renderLanes
|
||||
),
|
||||
workInProgress.child
|
||||
);
|
||||
case 11:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === Component
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(Component, init)),
|
||||
updateForwardRef(current, workInProgress, Component, init, renderLanes)
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
updateForwardRef(
|
||||
current,
|
||||
workInProgress,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
case 7:
|
||||
return (
|
||||
@@ -5574,13 +5575,13 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
);
|
||||
case 10:
|
||||
a: {
|
||||
Component = enableRenderableContext
|
||||
elementType = enableRenderableContext
|
||||
? workInProgress.type
|
||||
: workInProgress.type._context;
|
||||
init = workInProgress.pendingProps;
|
||||
nextProps = workInProgress.memoizedProps;
|
||||
nextCache = init.value;
|
||||
pushProvider(workInProgress, Component, nextCache);
|
||||
pushProvider(workInProgress, elementType, nextCache);
|
||||
if (!enableLazyContextPropagation && null !== nextProps)
|
||||
if (objectIs(nextProps.value, nextCache)) {
|
||||
if (nextProps.children === init.children) {
|
||||
@@ -5591,7 +5592,8 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
);
|
||||
break a;
|
||||
}
|
||||
} else propagateContextChange(workInProgress, Component, renderLanes);
|
||||
} else
|
||||
propagateContextChange(workInProgress, elementType, renderLanes);
|
||||
reconcileChildren(current, workInProgress, init.children, renderLanes);
|
||||
workInProgress = workInProgress.child;
|
||||
}
|
||||
@@ -5601,23 +5603,23 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
(init = enableRenderableContext
|
||||
? workInProgress.type._context
|
||||
: workInProgress.type),
|
||||
(Component = workInProgress.pendingProps.children),
|
||||
(elementType = workInProgress.pendingProps.children),
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
(init = readContext(init)),
|
||||
(Component = Component(init)),
|
||||
(elementType = elementType(init)),
|
||||
(workInProgress.flags |= 1),
|
||||
reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
reconcileChildren(current, workInProgress, elementType, renderLanes),
|
||||
workInProgress.child
|
||||
);
|
||||
case 14:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(init = resolveDefaultProps(Component, workInProgress.pendingProps)),
|
||||
(init = resolveDefaultProps(Component.type, init)),
|
||||
(elementType = workInProgress.type),
|
||||
(init = resolveDefaultProps(elementType, workInProgress.pendingProps)),
|
||||
(init = resolveDefaultProps(elementType.type, init)),
|
||||
updateMemoComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
Component,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
@@ -5632,33 +5634,51 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
);
|
||||
case 17:
|
||||
return (
|
||||
(Component = workInProgress.type),
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === Component
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(Component, init)),
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
|
||||
(workInProgress.tag = 1),
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
constructClassInstance(workInProgress, Component, init),
|
||||
mountClassInstance(workInProgress, Component, init, renderLanes),
|
||||
constructClassInstance(workInProgress, elementType, init),
|
||||
mountClassInstance(workInProgress, elementType, init, renderLanes),
|
||||
finishClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
elementType,
|
||||
!0,
|
||||
!1,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
case 28:
|
||||
return (
|
||||
(elementType = workInProgress.type),
|
||||
(init = workInProgress.pendingProps),
|
||||
(init =
|
||||
workInProgress.elementType === elementType
|
||||
? init
|
||||
: resolveDefaultProps(elementType, init)),
|
||||
resetSuspendedCurrentOnMountInLegacyMode(current, workInProgress),
|
||||
(workInProgress.tag = 0),
|
||||
updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
elementType,
|
||||
init,
|
||||
renderLanes
|
||||
)
|
||||
);
|
||||
case 19:
|
||||
return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
||||
case 21:
|
||||
return (
|
||||
(Component = workInProgress.pendingProps.children),
|
||||
(elementType = workInProgress.pendingProps.children),
|
||||
markRef(current, workInProgress),
|
||||
reconcileChildren(current, workInProgress, Component, renderLanes),
|
||||
reconcileChildren(current, workInProgress, elementType, renderLanes),
|
||||
workInProgress.child
|
||||
);
|
||||
case 22:
|
||||
@@ -5668,7 +5688,7 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
case 24:
|
||||
return (
|
||||
prepareToReadContext(workInProgress, renderLanes),
|
||||
(Component = readContext(CacheContext)),
|
||||
(elementType = readContext(CacheContext)),
|
||||
null === current
|
||||
? ((init = peekCacheFromPool()),
|
||||
null === init &&
|
||||
@@ -5678,7 +5698,10 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
nextProps.refCount++,
|
||||
null !== nextProps && (init.pooledCacheLanes |= renderLanes),
|
||||
(init = nextProps)),
|
||||
(workInProgress.memoizedState = { parent: Component, cache: init }),
|
||||
(workInProgress.memoizedState = {
|
||||
parent: elementType,
|
||||
cache: init
|
||||
}),
|
||||
initializeUpdateQueue(workInProgress),
|
||||
pushProvider(workInProgress, CacheContext, init))
|
||||
: (0 !== (current.lanes & renderLanes) &&
|
||||
@@ -5687,17 +5710,17 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
suspendIfUpdateReadFromEntangledAsyncAction()),
|
||||
(init = current.memoizedState),
|
||||
(nextProps = workInProgress.memoizedState),
|
||||
init.parent !== Component
|
||||
? ((init = { parent: Component, cache: Component }),
|
||||
init.parent !== elementType
|
||||
? ((init = { parent: elementType, cache: elementType }),
|
||||
(workInProgress.memoizedState = init),
|
||||
0 === workInProgress.lanes &&
|
||||
(workInProgress.memoizedState =
|
||||
workInProgress.updateQueue.baseState =
|
||||
init),
|
||||
pushProvider(workInProgress, CacheContext, Component))
|
||||
: ((Component = nextProps.cache),
|
||||
pushProvider(workInProgress, CacheContext, Component),
|
||||
Component !== init.cache &&
|
||||
pushProvider(workInProgress, CacheContext, elementType))
|
||||
: ((elementType = nextProps.cache),
|
||||
pushProvider(workInProgress, CacheContext, elementType),
|
||||
elementType !== init.cache &&
|
||||
propagateContextChange(
|
||||
workInProgress,
|
||||
CacheContext,
|
||||
@@ -5716,22 +5739,22 @@ function beginWork(current, workInProgress, renderLanes) {
|
||||
return (
|
||||
enableTransitionTracing
|
||||
? (null === current &&
|
||||
((Component = enableTransitionTracing
|
||||
((elementType = enableTransitionTracing
|
||||
? transitionStack.current
|
||||
: null),
|
||||
null !== Component &&
|
||||
((Component = {
|
||||
null !== elementType &&
|
||||
((elementType = {
|
||||
tag: 1,
|
||||
transitions: new Set(Component),
|
||||
transitions: new Set(elementType),
|
||||
pendingBoundaries: null,
|
||||
name: workInProgress.pendingProps.name,
|
||||
aborts: null
|
||||
}),
|
||||
(workInProgress.stateNode = Component),
|
||||
(workInProgress.stateNode = elementType),
|
||||
(workInProgress.flags |= 2048))),
|
||||
(Component = workInProgress.stateNode),
|
||||
null !== Component &&
|
||||
pushMarkerInstance(workInProgress, Component),
|
||||
(elementType = workInProgress.stateNode),
|
||||
null !== elementType &&
|
||||
pushMarkerInstance(workInProgress, elementType),
|
||||
reconcileChildren(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -6216,14 +6239,14 @@ function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
|
||||
break;
|
||||
case "collapsed":
|
||||
lastTailNode = renderState.tail;
|
||||
for (var lastTailNode$77 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$77 = lastTailNode),
|
||||
for (var lastTailNode$81 = null; null !== lastTailNode; )
|
||||
null !== lastTailNode.alternate && (lastTailNode$81 = lastTailNode),
|
||||
(lastTailNode = lastTailNode.sibling);
|
||||
null === lastTailNode$77
|
||||
null === lastTailNode$81
|
||||
? hasRenderedATailFallback || null === renderState.tail
|
||||
? (renderState.tail = null)
|
||||
: (renderState.tail.sibling = null)
|
||||
: (lastTailNode$77.sibling = null);
|
||||
: (lastTailNode$81.sibling = null);
|
||||
}
|
||||
}
|
||||
function bubbleProperties(completedWork) {
|
||||
@@ -6233,19 +6256,19 @@ function bubbleProperties(completedWork) {
|
||||
newChildLanes = 0,
|
||||
subtreeFlags = 0;
|
||||
if (didBailout)
|
||||
for (var child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$78.flags & 31457280),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (var child$82 = completedWork.child; null !== child$82; )
|
||||
(newChildLanes |= child$82.lanes | child$82.childLanes),
|
||||
(subtreeFlags |= child$82.subtreeFlags & 31457280),
|
||||
(subtreeFlags |= child$82.flags & 31457280),
|
||||
(child$82.return = completedWork),
|
||||
(child$82 = child$82.sibling);
|
||||
else
|
||||
for (child$78 = completedWork.child; null !== child$78; )
|
||||
(newChildLanes |= child$78.lanes | child$78.childLanes),
|
||||
(subtreeFlags |= child$78.subtreeFlags),
|
||||
(subtreeFlags |= child$78.flags),
|
||||
(child$78.return = completedWork),
|
||||
(child$78 = child$78.sibling);
|
||||
for (child$82 = completedWork.child; null !== child$82; )
|
||||
(newChildLanes |= child$82.lanes | child$82.childLanes),
|
||||
(subtreeFlags |= child$82.subtreeFlags),
|
||||
(subtreeFlags |= child$82.flags),
|
||||
(child$82.return = completedWork),
|
||||
(child$82 = child$82.sibling);
|
||||
completedWork.subtreeFlags |= subtreeFlags;
|
||||
completedWork.childLanes = newChildLanes;
|
||||
return didBailout;
|
||||
@@ -6253,10 +6276,10 @@ function bubbleProperties(completedWork) {
|
||||
function completeWork(current, workInProgress, renderLanes) {
|
||||
var newProps = workInProgress.pendingProps;
|
||||
switch (workInProgress.tag) {
|
||||
case 2:
|
||||
case 16:
|
||||
case 15:
|
||||
case 0:
|
||||
case 28:
|
||||
case 11:
|
||||
case 7:
|
||||
case 8:
|
||||
@@ -6417,11 +6440,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
null !== newProps.alternate.memoizedState &&
|
||||
null !== newProps.alternate.memoizedState.cachePool &&
|
||||
(instance = newProps.alternate.memoizedState.cachePool.pool);
|
||||
var cache$82 = null;
|
||||
var cache$86 = null;
|
||||
null !== newProps.memoizedState &&
|
||||
null !== newProps.memoizedState.cachePool &&
|
||||
(cache$82 = newProps.memoizedState.cachePool.pool);
|
||||
cache$82 !== instance && (newProps.flags |= 2048);
|
||||
(cache$86 = newProps.memoizedState.cachePool.pool);
|
||||
cache$86 !== instance && (newProps.flags |= 2048);
|
||||
}
|
||||
renderLanes !== current &&
|
||||
(enableTransitionTracing && (workInProgress.child.flags |= 2048),
|
||||
@@ -6451,8 +6474,8 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
instance = workInProgress.memoizedState;
|
||||
if (null === instance) return bubbleProperties(workInProgress), null;
|
||||
newProps = 0 !== (workInProgress.flags & 128);
|
||||
cache$82 = instance.rendering;
|
||||
if (null === cache$82)
|
||||
cache$86 = instance.rendering;
|
||||
if (null === cache$86)
|
||||
if (newProps) cutOffTailIfNeeded(instance, !1);
|
||||
else {
|
||||
if (
|
||||
@@ -6460,11 +6483,11 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
(null !== current && 0 !== (current.flags & 128))
|
||||
)
|
||||
for (current = workInProgress.child; null !== current; ) {
|
||||
cache$82 = findFirstSuspended(current);
|
||||
if (null !== cache$82) {
|
||||
cache$86 = findFirstSuspended(current);
|
||||
if (null !== cache$86) {
|
||||
workInProgress.flags |= 128;
|
||||
cutOffTailIfNeeded(instance, !1);
|
||||
current = cache$82.updateQueue;
|
||||
current = cache$86.updateQueue;
|
||||
workInProgress.updateQueue = current;
|
||||
scheduleRetryEffect(workInProgress, current);
|
||||
workInProgress.subtreeFlags = 0;
|
||||
@@ -6489,7 +6512,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
}
|
||||
else {
|
||||
if (!newProps)
|
||||
if (((current = findFirstSuspended(cache$82)), null !== current)) {
|
||||
if (((current = findFirstSuspended(cache$86)), null !== current)) {
|
||||
if (
|
||||
((workInProgress.flags |= 128),
|
||||
(newProps = !0),
|
||||
@@ -6499,7 +6522,7 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !0),
|
||||
null === instance.tail &&
|
||||
"hidden" === instance.tailMode &&
|
||||
!cache$82.alternate)
|
||||
!cache$86.alternate)
|
||||
)
|
||||
return bubbleProperties(workInProgress), null;
|
||||
} else
|
||||
@@ -6511,13 +6534,13 @@ function completeWork(current, workInProgress, renderLanes) {
|
||||
cutOffTailIfNeeded(instance, !1),
|
||||
(workInProgress.lanes = 4194304));
|
||||
instance.isBackwards
|
||||
? ((cache$82.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$82))
|
||||
? ((cache$86.sibling = workInProgress.child),
|
||||
(workInProgress.child = cache$86))
|
||||
: ((current = instance.last),
|
||||
null !== current
|
||||
? (current.sibling = cache$82)
|
||||
: (workInProgress.child = cache$82),
|
||||
(instance.last = cache$82));
|
||||
? (current.sibling = cache$86)
|
||||
: (workInProgress.child = cache$86),
|
||||
(instance.last = cache$86));
|
||||
}
|
||||
if (null !== instance.tail)
|
||||
return (
|
||||
@@ -6771,8 +6794,8 @@ function safelyDetachRef(current, nearestMountedAncestor) {
|
||||
else if ("function" === typeof ref)
|
||||
try {
|
||||
ref(null);
|
||||
} catch (error$99) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$99);
|
||||
} catch (error$103) {
|
||||
captureCommitPhaseError(current, nearestMountedAncestor, error$103);
|
||||
}
|
||||
else ref.current = null;
|
||||
}
|
||||
@@ -6974,11 +6997,11 @@ function commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {
|
||||
current,
|
||||
finishedRoot.__reactInternalSnapshotBeforeUpdate
|
||||
);
|
||||
} catch (error$100) {
|
||||
} catch (error$104) {
|
||||
captureCommitPhaseError(
|
||||
finishedWork,
|
||||
finishedWork.return,
|
||||
error$100
|
||||
error$104
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7571,8 +7594,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
}
|
||||
try {
|
||||
commitHookEffectListUnmount(5, finishedWork, finishedWork.return);
|
||||
} catch (error$108) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$108);
|
||||
} catch (error$112) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$112);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7606,8 +7629,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
finishedWork.updateQueue = null;
|
||||
try {
|
||||
flags._applyProps(flags, newProps, current);
|
||||
} catch (error$111) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$111);
|
||||
} catch (error$115) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$115);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -7643,8 +7666,8 @@ function commitMutationEffectsOnFiber(finishedWork, root) {
|
||||
null !== retryQueue && suspenseCallback(new Set(retryQueue));
|
||||
}
|
||||
}
|
||||
} catch (error$113) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$113);
|
||||
} catch (error$117) {
|
||||
captureCommitPhaseError(finishedWork, finishedWork.return, error$117);
|
||||
}
|
||||
flags = finishedWork.updateQueue;
|
||||
null !== flags &&
|
||||
@@ -7784,12 +7807,12 @@ function commitReconciliationEffects(finishedWork) {
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
var parent$103 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$104 = getHostSibling(finishedWork);
|
||||
var parent$107 = JSCompiler_inline_result.stateNode.containerInfo,
|
||||
before$108 = getHostSibling(finishedWork);
|
||||
insertOrAppendPlacementNodeIntoContainer(
|
||||
finishedWork,
|
||||
before$104,
|
||||
parent$103
|
||||
before$108,
|
||||
parent$107
|
||||
);
|
||||
break;
|
||||
default:
|
||||
@@ -8250,9 +8273,9 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
);
|
||||
break;
|
||||
case 22:
|
||||
var instance$119 = finishedWork.stateNode;
|
||||
var instance$123 = finishedWork.stateNode;
|
||||
null !== finishedWork.memoizedState
|
||||
? instance$119._visibility & 4
|
||||
? instance$123._visibility & 4
|
||||
? recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8265,7 +8288,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork
|
||||
)
|
||||
: ((instance$119._visibility |= 4),
|
||||
: ((instance$123._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8273,7 +8296,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
committedTransitions,
|
||||
includeWorkInProgressEffects
|
||||
))
|
||||
: ((instance$119._visibility |= 4),
|
||||
: ((instance$123._visibility |= 4),
|
||||
recursivelyTraverseReconnectPassiveEffects(
|
||||
finishedRoot,
|
||||
finishedWork,
|
||||
@@ -8286,7 +8309,7 @@ function recursivelyTraverseReconnectPassiveEffects(
|
||||
commitOffscreenPassiveMountEffects(
|
||||
finishedWork.alternate,
|
||||
finishedWork,
|
||||
instance$119
|
||||
instance$123
|
||||
);
|
||||
break;
|
||||
case 24:
|
||||
@@ -9207,8 +9230,8 @@ function renderRootSync(root, lanes) {
|
||||
}
|
||||
workLoopSync();
|
||||
break;
|
||||
} catch (thrownValue$127) {
|
||||
handleThrow(root, thrownValue$127);
|
||||
} catch (thrownValue$131) {
|
||||
handleThrow(root, thrownValue$131);
|
||||
}
|
||||
while (1);
|
||||
lanes && root.shellSuspendCounter++;
|
||||
@@ -9313,8 +9336,8 @@ function renderRootConcurrent(root, lanes) {
|
||||
}
|
||||
workLoopConcurrent();
|
||||
break;
|
||||
} catch (thrownValue$129) {
|
||||
handleThrow(root, thrownValue$129);
|
||||
} catch (thrownValue$133) {
|
||||
handleThrow(root, thrownValue$133);
|
||||
}
|
||||
while (1);
|
||||
resetContextDependencies();
|
||||
@@ -9340,8 +9363,6 @@ function performUnitOfWork(unitOfWork) {
|
||||
function replaySuspendedUnitOfWork(unitOfWork) {
|
||||
var current = unitOfWork.alternate;
|
||||
switch (unitOfWork.tag) {
|
||||
case 2:
|
||||
unitOfWork.tag = 0;
|
||||
case 15:
|
||||
case 0:
|
||||
var Component = unitOfWork.type,
|
||||
@@ -9810,16 +9831,6 @@ function shouldConstruct(Component) {
|
||||
Component = Component.prototype;
|
||||
return !(!Component || !Component.isReactComponent);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if ("function" === typeof Component)
|
||||
return shouldConstruct(Component) ? 1 : 0;
|
||||
if (void 0 !== Component && null !== Component) {
|
||||
Component = Component.$$typeof;
|
||||
if (Component === REACT_FORWARD_REF_TYPE) return 11;
|
||||
if (Component === REACT_MEMO_TYPE) return 14;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
var workInProgress = current.alternate;
|
||||
null === workInProgress
|
||||
@@ -9897,7 +9908,7 @@ function createFiberFromTypeAndProps(
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = 2;
|
||||
var fiberTag = 0;
|
||||
owner = type;
|
||||
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
|
||||
else if ("string" === typeof type) fiberTag = 5;
|
||||
@@ -10309,19 +10320,19 @@ var slice = Array.prototype.slice,
|
||||
};
|
||||
return Text;
|
||||
})(React.Component),
|
||||
devToolsConfig$jscomp$inline_1099 = {
|
||||
devToolsConfig$jscomp$inline_1098 = {
|
||||
findFiberByHostInstance: function () {
|
||||
return null;
|
||||
},
|
||||
bundleType: 0,
|
||||
version: "19.0.0-www-modern-0c8ed270",
|
||||
version: "19.0.0-www-modern-7cc92098",
|
||||
rendererPackageName: "react-art"
|
||||
};
|
||||
var internals$jscomp$inline_1293 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1099.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1099.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1099.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1099.rendererConfig,
|
||||
var internals$jscomp$inline_1289 = {
|
||||
bundleType: devToolsConfig$jscomp$inline_1098.bundleType,
|
||||
version: devToolsConfig$jscomp$inline_1098.version,
|
||||
rendererPackageName: devToolsConfig$jscomp$inline_1098.rendererPackageName,
|
||||
rendererConfig: devToolsConfig$jscomp$inline_1098.rendererConfig,
|
||||
overrideHookState: null,
|
||||
overrideHookStateDeletePath: null,
|
||||
overrideHookStateRenamePath: null,
|
||||
@@ -10338,26 +10349,26 @@ var internals$jscomp$inline_1293 = {
|
||||
return null === fiber ? null : fiber.stateNode;
|
||||
},
|
||||
findFiberByHostInstance:
|
||||
devToolsConfig$jscomp$inline_1099.findFiberByHostInstance ||
|
||||
devToolsConfig$jscomp$inline_1098.findFiberByHostInstance ||
|
||||
emptyFindFiberByHostInstance,
|
||||
findHostInstancesForRefresh: null,
|
||||
scheduleRefresh: null,
|
||||
scheduleRoot: null,
|
||||
setRefreshHandler: null,
|
||||
getCurrentFiber: null,
|
||||
reconcilerVersion: "19.0.0-www-modern-0c8ed270"
|
||||
reconcilerVersion: "19.0.0-www-modern-7cc92098"
|
||||
};
|
||||
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
var hook$jscomp$inline_1294 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
var hook$jscomp$inline_1290 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||
if (
|
||||
!hook$jscomp$inline_1294.isDisabled &&
|
||||
hook$jscomp$inline_1294.supportsFiber
|
||||
!hook$jscomp$inline_1290.isDisabled &&
|
||||
hook$jscomp$inline_1290.supportsFiber
|
||||
)
|
||||
try {
|
||||
(rendererID = hook$jscomp$inline_1294.inject(
|
||||
internals$jscomp$inline_1293
|
||||
(rendererID = hook$jscomp$inline_1290.inject(
|
||||
internals$jscomp$inline_1289
|
||||
)),
|
||||
(injectedHook = hook$jscomp$inline_1294);
|
||||
(injectedHook = hook$jscomp$inline_1290);
|
||||
} catch (err) {}
|
||||
}
|
||||
var Path = Mode$1.Path;
|
||||
|
||||
@@ -162,8 +162,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -190,6 +188,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -460,7 +459,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -3704,7 +3702,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -8112,7 +8109,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -18501,17 +18497,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var isLegacyContextConsumer = false;
|
||||
var unmaskedContext = emptyContextObject;
|
||||
@@ -18587,7 +18572,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -19563,6 +19555,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -20139,7 +20139,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -20150,7 +20149,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -20868,6 +20866,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -20875,6 +20891,39 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
{
|
||||
@@ -21519,70 +21568,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21644,122 +21691,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
{
|
||||
var unmaskedContext = getUnmaskedContext(
|
||||
workInProgress,
|
||||
Component,
|
||||
false
|
||||
);
|
||||
context = getMaskedContext(workInProgress, unmaskedContext);
|
||||
}
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
var hasId;
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStarted(workInProgress);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$2.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
hasId = checkDidRenderIdHook();
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStopped();
|
||||
} // React DevTools reads this flag.
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
if (getIsHydrating() && hasId) {
|
||||
pushMaterializedTreeId(workInProgress);
|
||||
}
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -21796,33 +21727,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -21831,16 +21761,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23806,15 +23736,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -23963,6 +23884,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -25602,10 +25541,10 @@ if (__DEV__) {
|
||||
popTreeContext(workInProgress);
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -33331,12 +33270,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -34745,7 +34678,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -35544,22 +35476,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -35644,7 +35562,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -35770,7 +35687,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
@@ -36273,7 +36190,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-classic-6e35fd06";
|
||||
var ReactVersion = "19.0.0-www-classic-7e51a591";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -2374,8 +2374,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -2402,6 +2400,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
var randomKey = Math.random().toString(36).slice(2);
|
||||
var internalInstanceKey = "__reactFiber$" + randomKey;
|
||||
@@ -3311,7 +3310,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -3585,7 +3583,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -8075,7 +8072,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -18456,17 +18452,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var context = emptyContextObject;
|
||||
var contextType = ctor.contextType;
|
||||
@@ -18532,7 +18517,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -19485,6 +19477,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -20061,7 +20061,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -20072,7 +20071,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -20790,6 +20788,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -20797,6 +20813,47 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
"%s uses the legacy contextTypes API which was removed in React 19. " +
|
||||
"Use React.createContext() with React.useContext() instead.",
|
||||
getComponentNameFromType(Component) || "Unknown"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
var nextChildren;
|
||||
@@ -21411,70 +21468,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21535,123 +21590,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
var hasId;
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStarted(workInProgress);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$2.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
hasId = checkDidRenderIdHook();
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStopped();
|
||||
} // React DevTools reads this flag.
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
"%s uses the legacy contextTypes API which was removed in React 19. " +
|
||||
"Use React.createContext() with React.useContext() instead.",
|
||||
getComponentNameFromType(Component) || "Unknown"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (getIsHydrating() && hasId) {
|
||||
pushMaterializedTreeId(workInProgress);
|
||||
}
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -21688,33 +21626,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -21723,16 +21660,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23692,15 +23629,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -23849,6 +23777,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -25488,10 +25434,10 @@ if (__DEV__) {
|
||||
popTreeContext(workInProgress);
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -33188,12 +33134,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -34593,7 +34533,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -35392,22 +35331,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -35492,7 +35417,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -35618,7 +35542,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
@@ -36121,7 +36045,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-modern-e8cb623a";
|
||||
var ReactVersion = "19.0.0-www-modern-cab6e9ae";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "19.0.0-www-classic-a2ba8df5";
|
||||
var ReactVersion = "19.0.0-www-classic-7b148b32";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -12013,22 +12013,14 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
var didWarnAboutBadClass = {};
|
||||
var didWarnAboutModulePatternComponent = {};
|
||||
var didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
var didWarnAboutReassigningProps = false;
|
||||
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
||||
var didWarnAboutGenerators = false;
|
||||
var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern
|
||||
// components for some reason.
|
||||
var didWarnAboutMaps = false;
|
||||
|
||||
function renderIndeterminateComponent(
|
||||
request,
|
||||
task,
|
||||
keyPath,
|
||||
Component,
|
||||
props
|
||||
) {
|
||||
function renderFunctionComponent(request, task, keyPath, Component, props) {
|
||||
var legacyContext;
|
||||
|
||||
{
|
||||
@@ -12070,34 +12062,6 @@ if (__DEV__) {
|
||||
var actionStateCount = getActionStateCount();
|
||||
var actionStateMatchingIndex = getActionStateMatchingIndex();
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(Component);
|
||||
}
|
||||
@@ -12208,18 +12172,15 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -12228,16 +12189,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName2]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12398,7 +12359,7 @@ if (__DEV__) {
|
||||
renderClassComponent(request, task, keyPath, type, props);
|
||||
return;
|
||||
} else {
|
||||
renderIndeterminateComponent(request, task, keyPath, type, props);
|
||||
renderFunctionComponent(request, task, keyPath, type, props);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ if (__DEV__) {
|
||||
var React = require("react");
|
||||
var ReactDOM = require("react-dom");
|
||||
|
||||
var ReactVersion = "19.0.0-www-modern-4693f3a0";
|
||||
var ReactVersion = "19.0.0-www-modern-51e910d2";
|
||||
|
||||
// This refers to a WWW module.
|
||||
var warningWWW = require("warning");
|
||||
@@ -11916,22 +11916,14 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
var didWarnAboutBadClass = {};
|
||||
var didWarnAboutModulePatternComponent = {};
|
||||
var didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
var didWarnAboutReassigningProps = false;
|
||||
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
||||
var didWarnAboutGenerators = false;
|
||||
var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern
|
||||
// components for some reason.
|
||||
var didWarnAboutMaps = false;
|
||||
|
||||
function renderIndeterminateComponent(
|
||||
request,
|
||||
task,
|
||||
keyPath,
|
||||
Component,
|
||||
props
|
||||
) {
|
||||
function renderFunctionComponent(request, task, keyPath, Component, props) {
|
||||
var legacyContext;
|
||||
|
||||
var previousComponentStack = task.componentStack;
|
||||
@@ -11969,34 +11961,6 @@ if (__DEV__) {
|
||||
var actionStateCount = getActionStateCount();
|
||||
var actionStateMatchingIndex = getActionStateMatchingIndex();
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
{
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
@@ -12117,18 +12081,15 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -12137,16 +12098,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName2]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12307,7 +12268,7 @@ if (__DEV__) {
|
||||
renderClassComponent(request, task, keyPath, type, props);
|
||||
return;
|
||||
} else {
|
||||
renderIndeterminateComponent(request, task, keyPath, type, props);
|
||||
renderFunctionComponent(request, task, keyPath, type, props);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11795,22 +11795,14 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
var didWarnAboutBadClass = {};
|
||||
var didWarnAboutModulePatternComponent = {};
|
||||
var didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
var didWarnAboutReassigningProps = false;
|
||||
var didWarnAboutDefaultPropsOnFunctionComponent = {};
|
||||
var didWarnAboutGenerators = false;
|
||||
var didWarnAboutMaps = false; // This would typically be a function component but we still support module pattern
|
||||
// components for some reason.
|
||||
var didWarnAboutMaps = false;
|
||||
|
||||
function renderIndeterminateComponent(
|
||||
request,
|
||||
task,
|
||||
keyPath,
|
||||
Component,
|
||||
props
|
||||
) {
|
||||
function renderFunctionComponent(request, task, keyPath, Component, props) {
|
||||
var legacyContext;
|
||||
|
||||
var previousComponentStack = task.componentStack;
|
||||
@@ -11848,34 +11840,6 @@ if (__DEV__) {
|
||||
var actionStateCount = getActionStateCount();
|
||||
var actionStateMatchingIndex = getActionStateMatchingIndex();
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
{
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
@@ -11996,18 +11960,15 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -12016,16 +11977,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName2]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName2] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12186,7 +12147,7 @@ if (__DEV__) {
|
||||
renderClassComponent(request, task, keyPath, type, props);
|
||||
return;
|
||||
} else {
|
||||
renderIndeterminateComponent(request, task, keyPath, type, props);
|
||||
renderFunctionComponent(request, task, keyPath, type, props);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,8 +154,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -182,6 +180,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -452,7 +451,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -3841,7 +3839,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -8249,7 +8246,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -18638,17 +18634,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var isLegacyContextConsumer = false;
|
||||
var unmaskedContext = emptyContextObject;
|
||||
@@ -18724,7 +18709,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -19700,6 +19692,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -20276,7 +20276,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -20287,7 +20286,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -21005,6 +21003,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -21012,6 +21028,39 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
{
|
||||
@@ -21656,70 +21705,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21781,122 +21828,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
{
|
||||
var unmaskedContext = getUnmaskedContext(
|
||||
workInProgress,
|
||||
Component,
|
||||
false
|
||||
);
|
||||
context = getMaskedContext(workInProgress, unmaskedContext);
|
||||
}
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
var hasId;
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStarted(workInProgress);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$2.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
hasId = checkDidRenderIdHook();
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStopped();
|
||||
} // React DevTools reads this flag.
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
if (getIsHydrating() && hasId) {
|
||||
pushMaterializedTreeId(workInProgress);
|
||||
}
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -21933,33 +21864,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -21968,16 +21898,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23943,15 +23873,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -24100,6 +24021,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -25739,10 +25678,10 @@ if (__DEV__) {
|
||||
popTreeContext(workInProgress);
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -33955,12 +33894,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -35369,7 +35302,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -36168,22 +36100,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -36268,7 +36186,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -36394,7 +36311,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
@@ -36897,7 +36814,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-classic-b3f8d371";
|
||||
var ReactVersion = "19.0.0-www-classic-47215e9a";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
@@ -2366,8 +2366,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -2394,6 +2392,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
var randomKey = Math.random().toString(36).slice(2);
|
||||
var internalInstanceKey = "__reactFiber$" + randomKey;
|
||||
@@ -3448,7 +3447,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -3722,7 +3720,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -8212,7 +8209,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -18593,17 +18589,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var context = emptyContextObject;
|
||||
var contextType = ctor.contextType;
|
||||
@@ -18669,7 +18654,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -19622,6 +19614,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -20198,7 +20198,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -20209,7 +20208,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -20927,6 +20925,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -20934,6 +20950,47 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
"%s uses the legacy contextTypes API which was removed in React 19. " +
|
||||
"Use React.createContext() with React.useContext() instead.",
|
||||
getComponentNameFromType(Component) || "Unknown"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
var nextChildren;
|
||||
@@ -21548,70 +21605,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21672,123 +21727,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
var hasId;
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStarted(workInProgress);
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$2.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
hasId = checkDidRenderIdHook();
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
if (enableSchedulingProfiler) {
|
||||
markComponentRenderStopped();
|
||||
} // React DevTools reads this flag.
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
if (Component.contextTypes) {
|
||||
error(
|
||||
"%s uses the legacy contextTypes API which was removed in React 19. " +
|
||||
"Use React.createContext() with React.useContext() instead.",
|
||||
getComponentNameFromType(Component) || "Unknown"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (getIsHydrating() && hasId) {
|
||||
pushMaterializedTreeId(workInProgress);
|
||||
}
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -21825,33 +21763,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -21860,16 +21797,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23829,15 +23766,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -23986,6 +23914,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -25625,10 +25571,10 @@ if (__DEV__) {
|
||||
popTreeContext(workInProgress);
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -33812,12 +33758,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -35217,7 +35157,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -36016,22 +35955,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -36116,7 +36041,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -36242,7 +36166,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
@@ -36745,7 +36669,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-modern-cfc7c1e7";
|
||||
var ReactVersion = "19.0.0-www-modern-7a34747a";
|
||||
|
||||
function createPortal$1(
|
||||
children,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -148,8 +148,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -176,6 +174,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -423,7 +422,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -2731,7 +2729,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -5062,7 +5059,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -12424,17 +12420,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var isLegacyContextConsumer = false;
|
||||
var unmaskedContext = emptyContextObject;
|
||||
@@ -12498,7 +12483,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -13449,6 +13441,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -13759,7 +13759,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -13770,7 +13769,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -14376,6 +14374,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -14383,6 +14399,39 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
{
|
||||
@@ -14813,70 +14862,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14938,108 +14985,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
{
|
||||
var unmaskedContext = getUnmaskedContext(
|
||||
workInProgress,
|
||||
Component,
|
||||
false
|
||||
);
|
||||
context = getMaskedContext(workInProgress, unmaskedContext);
|
||||
}
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -15076,33 +15021,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -15111,16 +15055,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16820,15 +16764,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -16973,6 +16908,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -18168,10 +18121,10 @@ if (__DEV__) {
|
||||
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -24281,12 +24234,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -25414,7 +25361,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -26200,22 +26146,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -26300,7 +26232,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -26426,7 +26357,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
@@ -26829,7 +26760,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-classic-2fc232e4";
|
||||
var ReactVersion = "19.0.0-www-classic-ac0a3da0";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
@@ -148,8 +148,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
var IndeterminateComponent = 2; // Before we know whether it is function or class
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
|
||||
@@ -176,6 +174,7 @@ if (__DEV__) {
|
||||
var TracingMarkerComponent = 25;
|
||||
var HostHoistable = 26;
|
||||
var HostSingleton = 27;
|
||||
var IncompleteFunctionComponent = 28;
|
||||
|
||||
// ATTENTION
|
||||
// When adding new symbols to this file,
|
||||
@@ -423,7 +422,6 @@ if (__DEV__) {
|
||||
case ClassComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteClassComponent:
|
||||
case IndeterminateComponent:
|
||||
case MemoComponent:
|
||||
case SimpleMemoComponent:
|
||||
if (typeof type === "function") {
|
||||
@@ -2731,7 +2729,6 @@ if (__DEV__) {
|
||||
return "SuspenseList";
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
var fn = fiber.type;
|
||||
return fn.displayName || fn.name || null;
|
||||
@@ -5062,7 +5059,6 @@ if (__DEV__) {
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
|
||||
case FunctionComponent:
|
||||
case IndeterminateComponent:
|
||||
case SimpleMemoComponent:
|
||||
return describeFunctionComponentFrame(fiber.type);
|
||||
|
||||
@@ -12424,17 +12420,6 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function adoptClassInstance(workInProgress, instance) {
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
}
|
||||
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var isLegacyContextConsumer = false;
|
||||
var unmaskedContext = emptyContextObject;
|
||||
@@ -12498,7 +12483,14 @@ if (__DEV__) {
|
||||
instance.state !== null && instance.state !== undefined
|
||||
? instance.state
|
||||
: null);
|
||||
adoptClassInstance(workInProgress, instance);
|
||||
instance.updater = classComponentUpdater;
|
||||
workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
|
||||
|
||||
set(instance, workInProgress);
|
||||
|
||||
{
|
||||
instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
|
||||
{
|
||||
if (
|
||||
@@ -13449,6 +13441,14 @@ if (__DEV__) {
|
||||
update.tag = ForceUpdate;
|
||||
enqueueUpdate(sourceFiber, update, SyncLane);
|
||||
}
|
||||
} else if (sourceFiber.tag === FunctionComponent) {
|
||||
var _currentSourceFiber = sourceFiber.alternate;
|
||||
|
||||
if (_currentSourceFiber === null) {
|
||||
// This is a new mount. Change the tag so it's not mistaken for a
|
||||
// completed function component.
|
||||
sourceFiber.tag = IncompleteFunctionComponent;
|
||||
}
|
||||
} // The source fiber did not complete. Mark it with Sync priority to
|
||||
// indicate that it still has pending work.
|
||||
|
||||
@@ -13759,7 +13759,6 @@ if (__DEV__) {
|
||||
);
|
||||
var didReceiveUpdate = false;
|
||||
var didWarnAboutBadClass;
|
||||
var didWarnAboutModulePatternComponent;
|
||||
var didWarnAboutContextTypeOnFunctionComponent;
|
||||
var didWarnAboutGetDerivedStateOnFunctionComponent;
|
||||
var didWarnAboutFunctionRefs;
|
||||
@@ -13770,7 +13769,6 @@ if (__DEV__) {
|
||||
|
||||
{
|
||||
didWarnAboutBadClass = {};
|
||||
didWarnAboutModulePatternComponent = {};
|
||||
didWarnAboutContextTypeOnFunctionComponent = {};
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
||||
didWarnAboutFunctionRefs = {};
|
||||
@@ -14376,6 +14374,24 @@ if (__DEV__) {
|
||||
}
|
||||
}
|
||||
|
||||
function mountIncompleteFunctionComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
workInProgress.tag = FunctionComponent;
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
nextProps,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
function updateFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
@@ -14383,6 +14399,39 @@ if (__DEV__) {
|
||||
nextProps,
|
||||
renderLanes
|
||||
) {
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if (current === null) {
|
||||
// Some validations were previously done in mountIndeterminateComponent however and are now run
|
||||
// in updateFuntionComponent but only on mount
|
||||
validateFunctionComponentInDev(workInProgress, workInProgress.type);
|
||||
}
|
||||
}
|
||||
|
||||
var context;
|
||||
|
||||
{
|
||||
@@ -14813,70 +14862,68 @@ if (__DEV__) {
|
||||
var Component = init(payload); // Store the unwrapped component in the type.
|
||||
|
||||
workInProgress.type = Component;
|
||||
var resolvedTag = (workInProgress.tag =
|
||||
resolveLazyComponentTag(Component));
|
||||
var resolvedProps = resolveDefaultProps(Component, props);
|
||||
var child;
|
||||
|
||||
switch (resolvedTag) {
|
||||
case FunctionComponent: {
|
||||
if (typeof Component === "function") {
|
||||
if (isFunctionClassComponent(Component)) {
|
||||
workInProgress.tag = ClassComponent;
|
||||
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
|
||||
return updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
} else {
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
workInProgress.type = Component =
|
||||
resolveFunctionForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateFunctionComponent(
|
||||
return updateFunctionComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
case ClassComponent: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveClassForHotReloading(Component);
|
||||
}
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
workInProgress.tag = ForwardRef;
|
||||
|
||||
child = updateClassComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case ForwardRef: {
|
||||
{
|
||||
workInProgress.type = Component =
|
||||
resolveForwardRefForHotReloading(Component);
|
||||
}
|
||||
|
||||
child = updateForwardRef(
|
||||
return updateForwardRef(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolvedProps,
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
|
||||
case MemoComponent: {
|
||||
child = updateMemoComponent(
|
||||
} else if ($$typeof === REACT_MEMO_TYPE) {
|
||||
workInProgress.tag = MemoComponent;
|
||||
return updateMemoComponent(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
|
||||
renderLanes
|
||||
);
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14938,108 +14985,6 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
function mountIndeterminateComponent(
|
||||
_current,
|
||||
workInProgress,
|
||||
Component,
|
||||
renderLanes
|
||||
) {
|
||||
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress);
|
||||
var props = workInProgress.pendingProps;
|
||||
var context;
|
||||
|
||||
{
|
||||
var unmaskedContext = getUnmaskedContext(
|
||||
workInProgress,
|
||||
Component,
|
||||
false
|
||||
);
|
||||
context = getMaskedContext(workInProgress, unmaskedContext);
|
||||
}
|
||||
|
||||
prepareToReadContext(workInProgress, renderLanes);
|
||||
var value;
|
||||
|
||||
{
|
||||
if (
|
||||
Component.prototype &&
|
||||
typeof Component.prototype.render === "function"
|
||||
) {
|
||||
var componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutBadClass[componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. " +
|
||||
"This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
componentName,
|
||||
componentName
|
||||
);
|
||||
|
||||
didWarnAboutBadClass[componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (workInProgress.mode & StrictLegacyMode) {
|
||||
ReactStrictModeWarnings.recordLegacyContextWarning(
|
||||
workInProgress,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
setIsRendering(true);
|
||||
ReactCurrentOwner$1.current = workInProgress;
|
||||
value = renderWithHooks(
|
||||
null,
|
||||
workInProgress,
|
||||
Component,
|
||||
props,
|
||||
context,
|
||||
renderLanes
|
||||
);
|
||||
setIsRendering(false);
|
||||
}
|
||||
|
||||
workInProgress.flags |= PerformedWork;
|
||||
|
||||
{
|
||||
// Support for module components is deprecated and is removed behind a flag.
|
||||
// Whether or not it would crash later, we want to show a good message in DEV first.
|
||||
if (
|
||||
typeof value === "object" &&
|
||||
value !== null &&
|
||||
typeof value.render === "function" &&
|
||||
value.$$typeof === undefined
|
||||
) {
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
||||
error(
|
||||
"The <%s /> component appears to be a function component that returns a class instance. " +
|
||||
"Change %s to a class that extends React.Component instead. " +
|
||||
"If you can't use a class try assigning the prototype on the function as a workaround. " +
|
||||
"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " +
|
||||
"cannot be called with `new` by React.",
|
||||
_componentName,
|
||||
_componentName,
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutModulePatternComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
} // Proceed under the assumption that this is a function component
|
||||
|
||||
workInProgress.tag = FunctionComponent;
|
||||
|
||||
reconcileChildren(null, workInProgress, value, renderLanes);
|
||||
|
||||
{
|
||||
validateFunctionComponentInDev(workInProgress, Component);
|
||||
}
|
||||
|
||||
return workInProgress.child;
|
||||
}
|
||||
|
||||
function validateFunctionComponentInDev(workInProgress, Component) {
|
||||
{
|
||||
if (Component) {
|
||||
@@ -15076,33 +15021,32 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
if (Component.defaultProps !== undefined) {
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
var _componentName = getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName2]) {
|
||||
if (!didWarnAboutDefaultPropsOnFunctionComponent[_componentName]) {
|
||||
error(
|
||||
"%s: Support for defaultProps will be removed from function components " +
|
||||
"in a future major release. Use JavaScript default parameters instead.",
|
||||
_componentName2
|
||||
_componentName
|
||||
);
|
||||
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName2] = true;
|
||||
didWarnAboutDefaultPropsOnFunctionComponent[_componentName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof Component.getDerivedStateFromProps === "function") {
|
||||
var _componentName3 =
|
||||
var _componentName2 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]
|
||||
!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]
|
||||
) {
|
||||
error(
|
||||
"%s: Function components do not support getDerivedStateFromProps.",
|
||||
_componentName3
|
||||
_componentName2
|
||||
);
|
||||
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] =
|
||||
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] =
|
||||
true;
|
||||
}
|
||||
}
|
||||
@@ -15111,16 +15055,16 @@ if (__DEV__) {
|
||||
typeof Component.contextType === "object" &&
|
||||
Component.contextType !== null
|
||||
) {
|
||||
var _componentName4 =
|
||||
var _componentName3 =
|
||||
getComponentNameFromType(Component) || "Unknown";
|
||||
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
||||
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
|
||||
error(
|
||||
"%s: Function components do not support contextType.",
|
||||
_componentName4
|
||||
_componentName3
|
||||
);
|
||||
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
||||
didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16820,15 +16764,6 @@ if (__DEV__) {
|
||||
workInProgress.lanes = NoLanes;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent: {
|
||||
return mountIndeterminateComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
workInProgress.type,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case LazyComponent: {
|
||||
var elementType = workInProgress.elementType;
|
||||
return mountLazyComponent(
|
||||
@@ -16973,6 +16908,24 @@ if (__DEV__) {
|
||||
);
|
||||
}
|
||||
|
||||
case IncompleteFunctionComponent: {
|
||||
var _Component3 = workInProgress.type;
|
||||
var _unresolvedProps5 = workInProgress.pendingProps;
|
||||
|
||||
var _resolvedProps5 =
|
||||
workInProgress.elementType === _Component3
|
||||
? _unresolvedProps5
|
||||
: resolveDefaultProps(_Component3, _unresolvedProps5);
|
||||
|
||||
return mountIncompleteFunctionComponent(
|
||||
current,
|
||||
workInProgress,
|
||||
_Component3,
|
||||
_resolvedProps5,
|
||||
renderLanes
|
||||
);
|
||||
}
|
||||
|
||||
case SuspenseListComponent: {
|
||||
return updateSuspenseListComponent(
|
||||
current,
|
||||
@@ -18168,10 +18121,10 @@ if (__DEV__) {
|
||||
var newProps = workInProgress.pendingProps; // Note: This intentionally doesn't check if we're hydrating because comparing
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case LazyComponent:
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent:
|
||||
case IncompleteFunctionComponent:
|
||||
case ForwardRef:
|
||||
case Fragment:
|
||||
case Mode:
|
||||
@@ -24281,12 +24234,6 @@ if (__DEV__) {
|
||||
}
|
||||
|
||||
switch (unitOfWork.tag) {
|
||||
case IndeterminateComponent: {
|
||||
// Because it suspended with `use`, we can assume it's a
|
||||
// function component.
|
||||
unitOfWork.tag = FunctionComponent; // Fallthrough to the next branch.
|
||||
}
|
||||
|
||||
case SimpleMemoComponent:
|
||||
case FunctionComponent: {
|
||||
// Resolve `defaultProps`. This logic is copied from `beginWork`.
|
||||
@@ -25414,7 +25361,6 @@ if (__DEV__) {
|
||||
var tag = fiber.tag;
|
||||
|
||||
if (
|
||||
tag !== IndeterminateComponent &&
|
||||
tag !== HostRoot &&
|
||||
tag !== ClassComponent &&
|
||||
tag !== FunctionComponent &&
|
||||
@@ -26200,22 +26146,8 @@ if (__DEV__) {
|
||||
type.defaultProps === undefined
|
||||
);
|
||||
}
|
||||
function resolveLazyComponentTag(Component) {
|
||||
if (typeof Component === "function") {
|
||||
return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
|
||||
} else if (Component !== undefined && Component !== null) {
|
||||
var $$typeof = Component.$$typeof;
|
||||
|
||||
if ($$typeof === REACT_FORWARD_REF_TYPE) {
|
||||
return ForwardRef;
|
||||
}
|
||||
|
||||
if ($$typeof === REACT_MEMO_TYPE) {
|
||||
return MemoComponent;
|
||||
}
|
||||
}
|
||||
|
||||
return IndeterminateComponent;
|
||||
function isFunctionClassComponent(type) {
|
||||
return shouldConstruct(type);
|
||||
} // This is used to create an alternate fiber to do work on.
|
||||
|
||||
function createWorkInProgress(current, pendingProps) {
|
||||
@@ -26300,7 +26232,6 @@ if (__DEV__) {
|
||||
workInProgress._debugNeedsRemount = current._debugNeedsRemount;
|
||||
|
||||
switch (workInProgress.tag) {
|
||||
case IndeterminateComponent:
|
||||
case FunctionComponent:
|
||||
case SimpleMemoComponent:
|
||||
workInProgress.type = resolveFunctionForHotReloading(current.type);
|
||||
@@ -26426,7 +26357,7 @@ if (__DEV__) {
|
||||
mode,
|
||||
lanes
|
||||
) {
|
||||
var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
var fiberTag = FunctionComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
|
||||
|
||||
var resolvedType = type;
|
||||
|
||||
@@ -26829,7 +26760,7 @@ if (__DEV__) {
|
||||
return root;
|
||||
}
|
||||
|
||||
var ReactVersion = "19.0.0-www-modern-2fc232e4";
|
||||
var ReactVersion = "19.0.0-www-modern-ac0a3da0";
|
||||
|
||||
// Might add PROFILE later.
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostComponent = 5;
|
||||
|
||||
@@ -98,7 +98,6 @@ if (__DEV__) {
|
||||
|
||||
var FunctionComponent = 0;
|
||||
var ClassComponent = 1;
|
||||
|
||||
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
||||
|
||||
var HostComponent = 5;
|
||||
|
||||
@@ -273,7 +273,6 @@ export default [
|
||||
"Symbols are not valid as a React child.\n root.render(%s)",
|
||||
"Text strings must be rendered within a <Text> component.",
|
||||
"Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",
|
||||
"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",
|
||||
"The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",
|
||||
"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",
|
||||
"The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",
|
||||
|
||||
Reference in New Issue
Block a user