aptechka 0.4.10 → 0.4.12
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/Damped-BdnkNOcb.cjs +1 -0
- package/lib/Damped-Ceg1a3X8.js +150 -0
- package/lib/{DragControls-CZhJHO0_.js → DragControls-BbznoEAb.js} +18 -18
- package/lib/DragControls-CdRWoO3y.cjs +1 -0
- package/lib/animation/Animation.d.ts +23 -0
- package/lib/animation/Damped.d.ts +15 -12
- package/lib/animation/Tweened.d.ts +9 -11
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +1 -1
- package/lib/animation/index.js +49 -75
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +2 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-W0b965g0.cjs → createStylesheet-CqHU9_qv.cjs} +1 -1
- package/lib/{createStylesheet-D6C3BPkl.js → createStylesheet-DBCEbDjI.js} +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +2 -2
- package/lib/{index-ilQWX_BM.js → index-BUOBDenR.js} +2 -2
- package/lib/{index-C_qv6rk4.cjs → index-Bv5vIuF-.cjs} +1 -1
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +145 -137
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/{object-BZELAoVj.cjs → object-CCiXnER2.cjs} +1 -1
- package/lib/{object-R34VLqhp.js → object-D6MVWB4l.js} +8 -8
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +1 -1
- package/lib/scroll/ScrollElement.d.ts +2 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +473 -453
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +3 -0
- package/lib/scroll-entries/index.js +18 -13
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/{tags-D0zt3vue.js → tags-CMPg9ETZ.js} +1 -1
- package/lib/{tags-CK7mk_EP.cjs → tags-Djb6mb1o.cjs} +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +3 -3
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +1 -1
- package/lib/Damped-9h4qaGcS.cjs +0 -1
- package/lib/Damped-HhitpTP_.js +0 -132
- package/lib/DragControls-C7P6P5HO.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var w=Object.defineProperty,L=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var O=Object.getOwnPropertySymbols;var j=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var k=(e,s,t)=>s in e?w(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,N=(e,s)=>{for(var t in s||(s={}))j.call(s,t)&&k(e,t,s[t]);if(O)for(var t of O(s))z.call(s,t)&&k(e,t,s[t]);return e},P=(e,s)=>L(e,_(s));var v=(e,s,t)=>{if(!s.has(e))throw TypeError("Cannot "+t)};var i=(e,s,t)=>(v(e,s,"read from private field"),t?t.call(e):s.get(e)),a=(e,s,t)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,t)},r=(e,s,t,h)=>(v(e,s,"write to private field"),h?h.call(e,t):s.set(e,t),t);const D=require("./math-GDWEqu7y.cjs"),q=require("./number-yVpzMdbQ.cjs"),c=require("./polyfills-CrcS4RcO.cjs"),I=require("./Store-C-1ruEIm.cjs"),M=require("./ticker/index.cjs");var d,f,F,m,C;class R extends I.Store{constructor(t,h){super(t||0);a(this,d,void 0);a(this,f,void 0);a(this,F,void 0);a(this,m,new I.Store(!1));a(this,C,t=>{this.handleAnimationFrame(t)});this.updateOptions(h)}get isRunning(){return i(this,m)}reset(){this.unlistenAnimationFrame(),super.reset()}close(){super.close(),this.unlistenAnimationFrame()}updateOptions(t){r(this,d,c.nullishCoalescing(t==null?void 0:t.maxFPS,i(this,d))),r(this,f,c.nullishCoalescing(t==null?void 0:t.order,i(this,f))),r(this,F,c.nullishCoalescing(t==null?void 0:t.culling,i(this,F)))}listenAnimationFrame(){i(this,m).current||(i(this,m).current=!0,M.ticker.subscribe(i(this,C),{maxFPS:i(this,d),order:i(this,f),culling:i(this,F)}))}unlistenAnimationFrame(){i(this,m).current&&(i(this,m).current=!1,M.ticker.unsubscribe(i(this,C)))}}d=new WeakMap,f=new WeakMap,F=new WeakMap,m=new WeakMap,C=new WeakMap;var n,A,u,l,g,x,b;class B extends R{constructor(t,h){super(t||0,h);a(this,n,void 0);a(this,A,void 0);a(this,u,void 0);a(this,l,void 0);a(this,g,void 0);a(this,x,void 0);a(this,b,void 0);this.damping=.01,this.stiffness=0,this.mass=0,r(this,n,0),r(this,A,0),r(this,u,0),r(this,l,0),r(this,g,0),r(this,x,0),r(this,b,()=>{this.set(i(this,n),!0)}),r(this,u,c.nullishCoalescing(h==null?void 0:h.min,-1/0)),r(this,l,c.nullishCoalescing(h==null?void 0:h.max,1/0)),r(this,n,this.current)}get target(){return i(this,n)}get direction(){return i(this,A)}get min(){return i(this,u)}set min(t){r(this,u,t),i(this,b).call(this)}get max(){return i(this,l)}set max(t){r(this,l,t),i(this,b).call(this)}get velocity(){return i(this,g)}get speed(){return i(this,x)}get length(){return i(this,l)-i(this,u)}get progress(){return this.length?q.preciseNumber((this.current-i(this,u))/this.length,6):0}get entry(){return P(N({},super.entry),{min:i(this,u),max:i(this,l),length:this.length,direction:this.direction,progress:this.progress})}set(t,h=!1){const y=i(this,n);r(this,n,D.clamp(t,i(this,u),i(this,l))),h&&(this.current=i(this,n)),i(this,n)!==y&&(r(this,A,Math.sign(t-i(this,n))||1),this.listenAnimationFrame())}shift(t,h=!1){this.set(i(this,n)+t,h)}reset(){this.set(this.initial,!0),super.reset()}listenAnimationFrame(){this.current!==this.target&&super.listenAnimationFrame()}updateOptions(t){super.updateOptions(t),this.damping=c.nullishCoalescing(t==null?void 0:t.damping,this.damping),this.mass=c.nullishCoalescing(t==null?void 0:t.damping,this.mass),this.stiffness=c.nullishCoalescing(t==null?void 0:t.damping,this.stiffness)}handleAnimationFrame(t){q.preciseNumber(this.current,4)===q.preciseNumber(this.target,4)&&(this.unlistenAnimationFrame(),this.current=this.target);const h=this.current,y=Math.abs(h-this.target);r(this,x,y/t.elapsed);const S=t.elapsed/1e3;if(this.mass||this.stiffness){const p=(i(this,n)-this.current)*this.stiffness-i(this,g)*this.damping;r(this,g,i(this,g)+p/this.mass*S),this.current+=i(this,g)*S}else this.current=D.damp(this.current,this.target,this.damping,S)}}n=new WeakMap,A=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,x=new WeakMap,b=new WeakMap;exports.Animation=R;exports.Damped=B;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
var w = Object.defineProperty, L = Object.defineProperties;
|
|
2
|
+
var N = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var P = Object.getOwnPropertySymbols;
|
|
4
|
+
var j = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (e, i, t) => i in e ? w(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, C = (e, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
j.call(i, t) && v(e, t, i[t]);
|
|
8
|
+
if (P)
|
|
9
|
+
for (var t of P(i))
|
|
10
|
+
q.call(i, t) && v(e, t, i[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, D = (e, i) => L(e, N(i));
|
|
13
|
+
var I = (e, i, t) => {
|
|
14
|
+
if (!i.has(e))
|
|
15
|
+
throw TypeError("Cannot " + t);
|
|
16
|
+
};
|
|
17
|
+
var s = (e, i, t) => (I(e, i, "read from private field"), t ? t.call(e) : i.get(e)), a = (e, i, t) => {
|
|
18
|
+
if (i.has(e))
|
|
19
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
+
i instanceof WeakSet ? i.add(e) : i.set(e, t);
|
|
21
|
+
}, r = (e, i, t, h) => (I(e, i, "write to private field"), h ? h.call(e, t) : i.set(e, t), t);
|
|
22
|
+
import { c as z, d as B } from "./math-BOBiC4TN.js";
|
|
23
|
+
import { p as O } from "./number-Bo5RdrA1.js";
|
|
24
|
+
import { n as c } from "./polyfills-DJUYczFm.js";
|
|
25
|
+
import { S as M } from "./Store-BQXXikps.js";
|
|
26
|
+
import { ticker as R } from "./ticker/index.js";
|
|
27
|
+
var d, f, F, g, y;
|
|
28
|
+
class E extends M {
|
|
29
|
+
constructor(t, h) {
|
|
30
|
+
super(t || 0);
|
|
31
|
+
a(this, d, void 0);
|
|
32
|
+
a(this, f, void 0);
|
|
33
|
+
a(this, F, void 0);
|
|
34
|
+
a(this, g, new M(!1));
|
|
35
|
+
a(this, y, (t) => {
|
|
36
|
+
this.handleAnimationFrame(t);
|
|
37
|
+
});
|
|
38
|
+
this.updateOptions(h);
|
|
39
|
+
}
|
|
40
|
+
get isRunning() {
|
|
41
|
+
return s(this, g);
|
|
42
|
+
}
|
|
43
|
+
reset() {
|
|
44
|
+
this.unlistenAnimationFrame(), super.reset();
|
|
45
|
+
}
|
|
46
|
+
close() {
|
|
47
|
+
super.close(), this.unlistenAnimationFrame();
|
|
48
|
+
}
|
|
49
|
+
updateOptions(t) {
|
|
50
|
+
r(this, d, c(t == null ? void 0 : t.maxFPS, s(this, d))), r(this, f, c(t == null ? void 0 : t.order, s(this, f))), r(this, F, c(t == null ? void 0 : t.culling, s(this, F)));
|
|
51
|
+
}
|
|
52
|
+
listenAnimationFrame() {
|
|
53
|
+
s(this, g).current || (s(this, g).current = !0, R.subscribe(s(this, y), {
|
|
54
|
+
maxFPS: s(this, d),
|
|
55
|
+
order: s(this, f),
|
|
56
|
+
culling: s(this, F)
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
unlistenAnimationFrame() {
|
|
60
|
+
s(this, g).current && (s(this, g).current = !1, R.unsubscribe(s(this, y)));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
d = new WeakMap(), f = new WeakMap(), F = new WeakMap(), g = new WeakMap(), y = new WeakMap();
|
|
64
|
+
var n, A, m, u, l, x, b;
|
|
65
|
+
class U extends E {
|
|
66
|
+
constructor(t, h) {
|
|
67
|
+
super(t || 0, h);
|
|
68
|
+
a(this, n, void 0);
|
|
69
|
+
a(this, A, void 0);
|
|
70
|
+
a(this, m, void 0);
|
|
71
|
+
a(this, u, void 0);
|
|
72
|
+
a(this, l, void 0);
|
|
73
|
+
a(this, x, void 0);
|
|
74
|
+
a(this, b, void 0);
|
|
75
|
+
this.damping = 0.01, this.stiffness = 0, this.mass = 0, r(this, n, 0), r(this, A, 0), r(this, m, 0), r(this, u, 0), r(this, l, 0), r(this, x, 0), r(this, b, () => {
|
|
76
|
+
this.set(s(this, n), !0);
|
|
77
|
+
}), r(this, m, c(h == null ? void 0 : h.min, -1 / 0)), r(this, u, c(h == null ? void 0 : h.max, 1 / 0)), r(this, n, this.current);
|
|
78
|
+
}
|
|
79
|
+
get target() {
|
|
80
|
+
return s(this, n);
|
|
81
|
+
}
|
|
82
|
+
get direction() {
|
|
83
|
+
return s(this, A);
|
|
84
|
+
}
|
|
85
|
+
get min() {
|
|
86
|
+
return s(this, m);
|
|
87
|
+
}
|
|
88
|
+
set min(t) {
|
|
89
|
+
r(this, m, t), s(this, b).call(this);
|
|
90
|
+
}
|
|
91
|
+
get max() {
|
|
92
|
+
return s(this, u);
|
|
93
|
+
}
|
|
94
|
+
set max(t) {
|
|
95
|
+
r(this, u, t), s(this, b).call(this);
|
|
96
|
+
}
|
|
97
|
+
get velocity() {
|
|
98
|
+
return s(this, l);
|
|
99
|
+
}
|
|
100
|
+
get speed() {
|
|
101
|
+
return s(this, x);
|
|
102
|
+
}
|
|
103
|
+
get length() {
|
|
104
|
+
return s(this, u) - s(this, m);
|
|
105
|
+
}
|
|
106
|
+
get progress() {
|
|
107
|
+
return this.length ? O((this.current - s(this, m)) / this.length, 6) : 0;
|
|
108
|
+
}
|
|
109
|
+
get entry() {
|
|
110
|
+
return D(C({}, super.entry), {
|
|
111
|
+
min: s(this, m),
|
|
112
|
+
max: s(this, u),
|
|
113
|
+
length: this.length,
|
|
114
|
+
direction: this.direction,
|
|
115
|
+
progress: this.progress
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
set(t, h = !1) {
|
|
119
|
+
const S = s(this, n);
|
|
120
|
+
r(this, n, z(t, s(this, m), s(this, u))), h && (this.current = s(this, n)), s(this, n) !== S && (r(this, A, Math.sign(t - s(this, n)) || 1), this.listenAnimationFrame());
|
|
121
|
+
}
|
|
122
|
+
shift(t, h = !1) {
|
|
123
|
+
this.set(s(this, n) + t, h);
|
|
124
|
+
}
|
|
125
|
+
reset() {
|
|
126
|
+
this.set(this.initial, !0), super.reset();
|
|
127
|
+
}
|
|
128
|
+
listenAnimationFrame() {
|
|
129
|
+
this.current !== this.target && super.listenAnimationFrame();
|
|
130
|
+
}
|
|
131
|
+
updateOptions(t) {
|
|
132
|
+
super.updateOptions(t), this.damping = c(t == null ? void 0 : t.damping, this.damping), this.mass = c(t == null ? void 0 : t.damping, this.mass), this.stiffness = c(t == null ? void 0 : t.damping, this.stiffness);
|
|
133
|
+
}
|
|
134
|
+
handleAnimationFrame(t) {
|
|
135
|
+
O(this.current, 4) === O(this.target, 4) && (this.unlistenAnimationFrame(), this.current = this.target);
|
|
136
|
+
const h = this.current, S = Math.abs(h - this.target);
|
|
137
|
+
r(this, x, S / t.elapsed);
|
|
138
|
+
const p = t.elapsed / 1e3;
|
|
139
|
+
if (this.mass || this.stiffness) {
|
|
140
|
+
const k = (s(this, n) - this.current) * this.stiffness - s(this, l) * this.damping;
|
|
141
|
+
r(this, l, s(this, l) + k / this.mass * p), this.current += s(this, l) * p;
|
|
142
|
+
} else
|
|
143
|
+
this.current = B(this.current, this.target, this.damping, p);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
n = new WeakMap(), A = new WeakMap(), m = new WeakMap(), u = new WeakMap(), l = new WeakMap(), x = new WeakMap(), b = new WeakMap();
|
|
147
|
+
export {
|
|
148
|
+
E as A,
|
|
149
|
+
U as D
|
|
150
|
+
};
|
|
@@ -55,19 +55,19 @@ class q extends T {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
m = new WeakMap(), l = new WeakMap(), c = new WeakMap(), L = new WeakMap();
|
|
58
|
-
var
|
|
58
|
+
var x, b, E, M;
|
|
59
59
|
class F extends T {
|
|
60
60
|
constructor(e) {
|
|
61
61
|
super();
|
|
62
|
-
a(this,
|
|
62
|
+
a(this, x, null);
|
|
63
63
|
a(this, b, void 0);
|
|
64
|
-
a(this,
|
|
64
|
+
a(this, E, void 0);
|
|
65
65
|
a(this, M, (e) => {
|
|
66
66
|
let n = 0;
|
|
67
67
|
if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY)))
|
|
68
68
|
if (n = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), e.preventDefault(), this.debounce) {
|
|
69
69
|
const s = Date.now();
|
|
70
|
-
if (s - t(this,
|
|
70
|
+
if (s - t(this, E) > 40 && (n = 100 * Math.sign(n)), i(this, E, s), Math.abs(n) < 100 || t(this, b))
|
|
71
71
|
return;
|
|
72
72
|
this.changeEvent.notify("wheel", n), i(this, b, setTimeout(() => {
|
|
73
73
|
i(this, b, void 0);
|
|
@@ -75,10 +75,10 @@ class F extends T {
|
|
|
75
75
|
} else
|
|
76
76
|
this.changeEvent.notify("wheel", n);
|
|
77
77
|
});
|
|
78
|
-
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this,
|
|
78
|
+
this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, E, Date.now()), f && i(this, x, e != null && e.element && P(e.element) || window);
|
|
79
79
|
}
|
|
80
80
|
connect() {
|
|
81
|
-
f && t(this,
|
|
81
|
+
f && t(this, x).addEventListener(
|
|
82
82
|
"wheel",
|
|
83
83
|
t(this, M),
|
|
84
84
|
{
|
|
@@ -87,14 +87,14 @@ class F extends T {
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
disconnect() {
|
|
90
|
-
f && (t(this,
|
|
90
|
+
f && (t(this, x).removeEventListener(
|
|
91
91
|
"wheel",
|
|
92
92
|
t(this, M)
|
|
93
93
|
), clearTimeout(t(this, b)));
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
var
|
|
96
|
+
x = new WeakMap(), b = new WeakMap(), E = new WeakMap(), M = new WeakMap();
|
|
97
|
+
var o, u, y, d, v, g;
|
|
98
98
|
const w = class w extends T {
|
|
99
99
|
constructor(e) {
|
|
100
100
|
super();
|
|
@@ -106,23 +106,23 @@ const w = class w extends T {
|
|
|
106
106
|
(s) => s instanceof HTMLElement && s.hasAttribute("drag-dead-zone")
|
|
107
107
|
))
|
|
108
108
|
return;
|
|
109
|
-
this.swipe || D.unsubscribe(t(this,
|
|
109
|
+
this.swipe || D.unsubscribe(t(this, g));
|
|
110
110
|
let n = e;
|
|
111
|
-
i(this, d, 0), Y(
|
|
111
|
+
i(this, d, 0), document.documentElement.classList.add("grabbing"), Y(
|
|
112
112
|
(s) => {
|
|
113
|
-
if (t(this, y) || t(w,
|
|
113
|
+
if (t(this, y) || t(w, o) && t(w, o) !== t(this, u))
|
|
114
114
|
return;
|
|
115
115
|
this.swipe && i(this, y, !0);
|
|
116
116
|
const H = n.x - s.x, A = n.y - s.y;
|
|
117
|
-
this.axis === "x" ? i(this, d, H) : i(this, d, A), n = s, this.changeEvent.notify("drag", t(this, d)), (this.axis === "x" && Math.abs(H) > Math.abs(A) || this.axis === "y" && Math.abs(H) < Math.abs(A)) && i(w,
|
|
117
|
+
this.axis === "x" ? i(this, d, H) : i(this, d, A), n = s, this.changeEvent.notify("drag", t(this, d)), (this.axis === "x" && Math.abs(H) > Math.abs(A) || this.axis === "y" && Math.abs(H) < Math.abs(A)) && i(w, o, t(this, u));
|
|
118
118
|
},
|
|
119
119
|
() => {
|
|
120
|
-
i(w,
|
|
120
|
+
i(w, o, null), this.swipe || (i(this, d, t(this, d) * 3), D.subscribe(t(this, g), { order: R.SCROLL - 1 })), document.documentElement.classList.remove("grabbing"), i(this, y, !1);
|
|
121
121
|
}
|
|
122
122
|
);
|
|
123
123
|
});
|
|
124
|
-
a(this,
|
|
125
|
-
t(this, d) || D.unsubscribe(t(this,
|
|
124
|
+
a(this, g, () => {
|
|
125
|
+
t(this, d) || D.unsubscribe(t(this, g)), i(this, d, t(this, d) * 0.95), i(this, d, C(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
|
|
126
126
|
});
|
|
127
127
|
this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, f && i(this, u, e != null && e.element && P(e.element) || document.documentElement);
|
|
128
128
|
}
|
|
@@ -133,10 +133,10 @@ const w = class w extends T {
|
|
|
133
133
|
f && (t(this, u).removeEventListener(
|
|
134
134
|
"pointerdown",
|
|
135
135
|
t(this, v)
|
|
136
|
-
), D.unsubscribe(t(this,
|
|
136
|
+
), D.unsubscribe(t(this, g)));
|
|
137
137
|
}
|
|
138
138
|
};
|
|
139
|
-
|
|
139
|
+
o = new WeakMap(), u = new WeakMap(), y = new WeakMap(), d = new WeakMap(), v = new WeakMap(), g = new WeakMap(), a(w, o, null);
|
|
140
140
|
let X = w;
|
|
141
141
|
export {
|
|
142
142
|
T as C,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var P=(r,n,e)=>{if(!n.has(r))throw TypeError("Cannot "+e)};var t=(r,n,e)=>(P(r,n,"read from private field"),e?e.call(r):n.get(r)),h=(r,n,e)=>{if(n.has(r))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(r):n.set(r,e)},i=(r,n,e,a)=>(P(r,n,"write to private field"),a?a.call(r,e):n.set(r,e),e);const f=require("./browser-CpzFX2xg.cjs"),A=require("./dom-JBOkFLTh.cjs"),T=require("./gestures-DHLrn6Q8.cjs"),W=require("./number-yVpzMdbQ.cjs"),X=require("./notifier/index.cjs"),B=require("./ticker/index.cjs"),Y=require("./order/index.cjs");var v;class q{constructor(){h(this,v,new X.Notifier)}get changeEvent(){return t(this,v)}}v=new WeakMap;var u,l,c,L;class K extends q{constructor(e){super();h(this,u,null);h(this,l,null);h(this,c,"offsetHeight");h(this,L,e=>{const a=e.shiftKey?-1:1;let s;e.code==="Space"?s=a*t(this,l)[t(this,c)]*.4:e.code==="ArrowLeft"?s=-1*t(this,l)[t(this,c)]*.2:e.code==="ArrowRight"?s=1*t(this,l)[t(this,c)]*.2:e.code==="ArrowUp"?s=-1*t(this,l)[t(this,c)]*.2:e.code==="ArrowDown"?s=1*t(this,l)[t(this,c)]*.2:e.code==="PageUp"?s=-1*t(this,l)[t(this,c)]:e.code==="PageDown"?s=1*t(this,l)[t(this,c)]:e.code==="Home"?s=0:e.code==="End"&&(s=t(this,c)==="offsetWidth"?t(this,l).scrollWidth:t(this,l).scrollHeight),s&&(e.stopPropagation(),this.changeEvent.notify("keyboard",s))});f.isBrowser&&(i(this,u,e!=null&&e.element&&A.getElement(e.element)||window),i(this,l,t(this,u)instanceof HTMLElement?t(this,u):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,c,e==="width"?"offsetWidth":"offsetHeight")}connect(){f.isBrowser&&t(this,u).addEventListener("keydown",t(this,L))}disconnect(){f.isBrowser&&t(this,u).removeEventListener("keydown",t(this,L))}}u=new WeakMap,l=new WeakMap,c=new WeakMap,L=new WeakMap;var x,o,E,M;class R extends q{constructor(e){super();h(this,x,null);h(this,o,void 0);h(this,E,void 0);h(this,M,e=>{let a=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)))if(a=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),e.preventDefault(),this.debounce){const s=Date.now();if(s-t(this,E)>40&&(a=100*Math.sign(a)),i(this,E,s),Math.abs(a)<100||t(this,o))return;this.changeEvent.notify("wheel",a),i(this,o,setTimeout(()=>{i(this,o,void 0)},80))}else this.changeEvent.notify("wheel",a)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,E,Date.now()),f.isBrowser&&i(this,x,e!=null&&e.element&&A.getElement(e.element)||window)}connect(){f.isBrowser&&t(this,x).addEventListener("wheel",t(this,M),{passive:!1})}disconnect(){f.isBrowser&&(t(this,x).removeEventListener("wheel",t(this,M)),clearTimeout(t(this,o)))}}x=new WeakMap,o=new WeakMap,E=new WeakMap,M=new WeakMap;var b,m,y,d,k,g;const w=class w extends q{constructor(e){super();h(this,m,null);h(this,y,!1);h(this,d,0);h(this,k,e=>{if(e.composedPath().find(s=>s instanceof HTMLElement&&s.hasAttribute("drag-dead-zone")))return;this.swipe||B.ticker.unsubscribe(t(this,g));let a=e;i(this,d,0),document.documentElement.classList.add("grabbing"),T.setupDrag(s=>{if(t(this,y)||t(w,b)&&t(w,b)!==t(this,m))return;this.swipe&&i(this,y,!0);const C=a.x-s.x,D=a.y-s.y;this.axis==="x"?i(this,d,C):i(this,d,D),a=s,this.changeEvent.notify("drag",t(this,d)),(this.axis==="x"&&Math.abs(C)>Math.abs(D)||this.axis==="y"&&Math.abs(C)<Math.abs(D))&&i(w,b,t(this,m))},()=>{i(w,b,null),this.swipe||(i(this,d,t(this,d)*3),B.ticker.subscribe(t(this,g),{order:Y.TICK_ORDER.SCROLL-1})),document.documentElement.classList.remove("grabbing"),i(this,y,!1)})});h(this,g,()=>{t(this,d)||B.ticker.unsubscribe(t(this,g)),i(this,d,t(this,d)*.95),i(this,d,W.preciseNumber(t(this,d),3)),this.changeEvent.notify("drag",t(this,d))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,f.isBrowser&&i(this,m,e!=null&&e.element&&A.getElement(e.element)||document.documentElement)}connect(){f.isBrowser&&t(this,m).addEventListener("pointerdown",t(this,k))}disconnect(){f.isBrowser&&(t(this,m).removeEventListener("pointerdown",t(this,k)),B.ticker.unsubscribe(t(this,g)))}};b=new WeakMap,m=new WeakMap,y=new WeakMap,d=new WeakMap,k=new WeakMap,g=new WeakMap,h(w,b,null);let H=w;exports.Controls=q;exports.DragControls=H;exports.KeyboardControls=K;exports.WheelControls=R;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TickerAddOptions, TickerCallbackEntry } from '../ticker';
|
|
2
|
+
import { Store, StoreEntry, StoreOptions } from '../store';
|
|
3
|
+
|
|
4
|
+
export interface AnimationEntry extends StoreEntry<number> {
|
|
5
|
+
length: number;
|
|
6
|
+
progress: number;
|
|
7
|
+
direction: number;
|
|
8
|
+
}
|
|
9
|
+
export interface AnimationOptions extends TickerAddOptions, StoreOptions<number> {
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class Animation<Options extends AnimationOptions, Entry extends StoreEntry<number> = StoreEntry<number>> extends Store<number, 'number', Entry> {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(initial?: number, options?: Options);
|
|
14
|
+
get isRunning(): Store<boolean, keyof import('../store').StoreManagers, StoreEntry<boolean>>;
|
|
15
|
+
abstract set(value: number): void;
|
|
16
|
+
abstract shift(value: number): void;
|
|
17
|
+
reset(): void;
|
|
18
|
+
close(): void;
|
|
19
|
+
updateOptions(options?: Omit<Options, keyof StoreOptions<number>>): void;
|
|
20
|
+
listenAnimationFrame(): void;
|
|
21
|
+
unlistenAnimationFrame(): void;
|
|
22
|
+
protected abstract handleAnimationFrame(e: TickerCallbackEntry): void;
|
|
23
|
+
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Animation } from './Animation';
|
|
2
|
+
import { TickerAddOptions, TickerCallbackEntry } from '../ticker';
|
|
3
|
+
import { StoreEntry, StoreManagers, StoreOptions } from '../store';
|
|
3
4
|
|
|
4
5
|
export interface DampedOptions extends TickerAddOptions, StoreOptions<number> {
|
|
5
|
-
damping?: number;
|
|
6
6
|
min?: number;
|
|
7
7
|
max?: number;
|
|
8
|
+
stiffness?: number;
|
|
9
|
+
damping?: number;
|
|
10
|
+
mass?: number;
|
|
8
11
|
}
|
|
9
12
|
export interface DampedEntry extends StoreEntry<number> {
|
|
10
13
|
min: number;
|
|
@@ -12,28 +15,28 @@ export interface DampedEntry extends StoreEntry<number> {
|
|
|
12
15
|
length: number;
|
|
13
16
|
progress: number;
|
|
14
17
|
direction: number;
|
|
15
|
-
speed: number;
|
|
16
18
|
}
|
|
17
|
-
export declare class Damped extends
|
|
19
|
+
export declare class Damped extends Animation<DampedOptions, DampedEntry> {
|
|
18
20
|
#private;
|
|
21
|
+
damping: number;
|
|
22
|
+
stiffness: number;
|
|
23
|
+
mass: number;
|
|
19
24
|
constructor(initial?: number, options?: DampedOptions);
|
|
20
25
|
get target(): number;
|
|
21
|
-
get isRunning(): Store<boolean, keyof import('../store').StoreManagers, StoreEntry<boolean>>;
|
|
22
26
|
get direction(): number;
|
|
23
|
-
get maxFPS(): number | undefined;
|
|
24
|
-
get speed(): number;
|
|
25
27
|
get min(): number;
|
|
26
28
|
set min(value: number);
|
|
27
29
|
get max(): number;
|
|
28
30
|
set max(value: number);
|
|
31
|
+
get velocity(): number;
|
|
32
|
+
get speed(): number;
|
|
29
33
|
get length(): number;
|
|
30
34
|
get progress(): number;
|
|
31
|
-
get damping(): number;
|
|
32
|
-
set damping(value: number);
|
|
33
35
|
get entry(): DampedEntry;
|
|
34
36
|
set(value: number, equalize?: boolean): void;
|
|
35
37
|
shift(value: number, equalize?: boolean): void;
|
|
36
|
-
close(): void;
|
|
37
38
|
reset(): void;
|
|
38
|
-
|
|
39
|
+
listenAnimationFrame(): void;
|
|
40
|
+
updateOptions(options?: Omit<DampedOptions, keyof StoreOptions<number, keyof StoreManagers>> | undefined): void;
|
|
41
|
+
protected handleAnimationFrame(e: TickerCallbackEntry): void;
|
|
39
42
|
}
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
+
import { Animation, AnimationOptions } from './Animation';
|
|
1
2
|
import { EasingFunction } from '../utils';
|
|
2
|
-
import { TickerAddOptions } from '../ticker';
|
|
3
|
-
import {
|
|
3
|
+
import { TickerAddOptions, TickerCallbackEntry } from '../ticker';
|
|
4
|
+
import { StoreEntry, StoreManagers, StoreOptions } from '../store';
|
|
4
5
|
|
|
5
|
-
export interface
|
|
6
|
+
export interface TweenedOptions extends AnimationOptions {
|
|
6
7
|
easing?: EasingFunction;
|
|
7
8
|
duration?: number;
|
|
8
9
|
}
|
|
9
|
-
export interface TweenedSetOptions extends
|
|
10
|
+
export interface TweenedSetOptions extends Omit<TweenedOptions, keyof StoreOptions<number>> {
|
|
10
11
|
restart?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export interface TweenedOptions extends TweenedAnimationOptions, StoreOptions<number> {
|
|
13
|
-
}
|
|
14
13
|
export interface TweenedEntry extends StoreEntry<number> {
|
|
15
14
|
length: number;
|
|
16
15
|
progress: number;
|
|
17
16
|
direction: number;
|
|
18
17
|
}
|
|
19
|
-
export declare class Tweened extends
|
|
18
|
+
export declare class Tweened extends Animation<TweenedOptions, TweenedEntry> {
|
|
20
19
|
#private;
|
|
21
|
-
constructor(initial?: number, options?: TweenedOptions);
|
|
22
|
-
get isRunning(): Store<boolean, keyof import('../store').StoreManagers, StoreEntry<boolean>>;
|
|
20
|
+
constructor(initial?: number, options?: TweenedOptions & TickerAddOptions & StoreOptions<number>);
|
|
23
21
|
get direction(): number;
|
|
24
22
|
get length(): number;
|
|
25
23
|
get progress(): number;
|
|
26
24
|
get entry(): TweenedEntry;
|
|
27
25
|
set(value: number, options?: TweenedSetOptions): void;
|
|
28
26
|
shift(value: number, options?: TweenedSetOptions): void;
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
updateOptions(options?: Omit<TweenedOptions, keyof StoreOptions<number, keyof StoreManagers>> | undefined): void;
|
|
28
|
+
protected handleAnimationFrame(e: TickerCallbackEntry): void;
|
|
31
29
|
}
|
package/lib/animation/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var F=Object.defineProperty,O=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var g=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var d=(i,e,t)=>e in i?F(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,f=(i,e)=>{for(var t in e||(e={}))D.call(e,t)&&d(i,t,e[t]);if(g)for(var t of g(e))w.call(e,t)&&d(i,t,e[t]);return i},p=(i,e)=>O(i,T(e));var o=(i,e,t)=>{if(!e.has(i))throw TypeError("Cannot "+t)};var r=(i,e,t)=>(o(i,e,"read from private field"),t?t.call(i):e.get(i)),u=(i,e,t)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,t)},l=(i,e,t,s)=>(o(i,e,"write to private field"),s?s.call(i,t):e.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("../Damped-BdnkNOcb.cjs"),C=require("../easings-DsS5-Kqc.cjs"),M=require("../math-GDWEqu7y.cjs"),A=require("../number-yVpzMdbQ.cjs"),b=require("../polyfills-CrcS4RcO.cjs");var c,h,n,a,m;class N extends q.Animation{constructor(t,s){super(t||0,s);u(this,c,C.linear);u(this,h,1e3);u(this,n,0);u(this,a,0);u(this,m,0)}get direction(){return r(this,m)}get length(){return r(this,a)-r(this,n)}get progress(){return this.length?A.preciseNumber((this.current-r(this,n))/this.length,6):0}get entry(){return p(f({},super.entry),{length:this.length,direction:this.direction,progress:this.progress})}set(t,s){s!=null&&s.restart&&(this.current=this.initial),l(this,n,this.current),l(this,a,t),l(this,m,Math.sign(this.length)),this.updateOptions(s),r(this,h)?(this.unlistenAnimationFrame(),this.listenAnimationFrame()):(this.current=r(this,a),this.unlistenAnimationFrame())}shift(t,s){this.set(this.current+t,s)}updateOptions(t){super.updateOptions(t),l(this,c,b.nullishCoalescing(t==null?void 0:t.easing,r(this,c))),l(this,h,b.nullishCoalescing(t==null?void 0:t.duration,r(this,h)))}handleAnimationFrame(t){const s=(t.timestamp-t.startTimestamp)/1e3/(r(this,h)/1e3),y=r(this,c).call(this,M.clamp(s,0,1));this.current=A.preciseNumber(r(this,n)+(r(this,a)-r(this,n))*y,6),s>1&&this.unlistenAnimationFrame()}}c=new WeakMap,h=new WeakMap,n=new WeakMap,a=new WeakMap,m=new WeakMap;exports.Damped=q.Damped;exports.Tweened=N;
|
package/lib/animation/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Damped, type DampedOptions, type DampedEntry } from './Damped';
|
|
2
|
-
export { Tweened, type
|
|
2
|
+
export { Tweened, type TweenedOptions, type TweenedSetOptions, type TweenedEntry, } from './Tweened';
|
package/lib/animation/index.js
CHANGED
|
@@ -1,98 +1,72 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var t in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
if (!
|
|
1
|
+
var O = Object.defineProperty, y = Object.defineProperties;
|
|
2
|
+
var D = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var g = Object.getOwnPropertySymbols;
|
|
4
|
+
var T = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var d = (e, i, t) => i in e ? O(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, f = (e, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
T.call(i, t) && d(e, t, i[t]);
|
|
8
|
+
if (g)
|
|
9
|
+
for (var t of g(i))
|
|
10
|
+
b.call(i, t) && d(e, t, i[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, p = (e, i) => y(e, D(i));
|
|
13
|
+
var o = (e, i, t) => {
|
|
14
|
+
if (!i.has(e))
|
|
15
15
|
throw TypeError("Cannot " + t);
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
if (
|
|
17
|
+
var s = (e, i, t) => (o(e, i, "read from private field"), t ? t.call(e) : i.get(e)), m = (e, i, t) => {
|
|
18
|
+
if (i.has(e))
|
|
19
19
|
throw TypeError("Cannot add the same private member more than once");
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
import { D as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
h(this, d, void 0);
|
|
38
|
-
h(this, x, void 0);
|
|
39
|
-
h(this, F, void 0);
|
|
40
|
-
h(this, b, H);
|
|
41
|
-
h(this, l, 1e3);
|
|
42
|
-
h(this, a, new M(!1));
|
|
43
|
-
h(this, c, 0);
|
|
44
|
-
h(this, g, 0);
|
|
45
|
-
h(this, P, 0);
|
|
46
|
-
h(this, y, (t) => {
|
|
47
|
-
const s = (t.timestamp - t.startTimestamp) / 1e3 / (r(this, l) / 1e3), q = r(this, b).call(this, I(s, 0, 1));
|
|
48
|
-
this.current = N(r(this, c) + (r(this, g) - r(this, c)) * q, 6), s > 1 && u(this, m, f).call(this);
|
|
49
|
-
});
|
|
50
|
-
u(this, w, R).call(this, s);
|
|
51
|
-
}
|
|
52
|
-
get isRunning() {
|
|
53
|
-
return r(this, a);
|
|
20
|
+
i instanceof WeakSet ? i.add(e) : i.set(e, t);
|
|
21
|
+
}, u = (e, i, t, r) => (o(e, i, "write to private field"), r ? r.call(e, t) : i.set(e, t), t);
|
|
22
|
+
import { A as w } from "../Damped-Ceg1a3X8.js";
|
|
23
|
+
import { D as H } from "../Damped-Ceg1a3X8.js";
|
|
24
|
+
import { l as C } from "../easings-BKi40vHz.js";
|
|
25
|
+
import { c as M } from "../math-BOBiC4TN.js";
|
|
26
|
+
import { p as A } from "../number-Bo5RdrA1.js";
|
|
27
|
+
import { n as F } from "../polyfills-DJUYczFm.js";
|
|
28
|
+
var l, n, h, a, c;
|
|
29
|
+
class B extends w {
|
|
30
|
+
constructor(t, r) {
|
|
31
|
+
super(t || 0, r);
|
|
32
|
+
m(this, l, C);
|
|
33
|
+
m(this, n, 1e3);
|
|
34
|
+
m(this, h, 0);
|
|
35
|
+
m(this, a, 0);
|
|
36
|
+
m(this, c, 0);
|
|
54
37
|
}
|
|
55
38
|
get direction() {
|
|
56
|
-
return
|
|
39
|
+
return s(this, c);
|
|
57
40
|
}
|
|
58
41
|
get length() {
|
|
59
|
-
return
|
|
42
|
+
return s(this, a) - s(this, h);
|
|
60
43
|
}
|
|
61
44
|
get progress() {
|
|
62
|
-
return this.length ?
|
|
45
|
+
return this.length ? A((this.current - s(this, h)) / this.length, 6) : 0;
|
|
63
46
|
}
|
|
64
47
|
get entry() {
|
|
65
|
-
return
|
|
48
|
+
return p(f({}, super.entry), {
|
|
66
49
|
length: this.length,
|
|
67
50
|
direction: this.direction,
|
|
68
51
|
progress: this.progress
|
|
69
52
|
});
|
|
70
53
|
}
|
|
71
|
-
set(t,
|
|
72
|
-
|
|
54
|
+
set(t, r) {
|
|
55
|
+
r != null && r.restart && (this.current = this.initial), u(this, h, this.current), u(this, a, t), u(this, c, Math.sign(this.length)), this.updateOptions(r), s(this, n) ? (this.unlistenAnimationFrame(), this.listenAnimationFrame()) : (this.current = s(this, a), this.unlistenAnimationFrame());
|
|
73
56
|
}
|
|
74
|
-
shift(t,
|
|
75
|
-
this.set(this.current + t,
|
|
57
|
+
shift(t, r) {
|
|
58
|
+
this.set(this.current + t, r);
|
|
76
59
|
}
|
|
77
|
-
|
|
78
|
-
u(this,
|
|
60
|
+
updateOptions(t) {
|
|
61
|
+
super.updateOptions(t), u(this, l, F(t == null ? void 0 : t.easing, s(this, l))), u(this, n, F(t == null ? void 0 : t.duration, s(this, n)));
|
|
79
62
|
}
|
|
80
|
-
|
|
81
|
-
|
|
63
|
+
handleAnimationFrame(t) {
|
|
64
|
+
const r = (t.timestamp - t.startTimestamp) / 1e3 / (s(this, n) / 1e3), x = s(this, l).call(this, M(r, 0, 1));
|
|
65
|
+
this.current = A(s(this, h) + (s(this, a) - s(this, h)) * x, 6), r > 1 && this.unlistenAnimationFrame();
|
|
82
66
|
}
|
|
83
67
|
}
|
|
84
|
-
|
|
85
|
-
n(this, b, S(t == null ? void 0 : t.easing, r(this, b))), n(this, l, S(t == null ? void 0 : t.duration, r(this, l))), n(this, d, S(t == null ? void 0 : t.maxFPS, r(this, d))), n(this, x, S(t == null ? void 0 : t.order, r(this, x))), n(this, F, S(t == null ? void 0 : t.culling, r(this, F)));
|
|
86
|
-
}, A = new WeakSet(), j = function() {
|
|
87
|
-
r(this, a).current || (r(this, a).current = !0, O.subscribe(r(this, y), {
|
|
88
|
-
maxFPS: r(this, d),
|
|
89
|
-
order: r(this, x),
|
|
90
|
-
culling: r(this, F)
|
|
91
|
-
}));
|
|
92
|
-
}, m = new WeakSet(), f = function() {
|
|
93
|
-
r(this, a).current && (r(this, a).current = !1, O.unsubscribe(r(this, y)));
|
|
94
|
-
}, y = new WeakMap();
|
|
68
|
+
l = new WeakMap(), n = new WeakMap(), h = new WeakMap(), a = new WeakMap(), c = new WeakMap();
|
|
95
69
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
70
|
+
H as Damped,
|
|
71
|
+
B as Tweened
|
|
98
72
|
};
|
package/lib/canvas/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const S=require("../math-GDWEqu7y.cjs"),E=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const S=require("../math-GDWEqu7y.cjs"),E=require("../tags-Djb6mb1o.cjs"),b=require("../createStylesheet-CqHU9_qv.cjs"),k=require("../element-resizer/index.cjs"),C=require("../ticker/index.cjs");var y=Object.defineProperty,q=Object.getOwnPropertyDescriptor,P=(i,e,s,h)=>{for(var r=h>1?void 0:h?q(e,s):e,f=i.length-1,g;f>=0;f--)(g=i[f])&&(r=(h?g(e,s,r):g(r))||r);return h&&r&&y(e,s,r),r},R=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},t=(i,e,s)=>(R(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},c=(i,e,s,h)=>(R(i,e,"write to private field"),h?h.call(i,s):e.set(i,s),s),M=(i,e,s)=>(R(i,e,"access private method"),s),n,p,l,o,d,u,v,_,m,w,x;const O=b.createStylesheet({":host, canvas":{display:"block",width:"100%",height:"100%"}});exports.CanvasElement=class extends W.CustomElement{constructor(){super(),a(this,w),a(this,n,null),a(this,p,null),a(this,l,0),a(this,o,0),a(this,d,1),a(this,u,0),a(this,v,1),a(this,_,e=>{c(this,d,S.clamp(devicePixelRatio,1,2)),c(this,l,e.contentRect.width),c(this,o,e.contentRect.height),t(this,n).width=t(this,l)*this.pixelRatio,t(this,n).height=t(this,o)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),M(this,w,x).call(this)}),a(this,m,e=>{c(this,u,e.timestamp),c(this,v,e.elapsed),M(this,w,x).call(this)}),this.openShadow(O),E.element(this,{children:E.canvas({ref:e=>{c(this,n,e),c(this,p,e.getContext("2d"))}})})}get canvasElement(){return t(this,n)}get context(){return t(this,p)}get pixelRatio(){return t(this,d)}get width(){return t(this,l)}get height(){return t(this,o)}get detail(){return{width:t(this,l),height:t(this,o),element:this,canvasElement:t(this,n),pixelRatio:t(this,d),context:t(this,p),timestamp:t(this,u),elapsed:t(this,v)}}connectedCallback(){k.elementResizer.subscribe(this,t(this,_)),this.hasAttribute("static")||C.ticker.subscribe(t(this,m),{culling:this,maxFPS:this.hasAttribute("fps")?parseInt(this.getAttribute("fps")):void 0})}disconnectedCallback(){k.elementResizer.unsubscribe(t(this,_)),C.ticker.unsubscribe(t(this,m)),t(this,n).remove()}};n=new WeakMap;p=new WeakMap;l=new WeakMap;o=new WeakMap;d=new WeakMap;u=new WeakMap;v=new WeakMap;_=new WeakMap;m=new WeakMap;w=new WeakSet;x=function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))};exports.CanvasElement=P([W.define("e-canvas")],exports.CanvasElement);
|
package/lib/canvas/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CustomElement as M, define as b } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-BQXXikps.js";
|
|
3
3
|
import { c as P } from "../math-BOBiC4TN.js";
|
|
4
|
-
import { e as S, q as y } from "../tags-
|
|
5
|
-
import { c as A } from "../createStylesheet-
|
|
4
|
+
import { e as S, q as y } from "../tags-CMPg9ETZ.js";
|
|
5
|
+
import { c as A } from "../createStylesheet-DBCEbDjI.js";
|
|
6
6
|
import { elementResizer as k } from "../element-resizer/index.js";
|
|
7
7
|
import { ticker as E } from "../ticker/index.js";
|
|
8
8
|
var O = Object.defineProperty, z = Object.getOwnPropertyDescriptor, D = (t, i, s, r) => {
|
package/lib/checkbox/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const r=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const r=require("../tags-Djb6mb1o.cjs"),_=require("../createStylesheet-CqHU9_qv.cjs"),l=require("../theme/index.cjs"),w='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>';var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,y=(t,e,a,i)=>{for(var h=i>1?void 0:i?b(e,a):e,p=t.length-1,v;p>=0;p--)(v=t[p])&&(h=(i?v(e,a,h):v(h))||h);return i&&h&&x(e,a,h),h},k=(t,e,a)=>{if(!e.has(t))throw TypeError("Cannot "+a)},n=(t,e,a)=>(k(t,e,"read from private field"),a?a.call(t):e.get(t)),f=(t,e,a)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,a)},g=(t,e,a,i)=>(k(t,e,"write to private field"),i?i.call(t,a):e.set(t,a),a),u=(t,e,a)=>(k(t,e,"access private method"),a),s,d,c,o;const C=_.createStylesheet({":host":{position:"relative",display:"inline-block",width:l.aptechkaTheme.heightInput.var,height:l.aptechkaTheme.heightInput.var,borderRadius:l.aptechkaTheme.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:l.aptechkaTheme.colorDarkAux.var},".default svg":{width:"60%",height:"60%",fill:l.aptechkaTheme.colorLight.var,opacity:0,transition:l.aptechkaTheme.durationShort.var},":host(.checked) .default svg":{opacity:1}});exports.CheckboxElement=class extends m.CustomElement{constructor(){super(),f(this,c),f(this,s,null),f(this,d,void 0),this.openShadow(C),g(this,d,this.attachInternals()),r.element(this,{children:r.label({children:[r.span({class:"fake",children:r.slot({children:[r.span({class:"default",children:[w]})]})}),r.input({ref:e=>{g(this,s,e),e.required=this.hasAttribute("required"),e.value=this.getAttribute("value")||"",e.checked=this.hasAttribute("checked"),e.name=this.getAttribute("name")||"",u(this,c,o).call(this)},class:"real",type:"checkbox",onChange:()=>{u(this,c,o).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return n(this,s).checked}set checked(e){n(this,s).checked=e,u(this,c,o).call(this)}get value(){return n(this,s).value}set value(e){n(this,s).value=e,u(this,c,o).call(this)}};s=new WeakMap;d=new WeakMap;c=new WeakSet;o=function(){this.checked?n(this,d).setFormValue(this.value):n(this,d).setFormValue(null),this.classList.toggle("checked",this.checked)};exports.CheckboxElement.formAssociated=!0;exports.CheckboxElement=y([m.define("e-checkbox")],exports.CheckboxElement);
|
package/lib/checkbox/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomElement as w, define as _ } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-BQXXikps.js";
|
|
3
|
-
import { e as y, a3 as x, aB as m, ay as b, a0 as C } from "../tags-
|
|
4
|
-
import { c as A } from "../createStylesheet-
|
|
3
|
+
import { e as y, a3 as x, aB as m, ay as b, a0 as C } from "../tags-CMPg9ETZ.js";
|
|
4
|
+
import { c as A } from "../createStylesheet-DBCEbDjI.js";
|
|
5
5
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
6
6
|
const E = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>';
|
|
7
7
|
var S = Object.defineProperty, I = Object.getOwnPropertyDescriptor, F = (e, t, a, i) => {
|