import { api, Cell, Context, Op, Range, Selection, Presence, Settings, SingleRange, Sheet, CellMatrix, CellWithRowAndCol, GlobalCache, LiveQueryData } from '../../../core'; import { getCryptoPrice } from '../../utils/cryptoApi'; import { SetContextOptions } from '../../context'; import { useDialog } from '../../hooks/useDialog'; export declare function generateAPIs(context: Context, setContext: (recipe: (ctx: Context) => void, options?: SetContextOptions) => void, handleUndo: () => void, handleRedo: () => void, settings: Required, cellInput: HTMLDivElement | null, scrollbarX: HTMLDivElement | null, scrollbarY: HTMLDivElement | null, globalCache: GlobalCache | null, refs: any): { applyOp: (ops: Op[]) => void; getCryptoPrice: typeof getCryptoPrice; /** Runs the formula engine on every cell in calcChain (all sheets). Use after XLSX import so values are computed, not cached from the file. */ recalculateAllFormulas: () => void; getCellValue: (row: number, column: number, options?: api.CommonOptions & { type?: keyof Cell; }) => any; onboardingActiveCell: (functionName: string) => void; initializeComment: (row: number, column: number) => void; openCommentUI: (row: number, column: number) => void; updateSheetLiveQueryList: (subsheetIndex: number, _data: LiveQueryData) => void; removeFromLiveQueryList: (subSheetIndex: number, id: string) => void; setCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & { type?: keyof Cell; }, callAfterUpdate?: boolean) => void; /** * Apply a cell value coming from a remote RTC peer, verbatim. * * Use this (instead of `setCellValue`) for every Yjs-driven remote apply: * it writes the synced value/formula as-is without running the formula * engine and without firing local-edit hooks, while keeping formula cells * registered in `calcChain` so they remain reactive to future local edits. */ applyRemoteCellValue: (row: number, column: number, value: any, options?: api.CommonOptions & { type?: keyof Cell; }) => void; setCellError: (row: number, column: number, errorMessage: { title: string; message: string; }) => void; clearCellError: (row: number, column: number) => void; clearCell: (row: number, column: number, options?: api.CommonOptions) => void; setCellFormat: (row: number, column: number, attr: keyof Cell, value: any, options?: api.CommonOptions) => void; autoFillCell: (copyRange: SingleRange, applyRange: SingleRange, direction: "up" | "down" | "left" | "right") => void; freeze: (type: "row" | "column" | "both", range: { row: number; column: number; }, options?: api.CommonOptions) => void; insertRowOrColumn: (type: "row" | "column", index: number, count: number, direction?: "lefttop" | "rightbottom", options?: api.CommonOptions) => void; deleteRowOrColumn: (type: "row" | "column", start: number, end: number, options?: api.CommonOptions) => void; hideRowOrColumn: (rowOrColInfo: string[], type: "row" | "column") => void; showRowOrColumn: (rowOrColInfo: string[], type: "row" | "column") => void; setRowHeight: (rowInfo: Record, options?: api.CommonOptions, custom?: boolean) => void; setColumnWidth: (columnInfo: Record, options?: api.CommonOptions, custom?: boolean) => void; getRowHeight: (rows: number[], options?: api.CommonOptions) => Record; getColumnWidth: (columns: number[], options?: api.CommonOptions) => Record; getSelection: () => { row: number[]; column: number[]; }[] | undefined; getFlattenRange: (range: Range) => { r: number; c: number; }[]; getCellsByFlattenRange: (range?: { r: number; c: number; }[]) => (Cell | null)[]; getSelectionCoordinates: () => string[]; getCellsByRange: (range: Selection, options?: api.CommonOptions) => (Cell | null)[][]; getHtmlByRange: (range: Range, options?: api.CommonOptions) => string | null; setSelection: (range: Range, options?: api.CommonOptions) => void; setCellValuesByRange: (data: any[][], range: SingleRange, options?: api.CommonOptions, cellAfter?: boolean) => void; setCellFormatByRange: (attr: keyof Cell, value: any, range: Range | SingleRange, options?: api.CommonOptions) => void; mergeCells: (ranges: Range, type: string, options?: api.CommonOptions) => void; cancelMerge: (ranges: Range, options?: api.CommonOptions) => void; getAllSheets: () => Sheet[]; getSheet: (options?: api.CommonOptions) => { celldata: CellWithRowAndCol[]; name: string; config?: import('../../../core/types').SheetConfig; order?: number; color?: string; data?: CellMatrix; id?: string; images?: import('../../../core/types').Image[]; iframes?: { id: string; src: string; left: number; top: number; width: number; height: number; }[]; zoomRatio?: number; column?: number; row?: number; addRows?: number; status?: number; hide?: number; luckysheet_select_save?: Selection[]; luckysheet_selection_range?: { row: number[]; column: number[]; }[]; calcChain?: any[]; dataBlockCalcFunction?: { [key: string]: { [key: string]: any; }; }; defaultRowHeight?: number; defaultColWidth?: number; showGridLines?: boolean | number; pivotTable?: any; isPivotTable?: boolean; filter?: Record; filter_select?: { row: number[]; column: number[]; }; luckysheet_conditionformat_save?: any[]; luckysheet_alternateformat_save?: any[]; dataVerification?: any; conditionRules?: import('../../../core/types').ConditionRulesProps; hyperlink?: Record; dynamicArray_compute?: any; dynamicArray?: any[]; frozen?: { type: "row" | "column" | "both" | "rangeRow" | "rangeColumn" | "rangeBoth"; range?: { row_focus: number; column_focus: number; }; }; liveQueryList?: Record; }; addSheet: () => void; deleteSheet: (options?: api.CommonOptions) => void; updateSheet: (data: Sheet[]) => void; activateSheet: (options?: api.CommonOptions) => void; setSheetName: (name: string, options?: api.CommonOptions) => void; setSheetOrder: (orderList: Record) => void; setSheetImages: (images: any[], options?: api.CommonOptions) => void; setSheetIframes: (iframes: any[], options?: api.CommonOptions) => void; setSheetDataVerification: (dataVerification: Record, options?: api.CommonOptions) => void; setSheetFilterState: (state: { filter?: Record | null; filter_select?: { row: number[]; column: number[]; } | null; }, options?: api.CommonOptions) => void; setSheetMapField: (field: string, value: Record | null | undefined, options?: api.CommonOptions) => void; setSheetConditionFormatRules: (rules: any[], options?: api.CommonOptions) => void; scroll: (options: { scrollLeft?: number; scrollTop?: number; targetRow?: number; targetColumn?: number; }) => void; addPresences: (newPresences: Presence[]) => void; removePresences: (arr: { username: string; userId?: string; }[]) => void; handleUndo: () => void; handleRedo: () => void; calculateFormula: () => void; calculateSubSheetFormula: (id: string) => void; calculateCellReferencedSubSheetFormula: (id: string, refCell?: string[]) => void; dataToCelldata: (data: CellMatrix | undefined) => CellWithRowAndCol[]; celldataToData: (celldata: CellWithRowAndCol[], rowCount?: number, colCount?: number) => CellMatrix | null; insertFunction: (selectedFuncIndex: number, filteredFunctionList: any[], callback?: () => void) => void; getLocaleContext: () => any; getWorkbookContext: () => Context; getWorkbookSetContext: () => (recipe: (ctx: Context) => void, options?: SetContextOptions) => void; getSettings: () => Required; getRefs: () => any; getShowDialog: () => typeof useDialog; getSplitColComponent: () => import('react').FC<{}>; getConditionalFormatComponent: () => import('react').FC<{ context?: any; }>; };