/** * Terminal markdown renderer for assistant replies: a pure GFM-subset * block/inline parser producing styled line segments the Ink renderer maps * to colored text. No ANSI here — the app owns color mapping, tests own the * structure. The subset mirrors what agent replies actually emit: headings, * emphasis, inline/fenced code, flat lists, blockquotes, links, rules, GFM * tables, and wrapped paragraphs. Unknown syntax degrades to plain text. * * @module @deepseek-ai/dsh-code/render/markdown */ /** Style classes the renderer emits; the app maps them to colors/props. */ export type MdStyle = 'plain' | 'bold' | 'italic' | 'boldItalic' | 'code' | 'accent' | 'accentBold' | 'dim' | 'strike' | 'diffAdd' | 'diffDel'; /** One styled run of text. */ export interface MdSegment { /** Visible text (no ANSI). */ text: string; /** Presentation class for the app's color map. */ style: MdStyle; } /** One rendered line: a sequence of styled runs. */ export interface MdLine { segments: readonly MdSegment[]; } /** Visible width of a run in columns (grapheme-cluster and emoji aware). */ export declare function visibleColumns(text: string): number; /** Render markdown text into styled lines of at most `width` columns. */ export declare function renderMarkdown(text: string, width: number, options?: { physicalWrap?: boolean; }): readonly MdLine[];