react-dom 19.2.0-canary-d85f86cf-20250514 → 19.2.0-canary-4448b187-20250515

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.
@@ -332,52 +332,96 @@ function createResumableState(
332
332
  function createPreambleState() {
333
333
  return { htmlChunks: null, headChunks: null, bodyChunks: null };
334
334
  }
335
- function createFormatContext(insertionMode, selectedValue, tagScope) {
335
+ function createFormatContext(
336
+ insertionMode,
337
+ selectedValue,
338
+ tagScope,
339
+ viewTransition
340
+ ) {
336
341
  return {
337
342
  insertionMode: insertionMode,
338
343
  selectedValue: selectedValue,
339
- tagScope: tagScope
344
+ tagScope: tagScope,
345
+ viewTransition: viewTransition
340
346
  };
341
347
  }
342
348
  function getChildFormatContext(parentContext, type, props) {
349
+ var subtreeScope = parentContext.tagScope & -25;
343
350
  switch (type) {
344
351
  case "noscript":
345
- return createFormatContext(2, null, parentContext.tagScope | 1);
352
+ return createFormatContext(2, null, subtreeScope | 1, null);
346
353
  case "select":
347
354
  return createFormatContext(
348
355
  2,
349
356
  null != props.value ? props.value : props.defaultValue,
350
- parentContext.tagScope
357
+ subtreeScope,
358
+ null
351
359
  );
352
360
  case "svg":
353
- return createFormatContext(4, null, parentContext.tagScope);
361
+ return createFormatContext(4, null, subtreeScope, null);
354
362
  case "picture":
355
- return createFormatContext(2, null, parentContext.tagScope | 2);
363
+ return createFormatContext(2, null, subtreeScope | 2, null);
356
364
  case "math":
357
- return createFormatContext(5, null, parentContext.tagScope);
365
+ return createFormatContext(5, null, subtreeScope, null);
358
366
  case "foreignObject":
359
- return createFormatContext(2, null, parentContext.tagScope);
367
+ return createFormatContext(2, null, subtreeScope, null);
360
368
  case "table":
361
- return createFormatContext(6, null, parentContext.tagScope);
369
+ return createFormatContext(6, null, subtreeScope, null);
362
370
  case "thead":
363
371
  case "tbody":
364
372
  case "tfoot":
365
- return createFormatContext(7, null, parentContext.tagScope);
373
+ return createFormatContext(7, null, subtreeScope, null);
366
374
  case "colgroup":
367
- return createFormatContext(9, null, parentContext.tagScope);
375
+ return createFormatContext(9, null, subtreeScope, null);
368
376
  case "tr":
369
- return createFormatContext(8, null, parentContext.tagScope);
377
+ return createFormatContext(8, null, subtreeScope, null);
370
378
  case "head":
371
379
  if (2 > parentContext.insertionMode)
372
- return createFormatContext(3, null, parentContext.tagScope);
380
+ return createFormatContext(3, null, subtreeScope, null);
373
381
  break;
374
382
  case "html":
375
383
  if (0 === parentContext.insertionMode)
376
- return createFormatContext(1, null, parentContext.tagScope);
384
+ return createFormatContext(1, null, subtreeScope, null);
377
385
  }
378
386
  return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
379
- ? createFormatContext(2, null, parentContext.tagScope)
380
- : parentContext;
387
+ ? createFormatContext(2, null, subtreeScope, null)
388
+ : parentContext.tagScope !== subtreeScope
389
+ ? createFormatContext(
390
+ parentContext.insertionMode,
391
+ parentContext.selectedValue,
392
+ subtreeScope,
393
+ null
394
+ )
395
+ : parentContext;
396
+ }
397
+ function getSuspenseViewTransition(parentViewTransition) {
398
+ return null === parentViewTransition
399
+ ? null
400
+ : {
401
+ update: parentViewTransition.update,
402
+ enter: null,
403
+ exit: null,
404
+ share: parentViewTransition.update,
405
+ name: parentViewTransition.autoName,
406
+ autoName: parentViewTransition.autoName,
407
+ nameIdx: 0
408
+ };
409
+ }
410
+ function getSuspenseFallbackFormatContext(parentContext) {
411
+ return createFormatContext(
412
+ parentContext.insertionMode,
413
+ parentContext.selectedValue,
414
+ parentContext.tagScope | 12,
415
+ getSuspenseViewTransition(parentContext.viewTransition)
416
+ );
417
+ }
418
+ function getSuspenseContentFormatContext(parentContext) {
419
+ return createFormatContext(
420
+ parentContext.insertionMode,
421
+ parentContext.selectedValue,
422
+ parentContext.tagScope | 16,
423
+ getSuspenseViewTransition(parentContext.viewTransition)
424
+ );
381
425
  }
382
426
  var styleNameCache = new Map();
383
427
  function pushStyleAttribute(target, style) {
@@ -866,8 +910,7 @@ function pushStartInstance(
866
910
  preambleState,
867
911
  hoistableState,
868
912
  formatContext,
869
- textEmbedded,
870
- isFallback
913
+ textEmbedded
871
914
  ) {
872
915
  switch (type) {
873
916
  case "div":
@@ -1333,9 +1376,11 @@ function pushStartInstance(
1333
1376
  } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
1334
1377
  return JSCompiler_inline_result$jscomp$2;
1335
1378
  case "title":
1379
+ var noscriptTagInScope = formatContext.tagScope & 1,
1380
+ isFallback = formatContext.tagScope & 4;
1336
1381
  if (
1337
1382
  4 === formatContext.insertionMode ||
1338
- formatContext.tagScope & 1 ||
1383
+ noscriptTagInScope ||
1339
1384
  null != props.itemProp
1340
1385
  )
1341
1386
  var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
@@ -1349,12 +1394,14 @@ function pushStartInstance(
1349
1394
  (JSCompiler_inline_result$jscomp$3 = void 0));
1350
1395
  return JSCompiler_inline_result$jscomp$3;
1351
1396
  case "link":
1352
- var rel = props.rel,
1397
+ var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,
1398
+ isFallback$jscomp$0 = formatContext.tagScope & 4,
1399
+ rel = props.rel,
1353
1400
  href = props.href,
1354
1401
  precedence = props.precedence;
1355
1402
  if (
1356
1403
  4 === formatContext.insertionMode ||
1357
- formatContext.tagScope & 1 ||
1404
+ noscriptTagInScope$jscomp$0 ||
1358
1405
  null != props.itemProp ||
1359
1406
  "string" !== typeof rel ||
1360
1407
  "string" !== typeof href ||
@@ -1421,12 +1468,13 @@ function pushStartInstance(
1421
1468
  props
1422
1469
  ))
1423
1470
  : (textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
1424
- (JSCompiler_inline_result$jscomp$4 = isFallback
1471
+ (JSCompiler_inline_result$jscomp$4 = isFallback$jscomp$0
1425
1472
  ? null
1426
1473
  : pushLinkImpl(renderState.hoistableChunks, props)));
1427
1474
  return JSCompiler_inline_result$jscomp$4;
1428
1475
  case "script":
1429
- var asyncProp = props.async;
1476
+ var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,
1477
+ asyncProp = props.async;
1430
1478
  if (
1431
1479
  "string" !== typeof props.src ||
1432
1480
  !props.src ||
@@ -1436,7 +1484,7 @@ function pushStartInstance(
1436
1484
  props.onLoad ||
1437
1485
  props.onError ||
1438
1486
  4 === formatContext.insertionMode ||
1439
- formatContext.tagScope & 1 ||
1487
+ noscriptTagInScope$jscomp$1 ||
1440
1488
  null != props.itemProp
1441
1489
  )
1442
1490
  var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
@@ -1473,11 +1521,12 @@ function pushStartInstance(
1473
1521
  }
1474
1522
  return JSCompiler_inline_result$jscomp$5;
1475
1523
  case "style":
1476
- var precedence$jscomp$0 = props.precedence,
1524
+ var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1,
1525
+ precedence$jscomp$0 = props.precedence,
1477
1526
  href$jscomp$0 = props.href;
1478
1527
  if (
1479
1528
  4 === formatContext.insertionMode ||
1480
- formatContext.tagScope & 1 ||
1529
+ noscriptTagInScope$jscomp$2 ||
1481
1530
  null != props.itemProp ||
1482
1531
  "string" !== typeof precedence$jscomp$0 ||
1483
1532
  "string" !== typeof href$jscomp$0 ||
@@ -1578,9 +1627,11 @@ function pushStartInstance(
1578
1627
  }
1579
1628
  return JSCompiler_inline_result$jscomp$6;
1580
1629
  case "meta":
1630
+ var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,
1631
+ isFallback$jscomp$1 = formatContext.tagScope & 4;
1581
1632
  if (
1582
1633
  4 === formatContext.insertionMode ||
1583
- formatContext.tagScope & 1 ||
1634
+ noscriptTagInScope$jscomp$3 ||
1584
1635
  null != props.itemProp
1585
1636
  )
1586
1637
  var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
@@ -1590,7 +1641,7 @@ function pushStartInstance(
1590
1641
  );
1591
1642
  else
1592
1643
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
1593
- (JSCompiler_inline_result$jscomp$7 = isFallback
1644
+ (JSCompiler_inline_result$jscomp$7 = isFallback$jscomp$1
1594
1645
  ? null
1595
1646
  : "string" === typeof props.charSet
1596
1647
  ? pushSelfClosing(renderState.charsetChunks, props, "meta")
@@ -1643,17 +1694,18 @@ function pushStartInstance(
1643
1694
  target$jscomp$0.push("\n");
1644
1695
  return children$jscomp$8;
1645
1696
  case "img":
1646
- var src = props.src,
1697
+ var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,
1698
+ src = props.src,
1647
1699
  srcSet = props.srcSet;
1648
1700
  if (
1649
1701
  !(
1650
1702
  "lazy" === props.loading ||
1651
1703
  (!src && !srcSet) ||
1652
1704
  ("string" !== typeof src && null != src) ||
1653
- ("string" !== typeof srcSet && null != srcSet)
1705
+ ("string" !== typeof srcSet && null != srcSet) ||
1706
+ "low" === props.fetchPriority ||
1707
+ pictureOrNoScriptTagInScope
1654
1708
  ) &&
1655
- "low" !== props.fetchPriority &&
1656
- !1 === !!(formatContext.tagScope & 3) &&
1657
1709
  ("string" !== typeof src ||
1658
1710
  ":" !== src[4] ||
1659
1711
  ("d" !== src[0] && "D" !== src[0]) ||
@@ -2657,17 +2709,17 @@ function createRenderState(resumableState, generateStaticMarkup) {
2657
2709
  "\x3c/script>"
2658
2710
  ));
2659
2711
  bootstrapScriptContent = idPrefix + "P:";
2660
- var JSCompiler_object_inline_segmentPrefix_1598 = idPrefix + "S:";
2712
+ var JSCompiler_object_inline_segmentPrefix_1613 = idPrefix + "S:";
2661
2713
  idPrefix += "B:";
2662
- var JSCompiler_object_inline_preamble_1601 = createPreambleState(),
2663
- JSCompiler_object_inline_preconnects_1611 = new Set(),
2664
- JSCompiler_object_inline_fontPreloads_1612 = new Set(),
2665
- JSCompiler_object_inline_highImagePreloads_1613 = new Set(),
2666
- JSCompiler_object_inline_styles_1614 = new Map(),
2667
- JSCompiler_object_inline_bootstrapScripts_1615 = new Set(),
2668
- JSCompiler_object_inline_scripts_1616 = new Set(),
2669
- JSCompiler_object_inline_bulkPreloads_1617 = new Set(),
2670
- JSCompiler_object_inline_preloads_1618 = {
2714
+ var JSCompiler_object_inline_preamble_1616 = createPreambleState(),
2715
+ JSCompiler_object_inline_preconnects_1626 = new Set(),
2716
+ JSCompiler_object_inline_fontPreloads_1627 = new Set(),
2717
+ JSCompiler_object_inline_highImagePreloads_1628 = new Set(),
2718
+ JSCompiler_object_inline_styles_1629 = new Map(),
2719
+ JSCompiler_object_inline_bootstrapScripts_1630 = new Set(),
2720
+ JSCompiler_object_inline_scripts_1631 = new Set(),
2721
+ JSCompiler_object_inline_bulkPreloads_1632 = new Set(),
2722
+ JSCompiler_object_inline_preloads_1633 = {
2671
2723
  images: new Map(),
2672
2724
  stylesheets: new Map(),
2673
2725
  scripts: new Map(),
@@ -2704,7 +2756,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2704
2756
  scriptConfig.moduleScriptResources[href] = null;
2705
2757
  scriptConfig = [];
2706
2758
  pushLinkImpl(scriptConfig, props);
2707
- JSCompiler_object_inline_bootstrapScripts_1615.add(scriptConfig);
2759
+ JSCompiler_object_inline_bootstrapScripts_1630.add(scriptConfig);
2708
2760
  bootstrapChunks.push('<script src="', escapeTextForBrowser(src), '"');
2709
2761
  "string" === typeof integrity &&
2710
2762
  bootstrapChunks.push(
@@ -2751,7 +2803,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2751
2803
  (props.moduleScriptResources[scriptConfig] = null),
2752
2804
  (props = []),
2753
2805
  pushLinkImpl(props, integrity),
2754
- JSCompiler_object_inline_bootstrapScripts_1615.add(props),
2806
+ JSCompiler_object_inline_bootstrapScripts_1630.add(props),
2755
2807
  bootstrapChunks.push(
2756
2808
  '<script type="module" src="',
2757
2809
  escapeTextForBrowser(i),
@@ -2773,10 +2825,10 @@ function createRenderState(resumableState, generateStaticMarkup) {
2773
2825
  bootstrapChunks.push(' async="">\x3c/script>');
2774
2826
  return {
2775
2827
  placeholderPrefix: bootstrapScriptContent,
2776
- segmentPrefix: JSCompiler_object_inline_segmentPrefix_1598,
2828
+ segmentPrefix: JSCompiler_object_inline_segmentPrefix_1613,
2777
2829
  boundaryPrefix: idPrefix,
2778
2830
  startInlineScript: "<script",
2779
- preamble: JSCompiler_object_inline_preamble_1601,
2831
+ preamble: JSCompiler_object_inline_preamble_1616,
2780
2832
  externalRuntimeScript: null,
2781
2833
  bootstrapChunks: bootstrapChunks,
2782
2834
  importMapChunks: [],
@@ -2792,14 +2844,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
2792
2844
  charsetChunks: [],
2793
2845
  viewportChunks: [],
2794
2846
  hoistableChunks: [],
2795
- preconnects: JSCompiler_object_inline_preconnects_1611,
2796
- fontPreloads: JSCompiler_object_inline_fontPreloads_1612,
2797
- highImagePreloads: JSCompiler_object_inline_highImagePreloads_1613,
2798
- styles: JSCompiler_object_inline_styles_1614,
2799
- bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1615,
2800
- scripts: JSCompiler_object_inline_scripts_1616,
2801
- bulkPreloads: JSCompiler_object_inline_bulkPreloads_1617,
2802
- preloads: JSCompiler_object_inline_preloads_1618,
2847
+ preconnects: JSCompiler_object_inline_preconnects_1626,
2848
+ fontPreloads: JSCompiler_object_inline_fontPreloads_1627,
2849
+ highImagePreloads: JSCompiler_object_inline_highImagePreloads_1628,
2850
+ styles: JSCompiler_object_inline_styles_1629,
2851
+ bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1630,
2852
+ scripts: JSCompiler_object_inline_scripts_1631,
2853
+ bulkPreloads: JSCompiler_object_inline_bulkPreloads_1632,
2854
+ preloads: JSCompiler_object_inline_preloads_1633,
2803
2855
  stylesToHoist: !1,
2804
2856
  generateStaticMarkup: generateStaticMarkup
2805
2857
  };
@@ -3636,8 +3688,7 @@ function createRequest(
3636
3688
  rootFormatContext,
3637
3689
  null,
3638
3690
  emptyTreeContext,
3639
- null,
3640
- !1
3691
+ null
3641
3692
  );
3642
3693
  pushComponentStack(children);
3643
3694
  resumableState.pingedTasks.push(children);
@@ -3687,8 +3738,7 @@ function createRenderTask(
3687
3738
  formatContext,
3688
3739
  context,
3689
3740
  treeContext,
3690
- componentStack,
3691
- isFallback
3741
+ componentStack
3692
3742
  ) {
3693
3743
  request.allPendingTasks++;
3694
3744
  null === blockedBoundary
@@ -3711,8 +3761,7 @@ function createRenderTask(
3711
3761
  context: context,
3712
3762
  treeContext: treeContext,
3713
3763
  componentStack: componentStack,
3714
- thenableState: thenableState,
3715
- isFallback: isFallback
3764
+ thenableState: thenableState
3716
3765
  };
3717
3766
  abortSet.add(task);
3718
3767
  return task;
@@ -3730,8 +3779,7 @@ function createReplayTask(
3730
3779
  formatContext,
3731
3780
  context,
3732
3781
  treeContext,
3733
- componentStack,
3734
- isFallback
3782
+ componentStack
3735
3783
  ) {
3736
3784
  request.allPendingTasks++;
3737
3785
  null === blockedBoundary
@@ -3755,8 +3803,7 @@ function createReplayTask(
3755
3803
  context: context,
3756
3804
  treeContext: treeContext,
3757
3805
  componentStack: componentStack,
3758
- thenableState: thenableState,
3759
- isFallback: isFallback
3806
+ thenableState: thenableState
3760
3807
  };
3761
3808
  abortSet.add(task);
3762
3809
  return task;
@@ -3899,9 +3946,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
3899
3946
  var defaultProps = type.defaultProps;
3900
3947
  if (defaultProps) {
3901
3948
  newProps === props && (newProps = assign({}, newProps, props));
3902
- for (var propName$33 in defaultProps)
3903
- void 0 === newProps[propName$33] &&
3904
- (newProps[propName$33] = defaultProps[propName$33]);
3949
+ for (var propName$34 in defaultProps)
3950
+ void 0 === newProps[propName$34] &&
3951
+ (newProps[propName$34] = defaultProps[propName$34]);
3905
3952
  }
3906
3953
  props = newProps;
3907
3954
  newProps = emptyContextObject;
@@ -3961,16 +4008,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
3961
4008
  defaultProps = ref ? type[0] : newProps.state;
3962
4009
  initialState = !0;
3963
4010
  for (ref = ref ? 1 : 0; ref < type.length; ref++)
3964
- (propName$33 = type[ref]),
3965
- (propName$33 =
3966
- "function" === typeof propName$33
3967
- ? propName$33.call(newProps, defaultProps, props, void 0)
3968
- : propName$33),
3969
- null != propName$33 &&
4011
+ (propName$34 = type[ref]),
4012
+ (propName$34 =
4013
+ "function" === typeof propName$34
4014
+ ? propName$34.call(newProps, defaultProps, props, void 0)
4015
+ : propName$34),
4016
+ null != propName$34 &&
3970
4017
  (initialState
3971
4018
  ? ((initialState = !1),
3972
- (defaultProps = assign({}, defaultProps, propName$33)))
3973
- : assign(defaultProps, propName$33));
4019
+ (defaultProps = assign({}, defaultProps, propName$34)))
4020
+ : assign(defaultProps, propName$34));
3974
4021
  newProps.state = defaultProps;
3975
4022
  }
3976
4023
  else defaultProps.queue = null;
@@ -4013,8 +4060,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4013
4060
  task.blockedPreamble,
4014
4061
  task.hoistableState,
4015
4062
  task.formatContext,
4016
- newProps.lastPushedText,
4017
- task.isFallback
4063
+ newProps.lastPushedText
4018
4064
  );
4019
4065
  newProps.lastPushedText = !1;
4020
4066
  defaultProps = task.formatContext;
@@ -4046,8 +4092,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4046
4092
  task.formatContext,
4047
4093
  task.context,
4048
4094
  task.treeContext,
4049
- task.componentStack,
4050
- task.isFallback
4095
+ task.componentStack
4051
4096
  )),
4052
4097
  pushComponentStack(keyPath),
4053
4098
  request.pingedTasks.push(keyPath))
@@ -4139,20 +4184,23 @@ function renderElement(request, task, keyPath, type, props, ref) {
4139
4184
  case REACT_SUSPENSE_TYPE:
4140
4185
  a: if (null !== task.replay) {
4141
4186
  type = task.keyPath;
4187
+ newProps = task.formatContext;
4142
4188
  task.keyPath = keyPath;
4189
+ task.formatContext = getSuspenseContentFormatContext(newProps);
4143
4190
  keyPath = props.children;
4144
4191
  try {
4145
4192
  renderNode(request, task, keyPath, -1);
4146
4193
  } finally {
4147
- task.keyPath = type;
4194
+ (task.keyPath = type), (task.formatContext = newProps);
4148
4195
  }
4149
4196
  } else {
4150
4197
  type = task.keyPath;
4198
+ ref = task.formatContext;
4151
4199
  var parentBoundary = task.blockedBoundary;
4152
- ref = task.blockedPreamble;
4200
+ propName$34 = task.blockedPreamble;
4153
4201
  var parentHoistableState = task.hoistableState;
4154
- propName$33 = task.blockedSegment;
4155
- propName = props.fallback;
4202
+ propName = task.blockedSegment;
4203
+ var fallback = props.fallback;
4156
4204
  props = props.children;
4157
4205
  var fallbackAbortSet = new Set();
4158
4206
  var newBoundary =
@@ -4168,14 +4216,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
4168
4216
  (newBoundary.trackedContentKeyPath = keyPath);
4169
4217
  var boundarySegment = createPendingSegment(
4170
4218
  request,
4171
- propName$33.chunks.length,
4219
+ propName.chunks.length,
4172
4220
  newBoundary,
4173
4221
  task.formatContext,
4174
4222
  !1,
4175
4223
  !1
4176
4224
  );
4177
- propName$33.children.push(boundarySegment);
4178
- propName$33.lastPushedText = !1;
4225
+ propName.children.push(boundarySegment);
4226
+ propName.lastPushedText = !1;
4179
4227
  var contentRootSegment = createPendingSegment(
4180
4228
  request,
4181
4229
  0,
@@ -4193,9 +4241,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4193
4241
  task.blockedSegment = boundarySegment;
4194
4242
  task.blockedPreamble = newBoundary.fallbackPreamble;
4195
4243
  task.keyPath = newProps;
4244
+ task.formatContext = getSuspenseFallbackFormatContext(ref);
4196
4245
  boundarySegment.status = 6;
4197
4246
  try {
4198
- renderNode(request, task, propName, -1),
4247
+ renderNode(request, task, fallback, -1),
4199
4248
  pushSegmentFinale(
4200
4249
  boundarySegment.chunks,
4201
4250
  request.renderState,
@@ -4209,9 +4258,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4209
4258
  thrownValue)
4210
4259
  );
4211
4260
  } finally {
4212
- (task.blockedSegment = propName$33),
4213
- (task.blockedPreamble = ref),
4214
- (task.keyPath = type);
4261
+ (task.blockedSegment = propName),
4262
+ (task.blockedPreamble = propName$34),
4263
+ (task.keyPath = type),
4264
+ (task.formatContext = ref);
4215
4265
  }
4216
4266
  task = createRenderTask(
4217
4267
  request,
@@ -4224,11 +4274,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4224
4274
  newBoundary.contentState,
4225
4275
  task.abortSet,
4226
4276
  keyPath,
4227
- task.formatContext,
4277
+ getSuspenseContentFormatContext(task.formatContext),
4228
4278
  task.context,
4229
4279
  task.treeContext,
4230
- task.componentStack,
4231
- task.isFallback
4280
+ task.componentStack
4232
4281
  );
4233
4282
  pushComponentStack(task);
4234
4283
  request.pingedTasks.push(task);
@@ -4238,6 +4287,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4238
4287
  task.hoistableState = newBoundary.contentState;
4239
4288
  task.blockedSegment = contentRootSegment;
4240
4289
  task.keyPath = keyPath;
4290
+ task.formatContext = getSuspenseContentFormatContext(ref);
4241
4291
  contentRootSegment.status = 6;
4242
4292
  try {
4243
4293
  if (
@@ -4259,13 +4309,13 @@ function renderElement(request, task, keyPath, type, props, ref) {
4259
4309
  preparePreamble(request);
4260
4310
  break a;
4261
4311
  }
4262
- } catch (thrownValue$28) {
4312
+ } catch (thrownValue$29) {
4263
4313
  (newBoundary.status = 4),
4264
4314
  12 === request.status
4265
4315
  ? ((contentRootSegment.status = 3),
4266
4316
  (newProps = request.fatalError))
4267
4317
  : ((contentRootSegment.status = 4),
4268
- (newProps = thrownValue$28)),
4318
+ (newProps = thrownValue$29)),
4269
4319
  (defaultProps = getThrownInfo(task.componentStack)),
4270
4320
  (initialState = logRecoverableError(
4271
4321
  request,
@@ -4276,15 +4326,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4276
4326
  untrackBoundary(request, newBoundary);
4277
4327
  } finally {
4278
4328
  (task.blockedBoundary = parentBoundary),
4279
- (task.blockedPreamble = ref),
4329
+ (task.blockedPreamble = propName$34),
4280
4330
  (task.hoistableState = parentHoistableState),
4281
- (task.blockedSegment = propName$33),
4282
- (task.keyPath = type);
4331
+ (task.blockedSegment = propName),
4332
+ (task.keyPath = type),
4333
+ (task.formatContext = ref);
4283
4334
  }
4284
4335
  task = createRenderTask(
4285
4336
  request,
4286
4337
  null,
4287
- propName,
4338
+ fallback,
4288
4339
  -1,
4289
4340
  parentBoundary,
4290
4341
  boundarySegment,
@@ -4292,11 +4343,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4292
4343
  newBoundary.fallbackState,
4293
4344
  fallbackAbortSet,
4294
4345
  [keyPath[0], "Suspense Fallback", keyPath[2]],
4295
- task.formatContext,
4346
+ getSuspenseFallbackFormatContext(task.formatContext),
4296
4347
  task.context,
4297
4348
  task.treeContext,
4298
- task.componentStack,
4299
- !0
4349
+ task.componentStack
4300
4350
  );
4301
4351
  pushComponentStack(task);
4302
4352
  request.pingedTasks.push(task);
@@ -4308,9 +4358,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
4308
4358
  switch (type.$$typeof) {
4309
4359
  case REACT_FORWARD_REF_TYPE:
4310
4360
  if ("ref" in props)
4311
- for (newBoundary in ((newProps = {}), props))
4312
- "ref" !== newBoundary &&
4313
- (newProps[newBoundary] = props[newBoundary]);
4361
+ for (fallback in ((newProps = {}), props))
4362
+ "ref" !== fallback && (newProps[fallback] = props[fallback]);
4314
4363
  else newProps = props;
4315
4364
  type = renderWithHooks(
4316
4365
  request,
@@ -4472,12 +4521,13 @@ function retryNode(request, task) {
4472
4521
  );
4473
4522
  task.replay.pendingTasks--;
4474
4523
  props = getThrownInfo(task.componentStack);
4475
- key = task.blockedBoundary;
4524
+ key = request;
4525
+ request = task.blockedBoundary;
4476
4526
  type = x;
4477
- props = logRecoverableError(request, type, props);
4527
+ props = logRecoverableError(key, type, props);
4478
4528
  abortRemainingReplayNodes(
4479
- request,
4480
4529
  key,
4530
+ request,
4481
4531
  childNodes,
4482
4532
  name,
4483
4533
  type,
@@ -4504,6 +4554,7 @@ function retryNode(request, task) {
4504
4554
  node$jscomp$0 =
4505
4555
  null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4506
4556
  var prevKeyPath = task.keyPath,
4557
+ prevContext = task.formatContext,
4507
4558
  previousReplaySet = task.replay,
4508
4559
  parentBoundary = task.blockedBoundary,
4509
4560
  parentHoistableState = task.hoistableState,
@@ -4529,6 +4580,8 @@ function retryNode(request, task) {
4529
4580
  task.blockedBoundary = props;
4530
4581
  task.hoistableState = props.contentState;
4531
4582
  task.keyPath = key;
4583
+ task.formatContext =
4584
+ getSuspenseContentFormatContext(prevContext);
4532
4585
  task.replay = {
4533
4586
  nodes: ref,
4534
4587
  slots: name,
@@ -4562,7 +4615,8 @@ function retryNode(request, task) {
4562
4615
  (task.blockedBoundary = parentBoundary),
4563
4616
  (task.hoistableState = parentHoistableState),
4564
4617
  (task.replay = previousReplaySet),
4565
- (task.keyPath = prevKeyPath);
4618
+ (task.keyPath = prevKeyPath),
4619
+ (task.formatContext = prevContext);
4566
4620
  }
4567
4621
  task = createReplayTask(
4568
4622
  request,
@@ -4578,11 +4632,10 @@ function retryNode(request, task) {
4578
4632
  props.fallbackState,
4579
4633
  fallbackAbortSet,
4580
4634
  [key[0], "Suspense Fallback", key[2]],
4581
- task.formatContext,
4635
+ getSuspenseFallbackFormatContext(task.formatContext),
4582
4636
  task.context,
4583
4637
  task.treeContext,
4584
- task.componentStack,
4585
- !0
4638
+ task.componentStack
4586
4639
  );
4587
4640
  pushComponentStack(task);
4588
4641
  request.pingedTasks.push(task);
@@ -4765,8 +4818,7 @@ function spawnNewSuspendedReplayTask(request, task, thenableState) {
4765
4818
  task.formatContext,
4766
4819
  task.context,
4767
4820
  task.treeContext,
4768
- task.componentStack,
4769
- task.isFallback
4821
+ task.componentStack
4770
4822
  );
4771
4823
  }
4772
4824
  function spawnNewSuspendedRenderTask(request, task, thenableState) {
@@ -4795,8 +4847,7 @@ function spawnNewSuspendedRenderTask(request, task, thenableState) {
4795
4847
  task.formatContext,
4796
4848
  task.context,
4797
4849
  task.treeContext,
4798
- task.componentStack,
4799
- task.isFallback
4850
+ task.componentStack
4800
4851
  );
4801
4852
  }
4802
4853
  function renderNode(request, task, node, childIndex) {
@@ -4849,15 +4900,15 @@ function renderNode(request, task, node, childIndex) {
4849
4900
  chunkLength = segment.chunks.length;
4850
4901
  try {
4851
4902
  return renderNodeDestructive(request, task, node, childIndex);
4852
- } catch (thrownValue$50) {
4903
+ } catch (thrownValue$51) {
4853
4904
  if (
4854
4905
  (resetHooksState(),
4855
4906
  (segment.children.length = childrenLength),
4856
4907
  (segment.chunks.length = chunkLength),
4857
4908
  (node =
4858
- thrownValue$50 === SuspenseException
4909
+ thrownValue$51 === SuspenseException
4859
4910
  ? getSuspendedThenable()
4860
- : thrownValue$50),
4911
+ : thrownValue$51),
4861
4912
  "object" === typeof node && null !== node)
4862
4913
  ) {
4863
4914
  if ("function" === typeof node.then) {
@@ -5792,12 +5843,12 @@ function flushCompletedQueues(request, destination) {
5792
5843
  completedBoundaries.splice(0, i);
5793
5844
  var partialBoundaries = request.partialBoundaries;
5794
5845
  for (i = 0; i < partialBoundaries.length; i++) {
5795
- var boundary$53 = partialBoundaries[i];
5846
+ var boundary$54 = partialBoundaries[i];
5796
5847
  a: {
5797
5848
  clientRenderedBoundaries = request;
5798
5849
  boundary = destination;
5799
- flushedByteSize = boundary$53.byteSize;
5800
- var completedSegments = boundary$53.completedSegments;
5850
+ flushedByteSize = boundary$54.byteSize;
5851
+ var completedSegments = boundary$54.completedSegments;
5801
5852
  for (
5802
5853
  JSCompiler_inline_result = 0;
5803
5854
  JSCompiler_inline_result < completedSegments.length;
@@ -5807,7 +5858,7 @@ function flushCompletedQueues(request, destination) {
5807
5858
  !flushPartiallyCompletedSegment(
5808
5859
  clientRenderedBoundaries,
5809
5860
  boundary,
5810
- boundary$53,
5861
+ boundary$54,
5811
5862
  completedSegments[JSCompiler_inline_result]
5812
5863
  )
5813
5864
  ) {
@@ -5819,7 +5870,7 @@ function flushCompletedQueues(request, destination) {
5819
5870
  completedSegments.splice(0, JSCompiler_inline_result);
5820
5871
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5821
5872
  boundary,
5822
- boundary$53.contentState,
5873
+ boundary$54.contentState,
5823
5874
  clientRenderedBoundaries.renderState
5824
5875
  );
5825
5876
  }
@@ -5902,8 +5953,8 @@ function abort(request, reason) {
5902
5953
  }
5903
5954
  null !== request.destination &&
5904
5955
  flushCompletedQueues(request, request.destination);
5905
- } catch (error$55) {
5906
- logRecoverableError(request, error$55, {}), fatalError(request, error$55);
5956
+ } catch (error$56) {
5957
+ logRecoverableError(request, error$56, {}), fatalError(request, error$56);
5907
5958
  }
5908
5959
  }
5909
5960
  function onError() {}
@@ -5922,7 +5973,7 @@ function renderToStringImpl(
5922
5973
  children,
5923
5974
  options,
5924
5975
  createRenderState(options, generateStaticMarkup),
5925
- createFormatContext(0, null, 0),
5976
+ createFormatContext(0, null, 0, null),
5926
5977
  Infinity,
5927
5978
  onError,
5928
5979
  void 0,
@@ -5969,4 +6020,4 @@ exports.renderToString = function (children, options) {
5969
6020
  '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'
5970
6021
  );
5971
6022
  };
5972
- exports.version = "19.2.0-canary-d85f86cf-20250514";
6023
+ exports.version = "19.2.0-canary-4448b187-20250515";