aptechka 0.19.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 +29 -27
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +1 -2
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +14 -18
- package/lib/order/index.js +1 -1
- package/lib/polyfills-AItxku8u.js +76 -0
- package/lib/polyfills-Caa6z-Ay.cjs +1 -0
- package/lib/source/index.cjs +1 -5
- package/lib/source/index.d.ts +0 -1
- package/lib/source/index.js +67 -152
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +213 -154
- package/package.json +1 -41
- package/lib/Animation-DI864E0i.cjs +0 -1
- package/lib/Animation-w6BLTCum.js +0 -105
- package/lib/Damped-DEHDEq-b.js +0 -53
- package/lib/Damped-ipnDc0iX.cjs +0 -1
- package/lib/Tweened-B1TfANfR.cjs +0 -1
- package/lib/Tweened-C52xXDLY.js +0 -44
- package/lib/canvas/index.cjs +0 -1
- package/lib/canvas/index.d.ts +0 -34
- package/lib/canvas/index.js +0 -108
- package/lib/canvas-CU5Xjahf.cjs +0 -1
- package/lib/canvas-DeZ0SLUJ.js +0 -34
- package/lib/coordinates-CgdGoSYs.js +0 -24
- package/lib/coordinates-D8Np3cPD.cjs +0 -1
- package/lib/image/index.cjs +0 -1
- package/lib/image/index.d.ts +0 -10
- package/lib/image/index.js +0 -15
- package/lib/jss-CjccJC-K.js +0 -21
- package/lib/jss-GJLvaNfT.cjs +0 -1
- package/lib/math-BOBiC4TN.js +0 -45
- package/lib/math-GDWEqu7y.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/polyfills-CM4SCDTt.cjs +0 -1
- package/lib/polyfills-X6KXuHg-.js +0 -33
- package/lib/sequence/index.cjs +0 -1
- package/lib/sequence/index.d.ts +0 -20
- package/lib/sequence/index.js +0 -158
- package/lib/source/SourceElement.d.ts +0 -24
- package/lib/test/starting-style/index.d.ts +0 -1
- package/lib/video/index.cjs +0 -1
- package/lib/video/index.d.ts +0 -21
- package/lib/video/index.js +0 -55
package/lib/utils/index.js
CHANGED
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { i as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { f as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { s as
|
|
10
|
-
import {
|
|
11
|
-
import { g as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
for (let o = 0; o < s; o++) {
|
|
24
|
-
const n = (o + e) % s;
|
|
25
|
-
a[n] = t[o];
|
|
1
|
+
import { a as W, p as j } from "../attributes-69we3byR.js";
|
|
2
|
+
import { i as f } from "../browser-0zX67oeU.js";
|
|
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];
|
|
26
23
|
}
|
|
27
|
-
return
|
|
24
|
+
return n;
|
|
28
25
|
}
|
|
29
|
-
function
|
|
30
|
-
if (!+
|
|
31
|
-
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 = [
|
|
32
29
|
"Bytes",
|
|
33
30
|
"KiB",
|
|
34
31
|
"MiB",
|
|
@@ -38,152 +35,214 @@ function f(t, e = 2) {
|
|
|
38
35
|
"EiB",
|
|
39
36
|
"ZiB",
|
|
40
37
|
"YiB"
|
|
41
|
-
],
|
|
42
|
-
return `${parseFloat((
|
|
38
|
+
], o = Math.floor(Math.log(e) / Math.log(s));
|
|
39
|
+
return `${parseFloat((e / Math.pow(s, o)).toFixed(n))} ${a[o]}`;
|
|
40
|
+
}
|
|
41
|
+
function S(e, t) {
|
|
42
|
+
const s = e.measureText(t), n = s.actualBoundingBoxAscent + s.actualBoundingBoxDescent, a = s.width;
|
|
43
|
+
return {
|
|
44
|
+
height: n,
|
|
45
|
+
width: a
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function w(e) {
|
|
49
|
+
return Math.floor(e) + 0.5;
|
|
50
|
+
}
|
|
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,
|
|
56
|
+
u,
|
|
57
|
+
r
|
|
58
|
+
];
|
|
59
|
+
}
|
|
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,
|
|
65
|
+
u,
|
|
66
|
+
r
|
|
67
|
+
];
|
|
68
|
+
}
|
|
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;
|
|
43
71
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
72
|
+
function O(e, t) {
|
|
73
|
+
return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2) < t.radius;
|
|
46
74
|
}
|
|
47
|
-
function
|
|
48
|
-
|
|
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 };
|
|
49
78
|
}
|
|
50
|
-
function
|
|
51
|
-
const s = t.
|
|
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
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function c(e, t) {
|
|
95
|
+
const s = e.styleMap.get(t);
|
|
52
96
|
if (s) {
|
|
53
|
-
const
|
|
54
|
-
return
|
|
97
|
+
const n = s.toString();
|
|
98
|
+
return n.startsWith("var") ? c(e, n.slice(4, -1)) : n;
|
|
55
99
|
}
|
|
56
100
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
101
|
+
function R(...e) {
|
|
102
|
+
const t = {};
|
|
59
103
|
return Array.from(document.styleSheets).forEach((s) => {
|
|
60
|
-
Array.from(s.cssRules).forEach((
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
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);
|
|
64
108
|
});
|
|
65
109
|
});
|
|
66
|
-
}),
|
|
67
|
-
|
|
68
|
-
}),
|
|
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));
|
|
69
117
|
}
|
|
70
|
-
function
|
|
71
|
-
const
|
|
72
|
-
return
|
|
118
|
+
function D(e) {
|
|
119
|
+
const t = window.unescape(encodeURIComponent(e));
|
|
120
|
+
return window.btoa(t);
|
|
73
121
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
|
|
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};`;
|
|
127
|
+
}
|
|
128
|
+
return t;
|
|
129
|
+
}
|
|
130
|
+
function M(e) {
|
|
131
|
+
if (f) {
|
|
132
|
+
const t = new CSSStyleSheet();
|
|
133
|
+
return t.replaceSync(h(e)), t;
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
77
136
|
}
|
|
78
|
-
function
|
|
79
|
-
return new Promise((
|
|
137
|
+
function Q(e) {
|
|
138
|
+
return new Promise((t) => {
|
|
80
139
|
setTimeout(() => {
|
|
81
|
-
|
|
82
|
-
},
|
|
140
|
+
t();
|
|
141
|
+
}, e);
|
|
83
142
|
});
|
|
84
143
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
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];
|
|
88
147
|
return {
|
|
89
|
-
leaf:
|
|
90
|
-
pathname:
|
|
148
|
+
leaf: a,
|
|
149
|
+
pathname: o,
|
|
91
150
|
parameters: i,
|
|
92
|
-
hash:
|
|
151
|
+
hash: l
|
|
93
152
|
};
|
|
94
153
|
}
|
|
95
|
-
function
|
|
96
|
-
return
|
|
154
|
+
function T(e = "/") {
|
|
155
|
+
return e.endsWith("/") || (e += "/"), e.startsWith("/") || (e += "/"), e;
|
|
97
156
|
}
|
|
98
|
-
function
|
|
99
|
-
const
|
|
100
|
-
|
|
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);
|
|
101
160
|
}
|
|
102
161
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
162
|
+
jt as calculateDistance,
|
|
163
|
+
Nt as calculateDistanceWithRadius,
|
|
164
|
+
p as camelToKebab,
|
|
165
|
+
Pt as capitalize,
|
|
166
|
+
k as changeHistory,
|
|
167
|
+
Vt as clamp,
|
|
168
|
+
lt as cloneDeep,
|
|
169
|
+
ct as compareObjects,
|
|
170
|
+
B as contain,
|
|
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,
|
|
179
|
+
O as dotCircleCollision,
|
|
180
|
+
E as dotRectCollision,
|
|
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,
|
|
129
188
|
L as easeInQuad,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
tt as easeInQuart,
|
|
190
|
+
et as easeInQuint,
|
|
191
|
+
st as easeOutCubic,
|
|
192
|
+
nt as easeOutExpo,
|
|
193
|
+
at as easeOutQuad,
|
|
194
|
+
ot as easeOutQuart,
|
|
195
|
+
it as easeOutQuint,
|
|
196
|
+
A as encode,
|
|
197
|
+
V as findParentElement,
|
|
198
|
+
U as findScrollParentElement,
|
|
199
|
+
w as fixPosition,
|
|
200
|
+
y as formatBytes,
|
|
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,
|
|
211
|
+
g as insert,
|
|
212
|
+
f as isBrowser,
|
|
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,
|
|
221
|
+
S as measureText,
|
|
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,
|
|
230
|
+
wt as pick,
|
|
231
|
+
Gt as preciseNumber,
|
|
232
|
+
Jt as round,
|
|
233
|
+
Yt as roundNumberTo,
|
|
234
|
+
b as screenToCartesian,
|
|
235
|
+
bt as setupDrag,
|
|
236
|
+
x as shiftArray,
|
|
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
|
|
189
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"
|
|
@@ -28,11 +28,6 @@
|
|
|
28
28
|
"default": "./lib/attribute/index.js",
|
|
29
29
|
"types": "./lib/attribute/index.d.ts"
|
|
30
30
|
},
|
|
31
|
-
"./canvas": {
|
|
32
|
-
"require": "./lib/canvas/index.cjs",
|
|
33
|
-
"default": "./lib/canvas/index.js",
|
|
34
|
-
"types": "./lib/canvas/index.d.ts"
|
|
35
|
-
},
|
|
36
31
|
"./class-linked-status": {
|
|
37
32
|
"require": "./lib/class-linked-status/index.cjs",
|
|
38
33
|
"default": "./lib/class-linked-status/index.js",
|
|
@@ -78,11 +73,6 @@
|
|
|
78
73
|
"default": "./lib/element-resizer/index.js",
|
|
79
74
|
"types": "./lib/element-resizer/index.d.ts"
|
|
80
75
|
},
|
|
81
|
-
"./image": {
|
|
82
|
-
"require": "./lib/image/index.cjs",
|
|
83
|
-
"default": "./lib/image/index.js",
|
|
84
|
-
"types": "./lib/image/index.d.ts"
|
|
85
|
-
},
|
|
86
76
|
"./intersector": {
|
|
87
77
|
"require": "./lib/intersector/index.cjs",
|
|
88
78
|
"default": "./lib/intersector/index.js",
|
|
@@ -118,11 +108,6 @@
|
|
|
118
108
|
"default": "./lib/order/index.js",
|
|
119
109
|
"types": "./lib/order/index.d.ts"
|
|
120
110
|
},
|
|
121
|
-
"./pointer": {
|
|
122
|
-
"require": "./lib/pointer/index.cjs",
|
|
123
|
-
"default": "./lib/pointer/index.js",
|
|
124
|
-
"types": "./lib/pointer/index.d.ts"
|
|
125
|
-
},
|
|
126
111
|
"./popover": {
|
|
127
112
|
"require": "./lib/popover/index.cjs",
|
|
128
113
|
"default": "./lib/popover/index.js",
|
|
@@ -133,11 +118,6 @@
|
|
|
133
118
|
"default": "./lib/scroll-entries/index.js",
|
|
134
119
|
"types": "./lib/scroll-entries/index.d.ts"
|
|
135
120
|
},
|
|
136
|
-
"./sequence": {
|
|
137
|
-
"require": "./lib/sequence/index.cjs",
|
|
138
|
-
"default": "./lib/sequence/index.js",
|
|
139
|
-
"types": "./lib/sequence/index.d.ts"
|
|
140
|
-
},
|
|
141
121
|
"./slicer": {
|
|
142
122
|
"require": "./lib/slicer/index.cjs",
|
|
143
123
|
"default": "./lib/slicer/index.js",
|
|
@@ -168,11 +148,6 @@
|
|
|
168
148
|
"default": "./lib/utils/index.js",
|
|
169
149
|
"types": "./lib/utils/index.d.ts"
|
|
170
150
|
},
|
|
171
|
-
"./video": {
|
|
172
|
-
"require": "./lib/video/index.cjs",
|
|
173
|
-
"default": "./lib/video/index.js",
|
|
174
|
-
"types": "./lib/video/index.d.ts"
|
|
175
|
-
},
|
|
176
151
|
"./window-resizer": {
|
|
177
152
|
"require": "./lib/window-resizer/index.cjs",
|
|
178
153
|
"default": "./lib/window-resizer/index.js",
|
|
@@ -187,9 +162,6 @@
|
|
|
187
162
|
"attribute": [
|
|
188
163
|
"lib/attribute/index.d.ts"
|
|
189
164
|
],
|
|
190
|
-
"canvas": [
|
|
191
|
-
"lib/canvas/index.d.ts"
|
|
192
|
-
],
|
|
193
165
|
"class-linked-status": [
|
|
194
166
|
"lib/class-linked-status/index.d.ts"
|
|
195
167
|
],
|
|
@@ -220,9 +192,6 @@
|
|
|
220
192
|
"element-resizer": [
|
|
221
193
|
"lib/element-resizer/index.d.ts"
|
|
222
194
|
],
|
|
223
|
-
"image": [
|
|
224
|
-
"lib/image/index.d.ts"
|
|
225
|
-
],
|
|
226
195
|
"intersector": [
|
|
227
196
|
"lib/intersector/index.d.ts"
|
|
228
197
|
],
|
|
@@ -244,18 +213,12 @@
|
|
|
244
213
|
"order": [
|
|
245
214
|
"lib/order/index.d.ts"
|
|
246
215
|
],
|
|
247
|
-
"pointer": [
|
|
248
|
-
"lib/pointer/index.d.ts"
|
|
249
|
-
],
|
|
250
216
|
"popover": [
|
|
251
217
|
"lib/popover/index.d.ts"
|
|
252
218
|
],
|
|
253
219
|
"scroll-entries": [
|
|
254
220
|
"lib/scroll-entries/index.d.ts"
|
|
255
221
|
],
|
|
256
|
-
"sequence": [
|
|
257
|
-
"lib/sequence/index.d.ts"
|
|
258
|
-
],
|
|
259
222
|
"slicer": [
|
|
260
223
|
"lib/slicer/index.d.ts"
|
|
261
224
|
],
|
|
@@ -274,9 +237,6 @@
|
|
|
274
237
|
"utils": [
|
|
275
238
|
"lib/utils/index.d.ts"
|
|
276
239
|
],
|
|
277
|
-
"video": [
|
|
278
|
-
"lib/video/index.d.ts"
|
|
279
|
-
],
|
|
280
240
|
"window-resizer": [
|
|
281
241
|
"lib/window-resizer/index.d.ts"
|
|
282
242
|
]
|
|
@@ -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"),z=require("./math-GDWEqu7y.cjs"),m=require("./polyfills-CM4SCDTt.cjs"),P=require("./ticker/index.cjs"),N=require("./order/index.cjs");var f,b,A,c,F,r,u,l,g,d,q,y,x;class O extends I.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,f);a(this,b,N.TICK_ORDER.ANIMATION);a(this,A);a(this,c,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,c)}get delta(){return Math.abs(e(this,r)-e(this,g))}get deltaProgress(){return this.delta?m.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?m.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,c).current||(e(this,c).current=!0,P.ticker.subscribe(e(this,x),{maxFPS:e(this,f),order:e(this,b),culling:e(this,A)}))}unlistenAnimationFrame(){e(this,c).current&&(e(this,c).current=!1,P.ticker.unsubscribe(e(this,x)))}updateOptions(t){h(this,f,m.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,b,m.nullishCoalescing(t==null?void 0:t.order,e(this,b))),h(this,A,m.nullishCoalescing(t==null?void 0:t.culling,e(this,A))),h(this,u,m.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,m.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,c=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,z.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},x=new WeakMap;exports.Animation=O;
|
|
@@ -1,105 +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 { c as y } from "./math-BOBiC4TN.js";
|
|
8
|
-
import { p as z, n as F } from "./polyfills-X6KXuHg-.js";
|
|
9
|
-
import { ticker as O } from "./ticker/index.js";
|
|
10
|
-
import { TICK_ORDER as N } from "./order/index.js";
|
|
11
|
-
var f, d, A, l, b, s, n, m, c, g, M, R, x;
|
|
12
|
-
class K extends q {
|
|
13
|
-
constructor(t, u) {
|
|
14
|
-
super(t || 0, u);
|
|
15
|
-
a(this, M);
|
|
16
|
-
a(this, f);
|
|
17
|
-
a(this, d, N.ANIMATION);
|
|
18
|
-
a(this, A);
|
|
19
|
-
a(this, l, new q(!1));
|
|
20
|
-
a(this, b, 0);
|
|
21
|
-
a(this, s, 0);
|
|
22
|
-
a(this, n, -1 / 0);
|
|
23
|
-
a(this, m, 1 / 0);
|
|
24
|
-
a(this, c, 0);
|
|
25
|
-
a(this, g, null);
|
|
26
|
-
a(this, x, (t) => {
|
|
27
|
-
this.handleAnimationFrame(t);
|
|
28
|
-
});
|
|
29
|
-
h(this, s, this.current);
|
|
30
|
-
}
|
|
31
|
-
get direction() {
|
|
32
|
-
return e(this, b);
|
|
33
|
-
}
|
|
34
|
-
get target() {
|
|
35
|
-
return e(this, s);
|
|
36
|
-
}
|
|
37
|
-
get min() {
|
|
38
|
-
return e(this, n);
|
|
39
|
-
}
|
|
40
|
-
set min(t) {
|
|
41
|
-
h(this, n, t), this.set(e(this, s), {
|
|
42
|
-
equalize: !0
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
get max() {
|
|
46
|
-
return e(this, m);
|
|
47
|
-
}
|
|
48
|
-
set max(t) {
|
|
49
|
-
h(this, m, t), this.set(e(this, s), {
|
|
50
|
-
equalize: !0
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
get from() {
|
|
54
|
-
return e(this, c);
|
|
55
|
-
}
|
|
56
|
-
get isRunning() {
|
|
57
|
-
return e(this, l);
|
|
58
|
-
}
|
|
59
|
-
get delta() {
|
|
60
|
-
return Math.abs(e(this, s) - e(this, c));
|
|
61
|
-
}
|
|
62
|
-
get deltaProgress() {
|
|
63
|
-
return this.delta ? z(Math.abs(this.current - e(this, c)) / this.delta, 6) : 0;
|
|
64
|
-
}
|
|
65
|
-
get distance() {
|
|
66
|
-
return Math.abs(e(this, m) - e(this, n));
|
|
67
|
-
}
|
|
68
|
-
get distanceProgress() {
|
|
69
|
-
return this.distance ? z(Math.abs(this.current - e(this, n)) / this.distance, 6) : 0;
|
|
70
|
-
}
|
|
71
|
-
set(t, u) {
|
|
72
|
-
(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());
|
|
73
|
-
}
|
|
74
|
-
shift(t, u) {
|
|
75
|
-
this.set(e(this, s) + t, u);
|
|
76
|
-
}
|
|
77
|
-
reset() {
|
|
78
|
-
super.reset(), this.set(this.initial, { equalize: !0 });
|
|
79
|
-
}
|
|
80
|
-
close() {
|
|
81
|
-
super.close(), this.reset(), this.unlistenAnimationFrame();
|
|
82
|
-
}
|
|
83
|
-
listenAnimationFrame() {
|
|
84
|
-
e(this, l).current || (e(this, l).current = !0, O.subscribe(e(this, x), {
|
|
85
|
-
maxFPS: e(this, f),
|
|
86
|
-
order: e(this, d),
|
|
87
|
-
culling: e(this, A)
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
|
-
unlistenAnimationFrame() {
|
|
91
|
-
e(this, l).current && (e(this, l).current = !1, O.unsubscribe(e(this, x)));
|
|
92
|
-
}
|
|
93
|
-
updateOptions(t) {
|
|
94
|
-
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);
|
|
95
|
-
}
|
|
96
|
-
start() {
|
|
97
|
-
this.listenAnimationFrame();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
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) {
|
|
101
|
-
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);
|
|
102
|
-
}, x = new WeakMap();
|
|
103
|
-
export {
|
|
104
|
-
K as A
|
|
105
|
-
};
|