diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 177a8c5d4e98d..92ccccd83e0ab 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -3b551c82844bcfde51f0febb8e42c1a0d777df2c +9f2eebd807bf53b7d9901cf0b768762948224cae diff --git a/compiled/facebook-www/ReactART-dev.classic.js b/compiled/facebook-www/ReactART-dev.classic.js index 31be1715cac58..0c92162e53333 100644 --- a/compiled/facebook-www/ReactART-dev.classic.js +++ b/compiled/facebook-www/ReactART-dev.classic.js @@ -63,7 +63,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = '19.0.0-www-classic-5033c724'; +var ReactVersion = '19.0.0-www-classic-bd72d7f5'; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -169,6 +169,7 @@ var enableProfilerNestedUpdatePhase = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var disableLegacyMode = false; var FunctionComponent = 0; @@ -6597,7 +6598,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -6682,7 +6683,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -6750,7 +6751,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -6983,7 +6984,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -7022,6 +7023,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -7327,8 +7332,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -7836,7 +7841,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. diff --git a/compiled/facebook-www/ReactART-dev.modern.js b/compiled/facebook-www/ReactART-dev.modern.js index faae258fd51a1..95172f2bebf4f 100644 --- a/compiled/facebook-www/ReactART-dev.modern.js +++ b/compiled/facebook-www/ReactART-dev.modern.js @@ -63,7 +63,7 @@ function _assertThisInitialized(self) { return self; } -var ReactVersion = '19.0.0-www-modern-9c7c2ced'; +var ReactVersion = '19.0.0-www-modern-03c6d7dd'; var LegacyRoot = 0; var ConcurrentRoot = 1; @@ -169,6 +169,7 @@ var enableProfilerNestedUpdatePhase = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var disableLegacyMode = true; var FunctionComponent = 0; @@ -6386,7 +6387,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -6471,7 +6472,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -6539,7 +6540,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -6772,7 +6773,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -6811,6 +6812,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -7116,8 +7121,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -7625,7 +7630,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. diff --git a/compiled/facebook-www/ReactART-prod.classic.js b/compiled/facebook-www/ReactART-prod.classic.js index d40851f45155d..1e121cfa49f9b 100644 --- a/compiled/facebook-www/ReactART-prod.classic.js +++ b/compiled/facebook-www/ReactART-prod.classic.js @@ -2204,22 +2204,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -2235,28 +2232,30 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; } if (step.done) - return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn; + return ( + deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild + ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -2265,14 +2264,14 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && oldFiber.forEach(function (child) { return deleteChild(returnFiber, child); }); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -2404,13 +2403,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -10619,19 +10623,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1114 = { + devToolsConfig$jscomp$inline_1123 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "19.0.0-www-classic-48f6e4f0", + version: "19.0.0-www-classic-6eb34c6f", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1322 = { - bundleType: devToolsConfig$jscomp$inline_1114.bundleType, - version: devToolsConfig$jscomp$inline_1114.version, - rendererPackageName: devToolsConfig$jscomp$inline_1114.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1114.rendererConfig, +var internals$jscomp$inline_1331 = { + bundleType: devToolsConfig$jscomp$inline_1123.bundleType, + version: devToolsConfig$jscomp$inline_1123.version, + rendererPackageName: devToolsConfig$jscomp$inline_1123.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1123.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10648,26 +10652,26 @@ var internals$jscomp$inline_1322 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1114.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1123.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-48f6e4f0" + reconcilerVersion: "19.0.0-www-classic-6eb34c6f" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1323 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1332 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1323.isDisabled && - hook$jscomp$inline_1323.supportsFiber + !hook$jscomp$inline_1332.isDisabled && + hook$jscomp$inline_1332.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1323.inject( - internals$jscomp$inline_1322 + (rendererID = hook$jscomp$inline_1332.inject( + internals$jscomp$inline_1331 )), - (injectedHook = hook$jscomp$inline_1323); + (injectedHook = hook$jscomp$inline_1332); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 37af1d61ebe38..816c19dee9f18 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -2002,22 +2002,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -2033,28 +2030,30 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; } if (step.done) - return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn; + return ( + deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild + ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -2063,14 +2062,14 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && oldFiber.forEach(function (child) { return deleteChild(returnFiber, child); }); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -2202,13 +2201,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -10098,19 +10102,19 @@ var slice = Array.prototype.slice, }; return Text; })(React.Component), - devToolsConfig$jscomp$inline_1079 = { + devToolsConfig$jscomp$inline_1088 = { findFiberByHostInstance: function () { return null; }, bundleType: 0, - version: "19.0.0-www-modern-ce5296cc", + version: "19.0.0-www-modern-fad207b4", rendererPackageName: "react-art" }; -var internals$jscomp$inline_1307 = { - bundleType: devToolsConfig$jscomp$inline_1079.bundleType, - version: devToolsConfig$jscomp$inline_1079.version, - rendererPackageName: devToolsConfig$jscomp$inline_1079.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1079.rendererConfig, +var internals$jscomp$inline_1316 = { + bundleType: devToolsConfig$jscomp$inline_1088.bundleType, + version: devToolsConfig$jscomp$inline_1088.version, + rendererPackageName: devToolsConfig$jscomp$inline_1088.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1088.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -10127,26 +10131,26 @@ var internals$jscomp$inline_1307 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1079.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1088.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-ce5296cc" + reconcilerVersion: "19.0.0-www-modern-fad207b4" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_1308 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_1317 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_1308.isDisabled && - hook$jscomp$inline_1308.supportsFiber + !hook$jscomp$inline_1317.isDisabled && + hook$jscomp$inline_1317.supportsFiber ) try { - (rendererID = hook$jscomp$inline_1308.inject( - internals$jscomp$inline_1307 + (rendererID = hook$jscomp$inline_1317.inject( + internals$jscomp$inline_1316 )), - (injectedHook = hook$jscomp$inline_1308); + (injectedHook = hook$jscomp$inline_1317); } catch (err) {} } var Path = Mode$1.Path; diff --git a/compiled/facebook-www/ReactDOM-dev.classic.js b/compiled/facebook-www/ReactDOM-dev.classic.js index 91f3107afa170..bda033ff6218a 100644 --- a/compiled/facebook-www/ReactDOM-dev.classic.js +++ b/compiled/facebook-www/ReactDOM-dev.classic.js @@ -135,6 +135,7 @@ var disableIEWorkarounds = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var enableSuspenseCallback = true; var disableLegacyMode = false; @@ -10196,7 +10197,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -10281,7 +10282,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -10349,7 +10350,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -10597,7 +10598,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -10636,6 +10637,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -10956,8 +10961,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -11467,7 +11472,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -30825,7 +30831,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-61925632'; +var ReactVersion = '19.0.0-www-classic-318e6766'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index 7ded44cc9f5c9..b74156b2b6555 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -112,6 +112,7 @@ var disableIEWorkarounds = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var enableSuspenseCallback = true; var disableLegacyMode = true; @@ -15606,7 +15607,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -15691,7 +15692,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -15759,7 +15760,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -16007,7 +16008,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -16046,6 +16047,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -16366,8 +16371,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -17603,7 +17608,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -38732,7 +38738,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-d45a9ed1'; +var ReactVersion = '19.0.0-www-modern-a883b293'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOM-prod.classic.js b/compiled/facebook-www/ReactDOM-prod.classic.js index 97e97f52bf8b5..604908ff4034a 100644 --- a/compiled/facebook-www/ReactDOM-prod.classic.js +++ b/compiled/facebook-www/ReactDOM-prod.classic.js @@ -2897,22 +2897,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -2928,7 +2925,7 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -2937,24 +2934,24 @@ function createChildReconciler(shouldTrackSideEffects) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -2963,7 +2960,7 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -2971,7 +2968,7 @@ function createChildReconciler(shouldTrackSideEffects) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -3103,13 +3100,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -13079,19 +13081,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$351; + var JSCompiler_inline_result$jscomp$352; if (canUseDOM) { - var isSupported$jscomp$inline_1497 = "oninput" in document; - if (!isSupported$jscomp$inline_1497) { - var element$jscomp$inline_1498 = document.createElement("div"); - element$jscomp$inline_1498.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1497 = - "function" === typeof element$jscomp$inline_1498.oninput; + var isSupported$jscomp$inline_1506 = "oninput" in document; + if (!isSupported$jscomp$inline_1506) { + var element$jscomp$inline_1507 = document.createElement("div"); + element$jscomp$inline_1507.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1506 = + "function" === typeof element$jscomp$inline_1507.oninput; } - JSCompiler_inline_result$jscomp$351 = isSupported$jscomp$inline_1497; - } else JSCompiler_inline_result$jscomp$351 = !1; + JSCompiler_inline_result$jscomp$352 = isSupported$jscomp$inline_1506; + } else JSCompiler_inline_result$jscomp$352 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$351 && + JSCompiler_inline_result$jscomp$352 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13469,20 +13471,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1538 = 0; - i$jscomp$inline_1538 < simpleEventPluginEvents.length; - i$jscomp$inline_1538++ + var i$jscomp$inline_1547 = 0; + i$jscomp$inline_1547 < simpleEventPluginEvents.length; + i$jscomp$inline_1547++ ) { - var eventName$jscomp$inline_1539 = - simpleEventPluginEvents[i$jscomp$inline_1538], - domEventName$jscomp$inline_1540 = - eventName$jscomp$inline_1539.toLowerCase(), - capitalizedEvent$jscomp$inline_1541 = - eventName$jscomp$inline_1539[0].toUpperCase() + - eventName$jscomp$inline_1539.slice(1); + var eventName$jscomp$inline_1548 = + simpleEventPluginEvents[i$jscomp$inline_1547], + domEventName$jscomp$inline_1549 = + eventName$jscomp$inline_1548.toLowerCase(), + capitalizedEvent$jscomp$inline_1550 = + eventName$jscomp$inline_1548[0].toUpperCase() + + eventName$jscomp$inline_1548.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1540, - "on" + capitalizedEvent$jscomp$inline_1541 + domEventName$jscomp$inline_1549, + "on" + capitalizedEvent$jscomp$inline_1550 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -17035,17 +17037,17 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1729 = { +var devToolsConfig$jscomp$inline_1738 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-73a7e510", + version: "19.0.0-www-classic-baf64147", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2160 = { - bundleType: devToolsConfig$jscomp$inline_1729.bundleType, - version: devToolsConfig$jscomp$inline_1729.version, - rendererPackageName: devToolsConfig$jscomp$inline_1729.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1729.rendererConfig, +var internals$jscomp$inline_2169 = { + bundleType: devToolsConfig$jscomp$inline_1738.bundleType, + version: devToolsConfig$jscomp$inline_1738.version, + rendererPackageName: devToolsConfig$jscomp$inline_1738.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1738.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17061,26 +17063,26 @@ var internals$jscomp$inline_2160 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1729.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1738.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-73a7e510" + reconcilerVersion: "19.0.0-www-classic-baf64147" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2161 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2170 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2161.isDisabled && - hook$jscomp$inline_2161.supportsFiber + !hook$jscomp$inline_2170.isDisabled && + hook$jscomp$inline_2170.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2161.inject( - internals$jscomp$inline_2160 + (rendererID = hook$jscomp$inline_2170.inject( + internals$jscomp$inline_2169 )), - (injectedHook = hook$jscomp$inline_2161); + (injectedHook = hook$jscomp$inline_2170); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17534,4 +17536,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-73a7e510"; +exports.version = "19.0.0-www-classic-baf64147"; diff --git a/compiled/facebook-www/ReactDOM-prod.modern.js b/compiled/facebook-www/ReactDOM-prod.modern.js index faa33e1216a2d..3b734704dfbc1 100644 --- a/compiled/facebook-www/ReactDOM-prod.modern.js +++ b/compiled/facebook-www/ReactDOM-prod.modern.js @@ -2046,14 +2046,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$295; if (canUseDOM) { - var isSupported$jscomp$inline_427 = "oninput" in document; - if (!isSupported$jscomp$inline_427) { - var element$jscomp$inline_428 = document.createElement("div"); - element$jscomp$inline_428.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_427 = - "function" === typeof element$jscomp$inline_428.oninput; + var isSupported$jscomp$inline_428 = "oninput" in document; + if (!isSupported$jscomp$inline_428) { + var element$jscomp$inline_429 = document.createElement("div"); + element$jscomp$inline_429.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_428 = + "function" === typeof element$jscomp$inline_429.oninput; } - JSCompiler_inline_result$jscomp$295 = isSupported$jscomp$inline_427; + JSCompiler_inline_result$jscomp$295 = isSupported$jscomp$inline_428; } else JSCompiler_inline_result$jscomp$295 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$295 && @@ -2489,19 +2489,19 @@ for ( } console.error(error); }, - i$jscomp$inline_468 = 0; - i$jscomp$inline_468 < simpleEventPluginEvents.length; - i$jscomp$inline_468++ + i$jscomp$inline_469 = 0; + i$jscomp$inline_469 < simpleEventPluginEvents.length; + i$jscomp$inline_469++ ) { - var eventName$jscomp$inline_469 = - simpleEventPluginEvents[i$jscomp$inline_468], - domEventName$jscomp$inline_470 = eventName$jscomp$inline_469.toLowerCase(), - capitalizedEvent$jscomp$inline_471 = - eventName$jscomp$inline_469[0].toUpperCase() + - eventName$jscomp$inline_469.slice(1); + var eventName$jscomp$inline_470 = + simpleEventPluginEvents[i$jscomp$inline_469], + domEventName$jscomp$inline_471 = eventName$jscomp$inline_470.toLowerCase(), + capitalizedEvent$jscomp$inline_472 = + eventName$jscomp$inline_470[0].toUpperCase() + + eventName$jscomp$inline_470.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_470, - "on" + capitalizedEvent$jscomp$inline_471 + domEventName$jscomp$inline_471, + "on" + capitalizedEvent$jscomp$inline_472 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -5198,22 +5198,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -5229,7 +5226,7 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -5238,24 +5235,24 @@ function createChildReconciler(shouldTrackSideEffects) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -5264,7 +5261,7 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -5272,7 +5269,7 @@ function createChildReconciler(shouldTrackSideEffects) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -5404,13 +5401,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -16397,17 +16399,17 @@ Internals.Events = [ restoreStateIfNeeded, unstable_batchedUpdates ]; -var devToolsConfig$jscomp$inline_1722 = { +var devToolsConfig$jscomp$inline_1731 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-ad222928", + version: "19.0.0-www-modern-bc3b634a", rendererPackageName: "react-dom" }; -var internals$jscomp$inline_2162 = { - bundleType: devToolsConfig$jscomp$inline_1722.bundleType, - version: devToolsConfig$jscomp$inline_1722.version, - rendererPackageName: devToolsConfig$jscomp$inline_1722.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1722.rendererConfig, +var internals$jscomp$inline_2171 = { + bundleType: devToolsConfig$jscomp$inline_1731.bundleType, + version: devToolsConfig$jscomp$inline_1731.version, + rendererPackageName: devToolsConfig$jscomp$inline_1731.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1731.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -16423,26 +16425,26 @@ var internals$jscomp$inline_2162 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1722.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1731.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-ad222928" + reconcilerVersion: "19.0.0-www-modern-bc3b634a" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { - var hook$jscomp$inline_2163 = __REACT_DEVTOOLS_GLOBAL_HOOK__; + var hook$jscomp$inline_2172 = __REACT_DEVTOOLS_GLOBAL_HOOK__; if ( - !hook$jscomp$inline_2163.isDisabled && - hook$jscomp$inline_2163.supportsFiber + !hook$jscomp$inline_2172.isDisabled && + hook$jscomp$inline_2172.supportsFiber ) try { - (rendererID = hook$jscomp$inline_2163.inject( - internals$jscomp$inline_2162 + (rendererID = hook$jscomp$inline_2172.inject( + internals$jscomp$inline_2171 )), - (injectedHook = hook$jscomp$inline_2163); + (injectedHook = hook$jscomp$inline_2172); } catch (err) {} } var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -16738,4 +16740,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-ad222928"; +exports.version = "19.0.0-www-modern-bc3b634a"; diff --git a/compiled/facebook-www/ReactDOM-profiling.classic.js b/compiled/facebook-www/ReactDOM-profiling.classic.js index 6e5d8edef60d9..ec2515563e17e 100644 --- a/compiled/facebook-www/ReactDOM-profiling.classic.js +++ b/compiled/facebook-www/ReactDOM-profiling.classic.js @@ -3033,22 +3033,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -3064,7 +3061,7 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -3073,24 +3070,24 @@ function createChildReconciler(shouldTrackSideEffects) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -3099,7 +3096,7 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -3107,7 +3104,7 @@ function createChildReconciler(shouldTrackSideEffects) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -3239,13 +3236,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -13827,19 +13829,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$372; + var JSCompiler_inline_result$jscomp$373; if (canUseDOM) { - var isSupported$jscomp$inline_1583 = "oninput" in document; - if (!isSupported$jscomp$inline_1583) { - var element$jscomp$inline_1584 = document.createElement("div"); - element$jscomp$inline_1584.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1583 = - "function" === typeof element$jscomp$inline_1584.oninput; + var isSupported$jscomp$inline_1592 = "oninput" in document; + if (!isSupported$jscomp$inline_1592) { + var element$jscomp$inline_1593 = document.createElement("div"); + element$jscomp$inline_1593.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1592 = + "function" === typeof element$jscomp$inline_1593.oninput; } - JSCompiler_inline_result$jscomp$372 = isSupported$jscomp$inline_1583; - } else JSCompiler_inline_result$jscomp$372 = !1; + JSCompiler_inline_result$jscomp$373 = isSupported$jscomp$inline_1592; + } else JSCompiler_inline_result$jscomp$373 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$372 && + JSCompiler_inline_result$jscomp$373 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -14217,20 +14219,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1624 = 0; - i$jscomp$inline_1624 < simpleEventPluginEvents.length; - i$jscomp$inline_1624++ + var i$jscomp$inline_1633 = 0; + i$jscomp$inline_1633 < simpleEventPluginEvents.length; + i$jscomp$inline_1633++ ) { - var eventName$jscomp$inline_1625 = - simpleEventPluginEvents[i$jscomp$inline_1624], - domEventName$jscomp$inline_1626 = - eventName$jscomp$inline_1625.toLowerCase(), - capitalizedEvent$jscomp$inline_1627 = - eventName$jscomp$inline_1625[0].toUpperCase() + - eventName$jscomp$inline_1625.slice(1); + var eventName$jscomp$inline_1634 = + simpleEventPluginEvents[i$jscomp$inline_1633], + domEventName$jscomp$inline_1635 = + eventName$jscomp$inline_1634.toLowerCase(), + capitalizedEvent$jscomp$inline_1636 = + eventName$jscomp$inline_1634[0].toUpperCase() + + eventName$jscomp$inline_1634.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1626, - "on" + capitalizedEvent$jscomp$inline_1627 + domEventName$jscomp$inline_1635, + "on" + capitalizedEvent$jscomp$inline_1636 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -17783,10 +17785,10 @@ Internals.Events = [ return fn(a); } ]; -var devToolsConfig$jscomp$inline_1815 = { +var devToolsConfig$jscomp$inline_1824 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-e85c3a58", + version: "19.0.0-www-classic-04ef40e4", rendererPackageName: "react-dom" }; (function (internals) { @@ -17804,10 +17806,10 @@ var devToolsConfig$jscomp$inline_1815 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1815.bundleType, - version: devToolsConfig$jscomp$inline_1815.version, - rendererPackageName: devToolsConfig$jscomp$inline_1815.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1815.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1824.bundleType, + version: devToolsConfig$jscomp$inline_1824.version, + rendererPackageName: devToolsConfig$jscomp$inline_1824.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1824.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17823,14 +17825,14 @@ var devToolsConfig$jscomp$inline_1815 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1815.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1824.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-e85c3a58" + reconcilerVersion: "19.0.0-www-classic-04ef40e4" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -18283,7 +18285,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-e85c3a58"; +exports.version = "19.0.0-www-classic-04ef40e4"; "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 3ec79b8b93263..297953560f537 100644 --- a/compiled/facebook-www/ReactDOM-profiling.modern.js +++ b/compiled/facebook-www/ReactDOM-profiling.modern.js @@ -2182,14 +2182,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$316; if (canUseDOM) { - var isSupported$jscomp$inline_448 = "oninput" in document; - if (!isSupported$jscomp$inline_448) { - var element$jscomp$inline_449 = document.createElement("div"); - element$jscomp$inline_449.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_448 = - "function" === typeof element$jscomp$inline_449.oninput; + var isSupported$jscomp$inline_449 = "oninput" in document; + if (!isSupported$jscomp$inline_449) { + var element$jscomp$inline_450 = document.createElement("div"); + element$jscomp$inline_450.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_449 = + "function" === typeof element$jscomp$inline_450.oninput; } - JSCompiler_inline_result$jscomp$316 = isSupported$jscomp$inline_448; + JSCompiler_inline_result$jscomp$316 = isSupported$jscomp$inline_449; } else JSCompiler_inline_result$jscomp$316 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$316 && @@ -2625,19 +2625,19 @@ for ( } console.error(error); }, - i$jscomp$inline_489 = 0; - i$jscomp$inline_489 < simpleEventPluginEvents.length; - i$jscomp$inline_489++ + i$jscomp$inline_490 = 0; + i$jscomp$inline_490 < simpleEventPluginEvents.length; + i$jscomp$inline_490++ ) { - var eventName$jscomp$inline_490 = - simpleEventPluginEvents[i$jscomp$inline_489], - domEventName$jscomp$inline_491 = eventName$jscomp$inline_490.toLowerCase(), - capitalizedEvent$jscomp$inline_492 = - eventName$jscomp$inline_490[0].toUpperCase() + - eventName$jscomp$inline_490.slice(1); + var eventName$jscomp$inline_491 = + simpleEventPluginEvents[i$jscomp$inline_490], + domEventName$jscomp$inline_492 = eventName$jscomp$inline_491.toLowerCase(), + capitalizedEvent$jscomp$inline_493 = + eventName$jscomp$inline_491[0].toUpperCase() + + eventName$jscomp$inline_491.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_491, - "on" + capitalizedEvent$jscomp$inline_492 + domEventName$jscomp$inline_492, + "on" + capitalizedEvent$jscomp$inline_493 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -5334,22 +5334,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -5365,7 +5362,7 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -5374,24 +5371,24 @@ function createChildReconciler(shouldTrackSideEffects) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -5400,7 +5397,7 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -5408,7 +5405,7 @@ function createChildReconciler(shouldTrackSideEffects) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -5540,13 +5537,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -17128,10 +17130,10 @@ Internals.Events = [ restoreStateIfNeeded, unstable_batchedUpdates ]; -var devToolsConfig$jscomp$inline_1808 = { +var devToolsConfig$jscomp$inline_1817 = { findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-ff9e8711", + version: "19.0.0-www-modern-5443f789", rendererPackageName: "react-dom" }; (function (internals) { @@ -17149,10 +17151,10 @@ var devToolsConfig$jscomp$inline_1808 = { } catch (err) {} return hook.checkDCE ? !0 : !1; })({ - bundleType: devToolsConfig$jscomp$inline_1808.bundleType, - version: devToolsConfig$jscomp$inline_1808.version, - rendererPackageName: devToolsConfig$jscomp$inline_1808.rendererPackageName, - rendererConfig: devToolsConfig$jscomp$inline_1808.rendererConfig, + bundleType: devToolsConfig$jscomp$inline_1817.bundleType, + version: devToolsConfig$jscomp$inline_1817.version, + rendererPackageName: devToolsConfig$jscomp$inline_1817.rendererPackageName, + rendererConfig: devToolsConfig$jscomp$inline_1817.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, @@ -17168,14 +17170,14 @@ var devToolsConfig$jscomp$inline_1808 = { return null === fiber ? null : fiber.stateNode; }, findFiberByHostInstance: - devToolsConfig$jscomp$inline_1808.findFiberByHostInstance || + devToolsConfig$jscomp$inline_1817.findFiberByHostInstance || emptyFindFiberByHostInstance, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-ff9e8711" + reconcilerVersion: "19.0.0-www-modern-5443f789" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); if ("function" !== typeof ReactFiberErrorDialogWWW.showErrorDialog) @@ -17470,7 +17472,7 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-ff9e8711"; +exports.version = "19.0.0-www-modern-5443f789"; "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 60540a901b686..eca1d6b618afd 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-cb8d6fd0'; +var ReactVersion = '19.0.0-www-classic-f7b4e4a9'; // This refers to a WWW module. var warningWWW = require('warning'); @@ -8173,7 +8173,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw SuspenseException; } } -} // This is used to track the actual thenable that suspended so it can be +} // passed to the rest of the Suspense implementation — which, for historical // reasons, expects to receive a thenable. @@ -10524,7 +10524,8 @@ function validateIterable(task, iterable, childIndex, iterator, iteratorFn) { // We do support generators if they were created by a GeneratorFunction component // as its direct child since we can recreate those by rerendering the component // as needed. - var isGeneratorComponent = task.componentStack !== null && task.componentStack.tag === 1 && // FunctionComponent + var isGeneratorComponent = childIndex === -1 && // Only the root child is valid + task.componentStack !== null && task.componentStack.tag === 1 && // FunctionComponent // $FlowFixMe[method-unbinding] Object.prototype.toString.call(task.componentStack.type) === '[object GeneratorFunction]' && // $FlowFixMe[method-unbinding] Object.prototype.toString.call(iterator) === '[object Generator]'; @@ -10659,7 +10660,7 @@ function renderNodeDestructive(request, task, node, childIndex) { // generation algorithm. - var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that. + var step = iterator.next(); if (!step.done) { var children = []; @@ -10670,12 +10671,11 @@ function renderNodeDestructive(request, task, node, childIndex) { } while (!step.done); renderChildrenArray(request, task, children, childIndex); - return; } return; } - } // Usables are a valid React node type. When React encounters a Usable in + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -11418,7 +11418,13 @@ function retryRenderTask(request, task, segment) { // Something suspended again, let's pick it back up later. var ping = task.ping; x.then(ping, ping); - task.thenableState = getThenableStateAfterSuspending(); + task.thenableState = getThenableStateAfterSuspending(); // We pop one task off the stack because the node that suspended will be tried again, + // which will add it back onto the stack. + + if (task.componentStack !== null) { + task.componentStack = task.componentStack.parent; + } + return; } } @@ -11479,7 +11485,13 @@ function retryReplayTask(request, task) { // Something suspended again, let's pick it back up later. var ping = task.ping; x.then(ping, ping); - task.thenableState = getThenableStateAfterSuspending(); + task.thenableState = getThenableStateAfterSuspending(); // We pop one task off the stack because the node that suspended will be tried again, + // which will add it back onto the stack. + + if (task.componentStack !== null) { + task.componentStack = task.componentStack.parent; + } + return; } } diff --git a/compiled/facebook-www/ReactDOMServer-dev.modern.js b/compiled/facebook-www/ReactDOMServer-dev.modern.js index 1c005d13172fd..c6018bd3fc27f 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-5c36a344'; +var ReactVersion = '19.0.0-www-modern-b5a582ea'; // This refers to a WWW module. var warningWWW = require('warning'); @@ -8114,7 +8114,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw SuspenseException; } } -} // This is used to track the actual thenable that suspended so it can be +} // passed to the rest of the Suspense implementation — which, for historical // reasons, expects to receive a thenable. @@ -10454,7 +10454,8 @@ function validateIterable(task, iterable, childIndex, iterator, iteratorFn) { // We do support generators if they were created by a GeneratorFunction component // as its direct child since we can recreate those by rerendering the component // as needed. - var isGeneratorComponent = task.componentStack !== null && task.componentStack.tag === 1 && // FunctionComponent + var isGeneratorComponent = childIndex === -1 && // Only the root child is valid + task.componentStack !== null && task.componentStack.tag === 1 && // FunctionComponent // $FlowFixMe[method-unbinding] Object.prototype.toString.call(task.componentStack.type) === '[object GeneratorFunction]' && // $FlowFixMe[method-unbinding] Object.prototype.toString.call(iterator) === '[object Generator]'; @@ -10589,7 +10590,7 @@ function renderNodeDestructive(request, task, node, childIndex) { // generation algorithm. - var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that. + var step = iterator.next(); if (!step.done) { var children = []; @@ -10600,12 +10601,11 @@ function renderNodeDestructive(request, task, node, childIndex) { } while (!step.done); renderChildrenArray(request, task, children, childIndex); - return; } return; } - } // Usables are a valid React node type. When React encounters a Usable in + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -11348,7 +11348,13 @@ function retryRenderTask(request, task, segment) { // Something suspended again, let's pick it back up later. var ping = task.ping; x.then(ping, ping); - task.thenableState = getThenableStateAfterSuspending(); + task.thenableState = getThenableStateAfterSuspending(); // We pop one task off the stack because the node that suspended will be tried again, + // which will add it back onto the stack. + + if (task.componentStack !== null) { + task.componentStack = task.componentStack.parent; + } + return; } } @@ -11409,7 +11415,13 @@ function retryReplayTask(request, task) { // Something suspended again, let's pick it back up later. var ping = task.ping; x.then(ping, ping); - task.thenableState = getThenableStateAfterSuspending(); + task.thenableState = getThenableStateAfterSuspending(); // We pop one task off the stack because the node that suspended will be tried again, + // which will add it back onto the stack. + + if (task.componentStack !== null) { + task.componentStack = task.componentStack.parent; + } + return; } } diff --git a/compiled/facebook-www/ReactDOMServer-prod.classic.js b/compiled/facebook-www/ReactDOMServer-prod.classic.js index 2f964be5aaaab..c9b6745d93532 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.classic.js +++ b/compiled/facebook-www/ReactDOMServer-prod.classic.js @@ -5014,6 +5014,8 @@ function performWork(request$jscomp$2) { var ping = task.ping; x.then(ping, ping); task.thenableState = getThenableStateAfterSuspending(); + null !== task.componentStack && + (task.componentStack = task.componentStack.parent); } else { task.replay.pendingTasks--; task.abortSet.delete(task); @@ -5083,6 +5085,8 @@ function performWork(request$jscomp$2) { var ping$jscomp$0 = task.ping; x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0); task.thenableState = getThenableStateAfterSuspending(); + null !== task.componentStack && + (task.componentStack = task.componentStack.parent); } else { var errorInfo$jscomp$0 = getThrownInfo( request, @@ -5684,4 +5688,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-11a178db"; +exports.version = "19.0.0-www-classic-51a6eefd"; diff --git a/compiled/facebook-www/ReactDOMServer-prod.modern.js b/compiled/facebook-www/ReactDOMServer-prod.modern.js index 041d4f2bd0ee3..0afa29395d2cd 100644 --- a/compiled/facebook-www/ReactDOMServer-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServer-prod.modern.js @@ -4992,6 +4992,8 @@ function performWork(request$jscomp$2) { var ping = task.ping; x.then(ping, ping); task.thenableState = getThenableStateAfterSuspending(); + null !== task.componentStack && + (task.componentStack = task.componentStack.parent); } else { task.replay.pendingTasks--; task.abortSet.delete(task); @@ -5061,6 +5063,8 @@ function performWork(request$jscomp$2) { var ping$jscomp$0 = task.ping; x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0); task.thenableState = getThenableStateAfterSuspending(); + null !== task.componentStack && + (task.componentStack = task.componentStack.parent); } else { var errorInfo$jscomp$0 = getThrownInfo( request, @@ -5662,4 +5666,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-ef2f7d1b"; +exports.version = "19.0.0-www-modern-521cf579"; diff --git a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js index aee4e77a1c50f..c82a541bfe987 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-dev.modern.js @@ -8029,7 +8029,7 @@ function trackUsedThenable(thenableState, thenable, index) { throw SuspenseException; } } -} // This is used to track the actual thenable that suspended so it can be +} // passed to the rest of the Suspense implementation — which, for historical // reasons, expects to receive a thenable. @@ -10366,7 +10366,8 @@ function validateIterable(task, iterable, childIndex, iterator, iteratorFn) { // We do support generators if they were created by a GeneratorFunction component // as its direct child since we can recreate those by rerendering the component // as needed. - var isGeneratorComponent = task.componentStack !== null && task.componentStack.tag === 1 && // FunctionComponent + var isGeneratorComponent = childIndex === -1 && // Only the root child is valid + task.componentStack !== null && task.componentStack.tag === 1 && // FunctionComponent // $FlowFixMe[method-unbinding] Object.prototype.toString.call(task.componentStack.type) === '[object GeneratorFunction]' && // $FlowFixMe[method-unbinding] Object.prototype.toString.call(iterator) === '[object Generator]'; @@ -10501,7 +10502,7 @@ function renderNodeDestructive(request, task, node, childIndex) { // generation algorithm. - var step = iterator.next(); // If there are not entries, we need to push an empty so we start by checking that. + var step = iterator.next(); if (!step.done) { var children = []; @@ -10512,12 +10513,11 @@ function renderNodeDestructive(request, task, node, childIndex) { } while (!step.done); renderChildrenArray(request, task, children, childIndex); - return; } return; } - } // Usables are a valid React node type. When React encounters a Usable in + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -11260,7 +11260,13 @@ function retryRenderTask(request, task, segment) { // Something suspended again, let's pick it back up later. var ping = task.ping; x.then(ping, ping); - task.thenableState = getThenableStateAfterSuspending(); + task.thenableState = getThenableStateAfterSuspending(); // We pop one task off the stack because the node that suspended will be tried again, + // which will add it back onto the stack. + + if (task.componentStack !== null) { + task.componentStack = task.componentStack.parent; + } + return; } } @@ -11321,7 +11327,13 @@ function retryReplayTask(request, task) { // Something suspended again, let's pick it back up later. var ping = task.ping; x.then(ping, ping); - task.thenableState = getThenableStateAfterSuspending(); + task.thenableState = getThenableStateAfterSuspending(); // We pop one task off the stack because the node that suspended will be tried again, + // which will add it back onto the stack. + + if (task.componentStack !== null) { + task.componentStack = task.componentStack.parent; + } + return; } } diff --git a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js index e094d8aaa66b8..2967cb179498a 100644 --- a/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js +++ b/compiled/facebook-www/ReactDOMServerStreaming-prod.modern.js @@ -5323,6 +5323,9 @@ exports.renderNextChunk = function (stream) { var ping = task$jscomp$0.ping; x.then(ping, ping); task$jscomp$0.thenableState = getThenableStateAfterSuspending(); + null !== task$jscomp$0.componentStack && + (task$jscomp$0.componentStack = + task$jscomp$0.componentStack.parent); } else { task$jscomp$0.replay.pendingTasks--; task$jscomp$0.abortSet.delete(task$jscomp$0); @@ -5391,6 +5394,9 @@ exports.renderNextChunk = function (stream) { var ping$jscomp$0 = task$jscomp$0.ping; x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0); task$jscomp$0.thenableState = getThenableStateAfterSuspending(); + null !== task$jscomp$0.componentStack && + (task$jscomp$0.componentStack = + task$jscomp$0.componentStack.parent); } else { var errorInfo$jscomp$0 = getThrownInfo( request, diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 99ff32cadf702..a2790289ae851 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -126,6 +126,7 @@ var disableIEWorkarounds = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var enableSuspenseCallback = true; var disableLegacyMode = false; @@ -10327,7 +10328,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -10412,7 +10413,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -10480,7 +10481,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -10728,7 +10729,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -10767,6 +10768,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -11087,8 +11092,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -11598,7 +11603,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -31381,7 +31387,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-ed31fbb8'; +var ReactVersion = '19.0.0-www-classic-416e8d17'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 2b24b5d000e66..f5c3297443646 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -103,6 +103,7 @@ var disableIEWorkarounds = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var enableSuspenseCallback = true; var disableLegacyMode = true; @@ -15737,7 +15738,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -15822,7 +15823,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -15890,7 +15891,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -16138,7 +16139,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -16177,6 +16178,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -16497,8 +16502,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -17734,7 +17739,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -39420,7 +39426,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-d55cff3d'; +var ReactVersion = '19.0.0-www-modern-3522110c'; function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. implementation) { diff --git a/compiled/facebook-www/ReactDOMTesting-prod.classic.js b/compiled/facebook-www/ReactDOMTesting-prod.classic.js index cbfbccf27c57b..52480d81f68a7 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.classic.js @@ -2983,22 +2983,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -3014,7 +3011,7 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -3023,24 +3020,24 @@ function createChildReconciler(shouldTrackSideEffects) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -3049,7 +3046,7 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -3057,7 +3054,7 @@ function createChildReconciler(shouldTrackSideEffects) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -3189,13 +3186,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -12848,7 +12850,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-0b6adad3" + reconcilerVersion: "19.0.0-www-classic-b7cce8fb" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -13395,19 +13397,19 @@ function getTargetInstForChangeEvent(domEventName, targetInst) { } var isInputEventSupported = !1; if (canUseDOM) { - var JSCompiler_inline_result$jscomp$353; + var JSCompiler_inline_result$jscomp$354; if (canUseDOM) { - var isSupported$jscomp$inline_1524 = "oninput" in document; - if (!isSupported$jscomp$inline_1524) { - var element$jscomp$inline_1525 = document.createElement("div"); - element$jscomp$inline_1525.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_1524 = - "function" === typeof element$jscomp$inline_1525.oninput; + var isSupported$jscomp$inline_1533 = "oninput" in document; + if (!isSupported$jscomp$inline_1533) { + var element$jscomp$inline_1534 = document.createElement("div"); + element$jscomp$inline_1534.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_1533 = + "function" === typeof element$jscomp$inline_1534.oninput; } - JSCompiler_inline_result$jscomp$353 = isSupported$jscomp$inline_1524; - } else JSCompiler_inline_result$jscomp$353 = !1; + JSCompiler_inline_result$jscomp$354 = isSupported$jscomp$inline_1533; + } else JSCompiler_inline_result$jscomp$354 = !1; isInputEventSupported = - JSCompiler_inline_result$jscomp$353 && + JSCompiler_inline_result$jscomp$354 && (!document.documentMode || 9 < document.documentMode); } function stopWatchingForValueChange() { @@ -13785,20 +13787,20 @@ function extractEvents$1( } } for ( - var i$jscomp$inline_1565 = 0; - i$jscomp$inline_1565 < simpleEventPluginEvents.length; - i$jscomp$inline_1565++ + var i$jscomp$inline_1574 = 0; + i$jscomp$inline_1574 < simpleEventPluginEvents.length; + i$jscomp$inline_1574++ ) { - var eventName$jscomp$inline_1566 = - simpleEventPluginEvents[i$jscomp$inline_1565], - domEventName$jscomp$inline_1567 = - eventName$jscomp$inline_1566.toLowerCase(), - capitalizedEvent$jscomp$inline_1568 = - eventName$jscomp$inline_1566[0].toUpperCase() + - eventName$jscomp$inline_1566.slice(1); + var eventName$jscomp$inline_1575 = + simpleEventPluginEvents[i$jscomp$inline_1574], + domEventName$jscomp$inline_1576 = + eventName$jscomp$inline_1575.toLowerCase(), + capitalizedEvent$jscomp$inline_1577 = + eventName$jscomp$inline_1575[0].toUpperCase() + + eventName$jscomp$inline_1575.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_1567, - "on" + capitalizedEvent$jscomp$inline_1568 + domEventName$jscomp$inline_1576, + "on" + capitalizedEvent$jscomp$inline_1577 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -17411,7 +17413,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-0b6adad3", + version: "19.0.0-www-classic-b7cce8fb", rendererPackageName: "react-dom" }); var ReactFiberErrorDialogWWW = require("ReactFiberErrorDialog"); @@ -17544,7 +17546,7 @@ assign(Internals, { injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-classic-0b6adad3", + version: "19.0.0-www-classic-b7cce8fb", rendererPackageName: "react-dom" }); exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = @@ -18011,4 +18013,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-classic-0b6adad3"; +exports.version = "19.0.0-www-classic-b7cce8fb"; diff --git a/compiled/facebook-www/ReactDOMTesting-prod.modern.js b/compiled/facebook-www/ReactDOMTesting-prod.modern.js index 70eb4bddd06a2..12285b8d4265e 100644 --- a/compiled/facebook-www/ReactDOMTesting-prod.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-prod.modern.js @@ -2191,14 +2191,14 @@ var isInputEventSupported = !1; if (canUseDOM) { var JSCompiler_inline_result$jscomp$296; if (canUseDOM) { - var isSupported$jscomp$inline_430 = "oninput" in document; - if (!isSupported$jscomp$inline_430) { - var element$jscomp$inline_431 = document.createElement("div"); - element$jscomp$inline_431.setAttribute("oninput", "return;"); - isSupported$jscomp$inline_430 = - "function" === typeof element$jscomp$inline_431.oninput; + var isSupported$jscomp$inline_431 = "oninput" in document; + if (!isSupported$jscomp$inline_431) { + var element$jscomp$inline_432 = document.createElement("div"); + element$jscomp$inline_432.setAttribute("oninput", "return;"); + isSupported$jscomp$inline_431 = + "function" === typeof element$jscomp$inline_432.oninput; } - JSCompiler_inline_result$jscomp$296 = isSupported$jscomp$inline_430; + JSCompiler_inline_result$jscomp$296 = isSupported$jscomp$inline_431; } else JSCompiler_inline_result$jscomp$296 = !1; isInputEventSupported = JSCompiler_inline_result$jscomp$296 && @@ -2634,19 +2634,19 @@ for ( } console.error(error); }, - i$jscomp$inline_471 = 0; - i$jscomp$inline_471 < simpleEventPluginEvents.length; - i$jscomp$inline_471++ + i$jscomp$inline_472 = 0; + i$jscomp$inline_472 < simpleEventPluginEvents.length; + i$jscomp$inline_472++ ) { - var eventName$jscomp$inline_472 = - simpleEventPluginEvents[i$jscomp$inline_471], - domEventName$jscomp$inline_473 = eventName$jscomp$inline_472.toLowerCase(), - capitalizedEvent$jscomp$inline_474 = - eventName$jscomp$inline_472[0].toUpperCase() + - eventName$jscomp$inline_472.slice(1); + var eventName$jscomp$inline_473 = + simpleEventPluginEvents[i$jscomp$inline_472], + domEventName$jscomp$inline_474 = eventName$jscomp$inline_473.toLowerCase(), + capitalizedEvent$jscomp$inline_475 = + eventName$jscomp$inline_473[0].toUpperCase() + + eventName$jscomp$inline_473.slice(1); registerSimpleEvent( - domEventName$jscomp$inline_473, - "on" + capitalizedEvent$jscomp$inline_474 + domEventName$jscomp$inline_474, + "on" + capitalizedEvent$jscomp$inline_475 ); } registerSimpleEvent(ANIMATION_END, "onAnimationEnd"); @@ -5343,22 +5343,19 @@ function createChildReconciler(shouldTrackSideEffects) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -5374,7 +5371,7 @@ function createChildReconciler(shouldTrackSideEffects) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -5383,24 +5380,24 @@ function createChildReconciler(shouldTrackSideEffects) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)), null !== step && @@ -5409,7 +5406,7 @@ function createChildReconciler(shouldTrackSideEffects) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -5417,7 +5414,7 @@ function createChildReconciler(shouldTrackSideEffects) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -5549,13 +5546,18 @@ function createChildReconciler(shouldTrackSideEffects) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -16134,7 +16136,7 @@ function injectIntoDevTools(devToolsConfig) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-693c0137" + reconcilerVersion: "19.0.0-www-modern-5714cea2" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; @@ -16832,7 +16834,7 @@ Internals.Events = [ injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-693c0137", + version: "19.0.0-www-modern-5714cea2", rendererPackageName: "react-dom" }); if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) @@ -16840,7 +16842,7 @@ if ("function" !== typeof require("ReactFiberErrorDialog").showErrorDialog) injectIntoDevTools({ findFiberByHostInstance: getClosestInstanceFromNode, bundleType: 0, - version: "19.0.0-www-modern-693c0137", + version: "19.0.0-www-modern-5714cea2", rendererPackageName: "react-dom" }); exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = @@ -17254,4 +17256,4 @@ exports.useFormState = function (action, initialState, permalink) { exports.useFormStatus = function () { return ReactSharedInternals.H.useHostTransitionStatus(); }; -exports.version = "19.0.0-www-modern-693c0137"; +exports.version = "19.0.0-www-modern-5714cea2"; diff --git a/compiled/facebook-www/ReactReconciler-dev.classic.js b/compiled/facebook-www/ReactReconciler-dev.classic.js index 0a266b702550f..488e9f5d61668 100644 --- a/compiled/facebook-www/ReactReconciler-dev.classic.js +++ b/compiled/facebook-www/ReactReconciler-dev.classic.js @@ -125,6 +125,7 @@ var enableProfilerNestedUpdatePhase = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var enableSuspenseCallback = true; var passChildrenWhenCloningPersistedNodes = false; var disableLegacyMode = false; @@ -7130,7 +7131,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -7215,7 +7216,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -7283,7 +7284,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -7531,7 +7532,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -7570,6 +7571,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -7890,8 +7895,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -8401,7 +8406,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -28644,7 +28650,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-7d7660cc'; +var ReactVersion = '19.0.0-www-classic-eaa29620'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/ReactReconciler-dev.modern.js b/compiled/facebook-www/ReactReconciler-dev.modern.js index 1790f5daa128b..be9e388e959e5 100644 --- a/compiled/facebook-www/ReactReconciler-dev.modern.js +++ b/compiled/facebook-www/ReactReconciler-dev.modern.js @@ -125,6 +125,7 @@ var enableProfilerNestedUpdatePhase = true; var enableAsyncActions = true; var enableSchedulingProfiler = dynamicFeatureFlags.enableSchedulingProfiler; +var enableAsyncIterableChildren = false; var enableSuspenseCallback = true; var passChildrenWhenCloningPersistedNodes = false; var disableLegacyMode = true; @@ -6921,7 +6922,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -7006,7 +7007,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -7074,7 +7075,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -7322,7 +7323,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -7361,6 +7362,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -7681,8 +7686,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -8192,7 +8197,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -27910,7 +27916,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-53ab3601'; +var ReactVersion = '19.0.0-www-modern-dd1c6162'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/ReactReconciler-prod.classic.js b/compiled/facebook-www/ReactReconciler-prod.classic.js index 684d3b443e2a4..9f54d51b16d18 100644 --- a/compiled/facebook-www/ReactReconciler-prod.classic.js +++ b/compiled/facebook-www/ReactReconciler-prod.classic.js @@ -2049,22 +2049,19 @@ module.exports = function ($$$config) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -2080,7 +2077,7 @@ module.exports = function ($$$config) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -2089,10 +2086,10 @@ module.exports = function ($$$config) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild( @@ -2101,16 +2098,16 @@ module.exports = function ($$$config) { newIdx )), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap( oldFiber, @@ -2125,7 +2122,7 @@ module.exports = function ($$$config) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -2133,7 +2130,7 @@ module.exports = function ($$$config) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -2265,13 +2262,18 @@ module.exports = function ($$$config) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -12635,7 +12637,7 @@ module.exports = function ($$$config) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-classic-fca253b5" + reconcilerVersion: "19.0.0-www-classic-a5d26b69" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; diff --git a/compiled/facebook-www/ReactReconciler-prod.modern.js b/compiled/facebook-www/ReactReconciler-prod.modern.js index 5500418c9368e..dae4bb59e9713 100644 --- a/compiled/facebook-www/ReactReconciler-prod.modern.js +++ b/compiled/facebook-www/ReactReconciler-prod.modern.js @@ -1909,22 +1909,19 @@ module.exports = function ($$$config) { function reconcileChildrenIterator( returnFiber, currentFirstChild, - newChildrenIterable, + newChildren, lanes ) { - var iteratorFn = getIteratorFn(newChildrenIterable); - if ("function" !== typeof iteratorFn) - throw Error(formatProdErrorMessage(150)); - newChildrenIterable = iteratorFn.call(newChildrenIterable); - if (null == newChildrenIterable) throw Error(formatProdErrorMessage(151)); + if (null == newChildren) throw Error(formatProdErrorMessage(151)); for ( - var previousNewFiber = (iteratorFn = null), + var resultingFirstChild = null, + previousNewFiber = null, oldFiber = currentFirstChild, newIdx = (currentFirstChild = 0), nextOldFiber = null, - step = newChildrenIterable.next(); + step = newChildren.next(); null !== oldFiber && !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) { oldFiber.index > newIdx ? ((nextOldFiber = oldFiber), (oldFiber = null)) @@ -1940,7 +1937,7 @@ module.exports = function ($$$config) { deleteChild(returnFiber, oldFiber); currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx); null === previousNewFiber - ? (iteratorFn = newFiber) + ? (resultingFirstChild = newFiber) : (previousNewFiber.sibling = newFiber); previousNewFiber = newFiber; oldFiber = nextOldFiber; @@ -1949,10 +1946,10 @@ module.exports = function ($$$config) { return ( deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), - iteratorFn + resultingFirstChild ); if (null === oldFiber) { - for (; !step.done; newIdx++, step = newChildrenIterable.next(), null) + for (; !step.done; newIdx++, step = newChildren.next(), null) (step = createChild(returnFiber, step.value, lanes)), null !== step && ((currentFirstChild = placeChild( @@ -1961,16 +1958,16 @@ module.exports = function ($$$config) { newIdx )), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } for ( oldFiber = mapRemainingChildren(oldFiber); !step.done; - newIdx++, step = newChildrenIterable.next(), null + newIdx++, step = newChildren.next(), null ) (step = updateFromMap( oldFiber, @@ -1985,7 +1982,7 @@ module.exports = function ($$$config) { oldFiber.delete(null === step.key ? newIdx : step.key), (currentFirstChild = placeChild(step, currentFirstChild, newIdx)), null === previousNewFiber - ? (iteratorFn = step) + ? (resultingFirstChild = step) : (previousNewFiber.sibling = step), (previousNewFiber = step)); shouldTrackSideEffects && @@ -1993,7 +1990,7 @@ module.exports = function ($$$config) { return deleteChild(returnFiber, child); }); isHydrating && pushTreeFork(returnFiber, newIdx); - return iteratorFn; + return resultingFirstChild; } function reconcileChildFibersImpl( returnFiber, @@ -2125,13 +2122,18 @@ module.exports = function ($$$config) { newChild, lanes ); - if (getIteratorFn(newChild)) + if (getIteratorFn(newChild)) { + child = getIteratorFn(newChild); + if ("function" !== typeof child) + throw Error(formatProdErrorMessage(150)); + newChild = child.call(newChild); return reconcileChildrenIterator( returnFiber, currentFirstChild, newChild, lanes ); + } if ("function" === typeof newChild.then) return reconcileChildFibersImpl( returnFiber, @@ -12152,7 +12154,7 @@ module.exports = function ($$$config) { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "19.0.0-www-modern-0b51321e" + reconcilerVersion: "19.0.0-www-modern-dca36832" }; if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) devToolsConfig = !1; diff --git a/compiled/facebook-www/ReactTestRenderer-dev.classic.js b/compiled/facebook-www/ReactTestRenderer-dev.classic.js index 1b1f6317e1aef..02b5a91050f56 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.classic.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.classic.js @@ -126,6 +126,7 @@ var enableSchedulingProfiler = false; var enableProfilerTimer = true; var enableProfilerCommitHooks = true; var enableProfilerNestedUpdatePhase = true; +var enableAsyncIterableChildren = false; var syncLaneExpirationMs = 250; var transitionLaneExpirationMs = 5000; var enableLazyContextPropagation = false; @@ -5756,7 +5757,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -5841,7 +5842,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -5909,7 +5910,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -6142,7 +6143,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -6181,6 +6182,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -6486,8 +6491,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -6995,7 +7000,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -23106,7 +23112,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-classic-05ee09c7'; +var ReactVersion = '19.0.0-www-classic-7c838373'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/ReactTestRenderer-dev.modern.js b/compiled/facebook-www/ReactTestRenderer-dev.modern.js index adb178f9acd16..f57a2a99393fc 100644 --- a/compiled/facebook-www/ReactTestRenderer-dev.modern.js +++ b/compiled/facebook-www/ReactTestRenderer-dev.modern.js @@ -126,6 +126,7 @@ var enableSchedulingProfiler = false; var enableProfilerTimer = true; var enableProfilerCommitHooks = true; var enableProfilerNestedUpdatePhase = true; +var enableAsyncIterableChildren = false; var syncLaneExpirationMs = 250; var transitionLaneExpirationMs = 5000; var enableLazyContextPropagation = false; @@ -5756,7 +5757,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); _created3.return = returnFiber; @@ -5841,7 +5842,7 @@ function createChildReconciler(shouldTrackSideEffects) { } } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { if (key !== null) { return null; } @@ -5909,7 +5910,7 @@ function createChildReconciler(shouldTrackSideEffects) { return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); } - if (isArray(newChild) || getIteratorFn(newChild)) { + if (isArray(newChild) || getIteratorFn(newChild) || enableAsyncIterableChildren ) { var _matchedFiber3 = existingChildren.get(newIdx) || null; return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null, mergeDebugInfo(debugInfo, newChild._debugInfo)); @@ -6142,7 +6143,7 @@ function createChildReconciler(shouldTrackSideEffects) { return resultingFirstChild; } - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { + function reconcileChildrenIteratable(returnFiber, currentFirstChild, newChildrenIterable, lanes, debugInfo) { // This is the same implementation as reconcileChildrenArray(), // but using the iterator instead. var iteratorFn = getIteratorFn(newChildrenIterable); @@ -6181,6 +6182,10 @@ function createChildReconciler(shouldTrackSideEffects) { } } + return reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo); + } + + function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes, debugInfo) { if (newChildren == null) { throw new Error('An iterable object provided no iterator.'); } @@ -6486,8 +6491,8 @@ function createChildReconciler(shouldTrackSideEffects) { } if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); - } // Usables are a valid React node type. When React encounters a Usable in + return reconcileChildrenIteratable(returnFiber, currentFirstChild, newChild, lanes, mergeDebugInfo(debugInfo, newChild._debugInfo)); + } // a child position, it unwraps it using the same algorithm as `use`. For // example, for promises, React will throw an exception to unwind the // stack, then replay the component once the promise resolves. @@ -6995,7 +7000,8 @@ function warnIfAsyncClientComponent(Component) { // for transpiled async functions. Neither mechanism is completely // bulletproof but together they cover the most common cases. var isAsyncFunction = // $FlowIgnore[method-unbinding] - Object.prototype.toString.call(Component) === '[object AsyncFunction]'; + Object.prototype.toString.call(Component) === '[object AsyncFunction]' || // $FlowIgnore[method-unbinding] + Object.prototype.toString.call(Component) === '[object AsyncGeneratorFunction]'; if (isAsyncFunction) { // Encountered an async Client Component. This is not yet supported. @@ -23106,7 +23112,7 @@ identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, transition return root; } -var ReactVersion = '19.0.0-www-modern-05ee09c7'; +var ReactVersion = '19.0.0-www-modern-7c838373'; /* * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol diff --git a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js index 6053daebd39d4..a691672af5cde 100644 --- a/compiled/facebook-www/__test_utils__/ReactAllWarnings.js +++ b/compiled/facebook-www/__test_utils__/ReactAllWarnings.js @@ -316,6 +316,7 @@ export default [ "Use the `defaultValue` or `value` props instead of setting children on