@likec4/core 1.19.2 → 1.20.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 (80) hide show
  1. package/dist/builder/index.cjs +881 -0
  2. package/dist/builder/index.d.cts +503 -0
  3. package/dist/builder/index.d.mts +4 -3
  4. package/dist/builder/index.d.ts +4 -3
  5. package/dist/builder/{index.js → index.mjs} +14 -4
  6. package/dist/compute-view/index.cjs +86 -0
  7. package/dist/compute-view/index.d.cts +23 -0
  8. package/dist/compute-view/index.d.mts +3 -2
  9. package/dist/compute-view/index.d.ts +3 -2
  10. package/dist/compute-view/{index.js → index.mjs} +6 -5
  11. package/dist/index.cjs +4320 -0
  12. package/dist/index.d.cts +270 -0
  13. package/dist/index.d.mts +130 -4
  14. package/dist/index.d.ts +130 -4
  15. package/dist/{index.js → index.mjs} +512 -7
  16. package/dist/model/index.cjs +40 -0
  17. package/dist/model/index.d.cts +259 -0
  18. package/dist/model/index.d.mts +3 -3
  19. package/dist/model/index.d.ts +3 -3
  20. package/dist/model/index.mjs +1 -0
  21. package/dist/shared/core.B2QYWlYe.cjs +435 -0
  22. package/dist/shared/core.B72vUaNB.d.cts +850 -0
  23. package/dist/shared/core.BGus30EM.cjs +8027 -0
  24. package/dist/shared/core.BRuJ3Wzf.d.mts +12 -0
  25. package/dist/shared/{core.CqXs9Frh.d.ts → core.BdbFkE_p.d.cts} +10 -4
  26. package/dist/shared/core.BvdNMbcA.d.cts +12 -0
  27. package/dist/shared/{object_hash.CE_oF3I3.js → core.BxvDITEI.mjs} +26 -389
  28. package/dist/shared/core.ByNgh-mC.d.cts +127 -0
  29. package/dist/shared/core.C9DCnJh8.cjs +908 -0
  30. package/dist/shared/{index.KOeaSlL8.js → core.CqCTxzMY.mjs} +787 -372
  31. package/dist/shared/core.D74xkKkG.d.cts +148 -0
  32. package/dist/shared/{core.DyJ41fBO.d.ts → core.D_Gc58Gt.d.ts} +12 -4
  33. package/dist/shared/core.Damrzla-.d.ts +12 -0
  34. package/dist/shared/{core.BL1oTk7-.d.mts → core.Dfzrh1VA.d.mts} +12 -4
  35. package/dist/shared/core.DsoCu540.cjs +26 -0
  36. package/dist/shared/{view.DrmaOfjr.js → core.DunIMHRf.mjs} +24 -1
  37. package/dist/shared/{core.2I-l5UtM.d.mts → core.ZWiGANIJ.d.ts} +10 -4
  38. package/dist/shared/core.gv1bMwCC.cjs +39 -0
  39. package/dist/shared/core.jy6z2iRn.d.mts +729 -0
  40. package/dist/shared/core.m3rCQAv6.mjs +37 -0
  41. package/dist/types/index.cjs +107 -0
  42. package/dist/types/index.d.cts +72 -0
  43. package/dist/types/index.d.mts +2 -2
  44. package/dist/types/index.d.ts +2 -2
  45. package/dist/types/{index.js → index.mjs} +1 -1
  46. package/dist/utils/index.cjs +95 -0
  47. package/dist/utils/index.d.cts +356 -0
  48. package/dist/utils/index.d.mts +1 -64
  49. package/dist/utils/index.d.ts +1 -64
  50. package/dist/utils/index.mjs +56 -0
  51. package/package.json +51 -25
  52. package/src/builder/Builder.view-common.ts +20 -1
  53. package/src/compute-view/deployment-view/predicates/relation-direct.ts +26 -29
  54. package/src/compute-view/deployment-view/predicates/relation-incoming.ts +1 -1
  55. package/src/compute-view/deployment-view/predicates/utils.ts +47 -16
  56. package/src/compute-view/element-view/__test__/fixture.ts +17 -4
  57. package/src/compute-view/element-view/compute.ts +3 -2
  58. package/src/compute-view/element-view/predicates.ts +520 -0
  59. package/src/compute-view/element-view/utils.ts +11 -7
  60. package/src/compute-view/index.ts +1 -0
  61. package/src/compute-view/relationships-view/_types.ts +16 -0
  62. package/src/compute-view/relationships-view/compute.ts +74 -0
  63. package/src/compute-view/relationships-view/layout.ts +357 -0
  64. package/src/compute-view/relationships-view/utils.ts +40 -0
  65. package/src/compute-view/utils/relationExpressionToPredicates.ts +11 -4
  66. package/src/index.ts +16 -0
  67. package/src/model/DeploymentElementModel.ts +4 -0
  68. package/src/model/ElementModel.ts +13 -0
  69. package/src/model/LikeC4Model.ts +2 -2
  70. package/src/model/RelationModel.ts +5 -0
  71. package/src/model/guards.ts +17 -1
  72. package/src/model/view/LikeC4ViewModel.ts +7 -1
  73. package/src/model/view/NodeModel.ts +5 -0
  74. package/src/types/operators.ts +42 -2
  75. package/src/types/view.ts +2 -2
  76. package/src/utils/index.ts +0 -5
  77. package/src/utils/iterable/unique.ts +1 -7
  78. package/dist/model/index.js +0 -1
  79. package/dist/utils/index.js +0 -347
  80. /package/dist/shared/{chunk-RAAYCPUM.M-JWF7SS.js → core.M-JWF7SS.mjs} +0 -0
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "1.19.2",
3
+ "version": "1.20.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/likec4/likec4.git",
9
+ "url": "git+https://github.com/likec4/likec4.git",
10
10
  "directory": "packages/core"
11
11
  },
12
12
  "bugs": "https://github.com/likec4/likec4/issues",
@@ -16,7 +16,8 @@
16
16
  "lint": "run -T eslint src/ --fix",
17
17
  "test": "vitest run --no-isolate",
18
18
  "test:watch": "vitest",
19
- "clean": "rm -r -f dist"
19
+ "clean": "rm -r -f dist",
20
+ "package": "yarn pack"
20
21
  },
21
22
  "files": [
22
23
  "dist",
@@ -30,50 +31,74 @@
30
31
  "exports": {
31
32
  ".": {
32
33
  "sources": "./src/index.ts",
34
+ "require": {
35
+ "types": "./dist/index.d.cts",
36
+ "default": "./dist/index.cjs"
37
+ },
33
38
  "default": {
34
- "types": "./dist/index.d.ts",
35
- "import": "./dist/index.js",
36
- "default": "./dist/index.js"
39
+ "types": "./dist/index.d.mts",
40
+ "import": "./dist/index.mjs",
41
+ "default": "./dist/index.mjs"
37
42
  }
38
43
  },
39
44
  "./builder": {
40
45
  "sources": "./src/builder/index.ts",
46
+ "require": {
47
+ "types": "./dist/builder/index.d.cts",
48
+ "default": "./dist/builder/index.cjs"
49
+ },
41
50
  "default": {
42
- "types": "./dist/builder/index.d.ts",
43
- "import": "./dist/builder/index.js",
44
- "default": "./dist/builder/index.js"
51
+ "types": "./dist/builder/index.d.mts",
52
+ "import": "./dist/builder/index.mjs",
53
+ "default": "./dist/builder/index.mjs"
45
54
  }
46
55
  },
47
56
  "./compute-view": {
48
57
  "sources": "./src/compute-view/index.ts",
58
+ "require": {
59
+ "types": "./dist/compute-view/index.d.cts",
60
+ "default": "./dist/compute-view/index.cjs"
61
+ },
49
62
  "default": {
50
- "types": "./dist/compute-view/index.d.ts",
51
- "import": "./dist/compute-view/index.js",
52
- "default": "./dist/compute-view/index.js"
63
+ "types": "./dist/compute-view/index.d.mts",
64
+ "import": "./dist/compute-view/index.mjs",
65
+ "default": "./dist/compute-view/index.mjs"
53
66
  }
54
67
  },
55
68
  "./model": {
56
69
  "sources": "./src/model/index.ts",
70
+ "require": {
71
+ "types": "./dist/model/index.d.cts",
72
+ "default": "./dist/model/index.cjs"
73
+ },
57
74
  "default": {
58
- "types": "./dist/model/index.d.ts",
59
- "import": "./dist/model/index.js",
60
- "default": "./dist/model/index.js"
75
+ "types": "./dist/model/index.d.mts",
76
+ "import": "./dist/model/index.mjs",
77
+ "default": "./dist/model/index.mjs"
61
78
  }
62
79
  },
63
80
  "./utils": {
64
81
  "sources": "./src/utils/index.ts",
82
+ "require": {
83
+ "types": "./dist/utils/index.d.cts",
84
+ "default": "./dist/utils/index.cjs"
85
+ },
65
86
  "default": {
66
- "types": "./dist/utils/index.d.ts",
67
- "import": "./dist/utils/index.js",
68
- "default": "./dist/utils/index.js"
87
+ "types": "./dist/utils/index.d.mts",
88
+ "import": "./dist/utils/index.mjs",
89
+ "default": "./dist/utils/index.mjs"
69
90
  }
70
91
  },
71
92
  "./types": {
72
93
  "sources": "./src/types/index.ts",
94
+ "require": {
95
+ "types": "./dist/types/index.d.cts",
96
+ "default": "./dist/types/index.cjs"
97
+ },
73
98
  "default": {
74
- "types": "./dist/types/index.d.ts",
75
- "import": "./dist/types/index.js",
76
- "default": "./dist/types/index.js"
99
+ "types": "./dist/types/index.d.mts",
100
+ "import": "./dist/types/index.mjs",
101
+ "default": "./dist/types/index.mjs"
77
102
  }
78
103
  }
79
104
  },
@@ -85,7 +110,8 @@
85
110
  "type-fest": "4.28.1"
86
111
  },
87
112
  "devDependencies": {
88
- "@likec4/tsconfig": "1.19.2",
113
+ "@dagrejs/dagre": "1.1.4",
114
+ "@likec4/tsconfig": "1.20.0",
89
115
  "@mantine/colors-generator": "7.15.2",
90
116
  "@types/natural-compare-lite": "^1.4.2",
91
117
  "@types/object-hash": "^3.0.6",
@@ -98,10 +124,10 @@
98
124
  "natural-compare-lite": "^1.4.0",
99
125
  "object-hash": "^3.0.0",
100
126
  "obliterator": "^2.0.4",
101
- "remeda": "^2.17.4",
127
+ "remeda": "^2.19.0",
102
128
  "turbo": "^2.3.3",
103
- "typescript": "^5.7.2",
104
- "unbuild": "^3.1.0",
129
+ "typescript": "^5.7.3",
130
+ "unbuild": "^3.2.0",
105
131
  "vitest": "^2.1.8"
106
132
  },
107
133
  "packageManager": "yarn@4.6.0"
@@ -6,11 +6,12 @@ import {
6
6
  type CustomRelationExpr,
7
7
  type ElementExpression as C4ElementExpression,
8
8
  type Expression as C4Expression,
9
- isElementPredicateExpr,
10
9
  type NonEmptyArray,
11
10
  type ViewRuleStyle,
12
11
  type WhereOperator,
12
+ isElementPredicateExpr,
13
13
  } from '../types'
14
+ import type { KindEqual, Participant, TagEqual } from '../types/operators'
14
15
  import type { AnyTypes, Types } from './_types'
15
16
 
16
17
  export interface LikeC4ViewBuilder<
@@ -59,10 +60,14 @@ export namespace ViewPredicate {
59
60
 
60
61
  export type WhereTag<Tag extends string> = `tag ${'is' | 'is not'} #${Tag}`
61
62
  export type WhereKind<Kind extends string> = `kind ${'is' | 'is not'} ${Kind}`
63
+ export type WhereParticipant<Types extends AnyTypes> = `${Participant}.${
64
+ | WhereTag<Types['Tag']>
65
+ | WhereKind<Types['ElementKind']>}`
62
66
 
63
67
  export type WhereEq<Types extends AnyTypes> =
64
68
  | ViewPredicate.WhereTag<Types['Tag']>
65
69
  | ViewPredicate.WhereKind<Types['ElementKind']>
70
+ | ViewPredicate.WhereParticipant<Types>
66
71
 
67
72
  export type WhereOperator<Types extends AnyTypes> = ViewPredicate.WhereEq<Types> | {
68
73
  and: NonEmptyArray<ViewPredicate.WhereOperator<Types>>
@@ -116,6 +121,20 @@ function parseWhere(where: ViewPredicate.WhereOperator<AnyTypes>): WhereOperator
116
121
  eq: op.replace('kind is ', ''),
117
122
  },
118
123
  }
124
+ case op.startsWith('source.'):
125
+ return {
126
+ operator: parseWhere(op.replace('source.', '') as ViewPredicate.WhereOperator<AnyTypes>) as
127
+ | KindEqual<string>
128
+ | TagEqual<string>,
129
+ participant: 'source',
130
+ }
131
+ case op.startsWith('target.'):
132
+ return {
133
+ operator: parseWhere(op.replace('target.', '') as ViewPredicate.WhereOperator<AnyTypes>) as
134
+ | KindEqual<string>
135
+ | TagEqual<string>,
136
+ participant: 'target',
137
+ }
119
138
  default:
120
139
  throw new Error(`Unknown where operator: ${where}`)
121
140
  }
@@ -1,4 +1,4 @@
1
- import { filter, flatMap, isNonNullish, pick, pipe } from 'remeda'
1
+ import { filter, flatMap, isNonNullish, map, pick, pipe } from 'remeda'
2
2
  import { invariant } from '../../../errors'
3
3
  import type {
4
4
  ConnectionModel,
@@ -53,10 +53,14 @@ export const DirectRelationPredicate: PredicateExecutor<RelationExpr.Direct> = {
53
53
  switch (true) {
54
54
  // * -> *
55
55
  case sourceIsWildcard && targetIsWildcard: {
56
- connections = findConnectionsWithin(model.instances()).map(c => {
57
- stage.addImplicit(c.boundary)
58
- return c
59
- })
56
+ connections = pipe(
57
+ findConnectionsWithin(model.instances()),
58
+ applyPredicate(where),
59
+ map(c => {
60
+ stage.addImplicit(c.boundary)
61
+ return c
62
+ }),
63
+ )
60
64
  break
61
65
  }
62
66
 
@@ -71,12 +75,15 @@ export const DirectRelationPredicate: PredicateExecutor<RelationExpr.Direct> = {
71
75
  postFilter = c => isSource(c) !== isTarget(c)
72
76
  }
73
77
 
74
- connections = sources
75
- .flatMap(source => {
78
+ connections = pipe(
79
+ sources,
80
+ flatMap(source => {
76
81
  const targets = resolveAscendingSiblings(source)
77
82
  return findConnectionsBetween(source, targets, dir)
78
- })
79
- .filter(postFilter)
83
+ }),
84
+ filter(postFilter),
85
+ applyPredicate(where),
86
+ )
80
87
  break
81
88
  }
82
89
  // * -> target; * <-> target
@@ -90,12 +97,15 @@ export const DirectRelationPredicate: PredicateExecutor<RelationExpr.Direct> = {
90
97
  postFilter = c => isSource(c) !== isTarget(c)
91
98
  }
92
99
 
93
- connections = targets
94
- .flatMap(target => {
100
+ connections = pipe(
101
+ targets,
102
+ flatMap(target => {
95
103
  const sources = resolveAscendingSiblings(target)
96
104
  return [...sources].flatMap(source => findConnection(source, target, dir))
97
- })
98
- .filter(postFilter)
105
+ }),
106
+ filter(postFilter),
107
+ applyPredicate(where),
108
+ )
99
109
  break
100
110
  }
101
111
  default: {
@@ -109,8 +119,9 @@ export const DirectRelationPredicate: PredicateExecutor<RelationExpr.Direct> = {
109
119
 
110
120
  connections = pipe(
111
121
  sources,
112
- flatMap(s => matchConnections(findConnectionsBetween(s, targets, dir), where)),
122
+ flatMap(s => findConnectionsBetween(s, targets, dir)),
113
123
  filter(c => isSource(c) && isTarget(c)),
124
+ applyPredicate(where),
114
125
  )
115
126
  }
116
127
  }
@@ -134,7 +145,7 @@ export const DirectRelationPredicate: PredicateExecutor<RelationExpr.Direct> = {
134
145
  switch (true) {
135
146
  // * -> *
136
147
  case FqnExpr.isWildcard(expr.source) && FqnExpr.isWildcard(expr.target):
137
- stage.excludeConnections(matchConnections(memory.connections, where))
148
+ stage.excludeConnections(applyPredicate(memory.connections, where))
138
149
  return stage
139
150
 
140
151
  // model -> model
@@ -250,17 +261,3 @@ function matchConnection<M extends AnyAux>(
250
261
  ]
251
262
  .filter(where).length > 0
252
263
  }
253
-
254
- function matchConnections<M extends AnyAux>(
255
- connections: readonly DeploymentConnectionModel<M>[],
256
- where: OperatorPredicate<Filterable> | null,
257
- ): readonly DeploymentConnectionModel[] {
258
- if (!where) {
259
- return connections
260
- }
261
-
262
- return pipe(
263
- connections,
264
- filter(c => matchConnection(c, where)),
265
- )
266
- }
@@ -8,7 +8,7 @@ import { isAncestor } from '../../../utils'
8
8
  import type { Connection, Elem, PredicateExecutor } from '../_types'
9
9
  import { resolveElements, resolveModelElements } from '../utils'
10
10
  import { resolveAscendingSiblings } from './relation-direct'
11
- import { applyPredicate, excludeModelRelations, matchConnection, matchConnections } from './utils'
11
+ import { applyPredicate, excludeModelRelations } from './utils'
12
12
 
13
13
  // from visible element incoming to this
14
14
  export const IncomingRelationPredicate: PredicateExecutor<RelationExpr.Incoming> = {
@@ -1,7 +1,13 @@
1
1
  import { filter, isArray, map, pick, pipe } from 'remeda'
2
2
  import { nonexhaustive } from '../../../errors'
3
- import type { DeploymentConnectionModel } from '../../../model'
4
- import type { DeploymentElementModel, DeploymentRelationModel } from '../../../model/DeploymentElementModel'
3
+ import { type DeploymentConnectionModel, ElementModel, isDeployedInstance, isDeploymentNode } from '../../../model'
4
+ import type {
5
+ DeploymentElementModel,
6
+ DeploymentRelationEndpoint,
7
+ DeploymentRelationModel,
8
+ } from '../../../model/DeploymentElementModel'
9
+ import { isElementModel } from '../../../model/ElementModel'
10
+ import { isDeploymentElementModel, isNestedElementOfDeployedInstanceModel } from '../../../model/guards'
5
11
  import type { RelationshipModel } from '../../../model/RelationModel'
6
12
  import type { AnyAux } from '../../../model/types'
7
13
  import { type Filterable, type OperatorPredicate, FqnExpr, RelationExpr } from '../../../types'
@@ -143,10 +149,9 @@ export function applyPredicate<M extends AnyAux>(
143
149
  .filter(x => x.nonEmpty())
144
150
  }
145
151
 
146
- const map = toFilterableRelation(c.source, c.target)
147
152
  return c.update({
148
- model: new Set([...c.relations.model.values()].filter(r => where(map(r)))),
149
- deployment: new Set([...c.relations.deployment.values()].filter(r => where(map(r)))),
153
+ model: new Set([...c.relations.model.values()].filter(r => where(toFilterableRelation(c)(r)))),
154
+ deployment: new Set([...c.relations.deployment.values()].filter(r => where(toFilterableRelation(c)(r)))),
150
155
  })
151
156
  }
152
157
 
@@ -164,20 +169,46 @@ export function matchConnections<M extends AnyAux>(
164
169
  )
165
170
  }
166
171
 
167
- function elementToFilterable<M extends AnyAux>(element: DeploymentElementModel<M>) {
168
- return pick(element, ['tags', 'kind'])
172
+ /**
173
+ * Builds filterable presentation for relation endpoint. Enriches model properties with deployment properties when needed.
174
+ * @param relationEndpoint Endpoint for which to build presentation
175
+ * @param connectionEndpoint Endpoint of connection which was build from the relation.
176
+ * @returns Presentation of the endpoint for usage in predicates
177
+ */
178
+ function toFilterable<M extends AnyAux>(
179
+ relationEndpoint: ElementModel<M> | DeploymentRelationEndpoint<M>,
180
+ connectionEndpoint: DeploymentRelationEndpoint<M>,
181
+ ): Filterable {
182
+ if (isElementModel(relationEndpoint)) { // Element itself. Extend with tags of the deployed instance (TODO)
183
+ const deployedInstance = isDeploymentElementModel(connectionEndpoint) && isDeployedInstance(connectionEndpoint)
184
+ ? connectionEndpoint
185
+ : null
186
+ return {
187
+ kind: relationEndpoint.kind,
188
+ tags: [...relationEndpoint.tags, ...(deployedInstance?.tags ?? [])],
189
+ }
190
+ }
191
+ if (isNestedElementOfDeployedInstanceModel(relationEndpoint)) { // Nested element. Has no own instance. No need to extend
192
+ return pick(relationEndpoint.element, ['tags', 'kind'])
193
+ }
194
+ if (isDeployedInstance(relationEndpoint)) { // Deployed instance. Extend with tags of the model element
195
+ return {
196
+ kind: relationEndpoint.element.kind,
197
+ tags: [...relationEndpoint.tags, ...relationEndpoint.element.tags],
198
+ }
199
+ }
200
+ if (isDeploymentNode(relationEndpoint)) { // Deployment node. Has no representation in model. No need to extend
201
+ return pick(relationEndpoint, ['tags', 'kind'])
202
+ }
203
+
204
+ nonexhaustive(relationEndpoint)
169
205
  }
170
206
 
171
- function toFilterableRelation<M extends AnyAux>(
172
- source: DeploymentElementModel<M>,
173
- target: DeploymentElementModel<M>,
174
- ) {
175
- return (
176
- relation: RelationshipModel<M> | DeploymentRelationModel<M>,
177
- ) => ({
207
+ function toFilterableRelation<M extends AnyAux>(c: DeploymentConnectionModel<M>) {
208
+ return (relation: RelationshipModel<M> | DeploymentRelationModel<M>) => ({
178
209
  tags: relation.tags,
179
210
  kind: relation.kind,
180
- source: elementToFilterable(source),
181
- target: elementToFilterable(target),
211
+ source: toFilterable(relation.source, c.source),
212
+ target: toFilterable(relation.target, c.target),
182
213
  })
183
214
  }
@@ -18,10 +18,7 @@ import {
18
18
  type IconUrl,
19
19
  type IncomingExpr as C4IncomingExpr,
20
20
  type InOutExpr as C4InOutExpr,
21
- isElementRef,
22
- isElementWhere,
23
- isRelationExpression,
24
- isRelationWhere,
21
+ type KindEqual,
25
22
  type ModelRelation,
26
23
  type NonEmptyArray,
27
24
  type OutgoingExpr as C4OutgoingExpr,
@@ -30,6 +27,7 @@ import {
30
27
  type RelationshipLineType,
31
28
  type RelationWhereExpr,
32
29
  type Tag,
30
+ type TagEqual,
33
31
  type ViewId,
34
32
  type ViewRule,
35
33
  type ViewRuleGlobalPredicateRef,
@@ -38,8 +36,13 @@ import {
38
36
  type ViewRulePredicate,
39
37
  type ViewRuleStyle,
40
38
  type WhereOperator,
39
+ isElementRef,
40
+ isElementWhere,
41
+ isRelationExpression,
42
+ isRelationWhere,
41
43
  } from '../../../types'
42
44
  import { type DirectRelationExpr as C4RelationExpr } from '../../../types/expression'
45
+ import type { Participant } from '../../../types/operators'
43
46
  import { withReadableEdges } from '../../utils/with-readable-edges'
44
47
  import { computeElementView } from '../compute'
45
48
 
@@ -482,6 +485,16 @@ export function $where(
482
485
  }
483
486
  }
484
487
 
488
+ export function $participant(
489
+ participant: Participant,
490
+ operator: TagEqual<TestTag> | KindEqual<TestTag>,
491
+ ): WhereOperator<TestTag, string> {
492
+ return {
493
+ participant,
494
+ operator,
495
+ }
496
+ }
497
+
485
498
  export function $inout(
486
499
  expr: InOutExpr | C4ElementExpression,
487
500
  ): C4InOutExpr {
@@ -1,8 +1,9 @@
1
1
  import DefaultMap from 'mnemonist/default-map'
2
2
  import { filter, findLast, forEach, map, pipe } from 'remeda'
3
3
  import { invariant, nonexhaustive, nonNullable } from '../../errors'
4
- import { type ElementModel, LikeC4Model } from '../../model'
5
4
  import { ConnectionModel } from '../../model/connection/model/ConnectionModel'
5
+ import { type ElementModel } from '../../model/ElementModel'
6
+ import { LikeC4Model } from '../../model/LikeC4Model'
6
7
  import type { RelationshipModel } from '../../model/RelationModel'
7
8
  import type { AnyAux } from '../../model/types'
8
9
  import type {
@@ -15,7 +16,7 @@ import type {
15
16
  } from '../../types'
16
17
  import { isViewRuleAutoLayout, isViewRuleGroup, isViewRulePredicate, whereOperatorAsPredicate } from '../../types'
17
18
  import * as Expr from '../../types/expression'
18
- import { sortNaturalByFqn, sortParentsFirst } from '../../utils'
19
+ import { sortParentsFirst } from '../../utils'
19
20
  import { applyCustomElementProperties } from '../utils/applyCustomElementProperties'
20
21
  import { applyCustomRelationProperties } from '../utils/applyCustomRelationProperties'
21
22
  import { applyViewRuleStyles } from '../utils/applyViewRuleStyles'