import type { CellMatrix } from '@fortune-sheet/core'; /** OOXML and the browser editor keep local rule formulas deliberately small. */ export declare const MAX_SPREADSHEET_LOCAL_FORMULA_LENGTH = 255; /** Keep synchronous browser formula evaluation bounded for hostile workbooks. */ export declare const MAX_SPREADSHEET_LOCAL_FORMULA_REFERENCED_CELLS = 1024; export interface SpreadsheetFormulaSheet { id: string; name: string; data?: CellMatrix; celldata?: readonly SpreadsheetFormulaCell[]; } export interface SpreadsheetFormulaCell { r: number; c: number; v: unknown; } export interface SpreadsheetLocalFormulaOptions { sheets: readonly SpreadsheetFormulaSheet[]; sheetId: string; row: number; column: number; /** The first row of the rule/validation range. Defaults to the target row. */ anchorRow?: number; /** The first column of the rule/validation range. Defaults to the target column. */ anchorColumn?: number; /** Substitute the target cell with this value, as data validation does. */ proposedValue?: unknown; useProposedValue?: boolean; } export interface SpreadsheetLocalFormulaResult { supported: boolean; value?: unknown; message?: string; } /** * Evaluate a bounded Excel formula against the workbook's cached local data. * * This is intentionally shared by custom data validation and conditional * formatting. It never recalculates formula cells or reaches a remote source; * an unavailable dependency therefore fails closed. */ export declare function evaluateSpreadsheetLocalFormula(formula: string, options: SpreadsheetLocalFormulaOptions): SpreadsheetLocalFormulaResult; export declare function spreadsheetLocalFormulaBoolean(value: unknown): boolean;