react-dom 19.2.0-canary-ab859e31-20250606 → 19.2.0-canary-b6c0aa88-20250609

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2549,10 +2549,10 @@ var completeSegmentScript1Full = stringToPrecomputedChunk(
2549
2549
  stringToPrecomputedChunk('<template data-rsi="" data-sid="');
2550
2550
  stringToPrecomputedChunk('" data-pid="');
2551
2551
  var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(
2552
- '$RB=[];$RV=function(c){$RT=performance.now();for(var a=0;a<c.length;a+=2){var b=c[a],h=c[a+1],e=b.parentNode;if(e){var f=b.previousSibling,g=0;do{if(b&&8===b.nodeType){var d=b.data;if("/$"===d||"/&"===d)if(0===g)break;else g--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||g++}d=b.nextSibling;e.removeChild(b);b=d}while(b);for(;h.firstChild;)e.insertBefore(h.firstChild,b);f.data="$";f._reactRetry&&f._reactRetry()}}c.length=0};$RC=function(c,a){if(a=document.getElementById(a))if(a.parentNode.removeChild(a),c=document.getElementById(c))c.previousSibling.data="$~",$RB.push(c,a),2===$RB.length&&setTimeout($RV.bind(null,$RB),("number"!==typeof $RT?0:$RT)+300-performance.now())};'
2552
+ '$RB=[];$RV=function(b){$RT=performance.now();for(var a=0;a<b.length;a+=2){var c=b[a],h=b[a+1],e=c.parentNode;if(e){var f=c.previousSibling,g=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===g)break;else g--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||g++}d=c.nextSibling;e.removeChild(c);c=d}while(c);for(;h.firstChild;)e.insertBefore(h.firstChild,c);f.data="$";f._reactRetry&&f._reactRetry()}}b.length=0};$RC=function(b,a){if(a=document.getElementById(a))if(a.parentNode.removeChild(a),b=document.getElementById(b))b.previousSibling.data="$~",$RB.push(b,a),2===$RB.length&&(b="number"!==typeof $RT?0:$RT,a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:b+300-a))};'
2553
2553
  );
2554
2554
  stringToChunk(
2555
- '$RV=function(z,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),"auto"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+K++ +"_"),b.viewTransitionName=a,A=!0)}var A=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll("[vt-share]"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute("vt-name"),c)}var t=[];for(h=0;h<g.length;h+=2){var B=g[h],w=B.parentNode;if(w){var u=w.getBoundingClientRect();if(u.left||u.top||u.width||u.height){c=B;for(f=0;c;){if(8===c.nodeType){var q=c.data;if("/$"===q)if(0===f)break;else f--;else"$"!==q&&"$?"!==q&&"$~"!==q&&"$!"!==q||f++}else if(1===c.nodeType){d=c;var C=d.getAttribute("vt-name"),x=m.get(C);k(d,x?"vt-share":"vt-exit");x&&(k(x,"vt-share"),m.set(C,null));var D=d.querySelectorAll("[vt-share]");for(d=0;d<D.length;d++){var E=D[d],F=E.getAttribute("vt-name"),\nG=m.get(F);G&&(k(E,"vt-share"),k(G,"vt-share"),m.set(F,null))}}c=c.nextSibling}for(var H=g[h+1],r=H.firstElementChild;r;)null!==m.get(r.getAttribute("vt-name"))&&k(r,"vt-enter"),r=r.nextElementSibling;c=w;do for(var n=c.firstElementChild;n;){var I=n.getAttribute("vt-update");I&&"none"!==I&&!l.includes(n)&&k(n,"vt-update");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&"none"!==c.getAttribute("vt-update"));t.push.apply(t,H.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(A){var y=\ndocument.__reactViewTransition=document.startViewTransition({update:function(){z(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<t.length;b={g:b.g},e++)if(b.g=t[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(v){return function(J){v.g.addEventListener("load",J);v.g.addEventListener("error",J)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(v){return setTimeout(v,\n500)})])},types:[]});y.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===b.getAttribute("style")&&b.removeAttribute("style")}});y.finished.finally(function(){document.__reactViewTransition===y&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}z(g)}.bind(null,$RV);'
2555
+ '$RV=function(A,g){function k(a,b){var e=a.getAttribute(b);e&&(b=a.style,l.push(a,b.viewTransitionName,b.viewTransitionClass),"auto"!==e&&(b.viewTransitionClass=e),(a=a.getAttribute("vt-name"))||(a="_T_"+K++ +"_"),b.viewTransitionName=a,B=!0)}var B=!1,K=0,l=[];try{var f=document.__reactViewTransition;if(f){f.finished.finally($RV.bind(null,g));return}var m=new Map;for(f=1;f<g.length;f+=2)for(var h=g[f].querySelectorAll("[vt-share]"),d=0;d<h.length;d++){var c=h[d];m.set(c.getAttribute("vt-name"),c)}var u=[];for(h=0;h<g.length;h+=2){var C=g[h],x=C.parentNode;if(x){var v=x.getBoundingClientRect();if(v.left||v.top||v.width||v.height){c=C;for(f=0;c;){if(8===c.nodeType){var r=c.data;if("/$"===r)if(0===f)break;else f--;else"$"!==r&&"$?"!==r&&"$~"!==r&&"$!"!==r||f++}else if(1===c.nodeType){d=c;var D=d.getAttribute("vt-name"),y=m.get(D);k(d,y?"vt-share":"vt-exit");y&&(k(y,"vt-share"),m.set(D,null));var E=d.querySelectorAll("[vt-share]");for(d=0;d<E.length;d++){var F=E[d],G=F.getAttribute("vt-name"),\nH=m.get(G);H&&(k(F,"vt-share"),k(H,"vt-share"),m.set(G,null))}}c=c.nextSibling}for(var I=g[h+1],t=I.firstElementChild;t;)null!==m.get(t.getAttribute("vt-name"))&&k(t,"vt-enter"),t=t.nextElementSibling;c=x;do for(var n=c.firstElementChild;n;){var J=n.getAttribute("vt-update");J&&"none"!==J&&!l.includes(n)&&k(n,"vt-update");n=n.nextElementSibling}while((c=c.parentNode)&&1===c.nodeType&&"none"!==c.getAttribute("vt-update"));u.push.apply(u,I.querySelectorAll(\'img[src]:not([loading="lazy"])\'))}}}if(B){var z=\ndocument.__reactViewTransition=document.startViewTransition({update:function(){A(g);for(var a=[document.documentElement.clientHeight,document.fonts.ready],b={},e=0;e<u.length;b={g:b.g},e++)if(b.g=u[e],!b.g.complete){var p=b.g.getBoundingClientRect();0<p.bottom&&0<p.right&&p.top<window.innerHeight&&p.left<window.innerWidth&&(p=new Promise(function(w){return function(q){w.g.addEventListener("load",q);w.g.addEventListener("error",q)}}(b)),a.push(p))}return Promise.race([Promise.all(a),new Promise(function(w){var q=\nperformance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready.finally(function(){for(var a=l.length-3;0<=a;a-=3){var b=l[a],e=b.style;e.viewTransitionName=l[a+1];e.viewTransitionClass=l[a+1];""===b.getAttribute("style")&&b.removeAttribute("style")}});z.finished.finally(function(){document.__reactViewTransition===z&&(document.__reactViewTransition=null)});$RB=[];return}}catch(a){}A(g)}.bind(null,$RV);'
2556
2556
  );
2557
2557
  var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
2558
2558
  completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
@@ -5928,7 +5928,10 @@ function queueCompletedSegment(boundary, segment) {
5928
5928
  var childSegment = segment.children[0];
5929
5929
  childSegment.id = segment.id;
5930
5930
  childSegment.parentFlushed = !0;
5931
- 1 === childSegment.status && queueCompletedSegment(boundary, childSegment);
5931
+ (1 !== childSegment.status &&
5932
+ 3 !== childSegment.status &&
5933
+ 4 !== childSegment.status) ||
5934
+ queueCompletedSegment(boundary, childSegment);
5932
5935
  } else boundary.completedSegments.push(segment);
5933
5936
  }
5934
5937
  function finishedSegment(request, boundary, segment) {
@@ -5963,7 +5966,7 @@ function finishedTask(request$jscomp$0, boundary, row, segment) {
5963
5966
  (0 === boundary.status && (boundary.status = 1),
5964
5967
  null !== segment &&
5965
5968
  segment.parentFlushed &&
5966
- 1 === segment.status &&
5969
+ (1 === segment.status || 3 === segment.status) &&
5967
5970
  queueCompletedSegment(boundary, segment),
5968
5971
  boundary.parentFlushed &&
5969
5972
  request$jscomp$0.completedBoundaries.push(boundary),
@@ -6043,9 +6046,9 @@ function finishedTask(request$jscomp$0, boundary, row, segment) {
6043
6046
  }
6044
6047
  }
6045
6048
  else
6046
- null !== segment &&
6047
- segment.parentFlushed &&
6048
- 1 === segment.status &&
6049
+ null === segment ||
6050
+ !segment.parentFlushed ||
6051
+ (1 !== segment.status && 3 !== segment.status) ||
6049
6052
  (queueCompletedSegment(boundary, segment),
6050
6053
  1 === boundary.completedSegments.length &&
6051
6054
  boundary.parentFlushed &&
@@ -6362,6 +6365,8 @@ function flushSubtree(request, destination, segment, hoistableState) {
6362
6365
  chunkIdx < chunks.length &&
6363
6366
  (r = writeChunkAndReturn(destination, chunks[chunkIdx]));
6364
6367
  return r;
6368
+ case 3:
6369
+ return !0;
6365
6370
  default:
6366
6371
  throw Error(
6367
6372
  "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
@@ -6904,11 +6909,11 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) {
6904
6909
  }
6905
6910
  function ensureCorrectIsomorphicReactVersion() {
6906
6911
  var isomorphicReactPackageVersion = React.version;
6907
- if ("19.2.0-canary-ab859e31-20250606" !== isomorphicReactPackageVersion)
6912
+ if ("19.2.0-canary-b6c0aa88-20250609" !== isomorphicReactPackageVersion)
6908
6913
  throw Error(
6909
6914
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6910
6915
  (isomorphicReactPackageVersion +
6911
- "\n - react-dom: 19.2.0-canary-ab859e31-20250606\nLearn more: https://react.dev/warnings/version-mismatch")
6916
+ "\n - react-dom: 19.2.0-canary-b6c0aa88-20250609\nLearn more: https://react.dev/warnings/version-mismatch")
6912
6917
  );
6913
6918
  }
6914
6919
  ensureCorrectIsomorphicReactVersion();
@@ -7054,4 +7059,4 @@ exports.renderToReadableStream = function (children, options) {
7054
7059
  startWork(request);
7055
7060
  });
7056
7061
  };
7057
- exports.version = "19.2.0-canary-ab859e31-20250606";
7062
+ exports.version = "19.2.0-canary-b6c0aa88-20250609";
@@ -5069,7 +5069,8 @@
5069
5069
  finishSuspenseListRow(request, previousSuspenseListRow);
5070
5070
  } catch (thrownValue) {
5071
5071
  throw (
5072
- ((resumeSegmentID.status = 12 === request.status ? ABORTED : 4),
5072
+ ((resumeSegmentID.status =
5073
+ 12 === request.status ? ABORTED : ERRORED),
5073
5074
  thrownValue)
5074
5075
  );
5075
5076
  }
@@ -5920,7 +5921,7 @@
5920
5921
  } catch (thrownValue) {
5921
5922
  throw (
5922
5923
  ((boundarySegment.status =
5923
- 12 === request.status ? ABORTED : 4),
5924
+ 12 === request.status ? ABORTED : ERRORED),
5924
5925
  thrownValue)
5925
5926
  );
5926
5927
  } finally {
@@ -5999,7 +6000,8 @@
5999
6000
  contentRootSegment.status = ABORTED;
6000
6001
  var error = request.fatalError;
6001
6002
  } else
6002
- (contentRootSegment.status = 4), (error = thrownValue$2);
6003
+ (contentRootSegment.status = ERRORED),
6004
+ (error = thrownValue$2);
6003
6005
  var thrownInfo = getThrownInfo(task.componentStack);
6004
6006
  var errorDigest = logRecoverableError(
6005
6007
  request,
@@ -7132,7 +7134,9 @@
7132
7134
  var childSegment = segment.children[0];
7133
7135
  childSegment.id = segment.id;
7134
7136
  childSegment.parentFlushed = !0;
7135
- childSegment.status === COMPLETED &&
7137
+ (childSegment.status !== COMPLETED &&
7138
+ childSegment.status !== ABORTED &&
7139
+ childSegment.status !== ERRORED) ||
7136
7140
  queueCompletedSegment(boundary, childSegment);
7137
7141
  } else boundary.completedSegments.push(segment);
7138
7142
  }
@@ -7173,7 +7177,7 @@
7173
7177
  (boundary$jscomp$0.status = COMPLETED),
7174
7178
  null !== segment &&
7175
7179
  segment.parentFlushed &&
7176
- segment.status === COMPLETED &&
7180
+ (segment.status === COMPLETED || segment.status === ABORTED) &&
7177
7181
  queueCompletedSegment(boundary$jscomp$0, segment),
7178
7182
  boundary$jscomp$0.parentFlushed &&
7179
7183
  request$jscomp$0.completedBoundaries.push(boundary$jscomp$0),
@@ -7257,9 +7261,9 @@
7257
7261
  }
7258
7262
  }
7259
7263
  else
7260
- null !== segment &&
7261
- segment.parentFlushed &&
7262
- segment.status === COMPLETED &&
7264
+ null === segment ||
7265
+ !segment.parentFlushed ||
7266
+ (segment.status !== COMPLETED && segment.status !== ABORTED) ||
7263
7267
  (queueCompletedSegment(boundary$jscomp$0, segment),
7264
7268
  1 === boundary$jscomp$0.completedSegments.length &&
7265
7269
  boundary$jscomp$0.parentFlushed &&
@@ -7435,7 +7439,7 @@
7435
7439
  errorDigest.componentStack
7436
7440
  );
7437
7441
  errorDigest.abortSet.delete(errorDigest);
7438
- request$jscomp$1.status = 4;
7442
+ request$jscomp$1.status = ERRORED;
7439
7443
  var boundary$jscomp$0 = errorDigest.blockedBoundary,
7440
7444
  row = errorDigest.row,
7441
7445
  debugTask = errorDigest.debugTask;
@@ -7619,6 +7623,8 @@
7619
7623
  chunkIdx < chunks.length &&
7620
7624
  (r = writeChunkAndReturn(destination, chunks[chunkIdx]));
7621
7625
  return r;
7626
+ case ABORTED:
7627
+ return !0;
7622
7628
  default:
7623
7629
  throw Error(
7624
7630
  "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
@@ -8305,11 +8311,11 @@
8305
8311
  }
8306
8312
  function ensureCorrectIsomorphicReactVersion() {
8307
8313
  var isomorphicReactPackageVersion = React.version;
8308
- if ("19.2.0-canary-ab859e31-20250606" !== isomorphicReactPackageVersion)
8314
+ if ("19.2.0-canary-b6c0aa88-20250609" !== isomorphicReactPackageVersion)
8309
8315
  throw Error(
8310
8316
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
8311
8317
  (isomorphicReactPackageVersion +
8312
- "\n - react-dom: 19.2.0-canary-ab859e31-20250606\nLearn more: https://react.dev/warnings/version-mismatch")
8318
+ "\n - react-dom: 19.2.0-canary-b6c0aa88-20250609\nLearn more: https://react.dev/warnings/version-mismatch")
8313
8319
  );
8314
8320
  }
8315
8321
  function createDrainHandler(destination, request) {
@@ -8353,7 +8359,41 @@
8353
8359
  options ? options.formState : void 0
8354
8360
  );
8355
8361
  }
8356
- function createFakeWritable(readable) {
8362
+ function createFakeWritableFromReadableStreamController$1(controller) {
8363
+ return {
8364
+ write: function (chunk) {
8365
+ "string" === typeof chunk && (chunk = textEncoder.encode(chunk));
8366
+ controller.enqueue(chunk);
8367
+ return !0;
8368
+ },
8369
+ end: function () {
8370
+ controller.close();
8371
+ },
8372
+ destroy: function (error) {
8373
+ "function" === typeof controller.error
8374
+ ? controller.error(error)
8375
+ : controller.close();
8376
+ }
8377
+ };
8378
+ }
8379
+ function createFakeWritableFromReadableStreamController(controller) {
8380
+ return {
8381
+ write: function (chunk) {
8382
+ "string" === typeof chunk && (chunk = textEncoder.encode(chunk));
8383
+ controller.enqueue(chunk);
8384
+ return !0;
8385
+ },
8386
+ end: function () {
8387
+ controller.close();
8388
+ },
8389
+ destroy: function (error) {
8390
+ "function" === typeof controller.error
8391
+ ? controller.error(error)
8392
+ : controller.close();
8393
+ }
8394
+ };
8395
+ }
8396
+ function createFakeWritableFromReadable(readable) {
8357
8397
  return {
8358
8398
  write: function (chunk) {
8359
8399
  return readable.push(chunk);
@@ -9589,7 +9629,7 @@
9589
9629
  stringToPrecomputedChunk('<template data-rsi="" data-sid="');
9590
9630
  stringToPrecomputedChunk('" data-pid="');
9591
9631
  var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(
9592
- '$RB=[];$RV=function(c){$RT=performance.now();for(var a=0;a<c.length;a+=2){var b=c[a],h=c[a+1],e=b.parentNode;if(e){var f=b.previousSibling,g=0;do{if(b&&8===b.nodeType){var d=b.data;if("/$"===d||"/&"===d)if(0===g)break;else g--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||g++}d=b.nextSibling;e.removeChild(b);b=d}while(b);for(;h.firstChild;)e.insertBefore(h.firstChild,b);f.data="$";f._reactRetry&&f._reactRetry()}}c.length=0};$RC=function(c,a){if(a=document.getElementById(a))if(a.parentNode.removeChild(a),c=document.getElementById(c))c.previousSibling.data="$~",$RB.push(c,a),2===$RB.length&&setTimeout($RV.bind(null,$RB),("number"!==typeof $RT?0:$RT)+300-performance.now())};'
9632
+ '$RB=[];$RV=function(b){$RT=performance.now();for(var a=0;a<b.length;a+=2){var c=b[a],h=b[a+1],e=c.parentNode;if(e){var f=c.previousSibling,g=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d||"/&"===d)if(0===g)break;else g--;else"$"!==d&&"$?"!==d&&"$~"!==d&&"$!"!==d&&"&"!==d||g++}d=c.nextSibling;e.removeChild(c);c=d}while(c);for(;h.firstChild;)e.insertBefore(h.firstChild,c);f.data="$";f._reactRetry&&f._reactRetry()}}b.length=0};$RC=function(b,a){if(a=document.getElementById(a))if(a.parentNode.removeChild(a),b=document.getElementById(b))b.previousSibling.data="$~",$RB.push(b,a),2===$RB.length&&(b="number"!==typeof $RT?0:$RT,a=performance.now(),setTimeout($RV.bind(null,$RB),2300>a&&2E3<a?2300-a:b+300-a))};'
9593
9633
  ),
9594
9634
  completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
9595
9635
  completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
@@ -9885,6 +9925,7 @@
9885
9925
  COMPLETED = 1,
9886
9926
  FLUSHED = 2,
9887
9927
  ABORTED = 3,
9928
+ ERRORED = 4,
9888
9929
  POSTPONED = 5,
9889
9930
  CLOSED = 14,
9890
9931
  currentRequest = null,
@@ -9898,6 +9939,79 @@
9898
9939
  flushedByteSize = 0;
9899
9940
  ensureCorrectIsomorphicReactVersion();
9900
9941
  ensureCorrectIsomorphicReactVersion();
9942
+ exports.prerender = function (children, options) {
9943
+ return new Promise(function (resolve, reject) {
9944
+ var onHeaders = options ? options.onHeaders : void 0,
9945
+ onHeadersImpl;
9946
+ onHeaders &&
9947
+ (onHeadersImpl = function (headersDescriptor) {
9948
+ onHeaders(new Headers(headersDescriptor));
9949
+ });
9950
+ var resources = createResumableState(
9951
+ options ? options.identifierPrefix : void 0,
9952
+ options ? options.unstable_externalRuntimeSrc : void 0,
9953
+ options ? options.bootstrapScriptContent : void 0,
9954
+ options ? options.bootstrapScripts : void 0,
9955
+ options ? options.bootstrapModules : void 0
9956
+ ),
9957
+ request = createPrerenderRequest(
9958
+ children,
9959
+ resources,
9960
+ createRenderState(
9961
+ resources,
9962
+ void 0,
9963
+ options ? options.unstable_externalRuntimeSrc : void 0,
9964
+ options ? options.importMap : void 0,
9965
+ onHeadersImpl,
9966
+ options ? options.maxHeadersLength : void 0
9967
+ ),
9968
+ createRootFormatContext(options ? options.namespaceURI : void 0),
9969
+ options ? options.progressiveChunkSize : void 0,
9970
+ options ? options.onError : void 0,
9971
+ function () {
9972
+ var writable,
9973
+ result = {
9974
+ prelude: new ReadableStream(
9975
+ {
9976
+ type: "bytes",
9977
+ start: function (controller) {
9978
+ writable =
9979
+ createFakeWritableFromReadableStreamController(
9980
+ controller
9981
+ );
9982
+ },
9983
+ pull: function () {
9984
+ startFlowing(request, writable);
9985
+ },
9986
+ cancel: function (reason) {
9987
+ request.destination = null;
9988
+ abort(request, reason);
9989
+ }
9990
+ },
9991
+ { highWaterMark: 0 }
9992
+ )
9993
+ };
9994
+ resolve(result);
9995
+ },
9996
+ void 0,
9997
+ void 0,
9998
+ reject,
9999
+ options ? options.onPostpone : void 0
10000
+ );
10001
+ if (options && options.signal) {
10002
+ var signal = options.signal;
10003
+ if (signal.aborted) abort(request, signal.reason);
10004
+ else {
10005
+ var listener = function () {
10006
+ abort(request, signal.reason);
10007
+ signal.removeEventListener("abort", listener);
10008
+ };
10009
+ signal.addEventListener("abort", listener);
10010
+ }
10011
+ }
10012
+ startWork(request);
10013
+ });
10014
+ };
9901
10015
  exports.prerenderToNodeStream = function (children, options) {
9902
10016
  return new Promise(function (resolve, reject) {
9903
10017
  var resumableState = createResumableState(
@@ -9927,7 +10041,7 @@
9927
10041
  startFlowing(request, writable);
9928
10042
  }
9929
10043
  }),
9930
- writable = createFakeWritable(readable);
10044
+ writable = createFakeWritableFromReadable(readable);
9931
10045
  resolve({ prelude: readable });
9932
10046
  },
9933
10047
  void 0,
@@ -9988,5 +10102,87 @@
9988
10102
  }
9989
10103
  };
9990
10104
  };
9991
- exports.version = "19.2.0-canary-ab859e31-20250606";
10105
+ exports.renderToReadableStream = function (children, options) {
10106
+ return new Promise(function (resolve, reject) {
10107
+ var onFatalError,
10108
+ onAllReady,
10109
+ allReady = new Promise(function (res, rej) {
10110
+ onAllReady = res;
10111
+ onFatalError = rej;
10112
+ }),
10113
+ onHeaders = options ? options.onHeaders : void 0,
10114
+ onHeadersImpl;
10115
+ onHeaders &&
10116
+ (onHeadersImpl = function (headersDescriptor) {
10117
+ onHeaders(new Headers(headersDescriptor));
10118
+ });
10119
+ var resumableState = createResumableState(
10120
+ options ? options.identifierPrefix : void 0,
10121
+ options ? options.unstable_externalRuntimeSrc : void 0,
10122
+ options ? options.bootstrapScriptContent : void 0,
10123
+ options ? options.bootstrapScripts : void 0,
10124
+ options ? options.bootstrapModules : void 0
10125
+ ),
10126
+ request = createRequest(
10127
+ children,
10128
+ resumableState,
10129
+ createRenderState(
10130
+ resumableState,
10131
+ options ? options.nonce : void 0,
10132
+ options ? options.unstable_externalRuntimeSrc : void 0,
10133
+ options ? options.importMap : void 0,
10134
+ onHeadersImpl,
10135
+ options ? options.maxHeadersLength : void 0
10136
+ ),
10137
+ createRootFormatContext(options ? options.namespaceURI : void 0),
10138
+ options ? options.progressiveChunkSize : void 0,
10139
+ options ? options.onError : void 0,
10140
+ onAllReady,
10141
+ function () {
10142
+ var writable,
10143
+ stream = new ReadableStream(
10144
+ {
10145
+ type: "bytes",
10146
+ start: function (controller) {
10147
+ writable =
10148
+ createFakeWritableFromReadableStreamController$1(
10149
+ controller
10150
+ );
10151
+ },
10152
+ pull: function () {
10153
+ startFlowing(request, writable);
10154
+ },
10155
+ cancel: function (reason) {
10156
+ request.destination = null;
10157
+ abort(request, reason);
10158
+ }
10159
+ },
10160
+ { highWaterMark: 0 }
10161
+ );
10162
+ stream.allReady = allReady;
10163
+ resolve(stream);
10164
+ },
10165
+ function (error) {
10166
+ allReady.catch(function () {});
10167
+ reject(error);
10168
+ },
10169
+ onFatalError,
10170
+ options ? options.onPostpone : void 0,
10171
+ options ? options.formState : void 0
10172
+ );
10173
+ if (options && options.signal) {
10174
+ var signal = options.signal;
10175
+ if (signal.aborted) abort(request, signal.reason);
10176
+ else {
10177
+ var listener = function () {
10178
+ abort(request, signal.reason);
10179
+ signal.removeEventListener("abort", listener);
10180
+ };
10181
+ signal.addEventListener("abort", listener);
10182
+ }
10183
+ }
10184
+ startWork(request);
10185
+ });
10186
+ };
10187
+ exports.version = "19.2.0-canary-b6c0aa88-20250609";
9992
10188
  })();