@likec4/core 1.41.0 → 1.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,6 +1,15 @@
1
- import { isTruthy, anyPass, allPass, isNot, isString, isNullish } from 'remeda';
1
+ import { e as e$1 } from './core.BKlholso.mjs';
2
+ import { t as t$2 } from './core.BsSXS-_R.mjs';
3
+ import { e as e$2 } from './core.BoYfZOBm.mjs';
4
+ import { e as e$3 } from './core.CqAJJpK_.mjs';
2
5
  import { n as nonexhaustive } from './core.D4npX2q8.mjs';
3
6
 
7
+ function t$1(...t){return t$2(n$1,t)}const n$1=(e,t)=>t.every(t=>t(e));
8
+
9
+ function t(...t){return t$2(n,t)}const n=(e,t)=>t.some(t=>t(e));
10
+
11
+ function e(e){return e==null}
12
+
4
13
  function isOnStage(value, stage) {
5
14
  return value[_stage] === stage;
6
15
  }
@@ -8,10 +17,10 @@ const _stage = "_stage";
8
17
  const _type = "_type";
9
18
 
10
19
  function isDeploymentNode(el) {
11
- return isTruthy(el.kind) && !isTruthy(el.element);
20
+ return e$1(el.kind) && !e$1(el.element);
12
21
  }
13
22
  function isDeployedInstance(el) {
14
- return isTruthy(el.element) && !isTruthy(el.kind);
23
+ return e$1(el.element) && !e$1(el.kind);
15
24
  }
16
25
 
17
26
  function isTagEqual(operator) {
@@ -40,8 +49,8 @@ function whereOperatorAsPredicate(operator) {
40
49
  return participantIs(participant, participantPredicate);
41
50
  }
42
51
  case isTagEqual(operator): {
43
- if (isString(operator.tag) || "eq" in operator.tag) {
44
- const tag2 = isString(operator.tag) ? operator.tag : operator.tag.eq;
52
+ if (e$3(operator.tag) || "eq" in operator.tag) {
53
+ const tag2 = e$3(operator.tag) ? operator.tag : operator.tag.eq;
45
54
  return (value) => {
46
55
  return Array.isArray(value.tags) && value.tags.includes(tag2);
47
56
  };
@@ -52,28 +61,28 @@ function whereOperatorAsPredicate(operator) {
52
61
  };
53
62
  }
54
63
  case isKindEqual(operator): {
55
- if (isString(operator.kind) || "eq" in operator.kind) {
56
- const kind2 = isString(operator.kind) ? operator.kind : operator.kind.eq;
64
+ if (e$3(operator.kind) || "eq" in operator.kind) {
65
+ const kind2 = e$3(operator.kind) ? operator.kind : operator.kind.eq;
57
66
  return (value) => {
58
67
  return value.kind === kind2;
59
68
  };
60
69
  }
61
70
  const kind = operator.kind.neq;
62
71
  return (value) => {
63
- return isNullish(value.kind) || value.kind !== kind;
72
+ return e(value.kind) || value.kind !== kind;
64
73
  };
65
74
  }
66
75
  case isNotOperator(operator): {
67
76
  const predicate = whereOperatorAsPredicate(operator.not);
68
- return isNot(predicate);
77
+ return e$2(predicate);
69
78
  }
70
79
  case isAndOperator(operator): {
71
80
  const predicates = operator.and.map(whereOperatorAsPredicate);
72
- return allPass(predicates);
81
+ return t$1(predicates);
73
82
  }
74
83
  case isOrOperator(operator): {
75
84
  const predicates = operator.or.map(whereOperatorAsPredicate);
76
- return anyPass(predicates);
85
+ return t(predicates);
77
86
  }
78
87
  default:
79
88
  nonexhaustive(operator);
@@ -95,4 +104,4 @@ function participantIs(participant, predicate) {
95
104
  };
96
105
  }
97
106
 
98
- export { _stage as _, _type as a, isDeploymentNode as b, isDeployedInstance as c, isTagEqual as d, isKindEqual as e, isParticipantOperator as f, isNotOperator as g, isAndOperator as h, isOnStage as i, isOrOperator as j, whereOperatorAsPredicate as w };
107
+ export { _stage as _, _type as a, isDeploymentNode as b, isDeployedInstance as c, isTagEqual as d, isKindEqual as e, isParticipantOperator as f, isNotOperator as g, isAndOperator as h, isOnStage as i, isOrOperator as j, e as k, t, whereOperatorAsPredicate as w };
@@ -1,4 +1,4 @@
1
- import { r as getDefaultExportFromCjs } from './core.DgttqsJc.mjs';
1
+ import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
2
2
 
3
3
  /**
4
4
  * Mnemonist DefaultMap
@@ -0,0 +1,3 @@
1
+ function e(e){return t=>!e(t)}
2
+
3
+ export { e };
@@ -0,0 +1,7 @@
1
+ function e(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}
2
+
3
+ function t$1(t,n,r){let i=t.length-n.length;if(i===0)return t(...n);if(i===1)return e(t,n,r);throw Error(`Wrong number of arguments`)}
4
+
5
+ function t(...t){return t$1(n,t)}const n=(e,t)=>e.length>=t;
6
+
7
+ export { t as a, t$1 as t };
@@ -1,9 +1,7 @@
1
- import { omitBy, isTruthy, isArray } from 'remeda';
2
- import { e as isStepEdgeId } from './core.Be1n9a0i.mjs';
1
+ import { e as e$1 } from './core.BKlholso.mjs';
2
+ import { e as isStepEdgeId } from './core.C_Ni6yHl.mjs';
3
3
 
4
- function omitUndefined(a) {
5
- return omitBy(a, (v) => v === void 0);
6
- }
4
+ function e(e){return Array.isArray(e)}
7
5
 
8
6
  function isViewRulePredicate(rule) {
9
7
  return "include" in rule || "exclude" in rule;
@@ -21,10 +19,10 @@ function isElementView(view) {
21
19
  return view._type === "element";
22
20
  }
23
21
  function isScopedElementView(view) {
24
- return isElementView(view) && isTruthy(view.viewOf);
22
+ return isElementView(view) && e$1(view.viewOf);
25
23
  }
26
24
  function isExtendsElementView(view) {
27
- return isElementView(view) && isTruthy(view.extends);
25
+ return isElementView(view) && e$1(view.extends);
28
26
  }
29
27
  function isDeploymentView(view) {
30
28
  return view._type === "deployment";
@@ -52,12 +50,18 @@ function getParallelStepsPrefix(id) {
52
50
  }
53
51
  return null;
54
52
  }
55
- function isDynamicViewParallelSteps(step) {
56
- return "__parallel" in step && isArray(step.__parallel);
53
+ function isDynamicStep(step) {
54
+ return !!step && !("__series" in step || "__parallel" in step);
55
+ }
56
+ function isDynamicStepsParallel(step) {
57
+ return !!step && "__parallel" in step && e(step.__parallel);
58
+ }
59
+ function isDynamicStepsSeries(step) {
60
+ return !!step && "__series" in step && e(step.__series);
57
61
  }
58
62
 
59
63
  function isViewRuleGroup(rule) {
60
64
  return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
61
65
  }
62
66
 
63
- export { isViewRuleStyle as a, isComputedView as b, isDiagramView as c, isElementView as d, isScopedElementView as e, isExtendsElementView as f, isDeploymentView as g, isDynamicView as h, isViewRulePredicate as i, isViewRuleGlobalStyle as j, isViewRuleGlobalPredicateRef as k, isAutoLayoutDirection as l, isViewRuleAutoLayout as m, getParallelStepsPrefix as n, omitUndefined as o, isDynamicViewParallelSteps as p, isViewRuleGroup as q };
67
+ export { isViewRuleStyle as a, isComputedView as b, isDiagramView as c, isElementView as d, isScopedElementView as e, isExtendsElementView as f, isDeploymentView as g, isDynamicView as h, isViewRulePredicate as i, isViewRuleGlobalStyle as j, isViewRuleGlobalPredicateRef as k, isAutoLayoutDirection as l, isViewRuleAutoLayout as m, getParallelStepsPrefix as n, isDynamicStep as o, isDynamicStepsParallel as p, isDynamicStepsSeries as q, isViewRuleGroup as r, e as s };
@@ -1,4 +1,4 @@
1
- import { hasAtLeast } from 'remeda';
1
+ import { a as t } from './core.BsSXS-_R.mjs';
2
2
  import { i as invariant } from './core.D4npX2q8.mjs';
3
3
 
4
4
  var set = {};
@@ -385,7 +385,7 @@ function intersection(first, ...sets) {
385
385
  if (first.size === 0) {
386
386
  return result;
387
387
  }
388
- let other = hasAtLeast(sets, 2) ? setExports.intersection(...sets) : sets[0];
388
+ let other = t(sets, 2) ? setExports.intersection(...sets) : sets[0];
389
389
  if (other.size === 0) {
390
390
  return result;
391
391
  }
@@ -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 imap(arg1, arg2) {
5
5
  const mapper = arg2 ?? arg1;
6
- invariant(isFunction(mapper));
6
+ invariant(e(mapper));
7
7
  function* _map(iter) {
8
8
  for (const value of iter) {
9
9
  yield mapper(value);
@@ -29,4 +29,4 @@ function toSet(iterable) {
29
29
  return (it) => new Set(it);
30
30
  }
31
31
 
32
- export { toSet as a, imap as i, toArray as t };
32
+ export { toArray as a, imap as i, toSet as t };
@@ -1,3 +1,5 @@
1
+ function e(e){return e!==void 0}
2
+
1
3
  function iflat(iterable) {
2
4
  return iterable ? _iflat(iterable) : _iflat;
3
5
  }
@@ -22,4 +24,4 @@ function* _iunique(iterable) {
22
24
  return;
23
25
  }
24
26
 
25
- export { iunique as a, iflat as i };
27
+ export { iunique as a, e, iflat as i };
@@ -1,8 +1,17 @@
1
- import { r as getDefaultExportFromCjs } from './core.DgttqsJc.mjs';
2
- import { r as requireIterator, a as requireForeach } from './core.CaT0SUUK.mjs';
3
- import { pipe, zip, takeWhile, map, isNonNullish } from 'remeda';
1
+ import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
2
+ import { a as requireIterator } from './core.rCeaAqgW.mjs';
3
+ import { r as requireForeach } from './core.1vX5a9AY.mjs';
4
+ import { t as t$3 } from './core.OHD4KXm9.mjs';
5
+ import { t as t$4 } from './core.CbT8JVYL.mjs';
6
+ import { t as t$2 } from './core.BsSXS-_R.mjs';
7
+ import { k as commonAncestor, m as compareFqnHierarchically } from './core.DRhg-gVU.mjs';
8
+ import { e } from './core.RfnaEmgA.mjs';
4
9
  import { i as invariant } from './core.D4npX2q8.mjs';
5
10
 
11
+ function t$1(...t){return t$2(n$1,t)}function n$1(e,t){let n=[];for(let[r,i]of e.entries()){if(!t(i,r,e))break;n.push(i);}return n}
12
+
13
+ function t(...t){return t$2(n,t,r)}const n=(e,t)=>e.length<t.length?e.map((e,n)=>[e,t[n]]):t.map((t,n)=>[e[n],t]),r=e=>(t,n)=>({hasNext:true,next:[t,e[n]],done:n>=e.length-1});
14
+
6
15
  /**
7
16
  * Mnemonist Stack
8
17
  * ================
@@ -231,13 +240,33 @@ function commonHead(sources, targets, equals) {
231
240
  return [];
232
241
  }
233
242
  equals ??= Object.is;
234
- return pipe(
235
- zip(sources, targets),
236
- takeWhile(([source, target]) => equals(source, target)),
237
- map(([source, _]) => source)
243
+ return t$3(
244
+ t(sources, targets),
245
+ t$1(([source, target]) => equals(source, target)),
246
+ t$4(([source, _]) => source)
238
247
  );
239
248
  }
240
249
 
250
+ const compareRelations = (a, b) => {
251
+ const parentA = commonAncestor(a.source.id, a.target.id);
252
+ const parentB = commonAncestor(b.source.id, b.target.id);
253
+ if (parentA && !parentB) {
254
+ return 1;
255
+ }
256
+ if (!parentA && parentB) {
257
+ return -1;
258
+ }
259
+ const compareParents = parentA && parentB ? compareFqnHierarchically(parentA, parentB) : 0;
260
+ if (compareParents !== 0) {
261
+ return compareParents;
262
+ }
263
+ const compareSource = compareFqnHierarchically(a.source.id, b.source.id);
264
+ if (compareSource !== 0) {
265
+ return compareSource;
266
+ }
267
+ return compareFqnHierarchically(a.target.id, b.target.id);
268
+ };
269
+
241
270
  function commonjsRequire(path) {
242
271
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
243
272
  }
@@ -260,7 +289,7 @@ const objecthash = /*@__PURE__*/getDefaultExportFromCjs(object_hashExports);
260
289
 
261
290
  function objectHash(value) {
262
291
  invariant(
263
- typeof value === "object" && isNonNullish(value),
292
+ typeof value === "object" && e(value),
264
293
  "objectHash: value must be an object"
265
294
  );
266
295
  return objecthash(value, {
@@ -269,4 +298,4 @@ function objectHash(value) {
269
298
  });
270
299
  }
271
300
 
272
- export { Stack as S, commonHead as c, objectHash as o };
301
+ export { Stack as S, compareRelations as a, t as b, commonHead as c, objectHash as o, t$1 as t };