import type { CellInput } from "./api-range.js"; import type { ChartAnchor, ImagePatch } from "./api-schema/index.js"; import type { PreviewerEventName, WorkbookPreviewer } from "./previewer.js"; import type { WorkbookLayout } from "./types.js"; export interface RecalcWorkbookLike { applyEdit(input: { sheetName: string; address: string; input: string; recalc: boolean; }): Promise<{ layout: WorkbookLayout; }>; setRangeValues(input: { sheetName: string; ref: string; values: CellInput[][]; recalc: boolean; }): Promise<{ layout: WorkbookLayout; }>; clearRange(input: { sheetName: string; ref: string; recalc: boolean; }): Promise<{ layout: WorkbookLayout; }>; pasteCells(input: { sheetName: string; row: number; column: number; values: string[][]; recalc: boolean; }): Promise<{ layout: WorkbookLayout; }>; copyRange(input: { sheetName: string; ref: string; destSheet: string; destRef: string; recalc: boolean; }): Promise<{ layout: WorkbookLayout; }>; moveRange(input: { sheetName: string; ref: string; destSheet: string; destRef: string; recalc: boolean; }): Promise<{ layout: WorkbookLayout; }>; setImage(sheetName: string, patch: ImagePatch): Promise<{ layout: WorkbookLayout; }>; addSheet(name: string): Promise<{ layout: WorkbookLayout; name: string; }>; moveDrawing(input: { sheetName: string; kind: string; drawingIndex: number; anchor: ChartAnchor; prevAnchor: ChartAnchor; }): Promise; removeDrawing(input: { sheetName: string; kind: string; drawingIndex: number; prevAnchor: ChartAnchor; }): Promise; layout(options?: { sheetName?: string; }): Promise; } export interface BindRecalcWorkbookOptions { autoRecalc?: boolean | (() => boolean); resyncOnSheetChange?: boolean; imageAnchor?: { rows: number; cols: number; }; imageName?: string; onChange?: (info: { event: PreviewerEventName; }) => void; onStatus?: (message: string) => void; onError?: (error: unknown) => void; } export interface RecalcWorkbookBinding { unbind(): void; } export declare function bindRecalcWorkbook(previewer: WorkbookPreviewer, workbook: RecalcWorkbookLike, options?: BindRecalcWorkbookOptions): RecalcWorkbookBinding;