@ptolemy2002/react-proxy-context 2.3.1 → 2.3.2

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.
Files changed (3) hide show
  1. package/README.md +0 -1
  2. package/dist/main.js +322 -322
  3. package/package.json +12 -4
package/README.md CHANGED
@@ -113,7 +113,6 @@ These should be installed in order to use the library, as npm does not automatic
113
113
  - `@ptolemy2002/react-utils^3.0.0`
114
114
  - `@ptolemy2002/react-force-rerender^2.0.0`
115
115
  - `@ptolemy2002/react-hook-result^2.1.1`
116
- - `@ptolemy2002/react-mount-effects^2.0.0`
117
116
 
118
117
  ## Commands
119
118
  The following commands exist in the project:
package/dist/main.js CHANGED
@@ -1,10 +1,10 @@
1
- import $e, { useEffect as We, createContext as br, useRef as Z, useImperativeHandle as yr, useCallback as se, useContext as mr } from "react";
2
- import { nanoid as Rr } from "nanoid";
3
- import Y from "is-callable";
4
- import Ye from "@ptolemy2002/react-force-rerender";
5
- import gr from "@ptolemy2002/react-hook-result";
6
- import { partialMemo as hr } from "@ptolemy2002/react-utils";
7
- var ce = { exports: {} }, N = {};
1
+ import Fe, { createContext as vr, useRef as ie, useImperativeHandle as pr, useCallback as B, useContext as yr, useSyncExternalStore as br } from "react";
2
+ import { nanoid as mr } from "nanoid";
3
+ import L from "is-callable";
4
+ import Rr from "@ptolemy2002/react-force-rerender";
5
+ import Er from "@ptolemy2002/react-hook-result";
6
+ import { partialMemo as gr } from "@ptolemy2002/react-utils";
7
+ var ue = { exports: {} }, J = {};
8
8
  /**
9
9
  * @license React
10
10
  * react-jsx-runtime.production.min.js
@@ -14,21 +14,21 @@ var ce = { exports: {} }, N = {};
14
14
  * This source code is licensed under the MIT license found in the
15
15
  * LICENSE file in the root directory of this source tree.
16
16
  */
17
- var Fe;
18
- function Er() {
19
- if (Fe) return N;
20
- Fe = 1;
21
- var v = $e, E = Symbol.for("react.element"), w = Symbol.for("react.fragment"), g = Object.prototype.hasOwnProperty, T = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
22
- function p(i, s, P) {
23
- var b, x = {}, O = null, R = null;
24
- P !== void 0 && (O = "" + P), s.key !== void 0 && (O = "" + s.key), s.ref !== void 0 && (R = s.ref);
25
- for (b in s) g.call(s, b) && !m.hasOwnProperty(b) && (x[b] = s[b]);
17
+ var De;
18
+ function hr() {
19
+ if (De) return J;
20
+ De = 1;
21
+ var R = Fe, g = Symbol.for("react.element"), C = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, T = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
22
+ function y(i, s, w) {
23
+ var b, x = {}, j = null, I = null;
24
+ w !== void 0 && (j = "" + w), s.key !== void 0 && (j = "" + s.key), s.ref !== void 0 && (I = s.ref);
25
+ for (b in s) m.call(s, b) && !h.hasOwnProperty(b) && (x[b] = s[b]);
26
26
  if (i && i.defaultProps) for (b in s = i.defaultProps, s) x[b] === void 0 && (x[b] = s[b]);
27
- return { $$typeof: E, type: i, key: O, ref: R, props: x, _owner: T.current };
27
+ return { $$typeof: g, type: i, key: j, ref: I, props: x, _owner: T.current };
28
28
  }
29
- return N.Fragment = w, N.jsx = p, N.jsxs = p, N;
29
+ return J.Fragment = C, J.jsx = y, J.jsxs = y, J;
30
30
  }
31
- var B = {};
31
+ var q = {};
32
32
  /**
33
33
  * @license React
34
34
  * react-jsx-runtime.development.js
@@ -38,70 +38,70 @@ var B = {};
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
40
  */
41
- var Ie;
41
+ var Ae;
42
42
  function _r() {
43
- return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
44
- var v = $e, E = Symbol.for("react.element"), w = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), i = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), R = Symbol.for("react.offscreen"), D = Symbol.iterator, C = "@@iterator";
45
- function k(e) {
43
+ return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var R = Fe, g = Symbol.for("react.element"), C = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), i = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), V = Symbol.iterator, v = "@@iterator";
45
+ function S(e) {
46
46
  if (e === null || typeof e != "object")
47
47
  return null;
48
- var r = D && e[D] || e[C];
48
+ var r = V && e[V] || e[v];
49
49
  return typeof r == "function" ? r : null;
50
50
  }
51
- var y = v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
- function f(e) {
51
+ var l = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
+ function c(e) {
53
53
  {
54
54
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
55
55
  t[n - 1] = arguments[n];
56
- I("error", e, t);
56
+ P("error", e, t);
57
57
  }
58
58
  }
59
- function I(e, r, t) {
59
+ function P(e, r, t) {
60
60
  {
61
- var n = y.ReactDebugCurrentFrame, u = n.getStackAddendum();
61
+ var n = l.ReactDebugCurrentFrame, u = n.getStackAddendum();
62
62
  u !== "" && (r += "%s", t = t.concat([u]));
63
- var c = t.map(function(o) {
63
+ var f = t.map(function(o) {
64
64
  return String(o);
65
65
  });
66
- c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
66
+ f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
67
67
  }
68
68
  }
69
- var J = !1, L = !1, q = !1, K = !1, Le = !1, fe;
70
- fe = Symbol.for("react.module.reference");
71
- function Ve(e) {
72
- return !!(typeof e == "string" || typeof e == "function" || e === g || e === m || Le || e === T || e === P || e === b || K || e === R || J || L || q || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === x || e.$$typeof === p || e.$$typeof === i || e.$$typeof === s || // This needs to include all possible module reference object
69
+ var D = !1, $ = !1, Ie = !1, $e = !1, We = !1, se;
70
+ se = Symbol.for("react.module.reference");
71
+ function Ye(e) {
72
+ return !!(typeof e == "string" || typeof e == "function" || e === m || e === h || We || e === T || e === w || e === b || $e || e === I || D || $ || Ie || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === x || e.$$typeof === y || e.$$typeof === i || e.$$typeof === s || // This needs to include all possible module reference object
73
73
  // types supported by any Flight configuration anywhere since
74
74
  // we don't know which Flight build this will end up being used
75
75
  // with.
76
- e.$$typeof === fe || e.getModuleId !== void 0));
76
+ e.$$typeof === se || e.getModuleId !== void 0));
77
77
  }
78
- function Me(e, r, t) {
78
+ function Le(e, r, t) {
79
79
  var n = e.displayName;
80
80
  if (n)
81
81
  return n;
82
82
  var u = r.displayName || r.name || "";
83
83
  return u !== "" ? t + "(" + u + ")" : t;
84
84
  }
85
- function le(e) {
85
+ function ce(e) {
86
86
  return e.displayName || "Context";
87
87
  }
88
- function j(e) {
88
+ function k(e) {
89
89
  if (e == null)
90
90
  return null;
91
- if (typeof e.tag == "number" && f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
91
+ if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
92
92
  return e.displayName || e.name || null;
93
93
  if (typeof e == "string")
94
94
  return e;
95
95
  switch (e) {
96
- case g:
96
+ case m:
97
97
  return "Fragment";
98
- case w:
98
+ case C:
99
99
  return "Portal";
100
- case m:
100
+ case h:
101
101
  return "Profiler";
102
102
  case T:
103
103
  return "StrictMode";
104
- case P:
104
+ case w:
105
105
  return "Suspense";
106
106
  case b:
107
107
  return "SuspenseList";
@@ -110,19 +110,19 @@ function _r() {
110
110
  switch (e.$$typeof) {
111
111
  case i:
112
112
  var r = e;
113
- return le(r) + ".Consumer";
114
- case p:
113
+ return ce(r) + ".Consumer";
114
+ case y:
115
115
  var t = e;
116
- return le(t._context) + ".Provider";
116
+ return ce(t._context) + ".Provider";
117
117
  case s:
118
- return Me(e, e.render, "ForwardRef");
118
+ return Le(e, e.render, "ForwardRef");
119
119
  case x:
120
120
  var n = e.displayName || null;
121
- return n !== null ? n : j(e.type) || "Memo";
122
- case O: {
123
- var u = e, c = u._payload, o = u._init;
121
+ return n !== null ? n : k(e.type) || "Memo";
122
+ case j: {
123
+ var u = e, f = u._payload, o = u._init;
124
124
  try {
125
- return j(o(c));
125
+ return k(o(f));
126
126
  } catch {
127
127
  return null;
128
128
  }
@@ -130,18 +130,18 @@ function _r() {
130
130
  }
131
131
  return null;
132
132
  }
133
- var A = Object.assign, V = 0, de, ve, pe, be, ye, me, Re;
134
- function ge() {
133
+ var A = Object.assign, M = 0, fe, le, de, ve, pe, ye, be;
134
+ function me() {
135
135
  }
136
- ge.__reactDisabledLog = !0;
137
- function Ue() {
136
+ me.__reactDisabledLog = !0;
137
+ function Ve() {
138
138
  {
139
- if (V === 0) {
140
- de = console.log, ve = console.info, pe = console.warn, be = console.error, ye = console.group, me = console.groupCollapsed, Re = console.groupEnd;
139
+ if (M === 0) {
140
+ fe = console.log, le = console.info, de = console.warn, ve = console.error, pe = console.group, ye = console.groupCollapsed, be = console.groupEnd;
141
141
  var e = {
142
142
  configurable: !0,
143
143
  enumerable: !0,
144
- value: ge,
144
+ value: me,
145
145
  writable: !0
146
146
  };
147
147
  Object.defineProperties(console, {
@@ -154,12 +154,12 @@ function _r() {
154
154
  groupEnd: e
155
155
  });
156
156
  }
157
- V++;
157
+ M++;
158
158
  }
159
159
  }
160
- function Ne() {
160
+ function Me() {
161
161
  {
162
- if (V--, V === 0) {
162
+ if (M--, M === 0) {
163
163
  var e = {
164
164
  configurable: !0,
165
165
  enumerable: !0,
@@ -167,64 +167,64 @@ function _r() {
167
167
  };
168
168
  Object.defineProperties(console, {
169
169
  log: A({}, e, {
170
- value: de
170
+ value: fe
171
171
  }),
172
172
  info: A({}, e, {
173
- value: ve
173
+ value: le
174
174
  }),
175
175
  warn: A({}, e, {
176
- value: pe
176
+ value: de
177
177
  }),
178
178
  error: A({}, e, {
179
- value: be
179
+ value: ve
180
180
  }),
181
181
  group: A({}, e, {
182
- value: ye
182
+ value: pe
183
183
  }),
184
184
  groupCollapsed: A({}, e, {
185
- value: me
185
+ value: ye
186
186
  }),
187
187
  groupEnd: A({}, e, {
188
- value: Re
188
+ value: be
189
189
  })
190
190
  });
191
191
  }
192
- V < 0 && f("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
+ M < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
193
  }
194
194
  }
195
- var Q = y.ReactCurrentDispatcher, ee;
196
- function G(e, r, t) {
195
+ var X = l.ReactCurrentDispatcher, Z;
196
+ function K(e, r, t) {
197
197
  {
198
- if (ee === void 0)
198
+ if (Z === void 0)
199
199
  try {
200
200
  throw Error();
201
201
  } catch (u) {
202
202
  var n = u.stack.trim().match(/\n( *(at )?)/);
203
- ee = n && n[1] || "";
203
+ Z = n && n[1] || "";
204
204
  }
205
205
  return `
206
- ` + ee + e;
206
+ ` + Z + e;
207
207
  }
208
208
  }
209
- var re = !1, z;
209
+ var Q = !1, G;
210
210
  {
211
- var Be = typeof WeakMap == "function" ? WeakMap : Map;
212
- z = new Be();
211
+ var Ue = typeof WeakMap == "function" ? WeakMap : Map;
212
+ G = new Ue();
213
213
  }
214
- function he(e, r) {
215
- if (!e || re)
214
+ function Re(e, r) {
215
+ if (!e || Q)
216
216
  return "";
217
217
  {
218
- var t = z.get(e);
218
+ var t = G.get(e);
219
219
  if (t !== void 0)
220
220
  return t;
221
221
  }
222
222
  var n;
223
- re = !0;
223
+ Q = !0;
224
224
  var u = Error.prepareStackTrace;
225
225
  Error.prepareStackTrace = void 0;
226
- var c;
227
- c = Q.current, Q.current = null, Ue();
226
+ var f;
227
+ f = X.current, X.current = null, Ve();
228
228
  try {
229
229
  if (r) {
230
230
  var o = function() {
@@ -260,148 +260,148 @@ function _r() {
260
260
  } catch (_) {
261
261
  if (_ && n && typeof _.stack == "string") {
262
262
  for (var a = _.stack.split(`
263
- `), h = n.stack.split(`
264
- `), l = a.length - 1, d = h.length - 1; l >= 1 && d >= 0 && a[l] !== h[d]; )
265
- d--;
266
- for (; l >= 1 && d >= 0; l--, d--)
267
- if (a[l] !== h[d]) {
268
- if (l !== 1 || d !== 1)
263
+ `), E = n.stack.split(`
264
+ `), d = a.length - 1, p = E.length - 1; d >= 1 && p >= 0 && a[d] !== E[p]; )
265
+ p--;
266
+ for (; d >= 1 && p >= 0; d--, p--)
267
+ if (a[d] !== E[p]) {
268
+ if (d !== 1 || p !== 1)
269
269
  do
270
- if (l--, d--, d < 0 || a[l] !== h[d]) {
271
- var S = `
272
- ` + a[l].replace(" at new ", " at ");
273
- return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, S), S;
270
+ if (d--, p--, p < 0 || a[d] !== E[p]) {
271
+ var O = `
272
+ ` + a[d].replace(" at new ", " at ");
273
+ return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, O), O;
274
274
  }
275
- while (l >= 1 && d >= 0);
275
+ while (d >= 1 && p >= 0);
276
276
  break;
277
277
  }
278
278
  }
279
279
  } finally {
280
- re = !1, Q.current = c, Ne(), Error.prepareStackTrace = u;
280
+ Q = !1, X.current = f, Me(), Error.prepareStackTrace = u;
281
281
  }
282
- var W = e ? e.displayName || e.name : "", F = W ? G(W) : "";
283
- return typeof e == "function" && z.set(e, F), F;
282
+ var Y = e ? e.displayName || e.name : "", F = Y ? K(Y) : "";
283
+ return typeof e == "function" && G.set(e, F), F;
284
284
  }
285
- function Je(e, r, t) {
286
- return he(e, !1);
285
+ function Ne(e, r, t) {
286
+ return Re(e, !1);
287
287
  }
288
- function qe(e) {
288
+ function Be(e) {
289
289
  var r = e.prototype;
290
290
  return !!(r && r.isReactComponent);
291
291
  }
292
- function H(e, r, t) {
292
+ function z(e, r, t) {
293
293
  if (e == null)
294
294
  return "";
295
295
  if (typeof e == "function")
296
- return he(e, qe(e));
296
+ return Re(e, Be(e));
297
297
  if (typeof e == "string")
298
- return G(e);
298
+ return K(e);
299
299
  switch (e) {
300
- case P:
301
- return G("Suspense");
300
+ case w:
301
+ return K("Suspense");
302
302
  case b:
303
- return G("SuspenseList");
303
+ return K("SuspenseList");
304
304
  }
305
305
  if (typeof e == "object")
306
306
  switch (e.$$typeof) {
307
307
  case s:
308
- return Je(e.render);
308
+ return Ne(e.render);
309
309
  case x:
310
- return H(e.type, r, t);
311
- case O: {
312
- var n = e, u = n._payload, c = n._init;
310
+ return z(e.type, r, t);
311
+ case j: {
312
+ var n = e, u = n._payload, f = n._init;
313
313
  try {
314
- return H(c(u), r, t);
314
+ return z(f(u), r, t);
315
315
  } catch {
316
316
  }
317
317
  }
318
318
  }
319
319
  return "";
320
320
  }
321
- var M = Object.prototype.hasOwnProperty, Ee = {}, _e = y.ReactDebugCurrentFrame;
322
- function X(e) {
321
+ var U = Object.prototype.hasOwnProperty, Ee = {}, ge = l.ReactDebugCurrentFrame;
322
+ function H(e) {
323
323
  if (e) {
324
- var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
325
- _e.setExtraStackFrame(t);
324
+ var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
325
+ ge.setExtraStackFrame(t);
326
326
  } else
327
- _e.setExtraStackFrame(null);
327
+ ge.setExtraStackFrame(null);
328
328
  }
329
- function Ke(e, r, t, n, u) {
329
+ function Je(e, r, t, n, u) {
330
330
  {
331
- var c = Function.call.bind(M);
331
+ var f = Function.call.bind(U);
332
332
  for (var o in e)
333
- if (c(e, o)) {
333
+ if (f(e, o)) {
334
334
  var a = void 0;
335
335
  try {
336
336
  if (typeof e[o] != "function") {
337
- var h = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
338
- throw h.name = "Invariant Violation", h;
337
+ var E = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
338
+ throw E.name = "Invariant Violation", E;
339
339
  }
340
340
  a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
- } catch (l) {
342
- a = l;
341
+ } catch (d) {
342
+ a = d;
343
343
  }
344
- a && !(a instanceof Error) && (X(u), f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), X(null)), a instanceof Error && !(a.message in Ee) && (Ee[a.message] = !0, X(u), f("Failed %s type: %s", t, a.message), X(null));
344
+ a && !(a instanceof Error) && (H(u), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), H(null)), a instanceof Error && !(a.message in Ee) && (Ee[a.message] = !0, H(u), c("Failed %s type: %s", t, a.message), H(null));
345
345
  }
346
346
  }
347
347
  }
348
- var Ge = Array.isArray;
349
- function te(e) {
350
- return Ge(e);
348
+ var qe = Array.isArray;
349
+ function ee(e) {
350
+ return qe(e);
351
351
  }
352
- function ze(e) {
352
+ function Ke(e) {
353
353
  {
354
354
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
355
355
  return t;
356
356
  }
357
357
  }
358
- function He(e) {
358
+ function Ge(e) {
359
359
  try {
360
- return Te(e), !1;
360
+ return he(e), !1;
361
361
  } catch {
362
362
  return !0;
363
363
  }
364
364
  }
365
- function Te(e) {
365
+ function he(e) {
366
366
  return "" + e;
367
367
  }
368
- function Pe(e) {
369
- if (He(e))
370
- return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)), Te(e);
368
+ function _e(e) {
369
+ if (Ge(e))
370
+ return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), he(e);
371
371
  }
372
- var U = y.ReactCurrentOwner, Xe = {
372
+ var N = l.ReactCurrentOwner, ze = {
373
373
  key: !0,
374
374
  ref: !0,
375
375
  __self: !0,
376
376
  __source: !0
377
- }, Se, xe, ne;
378
- ne = {};
379
- function Ze(e) {
380
- if (M.call(e, "ref")) {
377
+ }, Te, xe, re;
378
+ re = {};
379
+ function He(e) {
380
+ if (U.call(e, "ref")) {
381
381
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
382
382
  if (r && r.isReactWarning)
383
383
  return !1;
384
384
  }
385
385
  return e.ref !== void 0;
386
386
  }
387
- function Qe(e) {
388
- if (M.call(e, "key")) {
387
+ function Xe(e) {
388
+ if (U.call(e, "key")) {
389
389
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
390
390
  if (r && r.isReactWarning)
391
391
  return !1;
392
392
  }
393
393
  return e.key !== void 0;
394
394
  }
395
- function er(e, r) {
396
- if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) {
397
- var t = j(U.current.type);
398
- ne[t] || (f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(U.current.type), e.ref), ne[t] = !0);
395
+ function Ze(e, r) {
396
+ if (typeof e.ref == "string" && N.current && r && N.current.stateNode !== r) {
397
+ var t = k(N.current.type);
398
+ re[t] || (c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(N.current.type), e.ref), re[t] = !0);
399
399
  }
400
400
  }
401
- function rr(e, r) {
401
+ function Qe(e, r) {
402
402
  {
403
403
  var t = function() {
404
- Se || (Se = !0, f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
404
+ Te || (Te = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
405
405
  };
406
406
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
407
407
  get: t,
@@ -409,10 +409,10 @@ function _r() {
409
409
  });
410
410
  }
411
411
  }
412
- function tr(e, r) {
412
+ function er(e, r) {
413
413
  {
414
414
  var t = function() {
415
- xe || (xe = !0, f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
415
+ xe || (xe = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
416
416
  };
417
417
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
418
418
  get: t,
@@ -420,17 +420,17 @@ function _r() {
420
420
  });
421
421
  }
422
422
  }
423
- var nr = function(e, r, t, n, u, c, o) {
423
+ var rr = function(e, r, t, n, u, f, o) {
424
424
  var a = {
425
425
  // This tag allows us to uniquely identify this as a React Element
426
- $$typeof: E,
426
+ $$typeof: g,
427
427
  // Built-in properties that belong on the element
428
428
  type: e,
429
429
  key: r,
430
430
  ref: t,
431
431
  props: o,
432
432
  // Record the component responsible for creating this element.
433
- _owner: c
433
+ _owner: f
434
434
  };
435
435
  return a._store = {}, Object.defineProperty(a._store, "validated", {
436
436
  configurable: !1,
@@ -449,41 +449,41 @@ function _r() {
449
449
  value: u
450
450
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
451
451
  };
452
- function ar(e, r, t, n, u) {
452
+ function tr(e, r, t, n, u) {
453
453
  {
454
- var c, o = {}, a = null, h = null;
455
- t !== void 0 && (Pe(t), a = "" + t), Qe(r) && (Pe(r.key), a = "" + r.key), Ze(r) && (h = r.ref, er(r, u));
456
- for (c in r)
457
- M.call(r, c) && !Xe.hasOwnProperty(c) && (o[c] = r[c]);
454
+ var f, o = {}, a = null, E = null;
455
+ t !== void 0 && (_e(t), a = "" + t), Xe(r) && (_e(r.key), a = "" + r.key), He(r) && (E = r.ref, Ze(r, u));
456
+ for (f in r)
457
+ U.call(r, f) && !ze.hasOwnProperty(f) && (o[f] = r[f]);
458
458
  if (e && e.defaultProps) {
459
- var l = e.defaultProps;
460
- for (c in l)
461
- o[c] === void 0 && (o[c] = l[c]);
459
+ var d = e.defaultProps;
460
+ for (f in d)
461
+ o[f] === void 0 && (o[f] = d[f]);
462
462
  }
463
- if (a || h) {
464
- var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
465
- a && rr(o, d), h && tr(o, d);
463
+ if (a || E) {
464
+ var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
465
+ a && Qe(o, p), E && er(o, p);
466
466
  }
467
- return nr(e, a, h, u, n, U.current, o);
467
+ return rr(e, a, E, u, n, N.current, o);
468
468
  }
469
469
  }
470
- var ae = y.ReactCurrentOwner, Ce = y.ReactDebugCurrentFrame;
471
- function $(e) {
470
+ var te = l.ReactCurrentOwner, Se = l.ReactDebugCurrentFrame;
471
+ function W(e) {
472
472
  if (e) {
473
- var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
474
- Ce.setExtraStackFrame(t);
473
+ var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
474
+ Se.setExtraStackFrame(t);
475
475
  } else
476
- Ce.setExtraStackFrame(null);
476
+ Se.setExtraStackFrame(null);
477
477
  }
478
- var oe;
479
- oe = !1;
480
- function ie(e) {
481
- return typeof e == "object" && e !== null && e.$$typeof === E;
478
+ var ne;
479
+ ne = !1;
480
+ function ae(e) {
481
+ return typeof e == "object" && e !== null && e.$$typeof === g;
482
482
  }
483
- function we() {
483
+ function Pe() {
484
484
  {
485
- if (ae.current) {
486
- var e = j(ae.current.type);
485
+ if (te.current) {
486
+ var e = k(te.current.type);
487
487
  if (e)
488
488
  return `
489
489
 
@@ -492,13 +492,13 @@ Check the render method of \`` + e + "`.";
492
492
  return "";
493
493
  }
494
494
  }
495
- function or(e) {
495
+ function nr(e) {
496
496
  return "";
497
497
  }
498
- var Oe = {};
499
- function ir(e) {
498
+ var we = {};
499
+ function ar(e) {
500
500
  {
501
- var r = we();
501
+ var r = Pe();
502
502
  if (!r) {
503
503
  var t = typeof e == "string" ? e : e.displayName || e.name;
504
504
  t && (r = `
@@ -508,39 +508,39 @@ Check the top-level render call using <` + t + ">.");
508
508
  return r;
509
509
  }
510
510
  }
511
- function je(e, r) {
511
+ function Oe(e, r) {
512
512
  {
513
513
  if (!e._store || e._store.validated || e.key != null)
514
514
  return;
515
515
  e._store.validated = !0;
516
- var t = ir(r);
517
- if (Oe[t])
516
+ var t = ar(r);
517
+ if (we[t])
518
518
  return;
519
- Oe[t] = !0;
519
+ we[t] = !0;
520
520
  var n = "";
521
- e && e._owner && e._owner !== ae.current && (n = " It was passed a child from " + j(e._owner.type) + "."), $(e), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), $(null);
521
+ e && e._owner && e._owner !== te.current && (n = " It was passed a child from " + k(e._owner.type) + "."), W(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), W(null);
522
522
  }
523
523
  }
524
- function ke(e, r) {
524
+ function Ce(e, r) {
525
525
  {
526
526
  if (typeof e != "object")
527
527
  return;
528
- if (te(e))
528
+ if (ee(e))
529
529
  for (var t = 0; t < e.length; t++) {
530
530
  var n = e[t];
531
- ie(n) && je(n, r);
531
+ ae(n) && Oe(n, r);
532
532
  }
533
- else if (ie(e))
533
+ else if (ae(e))
534
534
  e._store && (e._store.validated = !0);
535
535
  else if (e) {
536
- var u = k(e);
536
+ var u = S(e);
537
537
  if (typeof u == "function" && u !== e.entries)
538
- for (var c = u.call(e), o; !(o = c.next()).done; )
539
- ie(o.value) && je(o.value, r);
538
+ for (var f = u.call(e), o; !(o = f.next()).done; )
539
+ ae(o.value) && Oe(o.value, r);
540
540
  }
541
541
  }
542
542
  }
543
- function ur(e) {
543
+ function or(e) {
544
544
  {
545
545
  var r = e.type;
546
546
  if (r == null || typeof r == "string")
@@ -555,188 +555,188 @@ Check the top-level render call using <` + t + ">.");
555
555
  else
556
556
  return;
557
557
  if (t) {
558
- var n = j(r);
559
- Ke(t, e.props, "prop", n, e);
560
- } else if (r.PropTypes !== void 0 && !oe) {
561
- oe = !0;
562
- var u = j(r);
563
- f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
558
+ var n = k(r);
559
+ Je(t, e.props, "prop", n, e);
560
+ } else if (r.PropTypes !== void 0 && !ne) {
561
+ ne = !0;
562
+ var u = k(r);
563
+ c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
564
564
  }
565
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
565
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
566
566
  }
567
567
  }
568
- function sr(e) {
568
+ function ir(e) {
569
569
  {
570
570
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
571
571
  var n = r[t];
572
572
  if (n !== "children" && n !== "key") {
573
- $(e), f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), $(null);
573
+ W(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), W(null);
574
574
  break;
575
575
  }
576
576
  }
577
- e.ref !== null && ($(e), f("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
577
+ e.ref !== null && (W(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
578
578
  }
579
579
  }
580
- var De = {};
581
- function Ae(e, r, t, n, u, c) {
580
+ var je = {};
581
+ function ke(e, r, t, n, u, f) {
582
582
  {
583
- var o = Ve(e);
583
+ var o = Ye(e);
584
584
  if (!o) {
585
585
  var a = "";
586
586
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
587
- var h = or();
588
- h ? a += h : a += we();
589
- var l;
590
- e === null ? l = "null" : te(e) ? l = "array" : e !== void 0 && e.$$typeof === E ? (l = "<" + (j(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
587
+ var E = nr();
588
+ E ? a += E : a += Pe();
589
+ var d;
590
+ e === null ? d = "null" : ee(e) ? d = "array" : e !== void 0 && e.$$typeof === g ? (d = "<" + (k(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
591
591
  }
592
- var d = ar(e, r, t, u, c);
593
- if (d == null)
594
- return d;
592
+ var p = tr(e, r, t, u, f);
593
+ if (p == null)
594
+ return p;
595
595
  if (o) {
596
- var S = r.children;
597
- if (S !== void 0)
596
+ var O = r.children;
597
+ if (O !== void 0)
598
598
  if (n)
599
- if (te(S)) {
600
- for (var W = 0; W < S.length; W++)
601
- ke(S[W], e);
602
- Object.freeze && Object.freeze(S);
599
+ if (ee(O)) {
600
+ for (var Y = 0; Y < O.length; Y++)
601
+ Ce(O[Y], e);
602
+ Object.freeze && Object.freeze(O);
603
603
  } else
604
- f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
604
+ c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
605
605
  else
606
- ke(S, e);
606
+ Ce(O, e);
607
607
  }
608
- if (M.call(r, "key")) {
609
- var F = j(e), _ = Object.keys(r).filter(function(pr) {
610
- return pr !== "key";
611
- }), ue = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
612
- if (!De[F + ue]) {
613
- var vr = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
614
- f(`A props object containing a "key" prop is being spread into JSX:
608
+ if (U.call(r, "key")) {
609
+ var F = k(e), _ = Object.keys(r).filter(function(dr) {
610
+ return dr !== "key";
611
+ }), oe = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
612
+ if (!je[F + oe]) {
613
+ var lr = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
614
+ c(`A props object containing a "key" prop is being spread into JSX:
615
615
  let props = %s;
616
616
  <%s {...props} />
617
617
  React keys must be passed directly to JSX without using spread:
618
618
  let props = %s;
619
- <%s key={someKey} {...props} />`, ue, F, vr, F), De[F + ue] = !0;
619
+ <%s key={someKey} {...props} />`, oe, F, lr, F), je[F + oe] = !0;
620
620
  }
621
621
  }
622
- return e === g ? sr(d) : ur(d), d;
622
+ return e === m ? ir(p) : or(p), p;
623
623
  }
624
624
  }
625
- function cr(e, r, t) {
626
- return Ae(e, r, t, !0);
625
+ function ur(e, r, t) {
626
+ return ke(e, r, t, !0);
627
627
  }
628
- function fr(e, r, t) {
629
- return Ae(e, r, t, !1);
628
+ function sr(e, r, t) {
629
+ return ke(e, r, t, !1);
630
630
  }
631
- var lr = fr, dr = cr;
632
- B.Fragment = g, B.jsx = lr, B.jsxs = dr;
633
- }()), B;
634
- }
635
- process.env.NODE_ENV === "production" ? ce.exports = Er() : ce.exports = _r();
636
- var Tr = ce.exports;
637
- function Pr(v) {
638
- We(() => {
639
- v();
640
- }, []);
631
+ var cr = sr, fr = ur;
632
+ q.Fragment = m, q.jsx = cr, q.jsxs = fr;
633
+ }()), q;
641
634
  }
642
- function Sr(v) {
643
- We(() => v, []);
644
- }
645
- function Ar(v) {
635
+ process.env.NODE_ENV === "production" ? ue.exports = hr() : ue.exports = _r();
636
+ var Tr = ue.exports;
637
+ function kr(R) {
646
638
  if (typeof Proxy > "u") throw new Error("Proxy is not supported in this environment.");
647
- const E = br(
639
+ const g = vr(
648
640
  void 0
649
641
  );
650
- return E.name = v, E;
642
+ return g.name = R, g;
651
643
  }
652
- function xr(v) {
653
- if (Array.isArray(v)) {
654
- const [E, ...w] = v;
655
- return (g, T, m) => {
656
- if (g !== E) return !1;
657
- let p = T, i = m;
658
- for (const s of w)
659
- p = p == null ? void 0 : p[s], i = i == null ? void 0 : i[s];
660
- return p !== i;
644
+ function xr(R) {
645
+ if (Array.isArray(R)) {
646
+ const [g, ...C] = R;
647
+ return (m, T, h) => {
648
+ if (m !== g) return !1;
649
+ let y = T, i = h;
650
+ for (const s of C)
651
+ y = y == null ? void 0 : y[s], i = i == null ? void 0 : i[s];
652
+ return y !== i;
661
653
  };
662
654
  }
663
- return v;
655
+ return R;
664
656
  }
665
- function Fr(v) {
666
- return hr(
657
+ function Dr(R) {
658
+ return gr(
667
659
  ({
668
- children: E,
669
- value: w,
670
- onChangeProp: g,
660
+ children: g,
661
+ value: C,
662
+ onChangeProp: m,
671
663
  onChangeReinit: T,
672
- proxyRef: m
664
+ proxyRef: h
673
665
  }) => {
674
- const p = Z({}), i = Z(), s = Z({}), P = Ye();
675
- yr(m, () => i.current, [i.current]);
676
- const b = se((R, D, C) => {
677
- const k = Rr();
678
- return p.current[k] = {
679
- id: k,
680
- deps: C,
681
- propCallback: R,
682
- reinitCallback: D
683
- }, k;
684
- }, []), x = se((R) => {
685
- delete p.current[R];
686
- }, []), O = se((R) => {
687
- if (R !== i.current) {
688
- const D = i.current;
689
- R !== null ? i.current = new Proxy(R, {
690
- get: function(C, k) {
691
- const y = Reflect.get(C, k, R);
692
- return Y(y) ? y.bind(i.current) : y;
666
+ const y = ie({}), i = ie(), s = ie({}), w = Rr();
667
+ pr(h, () => i.current, [i.current]);
668
+ const b = B((v, S, l) => {
669
+ const c = mr();
670
+ return y.current[c] = {
671
+ id: c,
672
+ deps: l,
673
+ propCallback: v,
674
+ reinitCallback: S
675
+ }, c;
676
+ }, []), x = B((v) => {
677
+ delete y.current[v];
678
+ }, []), j = B((v, S, l) => {
679
+ Object.values(y.current).forEach((c) => {
680
+ var D;
681
+ const P = (D = c.deps) == null ? void 0 : D.map(xr);
682
+ (!P || P.includes(v) && l !== S || P.some(
683
+ ($) => L($) && $(v, S, l, i.current)
684
+ )) && c.propCallback(v, S, l);
685
+ }), L(m) && m(v, S, l);
686
+ }, [m]), I = B((v, S) => {
687
+ Object.values(y.current).forEach((l) => {
688
+ l.reinitCallback(v, S);
689
+ }), L(T) && T(v, S);
690
+ }, [T]), V = B((v) => {
691
+ if (v !== i.current) {
692
+ const S = i.current;
693
+ v !== null ? i.current = new Proxy(v, {
694
+ get: function(l, c) {
695
+ const P = Reflect.get(l, c, v);
696
+ return L(P) ? P.bind(i.current) : P;
693
697
  },
694
- set: function(C, k, y) {
695
- const f = k, I = C[f];
696
- return Reflect.set(C, f, y, R), y = C[f], Object.values(p.current).forEach((J) => {
697
- var q;
698
- const L = (q = J.deps) == null ? void 0 : q.map(xr);
699
- (!L || L.includes(f) && I !== y || L.some(
700
- (K) => Y(K) && K(f, y, I, R)
701
- )) && J.propCallback(f, y, I);
702
- }), Y(g) && g(f, y, I), !0;
698
+ set: function(l, c, P) {
699
+ const D = c, $ = l[D];
700
+ return Reflect.set(l, D, P, v), P = l[D], j(D, P, $), !0;
703
701
  }
704
- }) : i.current = R, Object.values(p.current).forEach((C) => {
705
- C.reinitCallback(i.current, D);
706
- }), Y(T) && T(i.current, D), P();
702
+ }) : i.current = v, I(i.current, S), w();
707
703
  }
708
704
  return s.current.obj = i.current, i.current;
709
- }, [g, T]);
710
- return i.current === void 0 && (i.current = O(w)), s.current.obj = i.current, s.current.set = O, s.current.subscribe = b, s.current.unsubscribe = x, /* @__PURE__ */ Tr.jsx(v.Provider, { value: s.current, children: E });
705
+ }, [m, T, j]);
706
+ return i.current === void 0 && (i.current = V(C)), s.current.obj = i.current, s.current.set = V, s.current.subscribe = b, s.current.unsubscribe = x, /* @__PURE__ */ Tr.jsx(R.Provider, { value: s.current, children: g });
711
707
  },
712
708
  ["children", "onChangeProp", "onChangeReinit", "proxyRef"],
713
- v.name + ".Provider"
709
+ R.name + ".Provider"
714
710
  );
715
711
  }
716
- function Ir(v, E = [], w, g, T = !0) {
717
- const m = mr(v), p = Ye(), i = Z(null);
718
- if (m === void 0)
719
- throw new Error(`No ${v.name} provider found.`);
720
- return Pr(() => {
721
- i.current = m == null ? void 0 : m.subscribe(
722
- (s, P, b) => {
723
- p(), Y(w) && w(s, P, b);
724
- },
725
- (s, P) => {
726
- T && p(), Y(g) && g(s, P);
727
- },
728
- E
729
- );
730
- }), Sr(() => {
731
- m.unsubscribe(i.current);
732
- }), new gr(
733
- { value: m.obj, set: m.set },
712
+ function Ar(R, g = [], C, m, T = !0) {
713
+ const h = yr(R);
714
+ if (h === void 0)
715
+ throw new Error(`No ${R.name} provider found.`);
716
+ const y = br(
717
+ (i) => {
718
+ const s = h.subscribe(
719
+ (w, b, x) => {
720
+ i(), L(C) && C(w, b, x);
721
+ },
722
+ (w, b) => {
723
+ T && i(), L(m) && m(w, b);
724
+ },
725
+ g
726
+ );
727
+ return () => h.unsubscribe(s);
728
+ },
729
+ () => h,
730
+ () => h
731
+ );
732
+ return new Er(
733
+ { value: y.obj, set: y.set },
734
734
  ["value", "set"]
735
735
  );
736
736
  }
737
737
  export {
738
- Ar as createProxyContext,
739
- Fr as createProxyContextProvider,
738
+ kr as createProxyContext,
739
+ Dr as createProxyContextProvider,
740
740
  xr as evaluateDependency,
741
- Ir as useProxyContext
741
+ Ar as useProxyContext
742
742
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ptolemy2002/react-proxy-context",
3
3
  "private": false,
4
- "version": "2.3.1",
4
+ "version": "2.3.2",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -10,6 +10,10 @@
10
10
  "scripts": {
11
11
  "dev": "npm run build && vite --port 3000",
12
12
  "build": "tsc -b ./tsconfig.lib.json && vite build",
13
+ "test": "vitest",
14
+ "test:ui": "vitest --ui",
15
+ "test:run": "vitest run",
16
+ "test:coverage": "vitest run --coverage",
13
17
  "lint": "eslint .",
14
18
  "preview": "vite preview",
15
19
  "postinstall": "npx typesync",
@@ -23,7 +27,6 @@
23
27
  "peerDependencies": {
24
28
  "@ptolemy2002/react-force-rerender": "^2.0.0",
25
29
  "@ptolemy2002/react-hook-result": "^2.1.1",
26
- "@ptolemy2002/react-mount-effects": "^2.0.0",
27
30
  "@ptolemy2002/react-utils": "^3.0.0",
28
31
  "is-callable": "^1.2.7",
29
32
  "nanoid": "^5.0.7",
@@ -34,8 +37,10 @@
34
37
  "@eslint/js": "^9.11.1",
35
38
  "@ptolemy2002/react-force-rerender": "^2.0.0",
36
39
  "@ptolemy2002/react-hook-result": "^2.1.1",
37
- "@ptolemy2002/react-mount-effects": "^2.0.0",
38
40
  "@ptolemy2002/react-utils": "^3.0.0",
41
+ "@testing-library/jest-dom": "^6.8.0",
42
+ "@testing-library/react": "^16.3.0",
43
+ "@testing-library/user-event": "^14.6.1",
39
44
  "@types/babel__generator": "^7.6.8",
40
45
  "@types/babel__template": "^7.4.4",
41
46
  "@types/babel__traverse": "^7.20.6",
@@ -47,12 +52,14 @@
47
52
  "@types/react": "^18.3.10",
48
53
  "@types/react-dom": "^18.3.0",
49
54
  "@vitejs/plugin-react": "^4.3.2",
55
+ "@vitest/ui": "^3.2.4",
50
56
  "eslint": "^9.11.1",
51
57
  "eslint-plugin-react": "^7.37.1",
52
58
  "eslint-plugin-react-hooks": "^5.1.0-rc.0",
53
59
  "eslint-plugin-react-refresh": "^0.4.12",
54
60
  "globals": "^15.9.0",
55
61
  "is-callable": "^1.2.7",
62
+ "jsdom": "^27.0.0",
56
63
  "less": "^4.2.0",
57
64
  "nanoid": "^5.0.7",
58
65
  "path": "^0.12.7",
@@ -61,7 +68,8 @@
61
68
  "typescript": "^5.5.3",
62
69
  "typescript-eslint": "^8.7.0",
63
70
  "vite": "^5.4.8",
64
- "vite-plugin-dts": "^4.2.3"
71
+ "vite-plugin-dts": "^4.2.3",
72
+ "vitest": "^3.2.4"
65
73
  },
66
74
  "exports": {
67
75
  ".": {