/** * Caret boundary system for defining editable positions in formatted numeric inputs. * Prevents cursor from being placed in non-editable areas (separators, prefix, suffix). */ /** * Determines which positions in a formatted value are editable. * Returns a boolean array where true = editable position, false = non-editable. * * @param formattedValue - The formatted string value * @param options - Configuration options * @returns Boolean array indicating editable positions (length = formattedValue.length + 1) * * @example * getCaretBoundary("1,234.56", { thousandSeparator: ",", decimalSeparator: "." }) * // Returns: [true, true, false, true, true, true, false, true, true, ...] * // (editable at positions 0,1,3,4,5,7,8,...) */ export declare function getCaretBoundary(formattedValue: string, options?: { thousandSeparator?: string; decimalSeparator?: string; prefix?: string; suffix?: string; }): boolean[]; /** * Corrects caret position to be within editable boundaries. * Moves cursor to nearest editable position if current position is non-editable. * * @param value - The formatted string value * @param caretPos - The current caret position * @param boundary - The boundary array from getCaretBoundary() * @param direction - Optional direction to search ('left' or 'right') * @returns Corrected caret position within editable area * * @example * const boundary = getCaretBoundary("1,234", { thousandSeparator: "," }); * getCaretPosInBoundary("1,234", 1, boundary, 'right') * // Returns: 2 (moves from separator position to next digit) */ export declare function getCaretPosInBoundary(value: string, caretPos: number, boundary: boolean[], direction?: 'left' | 'right'): number;