@likec4/core 1.26.2 → 1.27.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 (51) hide show
  1. package/dist/builder/index.d.mts +3 -1
  2. package/dist/builder/index.mjs +6 -4
  3. package/dist/compute-view/index.d.mts +1 -2
  4. package/dist/compute-view/index.mjs +6 -6
  5. package/dist/compute-view/relationships-view/index.d.mts +42 -0
  6. package/dist/compute-view/relationships-view/index.mjs +181 -0
  7. package/dist/index.d.mts +3 -5
  8. package/dist/index.mjs +5 -5
  9. package/dist/model/index.d.mts +3 -3
  10. package/dist/model/index.mjs +1 -1
  11. package/dist/shared/{core.yND74qFI.mjs → core.BMep80lJ.mjs} +2 -1
  12. package/dist/shared/{core.DRxv3HIl.mjs → core.C-YXI-43.mjs} +1 -5
  13. package/dist/shared/core.CQXU9DF7.mjs +477 -0
  14. package/dist/shared/{core.Brmu7VBL.d.mts → core.CtloVwbo.d.mts} +3 -1
  15. package/dist/shared/{core.DvRnF4Sc.mjs → core.Cu-UdkSl.mjs} +16 -477
  16. package/dist/shared/core.DbRvwARP.mjs +5 -0
  17. package/dist/shared/{core.oI7caxVx.d.mts → core.Uz54YXx0.d.mts} +1 -1
  18. package/dist/shared/{core.NNojPYtn.mjs → core.zj2huD5x.mjs} +12 -8
  19. package/dist/types/index.mjs +1 -1
  20. package/dist/utils/index.d.mts +3 -2
  21. package/dist/utils/index.mjs +5 -3
  22. package/package.json +19 -9
  23. package/src/builder/Builder.model.ts +74 -0
  24. package/src/compute-view/deployment-view/_types.ts +1 -1
  25. package/src/compute-view/deployment-view/predicates/relation-direct.ts +6 -7
  26. package/src/compute-view/deployment-view/predicates/relation-incoming.ts +2 -1
  27. package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +1 -1
  28. package/src/compute-view/index.ts +0 -1
  29. package/src/compute-view/relationships-view/_types.ts +7 -6
  30. package/src/compute-view/relationships-view/compute.ts +140 -52
  31. package/src/compute-view/relationships-view/index.ts +3 -0
  32. package/src/compute-view/relationships-view/utils.ts +44 -11
  33. package/src/compute-view/utils/view-hash.ts +1 -4
  34. package/src/index.ts +1 -1
  35. package/src/model/ElementModel.ts +2 -0
  36. package/src/model/view/NodeModel.ts +5 -0
  37. package/src/utils/object-hash.ts +13 -2
  38. package/dist/builder/index.d.ts +0 -509
  39. package/dist/compute-view/index.d.ts +0 -23
  40. package/dist/index.d.ts +0 -147
  41. package/dist/model/index.d.ts +0 -118
  42. package/dist/shared/core.-qjOvsEL.d.ts +0 -146
  43. package/dist/shared/core.30yYKXcZ.d.ts +0 -186
  44. package/dist/shared/core.BH59D8Ji.d.ts +0 -858
  45. package/dist/shared/core.C8xqv5sq.mjs +0 -37
  46. package/dist/shared/core.CIbWBWW3.d.ts +0 -127
  47. package/dist/shared/core.Cpd5mZgF.d.ts +0 -732
  48. package/dist/shared/core.Dd1nCiNx.d.mts +0 -12
  49. package/dist/shared/core.mD0TIdz_.d.ts +0 -12
  50. package/dist/types/index.d.ts +0 -72
  51. package/dist/utils/index.d.ts +0 -458
@@ -1,8 +1,6 @@
1
- import { u as u$1, i as invariant } from './core.DRxv3HIl.mjs';
2
-
3
- var e={done:true,hasNext:false},s={done:false,hasNext:false},a=()=>e;
4
-
5
- function C(t,...o){let n=t,u=o.map(e=>"lazy"in e?A(e):void 0),p=0;for(;p<o.length;){if(u[p]===void 0||!B(n)){let i=o[p];n=i(n),p+=1;continue}let r=[];for(let i=p;i<o.length;i++){let l=u[i];if(l===void 0||(r.push(l),l.isSingle))break}let a=[];for(let i of n)if(y(i,a,r))break;let{isSingle:s}=r.at(-1);n=s?a[0]:a,p+=r.length;}return n}function y(t,o,n){if(n.length===0)return o.push(t),false;let u=t,p=s,e=false;for(let[r,a]of n.entries()){let{index:s,items:i}=a;if(i.push(u),p=a(u,s,i),a.index+=1,p.hasNext){if(p.hasMany??false){for(let l of p.next)if(y(l,o,n.slice(r+1)))return true;return e}u=p.next;}if(!p.hasNext)break;p.done&&(e=true);}return p.hasNext&&o.push(u),e}function A(t){let{lazy:o,lazyArgs:n}=t,u=o(...n);return Object.assign(u,{isSingle:o.single??false,index:0,items:[]})}function B(t){return typeof t=="string"||typeof t=="object"&&t!==null&&Symbol.iterator in t}
1
+ import { j as getDefaultExportFromCjs, C, h as t } from './core.CQXU9DF7.mjs';
2
+ import { u as u$1 } from './core.DbRvwARP.mjs';
3
+ import { i as invariant } from './core.C-YXI-43.mjs';
6
4
 
7
5
  function d(...e){return u$1(i$2,e,o$1)}var i$2=(e,n)=>e.length<n.length?e.map((t,r)=>[t,n[r]]):n.map((t,r)=>[e[r],t]),o$1=e=>(n,t)=>({hasNext:true,next:[n,e[t]],done:t>=e.length-1});
8
6
 
@@ -12,18 +10,10 @@ function u(...e){return u$1(i,e)}function i(e,a){let n=[];for(let[o,r]of e.entri
12
10
 
13
11
  function m(...a){return u$1(o,a,p)}var o=(a,e)=>a.map(e),p=a=>(e,t,r)=>({done:false,hasNext:true,next:a(e,t,r)});
14
12
 
15
- function t$1(r){return typeof r=="string"}
16
-
17
- function t(n){return typeof n=="function"}
18
-
19
13
  function l(n){return n!=null}
20
14
 
21
15
  function n(e){return e!==void 0}
22
16
 
23
- function getDefaultExportFromCjs (x) {
24
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
25
- }
26
-
27
17
  var support = {};
28
18
 
29
19
  var hasRequiredSupport;
@@ -119,180 +109,6 @@ function requireForeach () {
119
109
  return foreach;
120
110
  }
121
111
 
122
- /**
123
- * Mnemonist DefaultMap
124
- * =====================
125
- *
126
- * JavaScript implementation of a default map that will return a constructed
127
- * value any time one tries to access an inexisting key. It's quite similar
128
- * to python's defaultdict.
129
- */
130
-
131
- var defaultMap;
132
- var hasRequiredDefaultMap;
133
-
134
- function requireDefaultMap () {
135
- if (hasRequiredDefaultMap) return defaultMap;
136
- hasRequiredDefaultMap = 1;
137
- /**
138
- * DefaultMap.
139
- *
140
- * @constructor
141
- */
142
- function DefaultMap(factory) {
143
- if (typeof factory !== 'function')
144
- throw new Error('mnemonist/DefaultMap.constructor: expecting a function.');
145
-
146
- this.items = new Map();
147
- this.factory = factory;
148
- this.size = 0;
149
- }
150
-
151
- /**
152
- * Method used to clear the structure.
153
- *
154
- * @return {undefined}
155
- */
156
- DefaultMap.prototype.clear = function() {
157
-
158
- // Properties
159
- this.items.clear();
160
- this.size = 0;
161
- };
162
-
163
- /**
164
- * Method used to get the value set for given key. If the key does not exist,
165
- * the value will be created using the provided factory.
166
- *
167
- * @param {any} key - Target key.
168
- * @return {any}
169
- */
170
- DefaultMap.prototype.get = function(key) {
171
- var value = this.items.get(key);
172
-
173
- if (typeof value === 'undefined') {
174
- value = this.factory(key, this.size);
175
- this.items.set(key, value);
176
- this.size++;
177
- }
178
-
179
- return value;
180
- };
181
-
182
- /**
183
- * Method used to get the value set for given key. If the key does not exist,
184
- * a value won't be created.
185
- *
186
- * @param {any} key - Target key.
187
- * @return {any}
188
- */
189
- DefaultMap.prototype.peek = function(key) {
190
- return this.items.get(key);
191
- };
192
-
193
- /**
194
- * Method used to set a value for given key.
195
- *
196
- * @param {any} key - Target key.
197
- * @param {any} value - Value.
198
- * @return {DefaultMap}
199
- */
200
- DefaultMap.prototype.set = function(key, value) {
201
- this.items.set(key, value);
202
- this.size = this.items.size;
203
-
204
- return this;
205
- };
206
-
207
- /**
208
- * Method used to test the existence of a key in the map.
209
- *
210
- * @param {any} key - Target key.
211
- * @return {boolean}
212
- */
213
- DefaultMap.prototype.has = function(key) {
214
- return this.items.has(key);
215
- };
216
-
217
- /**
218
- * Method used to delete target key.
219
- *
220
- * @param {any} key - Target key.
221
- * @return {boolean}
222
- */
223
- DefaultMap.prototype.delete = function(key) {
224
- var deleted = this.items.delete(key);
225
-
226
- this.size = this.items.size;
227
-
228
- return deleted;
229
- };
230
-
231
- /**
232
- * Method used to iterate over each of the key/value pairs.
233
- *
234
- * @param {function} callback - Function to call for each item.
235
- * @param {object} scope - Optional scope.
236
- * @return {undefined}
237
- */
238
- DefaultMap.prototype.forEach = function(callback, scope) {
239
- scope = arguments.length > 1 ? scope : this;
240
-
241
- this.items.forEach(callback, scope);
242
- };
243
-
244
- /**
245
- * Iterators.
246
- */
247
- DefaultMap.prototype.entries = function() {
248
- return this.items.entries();
249
- };
250
-
251
- DefaultMap.prototype.keys = function() {
252
- return this.items.keys();
253
- };
254
-
255
- DefaultMap.prototype.values = function() {
256
- return this.items.values();
257
- };
258
-
259
- /**
260
- * Attaching the #.entries method to Symbol.iterator if possible.
261
- */
262
- if (typeof Symbol !== 'undefined')
263
- DefaultMap.prototype[Symbol.iterator] = DefaultMap.prototype.entries;
264
-
265
- /**
266
- * Convenience known methods.
267
- */
268
- DefaultMap.prototype.inspect = function() {
269
- return this.items;
270
- };
271
-
272
- if (typeof Symbol !== 'undefined')
273
- DefaultMap.prototype[Symbol.for('nodejs.util.inspect.custom')] = DefaultMap.prototype.inspect;
274
-
275
- /**
276
- * Typical factories.
277
- */
278
- DefaultMap.autoIncrement = function() {
279
- var i = 0;
280
-
281
- return function() {
282
- return i++;
283
- };
284
- };
285
-
286
- /**
287
- * Exporting.
288
- */
289
- defaultMap = DefaultMap;
290
- return defaultMap;
291
- }
292
-
293
- var defaultMapExports = /*@__PURE__*/ requireDefaultMap();
294
- const DefaultMap = /*@__PURE__*/getDefaultExportFromCjs(defaultMapExports);
295
-
296
112
  /**
297
113
  * Obliterator Iterator Class
298
114
  * ===========================
@@ -1003,249 +819,6 @@ function commonHead(sources, targets, equals) {
1003
819
  );
1004
820
  }
1005
821
 
1006
- var naturalCompareLite = {exports: {}};
1007
-
1008
- var hasRequiredNaturalCompareLite;
1009
-
1010
- function requireNaturalCompareLite () {
1011
- if (hasRequiredNaturalCompareLite) return naturalCompareLite.exports;
1012
- hasRequiredNaturalCompareLite = 1;
1013
- /*
1014
- * @version 1.4.0
1015
- * @date 2015-10-26
1016
- * @stability 3 - Stable
1017
- * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
1018
- * @license MIT License
1019
- */
1020
-
1021
-
1022
- var naturalCompare = function(a, b) {
1023
- var i, codeA
1024
- , codeB = 1
1025
- , posA = 0
1026
- , posB = 0
1027
- , alphabet = String.alphabet;
1028
-
1029
- function getCode(str, pos, code) {
1030
- if (code) {
1031
- for (i = pos; code = getCode(str, i), code < 76 && code > 65;) ++i;
1032
- return +str.slice(pos - 1, i)
1033
- }
1034
- code = alphabet && alphabet.indexOf(str.charAt(pos));
1035
- return code > -1 ? code + 76 : ((code = str.charCodeAt(pos) || 0), code < 45 || code > 127) ? code
1036
- : code < 46 ? 65 // -
1037
- : code < 48 ? code - 1
1038
- : code < 58 ? code + 18 // 0-9
1039
- : code < 65 ? code - 11
1040
- : code < 91 ? code + 11 // A-Z
1041
- : code < 97 ? code - 37
1042
- : code < 123 ? code + 5 // a-z
1043
- : code - 63
1044
- }
1045
-
1046
-
1047
- if ((a+="") != (b+="")) for (;codeB;) {
1048
- codeA = getCode(a, posA++);
1049
- codeB = getCode(b, posB++);
1050
-
1051
- if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
1052
- codeA = getCode(a, posA, posA);
1053
- codeB = getCode(b, posB, posA = i);
1054
- posB = i;
1055
- }
1056
-
1057
- if (codeA != codeB) return (codeA < codeB) ? -1 : 1
1058
- }
1059
- return 0
1060
- };
1061
-
1062
- try {
1063
- naturalCompareLite.exports = naturalCompare;
1064
- } catch (e) {
1065
- String.naturalCompare = naturalCompare;
1066
- }
1067
- return naturalCompareLite.exports;
1068
- }
1069
-
1070
- var naturalCompareLiteExports = requireNaturalCompareLite();
1071
- const compare = /*@__PURE__*/getDefaultExportFromCjs(naturalCompareLiteExports);
1072
-
1073
- function compareNatural(a, b) {
1074
- if (a === b) return 0;
1075
- if (t$1(a)) {
1076
- if (t$1(b)) {
1077
- return compare(a, b);
1078
- }
1079
- return 1;
1080
- }
1081
- return t$1(b) ? -1 : 0;
1082
- }
1083
-
1084
- function isString(value) {
1085
- return value != null && typeof value === "string";
1086
- }
1087
- function isNonEmptyArray(arr) {
1088
- return !!arr && Array.isArray(arr) && arr.length > 0;
1089
- }
1090
-
1091
- function parentFqn(fqn) {
1092
- const lastDot = fqn.lastIndexOf(".");
1093
- if (lastDot > 0) {
1094
- return fqn.slice(0, lastDot);
1095
- }
1096
- return null;
1097
- }
1098
- function nameFromFqn(fqn) {
1099
- const lastDot = fqn.lastIndexOf(".");
1100
- if (lastDot > 0) {
1101
- return fqn.slice(lastDot + 1);
1102
- } else {
1103
- return fqn;
1104
- }
1105
- }
1106
- const asString = (e) => isString(e) ? e : e.id;
1107
- function isAncestor(arg1, arg2) {
1108
- const arg1Id = asString(arg1);
1109
- if (arg2) {
1110
- const arg2Id = asString(arg2);
1111
- return arg2Id.startsWith(arg1Id + ".");
1112
- }
1113
- return (ancestor) => {
1114
- const ancestorId = asString(ancestor);
1115
- return arg1Id.startsWith(ancestorId + ".");
1116
- };
1117
- }
1118
- function isSameHierarchy(one, another) {
1119
- if (!another) {
1120
- return (b) => isSameHierarchy(one, b);
1121
- }
1122
- const first = asString(one);
1123
- const second = asString(another);
1124
- return first === second || second.startsWith(first + ".") || first.startsWith(second + ".");
1125
- }
1126
- function isDescendantOf(descedant, ancestor) {
1127
- if (!ancestor) {
1128
- return (d) => isAncestor(descedant, d);
1129
- }
1130
- return isAncestor(ancestor, descedant);
1131
- }
1132
- function hierarchyLevel(elementOfFqn) {
1133
- const first = isString(elementOfFqn) ? elementOfFqn : elementOfFqn.id;
1134
- return first.split(".").length;
1135
- }
1136
- function hierarchyDistance(one, another) {
1137
- const first = isString(one) ? one : one.id;
1138
- const second = isString(another) ? another : another.id;
1139
- if (first === second) {
1140
- return 0;
1141
- }
1142
- const firstDepth = hierarchyLevel(first);
1143
- const secondDepth = hierarchyLevel(second);
1144
- if (isSameHierarchy(first, second)) {
1145
- return Math.abs(firstDepth - secondDepth);
1146
- }
1147
- const ancestor = commonAncestor(first, second);
1148
- const ancestorDepth = ancestor ? hierarchyLevel(ancestor) : 0;
1149
- return firstDepth + secondDepth - (2 * ancestorDepth + 1);
1150
- }
1151
- function commonAncestor(first, second) {
1152
- const a = first.split(".");
1153
- if (a.length < 2) {
1154
- return null;
1155
- }
1156
- const b = second.split(".");
1157
- if (b.length < 2) {
1158
- return null;
1159
- }
1160
- let ancestor = [];
1161
- for (let i = 0; i < Math.min(a.length, b.length) - 1 && a[i] === b[i]; i++) {
1162
- ancestor.push(a[i]);
1163
- }
1164
- if (ancestor.length === 0) {
1165
- return null;
1166
- }
1167
- return ancestor.join(".");
1168
- }
1169
- function ancestorsFqn(fqn) {
1170
- const path = fqn.split(".");
1171
- path.pop();
1172
- if (path.length === 0) {
1173
- return [];
1174
- }
1175
- return path.reduce((acc, part, idx) => {
1176
- if (idx === 0) {
1177
- acc.push(part);
1178
- return acc;
1179
- }
1180
- acc.unshift(`${acc[0]}.${part}`);
1181
- return acc;
1182
- }, []);
1183
- }
1184
- function compareFqnHierarchically(a, b) {
1185
- const depthA = a.split(".").length;
1186
- const depthB = b.split(".").length;
1187
- switch (true) {
1188
- case depthA > depthB: {
1189
- return 1;
1190
- }
1191
- case depthA < depthB: {
1192
- return -1;
1193
- }
1194
- default: {
1195
- return 0;
1196
- }
1197
- }
1198
- }
1199
- function compareByFqnHierarchically(a, b) {
1200
- return compareFqnHierarchically(a.id, b.id);
1201
- }
1202
- function sortByFqnHierarchically(array) {
1203
- return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
1204
- return a.fqn.length - b.fqn.length;
1205
- }).map(({ item }) => item);
1206
- }
1207
- function findTopAncestor(items, item) {
1208
- let parent = item;
1209
- for (const e of items) {
1210
- if (isAncestor(e, parent)) {
1211
- parent = e;
1212
- }
1213
- }
1214
- return parent !== item ? parent : null;
1215
- }
1216
- function sortParentsFirst(array) {
1217
- const result = [];
1218
- const items = [...array];
1219
- let item;
1220
- while (item = items.shift()) {
1221
- let parent;
1222
- while (parent = findTopAncestor(items, item)) {
1223
- result.push(items.splice(items.indexOf(parent), 1)[0]);
1224
- }
1225
- result.push(item);
1226
- }
1227
- return result;
1228
- }
1229
- function sortNaturalByFqn(array, sort) {
1230
- if (!array || isString(array)) {
1231
- const dir2 = array ?? "asc";
1232
- return (arr) => sortNaturalByFqn(arr, dir2);
1233
- }
1234
- const dir = sort === "desc" ? -1 : 1;
1235
- return array.map((item) => ({ item, fqn: item.id.split(".") })).sort((a, b) => {
1236
- if (a.fqn.length !== b.fqn.length) {
1237
- return (a.fqn.length - b.fqn.length) * dir;
1238
- }
1239
- for (let i = 0; i < a.fqn.length; i++) {
1240
- const compare = compareNatural(a.fqn[i], b.fqn[i]);
1241
- if (compare !== 0) {
1242
- return compare;
1243
- }
1244
- }
1245
- return 0;
1246
- }).map(({ item }) => item);
1247
- }
1248
-
1249
822
  function getOrCreate(map, key, create) {
1250
823
  let entry = map.get(key);
1251
824
  if (!entry) {
@@ -1259,23 +832,6 @@ function isIterable(something) {
1259
832
  return l(something) && typeof something === "object" && Symbol.iterator in something;
1260
833
  }
1261
834
 
1262
- function ifilter(arg1, arg2) {
1263
- const pred = arg2 ?? arg1;
1264
- invariant(t(pred));
1265
- function* _filter(iter) {
1266
- for (const value of iter) {
1267
- if (pred(value)) {
1268
- yield value;
1269
- }
1270
- }
1271
- return;
1272
- }
1273
- if (!arg2) {
1274
- return _filter;
1275
- }
1276
- return _filter(arg1);
1277
- }
1278
-
1279
835
  function ifind(arg1, arg2) {
1280
836
  const pred = arg2 ?? arg1;
1281
837
  invariant(t(pred));
@@ -1303,21 +859,6 @@ function* _iflat(iterable) {
1303
859
  return;
1304
860
  }
1305
861
 
1306
- function imap(arg1, arg2) {
1307
- const mapper = arg2 ?? arg1;
1308
- invariant(t(mapper));
1309
- function* _map(iter) {
1310
- for (const value of iter) {
1311
- yield mapper(value);
1312
- }
1313
- return;
1314
- }
1315
- if (!arg2) {
1316
- return _map;
1317
- }
1318
- return _map(arg1);
1319
- }
1320
-
1321
862
  function isome(arg1, arg2) {
1322
863
  const pred = arg2 ?? arg1;
1323
864
  invariant(t(pred));
@@ -1335,19 +876,6 @@ function isome(arg1, arg2) {
1335
876
  return _some(arg1);
1336
877
  }
1337
878
 
1338
- function toArray(iterable) {
1339
- if (iterable) {
1340
- return Array.from(iterable);
1341
- }
1342
- return (it) => Array.from(it);
1343
- }
1344
- function toSet(iterable) {
1345
- if (iterable) {
1346
- return new Set(iterable);
1347
- }
1348
- return (it) => new Set(it);
1349
- }
1350
-
1351
879
  function iunique(iterable) {
1352
880
  return iterable ? _iunique(iterable) : _iunique;
1353
881
  }
@@ -1451,6 +979,17 @@ function requireObject_hash () {
1451
979
  }
1452
980
 
1453
981
  var object_hashExports = requireObject_hash();
1454
- const objectHash = /*@__PURE__*/getDefaultExportFromCjs(object_hashExports);
982
+ const objecthash = /*@__PURE__*/getDefaultExportFromCjs(object_hashExports);
983
+
984
+ function objectHash(value) {
985
+ invariant(
986
+ typeof value === "object" && l(value),
987
+ "objectHash: value must be an object"
988
+ );
989
+ return objecthash(value, {
990
+ ignoreUnknown: true,
991
+ respectType: false
992
+ });
993
+ }
1455
994
 
1456
- export { ifilter as A, iflat as B, imap as C, DefaultMap as D, isIterable as E, isome as F, iunique as G, toArray as H, difference as I, equals as J, intersection as K, symmetricDifference as L, union as M, stringHash as N, objectHash as O, C as P, s as Q, a as R, Stack as S, getDefaultExportFromCjs as T, requireForeach as U, requireIterator as V, u as W, d as X, n as Y, hasIntersection as Z, i$1 as a, isNonEmptyArray as b, t$1 as c, isSameHierarchy as d, t as e, commonHead as f, compareNatural as g, ancestorsFqn as h, ifind as i, commonAncestor as j, compareByFqnHierarchically as k, l, m, nameFromFqn as n, compareFqnHierarchically as o, parentFqn as p, hierarchyDistance as q, hierarchyLevel as r, isAncestor as s, toSet as t, isDescendantOf as u, sortByFqnHierarchically as v, sortNaturalByFqn as w, sortParentsFirst as x, getOrCreate as y, isString as z };
995
+ export { Stack as S, ifind as a, iflat as b, commonHead as c, isIterable as d, isome as e, iunique as f, getOrCreate as g, difference as h, i$1 as i, equals as j, intersection as k, l, m, stringHash as n, objectHash as o, requireIterator as p, u as q, requireForeach as r, symmetricDifference as s, d as t, union as u, n as v, hasIntersection as w };
@@ -0,0 +1,5 @@
1
+ function u$1(o,n,a){let t=r=>o(r,...n);return a===void 0?t:Object.assign(t,{lazy:a,lazyArgs:n})}
2
+
3
+ function u(r,n,o){let a=r.length-n.length;if(a===0)return r(...n);if(a===1)return u$1(r,n,o);throw new Error("Wrong number of arguments")}
4
+
5
+ export { u };
@@ -1,4 +1,4 @@
1
- import { E as ElementModel, d as DeploymentElementModel, A as AnyAux, e as DeploymentNodeModel, D as DeployedInstanceModel, j as RelationshipsAccum, R as RelationshipModel, f as DeploymentRelationModel } from './core.Brmu7VBL.mjs';
1
+ import { E as ElementModel, d as DeploymentElementModel, A as AnyAux, e as DeploymentNodeModel, D as DeployedInstanceModel, j as RelationshipsAccum, R as RelationshipModel, f as DeploymentRelationModel } from './core.CtloVwbo.mjs';
2
2
  import { F as Fqn, a as IteratorLike } from './core.30yYKXcZ.mjs';
3
3
 
4
4
  interface Connection<Elem = ElementModel | DeploymentElementModel, Id = string> {
@@ -1,6 +1,8 @@
1
- import { D as DefaultElementShape, c as DefaultThemeColor, h as DefaultShapeSize, ab as o$8, t as isElementWhere, Q as whereOperatorAsPredicate, G as isWildcard, q as isElementKindExpr, s as isElementTagExpr, n as n$4, u as isExpandedElementExpr, r as isElementRef, l as isCustomElement, a9 as isViewRuleStyle, ac as y$2, V as ComputedNode, E as ElementKind, S as DefaultArrowType, I as FqnExpr, R as RelationExpr, o as o$9, a8 as isViewRulePredicate, a4 as isViewRuleAutoLayout, a7 as isViewRuleGroup, a5 as isViewRuleGlobalPredicateRef, a6 as isViewRuleGlobalStyle, aa as stepEdgeId, a2 as isDynamicViewParallelSteps, T as DefaultLineStyle, U as DefaultRelationshipColor, x as isOutgoing$1, v as isIncoming$1, w as isInOut, y as isRelation, F as isRelationWhere, m as isCustomRelationExpr, C as isRelationPredicateExpr, b as isElementPredicateExpr, a as isElementView, a1 as isDynamicView, a0 as isDeploymentView, d as DeploymentElement, Y as extractStep, a3 as isStepEdgeId, e as isScopedElementView } from './core.yND74qFI.mjs';
2
- import { P as C, Q as s$1, R as a$5, r as hierarchyLevel, s as isAncestor, j as commonAncestor, w as sortNaturalByFqn, m as m$3, f as commonHead, T as getDefaultExportFromCjs, U as requireForeach, V as requireIterator, W as u$7, O as objectHash, K as intersection, I as difference, M as union, N as stringHash, J as equals, u as isDescendantOf, z as isString, d as isSameHierarchy, F as isome, A as ifilter, E as isIterable, t as toSet, x as sortParentsFirst, H as toArray, D as DefaultMap, C as imap, a as i$9, X as d$6, p as parentFqn, Y as n$5, k as compareByFqnHierarchically, b as isNonEmptyArray, g as compareNatural, n as nameFromFqn, c as t$6, l as l$7, Z as hasIntersection, v as sortByFqnHierarchically, h as ancestorsFqn, S as Stack, G as iunique, B as iflat, y as getOrCreate, i as ifind } from './core.DvRnF4Sc.mjs';
3
- import { u as u$6, a as nonNullable, i as invariant, n as nonexhaustive } from './core.DRxv3HIl.mjs';
1
+ import { D as DefaultElementShape, c as DefaultThemeColor, h as DefaultShapeSize, ab as o$8, t as isElementWhere, Q as whereOperatorAsPredicate, G as isWildcard, q as isElementKindExpr, s as isElementTagExpr, n as n$4, u as isExpandedElementExpr, r as isElementRef, l as isCustomElement, a9 as isViewRuleStyle, ac as y$2, V as ComputedNode, E as ElementKind, S as DefaultArrowType, I as FqnExpr, R as RelationExpr, o as o$9, a8 as isViewRulePredicate, a4 as isViewRuleAutoLayout, a7 as isViewRuleGroup, a5 as isViewRuleGlobalPredicateRef, a6 as isViewRuleGlobalStyle, aa as stepEdgeId, a2 as isDynamicViewParallelSteps, T as DefaultLineStyle, U as DefaultRelationshipColor, x as isOutgoing$1, v as isIncoming$1, w as isInOut, y as isRelation, F as isRelationWhere, m as isCustomRelationExpr, C as isRelationPredicateExpr, b as isElementPredicateExpr, a as isElementView, a1 as isDynamicView, a0 as isDeploymentView, d as DeploymentElement, Y as extractStep, a3 as isStepEdgeId, e as isScopedElementView } from './core.BMep80lJ.mjs';
2
+ import { C, y as s$1, z as a$5, u as hierarchyLevel, a as isAncestor, m as commonAncestor, w as sortNaturalByFqn, j as getDefaultExportFromCjs, i as isDescendantOf, x as isString, g as isSameHierarchy, c as ifilter, t as toSet, s as sortParentsFirst, b as toArray, D as DefaultMap, d as imap, p as parentFqn, o as compareByFqnHierarchically, e as isNonEmptyArray, k as compareNatural, n as nameFromFqn, f as t$6, v as sortByFqnHierarchically, l as ancestorsFqn } from './core.CQXU9DF7.mjs';
3
+ import { u as u$6 } from './core.DbRvwARP.mjs';
4
+ import { n as nonNullable, i as invariant, a as nonexhaustive } from './core.C-YXI-43.mjs';
5
+ import { m as m$3, c as commonHead, r as requireForeach, p as requireIterator, q as u$7, o as objectHash, k as intersection, h as difference, u as union, n as stringHash, j as equals, e as isome, d as isIterable, i as i$9, t as d$6, v as n$5, l as l$7, w as hasIntersection, S as Stack, f as iunique, b as iflat, g as getOrCreate, a as ifind } from './core.Cu-UdkSl.mjs';
4
6
 
5
7
  function y$1(t,i){let a=i.length-t.length;if(a===1){let[n,...r]=i;return C(n,{lazy:t,lazyArgs:r})}if(a===0){let n={lazy:t,lazyArgs:i};return Object.assign(e=>C(e,n),n)}throw new Error("Wrong number of arguments")}
6
8
 
@@ -50,7 +52,7 @@ function n(e){return e===void 0?true:typeof e=="string"||Array.isArray(e)?e.leng
50
52
 
51
53
  function e(o){return typeof o=="boolean"}
52
54
 
53
- function i$2(...e){return u$6(p,e)}var p=(e,a)=>{let n={};for(let[d,t]of e.entries()){let y=a(t,d,e);if(y!==void 0){let{[y]:r}=n;r===void 0&&(r=[],n[y]=r),r.push(t);}}return n};
55
+ function i$2(...e){return u$6(p,e)}var p=(e,a)=>{let n=new Map;for(let[d,t]of e.entries()){let y=a(t,d,e);if(y!==void 0){let r=n.get(y);r===void 0&&(r=[],n.set(y,r)),r.push(t);}}return Object.fromEntries(n)};
54
56
 
55
57
  function k(...n){return u$6(u$2,n)}function u$2(n,e){if(n===e||Object.is(n,e))return true;if(typeof n!="object"||typeof e!="object"||n===null||e===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(e))return false;if(Array.isArray(n))return l$2(n,e);if(n instanceof Map)return a$1(n,e);if(n instanceof Set)return c(n,e);if(n instanceof Date)return n.getTime()===e.getTime();if(n instanceof RegExp)return n.toString()===e.toString();if(Object.keys(n).length!==Object.keys(e).length)return false;for(let[r,t]of Object.entries(n))if(!(r in e)||!u$2(t,e[r]))return false;return true}function l$2(n,e){if(n.length!==e.length)return false;for(let[r,t]of n.entries())if(!u$2(t,e[r]))return false;return true}function a$1(n,e){if(n.size!==e.size)return false;for(let[r,t]of n.entries())if(!e.has(r)||!u$2(t,e.get(r)))return false;return true}function c(n,e){if(n.size!==e.size)return false;let r=[...e];for(let t of n){let o=false;for(let[s,f]of r.entries())if(u$2(t,f)){o=true,r.splice(s,1);break}if(!o)return false}return true}
56
58
 
@@ -75,9 +77,11 @@ class ElementModel {
75
77
  this.$model = $model;
76
78
  this.$element = $element;
77
79
  this.id = this.$element.id;
80
+ this._literalId = this.$element.id;
78
81
  this.hierarchyLevel = hierarchyLevel(this.id);
79
82
  }
80
83
  id;
84
+ _literalId;
81
85
  hierarchyLevel;
82
86
  get parent() {
83
87
  return this.$model.parent(this);
@@ -1470,10 +1474,7 @@ function calcViewLayoutHash(view) {
1470
1474
  l$3(({ source, target, ...edge }) => [`${source}:${target}`, edge])
1471
1475
  )
1472
1476
  };
1473
- view.hash = objectHash(tohash, {
1474
- ignoreUnknown: true,
1475
- respectType: false
1476
- });
1477
+ view.hash = objectHash(tohash);
1477
1478
  return view;
1478
1479
  }
1479
1480
 
@@ -6832,6 +6833,9 @@ class NodeModel {
6832
6833
  get navigateTo() {
6833
6834
  return this.$node.navigateTo ? this.$view.$model.view(this.$node.navigateTo) : null;
6834
6835
  }
6836
+ get style() {
6837
+ return this.$node.style;
6838
+ }
6835
6839
  /**
6836
6840
  * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
6837
6841
  * (from closest to root)
@@ -1,4 +1,4 @@
1
- export { A as AsFqn, B as BorderStyles, V as ComputedNode, W as ComputedView, S as DefaultArrowType, D as DefaultElementShape, T as DefaultLineStyle, g as DefaultPaddingSize, U as DefaultRelationshipColor, h as DefaultShapeSize, j as DefaultTextSize, c as DefaultThemeColor, d as DeploymentElement, X as DiagramNode, E as ElementKind, k as ElementShapes, H as ExpressionV2, I as FqnExpr, J as FqnRef, R as RelationExpr, Y as extractStep, Z as getBBoxCenter, _ as getParallelStepsPrefix, K as isAndOperator, $ as isAutoLayoutDirection, l as isCustomElement, m as isCustomRelationExpr, a0 as isDeploymentView, a1 as isDynamicView, a2 as isDynamicViewParallelSteps, p as isElement, q as isElementKindExpr, b as isElementPredicateExpr, r as isElementRef, s as isElementTagExpr, a as isElementView, t as isElementWhere, u as isExpandedElementExpr, i as isExtendsElementView, w as isInOut, v as isIncoming, L as isKindEqual, M as isNotOperator, N as isOrOperator, x as isOutgoing, O as isParticipantOperator, y as isRelation, z as isRelationExpression, C as isRelationPredicateExpr, F as isRelationWhere, e as isScopedElementView, a3 as isStepEdgeId, P as isTagEqual, a4 as isViewRuleAutoLayout, a5 as isViewRuleGlobalPredicateRef, a6 as isViewRuleGlobalStyle, a7 as isViewRuleGroup, a8 as isViewRulePredicate, a9 as isViewRuleStyle, G as isWildcard, aa as stepEdgeId, Q as whereOperatorAsPredicate } from '../shared/core.yND74qFI.mjs';
1
+ export { A as AsFqn, B as BorderStyles, V as ComputedNode, W as ComputedView, S as DefaultArrowType, D as DefaultElementShape, T as DefaultLineStyle, g as DefaultPaddingSize, U as DefaultRelationshipColor, h as DefaultShapeSize, j as DefaultTextSize, c as DefaultThemeColor, d as DeploymentElement, X as DiagramNode, E as ElementKind, k as ElementShapes, H as ExpressionV2, I as FqnExpr, J as FqnRef, R as RelationExpr, Y as extractStep, Z as getBBoxCenter, _ as getParallelStepsPrefix, K as isAndOperator, $ as isAutoLayoutDirection, l as isCustomElement, m as isCustomRelationExpr, a0 as isDeploymentView, a1 as isDynamicView, a2 as isDynamicViewParallelSteps, p as isElement, q as isElementKindExpr, b as isElementPredicateExpr, r as isElementRef, s as isElementTagExpr, a as isElementView, t as isElementWhere, u as isExpandedElementExpr, i as isExtendsElementView, w as isInOut, v as isIncoming, L as isKindEqual, M as isNotOperator, N as isOrOperator, x as isOutgoing, O as isParticipantOperator, y as isRelation, z as isRelationExpression, C as isRelationPredicateExpr, F as isRelationWhere, e as isScopedElementView, a3 as isStepEdgeId, P as isTagEqual, a4 as isViewRuleAutoLayout, a5 as isViewRuleGlobalPredicateRef, a6 as isViewRuleGlobalStyle, a7 as isViewRuleGroup, a8 as isViewRulePredicate, a9 as isViewRuleStyle, G as isWildcard, aa as stepEdgeId, Q as whereOperatorAsPredicate } from '../shared/core.BMep80lJ.mjs';
2
2
 
3
3
  const ThemeColors = [
4
4
  "amber",
@@ -1,6 +1,5 @@
1
1
  export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from '../shared/core.HKn0jlo_.mjs';
2
2
  import { N as NonEmptyArray, a as IteratorLike } from '../shared/core.30yYKXcZ.mjs';
3
- export { default as objectHash } from '/home/runner/work/likec4/likec4/node_modules/.pnpm/@types+object-hash@3.0.6/node_modules/@types/object-hash/index.d.ts';
4
3
  import { IsNumericLiteral } from 'type-fest';
5
4
 
6
5
  /**
@@ -455,4 +454,6 @@ declare function symmetricDifference<T>(a: ReadonlySet<T>, b: ReadonlySet<T>): S
455
454
  */
456
455
  declare function stringHash(str: string): string;
457
456
 
458
- export { BiMap, DefaultMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, commonHead, compareNatural, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast, ifilter, ifind, iflat, imap, intersection, ireduce, isIterable, isNonEmptyArray, isString, isome, iunique, stringHash, symmetricDifference, toArray, toSet, union };
457
+ declare function objectHash(value: any): string;
458
+
459
+ export { BiMap, DefaultMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, commonHead, compareNatural, compareRelations, delay, difference, equals as equalsSet, getOrCreate, hasAtLeast, ifilter, ifind, iflat, imap, intersection, ireduce, isIterable, isNonEmptyArray, isString, isome, iunique, objectHash, stringHash, symmetricDifference, toArray, toSet, union };
@@ -1,6 +1,8 @@
1
- import { U as requireForeach, T as getDefaultExportFromCjs, V as requireIterator, e as t, Y as n, j as commonAncestor, o as compareFqnHierarchically } from '../shared/core.DvRnF4Sc.mjs';
2
- export { D as DefaultMap, S as Stack, h as ancestorsFqn, f as commonHead, k as compareByFqnHierarchically, g as compareNatural, I as difference, J as equalsSet, y as getOrCreate, a as hasAtLeast, q as hierarchyDistance, r as hierarchyLevel, A as ifilter, i as ifind, B as iflat, C as imap, K as intersection, s as isAncestor, u as isDescendantOf, E as isIterable, b as isNonEmptyArray, d as isSameHierarchy, z as isString, F as isome, G as iunique, n as nameFromFqn, O as objectHash, p as parentFqn, v as sortByFqnHierarchically, w as sortNaturalByFqn, x as sortParentsFirst, N as stringHash, L as symmetricDifference, H as toArray, t as toSet, M as union } from '../shared/core.DvRnF4Sc.mjs';
3
- import { i as invariant } from '../shared/core.DRxv3HIl.mjs';
1
+ import { r as requireForeach, p as requireIterator, v as n } from '../shared/core.Cu-UdkSl.mjs';
2
+ export { S as Stack, c as commonHead, h as difference, j as equalsSet, g as getOrCreate, i as hasAtLeast, a as ifind, b as iflat, k as intersection, d as isIterable, e as isome, f as iunique, o as objectHash, n as stringHash, s as symmetricDifference, u as union } from '../shared/core.Cu-UdkSl.mjs';
3
+ import { j as getDefaultExportFromCjs, h as t, m as commonAncestor, q as compareFqnHierarchically } from '../shared/core.CQXU9DF7.mjs';
4
+ export { D as DefaultMap, l as ancestorsFqn, o as compareByFqnHierarchically, k as compareNatural, r as hierarchyDistance, u as hierarchyLevel, c as ifilter, d as imap, a as isAncestor, i as isDescendantOf, e as isNonEmptyArray, g as isSameHierarchy, x as isString, n as nameFromFqn, p as parentFqn, v as sortByFqnHierarchically, w as sortNaturalByFqn, s as sortParentsFirst, b as toArray, t as toSet } from '../shared/core.CQXU9DF7.mjs';
5
+ import { i as invariant } from '../shared/core.C-YXI-43.mjs';
4
6
 
5
7
  function o(r,n){let e=Math.ceil(r),t=Math.floor(n);if(t<e)throw new RangeError(`randomInteger: The range [${r.toString()},${n.toString()}] contains no integer`);return Math.floor(Math.random()*(t-e+1)+e)}
6
8