/** One ```` ```mermaid ```` block of a markdown document. */ export interface MermaidBlock { /** Block content, dedented by the fence indentation; no trailing newline. */ text: string; /** 1-based line of the first content line (the line after the opening fence) in the document. */ line: number; /** Number of leading spaces removed from every content line — the column offset of the block. */ column: number; /** Info string of the opening fence: `mermaid`, `mermaid title="Order"`, … */ info: string; } /** A `MermaidBlock` that declares a machine (`%% @machine `). */ export interface StatechartBlock extends MermaidBlock { /** Id of the declaration; absent when the directive carries no valid name (the parser reports it). */ machineId?: string; /** 1-based line of the `%% @machine` line in the document. */ machineLine: number; } /** Every ```` ```mermaid ```` block of the document, in source order. */ export declare function extractMermaidBlocks(markdown: string): MermaidBlock[]; /** * The mermaid blocks that declare a machine, in source order. Throws when two * blocks declare the same id — the document could not be addressed by name. */ export declare function findStatechartBlocks(markdown: string): StatechartBlock[]; /** The requested machine, or the first one when `machine` is absent. Throws when the document has nothing to offer. */ export declare function selectStatechartBlock(blocks: readonly StatechartBlock[], machine?: string): StatechartBlock;