/** biome-ignore-all lint/style/noNonNullAssertion: vendored from OpenTUI — byte-indexed array access with known-valid bounds */ /** biome-ignore-all lint/suspicious/noControlCharactersInRegex: intentional ESC/CSI pattern matching in terminal escape sequences */ import { type Clock } from "./clock.js"; import { type ParsedKey } from "./parse-keypress.js"; import { type RawMouseEvent } from "./parse-mouse.js"; import type { PasteMetadata } from "./paste.js"; export { type Clock, SystemClock, type TimerHandle } from "./clock.js"; export type StdinResponseProtocol = "csi" | "osc" | "dcs" | "apc" | "unknown"; export type StdinEvent = { type: "key"; raw: string; key: ParsedKey; } | { type: "mouse"; raw: string; encoding: "sgr" | "x10"; event: RawMouseEvent; } | { type: "paste"; bytes: Uint8Array; metadata?: PasteMetadata; } | { type: "response"; protocol: StdinResponseProtocol; sequence: string; }; export interface StdinParserProtocolContext { explicitWidthCprActive: boolean; kittyKeyboardEnabled: boolean; pixelResolutionQueryActive: boolean; privateCapabilityRepliesActive: boolean; } export interface StdinParserOptions { armTimeouts?: boolean; clock?: Clock; maxPendingBytes?: number; onTimeoutFlush?: () => void; protocolContext?: Partial; timeoutMs?: number; useKittyKeyboard?: boolean; } export declare class StdinParser { private readonly pending; private readonly events; private readonly timeoutMs; private readonly maxPendingBytes; private readonly armTimeouts; private readonly onTimeoutFlush; private readonly useKittyKeyboard; private readonly mouseParser; private readonly clock; private protocolContext; private timeoutId; private destroyed; private pendingSinceMs; private forceFlush; private justFlushedEsc; private state; private cursor; private unitStart; private paste; constructor(options?: StdinParserOptions); get bufferCapacity(): number; updateProtocolContext(patch: Partial): void; push(data: Uint8Array): void; read(): StdinEvent | null; drain(onEvent: (event: StdinEvent) => void): void; flushTimeout(nowMsValue?: number): void; private tryForceFlush; reset(): void; resetMouseState(): void; destroy(): void; private ensureAlive; private scanPending; private emitKeyOrResponse; private emitMouse; private emitLegacyHighByte; private emitOpaqueResponse; private consumePrefix; private takePendingBytes; private flushPendingOverflow; private markPending; private consumePasteBytes; private pushPasteBytes; private reconcileDeferredStateWithProtocolContext; private reconcileTimeoutState; private clearTimeout; private resetState; } //# sourceMappingURL=stdin-parser.d.ts.map