@juleshry/vue-animejs 0.1.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/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2025-present Jules Hery
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,304 @@
1
+ <div align="center">
2
+ <img src="./docs/src/public/icon.png" alt="vue-animejs" width="120" />
3
+
4
+ <h1 align="center">vue-animejs</h1>
5
+ <p align="center">Vue 3 composables for <a href="https://animejs.com/">Anime.js</a> v4 — reactive animations that integrate naturally with Vue's reactivity system and component lifecycle.</p>
6
+ </div>
7
+
8
+ > [!WARNING]
9
+ > This library is a work in progress. The API is not stable and may change at any time.
10
+
11
+ ## 🚀 Overview
12
+
13
+ **vue-animejs** wraps Anime.js v4 as idiomatic Vue 3 composables. It integrates with Vue's reactivity system — pass a `ref` as a target or option and the animation updates automatically. Lifecycle cleanup is handled for you.
14
+
15
+ **Before** — raw Anime.js in a Vue component:
16
+
17
+ ```vue
18
+ <script setup lang="ts">
19
+ import { useTemplateRef, onMounted, onUnmounted } from 'vue'
20
+ import { animate } from 'animejs'
21
+
22
+ const el = useTemplateRef<HTMLElement>('el')
23
+ let animation
24
+
25
+ onMounted(() => {
26
+ if (!el.value) {
27
+ console.warn('Targets element is null or undefined')
28
+ return
29
+ }
30
+
31
+ animation = animate(el.value, { translateX: 250, duration: 800 })
32
+ })
33
+
34
+ onUnmounted(() => {
35
+ animation?.cancel()
36
+ })
37
+ </script>
38
+
39
+ <template>
40
+ <div ref="el" />
41
+ </template>
42
+ ```
43
+
44
+ **After** — with vue-animejs:
45
+
46
+ ```vue
47
+ <script setup lang="ts">
48
+ import { useTemplateRef } from 'vue'
49
+ import { useAnimate } from '@juleshry/vue-animejs'
50
+
51
+ const el = useTemplateRef<HTMLElement>('el')
52
+
53
+ useAnimate(el, { translateX: 250, duration: 800 })
54
+ </script>
55
+
56
+ <template>
57
+ <div ref="el" />
58
+ </template>
59
+ ```
60
+
61
+ ## 📦 Requirements
62
+
63
+ - Vue 3.5+
64
+ - Anime.js 4+
65
+ - @vueuse/core 14+
66
+
67
+ ## 🦄 Composables
68
+
69
+ | Composable | Description |
70
+ |-----------------|---------------------------------------------------|
71
+ | `useAnimate` | Animate a DOM target with reactive params |
72
+ | `useTimer` | Drive a timer with full playback control |
73
+ | `useTimeline` | Sequence multiple animations on a shared timeline |
74
+ | `useAnimatable` | Create a reactive animatable object |
75
+ | `useDraggable` | Make a DOM element draggable with full control |
76
+ | `useLayout` | Animate DOM layout changes (reorder, add, remove) |
77
+ | `useScope` | Create an Anime.js scope with lifecycle management |
78
+ | `useText` | Split text into animatable lines, words, and chars |
79
+
80
+ ## 🚀 Usage
81
+
82
+ ### `useAnimate`
83
+
84
+ ```vue
85
+ <script setup lang="ts">
86
+ import { useTemplateRef } from 'vue'
87
+ import { useAnimate } from '@juleshry/vue-animejs'
88
+
89
+ const el = useTemplateRef<HTMLElement>('el')
90
+
91
+ const { play, pause } = useAnimate(el, {
92
+ translateX: 250,
93
+ duration: 800,
94
+ easing: 'easeInOutQuad',
95
+ })
96
+ </script>
97
+
98
+ <template>
99
+ <div ref="el" />
100
+ <button @click="play">Play</button>
101
+ <button @click="pause">Pause</button>
102
+ </template>
103
+ ```
104
+
105
+ ### `useTimer`
106
+
107
+ ```vue
108
+ <script setup lang="ts">
109
+ import { useTimer } from '@juleshry/vue-animejs'
110
+
111
+ const { play, pause } = useTimer({
112
+ duration: 3000,
113
+ onUpdate: (self) => console.log(self.currentTime),
114
+ })
115
+ </script>
116
+ ```
117
+
118
+ ### `useTimeline`
119
+
120
+ ```vue
121
+ <script setup lang="ts">
122
+ import { useTemplateRef } from 'vue'
123
+ import { useTimeline } from '@juleshry/vue-animejs'
124
+
125
+ const box = useTemplateRef<HTMLElement>('box')
126
+
127
+ const { add, play } = useTimeline({ loop: true })
128
+
129
+ add(box, { translateX: 100 })
130
+ add(box, { translateY: 50 }, '+=200')
131
+ play()
132
+ </script>
133
+ ```
134
+
135
+ ### `useAnimatable`
136
+
137
+ ```vue
138
+ <script setup lang="ts">
139
+ import { useTemplateRef } from 'vue'
140
+ import { useAnimatable } from '@juleshry/vue-animejs'
141
+
142
+ const el = useTemplateRef<HTMLElement>('el')
143
+
144
+ const { animatable } = useAnimatable(el, {
145
+ x: 0,
146
+ opacity: 1,
147
+ })
148
+ </script>
149
+ ```
150
+
151
+ ### `useDraggable`
152
+
153
+ ```vue
154
+ <script setup lang="ts">
155
+ import { useTemplateRef } from 'vue'
156
+ import { useDraggable } from '@juleshry/vue-animejs'
157
+
158
+ const el = useTemplateRef<HTMLElement>('el')
159
+
160
+ const { disable, enable } = useDraggable(el, {
161
+ onGrab: () => console.log('grabbed'),
162
+ onDrag: () => console.log('dragging'),
163
+ onRelease: () => console.log('released'),
164
+ })
165
+ </script>
166
+
167
+ <template>
168
+ <div ref="el" />
169
+ <button @click="disable">Disable</button>
170
+ <button @click="enable">Enable</button>
171
+ </template>
172
+ ```
173
+
174
+ ### `useLayout`
175
+
176
+ > **Note:** Vue's DOM updates are asynchronous. Use `await nextTick()` between the state change and `animate()` so Anime.js reads the updated positions.
177
+
178
+ ```vue
179
+ <script setup lang="ts">
180
+ import { nextTick, ref, useTemplateRef } from 'vue'
181
+ import { useLayout } from '@juleshry/vue-animejs'
182
+
183
+ const list = useTemplateRef<HTMLElement>('list')
184
+ const { record, animate } = useLayout(list, {})
185
+
186
+ const items = ref([1, 2, 3, 4, 5])
187
+
188
+ async function shuffle() {
189
+ record()
190
+ items.value = [...items.value].sort(() => Math.random() - 0.5)
191
+ await nextTick()
192
+ animate({ duration: 600 })
193
+ }
194
+ </script>
195
+
196
+ <template>
197
+ <ul ref="list">
198
+ <li v-for="item in items" :key="item">{{ item }}</li>
199
+ </ul>
200
+ <button @click="shuffle">Shuffle</button>
201
+ </template>
202
+ ```
203
+
204
+ When you mutate the DOM directly with `classList.toggle`, the change is synchronous — no `nextTick` needed:
205
+
206
+ ```vue
207
+ <script setup lang="ts">
208
+ import { useTemplateRef } from 'vue'
209
+ import { useLayout } from '@juleshry/vue-animejs'
210
+
211
+ const container = useTemplateRef<HTMLElement>('container')
212
+ const { update } = useLayout(container, {})
213
+
214
+ function toggleLayout() {
215
+ update(() => {
216
+ container.value!.classList.toggle('grid')
217
+ }, { duration: 600 })
218
+ }
219
+ </script>
220
+
221
+ <template>
222
+ <div ref="container" class="grid">
223
+ <div v-for="i in 6" :key="i" class="item" />
224
+ </div>
225
+ <button @click="toggleLayout">Toggle layout</button>
226
+ </template>
227
+ ```
228
+
229
+ ### `useScope`
230
+
231
+ ```vue
232
+ <script setup lang="ts">
233
+ import { useTemplateRef } from 'vue'
234
+ import { useAnimate, useScope } from '@juleshry/vue-animejs'
235
+
236
+ const el = useTemplateRef<HTMLElement>('el')
237
+
238
+ const { add, revert } = useScope({ mediaQuery: '(prefers-reduced-motion: no-preference)' })
239
+
240
+ // Animations added via add() are automatically reverted when the scope reverts
241
+ // or when the component unmounts
242
+ add(scope => {
243
+ useAnimate(el, { translateX: 250, duration: 800 })
244
+ })
245
+ </script>
246
+
247
+ <template>
248
+ <div ref="el" />
249
+ <button @click="revert">Revert</button>
250
+ </template>
251
+ ```
252
+
253
+ ### `useText`
254
+
255
+ > **Note:** `words`, `chars`, and `lines` are `ComputedRef<HTMLElement[]>` — they populate after mount and can be passed directly to `useAnimate`.
256
+
257
+ ```vue
258
+ <script setup lang="ts">
259
+ import { useTemplateRef } from 'vue'
260
+ import { useAnimate, useText } from '@juleshry/vue-animejs'
261
+ import { stagger } from 'animejs'
262
+
263
+ const el = useTemplateRef<HTMLElement>('el')
264
+
265
+ const { words, chars } = useText(el, { words: true, chars: true })
266
+
267
+ // words and chars are ComputedRef<HTMLElement[]> — pass them directly as targets
268
+ useAnimate(words, {
269
+ y: ['100%', '0%'],
270
+ duration: 600,
271
+ delay: stagger(50),
272
+ })
273
+ </script>
274
+
275
+ <template>
276
+ <p ref="el">Hello, world!</p>
277
+ </template>
278
+ ```
279
+
280
+ ## 👨‍🚀 Contributors
281
+
282
+ <a href="https://github.com/juleshry/vue-animejs/graphs/contributors">
283
+ <img src="https://contrib.rocks/image?repo=juleshry/vue-animejs" alt="Contributors" />
284
+ </a>
285
+
286
+ ## 🌸 Thanks
287
+
288
+ - [Anime.js](https://animejs.com/) by [Julian Garnier](https://github.com/juliangarnier) — the animation engine powering this library
289
+ - [VueUse](https://vueuse.org/) by [Anthony Fu](https://github.com/antfu) — inspiration for composable conventions and element ref patterns
290
+
291
+ ## 🧱 Contributing
292
+
293
+ See the [Contributing Guide](./CONTRIBUTING.md).
294
+
295
+ ## 🗺️ TODO
296
+
297
+ - [ ] Allow reactive refs inside option objects
298
+ - [ ] Publish the first version to `npm`
299
+ - [ ] Write Doc
300
+ - [ ] Deploy the docs website
301
+
302
+ ## 📄 License
303
+
304
+ [MIT](./LICENSE.md) © 2025-present [Jules Hery](https://github.com/juleshry)
@@ -0,0 +1,7 @@
1
+ import { type AnimatableObject, type AnimatableParams, type TargetsParam } from "animejs";
2
+ import { type DeepReadonly, type MaybeRef, type ShallowRef } from "vue";
3
+ export interface UseAnimatableReturn {
4
+ animatable: DeepReadonly<ShallowRef<AnimatableObject | undefined>>;
5
+ revert: () => AnimatableObject | undefined;
6
+ }
7
+ export declare function useAnimatable(targets: MaybeRef<TargetsParam>, options?: MaybeRef<AnimatableParams>): UseAnimatableReturn;
@@ -0,0 +1,40 @@
1
+ import { type DeepReadonly, type MaybeRef, type ShallowRef } from "vue";
2
+ import { type JSAnimation, type TargetSelector, type AnimationParams } from "animejs";
3
+ import { type MaybeComputedElementRef } from "@vueuse/core";
4
+ export interface UseAnimateReturn {
5
+ /** The underlying Anime.js animation instance. `undefined` until the target is available. */
6
+ animation: DeepReadonly<ShallowRef<JSAnimation | undefined>>;
7
+ /** Starts or resumes the animation. */
8
+ play: () => JSAnimation | undefined;
9
+ /** Reverses playback direction. */
10
+ reverse: () => JSAnimation | undefined;
11
+ /** Pauses the animation at the current position. */
12
+ pause: () => JSAnimation | undefined;
13
+ /** Restarts the animation from the beginning. */
14
+ restart: () => JSAnimation | undefined;
15
+ /** Toggles between forward and reverse direction. */
16
+ alternate: () => JSAnimation | undefined;
17
+ /** Resumes from a paused state. */
18
+ resume: () => JSAnimation | undefined;
19
+ /** Jumps immediately to the end of the animation. */
20
+ complete: () => JSAnimation | undefined;
21
+ /** Stops the animation and removes it from the Anime.js engine. */
22
+ cancel: () => JSAnimation | undefined;
23
+ /** Cancels the animation and restores all animated properties to their original values. */
24
+ revert: () => JSAnimation | undefined;
25
+ /** Resets the animation to its initial state. Pass `true` for a soft reset that preserves the current cycle. */
26
+ reset: (softReset?: boolean) => JSAnimation | undefined;
27
+ /** Seeks to a specific time (in ms). */
28
+ seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => JSAnimation | undefined;
29
+ /** Rescales the animation to a new total duration. */
30
+ stretch: (newDuration: number) => JSAnimation | undefined;
31
+ /** Re-reads the current values of animated properties from the DOM. */
32
+ refresh: () => JSAnimation | undefined;
33
+ }
34
+ /**
35
+ * Wraps Anime.js `animate()` into a Vue composable. Reactively re-creates the animation when the target or options change, and cancels it automatically on unmount.
36
+ *
37
+ * @param _target - The element(s) to animate. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.
38
+ * @param _options - Anime.js animation parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.
39
+ */
40
+ export declare function useAnimate(_target: MaybeRef<TargetSelector> | MaybeComputedElementRef, _options?: MaybeRef<AnimationParams>): UseAnimateReturn;
@@ -0,0 +1,16 @@
1
+ import { type DeepReadonly, type MaybeRef, type ShallowRef } from "vue";
2
+ import { type Draggable, type DraggableParams, type TargetsParam, type EasingParam } from "animejs";
3
+ export interface UseDraggableReturn {
4
+ draggable: DeepReadonly<ShallowRef<Draggable | undefined>>;
5
+ disable: () => void;
6
+ enable: () => void;
7
+ setX: (x: number, muteUpdateCallback?: boolean) => void;
8
+ setY: (y: number, muteUpdateCallback?: boolean) => void;
9
+ animateInView: (duration?: number, gap?: number, ease?: EasingParam) => void;
10
+ scrollInView: (duration?: number, gap?: number, ease?: EasingParam) => void;
11
+ stop: () => void;
12
+ reset: () => void;
13
+ revert: () => void;
14
+ refresh: () => void;
15
+ }
16
+ export declare function useDraggable(targets: MaybeRef<TargetsParam>, options?: MaybeRef<DraggableParams>): UseDraggableReturn;
@@ -0,0 +1,11 @@
1
+ import { type MaybeComputedElementRef } from "@vueuse/core";
2
+ import { type AutoLayout, type AutoLayoutParams, type DOMTargetSelector, type LayoutAnimationParams, type Timeline } from "animejs";
3
+ import { type DeepReadonly, type MaybeRef, type ShallowRef } from "vue";
4
+ export interface UseLayoutReturn {
5
+ layout: DeepReadonly<ShallowRef<AutoLayout | undefined>>;
6
+ record: () => void;
7
+ animate: (params?: LayoutAnimationParams) => Timeline | undefined;
8
+ update: (callback: (layout: AutoLayout) => void, params?: LayoutAnimationParams) => void;
9
+ revert: () => void;
10
+ }
11
+ export declare function useLayout(root: MaybeRef<DOMTargetSelector> | MaybeComputedElementRef, params: MaybeRef<AutoLayoutParams>): UseLayoutReturn;
@@ -0,0 +1,6 @@
1
+ import { AnimationParams, TargetSelector } from "animejs";
2
+ import { MaybeRef } from "vue";
3
+ export interface UseRawAnimateReturn {
4
+ animate: (target: TargetSelector, options: AnimationParams) => void;
5
+ }
6
+ export declare function useRawAnimate(_target: MaybeRef<TargetSelector>, _options?: MaybeRef<AnimationParams>): import("animejs").JSAnimation;
@@ -0,0 +1,12 @@
1
+ import { type Scope, type ScopeMethod, type ScopeParams, type Tickable } from "animejs";
2
+ import { type DeepReadonly, type MaybeRef, type ShallowRef } from "vue";
3
+ export interface UseScopeReturn {
4
+ scope: DeepReadonly<ShallowRef<Scope>>;
5
+ add: (method: ScopeMethod) => void;
6
+ registerMethod: (methodName: string, method: ScopeMethod) => void;
7
+ addOnce: (method: ScopeMethod) => void;
8
+ keepTime: (method: (scope: Scope) => Tickable) => void;
9
+ revert: () => void;
10
+ refresh: () => void;
11
+ }
12
+ export declare function useScope(params: MaybeRef<ScopeParams>): UseScopeReturn;
@@ -0,0 +1,8 @@
1
+ import { type TargetsParam } from "animejs";
2
+ import { type MaybeRef } from "vue";
3
+ export interface UseSvgReturn {
4
+ morphTo: (path: MaybeRef<TargetsParam>, precision?: MaybeRef<number>) => void;
5
+ createDrawable: (selector: MaybeRef<TargetsParam>, start?: MaybeRef<number>, end?: MaybeRef<number>) => void;
6
+ createMotionPath: (path: MaybeRef<TargetsParam>, offset?: MaybeRef<number>) => void;
7
+ }
8
+ export declare function useSvg(): UseSvgReturn;
@@ -0,0 +1,12 @@
1
+ import { type TextSplitter, type TextSplitterParams } from "animejs";
2
+ import { type MaybeComputedElementRef } from "@vueuse/core";
3
+ import { type ComputedRef, type DeepReadonly, type MaybeRef, type ShallowRef } from "vue";
4
+ export interface UseTextReturn {
5
+ splitter: DeepReadonly<ShallowRef<TextSplitter | undefined>>;
6
+ lines: ComputedRef<HTMLElement[]>;
7
+ words: ComputedRef<HTMLElement[]>;
8
+ chars: ComputedRef<HTMLElement[]>;
9
+ revert: () => void;
10
+ refresh: () => void;
11
+ }
12
+ export declare function useText(_target: MaybeRef<HTMLElement | NodeList | string | HTMLElement[]> | MaybeComputedElementRef, _params?: MaybeRef<TextSplitterParams>): UseTextReturn;
@@ -0,0 +1,60 @@
1
+ import { type MaybeRef, type ShallowRef, type DeepReadonly } from "vue";
2
+ import { type AnimationParams, type Callback, type StaggerFunction, type TargetsParam, type Tickable, type Timeline, type TimelineParams, type TimelinePosition, type Timer } from "animejs";
3
+ export type TimelineChain = Timeline & {
4
+ /** Adds an animation to the timeline and returns a chainable object. */
5
+ add: (targets: MaybeRef<TargetsParam>, params: AnimationParams, position?: TimelinePosition | StaggerFunction<number | string>) => TimelineChain;
6
+ /** Sets a property to a value at a point in the timeline without animating it, then returns a chainable object. */
7
+ set: (targets: MaybeRef<TargetsParam>, params: AnimationParams, position?: TimelinePosition) => TimelineChain;
8
+ /** Removes an animation target (or a specific property) from the timeline and returns a chainable object. */
9
+ remove: (targets: MaybeRef<TargetsParam>, propertyName?: string) => TimelineChain;
10
+ };
11
+ export interface UseTimelineReturn {
12
+ /** The underlying Anime.js timeline instance. */
13
+ timeline: DeepReadonly<ShallowRef<Timeline>>;
14
+ /** Adds an animation to the timeline. Accepts a template ref or any valid Anime.js target. Returns a chainable object. */
15
+ add: (targets: MaybeRef<TargetsParam>, params: AnimationParams, position?: TimelinePosition | StaggerFunction<number | string>) => TimelineChain;
16
+ /** Sets a property to a value at a point in the timeline without animating it. Returns a chainable object. */
17
+ set: (targets: MaybeRef<TargetsParam>, params: AnimationParams, position?: TimelinePosition) => TimelineChain;
18
+ /** Removes an animation target (or a specific property) from the timeline. Returns a chainable object. */
19
+ remove: (targets: MaybeRef<TargetsParam>, propertyName?: string) => TimelineChain;
20
+ /** Synchronises another tickable (animation, timer) into the timeline at the given position. */
21
+ sync: (synced?: Tickable, position?: TimelinePosition) => Timeline;
22
+ /** Adds a named label at a position so it can be referenced by `.add()` or `.seek()`. */
23
+ label: (labelName: string, position?: TimelinePosition) => Timeline;
24
+ /** Inserts a callback function at a specific point in the timeline. */
25
+ call: (callback: Callback<Timer>, position?: TimelinePosition) => Timeline;
26
+ /** Renders the timeline once without playing it. */
27
+ init: (internalRender?: boolean) => Timeline;
28
+ /** Starts or resumes the timeline. */
29
+ play: () => Timeline;
30
+ /** Reverses playback direction. */
31
+ reverse: () => Timeline;
32
+ /** Pauses the timeline at the current position. */
33
+ pause: () => Timeline;
34
+ /** Restarts the timeline from the beginning. */
35
+ restart: () => Timeline;
36
+ /** Toggles between forward and reverse direction. */
37
+ alternate: () => Timeline;
38
+ /** Resumes from a paused state. */
39
+ resume: () => Timeline;
40
+ /** Jumps immediately to the end of the timeline. */
41
+ complete: () => Timeline;
42
+ /** Resets the timeline to its initial state. Pass `true` for a soft reset that preserves the current cycle. */
43
+ reset: (softReset?: boolean) => Timeline;
44
+ /** Stops the timeline and removes it from the Anime.js engine. */
45
+ cancel: () => Timeline;
46
+ /** Cancels the timeline and restores all animated properties to their original values. */
47
+ revert: () => Timeline;
48
+ /** Seeks to a specific time (in ms). */
49
+ seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timeline;
50
+ /** Rescales the timeline to a new total duration. */
51
+ stretch: (newDuration: number) => Timeline;
52
+ /** Re-reads the current values of all animated properties from the DOM. */
53
+ refresh: () => Timeline;
54
+ }
55
+ /**
56
+ * Wraps Anime.js `createTimeline()` into a Vue composable. Reactively re-creates the timeline when options change, and cancels it automatically on unmount.
57
+ *
58
+ * @param options - Anime.js timeline parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.
59
+ */
60
+ export declare function useTimeline(options?: MaybeRef<TimelineParams>): UseTimelineReturn;
@@ -0,0 +1,18 @@
1
+ import { type Timer, type TimerParams } from "animejs";
2
+ import { type MaybeRef, type ShallowRef, type DeepReadonly } from "vue";
3
+ export interface UseTimerReturn {
4
+ timer: DeepReadonly<ShallowRef<Timer>>;
5
+ play: () => Timer;
6
+ reverse: () => Timer;
7
+ pause: () => Timer;
8
+ restart: () => Timer;
9
+ alternate: () => Timer;
10
+ resume: () => Timer;
11
+ complete: () => Timer;
12
+ reset: (softReset?: boolean) => Timer;
13
+ cancel: () => Timer;
14
+ revert: () => Timer;
15
+ seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timer;
16
+ stretch: (newDuration: number) => Timer;
17
+ }
18
+ export declare function useTimer(options?: MaybeRef<TimerParams>): UseTimerReturn;
@@ -0,0 +1,19 @@
1
+ import { type MaybeComputedElementRef } from "@vueuse/core";
2
+ import { type WAAPIAnimationParams, type DOMTargetsParam, type WAAPIAnimation, type EasingFunction } from "animejs";
3
+ import { DeepReadonly, type MaybeRef, ShallowRef } from "vue";
4
+ export interface UseWaapiReturn {
5
+ animation: DeepReadonly<ShallowRef<WAAPIAnimation | undefined>>;
6
+ resume: () => WAAPIAnimation | undefined;
7
+ pause: () => WAAPIAnimation | undefined;
8
+ alternate: () => WAAPIAnimation | undefined;
9
+ play: () => WAAPIAnimation | undefined;
10
+ reverse: () => WAAPIAnimation | undefined;
11
+ seek: (time: MaybeRef<number>, muteCallbacks?: MaybeRef<boolean>) => WAAPIAnimation | undefined;
12
+ restart: () => WAAPIAnimation | undefined;
13
+ commitStyles: () => WAAPIAnimation | undefined;
14
+ complete: () => WAAPIAnimation | undefined;
15
+ cancel: () => WAAPIAnimation | undefined;
16
+ revert: () => WAAPIAnimation | undefined;
17
+ convertEase: (fn: MaybeRef<EasingFunction>, samples?: MaybeRef<number>) => string;
18
+ }
19
+ export declare function useWaapi(targets: MaybeRef<DOMTargetsParam> | MaybeComputedElementRef, options?: MaybeRef<WAAPIAnimationParams>): UseWaapiReturn;
@@ -0,0 +1,11 @@
1
+ export { useAnimate, type UseAnimateReturn } from "./composables/use-animate.ts";
2
+ export { useRawAnimate, type UseRawAnimateReturn } from "./composables/use-raw-animate.ts";
3
+ export { useTimer, type UseTimerReturn } from "./composables/use-timer.ts";
4
+ export { useTimeline, type TimelineChain, type UseTimelineReturn } from "./composables/use-timeline.ts";
5
+ export { useAnimatable, type UseAnimatableReturn } from "./composables/use-animatable.ts";
6
+ export { useDraggable, type UseDraggableReturn } from "./composables/use-draggable.ts";
7
+ export { useLayout, type UseLayoutReturn } from "./composables/use-layout.ts";
8
+ export { useSvg, type UseSvgReturn } from "./composables/use-svg.ts";
9
+ export { useText, type UseTextReturn } from "./composables/use-text.ts";
10
+ export { useWaapi, type UseWaapiReturn } from "./composables/use-waapi.ts";
11
+ export { useScope, type UseScopeReturn } from "./composables/use-scope.ts";
package/dist/index.js ADDED
@@ -0,0 +1,573 @@
1
+ import { computed as e, isRef as t, readonly as n, shallowReadonly as r, shallowRef as i, unref as a, watch as o } from "vue";
2
+ import { animate as s, createAnimatable as c, createDraggable as l, createLayout as u, createScope as d, createTimeline as f, createTimer as p, splitText as m, svg as h, waapi as g } from "animejs";
3
+ import { tryOnMounted as _, tryOnUnmounted as v, unrefElement as y } from "@vueuse/core";
4
+ //#region src/composables/use-animate.ts
5
+ function b(e, r = {}) {
6
+ let c = i();
7
+ function l() {
8
+ return y(e) ?? a(e);
9
+ }
10
+ let { stop: u } = o([l, () => a(r)], ([e, t]) => {
11
+ d(e, t);
12
+ }, {
13
+ flush: "post",
14
+ immediate: !t(e)
15
+ });
16
+ v(() => {
17
+ u(), x();
18
+ });
19
+ function d(e, t) {
20
+ if (S(), !e) {
21
+ console.warn("Target element is null or undefined"), c.value = void 0;
22
+ return;
23
+ }
24
+ c.value = s(e, t);
25
+ }
26
+ function f() {
27
+ return c.value?.play();
28
+ }
29
+ function p() {
30
+ return c.value?.reverse();
31
+ }
32
+ function m() {
33
+ return c.value?.pause();
34
+ }
35
+ function h() {
36
+ return c.value?.restart();
37
+ }
38
+ function g() {
39
+ return c.value?.alternate();
40
+ }
41
+ function _() {
42
+ return c.value?.resume();
43
+ }
44
+ function b() {
45
+ return c.value?.complete();
46
+ }
47
+ function x() {
48
+ return c.value?.cancel();
49
+ }
50
+ function S() {
51
+ return c.value?.revert();
52
+ }
53
+ function C(e) {
54
+ return c.value?.reset(e);
55
+ }
56
+ function w(e, t, n) {
57
+ return c.value?.seek(e, t, n);
58
+ }
59
+ function T(e) {
60
+ return c.value?.stretch(e);
61
+ }
62
+ function E() {
63
+ return c.value?.refresh();
64
+ }
65
+ return {
66
+ animation: n(c),
67
+ play: f,
68
+ reverse: p,
69
+ pause: m,
70
+ restart: h,
71
+ alternate: g,
72
+ resume: _,
73
+ complete: b,
74
+ cancel: x,
75
+ revert: S,
76
+ reset: C,
77
+ seek: w,
78
+ stretch: T,
79
+ refresh: E
80
+ };
81
+ }
82
+ //#endregion
83
+ //#region src/composables/use-raw-animate.ts
84
+ function x(e, t = {}) {
85
+ let n = a(e);
86
+ return n || console.warn("Target is undefined"), s(n, a(t));
87
+ }
88
+ //#endregion
89
+ //#region src/composables/use-timer.ts
90
+ function S(e = {}) {
91
+ let t = i(p(a(e))), { stop: r } = o(() => a(e), (e) => {
92
+ g(), t.value = p(e);
93
+ }, { deep: 1 });
94
+ v(() => {
95
+ r(), g();
96
+ });
97
+ function s() {
98
+ return t.value.play();
99
+ }
100
+ function c() {
101
+ return t.value.reverse();
102
+ }
103
+ function l() {
104
+ return t.value.pause();
105
+ }
106
+ function u() {
107
+ return t.value.restart();
108
+ }
109
+ function d() {
110
+ return t.value.alternate();
111
+ }
112
+ function f() {
113
+ return t.value.resume();
114
+ }
115
+ function m() {
116
+ return t.value.complete();
117
+ }
118
+ function h(e) {
119
+ return t.value.reset(e);
120
+ }
121
+ function g() {
122
+ return t.value.cancel();
123
+ }
124
+ function _() {
125
+ return t.value.revert();
126
+ }
127
+ function y(e, n, r) {
128
+ return t.value.seek(e, n, r);
129
+ }
130
+ function b(e) {
131
+ return t.value.stretch(e);
132
+ }
133
+ return {
134
+ timer: n(t),
135
+ play: s,
136
+ reverse: c,
137
+ pause: l,
138
+ restart: u,
139
+ alternate: d,
140
+ resume: f,
141
+ complete: m,
142
+ reset: h,
143
+ cancel: g,
144
+ revert: _,
145
+ seek: y,
146
+ stretch: b
147
+ };
148
+ }
149
+ //#endregion
150
+ //#region src/composables/use-timeline.ts
151
+ function C(e = {}) {
152
+ let t = !1, r = [], s = i(f(a(e)));
153
+ function c() {
154
+ for (let e of r) e.type === "add" ? s.value.add(a(e.targets), e.params, e.position) : s.value.set(a(e.targets), e.params, e.position);
155
+ }
156
+ let { stop: l } = o(() => a(e), (e) => {
157
+ k(), s.value = f(e), c();
158
+ }, {
159
+ flush: "post",
160
+ deep: 1
161
+ });
162
+ _(() => {
163
+ t = !0, c();
164
+ }), v(() => {
165
+ l(), O();
166
+ });
167
+ function u(e, n, i) {
168
+ return r.push({
169
+ type: "add",
170
+ targets: e,
171
+ params: n,
172
+ position: i
173
+ }), t ? {
174
+ ...s.value.add(a(e), n, i),
175
+ add: u,
176
+ set: d,
177
+ remove: p
178
+ } : {
179
+ ...s.value,
180
+ add: u,
181
+ set: d,
182
+ remove: p
183
+ };
184
+ }
185
+ function d(e, n, i) {
186
+ return r.push({
187
+ type: "set",
188
+ targets: e,
189
+ params: n,
190
+ position: i
191
+ }), t ? {
192
+ ...s.value.set(a(e), n, i),
193
+ add: u,
194
+ set: d,
195
+ remove: p
196
+ } : {
197
+ ...s.value,
198
+ add: u,
199
+ set: d,
200
+ remove: p
201
+ };
202
+ }
203
+ function p(e, n) {
204
+ return t ? {
205
+ ...s.value.remove(a(e), n),
206
+ add: u,
207
+ set: d,
208
+ remove: p
209
+ } : (console.warn("Cannot remove from timeline before mount"), {
210
+ ...s.value,
211
+ add: u,
212
+ set: d,
213
+ remove: p
214
+ });
215
+ }
216
+ function m(e, t) {
217
+ return s.value.sync(e, t);
218
+ }
219
+ function h(e, t) {
220
+ return s.value.label(e, t);
221
+ }
222
+ function g(e, t) {
223
+ return s.value.call(e, t);
224
+ }
225
+ function y(e) {
226
+ return s.value.init(e);
227
+ }
228
+ function b() {
229
+ return s.value.play();
230
+ }
231
+ function x() {
232
+ return s.value.reverse();
233
+ }
234
+ function S() {
235
+ return s.value.pause();
236
+ }
237
+ function C() {
238
+ return s.value.restart();
239
+ }
240
+ function w() {
241
+ return s.value.alternate();
242
+ }
243
+ function T() {
244
+ return s.value.resume();
245
+ }
246
+ function E() {
247
+ return s.value.complete();
248
+ }
249
+ function D(e) {
250
+ return s.value.reset(e);
251
+ }
252
+ function O() {
253
+ return s.value.cancel();
254
+ }
255
+ function k() {
256
+ return s.value.revert();
257
+ }
258
+ function A(e, t, n) {
259
+ return s.value.seek(e, t, n);
260
+ }
261
+ function j(e) {
262
+ return s.value.stretch(e);
263
+ }
264
+ function M() {
265
+ return s.value.refresh();
266
+ }
267
+ return {
268
+ timeline: n(s),
269
+ add: u,
270
+ set: d,
271
+ sync: m,
272
+ label: h,
273
+ remove: p,
274
+ call: g,
275
+ init: y,
276
+ play: b,
277
+ reverse: x,
278
+ pause: S,
279
+ restart: C,
280
+ alternate: w,
281
+ resume: T,
282
+ complete: E,
283
+ reset: D,
284
+ cancel: O,
285
+ revert: k,
286
+ seek: A,
287
+ stretch: j,
288
+ refresh: M
289
+ };
290
+ }
291
+ //#endregion
292
+ //#region src/composables/use-animatable.ts
293
+ function w(r, s = {}) {
294
+ let l = i(), { stop: u } = o(e(() => ({
295
+ el: a(r),
296
+ opt: a(s)
297
+ })), ({ el: e, opt: t }) => {
298
+ if (d(), !e) {
299
+ console.warn("Targets element is null or undefined"), l.value = void 0;
300
+ return;
301
+ }
302
+ l.value = c(e, t);
303
+ }, {
304
+ flush: "post",
305
+ immediate: !t(r)
306
+ });
307
+ v(() => {
308
+ u(), d();
309
+ });
310
+ function d() {
311
+ return l.value?.revert();
312
+ }
313
+ return {
314
+ animatable: n(l),
315
+ revert: d
316
+ };
317
+ }
318
+ //#endregion
319
+ //#region src/composables/use-draggable.ts
320
+ function T(e, r = {}) {
321
+ let s = i(), { stop: c } = o([() => a(e), () => a(r)], ([e, t]) => {
322
+ if (y(), !e) {
323
+ console.warn("Targets element is null or undefined"), s.value = void 0;
324
+ return;
325
+ }
326
+ s.value = l(e, t);
327
+ }, {
328
+ flush: "post",
329
+ immediate: !t(e)
330
+ });
331
+ v(() => {
332
+ y(), c();
333
+ });
334
+ function u() {
335
+ return s.value?.disable();
336
+ }
337
+ function d() {
338
+ return s.value?.enable();
339
+ }
340
+ function f(e, t) {
341
+ return s.value?.setX(e, t);
342
+ }
343
+ function p(e, t) {
344
+ return s.value?.setY(e, t);
345
+ }
346
+ function m(e, t, n) {
347
+ return s.value?.animateInView(e, t, n);
348
+ }
349
+ function h(e, t, n) {
350
+ return s.value?.scrollInView(e, t, n);
351
+ }
352
+ function g() {
353
+ return s.value?.stop();
354
+ }
355
+ function _() {
356
+ return s.value?.reset();
357
+ }
358
+ function y() {
359
+ return s.value?.revert();
360
+ }
361
+ function b() {
362
+ return s.value?.refresh();
363
+ }
364
+ return {
365
+ draggable: n(s),
366
+ disable: u,
367
+ enable: d,
368
+ setX: f,
369
+ setY: p,
370
+ animateInView: m,
371
+ scrollInView: h,
372
+ stop: g,
373
+ reset: _,
374
+ revert: y,
375
+ refresh: b
376
+ };
377
+ }
378
+ //#endregion
379
+ //#region src/composables/use-layout.ts
380
+ function E(e, r) {
381
+ let s = i(), { stop: c } = o([() => y(e) ?? a(e), () => a(r)], ([e, t]) => {
382
+ if (p(), !e) {
383
+ console.warn("Target element is null or undefined"), s.value = void 0;
384
+ return;
385
+ }
386
+ s.value = u(e, t);
387
+ }, {
388
+ flush: "post",
389
+ immediate: !t(e)
390
+ });
391
+ v(() => {
392
+ p(), c();
393
+ });
394
+ function l() {
395
+ return s.value?.record();
396
+ }
397
+ function d(e) {
398
+ return s.value?.animate(e);
399
+ }
400
+ function f(e, t) {
401
+ return s.value?.update(e, t);
402
+ }
403
+ function p() {
404
+ return s.value?.revert();
405
+ }
406
+ return {
407
+ layout: n(s),
408
+ record: l,
409
+ animate: d,
410
+ update: f,
411
+ revert: p
412
+ };
413
+ }
414
+ //#endregion
415
+ //#region src/composables/use-svg.ts
416
+ function D() {
417
+ function e(e, t) {
418
+ return h.morphTo(a(e), a(t));
419
+ }
420
+ function t(e, t, n) {
421
+ return h.createDrawable(a(e), a(t), a(n));
422
+ }
423
+ function n(e, t) {
424
+ return h.createMotionPath(a(e), a(t));
425
+ }
426
+ return {
427
+ morphTo: e,
428
+ createDrawable: t,
429
+ createMotionPath: n
430
+ };
431
+ }
432
+ //#endregion
433
+ //#region src/composables/use-text.ts
434
+ function O(r, s) {
435
+ let c = i(), l = e(() => c.value?.lines ?? []), u = e(() => c.value?.words ?? []), d = e(() => c.value?.chars ?? []);
436
+ function f() {
437
+ return y(r) ?? a(r);
438
+ }
439
+ let { stop: p } = o([f, () => a(s)], ([e, t]) => {
440
+ h(), c.value = void 0, e && (c.value = m(e, t));
441
+ }, {
442
+ flush: "post",
443
+ immediate: !t(r)
444
+ });
445
+ v(() => {
446
+ p(), c.value = void 0, h();
447
+ });
448
+ function h() {
449
+ c.value?.revert();
450
+ }
451
+ function g() {
452
+ c.value?.refresh();
453
+ }
454
+ return {
455
+ splitter: n(c),
456
+ lines: l,
457
+ words: u,
458
+ chars: d,
459
+ revert: h,
460
+ refresh: g
461
+ };
462
+ }
463
+ //#endregion
464
+ //#region src/composables/use-waapi.ts
465
+ function k(e, r = {}) {
466
+ let s = i(), { stop: c } = o([() => y(e) ?? a(e), () => a(r)], ([e, t]) => {
467
+ s.value = g.animate(e, t);
468
+ }, {
469
+ flush: "post",
470
+ immediate: !t(e)
471
+ });
472
+ v(() => {
473
+ c();
474
+ });
475
+ function l() {
476
+ return s.value?.resume();
477
+ }
478
+ function u() {
479
+ return s.value?.pause();
480
+ }
481
+ function d() {
482
+ return s.value?.alternate();
483
+ }
484
+ function f() {
485
+ return s.value?.play();
486
+ }
487
+ function p() {
488
+ return s.value?.reverse();
489
+ }
490
+ function m(e, t) {
491
+ return s.value?.seek(a(e), a(t));
492
+ }
493
+ function h() {
494
+ return s.value?.restart();
495
+ }
496
+ function _() {
497
+ return s.value?.commitStyles();
498
+ }
499
+ function b() {
500
+ return s.value?.complete();
501
+ }
502
+ function x() {
503
+ return s.value?.cancel();
504
+ }
505
+ function S() {
506
+ return s.value?.revert();
507
+ }
508
+ return {
509
+ animation: n(s),
510
+ resume: l,
511
+ pause: u,
512
+ alternate: d,
513
+ play: f,
514
+ reverse: p,
515
+ seek: m,
516
+ restart: h,
517
+ commitStyles: _,
518
+ complete: b,
519
+ cancel: x,
520
+ revert: S,
521
+ convertEase: A
522
+ };
523
+ }
524
+ function A(e, t = 100) {
525
+ return g.convertEase(a(e), a(t));
526
+ }
527
+ //#endregion
528
+ //#region src/composables/use-scope.ts
529
+ function j(e) {
530
+ let n = i(d(a(e))), s = [], c = [], l = [], u = !1, f = t(e) ? o(e, (e) => {
531
+ n.value.revert(), n.value = d(e);
532
+ }, { flush: "post" }) : void 0;
533
+ _(() => {
534
+ u = !0;
535
+ for (let e of s) n.value.add(e);
536
+ for (let [e, t] of c) n.value.add(e, t);
537
+ for (let e of l) n.value.addOnce(e);
538
+ s.length = 0, c.length = 0, l.length = 0;
539
+ }), v(() => {
540
+ n.value.revert(), f?.();
541
+ });
542
+ function p(e) {
543
+ return u ? n.value.add(e) : void s.push(e);
544
+ }
545
+ function m(e, t) {
546
+ return u ? n.value.add(e, t) : void c.push([e, t]);
547
+ }
548
+ function h(e) {
549
+ return u ? n.value.addOnce(e) : void l.push(e);
550
+ }
551
+ function g(e) {
552
+ return n.value.keepTime(e);
553
+ }
554
+ function y() {
555
+ return n.value.revert();
556
+ }
557
+ function b() {
558
+ return n.value.refresh();
559
+ }
560
+ return {
561
+ scope: r(n),
562
+ add: p,
563
+ registerMethod: m,
564
+ addOnce: h,
565
+ keepTime: g,
566
+ revert: y,
567
+ refresh: b
568
+ };
569
+ }
570
+ //#endregion
571
+ export { w as useAnimatable, b as useAnimate, T as useDraggable, E as useLayout, x as useRawAnimate, j as useScope, D as useSvg, O as useText, C as useTimeline, S as useTimer, k as useWaapi };
572
+
573
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/composables/use-animate.ts","../src/composables/use-raw-animate.ts","../src/composables/use-timer.ts","../src/composables/use-timeline.ts","../src/composables/use-animatable.ts","../src/composables/use-draggable.ts","../src/composables/use-layout.ts","../src/composables/use-svg.ts","../src/composables/use-text.ts","../src/composables/use-waapi.ts","../src/composables/use-scope.ts"],"sourcesContent":["import { type DeepReadonly, type MaybeRef, type ShallowRef, shallowRef, unref, watch, readonly, isRef } from \"vue\"\nimport { type JSAnimation, animate, type TargetSelector, type AnimationParams } from \"animejs\"\nimport { type MaybeComputedElementRef, tryOnUnmounted, unrefElement } from \"@vueuse/core\"\n\nexport interface UseAnimateReturn {\n /** The underlying Anime.js animation instance. `undefined` until the target is available. */\n animation: DeepReadonly<ShallowRef<JSAnimation | undefined>>\n /** Starts or resumes the animation. */\n play: () => JSAnimation | undefined\n /** Reverses playback direction. */\n reverse: () => JSAnimation | undefined\n /** Pauses the animation at the current position. */\n pause: () => JSAnimation | undefined\n /** Restarts the animation from the beginning. */\n restart: () => JSAnimation | undefined\n /** Toggles between forward and reverse direction. */\n alternate: () => JSAnimation | undefined\n /** Resumes from a paused state. */\n resume: () => JSAnimation | undefined\n /** Jumps immediately to the end of the animation. */\n complete: () => JSAnimation | undefined\n /** Stops the animation and removes it from the Anime.js engine. */\n cancel: () => JSAnimation | undefined\n /** Cancels the animation and restores all animated properties to their original values. */\n revert: () => JSAnimation | undefined\n /** Resets the animation to its initial state. Pass `true` for a soft reset that preserves the current cycle. */\n reset: (softReset?: boolean) => JSAnimation | undefined\n /** Seeks to a specific time (in ms). */\n seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => JSAnimation | undefined\n /** Rescales the animation to a new total duration. */\n stretch: (newDuration: number) => JSAnimation | undefined\n /** Re-reads the current values of animated properties from the DOM. */\n refresh: () => JSAnimation | undefined\n}\n\n/**\n * Wraps Anime.js `animate()` into a Vue composable. Reactively re-creates the animation when the target or options change, and cancels it automatically on unmount.\n *\n * @param _target - The element(s) to animate. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param _options - Anime.js animation parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useAnimate(\n _target: MaybeRef<TargetSelector> | MaybeComputedElementRef,\n _options: MaybeRef<AnimationParams> = {}\n): UseAnimateReturn {\n const animation = shallowRef<JSAnimation>()\n\n function resolveTarget() {\n return unrefElement(_target as MaybeComputedElementRef) ?? unref(_target as MaybeRef<TargetSelector>)\n }\n\n const { stop } = watch(\n [resolveTarget, () => unref(_options)],\n ([el, opt]) => {\n createAnimation(el, opt)\n },\n { flush: \"post\", immediate: !isRef(_target) }\n )\n\n tryOnUnmounted(() => {\n stop()\n cancel()\n })\n\n function createAnimation(el: TargetSelector, opt: AnimationParams) {\n revert()\n\n if (!el) {\n console.warn(\"Target element is null or undefined\")\n animation.value = undefined\n return\n }\n\n animation.value = animate(el, opt)\n }\n\n function play() {\n return animation.value?.play()\n }\n\n function reverse() {\n return animation.value?.reverse()\n }\n\n function pause() {\n return animation.value?.pause()\n }\n\n function restart() {\n return animation.value?.restart()\n }\n\n function alternate() {\n return animation.value?.alternate()\n }\n\n function resume() {\n return animation.value?.resume()\n }\n\n function complete() {\n return animation.value?.complete()\n }\n\n function cancel() {\n return animation.value?.cancel()\n }\n\n function revert() {\n return animation.value?.revert()\n }\n\n function reset(softReset?: boolean) {\n return animation.value?.reset(softReset)\n }\n\n function seek(time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) {\n return animation.value?.seek(time, muteCallbacks, internalRender)\n }\n\n function stretch(newDuration: number) {\n return animation.value?.stretch(newDuration)\n }\n\n function refresh() {\n return animation.value?.refresh()\n }\n\n return {\n animation: readonly(animation),\n play,\n reverse,\n pause,\n restart,\n alternate,\n resume,\n complete,\n cancel,\n revert,\n reset,\n seek,\n stretch,\n refresh,\n }\n}","import { animate, AnimationParams, TargetSelector } from \"animejs\"\nimport { MaybeRef, unref } from \"vue\"\n\nexport interface UseRawAnimateReturn {\n animate: (target: TargetSelector, options: AnimationParams) => void\n}\n\nexport function useRawAnimate(_target: MaybeRef<TargetSelector>, _options: MaybeRef<AnimationParams> = {}) {\n const target = unref(_target)\n\n if (!target) {\n console.warn(\"Target is undefined\")\n }\n\n return animate(target, unref(_options))\n}","import { createTimer, type Timer, type TimerParams } from \"animejs\"\nimport { type MaybeRef, type ShallowRef, shallowRef, unref, watch, type DeepReadonly, readonly } from \"vue\"\nimport { tryOnUnmounted } from \"@vueuse/core\"\n\nexport interface UseTimerReturn {\n timer: DeepReadonly<ShallowRef<Timer>>\n play: () => Timer\n reverse: () => Timer\n pause: () => Timer\n restart: () => Timer\n alternate: () => Timer\n resume: () => Timer\n complete: () => Timer\n reset: (softReset?: boolean) => Timer\n cancel: () => Timer\n revert: () => Timer\n seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timer\n stretch: (newDuration: number) => Timer\n}\n\nexport function useTimer(options: MaybeRef<TimerParams> = {}): UseTimerReturn {\n const timer = shallowRef<Timer>(createTimer(unref(options)))\n\n const { stop } = watch(\n () => unref(options),\n options => {\n cancel()\n timer.value = createTimer(options)\n },\n { deep: 1 }\n )\n\n tryOnUnmounted(() => {\n stop()\n cancel()\n })\n\n function play() {\n return timer.value.play()\n }\n\n function reverse() {\n return timer.value.reverse()\n }\n\n function pause() {\n return timer.value.pause()\n }\n\n function restart() {\n return timer.value.restart()\n }\n\n function alternate() {\n return timer.value.alternate()\n }\n\n function resume() {\n return timer.value.resume()\n }\n\n function complete() {\n return timer.value.complete()\n }\n\n function reset(softReset?: boolean) {\n return timer.value.reset(softReset)\n }\n\n function cancel() {\n return timer.value.cancel()\n }\n\n function revert() {\n return timer.value.revert()\n }\n\n function seek(time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) {\n return timer.value.seek(time, muteCallbacks, internalRender)\n }\n\n function stretch(newDuration: number) {\n return timer.value.stretch(newDuration)\n }\n\n return {\n timer: readonly(timer),\n play,\n reverse,\n pause,\n restart,\n alternate,\n resume,\n complete,\n reset,\n cancel,\n revert,\n seek,\n stretch,\n }\n}","import { type MaybeRef, type ShallowRef, shallowRef, unref, watch, type DeepReadonly, readonly } from \"vue\"\nimport {\n type AnimationParams,\n type Callback,\n createTimeline,\n type StaggerFunction,\n type TargetsParam,\n type Tickable,\n type Timeline,\n type TimelineParams,\n type TimelinePosition,\n type Timer,\n} from \"animejs\"\nimport { tryOnMounted, tryOnUnmounted } from \"@vueuse/core\"\n\ntype QueueEntry =\n | {\n type: \"add\"\n targets: MaybeRef<TargetsParam>\n params: AnimationParams\n position?: TimelinePosition | StaggerFunction<number | string>\n }\n | { type: \"set\"; targets: MaybeRef<TargetsParam>; params: AnimationParams; position?: TimelinePosition }\n\nexport type TimelineChain = Timeline & {\n /** Adds an animation to the timeline and returns a chainable object. */\n add: (\n targets: MaybeRef<TargetsParam>,\n params: AnimationParams,\n position?: TimelinePosition | StaggerFunction<number | string>\n ) => TimelineChain\n /** Sets a property to a value at a point in the timeline without animating it, then returns a chainable object. */\n set: (targets: MaybeRef<TargetsParam>, params: AnimationParams, position?: TimelinePosition) => TimelineChain\n /** Removes an animation target (or a specific property) from the timeline and returns a chainable object. */\n remove: (targets: MaybeRef<TargetsParam>, propertyName?: string) => TimelineChain\n}\n\nexport interface UseTimelineReturn {\n /** The underlying Anime.js timeline instance. */\n timeline: DeepReadonly<ShallowRef<Timeline>>\n /** Adds an animation to the timeline. Accepts a template ref or any valid Anime.js target. Returns a chainable object. */\n add: (\n targets: MaybeRef<TargetsParam>,\n params: AnimationParams,\n position?: TimelinePosition | StaggerFunction<number | string>\n ) => TimelineChain\n /** Sets a property to a value at a point in the timeline without animating it. Returns a chainable object. */\n set: (targets: MaybeRef<TargetsParam>, params: AnimationParams, position?: TimelinePosition) => TimelineChain\n /** Removes an animation target (or a specific property) from the timeline. Returns a chainable object. */\n remove: (targets: MaybeRef<TargetsParam>, propertyName?: string) => TimelineChain\n /** Synchronises another tickable (animation, timer) into the timeline at the given position. */\n sync: (synced?: Tickable, position?: TimelinePosition) => Timeline\n /** Adds a named label at a position so it can be referenced by `.add()` or `.seek()`. */\n label: (labelName: string, position?: TimelinePosition) => Timeline\n /** Inserts a callback function at a specific point in the timeline. */\n call: (callback: Callback<Timer>, position?: TimelinePosition) => Timeline\n /** Renders the timeline once without playing it. */\n init: (internalRender?: boolean) => Timeline\n /** Starts or resumes the timeline. */\n play: () => Timeline\n /** Reverses playback direction. */\n reverse: () => Timeline\n /** Pauses the timeline at the current position. */\n pause: () => Timeline\n /** Restarts the timeline from the beginning. */\n restart: () => Timeline\n /** Toggles between forward and reverse direction. */\n alternate: () => Timeline\n /** Resumes from a paused state. */\n resume: () => Timeline\n /** Jumps immediately to the end of the timeline. */\n complete: () => Timeline\n /** Resets the timeline to its initial state. Pass `true` for a soft reset that preserves the current cycle. */\n reset: (softReset?: boolean) => Timeline\n /** Stops the timeline and removes it from the Anime.js engine. */\n cancel: () => Timeline\n /** Cancels the timeline and restores all animated properties to their original values. */\n revert: () => Timeline\n /** Seeks to a specific time (in ms). */\n seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timeline\n /** Rescales the timeline to a new total duration. */\n stretch: (newDuration: number) => Timeline\n /** Re-reads the current values of all animated properties from the DOM. */\n refresh: () => Timeline\n}\n\n/**\n * Wraps Anime.js `createTimeline()` into a Vue composable. Reactively re-creates the timeline when options change, and cancels it automatically on unmount.\n *\n * @param options - Anime.js timeline parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useTimeline(options: MaybeRef<TimelineParams> = {}): UseTimelineReturn {\n let is_mounted = false\n\n const queue: QueueEntry[] = []\n\n const timeline = shallowRef<Timeline>(createTimeline(unref(options)))\n\n function replayQueue() {\n for (const entry of queue) {\n if (entry.type === \"add\") {\n timeline.value.add(unref(entry.targets), entry.params, entry.position)\n } else {\n timeline.value.set(unref(entry.targets), entry.params, entry.position)\n }\n }\n }\n\n const { stop } = watch(\n () => unref(options),\n _options => {\n revert()\n timeline.value = createTimeline(_options)\n replayQueue()\n },\n { flush: \"post\", deep: 1 }\n )\n\n tryOnMounted(() => {\n is_mounted = true\n replayQueue()\n })\n\n tryOnUnmounted(() => {\n stop()\n cancel()\n })\n\n function add(\n targets: MaybeRef<TargetsParam>,\n params: AnimationParams,\n position?: TimelinePosition | StaggerFunction<number | string>\n ) {\n queue.push({ type: \"add\", targets, params, position })\n\n if (is_mounted) {\n return { ...timeline.value.add(unref(targets), params, position), add, set, remove } as TimelineChain\n }\n\n return { ...timeline.value, add, set, remove } as TimelineChain\n }\n\n function set(targets: MaybeRef<TargetsParam>, params: AnimationParams, position?: TimelinePosition) {\n queue.push({ type: \"set\", targets, params, position })\n\n if (is_mounted) {\n return { ...timeline.value.set(unref(targets), params, position), add, set, remove } as TimelineChain\n }\n\n return { ...timeline.value, add, set, remove } as TimelineChain\n }\n\n function remove(targets: MaybeRef<TargetsParam>, propertyName?: string) {\n if (!is_mounted) {\n console.warn(\"Cannot remove from timeline before mount\")\n return { ...timeline.value, add, set, remove } as TimelineChain\n }\n\n return { ...timeline.value.remove(unref(targets), propertyName), add, set, remove } as TimelineChain\n }\n\n function sync(synced?: Tickable, position?: TimelinePosition) {\n return timeline.value.sync(synced, position)\n }\n\n function label(labelName: string, position?: TimelinePosition) {\n return timeline.value.label(labelName, position)\n }\n\n function call(callback: Callback<Timer>, position?: TimelinePosition) {\n return timeline.value.call(callback, position)\n }\n\n function init(internalRender?: boolean) {\n return timeline.value.init(internalRender)\n }\n\n function play() {\n return timeline.value.play()\n }\n\n function reverse() {\n return timeline.value.reverse()\n }\n\n function pause() {\n return timeline.value.pause()\n }\n\n function restart() {\n return timeline.value.restart()\n }\n\n function alternate() {\n return timeline.value.alternate()\n }\n\n function resume() {\n return timeline.value.resume()\n }\n\n function complete() {\n return timeline.value.complete()\n }\n\n function reset(softReset?: boolean) {\n return timeline.value.reset(softReset)\n }\n\n function cancel() {\n return timeline.value.cancel()\n }\n\n function revert() {\n return timeline.value.revert()\n }\n\n function seek(time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) {\n return timeline.value.seek(time, muteCallbacks, internalRender)\n }\n\n function stretch(newDuration: number) {\n return timeline.value.stretch(newDuration)\n }\n\n function refresh() {\n return timeline.value.refresh()\n }\n\n return {\n timeline: readonly(timeline),\n add,\n set,\n sync,\n label,\n remove,\n call,\n init,\n play,\n reverse,\n pause,\n restart,\n alternate,\n resume,\n complete,\n reset,\n cancel,\n revert,\n seek,\n stretch,\n refresh,\n }\n}","import { type AnimatableObject, type AnimatableParams, createAnimatable, type TargetsParam } from \"animejs\"\nimport {\n computed,\n type DeepReadonly,\n isRef,\n type MaybeRef,\n readonly,\n type ShallowRef,\n shallowRef,\n unref,\n watch,\n} from \"vue\"\nimport { tryOnUnmounted } from \"@vueuse/core\"\n\nexport interface UseAnimatableReturn {\n animatable: DeepReadonly<ShallowRef<AnimatableObject | undefined>>\n revert: () => AnimatableObject | undefined\n}\n\nexport function useAnimatable(\n targets: MaybeRef<TargetsParam>,\n options: MaybeRef<AnimatableParams> = {}\n): UseAnimatableReturn {\n const animatable = shallowRef<AnimatableObject>()\n\n const watch_target = computed<{ el: TargetsParam; opt: AnimatableParams }>(() => ({\n el: unref(targets),\n opt: unref(options),\n }))\n\n const { stop } = watch(\n watch_target,\n ({ el, opt }) => {\n revert()\n\n if (!el) {\n console.warn(\"Targets element is null or undefined\")\n animatable.value = undefined\n return\n }\n\n animatable.value = createAnimatable(el, opt)\n },\n { flush: \"post\", immediate: !isRef(targets) }\n )\n\n tryOnUnmounted(() => {\n stop()\n revert()\n })\n\n function revert() {\n return animatable.value?.revert()\n }\n\n return { animatable: readonly(animatable), revert }\n}","import { type DeepReadonly, isRef, type MaybeRef, readonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { tryOnUnmounted } from \"@vueuse/core\"\nimport { type Draggable, type DraggableParams, type TargetsParam, createDraggable, type EasingParam } from \"animejs\"\n\nexport interface UseDraggableReturn {\n draggable: DeepReadonly<ShallowRef<Draggable | undefined>>\n disable: () => void\n enable: () => void\n setX: (x: number, muteUpdateCallback?: boolean) => void\n setY: (y: number, muteUpdateCallback?: boolean) => void\n animateInView: (duration?: number, gap?: number, ease?: EasingParam) => void\n scrollInView: (duration?: number, gap?: number, ease?: EasingParam) => void\n stop: () => void\n reset: () => void\n revert: () => void\n refresh: () => void\n}\n\nexport function useDraggable(\n targets: MaybeRef<TargetsParam>,\n options: MaybeRef<DraggableParams> = {}\n): UseDraggableReturn {\n const draggable = shallowRef<Draggable>()\n\n const { stop: stopWatch } = watch(\n [() => unref(targets), () => unref(options)],\n ([el, opt]) => {\n revert()\n\n if (!el) {\n console.warn(\"Targets element is null or undefined\")\n draggable.value = undefined\n return\n }\n\n draggable.value = createDraggable(el, opt)\n },\n { flush: \"post\", immediate: !isRef(targets) }\n )\n\n tryOnUnmounted(() => {\n revert()\n stopWatch()\n })\n\n function disable() {\n return draggable.value?.disable()\n }\n\n function enable() {\n return draggable.value?.enable()\n }\n\n function setX(x: number, muteUpdateCallback?: boolean) {\n return draggable.value?.setX(x, muteUpdateCallback)\n }\n\n function setY(y: number, muteUpdateCallback?: boolean) {\n return draggable.value?.setY(y, muteUpdateCallback)\n }\n\n function animateInView(duration?: number, gap?: number, ease?: EasingParam) {\n return draggable.value?.animateInView(duration, gap, ease)\n }\n\n function scrollInView(duration?: number, gap?: number, ease?: EasingParam) {\n return draggable.value?.scrollInView(duration, gap, ease)\n }\n\n function stop() {\n return draggable.value?.stop()\n }\n\n function reset() {\n return draggable.value?.reset()\n }\n\n function revert() {\n return draggable.value?.revert()\n }\n\n function refresh() {\n return draggable.value?.refresh()\n }\n\n return {\n draggable: readonly(draggable),\n disable,\n enable,\n setX,\n setY,\n animateInView,\n scrollInView,\n stop,\n reset,\n revert,\n refresh,\n }\n}","import { type MaybeComputedElementRef, tryOnUnmounted, unrefElement } from \"@vueuse/core\"\nimport {\n type AutoLayout,\n type AutoLayoutParams,\n createLayout,\n type DOMTargetSelector,\n type LayoutAnimationParams,\n type Timeline,\n} from \"animejs\"\nimport { type DeepReadonly, isRef, type MaybeRef, readonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseLayoutReturn {\n layout: DeepReadonly<ShallowRef<AutoLayout | undefined>>\n record: () => void\n animate: (params?: LayoutAnimationParams) => Timeline | undefined\n update: (callback: (layout: AutoLayout) => void, params?: LayoutAnimationParams) => void\n revert: () => void\n}\n\nexport function useLayout(\n root: MaybeRef<DOMTargetSelector> | MaybeComputedElementRef,\n params: MaybeRef<AutoLayoutParams>\n): UseLayoutReturn {\n const layout = shallowRef<AutoLayout | undefined>()\n\n const { stop } = watch(\n [\n () => unrefElement(root as MaybeComputedElementRef) ?? unref(root as MaybeRef<DOMTargetSelector>),\n () => unref(params),\n ],\n ([el, opt]) => {\n revert()\n\n if (!el) {\n console.warn(\"Target element is null or undefined\")\n layout.value = undefined\n return\n }\n\n layout.value = createLayout(el, opt)\n },\n { flush: \"post\", immediate: !isRef(root) }\n )\n\n tryOnUnmounted(() => {\n revert()\n stop()\n })\n\n function record() {\n return layout.value?.record()\n }\n\n function animate(params?: LayoutAnimationParams) {\n return layout.value?.animate(params)\n }\n\n function update(callback: (layout: AutoLayout) => void, params?: LayoutAnimationParams) {\n return layout.value?.update(callback, params)\n }\n\n function revert() {\n return layout.value?.revert()\n }\n\n return { layout: readonly(layout), record, animate, update, revert }\n}","import { svg, type TargetsParam } from \"animejs\"\nimport { type MaybeRef, unref } from \"vue\"\n\nexport interface UseSvgReturn {\n morphTo: (path: MaybeRef<TargetsParam>, precision?: MaybeRef<number>) => void\n createDrawable: (selector: MaybeRef<TargetsParam>, start?: MaybeRef<number>, end?: MaybeRef<number>) => void\n createMotionPath: (path: MaybeRef<TargetsParam>, offset?: MaybeRef<number>) => void\n}\n\nexport function useSvg(): UseSvgReturn {\n function morphTo(path: MaybeRef<TargetsParam>, precision?: MaybeRef<number>) {\n return svg.morphTo(unref(path), unref(precision))\n }\n\n function createDrawable(selector: MaybeRef<TargetsParam>, start?: MaybeRef<number>, end?: MaybeRef<number>) {\n return svg.createDrawable(unref(selector), unref(start), unref(end))\n }\n\n function createMotionPath(path: MaybeRef<TargetsParam>, offset?: MaybeRef<number>) {\n return svg.createMotionPath(unref(path), unref(offset))\n }\n\n return {\n morphTo,\n createDrawable,\n createMotionPath,\n }\n}","import { splitText, type TextSplitter, type TextSplitterParams } from \"animejs\"\nimport { type MaybeComputedElementRef, tryOnUnmounted, unrefElement } from \"@vueuse/core\"\nimport {\n computed,\n isRef,\n readonly,\n shallowRef,\n unref,\n watch,\n type ComputedRef,\n type DeepReadonly,\n type MaybeRef,\n type ShallowRef,\n} from \"vue\"\n\nexport interface UseTextReturn {\n splitter: DeepReadonly<ShallowRef<TextSplitter | undefined>>\n lines: ComputedRef<HTMLElement[]>\n words: ComputedRef<HTMLElement[]>\n chars: ComputedRef<HTMLElement[]>\n revert: () => void\n refresh: () => void\n}\n\nexport function useText(\n _target: MaybeRef<HTMLElement | NodeList | string | HTMLElement[]> | MaybeComputedElementRef,\n _params?: MaybeRef<TextSplitterParams>\n): UseTextReturn {\n const splitter = shallowRef<TextSplitter | undefined>()\n\n const lines = computed<HTMLElement[]>(() => splitter.value?.lines ?? [])\n const words = computed<HTMLElement[]>(() => splitter.value?.words ?? [])\n const chars = computed<HTMLElement[]>(() => splitter.value?.chars ?? [])\n\n function resolveTarget() {\n return (\n unrefElement(_target as MaybeComputedElementRef) ??\n unref(_target as MaybeRef<HTMLElement | NodeList | string | HTMLElement[]>)\n )\n }\n\n const { stop } = watch(\n [resolveTarget, () => unref(_params)],\n ([el, params]) => {\n revert()\n splitter.value = undefined\n\n if (!el) return\n\n splitter.value = splitText(el as HTMLElement | NodeList | string | HTMLElement[], params)\n },\n { flush: \"post\", immediate: !isRef(_target) }\n )\n\n tryOnUnmounted(() => {\n stop()\n splitter.value = undefined\n revert()\n })\n\n function revert() {\n splitter.value?.revert()\n }\n\n function refresh() {\n splitter.value?.refresh()\n }\n\n return {\n splitter: readonly(splitter),\n lines,\n words,\n chars,\n revert,\n refresh,\n }\n}","import { type MaybeComputedElementRef, tryOnUnmounted, unrefElement } from \"@vueuse/core\"\nimport {\n type WAAPIAnimationParams,\n type DOMTargetsParam,\n waapi,\n type WAAPIAnimation,\n type EasingFunction,\n} from \"animejs\"\nimport { DeepReadonly, isRef, type MaybeRef, readonly, ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseWaapiReturn {\n animation: DeepReadonly<ShallowRef<WAAPIAnimation | undefined>>\n resume: () => WAAPIAnimation | undefined\n pause: () => WAAPIAnimation | undefined\n alternate: () => WAAPIAnimation | undefined\n play: () => WAAPIAnimation | undefined\n reverse: () => WAAPIAnimation | undefined\n seek: (time: MaybeRef<number>, muteCallbacks?: MaybeRef<boolean>) => WAAPIAnimation | undefined\n restart: () => WAAPIAnimation | undefined\n commitStyles: () => WAAPIAnimation | undefined\n complete: () => WAAPIAnimation | undefined\n cancel: () => WAAPIAnimation | undefined\n revert: () => WAAPIAnimation | undefined\n\n convertEase: (fn: MaybeRef<EasingFunction>, samples?: MaybeRef<number>) => string\n}\n\nexport function useWaapi(\n targets: MaybeRef<DOMTargetsParam> | MaybeComputedElementRef,\n options: MaybeRef<WAAPIAnimationParams> = {}\n): UseWaapiReturn {\n const animation = shallowRef<WAAPIAnimation | undefined>()\n\n const { stop } = watch(\n [\n () => unrefElement(targets as MaybeComputedElementRef) ?? unref(targets as MaybeRef<DOMTargetsParam>),\n () => unref(options),\n ],\n ([el, opt]) => {\n animation.value = waapi.animate(el, opt)\n },\n { flush: \"post\", immediate: !isRef(targets) }\n )\n\n tryOnUnmounted(() => {\n stop()\n })\n\n function resume() {\n return animation.value?.resume()\n }\n\n function pause() {\n return animation.value?.pause()\n }\n\n function alternate() {\n return animation.value?.alternate()\n }\n\n function play() {\n return animation.value?.play()\n }\n\n function reverse() {\n return animation.value?.reverse()\n }\n\n function seek(time: MaybeRef<number>, muteCallbacks?: MaybeRef<boolean>) {\n return animation.value?.seek(unref(time), unref(muteCallbacks))\n }\n\n function restart() {\n return animation.value?.restart()\n }\n\n function commitStyles() {\n return animation.value?.commitStyles()\n }\n\n function complete() {\n return animation.value?.complete()\n }\n\n function cancel() {\n return animation.value?.cancel()\n }\n\n function revert() {\n return animation.value?.revert()\n }\n\n return {\n animation: readonly(animation),\n resume,\n pause,\n alternate,\n play,\n reverse,\n seek,\n restart,\n commitStyles,\n complete,\n cancel,\n revert,\n\n convertEase,\n }\n}\n\nfunction convertEase(fn: MaybeRef<EasingFunction>, samples: MaybeRef<number> = 100) {\n return waapi.convertEase(unref(fn), unref(samples))\n}","import { tryOnMounted, tryOnUnmounted } from \"@vueuse/core\"\nimport { createScope, type Scope, type ScopeMethod, type ScopeParams, type Tickable } from \"animejs\"\nimport {\n type DeepReadonly,\n isRef,\n type MaybeRef,\n shallowReadonly,\n type ShallowRef,\n shallowRef,\n unref,\n watch,\n} from \"vue\"\n\nexport interface UseScopeReturn {\n scope: DeepReadonly<ShallowRef<Scope>>\n add: (method: ScopeMethod) => void\n registerMethod: (methodName: string, method: ScopeMethod) => void\n addOnce: (method: ScopeMethod) => void\n keepTime: (method: (scope: Scope) => Tickable) => void\n revert: () => void\n refresh: () => void\n}\n\nexport function useScope(params: MaybeRef<ScopeParams>): UseScopeReturn {\n const scope = shallowRef(createScope(unref(params)))\n\n const pending_adds: ScopeMethod[] = []\n const pending_named: [string, ScopeMethod][] = []\n const pending_once: ScopeMethod[] = []\n\n let is_mounted = false\n\n const stopWatcher = isRef(params)\n ? watch(\n params,\n new_params => {\n scope.value.revert()\n scope.value = createScope(new_params)\n },\n { flush: \"post\" }\n )\n : undefined\n\n tryOnMounted(() => {\n is_mounted = true\n\n for (const method of pending_adds) scope.value.add(method)\n for (const [name, method] of pending_named) scope.value.add(name, method)\n for (const method of pending_once) scope.value.addOnce(method)\n\n pending_adds.length = 0\n pending_named.length = 0\n pending_once.length = 0\n })\n\n tryOnUnmounted(() => {\n scope.value.revert()\n stopWatcher?.()\n })\n\n function add(method: ScopeMethod) {\n if (!is_mounted) return void pending_adds.push(method)\n return scope.value.add(method)\n }\n\n function registerMethod(methodName: string, method: ScopeMethod) {\n if (!is_mounted) return void pending_named.push([methodName, method])\n return scope.value.add(methodName, method)\n }\n\n function addOnce(method: ScopeMethod) {\n if (!is_mounted) return void pending_once.push(method)\n return scope.value.addOnce(method)\n }\n\n function keepTime(method: (scope: Scope) => Tickable) {\n return scope.value.keepTime(method)\n }\n\n function revert() {\n return scope.value.revert()\n }\n\n function refresh() {\n return scope.value.refresh()\n }\n\n return {\n scope: shallowReadonly(scope),\n add,\n registerMethod,\n addOnce,\n keepTime,\n revert,\n refresh,\n }\n}"],"mappings":";;;;AAyCA,SAAgB,EACd,GACA,IAAsC,EAAE,EACtB;CAClB,IAAM,IAAY,GAAyB;CAE3C,SAAS,IAAgB;AACvB,SAAO,EAAa,EAAmC,IAAI,EAAM,EAAoC;;CAGvG,IAAM,EAAE,YAAS,EACf,CAAC,SAAqB,EAAM,EAAS,CAAC,GACrC,CAAC,GAAI,OAAS;AACb,IAAgB,GAAI,EAAI;IAE1B;EAAE,OAAO;EAAQ,WAAW,CAAC,EAAM,EAAQ;EAAE,CAC9C;AAED,SAAqB;AAEnB,EADA,GAAM,EACN,GAAQ;GACR;CAEF,SAAS,EAAgB,GAAoB,GAAsB;AAGjE,MAFA,GAAQ,EAEJ,CAAC,GAAI;AAEP,GADA,QAAQ,KAAK,sCAAsC,EACnD,EAAU,QAAQ,KAAA;AAClB;;AAGF,IAAU,QAAQ,EAAQ,GAAI,EAAI;;CAGpC,SAAS,IAAO;AACd,SAAO,EAAU,OAAO,MAAM;;CAGhC,SAAS,IAAU;AACjB,SAAO,EAAU,OAAO,SAAS;;CAGnC,SAAS,IAAQ;AACf,SAAO,EAAU,OAAO,OAAO;;CAGjC,SAAS,IAAU;AACjB,SAAO,EAAU,OAAO,SAAS;;CAGnC,SA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ADlB,KAAK,EAAc,KAAK,CAAC,GAAY,EAAO,CAAC;;CAIvE,SAAS,EAAQ,GAAqB;AAEpC,SADK,IACE,EAAM,MAAM,QAAQ,EAAO,GADV,KAAK,EAAa,KAAK,EAAO;;CAIxD,SAAS,EAAS,GAAoC;AACpD,SAAO,EAAM,MAAM,SAAS,EAAO;;CAGrC,SAAS,IAAS;AAChB,SAAO,EAAM,MAAM,QAAQ;;CAG7B,SAAS,IAAU;AACjB,SAAO,EAAM,MAAM,SAAS;;AAG9B,QAAO;EACL,OAAO,EAAgB,EAAM;EAC7B;EACA;EACA;EACA;EACA;EACA;EACD"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@juleshry/vue-animejs",
3
+ "version": "0.1.0",
4
+ "description": "Vue 3 composables for Anime.js v4 — reactive animations that integrate naturally with Vue's reactivity system and component lifecycle.",
5
+ "keywords": [
6
+ "animation",
7
+ "animejs",
8
+ "composable",
9
+ "composables",
10
+ "vue",
11
+ "vue3"
12
+ ],
13
+ "homepage": "https://github.com/juleshry/vue-animejs#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/juleshry/vue-animejs/issues"
16
+ },
17
+ "license": "MIT",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/juleshry/vue-animejs.git"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "type": "module",
26
+ "sideEffects": false,
27
+ "exports": {
28
+ ".": {
29
+ "import": "./dist/index.js",
30
+ "types": "./dist/index.d.ts"
31
+ }
32
+ },
33
+ "scripts": {
34
+ "build": "vite build && vue-tsc -p tsconfig.build.json",
35
+ "format": "oxfmt .",
36
+ "format:check": "oxfmt --check .",
37
+ "lint": "oxlint .",
38
+ "test": "vitest run",
39
+ "test:watch": "vitest",
40
+ "test:coverage": "vitest run --coverage"
41
+ },
42
+ "devDependencies": {
43
+ "@types/node": "^22.0.0",
44
+ "@vitest/coverage-v8": "^4.1.4",
45
+ "@vue/test-utils": "^2.4.6",
46
+ "@vueuse/core": ">=14",
47
+ "animejs": ">=4",
48
+ "happy-dom": "^20.9.0",
49
+ "oxfmt": "^0.47.0",
50
+ "oxlint": "^1.62.0",
51
+ "typescript": "^6.0.2",
52
+ "vite": "^8.0.8",
53
+ "vitest": "^4.1.4",
54
+ "vue": ">=3.5",
55
+ "vue-tsc": "^3.2.6"
56
+ },
57
+ "peerDependencies": {
58
+ "@vueuse/core": ">=14",
59
+ "animejs": ">=4",
60
+ "vue": ">=3.5"
61
+ }
62
+ }