@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/xmi.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type UmlModel } from './model.js';
|
|
2
|
+
/**
|
|
3
|
+
* The diagrams as an **XMI 2.5.1 document** — the interchange file every UML
|
|
4
|
+
* tool reads.
|
|
5
|
+
*
|
|
6
|
+
* ## Which XMI, exactly
|
|
7
|
+
*
|
|
8
|
+
* The one a 2016 UML tool writes and reads, and the three strings that say so
|
|
9
|
+
* (Annex E of UML 2.5.1 gives the namespaces; the XMI version is XMI 2.5.1's
|
|
10
|
+
* own):
|
|
11
|
+
*
|
|
12
|
+
* - `xmi:version="20131001"` with `xmlns:xmi="http://www.omg.org/spec/XMI/20131001"`;
|
|
13
|
+
* - `xmlns:uml="http://www.omg.org/spec/UML/20161101"` — the UML 2.5.1
|
|
14
|
+
* metamodel namespace;
|
|
15
|
+
* - `PrimitiveTypes.xmi` under the same base, which is where `String`,
|
|
16
|
+
* `Integer`, `Boolean`, `Real` and `UnlimitedNatural` live.
|
|
17
|
+
*
|
|
18
|
+
* Getting these wrong is the difference between a file Papyrus opens and a file
|
|
19
|
+
* it refuses, which is why they are constants with a citation rather than
|
|
20
|
+
* literals in a template.
|
|
21
|
+
*
|
|
22
|
+
* ## No diagram interchange
|
|
23
|
+
*
|
|
24
|
+
* Not one coordinate is written. UML's DI is a second metamodel with its own
|
|
25
|
+
* namespace, and every tool lays a model out its own way on import anyway — so a
|
|
26
|
+
* half-DI would be a promise the file cannot keep, and a full one is a chantier
|
|
27
|
+
* of its own. What the file carries is the MODEL: the classifiers, their
|
|
28
|
+
* features, and the relationships between them. The picture stays in Labre.
|
|
29
|
+
*
|
|
30
|
+
* The one thing geometry still decides is CONTAINMENT — which package a class is
|
|
31
|
+
* drawn inside, which subject a use case sits in — because on a UML diagram that
|
|
32
|
+
* is not layout, it is the statement (§12.2.4, §18.1.4).
|
|
33
|
+
*
|
|
34
|
+
* ## Deterministic ids
|
|
35
|
+
*
|
|
36
|
+
* `_1`, `_2`, … minted in document order, never a hash and never a random id:
|
|
37
|
+
* the same model exports to the same bytes, so a golden test is a diff and a
|
|
38
|
+
* re-export is not a spurious change in someone's version control.
|
|
39
|
+
*
|
|
40
|
+
* ## Pure
|
|
41
|
+
*
|
|
42
|
+
* A model in, a string out. No `std`, no DOM, no clock — `docs/adr/0012` P3.
|
|
43
|
+
*/
|
|
44
|
+
export declare const XMI_VERSION = "20131001";
|
|
45
|
+
export declare const XMI_NAMESPACE = "http://www.omg.org/spec/XMI/20131001";
|
|
46
|
+
export declare const UML_NAMESPACE = "http://www.omg.org/spec/UML/20161101";
|
|
47
|
+
export declare const UML_PRIMITIVE_TYPES = "http://www.omg.org/spec/UML/20161101/PrimitiveTypes.xmi";
|
|
48
|
+
export interface UmlXmiOptions {
|
|
49
|
+
/** The `uml:Model`'s own name — the caller's document name. */
|
|
50
|
+
name?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Every diagram as one XMI document — one `uml:Model`, one package per diagram.
|
|
54
|
+
*
|
|
55
|
+
* A LIST rather than a single model, because that is what the format wants: XMI
|
|
56
|
+
* carries a whole model, and four sheets of one architecture are four packages
|
|
57
|
+
* of it, not four files. Exporting one diagram is `exportXmi([model])` and
|
|
58
|
+
* produces the same shape, which is what keeps a one-diagram file and a
|
|
59
|
+
* four-diagram file readable by the same importer.
|
|
60
|
+
*/
|
|
61
|
+
export declare function exportXmi(models: readonly UmlModel[], options?: UmlXmiOptions): string;
|