@likec4/core 1.27.0 → 1.27.2

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.
@@ -1,5 +1,5 @@
1
1
  import { LastArrayElement, Split, Simplify, Writable, IfNever, TupleToUnion, Tagged, IsStringLiteral as IsStringLiteral$1, IsLiteral } from 'type-fest';
2
- import { L as LikeC4Model } from '../shared/core.CtloVwbo.mjs';
2
+ import { L as LikeC4Model } from '../shared/core.C7IN6igU.mjs';
3
3
  import { D as DeploymentElement, i as DeploymentRelation, ax as ModelRelation, ap as Participant, A as CustomElementExpr, B as CustomRelationExpr, bw as ViewRuleStyle, aX as AutoLayoutDirection, X as ExpressionV2, N as Expression, L as LikeC4View, b4 as DeploymentView, bh as ElementView, az as RelationshipArrowType, aC as RelationshipLineType, aB as RelationshipKindSpecification, g as DeploymentNodeKindSpecification, a9 as ParsedLikeC4ModelData } from '../shared/core.z6g06scf.mjs';
4
4
  import { F as Fqn, m as Element, N as NonEmptyArray, p as ElementShape, x as Color, l as BorderStyle, S as ShapeSize, M as SpacingSize, O as TextSize, n as ElementKindSpecification, K as KeysOf } from '../shared/core.30yYKXcZ.mjs';
5
5
  import { IsStringLiteral } from 'type-fest/source/is-literal';
@@ -1,4 +1,4 @@
1
- import { a as i, l, d, L as LikeC4Model } from '../shared/core.zj2huD5x.mjs';
1
+ import { a as i, l, d, L as LikeC4Model } from '../shared/core.RjpTh3vE.mjs';
2
2
  import { m, l as l$1, i as i$1 } from '../shared/core.Cu-UdkSl.mjs';
3
3
  import { f as t, n as nameFromFqn, g as isSameHierarchy, p as parentFqn, h as t$1 } from '../shared/core.CQXU9DF7.mjs';
4
4
  import { o, b as isElementPredicateExpr, D as DefaultElementShape, c as DefaultThemeColor, n as n$1, d as DeploymentElement, e as isScopedElementView } from '../shared/core.BMep80lJ.mjs';
@@ -1,4 +1,4 @@
1
- export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.CtloVwbo.mjs';
1
+ export { C as ComputeViewResult, c as computeView, a as computeViews, u as unsafeComputeView } from '../shared/core.C7IN6igU.mjs';
2
2
  import { L as LikeC4View, C as ComputedLikeC4ModelData, a as ComputedView } from '../shared/core.z6g06scf.mjs';
3
3
  import 'type-fest';
4
4
  import '../shared/core.30yYKXcZ.mjs';
@@ -1,5 +1,5 @@
1
- import { G as Graph, r, w as willCreateCycle, t as topologicalSortExports, i as i$1, a as i$2, l } from '../shared/core.zj2huD5x.mjs';
2
- export { c as computeView, b as computeViews, u as unsafeComputeView } from '../shared/core.zj2huD5x.mjs';
1
+ import { G as Graph, r, w as willCreateCycle, t as topologicalSortExports, i as i$1, a as i$2, l } from '../shared/core.RjpTh3vE.mjs';
2
+ export { c as computeView, b as computeViews, u as unsafeComputeView } from '../shared/core.RjpTh3vE.mjs';
3
3
  import { i as isExtendsElementView, a as isElementView } from '../shared/core.BMep80lJ.mjs';
4
4
  import { e as isNonEmptyArray } from '../shared/core.CQXU9DF7.mjs';
5
5
  import { i, m } from '../shared/core.Cu-UdkSl.mjs';
@@ -1,4 +1,4 @@
1
- import { A as AnyAux, E as ElementModel, R as RelationshipModel, L as LikeC4Model } from '../../shared/core.CtloVwbo.mjs';
1
+ import { A as AnyAux, E as ElementModel, R as RelationshipModel, L as LikeC4Model } from '../../shared/core.C7IN6igU.mjs';
2
2
  import 'type-fest';
3
3
  import '../../shared/core.z6g06scf.mjs';
4
4
  import '../../shared/core.30yYKXcZ.mjs';
package/dist/index.d.mts CHANGED
@@ -2,8 +2,8 @@ import { H as HexColorLiteral, T as ThemeColorValues, L as LikeC4Theme } from '.
2
2
  export { A as AsFqn, l as BorderStyle, B as BorderStyles, x as Color, y as ColorLiteral, C as CustomColor, D as DefaultElementShape, f as DefaultPaddingSize, g as DefaultShapeSize, h as DefaultTextSize, i as DefaultThemeColor, m as Element, j as ElementKind, n as ElementKindSpecification, o as ElementKindSpecificationStyle, p as ElementShape, k as ElementShapes, q as ElementStyle, G as ElementThemeColorValues, z as ElementThemeColors, E as ExclusiveUnion, F as Fqn, I as IconUrl, a as IteratorLike, K as KeysOf, r as Link, c as NTuple, N as NonEmptyArray, b as NonEmptyReadonlyArray, P as Point, d as Predicate, e as ProjectId, J as RelationshipThemeColorValues, R as RelationshipThemeColors, S as ShapeSize, M as SpacingSize, s as Tag, t as TagSpec, O as TextSize, Q as ThemeColor, w as ThemeColors, u as TypedElement, X as XYPoint, v as isThemeColor } from './shared/core.30yYKXcZ.mjs';
3
3
  export { aw as AbstractRelation, ah as AllNever, ai as AndOperator, a5 as AnyParsedLikeC4ModelData, aX as AutoLayoutDirection, a_ as BBox, aY as BasicElementView, aZ as BasicView, a$ as ComputedDeploymentView, b0 as ComputedDynamicView, b1 as ComputedEdge, b2 as ComputedElementView, C as ComputedLikeC4ModelData, aD as ComputedNode, a as ComputedView, b3 as CustomColorDefinitions, A as CustomElementExpr, B as CustomRelationExpr, at as DefaultArrowType, au as DefaultLineStyle, av as DefaultRelationshipColor, b as DeployedInstance, D as DeploymentElement, c as DeploymentElementStyle, d as DeploymentNode, f as DeploymentNodeKind, g as DeploymentNodeKindSpecification, h as DeploymentRef, i as DeploymentRelation, b4 as DeploymentView, b5 as DeploymentViewRule, b6 as DeploymentViewRulePredicate, b7 as DeploymentViewRuleStyle, b8 as DiagramEdge, aE as DiagramNode, b9 as DiagramView, E as DirectRelationExpr, ba as DynamicView, bb as DynamicViewIncludeRule, bc as DynamicViewParallelSteps, bd as DynamicViewRule, be as DynamicViewStep, bf as DynamicViewStepOrParallel, bg as EdgeId, F as ElementExpression, G as ElementKindExpr, bA as ElementNotation, H as ElementPredicateExpression, I as ElementRefExpr, J as ElementTagExpr, bh as ElementView, K as ElementWhereExpr, aj as EqualOperator, M as ExpandedElementExpr, e as Expr, N as Expression, X as ExpressionV2, bi as ExtendsElementView, ak as Filterable, Y as FqnExpr, Z as FqnRef, a6 as GenericLikeC4ModelData, $ as GlobalDynamicPredicates, a0 as GlobalPredicateId, a1 as GlobalPredicates, a2 as GlobalStyleID, a3 as GlobalStyles, Q as InOutExpr, O as IncomingExpr, al as KindEqual, a7 as LayoutedLikeC4ModelData, a8 as LikeC4ModelDump, L as LikeC4View, a4 as ModelGlobals, ax as ModelRelation, bj as NodeId, R as NonWilcard, am as NotOperator, an as OperatorPredicate, ao as OrOperator, S as OutgoingExpr, a9 as ParsedLikeC4ModelData, ap as Participant, aq as ParticipantOperator, P as PredicateSelector, _ as RelationExpr, T as RelationExpression, ay as RelationId, U as RelationPredicateExpression, V as RelationWhereExpr, az as RelationshipArrowType, aA as RelationshipKind, aB as RelationshipKindSpecification, aC as RelationshipLineType, bk as ScopedElementView, bl as StepEdgeId, bm as StepEdgeIdLiteral, ar as TagEqual, bn as ViewAutoLayout, bo as ViewId, bp as ViewManualLayout, bq as ViewRule, br as ViewRuleAutoLayout, bs as ViewRuleGlobalPredicateRef, bt as ViewRuleGlobalStyle, bu as ViewRuleGroup, bv as ViewRulePredicate, bw as ViewRuleStyle, bx as ViewRuleStyleOrGlobalRef, by as ViewWithHash, bz as ViewWithNotation, as as WhereOperator, W as WildcardExpr, aF as extractStep, aG as getBBoxCenter, aH as getParallelStepsPrefix, aa as isAndOperator, aI as isAutoLayoutDirection, j as isCustomElement, k as isCustomRelationExpr, aJ as isDeploymentView, aK as isDynamicView, aL as isDynamicViewParallelSteps, l as isElement, m as isElementKindExpr, n as isElementPredicateExpr, o as isElementRef, p as isElementTagExpr, aM as isElementView, q as isElementWhere, r as isExpandedElementExpr, aN as isExtendsElementView, t as isInOut, s as isIncoming, ab as isKindEqual, ac as isNotOperator, ad as isOrOperator, u as isOutgoing, ae as isParticipantOperator, v as isRelation, w as isRelationExpression, x as isRelationPredicateExpr, y as isRelationWhere, aO as isScopedElementView, aP as isStepEdgeId, af as isTagEqual, aQ as isViewRuleAutoLayout, aR as isViewRuleGlobalPredicateRef, aS as isViewRuleGlobalStyle, aT as isViewRuleGroup, aU as isViewRulePredicate, aV as isViewRuleStyle, z as isWildcard, aW as stepEdgeId, ag as whereOperatorAsPredicate } from './shared/core.z6g06scf.mjs';
4
4
  export { BiMap, DefaultMap, DefaultWeakMap, LinkedList, MultiMap, Queue, Stack, commonHead, compareNatural, compareRelations, delay, difference, equalsSet, getOrCreate, hasAtLeast, ifilter, ifind, iflat, imap, intersection, ireduce, isIterable, isNonEmptyArray, isString, isome, iunique, objectHash, stringHash, symmetricDifference, toArray, toSet, union } from './utils/index.mjs';
5
- export { A as AnyAux, b as Aux, C as ComputeViewResult, D as DeployedInstanceModel, d as DeploymentElementModel, e as DeploymentNodeModel, f as DeploymentRelationModel, g as EdgeModel, E as ElementModel, h as LikeC4DeploymentModel, L as LikeC4Model, i as LikeC4ViewModel, N as NodeModel, R as RelationshipModel, c as computeView, a as computeViews, u as unsafeComputeView } from './shared/core.CtloVwbo.mjs';
6
- export { C as Connection, a as ConnectionModel, D as DeploymentConnectionModel } from './shared/core.Uz54YXx0.mjs';
5
+ export { A as AnyAux, b as Aux, C as ComputeViewResult, D as DeployedInstanceModel, d as DeploymentElementModel, e as DeploymentNodeModel, f as DeploymentRelationModel, g as EdgeModel, E as ElementModel, h as LikeC4DeploymentModel, L as LikeC4Model, i as LikeC4ViewModel, N as NodeModel, R as RelationshipModel, c as computeView, a as computeViews, u as unsafeComputeView } from './shared/core.C7IN6igU.mjs';
6
+ export { C as Connection, a as ConnectionModel, D as DeploymentConnectionModel } from './shared/core.C9JdFlAd.mjs';
7
7
  export { OverviewGraph, ViewChange } from './types/index.mjs';
8
8
  export { I as IterableContainer, R as ReorderedArray, a as ancestorsFqn, c as commonAncestor, b as compareByFqnHierarchically, d as compareFqnHierarchically, h as hierarchyDistance, e as hierarchyLevel, i as isAncestor, f as isDescendantOf, g as isSameHierarchy, n as nameFromFqn, p as parentFqn, s as sortByFqnHierarchically, j as sortNaturalByFqn, k as sortParentsFirst } from './shared/core.HKn0jlo_.mjs';
9
9
  import 'type-fest';
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { i as invariant, n as nonNullable, a as nonexhaustive } from './shared/core.C-YXI-43.mjs';
2
2
  export { A as AsFqn, B as BorderStyles, V as ComputedNode, W as ComputedView, S as DefaultArrowType, D as DefaultElementShape, T as DefaultLineStyle, g as DefaultPaddingSize, U as DefaultRelationshipColor, h as DefaultShapeSize, j as DefaultTextSize, c as DefaultThemeColor, d as DeploymentElement, X as DiagramNode, E as ElementKind, k as ElementShapes, f as Expr, H as ExpressionV2, I as FqnExpr, J as FqnRef, R as RelationExpr, Y as extractStep, Z as getBBoxCenter, _ as getParallelStepsPrefix, K as isAndOperator, $ as isAutoLayoutDirection, l as isCustomElement, m as isCustomRelationExpr, a0 as isDeploymentView, a1 as isDynamicView, a2 as isDynamicViewParallelSteps, p as isElement, q as isElementKindExpr, b as isElementPredicateExpr, r as isElementRef, s as isElementTagExpr, a as isElementView, t as isElementWhere, u as isExpandedElementExpr, i as isExtendsElementView, w as isInOut, v as isIncoming, L as isKindEqual, M as isNotOperator, N as isOrOperator, x as isOutgoing, O as isParticipantOperator, y as isRelation, z as isRelationExpression, C as isRelationPredicateExpr, F as isRelationWhere, e as isScopedElementView, a3 as isStepEdgeId, P as isTagEqual, a4 as isViewRuleAutoLayout, a5 as isViewRuleGlobalPredicateRef, a6 as isViewRuleGlobalStyle, a7 as isViewRuleGroup, a8 as isViewRulePredicate, a9 as isViewRuleStyle, G as isWildcard, aa as stepEdgeId, Q as whereOperatorAsPredicate } from './shared/core.BMep80lJ.mjs';
3
- export { C as Connection, e as ConnectionModel, D as DeployedInstanceModel, f as DeploymentConnectionModel, g as DeploymentNodeModel, h as DeploymentRelationModel, E as EdgeModel, j as ElementModel, k as LikeC4DeploymentModel, L as LikeC4Model, m as LikeC4ViewModel, N as NodeModel, R as RelationshipModel, c as computeView, b as computeViews, u as unsafeComputeView } from './shared/core.zj2huD5x.mjs';
3
+ export { C as Connection, e as ConnectionModel, D as DeployedInstanceModel, f as DeploymentConnectionModel, g as DeploymentNodeModel, h as DeploymentRelationModel, E as EdgeModel, j as ElementModel, k as LikeC4DeploymentModel, L as LikeC4Model, m as LikeC4ViewModel, N as NodeModel, R as RelationshipModel, c as computeView, b as computeViews, u as unsafeComputeView } from './shared/core.RjpTh3vE.mjs';
4
4
  export { ThemeColors, isThemeColor } from './types/index.mjs';
5
5
  export { BiMap, DefaultWeakMap, LinkedList, MultiMap, Queue, compareRelations, delay, ireduce } from './utils/index.mjs';
6
6
  export { D as DefaultMap, l as ancestorsFqn, m as commonAncestor, o as compareByFqnHierarchically, q as compareFqnHierarchically, k as compareNatural, r as hierarchyDistance, u as hierarchyLevel, c as ifilter, d as imap, a as isAncestor, i as isDescendantOf, e as isNonEmptyArray, g as isSameHierarchy, x as isString, n as nameFromFqn, p as parentFqn, v as sortByFqnHierarchically, w as sortNaturalByFqn, s as sortParentsFirst, b as toArray, t as toSet } from './shared/core.CQXU9DF7.mjs';
@@ -1,6 +1,6 @@
1
- import { A as AnyAux, d as DeploymentElementModel, E as ElementModel, D as DeployedInstanceModel, e as DeploymentNodeModel } from '../shared/core.CtloVwbo.mjs';
2
- export { b as Aux, f as DeploymentRelationModel, g as EdgeModel, h as LikeC4DeploymentModel, L as LikeC4Model, i as LikeC4ViewModel, N as NodeModel, R as RelationshipModel } from '../shared/core.CtloVwbo.mjs';
3
- import { C as Connection, D as DeploymentConnectionModel, a as ConnectionModel } from '../shared/core.Uz54YXx0.mjs';
1
+ import { A as AnyAux, d as DeploymentElementModel, E as ElementModel, D as DeployedInstanceModel, e as DeploymentNodeModel } from '../shared/core.C7IN6igU.mjs';
2
+ export { b as Aux, f as DeploymentRelationModel, g as EdgeModel, h as LikeC4DeploymentModel, L as LikeC4Model, i as LikeC4ViewModel, N as NodeModel, R as RelationshipModel } from '../shared/core.C7IN6igU.mjs';
3
+ import { C as Connection, D as DeploymentConnectionModel, a as ConnectionModel } from '../shared/core.C9JdFlAd.mjs';
4
4
  import { I as IterableContainer, R as ReorderedArray } from '../shared/core.HKn0jlo_.mjs';
5
5
  import 'type-fest';
6
6
  import '../shared/core.z6g06scf.mjs';
@@ -1 +1 @@
1
- export { C as Connection, e as ConnectionModel, D as DeployedInstanceModel, f as DeploymentConnectionModel, g as DeploymentNodeModel, h as DeploymentRelationModel, E as EdgeModel, j as ElementModel, k as LikeC4DeploymentModel, L as LikeC4Model, m as LikeC4ViewModel, N as NodeModel, R as RelationshipModel, n as deploymentConnection, o as differenceConnections, p as findAscendingConnections, q as findDeepestNestedConnection, s as findDescendantConnections, v as hasSameSource, x as hasSameSourceTarget, y as hasSameTarget, z as isAnyInOut, M as isDeployedInstance, O as isDeploymentNode, A as isIncoming, B as isNestedConnection, F as isOutgoing, H as mergeConnections, I as modelConnection, J as sortConnectionsByBoundaryHierarchy, K as sortDeepestFirst } from '../shared/core.zj2huD5x.mjs';
1
+ export { C as Connection, e as ConnectionModel, D as DeployedInstanceModel, f as DeploymentConnectionModel, g as DeploymentNodeModel, h as DeploymentRelationModel, E as EdgeModel, j as ElementModel, k as LikeC4DeploymentModel, L as LikeC4Model, m as LikeC4ViewModel, N as NodeModel, R as RelationshipModel, n as deploymentConnection, o as differenceConnections, p as findAscendingConnections, q as findDeepestNestedConnection, s as findDescendantConnections, v as hasSameSource, x as hasSameSourceTarget, y as hasSameTarget, z as isAnyInOut, M as isDeployedInstance, O as isDeploymentNode, A as isIncoming, B as isNestedConnection, F as isOutgoing, H as mergeConnections, I as modelConnection, J as sortConnectionsByBoundaryHierarchy, K as sortDeepestFirst } from '../shared/core.RjpTh3vE.mjs';
@@ -1,5 +1,5 @@
1
1
  import { IsStringLiteral, LiteralUnion, Simplify, SetRequired } from 'type-fest';
2
- import { a as ComputedView, L as LikeC4View, a9 as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, bo as ViewId, ay as RelationId, bj as NodeId, bg as EdgeId, a6 as GenericLikeC4ModelData, a7 as LayoutedLikeC4ModelData, b9 as DiagramView, a8 as LikeC4ModelDump, f as DeploymentNodeKind, b0 as ComputedDynamicView, bl as StepEdgeId, b2 as ComputedElementView, a$ as ComputedDeploymentView, ax as ModelRelation, a5 as AnyParsedLikeC4ModelData, a4 as ModelGlobals, h as DeploymentRef, d as DeploymentNode, b as DeployedInstance, c as DeploymentElementStyle, i as DeploymentRelation, aA as RelationshipKind } from './core.z6g06scf.mjs';
2
+ import { a as ComputedView, L as LikeC4View, a9 as ParsedLikeC4ModelData, C as ComputedLikeC4ModelData, bo as ViewId, ay as RelationId, bj as NodeId, bg as EdgeId, a6 as GenericLikeC4ModelData, a7 as LayoutedLikeC4ModelData, b9 as DiagramView, a8 as LikeC4ModelDump, f as DeploymentNodeKind, aC as RelationshipLineType, b0 as ComputedDynamicView, bl as StepEdgeId, b2 as ComputedElementView, a$ as ComputedDeploymentView, ax as ModelRelation, a5 as AnyParsedLikeC4ModelData, a4 as ModelGlobals, h as DeploymentRef, d as DeploymentNode, b as DeployedInstance, c as DeploymentElementStyle, i as DeploymentRelation, aA as RelationshipKind } from './core.z6g06scf.mjs';
3
3
  import { F as Fqn, K as KeysOf, a as IteratorLike, j as ElementKind, p as ElementShape, x as Color, I as IconUrl, s as Tag, r as Link, q as ElementStyle, Q as ThemeColor, m as Element } from './core.30yYKXcZ.mjs';
4
4
 
5
5
  type ComputeViewResult<V extends ComputedView = ComputedView> = {
@@ -141,6 +141,8 @@ declare class EdgeModel<M extends AnyAux, V extends ComputedView | DiagramView =
141
141
  get tags(): ReadonlyArray<Tag>;
142
142
  get stepNumber(): number | null;
143
143
  get navigateTo(): LikeC4ViewModel<M> | null;
144
+ get color(): Color;
145
+ get line(): RelationshipLineType;
144
146
  isStep(): this is EdgeModel.StepEdge<M, ComputedDynamicView>;
145
147
  relationships(type: 'model'): IteratorLike<RelationshipModel<M>>;
146
148
  relationships(type: 'deployment'): IteratorLike<DeploymentRelationModel<M>>;
@@ -245,6 +247,8 @@ declare class RelationshipModel<M extends AnyAux = AnyAux> {
245
247
  get tags(): ReadonlyArray<Tag>;
246
248
  get kind(): string | null;
247
249
  get links(): ReadonlyArray<Link>;
250
+ get color(): Color;
251
+ get line(): RelationshipLineType;
248
252
  /**
249
253
  * Iterate over all views that include this relationship.
250
254
  */
@@ -626,6 +630,8 @@ declare class DeploymentRelationModel<M extends AnyAux = AnyAux> {
626
630
  get kind(): RelationshipKind | null;
627
631
  get navigateTo(): LikeC4ViewModel<M> | null;
628
632
  get links(): ReadonlyArray<Link>;
633
+ get color(): Color;
634
+ get line(): RelationshipLineType;
629
635
  views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>>;
630
636
  isDeploymentRelation(): this is DeploymentRelationModel<M>;
631
637
  }
@@ -1,4 +1,4 @@
1
- import { E as ElementModel, d as DeploymentElementModel, A as AnyAux, e as DeploymentNodeModel, D as DeployedInstanceModel, j as RelationshipsAccum, R as RelationshipModel, f as DeploymentRelationModel } from './core.CtloVwbo.mjs';
1
+ import { E as ElementModel, d as DeploymentElementModel, A as AnyAux, e as DeploymentNodeModel, D as DeployedInstanceModel, j as RelationshipsAccum, R as RelationshipModel, f as DeploymentRelationModel } from './core.C7IN6igU.mjs';
2
2
  import { F as Fqn, a as IteratorLike } from './core.30yYKXcZ.mjs';
3
3
 
4
4
  interface Connection<Elem = ElementModel | DeploymentElementModel, Id = string> {
@@ -1,4 +1,4 @@
1
- import { D as DefaultElementShape, c as DefaultThemeColor, h as DefaultShapeSize, ab as o$8, t as isElementWhere, Q as whereOperatorAsPredicate, G as isWildcard, q as isElementKindExpr, s as isElementTagExpr, n as n$4, u as isExpandedElementExpr, r as isElementRef, l as isCustomElement, a9 as isViewRuleStyle, ac as y$2, V as ComputedNode, E as ElementKind, S as DefaultArrowType, I as FqnExpr, R as RelationExpr, o as o$9, a8 as isViewRulePredicate, a4 as isViewRuleAutoLayout, a7 as isViewRuleGroup, a5 as isViewRuleGlobalPredicateRef, a6 as isViewRuleGlobalStyle, aa as stepEdgeId, a2 as isDynamicViewParallelSteps, T as DefaultLineStyle, U as DefaultRelationshipColor, x as isOutgoing$1, v as isIncoming$1, w as isInOut, y as isRelation, F as isRelationWhere, m as isCustomRelationExpr, C as isRelationPredicateExpr, b as isElementPredicateExpr, a as isElementView, a1 as isDynamicView, a0 as isDeploymentView, d as DeploymentElement, Y as extractStep, a3 as isStepEdgeId, e as isScopedElementView } from './core.BMep80lJ.mjs';
1
+ import { D as DefaultElementShape, c as DefaultThemeColor, h as DefaultShapeSize, U as DefaultRelationshipColor, T as DefaultLineStyle, ab as o$8, t as isElementWhere, Q as whereOperatorAsPredicate, G as isWildcard, q as isElementKindExpr, s as isElementTagExpr, n as n$4, u as isExpandedElementExpr, r as isElementRef, l as isCustomElement, a9 as isViewRuleStyle, ac as y$2, V as ComputedNode, E as ElementKind, S as DefaultArrowType, I as FqnExpr, R as RelationExpr, o as o$9, a8 as isViewRulePredicate, a4 as isViewRuleAutoLayout, a7 as isViewRuleGroup, a5 as isViewRuleGlobalPredicateRef, a6 as isViewRuleGlobalStyle, aa as stepEdgeId, a2 as isDynamicViewParallelSteps, x as isOutgoing$1, v as isIncoming$1, w as isInOut, y as isRelation, F as isRelationWhere, m as isCustomRelationExpr, C as isRelationPredicateExpr, b as isElementPredicateExpr, a as isElementView, a1 as isDynamicView, a0 as isDeploymentView, d as DeploymentElement, Y as extractStep, a3 as isStepEdgeId, e as isScopedElementView } from './core.BMep80lJ.mjs';
2
2
  import { C, y as s$1, z as a$5, u as hierarchyLevel, a as isAncestor, m as commonAncestor, w as sortNaturalByFqn, j as getDefaultExportFromCjs, i as isDescendantOf, x as isString, g as isSameHierarchy, c as ifilter, t as toSet, s as sortParentsFirst, b as toArray, D as DefaultMap, d as imap, p as parentFqn, o as compareByFqnHierarchically, e as isNonEmptyArray, k as compareNatural, n as nameFromFqn, f as t$6, v as sortByFqnHierarchically, l as ancestorsFqn } from './core.CQXU9DF7.mjs';
3
3
  import { u as u$6 } from './core.DbRvwARP.mjs';
4
4
  import { n as nonNullable, i as invariant, a as nonexhaustive } from './core.C-YXI-43.mjs';
@@ -1942,6 +1942,12 @@ class DeploymentRelationModel {
1942
1942
  get links() {
1943
1943
  return this.$relationship.links ?? [];
1944
1944
  }
1945
+ get color() {
1946
+ return this.$relationship.color ?? DefaultRelationshipColor;
1947
+ }
1948
+ get line() {
1949
+ return this.$relationship.line ?? DefaultLineStyle;
1950
+ }
1945
1951
  *views() {
1946
1952
  for (const view of this.$model.views()) {
1947
1953
  if (view.includesRelation(this.id)) {
@@ -4496,7 +4502,6 @@ function computeDeploymentView(likec4model, {
4496
4502
  },
4497
4503
  edges: sorted.edges,
4498
4504
  nodes: m$3(nodes, (n) => {
4499
- delete n.notation;
4500
4505
  if (n.icon === "none") {
4501
4506
  delete n.icon;
4502
4507
  }
@@ -4766,7 +4771,6 @@ class DynamicViewCompute {
4766
4771
  ...autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }
4767
4772
  },
4768
4773
  nodes: m$3(nodes, (n) => {
4769
- delete n.notation;
4770
4774
  if (n.icon === "none") {
4771
4775
  delete n.icon;
4772
4776
  }
@@ -6236,7 +6240,6 @@ function computeElementView(likec4model, {
6236
6240
  },
6237
6241
  edges: applyCustomRelationProperties(rules, nodes, sorted.edges),
6238
6242
  nodes: m$3(nodes, (n) => {
6239
- delete n.notation;
6240
6243
  if (n.icon === "none") {
6241
6244
  delete n.icon;
6242
6245
  }
@@ -6713,6 +6716,12 @@ class RelationshipModel {
6713
6716
  get links() {
6714
6717
  return this.$relationship.links ?? [];
6715
6718
  }
6719
+ get color() {
6720
+ return this.$relationship.color ?? DefaultRelationshipColor;
6721
+ }
6722
+ get line() {
6723
+ return this.$relationship.line ?? DefaultLineStyle;
6724
+ }
6716
6725
  /**
6717
6726
  * Iterate over all views that include this relationship.
6718
6727
  */
@@ -6763,6 +6772,12 @@ class EdgeModel {
6763
6772
  get navigateTo() {
6764
6773
  return this.$edge.navigateTo ? this.view.$model.view(this.$edge.navigateTo) : null;
6765
6774
  }
6775
+ get color() {
6776
+ return this.$edge.color ?? "gray";
6777
+ }
6778
+ get line() {
6779
+ return this.$edge.line ?? "dashed";
6780
+ }
6766
6781
  isStep() {
6767
6782
  return isStepEdgeId(this.id);
6768
6783
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "1.27.0",
3
+ "version": "1.27.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -88,7 +88,7 @@
88
88
  },
89
89
  "devDependencies": {
90
90
  "@dagrejs/dagre": "1.1.4",
91
- "@mantine/colors-generator": "7.17.2",
91
+ "@mantine/colors-generator": "7.17.3",
92
92
  "@types/natural-compare-lite": "^1.4.2",
93
93
  "@types/object-hash": "^3.0.6",
94
94
  "chroma-js": "^3.1.2",
@@ -106,7 +106,7 @@
106
106
  "typescript": "^5.8.2",
107
107
  "unbuild": "^3.5.0",
108
108
  "vitest": "^3.0.9",
109
- "@likec4/tsconfig": "1.27.0"
109
+ "@likec4/tsconfig": "1.27.2"
110
110
  },
111
111
  "scripts": {
112
112
  "typecheck": "tsc --noEmit",
@@ -77,8 +77,6 @@ export function computeDeploymentView<M extends AnyAux>(
77
77
  },
78
78
  edges: sorted.edges,
79
79
  nodes: map(nodes, n => {
80
- // omit notation
81
- delete n.notation
82
80
  if (n.icon === 'none') {
83
81
  delete n.icon
84
82
  }
@@ -214,8 +214,6 @@ class DynamicViewCompute {
214
214
  ...(autoLayoutRule?.rankSep && { rankSep: autoLayoutRule.rankSep }),
215
215
  },
216
216
  nodes: map(nodes, n => {
217
- // omit notation
218
- delete n.notation
219
217
  if (n.icon === 'none') {
220
218
  delete n.icon
221
219
  }
@@ -224,8 +224,6 @@ export function computeElementView<M extends AnyAux>(
224
224
  },
225
225
  edges: applyCustomRelationProperties(rules, nodes, sorted.edges),
226
226
  nodes: map(nodes, n => {
227
- // omit notation
228
- delete n.notation
229
227
  if (n.icon === 'none') {
230
228
  delete n.icon
231
229
  }
@@ -2,6 +2,7 @@ import { isEmpty, only } from 'remeda'
2
2
  import type { SetRequired } from 'type-fest'
3
3
  import { nonNullable } from '../errors'
4
4
  import {
5
+ type Color,
5
6
  type ComputedDeploymentView,
6
7
  type DeployedInstance,
7
8
  type DeploymentElementStyle,
@@ -13,10 +14,13 @@ import {
13
14
  type IteratorLike,
14
15
  type Link,
15
16
  type RelationshipKind,
17
+ type RelationshipLineType,
16
18
  type Tag,
17
19
  type Tag as C4Tag,
18
20
  type ThemeColor,
19
21
  DefaultElementShape,
22
+ DefaultLineStyle,
23
+ DefaultRelationshipColor,
20
24
  DefaultThemeColor,
21
25
  } from '../types'
22
26
  import { DefaultShapeSize } from '../types/element'
@@ -536,6 +540,14 @@ export class DeploymentRelationModel<M extends AnyAux = AnyAux> {
536
540
  return this.$relationship.links ?? []
537
541
  }
538
542
 
543
+ get color(): Color {
544
+ return this.$relationship.color ?? DefaultRelationshipColor
545
+ }
546
+
547
+ get line(): RelationshipLineType {
548
+ return this.$relationship.line ?? DefaultLineStyle
549
+ }
550
+
539
551
  public *views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>> {
540
552
  for (const view of this.$model.views()) {
541
553
  if (view.includesRelation(this.id)) {
@@ -1,7 +1,12 @@
1
1
  import { isEmpty } from 'remeda'
2
- import type { IteratorLike } from '../types'
2
+ import type { Color, IteratorLike } from '../types'
3
3
  import type { Link, Tag } from '../types/element'
4
- import type { ModelRelation } from '../types/relation'
4
+ import {
5
+ type ModelRelation,
6
+ type RelationshipLineType,
7
+ DefaultLineStyle,
8
+ DefaultRelationshipColor,
9
+ } from '../types/relation'
5
10
  import { commonAncestor } from '../utils/fqn'
6
11
  import type { DeploymentRelationModel } from './DeploymentElementModel'
7
12
  import type { ElementModel } from './ElementModel'
@@ -76,6 +81,14 @@ export class RelationshipModel<M extends AnyAux = AnyAux> {
76
81
  return this.$relationship.links ?? []
77
82
  }
78
83
 
84
+ get color(): Color {
85
+ return this.$relationship.color ?? DefaultRelationshipColor
86
+ }
87
+
88
+ get line(): RelationshipLineType {
89
+ return this.$relationship.line ?? DefaultLineStyle
90
+ }
91
+
79
92
  /**
80
93
  * Iterate over all views that include this relationship.
81
94
  */
@@ -1,11 +1,13 @@
1
1
  import { isNonNullish } from 'remeda'
2
2
  import type { LiteralUnion } from 'type-fest'
3
3
  import {
4
+ type Color,
4
5
  type ComputedDynamicView,
5
6
  type ComputedView,
6
7
  type DiagramView,
7
8
  type IteratorLike,
8
9
  type RelationId as C4RelationID,
10
+ type RelationshipLineType,
9
11
  type StepEdgeId,
10
12
  type Tag as C4Tag,
11
13
  extractStep,
@@ -65,6 +67,14 @@ export class EdgeModel<M extends AnyAux, V extends ComputedView | DiagramView =
65
67
  return this.$edge.navigateTo ? this.view.$model.view(this.$edge.navigateTo) : null
66
68
  }
67
69
 
70
+ get color(): Color {
71
+ return this.$edge.color ?? 'gray'
72
+ }
73
+
74
+ get line(): RelationshipLineType {
75
+ return this.$edge.line ?? 'dashed'
76
+ }
77
+
68
78
  public isStep(): this is EdgeModel.StepEdge<M, ComputedDynamicView> {
69
79
  return isStepEdgeId(this.id)
70
80
  }