@juleshry/vue-animejs 1.2.2 → 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 +5 -2
- package/dist/composables/use-scroll.d.ts +33 -0
- package/dist/composables/use-scroll.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +443 -265
- 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,84 +1,84 @@
|
|
|
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
|
+
}
|
|
49
|
+
function v() {
|
|
50
|
+
return o.value?.complete();
|
|
48
51
|
}
|
|
49
52
|
function y() {
|
|
50
|
-
return
|
|
53
|
+
return o.value?.cancel();
|
|
51
54
|
}
|
|
52
55
|
function x() {
|
|
53
|
-
return
|
|
56
|
+
return o.value?.revert();
|
|
54
57
|
}
|
|
55
|
-
function C() {
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
function w(e) {
|
|
59
|
-
return l.value?.reset(e);
|
|
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,
|
|
75
75
|
restart: h,
|
|
76
76
|
alternate: g,
|
|
77
77
|
resume: _,
|
|
78
|
-
complete:
|
|
79
|
-
cancel:
|
|
80
|
-
revert:
|
|
81
|
-
reset:
|
|
78
|
+
complete: v,
|
|
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 C(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 T(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() {
|
|
@@ -127,10 +127,10 @@ function T(e = {}) {
|
|
|
127
127
|
function _() {
|
|
128
128
|
return t.value?.complete();
|
|
129
129
|
}
|
|
130
|
-
function
|
|
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 T(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
|
-
reset:
|
|
155
|
-
cancel:
|
|
154
|
+
reset: v,
|
|
155
|
+
cancel: y,
|
|
156
156
|
revert: C,
|
|
157
157
|
seek: w,
|
|
158
158
|
stretch: T
|
|
@@ -160,24 +160,24 @@ function T(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 E(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 E(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 E(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: _
|
|
@@ -228,13 +228,13 @@ function E(e = {}) {
|
|
|
228
228
|
remove: _
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
-
function
|
|
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,198 +256,237 @@ function E(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
|
-
sync:
|
|
291
|
-
label:
|
|
290
|
+
sync: v,
|
|
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
|
+
}
|
|
380
|
+
function v() {
|
|
381
|
+
return o.value?.reset();
|
|
379
382
|
}
|
|
380
383
|
function y() {
|
|
381
|
-
return
|
|
384
|
+
return o.value?.revert();
|
|
382
385
|
}
|
|
383
386
|
function x() {
|
|
384
|
-
return
|
|
385
|
-
}
|
|
386
|
-
function C() {
|
|
387
|
-
return c.value?.refresh();
|
|
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,
|
|
395
395
|
animateInView: h,
|
|
396
396
|
scrollInView: g,
|
|
397
397
|
stop: _,
|
|
398
|
-
reset:
|
|
399
|
-
revert:
|
|
400
|
-
refresh:
|
|
398
|
+
reset: v,
|
|
399
|
+
revert: y,
|
|
400
|
+
refresh: x
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
//#endregion
|
|
404
404
|
//#region src/composables/use-layout.ts
|
|
405
|
-
function A(e,
|
|
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
|
+
//#region src/composables/use-scroll.ts
|
|
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
|
+
container: e,
|
|
448
|
+
target: o
|
|
449
|
+
})), a;
|
|
450
|
+
}), c = e(() => o.value ?? !1), l = e(() => ({ autoplay: c.value }));
|
|
451
|
+
S(() => a?.revert());
|
|
452
|
+
function u() {
|
|
453
|
+
return o.value?.refresh();
|
|
454
|
+
}
|
|
455
|
+
function d() {
|
|
456
|
+
return o.value?.revert();
|
|
457
|
+
}
|
|
458
|
+
function f() {
|
|
459
|
+
o.value?.debug();
|
|
460
|
+
}
|
|
461
|
+
function p() {
|
|
462
|
+
return o.value?.removeDebug();
|
|
463
|
+
}
|
|
464
|
+
function m(e) {
|
|
465
|
+
return o.value?.link(e);
|
|
466
|
+
}
|
|
467
|
+
return {
|
|
468
|
+
observer: o,
|
|
469
|
+
autoplay: c,
|
|
470
|
+
autoplayComputed: l,
|
|
471
|
+
refresh: u,
|
|
472
|
+
revert: d,
|
|
473
|
+
debug: f,
|
|
474
|
+
removeDebug: p,
|
|
475
|
+
link: m
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
//#endregion
|
|
440
479
|
//#region src/composables/use-svg.ts
|
|
441
|
-
function
|
|
480
|
+
function M() {
|
|
442
481
|
function e(e, t) {
|
|
443
482
|
return (n, r, i, a) => {
|
|
444
|
-
let
|
|
445
|
-
return
|
|
483
|
+
let o = s(e);
|
|
484
|
+
return o ? v.morphTo(o, s(t))(n, r, i, a) : "";
|
|
446
485
|
};
|
|
447
486
|
}
|
|
448
487
|
function t(e, t) {
|
|
449
|
-
let n =
|
|
450
|
-
return
|
|
488
|
+
let n = s(e) ?? "";
|
|
489
|
+
return v.createMotionPath(n, s(t));
|
|
451
490
|
}
|
|
452
491
|
return {
|
|
453
492
|
morphTo: e,
|
|
@@ -456,95 +495,95 @@ function j() {
|
|
|
456
495
|
}
|
|
457
496
|
//#endregion
|
|
458
497
|
//#region src/composables/use-svg-drawable.ts
|
|
459
|
-
function
|
|
460
|
-
let l =
|
|
498
|
+
function N(e, r = 0, o = 0) {
|
|
499
|
+
let l = a(), { stop: u } = c(() => w(e), (e) => {
|
|
461
500
|
if (l.value = void 0, !e) {
|
|
462
501
|
console.warn("[useSvgDrawable] Target element is null or undefined");
|
|
463
502
|
return;
|
|
464
503
|
}
|
|
465
|
-
l.value = n(
|
|
504
|
+
l.value = n(v.createDrawable(e, s(r), s(o))[0]);
|
|
466
505
|
}, {
|
|
467
506
|
flush: "post",
|
|
468
|
-
immediate: !t(e) &&
|
|
507
|
+
immediate: !t(e) && b
|
|
469
508
|
});
|
|
470
|
-
return
|
|
509
|
+
return S(() => {
|
|
471
510
|
u(), l.value = void 0;
|
|
472
|
-
}), { drawable:
|
|
511
|
+
}), { drawable: i(l) };
|
|
473
512
|
}
|
|
474
513
|
//#endregion
|
|
475
514
|
//#region src/composables/use-text.ts
|
|
476
|
-
function
|
|
477
|
-
let l =
|
|
478
|
-
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)));
|
|
479
518
|
}, {
|
|
480
519
|
flush: "post",
|
|
481
|
-
immediate: !t(
|
|
520
|
+
immediate: !t(r) && b
|
|
482
521
|
});
|
|
483
|
-
|
|
522
|
+
S(() => {
|
|
484
523
|
p(), l.value = void 0, m();
|
|
485
524
|
});
|
|
486
525
|
function m() {
|
|
487
526
|
l.value?.revert();
|
|
488
527
|
}
|
|
489
|
-
function
|
|
528
|
+
function h() {
|
|
490
529
|
l.value?.refresh();
|
|
491
530
|
}
|
|
492
531
|
return {
|
|
493
|
-
splitter:
|
|
532
|
+
splitter: i(l),
|
|
494
533
|
lines: u,
|
|
495
534
|
words: d,
|
|
496
535
|
chars: f,
|
|
497
536
|
revert: m,
|
|
498
|
-
refresh:
|
|
537
|
+
refresh: h
|
|
499
538
|
};
|
|
500
539
|
}
|
|
501
540
|
//#endregion
|
|
502
541
|
//#region src/composables/use-waapi.ts
|
|
503
|
-
function
|
|
504
|
-
let
|
|
505
|
-
|
|
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));
|
|
506
545
|
}, {
|
|
507
546
|
flush: "post",
|
|
508
|
-
immediate: !t(e) &&
|
|
547
|
+
immediate: !t(e) && b
|
|
509
548
|
});
|
|
510
|
-
|
|
549
|
+
S(() => {
|
|
511
550
|
l();
|
|
512
551
|
});
|
|
513
552
|
function u() {
|
|
514
|
-
return
|
|
553
|
+
return o.value?.resume();
|
|
515
554
|
}
|
|
516
555
|
function d() {
|
|
517
|
-
return
|
|
556
|
+
return o.value?.pause();
|
|
518
557
|
}
|
|
519
558
|
function f() {
|
|
520
|
-
return
|
|
559
|
+
return o.value?.alternate();
|
|
521
560
|
}
|
|
522
561
|
function p() {
|
|
523
|
-
return
|
|
562
|
+
return o.value?.play();
|
|
524
563
|
}
|
|
525
564
|
function m() {
|
|
526
|
-
return
|
|
565
|
+
return o.value?.reverse();
|
|
527
566
|
}
|
|
528
567
|
function h(e, t) {
|
|
529
|
-
return
|
|
568
|
+
return o.value?.seek(s(e), s(t));
|
|
530
569
|
}
|
|
531
570
|
function g() {
|
|
532
|
-
return
|
|
571
|
+
return o.value?.restart();
|
|
533
572
|
}
|
|
534
|
-
function
|
|
535
|
-
return
|
|
573
|
+
function _() {
|
|
574
|
+
return o.value?.commitStyles();
|
|
575
|
+
}
|
|
576
|
+
function v() {
|
|
577
|
+
return o.value?.complete();
|
|
536
578
|
}
|
|
537
579
|
function x() {
|
|
538
|
-
return
|
|
580
|
+
return o.value?.cancel();
|
|
539
581
|
}
|
|
540
582
|
function C() {
|
|
541
|
-
return
|
|
542
|
-
}
|
|
543
|
-
function w() {
|
|
544
|
-
return c.value?.revert();
|
|
583
|
+
return o.value?.revert();
|
|
545
584
|
}
|
|
546
585
|
return {
|
|
547
|
-
animation:
|
|
586
|
+
animation: i(o),
|
|
548
587
|
resume: u,
|
|
549
588
|
pause: d,
|
|
550
589
|
alternate: f,
|
|
@@ -552,159 +591,298 @@ function P(e, a = {}) {
|
|
|
552
591
|
reverse: m,
|
|
553
592
|
seek: h,
|
|
554
593
|
restart: g,
|
|
555
|
-
commitStyles:
|
|
556
|
-
complete:
|
|
557
|
-
cancel:
|
|
558
|
-
revert:
|
|
559
|
-
convertEase:
|
|
594
|
+
commitStyles: _,
|
|
595
|
+
complete: v,
|
|
596
|
+
cancel: x,
|
|
597
|
+
revert: C,
|
|
598
|
+
convertEase: I
|
|
560
599
|
};
|
|
561
600
|
}
|
|
562
|
-
function
|
|
563
|
-
return
|
|
601
|
+
function I(e, t = 100) {
|
|
602
|
+
return y.convertEase(s(e), s(t));
|
|
564
603
|
}
|
|
565
604
|
//#endregion
|
|
566
605
|
//#region src/composables/use-scope.ts
|
|
567
|
-
function
|
|
568
|
-
let
|
|
569
|
-
|
|
570
|
-
d = !0,
|
|
571
|
-
for (let e of
|
|
572
|
-
for (let [e, t] of l)
|
|
573
|
-
for (let e of u)
|
|
574
|
-
|
|
575
|
-
|
|
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));
|
|
576
615
|
}, { flush: "post" }));
|
|
577
|
-
}),
|
|
578
|
-
|
|
616
|
+
}), S(() => {
|
|
617
|
+
r.value?.revert(), f?.();
|
|
579
618
|
});
|
|
580
619
|
function m(e) {
|
|
581
|
-
return d ?
|
|
620
|
+
return d ? r.value?.add(e) : void o.push(e);
|
|
582
621
|
}
|
|
583
622
|
function h(e, t) {
|
|
584
|
-
return d ?
|
|
623
|
+
return d ? r.value?.add(e, t) : void l.push([e, t]);
|
|
585
624
|
}
|
|
586
625
|
function g(e) {
|
|
587
|
-
return d ?
|
|
626
|
+
return d ? r.value?.addOnce(e) : void u.push(e);
|
|
588
627
|
}
|
|
589
628
|
function _(e) {
|
|
590
|
-
return
|
|
629
|
+
return r.value?.keepTime(e);
|
|
591
630
|
}
|
|
592
631
|
function v() {
|
|
593
|
-
return
|
|
632
|
+
return r.value?.revert();
|
|
594
633
|
}
|
|
595
|
-
function
|
|
596
|
-
return
|
|
634
|
+
function y() {
|
|
635
|
+
return r.value?.refresh();
|
|
597
636
|
}
|
|
598
637
|
return {
|
|
599
|
-
scope: r
|
|
638
|
+
scope: i(r),
|
|
600
639
|
add: m,
|
|
601
640
|
registerMethod: h,
|
|
602
641
|
addOnce: g,
|
|
603
642
|
keepTime: _,
|
|
604
643
|
revert: v,
|
|
605
|
-
refresh:
|
|
644
|
+
refresh: y
|
|
606
645
|
};
|
|
607
646
|
}
|
|
608
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
|
|
609
742
|
//#region src/directives/v-animate.ts
|
|
610
|
-
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
|
+
},
|
|
611
750
|
mounted(e, t) {
|
|
612
|
-
t.value &&
|
|
751
|
+
t.value && K.set(e, l(e, t.value));
|
|
613
752
|
},
|
|
614
753
|
updated(e, t) {
|
|
615
754
|
if (t.value === t.oldValue) return;
|
|
616
|
-
let n =
|
|
617
|
-
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));
|
|
618
757
|
},
|
|
619
758
|
unmounted(e) {
|
|
620
|
-
let t =
|
|
621
|
-
t?.cancel(), t?.revert(),
|
|
759
|
+
let t = K.get(e);
|
|
760
|
+
t?.cancel(), t?.revert(), K.delete(e);
|
|
622
761
|
}
|
|
623
|
-
},
|
|
762
|
+
}, q = /* @__PURE__ */ new WeakMap(), fe = {
|
|
624
763
|
mounted(e, t) {
|
|
625
|
-
|
|
764
|
+
q.set(e, d(e, t.value ?? {}));
|
|
626
765
|
},
|
|
627
766
|
updated(e, t) {
|
|
628
|
-
t.value !== t.oldValue && (
|
|
767
|
+
t.value !== t.oldValue && (q.get(e)?.revert(), q.set(e, d(e, t.value ?? {})));
|
|
629
768
|
},
|
|
630
769
|
unmounted(e) {
|
|
631
|
-
|
|
770
|
+
q.get(e)?.revert(), q.delete(e);
|
|
632
771
|
}
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
|
|
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];
|
|
636
796
|
return {
|
|
637
797
|
drawable: n,
|
|
638
|
-
animation: t ?
|
|
798
|
+
animation: t ? l(n, t) : void 0
|
|
639
799
|
};
|
|
640
800
|
}
|
|
641
|
-
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
|
+
},
|
|
642
808
|
mounted(e, t) {
|
|
643
|
-
|
|
809
|
+
X.set(e, Z(e, t.value));
|
|
644
810
|
},
|
|
645
811
|
updated(e, t) {
|
|
646
812
|
if (t.value === t.oldValue) return;
|
|
647
|
-
let n =
|
|
648
|
-
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));
|
|
649
815
|
},
|
|
650
816
|
unmounted(e) {
|
|
651
|
-
let t =
|
|
652
|
-
t?.animation?.cancel(), t?.animation?.revert(),
|
|
817
|
+
let t = X.get(e);
|
|
818
|
+
t?.animation?.cancel(), t?.animation?.revert(), X.delete(e);
|
|
653
819
|
}
|
|
654
|
-
},
|
|
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
|
+
},
|
|
655
835
|
mounted(e, t) {
|
|
656
|
-
t.value &&
|
|
657
|
-
animation: _.animate(e, t.value),
|
|
658
|
-
originalStyle: e.style.cssText
|
|
659
|
-
});
|
|
836
|
+
t.value && Q.set(e, _e(e, t.value));
|
|
660
837
|
},
|
|
661
838
|
updated(e, t) {
|
|
662
839
|
if (t.value === t.oldValue) return;
|
|
663
|
-
let n =
|
|
664
|
-
n && (n.animation.cancel(), e.style.cssText = n.originalStyle,
|
|
665
|
-
animation: _.animate(e, t.value),
|
|
666
|
-
originalStyle: e.style.cssText
|
|
667
|
-
});
|
|
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));
|
|
668
842
|
},
|
|
669
843
|
unmounted(e) {
|
|
670
|
-
let t =
|
|
671
|
-
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));
|
|
672
846
|
}
|
|
673
|
-
},
|
|
674
|
-
function
|
|
675
|
-
let { animation:
|
|
676
|
-
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,
|
|
677
851
|
animation: void 0
|
|
678
852
|
};
|
|
679
|
-
if (
|
|
680
|
-
if (
|
|
681
|
-
|
|
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));
|
|
682
856
|
});
|
|
683
857
|
else {
|
|
684
|
-
let
|
|
685
|
-
|
|
858
|
+
let t = a.chars ? o.chars : o.words;
|
|
859
|
+
s.animation = l(t, r), G(e, n);
|
|
686
860
|
}
|
|
687
|
-
}
|
|
688
|
-
return
|
|
861
|
+
} else G(e, n);
|
|
862
|
+
return s;
|
|
689
863
|
}
|
|
690
|
-
function
|
|
864
|
+
function be(e) {
|
|
691
865
|
e.animation?.cancel(), e.splitter.revert();
|
|
692
866
|
}
|
|
693
|
-
var
|
|
694
|
-
|
|
695
|
-
|
|
867
|
+
var xe = {
|
|
868
|
+
getSSRProps(e) {
|
|
869
|
+
return e.value?.ssrHidden ? W({ style: { visibility: "hidden" } }) : {};
|
|
696
870
|
},
|
|
697
|
-
|
|
871
|
+
created() {},
|
|
872
|
+
mounted(e, t, n) {
|
|
873
|
+
$.set(e, ye(e, t.value, n.props));
|
|
874
|
+
},
|
|
875
|
+
updated(e, t, n) {
|
|
698
876
|
if (t.value === t.oldValue) return;
|
|
699
|
-
let
|
|
700
|
-
|
|
877
|
+
let r = $.get(e);
|
|
878
|
+
r && be(r), $.set(e, ye(e, t.value, n.props));
|
|
701
879
|
},
|
|
702
880
|
unmounted(e) {
|
|
703
|
-
let t =
|
|
704
|
-
t &&
|
|
881
|
+
let t = $.get(e);
|
|
882
|
+
t && be(t), $.delete(e);
|
|
705
883
|
}
|
|
706
884
|
};
|
|
707
885
|
//#endregion
|
|
708
|
-
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 };
|
|
709
887
|
|
|
710
888
|
//# sourceMappingURL=index.js.map
|