@juleshry/vue-animejs 1.3.0 → 1.4.0-beta.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/README.md +4 -2
- package/dist/directives/v-animate.d.ts +3 -0
- package/dist/directives/v-animate.d.ts.map +1 -1
- package/dist/directives/v-svg-drawable.d.ts +3 -0
- package/dist/directives/v-svg-drawable.d.ts.map +1 -1
- package/dist/directives/v-text-split.d.ts +9 -0
- package/dist/directives/v-text-split.d.ts.map +1 -1
- package/dist/directives/v-waapi.d.ts +3 -0
- package/dist/directives/v-waapi.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +408 -269
- package/dist/index.js.map +1 -1
- package/dist/utils/initial-draw.d.ts +33 -0
- package/dist/utils/initial-draw.d.ts.map +1 -0
- package/dist/utils/initial-style.d.ts +49 -0
- package/dist/utils/initial-style.d.ts.map +1 -0
- package/dist/utils/kebab-case.d.ts +3 -0
- package/dist/utils/kebab-case.d.ts.map +1 -0
- package/dist/utils/ssr-props.d.ts +44 -0
- package/dist/utils/ssr-props.d.ts.map +1 -0
- package/package.json +7 -2
package/dist/index.js
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { computed as e, isRef as t, markRaw as n,
|
|
2
|
-
import { animate as
|
|
3
|
-
import { isClient as
|
|
1
|
+
import { computed as e, isRef as t, markRaw as n, normalizeStyle as r, shallowReadonly as i, shallowRef as a, toValue as o, unref as s, watch as c } from "vue";
|
|
2
|
+
import { animate as l, createAnimatable as u, createDraggable as d, createLayout as f, createScope as p, createTimeline as m, createTimer as h, onScroll as g, splitText as _, svg as v, waapi as y } from "animejs";
|
|
3
|
+
import { isClient as b, tryOnMounted as x, tryOnUnmounted as S, unrefElement as C } from "@vueuse/core";
|
|
4
4
|
//#region src/utils/resolve-target.ts
|
|
5
|
-
function
|
|
5
|
+
function w(e) {
|
|
6
6
|
if (Array.isArray(e)) {
|
|
7
|
-
let t = e.map((e) =>
|
|
7
|
+
let t = e.map((e) => C(e)).filter((e) => e != null);
|
|
8
8
|
return t.length > 0 ? t : void 0;
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return C(e);
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/composables/use-animate.ts
|
|
14
|
-
function
|
|
15
|
-
let
|
|
14
|
+
function T(e, r = {}) {
|
|
15
|
+
let o = a(), { stop: u } = c([() => w(e), () => s(r)], ([e, t]) => {
|
|
16
16
|
d(e, t);
|
|
17
17
|
}, {
|
|
18
18
|
flush: "post",
|
|
19
|
-
immediate: !t(e) &&
|
|
19
|
+
immediate: !t(e) && b
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
u(),
|
|
21
|
+
S(() => {
|
|
22
|
+
u(), y();
|
|
23
23
|
});
|
|
24
24
|
function d(e, t) {
|
|
25
|
-
if (
|
|
26
|
-
console.warn("Target element is null or undefined"),
|
|
25
|
+
if (x(), !e) {
|
|
26
|
+
console.warn("Target element is null or undefined"), o.value = void 0;
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
o.value = n(l(e, t));
|
|
30
30
|
}
|
|
31
31
|
function f() {
|
|
32
|
-
return
|
|
32
|
+
return o.value?.play();
|
|
33
33
|
}
|
|
34
34
|
function p() {
|
|
35
|
-
return
|
|
35
|
+
return o.value?.reverse();
|
|
36
36
|
}
|
|
37
37
|
function m() {
|
|
38
|
-
return
|
|
38
|
+
return o.value?.pause();
|
|
39
39
|
}
|
|
40
40
|
function h() {
|
|
41
|
-
return
|
|
41
|
+
return o.value?.restart();
|
|
42
42
|
}
|
|
43
43
|
function g() {
|
|
44
|
-
return
|
|
44
|
+
return o.value?.alternate();
|
|
45
45
|
}
|
|
46
46
|
function _() {
|
|
47
|
-
return
|
|
47
|
+
return o.value?.resume();
|
|
48
48
|
}
|
|
49
49
|
function v() {
|
|
50
|
-
return
|
|
50
|
+
return o.value?.complete();
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function y() {
|
|
53
|
+
return o.value?.cancel();
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function x() {
|
|
56
|
+
return o.value?.revert();
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
58
|
+
function C(e) {
|
|
59
|
+
return o.value?.reset(e);
|
|
60
60
|
}
|
|
61
61
|
function T(e, t, n) {
|
|
62
|
-
return
|
|
62
|
+
return o.value?.seek(e, t, n);
|
|
63
63
|
}
|
|
64
64
|
function E(e) {
|
|
65
|
-
return
|
|
65
|
+
return o.value?.stretch(e);
|
|
66
66
|
}
|
|
67
67
|
function D() {
|
|
68
|
-
return
|
|
68
|
+
return o.value?.refresh();
|
|
69
69
|
}
|
|
70
70
|
return {
|
|
71
|
-
animation:
|
|
71
|
+
animation: i(o),
|
|
72
72
|
play: f,
|
|
73
73
|
reverse: p,
|
|
74
74
|
pause: m,
|
|
@@ -76,9 +76,9 @@ function w(e, a = {}) {
|
|
|
76
76
|
alternate: g,
|
|
77
77
|
resume: _,
|
|
78
78
|
complete: v,
|
|
79
|
-
cancel:
|
|
80
|
-
revert:
|
|
81
|
-
reset:
|
|
79
|
+
cancel: y,
|
|
80
|
+
revert: x,
|
|
81
|
+
reset: C,
|
|
82
82
|
seek: T,
|
|
83
83
|
stretch: E,
|
|
84
84
|
refresh: D
|
|
@@ -86,25 +86,25 @@ function w(e, a = {}) {
|
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/composables/use-raw-animate.ts
|
|
89
|
-
function
|
|
90
|
-
let n =
|
|
91
|
-
return n || console.warn("Target is undefined"),
|
|
89
|
+
function E(e, t = {}) {
|
|
90
|
+
let n = w(e);
|
|
91
|
+
return n || console.warn("Target is undefined"), l(n, s(t));
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
94
|
//#region src/composables/use-timer.ts
|
|
95
|
-
function
|
|
96
|
-
let t =
|
|
97
|
-
function
|
|
98
|
-
e !==
|
|
95
|
+
function D(e = {}) {
|
|
96
|
+
let t = a(), r;
|
|
97
|
+
function o(e) {
|
|
98
|
+
e !== r && (r = e, y(), t.value = n(h(e)));
|
|
99
99
|
}
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
x(() => {
|
|
101
|
+
o(s(e));
|
|
102
102
|
});
|
|
103
|
-
let { stop: l } =
|
|
104
|
-
|
|
103
|
+
let { stop: l } = c(() => s(e), (e) => {
|
|
104
|
+
b && o(e);
|
|
105
105
|
}, { deep: 1 });
|
|
106
|
-
|
|
107
|
-
l(),
|
|
106
|
+
S(() => {
|
|
107
|
+
l(), y();
|
|
108
108
|
});
|
|
109
109
|
function u() {
|
|
110
110
|
return t.value?.play();
|
|
@@ -118,7 +118,7 @@ function E(e = {}) {
|
|
|
118
118
|
function p() {
|
|
119
119
|
return t.value?.restart();
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function m() {
|
|
122
122
|
return t.value?.alternate();
|
|
123
123
|
}
|
|
124
124
|
function g() {
|
|
@@ -130,7 +130,7 @@ function E(e = {}) {
|
|
|
130
130
|
function v(e) {
|
|
131
131
|
return t.value?.reset(e);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function y() {
|
|
134
134
|
return t.value?.cancel();
|
|
135
135
|
}
|
|
136
136
|
function C() {
|
|
@@ -143,16 +143,16 @@ function E(e = {}) {
|
|
|
143
143
|
return t.value?.stretch(e);
|
|
144
144
|
}
|
|
145
145
|
return {
|
|
146
|
-
timer:
|
|
146
|
+
timer: i(t),
|
|
147
147
|
play: u,
|
|
148
148
|
reverse: d,
|
|
149
149
|
pause: f,
|
|
150
150
|
restart: p,
|
|
151
|
-
alternate:
|
|
151
|
+
alternate: m,
|
|
152
152
|
resume: g,
|
|
153
153
|
complete: _,
|
|
154
154
|
reset: v,
|
|
155
|
-
cancel:
|
|
155
|
+
cancel: y,
|
|
156
156
|
revert: C,
|
|
157
157
|
seek: w,
|
|
158
158
|
stretch: T
|
|
@@ -160,24 +160,24 @@ function E(e = {}) {
|
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
162
|
//#region src/composables/use-timeline.ts
|
|
163
|
-
function
|
|
164
|
-
let t = !1,
|
|
163
|
+
function O(e = {}) {
|
|
164
|
+
let t = !1, r, l = [], u = a();
|
|
165
165
|
function d() {
|
|
166
|
-
for (let e of l) e.type === "add" ? u.value?.add(
|
|
166
|
+
for (let e of l) e.type === "add" ? u.value?.add(w(e.targets), o(e.params), e.position) : e.type === "set" ? u.value?.set(w(e.targets), o(e.params), e.position) : u.value?.call(e.callback, e.position);
|
|
167
167
|
}
|
|
168
168
|
function f(e) {
|
|
169
|
-
e !==
|
|
169
|
+
e !== r && (r = e, N(), u.value = n(m(e)), d());
|
|
170
170
|
}
|
|
171
|
-
let { stop:
|
|
172
|
-
|
|
171
|
+
let { stop: p } = c(() => s(e), (e) => {
|
|
172
|
+
b && f(e);
|
|
173
173
|
}, {
|
|
174
174
|
flush: "post",
|
|
175
175
|
deep: 1
|
|
176
176
|
});
|
|
177
|
-
|
|
178
|
-
f(
|
|
179
|
-
}),
|
|
180
|
-
|
|
177
|
+
x(() => {
|
|
178
|
+
f(s(e)), t = !0;
|
|
179
|
+
}), S(() => {
|
|
180
|
+
p(), M();
|
|
181
181
|
});
|
|
182
182
|
function h(e, n, r) {
|
|
183
183
|
return l.push({
|
|
@@ -186,7 +186,7 @@ function D(e = {}) {
|
|
|
186
186
|
params: n,
|
|
187
187
|
position: r
|
|
188
188
|
}), t ? {
|
|
189
|
-
...u.value?.add(
|
|
189
|
+
...u.value?.add(w(e), o(n), r),
|
|
190
190
|
add: h,
|
|
191
191
|
set: g,
|
|
192
192
|
remove: _
|
|
@@ -204,7 +204,7 @@ function D(e = {}) {
|
|
|
204
204
|
params: n,
|
|
205
205
|
position: r
|
|
206
206
|
}), t ? {
|
|
207
|
-
...u.value?.set(
|
|
207
|
+
...u.value?.set(w(e), o(n), r),
|
|
208
208
|
add: h,
|
|
209
209
|
set: g,
|
|
210
210
|
remove: _
|
|
@@ -217,7 +217,7 @@ function D(e = {}) {
|
|
|
217
217
|
}
|
|
218
218
|
function _(e, n) {
|
|
219
219
|
return t ? {
|
|
220
|
-
...u.value?.remove(
|
|
220
|
+
...u.value?.remove(w(e), n),
|
|
221
221
|
add: h,
|
|
222
222
|
set: g,
|
|
223
223
|
remove: _
|
|
@@ -231,10 +231,10 @@ function D(e = {}) {
|
|
|
231
231
|
function v(e, t) {
|
|
232
232
|
return u.value?.sync(e, t);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function y(e, t) {
|
|
235
235
|
return u.value?.label(e, t);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function C(e, t) {
|
|
238
238
|
return l.push({
|
|
239
239
|
type: "call",
|
|
240
240
|
callback: e,
|
|
@@ -256,139 +256,139 @@ function D(e = {}) {
|
|
|
256
256
|
function k() {
|
|
257
257
|
return u.value?.restart();
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function ee() {
|
|
260
260
|
return u.value?.alternate();
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function te() {
|
|
263
263
|
return u.value?.resume();
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function A() {
|
|
266
266
|
return u.value?.complete();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function j(e) {
|
|
269
269
|
return u.value?.reset(e);
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function M() {
|
|
272
272
|
return u.value?.cancel();
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function N() {
|
|
275
275
|
return u.value?.revert();
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function P(e, t, n) {
|
|
278
278
|
return u.value?.seek(e, t, n);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function F(e) {
|
|
281
281
|
return u.value?.stretch(e);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function I() {
|
|
284
284
|
return u.value?.refresh();
|
|
285
285
|
}
|
|
286
286
|
return {
|
|
287
|
-
timeline:
|
|
287
|
+
timeline: i(u),
|
|
288
288
|
add: h,
|
|
289
289
|
set: g,
|
|
290
290
|
sync: v,
|
|
291
|
-
label:
|
|
291
|
+
label: y,
|
|
292
292
|
remove: _,
|
|
293
|
-
call:
|
|
293
|
+
call: C,
|
|
294
294
|
init: T,
|
|
295
295
|
play: E,
|
|
296
296
|
reverse: D,
|
|
297
297
|
pause: O,
|
|
298
298
|
restart: k,
|
|
299
|
-
alternate:
|
|
300
|
-
resume:
|
|
301
|
-
complete:
|
|
302
|
-
reset:
|
|
303
|
-
cancel:
|
|
304
|
-
revert:
|
|
305
|
-
seek:
|
|
306
|
-
stretch:
|
|
307
|
-
refresh:
|
|
299
|
+
alternate: ee,
|
|
300
|
+
resume: te,
|
|
301
|
+
complete: A,
|
|
302
|
+
reset: j,
|
|
303
|
+
cancel: M,
|
|
304
|
+
revert: N,
|
|
305
|
+
seek: P,
|
|
306
|
+
stretch: F,
|
|
307
|
+
refresh: I
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
310
|
//#endregion
|
|
311
311
|
//#region src/composables/use-animatable.ts
|
|
312
|
-
function
|
|
313
|
-
let
|
|
314
|
-
el:
|
|
315
|
-
opt: o
|
|
316
|
-
})), { stop: f } =
|
|
312
|
+
function k(r, o = {}) {
|
|
313
|
+
let l = a(), d = e(() => ({
|
|
314
|
+
el: w(r),
|
|
315
|
+
opt: s(o)
|
|
316
|
+
})), { stop: f } = c(d, ({ el: e, opt: t }) => {
|
|
317
317
|
if (p(), !e) {
|
|
318
|
-
console.warn("Targets element is null or undefined"),
|
|
318
|
+
console.warn("Targets element is null or undefined"), l.value = void 0;
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
l.value = n(u(e, t));
|
|
322
322
|
}, {
|
|
323
323
|
flush: "post",
|
|
324
|
-
immediate: !t(
|
|
324
|
+
immediate: !t(r) && b
|
|
325
325
|
});
|
|
326
|
-
|
|
326
|
+
S(() => {
|
|
327
327
|
f(), p();
|
|
328
328
|
});
|
|
329
329
|
function p() {
|
|
330
|
-
return
|
|
330
|
+
return l.value?.revert();
|
|
331
331
|
}
|
|
332
332
|
return {
|
|
333
|
-
animatable:
|
|
333
|
+
animatable: i(l),
|
|
334
334
|
revert: p
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
337
|
//#endregion
|
|
338
338
|
//#region src/composables/use-raw-animatable.ts
|
|
339
|
-
function
|
|
340
|
-
let n =
|
|
341
|
-
return n || console.warn("Targets element is null or undefined"),
|
|
339
|
+
function ee(e, t = {}) {
|
|
340
|
+
let n = w(e);
|
|
341
|
+
return n || console.warn("Targets element is null or undefined"), u(n, s(t));
|
|
342
342
|
}
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/composables/use-draggable.ts
|
|
345
|
-
function
|
|
346
|
-
let
|
|
347
|
-
if (
|
|
348
|
-
console.warn("Targets element is null or undefined"),
|
|
345
|
+
function te(e, r = {}) {
|
|
346
|
+
let o = a(), { stop: l } = c([() => w(e), () => s(r)], ([e, t]) => {
|
|
347
|
+
if (y(), !e) {
|
|
348
|
+
console.warn("Targets element is null or undefined"), o.value = void 0;
|
|
349
349
|
return;
|
|
350
350
|
}
|
|
351
|
-
|
|
351
|
+
o.value = n(d(e, t));
|
|
352
352
|
}, {
|
|
353
353
|
flush: "post",
|
|
354
|
-
immediate: !t(e) &&
|
|
354
|
+
immediate: !t(e) && b
|
|
355
355
|
});
|
|
356
|
-
|
|
357
|
-
|
|
356
|
+
S(() => {
|
|
357
|
+
y(), l();
|
|
358
358
|
});
|
|
359
|
-
function
|
|
360
|
-
return
|
|
359
|
+
function u() {
|
|
360
|
+
return o.value?.disable();
|
|
361
361
|
}
|
|
362
362
|
function f() {
|
|
363
|
-
return
|
|
363
|
+
return o.value?.enable();
|
|
364
364
|
}
|
|
365
365
|
function p(e, t) {
|
|
366
|
-
return
|
|
366
|
+
return o.value?.setX(e, t);
|
|
367
367
|
}
|
|
368
368
|
function m(e, t) {
|
|
369
|
-
return
|
|
369
|
+
return o.value?.setY(e, t);
|
|
370
370
|
}
|
|
371
371
|
function h(e, t, n) {
|
|
372
|
-
return
|
|
372
|
+
return o.value?.animateInView(e, t, n);
|
|
373
373
|
}
|
|
374
374
|
function g(e, t, n) {
|
|
375
|
-
return
|
|
375
|
+
return o.value?.scrollInView(e, t, n);
|
|
376
376
|
}
|
|
377
377
|
function _() {
|
|
378
|
-
return
|
|
378
|
+
return o.value?.stop();
|
|
379
379
|
}
|
|
380
380
|
function v() {
|
|
381
|
-
return
|
|
381
|
+
return o.value?.reset();
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
383
|
+
function y() {
|
|
384
|
+
return o.value?.revert();
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
386
|
+
function x() {
|
|
387
|
+
return o.value?.refresh();
|
|
388
388
|
}
|
|
389
389
|
return {
|
|
390
|
-
draggable:
|
|
391
|
-
disable:
|
|
390
|
+
draggable: i(o),
|
|
391
|
+
disable: u,
|
|
392
392
|
enable: f,
|
|
393
393
|
setX: p,
|
|
394
394
|
setY: m,
|
|
@@ -396,76 +396,76 @@ function A(e, a = {}) {
|
|
|
396
396
|
scrollInView: g,
|
|
397
397
|
stop: _,
|
|
398
398
|
reset: v,
|
|
399
|
-
revert:
|
|
400
|
-
refresh:
|
|
399
|
+
revert: y,
|
|
400
|
+
refresh: x
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
//#endregion
|
|
404
404
|
//#region src/composables/use-layout.ts
|
|
405
|
-
function
|
|
406
|
-
let
|
|
405
|
+
function A(e, r = {}) {
|
|
406
|
+
let o = a(), { stop: l } = c([() => w(e), () => s(r)], ([e, t]) => {
|
|
407
407
|
if (m(), !e) {
|
|
408
|
-
console.warn("Target element is null or undefined"),
|
|
408
|
+
console.warn("Target element is null or undefined"), o.value = void 0;
|
|
409
409
|
return;
|
|
410
410
|
}
|
|
411
|
-
|
|
411
|
+
o.value = n(f(e, t));
|
|
412
412
|
}, {
|
|
413
413
|
flush: "post",
|
|
414
|
-
immediate: !t(e) &&
|
|
414
|
+
immediate: !t(e) && b
|
|
415
415
|
});
|
|
416
|
-
|
|
416
|
+
S(() => {
|
|
417
417
|
m(), l();
|
|
418
418
|
});
|
|
419
419
|
function u() {
|
|
420
|
-
return
|
|
420
|
+
return o.value?.record();
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
422
|
+
function d(e) {
|
|
423
|
+
return o.value?.animate(e);
|
|
424
424
|
}
|
|
425
425
|
function p(e, t) {
|
|
426
|
-
return
|
|
426
|
+
return o.value?.update(e, t);
|
|
427
427
|
}
|
|
428
428
|
function m() {
|
|
429
|
-
return
|
|
429
|
+
return o.value?.revert();
|
|
430
430
|
}
|
|
431
431
|
return {
|
|
432
|
-
layout:
|
|
432
|
+
layout: i(o),
|
|
433
433
|
record: u,
|
|
434
|
-
animate:
|
|
434
|
+
animate: d,
|
|
435
435
|
update: p,
|
|
436
436
|
revert: m
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region src/composables/use-scroll.ts
|
|
441
|
-
function
|
|
442
|
-
let a,
|
|
443
|
-
if (a?.revert(), a = void 0, !
|
|
444
|
-
let e =
|
|
445
|
-
if (e &&
|
|
446
|
-
...
|
|
441
|
+
function j(t, r, i = {}) {
|
|
442
|
+
let a, o = e(() => {
|
|
443
|
+
if (a?.revert(), a = void 0, !b) return;
|
|
444
|
+
let e = w(t), o = w(r);
|
|
445
|
+
if (e && o) return a = n(g({
|
|
446
|
+
...s(i),
|
|
447
447
|
container: e,
|
|
448
|
-
target:
|
|
448
|
+
target: o
|
|
449
449
|
})), a;
|
|
450
|
-
}), c = e(() =>
|
|
451
|
-
|
|
450
|
+
}), c = e(() => o.value ?? !1), l = e(() => ({ autoplay: c.value }));
|
|
451
|
+
S(() => a?.revert());
|
|
452
452
|
function u() {
|
|
453
|
-
return
|
|
453
|
+
return o.value?.refresh();
|
|
454
454
|
}
|
|
455
455
|
function d() {
|
|
456
|
-
return
|
|
456
|
+
return o.value?.revert();
|
|
457
457
|
}
|
|
458
458
|
function f() {
|
|
459
|
-
|
|
459
|
+
o.value?.debug();
|
|
460
460
|
}
|
|
461
461
|
function p() {
|
|
462
|
-
return
|
|
462
|
+
return o.value?.removeDebug();
|
|
463
463
|
}
|
|
464
464
|
function m(e) {
|
|
465
|
-
return
|
|
465
|
+
return o.value?.link(e);
|
|
466
466
|
}
|
|
467
467
|
return {
|
|
468
|
-
observer:
|
|
468
|
+
observer: o,
|
|
469
469
|
autoplay: c,
|
|
470
470
|
autoplayComputed: l,
|
|
471
471
|
refresh: u,
|
|
@@ -477,16 +477,16 @@ function M(t, r, i = {}) {
|
|
|
477
477
|
}
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/composables/use-svg.ts
|
|
480
|
-
function
|
|
480
|
+
function M() {
|
|
481
481
|
function e(e, t) {
|
|
482
482
|
return (n, r, i, a) => {
|
|
483
|
-
let
|
|
484
|
-
return
|
|
483
|
+
let o = s(e);
|
|
484
|
+
return o ? v.morphTo(o, s(t))(n, r, i, a) : "";
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
function t(e, t) {
|
|
488
|
-
let n =
|
|
489
|
-
return
|
|
488
|
+
let n = s(e) ?? "";
|
|
489
|
+
return v.createMotionPath(n, s(t));
|
|
490
490
|
}
|
|
491
491
|
return {
|
|
492
492
|
morphTo: e,
|
|
@@ -495,31 +495,31 @@ function N() {
|
|
|
495
495
|
}
|
|
496
496
|
//#endregion
|
|
497
497
|
//#region src/composables/use-svg-drawable.ts
|
|
498
|
-
function
|
|
499
|
-
let l =
|
|
498
|
+
function N(e, r = 0, o = 0) {
|
|
499
|
+
let l = a(), { stop: u } = c(() => w(e), (e) => {
|
|
500
500
|
if (l.value = void 0, !e) {
|
|
501
501
|
console.warn("[useSvgDrawable] Target element is null or undefined");
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
504
|
-
l.value = n(
|
|
504
|
+
l.value = n(v.createDrawable(e, s(r), s(o))[0]);
|
|
505
505
|
}, {
|
|
506
506
|
flush: "post",
|
|
507
|
-
immediate: !t(e) &&
|
|
507
|
+
immediate: !t(e) && b
|
|
508
508
|
});
|
|
509
|
-
return
|
|
509
|
+
return S(() => {
|
|
510
510
|
u(), l.value = void 0;
|
|
511
|
-
}), { drawable:
|
|
511
|
+
}), { drawable: i(l) };
|
|
512
512
|
}
|
|
513
513
|
//#endregion
|
|
514
514
|
//#region src/composables/use-text.ts
|
|
515
|
-
function
|
|
516
|
-
let l =
|
|
517
|
-
m(), l.value = void 0, e && (l.value = n(
|
|
515
|
+
function P(r, o) {
|
|
516
|
+
let l = a(), u = e(() => l.value?.lines ?? []), d = e(() => l.value?.words ?? []), f = e(() => l.value?.chars ?? []), { stop: p } = c([() => w(r), () => s(o)], ([e, t]) => {
|
|
517
|
+
m(), l.value = void 0, e && (l.value = n(_(e, t)));
|
|
518
518
|
}, {
|
|
519
519
|
flush: "post",
|
|
520
|
-
immediate: !t(
|
|
520
|
+
immediate: !t(r) && b
|
|
521
521
|
});
|
|
522
|
-
|
|
522
|
+
S(() => {
|
|
523
523
|
p(), l.value = void 0, m();
|
|
524
524
|
});
|
|
525
525
|
function m() {
|
|
@@ -529,7 +529,7 @@ function F(a, c) {
|
|
|
529
529
|
l.value?.refresh();
|
|
530
530
|
}
|
|
531
531
|
return {
|
|
532
|
-
splitter:
|
|
532
|
+
splitter: i(l),
|
|
533
533
|
lines: u,
|
|
534
534
|
words: d,
|
|
535
535
|
chars: f,
|
|
@@ -539,51 +539,51 @@ function F(a, c) {
|
|
|
539
539
|
}
|
|
540
540
|
//#endregion
|
|
541
541
|
//#region src/composables/use-waapi.ts
|
|
542
|
-
function
|
|
543
|
-
let
|
|
544
|
-
|
|
542
|
+
function F(e, r = {}) {
|
|
543
|
+
let o = a(), { stop: l } = c([() => w(e), () => s(r)], ([e, t]) => {
|
|
544
|
+
o.value = n(y.animate(e, t));
|
|
545
545
|
}, {
|
|
546
546
|
flush: "post",
|
|
547
|
-
immediate: !t(e) &&
|
|
547
|
+
immediate: !t(e) && b
|
|
548
548
|
});
|
|
549
|
-
|
|
549
|
+
S(() => {
|
|
550
550
|
l();
|
|
551
551
|
});
|
|
552
552
|
function u() {
|
|
553
|
-
return
|
|
553
|
+
return o.value?.resume();
|
|
554
554
|
}
|
|
555
555
|
function d() {
|
|
556
|
-
return
|
|
556
|
+
return o.value?.pause();
|
|
557
557
|
}
|
|
558
558
|
function f() {
|
|
559
|
-
return
|
|
559
|
+
return o.value?.alternate();
|
|
560
560
|
}
|
|
561
561
|
function p() {
|
|
562
|
-
return
|
|
562
|
+
return o.value?.play();
|
|
563
563
|
}
|
|
564
564
|
function m() {
|
|
565
|
-
return
|
|
565
|
+
return o.value?.reverse();
|
|
566
566
|
}
|
|
567
567
|
function h(e, t) {
|
|
568
|
-
return
|
|
568
|
+
return o.value?.seek(s(e), s(t));
|
|
569
569
|
}
|
|
570
570
|
function g() {
|
|
571
|
-
return
|
|
571
|
+
return o.value?.restart();
|
|
572
572
|
}
|
|
573
573
|
function _() {
|
|
574
|
-
return
|
|
574
|
+
return o.value?.commitStyles();
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
return
|
|
576
|
+
function v() {
|
|
577
|
+
return o.value?.complete();
|
|
578
578
|
}
|
|
579
|
-
function
|
|
580
|
-
return
|
|
579
|
+
function x() {
|
|
580
|
+
return o.value?.cancel();
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
return
|
|
582
|
+
function C() {
|
|
583
|
+
return o.value?.revert();
|
|
584
584
|
}
|
|
585
585
|
return {
|
|
586
|
-
animation:
|
|
586
|
+
animation: i(o),
|
|
587
587
|
resume: u,
|
|
588
588
|
pause: d,
|
|
589
589
|
alternate: f,
|
|
@@ -592,50 +592,50 @@ function I(e, a = {}) {
|
|
|
592
592
|
seek: h,
|
|
593
593
|
restart: g,
|
|
594
594
|
commitStyles: _,
|
|
595
|
-
complete:
|
|
596
|
-
cancel:
|
|
597
|
-
revert:
|
|
598
|
-
convertEase:
|
|
595
|
+
complete: v,
|
|
596
|
+
cancel: x,
|
|
597
|
+
revert: C,
|
|
598
|
+
convertEase: I
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function I(e, t = 100) {
|
|
602
|
+
return y.convertEase(s(e), s(t));
|
|
603
603
|
}
|
|
604
604
|
//#endregion
|
|
605
605
|
//#region src/composables/use-scope.ts
|
|
606
|
-
function
|
|
607
|
-
let
|
|
608
|
-
|
|
609
|
-
d = !0,
|
|
610
|
-
for (let e of
|
|
611
|
-
for (let [e, t] of l)
|
|
612
|
-
for (let e of u)
|
|
613
|
-
|
|
614
|
-
|
|
606
|
+
function ne(e) {
|
|
607
|
+
let r = a(void 0), o = [], l = [], u = [], d = !1, f;
|
|
608
|
+
x(() => {
|
|
609
|
+
d = !0, r.value = n(p(s(e)));
|
|
610
|
+
for (let e of o) r.value.add(e);
|
|
611
|
+
for (let [e, t] of l) r.value.add(e, t);
|
|
612
|
+
for (let e of u) r.value.addOnce(e);
|
|
613
|
+
o.length = 0, l.length = 0, u.length = 0, t(e) && (f = c(e, (e) => {
|
|
614
|
+
r.value?.revert(), r.value = n(p(e));
|
|
615
615
|
}, { flush: "post" }));
|
|
616
|
-
}),
|
|
617
|
-
|
|
616
|
+
}), S(() => {
|
|
617
|
+
r.value?.revert(), f?.();
|
|
618
618
|
});
|
|
619
619
|
function m(e) {
|
|
620
|
-
return d ?
|
|
620
|
+
return d ? r.value?.add(e) : void o.push(e);
|
|
621
621
|
}
|
|
622
622
|
function h(e, t) {
|
|
623
|
-
return d ?
|
|
623
|
+
return d ? r.value?.add(e, t) : void l.push([e, t]);
|
|
624
624
|
}
|
|
625
625
|
function g(e) {
|
|
626
|
-
return d ?
|
|
626
|
+
return d ? r.value?.addOnce(e) : void u.push(e);
|
|
627
627
|
}
|
|
628
628
|
function _(e) {
|
|
629
|
-
return
|
|
629
|
+
return r.value?.keepTime(e);
|
|
630
630
|
}
|
|
631
631
|
function v() {
|
|
632
|
-
return
|
|
632
|
+
return r.value?.revert();
|
|
633
633
|
}
|
|
634
634
|
function y() {
|
|
635
|
-
return
|
|
635
|
+
return r.value?.refresh();
|
|
636
636
|
}
|
|
637
637
|
return {
|
|
638
|
-
scope: r
|
|
638
|
+
scope: i(r),
|
|
639
639
|
add: m,
|
|
640
640
|
registerMethod: h,
|
|
641
641
|
addOnce: g,
|
|
@@ -645,105 +645,244 @@ function R(e) {
|
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
647
|
//#endregion
|
|
648
|
+
//#region src/utils/kebab-case.ts
|
|
649
|
+
function L(e) {
|
|
650
|
+
return e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
651
|
+
}
|
|
652
|
+
//#endregion
|
|
653
|
+
//#region src/utils/initial-style.ts
|
|
654
|
+
function R(e) {
|
|
655
|
+
let t = {}, n = {};
|
|
656
|
+
for (let [r, i] of Object.entries(e ?? {})) {
|
|
657
|
+
let e = re(i);
|
|
658
|
+
if (e === void 0) continue;
|
|
659
|
+
let a = se[r] ?? r;
|
|
660
|
+
if (B.includes(a)) {
|
|
661
|
+
let t = oe(e, ae(a));
|
|
662
|
+
t !== void 0 && (n[a] = t);
|
|
663
|
+
} else r.startsWith("--") ? e !== "" && (t[r] = String(e)) : ce.has(r) ? z(e) && (t[L(r)] = String(e)) : typeof e == "string" && V.test(e) && (t[L(r)] = e);
|
|
664
|
+
}
|
|
665
|
+
let r = B.filter((e) => e in n).map((e) => `${e}(${n[e]})`).join(" ");
|
|
666
|
+
return r && (t.transform = r), t;
|
|
667
|
+
}
|
|
668
|
+
function re(e) {
|
|
669
|
+
if (Array.isArray(e)) return e.length === 2 ? ie(e[0]) : void 0;
|
|
670
|
+
if (typeof e == "object" && e && "from" in e) return ie(e.from);
|
|
671
|
+
}
|
|
672
|
+
function ie(e) {
|
|
673
|
+
return typeof e == "number" || typeof e == "string" ? e : void 0;
|
|
674
|
+
}
|
|
675
|
+
function z(e) {
|
|
676
|
+
return typeof e == "number" ? Number.isFinite(e) : le.test(e);
|
|
677
|
+
}
|
|
678
|
+
function ae(e) {
|
|
679
|
+
return e.startsWith("scale") ? "" : e.startsWith("rotate") || e.startsWith("skew") ? "deg" : "px";
|
|
680
|
+
}
|
|
681
|
+
function oe(e, t) {
|
|
682
|
+
return z(e) ? `${e}${t}` : typeof e == "string" && V.test(e) ? e : void 0;
|
|
683
|
+
}
|
|
684
|
+
var B = [
|
|
685
|
+
"perspective",
|
|
686
|
+
"translateX",
|
|
687
|
+
"translateY",
|
|
688
|
+
"translateZ",
|
|
689
|
+
"rotate",
|
|
690
|
+
"rotateX",
|
|
691
|
+
"rotateY",
|
|
692
|
+
"rotateZ",
|
|
693
|
+
"scale",
|
|
694
|
+
"scaleX",
|
|
695
|
+
"scaleY",
|
|
696
|
+
"scaleZ",
|
|
697
|
+
"skew",
|
|
698
|
+
"skewX",
|
|
699
|
+
"skewY"
|
|
700
|
+
], se = {
|
|
701
|
+
x: "translateX",
|
|
702
|
+
y: "translateY",
|
|
703
|
+
z: "translateZ"
|
|
704
|
+
}, ce = /* @__PURE__ */ new Set([
|
|
705
|
+
"opacity",
|
|
706
|
+
"zIndex",
|
|
707
|
+
"order",
|
|
708
|
+
"flexGrow",
|
|
709
|
+
"flexShrink",
|
|
710
|
+
"fontWeight"
|
|
711
|
+
]), le = /^-?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i, V = /^-?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?([a-z]+|%)$/i, H = "data-anime-ssr", U = "data-anime-ssr-attrs";
|
|
712
|
+
function W({ style: e = {}, attrs: t = {} }) {
|
|
713
|
+
let n = {}, r = Object.keys(e), i = Object.keys(t);
|
|
714
|
+
return r.length && (n.style = e, n[H] = r.join(",")), i.length && (Object.assign(n, t), n[U] = i.join(",")), n;
|
|
715
|
+
}
|
|
716
|
+
function G(e, t) {
|
|
717
|
+
let n = e.getAttribute(H);
|
|
718
|
+
if (n !== null) {
|
|
719
|
+
let r = ue(t?.style);
|
|
720
|
+
for (let t of n.split(",")) {
|
|
721
|
+
let n = r.getPropertyValue(t);
|
|
722
|
+
n ? e.style.setProperty(t, n, r.getPropertyPriority(t)) : e.style.removeProperty(t);
|
|
723
|
+
}
|
|
724
|
+
e.removeAttribute(H);
|
|
725
|
+
}
|
|
726
|
+
let r = e.getAttribute(U);
|
|
727
|
+
if (r !== null) {
|
|
728
|
+
for (let n of r.split(",")) {
|
|
729
|
+
let r = t?.[n];
|
|
730
|
+
r == null ? e.removeAttribute(n) : e.setAttribute(n, String(r));
|
|
731
|
+
}
|
|
732
|
+
e.removeAttribute(U);
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
function ue(e) {
|
|
736
|
+
let t = document.createElement("div").style, n = r(e);
|
|
737
|
+
if (typeof n == "string") t.cssText = n;
|
|
738
|
+
else if (n) for (let [e, r] of Object.entries(n)) r != null && t.setProperty(e.startsWith("--") ? e : L(e), String(r));
|
|
739
|
+
return t;
|
|
740
|
+
}
|
|
741
|
+
//#endregion
|
|
648
742
|
//#region src/directives/v-animate.ts
|
|
649
|
-
var
|
|
743
|
+
var K = /* @__PURE__ */ new WeakMap(), de = {
|
|
744
|
+
getSSRProps(e) {
|
|
745
|
+
return W({ style: R(e.value) });
|
|
746
|
+
},
|
|
747
|
+
created(e, t, n) {
|
|
748
|
+
G(e, n.props);
|
|
749
|
+
},
|
|
650
750
|
mounted(e, t) {
|
|
651
|
-
t.value &&
|
|
751
|
+
t.value && K.set(e, l(e, t.value));
|
|
652
752
|
},
|
|
653
753
|
updated(e, t) {
|
|
654
754
|
if (t.value === t.oldValue) return;
|
|
655
|
-
let n =
|
|
656
|
-
n?.cancel(), n?.revert(), t.value &&
|
|
755
|
+
let n = K.get(e);
|
|
756
|
+
n?.cancel(), n?.revert(), t.value && K.set(e, l(e, t.value));
|
|
657
757
|
},
|
|
658
758
|
unmounted(e) {
|
|
659
|
-
let t =
|
|
660
|
-
t?.cancel(), t?.revert(),
|
|
759
|
+
let t = K.get(e);
|
|
760
|
+
t?.cancel(), t?.revert(), K.delete(e);
|
|
661
761
|
}
|
|
662
|
-
},
|
|
762
|
+
}, q = /* @__PURE__ */ new WeakMap(), fe = {
|
|
663
763
|
mounted(e, t) {
|
|
664
|
-
|
|
764
|
+
q.set(e, d(e, t.value ?? {}));
|
|
665
765
|
},
|
|
666
766
|
updated(e, t) {
|
|
667
|
-
t.value !== t.oldValue && (
|
|
767
|
+
t.value !== t.oldValue && (q.get(e)?.revert(), q.set(e, d(e, t.value ?? {})));
|
|
668
768
|
},
|
|
669
769
|
unmounted(e) {
|
|
670
|
-
|
|
770
|
+
q.get(e)?.revert(), q.delete(e);
|
|
671
771
|
}
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
772
|
+
};
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region src/utils/initial-draw.ts
|
|
775
|
+
function pe(e) {
|
|
776
|
+
let [t, n] = he(me(e?.draw)), r = t * -J, i = n * J + r, a = J + (t === 0 && n === 1 || t === 1 && n === 0 ? 0 : 10) - i, o = R(e);
|
|
777
|
+
return t === n && (o["stroke-linecap"] = "butt"), {
|
|
778
|
+
attrs: {
|
|
779
|
+
pathLength: `${J}`,
|
|
780
|
+
"stroke-dasharray": `${i} ${a}`,
|
|
781
|
+
"stroke-dashoffset": `${r}`
|
|
782
|
+
},
|
|
783
|
+
style: o
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
function me(e) {
|
|
787
|
+
return Array.isArray(e) ? e.length >= 2 && typeof e[0] == "string" ? e[0] : Y : typeof e == "object" && e && "from" in e && typeof e.from == "string" ? e.from : Y;
|
|
788
|
+
}
|
|
789
|
+
function he(e) {
|
|
790
|
+
let t = e.trim().split(/\s+/), n = +t[0], r = +t[1];
|
|
791
|
+
return Number.isFinite(n) && Number.isFinite(r) ? [n, r] : [0, 0];
|
|
792
|
+
}
|
|
793
|
+
var J = 1e3, Y = "0 0", X = /* @__PURE__ */ new WeakMap();
|
|
794
|
+
function Z(e, t) {
|
|
795
|
+
let n = v.createDrawable(e)[0];
|
|
675
796
|
return {
|
|
676
797
|
drawable: n,
|
|
677
|
-
animation: t ?
|
|
798
|
+
animation: t ? l(n, t) : void 0
|
|
678
799
|
};
|
|
679
800
|
}
|
|
680
|
-
var
|
|
801
|
+
var ge = {
|
|
802
|
+
getSSRProps(e) {
|
|
803
|
+
return W(pe(e.value));
|
|
804
|
+
},
|
|
805
|
+
created(e, t, n) {
|
|
806
|
+
G(e, n.props);
|
|
807
|
+
},
|
|
681
808
|
mounted(e, t) {
|
|
682
|
-
|
|
809
|
+
X.set(e, Z(e, t.value));
|
|
683
810
|
},
|
|
684
811
|
updated(e, t) {
|
|
685
812
|
if (t.value === t.oldValue) return;
|
|
686
|
-
let n =
|
|
687
|
-
n?.animation?.cancel(), n?.animation?.revert(),
|
|
813
|
+
let n = X.get(e);
|
|
814
|
+
n?.animation?.cancel(), n?.animation?.revert(), X.set(e, Z(e, t.value));
|
|
688
815
|
},
|
|
689
816
|
unmounted(e) {
|
|
690
|
-
let t =
|
|
691
|
-
t?.animation?.cancel(), t?.animation?.revert(),
|
|
817
|
+
let t = X.get(e);
|
|
818
|
+
t?.animation?.cancel(), t?.animation?.revert(), X.delete(e);
|
|
692
819
|
}
|
|
693
|
-
},
|
|
820
|
+
}, Q = /* @__PURE__ */ new WeakMap();
|
|
821
|
+
function _e(e, t) {
|
|
822
|
+
let n = e.style.cssText;
|
|
823
|
+
return {
|
|
824
|
+
animation: y.animate(e, t),
|
|
825
|
+
originalStyle: n
|
|
826
|
+
};
|
|
827
|
+
}
|
|
828
|
+
var ve = {
|
|
829
|
+
getSSRProps(e) {
|
|
830
|
+
return W({ style: R(e.value) });
|
|
831
|
+
},
|
|
832
|
+
created(e, t, n) {
|
|
833
|
+
G(e, n.props);
|
|
834
|
+
},
|
|
694
835
|
mounted(e, t) {
|
|
695
|
-
t.value &&
|
|
696
|
-
animation: v.animate(e, t.value),
|
|
697
|
-
originalStyle: e.style.cssText
|
|
698
|
-
});
|
|
836
|
+
t.value && Q.set(e, _e(e, t.value));
|
|
699
837
|
},
|
|
700
838
|
updated(e, t) {
|
|
701
839
|
if (t.value === t.oldValue) return;
|
|
702
|
-
let n =
|
|
703
|
-
n && (n.animation.cancel(), e.style.cssText = n.originalStyle,
|
|
704
|
-
animation: v.animate(e, t.value),
|
|
705
|
-
originalStyle: e.style.cssText
|
|
706
|
-
});
|
|
840
|
+
let n = Q.get(e);
|
|
841
|
+
n && (n.animation.cancel(), e.style.cssText = n.originalStyle, Q.delete(e)), t.value && Q.set(e, _e(e, t.value));
|
|
707
842
|
},
|
|
708
843
|
unmounted(e) {
|
|
709
|
-
let t =
|
|
710
|
-
t && (t.animation.cancel(), e.style.cssText = t.originalStyle,
|
|
844
|
+
let t = Q.get(e);
|
|
845
|
+
t && (t.animation.cancel(), e.style.cssText = t.originalStyle, Q.delete(e));
|
|
711
846
|
}
|
|
712
|
-
},
|
|
713
|
-
function
|
|
714
|
-
let { animation:
|
|
715
|
-
splitter:
|
|
847
|
+
}, $ = /* @__PURE__ */ new WeakMap();
|
|
848
|
+
function ye(e, t, n) {
|
|
849
|
+
let { animation: r, ssrHidden: i, ...a } = t ?? {}, o = _(e, a), s = {
|
|
850
|
+
splitter: o,
|
|
716
851
|
animation: void 0
|
|
717
852
|
};
|
|
718
|
-
if (
|
|
719
|
-
if (
|
|
720
|
-
|
|
853
|
+
if (r) {
|
|
854
|
+
if (a.lines) (document.fonts?.ready ?? Promise.resolve()).then(() => {
|
|
855
|
+
$.get(e) === s && (s.animation = l(o.lines, r), G(e, n));
|
|
721
856
|
});
|
|
722
857
|
else {
|
|
723
|
-
let
|
|
724
|
-
|
|
858
|
+
let t = a.chars ? o.chars : o.words;
|
|
859
|
+
s.animation = l(t, r), G(e, n);
|
|
725
860
|
}
|
|
726
|
-
}
|
|
727
|
-
return
|
|
861
|
+
} else G(e, n);
|
|
862
|
+
return s;
|
|
728
863
|
}
|
|
729
|
-
function
|
|
864
|
+
function be(e) {
|
|
730
865
|
e.animation?.cancel(), e.splitter.revert();
|
|
731
866
|
}
|
|
732
|
-
var
|
|
733
|
-
|
|
734
|
-
|
|
867
|
+
var xe = {
|
|
868
|
+
getSSRProps(e) {
|
|
869
|
+
return e.value?.ssrHidden ? W({ style: { visibility: "hidden" } }) : {};
|
|
735
870
|
},
|
|
736
|
-
|
|
871
|
+
created() {},
|
|
872
|
+
mounted(e, t, n) {
|
|
873
|
+
$.set(e, ye(e, t.value, n.props));
|
|
874
|
+
},
|
|
875
|
+
updated(e, t, n) {
|
|
737
876
|
if (t.value === t.oldValue) return;
|
|
738
|
-
let
|
|
739
|
-
|
|
877
|
+
let r = $.get(e);
|
|
878
|
+
r && be(r), $.set(e, ye(e, t.value, n.props));
|
|
740
879
|
},
|
|
741
880
|
unmounted(e) {
|
|
742
|
-
let t =
|
|
743
|
-
t &&
|
|
881
|
+
let t = $.get(e);
|
|
882
|
+
t && be(t), $.delete(e);
|
|
744
883
|
}
|
|
745
884
|
};
|
|
746
885
|
//#endregion
|
|
747
|
-
export {
|
|
886
|
+
export { k as useAnimatable, T as useAnimate, te as useDraggable, A as useLayout, ee as useRawAnimatable, E as useRawAnimate, ne as useScope, j as useScroll, M as useSvg, N as useSvgDrawable, P as useText, O as useTimeline, D as useTimer, F as useWaapi, de as vAnimate, fe as vDraggable, ge as vSvgDrawable, xe as vTextSplit, ve as vWaapi };
|
|
748
887
|
|
|
749
888
|
//# sourceMappingURL=index.js.map
|