import { GhosttyAbi } from './abi.js'; import type { CallbackBridgeExports, GhosttyExports } from './exports.js'; import type { WasmSource } from './types.js'; /** Default Ghostty VT WASM URL emitted and rewritten by consumer bundlers. */ export declare const DEFAULT_WASM_URL: URL; /** Default callback bridge WASM URL emitted and rewritten by consumer bundlers. */ export declare const DEFAULT_CALLBACKS_URL: URL; declare function sourceToModule(source: WasmSource): Promise; /** * Compiles and caches the Ghostty WASM module without creating a terminal. * * @remarks * URL sources share an in-flight and completed compilation by URL. Reusing the same `ArrayBuffer` * identity also reuses compilation. Use this function when application startup needs an explicit * WASM-ready boundary before creating terminals. */ export declare function preloadGhostty(source?: WasmSource): Promise; /** Validated result returned by {@link loadGhostty}. */ export interface LoadedGhostty { /** Compiled Ghostty WebAssembly module. */ readonly module: WebAssembly.Module; /** Instantiated module without host imports. */ readonly instance: WebAssembly.Instance; /** Typed low-level Ghostty exports. */ readonly exports: GhosttyExports; /** Validated ABI manifest accessor. */ readonly abi: GhosttyAbi; } /** Loads, validates, and instantiates a Ghostty VT WASM module. */ export declare function loadGhostty(source?: WasmSource): Promise; export interface CallbackHost { write_pty(terminal: number, userdata: number, data: number, length: number): void; bell(terminal: number, userdata: number): void; title_changed(terminal: number, userdata: number): void; pwd_changed(terminal: number, userdata: number): void; desktop_notification(terminal: number, userdata: number, request: number): void; progress_report(terminal: number, userdata: number, report: number): void; clipboard_read(terminal: number, userdata: number, request: number): void; clipboard_write(terminal: number, userdata: number, request: number): void; mime_reader(userdata: number, mime: number, writer: number): number; random_secure(userdata: number, buffer: number, length: number): number; color_scheme(terminal: number, userdata: number, outScheme: number): number; } /** Instantiates the callback bridge with host functions used by Ghostty terminals. */ export declare function loadCallbackBridge(host: CallbackHost, source?: WasmSource): Promise; export { sourceToModule }; //# sourceMappingURL=loader.d.ts.map