aoi-comp 1.0.4 → 1.0.6
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.md +1 -0
- package/dist/comps.js +568 -568
- package/dist/{hooks-DByotZq7.js → hooks-FYdXNEDe.js} +37 -37
- package/dist/hooks.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{packages-BbFWPD88.js → packages-Dd2mV9Xv.js} +141 -141
- package/dist/utils.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as e, t } from "./rolldown-runtime-CWhphoD1.js";
|
|
2
|
-
import {
|
|
2
|
+
import { E as n, H as r, J as i, K as a, O as o, V as s, c, d as l, f as u, m as d, q as f, s as p, t as m, w as h, x as g } from "./packages-Dd2mV9Xv.js";
|
|
3
3
|
import { message as _ } from "antd";
|
|
4
4
|
import { createContext as v, use as y, useCallback as b, useContext as x, useEffect as S, useMemo as C, useRef as w, useState as T } from "react";
|
|
5
5
|
//#region node_modules/.pnpm/react-i18next@17.0.11_i18ne_00b880b3cd01c3819045f8a7994d0c96/node_modules/react-i18next/dist/es/utils.js
|
|
@@ -145,28 +145,28 @@ var E = (e, t, n, r) => {
|
|
|
145
145
|
},
|
|
146
146
|
ready: !1
|
|
147
147
|
}, V = () => () => {}, H = (e, t = {}) => {
|
|
148
|
-
let { i18n: n } = t, { i18n: r, defaultNS: a } = x(F) || {}, o = n || r ||
|
|
148
|
+
let { i18n: n } = t, { i18n: r, defaultNS: a } = x(F) || {}, o = n || r || f();
|
|
149
149
|
o && !o.reportNamespaces && (o.reportNamespaces = new I()), o || O(o, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");
|
|
150
150
|
let s = C(() => ({
|
|
151
151
|
...i(),
|
|
152
152
|
...o?.options?.react,
|
|
153
153
|
...t
|
|
154
|
-
}), [o, t]), { useSuspense: c, keyPrefix: l } = s, u = e || a || o?.options?.defaultNS, d = N(u) ? [u] : u || ["translation"],
|
|
155
|
-
o?.reportNamespaces?.addUsedNamespaces?.(
|
|
156
|
-
let
|
|
154
|
+
}), [o, t]), { useSuspense: c, keyPrefix: l } = s, u = e || a || o?.options?.defaultNS, d = N(u) ? [u] : u || ["translation"], p = C(() => d, d);
|
|
155
|
+
o?.reportNamespaces?.addUsedNamespaces?.(p);
|
|
156
|
+
let m = w(0), h = b((e) => {
|
|
157
157
|
if (!o) return V;
|
|
158
158
|
let { bindI18n: t, bindI18nStore: n } = s, r = () => {
|
|
159
|
-
|
|
159
|
+
m.current += 1, e();
|
|
160
160
|
};
|
|
161
161
|
return t && o.on(t, r), n && o.store.on(n, r), () => {
|
|
162
162
|
t && t.split(" ").forEach((e) => o.off(e, r)), n && n.split(" ").forEach((e) => o.store.off(e, r));
|
|
163
163
|
};
|
|
164
164
|
}, [o, s]), g = w(), _ = b(() => {
|
|
165
165
|
if (!o) return B;
|
|
166
|
-
let e = !!(o.isInitialized || o.initializedStoreOnce) &&
|
|
166
|
+
let e = !!(o.isInitialized || o.initializedStoreOnce) && p.every((e) => M(e, o, s)), n = t.lng || o.language, r = m.current, i = g.current;
|
|
167
167
|
if (i && i.ready === e && i.lng === n && i.keyPrefix === l && i.revision === r) return i;
|
|
168
168
|
let a = {
|
|
169
|
-
t: o.getFixedT(n, s.nsMode === "fallback" ?
|
|
169
|
+
t: o.getFixedT(n, s.nsMode === "fallback" ? p : p[0], l, { scopeNs: p }),
|
|
170
170
|
ready: e,
|
|
171
171
|
lng: n,
|
|
172
172
|
keyPrefix: l,
|
|
@@ -175,7 +175,7 @@ var E = (e, t, n, r) => {
|
|
|
175
175
|
return g.current = a, a;
|
|
176
176
|
}, [
|
|
177
177
|
o,
|
|
178
|
-
|
|
178
|
+
p,
|
|
179
179
|
l,
|
|
180
180
|
s,
|
|
181
181
|
t.lng
|
|
@@ -183,12 +183,12 @@ var E = (e, t, n, r) => {
|
|
|
183
183
|
S(() => {
|
|
184
184
|
if (o && !D && !c) {
|
|
185
185
|
let e = () => y((e) => e + 1);
|
|
186
|
-
t.lng ? j(o, t.lng,
|
|
186
|
+
t.lng ? j(o, t.lng, p, e) : A(o, p, e);
|
|
187
187
|
}
|
|
188
188
|
}, [
|
|
189
189
|
o,
|
|
190
190
|
t.lng,
|
|
191
|
-
|
|
191
|
+
p,
|
|
192
192
|
D,
|
|
193
193
|
c,
|
|
194
194
|
v
|
|
@@ -230,7 +230,7 @@ var E = (e, t, n, r) => {
|
|
|
230
230
|
} catch {}
|
|
231
231
|
throw e && O(o, "SUSPENDED_WHILE_LOADING", "useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"), new Promise((e) => {
|
|
232
232
|
let n = () => e();
|
|
233
|
-
t.lng ? j(o, t.lng,
|
|
233
|
+
t.lng ? j(o, t.lng, p, n) : A(o, p, n);
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
return H;
|
|
@@ -249,13 +249,13 @@ var E = (e, t, n, r) => {
|
|
|
249
249
|
...t,
|
|
250
250
|
[e]: i
|
|
251
251
|
});
|
|
252
|
-
}),
|
|
252
|
+
}), s = (t, n = e) => {
|
|
253
253
|
let r = t ? n[t] : n;
|
|
254
254
|
if (typeof r != "object" || !r) return;
|
|
255
255
|
let a = new Proxy(r, {
|
|
256
256
|
get(e, n, r) {
|
|
257
|
-
let i =
|
|
258
|
-
return
|
|
257
|
+
let i = h(e), a = Reflect.get(e, n, i === "map" || i === "set" ? e : r);
|
|
258
|
+
return u(a, "function") ? [
|
|
259
259
|
"add",
|
|
260
260
|
"set",
|
|
261
261
|
"delete",
|
|
@@ -288,8 +288,8 @@ var E = (e, t, n, r) => {
|
|
|
288
288
|
else return a;
|
|
289
289
|
};
|
|
290
290
|
if (!a.current) {
|
|
291
|
-
i.current =
|
|
292
|
-
for (let t in e)
|
|
291
|
+
i.current = s();
|
|
292
|
+
for (let t in e) s(t);
|
|
293
293
|
a.current = !0;
|
|
294
294
|
}
|
|
295
295
|
return S(() => () => {
|
|
@@ -315,9 +315,9 @@ var E = (e, t, n, r) => {
|
|
|
315
315
|
return [n, a];
|
|
316
316
|
}, J = (e = "simple") => {
|
|
317
317
|
let t = {
|
|
318
|
-
exe:
|
|
319
|
-
cv:
|
|
320
|
-
db:
|
|
318
|
+
exe: m.exe,
|
|
319
|
+
cv: m.cv,
|
|
320
|
+
db: m.db
|
|
321
321
|
}, n = w([
|
|
322
322
|
"store",
|
|
323
323
|
"system",
|
|
@@ -341,7 +341,7 @@ var E = (e, t, n, r) => {
|
|
|
341
341
|
isWatch: !0
|
|
342
342
|
}).current;
|
|
343
343
|
return S(() => {
|
|
344
|
-
r.isWatch && (r.isInit ? (
|
|
344
|
+
r.isWatch && (r.isInit ? (c(t, r.oldValue) || e(t, r.oldValue), r.oldValue = p(t)) : r.isInit = !0);
|
|
345
345
|
}, t), () => {
|
|
346
346
|
r.isWatch = !1;
|
|
347
347
|
};
|
|
@@ -351,15 +351,15 @@ var E = (e, t, n, r) => {
|
|
|
351
351
|
return t;
|
|
352
352
|
}, Z = (e, t, n = !1) => {
|
|
353
353
|
let i = G(e);
|
|
354
|
-
return S(() => (n && i(),
|
|
354
|
+
return S(() => (n && i(), r(t, i), () => s(t, i)), []), i;
|
|
355
355
|
}, Q = (e, t) => {
|
|
356
356
|
let n = w({
|
|
357
357
|
immediate: !1,
|
|
358
358
|
fps: 17,
|
|
359
359
|
beforeFn: null
|
|
360
360
|
}).current;
|
|
361
|
-
|
|
362
|
-
let r =
|
|
361
|
+
u(t, "boolean") ? n.immediate = t : u(t, "number") ? n.fps = t : u(t, "function") ? n.beforeFn = t : u(t, "object") && (n.immediate = t.immediate, n.fps = t.fps, n.beforeFn = t.beforeFn);
|
|
362
|
+
let r = g(e, 60 * n.fps);
|
|
363
363
|
S(() => (n.beforeFn?.(), n.immediate && r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r)), []);
|
|
364
364
|
}, $ = (e = "app", t = !1) => {
|
|
365
365
|
let { context: r } = J("privatize"), [i, a] = _.useMessage(), o = w([]), s = (e, t, { key: r, duration: a = 3, onClose: s } = {}) => {
|
|
@@ -396,29 +396,29 @@ var E = (e, t, n, r) => {
|
|
|
396
396
|
}
|
|
397
397
|
}, t ? a : void 0];
|
|
398
398
|
}, ee = (e, t = {}) => {
|
|
399
|
-
let [n, r] = T(t), i = w(
|
|
400
|
-
|
|
399
|
+
let [n, r] = T(t), i = w(u(e, "function")).current, s = () => {
|
|
400
|
+
d(e, (e) => {
|
|
401
401
|
let n = {};
|
|
402
402
|
for (let r in t) n[r] = e?.[r] ?? t[r];
|
|
403
403
|
r(n);
|
|
404
404
|
});
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
},
|
|
405
|
+
}, c = (t) => {
|
|
406
|
+
o(e, t);
|
|
407
|
+
}, l = G((t, i, o = null) => {
|
|
408
408
|
n[t] = i, r({
|
|
409
409
|
...n,
|
|
410
410
|
[t]: i
|
|
411
411
|
}), !isPath && e(t, i), o?.(a.tool.setOk());
|
|
412
412
|
});
|
|
413
413
|
S(() => {
|
|
414
|
-
i ||
|
|
414
|
+
i || s();
|
|
415
415
|
}, []);
|
|
416
|
-
let
|
|
417
|
-
|
|
416
|
+
let f = Y(([e]) => {
|
|
417
|
+
c(e);
|
|
418
418
|
}, [n]);
|
|
419
|
-
return i &&
|
|
419
|
+
return i && f(), [n, {
|
|
420
420
|
setData: r,
|
|
421
|
-
setKey:
|
|
421
|
+
setKey: l
|
|
422
422
|
}];
|
|
423
423
|
}, te = (e = 10) => {
|
|
424
424
|
let [t, n] = T([]), [r, i] = T(0), [a, o] = T({
|
|
@@ -432,12 +432,12 @@ var E = (e, t, n, r) => {
|
|
|
432
432
|
total: r,
|
|
433
433
|
setValue: (t, r) => {
|
|
434
434
|
let c = a.current;
|
|
435
|
-
|
|
435
|
+
l(r) && (c = 1, s.current = t, i(r), o({
|
|
436
436
|
...a,
|
|
437
437
|
current: c
|
|
438
438
|
}));
|
|
439
|
-
let
|
|
440
|
-
n(t.slice(
|
|
439
|
+
let u = (c - 1) * e, d = u + e;
|
|
440
|
+
n(t.slice(u, d));
|
|
441
441
|
},
|
|
442
442
|
onChange: (e, t) => {
|
|
443
443
|
let r = (e - 1) * t, i = r + t;
|
package/dist/hooks.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./hooks-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./hooks-FYdXNEDe.js";
|
|
2
2
|
export { d as Contexts, o as useAppContext, l as useAsync, i as useFileState, e as useMessage, s as useOnEvent, u as usePagination, t as usePersistFn, a as usePrefixT, f as useResize, n as useStore, r as useVastState, c as useWatch };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./packages-
|
|
1
|
+
import { n as e, t } from "./packages-Dd2mV9Xv.js";
|
|
2
2
|
export { t as AoiGlobal, e as aoiInit };
|