archimaid 0.0.0-stage → 0.1.1

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 (154) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/FOUNDATION.md +108 -0
  3. package/LICENSE +21 -0
  4. package/README.md +271 -2
  5. package/dist/archimate/catalogue.d.ts +106 -0
  6. package/dist/archimate/catalogue.js +219 -0
  7. package/dist/archimate/catalogue.js.map +1 -0
  8. package/dist/archimate/diagnostics.d.ts +48 -0
  9. package/dist/archimate/diagnostics.js +64 -0
  10. package/dist/archimate/diagnostics.js.map +1 -0
  11. package/dist/archimate/frontmatter.d.ts +13 -0
  12. package/dist/archimate/frontmatter.js +62 -0
  13. package/dist/archimate/frontmatter.js.map +1 -0
  14. package/dist/archimate/grammar.d.ts +60 -0
  15. package/dist/archimate/grammar.js +273 -0
  16. package/dist/archimate/grammar.js.map +1 -0
  17. package/dist/archimate/lexer.d.ts +91 -0
  18. package/dist/archimate/lexer.js +215 -0
  19. package/dist/archimate/lexer.js.map +1 -0
  20. package/dist/archimate/model.d.ts +46 -0
  21. package/dist/archimate/model.js +2 -0
  22. package/dist/archimate/model.js.map +1 -0
  23. package/dist/archimate/nesting.d.ts +14 -0
  24. package/dist/archimate/nesting.js +84 -0
  25. package/dist/archimate/nesting.js.map +1 -0
  26. package/dist/archimate/parser.d.ts +14 -0
  27. package/dist/archimate/parser.js +53 -0
  28. package/dist/archimate/parser.js.map +1 -0
  29. package/dist/archimate/suggestions.d.ts +1 -0
  30. package/dist/archimate/suggestions.js +44 -0
  31. package/dist/archimate/suggestions.js.map +1 -0
  32. package/dist/archimate/validate.d.ts +4 -0
  33. package/dist/archimate/validate.js +402 -0
  34. package/dist/archimate/validate.js.map +1 -0
  35. package/dist/bundle/archimaid.esm.min.mjs +1 -0
  36. package/dist/bundle/chunks/archimateDiagram-WUCF6KHR.mjs +132 -0
  37. package/dist/bundle/chunks/chunk-QBMRZFD3.mjs +1 -0
  38. package/dist/bundle/chunks/elk.bundled-2VSLVJGB.mjs +26 -0
  39. package/dist/cli/render.d.ts +10 -0
  40. package/dist/cli/render.js +102 -0
  41. package/dist/cli/render.js.map +1 -0
  42. package/dist/cli/report.d.ts +20 -0
  43. package/dist/cli/report.js +39 -0
  44. package/dist/cli/report.js.map +1 -0
  45. package/dist/cli/sources.d.ts +19 -0
  46. package/dist/cli/sources.js +86 -0
  47. package/dist/cli/sources.js.map +1 -0
  48. package/dist/cli.d.ts +2 -0
  49. package/dist/cli.js +137 -0
  50. package/dist/cli.js.map +1 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.js +2 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/language.d.ts +5 -0
  55. package/dist/language.js +3 -0
  56. package/dist/language.js.map +1 -0
  57. package/dist/mermaid/archimateDetector.d.ts +12 -0
  58. package/dist/mermaid/archimateDetector.js +29 -0
  59. package/dist/mermaid/archimateDetector.js.map +1 -0
  60. package/dist/mermaid/archimateDiagram.d.ts +9 -0
  61. package/dist/mermaid/archimateDiagram.js +75 -0
  62. package/dist/mermaid/archimateDiagram.js.map +1 -0
  63. package/dist/mermaid/archimateRenderer.d.ts +6 -0
  64. package/dist/mermaid/archimateRenderer.js +40 -0
  65. package/dist/mermaid/archimateRenderer.js.map +1 -0
  66. package/dist/mermaid/architectureLayout.d.ts +50 -0
  67. package/dist/mermaid/architectureLayout.js +144 -0
  68. package/dist/mermaid/architectureLayout.js.map +1 -0
  69. package/dist/mermaid/geometry.d.ts +3 -0
  70. package/dist/mermaid/geometry.js +20 -0
  71. package/dist/mermaid/geometry.js.map +1 -0
  72. package/dist/mermaid/hierarchy.d.ts +1 -0
  73. package/dist/mermaid/hierarchy.js +8 -0
  74. package/dist/mermaid/hierarchy.js.map +1 -0
  75. package/dist/mermaid/invariant.d.ts +1 -0
  76. package/dist/mermaid/invariant.js +7 -0
  77. package/dist/mermaid/invariant.js.map +1 -0
  78. package/dist/mermaid/orthogonalRouter.d.ts +4 -0
  79. package/dist/mermaid/orthogonalRouter.js +249 -0
  80. package/dist/mermaid/orthogonalRouter.js.map +1 -0
  81. package/dist/mermaid/relationshipPlacement.d.ts +3 -0
  82. package/dist/mermaid/relationshipPlacement.js +350 -0
  83. package/dist/mermaid/relationshipPlacement.js.map +1 -0
  84. package/dist/mermaid/render/draw.d.ts +17 -0
  85. package/dist/mermaid/render/draw.js +275 -0
  86. package/dist/mermaid/render/draw.js.map +1 -0
  87. package/dist/mermaid/render/elkRoutes.d.ts +6 -0
  88. package/dist/mermaid/render/elkRoutes.js +216 -0
  89. package/dist/mermaid/render/elkRoutes.js.map +1 -0
  90. package/dist/mermaid/render/graph.d.ts +17 -0
  91. package/dist/mermaid/render/graph.js +200 -0
  92. package/dist/mermaid/render/graph.js.map +1 -0
  93. package/dist/mermaid/render/labels.d.ts +12 -0
  94. package/dist/mermaid/render/labels.js +148 -0
  95. package/dist/mermaid/render/labels.js.map +1 -0
  96. package/dist/mermaid/render/layout.d.ts +12 -0
  97. package/dist/mermaid/render/layout.js +60 -0
  98. package/dist/mermaid/render/layout.js.map +1 -0
  99. package/dist/mermaid/render/measure.d.ts +16 -0
  100. package/dist/mermaid/render/measure.js +96 -0
  101. package/dist/mermaid/render/measure.js.map +1 -0
  102. package/dist/mermaid/render/place.d.ts +20 -0
  103. package/dist/mermaid/render/place.js +63 -0
  104. package/dist/mermaid/render/place.js.map +1 -0
  105. package/dist/mermaid/render/route.d.ts +29 -0
  106. package/dist/mermaid/render/route.js +113 -0
  107. package/dist/mermaid/render/route.js.map +1 -0
  108. package/dist/mermaid/render/shared.d.ts +83 -0
  109. package/dist/mermaid/render/shared.js +52 -0
  110. package/dist/mermaid/render/shared.js.map +1 -0
  111. package/dist/mermaid/render/svg.d.ts +6 -0
  112. package/dist/mermaid/render/svg.js +33 -0
  113. package/dist/mermaid/render/svg.js.map +1 -0
  114. package/dist/mermaid/render/viewport.d.ts +14 -0
  115. package/dist/mermaid/render/viewport.js +58 -0
  116. package/dist/mermaid/render/viewport.js.map +1 -0
  117. package/dist/mermaid/routing/anchors.d.ts +14 -0
  118. package/dist/mermaid/routing/anchors.js +134 -0
  119. package/dist/mermaid/routing/anchors.js.map +1 -0
  120. package/dist/mermaid/routing/bundles.d.ts +14 -0
  121. package/dist/mermaid/routing/bundles.js +94 -0
  122. package/dist/mermaid/routing/bundles.js.map +1 -0
  123. package/dist/mermaid/routing/congestion.d.ts +8 -0
  124. package/dist/mermaid/routing/congestion.js +70 -0
  125. package/dist/mermaid/routing/congestion.js.map +1 -0
  126. package/dist/mermaid/routing/constants.d.ts +13 -0
  127. package/dist/mermaid/routing/constants.js +17 -0
  128. package/dist/mermaid/routing/constants.js.map +1 -0
  129. package/dist/mermaid/routing/primitives.d.ts +33 -0
  130. package/dist/mermaid/routing/primitives.js +110 -0
  131. package/dist/mermaid/routing/primitives.js.map +1 -0
  132. package/dist/mermaid/routing/search.d.ts +4 -0
  133. package/dist/mermaid/routing/search.js +171 -0
  134. package/dist/mermaid/routing/search.js.map +1 -0
  135. package/dist/mermaid/routing/shapes.d.ts +8 -0
  136. package/dist/mermaid/routing/shapes.js +82 -0
  137. package/dist/mermaid/routing/shapes.js.map +1 -0
  138. package/dist/mermaid/routing/types.d.ts +37 -0
  139. package/dist/mermaid/routing/types.js +14 -0
  140. package/dist/mermaid/routing/types.js.map +1 -0
  141. package/dist/mermaid/styles.d.ts +89 -0
  142. package/dist/mermaid/styles.js +166 -0
  143. package/dist/mermaid/styles.js.map +1 -0
  144. package/docs/reference.md +86 -0
  145. package/examples/cross-layer-relationships.mmd +79 -0
  146. package/examples/cross-layer-relationships.svg +33 -0
  147. package/examples/element-preview.svg +1 -0
  148. package/examples/nested-components.mmd +21 -0
  149. package/examples/nested-components.svg +4 -0
  150. package/examples/order-fulfilment.mmd +10 -0
  151. package/examples/order-management.mmd +15 -0
  152. package/examples/order-management.svg +2 -0
  153. package/package.json +91 -4
  154. package/skills/archimaid/SKILL.md +123 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,39 @@
1
+ # Changelog
2
+
3
+ All notable changes to this package are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the package uses [semantic versioning](https://semver.org/). While the version is 0.x and the header is `archimate-beta`, minor releases may change the syntax.
4
+
5
+ ## 0.1.1
6
+
7
+ ### Project
8
+
9
+ - The repository moved to the [Archimaid organisation](https://github.com/Archimaid/archimaid), and the npm homepage now links to [archimaid.org](https://archimaid.org).
10
+ - Releases are published from GitHub Actions through npm trusted publishing, with a provenance statement.
11
+
12
+ ## 0.1.0
13
+
14
+ First release.
15
+
16
+ ### Language
17
+
18
+ - The `archimate-beta` diagram type with all 60 ArchiMate 3.2 element types and 11 relationship types.
19
+ - Long-form relationships with IDs, a shorthand connector syntax, and standalone or attached notes.
20
+ - Nesting through element blocks or `nest`, backed by a relationship when one supports it and visual otherwise.
21
+ - `click` links elements to a URL with an optional tooltip and target. Hovering an element shows its description.
22
+ - `title`, `accTitle`, `accDescr` and `accDescr { … }` metadata, and a leading YAML frontmatter block.
23
+ - `parseArchiMate` and `validateArchiMate` in `archimaid/language`, which report every error and warning with source ranges and suggest the closest valid keyword for a misspelt type.
24
+
25
+ ### Rendering
26
+
27
+ - Architecture, framework and graph layouts. Relationships of the same type at one element share an anchor and a trunk, wide rows wrap, and long names and labels wrap.
28
+ - Mermaid theme support, including `themeVariables` with `theme: 'base'`, and a `background` option for a transparent canvas.
29
+ - Accessible names for elements, notes and relationships.
30
+ - A prebuilt ES module bundle for pages without a bundler, exported as `archimaid/bundle`. ELK loads on demand for `layout graph` only.
31
+
32
+ ### Command line
33
+
34
+ - `archimaid validate` for files, directories, standard input and Markdown code blocks, with text, JSON and GitHub Actions output.
35
+ - `archimaid render` to SVG through Playwright, with `--theme` and `--background`.
36
+
37
+ ### Documentation
38
+
39
+ - A [type reference](docs/reference.md) generated from the catalogue, and an agent skill with the element table.
package/FOUNDATION.md ADDED
@@ -0,0 +1,108 @@
1
+ # ArchiMate 3.2 for Mermaid
2
+
3
+ This design defines a Mermaid diagram type for authoring ArchiMate 3.2 in plain text. People and AI models can write the same syntax, validate it before publishing, and review changes in Git. Each source block defines one diagram and can also live in its own file. Shared models, model exchange and viewpoint tooling can follow once that workflow is established.
4
+
5
+ This document records the design and the route toward Mermaid upstream integration. The [README](README.md) describes what version 0.1.0 implements and how to use it.
6
+
7
+ ## Sources
8
+
9
+ | Decision | Reference |
10
+ | --- | --- |
11
+ | Element taxonomy and relationship semantics | The [ArchiMate® 3.2 Specification (C226)](https://publications.opengroup.org/standards/archimate/c226), Chapters 3–12 |
12
+ | Default and alternative figures, line patterns and endpoint markers | Appendix A of the 3.2 specification and the relevant concept definitions, with the [ArchiMate® 3.2 Reference Cards (N221)](https://www.opengroup.org/sites/default/files/docs/downloads/n221p.pdf) as the visual checklist |
13
+ | Catalogue reference fills | The [ArchiMate Standard 3.2 palette](https://www.archimatetool.com/downloads/colour-schemes/ArchiMate%20Standard%20-%203.2.prefs), keyed by element type |
14
+
15
+ Cite the source section for each catalogue entry. Write short original descriptions and examples for authors. The renderer defines its own layer fills, outlines and text colours. Section 3.9 of the 3.2 specification leaves colour to the modeller, so the validator uses concept types and properties.
16
+
17
+ ## Mermaid integration
18
+
19
+ Use the [Use Case diagram](https://github.com/mermaid-js/mermaid/tree/develop/packages/mermaid/src/diagrams/usecase) as the structural reference and the [new diagram guide](https://mermaid.js.org/community/new-diagram.html) as the contribution checklist. Target Mermaid 12.3.0 for the first integration prototype. An external package can register a diagram using the same public entry point documented for ZenUML. [Mermaid 12.3.0 release](https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.3.0) · [External diagram registration](https://mermaid.js.org/config/setup/mermaid/interfaces/Mermaid.html#registerexternaldiagrams) · [ZenUML](https://mermaid.js.org/syntax/zenuml.html)
20
+
21
+ | Mermaid component | ArchiMate responsibility |
22
+ | --- | --- |
23
+ | Detector and lazy loader | Recognise the complete diagram header and load the diagram on demand. Register through `mermaid.registerExternalDiagrams()`. |
24
+ | Parser | Use a Chevrotain lexer, grammar and visitor. Return declarations and their source locations so diagnostics point to the offending statement. |
25
+ | Diagram database (`db`) | Hold the current model and diagram metadata. Reset state between parses, including after failures. The parser and renderer must agree on the state instance Mermaid supplies. |
26
+ | Renderer | Project the validated model into nodes, edges and labels. Lay out the graph, draw ArchiMate SVG notation, and apply padding, responsive sizing and accessible names. |
27
+ | Styles | Resolve colours through named palette entries and use Mermaid theme settings for compatible presentation choices such as font and canvas. Test legibility with the default palette in light and dark hosts. |
28
+
29
+ The Mermaid adapter owns registration, the parser/DB contract and SVG host integration. The catalogue, grammar and validation can also run without a browser. This keeps the authoring workflow portable while Mermaid explores its v13 renderer. [Mermaid v13 alpha](https://mermaid.js.org/intro/v13-alpha.html)
30
+
31
+ The Use Case renderer projects its model into layout data and calls Mermaid's shared rendering utilities from inside the repository. Prototype that same division of responsibilities through the public registration API. Test an ELK layout with ArchiMate markers and compound groups, and verify which published interfaces can support it. If the required utilities are internal, call the layout engine through the plugin's renderer. [Use Case renderer](https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/diagrams/usecase/usecaseRenderer.ts) · [Mermaid layout documentation](https://mermaid.js.org/intro/syntax-reference.html#layout-and-look)
32
+
33
+ ## Repository layout
34
+
35
+ ```text
36
+ src/
37
+ language.ts # Public parse and validate API, usable without a browser
38
+ cli.ts # archimate validate
39
+ archimate/
40
+ catalogue.ts # 3.2 element and relationship types and notation
41
+ model.ts # Elements, relationships, notes and diagram options
42
+ lexer.ts # Tokens, including shorthand connectors
43
+ grammar.ts # Chevrotain grammar
44
+ frontmatter.ts # Leading YAML block and byte order mark
45
+ parser.ts # parseArchiMate, the throwing entry point
46
+ validate.ts # Model construction, semantic checks and validateArchiMate
47
+ nesting.ts # Nesting rules
48
+ diagnostics.ts # Diagnostic codes, severities and ranges
49
+ suggestions.ts # "Did you mean" hints
50
+ mermaid/
51
+ archimateDetector.ts
52
+ archimateDiagram.ts # Parser, DB, renderer and styles registration
53
+ archimateRenderer.ts # Pipeline over the render phases
54
+ render/ # measure, graph, layout, place, route, labels, viewport, draw
55
+ architectureLayout.ts
56
+ relationshipPlacement.ts
57
+ orthogonalRouter.ts # Orthogonal routing for architecture and framework layout
58
+ routing/ # Anchors, bundle planning, congestion and path search
59
+ styles.ts
60
+ examples/ # Authoring examples and visual fixtures
61
+ test/ # Language, CLI, layout and browser tests
62
+ ```
63
+
64
+ The diagram database is defined inline in `archimateDiagram.ts`; there is no separate `archimateDb.ts`.
65
+
66
+ Start with one TypeScript package. Keep module boundaries clear enough that the diagram can later fit under Mermaid's own `diagrams/archimate/` directory. Choose a separate CLI package only if its dependencies or distribution needs warrant it.
67
+
68
+ ## Model and authoring
69
+
70
+ An element has a stable ID, a 3.2 type, a displayed name and an optional description. A relationship has its own ID, source, target, type and type-specific properties such as Access mode or Influence strength. A junction has its own identity and AND/OR kind. Store layout direction, the choice of permitted figure, and graphical nesting as presentation data. A nested rendering of a semantic relationship must have an explicit, validated meaning.
71
+
72
+ Keep model endpoints separate from SVG marker placement. For example, Access mode can change which end shows an arrow. The model still identifies the accessing concept and the accessed concept explicitly.
73
+
74
+ The following is a syntax proposal. The type names are recognisable, the IDs are stable across renames, and the relationship direction is visible in a Git diff. Section 8.2.2 of the 3.2 specification permits assigning a Business Role to a Business Process.
75
+
76
+ ```text
77
+ archimate-beta
78
+ direction LR
79
+ accTitle: Order fulfilment responsibilities
80
+
81
+ element businessRole clerk "Fulfilment clerk"
82
+ element businessProcess fulfil "Fulfil order"
83
+ description fulfil "Pick, pack and dispatch a paid order."
84
+
85
+ relationship assignment clerk_to_fulfil clerk -> fulfil
86
+ ```
87
+
88
+ The parser should accept forward references and resolve them after parsing. Use one documented spelling per construct, quoted plain text, and one statement per line. Show the element name by default and retain the description for accessible details. Publish a compact syntax and type reference from the same catalogue used for validation, with examples AI models can use and CI can check.
89
+
90
+ ## Validation and rendering
91
+
92
+ 1. Parse the document and report syntax errors with line and column. Resolve IDs and report duplicates and unknown element or relationship types.
93
+ 2. Check that relationship endpoints refer to declared elements or notes. For nesting, check the referenced relationship's type and direction, enforce one parent per child, and reject cycles.
94
+ 3. Validate relationship options such as Access mode and directed Association. Report unsupported features explicitly during incremental development.
95
+ 4. Lay out the validated model. The renderer selects the ArchiMate shape, icon, line pattern and markers from the concept's notation. Snapshot representative diagrams to check that markers land at the correct end, routes and labels remain readable, and the chosen palette is preserved.
96
+
97
+ Authors use Appendix B of the 3.2 specification to verify which element types a relationship can connect. Automatic checks against Appendix B are under development, and their release depends on permission from The Open Group to distribute the relationship lookup.
98
+
99
+ CI should validate the text and render SVG with pinned versions and fonts. The same examples should exercise standalone validation and a real Mermaid host. Repositories can publish the SVG anywhere that accepts image assets, and hosts that load the plugin can render the source directly.
100
+
101
+ ## First integration milestone
102
+
103
+ 1. Prepare the 3.2 catalogue structure and trace a small verified set of entries to the 3.2 specification, the reference cards and the Archi palette. Include a business role and process, an application element, a composite or connector, and relationships with distinct endpoint markers.
104
+ 2. Prove that the proposed syntax works through the external diagram API on the pinned Mermaid release. Render two diagrams on one page, render again after invalid input, and test accessible metadata and source positions with Mermaid front matter and comments.
105
+ 3. Verify layout and notation on a cross-layer view and a nested view. Check Access marker placement and rejection of a relationship with the wrong direction for its nesting declaration.
106
+ 4. Expand the catalogue and validation coverage and document the supported subset for a public beta. Add the CLI publishing path, executable documentation examples and realistic visual fixtures.
107
+
108
+ For possible upstream inclusion, bring the working package and examples to the [existing ArchiMate discussion](https://github.com/orgs/mermaid-js/discussions/4007). Agree on syntax, scope, theme defaults and the renderer integration before preparing a contribution. Mermaid's in-tree checklist covers registration, schema changes for configuration, documentation, examples, demos, tests and a changeset. The palette and layout approach are the two integration decisions to settle early. [Mermaid contribution guide](https://mermaid.js.org/community/new-diagram.html)
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Archimaid contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,272 @@
1
- # Temporary Holding Version
1
+ # Archimaid
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **ArchiMate® for Mermaid.** Enterprise architecture diagrams as code.
4
+
5
+ [![Version 0.1.0](https://img.shields.io/badge/version-0.1.0-blue)](package.json)
6
+ [![MIT license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
7
+ [![Node.js 22.12 or later](https://img.shields.io/badge/Node.js-%E2%89%A522.12-339933)](https://nodejs.org/)
8
+ [![Mermaid 12.3 or later](https://img.shields.io/badge/Mermaid-%E2%89%A512.3-ff3670)](https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4012.3.0)
9
+ [![ArchiMate 3.2](https://img.shields.io/badge/ArchiMate-3.2-6d44ae)](https://publications.opengroup.org/standards/archimate/c226)
10
+
11
+ Archimaid lets you write ArchiMate® 3.2 diagrams in plain text, validate their structure in CI, and render them as SVG. This independent Mermaid plugin includes 60 element types, 11 relationship types, nesting, notes, and element links. The `archimate-beta` syntax is experimental.
12
+
13
+ **Automatic relationship checks against ArchiMate 3.2 Appendix B are under development.** Their release depends on permission from The Open Group to distribute the relationship lookup.
14
+
15
+ ![Application components and services supporting an order fulfilment process](examples/order-management.svg)
16
+
17
+ [Quick start](#quick-start) · [Examples](#examples) · [Host integration](#host-integration) · [Language API](#language-api) · [Coverage](#coverage) · [Development](#development) · [Sources](#sources)
18
+
19
+ ## Quick start
20
+
21
+ Use Node.js 22.12 or later and Mermaid 12.3 or a later 12.x release.
22
+
23
+ ```sh
24
+ npm install archimaid mermaid
25
+ npx archimaid validate docs/
26
+ ```
27
+
28
+ `archimaid validate` accepts files, directories and `-` for standard input. It checks `.mmd` files and the `archimate-beta` diagrams in fenced `mermaid` code blocks of Markdown files, and reports Markdown line numbers. In a directory it skips Mermaid files of other diagram types. It prints every problem as `file:line:column: message`, suggests the closest valid keyword for a misspelt type, and prefixes warnings, such as a repeated shorthand relationship, with `warning:`. It exits with status 1 if there is any error, and with status 0 if there are only warnings. Use `--format json` for machine-readable output, or `--format github` for annotations in a GitHub Actions log.
29
+
30
+ To render a standalone SVG, install Playwright and its Chromium browser.
31
+
32
+ ```sh
33
+ npm install --save-dev playwright
34
+ npx playwright install chromium
35
+ npx archimaid render diagram.mmd diagram.svg
36
+ ```
37
+
38
+ `archimaid render` accepts `--theme default|base|dark|forest|neutral` and `--background theme|transparent`. Run `npx archimaid --help` for all options.
39
+
40
+ ## Examples
41
+
42
+ A diagram starts with `archimate-beta`. Give each element and relationship a stable ID, then reference those IDs when connecting or nesting elements.
43
+
44
+ ```text
45
+ archimate-beta
46
+ direction LR
47
+ accTitle: Order fulfilment responsibilities
48
+ accDescr: A fulfilment clerk is assigned to the fulfil order process.
49
+
50
+ element businessRole clerk "Fulfilment clerk"
51
+ element businessProcess fulfil "Fulfil order"
52
+ relationship assignment clerk_to_fulfil clerk -> fulfil
53
+ ```
54
+
55
+ Add element details with `description elementId "Text"` and a visible relationship label with `label "Text"` after the relationship's endpoints and options.
56
+
57
+ ### Relationship shorthand
58
+
59
+ Write `source <connector> target` to declare a relationship without an ID. Add `: "Text"` for a visible label. The left endpoint is always the model source, so `manage <.. order` means *manage reads order*. The connector mirrors the rendered markers.
60
+
61
+ | Relationship | Connector | Long form equivalent |
62
+ | --- | --- | --- |
63
+ | Composition | `a *-- b` | `relationship composition id a -> b` |
64
+ | Aggregation | `a o-- b` | `relationship aggregation id a -> b` |
65
+ | Assignment | `a @==> b` | `relationship assignment id a -> b` |
66
+ | Realization | `a ..\|> b` | `relationship realization id a -> b` |
67
+ | Serving | `a --> b` | `relationship serving id a -> b` |
68
+ | Access | `a .. b` | `relationship access id a -> b` |
69
+ | Access, read | `a <.. b` | `... a -> b access read` |
70
+ | Access, write | `a ..> b` | `... a -> b access write` |
71
+ | Access, read/write | `a <..> b` | `... a -> b access readWrite` |
72
+ | Influence | `a -.-> b` | `relationship influence id a -> b` |
73
+ | Association | `a --- b` | `relationship association id a -> b` |
74
+ | Association, directed | `a --/ b` | `... a -> b directed` |
75
+ | Triggering | `a ==> b` | `relationship triggering id a -> b` |
76
+ | Flow | `a -.=> b` | `relationship flow id a -> b` |
77
+ | Specialization | `a --\|> b` | `relationship specialization id a -> b` |
78
+
79
+ `..` is a dotted line and `-.` a dashed one. `>` is an open arrowhead, `=>` a filled one, `|>` a hollow triangle, and `/` the single barb of a directed Association. Shorthand relationships receive generated IDs of the form `source__type__target`. Use the long form when another declaration must reference the relationship by ID.
80
+
81
+ | Example | What it shows | Files |
82
+ | --- | --- | --- |
83
+ | Order fulfilment | A Business Role assigned to a Business Process | [Source](examples/order-fulfilment.mmd) |
84
+ | Order management | Assignment, Realization, Serving, and read Access | [Source](examples/order-management.mmd) · [SVG](examples/order-management.svg) |
85
+ | Cross-layer relationships | Architecture layout with Business, Application, and Technology rows and nested claims processing | [Source](examples/cross-layer-relationships.mmd) · [SVG](examples/cross-layer-relationships.svg) |
86
+ | Nested components | Composition shown as containment, edges crossing the boundary, and notes | [Source](examples/nested-components.mmd) · [SVG](examples/nested-components.svg) |
87
+ | Notation sheet | The element catalogue and examples of every relationship, including Access and Association variants | [SVG](examples/element-preview.svg) |
88
+
89
+ ### Choose a layout
90
+
91
+ Architecture layout is the default when you omit both `layout` and `direction`. Use `layout architecture` to select it explicitly. It orders occupied layers from top to bottom as Strategy, Business, Application, Technology (including Physical), and Implementation & Migration. Relationships guide the placement of connected elements within and across layers. Motivation sits at the top, near the chains it connects to.
92
+
93
+ Use `layout framework` to arrange the same layers in fixed aspect columns. Passive Structure, Behavior, and Active Structure run from left to right, with Motivation on the far right. Only occupied rows and columns take up space.
94
+
95
+ In architecture and framework layout, relationships of the same type that leave or arrive at the same element share one anchor and run as one line until they branch to their other ends. Access relationships bundle only with the same access mode, and directed Associations only with directed ones. A bundle splits by direction: elements directly above or below get a straight line from that side, and the rest share a trunk from the left or right side. Each relationship type gets its own anchor, and anchors are ordered so that trunks nest without crossing. Branch points are plain line joins, not ArchiMate junctions. Self-relationships and relationships of notes are never bundled.
96
+
97
+ Architecture and framework layouts preserve nesting. A parent with its own layer determines the placement of its container. Groups without their own layer that contain elements from multiple layers are placed separately.
98
+
99
+ Use `layout graph` for a relationship-driven layout. Graph layout accepts `direction TB`, `BT`, `LR`, or `RL`, and defaults to `TB`. A `direction` declaration on its own selects graph layout. An explicit `layout` declaration takes precedence.
100
+
101
+ ### Nest elements and add notes
102
+
103
+ Declare elements inside an element's block to draw them inside it. Blocks can be nested.
104
+
105
+ ```text
106
+ archimate-beta
107
+ element applicationComponent suite "Order management suite" {
108
+ element applicationComponent billing "Billing"
109
+ element applicationComponent orders "Orders"
110
+ }
111
+ suite *-- billing
112
+
113
+ note review "Confirm retry behaviour" on suite
114
+ ```
115
+
116
+ Nesting does not need a relationship. When exactly one relationship between parent and child supports nesting, as `suite *-- billing` does here, the enclosure represents that relationship and its line is not drawn. Without such a relationship, as for `orders`, the nesting only groups the child visually. With several, name the intended one: declare the child outside the block and write `nest child in parent via relationshipId`. `nest child in parent` without `via` works like a block.
117
+
118
+ Nesting supports Composition, Aggregation, Assignment, Realization, and Access from parent to child. For Specialization, the child specializes its parent. Each child has one visual parent, and nesting must not form a cycle. The renderer still draws the line of a nesting relationship that carries a label or an explicit read/write mode. A block holds elements, descriptions, relationships, notes, `nest` and `click` declarations; diagram settings such as `direction` stay at the top level. [ArchiMate 3.2 specification, §§3.8, 5.1, 5.2.2, and 5.4.1](https://publications.opengroup.org/standards/archimate/c226)
119
+
120
+ Use `note id "Text"` for a standalone note or `note id "Text" on elementId` to attach it to an element's top edge (its bottom edge in `direction BT`, so relationships leaving upward stay clear of it). Notes are diagram annotations and can be endpoints of the supported relationship types. Use `\n` for a line break.
121
+
122
+ ### Links and tooltips
123
+
124
+ Hovering an element shows its type and name, followed by its `description`. Use `click` to link an element to a page, with an optional tooltip that replaces the description and an optional target.
125
+
126
+ ```text
127
+ archimate-beta
128
+ element applicationComponent billing "Billing"
129
+ description billing "Handles invoicing."
130
+ click billing href "https://wiki.example.com/billing" "Open the billing runbook" _blank
131
+ ```
132
+
133
+ The link accepts `http`, `https` and `mailto` URLs, and relative URLs. The target is one of `_blank`, `_self`, `_parent` or `_top`. Mermaid removes the target unless `securityLevel` is `'loose'`, so with the default `'strict'` level the link opens in the same tab. Links only work where the SVG is shown inline or opened directly; GitHub Markdown and `<img>` tags do not follow them.
134
+
135
+ ## Host integration
136
+
137
+ Add a `<div id="diagram"></div>` to your page and run this module through your JavaScript bundler.
138
+
139
+ ```js
140
+ import mermaid from 'mermaid';
141
+ import { archimate } from 'archimaid';
142
+
143
+ mermaid.initialize({ startOnLoad: false, securityLevel: 'strict' });
144
+ await mermaid.registerExternalDiagrams([archimate]);
145
+
146
+ const source = `archimate-beta
147
+ direction LR
148
+ element businessRole clerk "Fulfilment clerk"
149
+ element businessProcess fulfil "Fulfil order"
150
+ relationship assignment clerk_to_fulfil clerk -> fulfil`;
151
+
152
+ const { svg } = await mermaid.render('order-fulfilment', source);
153
+ document.querySelector('#diagram').innerHTML = svg;
154
+ ```
155
+
156
+ Without a bundler, load Mermaid's and this package's prebuilt ES modules, for example from a CDN.
157
+
158
+ ```html
159
+ <pre class="mermaid">
160
+ archimate-beta
161
+ element businessRole clerk "Fulfilment clerk"
162
+ element businessProcess fulfil "Fulfil order"
163
+ clerk @==> fulfil
164
+ </pre>
165
+ <script type="module">
166
+ import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@12/dist/mermaid.esm.min.mjs';
167
+ import { archimate } from 'https://cdn.jsdelivr.net/npm/archimaid@0/dist/bundle/archimaid.esm.min.mjs';
168
+
169
+ mermaid.initialize({ startOnLoad: false, securityLevel: 'strict' });
170
+ await mermaid.registerExternalDiagrams([archimate]);
171
+ await mermaid.run();
172
+ </script>
173
+ ```
174
+
175
+ The bundle is also exported as `archimaid/bundle`. It includes the parser and renderer, and loads ELK from a separate file only when a `layout graph` diagram is rendered.
176
+
177
+ Live rendering requires a host that registers the external diagram. For GitHub Markdown, commit the `.mmd` source alongside its exported SVG and link to the SVG with `![Diagram title](order-fulfilment.svg)`. This keeps the model reviewable in Git and the image visible to readers. [Mermaid external diagram API](https://mermaid.js.org/config/setup/mermaid/interfaces/Mermaid.html#registerexternaldiagrams)
178
+
179
+ The standalone validator skips a leading YAML frontmatter block that starts and ends with a `---` line, and it reports line numbers for the whole file. It does not read the frontmatter's content, so use the DSL's `title:`, `accTitle:`, and `accDescr:` declarations for metadata the validator should check. Use `accDescr { … }` for a description that spans several lines, and do not combine it with `accDescr:`. A `%%` that follows a space ends a `title:`, `accTitle:` or `accDescr:` value as a comment. To keep it, or to use escapes such as `\u0025`, write the whole value as one double-quoted string, for example `title: "Load %% budget"`. To show a Mermaid directive as literal text in a quoted label, escape its percent signs as `\u0025`.
180
+
181
+ ### Theme, palette, and viewport
182
+
183
+ The ArchiMate palette controls element colours and is selected independently of the Mermaid theme. Modern is the default and currently available palette. Classic and New are planned as separate palettes.
184
+
185
+ Light and dark diagrams share the same element fills. Dark mode draws relationship lines and markers in white. Set `theme: 'dark'` when initializing Mermaid, or set `config.theme` in Mermaid YAML frontmatter for an individual diagram.
186
+
187
+ ```text
188
+ ---
189
+ config:
190
+ theme: dark
191
+ ---
192
+ archimate-beta
193
+ element applicationComponent billing "Billing"
194
+ ```
195
+
196
+ With `theme: 'base'`, the diagram reads `background`, `lineColor`, `textColor`, `fontFamily` and `fontSize` from `themeVariables`, so its canvas, font and font size follow Mermaid's base theme instead of the ArchiMate presets. The background may be any CSS colour, including named colours and colours with an alpha channel. Dark mode follows `themeVariables.darkMode`, or the brightness of `background` when `darkMode` is not set. A transparent, partly transparent or unrecognised background keeps the ArchiMate light or dark preset for both the canvas and the lines and text. Line and text colours that would be unreadable on the background are replaced by the preset colours. `fontFamily` accepts family names made of letters, digits, spaces, hyphens and underscores, separated by commas and optionally quoted. `fontSize` is limited to 8–32 pixels. Other themes use the ArchiMate light or dark presets.
197
+
198
+ The `archimate` export uses the Modern palette and 24 pixels of outer diagram padding. It fits narrow containers up to the SVG's natural width. To set palette and viewport options, register an instance from `createArchiMatePlugin`.
199
+
200
+ ```js
201
+ import mermaid from 'mermaid';
202
+ import { createArchiMatePlugin } from 'archimaid';
203
+
204
+ mermaid.initialize({ startOnLoad: false, securityLevel: 'strict', theme: 'dark' });
205
+ await mermaid.registerExternalDiagrams([
206
+ createArchiMatePlugin({ palette: 'modern', diagramPadding: 32, useMaxWidth: true }),
207
+ ]);
208
+ ```
209
+
210
+ `diagramPadding` accepts any finite, nonnegative number. `useMaxWidth` defaults to `true`. Set it to `false` to render the SVG at its natural size.
211
+
212
+ `maxRowWidth` sets the widest row, in pixels, that architecture layout places before wrapping a row onto a second line in the same layer. It accepts any number greater than 0 and defaults to 1200. Set it to `Infinity` to turn wrapping off.
213
+
214
+ `background` is `'theme'` (default), which paints the diagram canvas in the theme background, or `'transparent'`, which omits the canvas so the host page shows through. Relationship labels and hollow markers keep the theme background in both cases.
215
+
216
+ Element names wrap at about 200 pixels and relationship labels at about 180 pixels. ELK, which lays out `layout graph` diagrams, loads on demand the first time one is rendered.
217
+
218
+ ## Language API
219
+
220
+ Use the language entry point to validate or inspect a diagram in Node.js without a browser.
221
+
222
+ ```js
223
+ import { readFile } from 'node:fs/promises';
224
+ import { parseArchiMate } from 'archimaid/language';
225
+
226
+ const source = await readFile('diagram.mmd', 'utf8');
227
+ const model = parseArchiMate(source);
228
+ console.log(model.elements);
229
+ ```
230
+
231
+ Validation errors throw `ArchiMateError` with a code, line, and column. `parseArchiMate` stops at the first error.
232
+
233
+ For editors and linters, `validateArchiMate(source, options)` returns `{ model, diagnostics }`. It reports every semantic error, and warnings such as `DUPLICATE_RELATIONSHIP`, each with `code`, `severity`, `message`, `line`, `column`, `endLine` and `endColumn`. Lines and columns are 1-based and `endColumn` is exclusive. `model` is present only when there are no errors.
234
+
235
+ The same entry point exports `elementTypes`, `relationshipTypes` and `relationshipNames` for tooling that needs the catalogue. [Type reference](docs/reference.md)
236
+
237
+ ## Coverage
238
+
239
+ The renderer supports the default figures for all 60 concrete elements and all 11 relationship types in the bundled catalogue. The [type reference](docs/reference.md) lists every element and relationship key with its name, layer and shorthand connector. Access accepts `access read`, `access write`, `access readWrite`, or `access unspecified`. Use `directed` for a directed Association. [Notation preview](examples/element-preview.svg)
240
+
241
+ The validator checks syntax, declared endpoints, supported element and relationship types, relationship options, and nesting. Check the specification to verify which element types a relationship can connect. [ArchiMate 3.2 specification, Appendix B](https://publications.opengroup.org/standards/archimate/c226)
242
+
243
+ Junctions, relationship-to-relationship endpoints, alternative element figures, viewpoint tooling, and model exchange are outside the current scope.
244
+
245
+ ## Development
246
+
247
+ ```sh
248
+ npm ci
249
+ npm run lint
250
+ npm test
251
+ npx playwright install chromium
252
+ npm run test:browser
253
+ npm pack --dry-run
254
+ ```
255
+
256
+ To try an unpublished version in another project, build an archive with `npm pack` in the checkout and install it there.
257
+
258
+ ```sh
259
+ npm install mermaid /path/to/archimaid-0.1.0.tgz
260
+ ```
261
+
262
+ Use `npm run typecheck` to check TypeScript without emitting files and `npm run render:preview` to regenerate the notation sheet. After changing the catalogue, run `npm run reference` to regenerate the type reference; a test fails while it is stale. The browser tests exercise the plugin through a real Mermaid host.
263
+
264
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for checks, conventions and how to add an element type. Report security issues as described in [SECURITY.md](SECURITY.md). To generate or edit diagrams with an agent, point it to the repository skill. It covers syntax, relationship direction, and validation commands. [Foundation](FOUNDATION.md) · [Agent skill](skills/archimaid/SKILL.md)
265
+
266
+ ## Sources
267
+
268
+ - The Open Group's ArchiMate 3.2 specification defines the element and relationship types. [Specification C226](https://publications.opengroup.org/standards/archimate/c226)
269
+ - The Open Group's reference cards illustrate element figures and relationship notation. [Reference cards N221](https://www.opengroup.org/sites/default/files/docs/downloads/n221p.pdf)
270
+ - Mermaid provides the external diagram API, and ELK provides the graph layout. [Mermaid diagram guide](https://mermaid.js.org/community/new-diagram.html) · [ELK](https://eclipse.dev/elk/)
271
+
272
+ The plugin code is licensed under the [MIT License](LICENSE). The ArchiMate specification has [separate licensing terms](https://www.opengroup.co.za/standards). ArchiMate® is a registered trademark of The Open Group. Archimaid is an independent project and is not affiliated with or endorsed by The Open Group.
@@ -0,0 +1,106 @@
1
+ export type ElementCategory = 'motivation' | 'strategy' | 'business' | 'application' | 'technology' | 'physical' | 'implementationAndMigration' | 'composite';
2
+ export type ElementAspect = 'passiveStructure' | 'behavior' | 'activeStructure' | 'motivation';
3
+ export type ElementOutline = 'rectangle' | 'rounded' | 'chamfered' | 'grouping';
4
+ export interface IconPath {
5
+ readonly d: string;
6
+ readonly fill?: 'none' | 'ink';
7
+ }
8
+ export interface ElementTypeDefinition {
9
+ readonly name: string;
10
+ readonly description: string;
11
+ readonly category: ElementCategory;
12
+ readonly aspect: ElementAspect | null;
13
+ readonly notation?: {
14
+ readonly outline: ElementOutline;
15
+ readonly icon?: readonly IconPath[];
16
+ };
17
+ }
18
+ export declare const relationshipStroke = "#000000";
19
+ export declare const elementTypes: {
20
+ readonly stakeholder: ElementTypeDefinition;
21
+ readonly driver: ElementTypeDefinition;
22
+ readonly assessment: ElementTypeDefinition;
23
+ readonly goal: ElementTypeDefinition;
24
+ readonly outcome: ElementTypeDefinition;
25
+ readonly principle: ElementTypeDefinition;
26
+ readonly requirement: ElementTypeDefinition;
27
+ readonly constraint: ElementTypeDefinition;
28
+ readonly meaning: ElementTypeDefinition;
29
+ readonly value: ElementTypeDefinition;
30
+ readonly resource: ElementTypeDefinition;
31
+ readonly capability: ElementTypeDefinition;
32
+ readonly valueStream: ElementTypeDefinition;
33
+ readonly courseOfAction: ElementTypeDefinition;
34
+ readonly businessActor: ElementTypeDefinition;
35
+ readonly businessRole: ElementTypeDefinition;
36
+ readonly businessCollaboration: ElementTypeDefinition;
37
+ readonly businessInterface: ElementTypeDefinition;
38
+ readonly businessProcess: ElementTypeDefinition;
39
+ readonly businessFunction: ElementTypeDefinition;
40
+ readonly businessInteraction: ElementTypeDefinition;
41
+ readonly businessEvent: ElementTypeDefinition;
42
+ readonly businessService: ElementTypeDefinition;
43
+ readonly businessObject: ElementTypeDefinition;
44
+ readonly contract: ElementTypeDefinition;
45
+ readonly representation: ElementTypeDefinition;
46
+ readonly product: ElementTypeDefinition;
47
+ readonly applicationComponent: ElementTypeDefinition;
48
+ readonly applicationCollaboration: ElementTypeDefinition;
49
+ readonly applicationInterface: ElementTypeDefinition;
50
+ readonly applicationFunction: ElementTypeDefinition;
51
+ readonly applicationInteraction: ElementTypeDefinition;
52
+ readonly applicationProcess: ElementTypeDefinition;
53
+ readonly applicationEvent: ElementTypeDefinition;
54
+ readonly applicationService: ElementTypeDefinition;
55
+ readonly dataObject: ElementTypeDefinition;
56
+ readonly node: ElementTypeDefinition;
57
+ readonly device: ElementTypeDefinition;
58
+ readonly systemSoftware: ElementTypeDefinition;
59
+ readonly technologyCollaboration: ElementTypeDefinition;
60
+ readonly technologyInterface: ElementTypeDefinition;
61
+ readonly path: ElementTypeDefinition;
62
+ readonly communicationNetwork: ElementTypeDefinition;
63
+ readonly technologyFunction: ElementTypeDefinition;
64
+ readonly technologyProcess: ElementTypeDefinition;
65
+ readonly technologyInteraction: ElementTypeDefinition;
66
+ readonly technologyEvent: ElementTypeDefinition;
67
+ readonly technologyService: ElementTypeDefinition;
68
+ readonly artifact: ElementTypeDefinition;
69
+ readonly equipment: ElementTypeDefinition;
70
+ readonly facility: ElementTypeDefinition;
71
+ readonly distributionNetwork: ElementTypeDefinition;
72
+ readonly material: ElementTypeDefinition;
73
+ readonly workPackage: ElementTypeDefinition;
74
+ readonly deliverable: ElementTypeDefinition;
75
+ readonly implementationEvent: ElementTypeDefinition;
76
+ readonly plateau: ElementTypeDefinition;
77
+ readonly gap: ElementTypeDefinition;
78
+ readonly grouping: ElementTypeDefinition;
79
+ readonly location: ElementTypeDefinition;
80
+ };
81
+ export type ElementType = keyof typeof elementTypes;
82
+ export declare function getElementType(type: string): ElementTypeDefinition | undefined;
83
+ export type AccessMode = 'read' | 'write' | 'readWrite' | 'unspecified';
84
+ export type SpecifiedAccessMode = Exclude<AccessMode, 'unspecified'>;
85
+ export type RelationshipMarker = 'none' | 'filledDiamond' | 'openDiamond' | 'filledDot' | 'openArrow' | 'filledArrow' | 'openTriangle' | 'singleBarb';
86
+ export interface RelationshipNotation {
87
+ readonly line: 'solid' | 'dashed' | 'dotted';
88
+ readonly start: RelationshipMarker;
89
+ readonly end: RelationshipMarker;
90
+ }
91
+ export declare const relationshipTypes: readonly ["composition", "aggregation", "assignment", "realization", "serving", "access", "influence", "association", "triggering", "flow", "specialization"];
92
+ export type RelationshipType = (typeof relationshipTypes)[number];
93
+ export declare const relationshipNames: {
94
+ readonly composition: "Composition";
95
+ readonly aggregation: "Aggregation";
96
+ readonly assignment: "Assignment";
97
+ readonly realization: "Realization";
98
+ readonly serving: "Serving";
99
+ readonly access: "Access";
100
+ readonly influence: "Influence";
101
+ readonly association: "Association";
102
+ readonly triggering: "Triggering";
103
+ readonly flow: "Flow";
104
+ readonly specialization: "Specialization";
105
+ };
106
+ export declare function getRelationshipNotation(type: string, access?: AccessMode, directed?: boolean): RelationshipNotation | undefined;