/** * Diff engine: compares two CellBuffers and produces a minimal set of changes. */ import { CellBuffer } from "./buffer.js"; import { type Cell } from "./cell.js"; export interface CellChange { x: number; y: number; cell: Cell; } /** * Compute the diff between two buffers. * Returns an array of cell changes needed to transform `from` into `to`. */ export declare function diffBuffers(from: CellBuffer, to: CellBuffer): CellChange[]; /** * Group changes by row for more efficient cursor movement. * Returns changes grouped by y-coordinate. */ export declare function groupChangesByRow(changes: CellChange[]): Map; /** * Detect consecutive runs in a row for even more efficient output. * A run is a sequence of consecutive x positions. */ export interface CellRun { x: number; y: number; cells: Cell[]; } export declare function findRuns(changes: CellChange[]): CellRun[]; //# sourceMappingURL=diff.d.ts.map