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)
@@ -4427,6 +4435,7 @@
4427
4435
  null,
4428
4436
  emptyTreeContext,
4429
4437
  null,
4438
+ null,
4430
4439
  emptyContextObject,
4431
4440
  null
4432
4441
  );
@@ -4442,15 +4451,17 @@
4442
4451
  }
4443
4452
  function createSuspenseBoundary(
4444
4453
  request,
4454
+ row,
4445
4455
  fallbackAbortableTasks,
4446
4456
  contentPreamble,
4447
4457
  fallbackPreamble
4448
4458
  ) {
4449
- return {
4459
+ fallbackAbortableTasks = {
4450
4460
  status: PENDING,
4451
4461
  rootSegmentID: -1,
4452
4462
  parentFlushed: !1,
4453
4463
  pendingTasks: 0,
4464
+ row: row,
4454
4465
  completedSegments: [],
4455
4466
  byteSize: 0,
4456
4467
  fallbackAbortableTasks: fallbackAbortableTasks,
@@ -4465,6 +4476,14 @@
4465
4476
  errorStack: null,
4466
4477
  errorComponentStack: null
4467
4478
  };
4479
+ null !== row &&
4480
+ (row.pendingTasks++,
4481
+ (row = row.boundaries),
4482
+ null !== row &&
4483
+ (request.allPendingTasks++,
4484
+ fallbackAbortableTasks.pendingTasks++,
4485
+ row.push(fallbackAbortableTasks)));
4486
+ return fallbackAbortableTasks;
4468
4487
  }
4469
4488
  function createRenderTask(
4470
4489
  request,
@@ -4480,6 +4499,7 @@
4480
4499
  formatContext,
4481
4500
  context,
4482
4501
  treeContext,
4502
+ row,
4483
4503
  componentStack,
4484
4504
  legacyContext,
4485
4505
  debugTask
@@ -4488,6 +4508,7 @@
4488
4508
  null === blockedBoundary
4489
4509
  ? request.pendingRootTasks++
4490
4510
  : blockedBoundary.pendingTasks++;
4511
+ null !== row && row.pendingTasks++;
4491
4512
  var task = {
4492
4513
  replay: null,
4493
4514
  node: node,
@@ -4504,6 +4525,7 @@
4504
4525
  formatContext: formatContext,
4505
4526
  context: context,
4506
4527
  treeContext: treeContext,
4528
+ row: row,
4507
4529
  componentStack: componentStack,
4508
4530
  thenableState: thenableState
4509
4531
  };
@@ -4524,6 +4546,7 @@
4524
4546
  formatContext,
4525
4547
  context,
4526
4548
  treeContext,
4549
+ row,
4527
4550
  componentStack,
4528
4551
  legacyContext,
4529
4552
  debugTask
@@ -4532,6 +4555,7 @@
4532
4555
  null === blockedBoundary
4533
4556
  ? request.pendingRootTasks++
4534
4557
  : blockedBoundary.pendingTasks++;
4558
+ null !== row && row.pendingTasks++;
4535
4559
  replay.pendingTasks++;
4536
4560
  var task = {
4537
4561
  replay: replay,
@@ -4549,6 +4573,7 @@
4549
4573
  formatContext: formatContext,
4550
4574
  context: context,
4551
4575
  treeContext: treeContext,
4576
+ row: row,
4552
4577
  componentStack: componentStack,
4553
4578
  thenableState: thenableState
4554
4579
  };
@@ -4734,6 +4759,143 @@
4734
4759
  ? ((request.status = CLOSED), request.destination.destroy(error))
4735
4760
  : ((request.status = 13), (request.fatalError = error));
4736
4761
  }
4762
+ function finishSuspenseListRow(request, row) {
4763
+ for (row = row.next; null !== row; ) {
4764
+ var unblockedBoundaries = row.boundaries;
4765
+ if (null !== unblockedBoundaries) {
4766
+ row.boundaries = null;
4767
+ for (var i = 0; i < unblockedBoundaries.length; i++)
4768
+ finishedTask(request, unblockedBoundaries[i], null, null);
4769
+ }
4770
+ row.pendingTasks--;
4771
+ if (0 < row.pendingTasks) break;
4772
+ row = row.next;
4773
+ }
4774
+ }
4775
+ function createSuspenseListRow(previousRow) {
4776
+ var newRow = { pendingTasks: 1, boundaries: null, next: null };
4777
+ null !== previousRow &&
4778
+ 0 < previousRow.pendingTasks &&
4779
+ (newRow.pendingTasks++,
4780
+ (newRow.boundaries = []),
4781
+ (previousRow.next = newRow));
4782
+ return newRow;
4783
+ }
4784
+ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
4785
+ keyPath = task.keyPath;
4786
+ var previousComponentStack = task.componentStack;
4787
+ var previousDebugTask = task.debugTask;
4788
+ pushServerComponentStack(task, task.node.props.children._debugInfo);
4789
+ var prevTreeContext = task.treeContext,
4790
+ prevRow = task.row,
4791
+ totalChildren = rows.length,
4792
+ previousSuspenseListRow = null;
4793
+ if (null !== task.replay) {
4794
+ var resumeSlots = task.replay.slots;
4795
+ if (null !== resumeSlots && "object" === typeof resumeSlots)
4796
+ for (var n = 0; n < totalChildren; n++) {
4797
+ var i = "backwards" !== revealOrder ? n : totalChildren - 1 - n,
4798
+ node = rows[i];
4799
+ task.row = previousSuspenseListRow = createSuspenseListRow(
4800
+ previousSuspenseListRow
4801
+ );
4802
+ task.treeContext = pushTreeContext(
4803
+ prevTreeContext,
4804
+ totalChildren,
4805
+ i
4806
+ );
4807
+ var resumeSegmentID = resumeSlots[i];
4808
+ "number" === typeof resumeSegmentID
4809
+ ? (resumeNode(request, task, resumeSegmentID, node, i),
4810
+ delete resumeSlots[i])
4811
+ : renderNode(request, task, node, i);
4812
+ 0 === --previousSuspenseListRow.pendingTasks &&
4813
+ finishSuspenseListRow(request, previousSuspenseListRow);
4814
+ }
4815
+ else
4816
+ for (resumeSlots = 0; resumeSlots < totalChildren; resumeSlots++)
4817
+ (n =
4818
+ "backwards" !== revealOrder
4819
+ ? resumeSlots
4820
+ : totalChildren - 1 - resumeSlots),
4821
+ (i = rows[n]),
4822
+ warnForMissingKey(request, task, i),
4823
+ (task.row = previousSuspenseListRow =
4824
+ createSuspenseListRow(previousSuspenseListRow)),
4825
+ (task.treeContext = pushTreeContext(
4826
+ prevTreeContext,
4827
+ totalChildren,
4828
+ n
4829
+ )),
4830
+ renderNode(request, task, i, n),
4831
+ 0 === --previousSuspenseListRow.pendingTasks &&
4832
+ finishSuspenseListRow(request, previousSuspenseListRow);
4833
+ } else if ("backwards" !== revealOrder)
4834
+ for (revealOrder = 0; revealOrder < totalChildren; revealOrder++)
4835
+ (resumeSlots = rows[revealOrder]),
4836
+ warnForMissingKey(request, task, resumeSlots),
4837
+ (task.row = previousSuspenseListRow =
4838
+ createSuspenseListRow(previousSuspenseListRow)),
4839
+ (task.treeContext = pushTreeContext(
4840
+ prevTreeContext,
4841
+ totalChildren,
4842
+ revealOrder
4843
+ )),
4844
+ renderNode(request, task, resumeSlots, revealOrder),
4845
+ 0 === --previousSuspenseListRow.pendingTasks &&
4846
+ finishSuspenseListRow(request, previousSuspenseListRow);
4847
+ else {
4848
+ revealOrder = task.blockedSegment;
4849
+ resumeSlots = revealOrder.children.length;
4850
+ n = revealOrder.chunks.length;
4851
+ for (i = totalChildren - 1; 0 <= i; i--) {
4852
+ node = rows[i];
4853
+ task.row = previousSuspenseListRow = createSuspenseListRow(
4854
+ previousSuspenseListRow
4855
+ );
4856
+ task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
4857
+ resumeSegmentID = createPendingSegment(
4858
+ request,
4859
+ n,
4860
+ null,
4861
+ task.formatContext,
4862
+ 0 === i ? revealOrder.lastPushedText : !0,
4863
+ !0
4864
+ );
4865
+ revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
4866
+ task.blockedSegment = resumeSegmentID;
4867
+ warnForMissingKey(request, task, node);
4868
+ try {
4869
+ renderNode(request, task, node, i),
4870
+ pushSegmentFinale(
4871
+ resumeSegmentID.chunks,
4872
+ request.renderState,
4873
+ resumeSegmentID.lastPushedText,
4874
+ resumeSegmentID.textEmbedded
4875
+ ),
4876
+ (resumeSegmentID.status = COMPLETED),
4877
+ 0 === --previousSuspenseListRow.pendingTasks &&
4878
+ finishSuspenseListRow(request, previousSuspenseListRow);
4879
+ } catch (thrownValue) {
4880
+ throw (
4881
+ ((resumeSegmentID.status = 12 === request.status ? ABORTED : 4),
4882
+ thrownValue)
4883
+ );
4884
+ }
4885
+ }
4886
+ task.blockedSegment = revealOrder;
4887
+ revealOrder.lastPushedText = !1;
4888
+ }
4889
+ null !== prevRow &&
4890
+ null !== previousSuspenseListRow &&
4891
+ 0 < previousSuspenseListRow.pendingTasks &&
4892
+ (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
4893
+ task.treeContext = prevTreeContext;
4894
+ task.row = prevRow;
4895
+ task.keyPath = keyPath;
4896
+ task.componentStack = previousComponentStack;
4897
+ task.debugTask = previousDebugTask;
4898
+ }
4737
4899
  function renderWithHooks(
4738
4900
  request,
4739
4901
  task,
@@ -5307,6 +5469,7 @@
5307
5469
  task.formatContext,
5308
5470
  task.context,
5309
5471
  task.treeContext,
5472
+ task.row,
5310
5473
  task.componentStack,
5311
5474
  emptyContextObject,
5312
5475
  task.debugTask
@@ -5392,10 +5555,53 @@
5392
5555
  }
5393
5556
  return;
5394
5557
  case REACT_SUSPENSE_LIST_TYPE:
5395
- var _prevKeyPath4 = task.keyPath;
5396
- task.keyPath = keyPath;
5397
- renderNodeDestructive(request, task, props.children, -1);
5398
- task.keyPath = _prevKeyPath4;
5558
+ a: {
5559
+ var children$jscomp$0 = props.children,
5560
+ revealOrder = props.revealOrder;
5561
+ if ("forwards" === revealOrder || "backwards" === revealOrder) {
5562
+ if (isArrayImpl(children$jscomp$0)) {
5563
+ renderSuspenseListRows(
5564
+ request,
5565
+ task,
5566
+ keyPath,
5567
+ children$jscomp$0,
5568
+ revealOrder
5569
+ );
5570
+ break a;
5571
+ }
5572
+ var iteratorFn = getIteratorFn(children$jscomp$0);
5573
+ if (iteratorFn) {
5574
+ var iterator = iteratorFn.call(children$jscomp$0);
5575
+ if (iterator) {
5576
+ validateIterable(
5577
+ task,
5578
+ children$jscomp$0,
5579
+ -1,
5580
+ iterator,
5581
+ iteratorFn
5582
+ );
5583
+ var step = iterator.next();
5584
+ if (!step.done) {
5585
+ var rows = [];
5586
+ do rows.push(step.value), (step = iterator.next());
5587
+ while (!step.done);
5588
+ renderSuspenseListRows(
5589
+ request,
5590
+ task,
5591
+ keyPath,
5592
+ children$jscomp$0,
5593
+ revealOrder
5594
+ );
5595
+ }
5596
+ break a;
5597
+ }
5598
+ }
5599
+ }
5600
+ var prevKeyPath$jscomp$3 = task.keyPath;
5601
+ task.keyPath = keyPath;
5602
+ renderNodeDestructive(request, task, children$jscomp$0, -1);
5603
+ task.keyPath = prevKeyPath$jscomp$3;
5604
+ }
5399
5605
  return;
5400
5606
  case REACT_VIEW_TRANSITION_TYPE:
5401
5607
  case REACT_SCOPE_TYPE:
@@ -5405,22 +5611,26 @@
5405
5611
  case REACT_SUSPENSE_TYPE:
5406
5612
  a: if (null !== task.replay) {
5407
5613
  var _prevKeyPath = task.keyPath,
5408
- _prevContext = task.formatContext;
5614
+ _prevContext = task.formatContext,
5615
+ _prevRow = task.row;
5409
5616
  task.keyPath = keyPath;
5410
5617
  task.formatContext = getSuspenseContentFormatContext(
5411
5618
  request.resumableState,
5412
5619
  _prevContext
5413
5620
  );
5621
+ task.row = null;
5414
5622
  var _content = props.children;
5415
5623
  try {
5416
5624
  renderNode(request, task, _content, -1);
5417
5625
  } finally {
5418
5626
  (task.keyPath = _prevKeyPath),
5419
- (task.formatContext = _prevContext);
5627
+ (task.formatContext = _prevContext),
5628
+ (task.row = _prevRow);
5420
5629
  }
5421
5630
  } else {
5422
- var prevKeyPath$jscomp$3 = task.keyPath,
5631
+ var prevKeyPath$jscomp$4 = task.keyPath,
5423
5632
  prevContext$jscomp$0 = task.formatContext,
5633
+ prevRow = task.row,
5424
5634
  parentBoundary = task.blockedBoundary,
5425
5635
  parentPreamble = task.blockedPreamble,
5426
5636
  parentHoistableState = task.hoistableState,
@@ -5432,12 +5642,14 @@
5432
5642
  task.formatContext.insertionMode < HTML_MODE
5433
5643
  ? createSuspenseBoundary(
5434
5644
  request,
5645
+ task.row,
5435
5646
  fallbackAbortSet,
5436
5647
  createPreambleState(),
5437
5648
  createPreambleState()
5438
5649
  )
5439
5650
  : createSuspenseBoundary(
5440
5651
  request,
5652
+ task.row,
5441
5653
  fallbackAbortSet,
5442
5654
  null,
5443
5655
  null
@@ -5499,13 +5711,14 @@
5499
5711
  (boundarySegment.status = COMPLETED);
5500
5712
  } catch (thrownValue) {
5501
5713
  throw (
5502
- ((boundarySegment.status = 12 === request.status ? 3 : 4),
5714
+ ((boundarySegment.status =
5715
+ 12 === request.status ? ABORTED : 4),
5503
5716
  thrownValue)
5504
5717
  );
5505
5718
  } finally {
5506
5719
  (task.blockedSegment = parentSegment),
5507
5720
  (task.blockedPreamble = parentPreamble),
5508
- (task.keyPath = prevKeyPath$jscomp$3),
5721
+ (task.keyPath = prevKeyPath$jscomp$4),
5509
5722
  (task.formatContext = prevContext$jscomp$0);
5510
5723
  }
5511
5724
  var suspendedPrimaryTask = createRenderTask(
@@ -5525,6 +5738,7 @@
5525
5738
  ),
5526
5739
  task.context,
5527
5740
  task.treeContext,
5741
+ null,
5528
5742
  task.componentStack,
5529
5743
  emptyContextObject,
5530
5744
  task.debugTask
@@ -5541,6 +5755,7 @@
5541
5755
  request.resumableState,
5542
5756
  prevContext$jscomp$0
5543
5757
  );
5758
+ task.row = null;
5544
5759
  contentRootSegment.status = 6;
5545
5760
  try {
5546
5761
  if (
@@ -5558,6 +5773,9 @@
5558
5773
  ((newBoundary.status = COMPLETED),
5559
5774
  !(500 < newBoundary.byteSize)))
5560
5775
  ) {
5776
+ null !== prevRow &&
5777
+ 0 === --prevRow.pendingTasks &&
5778
+ finishSuspenseListRow(request, prevRow);
5561
5779
  0 === request.pendingRootTasks &&
5562
5780
  task.blockedPreamble &&
5563
5781
  preparePreamble(request);
@@ -5566,7 +5784,7 @@
5566
5784
  } catch (thrownValue$2) {
5567
5785
  newBoundary.status = CLIENT_RENDERED;
5568
5786
  if (12 === request.status) {
5569
- contentRootSegment.status = 3;
5787
+ contentRootSegment.status = ABORTED;
5570
5788
  var error = request.fatalError;
5571
5789
  } else
5572
5790
  (contentRootSegment.status = 4), (error = thrownValue$2);
@@ -5590,8 +5808,9 @@
5590
5808
  (task.blockedPreamble = parentPreamble),
5591
5809
  (task.hoistableState = parentHoistableState),
5592
5810
  (task.blockedSegment = parentSegment),
5593
- (task.keyPath = prevKeyPath$jscomp$3),
5594
- (task.formatContext = prevContext$jscomp$0);
5811
+ (task.keyPath = prevKeyPath$jscomp$4),
5812
+ (task.formatContext = prevContext$jscomp$0),
5813
+ (task.row = prevRow);
5595
5814
  }
5596
5815
  var suspendedFallbackTask = createRenderTask(
5597
5816
  request,
@@ -5610,6 +5829,7 @@
5610
5829
  ),
5611
5830
  task.context,
5612
5831
  task.treeContext,
5832
+ task.row,
5613
5833
  task.componentStack,
5614
5834
  emptyContextObject,
5615
5835
  task.debugTask
@@ -5628,7 +5848,7 @@
5628
5848
  for (var key in props)
5629
5849
  "ref" !== key && (propsWithoutRef[key] = props[key]);
5630
5850
  } else propsWithoutRef = props;
5631
- var children$jscomp$0 = renderWithHooks(
5851
+ var children$jscomp$1 = renderWithHooks(
5632
5852
  request,
5633
5853
  task,
5634
5854
  keyPath,
@@ -5640,7 +5860,7 @@
5640
5860
  request,
5641
5861
  task,
5642
5862
  keyPath,
5643
- children$jscomp$0,
5863
+ children$jscomp$1,
5644
5864
  0 !== localIdCounter,
5645
5865
  actionStateCounter,
5646
5866
  actionStateMatchingIndex
@@ -5652,9 +5872,9 @@
5652
5872
  case REACT_PROVIDER_TYPE:
5653
5873
  case REACT_CONTEXT_TYPE:
5654
5874
  var value$jscomp$0 = props.value,
5655
- children$jscomp$1 = props.children;
5875
+ children$jscomp$2 = props.children;
5656
5876
  var prevSnapshot = task.context;
5657
- var prevKeyPath$jscomp$4 = task.keyPath;
5877
+ var prevKeyPath$jscomp$5 = task.keyPath;
5658
5878
  var prevValue = type._currentValue2;
5659
5879
  type._currentValue2 = value$jscomp$0;
5660
5880
  void 0 !== type._currentRenderer2 &&
@@ -5675,7 +5895,7 @@
5675
5895
  currentActiveSnapshot = newNode;
5676
5896
  task.context = newNode;
5677
5897
  task.keyPath = keyPath;
5678
- renderNodeDestructive(request, task, children$jscomp$1, -1);
5898
+ renderNodeDestructive(request, task, children$jscomp$2, -1);
5679
5899
  var prevSnapshot$jscomp$0 = currentActiveSnapshot;
5680
5900
  if (null === prevSnapshot$jscomp$0)
5681
5901
  throw Error(
@@ -5697,7 +5917,7 @@
5697
5917
  var JSCompiler_inline_result$jscomp$0 = (currentActiveSnapshot =
5698
5918
  prevSnapshot$jscomp$0.parent);
5699
5919
  task.context = JSCompiler_inline_result$jscomp$0;
5700
- task.keyPath = prevKeyPath$jscomp$4;
5920
+ task.keyPath = prevKeyPath$jscomp$5;
5701
5921
  prevSnapshot !== task.context &&
5702
5922
  console.error(
5703
5923
  "Popping the context provider did not return back to the original snapshot. This is a bug in React."
@@ -5711,10 +5931,10 @@
5711
5931
  "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."
5712
5932
  );
5713
5933
  var newChildren = render(context$jscomp$0._currentValue2),
5714
- prevKeyPath$jscomp$5 = task.keyPath;
5934
+ prevKeyPath$jscomp$6 = task.keyPath;
5715
5935
  task.keyPath = keyPath;
5716
5936
  renderNodeDestructive(request, task, newChildren, -1);
5717
- task.keyPath = prevKeyPath$jscomp$5;
5937
+ task.keyPath = prevKeyPath$jscomp$6;
5718
5938
  return;
5719
5939
  case REACT_LAZY_TYPE:
5720
5940
  var Component = callLazyInitInDEV(type);
@@ -5845,6 +6065,7 @@
5845
6065
  node = null === node[4] ? null : node[4][3];
5846
6066
  var prevKeyPath = task.keyPath,
5847
6067
  prevContext = task.formatContext,
6068
+ prevRow = task.row,
5848
6069
  previousReplaySet = task.replay,
5849
6070
  parentBoundary = task.blockedBoundary,
5850
6071
  parentHoistableState = task.hoistableState,
@@ -5855,12 +6076,14 @@
5855
6076
  task.formatContext.insertionMode < HTML_MODE
5856
6077
  ? createSuspenseBoundary(
5857
6078
  request,
6079
+ task.row,
5858
6080
  fallbackAbortSet,
5859
6081
  createPreambleState(),
5860
6082
  createPreambleState()
5861
6083
  )
5862
6084
  : createSuspenseBoundary(
5863
6085
  request,
6086
+ task.row,
5864
6087
  fallbackAbortSet,
5865
6088
  null,
5866
6089
  null
@@ -5874,6 +6097,7 @@
5874
6097
  request.resumableState,
5875
6098
  prevContext
5876
6099
  );
6100
+ task.row = null;
5877
6101
  task.replay = { nodes: type, slots: ref, pendingTasks: 1 };
5878
6102
  try {
5879
6103
  renderNode(request, task, content, -1);
@@ -5907,7 +6131,8 @@
5907
6131
  (task.hoistableState = parentHoistableState),
5908
6132
  (task.replay = previousReplaySet),
5909
6133
  (task.keyPath = prevKeyPath),
5910
- (task.formatContext = prevContext);
6134
+ (task.formatContext = prevContext),
6135
+ (task.row = prevRow);
5911
6136
  }
5912
6137
  props = createReplayTask(
5913
6138
  request,
@@ -5925,6 +6150,7 @@
5925
6150
  ),
5926
6151
  task.context,
5927
6152
  task.treeContext,
6153
+ task.row,
5928
6154
  task.componentStack,
5929
6155
  emptyContextObject,
5930
6156
  task.debugTask
@@ -5938,6 +6164,35 @@
5938
6164
  }
5939
6165
  }
5940
6166
  }
6167
+ function validateIterable(
6168
+ task,
6169
+ iterable,
6170
+ childIndex,
6171
+ iterator,
6172
+ iteratorFn
6173
+ ) {
6174
+ if (iterator === iterable) {
6175
+ if (
6176
+ -1 !== childIndex ||
6177
+ null === task.componentStack ||
6178
+ "function" !== typeof task.componentStack.type ||
6179
+ "[object GeneratorFunction]" !==
6180
+ Object.prototype.toString.call(task.componentStack.type) ||
6181
+ "[object Generator]" !== Object.prototype.toString.call(iterator)
6182
+ )
6183
+ didWarnAboutGenerators ||
6184
+ console.error(
6185
+ "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."
6186
+ ),
6187
+ (didWarnAboutGenerators = !0);
6188
+ } else
6189
+ iterable.entries !== iteratorFn ||
6190
+ didWarnAboutMaps ||
6191
+ (console.error(
6192
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
6193
+ ),
6194
+ (didWarnAboutMaps = !0));
6195
+ }
5941
6196
  function renderNodeDestructive(request, task, node, childIndex) {
5942
6197
  null !== task.replay && "number" === typeof task.replay.slots
5943
6198
  ? resumeNode(request, task, task.replay.slots, node, childIndex)
@@ -6014,52 +6269,27 @@
6014
6269
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
6015
6270
  );
6016
6271
  case REACT_LAZY_TYPE:
6017
- node = callLazyInitInDEV(node);
6272
+ type = callLazyInitInDEV(node);
6018
6273
  if (12 === request.status) throw null;
6019
- renderNodeDestructive(request, task, node, childIndex);
6274
+ renderNodeDestructive(request, task, type, childIndex);
6020
6275
  return;
6021
6276
  }
6022
6277
  if (isArrayImpl(node)) {
6023
6278
  renderChildrenArray(request, task, node, childIndex);
6024
6279
  return;
6025
6280
  }
6026
- null === node || "object" !== typeof node
6027
- ? (key = null)
6028
- : ((type =
6029
- (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
6030
- node["@@iterator"]),
6031
- (key = "function" === typeof type ? type : null));
6032
- if (key && (type = key.call(node))) {
6033
- if (type === node) {
6034
- if (
6035
- -1 !== childIndex ||
6036
- null === task.componentStack ||
6037
- "function" !== typeof task.componentStack.type ||
6038
- "[object GeneratorFunction]" !==
6039
- Object.prototype.toString.call(task.componentStack.type) ||
6040
- "[object Generator]" !== Object.prototype.toString.call(type)
6041
- )
6042
- didWarnAboutGenerators ||
6043
- console.error(
6044
- "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."
6045
- ),
6046
- (didWarnAboutGenerators = !0);
6047
- } else
6048
- node.entries !== key ||
6049
- didWarnAboutMaps ||
6050
- (console.error(
6051
- "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
6052
- ),
6053
- (didWarnAboutMaps = !0));
6054
- node = type.next();
6055
- if (!node.done) {
6056
- key = [];
6057
- do key.push(node.value), (node = type.next());
6058
- while (!node.done);
6059
- renderChildrenArray(request, task, key, childIndex);
6281
+ if ((key = getIteratorFn(node)))
6282
+ if ((type = key.call(node))) {
6283
+ validateIterable(task, node, childIndex, type, key);
6284
+ node = type.next();
6285
+ if (!node.done) {
6286
+ key = [];
6287
+ do key.push(node.value), (node = type.next());
6288
+ while (!node.done);
6289
+ renderChildrenArray(request, task, key, childIndex);
6290
+ }
6291
+ return;
6060
6292
  }
6061
- return;
6062
- }
6063
6293
  if ("function" === typeof node.then)
6064
6294
  return (
6065
6295
  (task.thenableState = null),
@@ -6118,6 +6348,69 @@
6118
6348
  ));
6119
6349
  }
6120
6350
  }
6351
+ function warnForMissingKey(request, task, child) {
6352
+ if (
6353
+ null !== child &&
6354
+ "object" === typeof child &&
6355
+ (child.$$typeof === REACT_ELEMENT_TYPE ||
6356
+ child.$$typeof === REACT_PORTAL_TYPE) &&
6357
+ child._store &&
6358
+ ((!child._store.validated && null == child.key) ||
6359
+ 2 === child._store.validated)
6360
+ ) {
6361
+ if ("object" !== typeof child._store)
6362
+ throw Error(
6363
+ "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
6364
+ );
6365
+ child._store.validated = 1;
6366
+ var didWarnForKey = request.didWarnForKey;
6367
+ null == didWarnForKey &&
6368
+ (didWarnForKey = request.didWarnForKey = new WeakSet());
6369
+ request = task.componentStack;
6370
+ if (null !== request && !didWarnForKey.has(request)) {
6371
+ didWarnForKey.add(request);
6372
+ var componentName = getComponentNameFromType(child.type);
6373
+ didWarnForKey = child._owner;
6374
+ var parentOwner = request.owner;
6375
+ request = "";
6376
+ if (parentOwner && "undefined" !== typeof parentOwner.type) {
6377
+ var name = getComponentNameFromType(parentOwner.type);
6378
+ name &&
6379
+ (request = "\n\nCheck the render method of `" + name + "`.");
6380
+ }
6381
+ request ||
6382
+ (componentName &&
6383
+ (request =
6384
+ "\n\nCheck the top-level render call using <" +
6385
+ componentName +
6386
+ ">."));
6387
+ componentName = "";
6388
+ null != didWarnForKey &&
6389
+ parentOwner !== didWarnForKey &&
6390
+ ((parentOwner = null),
6391
+ "undefined" !== typeof didWarnForKey.type
6392
+ ? (parentOwner = getComponentNameFromType(didWarnForKey.type))
6393
+ : "string" === typeof didWarnForKey.name &&
6394
+ (parentOwner = didWarnForKey.name),
6395
+ parentOwner &&
6396
+ (componentName =
6397
+ " It was passed a child from " + parentOwner + "."));
6398
+ didWarnForKey = task.componentStack;
6399
+ task.componentStack = {
6400
+ parent: task.componentStack,
6401
+ type: child.type,
6402
+ owner: child._owner,
6403
+ stack: child._debugStack
6404
+ };
6405
+ console.error(
6406
+ 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
6407
+ request,
6408
+ componentName
6409
+ );
6410
+ task.componentStack = didWarnForKey;
6411
+ }
6412
+ }
6413
+ }
6121
6414
  function renderChildrenArray(request, task, children, childIndex) {
6122
6415
  var prevKeyPath = task.keyPath,
6123
6416
  previousComponentStack = task.componentStack;
@@ -6211,76 +6504,11 @@
6211
6504
  task.debugTask = previousDebugTask;
6212
6505
  return;
6213
6506
  }
6214
- for (j = 0; j < replayNodes; j++) {
6215
- childIndex = children[j];
6216
- resumeSlots = request;
6217
- node = task;
6218
- error = childIndex;
6219
- if (
6220
- null !== error &&
6221
- "object" === typeof error &&
6222
- (error.$$typeof === REACT_ELEMENT_TYPE ||
6223
- error.$$typeof === REACT_PORTAL_TYPE) &&
6224
- error._store &&
6225
- ((!error._store.validated && null == error.key) ||
6226
- 2 === error._store.validated)
6227
- ) {
6228
- if ("object" !== typeof error._store)
6229
- throw Error(
6230
- "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
6231
- );
6232
- error._store.validated = 1;
6233
- thrownInfo = resumeSlots.didWarnForKey;
6234
- null == thrownInfo &&
6235
- (thrownInfo = resumeSlots.didWarnForKey = new WeakSet());
6236
- resumeSlots = node.componentStack;
6237
- if (null !== resumeSlots && !thrownInfo.has(resumeSlots)) {
6238
- thrownInfo.add(resumeSlots);
6239
- var componentName = getComponentNameFromType(error.type);
6240
- thrownInfo = error._owner;
6241
- var parentOwner = resumeSlots.owner;
6242
- resumeSlots = "";
6243
- if (parentOwner && "undefined" !== typeof parentOwner.type) {
6244
- var name = getComponentNameFromType(parentOwner.type);
6245
- name &&
6246
- (resumeSlots =
6247
- "\n\nCheck the render method of `" + name + "`.");
6248
- }
6249
- resumeSlots ||
6250
- (componentName &&
6251
- (resumeSlots =
6252
- "\n\nCheck the top-level render call using <" +
6253
- componentName +
6254
- ">."));
6255
- componentName = "";
6256
- null != thrownInfo &&
6257
- parentOwner !== thrownInfo &&
6258
- ((parentOwner = null),
6259
- "undefined" !== typeof thrownInfo.type
6260
- ? (parentOwner = getComponentNameFromType(thrownInfo.type))
6261
- : "string" === typeof thrownInfo.name &&
6262
- (parentOwner = thrownInfo.name),
6263
- parentOwner &&
6264
- (componentName =
6265
- " It was passed a child from " + parentOwner + "."));
6266
- thrownInfo = node.componentStack;
6267
- node.componentStack = {
6268
- parent: node.componentStack,
6269
- type: error.type,
6270
- owner: error._owner,
6271
- stack: error._debugStack
6272
- };
6273
- console.error(
6274
- 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
6275
- resumeSlots,
6276
- componentName
6277
- );
6278
- node.componentStack = thrownInfo;
6279
- }
6280
- }
6281
- task.treeContext = pushTreeContext(replay, replayNodes, j);
6282
- renderNode(request, task, childIndex, j);
6283
- }
6507
+ for (j = 0; j < replayNodes; j++)
6508
+ (childIndex = children[j]),
6509
+ warnForMissingKey(request, task, childIndex),
6510
+ (task.treeContext = pushTreeContext(replay, replayNodes, j)),
6511
+ renderNode(request, task, childIndex, j);
6284
6512
  task.treeContext = replay;
6285
6513
  task.keyPath = prevKeyPath;
6286
6514
  task.componentStack = previousComponentStack;
@@ -6309,6 +6537,7 @@
6309
6537
  task.formatContext,
6310
6538
  task.context,
6311
6539
  task.treeContext,
6540
+ task.row,
6312
6541
  task.componentStack,
6313
6542
  emptyContextObject,
6314
6543
  task.debugTask
@@ -6340,6 +6569,7 @@
6340
6569
  task.formatContext,
6341
6570
  task.context,
6342
6571
  task.treeContext,
6572
+ task.row,
6343
6573
  task.componentStack,
6344
6574
  emptyContextObject,
6345
6575
  task.debugTask
@@ -6454,9 +6684,11 @@
6454
6684
  throw node;
6455
6685
  }
6456
6686
  function abortTaskSoft(task) {
6457
- var boundary = task.blockedBoundary;
6458
- task = task.blockedSegment;
6459
- null !== task && ((task.status = 3), finishedTask(this, boundary, task));
6687
+ var boundary = task.blockedBoundary,
6688
+ segment = task.blockedSegment;
6689
+ null !== segment &&
6690
+ ((segment.status = ABORTED),
6691
+ finishedTask(this, boundary, task.row, segment));
6460
6692
  }
6461
6693
  function abortRemainingReplayNodes(
6462
6694
  request$jscomp$0,
@@ -6490,6 +6722,7 @@
6490
6722
  wasAborted = aborted,
6491
6723
  resumedBoundary = createSuspenseBoundary(
6492
6724
  request,
6725
+ null,
6493
6726
  new Set(),
6494
6727
  null,
6495
6728
  null
@@ -6534,8 +6767,12 @@
6534
6767
  segment = task.blockedSegment;
6535
6768
  if (null !== segment) {
6536
6769
  if (6 === segment.status) return;
6537
- segment.status = 3;
6770
+ segment.status = ABORTED;
6538
6771
  }
6772
+ segment = task.row;
6773
+ null !== segment &&
6774
+ 0 === --segment.pendingTasks &&
6775
+ finishSuspenseListRow(request, segment);
6539
6776
  segment = getThrownInfo(task.componentStack);
6540
6777
  if (null === boundary) {
6541
6778
  if (13 !== request.status && request.status !== CLOSED) {
@@ -6677,7 +6914,10 @@
6677
6914
  queueCompletedSegment(boundary, childSegment);
6678
6915
  } else boundary.completedSegments.push(segment);
6679
6916
  }
6680
- function finishedTask(request, boundary, segment) {
6917
+ function finishedTask(request, boundary, row, segment) {
6918
+ null !== row &&
6919
+ 0 === --row.pendingTasks &&
6920
+ finishSuspenseListRow(request, row);
6681
6921
  request.allPendingTasks--;
6682
6922
  if (null === boundary) {
6683
6923
  if (null !== segment && segment.parentFlushed) {
@@ -6706,7 +6946,11 @@
6706
6946
  abortTaskSoft,
6707
6947
  request
6708
6948
  ),
6709
- boundary.fallbackAbortableTasks.clear()),
6949
+ boundary.fallbackAbortableTasks.clear(),
6950
+ (row = boundary.row),
6951
+ null !== row &&
6952
+ 0 === --row.pendingTasks &&
6953
+ finishSuspenseListRow(request, row)),
6710
6954
  0 === request.pendingRootTasks &&
6711
6955
  null === request.trackedPostpones &&
6712
6956
  null !== boundary.contentPreamble &&
@@ -6770,7 +7014,12 @@
6770
7014
  );
6771
7015
  request.replay.pendingTasks--;
6772
7016
  request.abortSet.delete(request);
6773
- finishedTask(request$jscomp$0, request.blockedBoundary, null);
7017
+ finishedTask(
7018
+ request$jscomp$0,
7019
+ request.blockedBoundary,
7020
+ request.row,
7021
+ null
7022
+ );
6774
7023
  } catch (thrownValue) {
6775
7024
  resetHooksState();
6776
7025
  var x =
@@ -6851,6 +7100,7 @@
6851
7100
  finishedTask(
6852
7101
  request,
6853
7102
  errorDigest.blockedBoundary,
7103
+ errorDigest.row,
6854
7104
  request$jscomp$1
6855
7105
  );
6856
7106
  } catch (thrownValue) {
@@ -6879,7 +7129,12 @@
6879
7129
  errorDigest.abortSet.delete(errorDigest);
6880
7130
  request$jscomp$1.status = 4;
6881
7131
  var boundary$jscomp$0 = errorDigest.blockedBoundary,
7132
+ row = errorDigest.row,
6882
7133
  debugTask = errorDigest.debugTask;
7134
+ null !== row &&
7135
+ 0 === --row.pendingTasks &&
7136
+ finishSuspenseListRow(request, row);
7137
+ request.allPendingTasks--;
6883
7138
  prevTaskInDEV = logRecoverableError(
6884
7139
  request,
6885
7140
  x$jscomp$0,
@@ -6912,7 +7167,6 @@
6912
7167
  null === request.trackedPostpones &&
6913
7168
  null !== boundary$jscomp$0.contentPreamble &&
6914
7169
  preparePreamble(request)));
6915
- request.allPendingTasks--;
6916
7170
  0 === request.allPendingTasks && completeAll(request);
6917
7171
  }
6918
7172
  } finally {
@@ -7063,10 +7317,14 @@
7063
7317
  return flushSubtree(request, destination, segment, hoistableState);
7064
7318
  boundary.parentFlushed = !0;
7065
7319
  if (boundary.status === CLIENT_RENDERED) {
7320
+ var row = boundary.row;
7321
+ null !== row &&
7322
+ 0 === --row.pendingTasks &&
7323
+ finishSuspenseListRow(request, row);
7066
7324
  if (!request.renderState.generateStaticMarkup) {
7067
7325
  var errorDigest = boundary.errorDigest,
7068
- errorMessage = boundary.errorMessage,
7069
- errorStack = boundary.errorStack;
7326
+ errorMessage = boundary.errorMessage;
7327
+ row = boundary.errorStack;
7070
7328
  boundary = boundary.errorComponentStack;
7071
7329
  destination.push(startClientRenderedSuspenseBoundary);
7072
7330
  destination.push(clientRenderedSuspenseBoundaryError1);
@@ -7084,17 +7342,17 @@
7084
7342
  destination.push(
7085
7343
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
7086
7344
  ));
7087
- errorStack &&
7345
+ row &&
7088
7346
  (destination.push(clientRenderedSuspenseBoundaryError1C),
7089
- (errorStack = escapeTextForBrowser(errorStack)),
7090
- destination.push(errorStack),
7347
+ (row = escapeTextForBrowser(row)),
7348
+ destination.push(row),
7091
7349
  destination.push(
7092
7350
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
7093
7351
  ));
7094
7352
  boundary &&
7095
7353
  (destination.push(clientRenderedSuspenseBoundaryError1D),
7096
- (errorStack = escapeTextForBrowser(boundary)),
7097
- destination.push(errorStack),
7354
+ (boundary = escapeTextForBrowser(boundary)),
7355
+ destination.push(boundary),
7098
7356
  destination.push(
7099
7357
  clientRenderedSuspenseBoundaryErrorAttrInterstitial
7100
7358
  ));
@@ -7118,12 +7376,9 @@
7118
7376
  boundary.rootSegmentID
7119
7377
  ),
7120
7378
  hoistableState &&
7121
- ((errorStack = boundary.fallbackState),
7122
- errorStack.styles.forEach(
7123
- hoistStyleQueueDependency,
7124
- hoistableState
7125
- ),
7126
- errorStack.stylesheets.forEach(
7379
+ ((boundary = boundary.fallbackState),
7380
+ boundary.styles.forEach(hoistStyleQueueDependency, hoistableState),
7381
+ boundary.stylesheets.forEach(
7127
7382
  hoistStylesheetDependency,
7128
7383
  hoistableState
7129
7384
  )),
@@ -7150,6 +7405,11 @@
7150
7405
  ((segment = boundary.contentState),
7151
7406
  segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
7152
7407
  segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
7408
+ segment = boundary.row;
7409
+ null !== segment &&
7410
+ 500 < boundary.byteSize &&
7411
+ 0 === --segment.pendingTasks &&
7412
+ finishSuspenseListRow(request, segment);
7153
7413
  request.renderState.generateStaticMarkup ||
7154
7414
  destination.push(startCompletedSuspenseBoundary);
7155
7415
  segment = boundary.completedSegments;
@@ -7192,6 +7452,11 @@
7192
7452
  completedSegments[i]
7193
7453
  );
7194
7454
  completedSegments.length = 0;
7455
+ completedSegments = boundary.row;
7456
+ null !== completedSegments &&
7457
+ 500 < boundary.byteSize &&
7458
+ 0 === --completedSegments.pendingTasks &&
7459
+ finishSuspenseListRow(request, completedSegments);
7195
7460
  writeHoistablesForBoundary(
7196
7461
  destination,
7197
7462
  boundary.contentState,
@@ -9150,6 +9415,7 @@
9150
9415
  PENDING = 0,
9151
9416
  COMPLETED = 1,
9152
9417
  FLUSHED = 2,
9418
+ ABORTED = 3,
9153
9419
  POSTPONED = 5,
9154
9420
  CLOSED = 14,
9155
9421
  currentRequest = null,
@@ -9177,5 +9443,5 @@
9177
9443
  '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'
9178
9444
  );
9179
9445
  };
9180
- exports.version = "19.2.0-canary-462d08f9-20250517";
9446
+ exports.version = "19.2.0-canary-c4676e72-20250520";
9181
9447
  })();