react-markup 0.0.0-experimental-a960b92c-20240819 → 0.0.0-experimental-eb3ad065-20240822

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.
@@ -873,8 +873,10 @@
873
873
  return (
874
874
  request.abortableTasks.delete(newTask),
875
875
  (newTask.status = ABORTED$1),
876
- (task = stringify(serializeByValueID$1(request.fatalError))),
877
- emitModelChunk(request, newTask.id, task),
876
+ request.type === PRERENDER
877
+ ? request.pendingChunks--
878
+ : ((task = stringify(serializeByValueID$1(request.fatalError))),
879
+ emitModelChunk(request, newTask.id, task)),
878
880
  newTask.id
879
881
  );
880
882
  "string" !== typeof thenable.status &&
@@ -1679,37 +1681,45 @@
1679
1681
  null !== parent &&
1680
1682
  (parent.$$typeof === REACT_ELEMENT_TYPE ||
1681
1683
  parent.$$typeof === REACT_LAZY_TYPE);
1684
+ if (request.status === ABORTING$1) {
1685
+ task.status = ABORTED$1;
1686
+ if (request.type === PRERENDER)
1687
+ return (
1688
+ (task = request.nextChunkId++),
1689
+ (task = parent
1690
+ ? "$L" + task.toString(16)
1691
+ : serializeByValueID$1(task)),
1692
+ task
1693
+ );
1694
+ task = request.fatalError;
1695
+ return parent ? "$L" + task.toString(16) : serializeByValueID$1(task);
1696
+ }
1682
1697
  key =
1683
1698
  thrownValue === SuspenseException$1
1684
1699
  ? getSuspendedThenable$1()
1685
1700
  : thrownValue;
1686
1701
  if ("object" === typeof key && null !== key) {
1687
- if ("function" === typeof key.then) {
1688
- if (request.status === ABORTING$1)
1689
- return (
1690
- (task.status = ABORTED$1),
1691
- (task = request.fatalError),
1692
- parent ? "$L" + task.toString(16) : serializeByValueID$1(task)
1693
- );
1694
- request = createTask(
1695
- request,
1696
- task.model,
1697
- task.keyPath,
1698
- task.implicitSlot,
1699
- request.abortableTasks,
1700
- task.debugOwner,
1701
- task.debugStack,
1702
- task.debugTask
1702
+ if ("function" === typeof key.then)
1703
+ return (
1704
+ (request = createTask(
1705
+ request,
1706
+ task.model,
1707
+ task.keyPath,
1708
+ task.implicitSlot,
1709
+ request.abortableTasks,
1710
+ task.debugOwner,
1711
+ task.debugStack,
1712
+ task.debugTask
1713
+ )),
1714
+ (value = request.ping),
1715
+ key.then(value, value),
1716
+ (request.thenableState = getThenableStateAfterSuspending$1()),
1717
+ (task.keyPath = prevKeyPath),
1718
+ (task.implicitSlot = prevImplicitSlot),
1719
+ parent
1720
+ ? "$L" + request.id.toString(16)
1721
+ : serializeByValueID$1(request.id)
1703
1722
  );
1704
- value = request.ping;
1705
- key.then(value, value);
1706
- request.thenableState = getThenableStateAfterSuspending$1();
1707
- task.keyPath = prevKeyPath;
1708
- task.implicitSlot = prevImplicitSlot;
1709
- return parent
1710
- ? "$L" + request.id.toString(16)
1711
- : serializeByValueID$1(request.id);
1712
- }
1713
1723
  if (key.$$typeof === REACT_POSTPONE_TYPE)
1714
1724
  return (
1715
1725
  request.pendingChunks++,
@@ -1721,12 +1731,6 @@
1721
1731
  parent ? "$L" + value.toString(16) : serializeByValueID$1(value)
1722
1732
  );
1723
1733
  }
1724
- if (request.status === ABORTING$1)
1725
- return (
1726
- (task.status = ABORTED$1),
1727
- (task = request.fatalError),
1728
- parent ? "$L" + task.toString(16) : serializeByValueID$1(task)
1729
- );
1730
1734
  task.keyPath = prevKeyPath;
1731
1735
  task.implicitSlot = prevImplicitSlot;
1732
1736
  request.pendingChunks++;
@@ -2453,39 +2457,38 @@
2453
2457
  request.abortableTasks.delete(task);
2454
2458
  task.status = COMPLETED$1;
2455
2459
  } catch (thrownValue) {
2456
- var x =
2457
- thrownValue === SuspenseException$1
2458
- ? getSuspendedThenable$1()
2459
- : thrownValue;
2460
- if ("object" === typeof x && null !== x) {
2461
- if ("function" === typeof x.then) {
2462
- if (request.status === ABORTING$1) {
2460
+ if (request.status === ABORTING$1)
2461
+ if (
2462
+ (request.abortableTasks.delete(task),
2463
+ (task.status = ABORTED$1),
2464
+ request.type === PRERENDER)
2465
+ )
2466
+ request.pendingChunks--;
2467
+ else {
2468
+ var model = stringify(serializeByValueID$1(request.fatalError));
2469
+ emitModelChunk(request, task.id, model);
2470
+ }
2471
+ else {
2472
+ var x =
2473
+ thrownValue === SuspenseException$1
2474
+ ? getSuspendedThenable$1()
2475
+ : thrownValue;
2476
+ if ("object" === typeof x && null !== x) {
2477
+ if ("function" === typeof x.then) {
2478
+ task.status = PENDING$3;
2479
+ task.thenableState = getThenableStateAfterSuspending$1();
2480
+ var ping = task.ping;
2481
+ x.then(ping, ping);
2482
+ return;
2483
+ }
2484
+ if (x.$$typeof === REACT_POSTPONE_TYPE) {
2463
2485
  request.abortableTasks.delete(task);
2464
- task.status = ABORTED$1;
2465
- var model = stringify(serializeByValueID$1(request.fatalError));
2466
- emitModelChunk(request, task.id, model);
2486
+ task.status = ERRORED$2;
2487
+ logPostpone$1(request, x.message, task);
2488
+ emitPostponeChunk(request, task.id, x);
2467
2489
  return;
2468
2490
  }
2469
- task.status = PENDING$3;
2470
- task.thenableState = getThenableStateAfterSuspending$1();
2471
- var ping = task.ping;
2472
- x.then(ping, ping);
2473
- return;
2474
2491
  }
2475
- if (x.$$typeof === REACT_POSTPONE_TYPE) {
2476
- request.abortableTasks.delete(task);
2477
- task.status = ERRORED$2;
2478
- logPostpone$1(request, x.message, task);
2479
- emitPostponeChunk(request, task.id, x);
2480
- return;
2481
- }
2482
- }
2483
- if (request.status === ABORTING$1) {
2484
- request.abortableTasks.delete(task);
2485
- task.status = ABORTED$1;
2486
- var _model = stringify(serializeByValueID$1(request.fatalError));
2487
- emitModelChunk(request, task.id, _model);
2488
- } else {
2489
2492
  request.abortableTasks.delete(task);
2490
2493
  task.status = ERRORED$2;
2491
2494
  var digest = logRecoverableError$1(request, x, task);
@@ -2531,6 +2534,13 @@
2531
2534
  (currentRequest = prevRequest);
2532
2535
  }
2533
2536
  }
2537
+ function abortTask$1(task, request, errorId) {
2538
+ task.status !== RENDERING$1 &&
2539
+ ((task.status = ABORTED$1),
2540
+ (errorId = serializeByValueID$1(errorId)),
2541
+ (task = encodeReferenceChunk(request, task.id, errorId)),
2542
+ request.completedErrorChunks.push(task));
2543
+ }
2534
2544
  function flushCompletedChunks(request, destination) {
2535
2545
  try {
2536
2546
  for (
@@ -2610,17 +2620,28 @@
2610
2620
  10 === request.status && (request.status = ABORTING$1);
2611
2621
  var abortableTasks = request.abortableTasks;
2612
2622
  if (0 < abortableTasks.size) {
2613
- var errorId = request.nextChunkId++;
2614
- request.fatalError = errorId;
2615
2623
  if (
2616
2624
  "object" === typeof reason &&
2617
2625
  null !== reason &&
2618
2626
  reason.$$typeof === REACT_POSTPONE_TYPE
2619
2627
  )
2620
- logPostpone$1(request, reason.message, null),
2621
- request.type === PRERENDER &&
2622
- (request.pendingChunks++,
2623
- emitPostponeChunk(request, errorId, reason));
2628
+ if (
2629
+ (logPostpone$1(request, reason.message, null),
2630
+ request.type === PRERENDER)
2631
+ )
2632
+ abortableTasks.forEach(function (task) {
2633
+ task.status !== RENDERING$1 &&
2634
+ ((task.status = ABORTED$1), request.pendingChunks--);
2635
+ });
2636
+ else {
2637
+ var errorId = request.nextChunkId++;
2638
+ request.fatalError = errorId;
2639
+ request.pendingChunks++;
2640
+ emitPostponeChunk(request, errorId, reason);
2641
+ abortableTasks.forEach(function (task) {
2642
+ return abortTask$1(task, request, errorId);
2643
+ });
2644
+ }
2624
2645
  else {
2625
2646
  var error =
2626
2647
  void 0 === reason
@@ -2635,18 +2656,21 @@
2635
2656
  )
2636
2657
  : reason,
2637
2658
  digest = logRecoverableError$1(request, error, null);
2638
- 20 === request.type &&
2639
- (request.pendingChunks++,
2640
- emitErrorChunk(request, errorId, digest, error));
2641
- }
2642
- abortableTasks.forEach(function (task) {
2643
- if (task.status !== RENDERING$1) {
2644
- task.status = ABORTED$1;
2645
- var ref = serializeByValueID$1(errorId);
2646
- task = encodeReferenceChunk(request, task.id, ref);
2647
- request.completedErrorChunks.push(task);
2659
+ if (request.type === PRERENDER)
2660
+ abortableTasks.forEach(function (task) {
2661
+ task.status !== RENDERING$1 &&
2662
+ ((task.status = ABORTED$1), request.pendingChunks--);
2663
+ });
2664
+ else {
2665
+ var _errorId2 = request.nextChunkId++;
2666
+ request.fatalError = _errorId2;
2667
+ request.pendingChunks++;
2668
+ emitErrorChunk(request, _errorId2, digest, error);
2669
+ abortableTasks.forEach(function (task) {
2670
+ return abortTask$1(task, request, _errorId2);
2671
+ });
2648
2672
  }
2649
- });
2673
+ }
2650
2674
  abortableTasks.clear();
2651
2675
  var onAllReady = request.onAllReady;
2652
2676
  onAllReady();
@@ -10292,8 +10316,13 @@
10292
10316
  )),
10293
10317
  logRecoverableError(request, task, boundary, null),
10294
10318
  fatalError(request, task, boundary, null)))
10295
- : (logRecoverableError(request, error, boundary, null),
10296
- fatalError(request, error, boundary, null));
10319
+ : null !== request.trackedPostpones && null !== segment
10320
+ ? ((replay = request.trackedPostpones),
10321
+ logRecoverableError(request, error, boundary, null),
10322
+ trackPostpone(request, replay, task, segment),
10323
+ finishedTask(request, null, segment))
10324
+ : (logRecoverableError(request, error, boundary, null),
10325
+ fatalError(request, error, boundary, null));
10297
10326
  return;
10298
10327
  }
10299
10328
  replay.pendingTasks--;
@@ -10318,25 +10347,54 @@
10318
10347
  request.pendingRootTasks--;
10319
10348
  0 === request.pendingRootTasks && completeShell(request);
10320
10349
  }
10321
- } else
10322
- boundary.pendingTasks--,
10323
- 4 !== boundary.status &&
10324
- ((boundary.status = 4),
10325
- (task = getThrownInfo(task.componentStack)),
10350
+ } else {
10351
+ boundary.pendingTasks--;
10352
+ replay = getThrownInfo(task.componentStack);
10353
+ var _trackedPostpones2 = request.trackedPostpones;
10354
+ if (4 !== boundary.status) {
10355
+ if (null !== _trackedPostpones2 && null !== segment)
10356
+ return (
10357
+ "object" === typeof error &&
10358
+ null !== error &&
10359
+ error.$$typeof === REACT_POSTPONE_TYPE
10360
+ ? logPostpone(request, error.message, replay, null)
10361
+ : logRecoverableError(request, error, replay, null),
10362
+ trackPostpone(request, _trackedPostpones2, task, segment),
10363
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
10364
+ return abortTask(fallbackTask, request, error);
10365
+ }),
10366
+ boundary.fallbackAbortableTasks.clear(),
10367
+ finishedTask(request, boundary, segment)
10368
+ );
10369
+ boundary.status = 4;
10370
+ if (
10326
10371
  "object" === typeof error &&
10327
10372
  null !== error &&
10328
10373
  error.$$typeof === REACT_POSTPONE_TYPE
10329
- ? (logPostpone(request, error.message, task, null),
10330
- (segment = "POSTPONE"))
10331
- : (segment = logRecoverableError(request, error, task, null)),
10332
- encodeErrorForBoundary(boundary, segment, error, task, !0),
10333
- untrackBoundary(request, boundary),
10334
- boundary.parentFlushed &&
10335
- request.clientRenderedBoundaries.push(boundary)),
10336
- boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
10337
- return abortTask(fallbackTask, request, error);
10338
- }),
10339
- boundary.fallbackAbortableTasks.clear();
10374
+ ) {
10375
+ logPostpone(request, error.message, replay, null);
10376
+ if (null !== request.trackedPostpones && null !== segment) {
10377
+ trackPostpone(request, request.trackedPostpones, task, segment);
10378
+ finishedTask(request, task.blockedBoundary, segment);
10379
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
10380
+ return abortTask(fallbackTask, request, error);
10381
+ });
10382
+ boundary.fallbackAbortableTasks.clear();
10383
+ return;
10384
+ }
10385
+ task = "POSTPONE";
10386
+ } else task = logRecoverableError(request, error, replay, null);
10387
+ boundary.status = 4;
10388
+ encodeErrorForBoundary(boundary, task, error, replay, !0);
10389
+ untrackBoundary(request, boundary);
10390
+ boundary.parentFlushed &&
10391
+ request.clientRenderedBoundaries.push(boundary);
10392
+ }
10393
+ boundary.fallbackAbortableTasks.forEach(function (fallbackTask) {
10394
+ return abortTask(fallbackTask, request, error);
10395
+ });
10396
+ boundary.fallbackAbortableTasks.clear();
10397
+ }
10340
10398
  request.allPendingTasks--;
10341
10399
  0 === request.allPendingTasks && completeAll(request);
10342
10400
  }
@@ -10591,89 +10649,129 @@
10591
10649
  : 1 === request.status
10592
10650
  ? request.fatalError
10593
10651
  : thrownValue;
10594
- if ("object" === typeof x$jscomp$0 && null !== x$jscomp$0) {
10595
- if ("function" === typeof x$jscomp$0.then) {
10596
- segment$jscomp$0.status = 0;
10597
- task$jscomp$0.thenableState =
10598
- getThenableStateAfterSuspending();
10599
- var ping$jscomp$0 = task$jscomp$0.ping;
10600
- x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
10601
- break a;
10602
- }
10603
- if (
10604
- null !== request.trackedPostpones &&
10605
- x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE
10606
- ) {
10607
- var trackedPostpones = request.trackedPostpones;
10608
- task$jscomp$0.abortSet.delete(task$jscomp$0);
10609
- var postponeInfo = getThrownInfo(
10652
+ if (
10653
+ 1 === request.status &&
10654
+ null !== request.trackedPostpones
10655
+ ) {
10656
+ var trackedPostpones = request.trackedPostpones,
10657
+ thrownInfo = getThrownInfo(
10610
10658
  task$jscomp$0.componentStack
10611
10659
  );
10612
- logPostpone(
10613
- request,
10614
- x$jscomp$0.message,
10615
- postponeInfo,
10616
- task$jscomp$0.debugTask
10617
- );
10618
- trackPostpone(
10619
- request,
10620
- trackedPostpones,
10621
- task$jscomp$0,
10622
- segment$jscomp$0
10623
- );
10624
- finishedTask(
10625
- request,
10626
- task$jscomp$0.blockedBoundary,
10627
- segment$jscomp$0
10628
- );
10629
- break a;
10630
- }
10631
- }
10632
- var errorInfo$jscomp$0 = getThrownInfo(
10633
- task$jscomp$0.componentStack
10634
- );
10635
- task$jscomp$0.abortSet.delete(task$jscomp$0);
10636
- segment$jscomp$0.status = 4;
10637
- var boundary = task$jscomp$0.blockedBoundary,
10638
- debugTask = task$jscomp$0.debugTask;
10639
- "object" === typeof x$jscomp$0 &&
10640
- null !== x$jscomp$0 &&
10641
- x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE
10642
- ? (logPostpone(
10643
- request,
10644
- x$jscomp$0.message,
10645
- errorInfo$jscomp$0,
10646
- debugTask
10647
- ),
10648
- (prevTaskInDEV = "POSTPONE"))
10649
- : (prevTaskInDEV = logRecoverableError(
10650
- request,
10651
- x$jscomp$0,
10652
- errorInfo$jscomp$0,
10653
- debugTask
10654
- ));
10655
- null === boundary
10656
- ? fatalError(
10657
- request,
10658
- x$jscomp$0,
10659
- errorInfo$jscomp$0,
10660
- debugTask
10661
- )
10662
- : (boundary.pendingTasks--,
10663
- 4 !== boundary.status &&
10664
- ((boundary.status = 4),
10665
- encodeErrorForBoundary(
10666
- boundary,
10667
- prevTaskInDEV,
10660
+ task$jscomp$0.abortSet.delete(task$jscomp$0);
10661
+ "object" === typeof x$jscomp$0 &&
10662
+ null !== x$jscomp$0 &&
10663
+ x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE
10664
+ ? logPostpone(
10665
+ request,
10666
+ x$jscomp$0.message,
10667
+ thrownInfo,
10668
+ task$jscomp$0.debugTask
10669
+ )
10670
+ : logRecoverableError(
10671
+ request,
10668
10672
  x$jscomp$0,
10673
+ thrownInfo,
10674
+ task$jscomp$0.debugTask
10675
+ );
10676
+ trackPostpone(
10677
+ request,
10678
+ trackedPostpones,
10679
+ task$jscomp$0,
10680
+ segment$jscomp$0
10681
+ );
10682
+ finishedTask(
10683
+ request,
10684
+ task$jscomp$0.blockedBoundary,
10685
+ segment$jscomp$0
10686
+ );
10687
+ } else {
10688
+ if (
10689
+ "object" === typeof x$jscomp$0 &&
10690
+ null !== x$jscomp$0
10691
+ ) {
10692
+ if ("function" === typeof x$jscomp$0.then) {
10693
+ segment$jscomp$0.status = 0;
10694
+ task$jscomp$0.thenableState =
10695
+ getThenableStateAfterSuspending();
10696
+ var ping$jscomp$0 = task$jscomp$0.ping;
10697
+ x$jscomp$0.then(ping$jscomp$0, ping$jscomp$0);
10698
+ break a;
10699
+ }
10700
+ if (
10701
+ null !== request.trackedPostpones &&
10702
+ x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE
10703
+ ) {
10704
+ var _trackedPostpones3 = request.trackedPostpones;
10705
+ task$jscomp$0.abortSet.delete(task$jscomp$0);
10706
+ var postponeInfo = getThrownInfo(
10707
+ task$jscomp$0.componentStack
10708
+ );
10709
+ logPostpone(
10710
+ request,
10711
+ x$jscomp$0.message,
10712
+ postponeInfo,
10713
+ task$jscomp$0.debugTask
10714
+ );
10715
+ trackPostpone(
10716
+ request,
10717
+ _trackedPostpones3,
10718
+ task$jscomp$0,
10719
+ segment$jscomp$0
10720
+ );
10721
+ finishedTask(
10722
+ request,
10723
+ task$jscomp$0.blockedBoundary,
10724
+ segment$jscomp$0
10725
+ );
10726
+ break a;
10727
+ }
10728
+ }
10729
+ var errorInfo$jscomp$0 = getThrownInfo(
10730
+ task$jscomp$0.componentStack
10731
+ );
10732
+ task$jscomp$0.abortSet.delete(task$jscomp$0);
10733
+ segment$jscomp$0.status = 4;
10734
+ var boundary = task$jscomp$0.blockedBoundary,
10735
+ debugTask = task$jscomp$0.debugTask;
10736
+ "object" === typeof x$jscomp$0 &&
10737
+ null !== x$jscomp$0 &&
10738
+ x$jscomp$0.$$typeof === REACT_POSTPONE_TYPE
10739
+ ? (logPostpone(
10740
+ request,
10741
+ x$jscomp$0.message,
10669
10742
  errorInfo$jscomp$0,
10670
- !1
10743
+ debugTask
10671
10744
  ),
10672
- untrackBoundary(request, boundary),
10673
- boundary.parentFlushed &&
10674
- request.clientRenderedBoundaries.push(boundary)));
10675
- request.allPendingTasks--;
10676
- 0 === request.allPendingTasks && completeAll(request);
10745
+ (prevTaskInDEV = "POSTPONE"))
10746
+ : (prevTaskInDEV = logRecoverableError(
10747
+ request,
10748
+ x$jscomp$0,
10749
+ errorInfo$jscomp$0,
10750
+ debugTask
10751
+ ));
10752
+ null === boundary
10753
+ ? fatalError(
10754
+ request,
10755
+ x$jscomp$0,
10756
+ errorInfo$jscomp$0,
10757
+ debugTask
10758
+ )
10759
+ : (boundary.pendingTasks--,
10760
+ 4 !== boundary.status &&
10761
+ ((boundary.status = 4),
10762
+ encodeErrorForBoundary(
10763
+ boundary,
10764
+ prevTaskInDEV,
10765
+ x$jscomp$0,
10766
+ errorInfo$jscomp$0,
10767
+ !1
10768
+ ),
10769
+ untrackBoundary(request, boundary),
10770
+ boundary.parentFlushed &&
10771
+ request.clientRenderedBoundaries.push(boundary)));
10772
+ request.allPendingTasks--;
10773
+ 0 === request.allPendingTasks && completeAll(request);
10774
+ }
10677
10775
  } finally {
10678
10776
  currentTaskInDEV = request$jscomp$0;
10679
10777
  }
@@ -11227,9 +11325,10 @@
11227
11325
  }
11228
11326
  function startWork(request) {
11229
11327
  request.flushScheduled = null !== request.destination;
11230
- performWork(request);
11231
- null === request.trackedPostpones &&
11232
- safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks);
11328
+ null !== request.trackedPostpones
11329
+ ? performWork(request)
11330
+ : (performWork(request),
11331
+ safelyEmitEarlyPreloads(request, 0 === request.pendingRootTasks));
11233
11332
  }
11234
11333
  function startFlowing(request, destination) {
11235
11334
  if (2 === request.status)
@@ -12846,5 +12945,5 @@
12846
12945
  });
12847
12946
  });
12848
12947
  };
12849
- exports.version = "19.0.0-experimental-a960b92c-20240819";
12948
+ exports.version = "19.0.0-experimental-eb3ad065-20240822";
12850
12949
  })();