@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,5 +1,6 @@
1
- import { I as IterableContainer, R as ReorderedArray, N as NonEmptyArray } from './core.DrvfVXkh.mjs';
1
+ import { I as IterableContainer, R as ReorderedArray, N as NonEmptyArray } from './core.D5fzJWbF.mjs';
2
2
  import { F as Fqn } from './core.DX-WYEPA.mjs';
3
+ import { SetRequired, SetNonNullable } from 'type-fest';
3
4
 
4
5
  /**
5
6
  * Mnemonist DefaultWeakMap Typings
@@ -305,6 +306,7 @@ declare function sortNaturalByFqn<A extends IterableContainer<WithId>>(array: A,
305
306
 
306
307
  declare function isString(value: unknown): value is string;
307
308
  declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
309
+ declare function hasProp<T extends object, P extends keyof T & string>(value: T, path: P): value is SetRequired<SetNonNullable<T, P>, P>;
308
310
 
309
311
  /**
310
312
  * Saves the value returned by fn() in a hidden property tag of obj object, so next time memoizeProp() is called,
@@ -327,4 +329,4 @@ declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEm
327
329
  */
328
330
  declare function memoizeProp<Tag extends symbol | string, Res>(obj: object, tag: Tag, fn: () => Res): Res;
329
331
 
330
- export { BiMap as B, DefaultWeakMap as D, LinkedList as L, MultiMap as M, Queue as Q, ancestorsFqn as a, isAncestor as b, isDescendantOf as c, isNonEmptyArray as d, isSameHierarchy as e, isString as f, nonexhaustive as g, nonNullable as h, invariant as i, sortParentsFirst as j, commonAncestor as k, compareByFqnHierarchically as l, memoizeProp as m, nameFromFqn as n, compareFqnHierarchically as o, parentFqn as p, hierarchyDistance as q, hierarchyLevel as r, sortNaturalByFqn as s, sortByFqnHierarchically as t };
332
+ export { BiMap as B, DefaultWeakMap as D, LinkedList as L, MultiMap as M, Queue as Q, ancestorsFqn as a, isAncestor as b, isDescendantOf as c, isNonEmptyArray as d, isSameHierarchy as e, isString as f, nonexhaustive as g, hasProp as h, invariant as i, nonNullable as j, sortParentsFirst as k, commonAncestor as l, memoizeProp as m, nameFromFqn as n, compareByFqnHierarchically as o, parentFqn as p, compareFqnHierarchically as q, hierarchyDistance as r, sortNaturalByFqn as s, hierarchyLevel as t, sortByFqnHierarchically as u };
@@ -0,0 +1,476 @@
1
+ import { IsNever, IsAny } from 'type-fest';
2
+ import { A as Any, U as Unknown, W as WithDescriptionAndTech, n as WithOptionalTags, o as WithOptionalLinks, q as WithMetadata, r as WithNotation, s as DeploymentFqn, t as DeploymentKind, F as Fqn, T as Tag, j as ElementKind, R as RelationKind, u as MetadataKey, f as _stage, g as _type, h as StrictViewId, N as NodeId, v as EdgeId, E as ExtractOnStage, M as ModelStage, P as ProjectId, k as ElementId, D as DeploymentId, d as UnknownParsed, V as ViewId, b as UnknownComputed, c as UnknownLayouted, S as SpecAux, a as Aux, w as Never } from './core.Dgs6-nuz.mjs';
3
+ import { N as NonEmptyArray, L as Link, E as ExclusiveUnion, K as KeysOf } from './core.D5fzJWbF.mjs';
4
+ import { E as ElementStyle, A as AbstractRelationship, y as BaseViewProperties, D as ViewWithHash, C as ViewWithNotation, v as ViewAutoLayout, H as ComputedNode, B as BBox, I as ComputedEdge, P as Point, X as XYPoint, a1 as DynamicViewDisplayVariant, z as BaseParsedViewProperties, l as AnyIncludePredicate, m as AnyExcludePredicate, n as AnyViewRuleStyle, t as ViewRuleAutoLayout, aa as ParsedElementView, a2 as ParsedDynamicView, J as ComputedElementView, K as ComputedDeploymentView, O as ComputedDynamicView, x as ViewType, k as LikeC4Project, f as Element, g as Relationship, M as ModelGlobals } from './core.fHR_8Tnq.mjs';
5
+ import { FqnRef } from '../types/fqnRef.mjs';
6
+ import { D as ThemeColor, C as ColorLiteral, u as ElementShape, Q as Color, s as BorderStyle, q as ShapeSize, r as SpacingSize, p as TextSize, v as RelationshipLineType, y as RelationshipArrowType, I as CustomColorDefinitions, E as Expression, F as FqnExpr } from './core.CQngdcuj.mjs';
7
+ import { T as Tag$1, M as MarkdownOrString, I as Icon, d as RelationId } from './core.DX-WYEPA.mjs';
8
+
9
+ interface DeploymentNode<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
10
+ element?: never;
11
+ readonly id: DeploymentFqn<A>;
12
+ readonly kind: DeploymentKind<A>;
13
+ readonly title: string;
14
+ readonly style: ElementStyle;
15
+ }
16
+ interface DeployedInstance<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
17
+ kind?: never;
18
+ /**
19
+ * Format: `<DeploymentNode Fqn>.<Instance Id>`
20
+ * i.e parent fqn is deployment target
21
+ */
22
+ readonly id: DeploymentFqn<A>;
23
+ readonly element: Fqn<A>;
24
+ readonly title?: string;
25
+ readonly style: ElementStyle;
26
+ }
27
+ type DeploymentElement<A extends Any = Unknown> = DeploymentNode<A> | DeployedInstance<A>;
28
+ type DeploymentElementRef<A extends Any = Unknown> = {
29
+ readonly id: DeploymentFqn<A>;
30
+ readonly element?: Fqn<A>;
31
+ };
32
+ declare function isDeploymentNode<A extends Any>(el: DeploymentElement<A>): el is DeploymentNode<A>;
33
+ declare function isDeployedInstance<A extends Any>(el: DeploymentElement<A>): el is DeployedInstance<A>;
34
+ /**
35
+ * Relationship in deployment model
36
+ */
37
+ interface DeploymentRelationship<A extends Any = Unknown> extends AbstractRelationship<A> {
38
+ readonly source: FqnRef.DeploymentRef<A>;
39
+ readonly target: FqnRef.DeploymentRef<A>;
40
+ }
41
+ /**
42
+ * Backward compatibility alias
43
+ * @deprecated Use {@link DeploymentRelationship} instead
44
+ */
45
+ type DeploymentRelation<A extends Any = Unknown> = DeploymentRelationship<A>;
46
+
47
+ /**
48
+ * Element and deployment kind specification
49
+ */
50
+ interface ElementSpecification {
51
+ tags?: Tag$1[];
52
+ title?: string;
53
+ summary?: MarkdownOrString;
54
+ description?: MarkdownOrString;
55
+ technology?: string;
56
+ notation?: string;
57
+ links?: NonEmptyArray<Link>;
58
+ style: {
59
+ shape?: ElementShape;
60
+ icon?: Icon;
61
+ color?: Color;
62
+ border?: BorderStyle;
63
+ opacity?: number;
64
+ size?: ShapeSize;
65
+ padding?: SpacingSize;
66
+ textSize?: TextSize;
67
+ multiple?: boolean;
68
+ };
69
+ }
70
+ interface TagSpecification {
71
+ color: ThemeColor | ColorLiteral;
72
+ }
73
+ /**
74
+ * Checks if tag color is defined in the specification
75
+ * Expects HEX, `rgb(...)` or `rgba(...)` color
76
+ */
77
+ declare function isTagColorSpecified(spec: string | TagSpecification): spec is {
78
+ color: ColorLiteral;
79
+ };
80
+ interface RelationshipSpecification {
81
+ technology?: string;
82
+ notation?: string;
83
+ color?: Color;
84
+ line?: RelationshipLineType;
85
+ head?: RelationshipArrowType;
86
+ tail?: RelationshipArrowType;
87
+ }
88
+ type Specification<A> = A extends Any ? {
89
+ tags: {
90
+ [key in Tag<A>]: TagSpecification;
91
+ };
92
+ elements: {
93
+ [key in ElementKind<A>]: Partial<ElementSpecification>;
94
+ };
95
+ deployments: {
96
+ [key in DeploymentKind<A>]: Partial<ElementSpecification>;
97
+ };
98
+ relationships: {
99
+ [key in RelationKind<A>]: Partial<RelationshipSpecification>;
100
+ };
101
+ metadataKeys?: IsNever<MetadataKey<A>> extends true ? never : MetadataKey<A>[];
102
+ customColors?: CustomColorDefinitions;
103
+ } : never;
104
+
105
+ interface DiagramNode<A extends Any = Any> extends ComputedNode<A>, BBox {
106
+ /**
107
+ * Absolute X coordinate
108
+ */
109
+ x: number;
110
+ /**
111
+ * Absolute Y coordinate
112
+ */
113
+ y: number;
114
+ width: number;
115
+ height: number;
116
+ /**
117
+ * Bounding box of label
118
+ * (Absolute coordinates)
119
+ */
120
+ labelBBox: BBox;
121
+ }
122
+ interface DiagramEdge<A extends Any = Any> extends ComputedEdge<A> {
123
+ /**
124
+ * Bezier points
125
+ * (Absolute coordinates)
126
+ */
127
+ points: NonEmptyArray<Point>;
128
+ /**
129
+ * Control points to adjust the edge
130
+ * (Absolute coordinates)
131
+ */
132
+ controlPoints?: NonEmptyArray<XYPoint>;
133
+ /**
134
+ * Bounding box of label
135
+ * (Absolute coordinates)
136
+ */
137
+ labelBBox?: BBox | null;
138
+ /**
139
+ * Graphviz edge POS
140
+ *
141
+ * TODO: temporary solution, should be moved out
142
+ * @deprecated
143
+ */
144
+ dotpos?: string;
145
+ }
146
+ interface BaseLayoutedViewProperties<A extends Any> extends BaseViewProperties<A>, ViewWithHash, ViewWithNotation {
147
+ readonly [_stage]: 'layouted';
148
+ readonly autoLayout: ViewAutoLayout;
149
+ readonly nodes: DiagramNode<A>[];
150
+ readonly edges: DiagramEdge<A>[];
151
+ readonly bounds: BBox;
152
+ /**
153
+ * If diagram has manual layout
154
+ * But was changed and layout should be recalculated
155
+ */
156
+ hasLayoutDrift?: boolean;
157
+ }
158
+ interface LayoutedElementView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
159
+ readonly [_type]: 'element';
160
+ readonly viewOf?: Fqn<A>;
161
+ readonly extends?: StrictViewId<A>;
162
+ }
163
+ interface LayoutedDeploymentView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
164
+ readonly [_type]: 'deployment';
165
+ }
166
+ interface LayoutedDynamicView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
167
+ readonly [_type]: 'dynamic';
168
+ /**
169
+ * How to display the dynamic view
170
+ * - `diagram`: display as a regular likec4 view
171
+ * - `sequence`: display as a sequence diagram
172
+ */
173
+ readonly variant: DynamicViewDisplayVariant;
174
+ /**
175
+ * Sequence layout of this dynamic view
176
+ */
177
+ readonly sequenceLayout: LayoutedDynamicView.Sequence.Layout;
178
+ }
179
+ declare namespace LayoutedDynamicView {
180
+ namespace Sequence {
181
+ interface ActorPort {
182
+ readonly id: string;
183
+ readonly cx: number;
184
+ readonly cy: number;
185
+ readonly height: number;
186
+ readonly type: 'target' | 'source';
187
+ readonly position: 'left' | 'right' | 'top' | 'bottom';
188
+ }
189
+ interface Actor {
190
+ readonly id: NodeId;
191
+ readonly x: number;
192
+ readonly y: number;
193
+ readonly width: number;
194
+ readonly height: number;
195
+ readonly ports: ReadonlyArray<ActorPort>;
196
+ }
197
+ interface Compound {
198
+ readonly id: NodeId;
199
+ /**
200
+ * Original node id, since multiple compound nodes can be built from one node
201
+ */
202
+ readonly origin: NodeId;
203
+ readonly x: number;
204
+ readonly y: number;
205
+ readonly width: number;
206
+ readonly height: number;
207
+ readonly depth: number;
208
+ }
209
+ interface ParallelArea {
210
+ readonly parallelPrefix: string;
211
+ readonly x: number;
212
+ readonly y: number;
213
+ readonly width: number;
214
+ readonly height: number;
215
+ }
216
+ interface Step {
217
+ readonly id: EdgeId;
218
+ readonly labelBBox?: {
219
+ width: number;
220
+ height: number;
221
+ } | undefined;
222
+ readonly sourceHandle: string;
223
+ readonly targetHandle: string;
224
+ }
225
+ interface Layout {
226
+ readonly actors: ReadonlyArray<Actor>;
227
+ /**
228
+ * Steps in the sequence diagram (filtered edges with compound nodes)
229
+ */
230
+ readonly steps: ReadonlyArray<Step>;
231
+ readonly compounds: ReadonlyArray<Compound>;
232
+ readonly parallelAreas: ReadonlyArray<ParallelArea>;
233
+ readonly bounds: BBox;
234
+ }
235
+ }
236
+ }
237
+
238
+ /**
239
+ * Predicates scoped to deployment model
240
+ */
241
+ interface DeploymentViewIncludePredicate<A extends Any = Unknown> extends AnyIncludePredicate<Expression<A>> {
242
+ }
243
+ interface DeploymentViewExcludePredicate<A extends Any = Unknown> extends AnyExcludePredicate<Expression<A>> {
244
+ }
245
+ type DeploymentViewPredicate<A extends Any = Unknown> = DeploymentViewIncludePredicate<A> | DeploymentViewExcludePredicate<A>;
246
+ interface DeploymentViewRuleStyle<A extends Any = Unknown> extends AnyViewRuleStyle<FqnExpr<A>> {
247
+ }
248
+ type DeploymentViewRule<A extends Any = Unknown> = ExclusiveUnion<{
249
+ Include: DeploymentViewIncludePredicate<A>;
250
+ Exclude: DeploymentViewExcludePredicate<A>;
251
+ Style: DeploymentViewRuleStyle<A>;
252
+ AutoLayout: ViewRuleAutoLayout;
253
+ }>;
254
+ interface ParsedDeploymentView<A extends Any = Unknown> extends BaseParsedViewProperties<A> {
255
+ [_type]: 'deployment';
256
+ readonly rules: DeploymentViewRule<A>[];
257
+ }
258
+
259
+ type ParsedView<A extends Any = Any> = ParsedElementView<A> | ParsedDeploymentView<A> | ParsedDynamicView<A>;
260
+
261
+ type ComputedView<A extends Any = Any> = ComputedElementView<A> | ComputedDeploymentView<A> | ComputedDynamicView<A>;
262
+ type LayoutedView<A extends Any = Any> = LayoutedElementView<A> | LayoutedDeploymentView<A> | LayoutedDynamicView<A>;
263
+ type ProcessedView<A extends Any = Any> = ComputedView<A> | LayoutedView<A>;
264
+
265
+ type AnyView<A extends Any = Any> = ParsedElementView<A> | ParsedDeploymentView<A> | ParsedDynamicView<A> | ComputedElementView<A> | ComputedDeploymentView<A> | ComputedDynamicView<A> | LayoutedElementView<A> | LayoutedDeploymentView<A> | LayoutedDynamicView<A>;
266
+ type ViewOnStage<V extends AnyView<Any>, T extends ModelStage> = Extract<V, {
267
+ [_stage]: T;
268
+ }>;
269
+ type ViewWithType<V extends AnyView<Any>, T extends ViewType> = Extract<V, {
270
+ [_type]: T;
271
+ }>;
272
+ type ViewRule<A extends Any = Any> = ParsedView<A>['rules'][number];
273
+ type ViewRulePredicate<A extends Any = Any> = Extract<ViewRule<A>, {
274
+ include: any[];
275
+ } | {
276
+ exclude: any[];
277
+ }>;
278
+ declare function isViewRulePredicate<V extends ViewRule<any>>(rule: V): rule is Extract<V, {
279
+ include: any[];
280
+ } | {
281
+ exclude: any[];
282
+ }>;
283
+ declare function isViewRuleStyle<V extends ViewRule<any>>(rule: V): rule is Extract<V, {
284
+ targets: any[];
285
+ style: {};
286
+ }>;
287
+ declare function isComputedView<V extends AnyView<any>>(view: V): view is ExtractOnStage<V, 'computed'>;
288
+ declare function isDiagramView<V extends AnyView<any>>(view: V): view is ExtractOnStage<V, 'layouted'>;
289
+
290
+ declare function isElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'>;
291
+ declare function isScopedElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'> & {
292
+ viewOf: Fqn<Any>;
293
+ };
294
+ declare function isExtendsElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'> & {
295
+ extends: StrictViewId<Any>;
296
+ };
297
+ declare function isDeploymentView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'deployment'>;
298
+ declare function isDynamicView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'dynamic'>;
299
+
300
+ interface BaseLikeC4ModelData<A extends Any> {
301
+ projectId: ProjectId<A>;
302
+ project: LikeC4Project;
303
+ specification: Specification<A>;
304
+ elements: Record<ElementId<A>, Element<A>>;
305
+ deployments: {
306
+ elements: Record<DeploymentId<A>, DeploymentElement<A>>;
307
+ relations: Record<RelationId, DeploymentRelationship<A>>;
308
+ };
309
+ relations: Record<RelationId, Relationship<A>>;
310
+ globals: ModelGlobals;
311
+ imports: Record<string, NonEmptyArray<Element<A>>>;
312
+ }
313
+ type AuxFromLikeC4ModelData<D> = D extends BaseLikeC4ModelData<infer A extends Any> ? IsAny<A> extends true ? never : A : never;
314
+ /**
315
+ * Represents a LikeC4 model with customizable type parameters,
316
+ * parsed from DSL or result from Builder
317
+ *
318
+ * !IMPORTANT: This is a low-level type, use `LikeC4Model` instead.
319
+ * !NOTE: Views are not computed yet.
320
+ *
321
+ * @typeParam ElementKinds - Types of elements in the model (defaults to string)
322
+ * @typeParam RelationKinds - Types of relationships (defaults to string)
323
+ * @typeParam Tags - Types of tags that can be applied (defaults to string)
324
+ * @typeParam Fqns - Fully Qualified Names for elements (defaults to string)
325
+ * @typeParam Views - Types of views in the model (defaults to string)
326
+ * @typeParam DeploymentFqns - Fully Qualified Names for deployment nodes (defaults to string)
327
+ */
328
+ interface ParsedLikeC4ModelData<A extends Any = UnknownParsed> extends BaseLikeC4ModelData<A> {
329
+ [_stage]: 'parsed';
330
+ views: Record<ViewId<A>, ParsedView<A>>;
331
+ }
332
+ interface ComputedLikeC4ModelData<A extends Any = UnknownComputed> extends BaseLikeC4ModelData<A> {
333
+ [_stage]: 'computed';
334
+ views: Record<ViewId<A>, ComputedView<A>>;
335
+ }
336
+ interface LayoutedLikeC4ModelData<A extends Any = UnknownLayouted> extends BaseLikeC4ModelData<A> {
337
+ [_stage]: 'layouted';
338
+ views: Record<ViewId<A>, LayoutedView<A>>;
339
+ }
340
+ type LikeC4ModelData<A extends Any> = ParsedLikeC4ModelData<A> | ComputedLikeC4ModelData<A> | LayoutedLikeC4ModelData<A>;
341
+
342
+ /**
343
+ * JSON representation of {@link Specification}
344
+ */
345
+ interface SpecificationDump {
346
+ elements: {
347
+ [kind: string]: object;
348
+ };
349
+ tags?: {
350
+ [tag: string]: object;
351
+ };
352
+ deployments?: {
353
+ [kind: string]: object;
354
+ };
355
+ relationships?: {
356
+ [kind: string]: object;
357
+ };
358
+ metadataKeys?: string[];
359
+ customColors?: {
360
+ [kind: string]: object;
361
+ };
362
+ }
363
+ type SpecTypesFromDump<J> = J extends SpecificationDump ? SpecAux<KeysOf<J['elements']>, KeysOf<J['deployments']>, KeysOf<J['relationships']>, KeysOf<J['tags']>, J['metadataKeys'] extends readonly [string, ...string[]] ? J['metadataKeys'][number] : never> : SpecAux<never, never, never, never, never>;
364
+ /**
365
+ * Dump differs from {@link ParsedLikeC4ModelData} by the fact that it is computed or layouted
366
+ */
367
+ type LikeC4ModelDump = {
368
+ [_stage]?: 'computed' | 'layouted';
369
+ projectId?: string;
370
+ project?: ProjectDump;
371
+ specification: SpecificationDump;
372
+ elements?: {
373
+ [kind: string]: object;
374
+ };
375
+ deployments: {
376
+ elements?: {
377
+ [kind: string]: object;
378
+ };
379
+ relations?: {};
380
+ };
381
+ views?: {
382
+ [kind: string]: object;
383
+ };
384
+ relations?: {};
385
+ globals?: {
386
+ predicates?: {};
387
+ dynamicPredicates?: {};
388
+ styles?: {};
389
+ };
390
+ imports?: {};
391
+ };
392
+ type ProjectDump = {
393
+ id: string;
394
+ name?: string;
395
+ title?: string | undefined;
396
+ };
397
+ type AuxFromDump<D> = D extends LikeC4ModelDump ? Aux<D[_stage] extends infer S extends 'computed' | 'layouted' ? S : 'computed' | 'layouted' | 'parsed', KeysOf<D['elements']>, KeysOf<D['deployments']['elements']>, KeysOf<D['views']>, D['projectId'] extends infer PID extends string ? PID : never, SpecTypesFromDump<D['specification']>> : Never;
398
+
399
+ interface RichTextEmpty {
400
+ readonly isEmpty: true;
401
+ readonly isMarkdown: false;
402
+ readonly nonEmpty: false;
403
+ readonly $source: null;
404
+ readonly text: null;
405
+ readonly md: null;
406
+ readonly html: null;
407
+ equals(other: unknown): boolean;
408
+ }
409
+ interface RichTextNonEmpty {
410
+ readonly isEmpty: false;
411
+ readonly nonEmpty: true;
412
+ readonly isMarkdown: boolean;
413
+ readonly $source: MarkdownOrString;
414
+ readonly text: string;
415
+ readonly md: string;
416
+ readonly html: string;
417
+ equals(other: unknown): boolean;
418
+ }
419
+ type RichTextOrEmpty = RichTextNonEmpty | RichTextEmpty;
420
+ /**
421
+ * RichText is a class that represents a potentially markdown string.
422
+ * It can be either a plain text or a markdown.
423
+ * It is used to represent the content of a node or a link.
424
+ */
425
+ declare class RichText {
426
+ private static _cache;
427
+ /**
428
+ * Creates and memoizes a RichText instance.
429
+ * @see ElementModel.description
430
+ * @example
431
+ *
432
+ * get description(): RichTextOrEmpty {
433
+ * return RichText.memoize(this, this.$element.description)
434
+ * }
435
+ */
436
+ static memoize(obj: object, tag: symbol | string, source: MarkdownOrString | null | undefined): RichTextOrEmpty;
437
+ /**
438
+ * Creates a RichText instance from a source.
439
+ */
440
+ static from(source: RichTextOrEmpty | MarkdownOrString | string | null | undefined): RichTextOrEmpty;
441
+ /**
442
+ * This is a workaround for the fact that we need instance of RichText for `instanceof` checks
443
+ * It is invalid inheritance (returning `null` from getters), and we cast to @see RichTextEmpty
444
+ */
445
+ static EMPTY: RichTextEmpty;
446
+ readonly $source: Readonly<MarkdownOrString> | null;
447
+ readonly isEmpty: boolean;
448
+ readonly nonEmpty: boolean;
449
+ readonly isMarkdown: boolean;
450
+ /**
451
+ * Private constructor to prevent direct instantiation.
452
+ * Use {@link RichText.from} or {@link RichText.memoize} instead.
453
+ */
454
+ private constructor();
455
+ /**
456
+ * Returns the text content of the rich text.
457
+ * If the source is a string, it returns the string.
458
+ * If the source is a markdown, it returns the markdown.
459
+ */
460
+ get text(): string;
461
+ /**
462
+ * Returns the markdown content of the rich text.
463
+ * If the source is a string, it returns the string.
464
+ * If the source is a markdown, it returns the markdown.
465
+ */
466
+ get md(): string;
467
+ /**
468
+ * Returns the html content of the rich text.
469
+ * If the source is a string, it returns the string.
470
+ * If the source is a markdown, it returns the HTML.
471
+ */
472
+ get html(): string;
473
+ equals(other: unknown): boolean;
474
+ }
475
+
476
+ export { type DeploymentViewRule as $, type AuxFromLikeC4ModelData as A, isViewRulePredicate as B, type ComputedLikeC4ModelData as C, type DeploymentNode as D, type ElementSpecification as E, isViewRuleStyle as F, isComputedView as G, isElementView as H, isScopedElementView as I, isExtendsElementView as J, isDeploymentView as K, type LayoutedLikeC4ModelData as L, isDynamicView as M, type DiagramNode as N, type DiagramEdge as O, type ParsedLikeC4ModelData as P, type LayoutedElementView as Q, RichText as R, type SpecificationDump as S, type TagSpecification as T, type LayoutedDeploymentView as U, type ViewOnStage as V, LayoutedDynamicView as W, type DeploymentViewIncludePredicate as X, type DeploymentViewExcludePredicate as Y, type DeploymentViewPredicate as Z, type DeploymentViewRuleStyle as _, type RichTextEmpty as a, type ParsedDeploymentView as a0, type RichTextOrEmpty as b, type LikeC4ModelData as c, type DeployedInstance as d, type DeploymentElement as e, type DeploymentElementRef as f, isDeployedInstance as g, type DeploymentRelationship as h, isDeploymentNode as i, type DeploymentRelation as j, type SpecTypesFromDump as k, type LikeC4ModelDump as l, type ProjectDump as m, type AuxFromDump as n, isTagColorSpecified as o, type RelationshipSpecification as p, type Specification as q, type ParsedView as r, type LayoutedView as s, isDiagramView as t, type ComputedView as u, type ProcessedView as v, type AnyView as w, type ViewWithType as x, type ViewRule as y, type ViewRulePredicate as z };
@@ -1,6 +1,6 @@
1
1
  import { IfNever, IsNever, IsLiteral } from 'type-fest';
2
- import { C as Coalesce, L as Link } from './core.DrvfVXkh.mjs';
3
- import { D as DeploymentFqn$1, F as Fqn$1, d as RelationId$1, N as NodeId$1, j as EdgeId$1, P as ProjectId$1, V as ViewId$1, T as Tag$1, E as ElementKind$1, b as DeploymentKind$1, c as RelationshipKind } from './core.DX-WYEPA.mjs';
2
+ import { C as Coalesce, L as Link } from './core.D5fzJWbF.mjs';
3
+ import { D as DeploymentFqn$1, F as Fqn$1, d as RelationId$1, N as NodeId$1, j as EdgeId$1, P as ProjectId$1, V as ViewId$1, T as Tag$1, E as ElementKind$1, b as DeploymentKind$1, c as RelationshipKind, M as MarkdownOrString } from './core.DX-WYEPA.mjs';
4
4
 
5
5
  /**
6
6
  * Determines the stage of the model:
@@ -172,6 +172,19 @@ type StrictTag<A> = A extends infer T extends Any ? Tag$1<Tag<T>> : never;
172
172
  type StrictElementKind<A> = A extends infer T extends Any ? ElementKind$1<ElementKind<T>> : never;
173
173
  type StrictDeploymentKind<A> = A extends infer T extends Any ? DeploymentKind$1<DeploymentKind<T>> : never;
174
174
  type StrictRelationKind<A> = A extends infer T extends Any ? RelationshipKind<RelationKind<T>> : never;
175
+ type WithDescriptionAndTech = {
176
+ readonly summary?: MarkdownOrString | null;
177
+ readonly description?: MarkdownOrString | null;
178
+ readonly technology?: string | null;
179
+ };
180
+ /**
181
+ * Returns summary if it is not null, otherwise returns description
182
+ */
183
+ declare function preferSummary(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
184
+ /**
185
+ * Returns description if it is not null, otherwise returns summary
186
+ */
187
+ declare function preferDescription(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
175
188
  type WithTags<A extends Any> = {
176
189
  readonly tags: Tags<A>;
177
190
  };
@@ -187,6 +200,9 @@ type WithOptionalLinks = {
187
200
  type WithMetadata<A extends Any> = {
188
201
  readonly metadata?: Metadata<A>;
189
202
  };
203
+ type WithNotation = {
204
+ readonly notation?: string | null;
205
+ };
190
206
  /**
191
207
  * @see {@link LiteralUnion} from type-fest (https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts)
192
208
  */
@@ -244,18 +260,22 @@ type _aux_UnknownComputed = UnknownComputed;
244
260
  type _aux_UnknownLayouted = UnknownLayouted;
245
261
  type _aux_UnknownParsed = UnknownParsed;
246
262
  type _aux_ViewId<A> = ViewId<A>;
263
+ type _aux_WithDescriptionAndTech = WithDescriptionAndTech;
247
264
  type _aux_WithLinks = WithLinks;
248
265
  type _aux_WithMetadata<A extends Any> = WithMetadata<A>;
266
+ type _aux_WithNotation = WithNotation;
249
267
  type _aux_WithOptionalLinks = WithOptionalLinks;
250
268
  type _aux_WithOptionalTags<A extends Any> = WithOptionalTags<A>;
251
269
  type _aux_WithTags<A extends Any> = WithTags<A>;
270
+ declare const _aux_preferDescription: typeof preferDescription;
271
+ declare const _aux_preferSummary: typeof preferSummary;
252
272
  type _aux_setProject<A, P extends string> = setProject<A, P>;
253
273
  type _aux_setStage<A, S extends ModelStage> = setStage<A, S>;
254
274
  type _aux_toComputed<A> = toComputed<A>;
255
275
  type _aux_toLayouted<A> = toLayouted<A>;
256
276
  type _aux_toParsed<A> = toParsed<A>;
257
277
  declare namespace _aux {
258
- export type { _aux_AllKinds as AllKinds, _aux_Any as Any, Any as AnyAux, _aux_AnySpec as AnySpec, _aux_Aux as Aux, _aux_DeploymentFqn as DeploymentFqn, _aux_DeploymentId as DeploymentId, _aux_DeploymentKind as DeploymentKind, _aux_EdgeId as EdgeId, _aux_ElementId as ElementId, _aux_ElementKind as ElementKind, _aux_Fqn as Fqn, _aux_LooseDeploymentId as LooseDeploymentId, _aux_LooseDeploymentKind as LooseDeploymentKind, _aux_LooseElementId as LooseElementId, _aux_LooseElementKind as LooseElementKind, _aux_LooseRelationKind as LooseRelationKind, _aux_LooseTag as LooseTag, _aux_LooseTags as LooseTags, _aux_LooseViewId as LooseViewId, _aux_Metadata as Metadata, _aux_MetadataKey as MetadataKey, _aux_Never as Never, _aux_NodeId as NodeId, _aux_OrString as OrString, _aux_PickByStage as PickByStage, _aux_ProjectId as ProjectId, _aux_RelationId as RelationId, _aux_RelationKind as RelationKind, _aux_Spec as Spec, _aux_SpecAux as SpecAux, _aux_Stage as Stage, DeploymentFqn as StrictDeploymentFqn, _aux_StrictDeploymentKind as StrictDeploymentKind, _aux_StrictElementKind as StrictElementKind, Fqn as StrictFqn, _aux_StrictProjectId as StrictProjectId, _aux_StrictRelationKind as StrictRelationKind, _aux_StrictTag as StrictTag, _aux_StrictViewId as StrictViewId, _aux_Tag as Tag, _aux_Tags as Tags, _aux_Unknown as Unknown, _aux_UnknownComputed as UnknownComputed, _aux_UnknownLayouted as UnknownLayouted, _aux_UnknownParsed as UnknownParsed, _aux_ViewId as ViewId, _aux_WithLinks as WithLinks, _aux_WithMetadata as WithMetadata, _aux_WithOptionalLinks as WithOptionalLinks, _aux_WithOptionalTags as WithOptionalTags, _aux_WithTags as WithTags, _aux_setProject as setProject, _aux_setStage as setStage, _aux_toComputed as toComputed, _aux_toLayouted as toLayouted, _aux_toParsed as toParsed };
278
+ export { type _aux_AllKinds as AllKinds, type _aux_Any as Any, type Any as AnyAux, type _aux_AnySpec as AnySpec, type _aux_Aux as Aux, type _aux_DeploymentFqn as DeploymentFqn, type _aux_DeploymentId as DeploymentId, type _aux_DeploymentKind as DeploymentKind, type _aux_EdgeId as EdgeId, type _aux_ElementId as ElementId, type _aux_ElementKind as ElementKind, type _aux_Fqn as Fqn, type _aux_LooseDeploymentId as LooseDeploymentId, type _aux_LooseDeploymentKind as LooseDeploymentKind, type _aux_LooseElementId as LooseElementId, type _aux_LooseElementKind as LooseElementKind, type _aux_LooseRelationKind as LooseRelationKind, type _aux_LooseTag as LooseTag, type _aux_LooseTags as LooseTags, type _aux_LooseViewId as LooseViewId, type _aux_Metadata as Metadata, type _aux_MetadataKey as MetadataKey, type _aux_Never as Never, type _aux_NodeId as NodeId, type _aux_OrString as OrString, type _aux_PickByStage as PickByStage, type _aux_ProjectId as ProjectId, type _aux_RelationId as RelationId, type _aux_RelationKind as RelationKind, type _aux_Spec as Spec, type _aux_SpecAux as SpecAux, type _aux_Stage as Stage, type DeploymentFqn as StrictDeploymentFqn, type _aux_StrictDeploymentKind as StrictDeploymentKind, type _aux_StrictElementKind as StrictElementKind, type Fqn as StrictFqn, type _aux_StrictProjectId as StrictProjectId, type _aux_StrictRelationKind as StrictRelationKind, type _aux_StrictTag as StrictTag, type _aux_StrictViewId as StrictViewId, type _aux_Tag as Tag, type _aux_Tags as Tags, type _aux_Unknown as Unknown, type _aux_UnknownComputed as UnknownComputed, type _aux_UnknownLayouted as UnknownLayouted, type _aux_UnknownParsed as UnknownParsed, type _aux_ViewId as ViewId, type _aux_WithDescriptionAndTech as WithDescriptionAndTech, type _aux_WithLinks as WithLinks, type _aux_WithMetadata as WithMetadata, type _aux_WithNotation as WithNotation, type _aux_WithOptionalLinks as WithOptionalLinks, type _aux_WithOptionalTags as WithOptionalTags, type _aux_WithTags as WithTags, _aux_preferDescription as preferDescription, _aux_preferSummary as preferSummary, type _aux_setProject as setProject, type _aux_setStage as setStage, type _aux_toComputed as toComputed, type _aux_toLayouted as toLayouted, type _aux_toParsed as toParsed };
259
279
  }
260
280
 
261
- export { type WithTags as $, type Any as A, type WithMetadata as B, type EdgeId as C, type DeploymentId as D, type ExtractOnStage as E, type Fqn as F, type AnySpec as G, type PickByStage as H, type setStage as I, type NodeId as J, type Spec as K, type LooseTag as L, type ModelStage as M, type Never as N, type StrictProjectId as O, type ProjectId as P, type StrictTag as Q, type RelationKind as R, type SpecAux as S, type Tag as T, type Unknown as U, type ViewId as V, type WithOptionalTags as W, type StrictElementKind as X, type StrictDeploymentKind as Y, type StrictRelationKind as Z, _aux as _, type Aux as a, type WithLinks as a0, type OrString as a1, type LooseTags as a2, type LooseElementKind as a3, type LooseDeploymentKind as a4, type LooseRelationKind as a5, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, _stage as e, _type as f, type StrictViewId as g, type ElementKind as h, isOnStage as i, type ElementId as j, type AllKinds as k, type Tags as l, type Metadata as m, type MetadataKey as n, type DeploymentKind as o, type RelationId as p, type LooseElementId as q, type LooseDeploymentId as r, type DeploymentFqn as s, type toComputed as t, type toLayouted as u, type Stage as v, type toParsed as w, type LooseViewId as x, type setProject as y, type WithOptionalLinks as z };
281
+ export { type StrictProjectId as $, type Any as A, type LooseElementId as B, type LooseDeploymentId as C, type DeploymentId as D, type ExtractOnStage as E, type Fqn as F, type toComputed as G, type toLayouted as H, type Stage as I, type toParsed as J, type LooseViewId as K, type LooseTag as L, type ModelStage as M, type NodeId as N, type setProject as O, type ProjectId as P, type AnySpec as Q, type RelationKind as R, type SpecAux as S, type Tag as T, type Unknown as U, type ViewId as V, type WithDescriptionAndTech as W, type PickByStage as X, type setStage as Y, type Spec as Z, _aux as _, type Aux as a, type StrictTag as a0, type StrictElementKind as a1, type StrictDeploymentKind as a2, type StrictRelationKind as a3, type WithLinks as a4, type OrString as a5, type LooseTags as a6, type LooseElementKind as a7, type LooseDeploymentKind as a8, type LooseRelationKind as a9, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, preferSummary as e, _stage as f, _type as g, type StrictViewId as h, isOnStage as i, type ElementKind as j, type ElementId as k, type AllKinds as l, type Tags as m, type WithOptionalTags as n, type WithOptionalLinks as o, preferDescription as p, type WithMetadata as q, type WithNotation as r, type DeploymentFqn as s, type DeploymentKind as t, type MetadataKey as u, type EdgeId as v, type Never as w, type WithTags as x, type Metadata as y, type RelationId as z };
@@ -1,9 +1,9 @@
1
- import { isFunction } from 'remeda';
1
+ import { e } from './core.DRJma0Ol.mjs';
2
2
  import { i as invariant } from './core.D4npX2q8.mjs';
3
3
 
4
4
  function isome(arg1, arg2) {
5
5
  const pred = arg2 ?? arg1;
6
- invariant(isFunction(pred));
6
+ invariant(e(pred));
7
7
  function _some(iter) {
8
8
  for (const value of iter) {
9
9
  if (pred(value)) {
@@ -0,0 +1,5 @@
1
+ const e={done:true,hasNext:false},t$1={done:false,hasNext:false},n$1=()=>e;
2
+
3
+ function t(e,...t){let a=e,o=t.map(e=>`lazy`in e?r(e):void 0),s=0;for(;s<t.length;){if(o[s]===void 0||!i(a)){let e=t[s];a=e(a),s+=1;continue}let e=[];for(let n=s;n<t.length;n++){let t=o[n];if(t===void 0||(e.push(t),t.isSingle))break}let r=[];for(let t of a)if(n(t,r,e))break;let{isSingle:c}=e.at(-1);a=c?r[0]:r,s+=e.length;}return a}function n(t,r,i){if(i.length===0)return r.push(t),false;let a=t,o=t$1,s=false;for(let[e,t]of i.entries()){let{index:c,items:l}=t;if(l.push(a),o=t(a,c,l),t.index+=1,o.hasNext){if(o.hasMany??false){for(let t of o.next)if(n(t,r,i.slice(e+1)))return true;return s}a=o.next;}if(!o.hasNext)break;o.done&&(s=true);}return o.hasNext&&r.push(a),s}function r(e){let{lazy:t,lazyArgs:n}=e,r=t(...n);return Object.assign(r,{isSingle:t.single??false,index:0,items:[]})}function i(e){return typeof e==`string`||typeof e==`object`&&!!e&&Symbol.iterator in e}
4
+
5
+ export { t$1 as a, n$1 as n, t };
@@ -1,9 +1,9 @@
1
- import { isFunction } from 'remeda';
1
+ import { e } from './core.DRJma0Ol.mjs';
2
2
  import { i as invariant } from './core.D4npX2q8.mjs';
3
3
 
4
4
  function ifind(arg1, arg2) {
5
5
  const pred = arg2 ?? arg1;
6
- invariant(isFunction(pred));
6
+ invariant(e(pred));
7
7
  function _find(iter) {
8
8
  for (const value of iter) {
9
9
  if (pred(value)) {
@@ -0,0 +1,7 @@
1
+ function e(e){return e!=null}
2
+
3
+ function isIterable(something) {
4
+ return e(something) && typeof something === "object" && Symbol.iterator in something;
5
+ }
6
+
7
+ export { e, isIterable as i };