UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

85 lines 2.52 kB
/** * Apply color to text */ export declare function color(text: string, colorName: keyof typeof colors): string; /** * Apply style to text */ export declare function style(text: string, styleName: keyof typeof styles): string; /** * Print the STX Story banner */ export declare function printBanner(): void; /** * Print server URLs */ export declare function printServerUrls(url: string, networkUrl?: string): void; /** * Print story count */ export declare function printStoryCount(count: number): void; /** * Print file change event */ export declare function printFileChange(event: string, file: string): void; /** * Print error message */ export declare function printError(message: string, details?: string): void; /** * Print warning message */ export declare function printWarning(message: string): void; /** * Print success message */ export declare function printSuccess(message: string): void; /** * Print info message */ export declare function printInfo(message: string): void; /** * Print build summary */ export declare function printBuildSummary(storyCount: number, outDir: string, duration: number): void; /** * Print test summary */ export declare function printTestSummary(total: number, passed: number, failed: number, duration: number): void; /** * Print keyboard shortcuts help */ export declare function printHelp(): void; /** * Clear the console */ export declare function clearConsole(): void; /** * Create a spinner */ export declare function createSpinner(text: string): { start: () => void stop: (success?: boolean) => void update: (newText: string) => void }; /** * Format duration in human-readable format */ export declare function formatDuration(ms: number): string; /** * Format file size in human-readable format */ export declare function formatSize(bytes: number): string; // Convenience functions export declare const red: (text: string) => string; export declare const green: (text: string) => string; export declare const yellow: (text: string) => string; export declare const blue: (text: string) => string; export declare const magenta: (text: string) => string; export declare const cyan: (text: string) => string; export declare const white: (text: string) => string; export declare const gray: (text: string) => string; export declare const bold: (text: string) => string; export declare const dim: (text: string) => string; export declare const italic: (text: string) => string; export declare const underline: (text: string) => string;