import { Node as PMNode } from 'prosemirror-model'; import { NodeView } from 'prosemirror-view'; /** Turns a LaTeX string into HTML (KaTeX/MathJax/MathML). Host-provided. */ export type MathRenderer = (latex: string, display: 'inline' | 'block') => string; /** * Inline atom rendering a math formula. Precedence: * 1. A host-supplied `mathRenderer` (full control — e.g. KaTeX HTML, MathJax). * 2. The built-in default: KaTeX compiled to **MathML**, which browsers render * natively with no stylesheet or web fonts (works cleanly inside the * editor's shadow root). * 3. If KaTeX can't load / parse, the raw LaTeX stays visible. */ export declare class MathView implements NodeView { dom: HTMLSpanElement; private renderer?; /** Bumps on every render so a slow async KaTeX result for a stale node is dropped. */ private token; constructor(node: PMNode, renderer?: MathRenderer); private render; update(node: PMNode): boolean; /** Atom node: ProseMirror owns selection; never read our subtree back. */ ignoreMutation(): boolean; }