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.
@@ -17,6 +17,14 @@
17
17
  function scriptReplacer(match, prefix, s, suffix) {
18
18
  return "" + prefix + ("s" === s ? "\\u0073" : "\\u0053") + suffix;
19
19
  }
20
+ function getIteratorFn(maybeIterable) {
21
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
22
+ return null;
23
+ maybeIterable =
24
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
25
+ maybeIterable["@@iterator"];
26
+ return "function" === typeof maybeIterable ? maybeIterable : null;
27
+ }
20
28
  function objectName(object) {
21
29
  return Object.prototype.toString
22
30
  .call(object)
@@ -4491,6 +4499,7 @@
4491
4499
  null,
4492
4500
  emptyTreeContext,
4493
4501
  null,
4502
+ null,
4494
4503
  emptyContextObject,
4495
4504
  null
4496
4505
  );
@@ -4551,15 +4560,17 @@
4551
4560
  }
4552
4561
  function createSuspenseBoundary(
4553
4562
  request,
4563
+ row,
4554
4564
  fallbackAbortableTasks,
4555
4565
  contentPreamble,
4556
4566
  fallbackPreamble
4557
4567
  ) {
4558
- return {
4568
+ fallbackAbortableTasks = {
4559
4569
  status: PENDING,
4560
4570
  rootSegmentID: -1,
4561
4571
  parentFlushed: !1,
4562
4572
  pendingTasks: 0,
4573
+ row: row,
4563
4574
  completedSegments: [],
4564
4575
  byteSize: 0,
4565
4576
  fallbackAbortableTasks: fallbackAbortableTasks,
@@ -4574,6 +4585,14 @@
4574
4585
  errorStack: null,
4575
4586
  errorComponentStack: null
4576
4587
  };
4588
+ null !== row &&
4589
+ (row.pendingTasks++,
4590
+ (row = row.boundaries),
4591
+ null !== row &&
4592
+ (request.allPendingTasks++,
4593
+ fallbackAbortableTasks.pendingTasks++,
4594
+ row.push(fallbackAbortableTasks)));
4595
+ return fallbackAbortableTasks;
4577
4596
  }
4578
4597
  function createRenderTask(
4579
4598
  request,
@@ -4589,6 +4608,7 @@
4589
4608
  formatContext,
4590
4609
  context,
4591
4610
  treeContext,
4611
+ row,
4592
4612
  componentStack,
4593
4613
  legacyContext,
4594
4614
  debugTask
@@ -4597,6 +4617,7 @@
4597
4617
  null === blockedBoundary
4598
4618
  ? request.pendingRootTasks++
4599
4619
  : blockedBoundary.pendingTasks++;
4620
+ null !== row && row.pendingTasks++;
4600
4621
  var task = {
4601
4622
  replay: null,
4602
4623
  node: node,
@@ -4613,6 +4634,7 @@
4613
4634
  formatContext: formatContext,
4614
4635
  context: context,
4615
4636
  treeContext: treeContext,
4637
+ row: row,
4616
4638
  componentStack: componentStack,
4617
4639
  thenableState: thenableState
4618
4640
  };
@@ -4633,6 +4655,7 @@
4633
4655
  formatContext,
4634
4656
  context,
4635
4657
  treeContext,
4658
+ row,
4636
4659
  componentStack,
4637
4660
  legacyContext,
4638
4661
  debugTask
@@ -4641,6 +4664,7 @@
4641
4664
  null === blockedBoundary
4642
4665
  ? request.pendingRootTasks++
4643
4666
  : blockedBoundary.pendingTasks++;
4667
+ null !== row && row.pendingTasks++;
4644
4668
  replay.pendingTasks++;
4645
4669
  var task = {
4646
4670
  replay: replay,
@@ -4658,6 +4682,7 @@
4658
4682
  formatContext: formatContext,
4659
4683
  context: context,
4660
4684
  treeContext: treeContext,
4685
+ row: row,
4661
4686
  componentStack: componentStack,
4662
4687
  thenableState: thenableState
4663
4688
  };
@@ -4843,6 +4868,141 @@
4843
4868
  ? ((request.status = CLOSED), request.destination.destroy(error))
4844
4869
  : ((request.status = 13), (request.fatalError = error));
4845
4870
  }
4871
+ function finishSuspenseListRow(request, row) {
4872
+ for (row = row.next; null !== row; ) {
4873
+ var unblockedBoundaries = row.boundaries;
4874
+ if (null !== unblockedBoundaries) {
4875
+ row.boundaries = null;
4876
+ for (var i = 0; i < unblockedBoundaries.length; i++)
4877
+ finishedTask(request, unblockedBoundaries[i], null, null);
4878
+ }
4879
+ row.pendingTasks--;
4880
+ if (0 < row.pendingTasks) break;
4881
+ row = row.next;
4882
+ }
4883
+ }
4884
+ function createSuspenseListRow(previousRow) {
4885
+ var newRow = { pendingTasks: 1, boundaries: null, next: null };
4886
+ null !== previousRow &&
4887
+ 0 < previousRow.pendingTasks &&
4888
+ (newRow.pendingTasks++,
4889
+ (newRow.boundaries = []),
4890
+ (previousRow.next = newRow));
4891
+ return newRow;
4892
+ }
4893
+ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4894
+ keyPath = task.keyPath;
4895
+ var previousComponentStack = task.componentStack;
4896
+ var previousDebugTask = task.debugTask;
4897
+ pushServerComponentStack(task, task.node.props.children._debugInfo);
4898
+ var prevTreeContext = task.treeContext,
4899
+ prevRow = task.row,
4900
+ totalChildren = rows.length,
4901
+ previousSuspenseListRow = null;
4902
+ if (null !== task.replay) {
4903
+ var resumeSlots = task.replay.slots;
4904
+ if (null !== resumeSlots && "object" === typeof resumeSlots)
4905
+ for (var n = 0; n < totalChildren; n++) {
4906
+ var i = "backwards" !== revealOrder ? n : totalChildren - 1 - n,
4907
+ node = rows[i];
4908
+ task.row = previousSuspenseListRow = createSuspenseListRow(
4909
+ previousSuspenseListRow
4910
+ );
4911
+ task.treeContext = pushTreeContext(
4912
+ prevTreeContext,
4913
+ totalChildren,
4914
+ i
4915
+ );
4916
+ var resumeSegmentID = resumeSlots[i];
4917
+ "number" === typeof resumeSegmentID
4918
+ ? (resumeNode(request, task, resumeSegmentID, node, i),
4919
+ delete resumeSlots[i])
4920
+ : renderNode(request, task, node, i);
4921
+ 0 === --previousSuspenseListRow.pendingTasks &&
4922
+ finishSuspenseListRow(request, previousSuspenseListRow);
4923
+ }
4924
+ else
4925
+ for (resumeSlots = 0; resumeSlots < totalChildren; resumeSlots++)
4926
+ (n =
4927
+ "backwards" !== revealOrder
4928
+ ? resumeSlots
4929
+ : totalChildren - 1 - resumeSlots),
4930
+ (i = rows[n]),
4931
+ warnForMissingKey(request, task, i),
4932
+ (task.row = previousSuspenseListRow =
4933
+ createSuspenseListRow(previousSuspenseListRow)),
4934
+ (task.treeContext = pushTreeContext(
4935
+ prevTreeContext,
4936
+ totalChildren,
4937
+ n
4938
+ )),
4939
+ renderNode(request, task, i, n),
4940
+ 0 === --previousSuspenseListRow.pendingTasks &&
4941
+ finishSuspenseListRow(request, previousSuspenseListRow);
4942
+ } else if ("backwards" !== revealOrder)
4943
+ for (revealOrder = 0; revealOrder < totalChildren; revealOrder++)
4944
+ (resumeSlots = rows[revealOrder]),
4945
+ warnForMissingKey(request, task, resumeSlots),
4946
+ (task.row = previousSuspenseListRow =
4947
+ createSuspenseListRow(previousSuspenseListRow)),
4948
+ (task.treeContext = pushTreeContext(
4949
+ prevTreeContext,
4950
+ totalChildren,
4951
+ revealOrder
4952
+ )),
4953
+ renderNode(request, task, resumeSlots, revealOrder),
4954
+ 0 === --previousSuspenseListRow.pendingTasks &&
4955
+ finishSuspenseListRow(request, previousSuspenseListRow);
4956
+ else {
4957
+ revealOrder = task.blockedSegment;
4958
+ resumeSlots = revealOrder.children.length;
4959
+ n = revealOrder.chunks.length;
4960
+ for (i = totalChildren - 1; 0 <= i; i--) {
4961
+ node = rows[i];
4962
+ task.row = previousSuspenseListRow = createSuspenseListRow(
4963
+ previousSuspenseListRow
4964
+ );
4965
+ task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
4966
+ resumeSegmentID = createPendingSegment(
4967
+ request,
4968
+ n,
4969
+ null,
4970
+ task.formatContext,
4971
+ 0 === i ? revealOrder.lastPushedText : !0,
4972
+ !0
4973
+ );
4974
+ revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
4975
+ task.blockedSegment = resumeSegmentID;
4976
+ warnForMissingKey(request, task, node);
4977
+ try {
4978
+ renderNode(request, task, node, i),
4979
+ resumeSegmentID.lastPushedText &&
4980
+ resumeSegmentID.textEmbedded &&
4981
+ resumeSegmentID.chunks.push(textSeparator),
4982
+ (resumeSegmentID.status = COMPLETED),
4983
+ finishedSegment(request, task.blockedBoundary, resumeSegmentID),
4984
+ 0 === --previousSuspenseListRow.pendingTasks &&
4985
+ finishSuspenseListRow(request, previousSuspenseListRow);
4986
+ } catch (thrownValue) {
4987
+ throw (
4988
+ ((resumeSegmentID.status = 12 === request.status ? ABORTED : 4),
4989
+ thrownValue)
4990
+ );
4991
+ }
4992
+ }
4993
+ task.blockedSegment = revealOrder;
4994
+ revealOrder.lastPushedText = !1;
4995
+ }
4996
+ null !== prevRow &&
4997
+ null !== previousSuspenseListRow &&
4998
+ 0 < previousSuspenseListRow.pendingTasks &&
4999
+ (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
5000
+ task.treeContext = prevTreeContext;
5001
+ task.row = prevRow;
5002
+ task.keyPath = keyPath;
5003
+ task.componentStack = previousComponentStack;
5004
+ task.debugTask = previousDebugTask;
5005
+ }
4846
5006
  function renderWithHooks(
4847
5007
  request,
4848
5008
  task,
@@ -5416,6 +5576,7 @@
5416
5576
  task.formatContext,
5417
5577
  task.context,
5418
5578
  task.treeContext,
5579
+ task.row,
5419
5580
  task.componentStack,
5420
5581
  emptyContextObject,
5421
5582
  task.debugTask
@@ -5499,10 +5660,53 @@
5499
5660
  }
5500
5661
  return;
5501
5662
  case REACT_SUSPENSE_LIST_TYPE:
5502
- var _prevKeyPath4 = task.keyPath;
5503
- task.keyPath = keyPath;
5504
- renderNodeDestructive(request, task, props.children, -1);
5505
- task.keyPath = _prevKeyPath4;
5663
+ a: {
5664
+ var children$jscomp$0 = props.children,
5665
+ revealOrder = props.revealOrder;
5666
+ if ("forwards" === revealOrder || "backwards" === revealOrder) {
5667
+ if (isArrayImpl(children$jscomp$0)) {
5668
+ renderSuspenseListRows(
5669
+ request,
5670
+ task,
5671
+ keyPath,
5672
+ children$jscomp$0,
5673
+ revealOrder
5674
+ );
5675
+ break a;
5676
+ }
5677
+ var iteratorFn = getIteratorFn(children$jscomp$0);
5678
+ if (iteratorFn) {
5679
+ var iterator = iteratorFn.call(children$jscomp$0);
5680
+ if (iterator) {
5681
+ validateIterable(
5682
+ task,
5683
+ children$jscomp$0,
5684
+ -1,
5685
+ iterator,
5686
+ iteratorFn
5687
+ );
5688
+ var step = iterator.next();
5689
+ if (!step.done) {
5690
+ var rows = [];
5691
+ do rows.push(step.value), (step = iterator.next());
5692
+ while (!step.done);
5693
+ renderSuspenseListRows(
5694
+ request,
5695
+ task,
5696
+ keyPath,
5697
+ children$jscomp$0,
5698
+ revealOrder
5699
+ );
5700
+ }
5701
+ break a;
5702
+ }
5703
+ }
5704
+ }
5705
+ var prevKeyPath$jscomp$3 = task.keyPath;
5706
+ task.keyPath = keyPath;
5707
+ renderNodeDestructive(request, task, children$jscomp$0, -1);
5708
+ task.keyPath = prevKeyPath$jscomp$3;
5709
+ }
5506
5710
  return;
5507
5711
  case REACT_VIEW_TRANSITION_TYPE:
5508
5712
  case REACT_SCOPE_TYPE:
@@ -5512,22 +5716,26 @@
5512
5716
  case REACT_SUSPENSE_TYPE:
5513
5717
  a: if (null !== task.replay) {
5514
5718
  var _prevKeyPath = task.keyPath,
5515
- _prevContext = task.formatContext;
5719
+ _prevContext = task.formatContext,
5720
+ _prevRow = task.row;
5516
5721
  task.keyPath = keyPath;
5517
5722
  task.formatContext = getSuspenseContentFormatContext(
5518
5723
  request.resumableState,
5519
5724
  _prevContext
5520
5725
  );
5726
+ task.row = null;
5521
5727
  var _content = props.children;
5522
5728
  try {
5523
5729
  renderNode(request, task, _content, -1);
5524
5730
  } finally {
5525
5731
  (task.keyPath = _prevKeyPath),
5526
- (task.formatContext = _prevContext);
5732
+ (task.formatContext = _prevContext),
5733
+ (task.row = _prevRow);
5527
5734
  }
5528
5735
  } else {
5529
- var prevKeyPath$jscomp$3 = task.keyPath,
5736
+ var prevKeyPath$jscomp$4 = task.keyPath,
5530
5737
  prevContext$jscomp$0 = task.formatContext,
5738
+ prevRow = task.row,
5531
5739
  parentBoundary = task.blockedBoundary,
5532
5740
  parentPreamble = task.blockedPreamble,
5533
5741
  parentHoistableState = task.hoistableState,
@@ -5539,12 +5747,14 @@
5539
5747
  task.formatContext.insertionMode < HTML_MODE
5540
5748
  ? createSuspenseBoundary(
5541
5749
  request,
5750
+ task.row,
5542
5751
  fallbackAbortSet,
5543
5752
  createPreambleState(),
5544
5753
  createPreambleState()
5545
5754
  )
5546
5755
  : createSuspenseBoundary(
5547
5756
  request,
5757
+ task.row,
5548
5758
  fallbackAbortSet,
5549
5759
  null,
5550
5760
  null
@@ -5604,13 +5814,14 @@
5604
5814
  finishedSegment(request, parentBoundary, boundarySegment);
5605
5815
  } catch (thrownValue) {
5606
5816
  throw (
5607
- ((boundarySegment.status = 12 === request.status ? 3 : 4),
5817
+ ((boundarySegment.status =
5818
+ 12 === request.status ? ABORTED : 4),
5608
5819
  thrownValue)
5609
5820
  );
5610
5821
  } finally {
5611
5822
  (task.blockedSegment = parentSegment),
5612
5823
  (task.blockedPreamble = parentPreamble),
5613
- (task.keyPath = prevKeyPath$jscomp$3),
5824
+ (task.keyPath = prevKeyPath$jscomp$4),
5614
5825
  (task.formatContext = prevContext$jscomp$0);
5615
5826
  }
5616
5827
  var suspendedPrimaryTask = createRenderTask(
@@ -5630,6 +5841,7 @@
5630
5841
  ),
5631
5842
  task.context,
5632
5843
  task.treeContext,
5844
+ null,
5633
5845
  task.componentStack,
5634
5846
  emptyContextObject,
5635
5847
  task.debugTask
@@ -5646,6 +5858,7 @@
5646
5858
  request.resumableState,
5647
5859
  prevContext$jscomp$0
5648
5860
  );
5861
+ task.row = null;
5649
5862
  contentRootSegment.status = 6;
5650
5863
  try {
5651
5864
  if (
@@ -5661,6 +5874,9 @@
5661
5874
  ((newBoundary.status = COMPLETED),
5662
5875
  !(500 < newBoundary.byteSize)))
5663
5876
  ) {
5877
+ null !== prevRow &&
5878
+ 0 === --prevRow.pendingTasks &&
5879
+ finishSuspenseListRow(request, prevRow);
5664
5880
  0 === request.pendingRootTasks &&
5665
5881
  task.blockedPreamble &&
5666
5882
  preparePreamble(request);
@@ -5669,7 +5885,7 @@
5669
5885
  } catch (thrownValue$2) {
5670
5886
  newBoundary.status = CLIENT_RENDERED;
5671
5887
  if (12 === request.status) {
5672
- contentRootSegment.status = 3;
5888
+ contentRootSegment.status = ABORTED;
5673
5889
  var error = request.fatalError;
5674
5890
  } else
5675
5891
  (contentRootSegment.status = 4), (error = thrownValue$2);
@@ -5693,8 +5909,9 @@
5693
5909
  (task.blockedPreamble = parentPreamble),
5694
5910
  (task.hoistableState = parentHoistableState),
5695
5911
  (task.blockedSegment = parentSegment),
5696
- (task.keyPath = prevKeyPath$jscomp$3),
5697
- (task.formatContext = prevContext$jscomp$0);
5912
+ (task.keyPath = prevKeyPath$jscomp$4),
5913
+ (task.formatContext = prevContext$jscomp$0),
5914
+ (task.row = prevRow);
5698
5915
  }
5699
5916
  var suspendedFallbackTask = createRenderTask(
5700
5917
  request,
@@ -5713,6 +5930,7 @@
5713
5930
  ),
5714
5931
  task.context,
5715
5932
  task.treeContext,
5933
+ task.row,
5716
5934
  task.componentStack,
5717
5935
  emptyContextObject,
5718
5936
  task.debugTask
@@ -5731,7 +5949,7 @@
5731
5949
  for (var key in props)
5732
5950
  "ref" !== key && (propsWithoutRef[key] = props[key]);
5733
5951
  } else propsWithoutRef = props;
5734
- var children$jscomp$0 = renderWithHooks(
5952
+ var children$jscomp$1 = renderWithHooks(
5735
5953
  request,
5736
5954
  task,
5737
5955
  keyPath,
@@ -5743,7 +5961,7 @@
5743
5961
  request,
5744
5962
  task,
5745
5963
  keyPath,
5746
- children$jscomp$0,
5964
+ children$jscomp$1,
5747
5965
  0 !== localIdCounter,
5748
5966
  actionStateCounter,
5749
5967
  actionStateMatchingIndex
@@ -5755,9 +5973,9 @@
5755
5973
  case REACT_PROVIDER_TYPE:
5756
5974
  case REACT_CONTEXT_TYPE:
5757
5975
  var value$jscomp$0 = props.value,
5758
- children$jscomp$1 = props.children;
5976
+ children$jscomp$2 = props.children;
5759
5977
  var prevSnapshot = task.context;
5760
- var prevKeyPath$jscomp$4 = task.keyPath;
5978
+ var prevKeyPath$jscomp$5 = task.keyPath;
5761
5979
  var prevValue = type._currentValue;
5762
5980
  type._currentValue = value$jscomp$0;
5763
5981
  void 0 !== type._currentRenderer &&
@@ -5778,7 +5996,7 @@
5778
5996
  currentActiveSnapshot = newNode;
5779
5997
  task.context = newNode;
5780
5998
  task.keyPath = keyPath;
5781
- renderNodeDestructive(request, task, children$jscomp$1, -1);
5999
+ renderNodeDestructive(request, task, children$jscomp$2, -1);
5782
6000
  var prevSnapshot$jscomp$0 = currentActiveSnapshot;
5783
6001
  if (null === prevSnapshot$jscomp$0)
5784
6002
  throw Error(
@@ -5800,7 +6018,7 @@
5800
6018
  var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =
5801
6019
  prevSnapshot$jscomp$0.parent);
5802
6020
  task.context = JSCompiler_inline_result$jscomp$0;
5803
- task.keyPath = prevKeyPath$jscomp$4;
6021
+ task.keyPath = prevKeyPath$jscomp$5;
5804
6022
  prevSnapshot !== task.context &&
5805
6023
  console.error(
5806
6024
  "Popping the context provider did not return back to the original snapshot. This is a bug in React."
@@ -5814,10 +6032,10 @@
5814
6032
  "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."
5815
6033
  );
5816
6034
  var newChildren = render(context$jscomp$0._currentValue),
5817
- prevKeyPath$jscomp$5 = task.keyPath;
6035
+ prevKeyPath$jscomp$6 = task.keyPath;
5818
6036
  task.keyPath = keyPath;
5819
6037
  renderNodeDestructive(request, task, newChildren, -1);
5820
- task.keyPath = prevKeyPath$jscomp$5;
6038
+ task.keyPath = prevKeyPath$jscomp$6;
5821
6039
  return;
5822
6040
  case REACT_LAZY_TYPE:
5823
6041
  var Component = callLazyInitInDEV(type);
@@ -5949,6 +6167,7 @@
5949
6167
  node = null === node[4] ? null : node[4][3];
5950
6168
  var prevKeyPath = task.keyPath,
5951
6169
  prevContext = task.formatContext,
6170
+ prevRow = task.row,
5952
6171
  previousReplaySet = task.replay,
5953
6172
  parentBoundary = task.blockedBoundary,
5954
6173
  parentHoistableState = task.hoistableState,
@@ -5959,12 +6178,14 @@
5959
6178
  task.formatContext.insertionMode < HTML_MODE
5960
6179
  ? createSuspenseBoundary(
5961
6180
  request,
6181
+ task.row,
5962
6182
  fallbackAbortSet,
5963
6183
  createPreambleState(),
5964
6184
  createPreambleState()
5965
6185
  )
5966
6186
  : createSuspenseBoundary(
5967
6187
  request,
6188
+ task.row,
5968
6189
  fallbackAbortSet,
5969
6190
  null,
5970
6191
  null
@@ -5978,6 +6199,7 @@
5978
6199
  request.resumableState,
5979
6200
  prevContext
5980
6201
  );
6202
+ task.row = null;
5981
6203
  task.replay = { nodes: type, slots: ref, pendingTasks: 1 };
5982
6204
  try {
5983
6205
  renderNode(request, task, content, -1);
@@ -6011,7 +6233,8 @@
6011
6233
  (task.hoistableState = parentHoistableState),
6012
6234
  (task.replay = previousReplaySet),
6013
6235
  (task.keyPath = prevKeyPath),
6014
- (task.formatContext = prevContext);
6236
+ (task.formatContext = prevContext),
6237
+ (task.row = prevRow);
6015
6238
  }
6016
6239
  props = createReplayTask(
6017
6240
  request,
@@ -6029,6 +6252,7 @@
6029
6252
  ),
6030
6253
  task.context,
6031
6254
  task.treeContext,
6255
+ task.row,
6032
6256
  task.componentStack,
6033
6257
  emptyContextObject,
6034
6258
  task.debugTask
@@ -6042,6 +6266,35 @@
6042
6266
  }
6043
6267
  }
6044
6268
  }
6269
+ function validateIterable(
6270
+ task,
6271
+ iterable,
6272
+ childIndex,
6273
+ iterator,
6274
+ iteratorFn
6275
+ ) {
6276
+ if (iterator === iterable) {
6277
+ if (
6278
+ -1 !== childIndex ||
6279
+ null === task.componentStack ||
6280
+ "function" !== typeof task.componentStack.type ||
6281
+ "[object GeneratorFunction]" !==
6282
+ Object.prototype.toString.call(task.componentStack.type) ||
6283
+ "[object Generator]" !== Object.prototype.toString.call(iterator)
6284
+ )
6285
+ didWarnAboutGenerators ||
6286
+ console.error(
6287
+ "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."
6288
+ ),
6289
+ (didWarnAboutGenerators = !0);
6290
+ } else
6291
+ iterable.entries !== iteratorFn ||
6292
+ didWarnAboutMaps ||
6293
+ (console.error(
6294
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
6295
+ ),
6296
+ (didWarnAboutMaps = !0));
6297
+ }
6045
6298
  function renderNodeDestructive(request, task, node, childIndex) {
6046
6299
  null !== task.replay && "number" === typeof task.replay.slots
6047
6300
  ? resumeNode(request, task, task.replay.slots, node, childIndex)
@@ -6118,52 +6371,27 @@
6118
6371
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
6119
6372
  );
6120
6373
  case REACT_LAZY_TYPE:
6121
- node = callLazyInitInDEV(node);
6374
+ type = callLazyInitInDEV(node);
6122
6375
  if (12 === request.status) throw null;
6123
- renderNodeDestructive(request, task, node, childIndex);
6376
+ renderNodeDestructive(request, task, type, childIndex);
6124
6377
  return;
6125
6378
  }
6126
6379
  if (isArrayImpl(node)) {
6127
6380
  renderChildrenArray(request, task, node, childIndex);
6128
6381
  return;
6129
6382
  }
6130
- null === node || "object" !== typeof node
6131
- ? (key = null)
6132
- : ((type =
6133
- (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
6134
- node["@@iterator"]),
6135
- (key = "function" === typeof type ? type : null));
6136
- if (key && (type = key.call(node))) {
6137
- if (type === node) {
6138
- if (
6139
- -1 !== childIndex ||
6140
- null === task.componentStack ||
6141
- "function" !== typeof task.componentStack.type ||
6142
- "[object GeneratorFunction]" !==
6143
- Object.prototype.toString.call(task.componentStack.type) ||
6144
- "[object Generator]" !== Object.prototype.toString.call(type)
6145
- )
6146
- didWarnAboutGenerators ||
6147
- console.error(
6148
- "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."
6149
- ),
6150
- (didWarnAboutGenerators = !0);
6151
- } else
6152
- node.entries !== key ||
6153
- didWarnAboutMaps ||
6154
- (console.error(
6155
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
6156
- ),
6157
- (didWarnAboutMaps = !0));
6158
- node = type.next();
6159
- if (!node.done) {
6160
- key = [];
6161
- do key.push(node.value), (node = type.next());
6162
- while (!node.done);
6163
- renderChildrenArray(request, task, key, childIndex);
6383
+ if ((key = getIteratorFn(node)))
6384
+ if ((type = key.call(node))) {
6385
+ validateIterable(task, node, childIndex, type, key);
6386
+ node = type.next();
6387
+ if (!node.done) {
6388
+ key = [];
6389
+ do key.push(node.value), (node = type.next());
6390
+ while (!node.done);
6391
+ renderChildrenArray(request, task, key, childIndex);
6392
+ }
6393
+ return;
6164
6394
  }
6165
- return;
6166
- }
6167
6395
  if ("function" === typeof node.then)
6168
6396
  return (
6169
6397
  (task.thenableState = null),
@@ -6222,6 +6450,69 @@
6222
6450
  ));
6223
6451
  }
6224
6452
  }
6453
+ function warnForMissingKey(request, task, child) {
6454
+ if (
6455
+ null !== child &&
6456
+ "object" === typeof child &&
6457
+ (child.$$typeof === REACT_ELEMENT_TYPE ||
6458
+ child.$$typeof === REACT_PORTAL_TYPE) &&
6459
+ child._store &&
6460
+ ((!child._store.validated && null == child.key) ||
6461
+ 2 === child._store.validated)
6462
+ ) {
6463
+ if ("object" !== typeof child._store)
6464
+ throw Error(
6465
+ "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
6466
+ );
6467
+ child._store.validated = 1;
6468
+ var didWarnForKey = request.didWarnForKey;
6469
+ null == didWarnForKey &&
6470
+ (didWarnForKey = request.didWarnForKey = new WeakSet());
6471
+ request = task.componentStack;
6472
+ if (null !== request && !didWarnForKey.has(request)) {
6473
+ didWarnForKey.add(request);
6474
+ var componentName = getComponentNameFromType(child.type);
6475
+ didWarnForKey = child._owner;
6476
+ var parentOwner = request.owner;
6477
+ request = "";
6478
+ if (parentOwner && "undefined" !== typeof parentOwner.type) {
6479
+ var name = getComponentNameFromType(parentOwner.type);
6480
+ name &&
6481
+ (request = "\n\nCheck the render method of `" + name + "`.");
6482
+ }
6483
+ request ||
6484
+ (componentName &&
6485
+ (request =
6486
+ "\n\nCheck the top-level render call using <" +
6487
+ componentName +
6488
+ ">."));
6489
+ componentName = "";
6490
+ null != didWarnForKey &&
6491
+ parentOwner !== didWarnForKey &&
6492
+ ((parentOwner = null),
6493
+ "undefined" !== typeof didWarnForKey.type
6494
+ ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
6495
+ : "string" === typeof didWarnForKey.name &&
6496
+ (parentOwner = didWarnForKey.name),
6497
+ parentOwner &&
6498
+ (componentName =
6499
+ " It was passed a child from " + parentOwner + "."));
6500
+ didWarnForKey = task.componentStack;
6501
+ task.componentStack = {
6502
+ parent: task.componentStack,
6503
+ type: child.type,
6504
+ owner: child._owner,
6505
+ stack: child._debugStack
6506
+ };
6507
+ console.error(
6508
+ 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
6509
+ request,
6510
+ componentName
6511
+ );
6512
+ task.componentStack = didWarnForKey;
6513
+ }
6514
+ }
6515
+ }
6225
6516
  function renderChildrenArray(request, task, children, childIndex) {
6226
6517
  var prevKeyPath = task.keyPath,
6227
6518
  previousComponentStack = task.componentStack;
@@ -6315,76 +6606,11 @@
6315
6606
  task.debugTask = previousDebugTask;
6316
6607
  return;
6317
6608
  }
6318
- for (j = 0; j < replayNodes; j++) {
6319
- childIndex = children[j];
6320
- resumeSlots = request;
6321
- node = task;
6322
- error = childIndex;
6323
- if (
6324
- null !== error &&
6325
- "object" === typeof error &&
6326
- (error.$$typeof === REACT_ELEMENT_TYPE ||
6327
- error.$$typeof === REACT_PORTAL_TYPE) &&
6328
- error._store &&
6329
- ((!error._store.validated && null == error.key) ||
6330
- 2 === error._store.validated)
6331
- ) {
6332
- if ("object" !== typeof error._store)
6333
- throw Error(
6334
- "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
6335
- );
6336
- error._store.validated = 1;
6337
- thrownInfo = resumeSlots.didWarnForKey;
6338
- null == thrownInfo &&
6339
- (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
6340
- resumeSlots = node.componentStack;
6341
- if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
6342
- thrownInfo.add(resumeSlots);
6343
- var componentName = getComponentNameFromType(error.type);
6344
- thrownInfo = error._owner;
6345
- var parentOwner = resumeSlots.owner;
6346
- resumeSlots = "";
6347
- if (parentOwner && "undefined" !== typeof parentOwner.type) {
6348
- var name = getComponentNameFromType(parentOwner.type);
6349
- name &&
6350
- (resumeSlots =
6351
- "\n\nCheck the render method of `" + name + "`.");
6352
- }
6353
- resumeSlots ||
6354
- (componentName &&
6355
- (resumeSlots =
6356
- "\n\nCheck the top-level render call using <" +
6357
- componentName +
6358
- ">."));
6359
- componentName = "";
6360
- null != thrownInfo &&
6361
- parentOwner !== thrownInfo &&
6362
- ((parentOwner = null),
6363
- "undefined" !== typeof thrownInfo.type
6364
- ? (parentOwner = getComponentNameFromType(thrownInfo.type))
6365
- : "string" === typeof thrownInfo.name &&
6366
- (parentOwner = thrownInfo.name),
6367
- parentOwner &&
6368
- (componentName =
6369
- " It was passed a child from " + parentOwner + "."));
6370
- thrownInfo = node.componentStack;
6371
- node.componentStack = {
6372
- parent: node.componentStack,
6373
- type: error.type,
6374
- owner: error._owner,
6375
- stack: error._debugStack
6376
- };
6377
- console.error(
6378
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
6379
- resumeSlots,
6380
- componentName
6381
- );
6382
- node.componentStack = thrownInfo;
6383
- }
6384
- }
6385
- task.treeContext = pushTreeContext(replay, replayNodes, j);
6386
- renderNode(request, task, childIndex, j);
6387
- }
6609
+ for (j = 0; j < replayNodes; j++)
6610
+ (childIndex = children[j]),
6611
+ warnForMissingKey(request, task, childIndex),
6612
+ (task.treeContext = pushTreeContext(replay, replayNodes, j)),
6613
+ renderNode(request, task, childIndex, j);
6388
6614
  task.treeContext = replay;
6389
6615
  task.keyPath = prevKeyPath;
6390
6616
  task.componentStack = previousComponentStack;
@@ -6413,6 +6639,7 @@
6413
6639
  task.formatContext,
6414
6640
  task.context,
6415
6641
  task.treeContext,
6642
+ task.row,
6416
6643
  task.componentStack,
6417
6644
  emptyContextObject,
6418
6645
  task.debugTask
@@ -6444,6 +6671,7 @@
6444
6671
  task.formatContext,
6445
6672
  task.context,
6446
6673
  task.treeContext,
6674
+ task.row,
6447
6675
  task.componentStack,
6448
6676
  emptyContextObject,
6449
6677
  task.debugTask
@@ -6558,9 +6786,11 @@
6558
6786
  throw node;
6559
6787
  }
6560
6788
  function abortTaskSoft(task) {
6561
- var boundary = task.blockedBoundary;
6562
- task = task.blockedSegment;
6563
- null !== task && ((task.status = 3), finishedTask(this, boundary, task));
6789
+ var boundary = task.blockedBoundary,
6790
+ segment = task.blockedSegment;
6791
+ null !== segment &&
6792
+ ((segment.status = ABORTED),
6793
+ finishedTask(this, boundary, task.row, segment));
6564
6794
  }
6565
6795
  function abortRemainingReplayNodes(
6566
6796
  request$jscomp$0,
@@ -6594,6 +6824,7 @@
6594
6824
  wasAborted = aborted,
6595
6825
  resumedBoundary = createSuspenseBoundary(
6596
6826
  request,
6827
+ null,
6597
6828
  new Set(),
6598
6829
  null,
6599
6830
  null
@@ -6638,8 +6869,12 @@
6638
6869
  segment = task.blockedSegment;
6639
6870
  if (null !== segment) {
6640
6871
  if (6 === segment.status) return;
6641
- segment.status = 3;
6872
+ segment.status = ABORTED;
6642
6873
  }
6874
+ segment = task.row;
6875
+ null !== segment &&
6876
+ 0 === --segment.pendingTasks &&
6877
+ finishSuspenseListRow(request, segment);
6643
6878
  segment = getThrownInfo(task.componentStack);
6644
6879
  if (null === boundary) {
6645
6880
  if (13 !== request.status && request.status !== CLOSED) {
@@ -6791,7 +7026,10 @@
6791
7026
  : (boundary.byteSize += segmentByteSize);
6792
7027
  }
6793
7028
  }
6794
- function finishedTask(request, boundary, segment) {
7029
+ function finishedTask(request, boundary, row, segment) {
7030
+ null !== row &&
7031
+ 0 === --row.pendingTasks &&
7032
+ finishSuspenseListRow(request, row);
6795
7033
  request.allPendingTasks--;
6796
7034
  if (null === boundary) {
6797
7035
  if (null !== segment && segment.parentFlushed) {
@@ -6820,7 +7058,11 @@
6820
7058
  abortTaskSoft,
6821
7059
  request
6822
7060
  ),
6823
- boundary.fallbackAbortableTasks.clear()),
7061
+ boundary.fallbackAbortableTasks.clear(),
7062
+ (row = boundary.row),
7063
+ null !== row &&
7064
+ 0 === --row.pendingTasks &&
7065
+ finishSuspenseListRow(request, row)),
6824
7066
  0 === request.pendingRootTasks &&
6825
7067
  null === request.trackedPostpones &&
6826
7068
  null !== boundary.contentPreamble &&
@@ -6884,7 +7126,12 @@
6884
7126
  );
6885
7127
  request.replay.pendingTasks--;
6886
7128
  request.abortSet.delete(request);
6887
- finishedTask(request$jscomp$0, request.blockedBoundary, null);
7129
+ finishedTask(
7130
+ request$jscomp$0,
7131
+ request.blockedBoundary,
7132
+ request.row,
7133
+ null
7134
+ );
6888
7135
  } catch (thrownValue) {
6889
7136
  resetHooksState();
6890
7137
  var x =
@@ -6967,6 +7214,7 @@
6967
7214
  finishedTask(
6968
7215
  request,
6969
7216
  errorDigest.blockedBoundary,
7217
+ errorDigest.row,
6970
7218
  request$jscomp$1
6971
7219
  );
6972
7220
  } catch (thrownValue) {
@@ -6995,7 +7243,12 @@
6995
7243
  errorDigest.abortSet.delete(errorDigest);
6996
7244
  request$jscomp$1.status = 4;
6997
7245
  var boundary$jscomp$0 = errorDigest.blockedBoundary,
7246
+ row = errorDigest.row,
6998
7247
  debugTask = errorDigest.debugTask;
7248
+ null !== row &&
7249
+ 0 === --row.pendingTasks &&
7250
+ finishSuspenseListRow(request, row);
7251
+ request.allPendingTasks--;
6999
7252
  prevTaskInDEV = logRecoverableError(
7000
7253
  request,
7001
7254
  x$jscomp$0,
@@ -7028,7 +7281,6 @@
7028
7281
  null === request.trackedPostpones &&
7029
7282
  null !== boundary$jscomp$0.contentPreamble &&
7030
7283
  preparePreamble(request)));
7031
- request.allPendingTasks--;
7032
7284
  0 === request.allPendingTasks && completeAll(request);
7033
7285
  }
7034
7286
  } finally {
@@ -7180,15 +7432,19 @@
7180
7432
  return flushSubtree(request, destination, segment, hoistableState);
7181
7433
  boundary.parentFlushed = !0;
7182
7434
  if (boundary.status === CLIENT_RENDERED) {
7183
- var errorDigest = boundary.errorDigest,
7184
- errorMessage = boundary.errorMessage,
7435
+ var row = boundary.row;
7436
+ null !== row &&
7437
+ 0 === --row.pendingTasks &&
7438
+ finishSuspenseListRow(request, row);
7439
+ row = boundary.errorDigest;
7440
+ var errorMessage = boundary.errorMessage,
7185
7441
  errorStack = boundary.errorStack;
7186
7442
  boundary = boundary.errorComponentStack;
7187
7443
  writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
7188
7444
  writeChunk(destination, clientRenderedSuspenseBoundaryError1);
7189
- errorDigest &&
7445
+ row &&
7190
7446
  (writeChunk(destination, clientRenderedSuspenseBoundaryError1A),
7191
- writeChunk(destination, escapeTextForBrowser(errorDigest)),
7447
+ writeChunk(destination, escapeTextForBrowser(row)),
7192
7448
  writeChunk(
7193
7449
  destination,
7194
7450
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
@@ -7255,6 +7511,11 @@
7255
7511
  hoistStylesheetDependency,
7256
7512
  hoistableState
7257
7513
  ));
7514
+ segment = boundary.row;
7515
+ null !== segment &&
7516
+ 500 < boundary.byteSize &&
7517
+ 0 === --segment.pendingTasks &&
7518
+ finishSuspenseListRow(request, segment);
7258
7519
  writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
7259
7520
  segment = boundary.completedSegments;
7260
7521
  if (1 !== segment.length)
@@ -7294,6 +7555,11 @@
7294
7555
  completedSegments[i]
7295
7556
  );
7296
7557
  completedSegments.length = 0;
7558
+ completedSegments = boundary.row;
7559
+ null !== completedSegments &&
7560
+ 500 < boundary.byteSize &&
7561
+ 0 === --completedSegments.pendingTasks &&
7562
+ finishSuspenseListRow(request, completedSegments);
7297
7563
  writeHoistablesForBoundary(
7298
7564
  destination,
7299
7565
  boundary.contentState,
@@ -7806,11 +8072,11 @@
7806
8072
  }
7807
8073
  function ensureCorrectIsomorphicReactVersion() {
7808
8074
  var isomorphicReactPackageVersion = React.version;
7809
- if ("19.2.0-canary-462d08f9-20250517" !== isomorphicReactPackageVersion)
8075
+ if ("19.2.0-canary-c4676e72-20250520" !== isomorphicReactPackageVersion)
7810
8076
  throw Error(
7811
8077
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
7812
8078
  (isomorphicReactPackageVersion +
7813
- "\n - react-dom: 19.2.0-canary-462d08f9-20250517\nLearn more: https://react.dev/warnings/version-mismatch")
8079
+ "\n - react-dom: 19.2.0-canary-c4676e72-20250520\nLearn more: https://react.dev/warnings/version-mismatch")
7814
8080
  );
7815
8081
  }
7816
8082
  function createDrainHandler(destination, request) {
@@ -9388,6 +9654,7 @@
9388
9654
  PENDING = 0,
9389
9655
  COMPLETED = 1,
9390
9656
  FLUSHED = 2,
9657
+ ABORTED = 3,
9391
9658
  POSTPONED = 5,
9392
9659
  CLOSED = 14,
9393
9660
  currentRequest = null,
@@ -9491,5 +9758,5 @@
9491
9758
  }
9492
9759
  };
9493
9760
  };
9494
- exports.version = "19.2.0-canary-462d08f9-20250517";
9761
+ exports.version = "19.2.0-canary-c4676e72-20250520";
9495
9762
  })();