export interface UseCheckAnimationOptions { /** * The committed state, as the host holds it. The hook shows an optimistic * value while a toggle is in flight so the tick draws on the click rather * than waiting for the host's re-render. */ checked: boolean; /** * How long the tick takes to draw, in milliseconds. Keep it in step with * the CSS transition the caller paints — `--duration-normal` (200ms) is * the kit's default and the hook's too. */ durationMs?: number; /** * Force the reduced-motion branch. Defaults to reading * `prefers-reduced-motion: reduce`. Useful in tests and for callers that * already track the preference upstream. When reduced, the tick lands * immediately and `drawing` never turns true. */ reduceMotion?: boolean; } export interface UseCheckAnimationReturn { /** What to render: the optimistic value while a toggle is in flight. */ checked: boolean; /** * True only while an unchecked → checked flip is drawing. Reflect it onto * the element (e.g. `data-drawing`) to trigger the stroke animation; * unticking is deliberately instant, since there is nothing to celebrate. */ drawing: boolean; /** The effective duration — 0 under reduced motion. */ durationMs: number; /** * Flip the box. Returns the value it flipped to, so the caller can pass it * straight to its own commit callback. */ toggle: () => boolean; } /** * Drives an animated tick for a checkbox whose state lives with the host. * * A checkbox backed by host state cannot animate on click: the tick would * wait for the round trip, and when the row is about to leave the list the * host may never send the new value back at all. This hook holds an * optimistic value for the length of the animation so the tick draws * immediately, then defers to the host once its value agrees. * * The hook owns the timing only. Paint the tick in CSS — a * `stroke-dashoffset` transition keyed off `drawing` — so the animation * honours the `--animation-duration` token in the accessible theme. */ export declare function useCheckAnimation({ checked, durationMs, reduceMotion, }: UseCheckAnimationOptions): UseCheckAnimationReturn; //# sourceMappingURL=use-check-animation.d.ts.map