/** * Pure semi-implicit Euler spring stepper used as the single easing * source-of-truth for marker motion (stick endpoint + circle↔pill morph). * * The spring drives a scalar value (typically a `0..1` progress) toward a * target. Each `step` call advances the simulation by `dtMs` milliseconds and * returns the next state — no React, no DOM, no time source. Callers own time * and apply the result however they like (rAF loop, fake timers in tests). * * Defaults are tuned for a snappy, decelerating attack: fast initial movement * with a slight overshoot, settling in ~180–220 ms. Pair with an ease-out * curve on CSS-driven companions (see `MARKER_MORPH_EASING`) so the morph * reads as one decelerating motion across stick + pill rather than the * mushy symmetric ease-in-out it replaced. */ export type SpringConfig = Readonly<{ /** Spring constant (higher = snappier). */ stiffness: number; /** Damping coefficient (higher = less overshoot). */ damping: number; /** Effective mass (higher = more inertia). */ mass: number; /** Velocity below which the spring is considered at rest. */ restVelocity: number; /** Distance to target below which the spring is considered at rest. */ restDelta: number; }>; export type SpringState = Readonly<{ value: number; velocity: number; }>; export declare const MARKER_SPRING_CONFIG: SpringConfig; export declare const createSpringState: (initialValue: number) => SpringState; export declare const isSpringAtRest: (state: SpringState, target: number, config: SpringConfig) => boolean; /** * Advances the spring by `dtMs`. Long frames are clamped and split into * sub-steps to keep the integrator stable when the tab was throttled. */ export declare const stepSpring: (state: SpringState, target: number, dtMs: number, config: SpringConfig) => SpringState; /** * Estimated settle time, in milliseconds, used to derive an equivalent CSS * transition duration for properties that cannot be ref-driven (e.g. label * grid track). Computed by simulating the spring from 0 to 1. */ export declare const estimateSpringSettleMs: (config: SpringConfig) => number;