/**
* Input element key handler — manages text editing operations for .
*
* Given a key event and the current input state (value + cursor position),
* produces the next state. The screen wires this into the key dispatch loop
* for any focused node.
*/
import type { ParsedKey } from "./parse-keypress.js";
export interface InputState {
cursorPos: number;
value: string;
}
export interface InputResult {
/** Whether onChange should be called (value changed) */
changed: boolean;
/** New cursor position */
cursorPos: number;
/** Whether onSubmit should be called (Enter without shift in single-line, or ctrl+enter) */
submit: boolean;
/** New value after the key operation */
value: string;
}
/**
* Process a key event against input state, returning the next state.
* Pure function — no side effects.
*/
export declare function handleInputKey(key: ParsedKey, state: InputState, options?: {
multiline?: boolean;
}): InputResult;
//# sourceMappingURL=input-handler.d.ts.map