mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-05 00:13:20 +00:00
- split 647-line ui.ts into 10 focused modules (<115 lines each) - extract: colors, indicators, boxes, tables, text, spinner, tasks - add init.ts for shared state and types.ts for interfaces - ui.ts now re-exports from ui/index.ts for backward compat
37 lines
669 B
TypeScript
37 lines
669 B
TypeScript
/**
|
|
* Status Indicators
|
|
*
|
|
* ASCII-only status markers (NO EMOJIS)
|
|
* @module utils/ui/indicators
|
|
*/
|
|
|
|
import { color } from './colors';
|
|
|
|
/**
|
|
* Success indicator: [OK]
|
|
*/
|
|
export function ok(message: string): string {
|
|
return `${color('[OK]', 'success')} ${message}`;
|
|
}
|
|
|
|
/**
|
|
* Error indicator: [X]
|
|
*/
|
|
export function fail(message: string): string {
|
|
return `${color('[X]', 'error')} ${message}`;
|
|
}
|
|
|
|
/**
|
|
* Warning indicator: [!]
|
|
*/
|
|
export function warn(message: string): string {
|
|
return `${color('[!]', 'warning')} ${message}`;
|
|
}
|
|
|
|
/**
|
|
* Info indicator: [i]
|
|
*/
|
|
export function info(message: string): string {
|
|
return `${color('[i]', 'info')} ${message}`;
|
|
}
|