import { Context } from '../context'; import { Cell, SingleRange } from '../types'; import { CommonOptions } from './common'; export declare function getCellValue(ctx: Context, row: number, column: number, options?: CommonOptions & { type?: keyof Cell; }): any; export declare function setCellValue(ctx: Context, row: number, column: number, value: any, cellInput: HTMLDivElement | null, options?: CommonOptions, callAfterUpdate?: boolean): void; /** * Apply a cell value coming from a remote RTC peer, verbatim. * * This differs from `setCellValue` in two important ways and must be used for * every Yjs-driven remote apply: * * 1. It NEVER runs the formula engine and NEVER fires the local-edit hooks * (`onLocalCellEdit` / `afterUpdateCell`). The peer already computed the * value, so we use the synced `v`/`m`/`f` as-is. This avoids both * recomputation divergence and an update loop back into Yjs. * * 2. It PRESERVES the formula calc list. The regular `setCellValue` object * branch calls `delFunctionGroup`, which removes the cell from `calcChain` * and strips its dependency edges. Because `execFunctionGroup` walks * `calcChain` to decide what to recompute, dropping a formula cell there * permanently breaks its reactivity on that client (even after RTC stops). * Here we instead keep formula cells registered via * `insertUpdateFunctionGroup`, so they stay reactive to future local edits * on both owner and peer. */ export declare function applyRemoteCellValue(ctx: Context, row: number, column: number, value: any, options?: CommonOptions): void; export declare function clearCell(ctx: Context, row: number, column: number, options?: CommonOptions): void; export declare function setCellFormat(ctx: Context, row: number, column: number, attr: keyof Cell, value: any, options?: CommonOptions): void; export declare function autoFillCell(ctx: Context, copyRange: SingleRange, applyRange: SingleRange, direction: 'up' | 'down' | 'left' | 'right'): void;