import { BoardElement, FormulaElement } from './types.js'; /** * Markdown → board elements (the inverse of scene.ts `extractMarkdown`). * * Turns a Markdown document's block structure into placeable board * elements: `$$…$$` blocks become display formulas, standalone `$…$` blocks * become inline formulas, everything else becomes text. Blocks are stacked * vertically; the host decides final placement (elements start at a given * origin and flow downward). * * This is deliberately self-contained (no @moraya/core ProseMirror parse): * the block grammar we need is small, and staying dependency-free keeps the * conversion usable in any host without pulling the editor schema. The * @moraya/core peer stays optional for richer future use. */ /** * Convert Markdown to a vertically-stacked list of text/formula elements. * Round-trips with `extractMarkdown`: extractMarkdown(elementsFromMarkdown(md)) * reproduces the normalized block sequence. */ declare function elementsFromMarkdown(md: string, opts?: { fontSize?: number; origin?: { x: number; y: number; }; }): BoardElement[]; /** Only the formula elements from a Markdown document. */ declare function formulasFromMarkdown(md: string, opts?: { fontSize?: number; origin?: { x: number; y: number; }; }): FormulaElement[]; export { elementsFromMarkdown, formulasFromMarkdown };