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.
@@ -317,52 +317,96 @@ function createResumableState(
317
317
  function createPreambleState() {
318
318
  return { htmlChunks: null, headChunks: null, bodyChunks: null };
319
319
  }
320
- function createFormatContext(insertionMode, selectedValue, tagScope) {
320
+ function createFormatContext(
321
+ insertionMode,
322
+ selectedValue,
323
+ tagScope,
324
+ viewTransition
325
+ ) {
321
326
  return {
322
327
  insertionMode: insertionMode,
323
328
  selectedValue: selectedValue,
324
- tagScope: tagScope
329
+ tagScope: tagScope,
330
+ viewTransition: viewTransition
325
331
  };
326
332
  }
327
333
  function getChildFormatContext(parentContext, type, props) {
334
+ var subtreeScope = parentContext.tagScope & -25;
328
335
  switch (type) {
329
336
  case "noscript":
330
- return createFormatContext(2, null, parentContext.tagScope | 1);
337
+ return createFormatContext(2, null, subtreeScope | 1, null);
331
338
  case "select":
332
339
  return createFormatContext(
333
340
  2,
334
341
  null != props.value ? props.value : props.defaultValue,
335
- parentContext.tagScope
342
+ subtreeScope,
343
+ null
336
344
  );
337
345
  case "svg":
338
- return createFormatContext(4, null, parentContext.tagScope);
346
+ return createFormatContext(4, null, subtreeScope, null);
339
347
  case "picture":
340
- return createFormatContext(2, null, parentContext.tagScope | 2);
348
+ return createFormatContext(2, null, subtreeScope | 2, null);
341
349
  case "math":
342
- return createFormatContext(5, null, parentContext.tagScope);
350
+ return createFormatContext(5, null, subtreeScope, null);
343
351
  case "foreignObject":
344
- return createFormatContext(2, null, parentContext.tagScope);
352
+ return createFormatContext(2, null, subtreeScope, null);
345
353
  case "table":
346
- return createFormatContext(6, null, parentContext.tagScope);
354
+ return createFormatContext(6, null, subtreeScope, null);
347
355
  case "thead":
348
356
  case "tbody":
349
357
  case "tfoot":
350
- return createFormatContext(7, null, parentContext.tagScope);
358
+ return createFormatContext(7, null, subtreeScope, null);
351
359
  case "colgroup":
352
- return createFormatContext(9, null, parentContext.tagScope);
360
+ return createFormatContext(9, null, subtreeScope, null);
353
361
  case "tr":
354
- return createFormatContext(8, null, parentContext.tagScope);
362
+ return createFormatContext(8, null, subtreeScope, null);
355
363
  case "head":
356
364
  if (2 > parentContext.insertionMode)
357
- return createFormatContext(3, null, parentContext.tagScope);
365
+ return createFormatContext(3, null, subtreeScope, null);
358
366
  break;
359
367
  case "html":
360
368
  if (0 === parentContext.insertionMode)
361
- return createFormatContext(1, null, parentContext.tagScope);
369
+ return createFormatContext(1, null, subtreeScope, null);
362
370
  }
363
371
  return 6 <= parentContext.insertionMode || 2 > parentContext.insertionMode
364
- ? createFormatContext(2, null, parentContext.tagScope)
365
- : parentContext;
372
+ ? createFormatContext(2, null, subtreeScope, null)
373
+ : parentContext.tagScope !== subtreeScope
374
+ ? createFormatContext(
375
+ parentContext.insertionMode,
376
+ parentContext.selectedValue,
377
+ subtreeScope,
378
+ null
379
+ )
380
+ : parentContext;
381
+ }
382
+ function getSuspenseViewTransition(parentViewTransition) {
383
+ return null === parentViewTransition
384
+ ? null
385
+ : {
386
+ update: parentViewTransition.update,
387
+ enter: null,
388
+ exit: null,
389
+ share: parentViewTransition.update,
390
+ name: parentViewTransition.autoName,
391
+ autoName: parentViewTransition.autoName,
392
+ nameIdx: 0
393
+ };
394
+ }
395
+ function getSuspenseFallbackFormatContext(parentContext) {
396
+ return createFormatContext(
397
+ parentContext.insertionMode,
398
+ parentContext.selectedValue,
399
+ parentContext.tagScope | 12,
400
+ getSuspenseViewTransition(parentContext.viewTransition)
401
+ );
402
+ }
403
+ function getSuspenseContentFormatContext(parentContext) {
404
+ return createFormatContext(
405
+ parentContext.insertionMode,
406
+ parentContext.selectedValue,
407
+ parentContext.tagScope | 16,
408
+ getSuspenseViewTransition(parentContext.viewTransition)
409
+ );
366
410
  }
367
411
  var styleNameCache = new Map();
368
412
  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":
@@ -1342,9 +1385,11 @@ function pushStartInstance(
1342
1385
  } else JSCompiler_inline_result$jscomp$2 = children$jscomp$5;
1343
1386
  return JSCompiler_inline_result$jscomp$2;
1344
1387
  case "title":
1388
+ var noscriptTagInScope = formatContext.tagScope & 1,
1389
+ isFallback = formatContext.tagScope & 4;
1345
1390
  if (
1346
1391
  4 === formatContext.insertionMode ||
1347
- formatContext.tagScope & 1 ||
1392
+ noscriptTagInScope ||
1348
1393
  null != props.itemProp
1349
1394
  )
1350
1395
  var JSCompiler_inline_result$jscomp$3 = pushTitleImpl(
@@ -1358,12 +1403,14 @@ function pushStartInstance(
1358
1403
  (JSCompiler_inline_result$jscomp$3 = void 0));
1359
1404
  return JSCompiler_inline_result$jscomp$3;
1360
1405
  case "link":
1361
- var rel = props.rel,
1406
+ var noscriptTagInScope$jscomp$0 = formatContext.tagScope & 1,
1407
+ isFallback$jscomp$0 = formatContext.tagScope & 4,
1408
+ rel = props.rel,
1362
1409
  href = props.href,
1363
1410
  precedence = props.precedence;
1364
1411
  if (
1365
1412
  4 === formatContext.insertionMode ||
1366
- formatContext.tagScope & 1 ||
1413
+ noscriptTagInScope$jscomp$0 ||
1367
1414
  null != props.itemProp ||
1368
1415
  "string" !== typeof rel ||
1369
1416
  "string" !== typeof href ||
@@ -1430,12 +1477,13 @@ function pushStartInstance(
1430
1477
  props
1431
1478
  ))
1432
1479
  : (textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
1433
- (JSCompiler_inline_result$jscomp$4 = isFallback
1480
+ (JSCompiler_inline_result$jscomp$4 = isFallback$jscomp$0
1434
1481
  ? null
1435
1482
  : pushLinkImpl(renderState.hoistableChunks, props)));
1436
1483
  return JSCompiler_inline_result$jscomp$4;
1437
1484
  case "script":
1438
- var asyncProp = props.async;
1485
+ var noscriptTagInScope$jscomp$1 = formatContext.tagScope & 1,
1486
+ asyncProp = props.async;
1439
1487
  if (
1440
1488
  "string" !== typeof props.src ||
1441
1489
  !props.src ||
@@ -1445,7 +1493,7 @@ function pushStartInstance(
1445
1493
  props.onLoad ||
1446
1494
  props.onError ||
1447
1495
  4 === formatContext.insertionMode ||
1448
- formatContext.tagScope & 1 ||
1496
+ noscriptTagInScope$jscomp$1 ||
1449
1497
  null != props.itemProp
1450
1498
  )
1451
1499
  var JSCompiler_inline_result$jscomp$5 = pushScriptImpl(
@@ -1482,11 +1530,12 @@ function pushStartInstance(
1482
1530
  }
1483
1531
  return JSCompiler_inline_result$jscomp$5;
1484
1532
  case "style":
1485
- var precedence$jscomp$0 = props.precedence,
1533
+ var noscriptTagInScope$jscomp$2 = formatContext.tagScope & 1,
1534
+ precedence$jscomp$0 = props.precedence,
1486
1535
  href$jscomp$0 = props.href;
1487
1536
  if (
1488
1537
  4 === formatContext.insertionMode ||
1489
- formatContext.tagScope & 1 ||
1538
+ noscriptTagInScope$jscomp$2 ||
1490
1539
  null != props.itemProp ||
1491
1540
  "string" !== typeof precedence$jscomp$0 ||
1492
1541
  "string" !== typeof href$jscomp$0 ||
@@ -1587,9 +1636,11 @@ function pushStartInstance(
1587
1636
  }
1588
1637
  return JSCompiler_inline_result$jscomp$6;
1589
1638
  case "meta":
1639
+ var noscriptTagInScope$jscomp$3 = formatContext.tagScope & 1,
1640
+ isFallback$jscomp$1 = formatContext.tagScope & 4;
1590
1641
  if (
1591
1642
  4 === formatContext.insertionMode ||
1592
- formatContext.tagScope & 1 ||
1643
+ noscriptTagInScope$jscomp$3 ||
1593
1644
  null != props.itemProp
1594
1645
  )
1595
1646
  var JSCompiler_inline_result$jscomp$7 = pushSelfClosing(
@@ -1599,7 +1650,7 @@ function pushStartInstance(
1599
1650
  );
1600
1651
  else
1601
1652
  textEmbedded && target$jscomp$0.push("\x3c!-- --\x3e"),
1602
- (JSCompiler_inline_result$jscomp$7 = isFallback
1653
+ (JSCompiler_inline_result$jscomp$7 = isFallback$jscomp$1
1603
1654
  ? null
1604
1655
  : "string" === typeof props.charSet
1605
1656
  ? pushSelfClosing(renderState.charsetChunks, props, "meta")
@@ -1657,17 +1708,18 @@ function pushStartInstance(
1657
1708
  target$jscomp$0.push("\n");
1658
1709
  return children$jscomp$8;
1659
1710
  case "img":
1660
- var src = props.src,
1711
+ var pictureOrNoScriptTagInScope = formatContext.tagScope & 3,
1712
+ src = props.src,
1661
1713
  srcSet = props.srcSet;
1662
1714
  if (
1663
1715
  !(
1664
1716
  "lazy" === props.loading ||
1665
1717
  (!src && !srcSet) ||
1666
1718
  ("string" !== typeof src && null != src) ||
1667
- ("string" !== typeof srcSet && null != srcSet)
1719
+ ("string" !== typeof srcSet && null != srcSet) ||
1720
+ "low" === props.fetchPriority ||
1721
+ pictureOrNoScriptTagInScope
1668
1722
  ) &&
1669
- "low" !== props.fetchPriority &&
1670
- !1 === !!(formatContext.tagScope & 3) &&
1671
1723
  ("string" !== typeof src ||
1672
1724
  ":" !== src[4] ||
1673
1725
  ("d" !== src[0] && "D" !== src[0]) ||
@@ -2676,17 +2728,17 @@ function createRenderState(resumableState, generateStaticMarkup) {
2676
2728
  "\x3c/script>"
2677
2729
  ));
2678
2730
  bootstrapScriptContent = idPrefix + "P:";
2679
- var JSCompiler_object_inline_segmentPrefix_1598 = idPrefix + "S:";
2731
+ var JSCompiler_object_inline_segmentPrefix_1613 = idPrefix + "S:";
2680
2732
  idPrefix += "B:";
2681
- var JSCompiler_object_inline_preamble_1601 = createPreambleState(),
2682
- JSCompiler_object_inline_preconnects_1611 = new Set(),
2683
- JSCompiler_object_inline_fontPreloads_1612 = new Set(),
2684
- JSCompiler_object_inline_highImagePreloads_1613 = new Set(),
2685
- JSCompiler_object_inline_styles_1614 = new Map(),
2686
- JSCompiler_object_inline_bootstrapScripts_1615 = new Set(),
2687
- JSCompiler_object_inline_scripts_1616 = new Set(),
2688
- JSCompiler_object_inline_bulkPreloads_1617 = new Set(),
2689
- JSCompiler_object_inline_preloads_1618 = {
2733
+ var JSCompiler_object_inline_preamble_1616 = createPreambleState(),
2734
+ JSCompiler_object_inline_preconnects_1626 = new Set(),
2735
+ JSCompiler_object_inline_fontPreloads_1627 = new Set(),
2736
+ JSCompiler_object_inline_highImagePreloads_1628 = new Set(),
2737
+ JSCompiler_object_inline_styles_1629 = new Map(),
2738
+ JSCompiler_object_inline_bootstrapScripts_1630 = new Set(),
2739
+ JSCompiler_object_inline_scripts_1631 = new Set(),
2740
+ JSCompiler_object_inline_bulkPreloads_1632 = new Set(),
2741
+ JSCompiler_object_inline_preloads_1633 = {
2690
2742
  images: new Map(),
2691
2743
  stylesheets: new Map(),
2692
2744
  scripts: new Map(),
@@ -2723,7 +2775,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2723
2775
  scriptConfig.moduleScriptResources[href] = null;
2724
2776
  scriptConfig = [];
2725
2777
  pushLinkImpl(scriptConfig, props);
2726
- JSCompiler_object_inline_bootstrapScripts_1615.add(scriptConfig);
2778
+ JSCompiler_object_inline_bootstrapScripts_1630.add(scriptConfig);
2727
2779
  bootstrapChunks.push('<script src="', escapeTextForBrowser(src), '"');
2728
2780
  "string" === typeof integrity &&
2729
2781
  bootstrapChunks.push(
@@ -2770,7 +2822,7 @@ function createRenderState(resumableState, generateStaticMarkup) {
2770
2822
  (props.moduleScriptResources[scriptConfig] = null),
2771
2823
  (props = []),
2772
2824
  pushLinkImpl(props, integrity),
2773
- JSCompiler_object_inline_bootstrapScripts_1615.add(props),
2825
+ JSCompiler_object_inline_bootstrapScripts_1630.add(props),
2774
2826
  bootstrapChunks.push(
2775
2827
  '<script type="module" src="',
2776
2828
  escapeTextForBrowser(i),
@@ -2792,10 +2844,10 @@ function createRenderState(resumableState, generateStaticMarkup) {
2792
2844
  bootstrapChunks.push(' async="">\x3c/script>');
2793
2845
  return {
2794
2846
  placeholderPrefix: bootstrapScriptContent,
2795
- segmentPrefix: JSCompiler_object_inline_segmentPrefix_1598,
2847
+ segmentPrefix: JSCompiler_object_inline_segmentPrefix_1613,
2796
2848
  boundaryPrefix: idPrefix,
2797
2849
  startInlineScript: "<script",
2798
- preamble: JSCompiler_object_inline_preamble_1601,
2850
+ preamble: JSCompiler_object_inline_preamble_1616,
2799
2851
  externalRuntimeScript: null,
2800
2852
  bootstrapChunks: bootstrapChunks,
2801
2853
  importMapChunks: [],
@@ -2811,14 +2863,14 @@ function createRenderState(resumableState, generateStaticMarkup) {
2811
2863
  charsetChunks: [],
2812
2864
  viewportChunks: [],
2813
2865
  hoistableChunks: [],
2814
- preconnects: JSCompiler_object_inline_preconnects_1611,
2815
- fontPreloads: JSCompiler_object_inline_fontPreloads_1612,
2816
- highImagePreloads: JSCompiler_object_inline_highImagePreloads_1613,
2817
- styles: JSCompiler_object_inline_styles_1614,
2818
- bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1615,
2819
- scripts: JSCompiler_object_inline_scripts_1616,
2820
- bulkPreloads: JSCompiler_object_inline_bulkPreloads_1617,
2821
- preloads: JSCompiler_object_inline_preloads_1618,
2866
+ preconnects: JSCompiler_object_inline_preconnects_1626,
2867
+ fontPreloads: JSCompiler_object_inline_fontPreloads_1627,
2868
+ highImagePreloads: JSCompiler_object_inline_highImagePreloads_1628,
2869
+ styles: JSCompiler_object_inline_styles_1629,
2870
+ bootstrapScripts: JSCompiler_object_inline_bootstrapScripts_1630,
2871
+ scripts: JSCompiler_object_inline_scripts_1631,
2872
+ bulkPreloads: JSCompiler_object_inline_bulkPreloads_1632,
2873
+ preloads: JSCompiler_object_inline_preloads_1633,
2822
2874
  stylesToHoist: !1,
2823
2875
  generateStaticMarkup: generateStaticMarkup
2824
2876
  };
@@ -3683,8 +3735,7 @@ function createRequest(
3683
3735
  rootFormatContext,
3684
3736
  null,
3685
3737
  emptyTreeContext,
3686
- null,
3687
- !1
3738
+ null
3688
3739
  );
3689
3740
  pushComponentStack(children);
3690
3741
  resumableState.pingedTasks.push(children);
@@ -3734,8 +3785,7 @@ function createRenderTask(
3734
3785
  formatContext,
3735
3786
  context,
3736
3787
  treeContext,
3737
- componentStack,
3738
- isFallback
3788
+ componentStack
3739
3789
  ) {
3740
3790
  request.allPendingTasks++;
3741
3791
  null === blockedBoundary
@@ -3758,8 +3808,7 @@ function createRenderTask(
3758
3808
  context: context,
3759
3809
  treeContext: treeContext,
3760
3810
  componentStack: componentStack,
3761
- thenableState: thenableState,
3762
- isFallback: isFallback
3811
+ thenableState: thenableState
3763
3812
  };
3764
3813
  abortSet.add(task);
3765
3814
  return task;
@@ -3777,8 +3826,7 @@ function createReplayTask(
3777
3826
  formatContext,
3778
3827
  context,
3779
3828
  treeContext,
3780
- componentStack,
3781
- isFallback
3829
+ componentStack
3782
3830
  ) {
3783
3831
  request.allPendingTasks++;
3784
3832
  null === blockedBoundary
@@ -3802,8 +3850,7 @@ function createReplayTask(
3802
3850
  context: context,
3803
3851
  treeContext: treeContext,
3804
3852
  componentStack: componentStack,
3805
- thenableState: thenableState,
3806
- isFallback: isFallback
3853
+ thenableState: thenableState
3807
3854
  };
3808
3855
  abortSet.add(task);
3809
3856
  return task;
@@ -3946,9 +3993,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
3946
3993
  var defaultProps = type.defaultProps;
3947
3994
  if (defaultProps) {
3948
3995
  newProps === props && (newProps = assign({}, newProps, props));
3949
- for (var propName$33 in defaultProps)
3950
- void 0 === newProps[propName$33] &&
3951
- (newProps[propName$33] = defaultProps[propName$33]);
3996
+ for (var propName$34 in defaultProps)
3997
+ void 0 === newProps[propName$34] &&
3998
+ (newProps[propName$34] = defaultProps[propName$34]);
3952
3999
  }
3953
4000
  props = newProps;
3954
4001
  newProps = emptyContextObject;
@@ -4008,16 +4055,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4008
4055
  defaultProps = ref ? type[0] : newProps.state;
4009
4056
  initialState = !0;
4010
4057
  for (ref = ref ? 1 : 0; ref < type.length; ref++)
4011
- (propName$33 = type[ref]),
4012
- (propName$33 =
4013
- "function" === typeof propName$33
4014
- ? propName$33.call(newProps, defaultProps, props, void 0)
4015
- : propName$33),
4016
- null != propName$33 &&
4058
+ (propName$34 = type[ref]),
4059
+ (propName$34 =
4060
+ "function" === typeof propName$34
4061
+ ? propName$34.call(newProps, defaultProps, props, void 0)
4062
+ : propName$34),
4063
+ null != propName$34 &&
4017
4064
  (initialState
4018
4065
  ? ((initialState = !1),
4019
- (defaultProps = assign({}, defaultProps, propName$33)))
4020
- : assign(defaultProps, propName$33));
4066
+ (defaultProps = assign({}, defaultProps, propName$34)))
4067
+ : assign(defaultProps, propName$34));
4021
4068
  newProps.state = defaultProps;
4022
4069
  }
4023
4070
  else defaultProps.queue = null;
@@ -4060,8 +4107,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4060
4107
  task.blockedPreamble,
4061
4108
  task.hoistableState,
4062
4109
  task.formatContext,
4063
- newProps.lastPushedText,
4064
- task.isFallback
4110
+ newProps.lastPushedText
4065
4111
  );
4066
4112
  newProps.lastPushedText = !1;
4067
4113
  defaultProps = task.formatContext;
@@ -4093,8 +4139,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4093
4139
  task.formatContext,
4094
4140
  task.context,
4095
4141
  task.treeContext,
4096
- task.componentStack,
4097
- task.isFallback
4142
+ task.componentStack
4098
4143
  )),
4099
4144
  pushComponentStack(keyPath),
4100
4145
  request.pingedTasks.push(keyPath))
@@ -4186,20 +4231,23 @@ function renderElement(request, task, keyPath, type, props, ref) {
4186
4231
  case REACT_SUSPENSE_TYPE:
4187
4232
  a: if (null !== task.replay) {
4188
4233
  type = task.keyPath;
4234
+ newProps = task.formatContext;
4189
4235
  task.keyPath = keyPath;
4236
+ task.formatContext = getSuspenseContentFormatContext(newProps);
4190
4237
  keyPath = props.children;
4191
4238
  try {
4192
4239
  renderNode(request, task, keyPath, -1);
4193
4240
  } finally {
4194
- task.keyPath = type;
4241
+ (task.keyPath = type), (task.formatContext = newProps);
4195
4242
  }
4196
4243
  } else {
4197
4244
  type = task.keyPath;
4245
+ ref = task.formatContext;
4198
4246
  var parentBoundary = task.blockedBoundary;
4199
- ref = task.blockedPreamble;
4247
+ propName$34 = task.blockedPreamble;
4200
4248
  var parentHoistableState = task.hoistableState;
4201
- propName$33 = task.blockedSegment;
4202
- propName = props.fallback;
4249
+ propName = task.blockedSegment;
4250
+ var fallback = props.fallback;
4203
4251
  props = props.children;
4204
4252
  var fallbackAbortSet = new Set();
4205
4253
  var newBoundary =
@@ -4215,14 +4263,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
4215
4263
  (newBoundary.trackedContentKeyPath = keyPath);
4216
4264
  var boundarySegment = createPendingSegment(
4217
4265
  request,
4218
- propName$33.chunks.length,
4266
+ propName.chunks.length,
4219
4267
  newBoundary,
4220
4268
  task.formatContext,
4221
4269
  !1,
4222
4270
  !1
4223
4271
  );
4224
- propName$33.children.push(boundarySegment);
4225
- propName$33.lastPushedText = !1;
4272
+ propName.children.push(boundarySegment);
4273
+ propName.lastPushedText = !1;
4226
4274
  var contentRootSegment = createPendingSegment(
4227
4275
  request,
4228
4276
  0,
@@ -4240,9 +4288,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4240
4288
  task.blockedSegment = boundarySegment;
4241
4289
  task.blockedPreamble = newBoundary.fallbackPreamble;
4242
4290
  task.keyPath = newProps;
4291
+ task.formatContext = getSuspenseFallbackFormatContext(ref);
4243
4292
  boundarySegment.status = 6;
4244
4293
  try {
4245
- renderNode(request, task, propName, -1),
4294
+ renderNode(request, task, fallback, -1),
4246
4295
  pushSegmentFinale(
4247
4296
  boundarySegment.chunks,
4248
4297
  request.renderState,
@@ -4256,9 +4305,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4256
4305
  thrownValue)
4257
4306
  );
4258
4307
  } finally {
4259
- (task.blockedSegment = propName$33),
4260
- (task.blockedPreamble = ref),
4261
- (task.keyPath = type);
4308
+ (task.blockedSegment = propName),
4309
+ (task.blockedPreamble = propName$34),
4310
+ (task.keyPath = type),
4311
+ (task.formatContext = ref);
4262
4312
  }
4263
4313
  task = createRenderTask(
4264
4314
  request,
@@ -4271,11 +4321,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4271
4321
  newBoundary.contentState,
4272
4322
  task.abortSet,
4273
4323
  keyPath,
4274
- task.formatContext,
4324
+ getSuspenseContentFormatContext(task.formatContext),
4275
4325
  task.context,
4276
4326
  task.treeContext,
4277
- task.componentStack,
4278
- task.isFallback
4327
+ task.componentStack
4279
4328
  );
4280
4329
  pushComponentStack(task);
4281
4330
  request.pingedTasks.push(task);
@@ -4285,6 +4334,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4285
4334
  task.hoistableState = newBoundary.contentState;
4286
4335
  task.blockedSegment = contentRootSegment;
4287
4336
  task.keyPath = keyPath;
4337
+ task.formatContext = getSuspenseContentFormatContext(ref);
4288
4338
  contentRootSegment.status = 6;
4289
4339
  try {
4290
4340
  if (
@@ -4306,13 +4356,13 @@ function renderElement(request, task, keyPath, type, props, ref) {
4306
4356
  preparePreamble(request);
4307
4357
  break a;
4308
4358
  }
4309
- } catch (thrownValue$28) {
4359
+ } catch (thrownValue$29) {
4310
4360
  (newBoundary.status = 4),
4311
4361
  12 === request.status
4312
4362
  ? ((contentRootSegment.status = 3),
4313
4363
  (newProps = request.fatalError))
4314
4364
  : ((contentRootSegment.status = 4),
4315
- (newProps = thrownValue$28)),
4365
+ (newProps = thrownValue$29)),
4316
4366
  (defaultProps = getThrownInfo(task.componentStack)),
4317
4367
  (initialState = logRecoverableError(
4318
4368
  request,
@@ -4323,15 +4373,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4323
4373
  untrackBoundary(request, newBoundary);
4324
4374
  } finally {
4325
4375
  (task.blockedBoundary = parentBoundary),
4326
- (task.blockedPreamble = ref),
4376
+ (task.blockedPreamble = propName$34),
4327
4377
  (task.hoistableState = parentHoistableState),
4328
- (task.blockedSegment = propName$33),
4329
- (task.keyPath = type);
4378
+ (task.blockedSegment = propName),
4379
+ (task.keyPath = type),
4380
+ (task.formatContext = ref);
4330
4381
  }
4331
4382
  task = createRenderTask(
4332
4383
  request,
4333
4384
  null,
4334
- propName,
4385
+ fallback,
4335
4386
  -1,
4336
4387
  parentBoundary,
4337
4388
  boundarySegment,
@@ -4339,11 +4390,10 @@ function renderElement(request, task, keyPath, type, props, ref) {
4339
4390
  newBoundary.fallbackState,
4340
4391
  fallbackAbortSet,
4341
4392
  [keyPath[0], "Suspense Fallback", keyPath[2]],
4342
- task.formatContext,
4393
+ getSuspenseFallbackFormatContext(task.formatContext),
4343
4394
  task.context,
4344
4395
  task.treeContext,
4345
- task.componentStack,
4346
- !0
4396
+ task.componentStack
4347
4397
  );
4348
4398
  pushComponentStack(task);
4349
4399
  request.pingedTasks.push(task);
@@ -4355,9 +4405,8 @@ function renderElement(request, task, keyPath, type, props, ref) {
4355
4405
  switch (type.$$typeof) {
4356
4406
  case REACT_FORWARD_REF_TYPE:
4357
4407
  if ("ref" in props)
4358
- for (newBoundary in ((newProps = {}), props))
4359
- "ref" !== newBoundary &&
4360
- (newProps[newBoundary] = props[newBoundary]);
4408
+ for (fallback in ((newProps = {}), props))
4409
+ "ref" !== fallback && (newProps[fallback] = props[fallback]);
4361
4410
  else newProps = props;
4362
4411
  type = renderWithHooks(
4363
4412
  request,
@@ -4529,12 +4578,13 @@ function retryNode(request, task) {
4529
4578
  );
4530
4579
  task.replay.pendingTasks--;
4531
4580
  props = getThrownInfo(task.componentStack);
4532
- key = task.blockedBoundary;
4581
+ key = request;
4582
+ request = task.blockedBoundary;
4533
4583
  type = x;
4534
- props = logRecoverableError(request, type, props);
4584
+ props = logRecoverableError(key, type, props);
4535
4585
  abortRemainingReplayNodes(
4536
- request,
4537
4586
  key,
4587
+ request,
4538
4588
  childNodes,
4539
4589
  name,
4540
4590
  type,
@@ -4559,6 +4609,7 @@ function retryNode(request, task) {
4559
4609
  node$jscomp$0 =
4560
4610
  null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4561
4611
  var prevKeyPath = task.keyPath,
4612
+ prevContext = task.formatContext,
4562
4613
  previousReplaySet = task.replay,
4563
4614
  parentBoundary = task.blockedBoundary,
4564
4615
  parentHoistableState = task.hoistableState,
@@ -4584,6 +4635,8 @@ function retryNode(request, task) {
4584
4635
  task.blockedBoundary = props;
4585
4636
  task.hoistableState = props.contentState;
4586
4637
  task.keyPath = key;
4638
+ task.formatContext =
4639
+ getSuspenseContentFormatContext(prevContext);
4587
4640
  task.replay = {
4588
4641
  nodes: ref,
4589
4642
  slots: name,
@@ -4619,7 +4672,8 @@ function retryNode(request, task) {
4619
4672
  (task.blockedBoundary = parentBoundary),
4620
4673
  (task.hoistableState = parentHoistableState),
4621
4674
  (task.replay = previousReplaySet),
4622
- (task.keyPath = prevKeyPath);
4675
+ (task.keyPath = prevKeyPath),
4676
+ (task.formatContext = prevContext);
4623
4677
  }
4624
4678
  task = createReplayTask(
4625
4679
  request,
@@ -4635,11 +4689,10 @@ function retryNode(request, task) {
4635
4689
  props.fallbackState,
4636
4690
  fallbackAbortSet,
4637
4691
  [key[0], "Suspense Fallback", key[2]],
4638
- task.formatContext,
4692
+ getSuspenseFallbackFormatContext(task.formatContext),
4639
4693
  task.context,
4640
4694
  task.treeContext,
4641
- task.componentStack,
4642
- !0
4695
+ task.componentStack
4643
4696
  );
4644
4697
  pushComponentStack(task);
4645
4698
  request.pingedTasks.push(task);
@@ -4825,8 +4878,7 @@ function spawnNewSuspendedReplayTask(request, task, thenableState) {
4825
4878
  task.formatContext,
4826
4879
  task.context,
4827
4880
  task.treeContext,
4828
- task.componentStack,
4829
- task.isFallback
4881
+ task.componentStack
4830
4882
  );
4831
4883
  }
4832
4884
  function spawnNewSuspendedRenderTask(request, task, thenableState) {
@@ -4855,8 +4907,7 @@ function spawnNewSuspendedRenderTask(request, task, thenableState) {
4855
4907
  task.formatContext,
4856
4908
  task.context,
4857
4909
  task.treeContext,
4858
- task.componentStack,
4859
- task.isFallback
4910
+ task.componentStack
4860
4911
  );
4861
4912
  }
4862
4913
  function renderNode(request, task, node, childIndex) {
@@ -4909,15 +4960,15 @@ function renderNode(request, task, node, childIndex) {
4909
4960
  chunkLength = segment.chunks.length;
4910
4961
  try {
4911
4962
  return renderNodeDestructive(request, task, node, childIndex);
4912
- } catch (thrownValue$50) {
4963
+ } catch (thrownValue$51) {
4913
4964
  if (
4914
4965
  (resetHooksState(),
4915
4966
  (segment.children.length = childrenLength),
4916
4967
  (segment.chunks.length = chunkLength),
4917
4968
  (node =
4918
- thrownValue$50 === SuspenseException
4969
+ thrownValue$51 === SuspenseException
4919
4970
  ? getSuspendedThenable()
4920
- : thrownValue$50),
4971
+ : thrownValue$51),
4921
4972
  "object" === typeof node && null !== node)
4922
4973
  ) {
4923
4974
  if ("function" === typeof node.then) {
@@ -5869,12 +5920,12 @@ function flushCompletedQueues(request, destination) {
5869
5920
  completedBoundaries.splice(0, i);
5870
5921
  var partialBoundaries = request.partialBoundaries;
5871
5922
  for (i = 0; i < partialBoundaries.length; i++) {
5872
- var boundary$53 = partialBoundaries[i];
5923
+ var boundary$54 = partialBoundaries[i];
5873
5924
  a: {
5874
5925
  clientRenderedBoundaries = request;
5875
5926
  boundary = destination;
5876
- flushedByteSize = boundary$53.byteSize;
5877
- var completedSegments = boundary$53.completedSegments;
5927
+ flushedByteSize = boundary$54.byteSize;
5928
+ var completedSegments = boundary$54.completedSegments;
5878
5929
  for (
5879
5930
  JSCompiler_inline_result = 0;
5880
5931
  JSCompiler_inline_result < completedSegments.length;
@@ -5884,7 +5935,7 @@ function flushCompletedQueues(request, destination) {
5884
5935
  !flushPartiallyCompletedSegment(
5885
5936
  clientRenderedBoundaries,
5886
5937
  boundary,
5887
- boundary$53,
5938
+ boundary$54,
5888
5939
  completedSegments[JSCompiler_inline_result]
5889
5940
  )
5890
5941
  ) {
@@ -5896,7 +5947,7 @@ function flushCompletedQueues(request, destination) {
5896
5947
  completedSegments.splice(0, JSCompiler_inline_result);
5897
5948
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5898
5949
  boundary,
5899
- boundary$53.contentState,
5950
+ boundary$54.contentState,
5900
5951
  clientRenderedBoundaries.renderState
5901
5952
  );
5902
5953
  }
@@ -5979,8 +6030,8 @@ function abort(request, reason) {
5979
6030
  }
5980
6031
  null !== request.destination &&
5981
6032
  flushCompletedQueues(request, request.destination);
5982
- } catch (error$55) {
5983
- logRecoverableError(request, error$55, {}), fatalError(request, error$55);
6033
+ } catch (error$56) {
6034
+ logRecoverableError(request, error$56, {}), fatalError(request, error$56);
5984
6035
  }
5985
6036
  }
5986
6037
  function onError() {}
@@ -5999,7 +6050,7 @@ function renderToStringImpl(
5999
6050
  children,
6000
6051
  options,
6001
6052
  createRenderState(options, generateStaticMarkup),
6002
- createFormatContext(0, null, 0),
6053
+ createFormatContext(0, null, 0, null),
6003
6054
  Infinity,
6004
6055
  onError,
6005
6056
  void 0,
@@ -6049,4 +6100,4 @@ exports.renderToString = function (children, options) {
6049
6100
  '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'
6050
6101
  );
6051
6102
  };
6052
- exports.version = "19.2.0-canary-d85f86cf-20250514";
6103
+ exports.version = "19.2.0-canary-4448b187-20250515";