/**
 * @license
 * Copyright 2026 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { StyledLine } from './styled-line.js';
import { type Region } from './output.js';
import { type InkOptions } from './components/AppContext.js';
export default class TerminalBuffer {
    get lines(): StyledLine[];
    private _cachedLines?;
    private lastRootRegion?;
    private readonly serializer;
    private readonly worker?;
    private readonly workerInstance?;
    private readonly resizeListener?;
    private readonly stdout;
    private lastRegions;
    private lastCursorPosition?;
    private lastTree?;
    private lastOptions?;
    private optionsChanged;
    private columns;
    private rows;
    constructor(columns: number, rows: number, options?: {
        debugRainbowEnabled?: boolean;
        renderInProcess?: boolean;
        stdout?: NodeJS.WriteStream;
        isAlternateBufferEnabled?: boolean;
        stickyHeadersInBackbuffer?: boolean;
        animatedScroll?: boolean;
        animationInterval?: number;
        backbufferUpdateDelay?: number;
        maxScrollbackLength?: number;
        forceScrollToBottomOnBackbufferRefresh?: boolean;
        cacheToStyledCharacters?: boolean;
    });
    resize(columns: number, rows: number): void;
    updateOptions(options: InkOptions): void;
    startRecording(filename: string): void;
    stopRecording(): void;
    dumpCurrentFrame(filename: string): void;
    update(_start: number, _end: number, root: Region, cursorPosition?: {
        row: number;
        col: number;
    }): boolean;
    render(): Promise<void>;
    fullRender(): Promise<void>;
    done(): void;
    getLinesUpdated(): Promise<number>;
    resetLinesUpdated(): void;
    destroy(): void;
    private sendToWorker;
    private diffRegion;
    private diffLines;
    private sendEdits;
}
