import { markdownMathSegments, normalizeGeneratedMarkdown } from '../text/index'; /** True when a string carries math delimiters the math parser should handle. */ export declare function containsMath(source: string): boolean; /** Delimited math or any TeX control sequence in the source. */ export declare function containsTexSource(source: string): boolean; /** The whole string is a TeX formula MathLive can typeset as-is. */ export declare function isTexFormulaSource(source: string): boolean; /** * A run of either plain text or a single math span, in source order. `raw` is * the exact source slice (delimiters included for math); `value` is the inner * formula for math (delimiters stripped) and equals `raw` for text. */ export interface ContentSegment { type: 'text' | 'math'; raw: string; value: string; /** Math only: display (block) vs inline. */ display: boolean; } /** Parser-backed code/math boundaries shared with the server compiler. */ export declare const tokenizeMath: typeof markdownMathSegments; export declare const normalizeAgentText: typeof normalizeGeneratedMarkdown; export declare function splitLinesPreservingMath(value: string): string[]; export declare function markdownToHtml(markdown: string): Promise; /** * Preload the math-capable markdown parser (lazy MathLive + texmath) so * `renderInlineMarkdown` can render `$…$` math synchronously afterwards. No-op * once loaded; call before rendering content that may contain math. */ export declare function ensureInlineMathReady(): Promise; /** * Render one line of markdown to inline HTML (no `

` wrapper) using the same * CommonMark + texmath pipeline as {@link markdownToHtml}. * * Plain (math-free) lines use markdown-it's inline renderer directly. Lines that * carry math are rendered through the full *block* pipeline and then unwrapped * from their single `

`: this is what makes display math correct. texmath * exposes `\[…\]` and `\begin{env}…\end{env}` only as block rules, so the inline * renderer would emit them verbatim; routing through the block parser renders * every delimiter (`$…$`, `$$…$$`, `\(…\)`, `\[…\]`, environments), and matches * the `text.setMarkdown` output byte-for-byte. Math renders only when the parser * has been preloaded via {@link ensureInlineMathReady}; otherwise delimiters * read as literal text. */ export declare function renderInlineMarkdown(markdown: string): string; /** Typographic run style applied on top of Markdown-rendered HTML. */ export interface TextRunStyle { /** Font size in px (the deck's canvas px). */ fontSize?: number; /** CSS font-family name, e.g. "Calibri". */ fontName?: string; /** CSS color (hex / rgb). */ color?: string; bold?: boolean; align?: 'left' | 'center' | 'right' | 'justify'; } /** * Apply one run style (size / font / color / bold / align) to Markdown output * so agents get styled copy from `text.create({ markdown, style })` without * hand-writing `` HTML. Parses the HTML with parse5, wraps each * block's inline content in a single styled span (the shape the editor and * the pptx importer produce) and mirrors size / color onto list containers so * bullet markers match. */ export declare function applyTextRunStyle(htmlText: string, style: TextRunStyle | undefined): string;