@likec4/core 1.40.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 (257) 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 +83 -20
  5. package/dist/builder/index.mjs +210 -126
  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 +12 -12
  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.DHQ32OHa.mjs → core.01VTr9qu.mjs} +10 -29
  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.BIAlzwKc.mjs → core.BIqHjQiH.mjs} +85 -45
  25. package/dist/shared/core.BKlholso.mjs +3 -0
  26. package/dist/shared/core.BR4zXDH-.mjs +13 -0
  27. package/dist/shared/{core.yHe79zEl.mjs → core.BYNkXQ8A.mjs} +21 -12
  28. package/dist/shared/core.BazD6cot.mjs +14 -0
  29. package/dist/shared/{core.BuoXfSMj.mjs → core.BbE4y-yl.mjs} +1 -1
  30. package/dist/shared/core.BoYfZOBm.mjs +3 -0
  31. package/dist/shared/core.BsSXS-_R.mjs +7 -0
  32. package/dist/shared/{core.T-eLZTW_.mjs → core.BzTakU3I.mjs} +15 -7
  33. package/dist/shared/{core.4u1dVmfX.mjs → core.C2TiyjI6.mjs} +2 -2
  34. package/dist/shared/{core.DLpidoWc.mjs → core.C3JowhaZ.mjs} +3 -3
  35. package/dist/shared/{core.CNGyqkJh.mjs → core.C4x8aaWa.mjs} +3 -1
  36. package/dist/shared/{core.BB6zA-UU.mjs → core.C8YY6Uub.mjs} +38 -9
  37. package/dist/shared/{core.FPITT8Vx.mjs → core.C8sl5Y8Z.mjs} +144 -61
  38. package/dist/shared/{core.DuR3R-xJ.mjs → core.CNgZvKb8.mjs} +3 -5176
  39. package/dist/shared/{core.BbThmf6M.d.mts → core.CQngdcuj.d.mts} +85 -4
  40. package/dist/shared/{core.Be1n9a0i.mjs → core.C_Ni6yHl.mjs} +5 -4
  41. package/dist/shared/core.CbT8JVYL.mjs +5 -0
  42. package/dist/shared/core.CqAJJpK_.mjs +3 -0
  43. package/dist/shared/{core.CySf-2gP.d.mts → core.D0PjZzIS.d.mts} +52 -15
  44. package/dist/shared/{core.DrvfVXkh.d.mts → core.D5fzJWbF.d.mts} +11 -2
  45. package/dist/shared/{core.DrVOJuxX.d.mts → core.DACpKp35.d.mts} +5 -5
  46. package/dist/shared/core.DFi2dOTl.mjs +39548 -0
  47. package/dist/shared/{core.D704WZES.d.mts → core.DIol3syK.d.mts} +2 -2
  48. package/dist/shared/{core.DlG1xWt2.mjs → core.DMMOWQqc.mjs} +3 -2
  49. package/dist/shared/core.DNbUPnve.mjs +3990 -0
  50. package/dist/shared/{core.CCD1ID81.mjs → core.DRJma0Ol.mjs} +4 -3
  51. package/dist/shared/{core.DgttqsJc.mjs → core.DRhg-gVU.mjs} +9 -9
  52. package/dist/shared/core.DSO_rTC2.mjs +5322 -0
  53. package/dist/shared/{core.vWJTxpLV.d.mts → core.D_vkffV4.d.mts} +4 -2
  54. package/dist/shared/core.DdMJk7nx.d.mts +476 -0
  55. package/dist/shared/{core.D_fI5Lf6.d.mts → core.Dgs6-nuz.d.mts} +24 -4
  56. package/dist/shared/{core.Be4Jy9Qx.mjs → core.FZ305VYd.mjs} +2 -2
  57. package/dist/shared/core.OHD4KXm9.mjs +5 -0
  58. package/dist/shared/{core.GTgsmXS_.mjs → core.QJD_fcrc.mjs} +2 -2
  59. package/dist/shared/core.RfnaEmgA.mjs +7 -0
  60. package/dist/shared/core.fHR_8Tnq.d.mts +450 -0
  61. package/dist/shared/{core.D0EgVMQK.mjs → core.lRvxPoao.mjs} +14 -12
  62. package/dist/shared/{core.CaT0SUUK.mjs → core.rCeaAqgW.mjs} +1 -84
  63. package/dist/shared/{core.kxeJe0OY.d.mts → core.s9uwOt60.d.mts} +4 -4
  64. package/dist/shared/core.yna0OdV5.d.mts +98 -0
  65. package/dist/styles/index.d.mts +106 -0
  66. package/dist/styles/index.mjs +1 -0
  67. package/dist/types/_aux.d.mts +2 -2
  68. package/dist/types/_aux.mjs +1 -5
  69. package/dist/types/expression-model.d.mts +3 -4
  70. package/dist/types/expression.d.mts +3 -4
  71. package/dist/types/fqnRef.d.mts +2 -2
  72. package/dist/types/fqnRef.mjs +3 -3
  73. package/dist/types/index.d.mts +8 -8
  74. package/dist/types/index.mjs +151 -6
  75. package/dist/types/scalar.mjs +3 -2
  76. package/dist/utils/graphology/index.d.mts +1864 -0
  77. package/dist/utils/graphology/index.mjs +1 -0
  78. package/dist/utils/index.d.mts +11 -6
  79. package/dist/utils/index.mjs +21 -37
  80. package/dist/utils/iterable/index.d.mts +1 -1
  81. package/dist/utils/iterable/index.mjs +45 -7
  82. package/model/package.json +4 -0
  83. package/package.json +42 -24
  84. package/styles/package.json +4 -0
  85. package/types/package.json +4 -0
  86. package/utils/graphology/package.json +4 -0
  87. package/utils/package.json +4 -0
  88. package/dist/shared/core.6_Vp2iiN.mjs +0 -172
  89. package/dist/shared/core.Bpou6c2f.d.mts +0 -850
  90. package/dist/shared/core.CUw_2J9j.mjs +0 -47
  91. package/dist/shared/core.CzdwsPmY.d.mts +0 -69
  92. package/dist/shared/core.DoM6aM9N.mjs +0 -7
  93. package/dist/shared/core.ILwny7BV.mjs +0 -38
  94. package/dist/theme/index.d.mts +0 -11
  95. package/dist/theme/index.mjs +0 -232
  96. package/src/builder/Builder.deployment.ts +0 -224
  97. package/src/builder/Builder.deploymentModel.ts +0 -449
  98. package/src/builder/Builder.element.ts +0 -241
  99. package/src/builder/Builder.model.ts +0 -494
  100. package/src/builder/Builder.ts +0 -870
  101. package/src/builder/Builder.view-common.ts +0 -273
  102. package/src/builder/Builder.view-deployment.ts +0 -135
  103. package/src/builder/Builder.view-element.ts +0 -202
  104. package/src/builder/Builder.views.ts +0 -399
  105. package/src/builder/Builder.with.ts +0 -156
  106. package/src/builder/_types.ts +0 -320
  107. package/src/builder/index.ts +0 -11
  108. package/src/compute-view/compute-view.ts +0 -80
  109. package/src/compute-view/deployment-view/_types.ts +0 -38
  110. package/src/compute-view/deployment-view/clean-connections.ts +0 -236
  111. package/src/compute-view/deployment-view/compute.ts +0 -94
  112. package/src/compute-view/deployment-view/memory/index.ts +0 -9
  113. package/src/compute-view/deployment-view/memory/memory.ts +0 -96
  114. package/src/compute-view/deployment-view/predicates/deploymentRefs-where.ts +0 -18
  115. package/src/compute-view/deployment-view/predicates/deploymentRefs.ts +0 -154
  116. package/src/compute-view/deployment-view/predicates/index.ts +0 -8
  117. package/src/compute-view/deployment-view/predicates/relation-direct.ts +0 -243
  118. package/src/compute-view/deployment-view/predicates/relation-in-out.ts +0 -70
  119. package/src/compute-view/deployment-view/predicates/relation-incoming.ts +0 -101
  120. package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +0 -95
  121. package/src/compute-view/deployment-view/predicates/relation-where.ts +0 -18
  122. package/src/compute-view/deployment-view/predicates/utils.ts +0 -282
  123. package/src/compute-view/deployment-view/predicates/wildcard.ts +0 -41
  124. package/src/compute-view/deployment-view/stages/stage-exclude.ts +0 -5
  125. package/src/compute-view/deployment-view/stages/stage-final.ts +0 -245
  126. package/src/compute-view/deployment-view/stages/stage-include.ts +0 -95
  127. package/src/compute-view/deployment-view/utils.ts +0 -286
  128. package/src/compute-view/dynamic-view/compute.ts +0 -312
  129. package/src/compute-view/element-view/_types.ts +0 -47
  130. package/src/compute-view/element-view/clean-connections.ts +0 -117
  131. package/src/compute-view/element-view/compute.ts +0 -324
  132. package/src/compute-view/element-view/memory/NodeGroup.ts +0 -31
  133. package/src/compute-view/element-view/memory/index.ts +0 -10
  134. package/src/compute-view/element-view/memory/memory.ts +0 -178
  135. package/src/compute-view/element-view/memory/stage-exclude.ts +0 -59
  136. package/src/compute-view/element-view/memory/stage-final.ts +0 -129
  137. package/src/compute-view/element-view/memory/stage-include.ts +0 -130
  138. package/src/compute-view/element-view/predicates/_utils.ts +0 -91
  139. package/src/compute-view/element-view/predicates/element-expand.ts +0 -29
  140. package/src/compute-view/element-view/predicates/element-kind-tag.ts +0 -27
  141. package/src/compute-view/element-view/predicates/element-ref.ts +0 -24
  142. package/src/compute-view/element-view/predicates/relation-direct.ts +0 -321
  143. package/src/compute-view/element-view/predicates/relation-in-out.ts +0 -64
  144. package/src/compute-view/element-view/predicates/relation-in.ts +0 -115
  145. package/src/compute-view/element-view/predicates/relation-out.ts +0 -119
  146. package/src/compute-view/element-view/predicates/wildcard.ts +0 -88
  147. package/src/compute-view/element-view/utils.ts +0 -65
  148. package/src/compute-view/index.ts +0 -4
  149. package/src/compute-view/memory/AbstractMemory.ts +0 -45
  150. package/src/compute-view/memory/AbstractStageExclude.ts +0 -215
  151. package/src/compute-view/memory/AbstractStageInclude.ts +0 -200
  152. package/src/compute-view/memory/_types.ts +0 -148
  153. package/src/compute-view/memory/index.ts +0 -5
  154. package/src/compute-view/memory/ops.ts +0 -43
  155. package/src/compute-view/relationships-view/_types.ts +0 -16
  156. package/src/compute-view/relationships-view/compute.ts +0 -159
  157. package/src/compute-view/relationships-view/index.ts +0 -3
  158. package/src/compute-view/relationships-view/layout.ts +0 -357
  159. package/src/compute-view/relationships-view/utils.ts +0 -73
  160. package/src/compute-view/utils/ancestorsOfNode.ts +0 -19
  161. package/src/compute-view/utils/applyCustomElementProperties.ts +0 -107
  162. package/src/compute-view/utils/applyCustomRelationProperties.ts +0 -58
  163. package/src/compute-view/utils/applyViewRuleStyles.ts +0 -73
  164. package/src/compute-view/utils/buildComputedNodes.ts +0 -153
  165. package/src/compute-view/utils/buildElementNotations.ts +0 -63
  166. package/src/compute-view/utils/elementExpressionToPredicate.ts +0 -50
  167. package/src/compute-view/utils/link-nodes-with-edges.ts +0 -56
  168. package/src/compute-view/utils/merge-props-from-relationships.ts +0 -161
  169. package/src/compute-view/utils/relationExpressionToPredicates.ts +0 -55
  170. package/src/compute-view/utils/resolve-extended-views.ts +0 -85
  171. package/src/compute-view/utils/resolve-global-rules.ts +0 -88
  172. package/src/compute-view/utils/topological-sort.ts +0 -256
  173. package/src/compute-view/utils/view-hash.ts +0 -45
  174. package/src/compute-view/utils/with-readable-edges.ts +0 -40
  175. package/src/index.ts +0 -32
  176. package/src/model/DeploymentElementModel.ts +0 -682
  177. package/src/model/DeploymentModel.ts +0 -393
  178. package/src/model/ElementModel.ts +0 -293
  179. package/src/model/LikeC4Model.ts +0 -882
  180. package/src/model/RelationModel.ts +0 -152
  181. package/src/model/connection/Connection.ts +0 -72
  182. package/src/model/connection/deployment/DeploymentConnectionModel.ts +0 -185
  183. package/src/model/connection/deployment/find.ts +0 -120
  184. package/src/model/connection/deployment/index.ts +0 -8
  185. package/src/model/connection/index.ts +0 -22
  186. package/src/model/connection/model/ConnectionModel.ts +0 -158
  187. package/src/model/connection/model/find.ts +0 -117
  188. package/src/model/connection/model/index.ts +0 -8
  189. package/src/model/connection/ops.ts +0 -276
  190. package/src/model/guards.ts +0 -77
  191. package/src/model/index.ts +0 -72
  192. package/src/model/types.ts +0 -67
  193. package/src/model/utils.ts +0 -66
  194. package/src/model/view/EdgeModel.ts +0 -120
  195. package/src/model/view/LikeC4ViewModel.ts +0 -361
  196. package/src/model/view/LikeC4ViewsFolder.ts +0 -151
  197. package/src/model/view/NodeModel.ts +0 -247
  198. package/src/theme/element.ts +0 -61
  199. package/src/theme/index.ts +0 -127
  200. package/src/theme/relationships.ts +0 -54
  201. package/src/types/RichText.ts +0 -206
  202. package/src/types/_aux.ts +0 -291
  203. package/src/types/_common.ts +0 -80
  204. package/src/types/const.ts +0 -34
  205. package/src/types/expression-model.ts +0 -294
  206. package/src/types/expression.ts +0 -313
  207. package/src/types/fqnRef.ts +0 -91
  208. package/src/types/geometry.ts +0 -159
  209. package/src/types/global.ts +0 -21
  210. package/src/types/index.ts +0 -42
  211. package/src/types/model-data.ts +0 -77
  212. package/src/types/model-deployment.ts +0 -88
  213. package/src/types/model-dump.ts +0 -79
  214. package/src/types/model-logical.ts +0 -135
  215. package/src/types/model-spec.ts +0 -85
  216. package/src/types/operators.ts +0 -156
  217. package/src/types/project.ts +0 -14
  218. package/src/types/scalar.ts +0 -162
  219. package/src/types/styles.ts +0 -122
  220. package/src/types/view-changes.ts +0 -32
  221. package/src/types/view-common.ts +0 -157
  222. package/src/types/view-computed.ts +0 -118
  223. package/src/types/view-layouted.ts +0 -98
  224. package/src/types/view-parsed.deployment.ts +0 -39
  225. package/src/types/view-parsed.dynamic.ts +0 -89
  226. package/src/types/view-parsed.element.ts +0 -65
  227. package/src/types/view.ts +0 -113
  228. package/src/utils/common-head.ts +0 -22
  229. package/src/utils/compare-natural.ts +0 -60
  230. package/src/utils/const.ts +0 -1
  231. package/src/utils/fqn.ts +0 -302
  232. package/src/utils/getOrCreate.ts +0 -8
  233. package/src/utils/guards.ts +0 -9
  234. package/src/utils/index.ts +0 -68
  235. package/src/utils/invariant.ts +0 -29
  236. package/src/utils/iterable/_types.ts +0 -5
  237. package/src/utils/iterable/filter.ts +0 -55
  238. package/src/utils/iterable/find.ts +0 -38
  239. package/src/utils/iterable/first.ts +0 -48
  240. package/src/utils/iterable/flat.ts +0 -17
  241. package/src/utils/iterable/head.ts +0 -22
  242. package/src/utils/iterable/index.ts +0 -15
  243. package/src/utils/iterable/map.ts +0 -40
  244. package/src/utils/iterable/reduce.ts +0 -24
  245. package/src/utils/iterable/some.ts +0 -36
  246. package/src/utils/iterable/to.ts +0 -19
  247. package/src/utils/iterable/unique.ts +0 -23
  248. package/src/utils/markdown/index.ts +0 -2
  249. package/src/utils/markdown/to-html.ts +0 -32
  250. package/src/utils/markdown/to-text.ts +0 -14
  251. package/src/utils/memoize-prop.ts +0 -30
  252. package/src/utils/mnemonist.ts +0 -9
  253. package/src/utils/object-hash.ts +0 -14
  254. package/src/utils/promises.ts +0 -24
  255. package/src/utils/relations.ts +0 -36
  256. package/src/utils/set.ts +0 -83
  257. package/src/utils/string-hash.ts +0 -16
@@ -1,8 +1,89 @@
1
- import { A as Any, T as Tag, k as AllKinds, l as Tags, g as StrictViewId, h as ElementKind } from './core.D_fI5Lf6.mjs';
2
- import { N as NonEmptyArray, E as ExclusiveUnion } from './core.DrvfVXkh.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, l as Tags, m as Metadata, n as MetadataKey, L as LooseTag, F as Fqn, j as ElementId, h as ElementKind, o as DeploymentKind, E as ExtractOnStage, p as RelationId$1, g as StrictViewId, f as _type, q as LooseElementId, r as LooseDeploymentId, s as DeploymentFqn, t as toComputed, u as toLayouted, v as Stage, D as DeploymentId, U as Unknown, V as ViewId, T as Tag, w as toParsed, P as ProjectId$1, x as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.D_fI5Lf6.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.Bpou6c2f.mjs';
6
- import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.DrvfVXkh.mjs';
7
- import { i as Color, R as RelationshipLineType, c as ElementShape } from './core.CzdwsPmY.mjs';
8
- import { W as WhereOperator } from './core.BbThmf6M.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
  */
@@ -89,12 +94,26 @@ declare class ElementModel<A extends Any = Any> implements WithTags<A>, WithMeta
89
94
  */
90
95
  get tags(): Tags<A>;
91
96
  get title(): string;
97
+ /**
98
+ * Returns true if the element has a summary and a description
99
+ * (if one is missing - it falls back to another)
100
+ */
101
+ get hasSummary(): boolean;
102
+ /**
103
+ * Short description of the element.
104
+ * Falls back to description if summary is not provided.
105
+ */
106
+ get summary(): RichTextOrEmpty;
107
+ /**
108
+ * Long description of the element.
109
+ * Falls back to summary if description is not provided.
110
+ */
92
111
  get description(): RichTextOrEmpty;
93
112
  get technology(): string | null;
94
113
  get links(): ReadonlyArray<Link>;
95
114
  get defaultView(): LikeC4ViewModel.ScopedElementView<A> | null;
96
115
  get isRoot(): boolean;
97
- get style(): SetRequired<ElementStyle, 'size'>;
116
+ get style(): SetRequired<ElementStyle, 'shape' | 'color' | 'size'>;
98
117
  isAncestorOf(another: ElementModel<A>): boolean;
99
118
  isDescendantOf(another: ElementModel<A>): boolean;
100
119
  /**
@@ -174,7 +193,7 @@ declare class NodeModel<A extends Any = Any, V extends $View<A> = $View<A>> impl
174
193
  get tags(): Tags<A>;
175
194
  get links(): ReadonlyArray<Link>;
176
195
  get navigateTo(): LikeC4ViewModel<A> | null;
177
- get style(): ElementStyle;
196
+ get style(): ComputedNodeStyle;
178
197
  children(): ReadonlySet<NodeModel<A, V>>;
179
198
  /**
180
199
  * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
@@ -251,6 +270,8 @@ declare class EdgeModel<A extends Any = Any, View extends $View<A> = $View<A>> i
251
270
  get navigateTo(): LikeC4ViewModel<A> | null;
252
271
  get color(): Color;
253
272
  get line(): RelationshipLineType;
273
+ get head(): RelationshipArrowType;
274
+ get tail(): RelationshipArrowType | undefined;
254
275
  isStep(): this is EdgeModel.StepEdge<A, View>;
255
276
  relationships(type: 'model'): IteratorLike<RelationshipModel<A>>;
256
277
  relationships(type: 'deployment'): IteratorLike<DeploymentRelationModel<A>>;
@@ -534,6 +555,7 @@ declare class LikeC4DeploymentModel<A extends Any = Any> {
534
555
  readonly $model: LikeC4Model<A>;
535
556
  readonly $deployments: $ModelData<A>['deployments'];
536
557
  constructor($model: LikeC4Model<A>);
558
+ get $styles(): LikeC4Styles;
537
559
  element(el: DeploymentOrFqn<A>): DeploymentElementModel<A>;
538
560
  findElement(el: LooseDeploymentId<A>): DeploymentElementModel<A> | null;
539
561
  node(el: DeploymentOrFqn<A>): DeploymentNodeModel<A>;
@@ -622,10 +644,19 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
622
644
  abstract readonly $model: LikeC4DeploymentModel<A>;
623
645
  abstract readonly $node: DeploymentElement<A>;
624
646
  abstract readonly tags: Tags<A>;
625
- get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color' | 'size'>;
647
+ get style(): SetRequired<ElementStyle, 'shape' | 'color' | 'size'>;
626
648
  get name(): string;
627
649
  get shape(): ElementShape;
628
650
  get color(): Color;
651
+ /**
652
+ * Short description of the element.
653
+ * Falls back to description if summary is not provided.
654
+ */
655
+ get summary(): RichTextOrEmpty;
656
+ /**
657
+ * Long description of the element.
658
+ * Falls back to summary if description is not provided.
659
+ */
629
660
  get description(): RichTextOrEmpty;
630
661
  get technology(): string | null;
631
662
  get links(): ReadonlyArray<Link>;
@@ -730,11 +761,10 @@ declare class DeployedInstanceModel<A extends Any = Any> extends AbstractDeploym
730
761
  constructor($model: LikeC4DeploymentModel<A>, $instance: DeployedInstance<A>, element: ElementModel<A>);
731
762
  get $node(): DeployedInstance<A>;
732
763
  get parent(): DeploymentNodeModel<A>;
733
- get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color' | 'size'>;
734
- get shape(): ElementShape;
735
- get color(): Color;
764
+ get style(): SetRequired<ElementStyle, 'shape' | 'color' | 'size'>;
736
765
  get tags(): Tags<A>;
737
766
  get kind(): ElementKind<A>;
767
+ get summary(): RichTextOrEmpty;
738
768
  get description(): RichTextOrEmpty;
739
769
  get technology(): string | null;
740
770
  get links(): ReadonlyArray<Link>;
@@ -753,10 +783,11 @@ declare class NestedElementOfDeployedInstanceModel<A extends Any = Any> {
753
783
  constructor(instance: DeployedInstanceModel<A>, element: ElementModel<A>);
754
784
  get id(): DeploymentFqn<A>;
755
785
  get _literalId(): DeploymentId<A>;
756
- get style(): SetRequired<DeploymentElementStyle, 'shape' | 'color'>;
786
+ get style(): SetRequired<ElementStyle, 'shape' | 'color'>;
757
787
  get shape(): ElementShape;
758
788
  get color(): Color;
759
789
  get title(): string;
790
+ get summary(): RichTextOrEmpty;
760
791
  get description(): RichTextOrEmpty;
761
792
  get technology(): string | null;
762
793
  isDeploymentNode(): this is DeploymentNodeModel<A>;
@@ -781,6 +812,8 @@ declare class DeploymentRelationModel<A extends Any = Any> implements AnyRelatio
781
812
  get links(): ReadonlyArray<Link>;
782
813
  get color(): Color;
783
814
  get line(): RelationshipLineType;
815
+ get head(): RelationshipArrowType;
816
+ get tail(): RelationshipArrowType | undefined;
784
817
  views(): IteratorLike<LikeC4ViewModel.DeploymentView<A>>;
785
818
  isDeploymentRelation(): this is DeploymentRelationModel<A>;
786
819
  isModelRelation(): this is RelationshipModel<A>;
@@ -840,7 +873,7 @@ declare class LikeC4Model<A extends Any = Unknown> {
840
873
  protected readonly _rootViewFolder: LikeC4ViewsFolder<A>;
841
874
  protected readonly _viewFolders: Map<string, LikeC4ViewsFolder<A>>;
842
875
  protected readonly _viewFolderItems: DefaultMap<string, Set<LikeC4ViewModel<A, $View<A>> | LikeC4ViewsFolder<A>>>;
843
- 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>>>;
844
877
  static fromParsed<T extends Any>(model: ParsedLikeC4ModelData<T>): LikeC4Model.Parsed<T>;
845
878
  /**
846
879
  * Creates a new LikeC4Model instance from the provided model data.
@@ -881,6 +914,10 @@ declare class LikeC4Model<A extends Any = Unknown> {
881
914
  * This is useful for tests
882
915
  */
883
916
  get asLayouted(): LikeC4Model.Layouted<A>;
917
+ /**
918
+ * Returns the styles configuration for the project.
919
+ */
920
+ get $styles(): LikeC4Styles;
884
921
  /**
885
922
  * Type guard the model to the parsed stage.
886
923
  */
@@ -910,7 +947,7 @@ declare class LikeC4Model<A extends Any = Unknown> {
910
947
  */
911
948
  get project(): LikeC4Project;
912
949
  get specification(): Specification<A>;
913
- get globals(): ModelGlobals;
950
+ get globals(): ModelGlobals<A>;
914
951
  /**
915
952
  * Returns the element with the given FQN.
916
953
  *
@@ -1123,4 +1160,4 @@ declare namespace LikeC4Model {
1123
1160
  type AnyRelation<M = Unknown> = M extends Any ? RelationshipModel<M> | DeploymentRelationModel<M> : never;
1124
1161
  }
1125
1162
 
1126
- 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 };
@@ -1,4 +1,4 @@
1
- import { IsAny, UnionToIntersection, Simplify } from 'type-fest';
1
+ import { IsAny, UnionToIntersection, Simplify, KeysOfUnion } from 'type-fest';
2
2
 
3
3
  type NonEmptyArray<T> = [T, ...T[]];
4
4
  type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
@@ -57,5 +57,14 @@ interface Link {
57
57
  * Coalesce `V` to a string if it is `any`
58
58
  */
59
59
  type Coalesce<V extends string, OrIfAny = string> = IsAny<V> extends true ? OrIfAny : V;
60
+ type ExactObject<T, InputType = unknown> = {
61
+ [KeyType in keyof T]: undefined extends T[KeyType] ? T[KeyType] | undefined : T[KeyType];
62
+ } & Record<Exclude<keyof InputType, KeysOfUnion<T>>, never>;
63
+ /**
64
+ * Allows only exact properties of `U` to be present in `T` and omits undefined values
65
+ *
66
+ * See {@link Exact} for more details (this version is non-deep)
67
+ */
68
+ declare function exact<Expected, T extends ExactObject<Expected, T>>(a: T): Expected;
60
69
 
61
- export type { Coalesce as C, ExclusiveUnion as E, IterableContainer as I, KeysOf as K, Link as L, NonEmptyArray as N, Predicate as P, ReorderedArray as R, NonEmptyReadonlyArray as a, NTuple as b, IteratorLike as c };
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.D704WZES.mjs';
2
- import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.CySf-2gP.mjs';
3
- import { A as Any, C as EdgeId } from './core.D_fI5Lf6.mjs';
4
- import { c as IteratorLike } from './core.DrvfVXkh.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,