@likec4/core 1.41.0 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/builder/package.json +4 -0
  2. package/compute-view/package.json +4 -0
  3. package/compute-view/relationships/package.json +4 -0
  4. package/dist/builder/index.d.mts +13 -11
  5. package/dist/builder/index.mjs +111 -91
  6. package/dist/compute-view/index.d.mts +8 -7
  7. package/dist/compute-view/index.mjs +14 -11
  8. package/dist/compute-view/relationships-view/index.d.mts +9 -8
  9. package/dist/compute-view/relationships-view/index.mjs +6 -6
  10. package/dist/index.d.mts +7 -7
  11. package/dist/index.mjs +11 -11
  12. package/dist/model/connection/deployment/index.d.mts +11 -10
  13. package/dist/model/connection/deployment/index.mjs +2 -2
  14. package/dist/model/connection/index.d.mts +12 -11
  15. package/dist/model/connection/index.mjs +3 -3
  16. package/dist/model/connection/model/index.d.mts +11 -10
  17. package/dist/model/connection/model/index.mjs +2 -2
  18. package/dist/model/index.d.mts +14 -14
  19. package/dist/model/index.mjs +4 -5
  20. package/dist/shared/{core.Ae86Y3tB.mjs → core.01VTr9qu.mjs} +8 -26
  21. package/dist/shared/core.1vX5a9AY.mjs +86 -0
  22. package/dist/shared/{core.BVNaR17u.mjs → core.B7KhhkRY.mjs} +1 -1
  23. package/dist/shared/core.B85MJLTf.mjs +5 -0
  24. package/dist/shared/{core.DA5vzwZ9.mjs → core.BIqHjQiH.mjs} +56 -42
  25. package/dist/shared/core.BKlholso.mjs +3 -0
  26. package/dist/shared/core.BR4zXDH-.mjs +13 -0
  27. package/dist/shared/{core.CXy1NLUG.mjs → core.BYNkXQ8A.mjs} +21 -12
  28. package/dist/shared/{core.BuoXfSMj.mjs → core.BbE4y-yl.mjs} +1 -1
  29. package/dist/shared/core.BoYfZOBm.mjs +3 -0
  30. package/dist/shared/core.BsSXS-_R.mjs +7 -0
  31. package/dist/shared/{core.DJp8fgok.mjs → core.BzTakU3I.mjs} +14 -10
  32. package/dist/shared/{core.4u1dVmfX.mjs → core.C2TiyjI6.mjs} +2 -2
  33. package/dist/shared/{core.DLpidoWc.mjs → core.C3JowhaZ.mjs} +3 -3
  34. package/dist/shared/{core.CNGyqkJh.mjs → core.C4x8aaWa.mjs} +3 -1
  35. package/dist/shared/{core.BB6zA-UU.mjs → core.C8YY6Uub.mjs} +38 -9
  36. package/dist/shared/{core.Asc11Mjy.mjs → core.C8sl5Y8Z.mjs} +122 -58
  37. package/dist/shared/{core.BvMRMo7Z.mjs → core.CNgZvKb8.mjs} +3 -5198
  38. package/dist/shared/{core.CUG6vpyL.d.mts → core.CQngdcuj.d.mts} +85 -4
  39. package/dist/shared/{core.Be1n9a0i.mjs → core.C_Ni6yHl.mjs} +5 -4
  40. package/dist/shared/core.CbT8JVYL.mjs +5 -0
  41. package/dist/shared/core.CqAJJpK_.mjs +3 -0
  42. package/dist/shared/{core.BXsxn-hf.d.mts → core.D0PjZzIS.d.mts} +27 -15
  43. package/dist/shared/{core.DgesAwC8.d.mts → core.D5fzJWbF.d.mts} +2 -2
  44. package/dist/shared/{core.hfOE3RfK.d.mts → core.DACpKp35.d.mts} +5 -5
  45. package/dist/shared/core.DFi2dOTl.mjs +39548 -0
  46. package/dist/shared/{core.xSQO0XYD.d.mts → core.DIol3syK.d.mts} +2 -2
  47. package/dist/shared/{core.DlG1xWt2.mjs → core.DMMOWQqc.mjs} +3 -2
  48. package/dist/shared/core.DNbUPnve.mjs +3990 -0
  49. package/dist/shared/{core.CCD1ID81.mjs → core.DRJma0Ol.mjs} +4 -3
  50. package/dist/shared/{core.DgttqsJc.mjs → core.DRhg-gVU.mjs} +9 -9
  51. package/dist/shared/core.DSO_rTC2.mjs +5322 -0
  52. package/dist/shared/{core.FUPplpae.d.mts → core.D_vkffV4.d.mts} +4 -2
  53. package/dist/shared/core.DdMJk7nx.d.mts +476 -0
  54. package/dist/shared/{core.BhpgpOep.d.mts → core.Dgs6-nuz.d.mts} +2 -2
  55. package/dist/shared/{core.Be4Jy9Qx.mjs → core.FZ305VYd.mjs} +2 -2
  56. package/dist/shared/core.OHD4KXm9.mjs +5 -0
  57. package/dist/shared/{core.GTgsmXS_.mjs → core.QJD_fcrc.mjs} +2 -2
  58. package/dist/shared/core.RfnaEmgA.mjs +7 -0
  59. package/dist/shared/core.fHR_8Tnq.d.mts +450 -0
  60. package/dist/shared/{core.D0EgVMQK.mjs → core.lRvxPoao.mjs} +14 -12
  61. package/dist/shared/{core.CaT0SUUK.mjs → core.rCeaAqgW.mjs} +1 -84
  62. package/dist/shared/{core.zxTBF_PD.d.mts → core.s9uwOt60.d.mts} +4 -4
  63. package/dist/shared/core.yna0OdV5.d.mts +98 -0
  64. package/dist/styles/index.d.mts +106 -0
  65. package/dist/styles/index.mjs +1 -0
  66. package/dist/types/_aux.d.mts +2 -2
  67. package/dist/types/expression-model.d.mts +3 -4
  68. package/dist/types/expression.d.mts +3 -4
  69. package/dist/types/fqnRef.d.mts +2 -2
  70. package/dist/types/fqnRef.mjs +3 -3
  71. package/dist/types/index.d.mts +8 -8
  72. package/dist/types/index.mjs +150 -5
  73. package/dist/types/scalar.mjs +3 -2
  74. package/dist/utils/graphology/index.d.mts +1864 -0
  75. package/dist/utils/graphology/index.mjs +1 -0
  76. package/dist/utils/index.d.mts +11 -6
  77. package/dist/utils/index.mjs +21 -37
  78. package/dist/utils/iterable/index.d.mts +1 -1
  79. package/dist/utils/iterable/index.mjs +45 -7
  80. package/model/package.json +4 -0
  81. package/package.json +42 -24
  82. package/styles/package.json +4 -0
  83. package/types/package.json +4 -0
  84. package/utils/graphology/package.json +4 -0
  85. package/utils/package.json +4 -0
  86. package/dist/shared/core.6_Vp2iiN.mjs +0 -172
  87. package/dist/shared/core.CUw_2J9j.mjs +0 -47
  88. package/dist/shared/core.CzdwsPmY.d.mts +0 -69
  89. package/dist/shared/core.D-ZGWDDt.d.mts +0 -831
  90. package/dist/shared/core.DoM6aM9N.mjs +0 -7
  91. package/dist/shared/core.ILwny7BV.mjs +0 -38
  92. package/dist/theme/index.d.mts +0 -11
  93. package/dist/theme/index.mjs +0 -232
  94. package/src/builder/Builder.deployment.ts +0 -224
  95. package/src/builder/Builder.deploymentModel.ts +0 -449
  96. package/src/builder/Builder.element.ts +0 -241
  97. package/src/builder/Builder.model.ts +0 -494
  98. package/src/builder/Builder.ts +0 -946
  99. package/src/builder/Builder.view-common.ts +0 -273
  100. package/src/builder/Builder.view-deployment.ts +0 -135
  101. package/src/builder/Builder.view-element.ts +0 -202
  102. package/src/builder/Builder.views.ts +0 -399
  103. package/src/builder/Builder.with.ts +0 -156
  104. package/src/builder/_types.ts +0 -324
  105. package/src/builder/index.ts +0 -11
  106. package/src/compute-view/compute-view.ts +0 -80
  107. package/src/compute-view/deployment-view/_types.ts +0 -38
  108. package/src/compute-view/deployment-view/clean-connections.ts +0 -236
  109. package/src/compute-view/deployment-view/compute.ts +0 -94
  110. package/src/compute-view/deployment-view/memory/index.ts +0 -9
  111. package/src/compute-view/deployment-view/memory/memory.ts +0 -96
  112. package/src/compute-view/deployment-view/predicates/deploymentRefs-where.ts +0 -18
  113. package/src/compute-view/deployment-view/predicates/deploymentRefs.ts +0 -154
  114. package/src/compute-view/deployment-view/predicates/index.ts +0 -8
  115. package/src/compute-view/deployment-view/predicates/relation-direct.ts +0 -243
  116. package/src/compute-view/deployment-view/predicates/relation-in-out.ts +0 -70
  117. package/src/compute-view/deployment-view/predicates/relation-incoming.ts +0 -101
  118. package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +0 -95
  119. package/src/compute-view/deployment-view/predicates/relation-where.ts +0 -18
  120. package/src/compute-view/deployment-view/predicates/utils.ts +0 -282
  121. package/src/compute-view/deployment-view/predicates/wildcard.ts +0 -41
  122. package/src/compute-view/deployment-view/stages/stage-exclude.ts +0 -5
  123. package/src/compute-view/deployment-view/stages/stage-final.ts +0 -245
  124. package/src/compute-view/deployment-view/stages/stage-include.ts +0 -95
  125. package/src/compute-view/deployment-view/utils.ts +0 -297
  126. package/src/compute-view/dynamic-view/compute.ts +0 -312
  127. package/src/compute-view/element-view/_types.ts +0 -47
  128. package/src/compute-view/element-view/clean-connections.ts +0 -117
  129. package/src/compute-view/element-view/compute.ts +0 -324
  130. package/src/compute-view/element-view/memory/NodeGroup.ts +0 -31
  131. package/src/compute-view/element-view/memory/index.ts +0 -10
  132. package/src/compute-view/element-view/memory/memory.ts +0 -178
  133. package/src/compute-view/element-view/memory/stage-exclude.ts +0 -59
  134. package/src/compute-view/element-view/memory/stage-final.ts +0 -129
  135. package/src/compute-view/element-view/memory/stage-include.ts +0 -130
  136. package/src/compute-view/element-view/predicates/_utils.ts +0 -91
  137. package/src/compute-view/element-view/predicates/element-expand.ts +0 -29
  138. package/src/compute-view/element-view/predicates/element-kind-tag.ts +0 -27
  139. package/src/compute-view/element-view/predicates/element-ref.ts +0 -24
  140. package/src/compute-view/element-view/predicates/relation-direct.ts +0 -321
  141. package/src/compute-view/element-view/predicates/relation-in-out.ts +0 -64
  142. package/src/compute-view/element-view/predicates/relation-in.ts +0 -115
  143. package/src/compute-view/element-view/predicates/relation-out.ts +0 -119
  144. package/src/compute-view/element-view/predicates/wildcard.ts +0 -88
  145. package/src/compute-view/element-view/utils.ts +0 -65
  146. package/src/compute-view/index.ts +0 -4
  147. package/src/compute-view/memory/AbstractMemory.ts +0 -45
  148. package/src/compute-view/memory/AbstractStageExclude.ts +0 -215
  149. package/src/compute-view/memory/AbstractStageInclude.ts +0 -200
  150. package/src/compute-view/memory/_types.ts +0 -148
  151. package/src/compute-view/memory/index.ts +0 -5
  152. package/src/compute-view/memory/ops.ts +0 -43
  153. package/src/compute-view/relationships-view/_types.ts +0 -16
  154. package/src/compute-view/relationships-view/compute.ts +0 -159
  155. package/src/compute-view/relationships-view/index.ts +0 -3
  156. package/src/compute-view/relationships-view/layout.ts +0 -358
  157. package/src/compute-view/relationships-view/utils.ts +0 -73
  158. package/src/compute-view/utils/ancestorsOfNode.ts +0 -19
  159. package/src/compute-view/utils/applyCustomElementProperties.ts +0 -107
  160. package/src/compute-view/utils/applyCustomRelationProperties.ts +0 -58
  161. package/src/compute-view/utils/applyViewRuleStyles.ts +0 -73
  162. package/src/compute-view/utils/buildComputedNodes.ts +0 -166
  163. package/src/compute-view/utils/buildElementNotations.ts +0 -64
  164. package/src/compute-view/utils/elementExpressionToPredicate.ts +0 -50
  165. package/src/compute-view/utils/link-nodes-with-edges.ts +0 -56
  166. package/src/compute-view/utils/merge-props-from-relationships.ts +0 -161
  167. package/src/compute-view/utils/relationExpressionToPredicates.ts +0 -55
  168. package/src/compute-view/utils/resolve-extended-views.ts +0 -85
  169. package/src/compute-view/utils/resolve-global-rules.ts +0 -88
  170. package/src/compute-view/utils/topological-sort.ts +0 -256
  171. package/src/compute-view/utils/view-hash.ts +0 -45
  172. package/src/compute-view/utils/with-readable-edges.ts +0 -40
  173. package/src/index.ts +0 -32
  174. package/src/model/DeploymentElementModel.ts +0 -712
  175. package/src/model/DeploymentModel.ts +0 -393
  176. package/src/model/ElementModel.ts +0 -316
  177. package/src/model/LikeC4Model.ts +0 -882
  178. package/src/model/RelationModel.ts +0 -152
  179. package/src/model/connection/Connection.ts +0 -72
  180. package/src/model/connection/deployment/DeploymentConnectionModel.ts +0 -185
  181. package/src/model/connection/deployment/find.ts +0 -120
  182. package/src/model/connection/deployment/index.ts +0 -8
  183. package/src/model/connection/index.ts +0 -22
  184. package/src/model/connection/model/ConnectionModel.ts +0 -158
  185. package/src/model/connection/model/find.ts +0 -117
  186. package/src/model/connection/model/index.ts +0 -8
  187. package/src/model/connection/ops.ts +0 -276
  188. package/src/model/guards.ts +0 -77
  189. package/src/model/index.ts +0 -72
  190. package/src/model/types.ts +0 -67
  191. package/src/model/utils.ts +0 -66
  192. package/src/model/view/EdgeModel.ts +0 -121
  193. package/src/model/view/LikeC4ViewModel.ts +0 -361
  194. package/src/model/view/LikeC4ViewsFolder.ts +0 -151
  195. package/src/model/view/NodeModel.ts +0 -247
  196. package/src/theme/element.ts +0 -61
  197. package/src/theme/index.ts +0 -127
  198. package/src/theme/relationships.ts +0 -54
  199. package/src/types/RichText.ts +0 -205
  200. package/src/types/_aux.ts +0 -317
  201. package/src/types/_common.ts +0 -102
  202. package/src/types/const.ts +0 -34
  203. package/src/types/expression-model.ts +0 -294
  204. package/src/types/expression.ts +0 -313
  205. package/src/types/fqnRef.ts +0 -91
  206. package/src/types/geometry.ts +0 -159
  207. package/src/types/global.ts +0 -21
  208. package/src/types/index.ts +0 -44
  209. package/src/types/model-data.ts +0 -77
  210. package/src/types/model-deployment.ts +0 -78
  211. package/src/types/model-dump.ts +0 -79
  212. package/src/types/model-logical.ts +0 -126
  213. package/src/types/model-spec.ts +0 -88
  214. package/src/types/operators.ts +0 -156
  215. package/src/types/project.ts +0 -14
  216. package/src/types/scalar.ts +0 -162
  217. package/src/types/styles.ts +0 -122
  218. package/src/types/view-changes.ts +0 -32
  219. package/src/types/view-common.ts +0 -157
  220. package/src/types/view-computed.ts +0 -126
  221. package/src/types/view-layouted.ts +0 -94
  222. package/src/types/view-parsed.deployment.ts +0 -39
  223. package/src/types/view-parsed.dynamic.ts +0 -89
  224. package/src/types/view-parsed.element.ts +0 -65
  225. package/src/types/view.ts +0 -113
  226. package/src/utils/common-head.ts +0 -22
  227. package/src/utils/compare-natural.ts +0 -60
  228. package/src/utils/const.ts +0 -1
  229. package/src/utils/fqn.ts +0 -302
  230. package/src/utils/getOrCreate.ts +0 -8
  231. package/src/utils/guards.ts +0 -9
  232. package/src/utils/index.ts +0 -68
  233. package/src/utils/invariant.ts +0 -29
  234. package/src/utils/iterable/_types.ts +0 -5
  235. package/src/utils/iterable/filter.ts +0 -55
  236. package/src/utils/iterable/find.ts +0 -38
  237. package/src/utils/iterable/first.ts +0 -48
  238. package/src/utils/iterable/flat.ts +0 -17
  239. package/src/utils/iterable/head.ts +0 -22
  240. package/src/utils/iterable/index.ts +0 -15
  241. package/src/utils/iterable/map.ts +0 -40
  242. package/src/utils/iterable/reduce.ts +0 -24
  243. package/src/utils/iterable/some.ts +0 -36
  244. package/src/utils/iterable/to.ts +0 -19
  245. package/src/utils/iterable/unique.ts +0 -23
  246. package/src/utils/markdown/index.ts +0 -2
  247. package/src/utils/markdown/to-html.ts +0 -32
  248. package/src/utils/markdown/to-text.ts +0 -14
  249. package/src/utils/memoize-prop.ts +0 -30
  250. package/src/utils/mnemonist.ts +0 -9
  251. package/src/utils/object-hash.ts +0 -14
  252. package/src/utils/promises.ts +0 -24
  253. package/src/utils/relations.ts +0 -36
  254. package/src/utils/set.ts +0 -83
  255. package/src/utils/string-hash.ts +0 -16
@@ -1,8 +1,89 @@
1
- import { A as Any, T as Tag, l as AllKinds, m as Tags, h as StrictViewId, j as ElementKind } from './core.BhpgpOep.mjs';
2
- import { N as NonEmptyArray, E as ExclusiveUnion } from './core.DgesAwC8.mjs';
1
+ import { TupleToUnion, Tagged } from 'type-fest';
2
+ import { A as Any, T as Tag, l as AllKinds, m as Tags, h as StrictViewId, j as ElementKind } from './core.Dgs6-nuz.mjs';
3
+ import { N as NonEmptyArray, E as ExclusiveUnion } from './core.D5fzJWbF.mjs';
3
4
  import { FqnRef } from '../types/fqnRef.mjs';
4
5
  import { M as MarkdownOrString, I as Icon } from './core.DX-WYEPA.mjs';
5
- import { i as Color, R as RelationshipLineType, f as RelationshipArrowType, c as ElementShape, b as BorderStyle, a as ShapeSize } from './core.CzdwsPmY.mjs';
6
+
7
+ /**
8
+ * For padding, margin, etc.
9
+ */
10
+ declare const Sizes: readonly ["xs", "sm", "md", "lg", "xl"];
11
+ type Size = TupleToUnion<typeof Sizes>;
12
+ type TextSize = Size;
13
+ type ShapeSize = Size;
14
+ type SpacingSize = Size;
15
+ declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
16
+ type BorderStyle = TupleToUnion<typeof BorderStyles>;
17
+ declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
18
+ type ElementShape = TupleToUnion<typeof ElementShapes>;
19
+ type HexColor = `#${string}`;
20
+ type ColorLiteral = HexColor | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})`;
21
+ type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
22
+ declare const RelationshipArrowTypes: readonly ["none", "normal", "onormal", "dot", "odot", "diamond", "odiamond", "crow", "open", "vee"];
23
+ type RelationshipArrowType = TupleToUnion<typeof RelationshipArrowTypes>;
24
+ declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
25
+ type ThemeColor = typeof ThemeColors[number];
26
+ declare function isThemeColor(color: string): color is ThemeColor;
27
+ type CustomColorDefinitions = {
28
+ [key: string]: ThemeColorValues;
29
+ };
30
+ type CustomColor = Tagged<string, 'CustomColor'>;
31
+ declare function isCustomColor(color: string): color is CustomColor;
32
+ type Color = ThemeColor | CustomColor;
33
+ interface ElementColorValues {
34
+ readonly fill: ColorLiteral;
35
+ readonly stroke: ColorLiteral;
36
+ readonly hiContrast: ColorLiteral;
37
+ readonly loContrast: ColorLiteral;
38
+ }
39
+ interface RelationshipColorValues {
40
+ readonly line: ColorLiteral;
41
+ readonly labelBg: ColorLiteral;
42
+ readonly label: ColorLiteral;
43
+ }
44
+ interface ThemeColorValues {
45
+ readonly elements: ElementColorValues;
46
+ readonly relationships: RelationshipColorValues;
47
+ }
48
+ /**
49
+ * Default style values for elements, groups and relationships
50
+ */
51
+ interface LikeC4StyleDefaults {
52
+ readonly color: ThemeColor;
53
+ readonly size: ShapeSize;
54
+ readonly shape: ElementShape;
55
+ readonly opacity?: number;
56
+ readonly border?: BorderStyle;
57
+ readonly padding?: SpacingSize;
58
+ readonly text?: TextSize;
59
+ /**
60
+ * Default style values for groups
61
+ * If not specified, the default values for elements are used
62
+ */
63
+ readonly group?: {
64
+ readonly color?: ThemeColor;
65
+ readonly opacity?: number;
66
+ readonly border?: BorderStyle;
67
+ };
68
+ readonly relationship: {
69
+ readonly color: ThemeColor;
70
+ readonly line: RelationshipLineType;
71
+ readonly arrow: RelationshipArrowType;
72
+ };
73
+ }
74
+ interface LikeC4Theme {
75
+ readonly colors: Readonly<Record<ThemeColor, ThemeColorValues>>;
76
+ readonly sizes: Readonly<Record<ShapeSize, {
77
+ readonly width: number;
78
+ readonly height: number;
79
+ }>>;
80
+ readonly spacing: Readonly<Record<SpacingSize, number>>;
81
+ readonly textSizes: Readonly<Record<TextSize, number>>;
82
+ }
83
+ interface LikeC4StylesConfig {
84
+ readonly theme: LikeC4Theme;
85
+ readonly defaults: LikeC4StyleDefaults;
86
+ }
6
87
 
7
88
  type EqualOperator<V> = {
8
89
  eq: V;
@@ -250,4 +331,4 @@ declare namespace Expression {
250
331
  function isRelation<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.Any<A>;
251
332
  }
252
333
 
253
- export { type AndOperator as A, Expression as E, FqnExpr as F, type KindEqual as K, type NotOperator as N, type OrOperator as O, type PredicateSelector as P, RelationExpr as R, type TagEqual as T, type WhereOperator as W, type EqualOperator as a, isKindEqual as b, type Participant as c, type ParticipantOperator as d, isParticipantOperator as e, isNotOperator as f, isAndOperator as g, isOrOperator as h, isTagEqual as i, type Filterable as j, type OperatorPredicate as k, whereOperatorAsPredicate as w };
334
+ export { type AndOperator as A, BorderStyles as B, type ColorLiteral as C, type ThemeColor as D, Expression as E, FqnExpr as F, isThemeColor as G, type HexColor as H, type CustomColorDefinitions as I, type CustomColor as J, type KindEqual as K, type LikeC4StyleDefaults as L, isCustomColor as M, type NotOperator as N, type OrOperator as O, type PredicateSelector as P, type Color as Q, RelationExpr as R, Sizes as S, type ThemeColorValues as T, type ElementColorValues as U, type RelationshipColorValues as V, type WhereOperator as W, type LikeC4StylesConfig as a, type LikeC4Theme as b, type EqualOperator as c, type TagEqual as d, isKindEqual as e, type Participant as f, type ParticipantOperator as g, isParticipantOperator as h, isTagEqual as i, isNotOperator as j, isAndOperator as k, isOrOperator as l, type Filterable as m, type OperatorPredicate as n, type Size as o, type TextSize as p, type ShapeSize as q, type SpacingSize as r, type BorderStyle as s, ElementShapes as t, type ElementShape as u, type RelationshipLineType as v, whereOperatorAsPredicate as w, RelationshipArrowTypes as x, type RelationshipArrowType as y, ThemeColors as z };
@@ -1,4 +1,5 @@
1
- import { isTruthy, isString } from 'remeda';
1
+ import { e } from './core.CqAJJpK_.mjs';
2
+ import { e as e$1 } from './core.BKlholso.mjs';
2
3
  import { i as invariant } from './core.D4npX2q8.mjs';
3
4
 
4
5
  function ProjectId(name) {
@@ -8,8 +9,8 @@ function flattenMarkdownOrString(value) {
8
9
  if (value === null || value === void 0) {
9
10
  return null;
10
11
  }
11
- const content = isString(value) ? value : value.txt ?? value.md;
12
- return isTruthy(content?.trim()) ? content : null;
12
+ const content = e(value) ? value : value.txt ?? value.md;
13
+ return e$1(content?.trim()) ? content : null;
13
14
  }
14
15
  function Fqn(name, parent) {
15
16
  return parent ? parent + "." + name : name;
@@ -28,7 +29,7 @@ function RelationId(id) {
28
29
  return id;
29
30
  }
30
31
  function GlobalFqn(projectId, name) {
31
- invariant(isTruthy(projectId), "Project ID must start with @");
32
+ invariant(typeof projectId === "string" && projectId != "");
32
33
  return "@" + projectId + "." + name;
33
34
  }
34
35
  function isGlobalFqn(fqn) {
@@ -0,0 +1,5 @@
1
+ import { t as t$1 } from './core.BsSXS-_R.mjs';
2
+
3
+ function t(...t){return t$1(n,t,r)}const n=(e,t)=>e.map(t),r=e=>(t,n,r)=>({done:false,hasNext:true,next:e(t,n,r)});
4
+
5
+ export { t };
@@ -0,0 +1,3 @@
1
+ function e(e){return typeof e==`string`}
2
+
3
+ export { e };
@@ -1,11 +1,12 @@
1
- import { A as Any, R as RelationKind, m as Tags, n as Metadata, o as MetadataKey, L as LooseTag, F as Fqn, k as ElementId, j as ElementKind, q as DeploymentKind, E as ExtractOnStage, r as RelationId$1, h as StrictViewId, g as _type, s as LooseElementId, t as LooseDeploymentId, u as DeploymentFqn, v as toComputed, w as toLayouted, x as Stage, D as DeploymentId, U as Unknown, V as ViewId, T as Tag, y as toParsed, P as ProjectId$1, z as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.BhpgpOep.mjs';
1
+ import { L as LikeC4Styles } from './core.yna0OdV5.mjs';
2
+ import { A as Any, R as RelationKind, m as Tags, y as Metadata, u as MetadataKey, L as LooseTag, F as Fqn, k as ElementId, j as ElementKind, t as DeploymentKind, E as ExtractOnStage, z as RelationId$1, h as StrictViewId, g as _type, B as LooseElementId, C as LooseDeploymentId, s as DeploymentFqn, G as toComputed, H as toLayouted, I as Stage, D as DeploymentId, U as Unknown, V as ViewId, T as Tag, J as toParsed, P as ProjectId$1, K as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.Dgs6-nuz.mjs';
2
3
  import { d as RelationId, P as ProjectId, a as IconUrl, N as NodeId, G as GroupElementKind, j as EdgeId, k as StepEdgeId, V as ViewId$1 } from './core.DX-WYEPA.mjs';
3
4
  import { D as DefaultMap } from './core.CywrQs86.mjs';
4
5
  import { SetRequired } from 'type-fest';
5
- import { b as RichTextOrEmpty, Q as Relationship, I as Element, F as ElementStyle, aW as DynamicViewDisplayVariant, a6 as ViewWithType, a2 as ComputedView, a0 as LayoutedView, h as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, k as DeployedInstance, D as DeploymentElementStyle, p as DeploymentRelationship, l as DeploymentElement, j as DeploymentNode, s as LikeC4ModelDump, u as AuxFromDump, _ as LikeC4Project, Z as Specification, M as ModelGlobals } from './core.D-ZGWDDt.mjs';
6
- import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.DgesAwC8.mjs';
7
- import { i as Color, R as RelationshipLineType, c as ElementShape } from './core.CzdwsPmY.mjs';
8
- import { W as WhereOperator } from './core.CUG6vpyL.mjs';
6
+ import { b as RichTextOrEmpty, x as ViewWithType, u as ComputedView, s as LayoutedView, P as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, d as DeployedInstance, h as DeploymentRelationship, e as DeploymentElement, D as DeploymentNode, l as LikeC4ModelDump, n as AuxFromDump, q as Specification } from './core.DdMJk7nx.mjs';
7
+ import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.D5fzJWbF.mjs';
8
+ import { Q as Color, v as RelationshipLineType, y as RelationshipArrowType, u as ElementShape, W as WhereOperator } from './core.CQngdcuj.mjs';
9
+ import { g as Relationship, f as Element, E as ElementStyle, F as ComputedNodeStyle, a1 as DynamicViewDisplayVariant, k as LikeC4Project, M as ModelGlobals } from './core.fHR_8Tnq.mjs';
9
10
  import { FqnRef } from '../types/fqnRef.mjs';
10
11
 
11
12
  type RelationshipsIterator<A extends Any> = IteratorLike<RelationshipModel<A>>;
@@ -24,6 +25,8 @@ interface AnyRelationshipModel<A extends Any = Any> extends WithTags<A>, WithMet
24
25
  readonly links: ReadonlyArray<Link>;
25
26
  readonly color: Color;
26
27
  readonly line: RelationshipLineType;
28
+ readonly head: RelationshipArrowType;
29
+ readonly tail: RelationshipArrowType | undefined;
27
30
  isDeploymentRelation(): this is DeploymentRelationModel<A>;
28
31
  isModelRelation(): this is RelationshipModel<A>;
29
32
  views(): ViewsIterator<A>;
@@ -50,6 +53,8 @@ declare class RelationshipModel<A extends Any = Any> implements AnyRelationshipM
50
53
  get links(): ReadonlyArray<Link>;
51
54
  get color(): Color;
52
55
  get line(): RelationshipLineType;
56
+ get head(): RelationshipArrowType;
57
+ get tail(): RelationshipArrowType | undefined;
53
58
  /**
54
59
  * Iterate over all views that include this relationship.
55
60
  */
@@ -108,7 +113,7 @@ declare class ElementModel<A extends Any = Any> implements WithTags<A>, WithMeta
108
113
  get links(): ReadonlyArray<Link>;
109
114
  get defaultView(): LikeC4ViewModel.ScopedElementView<A> | null;
110
115
  get isRoot(): boolean;
111
- get style(): SetRequired<ElementStyle, 'size'>;
116
+ get style(): SetRequired<ElementStyle, 'shape' | 'color' | 'size'>;
112
117
  isAncestorOf(another: ElementModel<A>): boolean;
113
118
  isDescendantOf(another: ElementModel<A>): boolean;
114
119
  /**
@@ -188,7 +193,7 @@ declare class NodeModel<A extends Any = Any, V extends $View<A> = $View<A>> impl
188
193
  get tags(): Tags<A>;
189
194
  get links(): ReadonlyArray<Link>;
190
195
  get navigateTo(): LikeC4ViewModel<A> | null;
191
- get style(): ElementStyle;
196
+ get style(): ComputedNodeStyle;
192
197
  children(): ReadonlySet<NodeModel<A, V>>;
193
198
  /**
194
199
  * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
@@ -265,6 +270,8 @@ declare class EdgeModel<A extends Any = Any, View extends $View<A> = $View<A>> i
265
270
  get navigateTo(): LikeC4ViewModel<A> | null;
266
271
  get color(): Color;
267
272
  get line(): RelationshipLineType;
273
+ get head(): RelationshipArrowType;
274
+ get tail(): RelationshipArrowType | undefined;
268
275
  isStep(): this is EdgeModel.StepEdge<A, View>;
269
276
  relationships(type: 'model'): IteratorLike<RelationshipModel<A>>;
270
277
  relationships(type: 'deployment'): IteratorLike<DeploymentRelationModel<A>>;
@@ -548,6 +555,7 @@ declare class LikeC4DeploymentModel<A extends Any = Any> {
548
555
  readonly $model: LikeC4Model<A>;
549
556
  readonly $deployments: $ModelData<A>['deployments'];
550
557
  constructor($model: LikeC4Model<A>);
558
+ get $styles(): LikeC4Styles;
551
559
  element(el: DeploymentOrFqn<A>): DeploymentElementModel<A>;
552
560
  findElement(el: LooseDeploymentId<A>): DeploymentElementModel<A> | null;
553
561
  node(el: DeploymentOrFqn<A>): DeploymentNodeModel<A>;
@@ -636,7 +644,7 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
636
644
  abstract readonly $model: LikeC4DeploymentModel<A>;
637
645
  abstract readonly $node: DeploymentElement<A>;
638
646
  abstract readonly tags: Tags<A>;
639
- get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color' | 'size'>;
647
+ get style(): SetRequired<ElementStyle, 'shape' | 'color' | 'size'>;
640
648
  get name(): string;
641
649
  get shape(): ElementShape;
642
650
  get color(): Color;
@@ -753,9 +761,7 @@ declare class DeployedInstanceModel<A extends Any = Any> extends AbstractDeploym
753
761
  constructor($model: LikeC4DeploymentModel<A>, $instance: DeployedInstance<A>, element: ElementModel<A>);
754
762
  get $node(): DeployedInstance<A>;
755
763
  get parent(): DeploymentNodeModel<A>;
756
- get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color' | 'size'>;
757
- get shape(): ElementShape;
758
- get color(): Color;
764
+ get style(): SetRequired<ElementStyle, 'shape' | 'color' | 'size'>;
759
765
  get tags(): Tags<A>;
760
766
  get kind(): ElementKind<A>;
761
767
  get summary(): RichTextOrEmpty;
@@ -777,7 +783,7 @@ declare class NestedElementOfDeployedInstanceModel<A extends Any = Any> {
777
783
  constructor(instance: DeployedInstanceModel<A>, element: ElementModel<A>);
778
784
  get id(): DeploymentFqn<A>;
779
785
  get _literalId(): DeploymentId<A>;
780
- get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color'>;
786
+ get style(): SetRequired<ElementStyle, 'shape' | 'color'>;
781
787
  get shape(): ElementShape;
782
788
  get color(): Color;
783
789
  get title(): string;
@@ -806,6 +812,8 @@ declare class DeploymentRelationModel<A extends Any = Any> implements AnyRelatio
806
812
  get links(): ReadonlyArray<Link>;
807
813
  get color(): Color;
808
814
  get line(): RelationshipLineType;
815
+ get head(): RelationshipArrowType;
816
+ get tail(): RelationshipArrowType | undefined;
809
817
  views(): IteratorLike<LikeC4ViewModel.DeploymentView<A>>;
810
818
  isDeploymentRelation(): this is DeploymentRelationModel<A>;
811
819
  isModelRelation(): this is RelationshipModel<A>;
@@ -865,7 +873,7 @@ declare class LikeC4Model<A extends Any = Unknown> {
865
873
  protected readonly _rootViewFolder: LikeC4ViewsFolder<A>;
866
874
  protected readonly _viewFolders: Map<string, LikeC4ViewsFolder<A>>;
867
875
  protected readonly _viewFolderItems: DefaultMap<string, Set<LikeC4ViewModel<A, $View<A>> | LikeC4ViewsFolder<A>>>;
868
- protected readonly _allTags: DefaultMap<Tag<A>, Set<LikeC4ViewModel<A, $View<A>> | ElementModel<A> | RelationshipModel<A>>>;
876
+ protected readonly _allTags: DefaultMap<Tag<A>, Set<ElementModel<A> | LikeC4ViewModel<A, $View<A>> | RelationshipModel<A>>>;
869
877
  static fromParsed<T extends Any>(model: ParsedLikeC4ModelData<T>): LikeC4Model.Parsed<T>;
870
878
  /**
871
879
  * Creates a new LikeC4Model instance from the provided model data.
@@ -906,6 +914,10 @@ declare class LikeC4Model<A extends Any = Unknown> {
906
914
  * This is useful for tests
907
915
  */
908
916
  get asLayouted(): LikeC4Model.Layouted<A>;
917
+ /**
918
+ * Returns the styles configuration for the project.
919
+ */
920
+ get $styles(): LikeC4Styles;
909
921
  /**
910
922
  * Type guard the model to the parsed stage.
911
923
  */
@@ -935,7 +947,7 @@ declare class LikeC4Model<A extends Any = Unknown> {
935
947
  */
936
948
  get project(): LikeC4Project;
937
949
  get specification(): Specification<A>;
938
- get globals(): ModelGlobals;
950
+ get globals(): ModelGlobals<A>;
939
951
  /**
940
952
  * Returns the element with the given FQN.
941
953
  *
@@ -1148,4 +1160,4 @@ declare namespace LikeC4Model {
1148
1160
  type AnyRelation<M = Unknown> = M extends Any ? RelationshipModel<M> | DeploymentRelationModel<M> : never;
1149
1161
  }
1150
1162
 
1151
- export { type AnyRelationshipModel as A, DeploymentNodeModel as D, ElementModel as E, type IncomingFilter as I, LikeC4ViewModel as L, NestedElementOfDeployedInstanceModel as N, type OutgoingFilter as O, RelationshipModel as R, type WithMetadata as W, DeployedInstanceModel as a, DeploymentRelationModel as b, NodeModel as c, EdgeModel as d, type DeploymentElementModel as e, type AnyLikeC4Model as f, LikeC4Model as g, type DeploymentRelationEndpoint as h, RelationshipsAccum as i, LikeC4DeploymentModel as j, LikeC4ViewsFolder as k, type DeploymentOrFqn as l, type EdgeOrId as m, type ElementOrFqn as n, type NodeOrId as o, type WithTags as p };
1163
+ export { type AnyRelationshipModel as A, DeploymentNodeModel as D, ElementModel as E, type IncomingFilter as I, LikeC4ViewModel as L, NestedElementOfDeployedInstanceModel as N, type OutgoingFilter as O, RelationshipModel as R, type WithMetadata as W, DeployedInstanceModel as a, DeploymentRelationModel as b, NodeModel as c, EdgeModel as d, type DeploymentElementModel as e, LikeC4Model as f, type AnyLikeC4Model as g, RelationshipsAccum as h, type DeploymentRelationEndpoint as i, LikeC4DeploymentModel as j, LikeC4ViewsFolder as k, type DeploymentOrFqn as l, type EdgeOrId as m, type ElementOrFqn as n, type NodeOrId as o, type WithTags as p };
@@ -65,6 +65,6 @@ type ExactObject<T, InputType = unknown> = {
65
65
  *
66
66
  * See {@link Exact} for more details (this version is non-deep)
67
67
  */
68
- declare function omitUndefined<Expected, T extends ExactObject<Expected, T>>(a: T): Expected;
68
+ declare function exact<Expected, T extends ExactObject<Expected, T>>(a: T): Expected;
69
69
 
70
- export { type Coalesce as C, type ExclusiveUnion as E, type IterableContainer as I, type KeysOf as K, type Link as L, type NonEmptyArray as N, type Predicate as P, type ReorderedArray as R, type NonEmptyReadonlyArray as a, type NTuple as b, type IteratorLike as c, omitUndefined as o };
70
+ export { type Coalesce as C, type ExclusiveUnion as E, type IterableContainer as I, type KeysOf as K, type Link as L, type NonEmptyArray as N, type Predicate as P, type ReorderedArray as R, type NonEmptyReadonlyArray as a, type NTuple as b, type IteratorLike as c, exact as e };
@@ -1,7 +1,7 @@
1
- import { C as Connection, c as customInspectSymbol } from './core.xSQO0XYD.mjs';
2
- import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.BXsxn-hf.mjs';
3
- import { A as Any, K as EdgeId } from './core.BhpgpOep.mjs';
4
- import { c as IteratorLike } from './core.DgesAwC8.mjs';
1
+ import { C as Connection, c as customInspectSymbol } from './core.DIol3syK.mjs';
2
+ import { e as DeploymentElementModel, h as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.D0PjZzIS.mjs';
3
+ import { A as Any, v as EdgeId } from './core.Dgs6-nuz.mjs';
4
+ import { c as IteratorLike } from './core.D5fzJWbF.mjs';
5
5
 
6
6
  /**
7
7
  * Connection is ephemeral entity, result of a resolving relationships between source and target.
@@ -25,7 +25,7 @@ declare class DeploymentConnectionModel<A extends Any = Any> implements Connecti
25
25
  */
26
26
  get boundary(): DeploymentNodeModel<A> | null;
27
27
  nonEmpty(): boolean;
28
- [customInspectSymbol](depth: any, inspectOptions: any, inspect: any): string;
28
+ [customInspectSymbol](_depth: any, _inspectOptions: any, _inspect: any): string;
29
29
  toString(): string;
30
30
  /**
31
31
  * Check if connection contains deployment relation,