import type { Theme } from "../../../../modes/interactive/theme/theme.js"; import type { QuestionnaireResult, QuestionParams } from "../tool/types.js"; import type { WrappingSelectItem } from "../view/components/wrapping-select.ts"; export interface QuestionnaireSessionConfig { tui: { terminal: { columns: number; }; requestRender(): void; }; theme: Theme; params: QuestionParams; itemsByTab: WrappingSelectItem[][]; done: (result: QuestionnaireResult) => void; /** When true, Chat about this is a plain option and does not open an inline editor. */ chatAsOption?: boolean; } export interface QuestionnaireSessionComponent { render(width: number): string[]; invalidate(): void; handleInput(data: string): boolean; } /** * Slim runtime: owns the canonical state cell, the input-buffer cell, the * two-pass `notesVisible` dispatch loop, and the effect runner. State * transitions go through the pure `reduce` reducer; UI fan-out goes through * the `QuestionnairePropsAdapter` produced by `buildQuestionnaire`. */ export declare class QuestionnaireSession { private state; private readonly questions; private readonly isMulti; private readonly itemsByTab; private readonly chatAsOption; private readonly notesInput; private readonly inlineInput; private readonly viewAdapter; private readonly tui; private readonly done; readonly component: QuestionnaireSessionComponent; constructor(config: QuestionnaireSessionConfig); dispatch(data: string): boolean; private commit; private mirrorNotesDraft; private mirrorInlineInputDraft; private runEffect; /** * Per-keystroke `ignore` fast path: delegates to the headless `inlineInput` * Input so bracketed-paste accumulator (`input.js:33-63`) and Kitty CSI-u * decode (`input.js:155-163`) take effect. Cursor is NOT force-reset here — * doing so would corrupt split-chunk pastes (a `\x05` byte mid-paste lands * verbatim in `pasteBuffer` and survives `handlePaste`'s narrow strip). * Cursor advances naturally via `insertCharacter` on typing/paste; cursor- * movement keys (Left/Right/Home/End/word-jumps) are now functional, and * the live buffer/caret are mirrored into canonical state so rendering can * draw the same thick cursor at the editing caret. `viewAdapter.apply` is * called directly without a reducer round-trip — preserves the D3 fast-path * latency profile from Phase 11. */ private handleIgnoreInline; private runtime; private applyContext; private currentItem; } //# sourceMappingURL=questionnaire-session.d.ts.map