@laravel/stream-react 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +85 -93
- package/dist/index.umd.js +1 -1
- package/package.json +14 -14
package/dist/index.es.js
CHANGED
|
@@ -1,46 +1,43 @@
|
|
|
1
|
-
import { useRef as
|
|
1
|
+
import { useRef as y, useMemo as K, useState as D, useCallback as c, useEffect as R } from "react";
|
|
2
2
|
const q = "data: ", ee = (r, {
|
|
3
3
|
eventName: e = "update",
|
|
4
4
|
endSignal: n = "</stream>",
|
|
5
5
|
glue: t = " ",
|
|
6
|
-
replace:
|
|
6
|
+
replace: g = !1,
|
|
7
7
|
onMessage: T = () => null,
|
|
8
8
|
onComplete: P = () => null,
|
|
9
9
|
onError: I = () => null
|
|
10
10
|
} = {}) => {
|
|
11
|
-
const
|
|
11
|
+
const u = y(null), f = y([]), S = K(
|
|
12
12
|
() => Array.isArray(e) ? e : [e],
|
|
13
13
|
Array.isArray(e) ? e : [e]
|
|
14
|
-
), [
|
|
15
|
-
|
|
16
|
-
}, []),
|
|
14
|
+
), [C, j] = D(""), [l, i] = D([]), d = c(() => {
|
|
15
|
+
f.current = [], j(""), i([]);
|
|
16
|
+
}, []), E = c(
|
|
17
17
|
(s) => {
|
|
18
18
|
if ([n, `${q}${n}`].includes(s.data)) {
|
|
19
|
-
|
|
19
|
+
m(), P();
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
g && d(), f.current.push(
|
|
23
23
|
s.data.startsWith(q) ? s.data.substring(q.length) : s.data
|
|
24
|
-
),
|
|
24
|
+
), j(f.current.join(t)), i(f.current), T(s);
|
|
25
25
|
},
|
|
26
|
-
[
|
|
27
|
-
),
|
|
28
|
-
I(s),
|
|
29
|
-
}, []),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(o = i.current) == null || o.removeEventListener(b, D);
|
|
34
|
-
}), (a = i.current) == null || a.removeEventListener("error", R), (c = i.current) == null || c.close(), i.current = null, s && g();
|
|
26
|
+
[S, t]
|
|
27
|
+
), w = c((s) => {
|
|
28
|
+
I(s), m();
|
|
29
|
+
}, []), m = c((s = !1) => {
|
|
30
|
+
S.forEach((a) => {
|
|
31
|
+
u.current?.removeEventListener(a, E);
|
|
32
|
+
}), u.current?.removeEventListener("error", w), u.current?.close(), u.current = null, s && d();
|
|
35
33
|
}, []);
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
clearMessage: g
|
|
34
|
+
return R(() => (d(), u.current = new EventSource(r), S.forEach((s) => {
|
|
35
|
+
u.current?.addEventListener(s, E);
|
|
36
|
+
}), u.current.addEventListener("error", w), m), [r, S, E, w, d]), {
|
|
37
|
+
message: C,
|
|
38
|
+
messageParts: l,
|
|
39
|
+
close: m,
|
|
40
|
+
clearMessage: d
|
|
44
41
|
};
|
|
45
42
|
}, V = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
46
43
|
let W = (r = 21) => {
|
|
@@ -49,8 +46,8 @@ let W = (r = 21) => {
|
|
|
49
46
|
e += V[n[r] & 63];
|
|
50
47
|
return e;
|
|
51
48
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
49
|
+
const k = /* @__PURE__ */ new Map(), $ = (r, e) => {
|
|
50
|
+
k.has(r) || k.set(r, {
|
|
54
51
|
onData: [],
|
|
55
52
|
onError: [],
|
|
56
53
|
onFinish: [],
|
|
@@ -58,25 +55,25 @@ const A = /* @__PURE__ */ new Map(), $ = (r, e) => {
|
|
|
58
55
|
onCancel: [],
|
|
59
56
|
onBeforeSend: []
|
|
60
57
|
});
|
|
61
|
-
const n =
|
|
58
|
+
const n = k.get(r);
|
|
62
59
|
return e.onData && n.onData.push(e.onData), e.onError && n.onError.push(e.onError), e.onFinish && n.onFinish.push(e.onFinish), e.onResponse && n.onResponse.push(e.onResponse), e.onCancel && n.onCancel.push(e.onCancel), e.onBeforeSend && n.onBeforeSend.push(e.onBeforeSend), () => {
|
|
63
60
|
Z(r, e);
|
|
64
61
|
};
|
|
65
|
-
},
|
|
66
|
-
const t =
|
|
67
|
-
return t ? t[e].map((
|
|
62
|
+
}, b = (r, e, ...n) => {
|
|
63
|
+
const t = k.get(r);
|
|
64
|
+
return t ? t[e].map((g) => g(...n)) : [];
|
|
68
65
|
}, x = (r) => {
|
|
69
|
-
|
|
66
|
+
b(r, "onFinish");
|
|
70
67
|
}, J = (r, e) => {
|
|
71
|
-
|
|
68
|
+
b(r, "onError", e);
|
|
72
69
|
}, G = (r, e) => {
|
|
73
|
-
|
|
70
|
+
b(r, "onResponse", e);
|
|
74
71
|
}, H = (r) => {
|
|
75
|
-
|
|
72
|
+
b(r, "onCancel");
|
|
76
73
|
}, Q = (r, e) => {
|
|
77
|
-
|
|
74
|
+
b(r, "onData", e);
|
|
78
75
|
}, Y = (r, e) => {
|
|
79
|
-
const n =
|
|
76
|
+
const n = b(r, "onBeforeSend", e);
|
|
80
77
|
for (const t of n) {
|
|
81
78
|
if (t === !1)
|
|
82
79
|
return !1;
|
|
@@ -85,7 +82,7 @@ const A = /* @__PURE__ */ new Map(), $ = (r, e) => {
|
|
|
85
82
|
}
|
|
86
83
|
return null;
|
|
87
84
|
}, Z = (r, e) => {
|
|
88
|
-
const n =
|
|
85
|
+
const n = k.get(r);
|
|
89
86
|
n && (e.onData && (n.onData = n.onData.filter(
|
|
90
87
|
(t) => t !== e.onData
|
|
91
88
|
)), e.onError && (n.onError = n.onError.filter(
|
|
@@ -99,7 +96,7 @@ const A = /* @__PURE__ */ new Map(), $ = (r, e) => {
|
|
|
99
96
|
)), e.onBeforeSend && (n.onBeforeSend = n.onBeforeSend.filter(
|
|
100
97
|
(t) => t !== e.onBeforeSend
|
|
101
98
|
)));
|
|
102
|
-
}, M = /* @__PURE__ */ new Map(),
|
|
99
|
+
}, M = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), v = (r) => {
|
|
103
100
|
const e = M.get(r);
|
|
104
101
|
if (e)
|
|
105
102
|
return e;
|
|
@@ -111,143 +108,138 @@ const A = /* @__PURE__ */ new Map(), $ = (r, e) => {
|
|
|
111
108
|
jsonData: null
|
|
112
109
|
};
|
|
113
110
|
return M.set(r, n), n;
|
|
114
|
-
}, O = (r) => (
|
|
115
|
-
|
|
116
|
-
return m.has(r) && ((e = m.get(r)) == null ? void 0 : e.length);
|
|
117
|
-
}, _ = (r, e) => (O(r).push(e), () => {
|
|
118
|
-
m.set(
|
|
111
|
+
}, O = (r) => (h.has(r) || h.set(r, []), h.get(r)), p = (r) => h.has(r) && h.get(r)?.length, _ = (r, e) => (O(r).push(e), () => {
|
|
112
|
+
h.set(
|
|
119
113
|
r,
|
|
120
114
|
O(r).filter((n) => n !== e)
|
|
121
|
-
), p(r) || (M.delete(r),
|
|
115
|
+
), p(r) || (M.delete(r), h.delete(r));
|
|
122
116
|
}), N = (r, e) => {
|
|
123
|
-
var t;
|
|
124
117
|
M.set(r, {
|
|
125
118
|
...v(r),
|
|
126
119
|
...e
|
|
127
120
|
});
|
|
128
121
|
const n = v(r);
|
|
129
|
-
|
|
122
|
+
h.get(r)?.forEach((t) => t(n));
|
|
130
123
|
}, z = (r, e = {}) => {
|
|
131
|
-
const n =
|
|
124
|
+
const n = y(e.id ?? W()), t = y(v(n.current)), g = y(
|
|
132
125
|
(() => {
|
|
133
|
-
var c;
|
|
134
126
|
const s = {
|
|
135
127
|
"Content-Type": "application/json",
|
|
136
128
|
"X-STREAM-ID": n.current
|
|
137
|
-
}, a = e.csrfToken ??
|
|
129
|
+
}, a = e.csrfToken ?? document.querySelector('meta[name="csrf-token"]')?.getAttribute("content");
|
|
138
130
|
return a && (s["X-CSRF-TOKEN"] = a), s;
|
|
139
131
|
})()
|
|
140
|
-
), [T, P] =
|
|
132
|
+
), [T, P] = D(t.current.data), [I, u] = D(
|
|
141
133
|
t.current.jsonData
|
|
142
|
-
), [
|
|
134
|
+
), [f, S] = D(t.current.isFetching), [C, j] = D(t.current.isStreaming), l = c(
|
|
143
135
|
(s) => {
|
|
144
136
|
N(n.current, s);
|
|
145
137
|
},
|
|
146
138
|
[]
|
|
147
|
-
),
|
|
148
|
-
t.current.controller.abort(), (
|
|
139
|
+
), i = c(() => {
|
|
140
|
+
t.current.controller.abort(), (f || C) && H(n.current), l({
|
|
149
141
|
isFetching: !1,
|
|
150
142
|
isStreaming: !1
|
|
151
143
|
});
|
|
152
|
-
}, [
|
|
153
|
-
|
|
144
|
+
}, [f, C]), d = c(() => {
|
|
145
|
+
l({
|
|
154
146
|
data: "",
|
|
155
147
|
jsonData: null
|
|
156
148
|
});
|
|
157
|
-
}, []),
|
|
149
|
+
}, []), E = c(
|
|
158
150
|
(s) => {
|
|
159
|
-
const a = new AbortController(),
|
|
151
|
+
const a = new AbortController(), A = {
|
|
160
152
|
method: "POST",
|
|
161
153
|
signal: a.signal,
|
|
162
154
|
headers: {
|
|
163
|
-
...
|
|
155
|
+
...g.current,
|
|
164
156
|
...e.headers ?? {}
|
|
165
157
|
},
|
|
166
158
|
body: JSON.stringify(s ?? {}),
|
|
167
159
|
credentials: e.credentials ?? "same-origin"
|
|
168
|
-
},
|
|
169
|
-
|
|
160
|
+
}, B = Y(n.current, A);
|
|
161
|
+
B !== !1 && (l({
|
|
170
162
|
isFetching: !0,
|
|
171
163
|
controller: a
|
|
172
|
-
}), fetch(r,
|
|
164
|
+
}), fetch(r, B ?? A).then(async (o) => {
|
|
173
165
|
if (!o.ok) {
|
|
174
|
-
const
|
|
175
|
-
throw new Error(
|
|
166
|
+
const F = await o.text();
|
|
167
|
+
throw new Error(F);
|
|
176
168
|
}
|
|
177
169
|
if (!o.body)
|
|
178
170
|
throw new Error(
|
|
179
171
|
"ReadableStream not yet supported in this browser."
|
|
180
172
|
);
|
|
181
|
-
return G(n.current, o),
|
|
173
|
+
return G(n.current, o), l({
|
|
182
174
|
isFetching: !1,
|
|
183
175
|
isStreaming: !0
|
|
184
|
-
}),
|
|
176
|
+
}), m(o.body.getReader());
|
|
185
177
|
}).catch((o) => {
|
|
186
|
-
|
|
178
|
+
l({
|
|
187
179
|
isFetching: !1,
|
|
188
180
|
isStreaming: !1
|
|
189
181
|
}), J(n.current, o), x(n.current);
|
|
190
182
|
}));
|
|
191
183
|
},
|
|
192
184
|
[r]
|
|
193
|
-
),
|
|
194
|
-
|
|
195
|
-
}, []),
|
|
196
|
-
(s, a = "") => s.read().then(({ done:
|
|
197
|
-
const o = new TextDecoder("utf-8").decode(
|
|
185
|
+
), w = c((s) => {
|
|
186
|
+
i(), E(s), d();
|
|
187
|
+
}, []), m = c(
|
|
188
|
+
(s, a = "") => s.read().then(({ done: A, value: B }) => {
|
|
189
|
+
const o = new TextDecoder("utf-8").decode(B), F = a + o;
|
|
198
190
|
Q(n.current, o);
|
|
199
191
|
const L = {
|
|
200
|
-
data:
|
|
192
|
+
data: F
|
|
201
193
|
};
|
|
202
|
-
if (!
|
|
203
|
-
return
|
|
194
|
+
if (!A)
|
|
195
|
+
return l(L), m(s, F);
|
|
204
196
|
if (L.isStreaming = !1, e.json)
|
|
205
197
|
try {
|
|
206
198
|
L.jsonData = JSON.parse(
|
|
207
|
-
|
|
199
|
+
F
|
|
208
200
|
);
|
|
209
201
|
} catch (X) {
|
|
210
202
|
J(n.current, X);
|
|
211
203
|
}
|
|
212
|
-
return
|
|
204
|
+
return l(L), x(n.current), "";
|
|
213
205
|
}),
|
|
214
206
|
[]
|
|
215
207
|
);
|
|
216
|
-
return
|
|
208
|
+
return R(() => {
|
|
217
209
|
const s = _(
|
|
218
210
|
n.current,
|
|
219
211
|
(a) => {
|
|
220
|
-
t.current = v(n.current),
|
|
212
|
+
t.current = v(n.current), S(a.isFetching), j(a.isStreaming), P(a.data), u(a.jsonData);
|
|
221
213
|
}
|
|
222
214
|
);
|
|
223
215
|
return () => {
|
|
224
|
-
s(), p(n.current) ||
|
|
216
|
+
s(), p(n.current) || i();
|
|
225
217
|
};
|
|
226
|
-
}, []),
|
|
218
|
+
}, []), R(() => {
|
|
227
219
|
const s = $(n.current, e);
|
|
228
220
|
return () => {
|
|
229
221
|
s();
|
|
230
222
|
};
|
|
231
|
-
}, [e]),
|
|
232
|
-
window.removeEventListener("beforeunload",
|
|
233
|
-
}), [
|
|
234
|
-
e.initialInput &&
|
|
223
|
+
}, [e]), R(() => (window.addEventListener("beforeunload", i), () => {
|
|
224
|
+
window.removeEventListener("beforeunload", i);
|
|
225
|
+
}), [i]), R(() => {
|
|
226
|
+
e.initialInput && E(e.initialInput);
|
|
235
227
|
}, []), {
|
|
236
228
|
data: T,
|
|
237
229
|
jsonData: I,
|
|
238
|
-
isFetching:
|
|
239
|
-
isStreaming:
|
|
230
|
+
isFetching: f,
|
|
231
|
+
isStreaming: C,
|
|
240
232
|
id: n.current,
|
|
241
|
-
send:
|
|
242
|
-
cancel:
|
|
243
|
-
clearData:
|
|
233
|
+
send: w,
|
|
234
|
+
cancel: i,
|
|
235
|
+
clearData: d
|
|
244
236
|
};
|
|
245
237
|
}, ne = (r, e = {}) => {
|
|
246
|
-
const { jsonData: n, data: t, ...
|
|
238
|
+
const { jsonData: n, data: t, ...g } = z(r, {
|
|
247
239
|
...e,
|
|
248
240
|
json: !0
|
|
249
241
|
});
|
|
250
|
-
return { data: n, strData: t, ...
|
|
242
|
+
return { data: n, strData: t, ...g };
|
|
251
243
|
};
|
|
252
244
|
export {
|
|
253
245
|
ee as useEventStream,
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(u,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],s):(u=typeof globalThis<"u"?globalThis:u||self,s(u.LaravelStreamReact={},u.React))})(this,(function(u,s){"use strict";const A="data: ",x=(t,{eventName:e="update",endSignal:n="</stream>",glue:r=" ",replace:m=!1,onMessage:B=()=>null,onComplete:T=()=>null,onError:P=()=>null}={})=>{const l=s.useRef(null),h=s.useRef([]),E=s.useMemo(()=>Array.isArray(e)?e:[e],Array.isArray(e)?e:[e]),[D,j]=s.useState(""),[i,f]=s.useState([]),S=s.useCallback(()=>{h.current=[],j(""),f([])},[]),C=s.useCallback(a=>{if([n,`${A}${n}`].includes(a.data)){g(),T();return}m&&S(),h.current.push(a.data.startsWith(A)?a.data.substring(A.length):a.data),j(h.current.join(r)),f(h.current),B(a)},[E,r]),k=s.useCallback(a=>{P(a),g()},[]),g=s.useCallback((a=!1)=>{E.forEach(o=>{l.current?.removeEventListener(o,C)}),l.current?.removeEventListener("error",k),l.current?.close(),l.current=null,a&&S()},[]);return s.useEffect(()=>(S(),l.current=new EventSource(t),E.forEach(a=>{l.current?.addEventListener(a,C)}),l.current.addEventListener("error",k),g),[t,E,C,k,S]),{message:D,messageParts:i,close:g,clearMessage:S}},X="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let K=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=X[n[t]&63];return e};const R=new Map,V=(t,e)=>{R.has(t)||R.set(t,{onData:[],onError:[],onFinish:[],onResponse:[],onCancel:[],onBeforeSend:[]});const n=R.get(t);return e.onData&&n.onData.push(e.onData),e.onError&&n.onError.push(e.onError),e.onFinish&&n.onFinish.push(e.onFinish),e.onResponse&&n.onResponse.push(e.onResponse),e.onCancel&&n.onCancel.push(e.onCancel),e.onBeforeSend&&n.onBeforeSend.push(e.onBeforeSend),()=>{Q(t,e)}},b=(t,e,...n)=>{const r=R.get(t);return r?r[e].map(m=>m(...n)):[]},p=t=>{b(t,"onFinish")},q=(t,e)=>{b(t,"onError",e)},W=(t,e)=>{b(t,"onResponse",e)},$=t=>{b(t,"onCancel")},G=(t,e)=>{b(t,"onData",e)},H=(t,e)=>{const n=b(t,"onBeforeSend",e);for(const r of n){if(r===!1)return!1;if(r!==null&&typeof r=="object")return r}return null},Q=(t,e)=>{const n=R.get(t);n&&(e.onData&&(n.onData=n.onData.filter(r=>r!==e.onData)),e.onError&&(n.onError=n.onError.filter(r=>r!==e.onError)),e.onFinish&&(n.onFinish=n.onFinish.filter(r=>r!==e.onFinish)),e.onResponse&&(n.onResponse=n.onResponse.filter(r=>r!==e.onResponse)),e.onCancel&&(n.onCancel=n.onCancel.filter(r=>r!==e.onCancel)),e.onBeforeSend&&(n.onBeforeSend=n.onBeforeSend.filter(r=>r!==e.onBeforeSend)))},y=new Map,d=new Map,F=t=>{const e=y.get(t);if(e)return e;const n={controller:new AbortController,data:"",isFetching:!1,isStreaming:!1,jsonData:null};return y.set(t,n),n},I=t=>(d.has(t)||d.set(t,[]),d.get(t)),J=t=>d.has(t)&&d.get(t)?.length,Y=(t,e)=>(I(t).push(e),()=>{d.set(t,I(t).filter(n=>n!==e)),J(t)||(y.delete(t),d.delete(t))}),Z=(t,e)=>{y.set(t,{...F(t),...e});const n=F(t);d.get(t)?.forEach(r=>r(n))},O=(t,e={})=>{const n=s.useRef(e.id??K()),r=s.useRef(F(n.current)),m=s.useRef((()=>{const a={"Content-Type":"application/json","X-STREAM-ID":n.current},o=e.csrfToken??document.querySelector('meta[name="csrf-token"]')?.getAttribute("content");return o&&(a["X-CSRF-TOKEN"]=o),a})()),[B,T]=s.useState(r.current.data),[P,l]=s.useState(r.current.jsonData),[h,E]=s.useState(r.current.isFetching),[D,j]=s.useState(r.current.isStreaming),i=s.useCallback(a=>{Z(n.current,a)},[]),f=s.useCallback(()=>{r.current.controller.abort(),(h||D)&&$(n.current),i({isFetching:!1,isStreaming:!1})},[h,D]),S=s.useCallback(()=>{i({data:"",jsonData:null})},[]),C=s.useCallback(a=>{const o=new AbortController,L={method:"POST",signal:o.signal,headers:{...m.current,...e.headers??{}},body:JSON.stringify(a??{}),credentials:e.credentials??"same-origin"},M=H(n.current,L);M!==!1&&(i({isFetching:!0,controller:o}),fetch(t,M??L).then(async c=>{if(!c.ok){const w=await c.text();throw new Error(w)}if(!c.body)throw new Error("ReadableStream not yet supported in this browser.");return W(n.current,c),i({isFetching:!1,isStreaming:!0}),g(c.body.getReader())}).catch(c=>{i({isFetching:!1,isStreaming:!1}),q(n.current,c),p(n.current)}))},[t]),k=s.useCallback(a=>{f(),C(a),S()},[]),g=s.useCallback((a,o="")=>a.read().then(({done:L,value:M})=>{const c=new TextDecoder("utf-8").decode(M),w=o+c;G(n.current,c);const v={data:w};if(!L)return i(v),g(a,w);if(v.isStreaming=!1,e.json)try{v.jsonData=JSON.parse(w)}catch(N){q(n.current,N)}return i(v),p(n.current),""}),[]);return s.useEffect(()=>{const a=Y(n.current,o=>{r.current=F(n.current),E(o.isFetching),j(o.isStreaming),T(o.data),l(o.jsonData)});return()=>{a(),J(n.current)||f()}},[]),s.useEffect(()=>{const a=V(n.current,e);return()=>{a()}},[e]),s.useEffect(()=>(window.addEventListener("beforeunload",f),()=>{window.removeEventListener("beforeunload",f)}),[f]),s.useEffect(()=>{e.initialInput&&C(e.initialInput)},[]),{data:B,jsonData:P,isFetching:h,isStreaming:D,id:n.current,send:k,cancel:f,clearData:S}},_=(t,e={})=>{const{jsonData:n,data:r,...m}=O(t,{...e,json:!0});return{data:n,strData:r,...m}};u.useEventStream=x,u.useJsonStream=_,u.useStream=O,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laravel/stream-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "Laravel streaming hooks for React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"laravel",
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@testing-library/dom": "^10.4.
|
|
42
|
-
"@testing-library/react": "^16.3.
|
|
41
|
+
"@testing-library/dom": "^10.4.1",
|
|
42
|
+
"@testing-library/react": "^16.3.2",
|
|
43
43
|
"@types/node": "^22.14.0",
|
|
44
|
-
"@types/react": "^19.
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
46
|
-
"@typescript-eslint/parser": "^8.
|
|
47
|
-
"@vitejs/plugin-vue": "^
|
|
48
|
-
"eslint": "^
|
|
44
|
+
"@types/react": "^19.2.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
47
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
48
|
+
"eslint": "^10.0.0",
|
|
49
49
|
"jsdom": "^26.0.0",
|
|
50
|
-
"msw": "^2.
|
|
51
|
-
"prettier": "^3.
|
|
52
|
-
"typescript": "^5.
|
|
53
|
-
"vite": "^
|
|
54
|
-
"vite-plugin-dts": "^4.5.
|
|
55
|
-
"vitest": "^
|
|
50
|
+
"msw": "^2.12.0",
|
|
51
|
+
"prettier": "^3.8.1",
|
|
52
|
+
"typescript": "^5.9.0",
|
|
53
|
+
"vite": "^7.0.0",
|
|
54
|
+
"vite-plugin-dts": "^4.5.4",
|
|
55
|
+
"vitest": "^4.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"react": "^18.0.0 || ^19.0.0"
|