/** * Pure status indicator formatting utilities for CLI display output. * * All functions are pure (no side effects, no external state) and return * formatted strings or labels for consistent status presentation across commands. * * @module utils/formatting/indicators */ /** * Status types supported by the status symbol formatter. */ export type StatusType = 'success' | 'error' | 'warning' | 'info' | 'pending' | 'skip'; /** * Display style options for boolean formatting. */ export type BooleanDisplayStyle = 'yesNo' | 'enabledDisabled' | 'symbol'; /** * Options for controlling boolean display formatting. */ export type BooleanDisplayOptions = { /** The display style to use. Default: 'yesNo'. */ readonly style?: BooleanDisplayStyle; }; /** * Volume level labels returned by the volume indicator. */ export type VolumeLevel = 'none' | 'low' | 'medium' | 'high'; /** * Configurable thresholds for volume classification. */ export type VolumeThresholds = { /** Upper bound for 'low' volume (inclusive). Default: 100. */ readonly low?: number; /** Upper bound for 'medium' volume (inclusive). Default: 10000. */ readonly medium?: number; }; /** * Returns a unicode symbol with a descriptive label for a given status. * * Maps each status type to a consistent symbol + text representation * suitable for CLI output. * * @param status - The status type to display * @returns A formatted status string, e.g. "✓ Success", "✗ Error" * * @example * statusSymbol('success') // "✓ Success" * statusSymbol('error') // "✗ Error" * statusSymbol('warning') // "! Warning" * statusSymbol('info') // "i Info" * statusSymbol('pending') // "○ Pending" */ export declare function statusSymbol(status: StatusType): string; /** * Renders a boolean value as a human-readable display string. * * Supports multiple display styles: yes/no, enabled/disabled, and unicode symbols. * Defaults to 'yesNo' style when no options are provided. * * @param value - The boolean value to display * @param options - Display style options * @returns A formatted boolean string, e.g. "Yes", "Disabled", "✓" * * @example * booleanDisplay(true) // "Yes" * booleanDisplay(false) // "No" * booleanDisplay(true, { style: 'enabledDisabled' }) // "Enabled" * booleanDisplay(false, { style: 'symbol' }) // "✗" */ export declare function booleanDisplay(value: boolean, options?: BooleanDisplayOptions): string; /** * Classifies a count into a volume level based on configurable thresholds. * * Returns 'none' for zero, 'low' for counts up to the low threshold, * 'medium' for counts up to the medium threshold, and 'high' for counts * above the medium threshold. * * Negative counts are treated as 'none'. * * @param count - The count to classify * @param thresholds - Optional custom thresholds (low default: 100, medium default: 10000) * @returns The volume level: 'none', 'low', 'medium', or 'high' * * @example * volumeIndicator(0) // "none" * volumeIndicator(50) // "low" * volumeIndicator(5000) // "medium" * volumeIndicator(50000) // "high" * volumeIndicator(50, { low: 10, medium: 100 }) // "medium" */ export declare function volumeIndicator(count: number, thresholds?: VolumeThresholds): VolumeLevel; /** * Generates an ASCII progress bar with a percentage label. * * The bar is rendered using filled (█) and empty (░) block characters * within square brackets, followed by the percentage. Handles edge cases: * - 0/0 returns an empty bar at 0% * - Negative values are clamped to 0% * - Values exceeding total are clamped to 100% * * @param current - The current progress value * @param total - The total/target value * @param width - The bar width in characters (default: 20) * @returns A formatted progress bar string, e.g. "[████████░░░░░░░░░░░░] 40%" * * @example * completenessBar(40, 100) // "[████████░░░░░░░░░░░░] 40%" * completenessBar(100, 100) // "[████████████████████] 100%" * completenessBar(0, 100) // "[░░░░░░░░░░░░░░░░░░░░] 0%" * completenessBar(0, 0) // "[░░░░░░░░░░░░░░░░░░░░] 0%" * completenessBar(150, 100) // "[████████████████████] 100%" */ export declare function completenessBar(current: number, total: number, width?: number): string;