@grethel-labs/excaliplant 0.7.0 → 0.9.0

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.
Files changed (190) hide show
  1. package/CHANGELOG.md +28 -5
  2. package/README.md +422 -44
  3. package/assets/arrowheads/manifest.json +1 -1
  4. package/bin/excaliplant.mjs +2 -2
  5. package/index.mjs +111 -29
  6. package/package.json +29 -14
  7. package/src/diagrams/base/artifacts.mjs +35 -0
  8. package/src/diagrams/base/assets.mjs +23 -0
  9. package/src/diagrams/base/dependencies.mjs +25 -0
  10. package/src/diagrams/base/docs.mjs +37 -0
  11. package/src/diagrams/base/index.mjs +15 -0
  12. package/src/diagrams/base/layout.mjs +32 -0
  13. package/src/diagrams/base/module.mjs +210 -0
  14. package/src/diagrams/base/parser.mjs +50 -0
  15. package/src/diagrams/base/renderer.mjs +26 -0
  16. package/src/diagrams/base/security.mjs +23 -0
  17. package/src/diagrams/base/tests.mjs +37 -0
  18. package/src/diagrams/class/assets.mjs +22 -0
  19. package/src/diagrams/class/docs/coverage_examples.mjs +93 -0
  20. package/src/diagrams/class/docs.mjs +37 -0
  21. package/src/diagrams/class/layout.mjs +20 -0
  22. package/src/diagrams/class/module.mjs +101 -0
  23. package/src/diagrams/class/parser.mjs +53 -0
  24. package/src/diagrams/class/render.mjs +20 -0
  25. package/src/diagrams/class/security.mjs +19 -0
  26. package/src/diagrams/class/style.mjs +15 -0
  27. package/src/diagrams/class/tests/class_components.test.mjs +103 -0
  28. package/src/diagrams/class/tests/output/.gitignore +2 -0
  29. package/src/diagrams/class/tests/output.mjs +17 -0
  30. package/src/diagrams/class/tests.mjs +20 -0
  31. package/src/diagrams/component/assets.mjs +22 -0
  32. package/src/diagrams/component/docs/coverage_examples.mjs +98 -0
  33. package/src/diagrams/component/docs.mjs +37 -0
  34. package/src/diagrams/component/layout.mjs +20 -0
  35. package/src/diagrams/component/module.mjs +105 -0
  36. package/src/diagrams/component/parser.mjs +63 -0
  37. package/src/diagrams/component/render.mjs +20 -0
  38. package/src/diagrams/component/security.mjs +19 -0
  39. package/src/diagrams/component/tests/component_components.test.mjs +108 -0
  40. package/src/diagrams/component/tests/output/.gitignore +2 -0
  41. package/src/diagrams/component/tests/output.mjs +17 -0
  42. package/src/diagrams/component/tests.mjs +23 -0
  43. package/src/diagrams/deployment/assets.mjs +22 -0
  44. package/src/diagrams/deployment/docs/coverage_examples.mjs +80 -0
  45. package/src/diagrams/deployment/docs.mjs +31 -0
  46. package/src/diagrams/deployment/layout.mjs +20 -0
  47. package/src/diagrams/deployment/module.mjs +104 -0
  48. package/src/diagrams/deployment/parser.mjs +56 -0
  49. package/src/diagrams/deployment/render.mjs +20 -0
  50. package/src/diagrams/deployment/security.mjs +19 -0
  51. package/src/diagrams/deployment/tests/deployment_components.test.mjs +83 -0
  52. package/src/diagrams/deployment/tests/output/all-shapes.excalidraw.json +965 -0
  53. package/src/diagrams/deployment/tests/output/all-shapes.puml +11 -0
  54. package/src/diagrams/deployment/tests/output/all-shapes.svg +34 -0
  55. package/src/diagrams/deployment/tests/output/arrow-styles.excalidraw.json +450 -0
  56. package/src/diagrams/deployment/tests/output/arrow-styles.puml +8 -0
  57. package/src/diagrams/deployment/tests/output/arrow-styles.svg +18 -0
  58. package/src/diagrams/deployment/tests/output/basic-node.excalidraw.json +107 -0
  59. package/src/diagrams/deployment/tests/output/basic-node.puml +3 -0
  60. package/src/diagrams/deployment/tests/output/basic-node.svg +8 -0
  61. package/src/diagrams/deployment/tests/output/json-mixing.excalidraw.json +208 -0
  62. package/src/diagrams/deployment/tests/output/json-mixing.puml +6 -0
  63. package/src/diagrams/deployment/tests/output/json-mixing.svg +11 -0
  64. package/src/diagrams/deployment/tests/output/nested-containers.excalidraw.json +302 -0
  65. package/src/diagrams/deployment/tests/output/nested-containers.puml +9 -0
  66. package/src/diagrams/deployment/tests/output/nested-containers.svg +14 -0
  67. package/src/diagrams/deployment/tests/output/ports.excalidraw.json +172 -0
  68. package/src/diagrams/deployment/tests/output/ports.puml +5 -0
  69. package/src/diagrams/deployment/tests/output/ports.svg +10 -0
  70. package/src/diagrams/deployment/tests/output.mjs +22 -0
  71. package/src/diagrams/deployment/tests.mjs +20 -0
  72. package/src/diagrams/index.mjs +123 -0
  73. package/src/diagrams/sequence/assets.mjs +22 -0
  74. package/src/{parser/sequence_context.mjs → diagrams/sequence/context.mjs} +33 -17
  75. package/src/diagrams/sequence/docs/coverage_examples.mjs +552 -0
  76. package/src/diagrams/sequence/docs.mjs +20 -0
  77. package/src/diagrams/sequence/layout.mjs +26 -0
  78. package/src/{layout/sequence_layout.mjs → diagrams/sequence/layout_engine.mjs} +75 -62
  79. package/src/diagrams/sequence/module.mjs +97 -0
  80. package/src/diagrams/sequence/parser.mjs +93 -0
  81. package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/advanced.mjs +21 -2
  82. package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/fragments.mjs +2 -2
  83. package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/messages.mjs +7 -6
  84. package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/notes.mjs +43 -70
  85. package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/participants.mjs +2 -2
  86. package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/preamble.mjs +5 -13
  87. package/src/diagrams/sequence/render.mjs +29 -0
  88. package/src/{render/sequence_render.mjs → diagrams/sequence/render_excalidraw.mjs} +25 -25
  89. package/src/diagrams/sequence/security.mjs +19 -0
  90. package/src/diagrams/sequence/tests/output/arrow-variants.excalidraw.json +2443 -0
  91. package/src/diagrams/sequence/tests/output/arrow-variants.puml +22 -0
  92. package/src/diagrams/sequence/tests/output/arrow-variants.svg +61 -0
  93. package/src/diagrams/sequence/tests/output/autonumber-title-footbox-skinparam.excalidraw.json +1087 -0
  94. package/src/diagrams/sequence/tests/output/autonumber-title-footbox-skinparam.puml +35 -0
  95. package/src/diagrams/sequence/tests/output/autonumber-title-footbox-skinparam.svg +30 -0
  96. package/src/diagrams/sequence/tests/output/basics.excalidraw.json +765 -0
  97. package/src/diagrams/sequence/tests/output/basics.puml +8 -0
  98. package/src/diagrams/sequence/tests/output/basics.svg +22 -0
  99. package/src/diagrams/sequence/tests/output/combination-errors.excalidraw.json +2612 -0
  100. package/src/diagrams/sequence/tests/output/combination-errors.puml +23 -0
  101. package/src/diagrams/sequence/tests/output/combination-errors.svg +64 -0
  102. package/src/diagrams/sequence/tests/output/combination-flow.excalidraw.json +2769 -0
  103. package/src/diagrams/sequence/tests/output/combination-flow.puml +25 -0
  104. package/src/diagrams/sequence/tests/output/combination-flow.svg +69 -0
  105. package/src/diagrams/sequence/tests/output/feedback-loops-assets.excalidraw.json +3487 -0
  106. package/src/diagrams/sequence/tests/output/feedback-loops-assets.puml +21 -0
  107. package/src/diagrams/sequence/tests/output/feedback-loops-assets.svg +86 -0
  108. package/src/diagrams/sequence/tests/output/fragments.excalidraw.json +3347 -0
  109. package/src/diagrams/sequence/tests/output/fragments.puml +36 -0
  110. package/src/diagrams/sequence/tests/output/fragments.svg +82 -0
  111. package/src/diagrams/sequence/tests/output/global-presentation.excalidraw.json +938 -0
  112. package/src/diagrams/sequence/tests/output/global-presentation.puml +23 -0
  113. package/src/diagrams/sequence/tests/output/global-presentation.svg +27 -0
  114. package/src/diagrams/sequence/tests/output/label-wrapping.excalidraw.json +985 -0
  115. package/src/diagrams/sequence/tests/output/label-wrapping.puml +9 -0
  116. package/src/diagrams/sequence/tests/output/label-wrapping.svg +27 -0
  117. package/src/diagrams/sequence/tests/output/lifecycle.excalidraw.json +1771 -0
  118. package/src/diagrams/sequence/tests/output/lifecycle.puml +14 -0
  119. package/src/diagrams/sequence/tests/output/lifecycle.svg +43 -0
  120. package/src/diagrams/sequence/tests/output/notes.excalidraw.json +1213 -0
  121. package/src/diagrams/sequence/tests/output/notes.puml +16 -0
  122. package/src/diagrams/sequence/tests/output/notes.svg +35 -0
  123. package/src/diagrams/sequence/tests/output/participant-boxes.excalidraw.json +1342 -0
  124. package/src/diagrams/sequence/tests/output/participant-boxes.puml +14 -0
  125. package/src/diagrams/sequence/tests/output/participant-boxes.svg +35 -0
  126. package/src/diagrams/sequence/tests/output/participants.excalidraw.json +4146 -0
  127. package/src/diagrams/sequence/tests/output/participants.puml +26 -0
  128. package/src/diagrams/sequence/tests/output/participants.svg +102 -0
  129. package/src/diagrams/sequence/tests/output/timeline-decorations.excalidraw.json +1480 -0
  130. package/src/diagrams/sequence/tests/output/timeline-decorations.puml +18 -0
  131. package/src/diagrams/sequence/tests/output/timeline-decorations.svg +40 -0
  132. package/src/diagrams/sequence/tests/output.mjs +17 -0
  133. package/src/diagrams/sequence/tests/sequence_components.test.mjs +819 -0
  134. package/src/diagrams/sequence/tests.mjs +20 -0
  135. package/src/diagrams/shared/common_plugins/title.mjs +21 -0
  136. package/src/{parser/component_context.mjs → diagrams/shared/graph_context.mjs} +145 -21
  137. package/src/diagrams/shared/graph_parser.mjs +55 -0
  138. package/src/diagrams/shared/graph_plugins/association_class.mjs +47 -0
  139. package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/class_block.mjs +27 -15
  140. package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/connections.mjs +15 -8
  141. package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/containers.mjs +21 -4
  142. package/src/diagrams/shared/graph_plugins/filters.mjs +25 -0
  143. package/src/diagrams/shared/graph_plugins/notes.mjs +104 -0
  144. package/src/diagrams/shared/graph_plugins/ports.mjs +44 -0
  145. package/src/diagrams/shared/graph_plugins/preamble.mjs +99 -0
  146. package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/shapes.mjs +33 -5
  147. package/src/diagrams/shared/graph_runtime.mjs +28 -0
  148. package/src/diagrams/use-case/assets.mjs +16 -0
  149. package/src/diagrams/use-case/docs.mjs +20 -0
  150. package/src/diagrams/use-case/layout.mjs +18 -0
  151. package/src/diagrams/use-case/module.mjs +57 -0
  152. package/src/diagrams/use-case/parser.mjs +197 -0
  153. package/src/diagrams/use-case/plugins/actors.mjs +108 -0
  154. package/src/diagrams/use-case/plugins/containers.mjs +63 -0
  155. package/src/diagrams/use-case/plugins/notes.mjs +71 -0
  156. package/src/diagrams/use-case/plugins/relationships.mjs +97 -0
  157. package/src/diagrams/use-case/plugins/usecases.mjs +86 -0
  158. package/src/diagrams/use-case/render.mjs +18 -0
  159. package/src/diagrams/use-case/security.mjs +16 -0
  160. package/src/diagrams/use-case/tests.mjs +20 -0
  161. package/src/{layout → general/layout}/elk_layout.mjs +7 -5
  162. package/src/{layout → general/layout}/sizing.mjs +1 -1
  163. package/src/{model → general/model}/diagram.mjs +15 -0
  164. package/src/general/platform/asset_base.mjs +58 -0
  165. package/src/general/platform/diagnostics.mjs +76 -0
  166. package/src/general/platform/security_base.mjs +441 -0
  167. package/src/general/platform/services.mjs +192 -0
  168. package/src/{render → general/render}/excalidraw.mjs +83 -15
  169. package/src/{render → general/render}/svg.mjs +6 -6
  170. package/src/{style → general/style}/font.mjs +10 -1
  171. package/src/{style → general/style}/style.mjs +2 -10
  172. package/src/{style → general/style}/text.mjs +1 -1
  173. package/src/main/builtin.mjs +60 -0
  174. package/src/main/dependencies.mjs +96 -0
  175. package/src/main/introspection.mjs +52 -0
  176. package/src/main/metadata.mjs +47 -0
  177. package/src/main/parser.mjs +244 -0
  178. package/src/main/pipeline.mjs +85 -0
  179. package/src/main/registry.mjs +148 -0
  180. package/src/{parser/engine.mjs → util/parser_engine.mjs} +1 -1
  181. package/src/{parser/utils.mjs → util/plantuml_utils.mjs} +72 -9
  182. package/src/parser/plantuml.mjs +0 -284
  183. package/src/parser/plugins/component/notes.mjs +0 -81
  184. package/src/parser/plugins/component/preamble.mjs +0 -54
  185. /package/src/{layout/sequence_spacing.mjs → diagrams/sequence/spacing.mjs} +0 -0
  186. /package/src/{render → general/render}/canvas_svg.mjs +0 -0
  187. /package/src/{render → general/render}/png.mjs +0 -0
  188. /package/src/{render → general/render}/rng.mjs +0 -0
  189. /package/src/{render → general/render}/schema.mjs +0 -0
  190. /package/src/{style → general/style}/colors.mjs +0 -0
package/CHANGELOG.md CHANGED
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
 
9
9
  ### Added
10
10
 
11
- - New `src/style/style.mjs` module with a single source of truth for
11
+ - New `src/general/style/style.mjs` module with a single source of truth for
12
12
  renderer styling. `getStyle()` / `setStyle()` / `resetStyle()` /
13
13
  `loadStyleFromFile()` are exported from the package root, the CLI
14
14
  exposes `excaliplant --style <file>`, and the `./style` subpath is
@@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
20
  - Auto-shrink for box titles and descriptions: long unbreakable
21
21
  identifiers now reduce their font size (down to `text.minFontSize`)
22
22
  rather than overflowing. Disable via `text.autoShrink: false`. New
23
- helper `measureFitted` is exported from `src/style/text.mjs`.
23
+ helper `measureFitted` is exported from `src/general/style/text.mjs`.
24
24
  - Edge-label chips now carry `customData.role` markers
25
25
  (`edgeLabelChip` / `edgeLabelText`) so renderers, tests, and
26
26
  third-party tools can identify them reliably.
@@ -62,6 +62,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
62
62
  [`assets/arrowheads/`](assets/arrowheads/), and the docs build now
63
63
  emits a self-updating model class diagram in the README architecture
64
64
  section.
65
+ - Modular diagram architecture foundation: built-in sequence, class,
66
+ and component diagrams now run as separate diagram-type modules from
67
+ per-diagram module folders. The closed-world `DiagramModuleRegistry`
68
+ is separated from platform services, parsed models receive weak
69
+ module metadata, module-owned layout/render adapters are dispatched, and the
70
+ package exports module base classes, registry helpers, platform
71
+ introspection, `security-base`, `asset-base`, diagnostics, failure
72
+ boundaries, capability checks, and final Excalidraw artifact
73
+ validation.
74
+ - Diagram modules now use concrete main classes (`SequenceDiagramModule`,
75
+ `ClassDiagramModule`, `ComponentDiagramModule`) composed from base
76
+ parser, layout, renderer, documentation, test, security, and asset
77
+ facets. The shared base contracts live in the `src/diagrams/base/`
78
+ module folder.
79
+ - Source structure now foregrounds diagram modules under `src/diagrams/`,
80
+ main orchestration under `src/main/`, shared runtime under
81
+ `src/general/`, and low-level parser helpers under `src/util/`. Legacy
82
+ top-level implementation folders (`src/parser`, `src/layout`,
83
+ `src/render`, `src/model`, `src/modules`, `src/platform`, `src/style`)
84
+ were removed; package subpath exports now point directly at the new
85
+ primary files.
86
+ - Shared parser helpers now cover reusable title-line parsing and block-line
87
+ accumulation for note-style block plugins.
65
88
 
66
89
  ### Changed
67
90
 
@@ -85,7 +108,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
85
108
  field, so connection arrows / lines and edge-label chips appear
86
109
  perfectly straight in the exported SVG / PNG (matching the existing
87
110
  `roughness: 0` Excalidraw JSON output).
88
- - `FONT` from `src/style/text.mjs` is now a live view of the active
111
+ - `FONT` from `src/general/style/text.mjs` is now a live view of the active
89
112
  style document. Existing reads (`FONT.sizeTitle`, `FONT.family`,
90
113
  …) keep working; calls to `setStyle()` / `loadStyleFromFile()`
91
114
  immediately propagate to sizing and rendering.
@@ -125,7 +148,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
125
148
  - Long class / interface / enum member signatures now wrap at
126
149
  semantically meaningful break points (after `,` `(` `:`,
127
150
  before `|` `&` `)`) via the new `wrapMemberSignature` helper
128
- in `src/style/text.mjs`, with continuation indent. Sizing
151
+ in `src/general/style/text.mjs`, with continuation indent. Sizing
129
152
  grows the box height accordingly so members no longer bleed
130
153
  past the right edge.
131
154
  - SVG start markers are now anchored at the visual tip, so backward
@@ -211,7 +234,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
211
234
  attribute. Previously a string like `'" onload="alert(1)'` could
212
235
  break out of the attribute and inject arbitrary markup into the
213
236
  emitted SVG. The escape uses the same routine as the rest of
214
- `src/render/svg.mjs` (`escapeAttr`, now exported) and now also
237
+ `src/general/render/svg.mjs` (`escapeAttr`, now exported) and now also
215
238
  escapes `>` for defence in depth.
216
239
  - `parsePlantUml` gains opt-in resource limits
217
240
  (`maxInputBytes`, `maxLines`, `maxNodes`, `maxEdges`) with sensible
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![node](https://img.shields.io/node/v/@grethel-labs/excaliplant.svg)](https://nodejs.org)
8
8
  [![license](https://img.shields.io/npm/l/@grethel-labs/excaliplant.svg)](./LICENSE)
9
9
 
10
- > PlantUML → ELK layout → Excalidraw renderer with a plugin-based parser. &nbsp;·&nbsp; **v0.7.0** &nbsp;·&nbsp; 162 tests &nbsp;·&nbsp; MIT
10
+ > PlantUML → ELK layout → Excalidraw renderer with a plugin-based parser. &nbsp;·&nbsp; **v0.9.0** &nbsp;·&nbsp; 194 tests &nbsp;·&nbsp; MIT
11
11
 
12
12
  `@grethel-labs/excaliplant` takes PlantUML source, runs it through a plugin-based
13
13
  parser, lays it out with [ELK](https://github.com/kieler/elkjs), and
@@ -131,7 +131,7 @@ See the full [Sequence Diagram Component Coverage](./docs/sequence-components.md
131
131
  npm test
132
132
  ```
133
133
 
134
- Ships with **162 tests** across functional, edge-case,
134
+ Ships with **194 tests** across functional, edge-case,
135
135
  security (XSS / ReDoS / prototype-pollution), and self-introspection
136
136
  suites.
137
137
 
@@ -151,9 +151,9 @@ JSDoc tags.
151
151
  _Sources: [PlantUML](docs/ressources/generated/puml/modules.puml) · [SVG](docs/ressources/generated/svg/modules.svg)_
152
152
 
153
153
  The module graph reflects how the source is laid out under
154
- [`src/`](./src/). Note in particular how the parser is split into a
155
- single tiny `engine` plus a stack of plugins under `parser/plugins/`,
156
- each plugin handling one PlantUML construct.
154
+ [`src/`](./src/). Diagram-type behavior is collected in first-class
155
+ module folders under `src/diagrams/`, orchestration lives under
156
+ `src/main/`, and host capabilities live under `src/general/platform/`.
157
157
 
158
158
  ### renderPlantUml flow
159
159
 
@@ -171,7 +171,7 @@ The call graph for `renderPlantUml(text)` walks three subsystems:
171
171
  deterministic tabular layout.
172
172
  3. **renderer** walks the laid-out model and emits Excalidraw JSON.
173
173
  The same model can also be exported to SVG via
174
- [`src/render/svg.mjs`](./src/render/svg.mjs) — used by the
174
+ [`src/general/render/svg.mjs`](./src/general/render/svg.mjs) — used by the
175
175
  documentation pipeline.
176
176
 
177
177
  ### Parser plugins
@@ -184,9 +184,9 @@ Each parser plugin is a tiny self-contained file that handles ONE
184
184
  PlantUML construct. The engine offers each input line to plugins
185
185
  in registration order; the first plugin that returns `true` wins.
186
186
 
187
- To add support for a new PlantUML keyword, drop a new file in
188
- `src/parser/plugins/` and append it to the default array in
189
- [`plantuml.mjs`](./src/parser/plantuml.mjs). No engine change required.
187
+ To add support for a new PlantUML keyword, drop a new file in the
188
+ owning diagram module folder and append it to that module's parser
189
+ contract. No engine change required.
190
190
 
191
191
  ### Model classes
192
192
 
@@ -195,7 +195,7 @@ To add support for a new PlantUML keyword, drop a new file in
195
195
  _Sources: [PlantUML](docs/ressources/generated/puml/model.puml) · [SVG](docs/ressources/generated/svg/model.svg)_
196
196
 
197
197
  The model diagram is generated dynamically from exported classes in
198
- [`src/model/diagram.mjs`](./src/model/diagram.mjs). It shows how the
198
+ [`src/general/model/diagram.mjs`](./src/general/model/diagram.mjs). It shows how the
199
199
  reusable arrow classes sit underneath both component connections and
200
200
  sequence messages, so future model classes appear in the README without
201
201
  hand-maintained PlantUML.
@@ -245,13 +245,13 @@ excaliplant
245
245
  │ │ ├── extract-api.mjs
246
246
  │ │ ├── extract-docs.mjs
247
247
  │ │ ├── file-tree.mjs
248
- │ │ ├── self-diagrams.mjs
249
- │ │ └── sequence-coverage-examples.mjs
248
+ │ │ └── self-diagrams.mjs
250
249
  │ ├── API.md
251
250
  │ ├── API.template.md.njk
252
251
  │ ├── README.template.md.njk
253
252
  │ ├── sequence-components.md
254
- │ └── sequence-components.template.md.njk
253
+ │ ├── sequence-components.template.md.njk
254
+ │ └── src-structure-refactor-plan.md
255
255
  ├── scripts
256
256
  │ ├── auto-patch-deps.mjs
257
257
  │ ├── bump-release-version.mjs
@@ -261,46 +261,136 @@ excaliplant
261
261
  │ ├── setup-merge-drivers.mjs
262
262
  │ └── smoke.mjs
263
263
  ├── src
264
- │ ├── layout
265
- │ │ ├── elk_layout.mjs
266
- │ │ ├── sequence_layout.mjs
267
- │ │ ├── sequence_spacing.mjs
268
- │ │ └── sizing.mjs
269
- │ ├── model
270
- │ │ └── diagram.mjs
271
- │ ├── parser
272
- │ │ ├── plugins
273
- │ │ │ ├── component
274
- │ │ │ └── sequence
275
- │ │ ├── component_context.mjs
276
- │ │ ├── engine.mjs
277
- │ │ ├── plantuml.mjs
278
- │ │ ├── sequence_context.mjs
279
- │ │ └── utils.mjs
280
- │ ├── render
281
- │ │ ├── canvas_svg.mjs
282
- │ │ ├── excalidraw.mjs
283
- │ │ ├── png.mjs
284
- │ │ ├── rng.mjs
285
- │ │ ├── schema.mjs
286
- │ │ ├── sequence_render.mjs
287
- │ │ └── svg.mjs
288
- │ └── style
289
- │ ├── colors.mjs
290
- │ ├── font.mjs
291
- │ ├── style.mjs
292
- │ └── text.mjs
264
+ │ ├── diagrams
265
+ │ │ ├── base
266
+ │ │ │ ├── artifacts.mjs
267
+ │ │ │ ├── assets.mjs
268
+ │ │ │ ├── dependencies.mjs
269
+ │ │ │ ├── docs.mjs
270
+ │ │ │ ├── index.mjs
271
+ │ │ │ ├── layout.mjs
272
+ │ │ │ ├── module.mjs
273
+ │ │ │ ├── parser.mjs
274
+ │ │ │ ├── renderer.mjs
275
+ │ │ │ ├── security.mjs
276
+ │ │ │ └── tests.mjs
277
+ │ │ ├── class
278
+ │ │ │ ├── docs
279
+ │ │ │ ├── tests
280
+ │ │ │ ├── assets.mjs
281
+ │ │ │ ├── docs.mjs
282
+ │ │ │ ├── layout.mjs
283
+ │ │ │ ├── module.mjs
284
+ │ │ │ ├── parser.mjs
285
+ │ │ │ ├── render.mjs
286
+ │ │ │ ├── security.mjs
287
+ │ │ │ ├── style.mjs
288
+ │ │ │ └── tests.mjs
289
+ │ │ ├── component
290
+ │ │ │ ├── docs
291
+ │ │ │ ├── tests
292
+ │ │ │ ├── assets.mjs
293
+ │ │ │ ├── docs.mjs
294
+ │ │ │ ├── layout.mjs
295
+ │ │ │ ├── module.mjs
296
+ │ │ │ ├── parser.mjs
297
+ │ │ │ ├── render.mjs
298
+ │ │ │ ├── security.mjs
299
+ │ │ │ └── tests.mjs
300
+ │ │ ├── deployment
301
+ │ │ │ ├── docs
302
+ │ │ │ ├── tests
303
+ │ │ │ ├── assets.mjs
304
+ │ │ │ ├── docs.mjs
305
+ │ │ │ ├── layout.mjs
306
+ │ │ │ ├── module.mjs
307
+ │ │ │ ├── parser.mjs
308
+ │ │ │ ├── render.mjs
309
+ │ │ │ ├── security.mjs
310
+ │ │ │ └── tests.mjs
311
+ │ │ ├── sequence
312
+ │ │ │ ├── docs
313
+ │ │ │ ├── plugins
314
+ │ │ │ ├── tests
315
+ │ │ │ ├── assets.mjs
316
+ │ │ │ ├── context.mjs
317
+ │ │ │ ├── docs.mjs
318
+ │ │ │ ├── layout.mjs
319
+ │ │ │ ├── layout_engine.mjs
320
+ │ │ │ ├── module.mjs
321
+ │ │ │ ├── parser.mjs
322
+ │ │ │ ├── render.mjs
323
+ │ │ │ ├── render_excalidraw.mjs
324
+ │ │ │ ├── security.mjs
325
+ │ │ │ ├── spacing.mjs
326
+ │ │ │ └── tests.mjs
327
+ │ │ ├── shared
328
+ │ │ │ ├── common_plugins
329
+ │ │ │ ├── graph_plugins
330
+ │ │ │ ├── graph_context.mjs
331
+ │ │ │ ├── graph_parser.mjs
332
+ │ │ │ └── graph_runtime.mjs
333
+ │ │ ├── use-case
334
+ │ │ │ ├── plugins
335
+ │ │ │ ├── assets.mjs
336
+ │ │ │ ├── docs.mjs
337
+ │ │ │ ├── layout.mjs
338
+ │ │ │ ├── module.mjs
339
+ │ │ │ ├── parser.mjs
340
+ │ │ │ ├── render.mjs
341
+ │ │ │ ├── security.mjs
342
+ │ │ │ └── tests.mjs
343
+ │ │ └── index.mjs
344
+ │ ├── general
345
+ │ │ ├── layout
346
+ │ │ │ ├── elk_layout.mjs
347
+ │ │ │ └── sizing.mjs
348
+ │ │ ├── model
349
+ │ │ │ └── diagram.mjs
350
+ │ │ ├── platform
351
+ │ │ │ ├── asset_base.mjs
352
+ │ │ │ ├── diagnostics.mjs
353
+ │ │ │ ├── security_base.mjs
354
+ │ │ │ └── services.mjs
355
+ │ │ ├── render
356
+ │ │ │ ├── canvas_svg.mjs
357
+ │ │ │ ├── excalidraw.mjs
358
+ │ │ │ ├── png.mjs
359
+ │ │ │ ├── rng.mjs
360
+ │ │ │ ├── schema.mjs
361
+ │ │ │ └── svg.mjs
362
+ │ │ └── style
363
+ │ │ ├── colors.mjs
364
+ │ │ ├── font.mjs
365
+ │ │ ├── style.mjs
366
+ │ │ └── text.mjs
367
+ │ ├── main
368
+ │ │ ├── builtin.mjs
369
+ │ │ ├── dependencies.mjs
370
+ │ │ ├── introspection.mjs
371
+ │ │ ├── metadata.mjs
372
+ │ │ ├── parser.mjs
373
+ │ │ ├── pipeline.mjs
374
+ │ │ └── registry.mjs
375
+ │ └── util
376
+ │ ├── parser_engine.mjs
377
+ │ └── plantuml_utils.mjs
293
378
  ├── tests
294
379
  │ ├── helpers
295
380
  │ │ └── output.mjs
381
+ │ ├── class_components.test.mjs
382
+ │ ├── component_components.test.mjs
383
+ │ ├── deployment_components.test.mjs
296
384
  │ ├── edge_cases.test.mjs
297
385
  │ ├── functional_more.test.mjs
298
386
  │ ├── merge_driver.test.mjs
387
+ │ ├── modular_architecture.test.mjs
299
388
  │ ├── plantuml.test.mjs
300
389
  │ ├── security.test.mjs
301
390
  │ ├── self_introspection.test.mjs
302
391
  │ ├── sequence_components.test.mjs
303
- │ └── style.test.mjs
392
+ │ ├── style.test.mjs
393
+ │ └── usecase_components.test.mjs
304
394
  ├── AGENTS.md
305
395
  ├── CHANGELOG.md
306
396
  ├── CLAUDE.md
@@ -325,6 +415,254 @@ generated by the same command from JSDoc.
325
415
 
326
416
  ## Module documentation
327
417
 
418
+ ### diagrams
419
+
420
+
421
+
422
+ ### diagrams/base
423
+
424
+
425
+
426
+ ### diagrams/base/artifacts
427
+
428
+
429
+
430
+ ### diagrams/base/assets
431
+
432
+
433
+
434
+ ### diagrams/base/dependencies
435
+
436
+
437
+
438
+ ### diagrams/base/docs
439
+
440
+
441
+
442
+ ### diagrams/base/layout
443
+
444
+
445
+
446
+ ### diagrams/base/module
447
+
448
+
449
+
450
+ ### diagrams/base/parser
451
+
452
+
453
+
454
+ ### diagrams/base/renderer
455
+
456
+
457
+
458
+ ### diagrams/base/security
459
+
460
+
461
+
462
+ ### diagrams/base/tests
463
+
464
+
465
+
466
+ ### diagrams/class/assets
467
+
468
+
469
+
470
+ ### diagrams/class/docs
471
+
472
+
473
+
474
+ ### diagrams/class/docs/coverage_examples
475
+
476
+
477
+
478
+ ### diagrams/class/layout
479
+
480
+
481
+
482
+ ### diagrams/class/module
483
+
484
+
485
+
486
+ ### diagrams/class/parser
487
+
488
+
489
+
490
+ ### diagrams/class/render
491
+
492
+
493
+
494
+ ### diagrams/class/security
495
+
496
+
497
+
498
+ ### diagrams/class/style
499
+
500
+
501
+
502
+ ### diagrams/class/tests
503
+
504
+
505
+
506
+ ### diagrams/component/assets
507
+
508
+
509
+
510
+ ### diagrams/component/docs
511
+
512
+
513
+
514
+ ### diagrams/component/docs/coverage_examples
515
+
516
+
517
+
518
+ ### diagrams/component/layout
519
+
520
+
521
+
522
+ ### diagrams/component/module
523
+
524
+
525
+
526
+ ### diagrams/component/parser
527
+
528
+
529
+
530
+ ### diagrams/component/render
531
+
532
+
533
+
534
+ ### diagrams/component/security
535
+
536
+
537
+
538
+ ### diagrams/component/tests
539
+
540
+
541
+
542
+ ### diagrams/deployment/assets
543
+
544
+
545
+
546
+ ### diagrams/deployment/docs
547
+
548
+
549
+
550
+ ### diagrams/deployment/layout
551
+
552
+
553
+
554
+ ### diagrams/deployment/module
555
+
556
+
557
+
558
+ ### diagrams/deployment/parser
559
+
560
+
561
+
562
+ ### diagrams/deployment/render
563
+
564
+
565
+
566
+ ### diagrams/deployment/security
567
+
568
+
569
+
570
+ ### diagrams/deployment/tests
571
+
572
+
573
+
574
+ ### diagrams/sequence/assets
575
+
576
+
577
+
578
+ ### diagrams/sequence/docs
579
+
580
+
581
+
582
+ ### diagrams/sequence/layout
583
+
584
+
585
+
586
+ ### diagrams/sequence/module
587
+
588
+
589
+
590
+ ### diagrams/sequence/parser
591
+
592
+
593
+
594
+ ### diagrams/sequence/render
595
+
596
+
597
+
598
+ ### diagrams/sequence/security
599
+
600
+
601
+
602
+ ### diagrams/sequence/tests
603
+
604
+
605
+
606
+ ### diagrams/shared/graph_parser
607
+
608
+
609
+
610
+ ### diagrams/shared/graph_runtime
611
+
612
+
613
+
614
+ ### diagrams/use-case/assets
615
+
616
+
617
+
618
+ ### diagrams/use-case/docs
619
+
620
+
621
+
622
+ ### diagrams/use-case/layout
623
+
624
+
625
+
626
+ ### diagrams/use-case/module
627
+
628
+
629
+
630
+ ### diagrams/use-case/parser
631
+
632
+
633
+
634
+ ### diagrams/use-case/plugins/actors
635
+
636
+
637
+
638
+ ### diagrams/use-case/plugins/containers
639
+
640
+
641
+
642
+ ### diagrams/use-case/plugins/notes
643
+
644
+
645
+
646
+ ### diagrams/use-case/plugins/relationships
647
+
648
+
649
+
650
+ ### diagrams/use-case/plugins/usecases
651
+
652
+
653
+
654
+ ### diagrams/use-case/render
655
+
656
+
657
+
658
+ ### diagrams/use-case/security
659
+
660
+
661
+
662
+ ### diagrams/use-case/tests
663
+
664
+
665
+
328
666
  ### layout
329
667
 
330
668
  Layout chooses positions for every shape and routes every edge.
@@ -338,6 +676,10 @@ tabular (lifelines on the X axis, time on the Y axis), so a
338
676
  deterministic ~90-line algorithm produces better, more compact
339
677
  results than a force-directed solver could.
340
678
 
679
+ ### main/builtin
680
+
681
+
682
+
341
683
  ### model
342
684
 
343
685
  Input-agnostic diagram model. Two top-level kinds:
@@ -352,6 +694,26 @@ pipeline; the parser is just one possible source. Callers can
352
694
  also build a `Diagram` programmatically and feed it to
353
695
  `renderDiagram()`.
354
696
 
697
+ ### modules/dependencies
698
+
699
+
700
+
701
+ ### modules/introspection
702
+
703
+
704
+
705
+ ### modules/metadata
706
+
707
+
708
+
709
+ ### modules/pipeline
710
+
711
+
712
+
713
+ ### modules/registry
714
+
715
+
716
+
355
717
  ### parser/engine
356
718
 
357
719
  A ~50-line line-walker. The engine itself knows nothing about
@@ -359,6 +721,22 @@ PlantUML syntax; that lives entirely in plugins. Block plugins
359
721
  (multi-line notes, class bodies) take exclusive ownership of
360
722
  subsequent lines until they release.
361
723
 
724
+ ### platform/asset-base
725
+
726
+
727
+
728
+ ### platform/diagnostics
729
+
730
+
731
+
732
+ ### platform/security-base
733
+
734
+
735
+
736
+ ### platform/services
737
+
738
+
739
+
362
740
  ### render
363
741
 
364
742
  Emits Excalidraw JSON. Each model shape is dispatched to a
@@ -366,7 +744,7 @@ dedicated `renderXxx()` function that produces one or more
366
744
  Excalidraw primitive elements (rectangle, ellipse, line, arrow,
367
745
  text). The output document is a stand-alone `.excalidraw` file
368
746
  that any Excalidraw front-end can open. The companion module
369
- `src/render/svg.mjs` converts the same JSON to SVG for the
747
+ `src/general/render/svg.mjs` converts the same JSON to SVG for the
370
748
  build-time documentation pipeline.
371
749
 
372
750
  ### sequence-spacing
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "source": "assets/arrowheads/arrowheads.svg",
3
- "generatedBy": "src/render/svg.mjs marker geometry",
3
+ "generatedBy": "src/general/render/svg.mjs marker geometry",
4
4
  "arrowheads": [
5
5
  "arrow",
6
6
  "triangle",
@@ -220,7 +220,7 @@ async function main() {
220
220
  }
221
221
 
222
222
  if (opts.styleFile) {
223
- const { loadStyleFromFile } = await import("../src/style/style.mjs");
223
+ const { loadStyleFromFile } = await import("../src/general/style/style.mjs");
224
224
  loadStyleFromFile(opts.styleFile);
225
225
  }
226
226
 
@@ -229,7 +229,7 @@ async function main() {
229
229
  if (opts.rngSeed === "random") {
230
230
  rng = Math.random;
231
231
  } else if (opts.rngSeed != null) {
232
- const { createSeededRng } = await import("../src/render/rng.mjs");
232
+ const { createSeededRng } = await import("../src/general/render/rng.mjs");
233
233
  rng = createSeededRng(Number(opts.rngSeed) >>> 0);
234
234
  }
235
235