import type { Readable, Writable } from "node:stream"; import type { Palette } from "./ui-colour.js"; export interface ThemeIO { input: Readable; output: Writable; } export interface SelectOption { value: string; label: string; hint?: string; dim?: boolean; } /** A text question: what an empty answer would mean, and the rule a typed one must pass. */ export interface TextOptions { placeholder?: string; /** The one-line error shown under the input; `undefined` accepts. */ validate?: (value: string) => string | undefined; } export interface Theme { /** `undefined` and clack's cancel symbol both mean the person left the question. */ select(message: string, options: SelectOption[], initialValue?: string): Promise; /** `hint` is one dim line under the question, the way Hermes marks a step a person may skip. */ confirm(message: string, initialValue: boolean, hint?: string): Promise; text(message: string, initialValue: string, options?: TextOptions): Promise; password(message: string): Promise; intro(message: string): void; outro(message: string): void; /** A finished step: the diamond the prompts leave behind, in Relay blue. */ step(message: string): void; /** A sentence inside the gutter that is neither a question nor a step. */ message(message: string): void; spinner(): { start(message: string): void; stop(message: string): void; }; } export declare const makeTheme: (p: Palette, io: ThemeIO) => Theme; //# sourceMappingURL=clack-theme.d.ts.map