export declare function graphemes(text: string): string[]; interface Token { readonly kind: "escape" | "text"; readonly value: string; } /** Split into escape sequences and printable runs, in order. */ export declare function tokenize(text: string): Token[]; /** True when the string opens a styling sequence it does not reset. */ export declare function hasOpenStyle(text: string): boolean; /** Guarantee no frame row leaks styling into the next row. */ export declare function sealStyle(text: string): string; /** * Clip to `max` layout columns, keeping every escape sequence intact and * appending `suffix` (unstyled) when content was dropped. */ export declare function clipToWidth(text: string, max: number, suffix?: string): string; export declare function padToWidth(text: string, width: number): string; /** * Middle-ellipsis for PLAIN text (no ANSI): keeps ~60% of the budget at the * head and ~40% at the tail so both ends of a path stay recognizable. */ export declare function middleClipPlain(text: string, max: number, ellipsis?: string): string; export declare function padStartToWidth(text: string, width: number): string; /** * Place `right` flush to `width`, dropping it entirely when it cannot fit with * at least one separating column. The left side is clipped, never the right. */ export declare function alignEnds(left: string, right: string, width: number, ellipsis: string): string; export declare function plainText(text: string): string; /** * Drop trailing blanks that sit outside every styling run. Padding that belongs * to a background wash ends before its reset sequence and is therefore kept. */ export declare function trimTrailingSpaces(text: string): string; export declare function joinSeparated(parts: readonly (string | undefined)[], separator: string): string; export {};