@likec4/core 1.39.5 → 1.41.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.
Files changed (65) hide show
  1. package/dist/builder/index.d.mts +75 -14
  2. package/dist/builder/index.mjs +111 -47
  3. package/dist/compute-view/index.d.mts +5 -5
  4. package/dist/compute-view/index.mjs +3 -3
  5. package/dist/compute-view/relationships-view/index.d.mts +5 -5
  6. package/dist/index.d.mts +5 -5
  7. package/dist/index.mjs +5 -5
  8. package/dist/model/connection/deployment/index.d.mts +7 -7
  9. package/dist/model/connection/deployment/index.mjs +1 -1
  10. package/dist/model/connection/index.d.mts +8 -8
  11. package/dist/model/connection/index.mjs +1 -1
  12. package/dist/model/connection/model/index.d.mts +7 -7
  13. package/dist/model/index.d.mts +10 -10
  14. package/dist/model/index.mjs +3 -3
  15. package/dist/shared/{core.CxGKeL-L.mjs → core.6_Vp2iiN.mjs} +29 -1
  16. package/dist/shared/{core.BqVo8LrH.mjs → core.Ae86Y3tB.mjs} +27 -8
  17. package/dist/shared/{core.DozSPE83.mjs → core.Asc11Mjy.mjs} +47 -11
  18. package/dist/shared/{core.PFqKFee4.d.mts → core.BXsxn-hf.d.mts} +44 -8
  19. package/dist/shared/core.BazD6cot.mjs +14 -0
  20. package/dist/shared/{core.B4scjmM6.d.mts → core.BhpgpOep.d.mts} +24 -4
  21. package/dist/shared/{core.CNhp8dSD.mjs → core.BvMRMo7Z.mjs} +69 -46
  22. package/dist/shared/{core.DmFVWyBc.d.mts → core.CUG6vpyL.d.mts} +2 -2
  23. package/dist/shared/{core.yHe79zEl.mjs → core.CXy1NLUG.mjs} +2 -2
  24. package/dist/shared/{core.B65NlqR_.d.mts → core.D-ZGWDDt.d.mts} +49 -39
  25. package/dist/shared/{core.CsbOakly.mjs → core.DA5vzwZ9.mjs} +30 -4
  26. package/dist/shared/{core.T-eLZTW_.mjs → core.DJp8fgok.mjs} +6 -2
  27. package/dist/shared/{core.1_FtXl46.d.mts → core.DgesAwC8.d.mts} +12 -3
  28. package/dist/shared/{core.1ypAWObi.d.mts → core.FUPplpae.d.mts} +1 -1
  29. package/dist/shared/{core.BZs_hKMJ.d.mts → core.hfOE3RfK.d.mts} +4 -4
  30. package/dist/shared/{core.Chtad_Hv.d.mts → core.xSQO0XYD.d.mts} +2 -2
  31. package/dist/shared/{core.Bq0r6_yG.d.mts → core.zxTBF_PD.d.mts} +3 -3
  32. package/dist/types/_aux.d.mts +2 -2
  33. package/dist/types/_aux.mjs +1 -5
  34. package/dist/types/expression-model.d.mts +3 -3
  35. package/dist/types/expression.d.mts +3 -3
  36. package/dist/types/fqnRef.d.mts +2 -2
  37. package/dist/types/index.d.mts +6 -6
  38. package/dist/types/index.mjs +5 -5
  39. package/dist/utils/index.d.mts +2 -2
  40. package/dist/utils/iterable/index.d.mts +1 -1
  41. package/package.json +2 -2
  42. package/src/builder/Builder.ts +119 -43
  43. package/src/builder/_types.ts +12 -8
  44. package/src/compute-view/deployment-view/utils.ts +47 -36
  45. package/src/compute-view/dynamic-view/compute.ts +1 -0
  46. package/src/compute-view/relationships-view/layout.ts +7 -6
  47. package/src/compute-view/utils/buildComputedNodes.ts +23 -10
  48. package/src/compute-view/utils/buildElementNotations.ts +2 -1
  49. package/src/model/DeploymentElementModel.ts +33 -3
  50. package/src/model/ElementModel.ts +25 -2
  51. package/src/model/RelationModel.ts +1 -1
  52. package/src/model/view/EdgeModel.ts +3 -2
  53. package/src/model/view/LikeC4ViewModel.ts +25 -7
  54. package/src/model/view/NodeModel.ts +1 -1
  55. package/src/types/RichText.ts +6 -4
  56. package/src/types/_aux.ts +26 -0
  57. package/src/types/_common.ts +24 -2
  58. package/src/types/geometry.ts +29 -1
  59. package/src/types/index.ts +2 -0
  60. package/src/types/model-deployment.ts +8 -18
  61. package/src/types/model-logical.ts +31 -16
  62. package/src/types/model-spec.ts +3 -0
  63. package/src/types/view-computed.ts +28 -13
  64. package/src/types/view-layouted.ts +7 -4
  65. package/src/types/view-parsed.dynamic.ts +11 -0
@@ -1,5 +1,5 @@
1
- export { b as EdgeModel, E as ElementModel, a as LikeC4DeploymentModel, L as LikeC4Model, c as LikeC4ViewModel, d as LikeC4ViewsFolder, N as NodeModel, R as RelationshipModel, V as VIEW_FOLDERS_SEPARATOR, e as extractViewTitleFromPath, g as getViewFolderPath, f as isDeployedInstanceModel, h as isDeploymentElementModel, i as isDeploymentNodeModel, k as isDeploymentRelationModel, q as isEdgeModel, m as isElementModel, o as isLikeC4ViewModel, l as isModelRelation, j as isNestedElementOfDeployedInstanceModel, p as isNodeModel, l as isRelationModel, l as isRelationshipModel, n as normalizeViewPath } from '../shared/core.DozSPE83.mjs';
2
- export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.CsbOakly.mjs';
1
+ export { b as EdgeModel, E as ElementModel, a as LikeC4DeploymentModel, L as LikeC4Model, c as LikeC4ViewModel, d as LikeC4ViewsFolder, N as NodeModel, R as RelationshipModel, V as VIEW_FOLDERS_SEPARATOR, e as extractViewTitleFromPath, g as getViewFolderPath, f as isDeployedInstanceModel, h as isDeploymentElementModel, i as isDeploymentNodeModel, k as isDeploymentRelationModel, q as isEdgeModel, m as isElementModel, o as isLikeC4ViewModel, l as isModelRelation, j as isNestedElementOfDeployedInstanceModel, p as isNodeModel, l as isRelationModel, l as isRelationshipModel, n as normalizeViewPath } from '../shared/core.Asc11Mjy.mjs';
2
+ export { c as DeployedInstanceModel, D as DeploymentConnectionModel, e as DeploymentNodeModel, g as DeploymentRelationModel, R as RelationshipsAccum, d as deploymentConnection } from '../shared/core.DA5vzwZ9.mjs';
3
3
  export { C as Connection } from '../shared/core.BVNaR17u.mjs';
4
4
  export { C as ConnectionModel, d as differenceConnections, c as findAscendingConnections, e as findDeepestNestedConnection, g as findDescendantConnections, h as hasSameSource, i as hasSameSourceTarget, j as hasSameTarget, k as isAnyInOut, l as isIncoming, m as isNestedConnection, n as isOutgoing, o as mergeConnections, q as modelConnection, s as sortConnectionsByBoundaryHierarchy, p as sortDeepestFirst } from '../shared/core.D0EgVMQK.mjs';
5
- export { R as RichText } from '../shared/core.BqVo8LrH.mjs';
5
+ export { R as RichText } from '../shared/core.Ae86Y3tB.mjs';
@@ -1,3 +1,4 @@
1
+ import { hasAtLeast } from 'remeda';
1
2
  import { i as invariant } from './core.D4npX2q8.mjs';
2
3
 
3
4
  var BBox;
@@ -20,7 +21,10 @@ var BBox;
20
21
  }
21
22
  BBox2.fromPoints = fromPoints;
22
23
  function merge(...boxes) {
23
- invariant(boxes.length > 0, "No boxes provided");
24
+ invariant(hasAtLeast(boxes, 1), "No boxes provided");
25
+ if (boxes.length === 1) {
26
+ return boxes[0];
27
+ }
24
28
  let minX = Infinity;
25
29
  let minY = Infinity;
26
30
  let maxX = -Infinity;
@@ -48,6 +52,30 @@ var BBox;
48
52
  };
49
53
  }
50
54
  BBox2.toRectBox = toRectBox;
55
+ function expand(box, plus) {
56
+ if (plus === 0) {
57
+ return box;
58
+ }
59
+ return {
60
+ x: box.x - plus,
61
+ y: box.y - plus,
62
+ width: box.width + plus * 2,
63
+ height: box.height + plus * 2
64
+ };
65
+ }
66
+ BBox2.expand = expand;
67
+ function shrink(box, minus) {
68
+ if (minus === 0) {
69
+ return box;
70
+ }
71
+ return {
72
+ x: box.x + minus,
73
+ y: box.y + minus,
74
+ width: box.width - minus * 2,
75
+ height: box.height - minus * 2
76
+ };
77
+ }
78
+ BBox2.shrink = shrink;
51
79
  })(BBox || (BBox = {}));
52
80
  var RectBox;
53
81
  ((RectBox2) => {
@@ -3,14 +3,30 @@ import { n as nonexhaustive } from './core.D4npX2q8.mjs';
3
3
 
4
4
  const DefaultThemeColor = "primary";
5
5
  const DefaultElementShape = "rectangle";
6
- const DefaultShapeSize = "md";
7
- const DefaultPaddingSize = "md";
8
- const DefaultTextSize = "md";
6
+ const DefaultSize = "md";
7
+ const DefaultShapeSize = DefaultSize;
8
+ const DefaultPaddingSize = DefaultSize;
9
+ const DefaultTextSize = DefaultSize;
10
+ function ensureSizes({
11
+ size,
12
+ padding,
13
+ textSize,
14
+ ...rest
15
+ }) {
16
+ size ??= DefaultSize;
17
+ textSize ??= size;
18
+ padding ??= size;
19
+ return {
20
+ ...rest,
21
+ size,
22
+ padding,
23
+ textSize
24
+ };
25
+ }
9
26
  const DefaultLineStyle = "dashed";
10
27
  const DefaultArrowType = "normal";
11
28
  const DefaultRelationshipColor = "gray";
12
29
 
13
- const richtxt = Symbol.for("richtxt");
14
30
  const symb_text = Symbol.for("text");
15
31
  const symb_html = Symbol.for("html");
16
32
  const emptyTxt = "";
@@ -25,8 +41,8 @@ class RichText {
25
41
  * return RichText.memoize(this, this.$element.description)
26
42
  * }
27
43
  */
28
- static memoize(obj, source) {
29
- return memoizeProp(obj, richtxt, () => RichText.from(source));
44
+ static memoize(obj, tag, source) {
45
+ return memoizeProp(obj, tag, () => RichText.from(source));
30
46
  }
31
47
  /**
32
48
  * Creates a RichText instance from a source.
@@ -39,7 +55,10 @@ class RichText {
39
55
  return source;
40
56
  }
41
57
  if (typeof source === "string") {
42
- return RichText.from({ txt: source });
58
+ if (source.trim() === emptyTxt) {
59
+ return RichText.EMPTY;
60
+ }
61
+ return new RichText({ txt: source });
43
62
  }
44
63
  if ("isEmpty" in source && source.isEmpty) {
45
64
  return RichText.EMPTY;
@@ -166,4 +185,4 @@ class RichText {
166
185
  }
167
186
  }
168
187
 
169
- export { DefaultThemeColor as D, RichText as R, DefaultElementShape as a, DefaultShapeSize as b, DefaultPaddingSize as c, DefaultTextSize as d, DefaultLineStyle as e, DefaultArrowType as f, DefaultRelationshipColor as g };
188
+ export { DefaultThemeColor as D, RichText as R, DefaultElementShape as a, DefaultSize as b, DefaultShapeSize as c, DefaultPaddingSize as d, DefaultTextSize as e, ensureSizes as f, DefaultLineStyle as g, DefaultArrowType as h, DefaultRelationshipColor as i };
@@ -1,15 +1,16 @@
1
- import { unique, isTruthy, isEmpty, hasAtLeast, values, last, entries, pipe, map, sort, split, sortBy, prop } from 'remeda';
1
+ import { unique, isShallowEqual, isTruthy, isEmpty, hasAtLeast, values, last, entries, pipe, map, sort, split, sortBy, prop } from 'remeda';
2
2
  import { o as hierarchyLevel, n as nameFromFqn, i as isAncestor, g as commonAncestor, s as sortNaturalByFqn, f as sortParentsFirst, p as parentFqn, a as ancestorsFqn, k as compareNaturalHierarchically, j as compareNatural } from './core.DgttqsJc.mjs';
3
3
  import { g as getOrCreate } from './core.DcS-0zys.mjs';
4
- import { e as DeploymentNodeModel, c as DeployedInstanceModel, g as DeploymentRelationModel, N as NestedElementOfDeployedInstanceModel } from './core.CsbOakly.mjs';
4
+ import { e as DeploymentNodeModel, c as DeployedInstanceModel, g as DeploymentRelationModel, N as NestedElementOfDeployedInstanceModel } from './core.DA5vzwZ9.mjs';
5
5
  import { D as DefaultMap } from './core.BuoXfSMj.mjs';
6
6
  import { i as invariant, a as nonNullable } from './core.D4npX2q8.mjs';
7
7
  import { FqnRef } from '../types/fqnRef.mjs';
8
- import { b as isDeploymentNode, a as _type, _ as _stage, i as isOnStage, w as whereOperatorAsPredicate } from './core.yHe79zEl.mjs';
8
+ import { b as isDeploymentNode, a as _type, _ as _stage, i as isOnStage, w as whereOperatorAsPredicate } from './core.CXy1NLUG.mjs';
9
9
  import { m as memoizeProp } from './core.CUw_2J9j.mjs';
10
10
  import { i as ifilter } from './core.CCD1ID81.mjs';
11
11
  import { c as splitGlobalFqn, g as extractStep, e as isStepEdgeId, i as isGroupElementKind, b as isGlobalFqn, a as GlobalFqn } from './core.Be1n9a0i.mjs';
12
- import { a as DefaultElementShape, D as DefaultThemeColor, R as RichText, b as DefaultShapeSize, g as DefaultRelationshipColor, e as DefaultLineStyle } from './core.BqVo8LrH.mjs';
12
+ import { a as DefaultElementShape, D as DefaultThemeColor, R as RichText, c as DefaultShapeSize, i as DefaultRelationshipColor, g as DefaultLineStyle } from './core.Ae86Y3tB.mjs';
13
+ import { a as preferSummary, p as preferDescription } from './core.BazD6cot.mjs';
13
14
  import { a as ihead, i as ifind } from './core.GTgsmXS_.mjs';
14
15
 
15
16
  class ElementModel {
@@ -67,8 +68,26 @@ class ElementModel {
67
68
  get title() {
68
69
  return this.$element.title;
69
70
  }
71
+ /**
72
+ * Returns true if the element has a summary and a description
73
+ * (if one is missing - it falls back to another)
74
+ */
75
+ get hasSummary() {
76
+ return !!this.$element.summary && !!this.$element.description && !isShallowEqual(this.$element.summary, this.$element.description);
77
+ }
78
+ /**
79
+ * Short description of the element.
80
+ * Falls back to description if summary is not provided.
81
+ */
82
+ get summary() {
83
+ return RichText.memoize(this, "summary", preferSummary(this.$element));
84
+ }
85
+ /**
86
+ * Long description of the element.
87
+ * Falls back to summary if description is not provided.
88
+ */
70
89
  get description() {
71
- return RichText.memoize(this, this.$element.description);
90
+ return RichText.memoize(this, "description", preferDescription(this.$element));
72
91
  }
73
92
  get technology() {
74
93
  return this.$element.technology ?? null;
@@ -609,7 +628,7 @@ class RelationshipModel {
609
628
  return this.$relationship.technology;
610
629
  }
611
630
  get description() {
612
- return RichText.memoize(this, this.$relationship.description);
631
+ return RichText.memoize(this, "description", this.$relationship.description);
613
632
  }
614
633
  get navigateTo() {
615
634
  return this.$relationship.navigateTo ? this.model.view(this.$relationship.navigateTo) : null;
@@ -682,7 +701,7 @@ class EdgeModel {
682
701
  return this.#edge.label ?? null;
683
702
  }
684
703
  get description() {
685
- return RichText.memoize(this, this.#edge.description);
704
+ return RichText.memoize(this, "description", this.#edge.description);
686
705
  }
687
706
  get technology() {
688
707
  return this.#edge.technology ?? null;
@@ -747,7 +766,7 @@ class NodeModel {
747
766
  return this.#node.kind;
748
767
  }
749
768
  get description() {
750
- return RichText.memoize(this, this.#node.description);
769
+ return RichText.memoize(this, "description", this.#node.description);
751
770
  }
752
771
  get technology() {
753
772
  return this.#node.technology ?? null;
@@ -1000,7 +1019,7 @@ class LikeC4ViewModel {
1000
1019
  });
1001
1020
  }
1002
1021
  get description() {
1003
- return RichText.memoize(this, this.$view.description);
1022
+ return RichText.memoize(this, "description", this.$view.description);
1004
1023
  }
1005
1024
  get tags() {
1006
1025
  return this.$view.tags ?? [];
@@ -1015,6 +1034,16 @@ class LikeC4ViewModel {
1015
1034
  }
1016
1035
  return null;
1017
1036
  }
1037
+ /**
1038
+ * Available for dynamic views only
1039
+ * throws error if view is not dynamic
1040
+ */
1041
+ get mode() {
1042
+ if (this.isDynamicView()) {
1043
+ return this.$view.variant ?? "diagram";
1044
+ }
1045
+ throw new Error("View is not dynamic");
1046
+ }
1018
1047
  /**
1019
1048
  * All tags from nodes and edges.
1020
1049
  */
@@ -1063,14 +1092,21 @@ class LikeC4ViewModel {
1063
1092
  return this.#nodes.values();
1064
1093
  }
1065
1094
  /**
1066
- * Find edge by id.
1095
+ * Get edge by id, throws error if edge is not found.
1096
+ * Use {@link findEdge} if you are not sure if the edge exists.
1097
+ *
1067
1098
  * @param edge Edge or id
1068
- * @returns EdgeModel
1099
+ * @returns {@link EdgeModel}
1069
1100
  */
1070
1101
  edge(edge) {
1071
1102
  const edgeId = getId(edge);
1072
1103
  return nonNullable(this.#edges.get(edgeId), `Edge ${edgeId} not found in view ${this.$view.id}`);
1073
1104
  }
1105
+ /**
1106
+ * Find edge by id.
1107
+ * @param edge Edge or id
1108
+ * @returns {@link EdgeModel} or null if edge is not found
1109
+ */
1074
1110
  findEdge(edge) {
1075
1111
  return this.#edges.get(getId(edge)) ?? null;
1076
1112
  }
@@ -1,11 +1,11 @@
1
- import { A as Any, R as RelationKind, l as Tags, m as Metadata, n as MetadataKey, L as LooseTag, F as Fqn, j as ElementId, h as ElementKind, o as DeploymentKind, E as ExtractOnStage, p as RelationId$1, g as StrictViewId, f as _type, q as LooseElementId, r as LooseDeploymentId, s as DeploymentFqn, t as toComputed, u as toLayouted, v as Stage, D as DeploymentId, U as Unknown, V as ViewId, T as Tag, w as toParsed, P as ProjectId$1, x as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.B4scjmM6.mjs';
1
+ import { A as Any, R as RelationKind, m as Tags, n as Metadata, o as MetadataKey, L as LooseTag, F as Fqn, k as ElementId, j as ElementKind, q as DeploymentKind, E as ExtractOnStage, r as RelationId$1, h as StrictViewId, g as _type, s as LooseElementId, t as LooseDeploymentId, u as DeploymentFqn, v as toComputed, w as toLayouted, x as Stage, D as DeploymentId, U as Unknown, V as ViewId, T as Tag, y as toParsed, P as ProjectId$1, z as LooseViewId, a as Aux, S as SpecAux, d as UnknownParsed, b as UnknownComputed, c as UnknownLayouted } from './core.BhpgpOep.mjs';
2
2
  import { d as RelationId, P as ProjectId, a as IconUrl, N as NodeId, G as GroupElementKind, j as EdgeId, k as StepEdgeId, V as ViewId$1 } from './core.DX-WYEPA.mjs';
3
3
  import { D as DefaultMap } from './core.CywrQs86.mjs';
4
4
  import { SetRequired } from 'type-fest';
5
- import { b as RichTextOrEmpty, N as Relationship, F as Element, E as ElementStyle, a4 as ViewWithType, a0 as ComputedView, _ as LayoutedView, h as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, k as DeployedInstance, D as DeploymentElementStyle, p as DeploymentRelationship, l as DeploymentElement, j as DeploymentNode, s as LikeC4ModelDump, u as AuxFromDump, Y as LikeC4Project, W as Specification, M as ModelGlobals } from './core.B65NlqR_.mjs';
6
- import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.1_FtXl46.mjs';
5
+ import { b as RichTextOrEmpty, Q as Relationship, I as Element, F as ElementStyle, aW as DynamicViewDisplayVariant, a6 as ViewWithType, a2 as ComputedView, a0 as LayoutedView, h as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, L as LayoutedLikeC4ModelData, k as DeployedInstance, D as DeploymentElementStyle, p as DeploymentRelationship, l as DeploymentElement, j as DeploymentNode, s as LikeC4ModelDump, u as AuxFromDump, _ as LikeC4Project, Z as Specification, M as ModelGlobals } from './core.D-ZGWDDt.mjs';
6
+ import { c as IteratorLike, L as Link, N as NonEmptyArray } from './core.DgesAwC8.mjs';
7
7
  import { i as Color, R as RelationshipLineType, c as ElementShape } from './core.CzdwsPmY.mjs';
8
- import { W as WhereOperator } from './core.DmFVWyBc.mjs';
8
+ import { W as WhereOperator } from './core.CUG6vpyL.mjs';
9
9
  import { FqnRef } from '../types/fqnRef.mjs';
10
10
 
11
11
  type RelationshipsIterator<A extends Any> = IteratorLike<RelationshipModel<A>>;
@@ -89,6 +89,20 @@ declare class ElementModel<A extends Any = Any> implements WithTags<A>, WithMeta
89
89
  */
90
90
  get tags(): Tags<A>;
91
91
  get title(): string;
92
+ /**
93
+ * Returns true if the element has a summary and a description
94
+ * (if one is missing - it falls back to another)
95
+ */
96
+ get hasSummary(): boolean;
97
+ /**
98
+ * Short description of the element.
99
+ * Falls back to description if summary is not provided.
100
+ */
101
+ get summary(): RichTextOrEmpty;
102
+ /**
103
+ * Long description of the element.
104
+ * Falls back to summary if description is not provided.
105
+ */
92
106
  get description(): RichTextOrEmpty;
93
107
  get technology(): string | null;
94
108
  get links(): ReadonlyArray<Link>;
@@ -395,6 +409,11 @@ declare class LikeC4ViewModel<A extends Any = Any, V extends $View<A> = $View<A>
395
409
  get tags(): Tags<A>;
396
410
  get links(): ReadonlyArray<Link>;
397
411
  get viewOf(): ElementModel<A> | null;
412
+ /**
413
+ * Available for dynamic views only
414
+ * throws error if view is not dynamic
415
+ */
416
+ get mode(): DynamicViewDisplayVariant;
398
417
  /**
399
418
  * All tags from nodes and edges.
400
419
  */
@@ -421,11 +440,18 @@ declare class LikeC4ViewModel<A extends Any = Any, V extends $View<A> = $View<A>
421
440
  */
422
441
  nodes(): NodesIterator<A, V>;
423
442
  /**
424
- * Find edge by id.
443
+ * Get edge by id, throws error if edge is not found.
444
+ * Use {@link findEdge} if you are not sure if the edge exists.
445
+ *
425
446
  * @param edge Edge or id
426
- * @returns EdgeModel
447
+ * @returns {@link EdgeModel}
427
448
  */
428
449
  edge(edge: EdgeOrId): EdgeModel<A, V>;
450
+ /**
451
+ * Find edge by id.
452
+ * @param edge Edge or id
453
+ * @returns {@link EdgeModel} or null if edge is not found
454
+ */
429
455
  findEdge(edge: EdgeOrId): EdgeModel<A, V> | null;
430
456
  /**
431
457
  * Iterate over all edges.
@@ -472,8 +498,7 @@ declare namespace LikeC4ViewModel {
472
498
  }
473
499
  interface DeploymentView<A extends Any, V extends $View<A> = $View<A>> extends LikeC4ViewModel<A, ViewWithType<V, 'deployment'>> {
474
500
  }
475
- interface DynamicView<A extends Any, V extends $View<A> = $View<A>> extends LikeC4ViewModel<A, ViewWithType<V, 'dynamic'>> {
476
- }
501
+ type DynamicView<A extends Any, V extends $View<A> = $View<A>> = LikeC4ViewModel<A, ViewWithType<V, 'dynamic'>>;
477
502
  }
478
503
 
479
504
  type IncomingFilter = 'all' | 'direct' | 'to-descendants';
@@ -615,6 +640,15 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
615
640
  get name(): string;
616
641
  get shape(): ElementShape;
617
642
  get color(): Color;
643
+ /**
644
+ * Short description of the element.
645
+ * Falls back to description if summary is not provided.
646
+ */
647
+ get summary(): RichTextOrEmpty;
648
+ /**
649
+ * Long description of the element.
650
+ * Falls back to summary if description is not provided.
651
+ */
618
652
  get description(): RichTextOrEmpty;
619
653
  get technology(): string | null;
620
654
  get links(): ReadonlyArray<Link>;
@@ -724,6 +758,7 @@ declare class DeployedInstanceModel<A extends Any = Any> extends AbstractDeploym
724
758
  get color(): Color;
725
759
  get tags(): Tags<A>;
726
760
  get kind(): ElementKind<A>;
761
+ get summary(): RichTextOrEmpty;
727
762
  get description(): RichTextOrEmpty;
728
763
  get technology(): string | null;
729
764
  get links(): ReadonlyArray<Link>;
@@ -746,6 +781,7 @@ declare class NestedElementOfDeployedInstanceModel<A extends Any = Any> {
746
781
  get shape(): ElementShape;
747
782
  get color(): Color;
748
783
  get title(): string;
784
+ get summary(): RichTextOrEmpty;
749
785
  get description(): RichTextOrEmpty;
750
786
  get technology(): string | null;
751
787
  isDeploymentNode(): this is DeploymentNodeModel<A>;
@@ -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 };
@@ -1,6 +1,6 @@
1
1
  import { IfNever, IsNever, IsLiteral } from 'type-fest';
2
- import { C as Coalesce, L as Link } from './core.1_FtXl46.mjs';
3
- import { D as DeploymentFqn$1, F as Fqn$1, d as RelationId$1, N as NodeId$1, j as EdgeId$1, P as ProjectId$1, V as ViewId$1, T as Tag$1, E as ElementKind$1, b as DeploymentKind$1, c as RelationshipKind } from './core.DX-WYEPA.mjs';
2
+ import { C as Coalesce, L as Link } from './core.DgesAwC8.mjs';
3
+ import { D as DeploymentFqn$1, F as Fqn$1, d as RelationId$1, N as NodeId$1, j as EdgeId$1, P as ProjectId$1, V as ViewId$1, T as Tag$1, E as ElementKind$1, b as DeploymentKind$1, c as RelationshipKind, M as MarkdownOrString } from './core.DX-WYEPA.mjs';
4
4
 
5
5
  /**
6
6
  * Determines the stage of the model:
@@ -172,6 +172,19 @@ type StrictTag<A> = A extends infer T extends Any ? Tag$1<Tag<T>> : never;
172
172
  type StrictElementKind<A> = A extends infer T extends Any ? ElementKind$1<ElementKind<T>> : never;
173
173
  type StrictDeploymentKind<A> = A extends infer T extends Any ? DeploymentKind$1<DeploymentKind<T>> : never;
174
174
  type StrictRelationKind<A> = A extends infer T extends Any ? RelationshipKind<RelationKind<T>> : never;
175
+ type WithDescriptionAndTech = {
176
+ readonly summary?: MarkdownOrString | null;
177
+ readonly description?: MarkdownOrString | null;
178
+ readonly technology?: string | null;
179
+ };
180
+ /**
181
+ * Returns summary if it is not null, otherwise returns description
182
+ */
183
+ declare function preferSummary(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
184
+ /**
185
+ * Returns description if it is not null, otherwise returns summary
186
+ */
187
+ declare function preferDescription(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
175
188
  type WithTags<A extends Any> = {
176
189
  readonly tags: Tags<A>;
177
190
  };
@@ -187,6 +200,9 @@ type WithOptionalLinks = {
187
200
  type WithMetadata<A extends Any> = {
188
201
  readonly metadata?: Metadata<A>;
189
202
  };
203
+ type WithNotation = {
204
+ readonly notation?: string | null;
205
+ };
190
206
  /**
191
207
  * @see {@link LiteralUnion} from type-fest (https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts)
192
208
  */
@@ -244,18 +260,22 @@ type _aux_UnknownComputed = UnknownComputed;
244
260
  type _aux_UnknownLayouted = UnknownLayouted;
245
261
  type _aux_UnknownParsed = UnknownParsed;
246
262
  type _aux_ViewId<A> = ViewId<A>;
263
+ type _aux_WithDescriptionAndTech = WithDescriptionAndTech;
247
264
  type _aux_WithLinks = WithLinks;
248
265
  type _aux_WithMetadata<A extends Any> = WithMetadata<A>;
266
+ type _aux_WithNotation = WithNotation;
249
267
  type _aux_WithOptionalLinks = WithOptionalLinks;
250
268
  type _aux_WithOptionalTags<A extends Any> = WithOptionalTags<A>;
251
269
  type _aux_WithTags<A extends Any> = WithTags<A>;
270
+ declare const _aux_preferDescription: typeof preferDescription;
271
+ declare const _aux_preferSummary: typeof preferSummary;
252
272
  type _aux_setProject<A, P extends string> = setProject<A, P>;
253
273
  type _aux_setStage<A, S extends ModelStage> = setStage<A, S>;
254
274
  type _aux_toComputed<A> = toComputed<A>;
255
275
  type _aux_toLayouted<A> = toLayouted<A>;
256
276
  type _aux_toParsed<A> = toParsed<A>;
257
277
  declare namespace _aux {
258
- export type { _aux_AllKinds as AllKinds, _aux_Any as Any, Any as AnyAux, _aux_AnySpec as AnySpec, _aux_Aux as Aux, _aux_DeploymentFqn as DeploymentFqn, _aux_DeploymentId as DeploymentId, _aux_DeploymentKind as DeploymentKind, _aux_EdgeId as EdgeId, _aux_ElementId as ElementId, _aux_ElementKind as ElementKind, _aux_Fqn as Fqn, _aux_LooseDeploymentId as LooseDeploymentId, _aux_LooseDeploymentKind as LooseDeploymentKind, _aux_LooseElementId as LooseElementId, _aux_LooseElementKind as LooseElementKind, _aux_LooseRelationKind as LooseRelationKind, _aux_LooseTag as LooseTag, _aux_LooseTags as LooseTags, _aux_LooseViewId as LooseViewId, _aux_Metadata as Metadata, _aux_MetadataKey as MetadataKey, _aux_Never as Never, _aux_NodeId as NodeId, _aux_OrString as OrString, _aux_PickByStage as PickByStage, _aux_ProjectId as ProjectId, _aux_RelationId as RelationId, _aux_RelationKind as RelationKind, _aux_Spec as Spec, _aux_SpecAux as SpecAux, _aux_Stage as Stage, DeploymentFqn as StrictDeploymentFqn, _aux_StrictDeploymentKind as StrictDeploymentKind, _aux_StrictElementKind as StrictElementKind, Fqn as StrictFqn, _aux_StrictProjectId as StrictProjectId, _aux_StrictRelationKind as StrictRelationKind, _aux_StrictTag as StrictTag, _aux_StrictViewId as StrictViewId, _aux_Tag as Tag, _aux_Tags as Tags, _aux_Unknown as Unknown, _aux_UnknownComputed as UnknownComputed, _aux_UnknownLayouted as UnknownLayouted, _aux_UnknownParsed as UnknownParsed, _aux_ViewId as ViewId, _aux_WithLinks as WithLinks, _aux_WithMetadata as WithMetadata, _aux_WithOptionalLinks as WithOptionalLinks, _aux_WithOptionalTags as WithOptionalTags, _aux_WithTags as WithTags, _aux_setProject as setProject, _aux_setStage as setStage, _aux_toComputed as toComputed, _aux_toLayouted as toLayouted, _aux_toParsed as toParsed };
278
+ export { type _aux_AllKinds as AllKinds, type _aux_Any as Any, type Any as AnyAux, type _aux_AnySpec as AnySpec, type _aux_Aux as Aux, type _aux_DeploymentFqn as DeploymentFqn, type _aux_DeploymentId as DeploymentId, type _aux_DeploymentKind as DeploymentKind, type _aux_EdgeId as EdgeId, type _aux_ElementId as ElementId, type _aux_ElementKind as ElementKind, type _aux_Fqn as Fqn, type _aux_LooseDeploymentId as LooseDeploymentId, type _aux_LooseDeploymentKind as LooseDeploymentKind, type _aux_LooseElementId as LooseElementId, type _aux_LooseElementKind as LooseElementKind, type _aux_LooseRelationKind as LooseRelationKind, type _aux_LooseTag as LooseTag, type _aux_LooseTags as LooseTags, type _aux_LooseViewId as LooseViewId, type _aux_Metadata as Metadata, type _aux_MetadataKey as MetadataKey, type _aux_Never as Never, type _aux_NodeId as NodeId, type _aux_OrString as OrString, type _aux_PickByStage as PickByStage, type _aux_ProjectId as ProjectId, type _aux_RelationId as RelationId, type _aux_RelationKind as RelationKind, type _aux_Spec as Spec, type _aux_SpecAux as SpecAux, type _aux_Stage as Stage, type DeploymentFqn as StrictDeploymentFqn, type _aux_StrictDeploymentKind as StrictDeploymentKind, type _aux_StrictElementKind as StrictElementKind, type Fqn as StrictFqn, type _aux_StrictProjectId as StrictProjectId, type _aux_StrictRelationKind as StrictRelationKind, type _aux_StrictTag as StrictTag, type _aux_StrictViewId as StrictViewId, type _aux_Tag as Tag, type _aux_Tags as Tags, type _aux_Unknown as Unknown, type _aux_UnknownComputed as UnknownComputed, type _aux_UnknownLayouted as UnknownLayouted, type _aux_UnknownParsed as UnknownParsed, type _aux_ViewId as ViewId, type _aux_WithDescriptionAndTech as WithDescriptionAndTech, type _aux_WithLinks as WithLinks, type _aux_WithMetadata as WithMetadata, type _aux_WithNotation as WithNotation, type _aux_WithOptionalLinks as WithOptionalLinks, type _aux_WithOptionalTags as WithOptionalTags, type _aux_WithTags as WithTags, _aux_preferDescription as preferDescription, _aux_preferSummary as preferSummary, type _aux_setProject as setProject, type _aux_setStage as setStage, type _aux_toComputed as toComputed, type _aux_toLayouted as toLayouted, type _aux_toParsed as toParsed };
259
279
  }
260
280
 
261
- export { type WithTags as $, type Any as A, type WithMetadata as B, type EdgeId as C, type DeploymentId as D, type ExtractOnStage as E, type Fqn as F, type AnySpec as G, type PickByStage as H, type setStage as I, type NodeId as J, type Spec as K, type LooseTag as L, type ModelStage as M, type Never as N, type StrictProjectId as O, type ProjectId as P, type StrictTag as Q, type RelationKind as R, type SpecAux as S, type Tag as T, type Unknown as U, type ViewId as V, type WithOptionalTags as W, type StrictElementKind as X, type StrictDeploymentKind as Y, type StrictRelationKind as Z, _aux as _, type Aux as a, type WithLinks as a0, type OrString as a1, type LooseTags as a2, type LooseElementKind as a3, type LooseDeploymentKind as a4, type LooseRelationKind as a5, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, _stage as e, _type as f, type StrictViewId as g, type ElementKind as h, isOnStage as i, type ElementId as j, type AllKinds as k, type Tags as l, type Metadata as m, type MetadataKey as n, type DeploymentKind as o, type RelationId as p, type LooseElementId as q, type LooseDeploymentId as r, type DeploymentFqn as s, type toComputed as t, type toLayouted as u, type Stage as v, type toParsed as w, type LooseViewId as x, type setProject as y, type WithOptionalLinks as z };
281
+ export { type StrictProjectId as $, type Any as A, type setProject as B, type WithOptionalLinks as C, type DeploymentId as D, type ExtractOnStage as E, type Fqn as F, type WithDescriptionAndTech as G, type WithMetadata as H, type WithNotation as I, type WithTags as J, type EdgeId as K, type LooseTag as L, type ModelStage as M, type Never as N, type AnySpec as O, type ProjectId as P, type PickByStage as Q, type RelationKind as R, type SpecAux as S, type Tag as T, type Unknown as U, type ViewId as V, type WithOptionalTags as W, type setStage as X, type NodeId as Y, type Spec as Z, _aux as _, type Aux as a, type StrictTag as a0, type StrictElementKind as a1, type StrictDeploymentKind as a2, type StrictRelationKind as a3, type WithLinks as a4, type OrString as a5, type LooseTags as a6, type LooseElementKind as a7, type LooseDeploymentKind as a8, type LooseRelationKind as a9, type UnknownComputed as b, type UnknownLayouted as c, type UnknownParsed as d, preferSummary as e, _stage as f, _type as g, type StrictViewId as h, isOnStage as i, type ElementKind as j, type ElementId as k, type AllKinds as l, type Tags as m, type Metadata as n, type MetadataKey as o, preferDescription as p, type DeploymentKind as q, type RelationId as r, type LooseElementId as s, type LooseDeploymentId as t, type DeploymentFqn as u, type toComputed as v, type toLayouted as w, type Stage as x, type toParsed as y, type LooseViewId as z };
@@ -1,4 +1,4 @@
1
- import { pipe, groupBy, prop, mapValues, piped, map, unique, entries, flatMap, sortBy, last, reverse, partition, takeWhile, forEach, mapToObj, isTruthy, isBoolean, filter, isNot, anyPass, isDefined, reduce, isDeepEqual, only, pickBy, hasAtLeast, isEmpty as isEmpty$1, values, dropWhile, zip, take as take$2, isNonNullish, isArray, pick, findLast, omitBy, isNullish, when, constant, concat, indexBy } from 'remeda';
1
+ import { pipe, filter, groupBy, prop, mapValues, piped, map, unique, entries, flatMap, sortBy, last, reverse, partition, takeWhile, forEach, mapToObj, isTruthy, isBoolean, isNot, anyPass, isDefined, reduce, isDeepEqual, only, pickBy, hasAtLeast, values, dropWhile, zip, take as take$2, isNonNullish, isArray, pick, findLast, omitBy, isNullish, isEmpty as isEmpty$1, when, constant, concat, indexBy } from 'remeda';
2
2
  import { c as commonHead, o as objectHash, S as Stack } from './core.BB6zA-UU.mjs';
3
3
  import { a as nonNullable, i as invariant, n as nonexhaustive } from './core.D4npX2q8.mjs';
4
4
  import { EventEmitter } from 'events';
@@ -6,13 +6,14 @@ import { r as getDefaultExportFromCjs, b as isDescendantOf, f as sortParentsFirs
6
6
  import { r as requireIterator, b as requireSupport, a as requireForeach } from './core.CaT0SUUK.mjs';
7
7
  import { d as difference, i as intersection, u as union, h as hasIntersection } from './core.4u1dVmfX.mjs';
8
8
  import { ModelFqnExpr, ModelRelationExpr, ModelExpression } from '../types/expression-model.mjs';
9
- import { w as whereOperatorAsPredicate, a as _type, _ as _stage } from './core.yHe79zEl.mjs';
9
+ import { w as whereOperatorAsPredicate, a as _type, _ as _stage } from './core.CXy1NLUG.mjs';
10
10
  import { FqnRef } from '../types/fqnRef.mjs';
11
- import { a as isViewRuleStyle, m as isViewRuleAutoLayout, i as isViewRulePredicate, p as isViewRuleGroup, k as isViewRuleGlobalPredicateRef, j as isViewRuleGlobalStyle, o as isDynamicViewParallelSteps, h as isDynamicView, g as isDeploymentView, d as isElementView } from './core.T-eLZTW_.mjs';
11
+ import { a as isViewRuleStyle, o as omitUndefined, m as isViewRuleAutoLayout, i as isViewRulePredicate, q as isViewRuleGroup, k as isViewRuleGlobalPredicateRef, j as isViewRuleGlobalStyle, p as isDynamicViewParallelSteps, h as isDynamicView, g as isDeploymentView, d as isElementView } from './core.DJp8fgok.mjs';
12
12
  import { i as isGroupElementKind, G as GroupElementKind, d as stepEdgeId } from './core.Be1n9a0i.mjs';
13
- import { a as DefaultElementShape, D as DefaultThemeColor, f as DefaultArrowType, e as DefaultLineStyle, g as DefaultRelationshipColor } from './core.BqVo8LrH.mjs';
13
+ import { a as preferSummary } from './core.BazD6cot.mjs';
14
+ import { a as DefaultElementShape, D as DefaultThemeColor, h as DefaultArrowType, g as DefaultLineStyle, i as DefaultRelationshipColor } from './core.Ae86Y3tB.mjs';
14
15
  import { FqnExpr, RelationExpr } from '../types/expression.mjs';
15
- import { d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.CsbOakly.mjs';
16
+ import { d as deploymentConnection, R as RelationshipsAccum, D as DeploymentConnectionModel } from './core.DA5vzwZ9.mjs';
16
17
  import { c as findAscendingConnections, o as mergeConnections, d as differenceConnections, m as isNestedConnection, s as sortConnectionsByBoundaryHierarchy, a as findConnectionsBetween$3, q as modelConnection, g as findDescendantConnections, e as findDeepestNestedConnection, k as isAnyInOut, n as isOutgoing, l as isIncoming, C as ConnectionModel } from './core.D0EgVMQK.mjs';
17
18
  import { a as toSet, t as toArray, i as imap } from './core.DLpidoWc.mjs';
18
19
  import { D as DefaultMap } from './core.BuoXfSMj.mjs';
@@ -20,12 +21,13 @@ import { i as ifilter } from './core.CCD1ID81.mjs';
20
21
  import { i as isome } from './core.Be4Jy9Qx.mjs';
21
22
  import { C as Connection, c as customInspectSymbol } from './core.BVNaR17u.mjs';
22
23
  import { i as isIterable } from './core.DoM6aM9N.mjs';
23
- import { m as isElementModel, j as isNestedElementOfDeployedInstanceModel, f as isDeployedInstanceModel, i as isDeploymentNodeModel, h as isDeploymentElementModel, L as LikeC4Model } from './core.DozSPE83.mjs';
24
+ import { m as isElementModel, j as isNestedElementOfDeployedInstanceModel, f as isDeployedInstanceModel, i as isDeploymentNodeModel, h as isDeploymentElementModel, L as LikeC4Model } from './core.Asc11Mjy.mjs';
24
25
  import { a as iunique, i as iflat } from './core.CNGyqkJh.mjs';
25
26
 
26
27
  function buildElementNotations(nodes) {
27
28
  return pipe(
28
29
  nodes,
30
+ filter((n) => !!n.notation),
29
31
  groupBy(prop("notation")),
30
32
  mapValues(
31
33
  piped(
@@ -8541,12 +8543,25 @@ function updateDepthOfAncestors(node, nodes) {
8541
8543
  }
8542
8544
  }
8543
8545
  function elementModelToNodeSource(el) {
8544
- return {
8545
- ...el.$element,
8546
- tags: [...el.tags],
8547
- id: el.id,
8548
- modelRef: el.id
8549
- };
8546
+ const {
8547
+ id,
8548
+ summary,
8549
+ // omit
8550
+ style,
8551
+ metadata,
8552
+ // omit
8553
+ ...rest
8554
+ } = el.$element;
8555
+ return omitUndefined({
8556
+ id,
8557
+ modelRef: id,
8558
+ ...rest,
8559
+ style: { ...style },
8560
+ color: el.color,
8561
+ shape: el.shape,
8562
+ description: preferSummary(el.$element),
8563
+ tags: [...el.tags]
8564
+ });
8550
8565
  }
8551
8566
  function buildComputedNodes(elements, groups) {
8552
8567
  const nodesMap = /* @__PURE__ */ new Map();
@@ -8843,38 +8858,50 @@ function deploymentExpressionToPredicate(target) {
8843
8858
  }
8844
8859
  nonexhaustive(target);
8845
8860
  }
8861
+ function instanceSummary(model) {
8862
+ return preferSummary(model.$instance) ?? preferSummary(model.element.$element);
8863
+ }
8846
8864
  function toNodeSource(el) {
8847
8865
  if (el.isDeploymentNode()) {
8848
8866
  const onlyOneInstance = el.onlyOneInstance();
8849
- let { title, kind, id, description: description2, ...$node } = el.$node;
8850
- const { icon: icon2, color: color2, shape: shape2, ...style2 } = el.$node.style ?? {};
8867
+ let {
8868
+ title,
8869
+ id,
8870
+ description: description2,
8871
+ summary,
8872
+ metadata,
8873
+ style: style2,
8874
+ element: element2,
8875
+ tags: _tags,
8876
+ // omit
8877
+ ...$node
8878
+ } = el.$node;
8879
+ let icon2 = style2.icon;
8851
8880
  let tags = [...el.tags];
8881
+ summary ??= description2;
8852
8882
  if (onlyOneInstance) {
8853
8883
  tags = unique([...tags, ...onlyOneInstance.tags]);
8854
8884
  if (title === nameFromFqn(el.id)) {
8855
8885
  title = onlyOneInstance.title;
8856
8886
  }
8857
- description2 = onlyOneInstance.description.$source ?? description2;
8887
+ icon2 ??= onlyOneInstance.style.icon;
8888
+ summary ??= instanceSummary(onlyOneInstance);
8858
8889
  }
8859
- return {
8890
+ return omitUndefined({
8891
+ id,
8892
+ deploymentRef: id,
8893
+ title,
8894
+ ...$node,
8895
+ color: style2.color ?? onlyOneInstance?.color ?? DefaultThemeColor,
8896
+ shape: style2.shape ?? DefaultElementShape,
8860
8897
  ...onlyOneInstance && {
8861
- ...toNodeSource(onlyOneInstance),
8862
8898
  modelRef: onlyOneInstance.element.id
8863
8899
  },
8864
- title,
8865
- ...$node,
8866
- ...icon2 && { icon: icon2 },
8867
- ...color2 && { color: color2 },
8868
- ...shape2 && { shape: shape2 },
8869
- ...description2 && { description: description2 },
8900
+ icon: icon2,
8901
+ description: summary,
8870
8902
  tags,
8871
- style: {
8872
- ...style2
8873
- },
8874
- deploymentRef: id,
8875
- kind,
8876
- id
8877
- };
8903
+ style: style2
8904
+ });
8878
8905
  }
8879
8906
  invariant(el.isInstance(), "Expected Instance");
8880
8907
  const instance = el.$instance;
@@ -8884,30 +8911,25 @@ function toNodeSource(el) {
8884
8911
  ...element.links,
8885
8912
  ...instance.links ?? []
8886
8913
  ];
8887
- const metadata = {
8888
- ...element.getMetadata(),
8889
- ...instance.metadata
8890
- };
8891
8914
  const notation = instance.notation ?? element.$element.notation;
8892
- let description = el.description.$source;
8893
- let technology = instance.technology ?? element.technology;
8894
- return {
8915
+ const description = instanceSummary(el);
8916
+ const technology = el.technology ?? void 0;
8917
+ return omitUndefined({
8895
8918
  id: el.id,
8896
8919
  kind: "instance",
8897
8920
  title: el.title,
8898
- ...description && { description },
8899
- ...technology && { technology },
8921
+ description,
8922
+ technology,
8900
8923
  tags: [...el.tags],
8901
- links: hasAtLeast(links, 1) ? links : null,
8902
- ...icon && { icon },
8903
- ...color && { color },
8904
- ...shape && { shape },
8924
+ links: hasAtLeast(links, 1) ? links : void 0,
8925
+ icon,
8926
+ color,
8927
+ shape,
8905
8928
  style,
8906
8929
  deploymentRef: instance.id,
8907
8930
  modelRef: element.id,
8908
- ...notation && { notation },
8909
- ...!isEmpty$1(metadata) && { metadata }
8910
- };
8931
+ notation
8932
+ });
8911
8933
  }
8912
8934
  function toComputedEdges$1(connections) {
8913
8935
  return connections.reduce((acc, e) => {
@@ -10359,6 +10381,7 @@ class DynamicViewCompute {
10359
10381
  ...view,
10360
10382
  [_type]: "dynamic",
10361
10383
  [_stage]: "computed",
10384
+ variant: view.variant ?? "diagram",
10362
10385
  autoLayout: {
10363
10386
  direction: autoLayoutRule?.direction ?? "LR",
10364
10387
  ...autoLayoutRule?.nodeSep && { nodeSep: autoLayoutRule.nodeSep },
@@ -1,5 +1,5 @@
1
- import { A as Any, T as Tag, k as AllKinds, l as Tags, g as StrictViewId, h as ElementKind } from './core.B4scjmM6.mjs';
2
- import { N as NonEmptyArray, E as ExclusiveUnion } from './core.1_FtXl46.mjs';
1
+ import { A as Any, T as Tag, l as AllKinds, m as Tags, h as StrictViewId, j as ElementKind } from './core.BhpgpOep.mjs';
2
+ import { N as NonEmptyArray, E as ExclusiveUnion } from './core.DgesAwC8.mjs';
3
3
  import { FqnRef } from '../types/fqnRef.mjs';
4
4
  import { M as MarkdownOrString, I as Icon } from './core.DX-WYEPA.mjs';
5
5
  import { i as Color, R as RelationshipLineType, f as RelationshipArrowType, c as ElementShape, b as BorderStyle, a as ShapeSize } from './core.CzdwsPmY.mjs';