import { scroll, type AnimationPlaybackControls } from 'motion'; import { type RefObject } from 'react'; /** * The options of Motion's `scroll()`: `target`, `container`, `axis` and `offset`. */ export type ScrollAnimationOptions = NonNullable[1]>; /** * Create a Motion animation via a callback and link its progress to scroll with Motion's * `scroll()`. The options are read when the animation is created, so they can hold elements from * refs. The animation is stopped, and its link to scroll removed, when the component is unmounted * or when a new callback function is provided. * * Motion measures the target and container itself and keeps the progress up to date when their * size changes, so there is no refresh as with ScrollTrigger. */ export declare function useScrollAnimation(callback: () => T | undefined, dependencies: ReadonlyArray, getOptions?: () => ScrollAnimationOptions | undefined): RefObject;