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.
@@ -673,13 +673,25 @@ function flattenOptionChildren(children) {
673
673
  return content;
674
674
  }
675
675
  function injectFormReplayingRuntime(resumableState, renderState) {
676
- 0 === (resumableState.instructions & 16) &&
677
- ((resumableState.instructions |= 16),
678
- renderState.bootstrapChunks.unshift(
679
- renderState.startInlineScript,
680
- '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))}});',
681
- "\x3c/script>"
682
- ));
676
+ if (0 === (resumableState.instructions & 16)) {
677
+ resumableState.instructions |= 16;
678
+ var preamble = renderState.preamble,
679
+ bootstrapChunks = renderState.bootstrapChunks;
680
+ (preamble.htmlChunks || preamble.headChunks) && 0 === bootstrapChunks.length
681
+ ? (bootstrapChunks.push(renderState.startInlineScript),
682
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
683
+ bootstrapChunks.push(
684
+ ">",
685
+ '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))}});',
686
+ "\x3c/script>"
687
+ ))
688
+ : bootstrapChunks.unshift(
689
+ renderState.startInlineScript,
690
+ ">",
691
+ '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))}});',
692
+ "\x3c/script>"
693
+ );
694
+ }
683
695
  }
684
696
  function pushLinkImpl(target, props) {
685
697
  target.push(startChunkForTag("link"));
@@ -2135,6 +2147,15 @@ function preloadLateStyles(styleQueue) {
2135
2147
  styleQueue.sheets.forEach(preloadLateStyle, this);
2136
2148
  styleQueue.sheets.clear();
2137
2149
  }
2150
+ function pushCompletedShellIdAttribute(target, resumableState) {
2151
+ 0 === (resumableState.instructions & 32) &&
2152
+ ((resumableState.instructions |= 32),
2153
+ target.push(
2154
+ ' id="',
2155
+ escapeTextForBrowser("\u00ab" + resumableState.idPrefix + "R\u00bb"),
2156
+ '"'
2157
+ ));
2158
+ }
2138
2159
  function writeStyleResourceDependenciesInJS(destination, hoistableState) {
2139
2160
  destination.push("[");
2140
2161
  var nextArrayOpenBrackChunk = "[";
@@ -2647,23 +2668,25 @@ function createRenderState(resumableState, generateStaticMarkup) {
2647
2668
  bootstrapScripts = resumableState.bootstrapScripts,
2648
2669
  bootstrapModules = resumableState.bootstrapModules;
2649
2670
  void 0 !== bootstrapScriptContent &&
2671
+ (bootstrapChunks.push("<script"),
2672
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
2650
2673
  bootstrapChunks.push(
2651
- "<script>",
2674
+ ">",
2652
2675
  ("" + bootstrapScriptContent).replace(scriptRegex, scriptReplacer),
2653
2676
  "\x3c/script>"
2654
- );
2677
+ ));
2655
2678
  bootstrapScriptContent = idPrefix + "P:";
2656
- var JSCompiler_object_inline_segmentPrefix_1538 = idPrefix + "S:";
2679
+ var JSCompiler_object_inline_segmentPrefix_1576 = idPrefix + "S:";
2657
2680
  idPrefix += "B:";
2658
- var JSCompiler_object_inline_preamble_1541 = createPreambleState(),
2659
- JSCompiler_object_inline_preconnects_1551 = new Set(),
2660
- JSCompiler_object_inline_fontPreloads_1552 = new Set(),
2661
- JSCompiler_object_inline_highImagePreloads_1553 = new Set(),
2662
- JSCompiler_object_inline_styles_1554 = new Map(),
2663
- JSCompiler_object_inline_bootstrapScripts_1555 = new Set(),
2664
- JSCompiler_object_inline_scripts_1556 = new Set(),
2665
- JSCompiler_object_inline_bulkPreloads_1557 = new Set(),
2666
- JSCompiler_object_inline_preloads_1558 = {
2681
+ var JSCompiler_object_inline_preamble_1579 = createPreambleState(),
2682
+ JSCompiler_object_inline_preconnects_1589 = new Set(),
2683
+ JSCompiler_object_inline_fontPreloads_1590 = new Set(),
2684
+ JSCompiler_object_inline_highImagePreloads_1591 = new Set(),
2685
+ JSCompiler_object_inline_styles_1592 = new Map(),
2686
+ JSCompiler_object_inline_bootstrapScripts_1593 = new Set(),
2687
+ JSCompiler_object_inline_scripts_1594 = new Set(),
2688
+ JSCompiler_object_inline_bulkPreloads_1595 = new Set(),
2689
+ JSCompiler_object_inline_preloads_1596 = {
2667
2690
  images: new Map(),
2668
2691
  stylesheets: new Map(),
2669
2692
  scripts: new Map(),
@@ -2700,16 +2723,22 @@ function createRenderState(resumableState, generateStaticMarkup) {
2700
2723
  scriptConfig.moduleScriptResources[href] = null;
2701
2724
  scriptConfig = [];
2702
2725
  pushLinkImpl(scriptConfig, props);
2703
- JSCompiler_object_inline_bootstrapScripts_1555.add(scriptConfig);
2704
- bootstrapChunks.push('<script src="', escapeTextForBrowser(src));
2726
+ JSCompiler_object_inline_bootstrapScripts_1593.add(scriptConfig);
2727
+ bootstrapChunks.push('<script src="', escapeTextForBrowser(src), '"');
2705
2728
  "string" === typeof integrity &&
2706
- bootstrapChunks.push('" integrity="', escapeTextForBrowser(integrity));
2729
+ bootstrapChunks.push(
2730
+ ' integrity="',
2731
+ escapeTextForBrowser(integrity),
2732
+ '"'
2733
+ );
2707
2734
  "string" === typeof crossOrigin &&
2708
2735
  bootstrapChunks.push(
2709
- '" crossorigin="',
2710
- escapeTextForBrowser(crossOrigin)
2736
+ ' crossorigin="',
2737
+ escapeTextForBrowser(crossOrigin),
2738
+ '"'
2711
2739
  );
2712
- bootstrapChunks.push('" async="">\x3c/script>');
2740
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState);
2741
+ bootstrapChunks.push(' async="">\x3c/script>');
2713
2742
  }
2714
2743
  if (void 0 !== bootstrapModules)
2715
2744
  for (
@@ -2741,25 +2770,32 @@ function createRenderState(resumableState, generateStaticMarkup) {
2741
2770
  (props.moduleScriptResources[scriptConfig] = null),
2742
2771
  (props = []),
2743
2772
  pushLinkImpl(props, integrity),
2744
- JSCompiler_object_inline_bootstrapScripts_1555.add(props),
2773
+ JSCompiler_object_inline_bootstrapScripts_1593.add(props),
2745
2774
  bootstrapChunks.push(
2746
2775
  '<script type="module" src="',
2747
- escapeTextForBrowser(i)
2776
+ escapeTextForBrowser(i),
2777
+ '"'
2748
2778
  ),
2749
2779
  "string" === typeof crossOrigin &&
2750
2780
  bootstrapChunks.push(
2751
- '" integrity="',
2752
- escapeTextForBrowser(crossOrigin)
2781
+ ' integrity="',
2782
+ escapeTextForBrowser(crossOrigin),
2783
+ '"'
2753
2784
  ),
2754
2785
  "string" === typeof src &&
2755
- bootstrapChunks.push('" crossorigin="', escapeTextForBrowser(src)),
2756
- bootstrapChunks.push('" async="">\x3c/script>');
2786
+ bootstrapChunks.push(
2787
+ ' crossorigin="',
2788
+ escapeTextForBrowser(src),
2789
+ '"'
2790
+ ),
2791
+ pushCompletedShellIdAttribute(bootstrapChunks, resumableState),
2792
+ bootstrapChunks.push(' async="">\x3c/script>');
2757
2793
  return {
2758
2794
  placeholderPrefix: bootstrapScriptContent,
2759
- segmentPrefix: JSCompiler_object_inline_segmentPrefix_1538,
2795
+ segmentPrefix: JSCompiler_object_inline_segmentPrefix_1576,
2760
2796
  boundaryPrefix: idPrefix,
2761
- startInlineScript: "<script>",
2762
- preamble: JSCompiler_object_inline_preamble_1541,
2797
+ startInlineScript: "<script",
2798
+ preamble: JSCompiler_object_inline_preamble_1579,
2763
2799
  externalRuntimeScript: null,
2764
2800
  bootstrapChunks: bootstrapChunks,
2765
2801
  importMapChunks: [],
@@ -2775,14 +2811,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
2775
2811
  charsetChunks: [],
2776
2812
  viewportChunks: [],
2777
2813
  hoistableChunks: [],
2778
- preconnects: JSCompiler_object_inline_preconnects_1551,
2779
- fontPreloads: JSCompiler_object_inline_fontPreloads_1552,
2780
- highImagePreloads: JSCompiler_object_inline_highImagePreloads_1553,
2781
- styles: JSCompiler_object_inline_styles_1554,
2782
- bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1555,
2783
- scripts: JSCompiler_object_inline_scripts_1556,
2784
- bulkPreloads: JSCompiler_object_inline_bulkPreloads_1557,
2785
- preloads: JSCompiler_object_inline_preloads_1558,
2814
+ preconnects: JSCompiler_object_inline_preconnects_1589,
2815
+ fontPreloads: JSCompiler_object_inline_fontPreloads_1590,
2816
+ highImagePreloads: JSCompiler_object_inline_highImagePreloads_1591,
2817
+ styles: JSCompiler_object_inline_styles_1592,
2818
+ bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1593,
2819
+ scripts: JSCompiler_object_inline_scripts_1594,
2820
+ bulkPreloads: JSCompiler_object_inline_bulkPreloads_1595,
2821
+ preloads: JSCompiler_object_inline_preloads_1596,
2786
2822
  stylesToHoist: !1,
2787
2823
  generateStaticMarkup: generateStaticMarkup
2788
2824
  };
@@ -5555,6 +5591,7 @@ function flushCompletedBoundary(request, destination, boundary) {
5555
5591
  var requiresStyleInsertion = request.stylesToHoist;
5556
5592
  request.stylesToHoist = !1;
5557
5593
  destination.push(request.startInlineScript);
5594
+ destination.push(">");
5558
5595
  requiresStyleInsertion
5559
5596
  ? 0 === (completedSegments.instructions & 2)
5560
5597
  ? ((completedSegments.instructions |= 10),
@@ -5608,6 +5645,7 @@ function flushPartiallyCompletedSegment(
5608
5645
  boundary = request.resumableState;
5609
5646
  request = request.renderState;
5610
5647
  destination.push(request.startInlineScript);
5648
+ destination.push(">");
5611
5649
  0 === (boundary.instructions & 1)
5612
5650
  ? ((boundary.instructions |= 1),
5613
5651
  destination.push(
@@ -5632,7 +5670,8 @@ function flushCompletedQueues(request, destination) {
5632
5670
  if (5 === completedRootSegment.status) return;
5633
5671
  var completedPreambleSegments = request.completedPreambleSegments;
5634
5672
  if (null === completedPreambleSegments) return;
5635
- var renderState = request.renderState,
5673
+ var resumableState = request.resumableState,
5674
+ renderState = request.renderState,
5636
5675
  preamble = renderState.preamble,
5637
5676
  htmlChunks = preamble.htmlChunks,
5638
5677
  headChunks = preamble.headChunks,
@@ -5675,23 +5714,30 @@ function flushCompletedQueues(request, destination) {
5675
5714
  renderState.scripts.clear();
5676
5715
  renderState.bulkPreloads.forEach(flushResource, destination);
5677
5716
  renderState.bulkPreloads.clear();
5717
+ if (htmlChunks || headChunks) {
5718
+ var shellId = "\u00ab" + resumableState.idPrefix + "R\u00bb";
5719
+ destination.push('<link rel="expect" href="#');
5720
+ var chunk$jscomp$0 = escapeTextForBrowser(shellId);
5721
+ destination.push(chunk$jscomp$0);
5722
+ destination.push('" blocking="render"/>');
5723
+ }
5678
5724
  var hoistableChunks = renderState.hoistableChunks;
5679
5725
  for (i$jscomp$0 = 0; i$jscomp$0 < hoistableChunks.length; i$jscomp$0++)
5680
5726
  destination.push(hoistableChunks[i$jscomp$0]);
5681
5727
  for (
5682
- renderState = hoistableChunks.length = 0;
5683
- renderState < completedPreambleSegments.length;
5684
- renderState++
5728
+ resumableState = hoistableChunks.length = 0;
5729
+ resumableState < completedPreambleSegments.length;
5730
+ resumableState++
5685
5731
  ) {
5686
- var segments = completedPreambleSegments[renderState];
5687
- for (preamble = 0; preamble < segments.length; preamble++)
5688
- flushSegment(request, destination, segments[preamble], null);
5732
+ var segments = completedPreambleSegments[resumableState];
5733
+ for (renderState = 0; renderState < segments.length; renderState++)
5734
+ flushSegment(request, destination, segments[renderState], null);
5689
5735
  }
5690
5736
  var preamble$jscomp$0 = request.renderState.preamble,
5691
5737
  headChunks$jscomp$0 = preamble$jscomp$0.headChunks;
5692
5738
  if (preamble$jscomp$0.htmlChunks || headChunks$jscomp$0) {
5693
- var chunk$jscomp$0 = endChunkForTag("head");
5694
- destination.push(chunk$jscomp$0);
5739
+ var chunk$jscomp$1 = endChunkForTag("head");
5740
+ destination.push(chunk$jscomp$1);
5695
5741
  }
5696
5742
  var bodyChunks = preamble$jscomp$0.bodyChunks;
5697
5743
  if (bodyChunks)
@@ -5703,11 +5749,26 @@ function flushCompletedQueues(request, destination) {
5703
5749
  destination.push(bodyChunks[completedPreambleSegments]);
5704
5750
  flushSegment(request, destination, completedRootSegment, null);
5705
5751
  request.completedRootSegment = null;
5706
- writeBootstrap(destination, request.renderState);
5752
+ var resumableState$jscomp$0 = request.resumableState,
5753
+ renderState$jscomp$0 = request.renderState,
5754
+ preamble$jscomp$1 = renderState$jscomp$0.preamble;
5755
+ if (
5756
+ (preamble$jscomp$1.htmlChunks || preamble$jscomp$1.headChunks) &&
5757
+ 0 === (resumableState$jscomp$0.instructions & 32)
5758
+ ) {
5759
+ var bootstrapChunks = renderState$jscomp$0.bootstrapChunks;
5760
+ bootstrapChunks.push(startChunkForTag("template"));
5761
+ pushCompletedShellIdAttribute(
5762
+ bootstrapChunks,
5763
+ resumableState$jscomp$0
5764
+ );
5765
+ bootstrapChunks.push(">", endChunkForTag("template"));
5766
+ }
5767
+ writeBootstrap(destination, renderState$jscomp$0);
5707
5768
  }
5708
- var renderState$jscomp$0 = request.renderState;
5769
+ var renderState$jscomp$1 = request.renderState;
5709
5770
  completedRootSegment = 0;
5710
- var viewportChunks$jscomp$0 = renderState$jscomp$0.viewportChunks;
5771
+ var viewportChunks$jscomp$0 = renderState$jscomp$1.viewportChunks;
5711
5772
  for (
5712
5773
  completedRootSegment = 0;
5713
5774
  completedRootSegment < viewportChunks$jscomp$0.length;
@@ -5715,21 +5776,21 @@ function flushCompletedQueues(request, destination) {
5715
5776
  )
5716
5777
  destination.push(viewportChunks$jscomp$0[completedRootSegment]);
5717
5778
  viewportChunks$jscomp$0.length = 0;
5718
- renderState$jscomp$0.preconnects.forEach(flushResource, destination);
5719
- renderState$jscomp$0.preconnects.clear();
5720
- renderState$jscomp$0.fontPreloads.forEach(flushResource, destination);
5721
- renderState$jscomp$0.fontPreloads.clear();
5722
- renderState$jscomp$0.highImagePreloads.forEach(
5779
+ renderState$jscomp$1.preconnects.forEach(flushResource, destination);
5780
+ renderState$jscomp$1.preconnects.clear();
5781
+ renderState$jscomp$1.fontPreloads.forEach(flushResource, destination);
5782
+ renderState$jscomp$1.fontPreloads.clear();
5783
+ renderState$jscomp$1.highImagePreloads.forEach(
5723
5784
  flushResource,
5724
5785
  destination
5725
5786
  );
5726
- renderState$jscomp$0.highImagePreloads.clear();
5727
- renderState$jscomp$0.styles.forEach(preloadLateStyles, destination);
5728
- renderState$jscomp$0.scripts.forEach(flushResource, destination);
5729
- renderState$jscomp$0.scripts.clear();
5730
- renderState$jscomp$0.bulkPreloads.forEach(flushResource, destination);
5731
- renderState$jscomp$0.bulkPreloads.clear();
5732
- var hoistableChunks$jscomp$0 = renderState$jscomp$0.hoistableChunks;
5787
+ renderState$jscomp$1.highImagePreloads.clear();
5788
+ renderState$jscomp$1.styles.forEach(preloadLateStyles, destination);
5789
+ renderState$jscomp$1.scripts.forEach(flushResource, destination);
5790
+ renderState$jscomp$1.scripts.clear();
5791
+ renderState$jscomp$1.bulkPreloads.forEach(flushResource, destination);
5792
+ renderState$jscomp$1.bulkPreloads.clear();
5793
+ var hoistableChunks$jscomp$0 = renderState$jscomp$1.hoistableChunks;
5733
5794
  for (
5734
5795
  completedRootSegment = 0;
5735
5796
  completedRootSegment < hoistableChunks$jscomp$0.length;
@@ -5740,31 +5801,32 @@ function flushCompletedQueues(request, destination) {
5740
5801
  var clientRenderedBoundaries = request.clientRenderedBoundaries;
5741
5802
  for (i = 0; i < clientRenderedBoundaries.length; i++) {
5742
5803
  var boundary = clientRenderedBoundaries[i];
5743
- renderState$jscomp$0 = destination;
5744
- var resumableState = request.resumableState,
5745
- renderState$jscomp$1 = request.renderState,
5804
+ renderState$jscomp$1 = destination;
5805
+ var resumableState$jscomp$1 = request.resumableState,
5806
+ renderState$jscomp$2 = request.renderState,
5746
5807
  id = boundary.rootSegmentID,
5747
5808
  errorDigest = boundary.errorDigest;
5748
- renderState$jscomp$0.push(renderState$jscomp$1.startInlineScript);
5749
- 0 === (resumableState.instructions & 4)
5750
- ? ((resumableState.instructions |= 4),
5751
- renderState$jscomp$0.push(
5809
+ renderState$jscomp$1.push(renderState$jscomp$2.startInlineScript);
5810
+ renderState$jscomp$1.push(">");
5811
+ 0 === (resumableState$jscomp$1.instructions & 4)
5812
+ ? ((resumableState$jscomp$1.instructions |= 4),
5813
+ renderState$jscomp$1.push(
5752
5814
  '$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("'
5753
5815
  ))
5754
- : renderState$jscomp$0.push('$RX("');
5755
- renderState$jscomp$0.push(renderState$jscomp$1.boundaryPrefix);
5756
- var chunk$jscomp$1 = id.toString(16);
5757
- renderState$jscomp$0.push(chunk$jscomp$1);
5758
- renderState$jscomp$0.push('"');
5816
+ : renderState$jscomp$1.push('$RX("');
5817
+ renderState$jscomp$1.push(renderState$jscomp$2.boundaryPrefix);
5818
+ var chunk$jscomp$2 = id.toString(16);
5819
+ renderState$jscomp$1.push(chunk$jscomp$2);
5820
+ renderState$jscomp$1.push('"');
5759
5821
  if (errorDigest) {
5760
- renderState$jscomp$0.push(",");
5761
- var chunk$jscomp$2 = escapeJSStringsForInstructionScripts(
5822
+ renderState$jscomp$1.push(",");
5823
+ var chunk$jscomp$3 = escapeJSStringsForInstructionScripts(
5762
5824
  errorDigest || ""
5763
5825
  );
5764
- renderState$jscomp$0.push(chunk$jscomp$2);
5826
+ renderState$jscomp$1.push(chunk$jscomp$3);
5765
5827
  }
5766
5828
  var JSCompiler_inline_result =
5767
- renderState$jscomp$0.push(")\x3c/script>");
5829
+ renderState$jscomp$1.push(")\x3c/script>");
5768
5830
  if (!JSCompiler_inline_result) {
5769
5831
  request.destination = null;
5770
5832
  i++;
@@ -5966,4 +6028,4 @@ exports.renderToString = function (children, options) {
5966
6028
  '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 "renderToPipeableStream" which supports Suspense on the server'
5967
6029
  );
5968
6030
  };
5969
- exports.version = "19.2.0-canary-197d6a04-20250424";
6031
+ exports.version = "19.2.0-canary-143d3e1b-20250425";