@grethel-labs/excaliplant 0.7.0 → 0.8.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.
- package/CHANGELOG.md +28 -5
- package/README.md +359 -43
- package/assets/arrowheads/manifest.json +1 -1
- package/bin/excaliplant.mjs +2 -2
- package/index.mjs +111 -29
- package/package.json +29 -14
- package/src/diagrams/base/artifacts.mjs +35 -0
- package/src/diagrams/base/assets.mjs +23 -0
- package/src/diagrams/base/dependencies.mjs +25 -0
- package/src/diagrams/base/docs.mjs +37 -0
- package/src/diagrams/base/index.mjs +15 -0
- package/src/diagrams/base/layout.mjs +32 -0
- package/src/diagrams/base/module.mjs +210 -0
- package/src/diagrams/base/parser.mjs +50 -0
- package/src/diagrams/base/renderer.mjs +26 -0
- package/src/diagrams/base/security.mjs +23 -0
- package/src/diagrams/base/tests.mjs +37 -0
- package/src/diagrams/class/assets.mjs +22 -0
- package/src/diagrams/class/docs/coverage_examples.mjs +93 -0
- package/src/diagrams/class/docs.mjs +37 -0
- package/src/diagrams/class/layout.mjs +20 -0
- package/src/diagrams/class/module.mjs +101 -0
- package/src/diagrams/class/parser.mjs +53 -0
- package/src/diagrams/class/render.mjs +20 -0
- package/src/diagrams/class/security.mjs +19 -0
- package/src/diagrams/class/style.mjs +15 -0
- package/src/diagrams/class/tests/class_components.test.mjs +103 -0
- package/src/diagrams/class/tests/output/.gitignore +2 -0
- package/src/diagrams/class/tests/output.mjs +17 -0
- package/src/diagrams/class/tests.mjs +20 -0
- package/src/diagrams/component/assets.mjs +22 -0
- package/src/diagrams/component/docs/coverage_examples.mjs +98 -0
- package/src/diagrams/component/docs.mjs +37 -0
- package/src/diagrams/component/layout.mjs +20 -0
- package/src/diagrams/component/module.mjs +105 -0
- package/src/diagrams/component/parser.mjs +63 -0
- package/src/diagrams/component/render.mjs +20 -0
- package/src/diagrams/component/security.mjs +19 -0
- package/src/diagrams/component/tests/component_components.test.mjs +108 -0
- package/src/diagrams/component/tests/output/.gitignore +2 -0
- package/src/diagrams/component/tests/output.mjs +17 -0
- package/src/diagrams/component/tests.mjs +23 -0
- package/src/diagrams/deployment/assets.mjs +22 -0
- package/src/diagrams/deployment/docs/coverage_examples.mjs +80 -0
- package/src/diagrams/deployment/docs.mjs +31 -0
- package/src/diagrams/deployment/layout.mjs +20 -0
- package/src/diagrams/deployment/module.mjs +104 -0
- package/src/diagrams/deployment/parser.mjs +56 -0
- package/src/diagrams/deployment/render.mjs +20 -0
- package/src/diagrams/deployment/security.mjs +19 -0
- package/src/diagrams/deployment/tests/deployment_components.test.mjs +83 -0
- package/src/diagrams/deployment/tests/output/all-shapes.excalidraw.json +965 -0
- package/src/diagrams/deployment/tests/output/all-shapes.puml +11 -0
- package/src/diagrams/deployment/tests/output/all-shapes.svg +34 -0
- package/src/diagrams/deployment/tests/output/arrow-styles.excalidraw.json +450 -0
- package/src/diagrams/deployment/tests/output/arrow-styles.puml +8 -0
- package/src/diagrams/deployment/tests/output/arrow-styles.svg +18 -0
- package/src/diagrams/deployment/tests/output/basic-node.excalidraw.json +107 -0
- package/src/diagrams/deployment/tests/output/basic-node.puml +3 -0
- package/src/diagrams/deployment/tests/output/basic-node.svg +8 -0
- package/src/diagrams/deployment/tests/output/json-mixing.excalidraw.json +208 -0
- package/src/diagrams/deployment/tests/output/json-mixing.puml +6 -0
- package/src/diagrams/deployment/tests/output/json-mixing.svg +11 -0
- package/src/diagrams/deployment/tests/output/nested-containers.excalidraw.json +302 -0
- package/src/diagrams/deployment/tests/output/nested-containers.puml +9 -0
- package/src/diagrams/deployment/tests/output/nested-containers.svg +14 -0
- package/src/diagrams/deployment/tests/output/ports.excalidraw.json +172 -0
- package/src/diagrams/deployment/tests/output/ports.puml +5 -0
- package/src/diagrams/deployment/tests/output/ports.svg +10 -0
- package/src/diagrams/deployment/tests/output.mjs +22 -0
- package/src/diagrams/deployment/tests.mjs +20 -0
- package/src/diagrams/index.mjs +106 -0
- package/src/diagrams/sequence/assets.mjs +22 -0
- package/src/{parser/sequence_context.mjs → diagrams/sequence/context.mjs} +33 -17
- package/src/diagrams/sequence/docs/coverage_examples.mjs +552 -0
- package/src/diagrams/sequence/docs.mjs +20 -0
- package/src/diagrams/sequence/layout.mjs +26 -0
- package/src/{layout/sequence_layout.mjs → diagrams/sequence/layout_engine.mjs} +75 -62
- package/src/diagrams/sequence/module.mjs +97 -0
- package/src/diagrams/sequence/parser.mjs +93 -0
- package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/advanced.mjs +21 -2
- package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/fragments.mjs +2 -2
- package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/messages.mjs +7 -6
- package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/notes.mjs +43 -70
- package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/participants.mjs +2 -2
- package/src/{parser/plugins/sequence → diagrams/sequence/plugins}/preamble.mjs +5 -13
- package/src/diagrams/sequence/render.mjs +29 -0
- package/src/{render/sequence_render.mjs → diagrams/sequence/render_excalidraw.mjs} +25 -25
- package/src/diagrams/sequence/security.mjs +19 -0
- package/src/diagrams/sequence/tests/output/arrow-variants.excalidraw.json +2443 -0
- package/src/diagrams/sequence/tests/output/arrow-variants.puml +22 -0
- package/src/diagrams/sequence/tests/output/arrow-variants.svg +61 -0
- package/src/diagrams/sequence/tests/output/autonumber-title-footbox-skinparam.excalidraw.json +1087 -0
- package/src/diagrams/sequence/tests/output/autonumber-title-footbox-skinparam.puml +35 -0
- package/src/diagrams/sequence/tests/output/autonumber-title-footbox-skinparam.svg +30 -0
- package/src/diagrams/sequence/tests/output/basics.excalidraw.json +765 -0
- package/src/diagrams/sequence/tests/output/basics.puml +8 -0
- package/src/diagrams/sequence/tests/output/basics.svg +22 -0
- package/src/diagrams/sequence/tests/output/combination-errors.excalidraw.json +2612 -0
- package/src/diagrams/sequence/tests/output/combination-errors.puml +23 -0
- package/src/diagrams/sequence/tests/output/combination-errors.svg +64 -0
- package/src/diagrams/sequence/tests/output/combination-flow.excalidraw.json +2769 -0
- package/src/diagrams/sequence/tests/output/combination-flow.puml +25 -0
- package/src/diagrams/sequence/tests/output/combination-flow.svg +69 -0
- package/src/diagrams/sequence/tests/output/feedback-loops-assets.excalidraw.json +3487 -0
- package/src/diagrams/sequence/tests/output/feedback-loops-assets.puml +21 -0
- package/src/diagrams/sequence/tests/output/feedback-loops-assets.svg +86 -0
- package/src/diagrams/sequence/tests/output/fragments.excalidraw.json +3347 -0
- package/src/diagrams/sequence/tests/output/fragments.puml +36 -0
- package/src/diagrams/sequence/tests/output/fragments.svg +82 -0
- package/src/diagrams/sequence/tests/output/global-presentation.excalidraw.json +938 -0
- package/src/diagrams/sequence/tests/output/global-presentation.puml +23 -0
- package/src/diagrams/sequence/tests/output/global-presentation.svg +27 -0
- package/src/diagrams/sequence/tests/output/label-wrapping.excalidraw.json +985 -0
- package/src/diagrams/sequence/tests/output/label-wrapping.puml +9 -0
- package/src/diagrams/sequence/tests/output/label-wrapping.svg +27 -0
- package/src/diagrams/sequence/tests/output/lifecycle.excalidraw.json +1771 -0
- package/src/diagrams/sequence/tests/output/lifecycle.puml +14 -0
- package/src/diagrams/sequence/tests/output/lifecycle.svg +43 -0
- package/src/diagrams/sequence/tests/output/notes.excalidraw.json +1213 -0
- package/src/diagrams/sequence/tests/output/notes.puml +16 -0
- package/src/diagrams/sequence/tests/output/notes.svg +35 -0
- package/src/diagrams/sequence/tests/output/participant-boxes.excalidraw.json +1342 -0
- package/src/diagrams/sequence/tests/output/participant-boxes.puml +14 -0
- package/src/diagrams/sequence/tests/output/participant-boxes.svg +35 -0
- package/src/diagrams/sequence/tests/output/participants.excalidraw.json +4146 -0
- package/src/diagrams/sequence/tests/output/participants.puml +26 -0
- package/src/diagrams/sequence/tests/output/participants.svg +102 -0
- package/src/diagrams/sequence/tests/output/timeline-decorations.excalidraw.json +1480 -0
- package/src/diagrams/sequence/tests/output/timeline-decorations.puml +18 -0
- package/src/diagrams/sequence/tests/output/timeline-decorations.svg +40 -0
- package/src/diagrams/sequence/tests/output.mjs +17 -0
- package/src/diagrams/sequence/tests/sequence_components.test.mjs +819 -0
- package/src/diagrams/sequence/tests.mjs +20 -0
- package/src/diagrams/shared/common_plugins/title.mjs +21 -0
- package/src/{parser/component_context.mjs → diagrams/shared/graph_context.mjs} +145 -21
- package/src/diagrams/shared/graph_parser.mjs +55 -0
- package/src/diagrams/shared/graph_plugins/association_class.mjs +47 -0
- package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/class_block.mjs +27 -15
- package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/connections.mjs +15 -8
- package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/containers.mjs +21 -4
- package/src/diagrams/shared/graph_plugins/filters.mjs +25 -0
- package/src/diagrams/shared/graph_plugins/notes.mjs +104 -0
- package/src/diagrams/shared/graph_plugins/ports.mjs +44 -0
- package/src/diagrams/shared/graph_plugins/preamble.mjs +99 -0
- package/src/{parser/plugins/component → diagrams/shared/graph_plugins}/shapes.mjs +33 -5
- package/src/diagrams/shared/graph_runtime.mjs +28 -0
- package/src/{layout → general/layout}/elk_layout.mjs +7 -5
- package/src/{layout → general/layout}/sizing.mjs +1 -1
- package/src/{model → general/model}/diagram.mjs +15 -0
- package/src/general/platform/asset_base.mjs +58 -0
- package/src/general/platform/diagnostics.mjs +76 -0
- package/src/general/platform/security_base.mjs +441 -0
- package/src/general/platform/services.mjs +192 -0
- package/src/{render → general/render}/excalidraw.mjs +83 -15
- package/src/{render → general/render}/svg.mjs +6 -6
- package/src/{style → general/style}/font.mjs +10 -1
- package/src/{style → general/style}/style.mjs +2 -10
- package/src/{style → general/style}/text.mjs +1 -1
- package/src/main/builtin.mjs +60 -0
- package/src/main/dependencies.mjs +96 -0
- package/src/main/introspection.mjs +52 -0
- package/src/main/metadata.mjs +47 -0
- package/src/main/parser.mjs +244 -0
- package/src/main/pipeline.mjs +85 -0
- package/src/main/registry.mjs +148 -0
- package/src/{parser/engine.mjs → util/parser_engine.mjs} +1 -1
- package/src/{parser/utils.mjs → util/plantuml_utils.mjs} +72 -9
- package/src/parser/plantuml.mjs +0 -284
- package/src/parser/plugins/component/notes.mjs +0 -81
- package/src/parser/plugins/component/preamble.mjs +0 -54
- /package/src/{layout/sequence_spacing.mjs → diagrams/sequence/spacing.mjs} +0 -0
- /package/src/{render → general/render}/canvas_svg.mjs +0 -0
- /package/src/{render → general/render}/png.mjs +0 -0
- /package/src/{render → general/render}/rng.mjs +0 -0
- /package/src/{render → general/render}/schema.mjs +0 -0
- /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
|
[](https://nodejs.org)
|
|
8
8
|
[](./LICENSE)
|
|
9
9
|
|
|
10
|
-
> PlantUML → ELK layout → Excalidraw renderer with a plugin-based parser. · **v0.
|
|
10
|
+
> PlantUML → ELK layout → Excalidraw renderer with a plugin-based parser. · **v0.8.0** · 194 tests · 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 **
|
|
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/).
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
|
|
189
|
-
|
|
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
|
-
│ │
|
|
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
|
-
│
|
|
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,41 +261,120 @@ excaliplant
|
|
|
261
261
|
│ ├── setup-merge-drivers.mjs
|
|
262
262
|
│ └── smoke.mjs
|
|
263
263
|
├── src
|
|
264
|
-
│ ├──
|
|
265
|
-
│ │ ├──
|
|
266
|
-
│ │ ├──
|
|
267
|
-
│ │ ├──
|
|
268
|
-
│ │
|
|
269
|
-
│ ├──
|
|
270
|
-
│ │
|
|
271
|
-
│ ├──
|
|
272
|
-
│ │ ├──
|
|
273
|
-
│ │ │ ├──
|
|
274
|
-
│ │ │
|
|
275
|
-
│ │ ├──
|
|
276
|
-
│ │
|
|
277
|
-
│ │ ├──
|
|
278
|
-
│ │ ├──
|
|
279
|
-
│ │
|
|
280
|
-
│ ├──
|
|
281
|
-
│ │ ├──
|
|
282
|
-
│ │ ├──
|
|
283
|
-
│ │ ├──
|
|
284
|
-
│ │ ├──
|
|
285
|
-
│ │ ├──
|
|
286
|
-
│ │ ├──
|
|
287
|
-
│ │
|
|
288
|
-
│ └──
|
|
289
|
-
│
|
|
290
|
-
│
|
|
291
|
-
│
|
|
292
|
-
│
|
|
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
|
+
│ │ └── index.mjs
|
|
334
|
+
│ ├── general
|
|
335
|
+
│ │ ├── layout
|
|
336
|
+
│ │ │ ├── elk_layout.mjs
|
|
337
|
+
│ │ │ └── sizing.mjs
|
|
338
|
+
│ │ ├── model
|
|
339
|
+
│ │ │ └── diagram.mjs
|
|
340
|
+
│ │ ├── platform
|
|
341
|
+
│ │ │ ├── asset_base.mjs
|
|
342
|
+
│ │ │ ├── diagnostics.mjs
|
|
343
|
+
│ │ │ ├── security_base.mjs
|
|
344
|
+
│ │ │ └── services.mjs
|
|
345
|
+
│ │ ├── render
|
|
346
|
+
│ │ │ ├── canvas_svg.mjs
|
|
347
|
+
│ │ │ ├── excalidraw.mjs
|
|
348
|
+
│ │ │ ├── png.mjs
|
|
349
|
+
│ │ │ ├── rng.mjs
|
|
350
|
+
│ │ │ ├── schema.mjs
|
|
351
|
+
│ │ │ └── svg.mjs
|
|
352
|
+
│ │ └── style
|
|
353
|
+
│ │ ├── colors.mjs
|
|
354
|
+
│ │ ├── font.mjs
|
|
355
|
+
│ │ ├── style.mjs
|
|
356
|
+
│ │ └── text.mjs
|
|
357
|
+
│ ├── main
|
|
358
|
+
│ │ ├── builtin.mjs
|
|
359
|
+
│ │ ├── dependencies.mjs
|
|
360
|
+
│ │ ├── introspection.mjs
|
|
361
|
+
│ │ ├── metadata.mjs
|
|
362
|
+
│ │ ├── parser.mjs
|
|
363
|
+
│ │ ├── pipeline.mjs
|
|
364
|
+
│ │ └── registry.mjs
|
|
365
|
+
│ └── util
|
|
366
|
+
│ ├── parser_engine.mjs
|
|
367
|
+
│ └── plantuml_utils.mjs
|
|
293
368
|
├── tests
|
|
294
369
|
│ ├── helpers
|
|
295
370
|
│ │ └── output.mjs
|
|
371
|
+
│ ├── class_components.test.mjs
|
|
372
|
+
│ ├── component_components.test.mjs
|
|
373
|
+
│ ├── deployment_components.test.mjs
|
|
296
374
|
│ ├── edge_cases.test.mjs
|
|
297
375
|
│ ├── functional_more.test.mjs
|
|
298
376
|
│ ├── merge_driver.test.mjs
|
|
377
|
+
│ ├── modular_architecture.test.mjs
|
|
299
378
|
│ ├── plantuml.test.mjs
|
|
300
379
|
│ ├── security.test.mjs
|
|
301
380
|
│ ├── self_introspection.test.mjs
|
|
@@ -313,6 +392,7 @@ excaliplant
|
|
|
313
392
|
├── index.mjs
|
|
314
393
|
├── lifecycle-test.svg
|
|
315
394
|
├── package.json
|
|
395
|
+
├── prompt-deployment-diagram.md
|
|
316
396
|
├── style.example.json
|
|
317
397
|
├── style.example.yaml
|
|
318
398
|
└── tsconfig.json
|
|
@@ -325,6 +405,202 @@ generated by the same command from JSDoc.
|
|
|
325
405
|
|
|
326
406
|
## Module documentation
|
|
327
407
|
|
|
408
|
+
### diagrams
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
### diagrams/base
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
### diagrams/base/artifacts
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
### diagrams/base/assets
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
### diagrams/base/dependencies
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
### diagrams/base/docs
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
### diagrams/base/layout
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
### diagrams/base/module
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
### diagrams/base/parser
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
### diagrams/base/renderer
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
### diagrams/base/security
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
### diagrams/base/tests
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
### diagrams/class/assets
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
### diagrams/class/docs
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
### diagrams/class/docs/coverage_examples
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
### diagrams/class/layout
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
### diagrams/class/module
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
### diagrams/class/parser
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
### diagrams/class/render
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
### diagrams/class/security
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
### diagrams/class/style
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
### diagrams/class/tests
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
### diagrams/component/assets
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
### diagrams/component/docs
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
### diagrams/component/docs/coverage_examples
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
### diagrams/component/layout
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
### diagrams/component/module
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
### diagrams/component/parser
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
### diagrams/component/render
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
### diagrams/component/security
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
### diagrams/component/tests
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
### diagrams/deployment/assets
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
### diagrams/deployment/docs
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
### diagrams/deployment/layout
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
### diagrams/deployment/module
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
### diagrams/deployment/parser
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
### diagrams/deployment/render
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
### diagrams/deployment/security
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
### diagrams/deployment/tests
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
### diagrams/sequence/assets
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
### diagrams/sequence/docs
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
### diagrams/sequence/layout
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
### diagrams/sequence/module
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
### diagrams/sequence/parser
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
### diagrams/sequence/render
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
### diagrams/sequence/security
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
### diagrams/sequence/tests
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
### diagrams/shared/graph_parser
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
### diagrams/shared/graph_runtime
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
328
604
|
### layout
|
|
329
605
|
|
|
330
606
|
Layout chooses positions for every shape and routes every edge.
|
|
@@ -338,6 +614,10 @@ tabular (lifelines on the X axis, time on the Y axis), so a
|
|
|
338
614
|
deterministic ~90-line algorithm produces better, more compact
|
|
339
615
|
results than a force-directed solver could.
|
|
340
616
|
|
|
617
|
+
### main/builtin
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
341
621
|
### model
|
|
342
622
|
|
|
343
623
|
Input-agnostic diagram model. Two top-level kinds:
|
|
@@ -352,6 +632,26 @@ pipeline; the parser is just one possible source. Callers can
|
|
|
352
632
|
also build a `Diagram` programmatically and feed it to
|
|
353
633
|
`renderDiagram()`.
|
|
354
634
|
|
|
635
|
+
### modules/dependencies
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
### modules/introspection
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
### modules/metadata
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
### modules/pipeline
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
### modules/registry
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
355
655
|
### parser/engine
|
|
356
656
|
|
|
357
657
|
A ~50-line line-walker. The engine itself knows nothing about
|
|
@@ -359,6 +659,22 @@ PlantUML syntax; that lives entirely in plugins. Block plugins
|
|
|
359
659
|
(multi-line notes, class bodies) take exclusive ownership of
|
|
360
660
|
subsequent lines until they release.
|
|
361
661
|
|
|
662
|
+
### platform/asset-base
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
### platform/diagnostics
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
### platform/security-base
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
### platform/services
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
362
678
|
### render
|
|
363
679
|
|
|
364
680
|
Emits Excalidraw JSON. Each model shape is dispatched to a
|
|
@@ -366,7 +682,7 @@ dedicated `renderXxx()` function that produces one or more
|
|
|
366
682
|
Excalidraw primitive elements (rectangle, ellipse, line, arrow,
|
|
367
683
|
text). The output document is a stand-alone `.excalidraw` file
|
|
368
684
|
that any Excalidraw front-end can open. The companion module
|
|
369
|
-
`src/render/svg.mjs` converts the same JSON to SVG for the
|
|
685
|
+
`src/general/render/svg.mjs` converts the same JSON to SVG for the
|
|
370
686
|
build-time documentation pipeline.
|
|
371
687
|
|
|
372
688
|
### sequence-spacing
|
package/bin/excaliplant.mjs
CHANGED
|
@@ -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
|
|