You do not need to learn a new syntax to get interactive diagrams. Paste ordinary Mermaid blocks and aidiagram upgrades them automatically whenever the entire diagram can be faithfully preserved.
aidiagram
Write a normal flowchart LR, TB, or TD block:
flowchart LR
TB
TD
Both arrowheads (<-->, <==>, <-.->) and undirected lines (---) are preserved accurately — including under prefers-reduced-motion: reduce:
<-->
<==>
<-.->
---
prefers-reduced-motion: reduce
sequenceDiagram supports participant/actor aliases, autonumber, solid/dashed arrows, self-calls, and Note over / left of / right of:
sequenceDiagram
participant
actor
autonumber
Note over / left of / right of
Single-level subgraph frames and style hints upgrade cleanly:
subgraph
style
1. Force classic Mermaid on any diagram by placing %% diagram: off (or %% visual: off) at the top of your mermaid fence:
%% diagram: off
%% visual: off
mermaid
2. Switch views at runtime: Every upgraded Mermaid block in PraisonAIUI includes a Classic button in its toolbar.
3. Zero silent partial conversion: Unsupported syntax always returns null from mermaidToDiagram() so the host hands the exact original text (comments intact) to Mermaid.js.
null
mermaidToDiagram()
| Syntax | Behaviour |
|---|---|
| flowchart / graph (LR, TB, TD, ≤ 14 nodes) | Upgraded interactively |
flowchart
graph
LR
| -->, -.->, ==>, <-->, <==>, <-.->, ---, -.-, === | Upgraded faithfully |
-->
-.->
==>
-.-
===
| Single-level subgraph ... end, <br/> title/note split, & fan-in/out | Upgraded interactively |
subgraph ... end
<br/>
&
| sequenceDiagram (≤ 6 actors), autonumber, self-calls, Note over/left of/right of | Upgraded interactively |
Note over/left of/right of
| gantt, erDiagram, quadrantChart, stateDiagram, pie, gitGraph | Clean fallback to Mermaid.js |
gantt
erDiagram
quadrantChart
stateDiagram
pie
gitGraph
| RL / BT directions, nested/unclosed subgraphs, > 14 nodes, > 6 actors | Clean fallback to Mermaid.js |
RL
BT
| alt, loop, opt, par, rect, box, activate, click, direction, linkStyle, o--o, x--x | Clean fallback to Mermaid.js |
alt
loop
opt
par
rect
box
activate
click
direction
linkStyle
o--o
x--x
| Truncated fences while streaming | Clean fallback (no premature replacement) |