import type { Input } from "@earendil-works/pi-tui"; import type { QuestionnaireState } from "../state/state.ts"; import type { QuestionData } from "../tool/types.js"; import type { BoundGlobalBinding, BoundPerTabBinding } from "./component-binding.ts"; import type { WrappingSelectItem } from "./components/wrapping-select.ts"; import type { TabComponents } from "./tab-components.ts"; /** Cache-invalidation contract used by the adapter. `pi-tui` `Component` already satisfies it. */ interface Invalidatable { invalidate(): void; } export interface QuestionnairePropsAdapterConfig { tui: { requestRender(): void; }; questions: readonly QuestionData[]; itemsByTab: ReadonlyArray; tabsByIndex: ReadonlyArray; inlineInput: Input; globalBindings: ReadonlyArray; perTabBindings: ReadonlyArray; /** * Renderables not reached by the binding registries (e.g. the notes * `Input`, which is typed into directly and has no props). Walked by * `invalidate()` after the binding-driven components. */ extraInvalidatables?: ReadonlyArray; } /** * View fan-out: drives every component setter from the canonical state via * two binding registries. `globalBindings` covers the cross-tab components * (chatRow, dialog, submitPicker?, tabBar?); `perTabBindings` covers the * per-tab kinds (optionList, preview, multiSelect?). The hand-coded fan-out * collapses to one global loop + one nested per-tab loop. The shared inline * input is projected through owner-specific draft slots so the option list and * chat footer never display each other's in-flight text. */ export declare class QuestionnairePropsAdapter { private readonly tui; private readonly questions; private readonly itemsByTab; private readonly tabsByIndex; private readonly inlineInput; private readonly globalBindings; private readonly perTabBindings; private readonly extraInvalidatables; constructor(config: QuestionnairePropsAdapterConfig); apply(state: QuestionnaireState): void; /** * Invalidates every owned renderable. Called by the session in place of * the old `dialog.invalidate()` forwarding chain — DialogView no longer * reaches into siblings (chatRow, tabBar, notesInput, activePreviewPane). * Iterates the same registries used by `apply()` plus * `extraInvalidatables` for components outside the binding system. */ invalidate(): void; } export {}; //# sourceMappingURL=props-adapter.d.ts.map