@likec4/core 1.40.0 → 1.42.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/builder/package.json +4 -0
- package/compute-view/package.json +4 -0
- package/compute-view/relationships/package.json +4 -0
- package/dist/builder/index.d.mts +83 -20
- package/dist/builder/index.mjs +210 -126
- package/dist/compute-view/index.d.mts +8 -7
- package/dist/compute-view/index.mjs +14 -11
- package/dist/compute-view/relationships-view/index.d.mts +9 -8
- package/dist/compute-view/relationships-view/index.mjs +6 -6
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +12 -12
- package/dist/model/connection/deployment/index.d.mts +11 -10
- package/dist/model/connection/deployment/index.mjs +2 -2
- package/dist/model/connection/index.d.mts +12 -11
- package/dist/model/connection/index.mjs +3 -3
- package/dist/model/connection/model/index.d.mts +11 -10
- package/dist/model/connection/model/index.mjs +2 -2
- package/dist/model/index.d.mts +14 -14
- package/dist/model/index.mjs +4 -5
- package/dist/shared/{core.DHQ32OHa.mjs → core.01VTr9qu.mjs} +10 -29
- package/dist/shared/core.1vX5a9AY.mjs +86 -0
- package/dist/shared/{core.BVNaR17u.mjs → core.B7KhhkRY.mjs} +1 -1
- package/dist/shared/core.B85MJLTf.mjs +5 -0
- package/dist/shared/{core.BIAlzwKc.mjs → core.BIqHjQiH.mjs} +85 -45
- package/dist/shared/core.BKlholso.mjs +3 -0
- package/dist/shared/core.BR4zXDH-.mjs +13 -0
- package/dist/shared/{core.yHe79zEl.mjs → core.BYNkXQ8A.mjs} +21 -12
- package/dist/shared/core.BazD6cot.mjs +14 -0
- package/dist/shared/{core.BuoXfSMj.mjs → core.BbE4y-yl.mjs} +1 -1
- package/dist/shared/core.BoYfZOBm.mjs +3 -0
- package/dist/shared/core.BsSXS-_R.mjs +7 -0
- package/dist/shared/{core.T-eLZTW_.mjs → core.BzTakU3I.mjs} +15 -7
- package/dist/shared/{core.4u1dVmfX.mjs → core.C2TiyjI6.mjs} +2 -2
- package/dist/shared/{core.DLpidoWc.mjs → core.C3JowhaZ.mjs} +3 -3
- package/dist/shared/{core.CNGyqkJh.mjs → core.C4x8aaWa.mjs} +3 -1
- package/dist/shared/{core.BB6zA-UU.mjs → core.C8YY6Uub.mjs} +38 -9
- package/dist/shared/{core.FPITT8Vx.mjs → core.C8sl5Y8Z.mjs} +144 -61
- package/dist/shared/{core.DuR3R-xJ.mjs → core.CNgZvKb8.mjs} +3 -5176
- package/dist/shared/{core.BbThmf6M.d.mts → core.CQngdcuj.d.mts} +85 -4
- package/dist/shared/{core.Be1n9a0i.mjs → core.C_Ni6yHl.mjs} +5 -4
- package/dist/shared/core.CbT8JVYL.mjs +5 -0
- package/dist/shared/core.CqAJJpK_.mjs +3 -0
- package/dist/shared/{core.CySf-2gP.d.mts → core.D0PjZzIS.d.mts} +52 -15
- package/dist/shared/{core.DrvfVXkh.d.mts → core.D5fzJWbF.d.mts} +11 -2
- package/dist/shared/{core.DrVOJuxX.d.mts → core.DACpKp35.d.mts} +5 -5
- package/dist/shared/core.DFi2dOTl.mjs +39548 -0
- package/dist/shared/{core.D704WZES.d.mts → core.DIol3syK.d.mts} +2 -2
- package/dist/shared/{core.DlG1xWt2.mjs → core.DMMOWQqc.mjs} +3 -2
- package/dist/shared/core.DNbUPnve.mjs +3990 -0
- package/dist/shared/{core.CCD1ID81.mjs → core.DRJma0Ol.mjs} +4 -3
- package/dist/shared/{core.DgttqsJc.mjs → core.DRhg-gVU.mjs} +9 -9
- package/dist/shared/core.DSO_rTC2.mjs +5322 -0
- package/dist/shared/{core.vWJTxpLV.d.mts → core.D_vkffV4.d.mts} +4 -2
- package/dist/shared/core.DdMJk7nx.d.mts +476 -0
- package/dist/shared/{core.D_fI5Lf6.d.mts → core.Dgs6-nuz.d.mts} +24 -4
- package/dist/shared/{core.Be4Jy9Qx.mjs → core.FZ305VYd.mjs} +2 -2
- package/dist/shared/core.OHD4KXm9.mjs +5 -0
- package/dist/shared/{core.GTgsmXS_.mjs → core.QJD_fcrc.mjs} +2 -2
- package/dist/shared/core.RfnaEmgA.mjs +7 -0
- package/dist/shared/core.fHR_8Tnq.d.mts +450 -0
- package/dist/shared/{core.D0EgVMQK.mjs → core.lRvxPoao.mjs} +14 -12
- package/dist/shared/{core.CaT0SUUK.mjs → core.rCeaAqgW.mjs} +1 -84
- package/dist/shared/{core.kxeJe0OY.d.mts → core.s9uwOt60.d.mts} +4 -4
- package/dist/shared/core.yna0OdV5.d.mts +98 -0
- package/dist/styles/index.d.mts +106 -0
- package/dist/styles/index.mjs +1 -0
- package/dist/types/_aux.d.mts +2 -2
- package/dist/types/_aux.mjs +1 -5
- package/dist/types/expression-model.d.mts +3 -4
- package/dist/types/expression.d.mts +3 -4
- package/dist/types/fqnRef.d.mts +2 -2
- package/dist/types/fqnRef.mjs +3 -3
- package/dist/types/index.d.mts +8 -8
- package/dist/types/index.mjs +151 -6
- package/dist/types/scalar.mjs +3 -2
- package/dist/utils/graphology/index.d.mts +1864 -0
- package/dist/utils/graphology/index.mjs +1 -0
- package/dist/utils/index.d.mts +11 -6
- package/dist/utils/index.mjs +21 -37
- package/dist/utils/iterable/index.d.mts +1 -1
- package/dist/utils/iterable/index.mjs +45 -7
- package/model/package.json +4 -0
- package/package.json +42 -24
- package/styles/package.json +4 -0
- package/types/package.json +4 -0
- package/utils/graphology/package.json +4 -0
- package/utils/package.json +4 -0
- package/dist/shared/core.6_Vp2iiN.mjs +0 -172
- package/dist/shared/core.Bpou6c2f.d.mts +0 -850
- package/dist/shared/core.CUw_2J9j.mjs +0 -47
- package/dist/shared/core.CzdwsPmY.d.mts +0 -69
- package/dist/shared/core.DoM6aM9N.mjs +0 -7
- package/dist/shared/core.ILwny7BV.mjs +0 -38
- package/dist/theme/index.d.mts +0 -11
- package/dist/theme/index.mjs +0 -232
- package/src/builder/Builder.deployment.ts +0 -224
- package/src/builder/Builder.deploymentModel.ts +0 -449
- package/src/builder/Builder.element.ts +0 -241
- package/src/builder/Builder.model.ts +0 -494
- package/src/builder/Builder.ts +0 -870
- package/src/builder/Builder.view-common.ts +0 -273
- package/src/builder/Builder.view-deployment.ts +0 -135
- package/src/builder/Builder.view-element.ts +0 -202
- package/src/builder/Builder.views.ts +0 -399
- package/src/builder/Builder.with.ts +0 -156
- package/src/builder/_types.ts +0 -320
- package/src/builder/index.ts +0 -11
- package/src/compute-view/compute-view.ts +0 -80
- package/src/compute-view/deployment-view/_types.ts +0 -38
- package/src/compute-view/deployment-view/clean-connections.ts +0 -236
- package/src/compute-view/deployment-view/compute.ts +0 -94
- package/src/compute-view/deployment-view/memory/index.ts +0 -9
- package/src/compute-view/deployment-view/memory/memory.ts +0 -96
- package/src/compute-view/deployment-view/predicates/deploymentRefs-where.ts +0 -18
- package/src/compute-view/deployment-view/predicates/deploymentRefs.ts +0 -154
- package/src/compute-view/deployment-view/predicates/index.ts +0 -8
- package/src/compute-view/deployment-view/predicates/relation-direct.ts +0 -243
- package/src/compute-view/deployment-view/predicates/relation-in-out.ts +0 -70
- package/src/compute-view/deployment-view/predicates/relation-incoming.ts +0 -101
- package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +0 -95
- package/src/compute-view/deployment-view/predicates/relation-where.ts +0 -18
- package/src/compute-view/deployment-view/predicates/utils.ts +0 -282
- package/src/compute-view/deployment-view/predicates/wildcard.ts +0 -41
- package/src/compute-view/deployment-view/stages/stage-exclude.ts +0 -5
- package/src/compute-view/deployment-view/stages/stage-final.ts +0 -245
- package/src/compute-view/deployment-view/stages/stage-include.ts +0 -95
- package/src/compute-view/deployment-view/utils.ts +0 -286
- package/src/compute-view/dynamic-view/compute.ts +0 -312
- package/src/compute-view/element-view/_types.ts +0 -47
- package/src/compute-view/element-view/clean-connections.ts +0 -117
- package/src/compute-view/element-view/compute.ts +0 -324
- package/src/compute-view/element-view/memory/NodeGroup.ts +0 -31
- package/src/compute-view/element-view/memory/index.ts +0 -10
- package/src/compute-view/element-view/memory/memory.ts +0 -178
- package/src/compute-view/element-view/memory/stage-exclude.ts +0 -59
- package/src/compute-view/element-view/memory/stage-final.ts +0 -129
- package/src/compute-view/element-view/memory/stage-include.ts +0 -130
- package/src/compute-view/element-view/predicates/_utils.ts +0 -91
- package/src/compute-view/element-view/predicates/element-expand.ts +0 -29
- package/src/compute-view/element-view/predicates/element-kind-tag.ts +0 -27
- package/src/compute-view/element-view/predicates/element-ref.ts +0 -24
- package/src/compute-view/element-view/predicates/relation-direct.ts +0 -321
- package/src/compute-view/element-view/predicates/relation-in-out.ts +0 -64
- package/src/compute-view/element-view/predicates/relation-in.ts +0 -115
- package/src/compute-view/element-view/predicates/relation-out.ts +0 -119
- package/src/compute-view/element-view/predicates/wildcard.ts +0 -88
- package/src/compute-view/element-view/utils.ts +0 -65
- package/src/compute-view/index.ts +0 -4
- package/src/compute-view/memory/AbstractMemory.ts +0 -45
- package/src/compute-view/memory/AbstractStageExclude.ts +0 -215
- package/src/compute-view/memory/AbstractStageInclude.ts +0 -200
- package/src/compute-view/memory/_types.ts +0 -148
- package/src/compute-view/memory/index.ts +0 -5
- package/src/compute-view/memory/ops.ts +0 -43
- package/src/compute-view/relationships-view/_types.ts +0 -16
- package/src/compute-view/relationships-view/compute.ts +0 -159
- package/src/compute-view/relationships-view/index.ts +0 -3
- package/src/compute-view/relationships-view/layout.ts +0 -357
- package/src/compute-view/relationships-view/utils.ts +0 -73
- package/src/compute-view/utils/ancestorsOfNode.ts +0 -19
- package/src/compute-view/utils/applyCustomElementProperties.ts +0 -107
- package/src/compute-view/utils/applyCustomRelationProperties.ts +0 -58
- package/src/compute-view/utils/applyViewRuleStyles.ts +0 -73
- package/src/compute-view/utils/buildComputedNodes.ts +0 -153
- package/src/compute-view/utils/buildElementNotations.ts +0 -63
- package/src/compute-view/utils/elementExpressionToPredicate.ts +0 -50
- package/src/compute-view/utils/link-nodes-with-edges.ts +0 -56
- package/src/compute-view/utils/merge-props-from-relationships.ts +0 -161
- package/src/compute-view/utils/relationExpressionToPredicates.ts +0 -55
- package/src/compute-view/utils/resolve-extended-views.ts +0 -85
- package/src/compute-view/utils/resolve-global-rules.ts +0 -88
- package/src/compute-view/utils/topological-sort.ts +0 -256
- package/src/compute-view/utils/view-hash.ts +0 -45
- package/src/compute-view/utils/with-readable-edges.ts +0 -40
- package/src/index.ts +0 -32
- package/src/model/DeploymentElementModel.ts +0 -682
- package/src/model/DeploymentModel.ts +0 -393
- package/src/model/ElementModel.ts +0 -293
- package/src/model/LikeC4Model.ts +0 -882
- package/src/model/RelationModel.ts +0 -152
- package/src/model/connection/Connection.ts +0 -72
- package/src/model/connection/deployment/DeploymentConnectionModel.ts +0 -185
- package/src/model/connection/deployment/find.ts +0 -120
- package/src/model/connection/deployment/index.ts +0 -8
- package/src/model/connection/index.ts +0 -22
- package/src/model/connection/model/ConnectionModel.ts +0 -158
- package/src/model/connection/model/find.ts +0 -117
- package/src/model/connection/model/index.ts +0 -8
- package/src/model/connection/ops.ts +0 -276
- package/src/model/guards.ts +0 -77
- package/src/model/index.ts +0 -72
- package/src/model/types.ts +0 -67
- package/src/model/utils.ts +0 -66
- package/src/model/view/EdgeModel.ts +0 -120
- package/src/model/view/LikeC4ViewModel.ts +0 -361
- package/src/model/view/LikeC4ViewsFolder.ts +0 -151
- package/src/model/view/NodeModel.ts +0 -247
- package/src/theme/element.ts +0 -61
- package/src/theme/index.ts +0 -127
- package/src/theme/relationships.ts +0 -54
- package/src/types/RichText.ts +0 -206
- package/src/types/_aux.ts +0 -291
- package/src/types/_common.ts +0 -80
- package/src/types/const.ts +0 -34
- package/src/types/expression-model.ts +0 -294
- package/src/types/expression.ts +0 -313
- package/src/types/fqnRef.ts +0 -91
- package/src/types/geometry.ts +0 -159
- package/src/types/global.ts +0 -21
- package/src/types/index.ts +0 -42
- package/src/types/model-data.ts +0 -77
- package/src/types/model-deployment.ts +0 -88
- package/src/types/model-dump.ts +0 -79
- package/src/types/model-logical.ts +0 -135
- package/src/types/model-spec.ts +0 -85
- package/src/types/operators.ts +0 -156
- package/src/types/project.ts +0 -14
- package/src/types/scalar.ts +0 -162
- package/src/types/styles.ts +0 -122
- package/src/types/view-changes.ts +0 -32
- package/src/types/view-common.ts +0 -157
- package/src/types/view-computed.ts +0 -118
- package/src/types/view-layouted.ts +0 -98
- package/src/types/view-parsed.deployment.ts +0 -39
- package/src/types/view-parsed.dynamic.ts +0 -89
- package/src/types/view-parsed.element.ts +0 -65
- package/src/types/view.ts +0 -113
- package/src/utils/common-head.ts +0 -22
- package/src/utils/compare-natural.ts +0 -60
- package/src/utils/const.ts +0 -1
- package/src/utils/fqn.ts +0 -302
- package/src/utils/getOrCreate.ts +0 -8
- package/src/utils/guards.ts +0 -9
- package/src/utils/index.ts +0 -68
- package/src/utils/invariant.ts +0 -29
- package/src/utils/iterable/_types.ts +0 -5
- package/src/utils/iterable/filter.ts +0 -55
- package/src/utils/iterable/find.ts +0 -38
- package/src/utils/iterable/first.ts +0 -48
- package/src/utils/iterable/flat.ts +0 -17
- package/src/utils/iterable/head.ts +0 -22
- package/src/utils/iterable/index.ts +0 -15
- package/src/utils/iterable/map.ts +0 -40
- package/src/utils/iterable/reduce.ts +0 -24
- package/src/utils/iterable/some.ts +0 -36
- package/src/utils/iterable/to.ts +0 -19
- package/src/utils/iterable/unique.ts +0 -23
- package/src/utils/markdown/index.ts +0 -2
- package/src/utils/markdown/to-html.ts +0 -32
- package/src/utils/markdown/to-text.ts +0 -14
- package/src/utils/memoize-prop.ts +0 -30
- package/src/utils/mnemonist.ts +0 -9
- package/src/utils/object-hash.ts +0 -14
- package/src/utils/promises.ts +0 -24
- package/src/utils/relations.ts +0 -36
- package/src/utils/set.ts +0 -83
- package/src/utils/string-hash.ts +0 -16
|
@@ -1,31 +1,57 @@
|
|
|
1
|
-
import { c as customInspectSymbol } from './core.
|
|
2
|
-
import { i as intersection, d as difference, u as union, a as stringHash, e as equals } from './core.
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as customInspectSymbol } from './core.B7KhhkRY.mjs';
|
|
2
|
+
import { i as intersection, d as difference, u as union, a as stringHash, e as equals } from './core.C2TiyjI6.mjs';
|
|
3
|
+
import { e as e$1 } from './core.BKlholso.mjs';
|
|
4
|
+
import { t as t$3 } from './core.BsSXS-_R.mjs';
|
|
5
|
+
import { t as t$2, a as t$4 } from './core.OHD4KXm9.mjs';
|
|
6
|
+
import { q as hierarchyLevel, k as commonAncestor, n as nameFromFqn, d as isSameHierarchy } from './core.DRhg-gVU.mjs';
|
|
5
7
|
import { a as nonNullable, i as invariant } from './core.D4npX2q8.mjs';
|
|
6
|
-
import { m as memoizeProp } from './core.
|
|
7
|
-
import {
|
|
8
|
+
import { m as memoizeProp } from './core.BR4zXDH-.mjs';
|
|
9
|
+
import { e as exact, R as RichText } from './core.01VTr9qu.mjs';
|
|
10
|
+
import { a as preferSummary, p as preferDescription } from './core.BazD6cot.mjs';
|
|
11
|
+
|
|
12
|
+
function t$1(t,n){let r=n.length-t.length;if(r===1){let[r,...i]=n;return t$2(r,{lazy:t,lazyArgs:i})}if(r===0){let r={lazy:t,lazyArgs:n};return Object.assign(t=>t$2(t,r),r)}throw Error(`Wrong number of arguments`)}
|
|
13
|
+
|
|
14
|
+
function e(e){return e===``||e===void 0?true:Array.isArray(e)?e.length===0:Object.keys(e).length===0}
|
|
15
|
+
|
|
16
|
+
function t(...t){return t$3(n$1,t)}const n$1=e=>e.length===1?e[0]:void 0;
|
|
17
|
+
|
|
18
|
+
function n(...e){return t$1(r,e)}function r(){let t=new Set;return n=>t.has(n)?t$4:(t.add(n),{done:false,hasNext:true,next:n})}
|
|
8
19
|
|
|
9
20
|
class AbstractDeploymentElementModel {
|
|
10
21
|
get style() {
|
|
11
|
-
return {
|
|
12
|
-
shape:
|
|
13
|
-
color:
|
|
14
|
-
|
|
22
|
+
return memoizeProp(this, "style", () => exact({
|
|
23
|
+
shape: this.$model.$styles.defaults.shape,
|
|
24
|
+
color: this.$model.$styles.defaults.color,
|
|
25
|
+
border: this.$model.$styles.defaults.border,
|
|
26
|
+
opacity: this.$model.$styles.defaults.opacity,
|
|
27
|
+
size: this.$model.$styles.defaults.size,
|
|
28
|
+
padding: this.$model.$styles.defaults.padding,
|
|
29
|
+
textSize: this.$model.$styles.defaults.text,
|
|
15
30
|
...this.$node.style
|
|
16
|
-
};
|
|
31
|
+
}));
|
|
17
32
|
}
|
|
18
33
|
get name() {
|
|
19
34
|
return nameFromFqn(this.id);
|
|
20
35
|
}
|
|
21
36
|
get shape() {
|
|
22
|
-
return this
|
|
37
|
+
return this.style.shape;
|
|
23
38
|
}
|
|
24
39
|
get color() {
|
|
25
|
-
return this
|
|
40
|
+
return this.style.color;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Short description of the element.
|
|
44
|
+
* Falls back to description if summary is not provided.
|
|
45
|
+
*/
|
|
46
|
+
get summary() {
|
|
47
|
+
return RichText.memoize(this, "summary", preferSummary(this.$node));
|
|
26
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Long description of the element.
|
|
51
|
+
* Falls back to summary if description is not provided.
|
|
52
|
+
*/
|
|
27
53
|
get description() {
|
|
28
|
-
return RichText.memoize(this, this.$node
|
|
54
|
+
return RichText.memoize(this, "description", preferDescription(this.$node));
|
|
29
55
|
}
|
|
30
56
|
get technology() {
|
|
31
57
|
return this.$node.technology ?? null;
|
|
@@ -143,7 +169,7 @@ class AbstractDeploymentElementModel {
|
|
|
143
169
|
));
|
|
144
170
|
}
|
|
145
171
|
hasMetadata() {
|
|
146
|
-
return !!this.$node.metadata && !
|
|
172
|
+
return !!this.$node.metadata && !e(this.$node.metadata);
|
|
147
173
|
}
|
|
148
174
|
getMetadata(field) {
|
|
149
175
|
if (field) {
|
|
@@ -180,7 +206,7 @@ class DeploymentNodeModel extends AbstractDeploymentElementModel {
|
|
|
180
206
|
}
|
|
181
207
|
get tags() {
|
|
182
208
|
return memoizeProp(this, Symbol.for("tags"), () => {
|
|
183
|
-
return
|
|
209
|
+
return n([
|
|
184
210
|
...this.$node.tags ?? [],
|
|
185
211
|
...this.$model.$model.specification.deployments[this.kind]?.tags ?? []
|
|
186
212
|
]);
|
|
@@ -215,7 +241,7 @@ class DeploymentNodeModel extends AbstractDeploymentElementModel {
|
|
|
215
241
|
if (children.size !== 1) {
|
|
216
242
|
return null;
|
|
217
243
|
}
|
|
218
|
-
const child =
|
|
244
|
+
const child = t([...children]);
|
|
219
245
|
return child?.isInstance() ? child : null;
|
|
220
246
|
}
|
|
221
247
|
/**
|
|
@@ -288,25 +314,21 @@ class DeployedInstanceModel extends AbstractDeploymentElementModel {
|
|
|
288
314
|
return nonNullable(this.$model.parent(this), `Parent of ${this.id} not found`);
|
|
289
315
|
}
|
|
290
316
|
get style() {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
317
|
+
return memoizeProp(this, "style", () => exact({
|
|
318
|
+
shape: this.$model.$styles.defaults.shape,
|
|
319
|
+
color: this.$model.$styles.defaults.color,
|
|
320
|
+
border: this.$model.$styles.defaults.border,
|
|
321
|
+
opacity: this.$model.$styles.defaults.opacity,
|
|
322
|
+
size: this.$model.$styles.defaults.size,
|
|
323
|
+
padding: this.$model.$styles.defaults.padding,
|
|
324
|
+
textSize: this.$model.$styles.defaults.text,
|
|
325
|
+
...this.element.$element.style,
|
|
298
326
|
...this.$instance.style
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
get shape() {
|
|
302
|
-
return this.$instance.style?.shape ?? this.element.shape;
|
|
303
|
-
}
|
|
304
|
-
get color() {
|
|
305
|
-
return this.$instance.style?.color ?? this.element.color;
|
|
327
|
+
}));
|
|
306
328
|
}
|
|
307
329
|
get tags() {
|
|
308
330
|
return memoizeProp(this, Symbol.for("tags"), () => {
|
|
309
|
-
return
|
|
331
|
+
return n([
|
|
310
332
|
...this.$instance.tags ?? [],
|
|
311
333
|
...this.element.tags
|
|
312
334
|
]);
|
|
@@ -315,8 +337,19 @@ class DeployedInstanceModel extends AbstractDeploymentElementModel {
|
|
|
315
337
|
get kind() {
|
|
316
338
|
return this.element.kind;
|
|
317
339
|
}
|
|
340
|
+
get summary() {
|
|
341
|
+
return RichText.memoize(
|
|
342
|
+
this,
|
|
343
|
+
"summary",
|
|
344
|
+
preferSummary(this.$instance) ?? preferSummary(this.element.$element)
|
|
345
|
+
);
|
|
346
|
+
}
|
|
318
347
|
get description() {
|
|
319
|
-
return RichText.memoize(
|
|
348
|
+
return RichText.memoize(
|
|
349
|
+
this,
|
|
350
|
+
"description",
|
|
351
|
+
preferDescription(this.$instance) ?? preferDescription(this.element.$element)
|
|
352
|
+
);
|
|
320
353
|
}
|
|
321
354
|
get technology() {
|
|
322
355
|
return this.$instance.technology ?? this.element.technology ?? null;
|
|
@@ -364,13 +397,11 @@ class NestedElementOfDeployedInstanceModel {
|
|
|
364
397
|
return this.instance.id;
|
|
365
398
|
}
|
|
366
399
|
get style() {
|
|
367
|
-
|
|
368
|
-
return {
|
|
400
|
+
return memoizeProp(this, "style ", () => ({
|
|
369
401
|
shape: this.element.shape,
|
|
370
402
|
color: this.element.color,
|
|
371
|
-
...
|
|
372
|
-
|
|
373
|
-
};
|
|
403
|
+
...this.element.$element.style
|
|
404
|
+
}));
|
|
374
405
|
}
|
|
375
406
|
get shape() {
|
|
376
407
|
return this.element.shape;
|
|
@@ -381,6 +412,9 @@ class NestedElementOfDeployedInstanceModel {
|
|
|
381
412
|
get title() {
|
|
382
413
|
return this.element.title;
|
|
383
414
|
}
|
|
415
|
+
get summary() {
|
|
416
|
+
return this.element.summary;
|
|
417
|
+
}
|
|
384
418
|
get description() {
|
|
385
419
|
return this.element.description;
|
|
386
420
|
}
|
|
@@ -413,7 +447,7 @@ class DeploymentRelationModel {
|
|
|
413
447
|
return `${this.source.id} -> ${this.target.id}`;
|
|
414
448
|
}
|
|
415
449
|
get title() {
|
|
416
|
-
if (!
|
|
450
|
+
if (!e$1(this.$relationship.title)) {
|
|
417
451
|
return null;
|
|
418
452
|
}
|
|
419
453
|
return this.$relationship.title;
|
|
@@ -422,7 +456,7 @@ class DeploymentRelationModel {
|
|
|
422
456
|
return this.$relationship.technology ?? null;
|
|
423
457
|
}
|
|
424
458
|
get description() {
|
|
425
|
-
return RichText.memoize(this, this.$relationship.description);
|
|
459
|
+
return RichText.memoize(this, "description", this.$relationship.description);
|
|
426
460
|
}
|
|
427
461
|
get tags() {
|
|
428
462
|
return this.$relationship.tags ?? [];
|
|
@@ -437,10 +471,16 @@ class DeploymentRelationModel {
|
|
|
437
471
|
return this.$relationship.links ?? [];
|
|
438
472
|
}
|
|
439
473
|
get color() {
|
|
440
|
-
return this.$relationship.color ??
|
|
474
|
+
return this.$relationship.color ?? this.$model.$styles.defaults.relationship.color;
|
|
441
475
|
}
|
|
442
476
|
get line() {
|
|
443
|
-
return this.$relationship.line ??
|
|
477
|
+
return this.$relationship.line ?? this.$model.$styles.defaults.relationship.line;
|
|
478
|
+
}
|
|
479
|
+
get head() {
|
|
480
|
+
return this.$relationship.head ?? this.$model.$styles.defaults.relationship.arrow;
|
|
481
|
+
}
|
|
482
|
+
get tail() {
|
|
483
|
+
return this.$relationship.tail;
|
|
444
484
|
}
|
|
445
485
|
*views() {
|
|
446
486
|
for (const view of this.$model.views()) {
|
|
@@ -457,7 +497,7 @@ class DeploymentRelationModel {
|
|
|
457
497
|
return false;
|
|
458
498
|
}
|
|
459
499
|
hasMetadata() {
|
|
460
|
-
return !!this.$relationship.metadata && !
|
|
500
|
+
return !!this.$relationship.metadata && !e(this.$relationship.metadata);
|
|
461
501
|
}
|
|
462
502
|
getMetadata(field) {
|
|
463
503
|
if (field) {
|
|
@@ -555,7 +595,7 @@ class DeploymentConnectionModel {
|
|
|
555
595
|
nonEmpty() {
|
|
556
596
|
return this.relations.nonEmpty;
|
|
557
597
|
}
|
|
558
|
-
[customInspectSymbol](
|
|
598
|
+
[customInspectSymbol](_depth, _inspectOptions, _inspect) {
|
|
559
599
|
const asString = this.toString();
|
|
560
600
|
Object.defineProperty(asString, "constructor", {
|
|
561
601
|
value: DeploymentConnectionModel,
|
|
@@ -716,4 +756,4 @@ const deploymentConnection = {
|
|
|
716
756
|
findConnectionsWithin: findConnectionsWithin
|
|
717
757
|
};
|
|
718
758
|
|
|
719
|
-
export { DeploymentConnectionModel as D, NestedElementOfDeployedInstanceModel as N, RelationshipsAccum as R,
|
|
759
|
+
export { DeploymentConnectionModel as D, NestedElementOfDeployedInstanceModel as N, RelationshipsAccum as R, DeploymentNodeModel as a, DeployedInstanceModel as b, DeploymentRelationModel as c, deploymentConnection as d, e, findConnection as f, findConnectionsBetween as g, findConnectionsWithin as h, n, t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function memoizeProp(obj, tag, fn) {
|
|
2
|
+
const tagSymbol = typeof tag === "symbol" ? tag : Symbol.for(tag);
|
|
3
|
+
if (!obj.hasOwnProperty(tagSymbol)) {
|
|
4
|
+
Object.defineProperty(obj, tagSymbol, {
|
|
5
|
+
enumerable: false,
|
|
6
|
+
writable: false,
|
|
7
|
+
value: fn()
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return obj[tagSymbol];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { memoizeProp as m };
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e as e$1 } from './core.BKlholso.mjs';
|
|
2
|
+
import { t as t$2 } from './core.BsSXS-_R.mjs';
|
|
3
|
+
import { e as e$2 } from './core.BoYfZOBm.mjs';
|
|
4
|
+
import { e as e$3 } from './core.CqAJJpK_.mjs';
|
|
2
5
|
import { n as nonexhaustive } from './core.D4npX2q8.mjs';
|
|
3
6
|
|
|
7
|
+
function t$1(...t){return t$2(n$1,t)}const n$1=(e,t)=>t.every(t=>t(e));
|
|
8
|
+
|
|
9
|
+
function t(...t){return t$2(n,t)}const n=(e,t)=>t.some(t=>t(e));
|
|
10
|
+
|
|
11
|
+
function e(e){return e==null}
|
|
12
|
+
|
|
4
13
|
function isOnStage(value, stage) {
|
|
5
14
|
return value[_stage] === stage;
|
|
6
15
|
}
|
|
@@ -8,10 +17,10 @@ const _stage = "_stage";
|
|
|
8
17
|
const _type = "_type";
|
|
9
18
|
|
|
10
19
|
function isDeploymentNode(el) {
|
|
11
|
-
return
|
|
20
|
+
return e$1(el.kind) && !e$1(el.element);
|
|
12
21
|
}
|
|
13
22
|
function isDeployedInstance(el) {
|
|
14
|
-
return
|
|
23
|
+
return e$1(el.element) && !e$1(el.kind);
|
|
15
24
|
}
|
|
16
25
|
|
|
17
26
|
function isTagEqual(operator) {
|
|
@@ -40,8 +49,8 @@ function whereOperatorAsPredicate(operator) {
|
|
|
40
49
|
return participantIs(participant, participantPredicate);
|
|
41
50
|
}
|
|
42
51
|
case isTagEqual(operator): {
|
|
43
|
-
if (
|
|
44
|
-
const tag2 =
|
|
52
|
+
if (e$3(operator.tag) || "eq" in operator.tag) {
|
|
53
|
+
const tag2 = e$3(operator.tag) ? operator.tag : operator.tag.eq;
|
|
45
54
|
return (value) => {
|
|
46
55
|
return Array.isArray(value.tags) && value.tags.includes(tag2);
|
|
47
56
|
};
|
|
@@ -52,28 +61,28 @@ function whereOperatorAsPredicate(operator) {
|
|
|
52
61
|
};
|
|
53
62
|
}
|
|
54
63
|
case isKindEqual(operator): {
|
|
55
|
-
if (
|
|
56
|
-
const kind2 =
|
|
64
|
+
if (e$3(operator.kind) || "eq" in operator.kind) {
|
|
65
|
+
const kind2 = e$3(operator.kind) ? operator.kind : operator.kind.eq;
|
|
57
66
|
return (value) => {
|
|
58
67
|
return value.kind === kind2;
|
|
59
68
|
};
|
|
60
69
|
}
|
|
61
70
|
const kind = operator.kind.neq;
|
|
62
71
|
return (value) => {
|
|
63
|
-
return
|
|
72
|
+
return e(value.kind) || value.kind !== kind;
|
|
64
73
|
};
|
|
65
74
|
}
|
|
66
75
|
case isNotOperator(operator): {
|
|
67
76
|
const predicate = whereOperatorAsPredicate(operator.not);
|
|
68
|
-
return
|
|
77
|
+
return e$2(predicate);
|
|
69
78
|
}
|
|
70
79
|
case isAndOperator(operator): {
|
|
71
80
|
const predicates = operator.and.map(whereOperatorAsPredicate);
|
|
72
|
-
return
|
|
81
|
+
return t$1(predicates);
|
|
73
82
|
}
|
|
74
83
|
case isOrOperator(operator): {
|
|
75
84
|
const predicates = operator.or.map(whereOperatorAsPredicate);
|
|
76
|
-
return
|
|
85
|
+
return t(predicates);
|
|
77
86
|
}
|
|
78
87
|
default:
|
|
79
88
|
nonexhaustive(operator);
|
|
@@ -95,4 +104,4 @@ function participantIs(participant, predicate) {
|
|
|
95
104
|
};
|
|
96
105
|
}
|
|
97
106
|
|
|
98
|
-
export { _stage as _, _type as a, isDeploymentNode as b, isDeployedInstance as c, isTagEqual as d, isKindEqual as e, isParticipantOperator as f, isNotOperator as g, isAndOperator as h, isOnStage as i, isOrOperator as j, whereOperatorAsPredicate as w };
|
|
107
|
+
export { _stage as _, _type as a, isDeploymentNode as b, isDeployedInstance as c, isTagEqual as d, isKindEqual as e, isParticipantOperator as f, isNotOperator as g, isAndOperator as h, isOnStage as i, isOrOperator as j, e as k, t, whereOperatorAsPredicate as w };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function preferSummary(a) {
|
|
2
|
+
return a.summary ?? a.description;
|
|
3
|
+
}
|
|
4
|
+
function preferDescription(a) {
|
|
5
|
+
return a.description ?? a.summary;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const _aux = {
|
|
9
|
+
__proto__: null,
|
|
10
|
+
preferDescription: preferDescription,
|
|
11
|
+
preferSummary: preferSummary
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { _aux as _, preferSummary as a, preferDescription as p };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function e(e,t,n){let r=n=>e(n,...t);return n===void 0?r:Object.assign(r,{lazy:n,lazyArgs:t})}
|
|
2
|
+
|
|
3
|
+
function t$1(t,n,r){let i=t.length-n.length;if(i===0)return t(...n);if(i===1)return e(t,n,r);throw Error(`Wrong number of arguments`)}
|
|
4
|
+
|
|
5
|
+
function t(...t){return t$1(n,t)}const n=(e,t)=>e.length>=t;
|
|
6
|
+
|
|
7
|
+
export { t as a, t$1 as t };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { e as isStepEdgeId } from './core.
|
|
1
|
+
import { e as e$1 } from './core.BKlholso.mjs';
|
|
2
|
+
import { e as isStepEdgeId } from './core.C_Ni6yHl.mjs';
|
|
3
|
+
|
|
4
|
+
function e(e){return Array.isArray(e)}
|
|
3
5
|
|
|
4
6
|
function isViewRulePredicate(rule) {
|
|
5
7
|
return "include" in rule || "exclude" in rule;
|
|
@@ -17,10 +19,10 @@ function isElementView(view) {
|
|
|
17
19
|
return view._type === "element";
|
|
18
20
|
}
|
|
19
21
|
function isScopedElementView(view) {
|
|
20
|
-
return isElementView(view) &&
|
|
22
|
+
return isElementView(view) && e$1(view.viewOf);
|
|
21
23
|
}
|
|
22
24
|
function isExtendsElementView(view) {
|
|
23
|
-
return isElementView(view) &&
|
|
25
|
+
return isElementView(view) && e$1(view.extends);
|
|
24
26
|
}
|
|
25
27
|
function isDeploymentView(view) {
|
|
26
28
|
return view._type === "deployment";
|
|
@@ -48,12 +50,18 @@ function getParallelStepsPrefix(id) {
|
|
|
48
50
|
}
|
|
49
51
|
return null;
|
|
50
52
|
}
|
|
51
|
-
function
|
|
52
|
-
return "
|
|
53
|
+
function isDynamicStep(step) {
|
|
54
|
+
return !!step && !("__series" in step || "__parallel" in step);
|
|
55
|
+
}
|
|
56
|
+
function isDynamicStepsParallel(step) {
|
|
57
|
+
return !!step && "__parallel" in step && e(step.__parallel);
|
|
58
|
+
}
|
|
59
|
+
function isDynamicStepsSeries(step) {
|
|
60
|
+
return !!step && "__series" in step && e(step.__series);
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
function isViewRuleGroup(rule) {
|
|
56
64
|
return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
|
|
57
65
|
}
|
|
58
66
|
|
|
59
|
-
export { isViewRuleStyle as a, isComputedView as b, isDiagramView as c, isElementView as d, isScopedElementView as e, isExtendsElementView as f, isDeploymentView as g, isDynamicView as h, isViewRulePredicate as i, isViewRuleGlobalStyle as j, isViewRuleGlobalPredicateRef as k, isAutoLayoutDirection as l, isViewRuleAutoLayout as m, getParallelStepsPrefix as n,
|
|
67
|
+
export { isViewRuleStyle as a, isComputedView as b, isDiagramView as c, isElementView as d, isScopedElementView as e, isExtendsElementView as f, isDeploymentView as g, isDynamicView as h, isViewRulePredicate as i, isViewRuleGlobalStyle as j, isViewRuleGlobalPredicateRef as k, isAutoLayoutDirection as l, isViewRuleAutoLayout as m, getParallelStepsPrefix as n, isDynamicStep as o, isDynamicStepsParallel as p, isDynamicStepsSeries as q, isViewRuleGroup as r, e as s };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as t } from './core.BsSXS-_R.mjs';
|
|
2
2
|
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
3
3
|
|
|
4
4
|
var set = {};
|
|
@@ -385,7 +385,7 @@ function intersection(first, ...sets) {
|
|
|
385
385
|
if (first.size === 0) {
|
|
386
386
|
return result;
|
|
387
387
|
}
|
|
388
|
-
let other =
|
|
388
|
+
let other = t(sets, 2) ? setExports.intersection(...sets) : sets[0];
|
|
389
389
|
if (other.size === 0) {
|
|
390
390
|
return result;
|
|
391
391
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { e } from './core.DRJma0Ol.mjs';
|
|
2
2
|
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
3
3
|
|
|
4
4
|
function imap(arg1, arg2) {
|
|
5
5
|
const mapper = arg2 ?? arg1;
|
|
6
|
-
invariant(
|
|
6
|
+
invariant(e(mapper));
|
|
7
7
|
function* _map(iter) {
|
|
8
8
|
for (const value of iter) {
|
|
9
9
|
yield mapper(value);
|
|
@@ -29,4 +29,4 @@ function toSet(iterable) {
|
|
|
29
29
|
return (it) => new Set(it);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export {
|
|
32
|
+
export { toArray as a, imap as i, toSet as t };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function e(e){return e!==void 0}
|
|
2
|
+
|
|
1
3
|
function iflat(iterable) {
|
|
2
4
|
return iterable ? _iflat(iterable) : _iflat;
|
|
3
5
|
}
|
|
@@ -22,4 +24,4 @@ function* _iunique(iterable) {
|
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
|
-
export { iunique as a, iflat as i };
|
|
27
|
+
export { iunique as a, e, iflat as i };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { g as getDefaultExportFromCjs } from './core.B85MJLTf.mjs';
|
|
2
|
+
import { a as requireIterator } from './core.rCeaAqgW.mjs';
|
|
3
|
+
import { r as requireForeach } from './core.1vX5a9AY.mjs';
|
|
4
|
+
import { t as t$3 } from './core.OHD4KXm9.mjs';
|
|
5
|
+
import { t as t$4 } from './core.CbT8JVYL.mjs';
|
|
6
|
+
import { t as t$2 } from './core.BsSXS-_R.mjs';
|
|
7
|
+
import { k as commonAncestor, m as compareFqnHierarchically } from './core.DRhg-gVU.mjs';
|
|
8
|
+
import { e } from './core.RfnaEmgA.mjs';
|
|
4
9
|
import { i as invariant } from './core.D4npX2q8.mjs';
|
|
5
10
|
|
|
11
|
+
function t$1(...t){return t$2(n$1,t)}function n$1(e,t){let n=[];for(let[r,i]of e.entries()){if(!t(i,r,e))break;n.push(i);}return n}
|
|
12
|
+
|
|
13
|
+
function t(...t){return t$2(n,t,r)}const n=(e,t)=>e.length<t.length?e.map((e,n)=>[e,t[n]]):t.map((t,n)=>[e[n],t]),r=e=>(t,n)=>({hasNext:true,next:[t,e[n]],done:n>=e.length-1});
|
|
14
|
+
|
|
6
15
|
/**
|
|
7
16
|
* Mnemonist Stack
|
|
8
17
|
* ================
|
|
@@ -231,13 +240,33 @@ function commonHead(sources, targets, equals) {
|
|
|
231
240
|
return [];
|
|
232
241
|
}
|
|
233
242
|
equals ??= Object.is;
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
243
|
+
return t$3(
|
|
244
|
+
t(sources, targets),
|
|
245
|
+
t$1(([source, target]) => equals(source, target)),
|
|
246
|
+
t$4(([source, _]) => source)
|
|
238
247
|
);
|
|
239
248
|
}
|
|
240
249
|
|
|
250
|
+
const compareRelations = (a, b) => {
|
|
251
|
+
const parentA = commonAncestor(a.source.id, a.target.id);
|
|
252
|
+
const parentB = commonAncestor(b.source.id, b.target.id);
|
|
253
|
+
if (parentA && !parentB) {
|
|
254
|
+
return 1;
|
|
255
|
+
}
|
|
256
|
+
if (!parentA && parentB) {
|
|
257
|
+
return -1;
|
|
258
|
+
}
|
|
259
|
+
const compareParents = parentA && parentB ? compareFqnHierarchically(parentA, parentB) : 0;
|
|
260
|
+
if (compareParents !== 0) {
|
|
261
|
+
return compareParents;
|
|
262
|
+
}
|
|
263
|
+
const compareSource = compareFqnHierarchically(a.source.id, b.source.id);
|
|
264
|
+
if (compareSource !== 0) {
|
|
265
|
+
return compareSource;
|
|
266
|
+
}
|
|
267
|
+
return compareFqnHierarchically(a.target.id, b.target.id);
|
|
268
|
+
};
|
|
269
|
+
|
|
241
270
|
function commonjsRequire(path) {
|
|
242
271
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
243
272
|
}
|
|
@@ -260,7 +289,7 @@ const objecthash = /*@__PURE__*/getDefaultExportFromCjs(object_hashExports);
|
|
|
260
289
|
|
|
261
290
|
function objectHash(value) {
|
|
262
291
|
invariant(
|
|
263
|
-
typeof value === "object" &&
|
|
292
|
+
typeof value === "object" && e(value),
|
|
264
293
|
"objectHash: value must be an object"
|
|
265
294
|
);
|
|
266
295
|
return objecthash(value, {
|
|
@@ -269,4 +298,4 @@ function objectHash(value) {
|
|
|
269
298
|
});
|
|
270
299
|
}
|
|
271
300
|
|
|
272
|
-
export { Stack as S, commonHead as c, objectHash as o };
|
|
301
|
+
export { Stack as S, compareRelations as a, t as b, commonHead as c, objectHash as o, t$1 as t };
|