/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */ /** * Platform/surface classification for exports in this module: * * PLATFORM (safe for all surfaces): * - getDisplayWidth, Unicode display-width calculation. Used by any surface * that needs to measure text for layout purposes. * * SURFACE (terminal/TUI-specific): * - center, truncateDisplay, padDisplayEnd, fitDisplay, Terminal column * layout helpers that operate in cell widths. Not useful outside a terminal. * - wrapText, Word-wrapping to a fixed column width. * - interpolateColor, RGB hex interpolation for ANSI colour gradients. */ /** * Calculates the visual width of a string in the terminal. * Handles CJK characters, emoji (including ZWJ sequences), and * variation selectors correctly as double-width. */ export declare function getDisplayWidth(text: string): number; export declare function center(text: string, width: number): string; export declare function truncateDisplay(text: string, width: number, ellipsis?: string): string; export declare function padDisplayEnd(text: string, width: number): string; export declare function fitDisplay(text: string, width: number, ellipsis?: string): string; /** * Smart Word Wrapping. */ export declare function wrapText(text: string, width: number): string[]; /** * Interpolates between two RGB colors based on a factor (0-1). */ export declare function interpolateColor(startHex: string, endHex: string, factor: number): string; //# sourceMappingURL=terminal-width.d.ts.map