@likec4/core 1.13.0 → 1.15.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.
@@ -49,6 +49,9 @@ declare function AsFqn(name: string, parent?: Fqn | null): Fqn;
49
49
  declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
50
50
  type BorderStyle = TupleToUnion<typeof BorderStyles>;
51
51
  type ElementKind<Kinds extends string = string> = Tagged<Kinds, 'ElementKind'>;
52
+ declare namespace ElementKind {
53
+ const Group: ElementKind;
54
+ }
52
55
  declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
53
56
  type ElementShape = TupleToUnion<typeof ElementShapes>;
54
57
  declare const DefaultThemeColor = "primary";
@@ -139,6 +142,12 @@ type Filterable<FTag extends string = string, FKind extends string = string> = {
139
142
  type OperatorPredicate<V extends Filterable> = (value: V) => boolean;
140
143
  declare function whereOperatorAsPredicate<FTag extends string = string, FKind extends string = string>(operator: WhereOperator<FTag, FKind>): OperatorPredicate<Filterable<FTag, FKind>>;
141
144
 
145
+ type GlobalStyleID = Tagged<string, 'GlobalStyleID'>;
146
+ interface GlobalStyle {
147
+ readonly id: GlobalStyleID;
148
+ readonly styles: NonEmptyArray<ViewRuleStyle>;
149
+ }
150
+
142
151
  type ElementNotation = {
143
152
  kinds: ElementKind[];
144
153
  shape: ElementShape;
@@ -165,6 +174,11 @@ interface ViewRuleStyle {
165
174
  };
166
175
  }
167
176
  declare function isViewRuleStyle(rule: ViewRule): rule is ViewRuleStyle;
177
+ interface ViewRuleGlobalStyle {
178
+ styleId: GlobalStyleID;
179
+ }
180
+ declare function isViewRuleGlobalStyle(rule: ViewRule): rule is ViewRuleGlobalStyle;
181
+ type ViewRuleStyleOrGlobalRef = ViewRuleStyle | ViewRuleGlobalStyle;
168
182
  type AutoLayoutDirection = 'TB' | 'BT' | 'LR' | 'RL';
169
183
  declare function isAutoLayoutDirection(autoLayout: unknown): autoLayout is AutoLayoutDirection;
170
184
  interface ViewRuleAutoLayout {
@@ -173,7 +187,15 @@ interface ViewRuleAutoLayout {
173
187
  rankSep?: number;
174
188
  }
175
189
  declare function isViewRuleAutoLayout(rule: ViewRule): rule is ViewRuleAutoLayout;
176
- type ViewRule = ViewRulePredicate | ViewRuleStyle | ViewRuleAutoLayout;
190
+ interface ViewRuleGroup {
191
+ groupRules: Array<ViewRulePredicate | ViewRuleGroup>;
192
+ title: string | null;
193
+ color?: Color;
194
+ border?: BorderStyle;
195
+ opacity?: number;
196
+ }
197
+ declare function isViewRuleGroup(rule: ViewRule): rule is ViewRuleGroup;
198
+ type ViewRule = ViewRulePredicate | ViewRuleGroup | ViewRuleStyle | ViewRuleGlobalStyle | ViewRuleAutoLayout;
177
199
  interface BasicView<ViewType extends 'element' | 'dynamic', ViewIDs extends string, Tags extends string> {
178
200
  readonly __?: ViewType;
179
201
  readonly id: ViewID<ViewIDs>;
@@ -236,7 +258,7 @@ type DynamicViewIncludeRule = {
236
258
  include: ElementPredicateExpression[];
237
259
  };
238
260
  declare function isDynamicViewIncludeRule(rule: DynamicViewRule): rule is DynamicViewIncludeRule;
239
- type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
261
+ type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleGlobalStyle | ViewRuleAutoLayout;
240
262
  interface DynamicView<ViewIDs extends string = string, Tags extends string = string> extends BasicView<'dynamic', ViewIDs, Tags> {
241
263
  readonly __: 'dynamic';
242
264
  readonly steps: DynamicViewStepOrParallel[];
@@ -290,6 +312,12 @@ interface ComputedNode {
290
312
  */
291
313
  isCustomized?: boolean;
292
314
  }
315
+ declare namespace ComputedNode {
316
+ /**
317
+ * Nodes group is a special kind of node, exisiting only in view
318
+ */
319
+ function isNodesGroup(node: ComputedNode): boolean;
320
+ }
293
321
  interface ComputedEdge {
294
322
  id: EdgeId;
295
323
  parent: NodeId | null;
@@ -367,6 +395,12 @@ interface DiagramNode extends ComputedNode {
367
395
  position: Point;
368
396
  labelBBox: BBox;
369
397
  }
398
+ declare namespace DiagramNode {
399
+ /**
400
+ * Nodes group is a special kind of node, exisiting only in view
401
+ */
402
+ function isNodesGroup(node: DiagramNode): boolean;
403
+ }
370
404
  interface DiagramEdge extends ComputedEdge {
371
405
  points: NonEmptyArray<Point>;
372
406
  controlPoints?: NonEmptyArray<XYPoint>;
@@ -605,6 +639,9 @@ interface ParsedLikeC4Model<ElementKinds extends string = string, RelationKinds
605
639
  };
606
640
  elements: Record<Fqns, TypedElement<Fqns, ElementKinds, Tags>>;
607
641
  relations: Record<RelationID, Relation>;
642
+ globals: {
643
+ styles: Record<GlobalStyleID, GlobalStyle>;
644
+ };
608
645
  views: Record<Views, LikeC4View<Views, Tags>>;
609
646
  }
610
647
  /**
@@ -687,4 +724,4 @@ declare namespace ViewChange {
687
724
  }
688
725
  type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
689
726
 
690
- export { type ExpandedElementExpr as $, type AutoLayoutDirection as A, type BorderStyle as B, type Color as C, type DiagramView as D, type ElementKindSpecification as E, type Fqn as F, AsFqn as G, type HexColorLiteral as H, type IconUrl as I, BorderStyles as J, ElementShapes as K, type LikeC4View as L, DefaultThemeColor as M, type NonEmptyArray as N, DefaultElementShape as O, type ParsedLikeC4Model as P, type ElementStyle as Q, type RelationshipKindSpecification as R, type TagSpec as S, type ThemeColorValues as T, type Link as U, type ViewRuleStyle as V, type TypedElement as W, type XYPoint as X, type ElementKindSpecificationStyle as Y, type ElementRefExpr as Z, isElementRef as _, type ElementShape as a, type ScopedElementView as a$, isExpandedElementExpr as a0, isCustomElement as a1, type WildcardExpr as a2, isWildcard as a3, type ElementKindExpr as a4, isElementKindExpr as a5, type ElementTagExpr as a6, isElementTagExpr as a7, type ElementExpression as a8, isElement as a9, type AndOperator as aA, isAndOperator as aB, type OrOperator as aC, isOrOperator as aD, type WhereOperator as aE, whereOperatorAsPredicate as aF, OverviewGraph as aG, DefaultLineStyle as aH, DefaultArrowType as aI, DefaultRelationshipColor as aJ, type ThemeColor as aK, type ColorLiteral as aL, isThemeColor as aM, type ElementThemeColorValues as aN, type ElementThemeColors as aO, type RelationshipThemeColorValues as aP, type RelationshipThemeColors as aQ, type LikeC4Theme as aR, type ViewRulePredicate as aS, isViewRulePredicate as aT, isViewRuleStyle as aU, isAutoLayoutDirection as aV, type ViewRuleAutoLayout as aW, isViewRuleAutoLayout as aX, type ViewRule as aY, type BasicView as aZ, type BasicElementView as a_, type ElementWhereExpr as aa, isElementWhere as ab, type ElementPredicateExpression as ac, isElementPredicateExpr as ad, type RelationExpr as ae, isRelation as af, type InOutExpr as ag, isInOut as ah, type IncomingExpr as ai, isIncoming as aj, type OutgoingExpr as ak, isOutgoing as al, type RelationExpression as am, isRelationExpression as an, type RelationWhereExpr as ao, isRelationWhere as ap, isCustomRelationExpr as aq, type RelationPredicateExpression as ar, isRelationPredicateExpr as as, type EqualOperator as at, type TagEqual as au, isTagEqual as av, type KindEqual as aw, isKindEqual as ax, type NotOperator as ay, isNotOperator as az, type RelationshipArrowType as b, type ExtendsElementView as b0, type ElementView as b1, type DynamicViewStep as b2, type DynamicViewParallelSteps as b3, type DynamicViewStepOrParallel as b4, type DynamicViewIncludeRule as b5, isDynamicViewIncludeRule as b6, type DynamicViewRule as b7, type DynamicView as b8, isDynamicViewParallelSteps as b9, type CustomColorDefinitions as ba, isDynamicView as bb, isElementView as bc, isExtendsElementView as bd, isScopedElementView as be, type StepEdgeIdLiteral as bf, StepEdgeId as bg, isStepEdgeId as bh, extractStep as bi, getParallelStepsPrefix as bj, type ViewWithHash as bk, type ViewWithNotation as bl, type ViewAutoLayout as bm, type ComputedElementView as bn, type ComputedDynamicView as bo, isComputedDynamicView as bp, isComputedElementView as bq, type BBox as br, getBBoxCenter as bs, type ViewManualLayout as bt, ViewChange as bu, type ElementNotation as bv, type RelationshipLineType as c, type Element as d, type Relation as e, type Expression as f, type CustomElementExpr as g, type CustomRelationExpr as h, type RelationID as i, type ViewID as j, type EdgeId as k, type ComputedView as l, type Tag as m, type ComputedNode as n, type NodeId as o, type ElementKind as p, type ComputedEdge as q, type ComputedLikeC4Model as r, type LayoutedLikeC4Model as s, type RelationshipKind as t, type DiagramNode as u, type DiagramEdge as v, expression as w, type NonEmptyReadonlyArray as x, type CustomColor as y, type Point as z };
727
+ export { type ExpandedElementExpr as $, type AutoLayoutDirection as A, type BorderStyle as B, type Color as C, type DiagramView as D, type ElementKindSpecification as E, type Fqn as F, AsFqn as G, type HexColorLiteral as H, type IconUrl as I, BorderStyles as J, ElementShapes as K, type LikeC4View as L, DefaultThemeColor as M, type NonEmptyArray as N, DefaultElementShape as O, type ParsedLikeC4Model as P, type ElementStyle as Q, type RelationshipKindSpecification as R, type TagSpec as S, type ThemeColorValues as T, type Link as U, type ViewRuleStyle as V, type TypedElement as W, type XYPoint as X, type ElementKindSpecificationStyle as Y, type ElementRefExpr as Z, isElementRef as _, type ElementShape as a, type ViewRuleAutoLayout as a$, isExpandedElementExpr as a0, isCustomElement as a1, type WildcardExpr as a2, isWildcard as a3, type ElementKindExpr as a4, isElementKindExpr as a5, type ElementTagExpr as a6, isElementTagExpr as a7, type ElementExpression as a8, isElement as a9, type NotOperator as aA, isNotOperator as aB, type AndOperator as aC, isAndOperator as aD, type OrOperator as aE, isOrOperator as aF, type WhereOperator as aG, whereOperatorAsPredicate as aH, OverviewGraph as aI, DefaultLineStyle as aJ, DefaultArrowType as aK, DefaultRelationshipColor as aL, type ThemeColor as aM, type ColorLiteral as aN, isThemeColor as aO, type ElementThemeColorValues as aP, type ElementThemeColors as aQ, type RelationshipThemeColorValues as aR, type RelationshipThemeColors as aS, type LikeC4Theme as aT, type ViewRulePredicate as aU, isViewRulePredicate as aV, isViewRuleStyle as aW, type ViewRuleGlobalStyle as aX, isViewRuleGlobalStyle as aY, type ViewRuleStyleOrGlobalRef as aZ, isAutoLayoutDirection as a_, type ElementWhereExpr as aa, isElementWhere as ab, type ElementPredicateExpression as ac, isElementPredicateExpr as ad, type RelationExpr as ae, isRelation as af, type InOutExpr as ag, isInOut as ah, type IncomingExpr as ai, isIncoming as aj, type OutgoingExpr as ak, isOutgoing as al, type RelationExpression as am, isRelationExpression as an, type RelationWhereExpr as ao, isRelationWhere as ap, isCustomRelationExpr as aq, type RelationPredicateExpression as ar, isRelationPredicateExpr as as, type GlobalStyleID as at, type GlobalStyle as au, type EqualOperator as av, type TagEqual as aw, isTagEqual as ax, type KindEqual as ay, isKindEqual as az, type RelationshipArrowType as b, isViewRuleAutoLayout as b0, type ViewRuleGroup as b1, isViewRuleGroup as b2, type ViewRule as b3, type BasicView as b4, type BasicElementView as b5, type ScopedElementView as b6, type ExtendsElementView as b7, type ElementView as b8, type DynamicViewStep as b9, type ViewManualLayout as bA, ViewChange as bB, type ElementNotation as bC, type DynamicViewParallelSteps as ba, type DynamicViewStepOrParallel as bb, type DynamicViewIncludeRule as bc, isDynamicViewIncludeRule as bd, type DynamicViewRule as be, type DynamicView as bf, isDynamicViewParallelSteps as bg, type CustomColorDefinitions as bh, isDynamicView as bi, isElementView as bj, isExtendsElementView as bk, isScopedElementView as bl, type StepEdgeIdLiteral as bm, StepEdgeId as bn, isStepEdgeId as bo, extractStep as bp, getParallelStepsPrefix as bq, type ViewWithHash as br, type ViewWithNotation as bs, type ViewAutoLayout as bt, type ComputedElementView as bu, type ComputedDynamicView as bv, isComputedDynamicView as bw, isComputedElementView as bx, type BBox as by, getBBoxCenter as bz, type RelationshipLineType as c, type Element as d, type Relation as e, type Expression as f, type CustomElementExpr as g, type CustomRelationExpr as h, type RelationID as i, type ViewID as j, type EdgeId as k, type ComputedView as l, type Tag as m, ComputedNode as n, type NodeId as o, ElementKind as p, type ComputedEdge as q, type ComputedLikeC4Model as r, type LayoutedLikeC4Model as s, type RelationshipKind as t, DiagramNode as u, type DiagramEdge as v, expression as w, type NonEmptyReadonlyArray as x, type CustomColor as y, type Point as z };
@@ -49,6 +49,9 @@ declare function AsFqn(name: string, parent?: Fqn | null): Fqn;
49
49
  declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
50
50
  type BorderStyle = TupleToUnion<typeof BorderStyles>;
51
51
  type ElementKind<Kinds extends string = string> = Tagged<Kinds, 'ElementKind'>;
52
+ declare namespace ElementKind {
53
+ const Group: ElementKind;
54
+ }
52
55
  declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
53
56
  type ElementShape = TupleToUnion<typeof ElementShapes>;
54
57
  declare const DefaultThemeColor = "primary";
@@ -139,6 +142,12 @@ type Filterable<FTag extends string = string, FKind extends string = string> = {
139
142
  type OperatorPredicate<V extends Filterable> = (value: V) => boolean;
140
143
  declare function whereOperatorAsPredicate<FTag extends string = string, FKind extends string = string>(operator: WhereOperator<FTag, FKind>): OperatorPredicate<Filterable<FTag, FKind>>;
141
144
 
145
+ type GlobalStyleID = Tagged<string, 'GlobalStyleID'>;
146
+ interface GlobalStyle {
147
+ readonly id: GlobalStyleID;
148
+ readonly styles: NonEmptyArray<ViewRuleStyle>;
149
+ }
150
+
142
151
  type ElementNotation = {
143
152
  kinds: ElementKind[];
144
153
  shape: ElementShape;
@@ -165,6 +174,11 @@ interface ViewRuleStyle {
165
174
  };
166
175
  }
167
176
  declare function isViewRuleStyle(rule: ViewRule): rule is ViewRuleStyle;
177
+ interface ViewRuleGlobalStyle {
178
+ styleId: GlobalStyleID;
179
+ }
180
+ declare function isViewRuleGlobalStyle(rule: ViewRule): rule is ViewRuleGlobalStyle;
181
+ type ViewRuleStyleOrGlobalRef = ViewRuleStyle | ViewRuleGlobalStyle;
168
182
  type AutoLayoutDirection = 'TB' | 'BT' | 'LR' | 'RL';
169
183
  declare function isAutoLayoutDirection(autoLayout: unknown): autoLayout is AutoLayoutDirection;
170
184
  interface ViewRuleAutoLayout {
@@ -173,7 +187,15 @@ interface ViewRuleAutoLayout {
173
187
  rankSep?: number;
174
188
  }
175
189
  declare function isViewRuleAutoLayout(rule: ViewRule): rule is ViewRuleAutoLayout;
176
- type ViewRule = ViewRulePredicate | ViewRuleStyle | ViewRuleAutoLayout;
190
+ interface ViewRuleGroup {
191
+ groupRules: Array<ViewRulePredicate | ViewRuleGroup>;
192
+ title: string | null;
193
+ color?: Color;
194
+ border?: BorderStyle;
195
+ opacity?: number;
196
+ }
197
+ declare function isViewRuleGroup(rule: ViewRule): rule is ViewRuleGroup;
198
+ type ViewRule = ViewRulePredicate | ViewRuleGroup | ViewRuleStyle | ViewRuleGlobalStyle | ViewRuleAutoLayout;
177
199
  interface BasicView<ViewType extends 'element' | 'dynamic', ViewIDs extends string, Tags extends string> {
178
200
  readonly __?: ViewType;
179
201
  readonly id: ViewID<ViewIDs>;
@@ -236,7 +258,7 @@ type DynamicViewIncludeRule = {
236
258
  include: ElementPredicateExpression[];
237
259
  };
238
260
  declare function isDynamicViewIncludeRule(rule: DynamicViewRule): rule is DynamicViewIncludeRule;
239
- type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleAutoLayout;
261
+ type DynamicViewRule = DynamicViewIncludeRule | ViewRuleStyle | ViewRuleGlobalStyle | ViewRuleAutoLayout;
240
262
  interface DynamicView<ViewIDs extends string = string, Tags extends string = string> extends BasicView<'dynamic', ViewIDs, Tags> {
241
263
  readonly __: 'dynamic';
242
264
  readonly steps: DynamicViewStepOrParallel[];
@@ -290,6 +312,12 @@ interface ComputedNode {
290
312
  */
291
313
  isCustomized?: boolean;
292
314
  }
315
+ declare namespace ComputedNode {
316
+ /**
317
+ * Nodes group is a special kind of node, exisiting only in view
318
+ */
319
+ function isNodesGroup(node: ComputedNode): boolean;
320
+ }
293
321
  interface ComputedEdge {
294
322
  id: EdgeId;
295
323
  parent: NodeId | null;
@@ -367,6 +395,12 @@ interface DiagramNode extends ComputedNode {
367
395
  position: Point;
368
396
  labelBBox: BBox;
369
397
  }
398
+ declare namespace DiagramNode {
399
+ /**
400
+ * Nodes group is a special kind of node, exisiting only in view
401
+ */
402
+ function isNodesGroup(node: DiagramNode): boolean;
403
+ }
370
404
  interface DiagramEdge extends ComputedEdge {
371
405
  points: NonEmptyArray<Point>;
372
406
  controlPoints?: NonEmptyArray<XYPoint>;
@@ -605,6 +639,9 @@ interface ParsedLikeC4Model<ElementKinds extends string = string, RelationKinds
605
639
  };
606
640
  elements: Record<Fqns, TypedElement<Fqns, ElementKinds, Tags>>;
607
641
  relations: Record<RelationID, Relation>;
642
+ globals: {
643
+ styles: Record<GlobalStyleID, GlobalStyle>;
644
+ };
608
645
  views: Record<Views, LikeC4View<Views, Tags>>;
609
646
  }
610
647
  /**
@@ -687,4 +724,4 @@ declare namespace ViewChange {
687
724
  }
688
725
  type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
689
726
 
690
- export { type ExpandedElementExpr as $, type AutoLayoutDirection as A, type BorderStyle as B, type Color as C, type DiagramView as D, type ElementKindSpecification as E, type Fqn as F, AsFqn as G, type HexColorLiteral as H, type IconUrl as I, BorderStyles as J, ElementShapes as K, type LikeC4View as L, DefaultThemeColor as M, type NonEmptyArray as N, DefaultElementShape as O, type ParsedLikeC4Model as P, type ElementStyle as Q, type RelationshipKindSpecification as R, type TagSpec as S, type ThemeColorValues as T, type Link as U, type ViewRuleStyle as V, type TypedElement as W, type XYPoint as X, type ElementKindSpecificationStyle as Y, type ElementRefExpr as Z, isElementRef as _, type ElementShape as a, type ScopedElementView as a$, isExpandedElementExpr as a0, isCustomElement as a1, type WildcardExpr as a2, isWildcard as a3, type ElementKindExpr as a4, isElementKindExpr as a5, type ElementTagExpr as a6, isElementTagExpr as a7, type ElementExpression as a8, isElement as a9, type AndOperator as aA, isAndOperator as aB, type OrOperator as aC, isOrOperator as aD, type WhereOperator as aE, whereOperatorAsPredicate as aF, OverviewGraph as aG, DefaultLineStyle as aH, DefaultArrowType as aI, DefaultRelationshipColor as aJ, type ThemeColor as aK, type ColorLiteral as aL, isThemeColor as aM, type ElementThemeColorValues as aN, type ElementThemeColors as aO, type RelationshipThemeColorValues as aP, type RelationshipThemeColors as aQ, type LikeC4Theme as aR, type ViewRulePredicate as aS, isViewRulePredicate as aT, isViewRuleStyle as aU, isAutoLayoutDirection as aV, type ViewRuleAutoLayout as aW, isViewRuleAutoLayout as aX, type ViewRule as aY, type BasicView as aZ, type BasicElementView as a_, type ElementWhereExpr as aa, isElementWhere as ab, type ElementPredicateExpression as ac, isElementPredicateExpr as ad, type RelationExpr as ae, isRelation as af, type InOutExpr as ag, isInOut as ah, type IncomingExpr as ai, isIncoming as aj, type OutgoingExpr as ak, isOutgoing as al, type RelationExpression as am, isRelationExpression as an, type RelationWhereExpr as ao, isRelationWhere as ap, isCustomRelationExpr as aq, type RelationPredicateExpression as ar, isRelationPredicateExpr as as, type EqualOperator as at, type TagEqual as au, isTagEqual as av, type KindEqual as aw, isKindEqual as ax, type NotOperator as ay, isNotOperator as az, type RelationshipArrowType as b, type ExtendsElementView as b0, type ElementView as b1, type DynamicViewStep as b2, type DynamicViewParallelSteps as b3, type DynamicViewStepOrParallel as b4, type DynamicViewIncludeRule as b5, isDynamicViewIncludeRule as b6, type DynamicViewRule as b7, type DynamicView as b8, isDynamicViewParallelSteps as b9, type CustomColorDefinitions as ba, isDynamicView as bb, isElementView as bc, isExtendsElementView as bd, isScopedElementView as be, type StepEdgeIdLiteral as bf, StepEdgeId as bg, isStepEdgeId as bh, extractStep as bi, getParallelStepsPrefix as bj, type ViewWithHash as bk, type ViewWithNotation as bl, type ViewAutoLayout as bm, type ComputedElementView as bn, type ComputedDynamicView as bo, isComputedDynamicView as bp, isComputedElementView as bq, type BBox as br, getBBoxCenter as bs, type ViewManualLayout as bt, ViewChange as bu, type ElementNotation as bv, type RelationshipLineType as c, type Element as d, type Relation as e, type Expression as f, type CustomElementExpr as g, type CustomRelationExpr as h, type RelationID as i, type ViewID as j, type EdgeId as k, type ComputedView as l, type Tag as m, type ComputedNode as n, type NodeId as o, type ElementKind as p, type ComputedEdge as q, type ComputedLikeC4Model as r, type LayoutedLikeC4Model as s, type RelationshipKind as t, type DiagramNode as u, type DiagramEdge as v, expression as w, type NonEmptyReadonlyArray as x, type CustomColor as y, type Point as z };
727
+ export { type ExpandedElementExpr as $, type AutoLayoutDirection as A, type BorderStyle as B, type Color as C, type DiagramView as D, type ElementKindSpecification as E, type Fqn as F, AsFqn as G, type HexColorLiteral as H, type IconUrl as I, BorderStyles as J, ElementShapes as K, type LikeC4View as L, DefaultThemeColor as M, type NonEmptyArray as N, DefaultElementShape as O, type ParsedLikeC4Model as P, type ElementStyle as Q, type RelationshipKindSpecification as R, type TagSpec as S, type ThemeColorValues as T, type Link as U, type ViewRuleStyle as V, type TypedElement as W, type XYPoint as X, type ElementKindSpecificationStyle as Y, type ElementRefExpr as Z, isElementRef as _, type ElementShape as a, type ViewRuleAutoLayout as a$, isExpandedElementExpr as a0, isCustomElement as a1, type WildcardExpr as a2, isWildcard as a3, type ElementKindExpr as a4, isElementKindExpr as a5, type ElementTagExpr as a6, isElementTagExpr as a7, type ElementExpression as a8, isElement as a9, type NotOperator as aA, isNotOperator as aB, type AndOperator as aC, isAndOperator as aD, type OrOperator as aE, isOrOperator as aF, type WhereOperator as aG, whereOperatorAsPredicate as aH, OverviewGraph as aI, DefaultLineStyle as aJ, DefaultArrowType as aK, DefaultRelationshipColor as aL, type ThemeColor as aM, type ColorLiteral as aN, isThemeColor as aO, type ElementThemeColorValues as aP, type ElementThemeColors as aQ, type RelationshipThemeColorValues as aR, type RelationshipThemeColors as aS, type LikeC4Theme as aT, type ViewRulePredicate as aU, isViewRulePredicate as aV, isViewRuleStyle as aW, type ViewRuleGlobalStyle as aX, isViewRuleGlobalStyle as aY, type ViewRuleStyleOrGlobalRef as aZ, isAutoLayoutDirection as a_, type ElementWhereExpr as aa, isElementWhere as ab, type ElementPredicateExpression as ac, isElementPredicateExpr as ad, type RelationExpr as ae, isRelation as af, type InOutExpr as ag, isInOut as ah, type IncomingExpr as ai, isIncoming as aj, type OutgoingExpr as ak, isOutgoing as al, type RelationExpression as am, isRelationExpression as an, type RelationWhereExpr as ao, isRelationWhere as ap, isCustomRelationExpr as aq, type RelationPredicateExpression as ar, isRelationPredicateExpr as as, type GlobalStyleID as at, type GlobalStyle as au, type EqualOperator as av, type TagEqual as aw, isTagEqual as ax, type KindEqual as ay, isKindEqual as az, type RelationshipArrowType as b, isViewRuleAutoLayout as b0, type ViewRuleGroup as b1, isViewRuleGroup as b2, type ViewRule as b3, type BasicView as b4, type BasicElementView as b5, type ScopedElementView as b6, type ExtendsElementView as b7, type ElementView as b8, type DynamicViewStep as b9, type ViewManualLayout as bA, ViewChange as bB, type ElementNotation as bC, type DynamicViewParallelSteps as ba, type DynamicViewStepOrParallel as bb, type DynamicViewIncludeRule as bc, isDynamicViewIncludeRule as bd, type DynamicViewRule as be, type DynamicView as bf, isDynamicViewParallelSteps as bg, type CustomColorDefinitions as bh, isDynamicView as bi, isElementView as bj, isExtendsElementView as bk, isScopedElementView as bl, type StepEdgeIdLiteral as bm, StepEdgeId as bn, isStepEdgeId as bo, extractStep as bp, getParallelStepsPrefix as bq, type ViewWithHash as br, type ViewWithNotation as bs, type ViewAutoLayout as bt, type ComputedElementView as bu, type ComputedDynamicView as bv, isComputedDynamicView as bw, isComputedElementView as bx, type BBox as by, getBBoxCenter as bz, type RelationshipLineType as c, type Element as d, type Relation as e, type Expression as f, type CustomElementExpr as g, type CustomRelationExpr as h, type RelationID as i, type ViewID as j, type EdgeId as k, type ComputedView as l, type Tag as m, ComputedNode as n, type NodeId as o, ElementKind as p, type ComputedEdge as q, type ComputedLikeC4Model as r, type LayoutedLikeC4Model as s, type RelationshipKind as t, DiagramNode as u, type DiagramEdge as v, expression as w, type NonEmptyReadonlyArray as x, type CustomColor as y, type Point as z };
@@ -34,6 +34,10 @@ function AsFqn(name, parent) {
34
34
  return parent ? parent + "." + name : name;
35
35
  }
36
36
  const BorderStyles = ["solid", "dashed", "dotted", "none"];
37
+ exports.ElementKind = void 0;
38
+ ((ElementKind2) => {
39
+ ElementKind2.Group = "@group";
40
+ })(exports.ElementKind || (exports.ElementKind = {}));
37
41
  const ElementShapes = [
38
42
  "rectangle",
39
43
  "person",
@@ -204,12 +208,18 @@ function isViewRulePredicate(rule) {
204
208
  function isViewRuleStyle(rule) {
205
209
  return "style" in rule && "targets" in rule;
206
210
  }
211
+ function isViewRuleGlobalStyle(rule) {
212
+ return "styleId" in rule;
213
+ }
207
214
  function isAutoLayoutDirection(autoLayout) {
208
215
  return autoLayout === "TB" || autoLayout === "BT" || autoLayout === "LR" || autoLayout === "RL";
209
216
  }
210
217
  function isViewRuleAutoLayout(rule) {
211
218
  return "direction" in rule;
212
219
  }
220
+ function isViewRuleGroup(rule) {
221
+ return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
222
+ }
213
223
  function isDynamicViewIncludeRule(rule) {
214
224
  return "include" in rule && Array.isArray(rule.include);
215
225
  }
@@ -247,6 +257,13 @@ function getParallelStepsPrefix(id) {
247
257
  }
248
258
  return null;
249
259
  }
260
+ exports.ComputedNode = void 0;
261
+ ((ComputedNode2) => {
262
+ function isNodesGroup(node) {
263
+ return node.kind === exports.ElementKind.Group;
264
+ }
265
+ ComputedNode2.isNodesGroup = isNodesGroup;
266
+ })(exports.ComputedNode || (exports.ComputedNode = {}));
250
267
  function isComputedDynamicView(view) {
251
268
  return view.__ === "dynamic";
252
269
  }
@@ -264,6 +281,13 @@ function getBBoxCenter({
264
281
  y: y + height / 2
265
282
  };
266
283
  }
284
+ exports.DiagramNode = void 0;
285
+ ((DiagramNode2) => {
286
+ function isNodesGroup(node) {
287
+ return node.kind === exports.ElementKind.Group;
288
+ }
289
+ DiagramNode2.isNodesGroup = isNodesGroup;
290
+ })(exports.DiagramNode || (exports.DiagramNode = {}));
267
291
 
268
292
  exports.AsFqn = AsFqn;
269
293
  exports.BorderStyles = BorderStyles;
@@ -313,6 +337,8 @@ exports.isStepEdgeId = isStepEdgeId;
313
337
  exports.isTagEqual = isTagEqual;
314
338
  exports.isThemeColor = isThemeColor;
315
339
  exports.isViewRuleAutoLayout = isViewRuleAutoLayout;
340
+ exports.isViewRuleGlobalStyle = isViewRuleGlobalStyle;
341
+ exports.isViewRuleGroup = isViewRuleGroup;
316
342
  exports.isViewRulePredicate = isViewRulePredicate;
317
343
  exports.isViewRuleStyle = isViewRuleStyle;
318
344
  exports.isWildcard = isWildcard;
@@ -32,6 +32,10 @@ function AsFqn(name, parent) {
32
32
  return parent ? parent + "." + name : name;
33
33
  }
34
34
  const BorderStyles = ["solid", "dashed", "dotted", "none"];
35
+ var ElementKind;
36
+ ((ElementKind2) => {
37
+ ElementKind2.Group = "@group";
38
+ })(ElementKind || (ElementKind = {}));
35
39
  const ElementShapes = [
36
40
  "rectangle",
37
41
  "person",
@@ -202,12 +206,18 @@ function isViewRulePredicate(rule) {
202
206
  function isViewRuleStyle(rule) {
203
207
  return "style" in rule && "targets" in rule;
204
208
  }
209
+ function isViewRuleGlobalStyle(rule) {
210
+ return "styleId" in rule;
211
+ }
205
212
  function isAutoLayoutDirection(autoLayout) {
206
213
  return autoLayout === "TB" || autoLayout === "BT" || autoLayout === "LR" || autoLayout === "RL";
207
214
  }
208
215
  function isViewRuleAutoLayout(rule) {
209
216
  return "direction" in rule;
210
217
  }
218
+ function isViewRuleGroup(rule) {
219
+ return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
220
+ }
211
221
  function isDynamicViewIncludeRule(rule) {
212
222
  return "include" in rule && Array.isArray(rule.include);
213
223
  }
@@ -245,6 +255,13 @@ function getParallelStepsPrefix(id) {
245
255
  }
246
256
  return null;
247
257
  }
258
+ var ComputedNode;
259
+ ((ComputedNode2) => {
260
+ function isNodesGroup(node) {
261
+ return node.kind === ElementKind.Group;
262
+ }
263
+ ComputedNode2.isNodesGroup = isNodesGroup;
264
+ })(ComputedNode || (ComputedNode = {}));
248
265
  function isComputedDynamicView(view) {
249
266
  return view.__ === "dynamic";
250
267
  }
@@ -262,5 +279,12 @@ function getBBoxCenter({
262
279
  y: y + height / 2
263
280
  };
264
281
  }
282
+ var DiagramNode;
283
+ ((DiagramNode2) => {
284
+ function isNodesGroup(node) {
285
+ return node.kind === ElementKind.Group;
286
+ }
287
+ DiagramNode2.isNodesGroup = isNodesGroup;
288
+ })(DiagramNode || (DiagramNode = {}));
265
289
 
266
- export { isComputedDynamicView as $, AsFqn as A, BorderStyles as B, isRelationPredicateExpr as C, DefaultThemeColor as D, ElementShapes as E, isTagEqual as F, isKindEqual as G, isNotOperator as H, isAndOperator as I, isOrOperator as J, whereOperatorAsPredicate as K, DefaultLineStyle as L, DefaultArrowType as M, isThemeColor as N, isViewRulePredicate as O, isViewRuleStyle as P, isAutoLayoutDirection as Q, isViewRuleAutoLayout as R, isDynamicViewIncludeRule as S, isDynamicViewParallelSteps as T, isDynamicView as U, isElementView as V, isExtendsElementView as W, StepEdgeId as X, isStepEdgeId as Y, extractStep as Z, getParallelStepsPrefix as _, invariant as a, isComputedElementView as a0, getBBoxCenter as a1, isScopedElementView as b, DefaultElementShape as c, nonNullable as d, e$1 as e, DefaultRelationshipColor as f, expression as g, nonexhaustive as h, isElementPredicateExpr as i, isElementRef as j, isExpandedElementExpr as k, isCustomElement as l, isWildcard as m, n, isElementKindExpr as o, isElementTagExpr as p, isElement as q, isElementWhere as r, isRelation as s, isInOut as t, u, isIncoming as v, isOutgoing as w, isRelationExpression as x, isRelationWhere as y, isCustomRelationExpr as z };
290
+ export { isStepEdgeId as $, AsFqn as A, BorderStyles as B, isCustomRelationExpr as C, DefaultThemeColor as D, ElementKind as E, isRelationPredicateExpr as F, isTagEqual as G, isKindEqual as H, isNotOperator as I, isAndOperator as J, isOrOperator as K, whereOperatorAsPredicate as L, DefaultLineStyle as M, DefaultArrowType as N, isThemeColor as O, isViewRulePredicate as P, isViewRuleStyle as Q, isViewRuleGlobalStyle as R, isAutoLayoutDirection as S, isViewRuleAutoLayout as T, isViewRuleGroup as U, isDynamicViewIncludeRule as V, isDynamicViewParallelSteps as W, isDynamicView as X, isElementView as Y, isExtendsElementView as Z, StepEdgeId as _, invariant as a, extractStep as a0, getParallelStepsPrefix as a1, ComputedNode as a2, isComputedDynamicView as a3, isComputedElementView as a4, getBBoxCenter as a5, DiagramNode as a6, isScopedElementView as b, DefaultElementShape as c, nonNullable as d, e$1 as e, DefaultRelationshipColor as f, expression as g, nonexhaustive as h, isElementPredicateExpr as i, ElementShapes as j, isElementRef as k, isExpandedElementExpr as l, isCustomElement as m, n, isWildcard as o, isElementKindExpr as p, isElementTagExpr as q, isElement as r, isElementWhere as s, isRelation as t, u, isInOut as v, isIncoming as w, isOutgoing as x, isRelationExpression as y, isRelationWhere as z };
@@ -1,16 +1,28 @@
1
1
  'use strict';
2
2
 
3
- const types_index = require('../shared/core.IR7XOEkQ.cjs');
3
+ const types_index = require('../shared/core.Cq_6j35U.cjs');
4
4
 
5
5
 
6
6
 
7
7
  exports.AsFqn = types_index.AsFqn;
8
8
  exports.BorderStyles = types_index.BorderStyles;
9
+ Object.defineProperty(exports, "ComputedNode", {
10
+ enumerable: true,
11
+ get: function () { return types_index.ComputedNode; }
12
+ });
9
13
  exports.DefaultArrowType = types_index.DefaultArrowType;
10
14
  exports.DefaultElementShape = types_index.DefaultElementShape;
11
15
  exports.DefaultLineStyle = types_index.DefaultLineStyle;
12
16
  exports.DefaultRelationshipColor = types_index.DefaultRelationshipColor;
13
17
  exports.DefaultThemeColor = types_index.DefaultThemeColor;
18
+ Object.defineProperty(exports, "DiagramNode", {
19
+ enumerable: true,
20
+ get: function () { return types_index.DiagramNode; }
21
+ });
22
+ Object.defineProperty(exports, "ElementKind", {
23
+ enumerable: true,
24
+ get: function () { return types_index.ElementKind; }
25
+ });
14
26
  exports.ElementShapes = types_index.ElementShapes;
15
27
  exports.StepEdgeId = types_index.StepEdgeId;
16
28
  exports.extractStep = types_index.extractStep;
@@ -49,6 +61,8 @@ exports.isStepEdgeId = types_index.isStepEdgeId;
49
61
  exports.isTagEqual = types_index.isTagEqual;
50
62
  exports.isThemeColor = types_index.isThemeColor;
51
63
  exports.isViewRuleAutoLayout = types_index.isViewRuleAutoLayout;
64
+ exports.isViewRuleGlobalStyle = types_index.isViewRuleGlobalStyle;
65
+ exports.isViewRuleGroup = types_index.isViewRuleGroup;
52
66
  exports.isViewRulePredicate = types_index.isViewRulePredicate;
53
67
  exports.isViewRuleStyle = types_index.isViewRuleStyle;
54
68
  exports.isWildcard = types_index.isWildcard;
@@ -1,2 +1,2 @@
1
- export { aA as AndOperator, G as AsFqn, A as AutoLayoutDirection, br as BBox, a_ as BasicElementView, aZ as BasicView, B as BorderStyle, J as BorderStyles, C as Color, aL as ColorLiteral, bo as ComputedDynamicView, q as ComputedEdge, bn as ComputedElementView, r as ComputedLikeC4Model, n as ComputedNode, l as ComputedView, y as CustomColor, ba as CustomColorDefinitions, g as CustomElementExpr, h as CustomRelationExpr, aI as DefaultArrowType, O as DefaultElementShape, aH as DefaultLineStyle, aJ as DefaultRelationshipColor, M as DefaultThemeColor, v as DiagramEdge, u as DiagramNode, D as DiagramView, b8 as DynamicView, b5 as DynamicViewIncludeRule, b3 as DynamicViewParallelSteps, b7 as DynamicViewRule, b2 as DynamicViewStep, b4 as DynamicViewStepOrParallel, k as EdgeId, d as Element, a8 as ElementExpression, p as ElementKind, a4 as ElementKindExpr, E as ElementKindSpecification, Y as ElementKindSpecificationStyle, bv as ElementNotation, ac as ElementPredicateExpression, Z as ElementRefExpr, a as ElementShape, K as ElementShapes, Q as ElementStyle, a6 as ElementTagExpr, aN as ElementThemeColorValues, aO as ElementThemeColors, b1 as ElementView, aa as ElementWhereExpr, at as EqualOperator, $ as ExpandedElementExpr, f as Expression, b0 as ExtendsElementView, F as Fqn, H as HexColorLiteral, I as IconUrl, ag as InOutExpr, ai as IncomingExpr, aw as KindEqual, s as LayoutedLikeC4Model, aR as LikeC4Theme, L as LikeC4View, U as Link, o as NodeId, N as NonEmptyArray, x as NonEmptyReadonlyArray, ay as NotOperator, aC as OrOperator, ak as OutgoingExpr, aG as OverviewGraph, P as ParsedLikeC4Model, z as Point, e as Relation, ae as RelationExpr, am as RelationExpression, i as RelationID, ar as RelationPredicateExpression, ao as RelationWhereExpr, b as RelationshipArrowType, t as RelationshipKind, R as RelationshipKindSpecification, c as RelationshipLineType, aP as RelationshipThemeColorValues, aQ as RelationshipThemeColors, a$ as ScopedElementView, bg as StepEdgeId, bf as StepEdgeIdLiteral, m as Tag, au as TagEqual, S as TagSpec, aK as ThemeColor, T as ThemeColorValues, W as TypedElement, bm as ViewAutoLayout, bu as ViewChange, j as ViewID, bt as ViewManualLayout, aY as ViewRule, aW as ViewRuleAutoLayout, aS as ViewRulePredicate, V as ViewRuleStyle, bk as ViewWithHash, bl as ViewWithNotation, aE as WhereOperator, a2 as WildcardExpr, X as XYPoint, bi as extractStep, bs as getBBoxCenter, bj as getParallelStepsPrefix, aB as isAndOperator, aV as isAutoLayoutDirection, bp as isComputedDynamicView, bq as isComputedElementView, a1 as isCustomElement, aq as isCustomRelationExpr, bb as isDynamicView, b6 as isDynamicViewIncludeRule, b9 as isDynamicViewParallelSteps, a9 as isElement, a5 as isElementKindExpr, ad as isElementPredicateExpr, _ as isElementRef, a7 as isElementTagExpr, bc as isElementView, ab as isElementWhere, a0 as isExpandedElementExpr, bd as isExtendsElementView, ah as isInOut, aj as isIncoming, ax as isKindEqual, az as isNotOperator, aD as isOrOperator, al as isOutgoing, af as isRelation, an as isRelationExpression, as as isRelationPredicateExpr, ap as isRelationWhere, be as isScopedElementView, bh as isStepEdgeId, av as isTagEqual, aM as isThemeColor, aX as isViewRuleAutoLayout, aT as isViewRulePredicate, aU as isViewRuleStyle, a3 as isWildcard, aF as whereOperatorAsPredicate } from '../shared/core.C4jDMQ1i.cjs';
1
+ export { aC as AndOperator, G as AsFqn, A as AutoLayoutDirection, by as BBox, b5 as BasicElementView, b4 as BasicView, B as BorderStyle, J as BorderStyles, C as Color, aN as ColorLiteral, bv as ComputedDynamicView, q as ComputedEdge, bu as ComputedElementView, r as ComputedLikeC4Model, n as ComputedNode, l as ComputedView, y as CustomColor, bh as CustomColorDefinitions, g as CustomElementExpr, h as CustomRelationExpr, aK as DefaultArrowType, O as DefaultElementShape, aJ as DefaultLineStyle, aL as DefaultRelationshipColor, M as DefaultThemeColor, v as DiagramEdge, u as DiagramNode, D as DiagramView, bf as DynamicView, bc as DynamicViewIncludeRule, ba as DynamicViewParallelSteps, be as DynamicViewRule, b9 as DynamicViewStep, bb as DynamicViewStepOrParallel, k as EdgeId, d as Element, a8 as ElementExpression, p as ElementKind, a4 as ElementKindExpr, E as ElementKindSpecification, Y as ElementKindSpecificationStyle, bC as ElementNotation, ac as ElementPredicateExpression, Z as ElementRefExpr, a as ElementShape, K as ElementShapes, Q as ElementStyle, a6 as ElementTagExpr, aP as ElementThemeColorValues, aQ as ElementThemeColors, b8 as ElementView, aa as ElementWhereExpr, av as EqualOperator, $ as ExpandedElementExpr, f as Expression, b7 as ExtendsElementView, F as Fqn, au as GlobalStyle, at as GlobalStyleID, H as HexColorLiteral, I as IconUrl, ag as InOutExpr, ai as IncomingExpr, ay as KindEqual, s as LayoutedLikeC4Model, aT as LikeC4Theme, L as LikeC4View, U as Link, o as NodeId, N as NonEmptyArray, x as NonEmptyReadonlyArray, aA as NotOperator, aE as OrOperator, ak as OutgoingExpr, aI as OverviewGraph, P as ParsedLikeC4Model, z as Point, e as Relation, ae as RelationExpr, am as RelationExpression, i as RelationID, ar as RelationPredicateExpression, ao as RelationWhereExpr, b as RelationshipArrowType, t as RelationshipKind, R as RelationshipKindSpecification, c as RelationshipLineType, aR as RelationshipThemeColorValues, aS as RelationshipThemeColors, b6 as ScopedElementView, bn as StepEdgeId, bm as StepEdgeIdLiteral, m as Tag, aw as TagEqual, S as TagSpec, aM as ThemeColor, T as ThemeColorValues, W as TypedElement, bt as ViewAutoLayout, bB as ViewChange, j as ViewID, bA as ViewManualLayout, b3 as ViewRule, a$ as ViewRuleAutoLayout, aX as ViewRuleGlobalStyle, b1 as ViewRuleGroup, aU as ViewRulePredicate, V as ViewRuleStyle, aZ as ViewRuleStyleOrGlobalRef, br as ViewWithHash, bs as ViewWithNotation, aG as WhereOperator, a2 as WildcardExpr, X as XYPoint, bp as extractStep, bz as getBBoxCenter, bq as getParallelStepsPrefix, aD as isAndOperator, a_ as isAutoLayoutDirection, bw as isComputedDynamicView, bx as isComputedElementView, a1 as isCustomElement, aq as isCustomRelationExpr, bi as isDynamicView, bd as isDynamicViewIncludeRule, bg as isDynamicViewParallelSteps, a9 as isElement, a5 as isElementKindExpr, ad as isElementPredicateExpr, _ as isElementRef, a7 as isElementTagExpr, bj as isElementView, ab as isElementWhere, a0 as isExpandedElementExpr, bk as isExtendsElementView, ah as isInOut, aj as isIncoming, az as isKindEqual, aB as isNotOperator, aF as isOrOperator, al as isOutgoing, af as isRelation, an as isRelationExpression, as as isRelationPredicateExpr, ap as isRelationWhere, bl as isScopedElementView, bo as isStepEdgeId, ax as isTagEqual, aO as isThemeColor, b0 as isViewRuleAutoLayout, aY as isViewRuleGlobalStyle, b2 as isViewRuleGroup, aV as isViewRulePredicate, aW as isViewRuleStyle, a3 as isWildcard, aH as whereOperatorAsPredicate } from '../shared/core.CYtN9Czk.cjs';
2
2
  import 'type-fest';
@@ -1,2 +1,2 @@
1
- export { aA as AndOperator, G as AsFqn, A as AutoLayoutDirection, br as BBox, a_ as BasicElementView, aZ as BasicView, B as BorderStyle, J as BorderStyles, C as Color, aL as ColorLiteral, bo as ComputedDynamicView, q as ComputedEdge, bn as ComputedElementView, r as ComputedLikeC4Model, n as ComputedNode, l as ComputedView, y as CustomColor, ba as CustomColorDefinitions, g as CustomElementExpr, h as CustomRelationExpr, aI as DefaultArrowType, O as DefaultElementShape, aH as DefaultLineStyle, aJ as DefaultRelationshipColor, M as DefaultThemeColor, v as DiagramEdge, u as DiagramNode, D as DiagramView, b8 as DynamicView, b5 as DynamicViewIncludeRule, b3 as DynamicViewParallelSteps, b7 as DynamicViewRule, b2 as DynamicViewStep, b4 as DynamicViewStepOrParallel, k as EdgeId, d as Element, a8 as ElementExpression, p as ElementKind, a4 as ElementKindExpr, E as ElementKindSpecification, Y as ElementKindSpecificationStyle, bv as ElementNotation, ac as ElementPredicateExpression, Z as ElementRefExpr, a as ElementShape, K as ElementShapes, Q as ElementStyle, a6 as ElementTagExpr, aN as ElementThemeColorValues, aO as ElementThemeColors, b1 as ElementView, aa as ElementWhereExpr, at as EqualOperator, $ as ExpandedElementExpr, f as Expression, b0 as ExtendsElementView, F as Fqn, H as HexColorLiteral, I as IconUrl, ag as InOutExpr, ai as IncomingExpr, aw as KindEqual, s as LayoutedLikeC4Model, aR as LikeC4Theme, L as LikeC4View, U as Link, o as NodeId, N as NonEmptyArray, x as NonEmptyReadonlyArray, ay as NotOperator, aC as OrOperator, ak as OutgoingExpr, aG as OverviewGraph, P as ParsedLikeC4Model, z as Point, e as Relation, ae as RelationExpr, am as RelationExpression, i as RelationID, ar as RelationPredicateExpression, ao as RelationWhereExpr, b as RelationshipArrowType, t as RelationshipKind, R as RelationshipKindSpecification, c as RelationshipLineType, aP as RelationshipThemeColorValues, aQ as RelationshipThemeColors, a$ as ScopedElementView, bg as StepEdgeId, bf as StepEdgeIdLiteral, m as Tag, au as TagEqual, S as TagSpec, aK as ThemeColor, T as ThemeColorValues, W as TypedElement, bm as ViewAutoLayout, bu as ViewChange, j as ViewID, bt as ViewManualLayout, aY as ViewRule, aW as ViewRuleAutoLayout, aS as ViewRulePredicate, V as ViewRuleStyle, bk as ViewWithHash, bl as ViewWithNotation, aE as WhereOperator, a2 as WildcardExpr, X as XYPoint, bi as extractStep, bs as getBBoxCenter, bj as getParallelStepsPrefix, aB as isAndOperator, aV as isAutoLayoutDirection, bp as isComputedDynamicView, bq as isComputedElementView, a1 as isCustomElement, aq as isCustomRelationExpr, bb as isDynamicView, b6 as isDynamicViewIncludeRule, b9 as isDynamicViewParallelSteps, a9 as isElement, a5 as isElementKindExpr, ad as isElementPredicateExpr, _ as isElementRef, a7 as isElementTagExpr, bc as isElementView, ab as isElementWhere, a0 as isExpandedElementExpr, bd as isExtendsElementView, ah as isInOut, aj as isIncoming, ax as isKindEqual, az as isNotOperator, aD as isOrOperator, al as isOutgoing, af as isRelation, an as isRelationExpression, as as isRelationPredicateExpr, ap as isRelationWhere, be as isScopedElementView, bh as isStepEdgeId, av as isTagEqual, aM as isThemeColor, aX as isViewRuleAutoLayout, aT as isViewRulePredicate, aU as isViewRuleStyle, a3 as isWildcard, aF as whereOperatorAsPredicate } from '../shared/core.C4jDMQ1i.mjs';
1
+ export { aC as AndOperator, G as AsFqn, A as AutoLayoutDirection, by as BBox, b5 as BasicElementView, b4 as BasicView, B as BorderStyle, J as BorderStyles, C as Color, aN as ColorLiteral, bv as ComputedDynamicView, q as ComputedEdge, bu as ComputedElementView, r as ComputedLikeC4Model, n as ComputedNode, l as ComputedView, y as CustomColor, bh as CustomColorDefinitions, g as CustomElementExpr, h as CustomRelationExpr, aK as DefaultArrowType, O as DefaultElementShape, aJ as DefaultLineStyle, aL as DefaultRelationshipColor, M as DefaultThemeColor, v as DiagramEdge, u as DiagramNode, D as DiagramView, bf as DynamicView, bc as DynamicViewIncludeRule, ba as DynamicViewParallelSteps, be as DynamicViewRule, b9 as DynamicViewStep, bb as DynamicViewStepOrParallel, k as EdgeId, d as Element, a8 as ElementExpression, p as ElementKind, a4 as ElementKindExpr, E as ElementKindSpecification, Y as ElementKindSpecificationStyle, bC as ElementNotation, ac as ElementPredicateExpression, Z as ElementRefExpr, a as ElementShape, K as ElementShapes, Q as ElementStyle, a6 as ElementTagExpr, aP as ElementThemeColorValues, aQ as ElementThemeColors, b8 as ElementView, aa as ElementWhereExpr, av as EqualOperator, $ as ExpandedElementExpr, f as Expression, b7 as ExtendsElementView, F as Fqn, au as GlobalStyle, at as GlobalStyleID, H as HexColorLiteral, I as IconUrl, ag as InOutExpr, ai as IncomingExpr, ay as KindEqual, s as LayoutedLikeC4Model, aT as LikeC4Theme, L as LikeC4View, U as Link, o as NodeId, N as NonEmptyArray, x as NonEmptyReadonlyArray, aA as NotOperator, aE as OrOperator, ak as OutgoingExpr, aI as OverviewGraph, P as ParsedLikeC4Model, z as Point, e as Relation, ae as RelationExpr, am as RelationExpression, i as RelationID, ar as RelationPredicateExpression, ao as RelationWhereExpr, b as RelationshipArrowType, t as RelationshipKind, R as RelationshipKindSpecification, c as RelationshipLineType, aR as RelationshipThemeColorValues, aS as RelationshipThemeColors, b6 as ScopedElementView, bn as StepEdgeId, bm as StepEdgeIdLiteral, m as Tag, aw as TagEqual, S as TagSpec, aM as ThemeColor, T as ThemeColorValues, W as TypedElement, bt as ViewAutoLayout, bB as ViewChange, j as ViewID, bA as ViewManualLayout, b3 as ViewRule, a$ as ViewRuleAutoLayout, aX as ViewRuleGlobalStyle, b1 as ViewRuleGroup, aU as ViewRulePredicate, V as ViewRuleStyle, aZ as ViewRuleStyleOrGlobalRef, br as ViewWithHash, bs as ViewWithNotation, aG as WhereOperator, a2 as WildcardExpr, X as XYPoint, bp as extractStep, bz as getBBoxCenter, bq as getParallelStepsPrefix, aD as isAndOperator, a_ as isAutoLayoutDirection, bw as isComputedDynamicView, bx as isComputedElementView, a1 as isCustomElement, aq as isCustomRelationExpr, bi as isDynamicView, bd as isDynamicViewIncludeRule, bg as isDynamicViewParallelSteps, a9 as isElement, a5 as isElementKindExpr, ad as isElementPredicateExpr, _ as isElementRef, a7 as isElementTagExpr, bj as isElementView, ab as isElementWhere, a0 as isExpandedElementExpr, bk as isExtendsElementView, ah as isInOut, aj as isIncoming, az as isKindEqual, aB as isNotOperator, aF as isOrOperator, al as isOutgoing, af as isRelation, an as isRelationExpression, as as isRelationPredicateExpr, ap as isRelationWhere, bl as isScopedElementView, bo as isStepEdgeId, ax as isTagEqual, aO as isThemeColor, b0 as isViewRuleAutoLayout, aY as isViewRuleGlobalStyle, b2 as isViewRuleGroup, aV as isViewRulePredicate, aW as isViewRuleStyle, a3 as isWildcard, aH as whereOperatorAsPredicate } from '../shared/core.CYtN9Czk.mjs';
2
2
  import 'type-fest';
@@ -1,2 +1,2 @@
1
- export { aA as AndOperator, G as AsFqn, A as AutoLayoutDirection, br as BBox, a_ as BasicElementView, aZ as BasicView, B as BorderStyle, J as BorderStyles, C as Color, aL as ColorLiteral, bo as ComputedDynamicView, q as ComputedEdge, bn as ComputedElementView, r as ComputedLikeC4Model, n as ComputedNode, l as ComputedView, y as CustomColor, ba as CustomColorDefinitions, g as CustomElementExpr, h as CustomRelationExpr, aI as DefaultArrowType, O as DefaultElementShape, aH as DefaultLineStyle, aJ as DefaultRelationshipColor, M as DefaultThemeColor, v as DiagramEdge, u as DiagramNode, D as DiagramView, b8 as DynamicView, b5 as DynamicViewIncludeRule, b3 as DynamicViewParallelSteps, b7 as DynamicViewRule, b2 as DynamicViewStep, b4 as DynamicViewStepOrParallel, k as EdgeId, d as Element, a8 as ElementExpression, p as ElementKind, a4 as ElementKindExpr, E as ElementKindSpecification, Y as ElementKindSpecificationStyle, bv as ElementNotation, ac as ElementPredicateExpression, Z as ElementRefExpr, a as ElementShape, K as ElementShapes, Q as ElementStyle, a6 as ElementTagExpr, aN as ElementThemeColorValues, aO as ElementThemeColors, b1 as ElementView, aa as ElementWhereExpr, at as EqualOperator, $ as ExpandedElementExpr, f as Expression, b0 as ExtendsElementView, F as Fqn, H as HexColorLiteral, I as IconUrl, ag as InOutExpr, ai as IncomingExpr, aw as KindEqual, s as LayoutedLikeC4Model, aR as LikeC4Theme, L as LikeC4View, U as Link, o as NodeId, N as NonEmptyArray, x as NonEmptyReadonlyArray, ay as NotOperator, aC as OrOperator, ak as OutgoingExpr, aG as OverviewGraph, P as ParsedLikeC4Model, z as Point, e as Relation, ae as RelationExpr, am as RelationExpression, i as RelationID, ar as RelationPredicateExpression, ao as RelationWhereExpr, b as RelationshipArrowType, t as RelationshipKind, R as RelationshipKindSpecification, c as RelationshipLineType, aP as RelationshipThemeColorValues, aQ as RelationshipThemeColors, a$ as ScopedElementView, bg as StepEdgeId, bf as StepEdgeIdLiteral, m as Tag, au as TagEqual, S as TagSpec, aK as ThemeColor, T as ThemeColorValues, W as TypedElement, bm as ViewAutoLayout, bu as ViewChange, j as ViewID, bt as ViewManualLayout, aY as ViewRule, aW as ViewRuleAutoLayout, aS as ViewRulePredicate, V as ViewRuleStyle, bk as ViewWithHash, bl as ViewWithNotation, aE as WhereOperator, a2 as WildcardExpr, X as XYPoint, bi as extractStep, bs as getBBoxCenter, bj as getParallelStepsPrefix, aB as isAndOperator, aV as isAutoLayoutDirection, bp as isComputedDynamicView, bq as isComputedElementView, a1 as isCustomElement, aq as isCustomRelationExpr, bb as isDynamicView, b6 as isDynamicViewIncludeRule, b9 as isDynamicViewParallelSteps, a9 as isElement, a5 as isElementKindExpr, ad as isElementPredicateExpr, _ as isElementRef, a7 as isElementTagExpr, bc as isElementView, ab as isElementWhere, a0 as isExpandedElementExpr, bd as isExtendsElementView, ah as isInOut, aj as isIncoming, ax as isKindEqual, az as isNotOperator, aD as isOrOperator, al as isOutgoing, af as isRelation, an as isRelationExpression, as as isRelationPredicateExpr, ap as isRelationWhere, be as isScopedElementView, bh as isStepEdgeId, av as isTagEqual, aM as isThemeColor, aX as isViewRuleAutoLayout, aT as isViewRulePredicate, aU as isViewRuleStyle, a3 as isWildcard, aF as whereOperatorAsPredicate } from '../shared/core.C4jDMQ1i.js';
1
+ export { aC as AndOperator, G as AsFqn, A as AutoLayoutDirection, by as BBox, b5 as BasicElementView, b4 as BasicView, B as BorderStyle, J as BorderStyles, C as Color, aN as ColorLiteral, bv as ComputedDynamicView, q as ComputedEdge, bu as ComputedElementView, r as ComputedLikeC4Model, n as ComputedNode, l as ComputedView, y as CustomColor, bh as CustomColorDefinitions, g as CustomElementExpr, h as CustomRelationExpr, aK as DefaultArrowType, O as DefaultElementShape, aJ as DefaultLineStyle, aL as DefaultRelationshipColor, M as DefaultThemeColor, v as DiagramEdge, u as DiagramNode, D as DiagramView, bf as DynamicView, bc as DynamicViewIncludeRule, ba as DynamicViewParallelSteps, be as DynamicViewRule, b9 as DynamicViewStep, bb as DynamicViewStepOrParallel, k as EdgeId, d as Element, a8 as ElementExpression, p as ElementKind, a4 as ElementKindExpr, E as ElementKindSpecification, Y as ElementKindSpecificationStyle, bC as ElementNotation, ac as ElementPredicateExpression, Z as ElementRefExpr, a as ElementShape, K as ElementShapes, Q as ElementStyle, a6 as ElementTagExpr, aP as ElementThemeColorValues, aQ as ElementThemeColors, b8 as ElementView, aa as ElementWhereExpr, av as EqualOperator, $ as ExpandedElementExpr, f as Expression, b7 as ExtendsElementView, F as Fqn, au as GlobalStyle, at as GlobalStyleID, H as HexColorLiteral, I as IconUrl, ag as InOutExpr, ai as IncomingExpr, ay as KindEqual, s as LayoutedLikeC4Model, aT as LikeC4Theme, L as LikeC4View, U as Link, o as NodeId, N as NonEmptyArray, x as NonEmptyReadonlyArray, aA as NotOperator, aE as OrOperator, ak as OutgoingExpr, aI as OverviewGraph, P as ParsedLikeC4Model, z as Point, e as Relation, ae as RelationExpr, am as RelationExpression, i as RelationID, ar as RelationPredicateExpression, ao as RelationWhereExpr, b as RelationshipArrowType, t as RelationshipKind, R as RelationshipKindSpecification, c as RelationshipLineType, aR as RelationshipThemeColorValues, aS as RelationshipThemeColors, b6 as ScopedElementView, bn as StepEdgeId, bm as StepEdgeIdLiteral, m as Tag, aw as TagEqual, S as TagSpec, aM as ThemeColor, T as ThemeColorValues, W as TypedElement, bt as ViewAutoLayout, bB as ViewChange, j as ViewID, bA as ViewManualLayout, b3 as ViewRule, a$ as ViewRuleAutoLayout, aX as ViewRuleGlobalStyle, b1 as ViewRuleGroup, aU as ViewRulePredicate, V as ViewRuleStyle, aZ as ViewRuleStyleOrGlobalRef, br as ViewWithHash, bs as ViewWithNotation, aG as WhereOperator, a2 as WildcardExpr, X as XYPoint, bp as extractStep, bz as getBBoxCenter, bq as getParallelStepsPrefix, aD as isAndOperator, a_ as isAutoLayoutDirection, bw as isComputedDynamicView, bx as isComputedElementView, a1 as isCustomElement, aq as isCustomRelationExpr, bi as isDynamicView, bd as isDynamicViewIncludeRule, bg as isDynamicViewParallelSteps, a9 as isElement, a5 as isElementKindExpr, ad as isElementPredicateExpr, _ as isElementRef, a7 as isElementTagExpr, bj as isElementView, ab as isElementWhere, a0 as isExpandedElementExpr, bk as isExtendsElementView, ah as isInOut, aj as isIncoming, az as isKindEqual, aB as isNotOperator, aF as isOrOperator, al as isOutgoing, af as isRelation, an as isRelationExpression, as as isRelationPredicateExpr, ap as isRelationWhere, bl as isScopedElementView, bo as isStepEdgeId, ax as isTagEqual, aO as isThemeColor, b0 as isViewRuleAutoLayout, aY as isViewRuleGlobalStyle, b2 as isViewRuleGroup, aV as isViewRulePredicate, aW as isViewRuleStyle, a3 as isWildcard, aH as whereOperatorAsPredicate } from '../shared/core.CYtN9Czk.js';
2
2
  import 'type-fest';
@@ -1 +1 @@
1
- export { A as AsFqn, B as BorderStyles, M as DefaultArrowType, c as DefaultElementShape, L as DefaultLineStyle, f as DefaultRelationshipColor, D as DefaultThemeColor, E as ElementShapes, X as StepEdgeId, Z as extractStep, a1 as getBBoxCenter, _ as getParallelStepsPrefix, I as isAndOperator, Q as isAutoLayoutDirection, $ as isComputedDynamicView, a0 as isComputedElementView, l as isCustomElement, z as isCustomRelationExpr, U as isDynamicView, S as isDynamicViewIncludeRule, T as isDynamicViewParallelSteps, q as isElement, o as isElementKindExpr, i as isElementPredicateExpr, j as isElementRef, p as isElementTagExpr, V as isElementView, r as isElementWhere, k as isExpandedElementExpr, W as isExtendsElementView, t as isInOut, v as isIncoming, G as isKindEqual, H as isNotOperator, J as isOrOperator, w as isOutgoing, s as isRelation, x as isRelationExpression, C as isRelationPredicateExpr, y as isRelationWhere, b as isScopedElementView, Y as isStepEdgeId, F as isTagEqual, N as isThemeColor, R as isViewRuleAutoLayout, O as isViewRulePredicate, P as isViewRuleStyle, m as isWildcard, K as whereOperatorAsPredicate } from '../shared/core.BJDxVHFh.mjs';
1
+ export { A as AsFqn, B as BorderStyles, a2 as ComputedNode, N as DefaultArrowType, c as DefaultElementShape, M as DefaultLineStyle, f as DefaultRelationshipColor, D as DefaultThemeColor, a6 as DiagramNode, E as ElementKind, j as ElementShapes, _ as StepEdgeId, a0 as extractStep, a5 as getBBoxCenter, a1 as getParallelStepsPrefix, J as isAndOperator, S as isAutoLayoutDirection, a3 as isComputedDynamicView, a4 as isComputedElementView, m as isCustomElement, C as isCustomRelationExpr, X as isDynamicView, V as isDynamicViewIncludeRule, W as isDynamicViewParallelSteps, r as isElement, p as isElementKindExpr, i as isElementPredicateExpr, k as isElementRef, q as isElementTagExpr, Y as isElementView, s as isElementWhere, l as isExpandedElementExpr, Z as isExtendsElementView, v as isInOut, w as isIncoming, H as isKindEqual, I as isNotOperator, K as isOrOperator, x as isOutgoing, t as isRelation, y as isRelationExpression, F as isRelationPredicateExpr, z as isRelationWhere, b as isScopedElementView, $ as isStepEdgeId, G as isTagEqual, O as isThemeColor, T as isViewRuleAutoLayout, R as isViewRuleGlobalStyle, U as isViewRuleGroup, P as isViewRulePredicate, Q as isViewRuleStyle, o as isWildcard, L as whereOperatorAsPredicate } from '../shared/core.zYtlWYjW.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/core",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -80,17 +80,17 @@
80
80
  "type-fest": "4.26.1"
81
81
  },
82
82
  "devDependencies": {
83
- "@likec4/tsconfig": "1.13.0",
84
- "@mantine/colors-generator": "^7.13.2",
83
+ "@likec4/tsconfig": "1.15.0",
84
+ "@mantine/colors-generator": "7.13.4",
85
85
  "@types/natural-compare-lite": "^1.4.2",
86
- "chroma-js": "^3.1.1",
86
+ "chroma-js": "^3.1.2",
87
87
  "execa": "^9.3.1",
88
88
  "natural-compare-lite": "^1.4.0",
89
- "remeda": "^2.14.0",
90
- "turbo": "^2.1.3",
89
+ "remeda": "^2.15.0",
90
+ "turbo": "^2.2.3",
91
91
  "typescript": "^5.6.3",
92
92
  "unbuild": "^3.0.0-rc.11",
93
- "vitest": "^2.1.2"
93
+ "vitest": "^2.1.3"
94
94
  },
95
- "packageManager": "yarn@4.5.0"
95
+ "packageManager": "yarn@4.5.1"
96
96
  }
@@ -10,6 +10,7 @@ import {
10
10
  type ElementShape,
11
11
  type ElementView,
12
12
  type Fqn,
13
+ type GlobalStyle,
13
14
  type IconUrl,
14
15
  isScopedElementView,
15
16
  type LikeC4View,
@@ -219,6 +220,9 @@ function builder<Spec extends BuilderSpecification, T extends AnyTypes>(
219
220
  spec: Spec,
220
221
  _elements = new Map<string, Element>(),
221
222
  _relations = [] as Relation[],
223
+ _globals = { styles: [] } as {
224
+ styles: GlobalStyle[]
225
+ },
222
226
  _views = new Map<string, LikeC4View>()
223
227
  ): Builder<T> {
224
228
  const toLikeC4Specification = (): Types.ToParsedLikeC4Model<T>['specification'] => ({
@@ -283,6 +287,7 @@ function builder<Spec extends BuilderSpecification, T extends AnyTypes>(
283
287
  structuredClone(spec),
284
288
  structuredClone(_elements),
285
289
  structuredClone(_relations),
290
+ structuredClone(_globals),
286
291
  structuredClone(_views)
287
292
  ),
288
293
  __model: () => ({
@@ -338,6 +343,9 @@ function builder<Spec extends BuilderSpecification, T extends AnyTypes>(
338
343
  specification: toLikeC4Specification(),
339
344
  elements: fromEntries(Array.from(_elements.entries())) as any,
340
345
  relations: mapToObj(_relations, r => [r.id, r]),
346
+ globals: {
347
+ styles: mapToObj(_globals.styles, s => [s.id, s])
348
+ },
341
349
  views: fromEntries(Array.from(_views.entries())) as any
342
350
  }),
343
351
  helpers: () => ({
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from './errors'
6
6
  export * from './model'
7
7
 
8
8
  export * from './types'
9
+ export * from './utils/commonHead'
9
10
  export * from './utils/compare-natural'
10
11
  export * from './utils/fqn'
11
12
  export * from './utils/guards'
@@ -334,5 +334,8 @@ export const fakeComputedModel = {
334
334
  },
335
335
  elements: fakeElements,
336
336
  relations: fakeRelations,
337
+ globals: {
338
+ styles: {}
339
+ },
337
340
  views: {}
338
341
  } satisfies ComputedLikeC4Model
@@ -14,6 +14,9 @@ export const BorderStyles = ['solid', 'dashed', 'dotted', 'none'] as const
14
14
  export type BorderStyle = TupleToUnion<typeof BorderStyles>
15
15
 
16
16
  export type ElementKind<Kinds extends string = string> = Tagged<Kinds, 'ElementKind'>
17
+ export namespace ElementKind {
18
+ export const Group = '@group' as ElementKind
19
+ }
17
20
  export const ElementShapes = [
18
21
  'rectangle',
19
22
  'person',
@@ -0,0 +1,10 @@
1
+ import type { Tagged } from 'type-fest'
2
+ import type { NonEmptyArray } from './_common'
3
+ import type { ViewRuleStyle } from './view'
4
+
5
+ export type GlobalStyleID = Tagged<string, 'GlobalStyleID'>
6
+
7
+ export interface GlobalStyle {
8
+ readonly id: GlobalStyleID
9
+ readonly styles: NonEmptyArray<ViewRuleStyle>
10
+ }
@@ -1,6 +1,7 @@
1
1
  export * from './_common'
2
2
  export * from './element'
3
3
  export * from './expression'
4
+ export * from './global'
4
5
  export * from './model'
5
6
  export * from './operators'
6
7
  export * from './overview-graph'
@@ -1,4 +1,5 @@
1
1
  import type { ElementKindSpecification, Tag, TypedElement } from './element'
2
+ import type { GlobalStyle, GlobalStyleID } from './global'
2
3
  import type { Relation, RelationID, RelationshipKindSpecification } from './relation'
3
4
  import type { ComputedView, DiagramView, LikeC4View, ViewID } from './view'
4
5
 
@@ -19,6 +20,9 @@ export interface ParsedLikeC4Model<
19
20
  }
20
21
  elements: Record<Fqns, TypedElement<Fqns, ElementKinds, Tags>>
21
22
  relations: Record<RelationID, Relation>
23
+ globals: {
24
+ styles: Record<GlobalStyleID, GlobalStyle>
25
+ }
22
26
  views: Record<Views, LikeC4View<Views, Tags>>
23
27
  }
24
28