@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/profiles.js
ADDED
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UML validation profiles.
|
|
3
|
+
*
|
|
4
|
+
* DATA owned by the framework, like its rules and its roles. A profile is chosen
|
|
5
|
+
* per FRAME, and for UML that means the DIAGRAM frame alone: the subject carries
|
|
6
|
+
* no picker (`toolbar/config.ts` records the arbitration — one sheet, one level
|
|
7
|
+
* of requirement, one place to set it) and inherits the sheet's choice through
|
|
8
|
+
* the engine's `inheritChosenProfiles`, so the two subject-anchored rules harden
|
|
9
|
+
* with the rest.
|
|
10
|
+
*
|
|
11
|
+
* Registered from the flag-gated `UmlViewExtension`, beside the rules: switching
|
|
12
|
+
* the `uml` flag off takes the choice away with the rest of the tooling, and a
|
|
13
|
+
* frame already set to `strict` simply stops being checked until it comes back —
|
|
14
|
+
* the id stays written, untouched.
|
|
15
|
+
*
|
|
16
|
+
* ## Both tables spell out all FORTY-THREE ids
|
|
17
|
+
*
|
|
18
|
+
* Every severity a user can get is either the one its rule declares or one of
|
|
19
|
+
* these lines — nothing is raised implicitly (PF9.4). Spelling them all out is
|
|
20
|
+
* what makes the level READABLE: a reviewer asking what `uml.strict` requires
|
|
21
|
+
* reads thirty-three lines here instead of one file per rule, and a rule shipped
|
|
22
|
+
* later cannot join a level in silence.
|
|
23
|
+
*
|
|
24
|
+
* ## Specification IS the check-up (PO, 2026-09-16)
|
|
25
|
+
*
|
|
26
|
+
* A promotion in the table below does two things now, not one. It raises the
|
|
27
|
+
* severity, as it always did; and when the rule declared `moment: 'on-demand'`
|
|
28
|
+
* it also puts the rule back on the DRAWING path, so its findings appear on the
|
|
29
|
+
* canvas like any other warning, on the switch and on every edit afterwards
|
|
30
|
+
* (`ValidationManager`'s `momentOf`). Nine of the rules promoted here are
|
|
31
|
+
* declared on-demand, and until that recette every one of them was raised to
|
|
32
|
+
* `warning` by this table and then drawn by nothing at all.
|
|
33
|
+
*
|
|
34
|
+
* The corollary is the cost note: a rule promoted here is a rule the frame
|
|
35
|
+
* budget pays for. `uml.unreachable-action` and `uml.unreachable-state` are
|
|
36
|
+
* graph walks and stay `audit` at BOTH levels partly for that reason — they
|
|
37
|
+
* remain on-demand, and a host that wants them asks for a check-up.
|
|
38
|
+
*
|
|
39
|
+
* That is also what the later phases cost: three rules arrived with the
|
|
40
|
+
* structural sheets, fifteen more with the behaviour ones and four with the
|
|
41
|
+
* sequence one, and every one had to be placed by
|
|
42
|
+
* hand in BOTH tables. A profile is an override
|
|
43
|
+
* table and an absent rule keeps its own severity, so a rule forgotten here
|
|
44
|
+
* would still work — it would simply never harden, and nobody would see the
|
|
45
|
+
* difference until a user asked why `uml.strict` was quiet about a `«deploy»`
|
|
46
|
+
* drawn from a component. `profiles.unit.spec.ts` asserts totality for exactly
|
|
47
|
+
* that reason.
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Sketch: every rule at `audit`. Findings still reach `violations$` — a host
|
|
51
|
+
* panel, a check-up and a conformance report see them — and the canvas says
|
|
52
|
+
* nothing.
|
|
53
|
+
*
|
|
54
|
+
* The DEFAULT, and deliberately so (PRD principle 3). A UML class diagram is
|
|
55
|
+
* drawn boxes-first: eight rectangles go down, then the lines between them, then
|
|
56
|
+
* the compartments get filled, and for the whole of that the sheet contradicts
|
|
57
|
+
* half the pack — every name is the stencil's own prompt, half the lines are
|
|
58
|
+
* quick-connected wires carrying no role, and the use cases have no actors yet.
|
|
59
|
+
* A tool arguing with that hand is a tool switched off within the hour, and it
|
|
60
|
+
* would be arguing about a diagram whose author already knows it is unfinished.
|
|
61
|
+
*
|
|
62
|
+
* The sketch PRIMES: the findings are computed, collected and available the
|
|
63
|
+
* moment the author asks — through the panel, through a check-up, through the
|
|
64
|
+
* profile switch — so nothing has to be re-derived when they decide the drawing
|
|
65
|
+
* is a deliverable. Being the default also means it WRITES NOTHING: a frame on
|
|
66
|
+
* `sketch` carries no profile key, so every UML diagram ever drawn is on it, with
|
|
67
|
+
* no migration and no backfill.
|
|
68
|
+
*/
|
|
69
|
+
const sketch = {
|
|
70
|
+
id: 'uml.sketch',
|
|
71
|
+
framework: 'uml',
|
|
72
|
+
labelKey: 'com.labre.uml.profile.sketch',
|
|
73
|
+
fallback: 'Sketch',
|
|
74
|
+
isDefault: true,
|
|
75
|
+
rules: {
|
|
76
|
+
'uml.element-outside-frame': 'audit',
|
|
77
|
+
'uml.not-admissible-on-kind': 'audit',
|
|
78
|
+
'uml.use-case-outside-subject': 'audit',
|
|
79
|
+
'uml.actor-inside-subject': 'audit',
|
|
80
|
+
'uml.unnamed-classifier': 'audit',
|
|
81
|
+
'uml.unnamed-actor-or-use-case': 'audit',
|
|
82
|
+
// The four SPELLING rules — the `label-syntax` family (ADR 0021).
|
|
83
|
+
'uml.attribute-syntax': 'audit',
|
|
84
|
+
'uml.operation-syntax': 'audit',
|
|
85
|
+
'uml.transition-syntax': 'audit',
|
|
86
|
+
'uml.multiplicity-syntax': 'audit',
|
|
87
|
+
'uml.generalization-endpoints': 'audit',
|
|
88
|
+
'uml.generalization-self-loop': 'audit',
|
|
89
|
+
'uml.realization-endpoints': 'audit',
|
|
90
|
+
'uml.dependency-on-object': 'audit',
|
|
91
|
+
'uml.include-endpoints': 'audit',
|
|
92
|
+
'uml.extend-endpoints': 'audit',
|
|
93
|
+
'uml.actor-actor-association': 'audit',
|
|
94
|
+
'uml.deploy-endpoints': 'audit',
|
|
95
|
+
'uml.manifest-endpoints': 'audit',
|
|
96
|
+
'uml.communication-path-endpoints': 'audit',
|
|
97
|
+
'uml.untyped-edge': 'audit',
|
|
98
|
+
'uml.composition-single-owner': 'audit',
|
|
99
|
+
'uml.use-case-no-actor': 'audit',
|
|
100
|
+
// The `border-proximity` rule (ADR 0024) — §11.3.4's square on the boundary.
|
|
101
|
+
'uml.port-on-border': 'audit',
|
|
102
|
+
// The behaviour sheets — fifteen more, and every one of them here too.
|
|
103
|
+
'uml.node-in-partition': 'audit',
|
|
104
|
+
'uml.shallow-history-outside-region': 'audit',
|
|
105
|
+
'uml.deep-history-outside-region': 'audit',
|
|
106
|
+
'uml.initial-single': 'audit',
|
|
107
|
+
'uml.initial-no-incoming-flow': 'audit',
|
|
108
|
+
'uml.initial-no-incoming-transition': 'audit',
|
|
109
|
+
'uml.activity-final-no-outgoing': 'audit',
|
|
110
|
+
'uml.flow-final-no-outgoing': 'audit',
|
|
111
|
+
'uml.final-state-no-outgoing': 'audit',
|
|
112
|
+
'uml.decision-incoming-count': 'audit',
|
|
113
|
+
'uml.control-flow-endpoints': 'audit',
|
|
114
|
+
'uml.object-flow-endpoints': 'audit',
|
|
115
|
+
'uml.transition-endpoints': 'audit',
|
|
116
|
+
'uml.unreachable-action': 'audit',
|
|
117
|
+
'uml.unreachable-state': 'audit',
|
|
118
|
+
// The sequence sheet — four, which is every requirement of Clause 17 this
|
|
119
|
+
// library has a family for (`rules.ts` names the four it does not): what a
|
|
120
|
+
// message runs between, what its label says, and the two questions a
|
|
121
|
+
// lifeline's own head is asked.
|
|
122
|
+
'uml.message-endpoints': 'audit',
|
|
123
|
+
'uml.message-syntax': 'audit',
|
|
124
|
+
'uml.unnamed-lifeline': 'audit',
|
|
125
|
+
'uml.lifeline-ident-syntax': 'audit',
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Strict: the diagram is a DELIVERABLE, and it is held to the specification.
|
|
130
|
+
*
|
|
131
|
+
* The level somebody chooses when a diagram stops being a thinking aid and
|
|
132
|
+
* becomes something another team — or a generator, or an XMI importer — will be
|
|
133
|
+
* handed. THIRTY-THREE rules move to `warning`, and the test each one passes is
|
|
134
|
+
* the test this library always applies: whether the diagram might honestly have
|
|
135
|
+
* meant it.
|
|
136
|
+
*
|
|
137
|
+
* Nine restate a normative clause and cannot be meant. §9.9.7 makes a
|
|
138
|
+
* generalization's ends the same kind and its hierarchy acyclic; §10.4.3 types a
|
|
139
|
+
* realization's far end as an interface; §18.1.3 types both ends of an include
|
|
140
|
+
* and of an extend; §19.2.3 puts an artefact and only an artefact on a node,
|
|
141
|
+
* §19.3.3 runs a manifestation from the artefact to what it embodies, and
|
|
142
|
+
* §19.4.3 joins two DeploymentTargets and nothing else with a communication
|
|
143
|
+
* path. A drawing contradicting one of those is a drawing whose author will
|
|
144
|
+
* change it the moment they see it.
|
|
145
|
+
*
|
|
146
|
+
* The three structural grammars are promoted for a second reason the class-side
|
|
147
|
+
* five do not have: they are what the XMI writer READS. A `«deploy»` drawn from
|
|
148
|
+
* a component produces no `deployment` element at all — the writer has no
|
|
149
|
+
* artefact to name as `deployedArtifact` — so the finding is also the warning
|
|
150
|
+
* that this diagram will export short.
|
|
151
|
+
*
|
|
152
|
+
* Three are the NAMING rules. An emptied name compartment is not a style
|
|
153
|
+
* preference at the level where somebody has said the sheet is finished: a class
|
|
154
|
+
* with no name is a class nothing in the model can refer to, and the export
|
|
155
|
+
* writes it as nothing at all.
|
|
156
|
+
*
|
|
157
|
+
* Six are the SPELLING rules (ADR 0021), and they are the only promotions in
|
|
158
|
+
* this table the EXPORTER corroborates. Each fires exactly when `grammar.ts`
|
|
159
|
+
* lost something the author wrote — a `:` with no type, an operation with no
|
|
160
|
+
* parameter list, a bound the file cannot hold — so the finding is also the
|
|
161
|
+
* warning that this line will leave the sheet less structured than it was drawn.
|
|
162
|
+
* "The file will not say what the picture says" is not a style preference at the
|
|
163
|
+
* level where somebody has called the diagram a deliverable.
|
|
164
|
+
*
|
|
165
|
+
* One is §11.5.3's arithmetic — two composites claiming one part is a drawing
|
|
166
|
+
* that cannot be built — and one is the SHEET's own declaration: a frame whose
|
|
167
|
+
* heading says `uc` and whose ink is classes is a contradiction inside one
|
|
168
|
+
* document, and the author has already spoken, which makes it the easiest
|
|
169
|
+
* promotion in the table.
|
|
170
|
+
*
|
|
171
|
+
* One is §11.3.4's PLACEMENT — `uml.port-on-border`, the newest rule in the pack
|
|
172
|
+
* and the only `border-proximity` one in the library (ADR 0024). It is the
|
|
173
|
+
* promotion the PO recette of 2026-09-16 called for (a port dragged inside its
|
|
174
|
+
* component raised nothing, ticket PF-UML.6), and it is the only geometric rule
|
|
175
|
+
* this level hardens: the class-side membership three stay
|
|
176
|
+
* an audit below because where a box sits is a drawing decision, and a port is
|
|
177
|
+
* the case where it is not. UML gives the square on the boundary a meaning and
|
|
178
|
+
* gives the same square in the middle of the component none.
|
|
179
|
+
*
|
|
180
|
+
* Three are MEMBERSHIP on the behaviour sheets — a history outside every region,
|
|
181
|
+
* an action outside every partition — and they are the promotions the recette of
|
|
182
|
+
* 2026-09-16 added. The reasoning, and why the class-side membership rules did
|
|
183
|
+
* not come with them, is on the lines themselves.
|
|
184
|
+
*
|
|
185
|
+
* ## The ten that do NOT move, and why the table spells them out
|
|
186
|
+
*
|
|
187
|
+
* `uml.element-outside-frame`, `uml.use-case-outside-subject`,
|
|
188
|
+
* `uml.actor-inside-subject`, `uml.dependency-on-object`,
|
|
189
|
+
* `uml.actor-actor-association`, `uml.untyped-edge` and `uml.use-case-no-actor`
|
|
190
|
+
* stay `audit` at both levels.
|
|
191
|
+
*
|
|
192
|
+
* Three are MEMBERSHIP: where a box sits on the canvas is a drawing decision, and
|
|
193
|
+
* each has a reading under which the author is right — a class parked beside the
|
|
194
|
+
* frame while its sheet is being rearranged, an actor drawn inside a subject by
|
|
195
|
+
* somebody making a point about an operator embedded in the system, a use case
|
|
196
|
+
* deliberately left outside the boundary while the boundary is still being
|
|
197
|
+
* argued about. Requiring the membership to be DRAWN is ours rather than the
|
|
198
|
+
* notation's, and a house reading with a second reading does not bite.
|
|
199
|
+
*
|
|
200
|
+
* `uml.use-case-no-actor` reports work that is not finished, which is what a
|
|
201
|
+
* panel is for, and it has legitimate exceptions the pack cannot see (a use case
|
|
202
|
+
* reached only through an include). `uml.dependency-on-object` and
|
|
203
|
+
* `uml.actor-actor-association` are grammar and would be defensible promotions —
|
|
204
|
+
* they are held back because each is the kind of line an author may knowingly
|
|
205
|
+
* draw to say something the notation has no glyph for, and because a level of
|
|
206
|
+
* requirement that promotes everything is a level nobody chooses twice.
|
|
207
|
+
* `uml.untyped-edge` is OURS and is the one a later slice is most likely to
|
|
208
|
+
* revisit: a role-less connector has no second reading, and the only thing
|
|
209
|
+
* keeping it here is that quick-connect is a gesture of this canvas rather than a
|
|
210
|
+
* mistake in the notation.
|
|
211
|
+
*
|
|
212
|
+
* Provenance and SEVERITY are orthogonal, and this table is where that shows:
|
|
213
|
+
* `uml.dependency-on-object` cites the specification and stays a remark, while
|
|
214
|
+
* the two naming rules are `recommendation` and are promoted.
|
|
215
|
+
*
|
|
216
|
+
* ## Nothing is `blocking-overridable`
|
|
217
|
+
*
|
|
218
|
+
* Nothing in this library implements refusal — no gesture is declined anywhere —
|
|
219
|
+
* so declaring the level would be data claiming an effect that does not exist
|
|
220
|
+
* (the `wardley/rules.ts:30` promise, kept). UML is the pack with the best claim
|
|
221
|
+
* to one the day refusal lands: §9.9.7 and §11.5.3 describe drawings that cannot
|
|
222
|
+
* be built, not drawings somebody may disagree with.
|
|
223
|
+
*/
|
|
224
|
+
const strict = {
|
|
225
|
+
id: 'uml.strict',
|
|
226
|
+
framework: 'uml',
|
|
227
|
+
labelKey: 'com.labre.uml.profile.strict',
|
|
228
|
+
fallback: 'Specification',
|
|
229
|
+
rules: {
|
|
230
|
+
// The five normative grammars of phase 1…
|
|
231
|
+
'uml.generalization-endpoints': 'warning',
|
|
232
|
+
'uml.generalization-self-loop': 'warning',
|
|
233
|
+
'uml.realization-endpoints': 'warning',
|
|
234
|
+
'uml.include-endpoints': 'warning',
|
|
235
|
+
'uml.extend-endpoints': 'warning',
|
|
236
|
+
// …and the three phase 2 added, on the same test.
|
|
237
|
+
'uml.deploy-endpoints': 'warning',
|
|
238
|
+
'uml.manifest-endpoints': 'warning',
|
|
239
|
+
'uml.communication-path-endpoints': 'warning',
|
|
240
|
+
// The two naming rules.
|
|
241
|
+
'uml.unnamed-classifier': 'warning',
|
|
242
|
+
'uml.unnamed-actor-or-use-case': 'warning',
|
|
243
|
+
// ...and the four SPELLING rules, which are the easiest promotions in the
|
|
244
|
+
// table and the only ones the EXPORTER can corroborate: each fires exactly
|
|
245
|
+
// when `grammar.ts` lost something the author wrote, so the finding is also
|
|
246
|
+
// the warning that this line will leave the sheet less structured than it
|
|
247
|
+
// was drawn. At the level where somebody has said the diagram is a
|
|
248
|
+
// deliverable, "the file will not say what the picture says" is not a style
|
|
249
|
+
// preference (ADR 0021).
|
|
250
|
+
'uml.attribute-syntax': 'warning',
|
|
251
|
+
'uml.operation-syntax': 'warning',
|
|
252
|
+
'uml.transition-syntax': 'warning',
|
|
253
|
+
'uml.multiplicity-syntax': 'warning',
|
|
254
|
+
// §11.5.3's arithmetic, and the sheet's own declaration.
|
|
255
|
+
'uml.composition-single-owner': 'warning',
|
|
256
|
+
'uml.not-admissible-on-kind': 'warning',
|
|
257
|
+
// §11.3.4's square ON the boundary — the `border-proximity` rule (ADR 0024),
|
|
258
|
+
// and the promotion the PO recette of 2026-09-16 called for (PF-UML.6).
|
|
259
|
+
//
|
|
260
|
+
// It passes the test every other promotion in this table passes, and it
|
|
261
|
+
// passes a second one the membership rules do not: a port in the middle of
|
|
262
|
+
// its component has no second reading. UML gives the placement a meaning and
|
|
263
|
+
// gives the drifted square none, and `model.ts` resolves a port's owner from
|
|
264
|
+
// exactly that geometry — so at the level where somebody has called the
|
|
265
|
+
// sheet a deliverable, the finding is also the warning that this port will
|
|
266
|
+
// export under no component at all.
|
|
267
|
+
'uml.port-on-border': 'warning',
|
|
268
|
+
// The behaviour sheets' ARITHMETIC — the clauses a drawing cannot mean.
|
|
269
|
+
// §15.3.3 gives an initial node no incoming edge, §15.7.19.4 gives a final
|
|
270
|
+
// node no outgoing one, §14.5.11.4 says the same of a final state, and
|
|
271
|
+
// §15.7.11.4 caps a decision at two incoming edges. Each of these describes
|
|
272
|
+
// a drawing that cannot execute, which is the same test the class-side
|
|
273
|
+
// promotions pass.
|
|
274
|
+
'uml.initial-no-incoming-flow': 'warning',
|
|
275
|
+
'uml.initial-no-incoming-transition': 'warning',
|
|
276
|
+
'uml.activity-final-no-outgoing': 'warning',
|
|
277
|
+
'uml.flow-final-no-outgoing': 'warning',
|
|
278
|
+
'uml.final-state-no-outgoing': 'warning',
|
|
279
|
+
'uml.decision-incoming-count': 'warning',
|
|
280
|
+
// …their two GRAMMARS, on the same test as every other endpoint rule.
|
|
281
|
+
'uml.control-flow-endpoints': 'warning',
|
|
282
|
+
'uml.transition-endpoints': 'warning',
|
|
283
|
+
// …and the count of beginnings, which is `recommendation` and promoted
|
|
284
|
+
// anyway: a second filled disc is legal in an activity and forbidden in a
|
|
285
|
+
// state machine region, and at the level where somebody has said the sheet
|
|
286
|
+
// is finished the reader is entitled to be asked which of the two this is.
|
|
287
|
+
'uml.initial-single': 'warning',
|
|
288
|
+
// The SEQUENCE sheet's four, and all four of them move — the two about a
|
|
289
|
+
// message first.
|
|
290
|
+
//
|
|
291
|
+
// `uml.message-endpoints` is an endpoint grammar and passes the test every
|
|
292
|
+
// other one in this table passes: §17.4.4 says a delete message "must end in
|
|
293
|
+
// a DestructionOccurrenceSpecification", and a message drawn between a
|
|
294
|
+
// participant and a class is a sentence an interaction cannot mean.
|
|
295
|
+
// `uml.message-syntax` is the fifth SPELLING rule and is promoted for the
|
|
296
|
+
// reason the other four are — it fires exactly when `grammar.ts` lost
|
|
297
|
+
// something the author wrote, so the finding is also the warning that the
|
|
298
|
+
// exported file will say less than the picture does.
|
|
299
|
+
'uml.message-endpoints': 'warning',
|
|
300
|
+
'uml.message-syntax': 'warning',
|
|
301
|
+
// …and the lifeline's own two, on the same two tests. `uml.unnamed-lifeline`
|
|
302
|
+
// is the third NAMING rule and moves with the other two: a participant with
|
|
303
|
+
// no name makes every arrow on the sheet a sentence with a hole in it, and
|
|
304
|
+
// at the level where somebody has said the diagram is a deliverable that is
|
|
305
|
+
// not a matter of taste. `uml.lifeline-ident-syntax` is the sixth SPELLING
|
|
306
|
+
// rule and moves for the reason all five others do — it fires exactly when
|
|
307
|
+
// `checkLifelineIdent` lost something the author wrote, which is to say when
|
|
308
|
+
// the exported participant will carry a name the picture does not show.
|
|
309
|
+
'uml.unnamed-lifeline': 'warning',
|
|
310
|
+
'uml.lifeline-ident-syntax': 'warning',
|
|
311
|
+
// The three MEMBERSHIP rules of the behaviour sheets (PO, 2026-09-16).
|
|
312
|
+
//
|
|
313
|
+
// They were `audit` here until the recette, filed with the class-side three
|
|
314
|
+
// on the argument that where a glyph sits is a drawing decision — a history
|
|
315
|
+
// placed beside the composite state because the box is too small, an action
|
|
316
|
+
// parked between two lanes while the lanes are being redrawn. The PO settled
|
|
317
|
+
// it the other way for the BEHAVIOUR sheets, and the distinction holds: a
|
|
318
|
+
// class parked beside its frame still reads as that class, whereas a history
|
|
319
|
+
// pseudostate outside every region and an action outside every partition are
|
|
320
|
+
// glyphs whose whole MEANING is the container they are in. §14.2.4 makes the
|
|
321
|
+
// history a vertex OF a region — it is what "resume where this region left
|
|
322
|
+
// off" is about — and §15.6.3 makes a partition the statement of who
|
|
323
|
+
// performs the action. Drawn outside, neither says anything at all, and at
|
|
324
|
+
// the level where somebody has called the sheet a deliverable that is not a
|
|
325
|
+
// matter of taste.
|
|
326
|
+
//
|
|
327
|
+
// The three class-side membership rules below are NOT promoted with them,
|
|
328
|
+
// for the reason the header gives: each has a second reading under which the
|
|
329
|
+
// author is right, and these three do not.
|
|
330
|
+
'uml.node-in-partition': 'warning',
|
|
331
|
+
'uml.shallow-history-outside-region': 'warning',
|
|
332
|
+
'uml.deep-history-outside-region': 'warning',
|
|
333
|
+
// The seven that do not move — see the header.
|
|
334
|
+
'uml.element-outside-frame': 'audit',
|
|
335
|
+
'uml.use-case-outside-subject': 'audit',
|
|
336
|
+
'uml.actor-inside-subject': 'audit',
|
|
337
|
+
'uml.dependency-on-object': 'audit',
|
|
338
|
+
'uml.actor-actor-association': 'audit',
|
|
339
|
+
'uml.untyped-edge': 'audit',
|
|
340
|
+
'uml.use-case-no-actor': 'audit',
|
|
341
|
+
// …and the three the behaviour sheets add to that list.
|
|
342
|
+
//
|
|
343
|
+
// `uml.object-flow-endpoints` is the ONE endpoint rule this level leaves
|
|
344
|
+
// alone, and the reason is §15.4.4: an action's pins may be elided, a pin IS
|
|
345
|
+
// an ObjectNode, and the action-to-action drawing is therefore a legal
|
|
346
|
+
// shorthand of a conformant model rather than a defect. This canvas has no
|
|
347
|
+
// pin to draw, so promoting it would harden a remark the author cannot act
|
|
348
|
+
// on.
|
|
349
|
+
'uml.object-flow-endpoints': 'audit',
|
|
350
|
+
// The two graph walks. "Nothing reaches this" is true of most of a diagram
|
|
351
|
+
// for most of the time it is being drawn, and it is already `on-demand` for
|
|
352
|
+
// that reason (`rules.ts`) — a level of requirement that hardened it would
|
|
353
|
+
// be hardening a question somebody has to ASK before it is answered.
|
|
354
|
+
'uml.unreachable-action': 'audit',
|
|
355
|
+
'uml.unreachable-state': 'audit',
|
|
356
|
+
},
|
|
357
|
+
};
|
|
358
|
+
export const UML_PROFILES = [sketch, strict];
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import type { ReadingProfile } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
/**
|
|
3
|
+
* The FOUR lines a class diagram draws off a classifier, in the order §11 and
|
|
4
|
+
* §9 put them: the association first (it is what a class diagram is mostly
|
|
5
|
+
* made of), then the taxonomy, then the contract, then the `«use»` arrow.
|
|
6
|
+
*
|
|
7
|
+
* The four are declared once and shared by the four classifier profiles, which
|
|
8
|
+
* is the same argument `roles.ts` makes about the chain: a class, an interface,
|
|
9
|
+
* an enumeration and an object carry the same lines, and four copies of this
|
|
10
|
+
* list would be four places for a wording to drift.
|
|
11
|
+
*/
|
|
12
|
+
export declare const UML_CLASS_READING: ReadingProfile;
|
|
13
|
+
export declare const UML_INTERFACE_READING: ReadingProfile;
|
|
14
|
+
export declare const UML_ENUMERATION_READING: ReadingProfile;
|
|
15
|
+
/** An instance, read through the links between instances (§9.8.4). */
|
|
16
|
+
export declare const UML_OBJECT_READING: ReadingProfile;
|
|
17
|
+
export declare const UML_PACKAGE_READING: ReadingProfile;
|
|
18
|
+
export declare const UML_NOTE_READING: ReadingProfile;
|
|
19
|
+
/** An actor's one word is a `uml:label`: there is no compartment to name. */
|
|
20
|
+
export declare const UML_ACTOR_READING: ReadingProfile;
|
|
21
|
+
/**
|
|
22
|
+
* A use case is read through the actors it serves FIRST — which is the question
|
|
23
|
+
* a use-case diagram exists to answer — and then through the two arrows §18.1.4
|
|
24
|
+
* draws between use cases.
|
|
25
|
+
*
|
|
26
|
+
* The include and the extend are the PO's O8 in its plainest form: a use case
|
|
27
|
+
* reached only through an `«include»` had a typed line on the canvas, in the
|
|
28
|
+
* export and in the direction reveal, and a panel that said "No typed link
|
|
29
|
+
* touches this component". A generalization between use cases is legal
|
|
30
|
+
* (§18.1.3) and is here for the same reason.
|
|
31
|
+
*/
|
|
32
|
+
export declare const UML_USE_CASE_READING: ReadingProfile;
|
|
33
|
+
/**
|
|
34
|
+
* A component is read through its DEPENDENCIES, like the package it is often
|
|
35
|
+
* mistaken for: §11.6.4 wires a component diagram with `«use»` arrows to the
|
|
36
|
+
* interfaces its neighbours provide, and "what does this need, and who needs it"
|
|
37
|
+
* is the question the diagram exists to answer.
|
|
38
|
+
*
|
|
39
|
+
* Then through the two other lines that reach it: the `«manifest»` arrows that
|
|
40
|
+
* say which files embody it (§19.3.4 — the far end of {@link MANIFEST}, whose
|
|
41
|
+
* near end the artifact reads) and the realizations §10.4.4 draws from a
|
|
42
|
+
* component to an interface it provides.
|
|
43
|
+
*/
|
|
44
|
+
export declare const UML_COMPONENT_READING: ReadingProfile;
|
|
45
|
+
/**
|
|
46
|
+
* A port is read through the plain connectors drawn from it (§11.3.4): an
|
|
47
|
+
* assembly or a delegation is an undecorated line, which is to say an
|
|
48
|
+
* association, and it is the only relation a port ever carries.
|
|
49
|
+
*/
|
|
50
|
+
export declare const UML_PORT_READING: ReadingProfile;
|
|
51
|
+
/** The ball of §10.4.4, read through the assembly line that joins it to a socket. */
|
|
52
|
+
export declare const UML_PROVIDED_INTERFACE_READING: ReadingProfile;
|
|
53
|
+
/** The socket, read through the same line from the other side. */
|
|
54
|
+
export declare const UML_REQUIRED_INTERFACE_READING: ReadingProfile;
|
|
55
|
+
/**
|
|
56
|
+
* An artifact is read through WHERE IT RUNS, and then through WHAT IT IS.
|
|
57
|
+
*
|
|
58
|
+
* The order is the reader's rather than the metamodel's: the `«manifest»` arrow
|
|
59
|
+
* to the component a file is the physical form of is the modelling fact, the
|
|
60
|
+
* deployment is the operational one, and an architect opening this panel on a
|
|
61
|
+
* `.war` file is asking which server it is on before asking anything else.
|
|
62
|
+
*/
|
|
63
|
+
export declare const UML_ARTIFACT_READING: ReadingProfile;
|
|
64
|
+
/**
|
|
65
|
+
* A node is read through WHAT RUNS ON IT — the same table, from the other end —
|
|
66
|
+
* and then through the nodes it can TALK TO (§19.4.4).
|
|
67
|
+
*/
|
|
68
|
+
export declare const UML_NODE_READING: ReadingProfile;
|
|
69
|
+
/** A device: a node that is hardware (§19.4.4), and read as one. */
|
|
70
|
+
export declare const UML_DEVICE_READING: ReadingProfile;
|
|
71
|
+
/** An execution environment: a node that is software, and read as one. */
|
|
72
|
+
export declare const UML_EXECUTION_ENVIRONMENT_READING: ReadingProfile;
|
|
73
|
+
/**
|
|
74
|
+
* Every artefact below takes its name off `uml:label` — except the STATE, which
|
|
75
|
+
* is a divided box and takes it off `uml:name` — and thirteen of them have none
|
|
76
|
+
* to take: a control node and a pseudostate are created with no text at all
|
|
77
|
+
* (`actions.ts`), because §15.3.4 and §14.2.4 name none of them. The
|
|
78
|
+
* profile still declares the tier, and that is deliberate rather than sloppy —
|
|
79
|
+
* `readElement` names the OTHER end of a relation through the SAME profile's
|
|
80
|
+
* `labelRole`, so an action reading "Flows to:" about the decision it points at
|
|
81
|
+
* agrees with the decision's own profile on where a name would be if there were
|
|
82
|
+
* one. Declaring a different tier on the unnamed ones would break that
|
|
83
|
+
* agreement for no gain.
|
|
84
|
+
*/
|
|
85
|
+
export declare const UML_ACTION_READING: ReadingProfile;
|
|
86
|
+
export declare const UML_INITIAL_READING: ReadingProfile;
|
|
87
|
+
export declare const UML_ACTIVITY_FINAL_READING: ReadingProfile;
|
|
88
|
+
export declare const UML_FLOW_FINAL_READING: ReadingProfile;
|
|
89
|
+
export declare const UML_DECISION_READING: ReadingProfile;
|
|
90
|
+
export declare const UML_FORK_READING: ReadingProfile;
|
|
91
|
+
/** The one artefact of the pack read through the DATA that passes through it. */
|
|
92
|
+
export declare const UML_OBJECT_NODE_READING: ReadingProfile;
|
|
93
|
+
export declare const UML_SEND_SIGNAL_READING: ReadingProfile;
|
|
94
|
+
export declare const UML_ACCEPT_EVENT_READING: ReadingProfile;
|
|
95
|
+
export declare const UML_TIME_EVENT_READING: ReadingProfile;
|
|
96
|
+
/**
|
|
97
|
+
* The one behaviour artefact named off `uml:name` rather than `uml:label`: a
|
|
98
|
+
* state is a DIVIDED BOX (§14.2.4), so its heading is a name compartment with
|
|
99
|
+
* the internal activities ruled off below it, exactly as a classifier's is.
|
|
100
|
+
*/
|
|
101
|
+
export declare const UML_STATE_READING: ReadingProfile;
|
|
102
|
+
export declare const UML_FINAL_STATE_READING: ReadingProfile;
|
|
103
|
+
export declare const UML_CHOICE_READING: ReadingProfile;
|
|
104
|
+
export declare const UML_JUNCTION_READING: ReadingProfile;
|
|
105
|
+
export declare const UML_SHALLOW_HISTORY_READING: ReadingProfile;
|
|
106
|
+
export declare const UML_DEEP_HISTORY_READING: ReadingProfile;
|
|
107
|
+
export declare const UML_ENTRY_POINT_READING: ReadingProfile;
|
|
108
|
+
export declare const UML_EXIT_POINT_READING: ReadingProfile;
|
|
109
|
+
export declare const UML_TERMINATE_READING: ReadingProfile;
|
|
110
|
+
/**
|
|
111
|
+
* A LIFELINE is read through the MESSAGES drawn on it — which is the whole of
|
|
112
|
+
* what a sequence diagram says about a participant: who calls it, and what it
|
|
113
|
+
* calls in turn (§17.4.4).
|
|
114
|
+
*
|
|
115
|
+
* `uml:lifeline-ident`, and neither of the two tiers it might have been:
|
|
116
|
+
* §17.3.4 writes `<name> : <Type>` in the head as a plain identifier, with no
|
|
117
|
+
* keyword over it and none allowed — so it is not a `uml:name`, which is the
|
|
118
|
+
* tier a keyword is written on — and the clause prints a BNF for it, which no
|
|
119
|
+
* clause does for an actor's word, so it is not a `uml:label` either
|
|
120
|
+
* (`roles.ts`). `parseLifelineIdent` is what reads that line back, and this
|
|
121
|
+
* profile names the tier it reads.
|
|
122
|
+
*/
|
|
123
|
+
export declare const UML_LIFELINE_READING: ReadingProfile;
|
|
124
|
+
/**
|
|
125
|
+
* An EXECUTION and a DESTRUCTION are read through the same table, and both are
|
|
126
|
+
* marks the notation writes nothing on (§17.2.4).
|
|
127
|
+
*
|
|
128
|
+
* They are read at all because a message may LAND on either: §17.4.4 lets a
|
|
129
|
+
* call arrive on the execution it starts, and a delete message arrives at the
|
|
130
|
+
* cross. Both declare `uml:lifeline-ident` — the tier NEITHER of them carries —
|
|
131
|
+
* and that is the rule phase 2 states for every unnamed artefact, applied here:
|
|
132
|
+
* `readElement` names the far end of a relation through the SUBJECT's
|
|
133
|
+
* `labelRole`, so a bar and the lifeline it answers have to agree on where a
|
|
134
|
+
* name is. Declaring `uml:label` here instead would leave every participant
|
|
135
|
+
* nameless in the panel opened on a bar, and a reading that says a message came
|
|
136
|
+
* from nowhere is worse than one that says nothing.
|
|
137
|
+
*/
|
|
138
|
+
export declare const UML_EXECUTION_READING: ReadingProfile;
|
|
139
|
+
export declare const UML_DESTRUCTION_READING: ReadingProfile;
|
|
140
|
+
/**
|
|
141
|
+
* The two PARENTS, and the reason they are read at all.
|
|
142
|
+
*
|
|
143
|
+
* `uml:control-node` and `uml:pseudostate` are the generalisations §15.3.4 and
|
|
144
|
+
* §14.2.4 give their routing marks, and rules are written on them so that one
|
|
145
|
+
* declaration reaches five children (`rules.ts`). Nothing is ever drawn AS one
|
|
146
|
+
* — every creation command stamps a concrete role — so each of these profiles
|
|
147
|
+
* is a floor rather than an answer: it exists so that a routing mark added to
|
|
148
|
+
* the pack in a later phase is readable from the day its role is filed under
|
|
149
|
+
* its parent, instead of falling through to no reading at all and failing
|
|
150
|
+
* `reading-coverage` in `affine/all`.
|
|
151
|
+
*
|
|
152
|
+
* Registered LAST, after every child, for the reason `uml-node` is: the engine
|
|
153
|
+
* takes the FIRST profile whose `appliesTo` the element's role IS A, so a
|
|
154
|
+
* parent listed early would answer for all five of its children and none of
|
|
155
|
+
* them would ever use its own.
|
|
156
|
+
*/
|
|
157
|
+
export declare const UML_CONTROL_NODE_READING: ReadingProfile;
|
|
158
|
+
export declare const UML_PSEUDOSTATE_READING: ReadingProfile;
|
|
159
|
+
/** Every UML profile, in the order the view extension registers them. */
|
|
160
|
+
export declare const UML_READINGS: readonly ReadingProfile[];
|