export type SliderValue = number | [number, number]; export type SliderOrientation = 'horizontal' | 'vertical'; export type SliderThumb = 'single' | 'lo' | 'hi'; export type SliderPoint = { x: number; y: number; }; /** Reactive inputs are passed as getters so the core tracks live prop changes. */ export type SliderConfig = { value: () => SliderValue; onChange?: (value: SliderValue) => void; min?: () => number; max?: () => number; step?: () => number; range?: () => boolean; orientation?: () => SliderOrientation; disabled?: () => boolean; ariaLabel?: () => string | undefined; /** Right-to-left: mirrors horizontal pointer + Left/Right key direction. */ rtl?: () => boolean; id?: () => string | undefined; invalid?: () => boolean | undefined; required?: () => boolean | undefined; error?: () => string | undefined; hint?: () => string | undefined; }; export declare function createSlider(config: SliderConfig): { readonly value: SliderValue; readonly lo: number; readonly hi: number; /** Thumb currently being dragged, or null. */ readonly dragging: SliderThumb | null; percentOf: (v: number) => number; clampStep: (v: number) => number; valueFromPointer: (pos: SliderPoint, rect: DOMRect) => number; pointerDown: (pos: SliderPoint, rect: DOMRect) => void; setFromPointer: (pos: SliderPoint, rect: DOMRect) => void; endDrag: () => void; step: (which: SliderThumb, delta: number) => void; /** Spread onto the track container (static a11y/data hooks). */ trackProps: () => { 'data-orientation': string; }; /** Spread onto the thumb at index `i` (0 = single/low, 1 = high). */ thumbProps: (i: number) => { role: "slider"; tabindex: number; 'aria-valuemin': number; 'aria-valuemax': number; 'aria-valuenow': number; 'aria-label': string; 'aria-orientation': SliderOrientation; 'aria-disabled': true | undefined; 'aria-invalid': "true" | undefined; 'aria-required': "true" | undefined; 'aria-describedby': string | undefined; onkeydown: (e: KeyboardEvent) => void; }; }; export type Slider = ReturnType;