|
883 | 883 | nameIdx: 0 |
884 | 884 | }; |
885 | 885 | } |
886 | | - function getSuspenseFallbackFormatContext(parentContext) { |
| 886 | + function getSuspenseFallbackFormatContext(resumableState, parentContext) { |
| 887 | + parentContext.tagScope & 32 && |
| 888 | + (resumableState.instructions |= NeedUpgradeToViewTransitions); |
887 | 889 | return createFormatContext( |
888 | 890 | parentContext.insertionMode, |
889 | 891 | parentContext.selectedValue, |
890 | 892 | parentContext.tagScope | 12, |
891 | 893 | getSuspenseViewTransition(parentContext.viewTransition) |
892 | 894 | ); |
893 | 895 | } |
894 | | - function getSuspenseContentFormatContext(parentContext) { |
| 896 | + function getSuspenseContentFormatContext(resumableState, parentContext) { |
895 | 897 | return createFormatContext( |
896 | 898 | parentContext.insertionMode, |
897 | 899 | parentContext.selectedValue, |
|
5691 | 5693 | var _prevKeyPath = task.keyPath, |
5692 | 5694 | _prevContext = task.formatContext; |
5693 | 5695 | task.keyPath = keyPath; |
5694 | | - task.formatContext = |
5695 | | - getSuspenseContentFormatContext(_prevContext); |
| 5696 | + task.formatContext = getSuspenseContentFormatContext( |
| 5697 | + request.resumableState, |
| 5698 | + _prevContext |
| 5699 | + ); |
5696 | 5700 | var _content = props.children; |
5697 | 5701 | try { |
5698 | 5702 | renderNode(request, task, _content, -1); |
|
5765 | 5769 | task.blockedSegment = boundarySegment; |
5766 | 5770 | task.blockedPreamble = newBoundary.fallbackPreamble; |
5767 | 5771 | task.keyPath = fallbackKeyPath; |
5768 | | - task.formatContext = |
5769 | | - getSuspenseFallbackFormatContext(prevContext$jscomp$1); |
| 5772 | + task.formatContext = getSuspenseFallbackFormatContext( |
| 5773 | + request.resumableState, |
| 5774 | + prevContext$jscomp$1 |
| 5775 | + ); |
5770 | 5776 | boundarySegment.status = 6; |
5771 | 5777 | try { |
5772 | 5778 | renderNode(request, task, fallback, -1), |
|
5799 | 5805 | newBoundary.contentState, |
5800 | 5806 | task.abortSet, |
5801 | 5807 | keyPath, |
5802 | | - getSuspenseContentFormatContext(task.formatContext), |
| 5808 | + getSuspenseContentFormatContext( |
| 5809 | + request.resumableState, |
| 5810 | + task.formatContext |
| 5811 | + ), |
5803 | 5812 | task.context, |
5804 | 5813 | task.treeContext, |
5805 | 5814 | task.componentStack, |
|
5814 | 5823 | task.hoistableState = newBoundary.contentState; |
5815 | 5824 | task.blockedSegment = contentRootSegment; |
5816 | 5825 | task.keyPath = keyPath; |
5817 | | - task.formatContext = |
5818 | | - getSuspenseContentFormatContext(prevContext$jscomp$1); |
| 5826 | + task.formatContext = getSuspenseContentFormatContext( |
| 5827 | + request.resumableState, |
| 5828 | + prevContext$jscomp$1 |
| 5829 | + ); |
5819 | 5830 | contentRootSegment.status = 6; |
5820 | 5831 | try { |
5821 | 5832 | if ( |
|
5892 | 5903 | newBoundary.fallbackState, |
5893 | 5904 | fallbackAbortSet, |
5894 | 5905 | [keyPath[0], "Suspense Fallback", keyPath[2]], |
5895 | | - getSuspenseFallbackFormatContext(task.formatContext), |
| 5906 | + getSuspenseFallbackFormatContext( |
| 5907 | + request.resumableState, |
| 5908 | + task.formatContext |
| 5909 | + ), |
5896 | 5910 | task.context, |
5897 | 5911 | task.treeContext, |
5898 | 5912 | task.componentStack, |
|
6149 | 6163 | task.blockedBoundary = props; |
6150 | 6164 | task.hoistableState = props.contentState; |
6151 | 6165 | task.keyPath = keyPath; |
6152 | | - task.formatContext = getSuspenseContentFormatContext(prevContext); |
| 6166 | + task.formatContext = getSuspenseContentFormatContext( |
| 6167 | + request.resumableState, |
| 6168 | + prevContext |
| 6169 | + ); |
6153 | 6170 | task.replay = { nodes: ref, slots: name, pendingTasks: 1 }; |
6154 | 6171 | try { |
6155 | 6172 | renderNode(request, task, content, -1); |
|
6205 | 6222 | props.fallbackState, |
6206 | 6223 | fallbackAbortSet, |
6207 | 6224 | [keyPath[0], "Suspense Fallback", keyPath[2]], |
6208 | | - getSuspenseFallbackFormatContext(task.formatContext), |
| 6225 | + getSuspenseFallbackFormatContext( |
| 6226 | + request.resumableState, |
| 6227 | + task.formatContext |
| 6228 | + ), |
6209 | 6229 | task.context, |
6210 | 6230 | task.treeContext, |
6211 | 6231 | task.componentStack, |
|
7209 | 7229 | } else boundary.completedSegments.push(segment); |
7210 | 7230 | } |
7211 | 7231 | function finishedTask(request, boundary, segment) { |
| 7232 | + request.allPendingTasks--; |
7212 | 7233 | if (null === boundary) { |
7213 | 7234 | if (null !== segment && segment.parentFlushed) { |
7214 | 7235 | if (null !== request.completedRootSegment) |
|
7248 | 7269 | 1 === boundary.completedSegments.length && |
7249 | 7270 | boundary.parentFlushed && |
7250 | 7271 | request.partialBoundaries.push(boundary))); |
7251 | | - request.allPendingTasks--; |
7252 | 7272 | 0 === request.allPendingTasks && completeAll(request); |
7253 | 7273 | } |
7254 | 7274 | function performWork(request$jscomp$1) { |
|
7793 | 7813 | request = request.renderState; |
7794 | 7814 | i = boundary.rootSegmentID; |
7795 | 7815 | boundary = boundary.contentState; |
7796 | | - var requiresStyleInsertion = request.stylesToHoist; |
| 7816 | + var requiresStyleInsertion = request.stylesToHoist, |
| 7817 | + requiresViewTransitions = |
| 7818 | + (completedSegments.instructions & NeedUpgradeToViewTransitions) !== |
| 7819 | + NothingSent; |
7797 | 7820 | request.stylesToHoist = !1; |
7798 | 7821 | var scriptFormat = |
7799 | 7822 | completedSegments.streamingFormat === ScriptStreamingFormat; |
|
7811 | 7834 | ((completedSegments.instructions |= |
7812 | 7835 | SentCompleteBoundaryFunction), |
7813 | 7836 | destination.push(completeBoundaryScriptFunctionOnly)), |
| 7837 | + requiresViewTransitions && |
| 7838 | + (completedSegments.instructions & |
| 7839 | + SentUpgradeToViewTransitions) === |
| 7840 | + NothingSent && |
| 7841 | + ((completedSegments.instructions |= |
| 7842 | + SentUpgradeToViewTransitions), |
| 7843 | + destination.push( |
| 7844 | + completeBoundaryUpgradeToViewTransitionsInstruction |
| 7845 | + )), |
7814 | 7846 | (completedSegments.instructions & SentStyleInsertionFunction) === |
7815 | 7847 | NothingSent |
7816 | 7848 | ? ((completedSegments.instructions |= |
|
7819 | 7851 | completeBoundaryWithStylesScript1FullPartial |
7820 | 7852 | )) |
7821 | 7853 | : destination.push(completeBoundaryWithStylesScript1Partial)) |
7822 | | - : (completedSegments.instructions & |
7823 | | - SentCompleteBoundaryFunction) === |
7824 | | - NothingSent |
7825 | | - ? ((completedSegments.instructions |= |
| 7854 | + : ((completedSegments.instructions & |
| 7855 | + SentCompleteBoundaryFunction) === |
| 7856 | + NothingSent && |
| 7857 | + ((completedSegments.instructions |= |
7826 | 7858 | SentCompleteBoundaryFunction), |
7827 | | - destination.push(completeBoundaryScript1Full)) |
7828 | | - : destination.push(completeBoundaryScript1Partial)) |
| 7859 | + destination.push(completeBoundaryScriptFunctionOnly)), |
| 7860 | + requiresViewTransitions && |
| 7861 | + (completedSegments.instructions & |
| 7862 | + SentUpgradeToViewTransitions) === |
| 7863 | + NothingSent && |
| 7864 | + ((completedSegments.instructions |= |
| 7865 | + SentUpgradeToViewTransitions), |
| 7866 | + destination.push( |
| 7867 | + completeBoundaryUpgradeToViewTransitionsInstruction |
| 7868 | + )), |
| 7869 | + destination.push(completeBoundaryScript1Partial))) |
7829 | 7870 | : requiresStyleInsertion |
7830 | 7871 | ? destination.push(completeBoundaryWithStylesData1) |
7831 | 7872 | : destination.push(completeBoundaryData1); |
|
9478 | 9519 | SentStyleInsertionFunction = 8, |
9479 | 9520 | SentCompletedShellId = 32, |
9480 | 9521 | SentMarkShellTime = 64, |
| 9522 | + NeedUpgradeToViewTransitions = 128, |
| 9523 | + SentUpgradeToViewTransitions = 256, |
9481 | 9524 | EXISTS = null, |
9482 | 9525 | PRELOAD_NO_CREDS = []; |
9483 | 9526 | Object.freeze(PRELOAD_NO_CREDS); |
|
9572 | 9615 | completeSegmentData2 = '" data-pid="', |
9573 | 9616 | completeSegmentDataEnd = '"></template>', |
9574 | 9617 | completeBoundaryScriptFunctionOnly = |
9575 | | - '$RB=[];$RC=function(d,c){function m(){$RT=performance.now();var f=$RB;$RB=[];for(var e=0;e<f.length;e+=2){var a=f[e],l=f[e+1],g=a.parentNode;if(g){var h=a.previousSibling,k=0;do{if(a&&8===a.nodeType){var b=a.data;if("/$"===b||"/&"===b)if(0===k)break;else k--;else"$"!==b&&"$?"!==b&&"$~"!==b&&"$!"!==b&&"&"!==b||k++}b=a.nextSibling;g.removeChild(a);a=b}while(a);for(;l.firstChild;)g.insertBefore(l.firstChild,a);h.data="$";h._reactRetry&&h._reactRetry()}}}if(c=document.getElementById(c))if(c.parentNode.removeChild(c),d=\ndocument.getElementById(d))d.previousSibling.data="$~",$RB.push(d,c),2===$RB.length&&setTimeout(m,("number"!==typeof $RT?0:$RT)+300-performance.now())};', |
9576 | | - completeBoundaryScript1Full = |
9577 | | - '$RB=[];$RC=function(d,c){function m(){$RT=performance.now();var f=$RB;$RB=[];for(var e=0;e<f.length;e+=2){var a=f[e],l=f[e+1],g=a.parentNode;if(g){var h=a.previousSibling,k=0;do{if(a&&8===a.nodeType){var b=a.data;if("/$"===b||"/&"===b)if(0===k)break;else k--;else"$"!==b&&"$?"!==b&&"$~"!==b&&"$!"!==b&&"&"!==b||k++}b=a.nextSibling;g.removeChild(a);a=b}while(a);for(;l.firstChild;)g.insertBefore(l.firstChild,a);h.data="$";h._reactRetry&&h._reactRetry()}}}if(c=document.getElementById(c))if(c.parentNode.removeChild(c),d=\ndocument.getElementById(d))d.previousSibling.data="$~",$RB.push(d,c),2===$RB.length&&setTimeout(m,("number"!==typeof $RT?0:$RT)+300-performance.now())};$RC("', |
| 9618 | + '$RB=[];$RV=function(){$RT=performance.now();var d=$RB;$RB=[];for(var a=0;a<d.length;a+=2){var b=d[a],h=d[a+1],e=b.parentNode;if(e){var f=b.previousSibling,g=0;do{if(b&&8===b.nodeType){var c=b.data;if("/$"===c||"/&"===c)if(0===g)break;else g--;else"$"!==c&&"$?"!==c&&"$~"!==c&&"$!"!==c&&"&"!==c||g++}c=b.nextSibling;e.removeChild(b);b=c}while(b);for(;h.firstChild;)e.insertBefore(h.firstChild,b);f.data="$";f._reactRetry&&f._reactRetry()}}};$RC=function(d,a){if(a=document.getElementById(a))if(a.parentNode.removeChild(a),d=document.getElementById(d))d.previousSibling.data="$~",$RB.push(d,a),2===$RB.length&&setTimeout($RV,("number"!==typeof $RT?0:$RT)+300-performance.now())};', |
| 9619 | + completeBoundaryUpgradeToViewTransitionsInstruction = |
| 9620 | + "$RV=function(a){try{var b=document.__reactViewTransition;if(b){b.finished.then($RV,$RV);return}if(window._useVT){var c=document.__reactViewTransition=document.startViewTransition({update:a,types:[]});c.finished.finally(function(){document.__reactViewTransition===c&&(document.__reactViewTransition=null)});return}}catch(d){}a()}.bind(null,$RV);", |
9578 | 9621 | completeBoundaryScript1Partial = '$RC("', |
9579 | 9622 | completeBoundaryWithStylesScript1FullPartial = |
9580 | 9623 | '$RM=new Map;$RR=function(n,w,p){function u(q){this._p=null;q()}for(var r=new Map,t=document,h,b,e=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=[],k=0;b=e[k++];)"not all"===b.getAttribute("media")?v.push(b):("LINK"===b.tagName&&$RM.set(b.getAttribute("href"),b),r.set(b.dataset.precedence,h=b));e=0;b=[];var l,a;for(k=!0;;){if(k){var f=p[e++];if(!f){k=!1;e=0;continue}var c=!1,m=0;var d=f[m++];if(a=$RM.get(d)){var g=a._p;c=!0}else{a=t.createElement("link");a.href=d;a.rel=\n"stylesheet";for(a.dataset.precedence=l=f[m++];g=f[m++];)a.setAttribute(g,f[m++]);g=a._p=new Promise(function(q,x){a.onload=u.bind(a,q);a.onerror=u.bind(a,x)});$RM.set(d,a)}d=a.getAttribute("media");!g||d&&!matchMedia(d).matches||b.push(g);if(c)continue}else{a=v[e++];if(!a)break;l=a.getAttribute("data-precedence");a.removeAttribute("media")}c=r.get(l)||h;c===h&&(h=a);r.set(l,a);c?c.parentNode.insertBefore(a,c.nextSibling):(c=t.head,c.insertBefore(a,c.firstChild))}if(p=document.getElementById(n))p.previousSibling.data=\n"$~";Promise.all(b).then($RC.bind(null,n,w),$RX.bind(null,n,"CSS failed to load"))};$RR("', |
|
9888 | 9931 | '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' |
9889 | 9932 | ); |
9890 | 9933 | }; |
9891 | | - exports.version = "19.2.0-experimental-4a45ba92-20250515"; |
| 9934 | + exports.version = "19.2.0-experimental-462d08f9-20250517"; |
9892 | 9935 | })(); |
0 commit comments