@likec4/core 1.42.1 → 1.44.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 +9 -9
- package/dist/builder/index.mjs +10 -8
- package/dist/compute-view/index.d.mts +9 -9
- package/dist/compute-view/index.mjs +7 -7
- package/dist/compute-view/relationships-view/index.d.mts +7 -7
- package/dist/compute-view/relationships-view/index.mjs +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +7 -7
- package/dist/model/connection/deployment/index.d.mts +9 -9
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +10 -10
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +9 -9
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +26 -12
- package/dist/model/index.mjs +4 -4
- package/dist/shared/{core.DSO_rTC2.mjs → core.23WeDKcI.mjs} +269 -632
- package/dist/shared/{core.D_vkffV4.d.mts → core.5ZQ-r3Oa.d.mts} +22 -2
- package/dist/shared/{core.DRhg-gVU.mjs → core.6VsRBhGY.mjs} +7 -101
- package/dist/shared/{core.yna0OdV5.d.mts → core.8mmHFn9g.d.mts} +2 -2
- package/dist/shared/core.B9BjmjuH.mjs +9 -0
- package/dist/shared/{core.fHR_8Tnq.d.mts → core.BMtVqKl7.d.mts} +89 -11
- package/dist/shared/{core.rCeaAqgW.mjs → core.BdPcbSkN.mjs} +1 -1
- package/dist/shared/{core.DIol3syK.d.mts → core.BnDbAOR2.d.mts} +2 -2
- package/dist/shared/{core.CQngdcuj.d.mts → core.BnOetIAR.d.mts} +2 -2
- package/dist/shared/core.BuQZczj6.mjs +38 -0
- package/dist/shared/core.Bv3cd-jC.mjs +102 -0
- package/dist/shared/{core.B7KhhkRY.mjs → core.C0Ye2OCr.mjs} +1 -1
- package/dist/shared/{core.Dgs6-nuz.d.mts → core.CDOKQTW6.d.mts} +56 -37
- package/dist/shared/{core.BIqHjQiH.mjs → core.CHwVhuc9.mjs} +36 -10
- package/dist/shared/{core.DdMJk7nx.d.mts → core.CKNmSm2W.d.mts} +85 -89
- package/dist/shared/{core.DFi2dOTl.mjs → core.CR3PmPzr.mjs} +85 -1
- package/dist/shared/{core.C2TiyjI6.mjs → core.CbsSAn1j.mjs} +19 -19
- package/dist/shared/{core.QJD_fcrc.mjs → core.CmPXpJ8l.mjs} +1 -14
- package/dist/shared/{core.D5fzJWbF.d.mts → core.DB0Ue5Wx.d.mts} +1 -1
- package/dist/shared/{core.DNbUPnve.mjs → core.DEieYfbG.mjs} +27 -25
- package/dist/shared/{core.C8YY6Uub.mjs → core.DFCHU59b.mjs} +4 -4
- package/dist/shared/{core.BYNkXQ8A.mjs → core.DH7TXqXf.mjs} +30 -1
- package/dist/shared/{core.DMMOWQqc.mjs → core.DIE3F6sw.mjs} +2 -2
- package/dist/shared/{core.s9uwOt60.d.mts → core.DTJYgLXI.d.mts} +3 -3
- package/dist/shared/{core.D0PjZzIS.d.mts → core.DjAM-S6a.d.mts} +179 -82
- package/dist/shared/{core.CNgZvKb8.mjs → core.DrUt0Lbi.mjs} +1 -1
- package/dist/shared/core.M9ayqQZa.mjs +1207 -0
- package/dist/shared/{core.DACpKp35.d.mts → core.WwMWeiFL.d.mts} +4 -4
- package/dist/shared/{core.lRvxPoao.mjs → core.bKIs4oDO.mjs} +3 -3
- package/dist/shared/{core.C8sl5Y8Z.mjs → core.h4TqqSC0.mjs} +1360 -124
- package/dist/shared/core.q10OP9oJ.mjs +5 -0
- package/dist/shared/core.uFk_o9X6.mjs +13 -0
- package/dist/styles/index.d.mts +18 -8
- package/dist/styles/index.mjs +63 -1
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/_aux.mjs +8 -1
- package/dist/types/expression-model.d.mts +3 -3
- package/dist/types/expression.d.mts +3 -3
- package/dist/types/fqnRef.d.mts +7 -8
- package/dist/types/index.d.mts +17 -13
- package/dist/types/index.mjs +28 -5
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +3 -2
- package/dist/utils/index.mjs +8 -6
- package/dist/utils/iterable/index.d.mts +1 -1
- package/dist/utils/iterable/index.mjs +2 -1
- package/package.json +21 -20
- package/dist/shared/core.01VTr9qu.mjs +0 -170
- package/dist/shared/core.1vX5a9AY.mjs +0 -86
- package/dist/shared/core.BazD6cot.mjs +0 -14
- package/dist/shared/core.BzTakU3I.mjs +0 -67
|
@@ -1,136 +1,71 @@
|
|
|
1
|
-
import { t as t$g, a as t$
|
|
2
|
-
import {
|
|
3
|
-
import { t as t$
|
|
4
|
-
import {
|
|
5
|
-
import { n as n$j, e as e$6, t as t$q, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.BIqHjQiH.mjs';
|
|
6
|
-
import { c as commonHead, t as t$o, o as objectHash, b as t$t, a as compareRelations, S as Stack } from './core.C8YY6Uub.mjs';
|
|
1
|
+
import { b as t$d, n as n$e, c as t$j, t as t$k, d as t$l, e as t$m, i as isElementModel, f as isNestedElementOfDeployedInstanceModel, g as isDeployedInstanceModel, h as isDeploymentNodeModel, j as isDeploymentElementModel, k as buildElementNotations, L as LikeC4Model, a as t$q } from './core.h4TqqSC0.mjs';
|
|
2
|
+
import { t as t$b, a as t$c } from './core.BsSXS-_R.mjs';
|
|
3
|
+
import { t as t$f } from './core.CbT8JVYL.mjs';
|
|
4
|
+
import { c as commonHead, t as t$g, o as objectHash, b as t$n, a as compareRelations, S as Stack } from './core.DFCHU59b.mjs';
|
|
7
5
|
import { a as nonNullable, i as invariant, n as nonexhaustive } from './core.D4npX2q8.mjs';
|
|
8
|
-
import { G as Graph } from './core.
|
|
9
|
-
import { r as
|
|
10
|
-
import {
|
|
6
|
+
import { G as Graph } from './core.DrUt0Lbi.mjs';
|
|
7
|
+
import { r as requireIterables, e as exact, t as t$o } from './core.M9ayqQZa.mjs';
|
|
8
|
+
import { r as requireIterator } from './core.BdPcbSkN.mjs';
|
|
11
9
|
import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { e as e$8 } from './core.
|
|
10
|
+
import { n as n$d, t as t$e } from './core.OHD4KXm9.mjs';
|
|
11
|
+
import { e as e$4 } from './core.BKlholso.mjs';
|
|
12
|
+
import { f as flattenMarkdownOrString, i as isGroupElementKind, G as GroupElementKind, d as stepEdgeId } from './core.C_Ni6yHl.mjs';
|
|
13
|
+
import { b as isDescendantOf, f as sortParentsFirst, i as isAncestor, p as parentFqn, j as compareByFqnHierarchically, c as isNonEmptyArray, n as nameFromFqn, o as sortByFqnHierarchically, g as commonAncestor, a as ancestorsFqn, d as isSameHierarchy } from './core.6VsRBhGY.mjs';
|
|
14
|
+
import { d as difference, i as intersection, u as union, h as hasIntersection } from './core.CbsSAn1j.mjs';
|
|
15
|
+
import { e as e$8 } from './core.B9BjmjuH.mjs';
|
|
16
|
+
import { e as e$5, n as n$f, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.CHwVhuc9.mjs';
|
|
17
|
+
import { w as whereOperatorAsPredicate, m as isViewRuleStyle, v as t$h, l as isViewRulePredicate, a as _type, _ as _stage, u as e$b, t as isDynamicView, s as isDeploymentView, p as isElementView } from './core.DH7TXqXf.mjs';
|
|
18
|
+
import { e as e$6, a as iunique, i as iflat } from './core.C4x8aaWa.mjs';
|
|
19
|
+
import { e as e$7 } from './core.BoYfZOBm.mjs';
|
|
18
20
|
import { ModelFqnExpr, ModelRelationExpr, ModelExpression } from '../types/expression-model.mjs';
|
|
19
21
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { a as preferSummary } from './core.BazD6cot.mjs';
|
|
23
|
-
import { e as exact, t as t$u } from './core.01VTr9qu.mjs';
|
|
24
|
-
import { a as t$r } from './core.DNbUPnve.mjs';
|
|
22
|
+
import { preferSummary } from '../types/_aux.mjs';
|
|
23
|
+
import { a as t$i } from './core.DEieYfbG.mjs';
|
|
25
24
|
import { FqnExpr, RelationExpr } from '../types/expression.mjs';
|
|
26
|
-
import { f as findAscendingConnections, m as mergeConnections, d as differenceConnections, j as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, o as findConnectionsBetween$3, p as findConnection$3, n as modelConnection, b as findDescendantConnections, a as findDeepestNestedConnection, i as isAnyInOut, k as isOutgoing, g as isIncoming, C as ConnectionModel } from './core.
|
|
25
|
+
import { f as findAscendingConnections, m as mergeConnections, d as differenceConnections, j as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, o as findConnectionsBetween$3, p as findConnection$3, n as modelConnection, b as findDescendantConnections, a as findDeepestNestedConnection, i as isAnyInOut, k as isOutgoing, g as isIncoming, C as ConnectionModel } from './core.bKIs4oDO.mjs';
|
|
27
26
|
import { t as toSet, a as toArray, i as imap } from './core.C3JowhaZ.mjs';
|
|
28
27
|
import { D as DefaultMap } from './core.BbE4y-yl.mjs';
|
|
29
28
|
import { i as ifilter } from './core.DRJma0Ol.mjs';
|
|
30
|
-
import { C as Connection, c as customInspectSymbol } from './core.
|
|
29
|
+
import { C as Connection, c as customInspectSymbol } from './core.C0Ye2OCr.mjs';
|
|
31
30
|
import { i as isome } from './core.FZ305VYd.mjs';
|
|
32
31
|
import { i as isIterable, e as e$9 } from './core.RfnaEmgA.mjs';
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
import { j as e$a, c as isViewRuleAutoLayout, h as isViewRuleGroup, a as isViewRuleGlobalPredicateRef, i as isViewRuleGlobalStyle, e as isDynamicStepsParallel, f as isDynamicStepsSeries } from './core.BuQZczj6.mjs';
|
|
33
|
+
import { t as t$p } from './core.q10OP9oJ.mjs';
|
|
35
34
|
|
|
36
35
|
function e$3(e){return ()=>e}
|
|
37
36
|
|
|
38
|
-
function t$
|
|
39
|
-
|
|
40
|
-
function n$f(...t){return t$g(r$5,t,i$2)}const r$5=(e,t)=>e.filter(t),i$2=e=>(n,r,i)=>e(n,r,i)?{done:false,hasNext:true,next:n}:t$h;
|
|
37
|
+
function t$a(...t){return t$b(n$c,t)}function n$c(e,t){for(let[n,r]of e.entries())if(!t(r,n,e))return e.slice(n);return []}
|
|
41
38
|
|
|
42
39
|
const e$2=e=>Object.assign(e,{single:true});
|
|
43
40
|
|
|
44
|
-
function t$
|
|
45
|
-
|
|
46
|
-
function n$d(...n){return t$g(r$4,n,e$2(i$1))}const r$4=([e])=>e,i$1=()=>a,a=e=>({hasNext:true,next:e,done:true});
|
|
41
|
+
function t$9(...t){return t$b(n$b,t)}const n$b=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}};
|
|
47
42
|
|
|
48
|
-
function
|
|
43
|
+
function n$a(...n){return t$b(r$3,n,e$2(i$1))}const r$3=([e])=>e,i$1=()=>a,a=e=>({hasNext:true,next:e,done:true});
|
|
49
44
|
|
|
50
|
-
function t$
|
|
51
|
-
|
|
52
|
-
function t$a(...t){return t$g(n$a,t)}const n$a=(e,t)=>{let n=Object.create(null);for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);if(a!==void 0){let e=n[a];e===void 0?n[a]=[i]:e.push(i);}}return Object.setPrototypeOf(n,Object.prototype),n};
|
|
53
|
-
|
|
54
|
-
function t$9(...t){return t$g(n$9,t)}function n$9(e,t){let n={};for(let[r,i]of e.entries()){let a=t(i,r,e);n[a]=i;}return n}
|
|
45
|
+
function t$8(...t){return t$b(n$9,t,r$2)}function n$9(e,t){return e.forEach(t),e}const r$2=e=>(t,n,r)=>(e(t,n,r),{done:false,hasNext:true,next:t});
|
|
55
46
|
|
|
56
47
|
function e$1(e){return typeof e==`boolean`}
|
|
57
48
|
|
|
58
|
-
function t$
|
|
59
|
-
|
|
60
|
-
function t$7(...t){return t$g(n$7,t)}function n$7(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=t(i,r,e);return n}
|
|
49
|
+
function t$7(...t){return t$b(n$8,t)}function n$8(e,t){let n={};for(let[r,i]of e.entries()){let[a,o]=t(i,r,e);n[a]=o;}return n}
|
|
61
50
|
|
|
62
|
-
function n$
|
|
51
|
+
function n$7(...t){return t$b(r$1,t)}function r$1(e,n){if(!t$c(n,1))return {...e};if(!t$c(n,2)){let{[n[0]]:t,...r}=e;return r}let r={...e};for(let e of n)delete r[e];return r}
|
|
63
52
|
|
|
64
|
-
function t$6(...t){return t$
|
|
53
|
+
function t$6(...t){return t$b(n$6,t)}const n$6=e=>e.length===1?e[0]:void 0;
|
|
65
54
|
|
|
66
|
-
function t$5(...t){return t$
|
|
55
|
+
function t$5(...t){return t$b(n$5,t)}const n$5=(e,t)=>{let n=[[],[]];for(let[r,i]of e.entries())t(i,r,e)?n[0].push(i):n[1].push(i);return n};
|
|
67
56
|
|
|
68
|
-
function t$4(...t){return t$
|
|
57
|
+
function t$4(...t){return t$b(n$4,t)}function n$4(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}
|
|
69
58
|
|
|
70
|
-
function t$3(...t){return n
|
|
59
|
+
function t$3(...t){return t$b(n$3,t)}function n$3(e,t){let n={};for(let[r,i]of Object.entries(e))t(i,r,e)&&(n[r]=i);return n}
|
|
71
60
|
|
|
72
|
-
function t$2(...t){return t$
|
|
61
|
+
function t$2(...t){return t$b(n$2,t)}const n$2=(e,t,n)=>e.reduce(t,n);
|
|
73
62
|
|
|
74
|
-
function t$1(...t){return t$
|
|
63
|
+
function t$1(...t){return t$b(n$1,t)}function n$1(e){return [...e].reverse()}
|
|
75
64
|
|
|
76
|
-
function n(...t){return t$
|
|
65
|
+
function n(...t){return t$b(r,t,i)}const r=(e,t)=>t<0?[]:e.slice(0,t);function i(e){if(e<=0)return n$d;let n=e;return e=>(--n,{done:n<=0,hasNext:true,next:e})}
|
|
77
66
|
|
|
78
67
|
function e(...e){return e.length===2?(n,...r)=>t(n,...e,...r):t(...e)}const t=(e,t,n,...r)=>t(e,...r)?typeof n==`function`?n(e,...r):n.onTrue(e,...r):typeof n==`function`?e:n.onFalse(e,...r);
|
|
79
68
|
|
|
80
|
-
function buildElementNotations(nodes) {
|
|
81
|
-
return t$j(
|
|
82
|
-
nodes,
|
|
83
|
-
n$f((n) => !!n.notation),
|
|
84
|
-
t$a(e$4("notation")),
|
|
85
|
-
t$7(
|
|
86
|
-
t$3(
|
|
87
|
-
t$a(e$4("shape")),
|
|
88
|
-
t$7(
|
|
89
|
-
t$3(
|
|
90
|
-
t$a(e$4("color")),
|
|
91
|
-
t$7(
|
|
92
|
-
t$3(
|
|
93
|
-
t$m(e$4("kind")),
|
|
94
|
-
n$j()
|
|
95
|
-
)
|
|
96
|
-
),
|
|
97
|
-
t$l(),
|
|
98
|
-
t$m(([color, kinds]) => ({
|
|
99
|
-
kinds,
|
|
100
|
-
color
|
|
101
|
-
}))
|
|
102
|
-
)
|
|
103
|
-
),
|
|
104
|
-
t$l(),
|
|
105
|
-
t$c(
|
|
106
|
-
([shape, colors]) => colors.map(({ color, kinds }) => ({
|
|
107
|
-
shape,
|
|
108
|
-
color,
|
|
109
|
-
kinds
|
|
110
|
-
}))
|
|
111
|
-
)
|
|
112
|
-
)
|
|
113
|
-
),
|
|
114
|
-
t$l(),
|
|
115
|
-
t$c(
|
|
116
|
-
([title, shapes]) => shapes.map(({ shape, color, kinds }) => ({
|
|
117
|
-
title,
|
|
118
|
-
shape,
|
|
119
|
-
color,
|
|
120
|
-
kinds
|
|
121
|
-
}))
|
|
122
|
-
),
|
|
123
|
-
t$k(
|
|
124
|
-
e$4("shape"),
|
|
125
|
-
e$4("title"),
|
|
126
|
-
[
|
|
127
|
-
(n) => n.kinds.length,
|
|
128
|
-
"desc"
|
|
129
|
-
]
|
|
130
|
-
)
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
69
|
function ancestorsOfNode(node, nodes) {
|
|
135
70
|
const ancestors = [];
|
|
136
71
|
let parentId = node.parent;
|
|
@@ -153,7 +88,7 @@ function linkNodesWithEdges(nodesMap, edges) {
|
|
|
153
88
|
const sourceAncestors = ancestorsOfNode(source, nodesMap);
|
|
154
89
|
const targetAncestors = ancestorsOfNode(target, nodesMap);
|
|
155
90
|
const hasAncestors = sourceAncestors.length > 0 && targetAncestors.length > 0;
|
|
156
|
-
const edgeParent = hasAncestors ? t$
|
|
91
|
+
const edgeParent = hasAncestors ? t$d(
|
|
157
92
|
commonHead(
|
|
158
93
|
t$1(sourceAncestors),
|
|
159
94
|
t$1(targetAncestors)
|
|
@@ -209,309 +144,6 @@ function requireIsGraph () {
|
|
|
209
144
|
return isGraph;
|
|
210
145
|
}
|
|
211
146
|
|
|
212
|
-
var iterables = {};
|
|
213
|
-
|
|
214
|
-
var typedArrays = {};
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Mnemonist Typed Array Helpers
|
|
218
|
-
* ==============================
|
|
219
|
-
*
|
|
220
|
-
* Miscellaneous helpers related to typed arrays.
|
|
221
|
-
*/
|
|
222
|
-
|
|
223
|
-
var hasRequiredTypedArrays;
|
|
224
|
-
|
|
225
|
-
function requireTypedArrays () {
|
|
226
|
-
if (hasRequiredTypedArrays) return typedArrays;
|
|
227
|
-
hasRequiredTypedArrays = 1;
|
|
228
|
-
(function (exports) {
|
|
229
|
-
/**
|
|
230
|
-
* When using an unsigned integer array to store pointers, one might want to
|
|
231
|
-
* choose the optimal word size in regards to the actual numbers of pointers
|
|
232
|
-
* to store.
|
|
233
|
-
*
|
|
234
|
-
* This helpers does just that.
|
|
235
|
-
*
|
|
236
|
-
* @param {number} size - Expected size of the array to map.
|
|
237
|
-
* @return {TypedArray}
|
|
238
|
-
*/
|
|
239
|
-
var MAX_8BIT_INTEGER = Math.pow(2, 8) - 1,
|
|
240
|
-
MAX_16BIT_INTEGER = Math.pow(2, 16) - 1,
|
|
241
|
-
MAX_32BIT_INTEGER = Math.pow(2, 32) - 1;
|
|
242
|
-
|
|
243
|
-
var MAX_SIGNED_8BIT_INTEGER = Math.pow(2, 7) - 1,
|
|
244
|
-
MAX_SIGNED_16BIT_INTEGER = Math.pow(2, 15) - 1,
|
|
245
|
-
MAX_SIGNED_32BIT_INTEGER = Math.pow(2, 31) - 1;
|
|
246
|
-
|
|
247
|
-
exports.getPointerArray = function(size) {
|
|
248
|
-
var maxIndex = size - 1;
|
|
249
|
-
|
|
250
|
-
if (maxIndex <= MAX_8BIT_INTEGER)
|
|
251
|
-
return Uint8Array;
|
|
252
|
-
|
|
253
|
-
if (maxIndex <= MAX_16BIT_INTEGER)
|
|
254
|
-
return Uint16Array;
|
|
255
|
-
|
|
256
|
-
if (maxIndex <= MAX_32BIT_INTEGER)
|
|
257
|
-
return Uint32Array;
|
|
258
|
-
|
|
259
|
-
throw new Error('mnemonist: Pointer Array of size > 4294967295 is not supported.');
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
exports.getSignedPointerArray = function(size) {
|
|
263
|
-
var maxIndex = size - 1;
|
|
264
|
-
|
|
265
|
-
if (maxIndex <= MAX_SIGNED_8BIT_INTEGER)
|
|
266
|
-
return Int8Array;
|
|
267
|
-
|
|
268
|
-
if (maxIndex <= MAX_SIGNED_16BIT_INTEGER)
|
|
269
|
-
return Int16Array;
|
|
270
|
-
|
|
271
|
-
if (maxIndex <= MAX_SIGNED_32BIT_INTEGER)
|
|
272
|
-
return Int32Array;
|
|
273
|
-
|
|
274
|
-
return Float64Array;
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Function returning the minimal type able to represent the given number.
|
|
279
|
-
*
|
|
280
|
-
* @param {number} value - Value to test.
|
|
281
|
-
* @return {TypedArrayClass}
|
|
282
|
-
*/
|
|
283
|
-
exports.getNumberType = function(value) {
|
|
284
|
-
|
|
285
|
-
// <= 32 bits itnteger?
|
|
286
|
-
if (value === (value | 0)) {
|
|
287
|
-
|
|
288
|
-
// Negative
|
|
289
|
-
if (Math.sign(value) === -1) {
|
|
290
|
-
if (value <= 127 && value >= -128)
|
|
291
|
-
return Int8Array;
|
|
292
|
-
|
|
293
|
-
if (value <= 32767 && value >= -32768)
|
|
294
|
-
return Int16Array;
|
|
295
|
-
|
|
296
|
-
return Int32Array;
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
|
|
300
|
-
if (value <= 255)
|
|
301
|
-
return Uint8Array;
|
|
302
|
-
|
|
303
|
-
if (value <= 65535)
|
|
304
|
-
return Uint16Array;
|
|
305
|
-
|
|
306
|
-
return Uint32Array;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// 53 bits integer & floats
|
|
311
|
-
// NOTE: it's kinda hard to tell whether we could use 32bits or not...
|
|
312
|
-
return Float64Array;
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Function returning the minimal type able to represent the given array
|
|
317
|
-
* of JavaScript numbers.
|
|
318
|
-
*
|
|
319
|
-
* @param {array} array - Array to represent.
|
|
320
|
-
* @param {function} getter - Optional getter.
|
|
321
|
-
* @return {TypedArrayClass}
|
|
322
|
-
*/
|
|
323
|
-
var TYPE_PRIORITY = {
|
|
324
|
-
Uint8Array: 1,
|
|
325
|
-
Int8Array: 2,
|
|
326
|
-
Uint16Array: 3,
|
|
327
|
-
Int16Array: 4,
|
|
328
|
-
Uint32Array: 5,
|
|
329
|
-
Int32Array: 6,
|
|
330
|
-
Float32Array: 7,
|
|
331
|
-
Float64Array: 8
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
// TODO: make this a one-shot for one value
|
|
335
|
-
exports.getMinimalRepresentation = function(array, getter) {
|
|
336
|
-
var maxType = null,
|
|
337
|
-
maxPriority = 0,
|
|
338
|
-
p,
|
|
339
|
-
t,
|
|
340
|
-
v,
|
|
341
|
-
i,
|
|
342
|
-
l;
|
|
343
|
-
|
|
344
|
-
for (i = 0, l = array.length; i < l; i++) {
|
|
345
|
-
v = getter ? getter(array[i]) : array[i];
|
|
346
|
-
t = exports.getNumberType(v);
|
|
347
|
-
p = TYPE_PRIORITY[t.name];
|
|
348
|
-
|
|
349
|
-
if (p > maxPriority) {
|
|
350
|
-
maxPriority = p;
|
|
351
|
-
maxType = t;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
return maxType;
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Function returning whether the given value is a typed array.
|
|
360
|
-
*
|
|
361
|
-
* @param {any} value - Value to test.
|
|
362
|
-
* @return {boolean}
|
|
363
|
-
*/
|
|
364
|
-
exports.isTypedArray = function(value) {
|
|
365
|
-
return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(value);
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Function used to concat byte arrays.
|
|
370
|
-
*
|
|
371
|
-
* @param {...ByteArray}
|
|
372
|
-
* @return {ByteArray}
|
|
373
|
-
*/
|
|
374
|
-
exports.concat = function() {
|
|
375
|
-
var length = 0,
|
|
376
|
-
i,
|
|
377
|
-
o,
|
|
378
|
-
l;
|
|
379
|
-
|
|
380
|
-
for (i = 0, l = arguments.length; i < l; i++)
|
|
381
|
-
length += arguments[i].length;
|
|
382
|
-
|
|
383
|
-
var array = new (arguments[0].constructor)(length);
|
|
384
|
-
|
|
385
|
-
for (i = 0, o = 0; i < l; i++) {
|
|
386
|
-
array.set(arguments[i], o);
|
|
387
|
-
o += arguments[i].length;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
return array;
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* Function used to initialize a byte array of indices.
|
|
395
|
-
*
|
|
396
|
-
* @param {number} length - Length of target.
|
|
397
|
-
* @return {ByteArray}
|
|
398
|
-
*/
|
|
399
|
-
exports.indices = function(length) {
|
|
400
|
-
var PointerArray = exports.getPointerArray(length);
|
|
401
|
-
|
|
402
|
-
var array = new PointerArray(length);
|
|
403
|
-
|
|
404
|
-
for (var i = 0; i < length; i++)
|
|
405
|
-
array[i] = i;
|
|
406
|
-
|
|
407
|
-
return array;
|
|
408
|
-
};
|
|
409
|
-
} (typedArrays));
|
|
410
|
-
return typedArrays;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* Mnemonist Iterable Function
|
|
415
|
-
* ============================
|
|
416
|
-
*
|
|
417
|
-
* Harmonized iteration helpers over mixed iterable targets.
|
|
418
|
-
*/
|
|
419
|
-
|
|
420
|
-
var hasRequiredIterables;
|
|
421
|
-
|
|
422
|
-
function requireIterables () {
|
|
423
|
-
if (hasRequiredIterables) return iterables;
|
|
424
|
-
hasRequiredIterables = 1;
|
|
425
|
-
var forEach = requireForeach();
|
|
426
|
-
|
|
427
|
-
var typed = /*@__PURE__*/ requireTypedArrays();
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Function used to determine whether the given object supports array-like
|
|
431
|
-
* random access.
|
|
432
|
-
*
|
|
433
|
-
* @param {any} target - Target object.
|
|
434
|
-
* @return {boolean}
|
|
435
|
-
*/
|
|
436
|
-
function isArrayLike(target) {
|
|
437
|
-
return Array.isArray(target) || typed.isTypedArray(target);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
/**
|
|
441
|
-
* Function used to guess the length of the structure over which we are going
|
|
442
|
-
* to iterate.
|
|
443
|
-
*
|
|
444
|
-
* @param {any} target - Target object.
|
|
445
|
-
* @return {number|undefined}
|
|
446
|
-
*/
|
|
447
|
-
function guessLength(target) {
|
|
448
|
-
if (typeof target.length === 'number')
|
|
449
|
-
return target.length;
|
|
450
|
-
|
|
451
|
-
if (typeof target.size === 'number')
|
|
452
|
-
return target.size;
|
|
453
|
-
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Function used to convert an iterable to an array.
|
|
459
|
-
*
|
|
460
|
-
* @param {any} target - Iteration target.
|
|
461
|
-
* @return {array}
|
|
462
|
-
*/
|
|
463
|
-
function toArray(target) {
|
|
464
|
-
var l = guessLength(target);
|
|
465
|
-
|
|
466
|
-
var array = typeof l === 'number' ? new Array(l) : [];
|
|
467
|
-
|
|
468
|
-
var i = 0;
|
|
469
|
-
|
|
470
|
-
// TODO: we could optimize when given target is array like
|
|
471
|
-
forEach(target, function(value) {
|
|
472
|
-
array[i++] = value;
|
|
473
|
-
});
|
|
474
|
-
|
|
475
|
-
return array;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Same as above but returns a supplementary indices array.
|
|
480
|
-
*
|
|
481
|
-
* @param {any} target - Iteration target.
|
|
482
|
-
* @return {array}
|
|
483
|
-
*/
|
|
484
|
-
function toArrayWithIndices(target) {
|
|
485
|
-
var l = guessLength(target);
|
|
486
|
-
|
|
487
|
-
var IndexArray = typeof l === 'number' ?
|
|
488
|
-
typed.getPointerArray(l) :
|
|
489
|
-
Array;
|
|
490
|
-
|
|
491
|
-
var array = typeof l === 'number' ? new Array(l) : [];
|
|
492
|
-
var indices = typeof l === 'number' ? new IndexArray(l) : [];
|
|
493
|
-
|
|
494
|
-
var i = 0;
|
|
495
|
-
|
|
496
|
-
// TODO: we could optimize when given target is array like
|
|
497
|
-
forEach(target, function(value) {
|
|
498
|
-
array[i] = value;
|
|
499
|
-
indices[i] = i++;
|
|
500
|
-
});
|
|
501
|
-
|
|
502
|
-
return [array, indices];
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Exporting.
|
|
507
|
-
*/
|
|
508
|
-
iterables.isArrayLike = isArrayLike;
|
|
509
|
-
iterables.guessLength = guessLength;
|
|
510
|
-
iterables.toArray = toArray;
|
|
511
|
-
iterables.toArrayWithIndices = toArrayWithIndices;
|
|
512
|
-
return iterables;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
147
|
/**
|
|
516
148
|
* Mnemonist FixedDeque
|
|
517
149
|
* =====================
|
|
@@ -1161,9 +793,9 @@ function topologicalSort(param) {
|
|
|
1161
793
|
allowSelfLoops: true,
|
|
1162
794
|
type: "directed"
|
|
1163
795
|
});
|
|
1164
|
-
const enrichedEdges = t$
|
|
796
|
+
const enrichedEdges = t$e(
|
|
1165
797
|
edges,
|
|
1166
|
-
t$
|
|
798
|
+
t$f((edge) => {
|
|
1167
799
|
const source = getNode(edge.source), target = getNode(edge.target), parent = edge.parent ? getNode(edge.parent) : null;
|
|
1168
800
|
return {
|
|
1169
801
|
id: edge.id,
|
|
@@ -1174,7 +806,7 @@ function topologicalSort(param) {
|
|
|
1174
806
|
};
|
|
1175
807
|
})
|
|
1176
808
|
);
|
|
1177
|
-
const [edgesBetweenLeafs, edgesWithCompounds] = t$
|
|
809
|
+
const [edgesBetweenLeafs, edgesWithCompounds] = t$5(
|
|
1178
810
|
enrichedEdges,
|
|
1179
811
|
({ source, target }) => source.children.length === 0 && target.children.length === 0
|
|
1180
812
|
);
|
|
@@ -1190,10 +822,10 @@ function topologicalSort(param) {
|
|
|
1190
822
|
for (const { edge, source, target } of edgesBetweenLeafs) {
|
|
1191
823
|
addEdgeToGraph(edge);
|
|
1192
824
|
if (target.parent && target.parent !== edge.parent) {
|
|
1193
|
-
t$
|
|
825
|
+
t$e(
|
|
1194
826
|
ancestorsOfNode(target, param.nodes),
|
|
1195
|
-
t$
|
|
1196
|
-
t$
|
|
827
|
+
t$g((ancestor) => ancestor.inEdges.includes(edge.id)),
|
|
828
|
+
t$8((ancestor) => {
|
|
1197
829
|
g.mergeNode(ancestor.id);
|
|
1198
830
|
if (!willCreateCycle(g, edge.source, ancestor.id)) {
|
|
1199
831
|
g.mergeDirectedEdge(edge.source, ancestor.id);
|
|
@@ -1256,13 +888,13 @@ function calcViewLayoutHash(view) {
|
|
|
1256
888
|
id: view.id,
|
|
1257
889
|
__: view._type ?? "element",
|
|
1258
890
|
autoLayout: view.autoLayout,
|
|
1259
|
-
nodes: t$
|
|
891
|
+
nodes: t$e(
|
|
1260
892
|
view.nodes,
|
|
1261
|
-
t$
|
|
893
|
+
t$f((n) => ({
|
|
1262
894
|
id: n.id,
|
|
1263
|
-
icon: e$
|
|
895
|
+
icon: e$4(n.icon) && n.icon !== "none" ? "Y" : "N",
|
|
1264
896
|
title: n.title,
|
|
1265
|
-
description: n.description
|
|
897
|
+
description: flattenMarkdownOrString(n.description),
|
|
1266
898
|
technology: n.technology ?? null,
|
|
1267
899
|
shape: n.shape,
|
|
1268
900
|
size: n.style.size ?? null,
|
|
@@ -1270,22 +902,22 @@ function calcViewLayoutHash(view) {
|
|
|
1270
902
|
padding: n.style.padding ?? null,
|
|
1271
903
|
children: n.children
|
|
1272
904
|
})),
|
|
1273
|
-
t$
|
|
905
|
+
t$7(({ id, ...node }) => [id, node])
|
|
1274
906
|
),
|
|
1275
|
-
edges: t$
|
|
907
|
+
edges: t$e(
|
|
1276
908
|
view.edges,
|
|
1277
|
-
t$
|
|
909
|
+
t$f((e) => ({
|
|
1278
910
|
source: e.source,
|
|
1279
911
|
target: e.target,
|
|
1280
912
|
label: e.label,
|
|
1281
|
-
description: e.description
|
|
913
|
+
description: flattenMarkdownOrString(e.description),
|
|
1282
914
|
technology: e.technology ?? null,
|
|
1283
915
|
dir: e.dir,
|
|
1284
916
|
head: e.head,
|
|
1285
917
|
tail: e.tail,
|
|
1286
918
|
line: e.line
|
|
1287
919
|
})),
|
|
1288
|
-
t$
|
|
920
|
+
t$7(({ source, target, ...edge }) => [`${source}:${target}`, edge])
|
|
1289
921
|
)
|
|
1290
922
|
};
|
|
1291
923
|
view.hash = objectHash(tohash);
|
|
@@ -1403,7 +1035,7 @@ class AbstractStageExclude {
|
|
|
1403
1035
|
disconnected,
|
|
1404
1036
|
state.elements
|
|
1405
1037
|
);
|
|
1406
|
-
disconnected = t$
|
|
1038
|
+
disconnected = t$e(
|
|
1407
1039
|
disconnected,
|
|
1408
1040
|
ifilter((el) => {
|
|
1409
1041
|
return state.explicits.has(el) && !isome(state.final, isDescendantOf(el));
|
|
@@ -1611,7 +1243,7 @@ class AbstractStageInclude {
|
|
|
1611
1243
|
let state = this.precommit(this.memory.mutableState());
|
|
1612
1244
|
let fromConnections = /* @__PURE__ */ new Set();
|
|
1613
1245
|
if (this._connections.length > 0) {
|
|
1614
|
-
const [fromKnown, rest] = t$
|
|
1246
|
+
const [fromKnown, rest] = t$5(
|
|
1615
1247
|
this._connections,
|
|
1616
1248
|
(c) => state.final.has(c.source)
|
|
1617
1249
|
);
|
|
@@ -1723,18 +1355,18 @@ function elementExprToPredicate(target) {
|
|
|
1723
1355
|
|
|
1724
1356
|
function applyViewRuleStyle(rule, predicates, nodes) {
|
|
1725
1357
|
const { shape, color, icon, ...rest } = rule.style;
|
|
1726
|
-
const nonEmptyStyle = !e$
|
|
1727
|
-
t$
|
|
1358
|
+
const nonEmptyStyle = !e$5(rest);
|
|
1359
|
+
t$e(
|
|
1728
1360
|
nodes,
|
|
1729
|
-
n$
|
|
1730
|
-
n$
|
|
1731
|
-
t$
|
|
1361
|
+
n$e(e$7(isGroupElementKind)),
|
|
1362
|
+
n$e(t$h(predicates)),
|
|
1363
|
+
t$8((n) => {
|
|
1732
1364
|
n.shape = shape ?? n.shape;
|
|
1733
1365
|
n.color = color ?? n.color;
|
|
1734
|
-
if (e$
|
|
1366
|
+
if (e$6(icon)) {
|
|
1735
1367
|
n.icon = icon;
|
|
1736
1368
|
}
|
|
1737
|
-
if (e$
|
|
1369
|
+
if (e$6(rule.notation)) {
|
|
1738
1370
|
n.notation = rule.notation;
|
|
1739
1371
|
}
|
|
1740
1372
|
if (nonEmptyStyle) {
|
|
@@ -1773,7 +1405,7 @@ function elementModelToNodeSource(el) {
|
|
|
1773
1405
|
id,
|
|
1774
1406
|
title,
|
|
1775
1407
|
...rest
|
|
1776
|
-
} = n$
|
|
1408
|
+
} = n$7(el.$element, ["summary", "description", "metadata", "style", "tags"]);
|
|
1777
1409
|
const { color, icon, shape, ...style } = el.style;
|
|
1778
1410
|
return exact({
|
|
1779
1411
|
id,
|
|
@@ -1895,35 +1527,35 @@ function pickRelationshipProps(relation) {
|
|
|
1895
1527
|
};
|
|
1896
1528
|
}
|
|
1897
1529
|
function mergePropsFromRelationships(relations, prefer) {
|
|
1898
|
-
const allprops = t$
|
|
1530
|
+
const allprops = t$e(
|
|
1899
1531
|
relations,
|
|
1900
1532
|
t$2(
|
|
1901
1533
|
(acc, r) => {
|
|
1902
|
-
if (e$
|
|
1534
|
+
if (e$4(r.title) && !acc.title.includes(r.title)) {
|
|
1903
1535
|
acc.title.push(r.title);
|
|
1904
1536
|
}
|
|
1905
|
-
if (e$
|
|
1537
|
+
if (e$4(r.description) && !acc.description.some(t$i(r.description))) {
|
|
1906
1538
|
acc.description.push(r.description);
|
|
1907
1539
|
}
|
|
1908
|
-
if (e$
|
|
1540
|
+
if (e$4(r.technology) && !acc.technology.includes(r.technology)) {
|
|
1909
1541
|
acc.technology.push(r.technology);
|
|
1910
1542
|
}
|
|
1911
|
-
if (e$
|
|
1543
|
+
if (e$4(r.kind) && !acc.kind.includes(r.kind)) {
|
|
1912
1544
|
acc.kind.push(r.kind);
|
|
1913
1545
|
}
|
|
1914
|
-
if (e$
|
|
1546
|
+
if (e$4(r.color) && !acc.color.includes(r.color)) {
|
|
1915
1547
|
acc.color.push(r.color);
|
|
1916
1548
|
}
|
|
1917
|
-
if (e$
|
|
1549
|
+
if (e$4(r.line) && !acc.line.includes(r.line)) {
|
|
1918
1550
|
acc.line.push(r.line);
|
|
1919
1551
|
}
|
|
1920
|
-
if (e$
|
|
1552
|
+
if (e$4(r.head) && !acc.head.includes(r.head)) {
|
|
1921
1553
|
acc.head.push(r.head);
|
|
1922
1554
|
}
|
|
1923
|
-
if (e$
|
|
1555
|
+
if (e$4(r.tail) && !acc.tail.includes(r.tail)) {
|
|
1924
1556
|
acc.tail.push(r.tail);
|
|
1925
1557
|
}
|
|
1926
|
-
if (e$
|
|
1558
|
+
if (e$4(r.navigateTo) && !acc.navigateTo.includes(r.navigateTo)) {
|
|
1927
1559
|
acc.navigateTo.push(r.navigateTo);
|
|
1928
1560
|
}
|
|
1929
1561
|
if (r.tags) {
|
|
@@ -1945,26 +1577,26 @@ function mergePropsFromRelationships(relations, prefer) {
|
|
|
1945
1577
|
}
|
|
1946
1578
|
)
|
|
1947
1579
|
);
|
|
1948
|
-
let technology = t$
|
|
1949
|
-
let title = t$
|
|
1950
|
-
const tags = n$
|
|
1580
|
+
let technology = t$6(allprops.technology);
|
|
1581
|
+
let title = t$6(allprops.title) ?? (allprops.title.length > 1 ? "[...]" : null);
|
|
1582
|
+
const tags = n$f(allprops.tags);
|
|
1951
1583
|
let merged = exact({
|
|
1952
1584
|
// If there is no title, but there is technology, use technology as title
|
|
1953
1585
|
title: title ?? (technology ? `[${technology}]` : null),
|
|
1954
|
-
description: t$
|
|
1586
|
+
description: t$6(allprops.description),
|
|
1955
1587
|
technology,
|
|
1956
|
-
kind: t$
|
|
1957
|
-
head: t$
|
|
1958
|
-
tail: t$
|
|
1959
|
-
color: t$
|
|
1960
|
-
line: t$
|
|
1961
|
-
navigateTo: t$
|
|
1588
|
+
kind: t$6(allprops.kind),
|
|
1589
|
+
head: t$6(allprops.head),
|
|
1590
|
+
tail: t$6(allprops.tail),
|
|
1591
|
+
color: t$6(allprops.color),
|
|
1592
|
+
line: t$6(allprops.line),
|
|
1593
|
+
navigateTo: t$6(allprops.navigateTo),
|
|
1962
1594
|
...isNonEmptyArray(tags) && { tags }
|
|
1963
1595
|
});
|
|
1964
1596
|
if (prefer) {
|
|
1965
1597
|
return {
|
|
1966
1598
|
...merged,
|
|
1967
|
-
...t$
|
|
1599
|
+
...t$3(pickRelationshipProps(prefer), e$4)
|
|
1968
1600
|
};
|
|
1969
1601
|
}
|
|
1970
1602
|
return merged;
|
|
@@ -2089,7 +1721,7 @@ function toNodeSource(el) {
|
|
|
2089
1721
|
let tags = [...el.tags];
|
|
2090
1722
|
summary ??= description2;
|
|
2091
1723
|
if (onlyOneInstance) {
|
|
2092
|
-
tags = n$
|
|
1724
|
+
tags = n$f([...tags, ...onlyOneInstance.tags]);
|
|
2093
1725
|
if (title === nameFromFqn(el.id)) {
|
|
2094
1726
|
title = onlyOneInstance.title;
|
|
2095
1727
|
}
|
|
@@ -2111,7 +1743,7 @@ function toNodeSource(el) {
|
|
|
2111
1743
|
icon: icon2,
|
|
2112
1744
|
description: summary,
|
|
2113
1745
|
tags,
|
|
2114
|
-
style: n$
|
|
1746
|
+
style: n$7(el.style, ["icon", "shape", "color"])
|
|
2115
1747
|
});
|
|
2116
1748
|
}
|
|
2117
1749
|
invariant(el.isInstance(), "Expected Instance");
|
|
@@ -2132,7 +1764,7 @@ function toNodeSource(el) {
|
|
|
2132
1764
|
description,
|
|
2133
1765
|
technology,
|
|
2134
1766
|
tags: [...el.tags],
|
|
2135
|
-
links: t$
|
|
1767
|
+
links: t$c(links, 1) ? links : void 0,
|
|
2136
1768
|
icon,
|
|
2137
1769
|
color,
|
|
2138
1770
|
shape,
|
|
@@ -2148,7 +1780,7 @@ function toComputedEdges$1(connections) {
|
|
|
2148
1780
|
...e.relations.model,
|
|
2149
1781
|
...e.relations.deployment
|
|
2150
1782
|
];
|
|
2151
|
-
invariant(t$
|
|
1783
|
+
invariant(t$c(relations, 1), "Edge must have at least one relation");
|
|
2152
1784
|
const defaults = e.source.$model.$styles.defaults;
|
|
2153
1785
|
const source = e.source.id;
|
|
2154
1786
|
const target = e.target.id;
|
|
@@ -2212,28 +1844,28 @@ function findCrossBoundarySameSourceOrTarget(connections) {
|
|
|
2212
1844
|
}
|
|
2213
1845
|
const excludedRelations = new DefaultMap(() => /* @__PURE__ */ new Set());
|
|
2214
1846
|
for (const [relation, sameRelationGroup] of groupedByRelation) {
|
|
2215
|
-
if (!t$
|
|
1847
|
+
if (!t$c(sameRelationGroup, 2)) {
|
|
2216
1848
|
continue;
|
|
2217
1849
|
}
|
|
2218
|
-
t$
|
|
1850
|
+
t$e(
|
|
2219
1851
|
sameRelationGroup,
|
|
2220
|
-
t$
|
|
1852
|
+
t$m((conn) => [
|
|
2221
1853
|
{ group: `$source-${conn.source.id}`, conn },
|
|
2222
1854
|
{ group: `$target-${conn.target.id}`, conn }
|
|
2223
1855
|
]),
|
|
2224
|
-
t$
|
|
2225
|
-
t$
|
|
2226
|
-
n$
|
|
2227
|
-
t$
|
|
1856
|
+
t$l(e$8("group")),
|
|
1857
|
+
t$k(),
|
|
1858
|
+
n$e(t$c(2)),
|
|
1859
|
+
t$8(
|
|
2228
1860
|
// In each group, sort by hierarchy, first are deepest
|
|
2229
|
-
t$
|
|
2230
|
-
t$
|
|
1861
|
+
t$j(
|
|
1862
|
+
t$f(e$8("conn")),
|
|
2231
1863
|
sortConnectionsByBoundaryHierarchy("desc"),
|
|
2232
1864
|
// Drop first, as it is the deepest
|
|
2233
1865
|
// Drop if boundary is same as previous
|
|
2234
|
-
t$
|
|
1866
|
+
t$a((conn, i, all) => i === 0 || conn.boundary === all[i - 1].boundary),
|
|
2235
1867
|
// Drop relations from boundaries above
|
|
2236
|
-
t$
|
|
1868
|
+
t$8((conn) => {
|
|
2237
1869
|
excludedRelations.get(conn).add(relation);
|
|
2238
1870
|
})
|
|
2239
1871
|
)
|
|
@@ -2278,7 +1910,7 @@ function findCrossBoundaryConnections(connections) {
|
|
|
2278
1910
|
}
|
|
2279
1911
|
}
|
|
2280
1912
|
}
|
|
2281
|
-
return t$
|
|
1913
|
+
return t$e(
|
|
2282
1914
|
excludedRelations.entries(),
|
|
2283
1915
|
imap(
|
|
2284
1916
|
([c, excluded]) => c.update({
|
|
@@ -2296,7 +1928,7 @@ function cleanCrossBoundary(connections) {
|
|
|
2296
1928
|
);
|
|
2297
1929
|
}
|
|
2298
1930
|
function findRedundantConnections$1(connections) {
|
|
2299
|
-
return t$
|
|
1931
|
+
return t$e(
|
|
2300
1932
|
connections,
|
|
2301
1933
|
mergeConnections,
|
|
2302
1934
|
t$2((redundants, connection) => {
|
|
@@ -2378,25 +2010,25 @@ let StageInclude$1 = class StageInclude extends AbstractStageInclude {
|
|
|
2378
2010
|
return hasChanged();
|
|
2379
2011
|
}
|
|
2380
2012
|
processConnections(connections) {
|
|
2381
|
-
const clean = t$
|
|
2013
|
+
const clean = t$e(
|
|
2382
2014
|
connections,
|
|
2383
2015
|
cleanCrossBoundary,
|
|
2384
2016
|
cleanRedundantRelationships
|
|
2385
2017
|
);
|
|
2386
|
-
t$
|
|
2018
|
+
t$e(
|
|
2387
2019
|
clean,
|
|
2388
2020
|
// Process only connection from this stage
|
|
2389
2021
|
// filter(c => this._connections.some(c2 => c2.id === c.id)),
|
|
2390
|
-
t$
|
|
2391
|
-
t$
|
|
2392
|
-
t$
|
|
2022
|
+
t$8(({ source, target, boundary }) => {
|
|
2023
|
+
t$e(
|
|
2024
|
+
t$n(
|
|
2393
2025
|
[...toArray(source.ancestors()).reverse(), source],
|
|
2394
2026
|
[...toArray(target.ancestors()).reverse(), target]
|
|
2395
2027
|
),
|
|
2396
2028
|
// Filter out common ancestors
|
|
2397
|
-
t$
|
|
2029
|
+
t$a(([sourceAncestor, targetAncestor]) => sourceAncestor === targetAncestor),
|
|
2398
2030
|
n(1),
|
|
2399
|
-
t$
|
|
2031
|
+
t$8(([sourceAncestor, targetAncestor]) => {
|
|
2400
2032
|
if (source === sourceAncestor && target === targetAncestor) {
|
|
2401
2033
|
this.addImplicit(boundary);
|
|
2402
2034
|
return;
|
|
@@ -2445,7 +2077,7 @@ let Memory$1 = class Memory extends AbstractMemory {
|
|
|
2445
2077
|
});
|
|
2446
2078
|
}
|
|
2447
2079
|
equals(other) {
|
|
2448
|
-
return other instanceof Memory && t$
|
|
2080
|
+
return other instanceof Memory && t$i(this.state, other.state);
|
|
2449
2081
|
}
|
|
2450
2082
|
diff(state) {
|
|
2451
2083
|
return {
|
|
@@ -2522,9 +2154,9 @@ const IncomingRelationPredicate = {
|
|
|
2522
2154
|
return stage;
|
|
2523
2155
|
}
|
|
2524
2156
|
const isIncoming = filterIncomingConnections(resolveElements$1(model, expr.incoming));
|
|
2525
|
-
const toExclude = t$
|
|
2157
|
+
const toExclude = t$e(
|
|
2526
2158
|
memory.connections,
|
|
2527
|
-
n$
|
|
2159
|
+
n$e(isIncoming),
|
|
2528
2160
|
applyPredicate(where)
|
|
2529
2161
|
);
|
|
2530
2162
|
stage.excludeConnections(toExclude);
|
|
@@ -2532,7 +2164,7 @@ const IncomingRelationPredicate = {
|
|
|
2532
2164
|
}
|
|
2533
2165
|
};
|
|
2534
2166
|
function filterIncomingConnections(targets) {
|
|
2535
|
-
return t$
|
|
2167
|
+
return t$h(
|
|
2536
2168
|
targets.map((target) => {
|
|
2537
2169
|
const satisfies = (el) => el === target || isAncestor(target, el);
|
|
2538
2170
|
return (connection) => {
|
|
@@ -2581,9 +2213,9 @@ const OutgoingRelationPredicate = {
|
|
|
2581
2213
|
return stage;
|
|
2582
2214
|
}
|
|
2583
2215
|
const isOutgoing = filterOutgoingConnections(resolveElements$1(model, expr.outgoing));
|
|
2584
|
-
const toExclude = t$
|
|
2216
|
+
const toExclude = t$e(
|
|
2585
2217
|
memory.connections,
|
|
2586
|
-
n$
|
|
2218
|
+
n$e(isOutgoing),
|
|
2587
2219
|
applyPredicate(where)
|
|
2588
2220
|
);
|
|
2589
2221
|
stage.excludeConnections(toExclude);
|
|
@@ -2591,7 +2223,7 @@ const OutgoingRelationPredicate = {
|
|
|
2591
2223
|
}
|
|
2592
2224
|
};
|
|
2593
2225
|
function filterOutgoingConnections(sources) {
|
|
2594
|
-
return t$
|
|
2226
|
+
return t$h(
|
|
2595
2227
|
sources.map((source) => {
|
|
2596
2228
|
const satisfies = (el) => el === source || isAncestor(source, el);
|
|
2597
2229
|
return (connection) => {
|
|
@@ -2629,10 +2261,10 @@ const DirectRelationPredicate = {
|
|
|
2629
2261
|
switch (true) {
|
|
2630
2262
|
// * -> *
|
|
2631
2263
|
case (sourceIsWildcard && targetIsWildcard): {
|
|
2632
|
-
connections = t$
|
|
2264
|
+
connections = t$e(
|
|
2633
2265
|
findConnectionsWithin$1(model.instances()),
|
|
2634
2266
|
applyPredicate(where),
|
|
2635
|
-
t$
|
|
2267
|
+
t$f((c) => {
|
|
2636
2268
|
stage.addImplicit(c.boundary);
|
|
2637
2269
|
return c;
|
|
2638
2270
|
})
|
|
@@ -2648,13 +2280,13 @@ const DirectRelationPredicate = {
|
|
|
2648
2280
|
const isTarget = filterIncomingConnections(sources);
|
|
2649
2281
|
postFilter = (c) => isSource(c) !== isTarget(c);
|
|
2650
2282
|
}
|
|
2651
|
-
connections = t$
|
|
2283
|
+
connections = t$e(
|
|
2652
2284
|
sources,
|
|
2653
|
-
t$
|
|
2285
|
+
t$m((source2) => {
|
|
2654
2286
|
const targets = resolveAscendingSiblings(source2);
|
|
2655
2287
|
return findConnectionsBetween$2(source2, targets, dir);
|
|
2656
2288
|
}),
|
|
2657
|
-
n$
|
|
2289
|
+
n$e(postFilter),
|
|
2658
2290
|
applyPredicate(where)
|
|
2659
2291
|
);
|
|
2660
2292
|
break;
|
|
@@ -2668,13 +2300,13 @@ const DirectRelationPredicate = {
|
|
|
2668
2300
|
const isSource = filterOutgoingConnections(targets);
|
|
2669
2301
|
postFilter = (c) => isSource(c) !== isTarget(c);
|
|
2670
2302
|
}
|
|
2671
|
-
connections = t$
|
|
2303
|
+
connections = t$e(
|
|
2672
2304
|
targets,
|
|
2673
|
-
t$
|
|
2305
|
+
t$m((target2) => {
|
|
2674
2306
|
const sources = resolveAscendingSiblings(target2);
|
|
2675
2307
|
return [...sources].flatMap((source2) => findConnection$2(source2, target2, dir));
|
|
2676
2308
|
}),
|
|
2677
|
-
n$
|
|
2309
|
+
n$e(postFilter),
|
|
2678
2310
|
applyPredicate(where)
|
|
2679
2311
|
);
|
|
2680
2312
|
break;
|
|
@@ -2686,10 +2318,10 @@ const DirectRelationPredicate = {
|
|
|
2686
2318
|
const targets = resolveElements$1(model, target);
|
|
2687
2319
|
const isSource = filterOutgoingConnections(sources);
|
|
2688
2320
|
const isTarget = filterIncomingConnections(targets);
|
|
2689
|
-
connections = t$
|
|
2321
|
+
connections = t$e(
|
|
2690
2322
|
sources,
|
|
2691
|
-
t$
|
|
2692
|
-
n$
|
|
2323
|
+
t$m((s) => findConnectionsBetween$2(s, targets, dir)),
|
|
2324
|
+
n$e((c) => isSource(c) && isTarget(c)),
|
|
2693
2325
|
applyPredicate(where)
|
|
2694
2326
|
);
|
|
2695
2327
|
}
|
|
@@ -2748,9 +2380,9 @@ const DirectRelationPredicate = {
|
|
|
2748
2380
|
const satisfies = (connection) => {
|
|
2749
2381
|
return isSource(connection.source) && isTarget(connection.target) || expr.isBidirectional === true && isSource(connection.target) && isTarget(connection.source);
|
|
2750
2382
|
};
|
|
2751
|
-
const deploymentRelationsToExclude = t$
|
|
2383
|
+
const deploymentRelationsToExclude = t$e(
|
|
2752
2384
|
memory.connections,
|
|
2753
|
-
n$
|
|
2385
|
+
n$e(satisfies),
|
|
2754
2386
|
applyPredicate(where)
|
|
2755
2387
|
);
|
|
2756
2388
|
if (deploymentRelationsToExclude.length === 0) {
|
|
@@ -2817,9 +2449,9 @@ const InOutRelationPredicate$1 = {
|
|
|
2817
2449
|
const elements = resolveElements$1(model, expr.inout);
|
|
2818
2450
|
const isIncoming = filterIncomingConnections(elements);
|
|
2819
2451
|
const isOutgoing = filterOutgoingConnections(elements);
|
|
2820
|
-
const toExclude = t$
|
|
2452
|
+
const toExclude = t$e(
|
|
2821
2453
|
memory.connections,
|
|
2822
|
-
n$
|
|
2454
|
+
n$e((c) => isIncoming(c) !== isOutgoing(c)),
|
|
2823
2455
|
applyPredicate(where)
|
|
2824
2456
|
);
|
|
2825
2457
|
stage.excludeConnections(toExclude);
|
|
@@ -2841,10 +2473,10 @@ const WhereRelationPredicate = {
|
|
|
2841
2473
|
const WildcardPredicate$1 = {
|
|
2842
2474
|
include: ({ model, stage, where }) => {
|
|
2843
2475
|
const children = [];
|
|
2844
|
-
const rootElements = t$
|
|
2476
|
+
const rootElements = t$e(
|
|
2845
2477
|
[...model.roots()],
|
|
2846
2478
|
applyElementPredicate(where),
|
|
2847
|
-
t$
|
|
2479
|
+
t$f((root) => {
|
|
2848
2480
|
if (!root.onlyOneInstance()) {
|
|
2849
2481
|
children.push(...root.children());
|
|
2850
2482
|
}
|
|
@@ -2861,7 +2493,7 @@ const WildcardPredicate$1 = {
|
|
|
2861
2493
|
return stage;
|
|
2862
2494
|
},
|
|
2863
2495
|
exclude: ({ stage, memory, where }) => {
|
|
2864
|
-
const elementsToExclude = t$
|
|
2496
|
+
const elementsToExclude = t$e(
|
|
2865
2497
|
[...memory.elements],
|
|
2866
2498
|
applyElementPredicate(where)
|
|
2867
2499
|
);
|
|
@@ -2903,19 +2535,19 @@ function excludeModelRelations(relationsToExclude, { stage, memory }, where, fil
|
|
|
2903
2535
|
if (relationsToExclude.size === 0) {
|
|
2904
2536
|
return stage;
|
|
2905
2537
|
}
|
|
2906
|
-
const toExclude = t$
|
|
2538
|
+
const toExclude = t$e(
|
|
2907
2539
|
memory.connections,
|
|
2908
|
-
n$
|
|
2540
|
+
n$e((c) => filterConnections(c)),
|
|
2909
2541
|
// Find connections that have at least one relation in common with the excluded relations
|
|
2910
|
-
n$
|
|
2911
|
-
t$
|
|
2542
|
+
n$e((c) => hasIntersection(c.relations.model, relationsToExclude)),
|
|
2543
|
+
t$f(
|
|
2912
2544
|
(c) => c.update({
|
|
2913
2545
|
deployment: null,
|
|
2914
2546
|
model: intersection(c.relations.model, relationsToExclude)
|
|
2915
2547
|
})
|
|
2916
2548
|
),
|
|
2917
2549
|
applyPredicate(where),
|
|
2918
|
-
n$
|
|
2550
|
+
n$e((c) => c.nonEmpty())
|
|
2919
2551
|
);
|
|
2920
2552
|
if (toExclude.length === 0) {
|
|
2921
2553
|
return stage;
|
|
@@ -2955,9 +2587,9 @@ function matchConnections(connections, where) {
|
|
|
2955
2587
|
if (!where) {
|
|
2956
2588
|
return connections;
|
|
2957
2589
|
}
|
|
2958
|
-
return t$
|
|
2590
|
+
return t$e(
|
|
2959
2591
|
connections,
|
|
2960
|
-
n$
|
|
2592
|
+
n$e((c) => matchConnection(c, where))
|
|
2961
2593
|
);
|
|
2962
2594
|
}
|
|
2963
2595
|
function toFilterable(relationEndpoint, connectionEndpoint) {
|
|
@@ -2969,7 +2601,7 @@ function toFilterable(relationEndpoint, connectionEndpoint) {
|
|
|
2969
2601
|
};
|
|
2970
2602
|
}
|
|
2971
2603
|
if (isNestedElementOfDeployedInstanceModel(relationEndpoint)) {
|
|
2972
|
-
return t$
|
|
2604
|
+
return t$4(relationEndpoint.element, ["tags", "kind"]);
|
|
2973
2605
|
}
|
|
2974
2606
|
if (isDeployedInstanceModel(relationEndpoint)) {
|
|
2975
2607
|
return {
|
|
@@ -2978,7 +2610,7 @@ function toFilterable(relationEndpoint, connectionEndpoint) {
|
|
|
2978
2610
|
};
|
|
2979
2611
|
}
|
|
2980
2612
|
if (isDeploymentNodeModel(relationEndpoint)) {
|
|
2981
|
-
return t$
|
|
2613
|
+
return t$4(relationEndpoint, ["tags", "kind"]);
|
|
2982
2614
|
}
|
|
2983
2615
|
nonexhaustive(relationEndpoint);
|
|
2984
2616
|
}
|
|
@@ -3023,9 +2655,9 @@ const DeploymentRefPredicate = {
|
|
|
3023
2655
|
},
|
|
3024
2656
|
exclude: ({ expr, stage, memory, where }) => {
|
|
3025
2657
|
const exprPredicate = deploymentExpressionToPredicate(expr);
|
|
3026
|
-
const toExclude = t$
|
|
2658
|
+
const toExclude = t$e(
|
|
3027
2659
|
[...memory.elements],
|
|
3028
|
-
n$
|
|
2660
|
+
n$e(exprPredicate),
|
|
3029
2661
|
applyElementPredicate(where)
|
|
3030
2662
|
);
|
|
3031
2663
|
stage.exclude(toExclude);
|
|
@@ -3085,14 +2717,14 @@ function includeDeployedNodeDescendants(node, { stage, where }) {
|
|
|
3085
2717
|
}
|
|
3086
2718
|
stage.connectWithExisting(descendants, "out");
|
|
3087
2719
|
const allConnected = findConnectedElements(stage);
|
|
3088
|
-
t$
|
|
2720
|
+
t$e(
|
|
3089
2721
|
descendants,
|
|
3090
|
-
n$
|
|
3091
|
-
t$
|
|
2722
|
+
n$e((desc) => allConnected.has(desc)),
|
|
2723
|
+
t$8((desc) => stage.addExplicit(desc))
|
|
3092
2724
|
);
|
|
3093
2725
|
}
|
|
3094
2726
|
function findConnectedElements(stage) {
|
|
3095
|
-
return t$
|
|
2727
|
+
return t$e(
|
|
3096
2728
|
stage.mergedConnections(),
|
|
3097
2729
|
cleanCrossBoundary,
|
|
3098
2730
|
cleanRedundantRelationships,
|
|
@@ -3115,7 +2747,7 @@ let StageFinal$1 = class StageFinal {
|
|
|
3115
2747
|
if (memory.connections.length < 2) {
|
|
3116
2748
|
return memory;
|
|
3117
2749
|
}
|
|
3118
|
-
const connections = t$
|
|
2750
|
+
const connections = t$e(
|
|
3119
2751
|
memory.connections,
|
|
3120
2752
|
// Keep connections
|
|
3121
2753
|
// - between leafs
|
|
@@ -3167,12 +2799,12 @@ let StageFinal$1 = class StageFinal {
|
|
|
3167
2799
|
}
|
|
3168
2800
|
return false;
|
|
3169
2801
|
};
|
|
3170
|
-
t$
|
|
2802
|
+
t$e(
|
|
3171
2803
|
difference(implicits, snapshot),
|
|
3172
2804
|
ifilter((e) => e.isDeploymentNode()),
|
|
3173
2805
|
toArray(),
|
|
3174
2806
|
sortByFqnHierarchically,
|
|
3175
|
-
t$
|
|
2807
|
+
t$8((el) => {
|
|
3176
2808
|
const childrensToWrap = [...el.children()].filter(isFinalOrHasIncludedDescendant).length;
|
|
3177
2809
|
if (childrensToWrap >= 2) {
|
|
3178
2810
|
final.add(el);
|
|
@@ -3195,12 +2827,12 @@ let StageFinal$1 = class StageFinal {
|
|
|
3195
2827
|
const tree = treeFromMemoryState(memory, "final");
|
|
3196
2828
|
const stage = memory.stageExclude({});
|
|
3197
2829
|
const isRemovable = (el) => !(boundaries.has(el) || memory.explicits.has(el) || tree.hasInOut(el) || tree.root.has(el));
|
|
3198
|
-
const singleRoot = t$
|
|
2830
|
+
const singleRoot = t$6([...tree.root]);
|
|
3199
2831
|
if (singleRoot && !memory.explicits.has(singleRoot)) {
|
|
3200
2832
|
stage.exclude(singleRoot);
|
|
3201
2833
|
}
|
|
3202
2834
|
for (const el of memory.final) {
|
|
3203
|
-
const singleChild = t$
|
|
2835
|
+
const singleChild = t$6(tree.children(el));
|
|
3204
2836
|
if (singleChild && !tree.hasInOut(singleChild) && isRemovable(el)) {
|
|
3205
2837
|
stage.exclude(el);
|
|
3206
2838
|
}
|
|
@@ -3307,7 +2939,7 @@ function computeDeploymentView(likec4model, {
|
|
|
3307
2939
|
rules,
|
|
3308
2940
|
sorted.nodes
|
|
3309
2941
|
);
|
|
3310
|
-
const autoLayoutRule = t$
|
|
2942
|
+
const autoLayoutRule = t$9(rules, isViewRuleAutoLayout);
|
|
3311
2943
|
const elementNotations = buildElementNotations(nodes);
|
|
3312
2944
|
return calcViewLayoutHash({
|
|
3313
2945
|
...view,
|
|
@@ -3319,7 +2951,7 @@ function computeDeploymentView(likec4model, {
|
|
|
3319
2951
|
...autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }
|
|
3320
2952
|
},
|
|
3321
2953
|
edges: sorted.edges,
|
|
3322
|
-
nodes: t$
|
|
2954
|
+
nodes: t$f(nodes, (n) => {
|
|
3323
2955
|
if (n.icon === "none") {
|
|
3324
2956
|
delete n.icon;
|
|
3325
2957
|
}
|
|
@@ -3362,7 +2994,7 @@ function applyCustomElementProperties(_rules, _nodes) {
|
|
|
3362
2994
|
textSize,
|
|
3363
2995
|
description,
|
|
3364
2996
|
...rest
|
|
3365
|
-
} = t$
|
|
2997
|
+
} = t$o(props, e$b);
|
|
3366
2998
|
const style = exact({
|
|
3367
2999
|
border,
|
|
3368
3000
|
opacity,
|
|
@@ -3371,8 +3003,8 @@ function applyCustomElementProperties(_rules, _nodes) {
|
|
|
3371
3003
|
size,
|
|
3372
3004
|
textSize
|
|
3373
3005
|
});
|
|
3374
|
-
const styleNotEmpty = !e$
|
|
3375
|
-
const propsNotEmpty = !e$
|
|
3006
|
+
const styleNotEmpty = !e$5(style);
|
|
3007
|
+
const propsNotEmpty = !e$5(rest);
|
|
3376
3008
|
const satisfies = elementExprToPredicate(expr);
|
|
3377
3009
|
nodes.forEach((node, i) => {
|
|
3378
3010
|
if (isGroupElementKind(node) || !satisfies(node)) {
|
|
@@ -3501,7 +3133,7 @@ function elementsFromSteps(model, steps) {
|
|
|
3501
3133
|
actors.push(target);
|
|
3502
3134
|
}
|
|
3503
3135
|
};
|
|
3504
|
-
for (const step of t$
|
|
3136
|
+
for (const step of t$m(steps, flattenSteps)) {
|
|
3505
3137
|
const source = model.element(step.source);
|
|
3506
3138
|
const target = model.element(step.target);
|
|
3507
3139
|
let sourceColumn = actors.indexOf(source);
|
|
@@ -3534,35 +3166,35 @@ function findRelations(source, target, currentViewId) {
|
|
|
3534
3166
|
line: relation2.$relationship.line
|
|
3535
3167
|
});
|
|
3536
3168
|
}
|
|
3537
|
-
const alltags = t$
|
|
3169
|
+
const alltags = t$e(
|
|
3538
3170
|
relationships,
|
|
3539
|
-
t$
|
|
3540
|
-
n$
|
|
3171
|
+
t$m((r) => r.tags),
|
|
3172
|
+
n$f()
|
|
3541
3173
|
);
|
|
3542
|
-
const tags = t$
|
|
3543
|
-
const relations = t$
|
|
3544
|
-
const relation = n$
|
|
3174
|
+
const tags = t$c(alltags, 1) ? alltags : void 0;
|
|
3175
|
+
const relations = t$f(relationships, (r) => r.id);
|
|
3176
|
+
const relation = n$a(relationships);
|
|
3545
3177
|
let navigateTo = relation.$relationship.navigateTo;
|
|
3546
3178
|
if (navigateTo === currentViewId) {
|
|
3547
3179
|
navigateTo = void 0;
|
|
3548
3180
|
}
|
|
3549
3181
|
if (!navigateTo) {
|
|
3550
|
-
navigateTo = t$
|
|
3182
|
+
navigateTo = t$e(
|
|
3551
3183
|
relationships,
|
|
3552
|
-
t$
|
|
3184
|
+
t$m(
|
|
3553
3185
|
(r) => r.$relationship.navigateTo && r.$relationship.navigateTo !== currentViewId ? r.$relationship.navigateTo : []
|
|
3554
3186
|
),
|
|
3555
|
-
n$
|
|
3556
|
-
t$
|
|
3187
|
+
n$f(),
|
|
3188
|
+
t$6()
|
|
3557
3189
|
);
|
|
3558
3190
|
}
|
|
3559
|
-
const commonProperties = t$
|
|
3191
|
+
const commonProperties = t$e(
|
|
3560
3192
|
relationships,
|
|
3561
3193
|
t$2((acc, { title, $relationship: r }) => {
|
|
3562
|
-
e$
|
|
3563
|
-
e$
|
|
3564
|
-
e$
|
|
3565
|
-
e$
|
|
3194
|
+
e$4(title) && acc.title.add(title);
|
|
3195
|
+
e$4(r.color) && acc.color.add(r.color);
|
|
3196
|
+
e$4(r.line) && acc.line.add(r.line);
|
|
3197
|
+
e$4(r.kind) && acc.kind.add(r.kind);
|
|
3566
3198
|
return acc;
|
|
3567
3199
|
}, {
|
|
3568
3200
|
kind: /* @__PURE__ */ new Set(),
|
|
@@ -3575,10 +3207,10 @@ function findRelations(source, target, currentViewId) {
|
|
|
3575
3207
|
tags: tags ?? void 0,
|
|
3576
3208
|
relations,
|
|
3577
3209
|
navigateTo,
|
|
3578
|
-
kind: t$
|
|
3579
|
-
title: t$
|
|
3580
|
-
color: t$
|
|
3581
|
-
line: t$
|
|
3210
|
+
kind: t$6([...commonProperties.kind]),
|
|
3211
|
+
title: t$6([...commonProperties.title]),
|
|
3212
|
+
color: t$6([...commonProperties.color]),
|
|
3213
|
+
line: t$6([...commonProperties.line])
|
|
3582
3214
|
});
|
|
3583
3215
|
}
|
|
3584
3216
|
|
|
@@ -3601,7 +3233,7 @@ class DynamicViewCompute {
|
|
|
3601
3233
|
const rules = resolveGlobalRulesInDynamicView(_rules, this.model.globals);
|
|
3602
3234
|
const explicits = elementsFromIncludeProperties(this.model, rules);
|
|
3603
3235
|
const fromSteps = elementsFromSteps(this.model, viewSteps);
|
|
3604
|
-
const actors = t$
|
|
3236
|
+
const actors = t$e(
|
|
3605
3237
|
union(
|
|
3606
3238
|
// First all actors, that are explicitly included
|
|
3607
3239
|
intersection(explicits, fromSteps),
|
|
@@ -3657,7 +3289,7 @@ class DynamicViewCompute {
|
|
|
3657
3289
|
navigateTo: derivedNavigateTo,
|
|
3658
3290
|
...derived
|
|
3659
3291
|
} = findRelations(source, target, this.view.id);
|
|
3660
|
-
const navigateTo = e$
|
|
3292
|
+
const navigateTo = e$4(stepNavigateTo) && stepNavigateTo !== this.view.id ? stepNavigateTo : derivedNavigateTo;
|
|
3661
3293
|
this.steps.push(exact({
|
|
3662
3294
|
...derived,
|
|
3663
3295
|
...rest,
|
|
@@ -3734,7 +3366,7 @@ class DynamicViewCompute {
|
|
|
3734
3366
|
actors.map((e) => nonNullable(nodesMap.get(e.id)))
|
|
3735
3367
|
)
|
|
3736
3368
|
);
|
|
3737
|
-
const autoLayoutRule = t$
|
|
3369
|
+
const autoLayoutRule = t$9(rules, isViewRuleAutoLayout);
|
|
3738
3370
|
const nodeNotations = buildElementNotations(nodes);
|
|
3739
3371
|
return calcViewLayoutHash({
|
|
3740
3372
|
...view,
|
|
@@ -3746,7 +3378,7 @@ class DynamicViewCompute {
|
|
|
3746
3378
|
...autoLayoutRule?.nodeSep && { nodeSep: autoLayoutRule.nodeSep },
|
|
3747
3379
|
...autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }
|
|
3748
3380
|
},
|
|
3749
|
-
nodes: t$
|
|
3381
|
+
nodes: t$f(nodes, (n) => {
|
|
3750
3382
|
if (n.icon === "none") {
|
|
3751
3383
|
delete n.icon;
|
|
3752
3384
|
}
|
|
@@ -3821,7 +3453,7 @@ function applyCustomRelationProperties(_rules, nodes, _edges) {
|
|
|
3821
3453
|
} of rules) {
|
|
3822
3454
|
const description = _description ? { description: { txt: _description } } : {};
|
|
3823
3455
|
const notes = _notes ? { notes: { txt: _notes } } : {};
|
|
3824
|
-
const props = t$
|
|
3456
|
+
const props = t$o(customprops, e$b);
|
|
3825
3457
|
const satisfies = relationExpressionToPredicates(expr);
|
|
3826
3458
|
edges.forEach((edge, i) => {
|
|
3827
3459
|
let source, target;
|
|
@@ -3839,7 +3471,7 @@ function applyCustomRelationProperties(_rules, nodes, _edges) {
|
|
|
3839
3471
|
if (!source || !target) {
|
|
3840
3472
|
return;
|
|
3841
3473
|
}
|
|
3842
|
-
if (satisfies({ source, target, ...t$
|
|
3474
|
+
if (satisfies({ source, target, ...t$4(edge, ["kind", "tags"]) })) {
|
|
3843
3475
|
edges[i] = {
|
|
3844
3476
|
...edge,
|
|
3845
3477
|
...props,
|
|
@@ -3880,10 +3512,10 @@ class NodesGroup {
|
|
|
3880
3512
|
|
|
3881
3513
|
class StageExclude extends AbstractStageExclude {
|
|
3882
3514
|
excludeRelations(excluded) {
|
|
3883
|
-
t$
|
|
3515
|
+
t$e(
|
|
3884
3516
|
this.memory.connections,
|
|
3885
|
-
n$
|
|
3886
|
-
t$
|
|
3517
|
+
n$e((c) => hasIntersection(c.relations, excluded)),
|
|
3518
|
+
t$8((c) => {
|
|
3887
3519
|
this.excludeConnections(
|
|
3888
3520
|
c.update(intersection(c.relations, excluded))
|
|
3889
3521
|
);
|
|
@@ -3978,18 +3610,18 @@ class StageInclude extends AbstractStageInclude {
|
|
|
3978
3610
|
if (ModelExpression.isRelationExpr(this.expression)) {
|
|
3979
3611
|
return connections;
|
|
3980
3612
|
}
|
|
3981
|
-
t$
|
|
3613
|
+
t$e(
|
|
3982
3614
|
connections,
|
|
3983
|
-
t$
|
|
3984
|
-
t$
|
|
3985
|
-
t$
|
|
3615
|
+
t$8(({ source, target, boundary }) => {
|
|
3616
|
+
t$e(
|
|
3617
|
+
t$n(
|
|
3986
3618
|
[...toArray(source.ancestors()).reverse(), source],
|
|
3987
3619
|
[...toArray(target.ancestors()).reverse(), target]
|
|
3988
3620
|
),
|
|
3989
3621
|
// Filter out common ancestors
|
|
3990
|
-
t$
|
|
3622
|
+
t$a(([sourceAncestor, targetAncestor]) => sourceAncestor === targetAncestor),
|
|
3991
3623
|
n(1),
|
|
3992
|
-
t$
|
|
3624
|
+
t$8(([sourceAncestor, targetAncestor]) => {
|
|
3993
3625
|
if (sourceAncestor === source && targetAncestor === target) {
|
|
3994
3626
|
this.addImplicitWithinScope(boundary);
|
|
3995
3627
|
return;
|
|
@@ -4141,13 +3773,13 @@ class ActiveGroupMemory extends Memory {
|
|
|
4141
3773
|
}
|
|
4142
3774
|
|
|
4143
3775
|
function findRedundantConnections(connections) {
|
|
4144
|
-
return t$
|
|
3776
|
+
return t$e(
|
|
4145
3777
|
[...connections],
|
|
4146
3778
|
mergeConnections,
|
|
4147
3779
|
t$2((reducedConnections, connection, _, all) => {
|
|
4148
3780
|
const descendants = findDescendantConnections(all, connection);
|
|
4149
3781
|
const nestedRelations = union(
|
|
4150
|
-
...descendants.map(e$
|
|
3782
|
+
...descendants.map(e$8("relations"))
|
|
4151
3783
|
);
|
|
4152
3784
|
let accum = intersection(connection.relations, nestedRelations);
|
|
4153
3785
|
if (descendants.length > 0) {
|
|
@@ -4221,11 +3853,11 @@ class StageFinal {
|
|
|
4221
3853
|
}
|
|
4222
3854
|
return false;
|
|
4223
3855
|
};
|
|
4224
|
-
t$
|
|
3856
|
+
t$e(
|
|
4225
3857
|
difference(implicits, snapshot),
|
|
4226
3858
|
toArray(),
|
|
4227
3859
|
sortByFqnHierarchically,
|
|
4228
|
-
t$
|
|
3860
|
+
t$8((el) => {
|
|
4229
3861
|
const childrensToWrap = [...el.children()].filter(isFinalOrHasIncludedDescendant).length;
|
|
4230
3862
|
if (childrensToWrap >= 2) {
|
|
4231
3863
|
final.add(el);
|
|
@@ -4248,12 +3880,12 @@ class StageFinal {
|
|
|
4248
3880
|
const tree = treeFromMemoryState(memory, "final");
|
|
4249
3881
|
const stage = memory.stageExclude({});
|
|
4250
3882
|
const isRemovable = (el) => !(boundaries.has(el) || memory.explicits.has(el) || tree.hasInOut(el) || tree.root.has(el));
|
|
4251
|
-
const singleRoot = t$
|
|
3883
|
+
const singleRoot = t$6([...tree.root]);
|
|
4252
3884
|
if (singleRoot && !memory.explicits.has(singleRoot)) {
|
|
4253
3885
|
stage.exclude(singleRoot);
|
|
4254
3886
|
}
|
|
4255
3887
|
for (const el of memory.final) {
|
|
4256
|
-
const singleChild = t$
|
|
3888
|
+
const singleChild = t$6(tree.children(el));
|
|
4257
3889
|
if (singleChild && !tree.hasInOut(singleChild) && isRemovable(el)) {
|
|
4258
3890
|
stage.exclude(el);
|
|
4259
3891
|
}
|
|
@@ -4307,7 +3939,7 @@ function includeDescendantsFromMemory(elements, memory) {
|
|
|
4307
3939
|
if (memory.isEmpty() || elements.length === 0) {
|
|
4308
3940
|
return elements;
|
|
4309
3941
|
}
|
|
4310
|
-
const descedantsOf = t$
|
|
3942
|
+
const descedantsOf = t$h(elements.map((e) => isDescendantOf(e)));
|
|
4311
3943
|
const fromMemory = toArray(
|
|
4312
3944
|
ifilter(
|
|
4313
3945
|
memory.elements,
|
|
@@ -4398,7 +4030,7 @@ function toComputedEdges(connections) {
|
|
|
4398
4030
|
const relations = [
|
|
4399
4031
|
...e.relations
|
|
4400
4032
|
];
|
|
4401
|
-
invariant(t$
|
|
4033
|
+
invariant(t$c(relations, 1), "Edge must have at least one relation");
|
|
4402
4034
|
const $defaults = e.source.$model.$styles.defaults;
|
|
4403
4035
|
const source = e.source.id;
|
|
4404
4036
|
const target = e.target.id;
|
|
@@ -4412,8 +4044,8 @@ function toComputedEdges(connections) {
|
|
|
4412
4044
|
relations.map((r) => r.$relationship),
|
|
4413
4045
|
// Prefer only single relationship
|
|
4414
4046
|
// https://github.com/likec4/likec4/issues/1423
|
|
4415
|
-
t$
|
|
4416
|
-
n$
|
|
4047
|
+
t$6(
|
|
4048
|
+
n$e(relations, (r) => r.source.id === source && r.target.id === target)
|
|
4417
4049
|
)?.$relationship
|
|
4418
4050
|
);
|
|
4419
4051
|
const edge = exact({
|
|
@@ -4451,11 +4083,11 @@ const DirectRelationExprPredicate = {
|
|
|
4451
4083
|
// This is a special case, we look for all relationships that satisfy the where clause
|
|
4452
4084
|
// * -> * ; Empty memory; Where clause
|
|
4453
4085
|
case (sourceIsWildcard && targetIsWildcard && memory.isEmpty() && where !== NoWhere): {
|
|
4454
|
-
const connections2 = t$
|
|
4086
|
+
const connections2 = t$e(
|
|
4455
4087
|
model.relationships(),
|
|
4456
4088
|
ifilter(where),
|
|
4457
4089
|
toArray(),
|
|
4458
|
-
t$
|
|
4090
|
+
t$f((r) => new ConnectionModel(r.source, r.target, /* @__PURE__ */ new Set([r])))
|
|
4459
4091
|
);
|
|
4460
4092
|
stage.addConnections(connections2);
|
|
4461
4093
|
return stage;
|
|
@@ -4479,10 +4111,10 @@ const DirectRelationExprPredicate = {
|
|
|
4479
4111
|
// element -> *; Where clause
|
|
4480
4112
|
case (!sourceIsWildcard && targetIsWildcard && where !== NoWhere): {
|
|
4481
4113
|
const sources = resolveElements(model, source);
|
|
4482
|
-
const connections2 = t$
|
|
4114
|
+
const connections2 = t$e(
|
|
4483
4115
|
sources,
|
|
4484
|
-
t$
|
|
4485
|
-
(source2) => t$
|
|
4116
|
+
t$m(
|
|
4117
|
+
(source2) => t$e(
|
|
4486
4118
|
source2,
|
|
4487
4119
|
e(e$3(isBidirectional === true), {
|
|
4488
4120
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4491,12 +4123,12 @@ const DirectRelationExprPredicate = {
|
|
|
4491
4123
|
ifilter(where),
|
|
4492
4124
|
iunique(),
|
|
4493
4125
|
toArray(),
|
|
4494
|
-
t$
|
|
4495
|
-
([outgoing, incoming]) => t$
|
|
4496
|
-
t$
|
|
4126
|
+
t$5((r) => r.source === source2),
|
|
4127
|
+
([outgoing, incoming]) => t$p(
|
|
4128
|
+
t$e(
|
|
4497
4129
|
outgoing,
|
|
4498
|
-
n$
|
|
4499
|
-
t$
|
|
4130
|
+
n$e((r) => !isAncestorOrDescendantOf(source2, r.target)),
|
|
4131
|
+
t$f(
|
|
4500
4132
|
(outgoing2) => new ConnectionModel(
|
|
4501
4133
|
source2,
|
|
4502
4134
|
outgoing2.target,
|
|
@@ -4504,10 +4136,10 @@ const DirectRelationExprPredicate = {
|
|
|
4504
4136
|
)
|
|
4505
4137
|
)
|
|
4506
4138
|
),
|
|
4507
|
-
t$
|
|
4139
|
+
t$e(
|
|
4508
4140
|
incoming,
|
|
4509
|
-
n$
|
|
4510
|
-
t$
|
|
4141
|
+
n$e((r) => !isAncestorOrDescendantOf(source2, r.source)),
|
|
4142
|
+
t$f(
|
|
4511
4143
|
(incoming2) => new ConnectionModel(
|
|
4512
4144
|
incoming2.source,
|
|
4513
4145
|
source2,
|
|
@@ -4537,10 +4169,10 @@ const DirectRelationExprPredicate = {
|
|
|
4537
4169
|
// * -> element; Where clause
|
|
4538
4170
|
case (sourceIsWildcard && !targetIsWildcard && where !== NoWhere): {
|
|
4539
4171
|
const targets = resolveElements(model, target);
|
|
4540
|
-
const connections2 = t$
|
|
4172
|
+
const connections2 = t$e(
|
|
4541
4173
|
targets,
|
|
4542
|
-
t$
|
|
4543
|
-
(target2) => t$
|
|
4174
|
+
t$m(
|
|
4175
|
+
(target2) => t$e(
|
|
4544
4176
|
target2,
|
|
4545
4177
|
e(e$3(isBidirectional === true), {
|
|
4546
4178
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4548,12 +4180,12 @@ const DirectRelationExprPredicate = {
|
|
|
4548
4180
|
}),
|
|
4549
4181
|
ifilter(where),
|
|
4550
4182
|
toArray(),
|
|
4551
|
-
t$
|
|
4552
|
-
([incoming, outgoing]) => t$
|
|
4553
|
-
t$
|
|
4183
|
+
t$5((r) => r.target === target2),
|
|
4184
|
+
([incoming, outgoing]) => t$p(
|
|
4185
|
+
t$e(
|
|
4554
4186
|
outgoing,
|
|
4555
|
-
n$
|
|
4556
|
-
t$
|
|
4187
|
+
n$e((r) => !isAncestorOrDescendantOf(target2, r.target)),
|
|
4188
|
+
t$f(
|
|
4557
4189
|
(outgoing2) => new ConnectionModel(
|
|
4558
4190
|
target2,
|
|
4559
4191
|
outgoing2.target,
|
|
@@ -4561,10 +4193,10 @@ const DirectRelationExprPredicate = {
|
|
|
4561
4193
|
)
|
|
4562
4194
|
)
|
|
4563
4195
|
),
|
|
4564
|
-
t$
|
|
4196
|
+
t$e(
|
|
4565
4197
|
incoming,
|
|
4566
|
-
n$
|
|
4567
|
-
t$
|
|
4198
|
+
n$e((r) => !isAncestorOrDescendantOf(target2, r.source)),
|
|
4199
|
+
t$f(
|
|
4568
4200
|
(incoming2) => new ConnectionModel(
|
|
4569
4201
|
incoming2.source,
|
|
4570
4202
|
target2,
|
|
@@ -4615,10 +4247,10 @@ const DirectRelationExprPredicate = {
|
|
|
4615
4247
|
switch (true) {
|
|
4616
4248
|
// * -> *
|
|
4617
4249
|
case (sourceIsWildcard && targetIsWildcard): {
|
|
4618
|
-
relations = t$
|
|
4250
|
+
relations = t$e(
|
|
4619
4251
|
memory.connections,
|
|
4620
|
-
t$
|
|
4621
|
-
e$
|
|
4252
|
+
t$m(t$j(
|
|
4253
|
+
e$8("relations"),
|
|
4622
4254
|
ifilter(where),
|
|
4623
4255
|
toArray()
|
|
4624
4256
|
)),
|
|
@@ -4629,10 +4261,10 @@ const DirectRelationExprPredicate = {
|
|
|
4629
4261
|
// element -> *
|
|
4630
4262
|
case (!sourceIsWildcard && targetIsWildcard): {
|
|
4631
4263
|
const sources = resolveElements(model, source);
|
|
4632
|
-
relations = t$
|
|
4264
|
+
relations = t$e(
|
|
4633
4265
|
sources,
|
|
4634
|
-
t$
|
|
4635
|
-
(source2) => t$
|
|
4266
|
+
t$m(
|
|
4267
|
+
(source2) => t$e(
|
|
4636
4268
|
source2,
|
|
4637
4269
|
e(e$3(isBidirectional === true), {
|
|
4638
4270
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4649,10 +4281,10 @@ const DirectRelationExprPredicate = {
|
|
|
4649
4281
|
// * -> element
|
|
4650
4282
|
case (sourceIsWildcard && !targetIsWildcard): {
|
|
4651
4283
|
const targets = resolveElements(model, target);
|
|
4652
|
-
relations = t$
|
|
4284
|
+
relations = t$e(
|
|
4653
4285
|
targets,
|
|
4654
|
-
t$
|
|
4655
|
-
(target2) => t$
|
|
4286
|
+
t$m(
|
|
4287
|
+
(target2) => t$e(
|
|
4656
4288
|
target2,
|
|
4657
4289
|
e(e$3(isBidirectional === true), {
|
|
4658
4290
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4693,7 +4325,7 @@ const DirectRelationExprPredicate = {
|
|
|
4693
4325
|
};
|
|
4694
4326
|
function resolveWildcard(nonWildcard, { memory, model }) {
|
|
4695
4327
|
let sources = resolveElements(model, nonWildcard);
|
|
4696
|
-
if (!t$
|
|
4328
|
+
if (!t$c(sources, 1)) {
|
|
4697
4329
|
return [[], []];
|
|
4698
4330
|
}
|
|
4699
4331
|
if (ModelFqnExpr.isModelRef(nonWildcard)) {
|
|
@@ -4704,9 +4336,9 @@ function resolveWildcard(nonWildcard, { memory, model }) {
|
|
|
4704
4336
|
includeDescendantsFromMemory(targets2, memory)
|
|
4705
4337
|
];
|
|
4706
4338
|
}
|
|
4707
|
-
const targets = t$
|
|
4339
|
+
const targets = t$e(
|
|
4708
4340
|
sources,
|
|
4709
|
-
t$
|
|
4341
|
+
t$f((el) => el.ascendingSiblings()),
|
|
4710
4342
|
iflat(),
|
|
4711
4343
|
iunique(),
|
|
4712
4344
|
toArray(),
|
|
@@ -4737,7 +4369,7 @@ const IncomingExprPredicate = {
|
|
|
4737
4369
|
const visibleElements = [...memory.elements];
|
|
4738
4370
|
if (visibleElements.length === 0) {
|
|
4739
4371
|
visibleElements.push(
|
|
4740
|
-
...n$
|
|
4372
|
+
...n$f(
|
|
4741
4373
|
targets.flatMap((el) => [...el.ascendingSiblings()])
|
|
4742
4374
|
)
|
|
4743
4375
|
);
|
|
@@ -4784,7 +4416,7 @@ function incomingConnectionPredicate(model, expr) {
|
|
|
4784
4416
|
}
|
|
4785
4417
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "children"): {
|
|
4786
4418
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4787
|
-
return t$
|
|
4419
|
+
return t$h(
|
|
4788
4420
|
[...model.children(fqn)].map(
|
|
4789
4421
|
(el) => Connection.isIncoming(el.id)
|
|
4790
4422
|
)
|
|
@@ -4792,7 +4424,7 @@ function incomingConnectionPredicate(model, expr) {
|
|
|
4792
4424
|
}
|
|
4793
4425
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "descendants"): {
|
|
4794
4426
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4795
|
-
return t$
|
|
4427
|
+
return t$h([
|
|
4796
4428
|
Connection.isInside(fqn),
|
|
4797
4429
|
...[...model.children(fqn)].map(
|
|
4798
4430
|
(el) => Connection.isIncoming(el.id)
|
|
@@ -4801,7 +4433,7 @@ function incomingConnectionPredicate(model, expr) {
|
|
|
4801
4433
|
}
|
|
4802
4434
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "expanded"): {
|
|
4803
4435
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4804
|
-
return t$
|
|
4436
|
+
return t$h([
|
|
4805
4437
|
Connection.isIncoming(fqn),
|
|
4806
4438
|
Connection.isInside(fqn)
|
|
4807
4439
|
]);
|
|
@@ -4832,7 +4464,7 @@ const InOutRelationPredicate = {
|
|
|
4832
4464
|
const elements = resolveAndIncludeFromMemory(inout, { memory, model });
|
|
4833
4465
|
let visibleElements = [...memory.elements];
|
|
4834
4466
|
if (visibleElements.length === 0) {
|
|
4835
|
-
visibleElements = n$
|
|
4467
|
+
visibleElements = n$f(
|
|
4836
4468
|
elements.flatMap((el) => toArray(el.ascendingSiblings()))
|
|
4837
4469
|
);
|
|
4838
4470
|
}
|
|
@@ -4889,7 +4521,7 @@ const OutgoingExprPredicate = {
|
|
|
4889
4521
|
const visibleElements = [...memory.elements];
|
|
4890
4522
|
if (visibleElements.length === 0) {
|
|
4891
4523
|
visibleElements.push(
|
|
4892
|
-
...n$
|
|
4524
|
+
...n$f(
|
|
4893
4525
|
elements.flatMap((el) => [...el.ascendingSiblings()])
|
|
4894
4526
|
)
|
|
4895
4527
|
);
|
|
@@ -4938,7 +4570,7 @@ function outgoingConnectionPredicate(model, expr) {
|
|
|
4938
4570
|
}
|
|
4939
4571
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "children"): {
|
|
4940
4572
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4941
|
-
return t$
|
|
4573
|
+
return t$h(
|
|
4942
4574
|
[...model.children(fqn)].map(
|
|
4943
4575
|
(el) => Connection.isOutgoing(el.id)
|
|
4944
4576
|
)
|
|
@@ -4946,7 +4578,7 @@ function outgoingConnectionPredicate(model, expr) {
|
|
|
4946
4578
|
}
|
|
4947
4579
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "descendants"): {
|
|
4948
4580
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4949
|
-
return t$
|
|
4581
|
+
return t$h([
|
|
4950
4582
|
Connection.isInside(fqn),
|
|
4951
4583
|
...[...model.children(fqn)].map(
|
|
4952
4584
|
(el) => Connection.isOutgoing(el.id)
|
|
@@ -4955,7 +4587,7 @@ function outgoingConnectionPredicate(model, expr) {
|
|
|
4955
4587
|
}
|
|
4956
4588
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "expanded"): {
|
|
4957
4589
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4958
|
-
return t$
|
|
4590
|
+
return t$h([
|
|
4959
4591
|
Connection.isOutgoing(fqn),
|
|
4960
4592
|
Connection.isInside(fqn)
|
|
4961
4593
|
]);
|
|
@@ -5020,7 +4652,7 @@ const WildcardPredicate = {
|
|
|
5020
4652
|
exclude: ({ scope, memory, stage, where }) => {
|
|
5021
4653
|
if (where !== NoWhere) {
|
|
5022
4654
|
stage.exclude(
|
|
5023
|
-
n$
|
|
4655
|
+
n$e(
|
|
5024
4656
|
[...memory.elements],
|
|
5025
4657
|
where
|
|
5026
4658
|
)
|
|
@@ -5046,7 +4678,7 @@ function processElementPredicate(expr, op, ctx) {
|
|
|
5046
4678
|
case ModelFqnExpr.isWhere(expr): {
|
|
5047
4679
|
const where = whereOperatorAsPredicate(expr.where.condition);
|
|
5048
4680
|
const filterWhere = (elements) => {
|
|
5049
|
-
return n$
|
|
4681
|
+
return n$e(elements, where);
|
|
5050
4682
|
};
|
|
5051
4683
|
return processElementPredicate(expr.where.expr, op, { ...ctx, where, filterWhere });
|
|
5052
4684
|
}
|
|
@@ -5078,13 +4710,13 @@ function processRelationtPredicate(expr, op, ctx) {
|
|
|
5078
4710
|
case ModelRelationExpr.isWhere(expr): {
|
|
5079
4711
|
const where = whereOperatorAsPredicate(expr.where.condition);
|
|
5080
4712
|
const filterRelations = (relations) => {
|
|
5081
|
-
return new Set(n$
|
|
4713
|
+
return new Set(n$e([...relations], where));
|
|
5082
4714
|
};
|
|
5083
4715
|
const filterWhere = (connections) => {
|
|
5084
|
-
return t$
|
|
4716
|
+
return t$e(
|
|
5085
4717
|
connections,
|
|
5086
|
-
t$
|
|
5087
|
-
n$
|
|
4718
|
+
t$f((c) => new ConnectionModel(c.source, c.target, filterRelations(c.relations))),
|
|
4719
|
+
n$e((c) => c.nonEmpty())
|
|
5088
4720
|
);
|
|
5089
4721
|
};
|
|
5090
4722
|
return processRelationtPredicate(expr.where.expr, op, {
|
|
@@ -5190,7 +4822,7 @@ function computeElementView(likec4model, {
|
|
|
5190
4822
|
sorted.nodes
|
|
5191
4823
|
)
|
|
5192
4824
|
);
|
|
5193
|
-
const autoLayoutRule = t$
|
|
4825
|
+
const autoLayoutRule = t$9(rules, isViewRuleAutoLayout);
|
|
5194
4826
|
const nodeNotations = buildElementNotations(nodes);
|
|
5195
4827
|
return calcViewLayoutHash({
|
|
5196
4828
|
...view,
|
|
@@ -5201,7 +4833,7 @@ function computeElementView(likec4model, {
|
|
|
5201
4833
|
...autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }
|
|
5202
4834
|
},
|
|
5203
4835
|
edges: applyCustomRelationProperties(rules, nodes, sorted.edges),
|
|
5204
|
-
nodes: t$
|
|
4836
|
+
nodes: t$f(nodes, (n) => {
|
|
5205
4837
|
if (n.icon === "none") {
|
|
5206
4838
|
delete n.icon;
|
|
5207
4839
|
}
|
|
@@ -5242,9 +4874,9 @@ function assignElementsToGroups(memory) {
|
|
|
5242
4874
|
}
|
|
5243
4875
|
return false;
|
|
5244
4876
|
};
|
|
5245
|
-
t$
|
|
4877
|
+
t$e(
|
|
5246
4878
|
sortParentsFirst([...memory.explicitFirstSeenIn.keys()]),
|
|
5247
|
-
t$
|
|
4879
|
+
t$8((el) => {
|
|
5248
4880
|
if (!isAncestorAssigned(el)) {
|
|
5249
4881
|
const groupId = nonNullable(memory.explicitFirstSeenIn.get(el));
|
|
5250
4882
|
assignedTo.set(el, groupId);
|
|
@@ -5252,10 +4884,10 @@ function assignElementsToGroups(memory) {
|
|
|
5252
4884
|
}
|
|
5253
4885
|
})
|
|
5254
4886
|
);
|
|
5255
|
-
t$
|
|
4887
|
+
t$e(
|
|
5256
4888
|
sortParentsFirst([...memory.lastSeenIn.keys()]),
|
|
5257
|
-
n$
|
|
5258
|
-
t$
|
|
4889
|
+
n$e((el) => !assignedTo.has(el)),
|
|
4890
|
+
t$8((el) => {
|
|
5259
4891
|
if (isAncestorAssigned(el)) {
|
|
5260
4892
|
return;
|
|
5261
4893
|
}
|
|
@@ -5308,15 +4940,20 @@ function computeView(viewsource, likec4model) {
|
|
|
5308
4940
|
}
|
|
5309
4941
|
function computeParsedModelData(parsed) {
|
|
5310
4942
|
const likec4model = LikeC4Model.create(parsed);
|
|
5311
|
-
|
|
4943
|
+
let {
|
|
4944
|
+
views: _views,
|
|
4945
|
+
_stage: __omitted,
|
|
4946
|
+
...rest
|
|
4947
|
+
} = parsed;
|
|
4948
|
+
const views = t$q(_views, (v) => unsafeComputeView(v, likec4model));
|
|
5312
4949
|
return {
|
|
5313
|
-
...parsed,
|
|
5314
4950
|
[_stage]: "computed",
|
|
5315
|
-
|
|
4951
|
+
...rest,
|
|
4952
|
+
views
|
|
5316
4953
|
};
|
|
5317
4954
|
}
|
|
5318
4955
|
function computeLikeC4Model(parsed) {
|
|
5319
4956
|
return LikeC4Model.create(computeParsedModelData(parsed));
|
|
5320
4957
|
}
|
|
5321
4958
|
|
|
5322
|
-
export { t$7 as a,
|
|
4959
|
+
export { t$7 as a, computeParsedModelData as b, computeLikeC4Model as c, computeView as d, n$7 as n, topologicalSortExports as t, unsafeComputeView as u, willCreateCycle as w };
|