umlimator 0.18.0 → 0.19.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
@@ -49,7 +49,15 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
49
49
  itself, pinned where you pin it. Edited on the canvas (members as one line of UML text, a palette, a relationship
50
50
  picker), each gesture an `edit` event the host applies with `apply()`; checked by the class diagram's rules; read from
51
51
  and written to Mermaid's `classDiagram` ([`examples/sales-classes.json`](examples/sales-classes.json),
52
- [what it covers](docs/conformance/uml-class.md)).
52
+ [what it covers](docs/conformance/uml-class.md)). From 0.19.0 a package owning classes the view shows is a box holding
53
+ them, and names are qualified (`sales::Order`).
54
+ - **UML object and package diagrams** (0.19.0): instances with their slots (`order1042 : Order`, underlined;
55
+ `status = placed`) and links with names and roles ([`examples/order-objects.json`](examples/order-objects.json),
56
+ [what it covers](docs/conformance/uml-object.md)); packages as boxes holding what they own, at any depth, or as
57
+ closed folders, with «import», «access», «merge» and dependencies between them
58
+ ([`examples/bookshop-packages.json`](examples/bookshop-packages.json), [what it covers](docs/conformance/uml-package.md)).
59
+ Ownership is edited by dropping an element into a box, or with the Owner field; both are checked by their types'
60
+ rules, and the PDF's tables list slots and element kinds.
53
61
  - **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
54
62
  for a review: a cover with the contents, each view with its legend and tables of its cards, lines and boxes, then the
55
63
  rules (`umlimator.py pdf`).
@@ -72,7 +80,7 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
72
80
  npm install umlimator
73
81
  ```
74
82
 
75
- Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.18.0"`. npm 12 refuses git
83
+ Or from GitHub, at a tag or any commit: `"umlimator": "github:zintaen/umlimator#v0.19.0"`. npm 12 refuses git
76
84
  dependencies unless the project opts in, so that also needs `allow-git=root` in the `.npmrc` next to `package.json`.
77
85
 
78
86
  ## Embed
@@ -121,7 +129,7 @@ function MapView({ model, onSelect }) {
121
129
  `map.shapes` reads the notation shown and sets another (`null`: each view's own again); the cards are drawn again from
122
130
  the geometry they have, with the camera, selection and marks kept, and nothing is laid out.
123
131
  - `editable: true` turns on editing gestures ([docs/editing.md](docs/editing.md); `examples/edit.html` is a working host).
124
- - `import { render, apply, history } from 'umlimator/all'` draws diagram types too: a class diagram, whose gestures emit
132
+ - `import { render, apply, history } from 'umlimator/all'` draws diagram types too: a class, object or package diagram, whose gestures emit
125
133
  `edit` transactions that `apply(model, e.commands)` turns into the next model (`examples/class-editor.html` is a
126
134
  working host). `umlimator` alone draws maps, and a typed view as plain cards with a warning.
127
135
  - `diff(before, after)` returns `after` with each card and line marked added, changed or removed, what changed in words,
@@ -200,7 +208,8 @@ path. The full schema is `engine/references/schema.md` (§ Map model); `examples
200
208
  A model file that starts with `"$schema": "<path to>/umlimator.schema.json"` (exported as `umlimator/schema.json`)
201
209
  gets completion and checks in editors, and `validate(model)` lists its errors and warnings, each with where it is.
202
210
  `"schemaVersion": 2` marks a model that may hold typed elements and typed views (`docs/diagrams/model.md`). A view whose
203
- `diagram` is `"uml.class"` is a UML class diagram, drawn by `umlimator/all` and the CLI; a type not drawn yet shows its
211
+ `diagram` is `"uml.class"`, `"uml.object"` or `"uml.package"` is a UML class, object or package diagram, drawn by
212
+ `umlimator/all` and the CLI; a type not drawn yet shows its
204
213
  nodes as plain cards, with a warning. A model with no `schemaVersion` is a map, as always, and a version newer than the
205
214
  module reads is an error.
206
215
 
@@ -238,15 +247,20 @@ kinds such as `public`, `lane`, `script`, `hook` and `board` work too). Fields b
238
247
  | model | `lenses` | ways to look at the map: what `pick` picks (by id, kind, box, owner or `line` kind) lit, the rest dimmed; `color: "owner"` rings cards by owner |
239
248
 
240
249
  In a version-2 model, a class diagram (`examples/sales-classes.json`; every field in
241
- [`docs/conformance/uml-class.md`](docs/conformance/uml-class.md)):
250
+ [`docs/conformance/uml-class.md`](docs/conformance/uml-class.md)), an object diagram (`examples/order-objects.json`,
251
+ [`uml-object.md`](docs/conformance/uml-object.md)) and a package diagram (`examples/bookshop-packages.json`,
252
+ [`uml-package.md`](docs/conformance/uml-package.md)):
242
253
 
243
254
  | On | Field | What it does |
244
255
  |---|---|---|
245
256
  | node, member, edge | `type` | what it is: `uml.Class`, `uml.Interface`, `uml.Enumeration`, `uml.DataType`, `uml.PrimitiveType`, `uml.Package`, `uml.Comment`; members `uml.Property`, `uml.Operation`, `uml.EnumerationLiteral`; lines `uml.Association`, `uml.Generalization`, `uml.InterfaceRealization`, `uml.Dependency`, `uml.CommentLink` |
246
257
  | node | `members` | its attributes, operations or literals, in order, each `{ id, type, label, props }` |
247
- | node | `parent` | the package that owns it |
258
+ | node, member, edge | `type`, from 0.19.0 | an object diagram's `uml.InstanceSpecification`, its members `uml.Slot`, lines `uml.Link`; a package diagram's `uml.Package` and the classifiers above, lines `uml.PackageImport`, `uml.PackageMerge`, `uml.Dependency` |
259
+ | node | `parent` | the package that owns it: from 0.19.0 drawn as a box holding it when the view shows both |
260
+ | node, member, edge | `props`, from 0.19.0 | an instance's `classifier` (a name, as text); a slot's `value`; a link's `association` and its ends' `role`; a package import's `visibility`, `public` («import») or `private` («access») |
248
261
  | node, member, edge | `props` | the type's own fields: `isAbstract`, `stereotypes`; a member's `visibility`, `valueType`, `multiplicity`, `default`, `isStatic`, `isDerived`, `parameters`, `returnType`; an association's `ends.from` and `ends.to` (`role`, `multiplicity`, `aggregation`, `navigable`) |
249
- | view | `diagram` | `"uml.class"`: the view is a class diagram |
262
+ | view | `diagram` | `"uml.class"`, `"uml.object"` or `"uml.package"`: the view is a class, object or package diagram |
263
+ | view | `subject` | the package the view shows the inside of: names are qualified from it |
250
264
  | view | `direction` | `"down"` lays it out top to bottom, the general class above (default `"right"`) |
251
265
  | view | `present` | per element: `collapsed` compartments, and at most `rows` rows each, then "+k more" |
252
266
 
@@ -328,7 +342,7 @@ jobs:
328
342
  runs-on: ubuntu-latest
329
343
  steps:
330
344
  - uses: actions/checkout@v4
331
- - uses: zintaen/umlimator@v0.18.0
345
+ - uses: zintaen/umlimator@v0.19.0
332
346
  with:
333
347
  models: "docs/*.json" # optional: where the models are (default: every .json that is a map model)
334
348
  ```
@@ -426,7 +440,7 @@ action.yml the diff Action: what a pull request changes in its
426
440
  src/ the module's sources, by layer: core, draw, layout, map, canvas, page (tools/build.mjs joins them)
427
441
  lib/ the module (umlimator.js; umlimator-all.js with every diagram family; both built and committed), its types, the default theme, <umlimator-map> and the docs plugins
428
442
  engine/ the page templates the CLI inlines the module into; the upstream renderer and schema
429
- docs/ the module's API and the editing design; docs/diagrams/: the plan for 28 diagram types (not built yet)
443
+ docs/ the module's API and the editing design; docs/conformance/: what each diagram type covers; docs/diagrams/: the plan for 28 diagram types
430
444
  tests/, bench/ tests, benchmark models and results
431
445
  icons/ line icons and the logo manifest (sources and hashes only)
432
446
  examples/ made-up systems: models, host pages and a Node script (live: zintaen.github.io/umlimator)