@likec4/core 1.32.2 → 1.34.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 +6 -4
- package/dist/builder/index.mjs +45 -13
- package/dist/compute-view/index.d.mts +6 -4
- package/dist/compute-view/index.mjs +33 -10
- package/dist/compute-view/relationships-view/index.d.mts +6 -4
- package/dist/compute-view/relationships-view/index.mjs +6 -3
- package/dist/index.d.mts +9 -138
- package/dist/index.mjs +31 -3712
- package/dist/model/connection/deployment/index.d.mts +10 -0
- package/dist/model/connection/deployment/index.mjs +18 -0
- package/dist/model/connection/index.d.mts +70 -0
- package/dist/model/connection/index.mjs +23 -0
- package/dist/model/connection/model/index.d.mts +10 -0
- package/dist/model/connection/model/index.mjs +11 -0
- package/dist/model/index.d.mts +14 -256
- package/dist/model/index.mjs +27 -5
- package/dist/shared/{core.cbA9VZ02.mjs → core.4SpVCM9m.mjs} +31 -1073
- package/dist/shared/{core.BuO4ncfY.d.mts → core.668kXpZq.d.mts} +42 -52
- package/dist/shared/core.8KM0D6va.mjs +33 -0
- package/dist/shared/core.B0oEIXqd.mjs +47 -0
- package/dist/shared/core.BH9nN-_I.mjs +22 -0
- package/dist/shared/core.BMCb0wJI.mjs +177 -0
- package/dist/shared/core.BTnf14gD.mjs +331 -0
- package/dist/shared/core.BgvIuGGU.mjs +3 -0
- package/dist/shared/core.BoyJPEen.mjs +21 -0
- package/dist/shared/{core.CUYDgv2-.mjs → core.Br7Fab9l.mjs} +12 -15
- package/dist/shared/{core.BrCnZFTn.mjs → core.Btl47GOn.mjs} +3 -3
- package/dist/shared/core.ByrmCl9I.mjs +5 -0
- package/dist/shared/core.C80Z37Eu.mjs +29 -0
- package/dist/shared/{core.Pf5I9o0e.d.mts → core.CF82MWyh.d.mts} +1 -1
- package/dist/shared/core.CJSFKrYf.d.mts +83 -0
- package/dist/shared/{core.rmvsy0n3.mjs → core.C_C-3c1S.mjs} +5 -198
- package/dist/shared/{core.DoK86JEe.mjs → core.CpwrZi3D.mjs} +2 -73
- package/dist/shared/{core.CpXlRyE5.mjs → core.CtKXPqN_.mjs} +5 -36
- package/dist/shared/core.CxGKeL-L.mjs +144 -0
- package/dist/shared/core.CzdwsPmY.d.mts +69 -0
- package/dist/shared/core.D3xEWj5B.d.mts +41 -0
- package/dist/shared/{core.Cy9smucx.mjs → core.D4npX2q8.mjs} +1 -3
- package/dist/shared/core.D56nCp7e.mjs +168 -0
- package/dist/shared/core.D5qVzkws.mjs +724 -0
- package/dist/shared/{core.CBxTtXMi.d.mts → core.DAj3LuFH.d.mts} +58 -57
- package/dist/shared/{core.Bk7wEZFG.mjs → core.DXRAwwDB.mjs} +3 -2
- package/dist/shared/core.DcS-0zys.mjs +10 -0
- package/dist/shared/core.Di7__sMg.d.mts +87 -0
- package/dist/shared/{core.DaAyklhe.d.mts → core.DrS4Bf4y.d.mts} +31 -22
- package/dist/shared/core.DsMrjY2q.mjs +34 -0
- package/dist/shared/core.DuSLYTG6.d.mts +57 -0
- package/dist/shared/{core.Bdz6fBF1.d.mts → core.IWLie-Ma.d.mts} +92 -81
- package/dist/shared/{core.CBpKAlhj.mjs → core.PqNe5WxQ.mjs} +96 -56
- package/dist/shared/core.XptQjhMA.mjs +1295 -0
- package/dist/shared/core.zLlww-07.mjs +3 -0
- package/dist/theme/index.d.mts +134 -0
- package/dist/theme/index.mjs +3709 -0
- package/dist/types/_aux.d.mts +4 -0
- package/dist/types/index.d.mts +9 -5
- package/dist/types/index.mjs +17 -146
- package/dist/utils/index.d.mts +15 -100
- package/dist/utils/index.mjs +25 -1315
- package/dist/utils/iterable/index.d.mts +100 -0
- package/dist/utils/iterable/index.mjs +24 -0
- package/package.json +29 -13
- package/src/builder/Builder.ts +13 -4
- package/src/builder/__snapshots__/Builder-style1.spec.ts.snap +0 -13
- package/src/builder/__snapshots__/Builder-style2.compute-model.json5 +2 -6
- package/src/builder/__snapshots__/Builder-style2.spec.ts.snap +0 -7
- package/src/compute-view/deployment-view/__test__/fixture.ts +15 -5
- package/src/compute-view/deployment-view/utils.ts +13 -13
- package/src/compute-view/dynamic-view/compute.ts +2 -1
- package/src/compute-view/element-view/__test__/__snapshots__/legacy.spec.ts.snap +2 -2
- package/src/compute-view/relationships-view/layout.ts +1 -1
- package/src/compute-view/utils/applyCustomElementProperties.ts +8 -0
- package/src/compute-view/utils/applyCustomRelationProperties.ts +2 -0
- package/src/compute-view/utils/buildComputedNodes.ts +4 -3
- package/src/compute-view/utils/merge-props-from-relationships.ts +6 -5
- package/src/compute-view/utils/view-hash.ts +24 -3
- package/src/model/DeploymentElementModel.ts +21 -17
- package/src/model/DeploymentModel.ts +1 -1
- package/src/model/ElementModel.ts +15 -5
- package/src/model/LikeC4Model.ts +1 -1
- package/src/model/RelationModel.ts +20 -17
- package/src/model/index.ts +2 -0
- package/src/model/types.ts +2 -1
- package/src/model/view/EdgeModel.ts +4 -3
- package/src/model/view/LikeC4ViewModel.ts +6 -1
- package/src/model/view/NodeModel.ts +5 -3
- package/src/theme/index.ts +12 -5
- package/src/types/RichText.ts +200 -0
- package/src/types/expression-model.ts +2 -2
- package/src/types/expression.ts +2 -2
- package/src/types/fqnRef.ts +2 -2
- package/src/types/global.ts +1 -1
- package/src/types/index.ts +4 -2
- package/src/types/model-data.ts +2 -2
- package/src/types/model-deployment.ts +6 -5
- package/src/types/model-dump.ts +1 -1
- package/src/types/model-logical.ts +5 -5
- package/src/types/model-spec.ts +2 -2
- package/src/types/operators.ts +2 -2
- package/src/types/scalar.ts +47 -2
- package/src/types/view-common.ts +3 -3
- package/src/types/view-computed.ts +4 -6
- package/src/types/view-layouted.ts +11 -2
- package/src/types/view-parsed.deployment.ts +1 -1
- package/src/types/view-parsed.dynamic.ts +2 -2
- package/src/types/view-parsed.element.ts +2 -2
- package/src/types/view.ts +2 -2
- package/src/utils/index.ts +4 -9
- package/src/utils/markdown/index.ts +2 -0
- package/src/utils/markdown/to-html.ts +32 -0
- package/src/utils/markdown/to-text.ts +14 -0
- package/dist/types/aux.d.mts +0 -3
- /package/dist/types/{aux.mjs → _aux.mjs} +0 -0
- /package/src/types/{aux.ts → _aux.ts} +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Simplify, MergeExclusive, Tagged, NonEmptyTuple, IsNever, IsAny } from 'type-fest';
|
|
2
|
+
import { A as Any, U as Unknown, g as ElementId, P as ProjectId, F as Fqn, s as DeploymentId, u as Tag, x as AllKinds, T as Tags, m as StrictViewId, k as ElementKind, W as WithOptionalTags, y as WithOptionalLinks, e as _stage, f as _type, z as WithMetadata, h as Metadata, R as RelationKind, V as ViewId, p as DeploymentFqn, D as DeploymentKind, j as MetadataKey, E as ExtractOnStage, M as ModelStage, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted, S as SpecAux, a as Aux, N as Never } from './core.DAj3LuFH.mjs';
|
|
3
|
+
import { E as ExclusiveUnion, N as NonEmptyArray, L as Link, K as KeysOf } from './core.DuSLYTG6.mjs';
|
|
4
|
+
import { I as Icon, M as MarkdownOrString, d as RelationId, T as Tag$1, N as NodeId, j as EdgeId, m as StepEdgeKind } from './core.668kXpZq.mjs';
|
|
5
|
+
import { i as Color, R as RelationshipLineType, f as RelationshipArrowType, c as ElementShape, b as BorderStyle, a as ShapeSize, S as SpacingSize, T as TextSize, h as ThemeColor, C as ColorLiteral, e as CustomColorDefinitions } from './core.CzdwsPmY.mjs';
|
|
4
6
|
|
|
5
7
|
declare namespace FqnRef {
|
|
6
8
|
/**
|
|
@@ -107,72 +109,6 @@ type Filterable<A extends Any> = {
|
|
|
107
109
|
type OperatorPredicate<A extends Any> = (value: Filterable<A>) => boolean;
|
|
108
110
|
declare function whereOperatorAsPredicate<A extends Any>(operator: WhereOperator<A>): OperatorPredicate<A>;
|
|
109
111
|
|
|
110
|
-
/**
|
|
111
|
-
* For padding, margin, etc.
|
|
112
|
-
*/
|
|
113
|
-
type SpacingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
114
|
-
type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
115
|
-
type ShapeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
116
|
-
declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
|
|
117
|
-
type BorderStyle = TupleToUnion<typeof BorderStyles>;
|
|
118
|
-
declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
|
|
119
|
-
type ElementShape = TupleToUnion<typeof ElementShapes>;
|
|
120
|
-
type HexColor = `#${string}`;
|
|
121
|
-
type ColorLiteral = HexColor | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})`;
|
|
122
|
-
type CustomColor<T = string> = Tagged<T, 'CustomColor'>;
|
|
123
|
-
type CustomColorDefinitions = {
|
|
124
|
-
[key: string]: ThemeColorValues;
|
|
125
|
-
};
|
|
126
|
-
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
127
|
-
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
128
|
-
declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
|
|
129
|
-
type ThemeColor = typeof ThemeColors[number];
|
|
130
|
-
/**
|
|
131
|
-
* Backward compatibility alias
|
|
132
|
-
* @deprecated Use {@link ThemeColor} instead
|
|
133
|
-
*/
|
|
134
|
-
type Color = ThemeColor | ColorLiteral;
|
|
135
|
-
declare function isThemeColor(color: string): color is ThemeColor;
|
|
136
|
-
interface ElementThemeColorValues {
|
|
137
|
-
fill: ColorLiteral;
|
|
138
|
-
stroke: ColorLiteral;
|
|
139
|
-
hiContrast: ColorLiteral;
|
|
140
|
-
loContrast: ColorLiteral;
|
|
141
|
-
}
|
|
142
|
-
type ElementThemeColors = {
|
|
143
|
-
[key in ThemeColor]: ElementThemeColorValues;
|
|
144
|
-
};
|
|
145
|
-
interface RelationshipThemeColorValues {
|
|
146
|
-
lineColor: ColorLiteral;
|
|
147
|
-
labelBgColor: ColorLiteral;
|
|
148
|
-
labelColor: ColorLiteral;
|
|
149
|
-
}
|
|
150
|
-
interface ThemeColorValues {
|
|
151
|
-
elements: ElementThemeColorValues;
|
|
152
|
-
relationships: RelationshipThemeColorValues;
|
|
153
|
-
}
|
|
154
|
-
type RelationshipThemeColors = {
|
|
155
|
-
[key in ThemeColor]: RelationshipThemeColorValues;
|
|
156
|
-
};
|
|
157
|
-
interface LikeC4Theme {
|
|
158
|
-
font: 'Arial';
|
|
159
|
-
shadow: ColorLiteral;
|
|
160
|
-
relationships: RelationshipThemeColors;
|
|
161
|
-
elements: ElementThemeColors;
|
|
162
|
-
sizes: {
|
|
163
|
-
[key in ShapeSize]: {
|
|
164
|
-
width: number;
|
|
165
|
-
height: number;
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
spacing: {
|
|
169
|
-
[key in SpacingSize]: number;
|
|
170
|
-
};
|
|
171
|
-
textSizes: {
|
|
172
|
-
[key in TextSize]: number;
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
|
|
176
112
|
type PredicateSelector = 'children' | 'expanded' | 'descendants';
|
|
177
113
|
declare namespace FqnExpr {
|
|
178
114
|
type Wildcard = {
|
|
@@ -646,7 +582,7 @@ type ViewType = 'element' | 'dynamic' | 'deployment';
|
|
|
646
582
|
interface BaseViewProperties<A extends Any> extends WithOptionalTags<A>, WithOptionalLinks {
|
|
647
583
|
readonly id: StrictViewId<A>;
|
|
648
584
|
readonly title: string | null;
|
|
649
|
-
readonly description:
|
|
585
|
+
readonly description: MarkdownOrString | null;
|
|
650
586
|
/**
|
|
651
587
|
* For all views we find common ancestor path.
|
|
652
588
|
* This is used to generate relative paths, i.e.:
|
|
@@ -809,7 +745,7 @@ interface Element<A extends Any = Any> extends WithOptionalTags<A>, WithOptional
|
|
|
809
745
|
readonly id: Fqn<A>;
|
|
810
746
|
readonly kind: ElementKind<A>;
|
|
811
747
|
readonly title: string;
|
|
812
|
-
readonly description?:
|
|
748
|
+
readonly description?: MarkdownOrString | null;
|
|
813
749
|
readonly technology?: string | null;
|
|
814
750
|
readonly tags?: Tags<A> | null;
|
|
815
751
|
readonly links?: readonly Link[] | null;
|
|
@@ -817,7 +753,7 @@ interface Element<A extends Any = Any> extends WithOptionalTags<A>, WithOptional
|
|
|
817
753
|
readonly shape?: ElementShape;
|
|
818
754
|
readonly color?: Color;
|
|
819
755
|
readonly style?: ElementStyle;
|
|
820
|
-
readonly notation?: string;
|
|
756
|
+
readonly notation?: string | null;
|
|
821
757
|
readonly metadata?: Metadata<A>;
|
|
822
758
|
}
|
|
823
759
|
declare const DefaultLineStyle: RelationshipLineType;
|
|
@@ -826,7 +762,7 @@ declare const DefaultRelationshipColor: ThemeColor;
|
|
|
826
762
|
interface AbstractRelationship<A extends Any> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
|
|
827
763
|
readonly id: RelationId;
|
|
828
764
|
readonly title?: string | null;
|
|
829
|
-
readonly description?:
|
|
765
|
+
readonly description?: MarkdownOrString | null;
|
|
830
766
|
readonly technology?: string | null;
|
|
831
767
|
readonly kind?: RelationKind<A>;
|
|
832
768
|
readonly color?: Color;
|
|
@@ -861,12 +797,12 @@ interface DeploymentNode<A extends Any = Unknown> extends WithOptionalTags<A>, W
|
|
|
861
797
|
readonly id: DeploymentFqn<A>;
|
|
862
798
|
readonly kind: DeploymentKind<A>;
|
|
863
799
|
readonly title: string;
|
|
864
|
-
readonly description?:
|
|
800
|
+
readonly description?: MarkdownOrString | null;
|
|
865
801
|
readonly technology?: string | null;
|
|
866
802
|
readonly tags?: Tags<A> | null;
|
|
867
803
|
readonly links?: readonly Link[] | null;
|
|
868
804
|
readonly style: DeploymentElementStyle;
|
|
869
|
-
readonly notation?: string;
|
|
805
|
+
readonly notation?: string | null;
|
|
870
806
|
readonly metadata?: Metadata<A>;
|
|
871
807
|
}
|
|
872
808
|
interface DeployedInstance<A extends Any = Unknown> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
|
|
@@ -878,7 +814,7 @@ interface DeployedInstance<A extends Any = Unknown> extends WithOptionalTags<A>,
|
|
|
878
814
|
readonly id: DeploymentFqn<A>;
|
|
879
815
|
readonly element: Fqn<A>;
|
|
880
816
|
readonly title?: string;
|
|
881
|
-
readonly description?:
|
|
817
|
+
readonly description?: MarkdownOrString | null;
|
|
882
818
|
readonly technology?: string | null;
|
|
883
819
|
readonly tags?: Tags<A> | null;
|
|
884
820
|
readonly links?: readonly Link[] | null;
|
|
@@ -966,16 +902,14 @@ interface ComputedNode<A extends Any = Any> extends WithOptionalLinks {
|
|
|
966
902
|
parent: NodeId | null;
|
|
967
903
|
/**
|
|
968
904
|
* Reference to model element
|
|
969
|
-
* If 1 - node id is a reference
|
|
970
905
|
*/
|
|
971
906
|
modelRef?: Fqn<A> | undefined;
|
|
972
907
|
/**
|
|
973
908
|
* Reference to deployment element
|
|
974
|
-
* If 1 - node id is a reference
|
|
975
909
|
*/
|
|
976
910
|
deploymentRef?: DeploymentFqn<A> | undefined;
|
|
977
911
|
title: string;
|
|
978
|
-
description?:
|
|
912
|
+
description?: MarkdownOrString | null;
|
|
979
913
|
technology?: string | null;
|
|
980
914
|
notation?: string;
|
|
981
915
|
children: NodeId[];
|
|
@@ -1000,7 +934,7 @@ interface ComputedEdge<A extends Any = Any> extends WithOptionalTags<A> {
|
|
|
1000
934
|
source: NodeId;
|
|
1001
935
|
target: NodeId;
|
|
1002
936
|
label: string | null;
|
|
1003
|
-
description?:
|
|
937
|
+
description?: MarkdownOrString | null;
|
|
1004
938
|
technology?: string;
|
|
1005
939
|
relations: RelationId[];
|
|
1006
940
|
kind?: RelationKind<A> | typeof StepEdgeKind;
|
|
@@ -1261,4 +1195,81 @@ type LikeC4ModelDump = {
|
|
|
1261
1195
|
};
|
|
1262
1196
|
type AuxFromDump<D> = D extends LikeC4ModelDump ? Aux<D[_stage] extends infer S extends string & 'computed' | 'layouted' ? S : 'computed' | 'layouted' | 'parsed', KeysOf<D['elements']>, KeysOf<D['deployments']['elements']>, KeysOf<D['views']>, D['projectId'] extends infer P extends string ? P : never, SpecTypesFromDump<D['specification']>> : Never;
|
|
1263
1197
|
|
|
1264
|
-
|
|
1198
|
+
interface RichTextEmpty {
|
|
1199
|
+
readonly isEmpty: true;
|
|
1200
|
+
readonly isMarkdown: false;
|
|
1201
|
+
readonly nonEmpty: false;
|
|
1202
|
+
readonly $source: null;
|
|
1203
|
+
readonly text: null;
|
|
1204
|
+
readonly md: null;
|
|
1205
|
+
readonly html: null;
|
|
1206
|
+
equals(other: unknown): boolean;
|
|
1207
|
+
}
|
|
1208
|
+
interface RichTextNonEmpty {
|
|
1209
|
+
readonly isEmpty: false;
|
|
1210
|
+
readonly nonEmpty: true;
|
|
1211
|
+
readonly isMarkdown: boolean;
|
|
1212
|
+
readonly $source: MarkdownOrString;
|
|
1213
|
+
readonly text: string;
|
|
1214
|
+
readonly md: string;
|
|
1215
|
+
readonly html: string;
|
|
1216
|
+
equals(other: unknown): boolean;
|
|
1217
|
+
}
|
|
1218
|
+
type RichTextOrEmpty = RichTextNonEmpty | RichTextEmpty;
|
|
1219
|
+
/**
|
|
1220
|
+
* RichText is a class that represents a potentially markdown string.
|
|
1221
|
+
* It can be either a plain text or a markdown.
|
|
1222
|
+
* It is used to represent the content of a node or a link.
|
|
1223
|
+
*/
|
|
1224
|
+
declare class RichText {
|
|
1225
|
+
private static _cache;
|
|
1226
|
+
/**
|
|
1227
|
+
* Creates and memoizes a RichText instance.
|
|
1228
|
+
* @see ElementModel.description
|
|
1229
|
+
* @example
|
|
1230
|
+
*
|
|
1231
|
+
* get description(): RichTextOrEmpty {
|
|
1232
|
+
* return RichText.memoize(this, this.$element.description)
|
|
1233
|
+
* }
|
|
1234
|
+
*/
|
|
1235
|
+
static memoize(obj: object, source: MarkdownOrString | null | undefined): RichTextOrEmpty;
|
|
1236
|
+
/**
|
|
1237
|
+
* Creates a RichText instance from a source.
|
|
1238
|
+
*/
|
|
1239
|
+
static from(source: RichTextOrEmpty | MarkdownOrString | string | null | undefined): RichTextOrEmpty;
|
|
1240
|
+
/**
|
|
1241
|
+
* This is a workaround for the fact that we need instance of RichText for `instanceof` checks
|
|
1242
|
+
* It is invalid inheritance (returning `null` from getters), and we cast to @see RichTextEmpty
|
|
1243
|
+
*/
|
|
1244
|
+
static EMPTY: RichTextEmpty;
|
|
1245
|
+
readonly $source: Readonly<MarkdownOrString> | null;
|
|
1246
|
+
readonly isEmpty: boolean;
|
|
1247
|
+
readonly nonEmpty: boolean;
|
|
1248
|
+
readonly isMarkdown: boolean;
|
|
1249
|
+
/**
|
|
1250
|
+
* Private constructor to prevent direct instantiation.
|
|
1251
|
+
* Use {@link RichText.from} or {@link RichText.memoize} instead.
|
|
1252
|
+
*/
|
|
1253
|
+
private constructor();
|
|
1254
|
+
/**
|
|
1255
|
+
* Returns the text content of the rich text.
|
|
1256
|
+
* If the source is a string, it returns the string.
|
|
1257
|
+
* If the source is a markdown, it returns the markdown.
|
|
1258
|
+
*/
|
|
1259
|
+
get text(): string;
|
|
1260
|
+
/**
|
|
1261
|
+
* Returns the markdown content of the rich text.
|
|
1262
|
+
* If the source is a string, it returns the string.
|
|
1263
|
+
* If the source is a markdown, it returns the markdown.
|
|
1264
|
+
*/
|
|
1265
|
+
get md(): string;
|
|
1266
|
+
/**
|
|
1267
|
+
* Returns the html content of the rich text.
|
|
1268
|
+
* If the source is a string, it returns the string.
|
|
1269
|
+
* If the source is a markdown, it returns the HTML.
|
|
1270
|
+
*/
|
|
1271
|
+
get html(): string;
|
|
1272
|
+
equals(other: unknown): boolean;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
export { type TagSpecification as $, type AuxFromLikeC4ModelData as A, BBox as B, type ComputedLikeC4ModelData as C, type DeploymentElementStyle as D, Expression as E, FqnExpr as F, type GlobalPredicateId as G, DefaultThemeColor as H, DefaultElementShape as I, DefaultShapeSize as J, DefaultPaddingSize as K, type LayoutedLikeC4ModelData as L, ModelFqnExpr as M, DefaultTextSize as N, type ElementStyle as O, type PredicateSelector as P, type Element as Q, RichText as R, type SpecificationDump as S, DefaultLineStyle as T, DefaultArrowType as U, DefaultRelationshipColor as V, type AbstractRelationship as W, type XYPoint as X, type Relationship as Y, type ModelRelation as Z, type ElementSpecification as _, type RichTextEmpty as a, type DiagramNode as a$, isTagColorSpecified as a0, type RelationshipSpecification as a1, type Specification as a2, type EqualOperator as a3, type TagEqual as a4, isTagEqual as a5, type KindEqual as a6, isKindEqual as a7, type Participant as a8, type ParticipantOperator as a9, isExtendsElementView as aA, isDeploymentView as aB, isDynamicView as aC, type AnyIncludePredicate as aD, type AnyExcludePredicate as aE, type AnyViewRuleStyle as aF, type ViewRuleGlobalStyle as aG, isViewRuleGlobalStyle as aH, type ViewRuleGlobalPredicateRef as aI, isViewRuleGlobalPredicateRef as aJ, type AutoLayoutDirection as aK, isAutoLayoutDirection as aL, type ViewRuleAutoLayout as aM, isViewRuleAutoLayout as aN, type ViewAutoLayout as aO, type ViewManualLayout as aP, type ViewType as aQ, type BaseViewProperties as aR, type BaseParsedViewProperties as aS, type NodeNotation as aT, type ViewWithNotation as aU, type ViewWithHash as aV, type ComputedNode as aW, type ComputedEdge as aX, type ComputedElementView as aY, type ComputedDeploymentView as aZ, type ComputedDynamicView as a_, isParticipantOperator as aa, type NotOperator as ab, isNotOperator as ac, type AndOperator as ad, isAndOperator as ae, type OrOperator as af, isOrOperator as ag, type WhereOperator as ah, type Filterable as ai, type OperatorPredicate as aj, whereOperatorAsPredicate as ak, type ParsedView as al, type LayoutedView as am, isDiagramView as an, type ComputedView as ao, type ProcessedView as ap, type AnyView as aq, type ViewOnStage as ar, type ViewWithType as as, type ViewRule as at, type ViewRulePredicate as au, isViewRulePredicate as av, isViewRuleStyle as aw, isComputedView as ax, isElementView as ay, isScopedElementView as az, type RichTextOrEmpty as b, type DiagramEdge as b0, type LayoutedElementView as b1, type LayoutedDeploymentView as b2, type LayoutedDynamicView as b3, type DeploymentViewIncludePredicate as b4, type DeploymentViewExcludePredicate as b5, type DeploymentViewPredicate as b6, type DeploymentViewRuleStyle as b7, type DeploymentViewRule as b8, type ParsedDeploymentView as b9, type DynamicViewStep as ba, type DynamicViewParallelSteps as bb, getParallelStepsPrefix as bc, type DynamicViewStepOrParallel as bd, type DynamicViewIncludeRule as be, type DynamicViewRule as bf, type ParsedDynamicView as bg, isDynamicViewParallelSteps as bh, type ElementViewIncludePredicate as bi, type ElementViewExcludePredicate as bj, type ElementViewPredicate as bk, type ElementViewRuleGroup as bl, isViewRuleGroup as bm, type ElementViewRuleStyle as bn, type ElementViewRule as bo, type ParsedElementView as bp, RelationExpr as c, ModelRelationExpr as d, ModelExpression as e, FqnRef as f, type Point as g, RectBox as h, type GlobalPredicates as i, type GlobalDynamicPredicates as j, type GlobalStyleID as k, type GlobalStyles as l, type ModelGlobals as m, type ParsedLikeC4ModelData as n, type LikeC4ModelData as o, type DeploymentNode as p, type DeployedInstance as q, type DeploymentElement as r, type DeploymentElementRef as s, isDeploymentNode as t, isDeployedInstance as u, type DeploymentRelationship as v, type DeploymentRelation as w, type SpecTypesFromDump as x, type LikeC4ModelDump as y, type AuxFromDump as z };
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as a$4, t as t$3, r as r$3, j as isElementModel, f as isNestedElementOfDeployedInstanceModel, d as isDeployedInstanceModel, i as isDeploymentNodeModel, e as isDeploymentElementModel, L as LikeC4Model } from './core.4SpVCM9m.mjs';
|
|
2
2
|
import { u as u$6 } from './core.DbRvwARP.mjs';
|
|
3
|
-
import { m as m$2
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { c as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { m as m$2 } from './core.ByrmCl9I.mjs';
|
|
4
|
+
import { i as i$a, t as t$4, n as n$3, d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.D5qVzkws.mjs';
|
|
5
|
+
import { p as p$1, f as findAscendingConnections, m as mergeConnections, d as differenceConnections, j as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, o as findConnectionsBetween$3, n as modelConnection, b as findDescendantConnections, a as findDeepestNestedConnection, i as isAnyInOut, k as isOutgoing, g as isIncoming, C as ConnectionModel } from './core.BTnf14gD.mjs';
|
|
6
|
+
import { u as a$3, C, t as s, r as getDefaultExportFromCjs, j as isDescendantOf, m as sortParentsFirst, i as isAncestor, p as parentFqn, e as compareByFqnHierarchically, o as isNonEmptyArray, n as nameFromFqn, s as sortByFqnHierarchically, d as commonAncestor, b as ancestorsFqn, k as isSameHierarchy } from './core.C_C-3c1S.mjs';
|
|
7
|
+
import { c as commonHead, r as requireForeach, a as requireIterator, u as u$7, o as objectHash, d as d$5, S as Stack } from './core.CtKXPqN_.mjs';
|
|
8
|
+
import { a as nonNullable, i as invariant, n as nonexhaustive } from './core.D4npX2q8.mjs';
|
|
9
|
+
import { n as n$1, a as DefaultElementShape, D as DefaultThemeColor, f as DefaultArrowType, e as DefaultLineStyle, g as DefaultRelationshipColor } from './core.D56nCp7e.mjs';
|
|
10
|
+
import { d as difference, a as intersection, u as union, i as i$b, h as hasIntersection } from './core.CpwrZi3D.mjs';
|
|
11
|
+
import { a as isIterable, n as n$2, l as l$6, b as iunique, i as iflat } from './core.8KM0D6va.mjs';
|
|
12
|
+
import { o as o$7 } from './core.BgvIuGGU.mjs';
|
|
13
|
+
import { w as whereOperatorAsPredicate, F as FqnRef, y, m as isGroupElementKind, G as GroupElementKind, a as _type, _ as _stage, t as n$4, p as stepEdgeId } from './core.Br7Fab9l.mjs';
|
|
14
|
+
import { M as ModelFqnExpr, c as isViewRuleStyle, F as FqnExpr, R as RelationExpr, s as o$8, i as isViewRulePredicate, o as isViewRuleAutoLayout, r as isViewRuleGroup, m as isViewRuleGlobalPredicateRef, l as isViewRuleGlobalStyle, q as isDynamicViewParallelSteps, a as ModelRelationExpr, b as ModelExpression, k as isDynamicView, j as isDeploymentView, f as isElementView } from './core.DXRAwwDB.mjs';
|
|
15
|
+
import { a as toSet, t as toArray, i as imap } from './core.Btl47GOn.mjs';
|
|
16
|
+
import { D as DefaultMap } from './core.BMCb0wJI.mjs';
|
|
17
|
+
import { i as ifilter } from './core.BH9nN-_I.mjs';
|
|
18
|
+
import { C as Connection, c as customInspectSymbol } from './core.C80Z37Eu.mjs';
|
|
19
|
+
import { i as isome } from './core.BoyJPEen.mjs';
|
|
10
20
|
|
|
11
21
|
function d$4(...e){return e.length===2?(n,...r)=>t$2(n,...e,...r):t$2(...e)}var t$2=(e,n,r,...a)=>n(e,...a)?typeof r=="function"?r(e,...a):r.onTrue(e,...a):typeof r=="function"?e:r.onFalse(e,...a);
|
|
12
22
|
|
|
@@ -30,9 +40,7 @@ function l$2(...n){return u$6(d,n)}function d(n,o){let e={};for(let[a,t]of n.ent
|
|
|
30
40
|
|
|
31
41
|
function i$5(...e){return u$6(o$4,e)}function o$4(e,r){let a={};for(let[n,u]of Object.entries(e)){let l=r(u,n,e);a[n]=l;}return a}
|
|
32
42
|
|
|
33
|
-
function a$2(...e){return u$6(n
|
|
34
|
-
|
|
35
|
-
function n(e){return e===void 0?true:typeof e=="string"||Array.isArray(e)?e.length===0:Object.keys(e).length===0}
|
|
43
|
+
function a$2(...e){return u$6(n,e)}var n=e=>e.at(-1);
|
|
36
44
|
|
|
37
45
|
function e(o){return typeof o=="boolean"}
|
|
38
46
|
|
|
@@ -1260,12 +1268,33 @@ function calcViewLayoutHash(view) {
|
|
|
1260
1268
|
autoLayout: view.autoLayout,
|
|
1261
1269
|
nodes: C(
|
|
1262
1270
|
view.nodes,
|
|
1263
|
-
m$2(
|
|
1264
|
-
|
|
1271
|
+
m$2((n) => ({
|
|
1272
|
+
id: n.id,
|
|
1273
|
+
icon: n$1(n.icon) ? "Y" : "N",
|
|
1274
|
+
title: n.title,
|
|
1275
|
+
description: n.description?.md ?? n.description?.txt ?? null,
|
|
1276
|
+
technology: n.technology ?? null,
|
|
1277
|
+
shape: n.shape,
|
|
1278
|
+
size: n.style.size ?? null,
|
|
1279
|
+
textSize: n.style.textSize ?? null,
|
|
1280
|
+
padding: n.style.padding ?? null,
|
|
1281
|
+
children: n.children
|
|
1282
|
+
})),
|
|
1283
|
+
l$2(({ id, ...node }) => [id, node])
|
|
1265
1284
|
),
|
|
1266
1285
|
edges: C(
|
|
1267
1286
|
view.edges,
|
|
1268
|
-
m$2(
|
|
1287
|
+
m$2((e) => ({
|
|
1288
|
+
source: e.source,
|
|
1289
|
+
target: e.target,
|
|
1290
|
+
label: e.label,
|
|
1291
|
+
description: e.description?.md ?? e.description?.txt ?? null,
|
|
1292
|
+
technology: e.technology ?? null,
|
|
1293
|
+
dir: e.dir,
|
|
1294
|
+
head: e.head,
|
|
1295
|
+
tail: e.tail,
|
|
1296
|
+
line: e.line
|
|
1297
|
+
})),
|
|
1269
1298
|
l$2(({ source, target, ...edge }) => [`${source}:${target}`, edge])
|
|
1270
1299
|
)
|
|
1271
1300
|
};
|
|
@@ -1710,29 +1739,29 @@ function applyViewRuleStyle(rule, predicates, nodes) {
|
|
|
1710
1739
|
u((n) => {
|
|
1711
1740
|
n.shape = rule.style.shape ?? n.shape;
|
|
1712
1741
|
n.color = rule.style.color ?? n.color;
|
|
1713
|
-
if (n$
|
|
1742
|
+
if (n$2(rule.style.icon)) {
|
|
1714
1743
|
n.icon = rule.style.icon;
|
|
1715
1744
|
}
|
|
1716
|
-
if (n$
|
|
1745
|
+
if (n$2(rule.notation)) {
|
|
1717
1746
|
n.notation = rule.notation;
|
|
1718
1747
|
}
|
|
1719
1748
|
let styleOverride;
|
|
1720
|
-
if (n$
|
|
1749
|
+
if (n$2(rule.style.border)) {
|
|
1721
1750
|
styleOverride = { border: rule.style.border };
|
|
1722
1751
|
}
|
|
1723
|
-
if (n$
|
|
1752
|
+
if (n$2(rule.style.opacity)) {
|
|
1724
1753
|
styleOverride = { ...styleOverride, opacity: rule.style.opacity };
|
|
1725
1754
|
}
|
|
1726
|
-
if (n$
|
|
1755
|
+
if (n$2(rule.style.multiple)) {
|
|
1727
1756
|
styleOverride = { ...styleOverride, multiple: rule.style.multiple };
|
|
1728
1757
|
}
|
|
1729
|
-
if (n$
|
|
1758
|
+
if (n$2(rule.style.padding)) {
|
|
1730
1759
|
styleOverride = { ...styleOverride, padding: rule.style.padding };
|
|
1731
1760
|
}
|
|
1732
|
-
if (n$
|
|
1761
|
+
if (n$2(rule.style.size)) {
|
|
1733
1762
|
styleOverride = { ...styleOverride, size: rule.style.size };
|
|
1734
1763
|
}
|
|
1735
|
-
if (n$
|
|
1764
|
+
if (n$2(rule.style.textSize)) {
|
|
1736
1765
|
styleOverride = { ...styleOverride, textSize: rule.style.textSize };
|
|
1737
1766
|
}
|
|
1738
1767
|
if (styleOverride) {
|
|
@@ -1809,7 +1838,7 @@ function buildComputedNodes(elements, groups) {
|
|
|
1809
1838
|
elementToGroup.set(e.id, id);
|
|
1810
1839
|
}
|
|
1811
1840
|
});
|
|
1812
|
-
Array.from(elements).sort(compareByFqnHierarchically).forEach(({ id, style, kind, title, color, shape, tags, ...el }) => {
|
|
1841
|
+
Array.from(elements).sort(compareByFqnHierarchically).forEach(({ id, style, kind, title, color, shape, tags, notation, ...el }) => {
|
|
1813
1842
|
let parent = parentFqn(id);
|
|
1814
1843
|
let level = 0;
|
|
1815
1844
|
let parentNd;
|
|
@@ -1848,6 +1877,7 @@ function buildComputedNodes(elements, groups) {
|
|
|
1848
1877
|
children: [],
|
|
1849
1878
|
inEdges: [],
|
|
1850
1879
|
outEdges: [],
|
|
1880
|
+
...notation && { notation },
|
|
1851
1881
|
...el,
|
|
1852
1882
|
style: {
|
|
1853
1883
|
...style
|
|
@@ -1897,31 +1927,31 @@ function mergePropsFromRelationships(relations, prefer) {
|
|
|
1897
1927
|
relations,
|
|
1898
1928
|
l$4(
|
|
1899
1929
|
(acc, r) => {
|
|
1900
|
-
if (n$
|
|
1930
|
+
if (n$1(r.title) && !acc.title.includes(r.title)) {
|
|
1901
1931
|
acc.title.push(r.title);
|
|
1902
1932
|
}
|
|
1903
|
-
if (n$
|
|
1933
|
+
if (n$1(r.description) && !acc.description.some(k(r.description))) {
|
|
1904
1934
|
acc.description.push(r.description);
|
|
1905
1935
|
}
|
|
1906
|
-
if (n$
|
|
1936
|
+
if (n$1(r.technology) && !acc.technology.includes(r.technology)) {
|
|
1907
1937
|
acc.technology.push(r.technology);
|
|
1908
1938
|
}
|
|
1909
|
-
if (n$
|
|
1939
|
+
if (n$1(r.kind) && !acc.kind.includes(r.kind)) {
|
|
1910
1940
|
acc.kind.push(r.kind);
|
|
1911
1941
|
}
|
|
1912
|
-
if (n$
|
|
1942
|
+
if (n$1(r.color) && !acc.color.includes(r.color)) {
|
|
1913
1943
|
acc.color.push(r.color);
|
|
1914
1944
|
}
|
|
1915
|
-
if (n$
|
|
1945
|
+
if (n$1(r.line) && !acc.line.includes(r.line)) {
|
|
1916
1946
|
acc.line.push(r.line);
|
|
1917
1947
|
}
|
|
1918
|
-
if (n$
|
|
1948
|
+
if (n$1(r.head) && !acc.head.includes(r.head)) {
|
|
1919
1949
|
acc.head.push(r.head);
|
|
1920
1950
|
}
|
|
1921
|
-
if (n$
|
|
1951
|
+
if (n$1(r.tail) && !acc.tail.includes(r.tail)) {
|
|
1922
1952
|
acc.tail.push(r.tail);
|
|
1923
1953
|
}
|
|
1924
|
-
if (n$
|
|
1954
|
+
if (n$1(r.navigateTo) && !acc.navigateTo.includes(r.navigateTo)) {
|
|
1925
1955
|
acc.navigateTo.push(r.navigateTo);
|
|
1926
1956
|
}
|
|
1927
1957
|
if (r.tags) {
|
|
@@ -1965,12 +1995,12 @@ function mergePropsFromRelationships(relations, prefer) {
|
|
|
1965
1995
|
...isNonEmptyArray(allprops.links) && { links: allprops.links },
|
|
1966
1996
|
...isNonEmptyArray(tags) && { tags }
|
|
1967
1997
|
},
|
|
1968
|
-
n$
|
|
1998
|
+
n$1
|
|
1969
1999
|
);
|
|
1970
2000
|
if (prefer) {
|
|
1971
2001
|
return {
|
|
1972
2002
|
...merged,
|
|
1973
|
-
...d$2(pickRelationshipProps(prefer), n$
|
|
2003
|
+
...d$2(pickRelationshipProps(prefer), n$1)
|
|
1974
2004
|
};
|
|
1975
2005
|
}
|
|
1976
2006
|
return merged;
|
|
@@ -2071,14 +2101,15 @@ function deploymentExpressionToPredicate(target) {
|
|
|
2071
2101
|
function toNodeSource(el) {
|
|
2072
2102
|
if (el.isDeploymentNode()) {
|
|
2073
2103
|
const onlyOneInstance = el.onlyOneInstance();
|
|
2074
|
-
let { title, kind, id, ...$node } = el.$node;
|
|
2075
|
-
const { icon: icon2, color: color2, shape: shape2, ...
|
|
2104
|
+
let { title, kind, id, description: description2, ...$node } = el.$node;
|
|
2105
|
+
const { icon: icon2, color: color2, shape: shape2, ...style2 } = el.$node.style ?? {};
|
|
2076
2106
|
let tags = [...el.tags];
|
|
2077
2107
|
if (onlyOneInstance) {
|
|
2078
2108
|
tags = i$a([...tags, ...onlyOneInstance.tags]);
|
|
2079
2109
|
if (title === nameFromFqn(el.id)) {
|
|
2080
2110
|
title = onlyOneInstance.title;
|
|
2081
2111
|
}
|
|
2112
|
+
description2 = onlyOneInstance.description.$source ?? description2;
|
|
2082
2113
|
}
|
|
2083
2114
|
return {
|
|
2084
2115
|
...onlyOneInstance && {
|
|
@@ -2090,9 +2121,10 @@ function toNodeSource(el) {
|
|
|
2090
2121
|
...icon2 && { icon: icon2 },
|
|
2091
2122
|
...color2 && { color: color2 },
|
|
2092
2123
|
...shape2 && { shape: shape2 },
|
|
2124
|
+
...description2 && { description: description2 },
|
|
2093
2125
|
tags,
|
|
2094
2126
|
style: {
|
|
2095
|
-
...
|
|
2127
|
+
...style2
|
|
2096
2128
|
},
|
|
2097
2129
|
deploymentRef: id,
|
|
2098
2130
|
kind,
|
|
@@ -2102,9 +2134,7 @@ function toNodeSource(el) {
|
|
|
2102
2134
|
invariant(el.isInstance(), "Expected Instance");
|
|
2103
2135
|
const instance = el.$instance;
|
|
2104
2136
|
const element = el.element;
|
|
2105
|
-
const icon
|
|
2106
|
-
const color = instance.style?.color ?? element.color;
|
|
2107
|
-
const shape = instance.style?.shape ?? element.shape;
|
|
2137
|
+
const { icon, color, shape, ...style } = el.style;
|
|
2108
2138
|
const links = [
|
|
2109
2139
|
...element.links,
|
|
2110
2140
|
...instance.links ?? []
|
|
@@ -2114,25 +2144,24 @@ function toNodeSource(el) {
|
|
|
2114
2144
|
...instance.metadata
|
|
2115
2145
|
};
|
|
2116
2146
|
const notation = instance.notation ?? element.$element.notation;
|
|
2147
|
+
let description = el.description.$source;
|
|
2148
|
+
let technology = instance.technology ?? element.technology;
|
|
2117
2149
|
return {
|
|
2118
2150
|
id: el.id,
|
|
2119
2151
|
kind: "instance",
|
|
2120
|
-
title:
|
|
2121
|
-
description
|
|
2122
|
-
technology
|
|
2152
|
+
title: el.title,
|
|
2153
|
+
...description && { description },
|
|
2154
|
+
...technology && { technology },
|
|
2123
2155
|
tags: [...el.tags],
|
|
2124
2156
|
links: i$b(links, 1) ? links : null,
|
|
2125
2157
|
...icon && { icon },
|
|
2126
2158
|
...color && { color },
|
|
2127
2159
|
...shape && { shape },
|
|
2128
|
-
style
|
|
2129
|
-
...element.style,
|
|
2130
|
-
...instance.style
|
|
2131
|
-
},
|
|
2160
|
+
style,
|
|
2132
2161
|
deploymentRef: instance.id,
|
|
2133
2162
|
modelRef: element.id,
|
|
2134
2163
|
...notation && { notation },
|
|
2135
|
-
...!n(metadata) && { metadata }
|
|
2164
|
+
...!n$3(metadata) && { metadata }
|
|
2136
2165
|
};
|
|
2137
2166
|
}
|
|
2138
2167
|
function toComputedEdges$1(connections) {
|
|
@@ -3347,9 +3376,10 @@ function applyCustomElementProperties(_rules, _nodes) {
|
|
|
3347
3376
|
padding,
|
|
3348
3377
|
size,
|
|
3349
3378
|
textSize,
|
|
3379
|
+
description,
|
|
3350
3380
|
...rest
|
|
3351
3381
|
} = d$1(props, n$4);
|
|
3352
|
-
const notEmpty = !n(rest);
|
|
3382
|
+
const notEmpty = !n$3(rest);
|
|
3353
3383
|
const satisfies = elementExprToPredicate(expr);
|
|
3354
3384
|
nodes.forEach((node, i) => {
|
|
3355
3385
|
if (isGroupElementKind(node) || !satisfies(node)) {
|
|
@@ -3362,6 +3392,13 @@ function applyCustomElementProperties(_rules, _nodes) {
|
|
|
3362
3392
|
...rest
|
|
3363
3393
|
};
|
|
3364
3394
|
}
|
|
3395
|
+
if (description !== void 0) {
|
|
3396
|
+
node = {
|
|
3397
|
+
...node,
|
|
3398
|
+
isCustomized: true,
|
|
3399
|
+
description: { txt: description }
|
|
3400
|
+
};
|
|
3401
|
+
}
|
|
3365
3402
|
let styleOverride;
|
|
3366
3403
|
if (border !== void 0) {
|
|
3367
3404
|
styleOverride = { border };
|
|
@@ -3468,7 +3505,7 @@ class DynamicViewCompute {
|
|
|
3468
3505
|
color,
|
|
3469
3506
|
line
|
|
3470
3507
|
} = this.findRelations(source, target);
|
|
3471
|
-
const navigateTo = n$
|
|
3508
|
+
const navigateTo = n$1(stepNavigateTo) && stepNavigateTo !== this.view.id ? stepNavigateTo : derivedNavigateTo;
|
|
3472
3509
|
this.steps.push({
|
|
3473
3510
|
id,
|
|
3474
3511
|
...step,
|
|
@@ -3524,7 +3561,7 @@ class DynamicViewCompute {
|
|
|
3524
3561
|
const nodesMap = buildComputedNodes(
|
|
3525
3562
|
[...this.explicits].map(elementModelToNodeSource)
|
|
3526
3563
|
);
|
|
3527
|
-
const edges = this.steps.map(({ id, source, target, relations, title, isBackward, tags, ...step }) => {
|
|
3564
|
+
const edges = this.steps.map(({ id, source, target, relations, title, description, isBackward, tags, ...step }) => {
|
|
3528
3565
|
const sourceNode = nonNullable(nodesMap.get(source.id), `Source node ${source.id} not found`);
|
|
3529
3566
|
const targetNode = nonNullable(nodesMap.get(target.id), `Target node ${target.id} not found`);
|
|
3530
3567
|
const edge = {
|
|
@@ -3534,6 +3571,7 @@ class DynamicViewCompute {
|
|
|
3534
3571
|
target: targetNode.id,
|
|
3535
3572
|
label: title,
|
|
3536
3573
|
relations,
|
|
3574
|
+
description: description ? { txt: description } : null,
|
|
3537
3575
|
color: DefaultRelationshipColor,
|
|
3538
3576
|
line: DefaultLineStyle,
|
|
3539
3577
|
head: DefaultArrowType,
|
|
@@ -3610,7 +3648,7 @@ class DynamicViewCompute {
|
|
|
3610
3648
|
const alltags = C(
|
|
3611
3649
|
relationships,
|
|
3612
3650
|
u$1((r) => r.tags),
|
|
3613
|
-
m$1(n$
|
|
3651
|
+
m$1(n$1),
|
|
3614
3652
|
i$a()
|
|
3615
3653
|
);
|
|
3616
3654
|
const tags = i$b(alltags, 1) ? alltags : null;
|
|
@@ -3620,7 +3658,7 @@ class DynamicViewCompute {
|
|
|
3620
3658
|
const navigateTo = relationNavigateTo && relationNavigateTo !== this.view.id ? relationNavigateTo : C(
|
|
3621
3659
|
relationships,
|
|
3622
3660
|
m$2((r) => r.$relationship.navigateTo),
|
|
3623
|
-
m$1(n$
|
|
3661
|
+
m$1(n$1),
|
|
3624
3662
|
m$1((v) => v !== this.view.id),
|
|
3625
3663
|
i$a(),
|
|
3626
3664
|
t$4()
|
|
@@ -3628,9 +3666,9 @@ class DynamicViewCompute {
|
|
|
3628
3666
|
const commonProperties = C(
|
|
3629
3667
|
relationships,
|
|
3630
3668
|
l$4((acc, { title, $relationship: r }) => {
|
|
3631
|
-
n$
|
|
3632
|
-
n$
|
|
3633
|
-
n$
|
|
3669
|
+
n$1(title) && acc.title.add(title);
|
|
3670
|
+
n$1(r.color) && acc.color.add(r.color);
|
|
3671
|
+
n$1(r.line) && acc.line.add(r.line);
|
|
3634
3672
|
return acc;
|
|
3635
3673
|
}, {
|
|
3636
3674
|
color: /* @__PURE__ */ new Set(),
|
|
@@ -3701,6 +3739,7 @@ function applyCustomRelationProperties(_rules, nodes, _edges) {
|
|
|
3701
3739
|
customRelation: {
|
|
3702
3740
|
expr,
|
|
3703
3741
|
title,
|
|
3742
|
+
description,
|
|
3704
3743
|
...customprops
|
|
3705
3744
|
}
|
|
3706
3745
|
} of rules) {
|
|
@@ -3726,6 +3765,7 @@ function applyCustomRelationProperties(_rules, nodes, _edges) {
|
|
|
3726
3765
|
edges[i] = {
|
|
3727
3766
|
...edge,
|
|
3728
3767
|
...props,
|
|
3768
|
+
...description && { description: { txt: description } },
|
|
3729
3769
|
label: title ?? edge.label,
|
|
3730
3770
|
isCustomized: true
|
|
3731
3771
|
};
|