export interface AbiField { readonly offset: number; readonly size: number; readonly type: string; readonly [key: string]: unknown; } export interface AbiType { readonly kind: string; readonly size: number; readonly align: number; readonly fields?: Readonly>; readonly values?: Readonly>; readonly bits?: Readonly>; readonly [key: string]: unknown; } export interface AbiBitField { readonly lsb: number; readonly width: number; readonly arms?: Readonly>; }>>; readonly [key: string]: unknown; } export interface AbiManifest { readonly schema: number; readonly abi: { readonly target: string; readonly pointer_size: number; readonly usize_size: number; readonly endian: string; }; readonly types: Readonly>; } /** A bit field prepared for decoding many values, with its mask computed once. */ export interface PackedBitField { readonly lsb: number; readonly width: number; readonly mask: number; } /** Prepares an ABI bit field for {@link packedBits}. */ export declare function packedBitField(field: AbiBitField): PackedBitField; /** Reads one bit field from a 64-bit ABI value split into its low and high 32-bit words. */ export declare function packedBits(low: number, high: number, field: PackedBitField): number; /** Bit fields of a raw `GhosttyCell`, prepared for decoding many cells. */ export interface CellBitFields { readonly contentTag: PackedBitField; readonly content: PackedBitField; readonly codepoint: PackedBitField; readonly styleId: PackedBitField; readonly wide: PackedBitField; readonly hyperlink: PackedBitField; readonly semanticContent: PackedBitField; readonly tagCodepoint: number; readonly tagGrapheme: number; } /** Returns the `GhosttyCell` bit fields used to decode raw cells. */ export declare function cellBitFields(abi: GhosttyAbi): CellBitFields; /** Reads the codepoint held in a raw cell's content field, whatever its content tag. */ export declare function cellCodepoint(low: number, high: number, bits: CellBitFields): number; /** Thrown when a Ghostty WASM build has an incompatible or incomplete ABI manifest. */ export declare class UnsupportedGhosttyAbiError extends Error { /** Stable error name. */ readonly name = "UnsupportedGhosttyAbiError"; } /** Validated accessor for Ghostty's generated WASM ABI manifest. */ export declare class GhosttyAbi { /** Parsed ABI manifest. */ readonly manifest: AbiManifest; /** Validates and wraps a Ghostty ABI manifest. */ constructor(manifest: AbiManifest); /** Returns a named ABI type descriptor. */ type(name: string): AbiType; /** Returns the byte size of a named ABI type. */ size(name: string): number; /** Returns a named field descriptor from an ABI type. */ field(typeName: string, fieldName: string): AbiField; /** Returns a named numeric value from an ABI enum. */ value(typeName: string, valueName: string): number; /** Returns a bit-field descriptor, optionally nested below a tagged-union arm. */ bit(typeName: string, fieldName: string, arm?: string, nestedField?: string): AbiBitField; } //# sourceMappingURL=abi.d.ts.map