/** * View blocks shared by the wizards. * * `init` and `add` are different flows, but the user should recognise the same * CLI in both: the transcript of answers, the shortcut bar in the footer and the * result panels live here so they cannot diverge. */ import { type Node } from './engine/index.js'; /** The footer's shortcut bar: `↑/↓ navigate enter confirm`. */ export declare function controls(pairs: readonly (readonly [string, string])[]): Node; /** A transcript line: one question already answered. */ export declare function answeredLine(label: string, value: string): Node; /** Enunciado do passo ativo. */ export declare function question(prompt: string): Node; /** Text field with a block cursor. */ /** * Text field with the cursor where it actually is. * * Always drawing the cursor at the end hid the fact that it can move — and * without seeing the position there is no editing the middle of a value with any * confidence. The character under the cursor is inverted; at the end of the line * that gives the same solid block as before. */ export declare function textField(value: string, caret?: number): Node; export interface Choice { readonly label: string; readonly hint?: string; /** * The item's own colour, when it stands for something that already has an * identity — a framework, say. Without it the label follows the state (active * or not). */ readonly color?: string; } /** * Single-choice list, with the active item marked by `❯`. * * A coloured item keeps its colour whether active or not: the colour is what * identifies it. State stays legible through the marker and the weight — bold on * the active one, dimmed on the rest. */ export declare function choiceList(choices: readonly Choice[], activeIndex: number): Node[]; /** Multiple-choice list, with a mark per item. */ export declare function checkList(choices: readonly Choice[], activeIndex: number, selected: ReadonlySet): Node[]; /** Par Yes/No com o lado ativo destacado. */ export declare function confirmField(value: boolean): Node; /** Explanation of the active step, in secondary text. */ export declare function hint(content: string): Node; /** A highlighted warning — used when declining the step aborts the flow. */ export declare function warning(content: string): Node; export interface TaskLine { readonly label: string; readonly note?: string; } /** * The list of running tasks: done ones with ✔, the current one with a spinner and * the pending ones dimmed — the same vocabulary as the transcript. * * `elapsedMs` is the current step's runtime: past a threshold, the counter shows * next to it. Installing dependencies can take minutes, and without that signal a * spinning spinner is indistinguishable from a hung process. */ export declare function taskList(tasks: readonly TaskLine[], doneCount: number, elapsedMs?: number): Node[]; /** Header for the execution phase, with a spinner while work is pending. */ export declare function taskHeader(label: string, allDone: boolean): Node; export declare function progress(done: number, total: number): Node; /** Painel de desfecho — sucesso, cancelamento ou falha. */ export declare function resultPanel(kind: 'success' | 'danger', message: string): Node; /** A screen's standard frame: breathing room at the sides, content in a column. */ export declare function page(...children: Node[]): Node; //# sourceMappingURL=blocks.d.ts.map