/** * Input handling: connects OpenTUI's StdinParser to the solid-tui screen. * * Vendored from OpenTUI (MIT): https://github.com/miunau/opentui * packages/core/src/lib/stdin-parser.ts + parse.keypress.ts + parse.keypress-kitty.ts * + parse.mouse.ts + clock.ts + paste.ts * * This module provides: * - startInput() / stopInput() to manage raw mode and stdin parsing * - onKeypress / onMouse / onPaste callbacks for the screen to wire up */ export type { KeyEventType, ParsedKey } from "./parse-keypress.js"; export type { MouseEventType, RawMouseEvent, ScrollInfo, } from "./parse-mouse.js"; export type { PasteMetadata } from "./paste.js"; export { decodePasteBytes } from "./paste.js"; export { type StdinEvent, StdinParser, type StdinParserOptions, } from "./stdin-parser.js"; import type { ParsedKey } from "./parse-keypress.js"; import type { RawMouseEvent } from "./parse-mouse.js"; import { StdinParser } from "./stdin-parser.js"; export interface InputCallbacks { onKey?: (key: ParsedKey) => void; onMouse?: (event: RawMouseEvent) => void; onPaste?: (bytes: Uint8Array) => void; onResponse?: (protocol: string, sequence: string) => void; } export interface InputHandle { /** The underlying parser — for protocol context updates. */ parser: StdinParser; /** Stop listening and restore terminal. */ stop(): void; } /** * Start reading raw stdin and dispatching parsed events. * Enables raw mode, bracketed paste, and optionally SGR mouse. */ export declare function startInput(callbacks: InputCallbacks, options?: { mouse?: boolean; kittyKeyboard?: boolean; bracketedPaste?: boolean; }): InputHandle; //# sourceMappingURL=index.d.ts.map