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.
@@ -808,7 +808,7 @@
808
808
  void 0 === nonce
809
809
  ? startInlineScript
810
810
  : stringToPrecomputedChunk(
811
- '<script nonce="' + escapeTextForBrowser(nonce) + '">'
811
+ '<script nonce="' + escapeTextForBrowser(nonce) + '"'
812
812
  ),
813
813
  idPrefix = resumableState.idPrefix;
814
814
  externalRuntimeConfig = [];
@@ -816,13 +816,15 @@
816
816
  bootstrapScripts = resumableState.bootstrapScripts,
817
817
  bootstrapModules = resumableState.bootstrapModules;
818
818
  void 0 !== bootstrapScriptContent &&
819
+ (externalRuntimeConfig.push(inlineScriptWithNonce),
820
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState),
819
821
  externalRuntimeConfig.push(
820
- inlineScriptWithNonce,
822
+ endOfStartTag,
821
823
  stringToChunk(
822
824
  escapeEntireInlineScriptContent(bootstrapScriptContent)
823
825
  ),
824
826
  endInlineScript
825
- );
827
+ ));
826
828
  bootstrapScriptContent = [];
827
829
  void 0 !== importMap &&
828
830
  (bootstrapScriptContent.push(importMapScriptStart),
@@ -919,23 +921,28 @@
919
921
  );
920
922
  externalRuntimeConfig.push(
921
923
  startScriptSrc,
922
- stringToChunk(escapeTextForBrowser(inlineScriptWithNonce))
924
+ stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
925
+ attributeEnd
923
926
  );
924
927
  nonce &&
925
928
  externalRuntimeConfig.push(
926
929
  scriptNonce,
927
- stringToChunk(escapeTextForBrowser(nonce))
930
+ stringToChunk(escapeTextForBrowser(nonce)),
931
+ attributeEnd
928
932
  );
929
933
  "string" === typeof bootstrapScriptContent &&
930
934
  externalRuntimeConfig.push(
931
935
  scriptIntegirty,
932
- stringToChunk(escapeTextForBrowser(bootstrapScriptContent))
936
+ stringToChunk(escapeTextForBrowser(bootstrapScriptContent)),
937
+ attributeEnd
933
938
  );
934
939
  "string" === typeof idPrefix &&
935
940
  externalRuntimeConfig.push(
936
941
  scriptCrossOrigin,
937
- stringToChunk(escapeTextForBrowser(idPrefix))
942
+ stringToChunk(escapeTextForBrowser(idPrefix)),
943
+ attributeEnd
938
944
  );
945
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState);
939
946
  externalRuntimeConfig.push(endAsyncScript);
940
947
  }
941
948
  if (void 0 !== bootstrapModules)
@@ -973,23 +980,31 @@
973
980
  ),
974
981
  externalRuntimeConfig.push(
975
982
  startModuleSrc,
976
- stringToChunk(escapeTextForBrowser(maxHeadersLength))
983
+ stringToChunk(escapeTextForBrowser(maxHeadersLength)),
984
+ attributeEnd
977
985
  ),
978
986
  nonce &&
979
987
  externalRuntimeConfig.push(
980
988
  scriptNonce,
981
- stringToChunk(escapeTextForBrowser(nonce))
989
+ stringToChunk(escapeTextForBrowser(nonce)),
990
+ attributeEnd
982
991
  ),
983
992
  "string" === typeof idPrefix &&
984
993
  externalRuntimeConfig.push(
985
994
  scriptIntegirty,
986
- stringToChunk(escapeTextForBrowser(idPrefix))
995
+ stringToChunk(escapeTextForBrowser(idPrefix)),
996
+ attributeEnd
987
997
  ),
988
998
  "string" === typeof inlineScriptWithNonce &&
989
999
  externalRuntimeConfig.push(
990
1000
  scriptCrossOrigin,
991
- stringToChunk(escapeTextForBrowser(inlineScriptWithNonce))
1001
+ stringToChunk(escapeTextForBrowser(inlineScriptWithNonce)),
1002
+ attributeEnd
992
1003
  ),
1004
+ pushCompletedShellIdAttribute(
1005
+ externalRuntimeConfig,
1006
+ resumableState
1007
+ ),
993
1008
  externalRuntimeConfig.push(endAsyncScript);
994
1009
  return onHeaders;
995
1010
  }
@@ -1638,13 +1653,26 @@
1638
1653
  return content;
1639
1654
  }
1640
1655
  function injectFormReplayingRuntime(resumableState, renderState) {
1641
- (resumableState.instructions & 16) === NothingSent &&
1642
- ((resumableState.instructions |= 16),
1643
- renderState.bootstrapChunks.unshift(
1644
- renderState.startInlineScript,
1645
- formReplayingRuntimeScript,
1646
- endInlineScript
1647
- ));
1656
+ if ((resumableState.instructions & 16) === NothingSent) {
1657
+ resumableState.instructions |= 16;
1658
+ var preamble = renderState.preamble,
1659
+ bootstrapChunks = renderState.bootstrapChunks;
1660
+ (preamble.htmlChunks || preamble.headChunks) &&
1661
+ 0 === bootstrapChunks.length
1662
+ ? (bootstrapChunks.push(renderState.startInlineScript),
1663
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1664
+ bootstrapChunks.push(
1665
+ endOfStartTag,
1666
+ formReplayingRuntimeScript,
1667
+ endInlineScript
1668
+ ))
1669
+ : bootstrapChunks.unshift(
1670
+ renderState.startInlineScript,
1671
+ endOfStartTag,
1672
+ formReplayingRuntimeScript,
1673
+ endInlineScript
1674
+ );
1675
+ }
1648
1676
  }
1649
1677
  function pushLinkImpl(target, props) {
1650
1678
  target.push(startChunkForTag("link"));
@@ -3394,6 +3422,17 @@
3394
3422
  styleQueue.sheets.forEach(preloadLateStyle, this);
3395
3423
  styleQueue.sheets.clear();
3396
3424
  }
3425
+ function pushCompletedShellIdAttribute(target, resumableState) {
3426
+ (resumableState.instructions & SentCompletedShellId) === NothingSent &&
3427
+ ((resumableState.instructions |= SentCompletedShellId),
3428
+ target.push(
3429
+ completedShellIdAttributeStart,
3430
+ stringToChunk(
3431
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb")
3432
+ ),
3433
+ attributeEnd
3434
+ ));
3435
+ }
3397
3436
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
3398
3437
  writeChunk(destination, arrayFirstOpenBracket);
3399
3438
  var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
@@ -7281,6 +7320,7 @@
7281
7320
  var requiresStyleInsertion = request.stylesToHoist;
7282
7321
  request.stylesToHoist = !1;
7283
7322
  writeChunk(destination, request.startInlineScript);
7323
+ writeChunk(destination, endOfStartTag);
7284
7324
  requiresStyleInsertion
7285
7325
  ? (completedSegments.instructions & SentCompleteBoundaryFunction) ===
7286
7326
  NothingSent
@@ -7347,6 +7387,7 @@
7347
7387
  boundary = request.resumableState;
7348
7388
  request = request.renderState;
7349
7389
  writeChunk(destination, request.startInlineScript);
7390
+ writeChunk(destination, endOfStartTag);
7350
7391
  (boundary.instructions & SentCompleteSegmentFunction) === NothingSent
7351
7392
  ? ((boundary.instructions |= SentCompleteSegmentFunction),
7352
7393
  writeChunk(destination, completeSegmentScript1Full))
@@ -7371,7 +7412,8 @@
7371
7412
  if (completedRootSegment.status === POSTPONED) return;
7372
7413
  var completedPreambleSegments = request.completedPreambleSegments;
7373
7414
  if (null === completedPreambleSegments) return;
7374
- var renderState = request.renderState,
7415
+ var resumableState = request.resumableState,
7416
+ renderState = request.renderState,
7375
7417
  preamble = renderState.preamble,
7376
7418
  htmlChunks = preamble.htmlChunks,
7377
7419
  headChunks = preamble.headChunks,
@@ -7428,6 +7470,15 @@
7428
7470
  renderState.scripts.clear();
7429
7471
  renderState.bulkPreloads.forEach(flushResource, destination);
7430
7472
  renderState.bulkPreloads.clear();
7473
+ if (htmlChunks || headChunks) {
7474
+ var shellId = "\u00ab" + resumableState.idPrefix + "R\u00bb";
7475
+ writeChunk(destination, blockingRenderChunkStart);
7476
+ writeChunk(
7477
+ destination,
7478
+ stringToChunk(escapeTextForBrowser(shellId))
7479
+ );
7480
+ writeChunk(destination, blockingRenderChunkEnd);
7481
+ }
7431
7482
  var hoistableChunks = renderState.hoistableChunks;
7432
7483
  for (
7433
7484
  i$jscomp$0 = 0;
@@ -7436,13 +7487,17 @@
7436
7487
  )
7437
7488
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
7438
7489
  for (
7439
- renderState = hoistableChunks.length = 0;
7440
- renderState < completedPreambleSegments.length;
7441
- renderState++
7490
+ resumableState = hoistableChunks.length = 0;
7491
+ resumableState < completedPreambleSegments.length;
7492
+ resumableState++
7442
7493
  ) {
7443
- var segments = completedPreambleSegments[renderState];
7444
- for (preamble = 0; preamble < segments.length; preamble++)
7445
- flushSegment(request, destination, segments[preamble], null);
7494
+ var segments = completedPreambleSegments[resumableState];
7495
+ for (
7496
+ renderState = 0;
7497
+ renderState < segments.length;
7498
+ renderState++
7499
+ )
7500
+ flushSegment(request, destination, segments[renderState], null);
7446
7501
  }
7447
7502
  var preamble$jscomp$0 = request.renderState.preamble,
7448
7503
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -7458,11 +7513,27 @@
7458
7513
  writeChunk(destination, bodyChunks[completedPreambleSegments]);
7459
7514
  flushSegment(request, destination, completedRootSegment, null);
7460
7515
  request.completedRootSegment = null;
7461
- writeBootstrap(destination, request.renderState);
7516
+ var resumableState$jscomp$0 = request.resumableState,
7517
+ renderState$jscomp$0 = request.renderState,
7518
+ preamble$jscomp$1 = renderState$jscomp$0.preamble;
7519
+ if (
7520
+ (preamble$jscomp$1.htmlChunks || preamble$jscomp$1.headChunks) &&
7521
+ (resumableState$jscomp$0.instructions & SentCompletedShellId) ===
7522
+ NothingSent
7523
+ ) {
7524
+ var bootstrapChunks = renderState$jscomp$0.bootstrapChunks;
7525
+ bootstrapChunks.push(startChunkForTag("template"));
7526
+ pushCompletedShellIdAttribute(
7527
+ bootstrapChunks,
7528
+ resumableState$jscomp$0
7529
+ );
7530
+ bootstrapChunks.push(endOfStartTag, endChunkForTag("template"));
7531
+ }
7532
+ writeBootstrap(destination, renderState$jscomp$0);
7462
7533
  }
7463
- var renderState$jscomp$0 = request.renderState;
7534
+ var renderState$jscomp$1 = request.renderState;
7464
7535
  completedRootSegment = 0;
7465
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
7536
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
7466
7537
  for (
7467
7538
  completedRootSegment = 0;
7468
7539
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -7473,21 +7544,21 @@
7473
7544
  viewportChunks$jscomp$0[completedRootSegment]
7474
7545
  );
7475
7546
  viewportChunks$jscomp$0.length = 0;
7476
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
7477
- renderState$jscomp$0.preconnects.clear();
7478
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
7479
- renderState$jscomp$0.fontPreloads.clear();
7480
- renderState$jscomp$0.highImagePreloads.forEach(
7547
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
7548
+ renderState$jscomp$1.preconnects.clear();
7549
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
7550
+ renderState$jscomp$1.fontPreloads.clear();
7551
+ renderState$jscomp$1.highImagePreloads.forEach(
7481
7552
  flushResource,
7482
7553
  destination
7483
7554
  );
7484
- renderState$jscomp$0.highImagePreloads.clear();
7485
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
7486
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
7487
- renderState$jscomp$0.scripts.clear();
7488
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
7489
- renderState$jscomp$0.bulkPreloads.clear();
7490
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
7555
+ renderState$jscomp$1.highImagePreloads.clear();
7556
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
7557
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
7558
+ renderState$jscomp$1.scripts.clear();
7559
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
7560
+ renderState$jscomp$1.bulkPreloads.clear();
7561
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
7491
7562
  for (
7492
7563
  completedRootSegment = 0;
7493
7564
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -7501,29 +7572,32 @@
7501
7572
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
7502
7573
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
7503
7574
  var boundary = clientRenderedBoundaries[i];
7504
- renderState$jscomp$0 = destination;
7505
- var resumableState = request.resumableState,
7506
- renderState$jscomp$1 = request.renderState,
7575
+ renderState$jscomp$1 = destination;
7576
+ var resumableState$jscomp$1 = request.resumableState,
7577
+ renderState$jscomp$2 = request.renderState,
7507
7578
  id = boundary.rootSegmentID,
7508
7579
  errorDigest = boundary.errorDigest,
7509
7580
  errorMessage = boundary.errorMessage,
7510
7581
  errorStack = boundary.errorStack,
7511
7582
  errorComponentStack = boundary.errorComponentStack;
7512
7583
  writeChunk(
7513
- renderState$jscomp$0,
7514
- renderState$jscomp$1.startInlineScript
7584
+ renderState$jscomp$1,
7585
+ renderState$jscomp$2.startInlineScript
7515
7586
  );
7516
- (resumableState.instructions & SentClientRenderFunction) ===
7587
+ writeChunk(renderState$jscomp$1, endOfStartTag);
7588
+ (resumableState$jscomp$1.instructions &
7589
+ SentClientRenderFunction) ===
7517
7590
  NothingSent
7518
- ? ((resumableState.instructions |= SentClientRenderFunction),
7519
- writeChunk(renderState$jscomp$0, clientRenderScript1Full))
7520
- : writeChunk(renderState$jscomp$0, clientRenderScript1Partial);
7591
+ ? ((resumableState$jscomp$1.instructions |=
7592
+ SentClientRenderFunction),
7593
+ writeChunk(renderState$jscomp$1, clientRenderScript1Full))
7594
+ : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
7521
7595
  writeChunk(
7522
- renderState$jscomp$0,
7523
- renderState$jscomp$1.boundaryPrefix
7596
+ renderState$jscomp$1,
7597
+ renderState$jscomp$2.boundaryPrefix
7524
7598
  );
7525
- writeChunk(renderState$jscomp$0, stringToChunk(id.toString(16)));
7526
- writeChunk(renderState$jscomp$0, clientRenderScript1A);
7599
+ writeChunk(renderState$jscomp$1, stringToChunk(id.toString(16)));
7600
+ writeChunk(renderState$jscomp$1, clientRenderScript1A);
7527
7601
  if (
7528
7602
  errorDigest ||
7529
7603
  errorMessage ||
@@ -7531,50 +7605,50 @@
7531
7605
  errorComponentStack
7532
7606
  )
7533
7607
  writeChunk(
7534
- renderState$jscomp$0,
7608
+ renderState$jscomp$1,
7535
7609
  clientRenderErrorScriptArgInterstitial
7536
7610
  ),
7537
7611
  writeChunk(
7538
- renderState$jscomp$0,
7612
+ renderState$jscomp$1,
7539
7613
  stringToChunk(
7540
7614
  escapeJSStringsForInstructionScripts(errorDigest || "")
7541
7615
  )
7542
7616
  );
7543
7617
  if (errorMessage || errorStack || errorComponentStack)
7544
7618
  writeChunk(
7545
- renderState$jscomp$0,
7619
+ renderState$jscomp$1,
7546
7620
  clientRenderErrorScriptArgInterstitial
7547
7621
  ),
7548
7622
  writeChunk(
7549
- renderState$jscomp$0,
7623
+ renderState$jscomp$1,
7550
7624
  stringToChunk(
7551
7625
  escapeJSStringsForInstructionScripts(errorMessage || "")
7552
7626
  )
7553
7627
  );
7554
7628
  if (errorStack || errorComponentStack)
7555
7629
  writeChunk(
7556
- renderState$jscomp$0,
7630
+ renderState$jscomp$1,
7557
7631
  clientRenderErrorScriptArgInterstitial
7558
7632
  ),
7559
7633
  writeChunk(
7560
- renderState$jscomp$0,
7634
+ renderState$jscomp$1,
7561
7635
  stringToChunk(
7562
7636
  escapeJSStringsForInstructionScripts(errorStack || "")
7563
7637
  )
7564
7638
  );
7565
7639
  errorComponentStack &&
7566
7640
  (writeChunk(
7567
- renderState$jscomp$0,
7641
+ renderState$jscomp$1,
7568
7642
  clientRenderErrorScriptArgInterstitial
7569
7643
  ),
7570
7644
  writeChunk(
7571
- renderState$jscomp$0,
7645
+ renderState$jscomp$1,
7572
7646
  stringToChunk(
7573
7647
  escapeJSStringsForInstructionScripts(errorComponentStack)
7574
7648
  )
7575
7649
  ));
7576
7650
  var JSCompiler_inline_result = writeChunkAndReturn(
7577
- renderState$jscomp$0,
7651
+ renderState$jscomp$1,
7578
7652
  clientRenderScriptEnd
7579
7653
  );
7580
7654
  if (!JSCompiler_inline_result) {
@@ -7742,11 +7816,11 @@
7742
7816
  }
7743
7817
  function ensureCorrectIsomorphicReactVersion() {
7744
7818
  var isomorphicReactPackageVersion = React.version;
7745
- if ("19.2.0-canary-197d6a04-20250424" !== isomorphicReactPackageVersion)
7819
+ if ("19.2.0-canary-143d3e1b-20250425" !== isomorphicReactPackageVersion)
7746
7820
  throw Error(
7747
7821
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
7748
7822
  (isomorphicReactPackageVersion +
7749
- "\n - react-dom: 19.2.0-canary-197d6a04-20250424\nLearn more: https://react.dev/warnings/version-mismatch")
7823
+ "\n - react-dom: 19.2.0-canary-143d3e1b-20250425\nLearn more: https://react.dev/warnings/version-mismatch")
7750
7824
  );
7751
7825
  }
7752
7826
  var React = require("react"),
@@ -8835,18 +8909,19 @@
8835
8909
  SentCompleteBoundaryFunction = 2,
8836
8910
  SentClientRenderFunction = 4,
8837
8911
  SentStyleInsertionFunction = 8,
8912
+ SentCompletedShellId = 32,
8838
8913
  EXISTS = null,
8839
8914
  PRELOAD_NO_CREDS = [];
8840
8915
  Object.freeze(PRELOAD_NO_CREDS);
8841
8916
  stringToPrecomputedChunk('"></template>');
8842
- var startInlineScript = stringToPrecomputedChunk("<script>"),
8917
+ var startInlineScript = stringToPrecomputedChunk("<script"),
8843
8918
  endInlineScript = stringToPrecomputedChunk("\x3c/script>"),
8844
8919
  startScriptSrc = stringToPrecomputedChunk('<script src="'),
8845
8920
  startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'),
8846
- scriptNonce = stringToPrecomputedChunk('" nonce="'),
8847
- scriptIntegirty = stringToPrecomputedChunk('" integrity="'),
8848
- scriptCrossOrigin = stringToPrecomputedChunk('" crossorigin="'),
8849
- endAsyncScript = stringToPrecomputedChunk('" async="">\x3c/script>'),
8921
+ scriptNonce = stringToPrecomputedChunk(' nonce="'),
8922
+ scriptIntegirty = stringToPrecomputedChunk(' integrity="'),
8923
+ scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin="'),
8924
+ endAsyncScript = stringToPrecomputedChunk(' async="">\x3c/script>'),
8850
8925
  scriptRegex = /(<\/|<)(s)(cript)/gi,
8851
8926
  importMapScriptStart = stringToPrecomputedChunk(
8852
8927
  '<script type="importmap">'
@@ -9023,6 +9098,13 @@
9023
9098
  spaceSeparator = stringToPrecomputedChunk(" "),
9024
9099
  styleTagResourceOpen3 = stringToPrecomputedChunk('">'),
9025
9100
  styleTagResourceClose = stringToPrecomputedChunk("</style>"),
9101
+ blockingRenderChunkStart = stringToPrecomputedChunk(
9102
+ '<link rel="expect" href="#'
9103
+ ),
9104
+ blockingRenderChunkEnd = stringToPrecomputedChunk(
9105
+ '" blocking="render"/>'
9106
+ ),
9107
+ completedShellIdAttributeStart = stringToPrecomputedChunk(' id="'),
9026
9108
  arrayFirstOpenBracket = stringToPrecomputedChunk("["),
9027
9109
  arraySubsequentOpenBracket = stringToPrecomputedChunk(",["),
9028
9110
  arrayInterstitial = stringToPrecomputedChunk(","),
@@ -9420,5 +9502,5 @@
9420
9502
  startWork(request);
9421
9503
  });
9422
9504
  };
9423
- exports.version = "19.2.0-canary-197d6a04-20250424";
9505
+ exports.version = "19.2.0-canary-143d3e1b-20250425";
9424
9506
  })();