import { type Span, type Text } from "./doc.js"; import { type TruncateMode } from "./width.js"; export declare const spansOf: (value: Text) => ReadonlyArray; /** Wrap text into lines of spans. An empty source line yields an empty line. */ export declare const wrapText: (value: Text, width: number | "unbounded") => ReadonlyArray>; /** * Shorten a value to `width` display columns, keeping span attributes. A * copyable value is returned whole: it is never cut. */ export declare const truncateText: (value: Text, width: number, mode?: TruncateMode, ellipsis?: string) => Text; /** * Width of the longest unbreakable run, the floor below which wrapping starts * splitting words. A path list's floor is its widest segment, not the list, * because the list gives way at its separators. */ export declare const longestWordWidth: (value: Text) => number; //# sourceMappingURL=wrap-text.d.ts.map