umlimator 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,7 +48,9 @@ export interface MapNode {
48
48
  /** A typed element in schema version 2's envelope (docs/diagrams/model.md §1): a node, a member, a typed edge, a
49
49
  * fragment. Nodes, edges, members and fragments share one id space; an id never contains "->". A typed edge is an
50
50
  * Element with `from` and `to`, which may name a member. A typed view is a MapView with `diagram` (uml.class), and may
51
- * have `subject`, `direction` ('right' | 'down'), `notation`, `present`, `fragments` and `timeline`. umlimator/all draws `uml.class` (0.18.0); other types draw as plain cards. */
51
+ * 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); other types draw as plain cards.
52
+ * From 0.19.0 those three draw a shown package that owns something the view shows as a box holding it (`parent`), and
53
+ * qualify names (`sales::Order`) from the nearest shown owner, the view's `subject`, or the top. */
52
54
  export interface Element {
53
55
  id: string; type: string; label?: string; parent?: string; props?: Record<string, unknown>; members?: Element[];
54
56
  [key: string]: unknown;
@@ -75,6 +77,25 @@ export interface UmlOperationProps {
75
77
  export interface UmlAssociationEnd { role?: string; multiplicity?: string; aggregation?: 'none' | 'shared' | 'composite'; navigable?: boolean }
76
78
  /** A line's props: an association's two ends, and stereotypes («use» on a dependency). */
77
79
  export interface UmlLineProps { ends?: { from?: UmlAssociationEnd; to?: UmlAssociationEnd }; stereotypes?: string[]; [key: string]: unknown }
80
+ /** The object diagram's vocabulary (a view with `diagram: 'uml.object'`, umlimator/all from 0.19.0;
81
+ * docs/conformance/uml-object.md). An instance with no `label` is anonymous (drawn `: Order`); a slot's `label` is the
82
+ * feature it gives a value. A classifier node an object view shows is drawn as in a class view. */
83
+ export type UmlObjectElementType = 'uml.InstanceSpecification' | 'uml.Package' | 'uml.Comment';
84
+ export type UmlObjectMemberType = 'uml.Slot';
85
+ export type UmlObjectLineType = 'uml.Link' | 'uml.CommentLink';
86
+ /** An instance's props: its classifier by name or qualified name, as text (docs/diagrams/risks.md M8). */
87
+ export interface UmlInstanceProps { classifier?: string; stereotypes?: string[]; [key: string]: unknown }
88
+ /** A slot's props: its value as text; with none, the slot is drawn by its feature alone. */
89
+ export interface UmlSlotProps { value?: string; [key: string]: unknown }
90
+ /** A link's props: the association it is an instance of, by name, and the roles at its ends. */
91
+ export interface UmlLinkProps { association?: string; ends?: { from?: { role?: string }; to?: { role?: string } }; stereotypes?: string[]; [key: string]: unknown }
92
+ /** The package diagram's vocabulary (a view with `diagram: 'uml.package'`, umlimator/all from 0.19.0;
93
+ * docs/conformance/uml-package.md): packages and the class diagram's classifiers, drawn by their names. An import or
94
+ * a merge runs from the importing or merging package. */
95
+ export type UmlPackageElementType = 'uml.Package' | 'uml.Class' | 'uml.Interface' | 'uml.Enumeration' | 'uml.DataType' | 'uml.PrimitiveType' | 'uml.Comment';
96
+ export type UmlPackageLineType = 'uml.PackageImport' | 'uml.PackageMerge' | 'uml.Dependency' | 'uml.CommentLink';
97
+ /** A package import's props: public (the default) is drawn «import», private «access». */
98
+ export interface UmlPackageImportProps { visibility?: 'public' | 'private'; stereotypes?: string[]; [key: string]: unknown }
78
99
  /** What a typed view shows of one element, in its `present` by the element's id: compartments not drawn, divider and
79
100
  * all, and at most `rows` rows in each, then "+k more". */
80
101
  export interface UmlPresent { collapsed?: ('attributes' | 'operations' | 'literals')[]; rows?: number }