@meltemi/diagrams-model 1.10.0 → 1.10.18
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/dist/c4.d.ts.map +1 -1
- package/dist/c4.js +7 -0
- package/dist/c4.js.map +1 -1
- package/dist/diagram-types.d.ts.map +1 -1
- package/dist/diagram-types.js +6 -0
- package/dist/diagram-types.js.map +1 -1
- package/dist/diff.d.ts +1 -1
- package/dist/diff.d.ts.map +1 -1
- package/dist/diff.js +23 -0
- package/dist/diff.js.map +1 -1
- package/dist/flow.d.ts +60 -10
- package/dist/flow.d.ts.map +1 -1
- package/dist/flow.js +405 -67
- package/dist/flow.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +29 -0
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +19 -1
- package/dist/json.js.map +1 -1
- package/dist/messages/changes.d.ts +1 -0
- package/dist/messages/changes.d.ts.map +1 -1
- package/dist/messages/changes.js +2 -0
- package/dist/messages/changes.js.map +1 -1
- package/dist/messages/en.d.ts +67 -3
- package/dist/messages/en.d.ts.map +1 -1
- package/dist/messages/en.js +77 -9
- package/dist/messages/en.js.map +1 -1
- package/dist/messages/es.d.ts.map +1 -1
- package/dist/messages/es.js +45 -8
- package/dist/messages/es.js.map +1 -1
- package/dist/messages/index.d.ts +36 -2
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/outline.d.ts +2 -2
- package/dist/outline.d.ts.map +1 -1
- package/dist/outline.js +9 -3
- package/dist/outline.js.map +1 -1
- package/dist/scenario.d.ts +15 -2
- package/dist/scenario.d.ts.map +1 -1
- package/dist/scenario.js +37 -1
- package/dist/scenario.js.map +1 -1
- package/dist/schema.d.ts +82 -11
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +106 -7
- package/dist/schema.js.map +1 -1
- package/dist/sequence.d.ts.map +1 -1
- package/dist/sequence.js +252 -12
- package/dist/sequence.js.map +1 -1
- package/dist/story.d.ts +8 -0
- package/dist/story.d.ts.map +1 -1
- package/dist/story.js +39 -12
- package/dist/story.js.map +1 -1
- package/dist/style-values.d.ts +9 -0
- package/dist/style-values.d.ts.map +1 -1
- package/dist/style-values.js +82 -27
- package/dist/style-values.js.map +1 -1
- package/dist/types.d.ts +94 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +8 -3
package/dist/outline.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
/** The style properties that make a note or a free text draw an outline a dash can follow. */
|
|
2
2
|
const OUTLINE_PROPERTIES = ["fill", "stroke", "pattern"];
|
|
3
|
+
/**
|
|
4
|
+
* A sticky is always filled, and a fill is no line: only a `stroke` gives its card the outline a
|
|
5
|
+
* dash follows.
|
|
6
|
+
*/
|
|
7
|
+
const STICKY_OUTLINE_PROPERTIES = ["stroke"];
|
|
3
8
|
/**
|
|
4
9
|
* Whether an element draws an outline: its own `style` statements, the classes its declaration or
|
|
5
|
-
* those statements apply, or a `rule <kind>` of the diagram set `fill`, `stroke` or `pattern
|
|
6
|
-
* theme's rules and classes do not count, since the model resolves no theme.
|
|
10
|
+
* those statements apply, or a `rule <kind>` of the diagram set `fill`, `stroke` or `pattern` (a
|
|
11
|
+
* sticky: `stroke`). A theme's rules and classes do not count, since the model resolves no theme.
|
|
7
12
|
*/
|
|
8
13
|
export function outlined(source, element) {
|
|
9
|
-
const
|
|
14
|
+
const names = element.kind === "sticky" ? STICKY_OUTLINE_PROPERTIES : OUTLINE_PROPERTIES;
|
|
15
|
+
const writes = (properties) => names.some((name) => properties[name] !== undefined);
|
|
10
16
|
const entries = source.styles.filter((s) => s.targetKind === "element" && s.target === element.id);
|
|
11
17
|
if (entries.some((entry) => writes(entry.properties)))
|
|
12
18
|
return true;
|
package/dist/outline.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outline.js","sourceRoot":"","sources":["../src/out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AC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;YAAE,OAAO,IAAI,CAAC;IAC/D,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AAC5F,CAAC"}
|
package/dist/scenario.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FlowDiagram, SequenceEvent } from "./types.js";
|
|
1
|
+
import type { FlowDiagram, Relation, SequenceEvent } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* The events of one path through a sequence diagram (decision 0019). Alternatives and critical
|
|
4
4
|
* regions keep their chosen branch, options and breaks are taken or skipped, and loops become their
|
|
@@ -6,6 +6,19 @@ import type { FlowDiagram, SequenceEvent } from "./types.js";
|
|
|
6
6
|
* one iteration and are taken. Message keys of repetitions after the first end in `@k`.
|
|
7
7
|
*/
|
|
8
8
|
export declare function resolveScenario(diagram: FlowDiagram, scenarioId: string): readonly SequenceEvent[] | undefined;
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Every event of a tree, depth first: fragments before their branches' events, calls before the
|
|
11
|
+
* events of their blocks.
|
|
12
|
+
*/
|
|
10
13
|
export declare function flattenEvents(events: readonly SequenceEvent[]): SequenceEvent[];
|
|
14
|
+
/**
|
|
15
|
+
* Where ` as <id>` names a relation: after its label, else after its target; a `return` (whose
|
|
16
|
+
* node is its keyword statement) after its label, else after the keyword.
|
|
17
|
+
*/
|
|
18
|
+
export declare function relationNameAnchor(relation: Relation): number;
|
|
19
|
+
/** Where a relation's label string is: after `:` of a relation, or after `return`; undefined without one. */
|
|
20
|
+
export declare function relationLabelSpan(relation: Relation): {
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
} | undefined;
|
|
11
24
|
//# sourceMappingURL=scenario.d.ts.map
|
package/dist/scenario.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scenario.d.ts","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EAEX,QAAQ,EAER,aAAa,EAEd,MAAM,YAAY,CAAC;AAKpB;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,MAAM,GACjB,SAAS,aAAa,EAAE,GAAG,SAAS,CAItC;AAuFD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,GAAG,aAAa,EAAE,CAW/E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAO7D;AAED,6GAA6G;AAC7G,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAShG"}
|
package/dist/scenario.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isToken } from "@meltemi/diagrams-language";
|
|
1
2
|
/**
|
|
2
3
|
* The events of one path through a sequence diagram (decision 0019). Alternatives and critical
|
|
3
4
|
* regions keep their chosen branch, options and breaks are taken or skipped, and loops become their
|
|
@@ -19,6 +20,15 @@ function suffixed(key, suffix) {
|
|
|
19
20
|
function resolveEvents(events, decisions, suffix) {
|
|
20
21
|
const out = [];
|
|
21
22
|
for (const event of events) {
|
|
23
|
+
if (event.kind === "message" && event.events.length > 0) {
|
|
24
|
+
// A call keeps its block, resolved as a branch is: a loop around it repeats it whole.
|
|
25
|
+
out.push({
|
|
26
|
+
...event,
|
|
27
|
+
key: suffixed(event.key, suffix),
|
|
28
|
+
events: resolveEvents(event.events, decisions, suffix),
|
|
29
|
+
});
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
22
32
|
if (event.kind !== "fragment") {
|
|
23
33
|
out.push(suffix === "" ? event : { ...event, key: suffixed(event.key, suffix) });
|
|
24
34
|
continue;
|
|
@@ -74,7 +84,10 @@ function resolveFragment(fragment, decisions, suffix) {
|
|
|
74
84
|
];
|
|
75
85
|
}
|
|
76
86
|
}
|
|
77
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Every event of a tree, depth first: fragments before their branches' events, calls before the
|
|
89
|
+
* events of their blocks.
|
|
90
|
+
*/
|
|
78
91
|
export function flattenEvents(events) {
|
|
79
92
|
const out = [];
|
|
80
93
|
const visit = (list) => {
|
|
@@ -83,9 +96,32 @@ export function flattenEvents(events) {
|
|
|
83
96
|
if (event.kind === "fragment")
|
|
84
97
|
for (const branch of event.branches)
|
|
85
98
|
visit(branch.events);
|
|
99
|
+
if (event.kind === "message")
|
|
100
|
+
visit(event.events);
|
|
86
101
|
}
|
|
87
102
|
};
|
|
88
103
|
visit(events);
|
|
89
104
|
return out;
|
|
90
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Where ` as <id>` names a relation: after its label, else after its target; a `return` (whose
|
|
108
|
+
* node is its keyword statement) after its label, else after the keyword.
|
|
109
|
+
*/
|
|
110
|
+
export function relationNameAnchor(relation) {
|
|
111
|
+
return (relationLabelSpan(relation)?.end ??
|
|
112
|
+
(relation.node.kind === "RelationStatement"
|
|
113
|
+
? relation.node.target.end
|
|
114
|
+
: relation.node.keyword.end));
|
|
115
|
+
}
|
|
116
|
+
/** Where a relation's label string is: after `:` of a relation, or after `return`; undefined without one. */
|
|
117
|
+
export function relationLabelSpan(relation) {
|
|
118
|
+
const node = relation.node;
|
|
119
|
+
if (node.kind === "RelationStatement") {
|
|
120
|
+
return node.label && isToken(node.label)
|
|
121
|
+
? { start: node.label.start, end: node.label.end }
|
|
122
|
+
: undefined;
|
|
123
|
+
}
|
|
124
|
+
const label = node.args[0];
|
|
125
|
+
return label?.kind === "StringLiteral" ? { start: label.start, end: label.end } : undefined;
|
|
126
|
+
}
|
|
91
127
|
//# sourceMappingURL=scenario.js.map
|
package/dist/scenario.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scenario.js","sourceRoot":"","sources":["../src/scenario.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAarD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAoB,EACpB,UAAkB;IAElB,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC;IACpE,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,OAAO,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,WAAW,CAAC,QAA0B;IAC7C,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW,EAAE,MAAc;IAC3C,OAAO,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,MAAM,EAAE,CAAC;AACjD,CAAC;AAED,S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I,KAAK,mBAAmB;YACzC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG;YAC1B,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAC/B,CAAC;AACJ,CAAC;AAED,6GAA6G;AAC7G,MAAM,UAAU,iBAAiB,CAAC,QAAkB;IAClD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,IAAI,IAAI,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;YACtC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;YAClD,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3B,OAAO,KAAK,EAAE,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9F,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -6,8 +6,11 @@ export type ValueSpec = {
|
|
|
6
6
|
readonly kind: "enum";
|
|
7
7
|
readonly values: readonly string[];
|
|
8
8
|
readonly default?: string;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
/** A quoted string; with `nonEmpty`, one with some text, such as a font stack. */
|
|
11
|
+
| {
|
|
10
12
|
readonly kind: "string";
|
|
13
|
+
readonly nonEmpty?: boolean;
|
|
11
14
|
} | {
|
|
12
15
|
readonly kind: "icon";
|
|
13
16
|
}
|
|
@@ -69,6 +72,13 @@ export type ValueSpec = {
|
|
|
69
72
|
/** A quoted `http:`, `https:` or `mailto:` URL, or a relative one. */
|
|
70
73
|
| {
|
|
71
74
|
readonly kind: "url";
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* `tag "Text"`: one line of quoted text, not empty, written any number of times in a block (a
|
|
78
|
+
* sequence message's or participant's), each a pill of its owner.
|
|
79
|
+
*/
|
|
80
|
+
| {
|
|
81
|
+
readonly kind: "tag";
|
|
72
82
|
};
|
|
73
83
|
export type PropertyTable = Readonly<Record<string, ValueSpec>>;
|
|
74
84
|
export declare const DIRECTIONS: readonly ["LR", "RL", "TB", "BT"];
|
|
@@ -96,7 +106,7 @@ export declare const ANIMATION_DEFAULT_DURATIONS: {
|
|
|
96
106
|
/** Element kinds of flow diagrams. */
|
|
97
107
|
export declare const ELEMENT_KINDS: readonly ["node", "decision", "data", "group", "note", "tag"];
|
|
98
108
|
/** Object kinds of free diagrams. */
|
|
99
|
-
export declare const FREE_ELEMENT_KINDS: readonly ["box", "text", "icon", "image", "note", "line", "group"];
|
|
109
|
+
export declare const FREE_ELEMENT_KINDS: readonly ["box", "text", "icon", "image", "note", "sticky", "line", "pen", "group"];
|
|
100
110
|
/** Participant kinds of sequence diagrams. */
|
|
101
111
|
export declare const PARTICIPANT_KINDS: readonly ["participant", "actor", "boundary", "control", "entity", "database", "collections", "queue"];
|
|
102
112
|
/** Element kinds of sequence diagrams: the participants and their groups. */
|
|
@@ -116,13 +126,13 @@ export declare const C4_LEVELS: readonly ["context", "container", "component"];
|
|
|
116
126
|
/** The type line C4 shapes draw under the label. */
|
|
117
127
|
export declare const ENTITY_TYPE_NAMES: Readonly<Record<string, string>>;
|
|
118
128
|
/** Every element kind of every compiled profile. */
|
|
119
|
-
export declare const ALL_ELEMENT_KINDS: readonly ["node", "decision", "data", "group", "note", "tag", "box", "text", "icon", "image", "participant", "actor", "boundary", "control", "entity", "database", "collections", "queue", "person", "system", "container", "datastore", "component"];
|
|
129
|
+
export declare const ALL_ELEMENT_KINDS: readonly ["node", "decision", "data", "group", "note", "tag", "box", "text", "icon", "image", "sticky", "line", "pen", "participant", "actor", "boundary", "control", "entity", "database", "collections", "queue", "person", "system", "container", "datastore", "component"];
|
|
120
130
|
/** Fragment operators of sequence diagrams. */
|
|
121
131
|
export declare const FRAGMENT_OPERATORS: readonly ["alt", "opt", "loop", "par", "break", "critical", "region"];
|
|
122
132
|
/** The keyword of further branches of the operators that have them. */
|
|
123
133
|
export declare const FRAGMENT_BRANCH_KEYWORDS: Readonly<Record<string, string>>;
|
|
124
134
|
/** Event statements of sequence diagrams, besides messages. */
|
|
125
|
-
export declare const SEQUENCE_EVENTS: readonly ["activate", "deactivate", "create", "destroy", "note", "alt", "opt", "loop", "par", "break", "critical", "region", "divider", "delay"];
|
|
135
|
+
export declare const SEQUENCE_EVENTS: readonly ["activate", "deactivate", "create", "destroy", "note", "alt", "opt", "loop", "par", "break", "critical", "region", "divider", "delay", "return"];
|
|
126
136
|
/** Statements of a `scenario` block. */
|
|
127
137
|
export declare const SCENARIO_STATEMENTS: readonly ["choose", "repeat", "skip", "take"];
|
|
128
138
|
export declare const LINE_STYLES: readonly ["solid", "dashed", "dotted"];
|
|
@@ -152,8 +162,23 @@ export declare const CORNERS: readonly ["sharp", "rounded"];
|
|
|
152
162
|
/** How a theme paints strokes: clean, or in two jittered passes of a hand-drawn look. */
|
|
153
163
|
export declare const SKETCH_LEVELS: readonly ["none", "light", "rough"];
|
|
154
164
|
/** Targets of `rule <kind> { }`: the element kinds of every profile, `relation` and `fragment`. */
|
|
155
|
-
export declare const RULE_KINDS: readonly ["node", "decision", "data", "group", "note", "tag", "box", "text", "icon", "image", "participant", "actor", "boundary", "control", "entity", "database", "collections", "queue", "person", "system", "container", "datastore", "component", "relation", "fragment"];
|
|
156
|
-
|
|
165
|
+
export declare const RULE_KINDS: readonly ["node", "decision", "data", "group", "note", "tag", "box", "text", "icon", "image", "sticky", "line", "pen", "participant", "actor", "boundary", "control", "entity", "database", "collections", "queue", "person", "system", "container", "datastore", "component", "relation", "fragment"];
|
|
166
|
+
/**
|
|
167
|
+
* Canvas presets: a document warns past 1,200 px, a slide keeps 16:9, and a board grows with what
|
|
168
|
+
* is drawn on it, unreported.
|
|
169
|
+
*/
|
|
170
|
+
export declare const PRESETS: readonly ["document", "slide", "board"];
|
|
171
|
+
/** How a list group (`layout column|row` in a free group block) arranges its children. */
|
|
172
|
+
export declare const LIST_LAYOUTS: readonly ["column", "row"];
|
|
173
|
+
/** Where the children of a list sit across its axis (`align` in a free group block). */
|
|
174
|
+
export declare const LIST_ALIGNS: readonly ["start", "center", "end", "stretch"];
|
|
175
|
+
/** The distance a list's `spacing` may write between its children, in pixels. */
|
|
176
|
+
export declare const LIST_SPACING_RANGE: {
|
|
177
|
+
readonly min: 0;
|
|
178
|
+
readonly max: 400;
|
|
179
|
+
};
|
|
180
|
+
/** The properties of a free group block that make it a list. */
|
|
181
|
+
export declare const LIST_PROPERTIES: readonly ["layout", "spacing", "align"];
|
|
157
182
|
/**
|
|
158
183
|
* Where the icon of a node, decision, data store or box goes: beside, above or below its text, or
|
|
159
184
|
* at the centre as the picture of the box, the label at the edge `labelPosition` names.
|
|
@@ -185,7 +210,8 @@ export declare const ROTATION_RANGE: {
|
|
|
185
210
|
};
|
|
186
211
|
/**
|
|
187
212
|
* The element kinds `rotation` turns: every element of flow diagrams and free compositions but
|
|
188
|
-
* groups, which hold other elements, and lines, whose points are written as they are
|
|
213
|
+
* groups, which hold other elements, and lines and pens, whose points are written as they are
|
|
214
|
+
* drawn.
|
|
189
215
|
*/
|
|
190
216
|
export declare function takesRotation(kind: string): boolean;
|
|
191
217
|
/** Whether a profile's elements take `rotation`: sequence diagrams and C4 views do not. */
|
|
@@ -203,8 +229,13 @@ export declare const MARK_MODES: readonly ["meltemi", "none"];
|
|
|
203
229
|
/** Themes whose tokens are built into the layout package; file themes may extend them. */
|
|
204
230
|
export declare const BUILT_IN_THEMES: readonly ["technical.light", "technical.dark", "editorial.light", "editorial.dark", "stage.light", "stage.dark", "sketch.light", "sketch.dark"];
|
|
205
231
|
export declare const DEFAULT_THEME = "technical.light";
|
|
232
|
+
/**
|
|
233
|
+
* The colour tokens of whiteboards: highlighter strokes, the default fill of stickies and their
|
|
234
|
+
* text. Colour tokens like the others; the theme panel groups them apart.
|
|
235
|
+
*/
|
|
236
|
+
export declare const THEME_WHITEBOARD_TOKENS: readonly ["highlight", "sticky", "stickyText"];
|
|
206
237
|
/** Colour tokens of a theme, in the order they are documented. */
|
|
207
|
-
export declare const THEME_COLOR_TOKENS: readonly ["background", "surface", "ink", "muted", "line", "connector", "band", "bandLine", "tag", "tagText", "accent", "accentEnd", "success", "warning", "danger", "info"];
|
|
238
|
+
export declare const THEME_COLOR_TOKENS: readonly ["background", "surface", "ink", "muted", "line", "connector", "band", "bandLine", "tag", "tagText", "accent", "accentEnd", "success", "warning", "danger", "info", "highlight", "sticky", "stickyText"];
|
|
208
239
|
/**
|
|
209
240
|
* Colour tokens the canvas draws its selection and guides with; they mean nothing in an export,
|
|
210
241
|
* so they are not colour names in styles. Built-in themes write none: the canvas uses `accent`.
|
|
@@ -225,8 +256,18 @@ export declare const THEME_DURATION_TOKENS: {
|
|
|
225
256
|
/** Tokens accepted inside `theme <id> { }` blocks. */
|
|
226
257
|
export declare const THEME_TOKENS: PropertyTable;
|
|
227
258
|
/**
|
|
228
|
-
*
|
|
229
|
-
*
|
|
259
|
+
* The text properties of every profile (decision 0067): the font stack a target's text is
|
|
260
|
+
* measured and drawn with, and its size and weight. Every target that draws text takes them;
|
|
261
|
+
* icons, images and pens refuse them (`TEXTLESS_KINDS`).
|
|
262
|
+
*/
|
|
263
|
+
export declare const TEXT_STYLE_PROPERTIES: PropertyTable;
|
|
264
|
+
export declare const TEXT_PROPERTIES: readonly string[];
|
|
265
|
+
/** The element kinds that draw no text of their own, and so refuse the text properties. */
|
|
266
|
+
export declare const TEXTLESS_KINDS: readonly string[];
|
|
267
|
+
/**
|
|
268
|
+
* Style properties that only free diagrams accept: where text sits across (`textAlign`) and down
|
|
269
|
+
* (`verticalAlign`) its box, and the `opacity` of elements, groups, lines and pens (0 is
|
|
270
|
+
* invisible, 1 opaque).
|
|
230
271
|
*/
|
|
231
272
|
export declare const FREE_STYLE_PROPERTIES: PropertyTable;
|
|
232
273
|
/**
|
|
@@ -237,6 +278,35 @@ export declare const STYLE_PROPERTIES: PropertyTable;
|
|
|
237
278
|
/** Style properties that apply only to elements, and only to relations. */
|
|
238
279
|
export declare const ELEMENT_ONLY_PROPERTIES: readonly string[];
|
|
239
280
|
export declare const RELATION_ONLY_PROPERTIES: readonly string[];
|
|
281
|
+
/**
|
|
282
|
+
* Style properties a free line refuses: the element properties but `opacity`, which fades a line as
|
|
283
|
+
* it fades a box. A line takes the relation properties.
|
|
284
|
+
*/
|
|
285
|
+
export declare const LINE_REFUSED_PROPERTIES: readonly string[];
|
|
286
|
+
/** The style properties a pen stroke takes. */
|
|
287
|
+
export declare const PEN_PROPERTIES: readonly string[];
|
|
288
|
+
/**
|
|
289
|
+
* Style properties a pen refuses: a box's fill, shape, radius and pattern, a connector's routing
|
|
290
|
+
* and corners, the icon properties and the text properties. `rotation` is refused apart, as a
|
|
291
|
+
* line's is: a pen's points are written in its statement.
|
|
292
|
+
*/
|
|
293
|
+
export declare const PEN_REFUSED_PROPERTIES: readonly string[];
|
|
294
|
+
/** The `width` of a pen stroke: one pixel at least, unlike outlines and connectors. */
|
|
295
|
+
export declare const PEN_WIDTH_RANGE: {
|
|
296
|
+
readonly min: 1;
|
|
297
|
+
readonly max: 64;
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* The style properties a sticky takes: its card's fill and outline, its text, an icon at the top
|
|
301
|
+
* left, rotation and opacity.
|
|
302
|
+
*/
|
|
303
|
+
export declare const STICKY_PROPERTIES: readonly string[];
|
|
304
|
+
/**
|
|
305
|
+
* Style properties a sticky refuses: a box's `pattern`, the icon placements of a box (its icon
|
|
306
|
+
* sits at the top left) and the relation properties. `shape` is refused apart, naming the kinds
|
|
307
|
+
* that take it.
|
|
308
|
+
*/
|
|
309
|
+
export declare const STICKY_REFUSED_PROPERTIES: readonly string[];
|
|
240
310
|
/**
|
|
241
311
|
* Classes every built-in theme provides. Colours are token names, so the classes follow the
|
|
242
312
|
* theme. A class of the same name in a file theme or a diagram shadows them.
|
|
@@ -305,7 +375,7 @@ export declare const EXPORT_EXTENSIONS: Readonly<Record<Format, string>>;
|
|
|
305
375
|
/** Statements of a `story` block, of a scene, and the actions a scene runs. */
|
|
306
376
|
export declare const STORY_STATEMENTS: readonly ["title", "description", "scene"];
|
|
307
377
|
export declare const SCENE_STATEMENTS: readonly ["view", "transition"];
|
|
308
|
-
export declare const STORY_ACTIONS: readonly ["reveal", "hide", "highlight", "focus", "camera", "trace", "hold", "parallel"];
|
|
378
|
+
export declare const STORY_ACTIONS: readonly ["reveal", "hide", "highlight", "focus", "camera", "trace", "draw", "hold", "parallel"];
|
|
309
379
|
export declare const STORY_TRANSITIONS: readonly ["cut", "fade", "morph"];
|
|
310
380
|
/** Times an action or transition takes when it writes no `over`, in milliseconds. */
|
|
311
381
|
export declare const STORY_DEFAULT_TIMES: {
|
|
@@ -315,6 +385,7 @@ export declare const STORY_DEFAULT_TIMES: {
|
|
|
315
385
|
readonly camera: 800;
|
|
316
386
|
readonly highlight: 1000;
|
|
317
387
|
readonly trace: 1200;
|
|
388
|
+
readonly draw: 800;
|
|
318
389
|
readonly hold: 0;
|
|
319
390
|
readonly parallel: 0;
|
|
320
391
|
readonly cut: 0;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GACjB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,
|
|
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@@ export const FREE_ELEMENT_KINDS = [
|
|
|
38
38
|
"icon",
|
|
39
39
|
"image",
|
|
40
40
|
"note",
|
|
41
|
+
"sticky",
|
|
41
42
|
"line",
|
|
43
|
+
"pen",
|
|
42
44
|
"group",
|
|
43
45
|
];
|
|
44
46
|
/** Participant kinds of sequence diagrams. */
|
|
@@ -88,6 +90,9 @@ export const ALL_ELEMENT_KINDS = [
|
|
|
88
90
|
"text",
|
|
89
91
|
"icon",
|
|
90
92
|
"image",
|
|
93
|
+
"sticky",
|
|
94
|
+
"line",
|
|
95
|
+
"pen",
|
|
91
96
|
...PARTICIPANT_KINDS,
|
|
92
97
|
...ENTITY_KINDS,
|
|
93
98
|
];
|
|
@@ -117,6 +122,7 @@ export const SEQUENCE_EVENTS = [
|
|
|
117
122
|
...FRAGMENT_OPERATORS,
|
|
118
123
|
"divider",
|
|
119
124
|
"delay",
|
|
125
|
+
"return",
|
|
120
126
|
];
|
|
121
127
|
/** Statements of a `scenario` block. */
|
|
122
128
|
export const SCENARIO_STATEMENTS = ["choose", "repeat", "skip", "take"];
|
|
@@ -173,7 +179,19 @@ export const CORNERS = ["sharp", "rounded"];
|
|
|
173
179
|
export const SKETCH_LEVELS = ["none", "light", "rough"];
|
|
174
180
|
/** Targets of `rule <kind> { }`: the element kinds of every profile, `relation` and `fragment`. */
|
|
175
181
|
export const RULE_KINDS = [...ALL_ELEMENT_KINDS, "relation", "fragment"];
|
|
176
|
-
|
|
182
|
+
/**
|
|
183
|
+
* Canvas presets: a document warns past 1,200 px, a slide keeps 16:9, and a board grows with what
|
|
184
|
+
* is drawn on it, unreported.
|
|
185
|
+
*/
|
|
186
|
+
export const PRESETS = ["document", "slide", "board"];
|
|
187
|
+
/** How a list group (`layout column|row` in a free group block) arranges its children. */
|
|
188
|
+
export const LIST_LAYOUTS = ["column", "row"];
|
|
189
|
+
/** Where the children of a list sit across its axis (`align` in a free group block). */
|
|
190
|
+
export const LIST_ALIGNS = ["start", "center", "end", "stretch"];
|
|
191
|
+
/** The distance a list's `spacing` may write between its children, in pixels. */
|
|
192
|
+
export const LIST_SPACING_RANGE = { min: 0, max: 400 };
|
|
193
|
+
/** The properties of a free group block that make it a list. */
|
|
194
|
+
export const LIST_PROPERTIES = ["layout", "spacing", "align"];
|
|
177
195
|
/**
|
|
178
196
|
* Where the icon of a node, decision, data store or box goes: beside, above or below its text, or
|
|
179
197
|
* at the centre as the picture of the box, the label at the edge `labelPosition` names.
|
|
@@ -226,10 +244,11 @@ export function takesShape(kind) {
|
|
|
226
244
|
export const ROTATION_RANGE = { min: 0, max: 360 };
|
|
227
245
|
/**
|
|
228
246
|
* The element kinds `rotation` turns: every element of flow diagrams and free compositions but
|
|
229
|
-
* groups, which hold other elements, and lines, whose points are written as they are
|
|
247
|
+
* groups, which hold other elements, and lines and pens, whose points are written as they are
|
|
248
|
+
* drawn.
|
|
230
249
|
*/
|
|
231
250
|
export function takesRotation(kind) {
|
|
232
|
-
return kind !== "group" && kind !== "line";
|
|
251
|
+
return kind !== "group" && kind !== "line" && kind !== "pen";
|
|
233
252
|
}
|
|
234
253
|
/** Whether a profile's elements take `rotation`: sequence diagrams and C4 views do not. */
|
|
235
254
|
export function profileTakesRotation(profile) {
|
|
@@ -255,6 +274,11 @@ export const BUILT_IN_THEMES = [
|
|
|
255
274
|
"sketch.dark",
|
|
256
275
|
];
|
|
257
276
|
export const DEFAULT_THEME = "technical.light";
|
|
277
|
+
/**
|
|
278
|
+
* The colour tokens of whiteboards: highlighter strokes, the default fill of stickies and their
|
|
279
|
+
* text. Colour tokens like the others; the theme panel groups them apart.
|
|
280
|
+
*/
|
|
281
|
+
export const THEME_WHITEBOARD_TOKENS = ["highlight", "sticky", "stickyText"];
|
|
258
282
|
/** Colour tokens of a theme, in the order they are documented. */
|
|
259
283
|
export const THEME_COLOR_TOKENS = [
|
|
260
284
|
"background",
|
|
@@ -273,6 +297,7 @@ export const THEME_COLOR_TOKENS = [
|
|
|
273
297
|
"warning",
|
|
274
298
|
"danger",
|
|
275
299
|
"info",
|
|
300
|
+
...THEME_WHITEBOARD_TOKENS,
|
|
276
301
|
];
|
|
277
302
|
/**
|
|
278
303
|
* Colour tokens the canvas draws its selection and guides with; they mean nothing in an export,
|
|
@@ -339,14 +364,27 @@ export const THEME_TOKENS = {
|
|
|
339
364
|
])),
|
|
340
365
|
};
|
|
341
366
|
/**
|
|
342
|
-
*
|
|
343
|
-
*
|
|
367
|
+
* The text properties of every profile (decision 0067): the font stack a target's text is
|
|
368
|
+
* measured and drawn with, and its size and weight. Every target that draws text takes them;
|
|
369
|
+
* icons, images and pens refuse them (`TEXTLESS_KINDS`).
|
|
344
370
|
*/
|
|
345
|
-
export const
|
|
371
|
+
export const TEXT_STYLE_PROPERTIES = {
|
|
372
|
+
font: { kind: "string", nonEmpty: true },
|
|
346
373
|
fontSize: { kind: "number", min: 6, max: 160 },
|
|
347
374
|
fontWeight: { kind: "number", min: 400, max: 700, values: FONT_WEIGHTS },
|
|
375
|
+
};
|
|
376
|
+
export const TEXT_PROPERTIES = Object.keys(TEXT_STYLE_PROPERTIES);
|
|
377
|
+
/** The element kinds that draw no text of their own, and so refuse the text properties. */
|
|
378
|
+
export const TEXTLESS_KINDS = ["icon", "image", "pen"];
|
|
379
|
+
/**
|
|
380
|
+
* Style properties that only free diagrams accept: where text sits across (`textAlign`) and down
|
|
381
|
+
* (`verticalAlign`) its box, and the `opacity` of elements, groups, lines and pens (0 is
|
|
382
|
+
* invisible, 1 opaque).
|
|
383
|
+
*/
|
|
384
|
+
export const FREE_STYLE_PROPERTIES = {
|
|
348
385
|
textAlign: { kind: "enum", values: TEXT_ALIGNS },
|
|
349
386
|
verticalAlign: { kind: "enum", values: VERTICAL_ALIGNS },
|
|
387
|
+
opacity: { kind: "number", min: 0, max: 1 },
|
|
350
388
|
};
|
|
351
389
|
/**
|
|
352
390
|
* Properties of classes and rules: the `style` properties without `class`. Theme classes and rules
|
|
@@ -358,7 +396,8 @@ export const STYLE_PROPERTIES = {
|
|
|
358
396
|
stroke: { kind: "color", tokens: true },
|
|
359
397
|
color: { kind: "color", tokens: true },
|
|
360
398
|
line: { kind: "enum", values: LINE_STYLES },
|
|
361
|
-
|
|
399
|
+
/** An outline, a connector or a pen stroke; a pen refuses 0 (`PEN_WIDTH_RANGE`). */
|
|
400
|
+
width: { kind: "number", min: 0, max: 64 },
|
|
362
401
|
pattern: { kind: "enum", values: PATTERNS },
|
|
363
402
|
arrowhead: { kind: "enum", values: ARROWHEADS },
|
|
364
403
|
arrowtail: { kind: "enum", values: ARROWHEADS },
|
|
@@ -376,6 +415,7 @@ export const STYLE_PROPERTIES = {
|
|
|
376
415
|
radius: RADIUS,
|
|
377
416
|
/** Degrees an element is turned, clockwise about the centre of its box. */
|
|
378
417
|
rotation: { kind: "number", ...ROTATION_RANGE },
|
|
418
|
+
...TEXT_STYLE_PROPERTIES,
|
|
379
419
|
...FREE_STYLE_PROPERTIES,
|
|
380
420
|
};
|
|
381
421
|
/** Style properties that apply only to elements, and only to relations. */
|
|
@@ -395,6 +435,56 @@ export const RELATION_ONLY_PROPERTIES = [
|
|
|
395
435
|
"routing",
|
|
396
436
|
"corners",
|
|
397
437
|
];
|
|
438
|
+
/**
|
|
439
|
+
* Style properties a free line refuses: the element properties but `opacity`, which fades a line as
|
|
440
|
+
* it fades a box. A line takes the relation properties.
|
|
441
|
+
*/
|
|
442
|
+
export const LINE_REFUSED_PROPERTIES = ELEMENT_ONLY_PROPERTIES.filter((name) => name !== "opacity");
|
|
443
|
+
/** The style properties a pen stroke takes. */
|
|
444
|
+
export const PEN_PROPERTIES = [
|
|
445
|
+
"stroke",
|
|
446
|
+
"width",
|
|
447
|
+
"line",
|
|
448
|
+
"opacity",
|
|
449
|
+
"arrowhead",
|
|
450
|
+
"arrowtail",
|
|
451
|
+
];
|
|
452
|
+
/**
|
|
453
|
+
* Style properties a pen refuses: a box's fill, shape, radius and pattern, a connector's routing
|
|
454
|
+
* and corners, the icon properties and the text properties. `rotation` is refused apart, as a
|
|
455
|
+
* line's is: a pen's points are written in its statement.
|
|
456
|
+
*/
|
|
457
|
+
export const PEN_REFUSED_PROPERTIES = Object.keys(STYLE_PROPERTIES).filter((name) => !PEN_PROPERTIES.includes(name) && name !== "rotation");
|
|
458
|
+
/** The `width` of a pen stroke: one pixel at least, unlike outlines and connectors. */
|
|
459
|
+
export const PEN_WIDTH_RANGE = { min: 1, max: 64 };
|
|
460
|
+
/**
|
|
461
|
+
* The style properties a sticky takes: its card's fill and outline, its text, an icon at the top
|
|
462
|
+
* left, rotation and opacity.
|
|
463
|
+
*/
|
|
464
|
+
export const STICKY_PROPERTIES = [
|
|
465
|
+
"fill",
|
|
466
|
+
"stroke",
|
|
467
|
+
"color",
|
|
468
|
+
"line",
|
|
469
|
+
"width",
|
|
470
|
+
"font",
|
|
471
|
+
"fontSize",
|
|
472
|
+
"fontWeight",
|
|
473
|
+
"textAlign",
|
|
474
|
+
"verticalAlign",
|
|
475
|
+
"radius",
|
|
476
|
+
"rotation",
|
|
477
|
+
"opacity",
|
|
478
|
+
"icon",
|
|
479
|
+
"iconColor",
|
|
480
|
+
"iconSize",
|
|
481
|
+
];
|
|
482
|
+
/**
|
|
483
|
+
* Style properties a sticky refuses: a box's `pattern`, the icon placements of a box (its icon
|
|
484
|
+
* sits at the top left) and the relation properties. `shape` is refused apart, naming the kinds
|
|
485
|
+
* that take it.
|
|
486
|
+
*/
|
|
487
|
+
export const STICKY_REFUSED_PROPERTIES = Object.keys(STYLE_PROPERTIES).filter((name) => !STICKY_PROPERTIES.includes(name) && name !== "shape");
|
|
398
488
|
/**
|
|
399
489
|
* Classes every built-in theme provides. Colours are token names, so the classes follow the
|
|
400
490
|
* theme. A class of the same name in a file theme or a diagram shadows them.
|
|
@@ -509,6 +599,10 @@ export const FREE_PROFILE = {
|
|
|
509
599
|
layer: { kind: "name" },
|
|
510
600
|
link: { kind: "link" },
|
|
511
601
|
url: { kind: "url" },
|
|
602
|
+
// A list: the children in source order along a column or a row.
|
|
603
|
+
layout: { kind: "enum", values: LIST_LAYOUTS },
|
|
604
|
+
spacing: { kind: "number", ...LIST_SPACING_RANGE },
|
|
605
|
+
align: { kind: "enum", values: LIST_ALIGNS },
|
|
512
606
|
},
|
|
513
607
|
relationProperties: {
|
|
514
608
|
description: { kind: "string" },
|
|
@@ -542,6 +636,7 @@ export const SEQUENCE_PROFILE = {
|
|
|
542
636
|
preset: { kind: "enum", values: PRESETS },
|
|
543
637
|
canvas: { kind: "size", min: 100, max: 10000 },
|
|
544
638
|
autonumber: { kind: "number", min: 0, max: 100000 },
|
|
639
|
+
spacing: { kind: "number", min: 0, max: 400 },
|
|
545
640
|
},
|
|
546
641
|
elementKinds: SEQUENCE_ELEMENT_KINDS,
|
|
547
642
|
shorthand: { box: "participant", data: "database" },
|
|
@@ -551,6 +646,7 @@ export const SEQUENCE_PROFILE = {
|
|
|
551
646
|
class: { kind: "classes" },
|
|
552
647
|
link: { kind: "link" },
|
|
553
648
|
url: { kind: "url" },
|
|
649
|
+
tag: { kind: "tag" },
|
|
554
650
|
},
|
|
555
651
|
groupProperties: {
|
|
556
652
|
description: { kind: "string" },
|
|
@@ -563,6 +659,7 @@ export const SEQUENCE_PROFILE = {
|
|
|
563
659
|
assumption: { kind: "string" },
|
|
564
660
|
class: { kind: "classes" },
|
|
565
661
|
kind: { kind: "enum", values: MESSAGE_KINDS },
|
|
662
|
+
tag: { kind: "tag" },
|
|
566
663
|
},
|
|
567
664
|
arrows: { "->": "solid", "-->": "dashed", "<->": "solid", "<-->": "dashed" },
|
|
568
665
|
diagramBlocks: ["placement", "style", "animate", "class", "rule", "scenario"],
|
|
@@ -678,6 +775,7 @@ export const STORY_ACTIONS = [
|
|
|
678
775
|
"focus",
|
|
679
776
|
"camera",
|
|
680
777
|
"trace",
|
|
778
|
+
"draw",
|
|
681
779
|
"hold",
|
|
682
780
|
"parallel",
|
|
683
781
|
];
|
|
@@ -690,6 +788,7 @@ export const STORY_DEFAULT_TIMES = {
|
|
|
690
788
|
camera: 800,
|
|
691
789
|
highlight: 1000,
|
|
692
790
|
trace: 1200,
|
|
791
|
+
draw: 800,
|
|
693
792
|
hold: 0,
|
|
694
793
|
parallel: 0,
|
|
695
794
|
cut: 0,
|