react-markup 0.0.0-experimental-1eaccd82-20240816 → 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.
|
@@ -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.
|
|
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 =
|
|
609
|
-
this.onFatalError =
|
|
610
|
-
|
|
611
|
-
environmentName.push(
|
|
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,12 +644,12 @@ function serializeThenable(request, task, thenable) {
|
|
|
642
644
|
newTask.id
|
|
643
645
|
);
|
|
644
646
|
default:
|
|
645
|
-
if (
|
|
647
|
+
if (11 === request.status)
|
|
646
648
|
return (
|
|
649
|
+
request.abortableTasks.delete(newTask),
|
|
647
650
|
(newTask.status = 3),
|
|
648
651
|
(task = stringify(serializeByValueID$1(request.fatalError))),
|
|
649
652
|
emitModelChunk(request, newTask.id, task),
|
|
650
|
-
request.abortableTasks.delete(newTask),
|
|
651
653
|
newTask.id
|
|
652
654
|
);
|
|
653
655
|
"string" !== typeof thenable.status &&
|
|
@@ -688,7 +690,7 @@ function serializeReadableStream(request, task, stream) {
|
|
|
688
690
|
function progress(entry) {
|
|
689
691
|
if (!aborted)
|
|
690
692
|
if (entry.done)
|
|
691
|
-
request.abortListeners.delete(
|
|
693
|
+
request.abortListeners.delete(abortStream),
|
|
692
694
|
(entry = streamTask.id.toString(16) + ":C\n"),
|
|
693
695
|
request.completedRegularChunks.push(entry),
|
|
694
696
|
enqueueFlush(request),
|
|
@@ -707,19 +709,34 @@ function serializeReadableStream(request, task, stream) {
|
|
|
707
709
|
function error(reason) {
|
|
708
710
|
if (!aborted) {
|
|
709
711
|
aborted = !0;
|
|
710
|
-
request.abortListeners.delete(
|
|
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);
|
|
711
723
|
if (
|
|
712
724
|
"object" === typeof reason &&
|
|
713
725
|
null !== reason &&
|
|
714
726
|
reason.$$typeof === REACT_POSTPONE_TYPE
|
|
715
727
|
)
|
|
716
728
|
logPostpone$1(request, reason.message, streamTask),
|
|
717
|
-
|
|
729
|
+
21 === request.type
|
|
730
|
+
? request.pendingChunks--
|
|
731
|
+
: (emitPostponeChunk(request, streamTask.id),
|
|
732
|
+
enqueueFlush(request));
|
|
718
733
|
else {
|
|
719
734
|
var digest = logRecoverableError$1(request, reason, streamTask);
|
|
720
|
-
|
|
735
|
+
21 === request.type
|
|
736
|
+
? request.pendingChunks--
|
|
737
|
+
: (emitErrorChunk(request, streamTask.id, digest),
|
|
738
|
+
enqueueFlush(request));
|
|
721
739
|
}
|
|
722
|
-
enqueueFlush(request);
|
|
723
740
|
reader.cancel(reason).then(error, error);
|
|
724
741
|
}
|
|
725
742
|
}
|
|
@@ -743,7 +760,7 @@ function serializeReadableStream(request, task, stream) {
|
|
|
743
760
|
task = streamTask.id.toString(16) + ":" + (supportsBYOB ? "r" : "R") + "\n";
|
|
744
761
|
request.completedRegularChunks.push(task);
|
|
745
762
|
var aborted = !1;
|
|
746
|
-
request.abortListeners.add(
|
|
763
|
+
request.abortListeners.add(abortStream);
|
|
747
764
|
reader.read().then(progress, error);
|
|
748
765
|
return serializeByValueID$1(streamTask.id);
|
|
749
766
|
}
|
|
@@ -751,7 +768,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
751
768
|
function progress(entry) {
|
|
752
769
|
if (!aborted)
|
|
753
770
|
if (entry.done) {
|
|
754
|
-
request.abortListeners.delete(
|
|
771
|
+
request.abortListeners.delete(abortIterable);
|
|
755
772
|
if (void 0 === entry.value)
|
|
756
773
|
var endStreamRow = streamTask.id.toString(16) + ":C\n";
|
|
757
774
|
else
|
|
@@ -783,19 +800,35 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
783
800
|
function error(reason) {
|
|
784
801
|
if (!aborted) {
|
|
785
802
|
aborted = !0;
|
|
786
|
-
request.abortListeners.delete(
|
|
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);
|
|
787
815
|
if (
|
|
788
816
|
"object" === typeof reason &&
|
|
789
817
|
null !== reason &&
|
|
790
818
|
reason.$$typeof === REACT_POSTPONE_TYPE
|
|
791
819
|
)
|
|
792
820
|
logPostpone$1(request, reason.message, streamTask),
|
|
793
|
-
|
|
821
|
+
21 === request.type
|
|
822
|
+
? request.pendingChunks--
|
|
823
|
+
: (emitPostponeChunk(request, streamTask.id),
|
|
824
|
+
enqueueFlush(request));
|
|
794
825
|
else {
|
|
795
826
|
var digest = logRecoverableError$1(request, reason, streamTask);
|
|
796
|
-
|
|
827
|
+
21 === request.type
|
|
828
|
+
? request.pendingChunks--
|
|
829
|
+
: (emitErrorChunk(request, streamTask.id, digest),
|
|
830
|
+
enqueueFlush(request));
|
|
797
831
|
}
|
|
798
|
-
enqueueFlush(request);
|
|
799
832
|
"function" === typeof iterator.throw &&
|
|
800
833
|
iterator.throw(reason).then(error, error);
|
|
801
834
|
}
|
|
@@ -813,7 +846,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
|
|
|
813
846
|
task = streamTask.id.toString(16) + ":" + (iterable ? "x" : "X") + "\n";
|
|
814
847
|
request.completedRegularChunks.push(task);
|
|
815
848
|
var aborted = !1;
|
|
816
|
-
request.abortListeners.add(
|
|
849
|
+
request.abortListeners.add(abortIterable);
|
|
817
850
|
iterator.next().then(progress, error);
|
|
818
851
|
return serializeByValueID$1(streamTask.id);
|
|
819
852
|
}
|
|
@@ -851,7 +884,7 @@ function renderFunctionComponent$1(request, task, key, Component, props) {
|
|
|
851
884
|
thenableIndexCounter$1 = 0;
|
|
852
885
|
thenableState$1 = prevThenableState;
|
|
853
886
|
Component = Component(props, void 0);
|
|
854
|
-
if (
|
|
887
|
+
if (11 === request.status)
|
|
855
888
|
throw (
|
|
856
889
|
("object" === typeof Component &&
|
|
857
890
|
null !== Component &&
|
|
@@ -950,7 +983,7 @@ function renderElement$1(request, task, type, key, ref, props) {
|
|
|
950
983
|
case REACT_LAZY_TYPE:
|
|
951
984
|
var init = type._init;
|
|
952
985
|
type = init(type._payload);
|
|
953
|
-
if (
|
|
986
|
+
if (11 === request.status) throw null;
|
|
954
987
|
return renderElement$1(request, task, type, key, ref, props);
|
|
955
988
|
case REACT_FORWARD_REF_TYPE:
|
|
956
989
|
return renderFunctionComponent$1(
|
|
@@ -1031,7 +1064,7 @@ function serializeBlob(request, blob) {
|
|
|
1031
1064
|
function progress(entry) {
|
|
1032
1065
|
if (!aborted)
|
|
1033
1066
|
if (entry.done)
|
|
1034
|
-
request.abortListeners.delete(
|
|
1067
|
+
request.abortListeners.delete(abortBlob),
|
|
1035
1068
|
(aborted = !0),
|
|
1036
1069
|
pingTask$1(request, newTask);
|
|
1037
1070
|
else
|
|
@@ -1042,19 +1075,41 @@ function serializeBlob(request, blob) {
|
|
|
1042
1075
|
function error(reason) {
|
|
1043
1076
|
if (!aborted) {
|
|
1044
1077
|
aborted = !0;
|
|
1045
|
-
request.abortListeners.delete(
|
|
1078
|
+
request.abortListeners.delete(abortBlob);
|
|
1046
1079
|
var digest = logRecoverableError$1(request, reason, newTask);
|
|
1047
1080
|
emitErrorChunk(request, newTask.id, digest);
|
|
1048
|
-
request.abortableTasks.delete(newTask);
|
|
1049
1081
|
enqueueFlush(request);
|
|
1050
1082
|
reader.cancel(reason).then(error, error);
|
|
1051
1083
|
}
|
|
1052
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);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1053
1108
|
var model = [blob.type],
|
|
1054
1109
|
newTask = createTask(request, model, null, !1, request.abortableTasks),
|
|
1055
1110
|
reader = blob.stream().getReader(),
|
|
1056
1111
|
aborted = !1;
|
|
1057
|
-
request.abortListeners.add(
|
|
1112
|
+
request.abortListeners.add(abortBlob);
|
|
1058
1113
|
reader.read().then(progress).catch(error);
|
|
1059
1114
|
return "$B" + newTask.id.toString(16);
|
|
1060
1115
|
}
|
|
@@ -1077,7 +1132,7 @@ function renderModel(request, task, parent, key, value) {
|
|
|
1077
1132
|
: thrownValue;
|
|
1078
1133
|
if ("object" === typeof key && null !== key) {
|
|
1079
1134
|
if ("function" === typeof key.then) {
|
|
1080
|
-
if (
|
|
1135
|
+
if (11 === request.status)
|
|
1081
1136
|
return (
|
|
1082
1137
|
(task.status = 3),
|
|
1083
1138
|
(task = request.fatalError),
|
|
@@ -1110,7 +1165,7 @@ function renderModel(request, task, parent, key, value) {
|
|
|
1110
1165
|
parent ? "$L" + value.toString(16) : serializeByValueID$1(value)
|
|
1111
1166
|
);
|
|
1112
1167
|
}
|
|
1113
|
-
if (
|
|
1168
|
+
if (11 === request.status)
|
|
1114
1169
|
return (
|
|
1115
1170
|
(task.status = 3),
|
|
1116
1171
|
(task = request.fatalError),
|
|
@@ -1174,7 +1229,7 @@ function renderModelDestructive(
|
|
|
1174
1229
|
task.thenableState = null;
|
|
1175
1230
|
parentPropertyName = value._init;
|
|
1176
1231
|
value = parentPropertyName(value._payload);
|
|
1177
|
-
if (
|
|
1232
|
+
if (11 === request.status) throw null;
|
|
1178
1233
|
return renderModelDestructive(request, task, emptyRoot, "", value);
|
|
1179
1234
|
case REACT_LEGACY_ELEMENT_TYPE:
|
|
1180
1235
|
throw Error(
|
|
@@ -1446,8 +1501,8 @@ function fatalError$1(request, error) {
|
|
|
1446
1501
|
onFatalError(error);
|
|
1447
1502
|
cleanupTaintQueue(request);
|
|
1448
1503
|
null !== request.destination
|
|
1449
|
-
? ((request.status =
|
|
1450
|
-
: ((request.status =
|
|
1504
|
+
? ((request.status = 13), request.destination.destroy(error))
|
|
1505
|
+
: ((request.status = 12), (request.fatalError = error));
|
|
1451
1506
|
}
|
|
1452
1507
|
function emitPostponeChunk(request, id) {
|
|
1453
1508
|
id = id.toString(16) + ":P\n";
|
|
@@ -1544,7 +1599,7 @@ function retryTask$1(request, task) {
|
|
|
1544
1599
|
: thrownValue;
|
|
1545
1600
|
if ("object" === typeof x && null !== x) {
|
|
1546
1601
|
if ("function" === typeof x.then) {
|
|
1547
|
-
if (
|
|
1602
|
+
if (11 === request.status) {
|
|
1548
1603
|
request.abortableTasks.delete(task);
|
|
1549
1604
|
task.status = 3;
|
|
1550
1605
|
var model = stringify(serializeByValueID$1(request.fatalError));
|
|
@@ -1565,7 +1620,7 @@ function retryTask$1(request, task) {
|
|
|
1565
1620
|
return;
|
|
1566
1621
|
}
|
|
1567
1622
|
}
|
|
1568
|
-
if (
|
|
1623
|
+
if (11 === request.status) {
|
|
1569
1624
|
request.abortableTasks.delete(task);
|
|
1570
1625
|
task.status = 3;
|
|
1571
1626
|
var model$25 = stringify(serializeByValueID$1(request.fatalError));
|
|
@@ -1585,6 +1640,7 @@ function performWork$1(request) {
|
|
|
1585
1640
|
ReactSharedInternalsServer.H = HooksDispatcher$1;
|
|
1586
1641
|
var prevRequest = currentRequest;
|
|
1587
1642
|
currentRequest$1 = currentRequest = request;
|
|
1643
|
+
var hadAbortableTasks = 0 < request.abortableTasks.size;
|
|
1588
1644
|
try {
|
|
1589
1645
|
var pingedTasks = request.pingedTasks;
|
|
1590
1646
|
request.pingedTasks = [];
|
|
@@ -1592,7 +1648,7 @@ function performWork$1(request) {
|
|
|
1592
1648
|
retryTask$1(request, pingedTasks[i]);
|
|
1593
1649
|
null !== request.destination &&
|
|
1594
1650
|
flushCompletedChunks(request, request.destination);
|
|
1595
|
-
if (0 === request.abortableTasks.size) {
|
|
1651
|
+
if (hadAbortableTasks && 0 === request.abortableTasks.size) {
|
|
1596
1652
|
var onAllReady = request.onAllReady;
|
|
1597
1653
|
onAllReady();
|
|
1598
1654
|
}
|
|
@@ -1646,7 +1702,7 @@ function flushCompletedChunks(request, destination) {
|
|
|
1646
1702
|
}
|
|
1647
1703
|
0 === request.pendingChunks &&
|
|
1648
1704
|
(cleanupTaintQueue(request),
|
|
1649
|
-
(request.status =
|
|
1705
|
+
(request.status = 13),
|
|
1650
1706
|
destination.push(null),
|
|
1651
1707
|
(request.destination = null));
|
|
1652
1708
|
}
|
|
@@ -1663,10 +1719,9 @@ function enqueueFlush(request) {
|
|
|
1663
1719
|
}
|
|
1664
1720
|
function abort$1(request, reason) {
|
|
1665
1721
|
try {
|
|
1666
|
-
|
|
1722
|
+
10 === request.status && (request.status = 11);
|
|
1667
1723
|
var abortableTasks = request.abortableTasks;
|
|
1668
1724
|
if (0 < abortableTasks.size) {
|
|
1669
|
-
request.pendingChunks++;
|
|
1670
1725
|
var errorId = request.nextChunkId++;
|
|
1671
1726
|
request.fatalError = errorId;
|
|
1672
1727
|
if (
|
|
@@ -1675,7 +1730,9 @@ function abort$1(request, reason) {
|
|
|
1675
1730
|
reason.$$typeof === REACT_POSTPONE_TYPE
|
|
1676
1731
|
)
|
|
1677
1732
|
logPostpone$1(request, reason.message, null),
|
|
1678
|
-
|
|
1733
|
+
21 === request.type &&
|
|
1734
|
+
(request.pendingChunks++,
|
|
1735
|
+
emitPostponeChunk(request, errorId, reason));
|
|
1679
1736
|
else {
|
|
1680
1737
|
var error =
|
|
1681
1738
|
void 0 === reason
|
|
@@ -1686,7 +1743,9 @@ function abort$1(request, reason) {
|
|
|
1686
1743
|
? Error("The render was aborted by the server with a promise.")
|
|
1687
1744
|
: reason,
|
|
1688
1745
|
digest = logRecoverableError$1(request, error, null);
|
|
1689
|
-
|
|
1746
|
+
20 === request.type &&
|
|
1747
|
+
(request.pendingChunks++,
|
|
1748
|
+
emitErrorChunk(request, errorId, digest, error));
|
|
1690
1749
|
}
|
|
1691
1750
|
abortableTasks.forEach(function (task) {
|
|
1692
1751
|
if (5 !== task.status) {
|
|
@@ -1697,6 +1756,8 @@ function abort$1(request, reason) {
|
|
|
1697
1756
|
}
|
|
1698
1757
|
});
|
|
1699
1758
|
abortableTasks.clear();
|
|
1759
|
+
var onAllReady = request.onAllReady;
|
|
1760
|
+
onAllReady();
|
|
1700
1761
|
}
|
|
1701
1762
|
var abortListeners = request.abortListeners;
|
|
1702
1763
|
if (0 < abortListeners.size) {
|
|
@@ -2229,6 +2290,22 @@ function bind() {
|
|
|
2229
2290
|
}
|
|
2230
2291
|
return newFn;
|
|
2231
2292
|
}
|
|
2293
|
+
function createBoundServerReference(metaData, callServer, encodeFormAction) {
|
|
2294
|
+
function action() {
|
|
2295
|
+
var args = Array.prototype.slice.call(arguments);
|
|
2296
|
+
return bound
|
|
2297
|
+
? "fulfilled" === bound.status
|
|
2298
|
+
? callServer(id, bound.value.concat(args))
|
|
2299
|
+
: Promise.resolve(bound).then(function (boundArgs) {
|
|
2300
|
+
return callServer(id, boundArgs.concat(args));
|
|
2301
|
+
})
|
|
2302
|
+
: callServer(id, args);
|
|
2303
|
+
}
|
|
2304
|
+
var id = metaData.id,
|
|
2305
|
+
bound = metaData.bound;
|
|
2306
|
+
registerServerReference(action, { id: id, bound: bound }, encodeFormAction);
|
|
2307
|
+
return action;
|
|
2308
|
+
}
|
|
2232
2309
|
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
|
2233
2310
|
function getComponentNameFromType(type) {
|
|
2234
2311
|
if (null == type) return null;
|
|
@@ -2280,14 +2357,14 @@ function getComponentNameFromType(type) {
|
|
|
2280
2357
|
}
|
|
2281
2358
|
return null;
|
|
2282
2359
|
}
|
|
2283
|
-
function
|
|
2360
|
+
function ReactPromise(status, value, reason, response) {
|
|
2284
2361
|
this.status = status;
|
|
2285
2362
|
this.value = value;
|
|
2286
2363
|
this.reason = reason;
|
|
2287
2364
|
this._response = response;
|
|
2288
2365
|
}
|
|
2289
|
-
|
|
2290
|
-
|
|
2366
|
+
ReactPromise.prototype = Object.create(Promise.prototype);
|
|
2367
|
+
ReactPromise.prototype.then = function (resolve, reject) {
|
|
2291
2368
|
switch (this.status) {
|
|
2292
2369
|
case "resolved_model":
|
|
2293
2370
|
initializeModelChunk(this);
|
|
@@ -2329,7 +2406,7 @@ function readChunk(chunk) {
|
|
|
2329
2406
|
}
|
|
2330
2407
|
}
|
|
2331
2408
|
function createPendingChunk(response) {
|
|
2332
|
-
return new
|
|
2409
|
+
return new ReactPromise("pending", null, null, response);
|
|
2333
2410
|
}
|
|
2334
2411
|
function wakeChunk(listeners, value) {
|
|
2335
2412
|
for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value);
|
|
@@ -2370,7 +2447,7 @@ function triggerErrorOnChunk(chunk, error) {
|
|
|
2370
2447
|
}
|
|
2371
2448
|
}
|
|
2372
2449
|
function createResolvedIteratorResultChunk(response, value, done) {
|
|
2373
|
-
return new
|
|
2450
|
+
return new ReactPromise(
|
|
2374
2451
|
"resolved_model",
|
|
2375
2452
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}",
|
|
2376
2453
|
null,
|
|
@@ -2514,20 +2591,11 @@ function waitForReference(
|
|
|
2514
2591
|
return null;
|
|
2515
2592
|
}
|
|
2516
2593
|
function createServerReferenceProxy(response, metaData) {
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
? callServer(metaData.id, p.value.concat(args))
|
|
2523
|
-
: Promise.resolve(p).then(function (bound) {
|
|
2524
|
-
return callServer(metaData.id, bound.concat(args));
|
|
2525
|
-
})
|
|
2526
|
-
: callServer(metaData.id, args);
|
|
2527
|
-
}
|
|
2528
|
-
var callServer = response._callServer;
|
|
2529
|
-
registerServerReference(proxy, metaData, response._encodeFormAction);
|
|
2530
|
-
return proxy;
|
|
2594
|
+
return createBoundServerReference(
|
|
2595
|
+
metaData,
|
|
2596
|
+
response._callServer,
|
|
2597
|
+
response._encodeFormAction
|
|
2598
|
+
);
|
|
2531
2599
|
}
|
|
2532
2600
|
function getOutlinedModel(response, reference, parentObject, key, map) {
|
|
2533
2601
|
reference = reference.split(":");
|
|
@@ -2730,7 +2798,10 @@ function resolveStream(response, id, stream, controller) {
|
|
|
2730
2798
|
(chunk.value = stream),
|
|
2731
2799
|
(chunk.reason = controller),
|
|
2732
2800
|
null !== response && wakeChunk(response, chunk.value))
|
|
2733
|
-
: chunks.set(
|
|
2801
|
+
: chunks.set(
|
|
2802
|
+
id,
|
|
2803
|
+
new ReactPromise("fulfilled", stream, controller, response)
|
|
2804
|
+
);
|
|
2734
2805
|
}
|
|
2735
2806
|
function startReadableStream(response, id, type) {
|
|
2736
2807
|
var controller = null;
|
|
@@ -2751,7 +2822,7 @@ function startReadableStream(response, id, type) {
|
|
|
2751
2822
|
},
|
|
2752
2823
|
enqueueModel: function (json) {
|
|
2753
2824
|
if (null === previousBlockedChunk) {
|
|
2754
|
-
var chunk = new
|
|
2825
|
+
var chunk = new ReactPromise("resolved_model", json, null, response);
|
|
2755
2826
|
initializeModelChunk(chunk);
|
|
2756
2827
|
"fulfilled" === chunk.status
|
|
2757
2828
|
? controller.enqueue(chunk.value)
|
|
@@ -2827,7 +2898,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
2827
2898
|
);
|
|
2828
2899
|
if (nextReadIndex === buffer.length) {
|
|
2829
2900
|
if (closed)
|
|
2830
|
-
return new
|
|
2901
|
+
return new ReactPromise(
|
|
2831
2902
|
"fulfilled",
|
|
2832
2903
|
{ done: !0, value: void 0 },
|
|
2833
2904
|
null,
|
|
@@ -2846,7 +2917,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
2846
2917
|
{
|
|
2847
2918
|
enqueueValue: function (value) {
|
|
2848
2919
|
if (nextWriteIndex === buffer.length)
|
|
2849
|
-
buffer[nextWriteIndex] = new
|
|
2920
|
+
buffer[nextWriteIndex] = new ReactPromise(
|
|
2850
2921
|
"fulfilled",
|
|
2851
2922
|
{ done: !1, value: value },
|
|
2852
2923
|
null,
|
|
@@ -2923,10 +2994,15 @@ function createFromJSONCallback(response) {
|
|
|
2923
2994
|
(initializingHandler = value.parent),
|
|
2924
2995
|
value.errored)
|
|
2925
2996
|
)
|
|
2926
|
-
(key = new
|
|
2997
|
+
(key = new ReactPromise("rejected", null, value.value, response)),
|
|
2927
2998
|
(key = createLazyChunkWrapper(key));
|
|
2928
2999
|
else if (0 < value.deps) {
|
|
2929
|
-
var blockedChunk = new
|
|
3000
|
+
var blockedChunk = new ReactPromise(
|
|
3001
|
+
"blocked",
|
|
3002
|
+
null,
|
|
3003
|
+
null,
|
|
3004
|
+
response
|
|
3005
|
+
);
|
|
2930
3006
|
value.value = key;
|
|
2931
3007
|
value.chunk = blockedChunk;
|
|
2932
3008
|
key = createLazyChunkWrapper(blockedChunk);
|
|
@@ -5937,7 +6013,6 @@ function createRequest(
|
|
|
5937
6013
|
formState
|
|
5938
6014
|
);
|
|
5939
6015
|
}
|
|
5940
|
-
var AbortSigil = {};
|
|
5941
6016
|
function pingTask(request, task) {
|
|
5942
6017
|
request.pingedTasks.push(task);
|
|
5943
6018
|
1 === request.pingedTasks.length &&
|
|
@@ -6266,14 +6341,14 @@ function renderElement(request, task, keyPath, type, props, ref) {
|
|
|
6266
6341
|
}
|
|
6267
6342
|
else defaultProps.queue = null;
|
|
6268
6343
|
type = newProps.render();
|
|
6269
|
-
if (1 === request.status) throw
|
|
6344
|
+
if (1 === request.status) throw null;
|
|
6270
6345
|
props = task.keyPath;
|
|
6271
6346
|
task.keyPath = keyPath;
|
|
6272
6347
|
renderNodeDestructive(request, task, type, -1);
|
|
6273
6348
|
task.keyPath = props;
|
|
6274
6349
|
} else {
|
|
6275
6350
|
type = renderWithHooks(request, task, keyPath, type, props, void 0);
|
|
6276
|
-
if (1 === request.status) throw
|
|
6351
|
+
if (1 === request.status) throw null;
|
|
6277
6352
|
finishFunctionComponent(
|
|
6278
6353
|
request,
|
|
6279
6354
|
task,
|
|
@@ -6453,8 +6528,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
|
|
|
6453
6528
|
renderNode(request, task, ref, -1), (propName.status = 1);
|
|
6454
6529
|
} catch (thrownValue) {
|
|
6455
6530
|
throw (
|
|
6456
|
-
((propName.status =
|
|
6457
|
-
thrownValue)
|
|
6531
|
+
((propName.status = 1 === request.status ? 3 : 4), thrownValue)
|
|
6458
6532
|
);
|
|
6459
6533
|
} finally {
|
|
6460
6534
|
(task.blockedSegment = contextType), (task.keyPath = type);
|
|
@@ -6495,7 +6569,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
|
|
|
6495
6569
|
}
|
|
6496
6570
|
} catch (thrownValue$84) {
|
|
6497
6571
|
(propName$89.status = 4),
|
|
6498
|
-
|
|
6572
|
+
1 === request.status
|
|
6499
6573
|
? ((textEmbedded.status = 3), (newProps = request.fatalError))
|
|
6500
6574
|
: ((textEmbedded.status = 4), (newProps = thrownValue$84)),
|
|
6501
6575
|
(defaultProps = getThrownInfo(task.componentStack)),
|
|
@@ -6607,7 +6681,7 @@ function renderElement(request, task, keyPath, type, props, ref) {
|
|
|
6607
6681
|
case REACT_LAZY_TYPE:
|
|
6608
6682
|
newProps = type._init;
|
|
6609
6683
|
type = newProps(type._payload);
|
|
6610
|
-
if (1 === request.status) throw
|
|
6684
|
+
if (1 === request.status) throw null;
|
|
6611
6685
|
renderElement(request, task, keyPath, type, props, ref);
|
|
6612
6686
|
return;
|
|
6613
6687
|
}
|
|
@@ -6843,7 +6917,7 @@ function retryNode(request, task) {
|
|
|
6843
6917
|
case REACT_LAZY_TYPE:
|
|
6844
6918
|
childNodes = node._init;
|
|
6845
6919
|
node = childNodes(node._payload);
|
|
6846
|
-
if (1 === request.status) throw
|
|
6920
|
+
if (1 === request.status) throw null;
|
|
6847
6921
|
renderNodeDestructive(request, task, node, childIndex);
|
|
6848
6922
|
return;
|
|
6849
6923
|
}
|
|
@@ -7575,7 +7649,9 @@ function performWork(request$jscomp$1) {
|
|
|
7575
7649
|
erroredReplay(
|
|
7576
7650
|
request$jscomp$0,
|
|
7577
7651
|
task.blockedBoundary,
|
|
7578
|
-
|
|
7652
|
+
1 === request$jscomp$0.status
|
|
7653
|
+
? request$jscomp$0.fatalError
|
|
7654
|
+
: x,
|
|
7579
7655
|
errorInfo,
|
|
7580
7656
|
task.replay.nodes,
|
|
7581
7657
|
task.replay.slots
|
|
@@ -7611,7 +7687,7 @@ function performWork(request$jscomp$1) {
|
|
|
7611
7687
|
var x$jscomp$0 =
|
|
7612
7688
|
thrownValue === SuspenseException
|
|
7613
7689
|
? getSuspendedThenable()
|
|
7614
|
-
:
|
|
7690
|
+
: 1 === request.status
|
|
7615
7691
|
? request.fatalError
|
|
7616
7692
|
: thrownValue;
|
|
7617
7693
|
if ("object" === typeof x$jscomp$0 && null !== x$jscomp$0) {
|
|
@@ -8284,7 +8360,7 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8284
8360
|
? triggerErrorOnChunk(rowLength, i)
|
|
8285
8361
|
: rowTag.set(
|
|
8286
8362
|
rowID,
|
|
8287
|
-
new
|
|
8363
|
+
new ReactPromise("rejected", null, i, flightResponse)
|
|
8288
8364
|
);
|
|
8289
8365
|
break;
|
|
8290
8366
|
case 84:
|
|
@@ -8294,7 +8370,7 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8294
8370
|
? rowLength.reason.enqueueValue(i)
|
|
8295
8371
|
: rowTag.set(
|
|
8296
8372
|
rowID,
|
|
8297
|
-
new
|
|
8373
|
+
new ReactPromise("fulfilled", i, null, flightResponse)
|
|
8298
8374
|
);
|
|
8299
8375
|
break;
|
|
8300
8376
|
case 68:
|
|
@@ -8330,7 +8406,7 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8330
8406
|
? triggerErrorOnChunk(rowLength, i)
|
|
8331
8407
|
: rowTag.set(
|
|
8332
8408
|
rowID,
|
|
8333
|
-
new
|
|
8409
|
+
new ReactPromise("rejected", null, i, flightResponse)
|
|
8334
8410
|
);
|
|
8335
8411
|
break;
|
|
8336
8412
|
default:
|
|
@@ -8339,7 +8415,12 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8339
8415
|
? resolveModelChunk(rowLength, i)
|
|
8340
8416
|
: rowTag.set(
|
|
8341
8417
|
rowID,
|
|
8342
|
-
new
|
|
8418
|
+
new ReactPromise(
|
|
8419
|
+
"resolved_model",
|
|
8420
|
+
i,
|
|
8421
|
+
null,
|
|
8422
|
+
flightResponse
|
|
8423
|
+
)
|
|
8343
8424
|
);
|
|
8344
8425
|
}
|
|
8345
8426
|
i = lastIdx;
|
|
@@ -8367,6 +8448,7 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8367
8448
|
stashErrorIdx = 1,
|
|
8368
8449
|
stashedErrors = new Map(),
|
|
8369
8450
|
flightRequest = new RequestInstance$1(
|
|
8451
|
+
20,
|
|
8370
8452
|
children,
|
|
8371
8453
|
null,
|
|
8372
8454
|
function (error) {
|
|
@@ -8379,8 +8461,8 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8379
8461
|
void 0,
|
|
8380
8462
|
"Markup",
|
|
8381
8463
|
void 0,
|
|
8382
|
-
|
|
8383
|
-
|
|
8464
|
+
noop$3,
|
|
8465
|
+
noop$3
|
|
8384
8466
|
),
|
|
8385
8467
|
flightResponse = new ResponseInstance(
|
|
8386
8468
|
null,
|
|
@@ -8441,10 +8523,13 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8441
8523
|
}
|
|
8442
8524
|
flightRequest.flushScheduled = null !== flightRequest.destination;
|
|
8443
8525
|
performWork$1(flightRequest);
|
|
8444
|
-
if (
|
|
8445
|
-
(flightRequest.status =
|
|
8526
|
+
if (12 === flightRequest.status)
|
|
8527
|
+
(flightRequest.status = 13),
|
|
8446
8528
|
flightDestination.destroy(flightRequest.fatalError);
|
|
8447
|
-
else if (
|
|
8529
|
+
else if (
|
|
8530
|
+
13 !== flightRequest.status &&
|
|
8531
|
+
null === flightRequest.destination
|
|
8532
|
+
) {
|
|
8448
8533
|
flightRequest.destination = flightDestination;
|
|
8449
8534
|
try {
|
|
8450
8535
|
flushCompletedChunks(flightRequest, flightDestination);
|
|
@@ -8469,4 +8554,4 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8469
8554
|
});
|
|
8470
8555
|
});
|
|
8471
8556
|
};
|
|
8472
|
-
exports.version = "19.0.0-experimental-
|
|
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-
|
|
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-
|
|
20
|
+
"react": "0.0.0-experimental-a960b92c-20240819"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"LICENSE",
|