@matthamlin/react-client 0.0.0-experimental-96c61b7f-20250709 → 0.0.0-experimental-97cdd5d3-20250710
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.
@@ -2337,8 +2337,6 @@
|
|
2337
2337
|
this._chunks = chunks;
|
2338
2338
|
this._stringDecoder = createStringDecoder();
|
2339
2339
|
this._fromJSON = null;
|
2340
|
-
this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
|
2341
|
-
this._buffer = [];
|
2342
2340
|
this._closed = !1;
|
2343
2341
|
this._closedReason = null;
|
2344
2342
|
this._tempRefs = temporaryReferences;
|
@@ -3987,6 +3985,15 @@
|
|
3987
3985
|
)._weakResponse;
|
3988
3986
|
return bundlerConfig;
|
3989
3987
|
};
|
3988
|
+
exports.createStreamState = function () {
|
3989
|
+
return {
|
3990
|
+
_rowState: 0,
|
3991
|
+
_rowID: 0,
|
3992
|
+
_rowTag: 0,
|
3993
|
+
_rowLength: 0,
|
3994
|
+
_buffer: []
|
3995
|
+
};
|
3996
|
+
};
|
3990
3997
|
exports.getRoot = function (weakResponse) {
|
3991
3998
|
weakResponse = unwrapWeakResponse(weakResponse);
|
3992
3999
|
return getChunk(weakResponse, 0);
|
@@ -3997,7 +4004,7 @@
|
|
3997
4004
|
version: rendererVersion,
|
3998
4005
|
rendererPackageName: rendererPackageName,
|
3999
4006
|
currentDispatcherRef: ReactSharedInternals,
|
4000
|
-
reconcilerVersion: "19.2.0-experimental-
|
4007
|
+
reconcilerVersion: "19.2.0-experimental-97cdd5d3-20250710",
|
4001
4008
|
getCurrentComponentInfo: getCurrentOwnerInDEV
|
4002
4009
|
};
|
4003
4010
|
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
|
@@ -4020,16 +4027,16 @@
|
|
4020
4027
|
}
|
4021
4028
|
return JSCompiler_inline_result;
|
4022
4029
|
};
|
4023
|
-
exports.processBinaryChunk = function (weakResponse, chunk) {
|
4030
|
+
exports.processBinaryChunk = function (weakResponse, streamState, chunk) {
|
4024
4031
|
if (void 0 !== weakResponse.weak.deref()) {
|
4025
|
-
|
4032
|
+
var response = unwrapWeakResponse(weakResponse),
|
4033
|
+
i = 0,
|
4034
|
+
rowState = streamState._rowState;
|
4035
|
+
weakResponse = streamState._rowID;
|
4026
4036
|
for (
|
4027
|
-
var
|
4028
|
-
|
4029
|
-
|
4030
|
-
rowTag = weakResponse._rowTag,
|
4031
|
-
rowLength = weakResponse._rowLength,
|
4032
|
-
buffer = weakResponse._buffer,
|
4037
|
+
var rowTag = streamState._rowTag,
|
4038
|
+
rowLength = streamState._rowLength,
|
4039
|
+
buffer = streamState._buffer,
|
4033
4040
|
chunkLength = chunk.length;
|
4034
4041
|
i < chunkLength;
|
4035
4042
|
|
@@ -4040,8 +4047,8 @@
|
|
4040
4047
|
lastIdx = chunk[i++];
|
4041
4048
|
58 === lastIdx
|
4042
4049
|
? (rowState = 1)
|
4043
|
-
: (
|
4044
|
-
(
|
4050
|
+
: (weakResponse =
|
4051
|
+
(weakResponse << 4) |
|
4045
4052
|
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
4046
4053
|
continue;
|
4047
4054
|
case 1:
|
@@ -4087,15 +4094,15 @@
|
|
4087
4094
|
if (-1 < lastIdx)
|
4088
4095
|
(rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
|
4089
4096
|
processFullBinaryRow(
|
4097
|
+
response,
|
4090
4098
|
weakResponse,
|
4091
|
-
rowID,
|
4092
4099
|
rowTag,
|
4093
4100
|
buffer,
|
4094
4101
|
rowLength
|
4095
4102
|
),
|
4096
4103
|
(i = lastIdx),
|
4097
4104
|
3 === rowState && i++,
|
4098
|
-
(rowLength =
|
4105
|
+
(rowLength = weakResponse = rowTag = rowState = 0),
|
4099
4106
|
(buffer.length = 0);
|
4100
4107
|
else {
|
4101
4108
|
chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
|
@@ -4104,22 +4111,22 @@
|
|
4104
4111
|
break;
|
4105
4112
|
}
|
4106
4113
|
}
|
4107
|
-
|
4108
|
-
|
4109
|
-
|
4110
|
-
|
4114
|
+
streamState._rowState = rowState;
|
4115
|
+
streamState._rowID = weakResponse;
|
4116
|
+
streamState._rowTag = rowTag;
|
4117
|
+
streamState._rowLength = rowLength;
|
4111
4118
|
}
|
4112
4119
|
};
|
4113
|
-
exports.processStringChunk = function (weakResponse, chunk) {
|
4120
|
+
exports.processStringChunk = function (weakResponse, streamState, chunk) {
|
4114
4121
|
if (void 0 !== weakResponse.weak.deref()) {
|
4115
4122
|
weakResponse = unwrapWeakResponse(weakResponse);
|
4116
4123
|
for (
|
4117
4124
|
var i = 0,
|
4118
|
-
rowState =
|
4119
|
-
rowID =
|
4120
|
-
rowTag =
|
4121
|
-
rowLength =
|
4122
|
-
buffer =
|
4125
|
+
rowState = streamState._rowState,
|
4126
|
+
rowID = streamState._rowID,
|
4127
|
+
rowTag = streamState._rowTag,
|
4128
|
+
rowLength = streamState._rowLength,
|
4129
|
+
buffer = streamState._buffer,
|
4123
4130
|
chunkLength = chunk.length;
|
4124
4131
|
i < chunkLength;
|
4125
4132
|
|
@@ -4195,10 +4202,10 @@
|
|
4195
4202
|
"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."
|
4196
4203
|
);
|
4197
4204
|
}
|
4198
|
-
|
4199
|
-
|
4200
|
-
|
4201
|
-
|
4205
|
+
streamState._rowState = rowState;
|
4206
|
+
streamState._rowID = rowID;
|
4207
|
+
streamState._rowTag = rowTag;
|
4208
|
+
streamState._rowLength = rowLength;
|
4202
4209
|
}
|
4203
4210
|
};
|
4204
4211
|
exports.reportGlobalError = reportGlobalError;
|
@@ -1225,8 +1225,6 @@ module.exports = function ($$$config) {
|
|
1225
1225
|
this._chunks = chunks;
|
1226
1226
|
this._stringDecoder = createStringDecoder();
|
1227
1227
|
this._fromJSON = null;
|
1228
|
-
this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
|
1229
|
-
this._buffer = [];
|
1230
1228
|
this._closed = !1;
|
1231
1229
|
this._closedReason = null;
|
1232
1230
|
this._tempRefs = temporaryReferences;
|
@@ -1742,6 +1740,9 @@ module.exports = function ($$$config) {
|
|
1742
1740
|
);
|
1743
1741
|
return bundlerConfig;
|
1744
1742
|
};
|
1743
|
+
exports.createStreamState = function () {
|
1744
|
+
return { _rowState: 0, _rowID: 0, _rowTag: 0, _rowLength: 0, _buffer: [] };
|
1745
|
+
};
|
1745
1746
|
exports.getRoot = function (weakResponse) {
|
1746
1747
|
return getChunk(weakResponse, 0);
|
1747
1748
|
};
|
@@ -1751,7 +1752,7 @@ module.exports = function ($$$config) {
|
|
1751
1752
|
version: rendererVersion,
|
1752
1753
|
rendererPackageName: rendererPackageName,
|
1753
1754
|
currentDispatcherRef: ReactSharedInternals,
|
1754
|
-
reconcilerVersion: "19.2.0-experimental-
|
1755
|
+
reconcilerVersion: "19.2.0-experimental-97cdd5d3-20250710",
|
1755
1756
|
getCurrentComponentInfo: getCurrentOwnerInDEV
|
1756
1757
|
};
|
1757
1758
|
if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
|
@@ -1769,14 +1770,14 @@ module.exports = function ($$$config) {
|
|
1769
1770
|
}
|
1770
1771
|
return JSCompiler_inline_result;
|
1771
1772
|
};
|
1772
|
-
exports.processBinaryChunk = function (weakResponse, chunk) {
|
1773
|
+
exports.processBinaryChunk = function (weakResponse, streamState, chunk) {
|
1773
1774
|
for (
|
1774
1775
|
var i = 0,
|
1775
|
-
rowState =
|
1776
|
-
rowID =
|
1777
|
-
rowTag =
|
1778
|
-
rowLength =
|
1779
|
-
buffer =
|
1776
|
+
rowState = streamState._rowState,
|
1777
|
+
rowID = streamState._rowID,
|
1778
|
+
rowTag = streamState._rowTag,
|
1779
|
+
rowLength = streamState._rowLength,
|
1780
|
+
buffer = streamState._buffer,
|
1780
1781
|
chunkLength = chunk.length;
|
1781
1782
|
i < chunkLength;
|
1782
1783
|
|
@@ -1837,25 +1838,29 @@ module.exports = function ($$$config) {
|
|
1837
1838
|
(rowLength = rowID = rowTag = rowState = 0),
|
1838
1839
|
(buffer.length = 0);
|
1839
1840
|
else {
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1841
|
+
weakResponse = new Uint8Array(
|
1842
|
+
chunk.buffer,
|
1843
|
+
offset,
|
1844
|
+
chunk.byteLength - i
|
1845
|
+
);
|
1846
|
+
buffer.push(weakResponse);
|
1847
|
+
rowLength -= weakResponse.byteLength;
|
1843
1848
|
break;
|
1844
1849
|
}
|
1845
1850
|
}
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1851
|
+
streamState._rowState = rowState;
|
1852
|
+
streamState._rowID = rowID;
|
1853
|
+
streamState._rowTag = rowTag;
|
1854
|
+
streamState._rowLength = rowLength;
|
1850
1855
|
};
|
1851
|
-
exports.processStringChunk = function (weakResponse, chunk) {
|
1856
|
+
exports.processStringChunk = function (weakResponse, streamState, chunk) {
|
1852
1857
|
for (
|
1853
1858
|
var i = 0,
|
1854
|
-
rowState =
|
1855
|
-
rowID =
|
1856
|
-
rowTag =
|
1857
|
-
rowLength =
|
1858
|
-
buffer =
|
1859
|
+
rowState = streamState._rowState,
|
1860
|
+
rowID = streamState._rowID,
|
1861
|
+
rowTag = streamState._rowTag,
|
1862
|
+
rowLength = streamState._rowLength,
|
1863
|
+
buffer = streamState._buffer,
|
1859
1864
|
chunkLength = chunk.length;
|
1860
1865
|
i < chunkLength;
|
1861
1866
|
|
@@ -1919,10 +1924,10 @@ module.exports = function ($$$config) {
|
|
1919
1924
|
buffer.length = 0;
|
1920
1925
|
} else if (chunk.length !== i) throw Error(formatProdErrorMessage(540));
|
1921
1926
|
}
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1927
|
+
streamState._rowState = rowState;
|
1928
|
+
streamState._rowID = rowID;
|
1929
|
+
streamState._rowTag = rowTag;
|
1930
|
+
streamState._rowLength = rowLength;
|
1926
1931
|
};
|
1927
1932
|
exports.reportGlobalError = reportGlobalError;
|
1928
1933
|
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-
|
4
|
+
"version": "0.0.0-experimental-97cdd5d3-20250710",
|
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-97cdd5d3-20250710"
|
27
27
|
}
|
28
28
|
}
|