/** A safe, presentational Markdown run. Render `text` as a text node, never HTML. */ export interface RichTextRun { text: string; kind: "text" | "strong" | "em" | "code" | "strike"; } /** * Parse a small game-friendly Markdown subset into safe text runs, on either runtime. * Supports emphasis, inline code, strike-through, headings, lists and link labels. * HTML is literal text; URLs and images never create executable or remote content. * @param source - Untrusted dialogue, tooltip or journal text. * @returns Runs for a DOM/text renderer (no HTML injection is needed). * @example * const runs = parseRichText('Take the **silver key**.'); */ export declare function parseRichText(source: string): RichTextRun[]; /** * Reveal a prefix without cutting Unicode code points or exposing Markdown syntax. * @param runs - Runs returned by parseRichText. * @param count - Maximum visible code points. * @returns A new array suitable for a typewriter renderer. * @example sliceRichText(parseRichText('**Hello**'), 2) // bold "He" */ export declare function sliceRichText(runs: readonly RichTextRun[], count: number): RichTextRun[]; /** * Paginate rich text for dialogue panels, preserving formatting and all text. * @param runs - Parsed text runs. * @param size - Soft page length in code points; defaults to 320 (minimum 40). * @returns Non-empty page list, including one empty page for empty input. * @example const pages = paginateRichText(parseRichText(message), 180); */ export declare function paginateRichText(runs: readonly RichTextRun[], size?: number): RichTextRun[][];