terminal-chat-ui
Version:
Shared UI components for terminal-based chat interfaces using Theater actors
16 lines (15 loc) • 589 B
TypeScript
/**
* Central input management hook
*/
import type { KeyEvent, InputHandler, FocusTarget } from '../types/input.js';
export declare function useInputManager(): {
inputState: InputState;
dispatchInput: (event: KeyEvent) => boolean;
registerHandler: (id: string, handler: InputHandler) => void;
unregisterHandler: (id: string) => void;
updateInputContent: (content: string) => void;
updateInputCursor: (position: number) => void;
updateInputMode: (mode: "insert" | "command") => void;
setFocus: (target: FocusTarget) => void;
clearInput: () => void;
};