import { MutableRefObject } from 'react'; import type { KnobMark } from '../types'; export type UseKnobKeyboardParams = { disabled: boolean; readOnly: boolean; min: number; max: number; step: number; isEndless: boolean; restrictToMarks: boolean; marksNormalized: KnobMark[]; valueRef: MutableRefObject; handleValueUpdate: (value: number, final: boolean) => void; isRTL: boolean; }; /** * Keyboard and assistive-technology adjustment for the knob. * * The surface already advertises `accessibilityRole="adjustable"` and takes focus, so this * is what makes that promise true: arrows nudge by `step`, shift makes them coarse, page * keys cross a tenth of the range, and Home/End pin to the bounds. Every keypress commits * (`final: true`) because there is no gesture to end. * * Physical keys are web-only, mirroring the rest of the library; on native the same moves * are exposed as increment/decrement accessibility actions, which is how VoiceOver and * TalkBack drive an adjustable control. */ export declare const useKnobKeyboard: ({ disabled, readOnly, min, max, step, isEndless, restrictToMarks, marksNormalized, valueRef, handleValueUpdate, isRTL, }: UseKnobKeyboardParams) => { keyboardHandlers: { onKeyDown: (event: any) => void; tabIndex: 0 | -1; } | { onKeyDown?: undefined; tabIndex?: undefined; }; accessibilityActions: readonly [{ readonly name: "increment"; readonly label: "Increase value"; }, { readonly name: "decrement"; readonly label: "Decrease value"; }] | undefined; onAccessibilityAction: ((event: any) => void) | undefined; };