/** * Piecewise-linear mapping utilities for non-linear slider behavior. * * When a slider's useful values are concentrated in a sub-range, these functions * allow that sub-range (the "focus range") to occupy a larger fraction of the * slider's physical width, giving finer control over sensitive values. * * The slider is split into up to three zones: * [min, focusMin] — "before" zone * [focusMin, focusMax] — "focus" zone (gets focusWeight of the width) * [focusMax, max] — "after" zone * * The before and after zones share (1 - focusWeight) proportionally to their * value span relative to the total non-focus span. */ export type SliderScaleConfig = { focusRange: [number, number]; focusWeight: number; }; /** * Maps a real value to a normalized position [0, 1] using piecewise-linear scaling. */ export declare function valueToPosition(value: number, min: number, max: number, config: SliderScaleConfig): number; /** * Maps a normalized position [0, 1] back to a real value using piecewise-linear scaling. * Inverse of valueToPosition. */ export declare function positionToValue(position: number, min: number, max: number, config: SliderScaleConfig): number; /** * Creates a scale config object if valid focus parameters are provided. * Returns null if no focus config is provided, indicating linear behavior. */ export declare function createSliderScale(focusRange?: [number, number], focusWeight?: number): SliderScaleConfig | null;