UNPKG

@emmahyde/thinking-patterns

Version:

MCP server combining systematic thinking, mental models, debugging approaches, and stochastic algorithms for comprehensive cognitive pattern support

107 lines (106 loc) 3.5 kB
/** * UI Utilities for consistent formatting and display * Provides shared utilities for creating boxes, headers, and sections * * Modernized implementation using boxen + ecosystem packages */ export declare const Colors: { readonly reset: "\u001B[0m"; readonly bright: "\u001B[1m"; readonly dim: "\u001B[2m"; readonly red: "\u001B[31m"; readonly green: "\u001B[32m"; readonly yellow: "\u001B[33m"; readonly blue: "\u001B[34m"; readonly magenta: "\u001B[35m"; readonly cyan: "\u001B[36m"; readonly white: "\u001B[37m"; readonly gray: "\u001B[90m"; }; /** * Box drawing characters for consistent borders */ export declare const BoxChars: { readonly horizontal: "─"; readonly vertical: "│"; readonly topLeft: "┌"; readonly topRight: "┐"; readonly bottomLeft: "└"; readonly bottomRight: "┘"; readonly tee: "├"; readonly teeRight: "┤"; readonly cross: "┼"; }; /** * Configuration for box formatting */ export interface BoxConfig { padding: number; minWidth: number; maxWidth: number; borderColor: string; headerColor: string; sectionColor: string; } export declare const DEFAULT_BOX_CONFIG: BoxConfig; /** * Calculate the display width of a string, accounting for ANSI escape sequences and emojis */ export declare function getDisplayWidth(text: string): number; /** * Format a header with optional emoji and consistent styling */ export declare function formatHeader(text: string, emoji?: string, config?: Partial<BoxConfig>): string; /** * Format a section with title and content */ export declare function formatSection(title: string, content: string | string[], config?: Partial<BoxConfig>): string; /** * Create a formatted box with title and sections */ export declare function boxed(title: string, sections: Record<string, string | string[]>, config?: Partial<BoxConfig>): string; /** * Create a simple border around text */ export declare function bordered(text: string, config?: Partial<BoxConfig>): string; /** * Create a simple divider line */ export declare function divider(width?: number, char?: string): string; /** * Color themes for different types of output */ export declare const Themes: { readonly success: { readonly borderColor: "\u001B[32m"; readonly headerColor: string; readonly sectionColor: "\u001B[32m"; }; readonly error: { readonly borderColor: "\u001B[31m"; readonly headerColor: string; readonly sectionColor: "\u001B[31m"; }; readonly warning: { readonly borderColor: "\u001B[33m"; readonly headerColor: string; readonly sectionColor: "\u001B[33m"; }; readonly info: { readonly borderColor: "\u001B[34m"; readonly headerColor: string; readonly sectionColor: "\u001B[34m"; }; readonly subtle: { readonly borderColor: "\u001B[90m"; readonly headerColor: "\u001B[37m"; readonly sectionColor: "\u001B[90m"; }; }; /** * Convenience functions for themed boxes */ export declare function successBox(title: string, sections: Record<string, string | string[]>): string; export declare function errorBox(title: string, sections: Record<string, string | string[]>): string; export declare function warningBox(title: string, sections: Record<string, string | string[]>): string; export declare function infoBox(title: string, sections: Record<string, string | string[]>): string;