import type { TerminalEventRecord } from "../events/recording.js"; type Stdin = NodeJS.ReadStream; type KeyboardProtocol = "auto" | "kitty" | "xterm" | "off"; export type StdinDriver = Readonly<{ dispose: () => void; /** * Toggle mouse capture at runtime. When disabled, the terminal's native * selection / right-click menu is restored (the stdin driver sends the * DECSET disable sequences). When re-enabled, vue-tui mouse tracking * resumes. This does NOT toggle selection config — pair it with * `app.selection.setConfig()` for a complete native-vs-osc52 mode switch. */ setMouseCapture?: (enabled: boolean) => void; }>; type CleanupSignal = "SIGINT" | "SIGTERM" | "SIGHUP" | "SIGBREAK"; export type TerminalCleanupSignalPolicy = "cleanup-only" | "exit" | "reraise"; export type TerminalCleanupOptions = Readonly<{ signals?: readonly CleanupSignal[]; /** * Defaults to "reraise": cleanup runs, vue-tui removes its own listener, * then the signal is sent again when no other listener owns the signal. */ signalPolicy?: TerminalCleanupSignalPolicy; cleanupOnUnhandledRejection?: boolean; rethrowUnhandledRejection?: boolean; }>; export type TerminalCleanupHandle = Readonly<{ cleanup: () => void; uninstall: () => void; }>; export declare function resolveCleanupSignalAction(signal: CleanupSignal, policy: TerminalCleanupSignalPolicy): { type: "none"; } | { type: "exit"; code: number; } | { type: "reraise"; signal: CleanupSignal; }; export declare function installTerminalCleanup(dispose: () => void, options?: TerminalCleanupOptions): TerminalCleanupHandle; export declare function createStdinDriver(options: Readonly<{ dispatch: (event: TerminalEventRecord) => boolean | void; stdin?: Stdin; stdout?: NodeJS.WriteStream; env?: Readonly>; enableMouse?: boolean; keyboardProtocol?: KeyboardProtocol; /** * Enable "any-motion" mouse tracking (xterm DECSET ?1003). * This is required for hover interactions in the CLI, but can increase event volume. */ enableMouseMotion?: boolean; onTerminalFocusChange?: (focused: boolean) => void; onExit?: () => void; autoCleanup?: boolean | TerminalCleanupOptions; }>): StdinDriver; export {};