// AST node types for the Lingo markup language export type InlineNode = | { type: "text"; value: string } | { type: "bold"; children: InlineNode[] } | { type: "italic"; children: InlineNode[] } | { type: "code"; value: string } | { type: "link"; href: string; children: InlineNode[] } | { type: "wikilink"; page: string; display: string } | { type: "footnote-ref"; id: string } | { type: "sidenote-inline"; children: InlineNode[] } | { type: "math-inline"; value: string } | { type: "image-inline"; src: string; attrs: Record } | { type: "html"; value: string }; export type SidenoteNode = { type: "sidenote"; children: InlineNode[] }; export type BlockNode = | { type: "paragraph"; children: InlineNode[]; sidenote?: SidenoteNode } | { type: "heading"; level: number; id?: string; children: InlineNode[] } | { type: "ul"; items: ListItem[] } | { type: "ol"; items: ListItem[] } | { type: "todo-list"; items: TodoItem[] } | { type: "code-block"; lang: string; value: string } | { type: "blockquote"; children: InlineNode[] } | { type: "markdown-blockquote"; children: BlockNode[] } | SidenoteNode | { type: "math-block"; value: string } | { type: "image"; src: string; attrs: Record; caption?: InlineNode[] } | { type: "footnote-def"; id: string; children: InlineNode[] } | { type: "html-block"; tag: string; attrs: HtmlAttrs; children: BlockNode[]; selfClose: boolean } | { type: "comment" } | { type: "raw-html"; value: string }; export interface ListItem { children: InlineNode[]; nested?: BlockNode; } export interface TodoItem { checked: boolean; children: InlineNode[]; } export interface HtmlAttrs { id?: string; class?: string[]; extra?: Record; } export interface ParseOptions { markdownCompat?: boolean; } export interface ParseResult { blocks: BlockNode[]; footnotes: Map; references: Map; }