Expand description
Core data model: graph, nodes, edges.
Structs§
- Attr
- One attribute row inside an entity block:
type name [PK|FK|UK] ["comment"]. - Class
- A class box: name header + fields compartment + methods compartment.
- Class
Diagram - UML class diagram (
classDiagramheader). - Class
Rel - A relationship between two classes. Normalised so the end glyph
(triangle / diamond / arrow) always sits at the
toend. - Edge
- Entity
- A database entity, rendered as a table.
- ErDiagram
- Entity-Relationship diagram (
erDiagramheader). - Graph
- Parsed graph, ready for layout.
- Journey
- A user-journey diagram (
journeyheader): an ordered list of sections, each holding scored tasks.actorsis the de-duplicated set of every participant, in first-appearance order — its index is the stable color key for the legend and per-task dots. - Journey
Section - A named group of consecutive tasks (
section X). Tasks before the firstsectionland in one leading section with an empty name. - Journey
Task - One step:
Task name: score: Actor1, Actor2.scoreis clamped to 1..=5 (satisfaction);actorsare indices intoJourney::actors. - Member
- One field or method row.
- Mind
Node - One mindmap node.
textmay contain\n(from<br/>) for a multi-line label.branchis the index of the depth-1 ancestor this node descends from (its colored branch);Nonefor the root. - Mindmap
- A mindmap (
mindmapheader): a single-rooted tree of text nodes whose hierarchy comes from source indentation.nodes[0]is always the root; every other node has aparent. Parse order is preserved, so sibling order (and thus layout order) is stable across renders. - Node
- Node
Style - Custom per-node styling from Mermaid
style/classDeflines.Nonefields fall back to the shape’s theme color (seecrate::style::shape_style). - Participant
- One lifeline column:
participant A [as Label]/actor A. - PieChart
- Pie chart (
pieheader). Slices keep source order; a duplicate label keeps one slice whose value is the LAST one written. - PieSlice
- One pie data row:
"Quoted Label" : value(non-negative). - Relation
- Relationship between two entities.
card_fromdescribes thefromside,card_tothetoside (crow’s foot notation). - Sequence
Diagram - Sequence diagram (
sequenceDiagramheader). Items keep source order — the layout is one row per item, top-down. - SubEdge
- An edge where at least one endpoint is a subgraph
(
CF --> VPC). Kept apart fromEdgeso the flat node→node path stays untouched; consumed only by the clustered scene. - Subgraph
- A
subgraph ... endblock: a titled cluster of nodes, possibly nested. Membership is by node index; nested members belong to the child, not the parent (walkparentlinks for the chain).
Enums§
- Card
- Relationship cardinality on one side.
- Direction
- Flow direction of the diagram.
- Document
- One parsed Mermaid document of any supported diagram type.
Produced by
crate::parser::parse_document. - Edge
Kind - Edge line style.
- End
- One endpoint of an edge that touches a subgraph — either a regular node or a whole subgraph (its cluster box).
- Frame
Kind - Kind of a
loop/opt/alt/parframe. - Key
- Attribute key marker.
- Mind
Shape - Node outline in a mindmap, from the wrapper around its text.
- Note
Side - Where a note attaches.
- RelKind
- UML relationship type (determines line style + end glyph).
- SeqHead
- Arrowhead at the target end of a message.
- SeqItem
- One statement of a sequence diagram, in source order.
- Shape
- Node shape.
- Visibility
- UML member visibility, shown as a leading glyph.