/** * The `Input` kind: one typed line, checked before it is accepted. * * The line is typed behind the caret on the question's own line. `enter` * submits it through the question's pure `validate`; a line it refuses stays * open with the reason beneath it in the gutter's attention mark, and the * next edit clears the reason. Neither the reducer nor the view touches the * terminal. */ import type { Doc } from "../doc.js"; import { type AskKey, type AskKind, type AskReducerAction, type InputAsk } from "./ask.js"; /** The line typed so far, and what was wrong with it when it was last submitted. */ export interface InputState { readonly raw: string; readonly problem?: string; } export type InputAction = AskReducerAction; export declare const initialInputState: InputState; /** * One key against one line. Text appends, backspace removes the last * character, `enter` submits through `validate`, and escape and an interrupt * cancel. A refused line keeps what was typed so the person can fix it. */ export declare const reduceInput: (ask: InputAsk, state: InputState, key: AskKey) => InputAction; /** The question as the live scene shows it while it stands open. */ export declare const inputDoc: (ask: InputAsk, state: InputState) => Doc; /** The one transcript line an answered input leaves behind: what was typed. */ export declare const inputAnswer: (ask: InputAsk, raw: string) => Doc; /** An `Input` as the `Screen` runs it. */ export declare const inputKind: (ask: InputAsk) => AskKind; //# sourceMappingURL=input.d.ts.map