react-markup 0.0.0-experimental-f65ac7bd-20240826 → 0.0.0-experimental-7771d3a7-20240827

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.
@@ -6227,6 +6227,57 @@
6227
6227
  void 0 !== boundary &&
6228
6228
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
6229
6229
  }
6230
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
6231
+ return createReplayTask(
6232
+ request,
6233
+ thenableState,
6234
+ task.replay,
6235
+ task.node,
6236
+ task.childIndex,
6237
+ task.blockedBoundary,
6238
+ task.hoistableState,
6239
+ task.abortSet,
6240
+ task.keyPath,
6241
+ task.formatContext,
6242
+ task.context,
6243
+ task.treeContext,
6244
+ task.componentStack,
6245
+ task.isFallback,
6246
+ emptyContextObject,
6247
+ task.debugTask
6248
+ );
6249
+ }
6250
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
6251
+ var segment = task.blockedSegment,
6252
+ newSegment = createPendingSegment(
6253
+ request,
6254
+ segment.chunks.length,
6255
+ null,
6256
+ task.formatContext,
6257
+ segment.lastPushedText,
6258
+ !0
6259
+ );
6260
+ segment.children.push(newSegment);
6261
+ segment.lastPushedText = !1;
6262
+ return createRenderTask(
6263
+ request,
6264
+ thenableState,
6265
+ task.node,
6266
+ task.childIndex,
6267
+ task.blockedBoundary,
6268
+ newSegment,
6269
+ task.hoistableState,
6270
+ task.abortSet,
6271
+ task.keyPath,
6272
+ task.formatContext,
6273
+ task.context,
6274
+ task.treeContext,
6275
+ task.componentStack,
6276
+ task.isFallback,
6277
+ emptyContextObject,
6278
+ task.debugTask
6279
+ );
6280
+ }
6230
6281
  function renderNode(request, task, node, childIndex) {
6231
6282
  var previousFormatContext = task.formatContext,
6232
6283
  previousContext = task.context,
@@ -6245,39 +6296,39 @@
6245
6296
  thrownValue === SuspenseException
6246
6297
  ? getSuspendedThenable()
6247
6298
  : thrownValue),
6248
- "object" === typeof childIndex &&
6249
- null !== childIndex &&
6250
- "function" === typeof childIndex.then)
6299
+ "object" === typeof childIndex && null !== childIndex)
6251
6300
  ) {
6252
- node = childIndex;
6253
- childIndex = getThenableStateAfterSuspending();
6254
- request = createReplayTask(
6255
- request,
6256
- childIndex,
6257
- task.replay,
6258
- task.node,
6259
- task.childIndex,
6260
- task.blockedBoundary,
6261
- task.hoistableState,
6262
- task.abortSet,
6263
- task.keyPath,
6264
- task.formatContext,
6265
- task.context,
6266
- task.treeContext,
6267
- task.componentStack,
6268
- task.isFallback,
6269
- emptyContextObject,
6270
- task.debugTask
6271
- ).ping;
6272
- node.then(request, request);
6273
- task.formatContext = previousFormatContext;
6274
- task.context = previousContext;
6275
- task.keyPath = previousKeyPath;
6276
- task.treeContext = previousTreeContext;
6277
- task.componentStack = previousComponentStack;
6278
- task.debugTask = previousDebugTask;
6279
- switchContext(previousContext);
6280
- return;
6301
+ if ("function" === typeof childIndex.then) {
6302
+ node = childIndex;
6303
+ childIndex = getThenableStateAfterSuspending();
6304
+ request = spawnNewSuspendedReplayTask(
6305
+ request,
6306
+ task,
6307
+ childIndex
6308
+ ).ping;
6309
+ node.then(request, request);
6310
+ task.formatContext = previousFormatContext;
6311
+ task.context = previousContext;
6312
+ task.keyPath = previousKeyPath;
6313
+ task.treeContext = previousTreeContext;
6314
+ task.componentStack = previousComponentStack;
6315
+ task.debugTask = previousDebugTask;
6316
+ switchContext(previousContext);
6317
+ return;
6318
+ }
6319
+ if ("Maximum call stack size exceeded" === childIndex.message) {
6320
+ node = getThenableStateAfterSuspending();
6321
+ node = spawnNewSuspendedReplayTask(request, task, node);
6322
+ request.pingedTasks.push(node);
6323
+ task.formatContext = previousFormatContext;
6324
+ task.context = previousContext;
6325
+ task.keyPath = previousKeyPath;
6326
+ task.treeContext = previousTreeContext;
6327
+ task.componentStack = previousComponentStack;
6328
+ task.debugTask = previousDebugTask;
6329
+ switchContext(previousContext);
6330
+ return;
6331
+ }
6281
6332
  }
6282
6333
  }
6283
6334
  else {
@@ -6299,34 +6350,10 @@
6299
6350
  if ("function" === typeof childIndex.then) {
6300
6351
  node = childIndex;
6301
6352
  childIndex = getThenableStateAfterSuspending();
6302
- segment = task.blockedSegment;
6303
- childrenLength = createPendingSegment(
6353
+ request = spawnNewSuspendedRenderTask(
6304
6354
  request,
6305
- segment.chunks.length,
6306
- null,
6307
- task.formatContext,
6308
- segment.lastPushedText,
6309
- !0
6310
- );
6311
- segment.children.push(childrenLength);
6312
- segment.lastPushedText = !1;
6313
- request = createRenderTask(
6314
- request,
6315
- childIndex,
6316
- task.node,
6317
- task.childIndex,
6318
- task.blockedBoundary,
6319
- childrenLength,
6320
- task.hoistableState,
6321
- task.abortSet,
6322
- task.keyPath,
6323
- task.formatContext,
6324
- task.context,
6325
- task.treeContext,
6326
- task.componentStack,
6327
- task.isFallback,
6328
- emptyContextObject,
6329
- task.debugTask
6355
+ task,
6356
+ childIndex
6330
6357
  ).ping;
6331
6358
  node.then(request, request);
6332
6359
  task.formatContext = previousFormatContext;
@@ -6367,6 +6394,19 @@
6367
6394
  switchContext(previousContext);
6368
6395
  return;
6369
6396
  }
6397
+ if ("Maximum call stack size exceeded" === childIndex.message) {
6398
+ node = getThenableStateAfterSuspending();
6399
+ node = spawnNewSuspendedRenderTask(request, task, node);
6400
+ request.pingedTasks.push(node);
6401
+ task.formatContext = previousFormatContext;
6402
+ task.context = previousContext;
6403
+ task.keyPath = previousKeyPath;
6404
+ task.treeContext = previousTreeContext;
6405
+ task.componentStack = previousComponentStack;
6406
+ task.debugTask = previousDebugTask;
6407
+ switchContext(previousContext);
6408
+ return;
6409
+ }
6370
6410
  }
6371
6411
  }
6372
6412
  }
@@ -8586,5 +8626,5 @@
8586
8626
  });
8587
8627
  });
8588
8628
  };
8589
- exports.version = "19.0.0-experimental-f65ac7bd-20240826";
8629
+ exports.version = "19.0.0-experimental-7771d3a7-20240827";
8590
8630
  })();
@@ -4484,6 +4484,53 @@ function untrackBoundary(request, boundary) {
4484
4484
  void 0 !== boundary &&
4485
4485
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
4486
4486
  }
4487
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
4488
+ return createReplayTask(
4489
+ request,
4490
+ thenableState,
4491
+ task.replay,
4492
+ task.node,
4493
+ task.childIndex,
4494
+ task.blockedBoundary,
4495
+ task.hoistableState,
4496
+ task.abortSet,
4497
+ task.keyPath,
4498
+ task.formatContext,
4499
+ task.context,
4500
+ task.treeContext,
4501
+ task.componentStack,
4502
+ task.isFallback
4503
+ );
4504
+ }
4505
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
4506
+ var segment = task.blockedSegment,
4507
+ newSegment = createPendingSegment(
4508
+ request,
4509
+ segment.chunks.length,
4510
+ null,
4511
+ task.formatContext,
4512
+ segment.lastPushedText,
4513
+ !0
4514
+ );
4515
+ segment.children.push(newSegment);
4516
+ segment.lastPushedText = !1;
4517
+ return createRenderTask(
4518
+ request,
4519
+ thenableState,
4520
+ task.node,
4521
+ task.childIndex,
4522
+ task.blockedBoundary,
4523
+ newSegment,
4524
+ task.hoistableState,
4525
+ task.abortSet,
4526
+ task.keyPath,
4527
+ task.formatContext,
4528
+ task.context,
4529
+ task.treeContext,
4530
+ task.componentStack,
4531
+ task.isFallback
4532
+ );
4533
+ }
4487
4534
  function renderNode(request, task, node, childIndex) {
4488
4535
  var previousFormatContext = task.formatContext,
4489
4536
  previousContext = task.context,
@@ -4501,36 +4548,33 @@ function renderNode(request, task, node, childIndex) {
4501
4548
  thrownValue === SuspenseException
4502
4549
  ? getSuspendedThenable()
4503
4550
  : thrownValue),
4504
- "object" === typeof childIndex &&
4505
- null !== childIndex &&
4506
- "function" === typeof childIndex.then)
4551
+ "object" === typeof childIndex && null !== childIndex)
4507
4552
  ) {
4508
- node = childIndex;
4509
- childIndex = getThenableStateAfterSuspending();
4510
- request = createReplayTask(
4511
- request,
4512
- childIndex,
4513
- task.replay,
4514
- task.node,
4515
- task.childIndex,
4516
- task.blockedBoundary,
4517
- task.hoistableState,
4518
- task.abortSet,
4519
- task.keyPath,
4520
- task.formatContext,
4521
- task.context,
4522
- task.treeContext,
4523
- task.componentStack,
4524
- task.isFallback
4525
- ).ping;
4526
- node.then(request, request);
4527
- task.formatContext = previousFormatContext;
4528
- task.context = previousContext;
4529
- task.keyPath = previousKeyPath;
4530
- task.treeContext = previousTreeContext;
4531
- task.componentStack = previousComponentStack;
4532
- switchContext(previousContext);
4533
- return;
4553
+ if ("function" === typeof childIndex.then) {
4554
+ node = childIndex;
4555
+ childIndex = getThenableStateAfterSuspending();
4556
+ request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
4557
+ node.then(request, request);
4558
+ task.formatContext = previousFormatContext;
4559
+ task.context = previousContext;
4560
+ task.keyPath = previousKeyPath;
4561
+ task.treeContext = previousTreeContext;
4562
+ task.componentStack = previousComponentStack;
4563
+ switchContext(previousContext);
4564
+ return;
4565
+ }
4566
+ if ("Maximum call stack size exceeded" === childIndex.message) {
4567
+ node = getThenableStateAfterSuspending();
4568
+ node = spawnNewSuspendedReplayTask(request, task, node);
4569
+ request.pingedTasks.push(node);
4570
+ task.formatContext = previousFormatContext;
4571
+ task.context = previousContext;
4572
+ task.keyPath = previousKeyPath;
4573
+ task.treeContext = previousTreeContext;
4574
+ task.componentStack = previousComponentStack;
4575
+ switchContext(previousContext);
4576
+ return;
4577
+ }
4534
4578
  }
4535
4579
  }
4536
4580
  else {
@@ -4538,47 +4582,21 @@ function renderNode(request, task, node, childIndex) {
4538
4582
  chunkLength = segment.chunks.length;
4539
4583
  try {
4540
4584
  return renderNodeDestructive(request, task, node, childIndex);
4541
- } catch (thrownValue$39) {
4585
+ } catch (thrownValue$45) {
4542
4586
  if (
4543
4587
  (resetHooksState(),
4544
4588
  (segment.children.length = childrenLength),
4545
4589
  (segment.chunks.length = chunkLength),
4546
4590
  (childIndex =
4547
- thrownValue$39 === SuspenseException
4591
+ thrownValue$45 === SuspenseException
4548
4592
  ? getSuspendedThenable()
4549
- : thrownValue$39),
4593
+ : thrownValue$45),
4550
4594
  "object" === typeof childIndex && null !== childIndex)
4551
4595
  ) {
4552
4596
  if ("function" === typeof childIndex.then) {
4553
4597
  node = childIndex;
4554
4598
  childIndex = getThenableStateAfterSuspending();
4555
- segment = task.blockedSegment;
4556
- childrenLength = createPendingSegment(
4557
- request,
4558
- segment.chunks.length,
4559
- null,
4560
- task.formatContext,
4561
- segment.lastPushedText,
4562
- !0
4563
- );
4564
- segment.children.push(childrenLength);
4565
- segment.lastPushedText = !1;
4566
- request = createRenderTask(
4567
- request,
4568
- childIndex,
4569
- task.node,
4570
- task.childIndex,
4571
- task.blockedBoundary,
4572
- childrenLength,
4573
- task.hoistableState,
4574
- task.abortSet,
4575
- task.keyPath,
4576
- task.formatContext,
4577
- task.context,
4578
- task.treeContext,
4579
- task.componentStack,
4580
- task.isFallback
4581
- ).ping;
4599
+ request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
4582
4600
  node.then(request, request);
4583
4601
  task.formatContext = previousFormatContext;
4584
4602
  task.context = previousContext;
@@ -4616,6 +4634,18 @@ function renderNode(request, task, node, childIndex) {
4616
4634
  switchContext(previousContext);
4617
4635
  return;
4618
4636
  }
4637
+ if ("Maximum call stack size exceeded" === childIndex.message) {
4638
+ node = getThenableStateAfterSuspending();
4639
+ node = spawnNewSuspendedRenderTask(request, task, node);
4640
+ request.pingedTasks.push(node);
4641
+ task.formatContext = previousFormatContext;
4642
+ task.context = previousContext;
4643
+ task.keyPath = previousKeyPath;
4644
+ task.treeContext = previousTreeContext;
4645
+ task.componentStack = previousComponentStack;
4646
+ switchContext(previousContext);
4647
+ return;
4648
+ }
4619
4649
  }
4620
4650
  }
4621
4651
  }
@@ -4755,16 +4785,16 @@ function abortTask(task, request, error) {
4755
4785
  } else {
4756
4786
  boundary.pendingTasks--;
4757
4787
  replay = getThrownInfo(task.componentStack);
4758
- var trackedPostpones$43 = request.trackedPostpones;
4788
+ var trackedPostpones$49 = request.trackedPostpones;
4759
4789
  if (4 !== boundary.status) {
4760
- if (null !== trackedPostpones$43 && null !== segment)
4790
+ if (null !== trackedPostpones$49 && null !== segment)
4761
4791
  return (
4762
4792
  "object" === typeof error &&
4763
4793
  null !== error &&
4764
4794
  error.$$typeof === REACT_POSTPONE_TYPE
4765
4795
  ? logPostpone(request, error.message, replay)
4766
4796
  : logRecoverableError(request, error, replay),
4767
- trackPostpone(request, trackedPostpones$43, task, segment),
4797
+ trackPostpone(request, trackedPostpones$49, task, segment),
4768
4798
  boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
4769
4799
  return abortTask(fallbackTask, request, error);
4770
4800
  }),
@@ -5059,13 +5089,13 @@ function performWork(request$jscomp$1) {
5059
5089
  null !== request.trackedPostpones &&
5060
5090
  x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE
5061
5091
  ) {
5062
- var trackedPostpones$47 = request.trackedPostpones;
5092
+ var trackedPostpones$53 = request.trackedPostpones;
5063
5093
  task.abortSet.delete(task);
5064
5094
  var postponeInfo = getThrownInfo(task.componentStack);
5065
5095
  logPostpone(request, x$jscomp$0.message, postponeInfo);
5066
5096
  trackPostpone(
5067
5097
  request,
5068
- trackedPostpones$47,
5098
+ trackedPostpones$53,
5069
5099
  task,
5070
5100
  segment$jscomp$0
5071
5101
  );
@@ -5497,11 +5527,11 @@ function flushCompletedQueues(request, destination) {
5497
5527
  completedBoundaries.splice(0, i);
5498
5528
  var partialBoundaries = request.partialBoundaries;
5499
5529
  for (i = 0; i < partialBoundaries.length; i++) {
5500
- var boundary$50 = partialBoundaries[i];
5530
+ var boundary$56 = partialBoundaries[i];
5501
5531
  a: {
5502
5532
  clientRenderedBoundaries = request;
5503
5533
  boundary = destination;
5504
- var completedSegments = boundary$50.completedSegments;
5534
+ var completedSegments = boundary$56.completedSegments;
5505
5535
  for (
5506
5536
  JSCompiler_inline_result = 0;
5507
5537
  JSCompiler_inline_result < completedSegments.length;
@@ -5511,7 +5541,7 @@ function flushCompletedQueues(request, destination) {
5511
5541
  !flushPartiallyCompletedSegment(
5512
5542
  clientRenderedBoundaries,
5513
5543
  boundary,
5514
- boundary$50,
5544
+ boundary$56,
5515
5545
  completedSegments[JSCompiler_inline_result]
5516
5546
  )
5517
5547
  ) {
@@ -5523,7 +5553,7 @@ function flushCompletedQueues(request, destination) {
5523
5553
  completedSegments.splice(0, JSCompiler_inline_result);
5524
5554
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
5525
5555
  boundary,
5526
- boundary$50.contentState,
5556
+ boundary$56.contentState,
5527
5557
  clientRenderedBoundaries.renderState
5528
5558
  );
5529
5559
  }
@@ -5595,8 +5625,8 @@ function abort(request, reason) {
5595
5625
  }
5596
5626
  null !== request.destination &&
5597
5627
  flushCompletedQueues(request, request.destination);
5598
- } catch (error$52) {
5599
- logRecoverableError(request, error$52, {}), fatalError(request, error$52);
5628
+ } catch (error$58) {
5629
+ logRecoverableError(request, error$58, {}), fatalError(request, error$58);
5600
5630
  }
5601
5631
  }
5602
5632
  function addToReplayParent(node, parentKeyPath, trackedPostpones) {
@@ -5673,4 +5703,4 @@ exports.experimental_renderToHTML = function (children, options) {
5673
5703
  });
5674
5704
  });
5675
5705
  };
5676
- exports.version = "19.0.0-experimental-f65ac7bd-20240826";
5706
+ exports.version = "19.0.0-experimental-7771d3a7-20240827";
@@ -10039,6 +10039,57 @@
10039
10039
  void 0 !== boundary &&
10040
10040
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
10041
10041
  }
10042
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
10043
+ return createReplayTask(
10044
+ request,
10045
+ thenableState,
10046
+ task.replay,
10047
+ task.node,
10048
+ task.childIndex,
10049
+ task.blockedBoundary,
10050
+ task.hoistableState,
10051
+ task.abortSet,
10052
+ task.keyPath,
10053
+ task.formatContext,
10054
+ task.context,
10055
+ task.treeContext,
10056
+ task.componentStack,
10057
+ task.isFallback,
10058
+ emptyContextObject,
10059
+ task.debugTask
10060
+ );
10061
+ }
10062
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
10063
+ var segment = task.blockedSegment,
10064
+ newSegment = createPendingSegment(
10065
+ request,
10066
+ segment.chunks.length,
10067
+ null,
10068
+ task.formatContext,
10069
+ segment.lastPushedText,
10070
+ !0
10071
+ );
10072
+ segment.children.push(newSegment);
10073
+ segment.lastPushedText = !1;
10074
+ return createRenderTask(
10075
+ request,
10076
+ thenableState,
10077
+ task.node,
10078
+ task.childIndex,
10079
+ task.blockedBoundary,
10080
+ newSegment,
10081
+ task.hoistableState,
10082
+ task.abortSet,
10083
+ task.keyPath,
10084
+ task.formatContext,
10085
+ task.context,
10086
+ task.treeContext,
10087
+ task.componentStack,
10088
+ task.isFallback,
10089
+ emptyContextObject,
10090
+ task.debugTask
10091
+ );
10092
+ }
10042
10093
  function renderNode(request, task, node, childIndex) {
10043
10094
  var previousFormatContext = task.formatContext,
10044
10095
  previousContext = task.context,
@@ -10057,39 +10108,39 @@
10057
10108
  thrownValue === SuspenseException
10058
10109
  ? getSuspendedThenable()
10059
10110
  : thrownValue),
10060
- "object" === typeof childIndex &&
10061
- null !== childIndex &&
10062
- "function" === typeof childIndex.then)
10111
+ "object" === typeof childIndex && null !== childIndex)
10063
10112
  ) {
10064
- node = childIndex;
10065
- childIndex = getThenableStateAfterSuspending();
10066
- request = createReplayTask(
10067
- request,
10068
- childIndex,
10069
- task.replay,
10070
- task.node,
10071
- task.childIndex,
10072
- task.blockedBoundary,
10073
- task.hoistableState,
10074
- task.abortSet,
10075
- task.keyPath,
10076
- task.formatContext,
10077
- task.context,
10078
- task.treeContext,
10079
- task.componentStack,
10080
- task.isFallback,
10081
- emptyContextObject,
10082
- task.debugTask
10083
- ).ping;
10084
- node.then(request, request);
10085
- task.formatContext = previousFormatContext;
10086
- task.context = previousContext;
10087
- task.keyPath = previousKeyPath;
10088
- task.treeContext = previousTreeContext;
10089
- task.componentStack = previousComponentStack;
10090
- task.debugTask = previousDebugTask;
10091
- switchContext(previousContext);
10092
- return;
10113
+ if ("function" === typeof childIndex.then) {
10114
+ node = childIndex;
10115
+ childIndex = getThenableStateAfterSuspending();
10116
+ request = spawnNewSuspendedReplayTask(
10117
+ request,
10118
+ task,
10119
+ childIndex
10120
+ ).ping;
10121
+ node.then(request, request);
10122
+ task.formatContext = previousFormatContext;
10123
+ task.context = previousContext;
10124
+ task.keyPath = previousKeyPath;
10125
+ task.treeContext = previousTreeContext;
10126
+ task.componentStack = previousComponentStack;
10127
+ task.debugTask = previousDebugTask;
10128
+ switchContext(previousContext);
10129
+ return;
10130
+ }
10131
+ if ("Maximum call stack size exceeded" === childIndex.message) {
10132
+ node = getThenableStateAfterSuspending();
10133
+ node = spawnNewSuspendedReplayTask(request, task, node);
10134
+ request.pingedTasks.push(node);
10135
+ task.formatContext = previousFormatContext;
10136
+ task.context = previousContext;
10137
+ task.keyPath = previousKeyPath;
10138
+ task.treeContext = previousTreeContext;
10139
+ task.componentStack = previousComponentStack;
10140
+ task.debugTask = previousDebugTask;
10141
+ switchContext(previousContext);
10142
+ return;
10143
+ }
10093
10144
  }
10094
10145
  }
10095
10146
  else {
@@ -10111,34 +10162,10 @@
10111
10162
  if ("function" === typeof childIndex.then) {
10112
10163
  node = childIndex;
10113
10164
  childIndex = getThenableStateAfterSuspending();
10114
- segment = task.blockedSegment;
10115
- childrenLength = createPendingSegment(
10165
+ request = spawnNewSuspendedRenderTask(
10116
10166
  request,
10117
- segment.chunks.length,
10118
- null,
10119
- task.formatContext,
10120
- segment.lastPushedText,
10121
- !0
10122
- );
10123
- segment.children.push(childrenLength);
10124
- segment.lastPushedText = !1;
10125
- request = createRenderTask(
10126
- request,
10127
- childIndex,
10128
- task.node,
10129
- task.childIndex,
10130
- task.blockedBoundary,
10131
- childrenLength,
10132
- task.hoistableState,
10133
- task.abortSet,
10134
- task.keyPath,
10135
- task.formatContext,
10136
- task.context,
10137
- task.treeContext,
10138
- task.componentStack,
10139
- task.isFallback,
10140
- emptyContextObject,
10141
- task.debugTask
10167
+ task,
10168
+ childIndex
10142
10169
  ).ping;
10143
10170
  node.then(request, request);
10144
10171
  task.formatContext = previousFormatContext;
@@ -10179,6 +10206,19 @@
10179
10206
  switchContext(previousContext);
10180
10207
  return;
10181
10208
  }
10209
+ if ("Maximum call stack size exceeded" === childIndex.message) {
10210
+ node = getThenableStateAfterSuspending();
10211
+ node = spawnNewSuspendedRenderTask(request, task, node);
10212
+ request.pingedTasks.push(node);
10213
+ task.formatContext = previousFormatContext;
10214
+ task.context = previousContext;
10215
+ task.keyPath = previousKeyPath;
10216
+ task.treeContext = previousTreeContext;
10217
+ task.componentStack = previousComponentStack;
10218
+ task.debugTask = previousDebugTask;
10219
+ switchContext(previousContext);
10220
+ return;
10221
+ }
10182
10222
  }
10183
10223
  }
10184
10224
  }
@@ -12945,5 +12985,5 @@
12945
12985
  });
12946
12986
  });
12947
12987
  };
12948
- exports.version = "19.0.0-experimental-f65ac7bd-20240826";
12988
+ exports.version = "19.0.0-experimental-7771d3a7-20240827";
12949
12989
  })();
@@ -7197,6 +7197,53 @@ function untrackBoundary(request, boundary) {
7197
7197
  void 0 !== boundary &&
7198
7198
  ((boundary.length = 4), (boundary[2] = []), (boundary[3] = null))));
7199
7199
  }
7200
+ function spawnNewSuspendedReplayTask(request, task, thenableState) {
7201
+ return createReplayTask(
7202
+ request,
7203
+ thenableState,
7204
+ task.replay,
7205
+ task.node,
7206
+ task.childIndex,
7207
+ task.blockedBoundary,
7208
+ task.hoistableState,
7209
+ task.abortSet,
7210
+ task.keyPath,
7211
+ task.formatContext,
7212
+ task.context,
7213
+ task.treeContext,
7214
+ task.componentStack,
7215
+ task.isFallback
7216
+ );
7217
+ }
7218
+ function spawnNewSuspendedRenderTask(request, task, thenableState) {
7219
+ var segment = task.blockedSegment,
7220
+ newSegment = createPendingSegment(
7221
+ request,
7222
+ segment.chunks.length,
7223
+ null,
7224
+ task.formatContext,
7225
+ segment.lastPushedText,
7226
+ !0
7227
+ );
7228
+ segment.children.push(newSegment);
7229
+ segment.lastPushedText = !1;
7230
+ return createRenderTask(
7231
+ request,
7232
+ thenableState,
7233
+ task.node,
7234
+ task.childIndex,
7235
+ task.blockedBoundary,
7236
+ newSegment,
7237
+ task.hoistableState,
7238
+ task.abortSet,
7239
+ task.keyPath,
7240
+ task.formatContext,
7241
+ task.context,
7242
+ task.treeContext,
7243
+ task.componentStack,
7244
+ task.isFallback
7245
+ );
7246
+ }
7200
7247
  function renderNode(request, task, node, childIndex) {
7201
7248
  var previousFormatContext = task.formatContext,
7202
7249
  previousContext = task.context,
@@ -7214,36 +7261,33 @@ function renderNode(request, task, node, childIndex) {
7214
7261
  thrownValue === SuspenseException
7215
7262
  ? getSuspendedThenable()
7216
7263
  : thrownValue),
7217
- "object" === typeof childIndex &&
7218
- null !== childIndex &&
7219
- "function" === typeof childIndex.then)
7264
+ "object" === typeof childIndex && null !== childIndex)
7220
7265
  ) {
7221
- node = childIndex;
7222
- childIndex = getThenableStateAfterSuspending();
7223
- request = createReplayTask(
7224
- request,
7225
- childIndex,
7226
- task.replay,
7227
- task.node,
7228
- task.childIndex,
7229
- task.blockedBoundary,
7230
- task.hoistableState,
7231
- task.abortSet,
7232
- task.keyPath,
7233
- task.formatContext,
7234
- task.context,
7235
- task.treeContext,
7236
- task.componentStack,
7237
- task.isFallback
7238
- ).ping;
7239
- node.then(request, request);
7240
- task.formatContext = previousFormatContext;
7241
- task.context = previousContext;
7242
- task.keyPath = previousKeyPath;
7243
- task.treeContext = previousTreeContext;
7244
- task.componentStack = previousComponentStack;
7245
- switchContext(previousContext);
7246
- return;
7266
+ if ("function" === typeof childIndex.then) {
7267
+ node = childIndex;
7268
+ childIndex = getThenableStateAfterSuspending();
7269
+ request = spawnNewSuspendedReplayTask(request, task, childIndex).ping;
7270
+ node.then(request, request);
7271
+ task.formatContext = previousFormatContext;
7272
+ task.context = previousContext;
7273
+ task.keyPath = previousKeyPath;
7274
+ task.treeContext = previousTreeContext;
7275
+ task.componentStack = previousComponentStack;
7276
+ switchContext(previousContext);
7277
+ return;
7278
+ }
7279
+ if ("Maximum call stack size exceeded" === childIndex.message) {
7280
+ node = getThenableStateAfterSuspending();
7281
+ node = spawnNewSuspendedReplayTask(request, task, node);
7282
+ request.pingedTasks.push(node);
7283
+ task.formatContext = previousFormatContext;
7284
+ task.context = previousContext;
7285
+ task.keyPath = previousKeyPath;
7286
+ task.treeContext = previousTreeContext;
7287
+ task.componentStack = previousComponentStack;
7288
+ switchContext(previousContext);
7289
+ return;
7290
+ }
7247
7291
  }
7248
7292
  }
7249
7293
  else {
@@ -7251,47 +7295,21 @@ function renderNode(request, task, node, childIndex) {
7251
7295
  chunkLength = segment.chunks.length;
7252
7296
  try {
7253
7297
  return renderNodeDestructive(request, task, node, childIndex);
7254
- } catch (thrownValue$103) {
7298
+ } catch (thrownValue$109) {
7255
7299
  if (
7256
7300
  (resetHooksState(),
7257
7301
  (segment.children.length = childrenLength),
7258
7302
  (segment.chunks.length = chunkLength),
7259
7303
  (childIndex =
7260
- thrownValue$103 === SuspenseException
7304
+ thrownValue$109 === SuspenseException
7261
7305
  ? getSuspendedThenable()
7262
- : thrownValue$103),
7306
+ : thrownValue$109),
7263
7307
  "object" === typeof childIndex && null !== childIndex)
7264
7308
  ) {
7265
7309
  if ("function" === typeof childIndex.then) {
7266
7310
  node = childIndex;
7267
7311
  childIndex = getThenableStateAfterSuspending();
7268
- segment = task.blockedSegment;
7269
- childrenLength = createPendingSegment(
7270
- request,
7271
- segment.chunks.length,
7272
- null,
7273
- task.formatContext,
7274
- segment.lastPushedText,
7275
- !0
7276
- );
7277
- segment.children.push(childrenLength);
7278
- segment.lastPushedText = !1;
7279
- request = createRenderTask(
7280
- request,
7281
- childIndex,
7282
- task.node,
7283
- task.childIndex,
7284
- task.blockedBoundary,
7285
- childrenLength,
7286
- task.hoistableState,
7287
- task.abortSet,
7288
- task.keyPath,
7289
- task.formatContext,
7290
- task.context,
7291
- task.treeContext,
7292
- task.componentStack,
7293
- task.isFallback
7294
- ).ping;
7312
+ request = spawnNewSuspendedRenderTask(request, task, childIndex).ping;
7295
7313
  node.then(request, request);
7296
7314
  task.formatContext = previousFormatContext;
7297
7315
  task.context = previousContext;
@@ -7329,6 +7347,18 @@ function renderNode(request, task, node, childIndex) {
7329
7347
  switchContext(previousContext);
7330
7348
  return;
7331
7349
  }
7350
+ if ("Maximum call stack size exceeded" === childIndex.message) {
7351
+ node = getThenableStateAfterSuspending();
7352
+ node = spawnNewSuspendedRenderTask(request, task, node);
7353
+ request.pingedTasks.push(node);
7354
+ task.formatContext = previousFormatContext;
7355
+ task.context = previousContext;
7356
+ task.keyPath = previousKeyPath;
7357
+ task.treeContext = previousTreeContext;
7358
+ task.componentStack = previousComponentStack;
7359
+ switchContext(previousContext);
7360
+ return;
7361
+ }
7332
7362
  }
7333
7363
  }
7334
7364
  }
@@ -7468,16 +7498,16 @@ function abortTask(task, request, error) {
7468
7498
  } else {
7469
7499
  boundary.pendingTasks--;
7470
7500
  replay = getThrownInfo(task.componentStack);
7471
- var trackedPostpones$107 = request.trackedPostpones;
7501
+ var trackedPostpones$113 = request.trackedPostpones;
7472
7502
  if (4 !== boundary.status) {
7473
- if (null !== trackedPostpones$107 && null !== segment)
7503
+ if (null !== trackedPostpones$113 && null !== segment)
7474
7504
  return (
7475
7505
  "object" === typeof error &&
7476
7506
  null !== error &&
7477
7507
  error.$$typeof === REACT_POSTPONE_TYPE
7478
7508
  ? logPostpone(request, error.message, replay)
7479
7509
  : logRecoverableError(request, error, replay),
7480
- trackPostpone(request, trackedPostpones$107, task, segment),
7510
+ trackPostpone(request, trackedPostpones$113, task, segment),
7481
7511
  boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
7482
7512
  return abortTask(fallbackTask, request, error);
7483
7513
  }),
@@ -7772,13 +7802,13 @@ function performWork(request$jscomp$1) {
7772
7802
  null !== request.trackedPostpones &&
7773
7803
  x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE
7774
7804
  ) {
7775
- var trackedPostpones$111 = request.trackedPostpones;
7805
+ var trackedPostpones$117 = request.trackedPostpones;
7776
7806
  task.abortSet.delete(task);
7777
7807
  var postponeInfo = getThrownInfo(task.componentStack);
7778
7808
  logPostpone(request, x$jscomp$0.message, postponeInfo);
7779
7809
  trackPostpone(
7780
7810
  request,
7781
- trackedPostpones$111,
7811
+ trackedPostpones$117,
7782
7812
  task,
7783
7813
  segment$jscomp$0
7784
7814
  );
@@ -8210,11 +8240,11 @@ function flushCompletedQueues(request, destination) {
8210
8240
  completedBoundaries.splice(0, i);
8211
8241
  var partialBoundaries = request.partialBoundaries;
8212
8242
  for (i = 0; i < partialBoundaries.length; i++) {
8213
- var boundary$114 = partialBoundaries[i];
8243
+ var boundary$120 = partialBoundaries[i];
8214
8244
  a: {
8215
8245
  clientRenderedBoundaries = request;
8216
8246
  boundary = destination;
8217
- var completedSegments = boundary$114.completedSegments;
8247
+ var completedSegments = boundary$120.completedSegments;
8218
8248
  for (
8219
8249
  JSCompiler_inline_result = 0;
8220
8250
  JSCompiler_inline_result < completedSegments.length;
@@ -8224,7 +8254,7 @@ function flushCompletedQueues(request, destination) {
8224
8254
  !flushPartiallyCompletedSegment(
8225
8255
  clientRenderedBoundaries,
8226
8256
  boundary,
8227
- boundary$114,
8257
+ boundary$120,
8228
8258
  completedSegments[JSCompiler_inline_result]
8229
8259
  )
8230
8260
  ) {
@@ -8236,7 +8266,7 @@ function flushCompletedQueues(request, destination) {
8236
8266
  completedSegments.splice(0, JSCompiler_inline_result);
8237
8267
  JSCompiler_inline_result$jscomp$0 = writeHoistablesForBoundary(
8238
8268
  boundary,
8239
- boundary$114.contentState,
8269
+ boundary$120.contentState,
8240
8270
  clientRenderedBoundaries.renderState
8241
8271
  );
8242
8272
  }
@@ -8308,8 +8338,8 @@ function abort(request, reason) {
8308
8338
  }
8309
8339
  null !== request.destination &&
8310
8340
  flushCompletedQueues(request, request.destination);
8311
- } catch (error$116) {
8312
- logRecoverableError(request, error$116, {}), fatalError(request, error$116);
8341
+ } catch (error$122) {
8342
+ logRecoverableError(request, error$122, {}), fatalError(request, error$122);
8313
8343
  }
8314
8344
  }
8315
8345
  function addToReplayParent(node, parentKeyPath, trackedPostpones) {
@@ -8629,4 +8659,4 @@ exports.experimental_renderToHTML = function (children, options) {
8629
8659
  });
8630
8660
  });
8631
8661
  };
8632
- exports.version = "19.0.0-experimental-f65ac7bd-20240826";
8662
+ exports.version = "19.0.0-experimental-7771d3a7-20240827";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-markup",
3
- "version": "0.0.0-experimental-f65ac7bd-20240826",
3
+ "version": "0.0.0-experimental-7771d3a7-20240827",
4
4
  "description": "React package generating embedded markup such as e-mails with support for Server Components.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "homepage": "https://react.dev/",
19
19
  "peerDependencies": {
20
- "react": "0.0.0-experimental-f65ac7bd-20240826"
20
+ "react": "0.0.0-experimental-7771d3a7-20240827"
21
21
  },
22
22
  "files": [
23
23
  "LICENSE",