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.
@@ -29,8 +29,15 @@ var React = require("react"),
29
29
  REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
30
30
  REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
31
31
  REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"),
32
- MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
33
- isArrayImpl = Array.isArray,
32
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
33
+ function getIteratorFn(maybeIterable) {
34
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
35
+ maybeIterable =
36
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
37
+ maybeIterable["@@iterator"];
38
+ return "function" === typeof maybeIterable ? maybeIterable : null;
39
+ }
40
+ var isArrayImpl = Array.isArray,
34
41
  scheduleMicrotask = queueMicrotask;
35
42
  function flushBuffered(destination) {
36
43
  "function" === typeof destination.flush && destination.flush();
@@ -561,6 +568,9 @@ function pushTextInstance(target, text, renderState, textEmbedded) {
561
568
  target.push(escapeTextForBrowser(text));
562
569
  return !0;
563
570
  }
571
+ function pushSegmentFinale(target, renderState, lastPushedText, textEmbedded) {
572
+ lastPushedText && textEmbedded && target.push("\x3c!-- --\x3e");
573
+ }
564
574
  var styleNameCache = new Map();
565
575
  function pushStyleAttribute(target, style) {
566
576
  if ("object" !== typeof style)
@@ -3718,6 +3728,7 @@ function createRequest(
3718
3728
  rootFormatContext,
3719
3729
  null,
3720
3730
  emptyTreeContext,
3731
+ null,
3721
3732
  null
3722
3733
  );
3723
3734
  pushComponentStack(children);
@@ -3739,15 +3750,17 @@ function pingTask(request, task) {
3739
3750
  }
3740
3751
  function createSuspenseBoundary(
3741
3752
  request,
3753
+ row,
3742
3754
  fallbackAbortableTasks,
3743
3755
  contentPreamble,
3744
3756
  fallbackPreamble
3745
3757
  ) {
3746
- return {
3758
+ fallbackAbortableTasks = {
3747
3759
  status: 0,
3748
3760
  rootSegmentID: -1,
3749
3761
  parentFlushed: !1,
3750
3762
  pendingTasks: 0,
3763
+ row: row,
3751
3764
  completedSegments: [],
3752
3765
  byteSize: 0,
3753
3766
  fallbackAbortableTasks: fallbackAbortableTasks,
@@ -3759,6 +3772,14 @@ function createSuspenseBoundary(
3759
3772
  trackedContentKeyPath: null,
3760
3773
  trackedFallbackNode: null
3761
3774
  };
3775
+ null !== row &&
3776
+ (row.pendingTasks++,
3777
+ (row = row.boundaries),
3778
+ null !== row &&
3779
+ (request.allPendingTasks++,
3780
+ fallbackAbortableTasks.pendingTasks++,
3781
+ row.push(fallbackAbortableTasks)));
3782
+ return fallbackAbortableTasks;
3762
3783
  }
3763
3784
  function createRenderTask(
3764
3785
  request,
@@ -3774,12 +3795,14 @@ function createRenderTask(
3774
3795
  formatContext,
3775
3796
  context,
3776
3797
  treeContext,
3798
+ row,
3777
3799
  componentStack
3778
3800
  ) {
3779
3801
  request.allPendingTasks++;
3780
3802
  null === blockedBoundary
3781
3803
  ? request.pendingRootTasks++
3782
3804
  : blockedBoundary.pendingTasks++;
3805
+ null !== row && row.pendingTasks++;
3783
3806
  var task = {
3784
3807
  replay: null,
3785
3808
  node: node,
@@ -3796,6 +3819,7 @@ function createRenderTask(
3796
3819
  formatContext: formatContext,
3797
3820
  context: context,
3798
3821
  treeContext: treeContext,
3822
+ row: row,
3799
3823
  componentStack: componentStack,
3800
3824
  thenableState: thenableState
3801
3825
  };
@@ -3815,12 +3839,14 @@ function createReplayTask(
3815
3839
  formatContext,
3816
3840
  context,
3817
3841
  treeContext,
3842
+ row,
3818
3843
  componentStack
3819
3844
  ) {
3820
3845
  request.allPendingTasks++;
3821
3846
  null === blockedBoundary
3822
3847
  ? request.pendingRootTasks++
3823
3848
  : blockedBoundary.pendingTasks++;
3849
+ null !== row && row.pendingTasks++;
3824
3850
  replay.pendingTasks++;
3825
3851
  var task = {
3826
3852
  replay: replay,
@@ -3838,6 +3864,7 @@ function createReplayTask(
3838
3864
  formatContext: formatContext,
3839
3865
  context: context,
3840
3866
  treeContext: treeContext,
3867
+ row: row,
3841
3868
  componentStack: componentStack,
3842
3869
  thenableState: thenableState
3843
3870
  };
@@ -3915,6 +3942,132 @@ function fatalError(request, error) {
3915
3942
  ? ((request.status = 14), closeWithError(request.destination, error))
3916
3943
  : ((request.status = 13), (request.fatalError = error));
3917
3944
  }
3945
+ function finishSuspenseListRow(request, row) {
3946
+ for (row = row.next; null !== row; ) {
3947
+ var unblockedBoundaries = row.boundaries;
3948
+ if (null !== unblockedBoundaries) {
3949
+ row.boundaries = null;
3950
+ for (var i = 0; i < unblockedBoundaries.length; i++)
3951
+ finishedTask(request, unblockedBoundaries[i], null, null);
3952
+ }
3953
+ row.pendingTasks--;
3954
+ if (0 < row.pendingTasks) break;
3955
+ row = row.next;
3956
+ }
3957
+ }
3958
+ function createSuspenseListRow(previousRow) {
3959
+ var newRow = { pendingTasks: 1, boundaries: null, next: null };
3960
+ null !== previousRow &&
3961
+ 0 < previousRow.pendingTasks &&
3962
+ (newRow.pendingTasks++,
3963
+ (newRow.boundaries = []),
3964
+ (previousRow.next = newRow));
3965
+ return newRow;
3966
+ }
3967
+ function renderSuspenseListRows(request, task, keyPath, rows, revealOrder) {
3968
+ keyPath = task.keyPath;
3969
+ var prevTreeContext = task.treeContext,
3970
+ prevRow = task.row,
3971
+ totalChildren = rows.length,
3972
+ previousSuspenseListRow = null;
3973
+ if (null !== task.replay) {
3974
+ var resumeSlots = task.replay.slots;
3975
+ if (null !== resumeSlots && "object" === typeof resumeSlots)
3976
+ for (var n = 0; n < totalChildren; n++) {
3977
+ var i = "backwards" !== revealOrder ? n : totalChildren - 1 - n,
3978
+ node = rows[i];
3979
+ task.row = previousSuspenseListRow = createSuspenseListRow(
3980
+ previousSuspenseListRow
3981
+ );
3982
+ task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
3983
+ var resumeSegmentID = resumeSlots[i];
3984
+ "number" === typeof resumeSegmentID
3985
+ ? (resumeNode(request, task, resumeSegmentID, node, i),
3986
+ delete resumeSlots[i])
3987
+ : renderNode(request, task, node, i);
3988
+ 0 === --previousSuspenseListRow.pendingTasks &&
3989
+ finishSuspenseListRow(request, previousSuspenseListRow);
3990
+ }
3991
+ else
3992
+ for (resumeSlots = 0; resumeSlots < totalChildren; resumeSlots++)
3993
+ (n =
3994
+ "backwards" !== revealOrder
3995
+ ? resumeSlots
3996
+ : totalChildren - 1 - resumeSlots),
3997
+ (i = rows[n]),
3998
+ (task.row = previousSuspenseListRow =
3999
+ createSuspenseListRow(previousSuspenseListRow)),
4000
+ (task.treeContext = pushTreeContext(
4001
+ prevTreeContext,
4002
+ totalChildren,
4003
+ n
4004
+ )),
4005
+ renderNode(request, task, i, n),
4006
+ 0 === --previousSuspenseListRow.pendingTasks &&
4007
+ finishSuspenseListRow(request, previousSuspenseListRow);
4008
+ } else if ("backwards" !== revealOrder)
4009
+ for (revealOrder = 0; revealOrder < totalChildren; revealOrder++)
4010
+ (resumeSlots = rows[revealOrder]),
4011
+ (task.row = previousSuspenseListRow =
4012
+ createSuspenseListRow(previousSuspenseListRow)),
4013
+ (task.treeContext = pushTreeContext(
4014
+ prevTreeContext,
4015
+ totalChildren,
4016
+ revealOrder
4017
+ )),
4018
+ renderNode(request, task, resumeSlots, revealOrder),
4019
+ 0 === --previousSuspenseListRow.pendingTasks &&
4020
+ finishSuspenseListRow(request, previousSuspenseListRow);
4021
+ else {
4022
+ revealOrder = task.blockedSegment;
4023
+ resumeSlots = revealOrder.children.length;
4024
+ n = revealOrder.chunks.length;
4025
+ for (i = totalChildren - 1; 0 <= i; i--) {
4026
+ node = rows[i];
4027
+ task.row = previousSuspenseListRow = createSuspenseListRow(
4028
+ previousSuspenseListRow
4029
+ );
4030
+ task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
4031
+ resumeSegmentID = createPendingSegment(
4032
+ request,
4033
+ n,
4034
+ null,
4035
+ task.formatContext,
4036
+ 0 === i ? revealOrder.lastPushedText : !0,
4037
+ !0
4038
+ );
4039
+ revealOrder.children.splice(resumeSlots, 0, resumeSegmentID);
4040
+ task.blockedSegment = resumeSegmentID;
4041
+ try {
4042
+ renderNode(request, task, node, i),
4043
+ pushSegmentFinale(
4044
+ resumeSegmentID.chunks,
4045
+ request.renderState,
4046
+ resumeSegmentID.lastPushedText,
4047
+ resumeSegmentID.textEmbedded
4048
+ ),
4049
+ (resumeSegmentID.status = 1),
4050
+ finishedSegment(request, task.blockedBoundary, resumeSegmentID),
4051
+ 0 === --previousSuspenseListRow.pendingTasks &&
4052
+ finishSuspenseListRow(request, previousSuspenseListRow);
4053
+ } catch (thrownValue) {
4054
+ throw (
4055
+ ((resumeSegmentID.status = 12 === request.status ? 3 : 4),
4056
+ thrownValue)
4057
+ );
4058
+ }
4059
+ }
4060
+ task.blockedSegment = revealOrder;
4061
+ revealOrder.lastPushedText = !1;
4062
+ }
4063
+ null !== prevRow &&
4064
+ null !== previousSuspenseListRow &&
4065
+ 0 < previousSuspenseListRow.pendingTasks &&
4066
+ (prevRow.pendingTasks++, (previousSuspenseListRow.next = prevRow));
4067
+ task.treeContext = prevTreeContext;
4068
+ task.row = prevRow;
4069
+ task.keyPath = keyPath;
4070
+ }
3918
4071
  function renderWithHooks(request, task, keyPath, Component, props, secondArg) {
3919
4072
  var prevThenableState = task.thenableState;
3920
4073
  task.thenableState = null;
@@ -3982,9 +4135,9 @@ function renderElement(request, task, keyPath, type, props, ref) {
3982
4135
  var defaultProps = type.defaultProps;
3983
4136
  if (defaultProps) {
3984
4137
  newProps === props && (newProps = assign({}, newProps, props));
3985
- for (var propName$34 in defaultProps)
3986
- void 0 === newProps[propName$34] &&
3987
- (newProps[propName$34] = defaultProps[propName$34]);
4138
+ for (var propName$42 in defaultProps)
4139
+ void 0 === newProps[propName$42] &&
4140
+ (newProps[propName$42] = defaultProps[propName$42]);
3988
4141
  }
3989
4142
  props = newProps;
3990
4143
  newProps = emptyContextObject;
@@ -4044,16 +4197,16 @@ function renderElement(request, task, keyPath, type, props, ref) {
4044
4197
  defaultProps = ref ? type[0] : newProps.state;
4045
4198
  initialState = !0;
4046
4199
  for (ref = ref ? 1 : 0; ref < type.length; ref++)
4047
- (propName$34 = type[ref]),
4048
- (propName$34 =
4049
- "function" === typeof propName$34
4050
- ? propName$34.call(newProps, defaultProps, props, void 0)
4051
- : propName$34),
4052
- null != propName$34 &&
4200
+ (propName$42 = type[ref]),
4201
+ (propName$42 =
4202
+ "function" === typeof propName$42
4203
+ ? propName$42.call(newProps, defaultProps, props, void 0)
4204
+ : propName$42),
4205
+ null != propName$42 &&
4053
4206
  (initialState
4054
4207
  ? ((initialState = !1),
4055
- (defaultProps = assign({}, defaultProps, propName$34)))
4056
- : assign(defaultProps, propName$34));
4208
+ (defaultProps = assign({}, defaultProps, propName$42)))
4209
+ : assign(defaultProps, propName$42));
4057
4210
  newProps.state = defaultProps;
4058
4211
  }
4059
4212
  else defaultProps.queue = null;
@@ -4128,6 +4281,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4128
4281
  task.formatContext,
4129
4282
  task.context,
4130
4283
  task.treeContext,
4284
+ task.row,
4131
4285
  task.componentStack
4132
4286
  )),
4133
4287
  pushComponentStack(keyPath),
@@ -4207,10 +4361,30 @@ function renderElement(request, task, keyPath, type, props, ref) {
4207
4361
  (type.lastPushedText = !1));
4208
4362
  return;
4209
4363
  case REACT_SUSPENSE_LIST_TYPE:
4210
- type = task.keyPath;
4211
- task.keyPath = keyPath;
4212
- renderNodeDestructive(request, task, props.children, -1);
4213
- task.keyPath = type;
4364
+ a: {
4365
+ type = props.children;
4366
+ props = props.revealOrder;
4367
+ if ("forwards" === props || "backwards" === props) {
4368
+ if (isArrayImpl(type)) {
4369
+ renderSuspenseListRows(request, task, keyPath, type, props);
4370
+ break a;
4371
+ }
4372
+ if ((newProps = getIteratorFn(type)))
4373
+ if ((newProps = newProps.call(type))) {
4374
+ defaultProps = newProps.next();
4375
+ if (!defaultProps.done) {
4376
+ do defaultProps = newProps.next();
4377
+ while (!defaultProps.done);
4378
+ renderSuspenseListRows(request, task, keyPath, type, props);
4379
+ }
4380
+ break a;
4381
+ }
4382
+ }
4383
+ props = task.keyPath;
4384
+ task.keyPath = keyPath;
4385
+ renderNodeDestructive(request, task, type, -1);
4386
+ task.keyPath = props;
4387
+ }
4214
4388
  return;
4215
4389
  case REACT_VIEW_TRANSITION_TYPE:
4216
4390
  case REACT_SCOPE_TYPE:
@@ -4219,21 +4393,26 @@ function renderElement(request, task, keyPath, type, props, ref) {
4219
4393
  a: if (null !== task.replay) {
4220
4394
  type = task.keyPath;
4221
4395
  newProps = task.formatContext;
4396
+ defaultProps = task.row;
4222
4397
  task.keyPath = keyPath;
4223
4398
  task.formatContext = getSuspenseContentFormatContext(
4224
4399
  request.resumableState,
4225
4400
  newProps
4226
4401
  );
4402
+ task.row = null;
4227
4403
  keyPath = props.children;
4228
4404
  try {
4229
4405
  renderNode(request, task, keyPath, -1);
4230
4406
  } finally {
4231
- (task.keyPath = type), (task.formatContext = newProps);
4407
+ (task.keyPath = type),
4408
+ (task.formatContext = newProps),
4409
+ (task.row = defaultProps);
4232
4410
  }
4233
4411
  } else {
4234
4412
  type = task.keyPath;
4235
4413
  ref = task.formatContext;
4236
- propName$34 = task.blockedBoundary;
4414
+ var prevRow = task.row;
4415
+ propName$42 = task.blockedBoundary;
4237
4416
  propName = task.blockedPreamble;
4238
4417
  var parentHoistableState = task.hoistableState,
4239
4418
  parentSegment = task.blockedSegment,
@@ -4244,11 +4423,18 @@ function renderElement(request, task, keyPath, type, props, ref) {
4244
4423
  2 > task.formatContext.insertionMode
4245
4424
  ? createSuspenseBoundary(
4246
4425
  request,
4426
+ task.row,
4247
4427
  fallbackAbortSet,
4248
4428
  createPreambleState(),
4249
4429
  createPreambleState()
4250
4430
  )
4251
- : createSuspenseBoundary(request, fallbackAbortSet, null, null);
4431
+ : createSuspenseBoundary(
4432
+ request,
4433
+ task.row,
4434
+ fallbackAbortSet,
4435
+ null,
4436
+ null
4437
+ );
4252
4438
  null !== request.trackedPostpones &&
4253
4439
  (newBoundary.trackedContentKeyPath = keyPath);
4254
4440
  var boundarySegment = createPendingSegment(
@@ -4285,11 +4471,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
4285
4471
  boundarySegment.status = 6;
4286
4472
  try {
4287
4473
  renderNode(request, task, fallback, -1),
4288
- boundarySegment.lastPushedText &&
4289
- boundarySegment.textEmbedded &&
4290
- boundarySegment.chunks.push("\x3c!-- --\x3e"),
4474
+ pushSegmentFinale(
4475
+ boundarySegment.chunks,
4476
+ request.renderState,
4477
+ boundarySegment.lastPushedText,
4478
+ boundarySegment.textEmbedded
4479
+ ),
4291
4480
  (boundarySegment.status = 1),
4292
- finishedSegment(request, propName$34, boundarySegment);
4481
+ finishedSegment(request, propName$42, boundarySegment);
4293
4482
  } catch (thrownValue) {
4294
4483
  throw (
4295
4484
  ((boundarySegment.status = 12 === request.status ? 3 : 4),
@@ -4318,6 +4507,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4318
4507
  ),
4319
4508
  task.context,
4320
4509
  task.treeContext,
4510
+ null,
4321
4511
  task.componentStack
4322
4512
  );
4323
4513
  pushComponentStack(task);
@@ -4332,13 +4522,17 @@ function renderElement(request, task, keyPath, type, props, ref) {
4332
4522
  request.resumableState,
4333
4523
  ref
4334
4524
  );
4525
+ task.row = null;
4335
4526
  contentRootSegment.status = 6;
4336
4527
  try {
4337
4528
  if (
4338
4529
  (renderNode(request, task, props, -1),
4339
- contentRootSegment.lastPushedText &&
4340
- contentRootSegment.textEmbedded &&
4341
- contentRootSegment.chunks.push("\x3c!-- --\x3e"),
4530
+ pushSegmentFinale(
4531
+ contentRootSegment.chunks,
4532
+ request.renderState,
4533
+ contentRootSegment.lastPushedText,
4534
+ contentRootSegment.textEmbedded
4535
+ ),
4342
4536
  (contentRootSegment.status = 1),
4343
4537
  finishedSegment(request, newBoundary, contentRootSegment),
4344
4538
  queueCompletedSegment(newBoundary, contentRootSegment),
@@ -4346,18 +4540,21 @@ function renderElement(request, task, keyPath, type, props, ref) {
4346
4540
  0 === newBoundary.status &&
4347
4541
  ((newBoundary.status = 1), !(500 < newBoundary.byteSize)))
4348
4542
  ) {
4543
+ null !== prevRow &&
4544
+ 0 === --prevRow.pendingTasks &&
4545
+ finishSuspenseListRow(request, prevRow);
4349
4546
  0 === request.pendingRootTasks &&
4350
4547
  task.blockedPreamble &&
4351
4548
  preparePreamble(request);
4352
4549
  break a;
4353
4550
  }
4354
- } catch (thrownValue$29) {
4551
+ } catch (thrownValue$30) {
4355
4552
  (newBoundary.status = 4),
4356
4553
  12 === request.status
4357
4554
  ? ((contentRootSegment.status = 3),
4358
4555
  (newProps = request.fatalError))
4359
4556
  : ((contentRootSegment.status = 4),
4360
- (newProps = thrownValue$29)),
4557
+ (newProps = thrownValue$30)),
4361
4558
  (defaultProps = getThrownInfo(task.componentStack)),
4362
4559
  (initialState = logRecoverableError(
4363
4560
  request,
@@ -4367,19 +4564,20 @@ function renderElement(request, task, keyPath, type, props, ref) {
4367
4564
  (newBoundary.errorDigest = initialState),
4368
4565
  untrackBoundary(request, newBoundary);
4369
4566
  } finally {
4370
- (task.blockedBoundary = propName$34),
4567
+ (task.blockedBoundary = propName$42),
4371
4568
  (task.blockedPreamble = propName),
4372
4569
  (task.hoistableState = parentHoistableState),
4373
4570
  (task.blockedSegment = parentSegment),
4374
4571
  (task.keyPath = type),
4375
- (task.formatContext = ref);
4572
+ (task.formatContext = ref),
4573
+ (task.row = prevRow);
4376
4574
  }
4377
4575
  task = createRenderTask(
4378
4576
  request,
4379
4577
  null,
4380
4578
  fallback,
4381
4579
  -1,
4382
- propName$34,
4580
+ propName$42,
4383
4581
  boundarySegment,
4384
4582
  newBoundary.fallbackPreamble,
4385
4583
  newBoundary.fallbackState,
@@ -4391,6 +4589,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
4391
4589
  ),
4392
4590
  task.context,
4393
4591
  task.treeContext,
4592
+ task.row,
4394
4593
  task.componentStack
4395
4594
  );
4396
4595
  pushComponentStack(task);
@@ -4610,6 +4809,7 @@ function retryNode(request, task) {
4610
4809
  null === node$jscomp$0[4] ? null : node$jscomp$0[4][3];
4611
4810
  var prevKeyPath = task.keyPath,
4612
4811
  prevContext = task.formatContext,
4812
+ prevRow = task.row,
4613
4813
  previousReplaySet = task.replay,
4614
4814
  parentBoundary = task.blockedBoundary,
4615
4815
  parentHoistableState = task.hoistableState,
@@ -4620,12 +4820,14 @@ function retryNode(request, task) {
4620
4820
  2 > task.formatContext.insertionMode
4621
4821
  ? createSuspenseBoundary(
4622
4822
  request,
4823
+ task.row,
4623
4824
  fallbackAbortSet,
4624
4825
  createPreambleState(),
4625
4826
  createPreambleState()
4626
4827
  )
4627
4828
  : createSuspenseBoundary(
4628
4829
  request,
4830
+ task.row,
4629
4831
  fallbackAbortSet,
4630
4832
  null,
4631
4833
  null
@@ -4639,6 +4841,7 @@ function retryNode(request, task) {
4639
4841
  request.resumableState,
4640
4842
  prevContext
4641
4843
  );
4844
+ task.row = null;
4642
4845
  task.replay = {
4643
4846
  nodes: ref,
4644
4847
  slots: name,
@@ -4675,9 +4878,10 @@ function retryNode(request, task) {
4675
4878
  (task.hoistableState = parentHoistableState),
4676
4879
  (task.replay = previousReplaySet),
4677
4880
  (task.keyPath = prevKeyPath),
4678
- (task.formatContext = prevContext);
4881
+ (task.formatContext = prevContext),
4882
+ (task.row = prevRow);
4679
4883
  }
4680
- task = createReplayTask(
4884
+ childNodes = createReplayTask(
4681
4885
  request,
4682
4886
  null,
4683
4887
  {
@@ -4697,10 +4901,11 @@ function retryNode(request, task) {
4697
4901
  ),
4698
4902
  task.context,
4699
4903
  task.treeContext,
4904
+ task.row,
4700
4905
  task.componentStack
4701
4906
  );
4702
- pushComponentStack(task);
4703
- request.pingedTasks.push(task);
4907
+ pushComponentStack(childNodes);
4908
+ request.pingedTasks.push(childNodes);
4704
4909
  }
4705
4910
  }
4706
4911
  childIndex.splice(node, 1);
@@ -4725,22 +4930,17 @@ function retryNode(request, task) {
4725
4930
  renderChildrenArray(request, task, node, childIndex);
4726
4931
  return;
4727
4932
  }
4728
- null === node || "object" !== typeof node
4729
- ? (childNodes = null)
4730
- : ((childNodes =
4731
- (MAYBE_ITERATOR_SYMBOL && node[MAYBE_ITERATOR_SYMBOL]) ||
4732
- node["@@iterator"]),
4733
- (childNodes = "function" === typeof childNodes ? childNodes : null));
4734
- if (childNodes && (childNodes = childNodes.call(node))) {
4735
- node = childNodes.next();
4736
- if (!node.done) {
4737
- props = [];
4738
- do props.push(node.value), (node = childNodes.next());
4739
- while (!node.done);
4740
- renderChildrenArray(request, task, props, childIndex);
4933
+ if ((childNodes = getIteratorFn(node)))
4934
+ if ((childNodes = childNodes.call(node))) {
4935
+ node = childNodes.next();
4936
+ if (!node.done) {
4937
+ props = [];
4938
+ do props.push(node.value), (node = childNodes.next());
4939
+ while (!node.done);
4940
+ renderChildrenArray(request, task, props, childIndex);
4941
+ }
4942
+ return;
4741
4943
  }
4742
- return;
4743
- }
4744
4944
  if ("function" === typeof node.then)
4745
4945
  return (
4746
4946
  (task.thenableState = null),
@@ -4883,6 +5083,7 @@ function spawnNewSuspendedReplayTask(request, task, thenableState) {
4883
5083
  task.formatContext,
4884
5084
  task.context,
4885
5085
  task.treeContext,
5086
+ task.row,
4886
5087
  task.componentStack
4887
5088
  );
4888
5089
  }
@@ -4912,6 +5113,7 @@ function spawnNewSuspendedRenderTask(request, task, thenableState) {
4912
5113
  task.formatContext,
4913
5114
  task.context,
4914
5115
  task.treeContext,
5116
+ task.row,
4915
5117
  task.componentStack
4916
5118
  );
4917
5119
  }
@@ -4965,15 +5167,15 @@ function renderNode(request, task, node, childIndex) {
4965
5167
  chunkLength = segment.chunks.length;
4966
5168
  try {
4967
5169
  return renderNodeDestructive(request, task, node, childIndex);
4968
- } catch (thrownValue$51) {
5170
+ } catch (thrownValue$58) {
4969
5171
  if (
4970
5172
  (resetHooksState(),
4971
5173
  (segment.children.length = childrenLength),
4972
5174
  (segment.chunks.length = chunkLength),
4973
5175
  (node =
4974
- thrownValue$51 === SuspenseException
5176
+ thrownValue$58 === SuspenseException
4975
5177
  ? getSuspendedThenable()
4976
- : thrownValue$51),
5178
+ : thrownValue$58),
4977
5179
  "object" === typeof node && null !== node)
4978
5180
  ) {
4979
5181
  if ("function" === typeof node.then) {
@@ -5011,9 +5213,10 @@ function renderNode(request, task, node, childIndex) {
5011
5213
  throw node;
5012
5214
  }
5013
5215
  function abortTaskSoft(task) {
5014
- var boundary = task.blockedBoundary;
5015
- task = task.blockedSegment;
5016
- null !== task && ((task.status = 3), finishedTask(this, boundary, task));
5216
+ var boundary = task.blockedBoundary,
5217
+ segment = task.blockedSegment;
5218
+ null !== segment &&
5219
+ ((segment.status = 3), finishedTask(this, boundary, task.row, segment));
5017
5220
  }
5018
5221
  function abortRemainingReplayNodes(
5019
5222
  request$jscomp$0,
@@ -5040,6 +5243,7 @@ function abortRemainingReplayNodes(
5040
5243
  errorDigest = errorDigest$jscomp$0,
5041
5244
  resumedBoundary = createSuspenseBoundary(
5042
5245
  request,
5246
+ null,
5043
5247
  new Set(),
5044
5248
  null,
5045
5249
  null
@@ -5073,6 +5277,10 @@ function abortTask(task, request, error) {
5073
5277
  if (6 === segment.status) return;
5074
5278
  segment.status = 3;
5075
5279
  }
5280
+ segment = task.row;
5281
+ null !== segment &&
5282
+ 0 === --segment.pendingTasks &&
5283
+ finishSuspenseListRow(request, segment);
5076
5284
  segment = getThrownInfo(task.componentStack);
5077
5285
  if (null === boundary) {
5078
5286
  if (13 !== request.status && 14 !== request.status) {
@@ -5217,7 +5425,10 @@ function finishedSegment(request, boundary, segment) {
5217
5425
  : (boundary.byteSize += segmentByteSize);
5218
5426
  }
5219
5427
  }
5220
- function finishedTask(request, boundary, segment) {
5428
+ function finishedTask(request, boundary, row, segment) {
5429
+ null !== row &&
5430
+ 0 === --row.pendingTasks &&
5431
+ finishSuspenseListRow(request, row);
5221
5432
  request.allPendingTasks--;
5222
5433
  if (null === boundary) {
5223
5434
  if (null !== segment && segment.parentFlushed) {
@@ -5246,7 +5457,11 @@ function finishedTask(request, boundary, segment) {
5246
5457
  abortTaskSoft,
5247
5458
  request
5248
5459
  ),
5249
- boundary.fallbackAbortableTasks.clear()),
5460
+ boundary.fallbackAbortableTasks.clear(),
5461
+ (row = boundary.row),
5462
+ null !== row &&
5463
+ 0 === --row.pendingTasks &&
5464
+ finishSuspenseListRow(request, row)),
5250
5465
  0 === request.pendingRootTasks &&
5251
5466
  null === request.trackedPostpones &&
5252
5467
  null !== boundary.contentPreamble &&
@@ -5301,7 +5516,12 @@ function performWork(request$jscomp$2) {
5301
5516
  );
5302
5517
  task.replay.pendingTasks--;
5303
5518
  task.abortSet.delete(task);
5304
- finishedTask(request$jscomp$0, task.blockedBoundary, null);
5519
+ finishedTask(
5520
+ request$jscomp$0,
5521
+ task.blockedBoundary,
5522
+ task.row,
5523
+ null
5524
+ );
5305
5525
  } catch (thrownValue) {
5306
5526
  resetHooksState();
5307
5527
  var x =
@@ -5363,13 +5583,21 @@ function performWork(request$jscomp$2) {
5363
5583
  chunkLength = request$jscomp$1.chunks.length;
5364
5584
  try {
5365
5585
  retryNode(request, task),
5366
- request$jscomp$1.lastPushedText &&
5367
- request$jscomp$1.textEmbedded &&
5368
- request$jscomp$1.chunks.push("\x3c!-- --\x3e"),
5586
+ pushSegmentFinale(
5587
+ request$jscomp$1.chunks,
5588
+ request.renderState,
5589
+ request$jscomp$1.lastPushedText,
5590
+ request$jscomp$1.textEmbedded
5591
+ ),
5369
5592
  task.abortSet.delete(task),
5370
5593
  (request$jscomp$1.status = 1),
5371
5594
  finishedSegment(request, task.blockedBoundary, request$jscomp$1),
5372
- finishedTask(request, task.blockedBoundary, request$jscomp$1);
5595
+ finishedTask(
5596
+ request,
5597
+ task.blockedBoundary,
5598
+ task.row,
5599
+ request$jscomp$1
5600
+ );
5373
5601
  } catch (thrownValue) {
5374
5602
  resetHooksState();
5375
5603
  request$jscomp$1.children.length = childrenLength;
@@ -5393,7 +5621,12 @@ function performWork(request$jscomp$2) {
5393
5621
  var errorInfo$jscomp$0 = getThrownInfo(task.componentStack);
5394
5622
  task.abortSet.delete(task);
5395
5623
  request$jscomp$1.status = 4;
5396
- var boundary$jscomp$0 = task.blockedBoundary;
5624
+ var boundary$jscomp$0 = task.blockedBoundary,
5625
+ row = task.row;
5626
+ null !== row &&
5627
+ 0 === --row.pendingTasks &&
5628
+ finishSuspenseListRow(request, row);
5629
+ request.allPendingTasks--;
5397
5630
  request$jscomp$0 = logRecoverableError(
5398
5631
  request,
5399
5632
  x$jscomp$0,
@@ -5412,7 +5645,6 @@ function performWork(request$jscomp$2) {
5412
5645
  null === request.trackedPostpones &&
5413
5646
  null !== boundary$jscomp$0.contentPreamble &&
5414
5647
  preparePreamble(request)));
5415
- request.allPendingTasks--;
5416
5648
  0 === request.allPendingTasks && completeAll(request);
5417
5649
  }
5418
5650
  } finally {
@@ -5557,17 +5789,21 @@ function flushSegment(request, destination, segment, hoistableState) {
5557
5789
  if (null === boundary)
5558
5790
  return flushSubtree(request, destination, segment, hoistableState);
5559
5791
  boundary.parentFlushed = !0;
5560
- if (4 === boundary.status)
5561
- (boundary = boundary.errorDigest),
5562
- destination.write("\x3c!--$!--\x3e"),
5563
- writeChunk(destination, "<template"),
5564
- boundary &&
5565
- (writeChunk(destination, ' data-dgst="'),
5566
- writeChunk(destination, escapeTextForBrowser(boundary)),
5567
- writeChunk(destination, '"')),
5568
- destination.write("></template>"),
5569
- flushSubtree(request, destination, segment, hoistableState);
5570
- else if (1 !== boundary.status)
5792
+ if (4 === boundary.status) {
5793
+ var row = boundary.row;
5794
+ null !== row &&
5795
+ 0 === --row.pendingTasks &&
5796
+ finishSuspenseListRow(request, row);
5797
+ boundary = boundary.errorDigest;
5798
+ destination.write("\x3c!--$!--\x3e");
5799
+ writeChunk(destination, "<template");
5800
+ boundary &&
5801
+ (writeChunk(destination, ' data-dgst="'),
5802
+ writeChunk(destination, escapeTextForBrowser(boundary)),
5803
+ writeChunk(destination, '"'));
5804
+ destination.write("></template>");
5805
+ flushSubtree(request, destination, segment, hoistableState);
5806
+ } else if (1 !== boundary.status)
5571
5807
  0 === boundary.status && (boundary.rootSegmentID = request.nextSegmentId++),
5572
5808
  0 < boundary.completedSegments.length &&
5573
5809
  request.partialBoundaries.push(boundary),
@@ -5602,6 +5838,11 @@ function flushSegment(request, destination, segment, hoistableState) {
5602
5838
  ((segment = boundary.contentState),
5603
5839
  segment.styles.forEach(hoistStyleQueueDependency, hoistableState),
5604
5840
  segment.stylesheets.forEach(hoistStylesheetDependency, hoistableState));
5841
+ segment = boundary.row;
5842
+ null !== segment &&
5843
+ 500 < boundary.byteSize &&
5844
+ 0 === --segment.pendingTasks &&
5845
+ finishSuspenseListRow(request, segment);
5605
5846
  destination.write("\x3c!--$--\x3e");
5606
5847
  segment = boundary.completedSegments;
5607
5848
  if (1 !== segment.length)
@@ -5636,6 +5877,11 @@ function flushCompletedBoundary(request, destination, boundary) {
5636
5877
  completedSegments[i]
5637
5878
  );
5638
5879
  completedSegments.length = 0;
5880
+ completedSegments = boundary.row;
5881
+ null !== completedSegments &&
5882
+ 500 < boundary.byteSize &&
5883
+ 0 === --completedSegments.pendingTasks &&
5884
+ finishSuspenseListRow(request, completedSegments);
5639
5885
  writeHoistablesForBoundary(
5640
5886
  destination,
5641
5887
  boundary.contentState,
@@ -5919,12 +6165,12 @@ function flushCompletedQueues(request, destination) {
5919
6165
  completedBoundaries.splice(0, i);
5920
6166
  var partialBoundaries = request.partialBoundaries;
5921
6167
  for (i = 0; i < partialBoundaries.length; i++) {
5922
- var boundary$54 = partialBoundaries[i];
6168
+ var boundary$62 = partialBoundaries[i];
5923
6169
  a: {
5924
6170
  clientRenderedBoundaries = request;
5925
6171
  boundary = destination;
5926
- flushedByteSize = boundary$54.byteSize;
5927
- var completedSegments = boundary$54.completedSegments;
6172
+ flushedByteSize = boundary$62.byteSize;
6173
+ var completedSegments = boundary$62.completedSegments;
5928
6174
  for (
5929
6175
  JSCompiler_inline_result = 0;
5930
6176
  JSCompiler_inline_result < completedSegments.length;
@@ -5934,7 +6180,7 @@ function flushCompletedQueues(request, destination) {
5934
6180
  !flushPartiallyCompletedSegment(
5935
6181
  clientRenderedBoundaries,
5936
6182
  boundary,
5937
- boundary$54,
6183
+ boundary$62,
5938
6184
  completedSegments[JSCompiler_inline_result]
5939
6185
  )
5940
6186
  ) {
@@ -5946,7 +6192,7 @@ function flushCompletedQueues(request, destination) {
5946
6192
  completedSegments.splice(0, JSCompiler_inline_result);
5947
6193
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5948
6194
  boundary,
5949
- boundary$54.contentState,
6195
+ boundary$62.contentState,
5950
6196
  clientRenderedBoundaries.renderState
5951
6197
  );
5952
6198
  }
@@ -6027,19 +6273,19 @@ function abort(request, reason) {
6027
6273
  }
6028
6274
  null !== request.destination &&
6029
6275
  flushCompletedQueues(request, request.destination);
6030
- } catch (error$56) {
6031
- logRecoverableError(request, error$56, {}), fatalError(request, error$56);
6276
+ } catch (error$64) {
6277
+ logRecoverableError(request, error$64, {}), fatalError(request, error$64);
6032
6278
  }
6033
6279
  }
6034
- var isomorphicReactPackageVersion$jscomp$inline_781 = React.version;
6280
+ var isomorphicReactPackageVersion$jscomp$inline_799 = React.version;
6035
6281
  if (
6036
- "19.2.0-canary-462d08f9-20250517" !==
6037
- isomorphicReactPackageVersion$jscomp$inline_781
6282
+ "19.2.0-canary-c4676e72-20250520" !==
6283
+ isomorphicReactPackageVersion$jscomp$inline_799
6038
6284
  )
6039
6285
  throw Error(
6040
6286
  'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
6041
- (isomorphicReactPackageVersion$jscomp$inline_781 +
6042
- "\n - react-dom: 19.2.0-canary-462d08f9-20250517\nLearn more: https://react.dev/warnings/version-mismatch")
6287
+ (isomorphicReactPackageVersion$jscomp$inline_799 +
6288
+ "\n - react-dom: 19.2.0-canary-c4676e72-20250520\nLearn more: https://react.dev/warnings/version-mismatch")
6043
6289
  );
6044
6290
  exports.renderToReadableStream = function (children, options) {
6045
6291
  return new Promise(function (resolve, reject) {
@@ -6130,4 +6376,4 @@ exports.renderToReadableStream = function (children, options) {
6130
6376
  startWork(request);
6131
6377
  });
6132
6378
  };
6133
- exports.version = "19.2.0-canary-462d08f9-20250517";
6379
+ exports.version = "19.2.0-canary-c4676e72-20250520";