diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 3cc301302cfca..adb9b9b75ac5f 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -41950d14a538aa7411b00b28bcd94ae95a45976e +374b5d26c2a379fe87ee6817217c8956c4e39aac diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index ec56a90f89a86..2e4d3877eb61c 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -1015,367 +1015,6 @@ if (__DEV__) { return event === currentReplayingEvent; } - // same object across all transitions. - - var sharedNotPendingObject = { - pending: false, - data: null, - method: null, - action: null - }; - var NotPending = Object.freeze(sharedNotPendingObject); - - function resolveDispatcher() { - // Copied from react/src/ReactHooks.js. It's the same thing but in a - // different package. - var dispatcher = ReactSharedInternals.H; - - { - if (dispatcher === null) { - error( - "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for" + - " one of the following reasons:\n" + - "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + - "2. You might be breaking the Rules of Hooks\n" + - "3. You might have more than one copy of React in the same app\n" + - "See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." - ); - } - } // Will result in a null access error if accessed outside render phase. We - // intentionally don't throw our own error because this is in a hot path. - // Also helps ensure this is inlined. - - return dispatcher; - } - - function useFormStatus() { - { - var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] We know this exists because of the feature check above. - - return dispatcher.useHostTransitionStatus(); - } - } - function useFormState(action, initialState, permalink) { - { - var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional - - return dispatcher.useFormState(action, initialState, permalink); - } - } - - var valueStack = []; - var fiberStack; - - { - fiberStack = []; - } - - var index = -1; - - function createCursor(defaultValue) { - return { - current: defaultValue - }; - } - - function pop(cursor, fiber) { - if (index < 0) { - { - error("Unexpected pop."); - } - - return; - } - - { - if (fiber !== fiberStack[index]) { - error("Unexpected Fiber popped."); - } - } - - cursor.current = valueStack[index]; - valueStack[index] = null; - - { - fiberStack[index] = null; - } - - index--; - } - - function push(cursor, value, fiber) { - index++; - valueStack[index] = cursor.current; - - { - fiberStack[index] = fiber; - } - - cursor.current = value; - } - - var contextStackCursor$1 = createCursor(null); - var contextFiberStackCursor = createCursor(null); - var rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a
) - // NOTE: Since forms cannot be nested, and this feature is only implemented by - // React DOM, we don't technically need this to be a stack. It could be a single - // module variable instead. - - var hostTransitionProviderCursor = createCursor(null); // TODO: This should initialize to NotPendingTransition, a constant - // imported from the fiber config. However, because of a cycle in the module - // graph, that value isn't defined during this module's initialization. I can't - // think of a way to work around this without moving that value out of the - // fiber config. For now, the "no provider" case is handled when reading, - // inside useHostTransitionStatus. - - var HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; - - function requiredContext(c) { - { - if (c === null) { - error( - "Expected host context to exist. This error is likely caused by a bug " + - "in React. Please file an issue." - ); - } - } - - return c; - } - - function getCurrentRootHostContainer() { - return rootInstanceStackCursor.current; - } - - function getRootHostContainer() { - var rootInstance = requiredContext(rootInstanceStackCursor.current); - return rootInstance; - } - - function getHostTransitionProvider() { - return hostTransitionProviderCursor.current; - } - - function pushHostContainer(fiber, nextRootInstance) { - // Push current root instance onto the stack; - // This allows us to reset root when portals are popped. - push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - - push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. - // However, we can't just call getRootHostContext() and push it because - // we'd have a different number of entries on the stack depending on - // whether getRootHostContext() throws somewhere in renderer code or not. - // So we push an empty value first. This lets us safely unwind on errors. - - push(contextStackCursor$1, null, fiber); - var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. - - pop(contextStackCursor$1, fiber); - push(contextStackCursor$1, nextRootContext, fiber); - } - - function popHostContainer(fiber) { - pop(contextStackCursor$1, fiber); - pop(contextFiberStackCursor, fiber); - pop(rootInstanceStackCursor, fiber); - } - - function getHostContext() { - var context = requiredContext(contextStackCursor$1.current); - return context; - } - - function pushHostContext(fiber) { - { - var stateHook = fiber.memoizedState; - - if (stateHook !== null) { - // Only provide context if this fiber has been upgraded by a host - // transition. We use the same optimization for regular host context below. - push(hostTransitionProviderCursor, fiber, fiber); - } - } - - var context = requiredContext(contextStackCursor$1.current); - var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. - - if (context !== nextContext) { - // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - push(contextFiberStackCursor, fiber, fiber); - push(contextStackCursor$1, nextContext, fiber); - } - } - - function popHostContext(fiber) { - if (contextFiberStackCursor.current === fiber) { - // Do not pop unless this Fiber provided the current context. - // pushHostContext() only pushes Fibers that provide unique contexts. - pop(contextStackCursor$1, fiber); - pop(contextFiberStackCursor, fiber); - } - - { - if (hostTransitionProviderCursor.current === fiber) { - // Do not pop unless this Fiber provided the current context. This is mostly - // a performance optimization, but conveniently it also prevents a potential - // data race where a host provider is upgraded (i.e. memoizedState becomes - // non-null) during a concurrent event. This is a bit of a flaw in the way - // we upgrade host components, but because we're accounting for it here, it - // should be fine. - pop(hostTransitionProviderCursor, fiber); // When popping the transition provider, we reset the context value back - // to `null`. We can do this because you're not allowd to nest forms. If - // we allowed for multiple nested host transition providers, then we'd - // need to reset this to the parent provider's status. - - { - HostTransitionContext._currentValue = null; - } - } - } - } - - // $FlowFixMe[method-unbinding] - var hasOwnProperty = Object.prototype.hasOwnProperty; - - /* - * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol - * and Temporal.* types. See https://github.com/facebook/react/pull/22064. - * - * The functions in this module will throw an easier-to-understand, - * easier-to-debug exception with a clear errors message message explaining the - * problem. (Instead of a confusing exception thrown inside the implementation - * of the `value` object). - */ - // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. - function typeName(value) { - { - // toStringTag is needed for namespaced types like Temporal.Instant - var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; - var type = - (hasToStringTag && value[Symbol.toStringTag]) || - value.constructor.name || - "Object"; // $FlowFixMe[incompatible-return] - - return type; - } - } // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. - - function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } - } - } - - function testStringCoercion(value) { - // If you ended up here by following an exception call stack, here's what's - // happened: you supplied an object or symbol value to React (as a prop, key, - // DOM attribute, CSS property, string ref, etc.) and when React tried to - // coerce it to a string using `'' + value`, an exception was thrown. - // - // The most common types that will cause this exception are `Symbol` instances - // and Temporal objects like `Temporal.Instant`. But any object that has a - // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this - // exception. (Library authors do this to prevent users from using built-in - // numeric operators like `+` or comparison operators like `>=` because custom - // methods are needed to perform accurate arithmetic or comparison.) - // - // To fix the problem, coerce this object or symbol value to a string before - // passing it to React. The most reliable way is usually `String(value)`. - // - // To find which value is throwing, check the browser or debugger console. - // Before this exception was thrown, there should be `console.error` output - // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the - // problem and how that type was used: key, atrribute, input value prop, etc. - // In most cases, this console output also shows the component and its - // ancestor components where the exception happened. - // - // eslint-disable-next-line react-internal/safe-string-coercion - return "" + value; - } - - function checkAttributeStringCoercion(value, attributeName) { - { - if (willCoercionThrow(value)) { - error( - "The provided `%s` attribute is an unsupported type %s." + - " This value must be coerced to a string before using it here.", - attributeName, - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error( - "The provided key is an unsupported type %s." + - " This value must be coerced to a string before using it here.", - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkCSSPropertyStringCoercion(value, propName) { - { - if (willCoercionThrow(value)) { - error( - "The provided `%s` CSS property is an unsupported type %s." + - " This value must be coerced to a string before using it here.", - propName, - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkHtmlStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error( - "The provided HTML markup uses a value of unsupported type %s." + - " This value must be coerced to a string before using it here.", - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkFormFieldValueStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error( - "Form field values (value, checked, defaultValue, or defaultChecked props)" + - " must be strings, not %s." + - " This value must be coerced to a string before using it here.", - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - // This module only exists as an ESM wrapper around the external CommonJS var scheduleCallback$3 = Scheduler.unstable_scheduleCallback; var cancelCallback$1 = Scheduler.unstable_cancelCallback; @@ -3025,6 +2664,9 @@ if (__DEV__) { f: /* flushSyncWork */ noop$3, + r: + /* requestFormReset */ + noop$3, D: /* prefetchDNS */ noop$3, @@ -3058,6 +2700,375 @@ if (__DEV__) { findDOMNode: null }; + // same object across all transitions. + + var sharedNotPendingObject = { + pending: false, + data: null, + method: null, + action: null + }; + var NotPending = Object.freeze(sharedNotPendingObject); + + function resolveDispatcher() { + // Copied from react/src/ReactHooks.js. It's the same thing but in a + // different package. + var dispatcher = ReactSharedInternals.H; + + { + if (dispatcher === null) { + error( + "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for" + + " one of the following reasons:\n" + + "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + + "2. You might be breaking the Rules of Hooks\n" + + "3. You might have more than one copy of React in the same app\n" + + "See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." + ); + } + } // Will result in a null access error if accessed outside render phase. We + // intentionally don't throw our own error because this is in a hot path. + // Also helps ensure this is inlined. + + return dispatcher; + } + + function useFormStatus() { + { + var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] We know this exists because of the feature check above. + + return dispatcher.useHostTransitionStatus(); + } + } + function useFormState(action, initialState, permalink) { + { + var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional + + return dispatcher.useFormState(action, initialState, permalink); + } + } + function requestFormReset$1(form) { + Internals.d + /* ReactDOMCurrentDispatcher */ + .r( + /* requestFormReset */ + form + ); + } + + var valueStack = []; + var fiberStack; + + { + fiberStack = []; + } + + var index = -1; + + function createCursor(defaultValue) { + return { + current: defaultValue + }; + } + + function pop(cursor, fiber) { + if (index < 0) { + { + error("Unexpected pop."); + } + + return; + } + + { + if (fiber !== fiberStack[index]) { + error("Unexpected Fiber popped."); + } + } + + cursor.current = valueStack[index]; + valueStack[index] = null; + + { + fiberStack[index] = null; + } + + index--; + } + + function push(cursor, value, fiber) { + index++; + valueStack[index] = cursor.current; + + { + fiberStack[index] = fiber; + } + + cursor.current = value; + } + + var contextStackCursor$1 = createCursor(null); + var contextFiberStackCursor = createCursor(null); + var rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a ) + // NOTE: Since forms cannot be nested, and this feature is only implemented by + // React DOM, we don't technically need this to be a stack. It could be a single + // module variable instead. + + var hostTransitionProviderCursor = createCursor(null); // TODO: This should initialize to NotPendingTransition, a constant + // imported from the fiber config. However, because of a cycle in the module + // graph, that value isn't defined during this module's initialization. I can't + // think of a way to work around this without moving that value out of the + // fiber config. For now, the "no provider" case is handled when reading, + // inside useHostTransitionStatus. + + var HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; + + function requiredContext(c) { + { + if (c === null) { + error( + "Expected host context to exist. This error is likely caused by a bug " + + "in React. Please file an issue." + ); + } + } + + return c; + } + + function getCurrentRootHostContainer() { + return rootInstanceStackCursor.current; + } + + function getRootHostContainer() { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + return rootInstance; + } + + function getHostTransitionProvider() { + return hostTransitionProviderCursor.current; + } + + function pushHostContainer(fiber, nextRootInstance) { + // Push current root instance onto the stack; + // This allows us to reset root when portals are popped. + push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. + // However, we can't just call getRootHostContext() and push it because + // we'd have a different number of entries on the stack depending on + // whether getRootHostContext() throws somewhere in renderer code or not. + // So we push an empty value first. This lets us safely unwind on errors. + + push(contextStackCursor$1, null, fiber); + var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. + + pop(contextStackCursor$1, fiber); + push(contextStackCursor$1, nextRootContext, fiber); + } + + function popHostContainer(fiber) { + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + + function getHostContext() { + var context = requiredContext(contextStackCursor$1.current); + return context; + } + + function pushHostContext(fiber) { + { + var stateHook = fiber.memoizedState; + + if (stateHook !== null) { + // Only provide context if this fiber has been upgraded by a host + // transition. We use the same optimization for regular host context below. + push(hostTransitionProviderCursor, fiber, fiber); + } + } + + var context = requiredContext(contextStackCursor$1.current); + var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. + + if (context !== nextContext) { + // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor$1, nextContext, fiber); + } + } + + function popHostContext(fiber) { + if (contextFiberStackCursor.current === fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + } + + { + if (hostTransitionProviderCursor.current === fiber) { + // Do not pop unless this Fiber provided the current context. This is mostly + // a performance optimization, but conveniently it also prevents a potential + // data race where a host provider is upgraded (i.e. memoizedState becomes + // non-null) during a concurrent event. This is a bit of a flaw in the way + // we upgrade host components, but because we're accounting for it here, it + // should be fine. + pop(hostTransitionProviderCursor, fiber); // When popping the transition provider, we reset the context value back + // to `null`. We can do this because you're not allowd to nest forms. If + // we allowed for multiple nested host transition providers, then we'd + // need to reset this to the parent provider's status. + + { + HostTransitionContext._currentValue = null; + } + } + } + } + + // $FlowFixMe[method-unbinding] + var hasOwnProperty = Object.prototype.hasOwnProperty; + + /* + * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. + * + * The functions in this module will throw an easier-to-understand, + * easier-to-debug exception with a clear errors message message explaining the + * problem. (Instead of a confusing exception thrown inside the implementation + * of the `value` object). + */ + // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. + function typeName(value) { + { + // toStringTag is needed for namespaced types like Temporal.Instant + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = + (hasToStringTag && value[Symbol.toStringTag]) || + value.constructor.name || + "Object"; // $FlowFixMe[incompatible-return] + + return type; + } + } // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. + + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + + function testStringCoercion(value) { + // If you ended up here by following an exception call stack, here's what's + // happened: you supplied an object or symbol value to React (as a prop, key, + // DOM attribute, CSS property, string ref, etc.) and when React tried to + // coerce it to a string using `'' + value`, an exception was thrown. + // + // The most common types that will cause this exception are `Symbol` instances + // and Temporal objects like `Temporal.Instant`. But any object that has a + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this + // exception. (Library authors do this to prevent users from using built-in + // numeric operators like `+` or comparison operators like `>=` because custom + // methods are needed to perform accurate arithmetic or comparison.) + // + // To fix the problem, coerce this object or symbol value to a string before + // passing it to React. The most reliable way is usually `String(value)`. + // + // To find which value is throwing, check the browser or debugger console. + // Before this exception was thrown, there should be `console.error` output + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the + // problem and how that type was used: key, atrribute, input value prop, etc. + // In most cases, this console output also shows the component and its + // ancestor components where the exception happened. + // + // eslint-disable-next-line react-internal/safe-string-coercion + return "" + value; + } + + function checkAttributeStringCoercion(value, attributeName) { + { + if (willCoercionThrow(value)) { + error( + "The provided `%s` attribute is an unsupported type %s." + + " This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error( + "The provided key is an unsupported type %s." + + " This value must be coerced to a string before using it here.", + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkCSSPropertyStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error( + "The provided `%s` CSS property is an unsupported type %s." + + " This value must be coerced to a string before using it here.", + propName, + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkHtmlStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error( + "The provided HTML markup uses a value of unsupported type %s." + + " This value must be coerced to a string before using it here.", + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkFormFieldValueStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error( + "Form field values (value, checked, defaultValue, or defaultChecked props)" + + " must be strings, not %s." + + " This value must be coerced to a string before using it here.", + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function setCurrentUpdatePriority( newPriority, // Closure will consistently not inline this function when it has arity 1 // however when it has arity 2 even if the second arg is omitted at every @@ -15907,13 +15918,13 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormReset(formFiber); + requestFormResetImpl(formFiber); return callback(formData); } ); } - function requestFormReset(formFiber) { + function requestFormResetImpl(formFiber) { var transition = requestCurrentTransition(); { @@ -36215,7 +36226,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-a7365ec3"; + var ReactVersion = "19.0.0-www-classic-c937066f"; function createPortal$1( children, @@ -45666,6 +45677,7 @@ if (__DEV__) { /* flushSyncWork */ previousDispatcher.f, /* flushSyncWork */ + r: requestFormReset, D: /* prefetchDNS */ prefetchDNS$1, @@ -45688,6 +45700,26 @@ if (__DEV__) { /* preinitModuleScript */ preinitModuleScript }; + + function requestFormReset(form) { + var formInst = getInstanceFromNode(form); + + if ( + formInst !== null && + formInst.tag === HostComponent && + formInst.type === "form" + ); + else { + // This form was either not rendered by this React renderer (or it's an + // invalid type). Try the next one. + // + // The last implementation in the sequence will throw an error. + previousDispatcher.r( + /* requestFormReset */ + form + ); + } + } // We expect this to get inlined. It is a function mostly to communicate the special nature of // how we resolve the HoistableRoot for ReactDOM.pre*() methods. Because we support calling // these methods outside of render there is no way to know which Document or ShadowRoot is 'scoped' // and so we have to fall back to something universal. Currently we just refer to the global document. @@ -49756,6 +49788,7 @@ if (__DEV__) { exports.preload = preload; exports.preloadModule = preloadModule; exports.render = render; + exports.requestFormReset = requestFormReset$1; exports.unmountComponentAtNode = unmountComponentAtNode; exports.unstable_batchedUpdates = batchedUpdates$1; exports.unstable_createEventHandle = createEventHandle; diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 44da9fefde011..f5d4654e487be 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -1923,6 +1923,9 @@ if (__DEV__) { f: /* flushSyncWork */ noop$3, + r: + /* requestFormReset */ + noop$3, D: /* prefetchDNS */ noop$3, @@ -2679,6 +2682,14 @@ if (__DEV__) { return dispatcher.useFormState(action, initialState, permalink); } } + function requestFormReset$1(form) { + Internals.d + /* ReactDOMCurrentDispatcher */ + .r( + /* requestFormReset */ + form + ); + } var valueStack = []; var fiberStack; @@ -23459,13 +23470,13 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormReset(formFiber); + requestFormResetImpl(formFiber); return callback(formData); } ); } - function requestFormReset(formFiber) { + function requestFormResetImpl(formFiber) { var transition = requestCurrentTransition(); { @@ -43975,6 +43986,7 @@ if (__DEV__) { /* flushSyncWork */ flushSyncWork, /* flushSyncWork */ + r: requestFormReset, D: /* prefetchDNS */ prefetchDNS$1, @@ -44008,6 +44020,26 @@ if (__DEV__) { return previousWasRendering || wasRendering; } + } + + function requestFormReset(form) { + var formInst = getInstanceFromNode$1(form); + + if ( + formInst !== null && + formInst.tag === HostComponent && + formInst.type === "form" + ); + else { + // This form was either not rendered by this React renderer (or it's an + // invalid type). Try the next one. + // + // The last implementation in the sequence will throw an error. + previousDispatcher.r( + /* requestFormReset */ + form + ); + } } // We expect this to get inlined. It is a function mostly to communicate the special nature of // how we resolve the HoistableRoot for ReactDOM.pre*() methods. Because we support calling // these methods outside of render there is no way to know which Document or ShadowRoot is 'scoped' @@ -45709,7 +45741,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-b8d3ecdc"; + var ReactVersion = "19.0.0-www-modern-b64de750"; function createPortal$1( children, @@ -48274,6 +48306,7 @@ if (__DEV__) { exports.preinitModule = preinitModule; exports.preload = preload; exports.preloadModule = preloadModule; + exports.requestFormReset = requestFormReset$1; exports.unstable_batchedUpdates = unstable_batchedUpdates; exports.unstable_createEventHandle = createEventHandle; exports.unstable_runWithPriority = runWithPriority; diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 69947a91cfd85..a03fbcb6577b6 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -346,96 +346,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var currentReplayingEvent = null, - sharedNotPendingObject = { - pending: !1, - data: null, - method: null, - action: null - }, - valueStack = [], - index = -1; -function createCursor(defaultValue) { - return { current: defaultValue }; -} -function pop(cursor) { - 0 > index || - ((cursor.current = valueStack[index]), (valueStack[index] = null), index--); -} -function push(cursor, value) { - index++; - valueStack[index] = cursor.current; - cursor.current = value; -} -var contextStackCursor$1 = createCursor(null), - contextFiberStackCursor = createCursor(null), - rootInstanceStackCursor = createCursor(null), - hostTransitionProviderCursor = createCursor(null), - HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function pushHostContainer(fiber, nextRootInstance) { - push(rootInstanceStackCursor, nextRootInstance); - push(contextFiberStackCursor, fiber); - push(contextStackCursor$1, null); - fiber = nextRootInstance.nodeType; - switch (fiber) { - case 9: - case 11: - nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) - ? (nextRootInstance = nextRootInstance.namespaceURI) - ? getOwnHostContext(nextRootInstance) - : 0 - : 0; - break; - default: - if ( - ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance), - (nextRootInstance = fiber.tagName), - (fiber = fiber.namespaceURI)) - ) - (fiber = getOwnHostContext(fiber)), - (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance)); - else - switch (nextRootInstance) { - case "svg": - nextRootInstance = 1; - break; - case "math": - nextRootInstance = 2; - break; - default: - nextRootInstance = 0; - } - } - pop(contextStackCursor$1); - push(contextStackCursor$1, nextRootInstance); -} -function popHostContainer() { - pop(contextStackCursor$1); - pop(contextFiberStackCursor); - pop(rootInstanceStackCursor); -} -function pushHostContext(fiber) { - null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber); - var context = contextStackCursor$1.current; - var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type); - context !== JSCompiler_inline_result && - (push(contextFiberStackCursor, fiber), - push(contextStackCursor$1, JSCompiler_inline_result)); -} -function popHostContext(fiber) { - contextFiberStackCursor.current === fiber && - (pop(contextStackCursor$1), pop(contextFiberStackCursor)); - hostTransitionProviderCursor.current === fiber && - (pop(hostTransitionProviderCursor), - (HostTransitionContext._currentValue = null)); -} -var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, @@ -720,20 +630,111 @@ function lanesToEventPriority(lanes) { } function noop$3() {} var Internals = { - Events: null, - d: { - f: noop$3, - D: noop$3, - C: noop$3, - L: noop$3, - m: noop$3, - X: noop$3, - S: noop$3, - M: noop$3 + Events: null, + d: { + f: noop$3, + r: noop$3, + D: noop$3, + C: noop$3, + L: noop$3, + m: noop$3, + X: noop$3, + S: noop$3, + M: noop$3 + }, + p: 0, + findDOMNode: null }, - p: 0, - findDOMNode: null -}; + sharedNotPendingObject = { + pending: !1, + data: null, + method: null, + action: null + }, + valueStack = [], + index = -1; +function createCursor(defaultValue) { + return { current: defaultValue }; +} +function pop(cursor) { + 0 > index || + ((cursor.current = valueStack[index]), (valueStack[index] = null), index--); +} +function push(cursor, value) { + index++; + valueStack[index] = cursor.current; + cursor.current = value; +} +var contextStackCursor$1 = createCursor(null), + contextFiberStackCursor = createCursor(null), + rootInstanceStackCursor = createCursor(null), + hostTransitionProviderCursor = createCursor(null), + HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function pushHostContainer(fiber, nextRootInstance) { + push(rootInstanceStackCursor, nextRootInstance); + push(contextFiberStackCursor, fiber); + push(contextStackCursor$1, null); + fiber = nextRootInstance.nodeType; + switch (fiber) { + case 9: + case 11: + nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) + ? (nextRootInstance = nextRootInstance.namespaceURI) + ? getOwnHostContext(nextRootInstance) + : 0 + : 0; + break; + default: + if ( + ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance), + (nextRootInstance = fiber.tagName), + (fiber = fiber.namespaceURI)) + ) + (fiber = getOwnHostContext(fiber)), + (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance)); + else + switch (nextRootInstance) { + case "svg": + nextRootInstance = 1; + break; + case "math": + nextRootInstance = 2; + break; + default: + nextRootInstance = 0; + } + } + pop(contextStackCursor$1); + push(contextStackCursor$1, nextRootInstance); +} +function popHostContainer() { + pop(contextStackCursor$1); + pop(contextFiberStackCursor); + pop(rootInstanceStackCursor); +} +function pushHostContext(fiber) { + null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber); + var context = contextStackCursor$1.current; + var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type); + context !== JSCompiler_inline_result && + (push(contextFiberStackCursor, fiber), + push(contextStackCursor$1, JSCompiler_inline_result)); +} +function popHostContext(fiber) { + contextFiberStackCursor.current === fiber && + (pop(contextStackCursor$1), pop(contextFiberStackCursor)); + hostTransitionProviderCursor.current === fiber && + (pop(hostTransitionProviderCursor), + (HostTransitionContext._currentValue = null)); +} +var hasOwnProperty = Object.prototype.hasOwnProperty; function resolveUpdatePriority() { var updatePriority = Internals.p; if (0 !== updatePriority) return updatePriority; @@ -15521,6 +15522,7 @@ function getHoistableRoot(container) { var previousDispatcher = Internals.d; Internals.d = { f: previousDispatcher.f, + r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, L: preload$1, @@ -15529,6 +15531,11 @@ Internals.d = { S: preinitStyle, M: preinitModuleScript }; +function requestFormReset(form) { + var formInst = getInstanceFromNode(form); + (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || + previousDispatcher.r(form); +} var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; @@ -17005,7 +17012,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1735 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-9a5deb76", + version: "19.0.0-www-classic-0eb250d3", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2166 = { @@ -17035,7 +17042,7 @@ var internals$jscomp$inline_2166 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-9a5deb76" + reconcilerVersion: "19.0.0-www-classic-0eb250d3" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2167 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -17432,6 +17439,9 @@ exports.render = function (element, container, callback) { callback ); }; +exports.requestFormReset = function (form) { + Internals.d.r(form); +}; exports.unmountComponentAtNode = function (container) { if (!isValidContainerLegacy(container)) throw Error(formatProdErrorMessage(299)); @@ -17498,4 +17508,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-9a5deb76"; +exports.version = "19.0.0-www-classic-0eb250d3"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index fe9f34e6d8bf4..9b9e883e52b68 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -335,6 +335,7 @@ var Internals = { Events: null, d: { f: noop$3, + r: noop$3, D: noop$3, C: noop$3, L: noop$3, @@ -14810,6 +14811,7 @@ function getHoistableRoot(container) { var previousDispatcher = Internals.d; Internals.d = { f: flushSyncWork, + r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, L: preload$1, @@ -14823,6 +14825,11 @@ function flushSyncWork() { wasRendering = flushSyncWork$1(); return previousWasRendering || wasRendering; } +function requestFormReset(form) { + var formInst = getInstanceFromNode$1(form); + (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || + previousDispatcher.r(form); +} var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; @@ -16367,7 +16374,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1728 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-3deb7bff", + version: "19.0.0-www-modern-a454c9c5", rendererPackageName: "react-dom" }; var internals$jscomp$inline_2168 = { @@ -16397,7 +16404,7 @@ var internals$jscomp$inline_2168 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-3deb7bff" + reconcilerVersion: "19.0.0-www-modern-a454c9c5" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_2169 = __REACT_DEVTOOLS_GLOBAL_HOOK__; @@ -16665,6 +16672,9 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; +exports.requestFormReset = function (form) { + Internals.d.r(form); +}; exports.unstable_batchedUpdates = unstable_batchedUpdates; exports.unstable_createEventHandle = function (type, options) { function eventHandle(target, callback) { @@ -16702,4 +16712,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-3deb7bff"; +exports.version = "19.0.0-www-modern-a454c9c5"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index b763851a176cd..ba38449c24a23 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -351,96 +351,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var currentReplayingEvent = null, - sharedNotPendingObject = { - pending: !1, - data: null, - method: null, - action: null - }, - valueStack = [], - index = -1; -function createCursor(defaultValue) { - return { current: defaultValue }; -} -function pop(cursor) { - 0 > index || - ((cursor.current = valueStack[index]), (valueStack[index] = null), index--); -} -function push(cursor, value) { - index++; - valueStack[index] = cursor.current; - cursor.current = value; -} -var contextStackCursor$1 = createCursor(null), - contextFiberStackCursor = createCursor(null), - rootInstanceStackCursor = createCursor(null), - hostTransitionProviderCursor = createCursor(null), - HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function pushHostContainer(fiber, nextRootInstance) { - push(rootInstanceStackCursor, nextRootInstance); - push(contextFiberStackCursor, fiber); - push(contextStackCursor$1, null); - fiber = nextRootInstance.nodeType; - switch (fiber) { - case 9: - case 11: - nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) - ? (nextRootInstance = nextRootInstance.namespaceURI) - ? getOwnHostContext(nextRootInstance) - : 0 - : 0; - break; - default: - if ( - ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance), - (nextRootInstance = fiber.tagName), - (fiber = fiber.namespaceURI)) - ) - (fiber = getOwnHostContext(fiber)), - (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance)); - else - switch (nextRootInstance) { - case "svg": - nextRootInstance = 1; - break; - case "math": - nextRootInstance = 2; - break; - default: - nextRootInstance = 0; - } - } - pop(contextStackCursor$1); - push(contextStackCursor$1, nextRootInstance); -} -function popHostContainer() { - pop(contextStackCursor$1); - pop(contextFiberStackCursor); - pop(rootInstanceStackCursor); -} -function pushHostContext(fiber) { - null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber); - var context = contextStackCursor$1.current; - var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type); - context !== JSCompiler_inline_result && - (push(contextFiberStackCursor, fiber), - push(contextStackCursor$1, JSCompiler_inline_result)); -} -function popHostContext(fiber) { - contextFiberStackCursor.current === fiber && - (pop(contextStackCursor$1), pop(contextFiberStackCursor)); - hostTransitionProviderCursor.current === fiber && - (pop(hostTransitionProviderCursor), - (HostTransitionContext._currentValue = null)); -} -var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, @@ -856,20 +766,111 @@ function lanesToEventPriority(lanes) { } function noop$3() {} var Internals = { - Events: null, - d: { - f: noop$3, - D: noop$3, - C: noop$3, - L: noop$3, - m: noop$3, - X: noop$3, - S: noop$3, - M: noop$3 + Events: null, + d: { + f: noop$3, + r: noop$3, + D: noop$3, + C: noop$3, + L: noop$3, + m: noop$3, + X: noop$3, + S: noop$3, + M: noop$3 + }, + p: 0, + findDOMNode: null }, - p: 0, - findDOMNode: null -}; + sharedNotPendingObject = { + pending: !1, + data: null, + method: null, + action: null + }, + valueStack = [], + index = -1; +function createCursor(defaultValue) { + return { current: defaultValue }; +} +function pop(cursor) { + 0 > index || + ((cursor.current = valueStack[index]), (valueStack[index] = null), index--); +} +function push(cursor, value) { + index++; + valueStack[index] = cursor.current; + cursor.current = value; +} +var contextStackCursor$1 = createCursor(null), + contextFiberStackCursor = createCursor(null), + rootInstanceStackCursor = createCursor(null), + hostTransitionProviderCursor = createCursor(null), + HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function pushHostContainer(fiber, nextRootInstance) { + push(rootInstanceStackCursor, nextRootInstance); + push(contextFiberStackCursor, fiber); + push(contextStackCursor$1, null); + fiber = nextRootInstance.nodeType; + switch (fiber) { + case 9: + case 11: + nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) + ? (nextRootInstance = nextRootInstance.namespaceURI) + ? getOwnHostContext(nextRootInstance) + : 0 + : 0; + break; + default: + if ( + ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance), + (nextRootInstance = fiber.tagName), + (fiber = fiber.namespaceURI)) + ) + (fiber = getOwnHostContext(fiber)), + (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance)); + else + switch (nextRootInstance) { + case "svg": + nextRootInstance = 1; + break; + case "math": + nextRootInstance = 2; + break; + default: + nextRootInstance = 0; + } + } + pop(contextStackCursor$1); + push(contextStackCursor$1, nextRootInstance); +} +function popHostContainer() { + pop(contextStackCursor$1); + pop(contextFiberStackCursor); + pop(rootInstanceStackCursor); +} +function pushHostContext(fiber) { + null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber); + var context = contextStackCursor$1.current; + var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type); + context !== JSCompiler_inline_result && + (push(contextFiberStackCursor, fiber), + push(contextStackCursor$1, JSCompiler_inline_result)); +} +function popHostContext(fiber) { + contextFiberStackCursor.current === fiber && + (pop(contextStackCursor$1), pop(contextFiberStackCursor)); + hostTransitionProviderCursor.current === fiber && + (pop(hostTransitionProviderCursor), + (HostTransitionContext._currentValue = null)); +} +var hasOwnProperty = Object.prototype.hasOwnProperty; function resolveUpdatePriority() { var updatePriority = Internals.p; if (0 !== updatePriority) return updatePriority; @@ -16269,6 +16270,7 @@ function getHoistableRoot(container) { var previousDispatcher = Internals.d; Internals.d = { f: previousDispatcher.f, + r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, L: preload$1, @@ -16277,6 +16279,11 @@ Internals.d = { S: preinitStyle, M: preinitModuleScript }; +function requestFormReset(form) { + var formInst = getInstanceFromNode(form); + (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || + previousDispatcher.r(form); +} var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; @@ -17753,7 +17760,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1821 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-5c5eca68", + version: "19.0.0-www-classic-ee61b9a0", rendererPackageName: "react-dom" }; (function (internals) { @@ -17797,7 +17804,7 @@ var devToolsConfig$jscomp$inline_1821 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-5c5eca68" + reconcilerVersion: "19.0.0-www-classic-ee61b9a0" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -18181,6 +18188,9 @@ exports.render = function (element, container, callback) { callback ); }; +exports.requestFormReset = function (form) { + Internals.d.r(form); +}; exports.unmountComponentAtNode = function (container) { if (!isValidContainerLegacy(container)) throw Error(formatProdErrorMessage(299)); @@ -18247,7 +18257,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-5c5eca68"; +exports.version = "19.0.0-www-classic-ee61b9a0"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOM-profiling.modern.js b/compiled/facebook-www/ReactDOM-profiling.modern.js index cf0f3b9aed7b1..2856cf95b8b45 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -471,6 +471,7 @@ var Internals = { Events: null, d: { f: noop$3, + r: noop$3, D: noop$3, C: noop$3, L: noop$3, @@ -15531,6 +15532,7 @@ function getHoistableRoot(container) { var previousDispatcher = Internals.d; Internals.d = { f: flushSyncWork, + r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, L: preload$1, @@ -15544,6 +15546,11 @@ function flushSyncWork() { wasRendering = flushSyncWork$1(); return previousWasRendering || wasRendering; } +function requestFormReset(form) { + var formInst = getInstanceFromNode$1(form); + (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || + previousDispatcher.r(form); +} var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; @@ -17098,7 +17105,7 @@ Internals.Events = [ var devToolsConfig$jscomp$inline_1814 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-f6515b25", + version: "19.0.0-www-modern-e3932806", rendererPackageName: "react-dom" }; (function (internals) { @@ -17142,7 +17149,7 @@ var devToolsConfig$jscomp$inline_1814 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-f6515b25" + reconcilerVersion: "19.0.0-www-modern-e3932806" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17397,6 +17404,9 @@ exports.preloadModule = function (href, options) { }); } else Internals.d.m(href); }; +exports.requestFormReset = function (form) { + Internals.d.r(form); +}; exports.unstable_batchedUpdates = unstable_batchedUpdates; exports.unstable_createEventHandle = function (type, options) { function eventHandle(target, callback) { @@ -17434,7 +17444,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-f6515b25"; +exports.version = "19.0.0-www-modern-e3932806"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/ReactDOMServer-dev.classic.js b/compiled/facebook-www/ReactDOMServer-dev.classic.js index 6694d2c55bf05..397f025c199e8 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.classic.js +++ b/compiled/facebook-www/ReactDOMServer-dev.classic.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "19.0.0-www-classic-464a0920"; + var ReactVersion = "19.0.0-www-classic-bad327f1"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -2351,6 +2351,9 @@ if (__DEV__) { var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + var ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + // same object across all transitions. var sharedNotPendingObject = { @@ -2361,9 +2364,6 @@ if (__DEV__) { }; var NotPending = Object.freeze(sharedNotPendingObject); - var ReactDOMSharedInternals = - ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - var previousDispatcher = ReactDOMSharedInternals.d; /* ReactDOMCurrentDispatcher */ @@ -2374,6 +2374,10 @@ if (__DEV__) { /* flushSyncWork */ previousDispatcher.f, /* flushSyncWork */ + r: + /* requestFormReset */ + previousDispatcher.r, + /* requestFormReset */ D: /* prefetchDNS */ prefetchDNS, diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 06b6dbc08fba3..2e2069acc8265 100644 --- a/compiled/facebook-www/ReactDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServer-dev.modern.js @@ -19,7 +19,7 @@ if (__DEV__) { var React = require("react"); var ReactDOM = require("react-dom"); - var ReactVersion = "19.0.0-www-modern-79e731cd"; + var ReactVersion = "19.0.0-www-modern-d8e2224b"; // This refers to a WWW module. var warningWWW = require("warning"); @@ -2351,6 +2351,9 @@ if (__DEV__) { var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + var ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + // same object across all transitions. var sharedNotPendingObject = { @@ -2361,9 +2364,6 @@ if (__DEV__) { }; var NotPending = Object.freeze(sharedNotPendingObject); - var ReactDOMSharedInternals = - ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - var previousDispatcher = ReactDOMSharedInternals.d; /* ReactDOMCurrentDispatcher */ @@ -2374,6 +2374,10 @@ if (__DEV__) { /* flushSyncWork */ previousDispatcher.f, /* flushSyncWork */ + r: + /* requestFormReset */ + previousDispatcher.r, + /* requestFormReset */ D: /* prefetchDNS */ prefetchDNS, diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 4af7f13eb4d97..2665e1c02b780 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -288,17 +288,18 @@ function sanitizeURL(url) { } var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, sharedNotPendingObject = { pending: !1, data: null, method: null, action: null }, - ReactDOMSharedInternals = - ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, previousDispatcher = ReactDOMSharedInternals.d; ReactDOMSharedInternals.d = { f: previousDispatcher.f, + r: previousDispatcher.r, D: prefetchDNS, C: preconnect, L: preload, @@ -5675,4 +5676,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-classic-507463a5"; +exports.version = "19.0.0-www-classic-b2292b3c"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 602d197e88902..5c9994c3b5fbf 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -288,17 +288,18 @@ function sanitizeURL(url) { } var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, sharedNotPendingObject = { pending: !1, data: null, method: null, action: null }, - ReactDOMSharedInternals = - ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, previousDispatcher = ReactDOMSharedInternals.d; ReactDOMSharedInternals.d = { f: previousDispatcher.f, + r: previousDispatcher.r, D: prefetchDNS, C: preconnect, L: preload, @@ -5653,4 +5654,4 @@ exports.renderToString = function (children, options) { 'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server' ); }; -exports.version = "19.0.0-www-modern-703c0e89"; +exports.version = "19.0.0-www-modern-eac2599d"; diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js index d5f0d72e5e0cb..0994e9281e649 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js @@ -2356,6 +2356,9 @@ if (__DEV__) { ); } + var ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; + // same object across all transitions. var sharedNotPendingObject = { @@ -2366,9 +2369,6 @@ if (__DEV__) { }; var NotPending = Object.freeze(sharedNotPendingObject); - var ReactDOMSharedInternals = - ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - var previousDispatcher = ReactDOMSharedInternals.d; /* ReactDOMCurrentDispatcher */ @@ -2379,6 +2379,10 @@ if (__DEV__) { /* flushSyncWork */ previousDispatcher.f, /* flushSyncWork */ + r: + /* requestFormReset */ + previousDispatcher.r, + /* requestFormReset */ D: /* prefetchDNS */ prefetchDNS, diff --git a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js index 34d6a9f14e0ff..2afe521ba3c35 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js @@ -284,17 +284,18 @@ if (!ReactSharedInternalsServer) throw Error( 'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' ); -var sharedNotPendingObject = { +var ReactDOMSharedInternals = + ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, + sharedNotPendingObject = { pending: !1, data: null, method: null, action: null }, - ReactDOMSharedInternals = - ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, previousDispatcher = ReactDOMSharedInternals.d; ReactDOMSharedInternals.d = { f: previousDispatcher.f, + r: previousDispatcher.r, D: prefetchDNS, C: preconnect, L: preload, diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index e64f4231e209f..48dfe519ef673 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -1007,367 +1007,6 @@ if (__DEV__) { return event === currentReplayingEvent; } - // same object across all transitions. - - var sharedNotPendingObject = { - pending: false, - data: null, - method: null, - action: null - }; - var NotPending = Object.freeze(sharedNotPendingObject); - - function resolveDispatcher() { - // Copied from react/src/ReactHooks.js. It's the same thing but in a - // different package. - var dispatcher = ReactSharedInternals.H; - - { - if (dispatcher === null) { - error( - "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for" + - " one of the following reasons:\n" + - "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + - "2. You might be breaking the Rules of Hooks\n" + - "3. You might have more than one copy of React in the same app\n" + - "See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." - ); - } - } // Will result in a null access error if accessed outside render phase. We - // intentionally don't throw our own error because this is in a hot path. - // Also helps ensure this is inlined. - - return dispatcher; - } - - function useFormStatus() { - { - var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] We know this exists because of the feature check above. - - return dispatcher.useHostTransitionStatus(); - } - } - function useFormState(action, initialState, permalink) { - { - var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional - - return dispatcher.useFormState(action, initialState, permalink); - } - } - - var valueStack = []; - var fiberStack; - - { - fiberStack = []; - } - - var index = -1; - - function createCursor(defaultValue) { - return { - current: defaultValue - }; - } - - function pop(cursor, fiber) { - if (index < 0) { - { - error("Unexpected pop."); - } - - return; - } - - { - if (fiber !== fiberStack[index]) { - error("Unexpected Fiber popped."); - } - } - - cursor.current = valueStack[index]; - valueStack[index] = null; - - { - fiberStack[index] = null; - } - - index--; - } - - function push(cursor, value, fiber) { - index++; - valueStack[index] = cursor.current; - - { - fiberStack[index] = fiber; - } - - cursor.current = value; - } - - var contextStackCursor$1 = createCursor(null); - var contextFiberStackCursor = createCursor(null); - var rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a ) - // NOTE: Since forms cannot be nested, and this feature is only implemented by - // React DOM, we don't technically need this to be a stack. It could be a single - // module variable instead. - - var hostTransitionProviderCursor = createCursor(null); // TODO: This should initialize to NotPendingTransition, a constant - // imported from the fiber config. However, because of a cycle in the module - // graph, that value isn't defined during this module's initialization. I can't - // think of a way to work around this without moving that value out of the - // fiber config. For now, the "no provider" case is handled when reading, - // inside useHostTransitionStatus. - - var HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; - - function requiredContext(c) { - { - if (c === null) { - error( - "Expected host context to exist. This error is likely caused by a bug " + - "in React. Please file an issue." - ); - } - } - - return c; - } - - function getCurrentRootHostContainer() { - return rootInstanceStackCursor.current; - } - - function getRootHostContainer() { - var rootInstance = requiredContext(rootInstanceStackCursor.current); - return rootInstance; - } - - function getHostTransitionProvider() { - return hostTransitionProviderCursor.current; - } - - function pushHostContainer(fiber, nextRootInstance) { - // Push current root instance onto the stack; - // This allows us to reset root when portals are popped. - push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - - push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. - // However, we can't just call getRootHostContext() and push it because - // we'd have a different number of entries on the stack depending on - // whether getRootHostContext() throws somewhere in renderer code or not. - // So we push an empty value first. This lets us safely unwind on errors. - - push(contextStackCursor$1, null, fiber); - var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. - - pop(contextStackCursor$1, fiber); - push(contextStackCursor$1, nextRootContext, fiber); - } - - function popHostContainer(fiber) { - pop(contextStackCursor$1, fiber); - pop(contextFiberStackCursor, fiber); - pop(rootInstanceStackCursor, fiber); - } - - function getHostContext() { - var context = requiredContext(contextStackCursor$1.current); - return context; - } - - function pushHostContext(fiber) { - { - var stateHook = fiber.memoizedState; - - if (stateHook !== null) { - // Only provide context if this fiber has been upgraded by a host - // transition. We use the same optimization for regular host context below. - push(hostTransitionProviderCursor, fiber, fiber); - } - } - - var context = requiredContext(contextStackCursor$1.current); - var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. - - if (context !== nextContext) { - // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - push(contextFiberStackCursor, fiber, fiber); - push(contextStackCursor$1, nextContext, fiber); - } - } - - function popHostContext(fiber) { - if (contextFiberStackCursor.current === fiber) { - // Do not pop unless this Fiber provided the current context. - // pushHostContext() only pushes Fibers that provide unique contexts. - pop(contextStackCursor$1, fiber); - pop(contextFiberStackCursor, fiber); - } - - { - if (hostTransitionProviderCursor.current === fiber) { - // Do not pop unless this Fiber provided the current context. This is mostly - // a performance optimization, but conveniently it also prevents a potential - // data race where a host provider is upgraded (i.e. memoizedState becomes - // non-null) during a concurrent event. This is a bit of a flaw in the way - // we upgrade host components, but because we're accounting for it here, it - // should be fine. - pop(hostTransitionProviderCursor, fiber); // When popping the transition provider, we reset the context value back - // to `null`. We can do this because you're not allowd to nest forms. If - // we allowed for multiple nested host transition providers, then we'd - // need to reset this to the parent provider's status. - - { - HostTransitionContext._currentValue = null; - } - } - } - } - - // $FlowFixMe[method-unbinding] - var hasOwnProperty = Object.prototype.hasOwnProperty; - - /* - * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol - * and Temporal.* types. See https://github.com/facebook/react/pull/22064. - * - * The functions in this module will throw an easier-to-understand, - * easier-to-debug exception with a clear errors message message explaining the - * problem. (Instead of a confusing exception thrown inside the implementation - * of the `value` object). - */ - // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. - function typeName(value) { - { - // toStringTag is needed for namespaced types like Temporal.Instant - var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; - var type = - (hasToStringTag && value[Symbol.toStringTag]) || - value.constructor.name || - "Object"; // $FlowFixMe[incompatible-return] - - return type; - } - } // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. - - function willCoercionThrow(value) { - { - try { - testStringCoercion(value); - return false; - } catch (e) { - return true; - } - } - } - - function testStringCoercion(value) { - // If you ended up here by following an exception call stack, here's what's - // happened: you supplied an object or symbol value to React (as a prop, key, - // DOM attribute, CSS property, string ref, etc.) and when React tried to - // coerce it to a string using `'' + value`, an exception was thrown. - // - // The most common types that will cause this exception are `Symbol` instances - // and Temporal objects like `Temporal.Instant`. But any object that has a - // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this - // exception. (Library authors do this to prevent users from using built-in - // numeric operators like `+` or comparison operators like `>=` because custom - // methods are needed to perform accurate arithmetic or comparison.) - // - // To fix the problem, coerce this object or symbol value to a string before - // passing it to React. The most reliable way is usually `String(value)`. - // - // To find which value is throwing, check the browser or debugger console. - // Before this exception was thrown, there should be `console.error` output - // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the - // problem and how that type was used: key, atrribute, input value prop, etc. - // In most cases, this console output also shows the component and its - // ancestor components where the exception happened. - // - // eslint-disable-next-line react-internal/safe-string-coercion - return "" + value; - } - - function checkAttributeStringCoercion(value, attributeName) { - { - if (willCoercionThrow(value)) { - error( - "The provided `%s` attribute is an unsupported type %s." + - " This value must be coerced to a string before using it here.", - attributeName, - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkKeyStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error( - "The provided key is an unsupported type %s." + - " This value must be coerced to a string before using it here.", - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkCSSPropertyStringCoercion(value, propName) { - { - if (willCoercionThrow(value)) { - error( - "The provided `%s` CSS property is an unsupported type %s." + - " This value must be coerced to a string before using it here.", - propName, - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkHtmlStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error( - "The provided HTML markup uses a value of unsupported type %s." + - " This value must be coerced to a string before using it here.", - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - function checkFormFieldValueStringCoercion(value) { - { - if (willCoercionThrow(value)) { - error( - "Form field values (value, checked, defaultValue, or defaultChecked props)" + - " must be strings, not %s." + - " This value must be coerced to a string before using it here.", - typeName(value) - ); - - return testStringCoercion(value); // throw (to help callers find troubleshooting comments) - } - } - } - // This module only exists as an ESM wrapper around the external CommonJS var scheduleCallback$3 = Scheduler.unstable_scheduleCallback; var cancelCallback$1 = Scheduler.unstable_cancelCallback; @@ -3017,6 +2656,9 @@ if (__DEV__) { f: /* flushSyncWork */ noop$4, + r: + /* requestFormReset */ + noop$4, D: /* prefetchDNS */ noop$4, @@ -3050,6 +2692,367 @@ if (__DEV__) { findDOMNode: null }; + // same object across all transitions. + + var sharedNotPendingObject = { + pending: false, + data: null, + method: null, + action: null + }; + var NotPending = Object.freeze(sharedNotPendingObject); + + function resolveDispatcher() { + // Copied from react/src/ReactHooks.js. It's the same thing but in a + // different package. + var dispatcher = ReactSharedInternals.H; + + { + if (dispatcher === null) { + error( + "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for" + + " one of the following reasons:\n" + + "1. You might have mismatching versions of React and the renderer (such as React DOM)\n" + + "2. You might be breaking the Rules of Hooks\n" + + "3. You might have more than one copy of React in the same app\n" + + "See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem." + ); + } + } // Will result in a null access error if accessed outside render phase. We + // intentionally don't throw our own error because this is in a hot path. + // Also helps ensure this is inlined. + + return dispatcher; + } + + function useFormStatus() { + { + var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] We know this exists because of the feature check above. + + return dispatcher.useHostTransitionStatus(); + } + } + function useFormState(action, initialState, permalink) { + { + var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional + + return dispatcher.useFormState(action, initialState, permalink); + } + } + + var valueStack = []; + var fiberStack; + + { + fiberStack = []; + } + + var index = -1; + + function createCursor(defaultValue) { + return { + current: defaultValue + }; + } + + function pop(cursor, fiber) { + if (index < 0) { + { + error("Unexpected pop."); + } + + return; + } + + { + if (fiber !== fiberStack[index]) { + error("Unexpected Fiber popped."); + } + } + + cursor.current = valueStack[index]; + valueStack[index] = null; + + { + fiberStack[index] = null; + } + + index--; + } + + function push(cursor, value, fiber) { + index++; + valueStack[index] = cursor.current; + + { + fiberStack[index] = fiber; + } + + cursor.current = value; + } + + var contextStackCursor$1 = createCursor(null); + var contextFiberStackCursor = createCursor(null); + var rootInstanceStackCursor = createCursor(null); // Represents the nearest host transition provider (in React DOM, a ) + // NOTE: Since forms cannot be nested, and this feature is only implemented by + // React DOM, we don't technically need this to be a stack. It could be a single + // module variable instead. + + var hostTransitionProviderCursor = createCursor(null); // TODO: This should initialize to NotPendingTransition, a constant + // imported from the fiber config. However, because of a cycle in the module + // graph, that value isn't defined during this module's initialization. I can't + // think of a way to work around this without moving that value out of the + // fiber config. For now, the "no provider" case is handled when reading, + // inside useHostTransitionStatus. + + var HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; + + function requiredContext(c) { + { + if (c === null) { + error( + "Expected host context to exist. This error is likely caused by a bug " + + "in React. Please file an issue." + ); + } + } + + return c; + } + + function getCurrentRootHostContainer() { + return rootInstanceStackCursor.current; + } + + function getRootHostContainer() { + var rootInstance = requiredContext(rootInstanceStackCursor.current); + return rootInstance; + } + + function getHostTransitionProvider() { + return hostTransitionProviderCursor.current; + } + + function pushHostContainer(fiber, nextRootInstance) { + // Push current root instance onto the stack; + // This allows us to reset root when portals are popped. + push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + + push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. + // However, we can't just call getRootHostContext() and push it because + // we'd have a different number of entries on the stack depending on + // whether getRootHostContext() throws somewhere in renderer code or not. + // So we push an empty value first. This lets us safely unwind on errors. + + push(contextStackCursor$1, null, fiber); + var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. + + pop(contextStackCursor$1, fiber); + push(contextStackCursor$1, nextRootContext, fiber); + } + + function popHostContainer(fiber) { + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + pop(rootInstanceStackCursor, fiber); + } + + function getHostContext() { + var context = requiredContext(contextStackCursor$1.current); + return context; + } + + function pushHostContext(fiber) { + { + var stateHook = fiber.memoizedState; + + if (stateHook !== null) { + // Only provide context if this fiber has been upgraded by a host + // transition. We use the same optimization for regular host context below. + push(hostTransitionProviderCursor, fiber, fiber); + } + } + + var context = requiredContext(contextStackCursor$1.current); + var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. + + if (context !== nextContext) { + // Track the context and the Fiber that provided it. + // This enables us to pop only Fibers that provide unique contexts. + push(contextFiberStackCursor, fiber, fiber); + push(contextStackCursor$1, nextContext, fiber); + } + } + + function popHostContext(fiber) { + if (contextFiberStackCursor.current === fiber) { + // Do not pop unless this Fiber provided the current context. + // pushHostContext() only pushes Fibers that provide unique contexts. + pop(contextStackCursor$1, fiber); + pop(contextFiberStackCursor, fiber); + } + + { + if (hostTransitionProviderCursor.current === fiber) { + // Do not pop unless this Fiber provided the current context. This is mostly + // a performance optimization, but conveniently it also prevents a potential + // data race where a host provider is upgraded (i.e. memoizedState becomes + // non-null) during a concurrent event. This is a bit of a flaw in the way + // we upgrade host components, but because we're accounting for it here, it + // should be fine. + pop(hostTransitionProviderCursor, fiber); // When popping the transition provider, we reset the context value back + // to `null`. We can do this because you're not allowd to nest forms. If + // we allowed for multiple nested host transition providers, then we'd + // need to reset this to the parent provider's status. + + { + HostTransitionContext._currentValue = null; + } + } + } + } + + // $FlowFixMe[method-unbinding] + var hasOwnProperty = Object.prototype.hasOwnProperty; + + /* + * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. + * + * The functions in this module will throw an easier-to-understand, + * easier-to-debug exception with a clear errors message message explaining the + * problem. (Instead of a confusing exception thrown inside the implementation + * of the `value` object). + */ + // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. + function typeName(value) { + { + // toStringTag is needed for namespaced types like Temporal.Instant + var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag; + var type = + (hasToStringTag && value[Symbol.toStringTag]) || + value.constructor.name || + "Object"; // $FlowFixMe[incompatible-return] + + return type; + } + } // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible. + + function willCoercionThrow(value) { + { + try { + testStringCoercion(value); + return false; + } catch (e) { + return true; + } + } + } + + function testStringCoercion(value) { + // If you ended up here by following an exception call stack, here's what's + // happened: you supplied an object or symbol value to React (as a prop, key, + // DOM attribute, CSS property, string ref, etc.) and when React tried to + // coerce it to a string using `'' + value`, an exception was thrown. + // + // The most common types that will cause this exception are `Symbol` instances + // and Temporal objects like `Temporal.Instant`. But any object that has a + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this + // exception. (Library authors do this to prevent users from using built-in + // numeric operators like `+` or comparison operators like `>=` because custom + // methods are needed to perform accurate arithmetic or comparison.) + // + // To fix the problem, coerce this object or symbol value to a string before + // passing it to React. The most reliable way is usually `String(value)`. + // + // To find which value is throwing, check the browser or debugger console. + // Before this exception was thrown, there should be `console.error` output + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the + // problem and how that type was used: key, atrribute, input value prop, etc. + // In most cases, this console output also shows the component and its + // ancestor components where the exception happened. + // + // eslint-disable-next-line react-internal/safe-string-coercion + return "" + value; + } + + function checkAttributeStringCoercion(value, attributeName) { + { + if (willCoercionThrow(value)) { + error( + "The provided `%s` attribute is an unsupported type %s." + + " This value must be coerced to a string before using it here.", + attributeName, + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkKeyStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error( + "The provided key is an unsupported type %s." + + " This value must be coerced to a string before using it here.", + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkCSSPropertyStringCoercion(value, propName) { + { + if (willCoercionThrow(value)) { + error( + "The provided `%s` CSS property is an unsupported type %s." + + " This value must be coerced to a string before using it here.", + propName, + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkHtmlStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error( + "The provided HTML markup uses a value of unsupported type %s." + + " This value must be coerced to a string before using it here.", + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function checkFormFieldValueStringCoercion(value) { + { + if (willCoercionThrow(value)) { + error( + "Form field values (value, checked, defaultValue, or defaultChecked props)" + + " must be strings, not %s." + + " This value must be coerced to a string before using it here.", + typeName(value) + ); + + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) + } + } + } + function setCurrentUpdatePriority( newPriority, // Closure will consistently not inline this function when it has arity 1 // however when it has arity 2 even if the second arg is omitted at every @@ -16044,13 +16047,13 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormReset(formFiber); + requestFormResetImpl(formFiber); return callback(formData); } ); } - function requestFormReset(formFiber) { + function requestFormResetImpl(formFiber) { var transition = requestCurrentTransition(); { @@ -36839,7 +36842,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-classic-cc9b0875"; + var ReactVersion = "19.0.0-www-classic-ca4f5be1"; function createPortal$1( children, @@ -46422,6 +46425,7 @@ if (__DEV__) { /* flushSyncWork */ previousDispatcher.f, /* flushSyncWork */ + r: requestFormReset$1, D: /* prefetchDNS */ prefetchDNS$1, @@ -46444,6 +46448,26 @@ if (__DEV__) { /* preinitModuleScript */ preinitModuleScript }; + + function requestFormReset$1(form) { + var formInst = getInstanceFromNode(form); + + if ( + formInst !== null && + formInst.tag === HostComponent && + formInst.type === "form" + ); + else { + // This form was either not rendered by this React renderer (or it's an + // invalid type). Try the next one. + // + // The last implementation in the sequence will throw an error. + previousDispatcher.r( + /* requestFormReset */ + form + ); + } + } // We expect this to get inlined. It is a function mostly to communicate the special nature of // how we resolve the HoistableRoot for ReactDOM.pre*() methods. Because we support calling // these methods outside of render there is no way to know which Document or ShadowRoot is 'scoped' // and so we have to fall back to something universal. Currently we just refer to the global document. @@ -50474,10 +50498,20 @@ if (__DEV__) { function noop() {} + function requestFormReset(element) { + throw new Error( + "Invalid form element. requestFormReset must be passed a form that was " + + "rendered by React." + ); + } + var DefaultDispatcher = { f: /* flushSyncWork */ noop, + r: + /* requestFormReset */ + requestFormReset, D: /* prefetchDNS */ noop, diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 8152b3dec7c69..eebef735a717b 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -1915,6 +1915,9 @@ if (__DEV__) { f: /* flushSyncWork */ noop$4, + r: + /* requestFormReset */ + noop$4, D: /* prefetchDNS */ noop$4, @@ -23596,13 +23599,13 @@ if (__DEV__) { // once more of this function is implemented. function () { // Automatically reset the form when the action completes. - requestFormReset(formFiber); + requestFormResetImpl(formFiber); return callback(formData); } ); } - function requestFormReset(formFiber) { + function requestFormResetImpl(formFiber) { var transition = requestCurrentTransition(); { @@ -44731,6 +44734,7 @@ if (__DEV__) { /* flushSyncWork */ flushSyncWork, /* flushSyncWork */ + r: requestFormReset$1, D: /* prefetchDNS */ prefetchDNS$1, @@ -44764,6 +44768,26 @@ if (__DEV__) { return previousWasRendering || wasRendering; } + } + + function requestFormReset$1(form) { + var formInst = getInstanceFromNode$1(form); + + if ( + formInst !== null && + formInst.tag === HostComponent && + formInst.type === "form" + ); + else { + // This form was either not rendered by this React renderer (or it's an + // invalid type). Try the next one. + // + // The last implementation in the sequence will throw an error. + previousDispatcher.r( + /* requestFormReset */ + form + ); + } } // We expect this to get inlined. It is a function mostly to communicate the special nature of // how we resolve the HoistableRoot for ReactDOM.pre*() methods. Because we support calling // these methods outside of render there is no way to know which Document or ShadowRoot is 'scoped' @@ -46465,7 +46489,7 @@ if (__DEV__) { return root; } - var ReactVersion = "19.0.0-www-modern-73131b69"; + var ReactVersion = "19.0.0-www-modern-fc98b3e6"; function createPortal$1( children, @@ -48959,10 +48983,20 @@ if (__DEV__) { function noop() {} + function requestFormReset(element) { + throw new Error( + "Invalid form element. requestFormReset must be passed a form that was " + + "rendered by React." + ); + } + var DefaultDispatcher = { f: /* flushSyncWork */ noop, + r: + /* requestFormReset */ + requestFormReset, D: /* prefetchDNS */ noop, diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index bd2bb4518e491..8491a7df66403 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -346,96 +346,6 @@ function doesFiberContain(parentFiber, childFiber) { return !1; } var currentReplayingEvent = null, - sharedNotPendingObject = { - pending: !1, - data: null, - method: null, - action: null - }, - valueStack = [], - index = -1; -function createCursor(defaultValue) { - return { current: defaultValue }; -} -function pop(cursor) { - 0 > index || - ((cursor.current = valueStack[index]), (valueStack[index] = null), index--); -} -function push(cursor, value) { - index++; - valueStack[index] = cursor.current; - cursor.current = value; -} -var contextStackCursor$1 = createCursor(null), - contextFiberStackCursor = createCursor(null), - rootInstanceStackCursor = createCursor(null), - hostTransitionProviderCursor = createCursor(null), - HostTransitionContext = { - $$typeof: REACT_CONTEXT_TYPE, - Provider: null, - Consumer: null, - _currentValue: null, - _currentValue2: null, - _threadCount: 0 - }; -function pushHostContainer(fiber, nextRootInstance) { - push(rootInstanceStackCursor, nextRootInstance); - push(contextFiberStackCursor, fiber); - push(contextStackCursor$1, null); - fiber = nextRootInstance.nodeType; - switch (fiber) { - case 9: - case 11: - nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) - ? (nextRootInstance = nextRootInstance.namespaceURI) - ? getOwnHostContext(nextRootInstance) - : 0 - : 0; - break; - default: - if ( - ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance), - (nextRootInstance = fiber.tagName), - (fiber = fiber.namespaceURI)) - ) - (fiber = getOwnHostContext(fiber)), - (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance)); - else - switch (nextRootInstance) { - case "svg": - nextRootInstance = 1; - break; - case "math": - nextRootInstance = 2; - break; - default: - nextRootInstance = 0; - } - } - pop(contextStackCursor$1); - push(contextStackCursor$1, nextRootInstance); -} -function popHostContainer() { - pop(contextStackCursor$1); - pop(contextFiberStackCursor); - pop(rootInstanceStackCursor); -} -function pushHostContext(fiber) { - null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber); - var context = contextStackCursor$1.current; - var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type); - context !== JSCompiler_inline_result && - (push(contextFiberStackCursor, fiber), - push(contextStackCursor$1, JSCompiler_inline_result)); -} -function popHostContext(fiber) { - contextFiberStackCursor.current === fiber && - (pop(contextStackCursor$1), pop(contextFiberStackCursor)); - hostTransitionProviderCursor.current === fiber && - (pop(hostTransitionProviderCursor), - (HostTransitionContext._currentValue = null)); -} -var hasOwnProperty = Object.prototype.hasOwnProperty, scheduleCallback$3 = Scheduler.unstable_scheduleCallback, cancelCallback$1 = Scheduler.unstable_cancelCallback, shouldYield = Scheduler.unstable_shouldYield, @@ -720,20 +630,111 @@ function lanesToEventPriority(lanes) { } function noop$3() {} var Internals = { - Events: null, - d: { - f: noop$3, - D: noop$3, - C: noop$3, - L: noop$3, - m: noop$3, - X: noop$3, - S: noop$3, - M: noop$3 + Events: null, + d: { + f: noop$3, + r: noop$3, + D: noop$3, + C: noop$3, + L: noop$3, + m: noop$3, + X: noop$3, + S: noop$3, + M: noop$3 + }, + p: 0, + findDOMNode: null }, - p: 0, - findDOMNode: null -}; + sharedNotPendingObject = { + pending: !1, + data: null, + method: null, + action: null + }, + valueStack = [], + index = -1; +function createCursor(defaultValue) { + return { current: defaultValue }; +} +function pop(cursor) { + 0 > index || + ((cursor.current = valueStack[index]), (valueStack[index] = null), index--); +} +function push(cursor, value) { + index++; + valueStack[index] = cursor.current; + cursor.current = value; +} +var contextStackCursor$1 = createCursor(null), + contextFiberStackCursor = createCursor(null), + rootInstanceStackCursor = createCursor(null), + hostTransitionProviderCursor = createCursor(null), + HostTransitionContext = { + $$typeof: REACT_CONTEXT_TYPE, + Provider: null, + Consumer: null, + _currentValue: null, + _currentValue2: null, + _threadCount: 0 + }; +function pushHostContainer(fiber, nextRootInstance) { + push(rootInstanceStackCursor, nextRootInstance); + push(contextFiberStackCursor, fiber); + push(contextStackCursor$1, null); + fiber = nextRootInstance.nodeType; + switch (fiber) { + case 9: + case 11: + nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) + ? (nextRootInstance = nextRootInstance.namespaceURI) + ? getOwnHostContext(nextRootInstance) + : 0 + : 0; + break; + default: + if ( + ((fiber = 8 === fiber ? nextRootInstance.parentNode : nextRootInstance), + (nextRootInstance = fiber.tagName), + (fiber = fiber.namespaceURI)) + ) + (fiber = getOwnHostContext(fiber)), + (nextRootInstance = getChildHostContextProd(fiber, nextRootInstance)); + else + switch (nextRootInstance) { + case "svg": + nextRootInstance = 1; + break; + case "math": + nextRootInstance = 2; + break; + default: + nextRootInstance = 0; + } + } + pop(contextStackCursor$1); + push(contextStackCursor$1, nextRootInstance); +} +function popHostContainer() { + pop(contextStackCursor$1); + pop(contextFiberStackCursor); + pop(rootInstanceStackCursor); +} +function pushHostContext(fiber) { + null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber); + var context = contextStackCursor$1.current; + var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type); + context !== JSCompiler_inline_result && + (push(contextFiberStackCursor, fiber), + push(contextStackCursor$1, JSCompiler_inline_result)); +} +function popHostContext(fiber) { + contextFiberStackCursor.current === fiber && + (pop(contextStackCursor$1), pop(contextFiberStackCursor)); + hostTransitionProviderCursor.current === fiber && + (pop(hostTransitionProviderCursor), + (HostTransitionContext._currentValue = null)); +} +var hasOwnProperty = Object.prototype.hasOwnProperty; function resolveUpdatePriority() { var updatePriority = Internals.p; if (0 !== updatePriority) return updatePriority; @@ -12822,7 +12823,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-c4e53255" + reconcilerVersion: "19.0.0-www-classic-788f5c6a" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -15894,6 +15895,7 @@ function getHoistableRoot(container) { var previousDispatcher = Internals.d; Internals.d = { f: previousDispatcher.f, + r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, L: preload$1, @@ -15902,6 +15904,11 @@ Internals.d = { S: preinitStyle, M: preinitModuleScript }; +function requestFormReset(form) { + var formInst = getInstanceFromNode(form); + (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || + previousDispatcher.r(form); +} var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; @@ -17378,7 +17385,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-c4e53255", + version: "19.0.0-www-classic-788f5c6a", rendererPackageName: "react-dom" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17511,7 +17518,7 @@ assign(Internals, { injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-c4e53255", + version: "19.0.0-www-classic-788f5c6a", rendererPackageName: "react-dom" }); exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = @@ -17978,4 +17985,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-c4e53255"; +exports.version = "19.0.0-www-classic-788f5c6a"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 27f5862866c93..1a1c22638aabb 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -335,6 +335,7 @@ var Internals = { Events: null, d: { f: noop$3, + r: noop$3, D: noop$3, C: noop$3, L: noop$3, @@ -15198,6 +15199,7 @@ function getHoistableRoot(container) { var previousDispatcher = Internals.d; Internals.d = { f: flushSyncWork, + r: requestFormReset, D: prefetchDNS$1, C: preconnect$1, L: preload$1, @@ -15211,6 +15213,11 @@ function flushSyncWork() { wasRendering = flushSyncWork$1(); return previousWasRendering || wasRendering; } +function requestFormReset(form) { + var formInst = getInstanceFromNode$1(form); + (null !== formInst && 5 === formInst.tag && "form" === formInst.type) || + previousDispatcher.r(form); +} var globalDocument = "undefined" === typeof document ? null : document; function preconnectAs(rel, href, crossOrigin) { var ownerDocument = globalDocument; @@ -16101,7 +16108,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-4ee88fe7" + reconcilerVersion: "19.0.0-www-modern-29122695" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -16799,7 +16806,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-4ee88fe7", + version: "19.0.0-www-modern-29122695", rendererPackageName: "react-dom" }); if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) @@ -16807,7 +16814,7 @@ if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-4ee88fe7", + version: "19.0.0-www-modern-29122695", rendererPackageName: "react-dom" }); exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = @@ -17221,4 +17228,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-4ee88fe7"; +exports.version = "19.0.0-www-modern-29122695"; diff --git a/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js b/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js index 3cab71835483d..75dc31f15548b 100644 --- a/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js +++ b/compiled/facebook-www/ReactFlightDOMServer-dev.modern.js @@ -168,6 +168,10 @@ if (__DEV__) { /* flushSyncWork */ previousDispatcher.f, /* flushSyncWork */ + r: + /* requestFormReset */ + previousDispatcher.r, + /* requestFormReset */ D: /* prefetchDNS */ prefetchDNS, diff --git a/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js b/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js index 77718de0df55d..f79f19fe88507 100644 --- a/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactFlightDOMServer-prod.modern.js @@ -31,6 +31,7 @@ var ReactDOMSharedInternals = previousDispatcher = ReactDOMSharedInternals.d; ReactDOMSharedInternals.d = { f: previousDispatcher.f, + r: previousDispatcher.r, D: prefetchDNS, C: preconnect, L: preload,