react-markup 0.0.0-experimental-6ebfd5b0-20240818 → 0.0.0-experimental-a960b92c-20240819

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.
@@ -8511,5 +8511,5 @@
8511
8511
  });
8512
8512
  });
8513
8513
  };
8514
- exports.version = "19.0.0-experimental-6ebfd5b0-20240818";
8514
+ exports.version = "19.0.0-experimental-a960b92c-20240819";
8515
8515
  })();
@@ -5617,4 +5617,4 @@ exports.experimental_renderToHTML = function (children, options) {
5617
5617
  });
5618
5618
  });
5619
5619
  };
5620
- exports.version = "19.0.0-experimental-6ebfd5b0-20240818";
5620
+ exports.version = "19.0.0-experimental-a960b92c-20240819";
@@ -760,6 +760,7 @@
760
760
  }
761
761
  function defaultPostponeHandler() {}
762
762
  function RequestInstance$1(
763
+ type,
763
764
  model,
764
765
  bundlerConfig,
765
766
  onError,
@@ -784,7 +785,8 @@
784
785
  pingedTasks = [],
785
786
  cleanupQueue = [];
786
787
  TaintRegistryPendingRequests.add(cleanupQueue);
787
- this.status = 0;
788
+ this.type = type;
789
+ this.status = 10;
788
790
  this.flushScheduled = !1;
789
791
  this.destination = this.fatalError = null;
790
792
  this.bundlerConfig = bundlerConfig;
@@ -809,8 +811,8 @@
809
811
  this.onError = void 0 === onError ? defaultErrorHandler$1 : onError;
810
812
  this.onPostpone =
811
813
  void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
812
- this.onAllReady = void 0 === onAllReady ? noop$3 : onAllReady;
813
- this.onFatalError = void 0 === onFatalError ? noop$3 : onFatalError;
814
+ this.onAllReady = onAllReady;
815
+ this.onFatalError = onFatalError;
814
816
  this.environmentName =
815
817
  void 0 === environmentName
816
818
  ? function () {
@@ -826,8 +828,8 @@
826
828
  ? defaultFilterStackFrame
827
829
  : filterStackFrame;
828
830
  this.didWarnForKey = null;
829
- model = createTask(this, model, null, !1, abortSet, null, null, null);
830
- pingedTasks.push(model);
831
+ type = createTask(this, model, null, !1, abortSet, null, null, null);
832
+ pingedTasks.push(type);
831
833
  }
832
834
  function noop$3() {}
833
835
  function serializeThenable(request, task, thenable) {
@@ -871,14 +873,8 @@
871
873
  return (
872
874
  request.abortableTasks.delete(newTask),
873
875
  (newTask.status = ABORTED$1),
874
- request.fatalError === haltSymbol
875
- ? emitModelChunk(
876
- request,
877
- newTask.id,
878
- reusableInfinitePromiseModel
879
- )
880
- : ((task = stringify(serializeByValueID$1(request.fatalError))),
881
- emitModelChunk(request, newTask.id, task)),
876
+ (task = stringify(serializeByValueID$1(request.fatalError))),
877
+ emitModelChunk(request, newTask.id, task),
882
878
  newTask.id
883
879
  );
884
880
  "string" !== typeof thenable.status &&
@@ -923,7 +919,7 @@
923
919
  function progress(entry) {
924
920
  if (!aborted)
925
921
  if (entry.done)
926
- request.abortListeners.delete(error),
922
+ request.abortListeners.delete(abortStream),
927
923
  (entry = streamTask.id.toString(16) + ":C\n"),
928
924
  request.completedRegularChunks.push(entry),
929
925
  enqueueFlush(request),
@@ -942,25 +938,35 @@
942
938
  function error(reason) {
943
939
  if (!aborted) {
944
940
  aborted = !0;
945
- request.abortListeners.delete(error);
946
- if (request.fatalError === haltSymbol) var cancelWith = reason;
941
+ request.abortListeners.delete(abortStream);
942
+ var digest = logRecoverableError$1(request, reason, streamTask);
943
+ emitErrorChunk(request, streamTask.id, digest, reason);
944
+ enqueueFlush(request);
945
+ reader.cancel(reason).then(error, error);
946
+ }
947
+ }
948
+ function abortStream(reason) {
949
+ if (!aborted) {
950
+ aborted = !0;
951
+ request.abortListeners.delete(abortStream);
952
+ if (
953
+ "object" === typeof reason &&
954
+ null !== reason &&
955
+ reason.$$typeof === REACT_POSTPONE_TYPE
956
+ )
957
+ logPostpone$1(request, reason.message, streamTask),
958
+ request.type === PRERENDER
959
+ ? request.pendingChunks--
960
+ : (emitPostponeChunk(request, streamTask.id, reason),
961
+ enqueueFlush(request));
947
962
  else {
948
- if (
949
- "object" === typeof reason &&
950
- null !== reason &&
951
- reason.$$typeof === REACT_POSTPONE_TYPE
952
- )
953
- (cancelWith = reason),
954
- logPostpone$1(request, reason.message, streamTask),
955
- emitPostponeChunk(request, streamTask.id, reason);
956
- else {
957
- cancelWith = reason;
958
- var digest = logRecoverableError$1(request, reason, streamTask);
959
- emitErrorChunk(request, streamTask.id, digest, reason);
960
- }
961
- enqueueFlush(request);
963
+ var digest = logRecoverableError$1(request, reason, streamTask);
964
+ request.type === PRERENDER
965
+ ? request.pendingChunks--
966
+ : (emitErrorChunk(request, streamTask.id, digest, reason),
967
+ enqueueFlush(request));
962
968
  }
963
- reader.cancel(cancelWith).then(error, error);
969
+ reader.cancel(reason).then(error, error);
964
970
  }
965
971
  }
966
972
  var supportsBYOB = stream.supportsBYOB;
@@ -987,7 +993,7 @@
987
993
  streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n";
988
994
  request.completedRegularChunks.push(task);
989
995
  var aborted = !1;
990
- request.abortListeners.add(error);
996
+ request.abortListeners.add(abortStream);
991
997
  reader.read().then(progress, error);
992
998
  return serializeByValueID$1(streamTask.id);
993
999
  }
@@ -995,7 +1001,7 @@
995
1001
  function progress(entry) {
996
1002
  if (!aborted)
997
1003
  if (entry.done) {
998
- request.abortListeners.delete(error);
1004
+ request.abortListeners.delete(abortIterable);
999
1005
  if (void 0 === entry.value)
1000
1006
  var endStreamRow = streamTask.id.toString(16) + ":C\n";
1001
1007
  else
@@ -1027,26 +1033,37 @@
1027
1033
  function error(reason) {
1028
1034
  if (!aborted) {
1029
1035
  aborted = !0;
1030
- request.abortListeners.delete(error);
1031
- if (request.fatalError === haltSymbol) var throwWith = reason;
1036
+ request.abortListeners.delete(abortIterable);
1037
+ var digest = logRecoverableError$1(request, reason, streamTask);
1038
+ emitErrorChunk(request, streamTask.id, digest, reason);
1039
+ enqueueFlush(request);
1040
+ "function" === typeof iterator.throw &&
1041
+ iterator.throw(reason).then(error, error);
1042
+ }
1043
+ }
1044
+ function abortIterable(reason) {
1045
+ if (!aborted) {
1046
+ aborted = !0;
1047
+ request.abortListeners.delete(abortIterable);
1048
+ if (
1049
+ "object" === typeof reason &&
1050
+ null !== reason &&
1051
+ reason.$$typeof === REACT_POSTPONE_TYPE
1052
+ )
1053
+ logPostpone$1(request, reason.message, streamTask),
1054
+ request.type === PRERENDER
1055
+ ? request.pendingChunks--
1056
+ : (emitPostponeChunk(request, streamTask.id, reason),
1057
+ enqueueFlush(request));
1032
1058
  else {
1033
- if (
1034
- "object" === typeof reason &&
1035
- null !== reason &&
1036
- reason.$$typeof === REACT_POSTPONE_TYPE
1037
- )
1038
- (throwWith = reason),
1039
- logPostpone$1(request, reason.message, streamTask),
1040
- emitPostponeChunk(request, streamTask.id, reason);
1041
- else {
1042
- throwWith = reason;
1043
- var digest = logRecoverableError$1(request, reason, streamTask);
1044
- emitErrorChunk(request, streamTask.id, digest, reason);
1045
- }
1046
- enqueueFlush(request);
1059
+ var digest = logRecoverableError$1(request, reason, streamTask);
1060
+ request.type === PRERENDER
1061
+ ? request.pendingChunks--
1062
+ : (emitErrorChunk(request, streamTask.id, digest, reason),
1063
+ enqueueFlush(request));
1047
1064
  }
1048
1065
  "function" === typeof iterator.throw &&
1049
- iterator.throw(throwWith).then(error, error);
1066
+ iterator.throw(reason).then(error, error);
1050
1067
  }
1051
1068
  }
1052
1069
  var isIterator = iterable === iterator,
@@ -1067,7 +1084,7 @@
1067
1084
  (iterable = iterable._debugInfo) &&
1068
1085
  forwardDebugInfo(request, streamTask.id, iterable);
1069
1086
  var aborted = !1;
1070
- request.abortListeners.add(error);
1087
+ request.abortListeners.add(abortIterable);
1071
1088
  callIteratorInDEV(iterator, progress, error);
1072
1089
  return serializeByValueID$1(streamTask.id);
1073
1090
  }
@@ -1579,7 +1596,7 @@
1579
1596
  function progress(entry) {
1580
1597
  if (!aborted)
1581
1598
  if (entry.done)
1582
- request.abortListeners.delete(error),
1599
+ request.abortListeners.delete(abortBlob),
1583
1600
  (aborted = !0),
1584
1601
  pingTask$1(request, newTask);
1585
1602
  else
@@ -1590,16 +1607,35 @@
1590
1607
  function error(reason) {
1591
1608
  if (!aborted) {
1592
1609
  aborted = !0;
1593
- request.abortListeners.delete(error);
1594
- if (request.fatalError === haltSymbol) var cancelWith = reason;
1610
+ request.abortListeners.delete(abortBlob);
1611
+ var digest = logRecoverableError$1(request, reason, newTask);
1612
+ emitErrorChunk(request, newTask.id, digest, reason);
1613
+ enqueueFlush(request);
1614
+ reader.cancel(reason).then(error, error);
1615
+ }
1616
+ }
1617
+ function abortBlob(reason) {
1618
+ if (!aborted) {
1619
+ aborted = !0;
1620
+ request.abortListeners.delete(abortBlob);
1621
+ if (
1622
+ "object" === typeof reason &&
1623
+ null !== reason &&
1624
+ reason.$$typeof === REACT_POSTPONE_TYPE
1625
+ )
1626
+ logPostpone$1(request, reason.message, newTask),
1627
+ request.type === PRERENDER
1628
+ ? request.pendingChunks--
1629
+ : (emitPostponeChunk(request, newTask.id, reason),
1630
+ enqueueFlush(request));
1595
1631
  else {
1596
- cancelWith = reason;
1597
1632
  var digest = logRecoverableError$1(request, reason, newTask);
1598
- emitErrorChunk(request, newTask.id, digest, reason);
1599
- request.abortableTasks.delete(newTask);
1600
- enqueueFlush(request);
1633
+ request.type === PRERENDER
1634
+ ? request.pendingChunks--
1635
+ : (emitErrorChunk(request, newTask.id, digest, reason),
1636
+ enqueueFlush(request));
1601
1637
  }
1602
- reader.cancel(cancelWith).then(error, error);
1638
+ reader.cancel(reason).then(error, error);
1603
1639
  }
1604
1640
  }
1605
1641
  var model = [blob.type],
@@ -1615,7 +1651,7 @@
1615
1651
  ),
1616
1652
  reader = blob.stream().getReader(),
1617
1653
  aborted = !1;
1618
- request.abortListeners.add(error);
1654
+ request.abortListeners.add(abortBlob);
1619
1655
  reader.read().then(progress).catch(error);
1620
1656
  return "$B" + newTask.id.toString(16);
1621
1657
  }
@@ -1649,14 +1685,12 @@
1649
1685
  : thrownValue;
1650
1686
  if ("object" === typeof key && null !== key) {
1651
1687
  if ("function" === typeof key.then) {
1652
- if (request.status === ABORTING$1) {
1653
- task.status = ABORTED$1;
1654
- if (request.fatalError === haltSymbol) return "$@";
1655
- task = request.fatalError;
1656
- return parent
1657
- ? "$L" + task.toString(16)
1658
- : serializeByValueID$1(task);
1659
- }
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
+ );
1660
1694
  request = createTask(
1661
1695
  request,
1662
1696
  task.model,
@@ -1687,12 +1721,12 @@
1687
1721
  parent ? "$L" + value.toString(16) : serializeByValueID$1(value)
1688
1722
  );
1689
1723
  }
1690
- if (request.status === ABORTING$1) {
1691
- task.status = ABORTED$1;
1692
- if (request.fatalError === haltSymbol) return "$@";
1693
- task = request.fatalError;
1694
- return parent ? "$L" + task.toString(16) : serializeByValueID$1(task);
1695
- }
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
+ );
1696
1730
  task.keyPath = prevKeyPath;
1697
1731
  task.implicitSlot = prevImplicitSlot;
1698
1732
  request.pendingChunks++;
@@ -2428,18 +2462,8 @@
2428
2462
  if (request.status === ABORTING$1) {
2429
2463
  request.abortableTasks.delete(task);
2430
2464
  task.status = ABORTED$1;
2431
- if (request.fatalError === haltSymbol)
2432
- emitModelChunk(
2433
- request,
2434
- task.id,
2435
- reusableInfinitePromiseModel
2436
- );
2437
- else {
2438
- var model = stringify(
2439
- serializeByValueID$1(request.fatalError)
2440
- );
2441
- emitModelChunk(request, task.id, model);
2442
- }
2465
+ var model = stringify(serializeByValueID$1(request.fatalError));
2466
+ emitModelChunk(request, task.id, model);
2443
2467
  return;
2444
2468
  }
2445
2469
  task.status = PENDING$3;
@@ -2456,18 +2480,12 @@
2456
2480
  return;
2457
2481
  }
2458
2482
  }
2459
- if (request.status === ABORTING$1)
2460
- if (
2461
- (request.abortableTasks.delete(task),
2462
- (task.status = ABORTED$1),
2463
- request.fatalError === haltSymbol)
2464
- )
2465
- emitModelChunk(request, task.id, reusableInfinitePromiseModel);
2466
- else {
2467
- var _model = stringify(serializeByValueID$1(request.fatalError));
2468
- emitModelChunk(request, task.id, _model);
2469
- }
2470
- else {
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 {
2471
2489
  request.abortableTasks.delete(task);
2472
2490
  task.status = ERRORED$2;
2473
2491
  var digest = logRecoverableError$1(request, x, task);
@@ -2492,6 +2510,7 @@
2492
2510
  ReactSharedInternalsServer.H = HooksDispatcher$1;
2493
2511
  var prevRequest = currentRequest;
2494
2512
  currentRequest$1 = currentRequest = request;
2513
+ var hadAbortableTasks = 0 < request.abortableTasks.size;
2495
2514
  try {
2496
2515
  var pingedTasks = request.pingedTasks;
2497
2516
  request.pingedTasks = [];
@@ -2499,7 +2518,7 @@
2499
2518
  retryTask$1(request, pingedTasks[i]);
2500
2519
  null !== request.destination &&
2501
2520
  flushCompletedChunks(request, request.destination);
2502
- if (0 === request.abortableTasks.size) {
2521
+ if (hadAbortableTasks && 0 === request.abortableTasks.size) {
2503
2522
  var onAllReady = request.onAllReady;
2504
2523
  onAllReady();
2505
2524
  }
@@ -2588,10 +2607,9 @@
2588
2607
  }
2589
2608
  function abort$1(request, reason) {
2590
2609
  try {
2591
- 0 === request.status && (request.status = ABORTING$1);
2610
+ 10 === request.status && (request.status = ABORTING$1);
2592
2611
  var abortableTasks = request.abortableTasks;
2593
2612
  if (0 < abortableTasks.size) {
2594
- request.pendingChunks++;
2595
2613
  var errorId = request.nextChunkId++;
2596
2614
  request.fatalError = errorId;
2597
2615
  if (
@@ -2600,7 +2618,9 @@
2600
2618
  reason.$$typeof === REACT_POSTPONE_TYPE
2601
2619
  )
2602
2620
  logPostpone$1(request, reason.message, null),
2603
- emitPostponeChunk(request, errorId, reason);
2621
+ request.type === PRERENDER &&
2622
+ (request.pendingChunks++,
2623
+ emitPostponeChunk(request, errorId, reason));
2604
2624
  else {
2605
2625
  var error =
2606
2626
  void 0 === reason
@@ -2615,7 +2635,9 @@
2615
2635
  )
2616
2636
  : reason,
2617
2637
  digest = logRecoverableError$1(request, error, null);
2618
- emitErrorChunk(request, errorId, digest, error);
2638
+ 20 === request.type &&
2639
+ (request.pendingChunks++,
2640
+ emitErrorChunk(request, errorId, digest, error));
2619
2641
  }
2620
2642
  abortableTasks.forEach(function (task) {
2621
2643
  if (task.status !== RENDERING$1) {
@@ -2626,6 +2648,8 @@
2626
2648
  }
2627
2649
  });
2628
2650
  abortableTasks.clear();
2651
+ var onAllReady = request.onAllReady;
2652
+ onAllReady();
2629
2653
  }
2630
2654
  var abortListeners = request.abortListeners;
2631
2655
  if (0 < abortListeners.size) {
@@ -3380,7 +3404,7 @@
3380
3404
  }
3381
3405
  return null;
3382
3406
  }
3383
- function Chunk(status, value, reason, response) {
3407
+ function ReactPromise(status, value, reason, response) {
3384
3408
  this.status = status;
3385
3409
  this.value = value;
3386
3410
  this.reason = reason;
@@ -3406,7 +3430,7 @@
3406
3430
  }
3407
3431
  }
3408
3432
  function createPendingChunk(response) {
3409
- return new Chunk("pending", null, null, response);
3433
+ return new ReactPromise("pending", null, null, response);
3410
3434
  }
3411
3435
  function wakeChunk(listeners, value) {
3412
3436
  for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value);
@@ -3447,7 +3471,7 @@
3447
3471
  }
3448
3472
  }
3449
3473
  function createResolvedIteratorResultChunk(response, value, done) {
3450
- return new Chunk(
3474
+ return new ReactPromise(
3451
3475
  "resolved_model",
3452
3476
  (done ? '{"done":true,"value":' : '{"done":false,"value":') +
3453
3477
  value +
@@ -3907,7 +3931,10 @@
3907
3931
  (chunk.value = stream),
3908
3932
  (chunk.reason = controller),
3909
3933
  null !== response && wakeChunk(response, chunk.value))
3910
- : chunks.set(id, new Chunk("fulfilled", stream, controller, response));
3934
+ : chunks.set(
3935
+ id,
3936
+ new ReactPromise("fulfilled", stream, controller, response)
3937
+ );
3911
3938
  }
3912
3939
  function startReadableStream(response, id, type) {
3913
3940
  var controller = null;
@@ -3928,7 +3955,12 @@
3928
3955
  },
3929
3956
  enqueueModel: function (json) {
3930
3957
  if (null === previousBlockedChunk) {
3931
- var chunk = new Chunk("resolved_model", json, null, response);
3958
+ var chunk = new ReactPromise(
3959
+ "resolved_model",
3960
+ json,
3961
+ null,
3962
+ response
3963
+ );
3932
3964
  initializeModelChunk(chunk);
3933
3965
  "fulfilled" === chunk.status
3934
3966
  ? controller.enqueue(chunk.value)
@@ -4002,7 +4034,7 @@
4002
4034
  );
4003
4035
  if (nextReadIndex === buffer.length) {
4004
4036
  if (closed)
4005
- return new Chunk(
4037
+ return new ReactPromise(
4006
4038
  "fulfilled",
4007
4039
  { done: !0, value: void 0 },
4008
4040
  null,
@@ -4020,7 +4052,7 @@
4020
4052
  {
4021
4053
  enqueueValue: function (value) {
4022
4054
  if (nextWriteIndex === buffer.length)
4023
- buffer[nextWriteIndex] = new Chunk(
4055
+ buffer[nextWriteIndex] = new ReactPromise(
4024
4056
  "fulfilled",
4025
4057
  { done: !1, value: value },
4026
4058
  null,
@@ -4299,7 +4331,12 @@
4299
4331
  ? ((stack = initializingHandler),
4300
4332
  (initializingHandler = stack.parent),
4301
4333
  stack.errored
4302
- ? ((key = new Chunk("rejected", null, stack.value, response)),
4334
+ ? ((key = new ReactPromise(
4335
+ "rejected",
4336
+ null,
4337
+ stack.value,
4338
+ response
4339
+ )),
4303
4340
  (stack = {
4304
4341
  name: getComponentNameFromType(value.type) || "",
4305
4342
  owner: value._owner
@@ -4309,7 +4346,7 @@
4309
4346
  (key._debugInfo = [stack]),
4310
4347
  (value = createLazyChunkWrapper(key)))
4311
4348
  : 0 < stack.deps &&
4312
- ((key = new Chunk("blocked", null, null, response)),
4349
+ ((key = new ReactPromise("blocked", null, null, response)),
4313
4350
  (stack.value = value),
4314
4351
  (stack.chunk = key),
4315
4352
  (value = Object.freeze.bind(Object, value.props)),
@@ -11467,15 +11504,14 @@
11467
11504
  ReactSharedInternalsServer.TaintRegistryByteLengths,
11468
11505
  TaintRegistryPendingRequests =
11469
11506
  ReactSharedInternalsServer.TaintRegistryPendingRequests,
11470
- ABORTING$1 = 1,
11471
- CLOSING$1 = 2,
11472
- CLOSED$1 = 3,
11507
+ ABORTING$1 = 11,
11508
+ CLOSING$1 = 12,
11509
+ CLOSED$1 = 13,
11510
+ PRERENDER = 21,
11473
11511
  currentRequest = null,
11474
11512
  debugID = null,
11475
- reusableInfinitePromiseModel = stringify("$@"),
11476
11513
  modelRoot = !1,
11477
11514
  emptyRoot = {},
11478
- haltSymbol = Symbol("halt"),
11479
11515
  bind$1 = Function.prototype.bind,
11480
11516
  ObjectPrototype = Object.prototype,
11481
11517
  knownServerReferences = new WeakMap(),
@@ -11487,8 +11523,8 @@
11487
11523
  ReactSharedInternals =
11488
11524
  React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ||
11489
11525
  React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
11490
- Chunk.prototype = Object.create(Promise.prototype);
11491
- Chunk.prototype.then = function (resolve, reject) {
11526
+ ReactPromise.prototype = Object.create(Promise.prototype);
11527
+ ReactPromise.prototype.then = function (resolve, reject) {
11492
11528
  switch (this.status) {
11493
11529
  case "resolved_model":
11494
11530
  initializeModelChunk(this);
@@ -12455,6 +12491,7 @@
12455
12491
  stashErrorIdx = 1,
12456
12492
  stashedErrors = new Map(),
12457
12493
  flightRequest = new RequestInstance$1(
12494
+ 20,
12458
12495
  children,
12459
12496
  null,
12460
12497
  function (error) {
@@ -12467,8 +12504,8 @@
12467
12504
  void 0,
12468
12505
  "Markup",
12469
12506
  void 0,
12470
- void 0,
12471
- void 0
12507
+ noop$3,
12508
+ noop$3
12472
12509
  ),
12473
12510
  flightResponse = new ResponseInstance(
12474
12511
  null,
@@ -12658,7 +12695,7 @@
12658
12695
  ? triggerErrorOnChunk(error, rowTag)
12659
12696
  : rowLength.set(
12660
12697
  rowID,
12661
- new Chunk("rejected", null, rowTag, i)
12698
+ new ReactPromise("rejected", null, rowTag, i)
12662
12699
  );
12663
12700
  break;
12664
12701
  case 84:
@@ -12667,7 +12704,7 @@
12667
12704
  ? error.reason.enqueueValue(rowLength)
12668
12705
  : rowTag.set(
12669
12706
  rowID,
12670
- new Chunk("fulfilled", rowLength, null, i)
12707
+ new ReactPromise("fulfilled", rowLength, null, i)
12671
12708
  );
12672
12709
  break;
12673
12710
  case 68:
@@ -12755,7 +12792,7 @@
12755
12792
  ? triggerErrorOnChunk(error, rowTag)
12756
12793
  : rowLength.set(
12757
12794
  rowID,
12758
- new Chunk("rejected", null, rowTag, i)
12795
+ new ReactPromise("rejected", null, rowTag, i)
12759
12796
  );
12760
12797
  break;
12761
12798
  default:
@@ -12764,7 +12801,12 @@
12764
12801
  ? resolveModelChunk(error, rowLength)
12765
12802
  : rowTag.set(
12766
12803
  rowID,
12767
- new Chunk("resolved_model", rowLength, null, i)
12804
+ new ReactPromise(
12805
+ "resolved_model",
12806
+ rowLength,
12807
+ null,
12808
+ i
12809
+ )
12768
12810
  );
12769
12811
  }
12770
12812
  i = lastIdx;
@@ -12804,5 +12846,5 @@
12804
12846
  });
12805
12847
  });
12806
12848
  };
12807
- exports.version = "19.0.0-experimental-6ebfd5b0-20240818";
12849
+ exports.version = "19.0.0-experimental-a960b92c-20240819";
12808
12850
  })();
@@ -560,6 +560,7 @@ function defaultErrorHandler$1(error) {
560
560
  }
561
561
  function defaultPostponeHandler() {}
562
562
  function RequestInstance$1(
563
+ type,
563
564
  model,
564
565
  bundlerConfig,
565
566
  onError,
@@ -581,7 +582,8 @@ function RequestInstance$1(
581
582
  environmentName = [];
582
583
  var cleanupQueue = [];
583
584
  TaintRegistryPendingRequests.add(cleanupQueue);
584
- this.status = 0;
585
+ this.type = type;
586
+ this.status = 10;
585
587
  this.flushScheduled = !1;
586
588
  this.destination = this.fatalError = null;
587
589
  this.bundlerConfig = bundlerConfig;
@@ -605,10 +607,10 @@ function RequestInstance$1(
605
607
  this.taintCleanupQueue = cleanupQueue;
606
608
  this.onError = void 0 === onError ? defaultErrorHandler$1 : onError;
607
609
  this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
608
- this.onAllReady = void 0 === onAllReady ? noop$3 : onAllReady;
609
- this.onFatalError = void 0 === onFatalError ? noop$3 : onFatalError;
610
- model = createTask(this, model, null, !1, filterStackFrame);
611
- environmentName.push(model);
610
+ this.onAllReady = onAllReady;
611
+ this.onFatalError = onFatalError;
612
+ type = createTask(this, model, null, !1, filterStackFrame);
613
+ environmentName.push(type);
612
614
  }
613
615
  function noop$3() {}
614
616
  var currentRequest = null;
@@ -642,14 +644,12 @@ function serializeThenable(request, task, thenable) {
642
644
  newTask.id
643
645
  );
644
646
  default:
645
- if (1 === request.status)
647
+ if (11 === request.status)
646
648
  return (
647
649
  request.abortableTasks.delete(newTask),
648
650
  (newTask.status = 3),
649
- request.fatalError === haltSymbol
650
- ? emitModelChunk(request, newTask.id, reusableInfinitePromiseModel)
651
- : ((task = stringify(serializeByValueID$1(request.fatalError))),
652
- emitModelChunk(request, newTask.id, task)),
651
+ (task = stringify(serializeByValueID$1(request.fatalError))),
652
+ emitModelChunk(request, newTask.id, task),
653
653
  newTask.id
654
654
  );
655
655
  "string" !== typeof thenable.status &&
@@ -690,7 +690,7 @@ function serializeReadableStream(request, task, stream) {
690
690
  function progress(entry) {
691
691
  if (!aborted)
692
692
  if (entry.done)
693
- request.abortListeners.delete(error),
693
+ request.abortListeners.delete(abortStream),
694
694
  (entry = streamTask.id.toString(16) + ":C\n"),
695
695
  request.completedRegularChunks.push(entry),
696
696
  enqueueFlush(request),
@@ -709,20 +709,35 @@ function serializeReadableStream(request, task, stream) {
709
709
  function error(reason) {
710
710
  if (!aborted) {
711
711
  aborted = !0;
712
- request.abortListeners.delete(error);
713
- if (request.fatalError === haltSymbol) var cancelWith = reason;
714
- else
712
+ request.abortListeners.delete(abortStream);
713
+ var digest = logRecoverableError$1(request, reason, streamTask);
714
+ emitErrorChunk(request, streamTask.id, digest);
715
+ enqueueFlush(request);
716
+ reader.cancel(reason).then(error, error);
717
+ }
718
+ }
719
+ function abortStream(reason) {
720
+ if (!aborted) {
721
+ aborted = !0;
722
+ request.abortListeners.delete(abortStream);
723
+ if (
715
724
  "object" === typeof reason &&
716
725
  null !== reason &&
717
726
  reason.$$typeof === REACT_POSTPONE_TYPE
718
- ? ((cancelWith = reason),
719
- logPostpone$1(request, reason.message, streamTask),
720
- emitPostponeChunk(request, streamTask.id))
721
- : ((cancelWith = reason),
722
- (reason = logRecoverableError$1(request, reason, streamTask)),
723
- emitErrorChunk(request, streamTask.id, reason)),
724
- enqueueFlush(request);
725
- reader.cancel(cancelWith).then(error, error);
727
+ )
728
+ logPostpone$1(request, reason.message, streamTask),
729
+ 21 === request.type
730
+ ? request.pendingChunks--
731
+ : (emitPostponeChunk(request, streamTask.id),
732
+ enqueueFlush(request));
733
+ else {
734
+ var digest = logRecoverableError$1(request, reason, streamTask);
735
+ 21 === request.type
736
+ ? request.pendingChunks--
737
+ : (emitErrorChunk(request, streamTask.id, digest),
738
+ enqueueFlush(request));
739
+ }
740
+ reader.cancel(reason).then(error, error);
726
741
  }
727
742
  }
728
743
  var supportsBYOB = stream.supportsBYOB;
@@ -745,7 +760,7 @@ function serializeReadableStream(request, task, stream) {
745
760
  task = streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n";
746
761
  request.completedRegularChunks.push(task);
747
762
  var aborted = !1;
748
- request.abortListeners.add(error);
763
+ request.abortListeners.add(abortStream);
749
764
  reader.read().then(progress, error);
750
765
  return serializeByValueID$1(streamTask.id);
751
766
  }
@@ -753,7 +768,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
753
768
  function progress(entry) {
754
769
  if (!aborted)
755
770
  if (entry.done) {
756
- request.abortListeners.delete(error);
771
+ request.abortListeners.delete(abortIterable);
757
772
  if (void 0 === entry.value)
758
773
  var endStreamRow = streamTask.id.toString(16) + ":C\n";
759
774
  else
@@ -785,21 +800,37 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
785
800
  function error(reason) {
786
801
  if (!aborted) {
787
802
  aborted = !0;
788
- request.abortListeners.delete(error);
789
- if (request.fatalError === haltSymbol) var throwWith = reason;
790
- else
803
+ request.abortListeners.delete(abortIterable);
804
+ var digest = logRecoverableError$1(request, reason, streamTask);
805
+ emitErrorChunk(request, streamTask.id, digest);
806
+ enqueueFlush(request);
807
+ "function" === typeof iterator.throw &&
808
+ iterator.throw(reason).then(error, error);
809
+ }
810
+ }
811
+ function abortIterable(reason) {
812
+ if (!aborted) {
813
+ aborted = !0;
814
+ request.abortListeners.delete(abortIterable);
815
+ if (
791
816
  "object" === typeof reason &&
792
817
  null !== reason &&
793
818
  reason.$$typeof === REACT_POSTPONE_TYPE
794
- ? ((throwWith = reason),
795
- logPostpone$1(request, reason.message, streamTask),
796
- emitPostponeChunk(request, streamTask.id))
797
- : ((throwWith = reason),
798
- (reason = logRecoverableError$1(request, reason, streamTask)),
799
- emitErrorChunk(request, streamTask.id, reason)),
800
- enqueueFlush(request);
819
+ )
820
+ logPostpone$1(request, reason.message, streamTask),
821
+ 21 === request.type
822
+ ? request.pendingChunks--
823
+ : (emitPostponeChunk(request, streamTask.id),
824
+ enqueueFlush(request));
825
+ else {
826
+ var digest = logRecoverableError$1(request, reason, streamTask);
827
+ 21 === request.type
828
+ ? request.pendingChunks--
829
+ : (emitErrorChunk(request, streamTask.id, digest),
830
+ enqueueFlush(request));
831
+ }
801
832
  "function" === typeof iterator.throw &&
802
- iterator.throw(throwWith).then(error, error);
833
+ iterator.throw(reason).then(error, error);
803
834
  }
804
835
  }
805
836
  iterable = iterable === iterator;
@@ -815,7 +846,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
815
846
  task = streamTask.id.toString(16) + ":" + (iterable ? "x" : "X") + "\n";
816
847
  request.completedRegularChunks.push(task);
817
848
  var aborted = !1;
818
- request.abortListeners.add(error);
849
+ request.abortListeners.add(abortIterable);
819
850
  iterator.next().then(progress, error);
820
851
  return serializeByValueID$1(streamTask.id);
821
852
  }
@@ -853,7 +884,7 @@ function renderFunctionComponent$1(request, task, key, Component, props) {
853
884
  thenableIndexCounter$1 = 0;
854
885
  thenableState$1 = prevThenableState;
855
886
  Component = Component(props, void 0);
856
- if (1 === request.status)
887
+ if (11 === request.status)
857
888
  throw (
858
889
  ("object" === typeof Component &&
859
890
  null !== Component &&
@@ -952,7 +983,7 @@ function renderElement$1(request, task, type, key, ref, props) {
952
983
  case REACT_LAZY_TYPE:
953
984
  var init = type._init;
954
985
  type = init(type._payload);
955
- if (1 === request.status) throw null;
986
+ if (11 === request.status) throw null;
956
987
  return renderElement$1(request, task, type, key, ref, props);
957
988
  case REACT_FORWARD_REF_TYPE:
958
989
  return renderFunctionComponent$1(
@@ -1009,7 +1040,6 @@ function createTask(request, model, keyPath, implicitSlot, abortSet) {
1009
1040
  function serializeByValueID$1(id) {
1010
1041
  return "$" + id.toString(16);
1011
1042
  }
1012
- var reusableInfinitePromiseModel = stringify("$@");
1013
1043
  function encodeReferenceChunk(request, id, reference) {
1014
1044
  request = stringify(reference);
1015
1045
  return id.toString(16) + ":" + request + "\n";
@@ -1034,7 +1064,7 @@ function serializeBlob(request, blob) {
1034
1064
  function progress(entry) {
1035
1065
  if (!aborted)
1036
1066
  if (entry.done)
1037
- request.abortListeners.delete(error),
1067
+ request.abortListeners.delete(abortBlob),
1038
1068
  (aborted = !0),
1039
1069
  pingTask$1(request, newTask);
1040
1070
  else
@@ -1045,22 +1075,41 @@ function serializeBlob(request, blob) {
1045
1075
  function error(reason) {
1046
1076
  if (!aborted) {
1047
1077
  aborted = !0;
1048
- request.abortListeners.delete(error);
1049
- if (request.fatalError === haltSymbol) var cancelWith = reason;
1050
- else
1051
- (cancelWith = reason),
1052
- (reason = logRecoverableError$1(request, reason, newTask)),
1053
- emitErrorChunk(request, newTask.id, reason),
1054
- request.abortableTasks.delete(newTask),
1055
- enqueueFlush(request);
1056
- reader.cancel(cancelWith).then(error, error);
1078
+ request.abortListeners.delete(abortBlob);
1079
+ var digest = logRecoverableError$1(request, reason, newTask);
1080
+ emitErrorChunk(request, newTask.id, digest);
1081
+ enqueueFlush(request);
1082
+ reader.cancel(reason).then(error, error);
1083
+ }
1084
+ }
1085
+ function abortBlob(reason) {
1086
+ if (!aborted) {
1087
+ aborted = !0;
1088
+ request.abortListeners.delete(abortBlob);
1089
+ if (
1090
+ "object" === typeof reason &&
1091
+ null !== reason &&
1092
+ reason.$$typeof === REACT_POSTPONE_TYPE
1093
+ )
1094
+ logPostpone$1(request, reason.message, newTask),
1095
+ 21 === request.type
1096
+ ? request.pendingChunks--
1097
+ : (emitPostponeChunk(request, newTask.id), enqueueFlush(request));
1098
+ else {
1099
+ var digest = logRecoverableError$1(request, reason, newTask);
1100
+ 21 === request.type
1101
+ ? request.pendingChunks--
1102
+ : (emitErrorChunk(request, newTask.id, digest),
1103
+ enqueueFlush(request));
1104
+ }
1105
+ reader.cancel(reason).then(error, error);
1057
1106
  }
1058
1107
  }
1059
1108
  var model = [blob.type],
1060
1109
  newTask = createTask(request, model, null, !1, request.abortableTasks),
1061
1110
  reader = blob.stream().getReader(),
1062
1111
  aborted = !1;
1063
- request.abortListeners.add(error);
1112
+ request.abortListeners.add(abortBlob);
1064
1113
  reader.read().then(progress).catch(error);
1065
1114
  return "$B" + newTask.id.toString(16);
1066
1115
  }
@@ -1083,12 +1132,12 @@ function renderModel(request, task, parent, key, value) {
1083
1132
  : thrownValue;
1084
1133
  if ("object" === typeof key && null !== key) {
1085
1134
  if ("function" === typeof key.then) {
1086
- if (1 === request.status) {
1087
- task.status = 3;
1088
- if (request.fatalError === haltSymbol) return "$@";
1089
- task = request.fatalError;
1090
- return parent ? "$L" + task.toString(16) : serializeByValueID$1(task);
1091
- }
1135
+ if (11 === request.status)
1136
+ return (
1137
+ (task.status = 3),
1138
+ (task = request.fatalError),
1139
+ parent ? "$L" + task.toString(16) : serializeByValueID$1(task)
1140
+ );
1092
1141
  request = createTask(
1093
1142
  request,
1094
1143
  task.model,
@@ -1116,12 +1165,12 @@ function renderModel(request, task, parent, key, value) {
1116
1165
  parent ? "$L" + value.toString(16) : serializeByValueID$1(value)
1117
1166
  );
1118
1167
  }
1119
- if (1 === request.status) {
1120
- task.status = 3;
1121
- if (request.fatalError === haltSymbol) return "$@";
1122
- task = request.fatalError;
1123
- return parent ? "$L" + task.toString(16) : serializeByValueID$1(task);
1124
- }
1168
+ if (11 === request.status)
1169
+ return (
1170
+ (task.status = 3),
1171
+ (task = request.fatalError),
1172
+ parent ? "$L" + task.toString(16) : serializeByValueID$1(task)
1173
+ );
1125
1174
  task.keyPath = prevKeyPath;
1126
1175
  task.implicitSlot = prevImplicitSlot;
1127
1176
  request.pendingChunks++;
@@ -1180,7 +1229,7 @@ function renderModelDestructive(
1180
1229
  task.thenableState = null;
1181
1230
  parentPropertyName = value._init;
1182
1231
  value = parentPropertyName(value._payload);
1183
- if (1 === request.status) throw null;
1232
+ if (11 === request.status) throw null;
1184
1233
  return renderModelDestructive(request, task, emptyRoot, "", value);
1185
1234
  case REACT_LEGACY_ELEMENT_TYPE:
1186
1235
  throw Error(
@@ -1452,8 +1501,8 @@ function fatalError$1(request, error) {
1452
1501
  onFatalError(error);
1453
1502
  cleanupTaintQueue(request);
1454
1503
  null !== request.destination
1455
- ? ((request.status = 3), request.destination.destroy(error))
1456
- : ((request.status = 2), (request.fatalError = error));
1504
+ ? ((request.status = 13), request.destination.destroy(error))
1505
+ : ((request.status = 12), (request.fatalError = error));
1457
1506
  }
1458
1507
  function emitPostponeChunk(request, id) {
1459
1508
  id = id.toString(16) + ":P\n";
@@ -1550,15 +1599,11 @@ function retryTask$1(request, task) {
1550
1599
  : thrownValue;
1551
1600
  if ("object" === typeof x && null !== x) {
1552
1601
  if ("function" === typeof x.then) {
1553
- if (1 === request.status) {
1602
+ if (11 === request.status) {
1554
1603
  request.abortableTasks.delete(task);
1555
1604
  task.status = 3;
1556
- if (request.fatalError === haltSymbol)
1557
- emitModelChunk(request, task.id, reusableInfinitePromiseModel);
1558
- else {
1559
- var model = stringify(serializeByValueID$1(request.fatalError));
1560
- emitModelChunk(request, task.id, model);
1561
- }
1605
+ var model = stringify(serializeByValueID$1(request.fatalError));
1606
+ emitModelChunk(request, task.id, model);
1562
1607
  return;
1563
1608
  }
1564
1609
  task.status = 0;
@@ -1575,18 +1620,12 @@ function retryTask$1(request, task) {
1575
1620
  return;
1576
1621
  }
1577
1622
  }
1578
- if (1 === request.status)
1579
- if (
1580
- (request.abortableTasks.delete(task),
1581
- (task.status = 3),
1582
- request.fatalError === haltSymbol)
1583
- )
1584
- emitModelChunk(request, task.id, reusableInfinitePromiseModel);
1585
- else {
1586
- var model$25 = stringify(serializeByValueID$1(request.fatalError));
1587
- emitModelChunk(request, task.id, model$25);
1588
- }
1589
- else {
1623
+ if (11 === request.status) {
1624
+ request.abortableTasks.delete(task);
1625
+ task.status = 3;
1626
+ var model$25 = stringify(serializeByValueID$1(request.fatalError));
1627
+ emitModelChunk(request, task.id, model$25);
1628
+ } else {
1590
1629
  request.abortableTasks.delete(task);
1591
1630
  task.status = 4;
1592
1631
  var digest = logRecoverableError$1(request, x, task);
@@ -1601,6 +1640,7 @@ function performWork$1(request) {
1601
1640
  ReactSharedInternalsServer.H = HooksDispatcher$1;
1602
1641
  var prevRequest = currentRequest;
1603
1642
  currentRequest$1 = currentRequest = request;
1643
+ var hadAbortableTasks = 0 < request.abortableTasks.size;
1604
1644
  try {
1605
1645
  var pingedTasks = request.pingedTasks;
1606
1646
  request.pingedTasks = [];
@@ -1608,7 +1648,7 @@ function performWork$1(request) {
1608
1648
  retryTask$1(request, pingedTasks[i]);
1609
1649
  null !== request.destination &&
1610
1650
  flushCompletedChunks(request, request.destination);
1611
- if (0 === request.abortableTasks.size) {
1651
+ if (hadAbortableTasks && 0 === request.abortableTasks.size) {
1612
1652
  var onAllReady = request.onAllReady;
1613
1653
  onAllReady();
1614
1654
  }
@@ -1662,7 +1702,7 @@ function flushCompletedChunks(request, destination) {
1662
1702
  }
1663
1703
  0 === request.pendingChunks &&
1664
1704
  (cleanupTaintQueue(request),
1665
- (request.status = 3),
1705
+ (request.status = 13),
1666
1706
  destination.push(null),
1667
1707
  (request.destination = null));
1668
1708
  }
@@ -1679,10 +1719,9 @@ function enqueueFlush(request) {
1679
1719
  }
1680
1720
  function abort$1(request, reason) {
1681
1721
  try {
1682
- 0 === request.status && (request.status = 1);
1722
+ 10 === request.status && (request.status = 11);
1683
1723
  var abortableTasks = request.abortableTasks;
1684
1724
  if (0 < abortableTasks.size) {
1685
- request.pendingChunks++;
1686
1725
  var errorId = request.nextChunkId++;
1687
1726
  request.fatalError = errorId;
1688
1727
  if (
@@ -1691,7 +1730,9 @@ function abort$1(request, reason) {
1691
1730
  reason.$$typeof === REACT_POSTPONE_TYPE
1692
1731
  )
1693
1732
  logPostpone$1(request, reason.message, null),
1694
- emitPostponeChunk(request, errorId, reason);
1733
+ 21 === request.type &&
1734
+ (request.pendingChunks++,
1735
+ emitPostponeChunk(request, errorId, reason));
1695
1736
  else {
1696
1737
  var error =
1697
1738
  void 0 === reason
@@ -1702,7 +1743,9 @@ function abort$1(request, reason) {
1702
1743
  ? Error("The render was aborted by the server with a promise.")
1703
1744
  : reason,
1704
1745
  digest = logRecoverableError$1(request, error, null);
1705
- emitErrorChunk(request, errorId, digest, error);
1746
+ 20 === request.type &&
1747
+ (request.pendingChunks++,
1748
+ emitErrorChunk(request, errorId, digest, error));
1706
1749
  }
1707
1750
  abortableTasks.forEach(function (task) {
1708
1751
  if (5 !== task.status) {
@@ -1713,6 +1756,8 @@ function abort$1(request, reason) {
1713
1756
  }
1714
1757
  });
1715
1758
  abortableTasks.clear();
1759
+ var onAllReady = request.onAllReady;
1760
+ onAllReady();
1716
1761
  }
1717
1762
  var abortListeners = request.abortListeners;
1718
1763
  if (0 < abortListeners.size) {
@@ -1740,8 +1785,7 @@ function abort$1(request, reason) {
1740
1785
  fatalError$1(request, error$33);
1741
1786
  }
1742
1787
  }
1743
- var haltSymbol = Symbol("halt"),
1744
- bind$1 = Function.prototype.bind,
1788
+ var bind$1 = Function.prototype.bind,
1745
1789
  ObjectPrototype = Object.prototype,
1746
1790
  knownServerReferences = new WeakMap();
1747
1791
  function serializeNumber(number) {
@@ -2313,14 +2357,14 @@ function getComponentNameFromType(type) {
2313
2357
  }
2314
2358
  return null;
2315
2359
  }
2316
- function Chunk(status, value, reason, response) {
2360
+ function ReactPromise(status, value, reason, response) {
2317
2361
  this.status = status;
2318
2362
  this.value = value;
2319
2363
  this.reason = reason;
2320
2364
  this._response = response;
2321
2365
  }
2322
- Chunk.prototype = Object.create(Promise.prototype);
2323
- Chunk.prototype.then = function (resolve, reject) {
2366
+ ReactPromise.prototype = Object.create(Promise.prototype);
2367
+ ReactPromise.prototype.then = function (resolve, reject) {
2324
2368
  switch (this.status) {
2325
2369
  case "resolved_model":
2326
2370
  initializeModelChunk(this);
@@ -2362,7 +2406,7 @@ function readChunk(chunk) {
2362
2406
  }
2363
2407
  }
2364
2408
  function createPendingChunk(response) {
2365
- return new Chunk("pending", null, null, response);
2409
+ return new ReactPromise("pending", null, null, response);
2366
2410
  }
2367
2411
  function wakeChunk(listeners, value) {
2368
2412
  for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value);
@@ -2403,7 +2447,7 @@ function triggerErrorOnChunk(chunk, error) {
2403
2447
  }
2404
2448
  }
2405
2449
  function createResolvedIteratorResultChunk(response, value, done) {
2406
- return new Chunk(
2450
+ return new ReactPromise(
2407
2451
  "resolved_model",
2408
2452
  (done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}",
2409
2453
  null,
@@ -2754,7 +2798,10 @@ function resolveStream(response, id, stream, controller) {
2754
2798
  (chunk.value = stream),
2755
2799
  (chunk.reason = controller),
2756
2800
  null !== response && wakeChunk(response, chunk.value))
2757
- : chunks.set(id, new Chunk("fulfilled", stream, controller, response));
2801
+ : chunks.set(
2802
+ id,
2803
+ new ReactPromise("fulfilled", stream, controller, response)
2804
+ );
2758
2805
  }
2759
2806
  function startReadableStream(response, id, type) {
2760
2807
  var controller = null;
@@ -2775,7 +2822,7 @@ function startReadableStream(response, id, type) {
2775
2822
  },
2776
2823
  enqueueModel: function (json) {
2777
2824
  if (null === previousBlockedChunk) {
2778
- var chunk = new Chunk("resolved_model", json, null, response);
2825
+ var chunk = new ReactPromise("resolved_model", json, null, response);
2779
2826
  initializeModelChunk(chunk);
2780
2827
  "fulfilled" === chunk.status
2781
2828
  ? controller.enqueue(chunk.value)
@@ -2851,7 +2898,7 @@ function startAsyncIterable(response, id, iterator) {
2851
2898
  );
2852
2899
  if (nextReadIndex === buffer.length) {
2853
2900
  if (closed)
2854
- return new Chunk(
2901
+ return new ReactPromise(
2855
2902
  "fulfilled",
2856
2903
  { done: !0, value: void 0 },
2857
2904
  null,
@@ -2870,7 +2917,7 @@ function startAsyncIterable(response, id, iterator) {
2870
2917
  {
2871
2918
  enqueueValue: function (value) {
2872
2919
  if (nextWriteIndex === buffer.length)
2873
- buffer[nextWriteIndex] = new Chunk(
2920
+ buffer[nextWriteIndex] = new ReactPromise(
2874
2921
  "fulfilled",
2875
2922
  { done: !1, value: value },
2876
2923
  null,
@@ -2947,10 +2994,15 @@ function createFromJSONCallback(response) {
2947
2994
  (initializingHandler = value.parent),
2948
2995
  value.errored)
2949
2996
  )
2950
- (key = new Chunk("rejected", null, value.value, response)),
2997
+ (key = new ReactPromise("rejected", null, value.value, response)),
2951
2998
  (key = createLazyChunkWrapper(key));
2952
2999
  else if (0 < value.deps) {
2953
- var blockedChunk = new Chunk("blocked", null, null, response);
3000
+ var blockedChunk = new ReactPromise(
3001
+ "blocked",
3002
+ null,
3003
+ null,
3004
+ response
3005
+ );
2954
3006
  value.value = key;
2955
3007
  value.chunk = blockedChunk;
2956
3008
  key = createLazyChunkWrapper(blockedChunk);
@@ -8308,7 +8360,7 @@ exports.experimental_renderToHTML = function (children, options) {
8308
8360
  ? triggerErrorOnChunk(rowLength, i)
8309
8361
  : rowTag.set(
8310
8362
  rowID,
8311
- new Chunk("rejected", null, i, flightResponse)
8363
+ new ReactPromise("rejected", null, i, flightResponse)
8312
8364
  );
8313
8365
  break;
8314
8366
  case 84:
@@ -8318,7 +8370,7 @@ exports.experimental_renderToHTML = function (children, options) {
8318
8370
  ? rowLength.reason.enqueueValue(i)
8319
8371
  : rowTag.set(
8320
8372
  rowID,
8321
- new Chunk("fulfilled", i, null, flightResponse)
8373
+ new ReactPromise("fulfilled", i, null, flightResponse)
8322
8374
  );
8323
8375
  break;
8324
8376
  case 68:
@@ -8354,7 +8406,7 @@ exports.experimental_renderToHTML = function (children, options) {
8354
8406
  ? triggerErrorOnChunk(rowLength, i)
8355
8407
  : rowTag.set(
8356
8408
  rowID,
8357
- new Chunk("rejected", null, i, flightResponse)
8409
+ new ReactPromise("rejected", null, i, flightResponse)
8358
8410
  );
8359
8411
  break;
8360
8412
  default:
@@ -8363,7 +8415,12 @@ exports.experimental_renderToHTML = function (children, options) {
8363
8415
  ? resolveModelChunk(rowLength, i)
8364
8416
  : rowTag.set(
8365
8417
  rowID,
8366
- new Chunk("resolved_model", i, null, flightResponse)
8418
+ new ReactPromise(
8419
+ "resolved_model",
8420
+ i,
8421
+ null,
8422
+ flightResponse
8423
+ )
8367
8424
  );
8368
8425
  }
8369
8426
  i = lastIdx;
@@ -8391,6 +8448,7 @@ exports.experimental_renderToHTML = function (children, options) {
8391
8448
  stashErrorIdx = 1,
8392
8449
  stashedErrors = new Map(),
8393
8450
  flightRequest = new RequestInstance$1(
8451
+ 20,
8394
8452
  children,
8395
8453
  null,
8396
8454
  function (error) {
@@ -8403,8 +8461,8 @@ exports.experimental_renderToHTML = function (children, options) {
8403
8461
  void 0,
8404
8462
  "Markup",
8405
8463
  void 0,
8406
- void 0,
8407
- void 0
8464
+ noop$3,
8465
+ noop$3
8408
8466
  ),
8409
8467
  flightResponse = new ResponseInstance(
8410
8468
  null,
@@ -8465,10 +8523,13 @@ exports.experimental_renderToHTML = function (children, options) {
8465
8523
  }
8466
8524
  flightRequest.flushScheduled = null !== flightRequest.destination;
8467
8525
  performWork$1(flightRequest);
8468
- if (2 === flightRequest.status)
8469
- (flightRequest.status = 3),
8526
+ if (12 === flightRequest.status)
8527
+ (flightRequest.status = 13),
8470
8528
  flightDestination.destroy(flightRequest.fatalError);
8471
- else if (3 !== flightRequest.status && null === flightRequest.destination) {
8529
+ else if (
8530
+ 13 !== flightRequest.status &&
8531
+ null === flightRequest.destination
8532
+ ) {
8472
8533
  flightRequest.destination = flightDestination;
8473
8534
  try {
8474
8535
  flushCompletedChunks(flightRequest, flightDestination);
@@ -8493,4 +8554,4 @@ exports.experimental_renderToHTML = function (children, options) {
8493
8554
  });
8494
8555
  });
8495
8556
  };
8496
- exports.version = "19.0.0-experimental-6ebfd5b0-20240818";
8557
+ exports.version = "19.0.0-experimental-a960b92c-20240819";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-markup",
3
- "version": "0.0.0-experimental-6ebfd5b0-20240818",
3
+ "version": "0.0.0-experimental-a960b92c-20240819",
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-6ebfd5b0-20240818"
20
+ "react": "0.0.0-experimental-a960b92c-20240819"
21
21
  },
22
22
  "files": [
23
23
  "LICENSE",