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.
@@ -1371,6 +1371,7 @@ var NothingSent = 0,
1371
1371
  SentCompleteBoundaryFunction = 2,
1372
1372
  SentClientRenderFunction = 4,
1373
1373
  SentStyleInsertionFunction = 8,
1374
+ SentCompletedShellId = 32,
1374
1375
  EXISTS = null,
1375
1376
  PRELOAD_NO_CREDS = [];
1376
1377
  Object.freeze(PRELOAD_NO_CREDS);
@@ -1394,19 +1395,21 @@ function createRenderState(
1394
1395
  ) {
1395
1396
  var inlineScriptWithNonce =
1396
1397
  void 0 === nonce
1397
- ? "<script>"
1398
- : '<script nonce="' + escapeTextForBrowser(nonce) + '">',
1398
+ ? "<script"
1399
+ : '<script nonce="' + escapeTextForBrowser(nonce) + '"',
1399
1400
  idPrefix = resumableState.idPrefix;
1400
1401
  externalRuntimeConfig = [];
1401
1402
  var bootstrapScriptContent = resumableState.bootstrapScriptContent,
1402
1403
  bootstrapScripts = resumableState.bootstrapScripts,
1403
1404
  bootstrapModules = resumableState.bootstrapModules;
1404
1405
  void 0 !== bootstrapScriptContent &&
1406
+ (externalRuntimeConfig.push(inlineScriptWithNonce),
1407
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState),
1405
1408
  externalRuntimeConfig.push(
1406
- inlineScriptWithNonce,
1409
+ endOfStartTag,
1407
1410
  escapeEntireInlineScriptContent(bootstrapScriptContent),
1408
1411
  "\x3c/script>"
1409
- );
1412
+ ));
1410
1413
  bootstrapScriptContent = [];
1411
1414
  void 0 !== importMap &&
1412
1415
  (bootstrapScriptContent.push('<script type="importmap">'),
@@ -1500,21 +1503,29 @@ function createRenderState(
1500
1503
  );
1501
1504
  externalRuntimeConfig.push(
1502
1505
  '<script src="',
1503
- escapeTextForBrowser(inlineScriptWithNonce)
1506
+ escapeTextForBrowser(inlineScriptWithNonce),
1507
+ attributeEnd
1504
1508
  );
1505
1509
  nonce &&
1506
- externalRuntimeConfig.push('" nonce="', escapeTextForBrowser(nonce));
1510
+ externalRuntimeConfig.push(
1511
+ ' nonce="',
1512
+ escapeTextForBrowser(nonce),
1513
+ attributeEnd
1514
+ );
1507
1515
  "string" === typeof bootstrapScriptContent &&
1508
1516
  externalRuntimeConfig.push(
1509
- '" integrity="',
1510
- escapeTextForBrowser(bootstrapScriptContent)
1517
+ ' integrity="',
1518
+ escapeTextForBrowser(bootstrapScriptContent),
1519
+ attributeEnd
1511
1520
  );
1512
1521
  "string" === typeof idPrefix &&
1513
1522
  externalRuntimeConfig.push(
1514
- '" crossorigin="',
1515
- escapeTextForBrowser(idPrefix)
1523
+ ' crossorigin="',
1524
+ escapeTextForBrowser(idPrefix),
1525
+ attributeEnd
1516
1526
  );
1517
- externalRuntimeConfig.push('" async="">\x3c/script>');
1527
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState);
1528
+ externalRuntimeConfig.push(' async="">\x3c/script>');
1518
1529
  }
1519
1530
  if (void 0 !== bootstrapModules)
1520
1531
  for (
@@ -1550,21 +1561,29 @@ function createRenderState(
1550
1561
  ),
1551
1562
  externalRuntimeConfig.push(
1552
1563
  '<script type="module" src="',
1553
- escapeTextForBrowser(maxHeadersLength)
1564
+ escapeTextForBrowser(maxHeadersLength),
1565
+ attributeEnd
1554
1566
  ),
1555
1567
  nonce &&
1556
- externalRuntimeConfig.push('" nonce="', escapeTextForBrowser(nonce)),
1568
+ externalRuntimeConfig.push(
1569
+ ' nonce="',
1570
+ escapeTextForBrowser(nonce),
1571
+ attributeEnd
1572
+ ),
1557
1573
  "string" === typeof idPrefix &&
1558
1574
  externalRuntimeConfig.push(
1559
- '" integrity="',
1560
- escapeTextForBrowser(idPrefix)
1575
+ ' integrity="',
1576
+ escapeTextForBrowser(idPrefix),
1577
+ attributeEnd
1561
1578
  ),
1562
1579
  "string" === typeof inlineScriptWithNonce &&
1563
1580
  externalRuntimeConfig.push(
1564
- '" crossorigin="',
1565
- escapeTextForBrowser(inlineScriptWithNonce)
1581
+ ' crossorigin="',
1582
+ escapeTextForBrowser(inlineScriptWithNonce),
1583
+ attributeEnd
1566
1584
  ),
1567
- externalRuntimeConfig.push('" async="">\x3c/script>');
1585
+ pushCompletedShellIdAttribute(externalRuntimeConfig, resumableState),
1586
+ externalRuntimeConfig.push(' async="">\x3c/script>');
1568
1587
  return onHeaders;
1569
1588
  }
1570
1589
  function createResumableState(
@@ -2207,13 +2226,25 @@ function flattenOptionChildren(children) {
2207
2226
  var formReplayingRuntimeScript =
2208
2227
  '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))}});';
2209
2228
  function injectFormReplayingRuntime(resumableState, renderState) {
2210
- (resumableState.instructions & 16) === NothingSent &&
2211
- ((resumableState.instructions |= 16),
2212
- renderState.bootstrapChunks.unshift(
2213
- renderState.startInlineScript,
2214
- formReplayingRuntimeScript,
2215
- "\x3c/script>"
2216
- ));
2229
+ if ((resumableState.instructions & 16) === NothingSent) {
2230
+ resumableState.instructions |= 16;
2231
+ var preamble = renderState.preamble,
2232
+ bootstrapChunks = renderState.bootstrapChunks;
2233
+ (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
2234
+ ? (bootstrapChunks.push(renderState.startInlineScript),
2235
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
2236
+ bootstrapChunks.push(
2237
+ endOfStartTag,
2238
+ formReplayingRuntimeScript,
2239
+ "\x3c/script>"
2240
+ ))
2241
+ : bootstrapChunks.unshift(
2242
+ renderState.startInlineScript,
2243
+ endOfStartTag,
2244
+ formReplayingRuntimeScript,
2245
+ "\x3c/script>"
2246
+ );
2247
+ }
2217
2248
  }
2218
2249
  function pushLinkImpl(target, props) {
2219
2250
  target.push(startChunkForTag("link"));
@@ -3981,6 +4012,18 @@ function preloadLateStyles(styleQueue) {
3981
4012
  styleQueue.sheets.forEach(preloadLateStyle, this);
3982
4013
  styleQueue.sheets.clear();
3983
4014
  }
4015
+ var blockingRenderChunkStart = '<link rel="expect" href="#',
4016
+ blockingRenderChunkEnd = '" blocking="render"/>',
4017
+ completedShellIdAttributeStart = ' id="';
4018
+ function pushCompletedShellIdAttribute(target, resumableState) {
4019
+ (resumableState.instructions & SentCompletedShellId) === NothingSent &&
4020
+ ((resumableState.instructions |= SentCompletedShellId),
4021
+ target.push(
4022
+ completedShellIdAttributeStart,
4023
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
4024
+ attributeEnd
4025
+ ));
4026
+ }
3984
4027
  var arrayFirstOpenBracket = "[",
3985
4028
  arraySubsequentOpenBracket = ",[",
3986
4029
  arrayInterstitial = ",",
@@ -8246,6 +8289,7 @@ function flushCompletedBoundary(request, destination, boundary) {
8246
8289
  var requiresStyleInsertion = request.stylesToHoist;
8247
8290
  request.stylesToHoist = !1;
8248
8291
  writeChunk(destination, request.startInlineScript);
8292
+ writeChunk(destination, endOfStartTag);
8249
8293
  requiresStyleInsertion
8250
8294
  ? (completedSegments.instructions & SentCompleteBoundaryFunction) ===
8251
8295
  NothingSent
@@ -8299,6 +8343,7 @@ function flushPartiallyCompletedSegment(
8299
8343
  boundary = request.resumableState;
8300
8344
  request = request.renderState;
8301
8345
  writeChunk(destination, request.startInlineScript);
8346
+ writeChunk(destination, endOfStartTag);
8302
8347
  (boundary.instructions & SentCompleteSegmentFunction) === NothingSent
8303
8348
  ? ((boundary.instructions |= SentCompleteSegmentFunction),
8304
8349
  writeChunk(destination, completeSegmentScript1Full))
@@ -8321,7 +8366,8 @@ function flushCompletedQueues(request, destination) {
8321
8366
  if (completedRootSegment.status === POSTPONED) return;
8322
8367
  var completedPreambleSegments = request.completedPreambleSegments;
8323
8368
  if (null === completedPreambleSegments) return;
8324
- var renderState = request.renderState,
8369
+ var resumableState = request.resumableState,
8370
+ renderState = request.renderState,
8325
8371
  preamble = renderState.preamble,
8326
8372
  htmlChunks = preamble.htmlChunks,
8327
8373
  headChunks = preamble.headChunks,
@@ -8362,17 +8408,23 @@ function flushCompletedQueues(request, destination) {
8362
8408
  renderState.scripts.clear();
8363
8409
  renderState.bulkPreloads.forEach(flushResource, destination);
8364
8410
  renderState.bulkPreloads.clear();
8411
+ if (htmlChunks || headChunks) {
8412
+ var shellId = "\u00ab" + resumableState.idPrefix + "R\u00bb";
8413
+ writeChunk(destination, blockingRenderChunkStart);
8414
+ writeChunk(destination, escapeTextForBrowser(shellId));
8415
+ writeChunk(destination, blockingRenderChunkEnd);
8416
+ }
8365
8417
  var hoistableChunks = renderState.hoistableChunks;
8366
8418
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
8367
8419
  writeChunk(destination, hoistableChunks[i$jscomp$0]);
8368
8420
  for (
8369
- renderState = hoistableChunks.length = 0;
8370
- renderState < completedPreambleSegments.length;
8371
- renderState++
8421
+ resumableState = hoistableChunks.length = 0;
8422
+ resumableState < completedPreambleSegments.length;
8423
+ resumableState++
8372
8424
  ) {
8373
- var segments = completedPreambleSegments[renderState];
8374
- for (preamble = 0; preamble < segments.length; preamble++)
8375
- flushSegment(request, destination, segments[preamble], null);
8425
+ var segments = completedPreambleSegments[resumableState];
8426
+ for (renderState = 0; renderState < segments.length; renderState++)
8427
+ flushSegment(request, destination, segments[renderState], null);
8376
8428
  }
8377
8429
  var preamble$jscomp$0 = request.renderState.preamble,
8378
8430
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -8388,11 +8440,27 @@ function flushCompletedQueues(request, destination) {
8388
8440
  writeChunk(destination, bodyChunks[completedPreambleSegments]);
8389
8441
  flushSegment(request, destination, completedRootSegment, null);
8390
8442
  request.completedRootSegment = null;
8391
- writeBootstrap(destination, request.renderState);
8443
+ var resumableState$jscomp$0 = request.resumableState,
8444
+ renderState$jscomp$0 = request.renderState,
8445
+ preamble$jscomp$1 = renderState$jscomp$0.preamble;
8446
+ if (
8447
+ (preamble$jscomp$1.htmlChunks || preamble$jscomp$1.headChunks) &&
8448
+ (resumableState$jscomp$0.instructions & SentCompletedShellId) ===
8449
+ NothingSent
8450
+ ) {
8451
+ var bootstrapChunks = renderState$jscomp$0.bootstrapChunks;
8452
+ bootstrapChunks.push(startChunkForTag("template"));
8453
+ pushCompletedShellIdAttribute(
8454
+ bootstrapChunks,
8455
+ resumableState$jscomp$0
8456
+ );
8457
+ bootstrapChunks.push(endOfStartTag, endChunkForTag("template"));
8458
+ }
8459
+ writeBootstrap(destination, renderState$jscomp$0);
8392
8460
  }
8393
- var renderState$jscomp$0 = request.renderState;
8461
+ var renderState$jscomp$1 = request.renderState;
8394
8462
  completedRootSegment = 0;
8395
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
8463
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
8396
8464
  for (
8397
8465
  completedRootSegment = 0;
8398
8466
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -8400,21 +8468,21 @@ function flushCompletedQueues(request, destination) {
8400
8468
  )
8401
8469
  writeChunk(destination, viewportChunks$jscomp$0[completedRootSegment]);
8402
8470
  viewportChunks$jscomp$0.length = 0;
8403
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
8404
- renderState$jscomp$0.preconnects.clear();
8405
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
8406
- renderState$jscomp$0.fontPreloads.clear();
8407
- renderState$jscomp$0.highImagePreloads.forEach(
8471
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
8472
+ renderState$jscomp$1.preconnects.clear();
8473
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
8474
+ renderState$jscomp$1.fontPreloads.clear();
8475
+ renderState$jscomp$1.highImagePreloads.forEach(
8408
8476
  flushResource,
8409
8477
  destination
8410
8478
  );
8411
- renderState$jscomp$0.highImagePreloads.clear();
8412
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
8413
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
8414
- renderState$jscomp$0.scripts.clear();
8415
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
8416
- renderState$jscomp$0.bulkPreloads.clear();
8417
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
8479
+ renderState$jscomp$1.highImagePreloads.clear();
8480
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
8481
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
8482
+ renderState$jscomp$1.scripts.clear();
8483
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
8484
+ renderState$jscomp$1.bulkPreloads.clear();
8485
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
8418
8486
  for (
8419
8487
  completedRootSegment = 0;
8420
8488
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -8425,62 +8493,64 @@ function flushCompletedQueues(request, destination) {
8425
8493
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
8426
8494
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
8427
8495
  var boundary = clientRenderedBoundaries[i];
8428
- renderState$jscomp$0 = destination;
8429
- var resumableState = request.resumableState,
8430
- renderState$jscomp$1 = request.renderState,
8496
+ renderState$jscomp$1 = destination;
8497
+ var resumableState$jscomp$1 = request.resumableState,
8498
+ renderState$jscomp$2 = request.renderState,
8431
8499
  id = boundary.rootSegmentID,
8432
8500
  errorDigest = boundary.errorDigest,
8433
8501
  errorMessage = boundary.errorMessage,
8434
8502
  errorStack = boundary.errorStack,
8435
8503
  errorComponentStack = boundary.errorComponentStack;
8436
8504
  writeChunk(
8437
- renderState$jscomp$0,
8438
- renderState$jscomp$1.startInlineScript
8505
+ renderState$jscomp$1,
8506
+ renderState$jscomp$2.startInlineScript
8439
8507
  );
8440
- (resumableState.instructions & SentClientRenderFunction) === NothingSent
8441
- ? ((resumableState.instructions |= SentClientRenderFunction),
8442
- writeChunk(renderState$jscomp$0, clientRenderScript1Full))
8443
- : writeChunk(renderState$jscomp$0, clientRenderScript1Partial);
8444
- writeChunk(renderState$jscomp$0, renderState$jscomp$1.boundaryPrefix);
8445
- writeChunk(renderState$jscomp$0, id.toString(16));
8446
- writeChunk(renderState$jscomp$0, clientRenderScript1A);
8508
+ writeChunk(renderState$jscomp$1, endOfStartTag);
8509
+ (resumableState$jscomp$1.instructions & SentClientRenderFunction) ===
8510
+ NothingSent
8511
+ ? ((resumableState$jscomp$1.instructions |= SentClientRenderFunction),
8512
+ writeChunk(renderState$jscomp$1, clientRenderScript1Full))
8513
+ : writeChunk(renderState$jscomp$1, clientRenderScript1Partial);
8514
+ writeChunk(renderState$jscomp$1, renderState$jscomp$2.boundaryPrefix);
8515
+ writeChunk(renderState$jscomp$1, id.toString(16));
8516
+ writeChunk(renderState$jscomp$1, clientRenderScript1A);
8447
8517
  if (errorDigest || errorMessage || errorStack || errorComponentStack)
8448
8518
  writeChunk(
8449
- renderState$jscomp$0,
8519
+ renderState$jscomp$1,
8450
8520
  clientRenderErrorScriptArgInterstitial
8451
8521
  ),
8452
8522
  writeChunk(
8453
- renderState$jscomp$0,
8523
+ renderState$jscomp$1,
8454
8524
  escapeJSStringsForInstructionScripts(errorDigest || "")
8455
8525
  );
8456
8526
  if (errorMessage || errorStack || errorComponentStack)
8457
8527
  writeChunk(
8458
- renderState$jscomp$0,
8528
+ renderState$jscomp$1,
8459
8529
  clientRenderErrorScriptArgInterstitial
8460
8530
  ),
8461
8531
  writeChunk(
8462
- renderState$jscomp$0,
8532
+ renderState$jscomp$1,
8463
8533
  escapeJSStringsForInstructionScripts(errorMessage || "")
8464
8534
  );
8465
8535
  if (errorStack || errorComponentStack)
8466
8536
  writeChunk(
8467
- renderState$jscomp$0,
8537
+ renderState$jscomp$1,
8468
8538
  clientRenderErrorScriptArgInterstitial
8469
8539
  ),
8470
8540
  writeChunk(
8471
- renderState$jscomp$0,
8541
+ renderState$jscomp$1,
8472
8542
  escapeJSStringsForInstructionScripts(errorStack || "")
8473
8543
  );
8474
8544
  errorComponentStack &&
8475
8545
  (writeChunk(
8476
- renderState$jscomp$0,
8546
+ renderState$jscomp$1,
8477
8547
  clientRenderErrorScriptArgInterstitial
8478
8548
  ),
8479
8549
  writeChunk(
8480
- renderState$jscomp$0,
8550
+ renderState$jscomp$1,
8481
8551
  escapeJSStringsForInstructionScripts(errorComponentStack)
8482
8552
  ));
8483
- var JSCompiler_inline_result = !!renderState$jscomp$0.write(
8553
+ var JSCompiler_inline_result = !!renderState$jscomp$1.write(
8484
8554
  clientRenderScriptEnd
8485
8555
  );
8486
8556
  if (!JSCompiler_inline_result) {
@@ -8622,15 +8692,15 @@ function abort(request, reason) {
8622
8692
  fatalError(request, error$4, reason, null);
8623
8693
  }
8624
8694
  }
8625
- var isomorphicReactPackageVersion$jscomp$inline_742 = React.version;
8695
+ var isomorphicReactPackageVersion$jscomp$inline_748 = React.version;
8626
8696
  if (
8627
- "19.2.0-canary-197d6a04-20250424" !==
8628
- isomorphicReactPackageVersion$jscomp$inline_742
8697
+ "19.2.0-canary-143d3e1b-20250425" !==
8698
+ isomorphicReactPackageVersion$jscomp$inline_748
8629
8699
  )
8630
8700
  throw Error(
8631
8701
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
8632
- (isomorphicReactPackageVersion$jscomp$inline_742 +
8633
- "\n - react-dom: 19.2.0-canary-197d6a04-20250424\nLearn more: https://react.dev/warnings/version-mismatch")
8702
+ (isomorphicReactPackageVersion$jscomp$inline_748 +
8703
+ "\n - react-dom: 19.2.0-canary-143d3e1b-20250425\nLearn more: https://react.dev/warnings/version-mismatch")
8634
8704
  );
8635
8705
  exports.renderToReadableStream = function (children, options) {
8636
8706
  return new Promise(function (resolve, reject) {
@@ -8723,4 +8793,4 @@ exports.renderToReadableStream = function (children, options) {
8723
8793
  startWork(request$jscomp$0);
8724
8794
  });
8725
8795
  };
8726
- exports.version = "19.2.0-canary-197d6a04-20250424";
8796
+ exports.version = "19.2.0-canary-143d3e1b-20250425";