umlimator 0.22.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 +33 -6
- package/lib/umlimator-all.js +47 -8
- package/lib/umlimator.d.ts +40 -1
- package/lib/umlimator.schema.json +132 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,6 +96,19 @@ 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".
|
|
99
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
|
|
100
113
|
for a review: a cover with the contents, each view with its legend and tables of its cards, lines and boxes, then the
|
|
101
114
|
rules (`umlimator.py pdf`).
|
|
@@ -118,7 +131,7 @@ drill-down, a data pipeline, an AI agent's skills, and host pages for embedding,
|
|
|
118
131
|
npm install umlimator
|
|
119
132
|
```
|
|
120
133
|
|
|
121
|
-
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
|
|
122
135
|
dependencies unless the project opts in, so that also needs `allow-git=root` in the `.npmrc` next to `package.json`.
|
|
123
136
|
|
|
124
137
|
## Embed
|
|
@@ -164,7 +177,7 @@ function MapView({ model, onSelect }) {
|
|
|
164
177
|
or costliest path, `whatIf(model, view, { remove })` what loses its way when cards go down, and
|
|
165
178
|
`sequenceFromTrace(model, spans, { view, match })` keeps a trace as a numbered view; all three in Node too.
|
|
166
179
|
- `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
|
|
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
|
|
168
181
|
`edit` transactions that `apply(model, e.commands)` turns into the next model (`examples/class-editor.html` is a
|
|
169
182
|
working host). `umlimator` alone draws maps, and a typed view as plain cards with a warning.
|
|
170
183
|
- `diff(before, after)` returns `after` with each card and line marked added, changed or removed, what changed in words,
|
|
@@ -244,9 +257,10 @@ A model file that starts with `"$schema": "<path to>/umlimator.schema.json"` (ex
|
|
|
244
257
|
gets completion and checks in editors, and `validate(model)` lists its errors and warnings, each with where it is.
|
|
245
258
|
`"schemaVersion": 2` marks a model that may hold typed elements and typed views (`docs/diagrams/model.md`). A view whose
|
|
246
259
|
`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"
|
|
248
|
-
`"uml.composite-structure"` is a UML class, object, package, sequence, communication,
|
|
249
|
-
interaction overview, component, deployment
|
|
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
|
|
250
264
|
nodes as plain cards, with a warning. A model with no `schemaVersion` is a map, as always, and a version newer than the
|
|
251
265
|
module reads is an error.
|
|
252
266
|
|
|
@@ -345,6 +359,19 @@ A component diagram, a deployment diagram and a composite structure diagram (`ex
|
|
|
345
359
|
| view | `present` | an interface drawn as a ball (`{ "as": "ball" }`); a port's side (`{ "side": "left" }`); on a part, `{ "ports": { "<port>": { "side": "top" } } }` |
|
|
346
360
|
| view | `diagram` | `"uml.component"`, `"uml.deployment"` or `"uml.composite-structure"` |
|
|
347
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
|
+
|
|
348
375
|
## Command line
|
|
349
376
|
|
|
350
377
|
```bash
|
|
@@ -427,7 +454,7 @@ jobs:
|
|
|
427
454
|
runs-on: ubuntu-latest
|
|
428
455
|
steps:
|
|
429
456
|
- uses: actions/checkout@v4
|
|
430
|
-
- uses: zintaen/umlimator@v0.
|
|
457
|
+
- uses: zintaen/umlimator@v0.23.0
|
|
431
458
|
with:
|
|
432
459
|
models: "docs/*.json" # optional: where the models are (default: every .json that is a map model)
|
|
433
460
|
```
|
package/lib/umlimator-all.js
CHANGED
|
@@ -8755,7 +8755,7 @@ function commAdd(model, view, entry, label, at) {
|
|
|
8755
8755
|
/* remove(model, view, ids, fromModel): Delete hides from this view, Shift + Delete deletes from the model. A connector takes
|
|
8756
8756
|
the messages it carries with it, deleted from every communication view that has no other connector for them; a hidden
|
|
8757
8757
|
call takes its replies in this view (a deleted one does by refs). A lifeline takes its connectors and messages (apply()
|
|
8758
|
-
does). { error } when what is left breaks a rule */
|
|
8758
|
+
does), said on the hint line ({ commands, say }). { error } when what is left breaks a rule */
|
|
8759
8759
|
function commRemove(model, view, ids, fromModel) {
|
|
8760
8760
|
if (!CM_OBJ(view)) return null;
|
|
8761
8761
|
const I = commIndex(model, view), out = [], seen = new Set(), idOf = x => (typeof x === 'string' ? x : CM_OBJ(x) ? x.id : null);
|
|
@@ -8767,7 +8767,19 @@ function commRemove(model, view, ids, fromModel) {
|
|
|
8767
8767
|
on.forEach(m => { if (v === view && !fromModel || !left.carrierOf(m.from, m.to)) go(m.id); }); });
|
|
8768
8768
|
if (!fromModel) I.messages.filter(m => cmPropsOf(m).replyTo === id).forEach(m => go(m.id)); };
|
|
8769
8769
|
CM_ARR(ids).forEach(id => { if (I.shown.has(id) || I.E.has(id)) go(id); });
|
|
8770
|
-
return fromModel ? cmGuard(model, view, out, true) : out;
|
|
8770
|
+
return cmSaid(model, view, ids, fromModel, I, fromModel ? cmGuard(model, view, out, true) : out);
|
|
8771
|
+
}
|
|
8772
|
+
// the messages a connector or a lifeline took (its own, or by apply()'s cascade), said on the hint line: { commands, say }
|
|
8773
|
+
function cmSaid(model, view, ids, fromModel, I, r) {
|
|
8774
|
+
const what = CM_ARR(ids).filter(id => I.shown.has(id) || I.E.has(id) && I.E.get(id).type === 'uml.Connector');
|
|
8775
|
+
if (!Array.isArray(r) || !what.length) return r;
|
|
8776
|
+
let next; try { next = apply(model, r); } catch { return r; }
|
|
8777
|
+
const left = new Set(fromModel ? CM_ARR(next.edges).filter(CM_OBJ).map(e => e.id) : commIndex(next, CM_ARR(next.views).find(v => CM_OBJ(v) && v.id === view.id)).messages.map(m => m.id));
|
|
8778
|
+
const msgs = fromModel ? CM_ARR(model.edges).filter(e => CM_OBJ(e) && e.type === 'uml.Message') : I.messages;
|
|
8779
|
+
const took = msgs.filter(m => !left.has(m.id) && !CM_ARR(ids).includes(m.id)); if (!took.length) return r;
|
|
8780
|
+
const q = x => JSON.stringify(cmNameOf(x)), nm = id => cmNameOf(I.N.get(id) || { id });
|
|
8781
|
+
const who = what.map(id => (I.shown.has(id) ? 'lifeline ' + q(I.N.get(id)) : `connector ${JSON.stringify(nm(I.E.get(id).from) + '–' + nm(I.E.get(id).to))}`)).join(', ');
|
|
8782
|
+
return { commands: r, say: `${fromModel ? 'Deleted' : 'Hid'} ${who} and ${what.length === 1 ? 'its' : 'their'} ${cmPlural(took.length, 'message')}: ${took.map(q).join(', ')}` };
|
|
8771
8783
|
}
|
|
8772
8784
|
|
|
8773
8785
|
/* ---- the type ---- */
|
|
@@ -9916,6 +9928,18 @@ function ucConnect(model, view, from, to, at, line) {
|
|
|
9916
9928
|
return [{ op: 'add', element: { id: 'association' + k, type: 'uml.Association', from: to, to: from }, view: view.id }];
|
|
9917
9929
|
}
|
|
9918
9930
|
|
|
9931
|
+
/* remove: Shift + Delete on extension points (the member list's ✕) takes every extend left naming none of its use case's
|
|
9932
|
+
(extend-points), in the same transaction, said on the hint line; an extend naming another point keeps it. Else the default */
|
|
9933
|
+
function ucRemove(model, view, ids, fromModel) {
|
|
9934
|
+
const gone = new Set(UC_ARR(ids)), ext = fromModel ? UC_ARR(model && model.edges).filter(e => UC_OBJ(e) && e.type === 'uml.Extend' && ![e.id, e.from, e.to].some(x => gone.has(x))
|
|
9935
|
+
&& UC_ARR(UC_PROPS(e).extensionPoints).length && UC_ARR(UC_PROPS(e).extensionPoints).every(p => gone.has(p))) : [];
|
|
9936
|
+
if (!ext.length) return null;
|
|
9937
|
+
const N = UC_ARR(model.nodes).filter(UC_OBJ), pt = id => N.flatMap(n => UC_ARR(n.members)).find(p => UC_OBJ(p) && p.id === id);
|
|
9938
|
+
const nm = id => (pt(id) ? 'extension point ' : '') + JSON.stringify(ucName(pt(id) || N.find(n => n.id === id) || { id }));
|
|
9939
|
+
return { commands: [...gone, ...ext.map(e => e.id)].map(id => ({ op: 'delete', id })),
|
|
9940
|
+
say: `Deleted ${[...gone].map(nm).join(', ')} and ${ext.length > 1 ? 'the extends' : 'the extend'} from ${[...new Set(ext.map(e => nm(e.from)))].join(', ')}, which named no other extension point` };
|
|
9941
|
+
}
|
|
9942
|
+
|
|
9919
9943
|
const UC_STEREO = { key: 'stereotypes', label: 'Stereotypes', kind: 'list' };
|
|
9920
9944
|
const UC_TYPE = registerDiagramType('uml.use-case', {
|
|
9921
9945
|
title: 'use case diagram',
|
|
@@ -9935,7 +9959,7 @@ const UC_TYPE = registerDiagramType('uml.use-case', {
|
|
|
9935
9959
|
validate: ucProblems,
|
|
9936
9960
|
rules: UC_RULES,
|
|
9937
9961
|
describe: ucDescribe,
|
|
9938
|
-
edits: { connect: ucConnect },
|
|
9962
|
+
edits: { connect: ucConnect, remove: ucRemove },
|
|
9939
9963
|
});
|
|
9940
9964
|
/* ---------- the activity diagram, uml.activity (work package 4.5, notes/stage-4.md §9) ----------
|
|
9941
9965
|
Control nodes, actions and flows from src/uml/flow.js; the send and accept signals, the object node, the data store and
|
|
@@ -12459,12 +12483,12 @@ function csGeo({ model, view, pos: pins, memo }) {
|
|
|
12459
12483
|
|
|
12460
12484
|
/* ---- validators (§10.2). Each problem: { level, rule, path, message, ids }; the shared port-owner and manifest-ends too ---- */
|
|
12461
12485
|
const CS_RULES = {
|
|
12462
|
-
'subject-shown': 'the view\'s subject is a class, a component or a collaboration listed in nodeIds',
|
|
12486
|
+
'subject-shown': 'the view\'s subject is a class, a component or a collaboration listed in nodeIds (a view with none: a warning)',
|
|
12463
12487
|
'part-type': 'a part\'s valueType names exactly one class or component of the model by label',
|
|
12464
12488
|
'connector-part': 'an end\'s part is a part of the subject, and the end is a port of that part\'s type',
|
|
12465
12489
|
'connector-scope': 'a connector\'s ends lie in one structure: the subject\'s ports and parts; or one collaboration\'s roles',
|
|
12466
12490
|
'connector-drawn': 'a connector between two ports of the subject is not drawn: the box has no line to itself',
|
|
12467
|
-
'binding-ends': 'a role binding runs from a part of the subject to a collaboration use of it',
|
|
12491
|
+
'binding-ends': 'a role binding runs from a part of the subject to a collaboration use of it (a view with no subject: a warning)',
|
|
12468
12492
|
'binding-role': 'a role binding\'s label names a role of the collaboration its use names',
|
|
12469
12493
|
'collaboration-named': 'a collaboration use\'s collaboration names a collaboration of the model',
|
|
12470
12494
|
...STRUCT_RULES,
|
|
@@ -12474,7 +12498,9 @@ function csProblems(model, view) {
|
|
|
12474
12498
|
const out = [], P = csPic(model, view || {}), vi = CS_ARR(model && model.views).indexOf(view), S = P.S, say = (level, rule, path, ids, msg) => out.push({ level, rule, path, ids: ids.filter(x => x != null), message: `${rule}: ${msg}` });
|
|
12475
12499
|
const q = id => JSON.stringify(P.el(id) ? csName(P.el(id)) : String(id));
|
|
12476
12500
|
if (!view) return structProblems(model);
|
|
12477
|
-
|
|
12501
|
+
// a view with no subject at all (its subject deleted, or hidden from it, takes it: apply()) draws its other cards: a warning
|
|
12502
|
+
if (!S && view.subject == null) say('warning', 'subject-shown', `views[${vi}]`, [view.id], `view ${JSON.stringify(view.id)} has no subject (deleted, or hidden from it): it draws its other cards, and no structure until one is set`);
|
|
12503
|
+
else if (!S) say('error', 'subject-shown', `views[${vi}].subject`, [view.id, view.subject], `view ${JSON.stringify(view.id)}'s subject ${JSON.stringify(view.subject ?? null)} is not a class, a component or a collaboration it lists in nodeIds`);
|
|
12478
12504
|
const nodeAt = id => CS_ARR(model.nodes).indexOf(P.at.get(id)), memPath = id => { const o = P.mem.get(id).owner; return `nodes[${nodeAt(o.id)}].members[${o.members.indexOf(P.mem.get(id).m)}]`; };
|
|
12479
12505
|
if (S && S.type !== 'uml.Collaboration') P.parts.forEach(m => { if (!P.typeOf(m)) say('warning', 'part-type', memPath(m.id) + '.props.valueType', [m.id, S.id],
|
|
12480
12506
|
`part ${q(m.id)} of ${q(S.id)} is typed ${JSON.stringify(CS_PROPS(m).valueType ?? null)}, which names ${[...P.at.values()].some(n => CS_TYPED.includes(n.type) && CS_HAS(n.label) && n.label === CS_PROPS(m).valueType) ? 'more than one' : 'no'} class or component, so it shows only the ports its connectors reach through it`); });
|
|
@@ -12498,7 +12524,7 @@ function csProblems(model, view) {
|
|
|
12498
12524
|
if (e.type === 'uml.RoleBinding' && (P.at.get(e.to) || {}).type === 'uml.CollaborationUse' && P.ids.includes(e.to) || e.type === 'uml.RoleBinding' && S && owner(e.from) === S) {
|
|
12499
12525
|
const u = P.at.get(e.to);
|
|
12500
12526
|
if (!(S && owner(e.from) === S && P.mem.get(e.from).m.type === 'uml.Property' && u && u.type === 'uml.CollaborationUse' && u.parent === S.id))
|
|
12501
|
-
return say('error', 'binding-ends', path, [e.id, e.from, e.to], `${e.id} runs from ${q(e.from)} to ${q(e.to)}: a role binding runs from a part of the subject to a collaboration use of it`);
|
|
12527
|
+
return say(S || view.subject != null ? 'error' : 'warning', 'binding-ends', path, [e.id, e.from, e.to], `${e.id} runs from ${q(e.from)} to ${q(e.to)}: a role binding runs from a part of the subject to a collaboration use of it`);
|
|
12502
12528
|
const C = csCollab(P, u);
|
|
12503
12529
|
if (C && !P.kids(C, 'uml.Property').some(m => m.label === e.label)) say('warning', 'binding-role', `${path}.label`, [e.id, C.id], `${e.id} binds ${JSON.stringify(e.label ?? null)}, not a role of ${q(C.id)}`);
|
|
12504
12530
|
} });
|
|
@@ -13344,7 +13370,7 @@ function tmRun(model, view) {
|
|
|
13344
13370
|
const V = tmView(model, view), X = tmIndex(model, V), o = layoutTimeRuler(tmInput(model, V, X)), x0 = o.ruler.x0;
|
|
13345
13371
|
const nodes = [], order = [];
|
|
13346
13372
|
o.lanes.forEach(l => { const n = X.N.get(l.id), vals = X.values(l.id), cs = X.mine(l.id);
|
|
13347
|
-
nodes.push({ id: l.id, shape: 'tm-lane', type: 'uml.Lifeline', label: tmHead(n), k: 'file', x: l.x, y: l.y, w: l.w, h: l.h, nx: l.name.x, ny: l.name.y,
|
|
13373
|
+
nodes.push({ id: l.id, shape: 'tm-lane', type: 'uml.Lifeline', label: tmHead(n), k: 'file', holder: true, x: l.x, y: l.y, w: l.w, h: l.h, nx: l.name.x, ny: l.name.y,
|
|
13348
13374
|
aria: `${vals ? 'Value lifeline' : 'Lifeline'} ${tmHead(n)}${vals ? '' : `, ${tmPlural(l.rows.length, 'state')}`}, ${tmPlural(cs.length, 'change')}` });
|
|
13349
13375
|
order.push(l.id);
|
|
13350
13376
|
l.rows.forEach(r => { const w = Math.ceil(textW(r.state, TM.text)), id = tmRowId(l.id, r.state);
|
|
@@ -13648,3 +13674,16 @@ const TM_TYPE = registerDiagramType('uml.timing', {
|
|
|
13648
13674
|
rows: tmRows,
|
|
13649
13675
|
edits: { connect: tmConnect, moveTo: tmMoveTo, add: tmAdd, remove: tmRemove, rename: tmRename, key: tmKeyHook },
|
|
13650
13676
|
});
|
|
13677
|
+
|
|
13678
|
+
|
|
13679
|
+
|
|
13680
|
+
|
|
13681
|
+
|
|
13682
|
+
|
|
13683
|
+
|
|
13684
|
+
|
|
13685
|
+
|
|
13686
|
+
|
|
13687
|
+
|
|
13688
|
+
|
|
13689
|
+
|
package/lib/umlimator.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export interface MapNode {
|
|
|
44
44
|
/** A typed element in schema version 2's envelope (docs/diagrams/model.md §1): a node, a member, a typed edge, a
|
|
45
45
|
* fragment. Nodes, edges, members and fragments share one id space; an id never contains "->". A typed edge is an
|
|
46
46
|
* Element with `from` and `to`, which may name a member. A typed view is a MapView with `diagram` (uml.class), and may
|
|
47
|
-
* have `subject`, `direction` ('right' | 'down'), `notation`, `present`, `fragments` and `timeline`. umlimator/all draws `uml.class` (0.18.0), `uml.object` and `uml.package` (0.19.0), `uml.sequence` and `uml.communication` (0.20.0), `uml.use-case`, `uml.activity`, `uml.state-machine` and `uml.interaction-overview` (0.21.0), `uml.component`, `uml.deployment` and `uml.composite-structure` (0.22.0); other types draw as plain cards.
|
|
47
|
+
* have `subject`, `direction` ('right' | 'down'), `notation`, `present`, `fragments` and `timeline`. umlimator/all draws `uml.class` (0.18.0), `uml.object` and `uml.package` (0.19.0), `uml.sequence` and `uml.communication` (0.20.0), `uml.use-case`, `uml.activity`, `uml.state-machine` and `uml.interaction-overview` (0.21.0), `uml.component`, `uml.deployment` and `uml.composite-structure` (0.22.0), `uml.profile` and `uml.timing` (0.23.0); other types draw as plain cards.
|
|
48
48
|
* From 0.19.0 the class, object and package types draw a shown package that owns something the view shows as a box holding it (`parent`), and
|
|
49
49
|
* qualify names (`sales::Order`) from the nearest shown owner, the view's `subject`, or the top. */
|
|
50
50
|
export interface Element {
|
|
@@ -194,6 +194,45 @@ export type UmlCompositeStructureLineType = 'uml.Connector' | 'uml.RoleBinding'
|
|
|
194
194
|
export interface UmlPartProps { valueType?: string; multiplicity?: string; aggregation?: 'composite' | 'shared'; stereotypes?: string[]; [key: string]: unknown }
|
|
195
195
|
/** A collaboration use's props: the collaboration it uses, by label. */
|
|
196
196
|
export interface UmlCollaborationUseProps { collaboration?: string; stereotypes?: string[]; [key: string]: unknown }
|
|
197
|
+
/** Any UML element's tagged values (0.23.0): by stereotype (as written in `stereotypes`, `Profile::name` when qualified, or
|
|
198
|
+
* a required stereotype's name), then by tag name, each value as text. Checked against the profiles applied to the
|
|
199
|
+
* element's packages (docs/conformance/uml-profile.md); edited in the properties panel on every typed view. */
|
|
200
|
+
export type UmlTags = Record<string, Record<string, string>>;
|
|
201
|
+
/** The props any UML element may hold from 0.23.0: its stereotypes (a name, or `Profile::name`) and their tags. */
|
|
202
|
+
export interface UmlStereotypedProps { stereotypes?: string[]; tags?: UmlTags; [key: string]: unknown }
|
|
203
|
+
/** The profile diagram's vocabulary (a view with `diagram: 'uml.profile'`, umlimator/all from 0.23.0;
|
|
204
|
+
* docs/conformance/uml-profile.md). A stereotype's and a metaclass reference's `parent` is a profile; an enumeration's
|
|
205
|
+
* (a tag's type) may be. A metaclass reference's `label` names a UML metaclass (Class, Property, Classifier, …). A
|
|
206
|
+
* stereotype's tag definitions are `uml.Property` members (`name : Type [multiplicity] = default`). Any element that
|
|
207
|
+
* applies a stereotype may be shown, with a compartment of tags for each stereotype it has. */
|
|
208
|
+
export type UmlProfileElementType = 'uml.Profile' | 'uml.Stereotype' | 'uml.MetaclassReference' | 'uml.Enumeration' | 'uml.Package' | 'uml.Comment';
|
|
209
|
+
export type UmlProfileMemberType = 'uml.Property' | 'uml.EnumerationLiteral';
|
|
210
|
+
/** An extension from a stereotype to a metaclass reference; a profile application from a package to a profile; a
|
|
211
|
+
* generalization between stereotypes. */
|
|
212
|
+
export type UmlProfileLineType = 'uml.Extension' | 'uml.ProfileApplication' | 'uml.Generalization' | 'uml.CommentLink';
|
|
213
|
+
/** A stereotype's props: abstract (applied through a specialization). */
|
|
214
|
+
export interface UmlStereotypeProps { isAbstract?: boolean; [key: string]: unknown }
|
|
215
|
+
/** An extension's props: required (the stereotype is applied to every element of the metaclass in its profile's scope). */
|
|
216
|
+
export interface UmlExtensionProps { isRequired?: boolean; [key: string]: unknown }
|
|
217
|
+
/** The timing diagram's vocabulary (a view with `diagram: 'uml.timing'`, umlimator/all from 0.23.0;
|
|
218
|
+
* docs/conformance/uml-timing.md). Lifelines are model nodes the view lists in `nodeIds`, top to bottom; messages are inline
|
|
219
|
+
* in the view's `edges`; changes and constraints are in its `timeline`. `present.<lifeline>.as: 'values'` draws a value
|
|
220
|
+
* lifeline. The scale is derived, never stored. */
|
|
221
|
+
export type UmlTimingElementType = 'uml.Lifeline';
|
|
222
|
+
export type UmlTimingLineType = 'uml.Message';
|
|
223
|
+
/** A timing lifeline's props: what it represents, and its states, top to bottom (ignored by the sequence and
|
|
224
|
+
* communication types). */
|
|
225
|
+
export interface UmlTimingLifelineProps { represents?: string; states?: string[]; stereotypes?: string[]; tags?: UmlTags; [key: string]: unknown }
|
|
226
|
+
/** A timing message's props: a sort of call, async or reply, and when it is sent and received, in the view's unit. */
|
|
227
|
+
export interface UmlTimingMessageProps { sort?: 'call' | 'async' | 'reply'; replyTo?: string; sentAt?: number; receivedAt?: number; [key: string]: unknown }
|
|
228
|
+
/** A change of state on a lifeline at a time; an element of the model's id space, drawn by `at`. */
|
|
229
|
+
export interface UmlTimingChange { id: string; lifeline: string; at: number; state: string }
|
|
230
|
+
/** A duration constraint from one change to a later one, or a time constraint on one change. */
|
|
231
|
+
export interface UmlTimingConstraint { id: string; type: 'uml.DurationConstraint' | 'uml.TimeConstraint'; from: string; to?: string; label?: string }
|
|
232
|
+
/** A timing view's `timeline`: the ruler's unit (optional), its changes in any order, its constraints. */
|
|
233
|
+
export interface UmlTimeline { unit?: string; changes?: UmlTimingChange[]; constraints?: UmlTimingConstraint[] }
|
|
234
|
+
/** What a timing view shows of a lifeline, in its `present`: drawn as a value lifeline. */
|
|
235
|
+
export interface UmlTimingPresent { as?: 'values' }
|
|
197
236
|
/** What a line means, drawn as its colour: calls (the default), feeds (hands work on), triggers (suggests, offers, fires),
|
|
198
237
|
* state (reads or writes a file, board or config: a thinner line, a muted label, no flow) and guard (a hook steps in).
|
|
199
238
|
* Colours are --um-w-<kind>. An edge's `style` (emphasis, dashed, security) wins over its kind's colour. */
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
}
|
|
412
412
|
},
|
|
413
413
|
"type": {
|
|
414
|
-
"description": "Schema version 2: the element's type, <notation>.<Name> (uml.Class). validate() checks typed fields only in a model with schemaVersion 2. The class diagram (uml.class, 0.18.0): uml.Class, uml.Interface, uml.Enumeration, uml.DataType, uml.PrimitiveType, uml.Package and uml.Comment; their members uml.Property, uml.Operation and uml.EnumerationLiteral. The object diagram (uml.object, 0.19.0): uml.InstanceSpecification and uml.Comment; an instance's members uml.Slot. The package diagram (uml.package, 0.19.0): uml.Package and the class diagram's classifiers, and uml.Comment. The sequence and communication diagrams (uml.sequence, uml.communication, 0.20.0): uml.Lifeline. The use case diagram (uml.use-case, 0.21.0): uml.Actor, uml.UseCase, uml.Subject and uml.Comment; a use case's members uml.ExtensionPoint. The activity diagram (uml.activity, 0.21.0): uml.InitialNode, uml.ActivityFinalNode, uml.FlowFinalNode, uml.Action, uml.CallBehaviorAction, uml.SendSignalAction, uml.AcceptEventAction, uml.DecisionNode, uml.MergeNode, uml.ForkNode, uml.JoinNode, uml.ObjectNode, uml.DataStoreNode, uml.ActivityPartition and uml.Comment. The state machine diagram (uml.state-machine, 0.21.0): uml.State, uml.Pseudostate, uml.FinalState and uml.Comment; a state's members uml.Region and uml.InternalTransition. The interaction overview diagram (uml.interaction-overview, 0.21.0): the activity's control nodes, uml.InteractionUse, uml.Interaction (an inline interaction) and uml.Comment. The component diagram (uml.component, 0.22.0): uml.Component, uml.Interface, uml.Artifact, uml.Package and uml.Comment; a component's (or class's) members uml.Port. The deployment diagram (uml.deployment, 0.22.0): uml.Node, uml.Device, uml.ExecutionEnvironment, uml.Artifact, uml.DeploymentSpecification, uml.Component and uml.Comment. The composite structure diagram (uml.composite-structure, 0.22.0): the view's subject (a uml.Class, uml.Component or uml.Collaboration), uml.Collaboration, uml.CollaborationUse and uml.Comment; the subject's members uml.Property (its parts) and uml.Port, a collaboration's uml.Property (its roles).",
|
|
414
|
+
"description": "Schema version 2: the element's type, <notation>.<Name> (uml.Class). validate() checks typed fields only in a model with schemaVersion 2. The class diagram (uml.class, 0.18.0): uml.Class, uml.Interface, uml.Enumeration, uml.DataType, uml.PrimitiveType, uml.Package and uml.Comment; their members uml.Property, uml.Operation and uml.EnumerationLiteral. The object diagram (uml.object, 0.19.0): uml.InstanceSpecification and uml.Comment; an instance's members uml.Slot. The package diagram (uml.package, 0.19.0): uml.Package and the class diagram's classifiers, and uml.Comment. The sequence and communication diagrams (uml.sequence, uml.communication, 0.20.0): uml.Lifeline. The use case diagram (uml.use-case, 0.21.0): uml.Actor, uml.UseCase, uml.Subject and uml.Comment; a use case's members uml.ExtensionPoint. The activity diagram (uml.activity, 0.21.0): uml.InitialNode, uml.ActivityFinalNode, uml.FlowFinalNode, uml.Action, uml.CallBehaviorAction, uml.SendSignalAction, uml.AcceptEventAction, uml.DecisionNode, uml.MergeNode, uml.ForkNode, uml.JoinNode, uml.ObjectNode, uml.DataStoreNode, uml.ActivityPartition and uml.Comment. The state machine diagram (uml.state-machine, 0.21.0): uml.State, uml.Pseudostate, uml.FinalState and uml.Comment; a state's members uml.Region and uml.InternalTransition. The interaction overview diagram (uml.interaction-overview, 0.21.0): the activity's control nodes, uml.InteractionUse, uml.Interaction (an inline interaction) and uml.Comment. The component diagram (uml.component, 0.22.0): uml.Component, uml.Interface, uml.Artifact, uml.Package and uml.Comment; a component's (or class's) members uml.Port. The deployment diagram (uml.deployment, 0.22.0): uml.Node, uml.Device, uml.ExecutionEnvironment, uml.Artifact, uml.DeploymentSpecification, uml.Component and uml.Comment. The composite structure diagram (uml.composite-structure, 0.22.0): the view's subject (a uml.Class, uml.Component or uml.Collaboration), uml.Collaboration, uml.CollaborationUse and uml.Comment; the subject's members uml.Property (its parts) and uml.Port, a collaboration's uml.Property (its roles). The profile diagram (uml.profile, 0.23.0): uml.Profile, uml.Stereotype and uml.MetaclassReference (each owned by a profile), uml.Enumeration (a tag's type), uml.Package, uml.Comment and any element that applies a stereotype; a stereotype's members uml.Property (its tag definitions), an enumeration's uml.EnumerationLiteral. The timing diagram (uml.timing, 0.23.0): uml.Lifeline (its changes and constraints are in the view's timeline).",
|
|
415
415
|
"examples": [
|
|
416
416
|
"uml.Class",
|
|
417
417
|
"uml.Interface",
|
|
@@ -440,23 +440,26 @@
|
|
|
440
440
|
"uml.ExecutionEnvironment",
|
|
441
441
|
"uml.DeploymentSpecification",
|
|
442
442
|
"uml.Collaboration",
|
|
443
|
-
"uml.CollaborationUse"
|
|
443
|
+
"uml.CollaborationUse",
|
|
444
|
+
"uml.Profile",
|
|
445
|
+
"uml.Stereotype",
|
|
446
|
+
"uml.MetaclassReference"
|
|
444
447
|
]
|
|
445
448
|
},
|
|
446
449
|
"parent": {
|
|
447
|
-
"description": "Schema version 2: the element that owns it (a package, a composite state, a lane). From 0.19.0 a class, object or package view draws a shown package that owns something it shows as a box holding it. A use case's: a subject or a package. An activity node's: its partition (lane); a partition's: the partition it is nested in. A substate's or pseudostate's: a state, or a region (a member) of one. A component's: a component (drawn nested) or a package. A node's, device's or execution environment's: one of the three (UML's nestedNode); an artifact's or deployment specification's: the target it is deployed on. A collaboration use's: the subject of its composite structure view (0.22.0)."
|
|
450
|
+
"description": "Schema version 2: the element that owns it (a package, a composite state, a lane). From 0.19.0 a class, object or package view draws a shown package that owns something it shows as a box holding it. A use case's: a subject or a package. An activity node's: its partition (lane); a partition's: the partition it is nested in. A substate's or pseudostate's: a state, or a region (a member) of one. A component's: a component (drawn nested) or a package. A node's, device's or execution environment's: one of the three (UML's nestedNode); an artifact's or deployment specification's: the target it is deployed on. A collaboration use's: the subject of its composite structure view (0.22.0). A stereotype's and a metaclass reference's: a profile; an enumeration's may be (0.23.0)."
|
|
448
451
|
},
|
|
449
452
|
"props": {
|
|
450
|
-
"description": "Schema version 2: the type's own properties. The class diagram (uml.class, 0.18.0): isAbstract and stereotypes on a classifier; on a member, the fields of its UML text (docs/conformance/uml-class.md). The object diagram (uml.object, 0.19.0): an instance's classifier and stereotypes; a slot's value (docs/conformance/uml-object.md). The sequence and communication diagrams (uml.sequence, uml.communication, 0.20.0): a lifeline's represents, and stereotypes (actor draws «actor» over its name). The state machine diagram (uml.state-machine, 0.21.0): a state's entry, do and exit, a pseudostate's kind (docs/conformance/uml-state-machine.md). The composite structure diagram (uml.composite-structure, 0.22.0): a collaboration use's collaboration (docs/conformance/uml-composite-structure.md).",
|
|
453
|
+
"description": "Schema version 2: the type's own properties. The class diagram (uml.class, 0.18.0): isAbstract and stereotypes on a classifier; on a member, the fields of its UML text (docs/conformance/uml-class.md). The object diagram (uml.object, 0.19.0): an instance's classifier and stereotypes; a slot's value (docs/conformance/uml-object.md). The sequence and communication diagrams (uml.sequence, uml.communication, 0.20.0): a lifeline's represents, and stereotypes (actor draws «actor» over its name). The state machine diagram (uml.state-machine, 0.21.0): a state's entry, do and exit, a pseudostate's kind (docs/conformance/uml-state-machine.md). The composite structure diagram (uml.composite-structure, 0.22.0): a collaboration use's collaboration (docs/conformance/uml-composite-structure.md). On any UML element, stereotypes and their tags, checked against the profiles applied to its packages (0.23.0, docs/conformance/uml-profile.md). The profile diagram (uml.profile, 0.23.0): a stereotype's isAbstract. The timing diagram (uml.timing, 0.23.0): a lifeline's states (docs/conformance/uml-timing.md).",
|
|
451
454
|
"anyOf": [
|
|
452
455
|
{
|
|
453
456
|
"type": "object",
|
|
454
457
|
"properties": {
|
|
455
458
|
"isAbstract": {
|
|
456
|
-
"description": "uml.Class, uml.Operation: true draws the name in italics ({abstract} in a member's text)."
|
|
459
|
+
"description": "uml.Class, uml.Operation: true draws the name in italics ({abstract} in a member's text). uml.Stereotype (0.23.0): true draws its name in italics; an abstract stereotype is applied through a specialization."
|
|
457
460
|
},
|
|
458
461
|
"stereotypes": {
|
|
459
|
-
"description": "Any UML element: names drawn «in guillemets», as text (['entity'])."
|
|
462
|
+
"description": "Any UML element: names drawn «in guillemets», as text (['entity']). From 0.23.0, a name a profile applied to one of the element's packages defines is that profile's stereotype, checked against it; Profile::name picks one of two applied profiles that define a name; outside every applied profile a name is a keyword, as before."
|
|
460
463
|
},
|
|
461
464
|
"classifier": {
|
|
462
465
|
"description": "uml.InstanceSpecification: the name (or qualified name, sales::Order) of the classifier it is an instance of, as text; drawn name : Classifier, underlined."
|
|
@@ -488,6 +491,21 @@
|
|
|
488
491
|
},
|
|
489
492
|
"collaboration": {
|
|
490
493
|
"description": "uml.CollaborationUse: the collaboration it uses, by label, as text; drawn name : Collaboration."
|
|
494
|
+
},
|
|
495
|
+
"tags": {
|
|
496
|
+
"description": "Any UML element (0.23.0): its tagged values, keyed by stereotype (as written in stereotypes, or a required stereotype's name), then by tag name, each value as text: { \"column\": { \"name\": \"placed_at\", \"indexed\": \"true\" } }. Checked against the tag's definition (a uml.Property of the stereotype or of one of its generals): defined, of its type (Boolean, Integer, Real, UnlimitedNatural, an enumeration of the profile; any text otherwise), present when required. Edited in the properties panel on every typed view.",
|
|
497
|
+
"type": "object",
|
|
498
|
+
"additionalProperties": {
|
|
499
|
+
"type": "object",
|
|
500
|
+
"additionalProperties": {}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"states": {
|
|
504
|
+
"description": "uml.Lifeline in a timing view (0.23.0): its states, top to bottom, as text; each is a row of its timeline. Ignored by the sequence and communication types.",
|
|
505
|
+
"type": "array",
|
|
506
|
+
"items": {
|
|
507
|
+
"type": "string"
|
|
508
|
+
}
|
|
491
509
|
}
|
|
492
510
|
}
|
|
493
511
|
},
|
|
@@ -495,7 +513,7 @@
|
|
|
495
513
|
]
|
|
496
514
|
},
|
|
497
515
|
"members": {
|
|
498
|
-
"description": "Schema version 2: owned parts, in display order (attributes, ports, regions, lanes), each a typed element. The class diagram (uml.class, 0.18.0): a classifier's attributes (uml.Property) and operations (uml.Operation), an enumeration's literals (uml.EnumerationLiteral). The object diagram (uml.object, 0.19.0): an instance's slots (uml.Slot), each a feature = value row. The use case diagram (uml.use-case, 0.21.0): a use case's extension points (uml.ExtensionPoint, by name). The state machine diagram (uml.state-machine, 0.21.0): a state's regions (uml.Region, by name) and internal transitions (uml.InternalTransition, trigger [guard] / effect). The component diagram (uml.component, 0.22.0): a component's or class's ports (uml.Port), drawn on its border. The composite structure diagram (uml.composite-structure, 0.22.0): the subject's parts (uml.Property, name : Type [multiplicity]) and ports (uml.Port); a collaboration's roles (uml.Property).",
|
|
516
|
+
"description": "Schema version 2: owned parts, in display order (attributes, ports, regions, lanes), each a typed element. The class diagram (uml.class, 0.18.0): a classifier's attributes (uml.Property) and operations (uml.Operation), an enumeration's literals (uml.EnumerationLiteral). The object diagram (uml.object, 0.19.0): an instance's slots (uml.Slot), each a feature = value row. The use case diagram (uml.use-case, 0.21.0): a use case's extension points (uml.ExtensionPoint, by name). The state machine diagram (uml.state-machine, 0.21.0): a state's regions (uml.Region, by name) and internal transitions (uml.InternalTransition, trigger [guard] / effect). The component diagram (uml.component, 0.22.0): a component's or class's ports (uml.Port), drawn on its border. The composite structure diagram (uml.composite-structure, 0.22.0): the subject's parts (uml.Property, name : Type [multiplicity]) and ports (uml.Port); a collaboration's roles (uml.Property). The profile diagram (uml.profile, 0.23.0): a stereotype's tag definitions (uml.Property, name : Type [multiplicity] = default).",
|
|
499
517
|
"anyOf": [
|
|
500
518
|
{
|
|
501
519
|
"type": "array",
|
|
@@ -509,7 +527,7 @@
|
|
|
509
527
|
"description": "Unique among every node, edge and member of the model."
|
|
510
528
|
},
|
|
511
529
|
"type": {
|
|
512
|
-
"description": "uml.Property, uml.Operation or uml.EnumerationLiteral in a class diagram; uml.Slot in an object diagram. uml.ExtensionPoint in a use case diagram; uml.Region or uml.InternalTransition in a state machine diagram. uml.Port on a component or class (component and composite structure diagrams); uml.Property as a part or a role in a composite structure diagram (0.22.0)."
|
|
530
|
+
"description": "uml.Property, uml.Operation or uml.EnumerationLiteral in a class diagram; uml.Slot in an object diagram. uml.ExtensionPoint in a use case diagram; uml.Region or uml.InternalTransition in a state machine diagram. uml.Port on a component or class (component and composite structure diagrams); uml.Property as a part or a role in a composite structure diagram (0.22.0). uml.Property on a stereotype: a tag definition (profile diagram, 0.23.0)."
|
|
513
531
|
},
|
|
514
532
|
"label": {
|
|
515
533
|
"description": "The member's name (a slot's: the feature it gives a value); the rest of its UML text is in props."
|
|
@@ -530,7 +548,7 @@
|
|
|
530
548
|
"description": "uml.Property, uml.Operation: public, private, protected or package (+ - # ~)."
|
|
531
549
|
},
|
|
532
550
|
"valueType": {
|
|
533
|
-
"description": "uml.Property, and each of an operation's parameters: its type, as text (Money, String[], Map<K, V>). uml.Port: its type, drawn name : Type beside it (0.22.0). A part's or role's: the class or component it is, by label (a part shows that type's ports)."
|
|
551
|
+
"description": "uml.Property, and each of an operation's parameters: its type, as text (Money, String[], Map<K, V>). uml.Port: its type, drawn name : Type beside it (0.22.0). A part's or role's: the class or component it is, by label (a part shows that type's ports). A tag definition's (0.23.0): Boolean, Integer, Real, UnlimitedNatural, String, or an enumeration of the profile by label."
|
|
534
552
|
},
|
|
535
553
|
"multiplicity": {
|
|
536
554
|
"description": "uml.Property: 1, *, n..m or n..* (0..1, 1..*), kept as written."
|
|
@@ -870,7 +888,7 @@
|
|
|
870
888
|
"description": "When the line is used."
|
|
871
889
|
},
|
|
872
890
|
"type": {
|
|
873
|
-
"description": "Schema version 2: the element's type, <notation>.<Name> (uml.Class). The class diagram (uml.class, 0.18.0): uml.Association, uml.Generalization (from the specific to the general), uml.InterfaceRealization (to the interface), uml.Dependency (from the client) and uml.CommentLink (from the comment). The object diagram (uml.object, 0.19.0): uml.Link and uml.CommentLink. The package diagram (uml.package, 0.19.0): uml.PackageImport and uml.PackageMerge (from the importing or merging package), uml.Dependency and uml.CommentLink. The sequence diagram (uml.sequence, 0.20.0): uml.Message, inline in its view's edges, in time order. The communication diagram (uml.communication, 0.20.0): uml.Connector and uml.Message, model lines its view lists, connectors first; only the messages' order means anything. The use case diagram (uml.use-case, 0.21.0): uml.Association (an actor and a use case), uml.Include and uml.Extend (from the including or extending use case), uml.Generalization (from the specific to the general) and uml.CommentLink. The activity diagram (uml.activity, 0.21.0): uml.ControlFlow, uml.ObjectFlow and uml.CommentLink. The state machine diagram (uml.state-machine, 0.21.0): uml.Transition and uml.CommentLink. The interaction overview diagram (uml.interaction-overview, 0.21.0): uml.ControlFlow and uml.CommentLink. The component diagram (uml.component, 0.22.0): uml.InterfaceRealization (from a component, a class or a port to the interface: a plain stem to a ball), uml.Usage (to the interface: a socket at a ball, else a dashed «use» arrow), uml.ComponentRealization (from the realizing classifier to the component), uml.Connector (props.kind assembly or delegation; from or to a port), uml.Dependency, uml.Manifestation (from an artifact) and uml.CommentLink. The deployment diagram (uml.deployment, 0.22.0): uml.Deployment (from an artifact or deployment specification to its target), uml.Manifestation, uml.CommunicationPath (between two targets), uml.Dependency and uml.CommentLink. The composite structure diagram (uml.composite-structure, 0.22.0): uml.Connector (between parts and ports; an end through a part keeps props.ends.<end>.part), uml.RoleBinding (from a part to a collaboration use; its label the role) and uml.CommentLink.",
|
|
891
|
+
"description": "Schema version 2: the element's type, <notation>.<Name> (uml.Class). The class diagram (uml.class, 0.18.0): uml.Association, uml.Generalization (from the specific to the general), uml.InterfaceRealization (to the interface), uml.Dependency (from the client) and uml.CommentLink (from the comment). The object diagram (uml.object, 0.19.0): uml.Link and uml.CommentLink. The package diagram (uml.package, 0.19.0): uml.PackageImport and uml.PackageMerge (from the importing or merging package), uml.Dependency and uml.CommentLink. The sequence diagram (uml.sequence, 0.20.0): uml.Message, inline in its view's edges, in time order. The communication diagram (uml.communication, 0.20.0): uml.Connector and uml.Message, model lines its view lists, connectors first; only the messages' order means anything. The use case diagram (uml.use-case, 0.21.0): uml.Association (an actor and a use case), uml.Include and uml.Extend (from the including or extending use case), uml.Generalization (from the specific to the general) and uml.CommentLink. The activity diagram (uml.activity, 0.21.0): uml.ControlFlow, uml.ObjectFlow and uml.CommentLink. The state machine diagram (uml.state-machine, 0.21.0): uml.Transition and uml.CommentLink. The interaction overview diagram (uml.interaction-overview, 0.21.0): uml.ControlFlow and uml.CommentLink. The component diagram (uml.component, 0.22.0): uml.InterfaceRealization (from a component, a class or a port to the interface: a plain stem to a ball), uml.Usage (to the interface: a socket at a ball, else a dashed «use» arrow), uml.ComponentRealization (from the realizing classifier to the component), uml.Connector (props.kind assembly or delegation; from or to a port), uml.Dependency, uml.Manifestation (from an artifact) and uml.CommentLink. The deployment diagram (uml.deployment, 0.22.0): uml.Deployment (from an artifact or deployment specification to its target), uml.Manifestation, uml.CommunicationPath (between two targets), uml.Dependency and uml.CommentLink. The composite structure diagram (uml.composite-structure, 0.22.0): uml.Connector (between parts and ports; an end through a part keeps props.ends.<end>.part), uml.RoleBinding (from a part to a collaboration use; its label the role) and uml.CommentLink. The profile diagram (uml.profile, 0.23.0): uml.Extension (from a stereotype to a metaclass reference; props.isRequired), uml.ProfileApplication (from a package to a profile), uml.Generalization (between stereotypes) and uml.CommentLink. The timing diagram (uml.timing, 0.23.0): uml.Message, inline in its view's edges (props.sentAt, props.receivedAt).",
|
|
874
892
|
"examples": [
|
|
875
893
|
"uml.Association",
|
|
876
894
|
"uml.Generalization",
|
|
@@ -892,14 +910,16 @@
|
|
|
892
910
|
"uml.Manifestation",
|
|
893
911
|
"uml.Deployment",
|
|
894
912
|
"uml.CommunicationPath",
|
|
895
|
-
"uml.RoleBinding"
|
|
913
|
+
"uml.RoleBinding",
|
|
914
|
+
"uml.Extension",
|
|
915
|
+
"uml.ProfileApplication"
|
|
896
916
|
]
|
|
897
917
|
},
|
|
898
918
|
"parent": {
|
|
899
919
|
"description": "Schema version 2: the element that owns it (a package, a composite state, a lane). In a sequence view: the operand (uml.InteractionOperand) of one of its fragments that holds the message; none at the top level."
|
|
900
920
|
},
|
|
901
921
|
"props": {
|
|
902
|
-
"description": "Schema version 2: the type's own properties. The class diagram (uml.class, 0.18.0): an association's ends, and stereotypes on any line («use» on a dependency). The object diagram (uml.object, 0.19.0): a link's association and the roles at its ends. The package diagram (uml.package, 0.19.0): a package import's visibility. The sequence and communication diagrams (0.20.0): a message's sort and replyTo. The use case diagram (0.21.0): an extend's extensionPoints and condition. The activity and interaction overview diagrams (0.21.0): a flow's guard (its label is its name). The state machine diagram (0.21.0): a transition's trigger, guard and effect, drawn trigger [guard] / effect. The component diagram (0.22.0): a connector's kind (assembly or delegation). The composite structure diagram (0.22.0): a connector end's part (ends.from.part, ends.to.part), UML's partWithPort.",
|
|
922
|
+
"description": "Schema version 2: the type's own properties. The class diagram (uml.class, 0.18.0): an association's ends, and stereotypes on any line («use» on a dependency). The object diagram (uml.object, 0.19.0): a link's association and the roles at its ends. The package diagram (uml.package, 0.19.0): a package import's visibility. The sequence and communication diagrams (0.20.0): a message's sort and replyTo. The use case diagram (0.21.0): an extend's extensionPoints and condition. The activity and interaction overview diagrams (0.21.0): a flow's guard (its label is its name). The state machine diagram (0.21.0): a transition's trigger, guard and effect, drawn trigger [guard] / effect. The component diagram (0.22.0): a connector's kind (assembly or delegation). The composite structure diagram (0.22.0): a connector end's part (ends.from.part, ends.to.part), UML's partWithPort. The profile diagram (0.23.0): an extension's isRequired. The timing diagram (0.23.0): a message's sort (call, async or reply), replyTo, sentAt and receivedAt.",
|
|
903
923
|
"anyOf": [
|
|
904
924
|
{
|
|
905
925
|
"type": "object",
|
|
@@ -1010,6 +1030,17 @@
|
|
|
1010
1030
|
"assembly",
|
|
1011
1031
|
"delegation"
|
|
1012
1032
|
]
|
|
1033
|
+
},
|
|
1034
|
+
"isRequired": {
|
|
1035
|
+
"description": "uml.Extension (0.23.0): true marks it {required}: the stereotype is applied to every element of the metaclass in its profile's scope."
|
|
1036
|
+
},
|
|
1037
|
+
"sentAt": {
|
|
1038
|
+
"description": "uml.Message in a timing view (0.23.0): when it is sent, a number in the view's unit.",
|
|
1039
|
+
"type": "number"
|
|
1040
|
+
},
|
|
1041
|
+
"receivedAt": {
|
|
1042
|
+
"description": "uml.Message in a timing view (0.23.0): when it is received, a number in the view's unit, no earlier than sentAt.",
|
|
1043
|
+
"type": "number"
|
|
1013
1044
|
}
|
|
1014
1045
|
}
|
|
1015
1046
|
},
|
|
@@ -1291,7 +1322,7 @@
|
|
|
1291
1322
|
"description": "Guess a line's kind from its label's words when its edges name none (render() and layout(); the standalone page always does)."
|
|
1292
1323
|
},
|
|
1293
1324
|
"diagram": {
|
|
1294
|
-
"description": "Schema version 2: the view's diagram type; without it the view is a map. uml.class draws a class diagram (0.18.0, lib/umlimator-all.js), uml.object an object diagram and uml.package a package diagram (0.19.0), uml.sequence a sequence diagram and uml.communication a communication diagram (0.20.0), uml.use-case a use case diagram, uml.activity an activity diagram, uml.state-machine a state machine diagram and uml.interaction-overview an interaction overview diagram (0.21.0), uml.component a component diagram, uml.deployment a deployment diagram and uml.composite-structure a composite structure diagram (0.22.0); a type this release does not draw is drawn as plain cards, with a warning.",
|
|
1325
|
+
"description": "Schema version 2: the view's diagram type; without it the view is a map. uml.class draws a class diagram (0.18.0, lib/umlimator-all.js), uml.object an object diagram and uml.package a package diagram (0.19.0), uml.sequence a sequence diagram and uml.communication a communication diagram (0.20.0), uml.use-case a use case diagram, uml.activity an activity diagram, uml.state-machine a state machine diagram and uml.interaction-overview an interaction overview diagram (0.21.0), uml.component a component diagram, uml.deployment a deployment diagram and uml.composite-structure a composite structure diagram (0.22.0), uml.profile a profile diagram and uml.timing a timing diagram (0.23.0); a type this release does not draw is drawn as plain cards, with a warning.",
|
|
1295
1326
|
"examples": [
|
|
1296
1327
|
"uml.class",
|
|
1297
1328
|
"uml.object",
|
|
@@ -1304,7 +1335,9 @@
|
|
|
1304
1335
|
"uml.interaction-overview",
|
|
1305
1336
|
"uml.component",
|
|
1306
1337
|
"uml.deployment",
|
|
1307
|
-
"uml.composite-structure"
|
|
1338
|
+
"uml.composite-structure",
|
|
1339
|
+
"uml.profile",
|
|
1340
|
+
"uml.timing"
|
|
1308
1341
|
]
|
|
1309
1342
|
},
|
|
1310
1343
|
"subject": {
|
|
@@ -1317,7 +1350,7 @@
|
|
|
1317
1350
|
"description": "Schema version 2: a skin of the diagram type (crowsfoot for er)."
|
|
1318
1351
|
},
|
|
1319
1352
|
"present": {
|
|
1320
|
-
"description": "Schema version 2: what the layout cannot derive, per element: collapsed compartments, rows shown before +n more. A component view's interface drawn as a ball (as: 'ball'), and a port's side (side); a port on a part, by the part's id: ports.<port>.side (0.22.0).",
|
|
1353
|
+
"description": "Schema version 2: what the layout cannot derive, per element: collapsed compartments, rows shown before +n more. A component view's interface drawn as a ball (as: 'ball'), and a port's side (side); a port on a part, by the part's id: ports.<port>.side (0.22.0). A timing view's lifeline drawn as a value lifeline (as: 'values', 0.23.0).",
|
|
1321
1354
|
"anyOf": [
|
|
1322
1355
|
{
|
|
1323
1356
|
"type": "object",
|
|
@@ -1334,9 +1367,10 @@
|
|
|
1334
1367
|
"description": "At most this many rows in each compartment, then \"+k more\"."
|
|
1335
1368
|
},
|
|
1336
1369
|
"as": {
|
|
1337
|
-
"description": "uml.Interface in a component view (0.22.0): 'ball' draws it as a ball (a 16 px circle); left out, a rectangle with «interface».",
|
|
1370
|
+
"description": "uml.Interface in a component view (0.22.0): 'ball' draws it as a ball (a 16 px circle); left out, a rectangle with «interface». uml.Lifeline in a timing view (0.23.0): 'values' draws it as a value lifeline, a band crossed at each change with its value inside; left out, a state line.",
|
|
1338
1371
|
"examples": [
|
|
1339
|
-
"ball"
|
|
1372
|
+
"ball",
|
|
1373
|
+
"values"
|
|
1340
1374
|
]
|
|
1341
1375
|
},
|
|
1342
1376
|
"side": {
|
|
@@ -1405,7 +1439,87 @@
|
|
|
1405
1439
|
}
|
|
1406
1440
|
},
|
|
1407
1441
|
"timeline": {
|
|
1408
|
-
"description": "Schema version 2: a timing view's unit, changes and constraints."
|
|
1442
|
+
"description": "Schema version 2: a timing view's ruler (uml.timing, 0.23.0): its unit, its changes and its constraints. Times are numbers in one unit; the scale is derived, never stored.",
|
|
1443
|
+
"anyOf": [
|
|
1444
|
+
{
|
|
1445
|
+
"type": "object",
|
|
1446
|
+
"properties": {
|
|
1447
|
+
"unit": {
|
|
1448
|
+
"description": "The unit drawn after the ruler's last label (ms); optional.",
|
|
1449
|
+
"type": "string"
|
|
1450
|
+
},
|
|
1451
|
+
"changes": {
|
|
1452
|
+
"description": "Each lifeline's state changes, in any order: drawn by at. A change is an element of the model's id space, not a node.",
|
|
1453
|
+
"type": "array",
|
|
1454
|
+
"items": {
|
|
1455
|
+
"type": "object",
|
|
1456
|
+
"required": [
|
|
1457
|
+
"id",
|
|
1458
|
+
"lifeline",
|
|
1459
|
+
"at",
|
|
1460
|
+
"state"
|
|
1461
|
+
],
|
|
1462
|
+
"properties": {
|
|
1463
|
+
"id": {
|
|
1464
|
+
"type": "string",
|
|
1465
|
+
"description": "Unique among every element of the model."
|
|
1466
|
+
},
|
|
1467
|
+
"lifeline": {
|
|
1468
|
+
"type": "string",
|
|
1469
|
+
"description": "The uml.Lifeline it is on; deleting the lifeline deletes its changes."
|
|
1470
|
+
},
|
|
1471
|
+
"at": {
|
|
1472
|
+
"type": "number",
|
|
1473
|
+
"description": "When it happens, in the view's unit."
|
|
1474
|
+
},
|
|
1475
|
+
"state": {
|
|
1476
|
+
"type": "string",
|
|
1477
|
+
"description": "The state it enters: one of its lifeline's states (a value lifeline: any text)."
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
"constraints": {
|
|
1483
|
+
"description": "Time and duration constraints on the changes, drawn in a strip under the lane of their first change.",
|
|
1484
|
+
"type": "array",
|
|
1485
|
+
"items": {
|
|
1486
|
+
"type": "object",
|
|
1487
|
+
"required": [
|
|
1488
|
+
"id",
|
|
1489
|
+
"type",
|
|
1490
|
+
"from"
|
|
1491
|
+
],
|
|
1492
|
+
"properties": {
|
|
1493
|
+
"id": {
|
|
1494
|
+
"type": "string",
|
|
1495
|
+
"description": "Unique among every element of the model."
|
|
1496
|
+
},
|
|
1497
|
+
"type": {
|
|
1498
|
+
"description": "uml.DurationConstraint (from a change to a later one) or uml.TimeConstraint (on one change).",
|
|
1499
|
+
"examples": [
|
|
1500
|
+
"uml.DurationConstraint",
|
|
1501
|
+
"uml.TimeConstraint"
|
|
1502
|
+
]
|
|
1503
|
+
},
|
|
1504
|
+
"from": {
|
|
1505
|
+
"type": "string",
|
|
1506
|
+
"description": "A change of the view; deleting it deletes the constraint."
|
|
1507
|
+
},
|
|
1508
|
+
"to": {
|
|
1509
|
+
"type": "string",
|
|
1510
|
+
"description": "uml.DurationConstraint: the change it runs to."
|
|
1511
|
+
},
|
|
1512
|
+
"label": {
|
|
1513
|
+
"type": "string",
|
|
1514
|
+
"description": "The constraint's text ({<= 800 ms})."
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
true
|
|
1522
|
+
]
|
|
1409
1523
|
}
|
|
1410
1524
|
}
|
|
1411
1525
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "umlimator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Embeddable, layered architecture maps: layout, orthogonal routing and an interactive canvas in one ES module.",
|
|
5
5
|
"keywords": ["architecture", "diagram", "c4", "map", "svg", "layout", "orthogonal-routing", "drill-down"],
|
|
6
6
|
"homepage": "https://zintaen.github.io/umlimator/",
|