umlimator 0.16.1 → 0.18.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.
@@ -16,6 +16,9 @@
16
16
  "type": "string",
17
17
  "description": "The map's title."
18
18
  },
19
+ "schemaVersion": {
20
+ "description": "1 (or none): a map, read as always. 2: it may hold typed elements and typed views (docs/diagrams/model.md). A newer version is an error (0.17.0)."
21
+ },
19
22
  "root": {
20
23
  "type": "string",
21
24
  "description": "The view shown first (default: the view with no parent)."
@@ -414,6 +417,108 @@
414
417
  }
415
418
  }
416
419
  }
420
+ },
421
+ "type": {
422
+ "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.",
423
+ "examples": [
424
+ "uml.Class",
425
+ "uml.Interface",
426
+ "uml.Enumeration",
427
+ "uml.DataType",
428
+ "uml.PrimitiveType",
429
+ "uml.Package",
430
+ "uml.Comment"
431
+ ]
432
+ },
433
+ "parent": {
434
+ "description": "Schema version 2: the element that owns it (a package, a composite state, a lane)."
435
+ },
436
+ "props": {
437
+ "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).",
438
+ "anyOf": [
439
+ {
440
+ "type": "object",
441
+ "properties": {
442
+ "isAbstract": {
443
+ "description": "uml.Class, uml.Operation: true draws the name in italics ({abstract} in a member's text)."
444
+ },
445
+ "stereotypes": {
446
+ "description": "Any UML element: names drawn «in guillemets», as text (['entity'])."
447
+ }
448
+ }
449
+ },
450
+ true
451
+ ]
452
+ },
453
+ "members": {
454
+ "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).",
455
+ "anyOf": [
456
+ {
457
+ "type": "array",
458
+ "items": {
459
+ "description": "A member: { id, type, label, props }, in the same envelope as a node.",
460
+ "anyOf": [
461
+ {
462
+ "type": "object",
463
+ "properties": {
464
+ "id": {
465
+ "description": "Unique among every node, edge and member of the model."
466
+ },
467
+ "type": {
468
+ "description": "uml.Property, uml.Operation or uml.EnumerationLiteral in a class diagram."
469
+ },
470
+ "label": {
471
+ "description": "The member's name; the rest of its UML text is in props."
472
+ },
473
+ "props": {
474
+ "description": "The member's UML text as fields: + {static} /total: Money [1] = 0.",
475
+ "anyOf": [
476
+ {
477
+ "type": "object",
478
+ "properties": {
479
+ "isAbstract": {
480
+ "description": "uml.Class, uml.Operation: true draws the name in italics ({abstract} in a member's text)."
481
+ },
482
+ "stereotypes": {
483
+ "description": "Any UML element: names drawn «in guillemets», as text (['entity'])."
484
+ },
485
+ "visibility": {
486
+ "description": "uml.Property, uml.Operation: public, private, protected or package (+ - # ~)."
487
+ },
488
+ "valueType": {
489
+ "description": "uml.Property, and each of an operation's parameters: its type, as text (Money, String[], Map<K, V>)."
490
+ },
491
+ "multiplicity": {
492
+ "description": "uml.Property: 1, *, n..m or n..* (0..1, 1..*), kept as written."
493
+ },
494
+ "default": {
495
+ "description": "uml.Property: its default value, as text."
496
+ },
497
+ "isStatic": {
498
+ "description": "uml.Property, uml.Operation: true underlines it ({static} in its text)."
499
+ },
500
+ "isDerived": {
501
+ "description": "uml.Property: true writes / before its name."
502
+ },
503
+ "parameters": {
504
+ "description": "uml.Operation: [{ name, valueType, direction }], direction in, out, inout or return."
505
+ },
506
+ "returnType": {
507
+ "description": "uml.Operation: its return type, as text."
508
+ }
509
+ }
510
+ },
511
+ true
512
+ ]
513
+ }
514
+ }
515
+ },
516
+ true
517
+ ]
518
+ }
519
+ },
520
+ true
521
+ ]
417
522
  }
418
523
  }
419
524
  },
@@ -700,6 +805,90 @@
700
805
  "when": {
701
806
  "type": "string",
702
807
  "description": "When the line is used."
808
+ },
809
+ "type": {
810
+ "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).",
811
+ "examples": [
812
+ "uml.Association",
813
+ "uml.Generalization",
814
+ "uml.InterfaceRealization",
815
+ "uml.Dependency",
816
+ "uml.CommentLink"
817
+ ]
818
+ },
819
+ "parent": {
820
+ "description": "Schema version 2: the element that owns it (a package, a composite state, a lane)."
821
+ },
822
+ "props": {
823
+ "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).",
824
+ "anyOf": [
825
+ {
826
+ "type": "object",
827
+ "properties": {
828
+ "ends": {
829
+ "description": "uml.Association: { from, to }, each end's role, multiplicity, aggregation and navigability.",
830
+ "anyOf": [
831
+ {
832
+ "type": "object",
833
+ "properties": {
834
+ "from": {
835
+ "description": "One end of an association.",
836
+ "anyOf": [
837
+ {
838
+ "type": "object",
839
+ "properties": {
840
+ "role": {
841
+ "description": "The role name, drawn by the end."
842
+ },
843
+ "multiplicity": {
844
+ "description": "Drawn by the end: 1, *, n..m or n..*."
845
+ },
846
+ "aggregation": {
847
+ "description": "none, shared (a hollow diamond at this end) or composite (a filled diamond; its multiplicity at most 1)."
848
+ },
849
+ "navigable": {
850
+ "description": "true draws an open arrowhead at this end."
851
+ }
852
+ }
853
+ },
854
+ true
855
+ ]
856
+ },
857
+ "to": {
858
+ "description": "One end of an association.",
859
+ "anyOf": [
860
+ {
861
+ "type": "object",
862
+ "properties": {
863
+ "role": {
864
+ "description": "The role name, drawn by the end."
865
+ },
866
+ "multiplicity": {
867
+ "description": "Drawn by the end: 1, *, n..m or n..*."
868
+ },
869
+ "aggregation": {
870
+ "description": "none, shared (a hollow diamond at this end) or composite (a filled diamond; its multiplicity at most 1)."
871
+ },
872
+ "navigable": {
873
+ "description": "true draws an open arrowhead at this end."
874
+ }
875
+ }
876
+ },
877
+ true
878
+ ]
879
+ }
880
+ }
881
+ },
882
+ true
883
+ ]
884
+ },
885
+ "stereotypes": {
886
+ "description": "Any UML element: names drawn «in guillemets», as text (['entity'])."
887
+ }
888
+ }
889
+ },
890
+ true
891
+ ]
703
892
  }
704
893
  }
705
894
  },
@@ -939,6 +1128,53 @@
939
1128
  "kindsFromLabels": {
940
1129
  "type": "boolean",
941
1130
  "description": "Guess a line's kind from its label's words when its edges name none (render() and layout(); the standalone page always does)."
1131
+ },
1132
+ "diagram": {
1133
+ "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); a type this release does not draw is drawn as plain cards, with a warning.",
1134
+ "examples": [
1135
+ "uml.class"
1136
+ ]
1137
+ },
1138
+ "subject": {
1139
+ "description": "Schema version 2: the element this diagram is the inside of."
1140
+ },
1141
+ "direction": {
1142
+ "description": "Schema version 2: a typed view's layout direction (default right). A map stays left to right."
1143
+ },
1144
+ "notation": {
1145
+ "description": "Schema version 2: a skin of the diagram type (crowsfoot for er)."
1146
+ },
1147
+ "present": {
1148
+ "description": "Schema version 2: what the layout cannot derive, per element: collapsed compartments, rows shown before +n more.",
1149
+ "anyOf": [
1150
+ {
1151
+ "type": "object",
1152
+ "additionalProperties": {
1153
+ "description": "What a view shows of one element, by its id.",
1154
+ "anyOf": [
1155
+ {
1156
+ "type": "object",
1157
+ "properties": {
1158
+ "collapsed": {
1159
+ "description": "Compartments not drawn, divider and all: ['attributes', 'operations'] (an enumeration's: 'literals')."
1160
+ },
1161
+ "rows": {
1162
+ "description": "At most this many rows in each compartment, then \"+k more\"."
1163
+ }
1164
+ }
1165
+ },
1166
+ true
1167
+ ]
1168
+ }
1169
+ },
1170
+ true
1171
+ ]
1172
+ },
1173
+ "fragments": {
1174
+ "description": "Schema version 2: a sequence view's combined fragments and interaction uses."
1175
+ },
1176
+ "timeline": {
1177
+ "description": "Schema version 2: a timing view's unit, changes and constraints."
942
1178
  }
943
1179
  }
944
1180
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umlimator",
3
- "version": "0.16.1",
3
+ "version": "0.18.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/",
@@ -9,8 +9,9 @@
9
9
  "license": "MIT",
10
10
  "type": "module",
11
11
  "exports": { ".": { "types": "./lib/umlimator.d.ts", "default": "./lib/umlimator.js" }, "./theme.css": "./lib/umlimator-theme.css", "./schema.json": "./lib/umlimator.schema.json",
12
+ "./all": { "types": "./lib/umlimator.d.ts", "default": "./lib/umlimator-all.js" },
12
13
  "./element": "./lib/umlimator-element.js", "./markdown-it": "./lib/umlimator-markdown-it.js", "./remark": "./lib/umlimator-remark.js" },
13
14
  "files": ["lib/", "LICENSE", "THIRD_PARTY_NOTICES.md"],
14
- "scripts": { "test": "node --test" },
15
+ "scripts": { "test": "node --test", "build": "node tools/build.mjs" },
15
16
  "engines": { "node": ">=18" }
16
17
  }