react-markup 0.0.0-experimental-4b7d4530-20241218 → 0.0.0-experimental-65e06cb7-20241218
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.
|
@@ -179,6 +179,14 @@
|
|
|
179
179
|
suspendedThenable$1 = null;
|
|
180
180
|
return thenable;
|
|
181
181
|
}
|
|
182
|
+
function prepareToUseHooksForComponent(
|
|
183
|
+
prevThenableState,
|
|
184
|
+
componentDebugInfo
|
|
185
|
+
) {
|
|
186
|
+
thenableIndexCounter$1 = 0;
|
|
187
|
+
thenableState$1 = prevThenableState;
|
|
188
|
+
currentComponentDebugInfo = componentDebugInfo;
|
|
189
|
+
}
|
|
182
190
|
function getThenableStateAfterSuspending$1() {
|
|
183
191
|
var state = thenableState$1 || [];
|
|
184
192
|
state._componentDebugInfo = currentComponentDebugInfo;
|
|
@@ -1140,71 +1148,6 @@
|
|
|
1140
1148
|
currentOwner = null;
|
|
1141
1149
|
}
|
|
1142
1150
|
}
|
|
1143
|
-
function processServerComponentReturnValue(
|
|
1144
|
-
request,
|
|
1145
|
-
task,
|
|
1146
|
-
Component,
|
|
1147
|
-
result
|
|
1148
|
-
) {
|
|
1149
|
-
if (
|
|
1150
|
-
"object" !== typeof result ||
|
|
1151
|
-
null === result ||
|
|
1152
|
-
isClientReference(result)
|
|
1153
|
-
)
|
|
1154
|
-
return result;
|
|
1155
|
-
if ("function" === typeof result.then)
|
|
1156
|
-
return (
|
|
1157
|
-
result.then(function (resolvedValue) {
|
|
1158
|
-
"object" === typeof resolvedValue &&
|
|
1159
|
-
null !== resolvedValue &&
|
|
1160
|
-
resolvedValue.$$typeof === REACT_ELEMENT_TYPE &&
|
|
1161
|
-
(resolvedValue._store.validated = 1);
|
|
1162
|
-
}, voidHandler),
|
|
1163
|
-
"fulfilled" === result.status
|
|
1164
|
-
? result.value
|
|
1165
|
-
: createLazyWrapperAroundWakeable(result)
|
|
1166
|
-
);
|
|
1167
|
-
result.$$typeof === REACT_ELEMENT_TYPE && (result._store.validated = 1);
|
|
1168
|
-
var iteratorFn = getIteratorFn(result);
|
|
1169
|
-
if (iteratorFn) {
|
|
1170
|
-
var multiShot = _defineProperty({}, Symbol.iterator, function () {
|
|
1171
|
-
var iterator = iteratorFn.call(result);
|
|
1172
|
-
iterator !== result ||
|
|
1173
|
-
("[object GeneratorFunction]" ===
|
|
1174
|
-
Object.prototype.toString.call(Component) &&
|
|
1175
|
-
"[object Generator]" ===
|
|
1176
|
-
Object.prototype.toString.call(result)) ||
|
|
1177
|
-
callWithDebugContextInDEV(request, task, function () {
|
|
1178
|
-
console.error(
|
|
1179
|
-
"Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. "
|
|
1180
|
-
);
|
|
1181
|
-
});
|
|
1182
|
-
return iterator;
|
|
1183
|
-
});
|
|
1184
|
-
multiShot._debugInfo = result._debugInfo;
|
|
1185
|
-
return multiShot;
|
|
1186
|
-
}
|
|
1187
|
-
return "function" !== typeof result[ASYNC_ITERATOR] ||
|
|
1188
|
-
("function" === typeof ReadableStream &&
|
|
1189
|
-
result instanceof ReadableStream)
|
|
1190
|
-
? result
|
|
1191
|
-
: ((multiShot = _defineProperty({}, ASYNC_ITERATOR, function () {
|
|
1192
|
-
var iterator = result[ASYNC_ITERATOR]();
|
|
1193
|
-
iterator !== result ||
|
|
1194
|
-
("[object AsyncGeneratorFunction]" ===
|
|
1195
|
-
Object.prototype.toString.call(Component) &&
|
|
1196
|
-
"[object AsyncGenerator]" ===
|
|
1197
|
-
Object.prototype.toString.call(result)) ||
|
|
1198
|
-
callWithDebugContextInDEV(request, task, function () {
|
|
1199
|
-
console.error(
|
|
1200
|
-
"Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. "
|
|
1201
|
-
);
|
|
1202
|
-
});
|
|
1203
|
-
return iterator;
|
|
1204
|
-
})),
|
|
1205
|
-
(multiShot._debugInfo = result._debugInfo),
|
|
1206
|
-
multiShot);
|
|
1207
|
-
}
|
|
1208
1151
|
function renderFunctionComponent$1(
|
|
1209
1152
|
request,
|
|
1210
1153
|
task,
|
|
@@ -1242,9 +1185,7 @@
|
|
|
1242
1185
|
2 === validated &&
|
|
1243
1186
|
warnForMissingKey$1(request, key, componentDebugInfo, task.debugTask);
|
|
1244
1187
|
}
|
|
1245
|
-
|
|
1246
|
-
thenableState$1 = prevThenableState;
|
|
1247
|
-
currentComponentDebugInfo = componentDebugInfo;
|
|
1188
|
+
prepareToUseHooksForComponent(prevThenableState, componentDebugInfo);
|
|
1248
1189
|
props = task.debugTask
|
|
1249
1190
|
? task.debugTask.run(
|
|
1250
1191
|
callComponentInDEV$1.bind(
|
|
@@ -1264,21 +1205,74 @@
|
|
|
1264
1205
|
props.then(voidHandler, voidHandler),
|
|
1265
1206
|
null)
|
|
1266
1207
|
);
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1208
|
+
if (
|
|
1209
|
+
"object" === typeof props &&
|
|
1210
|
+
null !== props &&
|
|
1211
|
+
!isClientReference(props)
|
|
1212
|
+
) {
|
|
1213
|
+
if ("function" === typeof props.then) {
|
|
1214
|
+
validated = props;
|
|
1215
|
+
validated.then(function (resolvedValue) {
|
|
1216
|
+
"object" === typeof resolvedValue &&
|
|
1217
|
+
null !== resolvedValue &&
|
|
1218
|
+
resolvedValue.$$typeof === REACT_ELEMENT_TYPE &&
|
|
1219
|
+
(resolvedValue._store.validated = 1);
|
|
1220
|
+
}, voidHandler);
|
|
1221
|
+
if ("fulfilled" === validated.status) return validated.value;
|
|
1222
|
+
props = createLazyWrapperAroundWakeable(props);
|
|
1223
|
+
}
|
|
1224
|
+
var iteratorFn = getIteratorFn(props);
|
|
1225
|
+
if (iteratorFn) {
|
|
1226
|
+
var iterableChild = props;
|
|
1227
|
+
props = _defineProperty({}, Symbol.iterator, function () {
|
|
1228
|
+
var iterator = iteratorFn.call(iterableChild);
|
|
1229
|
+
iterator !== iterableChild ||
|
|
1230
|
+
("[object GeneratorFunction]" ===
|
|
1231
|
+
Object.prototype.toString.call(Component) &&
|
|
1232
|
+
"[object Generator]" ===
|
|
1233
|
+
Object.prototype.toString.call(iterableChild)) ||
|
|
1234
|
+
callWithDebugContextInDEV(request, task, function () {
|
|
1235
|
+
console.error(
|
|
1236
|
+
"Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. "
|
|
1237
|
+
);
|
|
1238
|
+
});
|
|
1239
|
+
return iterator;
|
|
1240
|
+
});
|
|
1241
|
+
props._debugInfo = iterableChild._debugInfo;
|
|
1242
|
+
} else if (
|
|
1243
|
+
"function" !== typeof props[ASYNC_ITERATOR] ||
|
|
1244
|
+
("function" === typeof ReadableStream &&
|
|
1245
|
+
props instanceof ReadableStream)
|
|
1246
|
+
)
|
|
1247
|
+
props.$$typeof === REACT_ELEMENT_TYPE && (props._store.validated = 1);
|
|
1248
|
+
else {
|
|
1249
|
+
var _iterableChild = props;
|
|
1250
|
+
props = _defineProperty({}, ASYNC_ITERATOR, function () {
|
|
1251
|
+
var iterator = _iterableChild[ASYNC_ITERATOR]();
|
|
1252
|
+
iterator !== _iterableChild ||
|
|
1253
|
+
("[object AsyncGeneratorFunction]" ===
|
|
1254
|
+
Object.prototype.toString.call(Component) &&
|
|
1255
|
+
"[object AsyncGenerator]" ===
|
|
1256
|
+
Object.prototype.toString.call(_iterableChild)) ||
|
|
1257
|
+
callWithDebugContextInDEV(request, task, function () {
|
|
1258
|
+
console.error(
|
|
1259
|
+
"Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. "
|
|
1260
|
+
);
|
|
1261
|
+
});
|
|
1262
|
+
return iterator;
|
|
1263
|
+
});
|
|
1264
|
+
props._debugInfo = _iterableChild._debugInfo;
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
validated = task.keyPath;
|
|
1268
|
+
prevThenableState = task.implicitSlot;
|
|
1275
1269
|
null !== key
|
|
1276
|
-
? (task.keyPath = null ===
|
|
1277
|
-
: null ===
|
|
1278
|
-
|
|
1279
|
-
task.keyPath =
|
|
1280
|
-
task.implicitSlot =
|
|
1281
|
-
return
|
|
1270
|
+
? (task.keyPath = null === validated ? key : validated + "," + key)
|
|
1271
|
+
: null === validated && (task.implicitSlot = !0);
|
|
1272
|
+
key = renderModelDestructive(request, task, emptyRoot, "", props);
|
|
1273
|
+
task.keyPath = validated;
|
|
1274
|
+
task.implicitSlot = prevThenableState;
|
|
1275
|
+
return key;
|
|
1282
1276
|
}
|
|
1283
1277
|
function warnForMissingKey$1(request, key, componentDebugInfo, debugTask) {
|
|
1284
1278
|
function logKeyError() {
|
|
@@ -4485,17 +4479,15 @@
|
|
|
4485
4479
|
initializeFakeStack(response, debugInfo.owner));
|
|
4486
4480
|
}
|
|
4487
4481
|
function resolveDebugInfo(response, id, debugInfo) {
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
initializeFakeTask(response, debugInfo, env);
|
|
4482
|
+
initializeFakeTask(
|
|
4483
|
+
response,
|
|
4484
|
+
debugInfo,
|
|
4485
|
+
void 0 === debugInfo.env ? response._rootEnvironmentName : debugInfo.env
|
|
4486
|
+
);
|
|
4494
4487
|
null === debugInfo.owner && null != response._debugRootOwner
|
|
4495
4488
|
? ((debugInfo.owner = response._debugRootOwner),
|
|
4496
4489
|
(debugInfo.debugStack = response._debugRootStack))
|
|
4497
|
-
:
|
|
4498
|
-
initializeFakeStack(response, debugInfo);
|
|
4490
|
+
: initializeFakeStack(response, debugInfo);
|
|
4499
4491
|
response = getChunk(response, id);
|
|
4500
4492
|
(response._debugInfo || (response._debugInfo = [])).push(debugInfo);
|
|
4501
4493
|
}
|
|
@@ -13177,5 +13169,5 @@
|
|
|
13177
13169
|
});
|
|
13178
13170
|
});
|
|
13179
13171
|
};
|
|
13180
|
-
exports.version = "19.0.0-experimental-
|
|
13172
|
+
exports.version = "19.0.0-experimental-65e06cb7-20241218";
|
|
13181
13173
|
})();
|
|
@@ -889,57 +889,63 @@ function createLazyWrapperAroundWakeable(wakeable) {
|
|
|
889
889
|
return { $$typeof: REACT_LAZY_TYPE, _payload: wakeable, _init: readThenable };
|
|
890
890
|
}
|
|
891
891
|
function voidHandler() {}
|
|
892
|
-
function processServerComponentReturnValue(request, task, Component, result) {
|
|
893
|
-
if (
|
|
894
|
-
"object" !== typeof result ||
|
|
895
|
-
null === result ||
|
|
896
|
-
result.$$typeof === CLIENT_REFERENCE_TAG$1
|
|
897
|
-
)
|
|
898
|
-
return result;
|
|
899
|
-
if ("function" === typeof result.then)
|
|
900
|
-
return "fulfilled" === result.status
|
|
901
|
-
? result.value
|
|
902
|
-
: createLazyWrapperAroundWakeable(result);
|
|
903
|
-
var iteratorFn = getIteratorFn(result);
|
|
904
|
-
return iteratorFn
|
|
905
|
-
? ((request = {}),
|
|
906
|
-
(request[Symbol.iterator] = function () {
|
|
907
|
-
return iteratorFn.call(result);
|
|
908
|
-
}),
|
|
909
|
-
request)
|
|
910
|
-
: "function" !== typeof result[ASYNC_ITERATOR] ||
|
|
911
|
-
("function" === typeof ReadableStream &&
|
|
912
|
-
result instanceof ReadableStream)
|
|
913
|
-
? result
|
|
914
|
-
: ((request = {}),
|
|
915
|
-
(request[ASYNC_ITERATOR] = function () {
|
|
916
|
-
return result[ASYNC_ITERATOR]();
|
|
917
|
-
}),
|
|
918
|
-
request);
|
|
919
|
-
}
|
|
920
892
|
function renderFunctionComponent$1(request, task, key, Component, props) {
|
|
921
893
|
var prevThenableState = task.thenableState;
|
|
922
894
|
task.thenableState = null;
|
|
923
895
|
thenableIndexCounter$1 = 0;
|
|
924
896
|
thenableState$1 = prevThenableState;
|
|
925
|
-
|
|
897
|
+
Component = Component(props, void 0);
|
|
926
898
|
if (12 === request.status)
|
|
927
899
|
throw (
|
|
928
|
-
("object" === typeof
|
|
929
|
-
null !==
|
|
930
|
-
"function" === typeof
|
|
931
|
-
|
|
932
|
-
|
|
900
|
+
("object" === typeof Component &&
|
|
901
|
+
null !== Component &&
|
|
902
|
+
"function" === typeof Component.then &&
|
|
903
|
+
Component.$$typeof !== CLIENT_REFERENCE_TAG$1 &&
|
|
904
|
+
Component.then(voidHandler, voidHandler),
|
|
933
905
|
null)
|
|
934
906
|
);
|
|
935
|
-
|
|
936
|
-
|
|
907
|
+
if (
|
|
908
|
+
"object" === typeof Component &&
|
|
909
|
+
null !== Component &&
|
|
910
|
+
Component.$$typeof !== CLIENT_REFERENCE_TAG$1
|
|
911
|
+
) {
|
|
912
|
+
if ("function" === typeof Component.then) {
|
|
913
|
+
props = Component;
|
|
914
|
+
if ("fulfilled" === props.status) return props.value;
|
|
915
|
+
Component = createLazyWrapperAroundWakeable(Component);
|
|
916
|
+
}
|
|
917
|
+
var iteratorFn = getIteratorFn(Component);
|
|
918
|
+
if (iteratorFn) {
|
|
919
|
+
var iterableChild = Component;
|
|
920
|
+
Component = {};
|
|
921
|
+
Component =
|
|
922
|
+
((Component[Symbol.iterator] = function () {
|
|
923
|
+
return iteratorFn.call(iterableChild);
|
|
924
|
+
}),
|
|
925
|
+
Component);
|
|
926
|
+
} else if (
|
|
927
|
+
!(
|
|
928
|
+
"function" !== typeof Component[ASYNC_ITERATOR] ||
|
|
929
|
+
("function" === typeof ReadableStream &&
|
|
930
|
+
Component instanceof ReadableStream)
|
|
931
|
+
)
|
|
932
|
+
) {
|
|
933
|
+
var iterableChild$13 = Component;
|
|
934
|
+
Component = {};
|
|
935
|
+
Component =
|
|
936
|
+
((Component[ASYNC_ITERATOR] = function () {
|
|
937
|
+
return iterableChild$13[ASYNC_ITERATOR]();
|
|
938
|
+
}),
|
|
939
|
+
Component);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
props = task.keyPath;
|
|
937
943
|
prevThenableState = task.implicitSlot;
|
|
938
944
|
null !== key
|
|
939
|
-
? (task.keyPath = null ===
|
|
940
|
-
: null ===
|
|
941
|
-
request = renderModelDestructive(request, task, emptyRoot, "",
|
|
942
|
-
task.keyPath =
|
|
945
|
+
? (task.keyPath = null === props ? key : props + "," + key)
|
|
946
|
+
: null === props && (task.implicitSlot = !0);
|
|
947
|
+
request = renderModelDestructive(request, task, emptyRoot, "", Component);
|
|
948
|
+
task.keyPath = props;
|
|
943
949
|
task.implicitSlot = prevThenableState;
|
|
944
950
|
return request;
|
|
945
951
|
}
|
|
@@ -8690,4 +8696,4 @@ exports.experimental_renderToHTML = function (children, options) {
|
|
|
8690
8696
|
});
|
|
8691
8697
|
});
|
|
8692
8698
|
};
|
|
8693
|
-
exports.version = "19.0.0-experimental-
|
|
8699
|
+
exports.version = "19.0.0-experimental-65e06cb7-20241218";
|
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-65e06cb7-20241218",
|
|
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-65e06cb7-20241218"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"LICENSE",
|