yann-core 0.0.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jaxon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # core-test-vue
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
8
+
9
+ ## Type Support for `.vue` Imports in TS
10
+
11
+ TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
12
+
13
+ ## Customize configuration
14
+
15
+ See [Vite Configuration Reference](https://vite.dev/config/).
16
+
17
+ ## Project Setup
18
+
19
+ ```sh
20
+ pnpm install
21
+ ```
22
+
23
+ ### Compile and Hot-Reload for Development
24
+
25
+ ```sh
26
+ pnpm dev
27
+ ```
28
+
29
+ ### Type-Check, Compile and Minify for Production
30
+
31
+ ```sh
32
+ pnpm build
33
+ ```
34
+
35
+ ### Lint with [ESLint](https://eslint.org/)
36
+
37
+ ```sh
38
+ pnpm lint
39
+ ```
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,2 @@
1
+ declare const _default: any[];
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { useState } from './useState';
2
+ export { useRafTimer } from './useTimer';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { MaybeRefOrGetter, Ref } from 'vue';
2
+ export type UseStateReturn<T> = [Ref<T>, (newVal: T) => boolean];
3
+ export interface UseStateConfig<T> {
4
+ diff?: boolean;
5
+ compare?: (oldVal: T, newVal: T) => boolean;
6
+ beforeSet?: (newVal: T) => T;
7
+ }
8
+ export declare const useState: <T>(source: MaybeRefOrGetter<T>, config?: UseStateConfig<T>) => UseStateReturn<T>;
@@ -0,0 +1,12 @@
1
+ type Callback = () => void | Promise<void>;
2
+ type ControlFunctions = {
3
+ stop: () => void;
4
+ pause: () => void;
5
+ start: () => void;
6
+ };
7
+ interface RafTimerOptions {
8
+ type?: 'waitAfterCallback' | 'ignoreCallbackTime';
9
+ loop?: boolean | number;
10
+ }
11
+ export declare function useRafTimer(callback: Callback, interval?: number, options?: RafTimerOptions): ControlFunctions;
12
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare function isFunction(value: any): value is Function;
2
+ export declare function isFunctionAndExec<R, T extends (...args: any[]) => any>(fn: R | T, ...args: Parameters<T>): ReturnType<T> | undefined;
3
+ export declare function isPromise<T>(obj: T | Promise<T>): obj is Promise<T>;
4
+ export declare function isError(value: any): value is Error;
5
+ export declare function isBoolean(value: any): value is boolean;
6
+ export declare function isNumber(value: any): value is number;
7
+ export declare function isPureNumberString(str: string): boolean;
8
+ export declare function isString(value: any): value is string;
9
+ export declare function strHasContent(value: any): value is string;
10
+ export declare const isObject: (ctx: any) => ctx is object;
11
+ export declare function objHasContent(ctx: any): ctx is object;
12
+ export declare const isArray: (arg: any) => arg is any[];
13
+ export declare function arrHasContent(arg: any): arg is any[];
@@ -0,0 +1,3 @@
1
+ import { UserConfig } from 'vite';
2
+ declare const _default: UserConfig;
3
+ export default _default;
@@ -0,0 +1,565 @@
1
+ import { ref as Ee, toValue as Ie } from "vue";
2
+ var be = typeof global == "object" && global && global.Object === Object && global, Ce = typeof self == "object" && self && self.Object === Object && self, T = be || Ce || Function("return this")(), P = T.Symbol, ve = Object.prototype, Le = ve.hasOwnProperty, Me = ve.toString, x = P ? P.toStringTag : void 0;
3
+ function Re(e) {
4
+ var t = Le.call(e, x), r = e[x];
5
+ try {
6
+ e[x] = void 0;
7
+ var n = !0;
8
+ } catch {
9
+ }
10
+ var i = Me.call(e);
11
+ return n && (t ? e[x] = r : delete e[x]), i;
12
+ }
13
+ var De = Object.prototype, Fe = De.toString;
14
+ function Ge(e) {
15
+ return Fe.call(e);
16
+ }
17
+ var Ne = "[object Null]", Ue = "[object Undefined]", V = P ? P.toStringTag : void 0;
18
+ function M(e) {
19
+ return e == null ? e === void 0 ? Ue : Ne : V && V in Object(e) ? Re(e) : Ge(e);
20
+ }
21
+ function I(e) {
22
+ return e != null && typeof e == "object";
23
+ }
24
+ var G = Array.isArray;
25
+ function Te(e) {
26
+ var t = typeof e;
27
+ return e != null && (t == "object" || t == "function");
28
+ }
29
+ var ze = "[object AsyncFunction]", Be = "[object Function]", He = "[object GeneratorFunction]", Ke = "[object Proxy]";
30
+ function Ae(e) {
31
+ if (!Te(e))
32
+ return !1;
33
+ var t = M(e);
34
+ return t == Be || t == He || t == ze || t == Ke;
35
+ }
36
+ var B = T["__core-js_shared__"], k = function() {
37
+ var e = /[^.]+$/.exec(B && B.keys && B.keys.IE_PROTO || "");
38
+ return e ? "Symbol(src)_1." + e : "";
39
+ }();
40
+ function qe(e) {
41
+ return !!k && k in e;
42
+ }
43
+ var We = Function.prototype, Xe = We.toString;
44
+ function $(e) {
45
+ if (e != null) {
46
+ try {
47
+ return Xe.call(e);
48
+ } catch {
49
+ }
50
+ try {
51
+ return e + "";
52
+ } catch {
53
+ }
54
+ }
55
+ return "";
56
+ }
57
+ var Je = /[\\^$.*+?()[\]{}|]/g, Ye = /^\[object .+?Constructor\]$/, Ze = Function.prototype, Qe = Object.prototype, Ve = Ze.toString, ke = Qe.hasOwnProperty, et = RegExp(
58
+ "^" + Ve.call(ke).replace(Je, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
59
+ );
60
+ function tt(e) {
61
+ if (!Te(e) || qe(e))
62
+ return !1;
63
+ var t = Ae(e) ? et : Ye;
64
+ return t.test($(e));
65
+ }
66
+ function rt(e, t) {
67
+ return e == null ? void 0 : e[t];
68
+ }
69
+ function S(e, t) {
70
+ var r = rt(e, t);
71
+ return tt(r) ? r : void 0;
72
+ }
73
+ var W = S(T, "WeakMap"), nt = 9007199254740991, at = /^(?:0|[1-9]\d*)$/;
74
+ function it(e, t) {
75
+ var r = typeof e;
76
+ return t = t ?? nt, !!t && (r == "number" || r != "symbol" && at.test(e)) && e > -1 && e % 1 == 0 && e < t;
77
+ }
78
+ function me(e, t) {
79
+ return e === t || e !== e && t !== t;
80
+ }
81
+ var ot = 9007199254740991;
82
+ function we(e) {
83
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= ot;
84
+ }
85
+ function st(e) {
86
+ return e != null && we(e.length) && !Ae(e);
87
+ }
88
+ var ut = Object.prototype;
89
+ function ft(e) {
90
+ var t = e && e.constructor, r = typeof t == "function" && t.prototype || ut;
91
+ return e === r;
92
+ }
93
+ function ct(e, t) {
94
+ for (var r = -1, n = Array(e); ++r < e; )
95
+ n[r] = t(r);
96
+ return n;
97
+ }
98
+ var lt = "[object Arguments]";
99
+ function ee(e) {
100
+ return I(e) && M(e) == lt;
101
+ }
102
+ var Oe = Object.prototype, pt = Oe.hasOwnProperty, dt = Oe.propertyIsEnumerable, gt = ee(/* @__PURE__ */ function() {
103
+ return arguments;
104
+ }()) ? ee : function(e) {
105
+ return I(e) && pt.call(e, "callee") && !dt.call(e, "callee");
106
+ };
107
+ function _t() {
108
+ return !1;
109
+ }
110
+ var $e = typeof exports == "object" && exports && !exports.nodeType && exports, te = $e && typeof module == "object" && module && !module.nodeType && module, ht = te && te.exports === $e, re = ht ? T.Buffer : void 0, yt = re ? re.isBuffer : void 0, X = yt || _t, bt = "[object Arguments]", vt = "[object Array]", Tt = "[object Boolean]", At = "[object Date]", mt = "[object Error]", wt = "[object Function]", Ot = "[object Map]", $t = "[object Number]", jt = "[object Object]", Pt = "[object RegExp]", St = "[object Set]", xt = "[object String]", Et = "[object WeakMap]", It = "[object ArrayBuffer]", Ct = "[object DataView]", Lt = "[object Float32Array]", Mt = "[object Float64Array]", Rt = "[object Int8Array]", Dt = "[object Int16Array]", Ft = "[object Int32Array]", Gt = "[object Uint8Array]", Nt = "[object Uint8ClampedArray]", Ut = "[object Uint16Array]", zt = "[object Uint32Array]", c = {};
111
+ c[Lt] = c[Mt] = c[Rt] = c[Dt] = c[Ft] = c[Gt] = c[Nt] = c[Ut] = c[zt] = !0;
112
+ c[bt] = c[vt] = c[It] = c[Tt] = c[Ct] = c[At] = c[mt] = c[wt] = c[Ot] = c[$t] = c[jt] = c[Pt] = c[St] = c[xt] = c[Et] = !1;
113
+ function Bt(e) {
114
+ return I(e) && we(e.length) && !!c[M(e)];
115
+ }
116
+ function Ht(e) {
117
+ return function(t) {
118
+ return e(t);
119
+ };
120
+ }
121
+ var je = typeof exports == "object" && exports && !exports.nodeType && exports, E = je && typeof module == "object" && module && !module.nodeType && module, Kt = E && E.exports === je, H = Kt && be.process, ne = function() {
122
+ try {
123
+ var e = E && E.require && E.require("util").types;
124
+ return e || H && H.binding && H.binding("util");
125
+ } catch {
126
+ }
127
+ }(), ae = ne && ne.isTypedArray, Pe = ae ? Ht(ae) : Bt, qt = Object.prototype, Wt = qt.hasOwnProperty;
128
+ function Xt(e, t) {
129
+ var r = G(e), n = !r && gt(e), i = !r && !n && X(e), a = !r && !n && !i && Pe(e), u = r || n || i || a, o = u ? ct(e.length, String) : [], s = o.length;
130
+ for (var f in e)
131
+ Wt.call(e, f) && !(u && // Safari 9 has enumerable `arguments.length` in strict mode.
132
+ (f == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
133
+ i && (f == "offset" || f == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
134
+ a && (f == "buffer" || f == "byteLength" || f == "byteOffset") || // Skip index properties.
135
+ it(f, s))) && o.push(f);
136
+ return o;
137
+ }
138
+ function Jt(e, t) {
139
+ return function(r) {
140
+ return e(t(r));
141
+ };
142
+ }
143
+ var Yt = Jt(Object.keys, Object), Zt = Object.prototype, Qt = Zt.hasOwnProperty;
144
+ function Vt(e) {
145
+ if (!ft(e))
146
+ return Yt(e);
147
+ var t = [];
148
+ for (var r in Object(e))
149
+ Qt.call(e, r) && r != "constructor" && t.push(r);
150
+ return t;
151
+ }
152
+ function kt(e) {
153
+ return st(e) ? Xt(e) : Vt(e);
154
+ }
155
+ var C = S(Object, "create");
156
+ function er() {
157
+ this.__data__ = C ? C(null) : {}, this.size = 0;
158
+ }
159
+ function tr(e) {
160
+ var t = this.has(e) && delete this.__data__[e];
161
+ return this.size -= t ? 1 : 0, t;
162
+ }
163
+ var rr = "__lodash_hash_undefined__", nr = Object.prototype, ar = nr.hasOwnProperty;
164
+ function ir(e) {
165
+ var t = this.__data__;
166
+ if (C) {
167
+ var r = t[e];
168
+ return r === rr ? void 0 : r;
169
+ }
170
+ return ar.call(t, e) ? t[e] : void 0;
171
+ }
172
+ var or = Object.prototype, sr = or.hasOwnProperty;
173
+ function ur(e) {
174
+ var t = this.__data__;
175
+ return C ? t[e] !== void 0 : sr.call(t, e);
176
+ }
177
+ var fr = "__lodash_hash_undefined__";
178
+ function cr(e, t) {
179
+ var r = this.__data__;
180
+ return this.size += this.has(e) ? 0 : 1, r[e] = C && t === void 0 ? fr : t, this;
181
+ }
182
+ function O(e) {
183
+ var t = -1, r = e == null ? 0 : e.length;
184
+ for (this.clear(); ++t < r; ) {
185
+ var n = e[t];
186
+ this.set(n[0], n[1]);
187
+ }
188
+ }
189
+ O.prototype.clear = er;
190
+ O.prototype.delete = tr;
191
+ O.prototype.get = ir;
192
+ O.prototype.has = ur;
193
+ O.prototype.set = cr;
194
+ function lr() {
195
+ this.__data__ = [], this.size = 0;
196
+ }
197
+ function U(e, t) {
198
+ for (var r = e.length; r--; )
199
+ if (me(e[r][0], t))
200
+ return r;
201
+ return -1;
202
+ }
203
+ var pr = Array.prototype, dr = pr.splice;
204
+ function gr(e) {
205
+ var t = this.__data__, r = U(t, e);
206
+ if (r < 0)
207
+ return !1;
208
+ var n = t.length - 1;
209
+ return r == n ? t.pop() : dr.call(t, r, 1), --this.size, !0;
210
+ }
211
+ function _r(e) {
212
+ var t = this.__data__, r = U(t, e);
213
+ return r < 0 ? void 0 : t[r][1];
214
+ }
215
+ function hr(e) {
216
+ return U(this.__data__, e) > -1;
217
+ }
218
+ function yr(e, t) {
219
+ var r = this.__data__, n = U(r, e);
220
+ return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this;
221
+ }
222
+ function A(e) {
223
+ var t = -1, r = e == null ? 0 : e.length;
224
+ for (this.clear(); ++t < r; ) {
225
+ var n = e[t];
226
+ this.set(n[0], n[1]);
227
+ }
228
+ }
229
+ A.prototype.clear = lr;
230
+ A.prototype.delete = gr;
231
+ A.prototype.get = _r;
232
+ A.prototype.has = hr;
233
+ A.prototype.set = yr;
234
+ var L = S(T, "Map");
235
+ function br() {
236
+ this.size = 0, this.__data__ = {
237
+ hash: new O(),
238
+ map: new (L || A)(),
239
+ string: new O()
240
+ };
241
+ }
242
+ function vr(e) {
243
+ var t = typeof e;
244
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
245
+ }
246
+ function z(e, t) {
247
+ var r = e.__data__;
248
+ return vr(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
249
+ }
250
+ function Tr(e) {
251
+ var t = z(this, e).delete(e);
252
+ return this.size -= t ? 1 : 0, t;
253
+ }
254
+ function Ar(e) {
255
+ return z(this, e).get(e);
256
+ }
257
+ function mr(e) {
258
+ return z(this, e).has(e);
259
+ }
260
+ function wr(e, t) {
261
+ var r = z(this, e), n = r.size;
262
+ return r.set(e, t), this.size += r.size == n ? 0 : 1, this;
263
+ }
264
+ function j(e) {
265
+ var t = -1, r = e == null ? 0 : e.length;
266
+ for (this.clear(); ++t < r; ) {
267
+ var n = e[t];
268
+ this.set(n[0], n[1]);
269
+ }
270
+ }
271
+ j.prototype.clear = br;
272
+ j.prototype.delete = Tr;
273
+ j.prototype.get = Ar;
274
+ j.prototype.has = mr;
275
+ j.prototype.set = wr;
276
+ function Or(e, t) {
277
+ for (var r = -1, n = t.length, i = e.length; ++r < n; )
278
+ e[i + r] = t[r];
279
+ return e;
280
+ }
281
+ function $r() {
282
+ this.__data__ = new A(), this.size = 0;
283
+ }
284
+ function jr(e) {
285
+ var t = this.__data__, r = t.delete(e);
286
+ return this.size = t.size, r;
287
+ }
288
+ function Pr(e) {
289
+ return this.__data__.get(e);
290
+ }
291
+ function Sr(e) {
292
+ return this.__data__.has(e);
293
+ }
294
+ var xr = 200;
295
+ function Er(e, t) {
296
+ var r = this.__data__;
297
+ if (r instanceof A) {
298
+ var n = r.__data__;
299
+ if (!L || n.length < xr - 1)
300
+ return n.push([e, t]), this.size = ++r.size, this;
301
+ r = this.__data__ = new j(n);
302
+ }
303
+ return r.set(e, t), this.size = r.size, this;
304
+ }
305
+ function w(e) {
306
+ var t = this.__data__ = new A(e);
307
+ this.size = t.size;
308
+ }
309
+ w.prototype.clear = $r;
310
+ w.prototype.delete = jr;
311
+ w.prototype.get = Pr;
312
+ w.prototype.has = Sr;
313
+ w.prototype.set = Er;
314
+ function Ir(e, t) {
315
+ for (var r = -1, n = e == null ? 0 : e.length, i = 0, a = []; ++r < n; ) {
316
+ var u = e[r];
317
+ t(u, r, e) && (a[i++] = u);
318
+ }
319
+ return a;
320
+ }
321
+ function Cr() {
322
+ return [];
323
+ }
324
+ var Lr = Object.prototype, Mr = Lr.propertyIsEnumerable, ie = Object.getOwnPropertySymbols, Rr = ie ? function(e) {
325
+ return e == null ? [] : (e = Object(e), Ir(ie(e), function(t) {
326
+ return Mr.call(e, t);
327
+ }));
328
+ } : Cr;
329
+ function Dr(e, t, r) {
330
+ var n = t(e);
331
+ return G(e) ? n : Or(n, r(e));
332
+ }
333
+ function oe(e) {
334
+ return Dr(e, kt, Rr);
335
+ }
336
+ var J = S(T, "DataView"), Y = S(T, "Promise"), Z = S(T, "Set"), se = "[object Map]", Fr = "[object Object]", ue = "[object Promise]", fe = "[object Set]", ce = "[object WeakMap]", le = "[object DataView]", Gr = $(J), Nr = $(L), Ur = $(Y), zr = $(Z), Br = $(W), m = M;
337
+ (J && m(new J(new ArrayBuffer(1))) != le || L && m(new L()) != se || Y && m(Y.resolve()) != ue || Z && m(new Z()) != fe || W && m(new W()) != ce) && (m = function(e) {
338
+ var t = M(e), r = t == Fr ? e.constructor : void 0, n = r ? $(r) : "";
339
+ if (n)
340
+ switch (n) {
341
+ case Gr:
342
+ return le;
343
+ case Nr:
344
+ return se;
345
+ case Ur:
346
+ return ue;
347
+ case zr:
348
+ return fe;
349
+ case Br:
350
+ return ce;
351
+ }
352
+ return t;
353
+ });
354
+ var pe = T.Uint8Array, Hr = "__lodash_hash_undefined__";
355
+ function Kr(e) {
356
+ return this.__data__.set(e, Hr), this;
357
+ }
358
+ function qr(e) {
359
+ return this.__data__.has(e);
360
+ }
361
+ function N(e) {
362
+ var t = -1, r = e == null ? 0 : e.length;
363
+ for (this.__data__ = new j(); ++t < r; )
364
+ this.add(e[t]);
365
+ }
366
+ N.prototype.add = N.prototype.push = Kr;
367
+ N.prototype.has = qr;
368
+ function Wr(e, t) {
369
+ for (var r = -1, n = e == null ? 0 : e.length; ++r < n; )
370
+ if (t(e[r], r, e))
371
+ return !0;
372
+ return !1;
373
+ }
374
+ function Xr(e, t) {
375
+ return e.has(t);
376
+ }
377
+ var Jr = 1, Yr = 2;
378
+ function Se(e, t, r, n, i, a) {
379
+ var u = r & Jr, o = e.length, s = t.length;
380
+ if (o != s && !(u && s > o))
381
+ return !1;
382
+ var f = a.get(e), g = a.get(t);
383
+ if (f && g)
384
+ return f == t && g == e;
385
+ var d = -1, l = !0, y = r & Yr ? new N() : void 0;
386
+ for (a.set(e, t), a.set(t, e); ++d < o; ) {
387
+ var _ = e[d], h = t[d];
388
+ if (n)
389
+ var p = u ? n(h, _, d, t, e, a) : n(_, h, d, e, t, a);
390
+ if (p !== void 0) {
391
+ if (p)
392
+ continue;
393
+ l = !1;
394
+ break;
395
+ }
396
+ if (y) {
397
+ if (!Wr(t, function(b, v) {
398
+ if (!Xr(y, v) && (_ === b || i(_, b, r, n, a)))
399
+ return y.push(v);
400
+ })) {
401
+ l = !1;
402
+ break;
403
+ }
404
+ } else if (!(_ === h || i(_, h, r, n, a))) {
405
+ l = !1;
406
+ break;
407
+ }
408
+ }
409
+ return a.delete(e), a.delete(t), l;
410
+ }
411
+ function Zr(e) {
412
+ var t = -1, r = Array(e.size);
413
+ return e.forEach(function(n, i) {
414
+ r[++t] = [i, n];
415
+ }), r;
416
+ }
417
+ function Qr(e) {
418
+ var t = -1, r = Array(e.size);
419
+ return e.forEach(function(n) {
420
+ r[++t] = n;
421
+ }), r;
422
+ }
423
+ var Vr = 1, kr = 2, en = "[object Boolean]", tn = "[object Date]", rn = "[object Error]", nn = "[object Map]", an = "[object Number]", on = "[object RegExp]", sn = "[object Set]", un = "[object String]", fn = "[object Symbol]", cn = "[object ArrayBuffer]", ln = "[object DataView]", de = P ? P.prototype : void 0, K = de ? de.valueOf : void 0;
424
+ function pn(e, t, r, n, i, a, u) {
425
+ switch (r) {
426
+ case ln:
427
+ if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
428
+ return !1;
429
+ e = e.buffer, t = t.buffer;
430
+ case cn:
431
+ return !(e.byteLength != t.byteLength || !a(new pe(e), new pe(t)));
432
+ case en:
433
+ case tn:
434
+ case an:
435
+ return me(+e, +t);
436
+ case rn:
437
+ return e.name == t.name && e.message == t.message;
438
+ case on:
439
+ case un:
440
+ return e == t + "";
441
+ case nn:
442
+ var o = Zr;
443
+ case sn:
444
+ var s = n & Vr;
445
+ if (o || (o = Qr), e.size != t.size && !s)
446
+ return !1;
447
+ var f = u.get(e);
448
+ if (f)
449
+ return f == t;
450
+ n |= kr, u.set(e, t);
451
+ var g = Se(o(e), o(t), n, i, a, u);
452
+ return u.delete(e), g;
453
+ case fn:
454
+ if (K)
455
+ return K.call(e) == K.call(t);
456
+ }
457
+ return !1;
458
+ }
459
+ var dn = 1, gn = Object.prototype, _n = gn.hasOwnProperty;
460
+ function hn(e, t, r, n, i, a) {
461
+ var u = r & dn, o = oe(e), s = o.length, f = oe(t), g = f.length;
462
+ if (s != g && !u)
463
+ return !1;
464
+ for (var d = s; d--; ) {
465
+ var l = o[d];
466
+ if (!(u ? l in t : _n.call(t, l)))
467
+ return !1;
468
+ }
469
+ var y = a.get(e), _ = a.get(t);
470
+ if (y && _)
471
+ return y == t && _ == e;
472
+ var h = !0;
473
+ a.set(e, t), a.set(t, e);
474
+ for (var p = u; ++d < s; ) {
475
+ l = o[d];
476
+ var b = e[l], v = t[l];
477
+ if (n)
478
+ var Q = u ? n(v, b, l, t, e, a) : n(b, v, l, e, t, a);
479
+ if (!(Q === void 0 ? b === v || i(b, v, r, n, a) : Q)) {
480
+ h = !1;
481
+ break;
482
+ }
483
+ p || (p = l == "constructor");
484
+ }
485
+ if (h && !p) {
486
+ var R = e.constructor, D = t.constructor;
487
+ R != D && "constructor" in e && "constructor" in t && !(typeof R == "function" && R instanceof R && typeof D == "function" && D instanceof D) && (h = !1);
488
+ }
489
+ return a.delete(e), a.delete(t), h;
490
+ }
491
+ var yn = 1, ge = "[object Arguments]", _e = "[object Array]", F = "[object Object]", bn = Object.prototype, he = bn.hasOwnProperty;
492
+ function vn(e, t, r, n, i, a) {
493
+ var u = G(e), o = G(t), s = u ? _e : m(e), f = o ? _e : m(t);
494
+ s = s == ge ? F : s, f = f == ge ? F : f;
495
+ var g = s == F, d = f == F, l = s == f;
496
+ if (l && X(e)) {
497
+ if (!X(t))
498
+ return !1;
499
+ u = !0, g = !1;
500
+ }
501
+ if (l && !g)
502
+ return a || (a = new w()), u || Pe(e) ? Se(e, t, r, n, i, a) : pn(e, t, s, r, n, i, a);
503
+ if (!(r & yn)) {
504
+ var y = g && he.call(e, "__wrapped__"), _ = d && he.call(t, "__wrapped__");
505
+ if (y || _) {
506
+ var h = y ? e.value() : e, p = _ ? t.value() : t;
507
+ return a || (a = new w()), i(h, p, r, n, a);
508
+ }
509
+ }
510
+ return l ? (a || (a = new w()), hn(e, t, r, n, i, a)) : !1;
511
+ }
512
+ function xe(e, t, r, n, i) {
513
+ return e === t ? !0 : e == null || t == null || !I(e) && !I(t) ? e !== e && t !== t : vn(e, t, r, n, xe, i);
514
+ }
515
+ function Tn(e, t) {
516
+ return xe(e, t);
517
+ }
518
+ function q(e) {
519
+ return typeof e == "function";
520
+ }
521
+ const mn = (e, t) => {
522
+ const r = Ee(Ie(e)), n = (a) => (r.value = q(t == null ? void 0 : t.beforeSet) ? t.beforeSet(a) : a, !0), i = (a) => (q(t == null ? void 0 : t.compare) ? t.compare(r.value, a) : Tn(r.value, a)) ? !1 : n(a);
523
+ return t != null && t.diff || q(t == null ? void 0 : t.compare) ? [r, i] : [r, n];
524
+ }, ye = 1e3 / 60;
525
+ function wn(e, t = ye, r = {}) {
526
+ const { type: n = "ignoreCallbackTime", loop: i = !0 } = r;
527
+ t = typeof t == "number" ? t : ye;
528
+ let a = "running", u = performance.now() + t, o = null, s = null, f = 0, g = typeof i == "number" ? Math.max(1, i) : i ? 1 / 0 : 1;
529
+ const d = async () => {
530
+ if (a !== "running") return;
531
+ const p = performance.now(), b = u - p;
532
+ if (b <= 0)
533
+ try {
534
+ const v = e();
535
+ if (v instanceof Promise && await v, g = Math.max(0, g - 1), g === 0) {
536
+ y();
537
+ return;
538
+ }
539
+ u = n === "waitAfterCallback" ? performance.now() + t : p + t;
540
+ } finally {
541
+ l();
542
+ }
543
+ else
544
+ l(b);
545
+ }, l = (p = t) => {
546
+ if (a !== "running") return;
547
+ const b = t * 1.5, v = Math.max(0, p - 5);
548
+ o && clearTimeout(o), s && cancelAnimationFrame(s), p > b ? o = setTimeout(() => {
549
+ s = requestAnimationFrame(d);
550
+ }, v) : s = requestAnimationFrame(d);
551
+ }, y = () => {
552
+ a = "stopped", o && clearTimeout(o), s && cancelAnimationFrame(s), o = s = null;
553
+ }, _ = () => {
554
+ a === "running" && (a = "paused", f = performance.now(), o && clearTimeout(o), s && cancelAnimationFrame(s), o = s = null);
555
+ }, h = () => {
556
+ if (a === "stopped" || a === "running") return;
557
+ const p = performance.now() - f;
558
+ u += p, a = "running", l();
559
+ };
560
+ return l(), { stop: y, pause: _, start: h };
561
+ }
562
+ export {
563
+ wn as useRafTimer,
564
+ mn as useState
565
+ };
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "yann-core",
3
+ "version": "0.0.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "scripts": {
7
+ "build": "run-p type-check \"build-only {@}\" --",
8
+ "build-only": "vite build",
9
+ "type-check": "vue-tsc --build",
10
+ "lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
11
+ "lint:eslint": "eslint . --fix",
12
+ "lint": "run-s lint:*",
13
+ "format": "prettier --write src/"
14
+ },
15
+ "dependencies": {
16
+ "@vueuse/core": "^12.8.2",
17
+ "localforage": "^1.10.0",
18
+ "lodash-es": "^4.17.21",
19
+ "nanoid": "^5.1.3",
20
+ "p-limit": "^6.2.0",
21
+ "pinia": "^3.0.1",
22
+ "radash": "^12.1.0",
23
+ "vue": "^3.5.13",
24
+ "vue-i18n": "^11.1.2",
25
+ "vue-router": "^4.5.0"
26
+ },
27
+ "devDependencies": {
28
+ "@tsconfig/node22": "^22.0.0",
29
+ "@types/lodash-es": "^4.17.12",
30
+ "@types/node": "^22.13.4",
31
+ "@vitejs/plugin-vue": "^5.2.1",
32
+ "@vitejs/plugin-vue-jsx": "^4.1.1",
33
+ "@vue/eslint-config-prettier": "^10.2.0",
34
+ "@vue/eslint-config-typescript": "^14.4.0",
35
+ "@vue/tsconfig": "^0.7.0",
36
+ "eslint": "^9.20.1",
37
+ "eslint-plugin-oxlint": "^0.15.10",
38
+ "eslint-plugin-vue": "^9.32.0",
39
+ "jiti": "^2.4.2",
40
+ "npm-run-all2": "^7.0.2",
41
+ "oxlint": "^0.15.10",
42
+ "prettier": "^3.5.1",
43
+ "typescript": "~5.7.3",
44
+ "vite": "^6.1.0",
45
+ "vite-plugin-dts": "^4.5.3",
46
+ "vite-plugin-vue-devtools": "^7.7.2",
47
+ "vue-tsc": "^2.2.2"
48
+ },
49
+ "files": ["dist"]
50
+ }