/** * `useGesture` binds vanilla `gesture` drivers (drag, hover) to a Vue * template ref. * * const { ref, drag, hover } = useGesture({ * drag: { axis: "x", bounds: { left: -100, right: 100 } }, * hover: { enter: tween({ scale: [1, 1.1] }, { duration: 150 }) }, * }) * * Options are latched at bind time. The composable watches the ref: * when it becomes non-null the drivers attach; when the ref is replaced * or on `onBeforeUnmount`, every active gesture is cancelled. Vue's * reactivity is not used to drive per-frame state; gesture updates * flow through the vanilla handles. */ import type { DragHandle, DragPublicOpts, HoverHandle, HoverPublicOpts } from "@kinem/core"; import { type ShallowRef } from "vue"; export interface UseGestureOpts { readonly drag?: DragPublicOpts; readonly hover?: HoverPublicOpts; } export interface UseGestureResult { readonly ref: ShallowRef; /** Active drag handle, or `null` if no drag is configured or bound. */ readonly drag: ShallowRef; /** Active hover handle, or `null` if no hover is configured or bound. */ readonly hover: ShallowRef; /** Cancel all bound gestures. Safe to call multiple times. */ cancel(): void; } export declare function useGesture(opts: UseGestureOpts): UseGestureResult; //# sourceMappingURL=useGesture.d.ts.map