/** * Pure `A1`-notation ⇄ index conversion primitives. * * This module is deliberately free of any grid, DOM or engine state: it only * converts between the textual `A1` address space and zero-based * `{ colIndex, rowIndex }` coordinates. Resolving those coordinates to concrete * grid cells is the job of `ReferenceResolver` (a later phase). * * All conversions are allocation-light and regex-free on the hot path, keeping * them safe to call for every reference in every formula at scale. * * @packageDocumentation */ import type { CellRef } from './reference.types'; /** * Converts a column label (`"A"`, `"Z"`, `"AA"`, `"AA500"`'s letter part) to a * zero-based column index using bijective base-26. * * @param label - One or more ASCII letters (case-insensitive). Must be non-empty. * @returns The zero-based column index (`"A"` → 0, `"AA"` → 26), or `-1` if the * label contains a non-letter character. */ export declare function columnLabelToIndex(label: string): number; /** * Converts a zero-based column index to its `A1` column label. * * @param index - Zero-based column index (`0` → `"A"`, `26` → `"AA"`). * @returns The column label, or `""` for a negative index. */ export declare function columnIndexToLabel(index: number): string; /** * Parses a single `A1`-style cell address into a {@link CellRef}. * * Supports `$` anchors on either axis (`$A1`, `A$1`, `$A$1`). Does **not** * accept sheet prefixes or ranges — those are handled by the parser/range * resolver. Returns `null` when the text is not a well-formed single-cell * address. * * @param text - The raw address, e.g. `"AA500"` or `"$B$2"`. * @returns The parsed {@link CellRef}, or `null` if malformed. */ export declare function parseCellRef(text: string): CellRef | null; /** * Encodes a {@link CellRef} back to its `A1` string (with `$` anchors). * * @param ref - The cell reference to encode. * @returns The `A1` address, e.g. `"$B$2"`. */ export declare function encodeCellRef(ref: CellRef): string; //# sourceMappingURL=cell-reference.d.ts.map