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