import type { WorkSpreadsheetContent, WorkSpreadsheetSheet } from '../work-types'; /** Keep dependent-list parsing synchronous and bounded at the editor boundary. */ export declare const MAX_SPREADSHEET_DEPENDENT_LIST_FORMULA_LENGTH = 255; export declare const MAX_SPREADSHEET_DEPENDENT_LIST_REFERENCE_CELLS = 1024; export declare const MAX_SPREADSHEET_DEPENDENT_LIST_MATERIALIZED_CELLS = 10000; export interface SpreadsheetDependentListFormulaResult { ok: boolean; formula?: string; message?: string; } export interface SpreadsheetDependentListReferenceResult { ok: boolean; empty?: boolean; displayReference?: string; message?: string; } /** * Returns true for the deliberately small, local dependent-list grammar. * * The leading `=` is optional when reading an existing workbook, but authoring * always writes it back so a formula cannot be confused with a literal list. */ export declare function isSpreadsheetDependentListFormula(value: unknown): boolean; /** * Normalize an INDIRECT list source without evaluating workbook state. * Supported arguments are quoted text, a single-cell reference, or a bounded * `&` concatenation of those terms. Nested functions and external books are * intentionally rejected at the local editor boundary. */ export declare function normalizeSpreadsheetDependentListFormula(value: string): SpreadsheetDependentListFormulaResult; /** * Resolve one dependent list for a target cell. An empty driver cell is a * valid state and produces an empty list; malformed non-empty references fail * closed so the editor never silently offers the wrong options. */ export declare function resolveSpreadsheetDependentListReference(content: WorkSpreadsheetContent, sheetId: string, row: number, column: number, anchorRow: number, anchorColumn: number, formula: string): SpreadsheetDependentListReferenceResult; /** * Materialize only the runtime view Fortune needs. The controlled model keeps * the INDIRECT formula; each generated item carries a private marker so the * projection cleanup can restore it after Fortune emits a cell operation. */ export declare function materializeSpreadsheetDependentListsForFortune(sheets: readonly WorkSpreadsheetSheet[], namedRanges?: WorkSpreadsheetContent['namedRanges']): WorkSpreadsheetSheet[]; /** Restore controlled formulas and remove generated compact-cell overrides. */ export declare function restoreSpreadsheetDependentListProjections(sheets: readonly WorkSpreadsheetSheet[]): WorkSpreadsheetSheet[];