@yoltra/react 0.1.0 → 0.3.0
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/LICENSE +0 -0
- package/README.es.md +63 -58
- package/README.md +61 -60
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +483 -453
- package/dist/index.mjs.map +1 -1
- package/dist/types/createYoltra.d.ts +79 -0
- package/dist/types/hooks/createHooks.d.ts +27 -19
- package/dist/types/hooks/hooks.d.ts +1 -16
- package/dist/types/hooks/suspense.d.ts +24 -2
- package/dist/types/index.d.ts +3 -1
- package/dist/types/utils/shallowEqual.d.ts +19 -0
- package/dist/types/utils/useStableSnapshot.d.ts +4 -0
- package/package.json +15 -16
package/dist/index.mjs
CHANGED
|
@@ -1,620 +1,650 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @yoltra/react v0.
|
|
2
|
+
* @yoltra/react v0.3.0
|
|
3
3
|
* (c) 2026 Manu Ramirez <@pixerael>
|
|
4
4
|
* License: MIT
|
|
5
5
|
* Homepage: https://yoltra.dev
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree
|
|
6
9
|
*/
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
var Re = Object.defineProperty;
|
|
11
|
+
var Ae = (t, e, n) => e in t ? Re(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
12
|
+
var ce = (t, e, n) => Ae(t, typeof e != "symbol" ? e + "" : e, n);
|
|
13
|
+
import Pe, { createContext as fe, useRef as v, useMemo as h, useCallback as Z, useEffect as pe, useSyncExternalStore as N, useContext as de } from "react";
|
|
14
|
+
import { createStore as ge } from "@yoltra/core";
|
|
15
|
+
const me = fe(null);
|
|
16
|
+
var G = { exports: {} }, W = {};
|
|
17
|
+
var ue;
|
|
18
|
+
function _e() {
|
|
19
|
+
if (ue) return W;
|
|
20
|
+
ue = 1;
|
|
21
|
+
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
22
|
+
function n(o, s, c) {
|
|
19
23
|
var p = null;
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var
|
|
23
|
-
|
|
24
|
-
} else
|
|
25
|
-
return
|
|
24
|
+
if (c !== void 0 && (p = "" + c), s.key !== void 0 && (p = "" + s.key), "key" in s) {
|
|
25
|
+
c = {};
|
|
26
|
+
for (var m in s)
|
|
27
|
+
m !== "key" && (c[m] = s[m]);
|
|
28
|
+
} else c = s;
|
|
29
|
+
return s = c.ref, {
|
|
26
30
|
$$typeof: t,
|
|
27
|
-
type:
|
|
31
|
+
type: o,
|
|
28
32
|
key: p,
|
|
29
|
-
ref:
|
|
30
|
-
props:
|
|
33
|
+
ref: s !== void 0 ? s : null,
|
|
34
|
+
props: c
|
|
31
35
|
};
|
|
32
36
|
}
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
return
|
|
39
|
-
function t(
|
|
40
|
-
if (
|
|
41
|
-
if (typeof
|
|
42
|
-
return
|
|
43
|
-
if (typeof
|
|
44
|
-
switch (
|
|
45
|
-
case
|
|
37
|
+
return W.Fragment = e, W.jsx = n, W.jsxs = n, W;
|
|
38
|
+
}
|
|
39
|
+
var z = {};
|
|
40
|
+
var ae;
|
|
41
|
+
function ke() {
|
|
42
|
+
return ae || (ae = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
43
|
+
function t(r) {
|
|
44
|
+
if (r == null) return null;
|
|
45
|
+
if (typeof r == "function")
|
|
46
|
+
return r.$$typeof === K ? null : r.displayName || r.name || null;
|
|
47
|
+
if (typeof r == "string") return r;
|
|
48
|
+
switch (r) {
|
|
49
|
+
case E:
|
|
46
50
|
return "Fragment";
|
|
47
|
-
case
|
|
51
|
+
case g:
|
|
48
52
|
return "Profiler";
|
|
49
|
-
case
|
|
53
|
+
case S:
|
|
50
54
|
return "StrictMode";
|
|
51
|
-
case
|
|
55
|
+
case C:
|
|
52
56
|
return "Suspense";
|
|
53
|
-
case
|
|
57
|
+
case _:
|
|
54
58
|
return "SuspenseList";
|
|
55
|
-
case
|
|
59
|
+
case j:
|
|
56
60
|
return "Activity";
|
|
57
61
|
}
|
|
58
|
-
if (typeof
|
|
59
|
-
switch (typeof
|
|
62
|
+
if (typeof r == "object")
|
|
63
|
+
switch (typeof r.tag == "number" && console.error(
|
|
60
64
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
61
|
-
),
|
|
62
|
-
case
|
|
65
|
+
), r.$$typeof) {
|
|
66
|
+
case b:
|
|
63
67
|
return "Portal";
|
|
64
|
-
case
|
|
65
|
-
return (
|
|
66
|
-
case
|
|
67
|
-
return (
|
|
68
|
-
case
|
|
69
|
-
var
|
|
70
|
-
return
|
|
71
|
-
case
|
|
72
|
-
return
|
|
73
|
-
case
|
|
74
|
-
|
|
68
|
+
case Y:
|
|
69
|
+
return (r.displayName || "Context") + ".Provider";
|
|
70
|
+
case w:
|
|
71
|
+
return (r._context.displayName || "Context") + ".Consumer";
|
|
72
|
+
case D:
|
|
73
|
+
var a = r.render;
|
|
74
|
+
return r = r.displayName, r || (r = a.displayName || a.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
75
|
+
case x:
|
|
76
|
+
return a = r.displayName || null, a !== null ? a : t(r.type) || "Memo";
|
|
77
|
+
case V:
|
|
78
|
+
a = r._payload, r = r._init;
|
|
75
79
|
try {
|
|
76
|
-
return t(
|
|
80
|
+
return t(r(a));
|
|
77
81
|
} catch {
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
84
|
return null;
|
|
81
85
|
}
|
|
82
|
-
function r
|
|
83
|
-
return "" +
|
|
86
|
+
function e(r) {
|
|
87
|
+
return "" + r;
|
|
84
88
|
}
|
|
85
|
-
function n(
|
|
89
|
+
function n(r) {
|
|
86
90
|
try {
|
|
87
|
-
r
|
|
88
|
-
var
|
|
91
|
+
e(r);
|
|
92
|
+
var a = !1;
|
|
89
93
|
} catch {
|
|
90
|
-
|
|
94
|
+
a = !0;
|
|
91
95
|
}
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
var
|
|
95
|
-
return
|
|
96
|
-
|
|
96
|
+
if (a) {
|
|
97
|
+
a = console;
|
|
98
|
+
var y = a.error, R = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
99
|
+
return y.call(
|
|
100
|
+
a,
|
|
97
101
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
98
|
-
|
|
99
|
-
), r
|
|
102
|
+
R
|
|
103
|
+
), e(r);
|
|
100
104
|
}
|
|
101
105
|
}
|
|
102
|
-
function
|
|
103
|
-
if (
|
|
104
|
-
if (typeof
|
|
106
|
+
function o(r) {
|
|
107
|
+
if (r === E) return "<>";
|
|
108
|
+
if (typeof r == "object" && r !== null && r.$$typeof === V)
|
|
105
109
|
return "<...>";
|
|
106
110
|
try {
|
|
107
|
-
var
|
|
108
|
-
return
|
|
111
|
+
var a = t(r);
|
|
112
|
+
return a ? "<" + a + ">" : "<...>";
|
|
109
113
|
} catch {
|
|
110
114
|
return "<...>";
|
|
111
115
|
}
|
|
112
116
|
}
|
|
113
|
-
function o() {
|
|
114
|
-
var e = L.A;
|
|
115
|
-
return e === null ? null : e.getOwner();
|
|
116
|
-
}
|
|
117
117
|
function s() {
|
|
118
|
+
var r = M.A;
|
|
119
|
+
return r === null ? null : r.getOwner();
|
|
120
|
+
}
|
|
121
|
+
function c() {
|
|
118
122
|
return Error("react-stack-top-frame");
|
|
119
123
|
}
|
|
120
|
-
function p(
|
|
121
|
-
if (
|
|
122
|
-
var
|
|
123
|
-
if (
|
|
124
|
+
function p(r) {
|
|
125
|
+
if (ee.call(r, "key")) {
|
|
126
|
+
var a = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
127
|
+
if (a && a.isReactWarning) return !1;
|
|
124
128
|
}
|
|
125
|
-
return
|
|
129
|
+
return r.key !== void 0;
|
|
126
130
|
}
|
|
127
|
-
function
|
|
128
|
-
function
|
|
129
|
-
|
|
131
|
+
function m(r, a) {
|
|
132
|
+
function y() {
|
|
133
|
+
re || (re = !0, console.error(
|
|
130
134
|
"%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://react.dev/link/special-props)",
|
|
131
|
-
|
|
135
|
+
a
|
|
132
136
|
));
|
|
133
137
|
}
|
|
134
|
-
|
|
135
|
-
get:
|
|
138
|
+
y.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
139
|
+
get: y,
|
|
136
140
|
configurable: !0
|
|
137
141
|
});
|
|
138
142
|
}
|
|
139
|
-
function
|
|
140
|
-
var
|
|
141
|
-
return
|
|
143
|
+
function P() {
|
|
144
|
+
var r = t(this.type);
|
|
145
|
+
return te[r] || (te[r] = !0, console.error(
|
|
142
146
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
143
|
-
)),
|
|
147
|
+
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
144
148
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
147
|
-
$$typeof:
|
|
148
|
-
type:
|
|
149
|
-
key:
|
|
150
|
-
props:
|
|
151
|
-
_owner:
|
|
152
|
-
}, (
|
|
149
|
+
function u(r, a, y, R, O, T, X, B) {
|
|
150
|
+
return y = T.ref, r = {
|
|
151
|
+
$$typeof: f,
|
|
152
|
+
type: r,
|
|
153
|
+
key: a,
|
|
154
|
+
props: T,
|
|
155
|
+
_owner: O
|
|
156
|
+
}, (y !== void 0 ? y : null) !== null ? Object.defineProperty(r, "ref", {
|
|
153
157
|
enumerable: !1,
|
|
154
|
-
get:
|
|
155
|
-
}) : Object.defineProperty(
|
|
158
|
+
get: P
|
|
159
|
+
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
156
160
|
configurable: !1,
|
|
157
161
|
enumerable: !1,
|
|
158
162
|
writable: !0,
|
|
159
163
|
value: 0
|
|
160
|
-
}), Object.defineProperty(
|
|
164
|
+
}), Object.defineProperty(r, "_debugInfo", {
|
|
161
165
|
configurable: !1,
|
|
162
166
|
enumerable: !1,
|
|
163
167
|
writable: !0,
|
|
164
168
|
value: null
|
|
165
|
-
}), Object.defineProperty(
|
|
169
|
+
}), Object.defineProperty(r, "_debugStack", {
|
|
166
170
|
configurable: !1,
|
|
167
171
|
enumerable: !1,
|
|
168
172
|
writable: !0,
|
|
169
|
-
value:
|
|
170
|
-
}), Object.defineProperty(
|
|
173
|
+
value: X
|
|
174
|
+
}), Object.defineProperty(r, "_debugTask", {
|
|
171
175
|
configurable: !1,
|
|
172
176
|
enumerable: !1,
|
|
173
177
|
writable: !0,
|
|
174
|
-
value:
|
|
175
|
-
}), Object.freeze && (Object.freeze(
|
|
178
|
+
value: B
|
|
179
|
+
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
176
180
|
}
|
|
177
|
-
function
|
|
178
|
-
var
|
|
179
|
-
if (
|
|
180
|
-
if (
|
|
181
|
-
if (
|
|
182
|
-
for (
|
|
183
|
-
|
|
184
|
-
Object.freeze && Object.freeze(
|
|
181
|
+
function i(r, a, y, R, O, T, X, B) {
|
|
182
|
+
var A = a.children;
|
|
183
|
+
if (A !== void 0)
|
|
184
|
+
if (R)
|
|
185
|
+
if (Se(A)) {
|
|
186
|
+
for (R = 0; R < A.length; R++)
|
|
187
|
+
d(A[R]);
|
|
188
|
+
Object.freeze && Object.freeze(A);
|
|
185
189
|
} else
|
|
186
190
|
console.error(
|
|
187
191
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
188
192
|
);
|
|
189
|
-
else
|
|
190
|
-
if (
|
|
191
|
-
|
|
192
|
-
var
|
|
193
|
-
return
|
|
193
|
+
else d(A);
|
|
194
|
+
if (ee.call(a, "key")) {
|
|
195
|
+
A = t(r);
|
|
196
|
+
var F = Object.keys(a).filter(function(Ee) {
|
|
197
|
+
return Ee !== "key";
|
|
194
198
|
});
|
|
195
|
-
|
|
199
|
+
R = 0 < F.length ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}", se[A + R] || (F = 0 < F.length ? "{" + F.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
196
200
|
`A props object containing a "key" prop is being spread into JSX:
|
|
197
201
|
let props = %s;
|
|
198
202
|
<%s {...props} />
|
|
199
203
|
React keys must be passed directly to JSX without using spread:
|
|
200
204
|
let props = %s;
|
|
201
205
|
<%s key={someKey} {...props} />`,
|
|
202
|
-
E,
|
|
203
206
|
R,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
A,
|
|
208
|
+
F,
|
|
209
|
+
A
|
|
210
|
+
), se[A + R] = !0);
|
|
207
211
|
}
|
|
208
|
-
if (
|
|
209
|
-
|
|
210
|
-
for (var
|
|
211
|
-
|
|
212
|
-
} else
|
|
213
|
-
return
|
|
214
|
-
|
|
215
|
-
typeof
|
|
216
|
-
),
|
|
217
|
-
|
|
218
|
-
|
|
212
|
+
if (A = null, y !== void 0 && (n(y), A = "" + y), p(a) && (n(a.key), A = "" + a.key), "key" in a) {
|
|
213
|
+
y = {};
|
|
214
|
+
for (var H in a)
|
|
215
|
+
H !== "key" && (y[H] = a[H]);
|
|
216
|
+
} else y = a;
|
|
217
|
+
return A && m(
|
|
218
|
+
y,
|
|
219
|
+
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
220
|
+
), u(
|
|
221
|
+
r,
|
|
222
|
+
A,
|
|
223
|
+
T,
|
|
219
224
|
O,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
V
|
|
225
|
+
s(),
|
|
226
|
+
y,
|
|
227
|
+
X,
|
|
228
|
+
B
|
|
225
229
|
);
|
|
226
230
|
}
|
|
227
|
-
function
|
|
228
|
-
typeof
|
|
231
|
+
function d(r) {
|
|
232
|
+
typeof r == "object" && r !== null && r.$$typeof === f && r._store && (r._store.validated = 1);
|
|
229
233
|
}
|
|
230
|
-
var
|
|
234
|
+
var l = Pe, f = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.portal"), E = /* @__PURE__ */ Symbol.for("react.fragment"), S = /* @__PURE__ */ Symbol.for("react.strict_mode"), g = /* @__PURE__ */ Symbol.for("react.profiler"), w = /* @__PURE__ */ Symbol.for("react.consumer"), Y = /* @__PURE__ */ Symbol.for("react.context"), D = /* @__PURE__ */ Symbol.for("react.forward_ref"), C = /* @__PURE__ */ Symbol.for("react.suspense"), _ = /* @__PURE__ */ Symbol.for("react.suspense_list"), x = /* @__PURE__ */ Symbol.for("react.memo"), V = /* @__PURE__ */ Symbol.for("react.lazy"), j = /* @__PURE__ */ Symbol.for("react.activity"), K = /* @__PURE__ */ Symbol.for("react.client.reference"), M = l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, Se = Array.isArray, q = console.createTask ? console.createTask : function() {
|
|
231
235
|
return null;
|
|
232
236
|
};
|
|
233
|
-
|
|
234
|
-
react_stack_bottom_frame: function(
|
|
235
|
-
return
|
|
237
|
+
l = {
|
|
238
|
+
react_stack_bottom_frame: function(r) {
|
|
239
|
+
return r();
|
|
236
240
|
}
|
|
237
241
|
};
|
|
238
|
-
var
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
)(),
|
|
242
|
-
|
|
243
|
-
var
|
|
244
|
-
return
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
242
|
+
var re, te = {}, ne = l.react_stack_bottom_frame.bind(
|
|
243
|
+
l,
|
|
244
|
+
c
|
|
245
|
+
)(), oe = q(o(c)), se = {};
|
|
246
|
+
z.Fragment = E, z.jsx = function(r, a, y, R, O) {
|
|
247
|
+
var T = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
248
|
+
return i(
|
|
249
|
+
r,
|
|
250
|
+
a,
|
|
251
|
+
y,
|
|
248
252
|
!1,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
+
R,
|
|
254
|
+
O,
|
|
255
|
+
T ? Error("react-stack-top-frame") : ne,
|
|
256
|
+
T ? q(o(r)) : oe
|
|
253
257
|
);
|
|
254
|
-
},
|
|
255
|
-
var
|
|
256
|
-
return
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
}, z.jsxs = function(r, a, y, R, O) {
|
|
259
|
+
var T = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
260
|
+
return i(
|
|
261
|
+
r,
|
|
262
|
+
a,
|
|
263
|
+
y,
|
|
260
264
|
!0,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
+
R,
|
|
266
|
+
O,
|
|
267
|
+
T ? Error("react-stack-top-frame") : ne,
|
|
268
|
+
T ? q(o(r)) : oe
|
|
265
269
|
);
|
|
266
270
|
};
|
|
267
|
-
})()),
|
|
271
|
+
})()), z;
|
|
268
272
|
}
|
|
269
|
-
var
|
|
270
|
-
function
|
|
271
|
-
return
|
|
273
|
+
var ie;
|
|
274
|
+
function we() {
|
|
275
|
+
return ie || (ie = 1, process.env.NODE_ENV === "production" ? G.exports = _e() : G.exports = ke()), G.exports;
|
|
272
276
|
}
|
|
273
|
-
var
|
|
274
|
-
const
|
|
275
|
-
function
|
|
277
|
+
var ye = we();
|
|
278
|
+
const Ve = ({ store: t, children: e }) => /* @__PURE__ */ ye.jsx(me.Provider, { value: t, children: e }), le = /* @__PURE__ */ new Set();
|
|
279
|
+
function Te(t, e) {
|
|
280
|
+
process.env.NODE_ENV !== "production" && (le.has(t) || (le.add(t), console.warn(e)));
|
|
281
|
+
}
|
|
282
|
+
function L(t) {
|
|
276
283
|
return t.includes("*");
|
|
277
284
|
}
|
|
278
|
-
function
|
|
285
|
+
function k(t) {
|
|
279
286
|
return t.replace(/^\./, "");
|
|
280
287
|
}
|
|
281
|
-
function
|
|
282
|
-
return
|
|
288
|
+
function xe(t) {
|
|
289
|
+
return k(t).split(".").filter(Boolean);
|
|
290
|
+
}
|
|
291
|
+
function be(t) {
|
|
292
|
+
const e = (n) => `${n.length}:${n}`;
|
|
293
|
+
return t.map((n) => {
|
|
294
|
+
const o = Array.isArray(n.property) ? n.property : [n.property];
|
|
295
|
+
return e(n.reducer) + e(String(o.length)) + o.map(e).join("");
|
|
296
|
+
}).join("");
|
|
297
|
+
}
|
|
298
|
+
const ve = /* @__PURE__ */ Symbol("yoltra.pathSegments");
|
|
299
|
+
function he(t) {
|
|
300
|
+
const e = () => {
|
|
301
|
+
};
|
|
302
|
+
return new Proxy(e, {
|
|
303
|
+
get(n, o) {
|
|
304
|
+
if (o === ve) return t;
|
|
305
|
+
if (typeof o != "symbol")
|
|
306
|
+
return he([...t, String(o)]);
|
|
307
|
+
},
|
|
308
|
+
apply() {
|
|
309
|
+
throw new Error(
|
|
310
|
+
`[yoltra] A typed path accessor called a method (near "${t.join(".")}"). The accessor must be a plain member chain like \`p => p.items[0].title\` — it cannot call functions such as \`.map()\` or \`.toString()\`. Compute derived values in the component or a selector, or use the \`{ reducer, property }\` string form.`
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function je(t) {
|
|
316
|
+
const e = t(he([])), n = e != null ? e[ve] : void 0, s = (Array.isArray(n) ? n : []).join(".");
|
|
317
|
+
return s === "" && Te(
|
|
318
|
+
"yoltra.toDottedPath.empty",
|
|
319
|
+
"[yoltra] A typed path accessor recorded no property access, so it will subscribe to the entire slice. The accessor must be a plain member chain like `p => p.items[0].title` and cannot return a computed value or a default. For a whole-slice or dynamic subscription, use the `{ reducer, property }` string form instead."
|
|
320
|
+
), s;
|
|
283
321
|
}
|
|
284
|
-
function
|
|
285
|
-
if (!
|
|
322
|
+
function U(t, e) {
|
|
323
|
+
if (!e) return t;
|
|
286
324
|
let n = t;
|
|
287
|
-
for (const
|
|
325
|
+
for (const o of xe(e)) {
|
|
288
326
|
if (n == null) return;
|
|
289
|
-
n = n[
|
|
327
|
+
n = n[o];
|
|
290
328
|
}
|
|
291
329
|
return n;
|
|
292
330
|
}
|
|
293
|
-
function
|
|
294
|
-
const
|
|
331
|
+
function J(t, e, n) {
|
|
332
|
+
const o = v(t);
|
|
333
|
+
o.current = t;
|
|
334
|
+
const s = v(e);
|
|
335
|
+
s.current = e;
|
|
336
|
+
const c = h(
|
|
337
|
+
() => ({ has: !1, value: void 0 }),
|
|
338
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
339
|
+
n
|
|
340
|
+
);
|
|
341
|
+
return Z(() => {
|
|
342
|
+
const p = o.current();
|
|
343
|
+
return (!c.has || !s.current(c.value, p)) && (c.has = !0, c.value = p), c.value;
|
|
344
|
+
}, [c]);
|
|
345
|
+
}
|
|
346
|
+
function Oe(t, e) {
|
|
347
|
+
if (Object.is(t, e)) return !0;
|
|
348
|
+
if (!t || !e) return !1;
|
|
349
|
+
const n = Object.keys(t), o = Object.keys(e);
|
|
350
|
+
if (n.length !== o.length) return !1;
|
|
351
|
+
for (const s of n)
|
|
352
|
+
if (!Object.is(t[s], e[s])) return !1;
|
|
353
|
+
return !0;
|
|
354
|
+
}
|
|
355
|
+
function I() {
|
|
356
|
+
const t = de(me);
|
|
295
357
|
if (!t) throw new Error("useStore must be used inside <StoreProvider>");
|
|
296
358
|
return t;
|
|
297
359
|
}
|
|
298
|
-
function
|
|
299
|
-
return
|
|
360
|
+
function Ge() {
|
|
361
|
+
return I().emit;
|
|
300
362
|
}
|
|
301
|
-
function
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
return !0;
|
|
363
|
+
function Le(t, e = Object.is) {
|
|
364
|
+
const n = I(), o = h(() => (c) => n.subscribe(c), [n]), s = J(
|
|
365
|
+
() => t(n.getState()),
|
|
366
|
+
e,
|
|
367
|
+
[n]
|
|
368
|
+
);
|
|
369
|
+
return N(o, s, s);
|
|
309
370
|
}
|
|
310
|
-
function
|
|
311
|
-
const
|
|
312
|
-
|
|
313
|
-
return
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
return x(c, o, o);
|
|
319
|
-
}
|
|
320
|
-
function _e(t) {
|
|
321
|
-
const r = C(), n = y(() => {
|
|
322
|
-
const s = h(t.property);
|
|
323
|
-
return { reducer: t.reducer, property: s };
|
|
324
|
-
}, [t.reducer, t.property]), c = y(
|
|
325
|
-
() => (s) => r.connect(
|
|
326
|
-
{ reducer: n.reducer, property: n.property },
|
|
327
|
-
() => s()
|
|
371
|
+
function Ne(t, e, n = Object.is) {
|
|
372
|
+
const o = I(), s = h(() => {
|
|
373
|
+
const P = k(t.property);
|
|
374
|
+
return { reducer: t.reducer, property: P };
|
|
375
|
+
}, [t.reducer, t.property]), c = h(
|
|
376
|
+
() => (P) => o.connect(
|
|
377
|
+
{ reducer: s.reducer, property: s.property },
|
|
378
|
+
() => P()
|
|
328
379
|
),
|
|
329
|
-
[
|
|
330
|
-
),
|
|
331
|
-
|
|
332
|
-
const
|
|
333
|
-
return
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
return
|
|
342
|
-
}
|
|
343
|
-
function
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
return () => {
|
|
360
|
-
const a = d();
|
|
361
|
-
return n(l, a) ? l : l = a;
|
|
362
|
-
};
|
|
363
|
-
}, [c, o, r, n]);
|
|
364
|
-
return x(s, p, p);
|
|
365
|
-
}
|
|
366
|
-
function $e(t, r, n = Object.is) {
|
|
367
|
-
return !r && !z(t.property) ? _e(t) : he(t, r, n);
|
|
368
|
-
}
|
|
369
|
-
function Ye(t, r, n = Object.is) {
|
|
370
|
-
return Pe(t, r, n);
|
|
371
|
-
}
|
|
372
|
-
function Pe(t, r, n = Object.is) {
|
|
373
|
-
const c = C(), o = N(0), s = N(void 0), p = N(-1), u = y(() => t.map((a) => ({
|
|
374
|
-
reducer: a.reducer,
|
|
375
|
-
property: Array.isArray(a.property) ? a.property.map((f) => h(f)) : h(a.property)
|
|
376
|
-
})), [JSON.stringify(t)]), d = y(
|
|
377
|
-
() => (a) => {
|
|
378
|
-
const f = () => {
|
|
379
|
-
o.current++, a();
|
|
380
|
-
}, m = u.flatMap((b) => (Array.isArray(b.property) ? b.property : [b.property]).map((A) => c.connect({ reducer: b.reducer, property: A }, f)));
|
|
380
|
+
[o, s]
|
|
381
|
+
), p = L(s.property), m = J(
|
|
382
|
+
() => {
|
|
383
|
+
const u = o.getState()[s.reducer], i = p ? u : U(u, s.property);
|
|
384
|
+
return e ? e(i) : i;
|
|
385
|
+
},
|
|
386
|
+
n,
|
|
387
|
+
[o, s]
|
|
388
|
+
);
|
|
389
|
+
return N(c, m, m);
|
|
390
|
+
}
|
|
391
|
+
function Ue(t, e, n = Object.is) {
|
|
392
|
+
return Ne(t, e, n);
|
|
393
|
+
}
|
|
394
|
+
function Je(t, e, n = Object.is) {
|
|
395
|
+
return Ce(t, e, n);
|
|
396
|
+
}
|
|
397
|
+
function Ce(t, e, n = Object.is) {
|
|
398
|
+
const o = I(), s = v(0), c = v(void 0), p = v(-1), m = v(!1), P = v(e);
|
|
399
|
+
P.current = e;
|
|
400
|
+
const u = v(n);
|
|
401
|
+
u.current = n;
|
|
402
|
+
const i = h(() => t.map((f) => ({
|
|
403
|
+
reducer: f.reducer,
|
|
404
|
+
property: Array.isArray(f.property) ? f.property.map((b) => k(b)) : k(f.property)
|
|
405
|
+
})), [be(t)]), d = h(
|
|
406
|
+
() => (f) => {
|
|
407
|
+
const b = () => {
|
|
408
|
+
s.current++, f();
|
|
409
|
+
}, E = i.flatMap((S) => (Array.isArray(S.property) ? S.property : [S.property]).map((w) => o.connect({ reducer: S.reducer, property: w }, b)));
|
|
381
410
|
return () => {
|
|
382
|
-
for (const
|
|
411
|
+
for (const S of E) S();
|
|
383
412
|
};
|
|
384
413
|
},
|
|
385
|
-
[
|
|
386
|
-
), l =
|
|
387
|
-
if (p.current !==
|
|
388
|
-
const
|
|
389
|
-
(
|
|
414
|
+
[o, i]
|
|
415
|
+
), l = Z(() => {
|
|
416
|
+
if (p.current !== s.current || !m.current) {
|
|
417
|
+
const f = P.current(o.getState());
|
|
418
|
+
(!m.current || !u.current(c.current, f)) && (c.current = f, m.current = !0), p.current = s.current;
|
|
390
419
|
}
|
|
391
|
-
return
|
|
392
|
-
}, [
|
|
393
|
-
return
|
|
420
|
+
return c.current;
|
|
421
|
+
}, [o]);
|
|
422
|
+
return N(d, l, l);
|
|
394
423
|
}
|
|
395
|
-
function
|
|
396
|
-
const
|
|
397
|
-
|
|
424
|
+
function qe(t, e, n, o = "committed") {
|
|
425
|
+
const s = I(), c = v(n);
|
|
426
|
+
c.current = n, pe(() => s.onEvent(
|
|
398
427
|
t,
|
|
399
|
-
|
|
400
|
-
(p,
|
|
401
|
-
|
|
428
|
+
e,
|
|
429
|
+
(p, m, P, u) => {
|
|
430
|
+
c.current(p, m, P, u);
|
|
402
431
|
},
|
|
403
|
-
|
|
404
|
-
), [
|
|
432
|
+
o
|
|
433
|
+
), [s, t, e, o]);
|
|
405
434
|
}
|
|
406
|
-
|
|
435
|
+
function $e(t) {
|
|
436
|
+
return t == null || t <= 0 ? null : Date.now() + t;
|
|
437
|
+
}
|
|
438
|
+
class Ie {
|
|
407
439
|
constructor() {
|
|
408
|
-
|
|
440
|
+
ce(this, "store", /* @__PURE__ */ new Map());
|
|
409
441
|
}
|
|
410
|
-
read(
|
|
411
|
-
const
|
|
412
|
-
if (
|
|
413
|
-
return
|
|
414
|
-
if (
|
|
415
|
-
throw
|
|
416
|
-
if (
|
|
417
|
-
throw
|
|
418
|
-
const p = Promise.resolve().then(n).then((
|
|
419
|
-
this.store.set(
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
expiresAt: c == null ? null : Date.now() + c
|
|
423
|
-
});
|
|
424
|
-
}).catch((u) => {
|
|
425
|
-
this.store.set(r, {
|
|
426
|
-
status: "error",
|
|
427
|
-
error: u,
|
|
428
|
-
expiresAt: c == null ? null : Date.now() + c
|
|
429
|
-
});
|
|
442
|
+
read(e, n, o) {
|
|
443
|
+
const s = Date.now(), c = this.store.get(e);
|
|
444
|
+
if (c && c.status === "ready" && (c.expiresAt == null || c.expiresAt > s))
|
|
445
|
+
return c.value;
|
|
446
|
+
if (c && c.status === "pending")
|
|
447
|
+
throw c.promise;
|
|
448
|
+
if (c && c.status === "error")
|
|
449
|
+
throw c.error;
|
|
450
|
+
const p = Promise.resolve().then(n).then((m) => {
|
|
451
|
+
this.store.set(e, { status: "ready", value: m, expiresAt: $e(o) });
|
|
452
|
+
}).catch((m) => {
|
|
453
|
+
this.store.set(e, { status: "error", error: m, expiresAt: null });
|
|
430
454
|
});
|
|
431
|
-
throw this.store.set(
|
|
432
|
-
status: "pending",
|
|
433
|
-
promise: p,
|
|
434
|
-
expiresAt: c == null ? null : Date.now() + c
|
|
435
|
-
}), p;
|
|
455
|
+
throw this.store.set(e, { status: "pending", promise: p, expiresAt: null }), p;
|
|
436
456
|
}
|
|
437
|
-
invalidate(
|
|
438
|
-
this.store.delete(
|
|
457
|
+
invalidate(e) {
|
|
458
|
+
this.store.delete(e);
|
|
439
459
|
}
|
|
440
|
-
invalidatePrefix(
|
|
460
|
+
invalidatePrefix(e) {
|
|
441
461
|
for (const n of this.store.keys())
|
|
442
|
-
n.startsWith(
|
|
462
|
+
n.startsWith(e) && this.store.delete(n);
|
|
443
463
|
}
|
|
444
464
|
clear() {
|
|
445
465
|
this.store.clear();
|
|
446
466
|
}
|
|
447
467
|
}
|
|
448
|
-
const
|
|
449
|
-
function
|
|
450
|
-
const
|
|
451
|
-
return n ? `${t}::${
|
|
468
|
+
const $ = new Ie();
|
|
469
|
+
function Q(t, e, n) {
|
|
470
|
+
const o = Array.isArray(e) ? e.map(k).sort().join("|") : k(e);
|
|
471
|
+
return n ? `${t}::${o}::${n}` : `${t}::${o}`;
|
|
452
472
|
}
|
|
453
|
-
function
|
|
454
|
-
return
|
|
473
|
+
function Xe(t, e) {
|
|
474
|
+
return Ye(t, e);
|
|
455
475
|
}
|
|
456
|
-
function
|
|
457
|
-
const n =
|
|
458
|
-
|
|
459
|
-
}), [n,
|
|
460
|
-
|
|
476
|
+
function Ye(t, e) {
|
|
477
|
+
const n = I(), o = t.reducer, s = k(t.property), c = Q(o, s, e.key), p = h(() => (i) => n.connect({ reducer: o, property: s }, () => {
|
|
478
|
+
$.invalidate(c), i();
|
|
479
|
+
}), [n, o, s, c]), m = v(e);
|
|
480
|
+
m.current = e;
|
|
481
|
+
const P = h(() => {
|
|
482
|
+
const i = L(s);
|
|
461
483
|
return () => {
|
|
462
|
-
var
|
|
463
|
-
const
|
|
464
|
-
return
|
|
484
|
+
var E;
|
|
485
|
+
const l = n.getState()[o], f = i ? l : U(l, s), b = m.current;
|
|
486
|
+
return $.read(c, () => b.load(f, l), (E = b.staleTime) != null ? E : 0);
|
|
465
487
|
};
|
|
466
|
-
}, [n,
|
|
467
|
-
|
|
488
|
+
}, [n, o, s, c]), u = h(() => {
|
|
489
|
+
const i = L(s);
|
|
490
|
+
return () => {
|
|
491
|
+
const l = n.getState()[o];
|
|
492
|
+
return i ? l : U(l, s);
|
|
493
|
+
};
|
|
494
|
+
}, [n, o, s]);
|
|
495
|
+
return N(p, P, u);
|
|
468
496
|
}
|
|
469
|
-
function
|
|
470
|
-
return
|
|
497
|
+
function Be(t, e) {
|
|
498
|
+
return De(t, e);
|
|
471
499
|
}
|
|
472
|
-
function
|
|
473
|
-
const n =
|
|
500
|
+
function De(t, e) {
|
|
501
|
+
const n = I(), o = h(
|
|
474
502
|
() => t.map((u) => ({
|
|
475
503
|
reducer: u.reducer,
|
|
476
|
-
property: Array.isArray(u.property) ? u.property.map((
|
|
504
|
+
property: Array.isArray(u.property) ? u.property.map((i) => k(i)) : k(u.property)
|
|
477
505
|
})),
|
|
506
|
+
// `specs` is a fresh reference each render; keying the memo on its JSON
|
|
507
|
+
// signature is intentional and already covers `specs`.
|
|
508
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
478
509
|
[JSON.stringify(t)]
|
|
479
|
-
),
|
|
480
|
-
const u =
|
|
481
|
-
return
|
|
482
|
-
}, [
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
},
|
|
510
|
+
), s = h(() => {
|
|
511
|
+
const u = o.map((i) => Q(i.reducer, i.property)).sort().join("||");
|
|
512
|
+
return e.key ? `${u}::${e.key}` : u;
|
|
513
|
+
}, [o, e.key]), c = h(() => (u) => {
|
|
514
|
+
const i = () => {
|
|
515
|
+
$.invalidate(s), u();
|
|
516
|
+
}, d = o.map((l) => n.connect(l, i));
|
|
486
517
|
return () => {
|
|
487
|
-
for (const
|
|
518
|
+
for (const l of d) l();
|
|
488
519
|
};
|
|
489
|
-
}, [n,
|
|
520
|
+
}, [n, o, s]), p = v(e);
|
|
521
|
+
p.current = e;
|
|
522
|
+
const m = h(() => () => {
|
|
490
523
|
var d;
|
|
491
|
-
const u = n.getState();
|
|
492
|
-
return
|
|
493
|
-
}, [n,
|
|
494
|
-
return
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}
|
|
499
|
-
function
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
function Je() {
|
|
503
|
-
I.clear();
|
|
504
|
-
}
|
|
505
|
-
function xe(t, r) {
|
|
506
|
-
if (Object.is(t, r)) return !0;
|
|
507
|
-
if (!t || !r) return !1;
|
|
508
|
-
const n = Object.keys(t), c = Object.keys(r);
|
|
509
|
-
if (n.length !== c.length) return !1;
|
|
510
|
-
for (const o of n)
|
|
511
|
-
if (!Object.is(t[o], r[o])) return !1;
|
|
512
|
-
return !0;
|
|
524
|
+
const u = n.getState(), i = p.current;
|
|
525
|
+
return $.read(s, () => i.load(u), (d = i.staleTime) != null ? d : 0);
|
|
526
|
+
}, [n, s]);
|
|
527
|
+
return N(c, m, () => {
|
|
528
|
+
const u = p.current.load(n.getState());
|
|
529
|
+
return u instanceof Promise ? void 0 : u;
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function He(t, e, n) {
|
|
533
|
+
$.invalidate(Q(t, e, n));
|
|
513
534
|
}
|
|
514
|
-
function
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
535
|
+
function Ze(t) {
|
|
536
|
+
$.invalidatePrefix(`${t}::`);
|
|
537
|
+
}
|
|
538
|
+
function Qe() {
|
|
539
|
+
$.clear();
|
|
540
|
+
}
|
|
541
|
+
function Fe(t) {
|
|
542
|
+
function e() {
|
|
543
|
+
const u = de(t);
|
|
544
|
+
if (!u)
|
|
545
|
+
throw new Error(
|
|
546
|
+
"[yoltra] No store in context. Wrap your tree in <StoreProvider store={...}>, or use the hooks returned by createYoltra (which default to their own store)."
|
|
547
|
+
);
|
|
548
|
+
return u;
|
|
519
549
|
}
|
|
520
550
|
function n() {
|
|
521
|
-
return
|
|
551
|
+
return e().emit;
|
|
522
552
|
}
|
|
523
|
-
function
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
return () => {
|
|
527
|
-
const A = l(f.getState());
|
|
528
|
-
return a(S, A) ? S : S = A;
|
|
529
|
-
};
|
|
530
|
-
}, [f, l, a]);
|
|
531
|
-
return x(m, b, b);
|
|
553
|
+
function o(u, i = Object.is) {
|
|
554
|
+
const d = e(), l = h(() => (b) => d.subscribe(b), [d]), f = J(() => u(d.getState()), i, [d]);
|
|
555
|
+
return N(l, f, f);
|
|
532
556
|
}
|
|
533
557
|
return {
|
|
534
|
-
useStore:
|
|
558
|
+
useStore: e,
|
|
535
559
|
useEmit: n,
|
|
536
|
-
useSelector:
|
|
537
|
-
useAtomicProp: (
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
() => (P) => m.connect(
|
|
543
|
-
{ reducer: b.reducer, property: b.property },
|
|
544
|
-
() => P()
|
|
560
|
+
useSelector: o,
|
|
561
|
+
useAtomicProp: (u, i, d) => {
|
|
562
|
+
const l = e(), f = typeof u == "string", b = f ? u : u.reducer, E = f ? je(i) : u.property, S = f ? void 0 : i, g = h(() => ({ reducer: b, property: k(E) }), [b, E]), w = h(
|
|
563
|
+
() => (C) => l.connect(
|
|
564
|
+
{ reducer: g.reducer, property: g.property },
|
|
565
|
+
() => C()
|
|
545
566
|
),
|
|
546
|
-
[
|
|
547
|
-
),
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
return
|
|
551
|
-
},
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
};
|
|
557
|
-
}, [m, b, a, f]);
|
|
558
|
-
return x(S, A, A);
|
|
567
|
+
[l, g]
|
|
568
|
+
), Y = L(g.property), D = J(
|
|
569
|
+
() => {
|
|
570
|
+
const _ = l.getState()[g.reducer], x = Y ? _ : U(_, g.property);
|
|
571
|
+
return S ? S(x) : x;
|
|
572
|
+
},
|
|
573
|
+
d != null ? d : Object.is,
|
|
574
|
+
[l, g]
|
|
575
|
+
);
|
|
576
|
+
return N(w, D, D);
|
|
559
577
|
},
|
|
560
|
-
useAtomicProps: (
|
|
561
|
-
const
|
|
578
|
+
useAtomicProps: (u, i, d = Object.is) => {
|
|
579
|
+
const l = e(), f = v(0), b = v(void 0), E = v(-1), S = v(!1), g = v(i);
|
|
580
|
+
g.current = i;
|
|
581
|
+
const w = v(d);
|
|
582
|
+
w.current = d;
|
|
583
|
+
const Y = h(() => u.map((_) => ({
|
|
562
584
|
reducer: _.reducer,
|
|
563
|
-
property: Array.isArray(_.property) ? _.property.map((
|
|
564
|
-
})), [
|
|
585
|
+
property: Array.isArray(_.property) ? _.property.map((x) => k(x)) : k(_.property)
|
|
586
|
+
})), [be(u)]), D = h(
|
|
565
587
|
() => (_) => {
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
},
|
|
588
|
+
const x = () => {
|
|
589
|
+
f.current++, _();
|
|
590
|
+
}, V = Y.flatMap((j) => (Array.isArray(j.property) ? j.property : [j.property]).map((M) => l.connect({ reducer: j.reducer, property: M }, x)));
|
|
569
591
|
return () => {
|
|
570
|
-
for (const
|
|
592
|
+
for (const j of V) j();
|
|
571
593
|
};
|
|
572
594
|
},
|
|
573
|
-
[
|
|
574
|
-
),
|
|
575
|
-
if (
|
|
576
|
-
const _ =
|
|
577
|
-
(
|
|
595
|
+
[l, Y]
|
|
596
|
+
), C = Z(() => {
|
|
597
|
+
if (E.current !== f.current || !S.current) {
|
|
598
|
+
const _ = g.current(l.getState());
|
|
599
|
+
(!S.current || !w.current(b.current, _)) && (b.current = _, S.current = !0), E.current = f.current;
|
|
578
600
|
}
|
|
579
|
-
return
|
|
580
|
-
}, [
|
|
581
|
-
return
|
|
601
|
+
return b.current;
|
|
602
|
+
}, [l]);
|
|
603
|
+
return N(D, C, C);
|
|
582
604
|
},
|
|
583
|
-
useEvent: (
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
(
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
605
|
+
useEvent: (u, i, d, l = "committed") => {
|
|
606
|
+
const f = e(), b = v(d);
|
|
607
|
+
b.current = d, pe(() => f.onEvent(
|
|
608
|
+
u,
|
|
609
|
+
i,
|
|
610
|
+
(E, S, g, w) => {
|
|
611
|
+
b.current(
|
|
612
|
+
E,
|
|
613
|
+
S,
|
|
614
|
+
g,
|
|
615
|
+
w
|
|
594
616
|
);
|
|
595
617
|
},
|
|
596
|
-
|
|
597
|
-
), [
|
|
618
|
+
l
|
|
619
|
+
), [f, u, i, l]);
|
|
598
620
|
},
|
|
599
|
-
shallowEqual:
|
|
621
|
+
shallowEqual: Oe
|
|
600
622
|
};
|
|
601
623
|
}
|
|
624
|
+
function Ke(t) {
|
|
625
|
+
const e = ge(t), n = fe(e), o = Fe(n);
|
|
626
|
+
return { store: e, StoreContext: n, StoreProvider: ({
|
|
627
|
+
store: c,
|
|
628
|
+
children: p
|
|
629
|
+
}) => /* @__PURE__ */ ye.jsx(n.Provider, { value: c != null ? c : e, children: p }), ...o };
|
|
630
|
+
}
|
|
602
631
|
export {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
$
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
632
|
+
me as StoreContext,
|
|
633
|
+
Ve as StoreProvider,
|
|
634
|
+
Qe as clearSuspenseCache,
|
|
635
|
+
Fe as createHooks,
|
|
636
|
+
Ke as createYoltra,
|
|
637
|
+
He as invalidateAtomicProp,
|
|
638
|
+
Ze as invalidateAtomicPropsByReducer,
|
|
639
|
+
Oe as shallowEqual,
|
|
640
|
+
$ as suspenseCache,
|
|
641
|
+
Ue as useAtomicProp,
|
|
642
|
+
Je as useAtomicProps,
|
|
643
|
+
Ge as useEmit,
|
|
644
|
+
qe as useEvent,
|
|
645
|
+
Le as useSelector,
|
|
646
|
+
I as useStore,
|
|
647
|
+
Xe as useSuspenseAtomicProp,
|
|
648
|
+
Be as useSuspenseAtomicProps
|
|
619
649
|
};
|
|
620
650
|
//# sourceMappingURL=index.mjs.map
|