@likec4/core 1.44.0 → 1.45.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 +14 -13
- package/dist/builder/index.mjs +29 -14
- package/dist/compute-view/index.d.mts +6 -6
- package/dist/compute-view/index.mjs +6 -5
- package/dist/compute-view/relationships-view/index.d.mts +6 -6
- package/dist/compute-view/relationships-view/index.mjs +2 -2
- package/dist/index.d.mts +25 -5
- package/dist/index.mjs +2 -1
- package/dist/model/connection/deployment/index.d.mts +8 -8
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +9 -9
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +8 -8
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +11 -25
- package/dist/model/index.mjs +4 -4
- package/dist/shared/{core.BnOetIAR.d.mts → core.0zAQeenX.d.mts} +2 -2
- package/dist/shared/{core.Bv3cd-jC.mjs → core.3ZhnKAlZ.mjs} +9 -5
- package/dist/shared/{core.CDOKQTW6.d.mts → core.B73yxfPi.d.mts} +2 -2
- package/dist/shared/{core.DTJYgLXI.d.mts → core.BGFjN3nv.d.mts} +3 -3
- package/dist/shared/core.BhNcrwzK.mjs +7 -0
- package/dist/shared/core.BkVA6gjl.mjs +5 -0
- package/dist/shared/{core.bKIs4oDO.mjs → core.CQPEY2wQ.mjs} +5 -4
- package/dist/shared/{core.h4TqqSC0.mjs → core.CRI1AjFj.mjs} +67 -1172
- package/dist/shared/{core.23WeDKcI.mjs → core.CWwSgOzF.mjs} +224 -224
- package/dist/shared/{core.6VsRBhGY.mjs → core.CdNCAwq7.mjs} +1 -1
- package/dist/shared/{core.BnDbAOR2.d.mts → core.Cog93roC.d.mts} +2 -2
- package/dist/shared/core.Coi_LOUZ.mjs +7 -0
- package/dist/shared/{core.DjAM-S6a.d.mts → core.CpURdWRM.d.mts} +14 -13
- package/dist/shared/{core.DFCHU59b.mjs → core.DViDmiAu.mjs} +2 -2
- package/dist/shared/{core.CHwVhuc9.mjs → core.D_f4F48-.mjs} +10 -13
- package/dist/shared/{core.CbsSAn1j.mjs → core.DbfO90vF.mjs} +1 -12
- package/dist/shared/{core.CKNmSm2W.d.mts → core.DnCLhN8C.d.mts} +7 -14
- package/dist/shared/{core.C0Ye2OCr.mjs → core.DqlrMlsf.mjs} +1 -1
- package/dist/shared/{core.8mmHFn9g.d.mts → core.Dvh1H0T2.d.mts} +2 -2
- package/dist/shared/{core.BMtVqKl7.d.mts → core.mUnpvHtA.d.mts} +11 -5
- package/dist/shared/core.oSV6SRfk.mjs +13 -0
- package/dist/shared/{core.WwMWeiFL.d.mts → core.t3qfsVvn.d.mts} +3 -3
- package/dist/shared/core.vzLtp8i3.mjs +1282 -0
- package/dist/styles/index.d.mts +5 -5
- package/dist/styles/index.mjs +3 -3
- package/dist/types/_aux.d.mts +1 -1
- package/dist/types/expression-model.d.mts +2 -2
- package/dist/types/expression.d.mts +2 -2
- package/dist/types/fqnRef.d.mts +1 -1
- package/dist/types/index.d.mts +7 -7
- package/dist/types/index.mjs +23 -9
- package/dist/utils/index.mjs +5 -4
- package/package.json +8 -8
- package/dist/shared/core.B9BjmjuH.mjs +0 -9
- package/dist/shared/core.OHD4KXm9.mjs +0 -5
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as t$
|
|
3
|
-
import { t as t$
|
|
4
|
-
import {
|
|
1
|
+
import { n as n$d, b as t$i, d as t$k, e as t$l, f as t$n, g as buildElementNotations, t as t$q } from './core.vzLtp8i3.mjs';
|
|
2
|
+
import { t as t$a, a as t$b } from './core.BsSXS-_R.mjs';
|
|
3
|
+
import { t as t$e } from './core.CbT8JVYL.mjs';
|
|
4
|
+
import { a as t$c, t as t$j, i as isElementModel, b as isNestedElementOfDeployedInstanceModel, c as isDeployedInstanceModel, d as isDeploymentNodeModel, e as isDeploymentElementModel, L as LikeC4Model } from './core.CRI1AjFj.mjs';
|
|
5
|
+
import { c as commonHead, t as t$f, o as objectHash, b as t$m, a as compareRelations, S as Stack } from './core.DViDmiAu.mjs';
|
|
5
6
|
import { a as nonNullable, i as invariant, n as nonexhaustive } from './core.D4npX2q8.mjs';
|
|
6
7
|
import { G as Graph } from './core.DrUt0Lbi.mjs';
|
|
7
8
|
import { r as requireIterables, e as exact, t as t$o } from './core.M9ayqQZa.mjs';
|
|
8
9
|
import { r as requireIterator } from './core.BdPcbSkN.mjs';
|
|
9
10
|
import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
|
|
10
|
-
import { n as n$
|
|
11
|
+
import { n as n$c, t as t$d } from './core.3ZhnKAlZ.mjs';
|
|
11
12
|
import { e as e$4 } from './core.BKlholso.mjs';
|
|
12
13
|
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.
|
|
14
|
-
import { d as difference, i as intersection, u as union, h as hasIntersection } from './core.
|
|
15
|
-
import { e as e$8 } from './core.
|
|
16
|
-
import {
|
|
17
|
-
import { w as whereOperatorAsPredicate, m as isViewRuleStyle, v as t$
|
|
14
|
+
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.CdNCAwq7.mjs';
|
|
15
|
+
import { d as difference, i as intersection, u as union, h as hasIntersection } from './core.DbfO90vF.mjs';
|
|
16
|
+
import { e as e$8 } from './core.Coi_LOUZ.mjs';
|
|
17
|
+
import { n as n$e } from './core.BhNcrwzK.mjs';
|
|
18
|
+
import { w as whereOperatorAsPredicate, m as isViewRuleStyle, v as t$g, 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
19
|
import { e as e$6, a as iunique, i as iflat } from './core.C4x8aaWa.mjs';
|
|
20
|
+
import { e as e$5, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.D_f4F48-.mjs';
|
|
19
21
|
import { e as e$7 } from './core.BoYfZOBm.mjs';
|
|
20
22
|
import { ModelFqnExpr, ModelRelationExpr, ModelExpression } from '../types/expression-model.mjs';
|
|
21
23
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
22
24
|
import { preferSummary } from '../types/_aux.mjs';
|
|
23
|
-
import { a as t$
|
|
25
|
+
import { a as t$h } from './core.DEieYfbG.mjs';
|
|
24
26
|
import { FqnExpr, RelationExpr } from '../types/expression.mjs';
|
|
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.
|
|
27
|
+
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.CQPEY2wQ.mjs';
|
|
26
28
|
import { t as toSet, a as toArray, i as imap } from './core.C3JowhaZ.mjs';
|
|
27
29
|
import { D as DefaultMap } from './core.BbE4y-yl.mjs';
|
|
28
30
|
import { i as ifilter } from './core.DRJma0Ol.mjs';
|
|
29
|
-
import { C as Connection, c as customInspectSymbol } from './core.
|
|
31
|
+
import { C as Connection, c as customInspectSymbol } from './core.DqlrMlsf.mjs';
|
|
30
32
|
import { i as isome } from './core.FZ305VYd.mjs';
|
|
31
33
|
import { i as isIterable, e as e$9 } from './core.RfnaEmgA.mjs';
|
|
32
34
|
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';
|
|
@@ -34,35 +36,33 @@ import { t as t$p } from './core.q10OP9oJ.mjs';
|
|
|
34
36
|
|
|
35
37
|
function e$3(e){return ()=>e}
|
|
36
38
|
|
|
37
|
-
function t$
|
|
39
|
+
function t$9(...t){return t$a(n$b,t)}function n$b(e,t){for(let[n,r]of e.entries())if(!t(r,n,e))return e.slice(n);return []}
|
|
38
40
|
|
|
39
41
|
const e$2=e=>Object.assign(e,{single:true});
|
|
40
42
|
|
|
41
|
-
function t$
|
|
43
|
+
function t$8(...t){return t$a(n$a,t)}const n$a=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}};
|
|
42
44
|
|
|
43
|
-
function n$
|
|
45
|
+
function n$9(...n){return t$a(r$3,n,e$2(i$1))}const r$3=([e])=>e,i$1=()=>a,a=e=>({hasNext:true,next:e,done:true});
|
|
44
46
|
|
|
45
|
-
function t$
|
|
47
|
+
function t$7(...t){return t$a(n$8,t,r$2)}function n$8(e,t){return e.forEach(t),e}const r$2=e=>(t,n,r)=>(e(t,n,r),{done:false,hasNext:true,next:t});
|
|
46
48
|
|
|
47
49
|
function e$1(e){return typeof e==`boolean`}
|
|
48
50
|
|
|
49
|
-
function t$
|
|
51
|
+
function t$6(...t){return t$a(n$7,t)}function n$7(e,t){let n={};for(let[r,i]of e.entries()){let[a,o]=t(i,r,e);n[a]=o;}return n}
|
|
50
52
|
|
|
51
|
-
function n$
|
|
53
|
+
function n$6(...t){return t$a(r$1,t)}function r$1(e,n){if(!t$b(n,1))return {...e};if(!t$b(n,2)){let{[n[0]]:t,...r}=e;return r}let r={...e};for(let e of n)delete r[e];return r}
|
|
52
54
|
|
|
53
|
-
function t$
|
|
55
|
+
function t$5(...t){return t$a(n$5,t)}const n$5=e=>e.length===1?e[0]:void 0;
|
|
54
56
|
|
|
55
|
-
function t$
|
|
57
|
+
function t$4(...t){return t$a(n$4,t)}const n$4=(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};
|
|
56
58
|
|
|
57
|
-
function t$
|
|
59
|
+
function t$3(...t){return t$a(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}
|
|
58
60
|
|
|
59
|
-
function t$
|
|
61
|
+
function t$2(...t){return t$a(n$2,t)}const n$2=(e,t,n)=>e.reduce(t,n);
|
|
60
62
|
|
|
61
|
-
function t$
|
|
63
|
+
function t$1(...t){return t$a(n$1,t)}function n$1(e){return [...e].reverse()}
|
|
62
64
|
|
|
63
|
-
function
|
|
64
|
-
|
|
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})}
|
|
65
|
+
function n(...t){return t$a(r,t,i)}const r=(e,t)=>t<0?[]:e.slice(0,t);function i(e){if(e<=0)return n$c;let n=e;return e=>(--n,{done:n<=0,hasNext:true,next:e})}
|
|
66
66
|
|
|
67
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);
|
|
68
68
|
|
|
@@ -88,7 +88,7 @@ function linkNodesWithEdges(nodesMap, edges) {
|
|
|
88
88
|
const sourceAncestors = ancestorsOfNode(source, nodesMap);
|
|
89
89
|
const targetAncestors = ancestorsOfNode(target, nodesMap);
|
|
90
90
|
const hasAncestors = sourceAncestors.length > 0 && targetAncestors.length > 0;
|
|
91
|
-
const edgeParent = hasAncestors ? t$
|
|
91
|
+
const edgeParent = hasAncestors ? t$c(
|
|
92
92
|
commonHead(
|
|
93
93
|
t$1(sourceAncestors),
|
|
94
94
|
t$1(targetAncestors)
|
|
@@ -793,9 +793,9 @@ function topologicalSort(param) {
|
|
|
793
793
|
allowSelfLoops: true,
|
|
794
794
|
type: "directed"
|
|
795
795
|
});
|
|
796
|
-
const enrichedEdges = t$
|
|
796
|
+
const enrichedEdges = t$d(
|
|
797
797
|
edges,
|
|
798
|
-
t$
|
|
798
|
+
t$e((edge) => {
|
|
799
799
|
const source = getNode(edge.source), target = getNode(edge.target), parent = edge.parent ? getNode(edge.parent) : null;
|
|
800
800
|
return {
|
|
801
801
|
id: edge.id,
|
|
@@ -806,7 +806,7 @@ function topologicalSort(param) {
|
|
|
806
806
|
};
|
|
807
807
|
})
|
|
808
808
|
);
|
|
809
|
-
const [edgesBetweenLeafs, edgesWithCompounds] = t$
|
|
809
|
+
const [edgesBetweenLeafs, edgesWithCompounds] = t$4(
|
|
810
810
|
enrichedEdges,
|
|
811
811
|
({ source, target }) => source.children.length === 0 && target.children.length === 0
|
|
812
812
|
);
|
|
@@ -822,10 +822,10 @@ function topologicalSort(param) {
|
|
|
822
822
|
for (const { edge, source, target } of edgesBetweenLeafs) {
|
|
823
823
|
addEdgeToGraph(edge);
|
|
824
824
|
if (target.parent && target.parent !== edge.parent) {
|
|
825
|
-
t$
|
|
825
|
+
t$d(
|
|
826
826
|
ancestorsOfNode(target, param.nodes),
|
|
827
|
-
t$
|
|
828
|
-
t$
|
|
827
|
+
t$f((ancestor) => ancestor.inEdges.includes(edge.id)),
|
|
828
|
+
t$7((ancestor) => {
|
|
829
829
|
g.mergeNode(ancestor.id);
|
|
830
830
|
if (!willCreateCycle(g, edge.source, ancestor.id)) {
|
|
831
831
|
g.mergeDirectedEdge(edge.source, ancestor.id);
|
|
@@ -888,9 +888,9 @@ function calcViewLayoutHash(view) {
|
|
|
888
888
|
id: view.id,
|
|
889
889
|
__: view._type ?? "element",
|
|
890
890
|
autoLayout: view.autoLayout,
|
|
891
|
-
nodes: t$
|
|
891
|
+
nodes: t$d(
|
|
892
892
|
view.nodes,
|
|
893
|
-
t$
|
|
893
|
+
t$e((n) => ({
|
|
894
894
|
id: n.id,
|
|
895
895
|
icon: e$4(n.icon) && n.icon !== "none" ? "Y" : "N",
|
|
896
896
|
title: n.title,
|
|
@@ -902,11 +902,11 @@ function calcViewLayoutHash(view) {
|
|
|
902
902
|
padding: n.style.padding ?? null,
|
|
903
903
|
children: n.children
|
|
904
904
|
})),
|
|
905
|
-
t$
|
|
905
|
+
t$6(({ id, ...node }) => [id, node])
|
|
906
906
|
),
|
|
907
|
-
edges: t$
|
|
907
|
+
edges: t$d(
|
|
908
908
|
view.edges,
|
|
909
|
-
t$
|
|
909
|
+
t$e((e) => ({
|
|
910
910
|
source: e.source,
|
|
911
911
|
target: e.target,
|
|
912
912
|
label: e.label,
|
|
@@ -917,7 +917,7 @@ function calcViewLayoutHash(view) {
|
|
|
917
917
|
tail: e.tail,
|
|
918
918
|
line: e.line
|
|
919
919
|
})),
|
|
920
|
-
t$
|
|
920
|
+
t$6(({ source, target, ...edge }) => [`${source}:${target}`, edge])
|
|
921
921
|
)
|
|
922
922
|
};
|
|
923
923
|
view.hash = objectHash(tohash);
|
|
@@ -1035,7 +1035,7 @@ class AbstractStageExclude {
|
|
|
1035
1035
|
disconnected,
|
|
1036
1036
|
state.elements
|
|
1037
1037
|
);
|
|
1038
|
-
disconnected = t$
|
|
1038
|
+
disconnected = t$d(
|
|
1039
1039
|
disconnected,
|
|
1040
1040
|
ifilter((el) => {
|
|
1041
1041
|
return state.explicits.has(el) && !isome(state.final, isDescendantOf(el));
|
|
@@ -1243,7 +1243,7 @@ class AbstractStageInclude {
|
|
|
1243
1243
|
let state = this.precommit(this.memory.mutableState());
|
|
1244
1244
|
let fromConnections = /* @__PURE__ */ new Set();
|
|
1245
1245
|
if (this._connections.length > 0) {
|
|
1246
|
-
const [fromKnown, rest] = t$
|
|
1246
|
+
const [fromKnown, rest] = t$4(
|
|
1247
1247
|
this._connections,
|
|
1248
1248
|
(c) => state.final.has(c.source)
|
|
1249
1249
|
);
|
|
@@ -1356,11 +1356,11 @@ function elementExprToPredicate(target) {
|
|
|
1356
1356
|
function applyViewRuleStyle(rule, predicates, nodes) {
|
|
1357
1357
|
const { shape, color, icon, ...rest } = rule.style;
|
|
1358
1358
|
const nonEmptyStyle = !e$5(rest);
|
|
1359
|
-
t$
|
|
1359
|
+
t$d(
|
|
1360
1360
|
nodes,
|
|
1361
|
-
n$
|
|
1362
|
-
n$
|
|
1363
|
-
t$
|
|
1361
|
+
n$d(e$7(isGroupElementKind)),
|
|
1362
|
+
n$d(t$g(predicates)),
|
|
1363
|
+
t$7((n) => {
|
|
1364
1364
|
n.shape = shape ?? n.shape;
|
|
1365
1365
|
n.color = color ?? n.color;
|
|
1366
1366
|
if (e$6(icon)) {
|
|
@@ -1405,7 +1405,7 @@ function elementModelToNodeSource(el) {
|
|
|
1405
1405
|
id,
|
|
1406
1406
|
title,
|
|
1407
1407
|
...rest
|
|
1408
|
-
} = n$
|
|
1408
|
+
} = n$6(el.$element, ["summary", "description", "metadata", "style", "tags"]);
|
|
1409
1409
|
const { color, icon, shape, ...style } = el.style;
|
|
1410
1410
|
return exact({
|
|
1411
1411
|
id,
|
|
@@ -1527,14 +1527,14 @@ function pickRelationshipProps(relation) {
|
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
1529
|
function mergePropsFromRelationships(relations, prefer) {
|
|
1530
|
-
const allprops = t$
|
|
1530
|
+
const allprops = t$d(
|
|
1531
1531
|
relations,
|
|
1532
1532
|
t$2(
|
|
1533
1533
|
(acc, r) => {
|
|
1534
1534
|
if (e$4(r.title) && !acc.title.includes(r.title)) {
|
|
1535
1535
|
acc.title.push(r.title);
|
|
1536
1536
|
}
|
|
1537
|
-
if (e$4(r.description) && !acc.description.some(t$
|
|
1537
|
+
if (e$4(r.description) && !acc.description.some(t$h(r.description))) {
|
|
1538
1538
|
acc.description.push(r.description);
|
|
1539
1539
|
}
|
|
1540
1540
|
if (e$4(r.technology) && !acc.technology.includes(r.technology)) {
|
|
@@ -1577,20 +1577,20 @@ function mergePropsFromRelationships(relations, prefer) {
|
|
|
1577
1577
|
}
|
|
1578
1578
|
)
|
|
1579
1579
|
);
|
|
1580
|
-
let technology = t$
|
|
1581
|
-
let title = t$
|
|
1582
|
-
const tags = n$
|
|
1580
|
+
let technology = t$5(allprops.technology);
|
|
1581
|
+
let title = t$5(allprops.title) ?? (allprops.title.length > 1 ? "[...]" : null);
|
|
1582
|
+
const tags = n$e(allprops.tags);
|
|
1583
1583
|
let merged = exact({
|
|
1584
1584
|
// If there is no title, but there is technology, use technology as title
|
|
1585
1585
|
title: title ?? (technology ? `[${technology}]` : null),
|
|
1586
|
-
description: t$
|
|
1586
|
+
description: t$5(allprops.description),
|
|
1587
1587
|
technology,
|
|
1588
|
-
kind: t$
|
|
1589
|
-
head: t$
|
|
1590
|
-
tail: t$
|
|
1591
|
-
color: t$
|
|
1592
|
-
line: t$
|
|
1593
|
-
navigateTo: t$
|
|
1588
|
+
kind: t$5(allprops.kind),
|
|
1589
|
+
head: t$5(allprops.head),
|
|
1590
|
+
tail: t$5(allprops.tail),
|
|
1591
|
+
color: t$5(allprops.color),
|
|
1592
|
+
line: t$5(allprops.line),
|
|
1593
|
+
navigateTo: t$5(allprops.navigateTo),
|
|
1594
1594
|
...isNonEmptyArray(tags) && { tags }
|
|
1595
1595
|
});
|
|
1596
1596
|
if (prefer) {
|
|
@@ -1721,7 +1721,7 @@ function toNodeSource(el) {
|
|
|
1721
1721
|
let tags = [...el.tags];
|
|
1722
1722
|
summary ??= description2;
|
|
1723
1723
|
if (onlyOneInstance) {
|
|
1724
|
-
tags = n$
|
|
1724
|
+
tags = n$e([...tags, ...onlyOneInstance.tags]);
|
|
1725
1725
|
if (title === nameFromFqn(el.id)) {
|
|
1726
1726
|
title = onlyOneInstance.title;
|
|
1727
1727
|
}
|
|
@@ -1743,7 +1743,7 @@ function toNodeSource(el) {
|
|
|
1743
1743
|
icon: icon2,
|
|
1744
1744
|
description: summary,
|
|
1745
1745
|
tags,
|
|
1746
|
-
style: n$
|
|
1746
|
+
style: n$6(el.style, ["icon", "shape", "color"])
|
|
1747
1747
|
});
|
|
1748
1748
|
}
|
|
1749
1749
|
invariant(el.isInstance(), "Expected Instance");
|
|
@@ -1764,7 +1764,7 @@ function toNodeSource(el) {
|
|
|
1764
1764
|
description,
|
|
1765
1765
|
technology,
|
|
1766
1766
|
tags: [...el.tags],
|
|
1767
|
-
links: t$
|
|
1767
|
+
links: t$b(links, 1) ? links : void 0,
|
|
1768
1768
|
icon,
|
|
1769
1769
|
color,
|
|
1770
1770
|
shape,
|
|
@@ -1780,7 +1780,7 @@ function toComputedEdges$1(connections) {
|
|
|
1780
1780
|
...e.relations.model,
|
|
1781
1781
|
...e.relations.deployment
|
|
1782
1782
|
];
|
|
1783
|
-
invariant(t$
|
|
1783
|
+
invariant(t$b(relations, 1), "Edge must have at least one relation");
|
|
1784
1784
|
const defaults = e.source.$model.$styles.defaults;
|
|
1785
1785
|
const source = e.source.id;
|
|
1786
1786
|
const target = e.target.id;
|
|
@@ -1844,28 +1844,28 @@ function findCrossBoundarySameSourceOrTarget(connections) {
|
|
|
1844
1844
|
}
|
|
1845
1845
|
const excludedRelations = new DefaultMap(() => /* @__PURE__ */ new Set());
|
|
1846
1846
|
for (const [relation, sameRelationGroup] of groupedByRelation) {
|
|
1847
|
-
if (!t$
|
|
1847
|
+
if (!t$b(sameRelationGroup, 2)) {
|
|
1848
1848
|
continue;
|
|
1849
1849
|
}
|
|
1850
|
-
t$
|
|
1850
|
+
t$d(
|
|
1851
1851
|
sameRelationGroup,
|
|
1852
|
-
t$
|
|
1852
|
+
t$l((conn) => [
|
|
1853
1853
|
{ group: `$source-${conn.source.id}`, conn },
|
|
1854
1854
|
{ group: `$target-${conn.target.id}`, conn }
|
|
1855
1855
|
]),
|
|
1856
|
-
t$
|
|
1857
|
-
t$
|
|
1858
|
-
n$
|
|
1859
|
-
t$
|
|
1856
|
+
t$k(e$8("group")),
|
|
1857
|
+
t$j(),
|
|
1858
|
+
n$d(t$b(2)),
|
|
1859
|
+
t$7(
|
|
1860
1860
|
// In each group, sort by hierarchy, first are deepest
|
|
1861
|
-
t$
|
|
1862
|
-
t$
|
|
1861
|
+
t$i(
|
|
1862
|
+
t$e(e$8("conn")),
|
|
1863
1863
|
sortConnectionsByBoundaryHierarchy("desc"),
|
|
1864
1864
|
// Drop first, as it is the deepest
|
|
1865
1865
|
// Drop if boundary is same as previous
|
|
1866
|
-
t$
|
|
1866
|
+
t$9((conn, i, all) => i === 0 || conn.boundary === all[i - 1].boundary),
|
|
1867
1867
|
// Drop relations from boundaries above
|
|
1868
|
-
t$
|
|
1868
|
+
t$7((conn) => {
|
|
1869
1869
|
excludedRelations.get(conn).add(relation);
|
|
1870
1870
|
})
|
|
1871
1871
|
)
|
|
@@ -1910,7 +1910,7 @@ function findCrossBoundaryConnections(connections) {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
|
-
return t$
|
|
1913
|
+
return t$d(
|
|
1914
1914
|
excludedRelations.entries(),
|
|
1915
1915
|
imap(
|
|
1916
1916
|
([c, excluded]) => c.update({
|
|
@@ -1928,7 +1928,7 @@ function cleanCrossBoundary(connections) {
|
|
|
1928
1928
|
);
|
|
1929
1929
|
}
|
|
1930
1930
|
function findRedundantConnections$1(connections) {
|
|
1931
|
-
return t$
|
|
1931
|
+
return t$d(
|
|
1932
1932
|
connections,
|
|
1933
1933
|
mergeConnections,
|
|
1934
1934
|
t$2((redundants, connection) => {
|
|
@@ -2010,25 +2010,25 @@ let StageInclude$1 = class StageInclude extends AbstractStageInclude {
|
|
|
2010
2010
|
return hasChanged();
|
|
2011
2011
|
}
|
|
2012
2012
|
processConnections(connections) {
|
|
2013
|
-
const clean = t$
|
|
2013
|
+
const clean = t$d(
|
|
2014
2014
|
connections,
|
|
2015
2015
|
cleanCrossBoundary,
|
|
2016
2016
|
cleanRedundantRelationships
|
|
2017
2017
|
);
|
|
2018
|
-
t$
|
|
2018
|
+
t$d(
|
|
2019
2019
|
clean,
|
|
2020
2020
|
// Process only connection from this stage
|
|
2021
2021
|
// filter(c => this._connections.some(c2 => c2.id === c.id)),
|
|
2022
|
-
t$
|
|
2023
|
-
t$
|
|
2024
|
-
t$
|
|
2022
|
+
t$7(({ source, target, boundary }) => {
|
|
2023
|
+
t$d(
|
|
2024
|
+
t$m(
|
|
2025
2025
|
[...toArray(source.ancestors()).reverse(), source],
|
|
2026
2026
|
[...toArray(target.ancestors()).reverse(), target]
|
|
2027
2027
|
),
|
|
2028
2028
|
// Filter out common ancestors
|
|
2029
|
-
t$
|
|
2029
|
+
t$9(([sourceAncestor, targetAncestor]) => sourceAncestor === targetAncestor),
|
|
2030
2030
|
n(1),
|
|
2031
|
-
t$
|
|
2031
|
+
t$7(([sourceAncestor, targetAncestor]) => {
|
|
2032
2032
|
if (source === sourceAncestor && target === targetAncestor) {
|
|
2033
2033
|
this.addImplicit(boundary);
|
|
2034
2034
|
return;
|
|
@@ -2077,7 +2077,7 @@ let Memory$1 = class Memory extends AbstractMemory {
|
|
|
2077
2077
|
});
|
|
2078
2078
|
}
|
|
2079
2079
|
equals(other) {
|
|
2080
|
-
return other instanceof Memory && t$
|
|
2080
|
+
return other instanceof Memory && t$h(this.state, other.state);
|
|
2081
2081
|
}
|
|
2082
2082
|
diff(state) {
|
|
2083
2083
|
return {
|
|
@@ -2154,9 +2154,9 @@ const IncomingRelationPredicate = {
|
|
|
2154
2154
|
return stage;
|
|
2155
2155
|
}
|
|
2156
2156
|
const isIncoming = filterIncomingConnections(resolveElements$1(model, expr.incoming));
|
|
2157
|
-
const toExclude = t$
|
|
2157
|
+
const toExclude = t$d(
|
|
2158
2158
|
memory.connections,
|
|
2159
|
-
n$
|
|
2159
|
+
n$d(isIncoming),
|
|
2160
2160
|
applyPredicate(where)
|
|
2161
2161
|
);
|
|
2162
2162
|
stage.excludeConnections(toExclude);
|
|
@@ -2164,7 +2164,7 @@ const IncomingRelationPredicate = {
|
|
|
2164
2164
|
}
|
|
2165
2165
|
};
|
|
2166
2166
|
function filterIncomingConnections(targets) {
|
|
2167
|
-
return t$
|
|
2167
|
+
return t$g(
|
|
2168
2168
|
targets.map((target) => {
|
|
2169
2169
|
const satisfies = (el) => el === target || isAncestor(target, el);
|
|
2170
2170
|
return (connection) => {
|
|
@@ -2213,9 +2213,9 @@ const OutgoingRelationPredicate = {
|
|
|
2213
2213
|
return stage;
|
|
2214
2214
|
}
|
|
2215
2215
|
const isOutgoing = filterOutgoingConnections(resolveElements$1(model, expr.outgoing));
|
|
2216
|
-
const toExclude = t$
|
|
2216
|
+
const toExclude = t$d(
|
|
2217
2217
|
memory.connections,
|
|
2218
|
-
n$
|
|
2218
|
+
n$d(isOutgoing),
|
|
2219
2219
|
applyPredicate(where)
|
|
2220
2220
|
);
|
|
2221
2221
|
stage.excludeConnections(toExclude);
|
|
@@ -2223,7 +2223,7 @@ const OutgoingRelationPredicate = {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
};
|
|
2225
2225
|
function filterOutgoingConnections(sources) {
|
|
2226
|
-
return t$
|
|
2226
|
+
return t$g(
|
|
2227
2227
|
sources.map((source) => {
|
|
2228
2228
|
const satisfies = (el) => el === source || isAncestor(source, el);
|
|
2229
2229
|
return (connection) => {
|
|
@@ -2261,10 +2261,10 @@ const DirectRelationPredicate = {
|
|
|
2261
2261
|
switch (true) {
|
|
2262
2262
|
// * -> *
|
|
2263
2263
|
case (sourceIsWildcard && targetIsWildcard): {
|
|
2264
|
-
connections = t$
|
|
2264
|
+
connections = t$d(
|
|
2265
2265
|
findConnectionsWithin$1(model.instances()),
|
|
2266
2266
|
applyPredicate(where),
|
|
2267
|
-
t$
|
|
2267
|
+
t$e((c) => {
|
|
2268
2268
|
stage.addImplicit(c.boundary);
|
|
2269
2269
|
return c;
|
|
2270
2270
|
})
|
|
@@ -2280,13 +2280,13 @@ const DirectRelationPredicate = {
|
|
|
2280
2280
|
const isTarget = filterIncomingConnections(sources);
|
|
2281
2281
|
postFilter = (c) => isSource(c) !== isTarget(c);
|
|
2282
2282
|
}
|
|
2283
|
-
connections = t$
|
|
2283
|
+
connections = t$d(
|
|
2284
2284
|
sources,
|
|
2285
|
-
t$
|
|
2285
|
+
t$l((source2) => {
|
|
2286
2286
|
const targets = resolveAscendingSiblings(source2);
|
|
2287
2287
|
return findConnectionsBetween$2(source2, targets, dir);
|
|
2288
2288
|
}),
|
|
2289
|
-
n$
|
|
2289
|
+
n$d(postFilter),
|
|
2290
2290
|
applyPredicate(where)
|
|
2291
2291
|
);
|
|
2292
2292
|
break;
|
|
@@ -2300,13 +2300,13 @@ const DirectRelationPredicate = {
|
|
|
2300
2300
|
const isSource = filterOutgoingConnections(targets);
|
|
2301
2301
|
postFilter = (c) => isSource(c) !== isTarget(c);
|
|
2302
2302
|
}
|
|
2303
|
-
connections = t$
|
|
2303
|
+
connections = t$d(
|
|
2304
2304
|
targets,
|
|
2305
|
-
t$
|
|
2305
|
+
t$l((target2) => {
|
|
2306
2306
|
const sources = resolveAscendingSiblings(target2);
|
|
2307
2307
|
return [...sources].flatMap((source2) => findConnection$2(source2, target2, dir));
|
|
2308
2308
|
}),
|
|
2309
|
-
n$
|
|
2309
|
+
n$d(postFilter),
|
|
2310
2310
|
applyPredicate(where)
|
|
2311
2311
|
);
|
|
2312
2312
|
break;
|
|
@@ -2318,10 +2318,10 @@ const DirectRelationPredicate = {
|
|
|
2318
2318
|
const targets = resolveElements$1(model, target);
|
|
2319
2319
|
const isSource = filterOutgoingConnections(sources);
|
|
2320
2320
|
const isTarget = filterIncomingConnections(targets);
|
|
2321
|
-
connections = t$
|
|
2321
|
+
connections = t$d(
|
|
2322
2322
|
sources,
|
|
2323
|
-
t$
|
|
2324
|
-
n$
|
|
2323
|
+
t$l((s) => findConnectionsBetween$2(s, targets, dir)),
|
|
2324
|
+
n$d((c) => isSource(c) && isTarget(c)),
|
|
2325
2325
|
applyPredicate(where)
|
|
2326
2326
|
);
|
|
2327
2327
|
}
|
|
@@ -2380,9 +2380,9 @@ const DirectRelationPredicate = {
|
|
|
2380
2380
|
const satisfies = (connection) => {
|
|
2381
2381
|
return isSource(connection.source) && isTarget(connection.target) || expr.isBidirectional === true && isSource(connection.target) && isTarget(connection.source);
|
|
2382
2382
|
};
|
|
2383
|
-
const deploymentRelationsToExclude = t$
|
|
2383
|
+
const deploymentRelationsToExclude = t$d(
|
|
2384
2384
|
memory.connections,
|
|
2385
|
-
n$
|
|
2385
|
+
n$d(satisfies),
|
|
2386
2386
|
applyPredicate(where)
|
|
2387
2387
|
);
|
|
2388
2388
|
if (deploymentRelationsToExclude.length === 0) {
|
|
@@ -2449,9 +2449,9 @@ const InOutRelationPredicate$1 = {
|
|
|
2449
2449
|
const elements = resolveElements$1(model, expr.inout);
|
|
2450
2450
|
const isIncoming = filterIncomingConnections(elements);
|
|
2451
2451
|
const isOutgoing = filterOutgoingConnections(elements);
|
|
2452
|
-
const toExclude = t$
|
|
2452
|
+
const toExclude = t$d(
|
|
2453
2453
|
memory.connections,
|
|
2454
|
-
n$
|
|
2454
|
+
n$d((c) => isIncoming(c) !== isOutgoing(c)),
|
|
2455
2455
|
applyPredicate(where)
|
|
2456
2456
|
);
|
|
2457
2457
|
stage.excludeConnections(toExclude);
|
|
@@ -2473,10 +2473,10 @@ const WhereRelationPredicate = {
|
|
|
2473
2473
|
const WildcardPredicate$1 = {
|
|
2474
2474
|
include: ({ model, stage, where }) => {
|
|
2475
2475
|
const children = [];
|
|
2476
|
-
const rootElements = t$
|
|
2476
|
+
const rootElements = t$d(
|
|
2477
2477
|
[...model.roots()],
|
|
2478
2478
|
applyElementPredicate(where),
|
|
2479
|
-
t$
|
|
2479
|
+
t$e((root) => {
|
|
2480
2480
|
if (!root.onlyOneInstance()) {
|
|
2481
2481
|
children.push(...root.children());
|
|
2482
2482
|
}
|
|
@@ -2493,7 +2493,7 @@ const WildcardPredicate$1 = {
|
|
|
2493
2493
|
return stage;
|
|
2494
2494
|
},
|
|
2495
2495
|
exclude: ({ stage, memory, where }) => {
|
|
2496
|
-
const elementsToExclude = t$
|
|
2496
|
+
const elementsToExclude = t$d(
|
|
2497
2497
|
[...memory.elements],
|
|
2498
2498
|
applyElementPredicate(where)
|
|
2499
2499
|
);
|
|
@@ -2535,19 +2535,19 @@ function excludeModelRelations(relationsToExclude, { stage, memory }, where, fil
|
|
|
2535
2535
|
if (relationsToExclude.size === 0) {
|
|
2536
2536
|
return stage;
|
|
2537
2537
|
}
|
|
2538
|
-
const toExclude = t$
|
|
2538
|
+
const toExclude = t$d(
|
|
2539
2539
|
memory.connections,
|
|
2540
|
-
n$
|
|
2540
|
+
n$d((c) => filterConnections(c)),
|
|
2541
2541
|
// Find connections that have at least one relation in common with the excluded relations
|
|
2542
|
-
n$
|
|
2543
|
-
t$
|
|
2542
|
+
n$d((c) => hasIntersection(c.relations.model, relationsToExclude)),
|
|
2543
|
+
t$e(
|
|
2544
2544
|
(c) => c.update({
|
|
2545
2545
|
deployment: null,
|
|
2546
2546
|
model: intersection(c.relations.model, relationsToExclude)
|
|
2547
2547
|
})
|
|
2548
2548
|
),
|
|
2549
2549
|
applyPredicate(where),
|
|
2550
|
-
n$
|
|
2550
|
+
n$d((c) => c.nonEmpty())
|
|
2551
2551
|
);
|
|
2552
2552
|
if (toExclude.length === 0) {
|
|
2553
2553
|
return stage;
|
|
@@ -2587,9 +2587,9 @@ function matchConnections(connections, where) {
|
|
|
2587
2587
|
if (!where) {
|
|
2588
2588
|
return connections;
|
|
2589
2589
|
}
|
|
2590
|
-
return t$
|
|
2590
|
+
return t$d(
|
|
2591
2591
|
connections,
|
|
2592
|
-
n$
|
|
2592
|
+
n$d((c) => matchConnection(c, where))
|
|
2593
2593
|
);
|
|
2594
2594
|
}
|
|
2595
2595
|
function toFilterable(relationEndpoint, connectionEndpoint) {
|
|
@@ -2601,7 +2601,7 @@ function toFilterable(relationEndpoint, connectionEndpoint) {
|
|
|
2601
2601
|
};
|
|
2602
2602
|
}
|
|
2603
2603
|
if (isNestedElementOfDeployedInstanceModel(relationEndpoint)) {
|
|
2604
|
-
return t$
|
|
2604
|
+
return t$n(relationEndpoint.element, ["tags", "kind"]);
|
|
2605
2605
|
}
|
|
2606
2606
|
if (isDeployedInstanceModel(relationEndpoint)) {
|
|
2607
2607
|
return {
|
|
@@ -2610,7 +2610,7 @@ function toFilterable(relationEndpoint, connectionEndpoint) {
|
|
|
2610
2610
|
};
|
|
2611
2611
|
}
|
|
2612
2612
|
if (isDeploymentNodeModel(relationEndpoint)) {
|
|
2613
|
-
return t$
|
|
2613
|
+
return t$n(relationEndpoint, ["tags", "kind"]);
|
|
2614
2614
|
}
|
|
2615
2615
|
nonexhaustive(relationEndpoint);
|
|
2616
2616
|
}
|
|
@@ -2655,9 +2655,9 @@ const DeploymentRefPredicate = {
|
|
|
2655
2655
|
},
|
|
2656
2656
|
exclude: ({ expr, stage, memory, where }) => {
|
|
2657
2657
|
const exprPredicate = deploymentExpressionToPredicate(expr);
|
|
2658
|
-
const toExclude = t$
|
|
2658
|
+
const toExclude = t$d(
|
|
2659
2659
|
[...memory.elements],
|
|
2660
|
-
n$
|
|
2660
|
+
n$d(exprPredicate),
|
|
2661
2661
|
applyElementPredicate(where)
|
|
2662
2662
|
);
|
|
2663
2663
|
stage.exclude(toExclude);
|
|
@@ -2717,14 +2717,14 @@ function includeDeployedNodeDescendants(node, { stage, where }) {
|
|
|
2717
2717
|
}
|
|
2718
2718
|
stage.connectWithExisting(descendants, "out");
|
|
2719
2719
|
const allConnected = findConnectedElements(stage);
|
|
2720
|
-
t$
|
|
2720
|
+
t$d(
|
|
2721
2721
|
descendants,
|
|
2722
|
-
n$
|
|
2723
|
-
t$
|
|
2722
|
+
n$d((desc) => allConnected.has(desc)),
|
|
2723
|
+
t$7((desc) => stage.addExplicit(desc))
|
|
2724
2724
|
);
|
|
2725
2725
|
}
|
|
2726
2726
|
function findConnectedElements(stage) {
|
|
2727
|
-
return t$
|
|
2727
|
+
return t$d(
|
|
2728
2728
|
stage.mergedConnections(),
|
|
2729
2729
|
cleanCrossBoundary,
|
|
2730
2730
|
cleanRedundantRelationships,
|
|
@@ -2747,7 +2747,7 @@ let StageFinal$1 = class StageFinal {
|
|
|
2747
2747
|
if (memory.connections.length < 2) {
|
|
2748
2748
|
return memory;
|
|
2749
2749
|
}
|
|
2750
|
-
const connections = t$
|
|
2750
|
+
const connections = t$d(
|
|
2751
2751
|
memory.connections,
|
|
2752
2752
|
// Keep connections
|
|
2753
2753
|
// - between leafs
|
|
@@ -2799,12 +2799,12 @@ let StageFinal$1 = class StageFinal {
|
|
|
2799
2799
|
}
|
|
2800
2800
|
return false;
|
|
2801
2801
|
};
|
|
2802
|
-
t$
|
|
2802
|
+
t$d(
|
|
2803
2803
|
difference(implicits, snapshot),
|
|
2804
2804
|
ifilter((e) => e.isDeploymentNode()),
|
|
2805
2805
|
toArray(),
|
|
2806
2806
|
sortByFqnHierarchically,
|
|
2807
|
-
t$
|
|
2807
|
+
t$7((el) => {
|
|
2808
2808
|
const childrensToWrap = [...el.children()].filter(isFinalOrHasIncludedDescendant).length;
|
|
2809
2809
|
if (childrensToWrap >= 2) {
|
|
2810
2810
|
final.add(el);
|
|
@@ -2827,12 +2827,12 @@ let StageFinal$1 = class StageFinal {
|
|
|
2827
2827
|
const tree = treeFromMemoryState(memory, "final");
|
|
2828
2828
|
const stage = memory.stageExclude({});
|
|
2829
2829
|
const isRemovable = (el) => !(boundaries.has(el) || memory.explicits.has(el) || tree.hasInOut(el) || tree.root.has(el));
|
|
2830
|
-
const singleRoot = t$
|
|
2830
|
+
const singleRoot = t$5([...tree.root]);
|
|
2831
2831
|
if (singleRoot && !memory.explicits.has(singleRoot)) {
|
|
2832
2832
|
stage.exclude(singleRoot);
|
|
2833
2833
|
}
|
|
2834
2834
|
for (const el of memory.final) {
|
|
2835
|
-
const singleChild = t$
|
|
2835
|
+
const singleChild = t$5(tree.children(el));
|
|
2836
2836
|
if (singleChild && !tree.hasInOut(singleChild) && isRemovable(el)) {
|
|
2837
2837
|
stage.exclude(el);
|
|
2838
2838
|
}
|
|
@@ -2939,7 +2939,7 @@ function computeDeploymentView(likec4model, {
|
|
|
2939
2939
|
rules,
|
|
2940
2940
|
sorted.nodes
|
|
2941
2941
|
);
|
|
2942
|
-
const autoLayoutRule = t$
|
|
2942
|
+
const autoLayoutRule = t$8(rules, isViewRuleAutoLayout);
|
|
2943
2943
|
const elementNotations = buildElementNotations(nodes);
|
|
2944
2944
|
return calcViewLayoutHash({
|
|
2945
2945
|
...view,
|
|
@@ -2951,7 +2951,7 @@ function computeDeploymentView(likec4model, {
|
|
|
2951
2951
|
...autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }
|
|
2952
2952
|
},
|
|
2953
2953
|
edges: sorted.edges,
|
|
2954
|
-
nodes: t$
|
|
2954
|
+
nodes: t$e(nodes, (n) => {
|
|
2955
2955
|
if (n.icon === "none") {
|
|
2956
2956
|
delete n.icon;
|
|
2957
2957
|
}
|
|
@@ -3133,7 +3133,7 @@ function elementsFromSteps(model, steps) {
|
|
|
3133
3133
|
actors.push(target);
|
|
3134
3134
|
}
|
|
3135
3135
|
};
|
|
3136
|
-
for (const step of t$
|
|
3136
|
+
for (const step of t$l(steps, flattenSteps)) {
|
|
3137
3137
|
const source = model.element(step.source);
|
|
3138
3138
|
const target = model.element(step.target);
|
|
3139
3139
|
let sourceColumn = actors.indexOf(source);
|
|
@@ -3166,29 +3166,29 @@ function findRelations(source, target, currentViewId) {
|
|
|
3166
3166
|
line: relation2.$relationship.line
|
|
3167
3167
|
});
|
|
3168
3168
|
}
|
|
3169
|
-
const alltags = t$
|
|
3169
|
+
const alltags = t$d(
|
|
3170
3170
|
relationships,
|
|
3171
|
-
t$
|
|
3172
|
-
n$
|
|
3171
|
+
t$l((r) => r.tags),
|
|
3172
|
+
n$e()
|
|
3173
3173
|
);
|
|
3174
|
-
const tags = t$
|
|
3175
|
-
const relations = t$
|
|
3176
|
-
const relation = n$
|
|
3174
|
+
const tags = t$b(alltags, 1) ? alltags : void 0;
|
|
3175
|
+
const relations = t$e(relationships, (r) => r.id);
|
|
3176
|
+
const relation = n$9(relationships);
|
|
3177
3177
|
let navigateTo = relation.$relationship.navigateTo;
|
|
3178
3178
|
if (navigateTo === currentViewId) {
|
|
3179
3179
|
navigateTo = void 0;
|
|
3180
3180
|
}
|
|
3181
3181
|
if (!navigateTo) {
|
|
3182
|
-
navigateTo = t$
|
|
3182
|
+
navigateTo = t$d(
|
|
3183
3183
|
relationships,
|
|
3184
|
-
t$
|
|
3184
|
+
t$l(
|
|
3185
3185
|
(r) => r.$relationship.navigateTo && r.$relationship.navigateTo !== currentViewId ? r.$relationship.navigateTo : []
|
|
3186
3186
|
),
|
|
3187
|
-
n$
|
|
3188
|
-
t$
|
|
3187
|
+
n$e(),
|
|
3188
|
+
t$5()
|
|
3189
3189
|
);
|
|
3190
3190
|
}
|
|
3191
|
-
const commonProperties = t$
|
|
3191
|
+
const commonProperties = t$d(
|
|
3192
3192
|
relationships,
|
|
3193
3193
|
t$2((acc, { title, $relationship: r }) => {
|
|
3194
3194
|
e$4(title) && acc.title.add(title);
|
|
@@ -3207,10 +3207,10 @@ function findRelations(source, target, currentViewId) {
|
|
|
3207
3207
|
tags: tags ?? void 0,
|
|
3208
3208
|
relations,
|
|
3209
3209
|
navigateTo,
|
|
3210
|
-
kind: t$
|
|
3211
|
-
title: t$
|
|
3212
|
-
color: t$
|
|
3213
|
-
line: t$
|
|
3210
|
+
kind: t$5([...commonProperties.kind]),
|
|
3211
|
+
title: t$5([...commonProperties.title]),
|
|
3212
|
+
color: t$5([...commonProperties.color]),
|
|
3213
|
+
line: t$5([...commonProperties.line])
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
3216
|
|
|
@@ -3233,7 +3233,7 @@ class DynamicViewCompute {
|
|
|
3233
3233
|
const rules = resolveGlobalRulesInDynamicView(_rules, this.model.globals);
|
|
3234
3234
|
const explicits = elementsFromIncludeProperties(this.model, rules);
|
|
3235
3235
|
const fromSteps = elementsFromSteps(this.model, viewSteps);
|
|
3236
|
-
const actors = t$
|
|
3236
|
+
const actors = t$d(
|
|
3237
3237
|
union(
|
|
3238
3238
|
// First all actors, that are explicitly included
|
|
3239
3239
|
intersection(explicits, fromSteps),
|
|
@@ -3366,7 +3366,7 @@ class DynamicViewCompute {
|
|
|
3366
3366
|
actors.map((e) => nonNullable(nodesMap.get(e.id)))
|
|
3367
3367
|
)
|
|
3368
3368
|
);
|
|
3369
|
-
const autoLayoutRule = t$
|
|
3369
|
+
const autoLayoutRule = t$8(rules, isViewRuleAutoLayout);
|
|
3370
3370
|
const nodeNotations = buildElementNotations(nodes);
|
|
3371
3371
|
return calcViewLayoutHash({
|
|
3372
3372
|
...view,
|
|
@@ -3378,7 +3378,7 @@ class DynamicViewCompute {
|
|
|
3378
3378
|
...autoLayoutRule?.nodeSep && { nodeSep: autoLayoutRule.nodeSep },
|
|
3379
3379
|
...autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }
|
|
3380
3380
|
},
|
|
3381
|
-
nodes: t$
|
|
3381
|
+
nodes: t$e(nodes, (n) => {
|
|
3382
3382
|
if (n.icon === "none") {
|
|
3383
3383
|
delete n.icon;
|
|
3384
3384
|
}
|
|
@@ -3471,7 +3471,7 @@ function applyCustomRelationProperties(_rules, nodes, _edges) {
|
|
|
3471
3471
|
if (!source || !target) {
|
|
3472
3472
|
return;
|
|
3473
3473
|
}
|
|
3474
|
-
if (satisfies({ source, target, ...t$
|
|
3474
|
+
if (satisfies({ source, target, ...t$n(edge, ["kind", "tags"]) })) {
|
|
3475
3475
|
edges[i] = {
|
|
3476
3476
|
...edge,
|
|
3477
3477
|
...props,
|
|
@@ -3512,10 +3512,10 @@ class NodesGroup {
|
|
|
3512
3512
|
|
|
3513
3513
|
class StageExclude extends AbstractStageExclude {
|
|
3514
3514
|
excludeRelations(excluded) {
|
|
3515
|
-
t$
|
|
3515
|
+
t$d(
|
|
3516
3516
|
this.memory.connections,
|
|
3517
|
-
n$
|
|
3518
|
-
t$
|
|
3517
|
+
n$d((c) => hasIntersection(c.relations, excluded)),
|
|
3518
|
+
t$7((c) => {
|
|
3519
3519
|
this.excludeConnections(
|
|
3520
3520
|
c.update(intersection(c.relations, excluded))
|
|
3521
3521
|
);
|
|
@@ -3610,18 +3610,18 @@ class StageInclude extends AbstractStageInclude {
|
|
|
3610
3610
|
if (ModelExpression.isRelationExpr(this.expression)) {
|
|
3611
3611
|
return connections;
|
|
3612
3612
|
}
|
|
3613
|
-
t$
|
|
3613
|
+
t$d(
|
|
3614
3614
|
connections,
|
|
3615
|
-
t$
|
|
3616
|
-
t$
|
|
3617
|
-
t$
|
|
3615
|
+
t$7(({ source, target, boundary }) => {
|
|
3616
|
+
t$d(
|
|
3617
|
+
t$m(
|
|
3618
3618
|
[...toArray(source.ancestors()).reverse(), source],
|
|
3619
3619
|
[...toArray(target.ancestors()).reverse(), target]
|
|
3620
3620
|
),
|
|
3621
3621
|
// Filter out common ancestors
|
|
3622
|
-
t$
|
|
3622
|
+
t$9(([sourceAncestor, targetAncestor]) => sourceAncestor === targetAncestor),
|
|
3623
3623
|
n(1),
|
|
3624
|
-
t$
|
|
3624
|
+
t$7(([sourceAncestor, targetAncestor]) => {
|
|
3625
3625
|
if (sourceAncestor === source && targetAncestor === target) {
|
|
3626
3626
|
this.addImplicitWithinScope(boundary);
|
|
3627
3627
|
return;
|
|
@@ -3773,7 +3773,7 @@ class ActiveGroupMemory extends Memory {
|
|
|
3773
3773
|
}
|
|
3774
3774
|
|
|
3775
3775
|
function findRedundantConnections(connections) {
|
|
3776
|
-
return t$
|
|
3776
|
+
return t$d(
|
|
3777
3777
|
[...connections],
|
|
3778
3778
|
mergeConnections,
|
|
3779
3779
|
t$2((reducedConnections, connection, _, all) => {
|
|
@@ -3853,11 +3853,11 @@ class StageFinal {
|
|
|
3853
3853
|
}
|
|
3854
3854
|
return false;
|
|
3855
3855
|
};
|
|
3856
|
-
t$
|
|
3856
|
+
t$d(
|
|
3857
3857
|
difference(implicits, snapshot),
|
|
3858
3858
|
toArray(),
|
|
3859
3859
|
sortByFqnHierarchically,
|
|
3860
|
-
t$
|
|
3860
|
+
t$7((el) => {
|
|
3861
3861
|
const childrensToWrap = [...el.children()].filter(isFinalOrHasIncludedDescendant).length;
|
|
3862
3862
|
if (childrensToWrap >= 2) {
|
|
3863
3863
|
final.add(el);
|
|
@@ -3880,12 +3880,12 @@ class StageFinal {
|
|
|
3880
3880
|
const tree = treeFromMemoryState(memory, "final");
|
|
3881
3881
|
const stage = memory.stageExclude({});
|
|
3882
3882
|
const isRemovable = (el) => !(boundaries.has(el) || memory.explicits.has(el) || tree.hasInOut(el) || tree.root.has(el));
|
|
3883
|
-
const singleRoot = t$
|
|
3883
|
+
const singleRoot = t$5([...tree.root]);
|
|
3884
3884
|
if (singleRoot && !memory.explicits.has(singleRoot)) {
|
|
3885
3885
|
stage.exclude(singleRoot);
|
|
3886
3886
|
}
|
|
3887
3887
|
for (const el of memory.final) {
|
|
3888
|
-
const singleChild = t$
|
|
3888
|
+
const singleChild = t$5(tree.children(el));
|
|
3889
3889
|
if (singleChild && !tree.hasInOut(singleChild) && isRemovable(el)) {
|
|
3890
3890
|
stage.exclude(el);
|
|
3891
3891
|
}
|
|
@@ -3939,7 +3939,7 @@ function includeDescendantsFromMemory(elements, memory) {
|
|
|
3939
3939
|
if (memory.isEmpty() || elements.length === 0) {
|
|
3940
3940
|
return elements;
|
|
3941
3941
|
}
|
|
3942
|
-
const descedantsOf = t$
|
|
3942
|
+
const descedantsOf = t$g(elements.map((e) => isDescendantOf(e)));
|
|
3943
3943
|
const fromMemory = toArray(
|
|
3944
3944
|
ifilter(
|
|
3945
3945
|
memory.elements,
|
|
@@ -4030,7 +4030,7 @@ function toComputedEdges(connections) {
|
|
|
4030
4030
|
const relations = [
|
|
4031
4031
|
...e.relations
|
|
4032
4032
|
];
|
|
4033
|
-
invariant(t$
|
|
4033
|
+
invariant(t$b(relations, 1), "Edge must have at least one relation");
|
|
4034
4034
|
const $defaults = e.source.$model.$styles.defaults;
|
|
4035
4035
|
const source = e.source.id;
|
|
4036
4036
|
const target = e.target.id;
|
|
@@ -4044,8 +4044,8 @@ function toComputedEdges(connections) {
|
|
|
4044
4044
|
relations.map((r) => r.$relationship),
|
|
4045
4045
|
// Prefer only single relationship
|
|
4046
4046
|
// https://github.com/likec4/likec4/issues/1423
|
|
4047
|
-
t$
|
|
4048
|
-
n$
|
|
4047
|
+
t$5(
|
|
4048
|
+
n$d(relations, (r) => r.source.id === source && r.target.id === target)
|
|
4049
4049
|
)?.$relationship
|
|
4050
4050
|
);
|
|
4051
4051
|
const edge = exact({
|
|
@@ -4083,11 +4083,11 @@ const DirectRelationExprPredicate = {
|
|
|
4083
4083
|
// This is a special case, we look for all relationships that satisfy the where clause
|
|
4084
4084
|
// * -> * ; Empty memory; Where clause
|
|
4085
4085
|
case (sourceIsWildcard && targetIsWildcard && memory.isEmpty() && where !== NoWhere): {
|
|
4086
|
-
const connections2 = t$
|
|
4086
|
+
const connections2 = t$d(
|
|
4087
4087
|
model.relationships(),
|
|
4088
4088
|
ifilter(where),
|
|
4089
4089
|
toArray(),
|
|
4090
|
-
t$
|
|
4090
|
+
t$e((r) => new ConnectionModel(r.source, r.target, /* @__PURE__ */ new Set([r])))
|
|
4091
4091
|
);
|
|
4092
4092
|
stage.addConnections(connections2);
|
|
4093
4093
|
return stage;
|
|
@@ -4111,10 +4111,10 @@ const DirectRelationExprPredicate = {
|
|
|
4111
4111
|
// element -> *; Where clause
|
|
4112
4112
|
case (!sourceIsWildcard && targetIsWildcard && where !== NoWhere): {
|
|
4113
4113
|
const sources = resolveElements(model, source);
|
|
4114
|
-
const connections2 = t$
|
|
4114
|
+
const connections2 = t$d(
|
|
4115
4115
|
sources,
|
|
4116
|
-
t$
|
|
4117
|
-
(source2) => t$
|
|
4116
|
+
t$l(
|
|
4117
|
+
(source2) => t$d(
|
|
4118
4118
|
source2,
|
|
4119
4119
|
e(e$3(isBidirectional === true), {
|
|
4120
4120
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4123,12 +4123,12 @@ const DirectRelationExprPredicate = {
|
|
|
4123
4123
|
ifilter(where),
|
|
4124
4124
|
iunique(),
|
|
4125
4125
|
toArray(),
|
|
4126
|
-
t$
|
|
4126
|
+
t$4((r) => r.source === source2),
|
|
4127
4127
|
([outgoing, incoming]) => t$p(
|
|
4128
|
-
t$
|
|
4128
|
+
t$d(
|
|
4129
4129
|
outgoing,
|
|
4130
|
-
n$
|
|
4131
|
-
t$
|
|
4130
|
+
n$d((r) => !isAncestorOrDescendantOf(source2, r.target)),
|
|
4131
|
+
t$e(
|
|
4132
4132
|
(outgoing2) => new ConnectionModel(
|
|
4133
4133
|
source2,
|
|
4134
4134
|
outgoing2.target,
|
|
@@ -4136,10 +4136,10 @@ const DirectRelationExprPredicate = {
|
|
|
4136
4136
|
)
|
|
4137
4137
|
)
|
|
4138
4138
|
),
|
|
4139
|
-
t$
|
|
4139
|
+
t$d(
|
|
4140
4140
|
incoming,
|
|
4141
|
-
n$
|
|
4142
|
-
t$
|
|
4141
|
+
n$d((r) => !isAncestorOrDescendantOf(source2, r.source)),
|
|
4142
|
+
t$e(
|
|
4143
4143
|
(incoming2) => new ConnectionModel(
|
|
4144
4144
|
incoming2.source,
|
|
4145
4145
|
source2,
|
|
@@ -4169,10 +4169,10 @@ const DirectRelationExprPredicate = {
|
|
|
4169
4169
|
// * -> element; Where clause
|
|
4170
4170
|
case (sourceIsWildcard && !targetIsWildcard && where !== NoWhere): {
|
|
4171
4171
|
const targets = resolveElements(model, target);
|
|
4172
|
-
const connections2 = t$
|
|
4172
|
+
const connections2 = t$d(
|
|
4173
4173
|
targets,
|
|
4174
|
-
t$
|
|
4175
|
-
(target2) => t$
|
|
4174
|
+
t$l(
|
|
4175
|
+
(target2) => t$d(
|
|
4176
4176
|
target2,
|
|
4177
4177
|
e(e$3(isBidirectional === true), {
|
|
4178
4178
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4180,12 +4180,12 @@ const DirectRelationExprPredicate = {
|
|
|
4180
4180
|
}),
|
|
4181
4181
|
ifilter(where),
|
|
4182
4182
|
toArray(),
|
|
4183
|
-
t$
|
|
4183
|
+
t$4((r) => r.target === target2),
|
|
4184
4184
|
([incoming, outgoing]) => t$p(
|
|
4185
|
-
t$
|
|
4185
|
+
t$d(
|
|
4186
4186
|
outgoing,
|
|
4187
|
-
n$
|
|
4188
|
-
t$
|
|
4187
|
+
n$d((r) => !isAncestorOrDescendantOf(target2, r.target)),
|
|
4188
|
+
t$e(
|
|
4189
4189
|
(outgoing2) => new ConnectionModel(
|
|
4190
4190
|
target2,
|
|
4191
4191
|
outgoing2.target,
|
|
@@ -4193,10 +4193,10 @@ const DirectRelationExprPredicate = {
|
|
|
4193
4193
|
)
|
|
4194
4194
|
)
|
|
4195
4195
|
),
|
|
4196
|
-
t$
|
|
4196
|
+
t$d(
|
|
4197
4197
|
incoming,
|
|
4198
|
-
n$
|
|
4199
|
-
t$
|
|
4198
|
+
n$d((r) => !isAncestorOrDescendantOf(target2, r.source)),
|
|
4199
|
+
t$e(
|
|
4200
4200
|
(incoming2) => new ConnectionModel(
|
|
4201
4201
|
incoming2.source,
|
|
4202
4202
|
target2,
|
|
@@ -4247,9 +4247,9 @@ const DirectRelationExprPredicate = {
|
|
|
4247
4247
|
switch (true) {
|
|
4248
4248
|
// * -> *
|
|
4249
4249
|
case (sourceIsWildcard && targetIsWildcard): {
|
|
4250
|
-
relations = t$
|
|
4250
|
+
relations = t$d(
|
|
4251
4251
|
memory.connections,
|
|
4252
|
-
t$
|
|
4252
|
+
t$l(t$i(
|
|
4253
4253
|
e$8("relations"),
|
|
4254
4254
|
ifilter(where),
|
|
4255
4255
|
toArray()
|
|
@@ -4261,10 +4261,10 @@ const DirectRelationExprPredicate = {
|
|
|
4261
4261
|
// element -> *
|
|
4262
4262
|
case (!sourceIsWildcard && targetIsWildcard): {
|
|
4263
4263
|
const sources = resolveElements(model, source);
|
|
4264
|
-
relations = t$
|
|
4264
|
+
relations = t$d(
|
|
4265
4265
|
sources,
|
|
4266
|
-
t$
|
|
4267
|
-
(source2) => t$
|
|
4266
|
+
t$l(
|
|
4267
|
+
(source2) => t$d(
|
|
4268
4268
|
source2,
|
|
4269
4269
|
e(e$3(isBidirectional === true), {
|
|
4270
4270
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4281,10 +4281,10 @@ const DirectRelationExprPredicate = {
|
|
|
4281
4281
|
// * -> element
|
|
4282
4282
|
case (sourceIsWildcard && !targetIsWildcard): {
|
|
4283
4283
|
const targets = resolveElements(model, target);
|
|
4284
|
-
relations = t$
|
|
4284
|
+
relations = t$d(
|
|
4285
4285
|
targets,
|
|
4286
|
-
t$
|
|
4287
|
-
(target2) => t$
|
|
4286
|
+
t$l(
|
|
4287
|
+
(target2) => t$d(
|
|
4288
4288
|
target2,
|
|
4289
4289
|
e(e$3(isBidirectional === true), {
|
|
4290
4290
|
onTrue: (s) => union(s.allIncoming, s.allOutgoing),
|
|
@@ -4325,7 +4325,7 @@ const DirectRelationExprPredicate = {
|
|
|
4325
4325
|
};
|
|
4326
4326
|
function resolveWildcard(nonWildcard, { memory, model }) {
|
|
4327
4327
|
let sources = resolveElements(model, nonWildcard);
|
|
4328
|
-
if (!t$
|
|
4328
|
+
if (!t$b(sources, 1)) {
|
|
4329
4329
|
return [[], []];
|
|
4330
4330
|
}
|
|
4331
4331
|
if (ModelFqnExpr.isModelRef(nonWildcard)) {
|
|
@@ -4336,9 +4336,9 @@ function resolveWildcard(nonWildcard, { memory, model }) {
|
|
|
4336
4336
|
includeDescendantsFromMemory(targets2, memory)
|
|
4337
4337
|
];
|
|
4338
4338
|
}
|
|
4339
|
-
const targets = t$
|
|
4339
|
+
const targets = t$d(
|
|
4340
4340
|
sources,
|
|
4341
|
-
t$
|
|
4341
|
+
t$e((el) => el.ascendingSiblings()),
|
|
4342
4342
|
iflat(),
|
|
4343
4343
|
iunique(),
|
|
4344
4344
|
toArray(),
|
|
@@ -4369,7 +4369,7 @@ const IncomingExprPredicate = {
|
|
|
4369
4369
|
const visibleElements = [...memory.elements];
|
|
4370
4370
|
if (visibleElements.length === 0) {
|
|
4371
4371
|
visibleElements.push(
|
|
4372
|
-
...n$
|
|
4372
|
+
...n$e(
|
|
4373
4373
|
targets.flatMap((el) => [...el.ascendingSiblings()])
|
|
4374
4374
|
)
|
|
4375
4375
|
);
|
|
@@ -4416,7 +4416,7 @@ function incomingConnectionPredicate(model, expr) {
|
|
|
4416
4416
|
}
|
|
4417
4417
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "children"): {
|
|
4418
4418
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4419
|
-
return t$
|
|
4419
|
+
return t$g(
|
|
4420
4420
|
[...model.children(fqn)].map(
|
|
4421
4421
|
(el) => Connection.isIncoming(el.id)
|
|
4422
4422
|
)
|
|
@@ -4424,7 +4424,7 @@ function incomingConnectionPredicate(model, expr) {
|
|
|
4424
4424
|
}
|
|
4425
4425
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "descendants"): {
|
|
4426
4426
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4427
|
-
return t$
|
|
4427
|
+
return t$g([
|
|
4428
4428
|
Connection.isInside(fqn),
|
|
4429
4429
|
...[...model.children(fqn)].map(
|
|
4430
4430
|
(el) => Connection.isIncoming(el.id)
|
|
@@ -4433,7 +4433,7 @@ function incomingConnectionPredicate(model, expr) {
|
|
|
4433
4433
|
}
|
|
4434
4434
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "expanded"): {
|
|
4435
4435
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4436
|
-
return t$
|
|
4436
|
+
return t$g([
|
|
4437
4437
|
Connection.isIncoming(fqn),
|
|
4438
4438
|
Connection.isInside(fqn)
|
|
4439
4439
|
]);
|
|
@@ -4464,7 +4464,7 @@ const InOutRelationPredicate = {
|
|
|
4464
4464
|
const elements = resolveAndIncludeFromMemory(inout, { memory, model });
|
|
4465
4465
|
let visibleElements = [...memory.elements];
|
|
4466
4466
|
if (visibleElements.length === 0) {
|
|
4467
|
-
visibleElements = n$
|
|
4467
|
+
visibleElements = n$e(
|
|
4468
4468
|
elements.flatMap((el) => toArray(el.ascendingSiblings()))
|
|
4469
4469
|
);
|
|
4470
4470
|
}
|
|
@@ -4521,7 +4521,7 @@ const OutgoingExprPredicate = {
|
|
|
4521
4521
|
const visibleElements = [...memory.elements];
|
|
4522
4522
|
if (visibleElements.length === 0) {
|
|
4523
4523
|
visibleElements.push(
|
|
4524
|
-
...n$
|
|
4524
|
+
...n$e(
|
|
4525
4525
|
elements.flatMap((el) => [...el.ascendingSiblings()])
|
|
4526
4526
|
)
|
|
4527
4527
|
);
|
|
@@ -4570,7 +4570,7 @@ function outgoingConnectionPredicate(model, expr) {
|
|
|
4570
4570
|
}
|
|
4571
4571
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "children"): {
|
|
4572
4572
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4573
|
-
return t$
|
|
4573
|
+
return t$g(
|
|
4574
4574
|
[...model.children(fqn)].map(
|
|
4575
4575
|
(el) => Connection.isOutgoing(el.id)
|
|
4576
4576
|
)
|
|
@@ -4578,7 +4578,7 @@ function outgoingConnectionPredicate(model, expr) {
|
|
|
4578
4578
|
}
|
|
4579
4579
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "descendants"): {
|
|
4580
4580
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4581
|
-
return t$
|
|
4581
|
+
return t$g([
|
|
4582
4582
|
Connection.isInside(fqn),
|
|
4583
4583
|
...[...model.children(fqn)].map(
|
|
4584
4584
|
(el) => Connection.isOutgoing(el.id)
|
|
@@ -4587,7 +4587,7 @@ function outgoingConnectionPredicate(model, expr) {
|
|
|
4587
4587
|
}
|
|
4588
4588
|
case (ModelFqnExpr.isModelRef(expr) && expr.selector === "expanded"): {
|
|
4589
4589
|
const fqn = FqnRef.flatten(expr.ref);
|
|
4590
|
-
return t$
|
|
4590
|
+
return t$g([
|
|
4591
4591
|
Connection.isOutgoing(fqn),
|
|
4592
4592
|
Connection.isInside(fqn)
|
|
4593
4593
|
]);
|
|
@@ -4652,7 +4652,7 @@ const WildcardPredicate = {
|
|
|
4652
4652
|
exclude: ({ scope, memory, stage, where }) => {
|
|
4653
4653
|
if (where !== NoWhere) {
|
|
4654
4654
|
stage.exclude(
|
|
4655
|
-
n$
|
|
4655
|
+
n$d(
|
|
4656
4656
|
[...memory.elements],
|
|
4657
4657
|
where
|
|
4658
4658
|
)
|
|
@@ -4678,7 +4678,7 @@ function processElementPredicate(expr, op, ctx) {
|
|
|
4678
4678
|
case ModelFqnExpr.isWhere(expr): {
|
|
4679
4679
|
const where = whereOperatorAsPredicate(expr.where.condition);
|
|
4680
4680
|
const filterWhere = (elements) => {
|
|
4681
|
-
return n$
|
|
4681
|
+
return n$d(elements, where);
|
|
4682
4682
|
};
|
|
4683
4683
|
return processElementPredicate(expr.where.expr, op, { ...ctx, where, filterWhere });
|
|
4684
4684
|
}
|
|
@@ -4710,13 +4710,13 @@ function processRelationtPredicate(expr, op, ctx) {
|
|
|
4710
4710
|
case ModelRelationExpr.isWhere(expr): {
|
|
4711
4711
|
const where = whereOperatorAsPredicate(expr.where.condition);
|
|
4712
4712
|
const filterRelations = (relations) => {
|
|
4713
|
-
return new Set(n$
|
|
4713
|
+
return new Set(n$d([...relations], where));
|
|
4714
4714
|
};
|
|
4715
4715
|
const filterWhere = (connections) => {
|
|
4716
|
-
return t$
|
|
4716
|
+
return t$d(
|
|
4717
4717
|
connections,
|
|
4718
|
-
t$
|
|
4719
|
-
n$
|
|
4718
|
+
t$e((c) => new ConnectionModel(c.source, c.target, filterRelations(c.relations))),
|
|
4719
|
+
n$d((c) => c.nonEmpty())
|
|
4720
4720
|
);
|
|
4721
4721
|
};
|
|
4722
4722
|
return processRelationtPredicate(expr.where.expr, op, {
|
|
@@ -4822,7 +4822,7 @@ function computeElementView(likec4model, {
|
|
|
4822
4822
|
sorted.nodes
|
|
4823
4823
|
)
|
|
4824
4824
|
);
|
|
4825
|
-
const autoLayoutRule = t$
|
|
4825
|
+
const autoLayoutRule = t$8(rules, isViewRuleAutoLayout);
|
|
4826
4826
|
const nodeNotations = buildElementNotations(nodes);
|
|
4827
4827
|
return calcViewLayoutHash({
|
|
4828
4828
|
...view,
|
|
@@ -4833,7 +4833,7 @@ function computeElementView(likec4model, {
|
|
|
4833
4833
|
...autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }
|
|
4834
4834
|
},
|
|
4835
4835
|
edges: applyCustomRelationProperties(rules, nodes, sorted.edges),
|
|
4836
|
-
nodes: t$
|
|
4836
|
+
nodes: t$e(nodes, (n) => {
|
|
4837
4837
|
if (n.icon === "none") {
|
|
4838
4838
|
delete n.icon;
|
|
4839
4839
|
}
|
|
@@ -4874,9 +4874,9 @@ function assignElementsToGroups(memory) {
|
|
|
4874
4874
|
}
|
|
4875
4875
|
return false;
|
|
4876
4876
|
};
|
|
4877
|
-
t$
|
|
4877
|
+
t$d(
|
|
4878
4878
|
sortParentsFirst([...memory.explicitFirstSeenIn.keys()]),
|
|
4879
|
-
t$
|
|
4879
|
+
t$7((el) => {
|
|
4880
4880
|
if (!isAncestorAssigned(el)) {
|
|
4881
4881
|
const groupId = nonNullable(memory.explicitFirstSeenIn.get(el));
|
|
4882
4882
|
assignedTo.set(el, groupId);
|
|
@@ -4884,10 +4884,10 @@ function assignElementsToGroups(memory) {
|
|
|
4884
4884
|
}
|
|
4885
4885
|
})
|
|
4886
4886
|
);
|
|
4887
|
-
t$
|
|
4887
|
+
t$d(
|
|
4888
4888
|
sortParentsFirst([...memory.lastSeenIn.keys()]),
|
|
4889
|
-
n$
|
|
4890
|
-
t$
|
|
4889
|
+
n$d((el) => !assignedTo.has(el)),
|
|
4890
|
+
t$7((el) => {
|
|
4891
4891
|
if (isAncestorAssigned(el)) {
|
|
4892
4892
|
return;
|
|
4893
4893
|
}
|
|
@@ -4956,4 +4956,4 @@ function computeLikeC4Model(parsed) {
|
|
|
4956
4956
|
return LikeC4Model.create(computeParsedModelData(parsed));
|
|
4957
4957
|
}
|
|
4958
4958
|
|
|
4959
|
-
export { t$
|
|
4959
|
+
export { t$6 as a, computeParsedModelData as b, computeLikeC4Model as c, computeView as d, n$6 as n, topologicalSortExports as t, unsafeComputeView as u, willCreateCycle as w };
|