react-dom 19.0.0-rc-100dfd7dab-20240701 → 19.0.0-rc-3da26163a3-20240704

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.
@@ -4139,6 +4139,9 @@
4139
4139
  var JSCompiler_inline_result$jscomp$0 =
4140
4140
  describeNativeComponentFrame(componentStack.type, !0);
4141
4141
  info = JSCompiler_temp_const + JSCompiler_inline_result$jscomp$0;
4142
+ break;
4143
+ case 3:
4144
+ info += describeBuiltInComponentFrame(componentStack.type);
4142
4145
  }
4143
4146
  componentStack = componentStack.parent;
4144
4147
  } while (componentStack);
@@ -4224,7 +4227,6 @@
4224
4227
  abortSet,
4225
4228
  null,
4226
4229
  rootFormatContext,
4227
- emptyContextObject,
4228
4230
  null,
4229
4231
  emptyTreeContext,
4230
4232
  null,
@@ -4297,7 +4299,6 @@
4297
4299
  abortSet,
4298
4300
  keyPath,
4299
4301
  formatContext,
4300
- legacyContext,
4301
4302
  context,
4302
4303
  treeContext,
4303
4304
  componentStack,
@@ -4320,7 +4321,6 @@
4320
4321
  abortSet: abortSet,
4321
4322
  keyPath: keyPath,
4322
4323
  formatContext: formatContext,
4323
- legacyContext: legacyContext,
4324
4324
  context: context,
4325
4325
  treeContext: treeContext,
4326
4326
  componentStack: componentStack,
@@ -4341,7 +4341,6 @@
4341
4341
  abortSet,
4342
4342
  keyPath,
4343
4343
  formatContext,
4344
- legacyContext,
4345
4344
  context,
4346
4345
  treeContext,
4347
4346
  componentStack,
@@ -4365,7 +4364,6 @@
4365
4364
  abortSet: abortSet,
4366
4365
  keyPath: keyPath,
4367
4366
  formatContext: formatContext,
4368
- legacyContext: legacyContext,
4369
4367
  context: context,
4370
4368
  treeContext: treeContext,
4371
4369
  componentStack: componentStack,
@@ -4420,8 +4418,39 @@
4420
4418
  stack: stack
4421
4419
  };
4422
4420
  }
4423
- function getThrownInfo(request, node) {
4424
- return node ? { componentStack: getStackByComponentStackNode(node) } : {};
4421
+ function pushServerComponentStack(task, debugInfo) {
4422
+ if (null != debugInfo)
4423
+ for (var i = 0; i < debugInfo.length; i++) {
4424
+ var componentInfo = debugInfo[i];
4425
+ if ("string" === typeof componentInfo.name) {
4426
+ var name = componentInfo.name,
4427
+ env = componentInfo.env;
4428
+ env && (name += " (" + env + ")");
4429
+ task.componentStack = {
4430
+ tag: 3,
4431
+ parent: task.componentStack,
4432
+ type: name,
4433
+ owner: componentInfo.owner,
4434
+ stack: componentInfo.stack
4435
+ };
4436
+ }
4437
+ }
4438
+ }
4439
+ function getThrownInfo(node) {
4440
+ var errorInfo = {};
4441
+ node &&
4442
+ Object.defineProperty(errorInfo, "componentStack", {
4443
+ configurable: !0,
4444
+ enumerable: !0,
4445
+ get: function () {
4446
+ var stack = getStackByComponentStackNode(node);
4447
+ Object.defineProperty(errorInfo, "componentStack", {
4448
+ value: stack
4449
+ });
4450
+ return stack;
4451
+ }
4452
+ });
4453
+ return errorInfo;
4425
4454
  }
4426
4455
  function encodeErrorForBoundary(
4427
4456
  boundary,
@@ -4446,19 +4475,20 @@
4446
4475
  boundary.errorComponentStack = thrownInfo.componentStack;
4447
4476
  }
4448
4477
  function logRecoverableError(request, error$1, errorInfo) {
4449
- request = request.onError(error$1, errorInfo);
4450
- if (null != request && "string" !== typeof request)
4478
+ request = request.onError;
4479
+ error$1 = request(error$1, errorInfo);
4480
+ if (null != error$1 && "string" !== typeof error$1)
4451
4481
  error$jscomp$2(
4452
4482
  'onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "%s" instead',
4453
- typeof request
4483
+ typeof error$1
4454
4484
  );
4455
- else return request;
4485
+ else return error$1;
4456
4486
  }
4457
4487
  function fatalError(request, error) {
4458
- var onShellError = request.onShellError;
4459
- onShellError(error);
4460
- onShellError = request.onFatalError;
4488
+ var onShellError = request.onShellError,
4489
+ onFatalError = request.onFatalError;
4461
4490
  onShellError(error);
4491
+ onFatalError(error);
4462
4492
  null !== request.destination
4463
4493
  ? ((request.status = 2), request.destination.destroy(error))
4464
4494
  : ((request.status = 1), (request.fatalError = error));
@@ -5185,7 +5215,7 @@
5185
5215
  } catch (error$2) {
5186
5216
  contentRootSegment.status = 4;
5187
5217
  newBoundary.status = CLIENT_RENDERED;
5188
- var thrownInfo = getThrownInfo(request, task.componentStack);
5218
+ var thrownInfo = getThrownInfo(task.componentStack);
5189
5219
  var errorDigest = logRecoverableError(
5190
5220
  request,
5191
5221
  error$2,
@@ -5239,7 +5269,6 @@
5239
5269
  fallbackAbortSet,
5240
5270
  fallbackKeyPath,
5241
5271
  task.formatContext,
5242
- task.legacyContext,
5243
5272
  task.context,
5244
5273
  task.treeContext,
5245
5274
  suspenseComponentStack,
@@ -5442,197 +5471,194 @@
5442
5471
  props = node$jscomp$0.props,
5443
5472
  refProp = props.ref;
5444
5473
  var ref = void 0 !== refProp ? refProp : null;
5445
- refProp = node$jscomp$0._owner;
5474
+ var owner = node$jscomp$0._owner;
5475
+ refProp = task.componentStack;
5476
+ pushServerComponentStack(task, node$jscomp$0._debugInfo);
5446
5477
  var name = getComponentNameFromType(type),
5447
5478
  keyOrIndex =
5448
5479
  null == key ? (-1 === childIndex ? 0 : childIndex) : key;
5449
5480
  key = [task.keyPath, name, keyOrIndex];
5450
- if (null !== task.replay)
5451
- a: {
5452
- var replay = task.replay;
5453
- childIndex = replay.nodes;
5454
- for (
5455
- node$jscomp$0 = 0;
5456
- node$jscomp$0 < childIndex.length;
5457
- node$jscomp$0++
5458
- ) {
5459
- var node = childIndex[node$jscomp$0];
5460
- if (keyOrIndex === node[1]) {
5461
- if (4 === node.length) {
5462
- if (null !== name && name !== node[0])
5481
+ if (null !== task.replay) {
5482
+ var replay = task.replay;
5483
+ node$jscomp$0 = replay.nodes;
5484
+ for (
5485
+ childIndex = 0;
5486
+ childIndex < node$jscomp$0.length;
5487
+ childIndex++
5488
+ ) {
5489
+ var node = node$jscomp$0[childIndex];
5490
+ if (keyOrIndex === node[1]) {
5491
+ if (4 === node.length) {
5492
+ if (null !== name && name !== node[0])
5493
+ throw Error(
5494
+ "Expected the resume to render <" +
5495
+ node[0] +
5496
+ "> in this slot but instead it rendered <" +
5497
+ name +
5498
+ ">. The tree doesn't match so React will fallback to client rendering."
5499
+ );
5500
+ var childNodes = node[2];
5501
+ name = node[3];
5502
+ keyOrIndex = task.node;
5503
+ task.replay = {
5504
+ nodes: childNodes,
5505
+ slots: name,
5506
+ pendingTasks: 1
5507
+ };
5508
+ try {
5509
+ renderElement(
5510
+ request,
5511
+ task,
5512
+ key,
5513
+ type,
5514
+ props,
5515
+ ref,
5516
+ owner,
5517
+ null
5518
+ );
5519
+ if (
5520
+ 1 === task.replay.pendingTasks &&
5521
+ 0 < task.replay.nodes.length
5522
+ )
5463
5523
  throw Error(
5464
- "Expected the resume to render <" +
5465
- node[0] +
5466
- "> in this slot but instead it rendered <" +
5467
- name +
5468
- ">. The tree doesn't match so React will fallback to client rendering."
5524
+ "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
5469
5525
  );
5470
- var childNodes = node[2];
5526
+ task.replay.pendingTasks--;
5527
+ } catch (x) {
5528
+ if (
5529
+ "object" === typeof x &&
5530
+ null !== x &&
5531
+ (x === SuspenseException ||
5532
+ "function" === typeof x.then)
5533
+ )
5534
+ throw (
5535
+ (task.node === keyOrIndex && (task.replay = replay),
5536
+ x)
5537
+ );
5538
+ task.replay.pendingTasks--;
5539
+ owner = getThrownInfo(task.componentStack);
5540
+ erroredReplay(
5541
+ request,
5542
+ task.blockedBoundary,
5543
+ x,
5544
+ owner,
5545
+ childNodes,
5546
+ name
5547
+ );
5548
+ }
5549
+ task.replay = replay;
5550
+ } else {
5551
+ if (type !== REACT_SUSPENSE_TYPE)
5552
+ throw Error(
5553
+ "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
5554
+ (getComponentNameFromType(type) || "Unknown") +
5555
+ ">. The tree doesn't match so React will fallback to client rendering."
5556
+ );
5557
+ a: {
5558
+ type = void 0;
5559
+ ref = task;
5560
+ var props$jscomp$0 = props;
5561
+ props = node[5];
5562
+ replay = node[2];
5471
5563
  name = node[3];
5472
- node = task.node;
5473
- task.replay = {
5474
- nodes: childNodes,
5564
+ keyOrIndex = null === node[4] ? [] : node[4][2];
5565
+ node = null === node[4] ? null : node[4][3];
5566
+ var previousComponentStack = ref.componentStack;
5567
+ owner = ref.componentStack =
5568
+ createBuiltInComponentStack(
5569
+ ref,
5570
+ "Suspense",
5571
+ owner,
5572
+ null
5573
+ );
5574
+ var prevKeyPath = ref.keyPath,
5575
+ previousReplaySet = ref.replay,
5576
+ parentBoundary = ref.blockedBoundary,
5577
+ parentHoistableState = ref.hoistableState,
5578
+ content = props$jscomp$0.children;
5579
+ props$jscomp$0 = props$jscomp$0.fallback;
5580
+ var fallbackAbortSet = new Set(),
5581
+ resumedBoundary = createSuspenseBoundary(
5582
+ request,
5583
+ fallbackAbortSet
5584
+ );
5585
+ resumedBoundary.parentFlushed = !0;
5586
+ resumedBoundary.rootSegmentID = props;
5587
+ ref.blockedBoundary = resumedBoundary;
5588
+ ref.hoistableState = resumedBoundary.contentState;
5589
+ ref.replay = {
5590
+ nodes: replay,
5475
5591
  slots: name,
5476
5592
  pendingTasks: 1
5477
5593
  };
5478
5594
  try {
5479
- renderElement(
5480
- request,
5481
- task,
5482
- key,
5483
- type,
5484
- props,
5485
- ref,
5486
- refProp,
5487
- null
5488
- );
5595
+ renderNode(request, ref, content, -1);
5489
5596
  if (
5490
- 1 === task.replay.pendingTasks &&
5491
- 0 < task.replay.nodes.length
5597
+ 1 === ref.replay.pendingTasks &&
5598
+ 0 < ref.replay.nodes.length
5492
5599
  )
5493
5600
  throw Error(
5494
5601
  "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
5495
5602
  );
5496
- task.replay.pendingTasks--;
5497
- } catch (x) {
5603
+ ref.replay.pendingTasks--;
5498
5604
  if (
5499
- "object" === typeof x &&
5500
- null !== x &&
5501
- (x === SuspenseException ||
5502
- "function" === typeof x.then)
5503
- )
5504
- throw (
5505
- (task.node === node && (task.replay = replay), x)
5506
- );
5507
- task.replay.pendingTasks--;
5508
- refProp = getThrownInfo(request, task.componentStack);
5509
- erroredReplay(
5510
- request,
5511
- task.blockedBoundary,
5512
- x,
5513
- refProp,
5514
- childNodes,
5515
- name
5516
- );
5517
- }
5518
- task.replay = replay;
5519
- } else {
5520
- if (type !== REACT_SUSPENSE_TYPE)
5521
- throw Error(
5522
- "Expected the resume to render <Suspense> in this slot but instead it rendered <" +
5523
- (getComponentNameFromType(type) || "Unknown") +
5524
- ">. The tree doesn't match so React will fallback to client rendering."
5525
- );
5526
- b: {
5527
- type = void 0;
5528
- ref = key;
5529
- var props$jscomp$0 = props;
5530
- props = node[5];
5531
- key = node[2];
5532
- replay = node[3];
5533
- name = null === node[4] ? [] : node[4][2];
5534
- node = null === node[4] ? null : node[4][3];
5535
- keyOrIndex = task.componentStack;
5536
- refProp = task.componentStack =
5537
- createBuiltInComponentStack(
5538
- task,
5539
- "Suspense",
5540
- refProp,
5541
- null
5542
- );
5543
- var prevKeyPath = task.keyPath,
5544
- previousReplaySet = task.replay,
5545
- parentBoundary = task.blockedBoundary,
5546
- parentHoistableState = task.hoistableState,
5547
- content = props$jscomp$0.children;
5548
- props$jscomp$0 = props$jscomp$0.fallback;
5549
- var fallbackAbortSet = new Set(),
5550
- resumedBoundary = createSuspenseBoundary(
5605
+ 0 === resumedBoundary.pendingTasks &&
5606
+ resumedBoundary.status === PENDING
5607
+ ) {
5608
+ resumedBoundary.status = COMPLETED;
5609
+ request.completedBoundaries.push(resumedBoundary);
5610
+ break a;
5611
+ }
5612
+ } catch (error$3) {
5613
+ (resumedBoundary.status = CLIENT_RENDERED),
5614
+ (childNodes = getThrownInfo(ref.componentStack)),
5615
+ (type = logRecoverableError(
5551
5616
  request,
5552
- fallbackAbortSet
5617
+ error$3,
5618
+ childNodes
5619
+ )),
5620
+ encodeErrorForBoundary(
5621
+ resumedBoundary,
5622
+ type,
5623
+ error$3,
5624
+ childNodes,
5625
+ !1
5626
+ ),
5627
+ ref.replay.pendingTasks--,
5628
+ request.clientRenderedBoundaries.push(
5629
+ resumedBoundary
5553
5630
  );
5554
- resumedBoundary.parentFlushed = !0;
5555
- resumedBoundary.rootSegmentID = props;
5556
- task.blockedBoundary = resumedBoundary;
5557
- task.hoistableState = resumedBoundary.contentState;
5558
- task.replay = {
5559
- nodes: key,
5560
- slots: replay,
5561
- pendingTasks: 1
5562
- };
5563
- try {
5564
- renderNode(request, task, content, -1);
5565
- if (
5566
- 1 === task.replay.pendingTasks &&
5567
- 0 < task.replay.nodes.length
5568
- )
5569
- throw Error(
5570
- "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering."
5571
- );
5572
- task.replay.pendingTasks--;
5573
- if (
5574
- 0 === resumedBoundary.pendingTasks &&
5575
- resumedBoundary.status === PENDING
5576
- ) {
5577
- resumedBoundary.status = COMPLETED;
5578
- request.completedBoundaries.push(resumedBoundary);
5579
- break b;
5580
- }
5581
- } catch (error$3) {
5582
- (resumedBoundary.status = CLIENT_RENDERED),
5583
- (childNodes = getThrownInfo(
5584
- request,
5585
- task.componentStack
5586
- )),
5587
- (type = logRecoverableError(
5588
- request,
5589
- error$3,
5590
- childNodes
5591
- )),
5592
- encodeErrorForBoundary(
5593
- resumedBoundary,
5594
- type,
5595
- error$3,
5596
- childNodes,
5597
- !1
5598
- ),
5599
- task.replay.pendingTasks--,
5600
- request.clientRenderedBoundaries.push(
5601
- resumedBoundary
5602
- );
5603
- } finally {
5604
- (task.blockedBoundary = parentBoundary),
5605
- (task.hoistableState = parentHoistableState),
5606
- (task.replay = previousReplaySet),
5607
- (task.keyPath = prevKeyPath),
5608
- (task.componentStack = keyOrIndex);
5609
- }
5610
- childNodes = createReplayTask(
5611
- request,
5612
- null,
5613
- { nodes: name, slots: node, pendingTasks: 0 },
5614
- props$jscomp$0,
5615
- -1,
5616
- parentBoundary,
5617
- resumedBoundary.fallbackState,
5618
- fallbackAbortSet,
5619
- [ref[0], "Suspense Fallback", ref[2]],
5620
- task.formatContext,
5621
- task.legacyContext,
5622
- task.context,
5623
- task.treeContext,
5624
- refProp,
5625
- !0
5626
- );
5627
- request.pingedTasks.push(childNodes);
5631
+ } finally {
5632
+ (ref.blockedBoundary = parentBoundary),
5633
+ (ref.hoistableState = parentHoistableState),
5634
+ (ref.replay = previousReplaySet),
5635
+ (ref.keyPath = prevKeyPath),
5636
+ (ref.componentStack = previousComponentStack);
5628
5637
  }
5638
+ childNodes = createReplayTask(
5639
+ request,
5640
+ null,
5641
+ { nodes: keyOrIndex, slots: node, pendingTasks: 0 },
5642
+ props$jscomp$0,
5643
+ -1,
5644
+ parentBoundary,
5645
+ resumedBoundary.fallbackState,
5646
+ fallbackAbortSet,
5647
+ [key[0], "Suspense Fallback", key[2]],
5648
+ ref.formatContext,
5649
+ ref.context,
5650
+ ref.treeContext,
5651
+ owner,
5652
+ !0
5653
+ );
5654
+ request.pingedTasks.push(childNodes);
5629
5655
  }
5630
- childIndex.splice(node$jscomp$0, 1);
5631
- break a;
5632
5656
  }
5657
+ node$jscomp$0.splice(childIndex, 1);
5658
+ break;
5633
5659
  }
5634
5660
  }
5635
- else
5661
+ } else
5636
5662
  renderElement(
5637
5663
  request,
5638
5664
  task,
@@ -5640,24 +5666,27 @@
5640
5666
  type,
5641
5667
  props,
5642
5668
  ref,
5643
- refProp,
5669
+ owner,
5644
5670
  null
5645
5671
  );
5672
+ task.componentStack = refProp;
5646
5673
  return;
5647
5674
  case REACT_PORTAL_TYPE:
5648
5675
  throw Error(
5649
5676
  "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."
5650
5677
  );
5651
5678
  case REACT_LAZY_TYPE:
5652
- childNodes = task.componentStack;
5653
- task.componentStack = createBuiltInComponentStack(
5654
- task,
5655
- "Lazy",
5656
- null,
5657
- null
5658
- );
5679
+ refProp = task.componentStack;
5680
+ pushServerComponentStack(task, node$jscomp$0._debugInfo);
5681
+ task.componentStack === refProp &&
5682
+ (task.componentStack = createBuiltInComponentStack(
5683
+ task,
5684
+ "Lazy",
5685
+ null,
5686
+ null
5687
+ ));
5659
5688
  node$jscomp$0 = callLazyInitInDEV(node$jscomp$0);
5660
- task.componentStack = childNodes;
5689
+ task.componentStack = refProp;
5661
5690
  renderNodeDestructive(request, task, node$jscomp$0, childIndex);
5662
5691
  return;
5663
5692
  }
@@ -5666,22 +5695,21 @@
5666
5695
  return;
5667
5696
  }
5668
5697
  null === node$jscomp$0 || "object" !== typeof node$jscomp$0
5669
- ? (refProp = null)
5670
- : ((childNodes =
5698
+ ? (childNodes = null)
5699
+ : ((refProp =
5671
5700
  (MAYBE_ITERATOR_SYMBOL &&
5672
5701
  node$jscomp$0[MAYBE_ITERATOR_SYMBOL]) ||
5673
5702
  node$jscomp$0["@@iterator"]),
5674
- (refProp = "function" === typeof childNodes ? childNodes : null));
5675
- if (refProp && (childNodes = refProp.call(node$jscomp$0))) {
5676
- if (childNodes === node$jscomp$0) {
5703
+ (childNodes = "function" === typeof refProp ? refProp : null));
5704
+ if (childNodes && (refProp = childNodes.call(node$jscomp$0))) {
5705
+ if (refProp === node$jscomp$0) {
5677
5706
  if (
5678
5707
  -1 !== childIndex ||
5679
5708
  null === task.componentStack ||
5680
5709
  1 !== task.componentStack.tag ||
5681
5710
  "[object GeneratorFunction]" !==
5682
5711
  Object.prototype.toString.call(task.componentStack.type) ||
5683
- "[object Generator]" !==
5684
- Object.prototype.toString.call(childNodes)
5712
+ "[object Generator]" !== Object.prototype.toString.call(refProp)
5685
5713
  )
5686
5714
  didWarnAboutGenerators ||
5687
5715
  error$jscomp$2(
@@ -5689,32 +5717,36 @@
5689
5717
  ),
5690
5718
  (didWarnAboutGenerators = !0);
5691
5719
  } else
5692
- node$jscomp$0.entries !== refProp ||
5720
+ node$jscomp$0.entries !== childNodes ||
5693
5721
  didWarnAboutMaps ||
5694
5722
  (error$jscomp$2(
5695
5723
  "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
5696
5724
  ),
5697
5725
  (didWarnAboutMaps = !0));
5698
- node$jscomp$0 = childNodes.next();
5726
+ node$jscomp$0 = refProp.next();
5699
5727
  if (!node$jscomp$0.done) {
5700
- refProp = [];
5728
+ childNodes = [];
5701
5729
  do
5702
- refProp.push(node$jscomp$0.value),
5703
- (node$jscomp$0 = childNodes.next());
5730
+ childNodes.push(node$jscomp$0.value),
5731
+ (node$jscomp$0 = refProp.next());
5704
5732
  while (!node$jscomp$0.done);
5705
- renderChildrenArray(request, task, refProp, childIndex);
5733
+ renderChildrenArray(request, task, childNodes, childIndex);
5706
5734
  }
5707
5735
  return;
5708
5736
  }
5709
5737
  if ("function" === typeof node$jscomp$0.then)
5710
5738
  return (
5711
5739
  (task.thenableState = null),
5712
- renderNodeDestructive(
5740
+ (refProp = task.componentStack),
5741
+ pushServerComponentStack(task, node$jscomp$0._debugInfo),
5742
+ (node$jscomp$0 = renderNodeDestructive(
5713
5743
  request,
5714
5744
  task,
5715
5745
  unwrapThenable(node$jscomp$0),
5716
5746
  childIndex
5717
- )
5747
+ )),
5748
+ (task.componentStack = refProp),
5749
+ node$jscomp$0
5718
5750
  );
5719
5751
  if (node$jscomp$0.$$typeof === REACT_CONTEXT_TYPE)
5720
5752
  return renderNodeDestructive(
@@ -5723,43 +5755,43 @@
5723
5755
  node$jscomp$0._currentValue2,
5724
5756
  childIndex
5725
5757
  );
5726
- childIndex = Object.prototype.toString.call(node$jscomp$0);
5758
+ task = Object.prototype.toString.call(node$jscomp$0);
5727
5759
  throw Error(
5728
5760
  "Objects are not valid as a React child (found: " +
5729
- ("[object Object]" === childIndex
5761
+ ("[object Object]" === task
5730
5762
  ? "object with keys {" +
5731
5763
  Object.keys(node$jscomp$0).join(", ") +
5732
5764
  "}"
5733
- : childIndex) +
5765
+ : task) +
5734
5766
  "). If you meant to render a collection of children, use an array instead."
5735
5767
  );
5736
5768
  }
5737
5769
  "string" === typeof node$jscomp$0
5738
- ? ((childIndex = task.blockedSegment),
5739
- null !== childIndex &&
5740
- (childIndex.lastPushedText = pushTextInstance(
5741
- childIndex.chunks,
5770
+ ? ((task = task.blockedSegment),
5771
+ null !== task &&
5772
+ (task.lastPushedText = pushTextInstance(
5773
+ task.chunks,
5742
5774
  node$jscomp$0,
5743
5775
  request.renderState,
5744
- childIndex.lastPushedText
5776
+ task.lastPushedText
5745
5777
  )))
5746
5778
  : "number" === typeof node$jscomp$0 ||
5747
5779
  "bigint" === typeof node$jscomp$0
5748
- ? ((childIndex = task.blockedSegment),
5749
- null !== childIndex &&
5750
- (childIndex.lastPushedText = pushTextInstance(
5751
- childIndex.chunks,
5780
+ ? ((task = task.blockedSegment),
5781
+ null !== task &&
5782
+ (task.lastPushedText = pushTextInstance(
5783
+ task.chunks,
5752
5784
  "" + node$jscomp$0,
5753
5785
  request.renderState,
5754
- childIndex.lastPushedText
5786
+ task.lastPushedText
5755
5787
  )))
5756
5788
  : ("function" === typeof node$jscomp$0 &&
5757
- ((childIndex =
5789
+ ((task =
5758
5790
  node$jscomp$0.displayName || node$jscomp$0.name || "Component"),
5759
5791
  error$jscomp$2(
5760
5792
  "Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.",
5761
- childIndex,
5762
- childIndex
5793
+ task,
5794
+ task
5763
5795
  )),
5764
5796
  "symbol" === typeof node$jscomp$0 &&
5765
5797
  error$jscomp$2(
@@ -5769,7 +5801,9 @@
5769
5801
  }
5770
5802
  }
5771
5803
  function renderChildrenArray(request$jscomp$0, task, children, childIndex) {
5772
- var prevKeyPath = task.keyPath;
5804
+ var prevKeyPath = task.keyPath,
5805
+ previousComponentStack = task.componentStack;
5806
+ pushServerComponentStack(task, task.node._debugInfo);
5773
5807
  if (
5774
5808
  -1 !== childIndex &&
5775
5809
  ((task.keyPath = [task.keyPath, "Fragment", childIndex]),
@@ -5803,7 +5837,7 @@
5803
5837
  )
5804
5838
  throw x;
5805
5839
  task.replay.pendingTasks--;
5806
- children = getThrownInfo(request$jscomp$0, task.componentStack);
5840
+ children = getThrownInfo(task.componentStack);
5807
5841
  erroredReplay(
5808
5842
  request$jscomp$0,
5809
5843
  task.blockedBoundary,
@@ -5819,6 +5853,7 @@
5819
5853
  }
5820
5854
  }
5821
5855
  task.keyPath = prevKeyPath;
5856
+ task.componentStack = previousComponentStack;
5822
5857
  return;
5823
5858
  }
5824
5859
  replay = task.treeContext;
@@ -5844,6 +5879,7 @@
5844
5879
  }
5845
5880
  task.treeContext = replay;
5846
5881
  task.keyPath = prevKeyPath;
5882
+ task.componentStack = previousComponentStack;
5847
5883
  return;
5848
5884
  }
5849
5885
  for (j = 0; j < replayNodes; j++) {
@@ -5937,6 +5973,7 @@
5937
5973
  }
5938
5974
  task.treeContext = replay;
5939
5975
  task.keyPath = prevKeyPath;
5976
+ task.componentStack = previousComponentStack;
5940
5977
  }
5941
5978
  function untrackBoundary(request, boundary) {
5942
5979
  request = request.trackedPostpones;
@@ -5949,7 +5986,6 @@
5949
5986
  }
5950
5987
  function renderNode(request, task, node, childIndex) {
5951
5988
  var previousFormatContext = task.formatContext,
5952
- previousLegacyContext = task.legacyContext,
5953
5989
  previousContext = task.context,
5954
5990
  previousKeyPath = task.keyPath,
5955
5991
  previousTreeContext = task.treeContext,
@@ -5981,7 +6017,6 @@
5981
6017
  task.abortSet,
5982
6018
  task.keyPath,
5983
6019
  task.formatContext,
5984
- task.legacyContext,
5985
6020
  task.context,
5986
6021
  task.treeContext,
5987
6022
  null !== task.componentStack ? task.componentStack.parent : null,
@@ -5989,7 +6024,6 @@
5989
6024
  ).ping;
5990
6025
  node.then(request, request);
5991
6026
  task.formatContext = previousFormatContext;
5992
- task.legacyContext = previousLegacyContext;
5993
6027
  task.context = previousContext;
5994
6028
  task.keyPath = previousKeyPath;
5995
6029
  task.treeContext = previousTreeContext;
@@ -6039,7 +6073,6 @@
6039
6073
  task.abortSet,
6040
6074
  task.keyPath,
6041
6075
  task.formatContext,
6042
- task.legacyContext,
6043
6076
  task.context,
6044
6077
  task.treeContext,
6045
6078
  null !== task.componentStack ? task.componentStack.parent : null,
@@ -6047,7 +6080,6 @@
6047
6080
  ).ping;
6048
6081
  node.then(request, request);
6049
6082
  task.formatContext = previousFormatContext;
6050
- task.legacyContext = previousLegacyContext;
6051
6083
  task.context = previousContext;
6052
6084
  task.keyPath = previousKeyPath;
6053
6085
  task.treeContext = previousTreeContext;
@@ -6058,7 +6090,6 @@
6058
6090
  }
6059
6091
  }
6060
6092
  task.formatContext = previousFormatContext;
6061
- task.legacyContext = previousLegacyContext;
6062
6093
  task.context = previousContext;
6063
6094
  task.keyPath = previousKeyPath;
6064
6095
  task.treeContext = previousTreeContext;
@@ -6189,7 +6220,7 @@
6189
6220
  boundary.pendingTasks--,
6190
6221
  boundary.status !== CLIENT_RENDERED &&
6191
6222
  ((boundary.status = CLIENT_RENDERED),
6192
- (task = getThrownInfo(request, task.componentStack)),
6223
+ (task = getThrownInfo(task.componentStack)),
6193
6224
  (segment = logRecoverableError(request, error, task)),
6194
6225
  encodeErrorForBoundary(boundary, segment, error, task, !0),
6195
6226
  untrackBoundary(request, boundary),
@@ -6400,10 +6431,7 @@
6400
6431
  } else {
6401
6432
  request.replay.pendingTasks--;
6402
6433
  request.abortSet.delete(request);
6403
- var errorInfo = getThrownInfo(
6404
- request$jscomp$0,
6405
- request.componentStack
6406
- );
6434
+ var errorInfo = getThrownInfo(request.componentStack);
6407
6435
  erroredReplay(
6408
6436
  request$jscomp$0,
6409
6437
  request.blockedBoundary,
@@ -6473,7 +6501,6 @@
6473
6501
  task$jscomp$0.componentStack.parent);
6474
6502
  } else {
6475
6503
  var errorInfo$jscomp$0 = getThrownInfo(
6476
- request,
6477
6504
  task$jscomp$0.componentStack
6478
6505
  );
6479
6506
  task$jscomp$0.abortSet.delete(task$jscomp$0);
@@ -8561,5 +8588,5 @@
8561
8588
  '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'
8562
8589
  );
8563
8590
  };
8564
- exports.version = "19.0.0-rc-100dfd7dab-20240701";
8591
+ exports.version = "19.0.0-rc-3da26163a3-20240704";
8565
8592
  })();