import type { NormalizedTable, NormalizedTableCell, Table } from 'modern-idoc'; import type { Element2D } from './Element2D'; import { CoreObject } from '../../../core'; interface CellRect { left: number; top: number; width: number; height: number; } /** * Renders an idoc table by expanding each cell into a positioned `Element2D` * placed in the parent's `back` layer — so cells render and hit-test like normal * nodes but never leak into the user's `children` or `toJSON`. * * Updates are coalesced (multiple property changes in one tick → one rebuild) and * incremental: cell nodes are keyed by `row:col` and reused; only cells whose * content or geometry changed are re-applied, and only removed cells are destroyed. */ export declare class Element2DTable extends CoreObject implements NormalizedTable { protected _parent: Element2D; enabled: boolean; columns: NormalizedTable['columns']; rows: NormalizedTable['rows']; cells: NormalizedTable['cells']; /** Generated cell nodes keyed by `row:col`, for incremental reuse. */ protected _cellNodes: Map; /** Per-cell content+geometry snapshot, to skip unchanged cells. */ protected _cellSnapshots: Map; protected _dirty: boolean; protected _flushScheduled: boolean; constructor(_parent: Element2D); setProperties(properties?: Table): this; protected _updateProperty(key: string, value: any, oldValue: any): void; /** Coalesce property changes within the same tick into a single rebuild. */ protected _requestUpdate(): void; isValid(): boolean; get gridWidth(): number; get gridHeight(): number; /** Synchronously (re)build cell nodes, diffing against the existing ones. */ update(): void; protected _applyCell(node: Element2D, cell: NormalizedTableCell, rect: CellRect): void; protected _clearCells(): void; protected _destroy(): void; } export {};