@likec4/core 1.38.1 → 1.39.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 (98) hide show
  1. package/dist/builder/index.d.mts +6 -3
  2. package/dist/builder/index.mjs +55 -111
  3. package/dist/compute-view/index.d.mts +6 -3
  4. package/dist/compute-view/index.mjs +33 -34
  5. package/dist/compute-view/relationships-view/index.d.mts +6 -3
  6. package/dist/compute-view/relationships-view/index.mjs +6 -6
  7. package/dist/index.d.mts +8 -5
  8. package/dist/index.mjs +15 -24
  9. package/dist/model/connection/deployment/index.d.mts +8 -5
  10. package/dist/model/connection/deployment/index.mjs +7 -9
  11. package/dist/model/connection/index.d.mts +10 -7
  12. package/dist/model/connection/index.mjs +10 -14
  13. package/dist/model/connection/model/index.d.mts +8 -5
  14. package/dist/model/connection/model/index.mjs +7 -10
  15. package/dist/model/index.d.mts +13 -10
  16. package/dist/model/index.mjs +17 -20
  17. package/dist/shared/core.20m8Um0g.d.mts +253 -0
  18. package/dist/shared/{core.CpwrZi3D.mjs → core.4u1dVmfX.mjs} +3 -5
  19. package/dist/shared/{core.Bp-IQmJR.mjs → core.BB6zA-UU.mjs} +9 -214
  20. package/dist/shared/{core.BH0VqY-7.mjs → core.BVNaR17u.mjs} +1 -1
  21. package/dist/shared/{core.BL_xjl90.mjs → core.Be1n9a0i.mjs} +4 -5
  22. package/dist/shared/{core.BoyJPEen.mjs → core.Be4Jy9Qx.mjs} +2 -2
  23. package/dist/shared/{core.H8NbNp2X.mjs → core.BqVo8LrH.mjs} +1 -1
  24. package/dist/shared/{core.DDoAFHHp.mjs → core.BuoXfSMj.mjs} +1 -1
  25. package/dist/shared/{core.DhDo8LAz.d.mts → core.C7pZp1nR.d.mts} +3 -3
  26. package/dist/shared/{core.BH9nN-_I.mjs → core.CCD1ID81.mjs} +3 -4
  27. package/dist/shared/{core.8KM0D6va.mjs → core.CNGyqkJh.mjs} +1 -9
  28. package/dist/shared/{core.B0oEIXqd.mjs → core.CUw_2J9j.mjs} +1 -1
  29. package/dist/shared/{core.C4Cn4Jy_.mjs → core.CWv15GLo.mjs} +11 -15
  30. package/dist/shared/{core.Bf5zKDK1.d.mts → core.CXCmvCws.d.mts} +2 -2
  31. package/dist/shared/core.CaT0SUUK.mjs +201 -0
  32. package/dist/shared/{core.Dtw1SBlz.d.mts → core.ClpXZ4Ib.d.mts} +3 -3
  33. package/dist/shared/{core.DC6zzxS0.mjs → core.CsbOakly.mjs} +13 -22
  34. package/dist/shared/{core.Btl47GOn.mjs → core.DLpidoWc.mjs} +2 -2
  35. package/dist/shared/{core.wwaSalox.d.mts → core.DM3vdkO_.d.mts} +1 -1
  36. package/dist/shared/core.DXhDWKFZ.d.mts +3 -0
  37. package/dist/shared/{core.O6FG0HF9.d.mts → core.DdzRtJ9d.d.mts} +1 -1
  38. package/dist/shared/{core.OUoo2ohq.mjs → core.DgttqsJc.mjs} +5 -9
  39. package/dist/shared/{core.Dhc0yIwT.mjs → core.DlG1xWt2.mjs} +3 -43
  40. package/dist/shared/core.DnRszv-l.mjs +11982 -0
  41. package/dist/shared/core.DoM6aM9N.mjs +7 -0
  42. package/dist/shared/{core.CzHQRs5x.mjs → core.DozSPE83.mjs} +43 -60
  43. package/dist/shared/{core.DsMrjY2q.mjs → core.GTgsmXS_.mjs} +2 -2
  44. package/dist/shared/core.ILwny7BV.mjs +38 -0
  45. package/dist/shared/core.PHwHXzkG.d.mts +213 -0
  46. package/dist/shared/core.T-eLZTW_.mjs +59 -0
  47. package/dist/shared/{core.CE_hG7EJ.d.mts → core.aWJgARyY.d.mts} +10 -486
  48. package/dist/shared/{core.BvlHvikl.d.mts → core.v1iEaXaR.d.mts} +5 -3
  49. package/dist/shared/core.yHe79zEl.mjs +98 -0
  50. package/dist/theme/index.d.mts +3 -126
  51. package/dist/theme/index.mjs +2 -3
  52. package/dist/types/_aux.d.mts +1 -1
  53. package/dist/types/expression-model.d.mts +191 -0
  54. package/dist/types/expression-model.mjs +112 -0
  55. package/dist/types/expression.d.mts +7 -0
  56. package/dist/types/expression.mjs +116 -0
  57. package/dist/types/fqnRef.d.mts +61 -0
  58. package/dist/types/fqnRef.mjs +46 -0
  59. package/dist/types/index.d.mts +6 -3
  60. package/dist/types/index.mjs +9 -9
  61. package/dist/types/scalar.mjs +2 -3
  62. package/dist/utils/index.d.mts +6 -428
  63. package/dist/utils/index.mjs +56 -15
  64. package/dist/utils/iterable/index.d.mts +2 -3
  65. package/dist/utils/iterable/index.mjs +9 -44
  66. package/package.json +8 -7
  67. package/src/index.ts +24 -1
  68. package/src/model/RelationModel.ts +1 -1
  69. package/src/model/index.ts +1 -1
  70. package/src/theme/element.ts +2 -2
  71. package/src/theme/relationships.ts +2 -2
  72. package/src/types/RichText.ts +1 -1
  73. package/src/types/expression-model.ts +3 -1
  74. package/src/types/expression.ts +3 -1
  75. package/src/types/fqnRef.ts +4 -1
  76. package/src/utils/guards.ts +0 -1
  77. package/src/utils/index.ts +0 -1
  78. package/dist/shared/core.BW8K1y6R.mjs +0 -278
  79. package/dist/shared/core.BgvIuGGU.mjs +0 -3
  80. package/dist/shared/core.BpJu1RrF.mjs +0 -5
  81. package/dist/shared/core.ByrmCl9I.mjs +0 -5
  82. package/dist/shared/core.CnIyafWn.mjs +0 -3
  83. package/dist/shared/core.DK6I-Nr7.mjs +0 -149
  84. package/dist/shared/core.DbRvwARP.mjs +0 -5
  85. package/dist/shared/core.Dw47t7nG.mjs +0 -5236
  86. package/dist/shared/core.zLlww-07.mjs +0 -3
  87. package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +0 -425
  88. package/src/builder/__snapshots__/Builder-style2.compute-model.json5 +0 -318
  89. package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +0 -221
  90. package/src/compute-view/deployment-view/__test__/TestHelper.ts +0 -249
  91. package/src/compute-view/deployment-view/__test__/fixture.ts +0 -238
  92. package/src/compute-view/dynamic-view/__test__/fixture.ts +0 -67
  93. package/src/compute-view/element-view/__test__/TestHelper.ts +0 -282
  94. package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +0 -458
  95. package/src/compute-view/element-view/__test__/fixture.ts +0 -749
  96. package/src/compute-view/utils/__snapshots__/sortNodes.spec.ts.snap +0 -113
  97. package/src/model/__test__/fixture.ts +0 -168
  98. package/src/theme/__test__/theme-index.ts +0 -29
@@ -1,213 +1,8 @@
1
- import { r as getDefaultExportFromCjs, C } from './core.OUoo2ohq.mjs';
2
- import { u as u$1 } from './core.DbRvwARP.mjs';
3
- import { m } from './core.ByrmCl9I.mjs';
4
- import { l } from './core.8KM0D6va.mjs';
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';
5
4
  import { i as invariant } from './core.D4npX2q8.mjs';
6
5
 
7
- function d(...e){return u$1(i,e,o$1)}var i=(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
-
9
- function u(...e){return u$1(o,e)}function o(e,a){let n=[];for(let[i,r]of e.entries()){if(!a(r,i,e))break;n.push(r);}return n}
10
-
11
- var support = {};
12
-
13
- var hasRequiredSupport;
14
-
15
- function requireSupport () {
16
- if (hasRequiredSupport) return support;
17
- hasRequiredSupport = 1;
18
- support.ARRAY_BUFFER_SUPPORT = typeof ArrayBuffer !== 'undefined';
19
- support.SYMBOL_SUPPORT = typeof Symbol !== 'undefined';
20
- return support;
21
- }
22
-
23
- /**
24
- * Obliterator ForEach Function
25
- * =============================
26
- *
27
- * Helper function used to easily iterate over mixed values.
28
- */
29
-
30
- var foreach;
31
- var hasRequiredForeach;
32
-
33
- function requireForeach () {
34
- if (hasRequiredForeach) return foreach;
35
- hasRequiredForeach = 1;
36
- var support = requireSupport();
37
-
38
- var ARRAY_BUFFER_SUPPORT = support.ARRAY_BUFFER_SUPPORT;
39
- var SYMBOL_SUPPORT = support.SYMBOL_SUPPORT;
40
-
41
- /**
42
- * Function able to iterate over almost any iterable JS value.
43
- *
44
- * @param {any} iterable - Iterable value.
45
- * @param {function} callback - Callback function.
46
- */
47
- foreach = function forEach(iterable, callback) {
48
- var iterator, k, i, l, s;
49
-
50
- if (!iterable) throw new Error('obliterator/forEach: invalid iterable.');
51
-
52
- if (typeof callback !== 'function')
53
- throw new Error('obliterator/forEach: expecting a callback.');
54
-
55
- // The target is an array or a string or function arguments
56
- if (
57
- Array.isArray(iterable) ||
58
- (ARRAY_BUFFER_SUPPORT && ArrayBuffer.isView(iterable)) ||
59
- typeof iterable === 'string' ||
60
- iterable.toString() === '[object Arguments]'
61
- ) {
62
- for (i = 0, l = iterable.length; i < l; i++) callback(iterable[i], i);
63
- return;
64
- }
65
-
66
- // The target has a #.forEach method
67
- if (typeof iterable.forEach === 'function') {
68
- iterable.forEach(callback);
69
- return;
70
- }
71
-
72
- // The target is iterable
73
- if (
74
- SYMBOL_SUPPORT &&
75
- Symbol.iterator in iterable &&
76
- typeof iterable.next !== 'function'
77
- ) {
78
- iterable = iterable[Symbol.iterator]();
79
- }
80
-
81
- // The target is an iterator
82
- if (typeof iterable.next === 'function') {
83
- iterator = iterable;
84
- i = 0;
85
-
86
- while (((s = iterator.next()), s.done !== true)) {
87
- callback(s.value, i);
88
- i++;
89
- }
90
-
91
- return;
92
- }
93
-
94
- // The target is a plain object
95
- for (k in iterable) {
96
- if (iterable.hasOwnProperty(k)) {
97
- callback(iterable[k], k);
98
- }
99
- }
100
-
101
- return;
102
- };
103
- return foreach;
104
- }
105
-
106
- /**
107
- * Obliterator Iterator Class
108
- * ===========================
109
- *
110
- * Simple class representing the library's iterators.
111
- */
112
-
113
- var iterator;
114
- var hasRequiredIterator;
115
-
116
- function requireIterator () {
117
- if (hasRequiredIterator) return iterator;
118
- hasRequiredIterator = 1;
119
- /**
120
- * Iterator class.
121
- *
122
- * @constructor
123
- * @param {function} next - Next function.
124
- */
125
- function Iterator(next) {
126
- if (typeof next !== 'function')
127
- throw new Error('obliterator/iterator: expecting a function!');
128
-
129
- this.next = next;
130
- }
131
-
132
- /**
133
- * If symbols are supported, we add `next` to `Symbol.iterator`.
134
- */
135
- if (typeof Symbol !== 'undefined')
136
- Iterator.prototype[Symbol.iterator] = function () {
137
- return this;
138
- };
139
-
140
- /**
141
- * Returning an iterator of the given values.
142
- *
143
- * @param {any...} values - Values.
144
- * @return {Iterator}
145
- */
146
- Iterator.of = function () {
147
- var args = arguments,
148
- l = args.length,
149
- i = 0;
150
-
151
- return new Iterator(function () {
152
- if (i >= l) return {done: true};
153
-
154
- return {done: false, value: args[i++]};
155
- });
156
- };
157
-
158
- /**
159
- * Returning an empty iterator.
160
- *
161
- * @return {Iterator}
162
- */
163
- Iterator.empty = function () {
164
- var iterator = new Iterator(function () {
165
- return {done: true};
166
- });
167
-
168
- return iterator;
169
- };
170
-
171
- /**
172
- * Returning an iterator over the given indexed sequence.
173
- *
174
- * @param {string|Array} sequence - Target sequence.
175
- * @return {Iterator}
176
- */
177
- Iterator.fromSequence = function (sequence) {
178
- var i = 0,
179
- l = sequence.length;
180
-
181
- return new Iterator(function () {
182
- if (i >= l) return {done: true};
183
-
184
- return {done: false, value: sequence[i++]};
185
- });
186
- };
187
-
188
- /**
189
- * Returning whether the given value is an iterator.
190
- *
191
- * @param {any} value - Value.
192
- * @return {boolean}
193
- */
194
- Iterator.is = function (value) {
195
- if (value instanceof Iterator) return true;
196
-
197
- return (
198
- typeof value === 'object' &&
199
- value !== null &&
200
- typeof value.next === 'function'
201
- );
202
- };
203
-
204
- /**
205
- * Exporting.
206
- */
207
- iterator = Iterator;
208
- return iterator;
209
- }
210
-
211
6
  /**
212
7
  * Mnemonist Stack
213
8
  * ================
@@ -436,10 +231,10 @@ function commonHead(sources, targets, equals) {
436
231
  return [];
437
232
  }
438
233
  equals ??= Object.is;
439
- return C(
440
- d(sources, targets),
441
- u(([source, target]) => equals(source, target)),
442
- m(([source, _]) => source)
234
+ return pipe(
235
+ zip(sources, targets),
236
+ takeWhile(([source, target]) => equals(source, target)),
237
+ map(([source, _]) => source)
443
238
  );
444
239
  }
445
240
 
@@ -465,7 +260,7 @@ const objecthash = /*@__PURE__*/getDefaultExportFromCjs(object_hashExports);
465
260
 
466
261
  function objectHash(value) {
467
262
  invariant(
468
- typeof value === "object" && l(value),
263
+ typeof value === "object" && isNonNullish(value),
469
264
  "objectHash: value must be an object"
470
265
  );
471
266
  return objecthash(value, {
@@ -474,4 +269,4 @@ function objectHash(value) {
474
269
  });
475
270
  }
476
271
 
477
- export { Stack as S, requireIterator as a, commonHead as c, d, objectHash as o, requireForeach as r, u };
272
+ export { Stack as S, commonHead as c, objectHash as o };
@@ -1,4 +1,4 @@
1
- import { i as isAncestor } from './core.OUoo2ohq.mjs';
1
+ import { i as isAncestor } from './core.DgttqsJc.mjs';
2
2
 
3
3
  var Connection;
4
4
  ((Connection2) => {
@@ -1,5 +1,4 @@
1
- import { n } from './core.CnIyafWn.mjs';
2
- import { t } from './core.zLlww-07.mjs';
1
+ import { isTruthy, isString } from 'remeda';
3
2
  import { i as invariant } from './core.D4npX2q8.mjs';
4
3
 
5
4
  function ProjectId(name) {
@@ -9,8 +8,8 @@ function flattenMarkdownOrString(value) {
9
8
  if (value === null || value === void 0) {
10
9
  return null;
11
10
  }
12
- const content = t(value) ? value : value.txt ?? value.md;
13
- return n(content?.trim()) ? content : null;
11
+ const content = isString(value) ? value : value.txt ?? value.md;
12
+ return isTruthy(content?.trim()) ? content : null;
14
13
  }
15
14
  function Fqn(name, parent) {
16
15
  return parent ? parent + "." + name : name;
@@ -29,7 +28,7 @@ function RelationId(id) {
29
28
  return id;
30
29
  }
31
30
  function GlobalFqn(projectId, name) {
32
- invariant(n(projectId), "Project ID must start with @");
31
+ invariant(isTruthy(projectId), "Project ID must start with @");
33
32
  return "@" + projectId + "." + name;
34
33
  }
35
34
  function isGlobalFqn(fqn) {
@@ -1,9 +1,9 @@
1
- import { t } from './core.BH9nN-_I.mjs';
1
+ import { isFunction } from 'remeda';
2
2
  import { i as invariant } from './core.D4npX2q8.mjs';
3
3
 
4
4
  function isome(arg1, arg2) {
5
5
  const pred = arg2 ?? arg1;
6
- invariant(t(pred));
6
+ invariant(isFunction(pred));
7
7
  function _some(iter) {
8
8
  for (const value of iter) {
9
9
  if (pred(value)) {
@@ -1,4 +1,4 @@
1
- import { m as memoizeProp, b as markdownToText, a as markdownToHtml } from './core.B0oEIXqd.mjs';
1
+ import { m as memoizeProp, a as markdownToText, b as markdownToHtml } from './core.CUw_2J9j.mjs';
2
2
  import { n as nonexhaustive } from './core.D4npX2q8.mjs';
3
3
 
4
4
  const DefaultThemeColor = "primary";
@@ -1,4 +1,4 @@
1
- import { r as getDefaultExportFromCjs } from './core.OUoo2ohq.mjs';
1
+ import { r as getDefaultExportFromCjs } from './core.DgttqsJc.mjs';
2
2
 
3
3
  /**
4
4
  * Mnemonist DefaultMap
@@ -1,6 +1,6 @@
1
- import { C as Connection, c as customInspectSymbol } from './core.Bf5zKDK1.mjs';
2
- import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.BvlHvikl.mjs';
3
- import { A as Any, C as EdgeId } from './core.O6FG0HF9.mjs';
1
+ import { C as Connection, c as customInspectSymbol } from './core.CXCmvCws.mjs';
2
+ import { e as DeploymentElementModel, i as RelationshipsAccum, D as DeploymentNodeModel, R as RelationshipModel, b as DeploymentRelationModel } from './core.v1iEaXaR.mjs';
3
+ import { A as Any, C as EdgeId } from './core.DdzRtJ9d.mjs';
4
4
  import { I as IteratorLike } from './core.DuSLYTG6.mjs';
5
5
 
6
6
  /**
@@ -1,10 +1,9 @@
1
+ import { isFunction } from 'remeda';
1
2
  import { i as invariant } from './core.D4npX2q8.mjs';
2
3
 
3
- function t(n){return typeof n=="function"}
4
-
5
4
  function ifilter(arg1, arg2) {
6
5
  const pred = arg2 ?? arg1;
7
- invariant(t(pred));
6
+ invariant(isFunction(pred));
8
7
  function* _filter(iter) {
9
8
  for (const value of iter) {
10
9
  if (pred(value)) {
@@ -19,4 +18,4 @@ function ifilter(arg1, arg2) {
19
18
  return _filter(arg1);
20
19
  }
21
20
 
22
- export { ifilter as i, t };
21
+ export { ifilter as i };
@@ -1,11 +1,3 @@
1
- function n(e){return e!==void 0}
2
-
3
- function l(n){return n!=null}
4
-
5
- function isIterable(something) {
6
- return l(something) && typeof something === "object" && Symbol.iterator in something;
7
- }
8
-
9
1
  function iflat(iterable) {
10
2
  return iterable ? _iflat(iterable) : _iflat;
11
3
  }
@@ -30,4 +22,4 @@ function* _iunique(iterable) {
30
22
  return;
31
23
  }
32
24
 
33
- export { isIterable as a, iunique as b, iflat as i, l, n };
25
+ export { iunique as a, iflat as i };
@@ -44,4 +44,4 @@ function markdownToText(markdown) {
44
44
  });
45
45
  }
46
46
 
47
- export { markdownToHtml as a, markdownToText as b, memoizeProp as m };
47
+ export { markdownToText as a, markdownToHtml as b, memoizeProp as m };
@@ -1,15 +1,11 @@
1
- import { c as customInspectSymbol } from './core.BH0VqY-7.mjs';
2
- import { o } from './core.BgvIuGGU.mjs';
3
- import { a as intersection, b as stringHash, u as union, d as difference, e as equals } from './core.CpwrZi3D.mjs';
4
- import { u } from './core.DbRvwARP.mjs';
5
- import { m } from './core.ByrmCl9I.mjs';
6
- import { j as isDescendantOf, i as isAncestor, q as isString, C, l as sortNaturalByFqn, k as isSameHierarchy } from './core.OUoo2ohq.mjs';
7
- import { i as isome } from './core.BoyJPEen.mjs';
8
- import { i as ifilter } from './core.BH9nN-_I.mjs';
1
+ import { pipe, map, prop, isNot } from 'remeda';
2
+ import { c as customInspectSymbol } from './core.BVNaR17u.mjs';
3
+ import { i as intersection, a as stringHash, u as union, d as difference, e as equals } from './core.4u1dVmfX.mjs';
4
+ import { b as isDescendantOf, i as isAncestor, e as isString, s as sortNaturalByFqn, d as isSameHierarchy } from './core.DgttqsJc.mjs';
5
+ import { i as isome } from './core.Be4Jy9Qx.mjs';
6
+ import { i as ifilter } from './core.CCD1ID81.mjs';
9
7
  import { i as invariant } from './core.D4npX2q8.mjs';
10
8
 
11
- function p(...e){return u(t,e)}var t=(e,o)=>e[o];
12
-
13
9
  function isNestedConnection(nested, parent) {
14
10
  if (!parent) {
15
11
  const p = nested;
@@ -56,14 +52,14 @@ function sortConnectionsByBoundaryHierarchy(connections, sort) {
56
52
  return _sortByBoundary(connections, sort ?? "asc");
57
53
  }
58
54
  function _sortByBoundary(connections, order) {
59
- return C(
55
+ return pipe(
60
56
  connections,
61
- m((conn) => ({
57
+ map((conn) => ({
62
58
  id: boundaryHierarchy(conn),
63
59
  conn
64
60
  })),
65
61
  sortNaturalByFqn(order),
66
- m(p("conn"))
62
+ map(prop("conn"))
67
63
  );
68
64
  }
69
65
  function findAscendingConnections(connections, connection) {
@@ -250,7 +246,7 @@ class ConnectionModel {
250
246
  * Returns true if includes relations between nested elements of the source and target elements.
251
247
  */
252
248
  get isImplicit() {
253
- return this.nonEmpty() && isome(this.relations, o(hasSameSourceTarget(this)));
249
+ return this.nonEmpty() && isome(this.relations, isNot(hasSameSourceTarget(this)));
254
250
  }
255
251
  get directRelations() {
256
252
  return new Set(ifilter(this.relations, hasSameSourceTarget(this)));
@@ -328,4 +324,4 @@ class ConnectionModel {
328
324
  }
329
325
  }
330
326
 
331
- export { ConnectionModel as C, findDeepestNestedConnection as a, findDescendantConnections as b, hasSameSourceTarget as c, differenceConnections as d, hasSameTarget as e, findAscendingConnections as f, isIncoming as g, hasSameSource as h, isAnyInOut as i, isNestedConnection as j, isOutgoing as k, sortDeepestFirst as l, mergeConnections as m, modelConnection as n, findConnectionsBetween as o, p, findConnection as q, findConnectionsWithin as r, sortConnectionsByBoundaryHierarchy as s };
327
+ export { ConnectionModel as C, findConnectionsBetween as a, findConnectionsWithin as b, findAscendingConnections as c, differenceConnections as d, findDeepestNestedConnection as e, findConnection as f, findDescendantConnections as g, hasSameSource as h, hasSameSourceTarget as i, hasSameTarget as j, isAnyInOut as k, isIncoming as l, isNestedConnection as m, isOutgoing as n, mergeConnections as o, sortDeepestFirst as p, modelConnection as q, sortConnectionsByBoundaryHierarchy as s };
@@ -1,5 +1,5 @@
1
- import { E as ElementModel, e as DeploymentElementModel } from './core.BvlHvikl.mjs';
2
- import { A as Any } from './core.O6FG0HF9.mjs';
1
+ import { E as ElementModel, e as DeploymentElementModel } from './core.v1iEaXaR.mjs';
2
+ import { A as Any } from './core.DdzRtJ9d.mjs';
3
3
  import { F as Fqn } from './core.DX-WYEPA.mjs';
4
4
 
5
5
  interface Connection<Elem = ElementModel<Any> | DeploymentElementModel<Any>, Id = string> {
@@ -0,0 +1,201 @@
1
+ var support = {};
2
+
3
+ var hasRequiredSupport;
4
+
5
+ function requireSupport () {
6
+ if (hasRequiredSupport) return support;
7
+ hasRequiredSupport = 1;
8
+ support.ARRAY_BUFFER_SUPPORT = typeof ArrayBuffer !== 'undefined';
9
+ support.SYMBOL_SUPPORT = typeof Symbol !== 'undefined';
10
+ return support;
11
+ }
12
+
13
+ /**
14
+ * Obliterator ForEach Function
15
+ * =============================
16
+ *
17
+ * Helper function used to easily iterate over mixed values.
18
+ */
19
+
20
+ var foreach;
21
+ var hasRequiredForeach;
22
+
23
+ function requireForeach () {
24
+ if (hasRequiredForeach) return foreach;
25
+ hasRequiredForeach = 1;
26
+ var support = requireSupport();
27
+
28
+ var ARRAY_BUFFER_SUPPORT = support.ARRAY_BUFFER_SUPPORT;
29
+ var SYMBOL_SUPPORT = support.SYMBOL_SUPPORT;
30
+
31
+ /**
32
+ * Function able to iterate over almost any iterable JS value.
33
+ *
34
+ * @param {any} iterable - Iterable value.
35
+ * @param {function} callback - Callback function.
36
+ */
37
+ foreach = function forEach(iterable, callback) {
38
+ var iterator, k, i, l, s;
39
+
40
+ if (!iterable) throw new Error('obliterator/forEach: invalid iterable.');
41
+
42
+ if (typeof callback !== 'function')
43
+ throw new Error('obliterator/forEach: expecting a callback.');
44
+
45
+ // The target is an array or a string or function arguments
46
+ if (
47
+ Array.isArray(iterable) ||
48
+ (ARRAY_BUFFER_SUPPORT && ArrayBuffer.isView(iterable)) ||
49
+ typeof iterable === 'string' ||
50
+ iterable.toString() === '[object Arguments]'
51
+ ) {
52
+ for (i = 0, l = iterable.length; i < l; i++) callback(iterable[i], i);
53
+ return;
54
+ }
55
+
56
+ // The target has a #.forEach method
57
+ if (typeof iterable.forEach === 'function') {
58
+ iterable.forEach(callback);
59
+ return;
60
+ }
61
+
62
+ // The target is iterable
63
+ if (
64
+ SYMBOL_SUPPORT &&
65
+ Symbol.iterator in iterable &&
66
+ typeof iterable.next !== 'function'
67
+ ) {
68
+ iterable = iterable[Symbol.iterator]();
69
+ }
70
+
71
+ // The target is an iterator
72
+ if (typeof iterable.next === 'function') {
73
+ iterator = iterable;
74
+ i = 0;
75
+
76
+ while (((s = iterator.next()), s.done !== true)) {
77
+ callback(s.value, i);
78
+ i++;
79
+ }
80
+
81
+ return;
82
+ }
83
+
84
+ // The target is a plain object
85
+ for (k in iterable) {
86
+ if (iterable.hasOwnProperty(k)) {
87
+ callback(iterable[k], k);
88
+ }
89
+ }
90
+
91
+ return;
92
+ };
93
+ return foreach;
94
+ }
95
+
96
+ /**
97
+ * Obliterator Iterator Class
98
+ * ===========================
99
+ *
100
+ * Simple class representing the library's iterators.
101
+ */
102
+
103
+ var iterator;
104
+ var hasRequiredIterator;
105
+
106
+ function requireIterator () {
107
+ if (hasRequiredIterator) return iterator;
108
+ hasRequiredIterator = 1;
109
+ /**
110
+ * Iterator class.
111
+ *
112
+ * @constructor
113
+ * @param {function} next - Next function.
114
+ */
115
+ function Iterator(next) {
116
+ if (typeof next !== 'function')
117
+ throw new Error('obliterator/iterator: expecting a function!');
118
+
119
+ this.next = next;
120
+ }
121
+
122
+ /**
123
+ * If symbols are supported, we add `next` to `Symbol.iterator`.
124
+ */
125
+ if (typeof Symbol !== 'undefined')
126
+ Iterator.prototype[Symbol.iterator] = function () {
127
+ return this;
128
+ };
129
+
130
+ /**
131
+ * Returning an iterator of the given values.
132
+ *
133
+ * @param {any...} values - Values.
134
+ * @return {Iterator}
135
+ */
136
+ Iterator.of = function () {
137
+ var args = arguments,
138
+ l = args.length,
139
+ i = 0;
140
+
141
+ return new Iterator(function () {
142
+ if (i >= l) return {done: true};
143
+
144
+ return {done: false, value: args[i++]};
145
+ });
146
+ };
147
+
148
+ /**
149
+ * Returning an empty iterator.
150
+ *
151
+ * @return {Iterator}
152
+ */
153
+ Iterator.empty = function () {
154
+ var iterator = new Iterator(function () {
155
+ return {done: true};
156
+ });
157
+
158
+ return iterator;
159
+ };
160
+
161
+ /**
162
+ * Returning an iterator over the given indexed sequence.
163
+ *
164
+ * @param {string|Array} sequence - Target sequence.
165
+ * @return {Iterator}
166
+ */
167
+ Iterator.fromSequence = function (sequence) {
168
+ var i = 0,
169
+ l = sequence.length;
170
+
171
+ return new Iterator(function () {
172
+ if (i >= l) return {done: true};
173
+
174
+ return {done: false, value: sequence[i++]};
175
+ });
176
+ };
177
+
178
+ /**
179
+ * Returning whether the given value is an iterator.
180
+ *
181
+ * @param {any} value - Value.
182
+ * @return {boolean}
183
+ */
184
+ Iterator.is = function (value) {
185
+ if (value instanceof Iterator) return true;
186
+
187
+ return (
188
+ typeof value === 'object' &&
189
+ value !== null &&
190
+ typeof value.next === 'function'
191
+ );
192
+ };
193
+
194
+ /**
195
+ * Exporting.
196
+ */
197
+ iterator = Iterator;
198
+ return iterator;
199
+ }
200
+
201
+ export { requireForeach as a, requireSupport as b, requireIterator as r };
@@ -1,6 +1,6 @@
1
- import { C as Connection, c as customInspectSymbol } from './core.Bf5zKDK1.mjs';
2
- import { E as ElementModel, R as RelationshipModel } from './core.BvlHvikl.mjs';
3
- import { A as Any, U as Unknown, C as EdgeId } from './core.O6FG0HF9.mjs';
1
+ import { C as Connection, c as customInspectSymbol } from './core.CXCmvCws.mjs';
2
+ import { E as ElementModel, R as RelationshipModel } from './core.v1iEaXaR.mjs';
3
+ import { A as Any, U as Unknown, C as EdgeId } from './core.DdzRtJ9d.mjs';
4
4
 
5
5
  /**
6
6
  * Connection refers to any relationships between two elements,