import { type RefObject } from 'react'; import { type MotionDuration, type MotionEasing } from './motion'; export interface UseFlipAnimationOptions { /** Elements to animate, queried inside the root. */ selector?: string; /** Stable identity of an element across renders. Default: data-flip-key, then href, then text. */ keyOf?: (el: HTMLElement) => string | null; /** * Scroll container used as the coordinate origin, so scrolling between two * snapshots does not read as movement. Default: the root. */ scrollContainer?: (root: HTMLElement) => HTMLElement | null; /** Motion token (default `moderate`) or explicit ms. */ duration?: MotionDuration | number; /** Motion token (default `standard`) or a CSS timing function. */ easing?: MotionEasing | string; /** Off switch; the hook also stays still under prefers-reduced-motion. */ disabled?: boolean; /** * Leave one element still on this change while still tracking where it is * (e.g. the card a drag overlay is already carrying into place). Default: * animate everything. */ shouldAnimate?: (el: HTMLElement, key: string) => boolean; } /** * FLIP reorder animation: when `trigger` changes, elements that exist before * and after the change glide from their old position to the new one. * * Positions are snapshotted when the list is at rest (after mount, after each * animation, and after pointer interaction inside the root), never in the * render path, so a re-render costs nothing. Uses the Web Animations API on * `transform` only; with prefers-reduced-motion the change is instant. */ export declare function useFlipAnimation(rootRef: RefObject, trigger: unknown, options?: UseFlipAnimationOptions): void; //# sourceMappingURL=use-flip-animation.d.ts.map