aptechka 0.1.9 → 0.1.10
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/lib/Composed-C2Vv1xxR.cjs +1 -0
- package/lib/Composed-DhtYBEmo.js +79 -0
- package/lib/component/Component.d.ts +29 -0
- package/lib/component/hooks/animation.d.ts +9 -0
- package/lib/component/hooks/context.d.ts +2 -0
- package/lib/component/hooks/intersection.d.ts +4 -0
- package/lib/component/hooks/resize.d.ts +6 -0
- package/lib/component/hooks/shadow.d.ts +1 -0
- package/lib/component/hooks/stores.d.ts +6 -0
- package/lib/component/hooks/style.d.ts +2 -0
- package/lib/component/index.cjs +1 -0
- package/lib/component/index.d.ts +7 -0
- package/lib/component/index.js +187 -0
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.js +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +1 -1
- package/lib/element-constructor/tags.d.ts +2 -3
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.d.ts +1 -1
- package/lib/element-resizer/index.js +2 -1
- package/lib/en3/core/en3.d.ts +2 -2
- package/lib/en3/objects/En3Clip.d.ts +1 -1
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.d.ts +1 -1
- package/lib/intersector/index.js +2 -1
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +2 -2
- package/lib/layout-box/index.js +70 -72
- package/lib/object-C1ph624j.cjs +1 -0
- package/lib/object-DIPjdukP.js +73 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +79 -71
- package/lib/router/Route.d.ts +8 -2
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -2
- package/lib/router/index.js +139 -140
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +48 -111
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.d.ts +1 -1
- package/lib/ticker/index.js +33 -37
- package/lib/utils/dom.d.ts +2 -2
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +113 -168
- package/lib/utils/object.d.ts +1 -0
- package/package.json +10 -2
- package/lib/router/RouteElement.d.ts +0 -14
package/lib/store/index.js
CHANGED
|
@@ -1,138 +1,75 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var v = (t, s, e) => {
|
|
2
|
+
if (!s.has(t))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
5
|
+
var i = (t, s, e) => (v(t, s, "read from private field"), e ? e.call(t) : s.get(t)), n = (t, s, e) => {
|
|
6
|
+
if (s.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
var
|
|
11
|
-
set _(
|
|
12
|
-
|
|
8
|
+
s instanceof WeakSet ? s.add(t) : s.set(t, e);
|
|
9
|
+
}, p = (t, s, e, r) => (v(t, s, "write to private field"), r ? r.call(t, e) : s.set(t, e), e);
|
|
10
|
+
var f = (t, s, e, r) => ({
|
|
11
|
+
set _(a) {
|
|
12
|
+
p(t, s, a, e);
|
|
13
13
|
},
|
|
14
14
|
get _() {
|
|
15
|
-
return
|
|
15
|
+
return i(t, s, r);
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var d = (t, s, e) => new Promise((r, a) => {
|
|
19
|
+
var g = (o) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
21
|
+
m(e.next(o));
|
|
22
|
+
} catch (h) {
|
|
23
|
+
a(h);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, x = (o) => {
|
|
26
26
|
try {
|
|
27
|
-
|
|
28
|
-
} catch (
|
|
29
|
-
|
|
27
|
+
m(e.throw(o));
|
|
28
|
+
} catch (h) {
|
|
29
|
+
a(h);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
31
|
+
}, m = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(g, x);
|
|
32
|
+
m((e = e.apply(t, s)).next());
|
|
33
33
|
});
|
|
34
|
-
import { S as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
var
|
|
39
|
-
class
|
|
40
|
-
constructor(
|
|
41
|
-
super(
|
|
42
|
-
n(this, m, void 0);
|
|
43
|
-
h(this, m, s.subscribe((o) => {
|
|
44
|
-
const a = [];
|
|
45
|
-
o.current.forEach((d, i) => {
|
|
46
|
-
var f;
|
|
47
|
-
o.current[i] === ((f = o.previous) == null ? void 0 : f[i]) && this.current[i] ? a.push(this.current[i]) : a.push(r(d));
|
|
48
|
-
}), this.current = a;
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
close() {
|
|
52
|
-
super.close(), u(this, m).call(this);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
m = new WeakMap();
|
|
56
|
-
var b, l, p;
|
|
57
|
-
class E extends A {
|
|
58
|
-
constructor(s, r, c) {
|
|
59
|
-
super(s, c);
|
|
60
|
-
n(this, b, void 0);
|
|
61
|
-
n(this, l, void 0);
|
|
62
|
-
n(this, p, 0);
|
|
63
|
-
h(this, l, new A(!1)), h(this, b, r), c != null && c.manualControl || this.refetch();
|
|
64
|
-
}
|
|
65
|
-
get isPending() {
|
|
66
|
-
return u(this, l);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Calls fetcher again and sets isPending to true.
|
|
70
|
-
*/
|
|
71
|
-
refetch() {
|
|
72
|
-
u(this, l).current = !0, h(this, p, u(this, p) + 1);
|
|
73
|
-
const s = u(this, p);
|
|
74
|
-
u(this, b).call(this).then((r) => {
|
|
75
|
-
s === u(this, p) && (u(this, l).current = !1, this.current = r);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
b = new WeakMap(), l = new WeakMap(), p = new WeakMap();
|
|
80
|
-
var v, x, g;
|
|
81
|
-
class N extends E {
|
|
82
|
-
constructor(s, r, c = 100) {
|
|
83
|
-
super(s, r, {
|
|
34
|
+
import { S as I, a as b, s as k } from "../Store-JOKrNVEr.js";
|
|
35
|
+
import { D as j } from "../Derived-Bc88XJ8J.js";
|
|
36
|
+
import { R as A } from "../Composed-DhtYBEmo.js";
|
|
37
|
+
import { C as w, D as z } from "../Composed-DhtYBEmo.js";
|
|
38
|
+
var c, u, l;
|
|
39
|
+
class R extends A {
|
|
40
|
+
constructor(e, r, a = 100) {
|
|
41
|
+
super(e, r, {
|
|
84
42
|
manualControl: !0,
|
|
85
43
|
skipSubscribeNotification: !0
|
|
86
44
|
});
|
|
87
|
-
n(this,
|
|
88
|
-
n(this,
|
|
89
|
-
n(this,
|
|
90
|
-
|
|
45
|
+
n(this, c, void 0);
|
|
46
|
+
n(this, u, void 0);
|
|
47
|
+
n(this, l, 0);
|
|
48
|
+
p(this, u, a);
|
|
91
49
|
}
|
|
92
50
|
get step() {
|
|
93
|
-
return
|
|
51
|
+
return i(this, l);
|
|
94
52
|
}
|
|
95
53
|
startAccumulating() {
|
|
96
|
-
|
|
97
|
-
++
|
|
98
|
-
}),
|
|
54
|
+
p(this, c, setInterval(() => d(this, null, function* () {
|
|
55
|
+
++f(this, l)._, this.refetch();
|
|
56
|
+
}), i(this, u)));
|
|
99
57
|
}
|
|
100
58
|
stopAccumulating() {
|
|
101
|
-
clearInterval(
|
|
59
|
+
clearInterval(i(this, c));
|
|
102
60
|
}
|
|
103
61
|
close() {
|
|
104
62
|
super.close(), this.stopAccumulating();
|
|
105
63
|
}
|
|
106
64
|
}
|
|
107
|
-
|
|
108
|
-
var I;
|
|
109
|
-
class j extends A {
|
|
110
|
-
constructor(s, r, c) {
|
|
111
|
-
super(null, c);
|
|
112
|
-
n(this, I, []);
|
|
113
|
-
const o = D(() => {
|
|
114
|
-
this.current = r();
|
|
115
|
-
}, 0);
|
|
116
|
-
s.forEach((a) => {
|
|
117
|
-
u(this, I).push(
|
|
118
|
-
a.subscribe(() => {
|
|
119
|
-
o();
|
|
120
|
-
})
|
|
121
|
-
);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
close() {
|
|
125
|
-
super.close(), u(this, I).forEach((s) => s());
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
I = new WeakMap();
|
|
65
|
+
c = new WeakMap(), u = new WeakMap(), l = new WeakMap();
|
|
129
66
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
67
|
+
w as Composed,
|
|
68
|
+
R as CumulativeResource,
|
|
69
|
+
j as Derived,
|
|
70
|
+
z as DerivedArray,
|
|
71
|
+
A as Resource,
|
|
72
|
+
I as Store,
|
|
73
|
+
b as activeStores,
|
|
74
|
+
k as storeRegistry
|
|
138
75
|
};
|
package/lib/ticker/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var A=(r,e,s)=>{if(!e.has(r))throw TypeError("Cannot "+s)};var i=(r,e,s)=>(A(r,e,"read from private field"),s?s.call(r):e.get(r)),h=(r,e,s)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,s)},t=(r,e,s,n)=>(A(r,e,"write to private field"),n?n.call(r,s):e.set(r,s),s);var T=(r,e,s)=>(A(r,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../intersector/index.cjs"),L=require("../browser-CpzFX2xg.cjs");var f,l,g,b,u,m,y;class M{constructor(e,s){h(this,f,void 0);h(this,l,void 0);h(this,g,void 0);h(this,b,0);h(this,u,0);h(this,m,!1);h(this,y,e=>{t(this,m,e.isIntersecting)});t(this,f,e),t(this,l,s==null?void 0:s.maxFPS),t(this,g,(s==null?void 0:s.order)||0),s!=null&&s.culling&&L.isBrowser?x.intersector.subscribe(s.culling,i(this,y)):t(this,m,!0)}get callback(){return i(this,f)}get order(){return i(this,g)}sync(e){t(this,b,e-i(this,u))}tick(e){if(t(this,u,Math.max(0,e-i(this,b))),i(this,l))if(i(this,u)>=1e3/i(this,l))t(this,b,e-i(this,u)%i(this,l));else return;else t(this,b,e);i(this,m)&&i(this,f).call(this,{elapsed:i(this,u),timestamp:e})}destroy(){x.intersector.unsubscribe(i(this,y))}}f=new WeakMap,l=new WeakMap,g=new WeakMap,b=new WeakMap,u=new WeakMap,m=new WeakMap,y=new WeakMap;var k,d,a,o,c,q,E,F,S,v,w;class B{constructor(){h(this,q);h(this,F);h(this,k,0);h(this,d,0);h(this,a,void 0);h(this,o,!1);h(this,c,[]);h(this,v,e=>{if(i(this,o)){t(this,o,!1),t(this,k,e-i(this,d));for(const s of i(this,c))s.sync(i(this,d))}t(this,a,requestAnimationFrame(i(this,v))),t(this,d,e-i(this,k));for(const s of i(this,c))s.tick(i(this,d))});h(this,w,()=>{document.hidden&&t(this,o,!0)});L.isBrowser&&document.addEventListener("visibilitychange",i(this,w))}subscribe(e,s){if(!i(this,c).find(n=>n.callback===e)){const n=new M(e,s);n.sync(performance.now()),i(this,c).push(n),t(this,c,i(this,c).sort((P,I)=>P.order-I.order))}return T(this,q,E).call(this),()=>this.unsubscribe(e)}unsubscribe(e){const s=i(this,c).filter(n=>n.callback===e);s.length&&(s.forEach(n=>n.destroy()),t(this,c,i(this,c).filter(n=>n.callback!==e)),i(this,c).length||T(this,F,S).call(this))}destroy(){L.isBrowser&&(T(this,F,S).call(this),document.removeEventListener("visibilitychange",i(this,w)))}}k=new WeakMap,d=new WeakMap,a=new WeakMap,o=new WeakMap,c=new WeakMap,q=new WeakSet,E=function(){i(this,c).length&&!i(this,a)&&t(this,a,requestAnimationFrame(i(this,v)))},F=new WeakSet,S=function(){i(this,a)&&(cancelAnimationFrame(i(this,a)),t(this,a,void 0))},v=new WeakMap,w=new WeakMap;const V=new B;exports.Ticker=B;exports.ticker=V;
|
package/lib/ticker/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface TickerAddOptions {
|
|
|
12
12
|
export declare class Ticker {
|
|
13
13
|
#private;
|
|
14
14
|
constructor();
|
|
15
|
-
subscribe(callback: TickerCallback, options?: TickerAddOptions): void;
|
|
15
|
+
subscribe(callback: TickerCallback, options?: TickerAddOptions): () => void;
|
|
16
16
|
unsubscribe(callback: TickerCallback): void;
|
|
17
17
|
destroy(): void;
|
|
18
18
|
}
|
package/lib/ticker/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
1
|
+
var x = (r, s, t) => {
|
|
2
2
|
if (!s.has(r))
|
|
3
3
|
throw TypeError("Cannot " + t);
|
|
4
4
|
};
|
|
5
|
-
var i = (r, s, t) => (
|
|
5
|
+
var i = (r, s, t) => (x(r, s, "read from private field"), t ? t.call(r) : s.get(r)), h = (r, s, t) => {
|
|
6
6
|
if (s.has(r))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
s instanceof WeakSet ? s.add(r) : s.set(r, t);
|
|
9
|
-
}, e = (r, s, t, n) => (
|
|
10
|
-
var
|
|
9
|
+
}, e = (r, s, t, n) => (x(r, s, "write to private field"), n ? n.call(r, t) : s.set(r, t), t);
|
|
10
|
+
var L = (r, s, t) => (x(r, s, "access private method"), t);
|
|
11
11
|
import { intersector as E } from "../intersector/index.js";
|
|
12
|
-
import { i as
|
|
13
|
-
var m, u,
|
|
12
|
+
import { i as T } from "../browser-0zX67oeU.js";
|
|
13
|
+
var m, u, g, f, l, d, y;
|
|
14
14
|
class V {
|
|
15
15
|
constructor(s, t) {
|
|
16
16
|
h(this, m, void 0);
|
|
17
17
|
h(this, u, void 0);
|
|
18
|
-
h(this,
|
|
18
|
+
h(this, g, void 0);
|
|
19
19
|
h(this, f, 0);
|
|
20
20
|
h(this, l, 0);
|
|
21
21
|
h(this, d, !1);
|
|
22
|
-
h(this,
|
|
22
|
+
h(this, y, (s) => {
|
|
23
23
|
e(this, d, s.isIntersecting);
|
|
24
24
|
});
|
|
25
|
-
e(this, m, s), e(this, u, t == null ? void 0 : t.maxFPS), e(this,
|
|
25
|
+
e(this, m, s), e(this, u, t == null ? void 0 : t.maxFPS), e(this, g, (t == null ? void 0 : t.order) || 0), t != null && t.culling && T ? E.subscribe(t.culling, i(this, y)) : e(this, d, !0);
|
|
26
26
|
}
|
|
27
27
|
get callback() {
|
|
28
28
|
return i(this, m);
|
|
29
29
|
}
|
|
30
30
|
get order() {
|
|
31
|
-
return i(this,
|
|
31
|
+
return i(this, g);
|
|
32
32
|
}
|
|
33
33
|
sync(s) {
|
|
34
34
|
e(this, f, s - i(this, l));
|
|
@@ -47,69 +47,65 @@ class V {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
destroy() {
|
|
50
|
-
E.unsubscribe(i(this,
|
|
50
|
+
E.unsubscribe(i(this, y));
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
m = new WeakMap(), u = new WeakMap(),
|
|
54
|
-
var
|
|
53
|
+
m = new WeakMap(), u = new WeakMap(), g = new WeakMap(), f = new WeakMap(), l = new WeakMap(), d = new WeakMap(), y = new WeakMap();
|
|
54
|
+
var F, b, a, o, c, w, S, k, q, v, A;
|
|
55
55
|
class B {
|
|
56
56
|
constructor() {
|
|
57
|
-
h(this,
|
|
58
|
-
h(this,
|
|
59
|
-
h(this,
|
|
57
|
+
h(this, w);
|
|
58
|
+
h(this, k);
|
|
59
|
+
h(this, F, 0);
|
|
60
60
|
h(this, b, 0);
|
|
61
61
|
h(this, a, void 0);
|
|
62
62
|
h(this, o, !1);
|
|
63
63
|
h(this, c, []);
|
|
64
|
-
h(this,
|
|
64
|
+
h(this, v, (s) => {
|
|
65
65
|
if (i(this, o)) {
|
|
66
|
-
e(this, o, !1), e(this,
|
|
66
|
+
e(this, o, !1), e(this, F, s - i(this, b));
|
|
67
67
|
for (const t of i(this, c))
|
|
68
68
|
t.sync(i(this, b));
|
|
69
69
|
}
|
|
70
|
-
e(this, a, requestAnimationFrame(i(this,
|
|
70
|
+
e(this, a, requestAnimationFrame(i(this, v))), e(this, b, s - i(this, F));
|
|
71
71
|
for (const t of i(this, c))
|
|
72
72
|
t.tick(i(this, b));
|
|
73
73
|
});
|
|
74
|
-
h(this,
|
|
74
|
+
h(this, A, () => {
|
|
75
75
|
document.hidden && e(this, o, !0);
|
|
76
76
|
});
|
|
77
|
-
|
|
77
|
+
T && document.addEventListener(
|
|
78
78
|
"visibilitychange",
|
|
79
|
-
i(this,
|
|
79
|
+
i(this, A)
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
subscribe(s, t) {
|
|
83
|
-
if (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
n.sync(performance.now()), i(this, c).push(n), e(this, c, i(this, c).sort((I, P) => I.order - P.order));
|
|
87
|
-
}
|
|
88
|
-
w(this, x, S).call(this);
|
|
83
|
+
if (!i(this, c).find((n) => n.callback === s)) {
|
|
84
|
+
const n = new V(s, t);
|
|
85
|
+
n.sync(performance.now()), i(this, c).push(n), e(this, c, i(this, c).sort((I, P) => I.order - P.order));
|
|
89
86
|
}
|
|
87
|
+
return L(this, w, S).call(this), () => this.unsubscribe(s);
|
|
90
88
|
}
|
|
91
89
|
unsubscribe(s) {
|
|
92
|
-
if (!g)
|
|
93
|
-
return;
|
|
94
90
|
const t = i(this, c).filter(
|
|
95
91
|
(n) => n.callback === s
|
|
96
92
|
);
|
|
97
93
|
t.length && (t.forEach((n) => n.destroy()), e(this, c, i(this, c).filter(
|
|
98
94
|
(n) => n.callback !== s
|
|
99
|
-
)), i(this, c).length ||
|
|
95
|
+
)), i(this, c).length || L(this, k, q).call(this));
|
|
100
96
|
}
|
|
101
97
|
destroy() {
|
|
102
|
-
|
|
98
|
+
T && (L(this, k, q).call(this), document.removeEventListener(
|
|
103
99
|
"visibilitychange",
|
|
104
|
-
i(this,
|
|
100
|
+
i(this, A)
|
|
105
101
|
));
|
|
106
102
|
}
|
|
107
103
|
}
|
|
108
|
-
|
|
109
|
-
i(this, c).length && !i(this, a) && e(this, a, requestAnimationFrame(i(this,
|
|
110
|
-
},
|
|
104
|
+
F = new WeakMap(), b = new WeakMap(), a = new WeakMap(), o = new WeakMap(), c = new WeakMap(), w = new WeakSet(), S = function() {
|
|
105
|
+
i(this, c).length && !i(this, a) && e(this, a, requestAnimationFrame(i(this, v)));
|
|
106
|
+
}, k = new WeakSet(), q = function() {
|
|
111
107
|
i(this, a) && (cancelAnimationFrame(i(this, a)), e(this, a, void 0));
|
|
112
|
-
},
|
|
108
|
+
}, v = new WeakMap(), A = new WeakMap();
|
|
113
109
|
const M = new B();
|
|
114
110
|
export {
|
|
115
111
|
B as Ticker,
|
package/lib/utils/dom.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function findParentElement<T extends typeof Element>(element: Element | null, Constructor: T): T | null;
|
|
2
|
-
export type ElementOrSelector<T extends
|
|
3
|
-
export declare function getElement<T extends
|
|
2
|
+
export type ElementOrSelector<T extends Element = Element> = string | T;
|
|
3
|
+
export declare function getElement<T extends Element>(elementOrSelector: ElementOrSelector<T> | undefined, from?: Document): T | null | undefined;
|
|
4
4
|
export declare function findScrollParentElement(node: Node | null, _initial?: Node | null): HTMLElement;
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),f=require("../browser-CpzFX2xg.cjs"),p=require("../dom-qY2LdCVL.cjs"),n=require("../easings-DsS5-Kqc.cjs"),I=require("../events-Crwi8fz6.cjs"),y=require("../file-EevnUtRj.cjs"),g=require("../function-MthRj-GJ.cjs"),h=require("../layout-8ryRAMGJ.cjs"),u=require("../math-GDWEqu7y.cjs"),O=require("../number-yVpzMdbQ.cjs"),o=require("../object-C1ph624j.cjs"),r=require("../string-DzUwFYSS.cjs"),C=require("../style-At6aDoqG.cjs");function E(t,e,...i){return[...t.slice(0,e),...i,...t.slice(e)]}function w(t,e){const i=t.measureText(e),a=i.actualBoundingBoxAscent+i.actualBoundingBoxDescent,s=i.width;return{height:a,width:s}}function Q(t){return Math.floor(t)+.5}function S(t,e,i,a,s,l){let m=t/e,x=i/a,c=0,d=0;return s=typeof s=="undefined"?.5:s,l=typeof l=="undefined"?.5:l,m>x?(c=a,d=a*m):(d=i,c=i/m),[(i-d)*s,(a-c)*l,d,c]}function T(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function D(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function P(t,e,i=!1){let a=t.x-e.width/2,s=e.height/2-t.y;return i&&(a=a/(e.width/2),s=s/(e.height/2)),{x:a,y:s}}function q(t,e){const i=t.x/e.x,a=t.y/e.y;return{x:i,y:a}}function v(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function R(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function N(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=f.isBrowser;exports.findParentElement=p.findParentElement;exports.findScrollParentElement=p.findScrollParentElement;exports.getElement=p.getElement;exports.easeInCubic=n.easeInCubic;exports.easeInExpo=n.easeInExpo;exports.easeInOutCubic=n.easeInOutCubic;exports.easeInOutExpo=n.easeInOutExpo;exports.easeInOutQuad=n.easeInOutQuad;exports.easeInOutQuart=n.easeInOutQuart;exports.easeInOutQuint=n.easeInOutQuint;exports.easeInQuad=n.easeInQuad;exports.easeInQuart=n.easeInQuart;exports.easeInQuint=n.easeInQuint;exports.easeOutCubic=n.easeOutCubic;exports.easeOutExpo=n.easeOutExpo;exports.easeOutQuad=n.easeOutQuad;exports.easeOutQuart=n.easeOutQuart;exports.easeOutQuint=n.easeOutQuint;exports.linear=n.linear;exports.dispatchSizeChangeEvent=I.dispatchSizeChangeEvent;exports.createJSONAndSave=y.createJSONAndSave;exports.debounce=g.debounce;exports.throttle=g.throttle;exports.getCumulativeOffsetLeft=h.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=h.getCumulativeOffsetTop;exports.getCumulativePosition=h.getCumulativePosition;exports.calculateDistance=u.calculateDistance;exports.calculateDistanceWithRadius=u.calculateDistanceWithRadius;exports.clamp=u.clamp;exports.damp=u.damp;exports.lerp=u.lerp;exports.mapRange=u.mapRange;exports.round=u.round;exports.smootherstep=u.smootherstep;exports.smoothstep=u.smoothstep;exports.step=u.step;exports.preciseNumber=O.preciseNumber;exports.roundNumberTo=O.roundNumberTo;exports.cloneDeep=o.cloneDeep;exports.compareObjects=o.compareObjects;exports.isESClass=o.isESClass;exports.isNullish=o.isNullish;exports.isObject=o.isObject;exports.mergeDeep=o.mergeDeep;exports.omit=o.omit;exports.pick=o.pick;exports.camelToKebab=r.camelToKebab;exports.capitalize=r.capitalize;exports.generateId=r.generateId;exports.kebabToCamel=r.kebabToCamel;exports.snakeToDotted=r.snakeToDotted;exports.toPascalCase=r.toPascalCase;exports.getElementTransitionDurationMS=C.getElementTransitionDurationMS;exports.getElementTransitionDurationS=C.getElementTransitionDurationS;exports.cover=S;exports.decode=N;exports.dotCircleCollision=D;exports.dotRectCollision=T;exports.encode=R;exports.fixPosition=Q;exports.getPointerPosition=v;exports.insert=E;exports.measureText=w;exports.normalize=q;exports.screenToCartesian=P;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { debounce, throttle } from './function';
|
|
|
13
13
|
export { getCumulativePosition, getCumulativeOffsetLeft, getCumulativeOffsetTop, } from './layout';
|
|
14
14
|
export { lerp, damp, step, round, clamp, mapRange, smoothstep, smootherstep, calculateDistance, calculateDistanceWithRadius, } from './math';
|
|
15
15
|
export { preciseNumber, roundNumberTo } from './number';
|
|
16
|
-
export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit, } from './object';
|
|
16
|
+
export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit, isESClass, } from './object';
|
|
17
17
|
export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize, generateId, } from './string';
|
|
18
18
|
export { getElementTransitionDurationMS, getElementTransitionDurationS, } from './style';
|
|
19
19
|
export type { Axes2D, Axes3D, Dot2D, Rect2D, Circle, Dot3D, Rect3D, } from './ts-shape';
|