/** * Dependency-free input masking — replaces `@react-input/mask` for the two masks this library * actually uses: the date scaffold `' / / '` (showMask) and the progressive time mask * `'xx:xx'`. Slots (positions equal to `maskChar`) accept digits; every other mask character is a * literal. */ export interface InputMaskSpec { /** Mask template, e.g. `' / / '` or `'xx:xx'`. */ mask: string; /** The character in `mask` marking a fillable slot, e.g. `' '` or `'x'`. */ maskChar: string; /** true → render the full scaffold once any digit is present; false → grow as the user types. */ showMask: boolean; } export interface MaskedResult { value: string; caret: number; } /** Date picker mask — shared by `useDatePickerMask` and display formatting. */ export declare const DATE_INPUT_MASK: InputMaskSpec; /** * Font family the editable date input MUST render in. `DATE_INPUT_MASK` is a *space scaffold* * (its `maskChar` is `' '`), so the field relies on a fixed-width font: with a proportional font * (e.g. Roboto) the empty day/year space slots collapse to hairlines and the mask visibly loses * its spaces (a real regression once shipped). A monospace font keeps every slot the same width so * the `dd / mm / yyyy` columns stay aligned. This is coupled to the space `maskChar` — the two are * asserted together in `inputMask.test.ts`; do not switch this to a proportional font. */ export declare const DATE_INPUT_FONT_FAMILY = "monospace"; /** * Pure formatter: distributes the digits of `raw` over the mask slots and computes the caret * position that follows the last digit typed before `caretInRaw`. Zero digits yield an empty value * so the date field can show its scaffold as a placeholder only while focused. */ export declare const formatMaskedValue: (raw: string, caretInRaw: number, spec: InputMaskSpec) => MaskedResult; /** * Ref-callback hook applying `formatMaskedValue` on every native `input` event, before React's * delegated onChange reads the value — a drop-in for `useMask` from `@react-input/mask`. */ export declare const useInputMask: ({ mask, maskChar, showMask }: InputMaskSpec) => ((element: HTMLInputElement | null) => void);