• Render the current configuration as a Mermaid stateDiagram-v2 block.

    UI hosts call this and pipe the string into a <pre class="mermaid"> element. The active state is annotated with the current GraphTime and observed commit count.

    Parameters

    Returns string

    A newline-joined Mermaid source string.

    const mermaid = renderStatechartMermaid(statechart(graph))
    element.textContent = mermaid