/** * Shared text primitives for terminal presentation: ANSI-aware measurement, * clipping, padding, and the semantic `ui` palette. Both the static layer * (`cli/index` — table/kv/tree) and the live layer (`cli/live` — pinned * region/spinner) build on these; keeping them here avoids an import cycle. */ import { ANSI_RE } from "../universal/ansi.js"; export { ANSI_RE }; export declare const bold: (s: string) => string; export declare const dim: (s: string) => string; export declare const red: (s: string) => string; export declare const green: (s: string) => string; export declare const yellow: (s: string) => string; export declare const cyan: (s: string) => string; export declare const gray: (s: string) => string; /** Visible width of a string — ANSI escapes stripped, counted by grapheme cluster. */ export declare const width: (s: string) => number; /** * Truncate to `n` visible graphemes (ellipsis at the cut), ANSI-aware: escape * sequences pass through so styling survives, and open styles are closed * with a final reset. Plain strings work too — this is THE truncate. */ export declare function clip(s: string, n: number): string; export declare const padEndV: (s: string, n: number) => string; export declare const padStartV: (s: string, n: number) => string; /** Semantic palette — use these, not raw colors, so intent stays consistent. */ export declare const ui: { head: (s: string) => string; accent: (s: string) => string; muted: (s: string) => string; ok: (s: string) => string; warn: (s: string) => string; bad: (s: string) => string; /** ids / refs — de-emphasized monospace-ish */ ref: (s: string) => string; }; //# sourceMappingURL=text.d.ts.map