import { BarGeometry } from '../engine/bars'; /** One bar as drawn on a frame of a snap: its geometry and how far it has risen. */ export interface SnapBar { key: string; bar: BarGeometry; /** Share of the bar's height above its floor: 0 drained, 1 full; a spring may overshoot. */ rise: number; opacity: number; /** Gaussian blur in pixels while the bar arrives or leaves. */ blur: number; leaving: boolean; } /** Closed-form damped spring from 0 to 1 that lands with a slight overshoot in about 0.55s. */ export declare function snapSpring(seconds: number): number; /** * Bars that behave like real objects when the set of bars changes, such as a new period: new * bars rise out of the floor with a soft blur, leaving bars drain back into it and narrow toward * where their gap closes, and the rest spring to their new places, widths and heights. Returns * the frame to draw while that runs, and `null` when at rest, so ordinary updates and the first * entrance are untouched. `pulse` counts snaps, to restart the plot's light motion blur. */ export declare function useSnapBars(bars: readonly BarGeometry[] | undefined, keyOf: (bar: BarGeometry) => string, enabled: boolean, /** The chart is revealing its first data: every bar arrives the way new bars do. */ entrance?: boolean): { frame: SnapBar[] | null; pulse: number; };