@matthamlin/react-client 0.0.0-experimental-e1dc0349-20250617 → 0.0.0-experimental-2a911f27-20250623

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.
@@ -11,27 +11,6 @@
11
11
  "use strict";
12
12
  "production" !== process.env.NODE_ENV &&
13
13
  ((module.exports = function ($$$config) {
14
- function _defineProperty(obj, key, value) {
15
- a: if ("object" == typeof key && key) {
16
- var e = key[Symbol.toPrimitive];
17
- if (void 0 !== e) {
18
- key = e.call(key, "string");
19
- if ("object" != typeof key) break a;
20
- throw new TypeError("@@toPrimitive must return a primitive value.");
21
- }
22
- key = String(key);
23
- }
24
- key = "symbol" == typeof key ? key : key + "";
25
- key in obj
26
- ? Object.defineProperty(obj, key, {
27
- value: value,
28
- enumerable: !0,
29
- configurable: !0,
30
- writable: !0
31
- })
32
- : (obj[key] = value);
33
- return obj;
34
- }
35
14
  function getIteratorFn(maybeIterable) {
36
15
  if (null === maybeIterable || "object" !== typeof maybeIterable)
37
16
  return null;
@@ -69,11 +48,8 @@
69
48
  return !0;
70
49
  }
71
50
  function objectName(object) {
72
- return Object.prototype.toString
73
- .call(object)
74
- .replace(/^\[object (.*)\]$/, function (m, p0) {
75
- return p0;
76
- });
51
+ object = Object.prototype.toString.call(object);
52
+ return object.slice(8, object.length - 1);
77
53
  }
78
54
  function describeKeyForErrorMessage(key) {
79
55
  var encodedKey = JSON.stringify(key);
@@ -896,6 +872,102 @@
896
872
  registerBoundServerReference(action, id, bound, encodeFormAction);
897
873
  return action;
898
874
  }
875
+ function getArrayKind(array) {
876
+ for (var kind = 0, i = 0; i < array.length; i++) {
877
+ var value = array[i];
878
+ if ("object" === typeof value && null !== value)
879
+ if (
880
+ isArrayImpl(value) &&
881
+ 2 === value.length &&
882
+ "string" === typeof value[0]
883
+ ) {
884
+ if (0 !== kind && 3 !== kind) return 1;
885
+ kind = 3;
886
+ } else return 1;
887
+ else {
888
+ if (
889
+ "function" === typeof value ||
890
+ ("string" === typeof value && 50 < value.length) ||
891
+ (0 !== kind && 2 !== kind)
892
+ )
893
+ return 1;
894
+ kind = 2;
895
+ }
896
+ }
897
+ return kind;
898
+ }
899
+ function addObjectToProperties(object, properties, indent) {
900
+ for (var key in object)
901
+ hasOwnProperty.call(object, key) &&
902
+ "_" !== key[0] &&
903
+ addValueToProperties(key, object[key], properties, indent);
904
+ }
905
+ function addValueToProperties(propertyName, value, properties, indent) {
906
+ switch (typeof value) {
907
+ case "object":
908
+ if (null === value) {
909
+ value = "null";
910
+ break;
911
+ } else {
912
+ var objectToString = Object.prototype.toString.call(value);
913
+ objectToString = objectToString.slice(8, objectToString.length - 1);
914
+ if ("Array" === objectToString) {
915
+ var kind = getArrayKind(value);
916
+ if (2 === kind || 0 === kind) {
917
+ value = JSON.stringify(value);
918
+ break;
919
+ } else if (3 === kind) {
920
+ properties.push([
921
+ "\u00a0\u00a0".repeat(indent) + propertyName,
922
+ ""
923
+ ]);
924
+ for (
925
+ propertyName = 0;
926
+ propertyName < value.length;
927
+ propertyName++
928
+ )
929
+ (objectToString = value[propertyName]),
930
+ addValueToProperties(
931
+ objectToString[0],
932
+ objectToString[1],
933
+ properties,
934
+ indent + 1
935
+ );
936
+ return;
937
+ }
938
+ }
939
+ "Object" === objectToString &&
940
+ (kind = Object.getPrototypeOf(value)) &&
941
+ "function" === typeof kind.constructor &&
942
+ (objectToString = kind.constructor.name);
943
+ properties.push([
944
+ "\u00a0\u00a0".repeat(indent) + propertyName,
945
+ "Object" === objectToString ? "" : objectToString
946
+ ]);
947
+ 3 > indent && addObjectToProperties(value, properties, indent + 1);
948
+ return;
949
+ }
950
+ case "function":
951
+ value = "" === value.name ? "() => {}" : value.name + "() {}";
952
+ break;
953
+ case "string":
954
+ value =
955
+ "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." ===
956
+ value
957
+ ? "..."
958
+ : JSON.stringify(value);
959
+ break;
960
+ case "undefined":
961
+ value = "undefined";
962
+ break;
963
+ case "boolean":
964
+ value = value ? "true" : "false";
965
+ break;
966
+ default:
967
+ value = String(value);
968
+ }
969
+ properties.push(["\u00a0\u00a0".repeat(indent) + propertyName, value]);
970
+ }
899
971
  function getIOColor(functionName) {
900
972
  switch (functionName.charCodeAt(0) % 3) {
901
973
  case 0:
@@ -906,6 +978,133 @@
906
978
  return "tertiary-dark";
907
979
  }
908
980
  }
981
+ function logComponentAwait(
982
+ asyncInfo,
983
+ trackIdx,
984
+ startTime,
985
+ endTime,
986
+ rootEnv,
987
+ value
988
+ ) {
989
+ if (supportsUserTiming && 0 < endTime) {
990
+ var env = asyncInfo.env,
991
+ name = asyncInfo.awaited.name,
992
+ isPrimaryEnv = env === rootEnv;
993
+ rootEnv = getIOColor(name);
994
+ env =
995
+ "await " +
996
+ (isPrimaryEnv || void 0 === env ? name : name + " [" + env + "]");
997
+ (asyncInfo = asyncInfo.debugTask)
998
+ ? ((name = []),
999
+ "object" === typeof value && null !== value
1000
+ ? addObjectToProperties(value, name, 0)
1001
+ : void 0 !== value &&
1002
+ addValueToProperties("Resolved", value, name, 0),
1003
+ asyncInfo.run(
1004
+ performance.measure.bind(performance, env, {
1005
+ start: 0 > startTime ? 0 : startTime,
1006
+ end: endTime,
1007
+ detail: {
1008
+ devtools: {
1009
+ color: rootEnv,
1010
+ track: trackNames[trackIdx],
1011
+ trackGroup: "Server Components \u269b",
1012
+ properties: name
1013
+ }
1014
+ }
1015
+ })
1016
+ ))
1017
+ : console.timeStamp(
1018
+ env,
1019
+ 0 > startTime ? 0 : startTime,
1020
+ endTime,
1021
+ trackNames[trackIdx],
1022
+ "Server Components \u269b",
1023
+ rootEnv
1024
+ );
1025
+ }
1026
+ }
1027
+ function logIOInfoErrored(ioInfo, rootEnv, error) {
1028
+ var startTime = ioInfo.start,
1029
+ endTime = ioInfo.end;
1030
+ if (supportsUserTiming && 0 <= endTime) {
1031
+ var name = ioInfo.name,
1032
+ env = ioInfo.env;
1033
+ rootEnv =
1034
+ env === rootEnv || void 0 === env ? name : name + " [" + env + "]";
1035
+ (ioInfo = ioInfo.debugTask)
1036
+ ? ioInfo.run(
1037
+ performance.measure.bind(performance, rootEnv, {
1038
+ start: 0 > startTime ? 0 : startTime,
1039
+ end: endTime,
1040
+ detail: {
1041
+ devtools: {
1042
+ color: "error",
1043
+ track: "Server Requests \u269b",
1044
+ properties: [
1045
+ [
1046
+ "Rejected",
1047
+ "object" === typeof error &&
1048
+ null !== error &&
1049
+ "string" === typeof error.message
1050
+ ? String(error.message)
1051
+ : String(error)
1052
+ ]
1053
+ ],
1054
+ tooltipText: rootEnv + " Rejected"
1055
+ }
1056
+ }
1057
+ })
1058
+ )
1059
+ : console.timeStamp(
1060
+ rootEnv,
1061
+ 0 > startTime ? 0 : startTime,
1062
+ endTime,
1063
+ "Server Requests \u269b",
1064
+ void 0,
1065
+ "error"
1066
+ );
1067
+ }
1068
+ }
1069
+ function logIOInfo(ioInfo, rootEnv, value) {
1070
+ var startTime = ioInfo.start,
1071
+ endTime = ioInfo.end;
1072
+ if (supportsUserTiming && 0 <= endTime) {
1073
+ var name = ioInfo.name,
1074
+ env = ioInfo.env;
1075
+ rootEnv =
1076
+ env === rootEnv || void 0 === env ? name : name + " [" + env + "]";
1077
+ ioInfo = ioInfo.debugTask;
1078
+ name = getIOColor(name);
1079
+ ioInfo
1080
+ ? ((env = []),
1081
+ "object" === typeof value && null !== value
1082
+ ? addObjectToProperties(value, env, 0)
1083
+ : void 0 !== value &&
1084
+ addValueToProperties("Resolved", value, env, 0),
1085
+ ioInfo.run(
1086
+ performance.measure.bind(performance, rootEnv, {
1087
+ start: 0 > startTime ? 0 : startTime,
1088
+ end: endTime,
1089
+ detail: {
1090
+ devtools: {
1091
+ color: name,
1092
+ track: "Server Requests \u269b",
1093
+ properties: env
1094
+ }
1095
+ }
1096
+ })
1097
+ ))
1098
+ : console.timeStamp(
1099
+ rootEnv,
1100
+ 0 > startTime ? 0 : startTime,
1101
+ endTime,
1102
+ "Server Requests \u269b",
1103
+ void 0,
1104
+ name
1105
+ );
1106
+ }
1107
+ }
909
1108
  function getComponentNameFromType(type) {
910
1109
  if (null == type) return null;
911
1110
  if ("function" === typeof type)
@@ -987,6 +1186,7 @@
987
1186
  return chunk.value;
988
1187
  case "pending":
989
1188
  case "blocked":
1189
+ case "halted":
990
1190
  throw chunk;
991
1191
  default:
992
1192
  throw chunk.reason;
@@ -1273,6 +1473,7 @@
1273
1473
  deps: 1,
1274
1474
  errored: !1
1275
1475
  };
1476
+ fulfill.isReactInternalListener = !0;
1276
1477
  referencedChunk.then(fulfill, reject);
1277
1478
  return null;
1278
1479
  }
@@ -1433,6 +1634,7 @@
1433
1634
  return response;
1434
1635
  case "pending":
1435
1636
  case "blocked":
1637
+ case "halted":
1436
1638
  return waitForReference(
1437
1639
  id,
1438
1640
  parentObject,
@@ -1472,6 +1674,9 @@
1472
1674
  response.append(model[i][0], model[i][1]);
1473
1675
  return response;
1474
1676
  }
1677
+ function applyConstructor(response, model, parentObject) {
1678
+ Object.setPrototypeOf(parentObject, model.prototype);
1679
+ }
1475
1680
  function extractIterator(response, model) {
1476
1681
  return model[Symbol.iterator]();
1477
1682
  }
@@ -1506,13 +1711,14 @@
1506
1711
  createLazyChunkWrapper(response)
1507
1712
  );
1508
1713
  case "@":
1509
- if (2 === value.length) return new Promise(function () {});
1510
- parentObject = parseInt(value.slice(2), 16);
1511
- response = getChunk(response, parentObject);
1512
- null !== initializingChunk &&
1513
- isArrayImpl(initializingChunk._children) &&
1514
- initializingChunk._children.push(response);
1515
- return response;
1714
+ return (
1715
+ (parentObject = parseInt(value.slice(2), 16)),
1716
+ (response = getChunk(response, parentObject)),
1717
+ null !== initializingChunk &&
1718
+ isArrayImpl(initializingChunk._children) &&
1719
+ initializingChunk._children.push(response),
1720
+ response
1721
+ );
1516
1722
  case "S":
1517
1723
  return Symbol.for(value.slice(2));
1518
1724
  case "F":
@@ -1594,10 +1800,54 @@
1594
1800
  return new Date(Date.parse(value.slice(2)));
1595
1801
  case "n":
1596
1802
  return BigInt(value.slice(2));
1803
+ case "P":
1804
+ return (
1805
+ (value = value.slice(2)),
1806
+ getOutlinedModel(
1807
+ response,
1808
+ value,
1809
+ parentObject,
1810
+ key,
1811
+ applyConstructor
1812
+ )
1813
+ );
1597
1814
  case "E":
1815
+ response = value.slice(2);
1598
1816
  try {
1599
- return (0, eval)(value.slice(2));
1817
+ return (0, eval)(response);
1600
1818
  } catch (x) {
1819
+ if (response.startsWith("(async function")) {
1820
+ if (
1821
+ ((parentObject = response.indexOf("(", 15)),
1822
+ -1 !== parentObject)
1823
+ )
1824
+ return (
1825
+ (response = response.slice(15, parentObject).trim()),
1826
+ (0, eval)(
1827
+ "({" + JSON.stringify(response) + ":async function(){}})"
1828
+ )[response]
1829
+ );
1830
+ } else if (response.startsWith("(function")) {
1831
+ if (
1832
+ ((parentObject = response.indexOf("(", 9)),
1833
+ -1 !== parentObject)
1834
+ )
1835
+ return (
1836
+ (response = response.slice(9, parentObject).trim()),
1837
+ (0, eval)(
1838
+ "({" + JSON.stringify(response) + ":function(){}})"
1839
+ )[response]
1840
+ );
1841
+ } else if (
1842
+ response.startsWith("(class") &&
1843
+ ((parentObject = response.indexOf("{", 6)), -1 !== parentObject)
1844
+ )
1845
+ return (
1846
+ (response = response.slice(6, parentObject).trim()),
1847
+ (0, eval)("({" + JSON.stringify(response) + ":class{}})")[
1848
+ response
1849
+ ]
1850
+ );
1601
1851
  return function () {};
1602
1852
  }
1603
1853
  case "Y":
@@ -1670,6 +1920,16 @@
1670
1920
  this._rootEnvironmentName = environmentName;
1671
1921
  this._fromJSON = createFromJSONCallback(this);
1672
1922
  }
1923
+ function resolveDebugHalt(response, id) {
1924
+ var chunks = response._chunks,
1925
+ chunk = chunks.get(id);
1926
+ chunk || chunks.set(id, (chunk = createPendingChunk(response)));
1927
+ if ("pending" === chunk.status || "blocked" === chunk.status)
1928
+ (response = chunk),
1929
+ (response.status = "halted"),
1930
+ (response.value = null),
1931
+ (response.reason = null);
1932
+ }
1673
1933
  function resolveModel(response, id, model) {
1674
1934
  var chunks = response._chunks,
1675
1935
  chunk = chunks.get(id);
@@ -1839,26 +2099,27 @@
1839
2099
  var buffer = [],
1840
2100
  closed = !1,
1841
2101
  nextWriteIndex = 0,
1842
- iterable = _defineProperty({}, ASYNC_ITERATOR, function () {
1843
- var nextReadIndex = 0;
1844
- return createIterator(function (arg) {
1845
- if (void 0 !== arg)
1846
- throw Error(
1847
- "Values cannot be passed to next() of AsyncIterables passed to Client Components."
2102
+ iterable = {};
2103
+ iterable[ASYNC_ITERATOR] = function () {
2104
+ var nextReadIndex = 0;
2105
+ return createIterator(function (arg) {
2106
+ if (void 0 !== arg)
2107
+ throw Error(
2108
+ "Values cannot be passed to next() of AsyncIterables passed to Client Components."
2109
+ );
2110
+ if (nextReadIndex === buffer.length) {
2111
+ if (closed)
2112
+ return new ReactPromise(
2113
+ "fulfilled",
2114
+ { done: !0, value: void 0 },
2115
+ null,
2116
+ response
1848
2117
  );
1849
- if (nextReadIndex === buffer.length) {
1850
- if (closed)
1851
- return new ReactPromise(
1852
- "fulfilled",
1853
- { done: !0, value: void 0 },
1854
- null,
1855
- response
1856
- );
1857
- buffer[nextReadIndex] = createPendingChunk(response);
1858
- }
1859
- return buffer[nextReadIndex++];
1860
- });
2118
+ buffer[nextReadIndex] = createPendingChunk(response);
2119
+ }
2120
+ return buffer[nextReadIndex++];
1861
2121
  });
2122
+ };
1862
2123
  resolveStream(
1863
2124
  response,
1864
2125
  id,
@@ -2271,38 +2532,23 @@
2271
2532
  initializeFakeStack(response, ioInfo));
2272
2533
  ioInfo.start += response._timeOrigin;
2273
2534
  ioInfo.end += response._timeOrigin;
2274
- var startTime = ioInfo.start,
2275
- endTime = ioInfo.end;
2276
- if (supportsUserTiming && 0 <= endTime) {
2277
- var name = ioInfo.name,
2278
- env = ioInfo.env;
2279
- response =
2280
- env === response._rootEnvironmentName || void 0 === env
2281
- ? name
2282
- : name + " [" + env + "]";
2283
- ioInfo = ioInfo.debugTask;
2284
- name = getIOColor(name);
2285
- ioInfo
2286
- ? ioInfo.run(
2287
- console.timeStamp.bind(
2288
- console,
2289
- response,
2290
- 0 > startTime ? 0 : startTime,
2291
- endTime,
2292
- "Server Requests \u269b",
2293
- void 0,
2294
- name
2295
- )
2296
- )
2297
- : console.timeStamp(
2298
- response,
2299
- 0 > startTime ? 0 : startTime,
2300
- endTime,
2301
- "Server Requests \u269b",
2302
- void 0,
2303
- name
2535
+ response = response._rootEnvironmentName;
2536
+ var promise = ioInfo.value;
2537
+ if (promise)
2538
+ switch (promise.status) {
2539
+ case "fulfilled":
2540
+ logIOInfo(ioInfo, response, promise.value);
2541
+ break;
2542
+ case "rejected":
2543
+ logIOInfoErrored(ioInfo, response, promise.reason);
2544
+ break;
2545
+ default:
2546
+ promise.then(
2547
+ logIOInfo.bind(null, ioInfo, response),
2548
+ logIOInfoErrored.bind(null, ioInfo, response)
2304
2549
  );
2305
- }
2550
+ }
2551
+ else logIOInfo(ioInfo, response, void 0);
2306
2552
  }
2307
2553
  function resolveIOInfo(response, id, model) {
2308
2554
  var chunks = response._chunks,
@@ -2455,8 +2701,8 @@
2455
2701
  childResult > componentInfo && (componentInfo = childResult);
2456
2702
  }
2457
2703
  if (previousEndTime) {
2458
- var componentEndTime = 0,
2459
- isLastComponent = !0;
2704
+ var componentEndTime = 0;
2705
+ _i4 = !0;
2460
2706
  info = parentEndTime = -1;
2461
2707
  for (
2462
2708
  entryName = previousEndTime.length - 1;
@@ -2472,74 +2718,64 @@
2472
2718
  if (-1 < info)
2473
2719
  for (--info; info > entryName; info--)
2474
2720
  if (
2475
- ((_i4 = previousEndTime[info]), "string" === typeof _i4.name)
2721
+ ((childResult = previousEndTime[info]),
2722
+ "string" === typeof childResult.name)
2476
2723
  ) {
2477
2724
  componentEndTime > componentInfo &&
2478
2725
  (componentInfo = componentEndTime);
2479
- var response = response$jscomp$0;
2480
- childResult = _i4;
2481
- var trackIdx$jscomp$0 = trackIdx$jscomp$1,
2726
+ var response = response$jscomp$0,
2727
+ componentInfo$jscomp$0 = childResult,
2728
+ trackIdx$jscomp$0 = trackIdx$jscomp$1,
2482
2729
  startTime = trackTime,
2483
2730
  componentEndTime$jscomp$0 = componentEndTime,
2484
2731
  childrenEndTime = componentInfo;
2485
- isLastComponent &&
2732
+ _i4 &&
2486
2733
  "rejected" === root.status &&
2487
2734
  root.reason !== response._closedReason
2488
- ? ((isLastComponent = trackIdx$jscomp$0),
2489
- (componentEndTime = startTime),
2490
- (componentEndTime$jscomp$0 = childrenEndTime),
2491
- (childrenEndTime = root.reason),
2735
+ ? ((_i4 = root.reason),
2492
2736
  supportsUserTiming &&
2493
- ((startTime = childResult.env),
2494
- (childResult = childResult.name),
2495
- (childResult =
2496
- startTime === response._rootEnvironmentName ||
2497
- void 0 === startTime
2498
- ? childResult
2499
- : childResult + " [" + startTime + "]"),
2500
- "undefined" !== typeof performance &&
2501
- "function" === typeof performance.measure
2502
- ? performance.measure(childResult, {
2503
- start:
2504
- 0 > componentEndTime ? 0 : componentEndTime,
2505
- end: componentEndTime$jscomp$0,
2506
- detail: {
2507
- devtools: {
2508
- color: "error",
2509
- track: trackNames[isLastComponent],
2510
- trackGroup: "Server Components \u269b",
2511
- tooltipText: childResult + " Errored",
2512
- properties: [
2513
- [
2514
- "Error",
2515
- "object" === typeof childrenEndTime &&
2516
- null !== childrenEndTime &&
2517
- "string" ===
2518
- typeof childrenEndTime.message
2519
- ? String(childrenEndTime.message)
2520
- : String(childrenEndTime)
2521
- ]
2522
- ]
2523
- }
2524
- }
2525
- })
2526
- : console.timeStamp(
2527
- childResult,
2528
- 0 > componentEndTime ? 0 : componentEndTime,
2529
- componentEndTime$jscomp$0,
2530
- trackNames[isLastComponent],
2531
- "Server Components \u269b",
2532
- "error"
2533
- )))
2534
- : ((isLastComponent = trackIdx$jscomp$0),
2737
+ ((componentEndTime = componentInfo$jscomp$0.env),
2738
+ (componentInfo$jscomp$0 = componentInfo$jscomp$0.name),
2739
+ (componentEndTime =
2740
+ componentEndTime === response._rootEnvironmentName ||
2741
+ void 0 === componentEndTime
2742
+ ? componentInfo$jscomp$0
2743
+ : componentInfo$jscomp$0 +
2744
+ " [" +
2745
+ componentEndTime +
2746
+ "]"),
2747
+ performance.measure(componentEndTime, {
2748
+ start: 0 > startTime ? 0 : startTime,
2749
+ end: childrenEndTime,
2750
+ detail: {
2751
+ devtools: {
2752
+ color: "error",
2753
+ track: trackNames[trackIdx$jscomp$0],
2754
+ trackGroup: "Server Components \u269b",
2755
+ tooltipText: componentEndTime + " Errored",
2756
+ properties: [
2757
+ [
2758
+ "Error",
2759
+ "object" === typeof _i4 &&
2760
+ null !== _i4 &&
2761
+ "string" === typeof _i4.message
2762
+ ? String(_i4.message)
2763
+ : String(_i4)
2764
+ ]
2765
+ ]
2766
+ }
2767
+ }
2768
+ })))
2769
+ : ((_i4 = trackIdx$jscomp$0),
2535
2770
  (componentEndTime = startTime),
2771
+ (startTime = childrenEndTime),
2536
2772
  supportsUserTiming &&
2537
- 0 <= childrenEndTime &&
2538
- 10 > isLastComponent &&
2539
- ((startTime = childResult.env),
2540
- (trackIdx$jscomp$0 = childResult.name),
2773
+ 0 <= startTime &&
2774
+ 10 > _i4 &&
2775
+ ((childrenEndTime = componentInfo$jscomp$0.env),
2776
+ (trackIdx$jscomp$0 = componentInfo$jscomp$0.name),
2541
2777
  (response =
2542
- startTime === response._rootEnvironmentName),
2778
+ childrenEndTime === response._rootEnvironmentName),
2543
2779
  (componentEndTime$jscomp$0 -= componentEndTime),
2544
2780
  (componentEndTime$jscomp$0 =
2545
2781
  0.5 > componentEndTime$jscomp$0
@@ -2556,17 +2792,18 @@
2556
2792
  : "secondary-dark"
2557
2793
  : "error"),
2558
2794
  (response =
2559
- response || void 0 === startTime
2795
+ response || void 0 === childrenEndTime
2560
2796
  ? trackIdx$jscomp$0
2561
- : trackIdx$jscomp$0 + " [" + startTime + "]"),
2562
- (childResult = childResult.debugTask)
2563
- ? childResult.run(
2797
+ : trackIdx$jscomp$0 + " [" + childrenEndTime + "]"),
2798
+ (componentInfo$jscomp$0 =
2799
+ componentInfo$jscomp$0.debugTask)
2800
+ ? componentInfo$jscomp$0.run(
2564
2801
  console.timeStamp.bind(
2565
2802
  console,
2566
2803
  response,
2567
2804
  0 > componentEndTime ? 0 : componentEndTime,
2568
- childrenEndTime,
2569
- trackNames[isLastComponent],
2805
+ startTime,
2806
+ trackNames[_i4],
2570
2807
  "Server Components \u269b",
2571
2808
  componentEndTime$jscomp$0
2572
2809
  )
@@ -2574,55 +2811,113 @@
2574
2811
  : console.timeStamp(
2575
2812
  response,
2576
2813
  0 > componentEndTime ? 0 : componentEndTime,
2577
- childrenEndTime,
2578
- trackNames[isLastComponent],
2814
+ startTime,
2815
+ trackNames[_i4],
2579
2816
  "Server Components \u269b",
2580
2817
  componentEndTime$jscomp$0
2581
2818
  )));
2582
2819
  componentEndTime = trackTime;
2583
- trackIdx.component = _i4;
2584
- isLastComponent = !1;
2585
- } else if (
2586
- _i4.awaited &&
2587
- (parentEndTime > componentInfo &&
2588
- (componentInfo = parentEndTime),
2589
- (childrenEndTime = _i4),
2590
- (_i4 = trackIdx$jscomp$1),
2591
- (childResult = trackTime),
2592
- (response = parentEndTime),
2593
- supportsUserTiming && 0 < response)
2594
- ) {
2595
- startTime = childrenEndTime.env;
2596
- trackIdx$jscomp$0 = childrenEndTime.awaited.name;
2597
- var isPrimaryEnv =
2598
- startTime === response$jscomp$0._rootEnvironmentName;
2599
- componentEndTime$jscomp$0 = getIOColor(trackIdx$jscomp$0);
2600
- startTime =
2601
- "await " +
2602
- (isPrimaryEnv || void 0 === startTime
2603
- ? trackIdx$jscomp$0
2604
- : trackIdx$jscomp$0 + " [" + startTime + "]");
2605
- (childrenEndTime = childrenEndTime.debugTask)
2606
- ? childrenEndTime.run(
2607
- console.timeStamp.bind(
2608
- console,
2609
- startTime,
2610
- 0 > childResult ? 0 : childResult,
2611
- response,
2612
- trackNames[_i4],
2613
- "Server Components \u269b",
2614
- componentEndTime$jscomp$0
2615
- )
2616
- )
2617
- : console.timeStamp(
2618
- startTime,
2619
- 0 > childResult ? 0 : childResult,
2620
- response,
2621
- trackNames[_i4],
2622
- "Server Components \u269b",
2623
- componentEndTime$jscomp$0
2624
- );
2625
- }
2820
+ trackIdx.component = childResult;
2821
+ _i4 = !1;
2822
+ } else if (childResult.awaited)
2823
+ if (
2824
+ (parentEndTime > componentInfo &&
2825
+ (componentInfo = parentEndTime),
2826
+ (componentEndTime$jscomp$0 =
2827
+ response$jscomp$0._rootEnvironmentName),
2828
+ (componentInfo$jscomp$0 = childResult.awaited.value))
2829
+ )
2830
+ switch (
2831
+ ((childrenEndTime = componentInfo$jscomp$0),
2832
+ childrenEndTime.status)
2833
+ ) {
2834
+ case "fulfilled":
2835
+ logComponentAwait(
2836
+ childResult,
2837
+ trackIdx$jscomp$1,
2838
+ trackTime,
2839
+ parentEndTime,
2840
+ componentEndTime$jscomp$0,
2841
+ childrenEndTime.value
2842
+ );
2843
+ break;
2844
+ case "rejected":
2845
+ componentInfo$jscomp$0 = trackIdx$jscomp$1;
2846
+ response = trackTime;
2847
+ startTime = parentEndTime;
2848
+ childrenEndTime = childrenEndTime.reason;
2849
+ if (supportsUserTiming && 0 < startTime) {
2850
+ trackIdx$jscomp$0 = childResult.env;
2851
+ var name = childResult.awaited.name;
2852
+ componentEndTime$jscomp$0 =
2853
+ "await " +
2854
+ (trackIdx$jscomp$0 === componentEndTime$jscomp$0 ||
2855
+ void 0 === trackIdx$jscomp$0
2856
+ ? name
2857
+ : name + " [" + trackIdx$jscomp$0 + "]");
2858
+ (childResult = childResult.debugTask)
2859
+ ? childResult.run(
2860
+ performance.measure.bind(
2861
+ performance,
2862
+ componentEndTime$jscomp$0,
2863
+ {
2864
+ start: 0 > response ? 0 : response,
2865
+ end: startTime,
2866
+ detail: {
2867
+ devtools: {
2868
+ color: "error",
2869
+ track:
2870
+ trackNames[componentInfo$jscomp$0],
2871
+ trackGroup: "Server Components \u269b",
2872
+ properties: [
2873
+ [
2874
+ "Rejected",
2875
+ "object" ===
2876
+ typeof childrenEndTime &&
2877
+ null !== childrenEndTime &&
2878
+ "string" ===
2879
+ typeof childrenEndTime.message
2880
+ ? String(childrenEndTime.message)
2881
+ : String(childrenEndTime)
2882
+ ]
2883
+ ],
2884
+ tooltipText:
2885
+ componentEndTime$jscomp$0 +
2886
+ " Rejected"
2887
+ }
2888
+ }
2889
+ }
2890
+ )
2891
+ )
2892
+ : console.timeStamp(
2893
+ componentEndTime$jscomp$0,
2894
+ 0 > response ? 0 : response,
2895
+ startTime,
2896
+ trackNames[componentInfo$jscomp$0],
2897
+ "Server Components \u269b",
2898
+ "error"
2899
+ );
2900
+ }
2901
+ break;
2902
+ default:
2903
+ logComponentAwait(
2904
+ childResult,
2905
+ trackIdx$jscomp$1,
2906
+ trackTime,
2907
+ parentEndTime,
2908
+ componentEndTime$jscomp$0,
2909
+ void 0
2910
+ );
2911
+ }
2912
+ else
2913
+ logComponentAwait(
2914
+ childResult,
2915
+ trackIdx$jscomp$1,
2916
+ trackTime,
2917
+ parentEndTime,
2918
+ componentEndTime$jscomp$0,
2919
+ void 0
2920
+ );
2626
2921
  parentEndTime = trackTime;
2627
2922
  info = entryName;
2628
2923
  }
@@ -2747,7 +3042,9 @@
2747
3042
  resolvePostponeDev(response, id, tag.reason, tag.stack, tag.env);
2748
3043
  break;
2749
3044
  default:
2750
- resolveModel(response, id, row);
3045
+ "" === row
3046
+ ? resolveDebugHalt(response, id)
3047
+ : resolveModel(response, id, row);
2751
3048
  }
2752
3049
  }
2753
3050
  function createFromJSONCallback(response) {
@@ -2898,9 +3195,12 @@
2898
3195
  fakeServerFunctionIdx = 0,
2899
3196
  FunctionBind = Function.prototype.bind,
2900
3197
  ArraySlice = Array.prototype.slice,
3198
+ hasOwnProperty = Object.prototype.hasOwnProperty,
2901
3199
  supportsUserTiming =
2902
3200
  "undefined" !== typeof console &&
2903
- "function" === typeof console.timeStamp,
3201
+ "function" === typeof console.timeStamp &&
3202
+ "undefined" !== typeof performance &&
3203
+ "function" === typeof performance.measure,
2904
3204
  trackNames =
2905
3205
  "Primary Parallel Parallel\u200b Parallel\u200b\u200b Parallel\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b Parallel\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b".split(
2906
3206
  " "
@@ -2924,19 +3224,21 @@
2924
3224
  case "resolved_module":
2925
3225
  initializeModuleChunk(this);
2926
3226
  }
2927
- var resolveCallback = resolve,
2928
- rejectCallback = reject,
2929
- wrapperPromise = new Promise(function (res, rej) {
2930
- resolve = function (value) {
2931
- wrapperPromise._debugInfo = _this._debugInfo;
2932
- res(value);
2933
- };
2934
- reject = function (reason) {
2935
- wrapperPromise._debugInfo = _this._debugInfo;
2936
- rej(reason);
2937
- };
2938
- });
2939
- wrapperPromise.then(resolveCallback, rejectCallback);
3227
+ if ("function" !== typeof resolve || !resolve.isReactInternalListener) {
3228
+ var resolveCallback = resolve,
3229
+ rejectCallback = reject,
3230
+ wrapperPromise = new Promise(function (res, rej) {
3231
+ resolve = function (value) {
3232
+ wrapperPromise._debugInfo = _this._debugInfo;
3233
+ res(value);
3234
+ };
3235
+ reject = function (reason) {
3236
+ wrapperPromise._debugInfo = _this._debugInfo;
3237
+ rej(reason);
3238
+ };
3239
+ });
3240
+ wrapperPromise.then(resolveCallback, rejectCallback);
3241
+ }
2940
3242
  switch (this.status) {
2941
3243
  case "fulfilled":
2942
3244
  resolve(this.value);
@@ -2950,6 +3252,8 @@
2950
3252
  (null === this.reason && (this.reason = []),
2951
3253
  this.reason.push(reject));
2952
3254
  break;
3255
+ case "halted":
3256
+ break;
2953
3257
  default:
2954
3258
  reject && reject(this.reason);
2955
3259
  }
@@ -3054,7 +3358,7 @@
3054
3358
  version: rendererVersion,
3055
3359
  rendererPackageName: rendererPackageName,
3056
3360
  currentDispatcherRef: ReactSharedInternals,
3057
- reconcilerVersion: "19.2.0-experimental-e1dc0349-20250617",
3361
+ reconcilerVersion: "19.2.0-experimental-2a911f27-20250623",
3058
3362
  getCurrentComponentInfo: getCurrentOwnerInDEV
3059
3363
  };
3060
3364
  if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
@@ -134,11 +134,11 @@ module.exports = function ($$$config) {
134
134
  0 === pendingParts && resolve(data);
135
135
  } else
136
136
  try {
137
- var partJSON$1 = JSON.stringify(entry.value, resolveToJSON);
138
- data.append(formFieldPrefix + streamId, partJSON$1);
137
+ var partJSON$0 = JSON.stringify(entry.value, resolveToJSON);
138
+ data.append(formFieldPrefix + streamId, partJSON$0);
139
139
  iterator.next().then(progress, reject);
140
- } catch (x$2) {
141
- reject(x$2);
140
+ } catch (x$1) {
141
+ reject(x$1);
142
142
  }
143
143
  }
144
144
  null === formData && (formData = new FormData());
@@ -181,20 +181,20 @@ module.exports = function ($$$config) {
181
181
  "function" === typeof x.then
182
182
  ) {
183
183
  pendingParts++;
184
- var lazyId$3 = nextPartId++;
184
+ var lazyId$2 = nextPartId++;
185
185
  parentReference = function () {
186
186
  try {
187
- var partJSON$4 = serializeModel(value, lazyId$3),
188
- data$5 = formData;
189
- data$5.append(formFieldPrefix + lazyId$3, partJSON$4);
187
+ var partJSON$3 = serializeModel(value, lazyId$2),
188
+ data$4 = formData;
189
+ data$4.append(formFieldPrefix + lazyId$2, partJSON$3);
190
190
  pendingParts--;
191
- 0 === pendingParts && resolve(data$5);
191
+ 0 === pendingParts && resolve(data$4);
192
192
  } catch (reason) {
193
193
  reject(reason);
194
194
  }
195
195
  };
196
196
  x.then(parentReference, parentReference);
197
- return "$" + lazyId$3.toString(16);
197
+ return "$" + lazyId$2.toString(16);
198
198
  }
199
199
  reject(x);
200
200
  return null;
@@ -208,9 +208,9 @@ module.exports = function ($$$config) {
208
208
  var promiseId = nextPartId++;
209
209
  value.then(function (partValue) {
210
210
  try {
211
- var partJSON$7 = serializeModel(partValue, promiseId);
211
+ var partJSON$6 = serializeModel(partValue, promiseId);
212
212
  partValue = formData;
213
- partValue.append(formFieldPrefix + promiseId, partJSON$7);
213
+ partValue.append(formFieldPrefix + promiseId, partJSON$6);
214
214
  pendingParts--;
215
215
  0 === pendingParts && resolve(partValue);
216
216
  } catch (reason) {
@@ -234,11 +234,11 @@ module.exports = function ($$$config) {
234
234
  if (isArrayImpl(value)) return value;
235
235
  if (value instanceof FormData) {
236
236
  null === formData && (formData = new FormData());
237
- var data$11 = formData;
237
+ var data$10 = formData;
238
238
  key = nextPartId++;
239
239
  var prefix = formFieldPrefix + key + "_";
240
240
  value.forEach(function (originalValue, originalKey) {
241
- data$11.append(prefix + originalKey, originalValue);
241
+ data$10.append(prefix + originalKey, originalValue);
242
242
  });
243
243
  return "$K" + key.toString(16);
244
244
  }
@@ -576,6 +576,7 @@ module.exports = function ($$$config) {
576
576
  return chunk.value;
577
577
  case "pending":
578
578
  case "blocked":
579
+ case "halted":
579
580
  throw chunk;
580
581
  default:
581
582
  throw chunk.reason;
@@ -907,6 +908,7 @@ module.exports = function ($$$config) {
907
908
  return map(response, value, parentObject, key);
908
909
  case "pending":
909
910
  case "blocked":
911
+ case "halted":
910
912
  return waitForReference(
911
913
  id,
912
914
  parentObject,
@@ -977,9 +979,10 @@ module.exports = function ($$$config) {
977
979
  createLazyChunkWrapper(response)
978
980
  );
979
981
  case "@":
980
- if (2 === value.length) return new Promise(function () {});
981
- parentObject = parseInt(value.slice(2), 16);
982
- return getChunk(response, parentObject);
982
+ return (
983
+ (parentObject = parseInt(value.slice(2), 16)),
984
+ getChunk(response, parentObject)
985
+ );
983
986
  case "S":
984
987
  return Symbol.for(value.slice(2));
985
988
  case "F":
@@ -1173,8 +1176,8 @@ module.exports = function ($$$config) {
1173
1176
  (previousBlockedChunk = chunk));
1174
1177
  } else {
1175
1178
  chunk = previousBlockedChunk;
1176
- var chunk$31 = createPendingChunk(response);
1177
- chunk$31.then(
1179
+ var chunk$30 = createPendingChunk(response);
1180
+ chunk$30.then(
1178
1181
  function (v) {
1179
1182
  return controller.enqueue(v);
1180
1183
  },
@@ -1182,10 +1185,10 @@ module.exports = function ($$$config) {
1182
1185
  return controller.error(e);
1183
1186
  }
1184
1187
  );
1185
- previousBlockedChunk = chunk$31;
1188
+ previousBlockedChunk = chunk$30;
1186
1189
  chunk.then(function () {
1187
- previousBlockedChunk === chunk$31 && (previousBlockedChunk = null);
1188
- resolveModelChunk(chunk$31, json);
1190
+ previousBlockedChunk === chunk$30 && (previousBlockedChunk = null);
1191
+ resolveModelChunk(chunk$30, json);
1189
1192
  });
1190
1193
  }
1191
1194
  },
@@ -1223,30 +1226,28 @@ module.exports = function ($$$config) {
1223
1226
  var buffer = [],
1224
1227
  closed = !1,
1225
1228
  nextWriteIndex = 0,
1226
- $jscomp$compprop0 = {};
1227
- $jscomp$compprop0 =
1228
- (($jscomp$compprop0[ASYNC_ITERATOR] = function () {
1229
- var nextReadIndex = 0;
1230
- return createIterator(function (arg) {
1231
- if (void 0 !== arg) throw Error(formatProdErrorMessage(524));
1232
- if (nextReadIndex === buffer.length) {
1233
- if (closed)
1234
- return new ReactPromise(
1235
- "fulfilled",
1236
- { done: !0, value: void 0 },
1237
- null,
1238
- response
1239
- );
1240
- buffer[nextReadIndex] = createPendingChunk(response);
1241
- }
1242
- return buffer[nextReadIndex++];
1243
- });
1244
- }),
1245
- $jscomp$compprop0);
1229
+ iterable = {};
1230
+ iterable[ASYNC_ITERATOR] = function () {
1231
+ var nextReadIndex = 0;
1232
+ return createIterator(function (arg) {
1233
+ if (void 0 !== arg) throw Error(formatProdErrorMessage(524));
1234
+ if (nextReadIndex === buffer.length) {
1235
+ if (closed)
1236
+ return new ReactPromise(
1237
+ "fulfilled",
1238
+ { done: !0, value: void 0 },
1239
+ null,
1240
+ response
1241
+ );
1242
+ buffer[nextReadIndex] = createPendingChunk(response);
1243
+ }
1244
+ return buffer[nextReadIndex++];
1245
+ });
1246
+ };
1246
1247
  resolveStream(
1247
1248
  response,
1248
1249
  id,
1249
- iterator ? $jscomp$compprop0[ASYNC_ITERATOR]() : $jscomp$compprop0,
1250
+ iterator ? iterable[ASYNC_ITERATOR]() : iterable,
1250
1251
  {
1251
1252
  enqueueValue: function (value) {
1252
1253
  if (nextWriteIndex === buffer.length)
@@ -1319,8 +1320,8 @@ module.exports = function ($$$config) {
1319
1320
  )
1320
1321
  byteLength += buffer[i].byteLength;
1321
1322
  byteLength = new Uint8Array(byteLength);
1322
- for (var i$32 = (i = 0); i$32 < l; i$32++) {
1323
- var chunk = buffer[i$32];
1323
+ for (var i$31 = (i = 0); i$31 < l; i$31++) {
1324
+ var chunk = buffer[i$31];
1324
1325
  byteLength.set(chunk, i);
1325
1326
  i += chunk.byteLength;
1326
1327
  }
@@ -1565,6 +1566,8 @@ module.exports = function ($$$config) {
1565
1566
  (null === this.reason && (this.reason = []),
1566
1567
  this.reason.push(reject));
1567
1568
  break;
1569
+ case "halted":
1570
+ break;
1568
1571
  default:
1569
1572
  reject && reject(this.reason);
1570
1573
  }
@@ -1601,7 +1604,7 @@ module.exports = function ($$$config) {
1601
1604
  version: rendererVersion,
1602
1605
  rendererPackageName: rendererPackageName,
1603
1606
  currentDispatcherRef: ReactSharedInternals,
1604
- reconcilerVersion: "19.2.0-experimental-e1dc0349-20250617",
1607
+ reconcilerVersion: "19.2.0-experimental-2a911f27-20250623",
1605
1608
  getCurrentComponentInfo: getCurrentOwnerInDEV
1606
1609
  };
1607
1610
  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-e1dc0349-20250617",
4
+ "version": "0.0.0-experimental-2a911f27-20250623",
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-e1dc0349-20250617"
26
+ "react": "0.0.0-experimental-2a911f27-20250623"
27
27
  }
28
28
  }