/** Pads or truncates character splits to a fixed-length OTP cell array. */ export declare function otpCharsToPaddedArray(value: string, length: number): string[]; export declare const OTP_SLOT_MIN = 1; export declare const OTP_SLOT_MAX = 32; export declare function clampOtpSlotLength(length: number | undefined, fallback?: number): number; /** * Applies a run of digits from `raw` into consecutive OTP cells starting at * `startIndex` (SMS autofill / IME). Non-digits are stripped; overflow past * the last slot is truncated. */ export declare function mergeDigitRunIntoOtp(otp: string[], startIndex: number, raw: string, slotLength: number): { newOtp: string[]; digitCount: number; }; export declare function buildOtpAriaDescribedBy(options: { hintText?: string; error: boolean; errorMessage?: string; hintId: string; errorId: string; }): string | undefined; export declare function buildOtpGroupAriaLabel(label: string | undefined, sublabel: string | undefined, required: boolean | undefined): string | undefined; export declare function buildOtpCellAriaLabel(label: string | undefined, index: number, slotLength: number): string; export declare function parsePastedOtpText(raw: string, slotLength: number): string; export declare function getOtpPasteFocusIndex(pastedDigitCount: number, slotLength: number): number; export declare function moveCaretToEnd(input: HTMLInputElement): void; export type OtpCellChangeResult = { kind: 'noop'; } | { kind: 'update'; newOtp: string[]; /** Focus this cell after update, if defined */ focusIndex?: number; }; /** * Pure counterpart to the per-cell `onChange` path: clear, multi-digit merge, * or single digit with optional advance to the next cell. */ export declare function processOtpCellValueChange(otp: string[], index: number, val: string, slotLength: number): OtpCellChangeResult; export type OtpKeyNavigation = { action: 'none'; } | { action: 'focus'; targetIndex: number; preventDefault?: boolean; }; export declare function getOtpKeyNavigation(key: string, index: number, cellValue: string, slotLength: number): OtpKeyNavigation;