import type { Token } from "marked";
/** Extract all plain text from a token tree. */
export declare function extractPlainText(tokens: Token[]): string;
/** Measure the visual display width of a string (handles CJK, emoji, etc). */
export declare function visualWidth(str: string): number;
/**
 * Force a string to exactly `width` visual columns.
 * Truncates if too wide (char-by-char to avoid splitting wide chars),
 * pads with spaces if too narrow.
 */
export declare function fitToWidth(str: string, width: number): string;
/**
 * Word-wrap plain text extracted from tokens into lines of at most `width`
 * visual columns. Uses `wrap-ansi` for wrapping, then force-clamps each line
 * to exactly `width` with `fitToWidth` to eliminate measurement mismatches.
 */
export declare function wrapPlainTextLines(tokens: Token[], width: number): string[];
/**
 * Center a string within `width` visual columns.
 * Truncates if too wide, pads with spaces on both sides if too narrow.
 */
export declare function centerToWidth(str: string, width: number): string;
/** Measure the visual display width of plain text in a token tree. */
export declare function plainTextLength(tokens: Token[]): number;
//# sourceMappingURL=table-text.d.ts.map