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.
@@ -2467,7 +2467,7 @@ var completeSegmentScript1Full = stringToPrecomputedChunk(
2467
2467
  stringToPrecomputedChunk('<template data-rsi="" data-sid="');
2468
2468
  stringToPrecomputedChunk('" data-pid="');
2469
2469
  var completeBoundaryScriptFunctionOnly = stringToPrecomputedChunk(
2470
- '$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())};'
2470
+ '$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))};'
2471
2471
  ),
2472
2472
  completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("'),
2473
2473
  completeBoundaryWithStylesScript1FullPartial = stringToPrecomputedChunk(
@@ -5828,7 +5828,10 @@ function queueCompletedSegment(boundary, segment) {
5828
5828
  var childSegment = segment.children[0];
5829
5829
  childSegment.id = segment.id;
5830
5830
  childSegment.parentFlushed = !0;
5831
- 1 === childSegment.status && queueCompletedSegment(boundary, childSegment);
5831
+ (1 !== childSegment.status &&
5832
+ 3 !== childSegment.status &&
5833
+ 4 !== childSegment.status) ||
5834
+ queueCompletedSegment(boundary, childSegment);
5832
5835
  } else boundary.completedSegments.push(segment);
5833
5836
  }
5834
5837
  function finishedSegment(request, boundary, segment) {
@@ -5863,7 +5866,7 @@ function finishedTask(request$jscomp$0, boundary, row, segment) {
5863
5866
  (0 === boundary.status && (boundary.status = 1),
5864
5867
  null !== segment &&
5865
5868
  segment.parentFlushed &&
5866
- 1 === segment.status &&
5869
+ (1 === segment.status || 3 === segment.status) &&
5867
5870
  queueCompletedSegment(boundary, segment),
5868
5871
  boundary.parentFlushed &&
5869
5872
  request$jscomp$0.completedBoundaries.push(boundary),
@@ -5943,9 +5946,9 @@ function finishedTask(request$jscomp$0, boundary, row, segment) {
5943
5946
  }
5944
5947
  }
5945
5948
  else
5946
- null !== segment &&
5947
- segment.parentFlushed &&
5948
- 1 === segment.status &&
5949
+ null === segment ||
5950
+ !segment.parentFlushed ||
5951
+ (1 !== segment.status && 3 !== segment.status) ||
5949
5952
  (queueCompletedSegment(boundary, segment),
5950
5953
  1 === boundary.completedSegments.length &&
5951
5954
  boundary.parentFlushed &&
@@ -6262,6 +6265,8 @@ function flushSubtree(request, destination, segment, hoistableState) {
6262
6265
  chunkIdx < chunks.length &&
6263
6266
  (r = writeChunkAndReturn(destination, chunks[chunkIdx]));
6264
6267
  return r;
6268
+ case 3:
6269
+ return !0;
6265
6270
  default:
6266
6271
  throw Error(
6267
6272
  "Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React."
@@ -6796,11 +6801,11 @@ function addToReplayParent(node, parentKeyPath, trackedPostpones) {
6796
6801
  }
6797
6802
  function ensureCorrectIsomorphicReactVersion() {
6798
6803
  var isomorphicReactPackageVersion = React.version;
6799
- if ("19.2.0-canary-ab859e31-20250606" !== isomorphicReactPackageVersion)
6804
+ if ("19.2.0-canary-b6c0aa88-20250609" !== isomorphicReactPackageVersion)
6800
6805
  throw Error(
6801
6806
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6802
6807
  (isomorphicReactPackageVersion +
6803
- "\n - react-dom: 19.2.0-canary-ab859e31-20250606\nLearn more: https://react.dev/warnings/version-mismatch")
6808
+ "\n - react-dom: 19.2.0-canary-b6c0aa88-20250609\nLearn more: https://react.dev/warnings/version-mismatch")
6804
6809
  );
6805
6810
  }
6806
6811
  ensureCorrectIsomorphicReactVersion();
@@ -6845,8 +6850,42 @@ function createRequestImpl(children, options) {
6845
6850
  options ? options.formState : void 0
6846
6851
  );
6847
6852
  }
6853
+ function createFakeWritableFromReadableStreamController$1(controller) {
6854
+ return {
6855
+ write: function (chunk) {
6856
+ "string" === typeof chunk && (chunk = textEncoder.encode(chunk));
6857
+ controller.enqueue(chunk);
6858
+ return !0;
6859
+ },
6860
+ end: function () {
6861
+ controller.close();
6862
+ },
6863
+ destroy: function (error) {
6864
+ "function" === typeof controller.error
6865
+ ? controller.error(error)
6866
+ : controller.close();
6867
+ }
6868
+ };
6869
+ }
6848
6870
  ensureCorrectIsomorphicReactVersion();
6849
- function createFakeWritable(readable) {
6871
+ function createFakeWritableFromReadableStreamController(controller) {
6872
+ return {
6873
+ write: function (chunk) {
6874
+ "string" === typeof chunk && (chunk = textEncoder.encode(chunk));
6875
+ controller.enqueue(chunk);
6876
+ return !0;
6877
+ },
6878
+ end: function () {
6879
+ controller.close();
6880
+ },
6881
+ destroy: function (error) {
6882
+ "function" === typeof controller.error
6883
+ ? controller.error(error)
6884
+ : controller.close();
6885
+ }
6886
+ };
6887
+ }
6888
+ function createFakeWritableFromReadable(readable) {
6850
6889
  return {
6851
6890
  write: function (chunk) {
6852
6891
  return readable.push(chunk);
@@ -6859,6 +6898,79 @@ function createFakeWritable(readable) {
6859
6898
  }
6860
6899
  };
6861
6900
  }
6901
+ exports.prerender = function (children, options) {
6902
+ return new Promise(function (resolve, reject) {
6903
+ var onHeaders = options ? options.onHeaders : void 0,
6904
+ onHeadersImpl;
6905
+ onHeaders &&
6906
+ (onHeadersImpl = function (headersDescriptor) {
6907
+ onHeaders(new Headers(headersDescriptor));
6908
+ });
6909
+ var resources = createResumableState(
6910
+ options ? options.identifierPrefix : void 0,
6911
+ options ? options.unstable_externalRuntimeSrc : void 0,
6912
+ options ? options.bootstrapScriptContent : void 0,
6913
+ options ? options.bootstrapScripts : void 0,
6914
+ options ? options.bootstrapModules : void 0
6915
+ ),
6916
+ request = createPrerenderRequest(
6917
+ children,
6918
+ resources,
6919
+ createRenderState(
6920
+ resources,
6921
+ void 0,
6922
+ options ? options.unstable_externalRuntimeSrc : void 0,
6923
+ options ? options.importMap : void 0,
6924
+ onHeadersImpl,
6925
+ options ? options.maxHeadersLength : void 0
6926
+ ),
6927
+ createRootFormatContext(options ? options.namespaceURI : void 0),
6928
+ options ? options.progressiveChunkSize : void 0,
6929
+ options ? options.onError : void 0,
6930
+ function () {
6931
+ var writable,
6932
+ result = {
6933
+ prelude: new ReadableStream(
6934
+ {
6935
+ type: "bytes",
6936
+ start: function (controller) {
6937
+ writable =
6938
+ createFakeWritableFromReadableStreamController(
6939
+ controller
6940
+ );
6941
+ },
6942
+ pull: function () {
6943
+ startFlowing(request, writable);
6944
+ },
6945
+ cancel: function (reason) {
6946
+ request.destination = null;
6947
+ abort(request, reason);
6948
+ }
6949
+ },
6950
+ { highWaterMark: 0 }
6951
+ )
6952
+ };
6953
+ resolve(result);
6954
+ },
6955
+ void 0,
6956
+ void 0,
6957
+ reject,
6958
+ options ? options.onPostpone : void 0
6959
+ );
6960
+ if (options && options.signal) {
6961
+ var signal = options.signal;
6962
+ if (signal.aborted) abort(request, signal.reason);
6963
+ else {
6964
+ var listener = function () {
6965
+ abort(request, signal.reason);
6966
+ signal.removeEventListener("abort", listener);
6967
+ };
6968
+ signal.addEventListener("abort", listener);
6969
+ }
6970
+ }
6971
+ startWork(request);
6972
+ });
6973
+ };
6862
6974
  exports.prerenderToNodeStream = function (children, options) {
6863
6975
  return new Promise(function (resolve, reject) {
6864
6976
  var resumableState = createResumableState(
@@ -6888,7 +7000,7 @@ exports.prerenderToNodeStream = function (children, options) {
6888
7000
  startFlowing(request, writable);
6889
7001
  }
6890
7002
  }),
6891
- writable = createFakeWritable(readable);
7003
+ writable = createFakeWritableFromReadable(readable);
6892
7004
  resolve({ prelude: readable });
6893
7005
  },
6894
7006
  void 0,
@@ -6949,4 +7061,86 @@ exports.renderToPipeableStream = function (children, options) {
6949
7061
  }
6950
7062
  };
6951
7063
  };
6952
- exports.version = "19.2.0-canary-ab859e31-20250606";
7064
+ exports.renderToReadableStream = function (children, options) {
7065
+ return new Promise(function (resolve, reject) {
7066
+ var onFatalError,
7067
+ onAllReady,
7068
+ allReady = new Promise(function (res, rej) {
7069
+ onAllReady = res;
7070
+ onFatalError = rej;
7071
+ }),
7072
+ onHeaders = options ? options.onHeaders : void 0,
7073
+ onHeadersImpl;
7074
+ onHeaders &&
7075
+ (onHeadersImpl = function (headersDescriptor) {
7076
+ onHeaders(new Headers(headersDescriptor));
7077
+ });
7078
+ var resumableState = createResumableState(
7079
+ options ? options.identifierPrefix : void 0,
7080
+ options ? options.unstable_externalRuntimeSrc : void 0,
7081
+ options ? options.bootstrapScriptContent : void 0,
7082
+ options ? options.bootstrapScripts : void 0,
7083
+ options ? options.bootstrapModules : void 0
7084
+ ),
7085
+ request = createRequest(
7086
+ children,
7087
+ resumableState,
7088
+ createRenderState(
7089
+ resumableState,
7090
+ options ? options.nonce : void 0,
7091
+ options ? options.unstable_externalRuntimeSrc : void 0,
7092
+ options ? options.importMap : void 0,
7093
+ onHeadersImpl,
7094
+ options ? options.maxHeadersLength : void 0
7095
+ ),
7096
+ createRootFormatContext(options ? options.namespaceURI : void 0),
7097
+ options ? options.progressiveChunkSize : void 0,
7098
+ options ? options.onError : void 0,
7099
+ onAllReady,
7100
+ function () {
7101
+ var writable,
7102
+ stream = new ReadableStream(
7103
+ {
7104
+ type: "bytes",
7105
+ start: function (controller) {
7106
+ writable =
7107
+ createFakeWritableFromReadableStreamController$1(
7108
+ controller
7109
+ );
7110
+ },
7111
+ pull: function () {
7112
+ startFlowing(request, writable);
7113
+ },
7114
+ cancel: function (reason) {
7115
+ request.destination = null;
7116
+ abort(request, reason);
7117
+ }
7118
+ },
7119
+ { highWaterMark: 0 }
7120
+ );
7121
+ stream.allReady = allReady;
7122
+ resolve(stream);
7123
+ },
7124
+ function (error) {
7125
+ allReady.catch(function () {});
7126
+ reject(error);
7127
+ },
7128
+ onFatalError,
7129
+ options ? options.onPostpone : void 0,
7130
+ options ? options.formState : void 0
7131
+ );
7132
+ if (options && options.signal) {
7133
+ var signal = options.signal;
7134
+ if (signal.aborted) abort(request, signal.reason);
7135
+ else {
7136
+ var listener = function () {
7137
+ abort(request, signal.reason);
7138
+ signal.removeEventListener("abort", listener);
7139
+ };
7140
+ signal.addEventListener("abort", listener);
7141
+ }
7142
+ }
7143
+ startWork(request);
7144
+ });
7145
+ };
7146
+ exports.version = "19.2.0-canary-b6c0aa88-20250609";
@@ -416,7 +416,7 @@
416
416
  exports.useFormStatus = function () {
417
417
  return resolveDispatcher().useHostTransitionStatus();
418
418
  };
419
- exports.version = "19.2.0-canary-ab859e31-20250606";
419
+ exports.version = "19.2.0-canary-b6c0aa88-20250609";
420
420
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
421
421
  "function" ===
422
422
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -207,4 +207,4 @@ exports.useFormState = function (action, initialState, permalink) {
207
207
  exports.useFormStatus = function () {
208
208
  return ReactSharedInternals.H.useHostTransitionStatus();
209
209
  };
210
- exports.version = "19.2.0-canary-ab859e31-20250606";
210
+ exports.version = "19.2.0-canary-b6c0aa88-20250609";
@@ -336,5 +336,5 @@
336
336
  }))
337
337
  : Internals.d.m(href));
338
338
  };
339
- exports.version = "19.2.0-canary-ab859e31-20250606";
339
+ exports.version = "19.2.0-canary-b6c0aa88-20250609";
340
340
  })();
@@ -149,4 +149,4 @@ exports.preloadModule = function (href, options) {
149
149
  });
150
150
  } else Internals.d.m(href);
151
151
  };
152
- exports.version = "19.2.0-canary-ab859e31-20250606";
152
+ exports.version = "19.2.0-canary-b6c0aa88-20250609";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-dom",
3
- "version": "19.2.0-canary-ab859e31-20250606",
3
+ "version": "19.2.0-canary-b6c0aa88-20250609",
4
4
  "description": "React package for working with the DOM.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "homepage": "https://react.dev/",
19
19
  "dependencies": {
20
- "scheduler": "0.27.0-canary-ab859e31-20250606"
20
+ "scheduler": "0.27.0-canary-b6c0aa88-20250609"
21
21
  },
22
22
  "peerDependencies": {
23
- "react": "19.2.0-canary-ab859e31-20250606"
23
+ "react": "19.2.0-canary-b6c0aa88-20250609"
24
24
  },
25
25
  "files": [
26
26
  "LICENSE",
package/server.node.js CHANGED
@@ -1,24 +1,22 @@
1
1
  'use strict';
2
2
 
3
- var l, s, w;
3
+ var l, s;
4
4
  if (process.env.NODE_ENV === 'production') {
5
5
  l = require('./cjs/react-dom-server-legacy.node.production.js');
6
6
  s = require('./cjs/react-dom-server.node.production.js');
7
- w = require('./cjs/react-dom-server.node-webstreams.production.js');
8
7
  } else {
9
8
  l = require('./cjs/react-dom-server-legacy.node.development.js');
10
9
  s = require('./cjs/react-dom-server.node.development.js');
11
- w = require('./cjs/react-dom-server.node-webstreams.development.js');
12
10
  }
13
11
 
14
12
  exports.version = l.version;
15
13
  exports.renderToString = l.renderToString;
16
14
  exports.renderToStaticMarkup = l.renderToStaticMarkup;
17
15
  exports.renderToPipeableStream = s.renderToPipeableStream;
16
+ exports.renderToReadableStream = s.renderToReadableStream;
18
17
  if (s.resumeToPipeableStream) {
19
18
  exports.resumeToPipeableStream = s.resumeToPipeableStream;
20
19
  }
21
- exports.renderToReadableStream = w.renderToReadableStream;
22
- if (w.resume) {
23
- exports.resume = w.resume;
20
+ if (s.resume) {
21
+ exports.resume = s.resume;
24
22
  }
package/static.node.js CHANGED
@@ -1,16 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var s, w;
3
+ var s;
4
4
  if (process.env.NODE_ENV === 'production') {
5
5
  s = require('./cjs/react-dom-server.node.production.js');
6
- w = require('./cjs/react-dom-server.node-webstreams.production.js');
7
6
  } else {
8
7
  s = require('./cjs/react-dom-server.node.development.js');
9
- w = require('./cjs/react-dom-server.node-webstreams.development.js');
10
8
  }
11
9
 
12
10
  exports.version = s.version;
13
11
  exports.prerenderToNodeStream = s.prerenderToNodeStream;
12
+ exports.prerender = s.prerender;
14
13
  exports.resumeAndPrerenderToNodeStream = s.resumeAndPrerenderToNodeStream;
15
- exports.prerender = w.prerender;
16
- exports.resumeAndPrerender = w.resumeAndPrerender;
14
+ exports.resumeAndPrerender = s.resumeAndPrerender;