umlimator 0.22.0 → 0.24.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 CHANGED
@@ -96,6 +96,35 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
96
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
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
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".
112
+ - **ER, flowchart, data flow, information flow and C4** (0.24.0): tables with their key columns first, related in crow's
113
+ foot or IDEF1X, one geometry for both, each column a row `name type [PK] [FK table.column] [UK] [NULL]`
114
+ ([`examples/bookshop-schema.json`](examples/bookshop-schema.json), [what it covers](docs/conformance/er.md)); ten
115
+ flowchart symbols, laid out down, decisions with labelled exits
116
+ ([`examples/returns-flowchart.json`](examples/returns-flowchart.json), [what it covers](docs/conformance/flowchart.md));
117
+ data flow levels in Yourdon or Gane and Sarson, made by `D` and checked for balance
118
+ ([`examples/bookshop-data-flow.json`](examples/bookshop-data-flow.json), [what it covers](docs/conformance/dfd.md));
119
+ UML information flows, dashed «flow» lines saying what they convey
120
+ ([`examples/order-information-flow.json`](examples/order-information-flow.json),
121
+ [what it covers](docs/conformance/uml-information-flow.md)); and typed C4 in six views (landscape, context, container,
122
+ component, dynamic, deployment) on the map's card shapes, each view checking what it may show, its subject a dashed
123
+ boundary, relationships whose ends a view hides drawn as implied lines, `D` making the next level
124
+ ([`examples/bookshop-c4.json`](examples/bookshop-c4.json), [what it covers](docs/conformance/c4.md)). `import` reads a
125
+ Mermaid `erDiagram`, a Mermaid flowchart with `--typed`, a Structurizr JSON workspace and a `.dbml` file (with
126
+ `@dbml/core` installed by you) into them. The Bookshop atlas starts at the C4 context, whose elements open the schema,
127
+ the data flow, the information flow, the returns flowchart and the UML views.
99
128
  - **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
100
129
  for a review: a cover with the contents, each view with its legend and tables of its cards, lines and boxes, then the
101
130
  rules (`umlimator.py pdf`).
@@ -118,7 +147,7 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
118
147
  npm install umlimator
119
148
  ```
120
149
 
121
- Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.22.0"`. npm 12 refuses git
150
+ Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.24.0"`. npm 12 refuses git
122
151
  dependencies unless the project opts in, so that also needs `allow-git=root` in the `.npmrc` next to `package.json`.
123
152
 
124
153
  ## Embed
@@ -164,7 +193,7 @@ function MapView({ model, onSelect }) {
164
193
  or costliest path, `whatIf(model, view, { remove })` what loses its way when cards go down, and
165
194
  `sequenceFromTrace(model, spans, { view, match })` keeps a trace as a numbered view; all three in Node too.
166
195
  - `editable: true` turns on editing gestures ([docs/editing.md](docs/editing.md); `examples/edit.html` is a working host).
167
- - `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 or composite structure diagram, whose gestures emit
196
+ - `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, timing, information flow, entity-relationship, flowchart, data flow or C4 diagram, whose gestures emit
168
197
  `edit` transactions that `apply(model, e.commands)` turns into the next model (`examples/class-editor.html` is a
169
198
  working host). `umlimator` alone draws maps, and a typed view as plain cards with a warning.
170
199
  - `diff(before, after)` returns `after` with each card and line marked added, changed or removed, what changed in words,
@@ -244,9 +273,12 @@ A model file that starts with `"$schema": "<path to>/umlimator.schema.json"` (ex
244
273
  gets completion and checks in editors, and `validate(model)` lists its errors and warnings, each with where it is.
245
274
  `"schemaVersion": 2` marks a model that may hold typed elements and typed views (`docs/diagrams/model.md`). A view whose
246
275
  `diagram` is `"uml.class"`, `"uml.object"`, `"uml.package"`, `"uml.sequence"`, `"uml.communication"`, `"uml.use-case"`,
247
- `"uml.activity"`, `"uml.state-machine"`, `"uml.interaction-overview"`, `"uml.component"`, `"uml.deployment"` or
248
- `"uml.composite-structure"` is a UML class, object, package, sequence, communication, use case, activity, state machine,
249
- interaction overview, component, deployment or composite structure diagram, drawn by `umlimator/all` and the CLI; a type not drawn yet shows its
276
+ `"uml.activity"`, `"uml.state-machine"`, `"uml.interaction-overview"`, `"uml.component"`, `"uml.deployment"`,
277
+ `"uml.composite-structure"`, `"uml.profile"`, `"uml.timing"` or `"uml.information-flow"` is a UML class, object, package,
278
+ sequence, communication, use case, activity, state machine, interaction overview, component, deployment, composite
279
+ structure, profile, timing or information flow diagram; `"er"`, `"flowchart"` and `"dfd"` an entity-relationship
280
+ diagram, a flowchart and a data flow diagram; `"c4.landscape"`, `"c4.context"`, `"c4.container"`, `"c4.component"`,
281
+ `"c4.dynamic"` and `"c4.deployment"` C4's six views; each drawn by `umlimator/all` and the CLI; a type not drawn yet shows its
250
282
  nodes as plain cards, with a warning. A model with no `schemaVersion` is a map, as always, and a version newer than the
251
283
  module reads is an error.
252
284
 
@@ -345,6 +377,35 @@ A component diagram, a deployment diagram and a composite structure diagram (`ex
345
377
  | view | `present` | an interface drawn as a ball (`{ "as": "ball" }`); a port's side (`{ "side": "left" }`); on a part, `{ "ports": { "<port>": { "side": "top" } } }` |
346
378
  | view | `diagram` | `"uml.component"`, `"uml.deployment"` or `"uml.composite-structure"` |
347
379
 
380
+ A profile diagram and a timing diagram (`examples/bookshop-profile.json` and `bookshop-timing.json`; each type's note in
381
+ [`docs/conformance/`](docs/conformance/)), from 0.23.0:
382
+
383
+ | On | Field | What it does |
384
+ |---|---|---|
385
+ | 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` |
386
+ | node | `parent` | a stereotype's or metaclass reference's profile; an enumeration's may be one |
387
+ | 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) |
388
+ | 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` |
389
+ | 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 |
390
+ | view | `present` | a lifeline drawn as a value lifeline (`{ "as": "values" }`) |
391
+ | view | `diagram` | `"uml.profile"` or `"uml.timing"` |
392
+
393
+ Milestone 2's five types (`examples/bookshop-schema.json`, `returns-flowchart.json`, `bookshop-data-flow.json`,
394
+ `order-information-flow.json` and `bookshop-c4.json`; each type's note in [`docs/conformance/`](docs/conformance/)), from
395
+ 0.24.0:
396
+
397
+ | On | Field | What it does |
398
+ |---|---|---|
399
+ | node, member, edge | `type` | ER: `er.Entity` (members `er.Column`), lines `er.Relationship` from the referenced entity to the referring one. Flowchart: `flow.Terminator`, `flow.Process`, `flow.Decision`, `flow.InputOutput`, `flow.PredefinedProcess`, `flow.Document`, `flow.Database`, `flow.ManualInput`, `flow.Delay`, `flow.Connector`; lines `flow.Flow`. Data flow: `dfd.Process`, `dfd.DataStore`, `dfd.ExternalEntity`; lines `dfd.DataFlow`. Information flow: `uml.InformationItem` and the classes, interfaces, components and actors it travels between; lines `uml.InformationFlow`. C4: `c4.Person`, `c4.SoftwareSystem`, `c4.Container`, `c4.Component`, `c4.DeploymentNode`, `c4.ContainerInstance`; lines `c4.Relationship` (its `label` the description) |
400
+ | member | `props` | a column's `dataType`, `primaryKey`, `foreignKey`, `references` (a column id), `nullable`, `unique` |
401
+ | node, edge | `props` | a relationship's `identifying` and `ends.from` and `ends.to`'s `multiplicity`; a process's or store's `number`; a flow's `conveyed` (ids); a C4 element's `description`, `technology`, `external`, `shape` (a map card shape), an instance's `container`; a C4 relationship's `technology` |
402
+ | node | `parent` | a container's software system, a component's container, a deployment node's node, an instance's node |
403
+ | node | `opensView` | a process's level: a `dfd` view whose `parent` is the view the process is on |
404
+ | view | `notation` | `"crowsfoot"` (default) or `"idef1x"` for `er`, `"yourdon"` (default) or `"gane-sarson"` for `dfd`: a repaint |
405
+ | view | `subject` | a C4 view's system or container, drawn as a boundary when `nodeIds` lists it |
406
+ | view | `edges` | a C4 dynamic view's steps: relationship ids, each once, in time order |
407
+ | view | `diagram` | `"er"`, `"flowchart"`, `"dfd"`, `"uml.information-flow"`, `"c4.landscape"`, `"c4.context"`, `"c4.container"`, `"c4.component"`, `"c4.dynamic"`, `"c4.deployment"` |
408
+
348
409
  ## Command line
349
410
 
350
411
  ```bash
@@ -362,6 +423,10 @@ python3 umlimator.py import workspace.dsl --out model.json # a diagra
362
423
  python3 umlimator.py import classes.mmd --out classes.json # a Mermaid classDiagram, as a UML class diagram (needs Node)
363
424
  python3 umlimator.py import checkout.mmd --out checkout.json # a Mermaid sequenceDiagram, as a UML sequence diagram (needs Node)
364
425
  python3 umlimator.py import order.mmd --out order.json # a Mermaid stateDiagram, as a UML state machine diagram (needs Node)
426
+ python3 umlimator.py import schema.mmd --out schema.json # a Mermaid erDiagram, as an ER diagram (needs Node)
427
+ python3 umlimator.py import returns.mmd --typed --out returns.json # a Mermaid flowchart as a flowchart (without --typed, a map)
428
+ python3 umlimator.py import workspace.json --out c4.json # a Structurizr JSON workspace, as typed C4 views (needs Node)
429
+ python3 umlimator.py import schema.dbml --out schema.json # DBML, as an ER diagram (needs Node and @dbml/core, installed by you)
365
430
  python3 umlimator.py render examples/sales-classes.json --out classes.html # a class diagram's page; stills, check and pdf take it too
366
431
  docker compose config --format json > compose.json && python3 umlimator.py import compose.json --out model.json
367
432
  kubectl get deploy,sts,svc,ing -A -o json > cluster.json && python3 umlimator.py import cluster.json --out model.json
@@ -427,7 +492,7 @@ jobs:
427
492
  runs-on: ubuntu-latest
428
493
  steps:
429
494
  - uses: actions/checkout@v4
430
- - uses: zintaen/umlimator@v0.22.0
495
+ - uses: zintaen/umlimator@v0.24.0
431
496
  with:
432
497
  models: "docs/*.json" # optional: where the models are (default: every .json that is a map model)
433
498
  ```