@wix/motion 2.1.2 → 2.1.3
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/dist/cjs/motion.js +1 -1
- package/dist/cjs/motion.js.map +1 -1
- package/dist/es/motion.js +96 -79
- package/dist/es/motion.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/AnimationGroup.d.ts +1 -0
- package/dist/types/AnimationGroup.d.ts.map +1 -1
- package/package.json +8 -2
package/dist/es/motion.js
CHANGED
|
@@ -55,6 +55,23 @@ class I {
|
|
|
55
55
|
console.warn("animation was interrupted - aborting onFinish callback - ", n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
async onAbort(e) {
|
|
59
|
+
try {
|
|
60
|
+
await Promise.all(this.animations.map((n) => n.finished));
|
|
61
|
+
} catch (n) {
|
|
62
|
+
if (n.name === "AbortError") {
|
|
63
|
+
const i = this.animations[0];
|
|
64
|
+
if (i && !this.isCSS) {
|
|
65
|
+
const r = i.effect?.target;
|
|
66
|
+
if (r) {
|
|
67
|
+
const s = new Event("animationcancel");
|
|
68
|
+
r.dispatchEvent(s);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
e();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
58
75
|
get finished() {
|
|
59
76
|
return Promise.all(this.animations.map((e) => e.finished));
|
|
60
77
|
}
|
|
@@ -72,7 +89,7 @@ class I {
|
|
|
72
89
|
});
|
|
73
90
|
}
|
|
74
91
|
}
|
|
75
|
-
const G = (t) => t, W = (t) => 1 - Math.cos(t * Math.PI / 2), B = (t) => Math.sin(t * Math.PI / 2), K = (t) => -(Math.cos(Math.PI * t) - 1) / 2, X = (t) => t ** 2, J = (t) => 1 - (1 - t) ** 2, U = (t) => t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2, Y = (t) => t ** 3, Q = (t) => 1 - (1 - t) ** 3, Z = (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2, tt = (t) => t ** 4, et = (t) => 1 - (1 - t) ** 4, nt = (t) => t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2, it = (t) => t ** 5, st = (t) => 1 - (1 - t) ** 5, rt = (t) => t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2, ot = (t) => t === 0 ? 0 : 2 ** (10 * t - 10), at = (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t), ct = (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2, ut = (t) => 1 - Math.sqrt(1 - t ** 2), ft = (t) => Math.sqrt(1 - (t - 1) ** 2),
|
|
92
|
+
const G = (t) => t, W = (t) => 1 - Math.cos(t * Math.PI / 2), B = (t) => Math.sin(t * Math.PI / 2), K = (t) => -(Math.cos(Math.PI * t) - 1) / 2, X = (t) => t ** 2, J = (t) => 1 - (1 - t) ** 2, U = (t) => t < 0.5 ? 2 * t ** 2 : 1 - (-2 * t + 2) ** 2 / 2, Y = (t) => t ** 3, Q = (t) => 1 - (1 - t) ** 3, Z = (t) => t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2, tt = (t) => t ** 4, et = (t) => 1 - (1 - t) ** 4, nt = (t) => t < 0.5 ? 8 * t ** 4 : 1 - (-2 * t + 2) ** 4 / 2, it = (t) => t ** 5, st = (t) => 1 - (1 - t) ** 5, rt = (t) => t < 0.5 ? 16 * t ** 5 : 1 - (-2 * t + 2) ** 5 / 2, ot = (t) => t === 0 ? 0 : 2 ** (10 * t - 10), at = (t) => t === 1 ? 1 : 1 - 2 ** (-10 * t), ct = (t) => t === 0 ? 0 : t === 1 ? 1 : t < 0.5 ? 2 ** (20 * t - 10) / 2 : (2 - 2 ** (-20 * t + 10)) / 2, ut = (t) => 1 - Math.sqrt(1 - t ** 2), ft = (t) => Math.sqrt(1 - (t - 1) ** 2), mt = (t) => t < 0.5 ? (1 - Math.sqrt(1 - 4 * t ** 2)) / 2 : (Math.sqrt(-(2 * t - 3) * (2 * t - 1)) + 1) / 2, lt = (t) => 2.70158 * t ** 3 - 1.70158 * t ** 2, ht = (t) => 1 + 2.70158 * (t - 1) ** 3 + 1.70158 * (t - 1) ** 2, dt = (t, e = 1.70158 * 1.525) => t < 0.5 ? (2 * t) ** 2 * ((e + 1) * 2 * t - e) / 2 : ((2 * t - 2) ** 2 * ((e + 1) * (t * 2 - 2) + e) + 2) / 2, z = {
|
|
76
93
|
linear: G,
|
|
77
94
|
sineIn: W,
|
|
78
95
|
sineOut: B,
|
|
@@ -94,11 +111,11 @@ const G = (t) => t, W = (t) => 1 - Math.cos(t * Math.PI / 2), B = (t) => Math.si
|
|
|
94
111
|
expoInOut: ct,
|
|
95
112
|
circIn: ut,
|
|
96
113
|
circOut: ft,
|
|
97
|
-
circInOut:
|
|
98
|
-
backIn:
|
|
114
|
+
circInOut: mt,
|
|
115
|
+
backIn: lt,
|
|
99
116
|
backOut: ht,
|
|
100
117
|
backInOut: dt
|
|
101
|
-
},
|
|
118
|
+
}, C = {
|
|
102
119
|
linear: "linear",
|
|
103
120
|
ease: "ease",
|
|
104
121
|
easeIn: "ease-in",
|
|
@@ -133,10 +150,10 @@ function pt(t) {
|
|
|
133
150
|
return t === "percentage" ? "%" : t || "px";
|
|
134
151
|
}
|
|
135
152
|
function gt(t) {
|
|
136
|
-
return t ?
|
|
153
|
+
return t ? C[t] || t : C.linear;
|
|
137
154
|
}
|
|
138
155
|
function yt(t, e, n, i) {
|
|
139
|
-
const r = 3 * t, s = 3 * (n - t) - r, u = 1 - r - s, a = 3 * e,
|
|
156
|
+
const r = 3 * t, s = 3 * (n - t) - r, u = 1 - r - s, a = 3 * e, m = 3 * (i - e) - a, l = 1 - a - m, o = (h) => ((u * h + s) * h + r) * h, c = (h) => ((l * h + m) * h + a) * h, f = (h) => (3 * u * h + 2 * s) * h + r;
|
|
140
157
|
function p(h) {
|
|
141
158
|
let d = h;
|
|
142
159
|
for (let y = 0; y < 8; y++) {
|
|
@@ -172,16 +189,16 @@ function vt(t) {
|
|
|
172
189
|
if (n.length === 0) return;
|
|
173
190
|
const i = [];
|
|
174
191
|
for (const u of n) {
|
|
175
|
-
const a = u.split(/\s+/),
|
|
176
|
-
if (isNaN(
|
|
177
|
-
const
|
|
192
|
+
const a = u.split(/\s+/), m = parseFloat(a[0]);
|
|
193
|
+
if (isNaN(m)) return;
|
|
194
|
+
const l = [];
|
|
178
195
|
for (let o = 1; o < a.length; o++)
|
|
179
196
|
if (a[o].endsWith("%")) {
|
|
180
197
|
const c = parseFloat(a[o]) / 100;
|
|
181
198
|
if (isNaN(c)) return;
|
|
182
|
-
|
|
199
|
+
l.push(c);
|
|
183
200
|
}
|
|
184
|
-
|
|
201
|
+
l.length === 0 ? i.push({ output: m, pos: null }) : l.length === 1 ? i.push({ output: m, pos: l[0] }) : (i.push({ output: m, pos: l[0] }), i.push({ output: m, pos: l[1] }));
|
|
185
202
|
}
|
|
186
203
|
if (i.length === 0) return;
|
|
187
204
|
i[0].pos === null && (i[0].pos = 0), i[i.length - 1].pos === null && (i[i.length - 1].pos = 1);
|
|
@@ -191,9 +208,9 @@ function vt(t) {
|
|
|
191
208
|
const u = r - 1;
|
|
192
209
|
let a = r;
|
|
193
210
|
for (; a < i.length && i[a].pos === null; ) a++;
|
|
194
|
-
const
|
|
211
|
+
const m = i[u].pos, l = i[a].pos, o = a - u;
|
|
195
212
|
for (let c = u + 1; c < a; c++)
|
|
196
|
-
i[c].pos =
|
|
213
|
+
i[c].pos = m + (l - m) * (c - u) / o;
|
|
197
214
|
r = a + 1;
|
|
198
215
|
} else
|
|
199
216
|
r++;
|
|
@@ -204,12 +221,12 @@ function vt(t) {
|
|
|
204
221
|
if (u <= s[0].pos) return s[0].output;
|
|
205
222
|
const a = s[s.length - 1];
|
|
206
223
|
if (u >= a.pos) return a.output;
|
|
207
|
-
let
|
|
208
|
-
for (;
|
|
209
|
-
const f =
|
|
210
|
-
s[f].pos <= u ?
|
|
224
|
+
let m = 0, l = s.length - 1;
|
|
225
|
+
for (; m < l - 1; ) {
|
|
226
|
+
const f = m + l >>> 1;
|
|
227
|
+
s[f].pos <= u ? m = f : l = f;
|
|
211
228
|
}
|
|
212
|
-
const o = s[
|
|
229
|
+
const o = s[m], c = s[l];
|
|
213
230
|
return c.pos === o.pos ? c.output : o.output + (c.output - o.output) * (u - o.pos) / (c.pos - o.pos);
|
|
214
231
|
};
|
|
215
232
|
}
|
|
@@ -254,7 +271,7 @@ class Et extends I {
|
|
|
254
271
|
i.animations.forEach((s, u) => {
|
|
255
272
|
const a = s.effect;
|
|
256
273
|
if (!a) return;
|
|
257
|
-
const { delay:
|
|
274
|
+
const { delay: m, duration: l, iterations: o } = this.timingOptions[r][u], c = m + e[r], f = n - (c + l * o);
|
|
258
275
|
a.updateTiming({ delay: c + this.delay, endDelay: f });
|
|
259
276
|
});
|
|
260
277
|
});
|
|
@@ -264,8 +281,8 @@ class Et extends I {
|
|
|
264
281
|
for (let i = 0; i < this.timingOptions.length; i++) {
|
|
265
282
|
const r = this.timingOptions[i].reduce((s, u) => {
|
|
266
283
|
if (!u) return s;
|
|
267
|
-
const { delay: a, duration:
|
|
268
|
-
return Math.max(s, a +
|
|
284
|
+
const { delay: a, duration: m, iterations: l } = u;
|
|
285
|
+
return Math.max(s, a + m * l);
|
|
269
286
|
}, 0);
|
|
270
287
|
n.push(e[i] + r);
|
|
271
288
|
}
|
|
@@ -282,7 +299,7 @@ class Et extends I {
|
|
|
282
299
|
for (const { index: i, group: r } of n) {
|
|
283
300
|
const s = Math.min(i, this.animationGroups.length);
|
|
284
301
|
this.animationGroups.splice(s, 0, r), this.timingOptions.splice(s, 0, r.getTimingOptions());
|
|
285
|
-
const u = [...r.animations], a = this.animationGroups.slice(0, s).reduce((
|
|
302
|
+
const u = [...r.animations], a = this.animationGroups.slice(0, s).reduce((m, l) => m + l.animations.length, 0);
|
|
286
303
|
this.animations.splice(a, 0, ...u);
|
|
287
304
|
}
|
|
288
305
|
this.applyOffsets(), this.ready = Promise.all(this.animationGroups.map((i) => i.ready)).then(() => {
|
|
@@ -323,7 +340,7 @@ class _t {
|
|
|
323
340
|
composite: "add"
|
|
324
341
|
}), { timeline: u } = r;
|
|
325
342
|
this._animation = new Animation(s, u), this._tickCbId = null, this.progress = null, this.customEffect = (a) => e(s.target, a), this._finishHandler = (a) => {
|
|
326
|
-
this.effect.target?.getAnimations().find((
|
|
343
|
+
this.effect.target?.getAnimations().find((m) => m === this._animation) || this.cancel();
|
|
327
344
|
}, this.addEventListener("finish", this._finishHandler), this.addEventListener("remove", this._finishHandler);
|
|
328
345
|
}
|
|
329
346
|
// private tick method for customEffect loop implementation
|
|
@@ -454,7 +471,7 @@ class _t {
|
|
|
454
471
|
function wt(t) {
|
|
455
472
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
456
473
|
}
|
|
457
|
-
var A = { exports: {} },
|
|
474
|
+
var A = { exports: {} }, F = A.exports, x;
|
|
458
475
|
function Ot() {
|
|
459
476
|
return x || (x = 1, (function(t) {
|
|
460
477
|
(function(e) {
|
|
@@ -551,7 +568,7 @@ function Ot() {
|
|
|
551
568
|
extend: function(o) {
|
|
552
569
|
if (typeof o != "object") throw new Error("expected object");
|
|
553
570
|
var c = Object.create(this);
|
|
554
|
-
return
|
|
571
|
+
return m(c, o), c.fastdom = this, c.initialize && c.initialize(), c;
|
|
555
572
|
},
|
|
556
573
|
// override this with a function
|
|
557
574
|
// to prevent Errors in console
|
|
@@ -576,13 +593,13 @@ function Ot() {
|
|
|
576
593
|
var f = o.indexOf(c);
|
|
577
594
|
return !!~f && !!o.splice(f, 1);
|
|
578
595
|
}
|
|
579
|
-
function
|
|
596
|
+
function m(o, c) {
|
|
580
597
|
for (var f in c)
|
|
581
598
|
c.hasOwnProperty(f) && (o[f] = c[f]);
|
|
582
599
|
}
|
|
583
|
-
var
|
|
584
|
-
t.exports =
|
|
585
|
-
})(typeof window < "u" ? window : typeof
|
|
600
|
+
var l = e.fastdom = e.fastdom || new r();
|
|
601
|
+
t.exports = l;
|
|
602
|
+
})(typeof window < "u" ? window : typeof F < "u" ? F : globalThis);
|
|
586
603
|
})(A)), A.exports;
|
|
587
604
|
}
|
|
588
605
|
var It = Ot();
|
|
@@ -649,7 +666,7 @@ function H(t, e, n) {
|
|
|
649
666
|
composite: i.composite,
|
|
650
667
|
direction: Tt(i)
|
|
651
668
|
};
|
|
652
|
-
return
|
|
669
|
+
return S(e) ? (s.duration = i.duration, s.delay = i.delay || 0) : window.ViewTimeline && e?.trigger === "view-progress" ? s.duration = "auto" : (s.duration = 99.99, s.delay = 0.01), {
|
|
653
670
|
effect: i,
|
|
654
671
|
options: s,
|
|
655
672
|
id: n && `${n}-${r + 1}`,
|
|
@@ -657,12 +674,12 @@ function H(t, e, n) {
|
|
|
657
674
|
};
|
|
658
675
|
});
|
|
659
676
|
}
|
|
660
|
-
function
|
|
677
|
+
function S(t) {
|
|
661
678
|
return !t || t.trigger !== "pointer-move" && t.trigger !== "view-progress";
|
|
662
679
|
}
|
|
663
680
|
function N(t, e, n, i, r) {
|
|
664
681
|
if (t) {
|
|
665
|
-
if (
|
|
682
|
+
if (S(i) && (e.duration = e.duration || 1, r?.reducedMotion))
|
|
666
683
|
if (e.iterations === 1 || e.iterations == null)
|
|
667
684
|
e = { ...e, duration: 1 };
|
|
668
685
|
else
|
|
@@ -700,25 +717,25 @@ function V(t, e, n, i, r) {
|
|
|
700
717
|
);
|
|
701
718
|
if (!a || a.length === 0)
|
|
702
719
|
return null;
|
|
703
|
-
const
|
|
704
|
-
let
|
|
720
|
+
const m = H(a, n, e.effectId);
|
|
721
|
+
let l;
|
|
705
722
|
const o = n?.trigger === "view-progress";
|
|
706
|
-
o && window.ViewTimeline && (
|
|
723
|
+
o && window.ViewTimeline && (l = new ViewTimeline({
|
|
707
724
|
subject: n.element || w(n.componentId)
|
|
708
725
|
}));
|
|
709
|
-
const c =
|
|
726
|
+
const c = m.map(({ effect: f, options: p, id: h, part: d }) => {
|
|
710
727
|
const v = d ? kt(s, d) : s, g = new KeyframeEffect(v || null, [], p);
|
|
711
728
|
E.mutate(() => {
|
|
712
729
|
"timing" in f && g.updateTiming(f.timing), g.setKeyframes(f.keyframes);
|
|
713
730
|
});
|
|
714
|
-
const y = o &&
|
|
731
|
+
const y = o && l ? { timeline: l } : {}, b = typeof f.customEffect == "function" ? new _t(
|
|
715
732
|
f.customEffect,
|
|
716
733
|
v || null,
|
|
717
734
|
p,
|
|
718
735
|
y
|
|
719
736
|
) : new Animation(g, y.timeline);
|
|
720
737
|
if (o)
|
|
721
|
-
if (
|
|
738
|
+
if (l)
|
|
722
739
|
E.mutate(() => {
|
|
723
740
|
const { start: _, end: k } = R(f);
|
|
724
741
|
b.rangeStart = _, b.rangeEnd = k, b.play();
|
|
@@ -726,16 +743,16 @@ function V(t, e, n, i, r) {
|
|
|
726
743
|
else {
|
|
727
744
|
const { startOffset: _, endOffset: k } = e;
|
|
728
745
|
E.mutate(() => {
|
|
729
|
-
const
|
|
746
|
+
const q = f.startOffset || _, P = f.endOffset || k;
|
|
730
747
|
Object.assign(b, {
|
|
731
748
|
start: {
|
|
732
|
-
name:
|
|
733
|
-
offset:
|
|
749
|
+
name: q.name,
|
|
750
|
+
offset: q.offset?.value,
|
|
734
751
|
add: f.startOffsetAdd
|
|
735
752
|
},
|
|
736
753
|
end: {
|
|
737
|
-
name:
|
|
738
|
-
offset:
|
|
754
|
+
name: P.name,
|
|
755
|
+
offset: P.offset?.value,
|
|
739
756
|
add: f.endOffsetAdd
|
|
740
757
|
}
|
|
741
758
|
});
|
|
@@ -753,31 +770,31 @@ function V(t, e, n, i, r) {
|
|
|
753
770
|
function $t(t, e) {
|
|
754
771
|
return t ? `#${t}${e ? `[data-motion-part~="${e}"]` : ""}` : "";
|
|
755
772
|
}
|
|
756
|
-
function
|
|
757
|
-
const { duration: n, delay: i, iterations: r = 1, fill: s, easing: u = "linear", direction: a } = t.options,
|
|
758
|
-
return `${
|
|
773
|
+
function St(t, e) {
|
|
774
|
+
const { duration: n, delay: i, iterations: r = 1, fill: s, easing: u = "linear", direction: a } = t.options, m = t.effect.name, l = n === "auto";
|
|
775
|
+
return `${m} ${l ? "auto" : `${n}ms`}${l ? " " : ` ${i || 1}ms `}${u}${s && s !== "none" ? ` ${s}` : ""} ${!r || r === 1 / 0 ? "infinite" : r}${a === "normal" ? "" : ` ${a}`} ${e ? "" : "paused"}`;
|
|
759
776
|
}
|
|
760
|
-
function
|
|
761
|
-
return t?.style ? (
|
|
777
|
+
function qt(t, e, n) {
|
|
778
|
+
return t?.style ? (S(n) && (e.duration = e.duration || 1), t.style(e)) : [];
|
|
762
779
|
}
|
|
763
780
|
function Gt(t, e, n) {
|
|
764
|
-
const i = O(e), r =
|
|
765
|
-
return s.map((a,
|
|
766
|
-
const { start:
|
|
781
|
+
const i = O(e), r = qt(i, e), s = H(r, n, e.effectId), u = n?.trigger === "view-progress";
|
|
782
|
+
return s.map((a, m) => {
|
|
783
|
+
const { start: l, end: o } = u ? R(a.effect) : {};
|
|
767
784
|
return {
|
|
768
785
|
target: $t(t, a.part),
|
|
769
|
-
animation:
|
|
786
|
+
animation: St(a, u),
|
|
770
787
|
composition: a.options.composite,
|
|
771
788
|
custom: a.effect.custom,
|
|
772
789
|
name: a.effect.name,
|
|
773
790
|
keyframes: a.effect.keyframes,
|
|
774
|
-
id: a.id && `${a.id}-${
|
|
791
|
+
id: a.id && `${a.id}-${m + 1}`,
|
|
775
792
|
animationTimeline: u ? `--${n?.id}` : "",
|
|
776
|
-
animationRange:
|
|
793
|
+
animationRange: l || o ? `${l} ${o}` : ""
|
|
777
794
|
};
|
|
778
795
|
});
|
|
779
796
|
}
|
|
780
|
-
function
|
|
797
|
+
function Pt(t, e, n) {
|
|
781
798
|
const i = O(e), r = t instanceof HTMLElement ? t : w(t);
|
|
782
799
|
if (i && i.prepare && r) {
|
|
783
800
|
const s = { measure: L(r), mutate: j(r) };
|
|
@@ -790,15 +807,15 @@ function zt(t, e) {
|
|
|
790
807
|
if (!n)
|
|
791
808
|
return null;
|
|
792
809
|
if (!n.style)
|
|
793
|
-
return e.effectId && t ?
|
|
794
|
-
const i = n.getNames(e), s = (typeof t == "string" ? w(t) : t)?.getAnimations(), u = s?.map((
|
|
795
|
-
return i.forEach((
|
|
796
|
-
u.includes(
|
|
797
|
-
s?.find((
|
|
810
|
+
return e.effectId && t ? Ct(t, e.effectId) : null;
|
|
811
|
+
const i = n.getNames(e), s = (typeof t == "string" ? w(t) : t)?.getAnimations(), u = s?.map((m) => m.animationName) || [], a = [];
|
|
812
|
+
return i.forEach((m) => {
|
|
813
|
+
u.includes(m) && a.push(
|
|
814
|
+
s?.find((l) => l.animationName === m)
|
|
798
815
|
);
|
|
799
816
|
}), a?.length ? new I(a) : null;
|
|
800
817
|
}
|
|
801
|
-
function
|
|
818
|
+
function Ct(t, e) {
|
|
802
819
|
const i = (typeof t == "string" ? w(t) : t)?.getAnimations().filter((r) => {
|
|
803
820
|
const s = r.id || r.animationName;
|
|
804
821
|
return s ? s.startsWith(e) : !0;
|
|
@@ -809,9 +826,9 @@ function Dt(t, e, n, i = {}) {
|
|
|
809
826
|
const { disabled: r, allowActiveEvent: s, ...u } = i, a = V(t, e, n, u);
|
|
810
827
|
if (!a)
|
|
811
828
|
return null;
|
|
812
|
-
let
|
|
829
|
+
let m = {};
|
|
813
830
|
if (n.trigger === "view-progress" && !window.ViewTimeline) {
|
|
814
|
-
const
|
|
831
|
+
const l = n.element || w(n.componentId), { ready: o } = a;
|
|
815
832
|
return a.animations.map((c) => ({
|
|
816
833
|
/* we use getters for start and end in order to access the animation's start and end
|
|
817
834
|
only when initializing the scrub scene rather than immediately */
|
|
@@ -821,7 +838,7 @@ function Dt(t, e, n, i = {}) {
|
|
|
821
838
|
get end() {
|
|
822
839
|
return c.end;
|
|
823
840
|
},
|
|
824
|
-
viewSource:
|
|
841
|
+
viewSource: l,
|
|
825
842
|
ready: o,
|
|
826
843
|
getProgress() {
|
|
827
844
|
return a.getProgress();
|
|
@@ -836,8 +853,8 @@ function Dt(t, e, n, i = {}) {
|
|
|
836
853
|
}
|
|
837
854
|
}));
|
|
838
855
|
} else if (n.trigger === "pointer-move") {
|
|
839
|
-
const
|
|
840
|
-
if (
|
|
856
|
+
const l = e, { centeredToTarget: o, transitionDuration: c, transitionEasing: f } = l, p = n.axis;
|
|
857
|
+
if (l.keyframeEffect) {
|
|
841
858
|
const h = a;
|
|
842
859
|
return h.animations?.length === 0 ? null : {
|
|
843
860
|
target: void 0,
|
|
@@ -857,17 +874,17 @@ function Dt(t, e, n, i = {}) {
|
|
|
857
874
|
}
|
|
858
875
|
};
|
|
859
876
|
}
|
|
860
|
-
|
|
877
|
+
m = {
|
|
861
878
|
centeredToTarget: o,
|
|
862
879
|
allowActiveEvent: s
|
|
863
|
-
}, e.customEffect && c && (
|
|
880
|
+
}, e.customEffect && c && (m.transitionDuration = c, m.transitionEasing = D(f)), m.target = a.target;
|
|
864
881
|
}
|
|
865
882
|
return {
|
|
866
|
-
...
|
|
883
|
+
...m,
|
|
867
884
|
getProgress() {
|
|
868
885
|
return a.getProgress();
|
|
869
886
|
},
|
|
870
|
-
effect(
|
|
887
|
+
effect(l, o, c, f) {
|
|
871
888
|
a.progress(
|
|
872
889
|
c ? {
|
|
873
890
|
// @ts-expect-error spread error on p
|
|
@@ -883,10 +900,10 @@ function Dt(t, e, n, i = {}) {
|
|
|
883
900
|
}
|
|
884
901
|
};
|
|
885
902
|
}
|
|
886
|
-
function
|
|
903
|
+
function Ft(t, e, n, i = !1) {
|
|
887
904
|
const r = zt(t, e);
|
|
888
905
|
return r ? (r.ready = new Promise((s) => {
|
|
889
|
-
|
|
906
|
+
Pt(t, e, s);
|
|
890
907
|
}), r) : V(t, e, n, { reducedMotion: i });
|
|
891
908
|
}
|
|
892
909
|
function xt(t) {
|
|
@@ -897,7 +914,7 @@ function Mt(t, e) {
|
|
|
897
914
|
for (const { target: i, options: r } of t) {
|
|
898
915
|
const s = xt(i);
|
|
899
916
|
for (const u of s) {
|
|
900
|
-
const a =
|
|
917
|
+
const a = Ft(
|
|
901
918
|
u,
|
|
902
919
|
r,
|
|
903
920
|
void 0,
|
|
@@ -913,25 +930,25 @@ function Rt(t, e, n) {
|
|
|
913
930
|
return new Et(i, t);
|
|
914
931
|
}
|
|
915
932
|
export {
|
|
916
|
-
|
|
933
|
+
lt as backIn,
|
|
917
934
|
dt as backInOut,
|
|
918
935
|
ht as backOut,
|
|
919
936
|
ut as circIn,
|
|
920
|
-
|
|
937
|
+
mt as circInOut,
|
|
921
938
|
ft as circOut,
|
|
922
939
|
Mt as createAnimationGroups,
|
|
923
|
-
|
|
940
|
+
C as cssEasings,
|
|
924
941
|
Y as cubicIn,
|
|
925
942
|
Z as cubicInOut,
|
|
926
943
|
Q as cubicOut,
|
|
927
944
|
ot as expoIn,
|
|
928
945
|
ct as expoInOut,
|
|
929
946
|
at as expoOut,
|
|
930
|
-
|
|
947
|
+
Ft as getAnimation,
|
|
931
948
|
Gt as getCSSAnimation,
|
|
932
949
|
pt as getCssUnits,
|
|
933
950
|
gt as getEasing,
|
|
934
|
-
|
|
951
|
+
Ct as getElementAnimation,
|
|
935
952
|
zt as getElementCSSAnimation,
|
|
936
953
|
D as getJsEasing,
|
|
937
954
|
Dt as getScrubScene,
|
|
@@ -939,7 +956,7 @@ export {
|
|
|
939
956
|
V as getWebAnimation,
|
|
940
957
|
z as jsEasings,
|
|
941
958
|
G as linear,
|
|
942
|
-
|
|
959
|
+
Pt as prepareAnimation,
|
|
943
960
|
X as quadIn,
|
|
944
961
|
U as quadInOut,
|
|
945
962
|
J as quadOut,
|