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.
@@ -677,13 +677,25 @@ function flattenOptionChildren(children) {
677
677
  return content;
678
678
  }
679
679
  function injectFormReplayingRuntime(resumableState, renderState) {
680
- 0 === (resumableState.instructions & 16) &&
681
- ((resumableState.instructions |= 16),
682
- renderState.bootstrapChunks.unshift(
683
- renderState.startInlineScript,
684
- '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))}});',
685
- "\x3c/script>"
686
- ));
680
+ if (0 === (resumableState.instructions & 16)) {
681
+ resumableState.instructions |= 16;
682
+ var preamble = renderState.preamble,
683
+ bootstrapChunks = renderState.bootstrapChunks;
684
+ (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
685
+ ? (bootstrapChunks.push(renderState.startInlineScript),
686
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
687
+ bootstrapChunks.push(
688
+ ">",
689
+ '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))}});',
690
+ "\x3c/script>"
691
+ ))
692
+ : bootstrapChunks.unshift(
693
+ renderState.startInlineScript,
694
+ ">",
695
+ '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))}});',
696
+ "\x3c/script>"
697
+ );
698
+ }
687
699
  }
688
700
  function pushLinkImpl(target, props) {
689
701
  target.push(startChunkForTag("link"));
@@ -2118,6 +2130,15 @@ function preloadLateStyles(styleQueue) {
2118
2130
  styleQueue.sheets.forEach(preloadLateStyle, this);
2119
2131
  styleQueue.sheets.clear();
2120
2132
  }
2133
+ function pushCompletedShellIdAttribute(target, resumableState) {
2134
+ 0 === (resumableState.instructions & 32) &&
2135
+ ((resumableState.instructions |= 32),
2136
+ target.push(
2137
+ ' id="',
2138
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
2139
+ '"'
2140
+ ));
2141
+ }
2121
2142
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
2122
2143
  destination.push("[");
2123
2144
  var nextArrayOpenBrackChunk = "[";
@@ -2628,23 +2649,25 @@ function createRenderState(resumableState, generateStaticMarkup) {
2628
2649
  bootstrapScripts = resumableState.bootstrapScripts,
2629
2650
  bootstrapModules = resumableState.bootstrapModules;
2630
2651
  void 0 !== bootstrapScriptContent &&
2652
+ (bootstrapChunks.push("<script"),
2653
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
2631
2654
  bootstrapChunks.push(
2632
- "<script>",
2655
+ ">",
2633
2656
  ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
2634
2657
  "\x3c/script>"
2635
- );
2658
+ ));
2636
2659
  bootstrapScriptContent = idPrefix + "P:";
2637
- var JSCompiler_object_inline_segmentPrefix_1538 = idPrefix + "S:";
2660
+ var JSCompiler_object_inline_segmentPrefix_1576 = idPrefix + "S:";
2638
2661
  idPrefix += "B:";
2639
- var JSCompiler_object_inline_preamble_1541 = createPreambleState(),
2640
- JSCompiler_object_inline_preconnects_1551 = new Set(),
2641
- JSCompiler_object_inline_fontPreloads_1552 = new Set(),
2642
- JSCompiler_object_inline_highImagePreloads_1553 = new Set(),
2643
- JSCompiler_object_inline_styles_1554 = new Map(),
2644
- JSCompiler_object_inline_bootstrapScripts_1555 = new Set(),
2645
- JSCompiler_object_inline_scripts_1556 = new Set(),
2646
- JSCompiler_object_inline_bulkPreloads_1557 = new Set(),
2647
- JSCompiler_object_inline_preloads_1558 = {
2662
+ var JSCompiler_object_inline_preamble_1579 = createPreambleState(),
2663
+ JSCompiler_object_inline_preconnects_1589 = new Set(),
2664
+ JSCompiler_object_inline_fontPreloads_1590 = new Set(),
2665
+ JSCompiler_object_inline_highImagePreloads_1591 = new Set(),
2666
+ JSCompiler_object_inline_styles_1592 = new Map(),
2667
+ JSCompiler_object_inline_bootstrapScripts_1593 = new Set(),
2668
+ JSCompiler_object_inline_scripts_1594 = new Set(),
2669
+ JSCompiler_object_inline_bulkPreloads_1595 = new Set(),
2670
+ JSCompiler_object_inline_preloads_1596 = {
2648
2671
  images: new Map(),
2649
2672
  stylesheets: new Map(),
2650
2673
  scripts: new Map(),
@@ -2681,16 +2704,22 @@ function createRenderState(resumableState, generateStaticMarkup) {
2681
2704
  scriptConfig.moduleScriptResources[href] = null;
2682
2705
  scriptConfig = [];
2683
2706
  pushLinkImpl(scriptConfig, props);
2684
- JSCompiler_object_inline_bootstrapScripts_1555.add(scriptConfig);
2685
- bootstrapChunks.push('<script src="', escapeTextForBrowser(src));
2707
+ JSCompiler_object_inline_bootstrapScripts_1593.add(scriptConfig);
2708
+ bootstrapChunks.push('<script src="', escapeTextForBrowser(src), '"');
2686
2709
  "string" === typeof integrity &&
2687
- bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity));
2710
+ bootstrapChunks.push(
2711
+ ' integrity="',
2712
+ escapeTextForBrowser(integrity),
2713
+ '"'
2714
+ );
2688
2715
  "string" === typeof crossOrigin &&
2689
2716
  bootstrapChunks.push(
2690
- '" crossorigin="',
2691
- escapeTextForBrowser(crossOrigin)
2717
+ ' crossorigin="',
2718
+ escapeTextForBrowser(crossOrigin),
2719
+ '"'
2692
2720
  );
2693
- bootstrapChunks.push('" async="">\x3c/script>');
2721
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState);
2722
+ bootstrapChunks.push(' async="">\x3c/script>');
2694
2723
  }
2695
2724
  if (void 0 !== bootstrapModules)
2696
2725
  for (
@@ -2722,25 +2751,32 @@ function createRenderState(resumableState, generateStaticMarkup) {
2722
2751
  (props.moduleScriptResources[scriptConfig] = null),
2723
2752
  (props = []),
2724
2753
  pushLinkImpl(props, integrity),
2725
- JSCompiler_object_inline_bootstrapScripts_1555.add(props),
2754
+ JSCompiler_object_inline_bootstrapScripts_1593.add(props),
2726
2755
  bootstrapChunks.push(
2727
2756
  '<script type="module" src="',
2728
- escapeTextForBrowser(i)
2757
+ escapeTextForBrowser(i),
2758
+ '"'
2729
2759
  ),
2730
2760
  "string" === typeof crossOrigin &&
2731
2761
  bootstrapChunks.push(
2732
- '" integrity="',
2733
- escapeTextForBrowser(crossOrigin)
2762
+ ' integrity="',
2763
+ escapeTextForBrowser(crossOrigin),
2764
+ '"'
2734
2765
  ),
2735
2766
  "string" === typeof src &&
2736
- bootstrapChunks.push('" crossorigin="', escapeTextForBrowser(src)),
2737
- bootstrapChunks.push('" async="">\x3c/script>');
2767
+ bootstrapChunks.push(
2768
+ ' crossorigin="',
2769
+ escapeTextForBrowser(src),
2770
+ '"'
2771
+ ),
2772
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
2773
+ bootstrapChunks.push(' async="">\x3c/script>');
2738
2774
  return {
2739
2775
  placeholderPrefix: bootstrapScriptContent,
2740
- segmentPrefix: JSCompiler_object_inline_segmentPrefix_1538,
2776
+ segmentPrefix: JSCompiler_object_inline_segmentPrefix_1576,
2741
2777
  boundaryPrefix: idPrefix,
2742
- startInlineScript: "<script>",
2743
- preamble: JSCompiler_object_inline_preamble_1541,
2778
+ startInlineScript: "<script",
2779
+ preamble: JSCompiler_object_inline_preamble_1579,
2744
2780
  externalRuntimeScript: null,
2745
2781
  bootstrapChunks: bootstrapChunks,
2746
2782
  importMapChunks: [],
@@ -2756,14 +2792,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
2756
2792
  charsetChunks: [],
2757
2793
  viewportChunks: [],
2758
2794
  hoistableChunks: [],
2759
- preconnects: JSCompiler_object_inline_preconnects_1551,
2760
- fontPreloads: JSCompiler_object_inline_fontPreloads_1552,
2761
- highImagePreloads: JSCompiler_object_inline_highImagePreloads_1553,
2762
- styles: JSCompiler_object_inline_styles_1554,
2763
- bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1555,
2764
- scripts: JSCompiler_object_inline_scripts_1556,
2765
- bulkPreloads: JSCompiler_object_inline_bulkPreloads_1557,
2766
- preloads: JSCompiler_object_inline_preloads_1558,
2795
+ preconnects: JSCompiler_object_inline_preconnects_1589,
2796
+ fontPreloads: JSCompiler_object_inline_fontPreloads_1590,
2797
+ highImagePreloads: JSCompiler_object_inline_highImagePreloads_1591,
2798
+ styles: JSCompiler_object_inline_styles_1592,
2799
+ bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1593,
2800
+ scripts: JSCompiler_object_inline_scripts_1594,
2801
+ bulkPreloads: JSCompiler_object_inline_bulkPreloads_1595,
2802
+ preloads: JSCompiler_object_inline_preloads_1596,
2767
2803
  stylesToHoist: !1,
2768
2804
  generateStaticMarkup: generateStaticMarkup
2769
2805
  };
@@ -5480,6 +5516,7 @@ function flushCompletedBoundary(request, destination, boundary) {
5480
5516
  var requiresStyleInsertion = request.stylesToHoist;
5481
5517
  request.stylesToHoist = !1;
5482
5518
  destination.push(request.startInlineScript);
5519
+ destination.push(">");
5483
5520
  requiresStyleInsertion
5484
5521
  ? 0 === (completedSegments.instructions & 2)
5485
5522
  ? ((completedSegments.instructions |= 10),
@@ -5531,6 +5568,7 @@ function flushPartiallyCompletedSegment(
5531
5568
  boundary = request.resumableState;
5532
5569
  request = request.renderState;
5533
5570
  destination.push(request.startInlineScript);
5571
+ destination.push(">");
5534
5572
  0 === (boundary.instructions & 1)
5535
5573
  ? ((boundary.instructions |= 1),
5536
5574
  destination.push(
@@ -5555,7 +5593,8 @@ function flushCompletedQueues(request, destination) {
5555
5593
  if (5 === completedRootSegment.status) return;
5556
5594
  var completedPreambleSegments = request.completedPreambleSegments;
5557
5595
  if (null === completedPreambleSegments) return;
5558
- var renderState = request.renderState,
5596
+ var resumableState = request.resumableState,
5597
+ renderState = request.renderState,
5559
5598
  preamble = renderState.preamble,
5560
5599
  htmlChunks = preamble.htmlChunks,
5561
5600
  headChunks = preamble.headChunks,
@@ -5598,23 +5637,30 @@ function flushCompletedQueues(request, destination) {
5598
5637
  renderState.scripts.clear();
5599
5638
  renderState.bulkPreloads.forEach(flushResource, destination);
5600
5639
  renderState.bulkPreloads.clear();
5640
+ if (htmlChunks || headChunks) {
5641
+ var shellId = "\u00ab" + resumableState.idPrefix + "R\u00bb";
5642
+ destination.push('<link rel="expect" href="#');
5643
+ var chunk$jscomp$0 = escapeTextForBrowser(shellId);
5644
+ destination.push(chunk$jscomp$0);
5645
+ destination.push('" blocking="render"/>');
5646
+ }
5601
5647
  var hoistableChunks = renderState.hoistableChunks;
5602
5648
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
5603
5649
  destination.push(hoistableChunks[i$jscomp$0]);
5604
5650
  for (
5605
- renderState = hoistableChunks.length = 0;
5606
- renderState < completedPreambleSegments.length;
5607
- renderState++
5651
+ resumableState = hoistableChunks.length = 0;
5652
+ resumableState < completedPreambleSegments.length;
5653
+ resumableState++
5608
5654
  ) {
5609
- var segments = completedPreambleSegments[renderState];
5610
- for (preamble = 0; preamble < segments.length; preamble++)
5611
- flushSegment(request, destination, segments[preamble], null);
5655
+ var segments = completedPreambleSegments[resumableState];
5656
+ for (renderState = 0; renderState < segments.length; renderState++)
5657
+ flushSegment(request, destination, segments[renderState], null);
5612
5658
  }
5613
5659
  var preamble$jscomp$0 = request.renderState.preamble,
5614
5660
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
5615
5661
  if (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) {
5616
- var chunk$jscomp$0 = endChunkForTag("head");
5617
- destination.push(chunk$jscomp$0);
5662
+ var chunk$jscomp$1 = endChunkForTag("head");
5663
+ destination.push(chunk$jscomp$1);
5618
5664
  }
5619
5665
  var bodyChunks = preamble$jscomp$0.bodyChunks;
5620
5666
  if (bodyChunks)
@@ -5626,11 +5672,26 @@ function flushCompletedQueues(request, destination) {
5626
5672
  destination.push(bodyChunks[completedPreambleSegments]);
5627
5673
  flushSegment(request, destination, completedRootSegment, null);
5628
5674
  request.completedRootSegment = null;
5629
- writeBootstrap(destination, request.renderState);
5675
+ var resumableState$jscomp$0 = request.resumableState,
5676
+ renderState$jscomp$0 = request.renderState,
5677
+ preamble$jscomp$1 = renderState$jscomp$0.preamble;
5678
+ if (
5679
+ (preamble$jscomp$1.htmlChunks || preamble$jscomp$1.headChunks) &&
5680
+ 0 === (resumableState$jscomp$0.instructions & 32)
5681
+ ) {
5682
+ var bootstrapChunks = renderState$jscomp$0.bootstrapChunks;
5683
+ bootstrapChunks.push(startChunkForTag("template"));
5684
+ pushCompletedShellIdAttribute(
5685
+ bootstrapChunks,
5686
+ resumableState$jscomp$0
5687
+ );
5688
+ bootstrapChunks.push(">", endChunkForTag("template"));
5689
+ }
5690
+ writeBootstrap(destination, renderState$jscomp$0);
5630
5691
  }
5631
- var renderState$jscomp$0 = request.renderState;
5692
+ var renderState$jscomp$1 = request.renderState;
5632
5693
  completedRootSegment = 0;
5633
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
5694
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
5634
5695
  for (
5635
5696
  completedRootSegment = 0;
5636
5697
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -5638,21 +5699,21 @@ function flushCompletedQueues(request, destination) {
5638
5699
  )
5639
5700
  destination.push(viewportChunks$jscomp$0[completedRootSegment]);
5640
5701
  viewportChunks$jscomp$0.length = 0;
5641
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
5642
- renderState$jscomp$0.preconnects.clear();
5643
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
5644
- renderState$jscomp$0.fontPreloads.clear();
5645
- renderState$jscomp$0.highImagePreloads.forEach(
5702
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
5703
+ renderState$jscomp$1.preconnects.clear();
5704
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
5705
+ renderState$jscomp$1.fontPreloads.clear();
5706
+ renderState$jscomp$1.highImagePreloads.forEach(
5646
5707
  flushResource,
5647
5708
  destination
5648
5709
  );
5649
- renderState$jscomp$0.highImagePreloads.clear();
5650
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
5651
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
5652
- renderState$jscomp$0.scripts.clear();
5653
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
5654
- renderState$jscomp$0.bulkPreloads.clear();
5655
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
5710
+ renderState$jscomp$1.highImagePreloads.clear();
5711
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
5712
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
5713
+ renderState$jscomp$1.scripts.clear();
5714
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
5715
+ renderState$jscomp$1.bulkPreloads.clear();
5716
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
5656
5717
  for (
5657
5718
  completedRootSegment = 0;
5658
5719
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -5663,31 +5724,32 @@ function flushCompletedQueues(request, destination) {
5663
5724
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
5664
5725
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
5665
5726
  var boundary = clientRenderedBoundaries[i];
5666
- renderState$jscomp$0 = destination;
5667
- var resumableState = request.resumableState,
5668
- renderState$jscomp$1 = request.renderState,
5727
+ renderState$jscomp$1 = destination;
5728
+ var resumableState$jscomp$1 = request.resumableState,
5729
+ renderState$jscomp$2 = request.renderState,
5669
5730
  id = boundary.rootSegmentID,
5670
5731
  errorDigest = boundary.errorDigest;
5671
- renderState$jscomp$0.push(renderState$jscomp$1.startInlineScript);
5672
- 0 === (resumableState.instructions & 4)
5673
- ? ((resumableState.instructions |= 4),
5674
- renderState$jscomp$0.push(
5732
+ renderState$jscomp$1.push(renderState$jscomp$2.startInlineScript);
5733
+ renderState$jscomp$1.push(">");
5734
+ 0 === (resumableState$jscomp$1.instructions & 4)
5735
+ ? ((resumableState$jscomp$1.instructions |= 4),
5736
+ renderState$jscomp$1.push(
5675
5737
  '$RX=function(b,c,d,e,f){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),f&&(a.cstck=f),b._reactRetry&&b._reactRetry())};;$RX("'
5676
5738
  ))
5677
- : renderState$jscomp$0.push('$RX("');
5678
- renderState$jscomp$0.push(renderState$jscomp$1.boundaryPrefix);
5679
- var chunk$jscomp$1 = id.toString(16);
5680
- renderState$jscomp$0.push(chunk$jscomp$1);
5681
- renderState$jscomp$0.push('"');
5739
+ : renderState$jscomp$1.push('$RX("');
5740
+ renderState$jscomp$1.push(renderState$jscomp$2.boundaryPrefix);
5741
+ var chunk$jscomp$2 = id.toString(16);
5742
+ renderState$jscomp$1.push(chunk$jscomp$2);
5743
+ renderState$jscomp$1.push('"');
5682
5744
  if (errorDigest) {
5683
- renderState$jscomp$0.push(",");
5684
- var chunk$jscomp$2 = escapeJSStringsForInstructionScripts(
5745
+ renderState$jscomp$1.push(",");
5746
+ var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(
5685
5747
  errorDigest || ""
5686
5748
  );
5687
- renderState$jscomp$0.push(chunk$jscomp$2);
5749
+ renderState$jscomp$1.push(chunk$jscomp$3);
5688
5750
  }
5689
5751
  var JSCompiler_inline_result =
5690
- renderState$jscomp$0.push(")\x3c/script>");
5752
+ renderState$jscomp$1.push(")\x3c/script>");
5691
5753
  if (!JSCompiler_inline_result) {
5692
5754
  request.destination = null;
5693
5755
  i++;
@@ -5886,4 +5948,4 @@ exports.renderToString = function (children, options) {
5886
5948
  'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
5887
5949
  );
5888
5950
  };
5889
- exports.version = "19.2.0-canary-197d6a04-20250424";
5951
+ exports.version = "19.2.0-canary-143d3e1b-20250425";