@likec4/core 1.38.1 → 1.39.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.
- package/dist/builder/index.d.mts +6 -3
- package/dist/builder/index.mjs +55 -111
- package/dist/compute-view/index.d.mts +6 -3
- package/dist/compute-view/index.mjs +33 -34
- package/dist/compute-view/relationships-view/index.d.mts +6 -3
- package/dist/compute-view/relationships-view/index.mjs +6 -6
- package/dist/index.d.mts +8 -5
- package/dist/index.mjs +15 -24
- package/dist/model/connection/deployment/index.d.mts +8 -5
- package/dist/model/connection/deployment/index.mjs +7 -9
- package/dist/model/connection/index.d.mts +10 -7
- package/dist/model/connection/index.mjs +10 -14
- package/dist/model/connection/model/index.d.mts +8 -5
- package/dist/model/connection/model/index.mjs +7 -10
- package/dist/model/index.d.mts +13 -10
- package/dist/model/index.mjs +17 -20
- package/dist/shared/core.20m8Um0g.d.mts +253 -0
- package/dist/shared/{core.CpwrZi3D.mjs → core.4u1dVmfX.mjs} +3 -5
- package/dist/shared/{core.Bp-IQmJR.mjs → core.BB6zA-UU.mjs} +9 -214
- package/dist/shared/{core.BH0VqY-7.mjs → core.BVNaR17u.mjs} +1 -1
- package/dist/shared/{core.BL_xjl90.mjs → core.Be1n9a0i.mjs} +4 -5
- package/dist/shared/{core.BoyJPEen.mjs → core.Be4Jy9Qx.mjs} +2 -2
- package/dist/shared/{core.H8NbNp2X.mjs → core.BqVo8LrH.mjs} +1 -1
- package/dist/shared/{core.DDoAFHHp.mjs → core.BuoXfSMj.mjs} +1 -1
- package/dist/shared/{core.DhDo8LAz.d.mts → core.C7pZp1nR.d.mts} +3 -3
- package/dist/shared/{core.BH9nN-_I.mjs → core.CCD1ID81.mjs} +3 -4
- package/dist/shared/{core.8KM0D6va.mjs → core.CNGyqkJh.mjs} +1 -9
- package/dist/shared/{core.B0oEIXqd.mjs → core.CUw_2J9j.mjs} +1 -1
- package/dist/shared/{core.C4Cn4Jy_.mjs → core.CWv15GLo.mjs} +11 -15
- package/dist/shared/{core.Bf5zKDK1.d.mts → core.CXCmvCws.d.mts} +2 -2
- package/dist/shared/core.CaT0SUUK.mjs +201 -0
- package/dist/shared/{core.Dtw1SBlz.d.mts → core.ClpXZ4Ib.d.mts} +3 -3
- package/dist/shared/{core.DC6zzxS0.mjs → core.CsbOakly.mjs} +13 -22
- package/dist/shared/{core.Btl47GOn.mjs → core.DLpidoWc.mjs} +2 -2
- package/dist/shared/{core.wwaSalox.d.mts → core.DM3vdkO_.d.mts} +1 -1
- package/dist/shared/core.DXhDWKFZ.d.mts +3 -0
- package/dist/shared/{core.O6FG0HF9.d.mts → core.DdzRtJ9d.d.mts} +1 -1
- package/dist/shared/{core.OUoo2ohq.mjs → core.DgttqsJc.mjs} +5 -9
- package/dist/shared/{core.Dhc0yIwT.mjs → core.DlG1xWt2.mjs} +3 -43
- package/dist/shared/core.DnRszv-l.mjs +11982 -0
- package/dist/shared/core.DoM6aM9N.mjs +7 -0
- package/dist/shared/{core.CzHQRs5x.mjs → core.DozSPE83.mjs} +43 -60
- package/dist/shared/{core.DsMrjY2q.mjs → core.GTgsmXS_.mjs} +2 -2
- package/dist/shared/core.ILwny7BV.mjs +38 -0
- package/dist/shared/core.PHwHXzkG.d.mts +213 -0
- package/dist/shared/core.T-eLZTW_.mjs +59 -0
- package/dist/shared/{core.CE_hG7EJ.d.mts → core.aWJgARyY.d.mts} +10 -486
- package/dist/shared/{core.BvlHvikl.d.mts → core.v1iEaXaR.d.mts} +5 -3
- package/dist/shared/core.yHe79zEl.mjs +98 -0
- package/dist/theme/index.d.mts +3 -126
- package/dist/theme/index.mjs +2 -3
- package/dist/types/_aux.d.mts +1 -1
- package/dist/types/expression-model.d.mts +191 -0
- package/dist/types/expression-model.mjs +112 -0
- package/dist/types/expression.d.mts +7 -0
- package/dist/types/expression.mjs +116 -0
- package/dist/types/fqnRef.d.mts +61 -0
- package/dist/types/fqnRef.mjs +46 -0
- package/dist/types/index.d.mts +6 -3
- package/dist/types/index.mjs +9 -9
- package/dist/types/scalar.mjs +2 -3
- package/dist/utils/index.d.mts +6 -428
- package/dist/utils/index.mjs +56 -15
- package/dist/utils/iterable/index.d.mts +2 -3
- package/dist/utils/iterable/index.mjs +9 -44
- package/package.json +8 -7
- package/src/index.ts +24 -1
- package/src/model/RelationModel.ts +1 -1
- package/src/model/index.ts +1 -1
- package/src/theme/element.ts +2 -2
- package/src/theme/relationships.ts +2 -2
- package/src/types/RichText.ts +1 -1
- package/src/types/expression-model.ts +3 -1
- package/src/types/expression.ts +3 -1
- package/src/types/fqnRef.ts +4 -1
- package/src/utils/guards.ts +0 -1
- package/src/utils/index.ts +0 -1
- package/dist/shared/core.BW8K1y6R.mjs +0 -278
- package/dist/shared/core.BgvIuGGU.mjs +0 -3
- package/dist/shared/core.BpJu1RrF.mjs +0 -5
- package/dist/shared/core.ByrmCl9I.mjs +0 -5
- package/dist/shared/core.CnIyafWn.mjs +0 -3
- package/dist/shared/core.DK6I-Nr7.mjs +0 -149
- package/dist/shared/core.DbRvwARP.mjs +0 -5
- package/dist/shared/core.Dw47t7nG.mjs +0 -5236
- package/dist/shared/core.zLlww-07.mjs +0 -3
- package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +0 -425
- package/src/builder/__snapshots__/Builder-style2.compute-model.json5 +0 -318
- package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +0 -221
- package/src/compute-view/deployment-view/__test__/TestHelper.ts +0 -249
- package/src/compute-view/deployment-view/__test__/fixture.ts +0 -238
- package/src/compute-view/dynamic-view/__test__/fixture.ts +0 -67
- package/src/compute-view/element-view/__test__/TestHelper.ts +0 -282
- package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +0 -458
- package/src/compute-view/element-view/__test__/fixture.ts +0 -749
- package/src/compute-view/utils/__snapshots__/sortNodes.spec.ts.snap +0 -113
- package/src/model/__test__/fixture.ts +0 -168
- package/src/theme/__test__/theme-index.ts +0 -29
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
-
|
|
3
|
-
exports[`Builder (style1) > should build nested elements and relTo 1`] = `
|
|
4
|
-
{
|
|
5
|
-
"_stage": "parsed",
|
|
6
|
-
"deployments": {
|
|
7
|
-
"elements": {},
|
|
8
|
-
"relations": {},
|
|
9
|
-
},
|
|
10
|
-
"elements": {
|
|
11
|
-
"s1": {
|
|
12
|
-
"color": "green",
|
|
13
|
-
"id": "s1",
|
|
14
|
-
"kind": "system",
|
|
15
|
-
"links": null,
|
|
16
|
-
"shape": "rectangle",
|
|
17
|
-
"style": {
|
|
18
|
-
"opacity": 10,
|
|
19
|
-
"size": "lg",
|
|
20
|
-
},
|
|
21
|
-
"tags": [],
|
|
22
|
-
"technology": null,
|
|
23
|
-
"title": "s1",
|
|
24
|
-
},
|
|
25
|
-
"s1.c1": {
|
|
26
|
-
"color": "primary",
|
|
27
|
-
"id": "s1.c1",
|
|
28
|
-
"kind": "component",
|
|
29
|
-
"links": null,
|
|
30
|
-
"shape": "browser",
|
|
31
|
-
"style": {
|
|
32
|
-
"textSize": "sm",
|
|
33
|
-
},
|
|
34
|
-
"tags": [],
|
|
35
|
-
"technology": null,
|
|
36
|
-
"title": "c1",
|
|
37
|
-
},
|
|
38
|
-
"s2": {
|
|
39
|
-
"color": "green",
|
|
40
|
-
"id": "s2",
|
|
41
|
-
"kind": "system",
|
|
42
|
-
"links": null,
|
|
43
|
-
"shape": "rectangle",
|
|
44
|
-
"style": {
|
|
45
|
-
"opacity": 10,
|
|
46
|
-
"size": "lg",
|
|
47
|
-
},
|
|
48
|
-
"tags": [],
|
|
49
|
-
"technology": null,
|
|
50
|
-
"title": "s2",
|
|
51
|
-
},
|
|
52
|
-
"s2.c1": {
|
|
53
|
-
"color": "primary",
|
|
54
|
-
"id": "s2.c1",
|
|
55
|
-
"kind": "component",
|
|
56
|
-
"links": null,
|
|
57
|
-
"shape": "browser",
|
|
58
|
-
"style": {
|
|
59
|
-
"textSize": "sm",
|
|
60
|
-
},
|
|
61
|
-
"tags": [],
|
|
62
|
-
"technology": null,
|
|
63
|
-
"title": "Component s2.1",
|
|
64
|
-
},
|
|
65
|
-
"s2.c1.c2": {
|
|
66
|
-
"color": "primary",
|
|
67
|
-
"id": "s2.c1.c2",
|
|
68
|
-
"kind": "component",
|
|
69
|
-
"links": null,
|
|
70
|
-
"shape": "browser",
|
|
71
|
-
"style": {
|
|
72
|
-
"textSize": "sm",
|
|
73
|
-
},
|
|
74
|
-
"tags": [],
|
|
75
|
-
"technology": null,
|
|
76
|
-
"title": "Component s2.1.2",
|
|
77
|
-
},
|
|
78
|
-
"s2.c1.c2.c3": {
|
|
79
|
-
"color": "primary",
|
|
80
|
-
"id": "s2.c1.c2.c3",
|
|
81
|
-
"kind": "component",
|
|
82
|
-
"links": null,
|
|
83
|
-
"shape": "browser",
|
|
84
|
-
"style": {
|
|
85
|
-
"textSize": "sm",
|
|
86
|
-
},
|
|
87
|
-
"tags": [],
|
|
88
|
-
"technology": null,
|
|
89
|
-
"title": "c3",
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
"globals": {
|
|
93
|
-
"dynamicPredicates": {},
|
|
94
|
-
"predicates": {},
|
|
95
|
-
"styles": {},
|
|
96
|
-
},
|
|
97
|
-
"imports": {},
|
|
98
|
-
"project": {
|
|
99
|
-
"id": "from-builder",
|
|
100
|
-
},
|
|
101
|
-
"projectId": "from-builder",
|
|
102
|
-
"relations": {
|
|
103
|
-
"rel1": {
|
|
104
|
-
"id": "rel1",
|
|
105
|
-
"source": {
|
|
106
|
-
"model": "s2.c1.c2.c3",
|
|
107
|
-
},
|
|
108
|
-
"target": {
|
|
109
|
-
"model": "s1.c1",
|
|
110
|
-
},
|
|
111
|
-
"title": "relation from s2.1.2.3 to s1.1",
|
|
112
|
-
},
|
|
113
|
-
"rel2": {
|
|
114
|
-
"id": "rel2",
|
|
115
|
-
"source": {
|
|
116
|
-
"model": "s2.c1",
|
|
117
|
-
},
|
|
118
|
-
"target": {
|
|
119
|
-
"model": "s1.c1",
|
|
120
|
-
},
|
|
121
|
-
"title": "relation from s2.1 to s1.1",
|
|
122
|
-
},
|
|
123
|
-
"rel3": {
|
|
124
|
-
"id": "rel3",
|
|
125
|
-
"source": {
|
|
126
|
-
"model": "s1.c1",
|
|
127
|
-
},
|
|
128
|
-
"target": {
|
|
129
|
-
"model": "s2.c1.c2",
|
|
130
|
-
},
|
|
131
|
-
"title": "relation from s1.1 to s2.1.2",
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
"specification": {
|
|
135
|
-
"customColors": {},
|
|
136
|
-
"deployments": {},
|
|
137
|
-
"elements": {
|
|
138
|
-
"component": {
|
|
139
|
-
"style": {
|
|
140
|
-
"shape": "browser",
|
|
141
|
-
"textSize": "sm",
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
"system": {
|
|
145
|
-
"style": {
|
|
146
|
-
"color": "green",
|
|
147
|
-
"opacity": 10,
|
|
148
|
-
"size": "lg",
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
"relationships": {},
|
|
153
|
-
"tags": {
|
|
154
|
-
"tag1": {
|
|
155
|
-
"color": "#FFF",
|
|
156
|
-
},
|
|
157
|
-
"tag2": {
|
|
158
|
-
"color": "primary",
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
"views": {},
|
|
163
|
-
}
|
|
164
|
-
`;
|
|
165
|
-
|
|
166
|
-
exports[`Builder (style1) > should build view 1`] = `
|
|
167
|
-
{
|
|
168
|
-
"_stage": "parsed",
|
|
169
|
-
"deployments": {
|
|
170
|
-
"elements": {},
|
|
171
|
-
"relations": {},
|
|
172
|
-
},
|
|
173
|
-
"elements": {
|
|
174
|
-
"c1": {
|
|
175
|
-
"color": "primary",
|
|
176
|
-
"id": "c1",
|
|
177
|
-
"kind": "component",
|
|
178
|
-
"links": null,
|
|
179
|
-
"shape": "rectangle",
|
|
180
|
-
"style": {},
|
|
181
|
-
"tags": [],
|
|
182
|
-
"technology": null,
|
|
183
|
-
"title": "c1",
|
|
184
|
-
},
|
|
185
|
-
"c2": {
|
|
186
|
-
"color": "primary",
|
|
187
|
-
"id": "c2",
|
|
188
|
-
"kind": "component",
|
|
189
|
-
"links": null,
|
|
190
|
-
"shape": "rectangle",
|
|
191
|
-
"style": {},
|
|
192
|
-
"tags": [],
|
|
193
|
-
"technology": null,
|
|
194
|
-
"title": "c2",
|
|
195
|
-
},
|
|
196
|
-
"c3": {
|
|
197
|
-
"color": "primary",
|
|
198
|
-
"id": "c3",
|
|
199
|
-
"kind": "component",
|
|
200
|
-
"links": null,
|
|
201
|
-
"shape": "rectangle",
|
|
202
|
-
"style": {},
|
|
203
|
-
"tags": [],
|
|
204
|
-
"technology": null,
|
|
205
|
-
"title": "c3",
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
"globals": {
|
|
209
|
-
"dynamicPredicates": {},
|
|
210
|
-
"predicates": {},
|
|
211
|
-
"styles": {},
|
|
212
|
-
},
|
|
213
|
-
"imports": {},
|
|
214
|
-
"project": {
|
|
215
|
-
"id": "from-builder",
|
|
216
|
-
},
|
|
217
|
-
"projectId": "from-builder",
|
|
218
|
-
"relations": {},
|
|
219
|
-
"specification": {
|
|
220
|
-
"customColors": {},
|
|
221
|
-
"deployments": {},
|
|
222
|
-
"elements": {
|
|
223
|
-
"component": {},
|
|
224
|
-
},
|
|
225
|
-
"relationships": {},
|
|
226
|
-
"tags": {},
|
|
227
|
-
},
|
|
228
|
-
"views": {
|
|
229
|
-
"1": {
|
|
230
|
-
"_stage": "parsed",
|
|
231
|
-
"_type": "element",
|
|
232
|
-
"description": null,
|
|
233
|
-
"id": "1",
|
|
234
|
-
"links": null,
|
|
235
|
-
"rules": [
|
|
236
|
-
{
|
|
237
|
-
"include": [
|
|
238
|
-
{
|
|
239
|
-
"wildcard": true,
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
"tags": [],
|
|
245
|
-
"title": "View 1",
|
|
246
|
-
},
|
|
247
|
-
"2": {
|
|
248
|
-
"_stage": "parsed",
|
|
249
|
-
"_type": "element",
|
|
250
|
-
"description": null,
|
|
251
|
-
"id": "2",
|
|
252
|
-
"links": null,
|
|
253
|
-
"rules": [
|
|
254
|
-
{
|
|
255
|
-
"include": [
|
|
256
|
-
{
|
|
257
|
-
"wildcard": true,
|
|
258
|
-
},
|
|
259
|
-
],
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"include": [
|
|
263
|
-
{
|
|
264
|
-
"ref": {
|
|
265
|
-
"model": "c2",
|
|
266
|
-
},
|
|
267
|
-
"selector": "children",
|
|
268
|
-
},
|
|
269
|
-
],
|
|
270
|
-
},
|
|
271
|
-
],
|
|
272
|
-
"tags": [],
|
|
273
|
-
"title": "view 2",
|
|
274
|
-
},
|
|
275
|
-
"3": {
|
|
276
|
-
"_stage": "parsed",
|
|
277
|
-
"_type": "element",
|
|
278
|
-
"description": null,
|
|
279
|
-
"id": "3",
|
|
280
|
-
"links": null,
|
|
281
|
-
"rules": [
|
|
282
|
-
{
|
|
283
|
-
"include": [
|
|
284
|
-
{
|
|
285
|
-
"ref": {
|
|
286
|
-
"model": "c3",
|
|
287
|
-
},
|
|
288
|
-
"selector": "expanded",
|
|
289
|
-
},
|
|
290
|
-
],
|
|
291
|
-
},
|
|
292
|
-
],
|
|
293
|
-
"tags": [],
|
|
294
|
-
"title": "",
|
|
295
|
-
},
|
|
296
|
-
},
|
|
297
|
-
}
|
|
298
|
-
`;
|
|
299
|
-
|
|
300
|
-
exports[`Builder (style1) > should build viewOf 1`] = `
|
|
301
|
-
{
|
|
302
|
-
"_stage": "parsed",
|
|
303
|
-
"deployments": {
|
|
304
|
-
"elements": {},
|
|
305
|
-
"relations": {},
|
|
306
|
-
},
|
|
307
|
-
"elements": {
|
|
308
|
-
"c1": {
|
|
309
|
-
"color": "primary",
|
|
310
|
-
"id": "c1",
|
|
311
|
-
"kind": "component",
|
|
312
|
-
"links": null,
|
|
313
|
-
"shape": "rectangle",
|
|
314
|
-
"style": {},
|
|
315
|
-
"tags": [],
|
|
316
|
-
"technology": null,
|
|
317
|
-
"title": "c1",
|
|
318
|
-
},
|
|
319
|
-
"c2": {
|
|
320
|
-
"color": "primary",
|
|
321
|
-
"id": "c2",
|
|
322
|
-
"kind": "component",
|
|
323
|
-
"links": null,
|
|
324
|
-
"shape": "rectangle",
|
|
325
|
-
"style": {},
|
|
326
|
-
"tags": [],
|
|
327
|
-
"technology": null,
|
|
328
|
-
"title": "c2",
|
|
329
|
-
},
|
|
330
|
-
"c2.c3": {
|
|
331
|
-
"color": "primary",
|
|
332
|
-
"id": "c2.c3",
|
|
333
|
-
"kind": "component",
|
|
334
|
-
"links": null,
|
|
335
|
-
"shape": "rectangle",
|
|
336
|
-
"style": {},
|
|
337
|
-
"tags": [],
|
|
338
|
-
"technology": null,
|
|
339
|
-
"title": "c3",
|
|
340
|
-
},
|
|
341
|
-
"c2.c3.c4": {
|
|
342
|
-
"color": "primary",
|
|
343
|
-
"id": "c2.c3.c4",
|
|
344
|
-
"kind": "component",
|
|
345
|
-
"links": null,
|
|
346
|
-
"shape": "rectangle",
|
|
347
|
-
"style": {},
|
|
348
|
-
"tags": [],
|
|
349
|
-
"technology": null,
|
|
350
|
-
"title": "c4",
|
|
351
|
-
},
|
|
352
|
-
},
|
|
353
|
-
"globals": {
|
|
354
|
-
"dynamicPredicates": {},
|
|
355
|
-
"predicates": {},
|
|
356
|
-
"styles": {},
|
|
357
|
-
},
|
|
358
|
-
"imports": {},
|
|
359
|
-
"project": {
|
|
360
|
-
"id": "from-builder",
|
|
361
|
-
},
|
|
362
|
-
"projectId": "from-builder",
|
|
363
|
-
"relations": {},
|
|
364
|
-
"specification": {
|
|
365
|
-
"customColors": {},
|
|
366
|
-
"deployments": {},
|
|
367
|
-
"elements": {
|
|
368
|
-
"component": {},
|
|
369
|
-
},
|
|
370
|
-
"relationships": {},
|
|
371
|
-
"tags": {},
|
|
372
|
-
},
|
|
373
|
-
"views": {
|
|
374
|
-
"1": {
|
|
375
|
-
"_stage": "parsed",
|
|
376
|
-
"_type": "element",
|
|
377
|
-
"description": null,
|
|
378
|
-
"id": "1",
|
|
379
|
-
"links": null,
|
|
380
|
-
"rules": [
|
|
381
|
-
{
|
|
382
|
-
"include": [
|
|
383
|
-
{
|
|
384
|
-
"wildcard": true,
|
|
385
|
-
},
|
|
386
|
-
],
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"include": [
|
|
390
|
-
{
|
|
391
|
-
"inout": {
|
|
392
|
-
"ref": {
|
|
393
|
-
"model": "c2.c3",
|
|
394
|
-
},
|
|
395
|
-
"selector": "children",
|
|
396
|
-
},
|
|
397
|
-
},
|
|
398
|
-
],
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
"exclude": [
|
|
402
|
-
{
|
|
403
|
-
"source": {
|
|
404
|
-
"ref": {
|
|
405
|
-
"model": "c1",
|
|
406
|
-
},
|
|
407
|
-
"selector": "expanded",
|
|
408
|
-
},
|
|
409
|
-
"target": {
|
|
410
|
-
"ref": {
|
|
411
|
-
"model": "c2.c3",
|
|
412
|
-
},
|
|
413
|
-
"selector": "children",
|
|
414
|
-
},
|
|
415
|
-
},
|
|
416
|
-
],
|
|
417
|
-
},
|
|
418
|
-
],
|
|
419
|
-
"tags": [],
|
|
420
|
-
"title": "View 1",
|
|
421
|
-
"viewOf": "c1",
|
|
422
|
-
},
|
|
423
|
-
},
|
|
424
|
-
}
|
|
425
|
-
`;
|