@likec4/core 1.18.0 → 1.19.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 (177) hide show
  1. package/LICENSE +1 -1
  2. package/dist/builder/index.d.mts +502 -0
  3. package/dist/builder/index.d.ts +502 -0
  4. package/dist/builder/index.js +871 -0
  5. package/dist/compute-view/index.d.mts +9 -78
  6. package/dist/compute-view/index.d.ts +9 -78
  7. package/dist/compute-view/index.js +78 -0
  8. package/dist/index.d.mts +9 -730
  9. package/dist/index.d.ts +9 -730
  10. package/dist/{index.mjs → index.js} +7 -784
  11. package/dist/model/index.d.mts +218 -606
  12. package/dist/model/index.d.ts +218 -606
  13. package/dist/model/index.js +1 -0
  14. package/dist/shared/chunk-RAAYCPUM.M-JWF7SS.js +21 -0
  15. package/dist/shared/core.BIfgabEw.d.ts +719 -0
  16. package/dist/shared/core.BZ9Msq7w.d.mts +719 -0
  17. package/dist/shared/{core.DMYY7C8s.d.mts → core.C05RDLhi.d.ts} +179 -230
  18. package/dist/shared/{core.DMYY7C8s.d.ts → core.CmYMqgha.d.mts} +179 -230
  19. package/dist/shared/core.D6-fWbM3.d.ts +127 -0
  20. package/dist/shared/core.D74xkKkG.d.mts +148 -0
  21. package/dist/shared/core.D74xkKkG.d.ts +148 -0
  22. package/dist/shared/core.sLaWHBjR.d.mts +127 -0
  23. package/dist/shared/index.DafVOuVd.js +7443 -0
  24. package/dist/shared/object_hash.CE_oF3I3.js +1222 -0
  25. package/dist/shared/view.CyZrG8BJ.js +354 -0
  26. package/dist/types/index.d.mts +4 -2
  27. package/dist/types/index.d.ts +4 -2
  28. package/dist/types/index.js +20 -0
  29. package/dist/utils/index.d.mts +419 -0
  30. package/dist/utils/index.d.ts +419 -0
  31. package/dist/utils/index.js +347 -0
  32. package/package.json +47 -33
  33. package/src/builder/Builder-style1.test-d.ts +190 -0
  34. package/src/builder/Builder-style2.test-d.ts +175 -0
  35. package/src/builder/Builder.deployment.ts +25 -20
  36. package/src/builder/Builder.deploymentModel.ts +80 -55
  37. package/src/builder/Builder.element.ts +2 -0
  38. package/src/builder/Builder.model.ts +57 -43
  39. package/src/builder/Builder.ts +412 -431
  40. package/src/builder/Builder.view-common.ts +234 -0
  41. package/src/builder/Builder.view-deployment.ts +135 -0
  42. package/src/builder/Builder.view-element.ts +189 -0
  43. package/src/builder/Builder.views.ts +109 -33
  44. package/src/builder/Builder.with.ts +475 -0
  45. package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +374 -0
  46. package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +183 -0
  47. package/src/builder/__snapshots__/Builder.spec.ts.snap +374 -0
  48. package/src/builder/_types.ts +28 -5
  49. package/src/builder/index.ts +10 -4
  50. package/src/colors/index.ts +2 -2
  51. package/src/compute-view/compute-view.ts +45 -54
  52. package/src/compute-view/deployment-view/__test__/TestHelper.ts +236 -0
  53. package/src/compute-view/deployment-view/__test__/fixture.ts +50 -62
  54. package/src/compute-view/deployment-view/_types.ts +26 -18
  55. package/src/compute-view/deployment-view/clean-connections.ts +173 -164
  56. package/src/compute-view/deployment-view/compute.ts +51 -37
  57. package/src/compute-view/deployment-view/memory/index.ts +9 -0
  58. package/src/compute-view/deployment-view/memory/memory.ts +97 -0
  59. package/src/compute-view/deployment-view/predicates/elements.ts +144 -0
  60. package/src/compute-view/deployment-view/predicates/relation-direct.ts +183 -76
  61. package/src/compute-view/deployment-view/predicates/relation-in-out.ts +38 -20
  62. package/src/compute-view/deployment-view/predicates/relation-incoming.ts +72 -23
  63. package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +61 -22
  64. package/src/compute-view/deployment-view/predicates/wildcard.ts +15 -15
  65. package/src/compute-view/deployment-view/stages/stage-exclude.ts +5 -0
  66. package/src/compute-view/deployment-view/stages/stage-final.ts +245 -0
  67. package/src/compute-view/deployment-view/stages/stage-include.ts +95 -0
  68. package/src/compute-view/deployment-view/utils.ts +95 -31
  69. package/src/compute-view/dynamic-view/__test__/fixture.ts +4 -4
  70. package/src/compute-view/dynamic-view/compute.ts +59 -45
  71. package/src/compute-view/element-view/__test__/TestHelper.ts +258 -0
  72. package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +64 -62
  73. package/src/compute-view/element-view/__test__/fixture.ts +147 -117
  74. package/src/compute-view/element-view/_types.ts +48 -0
  75. package/src/compute-view/element-view/clean-connections.ts +113 -0
  76. package/src/compute-view/element-view/compute.ts +264 -683
  77. package/src/compute-view/element-view/memory/NodeGroup.ts +31 -0
  78. package/src/compute-view/element-view/memory/index.ts +10 -0
  79. package/src/compute-view/element-view/memory/memory.ts +177 -0
  80. package/src/compute-view/element-view/memory/stage-exclude.ts +59 -0
  81. package/src/compute-view/element-view/memory/stage-final.ts +129 -0
  82. package/src/compute-view/element-view/memory/stage-include.ts +128 -0
  83. package/src/compute-view/element-view/predicates/_utils.ts +86 -0
  84. package/src/compute-view/element-view/predicates/element-expand.ts +33 -0
  85. package/src/compute-view/element-view/predicates/element-kind-tag.ts +26 -0
  86. package/src/compute-view/element-view/predicates/element-ref.ts +37 -0
  87. package/src/compute-view/element-view/predicates/relation-direct.ts +309 -0
  88. package/src/compute-view/element-view/predicates/relation-in-out.ts +66 -0
  89. package/src/compute-view/element-view/predicates/relation-in.ts +118 -0
  90. package/src/compute-view/element-view/predicates/relation-out.ts +116 -0
  91. package/src/compute-view/element-view/predicates/wildcard.ts +88 -0
  92. package/src/compute-view/element-view/utils.ts +59 -0
  93. package/src/compute-view/index.ts +3 -4
  94. package/src/compute-view/memory/AbstractMemory.ts +45 -0
  95. package/src/compute-view/memory/AbstractStageExclude.ts +216 -0
  96. package/src/compute-view/memory/AbstractStageInclude.ts +200 -0
  97. package/src/compute-view/memory/_types.ts +147 -0
  98. package/src/compute-view/memory/index.ts +5 -0
  99. package/src/compute-view/memory/ops.ts +43 -0
  100. package/src/compute-view/utils/buildComputedNodes.ts +4 -4
  101. package/src/compute-view/utils/elementExpressionToPredicate.ts +1 -3
  102. package/src/compute-view/utils/link-nodes-with-edges.ts +3 -7
  103. package/src/compute-view/utils/{derive-edge-props-from-relationships.ts → merge-props-from-relationships.ts} +54 -23
  104. package/src/compute-view/utils/relationExpressionToPredicates.ts +2 -2
  105. package/src/compute-view/utils/resolve-extended-views.ts +44 -40
  106. package/src/compute-view/utils/resolve-global-rules.ts +6 -6
  107. package/src/compute-view/utils/topological-sort.ts +167 -71
  108. package/src/compute-view/utils/with-readable-edges.ts +14 -9
  109. package/src/index.ts +22 -16
  110. package/src/model/DeploymentElementModel.ts +150 -85
  111. package/src/model/DeploymentModel.ts +27 -21
  112. package/src/model/ElementModel.ts +51 -25
  113. package/src/model/LikeC4Model.test-d.ts +4 -3
  114. package/src/model/LikeC4Model.ts +98 -42
  115. package/src/model/RelationModel.ts +5 -4
  116. package/src/model/__test__/fixture.ts +5 -9
  117. package/src/model/connection/Connection.ts +72 -0
  118. package/src/model/connection/deployment/DeploymentConnectionModel.ts +178 -0
  119. package/src/model/connection/{deployment.ts → deployment/find.ts} +14 -18
  120. package/src/model/connection/deployment/index.ts +8 -0
  121. package/src/model/connection/index.ts +22 -0
  122. package/src/model/connection/model/ConnectionModel.ts +157 -0
  123. package/src/model/connection/{model.ts → model/find.ts} +43 -49
  124. package/src/model/connection/model/index.ts +8 -0
  125. package/src/model/connection/ops.ts +274 -0
  126. package/src/model/guards.ts +9 -0
  127. package/src/model/index.ts +45 -3
  128. package/src/model/types.ts +35 -18
  129. package/src/model/view/EdgeModel.ts +6 -6
  130. package/src/model/view/LikeC4ViewModel.ts +14 -8
  131. package/src/model/view/NodeModel.ts +6 -5
  132. package/src/types/_common.ts +53 -1
  133. package/src/types/deployments.ts +88 -156
  134. package/src/types/element.ts +2 -2
  135. package/src/types/expression-v2.ts +172 -0
  136. package/src/types/expression.ts +9 -5
  137. package/src/types/global.ts +3 -3
  138. package/src/types/index.ts +220 -13
  139. package/src/types/model.ts +28 -24
  140. package/src/types/operators.ts +1 -1
  141. package/src/types/relation.ts +14 -10
  142. package/src/types/theme.ts +0 -1
  143. package/src/types/view.ts +20 -18
  144. package/src/utils/const.ts +1 -0
  145. package/src/utils/fqn.ts +140 -49
  146. package/src/utils/getOrCreate.ts +1 -1
  147. package/src/utils/index.ts +75 -9
  148. package/src/utils/iterable/_types.ts +5 -0
  149. package/src/utils/iterable/filter.ts +55 -0
  150. package/src/utils/iterable/find.ts +36 -0
  151. package/src/utils/iterable/flat.ts +17 -0
  152. package/src/utils/iterable/index.ts +13 -0
  153. package/src/utils/iterable/map.ts +40 -0
  154. package/src/utils/iterable/reduce.ts +24 -0
  155. package/src/utils/iterable/some.ts +36 -0
  156. package/src/utils/iterable/to.ts +19 -0
  157. package/src/utils/iterable/unique.ts +29 -0
  158. package/src/utils/relations.ts +3 -64
  159. package/src/utils/set.ts +11 -9
  160. package/src/utils/string-hash.ts +1 -1
  161. package/dist/compute-view/index.mjs +0 -79
  162. package/dist/model/index.mjs +0 -2
  163. package/dist/shared/core.BBgiAAv1.mjs +0 -144
  164. package/dist/shared/core.BPyJvuMU.mjs +0 -2420
  165. package/dist/shared/core.BQ4AbfvB.mjs +0 -9228
  166. package/dist/shared/core.k12s_keD.mjs +0 -203
  167. package/dist/types/index.mjs +0 -21
  168. package/src/builder/Builder.test-d.ts +0 -124
  169. package/src/builder/Builder.view.ts +0 -543
  170. package/src/compute-view/LikeC4ModelGraph.ts +0 -330
  171. package/src/compute-view/deployment-view/Memory.ts +0 -108
  172. package/src/compute-view/deployment-view/Stage.ts +0 -145
  173. package/src/compute-view/deployment-view/predicates/deployment-ref.ts +0 -146
  174. package/src/compute-view/element-view/predicates.ts +0 -517
  175. package/src/compute-view/utils/sortNodes.ts +0 -101
  176. package/src/model/connection/ConnectionModel.ts +0 -94
  177. package/src/model/connection/DeploymentConnectionModel.ts +0 -99
@@ -1,110 +1,5 @@
1
- import { Tagged, LiteralUnion, TupleToUnion, NonEmptyTuple, Simplify, MergeExclusive, UnionToIntersection } from 'type-fest';
2
-
3
- type NonEmptyArray<T> = [T, ...T[]];
4
- type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
5
- type IconUrl = Tagged<string, 'IconUrl'> | 'none';
6
- type CustomColor = string;
7
- type Point = readonly [x: number, y: number];
8
- interface XYPoint {
9
- x: number;
10
- y: number;
11
- }
12
- type KeysOf<T> = keyof T extends infer K extends string ? K : never;
13
-
14
- declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
15
- type ThemeColor = typeof ThemeColors[number];
16
- type HexColorLiteral = `#${string}`;
17
- type ColorLiteral = HexColorLiteral;
18
- type Color = LiteralUnion<ThemeColor, string>;
19
- declare function isThemeColor(color: Color): color is ThemeColor;
20
- interface ElementThemeColorValues {
21
- fill: ColorLiteral;
22
- stroke: ColorLiteral;
23
- hiContrast: ColorLiteral;
24
- loContrast: ColorLiteral;
25
- }
26
- type ElementThemeColors = {
27
- [key in ThemeColor]: ElementThemeColorValues;
28
- };
29
- interface RelationshipThemeColorValues {
30
- lineColor: ColorLiteral;
31
- labelBgColor: ColorLiteral;
32
- labelColor: ColorLiteral;
33
- }
34
- interface ThemeColorValues {
35
- elements: ElementThemeColorValues;
36
- relationships: RelationshipThemeColorValues;
37
- }
38
- type RelationshipThemeColors = {
39
- [key in ThemeColor]: RelationshipThemeColorValues;
40
- };
41
- interface LikeC4Theme {
42
- font: 'Arial';
43
- shadow: ColorLiteral;
44
- relationships: RelationshipThemeColors;
45
- elements: ElementThemeColors;
46
- }
47
-
48
- type Fqn<Id extends string = string> = Tagged<Id, 'Fqn'>;
49
- declare function AsFqn(name: string, parent?: Fqn | null): Fqn;
50
- declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
51
- type BorderStyle = TupleToUnion<typeof BorderStyles>;
52
- type ElementKind<Kinds extends string = string> = Tagged<Kinds, 'ElementKind'>;
53
- declare namespace ElementKind {
54
- const Group: ElementKind;
55
- }
56
- declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
57
- type ElementShape = TupleToUnion<typeof ElementShapes>;
58
- declare const DefaultThemeColor = "primary";
59
- declare const DefaultElementShape = "rectangle";
60
- interface ElementStyle {
61
- readonly border?: BorderStyle;
62
- /**
63
- * In percentage 0-100, 0 is fully transparent
64
- *
65
- * @default 100
66
- */
67
- readonly opacity?: number;
68
- }
69
- type Tag<Tags extends string = string> = Tagged<Tags, 'Tag'>;
70
- interface TagSpec {
71
- readonly id: Tag;
72
- readonly style: ElementStyle;
73
- }
74
- interface Link {
75
- readonly title?: string;
76
- readonly url: string;
77
- readonly relative?: string;
78
- }
79
- interface TypedElement<Ids extends string, Kinds extends string, Tags extends string, MetadataKeys extends string = never> {
80
- readonly id: Fqn<Ids>;
81
- readonly kind: ElementKind<Kinds>;
82
- readonly title: string;
83
- readonly description: string | null;
84
- readonly technology: string | null;
85
- readonly tags: NonEmptyArray<Tag<Tags>> | null;
86
- readonly links: NonEmptyArray<Link> | null;
87
- readonly icon?: IconUrl;
88
- readonly shape?: ElementShape;
89
- readonly color?: Color;
90
- readonly style?: ElementStyle;
91
- readonly notation?: string;
92
- readonly metadata?: Record<MetadataKeys, string>;
93
- }
94
- interface Element extends TypedElement<string, string, string, string> {
95
- }
96
- interface ElementKindSpecificationStyle {
97
- shape?: ElementShape;
98
- icon?: IconUrl;
99
- color?: Color;
100
- border?: BorderStyle;
101
- opacity?: number;
102
- }
103
- interface ElementKindSpecification {
104
- readonly technology?: string;
105
- readonly notation?: string;
106
- readonly style: ElementKindSpecificationStyle;
107
- }
1
+ import { Tagged, NonEmptyTuple, Simplify, MergeExclusive } from 'type-fest';
2
+ import { N as NonEmptyArray, F as Fqn, l as ElementShape, s as Color, I as IconUrl, h as BorderStyle, f as ElementKind, o as Tag, E as ExclusiveUnion, m as ElementStyle, n as Link, T as ThemeColorValues, X as XYPoint, P as Point, x as ThemeColor, j as ElementKindSpecification, q as TypedElement } from './core.D74xkKkG.mjs';
108
3
 
109
4
  type EqualOperator<V> = {
110
5
  eq: V;
@@ -113,36 +8,36 @@ type EqualOperator<V> = {
113
8
  eq?: never;
114
9
  neq: V;
115
10
  };
116
- type AllNever$1 = {
11
+ type AllNever = {
117
12
  not?: never;
118
13
  and?: never;
119
14
  or?: never;
120
15
  tag?: never;
121
16
  kind?: never;
122
17
  };
123
- type TagEqual<Tag> = Omit<AllNever$1, 'tag'> & {
18
+ type TagEqual<Tag> = Omit<AllNever, 'tag'> & {
124
19
  tag: EqualOperator<Tag>;
125
20
  };
126
21
  declare const isTagEqual: <Tag>(operator: WhereOperator<Tag, any>) => operator is TagEqual<Tag>;
127
- type KindEqual<Kind> = Omit<AllNever$1, 'kind'> & {
22
+ type KindEqual<Kind> = Omit<AllNever, 'kind'> & {
128
23
  kind: EqualOperator<Kind>;
129
24
  };
130
25
  declare const isKindEqual: <Kind>(operator: WhereOperator<any, Kind>) => operator is KindEqual<Kind>;
131
- type NotOperator<Tag, Kind> = Omit<AllNever$1, 'not'> & {
26
+ type NotOperator<Tag, Kind> = Omit<AllNever, 'not'> & {
132
27
  not: WhereOperator<Tag, Kind>;
133
28
  };
134
29
  declare const isNotOperator: <Tag, Kind>(operator: WhereOperator<Tag, Kind>) => operator is NotOperator<Tag, Kind>;
135
- type AndOperator<Tag, Kind> = Omit<AllNever$1, 'and'> & {
30
+ type AndOperator<Tag, Kind> = Omit<AllNever, 'and'> & {
136
31
  and: NonEmptyArray<WhereOperator<Tag, Kind>>;
137
32
  };
138
33
  declare const isAndOperator: <Tag, Kind>(operator: WhereOperator<Tag, Kind>) => operator is AndOperator<Tag, Kind>;
139
- type OrOperator<Tag, Kind> = Omit<AllNever$1, 'or'> & {
34
+ type OrOperator<Tag, Kind> = Omit<AllNever, 'or'> & {
140
35
  or: NonEmptyArray<WhereOperator<Tag, Kind>>;
141
36
  };
142
37
  declare const isOrOperator: <Tag, Kind>(operator: WhereOperator<Tag, Kind>) => operator is OrOperator<Tag, Kind>;
143
38
  type WhereOperator<Tag, Kind> = TagEqual<Tag> | KindEqual<Kind> | NotOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
144
39
  type Filterable<FTag extends string = string, FKind extends string = string> = {
145
- tags?: FTag[] | null;
40
+ tags?: readonly FTag[] | null;
146
41
  kind?: FKind;
147
42
  };
148
43
  type OperatorPredicate<V extends Filterable> = (value: V) => boolean;
@@ -206,7 +101,8 @@ interface ElementTagExpr extends Omit<BaseExpr, 'elementTag' | 'isEqual'> {
206
101
  isEqual: boolean;
207
102
  }
208
103
  declare function isElementTagExpr(expr: Expression): expr is ElementTagExpr;
209
- type ElementExpression = ElementRefExpr | WildcardExpr | ElementKindExpr | ElementTagExpr | ExpandedElementExpr;
104
+ type NonWilcard = ElementRefExpr | ElementKindExpr | ElementTagExpr | ExpandedElementExpr;
105
+ type ElementExpression = NonWilcard | WildcardExpr;
210
106
  declare function isElement(expr: Expression): expr is ElementExpression;
211
107
  interface ElementWhereExpr extends Omit<BaseExpr, 'where'> {
212
108
  where: {
@@ -217,12 +113,12 @@ interface ElementWhereExpr extends Omit<BaseExpr, 'where'> {
217
113
  declare function isElementWhere(expr: Expression): expr is ElementWhereExpr;
218
114
  type ElementPredicateExpression = ElementExpression | ElementWhereExpr | CustomElementExpr;
219
115
  declare function isElementPredicateExpr(expr: Expression): expr is ElementPredicateExpression;
220
- interface RelationExpr extends Omit<BaseExpr, 'source' | 'target'> {
116
+ interface DirectRelationExpr extends Omit<BaseExpr, 'source' | 'target'> {
221
117
  source: ElementExpression;
222
118
  target: ElementExpression;
223
119
  isBidirectional?: boolean;
224
120
  }
225
- declare function isRelation(expr: Expression): expr is RelationExpr;
121
+ declare function isRelation(expr: Expression): expr is DirectRelationExpr;
226
122
  interface InOutExpr extends Omit<BaseExpr, 'inout'> {
227
123
  inout: ElementExpression;
228
124
  }
@@ -235,7 +131,7 @@ interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
235
131
  outgoing: ElementExpression;
236
132
  }
237
133
  declare function isOutgoing(expr: Expression): expr is OutgoingExpr;
238
- type RelationExpression = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
134
+ type RelationExpression = DirectRelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
239
135
  declare function isRelationExpression(expr: Expression): expr is RelationExpression;
240
136
  interface RelationWhereExpr extends Omit<BaseExpr, 'where'> {
241
137
  where: {
@@ -266,6 +162,7 @@ type Expression = ElementPredicateExpression | RelationPredicateExpression;
266
162
 
267
163
  type expression_CustomElementExpr = CustomElementExpr;
268
164
  type expression_CustomRelationExpr = CustomRelationExpr;
165
+ type expression_DirectRelationExpr = DirectRelationExpr;
269
166
  type expression_ElementExpression = ElementExpression;
270
167
  type expression_ElementKindExpr = ElementKindExpr;
271
168
  type expression_ElementPredicateExpression = ElementPredicateExpression;
@@ -276,8 +173,8 @@ type expression_ExpandedElementExpr = ExpandedElementExpr;
276
173
  type expression_Expression = Expression;
277
174
  type expression_InOutExpr = InOutExpr;
278
175
  type expression_IncomingExpr = IncomingExpr;
176
+ type expression_NonWilcard = NonWilcard;
279
177
  type expression_OutgoingExpr = OutgoingExpr;
280
- type expression_RelationExpr = RelationExpr;
281
178
  type expression_RelationExpression = RelationExpression;
282
179
  type expression_RelationPredicateExpression = RelationPredicateExpression;
283
180
  type expression_RelationWhereExpr = RelationWhereExpr;
@@ -300,7 +197,119 @@ declare const expression_isRelationPredicateExpr: typeof isRelationPredicateExpr
300
197
  declare const expression_isRelationWhere: typeof isRelationWhere;
301
198
  declare const expression_isWildcard: typeof isWildcard;
302
199
  declare namespace expression {
303
- export { type expression_CustomElementExpr as CustomElementExpr, type expression_CustomRelationExpr as CustomRelationExpr, type expression_ElementExpression as ElementExpression, type expression_ElementKindExpr as ElementKindExpr, type expression_ElementPredicateExpression as ElementPredicateExpression, type expression_ElementRefExpr as ElementRefExpr, type expression_ElementTagExpr as ElementTagExpr, type expression_ElementWhereExpr as ElementWhereExpr, type expression_ExpandedElementExpr as ExpandedElementExpr, type expression_Expression as Expression, type expression_InOutExpr as InOutExpr, type expression_IncomingExpr as IncomingExpr, type expression_OutgoingExpr as OutgoingExpr, type expression_RelationExpr as RelationExpr, type expression_RelationExpression as RelationExpression, type expression_RelationPredicateExpression as RelationPredicateExpression, type expression_RelationWhereExpr as RelationWhereExpr, type expression_WildcardExpr as WildcardExpr, expression_isCustomElement as isCustomElement, expression_isCustomRelationExpr as isCustomRelationExpr, expression_isElement as isElement, expression_isElementKindExpr as isElementKindExpr, expression_isElementPredicateExpr as isElementPredicateExpr, expression_isElementRef as isElementRef, expression_isElementTagExpr as isElementTagExpr, expression_isElementWhere as isElementWhere, expression_isExpandedElementExpr as isExpandedElementExpr, expression_isInOut as isInOut, expression_isIncoming as isIncoming, expression_isOutgoing as isOutgoing, expression_isRelation as isRelation, expression_isRelationExpression as isRelationExpression, expression_isRelationPredicateExpr as isRelationPredicateExpr, expression_isRelationWhere as isRelationWhere, expression_isWildcard as isWildcard };
200
+ export { type expression_CustomElementExpr as CustomElementExpr, type expression_CustomRelationExpr as CustomRelationExpr, type expression_DirectRelationExpr as DirectRelationExpr, type expression_ElementExpression as ElementExpression, type expression_ElementKindExpr as ElementKindExpr, type expression_ElementPredicateExpression as ElementPredicateExpression, type expression_ElementRefExpr as ElementRefExpr, type expression_ElementTagExpr as ElementTagExpr, type expression_ElementWhereExpr as ElementWhereExpr, type expression_ExpandedElementExpr as ExpandedElementExpr, type expression_Expression as Expression, type expression_InOutExpr as InOutExpr, type expression_IncomingExpr as IncomingExpr, type expression_NonWilcard as NonWilcard, type expression_OutgoingExpr as OutgoingExpr, type expression_RelationExpression as RelationExpression, type expression_RelationPredicateExpression as RelationPredicateExpression, type expression_RelationWhereExpr as RelationWhereExpr, type expression_WildcardExpr as WildcardExpr, expression_isCustomElement as isCustomElement, expression_isCustomRelationExpr as isCustomRelationExpr, expression_isElement as isElement, expression_isElementKindExpr as isElementKindExpr, expression_isElementPredicateExpr as isElementPredicateExpr, expression_isElementRef as isElementRef, expression_isElementTagExpr as isElementTagExpr, expression_isElementWhere as isElementWhere, expression_isExpandedElementExpr as isExpandedElementExpr, expression_isInOut as isInOut, expression_isIncoming as isIncoming, expression_isOutgoing as isOutgoing, expression_isRelation as isRelation, expression_isRelationExpression as isRelationExpression, expression_isRelationPredicateExpr as isRelationPredicateExpr, expression_isRelationWhere as isRelationWhere, expression_isWildcard as isWildcard };
201
+ }
202
+
203
+ declare namespace FqnRef {
204
+ /**
205
+ * Represents a reference to an instance within a deployment.
206
+ *
207
+ * @template D - The type representing the deployment fqn. Defaults to `Fqn`.
208
+ * @template M - The type representing the model fqn. Defaults to `Fqn`.
209
+ *
210
+ * @property {D} deployment - TThe fully qualified name (FQN) of the deployed instance.
211
+ * @property {M} element - The element reference within the deployment.
212
+ */
213
+ type InsideInstanceRef<D = Fqn, M = Fqn> = {
214
+ deployment: D;
215
+ element: M;
216
+ };
217
+ const isInsideInstanceRef: (ref: FqnRef) => ref is InsideInstanceRef;
218
+ /**
219
+ * Represents a reference to a deployment element.
220
+ *
221
+ * @template F - The type of the fully qualified name (FQN) of the deployment element. Defaults to `Fqn`.
222
+ * @property {F} deployment - The fully qualified name (FQN) of the deployment element.
223
+ */
224
+ type DeploymentElementRef<F = Fqn> = {
225
+ deployment: F;
226
+ };
227
+ const isDeploymentElementRef: (ref: FqnRef) => ref is DeploymentElementRef;
228
+ type DeploymentRef<D = Fqn, M = Fqn> = DeploymentElementRef<D> | InsideInstanceRef<D, M>;
229
+ const isDeploymentRef: (ref: FqnRef) => ref is DeploymentRef;
230
+ /**
231
+ * Reference to logical model element
232
+ */
233
+ type ModelRef<F = Fqn> = {
234
+ model: F;
235
+ };
236
+ const isModelRef: (ref: FqnRef) => ref is ModelRef;
237
+ const toDeploymentRef: (ref: FqnRef) => DeploymentRef;
238
+ }
239
+ type FqnRef<D = Fqn, M = Fqn> = ExclusiveUnion<{
240
+ InsideInstanceRef: FqnRef.InsideInstanceRef<D, M>;
241
+ DeploymentRef: FqnRef.DeploymentRef<D>;
242
+ ModelRef: FqnRef.ModelRef<M>;
243
+ }>;
244
+ declare namespace FqnExpr {
245
+ type Wildcard = {
246
+ wildcard: true;
247
+ };
248
+ const isWildcard: (expr: ExpressionV2) => expr is Wildcard;
249
+ type ModelRef<M = Fqn> = {
250
+ ref: FqnRef.ModelRef<M>;
251
+ selector?: PredicateSelector;
252
+ };
253
+ const isModelRef: (ref: ExpressionV2) => ref is ModelRef;
254
+ type DeploymentRef<D = Fqn, M = Fqn> = {
255
+ ref: FqnRef.DeploymentRef<D> | FqnRef.InsideInstanceRef<D, M>;
256
+ selector?: PredicateSelector;
257
+ };
258
+ const isDeploymentRef: (ref: ExpressionV2) => ref is FqnExpr.DeploymentRef;
259
+ type NonWildcard<D = Fqn, M = Fqn> = ExclusiveUnion<{
260
+ ModelRef: ModelRef<M>;
261
+ DeploymentRef: DeploymentRef<D, M>;
262
+ }>;
263
+ }
264
+ type FqnExpr<D = Fqn, M = Fqn> = ExclusiveUnion<{
265
+ Wildcard: FqnExpr.Wildcard;
266
+ ModelRef: FqnExpr.ModelRef<M>;
267
+ DeploymentRef: FqnExpr.DeploymentRef<D, M>;
268
+ }>;
269
+ declare namespace RelationExpr {
270
+ type Direct<D = Fqn, M = Fqn> = {
271
+ source: FqnExpr<D, M>;
272
+ target: FqnExpr<D, M>;
273
+ isBidirectional?: boolean;
274
+ };
275
+ const isDirect: (expr: ExpressionV2) => expr is Direct;
276
+ type Incoming<D = Fqn, M = Fqn> = {
277
+ incoming: FqnExpr<D, M>;
278
+ };
279
+ const isIncoming: (expr: ExpressionV2) => expr is Incoming;
280
+ type Outgoing<D = Fqn, M = Fqn> = {
281
+ outgoing: FqnExpr<D, M>;
282
+ };
283
+ const isOutgoing: (expr: ExpressionV2) => expr is Outgoing;
284
+ type InOut<D = Fqn, M = Fqn> = {
285
+ inout: FqnExpr<D, M>;
286
+ };
287
+ const isInOut: (expr: ExpressionV2) => expr is InOut;
288
+ }
289
+ type RelationExpr<D = Fqn, M = Fqn> = ExclusiveUnion<{
290
+ Direct: RelationExpr.Direct<D, M>;
291
+ Incoming: RelationExpr.Incoming<D, M>;
292
+ Outgoing: RelationExpr.Outgoing<D, M>;
293
+ InOut: RelationExpr.InOut<D, M>;
294
+ }>;
295
+ /**
296
+ * Represents a version 2 expression which can be one of several types.
297
+ *
298
+ * @template D - The type for the deployment FQN, defaults to `Fqn`.
299
+ * @template M - The type for the model FQN, defaults to `Fqn`.
300
+ */
301
+ type ExpressionV2<D = Fqn, M = Fqn> = ExclusiveUnion<{
302
+ Wildcard: FqnExpr.Wildcard;
303
+ ModelRef: FqnExpr.ModelRef<M>;
304
+ DeploymentRef: FqnExpr.DeploymentRef<D, M>;
305
+ Direct: RelationExpr.Direct<D, M>;
306
+ Incoming: RelationExpr.Incoming<D, M>;
307
+ Outgoing: RelationExpr.Outgoing<D, M>;
308
+ InOut: RelationExpr.InOut<D, M>;
309
+ }>;
310
+ declare namespace ExpressionV2 {
311
+ const isFqnExpr: (expr: ExpressionV2) => expr is FqnExpr;
312
+ const isRelation: (expr: ExpressionV2) => expr is RelationExpr;
304
313
  }
305
314
 
306
315
  type GlobalPredicateId = Tagged<string, 'GlobalPredicateId'>;
@@ -309,9 +318,9 @@ type GlobalDynamicPredicates = NonEmptyArray<DynamicViewIncludeRule>;
309
318
  type GlobalStyleID = Tagged<string, 'GlobalStyleID'>;
310
319
  type GlobalStyles = NonEmptyTuple<ViewRuleStyle>;
311
320
  interface ModelGlobals {
312
- predicates: Record<GlobalPredicateId, GlobalPredicates>;
313
- dynamicPredicates: Record<GlobalPredicateId, GlobalDynamicPredicates>;
314
- styles: Record<GlobalStyleID, GlobalStyles>;
321
+ readonly predicates: Record<GlobalPredicateId, GlobalPredicates>;
322
+ readonly dynamicPredicates: Record<GlobalPredicateId, GlobalDynamicPredicates>;
323
+ readonly styles: Record<GlobalStyleID, GlobalStyles>;
315
324
  }
316
325
 
317
326
  type ElementNotation = {
@@ -441,14 +450,14 @@ type CustomColorDefinitions = {
441
450
  [key: string]: ThemeColorValues;
442
451
  };
443
452
  type DeploymentViewRulePredicate = {
444
- include: DeploymentExpression[];
453
+ include: ExpressionV2[];
445
454
  exclude?: never;
446
455
  } | {
447
456
  include?: never;
448
- exclude: DeploymentExpression[];
457
+ exclude: ExpressionV2[];
449
458
  };
450
459
  type DeploymentViewRuleStyle = {
451
- targets: DeploymentExpression[];
460
+ targets: FqnExpr[];
452
461
  notation?: string;
453
462
  style: ElementStyle & {
454
463
  color?: Color;
@@ -604,7 +613,7 @@ type BBox = {
604
613
  width: number;
605
614
  height: number;
606
615
  };
607
- declare function getBBoxCenter({ x, y, width, height }: BBox): XYPoint;
616
+ declare function getBBoxCenter({ x, y, width, height, }: BBox): XYPoint;
608
617
  interface DiagramNode extends ComputedNode {
609
618
  width: number;
610
619
  height: number;
@@ -662,28 +671,31 @@ type RelationId = Tagged<string, 'RelationID'>;
662
671
  type RelationshipKind<Kinds extends string = string> = Tagged<Kinds, 'RelationshipKind'>;
663
672
  type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
664
673
  type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
665
- declare const DefaultLineStyle = "dashed";
666
- declare const DefaultArrowType = "normal";
667
- declare const DefaultRelationshipColor = "gray";
668
- interface Relation {
674
+ declare const DefaultLineStyle: RelationshipLineType;
675
+ declare const DefaultArrowType: RelationshipArrowType;
676
+ declare const DefaultRelationshipColor: ThemeColor;
677
+ interface AbstractRelation {
669
678
  readonly id: RelationId;
670
- readonly source: Fqn;
671
- readonly target: Fqn;
672
- readonly title: string;
679
+ readonly title?: string;
673
680
  readonly description?: string;
674
681
  readonly technology?: string;
675
- readonly tags?: NonEmptyArray<Tag>;
682
+ readonly tags?: NonEmptyArray<Tag> | null;
676
683
  readonly kind?: RelationshipKind;
677
684
  readonly color?: Color;
678
685
  readonly line?: RelationshipLineType;
679
686
  readonly head?: RelationshipArrowType;
680
687
  readonly tail?: RelationshipArrowType;
681
- readonly links?: NonEmptyArray<Link>;
688
+ readonly links?: NonEmptyArray<Link> | null;
682
689
  readonly navigateTo?: ViewId;
683
690
  readonly metadata?: {
684
691
  [key: string]: string;
685
692
  };
686
693
  }
694
+ interface ModelRelation extends AbstractRelation {
695
+ readonly source: Fqn;
696
+ readonly target: Fqn;
697
+ readonly title: string;
698
+ }
687
699
  interface RelationshipKindSpecification {
688
700
  readonly technology?: string;
689
701
  readonly notation?: string;
@@ -694,7 +706,7 @@ interface RelationshipKindSpecification {
694
706
  }
695
707
 
696
708
  type DeploymentNodeKind<Kinds extends string = string> = Tagged<Kinds, 'DeploymentNodeKind'>;
697
- type PhysicalElementStyle = ElementStyle & {
709
+ type DeploymentElementStyle = ElementStyle & {
698
710
  readonly icon?: IconUrl;
699
711
  readonly shape?: ElementShape;
700
712
  readonly color?: Color;
@@ -702,7 +714,7 @@ type PhysicalElementStyle = ElementStyle & {
702
714
  interface DeploymentNodeKindSpecification {
703
715
  readonly technology?: string;
704
716
  readonly notation?: string;
705
- readonly style: PhysicalElementStyle;
717
+ readonly style: DeploymentElementStyle;
706
718
  }
707
719
  interface DeploymentNode {
708
720
  readonly id: Fqn;
@@ -712,7 +724,7 @@ interface DeploymentNode {
712
724
  readonly technology?: string | null;
713
725
  readonly tags?: NonEmptyArray<Tag> | null;
714
726
  readonly links?: NonEmptyArray<Link> | null;
715
- readonly style?: PhysicalElementStyle;
727
+ readonly style?: DeploymentElementStyle;
716
728
  readonly notation?: string;
717
729
  readonly metadata?: Record<string, string>;
718
730
  }
@@ -728,7 +740,7 @@ interface DeployedInstance {
728
740
  readonly technology?: string | null;
729
741
  readonly tags?: NonEmptyArray<Tag> | null;
730
742
  readonly links?: NonEmptyArray<Link> | null;
731
- readonly style?: PhysicalElementStyle;
743
+ readonly style?: DeploymentElementStyle;
732
744
  readonly notation?: string;
733
745
  readonly metadata?: Record<string, string>;
734
746
  }
@@ -737,6 +749,7 @@ declare namespace DeploymentElement {
737
749
  const isDeploymentNode: (el: DeploymentElement) => el is DeploymentNode;
738
750
  const isInstance: (el: DeploymentElement) => el is DeployedInstance;
739
751
  }
752
+ type PredicateSelector = 'children' | 'expanded' | 'descendants';
740
753
  interface DeploymentRef {
741
754
  readonly id: Fqn;
742
755
  readonly element?: Fqn;
@@ -744,89 +757,28 @@ interface DeploymentRef {
744
757
  /**
745
758
  * NOTE:
746
759
  */
747
- interface DeploymentRelation {
760
+ interface DeploymentRelation extends AbstractRelation {
748
761
  readonly id: RelationId;
749
762
  readonly source: DeploymentRef;
750
763
  readonly target: DeploymentRef;
751
- readonly title?: string;
752
- readonly tags?: NonEmptyArray<Tag> | null;
753
- readonly description?: string;
754
- readonly technology?: string;
755
- readonly kind?: RelationshipKind;
756
- readonly color?: Color;
757
- readonly line?: RelationshipLineType;
758
- readonly head?: RelationshipArrowType;
759
- readonly tail?: RelationshipArrowType;
760
- readonly links?: NonEmptyArray<Link> | null;
761
- readonly navigateTo?: ViewId;
762
- readonly metadata?: {
763
- [key: string]: string;
764
- };
765
- }
766
- type AllNever<Expressions> = UnionToIntersection<{
767
- [Name in keyof Expressions]: {
768
- -readonly [Key in keyof Expressions[Name]]?: never;
769
- };
770
- }[keyof Expressions]>;
771
- type ExclusiveUnion<Expressions> = Expressions extends object ? {
772
- [Name in keyof Expressions]: Simplify<Omit<AllNever<Expressions>, keyof Expressions[Name]> & Expressions[Name]>;
773
- }[keyof Expressions] : Expressions;
774
- declare namespace DeploymentRelationExpression {
775
- type Direct = {
776
- source: DeploymentElementExpression;
777
- target: DeploymentElementExpression;
778
- isBidirectional?: boolean;
779
- };
780
- const isDirect: (expr: DeploymentExpression) => expr is Direct;
781
- type Incoming = {
782
- incoming: DeploymentElementExpression;
783
- };
784
- const isIncoming: (expr: DeploymentExpression) => expr is Incoming;
785
- type Outgoing = {
786
- outgoing: DeploymentElementExpression;
787
- };
788
- const isOutgoing: (expr: DeploymentExpression) => expr is Outgoing;
789
- type InOut = {
790
- inout: DeploymentElementExpression;
791
- };
792
- const isInOut: (expr: DeploymentExpression) => expr is InOut;
793
- }
794
- type DeploymentRelationExpression = ExclusiveUnion<{
795
- Direct: DeploymentRelationExpression.Direct;
796
- Incoming: DeploymentRelationExpression.Incoming;
797
- Outgoing: DeploymentRelationExpression.Outgoing;
798
- InOut: DeploymentRelationExpression.InOut;
799
- }>;
800
- declare namespace DeploymentElementExpression {
801
- type Ref = {
802
- ref: DeploymentRef;
803
- selector?: 'children' | 'expanded' | 'descendants';
804
- };
805
- const isRef: (expr: DeploymentExpression) => expr is Ref;
806
- type Wildcard = {
807
- wildcard: true;
808
- };
809
- const isWildcard: (expr: DeploymentExpression) => expr is Wildcard;
810
- }
811
- type DeploymentElementExpression = ExclusiveUnion<{
812
- DeploymentRef: DeploymentElementExpression.Ref;
813
- Wildcard: DeploymentElementExpression.Wildcard;
814
- }>;
815
- type DeploymentExpression = ExclusiveUnion<{
816
- Element: DeploymentElementExpression;
817
- Relation: DeploymentRelationExpression;
818
- }>;
819
- declare namespace DeploymentExpression {
820
- type Element = DeploymentElementExpression;
821
- type Relation = DeploymentRelationExpression;
822
- const isElement: (expr: DeploymentExpression) => expr is DeploymentElementExpression;
823
- const isRelation: (expr: DeploymentExpression) => expr is DeploymentRelationExpression;
824
764
  }
825
765
 
826
766
  /**
827
- * Parsed elements, relations, and views.
767
+ * Represents a LikeC4 model with customizable type parameters,
768
+ * parsed from DSL or result from Builder
769
+ *
770
+ * !IMPORTANT: This is a low-level type, use `LikeC4Model` instead.
771
+ * !NOTE: Views are not computed yet.
772
+ *
773
+ * @typeParam ElementKinds - Types of elements in the model (defaults to string)
774
+ * @typeParam RelationKinds - Types of relationships (defaults to string)
775
+ * @typeParam Tags - Types of tags that can be applied (defaults to string)
776
+ * @typeParam Fqns - Fully Qualified Names for elements (defaults to string)
777
+ * @typeParam Views - Types of views in the model (defaults to string)
778
+ * @typeParam DeploymentFqns - Fully Qualified Names for deployment nodes (defaults to string)
828
779
  */
829
780
  interface ParsedLikeC4Model<ElementKinds extends string = string, RelationKinds extends string = string, Tags extends string = string, Fqns extends string = string, Views extends string = string, DeploymentFqns extends string = string> {
781
+ __?: never;
830
782
  specification: {
831
783
  tags: Tag<Tags>[];
832
784
  elements: Record<ElementKinds, ElementKindSpecification>;
@@ -834,7 +786,7 @@ interface ParsedLikeC4Model<ElementKinds extends string = string, RelationKinds
834
786
  relationships: Record<RelationKinds, RelationshipKindSpecification>;
835
787
  };
836
788
  elements: Record<Fqns, TypedElement<Fqns, ElementKinds, Tags>>;
837
- relations: Record<RelationId, Relation>;
789
+ relations: Record<RelationId, ModelRelation>;
838
790
  globals: ModelGlobals;
839
791
  views: Record<Views, LikeC4View<Views, Tags>>;
840
792
  /**
@@ -845,10 +797,11 @@ interface ParsedLikeC4Model<ElementKinds extends string = string, RelationKinds
845
797
  relations: Record<RelationId, DeploymentRelation>;
846
798
  };
847
799
  }
800
+ type AnyParsedLikeC4Model = ParsedLikeC4Model<any, any, any, any, any, any>;
848
801
  /**
849
802
  * Hook to get types from dump
850
803
  */
851
- type ParsedLikeC4ModelDump = {
804
+ type LikeC4ModelDump = {
852
805
  elements: {
853
806
  [kind: string]: object;
854
807
  };
@@ -861,23 +814,19 @@ type ParsedLikeC4ModelDump = {
861
814
  [kind: string]: object;
862
815
  };
863
816
  };
864
- interface AnyLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string, T = 'computed' | 'layouted'> extends Omit<ParsedLikeC4Model<string, string, Tags, Fqns, Views, DeploymentFqns>, 'views'> {
865
- __?: T;
866
- views: Record<Views, ComputedView | DiagramView>;
867
- }
868
817
  /**
869
- * Same as `ParsedLikeC4Model` but with computed views.
818
+ * Same as {@link ParsedLikeC4Model}, but with computed views or layouted views.
870
819
  */
871
- interface ComputedLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string> extends Omit<AnyLikeC4Model<Fqns, DeploymentFqns, Views, Tags, 'computed'>, 'views'> {
872
- views: Record<Views, ComputedView>;
820
+ interface GenericLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string, T = 'computed' | 'layouted'> extends Omit<ParsedLikeC4Model<string, string, Tags, Fqns, Views, DeploymentFqns>, 'views' | '__'> {
821
+ __?: T;
822
+ views: Record<Views, ComputedView<Views> | DiagramView<Views>>;
873
823
  }
874
- type ComputedLikeC4ModelFromParsed<M> = M extends ParsedLikeC4Model ? ComputedLikeC4Model<KeysOf<M['elements']>, KeysOf<M['deployments']['elements']>, KeysOf<M['views']>> : ComputedLikeC4Model;
875
- /**
876
- * Same as `ParsedLikeC4Model` but with layouted views (DiagramView)
877
- */
878
- interface LayoutedLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string> extends Omit<AnyLikeC4Model<Fqns, DeploymentFqns, Views, Tags, 'layouted'>, 'views'> {
824
+ interface ComputedLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string> extends Omit<GenericLikeC4Model<Fqns, DeploymentFqns, Views, Tags, 'computed'>, 'views'> {
825
+ views: Record<Views, ComputedView<Views>>;
826
+ }
827
+ interface LayoutedLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string> extends Omit<GenericLikeC4Model<Fqns, DeploymentFqns, Views, Tags, 'layouted'>, 'views'> {
879
828
  __: 'layouted';
880
829
  views: Record<Views, DiagramView<Views, Tags>>;
881
830
  }
882
831
 
883
- export { type TypedElement as $, type AutoLayoutDirection as A, type BorderStyle as B, type ComputedLikeC4ModelFromParsed as C, type DeploymentNodeKindSpecification as D, type Element as E, type Fqn as F, AsFqn as G, type HexColorLiteral as H, type IconUrl as I, BorderStyles as J, type KeysOf as K, type LikeC4View as L, type ModelGlobals as M, type NonEmptyArray as N, ElementKind as O, type ParsedLikeC4Model as P, ElementShapes as Q, type Relation as R, DefaultThemeColor as S, type ThemeColorValues as T, DefaultElementShape as U, type ViewRuleStyle as V, type ElementStyle as W, type XYPoint as X, type Tag as Y, type TagSpec as Z, type Link as _, ComputedView as a, type ElementThemeColors as a$, type ElementKindSpecificationStyle as a0, type ElementRefExpr as a1, isElementRef as a2, type ExpandedElementExpr as a3, isExpandedElementExpr as a4, isCustomElement as a5, type WildcardExpr as a6, isWildcard as a7, type ElementKindExpr as a8, isElementKindExpr as a9, type GlobalStyleID as aA, type GlobalStyles as aB, type ParsedLikeC4ModelDump as aC, type AnyLikeC4Model as aD, type LayoutedLikeC4Model as aE, type EqualOperator as aF, type TagEqual as aG, isTagEqual as aH, type KindEqual as aI, isKindEqual as aJ, type NotOperator as aK, isNotOperator as aL, type AndOperator as aM, isAndOperator as aN, type OrOperator as aO, isOrOperator as aP, type WhereOperator as aQ, type Filterable as aR, whereOperatorAsPredicate as aS, type RelationshipKind as aT, DefaultLineStyle as aU, DefaultArrowType as aV, DefaultRelationshipColor as aW, type ThemeColor as aX, type ColorLiteral as aY, isThemeColor as aZ, type ElementThemeColorValues as a_, type ElementTagExpr as aa, isElementTagExpr as ab, type ElementExpression as ac, isElement as ad, type ElementWhereExpr as ae, isElementWhere as af, type ElementPredicateExpression as ag, isElementPredicateExpr as ah, type RelationExpr as ai, isRelation as aj, type InOutExpr as ak, isInOut as al, type IncomingExpr as am, isIncoming as an, type OutgoingExpr as ao, isOutgoing as ap, type RelationExpression as aq, isRelationExpression as ar, type RelationWhereExpr as as, isRelationWhere as at, isCustomRelationExpr as au, type RelationPredicateExpression as av, isRelationPredicateExpr as aw, type GlobalPredicateId as ax, type GlobalPredicates as ay, type GlobalDynamicPredicates as az, type RelationId as b, type RelationshipThemeColorValues as b0, type RelationshipThemeColors as b1, type LikeC4Theme as b2, type ViewId as b3, type ViewRulePredicate as b4, isViewRulePredicate as b5, type ViewRuleGlobalPredicateRef as b6, isViewRuleGlobalPredicateRef as b7, isViewRuleStyle as b8, type ViewRuleGlobalStyle as b9, isDynamicView as bA, isElementView as bB, isExtendsElementView as bC, isScopedElementView as bD, type NodeId as bE, type EdgeId as bF, type StepEdgeIdLiteral as bG, type StepEdgeId as bH, stepEdgeId as bI, isStepEdgeId as bJ, extractStep as bK, getParallelStepsPrefix as bL, ComputedNode as bM, type ComputedEdge as bN, type ViewWithHash as bO, type ViewWithNotation as bP, type ViewAutoLayout as bQ, type ComputedElementView as bR, type ComputedDynamicView as bS, type ComputedDeploymentView as bT, type BBox as bU, getBBoxCenter as bV, DiagramNode as bW, type DiagramEdge as bX, type DiagramView as bY, type ViewManualLayout as bZ, type ElementNotation as b_, isViewRuleGlobalStyle as ba, type ViewRuleStyleOrGlobalRef as bb, isAutoLayoutDirection as bc, type ViewRuleAutoLayout as bd, isViewRuleAutoLayout as be, type ViewRuleGroup as bf, isViewRuleGroup as bg, type ViewRule as bh, type BasicView as bi, type BasicElementView as bj, type ScopedElementView as bk, type ExtendsElementView as bl, type ElementView as bm, type DynamicViewStep as bn, type DynamicViewParallelSteps as bo, type DynamicViewStepOrParallel as bp, type DynamicViewIncludeRule as bq, type DynamicViewRule as br, type DynamicView as bs, isDynamicViewParallelSteps as bt, type CustomColorDefinitions as bu, type DeploymentViewRulePredicate as bv, type DeploymentViewRuleStyle as bw, type DeploymentViewRule as bx, type DeploymentView as by, isDeploymentView as bz, type ComputedLikeC4Model as c, type ElementKindSpecification as d, type RelationshipKindSpecification as e, type ElementShape as f, type Color as g, type RelationshipArrowType as h, type RelationshipLineType as i, DeploymentElement as j, type DeploymentRelation as k, type Expression as l, type CustomElementExpr as m, type CustomRelationExpr as n, DeploymentExpression as o, expression as p, type NonEmptyReadonlyArray as q, type CustomColor as r, type Point as s, type DeploymentNodeKind as t, type PhysicalElementStyle as u, type DeploymentNode as v, type DeployedInstance as w, type DeploymentRef as x, DeploymentRelationExpression as y, DeploymentElementExpression as z };
832
+ export { type GlobalDynamicPredicates as $, type CustomElementExpr as A, type CustomRelationExpr as B, ComputedView as C, DeploymentElement as D, type DirectRelationExpr as E, type ElementExpression as F, type ElementKindExpr as G, type ElementPredicateExpression as H, type ElementRefExpr as I, type ElementTagExpr as J, type ElementWhereExpr as K, type LikeC4View as L, type ExpandedElementExpr as M, type Expression as N, type IncomingExpr as O, type PredicateSelector as P, type InOutExpr as Q, type NonWilcard as R, type OutgoingExpr as S, type RelationExpression as T, type RelationPredicateExpression as U, type RelationWhereExpr as V, type WildcardExpr as W, ExpressionV2 as X, FqnExpr as Y, FqnRef as Z, RelationExpr as _, type ComputedLikeC4Model as a, type DeploymentView as a$, type GlobalPredicateId as a0, type GlobalPredicates as a1, type GlobalStyleID as a2, type GlobalStyles as a3, type ModelGlobals as a4, type AnyParsedLikeC4Model as a5, type GenericLikeC4Model as a6, type LayoutedLikeC4Model as a7, type LikeC4ModelDump as a8, type ParsedLikeC4Model as a9, extractStep as aA, getBBoxCenter as aB, getParallelStepsPrefix as aC, isAutoLayoutDirection as aD, isDeploymentView as aE, isDynamicView as aF, isDynamicViewParallelSteps as aG, isElementView as aH, isExtendsElementView as aI, isScopedElementView as aJ, isStepEdgeId as aK, isViewRuleAutoLayout as aL, isViewRuleGlobalPredicateRef as aM, isViewRuleGlobalStyle as aN, isViewRuleGroup as aO, isViewRulePredicate as aP, isViewRuleStyle as aQ, stepEdgeId as aR, type AutoLayoutDirection as aS, type BasicElementView as aT, type BasicView as aU, type BBox as aV, type ComputedDeploymentView as aW, type ComputedDynamicView as aX, type ComputedEdge as aY, type ComputedElementView as aZ, type CustomColorDefinitions as a_, isAndOperator as aa, isKindEqual as ab, isNotOperator as ac, isOrOperator as ad, isTagEqual as ae, whereOperatorAsPredicate as af, type AndOperator as ag, type EqualOperator as ah, type Filterable as ai, type KindEqual as aj, type NotOperator as ak, type OrOperator as al, type TagEqual as am, type WhereOperator as an, DefaultArrowType as ao, DefaultLineStyle as ap, DefaultRelationshipColor as aq, type AbstractRelation as ar, type ModelRelation as as, type RelationId as at, type RelationshipArrowType as au, type RelationshipKind as av, type RelationshipKindSpecification as aw, type RelationshipLineType as ax, ComputedNode as ay, DiagramNode as az, type DeployedInstance as b, type DeploymentViewRule as b0, type DeploymentViewRulePredicate as b1, type DeploymentViewRuleStyle as b2, type DiagramEdge as b3, type DiagramView as b4, type DynamicView as b5, type DynamicViewIncludeRule as b6, type DynamicViewParallelSteps as b7, type DynamicViewRule as b8, type DynamicViewStep as b9, type DynamicViewStepOrParallel as ba, type EdgeId as bb, type ElementView as bc, type ExtendsElementView as bd, type NodeId as be, type ScopedElementView as bf, type StepEdgeId as bg, type StepEdgeIdLiteral as bh, type ViewAutoLayout as bi, type ViewId as bj, type ViewManualLayout as bk, type ViewRule as bl, type ViewRuleAutoLayout as bm, type ViewRuleGlobalPredicateRef as bn, type ViewRuleGlobalStyle as bo, type ViewRuleGroup as bp, type ViewRulePredicate as bq, type ViewRuleStyle as br, type ViewRuleStyleOrGlobalRef as bs, type ViewWithHash as bt, type ViewWithNotation as bu, type ElementNotation as bv, type DeploymentElementStyle as c, type DeploymentNode as d, expression as e, type DeploymentNodeKind as f, type DeploymentNodeKindSpecification as g, type DeploymentRef as h, type DeploymentRelation as i, isCustomElement as j, isCustomRelationExpr as k, isElement as l, isElementKindExpr as m, isElementPredicateExpr as n, isElementRef as o, isElementTagExpr as p, isElementWhere as q, isExpandedElementExpr as r, isIncoming as s, isInOut as t, isOutgoing as u, isRelation as v, isRelationExpression as w, isRelationPredicateExpr as x, isRelationWhere as y, isWildcard as z };