/** * The arithmetic behind `Slider`, kept out of the component so it can be * tested in the node project rather than driven through a pointer. * * Every function here is total: a caller may pass a `NaN`, a reversed * range or a zero step, and the answer is still a number inside the * range. A slider that renders a thumb at `NaN%` is invisible, and the * DOM says nothing about it. */ /** `value` forced into `[min, max]`, whichever way round they arrive. */ export declare const clampToRange: (value: number, min: number, max: number) => number; /** * `value` snapped to the nearest `min + n * step`, then clamped. * * Anchored on `min` rather than on zero, which is the difference * between a 0–100 slider (where both agree) and a 7–19 one stepping by * 4: anchored on zero its reachable values are 8, 12, 16 and neither * end of its own range is one of them. * * A non-positive or non-finite `step` means "continuous" and snaps * nothing — it must not divide by zero and hand back `NaN`. */ export declare const snapToStep: (value: number, min: number, max: number, step: number) => number; /** * `value` rounded to as many decimals as `step` has. * * `Number.EPSILON` scaling is deliberately not used — the input here is * always already a multiple of `step` give or take float drift, so the * decimal count of `step` is exactly the precision that can be real. */ export declare const roundToStepPrecision: (value: number, step: number) => number; /** * Where the thumb sits, 0–100, for `inline-size` / `inset-inline-start`. * * A zero-width range is 0% rather than `NaN`: `min === max` is a * degenerate but legal slider (a single-valued one), and it should * paint at the start instead of disappearing. */ export declare const toPercent: (value: number, min: number, max: number) => number; /** * The value a pointer at `fraction` (0–1 along the track) is asking for. * * `isRtl` inverts it. The caller measures with `getBoundingClientRect()`, * which is physical and knows nothing about writing direction, so a * right-to-left slider would otherwise run backwards. */ export declare const fromFraction: (fraction: number, min: number, max: number, step: number, isRtl?: boolean) => number; //# sourceMappingURL=sliderValue.d.ts.map