umlimator 0.23.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.
@@ -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), `uml.profile` and `uml.timing` (0.23.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), `er`, `flowchart`, `dfd`, `uml.information-flow` and C4's six views `c4.landscape`, `c4.context`, `c4.container`, `c4.component`, `c4.dynamic` and `c4.deployment` (0.24.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 {
@@ -233,6 +233,51 @@ export interface UmlTimingConstraint { id: string; type: 'uml.DurationConstraint
233
233
  export interface UmlTimeline { unit?: string; changes?: UmlTimingChange[]; constraints?: UmlTimingConstraint[] }
234
234
  /** What a timing view shows of a lifeline, in its `present`: drawn as a value lifeline. */
235
235
  export interface UmlTimingPresent { as?: 'values' }
236
+ /** The entity-relationship diagram's vocabulary (a view with `diagram: 'er'`, umlimator/all from 0.24.0;
237
+ * docs/conformance/er.md). An entity's columns are `er.Column` members, each read and printed as one row,
238
+ * `name type [PK] [FK table.column] [UK] [NULL]`. A relationship runs from the referenced entity to the referring one. The
239
+ * view's `notation` is `crowsfoot` (the default) or `idef1x`, a repaint on one geometry. */
240
+ export type ErElementType = 'er.Entity' | 'uml.Comment';
241
+ export type ErMemberType = 'er.Column';
242
+ export type ErLineType = 'er.Relationship' | 'uml.CommentLink';
243
+ /** A column's props; `references` names a column id (a declared reference, dropped when that column is deleted). */
244
+ export interface ErColumnProps { dataType?: string; primaryKey?: boolean; foreignKey?: boolean; references?: string; nullable?: boolean; unique?: boolean; [key: string]: unknown }
245
+ /** A relationship's props: identifying (solid) or not (dashed), and each end's multiplicity (1, 0..1, 1..*, 0..*; other bounds, such as 2..5 or 3, drawn as the nearest of the four with their text). */
246
+ export interface ErRelationshipProps { identifying?: boolean; ends?: { from?: { multiplicity?: string }; to?: { multiplicity?: string } }; [key: string]: unknown }
247
+ /** The flowchart's vocabulary (a view with `diagram: 'flowchart'`, umlimator/all from 0.24.0; docs/conformance/flowchart.md).
248
+ * A decision's exits are labelled flows; a connector with flows in and out is a junction. Laid out down by default. */
249
+ export type FlowchartElementType = 'flow.Terminator' | 'flow.Process' | 'flow.Decision' | 'flow.InputOutput' | 'flow.PredefinedProcess' | 'flow.Document'
250
+ | 'flow.Database' | 'flow.ManualInput' | 'flow.Delay' | 'flow.Connector' | 'uml.Comment';
251
+ export type FlowchartLineType = 'flow.Flow' | 'uml.CommentLink';
252
+ /** The data flow diagram's vocabulary (a view with `diagram: 'dfd'`, umlimator/all from 0.24.0; docs/conformance/dfd.md).
253
+ * A process's `opensView` names its level, a `dfd` view whose `parent` is the view the process is on; numbers are stored
254
+ * and checked under their parent's. The view's `notation` is `yourdon` (the default) or `gane-sarson`, a repaint. */
255
+ export type DfdElementType = 'dfd.Process' | 'dfd.DataStore' | 'dfd.ExternalEntity' | 'uml.Comment';
256
+ export type DfdLineType = 'dfd.DataFlow' | 'uml.CommentLink';
257
+ /** A process's or a store's props: its number (1, 1.2, D1). */
258
+ export interface DfdNumberProps { number?: string; [key: string]: unknown }
259
+ /** The information flow diagram's vocabulary (a view with `diagram: 'uml.information-flow'`, umlimator/all from 0.24.0;
260
+ * docs/conformance/uml-information-flow.md). A flow is a dashed «flow» line labelled with what it conveys. */
261
+ export type UmlInformationFlowElementType = 'uml.Class' | 'uml.Interface' | 'uml.Component' | 'uml.Actor' | 'uml.InformationItem' | 'uml.Comment';
262
+ export type UmlInformationFlowLineType = 'uml.InformationFlow' | 'uml.CommentLink';
263
+ /** An information flow's props: the ids of the information items or classifiers it conveys (a declared reference: a
264
+ * deleted id is dropped). Its `label`, when given, is its name, drawn before what it conveys. */
265
+ export interface UmlInformationFlowProps { conveyed?: string[]; [key: string]: unknown }
266
+ /** C4's vocabulary (views with `diagram` one of `c4.landscape`, `c4.context`, `c4.container`, `c4.component`, `c4.dynamic`
267
+ * and `c4.deployment`, umlimator/all from 0.24.0; docs/conformance/c4.md). Ownership is `parent`: a container's is a software
268
+ * system, a component's a container, a deployment node's a deployment node or none, an instance's a deployment node. A
269
+ * view's `subject` is drawn as a boundary when `nodeIds` lists it; a dynamic view's `edges` are relationship ids, each once,
270
+ * in time order, numbered when drawn. A relationship whose end a view does not show is drawn between the nearest shown
271
+ * owners (an implied line, never stored or edited). */
272
+ export type C4ViewType = 'c4.landscape' | 'c4.context' | 'c4.container' | 'c4.component' | 'c4.dynamic' | 'c4.deployment';
273
+ export type C4ElementType = 'c4.Person' | 'c4.SoftwareSystem' | 'c4.Container' | 'c4.Component' | 'c4.DeploymentNode' | 'c4.ContainerInstance' | 'uml.Comment';
274
+ export type C4LineType = 'c4.Relationship' | 'uml.CommentLink';
275
+ /** A C4 element's props; `shape` names one of the map's card shapes (a person is `person` and every other element `box`
276
+ * without it); an instance's `container` is a declared reference (deleting the container deletes its instances). */
277
+ export interface C4ElementProps { description?: string; technology?: string; external?: boolean;
278
+ shape?: 'person' | 'robot' | 'browser' | 'window' | 'terminal' | 'mobile' | 'cylinder' | 'pipe' | 'folder' | 'document' | 'hexagon' | 'box'; container?: string; [key: string]: unknown }
279
+ /** A C4 relationship's props: its technology (its `label` is its description). */
280
+ export interface C4RelationshipProps { technology?: string; [key: string]: unknown }
236
281
  /** What a line means, drawn as its colour: calls (the default), feeds (hands work on), triggers (suggests, offers, fires),
237
282
  * state (reads or writes a file, board or config: a thinner line, a muted label, no flow) and guard (a hook steps in).
238
283
  * Colours are --um-w-<kind>. An edge's `style` (emphasis, dashed, security) wins over its kind's colour. */
@@ -550,7 +595,9 @@ export type Command =
550
595
  | { op: 'move'; id: string; view: string; index: number; owner?: never }
551
596
  | { op: 'hide'; id: string; view: string }
552
597
  | { op: 'delete'; id: string }
553
- | { op: 'reparent'; id: string; parent: string | null };
598
+ | { op: 'reparent'; id: string; parent: string | null }
599
+ /** 0.24.0: a view added to `views` (at `index`, else last); refused when its id is taken. No command deletes a view. */
600
+ | { op: 'addView'; view: MapView; index?: number };
554
601
  /** The model after a transaction: one command, or a list run in order, on a copy (0.17.0). A command that cannot run
555
602
  * throws, and none of the transaction is applied. `delete` takes with it the element's members, what it owns, the lines
556
603
  * to them and every place that names them (references()); one already gone in the same transaction is passed over.
package/lib/umlimator.js CHANGED
@@ -133,7 +133,9 @@ const diagramOf = view => TYPES.get(view && view.diagram != null ? view.diagram
133
133
  lib/umlimator-all.js holds (tools/build.mjs): rows, rooms and routes in layoutPass, a typed line's ends in svgOf, the
134
134
  gestures of edit.js it takes over (edit), diff()'s words for typed models (diff, order: src/uml/diff.js). Empty in
135
135
  umlimator.js, where no view is laid out but as a map (risks.md C5).
136
- Stage 6's: across(model), validate()'s rules on the whole model; fields(model, x), more panel fields (notes/stage-6.md §5) */
136
+ Stage 6's: across(model), validate()'s rules on the whole model; fields(model, x), more panel fields (notes/stage-6.md §5)
137
+ Milestone 2's (notes/milestone-2.md §6.3, §9): unfolds; text(model, view, id), the PDF's line text; ENDS open to
138
+ families */
137
139
  const TYPED = {};
138
140
 
139
141
  const propRefs = type => Object.assign({}, ...[...TYPES.values()].map(T => T.refs && Object.hasOwn(T.refs, type) && T.refs[type]));
@@ -209,6 +211,9 @@ export function history(model, limit = 100) {
209
211
  transaction is passed over, so a selection deletes in one transaction (E2).
210
212
  What it held and stays goes to its nearest owner left
211
213
  reparent { id, parent } a new owner by `parent`, or none with parent null
214
+ addView { view, index? } a view, added to views at index (else at the end); refused when its id is
215
+ a view's already, or it is not an object with a string id. Nothing else is
216
+ checked: validate() says what it lacks (notes/milestone-2.md §6.2)
212
217
  An element is a node, a member, a model line or a view's own line or item with an id, or a fragment (schema version 2's
213
218
  id space). */
214
219
 
@@ -401,7 +406,14 @@ function run(m, c, gone) {
401
406
  e.x.parent = c.parent;
402
407
  return;
403
408
  }
404
- default: throw new Error(`${JSON.stringify(c.op)} is not a command (set, add, move, hide, delete, reparent)`);
409
+ case 'addView': {
410
+ const v = c.view, list = (m.views ||= []);
411
+ if (!isObj(v) || typeof v.id !== 'string') throw new Error('addView: a view is an object with a string id');
412
+ if (list.some(x => isObj(x) && x.id === v.id)) throw new Error(`addView: view "${v.id}" is there already`);
413
+ list.splice(place(list, c.index), 0, structuredClone(v));
414
+ return;
415
+ }
416
+ default: throw new Error(`${JSON.stringify(c.op)} is not a command (set, add, move, hide, delete, reparent, addView)`);
405
417
  }
406
418
  }
407
419
 
@@ -2354,7 +2366,7 @@ function mapContext(model, opts = {}) {
2354
2366
  // the inner view's own cards: those this view shows neither as cards nor as boxes (a card unfolded here already is one, #98)
2355
2367
  const ownOf = (v, C, nid) => (C.nodeIds || []).filter(i => N[i] && i !== nid && !(v.nodeIds || []).includes(i) && !(v.containers || []).some(b => b && b.id === i));
2356
2368
  const unfoldable = (nid, vid) => { const v = V[vid], ids = (v && v.nodeIds) || [], c = ids.includes(nid) && N[nid] && v.render !== 'sequence' ? childOf(nid, vid) : null;
2357
- if (!c || c === vid || chain(vid).includes(c) || (v.containers || []).some(b => b && b.id === nid) || V[c].diagram != v.diagram) return null;
2369
+ if (!c || c === vid || chain(vid).includes(c) || (v.containers || []).some(b => b && b.id === nid) || V[c].diagram != v.diagram || v.diagram && v.diagram != 'map' && !(diagramOf(v) || {}).unfolds) return null;
2358
2370
  return ownOf(v, V[c], nid).length ? c : null; };
2359
2371
  function unfold(vid, nid) {
2360
2372
  const v = V[vid], c = unfoldable(nid, vid); if (!c) return false;
@@ -5826,8 +5838,8 @@ function tablesOf({ D, N, nodeIn, viewEdges }, v, g) {
5826
5838
  return `<tr><td>${d.step ? `<i class="num">${esc(d.step)}</i>` : ''}<b>${esc(c.label || id)}</b>${d.kids || d.opens ? ' ⤢' : ''}${sub ? `<small>${esc(sub)}</small>` : ''}</td>`
5827
5839
  + (typed ? `<td>${esc(T.word?.(D, id) ?? word(c.type || 'uml.Class'))}</td><td>${(Array.isArray(rs) ? rs : arrOf(c.members).filter(m => m && typeof m === 'object').map(m => asText(m))).map(r => `<p>${esc(r)}</p>`).join('')}</td></tr>`
5828
5840
  : `<td><i class="sw" style="border-color:var(--um-${t[0]});background:var(--um-${t[0]}-f)"></i>${t[1]}</td><td>${c.what ? md(c.what) : ''}</td></tr>`); }) },
5829
- { title: `Lines <span>${es.length}</span>`, cls: 'lines', head: `${seq || stepped ? '<th class="n">#</th>' : ''}<th>From → to</th><th>Label</th><th>${typed ? 'Kind' : 'Technology'}</th>`, rows: (stepped && !seq ? [...es].sort((a, b) => stepOrder(a.step, b.step)) : es).map((e, i) => { const w = wk.get(e._id) || 'calls';
5830
- return `<tr>${seq ? `<td>${i + 1}</td>` : stepped ? `<td>${esc(e.step ?? '')}</td>` : ''}<td><i class="w" style="border-color:var(--um-w-${w})"></i>${name(v, e.from)} → ${name(v, e.to)}</td><td>${e.label ? esc(e.label) : typed ? '' : `<span class="up">${w}</span>`}</td><td>${esc(typed ? word(e.type) : e.sublabel || '')}</td></tr>`; }) },
5841
+ { title: `Lines <span>${es.length}</span>`, cls: 'lines', head: `${seq || stepped ? '<th class="n">#</th>' : ''}<th>From → to</th><th>Label</th><th>${typed ? 'Kind' : 'Technology'}</th>`, rows: (stepped && !seq ? [...es].sort((a, b) => stepOrder(a.step, b.step)) : es).map((e, i) => { const w = wk.get(e._id) || 'calls', t = typed && T.text?.(D, v, e._id); // a type's text for the line (S17), else its label
5842
+ return `<tr>${seq ? `<td>${i + 1}</td>` : stepped ? `<td>${esc(e.step ?? '')}</td>` : ''}<td><i class="w" style="border-color:var(--um-w-${w})"></i>${name(v, e.from)} → ${name(v, e.to)}</td><td>${t || e.label ? esc(t || e.label) : typed ? '' : `<span class="up">${w}</span>`}</td><td>${esc(typed ? word(e.type) : e.sublabel || '')}</td></tr>`; }) },
5831
5843
  { title: `Boxes <span>${held.length}</span>`, cls: 'boxes', head: '<th>Box</th><th>Holds</th>', rows: held.map(([c, ins]) => `<tr><td><b>${esc(c.label || c.id)}</b></td><td>${andList(ins.map(i => name(v, i)))}</td></tr>`) },
5832
5844
  ];
5833
5845
  }
@@ -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). 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).",
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). The entity-relationship diagram (er, 0.24.0): er.Entity and uml.Comment; an entity's members er.Column. The flowchart (flowchart, 0.24.0): flow.Terminator, flow.Process, flow.Decision, flow.InputOutput, flow.PredefinedProcess, flow.Document, flow.Database, flow.ManualInput, flow.Delay, flow.Connector and uml.Comment. The data flow diagram (dfd, 0.24.0): dfd.Process, dfd.DataStore, dfd.ExternalEntity and uml.Comment. The information flow diagram (uml.information-flow, 0.24.0): uml.Class, uml.Interface, uml.Component, uml.Actor, uml.InformationItem and uml.Comment. C4 (c4.landscape, c4.context, c4.container, c4.component, c4.dynamic, c4.deployment, 0.24.0): c4.Person, c4.SoftwareSystem, c4.Container (owned by a software system), c4.Component (owned by a container), c4.DeploymentNode (owned by a deployment node or none), c4.ContainerInstance (owned by a deployment node) and uml.Comment.",
415
415
  "examples": [
416
416
  "uml.Class",
417
417
  "uml.Interface",
@@ -443,14 +443,36 @@
443
443
  "uml.CollaborationUse",
444
444
  "uml.Profile",
445
445
  "uml.Stereotype",
446
- "uml.MetaclassReference"
446
+ "uml.MetaclassReference",
447
+ "er.Entity",
448
+ "er.Column",
449
+ "flow.Terminator",
450
+ "flow.Process",
451
+ "flow.Decision",
452
+ "flow.InputOutput",
453
+ "flow.PredefinedProcess",
454
+ "flow.Document",
455
+ "flow.Database",
456
+ "flow.ManualInput",
457
+ "flow.Delay",
458
+ "flow.Connector",
459
+ "dfd.Process",
460
+ "dfd.DataStore",
461
+ "dfd.ExternalEntity",
462
+ "uml.InformationItem",
463
+ "c4.Person",
464
+ "c4.SoftwareSystem",
465
+ "c4.Container",
466
+ "c4.Component",
467
+ "c4.DeploymentNode",
468
+ "c4.ContainerInstance"
447
469
  ]
448
470
  },
449
471
  "parent": {
450
472
  "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)."
451
473
  },
452
474
  "props": {
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).",
475
+ "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). The entity-relationship diagram (er, 0.24.0): a column's dataType, primaryKey, foreignKey, references (a column id), nullable and unique (docs/conformance/er.md). The data flow diagram (dfd, 0.24.0): a process's or a store's number (docs/conformance/dfd.md). C4 (0.24.0): an element's description, technology, external and shape (a map card shape: person, robot, browser, window, terminal, mobile, cylinder, pipe, folder, document, hexagon, box); a container instance's container (docs/conformance/c4.md).",
454
476
  "anyOf": [
455
477
  {
456
478
  "type": "object",
@@ -506,6 +528,56 @@
506
528
  "items": {
507
529
  "type": "string"
508
530
  }
531
+ },
532
+ "dataType": {
533
+ "description": "er.Column (0.24.0): its type, as text (bigint, varchar(80))."
534
+ },
535
+ "primaryKey": {
536
+ "description": "er.Column (0.24.0): true puts it in the key, drawn first under PK."
537
+ },
538
+ "foreignKey": {
539
+ "description": "er.Column (0.24.0): true marks it FK; it should name what it references."
540
+ },
541
+ "references": {
542
+ "description": "er.Column (0.24.0): the id of the column it references (a declared reference, dropped when that column is deleted)."
543
+ },
544
+ "nullable": {
545
+ "description": "er.Column (0.24.0): true allows no value (NULL); an IDEF1X optional parent where it carries a foreign key."
546
+ },
547
+ "unique": {
548
+ "description": "er.Column (0.24.0): true marks it UK."
549
+ },
550
+ "number": {
551
+ "description": "dfd.Process, dfd.DataStore (0.24.0): its number, as text (1, 1.2, D1), checked under its parent process's."
552
+ },
553
+ "description": {
554
+ "description": "A C4 element (0.24.0): what it is and does, drawn under its name."
555
+ },
556
+ "technology": {
557
+ "description": "c4.Container, c4.Component, c4.DeploymentNode (0.24.0): drawn as [Container: technology]."
558
+ },
559
+ "external": {
560
+ "description": "A C4 person or software system (0.24.0): true draws it grey, outside the organisation."
561
+ },
562
+ "container": {
563
+ "description": "c4.ContainerInstance (0.24.0): the id of the container it is an instance of (a declared reference: deleting the container deletes its instances)."
564
+ },
565
+ "shape": {
566
+ "description": "A C4 element (0.24.0): one of the map's card shapes; a person is person and every other element box without it.",
567
+ "examples": [
568
+ "person",
569
+ "robot",
570
+ "browser",
571
+ "window",
572
+ "terminal",
573
+ "mobile",
574
+ "cylinder",
575
+ "pipe",
576
+ "folder",
577
+ "document",
578
+ "hexagon",
579
+ "box"
580
+ ]
509
581
  }
510
582
  }
511
583
  },
@@ -888,7 +960,7 @@
888
960
  "description": "When the line is used."
889
961
  },
890
962
  "type": {
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).",
963
+ "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). The entity-relationship diagram (er, 0.24.0): er.Relationship (from the referenced entity to the referring one) and uml.CommentLink. The flowchart (flowchart, 0.24.0): flow.Flow (a decision's exits labelled) and uml.CommentLink. The data flow diagram (dfd, 0.24.0): dfd.DataFlow and uml.CommentLink. The information flow diagram (uml.information-flow, 0.24.0): uml.InformationFlow (props.conveyed) and uml.CommentLink. C4 (0.24.0): c4.Relationship (its label the description, props.technology) and uml.CommentLink; a dynamic view's edges list relationship ids, each once, in time order.",
892
964
  "examples": [
893
965
  "uml.Association",
894
966
  "uml.Generalization",
@@ -912,20 +984,25 @@
912
984
  "uml.CommunicationPath",
913
985
  "uml.RoleBinding",
914
986
  "uml.Extension",
915
- "uml.ProfileApplication"
987
+ "uml.ProfileApplication",
988
+ "er.Relationship",
989
+ "flow.Flow",
990
+ "dfd.DataFlow",
991
+ "uml.InformationFlow",
992
+ "c4.Relationship"
916
993
  ]
917
994
  },
918
995
  "parent": {
919
996
  "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."
920
997
  },
921
998
  "props": {
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.",
999
+ "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. The entity-relationship diagram (er, 0.24.0): a relationship's identifying and ends.<from|to>.multiplicity (1, 0..1, 1..*, 0..*; other bounds, such as 2..5 or 3, drawn as the nearest of the four with their text). The information flow diagram (uml.information-flow, 0.24.0): a flow's conveyed, ids of information items or classifiers (docs/conformance/uml-information-flow.md). C4 (0.24.0): a relationship's technology.",
923
1000
  "anyOf": [
924
1001
  {
925
1002
  "type": "object",
926
1003
  "properties": {
927
1004
  "ends": {
928
- "description": "uml.Association: { from, to }, each end's role, multiplicity, aggregation and navigability. uml.Link: each end's role. uml.Connector (composite structure, 0.22.0): an end through a part, { part }: the end (from or to) is a port of the part's type, reached through that part.",
1005
+ "description": "uml.Association: { from, to }, each end's role, multiplicity, aggregation and navigability. uml.Link: each end's role. uml.Connector (composite structure, 0.22.0): an end through a part, { part }: the end (from or to) is a port of the part's type, reached through that part. er.Relationship (0.24.0): each end's multiplicity (1, 0..1, 1..*, 0..*; other bounds, such as 2..5 or 3, drawn as the nearest of the four with their text), drawn as the view's notation says.",
929
1006
  "anyOf": [
930
1007
  {
931
1008
  "type": "object",
@@ -1041,6 +1118,15 @@
1041
1118
  "receivedAt": {
1042
1119
  "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
1120
  "type": "number"
1121
+ },
1122
+ "identifying": {
1123
+ "description": "er.Relationship (0.24.0): true draws it solid (the child's key holds the parent's), false dashed."
1124
+ },
1125
+ "conveyed": {
1126
+ "description": "uml.InformationFlow (0.24.0): the ids of the information items or classifiers it conveys, drawn after «flow»; a deleted id is dropped."
1127
+ },
1128
+ "technology": {
1129
+ "description": "c4.Relationship (0.24.0): drawn as [technology] after its description."
1044
1130
  }
1045
1131
  }
1046
1132
  },
@@ -1322,7 +1408,7 @@
1322
1408
  "description": "Guess a line's kind from its label's words when its edges name none (render() and layout(); the standalone page always does)."
1323
1409
  },
1324
1410
  "diagram": {
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.",
1411
+ "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), er an entity-relationship diagram, flowchart a flowchart, dfd a data flow diagram, uml.information-flow an information flow diagram, and c4.landscape, c4.context, c4.container, c4.component, c4.dynamic and c4.deployment C4's six views (0.24.0); a type this release does not draw is drawn as plain cards, with a warning.",
1326
1412
  "examples": [
1327
1413
  "uml.class",
1328
1414
  "uml.object",
@@ -1337,17 +1423,27 @@
1337
1423
  "uml.deployment",
1338
1424
  "uml.composite-structure",
1339
1425
  "uml.profile",
1340
- "uml.timing"
1426
+ "uml.timing",
1427
+ "uml.information-flow",
1428
+ "er",
1429
+ "flowchart",
1430
+ "dfd",
1431
+ "c4.landscape",
1432
+ "c4.context",
1433
+ "c4.container",
1434
+ "c4.component",
1435
+ "c4.dynamic",
1436
+ "c4.deployment"
1341
1437
  ]
1342
1438
  },
1343
1439
  "subject": {
1344
- "description": "Schema version 2: the element this diagram is the inside of. In a class, object or package view, the package names are qualified from (sales::Order without sales:: in a view of sales); not drawn unless the view lists it. In a composite structure view (0.22.0): the class, component or collaboration whose parts and ports it draws, listed in nodeIds."
1440
+ "description": "Schema version 2: the element this diagram is the inside of. In a class, object or package view, the package names are qualified from (sales::Order without sales:: in a view of sales); not drawn unless the view lists it. In a composite structure view (0.22.0): the class, component or collaboration whose parts and ports it draws, listed in nodeIds. In a C4 view (0.24.0): the software system or container it zooms into, drawn as a boundary when nodeIds lists it."
1345
1441
  },
1346
1442
  "direction": {
1347
1443
  "description": "Schema version 2: a typed view's layout direction (default right). A map stays left to right. A sequence view is always down; another direction is a warning."
1348
1444
  },
1349
1445
  "notation": {
1350
- "description": "Schema version 2: a skin of the diagram type (crowsfoot for er)."
1446
+ "description": "Schema version 2: a skin of the diagram type, drawn on one geometry: crowsfoot (default) or idef1x for er, yourdon (default) or gane-sarson for dfd (0.24.0)."
1351
1447
  },
1352
1448
  "present": {
1353
1449
  "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).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umlimator",
3
- "version": "0.23.0",
3
+ "version": "0.24.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/",