@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.
Files changed (114) hide show
  1. package/LICENSE +384 -0
  2. package/dist/actions.d.ts +430 -0
  3. package/dist/actions.js +724 -0
  4. package/dist/background.d.ts +153 -0
  5. package/dist/background.js +557 -0
  6. package/dist/board-hit.d.ts +137 -0
  7. package/dist/board-hit.js +191 -0
  8. package/dist/commands-manifest.d.ts +19 -0
  9. package/dist/commands-manifest.js +571 -0
  10. package/dist/commands.d.ts +4 -0
  11. package/dist/commands.js +983 -0
  12. package/dist/component.d.ts +521 -0
  13. package/dist/component.js +708 -0
  14. package/dist/consts.d.ts +365 -0
  15. package/dist/consts.js +463 -0
  16. package/dist/descriptor.d.ts +12 -0
  17. package/dist/descriptor.js +10 -0
  18. package/dist/drawio-decode.d.ts +32 -0
  19. package/dist/drawio-decode.js +96 -0
  20. package/dist/drawio-import.d.ts +133 -0
  21. package/dist/drawio-import.js +885 -0
  22. package/dist/edge-morph.d.ts +154 -0
  23. package/dist/edge-morph.js +153 -0
  24. package/dist/edge-styles.d.ts +78 -0
  25. package/dist/edge-styles.js +210 -0
  26. package/dist/effects.d.ts +9 -0
  27. package/dist/effects.js +6 -0
  28. package/dist/element-renderer.d.ts +64 -0
  29. package/dist/element-renderer.js +114 -0
  30. package/dist/element-view.d.ts +234 -0
  31. package/dist/element-view.js +430 -0
  32. package/dist/export.d.ts +61 -0
  33. package/dist/export.js +41 -0
  34. package/dist/filename.d.ts +17 -0
  35. package/dist/filename.js +26 -0
  36. package/dist/frame-tag.d.ts +70 -0
  37. package/dist/frame-tag.js +78 -0
  38. package/dist/grammar.d.ts +695 -0
  39. package/dist/grammar.js +1436 -0
  40. package/dist/import.d.ts +306 -0
  41. package/dist/import.js +1270 -0
  42. package/dist/index.d.ts +47 -0
  43. package/dist/index.js +67 -0
  44. package/dist/interchange.d.ts +125 -0
  45. package/dist/interchange.js +372 -0
  46. package/dist/keywords.d.ts +204 -0
  47. package/dist/keywords.js +361 -0
  48. package/dist/kinds.d.ts +73 -0
  49. package/dist/kinds.js +91 -0
  50. package/dist/legend.d.ts +30 -0
  51. package/dist/legend.js +255 -0
  52. package/dist/model.d.ts +862 -0
  53. package/dist/model.js +1316 -0
  54. package/dist/morph.d.ts +178 -0
  55. package/dist/morph.js +496 -0
  56. package/dist/node/act-glyphs.d.ts +30 -0
  57. package/dist/node/act-glyphs.js +142 -0
  58. package/dist/node/compartment-watcher.d.ts +107 -0
  59. package/dist/node/compartment-watcher.js +163 -0
  60. package/dist/node/fit.d.ts +85 -0
  61. package/dist/node/fit.js +129 -0
  62. package/dist/node/node-renderer.d.ts +49 -0
  63. package/dist/node/node-renderer.js +611 -0
  64. package/dist/node/node-view.d.ts +51 -0
  65. package/dist/node/node-view.js +89 -0
  66. package/dist/node/paint.d.ts +84 -0
  67. package/dist/node/paint.js +143 -0
  68. package/dist/node/sd-glyphs.d.ts +36 -0
  69. package/dist/node/sd-glyphs.js +79 -0
  70. package/dist/node/stm-glyphs.d.ts +22 -0
  71. package/dist/node/stm-glyphs.js +111 -0
  72. package/dist/node/tier-metrics.d.ts +38 -0
  73. package/dist/node/tier-metrics.js +45 -0
  74. package/dist/operators.d.ts +45 -0
  75. package/dist/operators.js +75 -0
  76. package/dist/plantuml-import.d.ts +113 -0
  77. package/dist/plantuml-import.js +1723 -0
  78. package/dist/plantuml.d.ts +94 -0
  79. package/dist/plantuml.js +985 -0
  80. package/dist/presets.d.ts +149 -0
  81. package/dist/presets.js +302 -0
  82. package/dist/profiles.d.ts +2 -0
  83. package/dist/profiles.js +358 -0
  84. package/dist/reading.d.ts +160 -0
  85. package/dist/reading.js +648 -0
  86. package/dist/roles.d.ts +257 -0
  87. package/dist/roles.js +997 -0
  88. package/dist/rules.d.ts +267 -0
  89. package/dist/rules.js +3090 -0
  90. package/dist/templates.d.ts +2 -0
  91. package/dist/templates.js +197 -0
  92. package/dist/toolbar/config.d.ts +228 -0
  93. package/dist/toolbar/config.js +833 -0
  94. package/dist/toolbar/icons.d.ts +440 -0
  95. package/dist/toolbar/icons.js +711 -0
  96. package/dist/toolbar/senior-tool.d.ts +11 -0
  97. package/dist/toolbar/senior-tool.js +21 -0
  98. package/dist/toolbar/uml-menu.d.ts +17 -0
  99. package/dist/toolbar/uml-menu.js +20 -0
  100. package/dist/toolbar/uml-senior-button.d.ts +18 -0
  101. package/dist/toolbar/uml-senior-button.js +22 -0
  102. package/dist/translations.d.ts +27 -0
  103. package/dist/translations.js +117 -0
  104. package/dist/view.d.ts +33 -0
  105. package/dist/view.js +236 -0
  106. package/dist/xmi-import.d.ts +174 -0
  107. package/dist/xmi-import.js +2268 -0
  108. package/dist/xmi.d.ts +61 -0
  109. package/dist/xmi.js +1860 -0
  110. package/dist/xml-reader.d.ts +157 -0
  111. package/dist/xml-reader.js +430 -0
  112. package/dist/xml.d.ts +72 -0
  113. package/dist/xml.js +96 -0
  114. package/package.json +38 -0
@@ -0,0 +1,153 @@
1
+ import type { FrameworkBackgroundDef } from '@formicoidea/labre-core/blocks/surface';
2
+ /**
3
+ * The four UML frames, DECLARED (the `FrameworkBackgroundDef` primitive): the
4
+ * diagram sheet of Annex A, the use case subject of §18.1.4, the activity
5
+ * partition of §15.6.4 (in its two orientations) and the composite state of
6
+ * §14.2.4.
7
+ *
8
+ * There is no UML drawing code for either of them: the primitive paints these
9
+ * declarations, and would paint any other framework's the same way
10
+ * (`docs/adr/0009` on why a framework declares rather than draws). The ONE thing
11
+ * UML asks for that the primitive has no vocabulary for — the cut-corner heading
12
+ * tag of Annex A — is a decorator over the renderer these produce, and it lives
13
+ * in `frame-tag.ts` rather than in a new field of the declaration language.
14
+ */
15
+ /**
16
+ * The UML diagram frame: a white card with a square border and a heading band
17
+ * across its top.
18
+ *
19
+ * **No axes and no zones**, like the C4 board this is modelled on and for the
20
+ * same reason: a UML diagram is a GRAPH. A class drawn top left says nothing
21
+ * more than one drawn bottom right, and graduating the card would invent a frame
22
+ * of reference UML does not have — and then judge people against it.
23
+ *
24
+ * ## The heading is `heading`, not `name` — and that is the whole difference
25
+ *
26
+ * A C4 board writes its title, which is free text. Annex A writes `<kind>
27
+ * <name>`: a class diagram called Orders reads `class Orders`, and only the
28
+ * second word is the author's. So the label binds the model's DERIVED
29
+ * {@link UmlDiagramElementModel.heading} — the two halves joined — and the
30
+ * rename gesture writes `name` alone (`element-view.ts`). Binding `heading`
31
+ * directly would let an editor write the joined string back into a getter, which
32
+ * would either throw or, worse, re-prefix the kind on every rename.
33
+ *
34
+ * ## Why the band paints NOTHING
35
+ *
36
+ * It declares no fill and no divider, which is not an oversight: Annex A draws a
37
+ * frame as one rectangle with a tag in its corner, and a rule ruled across the
38
+ * sheet under the heading would be a line the notation does not have. The band
39
+ * exists to place the words and to reserve the top margin; what a reader SEES
40
+ * there is the tag, and what a user AIMS at is the tag — which is the affordance
41
+ * the C4 board needed its painted strip for.
42
+ *
43
+ * The model's own carve-out (`UmlDiagramElementModel.includesPoint`) still picks
44
+ * the whole band, so a click anywhere along the top margin selects the sheet
45
+ * rather than falling through to the canvas. That is deliberately WIDER than
46
+ * what is painted, and it is the one place the two disagree: the alternative is
47
+ * a frame whose corner tag is the only selectable part of a 44-unit strip that
48
+ * is plainly part of the sheet.
49
+ */
50
+ export declare const UML_DIAGRAM_FRAME: FrameworkBackgroundDef;
51
+ /**
52
+ * The use case SUBJECT (§18.1.4): a plain rectangle with its name written inside
53
+ * the top-left corner, drawn round the use cases a system offers.
54
+ *
55
+ * TRANSPARENT, like the C4 boundary and for the same reason: it is drawn OVER a
56
+ * diagram, round elements that are already there, and an opaque card would hide
57
+ * the very thing it is pointing at. So it declares a border and no fill, which
58
+ * the primitive paints as an unfilled frame — and the consequence is the reverse
59
+ * of the usual one: a subject dropped over existing use cases does NOT cover
60
+ * them, and is hit nowhere but on its own frame band and its name.
61
+ *
62
+ * SOLID, unlike that boundary, and this is where the two notations part company:
63
+ * C4's stencil dashes its boundary, §18.1.4 draws one unbroken rectangle. A dash
64
+ * here would say "logical grouping" in a notation where a subject is a
65
+ * SYSTEM — the thing whose behaviour the use cases are, with the actors
66
+ * deliberately outside it.
67
+ *
68
+ * The name is written TOP-left rather than the boundary's bottom-left: that is
69
+ * where the specification's figures put it, and it is also the corner a use case
70
+ * ellipse is least likely to reach into, ellipses having no corners of their own.
71
+ *
72
+ * No variant and no second tier: §18.1.4 gives the subject one rectangle and one
73
+ * name — no dashed flavour, no keyword line — so there is nothing here for a
74
+ * variant to select between.
75
+ */
76
+ export declare const UML_SUBJECT_FRAME: FrameworkBackgroundDef;
77
+ /** A VERTICAL partition — a column, its name written across the top. */
78
+ export declare const UML_PARTITION_FRAME_V: FrameworkBackgroundDef;
79
+ /** A HORIZONTAL partition — a row, its name written down the left edge. */
80
+ export declare const UML_PARTITION_FRAME_H: FrameworkBackgroundDef;
81
+ /**
82
+ * The declaration a partition element is painted and hit-tested by — the one
83
+ * place the `orientation` prop is turned into a picture.
84
+ *
85
+ * A function rather than a lookup repeated at each call site, so the renderer,
86
+ * the view and the band helpers cannot disagree about which of the two a lane
87
+ * is: all three ask this.
88
+ *
89
+ * An orientation this build has never heard of falls back to the VERTICAL
90
+ * declaration rather than painting nothing — the same promise
91
+ * `UmlDiagramElementModel.heading` makes about an unknown kind: a document
92
+ * written by a newer build still draws a lane.
93
+ */
94
+ export declare function umlPartitionFrame(model: {
95
+ orientation?: string;
96
+ }): FrameworkBackgroundDef;
97
+ /**
98
+ * The COMPOSITE STATE (§14.2.4): the round-cornered rectangle drawn round the
99
+ * sub-states of a state that has a machine of its own inside it.
100
+ *
101
+ * Transparent, band on the top, and ROUNDED — which is the whole point of it.
102
+ * §14.2.4 draws every state with rounded corners, simple or composite, and a
103
+ * square frame round a sub-machine would read as a partition or as a subject.
104
+ * `surface.border.radius` is in MODEL UNITS here (the primitive draws the card
105
+ * in the units the element is), unlike the node preset's fractional `radius`,
106
+ * so the number comes from `UML_REGION_RADIUS` rather than from
107
+ * `UML_NODE_RADIUS`.
108
+ *
109
+ * ## One region, and the ceiling stated
110
+ *
111
+ * ORTHOGONAL regions — a composite state cut into concurrent regions by dashed
112
+ * separators (§14.2.4, Figure 14.8) — are not drawn. That is an INSTANCE
113
+ * PARTITION in the declaration language (`instanceZones`, the mechanism the
114
+ * BPMN pool's lanes use), and it arrives the day the notation is asked for
115
+ * rather than as a field added here in a hurry. See `UmlRegionElementModel`.
116
+ */
117
+ export declare const UML_REGION_FRAME: FrameworkBackgroundDef;
118
+ /**
119
+ * The COMBINED FRAGMENT (§17.6.4): the rectangle drawn round part of a
120
+ * conversation with `alt`, `loop` or `opt` in its corner — and, under the `ref`
121
+ * operator, §17.7.4's InteractionUse.
122
+ *
123
+ * TRANSPARENT, like the subject and the partition and for exactly the same
124
+ * reason: it is drawn over lifelines and messages that are already there, and
125
+ * an opaque card would hide the conversation it is qualifying. SOLID border,
126
+ * because §17.6.4 draws one unbroken rectangle — the only dashed lines in the
127
+ * picture are the ones BETWEEN the operands.
128
+ *
129
+ * ## The band paints nothing, like the diagram frame's
130
+ *
131
+ * And for the same reason: §17.6.4 draws the operator in Annex A's own
132
+ * cut-corner pentagon, and a rule ruled right across the fragment under it
133
+ * would be a line the notation does not have. The band exists to place the word
134
+ * and to reserve the top margin; what a reader sees is the pentagon, drawn by
135
+ * `withUmlFrameTag` over this declaration's own label — which is why the label
136
+ * binds `operator` and why the tag carries no words of its own.
137
+ *
138
+ * ## The guard, and the one contract the operands keep
139
+ *
140
+ * `name` is the guard of the fragment's FIRST operand — `[x > 0]`, `[else]` —
141
+ * or, under `ref`, the name of the interaction referred to. It is written in
142
+ * the plot's top-left corner, which is where §17.6.4 puts an operand's guard,
143
+ * and it is a declared ZONE label so the frame view's rename gesture reaches
144
+ * it exactly as it reaches the subject's name.
145
+ *
146
+ * Once the fragment is SPLIT, the guards live in `operands` and nowhere else:
147
+ * the instance-zone label below writes each operand's own, and the first of
148
+ * them occupies the very corner `name` is written in. The contract the "add
149
+ * operand" action keeps (`actions.ts`) is therefore that splitting a fragment
150
+ * MOVES `name` into `operands[0].name` and clears it — one guard, one place,
151
+ * and no corner with two strings in it.
152
+ */
153
+ export declare const UML_FRAGMENT_FRAME: FrameworkBackgroundDef;