aptechka 0.20.0 → 0.21.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/lib/Tweened-CDYmG9hk.js +138 -0
- package/lib/Tweened-DlyMbHu_.cjs +1 -0
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +53 -6
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +28 -26
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +14 -18
- package/lib/order/index.js +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +189 -171
- package/package.json +1 -9
- package/lib/Animation-CuR3fbKl.js +0 -104
- package/lib/Animation-Dt4Kc5VA.cjs +0 -1
- package/lib/Damped-C236fv4v.cjs +0 -1
- package/lib/Damped-OSAezqOR.js +0 -52
- package/lib/Tweened-B7zGiekd.cjs +0 -1
- package/lib/Tweened-DfDr-AYv.js +0 -43
- package/lib/coordinates-CgdGoSYs.js +0 -24
- package/lib/coordinates-D8Np3cPD.cjs +0 -1
- package/lib/pointer/Pointer.d.ts +0 -22
- package/lib/pointer/PointerElement.d.ts +0 -13
- package/lib/pointer/index.cjs +0 -1
- package/lib/pointer/index.d.ts +0 -2
- package/lib/pointer/index.js +0 -151
package/lib/utils/index.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as W, p as j } from "../attributes-69we3byR.js";
|
|
2
2
|
import { i as f } from "../browser-0zX67oeU.js";
|
|
3
|
-
import {
|
|
4
|
-
import { f as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { g as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
a[o] = t[n];
|
|
3
|
+
import { f as V, b as U, a as F, g as K } from "../dom-0S_WDL4g.js";
|
|
4
|
+
import { c as G, n as J, f as Y, p as Z, b as X, i as _, m as H, e as L, g as tt, j as et, d as st, o as nt, a as at, h as ot, k as it, l as rt } from "../easings-BKi40vHz.js";
|
|
5
|
+
import { b as lt, f as ct, c as ht, a as ft, d as pt, g as dt, e as mt, i as gt, m as xt, h as yt, o as St, p as wt } from "../object-DOa0yKM9.js";
|
|
6
|
+
import { d as Bt, t as Et } from "../function-C10DGppn.js";
|
|
7
|
+
import { s as bt } from "../gestures-D2Fdra_G.js";
|
|
8
|
+
import { c as p } from "../string-f0Dnk0L1.js";
|
|
9
|
+
import { a as Pt, g as Rt, i as At, k as Dt, s as Mt, t as Qt, u as $t } from "../string-f0Dnk0L1.js";
|
|
10
|
+
import { g as kt, a as vt, b as zt } from "../layout-HoBT_Da2.js";
|
|
11
|
+
import { e as jt, f as Nt, c as Vt, d as Ut, l as Ft, m as Kt, n as qt, p as Gt, r as Jt, g as Yt, b as Zt, a as Xt, s as _t, t as Ht } from "../polyfills-AItxku8u.js";
|
|
12
|
+
import { g as te, a as ee } from "../style-j2TwriJ_.js";
|
|
13
|
+
function g(e, t, ...s) {
|
|
14
|
+
return [...e.slice(0, t), ...s, ...e.slice(t)];
|
|
15
|
+
}
|
|
16
|
+
function x(e, t) {
|
|
17
|
+
const s = e.length;
|
|
18
|
+
t = t % s;
|
|
19
|
+
const n = new Array(s);
|
|
20
|
+
for (let a = 0; a < s; a++) {
|
|
21
|
+
const o = (a + t) % s;
|
|
22
|
+
n[o] = e[a];
|
|
24
23
|
}
|
|
25
|
-
return
|
|
24
|
+
return n;
|
|
26
25
|
}
|
|
27
|
-
function y(
|
|
28
|
-
if (!+
|
|
29
|
-
const s = 1024,
|
|
26
|
+
function y(e, t = 2) {
|
|
27
|
+
if (!+e) return "0 Bytes";
|
|
28
|
+
const s = 1024, n = t < 0 ? 0 : t, a = [
|
|
30
29
|
"Bytes",
|
|
31
30
|
"KiB",
|
|
32
31
|
"MiB",
|
|
@@ -36,195 +35,214 @@ function y(t, e = 2) {
|
|
|
36
35
|
"EiB",
|
|
37
36
|
"ZiB",
|
|
38
37
|
"YiB"
|
|
39
|
-
], o = Math.floor(Math.log(
|
|
40
|
-
return `${parseFloat((
|
|
38
|
+
], o = Math.floor(Math.log(e) / Math.log(s));
|
|
39
|
+
return `${parseFloat((e / Math.pow(s, o)).toFixed(n))} ${a[o]}`;
|
|
41
40
|
}
|
|
42
|
-
function S(
|
|
43
|
-
const s =
|
|
41
|
+
function S(e, t) {
|
|
42
|
+
const s = e.measureText(t), n = s.actualBoundingBoxAscent + s.actualBoundingBoxDescent, a = s.width;
|
|
44
43
|
return {
|
|
45
|
-
height:
|
|
46
|
-
width:
|
|
44
|
+
height: n,
|
|
45
|
+
width: a
|
|
47
46
|
};
|
|
48
47
|
}
|
|
49
|
-
function
|
|
50
|
-
return Math.floor(
|
|
48
|
+
function w(e) {
|
|
49
|
+
return Math.floor(e) + 0.5;
|
|
51
50
|
}
|
|
52
|
-
function
|
|
53
|
-
let
|
|
54
|
-
return
|
|
55
|
-
(s - u) *
|
|
56
|
-
(
|
|
51
|
+
function C(e, t, s, n, a, o) {
|
|
52
|
+
let i = e / t, l = s / n, r = 0, u = 0;
|
|
53
|
+
return a = typeof a == "undefined" ? 0.5 : a, o = typeof o == "undefined" ? 0.5 : o, i > l ? (r = n, u = n * i) : (u = s, r = s / i), [
|
|
54
|
+
(s - u) * a,
|
|
55
|
+
(n - r) * o,
|
|
57
56
|
u,
|
|
58
|
-
|
|
57
|
+
r
|
|
59
58
|
];
|
|
60
59
|
}
|
|
61
|
-
function B(
|
|
62
|
-
let
|
|
63
|
-
return
|
|
64
|
-
(s - u) *
|
|
65
|
-
(
|
|
60
|
+
function B(e, t, s, n, a, o) {
|
|
61
|
+
let i = e / t, l = s / n, r = 0, u = 0;
|
|
62
|
+
return a = typeof a == "undefined" ? 0.5 : a, o = typeof o == "undefined" ? 0.5 : o, i > l ? (u = s, r = s / i) : (r = n, u = n * i), [
|
|
63
|
+
(s - u) * a,
|
|
64
|
+
(n - r) * o,
|
|
66
65
|
u,
|
|
67
|
-
|
|
66
|
+
r
|
|
68
67
|
];
|
|
69
68
|
}
|
|
70
|
-
function E(
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
function O(
|
|
74
|
-
return Math.sqrt((
|
|
69
|
+
function E(e, t) {
|
|
70
|
+
return e.x < t.x + t.width && e.x > t.x && e.y < t.y + t.height && e.y > t.y;
|
|
71
|
+
}
|
|
72
|
+
function O(e, t) {
|
|
73
|
+
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2) < t.radius;
|
|
74
|
+
}
|
|
75
|
+
function b(e, t, s = !1) {
|
|
76
|
+
let n = e.x - t.width / 2, a = t.height / 2 - e.y;
|
|
77
|
+
return s && (n = n / (t.width / 2), a = a / (t.height / 2)), { x: n, y: a };
|
|
78
|
+
}
|
|
79
|
+
function I(e, t) {
|
|
80
|
+
const s = e.x / t.width, n = e.y / t.height;
|
|
81
|
+
return { x: s, y: n };
|
|
82
|
+
}
|
|
83
|
+
function P(e, t) {
|
|
84
|
+
return t = t || {
|
|
85
|
+
x: 0,
|
|
86
|
+
y: 0,
|
|
87
|
+
width: document.documentElement.offsetWidth,
|
|
88
|
+
height: innerHeight
|
|
89
|
+
}, {
|
|
90
|
+
x: (e.x - t.x) / t.width * t.width,
|
|
91
|
+
y: (e.y - t.y) / t.height * t.height
|
|
92
|
+
};
|
|
75
93
|
}
|
|
76
|
-
function
|
|
77
|
-
const s =
|
|
94
|
+
function c(e, t) {
|
|
95
|
+
const s = e.styleMap.get(t);
|
|
78
96
|
if (s) {
|
|
79
|
-
const
|
|
80
|
-
return
|
|
97
|
+
const n = s.toString();
|
|
98
|
+
return n.startsWith("var") ? c(e, n.slice(4, -1)) : n;
|
|
81
99
|
}
|
|
82
100
|
}
|
|
83
|
-
function
|
|
84
|
-
const
|
|
101
|
+
function R(...e) {
|
|
102
|
+
const t = {};
|
|
85
103
|
return Array.from(document.styleSheets).forEach((s) => {
|
|
86
|
-
Array.from(s.cssRules).forEach((
|
|
87
|
-
|
|
88
|
-
const o =
|
|
89
|
-
o && (
|
|
104
|
+
Array.from(s.cssRules).forEach((n) => {
|
|
105
|
+
n instanceof CSSStyleRule && n.selectorText === ":root" && e.forEach((a) => {
|
|
106
|
+
const o = c(n, a);
|
|
107
|
+
o && (t[a] = o);
|
|
90
108
|
});
|
|
91
109
|
});
|
|
92
|
-
}),
|
|
93
|
-
|
|
94
|
-
}),
|
|
95
|
-
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
return decodeURIComponent(window.escape(
|
|
99
|
-
}
|
|
100
|
-
function
|
|
101
|
-
const
|
|
102
|
-
return window.btoa(
|
|
103
|
-
}
|
|
104
|
-
function
|
|
105
|
-
let
|
|
106
|
-
for (const s in
|
|
107
|
-
const
|
|
108
|
-
typeof
|
|
110
|
+
}), e.forEach((s) => {
|
|
111
|
+
t[s] || console.warn(`variable named ${s} not found`);
|
|
112
|
+
}), t;
|
|
113
|
+
}
|
|
114
|
+
function A(e) {
|
|
115
|
+
const t = window.atob(e);
|
|
116
|
+
return decodeURIComponent(window.escape(t));
|
|
117
|
+
}
|
|
118
|
+
function D(e) {
|
|
119
|
+
const t = window.unescape(encodeURIComponent(e));
|
|
120
|
+
return window.btoa(t);
|
|
121
|
+
}
|
|
122
|
+
function h(e) {
|
|
123
|
+
let t = "";
|
|
124
|
+
for (const s in e) {
|
|
125
|
+
const n = e[s];
|
|
126
|
+
typeof n == "object" ? (t += `${s} {`, t += h(n), t += "}") : t += `${p(s)}: ${n};`;
|
|
109
127
|
}
|
|
110
|
-
return
|
|
128
|
+
return t;
|
|
111
129
|
}
|
|
112
|
-
function
|
|
130
|
+
function M(e) {
|
|
113
131
|
if (f) {
|
|
114
|
-
const
|
|
115
|
-
return
|
|
132
|
+
const t = new CSSStyleSheet();
|
|
133
|
+
return t.replaceSync(h(e)), t;
|
|
116
134
|
}
|
|
117
135
|
return null;
|
|
118
136
|
}
|
|
119
|
-
function
|
|
120
|
-
return new Promise((
|
|
137
|
+
function Q(e) {
|
|
138
|
+
return new Promise((t) => {
|
|
121
139
|
setTimeout(() => {
|
|
122
|
-
|
|
123
|
-
},
|
|
140
|
+
t();
|
|
141
|
+
}, e);
|
|
124
142
|
});
|
|
125
143
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
const s =
|
|
144
|
+
function $(e, t = "") {
|
|
145
|
+
t = t.endsWith("/") ? t.slice(0, -1) : t, e = e.replace(t, ""), e.startsWith("/") && (e = e.slice(1));
|
|
146
|
+
const s = e.split("#"), n = s[0].split("?"), a = n[0].startsWith("/") ? n[0] : "/" + n[0], o = t + a, i = n == null ? void 0 : n[1], l = s == null ? void 0 : s[1];
|
|
129
147
|
return {
|
|
130
|
-
leaf:
|
|
148
|
+
leaf: a,
|
|
131
149
|
pathname: o,
|
|
132
|
-
parameters:
|
|
133
|
-
hash:
|
|
150
|
+
parameters: i,
|
|
151
|
+
hash: l
|
|
134
152
|
};
|
|
135
153
|
}
|
|
136
|
-
function
|
|
137
|
-
return
|
|
154
|
+
function T(e = "/") {
|
|
155
|
+
return e.endsWith("/") || (e += "/"), e.startsWith("/") || (e += "/"), e;
|
|
138
156
|
}
|
|
139
|
-
function
|
|
140
|
-
const
|
|
141
|
-
|
|
157
|
+
function k(e, t, s, n) {
|
|
158
|
+
const a = s || location.search, o = n ? n.startsWith("#") ? n : "#" + n : "", i = a ? a.startsWith("?") ? a : "?" + a : "", l = `${t}${o}${i}`;
|
|
159
|
+
e === "push" ? history.pushState(null, "", l) : e === "replace" && history.replaceState(null, "", l);
|
|
142
160
|
}
|
|
143
161
|
export {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
162
|
+
jt as calculateDistance,
|
|
163
|
+
Nt as calculateDistanceWithRadius,
|
|
164
|
+
p as camelToKebab,
|
|
165
|
+
Pt as capitalize,
|
|
166
|
+
k as changeHistory,
|
|
167
|
+
Vt as clamp,
|
|
150
168
|
lt as cloneDeep,
|
|
151
|
-
|
|
169
|
+
ct as compareObjects,
|
|
152
170
|
B as contain,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
171
|
+
C as cover,
|
|
172
|
+
ht as createJSONAndSave,
|
|
173
|
+
M as createStylesheet,
|
|
174
|
+
Ut as damp,
|
|
175
|
+
Bt as debounce,
|
|
176
|
+
D as decode,
|
|
177
|
+
ft as dispatchBeforeSizeChangeEvent,
|
|
178
|
+
pt as dispatchSizeChangeEvent,
|
|
161
179
|
O as dotCircleCollision,
|
|
162
180
|
E as dotRectCollision,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
181
|
+
G as easeInCubic,
|
|
182
|
+
J as easeInExpo,
|
|
183
|
+
Y as easeInOutCubic,
|
|
184
|
+
Z as easeInOutExpo,
|
|
185
|
+
X as easeInOutQuad,
|
|
186
|
+
_ as easeInOutQuart,
|
|
187
|
+
H as easeInOutQuint,
|
|
188
|
+
L as easeInQuad,
|
|
189
|
+
tt as easeInQuart,
|
|
190
|
+
et as easeInQuint,
|
|
191
|
+
st as easeOutCubic,
|
|
174
192
|
nt as easeOutExpo,
|
|
175
|
-
|
|
176
|
-
|
|
193
|
+
at as easeOutQuad,
|
|
194
|
+
ot as easeOutQuart,
|
|
177
195
|
it as easeOutQuint,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
196
|
+
A as encode,
|
|
197
|
+
V as findParentElement,
|
|
198
|
+
U as findScrollParentElement,
|
|
199
|
+
w as fixPosition,
|
|
182
200
|
y as formatBytes,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
201
|
+
Rt as generateId,
|
|
202
|
+
F as getAllParentElements,
|
|
203
|
+
kt as getCumulativeOffsetLeft,
|
|
204
|
+
vt as getCumulativeOffsetTop,
|
|
205
|
+
zt as getCumulativePosition,
|
|
206
|
+
K as getElement,
|
|
207
|
+
te as getElementTransitionDurationMS,
|
|
208
|
+
ee as getElementTransitionDurationS,
|
|
209
|
+
P as getPointerPosition,
|
|
210
|
+
R as getRootVariables,
|
|
193
211
|
g as insert,
|
|
194
212
|
f as isBrowser,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
213
|
+
dt as isESClass,
|
|
214
|
+
mt as isNullish,
|
|
215
|
+
gt as isObject,
|
|
216
|
+
At as isUppercase,
|
|
217
|
+
Dt as kebabToCamel,
|
|
218
|
+
Ft as lerp,
|
|
219
|
+
rt as linear,
|
|
220
|
+
Kt as mapRange,
|
|
203
221
|
S as measureText,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
222
|
+
xt as mergeDeep,
|
|
223
|
+
yt as mixin,
|
|
224
|
+
I as normalize,
|
|
225
|
+
T as normalizeBase,
|
|
226
|
+
qt as nullishCoalescing,
|
|
227
|
+
St as omit,
|
|
228
|
+
W as parseAttribute,
|
|
229
|
+
j as parseAttributeValue,
|
|
212
230
|
wt as pick,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
231
|
+
Gt as preciseNumber,
|
|
232
|
+
Jt as round,
|
|
233
|
+
Yt as roundNumberTo,
|
|
234
|
+
b as screenToCartesian,
|
|
235
|
+
bt as setupDrag,
|
|
218
236
|
x as shiftArray,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
237
|
+
Zt as smootherstep,
|
|
238
|
+
Xt as smoothstep,
|
|
239
|
+
Mt as snakeToDotted,
|
|
240
|
+
$ as splitPath,
|
|
241
|
+
_t as step,
|
|
242
|
+
h as styleToString,
|
|
243
|
+
Et as throttle,
|
|
244
|
+
Qt as toPascalCase,
|
|
245
|
+
Ht as toStep,
|
|
246
|
+
$t as uncapitalize,
|
|
247
|
+
Q as wait
|
|
230
248
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -108,11 +108,6 @@
|
|
|
108
108
|
"default": "./lib/order/index.js",
|
|
109
109
|
"types": "./lib/order/index.d.ts"
|
|
110
110
|
},
|
|
111
|
-
"./pointer": {
|
|
112
|
-
"require": "./lib/pointer/index.cjs",
|
|
113
|
-
"default": "./lib/pointer/index.js",
|
|
114
|
-
"types": "./lib/pointer/index.d.ts"
|
|
115
|
-
},
|
|
116
111
|
"./popover": {
|
|
117
112
|
"require": "./lib/popover/index.cjs",
|
|
118
113
|
"default": "./lib/popover/index.js",
|
|
@@ -218,9 +213,6 @@
|
|
|
218
213
|
"order": [
|
|
219
214
|
"lib/order/index.d.ts"
|
|
220
215
|
],
|
|
221
|
-
"pointer": [
|
|
222
|
-
"lib/pointer/index.d.ts"
|
|
223
|
-
],
|
|
224
216
|
"popover": [
|
|
225
217
|
"lib/popover/index.d.ts"
|
|
226
218
|
],
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
var I = (i) => {
|
|
2
|
-
throw TypeError(i);
|
|
3
|
-
};
|
|
4
|
-
var S = (i, r, t) => r.has(i) || I("Cannot " + t);
|
|
5
|
-
var e = (i, r, t) => (S(i, r, "read from private field"), t ? t.call(i) : r.get(i)), a = (i, r, t) => r.has(i) ? I("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, t), h = (i, r, t, u) => (S(i, r, "write to private field"), u ? u.call(i, t) : r.set(i, t), t), P = (i, r, t) => (S(i, r, "access private method"), t);
|
|
6
|
-
import { S as q } from "./Store-OTdcl6SX.js";
|
|
7
|
-
import { p as z, n as F, c as y } from "./polyfills-AItxku8u.js";
|
|
8
|
-
import { ticker as O } from "./ticker/index.js";
|
|
9
|
-
import { TICK_ORDER as N } from "./order/index.js";
|
|
10
|
-
var f, d, A, l, b, s, n, m, c, g, M, R, x;
|
|
11
|
-
class E extends q {
|
|
12
|
-
constructor(t, u) {
|
|
13
|
-
super(t || 0, u);
|
|
14
|
-
a(this, M);
|
|
15
|
-
a(this, f);
|
|
16
|
-
a(this, d, N.ANIMATION);
|
|
17
|
-
a(this, A);
|
|
18
|
-
a(this, l, new q(!1));
|
|
19
|
-
a(this, b, 0);
|
|
20
|
-
a(this, s, 0);
|
|
21
|
-
a(this, n, -1 / 0);
|
|
22
|
-
a(this, m, 1 / 0);
|
|
23
|
-
a(this, c, 0);
|
|
24
|
-
a(this, g, null);
|
|
25
|
-
a(this, x, (t) => {
|
|
26
|
-
this.handleAnimationFrame(t);
|
|
27
|
-
});
|
|
28
|
-
h(this, s, this.current);
|
|
29
|
-
}
|
|
30
|
-
get direction() {
|
|
31
|
-
return e(this, b);
|
|
32
|
-
}
|
|
33
|
-
get target() {
|
|
34
|
-
return e(this, s);
|
|
35
|
-
}
|
|
36
|
-
get min() {
|
|
37
|
-
return e(this, n);
|
|
38
|
-
}
|
|
39
|
-
set min(t) {
|
|
40
|
-
h(this, n, t), this.set(e(this, s), {
|
|
41
|
-
equalize: !0
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
get max() {
|
|
45
|
-
return e(this, m);
|
|
46
|
-
}
|
|
47
|
-
set max(t) {
|
|
48
|
-
h(this, m, t), this.set(e(this, s), {
|
|
49
|
-
equalize: !0
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
get from() {
|
|
53
|
-
return e(this, c);
|
|
54
|
-
}
|
|
55
|
-
get isRunning() {
|
|
56
|
-
return e(this, l);
|
|
57
|
-
}
|
|
58
|
-
get delta() {
|
|
59
|
-
return Math.abs(e(this, s) - e(this, c));
|
|
60
|
-
}
|
|
61
|
-
get deltaProgress() {
|
|
62
|
-
return this.delta ? z(Math.abs(this.current - e(this, c)) / this.delta, 6) : 0;
|
|
63
|
-
}
|
|
64
|
-
get distance() {
|
|
65
|
-
return Math.abs(e(this, m) - e(this, n));
|
|
66
|
-
}
|
|
67
|
-
get distanceProgress() {
|
|
68
|
-
return this.distance ? z(Math.abs(this.current - e(this, n)) / this.distance, 6) : 0;
|
|
69
|
-
}
|
|
70
|
-
set(t, u) {
|
|
71
|
-
(e(this, s) !== t || u != null && u.restart) && (h(this, g, t), this.updateOptions(u), h(this, g, null), e(this, s) !== this.current && this.start());
|
|
72
|
-
}
|
|
73
|
-
shift(t, u) {
|
|
74
|
-
this.set(e(this, s) + t, u);
|
|
75
|
-
}
|
|
76
|
-
reset() {
|
|
77
|
-
super.reset(), this.set(this.initial, { equalize: !0 });
|
|
78
|
-
}
|
|
79
|
-
close() {
|
|
80
|
-
super.close(), this.reset(), this.unlistenAnimationFrame();
|
|
81
|
-
}
|
|
82
|
-
listenAnimationFrame() {
|
|
83
|
-
e(this, l).current || (e(this, l).current = !0, O.subscribe(e(this, x), {
|
|
84
|
-
maxFPS: e(this, f),
|
|
85
|
-
order: e(this, d),
|
|
86
|
-
culling: e(this, A)
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
unlistenAnimationFrame() {
|
|
90
|
-
e(this, l).current && (e(this, l).current = !1, O.unsubscribe(e(this, x)));
|
|
91
|
-
}
|
|
92
|
-
updateOptions(t) {
|
|
93
|
-
h(this, f, F(t == null ? void 0 : t.maxFPS, e(this, f))), h(this, d, F(t == null ? void 0 : t.order, e(this, d))), h(this, A, F(t == null ? void 0 : t.culling, e(this, A))), h(this, n, F(t == null ? void 0 : t.min, e(this, n))), h(this, m, F(t == null ? void 0 : t.max, e(this, m))), P(this, M, R).call(this, typeof e(this, g) == "number" ? e(this, g) : e(this, s)), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = e(this, s)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
|
|
94
|
-
}
|
|
95
|
-
start() {
|
|
96
|
-
this.listenAnimationFrame();
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
f = new WeakMap(), d = new WeakMap(), A = new WeakMap(), l = new WeakMap(), b = new WeakMap(), s = new WeakMap(), n = new WeakMap(), m = new WeakMap(), c = new WeakMap(), g = new WeakMap(), M = new WeakSet(), R = function(t) {
|
|
100
|
-
h(this, b, Math.sign(t - e(this, s))), h(this, s, y(t, e(this, n), e(this, m))), h(this, c, this.current);
|
|
101
|
-
}, x = new WeakMap();
|
|
102
|
-
export {
|
|
103
|
-
E as A
|
|
104
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var C=i=>{throw TypeError(i)};var S=(i,s,t)=>s.has(i)||C("Cannot "+t);var e=(i,s,t)=>(S(i,s,"read from private field"),t?t.call(i):s.get(i)),a=(i,s,t)=>s.has(i)?C("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),h=(i,s,t,n)=>(S(i,s,"write to private field"),n?n.call(i,t):s.set(i,t),t),M=(i,s,t)=>(S(i,s,"access private method"),t);const I=require("./Store-CDb6RMce.cjs"),c=require("./polyfills-Caa6z-Ay.cjs"),P=require("./ticker/index.cjs"),z=require("./order/index.cjs");var f,b,A,m,F,r,u,l,g,d,q,y,x;class N extends I.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,f);a(this,b,z.TICK_ORDER.ANIMATION);a(this,A);a(this,m,new I.Store(!1));a(this,F,0);a(this,r,0);a(this,u,-1/0);a(this,l,1/0);a(this,g,0);a(this,d,null);a(this,x,t=>{this.handleAnimationFrame(t)});h(this,r,this.current)}get direction(){return e(this,F)}get target(){return e(this,r)}get min(){return e(this,u)}set min(t){h(this,u,t),this.set(e(this,r),{equalize:!0})}get max(){return e(this,l)}set max(t){h(this,l,t),this.set(e(this,r),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,m)}get delta(){return Math.abs(e(this,r)-e(this,g))}get deltaProgress(){return this.delta?c.preciseNumber(Math.abs(this.current-e(this,g))/this.delta,6):0}get distance(){return Math.abs(e(this,l)-e(this,u))}get distanceProgress(){return this.distance?c.preciseNumber(Math.abs(this.current-e(this,u))/this.distance,6):0}set(t,n){(e(this,r)!==t||n!=null&&n.restart)&&(h(this,d,t),this.updateOptions(n),h(this,d,null),e(this,r)!==this.current&&this.start())}shift(t,n){this.set(e(this,r)+t,n)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,m).current||(e(this,m).current=!0,P.ticker.subscribe(e(this,x),{maxFPS:e(this,f),order:e(this,b),culling:e(this,A)}))}unlistenAnimationFrame(){e(this,m).current&&(e(this,m).current=!1,P.ticker.unsubscribe(e(this,x)))}updateOptions(t){h(this,f,c.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,b,c.nullishCoalescing(t==null?void 0:t.order,e(this,b))),h(this,A,c.nullishCoalescing(t==null?void 0:t.culling,e(this,A))),h(this,u,c.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,c.nullishCoalescing(t==null?void 0:t.max,e(this,l))),M(this,q,y).call(this,typeof e(this,d)=="number"?e(this,d):e(this,r)),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=e(this,r)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}f=new WeakMap,b=new WeakMap,A=new WeakMap,m=new WeakMap,F=new WeakMap,r=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,d=new WeakMap,q=new WeakSet,y=function(t){h(this,F,Math.sign(t-e(this,r))),h(this,r,c.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},x=new WeakMap;exports.Animation=N;
|
package/lib/Damped-C236fv4v.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var q=Object.defineProperty,y=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))O.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))v.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>y(t,C(e));var A=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(A(t,e,"read from private field"),s?s.call(t):e.get(t)),u=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),c=(t,e,s,r)=>(A(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const h=require("./polyfills-Caa6z-Ay.cjs"),w=require("./Animation-Dt4Kc5VA.cjs");var i,n;class B extends w.Animation{constructor(s,r){super(s,r);u(this,i);u(this,n);this.damping=20,this.stiffness=0,this.mass=0,c(this,i,0),c(this,n,0),this.updateOptions(p(f({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,n)}updateOptions(s){this.damping=h.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=h.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=h.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){h.preciseNumber(this.current,6)===h.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,F=Math.abs(r-this.target);c(this,n,F/s.timeBetweenFrames);const m=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const b=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;c(this,i,a(this,i)+b/this.mass*m),this.current+=a(this,i)*m}else this.current=h.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,n=new WeakMap;exports.Damped=B;
|
package/lib/Damped-OSAezqOR.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var v = Object.defineProperty, w = Object.defineProperties;
|
|
2
|
-
var x = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var d = Object.getOwnPropertySymbols;
|
|
4
|
-
var y = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var g = (s) => {
|
|
6
|
-
throw TypeError(s);
|
|
7
|
-
};
|
|
8
|
-
var f = (s, e, t) => e in s ? v(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, l = (s, e) => {
|
|
9
|
-
for (var t in e || (e = {}))
|
|
10
|
-
y.call(e, t) && f(s, t, e[t]);
|
|
11
|
-
if (d)
|
|
12
|
-
for (var t of d(e))
|
|
13
|
-
B.call(e, t) && f(s, t, e[t]);
|
|
14
|
-
return s;
|
|
15
|
-
}, p = (s, e) => w(s, x(e));
|
|
16
|
-
var A = (s, e, t) => e.has(s) || g("Cannot " + t);
|
|
17
|
-
var r = (s, e, t) => (A(s, e, "read from private field"), t ? t.call(s) : e.get(s)), c = (s, e, t) => e.has(s) ? g("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), n = (s, e, t, a) => (A(s, e, "write to private field"), a ? a.call(s, t) : e.set(s, t), t);
|
|
18
|
-
import { n as u, p as F, d as D } from "./polyfills-AItxku8u.js";
|
|
19
|
-
import { A as q } from "./Animation-CuR3fbKl.js";
|
|
20
|
-
var i, h;
|
|
21
|
-
class N extends q {
|
|
22
|
-
constructor(t, a) {
|
|
23
|
-
super(t, a);
|
|
24
|
-
c(this, i);
|
|
25
|
-
c(this, h);
|
|
26
|
-
this.damping = 20, this.stiffness = 0, this.mass = 0, n(this, i, 0), n(this, h, 0), this.updateOptions(p(l({}, a), { equalize: !0 }));
|
|
27
|
-
}
|
|
28
|
-
get velocity() {
|
|
29
|
-
return r(this, i);
|
|
30
|
-
}
|
|
31
|
-
get speed() {
|
|
32
|
-
return r(this, h);
|
|
33
|
-
}
|
|
34
|
-
updateOptions(t) {
|
|
35
|
-
this.damping = u(t == null ? void 0 : t.damping, this.damping), this.mass = u(t == null ? void 0 : t.mass, this.mass), this.stiffness = u(t == null ? void 0 : t.stiffness, this.stiffness), super.updateOptions(t);
|
|
36
|
-
}
|
|
37
|
-
handleAnimationFrame(t) {
|
|
38
|
-
F(this.current, 6) === F(this.target, 6) && (this.unlistenAnimationFrame(), this.current = this.target);
|
|
39
|
-
const a = this.current, O = Math.abs(a - this.target);
|
|
40
|
-
n(this, h, O / t.timeBetweenFrames);
|
|
41
|
-
const m = t.timeBetweenFrames / 1e3;
|
|
42
|
-
if (this.mass || this.stiffness) {
|
|
43
|
-
const b = (this.target - this.current) * this.stiffness - r(this, i) * this.damping;
|
|
44
|
-
n(this, i, r(this, i) + b / this.mass * m), this.current += r(this, i) * m;
|
|
45
|
-
} else
|
|
46
|
-
this.current = D(this.current, this.target, this.damping, m);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
i = new WeakMap(), h = new WeakMap();
|
|
50
|
-
export {
|
|
51
|
-
N as D
|
|
52
|
-
};
|
package/lib/Tweened-B7zGiekd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var F=Object.defineProperty,O=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var o=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;var d=i=>{throw TypeError(i)};var m=(i,t,e)=>t in i?F(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,g=(i,t)=>{for(var e in t||(t={}))o.call(t,e)&&m(i,e,t[e]);if(c)for(var e of c(t))p.call(t,e)&&m(i,e,t[e]);return i},A=(i,t)=>O(i,b(t));var f=(i,t,e)=>t.has(i)||d("Cannot "+e);var r=(i,t,e)=>(f(i,t,"read from private field"),e?e.call(i):t.get(i)),l=(i,t,e)=>t.has(i)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),h=(i,t,e,s)=>(f(i,t,"write to private field"),s?s.call(i,e):t.set(i,e),e);const w=require("./easings-DsS5-Kqc.cjs"),u=require("./polyfills-Caa6z-Ay.cjs"),C=require("./Animation-Dt4Kc5VA.cjs");var n,a;class S extends C.Animation{constructor(e,s){super(e||0,s);l(this,n,w.linear);l(this,a,1e3);this.updateOptions(A(g({},s),{equalize:!0}))}updateOptions(e){super.updateOptions(e),h(this,n,u.nullishCoalescing(e==null?void 0:e.easing,r(this,n))),h(this,a,u.nullishCoalescing(e==null?void 0:e.duration,r(this,a)))}handleAnimationFrame(e){const s=e.timeElapsedSinceSubscription/1e3/(r(this,a)/1e3),q=r(this,n).call(this,u.clamp(s,0,1));this.current=u.preciseNumber(this.from+(this.target-this.from)*q,6),s>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,a=new WeakMap;exports.Tweened=S;
|