@formicoidea/labre-framework-uml 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +384 -0
- package/dist/actions.d.ts +430 -0
- package/dist/actions.js +724 -0
- package/dist/background.d.ts +153 -0
- package/dist/background.js +557 -0
- package/dist/board-hit.d.ts +137 -0
- package/dist/board-hit.js +191 -0
- package/dist/commands-manifest.d.ts +19 -0
- package/dist/commands-manifest.js +571 -0
- package/dist/commands.d.ts +4 -0
- package/dist/commands.js +983 -0
- package/dist/component.d.ts +521 -0
- package/dist/component.js +708 -0
- package/dist/consts.d.ts +365 -0
- package/dist/consts.js +463 -0
- package/dist/descriptor.d.ts +12 -0
- package/dist/descriptor.js +10 -0
- package/dist/drawio-decode.d.ts +32 -0
- package/dist/drawio-decode.js +96 -0
- package/dist/drawio-import.d.ts +133 -0
- package/dist/drawio-import.js +885 -0
- package/dist/edge-morph.d.ts +154 -0
- package/dist/edge-morph.js +153 -0
- package/dist/edge-styles.d.ts +78 -0
- package/dist/edge-styles.js +210 -0
- package/dist/effects.d.ts +9 -0
- package/dist/effects.js +6 -0
- package/dist/element-renderer.d.ts +64 -0
- package/dist/element-renderer.js +114 -0
- package/dist/element-view.d.ts +234 -0
- package/dist/element-view.js +430 -0
- package/dist/export.d.ts +61 -0
- package/dist/export.js +41 -0
- package/dist/filename.d.ts +17 -0
- package/dist/filename.js +26 -0
- package/dist/frame-tag.d.ts +70 -0
- package/dist/frame-tag.js +78 -0
- package/dist/grammar.d.ts +695 -0
- package/dist/grammar.js +1436 -0
- package/dist/import.d.ts +306 -0
- package/dist/import.js +1270 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +67 -0
- package/dist/interchange.d.ts +125 -0
- package/dist/interchange.js +372 -0
- package/dist/keywords.d.ts +204 -0
- package/dist/keywords.js +361 -0
- package/dist/kinds.d.ts +73 -0
- package/dist/kinds.js +91 -0
- package/dist/legend.d.ts +30 -0
- package/dist/legend.js +255 -0
- package/dist/model.d.ts +862 -0
- package/dist/model.js +1316 -0
- package/dist/morph.d.ts +178 -0
- package/dist/morph.js +496 -0
- package/dist/node/act-glyphs.d.ts +30 -0
- package/dist/node/act-glyphs.js +142 -0
- package/dist/node/compartment-watcher.d.ts +107 -0
- package/dist/node/compartment-watcher.js +163 -0
- package/dist/node/fit.d.ts +85 -0
- package/dist/node/fit.js +129 -0
- package/dist/node/node-renderer.d.ts +49 -0
- package/dist/node/node-renderer.js +611 -0
- package/dist/node/node-view.d.ts +51 -0
- package/dist/node/node-view.js +89 -0
- package/dist/node/paint.d.ts +84 -0
- package/dist/node/paint.js +143 -0
- package/dist/node/sd-glyphs.d.ts +36 -0
- package/dist/node/sd-glyphs.js +79 -0
- package/dist/node/stm-glyphs.d.ts +22 -0
- package/dist/node/stm-glyphs.js +111 -0
- package/dist/node/tier-metrics.d.ts +38 -0
- package/dist/node/tier-metrics.js +45 -0
- package/dist/operators.d.ts +45 -0
- package/dist/operators.js +75 -0
- package/dist/plantuml-import.d.ts +113 -0
- package/dist/plantuml-import.js +1723 -0
- package/dist/plantuml.d.ts +94 -0
- package/dist/plantuml.js +985 -0
- package/dist/presets.d.ts +149 -0
- package/dist/presets.js +302 -0
- package/dist/profiles.d.ts +2 -0
- package/dist/profiles.js +358 -0
- package/dist/reading.d.ts +160 -0
- package/dist/reading.js +648 -0
- package/dist/roles.d.ts +257 -0
- package/dist/roles.js +997 -0
- package/dist/rules.d.ts +267 -0
- package/dist/rules.js +3090 -0
- package/dist/templates.d.ts +2 -0
- package/dist/templates.js +197 -0
- package/dist/toolbar/config.d.ts +228 -0
- package/dist/toolbar/config.js +833 -0
- package/dist/toolbar/icons.d.ts +440 -0
- package/dist/toolbar/icons.js +711 -0
- package/dist/toolbar/senior-tool.d.ts +11 -0
- package/dist/toolbar/senior-tool.js +21 -0
- package/dist/toolbar/uml-menu.d.ts +17 -0
- package/dist/toolbar/uml-menu.js +20 -0
- package/dist/toolbar/uml-senior-button.d.ts +18 -0
- package/dist/toolbar/uml-senior-button.js +22 -0
- package/dist/translations.d.ts +27 -0
- package/dist/translations.js +117 -0
- package/dist/view.d.ts +33 -0
- package/dist/view.js +236 -0
- package/dist/xmi-import.d.ts +174 -0
- package/dist/xmi-import.js +2268 -0
- package/dist/xmi.d.ts +61 -0
- package/dist/xmi.js +1860 -0
- package/dist/xml-reader.d.ts +157 -0
- package/dist/xml-reader.js +430 -0
- package/dist/xml.d.ts +72 -0
- package/dist/xml.js +96 -0
- package/package.json +38 -0
package/dist/consts.d.ts
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import type { UmlNodeKind } from '@formicoidea/labre-core/model';
|
|
2
|
+
/**
|
|
3
|
+
* Visual constants for the UML pack.
|
|
4
|
+
*
|
|
5
|
+
* UML is the opposite of C4 on the one question that matters here: C4's stencil
|
|
6
|
+
* IS a colour code — four blues for four levels — whereas UML 2.5.1 defines no
|
|
7
|
+
* palette at all. Every figure in the specification is black lines on white
|
|
8
|
+
* paper, and what distinguishes a class from an interface from an enumeration
|
|
9
|
+
* is the KEYWORD written above the name, not a hue. So this file states no
|
|
10
|
+
* colours of its own: it names four neutrals off the shared notation scale
|
|
11
|
+
* (R33) and leaves the meaning where the spec puts it, in the shape and the
|
|
12
|
+
* words.
|
|
13
|
+
*
|
|
14
|
+
* Every value here is a creation-time DEFAULT. A UML node is a native shape, so
|
|
15
|
+
* each of these becomes an ordinary editable property the moment the element is
|
|
16
|
+
* placed — exactly as in BPMN and C4.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Artefact ink: every node outline, every compartment separator, every glyph
|
|
20
|
+
* (the package tab, the note's fold, the actor's stick figure) and the text
|
|
21
|
+
* written inside an artefact.
|
|
22
|
+
*
|
|
23
|
+
* One ink for all of it, because UML draws one: the notation's contrast is
|
|
24
|
+
* between the LINES and the paper, and a second artefact grey would read as a
|
|
25
|
+
* distinction the spec never makes.
|
|
26
|
+
*/
|
|
27
|
+
export declare const UML_INK: string;
|
|
28
|
+
/**
|
|
29
|
+
* Background structure: the diagram frame's border, its heading tag and the
|
|
30
|
+
* subject's outline and name — the furniture the diagram is drawn ON, as
|
|
31
|
+
* opposed to the diagram itself.
|
|
32
|
+
*/
|
|
33
|
+
export declare const UML_FRAME_INK: string;
|
|
34
|
+
/** The paper: the diagram frame's card fill, and the fill of a boxed node. */
|
|
35
|
+
export declare const UML_CARD: string;
|
|
36
|
+
/**
|
|
37
|
+
* Secondary strokes — the divider under the heading band. Lighter than
|
|
38
|
+
* {@link UML_FRAME_INK} so that the band reads as a strip of the same sheet
|
|
39
|
+
* rather than as a second frame drawn inside the first.
|
|
40
|
+
*/
|
|
41
|
+
export declare const UML_DIVIDER: string;
|
|
42
|
+
/**
|
|
43
|
+
* Every relationship is drawn at the same weight — the notation distinguishes
|
|
44
|
+
* them by their ENDS (hollow triangle, hollow or filled diamond, open arrow)
|
|
45
|
+
* and by solid versus dashed, never by thickness. See the edge style table in
|
|
46
|
+
* `actions.ts`.
|
|
47
|
+
*/
|
|
48
|
+
export declare const UML_EDGE_WIDTH = 2;
|
|
49
|
+
/** Every node outline, at the same weight as every line: UML draws one pen. */
|
|
50
|
+
export declare const UML_NODE_STROKE_WIDTH = 2;
|
|
51
|
+
/** The same family every other framework in the library writes in. */
|
|
52
|
+
export declare const UML_FONT_FAMILY = "Inter, sans-serif";
|
|
53
|
+
/**
|
|
54
|
+
* The name compartment, and the two tiers under it.
|
|
55
|
+
*
|
|
56
|
+
* A two-step ladder rather than C4's three, because a classifier has two kinds
|
|
57
|
+
* of words in it: its NAME (with its keyword line, §11.4.4) and its FEATURES —
|
|
58
|
+
* attributes and operations, which are the same sort of statement at the same
|
|
59
|
+
* size. Both are creation-time defaults an author can climb off.
|
|
60
|
+
*/
|
|
61
|
+
export declare const UML_NAME_FONT_SIZE = 16;
|
|
62
|
+
export declare const UML_BODY_FONT_SIZE = 13;
|
|
63
|
+
/**
|
|
64
|
+
* The bite taken out of the heading tag's top-right corner, in model units.
|
|
65
|
+
*
|
|
66
|
+
* UML 2.5.1 Annex A draws the frame heading in a rectangle with one corner cut
|
|
67
|
+
* off — the pentagon that tells a reader, at a glance and before reading a
|
|
68
|
+
* word, that they are looking at a diagram frame and not at a box in the
|
|
69
|
+
* drawing. 12 units against a 44-unit band is the proportion the Annex's own
|
|
70
|
+
* figures show.
|
|
71
|
+
*/
|
|
72
|
+
export declare const UML_FRAME_TAG_CUT = 12;
|
|
73
|
+
/**
|
|
74
|
+
* How much shorter the tag is than the band it is drawn in — the air under it,
|
|
75
|
+
* which is what makes it read as a label PINNED to the frame rather than as a
|
|
76
|
+
* second rectangle sharing its top edge.
|
|
77
|
+
*/
|
|
78
|
+
export declare const UML_FRAME_TAG_FOOT = 8;
|
|
79
|
+
/** The heading's own size, and the frame's line. */
|
|
80
|
+
export declare const UML_FRAME_HEADING_FONT_SIZE = 20;
|
|
81
|
+
export declare const UML_FRAME_BORDER_WIDTH = 1.5;
|
|
82
|
+
/**
|
|
83
|
+
* The frame's other three margins — the plot's inset from its own border.
|
|
84
|
+
*
|
|
85
|
+
* Also the tag's horizontal PADDING: the heading is written at the plot's left
|
|
86
|
+
* edge, so a tag padded by the same number is a tag with its words centred in
|
|
87
|
+
* it, and the two cannot drift because there is one number.
|
|
88
|
+
*/
|
|
89
|
+
export declare const UML_DIAGRAM_MARGIN = 24;
|
|
90
|
+
/**
|
|
91
|
+
* The band the heading tag is written in — the frame's TOP MARGIN, owned by
|
|
92
|
+
* `@labre/affine-model` because the frame's hit test reads it too (a diagram is
|
|
93
|
+
* clickable by its heading band as well as by its border).
|
|
94
|
+
*
|
|
95
|
+
* Re-exported here so this file stays the one place a reader looks for the
|
|
96
|
+
* pack's metrics, exactly as `consts.ts` in the C4 pack re-exports
|
|
97
|
+
* `C4_BOARD_TITLE_BAND_HEIGHT`.
|
|
98
|
+
*/
|
|
99
|
+
export { UML_FRAME_BAND_HEIGHT } from '@formicoidea/labre-core/model';
|
|
100
|
+
/** The size a fresh diagram frame is created at — a Context Map sheet's own. */
|
|
101
|
+
export declare const UML_DIAGRAM_BOX: {
|
|
102
|
+
readonly w: 1400;
|
|
103
|
+
readonly h: 900;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* The size a fresh subject is created at (§18.1.4) — a C4 boundary's own
|
|
107
|
+
* footprint, because it is the same kind of object: a rectangle drawn round
|
|
108
|
+
* part of a diagram that is already there.
|
|
109
|
+
*/
|
|
110
|
+
export declare const UML_SUBJECT_BOX: {
|
|
111
|
+
readonly w: 520;
|
|
112
|
+
readonly h: 360;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* The subject's inset, equal on all four sides: unlike a diagram frame it has
|
|
116
|
+
* no furniture to make room for — §18.1.4 writes its name INSIDE the top-left
|
|
117
|
+
* corner, over the drawing, exactly as a C4 boundary writes its own.
|
|
118
|
+
*/
|
|
119
|
+
export declare const UML_SUBJECT_MARGIN = 12;
|
|
120
|
+
/** The subject's outline: solid and thin — §18.1.4 draws no dash and no tint. */
|
|
121
|
+
export declare const UML_SUBJECT_BORDER_WIDTH = 1.5;
|
|
122
|
+
/**
|
|
123
|
+
* Default node sizes (model units) per kind. TOTAL over {@link UmlNodeKind} by
|
|
124
|
+
* its type, so a kind added to the model cannot land without a footprint.
|
|
125
|
+
*
|
|
126
|
+
* The four compartmented kinds share ONE box — a class, an interface, an
|
|
127
|
+
* enumeration and an object are the same rectangle with different words in it,
|
|
128
|
+
* and a row of them lining up without anybody arranging them is what makes a
|
|
129
|
+
* class diagram readable. 200 × 120 fits a name line plus three feature lines
|
|
130
|
+
* at the sizes above with the margins `component.ts` lays out.
|
|
131
|
+
*
|
|
132
|
+
* The other four are the shapes the notation draws rather than boxes:
|
|
133
|
+
*
|
|
134
|
+
* - `package` is taller by the height of its tab (§12.2.4);
|
|
135
|
+
* - `note` is smaller and squarer — it holds a sentence, not a signature
|
|
136
|
+
* list (Annex A);
|
|
137
|
+
* - `actor` is the stick figure's own aspect ratio, tall and narrow: squeezed
|
|
138
|
+
* into a wide box the head stops being a circle, which is the one thing
|
|
139
|
+
* about a UML actor everybody recognises (§18.1.4);
|
|
140
|
+
* - `use-case` is the ellipse, wide and shallow so a verb phrase fits across
|
|
141
|
+
* its widest chord rather than in its corners, which it has none of.
|
|
142
|
+
*
|
|
143
|
+
* ## The phase-2 footprints
|
|
144
|
+
*
|
|
145
|
+
* A `component` is the class box's own 200 × 120: §11.6.4 draws it as the same
|
|
146
|
+
* rectangle with an icon in the corner, and a component diagram lines its boxes
|
|
147
|
+
* up beside a class diagram's without anybody resizing anything.
|
|
148
|
+
*
|
|
149
|
+
* The rest are their pictures' own proportions:
|
|
150
|
+
*
|
|
151
|
+
* - `port` is a SMALL SQUARE (§11.3.4) — 16 × 16, the one footprint in the pack
|
|
152
|
+
* that is not big enough to write in, which is why its label is placed beside
|
|
153
|
+
* it rather than inside it (`component.ts`);
|
|
154
|
+
* - the two interface glyphs are 60 × 40, tall enough for a ball or a socket
|
|
155
|
+
* over the stub that carries it (§10.4.4) and no wider than the glyph needs —
|
|
156
|
+
* their names are written beside them too;
|
|
157
|
+
* - `artifact` is the note's 180 × 100: a file name over a line or two of what
|
|
158
|
+
* it holds, which is the same amount of writing (§19.3.4);
|
|
159
|
+
* - the three cubes share 220 × 140 (§19.4.4). Wider and taller than a class
|
|
160
|
+
* box because the 3-D depth eats into both: the FRONT FACE — the only part a
|
|
161
|
+
* name can be written in — is what has to end up the size of a box.
|
|
162
|
+
*/
|
|
163
|
+
export declare const UML_NODE_BOX: Record<UmlNodeKind, {
|
|
164
|
+
w: number;
|
|
165
|
+
h: number;
|
|
166
|
+
}>;
|
|
167
|
+
/**
|
|
168
|
+
* How far a PORT's centre may sit from its component's outline before
|
|
169
|
+
* `uml.port-on-border` speaks — the tolerance of the `border-proximity` rule
|
|
170
|
+
* (ADR 0024).
|
|
171
|
+
*
|
|
172
|
+
* The glyph's own side, and derived from it rather than restated: §11.3.4 draws
|
|
173
|
+
* a port as a small square ON the boundary, and what makes that reading legible
|
|
174
|
+
* is the square's own footprint against the line, not the size of the component
|
|
175
|
+
* behind it. Three drawings, and the constant is chosen so each gets the answer
|
|
176
|
+
* the eye gives:
|
|
177
|
+
*
|
|
178
|
+
* - HALF IN, HALF OUT — the clause's own preferred picture. The centre is on
|
|
179
|
+
* the line, distance 0, and nothing is said.
|
|
180
|
+
* - TANGENT INSIDE, the square just clear of the edge. The centre is 8 units
|
|
181
|
+
* in, half the glyph, well under the tolerance: also silence, because that is
|
|
182
|
+
* a port an author drew on the border and a tool arguing with it is a tool
|
|
183
|
+
* switched off.
|
|
184
|
+
* - PUSHED IN BY ITS OWN SIZE, the square a full 16 units clear of the edge.
|
|
185
|
+
* The centre is 24 units in, past the tolerance, and the finding falls. That
|
|
186
|
+
* is the drawing the PO made on the recette of 2026-09-16: a port dragged
|
|
187
|
+
* into the middle of its component, which §11.3.4 gives no meaning at all.
|
|
188
|
+
*
|
|
189
|
+
* Deliberately NOT `UML_ATTACH_TOLERANCE` (`model.ts`), which is 24 and measures
|
|
190
|
+
* something else: an edge-to-edge GAP, used to decide which box a glyph belongs
|
|
191
|
+
* to when the exporters need an owner. This one measures a centre against a
|
|
192
|
+
* line, and the two numbers answering two questions is better than one number
|
|
193
|
+
* quietly meaning both.
|
|
194
|
+
*/
|
|
195
|
+
export declare const UML_PORT_BORDER_TOLERANCE: number;
|
|
196
|
+
/**
|
|
197
|
+
* The size a fresh PARTITION is created at (§15.6.4), in its default VERTICAL
|
|
198
|
+
* orientation: a column, as tall as the diagram frame it is dropped on and wide
|
|
199
|
+
* enough for an action box (160) with air either side of it.
|
|
200
|
+
*
|
|
201
|
+
* A horizontal partition is created by transposing this, which the creation
|
|
202
|
+
* site does rather than a second constant: a row is a column turned, and two
|
|
203
|
+
* pairs of numbers would be two things to keep in step.
|
|
204
|
+
*/
|
|
205
|
+
export declare const UML_PARTITION_BOX: {
|
|
206
|
+
readonly w: 360;
|
|
207
|
+
readonly h: 900;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* The size a fresh composite state is created at (§14.2.4) — the subject's own
|
|
211
|
+
* footprint, because it is the same kind of object: a rectangle drawn round a
|
|
212
|
+
* handful of elements that are already there.
|
|
213
|
+
*/
|
|
214
|
+
export declare const UML_REGION_BOX: {
|
|
215
|
+
readonly w: 520;
|
|
216
|
+
readonly h: 320;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* The partition's and the region's inset from their own border — the room the
|
|
220
|
+
* drawing gives up on the three sides that carry no band.
|
|
221
|
+
*
|
|
222
|
+
* The subject's 12, and for the same reason: both are transparent frames drawn
|
|
223
|
+
* OVER work that is already there, so every unit of margin is a unit of that
|
|
224
|
+
* work the frame's own furniture sits on top of.
|
|
225
|
+
*/
|
|
226
|
+
export declare const UML_PARTITION_MARGIN = 12;
|
|
227
|
+
export declare const UML_REGION_MARGIN = 12;
|
|
228
|
+
/** Both frames' outline: solid and thin, exactly as §15.6.4 and §14.2.4 draw them. */
|
|
229
|
+
export declare const UML_PARTITION_BORDER_WIDTH = 1.5;
|
|
230
|
+
export declare const UML_REGION_BORDER_WIDTH = 1.5;
|
|
231
|
+
/**
|
|
232
|
+
* The corner radius of a composite state, in MODEL UNITS.
|
|
233
|
+
*
|
|
234
|
+
* §14.2.4 draws a state — simple or composite — as a ROUND-CORNERED rectangle,
|
|
235
|
+
* and a composite state that came back square would read as a subject or a
|
|
236
|
+
* partition rather than as the state it is. An absolute rather than a fraction,
|
|
237
|
+
* unlike {@link UML_NODE_RADIUS}, because the framework-background declaration's
|
|
238
|
+
* `border.radius` is in model units: the primitive draws the card, and the card
|
|
239
|
+
* is measured in the units the element is.
|
|
240
|
+
*/
|
|
241
|
+
export declare const UML_REGION_RADIUS = 16;
|
|
242
|
+
/**
|
|
243
|
+
* The name band of a partition and of a composite state — the strip each writes
|
|
244
|
+
* its name in, owned by `@labre/affine-model` because both hit tests read it.
|
|
245
|
+
*
|
|
246
|
+
* Re-exported here so this file stays the one place a reader looks for the
|
|
247
|
+
* pack's metrics, exactly as {@link UML_FRAME_BAND_HEIGHT} is.
|
|
248
|
+
*/
|
|
249
|
+
export { UML_PARTITION_BAND, UML_REGION_BAND } from '@formicoidea/labre-core/model';
|
|
250
|
+
/**
|
|
251
|
+
* The lifeline's head box and the height of its column, owned by
|
|
252
|
+
* `@labre/affine-model` because the ELEMENT's own `elementBound` and
|
|
253
|
+
* `includesPoint` read them: §17.3.4's head is 160 wide over a 16-wide column,
|
|
254
|
+
* so the picture overflows the box the platform knows about and the model has
|
|
255
|
+
* to say so.
|
|
256
|
+
*
|
|
257
|
+
* Re-exported here so this file stays the one place a reader looks for the
|
|
258
|
+
* pack's metrics, exactly as {@link UML_FRAME_BAND_HEIGHT} is.
|
|
259
|
+
*/
|
|
260
|
+
export { UML_LIFELINE_HEAD, UML_LIFELINE_SPINE } from '@formicoidea/labre-core/model';
|
|
261
|
+
/**
|
|
262
|
+
* The dash pattern of a lifeline's SPINE, in model units (§17.3.4).
|
|
263
|
+
*
|
|
264
|
+
* 6 on, 6 off: even, because the spine is a TIMELINE rather than a relationship
|
|
265
|
+
* — nothing about it points one way — and long enough to read as a dashed line
|
|
266
|
+
* rather than as a dotted one at the zoom a whole sequence diagram is viewed
|
|
267
|
+
* at.
|
|
268
|
+
*/
|
|
269
|
+
export declare const UML_LIFELINE_DASH: readonly [6, 6];
|
|
270
|
+
/** The spine's own weight: lighter than the head, which is a box and not a line. */
|
|
271
|
+
export declare const UML_LIFELINE_SPINE_WIDTH = 1.5;
|
|
272
|
+
/**
|
|
273
|
+
* The size a fresh combined fragment is created at (§17.6.4).
|
|
274
|
+
*
|
|
275
|
+
* Wide enough to cover three lifelines at the 200-unit spacing a sequence
|
|
276
|
+
* diagram is laid out on, and tall enough for the three or four exchanges an
|
|
277
|
+
* `alt` is actually drawn round. The same pair the model seeds its `xywh` with,
|
|
278
|
+
* and the declaration reads it from here.
|
|
279
|
+
*/
|
|
280
|
+
export declare const UML_FRAGMENT_BOX: {
|
|
281
|
+
readonly w: 600;
|
|
282
|
+
readonly h: 260;
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* The fragment's inset from its own border on the three sides that carry no
|
|
286
|
+
* tag — the subject's and the partition's 12, and for the same reason: a
|
|
287
|
+
* transparent frame drawn over work that is already there spends every unit of
|
|
288
|
+
* margin on somebody else's drawing.
|
|
289
|
+
*/
|
|
290
|
+
export declare const UML_FRAGMENT_MARGIN = 12;
|
|
291
|
+
/** Its outline: solid and thin, exactly as §17.6.4 draws it. */
|
|
292
|
+
export declare const UML_FRAGMENT_BORDER_WIDTH = 1.5;
|
|
293
|
+
/**
|
|
294
|
+
* The dashed line between two operands (§17.6.4).
|
|
295
|
+
*
|
|
296
|
+
* A LONGER dash than the lifeline's, on purpose: the two are drawn on the same
|
|
297
|
+
* sheet, crossing each other, and a reader has to tell "this participant exists
|
|
298
|
+
* but is idle" from "the alternative below is a different case".
|
|
299
|
+
*/
|
|
300
|
+
export declare const UML_FRAGMENT_OPERAND_DASH: readonly [10, 6];
|
|
301
|
+
/**
|
|
302
|
+
* The fragment's operator band — the strip its pentagon is drawn in, owned by
|
|
303
|
+
* `@labre/affine-model` because the fragment's hit test reads it.
|
|
304
|
+
*
|
|
305
|
+
* Re-exported for the reason every other band is.
|
|
306
|
+
*/
|
|
307
|
+
export { UML_FRAGMENT_BAND } from '@formicoidea/labre-core/model';
|
|
308
|
+
/**
|
|
309
|
+
* The guard written in an operand's own corner, and its inset from the
|
|
310
|
+
* operand's top-left.
|
|
311
|
+
*
|
|
312
|
+
* Smaller than a name: §17.6.4 writes `[x > 0]` as a condition, not as a
|
|
313
|
+
* heading, and a guard set at the frame heading's 20px would compete with the
|
|
314
|
+
* operator word two lines above it.
|
|
315
|
+
*/
|
|
316
|
+
export declare const UML_FRAGMENT_GUARD_FONT_SIZE = 13;
|
|
317
|
+
export declare const UML_FRAGMENT_GUARD_INSET = 8;
|
|
318
|
+
/**
|
|
319
|
+
* How close to an operand separator the pointer counts as being ON it, in model
|
|
320
|
+
* units either side.
|
|
321
|
+
*
|
|
322
|
+
* The BPMN pool's own grab half-width, and deliberately: the two gestures are
|
|
323
|
+
* the same gesture on the same kind of line, and a user who has learnt one
|
|
324
|
+
* should not find the other fussier. 12 is wide enough to aim at with a mouse
|
|
325
|
+
* and narrow enough that it does not swallow the messages drawn either side of
|
|
326
|
+
* it.
|
|
327
|
+
*/
|
|
328
|
+
export declare const UML_OPERAND_GRAB = 12;
|
|
329
|
+
/**
|
|
330
|
+
* The GUARD's rename target: the corner box a double-click on an operand's
|
|
331
|
+
* `[condition]` has to land in.
|
|
332
|
+
*
|
|
333
|
+
* Deliberately a CORNER and not the whole band (see `board-hit.ts`): an
|
|
334
|
+
* operand's guard is written over the messages it governs, so a zone covering
|
|
335
|
+
* the operand would take every double-click meant for them. Wide enough for a
|
|
336
|
+
* realistic condition at the guard's own size, and one line tall plus the inset
|
|
337
|
+
* it is anchored by.
|
|
338
|
+
*/
|
|
339
|
+
export declare const UML_OPERAND_GUARD_WIDTH = 180;
|
|
340
|
+
export declare const UML_OPERAND_GUARD_HEIGHT: number;
|
|
341
|
+
/**
|
|
342
|
+
* The smallest an operand may be dragged, in model units at the fragment's own
|
|
343
|
+
* reference height — converted to a weight against that fragment's total, so a
|
|
344
|
+
* fragment stretched taller keeps the same VISIBLE floor.
|
|
345
|
+
*
|
|
346
|
+
* 48 is the guard line plus room for one message under it: an operand smaller
|
|
347
|
+
* than that holds nothing, and the separator that made it is no longer a
|
|
348
|
+
* division of anything.
|
|
349
|
+
*/
|
|
350
|
+
export declare const UML_OPERAND_MIN_HEIGHT = 48;
|
|
351
|
+
/**
|
|
352
|
+
* The corner radius of an `action` and of a `state`, as the native shape
|
|
353
|
+
* renderer reads it: a value below 1 is a FRACTION of the box's shorter side.
|
|
354
|
+
*
|
|
355
|
+
* The two round-cornered rectangles of the notation (§15.3.4, §14.2.4), and the
|
|
356
|
+
* only two places this pack departs from `radius: 0`. That zero is not a house
|
|
357
|
+
* style to be defended here — it is what §11.4.4 draws for a classifier — and
|
|
358
|
+
* these two are what §15.3.4 and §14.2.4 draw for their own boxes. A square
|
|
359
|
+
* action is an action that looks like a class.
|
|
360
|
+
*
|
|
361
|
+
* 0.12 of the shorter side: 7 units on a 160 × 60 action, 11 on a 180 × 90
|
|
362
|
+
* state. Enough to be seen at a glance across a sheet, little enough that the
|
|
363
|
+
* box is still a box.
|
|
364
|
+
*/
|
|
365
|
+
export declare const UML_NODE_RADIUS = 0.12;
|