import type { Theme } from '@earendil-works/pi-coding-agent'; /** Strip ANSI escapes so we can inspect a rendered line's visible characters. */ export declare function plainText(line: string): string; /** Split a `{name}` format template into its literal pre/post parts. Assumes * the template contains `{name}` (config validation enforces this); a * template without it degrades to rendering the bare name. */ export declare function splitFormat(format: string): [string, string]; /** Parse a `composer:set-label` bus payload: a non-empty string `text` sets * the label; anything else (absent, empty, wrong type) clears the override. */ export declare function parseLabelData(data: unknown): string | undefined; /** Whether this tmux pane is selected by a focused client. */ export declare function paneHasFocusedClient(paneId: string | undefined, clients: string): boolean; /** Read terminal focus events from raw stdin, preserving a split CSI prefix. */ export declare function parseFocusInput(carry: string, chunk: string): { focused: boolean | undefined; carry: string; }; /** Truncate to `max` visible cells, appending an ellipsis when truncated. */ export declare function truncateCells(s: string, max: number): string; export type Rgb = [number, number, number]; /** Resolve a theme token or hex colour to RGB. Returns null when the theme * doesn't emit a truecolor sequence for the token (e.g. 256-colour themes). */ export declare function resolveRgb(theme: Theme, color: string): Rgb | null; /** Linear mix of two RGB colours; t=0 gives `a`, t=1 gives `b`. */ export declare function mixRgb(a: Rgb, b: Rgb, t: number): Rgb; /** Fully saturated rainbow colour, hue-rotating once per `periodMs`. */ export declare function rainbowRgb(periodMs: number): Rgb; /** Paint text with a truecolor foreground. */ export declare function rgbColor(rgb: Rgb, text: string): string; /** Apply a colour by theme token or hex value. Hex takes precedence. */ export declare function applyColor(theme: Theme, color: string, text: string): string;