import { TerminalInputPump } from './terminal-input.js'; /** * The glyphs the probe prints. * * Drawn from the families {@link AMBIGUOUS_WIDE_RANGES} covers — an enclosed * digit, a dash, an ellipsis, a curly quote, a middle dot, a bullet, a roman * numeral. Mixing families is deliberate: a font may cover `①` from a fallback * face while treating `—` as typographic punctuation, and a single-glyph probe * would then decide the whole table from one sample. A terminal that treats the * ambiguous block as full width spends two cells on all seven. */ export declare const GLYPH_PROBE_TEXT = "\u2460\u2014\u2026\u201C\u201D\u00B7\u2022\u2160"; export interface GlyphWidthMeasurement { /** True when the terminal spent two cells per probe glyph. */ wide: boolean; /** Cells the terminal reported for the whole probe string. */ cells: number; } /** * Measure the ambiguous-glyph width on a real terminal. * * Returns `undefined` — never a guess — when there is no terminal, when it does * not answer, or when the answer matches neither expectation (a font with mixed * metrics: the caller then keeps its locale-based default rather than inventing a * table from one sample). * * The round trip goes through {@link TerminalInputPump.askPosition}, which * swallows the reply. That is not an implementation detail: a cursor reply that * nobody consumes is echoed on screen as literal `^[[1;5R` text, and a * hand-rolled version of this probe did exactly that at boot. * @param options - the streams (or a pump already running on them), the probe * text, and the reply budget. * @returns what the terminal said, or undefined. */ export declare function measureAmbiguousGlyphWidth(options?: { stdin?: NodeJS.ReadStream; stdout?: NodeJS.WriteStream; probe?: string; timeoutMs?: number; pump?: TerminalInputPump; }): Promise;