react-server-dom-webpack 0.0.0-experimental-1d3fc9c9c-20221023 → 18.3.0-next-e7c5af45c-20221023
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.
- package/cjs/react-server-dom-webpack-server.browser.development.js +96 -133
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +34 -33
- package/cjs/react-server-dom-webpack-server.node.development.js +96 -133
- package/cjs/react-server-dom-webpack-server.node.production.min.js +35 -35
- package/package.json +3 -3
- package/umd/react-server-dom-webpack-server.browser.development.js +96 -133
- package/umd/react-server-dom-webpack-server.browser.production.min.js +39 -38
@@ -357,10 +357,6 @@ var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This preven
|
|
357
357
|
// defaultValue property -- do we need this?
|
358
358
|
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
|
359
359
|
|
360
|
-
{
|
361
|
-
reservedProps.push('innerText', 'textContent');
|
362
|
-
}
|
363
|
-
|
364
360
|
reservedProps.forEach(function (name) {
|
365
361
|
// $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions
|
366
362
|
properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
|
@@ -915,84 +911,80 @@ function readContext(context) {
|
|
915
911
|
// changes to one module should be reflected in the others.
|
916
912
|
// TODO: Rename this module and the corresponding Fiber one to "Thenable"
|
917
913
|
// instead of "Wakeable". Or some other more appropriate name.
|
918
|
-
// TODO: Sparse arrays are bad for performance.
|
919
914
|
function createThenableState() {
|
920
915
|
// The ThenableState is created the first time a component suspends. If it
|
921
916
|
// suspends again, we'll reuse the same state.
|
922
917
|
return [];
|
923
|
-
}
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
918
|
+
}
|
919
|
+
|
920
|
+
function noop() {}
|
921
|
+
|
922
|
+
function trackUsedThenable(thenableState, thenable, index) {
|
923
|
+
var previous = thenableState[index];
|
924
|
+
|
925
|
+
if (previous === undefined) {
|
926
|
+
thenableState.push(thenable);
|
927
|
+
} else {
|
928
|
+
if (previous !== thenable) {
|
929
|
+
// Reuse the previous thenable, and drop the new one. We can assume
|
930
|
+
// they represent the same value, because components are idempotent.
|
931
|
+
// Avoid an unhandled rejection errors for the Promises that we'll
|
932
|
+
// intentionally ignore.
|
933
|
+
thenable.then(noop, noop);
|
934
|
+
thenable = previous;
|
935
|
+
}
|
936
|
+
} // We use an expando to track the status and result of a thenable so that we
|
932
937
|
// can synchronously unwrap the value. Think of this as an extension of the
|
933
938
|
// Promise API, or a custom interface that is a superset of Thenable.
|
934
939
|
//
|
935
940
|
// If the thenable doesn't have a status, set it to "pending" and attach
|
936
941
|
// a listener that will update its status and result when it resolves.
|
937
942
|
|
943
|
+
|
938
944
|
switch (thenable.status) {
|
939
945
|
case 'fulfilled':
|
946
|
+
{
|
947
|
+
var fulfilledValue = thenable.value;
|
948
|
+
return fulfilledValue;
|
949
|
+
}
|
950
|
+
|
940
951
|
case 'rejected':
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
// TODO: Log a warning?
|
946
|
-
break;
|
952
|
+
{
|
953
|
+
var rejectedError = thenable.reason;
|
954
|
+
throw rejectedError;
|
955
|
+
}
|
947
956
|
|
948
957
|
default:
|
949
958
|
{
|
950
|
-
if (typeof thenable.status === 'string') {
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
959
|
+
if (typeof thenable.status === 'string') ; else {
|
960
|
+
var pendingThenable = thenable;
|
961
|
+
pendingThenable.status = 'pending';
|
962
|
+
pendingThenable.then(function (fulfilledValue) {
|
963
|
+
if (thenable.status === 'pending') {
|
964
|
+
var fulfilledThenable = thenable;
|
965
|
+
fulfilledThenable.status = 'fulfilled';
|
966
|
+
fulfilledThenable.value = fulfilledValue;
|
967
|
+
}
|
968
|
+
}, function (error) {
|
969
|
+
if (thenable.status === 'pending') {
|
970
|
+
var rejectedThenable = thenable;
|
971
|
+
rejectedThenable.status = 'rejected';
|
972
|
+
rejectedThenable.reason = error;
|
973
|
+
}
|
974
|
+
});
|
975
|
+
} // Suspend.
|
976
|
+
// TODO: Throwing here is an implementation detail that allows us to
|
977
|
+
// unwind the call stack. But we shouldn't allow it to leak into
|
978
|
+
// userspace. Throw an opaque placeholder value instead of the
|
979
|
+
// actual thenable. If it doesn't get captured by the work loop, log
|
980
|
+
// a warning, because that means something in userspace must have
|
981
|
+
// caught it.
|
956
982
|
|
957
|
-
|
958
|
-
|
959
|
-
pendingThenable.then(function (fulfilledValue) {
|
960
|
-
if (thenable.status === 'pending') {
|
961
|
-
var fulfilledThenable = thenable;
|
962
|
-
fulfilledThenable.status = 'fulfilled';
|
963
|
-
fulfilledThenable.value = fulfilledValue;
|
964
|
-
}
|
965
|
-
}, function (error) {
|
966
|
-
if (thenable.status === 'pending') {
|
967
|
-
var rejectedThenable = thenable;
|
968
|
-
rejectedThenable.status = 'rejected';
|
969
|
-
rejectedThenable.reason = error;
|
970
|
-
}
|
971
|
-
});
|
972
|
-
break;
|
983
|
+
|
984
|
+
throw thenable;
|
973
985
|
}
|
974
986
|
}
|
975
987
|
}
|
976
|
-
function trackUsedThenable(thenableState, thenable, index) {
|
977
|
-
// This is only a separate function from trackSuspendedWakeable for symmetry
|
978
|
-
// with Fiber.
|
979
|
-
// TODO: Disallow throwing a thenable directly. It must go through `use` (or
|
980
|
-
// some equivalent for internal Suspense implementations). We can't do this in
|
981
|
-
// Fiber yet because it's a breaking change but we can do it in Server
|
982
|
-
// Components because Server Components aren't released yet.
|
983
|
-
thenableState[index] = thenable;
|
984
|
-
}
|
985
|
-
function getPreviouslyUsedThenableAtIndex(thenableState, index) {
|
986
|
-
if (thenableState !== null) {
|
987
|
-
var thenable = thenableState[index];
|
988
|
-
|
989
|
-
if (thenable !== undefined) {
|
990
|
-
return thenable;
|
991
|
-
}
|
992
|
-
}
|
993
|
-
|
994
|
-
return null;
|
995
|
-
}
|
996
988
|
|
997
989
|
var currentRequest = null;
|
998
990
|
var thenableIndexCounter = 0;
|
@@ -1082,8 +1074,6 @@ function useId() {
|
|
1082
1074
|
return ':' + currentRequest.identifierPrefix + 'S' + id.toString(32) + ':';
|
1083
1075
|
}
|
1084
1076
|
|
1085
|
-
function noop() {}
|
1086
|
-
|
1087
1077
|
function use(usable) {
|
1088
1078
|
if (usable !== null && typeof usable === 'object') {
|
1089
1079
|
// $FlowFixMe[method-unbinding]
|
@@ -1094,70 +1084,11 @@ function use(usable) {
|
|
1094
1084
|
var index = thenableIndexCounter;
|
1095
1085
|
thenableIndexCounter += 1;
|
1096
1086
|
|
1097
|
-
|
1098
|
-
|
1099
|
-
{
|
1100
|
-
var fulfilledValue = thenable.value;
|
1101
|
-
return fulfilledValue;
|
1102
|
-
}
|
1103
|
-
|
1104
|
-
case 'rejected':
|
1105
|
-
{
|
1106
|
-
var rejectedError = thenable.reason;
|
1107
|
-
throw rejectedError;
|
1108
|
-
}
|
1109
|
-
|
1110
|
-
default:
|
1111
|
-
{
|
1112
|
-
var prevThenableAtIndex = getPreviouslyUsedThenableAtIndex(thenableState, index);
|
1113
|
-
|
1114
|
-
if (prevThenableAtIndex !== null) {
|
1115
|
-
if (thenable !== prevThenableAtIndex) {
|
1116
|
-
// Avoid an unhandled rejection errors for the Promises that we'll
|
1117
|
-
// intentionally ignore.
|
1118
|
-
thenable.then(noop, noop);
|
1119
|
-
}
|
1120
|
-
|
1121
|
-
switch (prevThenableAtIndex.status) {
|
1122
|
-
case 'fulfilled':
|
1123
|
-
{
|
1124
|
-
var _fulfilledValue = prevThenableAtIndex.value;
|
1125
|
-
return _fulfilledValue;
|
1126
|
-
}
|
1127
|
-
|
1128
|
-
case 'rejected':
|
1129
|
-
{
|
1130
|
-
var _rejectedError = prevThenableAtIndex.reason;
|
1131
|
-
throw _rejectedError;
|
1132
|
-
}
|
1133
|
-
|
1134
|
-
default:
|
1135
|
-
{
|
1136
|
-
// The thenable still hasn't resolved. Suspend with the same
|
1137
|
-
// thenable as last time to avoid redundant listeners.
|
1138
|
-
throw prevThenableAtIndex;
|
1139
|
-
}
|
1140
|
-
}
|
1141
|
-
} else {
|
1142
|
-
// This is the first time something has been used at this index.
|
1143
|
-
// Stash the thenable at the current index so we can reuse it during
|
1144
|
-
// the next attempt.
|
1145
|
-
if (thenableState === null) {
|
1146
|
-
thenableState = createThenableState();
|
1147
|
-
}
|
1148
|
-
|
1149
|
-
trackUsedThenable(thenableState, thenable, index); // Suspend.
|
1150
|
-
// TODO: Throwing here is an implementation detail that allows us to
|
1151
|
-
// unwind the call stack. But we shouldn't allow it to leak into
|
1152
|
-
// userspace. Throw an opaque placeholder value instead of the
|
1153
|
-
// actual thenable. If it doesn't get captured by the work loop, log
|
1154
|
-
// a warning, because that means something in userspace must have
|
1155
|
-
// caught it.
|
1156
|
-
|
1157
|
-
throw thenable;
|
1158
|
-
}
|
1159
|
-
}
|
1087
|
+
if (thenableState === null) {
|
1088
|
+
thenableState = createThenableState();
|
1160
1089
|
}
|
1090
|
+
|
1091
|
+
return trackUsedThenable(thenableState, thenable, index);
|
1161
1092
|
} else if (usable.$$typeof === REACT_SERVER_CONTEXT_TYPE) {
|
1162
1093
|
var context = usable;
|
1163
1094
|
return readContext$1(context);
|
@@ -1305,10 +1236,46 @@ function readThenable(thenable) {
|
|
1305
1236
|
}
|
1306
1237
|
|
1307
1238
|
function createLazyWrapperAroundWakeable(wakeable) {
|
1308
|
-
|
1239
|
+
// This is a temporary fork of the `use` implementation until we accept
|
1240
|
+
// promises everywhere.
|
1241
|
+
var thenable = wakeable;
|
1242
|
+
|
1243
|
+
switch (thenable.status) {
|
1244
|
+
case 'fulfilled':
|
1245
|
+
case 'rejected':
|
1246
|
+
break;
|
1247
|
+
|
1248
|
+
default:
|
1249
|
+
{
|
1250
|
+
if (typeof thenable.status === 'string') {
|
1251
|
+
// Only instrument the thenable if the status if not defined. If
|
1252
|
+
// it's defined, but an unknown value, assume it's been instrumented by
|
1253
|
+
// some custom userspace implementation. We treat it as "pending".
|
1254
|
+
break;
|
1255
|
+
}
|
1256
|
+
|
1257
|
+
var pendingThenable = thenable;
|
1258
|
+
pendingThenable.status = 'pending';
|
1259
|
+
pendingThenable.then(function (fulfilledValue) {
|
1260
|
+
if (thenable.status === 'pending') {
|
1261
|
+
var fulfilledThenable = thenable;
|
1262
|
+
fulfilledThenable.status = 'fulfilled';
|
1263
|
+
fulfilledThenable.value = fulfilledValue;
|
1264
|
+
}
|
1265
|
+
}, function (error) {
|
1266
|
+
if (thenable.status === 'pending') {
|
1267
|
+
var rejectedThenable = thenable;
|
1268
|
+
rejectedThenable.status = 'rejected';
|
1269
|
+
rejectedThenable.reason = error;
|
1270
|
+
}
|
1271
|
+
});
|
1272
|
+
break;
|
1273
|
+
}
|
1274
|
+
}
|
1275
|
+
|
1309
1276
|
var lazyType = {
|
1310
1277
|
$$typeof: REACT_LAZY_TYPE,
|
1311
|
-
_payload:
|
1278
|
+
_payload: thenable,
|
1312
1279
|
_init: readThenable
|
1313
1280
|
};
|
1314
1281
|
return lazyType;
|
@@ -1897,8 +1864,6 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1897
1864
|
var newTask = createTask(request, value, getActiveContext(), request.abortableTasks);
|
1898
1865
|
var ping = newTask.ping;
|
1899
1866
|
x.then(ping, ping);
|
1900
|
-
var wakeable = x;
|
1901
|
-
trackSuspendedWakeable(wakeable);
|
1902
1867
|
newTask.thenableState = getThenableStateAfterSuspending();
|
1903
1868
|
return serializeByRefID(newTask.id);
|
1904
1869
|
} else {
|
@@ -2143,8 +2108,6 @@ function retryTask(request, task) {
|
|
2143
2108
|
// Something suspended again, let's pick it back up later.
|
2144
2109
|
var ping = task.ping;
|
2145
2110
|
x.then(ping, ping);
|
2146
|
-
var wakeable = x;
|
2147
|
-
trackSuspendedWakeable(wakeable);
|
2148
2111
|
task.thenableState = getThenableStateAfterSuspending();
|
2149
2112
|
return;
|
2150
2113
|
} else {
|
@@ -7,11 +7,11 @@
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
|
-
'use strict';var
|
10
|
+
'use strict';var aa=require("util"),ba=require("async_hooks"),ca=require("react");var da=new ba.AsyncLocalStorage,e=null,m=0,n=!0;function p(a,b){a=a.write(b);n=n&&a}
|
11
11
|
function q(a,b){if("string"===typeof b){if(0!==b.length)if(2048<3*b.length)0<m&&(p(a,e.subarray(0,m)),e=new Uint8Array(2048),m=0),p(a,r.encode(b));else{var d=e;0<m&&(d=e.subarray(m));d=r.encodeInto(b,d);var c=d.read;m+=d.written;c<b.length&&(p(a,e),e=new Uint8Array(2048),m=r.encodeInto(b.slice(c),e).written);2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)}}else 0!==b.byteLength&&(2048<b.byteLength?(0<m&&(p(a,e.subarray(0,m)),e=new Uint8Array(2048),m=0),p(a,b)):(d=e.length-m,d<b.byteLength&&(0===d?p(a,
|
12
|
-
e):(e.set(b.subarray(0,d),m),m+=d,p(a,e),b=b.subarray(d)),e=new Uint8Array(2048),m=0),e.set(b,m),m+=b.byteLength,2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)));return n}var r=new
|
13
|
-
var u=JSON.stringify,
|
14
|
-
function A(a,b,d,c,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=f;this.mustUseProperty=d;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}
|
12
|
+
e):(e.set(b.subarray(0,d),m),m+=d,p(a,e),b=b.subarray(d)),e=new Uint8Array(2048),m=0),e.set(b,m),m+=b.byteLength,2048===m&&(p(a,e),e=new Uint8Array(2048),m=0)));return n}var r=new aa.TextEncoder;function t(a){return r.encode(a)}
|
13
|
+
var u=JSON.stringify,w=Symbol.for("react.module.reference"),x=Symbol.for("react.element"),ea=Symbol.for("react.fragment"),fa=Symbol.for("react.provider"),ha=Symbol.for("react.server_context"),ia=Symbol.for("react.forward_ref"),ja=Symbol.for("react.suspense"),ka=Symbol.for("react.suspense_list"),la=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),ma=Symbol.for("react.default_value"),na=Symbol.for("react.memo_cache_sentinel");
|
14
|
+
function A(a,b,d,c,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=f;this.mustUseProperty=d;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new A(a,0,!1,a,null,!1,!1)});
|
15
15
|
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new A(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new A(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new A(a,2,!1,a,null,!1,!1)});
|
16
16
|
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new A(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new A(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new A(a,4,!1,a,null,!1,!1)});
|
17
17
|
["cols","rows","size","span"].forEach(function(a){new A(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new A(a,5,!1,a.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function C(a){return a[1].toUpperCase()}
|
@@ -19,40 +19,40 @@ function A(a,b,d,c,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attribut
|
|
19
19
|
C);new A(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(B,C);new A(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!1,!1)});
|
20
20
|
new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new A(a,1,!1,a.toLowerCase(),null,!0,!0)});
|
21
21
|
var D={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,
|
22
|
-
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},
|
22
|
+
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oa=["Webkit","ms","Moz","O"];Object.keys(D).forEach(function(a){oa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);D[b]=D[a]})});var pa=Array.isArray;t("<script>");t("\x3c/script>");t('<script src="');t('<script type="module" src="');t('" integrity="');t('" async="">\x3c/script>');t("\x3c!-- --\x3e");t(' style="');t(":");t(";");t(" ");t('="');t('"');
|
23
23
|
t('=""');t(">");t("/>");t(' selected=""');t("\n");t("<!DOCTYPE html>");t("</");t(">");t('<template id="');t('"></template>');t("\x3c!--$--\x3e");t('\x3c!--$?--\x3e<template id="');t('"></template>');t("\x3c!--$!--\x3e");t("\x3c!--/$--\x3e");t("<template");t('"');t(' data-dgst="');t(' data-msg="');t(' data-stck="');t("></template>");t('<div hidden id="');t('">');t("</div>");t('<svg aria-hidden="true" style="display:none" id="');t('">');t("</svg>");t('<math aria-hidden="true" style="display:none" id="');
|
24
24
|
t('">');t("</math>");t('<table hidden id="');t('">');t("</table>");t('<table hidden><tbody id="');t('">');t("</tbody></table>");t('<table hidden><tr id="');t('">');t("</tr></table>");t('<table hidden><colgroup id="');t('">');t("</colgroup></table>");t('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("');t('$RS("');t('","');t('")\x3c/script>');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("');
|
25
25
|
t('$RC("');t('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
26
26
|
t('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
27
27
|
t('$RR("');t('","');t('",');t('"');t(")\x3c/script>");t('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');t('$RX("');t('"');t(")\x3c/script>");t(",");t('<style data-precedence="');t('"></style>');t("[");t(",[");t(",");t("]");var E=null;
|
28
|
-
function F(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var d=b.parent;if(null===a){if(null!==d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");F(a,d);b.context._currentValue=b.value}}}function
|
29
|
-
function
|
30
|
-
function
|
31
|
-
function
|
32
|
-
var Da={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:
|
33
|
-
function
|
34
|
-
function Ca(a){if(null!==a&&"object"===typeof a)if("function"===typeof a.then){var b=
|
35
|
-
|
36
|
-
function
|
37
|
-
d?
|
38
|
-
function
|
39
|
-
|
40
|
-
|
41
|
-
function Qa(a,b,d,c){var f=c.filepath+"#"+c.name+(c.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===x&&"1"===d?"@"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[c.filepath][c.name];var l=c.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var z=a.nextChunkId++,
|
42
|
-
b=a.nextChunkId++,d=
|
43
|
-
function
|
44
|
-
function
|
45
|
-
|
46
|
-
function
|
47
|
-
c)return null;if("object"===typeof c){if(c.$$typeof===
|
48
|
-
typeof c)return a="$"===c[0]||"@"===c[0]?"$"+c:c,a;if("boolean"===typeof c||"number"===typeof c||"undefined"===typeof c)return c;if("function"===typeof c){if(c.$$typeof===
|
49
|
-
typeof c){f=a.writtenSymbols;g=f.get(c);if(void 0!==g)return"$"+g.toString(16);g=c.description;if(Symbol.for(g)!==c)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(c.description+") cannot be found among global symbols.")+
|
50
|
-
|
51
|
-
function Sa(a,b){null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)}function
|
52
|
-
function Pa(a){var b=
|
53
|
-
h.completedJSONChunks.push(
|
28
|
+
function F(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var d=b.parent;if(null===a){if(null!==d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===d)throw Error("The stacks must reach the root at the same time. This is a bug in React.");F(a,d);b.context._currentValue=b.value}}}function qa(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&qa(a)}
|
29
|
+
function ra(a){var b=a.parent;null!==b&&ra(b);a.context._currentValue=a.value}function sa(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?F(a,b):sa(a,b)}
|
30
|
+
function ta(a,b){var d=b.parent;if(null===d)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===d.depth?F(a,d):ta(a,d);b.context._currentValue=b.value}function G(a){var b=E;b!==a&&(null===b?ra(a):null===a?qa(b):b.depth===a.depth?F(b,a):b.depth>a.depth?sa(b,a):ta(b,a),E=a)}function ua(a,b){var d=a._currentValue;a._currentValue=b;var c=E;return E=a={parent:c,depth:null===c?0:c.depth+1,context:a,parentValue:d,value:b}}function va(){}
|
31
|
+
function wa(a,b,d){d=a[d];void 0===d?a.push(b):d!==b&&(b.then(va,va),b=d);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:throw"string"!==typeof b.status&&(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}})),b;}}var H=null,I=0,J=null;function xa(){var a=J;J=null;return a}function ya(a){return a._currentValue}
|
32
|
+
var Da={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:K,useTransition:K,readContext:ya,useContext:ya,useReducer:K,useRef:K,useState:K,useInsertionEffect:K,useLayoutEffect:K,useImperativeHandle:K,useEffect:K,useId:Aa,useMutableSource:K,useSyncExternalStore:K,useCacheRefresh:function(){return Ba},useMemoCache:function(a){for(var b=Array(a),d=0;d<a;d++)b[d]=na;return b},use:Ca};
|
33
|
+
function K(){throw Error("This Hook is not supported in Server Components.");}function Ba(){throw Error("Refreshing the cache is not supported in Server Components.");}function Aa(){if(null===H)throw Error("useId can only be used while React is rendering");var a=H.identifierCount++;return":"+H.identifierPrefix+"S"+a.toString(32)+":"}
|
34
|
+
function Ca(a){if(null!==a&&"object"===typeof a){if("function"===typeof a.then){var b=I;I+=1;null===J&&(J=[]);return wa(J,a,b)}if(a.$$typeof===ha)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function L(){return(new AbortController).signal}function Ea(){if(M)return M;var a=da.getStore();return a?a:new Map}
|
35
|
+
var Fa={getCacheSignal:function(){var a=Ea(),b=a.get(L);void 0===b&&(b=L(),a.set(L,b));return b},getCacheForType:function(a){var b=Ea(),d=b.get(a);void 0===d&&(d=a(),b.set(a,d));return d}},M=null,N=ca.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=N.ContextRegistry,P=N.ReactCurrentDispatcher,Q=N.ReactCurrentCache;function Ga(a){console.error(a)}
|
36
|
+
function Ha(a,b,d,c,f){if(null!==Q.current&&Q.current!==Fa)throw Error("Currently React only supports one RSC renderer at a time.");Q.current=Fa;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0===
|
37
|
+
d?Ga:d,toJSON:function(a,b){return Ia(k,this,a,b)}};k.pendingChunks++;b=Ja(c);a=Ka(k,a,b,g);h.push(a);return k}var La={};function Ma(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}
|
38
|
+
function Na(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:y,_payload:a,_init:Ma}}
|
39
|
+
function R(a,b,d,c,f){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof a){if(a.$$typeof===w)return[x,a,b,c];I=0;J=f;c=a(c);return"object"===typeof c&&null!==c&&"function"===typeof c.then?Na(c):c}if("string"===typeof a)return[x,a,b,c];if("symbol"===typeof a)return a===ea?c.children:[x,a,b,c];if(null!=a&&"object"===typeof a){if(a.$$typeof===w)return[x,a,b,c];switch(a.$$typeof){case y:var g=a._init;a=g(a._payload);
|
40
|
+
return R(a,b,d,c,f);case ia:return b=a.render,I=0,J=f,b(c,void 0);case la:return R(a.type,b,d,c,f);case fa:return ua(a._context,c.value),[x,a,b,{value:c.value,children:c.children,__pop:La}]}}throw Error("Unsupported Server Component type: "+S(a));}function Oa(a,b){var d=a.pingedTasks;d.push(b);1===d.length&&setImmediate(function(){return Pa(a)})}function Ka(a,b,d,c){var f={id:a.nextChunkId++,status:0,model:b,context:d,ping:function(){return Oa(a,f)},thenableState:null};c.add(f);return f}
|
41
|
+
function Qa(a,b,d,c){var f=c.filepath+"#"+c.name+(c.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===x&&"1"===d?"@"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[c.filepath][c.name];var l=c.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var z=a.nextChunkId++,X=u(l);var Y="M"+z.toString(16)+":"+X+"\n";a.completedModuleChunks.push(Y);g.set(f,z);return b[0]===x&&"1"===d?"@"+z.toString(16):"$"+z.toString(16)}catch(Z){return a.pendingChunks++,
|
42
|
+
b=a.nextChunkId++,d=T(a,Z),U(a,b,d),"$"+b.toString(16)}}function Ra(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,d){return d})}function S(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(pa(a))return"[...]";a=Ra(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
|
43
|
+
function V(a){if("string"===typeof a)return a;switch(a){case ja:return"Suspense";case ka:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case ia:return V(a.render);case la:return V(a.type);case y:var b=a._payload;a=a._init;try{return V(a(b))}catch(d){}}return""}
|
44
|
+
function W(a,b){var d=Ra(a);if("Object"!==d&&"Array"!==d)return d;d=-1;var c=0;if(pa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?W(h):S(h);""+g===b?(d=f.length,c=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===x)f="<"+V(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?W(l):
|
45
|
+
S(l);k===b?(d=f.length,c=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<d&&0<c?(a=" ".repeat(d)+"^".repeat(c),"\n "+f+"\n "+a):"\n "+f}
|
46
|
+
function Ia(a,b,d,c){switch(c){case x:return"$"}for(;"object"===typeof c&&null!==c&&(c.$$typeof===x||c.$$typeof===y);)try{switch(c.$$typeof){case x:var f=c;c=R(f.type,f.key,f.ref,f.props,null);break;case y:var g=c._init;c=g(c._payload)}}catch(h){if("object"===typeof h&&null!==h&&"function"===typeof h.then)return a.pendingChunks++,a=Ka(a,c,E,a.abortableTasks),c=a.ping,h.then(c,c),a.thenableState=xa(),"@"+a.id.toString(16);a.pendingChunks++;c=a.nextChunkId++;d=T(a,h);U(a,c,d);return"@"+c.toString(16)}if(null===
|
47
|
+
c)return null;if("object"===typeof c){if(c.$$typeof===w)return Qa(a,b,d,c);if(c.$$typeof===fa)return c=c._context._globalName,f=a.writtenProviders,d=f.get(d),void 0===d&&(a.pendingChunks++,d=a.nextChunkId++,f.set(c,d),c="P"+d.toString(16)+":"+c+"\n",a.completedJSONChunks.push(c)),"$"+d.toString(16);if(c===La){a=E;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");c=a.parentValue;a.context._currentValue=c===ma?a.context._defaultValue:c;E=a.parent;return}return c}if("string"===
|
48
|
+
typeof c)return a="$"===c[0]||"@"===c[0]?"$"+c:c,a;if("boolean"===typeof c||"number"===typeof c||"undefined"===typeof c)return c;if("function"===typeof c){if(c.$$typeof===w)return Qa(a,b,d,c);if(/^on[A-Z]/.test(d))throw Error("Event handlers cannot be passed to Client Component props."+W(b,d)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error("Functions cannot be passed directly to Client Components because they're not serializable."+W(b,d));}if("symbol"===
|
49
|
+
typeof c){f=a.writtenSymbols;g=f.get(c);if(void 0!==g)return"$"+g.toString(16);g=c.description;if(Symbol.for(g)!==c)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(c.description+") cannot be found among global symbols.")+W(b,d));a.pendingChunks++;d=a.nextChunkId++;b=u(g);b="S"+d.toString(16)+":"+b+"\n";a.completedModuleChunks.push(b);f.set(c,d);return"$"+d.toString(16)}if("bigint"===typeof c)throw Error("BigInt ("+c+") is not yet supported in Client Component props."+
|
50
|
+
W(b,d));throw Error("Type "+typeof c+" is not supported in Client Component props."+W(b,d));}function T(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}
|
51
|
+
function Sa(a,b){null!==a.destination?(a.status=2,a.destination.destroy(b)):(a.status=1,a.fatalError=b)}function U(a,b,d){d={digest:d};b="E"+b.toString(16)+":"+u(d)+"\n";a.completedErrorChunks.push(b)}
|
52
|
+
function Pa(a){var b=P.current,d=M;P.current=Da;M=a.cache;H=a;try{var c=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<c.length;f++){var g=c[f];var h=a;if(0===g.status){G(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===x){var l=k,z=g.thenableState;g.model=k;k=R(l.type,l.key,l.ref,l.props,z);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===x;)l=k,g.model=k,k=R(l.type,l.key,l.ref,l.props,null)}var X=g.id,Y=u(k,h.toJSON);var Z="J"+X.toString(16)+":"+Y+"\n";
|
53
|
+
h.completedJSONChunks.push(Z);h.abortableTasks.delete(g);g.status=1}catch(v){if("object"===typeof v&&null!==v&&"function"===typeof v.then){var za=g.ping;v.then(za,za);g.thenableState=xa()}else{h.abortableTasks.delete(g);g.status=4;var Va=T(h,v);U(h,g.id,Va)}}}}null!==a.destination&&Ta(a,a.destination)}catch(v){T(a,v),Sa(a,v)}finally{P.current=b,M=d,H=null}}
|
54
54
|
function Ta(a,b){e=new Uint8Array(2048);m=0;n=!0;try{for(var d=a.completedModuleChunks,c=0;c<d.length;c++)if(a.pendingChunks--,!q(b,d[c])){a.destination=null;c++;break}d.splice(0,c);var f=a.completedJSONChunks;for(c=0;c<f.length;c++)if(a.pendingChunks--,!q(b,f[c])){a.destination=null;c++;break}f.splice(0,c);var g=a.completedErrorChunks;for(c=0;c<g.length;c++)if(a.pendingChunks--,!q(b,g[c])){a.destination=null;c++;break}g.splice(0,c)}finally{e&&0<m&&b.write(e.subarray(0,m)),e=null,m=0,n=!0}"function"===
|
55
|
-
typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function Ua(a){setImmediate(function(){return
|
56
|
-
function Xa(a,b){try{var d=a.abortableTasks;if(0<d.size){var c=
|
57
|
-
function
|
58
|
-
exports.renderToPipeableStream=function(a,b,d){var c=
|
55
|
+
typeof b.flush&&b.flush();0===a.pendingChunks&&b.end()}function Ua(a){setImmediate(function(){return da.run(a.cache,Pa,a)})}function Wa(a,b){if(1===a.status)a.status=2,b.destroy(a.fatalError);else if(2!==a.status&&null===a.destination){a.destination=b;try{Ta(a,b)}catch(d){T(a,d),Sa(a,d)}}}
|
56
|
+
function Xa(a,b){try{var d=a.abortableTasks;if(0<d.size){var c=T(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;U(a,f,c);d.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=b.id;c=u(c);c="J"+b.toString(16)+":"+c+"\n";a.completedErrorChunks.push(c)});d.clear()}null!==a.destination&&Ta(a,a.destination)}catch(g){T(a,g),Sa(a,g)}}
|
57
|
+
function Ja(a){if(a){var b=E;G(null);for(var d=0;d<a.length;d++){var c=a[d],f=c[0];c=c[1];O[f]||(O[f]=ca.createServerContext(f,ma));ua(O[f],c)}a=E;G(b);return a}return null}function Ya(a,b){return function(){return Wa(b,a)}}
|
58
|
+
exports.renderToPipeableStream=function(a,b,d){var c=Ha(a,b,d?d.onError:void 0,d?d.context:void 0,d?d.identifierPrefix:void 0),f=!1;Ua(c);return{pipe:function(a){if(f)throw Error("React currently only supports piping to one writable stream.");f=!0;Wa(c,a);a.on("drain",Ya(a,c));return a},abort:function(a){Xa(c,a)}}};
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-server-dom-webpack",
|
3
3
|
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
4
|
-
"version": "
|
4
|
+
"version": "18.3.0-next-e7c5af45c-20221023",
|
5
5
|
"keywords": [
|
6
6
|
"react"
|
7
7
|
],
|
@@ -49,8 +49,8 @@
|
|
49
49
|
"node": ">=0.10.0"
|
50
50
|
},
|
51
51
|
"peerDependencies": {
|
52
|
-
"react": "
|
53
|
-
"react-dom": "
|
52
|
+
"react": "18.3.0-next-e7c5af45c-20221023",
|
53
|
+
"react-dom": "18.3.0-next-e7c5af45c-20221023",
|
54
54
|
"webpack": "^5.59.0"
|
55
55
|
},
|
56
56
|
"dependencies": {
|