export interface UseExitTransitionOptions { /** * How long the exit takes, 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; /** * Hold this long before the exit begins. The row is not reported as * leaving until it elapses, so an animation already playing on the row (a * tick drawing in) finishes before the fade starts rather than sharing it. * Default 0. */ delayMs?: number; /** * Force the reduced-motion branch. Defaults to reading * `prefers-reduced-motion: reduce`. When reduced, `leave` commits * synchronously and nothing is ever reported as leaving. */ reduceMotion?: boolean; } export interface UseExitTransitionReturn { /** Whether this id is mid-exit. Reflect it onto the row (e.g. `data-leaving`). */ isLeaving: (id: string) => boolean; /** * Start `id` leaving, then run `commit` once the exit has played. Calling * it twice for the same id is a no-op, so a double click cannot remove a * row twice. Under reduced motion `commit` runs immediately. */ leave: (id: string, commit: () => void) => void; /** * Stop an exit that has not committed yet: clear its timer and un-mark it * as leaving, so the row fades back in. No-op for an unknown id. */ cancel: (id: string) => void; /** The effective total delay + duration — 0 under reduced motion. */ durationMs: number; } /** * Holds a row on screen long enough to fade out before the host removes it. * * A list that drops an item the instant it is actioned gives no sense of * where the item went. This hook inverts the order: mark the row as leaving, * let CSS fade it, and only then tell the host to drop it — so the removal * the user sees and the state change agree. * * The hook owns the timing only. Paint the exit in CSS, keyed off * `isLeaving`, so it honours the `--animation-duration` token in the * accessible theme. Pending exits are cancelled on unmount, so a commit * never fires against a list that has gone away. */ export declare function useExitTransition({ durationMs, delayMs, reduceMotion, }?: UseExitTransitionOptions): UseExitTransitionReturn; //# sourceMappingURL=use-exit-transition.d.ts.map