react-dom 19.2.0-canary-197d6a04-20250424 → 19.2.0-canary-143d3e1b-20250425

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.
@@ -347,14 +347,14 @@ ReactDOMSharedInternals.d = {
347
347
  };
348
348
  var PRELOAD_NO_CREDS = [];
349
349
  stringToPrecomputedChunk('"></template>');
350
- var startInlineScript = stringToPrecomputedChunk("<script>"),
350
+ var startInlineScript = stringToPrecomputedChunk("<script"),
351
351
  endInlineScript = stringToPrecomputedChunk("\x3c/script>"),
352
352
  startScriptSrc = stringToPrecomputedChunk('<script src="'),
353
353
  startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'),
354
- scriptNonce = stringToPrecomputedChunk('" nonce="'),
355
- scriptIntegirty = stringToPrecomputedChunk('" integrity="'),
356
- scriptCrossOrigin = stringToPrecomputedChunk('" crossorigin="'),
357
- endAsyncScript = stringToPrecomputedChunk('" async="">\x3c/script>'),
354
+ scriptNonce = stringToPrecomputedChunk(' nonce="'),
355
+ scriptIntegirty = stringToPrecomputedChunk(' integrity="'),
356
+ scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin="'),
357
+ endAsyncScript = stringToPrecomputedChunk(' async="">\x3c/script>'),
358
358
  scriptRegex = /(<\/|<)(s)(cript)/gi;
359
359
  function scriptReplacer(match, prefix, s, suffix) {
360
360
  return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
@@ -375,7 +375,7 @@ function createRenderState(
375
375
  void 0 === nonce
376
376
  ? startInlineScript
377
377
  : stringToPrecomputedChunk(
378
- '<script nonce="' + escapeTextForBrowser(nonce) + '">'
378
+ '<script nonce="' + escapeTextForBrowser(nonce) + '"'
379
379
  ),
380
380
  idPrefix = resumableState.idPrefix;
381
381
  externalRuntimeConfig = [];
@@ -383,13 +383,15 @@ function createRenderState(
383
383
  bootstrapScripts = resumableState.bootstrapScripts,
384
384
  bootstrapModules = resumableState.bootstrapModules;
385
385
  void 0 !== bootstrapScriptContent &&
386
+ (externalRuntimeConfig.push(inlineScriptWithNonce),
387
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState),
386
388
  externalRuntimeConfig.push(
387
- inlineScriptWithNonce,
389
+ endOfStartTag,
388
390
  stringToChunk(
389
391
  ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer)
390
392
  ),
391
393
  endInlineScript
392
- );
394
+ ));
393
395
  bootstrapScriptContent = [];
394
396
  void 0 !== importMap &&
395
397
  (bootstrapScriptContent.push(importMapScriptStart),
@@ -478,23 +480,28 @@ function createRenderState(
478
480
  onHeaders.bootstrapScripts.add(scriptConfig);
479
481
  externalRuntimeConfig.push(
480
482
  startScriptSrc,
481
- stringToChunk(escapeTextForBrowser(maxHeadersLength))
483
+ stringToChunk(escapeTextForBrowser(maxHeadersLength)),
484
+ attributeEnd
482
485
  );
483
486
  nonce &&
484
487
  externalRuntimeConfig.push(
485
488
  scriptNonce,
486
- stringToChunk(escapeTextForBrowser(nonce))
489
+ stringToChunk(escapeTextForBrowser(nonce)),
490
+ attributeEnd
487
491
  );
488
492
  "string" === typeof idPrefix &&
489
493
  externalRuntimeConfig.push(
490
494
  scriptIntegirty,
491
- stringToChunk(escapeTextForBrowser(idPrefix))
495
+ stringToChunk(escapeTextForBrowser(idPrefix)),
496
+ attributeEnd
492
497
  );
493
498
  "string" === typeof inlineScriptWithNonce &&
494
499
  externalRuntimeConfig.push(
495
500
  scriptCrossOrigin,
496
- stringToChunk(escapeTextForBrowser(inlineScriptWithNonce))
501
+ stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
502
+ attributeEnd
497
503
  );
504
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState);
498
505
  externalRuntimeConfig.push(endAsyncScript);
499
506
  }
500
507
  if (void 0 !== bootstrapModules)
@@ -533,23 +540,28 @@ function createRenderState(
533
540
  onHeaders.bootstrapScripts.add(bootstrapScriptContent),
534
541
  externalRuntimeConfig.push(
535
542
  startModuleSrc,
536
- stringToChunk(escapeTextForBrowser(importMap))
543
+ stringToChunk(escapeTextForBrowser(importMap)),
544
+ attributeEnd
537
545
  ),
538
546
  nonce &&
539
547
  externalRuntimeConfig.push(
540
548
  scriptNonce,
541
- stringToChunk(escapeTextForBrowser(nonce))
549
+ stringToChunk(escapeTextForBrowser(nonce)),
550
+ attributeEnd
542
551
  ),
543
552
  "string" === typeof inlineScriptWithNonce &&
544
553
  externalRuntimeConfig.push(
545
554
  scriptIntegirty,
546
- stringToChunk(escapeTextForBrowser(inlineScriptWithNonce))
555
+ stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
556
+ attributeEnd
547
557
  ),
548
558
  "string" === typeof maxHeadersLength &&
549
559
  externalRuntimeConfig.push(
550
560
  scriptCrossOrigin,
551
- stringToChunk(escapeTextForBrowser(maxHeadersLength))
561
+ stringToChunk(escapeTextForBrowser(maxHeadersLength)),
562
+ attributeEnd
552
563
  ),
564
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState),
553
565
  externalRuntimeConfig.push(endAsyncScript);
554
566
  return onHeaders;
555
567
  }
@@ -1048,13 +1060,25 @@ var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""'),
1048
1060
  'addEventListener("submit",function(a){if(!a.defaultPrevented){var c=a.target,d=a.submitter,e=c.action,b=d;if(d){var f=d.getAttribute("formAction");null!=f&&(e=f,b=null)}"javascript:throw new Error(\'React form unexpectedly submitted.\')"===e&&(a.preventDefault(),b?(a=document.createElement("input"),a.name=b.name,a.value=b.value,b.parentNode.insertBefore(a,b),b=new FormData(c),a.parentNode.removeChild(a)):b=new FormData(c),a=c.ownerDocument||c,(a.$$reactFormReplay=a.$$reactFormReplay||[]).push(c,d,b))}});'
1049
1061
  );
1050
1062
  function injectFormReplayingRuntime(resumableState, renderState) {
1051
- 0 === (resumableState.instructions & 16) &&
1052
- ((resumableState.instructions |= 16),
1053
- renderState.bootstrapChunks.unshift(
1054
- renderState.startInlineScript,
1055
- formReplayingRuntimeScript,
1056
- endInlineScript
1057
- ));
1063
+ if (0 === (resumableState.instructions & 16)) {
1064
+ resumableState.instructions |= 16;
1065
+ var preamble = renderState.preamble,
1066
+ bootstrapChunks = renderState.bootstrapChunks;
1067
+ (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
1068
+ ? (bootstrapChunks.push(renderState.startInlineScript),
1069
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1070
+ bootstrapChunks.push(
1071
+ endOfStartTag,
1072
+ formReplayingRuntimeScript,
1073
+ endInlineScript
1074
+ ))
1075
+ : bootstrapChunks.unshift(
1076
+ renderState.startInlineScript,
1077
+ endOfStartTag,
1078
+ formReplayingRuntimeScript,
1079
+ endInlineScript
1080
+ );
1081
+ }
1058
1082
  }
1059
1083
  var formStateMarkerIsMatching = stringToPrecomputedChunk("\x3c!--F!--\x3e"),
1060
1084
  formStateMarkerIsNotMatching = stringToPrecomputedChunk("\x3c!--F--\x3e");
@@ -2637,6 +2661,22 @@ function preloadLateStyles(styleQueue) {
2637
2661
  styleQueue.sheets.forEach(preloadLateStyle, this);
2638
2662
  styleQueue.sheets.clear();
2639
2663
  }
2664
+ var blockingRenderChunkStart = stringToPrecomputedChunk(
2665
+ '<link rel="expect" href="#'
2666
+ ),
2667
+ blockingRenderChunkEnd = stringToPrecomputedChunk('" blocking="render"/>'),
2668
+ completedShellIdAttributeStart = stringToPrecomputedChunk(' id="');
2669
+ function pushCompletedShellIdAttribute(target, resumableState) {
2670
+ 0 === (resumableState.instructions & 32) &&
2671
+ ((resumableState.instructions |= 32),
2672
+ target.push(
2673
+ completedShellIdAttributeStart,
2674
+ stringToChunk(
2675
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb")
2676
+ ),
2677
+ attributeEnd
2678
+ ));
2679
+ }
2640
2680
  var arrayFirstOpenBracket = stringToPrecomputedChunk("["),
2641
2681
  arraySubsequentOpenBracket = stringToPrecomputedChunk(",["),
2642
2682
  arrayInterstitial = stringToPrecomputedChunk(","),
@@ -5949,6 +5989,7 @@ function flushCompletedBoundary(request, destination, boundary) {
5949
5989
  var requiresStyleInsertion = request.stylesToHoist;
5950
5990
  request.stylesToHoist = !1;
5951
5991
  writeChunk(destination, request.startInlineScript);
5992
+ writeChunk(destination, endOfStartTag);
5952
5993
  requiresStyleInsertion
5953
5994
  ? 0 === (completedSegments.instructions & 2)
5954
5995
  ? ((completedSegments.instructions |= 10),
@@ -5996,6 +6037,7 @@ function flushPartiallyCompletedSegment(
5996
6037
  boundary = request.resumableState;
5997
6038
  request = request.renderState;
5998
6039
  writeChunk(destination, request.startInlineScript);
6040
+ writeChunk(destination, endOfStartTag);
5999
6041
  0 === (boundary.instructions & 1)
6000
6042
  ? ((boundary.instructions |= 1),
6001
6043
  writeChunk(destination, completeSegmentScript1Full))
@@ -6020,7 +6062,8 @@ function flushCompletedQueues(request, destination) {
6020
6062
  if (5 === completedRootSegment.status) return;
6021
6063
  var completedPreambleSegments = request.completedPreambleSegments;
6022
6064
  if (null === completedPreambleSegments) return;
6023
- var renderState = request.renderState,
6065
+ var resumableState = request.resumableState,
6066
+ renderState = request.renderState,
6024
6067
  preamble = renderState.preamble,
6025
6068
  htmlChunks = preamble.htmlChunks,
6026
6069
  headChunks = preamble.headChunks,
@@ -6061,17 +6104,23 @@ function flushCompletedQueues(request, destination) {
6061
6104
  renderState.scripts.clear();
6062
6105
  renderState.bulkPreloads.forEach(flushResource, destination);
6063
6106
  renderState.bulkPreloads.clear();
6107
+ if (htmlChunks || headChunks) {
6108
+ var shellId = "\u00ab" + resumableState.idPrefix + "R\u00bb";
6109
+ writeChunk(destination, blockingRenderChunkStart);
6110
+ writeChunk(destination, stringToChunk(escapeTextForBrowser(shellId)));
6111
+ writeChunk(destination, blockingRenderChunkEnd);
6112
+ }
6064
6113
  var hoistableChunks = renderState.hoistableChunks;
6065
6114
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
6066
6115
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
6067
6116
  for (
6068
- renderState = hoistableChunks.length = 0;
6069
- renderState < completedPreambleSegments.length;
6070
- renderState++
6117
+ resumableState = hoistableChunks.length = 0;
6118
+ resumableState < completedPreambleSegments.length;
6119
+ resumableState++
6071
6120
  ) {
6072
- var segments = completedPreambleSegments[renderState];
6073
- for (preamble = 0; preamble < segments.length; preamble++)
6074
- flushSegment(request, destination, segments[preamble], null);
6121
+ var segments = completedPreambleSegments[resumableState];
6122
+ for (renderState = 0; renderState < segments.length; renderState++)
6123
+ flushSegment(request, destination, segments[renderState], null);
6075
6124
  }
6076
6125
  var preamble$jscomp$0 = request.renderState.preamble,
6077
6126
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -6087,11 +6136,26 @@ function flushCompletedQueues(request, destination) {
6087
6136
  writeChunk(destination, bodyChunks[completedPreambleSegments]);
6088
6137
  flushSegment(request, destination, completedRootSegment, null);
6089
6138
  request.completedRootSegment = null;
6090
- writeBootstrap(destination, request.renderState);
6139
+ var resumableState$jscomp$0 = request.resumableState,
6140
+ renderState$jscomp$0 = request.renderState,
6141
+ preamble$jscomp$1 = renderState$jscomp$0.preamble;
6142
+ if (
6143
+ (preamble$jscomp$1.htmlChunks || preamble$jscomp$1.headChunks) &&
6144
+ 0 === (resumableState$jscomp$0.instructions & 32)
6145
+ ) {
6146
+ var bootstrapChunks = renderState$jscomp$0.bootstrapChunks;
6147
+ bootstrapChunks.push(startChunkForTag("template"));
6148
+ pushCompletedShellIdAttribute(
6149
+ bootstrapChunks,
6150
+ resumableState$jscomp$0
6151
+ );
6152
+ bootstrapChunks.push(endOfStartTag, endChunkForTag("template"));
6153
+ }
6154
+ writeBootstrap(destination, renderState$jscomp$0);
6091
6155
  }
6092
- var renderState$jscomp$0 = request.renderState;
6156
+ var renderState$jscomp$1 = request.renderState;
6093
6157
  completedRootSegment = 0;
6094
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
6158
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
6095
6159
  for (
6096
6160
  completedRootSegment = 0;
6097
6161
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -6099,21 +6163,21 @@ function flushCompletedQueues(request, destination) {
6099
6163
  )
6100
6164
  writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
6101
6165
  viewportChunks$jscomp$0.length = 0;
6102
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
6103
- renderState$jscomp$0.preconnects.clear();
6104
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
6105
- renderState$jscomp$0.fontPreloads.clear();
6106
- renderState$jscomp$0.highImagePreloads.forEach(
6166
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
6167
+ renderState$jscomp$1.preconnects.clear();
6168
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
6169
+ renderState$jscomp$1.fontPreloads.clear();
6170
+ renderState$jscomp$1.highImagePreloads.forEach(
6107
6171
  flushResource,
6108
6172
  destination
6109
6173
  );
6110
- renderState$jscomp$0.highImagePreloads.clear();
6111
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
6112
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
6113
- renderState$jscomp$0.scripts.clear();
6114
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
6115
- renderState$jscomp$0.bulkPreloads.clear();
6116
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
6174
+ renderState$jscomp$1.highImagePreloads.clear();
6175
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
6176
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
6177
+ renderState$jscomp$1.scripts.clear();
6178
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
6179
+ renderState$jscomp$1.bulkPreloads.clear();
6180
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
6117
6181
  for (
6118
6182
  completedRootSegment = 0;
6119
6183
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -6124,35 +6188,36 @@ function flushCompletedQueues(request, destination) {
6124
6188
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
6125
6189
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
6126
6190
  var boundary = clientRenderedBoundaries[i];
6127
- renderState$jscomp$0 = destination;
6128
- var resumableState = request.resumableState,
6129
- renderState$jscomp$1 = request.renderState,
6191
+ renderState$jscomp$1 = destination;
6192
+ var resumableState$jscomp$1 = request.resumableState,
6193
+ renderState$jscomp$2 = request.renderState,
6130
6194
  id = boundary.rootSegmentID,
6131
6195
  errorDigest = boundary.errorDigest;
6132
6196
  writeChunk(
6133
- renderState$jscomp$0,
6134
- renderState$jscomp$1.startInlineScript
6197
+ renderState$jscomp$1,
6198
+ renderState$jscomp$2.startInlineScript
6135
6199
  );
6136
- 0 === (resumableState.instructions & 4)
6137
- ? ((resumableState.instructions |= 4),
6138
- writeChunk(renderState$jscomp$0, clientRenderScript1Full))
6139
- : writeChunk(renderState$jscomp$0, clientRenderScript1Partial);
6140
- writeChunk(renderState$jscomp$0, renderState$jscomp$1.boundaryPrefix);
6141
- writeChunk(renderState$jscomp$0, stringToChunk(id.toString(16)));
6142
- writeChunk(renderState$jscomp$0, clientRenderScript1A);
6200
+ writeChunk(renderState$jscomp$1, endOfStartTag);
6201
+ 0 === (resumableState$jscomp$1.instructions & 4)
6202
+ ? ((resumableState$jscomp$1.instructions |= 4),
6203
+ writeChunk(renderState$jscomp$1, clientRenderScript1Full))
6204
+ : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
6205
+ writeChunk(renderState$jscomp$1, renderState$jscomp$2.boundaryPrefix);
6206
+ writeChunk(renderState$jscomp$1, stringToChunk(id.toString(16)));
6207
+ writeChunk(renderState$jscomp$1, clientRenderScript1A);
6143
6208
  errorDigest &&
6144
6209
  (writeChunk(
6145
- renderState$jscomp$0,
6210
+ renderState$jscomp$1,
6146
6211
  clientRenderErrorScriptArgInterstitial
6147
6212
  ),
6148
6213
  writeChunk(
6149
- renderState$jscomp$0,
6214
+ renderState$jscomp$1,
6150
6215
  stringToChunk(
6151
6216
  escapeJSStringsForInstructionScripts(errorDigest || "")
6152
6217
  )
6153
6218
  ));
6154
6219
  var JSCompiler_inline_result = writeChunkAndReturn(
6155
- renderState$jscomp$0,
6220
+ renderState$jscomp$1,
6156
6221
  clientRenderScriptEnd
6157
6222
  );
6158
6223
  if (!JSCompiler_inline_result) {
@@ -6318,11 +6383,11 @@ function abort(request, reason) {
6318
6383
  }
6319
6384
  function ensureCorrectIsomorphicReactVersion() {
6320
6385
  var isomorphicReactPackageVersion = React.version;
6321
- if ("19.2.0-canary-197d6a04-20250424" !== isomorphicReactPackageVersion)
6386
+ if ("19.2.0-canary-143d3e1b-20250425" !== isomorphicReactPackageVersion)
6322
6387
  throw Error(
6323
6388
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6324
6389
  (isomorphicReactPackageVersion +
6325
- "\n - react-dom: 19.2.0-canary-197d6a04-20250424\nLearn more: https://react.dev/warnings/version-mismatch")
6390
+ "\n - react-dom: 19.2.0-canary-143d3e1b-20250425\nLearn more: https://react.dev/warnings/version-mismatch")
6326
6391
  );
6327
6392
  }
6328
6393
  ensureCorrectIsomorphicReactVersion();
@@ -6468,4 +6533,4 @@ exports.renderToReadableStream = function (children, options) {
6468
6533
  startWork(request);
6469
6534
  });
6470
6535
  };
6471
- exports.version = "19.2.0-canary-197d6a04-20250424";
6536
+ exports.version = "19.2.0-canary-143d3e1b-20250425";