@cda/adapter-xma 0.1.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/README.md +192 -0
- package/dist/diagnostics/diagnostics.d.ts +20 -0
- package/dist/diagnostics/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics/diagnostics.js +19 -0
- package/dist/diagnostics/diagnostics.js.map +1 -0
- package/dist/diagnostics/errors.d.ts +13 -0
- package/dist/diagnostics/errors.d.ts.map +1 -0
- package/dist/diagnostics/errors.js +20 -0
- package/dist/diagnostics/errors.js.map +1 -0
- package/dist/geometry/bendpoints.d.ts +33 -0
- package/dist/geometry/bendpoints.d.ts.map +1 -0
- package/dist/geometry/bendpoints.js +44 -0
- package/dist/geometry/bendpoints.js.map +1 -0
- package/dist/geometry/geometry.d.ts +36 -0
- package/dist/geometry/geometry.d.ts.map +1 -0
- package/dist/geometry/geometry.js +41 -0
- package/dist/geometry/geometry.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/id-allocator.d.ts +34 -0
- package/dist/infrastructure/id-allocator.d.ts.map +1 -0
- package/dist/infrastructure/id-allocator.js +54 -0
- package/dist/infrastructure/id-allocator.js.map +1 -0
- package/dist/infrastructure/xml-writer.d.ts +20 -0
- package/dist/infrastructure/xml-writer.d.ts.map +1 -0
- package/dist/infrastructure/xml-writer.js +54 -0
- package/dist/infrastructure/xml-writer.js.map +1 -0
- package/dist/mapping/element-mapping.d.ts +31 -0
- package/dist/mapping/element-mapping.d.ts.map +1 -0
- package/dist/mapping/element-mapping.js +112 -0
- package/dist/mapping/element-mapping.js.map +1 -0
- package/dist/mapping/relationship-mapping.d.ts +21 -0
- package/dist/mapping/relationship-mapping.d.ts.map +1 -0
- package/dist/mapping/relationship-mapping.js +45 -0
- package/dist/mapping/relationship-mapping.js.map +1 -0
- package/dist/mapping/scheme-mapping.d.ts +38 -0
- package/dist/mapping/scheme-mapping.d.ts.map +1 -0
- package/dist/mapping/scheme-mapping.js +39 -0
- package/dist/mapping/scheme-mapping.js.map +1 -0
- package/dist/mapping/visual-mapping.d.ts +24 -0
- package/dist/mapping/visual-mapping.d.ts.map +1 -0
- package/dist/mapping/visual-mapping.js +39 -0
- package/dist/mapping/visual-mapping.js.map +1 -0
- package/dist/serializer/document-writer.d.ts +19 -0
- package/dist/serializer/document-writer.d.ts.map +1 -0
- package/dist/serializer/document-writer.js +126 -0
- package/dist/serializer/document-writer.js.map +1 -0
- package/dist/serializer/graphical-writer.d.ts +25 -0
- package/dist/serializer/graphical-writer.d.ts.map +1 -0
- package/dist/serializer/graphical-writer.js +287 -0
- package/dist/serializer/graphical-writer.js.map +1 -0
- package/dist/serializer/profile-values.d.ts +8 -0
- package/dist/serializer/profile-values.d.ts.map +1 -0
- package/dist/serializer/profile-values.js +25 -0
- package/dist/serializer/profile-values.js.map +1 -0
- package/dist/serializer/relationship-writer.d.ts +15 -0
- package/dist/serializer/relationship-writer.d.ts.map +1 -0
- package/dist/serializer/relationship-writer.js +83 -0
- package/dist/serializer/relationship-writer.js.map +1 -0
- package/dist/serializer/rtf.d.ts +9 -0
- package/dist/serializer/rtf.d.ts.map +1 -0
- package/dist/serializer/rtf.js +50 -0
- package/dist/serializer/rtf.js.map +1 -0
- package/dist/serializer/semantic-writer.d.ts +36 -0
- package/dist/serializer/semantic-writer.d.ts.map +1 -0
- package/dist/serializer/semantic-writer.js +91 -0
- package/dist/serializer/semantic-writer.js.map +1 -0
- package/dist/serializer/serialize-xma.d.ts +29 -0
- package/dist/serializer/serialize-xma.d.ts.map +1 -0
- package/dist/serializer/serialize-xma.js +80 -0
- package/dist/serializer/serialize-xma.js.map +1 -0
- package/dist/serializer/view-writer.d.ts +26 -0
- package/dist/serializer/view-writer.d.ts.map +1 -0
- package/dist/serializer/view-writer.js +147 -0
- package/dist/serializer/view-writer.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal typed XML element tree + deterministic serializer.
|
|
3
|
+
*
|
|
4
|
+
* Business logic builds `XmlElement` trees (attribute order and child order
|
|
5
|
+
* are explicit arrays, controlled entirely by the caller) and this module
|
|
6
|
+
* turns them into text. No implicit ordering, no host/timestamp-dependent
|
|
7
|
+
* output, no third-party XML dependency — keeps the runtime browser-safe.
|
|
8
|
+
*/
|
|
9
|
+
export function element(tag, attrs, children) {
|
|
10
|
+
return { tag, attrs, children };
|
|
11
|
+
}
|
|
12
|
+
export function textElement(tag, text, attrs) {
|
|
13
|
+
return { tag, attrs, text };
|
|
14
|
+
}
|
|
15
|
+
function escapeXmlText(value) {
|
|
16
|
+
return value
|
|
17
|
+
.replace(/&/g, '&')
|
|
18
|
+
.replace(/</g, '<')
|
|
19
|
+
.replace(/>/g, '>')
|
|
20
|
+
.replace(/\r/g, ' ')
|
|
21
|
+
.replace(/\n/g, ' ');
|
|
22
|
+
}
|
|
23
|
+
function escapeXmlAttr(value) {
|
|
24
|
+
return escapeXmlText(value).replace(/"/g, '"');
|
|
25
|
+
}
|
|
26
|
+
function renderElement(el, out) {
|
|
27
|
+
out.push('<', el.tag);
|
|
28
|
+
for (const [name, value] of el.attrs ?? []) {
|
|
29
|
+
out.push(' ', name, '="', escapeXmlAttr(value), '"');
|
|
30
|
+
}
|
|
31
|
+
const hasChildren = el.children !== undefined && el.children.length > 0;
|
|
32
|
+
const hasText = el.text !== undefined && el.text.length > 0;
|
|
33
|
+
if (!hasChildren && !hasText) {
|
|
34
|
+
out.push('/>');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
out.push('>');
|
|
38
|
+
if (hasText) {
|
|
39
|
+
out.push(escapeXmlText(el.text));
|
|
40
|
+
}
|
|
41
|
+
if (hasChildren) {
|
|
42
|
+
for (const child of el.children) {
|
|
43
|
+
renderElement(child, out);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
out.push('</', el.tag, '>');
|
|
47
|
+
}
|
|
48
|
+
/** Renders a root element to a complete, deterministic XML document string. */
|
|
49
|
+
export function renderXmlDocument(root) {
|
|
50
|
+
const out = ['<?xml version="1.0" encoding="UTF-8"?>\n'];
|
|
51
|
+
renderElement(root, out);
|
|
52
|
+
return out.join('');
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=xml-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml-writer.js","sourceRoot":"","sources":["../../src/infrastructure/xml-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,MAAM,UAAU,OAAO,CACrB,GAAW,EACX,KAA+B,EAC/B,QAAuB;IAEvB,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAW,EAAE,IAAY,EAAE,KAA+B;IACpF,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,KAAK;SACT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC;SACvB,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,aAAa,CAAC,EAAc,EAAE,GAAa;IAClD,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IACtB,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,I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
3
|
+
*
|
|
4
|
+
* Directly confirmed against `tests/fixtures/catalog/catalogo.{archimate,xma}`
|
|
5
|
+
* (60 ArchiMate concept types, one view) and cross-checked against
|
|
6
|
+
* `tests/fixtures/relationships/relaciones.{archimate,xma}`. Every field
|
|
7
|
+
* below (scheme tag, collection tag/name, fill category, icon presence) was
|
|
8
|
+
* read directly off those reference files — nothing here is extrapolated
|
|
9
|
+
* beyond what both fixtures show.
|
|
10
|
+
*
|
|
11
|
+
* This is immutable mapping DATA, looked up by Archi type — never a
|
|
12
|
+
* switch/if-chain.
|
|
13
|
+
*/
|
|
14
|
+
export type PresentationCategory = 'Strategy' | 'Business' | 'Application' | 'Technology' | 'Physical' | 'Motivation' | 'ImplementationMigration' | 'Location' | 'Grouping';
|
|
15
|
+
export interface ElementMappingEntry {
|
|
16
|
+
archiType: string;
|
|
17
|
+
xmaType: string;
|
|
18
|
+
scheme: string;
|
|
19
|
+
collectionTag: string;
|
|
20
|
+
collectionName: string;
|
|
21
|
+
category: PresentationCategory;
|
|
22
|
+
hasIcon: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** `ArchiElement.type` -> mapping entry. Elements not present here are unsupported for v0.1. */
|
|
25
|
+
export declare const ELEMENT_MAPPINGS: readonly ElementMappingEntry[];
|
|
26
|
+
export declare function lookupElementMapping(archiType: string): ElementMappingEntry | undefined;
|
|
27
|
+
export declare function getSchemeCollectionOrder(schemeTag: string): ReadonlyArray<{
|
|
28
|
+
tag: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}>;
|
|
31
|
+
//# sourceMappingURL=element-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-mapping.d.ts","sourceRoot":"","sources":["../../src/mapping/element-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,oBAAoB,GAC5B,UAAU,GACV,UAAU,GACV,aAAa,GACb,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,yBAAyB,GACzB,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,EAAE,SAAS,mBAAmB,EA4E1D,CAAC;AAIF,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAEvF;AAuBD,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAExG"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Archi element type -> XMA semantic type/scheme/collection mapping.
|
|
3
|
+
*
|
|
4
|
+
* Directly confirmed against `tests/fixtures/catalog/catalogo.{archimate,xma}`
|
|
5
|
+
* (60 ArchiMate concept types, one view) and cross-checked against
|
|
6
|
+
* `tests/fixtures/relationships/relaciones.{archimate,xma}`. Every field
|
|
7
|
+
* below (scheme tag, collection tag/name, fill category, icon presence) was
|
|
8
|
+
* read directly off those reference files — nothing here is extrapolated
|
|
9
|
+
* beyond what both fixtures show.
|
|
10
|
+
*
|
|
11
|
+
* This is immutable mapping DATA, looked up by Archi type — never a
|
|
12
|
+
* switch/if-chain.
|
|
13
|
+
*/
|
|
14
|
+
/** `ArchiElement.type` -> mapping entry. Elements not present here are unsupported for v0.1. */
|
|
15
|
+
export const ELEMENT_MAPPINGS = [
|
|
16
|
+
// Strategy
|
|
17
|
+
{ archiType: 'Resource', xmaType: 'StrategyResource', scheme: 'StrategyScheme', collectionTag: 'StrategyResources', collectionName: 'resources', category: 'Strategy', hasIcon: true },
|
|
18
|
+
{ archiType: 'Capability', xmaType: 'StrategyCapability', scheme: 'StrategyScheme', collectionTag: 'StrategyCapabilities', collectionName: 'capabilities', category: 'Strategy', hasIcon: true },
|
|
19
|
+
{ archiType: 'ValueStream', xmaType: 'StrategyValueStream', scheme: 'StrategyScheme', collectionTag: 'StrategyValueStreams', collectionName: 'streams', category: 'Strategy', hasIcon: true },
|
|
20
|
+
{ archiType: 'CourseOfAction', xmaType: 'StrategyCourseOfAction', scheme: 'StrategyScheme', collectionTag: 'StrategyCoursesOfAction', collectionName: 'courses', category: 'Strategy', hasIcon: true },
|
|
21
|
+
// Business
|
|
22
|
+
{ archiType: 'BusinessActor', xmaType: 'BusinessActor', scheme: 'BusinessScheme', collectionTag: 'BusinessActors', collectionName: 'actors', category: 'Business', hasIcon: true },
|
|
23
|
+
{ archiType: 'BusinessRole', xmaType: 'BusinessRole', scheme: 'BusinessScheme', collectionTag: 'BusinessRoles', collectionName: 'roles', category: 'Business', hasIcon: true },
|
|
24
|
+
{ archiType: 'BusinessCollaboration', xmaType: 'BusinessCollaboration', scheme: 'BusinessScheme', collectionTag: 'BusinessRoles', collectionName: 'roles', category: 'Business', hasIcon: true },
|
|
25
|
+
{ archiType: 'BusinessInterface', xmaType: 'BusinessInterface', scheme: 'BusinessScheme', collectionTag: 'BusinessInterfaces', collectionName: 'interfaces', category: 'Business', hasIcon: true },
|
|
26
|
+
{ archiType: 'BusinessProcess', xmaType: 'BusinessProcess', scheme: 'BusinessScheme', collectionTag: 'BusinessProcesses', collectionName: 'processes', category: 'Business', hasIcon: true },
|
|
27
|
+
{ archiType: 'BusinessFunction', xmaType: 'BusinessFunction', scheme: 'BusinessScheme', collectionTag: 'BusinessFunctions', collectionName: 'functions', category: 'Business', hasIcon: true },
|
|
28
|
+
{ archiType: 'BusinessInteraction', xmaType: 'BusinessInteraction', scheme: 'BusinessScheme', collectionTag: 'BusinessInteractions', collectionName: 'interactions', category: 'Business', hasIcon: true },
|
|
29
|
+
{ archiType: 'BusinessEvent', xmaType: 'BusinessEvent', scheme: 'BusinessScheme', collectionTag: 'BusinessEvents', collectionName: 'events', category: 'Business', hasIcon: false },
|
|
30
|
+
{ archiType: 'BusinessService', xmaType: 'BusinessService', scheme: 'BusinessScheme', collectionTag: 'BusinessServices', collectionName: 'services', category: 'Business', hasIcon: false },
|
|
31
|
+
{ archiType: 'BusinessObject', xmaType: 'BusinessObject', scheme: 'BusinessScheme', collectionTag: 'BusinessObjects', collectionName: 'objects', category: 'Business', hasIcon: false },
|
|
32
|
+
{ archiType: 'Contract', xmaType: 'BusinessContract', scheme: 'BusinessScheme', collectionTag: 'BusinessObjects', collectionName: 'objects', category: 'Business', hasIcon: false },
|
|
33
|
+
{ archiType: 'Representation', xmaType: 'BusinessRepresentation', scheme: 'BusinessScheme', collectionTag: 'BusinessRepresentations', collectionName: 'representations', category: 'Business', hasIcon: false },
|
|
34
|
+
{ archiType: 'Product', xmaType: 'BusinessProduct', scheme: 'BusinessScheme', collectionTag: 'BusinessProducts', collectionName: 'products', category: 'Business', hasIcon: false },
|
|
35
|
+
// Application
|
|
36
|
+
{ archiType: 'ApplicationComponent', xmaType: 'ApplicationComponent', scheme: 'ApplicationScheme', collectionTag: 'ApplicationComponents', collectionName: 'components', category: 'Application', hasIcon: true },
|
|
37
|
+
{ archiType: 'ApplicationCollaboration', xmaType: 'ApplicationCollaboration', scheme: 'ApplicationScheme', collectionTag: 'ApplicationComponents', collectionName: 'components', category: 'Application', hasIcon: true },
|
|
38
|
+
{ archiType: 'ApplicationInterface', xmaType: 'ApplicationInterface', scheme: 'ApplicationScheme', collectionTag: 'ApplicationInterfaces', collectionName: 'interfaces', category: 'Application', hasIcon: true },
|
|
39
|
+
{ archiType: 'ApplicationFunction', xmaType: 'ApplicationFunction', scheme: 'ApplicationScheme', collectionTag: 'ApplicationFunctions', collectionName: 'functions', category: 'Application', hasIcon: true },
|
|
40
|
+
{ archiType: 'ApplicationInteraction', xmaType: 'ApplicationInteraction', scheme: 'ApplicationScheme', collectionTag: 'ApplicationInteractions', collectionName: 'interactions', category: 'Application', hasIcon: true },
|
|
41
|
+
{ archiType: 'ApplicationProcess', xmaType: 'ApplicationProcess', scheme: 'ApplicationScheme', collectionTag: 'ApplicationProcesses', collectionName: 'processes', category: 'Application', hasIcon: true },
|
|
42
|
+
{ archiType: 'ApplicationEvent', xmaType: 'ApplicationEvent', scheme: 'ApplicationScheme', collectionTag: 'ApplicationEvents', collectionName: 'events', category: 'Application', hasIcon: false },
|
|
43
|
+
{ archiType: 'ApplicationService', xmaType: 'ApplicationService', scheme: 'ApplicationScheme', collectionTag: 'ApplicationServices', collectionName: 'services', category: 'Application', hasIcon: false },
|
|
44
|
+
{ archiType: 'DataObject', xmaType: 'ApplicationDataObject', scheme: 'ApplicationScheme', collectionTag: 'ApplicationDataObjects', collectionName: 'dataObjects', category: 'Application', hasIcon: false },
|
|
45
|
+
// Technology
|
|
46
|
+
{ archiType: 'Node', xmaType: 'TechnologyNode', scheme: 'TechnologyScheme', collectionTag: 'TechnologyNodes', collectionName: 'nodes', category: 'Technology', hasIcon: false },
|
|
47
|
+
{ archiType: 'Device', xmaType: 'TechnologyDevice', scheme: 'TechnologyScheme', collectionTag: 'TechnologyNodes', collectionName: 'nodes', category: 'Technology', hasIcon: false },
|
|
48
|
+
{ archiType: 'SystemSoftware', xmaType: 'TechnologySystemSoftware', scheme: 'TechnologyScheme', collectionTag: 'TechnologyNodes', collectionName: 'nodes', category: 'Technology', hasIcon: true },
|
|
49
|
+
{ archiType: 'TechnologyCollaboration', xmaType: 'TechnologyCollaboration', scheme: 'TechnologyScheme', collectionTag: 'TechnologyNodes', collectionName: 'nodes', category: 'Technology', hasIcon: true },
|
|
50
|
+
{ archiType: 'TechnologyInterface', xmaType: 'TechnologyInterface', scheme: 'TechnologyScheme', collectionTag: 'TechnologyInterfaces', collectionName: 'interfaces', category: 'Technology', hasIcon: true },
|
|
51
|
+
{ archiType: 'Path', xmaType: 'TechnologyPath', scheme: 'TechnologyScheme', collectionTag: 'TechnologyPaths', collectionName: 'paths', category: 'Technology', hasIcon: true },
|
|
52
|
+
{ archiType: 'CommunicationNetwork', xmaType: 'TechnologyCommunicationNetwork', scheme: 'TechnologyScheme', collectionTag: 'TechnologyCommunicationNetworks', collectionName: 'networks', category: 'Technology', hasIcon: true },
|
|
53
|
+
{ archiType: 'TechnologyFunction', xmaType: 'TechnologyFunction', scheme: 'TechnologyScheme', collectionTag: 'TechnologyFunctions', collectionName: 'functions', category: 'Technology', hasIcon: true },
|
|
54
|
+
{ archiType: 'TechnologyProcess', xmaType: 'TechnologyProcess', scheme: 'TechnologyScheme', collectionTag: 'TechnologyProcesses', collectionName: 'processes', category: 'Technology', hasIcon: true },
|
|
55
|
+
{ archiType: 'TechnologyInteraction', xmaType: 'TechnologyInteraction', scheme: 'TechnologyScheme', collectionTag: 'TechnologyInteractions', collectionName: 'interactions', category: 'Technology', hasIcon: true },
|
|
56
|
+
{ archiType: 'TechnologyEvent', xmaType: 'TechnologyEvent', scheme: 'TechnologyScheme', collectionTag: 'TechnologyEvents', collectionName: 'events', category: 'Technology', hasIcon: false },
|
|
57
|
+
{ archiType: 'TechnologyService', xmaType: 'TechnologyService', scheme: 'TechnologyScheme', collectionTag: 'TechnologyServices', collectionName: 'services', category: 'Technology', hasIcon: false },
|
|
58
|
+
{ archiType: 'Artifact', xmaType: 'TechnologyArtifact', scheme: 'TechnologyScheme', collectionTag: 'TechnologyArtifacts', collectionName: 'artifacts', category: 'Technology', hasIcon: false },
|
|
59
|
+
// Physical
|
|
60
|
+
{ archiType: 'Equipment', xmaType: 'PhysicalEquipment', scheme: 'PhysicalScheme', collectionTag: 'PhysicalEquipments', collectionName: 'equipments', category: 'Physical', hasIcon: true },
|
|
61
|
+
{ archiType: 'Facility', xmaType: 'PhysicalFacility', scheme: 'PhysicalScheme', collectionTag: 'PhysicalFacilities', collectionName: 'facilities', category: 'Physical', hasIcon: true },
|
|
62
|
+
{ archiType: 'DistributionNetwork', xmaType: 'PhysicalDistributionNetwork', scheme: 'PhysicalScheme', collectionTag: 'PhysicalDistributionNetworks', collectionName: 'networks', category: 'Physical', hasIcon: true },
|
|
63
|
+
{ archiType: 'Material', xmaType: 'PhysicalMaterial', scheme: 'PhysicalScheme', collectionTag: 'PhysicalMaterials', collectionName: 'materials', category: 'Physical', hasIcon: true },
|
|
64
|
+
// Motivation
|
|
65
|
+
{ archiType: 'Stakeholder', xmaType: 'MotivationStakeholder', scheme: 'MotivationScheme', collectionTag: 'MotivationStakeholders', collectionName: 'stakeholders', category: 'Motivation', hasIcon: true },
|
|
66
|
+
{ archiType: 'Driver', xmaType: 'MotivationDriver', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: true },
|
|
67
|
+
{ archiType: 'Assessment', xmaType: 'MotivationAssessment', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: true },
|
|
68
|
+
{ archiType: 'Goal', xmaType: 'MotivationGoal', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: true },
|
|
69
|
+
{ archiType: 'Outcome', xmaType: 'MotivationOutcome', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: true },
|
|
70
|
+
{ archiType: 'Principle', xmaType: 'MotivationPrinciple', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: true },
|
|
71
|
+
{ archiType: 'Requirement', xmaType: 'MotivationRequirement', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: true },
|
|
72
|
+
{ archiType: 'Constraint', xmaType: 'MotivationConstraint', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: true },
|
|
73
|
+
{ archiType: 'Meaning', xmaType: 'MotivationMeaning', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: false },
|
|
74
|
+
{ archiType: 'Value', xmaType: 'MotivationValue', scheme: 'MotivationScheme', collectionTag: 'MotivationElements', collectionName: 'motivations', category: 'Motivation', hasIcon: false },
|
|
75
|
+
// Implementation & Migration
|
|
76
|
+
{ archiType: 'WorkPackage', xmaType: 'IMWorkpackage', scheme: 'IMScheme', collectionTag: 'IMWorkpackages', collectionName: 'workpackages', category: 'ImplementationMigration', hasIcon: true },
|
|
77
|
+
{ archiType: 'Deliverable', xmaType: 'IMDeliverable', scheme: 'IMScheme', collectionTag: 'IMDeliverables', collectionName: 'deliverables', category: 'ImplementationMigration', hasIcon: false },
|
|
78
|
+
{ archiType: 'ImplementationEvent', xmaType: 'IMImplementationEvent', scheme: 'IMScheme', collectionTag: 'IMImplementationEvents', collectionName: 'events', category: 'ImplementationMigration', hasIcon: false },
|
|
79
|
+
{ archiType: 'Gap', xmaType: 'IMGap', scheme: 'IMScheme', collectionTag: 'IMGaps', collectionName: 'gaps', category: 'ImplementationMigration', hasIcon: true },
|
|
80
|
+
{ archiType: 'Plateau', xmaType: 'IMPlateau', scheme: 'IMScheme', collectionTag: 'IMPlateaus', collectionName: 'plateaus', category: 'ImplementationMigration', hasIcon: true },
|
|
81
|
+
// Composite
|
|
82
|
+
{ archiType: 'Location', xmaType: 'CompositeLocation', scheme: 'CompositeScheme', collectionTag: 'CompositeLocations', collectionName: 'locations', category: 'Location', hasIcon: true },
|
|
83
|
+
{ archiType: 'Grouping', xmaType: 'CompositeGrouping', scheme: 'CompositeScheme', collectionTag: 'CompositeGroupings', collectionName: 'groupings', category: 'Grouping', hasIcon: false },
|
|
84
|
+
];
|
|
85
|
+
const BY_ARCHI_TYPE = new Map(ELEMENT_MAPPINGS.map((entry) => [entry.archiType, entry]));
|
|
86
|
+
export function lookupElementMapping(archiType) {
|
|
87
|
+
return BY_ARCHI_TYPE.get(archiType);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* For a given scheme tag, the ordered, de-duplicated list of collections it
|
|
91
|
+
* can contain — declaration order in {@link ELEMENT_MAPPINGS}, independent of
|
|
92
|
+
* input model traversal order, so output collection order never depends on
|
|
93
|
+
* which element happens to appear first in the source `.archimate` file.
|
|
94
|
+
*/
|
|
95
|
+
const SCHEME_COLLECTION_ORDER = (() => {
|
|
96
|
+
const bySchemeTag = new Map();
|
|
97
|
+
for (const entry of ELEMENT_MAPPINGS) {
|
|
98
|
+
let collections = bySchemeTag.get(entry.scheme);
|
|
99
|
+
if (!collections) {
|
|
100
|
+
collections = [];
|
|
101
|
+
bySchemeTag.set(entry.scheme, collections);
|
|
102
|
+
}
|
|
103
|
+
if (!collections.some((c) => c.tag === entry.collectionTag)) {
|
|
104
|
+
collections.push({ tag: entry.collectionTag, name: entry.collectionName });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return bySchemeTag;
|
|
108
|
+
})();
|
|
109
|
+
export function getSchemeCollectionOrder(schemeTag) {
|
|
110
|
+
return SCHEME_COLLECTION_ORDER.get(schemeTag) ?? [];
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=element-mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-mapping.js","sourceRoot":"","sources":["../../src/mapping/element-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuBH,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAmC;IAC9D,WAAW;IACX,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE;IACtL,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,gBAA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CAAC,IAAI,EAAE,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Archi relationship mapping, resolved by (relationship type, source
|
|
3
|
+
* semantic type, target semantic type) — never by relationship type alone.
|
|
4
|
+
*
|
|
5
|
+
* Only THREE mappings are proven, all confirmed directly against
|
|
6
|
+
* `tests/fixtures/relationships/relaciones.{archimate,xma}`. Every other
|
|
7
|
+
* relationship type/source/target combination is unsupported for v0.1 and
|
|
8
|
+
* must be diagnosed, never guessed (see `serializer/relationship-writer.ts`).
|
|
9
|
+
*/
|
|
10
|
+
export interface RelationshipMappingEntry {
|
|
11
|
+
archiRelationshipType: string;
|
|
12
|
+
sourceArchiType: string;
|
|
13
|
+
targetArchiType: string;
|
|
14
|
+
/** XMA semantic relationship type, e.g. "BusinessActorBusinessProcessAssignment". */
|
|
15
|
+
xmaType: string;
|
|
16
|
+
/** Scheme the relationship's `<ArchiMate:Relations>` collection lives in, e.g. "BusinessScheme". */
|
|
17
|
+
scheme: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const RELATIONSHIP_MAPPINGS: readonly RelationshipMappingEntry[];
|
|
20
|
+
export declare function lookupRelationshipMapping(relationshipType: string, sourceArchiType: string, targetArchiType: string): RelationshipMappingEntry | undefined;
|
|
21
|
+
//# sourceMappingURL=relationship-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationship-mapping.d.ts","sourceRoot":"","sources":["../../src/mapping/relationship-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,wBAAwB;IACvC,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,qFAAqF;IACrF,OAAO,EAAE,MAAM,CAAC;IAChB,oGAAoG;IACpG,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,wBAAwB,EAwBpE,CAAC;AAaF,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,GACtB,wBAAwB,GAAG,SAAS,CAEtC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Archi relationship mapping, resolved by (relationship type, source
|
|
3
|
+
* semantic type, target semantic type) — never by relationship type alone.
|
|
4
|
+
*
|
|
5
|
+
* Only THREE mappings are proven, all confirmed directly against
|
|
6
|
+
* `tests/fixtures/relationships/relaciones.{archimate,xma}`. Every other
|
|
7
|
+
* relationship type/source/target combination is unsupported for v0.1 and
|
|
8
|
+
* must be diagnosed, never guessed (see `serializer/relationship-writer.ts`).
|
|
9
|
+
*/
|
|
10
|
+
export const RELATIONSHIP_MAPPINGS = [
|
|
11
|
+
{
|
|
12
|
+
archiRelationshipType: 'AssignmentRelationship',
|
|
13
|
+
sourceArchiType: 'BusinessActor',
|
|
14
|
+
targetArchiType: 'BusinessProcess',
|
|
15
|
+
xmaType: 'BusinessActorBusinessProcessAssignment',
|
|
16
|
+
scheme: 'BusinessScheme',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
// Archi calls this a ServingRelationship; the XMA metamodel's own name for
|
|
20
|
+
// it is "...Use", not "...Serving" — do not rename it back.
|
|
21
|
+
archiRelationshipType: 'ServingRelationship',
|
|
22
|
+
sourceArchiType: 'ApplicationService',
|
|
23
|
+
targetArchiType: 'BusinessProcess',
|
|
24
|
+
xmaType: 'ApplicationServiceBusinessProcessUse',
|
|
25
|
+
scheme: 'ApplicationScheme',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
archiRelationshipType: 'FlowRelationship',
|
|
29
|
+
sourceArchiType: 'BusinessProcess',
|
|
30
|
+
targetArchiType: 'BusinessProcess',
|
|
31
|
+
xmaType: 'BusinessProcessBusinessProcessFlow',
|
|
32
|
+
scheme: 'BusinessScheme',
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
function relationshipKey(relationshipType, sourceType, targetType) {
|
|
36
|
+
return `${relationshipType}|${sourceType}|${targetType}`;
|
|
37
|
+
}
|
|
38
|
+
const BY_KEY = new Map(RELATIONSHIP_MAPPINGS.map((entry) => [
|
|
39
|
+
relationshipKey(entry.archiRelationshipType, entry.sourceArchiType, entry.targetArchiType),
|
|
40
|
+
entry,
|
|
41
|
+
]));
|
|
42
|
+
export function lookupRelationshipMapping(relationshipType, sourceArchiType, targetArchiType) {
|
|
43
|
+
return BY_KEY.get(relationshipKey(relationshipType, sourceArchiType, targetArchiType));
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=relationship-mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationship-mapping.js","sourceRoot":"","sources":["../../src/mapping/relationship-mapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,MAAM,CAAC,MAAM,qBAAqB,GAAwC;IACxE;QACE,qBAAqB,EAAE,wBAAwB;QAC/C,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,iBAAiB;QAClC,OAAO,EAAE,wCAAwC;QACjD,MAAM,EAAE,gBAAgB;KACzB;IACD;QACE,2EAA2E;QAC3E,4DAA4D;QAC5D,qBAAqB,EAAE,qBAAqB;QAC5C,eAAe,EAAE,oBAAoB;QACrC,eAAe,EAAE,iBAAiB;QAClC,OAAO,EAAE,sCAAsC;QAC/C,MAAM,EAAE,mBAAmB;KAC5B;IACD;QACE,qBAAqB,EAAE,kBAAkB;QACzC,eAAe,EAAE,iBAAiB;QAClC,eAAe,EAAE,iBAAiB;QAClC,OAAO,EAAE,oCAAoC;QAC7C,MAAM,EAAE,gBAAgB;KACzB;CACF,CAAC;AAEF,SAAS,eAAe,CAAC,gBAAwB,EAAE,UAAkB,EAAE,UAAkB;IACvF,OAAO,GAAG,gBAAgB,IAAI,UAAU,IAAI,UAAU,EAAE,CAAC;AAC3D,CAAC;AAED,MAAM,MAAM,GAAG,IAAI,GAAG,CACpB,qBAAqB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;IACnC,eAAe,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC;IAC1F,KAAK;CACN,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,yBAAyB,CACvC,gBAAwB,EACxB,eAAuB,EACvB,eAAuB;IAEvB,OAAO,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,gBAAgB,EAAE,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PresentationCategory } from './element-mapping.js';
|
|
2
|
+
/**
|
|
3
|
+
* Semantic scheme container metadata, keyed by presentation category.
|
|
4
|
+
*
|
|
5
|
+
* Confirmed against both reference fixtures: every root-level scheme's `nm`
|
|
6
|
+
* profile value is copied verbatim from the ArchiMate model's own top-level
|
|
7
|
+
* folder of the matching `type` (e.g. `BusinessScheme`'s `nm` is folder
|
|
8
|
+
* "Business"'s `name`) — this is content preservation, not invented
|
|
9
|
+
* translation. `Technology`/`Physical` are the one exception: both nest
|
|
10
|
+
* under a single "Technology & Physical" `AbstractFolder` (see
|
|
11
|
+
* {@link TECHNOLOGY_PHYSICAL_FOLDER}) which itself carries that folder's
|
|
12
|
+
* name, so the two schemes it wraps carry no `nm` of their own — confirmed
|
|
13
|
+
* absent in the catalogue fixture.
|
|
14
|
+
*/
|
|
15
|
+
export interface SchemeInfo {
|
|
16
|
+
tag: string;
|
|
17
|
+
/** `ArchiFolder.type` this scheme's own `nm` is sourced from, or `null` when nested (see {@link TECHNOLOGY_PHYSICAL_FOLDER}). */
|
|
18
|
+
folderType: string | null;
|
|
19
|
+
/** Fallback label when the source model has no folder of `folderType` (Archi's own default folder name). */
|
|
20
|
+
defaultLabel: string | null;
|
|
21
|
+
}
|
|
22
|
+
export declare const SCHEME_BY_CATEGORY: Readonly<Record<PresentationCategory, SchemeInfo>>;
|
|
23
|
+
/**
|
|
24
|
+
* The `AbstractFolder` wrapping `TechnologyScheme`/`PhysicalScheme` — the one
|
|
25
|
+
* confirmed case of a scheme container nested under a folder rather than
|
|
26
|
+
* sitting directly in the root `AbstractSchemes` collection (see the doc
|
|
27
|
+
* block on {@link SchemeInfo}).
|
|
28
|
+
*/
|
|
29
|
+
export declare const TECHNOLOGY_PHYSICAL_FOLDER: {
|
|
30
|
+
readonly archiFolderType: "technology";
|
|
31
|
+
readonly defaultLabel: "Technology & Physical";
|
|
32
|
+
};
|
|
33
|
+
/** The `AbstractFolder` wrapping the view's `AllView` — confirmed present in both reference fixtures. */
|
|
34
|
+
export declare const VIEWS_FOLDER: {
|
|
35
|
+
readonly archiFolderType: "diagrams";
|
|
36
|
+
readonly defaultLabel: "Views";
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=scheme-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme-mapping.d.ts","sourceRoot":"","sources":["../../src/mapping/scheme-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,iIAAiI;IACjI,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,4GAA4G;IAC5G,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAeD,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAUjF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;CAG7B,CAAC;AAEX,yGAAyG;AACzG,eAAO,MAAM,YAAY;;;CAGf,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const STRATEGY = { tag: 'StrategyScheme', folderType: 'strategy', defaultLabel: 'Strategy' };
|
|
2
|
+
const BUSINESS = { tag: 'BusinessScheme', folderType: 'business', defaultLabel: 'Business' };
|
|
3
|
+
const APPLICATION = { tag: 'ApplicationScheme', folderType: 'application', defaultLabel: 'Application' };
|
|
4
|
+
const TECHNOLOGY = { tag: 'TechnologyScheme', folderType: null, defaultLabel: null };
|
|
5
|
+
const PHYSICAL = { tag: 'PhysicalScheme', folderType: null, defaultLabel: null };
|
|
6
|
+
const MOTIVATION = { tag: 'MotivationScheme', folderType: 'motivation', defaultLabel: 'Motivation' };
|
|
7
|
+
const IMPLEMENTATION_MIGRATION = {
|
|
8
|
+
tag: 'IMScheme',
|
|
9
|
+
folderType: 'implementation_migration',
|
|
10
|
+
defaultLabel: 'Implementation & Migration',
|
|
11
|
+
};
|
|
12
|
+
const COMPOSITE = { tag: 'CompositeScheme', folderType: 'other', defaultLabel: 'Other' };
|
|
13
|
+
export const SCHEME_BY_CATEGORY = {
|
|
14
|
+
Strategy: STRATEGY,
|
|
15
|
+
Business: BUSINESS,
|
|
16
|
+
Application: APPLICATION,
|
|
17
|
+
Technology: TECHNOLOGY,
|
|
18
|
+
Physical: PHYSICAL,
|
|
19
|
+
Motivation: MOTIVATION,
|
|
20
|
+
ImplementationMigration: IMPLEMENTATION_MIGRATION,
|
|
21
|
+
Location: COMPOSITE,
|
|
22
|
+
Grouping: COMPOSITE,
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The `AbstractFolder` wrapping `TechnologyScheme`/`PhysicalScheme` — the one
|
|
26
|
+
* confirmed case of a scheme container nested under a folder rather than
|
|
27
|
+
* sitting directly in the root `AbstractSchemes` collection (see the doc
|
|
28
|
+
* block on {@link SchemeInfo}).
|
|
29
|
+
*/
|
|
30
|
+
export const TECHNOLOGY_PHYSICAL_FOLDER = {
|
|
31
|
+
archiFolderType: 'technology',
|
|
32
|
+
defaultLabel: 'Technology & Physical',
|
|
33
|
+
};
|
|
34
|
+
/** The `AbstractFolder` wrapping the view's `AllView` — confirmed present in both reference fixtures. */
|
|
35
|
+
export const VIEWS_FOLDER = {
|
|
36
|
+
archiFolderType: 'diagrams',
|
|
37
|
+
defaultLabel: 'Views',
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=scheme-mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheme-mapping.js","sourceRoot":"","sources":["../../src/mapping/scheme-mapping.ts"],"names":[],"mappings":"AAuBA,MAAM,QAAQ,GAAe,EAAE,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AACzG,MAAM,QAAQ,GAAe,EAAE,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC;AACzG,MAAM,WAAW,GAAe,EAAE,GAAG,EAAE,mBAAmB,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AACrH,MAAM,UAAU,GAAe,EAAE,GAAG,EAAE,kBAAkB,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AACjG,MAAM,QAAQ,GAAe,EAAE,GAAG,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAC7F,MAAM,UAAU,GAAe,EAAE,GAAG,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;AACjH,MAAM,wBAAwB,GAAe;IAC3C,GAAG,EAAE,UAAU;IACf,UAAU,EAAE,0BAA0B;IACtC,YAAY,EAAE,4BAA4B;CAC3C,CAAC;AACF,MAAM,SAAS,GAAe,EAAE,GAAG,EAAE,iBAAiB,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;AAErG,MAAM,CAAC,MAAM,kBAAkB,GAAuD;IACpF,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,UAAU;IACtB,uBAAuB,EAAE,wBAAwB;IACjD,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,eAAe,EAAE,YAAY;IAC7B,YAAY,EAAE,uBAAuB;CAC7B,CAAC;AAEX,yGAAyG;AACzG,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,eAAe,EAAE,UAAU;IAC3B,YAAY,EAAE,OAAO;CACb,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PresentationCategory } from './element-mapping.js';
|
|
2
|
+
/** RGB triple, each channel 0-255. */
|
|
3
|
+
export interface Rgb {
|
|
4
|
+
r: number;
|
|
5
|
+
g: number;
|
|
6
|
+
b: number;
|
|
7
|
+
}
|
|
8
|
+
/** Default fill color per presentation category — confirmed against both reference fixtures. */
|
|
9
|
+
export declare const CATEGORY_FILL_COLOR: Readonly<Record<PresentationCategory, Rgb>>;
|
|
10
|
+
/** Default fill for a visual Note (`ArchiMate:ViewGraphic`, no `mm_symbolName`). */
|
|
11
|
+
export declare const NOTE_FILL_COLOR: Rgb;
|
|
12
|
+
/** Default fill for a visual Group (`ArchiMate:ViewGraphic` with `mm_symbolName="group"`). */
|
|
13
|
+
export declare const GROUP_FILL_COLOR: Rgb;
|
|
14
|
+
/** Default node/connection line color — constant across every semantic node in both fixtures. */
|
|
15
|
+
export declare const DEFAULT_LINE_COLOR: Rgb;
|
|
16
|
+
export declare const DEFAULT_FONT_NAME = "Segoe UI";
|
|
17
|
+
/** `mm_fontSize` unit — confirmed 180 for Archi's default 9pt font (20 units/pt); never overridden without evidence. */
|
|
18
|
+
export declare const DEFAULT_FONT_SIZE = 180;
|
|
19
|
+
export declare const DEFAULT_OPACITY = 255;
|
|
20
|
+
/** `2147483647` (int32 max) — the sentinel width/height Bizzdesign uses for an auto-sized canvas rect. */
|
|
21
|
+
export declare const CANVAS_EXTENT = 2147483647;
|
|
22
|
+
/** Parses an Archi `fillColor`/`lineColor` hex string (e.g. "#ff0000") into RGB, or `null` if not a recognized hex triple. */
|
|
23
|
+
export declare function parseArchiHexColor(value: string): Rgb | null;
|
|
24
|
+
//# sourceMappingURL=visual-mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-mapping.d.ts","sourceRoot":"","sources":["../../src/mapping/visual-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,sCAAsC;AACtC,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,gGAAgG;AAChG,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAU3E,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,eAAe,EAAE,GAAgC,CAAC;AAE/D,8FAA8F;AAC9F,eAAO,MAAM,gBAAgB,EAAE,GAAgC,CAAC;AAEhE,iGAAiG;AACjG,eAAO,MAAM,kBAAkB,EAAE,GAA6B,CAAC;AAE/D,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAC5C,wHAAwH;AACxH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,0GAA0G;AAC1G,eAAO,MAAM,aAAa,aAAa,CAAC;AAIxC,8HAA8H;AAC9H,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAW5D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/** Default fill color per presentation category — confirmed against both reference fixtures. */
|
|
2
|
+
export const CATEGORY_FILL_COLOR = {
|
|
3
|
+
Strategy: { r: 245, g: 222, b: 170 },
|
|
4
|
+
Business: { r: 255, g: 255, b: 181 },
|
|
5
|
+
Application: { r: 181, g: 255, b: 255 },
|
|
6
|
+
Technology: { r: 201, g: 231, b: 183 },
|
|
7
|
+
Physical: { r: 201, g: 231, b: 183 },
|
|
8
|
+
Motivation: { r: 204, g: 204, b: 255 },
|
|
9
|
+
ImplementationMigration: { r: 255, g: 224, b: 224 },
|
|
10
|
+
Location: { r: 237, g: 207, b: 226 },
|
|
11
|
+
Grouping: { r: 255, g: 255, b: 255 },
|
|
12
|
+
};
|
|
13
|
+
/** Default fill for a visual Note (`ArchiMate:ViewGraphic`, no `mm_symbolName`). */
|
|
14
|
+
export const NOTE_FILL_COLOR = { r: 255, g: 255, b: 255 };
|
|
15
|
+
/** Default fill for a visual Group (`ArchiMate:ViewGraphic` with `mm_symbolName="group"`). */
|
|
16
|
+
export const GROUP_FILL_COLOR = { r: 210, g: 215, b: 215 };
|
|
17
|
+
/** Default node/connection line color — constant across every semantic node in both fixtures. */
|
|
18
|
+
export const DEFAULT_LINE_COLOR = { r: 92, g: 92, b: 92 };
|
|
19
|
+
export const DEFAULT_FONT_NAME = 'Segoe UI';
|
|
20
|
+
/** `mm_fontSize` unit — confirmed 180 for Archi's default 9pt font (20 units/pt); never overridden without evidence. */
|
|
21
|
+
export const DEFAULT_FONT_SIZE = 180;
|
|
22
|
+
export const DEFAULT_OPACITY = 255;
|
|
23
|
+
/** `2147483647` (int32 max) — the sentinel width/height Bizzdesign uses for an auto-sized canvas rect. */
|
|
24
|
+
export const CANVAS_EXTENT = 2147483647;
|
|
25
|
+
const HEX_COLOR_PATTERN = /^#([0-9a-fA-F]{6})$/;
|
|
26
|
+
/** Parses an Archi `fillColor`/`lineColor` hex string (e.g. "#ff0000") into RGB, or `null` if not a recognized hex triple. */
|
|
27
|
+
export function parseArchiHexColor(value) {
|
|
28
|
+
const match = HEX_COLOR_PATTERN.exec(value.trim());
|
|
29
|
+
if (!match) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const hex = match[1];
|
|
33
|
+
return {
|
|
34
|
+
r: parseInt(hex.slice(0, 2), 16),
|
|
35
|
+
g: parseInt(hex.slice(2, 4), 16),
|
|
36
|
+
b: parseInt(hex.slice(4, 6), 16),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=visual-mapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-mapping.js","sourceRoot":"","sources":["../../src/mapping/visual-mapping.ts"],"names":[],"mappings":"AASA,gGAAgG;AAChG,MAAM,CAAC,MAAM,mBAAmB,GAAgD;IAC9E,QAAQ,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IACpC,QAAQ,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IACpC,WAAW,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IACvC,UAAU,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IACtC,QAAQ,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IACpC,UAAU,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IACtC,uBAAuB,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;IACnD,QAAQ,EAAE,EAAE,CAAC,EAA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C;QAChC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;QAChC,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;KACjC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ArchiFolder, ArchiView } from '@cda/archi-semantic-core';
|
|
2
|
+
import type { XmlElement } from '../infrastructure/xml-writer.js';
|
|
3
|
+
import type { XmaIdRegistry } from '../infrastructure/id-allocator.js';
|
|
4
|
+
import { type SchemeBuild } from './semantic-writer.js';
|
|
5
|
+
import type { ViewBuildResult } from './view-writer.js';
|
|
6
|
+
export interface DocumentAssemblyInput {
|
|
7
|
+
modelName: string;
|
|
8
|
+
packageName: string;
|
|
9
|
+
language: string;
|
|
10
|
+
ids: XmaIdRegistry;
|
|
11
|
+
schemeBuilds: Map<string, SchemeBuild>;
|
|
12
|
+
folders: readonly ArchiFolder[];
|
|
13
|
+
view: ArchiView | null;
|
|
14
|
+
viewResult: ViewBuildResult | null;
|
|
15
|
+
/** The `MM_Diagram:MM_Diagram` built by `graphical-writer`, when a view is present. */
|
|
16
|
+
graphicalDiagramXml: XmlElement | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function buildXmaDocument(input: DocumentAssemblyInput): XmlElement;
|
|
19
|
+
//# sourceMappingURL=document-writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-writer.d.ts","sourceRoot":"","sources":["../../src/serializer/document-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIvE,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAoExD,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACvC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IAChC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,uFAAuF;IACvF,mBAAmB,EAAE,UAAU,GAAG,IAAI,CAAC;CACxC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,UAAU,CA6GzE"}
|