react-dom 19.2.0-canary-462d08f9-20250517 → 19.2.0-canary-c4676e72-20250520

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.
@@ -41,6 +41,14 @@
41
41
  function scriptReplacer(match, prefix, s, suffix) {
42
42
  return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
43
43
  }
44
+ function getIteratorFn(maybeIterable) {
45
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
46
+ return null;
47
+ maybeIterable =
48
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
49
+ maybeIterable["@@iterator"];
50
+ return "function" === typeof maybeIterable ? maybeIterable : null;
51
+ }
44
52
  function objectName(object) {
45
53
  return Object.prototype.toString
46
54
  .call(object)
@@ -4588,6 +4596,7 @@
4588
4596
  null,
4589
4597
  emptyTreeContext,
4590
4598
  null,
4599
+ null,
4591
4600
  emptyContextObject,
4592
4601
  null
4593
4602
  );
@@ -4651,15 +4660,17 @@
4651
4660
  }
4652
4661
  function createSuspenseBoundary(
4653
4662
  request,
4663
+ row,
4654
4664
  fallbackAbortableTasks,
4655
4665
  contentPreamble,
4656
4666
  fallbackPreamble
4657
4667
  ) {
4658
- return {
4668
+ fallbackAbortableTasks = {
4659
4669
  status: PENDING,
4660
4670
  rootSegmentID: -1,
4661
4671
  parentFlushed: !1,
4662
4672
  pendingTasks: 0,
4673
+ row: row,
4663
4674
  completedSegments: [],
4664
4675
  byteSize: 0,
4665
4676
  fallbackAbortableTasks: fallbackAbortableTasks,
@@ -4674,6 +4685,14 @@
4674
4685
  errorStack: null,
4675
4686
  errorComponentStack: null
4676
4687
  };
4688
+ null !== row &&
4689
+ (row.pendingTasks++,
4690
+ (row = row.boundaries),
4691
+ null !== row &&
4692
+ (request.allPendingTasks++,
4693
+ fallbackAbortableTasks.pendingTasks++,
4694
+ row.push(fallbackAbortableTasks)));
4695
+ return fallbackAbortableTasks;
4677
4696
  }
4678
4697
  function createRenderTask(
4679
4698
  request,
@@ -4689,6 +4708,7 @@
4689
4708
  formatContext,
4690
4709
  context,
4691
4710
  treeContext,
4711
+ row,
4692
4712
  componentStack,
4693
4713
  legacyContext,
4694
4714
  debugTask
@@ -4697,6 +4717,7 @@
4697
4717
  null === blockedBoundary
4698
4718
  ? request.pendingRootTasks++
4699
4719
  : blockedBoundary.pendingTasks++;
4720
+ null !== row && row.pendingTasks++;
4700
4721
  var task = {
4701
4722
  replay: null,
4702
4723
  node: node,
@@ -4713,6 +4734,7 @@
4713
4734
  formatContext: formatContext,
4714
4735
  context: context,
4715
4736
  treeContext: treeContext,
4737
+ row: row,
4716
4738
  componentStack: componentStack,
4717
4739
  thenableState: thenableState
4718
4740
  };
@@ -4733,6 +4755,7 @@
4733
4755
  formatContext,
4734
4756
  context,
4735
4757
  treeContext,
4758
+ row,
4736
4759
  componentStack,
4737
4760
  legacyContext,
4738
4761
  debugTask
@@ -4741,6 +4764,7 @@
4741
4764
  null === blockedBoundary
4742
4765
  ? request.pendingRootTasks++
4743
4766
  : blockedBoundary.pendingTasks++;
4767
+ null !== row && row.pendingTasks++;
4744
4768
  replay.pendingTasks++;
4745
4769
  var task = {
4746
4770
  replay: replay,
@@ -4758,6 +4782,7 @@
4758
4782
  formatContext: formatContext,
4759
4783
  context: context,
4760
4784
  treeContext: treeContext,
4785
+ row: row,
4761
4786
  componentStack: componentStack,
4762
4787
  thenableState: thenableState
4763
4788
  };
@@ -4944,6 +4969,141 @@
4944
4969
  closeWithError(request.destination, error))
4945
4970
  : ((request.status = 13), (request.fatalError = error));
4946
4971
  }
4972
+ function finishSuspenseListRow(request, row) {
4973
+ for (row = row.next; null !== row; ) {
4974
+ var unblockedBoundaries = row.boundaries;
4975
+ if (null !== unblockedBoundaries) {
4976
+ row.boundaries = null;
4977
+ for (var i = 0; i < unblockedBoundaries.length; i++)
4978
+ finishedTask(request, unblockedBoundaries[i], null, null);
4979
+ }
4980
+ row.pendingTasks--;
4981
+ if (0 < row.pendingTasks) break;
4982
+ row = row.next;
4983
+ }
4984
+ }
4985
+ function createSuspenseListRow(previousRow) {
4986
+ var newRow = { pendingTasks: 1, boundaries: null, next: null };
4987
+ null !== previousRow &&
4988
+ 0 < previousRow.pendingTasks &&
4989
+ (newRow.pendingTasks++,
4990
+ (newRow.boundaries = []),
4991
+ (previousRow.next = newRow));
4992
+ return newRow;
4993
+ }
4994
+ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4995
+ keyPath = task.keyPath;
4996
+ var previousComponentStack = task.componentStack;
4997
+ var previousDebugTask = task.debugTask;
4998
+ pushServerComponentStack(task, task.node.props.children._debugInfo);
4999
+ var prevTreeContext = task.treeContext,
5000
+ prevRow = task.row,
5001
+ totalChildren = rows.length,
5002
+ previousSuspenseListRow = null;
5003
+ if (null !== task.replay) {
5004
+ var resumeSlots = task.replay.slots;
5005
+ if (null !== resumeSlots && "object" === typeof resumeSlots)
5006
+ for (var n = 0; n < totalChildren; n++) {
5007
+ var i = "backwards" !== revealOrder ? n : totalChildren - 1 - n,
5008
+ node = rows[i];
5009
+ task.row = previousSuspenseListRow = createSuspenseListRow(
5010
+ previousSuspenseListRow
5011
+ );
5012
+ task.treeContext = pushTreeContext(
5013
+ prevTreeContext,
5014
+ totalChildren,
5015
+ i
5016
+ );
5017
+ var resumeSegmentID = resumeSlots[i];
5018
+ "number" === typeof resumeSegmentID
5019
+ ? (resumeNode(request, task, resumeSegmentID, node, i),
5020
+ delete resumeSlots[i])
5021
+ : renderNode(request, task, node, i);
5022
+ 0 === --previousSuspenseListRow.pendingTasks &&
5023
+ finishSuspenseListRow(request, previousSuspenseListRow);
5024
+ }
5025
+ else
5026
+ for (resumeSlots = 0; resumeSlots < totalChildren; resumeSlots++)
5027
+ (n =
5028
+ "backwards" !== revealOrder
5029
+ ? resumeSlots
5030
+ : totalChildren - 1 - resumeSlots),
5031
+ (i = rows[n]),
5032
+ warnForMissingKey(request, task, i),
5033
+ (task.row = previousSuspenseListRow =
5034
+ createSuspenseListRow(previousSuspenseListRow)),
5035
+ (task.treeContext = pushTreeContext(
5036
+ prevTreeContext,
5037
+ totalChildren,
5038
+ n
5039
+ )),
5040
+ renderNode(request, task, i, n),
5041
+ 0 === --previousSuspenseListRow.pendingTasks &&
5042
+ finishSuspenseListRow(request, previousSuspenseListRow);
5043
+ } else if ("backwards" !== revealOrder)
5044
+ for (revealOrder = 0; revealOrder < totalChildren; revealOrder++)
5045
+ (resumeSlots = rows[revealOrder]),
5046
+ warnForMissingKey(request, task, resumeSlots),
5047
+ (task.row = previousSuspenseListRow =
5048
+ createSuspenseListRow(previousSuspenseListRow)),
5049
+ (task.treeContext = pushTreeContext(
5050
+ prevTreeContext,
5051
+ totalChildren,
5052
+ revealOrder
5053
+ )),
5054
+ renderNode(request, task, resumeSlots, revealOrder),
5055
+ 0 === --previousSuspenseListRow.pendingTasks &&
5056
+ finishSuspenseListRow(request, previousSuspenseListRow);
5057
+ else {
5058
+ revealOrder = task.blockedSegment;
5059
+ resumeSlots = revealOrder.children.length;
5060
+ n = revealOrder.chunks.length;
5061
+ for (i = totalChildren - 1; 0 <= i; i--) {
5062
+ node = rows[i];
5063
+ task.row = previousSuspenseListRow = createSuspenseListRow(
5064
+ previousSuspenseListRow
5065
+ );
5066
+ task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
5067
+ resumeSegmentID = createPendingSegment(
5068
+ request,
5069
+ n,
5070
+ null,
5071
+ task.formatContext,
5072
+ 0 === i ? revealOrder.lastPushedText : !0,
5073
+ !0
5074
+ );
5075
+ revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
5076
+ task.blockedSegment = resumeSegmentID;
5077
+ warnForMissingKey(request, task, node);
5078
+ try {
5079
+ renderNode(request, task, node, i),
5080
+ resumeSegmentID.lastPushedText &&
5081
+ resumeSegmentID.textEmbedded &&
5082
+ resumeSegmentID.chunks.push(textSeparator),
5083
+ (resumeSegmentID.status = COMPLETED),
5084
+ finishedSegment(request, task.blockedBoundary, resumeSegmentID),
5085
+ 0 === --previousSuspenseListRow.pendingTasks &&
5086
+ finishSuspenseListRow(request, previousSuspenseListRow);
5087
+ } catch (thrownValue) {
5088
+ throw (
5089
+ ((resumeSegmentID.status = 12 === request.status ? ABORTED : 4),
5090
+ thrownValue)
5091
+ );
5092
+ }
5093
+ }
5094
+ task.blockedSegment = revealOrder;
5095
+ revealOrder.lastPushedText = !1;
5096
+ }
5097
+ null !== prevRow &&
5098
+ null !== previousSuspenseListRow &&
5099
+ 0 < previousSuspenseListRow.pendingTasks &&
5100
+ (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
5101
+ task.treeContext = prevTreeContext;
5102
+ task.row = prevRow;
5103
+ task.keyPath = keyPath;
5104
+ task.componentStack = previousComponentStack;
5105
+ task.debugTask = previousDebugTask;
5106
+ }
4947
5107
  function renderWithHooks(
4948
5108
  request,
4949
5109
  task,
@@ -5517,6 +5677,7 @@
5517
5677
  task.formatContext,
5518
5678
  task.context,
5519
5679
  task.treeContext,
5680
+ task.row,
5520
5681
  task.componentStack,
5521
5682
  emptyContextObject,
5522
5683
  task.debugTask
@@ -5600,10 +5761,53 @@
5600
5761
  }
5601
5762
  return;
5602
5763
  case REACT_SUSPENSE_LIST_TYPE:
5603
- var _prevKeyPath4 = task.keyPath;
5604
- task.keyPath = keyPath;
5605
- renderNodeDestructive(request, task, props.children, -1);
5606
- task.keyPath = _prevKeyPath4;
5764
+ a: {
5765
+ var children$jscomp$0 = props.children,
5766
+ revealOrder = props.revealOrder;
5767
+ if ("forwards" === revealOrder || "backwards" === revealOrder) {
5768
+ if (isArrayImpl(children$jscomp$0)) {
5769
+ renderSuspenseListRows(
5770
+ request,
5771
+ task,
5772
+ keyPath,
5773
+ children$jscomp$0,
5774
+ revealOrder
5775
+ );
5776
+ break a;
5777
+ }
5778
+ var iteratorFn = getIteratorFn(children$jscomp$0);
5779
+ if (iteratorFn) {
5780
+ var iterator = iteratorFn.call(children$jscomp$0);
5781
+ if (iterator) {
5782
+ validateIterable(
5783
+ task,
5784
+ children$jscomp$0,
5785
+ -1,
5786
+ iterator,
5787
+ iteratorFn
5788
+ );
5789
+ var step = iterator.next();
5790
+ if (!step.done) {
5791
+ var rows = [];
5792
+ do rows.push(step.value), (step = iterator.next());
5793
+ while (!step.done);
5794
+ renderSuspenseListRows(
5795
+ request,
5796
+ task,
5797
+ keyPath,
5798
+ children$jscomp$0,
5799
+ revealOrder
5800
+ );
5801
+ }
5802
+ break a;
5803
+ }
5804
+ }
5805
+ }
5806
+ var prevKeyPath$jscomp$3 = task.keyPath;
5807
+ task.keyPath = keyPath;
5808
+ renderNodeDestructive(request, task, children$jscomp$0, -1);
5809
+ task.keyPath = prevKeyPath$jscomp$3;
5810
+ }
5607
5811
  return;
5608
5812
  case REACT_VIEW_TRANSITION_TYPE:
5609
5813
  case REACT_SCOPE_TYPE:
@@ -5613,22 +5817,26 @@
5613
5817
  case REACT_SUSPENSE_TYPE:
5614
5818
  a: if (null !== task.replay) {
5615
5819
  var _prevKeyPath = task.keyPath,
5616
- _prevContext = task.formatContext;
5820
+ _prevContext = task.formatContext,
5821
+ _prevRow = task.row;
5617
5822
  task.keyPath = keyPath;
5618
5823
  task.formatContext = getSuspenseContentFormatContext(
5619
5824
  request.resumableState,
5620
5825
  _prevContext
5621
5826
  );
5827
+ task.row = null;
5622
5828
  var _content = props.children;
5623
5829
  try {
5624
5830
  renderNode(request, task, _content, -1);
5625
5831
  } finally {
5626
5832
  (task.keyPath = _prevKeyPath),
5627
- (task.formatContext = _prevContext);
5833
+ (task.formatContext = _prevContext),
5834
+ (task.row = _prevRow);
5628
5835
  }
5629
5836
  } else {
5630
- var prevKeyPath$jscomp$3 = task.keyPath,
5837
+ var prevKeyPath$jscomp$4 = task.keyPath,
5631
5838
  prevContext$jscomp$0 = task.formatContext,
5839
+ prevRow = task.row,
5632
5840
  parentBoundary = task.blockedBoundary,
5633
5841
  parentPreamble = task.blockedPreamble,
5634
5842
  parentHoistableState = task.hoistableState,
@@ -5640,12 +5848,14 @@
5640
5848
  task.formatContext.insertionMode < HTML_MODE
5641
5849
  ? createSuspenseBoundary(
5642
5850
  request,
5851
+ task.row,
5643
5852
  fallbackAbortSet,
5644
5853
  createPreambleState(),
5645
5854
  createPreambleState()
5646
5855
  )
5647
5856
  : createSuspenseBoundary(
5648
5857
  request,
5858
+ task.row,
5649
5859
  fallbackAbortSet,
5650
5860
  null,
5651
5861
  null
@@ -5705,13 +5915,14 @@
5705
5915
  finishedSegment(request, parentBoundary, boundarySegment);
5706
5916
  } catch (thrownValue) {
5707
5917
  throw (
5708
- ((boundarySegment.status = 12 === request.status ? 3 : 4),
5918
+ ((boundarySegment.status =
5919
+ 12 === request.status ? ABORTED : 4),
5709
5920
  thrownValue)
5710
5921
  );
5711
5922
  } finally {
5712
5923
  (task.blockedSegment = parentSegment),
5713
5924
  (task.blockedPreamble = parentPreamble),
5714
- (task.keyPath = prevKeyPath$jscomp$3),
5925
+ (task.keyPath = prevKeyPath$jscomp$4),
5715
5926
  (task.formatContext = prevContext$jscomp$0);
5716
5927
  }
5717
5928
  var suspendedPrimaryTask = createRenderTask(
@@ -5731,6 +5942,7 @@
5731
5942
  ),
5732
5943
  task.context,
5733
5944
  task.treeContext,
5945
+ null,
5734
5946
  task.componentStack,
5735
5947
  emptyContextObject,
5736
5948
  task.debugTask
@@ -5747,6 +5959,7 @@
5747
5959
  request.resumableState,
5748
5960
  prevContext$jscomp$0
5749
5961
  );
5962
+ task.row = null;
5750
5963
  contentRootSegment.status = 6;
5751
5964
  try {
5752
5965
  if (
@@ -5762,6 +5975,9 @@
5762
5975
  ((newBoundary.status = COMPLETED),
5763
5976
  !(500 < newBoundary.byteSize)))
5764
5977
  ) {
5978
+ null !== prevRow &&
5979
+ 0 === --prevRow.pendingTasks &&
5980
+ finishSuspenseListRow(request, prevRow);
5765
5981
  0 === request.pendingRootTasks &&
5766
5982
  task.blockedPreamble &&
5767
5983
  preparePreamble(request);
@@ -5770,7 +5986,7 @@
5770
5986
  } catch (thrownValue$2) {
5771
5987
  newBoundary.status = CLIENT_RENDERED;
5772
5988
  if (12 === request.status) {
5773
- contentRootSegment.status = 3;
5989
+ contentRootSegment.status = ABORTED;
5774
5990
  var error = request.fatalError;
5775
5991
  } else
5776
5992
  (contentRootSegment.status = 4), (error = thrownValue$2);
@@ -5794,8 +6010,9 @@
5794
6010
  (task.blockedPreamble = parentPreamble),
5795
6011
  (task.hoistableState = parentHoistableState),
5796
6012
  (task.blockedSegment = parentSegment),
5797
- (task.keyPath = prevKeyPath$jscomp$3),
5798
- (task.formatContext = prevContext$jscomp$0);
6013
+ (task.keyPath = prevKeyPath$jscomp$4),
6014
+ (task.formatContext = prevContext$jscomp$0),
6015
+ (task.row = prevRow);
5799
6016
  }
5800
6017
  var suspendedFallbackTask = createRenderTask(
5801
6018
  request,
@@ -5814,6 +6031,7 @@
5814
6031
  ),
5815
6032
  task.context,
5816
6033
  task.treeContext,
6034
+ task.row,
5817
6035
  task.componentStack,
5818
6036
  emptyContextObject,
5819
6037
  task.debugTask
@@ -5832,7 +6050,7 @@
5832
6050
  for (var key in props)
5833
6051
  "ref" !== key && (propsWithoutRef[key] = props[key]);
5834
6052
  } else propsWithoutRef = props;
5835
- var children$jscomp$0 = renderWithHooks(
6053
+ var children$jscomp$1 = renderWithHooks(
5836
6054
  request,
5837
6055
  task,
5838
6056
  keyPath,
@@ -5844,7 +6062,7 @@
5844
6062
  request,
5845
6063
  task,
5846
6064
  keyPath,
5847
- children$jscomp$0,
6065
+ children$jscomp$1,
5848
6066
  0 !== localIdCounter,
5849
6067
  actionStateCounter,
5850
6068
  actionStateMatchingIndex
@@ -5856,9 +6074,9 @@
5856
6074
  case REACT_PROVIDER_TYPE:
5857
6075
  case REACT_CONTEXT_TYPE:
5858
6076
  var value$jscomp$0 = props.value,
5859
- children$jscomp$1 = props.children;
6077
+ children$jscomp$2 = props.children;
5860
6078
  var prevSnapshot = task.context;
5861
- var prevKeyPath$jscomp$4 = task.keyPath;
6079
+ var prevKeyPath$jscomp$5 = task.keyPath;
5862
6080
  var prevValue = type._currentValue;
5863
6081
  type._currentValue = value$jscomp$0;
5864
6082
  void 0 !== type._currentRenderer &&
@@ -5879,7 +6097,7 @@
5879
6097
  currentActiveSnapshot = newNode;
5880
6098
  task.context = newNode;
5881
6099
  task.keyPath = keyPath;
5882
- renderNodeDestructive(request, task, children$jscomp$1, -1);
6100
+ renderNodeDestructive(request, task, children$jscomp$2, -1);
5883
6101
  var prevSnapshot$jscomp$0 = currentActiveSnapshot;
5884
6102
  if (null === prevSnapshot$jscomp$0)
5885
6103
  throw Error(
@@ -5901,7 +6119,7 @@
5901
6119
  var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =
5902
6120
  prevSnapshot$jscomp$0.parent);
5903
6121
  task.context = JSCompiler_inline_result$jscomp$0;
5904
- task.keyPath = prevKeyPath$jscomp$4;
6122
+ task.keyPath = prevKeyPath$jscomp$5;
5905
6123
  prevSnapshot !== task.context &&
5906
6124
  console.error(
5907
6125
  "Popping the context provider did not return back to the original snapshot. This is a bug in React."
@@ -5915,10 +6133,10 @@
5915
6133
  "A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."
5916
6134
  );
5917
6135
  var newChildren = render(context$jscomp$0._currentValue),
5918
- prevKeyPath$jscomp$5 = task.keyPath;
6136
+ prevKeyPath$jscomp$6 = task.keyPath;
5919
6137
  task.keyPath = keyPath;
5920
6138
  renderNodeDestructive(request, task, newChildren, -1);
5921
- task.keyPath = prevKeyPath$jscomp$5;
6139
+ task.keyPath = prevKeyPath$jscomp$6;
5922
6140
  return;
5923
6141
  case REACT_LAZY_TYPE:
5924
6142
  var Component = callLazyInitInDEV(type);
@@ -6050,6 +6268,7 @@
6050
6268
  node = null === node[4] ? null : node[4][3];
6051
6269
  var prevKeyPath = task.keyPath,
6052
6270
  prevContext = task.formatContext,
6271
+ prevRow = task.row,
6053
6272
  previousReplaySet = task.replay,
6054
6273
  parentBoundary = task.blockedBoundary,
6055
6274
  parentHoistableState = task.hoistableState,
@@ -6060,12 +6279,14 @@
6060
6279
  task.formatContext.insertionMode < HTML_MODE
6061
6280
  ? createSuspenseBoundary(
6062
6281
  request,
6282
+ task.row,
6063
6283
  fallbackAbortSet,
6064
6284
  createPreambleState(),
6065
6285
  createPreambleState()
6066
6286
  )
6067
6287
  : createSuspenseBoundary(
6068
6288
  request,
6289
+ task.row,
6069
6290
  fallbackAbortSet,
6070
6291
  null,
6071
6292
  null
@@ -6079,6 +6300,7 @@
6079
6300
  request.resumableState,
6080
6301
  prevContext
6081
6302
  );
6303
+ task.row = null;
6082
6304
  task.replay = { nodes: type, slots: ref, pendingTasks: 1 };
6083
6305
  try {
6084
6306
  renderNode(request, task, content, -1);
@@ -6112,7 +6334,8 @@
6112
6334
  (task.hoistableState = parentHoistableState),
6113
6335
  (task.replay = previousReplaySet),
6114
6336
  (task.keyPath = prevKeyPath),
6115
- (task.formatContext = prevContext);
6337
+ (task.formatContext = prevContext),
6338
+ (task.row = prevRow);
6116
6339
  }
6117
6340
  props = createReplayTask(
6118
6341
  request,
@@ -6130,6 +6353,7 @@
6130
6353
  ),
6131
6354
  task.context,
6132
6355
  task.treeContext,
6356
+ task.row,
6133
6357
  task.componentStack,
6134
6358
  emptyContextObject,
6135
6359
  task.debugTask
@@ -6143,6 +6367,35 @@
6143
6367
  }
6144
6368
  }
6145
6369
  }
6370
+ function validateIterable(
6371
+ task,
6372
+ iterable,
6373
+ childIndex,
6374
+ iterator,
6375
+ iteratorFn
6376
+ ) {
6377
+ if (iterator === iterable) {
6378
+ if (
6379
+ -1 !== childIndex ||
6380
+ null === task.componentStack ||
6381
+ "function" !== typeof task.componentStack.type ||
6382
+ "[object GeneratorFunction]" !==
6383
+ Object.prototype.toString.call(task.componentStack.type) ||
6384
+ "[object Generator]" !== Object.prototype.toString.call(iterator)
6385
+ )
6386
+ didWarnAboutGenerators ||
6387
+ console.error(
6388
+ "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
6389
+ ),
6390
+ (didWarnAboutGenerators = !0);
6391
+ } else
6392
+ iterable.entries !== iteratorFn ||
6393
+ didWarnAboutMaps ||
6394
+ (console.error(
6395
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
6396
+ ),
6397
+ (didWarnAboutMaps = !0));
6398
+ }
6146
6399
  function renderNodeDestructive(request, task, node, childIndex) {
6147
6400
  null !== task.replay && "number" === typeof task.replay.slots
6148
6401
  ? resumeNode(request, task, task.replay.slots, node, childIndex)
@@ -6219,52 +6472,27 @@
6219
6472
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
6220
6473
  );
6221
6474
  case REACT_LAZY_TYPE:
6222
- node = callLazyInitInDEV(node);
6475
+ type = callLazyInitInDEV(node);
6223
6476
  if (12 === request.status) throw null;
6224
- renderNodeDestructive(request, task, node, childIndex);
6477
+ renderNodeDestructive(request, task, type, childIndex);
6225
6478
  return;
6226
6479
  }
6227
6480
  if (isArrayImpl(node)) {
6228
6481
  renderChildrenArray(request, task, node, childIndex);
6229
6482
  return;
6230
6483
  }
6231
- null === node || "object" !== typeof node
6232
- ? (key = null)
6233
- : ((type =
6234
- (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
6235
- node["@@iterator"]),
6236
- (key = "function" === typeof type ? type : null));
6237
- if (key && (type = key.call(node))) {
6238
- if (type === node) {
6239
- if (
6240
- -1 !== childIndex ||
6241
- null === task.componentStack ||
6242
- "function" !== typeof task.componentStack.type ||
6243
- "[object GeneratorFunction]" !==
6244
- Object.prototype.toString.call(task.componentStack.type) ||
6245
- "[object Generator]" !== Object.prototype.toString.call(type)
6246
- )
6247
- didWarnAboutGenerators ||
6248
- console.error(
6249
- "Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."
6250
- ),
6251
- (didWarnAboutGenerators = !0);
6252
- } else
6253
- node.entries !== key ||
6254
- didWarnAboutMaps ||
6255
- (console.error(
6256
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
6257
- ),
6258
- (didWarnAboutMaps = !0));
6259
- node = type.next();
6260
- if (!node.done) {
6261
- key = [];
6262
- do key.push(node.value), (node = type.next());
6263
- while (!node.done);
6264
- renderChildrenArray(request, task, key, childIndex);
6484
+ if ((key = getIteratorFn(node)))
6485
+ if ((type = key.call(node))) {
6486
+ validateIterable(task, node, childIndex, type, key);
6487
+ node = type.next();
6488
+ if (!node.done) {
6489
+ key = [];
6490
+ do key.push(node.value), (node = type.next());
6491
+ while (!node.done);
6492
+ renderChildrenArray(request, task, key, childIndex);
6493
+ }
6494
+ return;
6265
6495
  }
6266
- return;
6267
- }
6268
6496
  if ("function" === typeof node.then)
6269
6497
  return (
6270
6498
  (task.thenableState = null),
@@ -6323,6 +6551,69 @@
6323
6551
  ));
6324
6552
  }
6325
6553
  }
6554
+ function warnForMissingKey(request, task, child) {
6555
+ if (
6556
+ null !== child &&
6557
+ "object" === typeof child &&
6558
+ (child.$$typeof === REACT_ELEMENT_TYPE ||
6559
+ child.$$typeof === REACT_PORTAL_TYPE) &&
6560
+ child._store &&
6561
+ ((!child._store.validated && null == child.key) ||
6562
+ 2 === child._store.validated)
6563
+ ) {
6564
+ if ("object" !== typeof child._store)
6565
+ throw Error(
6566
+ "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
6567
+ );
6568
+ child._store.validated = 1;
6569
+ var didWarnForKey = request.didWarnForKey;
6570
+ null == didWarnForKey &&
6571
+ (didWarnForKey = request.didWarnForKey = new WeakSet());
6572
+ request = task.componentStack;
6573
+ if (null !== request && !didWarnForKey.has(request)) {
6574
+ didWarnForKey.add(request);
6575
+ var componentName = getComponentNameFromType(child.type);
6576
+ didWarnForKey = child._owner;
6577
+ var parentOwner = request.owner;
6578
+ request = "";
6579
+ if (parentOwner && "undefined" !== typeof parentOwner.type) {
6580
+ var name = getComponentNameFromType(parentOwner.type);
6581
+ name &&
6582
+ (request = "\n\nCheck the render method of `" + name + "`.");
6583
+ }
6584
+ request ||
6585
+ (componentName &&
6586
+ (request =
6587
+ "\n\nCheck the top-level render call using <" +
6588
+ componentName +
6589
+ ">."));
6590
+ componentName = "";
6591
+ null != didWarnForKey &&
6592
+ parentOwner !== didWarnForKey &&
6593
+ ((parentOwner = null),
6594
+ "undefined" !== typeof didWarnForKey.type
6595
+ ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
6596
+ : "string" === typeof didWarnForKey.name &&
6597
+ (parentOwner = didWarnForKey.name),
6598
+ parentOwner &&
6599
+ (componentName =
6600
+ " It was passed a child from " + parentOwner + "."));
6601
+ didWarnForKey = task.componentStack;
6602
+ task.componentStack = {
6603
+ parent: task.componentStack,
6604
+ type: child.type,
6605
+ owner: child._owner,
6606
+ stack: child._debugStack
6607
+ };
6608
+ console.error(
6609
+ 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
6610
+ request,
6611
+ componentName
6612
+ );
6613
+ task.componentStack = didWarnForKey;
6614
+ }
6615
+ }
6616
+ }
6326
6617
  function renderChildrenArray(request, task, children, childIndex) {
6327
6618
  var prevKeyPath = task.keyPath,
6328
6619
  previousComponentStack = task.componentStack;
@@ -6416,76 +6707,11 @@
6416
6707
  task.debugTask = previousDebugTask;
6417
6708
  return;
6418
6709
  }
6419
- for (j = 0; j < replayNodes; j++) {
6420
- childIndex = children[j];
6421
- resumeSlots = request;
6422
- node = task;
6423
- error = childIndex;
6424
- if (
6425
- null !== error &&
6426
- "object" === typeof error &&
6427
- (error.$$typeof === REACT_ELEMENT_TYPE ||
6428
- error.$$typeof === REACT_PORTAL_TYPE) &&
6429
- error._store &&
6430
- ((!error._store.validated && null == error.key) ||
6431
- 2 === error._store.validated)
6432
- ) {
6433
- if ("object" !== typeof error._store)
6434
- throw Error(
6435
- "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
6436
- );
6437
- error._store.validated = 1;
6438
- thrownInfo = resumeSlots.didWarnForKey;
6439
- null == thrownInfo &&
6440
- (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
6441
- resumeSlots = node.componentStack;
6442
- if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
6443
- thrownInfo.add(resumeSlots);
6444
- var componentName = getComponentNameFromType(error.type);
6445
- thrownInfo = error._owner;
6446
- var parentOwner = resumeSlots.owner;
6447
- resumeSlots = "";
6448
- if (parentOwner && "undefined" !== typeof parentOwner.type) {
6449
- var name = getComponentNameFromType(parentOwner.type);
6450
- name &&
6451
- (resumeSlots =
6452
- "\n\nCheck the render method of `" + name + "`.");
6453
- }
6454
- resumeSlots ||
6455
- (componentName &&
6456
- (resumeSlots =
6457
- "\n\nCheck the top-level render call using <" +
6458
- componentName +
6459
- ">."));
6460
- componentName = "";
6461
- null != thrownInfo &&
6462
- parentOwner !== thrownInfo &&
6463
- ((parentOwner = null),
6464
- "undefined" !== typeof thrownInfo.type
6465
- ? (parentOwner = getComponentNameFromType(thrownInfo.type))
6466
- : "string" === typeof thrownInfo.name &&
6467
- (parentOwner = thrownInfo.name),
6468
- parentOwner &&
6469
- (componentName =
6470
- " It was passed a child from " + parentOwner + "."));
6471
- thrownInfo = node.componentStack;
6472
- node.componentStack = {
6473
- parent: node.componentStack,
6474
- type: error.type,
6475
- owner: error._owner,
6476
- stack: error._debugStack
6477
- };
6478
- console.error(
6479
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
6480
- resumeSlots,
6481
- componentName
6482
- );
6483
- node.componentStack = thrownInfo;
6484
- }
6485
- }
6486
- task.treeContext = pushTreeContext(replay, replayNodes, j);
6487
- renderNode(request, task, childIndex, j);
6488
- }
6710
+ for (j = 0; j < replayNodes; j++)
6711
+ (childIndex = children[j]),
6712
+ warnForMissingKey(request, task, childIndex),
6713
+ (task.treeContext = pushTreeContext(replay, replayNodes, j)),
6714
+ renderNode(request, task, childIndex, j);
6489
6715
  task.treeContext = replay;
6490
6716
  task.keyPath = prevKeyPath;
6491
6717
  task.componentStack = previousComponentStack;
@@ -6514,6 +6740,7 @@
6514
6740
  task.formatContext,
6515
6741
  task.context,
6516
6742
  task.treeContext,
6743
+ task.row,
6517
6744
  task.componentStack,
6518
6745
  emptyContextObject,
6519
6746
  task.debugTask
@@ -6545,6 +6772,7 @@
6545
6772
  task.formatContext,
6546
6773
  task.context,
6547
6774
  task.treeContext,
6775
+ task.row,
6548
6776
  task.componentStack,
6549
6777
  emptyContextObject,
6550
6778
  task.debugTask
@@ -6659,9 +6887,11 @@
6659
6887
  throw node;
6660
6888
  }
6661
6889
  function abortTaskSoft(task) {
6662
- var boundary = task.blockedBoundary;
6663
- task = task.blockedSegment;
6664
- null !== task && ((task.status = 3), finishedTask(this, boundary, task));
6890
+ var boundary = task.blockedBoundary,
6891
+ segment = task.blockedSegment;
6892
+ null !== segment &&
6893
+ ((segment.status = ABORTED),
6894
+ finishedTask(this, boundary, task.row, segment));
6665
6895
  }
6666
6896
  function abortRemainingReplayNodes(
6667
6897
  request$jscomp$0,
@@ -6695,6 +6925,7 @@
6695
6925
  wasAborted = aborted,
6696
6926
  resumedBoundary = createSuspenseBoundary(
6697
6927
  request,
6928
+ null,
6698
6929
  new Set(),
6699
6930
  null,
6700
6931
  null
@@ -6739,8 +6970,12 @@
6739
6970
  segment = task.blockedSegment;
6740
6971
  if (null !== segment) {
6741
6972
  if (6 === segment.status) return;
6742
- segment.status = 3;
6973
+ segment.status = ABORTED;
6743
6974
  }
6975
+ segment = task.row;
6976
+ null !== segment &&
6977
+ 0 === --segment.pendingTasks &&
6978
+ finishSuspenseListRow(request, segment);
6744
6979
  segment = getThrownInfo(task.componentStack);
6745
6980
  if (null === boundary) {
6746
6981
  if (13 !== request.status && request.status !== CLOSED) {
@@ -6892,7 +7127,10 @@
6892
7127
  : (boundary.byteSize += segmentByteSize);
6893
7128
  }
6894
7129
  }
6895
- function finishedTask(request, boundary, segment) {
7130
+ function finishedTask(request, boundary, row, segment) {
7131
+ null !== row &&
7132
+ 0 === --row.pendingTasks &&
7133
+ finishSuspenseListRow(request, row);
6896
7134
  request.allPendingTasks--;
6897
7135
  if (null === boundary) {
6898
7136
  if (null !== segment && segment.parentFlushed) {
@@ -6921,7 +7159,11 @@
6921
7159
  abortTaskSoft,
6922
7160
  request
6923
7161
  ),
6924
- boundary.fallbackAbortableTasks.clear()),
7162
+ boundary.fallbackAbortableTasks.clear(),
7163
+ (row = boundary.row),
7164
+ null !== row &&
7165
+ 0 === --row.pendingTasks &&
7166
+ finishSuspenseListRow(request, row)),
6925
7167
  0 === request.pendingRootTasks &&
6926
7168
  null === request.trackedPostpones &&
6927
7169
  null !== boundary.contentPreamble &&
@@ -6985,7 +7227,12 @@
6985
7227
  );
6986
7228
  request.replay.pendingTasks--;
6987
7229
  request.abortSet.delete(request);
6988
- finishedTask(request$jscomp$0, request.blockedBoundary, null);
7230
+ finishedTask(
7231
+ request$jscomp$0,
7232
+ request.blockedBoundary,
7233
+ request.row,
7234
+ null
7235
+ );
6989
7236
  } catch (thrownValue) {
6990
7237
  resetHooksState();
6991
7238
  var x =
@@ -7068,6 +7315,7 @@
7068
7315
  finishedTask(
7069
7316
  request,
7070
7317
  errorDigest.blockedBoundary,
7318
+ errorDigest.row,
7071
7319
  request$jscomp$1
7072
7320
  );
7073
7321
  } catch (thrownValue) {
@@ -7096,7 +7344,12 @@
7096
7344
  errorDigest.abortSet.delete(errorDigest);
7097
7345
  request$jscomp$1.status = 4;
7098
7346
  var boundary$jscomp$0 = errorDigest.blockedBoundary,
7347
+ row = errorDigest.row,
7099
7348
  debugTask = errorDigest.debugTask;
7349
+ null !== row &&
7350
+ 0 === --row.pendingTasks &&
7351
+ finishSuspenseListRow(request, row);
7352
+ request.allPendingTasks--;
7100
7353
  prevTaskInDEV = logRecoverableError(
7101
7354
  request,
7102
7355
  x$jscomp$0,
@@ -7129,7 +7382,6 @@
7129
7382
  null === request.trackedPostpones &&
7130
7383
  null !== boundary$jscomp$0.contentPreamble &&
7131
7384
  preparePreamble(request)));
7132
- request.allPendingTasks--;
7133
7385
  0 === request.allPendingTasks && completeAll(request);
7134
7386
  }
7135
7387
  } finally {
@@ -7281,18 +7533,19 @@
7281
7533
  return flushSubtree(request, destination, segment, hoistableState);
7282
7534
  boundary.parentFlushed = !0;
7283
7535
  if (boundary.status === CLIENT_RENDERED) {
7284
- var errorDigest = boundary.errorDigest,
7285
- errorMessage = boundary.errorMessage,
7536
+ var row = boundary.row;
7537
+ null !== row &&
7538
+ 0 === --row.pendingTasks &&
7539
+ finishSuspenseListRow(request, row);
7540
+ row = boundary.errorDigest;
7541
+ var errorMessage = boundary.errorMessage,
7286
7542
  errorStack = boundary.errorStack;
7287
7543
  boundary = boundary.errorComponentStack;
7288
7544
  writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
7289
7545
  writeChunk(destination, clientRenderedSuspenseBoundaryError1);
7290
- errorDigest &&
7546
+ row &&
7291
7547
  (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
7292
- writeChunk(
7293
- destination,
7294
- stringToChunk(escapeTextForBrowser(errorDigest))
7295
- ),
7548
+ writeChunk(destination, stringToChunk(escapeTextForBrowser(row))),
7296
7549
  writeChunk(
7297
7550
  destination,
7298
7551
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
@@ -7368,6 +7621,11 @@
7368
7621
  hoistStylesheetDependency,
7369
7622
  hoistableState
7370
7623
  ));
7624
+ segment = boundary.row;
7625
+ null !== segment &&
7626
+ 500 < boundary.byteSize &&
7627
+ 0 === --segment.pendingTasks &&
7628
+ finishSuspenseListRow(request, segment);
7371
7629
  writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
7372
7630
  segment = boundary.completedSegments;
7373
7631
  if (1 !== segment.length)
@@ -7407,6 +7665,11 @@
7407
7665
  completedSegments[i]
7408
7666
  );
7409
7667
  completedSegments.length = 0;
7668
+ completedSegments = boundary.row;
7669
+ null !== completedSegments &&
7670
+ 500 < boundary.byteSize &&
7671
+ 0 === --completedSegments.pendingTasks &&
7672
+ finishSuspenseListRow(request, completedSegments);
7410
7673
  writeHoistablesForBoundary(
7411
7674
  destination,
7412
7675
  boundary.contentState,
@@ -7934,11 +8197,11 @@
7934
8197
  }
7935
8198
  function ensureCorrectIsomorphicReactVersion() {
7936
8199
  var isomorphicReactPackageVersion = React.version;
7937
- if ("19.2.0-canary-462d08f9-20250517" !== isomorphicReactPackageVersion)
8200
+ if ("19.2.0-canary-c4676e72-20250520" !== isomorphicReactPackageVersion)
7938
8201
  throw Error(
7939
8202
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
7940
8203
  (isomorphicReactPackageVersion +
7941
- "\n - react-dom: 19.2.0-canary-462d08f9-20250517\nLearn more: https://react.dev/warnings/version-mismatch")
8204
+ "\n - react-dom: 19.2.0-canary-c4676e72-20250520\nLearn more: https://react.dev/warnings/version-mismatch")
7942
8205
  );
7943
8206
  }
7944
8207
  var React = require("react"),
@@ -9466,6 +9729,7 @@
9466
9729
  PENDING = 0,
9467
9730
  COMPLETED = 1,
9468
9731
  FLUSHED = 2,
9732
+ ABORTED = 3,
9469
9733
  POSTPONED = 5,
9470
9734
  CLOSED = 14,
9471
9735
  currentRequest = null,
@@ -9620,5 +9884,5 @@
9620
9884
  startWork(request);
9621
9885
  });
9622
9886
  };
9623
- exports.version = "19.2.0-canary-462d08f9-20250517";
9887
+ exports.version = "19.2.0-canary-c4676e72-20250520";
9624
9888
  })();