umlimator 0.21.0 → 0.23.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/README.md +73 -14
- package/lib/umlimator-all.js +1222 -71
- package/lib/umlimator.d.ts +77 -1
- package/lib/umlimator.js +26 -18
- package/lib/umlimator.schema.json +190 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,8 +65,8 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
|
|
|
65
65
|
[what it covers](docs/conformance/uml-communication.md)). Messages are inserted, moved in time, wrapped in a frame and
|
|
66
66
|
deleted on the canvas, by pointer and by key, each gesture an `edit` event; checked by the types' rules; a sequence
|
|
67
67
|
diagram is read from and written to Mermaid's `sequenceDiagram`, and an OpenTelemetry trace becomes one
|
|
68
|
-
(`umlimator.py trace --diagram uml.sequence`).
|
|
69
|
-
|
|
68
|
+
(`umlimator.py trace --diagram uml.sequence`). A diff says "moves" for a reordered message, and `paths()` on a
|
|
69
|
+
sequence view runs in time order (0.22.0).
|
|
70
70
|
- **UML use case, activity, state machine and interaction overview diagrams** (0.21.0): actors as stick figures, use
|
|
71
71
|
cases as ellipses with their extension points, a subject as a box holding its use cases, include, extend and
|
|
72
72
|
generalization ([`examples/shopping-use-cases.json`](examples/shopping-use-cases.json),
|
|
@@ -82,6 +82,33 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
|
|
|
82
82
|
bar or an ellipse. F2 edits a transition's or a flow's label through its parts; a drop changes a node's lane or a
|
|
83
83
|
state's region. A state machine is read from and written to Mermaid's `stateDiagram`. The MCP server's read tools and
|
|
84
84
|
the diff Action are tested on all four.
|
|
85
|
+
- **UML component, deployment and composite structure diagrams** (0.22.0): components nested in components and
|
|
86
|
+
packages, ports on their borders, provided and required interfaces as a ball and socket or as a rectangle, assembly
|
|
87
|
+
and delegation connectors (a delegation runs from a box's port inward to the port of what it holds), artifacts and
|
|
88
|
+
their manifestations ([`examples/bookshop-components.json`](examples/bookshop-components.json),
|
|
89
|
+
[what it covers](docs/conformance/uml-component.md)); nodes, devices and execution environments drawn as cubes and
|
|
90
|
+
nested to any depth, artifacts deployed in them or by a «deploy» line, deployment specifications and communication
|
|
91
|
+
paths ([`examples/bookshop-deployment.json`](examples/bookshop-deployment.json),
|
|
92
|
+
[what it covers](docs/conformance/uml-deployment.md)); a class's parts and ports, each part showing its type's ports,
|
|
93
|
+
connectors through parts, open collaborations as dashed ellipses and collaboration uses with their role bindings
|
|
94
|
+
([`examples/order-service-structure.json`](examples/order-service-structure.json),
|
|
95
|
+
[what it covers](docs/conformance/uml-composite-structure.md)). A port's side is chosen from where its lines go, or
|
|
96
|
+
pinned by a drag or Alt + arrows; `B` turns an interface into a ball and back; a port or a part is added as a row of
|
|
97
|
+
its owner. The MCP server's read tools and the diff Action are tested on all three, and the Bookshop atlas opens them
|
|
98
|
+
from the map's Hosts.
|
|
99
|
+
- **UML profile and timing diagrams** (0.23.0), the last two of UML's 14: a profile's stereotypes with their tag
|
|
100
|
+
definitions, extending metaclasses (a filled triangle, `{required}`), specializing one another, and applied to a package
|
|
101
|
+
by «apply» ([`examples/bookshop-profile.json`](examples/bookshop-profile.json),
|
|
102
|
+
[what it covers](docs/conformance/uml-profile.md)). A stereotype applied anywhere in the model is checked against the
|
|
103
|
+
profiles applied to the element's packages (unknown, ambiguous, abstract, not fitting its metaclass; its tags defined,
|
|
104
|
+
of their type, present when required), whichever views the model has, and its tags are edited in the properties panel
|
|
105
|
+
on every UML view. Lifelines on one linear time ruler, each a step line through its states or a band of values, with
|
|
106
|
+
messages between them at their times and duration and time constraints in a strip under each lane
|
|
107
|
+
([`examples/bookshop-timing.json`](examples/bookshop-timing.json), [what it covers](docs/conformance/uml-timing.md)).
|
|
108
|
+
Times move by a minor tick with a drag or Alt + arrows and are typed exactly with F2 (`Waiting @ 140`); `S` turns a
|
|
109
|
+
lifeline into a value lifeline; deleting a lifeline deletes its changes and their constraints. The MCP server's read
|
|
110
|
+
tools and the diff Action are tested on both, and the Bookshop atlas, now with a view of each of UML's 14 diagram
|
|
111
|
+
kinds, opens them from the package view's profile and from the activity's "Record the payment on the order".
|
|
85
112
|
- **Export**: any view as a stand-alone SVG or PNG, in the browser or from the CLI; the whole map as one PDF to hand in
|
|
86
113
|
for a review: a cover with the contents, each view with its legend and tables of its cards, lines and boxes, then the
|
|
87
114
|
rules (`umlimator.py pdf`).
|
|
@@ -104,7 +131,7 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
|
|
|
104
131
|
npm install umlimator
|
|
105
132
|
```
|
|
106
133
|
|
|
107
|
-
Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.
|
|
134
|
+
Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.23.0"`. npm 12 refuses git
|
|
108
135
|
dependencies unless the project opts in, so that also needs `allow-git=root` in the `.npmrc` next to `package.json`.
|
|
109
136
|
|
|
110
137
|
## Embed
|
|
@@ -150,13 +177,14 @@ function MapView({ model, onSelect }) {
|
|
|
150
177
|
or costliest path, `whatIf(model, view, { remove })` what loses its way when cards go down, and
|
|
151
178
|
`sequenceFromTrace(model, spans, { view, match })` keeps a trace as a numbered view; all three in Node too.
|
|
152
179
|
- `editable: true` turns on editing gestures ([docs/editing.md](docs/editing.md); `examples/edit.html` is a working host).
|
|
153
|
-
- `import { render, apply, history } from 'umlimator/all'` draws diagram types too: a class, object, package, sequence, communication, use case, activity, state machine
|
|
180
|
+
- `import { render, apply, history } from 'umlimator/all'` draws diagram types too: a class, object, package, sequence, communication, use case, activity, state machine, interaction overview, component, deployment, composite structure, profile or timing diagram, whose gestures emit
|
|
154
181
|
`edit` transactions that `apply(model, e.commands)` turns into the next model (`examples/class-editor.html` is a
|
|
155
182
|
working host). `umlimator` alone draws maps, and a typed view as plain cards with a warning.
|
|
156
183
|
- `diff(before, after)` returns `after` with each card and line marked added, changed or removed, what changed in words,
|
|
157
|
-
and the views that show it
|
|
158
|
-
|
|
159
|
-
|
|
184
|
+
and the views that show it (on a typed diagram, a reordered member or message reads "moves");
|
|
185
|
+
`drift(model, observed)` marks the lines traffic ran on that nobody drew, and the drawn ones that carried nothing. Both
|
|
186
|
+
are models to draw, in Node too. `update()` eases into the next model (`examples/timelapse.html`); the option
|
|
187
|
+
`ease: false` draws it at once.
|
|
160
188
|
- `mountPage` is the whole standalone viewer that the CLI writes. `render()` can draw its pieces too, each on its own or
|
|
161
189
|
any mix, inside the map's element; the host keeps its own header:
|
|
162
190
|
|
|
@@ -229,8 +257,10 @@ A model file that starts with `"$schema": "<path to>/umlimator.schema.json"` (ex
|
|
|
229
257
|
gets completion and checks in editors, and `validate(model)` lists its errors and warnings, each with where it is.
|
|
230
258
|
`"schemaVersion": 2` marks a model that may hold typed elements and typed views (`docs/diagrams/model.md`). A view whose
|
|
231
259
|
`diagram` is `"uml.class"`, `"uml.object"`, `"uml.package"`, `"uml.sequence"`, `"uml.communication"`, `"uml.use-case"`,
|
|
232
|
-
`"uml.activity"`, `"uml.state-machine"
|
|
233
|
-
|
|
260
|
+
`"uml.activity"`, `"uml.state-machine"`, `"uml.interaction-overview"`, `"uml.component"`, `"uml.deployment"`,
|
|
261
|
+
`"uml.composite-structure"`, `"uml.profile"` or `"uml.timing"` is a UML class, object, package, sequence, communication,
|
|
262
|
+
use case, activity, state machine, interaction overview, component, deployment, composite structure, profile or timing
|
|
263
|
+
diagram, drawn by `umlimator/all` and the CLI; a type not drawn yet shows its
|
|
234
264
|
nodes as plain cards, with a warning. A model with no `schemaVersion` is a map, as always, and a version newer than the
|
|
235
265
|
module reads is an error.
|
|
236
266
|
|
|
@@ -313,6 +343,35 @@ type's note in [`docs/conformance/`](docs/conformance/)), from 0.21.0:
|
|
|
313
343
|
| edge, member | `props` | an extend's `extensionPoints` (ids) and `condition`; a flow's `guard` (its `label` is its name); a transition's or internal transition's `trigger`, `guard` and `effect`, drawn `trigger [guard] / effect` |
|
|
314
344
|
| view | `diagram` | `"uml.use-case"`, `"uml.activity"`, `"uml.state-machine"` or `"uml.interaction-overview"` |
|
|
315
345
|
|
|
346
|
+
A component diagram, a deployment diagram and a composite structure diagram (`examples/bookshop-components.json`,
|
|
347
|
+
`bookshop-deployment.json` and `order-service-structure.json`; each type's note in
|
|
348
|
+
[`docs/conformance/`](docs/conformance/)), from 0.22.0:
|
|
349
|
+
|
|
350
|
+
| On | Field | What it does |
|
|
351
|
+
|---|---|---|
|
|
352
|
+
| node, member, edge | `type` | component: `uml.Component` (members `uml.Port`), `uml.Interface`, `uml.Artifact`, `uml.Package`; lines `uml.InterfaceRealization`, `uml.Usage`, `uml.ComponentRealization`, `uml.Connector`, `uml.Dependency`, `uml.Manifestation` |
|
|
353
|
+
| node, edge | `type` | deployment: `uml.Node`, `uml.Device`, `uml.ExecutionEnvironment`, `uml.Artifact`, `uml.DeploymentSpecification`, `uml.Component`; lines `uml.Deployment`, `uml.Manifestation`, `uml.CommunicationPath`, `uml.Dependency` |
|
|
354
|
+
| node, member, edge | `type` | composite structure: the subject (`uml.Class`, `uml.Component` or `uml.Collaboration`) with its parts (`uml.Property`) and ports (`uml.Port`), `uml.Collaboration` (its roles `uml.Property`), `uml.CollaborationUse`; lines `uml.Connector`, `uml.RoleBinding` (its `label` the role) |
|
|
355
|
+
| node | `parent` | a component's component or package; an artifact's target (deployed by nesting); a target's target (any depth); a collaboration use's subject |
|
|
356
|
+
| node, member | `props` | a port's `valueType`; a part's `valueType` (the class or component whose ports it shows, by label), `multiplicity` and `aggregation` (`shared` is dashed); a collaboration use's `collaboration` |
|
|
357
|
+
| edge | `props` | a connector's `kind` (`assembly`, `delegation`); an end through a part, `ends.from.part` or `ends.to.part` (UML's `partWithPort`) |
|
|
358
|
+
| view | `subject` | a composite structure view's class, component or collaboration, listed in `nodeIds` |
|
|
359
|
+
| view | `present` | an interface drawn as a ball (`{ "as": "ball" }`); a port's side (`{ "side": "left" }`); on a part, `{ "ports": { "<port>": { "side": "top" } } }` |
|
|
360
|
+
| view | `diagram` | `"uml.component"`, `"uml.deployment"` or `"uml.composite-structure"` |
|
|
361
|
+
|
|
362
|
+
A profile diagram and a timing diagram (`examples/bookshop-profile.json` and `bookshop-timing.json`; each type's note in
|
|
363
|
+
[`docs/conformance/`](docs/conformance/)), from 0.23.0:
|
|
364
|
+
|
|
365
|
+
| On | Field | What it does |
|
|
366
|
+
|---|---|---|
|
|
367
|
+
| node, member, edge | `type` | profile: `uml.Profile`, `uml.Stereotype` (members `uml.Property`, its tag definitions), `uml.MetaclassReference` (its `label` a UML metaclass: `Class`, `Property`, `Classifier`, …), `uml.Enumeration` (a tag's type); lines `uml.Extension`, `uml.ProfileApplication` (from a package), `uml.Generalization` |
|
|
368
|
+
| node | `parent` | a stereotype's or metaclass reference's profile; an enumeration's may be one |
|
|
369
|
+
| node, member, edge | `props` | on any UML element, `stereotypes` (a name, or `Profile::name` where two applied profiles share it) and `tags`, by stereotype then tag, each value as text: `{ "column": { "name": "placed_at" } }`; a stereotype's `isAbstract`; an extension's `isRequired` (the tool applies the stereotype to every element of that metaclass where the profile is applied) |
|
|
370
|
+
| node, edge | `type` | timing: `uml.Lifeline` (`props.states`, top to bottom); `uml.Message` inline in the view's `edges`, with `props.sentAt` and `props.receivedAt` (numbers) and `sort` `call`, `async` or `reply` |
|
|
371
|
+
| view | `timeline` | `unit` (optional); `changes`, `[{ id, lifeline, at, state }]` in any order (drawn by `at`); `constraints`, `[{ id, type: "uml.DurationConstraint" \| "uml.TimeConstraint", from, to, label }]`, whose ends are changes |
|
|
372
|
+
| view | `present` | a lifeline drawn as a value lifeline (`{ "as": "values" }`) |
|
|
373
|
+
| view | `diagram` | `"uml.profile"` or `"uml.timing"` |
|
|
374
|
+
|
|
316
375
|
## Command line
|
|
317
376
|
|
|
318
377
|
```bash
|
|
@@ -382,9 +441,9 @@ ffmpeg -f apng -i ride.png -vf "split[a][b];[a]palettegen[p];[b][p]paletteuse" r
|
|
|
382
441
|
ffmpeg -f apng -i ride.png -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p ride.mp4
|
|
383
442
|
```
|
|
384
443
|
|
|
385
|
-
On pull requests, the diff Action posts what they change in your maps
|
|
386
|
-
the pictures as the run's artifact. The comment names the commit it describes, only
|
|
387
|
-
latest commit writes it, and it says so when the diff fails.
|
|
444
|
+
On pull requests, the diff Action posts what they change in your maps and UML diagrams (every type above): one comment
|
|
445
|
+
with the summary and a sketch, and the pictures as the run's artifact. The comment names the commit it describes, only
|
|
446
|
+
the run for the pull request's latest commit writes it, and it says so when the diff fails.
|
|
388
447
|
|
|
389
448
|
```yaml
|
|
390
449
|
on: pull_request
|
|
@@ -395,7 +454,7 @@ jobs:
|
|
|
395
454
|
runs-on: ubuntu-latest
|
|
396
455
|
steps:
|
|
397
456
|
- uses: actions/checkout@v4
|
|
398
|
-
- uses: zintaen/umlimator@v0.
|
|
457
|
+
- uses: zintaen/umlimator@v0.23.0
|
|
399
458
|
with:
|
|
400
459
|
models: "docs/*.json" # optional: where the models are (default: every .json that is a map model)
|
|
401
460
|
```
|
|
@@ -413,7 +472,7 @@ claude mcp add umlimator -- python3 /path/to/umlimator.py mcp /path/to/model.jso
|
|
|
413
472
|
|---|---|
|
|
414
473
|
| `list_views()` | the views (id, title, parent, number of cards) and the stories |
|
|
415
474
|
| `describe_view(view)` | the view in sentences (`describe()`), then each card's id |
|
|
416
|
-
| `paths(view, from, to)` | every card and line on a path from one card to another (`paths()
|
|
475
|
+
| `paths(view, from, to)` | every card and line on a path from one card to another (`paths()`; on a sequence view, in time order), as Refs for `highlight` |
|
|
417
476
|
| `reach(view, card, backward?, depth?)` | what a card leads to, or what leads to it, with the distance of each (`reach()`) |
|
|
418
477
|
| `broken_rules()`, `validate()` | each break of the model's `rules` (`rules()`), and its own problems (`validate()`) |
|
|
419
478
|
| `diff(other_model_path)` | what changed from another model file to this one, in words, and the views that show it (`diff()`) |
|