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.
@@ -750,7 +750,7 @@
750
750
  void 0 === nonce
751
751
  ? startInlineScript
752
752
  : stringToPrecomputedChunk(
753
- '<script nonce="' + escapeTextForBrowser(nonce) + '">'
753
+ '<script nonce="' + escapeTextForBrowser(nonce) + '"'
754
754
  ),
755
755
  idPrefix = resumableState.idPrefix;
756
756
  externalRuntimeConfig = [];
@@ -758,11 +758,13 @@
758
758
  bootstrapScripts = resumableState.bootstrapScripts,
759
759
  bootstrapModules = resumableState.bootstrapModules;
760
760
  void 0 !== bootstrapScriptContent &&
761
+ (externalRuntimeConfig.push(inlineScriptWithNonce),
762
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState),
761
763
  externalRuntimeConfig.push(
762
- inlineScriptWithNonce,
764
+ endOfStartTag,
763
765
  escapeEntireInlineScriptContent(bootstrapScriptContent),
764
766
  endInlineScript
765
- );
767
+ ));
766
768
  bootstrapScriptContent = [];
767
769
  void 0 !== importMap &&
768
770
  (bootstrapScriptContent.push(importMapScriptStart),
@@ -857,23 +859,28 @@
857
859
  );
858
860
  externalRuntimeConfig.push(
859
861
  startScriptSrc,
860
- escapeTextForBrowser(inlineScriptWithNonce)
862
+ escapeTextForBrowser(inlineScriptWithNonce),
863
+ attributeEnd
861
864
  );
862
865
  nonce &&
863
866
  externalRuntimeConfig.push(
864
867
  scriptNonce,
865
- escapeTextForBrowser(nonce)
868
+ escapeTextForBrowser(nonce),
869
+ attributeEnd
866
870
  );
867
871
  "string" === typeof bootstrapScriptContent &&
868
872
  externalRuntimeConfig.push(
869
873
  scriptIntegirty,
870
- escapeTextForBrowser(bootstrapScriptContent)
874
+ escapeTextForBrowser(bootstrapScriptContent),
875
+ attributeEnd
871
876
  );
872
877
  "string" === typeof idPrefix &&
873
878
  externalRuntimeConfig.push(
874
879
  scriptCrossOrigin,
875
- escapeTextForBrowser(idPrefix)
880
+ escapeTextForBrowser(idPrefix),
881
+ attributeEnd
876
882
  );
883
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState);
877
884
  externalRuntimeConfig.push(endAsyncScript);
878
885
  }
879
886
  if (void 0 !== bootstrapModules)
@@ -911,23 +918,31 @@
911
918
  ),
912
919
  externalRuntimeConfig.push(
913
920
  startModuleSrc,
914
- escapeTextForBrowser(maxHeadersLength)
921
+ escapeTextForBrowser(maxHeadersLength),
922
+ attributeEnd
915
923
  ),
916
924
  nonce &&
917
925
  externalRuntimeConfig.push(
918
926
  scriptNonce,
919
- escapeTextForBrowser(nonce)
927
+ escapeTextForBrowser(nonce),
928
+ attributeEnd
920
929
  ),
921
930
  "string" === typeof idPrefix &&
922
931
  externalRuntimeConfig.push(
923
932
  scriptIntegirty,
924
- escapeTextForBrowser(idPrefix)
933
+ escapeTextForBrowser(idPrefix),
934
+ attributeEnd
925
935
  ),
926
936
  "string" === typeof inlineScriptWithNonce &&
927
937
  externalRuntimeConfig.push(
928
938
  scriptCrossOrigin,
929
- escapeTextForBrowser(inlineScriptWithNonce)
939
+ escapeTextForBrowser(inlineScriptWithNonce),
940
+ attributeEnd
930
941
  ),
942
+ pushCompletedShellIdAttribute(
943
+ externalRuntimeConfig,
944
+ resumableState
945
+ ),
931
946
  externalRuntimeConfig.push(endAsyncScript);
932
947
  return onHeaders;
933
948
  }
@@ -1561,13 +1576,26 @@
1561
1576
  return content;
1562
1577
  }
1563
1578
  function injectFormReplayingRuntime(resumableState, renderState) {
1564
- (resumableState.instructions & 16) === NothingSent &&
1565
- ((resumableState.instructions |= 16),
1566
- renderState.bootstrapChunks.unshift(
1567
- renderState.startInlineScript,
1568
- formReplayingRuntimeScript,
1569
- endInlineScript
1570
- ));
1579
+ if ((resumableState.instructions & 16) === NothingSent) {
1580
+ resumableState.instructions |= 16;
1581
+ var preamble = renderState.preamble,
1582
+ bootstrapChunks = renderState.bootstrapChunks;
1583
+ (preamble.htmlChunks || preamble.headChunks) &&
1584
+ 0 === bootstrapChunks.length
1585
+ ? (bootstrapChunks.push(renderState.startInlineScript),
1586
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1587
+ bootstrapChunks.push(
1588
+ endOfStartTag,
1589
+ formReplayingRuntimeScript,
1590
+ endInlineScript
1591
+ ))
1592
+ : bootstrapChunks.unshift(
1593
+ renderState.startInlineScript,
1594
+ endOfStartTag,
1595
+ formReplayingRuntimeScript,
1596
+ endInlineScript
1597
+ );
1598
+ }
1571
1599
  }
1572
1600
  function pushLinkImpl(target, props) {
1573
1601
  target.push(startChunkForTag("link"));
@@ -3301,6 +3329,15 @@
3301
3329
  styleQueue.sheets.forEach(preloadLateStyle, this);
3302
3330
  styleQueue.sheets.clear();
3303
3331
  }
3332
+ function pushCompletedShellIdAttribute(target, resumableState) {
3333
+ (resumableState.instructions & SentCompletedShellId) === NothingSent &&
3334
+ ((resumableState.instructions |= SentCompletedShellId),
3335
+ target.push(
3336
+ completedShellIdAttributeStart,
3337
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
3338
+ attributeEnd
3339
+ ));
3340
+ }
3304
3341
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
3305
3342
  writeChunk(destination, arrayFirstOpenBracket);
3306
3343
  var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
@@ -7178,6 +7215,7 @@
7178
7215
  var requiresStyleInsertion = request.stylesToHoist;
7179
7216
  request.stylesToHoist = !1;
7180
7217
  writeChunk(destination, request.startInlineScript);
7218
+ writeChunk(destination, endOfStartTag);
7181
7219
  requiresStyleInsertion
7182
7220
  ? (completedSegments.instructions & SentCompleteBoundaryFunction) ===
7183
7221
  NothingSent
@@ -7244,6 +7282,7 @@
7244
7282
  boundary = request.resumableState;
7245
7283
  request = request.renderState;
7246
7284
  writeChunk(destination, request.startInlineScript);
7285
+ writeChunk(destination, endOfStartTag);
7247
7286
  (boundary.instructions & SentCompleteSegmentFunction) === NothingSent
7248
7287
  ? ((boundary.instructions |= SentCompleteSegmentFunction),
7249
7288
  writeChunk(destination, completeSegmentScript1Full))
@@ -7269,7 +7308,8 @@
7269
7308
  if (completedRootSegment.status === POSTPONED) return;
7270
7309
  var completedPreambleSegments = request.completedPreambleSegments;
7271
7310
  if (null === completedPreambleSegments) return;
7272
- var renderState = request.renderState,
7311
+ var resumableState = request.resumableState,
7312
+ renderState = request.renderState,
7273
7313
  preamble = renderState.preamble,
7274
7314
  htmlChunks = preamble.htmlChunks,
7275
7315
  headChunks = preamble.headChunks,
@@ -7326,6 +7366,12 @@
7326
7366
  renderState.scripts.clear();
7327
7367
  renderState.bulkPreloads.forEach(flushResource, destination);
7328
7368
  renderState.bulkPreloads.clear();
7369
+ if (htmlChunks || headChunks) {
7370
+ var shellId = "\u00ab" + resumableState.idPrefix + "R\u00bb";
7371
+ writeChunk(destination, blockingRenderChunkStart);
7372
+ writeChunk(destination, escapeTextForBrowser(shellId));
7373
+ writeChunk(destination, blockingRenderChunkEnd);
7374
+ }
7329
7375
  var hoistableChunks = renderState.hoistableChunks;
7330
7376
  for (
7331
7377
  i$jscomp$0 = 0;
@@ -7334,13 +7380,17 @@
7334
7380
  )
7335
7381
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
7336
7382
  for (
7337
- renderState = hoistableChunks.length = 0;
7338
- renderState < completedPreambleSegments.length;
7339
- renderState++
7383
+ resumableState = hoistableChunks.length = 0;
7384
+ resumableState < completedPreambleSegments.length;
7385
+ resumableState++
7340
7386
  ) {
7341
- var segments = completedPreambleSegments[renderState];
7342
- for (preamble = 0; preamble < segments.length; preamble++)
7343
- flushSegment(request, destination, segments[preamble], null);
7387
+ var segments = completedPreambleSegments[resumableState];
7388
+ for (
7389
+ renderState = 0;
7390
+ renderState < segments.length;
7391
+ renderState++
7392
+ )
7393
+ flushSegment(request, destination, segments[renderState], null);
7344
7394
  }
7345
7395
  var preamble$jscomp$0 = request.renderState.preamble,
7346
7396
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -7356,11 +7406,27 @@
7356
7406
  writeChunk(destination, bodyChunks[completedPreambleSegments]);
7357
7407
  flushSegment(request, destination, completedRootSegment, null);
7358
7408
  request.completedRootSegment = null;
7359
- writeBootstrap(destination, request.renderState);
7409
+ var resumableState$jscomp$0 = request.resumableState,
7410
+ renderState$jscomp$0 = request.renderState,
7411
+ preamble$jscomp$1 = renderState$jscomp$0.preamble;
7412
+ if (
7413
+ (preamble$jscomp$1.htmlChunks || preamble$jscomp$1.headChunks) &&
7414
+ (resumableState$jscomp$0.instructions & SentCompletedShellId) ===
7415
+ NothingSent
7416
+ ) {
7417
+ var bootstrapChunks = renderState$jscomp$0.bootstrapChunks;
7418
+ bootstrapChunks.push(startChunkForTag("template"));
7419
+ pushCompletedShellIdAttribute(
7420
+ bootstrapChunks,
7421
+ resumableState$jscomp$0
7422
+ );
7423
+ bootstrapChunks.push(endOfStartTag, endChunkForTag("template"));
7424
+ }
7425
+ writeBootstrap(destination, renderState$jscomp$0);
7360
7426
  }
7361
- var renderState$jscomp$0 = request.renderState;
7427
+ var renderState$jscomp$1 = request.renderState;
7362
7428
  completedRootSegment = 0;
7363
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
7429
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
7364
7430
  for (
7365
7431
  completedRootSegment = 0;
7366
7432
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -7371,21 +7437,21 @@
7371
7437
  viewportChunks$jscomp$0[completedRootSegment]
7372
7438
  );
7373
7439
  viewportChunks$jscomp$0.length = 0;
7374
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
7375
- renderState$jscomp$0.preconnects.clear();
7376
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
7377
- renderState$jscomp$0.fontPreloads.clear();
7378
- renderState$jscomp$0.highImagePreloads.forEach(
7440
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
7441
+ renderState$jscomp$1.preconnects.clear();
7442
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
7443
+ renderState$jscomp$1.fontPreloads.clear();
7444
+ renderState$jscomp$1.highImagePreloads.forEach(
7379
7445
  flushResource,
7380
7446
  destination
7381
7447
  );
7382
- renderState$jscomp$0.highImagePreloads.clear();
7383
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
7384
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
7385
- renderState$jscomp$0.scripts.clear();
7386
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
7387
- renderState$jscomp$0.bulkPreloads.clear();
7388
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
7448
+ renderState$jscomp$1.highImagePreloads.clear();
7449
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
7450
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
7451
+ renderState$jscomp$1.scripts.clear();
7452
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
7453
+ renderState$jscomp$1.bulkPreloads.clear();
7454
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
7389
7455
  for (
7390
7456
  completedRootSegment = 0;
7391
7457
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -7399,29 +7465,32 @@
7399
7465
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
7400
7466
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
7401
7467
  var boundary = clientRenderedBoundaries[i];
7402
- renderState$jscomp$0 = destination;
7403
- var resumableState = request.resumableState,
7404
- renderState$jscomp$1 = request.renderState,
7468
+ renderState$jscomp$1 = destination;
7469
+ var resumableState$jscomp$1 = request.resumableState,
7470
+ renderState$jscomp$2 = request.renderState,
7405
7471
  id = boundary.rootSegmentID,
7406
7472
  errorDigest = boundary.errorDigest,
7407
7473
  errorMessage = boundary.errorMessage,
7408
7474
  errorStack = boundary.errorStack,
7409
7475
  errorComponentStack = boundary.errorComponentStack;
7410
7476
  writeChunk(
7411
- renderState$jscomp$0,
7412
- renderState$jscomp$1.startInlineScript
7477
+ renderState$jscomp$1,
7478
+ renderState$jscomp$2.startInlineScript
7413
7479
  );
7414
- (resumableState.instructions & SentClientRenderFunction) ===
7480
+ writeChunk(renderState$jscomp$1, endOfStartTag);
7481
+ (resumableState$jscomp$1.instructions &
7482
+ SentClientRenderFunction) ===
7415
7483
  NothingSent
7416
- ? ((resumableState.instructions |= SentClientRenderFunction),
7417
- writeChunk(renderState$jscomp$0, clientRenderScript1Full))
7418
- : writeChunk(renderState$jscomp$0, clientRenderScript1Partial);
7484
+ ? ((resumableState$jscomp$1.instructions |=
7485
+ SentClientRenderFunction),
7486
+ writeChunk(renderState$jscomp$1, clientRenderScript1Full))
7487
+ : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
7419
7488
  writeChunk(
7420
- renderState$jscomp$0,
7421
- renderState$jscomp$1.boundaryPrefix
7489
+ renderState$jscomp$1,
7490
+ renderState$jscomp$2.boundaryPrefix
7422
7491
  );
7423
- writeChunk(renderState$jscomp$0, id.toString(16));
7424
- writeChunk(renderState$jscomp$0, clientRenderScript1A);
7492
+ writeChunk(renderState$jscomp$1, id.toString(16));
7493
+ writeChunk(renderState$jscomp$1, clientRenderScript1A);
7425
7494
  if (
7426
7495
  errorDigest ||
7427
7496
  errorMessage ||
@@ -7429,42 +7498,42 @@
7429
7498
  errorComponentStack
7430
7499
  )
7431
7500
  writeChunk(
7432
- renderState$jscomp$0,
7501
+ renderState$jscomp$1,
7433
7502
  clientRenderErrorScriptArgInterstitial
7434
7503
  ),
7435
7504
  writeChunk(
7436
- renderState$jscomp$0,
7505
+ renderState$jscomp$1,
7437
7506
  escapeJSStringsForInstructionScripts(errorDigest || "")
7438
7507
  );
7439
7508
  if (errorMessage || errorStack || errorComponentStack)
7440
7509
  writeChunk(
7441
- renderState$jscomp$0,
7510
+ renderState$jscomp$1,
7442
7511
  clientRenderErrorScriptArgInterstitial
7443
7512
  ),
7444
7513
  writeChunk(
7445
- renderState$jscomp$0,
7514
+ renderState$jscomp$1,
7446
7515
  escapeJSStringsForInstructionScripts(errorMessage || "")
7447
7516
  );
7448
7517
  if (errorStack || errorComponentStack)
7449
7518
  writeChunk(
7450
- renderState$jscomp$0,
7519
+ renderState$jscomp$1,
7451
7520
  clientRenderErrorScriptArgInterstitial
7452
7521
  ),
7453
7522
  writeChunk(
7454
- renderState$jscomp$0,
7523
+ renderState$jscomp$1,
7455
7524
  escapeJSStringsForInstructionScripts(errorStack || "")
7456
7525
  );
7457
7526
  errorComponentStack &&
7458
7527
  (writeChunk(
7459
- renderState$jscomp$0,
7528
+ renderState$jscomp$1,
7460
7529
  clientRenderErrorScriptArgInterstitial
7461
7530
  ),
7462
7531
  writeChunk(
7463
- renderState$jscomp$0,
7532
+ renderState$jscomp$1,
7464
7533
  escapeJSStringsForInstructionScripts(errorComponentStack)
7465
7534
  ));
7466
7535
  var JSCompiler_inline_result = writeChunkAndReturn(
7467
- renderState$jscomp$0,
7536
+ renderState$jscomp$1,
7468
7537
  clientRenderScriptEnd
7469
7538
  );
7470
7539
  if (!JSCompiler_inline_result) {
@@ -7640,11 +7709,11 @@
7640
7709
  }
7641
7710
  function ensureCorrectIsomorphicReactVersion() {
7642
7711
  var isomorphicReactPackageVersion = React.version;
7643
- if ("19.2.0-canary-197d6a04-20250424" !== isomorphicReactPackageVersion)
7712
+ if ("19.2.0-canary-143d3e1b-20250425" !== isomorphicReactPackageVersion)
7644
7713
  throw Error(
7645
7714
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
7646
7715
  (isomorphicReactPackageVersion +
7647
- "\n - react-dom: 19.2.0-canary-197d6a04-20250424\nLearn more: https://react.dev/warnings/version-mismatch")
7716
+ "\n - react-dom: 19.2.0-canary-143d3e1b-20250425\nLearn more: https://react.dev/warnings/version-mismatch")
7648
7717
  );
7649
7718
  }
7650
7719
  function createDrainHandler(destination, request) {
@@ -8778,18 +8847,19 @@
8778
8847
  SentCompleteBoundaryFunction = 2,
8779
8848
  SentClientRenderFunction = 4,
8780
8849
  SentStyleInsertionFunction = 8,
8850
+ SentCompletedShellId = 32,
8781
8851
  EXISTS = null,
8782
8852
  PRELOAD_NO_CREDS = [];
8783
8853
  Object.freeze(PRELOAD_NO_CREDS);
8784
8854
  stringToPrecomputedChunk('"></template>');
8785
- var startInlineScript = stringToPrecomputedChunk("<script>"),
8855
+ var startInlineScript = stringToPrecomputedChunk("<script"),
8786
8856
  endInlineScript = stringToPrecomputedChunk("\x3c/script>"),
8787
8857
  startScriptSrc = stringToPrecomputedChunk('<script src="'),
8788
8858
  startModuleSrc = stringToPrecomputedChunk('<script type="module" src="'),
8789
- scriptNonce = stringToPrecomputedChunk('" nonce="'),
8790
- scriptIntegirty = stringToPrecomputedChunk('" integrity="'),
8791
- scriptCrossOrigin = stringToPrecomputedChunk('" crossorigin="'),
8792
- endAsyncScript = stringToPrecomputedChunk('" async="">\x3c/script>'),
8859
+ scriptNonce = stringToPrecomputedChunk(' nonce="'),
8860
+ scriptIntegirty = stringToPrecomputedChunk(' integrity="'),
8861
+ scriptCrossOrigin = stringToPrecomputedChunk(' crossorigin="'),
8862
+ endAsyncScript = stringToPrecomputedChunk(' async="">\x3c/script>'),
8793
8863
  scriptRegex = /(<\/|<)(s)(cript)/gi,
8794
8864
  importMapScriptStart = stringToPrecomputedChunk(
8795
8865
  '<script type="importmap">'
@@ -8966,6 +9036,13 @@
8966
9036
  spaceSeparator = stringToPrecomputedChunk(" "),
8967
9037
  styleTagResourceOpen3 = stringToPrecomputedChunk('">'),
8968
9038
  styleTagResourceClose = stringToPrecomputedChunk("</style>"),
9039
+ blockingRenderChunkStart = stringToPrecomputedChunk(
9040
+ '<link rel="expect" href="#'
9041
+ ),
9042
+ blockingRenderChunkEnd = stringToPrecomputedChunk(
9043
+ '" blocking="render"/>'
9044
+ ),
9045
+ completedShellIdAttributeStart = stringToPrecomputedChunk(' id="'),
8969
9046
  arrayFirstOpenBracket = stringToPrecomputedChunk("["),
8970
9047
  arraySubsequentOpenBracket = stringToPrecomputedChunk(",["),
8971
9048
  arrayInterstitial = stringToPrecomputedChunk(","),
@@ -9313,5 +9390,5 @@
9313
9390
  }
9314
9391
  };
9315
9392
  };
9316
- exports.version = "19.2.0-canary-197d6a04-20250424";
9393
+ exports.version = "19.2.0-canary-143d3e1b-20250425";
9317
9394
  })();