@matthamlin/react-client 0.0.0-experimental-455424db-20250704 → 0.0.0-experimental-60b5271a-20250709

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.
@@ -758,7 +758,7 @@
758
758
  "\n//# sourceURL=rsc://React/" +
759
759
  encodeURIComponent(environmentName) +
760
760
  "/" +
761
- filename +
761
+ encodeURI(filename) +
762
762
  "?s" +
763
763
  fakeServerFunctionIdx++),
764
764
  (col += "\n//# sourceMappingURL=" + sourceMap))
@@ -1385,6 +1385,17 @@
1385
1385
  this._children = [];
1386
1386
  this._debugInfo = null;
1387
1387
  }
1388
+ function unwrapWeakResponse(weakResponse) {
1389
+ weakResponse = weakResponse.weak.deref();
1390
+ if (void 0 === weakResponse)
1391
+ throw Error(
1392
+ "We did not expect to receive new data after GC:ing the response."
1393
+ );
1394
+ return weakResponse;
1395
+ }
1396
+ function cleanupDebugChannel(debugChannel) {
1397
+ debugChannel("");
1398
+ }
1388
1399
  function readChunk(chunk) {
1389
1400
  switch (chunk.status) {
1390
1401
  case "resolved_model":
@@ -1404,9 +1415,23 @@
1404
1415
  throw chunk.reason;
1405
1416
  }
1406
1417
  }
1407
- function createPendingChunk() {
1418
+ function createPendingChunk(response) {
1419
+ 0 === response._pendingChunks++ &&
1420
+ ((response._weakResponse.response = response),
1421
+ null !== response._pendingInitialRender &&
1422
+ (clearTimeout(response._pendingInitialRender),
1423
+ (response._pendingInitialRender = null)));
1408
1424
  return new ReactPromise("pending", null, null);
1409
1425
  }
1426
+ function releasePendingChunk(response, chunk) {
1427
+ "pending" === chunk.status &&
1428
+ 0 === --response._pendingChunks &&
1429
+ ((response._weakResponse.response = null),
1430
+ (response._pendingInitialRender = setTimeout(
1431
+ flushInitialRenderPerformance.bind(null, response),
1432
+ 100
1433
+ )));
1434
+ }
1410
1435
  function createErrorChunk(response, error) {
1411
1436
  return new ReactPromise("rejected", null, error);
1412
1437
  }
@@ -1485,15 +1510,14 @@
1485
1510
  rejectListeners && rejectChunk(rejectListeners, chunk.reason);
1486
1511
  }
1487
1512
  }
1488
- function triggerErrorOnChunk(chunk, error) {
1489
- if ("pending" !== chunk.status && "blocked" !== chunk.status)
1490
- chunk.reason.error(error);
1491
- else {
1492
- var listeners = chunk.reason;
1493
- chunk.status = "rejected";
1494
- chunk.reason = error;
1495
- null !== listeners && rejectChunk(listeners, error);
1496
- }
1513
+ function triggerErrorOnChunk(response, chunk, error) {
1514
+ "pending" !== chunk.status && "blocked" !== chunk.status
1515
+ ? chunk.reason.error(error)
1516
+ : (releasePendingChunk(response, chunk),
1517
+ (response = chunk.reason),
1518
+ (chunk.status = "rejected"),
1519
+ (chunk.reason = error),
1520
+ null !== response && rejectChunk(response, error));
1497
1521
  }
1498
1522
  function createResolvedIteratorResultChunk(response, value, done) {
1499
1523
  return new ReactPromise(
@@ -1516,6 +1540,7 @@
1516
1540
  function resolveModelChunk(response, chunk, value) {
1517
1541
  if ("pending" !== chunk.status) chunk.reason.enqueueModel(value);
1518
1542
  else {
1543
+ releasePendingChunk(response, chunk);
1519
1544
  var resolveListeners = chunk.value,
1520
1545
  rejectListeners = chunk.reason;
1521
1546
  chunk.status = "resolved_model";
@@ -1526,15 +1551,16 @@
1526
1551
  wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
1527
1552
  }
1528
1553
  }
1529
- function resolveModuleChunk(chunk, value) {
1554
+ function resolveModuleChunk(response, chunk, value) {
1530
1555
  if ("pending" === chunk.status || "blocked" === chunk.status) {
1531
- var resolveListeners = chunk.value,
1532
- rejectListeners = chunk.reason;
1556
+ releasePendingChunk(response, chunk);
1557
+ response = chunk.value;
1558
+ var rejectListeners = chunk.reason;
1533
1559
  chunk.status = "resolved_module";
1534
1560
  chunk.value = value;
1535
- null !== resolveListeners &&
1561
+ null !== response &&
1536
1562
  (initializeModuleChunk(chunk),
1537
- wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
1563
+ wakeChunkIfInitialized(chunk, response, rejectListeners));
1538
1564
  }
1539
1565
  }
1540
1566
  function initializeModelChunk(chunk) {
@@ -1579,24 +1605,19 @@
1579
1605
  (chunk.status = "rejected"), (chunk.reason = error);
1580
1606
  }
1581
1607
  }
1582
- function reportGlobalError(response, error) {
1583
- response._closed = !0;
1584
- response._closedReason = error;
1585
- response._chunks.forEach(function (chunk) {
1586
- "pending" === chunk.status && triggerErrorOnChunk(chunk, error);
1587
- });
1588
- var debugChannel = response._debugChannel;
1589
- void 0 !== debugChannel &&
1590
- (debugChannel(""), (response._debugChannel = void 0));
1591
- response._replayConsole &&
1592
- (markAllTracksInOrder(),
1593
- flushComponentPerformance(
1594
- response,
1595
- getChunk(response, 0),
1596
- 0,
1597
- -Infinity,
1598
- -Infinity
1599
- ));
1608
+ function reportGlobalError(weakResponse, error) {
1609
+ if (void 0 !== weakResponse.weak.deref()) {
1610
+ var response = unwrapWeakResponse(weakResponse);
1611
+ response._closed = !0;
1612
+ response._closedReason = error;
1613
+ response._chunks.forEach(function (chunk) {
1614
+ "pending" === chunk.status &&
1615
+ triggerErrorOnChunk(response, chunk, error);
1616
+ });
1617
+ weakResponse = response._debugChannel;
1618
+ void 0 !== weakResponse &&
1619
+ (weakResponse(""), (response._debugChannel = void 0));
1620
+ }
1600
1621
  }
1601
1622
  function nullRefGetter() {
1602
1623
  return null;
@@ -1672,7 +1693,7 @@
1672
1693
  chunk ||
1673
1694
  ((chunk = response._closed
1674
1695
  ? createErrorChunk(response, response._closedReason)
1675
- : createPendingChunk()),
1696
+ : createPendingChunk(response)),
1676
1697
  chunks.set(id, chunk));
1677
1698
  return chunk;
1678
1699
  }
@@ -1758,31 +1779,31 @@
1758
1779
  }
1759
1780
  function rejectReference(reference, error) {
1760
1781
  var handler = reference.handler;
1761
- if (
1762
- !handler.errored &&
1763
- ((reference = handler.value),
1764
- (handler.errored = !0),
1765
- (handler.value = error),
1766
- (handler = handler.chunk),
1767
- null !== handler && "blocked" === handler.status)
1768
- ) {
1769
- if (
1770
- "object" === typeof reference &&
1771
- null !== reference &&
1772
- reference.$$typeof === REACT_ELEMENT_TYPE
1773
- ) {
1774
- var erroredComponent = {
1775
- name: getComponentNameFromType(reference.type) || "",
1776
- owner: reference._owner
1777
- };
1778
- erroredComponent.debugStack = reference._debugStack;
1779
- supportsCreateTask &&
1780
- (erroredComponent.debugTask = reference._debugTask);
1781
- (handler._debugInfo || (handler._debugInfo = [])).push(
1782
- erroredComponent
1783
- );
1782
+ reference = reference.response;
1783
+ if (!handler.errored) {
1784
+ var blockedValue = handler.value;
1785
+ handler.errored = !0;
1786
+ handler.value = error;
1787
+ handler = handler.chunk;
1788
+ if (null !== handler && "blocked" === handler.status) {
1789
+ if (
1790
+ "object" === typeof blockedValue &&
1791
+ null !== blockedValue &&
1792
+ blockedValue.$$typeof === REACT_ELEMENT_TYPE
1793
+ ) {
1794
+ var erroredComponent = {
1795
+ name: getComponentNameFromType(blockedValue.type) || "",
1796
+ owner: blockedValue._owner
1797
+ };
1798
+ erroredComponent.debugStack = blockedValue._debugStack;
1799
+ supportsCreateTask &&
1800
+ (erroredComponent.debugTask = blockedValue._debugTask);
1801
+ (handler._debugInfo || (handler._debugInfo = [])).push(
1802
+ erroredComponent
1803
+ );
1804
+ }
1805
+ triggerErrorOnChunk(reference, handler, error);
1784
1806
  }
1785
- triggerErrorOnChunk(handler, error);
1786
1807
  }
1787
1808
  }
1788
1809
  function waitForReference(
@@ -1922,7 +1943,7 @@
1922
1943
  erroredComponent
1923
1944
  );
1924
1945
  }
1925
- triggerErrorOnChunk(chunk, error);
1946
+ triggerErrorOnChunk(response, chunk, error);
1926
1947
  }
1927
1948
  }
1928
1949
  }
@@ -2072,6 +2093,23 @@
2072
2093
  function applyConstructor(response, model, parentObject) {
2073
2094
  Object.setPrototypeOf(parentObject, model.prototype);
2074
2095
  }
2096
+ function defineLazyGetter(response, chunk, parentObject, key) {
2097
+ Object.defineProperty(parentObject, key, {
2098
+ get: function () {
2099
+ "resolved_model" === chunk.status && initializeModelChunk(chunk);
2100
+ switch (chunk.status) {
2101
+ case "fulfilled":
2102
+ return chunk.value;
2103
+ case "rejected":
2104
+ throw chunk.reason;
2105
+ }
2106
+ 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.";
2107
+ },
2108
+ enumerable: !0,
2109
+ configurable: !1
2110
+ });
2111
+ return null;
2112
+ }
2075
2113
  function extractIterator(response, model) {
2076
2114
  return model[Symbol.iterator]();
2077
2115
  }
@@ -2117,15 +2155,13 @@
2117
2155
  case "S":
2118
2156
  return Symbol.for(value.slice(2));
2119
2157
  case "F":
2120
- return (
2121
- (value = value.slice(2)),
2122
- getOutlinedModel(
2123
- response,
2124
- value,
2125
- parentObject,
2126
- key,
2127
- loadServerReference
2128
- )
2158
+ var ref = value.slice(2);
2159
+ return getOutlinedModel(
2160
+ response,
2161
+ ref,
2162
+ parentObject,
2163
+ key,
2164
+ loadServerReference
2129
2165
  );
2130
2166
  case "T":
2131
2167
  parentObject = "$" + value.slice(2);
@@ -2137,36 +2173,30 @@
2137
2173
  return response.get(parentObject);
2138
2174
  case "Q":
2139
2175
  return (
2140
- (value = value.slice(2)),
2141
- getOutlinedModel(response, value, parentObject, key, createMap)
2176
+ (ref = value.slice(2)),
2177
+ getOutlinedModel(response, ref, parentObject, key, createMap)
2142
2178
  );
2143
2179
  case "W":
2144
2180
  return (
2145
- (value = value.slice(2)),
2146
- getOutlinedModel(response, value, parentObject, key, createSet)
2181
+ (ref = value.slice(2)),
2182
+ getOutlinedModel(response, ref, parentObject, key, createSet)
2147
2183
  );
2148
2184
  case "B":
2149
2185
  return (
2150
- (value = value.slice(2)),
2151
- getOutlinedModel(response, value, parentObject, key, createBlob)
2186
+ (ref = value.slice(2)),
2187
+ getOutlinedModel(response, ref, parentObject, key, createBlob)
2152
2188
  );
2153
2189
  case "K":
2154
2190
  return (
2155
- (value = value.slice(2)),
2156
- getOutlinedModel(
2157
- response,
2158
- value,
2159
- parentObject,
2160
- key,
2161
- createFormData
2162
- )
2191
+ (ref = value.slice(2)),
2192
+ getOutlinedModel(response, ref, parentObject, key, createFormData)
2163
2193
  );
2164
2194
  case "Z":
2165
2195
  return (
2166
- (value = value.slice(2)),
2196
+ (ref = value.slice(2)),
2167
2197
  getOutlinedModel(
2168
2198
  response,
2169
- value,
2199
+ ref,
2170
2200
  parentObject,
2171
2201
  key,
2172
2202
  resolveErrorDev
@@ -2174,10 +2204,10 @@
2174
2204
  );
2175
2205
  case "i":
2176
2206
  return (
2177
- (value = value.slice(2)),
2207
+ (ref = value.slice(2)),
2178
2208
  getOutlinedModel(
2179
2209
  response,
2180
- value,
2210
+ ref,
2181
2211
  parentObject,
2182
2212
  key,
2183
2213
  extractIterator
@@ -2197,10 +2227,10 @@
2197
2227
  return BigInt(value.slice(2));
2198
2228
  case "P":
2199
2229
  return (
2200
- (value = value.slice(2)),
2230
+ (ref = value.slice(2)),
2201
2231
  getOutlinedModel(
2202
2232
  response,
2203
- value,
2233
+ ref,
2204
2234
  parentObject,
2205
2235
  key,
2206
2236
  applyConstructor
@@ -2246,23 +2276,34 @@
2246
2276
  return function () {};
2247
2277
  }
2248
2278
  case "Y":
2249
- return (
2250
- 2 < value.length &&
2251
- (response = response._debugChannel) &&
2252
- ((value = value.slice(2)), response("R:" + value)),
2253
- Object.defineProperty(parentObject, key, {
2254
- get: function () {
2255
- 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.";
2256
- },
2257
- enumerable: !0,
2258
- configurable: !1
2259
- }),
2260
- null
2261
- );
2279
+ if (2 < value.length && (ref = response._debugChannel)) {
2280
+ if ("@" === value[2])
2281
+ return (
2282
+ (parentObject = value.slice(3)),
2283
+ (key = parseInt(parentObject, 16)),
2284
+ response._chunks.has(key) || ref("P:" + parentObject),
2285
+ getChunk(response, key)
2286
+ );
2287
+ value = value.slice(2);
2288
+ var _id2 = parseInt(value, 16);
2289
+ response._chunks.has(_id2) || ref("Q:" + value);
2290
+ ref = getChunk(response, _id2);
2291
+ return "fulfilled" === ref.status
2292
+ ? ref.value
2293
+ : defineLazyGetter(response, ref, parentObject, key);
2294
+ }
2295
+ Object.defineProperty(parentObject, key, {
2296
+ get: function () {
2297
+ 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.";
2298
+ },
2299
+ enumerable: !0,
2300
+ configurable: !1
2301
+ });
2302
+ return null;
2262
2303
  default:
2263
2304
  return (
2264
- (value = value.slice(1)),
2265
- getOutlinedModel(response, value, parentObject, key, createModel)
2305
+ (ref = value.slice(1)),
2306
+ getOutlinedModel(response, ref, parentObject, key, createModel)
2266
2307
  );
2267
2308
  }
2268
2309
  }
@@ -2302,6 +2343,9 @@
2302
2343
  this._closedReason = null;
2303
2344
  this._tempRefs = temporaryReferences;
2304
2345
  this._timeOrigin = 0;
2346
+ this._pendingInitialRender = null;
2347
+ this._pendingChunks = 0;
2348
+ this._weakResponse = { weak: new WeakRef(this), response: this };
2305
2349
  this._debugRootOwner = bundlerConfig =
2306
2350
  void 0 === ReactSharedInteralsServer ||
2307
2351
  null === ReactSharedInteralsServer.A
@@ -2318,18 +2362,23 @@
2318
2362
  this._debugChannel = debugChannel;
2319
2363
  this._replayConsole = replayConsole;
2320
2364
  this._rootEnvironmentName = environmentName;
2365
+ debugChannel &&
2366
+ (null === debugChannelRegistry
2367
+ ? (debugChannel(""), (this._debugChannel = void 0))
2368
+ : debugChannelRegistry.register(this, debugChannel));
2321
2369
  replayConsole && markAllTracksInOrder();
2322
2370
  this._fromJSON = createFromJSONCallback(this);
2323
2371
  }
2324
2372
  function resolveDebugHalt(response, id) {
2325
- response = response._chunks;
2326
- var chunk = response.get(id);
2327
- chunk || response.set(id, (chunk = createPendingChunk()));
2373
+ var chunks = response._chunks,
2374
+ chunk = chunks.get(id);
2375
+ chunk || chunks.set(id, (chunk = createPendingChunk(response)));
2328
2376
  if ("pending" === chunk.status || "blocked" === chunk.status)
2329
- (id = chunk),
2330
- (id.status = "halted"),
2331
- (id.value = null),
2332
- (id.reason = null);
2377
+ releasePendingChunk(response, chunk),
2378
+ (response = chunk),
2379
+ (response.status = "halted"),
2380
+ (response.value = null),
2381
+ (response.reason = null);
2333
2382
  }
2334
2383
  function resolveModel(response, id, model) {
2335
2384
  var chunks = response._chunks,
@@ -2339,18 +2388,20 @@
2339
2388
  : chunks.set(id, new ReactPromise("resolved_model", model, response));
2340
2389
  }
2341
2390
  function resolveText(response, id, text) {
2342
- response = response._chunks;
2343
- var chunk = response.get(id);
2391
+ var chunks = response._chunks,
2392
+ chunk = chunks.get(id);
2344
2393
  chunk && "pending" !== chunk.status
2345
2394
  ? chunk.reason.enqueueValue(text)
2346
- : response.set(id, new ReactPromise("fulfilled", text, null));
2395
+ : (chunk && releasePendingChunk(response, chunk),
2396
+ chunks.set(id, new ReactPromise("fulfilled", text, null)));
2347
2397
  }
2348
2398
  function resolveBuffer(response, id, buffer) {
2349
- response = response._chunks;
2350
- var chunk = response.get(id);
2399
+ var chunks = response._chunks,
2400
+ chunk = chunks.get(id);
2351
2401
  chunk && "pending" !== chunk.status
2352
2402
  ? chunk.reason.enqueueValue(buffer)
2353
- : response.set(id, new ReactPromise("fulfilled", buffer, null));
2403
+ : (chunk && releasePendingChunk(response, chunk),
2404
+ chunks.set(id, new ReactPromise("fulfilled", buffer, null)));
2354
2405
  }
2355
2406
  function resolveModule(response, id, model) {
2356
2407
  var chunks = response._chunks,
@@ -2365,39 +2416,41 @@
2365
2416
  response._nonce,
2366
2417
  model
2367
2418
  );
2368
- if ((response = preloadModule(clientReference))) {
2419
+ if ((model = preloadModule(clientReference))) {
2369
2420
  if (chunk) {
2421
+ releasePendingChunk(response, chunk);
2370
2422
  var blockedChunk = chunk;
2371
2423
  blockedChunk.status = "blocked";
2372
2424
  } else
2373
2425
  (blockedChunk = new ReactPromise("blocked", null, null)),
2374
2426
  chunks.set(id, blockedChunk);
2375
- response.then(
2427
+ model.then(
2376
2428
  function () {
2377
- return resolveModuleChunk(blockedChunk, clientReference);
2429
+ return resolveModuleChunk(response, blockedChunk, clientReference);
2378
2430
  },
2379
2431
  function (error) {
2380
- return triggerErrorOnChunk(blockedChunk, error);
2432
+ return triggerErrorOnChunk(response, blockedChunk, error);
2381
2433
  }
2382
2434
  );
2383
2435
  } else
2384
2436
  chunk
2385
- ? resolveModuleChunk(chunk, clientReference)
2437
+ ? resolveModuleChunk(response, chunk, clientReference)
2386
2438
  : chunks.set(
2387
2439
  id,
2388
2440
  new ReactPromise("resolved_module", clientReference, null)
2389
2441
  );
2390
2442
  }
2391
2443
  function resolveStream(response, id, stream, controller) {
2392
- var chunks = response._chunks;
2393
- response = chunks.get(id);
2394
- response
2395
- ? "pending" === response.status &&
2396
- ((id = response.value),
2397
- (response.status = "fulfilled"),
2398
- (response.value = stream),
2399
- (response.reason = controller),
2400
- null !== id && wakeChunk(id, response.value))
2444
+ var chunks = response._chunks,
2445
+ chunk = chunks.get(id);
2446
+ chunk
2447
+ ? "pending" === chunk.status &&
2448
+ (releasePendingChunk(response, chunk),
2449
+ (response = chunk.value),
2450
+ (chunk.status = "fulfilled"),
2451
+ (chunk.value = stream),
2452
+ (chunk.reason = controller),
2453
+ null !== response && wakeChunk(response, chunk.value))
2401
2454
  : chunks.set(id, new ReactPromise("fulfilled", stream, controller));
2402
2455
  }
2403
2456
  function startReadableStream(response, id, type) {
@@ -2434,8 +2487,8 @@
2434
2487
  (previousBlockedChunk = chunk));
2435
2488
  } else {
2436
2489
  chunk = previousBlockedChunk;
2437
- var _chunk2 = createPendingChunk();
2438
- _chunk2.then(
2490
+ var _chunk3 = createPendingChunk(response);
2491
+ _chunk3.then(
2439
2492
  function (v) {
2440
2493
  return controller.enqueue(v);
2441
2494
  },
@@ -2443,10 +2496,10 @@
2443
2496
  return controller.error(e);
2444
2497
  }
2445
2498
  );
2446
- previousBlockedChunk = _chunk2;
2499
+ previousBlockedChunk = _chunk3;
2447
2500
  chunk.then(function () {
2448
- previousBlockedChunk === _chunk2 && (previousBlockedChunk = null);
2449
- resolveModelChunk(response, _chunk2, json);
2501
+ previousBlockedChunk === _chunk3 && (previousBlockedChunk = null);
2502
+ resolveModelChunk(response, _chunk3, json);
2450
2503
  });
2451
2504
  }
2452
2505
  },
@@ -2499,7 +2552,7 @@
2499
2552
  { done: !0, value: void 0 },
2500
2553
  null
2501
2554
  );
2502
- buffer[nextReadIndex] = createPendingChunk();
2555
+ buffer[nextReadIndex] = createPendingChunk(response);
2503
2556
  }
2504
2557
  return buffer[nextReadIndex++];
2505
2558
  });
@@ -2572,11 +2625,11 @@
2572
2625
  closed = !0;
2573
2626
  for (
2574
2627
  nextWriteIndex === buffer.length &&
2575
- (buffer[nextWriteIndex] = createPendingChunk());
2628
+ (buffer[nextWriteIndex] = createPendingChunk(response));
2576
2629
  nextWriteIndex < buffer.length;
2577
2630
 
2578
2631
  )
2579
- triggerErrorOnChunk(buffer[nextWriteIndex++], error);
2632
+ triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);
2580
2633
  }
2581
2634
  }
2582
2635
  );
@@ -2619,7 +2672,7 @@
2619
2672
  reason.$$typeof = REACT_POSTPONE_TYPE;
2620
2673
  stack = response._chunks;
2621
2674
  (env = stack.get(id))
2622
- ? triggerErrorOnChunk(env, reason)
2675
+ ? triggerErrorOnChunk(response, env, reason)
2623
2676
  : stack.set(id, createErrorChunk(response, reason));
2624
2677
  }
2625
2678
  function resolveHint(response, code, model) {
@@ -3054,9 +3107,8 @@
3054
3107
  previousResult.track = trackIdx$jscomp$6;
3055
3108
  return previousResult;
3056
3109
  }
3057
- var children = root._children;
3058
- "resolved_model" === root.status && initializeModelChunk(root);
3059
- var debugInfo = root._debugInfo;
3110
+ var children = root._children,
3111
+ debugInfo = root._debugInfo;
3060
3112
  if (debugInfo) {
3061
3113
  for (var startTime$jscomp$0 = 0, i = 0; i < debugInfo.length; i++) {
3062
3114
  var info = debugInfo[i];
@@ -3516,6 +3568,20 @@
3516
3568
  result.endTime = childrenEndTime;
3517
3569
  return result;
3518
3570
  }
3571
+ function flushInitialRenderPerformance(response) {
3572
+ if (response._replayConsole) {
3573
+ var rootChunk = getChunk(response, 0);
3574
+ isArrayImpl(rootChunk._children) &&
3575
+ (markAllTracksInOrder(),
3576
+ flushComponentPerformance(
3577
+ response,
3578
+ rootChunk,
3579
+ 0,
3580
+ -Infinity,
3581
+ -Infinity
3582
+ ));
3583
+ }
3584
+ }
3519
3585
  function processFullBinaryRow(response, id, tag, buffer, chunk) {
3520
3586
  switch (tag) {
3521
3587
  case 65:
@@ -3586,7 +3652,7 @@
3586
3652
  row = response._chunks;
3587
3653
  var chunk = row.get(id);
3588
3654
  chunk
3589
- ? triggerErrorOnChunk(chunk, tag)
3655
+ ? triggerErrorOnChunk(response, chunk, tag)
3590
3656
  : row.set(id, createErrorChunk(response, tag));
3591
3657
  break;
3592
3658
  case 84:
@@ -3825,7 +3891,11 @@
3825
3891
  "function" === typeof reject && reject(this.reason);
3826
3892
  }
3827
3893
  };
3828
- var initializingHandler = null,
3894
+ var debugChannelRegistry =
3895
+ "function" === typeof FinalizationRegistry
3896
+ ? new FinalizationRegistry(cleanupDebugChannel)
3897
+ : null,
3898
+ initializingHandler = null,
3829
3899
  initializingChunk = null,
3830
3900
  supportsCreateTask = !!console.createTask,
3831
3901
  fakeFunctionCache = new Map(),
@@ -3886,8 +3956,8 @@
3886
3956
  replayConsoleWithCallStack.react_stack_bottom_frame.bind(
3887
3957
  replayConsoleWithCallStack
3888
3958
  );
3889
- exports.close = function (response) {
3890
- reportGlobalError(response, Error("Connection closed."));
3959
+ exports.close = function (weakResponse) {
3960
+ reportGlobalError(weakResponse, Error("Connection closed."));
3891
3961
  };
3892
3962
  exports.createResponse = function (
3893
3963
  bundlerConfig,
@@ -3902,7 +3972,7 @@
3902
3972
  environmentName,
3903
3973
  debugChannel
3904
3974
  ) {
3905
- return new ResponseInstance(
3975
+ bundlerConfig = new ResponseInstance(
3906
3976
  bundlerConfig,
3907
3977
  serverReferenceConfig,
3908
3978
  moduleLoading,
@@ -3914,10 +3984,12 @@
3914
3984
  replayConsole,
3915
3985
  environmentName,
3916
3986
  debugChannel
3917
- );
3987
+ )._weakResponse;
3988
+ return bundlerConfig;
3918
3989
  };
3919
- exports.getRoot = function (response) {
3920
- return getChunk(response, 0);
3990
+ exports.getRoot = function (weakResponse) {
3991
+ weakResponse = unwrapWeakResponse(weakResponse);
3992
+ return getChunk(weakResponse, 0);
3921
3993
  };
3922
3994
  exports.injectIntoDevTools = function () {
3923
3995
  var JSCompiler_inline_result = {
@@ -3925,7 +3997,7 @@
3925
3997
  version: rendererVersion,
3926
3998
  rendererPackageName: rendererPackageName,
3927
3999
  currentDispatcherRef: ReactSharedInternals,
3928
- reconcilerVersion: "19.2.0-experimental-455424db-20250704",
4000
+ reconcilerVersion: "19.2.0-experimental-60b5271a-20250709",
3929
4001
  getCurrentComponentInfo: getCurrentOwnerInDEV
3930
4002
  };
3931
4003
  if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
@@ -3948,171 +4020,186 @@
3948
4020
  }
3949
4021
  return JSCompiler_inline_result;
3950
4022
  };
3951
- exports.processBinaryChunk = function (response, chunk) {
3952
- for (
3953
- var i = 0,
3954
- rowState = response._rowState,
3955
- rowID = response._rowID,
3956
- rowTag = response._rowTag,
3957
- rowLength = response._rowLength,
3958
- buffer = response._buffer,
3959
- chunkLength = chunk.length;
3960
- i < chunkLength;
4023
+ exports.processBinaryChunk = function (weakResponse, chunk) {
4024
+ if (void 0 !== weakResponse.weak.deref()) {
4025
+ weakResponse = unwrapWeakResponse(weakResponse);
4026
+ for (
4027
+ var i = 0,
4028
+ rowState = weakResponse._rowState,
4029
+ rowID = weakResponse._rowID,
4030
+ rowTag = weakResponse._rowTag,
4031
+ rowLength = weakResponse._rowLength,
4032
+ buffer = weakResponse._buffer,
4033
+ chunkLength = chunk.length;
4034
+ i < chunkLength;
3961
4035
 
3962
- ) {
3963
- var lastIdx = -1;
3964
- switch (rowState) {
3965
- case 0:
3966
- lastIdx = chunk[i++];
3967
- 58 === lastIdx
3968
- ? (rowState = 1)
3969
- : (rowID =
3970
- (rowID << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
3971
- continue;
3972
- case 1:
3973
- rowState = chunk[i];
3974
- 84 === rowState ||
3975
- 65 === rowState ||
3976
- 79 === rowState ||
3977
- 111 === rowState ||
3978
- 85 === rowState ||
3979
- 83 === rowState ||
3980
- 115 === rowState ||
3981
- 76 === rowState ||
3982
- 108 === rowState ||
3983
- 71 === rowState ||
3984
- 103 === rowState ||
3985
- 77 === rowState ||
3986
- 109 === rowState ||
3987
- 86 === rowState
3988
- ? ((rowTag = rowState), (rowState = 2), i++)
3989
- : (64 < rowState && 91 > rowState) ||
3990
- 35 === rowState ||
3991
- 114 === rowState ||
3992
- 120 === rowState
3993
- ? ((rowTag = rowState), (rowState = 3), i++)
3994
- : ((rowTag = 0), (rowState = 3));
3995
- continue;
3996
- case 2:
3997
- lastIdx = chunk[i++];
3998
- 44 === lastIdx
3999
- ? (rowState = 4)
4000
- : (rowLength =
4001
- (rowLength << 4) |
4002
- (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
4003
- continue;
4004
- case 3:
4005
- lastIdx = chunk.indexOf(10, i);
4036
+ ) {
4037
+ var lastIdx = -1;
4038
+ switch (rowState) {
4039
+ case 0:
4040
+ lastIdx = chunk[i++];
4041
+ 58 === lastIdx
4042
+ ? (rowState = 1)
4043
+ : (rowID =
4044
+ (rowID << 4) |
4045
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
4046
+ continue;
4047
+ case 1:
4048
+ rowState = chunk[i];
4049
+ 84 === rowState ||
4050
+ 65 === rowState ||
4051
+ 79 === rowState ||
4052
+ 111 === rowState ||
4053
+ 85 === rowState ||
4054
+ 83 === rowState ||
4055
+ 115 === rowState ||
4056
+ 76 === rowState ||
4057
+ 108 === rowState ||
4058
+ 71 === rowState ||
4059
+ 103 === rowState ||
4060
+ 77 === rowState ||
4061
+ 109 === rowState ||
4062
+ 86 === rowState
4063
+ ? ((rowTag = rowState), (rowState = 2), i++)
4064
+ : (64 < rowState && 91 > rowState) ||
4065
+ 35 === rowState ||
4066
+ 114 === rowState ||
4067
+ 120 === rowState
4068
+ ? ((rowTag = rowState), (rowState = 3), i++)
4069
+ : ((rowTag = 0), (rowState = 3));
4070
+ continue;
4071
+ case 2:
4072
+ lastIdx = chunk[i++];
4073
+ 44 === lastIdx
4074
+ ? (rowState = 4)
4075
+ : (rowLength =
4076
+ (rowLength << 4) |
4077
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
4078
+ continue;
4079
+ case 3:
4080
+ lastIdx = chunk.indexOf(10, i);
4081
+ break;
4082
+ case 4:
4083
+ (lastIdx = i + rowLength),
4084
+ lastIdx > chunk.length && (lastIdx = -1);
4085
+ }
4086
+ var offset = chunk.byteOffset + i;
4087
+ if (-1 < lastIdx)
4088
+ (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
4089
+ processFullBinaryRow(
4090
+ weakResponse,
4091
+ rowID,
4092
+ rowTag,
4093
+ buffer,
4094
+ rowLength
4095
+ ),
4096
+ (i = lastIdx),
4097
+ 3 === rowState && i++,
4098
+ (rowLength = rowID = rowTag = rowState = 0),
4099
+ (buffer.length = 0);
4100
+ else {
4101
+ chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
4102
+ buffer.push(chunk);
4103
+ rowLength -= chunk.byteLength;
4006
4104
  break;
4007
- case 4:
4008
- (lastIdx = i + rowLength), lastIdx > chunk.length && (lastIdx = -1);
4009
- }
4010
- var offset = chunk.byteOffset + i;
4011
- if (-1 < lastIdx)
4012
- (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
4013
- processFullBinaryRow(response, rowID, rowTag, buffer, rowLength),
4014
- (i = lastIdx),
4015
- 3 === rowState && i++,
4016
- (rowLength = rowID = rowTag = rowState = 0),
4017
- (buffer.length = 0);
4018
- else {
4019
- chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
4020
- buffer.push(chunk);
4021
- rowLength -= chunk.byteLength;
4022
- break;
4105
+ }
4023
4106
  }
4107
+ weakResponse._rowState = rowState;
4108
+ weakResponse._rowID = rowID;
4109
+ weakResponse._rowTag = rowTag;
4110
+ weakResponse._rowLength = rowLength;
4024
4111
  }
4025
- response._rowState = rowState;
4026
- response._rowID = rowID;
4027
- response._rowTag = rowTag;
4028
- response._rowLength = rowLength;
4029
4112
  };
4030
- exports.processStringChunk = function (response, chunk) {
4031
- for (
4032
- var i = 0,
4033
- rowState = response._rowState,
4034
- rowID = response._rowID,
4035
- rowTag = response._rowTag,
4036
- rowLength = response._rowLength,
4037
- buffer = response._buffer,
4038
- chunkLength = chunk.length;
4039
- i < chunkLength;
4113
+ exports.processStringChunk = function (weakResponse, chunk) {
4114
+ if (void 0 !== weakResponse.weak.deref()) {
4115
+ weakResponse = unwrapWeakResponse(weakResponse);
4116
+ for (
4117
+ var i = 0,
4118
+ rowState = weakResponse._rowState,
4119
+ rowID = weakResponse._rowID,
4120
+ rowTag = weakResponse._rowTag,
4121
+ rowLength = weakResponse._rowLength,
4122
+ buffer = weakResponse._buffer,
4123
+ chunkLength = chunk.length;
4124
+ i < chunkLength;
4040
4125
 
4041
- ) {
4042
- var lastIdx = -1;
4043
- switch (rowState) {
4044
- case 0:
4045
- lastIdx = chunk.charCodeAt(i++);
4046
- 58 === lastIdx
4047
- ? (rowState = 1)
4048
- : (rowID =
4049
- (rowID << 4) | (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
4050
- continue;
4051
- case 1:
4052
- rowState = chunk.charCodeAt(i);
4053
- 84 === rowState ||
4054
- 65 === rowState ||
4055
- 79 === rowState ||
4056
- 111 === rowState ||
4057
- 85 === rowState ||
4058
- 83 === rowState ||
4059
- 115 === rowState ||
4060
- 76 === rowState ||
4061
- 108 === rowState ||
4062
- 71 === rowState ||
4063
- 103 === rowState ||
4064
- 77 === rowState ||
4065
- 109 === rowState ||
4066
- 86 === rowState
4067
- ? ((rowTag = rowState), (rowState = 2), i++)
4068
- : (64 < rowState && 91 > rowState) ||
4069
- 114 === rowState ||
4070
- 120 === rowState
4071
- ? ((rowTag = rowState), (rowState = 3), i++)
4072
- : ((rowTag = 0), (rowState = 3));
4073
- continue;
4074
- case 2:
4075
- lastIdx = chunk.charCodeAt(i++);
4076
- 44 === lastIdx
4077
- ? (rowState = 4)
4078
- : (rowLength =
4079
- (rowLength << 4) |
4080
- (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
4081
- continue;
4082
- case 3:
4083
- lastIdx = chunk.indexOf("\n", i);
4084
- break;
4085
- case 4:
4086
- if (84 !== rowTag)
4087
- throw Error(
4088
- "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams."
4089
- );
4090
- if (rowLength < chunk.length || chunk.length > 3 * rowLength)
4126
+ ) {
4127
+ var lastIdx = -1;
4128
+ switch (rowState) {
4129
+ case 0:
4130
+ lastIdx = chunk.charCodeAt(i++);
4131
+ 58 === lastIdx
4132
+ ? (rowState = 1)
4133
+ : (rowID =
4134
+ (rowID << 4) |
4135
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
4136
+ continue;
4137
+ case 1:
4138
+ rowState = chunk.charCodeAt(i);
4139
+ 84 === rowState ||
4140
+ 65 === rowState ||
4141
+ 79 === rowState ||
4142
+ 111 === rowState ||
4143
+ 85 === rowState ||
4144
+ 83 === rowState ||
4145
+ 115 === rowState ||
4146
+ 76 === rowState ||
4147
+ 108 === rowState ||
4148
+ 71 === rowState ||
4149
+ 103 === rowState ||
4150
+ 77 === rowState ||
4151
+ 109 === rowState ||
4152
+ 86 === rowState
4153
+ ? ((rowTag = rowState), (rowState = 2), i++)
4154
+ : (64 < rowState && 91 > rowState) ||
4155
+ 114 === rowState ||
4156
+ 120 === rowState
4157
+ ? ((rowTag = rowState), (rowState = 3), i++)
4158
+ : ((rowTag = 0), (rowState = 3));
4159
+ continue;
4160
+ case 2:
4161
+ lastIdx = chunk.charCodeAt(i++);
4162
+ 44 === lastIdx
4163
+ ? (rowState = 4)
4164
+ : (rowLength =
4165
+ (rowLength << 4) |
4166
+ (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
4167
+ continue;
4168
+ case 3:
4169
+ lastIdx = chunk.indexOf("\n", i);
4170
+ break;
4171
+ case 4:
4172
+ if (84 !== rowTag)
4173
+ throw Error(
4174
+ "Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams."
4175
+ );
4176
+ if (rowLength < chunk.length || chunk.length > 3 * rowLength)
4177
+ throw Error(
4178
+ "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
4179
+ );
4180
+ lastIdx = chunk.length;
4181
+ }
4182
+ if (-1 < lastIdx) {
4183
+ if (0 < buffer.length)
4091
4184
  throw Error(
4092
4185
  "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
4093
4186
  );
4094
- lastIdx = chunk.length;
4095
- }
4096
- if (-1 < lastIdx) {
4097
- if (0 < buffer.length)
4187
+ i = chunk.slice(i, lastIdx);
4188
+ processFullStringRow(weakResponse, rowID, rowTag, i);
4189
+ i = lastIdx;
4190
+ 3 === rowState && i++;
4191
+ rowLength = rowID = rowTag = rowState = 0;
4192
+ buffer.length = 0;
4193
+ } else if (chunk.length !== i)
4098
4194
  throw Error(
4099
4195
  "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
4100
4196
  );
4101
- i = chunk.slice(i, lastIdx);
4102
- processFullStringRow(response, rowID, rowTag, i);
4103
- i = lastIdx;
4104
- 3 === rowState && i++;
4105
- rowLength = rowID = rowTag = rowState = 0;
4106
- buffer.length = 0;
4107
- } else if (chunk.length !== i)
4108
- throw Error(
4109
- "String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
4110
- );
4197
+ }
4198
+ weakResponse._rowState = rowState;
4199
+ weakResponse._rowID = rowID;
4200
+ weakResponse._rowTag = rowTag;
4201
+ weakResponse._rowLength = rowLength;
4111
4202
  }
4112
- response._rowState = rowState;
4113
- response._rowID = rowID;
4114
- response._rowTag = rowTag;
4115
- response._rowLength = rowLength;
4116
4203
  };
4117
4204
  exports.reportGlobalError = reportGlobalError;
4118
4205
  return exports;
@@ -659,15 +659,13 @@ module.exports = function ($$$config) {
659
659
  rejectListeners && rejectChunk(rejectListeners, chunk.reason);
660
660
  }
661
661
  }
662
- function triggerErrorOnChunk(chunk, error) {
663
- if ("pending" !== chunk.status && "blocked" !== chunk.status)
664
- chunk.reason.error(error);
665
- else {
666
- var listeners = chunk.reason;
667
- chunk.status = "rejected";
668
- chunk.reason = error;
669
- null !== listeners && rejectChunk(listeners, error);
670
- }
662
+ function triggerErrorOnChunk(response, chunk, error) {
663
+ "pending" !== chunk.status && "blocked" !== chunk.status
664
+ ? chunk.reason.error(error)
665
+ : ((response = chunk.reason),
666
+ (chunk.status = "rejected"),
667
+ (chunk.reason = error),
668
+ null !== response && rejectChunk(response, error));
671
669
  }
672
670
  function createResolvedIteratorResultChunk(response, value, done) {
673
671
  return new ReactPromise(
@@ -696,15 +694,15 @@ module.exports = function ($$$config) {
696
694
  wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
697
695
  }
698
696
  }
699
- function resolveModuleChunk(chunk, value) {
697
+ function resolveModuleChunk(response, chunk, value) {
700
698
  if ("pending" === chunk.status || "blocked" === chunk.status) {
701
- var resolveListeners = chunk.value,
702
- rejectListeners = chunk.reason;
699
+ response = chunk.value;
700
+ var rejectListeners = chunk.reason;
703
701
  chunk.status = "resolved_module";
704
702
  chunk.value = value;
705
- null !== resolveListeners &&
703
+ null !== response &&
706
704
  (initializeModuleChunk(chunk),
707
- wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
705
+ wakeChunkIfInitialized(chunk, response, rejectListeners));
708
706
  }
709
707
  }
710
708
  function initializeModelChunk(chunk) {
@@ -747,11 +745,12 @@ module.exports = function ($$$config) {
747
745
  (chunk.status = "rejected"), (chunk.reason = error);
748
746
  }
749
747
  }
750
- function reportGlobalError(response, error) {
751
- response._closed = !0;
752
- response._closedReason = error;
753
- response._chunks.forEach(function (chunk) {
754
- "pending" === chunk.status && triggerErrorOnChunk(chunk, error);
748
+ function reportGlobalError(weakResponse, error) {
749
+ weakResponse._closed = !0;
750
+ weakResponse._closedReason = error;
751
+ weakResponse._chunks.forEach(function (chunk) {
752
+ "pending" === chunk.status &&
753
+ triggerErrorOnChunk(weakResponse, chunk, error);
755
754
  });
756
755
  }
757
756
  function createLazyChunkWrapper(chunk) {
@@ -842,14 +841,15 @@ module.exports = function ($$$config) {
842
841
  null !== parentObject && wakeChunk(parentObject, handler.value)));
843
842
  }
844
843
  function rejectReference(reference, error) {
845
- reference = reference.handler;
846
- reference.errored ||
847
- ((reference.errored = !0),
848
- (reference.value = error),
849
- (reference = reference.chunk),
850
- null !== reference &&
851
- "blocked" === reference.status &&
852
- triggerErrorOnChunk(reference, error));
844
+ var handler = reference.handler;
845
+ reference = reference.response;
846
+ handler.errored ||
847
+ ((handler.errored = !0),
848
+ (handler.value = error),
849
+ (handler = handler.chunk),
850
+ null !== handler &&
851
+ "blocked" === handler.status &&
852
+ triggerErrorOnChunk(reference, handler, error));
853
853
  }
854
854
  function waitForReference(
855
855
  referencedChunk,
@@ -966,7 +966,7 @@ module.exports = function ($$$config) {
966
966
  var chunk = handler.chunk;
967
967
  null !== chunk &&
968
968
  "blocked" === chunk.status &&
969
- triggerErrorOnChunk(chunk, error);
969
+ triggerErrorOnChunk(response, chunk, error);
970
970
  }
971
971
  }
972
972
  );
@@ -1252,24 +1252,24 @@ module.exports = function ($$$config) {
1252
1252
  response._nonce,
1253
1253
  model
1254
1254
  );
1255
- if ((response = preloadModule(clientReference))) {
1255
+ if ((model = preloadModule(clientReference))) {
1256
1256
  if (chunk) {
1257
1257
  var blockedChunk = chunk;
1258
1258
  blockedChunk.status = "blocked";
1259
1259
  } else
1260
1260
  (blockedChunk = new ReactPromise("blocked", null, null)),
1261
1261
  chunks.set(id, blockedChunk);
1262
- response.then(
1262
+ model.then(
1263
1263
  function () {
1264
- return resolveModuleChunk(blockedChunk, clientReference);
1264
+ return resolveModuleChunk(response, blockedChunk, clientReference);
1265
1265
  },
1266
1266
  function (error) {
1267
- return triggerErrorOnChunk(blockedChunk, error);
1267
+ return triggerErrorOnChunk(response, blockedChunk, error);
1268
1268
  }
1269
1269
  );
1270
1270
  } else
1271
1271
  chunk
1272
- ? resolveModuleChunk(chunk, clientReference)
1272
+ ? resolveModuleChunk(response, chunk, clientReference)
1273
1273
  : chunks.set(
1274
1274
  id,
1275
1275
  new ReactPromise("resolved_module", clientReference, null)
@@ -1456,7 +1456,7 @@ module.exports = function ($$$config) {
1456
1456
  nextWriteIndex < buffer.length;
1457
1457
 
1458
1458
  )
1459
- triggerErrorOnChunk(buffer[nextWriteIndex++], error);
1459
+ triggerErrorOnChunk(response, buffer[nextWriteIndex++], error);
1460
1460
  }
1461
1461
  }
1462
1462
  );
@@ -1574,7 +1574,7 @@ module.exports = function ($$$config) {
1574
1574
  tag = response._chunks;
1575
1575
  var chunk = tag.get(id);
1576
1576
  chunk
1577
- ? triggerErrorOnChunk(chunk, row)
1577
+ ? triggerErrorOnChunk(response, chunk, row)
1578
1578
  : tag.set(id, createErrorChunk(response, row));
1579
1579
  break;
1580
1580
  case 84:
@@ -1611,7 +1611,7 @@ module.exports = function ($$$config) {
1611
1611
  row.stack = "Error: " + row.message;
1612
1612
  tag = response._chunks;
1613
1613
  (chunk = tag.get(id))
1614
- ? triggerErrorOnChunk(chunk, row)
1614
+ ? triggerErrorOnChunk(response, chunk, row)
1615
1615
  : tag.set(id, createErrorChunk(response, row));
1616
1616
  break;
1617
1617
  default:
@@ -1719,8 +1719,8 @@ module.exports = function ($$$config) {
1719
1719
  }
1720
1720
  };
1721
1721
  var initializingHandler = null;
1722
- exports.close = function (response) {
1723
- reportGlobalError(response, Error(formatProdErrorMessage(412)));
1722
+ exports.close = function (weakResponse) {
1723
+ reportGlobalError(weakResponse, Error(formatProdErrorMessage(412)));
1724
1724
  };
1725
1725
  exports.createResponse = function (
1726
1726
  bundlerConfig,
@@ -1731,7 +1731,7 @@ module.exports = function ($$$config) {
1731
1731
  nonce,
1732
1732
  temporaryReferences
1733
1733
  ) {
1734
- return new ResponseInstance(
1734
+ bundlerConfig = new ResponseInstance(
1735
1735
  bundlerConfig,
1736
1736
  serverReferenceConfig,
1737
1737
  moduleLoading,
@@ -1740,9 +1740,10 @@ module.exports = function ($$$config) {
1740
1740
  nonce,
1741
1741
  temporaryReferences
1742
1742
  );
1743
+ return bundlerConfig;
1743
1744
  };
1744
- exports.getRoot = function (response) {
1745
- return getChunk(response, 0);
1745
+ exports.getRoot = function (weakResponse) {
1746
+ return getChunk(weakResponse, 0);
1746
1747
  };
1747
1748
  exports.injectIntoDevTools = function () {
1748
1749
  var JSCompiler_inline_result = {
@@ -1750,7 +1751,7 @@ module.exports = function ($$$config) {
1750
1751
  version: rendererVersion,
1751
1752
  rendererPackageName: rendererPackageName,
1752
1753
  currentDispatcherRef: ReactSharedInternals,
1753
- reconcilerVersion: "19.2.0-experimental-455424db-20250704",
1754
+ reconcilerVersion: "19.2.0-experimental-60b5271a-20250709",
1754
1755
  getCurrentComponentInfo: getCurrentOwnerInDEV
1755
1756
  };
1756
1757
  if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
@@ -1768,14 +1769,14 @@ module.exports = function ($$$config) {
1768
1769
  }
1769
1770
  return JSCompiler_inline_result;
1770
1771
  };
1771
- exports.processBinaryChunk = function (response, chunk) {
1772
+ exports.processBinaryChunk = function (weakResponse, chunk) {
1772
1773
  for (
1773
1774
  var i = 0,
1774
- rowState = response._rowState,
1775
- rowID = response._rowID,
1776
- rowTag = response._rowTag,
1777
- rowLength = response._rowLength,
1778
- buffer = response._buffer,
1775
+ rowState = weakResponse._rowState,
1776
+ rowID = weakResponse._rowID,
1777
+ rowTag = weakResponse._rowTag,
1778
+ rowLength = weakResponse._rowLength,
1779
+ buffer = weakResponse._buffer,
1779
1780
  chunkLength = chunk.length;
1780
1781
  i < chunkLength;
1781
1782
 
@@ -1830,7 +1831,7 @@ module.exports = function ($$$config) {
1830
1831
  var offset = chunk.byteOffset + i;
1831
1832
  if (-1 < lastIdx)
1832
1833
  (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
1833
- processFullBinaryRow(response, rowID, rowTag, buffer, rowLength),
1834
+ processFullBinaryRow(weakResponse, rowID, rowTag, buffer, rowLength),
1834
1835
  (i = lastIdx),
1835
1836
  3 === rowState && i++,
1836
1837
  (rowLength = rowID = rowTag = rowState = 0),
@@ -1842,19 +1843,19 @@ module.exports = function ($$$config) {
1842
1843
  break;
1843
1844
  }
1844
1845
  }
1845
- response._rowState = rowState;
1846
- response._rowID = rowID;
1847
- response._rowTag = rowTag;
1848
- response._rowLength = rowLength;
1846
+ weakResponse._rowState = rowState;
1847
+ weakResponse._rowID = rowID;
1848
+ weakResponse._rowTag = rowTag;
1849
+ weakResponse._rowLength = rowLength;
1849
1850
  };
1850
- exports.processStringChunk = function (response, chunk) {
1851
+ exports.processStringChunk = function (weakResponse, chunk) {
1851
1852
  for (
1852
1853
  var i = 0,
1853
- rowState = response._rowState,
1854
- rowID = response._rowID,
1855
- rowTag = response._rowTag,
1856
- rowLength = response._rowLength,
1857
- buffer = response._buffer,
1854
+ rowState = weakResponse._rowState,
1855
+ rowID = weakResponse._rowID,
1856
+ rowTag = weakResponse._rowTag,
1857
+ rowLength = weakResponse._rowLength,
1858
+ buffer = weakResponse._buffer,
1858
1859
  chunkLength = chunk.length;
1859
1860
  i < chunkLength;
1860
1861
 
@@ -1911,17 +1912,17 @@ module.exports = function ($$$config) {
1911
1912
  if (-1 < lastIdx) {
1912
1913
  if (0 < buffer.length) throw Error(formatProdErrorMessage(540));
1913
1914
  i = chunk.slice(i, lastIdx);
1914
- processFullStringRow(response, rowID, rowTag, i);
1915
+ processFullStringRow(weakResponse, rowID, rowTag, i);
1915
1916
  i = lastIdx;
1916
1917
  3 === rowState && i++;
1917
1918
  rowLength = rowID = rowTag = rowState = 0;
1918
1919
  buffer.length = 0;
1919
1920
  } else if (chunk.length !== i) throw Error(formatProdErrorMessage(540));
1920
1921
  }
1921
- response._rowState = rowState;
1922
- response._rowID = rowID;
1923
- response._rowTag = rowTag;
1924
- response._rowLength = rowLength;
1922
+ weakResponse._rowState = rowState;
1923
+ weakResponse._rowID = rowID;
1924
+ weakResponse._rowTag = rowTag;
1925
+ weakResponse._rowLength = rowLength;
1925
1926
  };
1926
1927
  exports.reportGlobalError = reportGlobalError;
1927
1928
  return exports;
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-455424db-20250704",
4
+ "version": "0.0.0-experimental-60b5271a-20250709",
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-455424db-20250704"
26
+ "react": "0.0.0-experimental-60b5271a-20250709"
27
27
  }
28
28
  }