@juleshry/vue-animejs 1.2.1 → 1.3.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/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
1
  import { computed as e, isRef as t, markRaw as n, shallowReadonly as r, shallowRef as i, toValue as a, unref as o, watch as s } from "vue";
2
- import { animate as c, createAnimatable as l, createDraggable as u, createLayout as d, createScope as f, createTimeline as p, createTimer as m, splitText as h, svg as g, waapi as _ } from "animejs";
3
- import { isClient as v, tryOnMounted as y, tryOnUnmounted as b, unrefElement as x } from "@vueuse/core";
2
+ import { animate as c, createAnimatable as l, createDraggable as u, createLayout as d, createScope as f, createTimeline as p, createTimer as m, onScroll as h, splitText as g, svg as _, waapi as v } from "animejs";
3
+ import { isClient as y, tryOnMounted as b, tryOnUnmounted as x, unrefElement as S } from "@vueuse/core";
4
4
  //#region src/utils/resolve-target.ts
5
- function S(e) {
5
+ function C(e) {
6
6
  if (Array.isArray(e)) {
7
- let t = e.map((e) => x(e)).filter((e) => e != null);
7
+ let t = e.map((e) => S(e)).filter((e) => e != null);
8
8
  return t.length > 0 ? t : void 0;
9
9
  }
10
- return x(e);
10
+ return S(e);
11
11
  }
12
12
  //#endregion
13
13
  //#region src/composables/use-animate.ts
14
- function C(e, a = {}) {
15
- let l = i(), { stop: u } = s([() => S(e), () => o(a)], ([e, t]) => {
14
+ function w(e, a = {}) {
15
+ let l = i(), { stop: u } = s([() => C(e), () => o(a)], ([e, t]) => {
16
16
  d(e, t);
17
17
  }, {
18
18
  flush: "post",
19
- immediate: !t(e) && v
19
+ immediate: !t(e) && y
20
20
  });
21
- b(() => {
22
- u(), x();
21
+ x(() => {
22
+ u(), b();
23
23
  });
24
24
  function d(e, t) {
25
- if (C(), !e) {
25
+ if (S(), !e) {
26
26
  console.warn("Target element is null or undefined"), l.value = void 0;
27
27
  return;
28
28
  }
@@ -46,13 +46,13 @@ function C(e, a = {}) {
46
46
  function _() {
47
47
  return l.value?.resume();
48
48
  }
49
- function y() {
49
+ function v() {
50
50
  return l.value?.complete();
51
51
  }
52
- function x() {
52
+ function b() {
53
53
  return l.value?.cancel();
54
54
  }
55
- function C() {
55
+ function S() {
56
56
  return l.value?.revert();
57
57
  }
58
58
  function w(e) {
@@ -75,9 +75,9 @@ function C(e, a = {}) {
75
75
  restart: h,
76
76
  alternate: g,
77
77
  resume: _,
78
- complete: y,
79
- cancel: x,
80
- revert: C,
78
+ complete: v,
79
+ cancel: b,
80
+ revert: S,
81
81
  reset: w,
82
82
  seek: T,
83
83
  stretch: E,
@@ -86,226 +86,232 @@ function C(e, a = {}) {
86
86
  }
87
87
  //#endregion
88
88
  //#region src/composables/use-raw-animate.ts
89
- function w(e, t = {}) {
90
- let n = S(e);
89
+ function T(e, t = {}) {
90
+ let n = C(e);
91
91
  return n || console.warn("Target is undefined"), c(n, o(t));
92
92
  }
93
93
  //#endregion
94
94
  //#region src/composables/use-timer.ts
95
- function T(e = {}) {
96
- let t = i();
97
- y(() => {
98
- t.value = n(m(o(e)));
95
+ function E(e = {}) {
96
+ let t = i(), a;
97
+ function c(e) {
98
+ e !== a && (a = e, S(), t.value = n(m(e)));
99
+ }
100
+ b(() => {
101
+ c(o(e));
99
102
  });
100
- let { stop: a } = s(() => o(e), (e) => {
101
- v && (_(), t.value = n(m(e)));
103
+ let { stop: l } = s(() => o(e), (e) => {
104
+ y && c(e);
102
105
  }, { deep: 1 });
103
- b(() => {
104
- a(), _();
106
+ x(() => {
107
+ l(), S();
105
108
  });
106
- function c() {
109
+ function u() {
107
110
  return t.value?.play();
108
111
  }
109
- function l() {
112
+ function d() {
110
113
  return t.value?.reverse();
111
114
  }
112
- function u() {
115
+ function f() {
113
116
  return t.value?.pause();
114
117
  }
115
- function d() {
118
+ function p() {
116
119
  return t.value?.restart();
117
120
  }
118
- function f() {
121
+ function h() {
119
122
  return t.value?.alternate();
120
123
  }
121
- function p() {
124
+ function g() {
122
125
  return t.value?.resume();
123
126
  }
124
- function h() {
127
+ function _() {
125
128
  return t.value?.complete();
126
129
  }
127
- function g(e) {
130
+ function v(e) {
128
131
  return t.value?.reset(e);
129
132
  }
130
- function _() {
133
+ function S() {
131
134
  return t.value?.cancel();
132
135
  }
133
- function x() {
136
+ function C() {
134
137
  return t.value?.revert();
135
138
  }
136
- function S(e, n, r) {
139
+ function w(e, n, r) {
137
140
  return t.value?.seek(e, n, r);
138
141
  }
139
- function C(e) {
142
+ function T(e) {
140
143
  return t.value?.stretch(e);
141
144
  }
142
145
  return {
143
146
  timer: r(t),
144
- play: c,
145
- reverse: l,
146
- pause: u,
147
- restart: d,
148
- alternate: f,
149
- resume: p,
150
- complete: h,
151
- reset: g,
152
- cancel: _,
153
- revert: x,
154
- seek: S,
155
- stretch: C
147
+ play: u,
148
+ reverse: d,
149
+ pause: f,
150
+ restart: p,
151
+ alternate: h,
152
+ resume: g,
153
+ complete: _,
154
+ reset: v,
155
+ cancel: S,
156
+ revert: C,
157
+ seek: w,
158
+ stretch: T
156
159
  };
157
160
  }
158
161
  //#endregion
159
162
  //#region src/composables/use-timeline.ts
160
- function E(e = {}) {
161
- let t = !1, c = [], l = i();
162
- function u() {
163
- for (let e of c) e.type === "add" ? l.value?.add(S(e.targets), a(e.params), e.position) : e.type === "set" ? l.value?.set(S(e.targets), a(e.params), e.position) : l.value?.call(e.callback, e.position);
163
+ function D(e = {}) {
164
+ let t = !1, c, l = [], u = i();
165
+ function d() {
166
+ for (let e of l) e.type === "add" ? u.value?.add(C(e.targets), a(e.params), e.position) : e.type === "set" ? u.value?.set(C(e.targets), a(e.params), e.position) : u.value?.call(e.callback, e.position);
167
+ }
168
+ function f(e) {
169
+ e !== c && (c = e, F(), u.value = n(p(e)), d());
164
170
  }
165
- let { stop: d } = s(() => o(e), (e) => {
166
- v && (N(), l.value = n(p(e)), u());
171
+ let { stop: m } = s(() => o(e), (e) => {
172
+ y && f(e);
167
173
  }, {
168
174
  flush: "post",
169
175
  deep: 1
170
176
  });
171
- y(() => {
172
- l.value = n(p(o(e))), t = !0, u();
173
- }), b(() => {
174
- d(), M();
177
+ b(() => {
178
+ f(o(e)), t = !0;
179
+ }), x(() => {
180
+ m(), P();
175
181
  });
176
- function f(e, n, r) {
177
- return c.push({
182
+ function h(e, n, r) {
183
+ return l.push({
178
184
  type: "add",
179
185
  targets: e,
180
186
  params: n,
181
187
  position: r
182
188
  }), t ? {
183
- ...l.value?.add(S(e), a(n), r),
184
- add: f,
185
- set: m,
186
- remove: h
189
+ ...u.value?.add(C(e), a(n), r),
190
+ add: h,
191
+ set: g,
192
+ remove: _
187
193
  } : {
188
- ...l.value,
189
- add: f,
190
- set: m,
191
- remove: h
194
+ ...u.value,
195
+ add: h,
196
+ set: g,
197
+ remove: _
192
198
  };
193
199
  }
194
- function m(e, n, r) {
195
- return c.push({
200
+ function g(e, n, r) {
201
+ return l.push({
196
202
  type: "set",
197
203
  targets: e,
198
204
  params: n,
199
205
  position: r
200
206
  }), t ? {
201
- ...l.value?.set(S(e), a(n), r),
202
- add: f,
203
- set: m,
204
- remove: h
207
+ ...u.value?.set(C(e), a(n), r),
208
+ add: h,
209
+ set: g,
210
+ remove: _
205
211
  } : {
206
- ...l.value,
207
- add: f,
208
- set: m,
209
- remove: h
212
+ ...u.value,
213
+ add: h,
214
+ set: g,
215
+ remove: _
210
216
  };
211
217
  }
212
- function h(e, n) {
218
+ function _(e, n) {
213
219
  return t ? {
214
- ...l.value?.remove(S(e), n),
215
- add: f,
216
- set: m,
217
- remove: h
220
+ ...u.value?.remove(C(e), n),
221
+ add: h,
222
+ set: g,
223
+ remove: _
218
224
  } : (console.warn("Cannot remove from timeline before mount"), {
219
- ...l.value,
220
- add: f,
221
- set: m,
222
- remove: h
225
+ ...u.value,
226
+ add: h,
227
+ set: g,
228
+ remove: _
223
229
  });
224
230
  }
225
- function g(e, t) {
226
- return l.value?.sync(e, t);
231
+ function v(e, t) {
232
+ return u.value?.sync(e, t);
227
233
  }
228
- function _(e, t) {
229
- return l.value?.label(e, t);
234
+ function S(e, t) {
235
+ return u.value?.label(e, t);
230
236
  }
231
- function x(e, t) {
232
- return c.push({
237
+ function w(e, t) {
238
+ return l.push({
233
239
  type: "call",
234
240
  callback: e,
235
241
  position: t
236
- }), l.value?.call(e, t);
242
+ }), u.value?.call(e, t);
237
243
  }
238
- function C(e) {
239
- return l.value?.init(e);
240
- }
241
- function w() {
242
- return l.value?.play();
243
- }
244
- function T() {
245
- return l.value?.reverse();
244
+ function T(e) {
245
+ return u.value?.init(e);
246
246
  }
247
247
  function E() {
248
- return l.value?.pause();
248
+ return u.value?.play();
249
249
  }
250
250
  function D() {
251
- return l.value?.restart();
251
+ return u.value?.reverse();
252
252
  }
253
253
  function O() {
254
- return l.value?.alternate();
254
+ return u.value?.pause();
255
255
  }
256
256
  function k() {
257
- return l.value?.resume();
257
+ return u.value?.restart();
258
258
  }
259
259
  function A() {
260
- return l.value?.complete();
260
+ return u.value?.alternate();
261
261
  }
262
- function j(e) {
263
- return l.value?.reset(e);
262
+ function j() {
263
+ return u.value?.resume();
264
264
  }
265
265
  function M() {
266
- return l.value?.cancel();
266
+ return u.value?.complete();
267
267
  }
268
- function N() {
269
- return l.value?.revert();
268
+ function N(e) {
269
+ return u.value?.reset(e);
270
270
  }
271
- function P(e, t, n) {
272
- return l.value?.seek(e, t, n);
271
+ function P() {
272
+ return u.value?.cancel();
273
273
  }
274
- function F(e) {
275
- return l.value?.stretch(e);
274
+ function F() {
275
+ return u.value?.revert();
276
276
  }
277
- function I() {
278
- return l.value?.refresh();
277
+ function I(e, t, n) {
278
+ return u.value?.seek(e, t, n);
279
+ }
280
+ function L(e) {
281
+ return u.value?.stretch(e);
282
+ }
283
+ function R() {
284
+ return u.value?.refresh();
279
285
  }
280
286
  return {
281
- timeline: r(l),
282
- add: f,
283
- set: m,
284
- sync: g,
285
- label: _,
286
- remove: h,
287
- call: x,
288
- init: C,
289
- play: w,
290
- reverse: T,
291
- pause: E,
292
- restart: D,
293
- alternate: O,
294
- resume: k,
295
- complete: A,
296
- reset: j,
297
- cancel: M,
298
- revert: N,
299
- seek: P,
300
- stretch: F,
301
- refresh: I
287
+ timeline: r(u),
288
+ add: h,
289
+ set: g,
290
+ sync: v,
291
+ label: S,
292
+ remove: _,
293
+ call: w,
294
+ init: T,
295
+ play: E,
296
+ reverse: D,
297
+ pause: O,
298
+ restart: k,
299
+ alternate: A,
300
+ resume: j,
301
+ complete: M,
302
+ reset: N,
303
+ cancel: P,
304
+ revert: F,
305
+ seek: I,
306
+ stretch: L,
307
+ refresh: R
302
308
  };
303
309
  }
304
310
  //#endregion
305
311
  //#region src/composables/use-animatable.ts
306
- function D(a, c = {}) {
312
+ function O(a, c = {}) {
307
313
  let u = i(), d = e(() => ({
308
- el: S(a),
314
+ el: C(a),
309
315
  opt: o(c)
310
316
  })), { stop: f } = s(d, ({ el: e, opt: t }) => {
311
317
  if (p(), !e) {
@@ -315,9 +321,9 @@ function D(a, c = {}) {
315
321
  u.value = n(l(e, t));
316
322
  }, {
317
323
  flush: "post",
318
- immediate: !t(a) && v
324
+ immediate: !t(a) && y
319
325
  });
320
- b(() => {
326
+ x(() => {
321
327
  f(), p();
322
328
  });
323
329
  function p() {
@@ -330,25 +336,25 @@ function D(a, c = {}) {
330
336
  }
331
337
  //#endregion
332
338
  //#region src/composables/use-raw-animatable.ts
333
- function O(e, t = {}) {
334
- let n = S(e);
339
+ function k(e, t = {}) {
340
+ let n = C(e);
335
341
  return n || console.warn("Targets element is null or undefined"), l(n, o(t));
336
342
  }
337
343
  //#endregion
338
344
  //#region src/composables/use-draggable.ts
339
- function k(e, a = {}) {
340
- let c = i(), { stop: l } = s([() => S(e), () => o(a)], ([e, t]) => {
341
- if (x(), !e) {
345
+ function A(e, a = {}) {
346
+ let c = i(), { stop: l } = s([() => C(e), () => o(a)], ([e, t]) => {
347
+ if (b(), !e) {
342
348
  console.warn("Targets element is null or undefined"), c.value = void 0;
343
349
  return;
344
350
  }
345
351
  c.value = n(u(e, t));
346
352
  }, {
347
353
  flush: "post",
348
- immediate: !t(e) && v
354
+ immediate: !t(e) && y
349
355
  });
350
- b(() => {
351
- x(), l();
356
+ x(() => {
357
+ b(), l();
352
358
  });
353
359
  function d() {
354
360
  return c.value?.disable();
@@ -371,13 +377,13 @@ function k(e, a = {}) {
371
377
  function _() {
372
378
  return c.value?.stop();
373
379
  }
374
- function y() {
380
+ function v() {
375
381
  return c.value?.reset();
376
382
  }
377
- function x() {
383
+ function b() {
378
384
  return c.value?.revert();
379
385
  }
380
- function C() {
386
+ function S() {
381
387
  return c.value?.refresh();
382
388
  }
383
389
  return {
@@ -389,15 +395,15 @@ function k(e, a = {}) {
389
395
  animateInView: h,
390
396
  scrollInView: g,
391
397
  stop: _,
392
- reset: y,
393
- revert: x,
394
- refresh: C
398
+ reset: v,
399
+ revert: b,
400
+ refresh: S
395
401
  };
396
402
  }
397
403
  //#endregion
398
404
  //#region src/composables/use-layout.ts
399
- function A(e, a = {}) {
400
- let c = i(), { stop: l } = s([() => S(e), () => o(a)], ([e, t]) => {
405
+ function j(e, a = {}) {
406
+ let c = i(), { stop: l } = s([() => C(e), () => o(a)], ([e, t]) => {
401
407
  if (m(), !e) {
402
408
  console.warn("Target element is null or undefined"), c.value = void 0;
403
409
  return;
@@ -405,9 +411,9 @@ function A(e, a = {}) {
405
411
  c.value = n(d(e, t));
406
412
  }, {
407
413
  flush: "post",
408
- immediate: !t(e) && v
414
+ immediate: !t(e) && y
409
415
  });
410
- b(() => {
416
+ x(() => {
411
417
  m(), l();
412
418
  });
413
419
  function u() {
@@ -431,17 +437,56 @@ function A(e, a = {}) {
431
437
  };
432
438
  }
433
439
  //#endregion
440
+ //#region src/composables/use-scroll.ts
441
+ function M(t, r, i = {}) {
442
+ let a, s = e(() => {
443
+ if (a?.revert(), a = void 0, !y) return;
444
+ let e = C(t), s = C(r);
445
+ if (e && s) return a = n(h({
446
+ ...o(i),
447
+ container: e,
448
+ target: s
449
+ })), a;
450
+ }), c = e(() => s.value ?? !1), l = e(() => ({ autoplay: c.value }));
451
+ x(() => a?.revert());
452
+ function u() {
453
+ return s.value?.refresh();
454
+ }
455
+ function d() {
456
+ return s.value?.revert();
457
+ }
458
+ function f() {
459
+ s.value?.debug();
460
+ }
461
+ function p() {
462
+ return s.value?.removeDebug();
463
+ }
464
+ function m(e) {
465
+ return s.value?.link(e);
466
+ }
467
+ return {
468
+ observer: s,
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
434
479
  //#region src/composables/use-svg.ts
435
- function j() {
480
+ function N() {
436
481
  function e(e, t) {
437
482
  return (n, r, i, a) => {
438
483
  let s = o(e);
439
- return s ? g.morphTo(s, o(t))(n, r, i, a) : "";
484
+ return s ? _.morphTo(s, o(t))(n, r, i, a) : "";
440
485
  };
441
486
  }
442
487
  function t(e, t) {
443
488
  let n = o(e) ?? "";
444
- return g.createMotionPath(n, o(t));
489
+ return _.createMotionPath(n, o(t));
445
490
  }
446
491
  return {
447
492
  morphTo: e,
@@ -450,37 +495,37 @@ function j() {
450
495
  }
451
496
  //#endregion
452
497
  //#region src/composables/use-svg-drawable.ts
453
- function M(e, a = 0, c = 0) {
454
- let l = i(), { stop: u } = s(() => S(e), (e) => {
498
+ function P(e, a = 0, c = 0) {
499
+ let l = i(), { stop: u } = s(() => C(e), (e) => {
455
500
  if (l.value = void 0, !e) {
456
501
  console.warn("[useSvgDrawable] Target element is null or undefined");
457
502
  return;
458
503
  }
459
- l.value = n(g.createDrawable(e, o(a), o(c))[0]);
504
+ l.value = n(_.createDrawable(e, o(a), o(c))[0]);
460
505
  }, {
461
506
  flush: "post",
462
- immediate: !t(e) && v
507
+ immediate: !t(e) && y
463
508
  });
464
- return b(() => {
509
+ return x(() => {
465
510
  u(), l.value = void 0;
466
511
  }), { drawable: r(l) };
467
512
  }
468
513
  //#endregion
469
514
  //#region src/composables/use-text.ts
470
- function N(a, c) {
471
- let l = i(), u = e(() => l.value?.lines ?? []), d = e(() => l.value?.words ?? []), f = e(() => l.value?.chars ?? []), { stop: p } = s([() => S(a), () => o(c)], ([e, t]) => {
472
- m(), l.value = void 0, e && (l.value = n(h(e, t)));
515
+ function F(a, c) {
516
+ let l = i(), u = e(() => l.value?.lines ?? []), d = e(() => l.value?.words ?? []), f = e(() => l.value?.chars ?? []), { stop: p } = s([() => C(a), () => o(c)], ([e, t]) => {
517
+ m(), l.value = void 0, e && (l.value = n(g(e, t)));
473
518
  }, {
474
519
  flush: "post",
475
- immediate: !t(a) && v
520
+ immediate: !t(a) && y
476
521
  });
477
- b(() => {
522
+ x(() => {
478
523
  p(), l.value = void 0, m();
479
524
  });
480
525
  function m() {
481
526
  l.value?.revert();
482
527
  }
483
- function g() {
528
+ function h() {
484
529
  l.value?.refresh();
485
530
  }
486
531
  return {
@@ -489,19 +534,19 @@ function N(a, c) {
489
534
  words: d,
490
535
  chars: f,
491
536
  revert: m,
492
- refresh: g
537
+ refresh: h
493
538
  };
494
539
  }
495
540
  //#endregion
496
541
  //#region src/composables/use-waapi.ts
497
- function P(e, a = {}) {
498
- let c = i(), { stop: l } = s([() => S(e), () => o(a)], ([e, t]) => {
499
- c.value = n(_.animate(e, t));
542
+ function I(e, a = {}) {
543
+ let c = i(), { stop: l } = s([() => C(e), () => o(a)], ([e, t]) => {
544
+ c.value = n(v.animate(e, t));
500
545
  }, {
501
546
  flush: "post",
502
- immediate: !t(e) && v
547
+ immediate: !t(e) && y
503
548
  });
504
- b(() => {
549
+ x(() => {
505
550
  l();
506
551
  });
507
552
  function u() {
@@ -525,13 +570,13 @@ function P(e, a = {}) {
525
570
  function g() {
526
571
  return c.value?.restart();
527
572
  }
528
- function y() {
573
+ function _() {
529
574
  return c.value?.commitStyles();
530
575
  }
531
- function x() {
576
+ function b() {
532
577
  return c.value?.complete();
533
578
  }
534
- function C() {
579
+ function S() {
535
580
  return c.value?.cancel();
536
581
  }
537
582
  function w() {
@@ -546,21 +591,21 @@ function P(e, a = {}) {
546
591
  reverse: m,
547
592
  seek: h,
548
593
  restart: g,
549
- commitStyles: y,
550
- complete: x,
551
- cancel: C,
594
+ commitStyles: _,
595
+ complete: b,
596
+ cancel: S,
552
597
  revert: w,
553
- convertEase: F
598
+ convertEase: L
554
599
  };
555
600
  }
556
- function F(e, t = 100) {
557
- return _.convertEase(o(e), o(t));
601
+ function L(e, t = 100) {
602
+ return v.convertEase(o(e), o(t));
558
603
  }
559
604
  //#endregion
560
605
  //#region src/composables/use-scope.ts
561
- function I(e) {
606
+ function R(e) {
562
607
  let a = i(void 0), c = [], l = [], u = [], d = !1, p;
563
- y(() => {
608
+ b(() => {
564
609
  d = !0, a.value = n(f(o(e)));
565
610
  for (let e of c) a.value.add(e);
566
611
  for (let [e, t] of l) a.value.add(e, t);
@@ -568,7 +613,7 @@ function I(e) {
568
613
  c.length = 0, l.length = 0, u.length = 0, t(e) && (p = s(e, (e) => {
569
614
  a.value?.revert(), a.value = n(f(e));
570
615
  }, { flush: "post" }));
571
- }), b(() => {
616
+ }), x(() => {
572
617
  a.value?.revert(), p?.();
573
618
  });
574
619
  function m(e) {
@@ -586,7 +631,7 @@ function I(e) {
586
631
  function v() {
587
632
  return a.value?.revert();
588
633
  }
589
- function x() {
634
+ function y() {
590
635
  return a.value?.refresh();
591
636
  }
592
637
  return {
@@ -596,83 +641,83 @@ function I(e) {
596
641
  addOnce: g,
597
642
  keepTime: _,
598
643
  revert: v,
599
- refresh: x
644
+ refresh: y
600
645
  };
601
646
  }
602
647
  //#endregion
603
648
  //#region src/directives/v-animate.ts
604
- var L = /* @__PURE__ */ new WeakMap(), R = {
649
+ var z = /* @__PURE__ */ new WeakMap(), B = {
605
650
  mounted(e, t) {
606
- t.value && L.set(e, c(e, t.value));
651
+ t.value && z.set(e, c(e, t.value));
607
652
  },
608
653
  updated(e, t) {
609
654
  if (t.value === t.oldValue) return;
610
- let n = L.get(e);
611
- n?.cancel(), n?.revert(), t.value && L.set(e, c(e, t.value));
655
+ let n = z.get(e);
656
+ n?.cancel(), n?.revert(), t.value && z.set(e, c(e, t.value));
612
657
  },
613
658
  unmounted(e) {
614
- let t = L.get(e);
615
- t?.cancel(), t?.revert(), L.delete(e);
659
+ let t = z.get(e);
660
+ t?.cancel(), t?.revert(), z.delete(e);
616
661
  }
617
- }, z = /* @__PURE__ */ new WeakMap(), B = {
662
+ }, V = /* @__PURE__ */ new WeakMap(), H = {
618
663
  mounted(e, t) {
619
- z.set(e, u(e, t.value ?? {}));
664
+ V.set(e, u(e, t.value ?? {}));
620
665
  },
621
666
  updated(e, t) {
622
- t.value !== t.oldValue && (z.get(e)?.revert(), z.set(e, u(e, t.value ?? {})));
667
+ t.value !== t.oldValue && (V.get(e)?.revert(), V.set(e, u(e, t.value ?? {})));
623
668
  },
624
669
  unmounted(e) {
625
- z.get(e)?.revert(), z.delete(e);
670
+ V.get(e)?.revert(), V.delete(e);
626
671
  }
627
- }, V = /* @__PURE__ */ new WeakMap();
628
- function H(e, t) {
629
- let n = g.createDrawable(e)[0];
672
+ }, U = /* @__PURE__ */ new WeakMap();
673
+ function W(e, t) {
674
+ let n = _.createDrawable(e)[0];
630
675
  return {
631
676
  drawable: n,
632
677
  animation: t ? c(n, t) : void 0
633
678
  };
634
679
  }
635
- var U = {
680
+ var G = {
636
681
  mounted(e, t) {
637
- V.set(e, H(e, t.value));
682
+ U.set(e, W(e, t.value));
638
683
  },
639
684
  updated(e, t) {
640
685
  if (t.value === t.oldValue) return;
641
- let n = V.get(e);
642
- n?.animation?.cancel(), n?.animation?.revert(), V.set(e, H(e, t.value));
686
+ let n = U.get(e);
687
+ n?.animation?.cancel(), n?.animation?.revert(), U.set(e, W(e, t.value));
643
688
  },
644
689
  unmounted(e) {
645
- let t = V.get(e);
646
- t?.animation?.cancel(), t?.animation?.revert(), V.delete(e);
690
+ let t = U.get(e);
691
+ t?.animation?.cancel(), t?.animation?.revert(), U.delete(e);
647
692
  }
648
- }, W = /* @__PURE__ */ new WeakMap(), G = {
693
+ }, K = /* @__PURE__ */ new WeakMap(), q = {
649
694
  mounted(e, t) {
650
- t.value && W.set(e, {
651
- animation: _.animate(e, t.value),
695
+ t.value && K.set(e, {
696
+ animation: v.animate(e, t.value),
652
697
  originalStyle: e.style.cssText
653
698
  });
654
699
  },
655
700
  updated(e, t) {
656
701
  if (t.value === t.oldValue) return;
657
- let n = W.get(e);
658
- n && (n.animation.cancel(), e.style.cssText = n.originalStyle, W.delete(e)), t.value && W.set(e, {
659
- animation: _.animate(e, t.value),
702
+ let n = K.get(e);
703
+ n && (n.animation.cancel(), e.style.cssText = n.originalStyle, K.delete(e)), t.value && K.set(e, {
704
+ animation: v.animate(e, t.value),
660
705
  originalStyle: e.style.cssText
661
706
  });
662
707
  },
663
708
  unmounted(e) {
664
- let t = W.get(e);
665
- t && (t.animation.cancel(), e.style.cssText = t.originalStyle, W.delete(e));
709
+ let t = K.get(e);
710
+ t && (t.animation.cancel(), e.style.cssText = t.originalStyle, K.delete(e));
666
711
  }
667
- }, K = /* @__PURE__ */ new WeakMap();
668
- function q(e, t) {
669
- let { animation: n, ...r } = t ?? {}, i = h(e, r), a = {
712
+ }, J = /* @__PURE__ */ new WeakMap();
713
+ function Y(e, t) {
714
+ let { animation: n, ...r } = t ?? {}, i = g(e, r), a = {
670
715
  splitter: i,
671
716
  animation: void 0
672
717
  };
673
718
  if (n) {
674
719
  if (r.lines) (document.fonts?.ready ?? Promise.resolve()).then(() => {
675
- K.get(e) === a && (a.animation = c(i.lines, n));
720
+ J.get(e) === a && (a.animation = c(i.lines, n));
676
721
  });
677
722
  else {
678
723
  let e = r.chars ? i.chars : i.words;
@@ -681,24 +726,24 @@ function q(e, t) {
681
726
  }
682
727
  return a;
683
728
  }
684
- function J(e) {
729
+ function X(e) {
685
730
  e.animation?.cancel(), e.splitter.revert();
686
731
  }
687
- var Y = {
732
+ var Z = {
688
733
  mounted(e, t) {
689
- K.set(e, q(e, t.value));
734
+ J.set(e, Y(e, t.value));
690
735
  },
691
736
  updated(e, t) {
692
737
  if (t.value === t.oldValue) return;
693
- let n = K.get(e);
694
- n && J(n), K.set(e, q(e, t.value));
738
+ let n = J.get(e);
739
+ n && X(n), J.set(e, Y(e, t.value));
695
740
  },
696
741
  unmounted(e) {
697
- let t = K.get(e);
698
- t && J(t), K.delete(e);
742
+ let t = J.get(e);
743
+ t && X(t), J.delete(e);
699
744
  }
700
745
  };
701
746
  //#endregion
702
- export { D as useAnimatable, C as useAnimate, k as useDraggable, A as useLayout, O as useRawAnimatable, w as useRawAnimate, I as useScope, j as useSvg, M as useSvgDrawable, N as useText, E as useTimeline, T as useTimer, P as useWaapi, R as vAnimate, B as vDraggable, U as vSvgDrawable, Y as vTextSplit, G as vWaapi };
747
+ export { O as useAnimatable, w as useAnimate, A as useDraggable, j as useLayout, k as useRawAnimatable, T as useRawAnimate, R as useScope, M as useScroll, N as useSvg, P as useSvgDrawable, F as useText, D as useTimeline, E as useTimer, I as useWaapi, B as vAnimate, H as vDraggable, G as vSvgDrawable, Z as vTextSplit, q as vWaapi };
703
748
 
704
749
  //# sourceMappingURL=index.js.map