react-markup 0.0.0-experimental-197d6a04-20250424 → 0.0.0-experimental-c498bfce-20250426

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.
@@ -759,8 +759,8 @@
759
759
  ) {
760
760
  var inlineScriptWithNonce =
761
761
  void 0 === nonce
762
- ? "<script>"
763
- : '<script nonce="' + escapeTextForBrowser(nonce) + '">',
762
+ ? "<script"
763
+ : '<script nonce="' + escapeTextForBrowser(nonce) + '"',
764
764
  idPrefix = resumableState.idPrefix,
765
765
  bootstrapChunks = [],
766
766
  externalRuntimeScript = null,
@@ -768,11 +768,13 @@
768
768
  bootstrapScripts = resumableState.bootstrapScripts,
769
769
  bootstrapModules = resumableState.bootstrapModules;
770
770
  void 0 !== bootstrapScriptContent &&
771
+ (bootstrapChunks.push(inlineScriptWithNonce),
772
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
771
773
  bootstrapChunks.push(
772
- inlineScriptWithNonce,
774
+ endOfStartTag,
773
775
  escapeEntireInlineScriptContent(bootstrapScriptContent),
774
776
  "\x3c/script>"
775
- );
777
+ ));
776
778
  void 0 !== externalRuntimeConfig &&
777
779
  ("string" === typeof externalRuntimeConfig
778
780
  ? ((externalRuntimeScript = {
@@ -893,21 +895,29 @@
893
895
  ),
894
896
  bootstrapChunks.push(
895
897
  '<script src="',
896
- escapeTextForBrowser(externalRuntimeScript)
898
+ escapeTextForBrowser(externalRuntimeScript),
899
+ attributeEnd
897
900
  ),
898
901
  nonce &&
899
- bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
902
+ bootstrapChunks.push(
903
+ ' nonce="',
904
+ escapeTextForBrowser(nonce),
905
+ attributeEnd
906
+ ),
900
907
  "string" === typeof maxHeadersLength &&
901
908
  bootstrapChunks.push(
902
- '" integrity="',
903
- escapeTextForBrowser(maxHeadersLength)
909
+ ' integrity="',
910
+ escapeTextForBrowser(maxHeadersLength),
911
+ attributeEnd
904
912
  ),
905
913
  "string" === typeof importMap &&
906
914
  bootstrapChunks.push(
907
- '" crossorigin="',
908
- escapeTextForBrowser(importMap)
915
+ ' crossorigin="',
916
+ escapeTextForBrowser(importMap),
917
+ attributeEnd
909
918
  ),
910
- bootstrapChunks.push('" async="">\x3c/script>');
919
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
920
+ bootstrapChunks.push(' async="">\x3c/script>');
911
921
  if (void 0 !== bootstrapModules)
912
922
  for (
913
923
  bootstrapScripts = 0;
@@ -943,21 +953,29 @@
943
953
  ),
944
954
  bootstrapChunks.push(
945
955
  '<script type="module" src="',
946
- escapeTextForBrowser(idPrefix)
956
+ escapeTextForBrowser(idPrefix),
957
+ attributeEnd
947
958
  ),
948
959
  nonce &&
949
- bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
960
+ bootstrapChunks.push(
961
+ ' nonce="',
962
+ escapeTextForBrowser(nonce),
963
+ attributeEnd
964
+ ),
950
965
  "string" === typeof importMap &&
951
966
  bootstrapChunks.push(
952
- '" integrity="',
953
- escapeTextForBrowser(importMap)
967
+ ' integrity="',
968
+ escapeTextForBrowser(importMap),
969
+ attributeEnd
954
970
  ),
955
971
  "string" === typeof externalRuntimeScript &&
956
972
  bootstrapChunks.push(
957
- '" crossorigin="',
958
- escapeTextForBrowser(externalRuntimeScript)
973
+ ' crossorigin="',
974
+ escapeTextForBrowser(externalRuntimeScript),
975
+ attributeEnd
959
976
  ),
960
- bootstrapChunks.push('" async="">\x3c/script>');
977
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
978
+ bootstrapChunks.push(' async="">\x3c/script>');
961
979
  return onHeaders;
962
980
  }
963
981
  function createResumableState(
@@ -1576,14 +1594,29 @@
1576
1594
  return content;
1577
1595
  }
1578
1596
  function injectFormReplayingRuntime(resumableState, renderState) {
1579
- 0 !== (resumableState.instructions & 16) ||
1580
- renderState.externalRuntimeScript ||
1581
- ((resumableState.instructions |= 16),
1582
- renderState.bootstrapChunks.unshift(
1583
- renderState.startInlineScript,
1584
- formReplayingRuntimeScript,
1585
- "\x3c/script>"
1586
- ));
1597
+ if (
1598
+ 0 === (resumableState.instructions & 16) &&
1599
+ !renderState.externalRuntimeScript
1600
+ ) {
1601
+ resumableState.instructions |= 16;
1602
+ var preamble = renderState.preamble,
1603
+ bootstrapChunks = renderState.bootstrapChunks;
1604
+ (preamble.htmlChunks || preamble.headChunks) &&
1605
+ 0 === bootstrapChunks.length
1606
+ ? (bootstrapChunks.push(renderState.startInlineScript),
1607
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
1608
+ bootstrapChunks.push(
1609
+ endOfStartTag,
1610
+ formReplayingRuntimeScript,
1611
+ "\x3c/script>"
1612
+ ))
1613
+ : bootstrapChunks.unshift(
1614
+ renderState.startInlineScript,
1615
+ endOfStartTag,
1616
+ formReplayingRuntimeScript,
1617
+ "\x3c/script>"
1618
+ );
1619
+ }
1587
1620
  }
1588
1621
  function pushLinkImpl(target, props) {
1589
1622
  target.push(startChunkForTag("link"));
@@ -3055,14 +3088,6 @@
3055
3088
  preambleState.bodyChunks &&
3056
3089
  (renderState.bodyChunks = preambleState.bodyChunks);
3057
3090
  }
3058
- function writeBootstrap(destination, renderState) {
3059
- renderState = renderState.bootstrapChunks;
3060
- for (var i = 0; i < renderState.length - 1; i++)
3061
- destination.push(renderState[i]);
3062
- return i < renderState.length
3063
- ? ((i = renderState[i]), (renderState.length = 0), destination.push(i))
3064
- : !0;
3065
- }
3066
3091
  function writeStartPendingSuspenseBoundary(destination, renderState, id) {
3067
3092
  destination.push('\x3c!--$?--\x3e<template id="');
3068
3093
  if (null === id)
@@ -3315,6 +3340,15 @@
3315
3340
  styleQueue.sheets.forEach(preloadLateStyle, this);
3316
3341
  styleQueue.sheets.clear();
3317
3342
  }
3343
+ function pushCompletedShellIdAttribute(target, resumableState) {
3344
+ 0 === (resumableState.instructions & 32) &&
3345
+ ((resumableState.instructions |= 32),
3346
+ target.push(
3347
+ completedShellIdAttributeStart,
3348
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
3349
+ attributeEnd
3350
+ ));
3351
+ }
3318
3352
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
3319
3353
  destination.push(arrayFirstOpenBracket);
3320
3354
  var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
@@ -4388,6 +4422,7 @@
4388
4422
  this.fatalError = null;
4389
4423
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
4390
4424
  this.completedPreambleSegments = this.completedRootSegment = null;
4425
+ this.byteSize = 0;
4391
4426
  this.abortableTasks = abortSet;
4392
4427
  this.pingedTasks = [];
4393
4428
  this.clientRenderedBoundaries = [];
@@ -5599,9 +5634,11 @@
5599
5634
  (renderNode(request, task, content, -1),
5600
5635
  (contentRootSegment.status = 1),
5601
5636
  queueCompletedSegment(newBoundary, contentRootSegment),
5602
- 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
5637
+ 0 === newBoundary.pendingTasks &&
5638
+ 0 === newBoundary.status &&
5639
+ ((newBoundary.status = 1),
5640
+ !(newBoundary.byteSize > request.progressiveChunkSize)))
5603
5641
  ) {
5604
- newBoundary.status = 1;
5605
5642
  0 === request.pendingRootTasks &&
5606
5643
  task.blockedPreamble &&
5607
5644
  preparePreamble(request);
@@ -6992,11 +7029,12 @@
6992
7029
  boundary.parentFlushed &&
6993
7030
  request.completedBoundaries.push(boundary),
6994
7031
  1 === boundary.status &&
6995
- (boundary.fallbackAbortableTasks.forEach(
6996
- abortTaskSoft,
6997
- request
6998
- ),
6999
- boundary.fallbackAbortableTasks.clear(),
7032
+ (boundary.byteSize > request.progressiveChunkSize ||
7033
+ (boundary.fallbackAbortableTasks.forEach(
7034
+ abortTaskSoft,
7035
+ request
7036
+ ),
7037
+ boundary.fallbackAbortableTasks.clear()),
7000
7038
  0 === request.pendingRootTasks &&
7001
7039
  null === request.trackedPostpones &&
7002
7040
  null !== boundary.contentPreamble &&
@@ -7491,6 +7529,7 @@
7491
7529
  var scriptFormat = 0 === completedSegments.streamingFormat;
7492
7530
  scriptFormat
7493
7531
  ? (destination.push(request.startInlineScript),
7532
+ destination.push(endOfStartTag),
7494
7533
  requiresStyleInsertion
7495
7534
  ? 0 === (completedSegments.instructions & 2)
7496
7535
  ? ((completedSegments.instructions |= 10),
@@ -7528,7 +7567,15 @@
7528
7567
  completedSegments = scriptFormat
7529
7568
  ? destination.push(")\x3c/script>")
7530
7569
  : destination.push('"></template>');
7531
- return writeBootstrap(destination, request) && completedSegments;
7570
+ request = request.bootstrapChunks;
7571
+ for (boundary = 0; boundary < request.length - 1; boundary++)
7572
+ destination.push(request[boundary]);
7573
+ boundary < request.length
7574
+ ? ((boundary = request[boundary]),
7575
+ (request.length = 0),
7576
+ (destination = destination.push(boundary)))
7577
+ : (destination = !0);
7578
+ return destination && completedSegments;
7532
7579
  }
7533
7580
  function flushPartiallyCompletedSegment(
7534
7581
  request,
@@ -7563,6 +7610,7 @@
7563
7610
  request = request.renderState;
7564
7611
  (segment = 0 === boundary.streamingFormat)
7565
7612
  ? (destination.push(request.startInlineScript),
7613
+ destination.push(endOfStartTag),
7566
7614
  0 === (boundary.instructions & 1)
7567
7615
  ? ((boundary.instructions |= 1),
7568
7616
  destination.push(
@@ -7590,14 +7638,14 @@
7590
7638
  if (5 === completedRootSegment.status) return;
7591
7639
  var completedPreambleSegments = request.completedPreambleSegments;
7592
7640
  if (null === completedPreambleSegments) return;
7593
- var renderState = request.renderState;
7641
+ var resumableState = request.resumableState,
7642
+ renderState = request.renderState;
7594
7643
  if (
7595
7644
  (0 !== request.allPendingTasks ||
7596
7645
  null !== request.trackedPostpones) &&
7597
7646
  renderState.externalRuntimeScript
7598
7647
  ) {
7599
7648
  var _renderState$external = renderState.externalRuntimeScript,
7600
- resumableState = request.resumableState,
7601
7649
  src = _renderState$external.src,
7602
7650
  chunks = _renderState$external.chunks;
7603
7651
  resumableState.scriptResources.hasOwnProperty(src) ||
@@ -7670,22 +7718,17 @@
7670
7718
  )
7671
7719
  destination.push(hoistableChunks[i$jscomp$0]);
7672
7720
  for (
7673
- renderState = hoistableChunks.length = 0;
7674
- renderState < completedPreambleSegments.length;
7675
- renderState++
7721
+ resumableState = hoistableChunks.length = 0;
7722
+ resumableState < completedPreambleSegments.length;
7723
+ resumableState++
7676
7724
  ) {
7677
- var segments = completedPreambleSegments[renderState];
7725
+ var segments = completedPreambleSegments[resumableState];
7678
7726
  for (
7679
- _renderState$external = 0;
7680
- _renderState$external < segments.length;
7681
- _renderState$external++
7727
+ renderState = 0;
7728
+ renderState < segments.length;
7729
+ renderState++
7682
7730
  )
7683
- flushSegment(
7684
- request,
7685
- destination,
7686
- segments[_renderState$external],
7687
- null
7688
- );
7731
+ flushSegment(request, destination, segments[renderState], null);
7689
7732
  }
7690
7733
  var preamble$jscomp$0 = request.renderState.preamble,
7691
7734
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -7703,7 +7746,6 @@
7703
7746
  destination.push(bodyChunks[completedPreambleSegments]);
7704
7747
  flushSegment(request, destination, completedRootSegment, null);
7705
7748
  request.completedRootSegment = null;
7706
- writeBootstrap(destination, request.renderState);
7707
7749
  }
7708
7750
  var renderState$jscomp$0 = request.renderState;
7709
7751
  completedRootSegment = 0;
@@ -7753,6 +7795,7 @@
7753
7795
  ? (renderState$jscomp$0.push(
7754
7796
  renderState$jscomp$1.startInlineScript
7755
7797
  ),
7798
+ renderState$jscomp$0.push(endOfStartTag),
7756
7799
  0 === (resumableState$jscomp$0.instructions & 4)
7757
7800
  ? ((resumableState$jscomp$0.instructions |= 4),
7758
7801
  renderState$jscomp$0.push(
@@ -8728,6 +8771,7 @@
8728
8771
  destinationHasCapacity = !0,
8729
8772
  stylesheetFlushingQueue = [],
8730
8773
  spaceSeparator = " ",
8774
+ completedShellIdAttributeStart = ' id="',
8731
8775
  arrayFirstOpenBracket = "[",
8732
8776
  arraySubsequentOpenBracket = ",[",
8733
8777
  arrayInterstitial = ",",
@@ -9003,5 +9047,5 @@
9003
9047
  });
9004
9048
  });
9005
9049
  };
9006
- exports.version = "19.2.0-experimental-197d6a04-20250424";
9050
+ exports.version = "19.2.0-experimental-c498bfce-20250426";
9007
9051
  })();
@@ -298,8 +298,8 @@ function createRenderState(
298
298
  ) {
299
299
  var inlineScriptWithNonce =
300
300
  void 0 === nonce
301
- ? "<script>"
302
- : '<script nonce="' + escapeTextForBrowser(nonce) + '">',
301
+ ? "<script"
302
+ : '<script nonce="' + escapeTextForBrowser(nonce) + '"',
303
303
  idPrefix = resumableState.idPrefix,
304
304
  bootstrapChunks = [],
305
305
  externalRuntimeScript = null,
@@ -307,11 +307,13 @@ function createRenderState(
307
307
  bootstrapScripts = resumableState.bootstrapScripts,
308
308
  bootstrapModules = resumableState.bootstrapModules;
309
309
  void 0 !== bootstrapScriptContent &&
310
+ (bootstrapChunks.push(inlineScriptWithNonce),
311
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
310
312
  bootstrapChunks.push(
311
- inlineScriptWithNonce,
313
+ ">",
312
314
  ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
313
315
  "\x3c/script>"
314
- );
316
+ ));
315
317
  void 0 !== externalRuntimeConfig &&
316
318
  ("string" === typeof externalRuntimeConfig
317
319
  ? ((externalRuntimeScript = { src: externalRuntimeConfig, chunks: [] }),
@@ -421,19 +423,27 @@ function createRenderState(
421
423
  (externalRuntimeConfig = []),
422
424
  pushLinkImpl(externalRuntimeConfig, maxHeadersLength),
423
425
  onHeaders.bootstrapScripts.add(externalRuntimeConfig),
424
- bootstrapChunks.push('<script src="', escapeTextForBrowser(idPrefix)),
425
- nonce && bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
426
+ bootstrapChunks.push(
427
+ '<script src="',
428
+ escapeTextForBrowser(idPrefix),
429
+ '"'
430
+ ),
431
+ nonce &&
432
+ bootstrapChunks.push(' nonce="', escapeTextForBrowser(nonce), '"'),
426
433
  "string" === typeof importMap &&
427
434
  bootstrapChunks.push(
428
- '" integrity="',
429
- escapeTextForBrowser(importMap)
435
+ ' integrity="',
436
+ escapeTextForBrowser(importMap),
437
+ '"'
430
438
  ),
431
439
  "string" === typeof externalRuntimeScript &&
432
440
  bootstrapChunks.push(
433
- '" crossorigin="',
434
- escapeTextForBrowser(externalRuntimeScript)
441
+ ' crossorigin="',
442
+ escapeTextForBrowser(externalRuntimeScript),
443
+ '"'
435
444
  ),
436
- bootstrapChunks.push('" async="">\x3c/script>');
445
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
446
+ bootstrapChunks.push(' async="">\x3c/script>');
437
447
  if (void 0 !== bootstrapModules)
438
448
  for (
439
449
  bootstrapScripts = 0;
@@ -470,20 +480,25 @@ function createRenderState(
470
480
  onHeaders.bootstrapScripts.add(maxHeadersLength),
471
481
  bootstrapChunks.push(
472
482
  '<script type="module" src="',
473
- escapeTextForBrowser(inlineScriptWithNonce)
483
+ escapeTextForBrowser(inlineScriptWithNonce),
484
+ '"'
474
485
  ),
475
- nonce && bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
486
+ nonce &&
487
+ bootstrapChunks.push(' nonce="', escapeTextForBrowser(nonce), '"'),
476
488
  "string" === typeof externalRuntimeScript &&
477
489
  bootstrapChunks.push(
478
- '" integrity="',
479
- escapeTextForBrowser(externalRuntimeScript)
490
+ ' integrity="',
491
+ escapeTextForBrowser(externalRuntimeScript),
492
+ '"'
480
493
  ),
481
494
  "string" === typeof idPrefix &&
482
495
  bootstrapChunks.push(
483
- '" crossorigin="',
484
- escapeTextForBrowser(idPrefix)
496
+ ' crossorigin="',
497
+ escapeTextForBrowser(idPrefix),
498
+ '"'
485
499
  ),
486
- bootstrapChunks.push('" async="">\x3c/script>');
500
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
501
+ bootstrapChunks.push(' async="">\x3c/script>');
487
502
  return onHeaders;
488
503
  }
489
504
  function createResumableState(
@@ -905,14 +920,28 @@ function flattenOptionChildren(children) {
905
920
  return content;
906
921
  }
907
922
  function injectFormReplayingRuntime(resumableState, renderState) {
908
- 0 !== (resumableState.instructions & 16) ||
909
- renderState.externalRuntimeScript ||
910
- ((resumableState.instructions |= 16),
911
- renderState.bootstrapChunks.unshift(
912
- renderState.startInlineScript,
913
- '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))}});',
914
- "\x3c/script>"
915
- ));
923
+ if (
924
+ 0 === (resumableState.instructions & 16) &&
925
+ !renderState.externalRuntimeScript
926
+ ) {
927
+ resumableState.instructions |= 16;
928
+ var preamble = renderState.preamble,
929
+ bootstrapChunks = renderState.bootstrapChunks;
930
+ (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
931
+ ? (bootstrapChunks.push(renderState.startInlineScript),
932
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
933
+ bootstrapChunks.push(
934
+ ">",
935
+ '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))}});',
936
+ "\x3c/script>"
937
+ ))
938
+ : bootstrapChunks.unshift(
939
+ renderState.startInlineScript,
940
+ ">",
941
+ '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))}});',
942
+ "\x3c/script>"
943
+ );
944
+ }
916
945
  }
917
946
  function pushLinkImpl(target, props) {
918
947
  target.push(startChunkForTag("link"));
@@ -2116,14 +2145,6 @@ function hoistPreambleState(renderState, preambleState) {
2116
2145
  preambleState.bodyChunks &&
2117
2146
  (renderState.bodyChunks = preambleState.bodyChunks);
2118
2147
  }
2119
- function writeBootstrap(destination, renderState) {
2120
- renderState = renderState.bootstrapChunks;
2121
- for (var i = 0; i < renderState.length - 1; i++)
2122
- destination.push(renderState[i]);
2123
- return i < renderState.length
2124
- ? ((i = renderState[i]), (renderState.length = 0), destination.push(i))
2125
- : !0;
2126
- }
2127
2148
  function writeStartPendingSuspenseBoundary(destination, renderState, id) {
2128
2149
  destination.push('\x3c!--$?--\x3e<template id="');
2129
2150
  if (null === id)
@@ -2368,6 +2389,15 @@ function preloadLateStyles(styleQueue) {
2368
2389
  styleQueue.sheets.forEach(preloadLateStyle, this);
2369
2390
  styleQueue.sheets.clear();
2370
2391
  }
2392
+ function pushCompletedShellIdAttribute(target, resumableState) {
2393
+ 0 === (resumableState.instructions & 32) &&
2394
+ ((resumableState.instructions |= 32),
2395
+ target.push(
2396
+ ' id="',
2397
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
2398
+ '"'
2399
+ ));
2400
+ }
2371
2401
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
2372
2402
  destination.push("[");
2373
2403
  var nextArrayOpenBrackChunk = "[";
@@ -3366,6 +3396,7 @@ function RequestInstance(
3366
3396
  this.fatalError = null;
3367
3397
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
3368
3398
  this.completedPreambleSegments = this.completedRootSegment = null;
3399
+ this.byteSize = 0;
3369
3400
  this.abortableTasks = abortSet;
3370
3401
  this.pingedTasks = [];
3371
3402
  this.clientRenderedBoundaries = [];
@@ -4067,9 +4098,11 @@ function renderElement(request, task, keyPath, type, props, ref) {
4067
4098
  (renderNode(request, task, props, -1),
4068
4099
  (textEmbedded.status = 1),
4069
4100
  queueCompletedSegment(propName, textEmbedded),
4070
- 0 === propName.pendingTasks && 0 === propName.status)
4101
+ 0 === propName.pendingTasks &&
4102
+ 0 === propName.status &&
4103
+ ((propName.status = 1),
4104
+ !(propName.byteSize > request.progressiveChunkSize)))
4071
4105
  ) {
4072
- propName.status = 1;
4073
4106
  0 === request.pendingRootTasks &&
4074
4107
  task.blockedPreamble &&
4075
4108
  preparePreamble(request);
@@ -5170,8 +5203,12 @@ function finishedTask(request, boundary, segment) {
5170
5203
  boundary.parentFlushed &&
5171
5204
  request.completedBoundaries.push(boundary),
5172
5205
  1 === boundary.status &&
5173
- (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
5174
- boundary.fallbackAbortableTasks.clear(),
5206
+ (boundary.byteSize > request.progressiveChunkSize ||
5207
+ (boundary.fallbackAbortableTasks.forEach(
5208
+ abortTaskSoft,
5209
+ request
5210
+ ),
5211
+ boundary.fallbackAbortableTasks.clear()),
5175
5212
  0 === request.pendingRootTasks &&
5176
5213
  null === request.trackedPostpones &&
5177
5214
  null !== boundary.contentPreamble &&
@@ -5597,6 +5634,7 @@ function flushCompletedBoundary(request, destination, boundary) {
5597
5634
  var scriptFormat = 0 === completedSegments.streamingFormat;
5598
5635
  scriptFormat
5599
5636
  ? (destination.push(request.startInlineScript),
5637
+ destination.push(">"),
5600
5638
  requiresStyleInsertion
5601
5639
  ? 0 === (completedSegments.instructions & 2)
5602
5640
  ? ((completedSegments.instructions |= 10),
@@ -5634,7 +5672,15 @@ function flushCompletedBoundary(request, destination, boundary) {
5634
5672
  completedSegments = scriptFormat
5635
5673
  ? destination.push(")\x3c/script>")
5636
5674
  : destination.push('"></template>');
5637
- return writeBootstrap(destination, request) && completedSegments;
5675
+ request = request.bootstrapChunks;
5676
+ for (boundary = 0; boundary < request.length - 1; boundary++)
5677
+ destination.push(request[boundary]);
5678
+ boundary < request.length
5679
+ ? ((boundary = request[boundary]),
5680
+ (request.length = 0),
5681
+ (destination = destination.push(boundary)))
5682
+ : (destination = !0);
5683
+ return destination && completedSegments;
5638
5684
  }
5639
5685
  function flushPartiallyCompletedSegment(
5640
5686
  request,
@@ -5659,6 +5705,7 @@ function flushPartiallyCompletedSegment(
5659
5705
  request = request.renderState;
5660
5706
  (segment = 0 === boundary.streamingFormat)
5661
5707
  ? (destination.push(request.startInlineScript),
5708
+ destination.push(">"),
5662
5709
  0 === (boundary.instructions & 1)
5663
5710
  ? ((boundary.instructions |= 1),
5664
5711
  destination.push(
@@ -5686,14 +5733,14 @@ function flushCompletedQueues(request, destination) {
5686
5733
  if (5 === completedRootSegment.status) return;
5687
5734
  var completedPreambleSegments = request.completedPreambleSegments;
5688
5735
  if (null === completedPreambleSegments) return;
5689
- var renderState = request.renderState;
5736
+ var resumableState = request.resumableState,
5737
+ renderState = request.renderState;
5690
5738
  if (
5691
5739
  (0 !== request.allPendingTasks ||
5692
5740
  null !== request.trackedPostpones) &&
5693
5741
  renderState.externalRuntimeScript
5694
5742
  ) {
5695
5743
  var _renderState$external = renderState.externalRuntimeScript,
5696
- resumableState = request.resumableState,
5697
5744
  src = _renderState$external.src,
5698
5745
  chunks = _renderState$external.chunks;
5699
5746
  resumableState.scriptResources.hasOwnProperty(src) ||
@@ -5746,22 +5793,13 @@ function flushCompletedQueues(request, destination) {
5746
5793
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
5747
5794
  destination.push(hoistableChunks[i$jscomp$0]);
5748
5795
  for (
5749
- renderState = hoistableChunks.length = 0;
5750
- renderState < completedPreambleSegments.length;
5751
- renderState++
5796
+ resumableState = hoistableChunks.length = 0;
5797
+ resumableState < completedPreambleSegments.length;
5798
+ resumableState++
5752
5799
  ) {
5753
- var segments = completedPreambleSegments[renderState];
5754
- for (
5755
- _renderState$external = 0;
5756
- _renderState$external < segments.length;
5757
- _renderState$external++
5758
- )
5759
- flushSegment(
5760
- request,
5761
- destination,
5762
- segments[_renderState$external],
5763
- null
5764
- );
5800
+ var segments = completedPreambleSegments[resumableState];
5801
+ for (renderState = 0; renderState < segments.length; renderState++)
5802
+ flushSegment(request, destination, segments[renderState], null);
5765
5803
  }
5766
5804
  var preamble$jscomp$0 = request.renderState.preamble,
5767
5805
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -5779,7 +5817,6 @@ function flushCompletedQueues(request, destination) {
5779
5817
  destination.push(bodyChunks[completedPreambleSegments]);
5780
5818
  flushSegment(request, destination, completedRootSegment, null);
5781
5819
  request.completedRootSegment = null;
5782
- writeBootstrap(destination, request.renderState);
5783
5820
  }
5784
5821
  var renderState$jscomp$0 = request.renderState;
5785
5822
  completedRootSegment = 0;
@@ -5824,6 +5861,7 @@ function flushCompletedQueues(request, destination) {
5824
5861
  scriptFormat = 0 === resumableState$jscomp$0.streamingFormat;
5825
5862
  scriptFormat
5826
5863
  ? (renderState$jscomp$0.push(renderState$jscomp$1.startInlineScript),
5864
+ renderState$jscomp$0.push(">"),
5827
5865
  0 === (resumableState$jscomp$0.instructions & 4)
5828
5866
  ? ((resumableState$jscomp$0.instructions |= 4),
5829
5867
  renderState$jscomp$0.push(
@@ -6044,4 +6082,4 @@ exports.experimental_renderToHTML = function (children, options) {
6044
6082
  });
6045
6083
  });
6046
6084
  };
6047
- exports.version = "19.2.0-experimental-197d6a04-20250424";
6085
+ exports.version = "19.2.0-experimental-c498bfce-20250426";
@@ -5394,8 +5394,8 @@
5394
5394
  ) {
5395
5395
  var inlineScriptWithNonce =
5396
5396
  void 0 === nonce
5397
- ? "<script>"
5398
- : '<script nonce="' + escapeTextForBrowser(nonce) + '">',
5397
+ ? "<script"
5398
+ : '<script nonce="' + escapeTextForBrowser(nonce) + '"',
5399
5399
  idPrefix = resumableState.idPrefix,
5400
5400
  bootstrapChunks = [],
5401
5401
  externalRuntimeScript = null,
@@ -5403,11 +5403,13 @@
5403
5403
  bootstrapScripts = resumableState.bootstrapScripts,
5404
5404
  bootstrapModules = resumableState.bootstrapModules;
5405
5405
  void 0 !== bootstrapScriptContent &&
5406
+ (bootstrapChunks.push(inlineScriptWithNonce),
5407
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
5406
5408
  bootstrapChunks.push(
5407
- inlineScriptWithNonce,
5409
+ endOfStartTag,
5408
5410
  escapeEntireInlineScriptContent(bootstrapScriptContent),
5409
5411
  "\x3c/script>"
5410
- );
5412
+ ));
5411
5413
  void 0 !== externalRuntimeConfig &&
5412
5414
  ("string" === typeof externalRuntimeConfig
5413
5415
  ? ((externalRuntimeScript = {
@@ -5528,21 +5530,29 @@
5528
5530
  ),
5529
5531
  bootstrapChunks.push(
5530
5532
  '<script src="',
5531
- escapeTextForBrowser(externalRuntimeScript)
5533
+ escapeTextForBrowser(externalRuntimeScript),
5534
+ attributeEnd
5532
5535
  ),
5533
5536
  nonce &&
5534
- bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
5537
+ bootstrapChunks.push(
5538
+ ' nonce="',
5539
+ escapeTextForBrowser(nonce),
5540
+ attributeEnd
5541
+ ),
5535
5542
  "string" === typeof maxHeadersLength &&
5536
5543
  bootstrapChunks.push(
5537
- '" integrity="',
5538
- escapeTextForBrowser(maxHeadersLength)
5544
+ ' integrity="',
5545
+ escapeTextForBrowser(maxHeadersLength),
5546
+ attributeEnd
5539
5547
  ),
5540
5548
  "string" === typeof importMap &&
5541
5549
  bootstrapChunks.push(
5542
- '" crossorigin="',
5543
- escapeTextForBrowser(importMap)
5550
+ ' crossorigin="',
5551
+ escapeTextForBrowser(importMap),
5552
+ attributeEnd
5544
5553
  ),
5545
- bootstrapChunks.push('" async="">\x3c/script>');
5554
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
5555
+ bootstrapChunks.push(' async="">\x3c/script>');
5546
5556
  if (void 0 !== bootstrapModules)
5547
5557
  for (
5548
5558
  bootstrapScripts = 0;
@@ -5578,21 +5588,29 @@
5578
5588
  ),
5579
5589
  bootstrapChunks.push(
5580
5590
  '<script type="module" src="',
5581
- escapeTextForBrowser(idPrefix)
5591
+ escapeTextForBrowser(idPrefix),
5592
+ attributeEnd
5582
5593
  ),
5583
5594
  nonce &&
5584
- bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
5595
+ bootstrapChunks.push(
5596
+ ' nonce="',
5597
+ escapeTextForBrowser(nonce),
5598
+ attributeEnd
5599
+ ),
5585
5600
  "string" === typeof importMap &&
5586
5601
  bootstrapChunks.push(
5587
- '" integrity="',
5588
- escapeTextForBrowser(importMap)
5602
+ ' integrity="',
5603
+ escapeTextForBrowser(importMap),
5604
+ attributeEnd
5589
5605
  ),
5590
5606
  "string" === typeof externalRuntimeScript &&
5591
5607
  bootstrapChunks.push(
5592
- '" crossorigin="',
5593
- escapeTextForBrowser(externalRuntimeScript)
5608
+ ' crossorigin="',
5609
+ escapeTextForBrowser(externalRuntimeScript),
5610
+ attributeEnd
5594
5611
  ),
5595
- bootstrapChunks.push('" async="">\x3c/script>');
5612
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
5613
+ bootstrapChunks.push(' async="">\x3c/script>');
5596
5614
  return onHeaders;
5597
5615
  }
5598
5616
  function createResumableState(
@@ -6211,14 +6229,29 @@
6211
6229
  return content;
6212
6230
  }
6213
6231
  function injectFormReplayingRuntime(resumableState, renderState) {
6214
- 0 !== (resumableState.instructions & 16) ||
6215
- renderState.externalRuntimeScript ||
6216
- ((resumableState.instructions |= 16),
6217
- renderState.bootstrapChunks.unshift(
6218
- renderState.startInlineScript,
6219
- formReplayingRuntimeScript,
6220
- "\x3c/script>"
6221
- ));
6232
+ if (
6233
+ 0 === (resumableState.instructions & 16) &&
6234
+ !renderState.externalRuntimeScript
6235
+ ) {
6236
+ resumableState.instructions |= 16;
6237
+ var preamble = renderState.preamble,
6238
+ bootstrapChunks = renderState.bootstrapChunks;
6239
+ (preamble.htmlChunks || preamble.headChunks) &&
6240
+ 0 === bootstrapChunks.length
6241
+ ? (bootstrapChunks.push(renderState.startInlineScript),
6242
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
6243
+ bootstrapChunks.push(
6244
+ endOfStartTag,
6245
+ formReplayingRuntimeScript,
6246
+ "\x3c/script>"
6247
+ ))
6248
+ : bootstrapChunks.unshift(
6249
+ renderState.startInlineScript,
6250
+ endOfStartTag,
6251
+ formReplayingRuntimeScript,
6252
+ "\x3c/script>"
6253
+ );
6254
+ }
6222
6255
  }
6223
6256
  function pushLinkImpl(target, props) {
6224
6257
  target.push(startChunkForTag("link"));
@@ -7690,14 +7723,6 @@
7690
7723
  preambleState.bodyChunks &&
7691
7724
  (renderState.bodyChunks = preambleState.bodyChunks);
7692
7725
  }
7693
- function writeBootstrap(destination, renderState) {
7694
- renderState = renderState.bootstrapChunks;
7695
- for (var i = 0; i < renderState.length - 1; i++)
7696
- destination.push(renderState[i]);
7697
- return i < renderState.length
7698
- ? ((i = renderState[i]), (renderState.length = 0), destination.push(i))
7699
- : !0;
7700
- }
7701
7726
  function writeStartPendingSuspenseBoundary(destination, renderState, id) {
7702
7727
  destination.push('\x3c!--$?--\x3e<template id="');
7703
7728
  if (null === id)
@@ -7950,6 +7975,15 @@
7950
7975
  styleQueue.sheets.forEach(preloadLateStyle, this);
7951
7976
  styleQueue.sheets.clear();
7952
7977
  }
7978
+ function pushCompletedShellIdAttribute(target, resumableState) {
7979
+ 0 === (resumableState.instructions & 32) &&
7980
+ ((resumableState.instructions |= 32),
7981
+ target.push(
7982
+ completedShellIdAttributeStart,
7983
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
7984
+ attributeEnd
7985
+ ));
7986
+ }
7953
7987
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
7954
7988
  destination.push(arrayFirstOpenBracket);
7955
7989
  var nextArrayOpenBrackChunk = arrayFirstOpenBracket;
@@ -8703,6 +8737,7 @@
8703
8737
  this.fatalError = null;
8704
8738
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
8705
8739
  this.completedPreambleSegments = this.completedRootSegment = null;
8740
+ this.byteSize = 0;
8706
8741
  this.abortableTasks = abortSet;
8707
8742
  this.pingedTasks = [];
8708
8743
  this.clientRenderedBoundaries = [];
@@ -9911,9 +9946,11 @@
9911
9946
  (renderNode(request, task, content, -1),
9912
9947
  (contentRootSegment.status = 1),
9913
9948
  queueCompletedSegment(newBoundary, contentRootSegment),
9914
- 0 === newBoundary.pendingTasks && 0 === newBoundary.status)
9949
+ 0 === newBoundary.pendingTasks &&
9950
+ 0 === newBoundary.status &&
9951
+ ((newBoundary.status = 1),
9952
+ !(newBoundary.byteSize > request.progressiveChunkSize)))
9915
9953
  ) {
9916
- newBoundary.status = 1;
9917
9954
  0 === request.pendingRootTasks &&
9918
9955
  task.blockedPreamble &&
9919
9956
  preparePreamble(request);
@@ -11299,11 +11336,12 @@
11299
11336
  boundary.parentFlushed &&
11300
11337
  request.completedBoundaries.push(boundary),
11301
11338
  1 === boundary.status &&
11302
- (boundary.fallbackAbortableTasks.forEach(
11303
- abortTaskSoft,
11304
- request
11305
- ),
11306
- boundary.fallbackAbortableTasks.clear(),
11339
+ (boundary.byteSize > request.progressiveChunkSize ||
11340
+ (boundary.fallbackAbortableTasks.forEach(
11341
+ abortTaskSoft,
11342
+ request
11343
+ ),
11344
+ boundary.fallbackAbortableTasks.clear()),
11307
11345
  0 === request.pendingRootTasks &&
11308
11346
  null === request.trackedPostpones &&
11309
11347
  null !== boundary.contentPreamble &&
@@ -11798,6 +11836,7 @@
11798
11836
  var scriptFormat = 0 === completedSegments.streamingFormat;
11799
11837
  scriptFormat
11800
11838
  ? (destination.push(request.startInlineScript),
11839
+ destination.push(endOfStartTag),
11801
11840
  requiresStyleInsertion
11802
11841
  ? 0 === (completedSegments.instructions & 2)
11803
11842
  ? ((completedSegments.instructions |= 10),
@@ -11835,7 +11874,15 @@
11835
11874
  completedSegments = scriptFormat
11836
11875
  ? destination.push(")\x3c/script>")
11837
11876
  : destination.push('"></template>');
11838
- return writeBootstrap(destination, request) && completedSegments;
11877
+ request = request.bootstrapChunks;
11878
+ for (boundary = 0; boundary < request.length - 1; boundary++)
11879
+ destination.push(request[boundary]);
11880
+ boundary < request.length
11881
+ ? ((boundary = request[boundary]),
11882
+ (request.length = 0),
11883
+ (destination = destination.push(boundary)))
11884
+ : (destination = !0);
11885
+ return destination && completedSegments;
11839
11886
  }
11840
11887
  function flushPartiallyCompletedSegment(
11841
11888
  request,
@@ -11870,6 +11917,7 @@
11870
11917
  request = request.renderState;
11871
11918
  (segment = 0 === boundary.streamingFormat)
11872
11919
  ? (destination.push(request.startInlineScript),
11920
+ destination.push(endOfStartTag),
11873
11921
  0 === (boundary.instructions & 1)
11874
11922
  ? ((boundary.instructions |= 1),
11875
11923
  destination.push(
@@ -11897,14 +11945,14 @@
11897
11945
  if (5 === completedRootSegment.status) return;
11898
11946
  var completedPreambleSegments = request.completedPreambleSegments;
11899
11947
  if (null === completedPreambleSegments) return;
11900
- var renderState = request.renderState;
11948
+ var resumableState = request.resumableState,
11949
+ renderState = request.renderState;
11901
11950
  if (
11902
11951
  (0 !== request.allPendingTasks ||
11903
11952
  null !== request.trackedPostpones) &&
11904
11953
  renderState.externalRuntimeScript
11905
11954
  ) {
11906
11955
  var _renderState$external = renderState.externalRuntimeScript,
11907
- resumableState = request.resumableState,
11908
11956
  src = _renderState$external.src,
11909
11957
  chunks = _renderState$external.chunks;
11910
11958
  resumableState.scriptResources.hasOwnProperty(src) ||
@@ -11977,22 +12025,17 @@
11977
12025
  )
11978
12026
  destination.push(hoistableChunks[i$jscomp$0]);
11979
12027
  for (
11980
- renderState = hoistableChunks.length = 0;
11981
- renderState < completedPreambleSegments.length;
11982
- renderState++
12028
+ resumableState = hoistableChunks.length = 0;
12029
+ resumableState < completedPreambleSegments.length;
12030
+ resumableState++
11983
12031
  ) {
11984
- var segments = completedPreambleSegments[renderState];
12032
+ var segments = completedPreambleSegments[resumableState];
11985
12033
  for (
11986
- _renderState$external = 0;
11987
- _renderState$external < segments.length;
11988
- _renderState$external++
12034
+ renderState = 0;
12035
+ renderState < segments.length;
12036
+ renderState++
11989
12037
  )
11990
- flushSegment(
11991
- request,
11992
- destination,
11993
- segments[_renderState$external],
11994
- null
11995
- );
12038
+ flushSegment(request, destination, segments[renderState], null);
11996
12039
  }
11997
12040
  var preamble$jscomp$0 = request.renderState.preamble,
11998
12041
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -12010,7 +12053,6 @@
12010
12053
  destination.push(bodyChunks[completedPreambleSegments]);
12011
12054
  flushSegment(request, destination, completedRootSegment, null);
12012
12055
  request.completedRootSegment = null;
12013
- writeBootstrap(destination, request.renderState);
12014
12056
  }
12015
12057
  var renderState$jscomp$0 = request.renderState;
12016
12058
  completedRootSegment = 0;
@@ -12060,6 +12102,7 @@
12060
12102
  ? (renderState$jscomp$0.push(
12061
12103
  renderState$jscomp$1.startInlineScript
12062
12104
  ),
12105
+ renderState$jscomp$0.push(endOfStartTag),
12063
12106
  0 === (resumableState$jscomp$0.instructions & 4)
12064
12107
  ? ((resumableState$jscomp$0.instructions |= 4),
12065
12108
  renderState$jscomp$0.push(
@@ -13386,6 +13429,7 @@
13386
13429
  destinationHasCapacity = !0,
13387
13430
  stylesheetFlushingQueue = [],
13388
13431
  spaceSeparator = " ",
13432
+ completedShellIdAttributeStart = ' id="',
13389
13433
  arrayFirstOpenBracket = "[",
13390
13434
  arraySubsequentOpenBracket = ",[",
13391
13435
  arrayInterstitial = ",",
@@ -13782,5 +13826,5 @@
13782
13826
  });
13783
13827
  });
13784
13828
  };
13785
- exports.version = "19.2.0-experimental-197d6a04-20250424";
13829
+ exports.version = "19.2.0-experimental-c498bfce-20250426";
13786
13830
  })();
@@ -3219,8 +3219,8 @@ function createRenderState(
3219
3219
  ) {
3220
3220
  var inlineScriptWithNonce =
3221
3221
  void 0 === nonce
3222
- ? "<script>"
3223
- : '<script nonce="' + escapeTextForBrowser(nonce) + '">',
3222
+ ? "<script"
3223
+ : '<script nonce="' + escapeTextForBrowser(nonce) + '"',
3224
3224
  idPrefix = resumableState.idPrefix,
3225
3225
  bootstrapChunks = [],
3226
3226
  externalRuntimeScript = null,
@@ -3228,11 +3228,13 @@ function createRenderState(
3228
3228
  bootstrapScripts = resumableState.bootstrapScripts,
3229
3229
  bootstrapModules = resumableState.bootstrapModules;
3230
3230
  void 0 !== bootstrapScriptContent &&
3231
+ (bootstrapChunks.push(inlineScriptWithNonce),
3232
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
3231
3233
  bootstrapChunks.push(
3232
- inlineScriptWithNonce,
3234
+ ">",
3233
3235
  ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
3234
3236
  "\x3c/script>"
3235
- );
3237
+ ));
3236
3238
  void 0 !== externalRuntimeConfig &&
3237
3239
  ("string" === typeof externalRuntimeConfig
3238
3240
  ? ((externalRuntimeScript = { src: externalRuntimeConfig, chunks: [] }),
@@ -3342,19 +3344,27 @@ function createRenderState(
3342
3344
  (externalRuntimeConfig = []),
3343
3345
  pushLinkImpl(externalRuntimeConfig, maxHeadersLength),
3344
3346
  onHeaders.bootstrapScripts.add(externalRuntimeConfig),
3345
- bootstrapChunks.push('<script src="', escapeTextForBrowser(idPrefix)),
3346
- nonce && bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
3347
+ bootstrapChunks.push(
3348
+ '<script src="',
3349
+ escapeTextForBrowser(idPrefix),
3350
+ '"'
3351
+ ),
3352
+ nonce &&
3353
+ bootstrapChunks.push(' nonce="', escapeTextForBrowser(nonce), '"'),
3347
3354
  "string" === typeof importMap &&
3348
3355
  bootstrapChunks.push(
3349
- '" integrity="',
3350
- escapeTextForBrowser(importMap)
3356
+ ' integrity="',
3357
+ escapeTextForBrowser(importMap),
3358
+ '"'
3351
3359
  ),
3352
3360
  "string" === typeof externalRuntimeScript &&
3353
3361
  bootstrapChunks.push(
3354
- '" crossorigin="',
3355
- escapeTextForBrowser(externalRuntimeScript)
3362
+ ' crossorigin="',
3363
+ escapeTextForBrowser(externalRuntimeScript),
3364
+ '"'
3356
3365
  ),
3357
- bootstrapChunks.push('" async="">\x3c/script>');
3366
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
3367
+ bootstrapChunks.push(' async="">\x3c/script>');
3358
3368
  if (void 0 !== bootstrapModules)
3359
3369
  for (
3360
3370
  bootstrapScripts = 0;
@@ -3391,20 +3401,25 @@ function createRenderState(
3391
3401
  onHeaders.bootstrapScripts.add(maxHeadersLength),
3392
3402
  bootstrapChunks.push(
3393
3403
  '<script type="module" src="',
3394
- escapeTextForBrowser(inlineScriptWithNonce)
3404
+ escapeTextForBrowser(inlineScriptWithNonce),
3405
+ '"'
3395
3406
  ),
3396
- nonce && bootstrapChunks.push('" nonce="', escapeTextForBrowser(nonce)),
3407
+ nonce &&
3408
+ bootstrapChunks.push(' nonce="', escapeTextForBrowser(nonce), '"'),
3397
3409
  "string" === typeof externalRuntimeScript &&
3398
3410
  bootstrapChunks.push(
3399
- '" integrity="',
3400
- escapeTextForBrowser(externalRuntimeScript)
3411
+ ' integrity="',
3412
+ escapeTextForBrowser(externalRuntimeScript),
3413
+ '"'
3401
3414
  ),
3402
3415
  "string" === typeof idPrefix &&
3403
3416
  bootstrapChunks.push(
3404
- '" crossorigin="',
3405
- escapeTextForBrowser(idPrefix)
3417
+ ' crossorigin="',
3418
+ escapeTextForBrowser(idPrefix),
3419
+ '"'
3406
3420
  ),
3407
- bootstrapChunks.push('" async="">\x3c/script>');
3421
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
3422
+ bootstrapChunks.push(' async="">\x3c/script>');
3408
3423
  return onHeaders;
3409
3424
  }
3410
3425
  function createResumableState(
@@ -3826,14 +3841,28 @@ function flattenOptionChildren(children) {
3826
3841
  return content;
3827
3842
  }
3828
3843
  function injectFormReplayingRuntime(resumableState, renderState) {
3829
- 0 !== (resumableState.instructions & 16) ||
3830
- renderState.externalRuntimeScript ||
3831
- ((resumableState.instructions |= 16),
3832
- renderState.bootstrapChunks.unshift(
3833
- renderState.startInlineScript,
3834
- '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))}});',
3835
- "\x3c/script>"
3836
- ));
3844
+ if (
3845
+ 0 === (resumableState.instructions & 16) &&
3846
+ !renderState.externalRuntimeScript
3847
+ ) {
3848
+ resumableState.instructions |= 16;
3849
+ var preamble = renderState.preamble,
3850
+ bootstrapChunks = renderState.bootstrapChunks;
3851
+ (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
3852
+ ? (bootstrapChunks.push(renderState.startInlineScript),
3853
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
3854
+ bootstrapChunks.push(
3855
+ ">",
3856
+ '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))}});',
3857
+ "\x3c/script>"
3858
+ ))
3859
+ : bootstrapChunks.unshift(
3860
+ renderState.startInlineScript,
3861
+ ">",
3862
+ '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))}});',
3863
+ "\x3c/script>"
3864
+ );
3865
+ }
3837
3866
  }
3838
3867
  function pushLinkImpl(target, props) {
3839
3868
  target.push(startChunkForTag("link"));
@@ -5037,14 +5066,6 @@ function hoistPreambleState(renderState, preambleState) {
5037
5066
  preambleState.bodyChunks &&
5038
5067
  (renderState.bodyChunks = preambleState.bodyChunks);
5039
5068
  }
5040
- function writeBootstrap(destination, renderState) {
5041
- renderState = renderState.bootstrapChunks;
5042
- for (var i = 0; i < renderState.length - 1; i++)
5043
- destination.push(renderState[i]);
5044
- return i < renderState.length
5045
- ? ((i = renderState[i]), (renderState.length = 0), destination.push(i))
5046
- : !0;
5047
- }
5048
5069
  function writeStartPendingSuspenseBoundary(destination, renderState, id) {
5049
5070
  destination.push('\x3c!--$?--\x3e<template id="');
5050
5071
  if (null === id)
@@ -5289,6 +5310,15 @@ function preloadLateStyles(styleQueue) {
5289
5310
  styleQueue.sheets.forEach(preloadLateStyle, this);
5290
5311
  styleQueue.sheets.clear();
5291
5312
  }
5313
+ function pushCompletedShellIdAttribute(target, resumableState) {
5314
+ 0 === (resumableState.instructions & 32) &&
5315
+ ((resumableState.instructions |= 32),
5316
+ target.push(
5317
+ ' id="',
5318
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
5319
+ '"'
5320
+ ));
5321
+ }
5292
5322
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
5293
5323
  destination.push("[");
5294
5324
  var nextArrayOpenBrackChunk = "[";
@@ -6074,6 +6104,7 @@ function RequestInstance(
6074
6104
  this.fatalError = null;
6075
6105
  this.pendingRootTasks = this.allPendingTasks = this.nextSegmentId = 0;
6076
6106
  this.completedPreambleSegments = this.completedRootSegment = null;
6107
+ this.byteSize = 0;
6077
6108
  this.abortableTasks = abortSet;
6078
6109
  this.pingedTasks = [];
6079
6110
  this.clientRenderedBoundaries = [];
@@ -6775,9 +6806,11 @@ function renderElement(request, task, keyPath, type, props, ref) {
6775
6806
  (renderNode(request, task, props, -1),
6776
6807
  (textEmbedded.status = 1),
6777
6808
  queueCompletedSegment(propName, textEmbedded),
6778
- 0 === propName.pendingTasks && 0 === propName.status)
6809
+ 0 === propName.pendingTasks &&
6810
+ 0 === propName.status &&
6811
+ ((propName.status = 1),
6812
+ !(propName.byteSize > request.progressiveChunkSize)))
6779
6813
  ) {
6780
- propName.status = 1;
6781
6814
  0 === request.pendingRootTasks &&
6782
6815
  task.blockedPreamble &&
6783
6816
  preparePreamble(request);
@@ -7873,8 +7906,12 @@ function finishedTask(request, boundary, segment) {
7873
7906
  boundary.parentFlushed &&
7874
7907
  request.completedBoundaries.push(boundary),
7875
7908
  1 === boundary.status &&
7876
- (boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request),
7877
- boundary.fallbackAbortableTasks.clear(),
7909
+ (boundary.byteSize > request.progressiveChunkSize ||
7910
+ (boundary.fallbackAbortableTasks.forEach(
7911
+ abortTaskSoft,
7912
+ request
7913
+ ),
7914
+ boundary.fallbackAbortableTasks.clear()),
7878
7915
  0 === request.pendingRootTasks &&
7879
7916
  null === request.trackedPostpones &&
7880
7917
  null !== boundary.contentPreamble &&
@@ -8300,6 +8337,7 @@ function flushCompletedBoundary(request, destination, boundary) {
8300
8337
  var scriptFormat = 0 === completedSegments.streamingFormat;
8301
8338
  scriptFormat
8302
8339
  ? (destination.push(request.startInlineScript),
8340
+ destination.push(">"),
8303
8341
  requiresStyleInsertion
8304
8342
  ? 0 === (completedSegments.instructions & 2)
8305
8343
  ? ((completedSegments.instructions |= 10),
@@ -8337,7 +8375,15 @@ function flushCompletedBoundary(request, destination, boundary) {
8337
8375
  completedSegments = scriptFormat
8338
8376
  ? destination.push(")\x3c/script>")
8339
8377
  : destination.push('"></template>');
8340
- return writeBootstrap(destination, request) && completedSegments;
8378
+ request = request.bootstrapChunks;
8379
+ for (boundary = 0; boundary < request.length - 1; boundary++)
8380
+ destination.push(request[boundary]);
8381
+ boundary < request.length
8382
+ ? ((boundary = request[boundary]),
8383
+ (request.length = 0),
8384
+ (destination = destination.push(boundary)))
8385
+ : (destination = !0);
8386
+ return destination && completedSegments;
8341
8387
  }
8342
8388
  function flushPartiallyCompletedSegment(
8343
8389
  request,
@@ -8362,6 +8408,7 @@ function flushPartiallyCompletedSegment(
8362
8408
  request = request.renderState;
8363
8409
  (segment = 0 === boundary.streamingFormat)
8364
8410
  ? (destination.push(request.startInlineScript),
8411
+ destination.push(">"),
8365
8412
  0 === (boundary.instructions & 1)
8366
8413
  ? ((boundary.instructions |= 1),
8367
8414
  destination.push(
@@ -8389,14 +8436,14 @@ function flushCompletedQueues(request, destination) {
8389
8436
  if (5 === completedRootSegment.status) return;
8390
8437
  var completedPreambleSegments = request.completedPreambleSegments;
8391
8438
  if (null === completedPreambleSegments) return;
8392
- var renderState = request.renderState;
8439
+ var resumableState = request.resumableState,
8440
+ renderState = request.renderState;
8393
8441
  if (
8394
8442
  (0 !== request.allPendingTasks ||
8395
8443
  null !== request.trackedPostpones) &&
8396
8444
  renderState.externalRuntimeScript
8397
8445
  ) {
8398
8446
  var _renderState$external = renderState.externalRuntimeScript,
8399
- resumableState = request.resumableState,
8400
8447
  src = _renderState$external.src,
8401
8448
  chunks = _renderState$external.chunks;
8402
8449
  resumableState.scriptResources.hasOwnProperty(src) ||
@@ -8449,22 +8496,13 @@ function flushCompletedQueues(request, destination) {
8449
8496
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
8450
8497
  destination.push(hoistableChunks[i$jscomp$0]);
8451
8498
  for (
8452
- renderState = hoistableChunks.length = 0;
8453
- renderState < completedPreambleSegments.length;
8454
- renderState++
8499
+ resumableState = hoistableChunks.length = 0;
8500
+ resumableState < completedPreambleSegments.length;
8501
+ resumableState++
8455
8502
  ) {
8456
- var segments = completedPreambleSegments[renderState];
8457
- for (
8458
- _renderState$external = 0;
8459
- _renderState$external < segments.length;
8460
- _renderState$external++
8461
- )
8462
- flushSegment(
8463
- request,
8464
- destination,
8465
- segments[_renderState$external],
8466
- null
8467
- );
8503
+ var segments = completedPreambleSegments[resumableState];
8504
+ for (renderState = 0; renderState < segments.length; renderState++)
8505
+ flushSegment(request, destination, segments[renderState], null);
8468
8506
  }
8469
8507
  var preamble$jscomp$0 = request.renderState.preamble,
8470
8508
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
@@ -8482,7 +8520,6 @@ function flushCompletedQueues(request, destination) {
8482
8520
  destination.push(bodyChunks[completedPreambleSegments]);
8483
8521
  flushSegment(request, destination, completedRootSegment, null);
8484
8522
  request.completedRootSegment = null;
8485
- writeBootstrap(destination, request.renderState);
8486
8523
  }
8487
8524
  var renderState$jscomp$0 = request.renderState;
8488
8525
  completedRootSegment = 0;
@@ -8527,6 +8564,7 @@ function flushCompletedQueues(request, destination) {
8527
8564
  scriptFormat = 0 === resumableState$jscomp$0.streamingFormat;
8528
8565
  scriptFormat
8529
8566
  ? (renderState$jscomp$0.push(renderState$jscomp$1.startInlineScript),
8567
+ renderState$jscomp$0.push(">"),
8530
8568
  0 === (resumableState$jscomp$0.instructions & 4)
8531
8569
  ? ((resumableState$jscomp$0.instructions |= 4),
8532
8570
  renderState$jscomp$0.push(
@@ -8984,4 +9022,4 @@ exports.experimental_renderToHTML = function (children, options) {
8984
9022
  });
8985
9023
  });
8986
9024
  };
8987
- exports.version = "19.2.0-experimental-197d6a04-20250424";
9025
+ exports.version = "19.2.0-experimental-c498bfce-20250426";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-markup",
3
- "version": "0.0.0-experimental-197d6a04-20250424",
3
+ "version": "0.0.0-experimental-c498bfce-20250426",
4
4
  "description": "React package generating embedded markup such as e-mails with support for Server Components.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "homepage": "https://react.dev/",
19
19
  "peerDependencies": {
20
- "react": "0.0.0-experimental-197d6a04-20250424"
20
+ "react": "0.0.0-experimental-c498bfce-20250426"
21
21
  },
22
22
  "files": [
23
23
  "LICENSE",