import { type Token } from "marked";
import type { InkThemeAdapter } from "../theme-adapter.js";
import type { CliHighlight } from "./highlight.js";
/**
 * Configure the shared `marked` instance exactly once. The only customisation is
 * disabling strikethrough: models frequently write `~` for "approximate"
 * (e.g. `~100`) and almost never intend an actual strike, so we keep `~` literal.
 */
export declare function configureMarked(): void;
/**
 * Fast structural check for whether `text` contains any markdown syntax. Samples
 * the first 500 chars — markdown markers (headings, fences, list bullets) cluster
 * at the start, while long plain tails (tool output) stay markdown-free.
 */
export declare function hasMarkdownSyntax(text: string): boolean;
/**
 * Lex `content` into marked tokens, hitting the LRU cache and the plain-text
 * fast-path. Plain text (no markdown syntax) returns a single synthetic
 * paragraph token and is intentionally not cached — reconstruction is one
 * allocation and caching would retain the content for no benefit.
 */
export declare function cachedLexer(content: string): Token[];
/**
 * Render a single marked token to a chalk-ANSI string, painting via the
 * framework {@link InkThemeAdapter}. Tables are handled out-of-band by the
 * `Markdown` component (rendered as flexbox), so this returns an empty string
 * for `table` tokens — the caller never funnels a table through here.
 */
export declare function formatToken(token: Token, theme: InkThemeAdapter, highlight?: CliHighlight | null, listDepth?: number, orderedListNumber?: number | null, parent?: Token | null): string;
/** Pick the list-marker style for a depth: 1./2. → a./b. → i./ii. → numeric. */
export declare function getListNumber(listDepth: number, orderedListNumber: number): string;
/**
 * Pad `content` to `targetWidth` per alignment. `displayWidth` is the visible
 * width of `content` (caller computes it on stripAnsi'd text so embedded ANSI
 * codes do not skew the padding).
 */
export declare function padAligned(content: string, displayWidth: number, targetWidth: number, align: "left" | "center" | "right" | null | undefined): string;
/** Measure a string's visible terminal width (ANSI-aware), for table layout. */
export declare function stringWidth(text: string): number;
