@matthamlin/react-client 0.0.0-experimental-2a911f27-20250623 → 0.0.0-experimental-b42341dd-20250625
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.
@@ -1165,11 +1165,10 @@
|
|
1165
1165
|
}
|
1166
1166
|
return null;
|
1167
1167
|
}
|
1168
|
-
function ReactPromise(status, value, reason
|
1168
|
+
function ReactPromise(status, value, reason) {
|
1169
1169
|
this.status = status;
|
1170
1170
|
this.value = value;
|
1171
1171
|
this.reason = reason;
|
1172
|
-
this._response = response;
|
1173
1172
|
this._children = [];
|
1174
1173
|
this._debugInfo = null;
|
1175
1174
|
}
|
@@ -1192,11 +1191,11 @@
|
|
1192
1191
|
throw chunk.reason;
|
1193
1192
|
}
|
1194
1193
|
}
|
1195
|
-
function createPendingChunk(
|
1196
|
-
return new ReactPromise("pending", null, null
|
1194
|
+
function createPendingChunk() {
|
1195
|
+
return new ReactPromise("pending", null, null);
|
1197
1196
|
}
|
1198
1197
|
function createErrorChunk(response, error) {
|
1199
|
-
return new ReactPromise("rejected", null, error
|
1198
|
+
return new ReactPromise("rejected", null, error);
|
1200
1199
|
}
|
1201
1200
|
function wakeChunk(listeners, value) {
|
1202
1201
|
for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value);
|
@@ -1242,25 +1241,26 @@
|
|
1242
1241
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
1243
1242
|
value +
|
1244
1243
|
"}",
|
1245
|
-
null,
|
1246
1244
|
response
|
1247
1245
|
);
|
1248
1246
|
}
|
1249
|
-
function resolveIteratorResultChunk(chunk, value, done) {
|
1247
|
+
function resolveIteratorResultChunk(response, chunk, value, done) {
|
1250
1248
|
resolveModelChunk(
|
1249
|
+
response,
|
1251
1250
|
chunk,
|
1252
1251
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') +
|
1253
1252
|
value +
|
1254
1253
|
"}"
|
1255
1254
|
);
|
1256
1255
|
}
|
1257
|
-
function resolveModelChunk(chunk, value) {
|
1256
|
+
function resolveModelChunk(response, chunk, value) {
|
1258
1257
|
if ("pending" !== chunk.status) chunk.reason.enqueueModel(value);
|
1259
1258
|
else {
|
1260
1259
|
var resolveListeners = chunk.value,
|
1261
1260
|
rejectListeners = chunk.reason;
|
1262
1261
|
chunk.status = "resolved_model";
|
1263
1262
|
chunk.value = value;
|
1263
|
+
chunk.reason = response;
|
1264
1264
|
null !== resolveListeners &&
|
1265
1265
|
(initializeModelChunk(chunk),
|
1266
1266
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
@@ -1281,13 +1281,14 @@
|
|
1281
1281
|
var prevHandler = initializingHandler,
|
1282
1282
|
prevChunk = initializingChunk;
|
1283
1283
|
initializingHandler = null;
|
1284
|
-
var resolvedModel = chunk.value
|
1284
|
+
var resolvedModel = chunk.value,
|
1285
|
+
response = chunk.reason;
|
1285
1286
|
chunk.status = "blocked";
|
1286
1287
|
chunk.value = null;
|
1287
1288
|
chunk.reason = null;
|
1288
1289
|
initializingChunk = chunk;
|
1289
1290
|
try {
|
1290
|
-
var value = JSON.parse(resolvedModel,
|
1291
|
+
var value = JSON.parse(resolvedModel, response._fromJSON),
|
1291
1292
|
resolveListeners = chunk.value;
|
1292
1293
|
null !== resolveListeners &&
|
1293
1294
|
((chunk.value = null),
|
@@ -1324,6 +1325,9 @@
|
|
1324
1325
|
response._chunks.forEach(function (chunk) {
|
1325
1326
|
"pending" === chunk.status && triggerErrorOnChunk(chunk, error);
|
1326
1327
|
});
|
1328
|
+
var debugChannel = response._debugChannel;
|
1329
|
+
void 0 !== debugChannel &&
|
1330
|
+
(debugChannel(""), (response._debugChannel = void 0));
|
1327
1331
|
supportsUserTiming &&
|
1328
1332
|
(console.timeStamp(
|
1329
1333
|
"Server Requests Track",
|
@@ -1384,7 +1388,7 @@
|
|
1384
1388
|
chunk ||
|
1385
1389
|
((chunk = response._closed
|
1386
1390
|
? createErrorChunk(response, response._closedReason)
|
1387
|
-
: createPendingChunk(
|
1391
|
+
: createPendingChunk()),
|
1388
1392
|
chunks.set(id, chunk));
|
1389
1393
|
return chunk;
|
1390
1394
|
}
|
@@ -1852,6 +1856,9 @@
|
|
1852
1856
|
}
|
1853
1857
|
case "Y":
|
1854
1858
|
return (
|
1859
|
+
2 < value.length &&
|
1860
|
+
(response = response._debugChannel) &&
|
1861
|
+
((value = value.slice(2)), response("R:" + value)),
|
1855
1862
|
Object.defineProperty(parentObject, key, {
|
1856
1863
|
get: function () {
|
1857
1864
|
return "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.";
|
@@ -1885,7 +1892,8 @@
|
|
1885
1892
|
temporaryReferences,
|
1886
1893
|
findSourceMapURL,
|
1887
1894
|
replayConsole,
|
1888
|
-
environmentName
|
1895
|
+
environmentName,
|
1896
|
+
debugChannel
|
1889
1897
|
) {
|
1890
1898
|
var chunks = new Map();
|
1891
1899
|
this._bundlerConfig = bundlerConfig;
|
@@ -1916,43 +1924,41 @@
|
|
1916
1924
|
'"use ' + environmentName.toLowerCase() + '"'
|
1917
1925
|
));
|
1918
1926
|
this._debugFindSourceMapURL = findSourceMapURL;
|
1927
|
+
this._debugChannel = debugChannel;
|
1919
1928
|
this._replayConsole = replayConsole;
|
1920
1929
|
this._rootEnvironmentName = environmentName;
|
1921
1930
|
this._fromJSON = createFromJSONCallback(this);
|
1922
1931
|
}
|
1923
1932
|
function resolveDebugHalt(response, id) {
|
1924
|
-
|
1925
|
-
|
1926
|
-
chunk ||
|
1933
|
+
response = response._chunks;
|
1934
|
+
var chunk = response.get(id);
|
1935
|
+
chunk || response.set(id, (chunk = createPendingChunk()));
|
1927
1936
|
if ("pending" === chunk.status || "blocked" === chunk.status)
|
1928
|
-
(
|
1929
|
-
(
|
1930
|
-
(
|
1931
|
-
(
|
1937
|
+
(id = chunk),
|
1938
|
+
(id.status = "halted"),
|
1939
|
+
(id.value = null),
|
1940
|
+
(id.reason = null);
|
1932
1941
|
}
|
1933
1942
|
function resolveModel(response, id, model) {
|
1934
1943
|
var chunks = response._chunks,
|
1935
1944
|
chunk = chunks.get(id);
|
1936
1945
|
chunk
|
1937
|
-
? resolveModelChunk(chunk, model)
|
1938
|
-
: chunks.set(
|
1939
|
-
id,
|
1940
|
-
new ReactPromise("resolved_model", model, null, response)
|
1941
|
-
);
|
1946
|
+
? resolveModelChunk(response, chunk, model)
|
1947
|
+
: chunks.set(id, new ReactPromise("resolved_model", model, response));
|
1942
1948
|
}
|
1943
1949
|
function resolveText(response, id, text) {
|
1944
|
-
|
1945
|
-
|
1950
|
+
response = response._chunks;
|
1951
|
+
var chunk = response.get(id);
|
1946
1952
|
chunk && "pending" !== chunk.status
|
1947
1953
|
? chunk.reason.enqueueValue(text)
|
1948
|
-
:
|
1954
|
+
: response.set(id, new ReactPromise("fulfilled", text, null));
|
1949
1955
|
}
|
1950
1956
|
function resolveBuffer(response, id, buffer) {
|
1951
|
-
|
1952
|
-
|
1957
|
+
response = response._chunks;
|
1958
|
+
var chunk = response.get(id);
|
1953
1959
|
chunk && "pending" !== chunk.status
|
1954
1960
|
? chunk.reason.enqueueValue(buffer)
|
1955
|
-
:
|
1961
|
+
: response.set(id, new ReactPromise("fulfilled", buffer, null));
|
1956
1962
|
}
|
1957
1963
|
function resolveModule(response, id, model) {
|
1958
1964
|
var chunks = response._chunks,
|
@@ -1967,14 +1973,14 @@
|
|
1967
1973
|
response._nonce,
|
1968
1974
|
model
|
1969
1975
|
);
|
1970
|
-
if ((
|
1976
|
+
if ((response = preloadModule(clientReference))) {
|
1971
1977
|
if (chunk) {
|
1972
1978
|
var blockedChunk = chunk;
|
1973
1979
|
blockedChunk.status = "blocked";
|
1974
1980
|
} else
|
1975
|
-
(blockedChunk = new ReactPromise("blocked", null, null
|
1981
|
+
(blockedChunk = new ReactPromise("blocked", null, null)),
|
1976
1982
|
chunks.set(id, blockedChunk);
|
1977
|
-
|
1983
|
+
response.then(
|
1978
1984
|
function () {
|
1979
1985
|
return resolveModuleChunk(blockedChunk, clientReference);
|
1980
1986
|
},
|
@@ -1987,28 +1993,20 @@
|
|
1987
1993
|
? resolveModuleChunk(chunk, clientReference)
|
1988
1994
|
: chunks.set(
|
1989
1995
|
id,
|
1990
|
-
new ReactPromise(
|
1991
|
-
"resolved_module",
|
1992
|
-
clientReference,
|
1993
|
-
null,
|
1994
|
-
response
|
1995
|
-
)
|
1996
|
+
new ReactPromise("resolved_module", clientReference, null)
|
1996
1997
|
);
|
1997
1998
|
}
|
1998
1999
|
function resolveStream(response, id, stream, controller) {
|
1999
|
-
var chunks = response._chunks
|
2000
|
-
|
2001
|
-
|
2002
|
-
? "pending" ===
|
2003
|
-
((
|
2004
|
-
(
|
2005
|
-
(
|
2006
|
-
(
|
2007
|
-
null !==
|
2008
|
-
: chunks.set(
|
2009
|
-
id,
|
2010
|
-
new ReactPromise("fulfilled", stream, controller, response)
|
2011
|
-
);
|
2000
|
+
var chunks = response._chunks;
|
2001
|
+
response = chunks.get(id);
|
2002
|
+
response
|
2003
|
+
? "pending" === response.status &&
|
2004
|
+
((id = response.value),
|
2005
|
+
(response.status = "fulfilled"),
|
2006
|
+
(response.value = stream),
|
2007
|
+
(response.reason = controller),
|
2008
|
+
null !== id && wakeChunk(id, response.value))
|
2009
|
+
: chunks.set(id, new ReactPromise("fulfilled", stream, controller));
|
2012
2010
|
}
|
2013
2011
|
function startReadableStream(response, id, type) {
|
2014
2012
|
var controller = null;
|
@@ -2029,12 +2027,7 @@
|
|
2029
2027
|
},
|
2030
2028
|
enqueueModel: function (json) {
|
2031
2029
|
if (null === previousBlockedChunk) {
|
2032
|
-
var chunk = new ReactPromise(
|
2033
|
-
"resolved_model",
|
2034
|
-
json,
|
2035
|
-
null,
|
2036
|
-
response
|
2037
|
-
);
|
2030
|
+
var chunk = new ReactPromise("resolved_model", json, response);
|
2038
2031
|
initializeModelChunk(chunk);
|
2039
2032
|
"fulfilled" === chunk.status
|
2040
2033
|
? controller.enqueue(chunk.value)
|
@@ -2049,7 +2042,7 @@
|
|
2049
2042
|
(previousBlockedChunk = chunk));
|
2050
2043
|
} else {
|
2051
2044
|
chunk = previousBlockedChunk;
|
2052
|
-
var _chunk3 = createPendingChunk(
|
2045
|
+
var _chunk3 = createPendingChunk();
|
2053
2046
|
_chunk3.then(
|
2054
2047
|
function (v) {
|
2055
2048
|
return controller.enqueue(v);
|
@@ -2061,7 +2054,7 @@
|
|
2061
2054
|
previousBlockedChunk = _chunk3;
|
2062
2055
|
chunk.then(function () {
|
2063
2056
|
previousBlockedChunk === _chunk3 && (previousBlockedChunk = null);
|
2064
|
-
resolveModelChunk(_chunk3, json);
|
2057
|
+
resolveModelChunk(response, _chunk3, json);
|
2065
2058
|
});
|
2066
2059
|
}
|
2067
2060
|
},
|
@@ -2112,10 +2105,9 @@
|
|
2112
2105
|
return new ReactPromise(
|
2113
2106
|
"fulfilled",
|
2114
2107
|
{ done: !0, value: void 0 },
|
2115
|
-
null
|
2116
|
-
response
|
2108
|
+
null
|
2117
2109
|
);
|
2118
|
-
buffer[nextReadIndex] = createPendingChunk(
|
2110
|
+
buffer[nextReadIndex] = createPendingChunk();
|
2119
2111
|
}
|
2120
2112
|
return buffer[nextReadIndex++];
|
2121
2113
|
});
|
@@ -2130,8 +2122,7 @@
|
|
2130
2122
|
buffer[nextWriteIndex] = new ReactPromise(
|
2131
2123
|
"fulfilled",
|
2132
2124
|
{ done: !1, value: value },
|
2133
|
-
null
|
2134
|
-
response
|
2125
|
+
null
|
2135
2126
|
);
|
2136
2127
|
else {
|
2137
2128
|
var chunk = buffer[nextWriteIndex],
|
@@ -2155,7 +2146,12 @@
|
|
2155
2146
|
value,
|
2156
2147
|
!1
|
2157
2148
|
))
|
2158
|
-
: resolveIteratorResultChunk(
|
2149
|
+
: resolveIteratorResultChunk(
|
2150
|
+
response,
|
2151
|
+
buffer[nextWriteIndex],
|
2152
|
+
value,
|
2153
|
+
!1
|
2154
|
+
);
|
2159
2155
|
nextWriteIndex++;
|
2160
2156
|
},
|
2161
2157
|
close: function (value) {
|
@@ -2166,9 +2162,15 @@
|
|
2166
2162
|
value,
|
2167
2163
|
!0
|
2168
2164
|
))
|
2169
|
-
: resolveIteratorResultChunk(
|
2165
|
+
: resolveIteratorResultChunk(
|
2166
|
+
response,
|
2167
|
+
buffer[nextWriteIndex],
|
2168
|
+
value,
|
2169
|
+
!0
|
2170
|
+
);
|
2170
2171
|
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
2171
2172
|
resolveIteratorResultChunk(
|
2173
|
+
response,
|
2172
2174
|
buffer[nextWriteIndex++],
|
2173
2175
|
'"$undefined"',
|
2174
2176
|
!0
|
@@ -2178,7 +2180,7 @@
|
|
2178
2180
|
closed = !0;
|
2179
2181
|
for (
|
2180
2182
|
nextWriteIndex === buffer.length &&
|
2181
|
-
(buffer[nextWriteIndex] = createPendingChunk(
|
2183
|
+
(buffer[nextWriteIndex] = createPendingChunk());
|
2182
2184
|
nextWriteIndex < buffer.length;
|
2183
2185
|
|
2184
2186
|
)
|
@@ -2428,15 +2430,20 @@
|
|
2428
2430
|
return Error("react-stack-top-frame");
|
2429
2431
|
}
|
2430
2432
|
function initializeFakeStack(response, debugInfo) {
|
2431
|
-
void 0 === debugInfo.debugStack
|
2432
|
-
|
2433
|
+
if (void 0 === debugInfo.debugStack) {
|
2434
|
+
null != debugInfo.stack &&
|
2433
2435
|
(debugInfo.debugStack = createFakeJSXCallStackInDEV(
|
2434
2436
|
response,
|
2435
2437
|
debugInfo.stack,
|
2436
2438
|
null == debugInfo.env ? "" : debugInfo.env
|
2437
|
-
))
|
2438
|
-
|
2439
|
-
|
2439
|
+
));
|
2440
|
+
var owner = debugInfo.owner;
|
2441
|
+
null != owner &&
|
2442
|
+
(initializeFakeStack(response, owner),
|
2443
|
+
void 0 === owner.debugLocation &&
|
2444
|
+
null != debugInfo.debugStack &&
|
2445
|
+
(owner.debugLocation = debugInfo.debugStack));
|
2446
|
+
}
|
2440
2447
|
}
|
2441
2448
|
function resolveDebugInfo(response, id, debugInfo) {
|
2442
2449
|
void 0 !== debugInfo.stack && initializeFakeTask(response, debugInfo);
|
@@ -2554,9 +2561,9 @@
|
|
2554
2561
|
var chunks = response._chunks,
|
2555
2562
|
chunk = chunks.get(id);
|
2556
2563
|
chunk
|
2557
|
-
? (resolveModelChunk(chunk, model),
|
2564
|
+
? (resolveModelChunk(response, chunk, model),
|
2558
2565
|
"resolved_model" === chunk.status && initializeModelChunk(chunk))
|
2559
|
-
: ((chunk = new ReactPromise("resolved_model", model,
|
2566
|
+
: ((chunk = new ReactPromise("resolved_model", model, response)),
|
2560
2567
|
chunks.set(id, chunk),
|
2561
2568
|
initializeModelChunk(chunk));
|
2562
2569
|
"fulfilled" === chunk.status
|
@@ -3005,7 +3012,7 @@
|
|
3005
3012
|
response._timeOrigin = +row - performance.timeOrigin;
|
3006
3013
|
break;
|
3007
3014
|
case 68:
|
3008
|
-
tag = new ReactPromise("resolved_model", row,
|
3015
|
+
tag = new ReactPromise("resolved_model", row, response);
|
3009
3016
|
initializeModelChunk(tag);
|
3010
3017
|
"fulfilled" === tag.status
|
3011
3018
|
? resolveDebugInfo(response, id, tag.value)
|
@@ -3136,7 +3143,7 @@
|
|
3136
3143
|
(key._debugInfo = [stack]),
|
3137
3144
|
(value = createLazyChunkWrapper(key)))
|
3138
3145
|
: 0 < stack.deps &&
|
3139
|
-
((key = new ReactPromise("blocked", null, null
|
3146
|
+
((key = new ReactPromise("blocked", null, null)),
|
3140
3147
|
(stack.value = value),
|
3141
3148
|
(stack.chunk = key),
|
3142
3149
|
(value = Object.freeze.bind(Object, value.props)),
|
@@ -3334,7 +3341,8 @@
|
|
3334
3341
|
temporaryReferences,
|
3335
3342
|
findSourceMapURL,
|
3336
3343
|
replayConsole,
|
3337
|
-
environmentName
|
3344
|
+
environmentName,
|
3345
|
+
debugChannel
|
3338
3346
|
) {
|
3339
3347
|
return new ResponseInstance(
|
3340
3348
|
bundlerConfig,
|
@@ -3346,7 +3354,8 @@
|
|
3346
3354
|
temporaryReferences,
|
3347
3355
|
findSourceMapURL,
|
3348
3356
|
replayConsole,
|
3349
|
-
environmentName
|
3357
|
+
environmentName,
|
3358
|
+
debugChannel
|
3350
3359
|
);
|
3351
3360
|
};
|
3352
3361
|
exports.getRoot = function (response) {
|
@@ -3358,7 +3367,7 @@
|
|
3358
3367
|
version: rendererVersion,
|
3359
3368
|
rendererPackageName: rendererPackageName,
|
3360
3369
|
currentDispatcherRef: ReactSharedInternals,
|
3361
|
-
reconcilerVersion: "19.2.0-experimental-
|
3370
|
+
reconcilerVersion: "19.2.0-experimental-b42341dd-20250625",
|
3362
3371
|
getCurrentComponentInfo: getCurrentOwnerInDEV
|
3363
3372
|
};
|
3364
3373
|
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
|
@@ -557,11 +557,10 @@ module.exports = function ($$$config) {
|
|
557
557
|
registerBoundServerReference(action, id, bound, encodeFormAction);
|
558
558
|
return action;
|
559
559
|
}
|
560
|
-
function ReactPromise(status, value, reason
|
560
|
+
function ReactPromise(status, value, reason) {
|
561
561
|
this.status = status;
|
562
562
|
this.value = value;
|
563
563
|
this.reason = reason;
|
564
|
-
this._response = response;
|
565
564
|
}
|
566
565
|
function readChunk(chunk) {
|
567
566
|
switch (chunk.status) {
|
@@ -582,11 +581,8 @@ module.exports = function ($$$config) {
|
|
582
581
|
throw chunk.reason;
|
583
582
|
}
|
584
583
|
}
|
585
|
-
function createPendingChunk(response) {
|
586
|
-
return new ReactPromise("pending", null, null, response);
|
587
|
-
}
|
588
584
|
function createErrorChunk(response, error) {
|
589
|
-
return new ReactPromise("rejected", null, error
|
585
|
+
return new ReactPromise("rejected", null, error);
|
590
586
|
}
|
591
587
|
function wakeChunk(listeners, value) {
|
592
588
|
for (var i = 0; i < listeners.length; i++) (0, listeners[i])(value);
|
@@ -630,23 +626,24 @@ module.exports = function ($$$config) {
|
|
630
626
|
return new ReactPromise(
|
631
627
|
"resolved_model",
|
632
628
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}",
|
633
|
-
null,
|
634
629
|
response
|
635
630
|
);
|
636
631
|
}
|
637
|
-
function resolveIteratorResultChunk(chunk, value, done) {
|
632
|
+
function resolveIteratorResultChunk(response, chunk, value, done) {
|
638
633
|
resolveModelChunk(
|
634
|
+
response,
|
639
635
|
chunk,
|
640
636
|
(done ? '{"done":true,"value":' : '{"done":false,"value":') + value + "}"
|
641
637
|
);
|
642
638
|
}
|
643
|
-
function resolveModelChunk(chunk, value) {
|
639
|
+
function resolveModelChunk(response, chunk, value) {
|
644
640
|
if ("pending" !== chunk.status) chunk.reason.enqueueModel(value);
|
645
641
|
else {
|
646
642
|
var resolveListeners = chunk.value,
|
647
643
|
rejectListeners = chunk.reason;
|
648
644
|
chunk.status = "resolved_model";
|
649
645
|
chunk.value = value;
|
646
|
+
chunk.reason = response;
|
650
647
|
null !== resolveListeners &&
|
651
648
|
(initializeModelChunk(chunk),
|
652
649
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
@@ -666,12 +663,13 @@ module.exports = function ($$$config) {
|
|
666
663
|
function initializeModelChunk(chunk) {
|
667
664
|
var prevHandler = initializingHandler;
|
668
665
|
initializingHandler = null;
|
669
|
-
var resolvedModel = chunk.value
|
666
|
+
var resolvedModel = chunk.value,
|
667
|
+
response = chunk.reason;
|
670
668
|
chunk.status = "blocked";
|
671
669
|
chunk.value = null;
|
672
670
|
chunk.reason = null;
|
673
671
|
try {
|
674
|
-
var value = JSON.parse(resolvedModel,
|
672
|
+
var value = JSON.parse(resolvedModel, response._fromJSON),
|
675
673
|
resolveListeners = chunk.value;
|
676
674
|
null !== resolveListeners &&
|
677
675
|
((chunk.value = null),
|
@@ -718,7 +716,7 @@ module.exports = function ($$$config) {
|
|
718
716
|
chunk ||
|
719
717
|
((chunk = response._closed
|
720
718
|
? createErrorChunk(response, response._closedReason)
|
721
|
-
:
|
719
|
+
: new ReactPromise("pending", null, null)),
|
722
720
|
chunks.set(id, chunk));
|
723
721
|
return chunk;
|
724
722
|
}
|
@@ -1085,11 +1083,11 @@ module.exports = function ($$$config) {
|
|
1085
1083
|
this._fromJSON = createFromJSONCallback(this);
|
1086
1084
|
}
|
1087
1085
|
function resolveBuffer(response, id, buffer) {
|
1088
|
-
|
1089
|
-
|
1086
|
+
response = response._chunks;
|
1087
|
+
var chunk = response.get(id);
|
1090
1088
|
chunk && "pending" !== chunk.status
|
1091
1089
|
? chunk.reason.enqueueValue(buffer)
|
1092
|
-
:
|
1090
|
+
: response.set(id, new ReactPromise("fulfilled", buffer, null));
|
1093
1091
|
}
|
1094
1092
|
function resolveModule(response, id, model) {
|
1095
1093
|
var chunks = response._chunks,
|
@@ -1104,14 +1102,14 @@ module.exports = function ($$$config) {
|
|
1104
1102
|
response._nonce,
|
1105
1103
|
model
|
1106
1104
|
);
|
1107
|
-
if ((
|
1105
|
+
if ((response = preloadModule(clientReference))) {
|
1108
1106
|
if (chunk) {
|
1109
1107
|
var blockedChunk = chunk;
|
1110
1108
|
blockedChunk.status = "blocked";
|
1111
1109
|
} else
|
1112
|
-
(blockedChunk = new ReactPromise("blocked", null, null
|
1110
|
+
(blockedChunk = new ReactPromise("blocked", null, null)),
|
1113
1111
|
chunks.set(id, blockedChunk);
|
1114
|
-
|
1112
|
+
response.then(
|
1115
1113
|
function () {
|
1116
1114
|
return resolveModuleChunk(blockedChunk, clientReference);
|
1117
1115
|
},
|
@@ -1124,23 +1122,20 @@ module.exports = function ($$$config) {
|
|
1124
1122
|
? resolveModuleChunk(chunk, clientReference)
|
1125
1123
|
: chunks.set(
|
1126
1124
|
id,
|
1127
|
-
new ReactPromise("resolved_module", clientReference, null
|
1125
|
+
new ReactPromise("resolved_module", clientReference, null)
|
1128
1126
|
);
|
1129
1127
|
}
|
1130
1128
|
function resolveStream(response, id, stream, controller) {
|
1131
|
-
var chunks = response._chunks
|
1132
|
-
|
1133
|
-
|
1134
|
-
? "pending" ===
|
1135
|
-
((
|
1136
|
-
(
|
1137
|
-
(
|
1138
|
-
(
|
1139
|
-
null !==
|
1140
|
-
: chunks.set(
|
1141
|
-
id,
|
1142
|
-
new ReactPromise("fulfilled", stream, controller, response)
|
1143
|
-
);
|
1129
|
+
var chunks = response._chunks;
|
1130
|
+
response = chunks.get(id);
|
1131
|
+
response
|
1132
|
+
? "pending" === response.status &&
|
1133
|
+
((id = response.value),
|
1134
|
+
(response.status = "fulfilled"),
|
1135
|
+
(response.value = stream),
|
1136
|
+
(response.reason = controller),
|
1137
|
+
null !== id && wakeChunk(id, response.value))
|
1138
|
+
: chunks.set(id, new ReactPromise("fulfilled", stream, controller));
|
1144
1139
|
}
|
1145
1140
|
function startReadableStream(response, id, type) {
|
1146
1141
|
var controller = null;
|
@@ -1161,7 +1156,7 @@ module.exports = function ($$$config) {
|
|
1161
1156
|
},
|
1162
1157
|
enqueueModel: function (json) {
|
1163
1158
|
if (null === previousBlockedChunk) {
|
1164
|
-
var chunk = new ReactPromise("resolved_model", json,
|
1159
|
+
var chunk = new ReactPromise("resolved_model", json, response);
|
1165
1160
|
initializeModelChunk(chunk);
|
1166
1161
|
"fulfilled" === chunk.status
|
1167
1162
|
? controller.enqueue(chunk.value)
|
@@ -1176,7 +1171,7 @@ module.exports = function ($$$config) {
|
|
1176
1171
|
(previousBlockedChunk = chunk));
|
1177
1172
|
} else {
|
1178
1173
|
chunk = previousBlockedChunk;
|
1179
|
-
var chunk$30 =
|
1174
|
+
var chunk$30 = new ReactPromise("pending", null, null);
|
1180
1175
|
chunk$30.then(
|
1181
1176
|
function (v) {
|
1182
1177
|
return controller.enqueue(v);
|
@@ -1188,7 +1183,7 @@ module.exports = function ($$$config) {
|
|
1188
1183
|
previousBlockedChunk = chunk$30;
|
1189
1184
|
chunk.then(function () {
|
1190
1185
|
previousBlockedChunk === chunk$30 && (previousBlockedChunk = null);
|
1191
|
-
resolveModelChunk(chunk$30, json);
|
1186
|
+
resolveModelChunk(response, chunk$30, json);
|
1192
1187
|
});
|
1193
1188
|
}
|
1194
1189
|
},
|
@@ -1236,10 +1231,9 @@ module.exports = function ($$$config) {
|
|
1236
1231
|
return new ReactPromise(
|
1237
1232
|
"fulfilled",
|
1238
1233
|
{ done: !0, value: void 0 },
|
1239
|
-
null
|
1240
|
-
response
|
1234
|
+
null
|
1241
1235
|
);
|
1242
|
-
buffer[nextReadIndex] =
|
1236
|
+
buffer[nextReadIndex] = new ReactPromise("pending", null, null);
|
1243
1237
|
}
|
1244
1238
|
return buffer[nextReadIndex++];
|
1245
1239
|
});
|
@@ -1254,8 +1248,7 @@ module.exports = function ($$$config) {
|
|
1254
1248
|
buffer[nextWriteIndex] = new ReactPromise(
|
1255
1249
|
"fulfilled",
|
1256
1250
|
{ done: !1, value: value },
|
1257
|
-
null
|
1258
|
-
response
|
1251
|
+
null
|
1259
1252
|
);
|
1260
1253
|
else {
|
1261
1254
|
var chunk = buffer[nextWriteIndex],
|
@@ -1275,7 +1268,12 @@ module.exports = function ($$$config) {
|
|
1275
1268
|
value,
|
1276
1269
|
!1
|
1277
1270
|
))
|
1278
|
-
: resolveIteratorResultChunk(
|
1271
|
+
: resolveIteratorResultChunk(
|
1272
|
+
response,
|
1273
|
+
buffer[nextWriteIndex],
|
1274
|
+
value,
|
1275
|
+
!1
|
1276
|
+
);
|
1279
1277
|
nextWriteIndex++;
|
1280
1278
|
},
|
1281
1279
|
close: function (value) {
|
@@ -1286,9 +1284,15 @@ module.exports = function ($$$config) {
|
|
1286
1284
|
value,
|
1287
1285
|
!0
|
1288
1286
|
))
|
1289
|
-
: resolveIteratorResultChunk(
|
1287
|
+
: resolveIteratorResultChunk(
|
1288
|
+
response,
|
1289
|
+
buffer[nextWriteIndex],
|
1290
|
+
value,
|
1291
|
+
!0
|
1292
|
+
);
|
1290
1293
|
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
1291
1294
|
resolveIteratorResultChunk(
|
1295
|
+
response,
|
1292
1296
|
buffer[nextWriteIndex++],
|
1293
1297
|
'"$undefined"',
|
1294
1298
|
!0
|
@@ -1298,7 +1302,7 @@ module.exports = function ($$$config) {
|
|
1298
1302
|
closed = !0;
|
1299
1303
|
for (
|
1300
1304
|
nextWriteIndex === buffer.length &&
|
1301
|
-
(buffer[nextWriteIndex] =
|
1305
|
+
(buffer[nextWriteIndex] = new ReactPromise("pending", null, null));
|
1302
1306
|
nextWriteIndex < buffer.length;
|
1303
1307
|
|
1304
1308
|
)
|
@@ -1424,10 +1428,10 @@ module.exports = function ($$$config) {
|
|
1424
1428
|
: tag.set(id, createErrorChunk(response, row));
|
1425
1429
|
break;
|
1426
1430
|
case 84:
|
1427
|
-
|
1428
|
-
(
|
1429
|
-
?
|
1430
|
-
:
|
1431
|
+
response = response._chunks;
|
1432
|
+
(tag = response.get(id)) && "pending" !== tag.status
|
1433
|
+
? tag.reason.enqueueValue(row)
|
1434
|
+
: response.set(id, new ReactPromise("fulfilled", row, null));
|
1431
1435
|
break;
|
1432
1436
|
case 78:
|
1433
1437
|
case 68:
|
@@ -1463,11 +1467,8 @@ module.exports = function ($$$config) {
|
|
1463
1467
|
default:
|
1464
1468
|
(tag = response._chunks),
|
1465
1469
|
(chunk = tag.get(id))
|
1466
|
-
? resolveModelChunk(chunk, row)
|
1467
|
-
: tag.set(
|
1468
|
-
id,
|
1469
|
-
new ReactPromise("resolved_model", row, null, response)
|
1470
|
-
);
|
1470
|
+
? resolveModelChunk(response, chunk, row)
|
1471
|
+
: tag.set(id, new ReactPromise("resolved_model", row, response));
|
1471
1472
|
}
|
1472
1473
|
}
|
1473
1474
|
function createFromJSONCallback(response) {
|
@@ -1494,12 +1495,7 @@ module.exports = function ($$$config) {
|
|
1494
1495
|
(key = createErrorChunk(response, value.value)),
|
1495
1496
|
(key = createLazyChunkWrapper(key));
|
1496
1497
|
else if (0 < value.deps) {
|
1497
|
-
var blockedChunk = new ReactPromise(
|
1498
|
-
"blocked",
|
1499
|
-
null,
|
1500
|
-
null,
|
1501
|
-
response
|
1502
|
-
);
|
1498
|
+
var blockedChunk = new ReactPromise("blocked", null, null);
|
1503
1499
|
value.value = key;
|
1504
1500
|
value.chunk = blockedChunk;
|
1505
1501
|
key = createLazyChunkWrapper(blockedChunk);
|
@@ -1604,7 +1600,7 @@ module.exports = function ($$$config) {
|
|
1604
1600
|
version: rendererVersion,
|
1605
1601
|
rendererPackageName: rendererPackageName,
|
1606
1602
|
currentDispatcherRef: ReactSharedInternals,
|
1607
|
-
reconcilerVersion: "19.2.0-experimental-
|
1603
|
+
reconcilerVersion: "19.2.0-experimental-b42341dd-20250625",
|
1608
1604
|
getCurrentComponentInfo: getCurrentOwnerInDEV
|
1609
1605
|
};
|
1610
1606
|
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@matthamlin/react-client",
|
3
3
|
"description": "React package for consuming streaming models.",
|
4
|
-
"version": "0.0.0-experimental-
|
4
|
+
"version": "0.0.0-experimental-b42341dd-20250625",
|
5
5
|
"keywords": [
|
6
6
|
"react"
|
7
7
|
],
|
@@ -23,6 +23,6 @@
|
|
23
23
|
"node": ">=0.10.0"
|
24
24
|
},
|
25
25
|
"peerDependencies": {
|
26
|
-
"react": "0.0.0-experimental-
|
26
|
+
"react": "0.0.0-experimental-b42341dd-20250625"
|
27
27
|
}
|
28
28
|
}
|