agentic-mermaid 0.4.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENT_NATIVE.md +94 -627
- package/CHANGELOG.md +651 -0
- package/Instructions_for_agents.md +44 -23
- package/LICENSES/Khroma-MIT.txt +21 -0
- package/LICENSES/Mermaid-MIT.txt +21 -0
- package/LICENSES/es-toolkit-MIT.txt +21 -0
- package/LICENSES/pele-MIT.txt +40 -0
- package/LICENSES/zenuml-core-MIT.txt +21 -0
- package/README.md +93 -50
- package/SECURITY.md +28 -12
- package/THIRD_PARTY_NOTICES.md +60 -0
- package/assets/hero.png +0 -0
- package/dist/agent-core.d.ts +478 -210
- package/dist/agent-core.js +1 -396
- package/dist/agent.d.ts +17 -8
- package/dist/agent.js +1 -408
- package/dist/agentic-mermaid-mcp.js +1 -11
- package/dist/am.js +1 -34562
- package/dist/browser-lazy/chunks/agentic-producer-core-CC6OOLDW.js +1 -0
- package/dist/browser-lazy/chunks/architecture-QUFVKYJR.js +13 -0
- package/dist/browser-lazy/chunks/block-6J3Q63BO.js +11 -0
- package/dist/browser-lazy/chunks/builtin-backends-7SOZZHPF.js +12 -0
- package/dist/browser-lazy/chunks/c4-SQVBZAKJ.js +10 -0
- package/dist/browser-lazy/chunks/chunk-2GPK4VFF.js +5 -0
- package/dist/browser-lazy/chunks/chunk-2I4UPL7Q.js +3 -0
- package/dist/browser-lazy/chunks/chunk-2SH76OTH.js +1 -0
- package/dist/browser-lazy/chunks/chunk-2UIA2IME.js +3 -0
- package/dist/browser-lazy/chunks/chunk-4LHYF3BS.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5B2Z7575.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5FQ534HP.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5UVGUSD6.js +1 -0
- package/dist/browser-lazy/chunks/chunk-5X6MJX3H.js +1 -0
- package/dist/browser-lazy/chunks/chunk-AMJLVPUB.js +4 -0
- package/dist/browser-lazy/chunks/chunk-BU5LHXNJ.js +3 -0
- package/dist/browser-lazy/chunks/chunk-BY2CPG6B.js +1 -0
- package/dist/browser-lazy/chunks/chunk-CN7WTBWB.js +1 -0
- package/dist/browser-lazy/chunks/chunk-CQE4HQEW.js +1 -0
- package/dist/browser-lazy/chunks/chunk-CSFUKSU6.js +1 -0
- package/dist/browser-lazy/chunks/chunk-DF6765YX.js +17 -0
- package/dist/browser-lazy/chunks/chunk-E2WMJZNM.js +1 -0
- package/dist/browser-lazy/chunks/chunk-FAIMVOX5.js +6 -0
- package/dist/browser-lazy/chunks/chunk-GVOEAY52.js +1 -0
- package/dist/browser-lazy/chunks/chunk-HLWUNUCM.js +1 -0
- package/dist/browser-lazy/chunks/chunk-ICC7HBJX.js +1 -0
- package/dist/browser-lazy/chunks/chunk-J35HAQQF.js +20 -0
- package/dist/browser-lazy/chunks/chunk-J7FFAFQF.js +1 -0
- package/dist/browser-lazy/chunks/chunk-LH7HUDKW.js +1 -0
- package/dist/browser-lazy/chunks/chunk-N5ELX7LR.js +2 -0
- package/dist/browser-lazy/chunks/chunk-NMQQMRIR.js +1 -0
- package/dist/browser-lazy/chunks/chunk-NO7ZIVRU.js +1 -0
- package/dist/browser-lazy/chunks/chunk-OZ443IVJ.js +16 -0
- package/dist/browser-lazy/chunks/chunk-PQGPS2YV.js +7 -0
- package/dist/browser-lazy/chunks/chunk-QA6GJQ4X.js +1 -0
- package/dist/browser-lazy/chunks/chunk-RIVTHZAQ.js +1 -0
- package/dist/browser-lazy/chunks/chunk-SZELX2EJ.js +1 -0
- package/dist/browser-lazy/chunks/chunk-TYZOZXUJ.js +22 -0
- package/dist/browser-lazy/chunks/chunk-UL6NDWLL.js +1 -0
- package/dist/browser-lazy/chunks/chunk-VQYYGAXP.js +1 -0
- package/dist/browser-lazy/chunks/chunk-VWVZGQE2.js +1 -0
- package/dist/browser-lazy/chunks/chunk-X2UYKWKM.js +4 -0
- package/dist/browser-lazy/chunks/chunk-YCEICNM6.js +1 -0
- package/dist/browser-lazy/chunks/chunk-Z3FDIVLN.js +20 -0
- package/dist/browser-lazy/chunks/class-5QA4SCTS.js +13 -0
- package/dist/browser-lazy/chunks/decode-63UIZGD2.js +1 -0
- package/dist/browser-lazy/chunks/elk.bundled-L4CADV5W.js +24 -0
- package/dist/browser-lazy/chunks/er-7ZSKGN7Y.js +11 -0
- package/dist/browser-lazy/chunks/eventmodeling-2BPLHWRN.js +19 -0
- package/dist/browser-lazy/chunks/flowchart-NEIMZTB5.js +4 -0
- package/dist/browser-lazy/chunks/forest-implementation-AEP24AIP.js +1 -0
- package/dist/browser-lazy/chunks/gantt-RDPIFYAF.js +11 -0
- package/dist/browser-lazy/chunks/gitgraph-N4Y5RYB7.js +9 -0
- package/dist/browser-lazy/chunks/ishikawa-LD3YBDJN.js +6 -0
- package/dist/browser-lazy/chunks/journey-6YQR5DJX.js +16 -0
- package/dist/browser-lazy/chunks/kanban-PLMJ7NBW.js +20 -0
- package/dist/browser-lazy/chunks/mermaid-yaml-runtime-QVYX4EWK.js +136 -0
- package/dist/browser-lazy/chunks/mindmap-K2UBFO3Y.js +12 -0
- package/dist/browser-lazy/chunks/packet-CUW4QY6Y.js +7 -0
- package/dist/browser-lazy/chunks/pie-7F7UUCG3.js +15 -0
- package/dist/browser-lazy/chunks/quadrant-TOONO2WC.js +10 -0
- package/dist/browser-lazy/chunks/radar-J6JVWVAX.js +16 -0
- package/dist/browser-lazy/chunks/render-core-BZOM3K7D.js +3 -0
- package/dist/browser-lazy/chunks/requirement-CMAKDJPO.js +19 -0
- package/dist/browser-lazy/chunks/sankey-AWXQEP3F.js +13 -0
- package/dist/browser-lazy/chunks/sequence-Q2RJRB4L.js +5 -0
- package/dist/browser-lazy/chunks/state-WRBFQEDX.js +4 -0
- package/dist/browser-lazy/chunks/timeline-D2KILFXM.js +6 -0
- package/dist/browser-lazy/chunks/treemap-N3VYX5D4.js +6 -0
- package/dist/browser-lazy/chunks/xychart-G73OGK66.js +16 -0
- package/dist/browser-lazy/chunks/zenuml-H4BXNYXR.js +16 -0
- package/dist/browser-lazy/index.d.ts +544 -275
- package/dist/browser-lazy/index.js +1 -1
- package/dist/browser.global.js +802 -565
- package/dist/chunk-3LGLPG33.js +2 -0
- package/dist/chunk-7CRDX2QR.js +2 -0
- package/dist/chunk-7PPW2BMO.js +2 -0
- package/dist/chunk-DQDKA5ND.js +2 -0
- package/dist/chunk-EHCMJUMD.js +52 -0
- package/dist/chunk-GVCHLSHH.js +4 -0
- package/dist/chunk-H3NCS2XZ.js +19 -0
- package/dist/chunk-JZOJ4YGS.js +201 -0
- package/dist/chunk-MKE7GNYU.js +146 -0
- package/dist/chunk-NKNFOREZ.js +2 -0
- package/dist/chunk-O7H2UX5K.js +2 -0
- package/dist/chunk-OMY6NRQD.js +58 -0
- package/dist/chunk-UA234O4M.js +4 -0
- package/dist/chunk-VUFVLGTH.js +2 -0
- package/dist/chunk-XU5LPD2D.js +2 -0
- package/dist/cli-YGGTJZH7.js +226 -0
- package/dist/elk-constructor.js +2 -0
- package/dist/elk-constructor.node.js +11 -0
- package/dist/index-EeXqJXr5.d.ts +1223 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -334
- package/dist/jsonl-RPJY6YWO.js +2 -0
- package/dist/mcp-cli-63DYXTVD.js +2 -0
- package/dist/{index-BGA_-6LV.d.ts → paint-certification-6rwQjIv_.d.ts} +5283 -6173
- package/dist/server-5NEOHOFS.js +524 -0
- package/dist/svg-styles-BdnoM7AT.d.ts +724 -0
- package/dist/svg-styles.d.ts +1 -0
- package/dist/svg-styles.js +2 -0
- package/dist/svg.d.ts +13 -0
- package/dist/svg.js +2 -0
- package/dist/types-BcS52Mjt.d.ts +1360 -0
- package/dist/zenuml/chunks/appearance-UOQ5KA6O.js +1 -0
- package/dist/zenuml/chunks/builtin-backends-KDKE7YHO.js +12 -0
- package/dist/zenuml/chunks/chunk-42DXZ5C6.js +4 -0
- package/dist/zenuml/chunks/chunk-7TVYPTDW.js +1 -0
- package/dist/zenuml/chunks/chunk-EVPSMEKN.js +1 -0
- package/dist/zenuml/chunks/chunk-OXQWRSBM.js +20 -0
- package/dist/zenuml/chunks/chunk-QWX77U7G.js +2 -0
- package/dist/zenuml/chunks/chunk-RLJEI7YN.js +29 -0
- package/dist/zenuml/chunks/chunk-RZ6XK5CD.js +29 -0
- package/dist/zenuml/chunks/decode-BWERFDGK.js +1 -0
- package/dist/zenuml/chunks/mermaid-yaml-runtime-KZVU74WU.js +136 -0
- package/dist/zenuml/chunks/render-core-V5RQ737O.js +3 -0
- package/dist/zenuml/chunks/zenuml-EA2ZFRUX.js +20 -0
- package/dist/zenuml-frame.global.js +3626 -0
- package/dist/zenuml.d.ts +83 -0
- package/dist/zenuml.js +1 -0
- package/docs/MCP-DIRECTORY-LISTINGS.md +5 -1
- package/docs/README.md +59 -103
- package/docs/agent-api-cookbook.md +26 -16
- package/docs/agent-mutation-policy.md +86 -15
- package/docs/agent-workflow-examples.md +1 -1
- package/docs/api-advanced.md +385 -0
- package/docs/api.md +320 -366
- package/docs/ascii.md +40 -4
- package/docs/browser.md +46 -7
- package/docs/choosing-a-diagram.md +148 -0
- package/docs/code-mode-impact.md +1 -0
- package/docs/comparison.md +244 -28
- package/docs/computational-aesthetics-prototype-plan.md +10 -10
- package/docs/config.md +60 -2
- package/docs/custom-fonts.md +78 -21
- package/docs/diagram-families.md +160 -10
- package/docs/eventmodeling-and-zenuml.md +165 -0
- package/docs/features.md +21 -19
- package/docs/fork-differences.md +105 -32
- package/docs/getting-started.md +56 -51
- package/docs/layout-certification.md +126 -0
- package/docs/mcp-code-mode-rationale.md +20 -12
- package/docs/mcp-http-transport.md +14 -8
- package/docs/quality.md +145 -15
- package/docs/react.md +76 -31
- package/docs/style-authoring.md +23 -11
- package/docs/svg-semantic-contract.md +104 -4
- package/docs/testing-strategy.md +684 -126
- package/docs/theming.md +27 -8
- package/examples/styles/readme-hero.md +25 -0
- package/examples/styles/readme-hero.mmd +13 -0
- package/examples/styles/readme-hero.style.json +7 -0
- package/package.json +114 -57
- package/server.json +2 -2
- package/skills/agentic-mermaid-diagram-workflow/SKILL.md +26 -8
- package/skills/agentic-mermaid-diagram-workflow/references/cli.md +13 -3
- package/skills/agentic-mermaid-diagram-workflow/references/code-mode.md +2 -1
- package/skills/agentic-mermaid-diagram-workflow/references/flowchart.md +9 -6
- package/skills/agentic-mermaid-diagram-workflow/references/hosted-mcp.md +1 -0
- package/skills/agentic-mermaid-diagram-workflow/references/sequence.md +4 -3
- package/skills/agentic-mermaid-diagram-workflow/references/timeline.md +7 -6
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/agentflow.md +574 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/architecture.md +10 -2
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/c4.md +18 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/classDiagram.md +123 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/cynefin.md +6 -1
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/entityRelationshipDiagram.md +129 -9
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/eventmodeling.md +22 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/flowchart.md +188 -60
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/gitgraph.md +13 -7
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/mindmap.md +110 -1
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/packet.md +38 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/requirementDiagram.md +115 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/sequenceDiagram.md +101 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/stateDiagram.md +87 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/swimlanes.md +105 -2
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/timeline.md +12 -6
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/usecase.md +953 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/venn.md +77 -0
- package/skills/agentic-mermaid-diagram-workflow/references/upstream/xyChart.md +1 -1
- package/dist/browser-lazy/chunks/architecture-KTHE2HX3.js +0 -31
- package/dist/browser-lazy/chunks/chunk-2XCPFAD5.js +0 -46
- package/dist/browser-lazy/chunks/chunk-3H4F7RBT.js +0 -1
- package/dist/browser-lazy/chunks/chunk-4EVLW2NJ.js +0 -1
- package/dist/browser-lazy/chunks/chunk-5Q4S74UO.js +0 -1
- package/dist/browser-lazy/chunks/chunk-6OAPWSDO.js +0 -1
- package/dist/browser-lazy/chunks/chunk-A7L4WWVW.js +0 -143
- package/dist/browser-lazy/chunks/chunk-C7FJO2I3.js +0 -4
- package/dist/browser-lazy/chunks/chunk-D3XXDKIO.js +0 -1
- package/dist/browser-lazy/chunks/chunk-DXA5WL7H.js +0 -4
- package/dist/browser-lazy/chunks/chunk-EPFMQPXX.js +0 -1
- package/dist/browser-lazy/chunks/chunk-FFOHLPDA.js +0 -2
- package/dist/browser-lazy/chunks/chunk-FLD63DXE.js +0 -2
- package/dist/browser-lazy/chunks/chunk-G6OLSHRG.js +0 -7
- package/dist/browser-lazy/chunks/chunk-GRXCKTHX.js +0 -0
- package/dist/browser-lazy/chunks/chunk-I6VE56S7.js +0 -1
- package/dist/browser-lazy/chunks/chunk-KJVNXJ5Y.js +0 -1
- package/dist/browser-lazy/chunks/chunk-L227EPFP.js +0 -11
- package/dist/browser-lazy/chunks/chunk-LNIHDJSF.js +0 -1
- package/dist/browser-lazy/chunks/chunk-M6BT2HIP.js +0 -1
- package/dist/browser-lazy/chunks/chunk-NZRUMODH.js +0 -1
- package/dist/browser-lazy/chunks/chunk-OFRMKQA6.js +0 -1
- package/dist/browser-lazy/chunks/chunk-P7HMSKHJ.js +0 -1
- package/dist/browser-lazy/chunks/chunk-PXKL3O6H.js +0 -1
- package/dist/browser-lazy/chunks/chunk-PZEWZT35.js +0 -1
- package/dist/browser-lazy/chunks/chunk-STQRDZ67.js +0 -1
- package/dist/browser-lazy/chunks/chunk-SUFMSWTX.js +0 -1
- package/dist/browser-lazy/chunks/chunk-T7IJ6V4B.js +0 -3
- package/dist/browser-lazy/chunks/chunk-UAEZO5VL.js +0 -1
- package/dist/browser-lazy/chunks/chunk-WEUWIFG3.js +0 -1
- package/dist/browser-lazy/chunks/chunk-X64T74C5.js +0 -24
- package/dist/browser-lazy/chunks/class-F7R6TJ73.js +0 -9
- package/dist/browser-lazy/chunks/er-BDK7CM5L.js +0 -9
- package/dist/browser-lazy/chunks/flowchart-KFU6XV7S.js +0 -4
- package/dist/browser-lazy/chunks/gantt-I64VVDSP.js +0 -28
- package/dist/browser-lazy/chunks/gitgraph-EDUVJ5IJ.js +0 -8
- package/dist/browser-lazy/chunks/journey-TLO2RNM3.js +0 -40
- package/dist/browser-lazy/chunks/mindmap-OJCNDYPM.js +0 -9
- package/dist/browser-lazy/chunks/pie-HVG6XO7K.js +0 -19
- package/dist/browser-lazy/chunks/quadrant-U6S2L4MJ.js +0 -24
- package/dist/browser-lazy/chunks/radar-ZDLOBTVG.js +0 -32
- package/dist/browser-lazy/chunks/render-core-Y2DFNMQG.js +0 -12
- package/dist/browser-lazy/chunks/sequence-Z4WFS3VB.js +0 -12
- package/dist/browser-lazy/chunks/state-2HV2YGN3.js +0 -4
- package/dist/browser-lazy/chunks/timeline-XM4UFPOC.js +0 -20
- package/dist/browser-lazy/chunks/xychart-7JDHWTQY.js +0 -36
- package/dist/chunk-GGXCNCNA.js +0 -4118
- package/dist/chunk-IVD4NXNE.js +0 -615
- package/dist/chunk-JDMRPUAG.js +0 -37
- package/dist/chunk-JWAAW3FH.js +0 -149
- package/dist/chunk-LCGBT32P.js +0 -62036
- package/dist/chunk-RWMZRUIC.js +0 -4715
- package/dist/mcp-cli-4MLKC3ZH.js +0 -17
- package/docs/mutation-testing.md +0 -285
|
@@ -72,6 +72,129 @@ classDiagram
|
|
|
72
72
|
}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
+
## Default theme, look and layout (v12.0.0+)
|
|
76
|
+
|
|
77
|
+
Class diagrams use the `redux-color` theme and the `neo` look by default, and are laid out by [ELK](https://www.eclipse.org/elk/) rather than Dagre. Not every diagram type
|
|
78
|
+
does — see [Per-diagram defaults](../config/theming.md#per-diagram-defaults) for the list and
|
|
79
|
+
for the order in which Mermaid decides.
|
|
80
|
+
|
|
81
|
+
The same diagram, drawn both ways:
|
|
82
|
+
|
|
83
|
+
### With the defaults
|
|
84
|
+
|
|
85
|
+
```mermaid-example
|
|
86
|
+
classDiagram
|
|
87
|
+
class Customer {
|
|
88
|
+
+String name
|
|
89
|
+
+String email
|
|
90
|
+
}
|
|
91
|
+
class Order {
|
|
92
|
+
+String id
|
|
93
|
+
+Date placedAt
|
|
94
|
+
+total() Money
|
|
95
|
+
}
|
|
96
|
+
class LineItem {
|
|
97
|
+
+int quantity
|
|
98
|
+
}
|
|
99
|
+
class Payment {
|
|
100
|
+
<<interface>>
|
|
101
|
+
+authorise() bool
|
|
102
|
+
}
|
|
103
|
+
Customer "1" --> "*" Order : places
|
|
104
|
+
Order "1" *-- "*" LineItem : contains
|
|
105
|
+
Order --> Payment : settled by
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```mermaid
|
|
109
|
+
classDiagram
|
|
110
|
+
class Customer {
|
|
111
|
+
+String name
|
|
112
|
+
+String email
|
|
113
|
+
}
|
|
114
|
+
class Order {
|
|
115
|
+
+String id
|
|
116
|
+
+Date placedAt
|
|
117
|
+
+total() Money
|
|
118
|
+
}
|
|
119
|
+
class LineItem {
|
|
120
|
+
+int quantity
|
|
121
|
+
}
|
|
122
|
+
class Payment {
|
|
123
|
+
<<interface>>
|
|
124
|
+
+authorise() bool
|
|
125
|
+
}
|
|
126
|
+
Customer "1" --> "*" Order : places
|
|
127
|
+
Order "1" *-- "*" LineItem : contains
|
|
128
|
+
Order --> Payment : settled by
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### The previous appearance
|
|
132
|
+
|
|
133
|
+
Both are only defaults, so anything you set yourself wins. Naming the previous theme and look
|
|
134
|
+
in a diagram's front matter draws it the way Mermaid did before:
|
|
135
|
+
|
|
136
|
+
```mermaid-example
|
|
137
|
+
---
|
|
138
|
+
config:
|
|
139
|
+
theme: default
|
|
140
|
+
look: classic
|
|
141
|
+
layout: dagre
|
|
142
|
+
---
|
|
143
|
+
classDiagram
|
|
144
|
+
class Customer {
|
|
145
|
+
+String name
|
|
146
|
+
+String email
|
|
147
|
+
}
|
|
148
|
+
class Order {
|
|
149
|
+
+String id
|
|
150
|
+
+Date placedAt
|
|
151
|
+
+total() Money
|
|
152
|
+
}
|
|
153
|
+
class LineItem {
|
|
154
|
+
+int quantity
|
|
155
|
+
}
|
|
156
|
+
class Payment {
|
|
157
|
+
<<interface>>
|
|
158
|
+
+authorise() bool
|
|
159
|
+
}
|
|
160
|
+
Customer "1" --> "*" Order : places
|
|
161
|
+
Order "1" *-- "*" LineItem : contains
|
|
162
|
+
Order --> Payment : settled by
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
```mermaid
|
|
166
|
+
---
|
|
167
|
+
config:
|
|
168
|
+
theme: default
|
|
169
|
+
look: classic
|
|
170
|
+
layout: dagre
|
|
171
|
+
---
|
|
172
|
+
classDiagram
|
|
173
|
+
class Customer {
|
|
174
|
+
+String name
|
|
175
|
+
+String email
|
|
176
|
+
}
|
|
177
|
+
class Order {
|
|
178
|
+
+String id
|
|
179
|
+
+Date placedAt
|
|
180
|
+
+total() Money
|
|
181
|
+
}
|
|
182
|
+
class LineItem {
|
|
183
|
+
+int quantity
|
|
184
|
+
}
|
|
185
|
+
class Payment {
|
|
186
|
+
<<interface>>
|
|
187
|
+
+authorise() bool
|
|
188
|
+
}
|
|
189
|
+
Customer "1" --> "*" Order : places
|
|
190
|
+
Order "1" *-- "*" LineItem : contains
|
|
191
|
+
Order --> Payment : settled by
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Passing the same three keys to `mermaid.initialize()` does it for every diagram on the page,
|
|
195
|
+
and scoping the theme and look to one diagram type — `mermaid.initialize({ layout: 'dagre', class: { theme: 'default', look: 'classic' } })` —
|
|
196
|
+
does it for that type alone. `layout` is a top-level option, so it applies to every diagram.
|
|
197
|
+
|
|
75
198
|
## Syntax
|
|
76
199
|
|
|
77
200
|
### Class
|
|
@@ -228,7 +228,12 @@ Cynefin diagrams accept the following configuration under the `cynefin` key in t
|
|
|
228
228
|
Example:
|
|
229
229
|
|
|
230
230
|
```
|
|
231
|
-
|
|
231
|
+
---
|
|
232
|
+
config:
|
|
233
|
+
cynefin:
|
|
234
|
+
width: 1000
|
|
235
|
+
showDomainDescriptions: false
|
|
236
|
+
---
|
|
232
237
|
cynefin-beta
|
|
233
238
|
complex
|
|
234
239
|
"Adaptive work"
|
package/skills/agentic-mermaid-diagram-workflow/references/upstream/entityRelationshipDiagram.md
CHANGED
|
@@ -80,6 +80,129 @@ erDiagram
|
|
|
80
80
|
|
|
81
81
|
When including attributes on ER diagrams, you must decide whether to include foreign keys as attributes. This probably depends on how closely you are trying to represent relational table structures. If your diagram is a _logical_ model which is not meant to imply a relational implementation, then it is better to leave these out because the associative relationships already convey the way that entities are associated. For example, a JSON data structure can implement a one-to-many relationship without the need for foreign key properties, using arrays. Similarly an object-oriented programming language may use pointers or references to collections. Even for models that are intended for relational implementation, you might decide that inclusion of foreign key attributes duplicates information already portrayed by the relationships, and does not add meaning to entities. Ultimately, it's your choice.
|
|
82
82
|
|
|
83
|
+
## Default theme, look and layout (v12.0.0+)
|
|
84
|
+
|
|
85
|
+
Entity relationship diagrams use the `redux-color` theme and the `neo` look by default, and are laid out by [ELK](https://www.eclipse.org/elk/) rather than Dagre. Not every diagram type
|
|
86
|
+
does — see [Per-diagram defaults](../config/theming.md#per-diagram-defaults) for the list and
|
|
87
|
+
for the order in which Mermaid decides.
|
|
88
|
+
|
|
89
|
+
The same diagram, drawn both ways:
|
|
90
|
+
|
|
91
|
+
### With the defaults
|
|
92
|
+
|
|
93
|
+
```mermaid-example
|
|
94
|
+
erDiagram
|
|
95
|
+
CUSTOMER ||--o{ ORDER : places
|
|
96
|
+
ORDER ||--|{ LINE_ITEM : contains
|
|
97
|
+
PRODUCT ||--o{ LINE_ITEM : "appears in"
|
|
98
|
+
CUSTOMER {
|
|
99
|
+
string name
|
|
100
|
+
string email
|
|
101
|
+
}
|
|
102
|
+
ORDER {
|
|
103
|
+
int id
|
|
104
|
+
date placedAt
|
|
105
|
+
}
|
|
106
|
+
LINE_ITEM {
|
|
107
|
+
int quantity
|
|
108
|
+
float price
|
|
109
|
+
}
|
|
110
|
+
PRODUCT {
|
|
111
|
+
string sku
|
|
112
|
+
string title
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```mermaid
|
|
117
|
+
erDiagram
|
|
118
|
+
CUSTOMER ||--o{ ORDER : places
|
|
119
|
+
ORDER ||--|{ LINE_ITEM : contains
|
|
120
|
+
PRODUCT ||--o{ LINE_ITEM : "appears in"
|
|
121
|
+
CUSTOMER {
|
|
122
|
+
string name
|
|
123
|
+
string email
|
|
124
|
+
}
|
|
125
|
+
ORDER {
|
|
126
|
+
int id
|
|
127
|
+
date placedAt
|
|
128
|
+
}
|
|
129
|
+
LINE_ITEM {
|
|
130
|
+
int quantity
|
|
131
|
+
float price
|
|
132
|
+
}
|
|
133
|
+
PRODUCT {
|
|
134
|
+
string sku
|
|
135
|
+
string title
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### The previous appearance
|
|
140
|
+
|
|
141
|
+
Both are only defaults, so anything you set yourself wins. Naming the previous theme and look
|
|
142
|
+
in a diagram's front matter draws it the way Mermaid did before:
|
|
143
|
+
|
|
144
|
+
```mermaid-example
|
|
145
|
+
---
|
|
146
|
+
config:
|
|
147
|
+
theme: default
|
|
148
|
+
look: classic
|
|
149
|
+
layout: dagre
|
|
150
|
+
---
|
|
151
|
+
erDiagram
|
|
152
|
+
CUSTOMER ||--o{ ORDER : places
|
|
153
|
+
ORDER ||--|{ LINE_ITEM : contains
|
|
154
|
+
PRODUCT ||--o{ LINE_ITEM : "appears in"
|
|
155
|
+
CUSTOMER {
|
|
156
|
+
string name
|
|
157
|
+
string email
|
|
158
|
+
}
|
|
159
|
+
ORDER {
|
|
160
|
+
int id
|
|
161
|
+
date placedAt
|
|
162
|
+
}
|
|
163
|
+
LINE_ITEM {
|
|
164
|
+
int quantity
|
|
165
|
+
float price
|
|
166
|
+
}
|
|
167
|
+
PRODUCT {
|
|
168
|
+
string sku
|
|
169
|
+
string title
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```mermaid
|
|
174
|
+
---
|
|
175
|
+
config:
|
|
176
|
+
theme: default
|
|
177
|
+
look: classic
|
|
178
|
+
layout: dagre
|
|
179
|
+
---
|
|
180
|
+
erDiagram
|
|
181
|
+
CUSTOMER ||--o{ ORDER : places
|
|
182
|
+
ORDER ||--|{ LINE_ITEM : contains
|
|
183
|
+
PRODUCT ||--o{ LINE_ITEM : "appears in"
|
|
184
|
+
CUSTOMER {
|
|
185
|
+
string name
|
|
186
|
+
string email
|
|
187
|
+
}
|
|
188
|
+
ORDER {
|
|
189
|
+
int id
|
|
190
|
+
date placedAt
|
|
191
|
+
}
|
|
192
|
+
LINE_ITEM {
|
|
193
|
+
int quantity
|
|
194
|
+
float price
|
|
195
|
+
}
|
|
196
|
+
PRODUCT {
|
|
197
|
+
string sku
|
|
198
|
+
string title
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Passing the same three keys to `mermaid.initialize()` does it for every diagram on the page,
|
|
203
|
+
and scoping the theme and look to one diagram type — `mermaid.initialize({ layout: 'dagre', er: { theme: 'default', look: 'classic' } })` —
|
|
204
|
+
does it for that type alone. `layout` is a top-level option, so it applies to every diagram.
|
|
205
|
+
|
|
83
206
|
## Syntax
|
|
84
207
|
|
|
85
208
|
### Entities and Relationships
|
|
@@ -448,7 +571,7 @@ Possible diagram orientations are:
|
|
|
448
571
|
- RL - Right to left
|
|
449
572
|
- LR - Left to right
|
|
450
573
|
|
|
451
|
-
### Subgraphs (
|
|
574
|
+
### Subgraphs (v11.17.0+)
|
|
452
575
|
|
|
453
576
|
Subgraphs allow grouping entities into logical sections within an ER diagram. They are useful for organizing
|
|
454
577
|
complex diagrams and improving readability.
|
|
@@ -853,14 +976,14 @@ erDiagram
|
|
|
853
976
|
|
|
854
977
|
### Layout
|
|
855
978
|
|
|
856
|
-
The layout of the diagram is handled by [`render()`](../config/setup/mermaid/interfaces/Mermaid.md#render). The default layout is
|
|
979
|
+
The layout of the diagram is handled by [`render()`](../config/setup/mermaid/interfaces/Mermaid.md#render). The default layout is the ELK (Eclipse Layout Kernel) layout, which suits larger and more-complex diagrams. For more information, see [Customizing ELK Layout](../intro/syntax-reference.md#customizing-elk-layout).
|
|
857
980
|
|
|
858
|
-
|
|
981
|
+
To use the classic Dagre layout instead, set it in your YAML frontmatter's `config`:
|
|
859
982
|
|
|
860
983
|
```yaml
|
|
861
984
|
---
|
|
862
985
|
config:
|
|
863
|
-
layout:
|
|
986
|
+
layout: dagre
|
|
864
987
|
---
|
|
865
988
|
```
|
|
866
989
|
|
|
@@ -870,7 +993,7 @@ Your Mermaid code should be similar to the following:
|
|
|
870
993
|
---
|
|
871
994
|
title: Order example
|
|
872
995
|
config:
|
|
873
|
-
layout:
|
|
996
|
+
layout: dagre
|
|
874
997
|
---
|
|
875
998
|
erDiagram
|
|
876
999
|
CUSTOMER ||--o{ ORDER : places
|
|
@@ -882,7 +1005,7 @@ erDiagram
|
|
|
882
1005
|
---
|
|
883
1006
|
title: Order example
|
|
884
1007
|
config:
|
|
885
|
-
layout:
|
|
1008
|
+
layout: dagre
|
|
886
1009
|
---
|
|
887
1010
|
erDiagram
|
|
888
1011
|
CUSTOMER ||--o{ ORDER : places
|
|
@@ -890,7 +1013,4 @@ erDiagram
|
|
|
890
1013
|
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
|
|
891
1014
|
```
|
|
892
1015
|
|
|
893
|
-
> **Note**
|
|
894
|
-
> Note that the site needs to use mermaid version 9.4+ for this to work and have this featured enabled in the lazy-loading configuration.
|
|
895
|
-
|
|
896
1016
|
<!--- cspell:locale en,en-gb --->
|
|
@@ -68,6 +68,8 @@ tf 03 evt ItemAdded
|
|
|
68
68
|
|
|
69
69
|
Each Time Frame is referenced by a **unique number** in order to distinguish one from another and also to be able to reference it when needed. Depending on the complexity of the diagram it should be enough to have just two digit number or more. Imagine you are typing a BASIC program on your ZX Spectrum always starting with a two digit number, but the order of the numbers does not matter, just the uniqueness in the whole timeline.
|
|
70
70
|
|
|
71
|
+
Reusing a number for another Time Frame or Reset Frame produces an error. Give each frame its own number before referring to it with `->>`.
|
|
72
|
+
|
|
71
73
|
The Time Frame also contains an **Entity Identifier**, e.g. in case of `01` Time Frame it is `CartUI`. One Entity Identifier can be used multiple times in the timeline for example when you want to express invocations of the same event in different points in time.
|
|
72
74
|
|
|
73
75
|
Relaxed notation would look like this:
|
|
@@ -246,6 +248,8 @@ data ItemAdded {
|
|
|
246
248
|
|
|
247
249
|
By default the diagram builds the relations based on the inference. But modeling a more complex business flow requires to break such inference from time to time. For that you can use a different type of Time Frame called **Reset Frame**. It is represented by a `rf` / `resetframe` token.
|
|
248
250
|
|
|
251
|
+
A reset frame stops the inferred relation from the preceding frame. You can still connect it to a specific earlier frame with `->>`.
|
|
252
|
+
|
|
249
253
|
Compact version:
|
|
250
254
|
|
|
251
255
|
```mermaid-example
|
|
@@ -302,6 +306,24 @@ timeframe 06 command ChangeInventory
|
|
|
302
306
|
timeframe 07 event Cart.InventoryChanged
|
|
303
307
|
```
|
|
304
308
|
|
|
309
|
+
For example, this read model receives input from `ItemAdded` without inferring a relation from `OtherUI`:
|
|
310
|
+
|
|
311
|
+
```mermaid-example
|
|
312
|
+
eventmodeling
|
|
313
|
+
|
|
314
|
+
tf 01 evt ItemAdded
|
|
315
|
+
tf 02 ui OtherUI
|
|
316
|
+
rf 03 rmo CartItems ->> 01
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
```mermaid
|
|
320
|
+
eventmodeling
|
|
321
|
+
|
|
322
|
+
tf 01 evt ItemAdded
|
|
323
|
+
tf 02 ui OtherUI
|
|
324
|
+
rf 03 rmo CartItems ->> 01
|
|
325
|
+
```
|
|
326
|
+
|
|
305
327
|
### Multiple relations
|
|
306
328
|
|
|
307
329
|
There are situations where you need to specify multiple relations for an entity. For example when a **Read Model** is built of multiple **Events**. You can use `->>` token for that.
|