/** * Pure helpers shared between `` and ``. These * mirror Base UI React's `packages/react/src/otp-field/utils/otp.ts` * one-for-one — they are plain, non-reactive functions, safe to call from any * scope. */ interface OTPValidationConfig { slotPattern: string; getRootPattern: (length: number) => string; regexp: RegExp; inputMode: "numeric" | "text"; } export type OTPValidationType = "numeric" | "alpha" | "alphanumeric" | "none"; export declare function getOTPValidationConfig(validationType: OTPValidationType): OTPValidationConfig | null; export declare function stripOTPWhitespace(value: string | null | undefined): string; /** * Normalize user-entered OTP text by stripping whitespace, applying validation * or custom sanitization, then clamping the final value to the configured slot * count. Slicing uses `Array.from` so multi-byte characters stay atomic. */ export declare function normalizeOTPValue(value: string | null | undefined, length: number, validationType: OTPValidationType, sanitizeValue?: ((value: string) => string) | undefined): string; /** * Replace characters starting at the provided slot index, then re-normalize * the result. Used by typing / paste flows where a multi-character edit must * stay contiguous and length-bounded. */ export declare function replaceOTPValue(currentValue: string, index: number, nextValue: string, length: number, validationType: OTPValidationType, sanitizeValue?: ((value: string) => string) | undefined): string; export declare function removeOTPCharacter(currentValue: string, index: number): string; export {}; //# sourceMappingURL=otp.d.ts.map