import type { GhosttyCell, IRenderable } from 'ghostty-web'; export declare const GHOSTTY_VT_SHA256: string; interface LayoutField { offset: number; size: number; type: string; } interface LayoutType { size: number; fields: Record; } export type GhosttyTypeLayout = Record; type WasmFunction = (...args: number[]) => number; interface GhosttyExports extends WebAssembly.Exports { memory: WebAssembly.Memory; ghostty_type_json: WasmFunction; ghostty_wasm_alloc_opaque: WasmFunction; ghostty_wasm_free_opaque: WasmFunction; ghostty_wasm_alloc_u8_array: WasmFunction; ghostty_wasm_free_u8_array: WasmFunction; ghostty_terminal_new: WasmFunction; ghostty_terminal_free: WasmFunction; ghostty_terminal_resize: WasmFunction; ghostty_terminal_vt_write: WasmFunction; ghostty_terminal_scroll_viewport: WasmFunction; ghostty_render_state_new: WasmFunction; ghostty_render_state_free: WasmFunction; ghostty_render_state_update: WasmFunction; ghostty_render_state_get: WasmFunction; ghostty_render_state_set: WasmFunction; ghostty_render_state_row_iterator_new: WasmFunction; ghostty_render_state_row_iterator_free: WasmFunction; ghostty_render_state_row_iterator_next: WasmFunction; ghostty_render_state_row_get: WasmFunction; ghostty_render_state_row_cells_new: WasmFunction; ghostty_render_state_row_cells_free: WasmFunction; ghostty_render_state_row_cells_next: WasmFunction; ghostty_render_state_row_cells_get: WasmFunction; ghostty_cell_get: (cell: bigint, data: number, out: number) => number; } export interface GhosttyVtModule { instance: WebAssembly.Instance; exports: GhosttyExports; layout: GhosttyTypeLayout; } export declare function loadGhosttyVt(source?: string | URL | ArrayBuffer): Promise; export declare class GhosttyVtTerminal implements IRenderable { readonly module: GhosttyVtModule; private readonly exports; private terminal; private renderState; private scratch; private readonly scratchLength; private lines; private graphemes; private cursor; private dirty; cols: number; rows: number; constructor(module: GhosttyVtModule, cols?: number, rows?: number); private view; private bytes; private createHandle; private getRenderU32; private getCellU32; private resolvedColor; private styleFlags; write(data: string | Uint8Array): void; resize(cols: number, rows: number, cellWidth?: number, cellHeight?: number): void; scroll(delta: number): void; refresh(): void; getLine(y: number): GhosttyCell[] | null; getCursor(): { x: number; y: number; visible: boolean; blinking: boolean; style: "block" | "underline" | "bar" | "blockHollow"; }; getDimensions(): { cols: number; rows: number; }; isRowDirty(): boolean; needsFullRedraw(): boolean; clearDirty(): void; getGraphemeString(row: number, col: number): string; lineText(row: number): string; free(): void; } export {}; //# sourceMappingURL=ghostty-vt.d.ts.map