@likec4/core 1.41.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 +13 -11
- package/dist/builder/index.mjs +111 -91
- 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 +11 -11
- 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.Ae86Y3tB.mjs → core.01VTr9qu.mjs} +8 -26
- 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.DA5vzwZ9.mjs → core.BIqHjQiH.mjs} +56 -42
- package/dist/shared/core.BKlholso.mjs +3 -0
- package/dist/shared/core.BR4zXDH-.mjs +13 -0
- package/dist/shared/{core.CXy1NLUG.mjs → core.BYNkXQ8A.mjs} +21 -12
- 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.DJp8fgok.mjs → core.BzTakU3I.mjs} +14 -10
- 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.Asc11Mjy.mjs → core.C8sl5Y8Z.mjs} +122 -58
- package/dist/shared/{core.BvMRMo7Z.mjs → core.CNgZvKb8.mjs} +3 -5198
- package/dist/shared/{core.CUG6vpyL.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.BXsxn-hf.d.mts → core.D0PjZzIS.d.mts} +27 -15
- package/dist/shared/{core.DgesAwC8.d.mts → core.D5fzJWbF.d.mts} +2 -2
- package/dist/shared/{core.hfOE3RfK.d.mts → core.DACpKp35.d.mts} +5 -5
- package/dist/shared/core.DFi2dOTl.mjs +39548 -0
- package/dist/shared/{core.xSQO0XYD.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.FUPplpae.d.mts → core.D_vkffV4.d.mts} +4 -2
- package/dist/shared/core.DdMJk7nx.d.mts +476 -0
- package/dist/shared/{core.BhpgpOep.d.mts → core.Dgs6-nuz.d.mts} +2 -2
- 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.zxTBF_PD.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/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 +150 -5
- 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.CUw_2J9j.mjs +0 -47
- package/dist/shared/core.CzdwsPmY.d.mts +0 -69
- package/dist/shared/core.D-ZGWDDt.d.mts +0 -831
- 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 -946
- 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 -324
- 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 -297
- 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 -358
- 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 -166
- package/src/compute-view/utils/buildElementNotations.ts +0 -64
- 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 -712
- package/src/model/DeploymentModel.ts +0 -393
- package/src/model/ElementModel.ts +0 -316
- 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 -121
- 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 -205
- package/src/types/_aux.ts +0 -317
- package/src/types/_common.ts +0 -102
- 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 -44
- package/src/types/model-data.ts +0 -77
- package/src/types/model-deployment.ts +0 -78
- package/src/types/model-dump.ts +0 -79
- package/src/types/model-logical.ts +0 -126
- package/src/types/model-spec.ts +0 -88
- 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 -126
- package/src/types/view-layouted.ts +0 -94
- 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
package/dist/builder/index.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { LastArrayElement, Split, Simplify, IsLiteral, Writable, IfNever, IsNever, TupleToUnion, Tagged } from 'type-fest';
|
|
2
|
-
import {
|
|
1
|
+
import { LastArrayElement, Split, Simplify, IsLiteral, Writable, IfNever, IsNever, TupleToUnion, Tagged, PartialDeep } from 'type-fest';
|
|
2
|
+
import { f as LikeC4Model } from '../shared/core.D0PjZzIS.mjs';
|
|
3
3
|
import { D as DeploymentFqn, F as Fqn } from '../shared/core.DX-WYEPA.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { e as DeploymentElement, h as DeploymentRelationship, r as ParsedView, a0 as ParsedDeploymentView, P as ParsedLikeC4ModelData, E as ElementSpecification$1, p as RelationshipSpecification, T as TagSpecification } from '../shared/core.DdMJk7nx.mjs';
|
|
5
|
+
import { f as Element, h as ModelRelation, n as AnyViewRuleStyle, r as AutoLayoutDirection, aa as ParsedElementView, j as LikeC4ProjectStylesConfig } from '../shared/core.fHR_8Tnq.mjs';
|
|
6
|
+
import { f as Participant, E as Expression, u as ElementShape, D as ThemeColor, s as BorderStyle, q as ShapeSize, r as SpacingSize, p as TextSize, y as RelationshipArrowType, v as RelationshipLineType } from '../shared/core.CQngdcuj.mjs';
|
|
6
7
|
import { ModelFqnExpr, ModelRelationExpr } from '../types/expression-model.mjs';
|
|
7
|
-
import { N as NonEmptyArray, K as KeysOf } from '../shared/core.
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
8
|
+
import { N as NonEmptyArray, K as KeysOf } from '../shared/core.D5fzJWbF.mjs';
|
|
9
|
+
import { O as setProject, a as Aux, S as SpecAux, A as Any } from '../shared/core.Dgs6-nuz.mjs';
|
|
10
|
+
import '../shared/core.yna0OdV5.mjs';
|
|
10
11
|
import '../shared/core.CywrQs86.mjs';
|
|
11
12
|
import '../types/fqnRef.mjs';
|
|
12
13
|
|
|
@@ -180,13 +181,13 @@ interface AddElement<Id extends string> {
|
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
interface ModelBuilder<T extends AnyTypes> extends Builder<T> {
|
|
183
|
-
__addElement(element: Element): Builder<T>;
|
|
184
|
-
__addRelation(relation: Omit<ModelRelation, 'id'>): Builder<T>;
|
|
184
|
+
__addElement(this: void, element: Element): Builder<T>;
|
|
185
|
+
__addRelation(this: void, relation: Omit<ModelRelation, 'id'>): Builder<T>;
|
|
185
186
|
/**
|
|
186
187
|
* Create a fully qualified name from an id (for nested models)
|
|
187
188
|
*/
|
|
188
|
-
__fqn(id: string): Fqn;
|
|
189
|
-
__addSourcelessRelation(relation: Omit<ModelRelation, 'id' | 'source'>): Builder<T>;
|
|
189
|
+
__fqn(this: void, id: string): Fqn;
|
|
190
|
+
__addSourcelessRelation(this: void, relation: Omit<ModelRelation, 'id' | 'source'>): Builder<T>;
|
|
190
191
|
}
|
|
191
192
|
declare function model<A extends AnyTypes>(): (input: Builder<A>) => Builder<A>;
|
|
192
193
|
declare function model<A extends AnyTypes, B extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>): (input: Builder<A>) => Builder<B>;
|
|
@@ -652,6 +653,7 @@ type BuilderSpecification = {
|
|
|
652
653
|
type BuilderProjectSpecification = {
|
|
653
654
|
id: string;
|
|
654
655
|
title?: string;
|
|
656
|
+
styles?: PartialDeep<LikeC4ProjectStylesConfig>;
|
|
655
657
|
};
|
|
656
658
|
type Metadata<MetadataKey extends string> = IsNever<MetadataKey> extends true ? never : IsLiteral<MetadataKey> extends true ? {
|
|
657
659
|
[key in MetadataKey]?: string;
|
package/dist/builder/index.mjs
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import defu from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { d as defu, t as t$6 } from '../shared/core.DNbUPnve.mjs';
|
|
2
|
+
import { t as t$1, a as t$7 } from '../shared/core.BsSXS-_R.mjs';
|
|
3
|
+
import { a as t$5 } from '../shared/core.C8sl5Y8Z.mjs';
|
|
4
|
+
import { s as e, d as isElementView } from '../shared/core.BzTakU3I.mjs';
|
|
5
|
+
import { e as e$3 } from '../shared/core.DRJma0Ol.mjs';
|
|
6
|
+
import { a as _type, k as e$2, _ as _stage, c as isDeployedInstance } from '../shared/core.BYNkXQ8A.mjs';
|
|
7
|
+
import { t as t$2 } from '../shared/core.CbT8JVYL.mjs';
|
|
8
|
+
import { a as t$3, b as t$4, c as computeLikeC4Model } from '../shared/core.DSO_rTC2.mjs';
|
|
9
|
+
import { n as nameFromFqn, d as isSameHierarchy, p as parentFqn } from '../shared/core.DRhg-gVU.mjs';
|
|
10
|
+
import { e as e$1 } from '../shared/core.CqAJJpK_.mjs';
|
|
5
11
|
import { ModelFqnExpr } from '../types/expression-model.mjs';
|
|
6
|
-
import { a as _type, _ as _stage, c as isDeployedInstance } from '../shared/core.CXy1NLUG.mjs';
|
|
7
12
|
import { i as invariant } from '../shared/core.D4npX2q8.mjs';
|
|
8
|
-
import {
|
|
13
|
+
import { e as exact } from '../shared/core.01VTr9qu.mjs';
|
|
9
14
|
import { FqnRef } from '../types/fqnRef.mjs';
|
|
10
|
-
|
|
15
|
+
|
|
16
|
+
function t(...t){return t$1(Object.fromEntries,t)}
|
|
11
17
|
|
|
12
18
|
function parseWhere(where) {
|
|
13
|
-
if (
|
|
19
|
+
if (e$1(where)) {
|
|
14
20
|
const op = where;
|
|
15
21
|
switch (true) {
|
|
16
22
|
case op.startsWith("tag is not #"):
|
|
@@ -57,12 +63,12 @@ function parseWhere(where) {
|
|
|
57
63
|
}
|
|
58
64
|
if (where.and) {
|
|
59
65
|
return {
|
|
60
|
-
and:
|
|
66
|
+
and: t$2(where.and, parseWhere)
|
|
61
67
|
};
|
|
62
68
|
}
|
|
63
69
|
if (where.or) {
|
|
64
70
|
return {
|
|
65
|
-
or:
|
|
71
|
+
or: t$2(where.or, parseWhere)
|
|
66
72
|
};
|
|
67
73
|
}
|
|
68
74
|
if (where.not) {
|
|
@@ -127,7 +133,7 @@ function $exclude(...args) {
|
|
|
127
133
|
}
|
|
128
134
|
function $style(element, { notation, ...style }) {
|
|
129
135
|
return (b) => b.style({
|
|
130
|
-
targets: (
|
|
136
|
+
targets: (e(element) ? element : [element]).map((e) => b.$expr(e)),
|
|
131
137
|
...notation ? { notation } : {},
|
|
132
138
|
style: {
|
|
133
139
|
...style
|
|
@@ -142,7 +148,7 @@ function $rules(...rules) {
|
|
|
142
148
|
}
|
|
143
149
|
|
|
144
150
|
function $deploymentExpr(expr) {
|
|
145
|
-
if (!
|
|
151
|
+
if (!e$1(expr)) {
|
|
146
152
|
return expr;
|
|
147
153
|
}
|
|
148
154
|
const asTypedDeploymentExpression = (expr2) => {
|
|
@@ -216,7 +222,7 @@ const asTypedExpr = (expr) => {
|
|
|
216
222
|
return expr;
|
|
217
223
|
};
|
|
218
224
|
function $expr(expr) {
|
|
219
|
-
if (!
|
|
225
|
+
if (!e$1(expr)) {
|
|
220
226
|
return expr;
|
|
221
227
|
}
|
|
222
228
|
if (expr === "*") {
|
|
@@ -321,7 +327,7 @@ function mkViewBuilder(view) {
|
|
|
321
327
|
}
|
|
322
328
|
|
|
323
329
|
function ensureObj(value) {
|
|
324
|
-
return
|
|
330
|
+
return e(value) ? t$6(value, (_) => ({})) : value;
|
|
325
331
|
}
|
|
326
332
|
function validateSpec({ tags, elements, deployments, relationships, ...specification }) {
|
|
327
333
|
const spectags = {};
|
|
@@ -332,7 +338,7 @@ function validateSpec({ tags, elements, deployments, relationships, ...specifica
|
|
|
332
338
|
);
|
|
333
339
|
}
|
|
334
340
|
const _elements = ensureObj(elements);
|
|
335
|
-
for (const [kind, spec] of
|
|
341
|
+
for (const [kind, spec] of t$5(_elements)) {
|
|
336
342
|
if (spec.tags) {
|
|
337
343
|
for (const tag of spec.tags) {
|
|
338
344
|
invariant(tag in spectags, `Invalid specification for element kind "${kind}": tag "${tag}" not found`);
|
|
@@ -340,7 +346,7 @@ function validateSpec({ tags, elements, deployments, relationships, ...specifica
|
|
|
340
346
|
}
|
|
341
347
|
}
|
|
342
348
|
const _deployments = ensureObj(deployments ?? {});
|
|
343
|
-
for (const [kind, spec] of
|
|
349
|
+
for (const [kind, spec] of t$5(_deployments)) {
|
|
344
350
|
if (spec.tags) {
|
|
345
351
|
for (const tag of spec.tags) {
|
|
346
352
|
invariant(
|
|
@@ -369,22 +375,19 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
369
375
|
elements: structuredClone(spec.elements),
|
|
370
376
|
deployments: structuredClone(spec.deployments),
|
|
371
377
|
relationships: structuredClone(spec.relationships),
|
|
372
|
-
tags:
|
|
373
|
-
|
|
374
|
-
...tagSpec
|
|
375
|
-
})),
|
|
376
|
-
...!!spec.metadataKeys ? { metadataKeys: spec.metadataKeys } : {},
|
|
378
|
+
tags: structuredClone(spec.tags),
|
|
379
|
+
...spec.metadataKeys ? { metadataKeys: spec.metadataKeys } : {},
|
|
377
380
|
customColors: {}
|
|
378
381
|
};
|
|
379
382
|
};
|
|
380
383
|
const mapLinks = (links) => {
|
|
381
|
-
if (!links || !
|
|
382
|
-
return
|
|
384
|
+
if (!links || !t$7(links, 1)) {
|
|
385
|
+
return void 0;
|
|
383
386
|
}
|
|
384
|
-
return
|
|
387
|
+
return t$2(links, (l) => typeof l === "string" ? { url: l } : l);
|
|
385
388
|
};
|
|
386
389
|
const createGenericView = (id, _props, builder2) => {
|
|
387
|
-
if (
|
|
390
|
+
if (e$3(_props)) {
|
|
388
391
|
builder2 = _props;
|
|
389
392
|
_props = {};
|
|
390
393
|
}
|
|
@@ -397,15 +400,18 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
397
400
|
...props
|
|
398
401
|
} = typeof _props === "string" ? { title: _props } : { ..._props };
|
|
399
402
|
const links = mapLinks(_links);
|
|
400
|
-
return [
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
403
|
+
return [
|
|
404
|
+
exact({
|
|
405
|
+
id,
|
|
406
|
+
title,
|
|
407
|
+
description: description ? { txt: description } : null,
|
|
408
|
+
tags,
|
|
409
|
+
links,
|
|
410
|
+
_stage: "parsed",
|
|
411
|
+
...props
|
|
412
|
+
}),
|
|
413
|
+
builder2
|
|
414
|
+
];
|
|
409
415
|
};
|
|
410
416
|
const self = {
|
|
411
417
|
get Types() {
|
|
@@ -438,9 +444,9 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
438
444
|
},
|
|
439
445
|
__addRelation(relation) {
|
|
440
446
|
const sourceEl = _elements.get(FqnRef.flatten(relation.source));
|
|
441
|
-
invariant(sourceEl, `Element with id "${relation.source}" not found`);
|
|
447
|
+
invariant(sourceEl, `Element with id "${relation.source.model}" not found`);
|
|
442
448
|
const targetEl = _elements.get(FqnRef.flatten(relation.target));
|
|
443
|
-
invariant(targetEl, `Element with id "${relation.target}" not found`);
|
|
449
|
+
invariant(targetEl, `Element with id "${relation.target.model}" not found`);
|
|
444
450
|
invariant(
|
|
445
451
|
!isSameHierarchy(sourceEl, targetEl),
|
|
446
452
|
"Cannot create relationship between elements in the same hierarchy"
|
|
@@ -523,22 +529,22 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
523
529
|
...project
|
|
524
530
|
},
|
|
525
531
|
specification: toLikeC4Specification(),
|
|
526
|
-
elements:
|
|
532
|
+
elements: t(
|
|
527
533
|
structuredClone(
|
|
528
534
|
Array.from(_elements.entries())
|
|
529
535
|
)
|
|
530
536
|
),
|
|
531
|
-
relations:
|
|
537
|
+
relations: t$4(_relations, (r) => [r.id, structuredClone(r)]),
|
|
532
538
|
globals: structuredClone(_globals),
|
|
533
539
|
deployments: {
|
|
534
|
-
elements:
|
|
540
|
+
elements: t(
|
|
535
541
|
structuredClone(
|
|
536
542
|
Array.from(_deployments.entries())
|
|
537
543
|
)
|
|
538
544
|
),
|
|
539
|
-
relations:
|
|
545
|
+
relations: t$4(_deploymentRelations, (r) => [r.id, structuredClone(r)])
|
|
540
546
|
},
|
|
541
|
-
views:
|
|
547
|
+
views: t(
|
|
542
548
|
structuredClone(
|
|
543
549
|
Array.from(_views.entries())
|
|
544
550
|
)
|
|
@@ -568,7 +574,7 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
568
574
|
{ title: null, links: null }
|
|
569
575
|
);
|
|
570
576
|
const links = mapLinks(_links);
|
|
571
|
-
b.__addRelation({
|
|
577
|
+
b.__addRelation(exact({
|
|
572
578
|
source: {
|
|
573
579
|
model: source
|
|
574
580
|
},
|
|
@@ -577,9 +583,9 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
577
583
|
},
|
|
578
584
|
title,
|
|
579
585
|
...description && { description: { txt: description } },
|
|
580
|
-
|
|
586
|
+
links,
|
|
581
587
|
...props
|
|
582
|
-
});
|
|
588
|
+
}));
|
|
583
589
|
return b;
|
|
584
590
|
};
|
|
585
591
|
},
|
|
@@ -587,63 +593,63 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
587
593
|
return (b) => {
|
|
588
594
|
const {
|
|
589
595
|
title = "",
|
|
590
|
-
links
|
|
596
|
+
links,
|
|
591
597
|
description = null,
|
|
592
598
|
...props
|
|
593
599
|
} = defu(
|
|
594
600
|
typeof _props === "string" ? { title: _props } : { ..._props },
|
|
595
601
|
{ title: null, links: null }
|
|
596
602
|
);
|
|
597
|
-
|
|
598
|
-
b.__addSourcelessRelation({
|
|
603
|
+
b.__addSourcelessRelation(exact({
|
|
599
604
|
target: {
|
|
600
605
|
model: target
|
|
601
606
|
},
|
|
602
607
|
title,
|
|
603
608
|
...description && { description: { txt: description } },
|
|
604
|
-
|
|
609
|
+
links: mapLinks(links),
|
|
605
610
|
...props
|
|
606
|
-
});
|
|
611
|
+
}));
|
|
607
612
|
return b;
|
|
608
613
|
};
|
|
609
614
|
},
|
|
610
|
-
...
|
|
615
|
+
...t$3(
|
|
611
616
|
spec.elements,
|
|
612
617
|
({ style: specStyle, ...spec2 }, kind) => (id, _props) => {
|
|
613
618
|
const add = ((b) => {
|
|
614
619
|
const {
|
|
615
|
-
links
|
|
620
|
+
links,
|
|
616
621
|
icon: _icon,
|
|
622
|
+
color,
|
|
623
|
+
shape,
|
|
617
624
|
style,
|
|
618
625
|
title,
|
|
619
626
|
description,
|
|
620
627
|
summary,
|
|
621
628
|
...props
|
|
622
629
|
} = typeof _props === "string" ? { title: _props } : { ..._props };
|
|
623
|
-
const links = mapLinks(_links);
|
|
624
630
|
const icon = _icon ?? specStyle?.icon;
|
|
625
631
|
const _id = b.__fqn(id);
|
|
626
|
-
b.__addElement({
|
|
632
|
+
b.__addElement(exact({
|
|
627
633
|
id: _id,
|
|
628
634
|
kind,
|
|
629
635
|
title: title ?? nameFromFqn(_id),
|
|
630
636
|
...description && { description: { txt: description } },
|
|
631
637
|
...summary && { summary: { txt: summary } },
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
638
|
+
style: exact({
|
|
639
|
+
icon,
|
|
640
|
+
color: color ?? specStyle?.color,
|
|
641
|
+
shape: shape ?? specStyle?.shape,
|
|
635
642
|
border: specStyle?.border,
|
|
636
643
|
opacity: specStyle?.opacity,
|
|
637
644
|
size: specStyle?.size,
|
|
638
645
|
padding: specStyle?.padding,
|
|
639
646
|
textSize: specStyle?.textSize,
|
|
640
647
|
...style
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
...icon && { icon },
|
|
648
|
+
}),
|
|
649
|
+
links: mapLinks(links),
|
|
644
650
|
...spec2,
|
|
645
651
|
...props
|
|
646
|
-
});
|
|
652
|
+
}));
|
|
647
653
|
return b;
|
|
648
654
|
});
|
|
649
655
|
add.with = (...ops) => (b) => {
|
|
@@ -763,7 +769,7 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
763
769
|
},
|
|
764
770
|
instanceOf: (id, target, _props) => {
|
|
765
771
|
return (b) => {
|
|
766
|
-
if (
|
|
772
|
+
if (e$2(target)) {
|
|
767
773
|
target = id;
|
|
768
774
|
id = nameFromFqn(id);
|
|
769
775
|
} else if (typeof target === "string") {
|
|
@@ -778,19 +784,31 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
778
784
|
title,
|
|
779
785
|
description,
|
|
780
786
|
summary,
|
|
787
|
+
icon,
|
|
788
|
+
color,
|
|
789
|
+
shape,
|
|
790
|
+
style,
|
|
781
791
|
...props
|
|
782
792
|
} = typeof _props === "string" ? { title: _props } : { ..._props };
|
|
783
793
|
const _id = b.__deploymentFqn(id);
|
|
784
794
|
invariant(_elements.has(target), `Target element with id "${target}" not found`);
|
|
785
|
-
b.__addDeployment(
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
795
|
+
b.__addDeployment(
|
|
796
|
+
exact({
|
|
797
|
+
id: _id,
|
|
798
|
+
element: target,
|
|
799
|
+
...title && { title },
|
|
800
|
+
...summary && { summary: { txt: summary } },
|
|
801
|
+
...description && { description: { txt: description } },
|
|
802
|
+
style: exact({
|
|
803
|
+
icon,
|
|
804
|
+
color,
|
|
805
|
+
shape,
|
|
806
|
+
...style
|
|
807
|
+
}),
|
|
808
|
+
links: mapLinks(links),
|
|
809
|
+
...props
|
|
810
|
+
})
|
|
811
|
+
);
|
|
794
812
|
return b;
|
|
795
813
|
};
|
|
796
814
|
},
|
|
@@ -802,7 +820,7 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
802
820
|
description = null,
|
|
803
821
|
...props
|
|
804
822
|
} = typeof _props === "string" ? { title: _props } : { ..._props };
|
|
805
|
-
b.__addDeploymentRelation({
|
|
823
|
+
b.__addDeploymentRelation(exact({
|
|
806
824
|
source: {
|
|
807
825
|
deployment: source
|
|
808
826
|
},
|
|
@@ -811,13 +829,13 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
811
829
|
},
|
|
812
830
|
title,
|
|
813
831
|
...description && { description: { txt: description } },
|
|
814
|
-
|
|
832
|
+
links: mapLinks(links),
|
|
815
833
|
...props
|
|
816
|
-
});
|
|
834
|
+
}));
|
|
817
835
|
return b;
|
|
818
836
|
};
|
|
819
837
|
},
|
|
820
|
-
...
|
|
838
|
+
...t$3(
|
|
821
839
|
spec.deployments ?? {},
|
|
822
840
|
({ style: specStyle, ...spec2 }, kind) => (id, _props) => {
|
|
823
841
|
const add = ((b) => {
|
|
@@ -828,33 +846,35 @@ function builder(_spec, _elements = /* @__PURE__ */ new Map(), _relations = [],
|
|
|
828
846
|
title,
|
|
829
847
|
description,
|
|
830
848
|
summary,
|
|
849
|
+
color,
|
|
850
|
+
shape,
|
|
831
851
|
...props
|
|
832
852
|
} = typeof _props === "string" ? { title: _props } : { ..._props };
|
|
833
853
|
const icon = _icon ?? specStyle?.icon;
|
|
834
854
|
const _id = b.__deploymentFqn(id);
|
|
835
|
-
b.__addDeployment(
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
855
|
+
b.__addDeployment(
|
|
856
|
+
exact({
|
|
857
|
+
id: _id,
|
|
858
|
+
kind,
|
|
859
|
+
title: title ?? nameFromFqn(_id),
|
|
860
|
+
...description && { description: { txt: description } },
|
|
861
|
+
...summary && { summary: { txt: summary } },
|
|
862
|
+
style: exact({
|
|
863
|
+
icon,
|
|
864
|
+
color: color ?? specStyle?.color,
|
|
865
|
+
shape: shape ?? specStyle?.shape,
|
|
846
866
|
border: specStyle?.border,
|
|
847
867
|
opacity: specStyle?.opacity,
|
|
848
868
|
size: specStyle?.size,
|
|
849
869
|
padding: specStyle?.padding,
|
|
850
870
|
textSize: specStyle?.textSize,
|
|
851
871
|
...style
|
|
852
|
-
},
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
872
|
+
}),
|
|
873
|
+
links: mapLinks(links),
|
|
874
|
+
...spec2,
|
|
875
|
+
...props
|
|
876
|
+
})
|
|
877
|
+
);
|
|
858
878
|
return b;
|
|
859
879
|
});
|
|
860
880
|
add.with = (...ops) => (b) => {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { A as Any } from '../shared/core.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { A as Any } from '../shared/core.Dgs6-nuz.mjs';
|
|
2
|
+
import { f as LikeC4Model } from '../shared/core.D0PjZzIS.mjs';
|
|
3
|
+
import { P as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, r as ParsedView, u as ComputedView } from '../shared/core.DdMJk7nx.mjs';
|
|
4
4
|
import 'type-fest';
|
|
5
|
-
import '../shared/core.
|
|
5
|
+
import '../shared/core.D5fzJWbF.mjs';
|
|
6
6
|
import '../shared/core.DX-WYEPA.mjs';
|
|
7
|
-
import '../shared/core.
|
|
8
|
-
import '../shared/core.
|
|
9
|
-
import '../shared/core.CUG6vpyL.mjs';
|
|
7
|
+
import '../shared/core.yna0OdV5.mjs';
|
|
8
|
+
import '../shared/core.CQngdcuj.mjs';
|
|
10
9
|
import '../types/fqnRef.mjs';
|
|
10
|
+
import '../shared/core.fHR_8Tnq.mjs';
|
|
11
11
|
import '../types/expression-model.mjs';
|
|
12
|
+
import '../shared/core.CywrQs86.mjs';
|
|
12
13
|
|
|
13
14
|
type ComputeViewResult<V> = {
|
|
14
15
|
isSuccess: true;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { c as computeLikeC4Model,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { w as willCreateCycle, t as topologicalSortExports, a as t$1, b as t$2, n as n$1 } from '../shared/core.DSO_rTC2.mjs';
|
|
2
|
+
export { c as computeLikeC4Model, d as computeParsedModelData, e as computeView, u as unsafeComputeView } from '../shared/core.DSO_rTC2.mjs';
|
|
3
|
+
import { n } from '../shared/core.BIqHjQiH.mjs';
|
|
4
|
+
import { t } from '../shared/core.C8sl5Y8Z.mjs';
|
|
5
|
+
import { f as isExtendsElementView, d as isElementView } from '../shared/core.BzTakU3I.mjs';
|
|
6
|
+
import { G as Graph } from '../shared/core.CNgZvKb8.mjs';
|
|
7
|
+
import { c as isNonEmptyArray } from '../shared/core.DRhg-gVU.mjs';
|
|
8
|
+
import { t as t$3 } from '../shared/core.CbT8JVYL.mjs';
|
|
6
9
|
|
|
7
10
|
function resolveRulesExtendedViews(unresolvedViews) {
|
|
8
11
|
const g = new Graph({
|
|
9
12
|
type: "directed"
|
|
10
13
|
});
|
|
11
14
|
const extendedViews = [];
|
|
12
|
-
for (const view of
|
|
15
|
+
for (const view of t(unresolvedViews)) {
|
|
13
16
|
g.addNode(view.id, { view });
|
|
14
17
|
if (isExtendsElementView(view)) {
|
|
15
18
|
extendedViews.push(view);
|
|
@@ -40,7 +43,7 @@ function resolveRulesExtendedViews(unresolvedViews) {
|
|
|
40
43
|
if (!extendsFrom || !isElementView(extendsFrom)) {
|
|
41
44
|
return acc;
|
|
42
45
|
}
|
|
43
|
-
const tags =
|
|
46
|
+
const tags = n([
|
|
44
47
|
...extendsFrom.tags ?? [],
|
|
45
48
|
...view.tags ?? []
|
|
46
49
|
]);
|
|
@@ -62,7 +65,7 @@ function resolveRulesExtendedViews(unresolvedViews) {
|
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
function withReadableEdges({ edges, nodes, ...view }, separator = ":") {
|
|
65
|
-
const edgeids =
|
|
68
|
+
const edgeids = t$2(edges, (e) => [e.id, `${e.source}${separator}${e.target}`]);
|
|
66
69
|
return {
|
|
67
70
|
...view,
|
|
68
71
|
edges: edges.map((e) => ({
|
|
@@ -71,8 +74,8 @@ function withReadableEdges({ edges, nodes, ...view }, separator = ":") {
|
|
|
71
74
|
})),
|
|
72
75
|
nodes: nodes.map((n) => ({
|
|
73
76
|
...n,
|
|
74
|
-
inEdges:
|
|
75
|
-
outEdges:
|
|
77
|
+
inEdges: t$3(n.inEdges, (e) => edgeids[e]),
|
|
78
|
+
outEdges: t$3(n.outEdges, (e) => edgeids[e])
|
|
76
79
|
})),
|
|
77
80
|
nodeIds: nodes.map((n) => n.id),
|
|
78
81
|
edgeIds: edges.map((e) => edgeids[e.id])
|
|
@@ -81,7 +84,7 @@ function withReadableEdges({ edges, nodes, ...view }, separator = ":") {
|
|
|
81
84
|
function viewsWithReadableEdges({ views, ...model }) {
|
|
82
85
|
return {
|
|
83
86
|
...model,
|
|
84
|
-
views:
|
|
87
|
+
views: t$1(views, (v) => n$1(withReadableEdges(v), ["nodeIds", "edgeIds"]))
|
|
85
88
|
};
|
|
86
89
|
}
|
|
87
90
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { A as Any, U as Unknown, k as ElementId, V as ViewId } from '../../shared/core.
|
|
2
|
-
import { E as ElementModel, R as RelationshipModel,
|
|
1
|
+
import { A as Any, U as Unknown, k as ElementId, V as ViewId } from '../../shared/core.Dgs6-nuz.mjs';
|
|
2
|
+
import { E as ElementModel, R as RelationshipModel, f as LikeC4Model } from '../../shared/core.D0PjZzIS.mjs';
|
|
3
3
|
import 'type-fest';
|
|
4
|
-
import '../../shared/core.
|
|
4
|
+
import '../../shared/core.D5fzJWbF.mjs';
|
|
5
5
|
import '../../shared/core.DX-WYEPA.mjs';
|
|
6
|
-
import '../../shared/core.
|
|
7
|
-
import '../../shared/core.
|
|
8
|
-
import '../../types/expression-model.mjs';
|
|
9
|
-
import '../../shared/core.CUG6vpyL.mjs';
|
|
6
|
+
import '../../shared/core.yna0OdV5.mjs';
|
|
7
|
+
import '../../shared/core.CQngdcuj.mjs';
|
|
10
8
|
import '../../types/fqnRef.mjs';
|
|
11
|
-
import '../../shared/core.
|
|
9
|
+
import '../../shared/core.fHR_8Tnq.mjs';
|
|
10
|
+
import '../../types/expression-model.mjs';
|
|
11
|
+
import '../../shared/core.CywrQs86.mjs';
|
|
12
|
+
import '../../shared/core.DdMJk7nx.mjs';
|
|
12
13
|
|
|
13
14
|
type RelationshipsViewData<M extends Any = Unknown> = {
|
|
14
15
|
incomers: ReadonlySet<ElementModel<M>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as sortParentsFirst, b as isDescendantOf, i as isAncestor } from '../../shared/core.
|
|
3
|
-
import { D as DefaultMap } from '../../shared/core.
|
|
1
|
+
import { t } from '../../shared/core.OHD4KXm9.mjs';
|
|
2
|
+
import { f as sortParentsFirst, b as isDescendantOf, i as isAncestor } from '../../shared/core.DRhg-gVU.mjs';
|
|
3
|
+
import { D as DefaultMap } from '../../shared/core.BbE4y-yl.mjs';
|
|
4
4
|
import { a as nonNullable, i as invariant } from '../../shared/core.D4npX2q8.mjs';
|
|
5
|
-
import {
|
|
6
|
-
import { i as ifilter } from '../../shared/core.
|
|
5
|
+
import { t as toSet, a as toArray, i as imap } from '../../shared/core.C3JowhaZ.mjs';
|
|
6
|
+
import { i as ifilter } from '../../shared/core.DRJma0Ol.mjs';
|
|
7
7
|
|
|
8
8
|
function treeFromElements(elements) {
|
|
9
9
|
const sorted = sortParentsFirst([...elements]);
|
|
@@ -169,7 +169,7 @@ function computeScopedRelationshipsView(subjectId, view, likec4model) {
|
|
|
169
169
|
const isDescendant = isDescendantOf(subject);
|
|
170
170
|
const others = /* @__PURE__ */ new Set([
|
|
171
171
|
...subject.ascendingSiblings(),
|
|
172
|
-
...
|
|
172
|
+
...t(
|
|
173
173
|
view.elements(),
|
|
174
174
|
imap((e) => e.element),
|
|
175
175
|
ifilter((e) => e !== subject && isDescendant(e))
|