For v0.3.0's standalone crate, I'm considering whether to expose layout hints. What specific use case do you have — documentation, architecture diagrams?
For v0.3.0's standalone crate, I'm considering whether to expose layout hints. What specific use case do you have — documentation, architecture diagrams?
The challenge is Mermaid is declarative — layout is computed, not specified. Some options I'm considering:
1. layout hints/constraints in the syntax,
2. export to SVG then use a proper editor like Excalidraw for repositioning. For now, influencing layout via subgraphs and edge ordering is the best workaround."
3. separate system for that, maybe to be included in the crate, would only work in Ferrite in the start
The plan: use %% comments as layout hints. Something like:
%% @pos NodeA 100 200>
Mermaid.js ignores these, so the diagram stays portable. But Ferrite (and anyone using mermaid-rs) could parse them for manual positioning.
You'd be able to drag nodes around in Ferrite, have positions saved to the source, and still share with mermaid.js users (they'd get auto-layout).
If you want to follow progress or have input on the syntax, feel free to open an issue on the repo!