docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a typed status formatting helper for terminal output. It must rely on the styling library's TypeScript definitions to assemble colorized labels, including an option to use its deprecated neutral-tone alias when requested.
info, success, warning, and error statuses as [LABEL] message with labels uppercased, applies the corresponding style from the library (neutral gray for info, green for success, yellow for warning, red for error), and resets formatting after the message. @testneutralTone is set to deprecated, the info label uses the dependency's deprecated neutral shade alias (the alternative spelling) instead of the canonical name while other labels keep their styles. @teststream: "stderr" bases its styling decisions on color support for that stream; disabling color for stderr leaves that palette unstyled while a default palette remains colored. @testlistStyles() returns all supported status kinds in order ["info", "success", "warning", "error"], reflecting the neutral tone variant currently in use. @testexport type StatusKind = "info" | "success" | "warning" | "error";
export interface PaletteOptions {
stream?: "stdout" | "stderr";
neutralTone?: "modern" | "deprecated";
}
export interface StatusPalette {
format(kind: StatusKind, message: string): string;
listStyles(): StatusKind[];
}
export function createStatusPalette(options?: PaletteOptions): StatusPalette;Provides typed terminal styling helpers and deprecated neutral-tone alias support.