/** * CellBuffer is the 2D matrix that represents the terminal screen. * This is the core data structure for our diffing approach. */ import { type Cell, type Style } from "./cell.js"; export declare class CellBuffer { readonly width: number; readonly height: number; private cells; constructor(width: number, height: number); private index; private inBounds; get(x: number, y: number): Cell; set(x: number, y: number, cell: Cell): void; setChar(x: number, y: number, char: string, style?: Style): void; /** * Set a character, merging style with existing cell's style. * This preserves background if the new style doesn't specify one. */ setCharMerge(x: number, y: number, char: string, style?: Style): void; /** * Write a string starting at (x, y), going right. * Text is clipped at buffer edge. */ writeString(x: number, y: number, text: string, style?: Style): number; /** * Write a string, merging style with existing cells. * Text is clipped at buffer edge. */ writeStringMerge(x: number, y: number, text: string, style?: Style): number; /** * Fill a rectangular region with a cell. */ fillRect(x: number, y: number, width: number, height: number, cell: Cell): void; /** * Clear the entire buffer. */ clear(): void; /** * Copy contents from another buffer into this one at position (destX, destY). */ blit(source: CellBuffer, destX: number, destY: number): void; /** * Create a clone of this buffer. */ clone(): CellBuffer; /** * Check if this buffer equals another. */ equals(other: CellBuffer): boolean; /** * Get a debug string representation. */ toDebugString(): string; } //# sourceMappingURL=buffer.d.ts.map