@juleshry/vue-animejs 1.2.2 → 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/README.md +1 -0
- package/dist/composables/use-scroll.d.ts +33 -0
- package/dist/composables/use-scroll.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +171 -132
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/utils/resolve-target.ts","../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-raw-animatable.ts","../src/composables/use-draggable.ts","../src/composables/use-layout.ts","../src/composables/use-svg.ts","../src/composables/use-svg-drawable.ts","../src/composables/use-text.ts","../src/composables/use-waapi.ts","../src/composables/use-scope.ts","../src/directives/v-animate.ts","../src/directives/v-draggable.ts","../src/directives/v-svg-drawable.ts","../src/directives/v-waapi.ts","../src/directives/v-text-split.ts"],"sourcesContent":["import { type Ref, type ComponentPublicInstance, type MaybeRef } from \"vue\"\nimport { unrefElement, type MaybeComputedElementRef } from \"@vueuse/core\"\nimport { type TargetsParam } from \"animejs\"\n\n/**\n * A single valid animation target: any Anime.js `TargetsParam` (optionally wrapped in a `Ref`),\n * or a Vue component template ref (`Ref<ComponentPublicInstance>`), whose `.$el` is resolved\n * automatically via `unrefElement`.\n */\nexport type AnimationTarget = MaybeRef<TargetsParam> | Ref<ComponentPublicInstance>\n\n/**\n * Any valid animation target, or a plain array of them — e.g. an array of individual\n * template refs (`[ref1, ref2, ref3]`). Each item in an array is resolved independently.\n */\nexport type AnimationTargets = AnimationTarget | AnimationTarget[]\n\n/**\n * Resolves an `AnimationTargets` value to a plain `TargetsParam` suitable for Anime.js.\n * Unwraps `Ref<HTMLElement | SVGElement>` template refs and `Ref<ComponentPublicInstance>`\n * component refs (extracting `.$el`); non-ref values pass through unchanged.\n *\n * A plain array is resolved item by item; entries that resolve to `null`/`undefined` (e.g.\n * a template ref not yet mounted) are filtered out, and an all-empty result becomes\n * `undefined` rather than `[]`, matching the \"target not ready\" behavior of a single ref.\n *\n * @param targets - A raw Anime.js target, a Vue template ref, a Vue component ref, or an array of these.\n */\nexport function resolveTarget(targets: AnimationTargets): TargetsParam {\n if (Array.isArray(targets)) {\n const resolved = targets.map(target => unrefElement(target as MaybeComputedElementRef)).filter(el => el != null)\n\n return (resolved.length > 0 ? resolved : undefined) as TargetsParam\n }\n\n return unrefElement(targets as MaybeComputedElementRef) as TargetsParam\n}","import { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { type JSAnimation, animate, type TargetsParam, type AnimationParams } from \"animejs\"\nimport { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\nexport interface UseAnimateReturn {\n /** The underlying Anime.js animation instance. `undefined` until the target is available. */\n animation: Readonly<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, a reactive ref to any of these, or an array of them.\n * @param _options - Anime.js animation parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useAnimate(_target: AnimationTargets, _options: MaybeRef<AnimationParams> = {}): UseAnimateReturn {\n const animation = shallowRef<JSAnimation>()\n\n const { stop } = watch(\n [() => resolveTarget(_target), () => unref(_options)],\n ([el, opt]) => {\n createAnimation(el, opt)\n },\n { flush: \"post\", immediate: !isRef(_target) && isClient }\n )\n\n tryOnUnmounted(() => {\n stop()\n cancel()\n })\n\n function createAnimation(el: TargetsParam, 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 = markRaw(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: shallowReadonly(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, type AnimationParams, type JSAnimation } from \"animejs\"\nimport { type MaybeRef, unref } from \"vue\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\n/** The Anime.js `JSAnimation` instance returned by `useRawAnimate`. */\nexport type UseRawAnimateReturn = JSAnimation\n\n/**\n * Thin wrapper around Anime.js `animate()`. Resolves the target (unwrapping refs and Vue component\n * refs via `.$el`) and immediately starts the animation.\n *\n * SSR-safety is the caller's responsibility: invoke this from inside your own `onMounted` (it runs\n * unconditionally and immediately, with no client-only guard), never at `setup()` top level.\n *\n * @param _target - The element(s) to animate. Accepts a template ref, a Vue component 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 useRawAnimate(\n _target: AnimationTargets,\n _options: MaybeRef<AnimationParams> = {}\n): UseRawAnimateReturn {\n const target = resolveTarget(_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 { markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { isClient, tryOnMounted, tryOnUnmounted } from \"@vueuse/core\"\n\nexport interface UseTimerReturn {\n /** The underlying Anime.js timer instance. `undefined` until mounted. */\n timer: Readonly<ShallowRef<Timer | undefined>>\n /** Starts or resumes the timer. */\n play: () => Timer | undefined\n /** Reverses the timer's playback direction. */\n reverse: () => Timer | undefined\n /** Pauses the timer at the current position. */\n pause: () => Timer | undefined\n /** Restarts the timer from the beginning. */\n restart: () => Timer | undefined\n /** Toggles between forward and reverse direction. */\n alternate: () => Timer | undefined\n /** Resumes from a paused state. */\n resume: () => Timer | undefined\n /** Jumps immediately to the end of the timer duration. */\n complete: () => Timer | undefined\n /** Resets the timer to its initial state. Pass `true` for a soft reset that preserves the current cycle. */\n reset: (softReset?: boolean) => Timer | undefined\n /** Stops the timer and removes it from the Anime.js engine. */\n cancel: () => Timer | undefined\n /** Cancels the timer and restores any associated state to its original values. */\n revert: () => Timer | undefined\n /** Seeks to a specific time (in ms). */\n seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timer | undefined\n /** Rescales the timer to a new total duration. */\n stretch: (newDuration: number) => Timer | undefined\n}\n\n/**\n * Wraps Anime.js `createTimer()` into a Vue composable. Reactively re-creates the timer when options change, and cancels it automatically on unmount.\n *\n * @param options - Anime.js timer parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useTimer(options: MaybeRef<TimerParams> = {}): UseTimerReturn {\n const timer = shallowRef<Timer>()\n // Guards against the mount-time watch tick and tryOnMounted both building from the same options.\n let last_built_from: TimerParams | undefined\n\n function createFromOptions(_options: TimerParams) {\n if (_options === last_built_from) return\n last_built_from = _options\n cancel()\n timer.value = markRaw(createTimer(_options))\n }\n\n tryOnMounted(() => {\n createFromOptions(unref(options))\n })\n\n const { stop } = watch(\n () => unref(options),\n options => {\n if (!isClient) return\n createFromOptions(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: shallowReadonly(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 {\n markRaw,\n type MaybeRef,\n type MaybeRefOrGetter,\n shallowReadonly,\n type ShallowRef,\n shallowRef,\n toValue,\n unref,\n watch,\n} from \"vue\"\nimport {\n type AnimationParams,\n type Callback,\n createTimeline,\n type StaggerFunction,\n type Tickable,\n type Timeline,\n type TimelineParams,\n type TimelinePosition,\n type Timer,\n} from \"animejs\"\nimport { isClient, tryOnMounted, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\ntype QueueEntry =\n | {\n type: \"add\"\n targets: AnimationTargets\n params: MaybeRefOrGetter<AnimationParams>\n position?: TimelinePosition | StaggerFunction<number | string>\n }\n | { type: \"set\"; targets: AnimationTargets; params: MaybeRefOrGetter<AnimationParams>; position?: TimelinePosition }\n | { type: \"call\"; callback: Callback<Timer>; position?: TimelinePosition }\n\nexport type TimelineChain = Timeline & {\n /** Adds an animation to the timeline and returns a chainable object. */\n add: (\n targets: AnimationTargets,\n params: MaybeRefOrGetter<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: (\n targets: AnimationTargets,\n params: MaybeRefOrGetter<AnimationParams>,\n position?: TimelinePosition\n ) => TimelineChain\n /** Removes an animation target (or a specific property) from the timeline and returns a chainable object. */\n remove: (targets: AnimationTargets, propertyName?: string) => TimelineChain\n}\n\nexport interface UseTimelineReturn {\n /** The underlying Anime.js timeline instance. `undefined` until mounted. */\n timeline: Readonly<ShallowRef<Timeline | undefined>>\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: AnimationTargets,\n params: MaybeRefOrGetter<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: (\n targets: AnimationTargets,\n params: MaybeRefOrGetter<AnimationParams>,\n position?: TimelinePosition\n ) => TimelineChain\n /** Removes an animation target (or a specific property) from the timeline. Returns a chainable object. */\n remove: (targets: AnimationTargets, propertyName?: string) => TimelineChain\n /** Synchronises another tickable (animation, timer) into the timeline at the given position. */\n sync: (synced?: Tickable, position?: TimelinePosition) => Timeline | undefined\n /** Adds a named label at a position so it can be referenced by `.add()` or `.seek()`. */\n label: (labelName: string, position?: TimelinePosition) => Timeline | undefined\n /** Inserts a callback function at a specific point in the timeline. */\n call: (callback: Callback<Timer>, position?: TimelinePosition) => Timeline | undefined\n /** Renders the timeline once without playing it. */\n init: (internalRender?: boolean) => Timeline | undefined\n /** Starts or resumes the timeline. */\n play: () => Timeline | undefined\n /** Reverses playback direction. */\n reverse: () => Timeline | undefined\n /** Pauses the timeline at the current position. */\n pause: () => Timeline | undefined\n /** Restarts the timeline from the beginning. */\n restart: () => Timeline | undefined\n /** Toggles between forward and reverse direction. */\n alternate: () => Timeline | undefined\n /** Resumes from a paused state. */\n resume: () => Timeline | undefined\n /** Jumps immediately to the end of the timeline. */\n complete: () => Timeline | undefined\n /** Resets the timeline to its initial state. Pass `true` for a soft reset that preserves the current cycle. */\n reset: (softReset?: boolean) => Timeline | undefined\n /** Stops the timeline and removes it from the Anime.js engine. */\n cancel: () => Timeline | undefined\n /** Cancels the timeline and restores all animated properties to their original values. */\n revert: () => Timeline | undefined\n /** Seeks to a specific time (in ms). */\n seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timeline | undefined\n /** Rescales the timeline to a new total duration. */\n stretch: (newDuration: number) => Timeline | undefined\n /** Re-reads the current values of all animated properties from the DOM. */\n refresh: () => Timeline | undefined\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 // Guards against the mount-time watch tick and tryOnMounted both building from the same options.\n let last_built_from: TimelineParams | undefined\n\n const queue: QueueEntry[] = []\n\n const timeline = shallowRef<Timeline>()\n\n function replayQueue() {\n for (const entry of queue) {\n if (entry.type === \"add\") {\n timeline.value?.add(resolveTarget(entry.targets), toValue(entry.params), entry.position)\n } else if (entry.type === \"set\") {\n timeline.value?.set(resolveTarget(entry.targets), toValue(entry.params), entry.position)\n } else {\n timeline.value?.call(entry.callback, entry.position)\n }\n }\n }\n\n function createFromOptions(_options: TimelineParams) {\n if (_options === last_built_from) return\n last_built_from = _options\n revert()\n timeline.value = markRaw(createTimeline(_options))\n replayQueue()\n }\n\n const { stop } = watch(\n () => unref(options),\n _options => {\n if (!isClient) return\n createFromOptions(_options)\n },\n { flush: \"post\", deep: 1 }\n )\n\n tryOnMounted(() => {\n createFromOptions(unref(options))\n is_mounted = true\n })\n\n tryOnUnmounted(() => {\n stop()\n cancel()\n })\n\n function add(\n targets: AnimationTargets,\n _params: MaybeRefOrGetter<AnimationParams>,\n position?: TimelinePosition | StaggerFunction<number | string>\n ) {\n queue.push({ type: \"add\", targets, params: _params, position })\n\n if (is_mounted) {\n return {\n ...timeline.value?.add(resolveTarget(targets), toValue(_params), position),\n add,\n set,\n remove,\n } as TimelineChain\n }\n\n return { ...timeline.value, add, set, remove } as TimelineChain\n }\n\n function set(targets: AnimationTargets, _params: MaybeRefOrGetter<AnimationParams>, position?: TimelinePosition) {\n queue.push({ type: \"set\", targets, params: _params, position })\n\n if (is_mounted) {\n return {\n ...timeline.value?.set(resolveTarget(targets), toValue(_params), position),\n add,\n set,\n remove,\n } as TimelineChain\n }\n\n return { ...timeline.value, add, set, remove } as TimelineChain\n }\n\n function remove(targets: AnimationTargets, 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(resolveTarget(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 queue.push({ type: \"call\", callback, position })\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: shallowReadonly(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 {\n type Animatable,\n type AnimatableParams,\n type AnimatableProperty,\n type AnimatablePropertyParamsOptions,\n createAnimatable,\n type TargetsParam,\n} from \"animejs\"\nimport {\n computed,\n isRef,\n markRaw,\n type MaybeRef,\n shallowReadonly,\n type ShallowRef,\n shallowRef,\n unref,\n watch,\n} from \"vue\"\nimport { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\n/** The keys of `T` that represent animatable properties, excluding Anime.js's reserved config keys (`ease`, `duration`, `unit`, `modifier`, `composition`). */\nexport type AnimatablePropertyKeys<T extends AnimatableParams> = Exclude<keyof T, keyof AnimatablePropertyParamsOptions>\n\n/** An `AnimatableObject` narrowed to only the property setters/getters implied by `T`. */\nexport type TypedAnimatableObject<T extends AnimatableParams> = Animatable & {\n [K in AnimatablePropertyKeys<T>]: AnimatableProperty\n}\n\nexport interface UseAnimatableReturn<T extends AnimatableParams = AnimatableParams> {\n /** The underlying Anime.js animatable instance. `undefined` until the target is available. */\n animatable: Readonly<ShallowRef<TypedAnimatableObject<T> | undefined>>\n /** Cancels the animatable and restores all animated properties to their original values. */\n revert: () => TypedAnimatableObject<T> | undefined\n}\n\n/**\n * Wraps Anime.js `createAnimatable()` into a Vue composable. Reactively re-creates the animatable when the target or options change, and reverts it automatically on unmount.\n *\n * @param targets - The element(s) to make animatable. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param options - Anime.js animatable parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useAnimatable<T extends AnimatableParams = AnimatableParams>(\n targets: AnimationTargets,\n options: MaybeRef<T> = {} as T\n): UseAnimatableReturn<T> {\n const animatable = shallowRef<TypedAnimatableObject<T>>()\n\n const watch_target = computed<{ el: TargetsParam; opt: T }>(() => ({\n el: resolveTarget(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 = markRaw(createAnimatable(el, opt) as unknown as TypedAnimatableObject<T>)\n },\n { flush: \"post\", immediate: !isRef(targets) && isClient }\n )\n\n tryOnUnmounted(() => {\n stop()\n revert()\n })\n\n function revert() {\n return animatable.value?.revert()\n }\n\n return { animatable: shallowReadonly(animatable), revert }\n}","import { type AnimatableObject, type AnimatableParams, createAnimatable } from \"animejs\"\nimport { type MaybeRef, unref } from \"vue\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\n/** The Anime.js `AnimatableObject` instance returned by `useRawAnimatable`. */\nexport type UseRawAnimatableReturn = AnimatableObject\n\n/**\n * Thin wrapper around Anime.js `createAnimatable()`. Resolves the target (unwrapping refs and Vue\n * component refs via `.$el`) and immediately creates the animatable.\n *\n * SSR-safety is the caller's responsibility: invoke this from inside your own `onMounted` (it runs\n * unconditionally and immediately, with no client-only guard), never at `setup()` top level.\n *\n * @param targets - The element(s) to make animatable. Accepts a template ref, a Vue component ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param options - Anime.js animatable parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useRawAnimatable(\n targets: AnimationTargets,\n options: MaybeRef<AnimatableParams> = {}\n): UseRawAnimatableReturn {\n const target = resolveTarget(targets)\n\n if (!target) {\n console.warn(\"Targets element is null or undefined\")\n }\n\n return createAnimatable(target, unref(options))\n}","import { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type Draggable, type DraggableParams, createDraggable, type EasingParam } from \"animejs\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\nexport interface UseDraggableReturn {\n /** The underlying Anime.js draggable instance. `undefined` until the target is available. */\n draggable: Readonly<ShallowRef<Draggable | undefined>>\n /** Disables drag interactions without destroying the instance. */\n disable: () => void\n /** Re-enables drag interactions after `disable()`. */\n enable: () => void\n /** Moves the draggable to the given x position. Pass `true` to suppress the update callback. */\n setX: (x: number, muteUpdateCallback?: boolean) => void\n /** Moves the draggable to the given y position. Pass `true` to suppress the update callback. */\n setY: (y: number, muteUpdateCallback?: boolean) => void\n /** Animates the draggable into the visible viewport. */\n animateInView: (duration?: number, gap?: number, ease?: EasingParam) => void\n /** Scrolls the draggable into the visible viewport. */\n scrollInView: (duration?: number, gap?: number, ease?: EasingParam) => void\n /** Stops any in-progress snap or momentum animation. */\n stop: () => void\n /** Resets the draggable position to its initial state. */\n reset: () => void\n /** Cancels the draggable and restores the element to its original state. */\n revert: () => void\n /** Re-reads the element's size and container bounds. */\n refresh: () => void\n}\n\n/**\n * Wraps Anime.js `createDraggable()` into a Vue composable. Reactively re-creates the draggable when the target or options change, and reverts it automatically on unmount.\n *\n * @param targets - The element(s) to make draggable. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param options - Anime.js draggable parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useDraggable(targets: AnimationTargets, options: MaybeRef<DraggableParams> = {}): UseDraggableReturn {\n const draggable = shallowRef<Draggable>()\n\n const { stop: stopWatch } = watch(\n [() => resolveTarget(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 = markRaw(createDraggable(el, opt))\n },\n { flush: \"post\", immediate: !isRef(targets) && isClient }\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: shallowReadonly(draggable),\n disable,\n enable,\n setX,\n setY,\n animateInView,\n scrollInView,\n stop,\n reset,\n revert,\n refresh,\n }\n}","import { isClient, type MaybeComputedElementRef, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\nimport {\n type AutoLayout,\n type AutoLayoutParams,\n createLayout,\n type DOMTargetSelector,\n type LayoutAnimationParams,\n type Timeline,\n} from \"animejs\"\nimport { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseLayoutReturn {\n /** The underlying Anime.js `AutoLayout` instance. `undefined` until the root element is available. */\n layout: Readonly<ShallowRef<AutoLayout | undefined>>\n /** Snapshots the current positions of all tracked children so the next layout change can be animated. */\n record: () => void\n /** Animates all children from their recorded positions to their new positions. */\n animate: (params?: LayoutAnimationParams) => Timeline | undefined\n /** Records, applies the callback (which triggers a layout change), then animates the transition. */\n update: (callback: (layout: AutoLayout) => void, params?: LayoutAnimationParams) => void\n /** Cancels the layout watcher and restores all elements to their original state. */\n revert: () => void\n}\n\n/**\n * Wraps Anime.js `createLayout()` into a Vue composable. Reactively re-creates the layout observer when the root element or params change, and reverts it automatically on unmount.\n *\n * @param root - The container element whose children will be tracked. Accepts a template ref, a CSS selector, or a reactive ref to either.\n * @param params - Anime.js auto-layout parameters. Accepts a plain object or a reactive ref / computed.\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 [() => resolveTarget(root as AnimationTargets), () => unref(params)],\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 = markRaw(createLayout(el as DOMTargetSelector, opt))\n },\n { flush: \"post\", immediate: !isRef(root) && isClient }\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: shallowReadonly(layout), record, animate, update, revert }\n}","import { svg, type FunctionValue, type TargetsParam } from \"animejs\"\nimport { type MaybeRef, unref } from \"vue\"\n\nexport interface UseSvgReturn {\n /** Returns a `FunctionValue` that morphs the current path to the given `path`. Pass the result as the `d` property in `useAnimate` options. */\n morphTo: (path: MaybeRef<TargetsParam>, precision?: MaybeRef<number>) => FunctionValue\n /** Creates a motion-path object from an SVG `<path>`. Spread the result into `useAnimate` options to animate `translateX`, `translateY`, and `rotate` along the path. */\n createMotionPath: (\n path: MaybeRef<TargetsParam | null>,\n offset?: MaybeRef<number>\n ) => ReturnType<typeof svg.createMotionPath>\n}\n\n/**\n * Exposes Anime.js SVG utilities (`svg.morphTo`, `svg.createMotionPath`) as a Vue composable, automatically unwrapping reactive refs passed to each helper.\n *\n * For drawable stroke animations, use `useSvgDrawable` instead.\n */\nexport function useSvg(): UseSvgReturn {\n function morphTo(_path: MaybeRef<TargetsParam>, precision?: MaybeRef<number>): FunctionValue {\n return (target, index, targets, prevTween) => {\n const path = unref(_path)\n\n if (!path) return \"\"\n\n return svg.morphTo(path, unref(precision))(target, index, targets, prevTween)\n }\n }\n\n function createMotionPath(path: MaybeRef<TargetsParam | null>, offset?: MaybeRef<number>) {\n const resolved = unref(path) ?? \"\"\n return svg.createMotionPath(resolved, unref(offset))\n }\n\n return {\n morphTo,\n createMotionPath,\n }\n}","import { svg, type DrawableSVGGeometry, type DOMTargetSelector } from \"animejs\"\nimport { isClient, type MaybeComputedElementRef, tryOnUnmounted } from \"@vueuse/core\"\nimport { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\nexport interface UseSvgDrawableReturn {\n /**\n * The Anime.js drawable Proxy for the target element. `undefined` until the element is available.\n * Pass this ref — not the original template ref — as the `useAnimate` target to animate the `draw` property.\n */\n drawable: Readonly<ShallowRef<DrawableSVGGeometry | undefined>>\n}\n\n/**\n * Wraps an SVG geometry element in Anime.js's drawable Proxy. The proxy intercepts `setAttribute('draw', …)` calls and translates normalised `draw` values (`0`–`1`) into the correct `stroke-dasharray` / `stroke-dashoffset` updates. Pass the returned `drawable` ref as the target to `useAnimate`.\n *\n * @param target - The SVG element to make drawable. Accepts a template ref, a CSS selector, or a reactive ref to either.\n * @param start - Initial draw start position (`0`–`1`). Defaults to `0`.\n * @param end - Initial draw end position (`0`–`1`). Defaults to `0` (fully hidden).\n */\nexport function useSvgDrawable(\n target: MaybeRef<DOMTargetSelector> | MaybeComputedElementRef,\n start: MaybeRef<number> = 0,\n end: MaybeRef<number> = 0\n): UseSvgDrawableReturn {\n const drawable = shallowRef<DrawableSVGGeometry | undefined>()\n\n const { stop } = watch(\n () => resolveTarget(target as AnimationTargets),\n el => {\n drawable.value = undefined\n if (!el) {\n console.warn(\"[useSvgDrawable] Target element is null or undefined\")\n return\n }\n drawable.value = markRaw(svg.createDrawable(el as DOMTargetSelector, unref(start), unref(end))[0])\n },\n { flush: \"post\", immediate: !isRef(target) && isClient }\n )\n\n tryOnUnmounted(() => {\n stop()\n drawable.value = undefined\n })\n\n return { drawable: shallowReadonly(drawable) }\n}","import { splitText, type TextSplitter, type TextSplitterParams } from \"animejs\"\nimport { isClient, type MaybeComputedElementRef, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\nimport {\n computed,\n isRef,\n markRaw,\n shallowReadonly,\n shallowRef,\n unref,\n watch,\n type ComputedRef,\n type MaybeRef,\n type ShallowRef,\n} from \"vue\"\n\nexport interface UseTextReturn {\n /** The underlying Anime.js `TextSplitter` instance. `undefined` until the target is available. */\n splitter: Readonly<ShallowRef<TextSplitter | undefined>>\n /** Reactive array of `<span>` elements representing each line after splitting. */\n lines: ComputedRef<HTMLElement[]>\n /** Reactive array of `<span>` elements representing each word after splitting. */\n words: ComputedRef<HTMLElement[]>\n /** Reactive array of `<span>` elements representing each character after splitting. */\n chars: ComputedRef<HTMLElement[]>\n /** Removes all split `<span>` wrappers and restores the original text content. */\n revert: () => void\n /** Re-splits the text, updating `lines`, `words`, and `chars` to reflect any DOM or size changes. */\n refresh: () => void\n}\n\n/**\n * Wraps Anime.js `splitText()` into a Vue composable. Reactively re-splits the text when the target or params change, and reverts the DOM automatically on unmount.\n *\n * @param _target - The element(s) whose text content should be split. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param _params - Anime.js text-splitter parameters. Accepts a plain object or a reactive ref / computed.\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 const { stop } = watch(\n [() => resolveTarget(_target as AnimationTargets), () => unref(_params)],\n ([el, params]) => {\n revert()\n splitter.value = undefined\n\n if (!el) return\n\n splitter.value = markRaw(splitText(el as HTMLElement | NodeList | string | HTMLElement[], params))\n },\n { flush: \"post\", immediate: !isRef(_target) && isClient }\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: shallowReadonly(splitter),\n lines,\n words,\n chars,\n revert,\n refresh,\n }\n}","import { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\nimport {\n type WAAPIAnimationParams,\n type DOMTargetsParam,\n waapi,\n type WAAPIAnimation,\n type EasingFunction,\n} from \"animejs\"\nimport { isRef, markRaw, type MaybeRef, shallowReadonly, ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseWaapiReturn {\n /** The underlying Anime.js WAAPI animation instance. `undefined` until the target is available. */\n animation: Readonly<ShallowRef<WAAPIAnimation | undefined>>\n /** Resumes from a paused state. */\n resume: () => WAAPIAnimation | undefined\n /** Pauses the animation at the current position. */\n pause: () => WAAPIAnimation | undefined\n /** Toggles between forward and reverse direction. */\n alternate: () => WAAPIAnimation | undefined\n /** Starts or resumes the animation. */\n play: () => WAAPIAnimation | undefined\n /** Reverses playback direction. */\n reverse: () => WAAPIAnimation | undefined\n /** Seeks to a specific time (in ms). Accepts a reactive ref for the time value. */\n seek: (time: MaybeRef<number>, muteCallbacks?: MaybeRef<boolean>) => WAAPIAnimation | undefined\n /** Restarts the animation from the beginning. */\n restart: () => WAAPIAnimation | undefined\n /** Commits the current animated styles to the element's inline style, then cancels the animation. */\n commitStyles: () => WAAPIAnimation | undefined\n /** Jumps immediately to the end of the animation. */\n complete: () => WAAPIAnimation | undefined\n /** Stops the animation and removes it from the WAAPI engine. */\n cancel: () => WAAPIAnimation | undefined\n /** Cancels the animation and restores all animated properties to their original values. */\n revert: () => WAAPIAnimation | undefined\n /** Converts an Anime.js easing function to a CSS `cubic-bezier()` string usable by WAAPI. */\n convertEase: (fn: MaybeRef<EasingFunction>, samples?: MaybeRef<number>) => string\n}\n\n/**\n * Wraps Anime.js `waapi.animate()` into a Vue composable. Reactively re-creates the WAAPI animation when the target or options change, and stops it automatically on unmount.\n *\n * @param targets - The DOM element(s) to animate via WAAPI. Accepts a template ref, a CSS selector, a DOM element, a reactive ref to any of these, or an array of them.\n * @param options - Anime.js WAAPI animation parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useWaapi(targets: AnimationTargets, options: MaybeRef<WAAPIAnimationParams> = {}): UseWaapiReturn {\n const animation = shallowRef<WAAPIAnimation | undefined>()\n\n const { stop } = watch(\n [() => resolveTarget(targets), () => unref(options)],\n ([el, opt]) => {\n animation.value = markRaw(waapi.animate(el as DOMTargetsParam, opt))\n },\n { flush: \"post\", immediate: !isRef(targets) && isClient }\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: shallowReadonly(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 { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseScopeReturn {\n /** The underlying Anime.js `Scope` instance. */\n scope: Readonly<ShallowRef<Scope | undefined>>\n /** Registers an anonymous method on the scope. Queued automatically if called before mount. */\n add: (method: ScopeMethod) => void\n /** Registers a named method on the scope so it can be called via `scope.methods[name]()`. Queued automatically if called before mount. */\n registerMethod: (methodName: string, method: ScopeMethod) => void\n /** Registers a method that runs exactly once on the scope. Queued automatically if called before mount. */\n addOnce: (method: ScopeMethod) => void\n /** Keeps the time of another tickable (animation, timer) in sync with this scope. */\n keepTime: (method: (scope: Scope) => Tickable) => void\n /** Cancels the scope and reverts all animations and tickables it owns. */\n revert: () => void\n /** Re-reads default values and media-query breakpoints for the scope. */\n refresh: () => void\n}\n\n/**\n * Wraps Anime.js `createScope()` into a Vue composable. Reactively re-creates the scope when params change, replays all registered methods, and reverts it automatically on unmount.\n *\n * Methods added before mount are queued and replayed once the component is mounted.\n *\n * @param params - Anime.js scope parameters. Accepts a plain object or a reactive ref / computed.\n */\nexport function useScope(params: MaybeRef<ScopeParams>): UseScopeReturn {\n const scope = shallowRef<Scope | undefined>(undefined)\n\n const pending_adds: ScopeMethod[] = []\n const pending_named: [string, ScopeMethod][] = []\n const pending_once: ScopeMethod[] = []\n\n let is_mounted = false\n let stopWatcher: (() => void) | undefined\n\n tryOnMounted(() => {\n is_mounted = true\n scope.value = markRaw(createScope(unref(params)))\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 if (isRef(params)) {\n stopWatcher = watch(\n params,\n new_params => {\n scope.value?.revert()\n scope.value = markRaw(createScope(new_params))\n },\n { flush: \"post\" }\n )\n }\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}","import { animate, type AnimationParams, type JSAnimation } from \"animejs\"\nimport type { Directive } from \"vue\"\n\nconst instances = new WeakMap<HTMLElement, JSAnimation>()\n\n/**\n * Declarative animation directive. Applies an Anime.js animation to the element on mount,\n * re-creates it when the binding value changes, and reverts it on unmount.\n *\n * @example\n * <div v-animate=\"{ translateX: 250, duration: 800 }\" />\n * <div v-animate=\"reactiveOptions\" />\n */\nexport const vAnimate: Directive<HTMLElement, AnimationParams> = {\n mounted(el, binding) {\n if (binding.value) instances.set(el, animate(el, binding.value))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const prev = instances.get(el)\n prev?.cancel()\n prev?.revert()\n\n if (binding.value) instances.set(el, animate(el, binding.value))\n },\n unmounted(el) {\n const animation = instances.get(el)\n animation?.cancel()\n animation?.revert()\n instances.delete(el)\n },\n}","import { createDraggable, type Draggable, type DraggableParams } from \"animejs\"\nimport type { Directive } from \"vue\"\n\nconst instances = new WeakMap<HTMLElement, Draggable>()\n\n/**\n * Declarative draggable directive. Makes the element draggable on mount,\n * re-creates it when the binding value changes, and reverts it on unmount.\n *\n * @example\n * <div v-draggable />\n * <div v-draggable=\"{ snap: [0, 100] }\" />\n */\nexport const vDraggable: Directive<HTMLElement, DraggableParams | undefined> = {\n mounted(el, binding) {\n instances.set(el, createDraggable(el, binding.value ?? {}))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n instances.get(el)?.revert()\n instances.set(el, createDraggable(el, binding.value ?? {}))\n },\n unmounted(el) {\n instances.get(el)?.revert()\n instances.delete(el)\n },\n}","import { animate, svg, type AnimationParams, type DrawableSVGGeometry, type JSAnimation } from \"animejs\"\nimport type { Directive } from \"vue\"\n\ninterface Entry {\n drawable: DrawableSVGGeometry\n animation: JSAnimation | undefined\n}\n\nconst instances = new WeakMap<SVGGeometryElement, Entry>()\n\nfunction create(el: SVGGeometryElement, params: AnimationParams | undefined): Entry {\n const drawable = svg.createDrawable(el)[0]\n const animation = params ? animate(drawable, params) : undefined\n return { drawable, animation }\n}\n\n/**\n * Declarative SVG drawable directive. Wraps the SVG geometry element in an Anime.js drawable\n * Proxy and animates the `draw` property on mount. Re-creates it when the binding value changes\n * and reverts on unmount.\n *\n * @example\n * <path v-svg-drawable=\"{ draw: '0 1', duration: 1200 }\" />\n * <path v-svg-drawable=\"{ draw: ['0 0', '0.5 1', '0 1'], ease: 'inOutQuad', loop: true }\" />\n */\nexport const vSvgDrawable: Directive<SVGGeometryElement, AnimationParams | undefined> = {\n mounted(el, binding) {\n instances.set(el, create(el, binding.value))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const entry = instances.get(el)\n entry?.animation?.cancel()\n entry?.animation?.revert()\n instances.set(el, create(el, binding.value))\n },\n unmounted(el) {\n const entry = instances.get(el)\n entry?.animation?.cancel()\n entry?.animation?.revert()\n instances.delete(el)\n },\n}","import { waapi, type WAAPIAnimationParams, type WAAPIAnimation } from \"animejs\"\nimport type { Directive } from \"vue\"\n\ninterface Entry {\n animation: WAAPIAnimation\n originalStyle: string\n}\n\nconst instances = new WeakMap<HTMLElement, Entry>()\n\n/**\n * Declarative WAAPI animation directive. Applies an Anime.js WAAPI animation to the element on\n * mount, re-creates it when the binding value changes, and reverts it on unmount.\n *\n * @example\n * <div v-waapi=\"{ translateX: 250, duration: 800 }\" />\n * <div v-waapi=\"reactiveOptions\" />\n */\nexport const vWaapi: Directive<HTMLElement, WAAPIAnimationParams> = {\n mounted(el, binding) {\n if (binding.value) {\n instances.set(el, {\n animation: waapi.animate(el, binding.value),\n originalStyle: el.style.cssText,\n })\n }\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const entry = instances.get(el)\n if (entry) {\n entry.animation.cancel()\n el.style.cssText = entry.originalStyle\n instances.delete(el)\n }\n\n if (binding.value) {\n instances.set(el, {\n animation: waapi.animate(el, binding.value),\n originalStyle: el.style.cssText,\n })\n }\n },\n unmounted(el) {\n const entry = instances.get(el)\n if (entry) {\n entry.animation.cancel()\n el.style.cssText = entry.originalStyle\n instances.delete(el)\n }\n },\n}","import {\n animate,\n splitText,\n type AnimationParams,\n type JSAnimation,\n type TextSplitter,\n type TextSplitterParams,\n} from \"animejs\"\nimport type { Directive } from \"vue\"\n\nexport interface VTextSplitValue extends TextSplitterParams {\n animation?: AnimationParams\n}\n\ninterface Entry {\n splitter: TextSplitter\n animation: JSAnimation | undefined\n}\n\nconst instances = new WeakMap<HTMLElement, Entry>()\n\nfunction create(el: HTMLElement, value: VTextSplitValue | undefined): Entry {\n const { animation: anim_params, ...splitter_params } = value ?? {}\n const splitter = splitText(el, splitter_params)\n const entry: Entry = { splitter, animation: undefined }\n\n if (anim_params) {\n if (splitter_params.lines) {\n // Line detection waits for document.fonts.ready — defer animation until splitter.lines is populated.\n ;(document.fonts?.ready ?? Promise.resolve()).then(() => {\n if (instances.get(el) === entry) {\n entry.animation = animate(splitter.lines, anim_params)\n }\n })\n } else {\n const targets = splitter_params.chars ? splitter.chars : splitter.words\n entry.animation = animate(targets, anim_params)\n }\n }\n\n return entry\n}\n\nfunction destroy(entry: Entry) {\n entry.animation?.cancel()\n entry.splitter.revert()\n}\n\n/**\n * Declarative text-split directive. Splits the element's text into chars, words, or lines on\n * mount, and optionally animates the resulting spans. Re-creates on binding change, reverts on unmount.\n *\n * @example\n * <p v-text-split=\"{ words: true, animation: { translateY: [20, 0], opacity: [0, 1], delay: stagger(60) } }\">Hello</p>\n * <p v-text-split=\"{ chars: true, animation: { opacity: [0, 1], delay: stagger(30) } }\">Hello</p>\n * <p v-text-split=\"{ lines: true, animation: { translateX: [-20, 0], delay: stagger(100) } }\">Hello</p>\n */\nexport const vTextSplit: Directive<HTMLElement, VTextSplitValue | undefined> = {\n mounted(el, binding) {\n instances.set(el, create(el, binding.value))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const entry = instances.get(el)\n if (entry) destroy(entry)\n instances.set(el, create(el, binding.value))\n },\n unmounted(el) {\n const entry = instances.get(el)\n if (entry) destroy(entry)\n instances.delete(el)\n },\n}"],"mappings":";;;;AA4BA,SAAgB,EAAc,GAAyC;CACrE,IAAI,MAAM,QAAQ,CAAO,GAAG;EAC1B,IAAM,IAAW,EAAQ,KAAI,MAAU,EAAa,CAAiC,CAAC,CAAC,CAAC,QAAO,MAAM,KAAM,IAAI;EAE/G,OAAQ,EAAS,SAAS,IAAI,IAAW,KAAA;CAC3C;CAEA,OAAO,EAAa,CAAkC;AACxD;;;ACMA,SAAgB,EAAW,GAA2B,IAAsC,CAAC,GAAqB;CAChH,IAAM,IAAY,EAAwB,GAEpC,EAAE,YAAS,EACf,OAAO,EAAc,CAAO,SAAS,EAAM,CAAQ,CAAC,IACnD,CAAC,GAAI,OAAS;EACb,EAAgB,GAAI,CAAG;CACzB,GACA;EAAE,OAAO;EAAQ,WAAW,CAAC,EAAM,CAAO,KAAK;CAAS,CAC1D;CAEA,QAAqB;EAEnB,AADA,EAAK,GACL,EAAO;CACT,CAAC;CAED,SAAS,EAAgB,GAAkB,GAAsB;EAG/D,IAFA,EAAO,GAEH,CAAC,GAAI;GAEP,AADA,QAAQ,KAAK,qCAAqC,GAClD,EAAU,QAAQ,KAAA;GAClB;EACF;EAEA,EAAU,QAAQ,EAAQ,EAAQ,GAAI,CAAG,CAAC;CAC5C;CAEA,SAAS,IAAO;EACd,OAAO,EAAU,OAAO,KAAK;CAC/B;CAEA,SAAS,IAAU;EACjB,OAAO,EAAU,OAAO,QAAQ;CAClC;CAEA,SAAS,IAAQ;EACf,OAAO,EAAU,OAAO,MAAM;CAChC;CAEA,SAAS,IAAU;EACjB,OAAO,EAAU,OAAO,QAAQ;CAClC;CAEA,SAAS,IAAY;EACnB,OAAO,EAAU,OAAO,UAAU;CACpC;CAEA,SAAS,IAAS;EAChB,OAAO,EAAU,OAAO,OAAO;CACjC;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AQ,CAAK,GACxB,EAAU,IAAI,GAAI,EAAO,GAAI,EAAQ,KAAK,CAAC;CAC7C;CACA,UAAU,GAAI;EACZ,IAAM,IAAQ,EAAU,IAAI,CAAE;EAE9B,AADI,KAAO,EAAQ,CAAK,GACxB,EAAU,OAAO,CAAE;CACrB;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/utils/resolve-target.ts","../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-raw-animatable.ts","../src/composables/use-draggable.ts","../src/composables/use-layout.ts","../src/composables/use-scroll.ts","../src/composables/use-svg.ts","../src/composables/use-svg-drawable.ts","../src/composables/use-text.ts","../src/composables/use-waapi.ts","../src/composables/use-scope.ts","../src/directives/v-animate.ts","../src/directives/v-draggable.ts","../src/directives/v-svg-drawable.ts","../src/directives/v-waapi.ts","../src/directives/v-text-split.ts"],"sourcesContent":["import { type Ref, type ComponentPublicInstance, type MaybeRef } from \"vue\"\nimport { unrefElement, type MaybeComputedElementRef } from \"@vueuse/core\"\nimport { type TargetsParam } from \"animejs\"\n\n/**\n * A single valid animation target: any Anime.js `TargetsParam` (optionally wrapped in a `Ref`),\n * or a Vue component template ref (`Ref<ComponentPublicInstance>`), whose `.$el` is resolved\n * automatically via `unrefElement`.\n */\nexport type AnimationTarget = MaybeRef<TargetsParam> | Ref<ComponentPublicInstance>\n\n/**\n * Any valid animation target, or a plain array of them — e.g. an array of individual\n * template refs (`[ref1, ref2, ref3]`). Each item in an array is resolved independently.\n */\nexport type AnimationTargets = AnimationTarget | AnimationTarget[]\n\n/**\n * Resolves an `AnimationTargets` value to a plain `TargetsParam` suitable for Anime.js.\n * Unwraps `Ref<HTMLElement | SVGElement>` template refs and `Ref<ComponentPublicInstance>`\n * component refs (extracting `.$el`); non-ref values pass through unchanged.\n *\n * A plain array is resolved item by item; entries that resolve to `null`/`undefined` (e.g.\n * a template ref not yet mounted) are filtered out, and an all-empty result becomes\n * `undefined` rather than `[]`, matching the \"target not ready\" behavior of a single ref.\n *\n * @param targets - A raw Anime.js target, a Vue template ref, a Vue component ref, or an array of these.\n */\nexport function resolveTarget(targets: AnimationTargets): TargetsParam {\n if (Array.isArray(targets)) {\n const resolved = targets.map(target => unrefElement(target as MaybeComputedElementRef)).filter(el => el != null)\n\n return (resolved.length > 0 ? resolved : undefined) as TargetsParam\n }\n\n return unrefElement(targets as MaybeComputedElementRef) as TargetsParam\n}","import { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { type JSAnimation, animate, type TargetsParam, type AnimationParams } from \"animejs\"\nimport { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\nexport interface UseAnimateReturn {\n /** The underlying Anime.js animation instance. `undefined` until the target is available. */\n animation: Readonly<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, a reactive ref to any of these, or an array of them.\n * @param _options - Anime.js animation parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useAnimate(_target: AnimationTargets, _options: MaybeRef<AnimationParams> = {}): UseAnimateReturn {\n const animation = shallowRef<JSAnimation>()\n\n const { stop } = watch(\n [() => resolveTarget(_target), () => unref(_options)],\n ([el, opt]) => {\n createAnimation(el, opt)\n },\n { flush: \"post\", immediate: !isRef(_target) && isClient }\n )\n\n tryOnUnmounted(() => {\n stop()\n cancel()\n })\n\n function createAnimation(el: TargetsParam, 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 = markRaw(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: shallowReadonly(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, type AnimationParams, type JSAnimation } from \"animejs\"\nimport { type MaybeRef, unref } from \"vue\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\n/** The Anime.js `JSAnimation` instance returned by `useRawAnimate`. */\nexport type UseRawAnimateReturn = JSAnimation\n\n/**\n * Thin wrapper around Anime.js `animate()`. Resolves the target (unwrapping refs and Vue component\n * refs via `.$el`) and immediately starts the animation.\n *\n * SSR-safety is the caller's responsibility: invoke this from inside your own `onMounted` (it runs\n * unconditionally and immediately, with no client-only guard), never at `setup()` top level.\n *\n * @param _target - The element(s) to animate. Accepts a template ref, a Vue component 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 useRawAnimate(\n _target: AnimationTargets,\n _options: MaybeRef<AnimationParams> = {}\n): UseRawAnimateReturn {\n const target = resolveTarget(_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 { markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { isClient, tryOnMounted, tryOnUnmounted } from \"@vueuse/core\"\n\nexport interface UseTimerReturn {\n /** The underlying Anime.js timer instance. `undefined` until mounted. */\n timer: Readonly<ShallowRef<Timer | undefined>>\n /** Starts or resumes the timer. */\n play: () => Timer | undefined\n /** Reverses the timer's playback direction. */\n reverse: () => Timer | undefined\n /** Pauses the timer at the current position. */\n pause: () => Timer | undefined\n /** Restarts the timer from the beginning. */\n restart: () => Timer | undefined\n /** Toggles between forward and reverse direction. */\n alternate: () => Timer | undefined\n /** Resumes from a paused state. */\n resume: () => Timer | undefined\n /** Jumps immediately to the end of the timer duration. */\n complete: () => Timer | undefined\n /** Resets the timer to its initial state. Pass `true` for a soft reset that preserves the current cycle. */\n reset: (softReset?: boolean) => Timer | undefined\n /** Stops the timer and removes it from the Anime.js engine. */\n cancel: () => Timer | undefined\n /** Cancels the timer and restores any associated state to its original values. */\n revert: () => Timer | undefined\n /** Seeks to a specific time (in ms). */\n seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timer | undefined\n /** Rescales the timer to a new total duration. */\n stretch: (newDuration: number) => Timer | undefined\n}\n\n/**\n * Wraps Anime.js `createTimer()` into a Vue composable. Reactively re-creates the timer when options change, and cancels it automatically on unmount.\n *\n * @param options - Anime.js timer parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useTimer(options: MaybeRef<TimerParams> = {}): UseTimerReturn {\n const timer = shallowRef<Timer>()\n // Guards against the mount-time watch tick and tryOnMounted both building from the same options.\n let last_built_from: TimerParams | undefined\n\n function createFromOptions(_options: TimerParams) {\n if (_options === last_built_from) return\n last_built_from = _options\n cancel()\n timer.value = markRaw(createTimer(_options))\n }\n\n tryOnMounted(() => {\n createFromOptions(unref(options))\n })\n\n const { stop } = watch(\n () => unref(options),\n options => {\n if (!isClient) return\n createFromOptions(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: shallowReadonly(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 {\n markRaw,\n type MaybeRef,\n type MaybeRefOrGetter,\n shallowReadonly,\n type ShallowRef,\n shallowRef,\n toValue,\n unref,\n watch,\n} from \"vue\"\nimport {\n type AnimationParams,\n type Callback,\n createTimeline,\n type StaggerFunction,\n type Tickable,\n type Timeline,\n type TimelineParams,\n type TimelinePosition,\n type Timer,\n} from \"animejs\"\nimport { isClient, tryOnMounted, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\ntype QueueEntry =\n | {\n type: \"add\"\n targets: AnimationTargets\n params: MaybeRefOrGetter<AnimationParams>\n position?: TimelinePosition | StaggerFunction<number | string>\n }\n | { type: \"set\"; targets: AnimationTargets; params: MaybeRefOrGetter<AnimationParams>; position?: TimelinePosition }\n | { type: \"call\"; callback: Callback<Timer>; position?: TimelinePosition }\n\nexport type TimelineChain = Timeline & {\n /** Adds an animation to the timeline and returns a chainable object. */\n add: (\n targets: AnimationTargets,\n params: MaybeRefOrGetter<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: (\n targets: AnimationTargets,\n params: MaybeRefOrGetter<AnimationParams>,\n position?: TimelinePosition\n ) => TimelineChain\n /** Removes an animation target (or a specific property) from the timeline and returns a chainable object. */\n remove: (targets: AnimationTargets, propertyName?: string) => TimelineChain\n}\n\nexport interface UseTimelineReturn {\n /** The underlying Anime.js timeline instance. `undefined` until mounted. */\n timeline: Readonly<ShallowRef<Timeline | undefined>>\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: AnimationTargets,\n params: MaybeRefOrGetter<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: (\n targets: AnimationTargets,\n params: MaybeRefOrGetter<AnimationParams>,\n position?: TimelinePosition\n ) => TimelineChain\n /** Removes an animation target (or a specific property) from the timeline. Returns a chainable object. */\n remove: (targets: AnimationTargets, propertyName?: string) => TimelineChain\n /** Synchronises another tickable (animation, timer) into the timeline at the given position. */\n sync: (synced?: Tickable, position?: TimelinePosition) => Timeline | undefined\n /** Adds a named label at a position so it can be referenced by `.add()` or `.seek()`. */\n label: (labelName: string, position?: TimelinePosition) => Timeline | undefined\n /** Inserts a callback function at a specific point in the timeline. */\n call: (callback: Callback<Timer>, position?: TimelinePosition) => Timeline | undefined\n /** Renders the timeline once without playing it. */\n init: (internalRender?: boolean) => Timeline | undefined\n /** Starts or resumes the timeline. */\n play: () => Timeline | undefined\n /** Reverses playback direction. */\n reverse: () => Timeline | undefined\n /** Pauses the timeline at the current position. */\n pause: () => Timeline | undefined\n /** Restarts the timeline from the beginning. */\n restart: () => Timeline | undefined\n /** Toggles between forward and reverse direction. */\n alternate: () => Timeline | undefined\n /** Resumes from a paused state. */\n resume: () => Timeline | undefined\n /** Jumps immediately to the end of the timeline. */\n complete: () => Timeline | undefined\n /** Resets the timeline to its initial state. Pass `true` for a soft reset that preserves the current cycle. */\n reset: (softReset?: boolean) => Timeline | undefined\n /** Stops the timeline and removes it from the Anime.js engine. */\n cancel: () => Timeline | undefined\n /** Cancels the timeline and restores all animated properties to their original values. */\n revert: () => Timeline | undefined\n /** Seeks to a specific time (in ms). */\n seek: (time: number, muteCallbacks?: boolean | number, internalRender?: boolean | number) => Timeline | undefined\n /** Rescales the timeline to a new total duration. */\n stretch: (newDuration: number) => Timeline | undefined\n /** Re-reads the current values of all animated properties from the DOM. */\n refresh: () => Timeline | undefined\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 // Guards against the mount-time watch tick and tryOnMounted both building from the same options.\n let last_built_from: TimelineParams | undefined\n\n const queue: QueueEntry[] = []\n\n const timeline = shallowRef<Timeline>()\n\n function replayQueue() {\n for (const entry of queue) {\n if (entry.type === \"add\") {\n timeline.value?.add(resolveTarget(entry.targets), toValue(entry.params), entry.position)\n } else if (entry.type === \"set\") {\n timeline.value?.set(resolveTarget(entry.targets), toValue(entry.params), entry.position)\n } else {\n timeline.value?.call(entry.callback, entry.position)\n }\n }\n }\n\n function createFromOptions(_options: TimelineParams) {\n if (_options === last_built_from) return\n last_built_from = _options\n revert()\n timeline.value = markRaw(createTimeline(_options))\n replayQueue()\n }\n\n const { stop } = watch(\n () => unref(options),\n _options => {\n if (!isClient) return\n createFromOptions(_options)\n },\n { flush: \"post\", deep: 1 }\n )\n\n tryOnMounted(() => {\n createFromOptions(unref(options))\n is_mounted = true\n })\n\n tryOnUnmounted(() => {\n stop()\n cancel()\n })\n\n function add(\n targets: AnimationTargets,\n _params: MaybeRefOrGetter<AnimationParams>,\n position?: TimelinePosition | StaggerFunction<number | string>\n ) {\n queue.push({ type: \"add\", targets, params: _params, position })\n\n if (is_mounted) {\n return {\n ...timeline.value?.add(resolveTarget(targets), toValue(_params), position),\n add,\n set,\n remove,\n } as TimelineChain\n }\n\n return { ...timeline.value, add, set, remove } as TimelineChain\n }\n\n function set(targets: AnimationTargets, _params: MaybeRefOrGetter<AnimationParams>, position?: TimelinePosition) {\n queue.push({ type: \"set\", targets, params: _params, position })\n\n if (is_mounted) {\n return {\n ...timeline.value?.set(resolveTarget(targets), toValue(_params), position),\n add,\n set,\n remove,\n } as TimelineChain\n }\n\n return { ...timeline.value, add, set, remove } as TimelineChain\n }\n\n function remove(targets: AnimationTargets, 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(resolveTarget(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 queue.push({ type: \"call\", callback, position })\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: shallowReadonly(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 {\n type Animatable,\n type AnimatableParams,\n type AnimatableProperty,\n type AnimatablePropertyParamsOptions,\n createAnimatable,\n type TargetsParam,\n} from \"animejs\"\nimport {\n computed,\n isRef,\n markRaw,\n type MaybeRef,\n shallowReadonly,\n type ShallowRef,\n shallowRef,\n unref,\n watch,\n} from \"vue\"\nimport { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\n/** The keys of `T` that represent animatable properties, excluding Anime.js's reserved config keys (`ease`, `duration`, `unit`, `modifier`, `composition`). */\nexport type AnimatablePropertyKeys<T extends AnimatableParams> = Exclude<keyof T, keyof AnimatablePropertyParamsOptions>\n\n/** An `AnimatableObject` narrowed to only the property setters/getters implied by `T`. */\nexport type TypedAnimatableObject<T extends AnimatableParams> = Animatable & {\n [K in AnimatablePropertyKeys<T>]: AnimatableProperty\n}\n\nexport interface UseAnimatableReturn<T extends AnimatableParams = AnimatableParams> {\n /** The underlying Anime.js animatable instance. `undefined` until the target is available. */\n animatable: Readonly<ShallowRef<TypedAnimatableObject<T> | undefined>>\n /** Cancels the animatable and restores all animated properties to their original values. */\n revert: () => TypedAnimatableObject<T> | undefined\n}\n\n/**\n * Wraps Anime.js `createAnimatable()` into a Vue composable. Reactively re-creates the animatable when the target or options change, and reverts it automatically on unmount.\n *\n * @param targets - The element(s) to make animatable. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param options - Anime.js animatable parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useAnimatable<T extends AnimatableParams = AnimatableParams>(\n targets: AnimationTargets,\n options: MaybeRef<T> = {} as T\n): UseAnimatableReturn<T> {\n const animatable = shallowRef<TypedAnimatableObject<T>>()\n\n const watch_target = computed<{ el: TargetsParam; opt: T }>(() => ({\n el: resolveTarget(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 = markRaw(createAnimatable(el, opt) as unknown as TypedAnimatableObject<T>)\n },\n { flush: \"post\", immediate: !isRef(targets) && isClient }\n )\n\n tryOnUnmounted(() => {\n stop()\n revert()\n })\n\n function revert() {\n return animatable.value?.revert()\n }\n\n return { animatable: shallowReadonly(animatable), revert }\n}","import { type AnimatableObject, type AnimatableParams, createAnimatable } from \"animejs\"\nimport { type MaybeRef, unref } from \"vue\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\n/** The Anime.js `AnimatableObject` instance returned by `useRawAnimatable`. */\nexport type UseRawAnimatableReturn = AnimatableObject\n\n/**\n * Thin wrapper around Anime.js `createAnimatable()`. Resolves the target (unwrapping refs and Vue\n * component refs via `.$el`) and immediately creates the animatable.\n *\n * SSR-safety is the caller's responsibility: invoke this from inside your own `onMounted` (it runs\n * unconditionally and immediately, with no client-only guard), never at `setup()` top level.\n *\n * @param targets - The element(s) to make animatable. Accepts a template ref, a Vue component ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param options - Anime.js animatable parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useRawAnimatable(\n targets: AnimationTargets,\n options: MaybeRef<AnimatableParams> = {}\n): UseRawAnimatableReturn {\n const target = resolveTarget(targets)\n\n if (!target) {\n console.warn(\"Targets element is null or undefined\")\n }\n\n return createAnimatable(target, unref(options))\n}","import { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type Draggable, type DraggableParams, createDraggable, type EasingParam } from \"animejs\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\nexport interface UseDraggableReturn {\n /** The underlying Anime.js draggable instance. `undefined` until the target is available. */\n draggable: Readonly<ShallowRef<Draggable | undefined>>\n /** Disables drag interactions without destroying the instance. */\n disable: () => void\n /** Re-enables drag interactions after `disable()`. */\n enable: () => void\n /** Moves the draggable to the given x position. Pass `true` to suppress the update callback. */\n setX: (x: number, muteUpdateCallback?: boolean) => void\n /** Moves the draggable to the given y position. Pass `true` to suppress the update callback. */\n setY: (y: number, muteUpdateCallback?: boolean) => void\n /** Animates the draggable into the visible viewport. */\n animateInView: (duration?: number, gap?: number, ease?: EasingParam) => void\n /** Scrolls the draggable into the visible viewport. */\n scrollInView: (duration?: number, gap?: number, ease?: EasingParam) => void\n /** Stops any in-progress snap or momentum animation. */\n stop: () => void\n /** Resets the draggable position to its initial state. */\n reset: () => void\n /** Cancels the draggable and restores the element to its original state. */\n revert: () => void\n /** Re-reads the element's size and container bounds. */\n refresh: () => void\n}\n\n/**\n * Wraps Anime.js `createDraggable()` into a Vue composable. Reactively re-creates the draggable when the target or options change, and reverts it automatically on unmount.\n *\n * @param targets - The element(s) to make draggable. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param options - Anime.js draggable parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useDraggable(targets: AnimationTargets, options: MaybeRef<DraggableParams> = {}): UseDraggableReturn {\n const draggable = shallowRef<Draggable>()\n\n const { stop: stopWatch } = watch(\n [() => resolveTarget(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 = markRaw(createDraggable(el, opt))\n },\n { flush: \"post\", immediate: !isRef(targets) && isClient }\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: shallowReadonly(draggable),\n disable,\n enable,\n setX,\n setY,\n animateInView,\n scrollInView,\n stop,\n reset,\n revert,\n refresh,\n }\n}","import { isClient, type MaybeComputedElementRef, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\nimport {\n type AutoLayout,\n type AutoLayoutParams,\n createLayout,\n type DOMTargetSelector,\n type LayoutAnimationParams,\n type Timeline,\n} from \"animejs\"\nimport { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseLayoutReturn {\n /** The underlying Anime.js `AutoLayout` instance. `undefined` until the root element is available. */\n layout: Readonly<ShallowRef<AutoLayout | undefined>>\n /** Snapshots the current positions of all tracked children so the next layout change can be animated. */\n record: () => void\n /** Animates all children from their recorded positions to their new positions. */\n animate: (params?: LayoutAnimationParams) => Timeline | undefined\n /** Records, applies the callback (which triggers a layout change), then animates the transition. */\n update: (callback: (layout: AutoLayout) => void, params?: LayoutAnimationParams) => void\n /** Cancels the layout watcher and restores all elements to their original state. */\n revert: () => void\n}\n\n/**\n * Wraps Anime.js `createLayout()` into a Vue composable. Reactively re-creates the layout observer when the root element or params change, and reverts it automatically on unmount.\n *\n * @param root - The container element whose children will be tracked. Accepts a template ref, a CSS selector, or a reactive ref to either.\n * @param params - Anime.js auto-layout parameters. Accepts a plain object or a reactive ref / computed.\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 [() => resolveTarget(root as AnimationTargets), () => unref(params)],\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 = markRaw(createLayout(el as DOMTargetSelector, opt))\n },\n { flush: \"post\", immediate: !isRef(root) && isClient }\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: shallowReadonly(layout), record, animate, update, revert }\n}","import { computed, type ComputedRef, markRaw, type MaybeRef, unref } from \"vue\"\nimport { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { onScroll, type ScrollObserver, type ScrollObserverParams, type Tickable, type WAAPIAnimation } from \"animejs\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\nexport interface UseScrollReturn {\n /** The underlying Anime.js ScrollObserver. `undefined` until both container and target are available. */\n observer: ComputedRef<ScrollObserver | undefined>\n /** The observer, or `false` while it doesn't exist yet — plug straight into an `autoplay` option. */\n autoplay: ComputedRef<ScrollObserver | false>\n /** `{ autoplay }`, ready to pass straight as-is into `useTimeline`/`useTimer`/`useAnimate`'s options argument. */\n autoplayComputed: ComputedRef<{ autoplay: ScrollObserver | false }>\n /** Re-reads the container and target bounds. */\n refresh: () => ScrollObserver | undefined\n /** Cancels the observer and detaches its scroll listeners. */\n revert: () => ScrollObserver | undefined\n /** Renders the on-screen debug markers for the observer's thresholds. */\n debug: () => void\n /** Removes the on-screen debug markers. */\n removeDebug: () => ScrollObserver | undefined\n /** Links a tickable (animation, timer, timeline) or WAAPI animation to be driven by this observer. */\n link: (linked: Tickable | WAAPIAnimation) => ScrollObserver | undefined\n}\n\n/**\n * Wraps Anime.js `onScroll()` into a Vue composable. Reactively re-creates the ScrollObserver\n * when the container, target, or options change, and reverts it automatically on unmount.\n *\n * @param container - The scrollable container. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param target - The element whose scroll position is observed within `container`. Same accepted shapes as `container`.\n * @param options - Anime.js `ScrollObserverParams`, minus `container`/`target`. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useScroll(\n container: AnimationTargets,\n target: AnimationTargets,\n options: MaybeRef<Omit<ScrollObserverParams, \"container\" | \"target\">> = {}\n): UseScrollReturn {\n let current: ScrollObserver | undefined\n\n // Resolved inline in the computed (not via a `watch` writing to a separate ref) so every\n // reader — including a consumer composable's own mount-time watch and `tryOnMounted`, which\n // both read this in the same flush — observes the same memoized instance instead of a\n // transient `undefined` that flips to the real observer a tick later. That transient step\n // is what used to make `useTimeline`'s `autoplay` option change twice on mount, defeating its\n // same-reference dedup and building two timelines from one ScrollObserver (see the\n // \"Scroll-driven timeline (regression)\" demo in the playground).\n const observer = computed<ScrollObserver | undefined>(() => {\n current?.revert()\n current = undefined\n\n if (!isClient) return undefined\n\n const container_el = resolveTarget(container)\n const target_el = resolveTarget(target)\n\n if (!container_el || !target_el) return undefined\n\n current = markRaw(onScroll({ ...unref(options), container: container_el, target: target_el }))\n return current\n })\n\n const autoplay = computed<ScrollObserver | false>(() => observer.value ?? false)\n const autoplay_computed = computed(() => ({ autoplay: autoplay.value }))\n\n tryOnUnmounted(() => current?.revert())\n\n function refresh() {\n return observer.value?.refresh()\n }\n\n function revert() {\n return observer.value?.revert()\n }\n\n function debug() {\n observer.value?.debug()\n }\n\n function removeDebug() {\n return observer.value?.removeDebug()\n }\n\n function link(linked: Tickable | WAAPIAnimation) {\n return observer.value?.link(linked)\n }\n\n return {\n observer,\n autoplay,\n autoplayComputed: autoplay_computed,\n refresh,\n revert,\n debug,\n removeDebug,\n link,\n }\n}","import { svg, type FunctionValue, type TargetsParam } from \"animejs\"\nimport { type MaybeRef, unref } from \"vue\"\n\nexport interface UseSvgReturn {\n /** Returns a `FunctionValue` that morphs the current path to the given `path`. Pass the result as the `d` property in `useAnimate` options. */\n morphTo: (path: MaybeRef<TargetsParam>, precision?: MaybeRef<number>) => FunctionValue\n /** Creates a motion-path object from an SVG `<path>`. Spread the result into `useAnimate` options to animate `translateX`, `translateY`, and `rotate` along the path. */\n createMotionPath: (\n path: MaybeRef<TargetsParam | null>,\n offset?: MaybeRef<number>\n ) => ReturnType<typeof svg.createMotionPath>\n}\n\n/**\n * Exposes Anime.js SVG utilities (`svg.morphTo`, `svg.createMotionPath`) as a Vue composable, automatically unwrapping reactive refs passed to each helper.\n *\n * For drawable stroke animations, use `useSvgDrawable` instead.\n */\nexport function useSvg(): UseSvgReturn {\n function morphTo(_path: MaybeRef<TargetsParam>, precision?: MaybeRef<number>): FunctionValue {\n return (target, index, targets, prevTween) => {\n const path = unref(_path)\n\n if (!path) return \"\"\n\n return svg.morphTo(path, unref(precision))(target, index, targets, prevTween)\n }\n }\n\n function createMotionPath(path: MaybeRef<TargetsParam | null>, offset?: MaybeRef<number>) {\n const resolved = unref(path) ?? \"\"\n return svg.createMotionPath(resolved, unref(offset))\n }\n\n return {\n morphTo,\n createMotionPath,\n }\n}","import { svg, type DrawableSVGGeometry, type DOMTargetSelector } from \"animejs\"\nimport { isClient, type MaybeComputedElementRef, tryOnUnmounted } from \"@vueuse/core\"\nimport { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\n\nexport interface UseSvgDrawableReturn {\n /**\n * The Anime.js drawable Proxy for the target element. `undefined` until the element is available.\n * Pass this ref — not the original template ref — as the `useAnimate` target to animate the `draw` property.\n */\n drawable: Readonly<ShallowRef<DrawableSVGGeometry | undefined>>\n}\n\n/**\n * Wraps an SVG geometry element in Anime.js's drawable Proxy. The proxy intercepts `setAttribute('draw', …)` calls and translates normalised `draw` values (`0`–`1`) into the correct `stroke-dasharray` / `stroke-dashoffset` updates. Pass the returned `drawable` ref as the target to `useAnimate`.\n *\n * @param target - The SVG element to make drawable. Accepts a template ref, a CSS selector, or a reactive ref to either.\n * @param start - Initial draw start position (`0`–`1`). Defaults to `0`.\n * @param end - Initial draw end position (`0`–`1`). Defaults to `0` (fully hidden).\n */\nexport function useSvgDrawable(\n target: MaybeRef<DOMTargetSelector> | MaybeComputedElementRef,\n start: MaybeRef<number> = 0,\n end: MaybeRef<number> = 0\n): UseSvgDrawableReturn {\n const drawable = shallowRef<DrawableSVGGeometry | undefined>()\n\n const { stop } = watch(\n () => resolveTarget(target as AnimationTargets),\n el => {\n drawable.value = undefined\n if (!el) {\n console.warn(\"[useSvgDrawable] Target element is null or undefined\")\n return\n }\n drawable.value = markRaw(svg.createDrawable(el as DOMTargetSelector, unref(start), unref(end))[0])\n },\n { flush: \"post\", immediate: !isRef(target) && isClient }\n )\n\n tryOnUnmounted(() => {\n stop()\n drawable.value = undefined\n })\n\n return { drawable: shallowReadonly(drawable) }\n}","import { splitText, type TextSplitter, type TextSplitterParams } from \"animejs\"\nimport { isClient, type MaybeComputedElementRef, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\nimport {\n computed,\n isRef,\n markRaw,\n shallowReadonly,\n shallowRef,\n unref,\n watch,\n type ComputedRef,\n type MaybeRef,\n type ShallowRef,\n} from \"vue\"\n\nexport interface UseTextReturn {\n /** The underlying Anime.js `TextSplitter` instance. `undefined` until the target is available. */\n splitter: Readonly<ShallowRef<TextSplitter | undefined>>\n /** Reactive array of `<span>` elements representing each line after splitting. */\n lines: ComputedRef<HTMLElement[]>\n /** Reactive array of `<span>` elements representing each word after splitting. */\n words: ComputedRef<HTMLElement[]>\n /** Reactive array of `<span>` elements representing each character after splitting. */\n chars: ComputedRef<HTMLElement[]>\n /** Removes all split `<span>` wrappers and restores the original text content. */\n revert: () => void\n /** Re-splits the text, updating `lines`, `words`, and `chars` to reflect any DOM or size changes. */\n refresh: () => void\n}\n\n/**\n * Wraps Anime.js `splitText()` into a Vue composable. Reactively re-splits the text when the target or params change, and reverts the DOM automatically on unmount.\n *\n * @param _target - The element(s) whose text content should be split. Accepts a template ref, a CSS selector, a DOM element, or a reactive ref to any of these.\n * @param _params - Anime.js text-splitter parameters. Accepts a plain object or a reactive ref / computed.\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 const { stop } = watch(\n [() => resolveTarget(_target as AnimationTargets), () => unref(_params)],\n ([el, params]) => {\n revert()\n splitter.value = undefined\n\n if (!el) return\n\n splitter.value = markRaw(splitText(el as HTMLElement | NodeList | string | HTMLElement[], params))\n },\n { flush: \"post\", immediate: !isRef(_target) && isClient }\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: shallowReadonly(splitter),\n lines,\n words,\n chars,\n revert,\n refresh,\n }\n}","import { isClient, tryOnUnmounted } from \"@vueuse/core\"\nimport { type AnimationTargets, resolveTarget } from \"@src/utils/resolve-target.ts\"\nimport {\n type WAAPIAnimationParams,\n type DOMTargetsParam,\n waapi,\n type WAAPIAnimation,\n type EasingFunction,\n} from \"animejs\"\nimport { isRef, markRaw, type MaybeRef, shallowReadonly, ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseWaapiReturn {\n /** The underlying Anime.js WAAPI animation instance. `undefined` until the target is available. */\n animation: Readonly<ShallowRef<WAAPIAnimation | undefined>>\n /** Resumes from a paused state. */\n resume: () => WAAPIAnimation | undefined\n /** Pauses the animation at the current position. */\n pause: () => WAAPIAnimation | undefined\n /** Toggles between forward and reverse direction. */\n alternate: () => WAAPIAnimation | undefined\n /** Starts or resumes the animation. */\n play: () => WAAPIAnimation | undefined\n /** Reverses playback direction. */\n reverse: () => WAAPIAnimation | undefined\n /** Seeks to a specific time (in ms). Accepts a reactive ref for the time value. */\n seek: (time: MaybeRef<number>, muteCallbacks?: MaybeRef<boolean>) => WAAPIAnimation | undefined\n /** Restarts the animation from the beginning. */\n restart: () => WAAPIAnimation | undefined\n /** Commits the current animated styles to the element's inline style, then cancels the animation. */\n commitStyles: () => WAAPIAnimation | undefined\n /** Jumps immediately to the end of the animation. */\n complete: () => WAAPIAnimation | undefined\n /** Stops the animation and removes it from the WAAPI engine. */\n cancel: () => WAAPIAnimation | undefined\n /** Cancels the animation and restores all animated properties to their original values. */\n revert: () => WAAPIAnimation | undefined\n /** Converts an Anime.js easing function to a CSS `cubic-bezier()` string usable by WAAPI. */\n convertEase: (fn: MaybeRef<EasingFunction>, samples?: MaybeRef<number>) => string\n}\n\n/**\n * Wraps Anime.js `waapi.animate()` into a Vue composable. Reactively re-creates the WAAPI animation when the target or options change, and stops it automatically on unmount.\n *\n * @param targets - The DOM element(s) to animate via WAAPI. Accepts a template ref, a CSS selector, a DOM element, a reactive ref to any of these, or an array of them.\n * @param options - Anime.js WAAPI animation parameters. Accepts a plain object or a reactive ref / computed. Defaults to `{}`.\n */\nexport function useWaapi(targets: AnimationTargets, options: MaybeRef<WAAPIAnimationParams> = {}): UseWaapiReturn {\n const animation = shallowRef<WAAPIAnimation | undefined>()\n\n const { stop } = watch(\n [() => resolveTarget(targets), () => unref(options)],\n ([el, opt]) => {\n animation.value = markRaw(waapi.animate(el as DOMTargetsParam, opt))\n },\n { flush: \"post\", immediate: !isRef(targets) && isClient }\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: shallowReadonly(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 { isRef, markRaw, type MaybeRef, shallowReadonly, type ShallowRef, shallowRef, unref, watch } from \"vue\"\n\nexport interface UseScopeReturn {\n /** The underlying Anime.js `Scope` instance. */\n scope: Readonly<ShallowRef<Scope | undefined>>\n /** Registers an anonymous method on the scope. Queued automatically if called before mount. */\n add: (method: ScopeMethod) => void\n /** Registers a named method on the scope so it can be called via `scope.methods[name]()`. Queued automatically if called before mount. */\n registerMethod: (methodName: string, method: ScopeMethod) => void\n /** Registers a method that runs exactly once on the scope. Queued automatically if called before mount. */\n addOnce: (method: ScopeMethod) => void\n /** Keeps the time of another tickable (animation, timer) in sync with this scope. */\n keepTime: (method: (scope: Scope) => Tickable) => void\n /** Cancels the scope and reverts all animations and tickables it owns. */\n revert: () => void\n /** Re-reads default values and media-query breakpoints for the scope. */\n refresh: () => void\n}\n\n/**\n * Wraps Anime.js `createScope()` into a Vue composable. Reactively re-creates the scope when params change, replays all registered methods, and reverts it automatically on unmount.\n *\n * Methods added before mount are queued and replayed once the component is mounted.\n *\n * @param params - Anime.js scope parameters. Accepts a plain object or a reactive ref / computed.\n */\nexport function useScope(params: MaybeRef<ScopeParams>): UseScopeReturn {\n const scope = shallowRef<Scope | undefined>(undefined)\n\n const pending_adds: ScopeMethod[] = []\n const pending_named: [string, ScopeMethod][] = []\n const pending_once: ScopeMethod[] = []\n\n let is_mounted = false\n let stopWatcher: (() => void) | undefined\n\n tryOnMounted(() => {\n is_mounted = true\n scope.value = markRaw(createScope(unref(params)))\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 if (isRef(params)) {\n stopWatcher = watch(\n params,\n new_params => {\n scope.value?.revert()\n scope.value = markRaw(createScope(new_params))\n },\n { flush: \"post\" }\n )\n }\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}","import { animate, type AnimationParams, type JSAnimation } from \"animejs\"\nimport type { Directive } from \"vue\"\n\nconst instances = new WeakMap<HTMLElement, JSAnimation>()\n\n/**\n * Declarative animation directive. Applies an Anime.js animation to the element on mount,\n * re-creates it when the binding value changes, and reverts it on unmount.\n *\n * @example\n * <div v-animate=\"{ translateX: 250, duration: 800 }\" />\n * <div v-animate=\"reactiveOptions\" />\n */\nexport const vAnimate: Directive<HTMLElement, AnimationParams> = {\n mounted(el, binding) {\n if (binding.value) instances.set(el, animate(el, binding.value))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const prev = instances.get(el)\n prev?.cancel()\n prev?.revert()\n\n if (binding.value) instances.set(el, animate(el, binding.value))\n },\n unmounted(el) {\n const animation = instances.get(el)\n animation?.cancel()\n animation?.revert()\n instances.delete(el)\n },\n}","import { createDraggable, type Draggable, type DraggableParams } from \"animejs\"\nimport type { Directive } from \"vue\"\n\nconst instances = new WeakMap<HTMLElement, Draggable>()\n\n/**\n * Declarative draggable directive. Makes the element draggable on mount,\n * re-creates it when the binding value changes, and reverts it on unmount.\n *\n * @example\n * <div v-draggable />\n * <div v-draggable=\"{ snap: [0, 100] }\" />\n */\nexport const vDraggable: Directive<HTMLElement, DraggableParams | undefined> = {\n mounted(el, binding) {\n instances.set(el, createDraggable(el, binding.value ?? {}))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n instances.get(el)?.revert()\n instances.set(el, createDraggable(el, binding.value ?? {}))\n },\n unmounted(el) {\n instances.get(el)?.revert()\n instances.delete(el)\n },\n}","import { animate, svg, type AnimationParams, type DrawableSVGGeometry, type JSAnimation } from \"animejs\"\nimport type { Directive } from \"vue\"\n\ninterface Entry {\n drawable: DrawableSVGGeometry\n animation: JSAnimation | undefined\n}\n\nconst instances = new WeakMap<SVGGeometryElement, Entry>()\n\nfunction create(el: SVGGeometryElement, params: AnimationParams | undefined): Entry {\n const drawable = svg.createDrawable(el)[0]\n const animation = params ? animate(drawable, params) : undefined\n return { drawable, animation }\n}\n\n/**\n * Declarative SVG drawable directive. Wraps the SVG geometry element in an Anime.js drawable\n * Proxy and animates the `draw` property on mount. Re-creates it when the binding value changes\n * and reverts on unmount.\n *\n * @example\n * <path v-svg-drawable=\"{ draw: '0 1', duration: 1200 }\" />\n * <path v-svg-drawable=\"{ draw: ['0 0', '0.5 1', '0 1'], ease: 'inOutQuad', loop: true }\" />\n */\nexport const vSvgDrawable: Directive<SVGGeometryElement, AnimationParams | undefined> = {\n mounted(el, binding) {\n instances.set(el, create(el, binding.value))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const entry = instances.get(el)\n entry?.animation?.cancel()\n entry?.animation?.revert()\n instances.set(el, create(el, binding.value))\n },\n unmounted(el) {\n const entry = instances.get(el)\n entry?.animation?.cancel()\n entry?.animation?.revert()\n instances.delete(el)\n },\n}","import { waapi, type WAAPIAnimationParams, type WAAPIAnimation } from \"animejs\"\nimport type { Directive } from \"vue\"\n\ninterface Entry {\n animation: WAAPIAnimation\n originalStyle: string\n}\n\nconst instances = new WeakMap<HTMLElement, Entry>()\n\n/**\n * Declarative WAAPI animation directive. Applies an Anime.js WAAPI animation to the element on\n * mount, re-creates it when the binding value changes, and reverts it on unmount.\n *\n * @example\n * <div v-waapi=\"{ translateX: 250, duration: 800 }\" />\n * <div v-waapi=\"reactiveOptions\" />\n */\nexport const vWaapi: Directive<HTMLElement, WAAPIAnimationParams> = {\n mounted(el, binding) {\n if (binding.value) {\n instances.set(el, {\n animation: waapi.animate(el, binding.value),\n originalStyle: el.style.cssText,\n })\n }\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const entry = instances.get(el)\n if (entry) {\n entry.animation.cancel()\n el.style.cssText = entry.originalStyle\n instances.delete(el)\n }\n\n if (binding.value) {\n instances.set(el, {\n animation: waapi.animate(el, binding.value),\n originalStyle: el.style.cssText,\n })\n }\n },\n unmounted(el) {\n const entry = instances.get(el)\n if (entry) {\n entry.animation.cancel()\n el.style.cssText = entry.originalStyle\n instances.delete(el)\n }\n },\n}","import {\n animate,\n splitText,\n type AnimationParams,\n type JSAnimation,\n type TextSplitter,\n type TextSplitterParams,\n} from \"animejs\"\nimport type { Directive } from \"vue\"\n\nexport interface VTextSplitValue extends TextSplitterParams {\n animation?: AnimationParams\n}\n\ninterface Entry {\n splitter: TextSplitter\n animation: JSAnimation | undefined\n}\n\nconst instances = new WeakMap<HTMLElement, Entry>()\n\nfunction create(el: HTMLElement, value: VTextSplitValue | undefined): Entry {\n const { animation: anim_params, ...splitter_params } = value ?? {}\n const splitter = splitText(el, splitter_params)\n const entry: Entry = { splitter, animation: undefined }\n\n if (anim_params) {\n if (splitter_params.lines) {\n // Line detection waits for document.fonts.ready — defer animation until splitter.lines is populated.\n ;(document.fonts?.ready ?? Promise.resolve()).then(() => {\n if (instances.get(el) === entry) {\n entry.animation = animate(splitter.lines, anim_params)\n }\n })\n } else {\n const targets = splitter_params.chars ? splitter.chars : splitter.words\n entry.animation = animate(targets, anim_params)\n }\n }\n\n return entry\n}\n\nfunction destroy(entry: Entry) {\n entry.animation?.cancel()\n entry.splitter.revert()\n}\n\n/**\n * Declarative text-split directive. Splits the element's text into chars, words, or lines on\n * mount, and optionally animates the resulting spans. Re-creates on binding change, reverts on unmount.\n *\n * @example\n * <p v-text-split=\"{ words: true, animation: { translateY: [20, 0], opacity: [0, 1], delay: stagger(60) } }\">Hello</p>\n * <p v-text-split=\"{ chars: true, animation: { opacity: [0, 1], delay: stagger(30) } }\">Hello</p>\n * <p v-text-split=\"{ lines: true, animation: { translateX: [-20, 0], delay: stagger(100) } }\">Hello</p>\n */\nexport const vTextSplit: Directive<HTMLElement, VTextSplitValue | undefined> = {\n mounted(el, binding) {\n instances.set(el, create(el, binding.value))\n },\n updated(el, binding) {\n if (binding.value === binding.oldValue) return\n const entry = instances.get(el)\n if (entry) destroy(entry)\n instances.set(el, create(el, binding.value))\n },\n unmounted(el) {\n const entry = instances.get(el)\n if (entry) destroy(entry)\n instances.delete(el)\n },\n}"],"mappings":";;;;AA4BA,SAAgB,EAAc,GAAyC;CACrE,IAAI,MAAM,QAAQ,CAAO,GAAG;EAC1B,IAAM,IAAW,EAAQ,KAAI,MAAU,EAAa,CAAiC,CAAC,CAAC,CAAC,QAAO,MAAM,KAAM,IAAI;EAE/G,OAAQ,EAAS,SAAS,IAAI,IAAW,KAAA;CAC3C;CAEA,OAAO,EAAa,CAAkC;AACxD;;;ACMA,SAAgB,EAAW,GAA2B,IAAsC,CAAC,GAAqB;CAChH,IAAM,IAAY,EAAwB,GAEpC,EAAE,YAAS,EACf,OAAO,EAAc,CAAO,SAAS,EAAM,CAAQ,CAAC,IACnD,CAAC,GAAI,OAAS;EACb,EAAgB,GAAI,CAAG;CACzB,GACA;EAAE,OAAO;EAAQ,WAAW,CAAC,EAAM,CAAO,KAAK;CAAS,CAC1D;CAEA,QAAqB;EAEnB,AAD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C7C;CACA,QAAQ,GAAI,GAAS;EACnB,IAAI,EAAQ,UAAU,EAAQ,UAAU;EACxC,IAAM,IAAQ,EAAU,IAAI,CAAE;EAE9B,AADI,KAAO,EAAQ,CAAK,GACxB,EAAU,IAAI,GAAI,EAAO,GAAI,EAAQ,KAAK,CAAC;CAC7C;CACA,UAAU,GAAI;EACZ,IAAM,IAAQ,EAAU,IAAI,CAAE;EAE9B,AADI,KAAO,EAAQ,CAAK,GACxB,EAAU,OAAO,CAAE;CACrB;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juleshry/vue-animejs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Vue 3 composables and directives for Anime.js v4 — reactive animations that integrate naturally with Vue's reactivity system and component lifecycle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"animation",
|