/** * `useScroll` binds a vanilla `scroll()` driver to a Vue template ref. * * const { ref, handle } = useScroll( * tween({ opacity: [0, 1] }, { duration: 400 }), * { sync: true, trigger: { start: "top 80%", end: "top 20%" } }, * ) * * The composable watches the ref: when it becomes non-null the driver is * attached; when the ref is replaced or on `onBeforeUnmount`, the driver * is cancelled. Options are latched at bind time. */ import type { AnimationDef, AnimationProps, ScrollHandle, ScrollOpts } from "@kinem/core"; import { type ShallowRef } from "vue"; export interface UseScrollResult { readonly ref: ShallowRef; /** Active scroll handle, or `null` if no element is bound yet. */ readonly handle: ShallowRef; /** Cancel the bound scroll driver. Safe to call multiple times. */ cancel(): void; } export declare function useScroll(def: AnimationDef, opts?: ScrollOpts): UseScrollResult; //# sourceMappingURL=useScroll.d.ts.map