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.
@@ -804,7 +804,7 @@
804
804
  void 0 === nonce
805
805
  ? startInlineScript
806
806
  : stringToPrecomputedChunk(
807
- '<script nonce="' + escapeTextForBrowser(nonce) + '">'
807
+ '<script nonce="' + escapeTextForBrowser(nonce) + '"'
808
808
  ),
809
809
  idPrefix = resumableState.idPrefix;
810
810
  externalRuntimeConfig = [];
@@ -812,13 +812,15 @@
812
812
  bootstrapScripts = resumableState.bootstrapScripts,
813
813
  bootstrapModules = resumableState.bootstrapModules;
814
814
  void 0 !== bootstrapScriptContent &&
815
+ (externalRuntimeConfig.push(inlineScriptWithNonce),
816
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState),
815
817
  externalRuntimeConfig.push(
816
- inlineScriptWithNonce,
818
+ endOfStartTag,
817
819
  stringToChunk(
818
820
  escapeEntireInlineScriptContent(bootstrapScriptContent)
819
821
  ),
820
822
  endInlineScript
821
- );
823
+ ));
822
824
  bootstrapScriptContent = [];
823
825
  void 0 !== importMap &&
824
826
  (bootstrapScriptContent.push(importMapScriptStart),
@@ -915,23 +917,28 @@
915
917
  );
916
918
  externalRuntimeConfig.push(
917
919
  startScriptSrc,
918
- stringToChunk(escapeTextForBrowser(inlineScriptWithNonce))
920
+ stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
921
+ attributeEnd
919
922
  );
920
923
  nonce &&
921
924
  externalRuntimeConfig.push(
922
925
  scriptNonce,
923
- stringToChunk(escapeTextForBrowser(nonce))
926
+ stringToChunk(escapeTextForBrowser(nonce)),
927
+ attributeEnd
924
928
  );
925
929
  "string" === typeof bootstrapScriptContent &&
926
930
  externalRuntimeConfig.push(
927
931
  scriptIntegirty,
928
- stringToChunk(escapeTextForBrowser(bootstrapScriptContent))
932
+ stringToChunk(escapeTextForBrowser(bootstrapScriptContent)),
933
+ attributeEnd
929
934
  );
930
935
  "string" === typeof idPrefix &&
931
936
  externalRuntimeConfig.push(
932
937
  scriptCrossOrigin,
933
- stringToChunk(escapeTextForBrowser(idPrefix))
938
+ stringToChunk(escapeTextForBrowser(idPrefix)),
939
+ attributeEnd
934
940
  );
941
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState);
935
942
  externalRuntimeConfig.push(endAsyncScript);
936
943
  }
937
944
  if (void 0 !== bootstrapModules)
@@ -969,23 +976,31 @@
969
976
  ),
970
977
  externalRuntimeConfig.push(
971
978
  startModuleSrc,
972
- stringToChunk(escapeTextForBrowser(maxHeadersLength))
979
+ stringToChunk(escapeTextForBrowser(maxHeadersLength)),
980
+ attributeEnd
973
981
  ),
974
982
  nonce &&
975
983
  externalRuntimeConfig.push(
976
984
  scriptNonce,
977
- stringToChunk(escapeTextForBrowser(nonce))
985
+ stringToChunk(escapeTextForBrowser(nonce)),
986
+ attributeEnd
978
987
  ),
979
988
  "string" === typeof idPrefix &&
980
989
  externalRuntimeConfig.push(
981
990
  scriptIntegirty,
982
- stringToChunk(escapeTextForBrowser(idPrefix))
991
+ stringToChunk(escapeTextForBrowser(idPrefix)),
992
+ attributeEnd
983
993
  ),
984
994
  "string" === typeof inlineScriptWithNonce &&
985
995
  externalRuntimeConfig.push(
986
996
  scriptCrossOrigin,
987
- stringToChunk(escapeTextForBrowser(inlineScriptWithNonce))
997
+ stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
998
+ attributeEnd
988
999
  ),
1000
+ pushCompletedShellIdAttribute(
1001
+ externalRuntimeConfig,
1002
+ resumableState
1003
+ ),
989
1004
  externalRuntimeConfig.push(endAsyncScript);
990
1005
  return onHeaders;
991
1006
  }
@@ -1634,13 +1649,26 @@
1634
1649
  return content;
1635
1650
  }
1636
1651
  function injectFormReplayingRuntime(resumableState, renderState) {
1637
- (resumableState.instructions & 16) === NothingSent &&
1638
- ((resumableState.instructions |= 16),
1639
- renderState.bootstrapChunks.unshift(
1640
- renderState.startInlineScript,
1641
- formReplayingRuntimeScript,
1642
- endInlineScript
1643
- ));
1652
+ if ((resumableState.instructions & 16) === NothingSent) {
1653
+ resumableState.instructions |= 16;
1654
+ var preamble = renderState.preamble,
1655
+ bootstrapChunks = renderState.bootstrapChunks;
1656
+ (preamble.htmlChunks || preamble.headChunks) &&
1657
+ 0 === bootstrapChunks.length
1658
+ ? (bootstrapChunks.push(renderState.startInlineScript),
1659
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1660
+ bootstrapChunks.push(
1661
+ endOfStartTag,
1662
+ formReplayingRuntimeScript,
1663
+ endInlineScript
1664
+ ))
1665
+ : bootstrapChunks.unshift(
1666
+ renderState.startInlineScript,
1667
+ endOfStartTag,
1668
+ formReplayingRuntimeScript,
1669
+ endInlineScript
1670
+ );
1671
+ }
1644
1672
  }
1645
1673
  function pushLinkImpl(target, props) {
1646
1674
  target.push(startChunkForTag("link"));
@@ -3390,6 +3418,17 @@
3390
3418
  styleQueue.sheets.forEach(preloadLateStyle, this);
3391
3419
  styleQueue.sheets.clear();
3392
3420
  }
3421
+ function pushCompletedShellIdAttribute(target, resumableState) {
3422
+ (resumableState.instructions & SentCompletedShellId) === NothingSent &&
3423
+ ((resumableState.instructions |= SentCompletedShellId),
3424
+ target.push(
3425
+ completedShellIdAttributeStart,
3426
+ stringToChunk(
3427
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb")
3428
+ ),
3429
+ attributeEnd
3430
+ ));
3431
+ }
3393
3432
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
3394
3433
  writeChunk(destination, arrayFirstOpenBracket);
3395
3434
  var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
@@ -7291,6 +7330,7 @@
7291
7330
  var requiresStyleInsertion = request.stylesToHoist;
7292
7331
  request.stylesToHoist = !1;
7293
7332
  writeChunk(destination, request.startInlineScript);
7333
+ writeChunk(destination, endOfStartTag);
7294
7334
  requiresStyleInsertion
7295
7335
  ? (completedSegments.instructions & SentCompleteBoundaryFunction) ===
7296
7336
  NothingSent
@@ -7357,6 +7397,7 @@
7357
7397
  boundary = request.resumableState;
7358
7398
  request = request.renderState;
7359
7399
  writeChunk(destination, request.startInlineScript);
7400
+ writeChunk(destination, endOfStartTag);
7360
7401
  (boundary.instructions & SentCompleteSegmentFunction) === NothingSent
7361
7402
  ? ((boundary.instructions |= SentCompleteSegmentFunction),
7362
7403
  writeChunk(destination, completeSegmentScript1Full))
@@ -7381,7 +7422,8 @@
7381
7422
  if (completedRootSegment.status === POSTPONED) return;
7382
7423
  var completedPreambleSegments = request.completedPreambleSegments;
7383
7424
  if (null === completedPreambleSegments) return;
7384
- var renderState = request.renderState,
7425
+ var resumableState = request.resumableState,
7426
+ renderState = request.renderState,
7385
7427
  preamble = renderState.preamble,
7386
7428
  htmlChunks = preamble.htmlChunks,
7387
7429
  headChunks = preamble.headChunks,
@@ -7438,6 +7480,15 @@
7438
7480
  renderState.scripts.clear();
7439
7481
  renderState.bulkPreloads.forEach(flushResource, destination);
7440
7482
  renderState.bulkPreloads.clear();
7483
+ if (htmlChunks || headChunks) {
7484
+ var shellId = "\u00ab" + resumableState.idPrefix + "R\u00bb";
7485
+ writeChunk(destination, blockingRenderChunkStart);
7486
+ writeChunk(
7487
+ destination,
7488
+ stringToChunk(escapeTextForBrowser(shellId))
7489
+ );
7490
+ writeChunk(destination, blockingRenderChunkEnd);
7491
+ }
7441
7492
  var hoistableChunks = renderState.hoistableChunks;
7442
7493
  for (
7443
7494
  i$jscomp$0 = 0;
@@ -7446,13 +7497,17 @@
7446
7497
  )
7447
7498
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
7448
7499
  for (
7449
- renderState = hoistableChunks.length = 0;
7450
- renderState < completedPreambleSegments.length;
7451
- renderState++
7500
+ resumableState = hoistableChunks.length = 0;
7501
+ resumableState < completedPreambleSegments.length;
7502
+ resumableState++
7452
7503
  ) {
7453
- var segments = completedPreambleSegments[renderState];
7454
- for (preamble = 0; preamble < segments.length; preamble++)
7455
- flushSegment(request, destination, segments[preamble], null);
7504
+ var segments = completedPreambleSegments[resumableState];
7505
+ for (
7506
+ renderState = 0;
7507
+ renderState < segments.length;
7508
+ renderState++
7509
+ )
7510
+ flushSegment(request, destination, segments[renderState], null);
7456
7511
  }
7457
7512
  var preamble$jscomp$0 = request.renderState.preamble,
7458
7513
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -7468,11 +7523,27 @@
7468
7523
  writeChunk(destination, bodyChunks[completedPreambleSegments]);
7469
7524
  flushSegment(request, destination, completedRootSegment, null);
7470
7525
  request.completedRootSegment = null;
7471
- writeBootstrap(destination, request.renderState);
7526
+ var resumableState$jscomp$0 = request.resumableState,
7527
+ renderState$jscomp$0 = request.renderState,
7528
+ preamble$jscomp$1 = renderState$jscomp$0.preamble;
7529
+ if (
7530
+ (preamble$jscomp$1.htmlChunks || preamble$jscomp$1.headChunks) &&
7531
+ (resumableState$jscomp$0.instructions & SentCompletedShellId) ===
7532
+ NothingSent
7533
+ ) {
7534
+ var bootstrapChunks = renderState$jscomp$0.bootstrapChunks;
7535
+ bootstrapChunks.push(startChunkForTag("template"));
7536
+ pushCompletedShellIdAttribute(
7537
+ bootstrapChunks,
7538
+ resumableState$jscomp$0
7539
+ );
7540
+ bootstrapChunks.push(endOfStartTag, endChunkForTag("template"));
7541
+ }
7542
+ writeBootstrap(destination, renderState$jscomp$0);
7472
7543
  }
7473
- var renderState$jscomp$0 = request.renderState;
7544
+ var renderState$jscomp$1 = request.renderState;
7474
7545
  completedRootSegment = 0;
7475
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
7546
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
7476
7547
  for (
7477
7548
  completedRootSegment = 0;
7478
7549
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -7483,21 +7554,21 @@
7483
7554
  viewportChunks$jscomp$0[completedRootSegment]
7484
7555
  );
7485
7556
  viewportChunks$jscomp$0.length = 0;
7486
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
7487
- renderState$jscomp$0.preconnects.clear();
7488
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
7489
- renderState$jscomp$0.fontPreloads.clear();
7490
- renderState$jscomp$0.highImagePreloads.forEach(
7557
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
7558
+ renderState$jscomp$1.preconnects.clear();
7559
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
7560
+ renderState$jscomp$1.fontPreloads.clear();
7561
+ renderState$jscomp$1.highImagePreloads.forEach(
7491
7562
  flushResource,
7492
7563
  destination
7493
7564
  );
7494
- renderState$jscomp$0.highImagePreloads.clear();
7495
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
7496
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
7497
- renderState$jscomp$0.scripts.clear();
7498
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
7499
- renderState$jscomp$0.bulkPreloads.clear();
7500
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
7565
+ renderState$jscomp$1.highImagePreloads.clear();
7566
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
7567
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
7568
+ renderState$jscomp$1.scripts.clear();
7569
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
7570
+ renderState$jscomp$1.bulkPreloads.clear();
7571
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
7501
7572
  for (
7502
7573
  completedRootSegment = 0;
7503
7574
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -7511,29 +7582,32 @@
7511
7582
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
7512
7583
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
7513
7584
  var boundary = clientRenderedBoundaries[i];
7514
- renderState$jscomp$0 = destination;
7515
- var resumableState = request.resumableState,
7516
- renderState$jscomp$1 = request.renderState,
7585
+ renderState$jscomp$1 = destination;
7586
+ var resumableState$jscomp$1 = request.resumableState,
7587
+ renderState$jscomp$2 = request.renderState,
7517
7588
  id = boundary.rootSegmentID,
7518
7589
  errorDigest = boundary.errorDigest,
7519
7590
  errorMessage = boundary.errorMessage,
7520
7591
  errorStack = boundary.errorStack,
7521
7592
  errorComponentStack = boundary.errorComponentStack;
7522
7593
  writeChunk(
7523
- renderState$jscomp$0,
7524
- renderState$jscomp$1.startInlineScript
7594
+ renderState$jscomp$1,
7595
+ renderState$jscomp$2.startInlineScript
7525
7596
  );
7526
- (resumableState.instructions & SentClientRenderFunction) ===
7597
+ writeChunk(renderState$jscomp$1, endOfStartTag);
7598
+ (resumableState$jscomp$1.instructions &
7599
+ SentClientRenderFunction) ===
7527
7600
  NothingSent
7528
- ? ((resumableState.instructions |= SentClientRenderFunction),
7529
- writeChunk(renderState$jscomp$0, clientRenderScript1Full))
7530
- : writeChunk(renderState$jscomp$0, clientRenderScript1Partial);
7601
+ ? ((resumableState$jscomp$1.instructions |=
7602
+ SentClientRenderFunction),
7603
+ writeChunk(renderState$jscomp$1, clientRenderScript1Full))
7604
+ : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
7531
7605
  writeChunk(
7532
- renderState$jscomp$0,
7533
- renderState$jscomp$1.boundaryPrefix
7606
+ renderState$jscomp$1,
7607
+ renderState$jscomp$2.boundaryPrefix
7534
7608
  );
7535
- writeChunk(renderState$jscomp$0, stringToChunk(id.toString(16)));
7536
- writeChunk(renderState$jscomp$0, clientRenderScript1A);
7609
+ writeChunk(renderState$jscomp$1, stringToChunk(id.toString(16)));
7610
+ writeChunk(renderState$jscomp$1, clientRenderScript1A);
7537
7611
  if (
7538
7612
  errorDigest ||
7539
7613
  errorMessage ||
@@ -7541,50 +7615,50 @@
7541
7615
  errorComponentStack
7542
7616
  )
7543
7617
  writeChunk(
7544
- renderState$jscomp$0,
7618
+ renderState$jscomp$1,
7545
7619
  clientRenderErrorScriptArgInterstitial
7546
7620
  ),
7547
7621
  writeChunk(
7548
- renderState$jscomp$0,
7622
+ renderState$jscomp$1,
7549
7623
  stringToChunk(
7550
7624
  escapeJSStringsForInstructionScripts(errorDigest || "")
7551
7625
  )
7552
7626
  );
7553
7627
  if (errorMessage || errorStack || errorComponentStack)
7554
7628
  writeChunk(
7555
- renderState$jscomp$0,
7629
+ renderState$jscomp$1,
7556
7630
  clientRenderErrorScriptArgInterstitial
7557
7631
  ),
7558
7632
  writeChunk(
7559
- renderState$jscomp$0,
7633
+ renderState$jscomp$1,
7560
7634
  stringToChunk(
7561
7635
  escapeJSStringsForInstructionScripts(errorMessage || "")
7562
7636
  )
7563
7637
  );
7564
7638
  if (errorStack || errorComponentStack)
7565
7639
  writeChunk(
7566
- renderState$jscomp$0,
7640
+ renderState$jscomp$1,
7567
7641
  clientRenderErrorScriptArgInterstitial
7568
7642
  ),
7569
7643
  writeChunk(
7570
- renderState$jscomp$0,
7644
+ renderState$jscomp$1,
7571
7645
  stringToChunk(
7572
7646
  escapeJSStringsForInstructionScripts(errorStack || "")
7573
7647
  )
7574
7648
  );
7575
7649
  errorComponentStack &&
7576
7650
  (writeChunk(
7577
- renderState$jscomp$0,
7651
+ renderState$jscomp$1,
7578
7652
  clientRenderErrorScriptArgInterstitial
7579
7653
  ),
7580
7654
  writeChunk(
7581
- renderState$jscomp$0,
7655
+ renderState$jscomp$1,
7582
7656
  stringToChunk(
7583
7657
  escapeJSStringsForInstructionScripts(errorComponentStack)
7584
7658
  )
7585
7659
  ));
7586
7660
  var JSCompiler_inline_result = writeChunkAndReturn(
7587
- renderState$jscomp$0,
7661
+ renderState$jscomp$1,
7588
7662
  clientRenderScriptEnd
7589
7663
  );
7590
7664
  if (!JSCompiler_inline_result) {
@@ -7765,11 +7839,11 @@
7765
7839
  }
7766
7840
  function ensureCorrectIsomorphicReactVersion() {
7767
7841
  var isomorphicReactPackageVersion = React.version;
7768
- if ("19.2.0-canary-197d6a04-20250424" !== isomorphicReactPackageVersion)
7842
+ if ("19.2.0-canary-143d3e1b-20250425" !== isomorphicReactPackageVersion)
7769
7843
  throw Error(
7770
7844
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
7771
7845
  (isomorphicReactPackageVersion +
7772
- "\n - react-dom: 19.2.0-canary-197d6a04-20250424\nLearn more: https://react.dev/warnings/version-mismatch")
7846
+ "\n - react-dom: 19.2.0-canary-143d3e1b-20250425\nLearn more: https://react.dev/warnings/version-mismatch")
7773
7847
  );
7774
7848
  }
7775
7849
  var React = require("react"),
@@ -8852,18 +8926,19 @@
8852
8926
  SentCompleteBoundaryFunction = 2,
8853
8927
  SentClientRenderFunction = 4,
8854
8928
  SentStyleInsertionFunction = 8,
8929
+ SentCompletedShellId = 32,
8855
8930
  EXISTS = null,
8856
8931
  PRELOAD_NO_CREDS = [];
8857
8932
  Object.freeze(PRELOAD_NO_CREDS);
8858
8933
  stringToPrecomputedChunk('"></template>');
8859
- var startInlineScript = stringToPrecomputedChunk("<script>"),
8934
+ var startInlineScript = stringToPrecomputedChunk("<script"),
8860
8935
  endInlineScript = stringToPrecomputedChunk("\x3c/script>"),
8861
8936
  startScriptSrc = stringToPrecomputedChunk('<script src="'),
8862
8937
  startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'),
8863
- scriptNonce = stringToPrecomputedChunk('" nonce="'),
8864
- scriptIntegirty = stringToPrecomputedChunk('" integrity="'),
8865
- scriptCrossOrigin = stringToPrecomputedChunk('" crossorigin="'),
8866
- endAsyncScript = stringToPrecomputedChunk('" async="">\x3c/script>'),
8938
+ scriptNonce = stringToPrecomputedChunk(' nonce="'),
8939
+ scriptIntegirty = stringToPrecomputedChunk(' integrity="'),
8940
+ scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin="'),
8941
+ endAsyncScript = stringToPrecomputedChunk(' async="">\x3c/script>'),
8867
8942
  scriptRegex = /(<\/|<)(s)(cript)/gi,
8868
8943
  importMapScriptStart = stringToPrecomputedChunk(
8869
8944
  '<script type="importmap">'
@@ -9040,6 +9115,13 @@
9040
9115
  spaceSeparator = stringToPrecomputedChunk(" "),
9041
9116
  styleTagResourceOpen3 = stringToPrecomputedChunk('">'),
9042
9117
  styleTagResourceClose = stringToPrecomputedChunk("</style>"),
9118
+ blockingRenderChunkStart = stringToPrecomputedChunk(
9119
+ '<link rel="expect" href="#'
9120
+ ),
9121
+ blockingRenderChunkEnd = stringToPrecomputedChunk(
9122
+ '" blocking="render"/>'
9123
+ ),
9124
+ completedShellIdAttributeStart = stringToPrecomputedChunk(' id="'),
9043
9125
  arrayFirstOpenBracket = stringToPrecomputedChunk("["),
9044
9126
  arraySubsequentOpenBracket = stringToPrecomputedChunk(",["),
9045
9127
  arrayInterstitial = stringToPrecomputedChunk(","),
@@ -9439,5 +9521,5 @@
9439
9521
  startWork(request);
9440
9522
  });
9441
9523
  };
9442
- exports.version = "19.2.0-canary-197d6a04-20250424";
9524
+ exports.version = "19.2.0-canary-143d3e1b-20250425";
9443
9525
  })();