@likec4/language-server 1.45.0 → 1.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/LikeC4LanguageServices.d.ts +3 -0
  2. package/dist/LikeC4LanguageServices.js +2 -0
  3. package/dist/Rpc.js +13 -2
  4. package/dist/ast.d.ts +10 -0
  5. package/dist/ast.js +7 -0
  6. package/dist/bundled.mjs +3819 -4062
  7. package/dist/filesystem/ChokidarWatcher.js +2 -2
  8. package/dist/filesystem/LikeC4FileSystem.js +5 -1
  9. package/dist/filesystem/index.d.ts +2 -0
  10. package/dist/generated/ast.d.ts +46 -9
  11. package/dist/generated/ast.js +56 -4
  12. package/dist/generated/grammar.js +1 -1
  13. package/dist/generated-lib/icons.js +1 -1
  14. package/dist/lsp/DocumentSymbolProvider.js +12 -1
  15. package/dist/mcp/server/WithMCPServer.js +0 -2
  16. package/dist/mcp/tools/read-deployment.js +18 -0
  17. package/dist/mcp/tools/read-element.js +24 -0
  18. package/dist/model/builder/buildModel.js +70 -1
  19. package/dist/model/fqn-index.js +8 -2
  20. package/dist/model/model-parser.d.ts +3 -0
  21. package/dist/model/model-parser.js +7 -0
  22. package/dist/model/parser/Base.js +8 -3
  23. package/dist/model/parser/GlobalsParser.d.ts +1 -0
  24. package/dist/model/parser/ModelParser.d.ts +2 -1
  25. package/dist/model/parser/ModelParser.js +45 -1
  26. package/dist/model/parser/ViewsParser.d.ts +1 -0
  27. package/dist/model/parser/ViewsParser.js +13 -0
  28. package/dist/model-change/ModelChanges.js +6 -3
  29. package/dist/validation/index.d.ts +1 -1
  30. package/dist/validation/index.js +11 -1
  31. package/dist/validation/relation.d.ts +1 -0
  32. package/dist/validation/relation.js +87 -1
  33. package/dist/validation/view-checks.d.ts +4 -0
  34. package/dist/validation/view-checks.js +46 -0
  35. package/dist/views/LikeC4ManualLayouts.js +2 -2
  36. package/dist/views/LikeC4Views.js +2 -2
  37. package/dist/workspace/ProjectsManager.d.ts +26 -1
  38. package/dist/workspace/ProjectsManager.js +98 -12
  39. package/dist/workspace/WorkspaceManager.js +38 -0
  40. package/package.json +17 -17
@@ -59,8 +59,8 @@ export class ChokidarFileSystemWatcher {
59
59
  }
60
60
  else if (isManualLayoutFile(path)) {
61
61
  logger.debug `manual layout file changed: ${path}`;
62
- // TODO: optimize to only reload manual layouts instead of all projects
63
- await this.services.workspace.ProjectsManager.reloadProjects();
62
+ const projectId = this.services.workspace.ProjectsManager.belongsTo(URI.file(path));
63
+ await this.services.workspace.ProjectsManager.rebuidProject(projectId);
64
64
  }
65
65
  else {
66
66
  logger.warn `Unknown file change: ${path}`;
@@ -4,7 +4,7 @@ import { URI } from 'langium';
4
4
  import { NodeFileSystemProvider } from 'langium/node';
5
5
  import { mkdirSync } from 'node:fs';
6
6
  import { stat, unlink, writeFile } from 'node:fs/promises';
7
- import { basename, dirname } from 'node:path';
7
+ import { dirname } from 'node:path';
8
8
  import { LikeC4LanguageMetaData } from '../generated/module';
9
9
  import { Content, isLikeC4Builtin } from '../likec4lib';
10
10
  import { logger as rootLogger } from '../logger';
@@ -35,6 +35,7 @@ class SymLinkTraversingFileSystemProvider extends NodeFileSystemProvider {
35
35
  }
36
36
  async readDirectory(folderPath, opts) {
37
37
  const recursive = opts?.recursive ?? true;
38
+ const maxDepth = opts?.maxDepth ?? Infinity;
38
39
  const entries = [];
39
40
  try {
40
41
  let crawler = new fdir()
@@ -44,6 +45,9 @@ class SymLinkTraversingFileSystemProvider extends NodeFileSystemProvider {
44
45
  if (!recursive) {
45
46
  crawler = crawler.withMaxDepth(1);
46
47
  }
48
+ else if (maxDepth !== Infinity) {
49
+ crawler = crawler.withMaxDepth(maxDepth);
50
+ }
47
51
  const crawled = await crawler
48
52
  .crawl(folderPath.fsPath)
49
53
  .withPromise();
@@ -17,10 +17,12 @@ export interface FileSystemProvider extends LangiumFileSystemProvider {
17
17
  /**
18
18
  * Reads the directory information for the given URI.
19
19
  * @param options.recursive If true, recursively reads the directory,
20
+ * @param options.maxDepth Maximum depth to traverse when recursive is true (default: Infinity)
20
21
  * @default true
21
22
  */
22
23
  readDirectory(uri: URI, options?: {
23
24
  recursive?: boolean;
25
+ maxDepth?: number;
24
26
  }): Promise<FileSystemNode[]>;
25
27
  /**
26
28
  * Finds all files in the given directory, matching the given filter.
@@ -29,7 +29,7 @@ export declare const LikeC4Terminals: {
29
29
  Hex: RegExp;
30
30
  };
31
31
  export type LikeC4TerminalNames = keyof typeof LikeC4Terminals;
32
- export type LikeC4KeywordNames = "(" | ")" | "*" | "," | "->" | "-[" | ":" | ";" | "<-" | "<->" | "BottomTop" | "LeftRight" | "RightLeft" | "TopBottom" | "[" | "]" | "]->" | "amber" | "and" | "autoLayout" | "blue" | "border" | "browser" | "color" | "crow" | "cylinder" | "dashed" | "deployment" | "deploymentNode" | "description" | "diagram" | "diamond" | "dot" | "dotted" | "dynamic" | "dynamicPredicateGroup" | "element" | "element.kind" | "element.tag" | "exclude" | "extend" | "extends" | "from" | "global" | "gray" | "green" | "group" | "head" | "icon" | "icons" | "import" | "include" | "indigo" | "instance" | "instanceOf" | "is" | "kind" | "large" | "lg" | "likec4lib" | "line" | "link" | "md" | "medium" | "metadata" | "mobile" | "model" | "multiple" | "muted" | "navigateTo" | "node" | "none" | "normal" | "not" | "notation" | "notes" | "odiamond" | "odot" | "of" | "onormal" | "opacity" | "open" | "or" | "padding" | "par" | "parallel" | "person" | "predicate" | "predicateGroup" | "primary" | "queue" | "rectangle" | "red" | "relationship" | "rgb" | "rgba" | "secondary" | "sequence" | "shape" | "size" | "sky" | "slate" | "sm" | "small" | "solid" | "source" | "specification" | "storage" | "style" | "styleGroup" | "summary" | "tag" | "tail" | "target" | "technology" | "textSize" | "title" | "variant" | "vee" | "view" | "views" | "where" | "with" | "xl" | "xlarge" | "xs" | "xsmall" | "{" | "}";
32
+ export type LikeC4KeywordNames = "(" | ")" | "*" | "," | "->" | "-[" | ":" | ";" | "<-" | "<->" | "BottomTop" | "LeftRight" | "RightLeft" | "TopBottom" | "[" | "]" | "]->" | "amber" | "and" | "autoLayout" | "blue" | "border" | "browser" | "color" | "crow" | "cylinder" | "dashed" | "deployment" | "deploymentNode" | "description" | "diagram" | "diamond" | "dot" | "dotted" | "dynamic" | "dynamicPredicateGroup" | "element" | "element.kind" | "element.tag" | "exclude" | "extend" | "extends" | "from" | "global" | "gray" | "green" | "group" | "head" | "icon" | "icons" | "import" | "include" | "indigo" | "instance" | "instanceOf" | "is" | "kind" | "large" | "lg" | "likec4lib" | "line" | "link" | "max" | "md" | "medium" | "metadata" | "min" | "mobile" | "model" | "multiple" | "muted" | "navigateTo" | "node" | "none" | "normal" | "not" | "notation" | "notes" | "odiamond" | "odot" | "of" | "onormal" | "opacity" | "open" | "or" | "padding" | "par" | "parallel" | "person" | "predicate" | "predicateGroup" | "primary" | "queue" | "rank" | "rectangle" | "red" | "relationship" | "rgb" | "rgba" | "same" | "secondary" | "sequence" | "shape" | "sink" | "size" | "sky" | "slate" | "sm" | "small" | "solid" | "source" | "specification" | "storage" | "style" | "styleGroup" | "summary" | "tag" | "tail" | "target" | "technology" | "textSize" | "title" | "variant" | "vee" | "view" | "views" | "where" | "with" | "xl" | "xlarge" | "xs" | "xsmall" | "{" | "}";
33
33
  export type LikeC4TokenNames = LikeC4TerminalNames | LikeC4KeywordNames;
34
34
  export type AnyProperty = DynamicViewProperty | ElementProperty | RelationProperty | StringProperty | ViewProperty;
35
35
  export declare const AnyProperty = "AnyProperty";
@@ -74,6 +74,9 @@ export declare function isExpressionV2(item: unknown): item is ExpressionV2;
74
74
  export type ExtendElementProperty = LinkProperty | MetadataProperty;
75
75
  export declare const ExtendElementProperty = "ExtendElementProperty";
76
76
  export declare function isExtendElementProperty(item: unknown): item is ExtendElementProperty;
77
+ export type ExtendRelationProperty = LinkProperty | MetadataProperty;
78
+ export declare const ExtendRelationProperty = "ExtendRelationProperty";
79
+ export declare function isExtendRelationProperty(item: unknown): item is ExtendRelationProperty;
77
80
  export type FqnExpr = ElementKindExpression | ElementTagExpression | FqnRefExpr | WildcardExpression;
78
81
  export declare const FqnExpr = "FqnExpr";
79
82
  export declare function isFqnExpr(item: unknown): item is FqnExpr;
@@ -106,6 +109,8 @@ export declare const ModelReferenceable = "ModelReferenceable";
106
109
  export declare function isModelReferenceable(item: unknown): item is ModelReferenceable;
107
110
  export type Participant = 'source' | 'target';
108
111
  export declare function isParticipant(item: unknown): item is Participant;
112
+ export type RankValue = 'max' | 'min' | 'same' | 'sink' | 'source';
113
+ export declare function isRankValue(item: unknown): item is RankValue;
109
114
  export type Referenceable = DeployedInstance | DeploymentNode | Element | Imported;
110
115
  export declare const Referenceable = "Referenceable";
111
116
  export declare function isReferenceable(item: unknown): item is Referenceable;
@@ -144,7 +149,7 @@ export declare function isViewLayoutDirection(item: unknown): item is ViewLayout
144
149
  export type ViewProperty = LinkProperty | ViewStringProperty;
145
150
  export declare const ViewProperty = "ViewProperty";
146
151
  export declare function isViewProperty(item: unknown): item is ViewProperty;
147
- export type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleStyleOrGlobalRef;
152
+ export type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleRank | ViewRuleStyleOrGlobalRef;
148
153
  export declare const ViewRule = "ViewRule";
149
154
  export declare function isViewRule(item: unknown): item is ViewRule;
150
155
  export type ViewRuleStyleOrGlobalRef = ViewRuleGlobalStyle | ViewRuleStyle;
@@ -526,8 +531,28 @@ export interface ExtendElementBody extends langium.AstNode {
526
531
  }
527
532
  export declare const ExtendElementBody = "ExtendElementBody";
528
533
  export declare function isExtendElementBody(item: unknown): item is ExtendElementBody;
534
+ export interface ExtendRelation extends langium.AstNode {
535
+ readonly $container: Model;
536
+ readonly $type: 'ExtendRelation';
537
+ body: ExtendRelationBody;
538
+ dotKind?: RelationKindDotRef;
539
+ kind?: langium.Reference<RelationshipKind>;
540
+ source: FqnRef;
541
+ target: FqnRef;
542
+ title?: string;
543
+ }
544
+ export declare const ExtendRelation = "ExtendRelation";
545
+ export declare function isExtendRelation(item: unknown): item is ExtendRelation;
546
+ export interface ExtendRelationBody extends langium.AstNode {
547
+ readonly $container: ExtendRelation;
548
+ readonly $type: 'ExtendRelationBody';
549
+ props: Array<ExtendRelationProperty>;
550
+ tags?: Tags;
551
+ }
552
+ export declare const ExtendRelationBody = "ExtendRelationBody";
553
+ export declare function isExtendRelationBody(item: unknown): item is ExtendRelationBody;
529
554
  export interface FqnExpressions extends langium.AstNode {
530
- readonly $container: DeploymentViewRuleStyle | FqnExpressions | GlobalStyle | ViewRuleStyle;
555
+ readonly $container: DeploymentViewRuleStyle | FqnExpressions | GlobalStyle | ViewRuleRank | ViewRuleStyle;
531
556
  readonly $type: 'FqnExpressions';
532
557
  prev?: FqnExpressions;
533
558
  value: FqnExpr;
@@ -551,7 +576,7 @@ export interface FqnExprWith extends langium.AstNode {
551
576
  export declare const FqnExprWith = "FqnExprWith";
552
577
  export declare function isFqnExprWith(item: unknown): item is FqnExprWith;
553
578
  export interface FqnRef extends langium.AstNode {
554
- readonly $container: DeploymentRelation | ElementRef | FqnRef | FqnRefExpr | Relation;
579
+ readonly $container: DeploymentRelation | ElementRef | ExtendRelation | FqnRef | FqnRefExpr | Relation;
555
580
  readonly $type: 'FqnRef';
556
581
  parent?: FqnRef;
557
582
  value: langium.Reference<Referenceable>;
@@ -696,7 +721,7 @@ export interface LineProperty extends langium.AstNode {
696
721
  export declare const LineProperty = "LineProperty";
697
722
  export declare function isLineProperty(item: unknown): item is LineProperty;
698
723
  export interface LinkProperty extends langium.AstNode {
699
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
724
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
700
725
  readonly $type: 'LinkProperty';
701
726
  key: 'link';
702
727
  title?: string;
@@ -728,7 +753,7 @@ export interface MetadataAttribute extends langium.AstNode {
728
753
  export declare const MetadataAttribute = "MetadataAttribute";
729
754
  export declare function isMetadataAttribute(item: unknown): item is MetadataAttribute;
730
755
  export interface MetadataBody extends langium.AstNode {
731
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | ExtendDeploymentBody | ExtendElementBody | RelationBody;
756
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | RelationBody;
732
757
  readonly $type: 'MetadataBody';
733
758
  props: Array<MetadataAttribute>;
734
759
  }
@@ -737,7 +762,7 @@ export declare function isMetadataBody(item: unknown): item is MetadataBody;
737
762
  export interface Model extends langium.AstNode {
738
763
  readonly $container: LikeC4Grammar;
739
764
  readonly $type: 'Model';
740
- elements: Array<Element | ExtendElement | Relation>;
765
+ elements: Array<Element | ExtendElement | ExtendRelation | Relation>;
741
766
  name: 'model';
742
767
  }
743
768
  export declare const Model = "Model";
@@ -858,7 +883,7 @@ export interface RelationExprWith extends langium.AstNode {
858
883
  export declare const RelationExprWith = "RelationExprWith";
859
884
  export declare function isRelationExprWith(item: unknown): item is RelationExprWith;
860
885
  export interface RelationKindDotRef extends langium.AstNode {
861
- readonly $container: AbstractDynamicStep | DeploymentRelation | OutgoingRelationExpr | Relation;
886
+ readonly $container: AbstractDynamicStep | DeploymentRelation | ExtendRelation | OutgoingRelationExpr | Relation;
862
887
  readonly $type: 'RelationKindDotRef';
863
888
  kind: langium.Reference<RelationshipKind>;
864
889
  }
@@ -1022,7 +1047,7 @@ export interface TagRef extends langium.AstNode {
1022
1047
  export declare const TagRef = "TagRef";
1023
1048
  export declare function isTagRef(item: unknown): item is TagRef;
1024
1049
  export interface Tags extends langium.AstNode {
1025
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | Relation | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind | Tags;
1050
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | Relation | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind | Tags;
1026
1051
  readonly $type: 'Tags';
1027
1052
  prev?: Tags;
1028
1053
  values: Array<TagRef>;
@@ -1084,6 +1109,14 @@ export interface ViewRulePredicate extends langium.AstNode {
1084
1109
  }
1085
1110
  export declare const ViewRulePredicate = "ViewRulePredicate";
1086
1111
  export declare function isViewRulePredicate(item: unknown): item is ViewRulePredicate;
1112
+ export interface ViewRuleRank extends langium.AstNode {
1113
+ readonly $container: ElementViewBody;
1114
+ readonly $type: 'ViewRuleRank';
1115
+ targets: FqnExpressions;
1116
+ value?: RankValue;
1117
+ }
1118
+ export declare const ViewRuleRank = "ViewRuleRank";
1119
+ export declare function isViewRuleRank(item: unknown): item is ViewRuleRank;
1087
1120
  export interface ViewRuleStyle extends langium.AstNode {
1088
1121
  readonly $container: DynamicViewBody | ElementViewBody | GlobalStyleGroup | ModelViews;
1089
1122
  readonly $type: 'ViewRuleStyle';
@@ -1257,6 +1290,9 @@ export type LikeC4AstType = {
1257
1290
  ExtendElement: ExtendElement;
1258
1291
  ExtendElementBody: ExtendElementBody;
1259
1292
  ExtendElementProperty: ExtendElementProperty;
1293
+ ExtendRelation: ExtendRelation;
1294
+ ExtendRelationBody: ExtendRelationBody;
1295
+ ExtendRelationProperty: ExtendRelationProperty;
1260
1296
  FqnExpr: FqnExpr;
1261
1297
  FqnExprOrWhere: FqnExprOrWhere;
1262
1298
  FqnExprOrWith: FqnExprOrWith;
@@ -1344,6 +1380,7 @@ export type LikeC4AstType = {
1344
1380
  ViewRuleGlobalStyle: ViewRuleGlobalStyle;
1345
1381
  ViewRuleGroup: ViewRuleGroup;
1346
1382
  ViewRulePredicate: ViewRulePredicate;
1383
+ ViewRuleRank: ViewRuleRank;
1347
1384
  ViewRuleStyle: ViewRuleStyle;
1348
1385
  ViewRuleStyleOrGlobalRef: ViewRuleStyleOrGlobalRef;
1349
1386
  ViewStringProperty: ViewStringProperty;
@@ -88,6 +88,10 @@ export const ExtendElementProperty = 'ExtendElementProperty';
88
88
  export function isExtendElementProperty(item) {
89
89
  return reflection.isInstance(item, ExtendElementProperty);
90
90
  }
91
+ export const ExtendRelationProperty = 'ExtendRelationProperty';
92
+ export function isExtendRelationProperty(item) {
93
+ return reflection.isInstance(item, ExtendRelationProperty);
94
+ }
91
95
  export const FqnExpr = 'FqnExpr';
92
96
  export function isFqnExpr(item) {
93
97
  return reflection.isInstance(item, FqnExpr);
@@ -132,6 +136,9 @@ export function isModelReferenceable(item) {
132
136
  export function isParticipant(item) {
133
137
  return item === 'source' || item === 'target';
134
138
  }
139
+ export function isRankValue(item) {
140
+ return item === 'same' || item === 'min' || item === 'max' || item === 'source' || item === 'sink';
141
+ }
135
142
  export const Referenceable = 'Referenceable';
136
143
  export function isReferenceable(item) {
137
144
  return reflection.isInstance(item, Referenceable);
@@ -388,6 +395,14 @@ export const ExtendElementBody = 'ExtendElementBody';
388
395
  export function isExtendElementBody(item) {
389
396
  return reflection.isInstance(item, ExtendElementBody);
390
397
  }
398
+ export const ExtendRelation = 'ExtendRelation';
399
+ export function isExtendRelation(item) {
400
+ return reflection.isInstance(item, ExtendRelation);
401
+ }
402
+ export const ExtendRelationBody = 'ExtendRelationBody';
403
+ export function isExtendRelationBody(item) {
404
+ return reflection.isInstance(item, ExtendRelationBody);
405
+ }
391
406
  export const FqnExpressions = 'FqnExpressions';
392
407
  export function isFqnExpressions(item) {
393
408
  return reflection.isInstance(item, FqnExpressions);
@@ -660,6 +675,10 @@ export const ViewRulePredicate = 'ViewRulePredicate';
660
675
  export function isViewRulePredicate(item) {
661
676
  return reflection.isInstance(item, ViewRulePredicate);
662
677
  }
678
+ export const ViewRuleRank = 'ViewRuleRank';
679
+ export function isViewRuleRank(item) {
680
+ return reflection.isInstance(item, ViewRuleRank);
681
+ }
663
682
  export const ViewRuleStyle = 'ViewRuleStyle';
664
683
  export function isViewRuleStyle(item) {
665
684
  return reflection.isInstance(item, ViewRuleStyle);
@@ -718,7 +737,7 @@ export function isDynamicStepSingle(item) {
718
737
  }
719
738
  export class LikeC4AstReflection extends langium.AbstractAstReflection {
720
739
  getAllTypes() {
721
- return [AbstractDynamicStep, AnyProperty, ArrowProperty, BorderProperty, ColorLiteral, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRuleStyle, DirectedRelationExpr, DynamicStepChain, DynamicStepSingle, DynamicView, DynamicViewBody, DynamicViewDisplayVariantProperty, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewProperty, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementKind, ElementKindExpression, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExpressionV2, Expressions, ExtendDeployment, ExtendDeploymentBody, ExtendElement, ExtendElementBody, ExtendElementProperty, FqnExpr, FqnExprOrWhere, FqnExprOrWith, FqnExprWhere, FqnExprWith, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, HexColor, IconProperty, Imported, ImportsFromPoject, InOutRelationExpr, IncomingRelationExpr, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MarkdownOrString, MetadataArray, MetadataAttribute, MetadataBody, MetadataProperty, MetadataValue, Model, ModelDeployments, ModelReferenceable, ModelViews, MultipleProperty, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, PaddingSizeProperty, RGBAColor, Referenceable, Relation, RelationBody, RelationExpr, RelationExprOrWhere, RelationExprOrWith, RelationExprWhere, RelationExprWith, RelationKindDotRef, RelationNavigateToProperty, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, ShapeSizeProperty, SizeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StrictFqnElementRef, StrictFqnRef, StringProperty, StyleProperty, Tag, TagRef, Tags, TextSizeProperty, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationParticipantKind, WhereRelationParticipantTag, WhereRelationTag, WhereTagEqual, WildcardExpression];
740
+ return [AbstractDynamicStep, AnyProperty, ArrowProperty, BorderProperty, ColorLiteral, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRuleStyle, DirectedRelationExpr, DynamicStepChain, DynamicStepSingle, DynamicView, DynamicViewBody, DynamicViewDisplayVariantProperty, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewProperty, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementKind, ElementKindExpression, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExpressionV2, Expressions, ExtendDeployment, ExtendDeploymentBody, ExtendElement, ExtendElementBody, ExtendElementProperty, ExtendRelation, ExtendRelationBody, ExtendRelationProperty, FqnExpr, FqnExprOrWhere, FqnExprOrWith, FqnExprWhere, FqnExprWith, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, HexColor, IconProperty, Imported, ImportsFromPoject, InOutRelationExpr, IncomingRelationExpr, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MarkdownOrString, MetadataArray, MetadataAttribute, MetadataBody, MetadataProperty, MetadataValue, Model, ModelDeployments, ModelReferenceable, ModelViews, MultipleProperty, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, PaddingSizeProperty, RGBAColor, Referenceable, Relation, RelationBody, RelationExpr, RelationExprOrWhere, RelationExprOrWith, RelationExprWhere, RelationExprWith, RelationKindDotRef, RelationNavigateToProperty, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, ShapeSizeProperty, SizeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StrictFqnElementRef, StrictFqnRef, StringProperty, StyleProperty, Tag, TagRef, Tags, TextSizeProperty, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleRank, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationParticipantKind, WhereRelationParticipantTag, WhereRelationTag, WhereTagEqual, WildcardExpression];
722
741
  }
723
742
  computeIsSubtype(subtype, supertype) {
724
743
  switch (subtype) {
@@ -818,7 +837,7 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
818
837
  return this.isSubtype(ModelReferenceable, supertype) || this.isSubtype(Referenceable, supertype);
819
838
  }
820
839
  case LinkProperty: {
821
- return this.isSubtype(ElementProperty, supertype) || this.isSubtype(ExtendElementProperty, supertype) || this.isSubtype(RelationProperty, supertype) || this.isSubtype(ViewProperty, supertype);
840
+ return this.isSubtype(ElementProperty, supertype) || this.isSubtype(ExtendElementProperty, supertype) || this.isSubtype(ExtendRelationProperty, supertype) || this.isSubtype(RelationProperty, supertype) || this.isSubtype(ViewProperty, supertype);
822
841
  }
823
842
  case MarkdownOrString:
824
843
  case MetadataArray: {
@@ -835,7 +854,7 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
835
854
  return this.isSubtype(MetadataProperty, supertype);
836
855
  }
837
856
  case MetadataProperty: {
838
- return this.isSubtype(ElementProperty, supertype) || this.isSubtype(ExtendElementProperty, supertype) || this.isSubtype(RelationProperty, supertype);
857
+ return this.isSubtype(ElementProperty, supertype) || this.isSubtype(ExtendElementProperty, supertype) || this.isSubtype(ExtendRelationProperty, supertype) || this.isSubtype(RelationProperty, supertype);
839
858
  }
840
859
  case PaddingSizeProperty:
841
860
  case ShapeSizeProperty:
@@ -865,7 +884,8 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
865
884
  }
866
885
  case ViewRuleGlobalPredicateRef:
867
886
  case ViewRuleGroup:
868
- case ViewRulePredicate: {
887
+ case ViewRulePredicate:
888
+ case ViewRuleRank: {
869
889
  return this.isSubtype(ViewRule, supertype);
870
890
  }
871
891
  case ViewRuleGlobalStyle:
@@ -919,6 +939,7 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
919
939
  case 'DeploymentRelation:kind':
920
940
  case 'DynamicStepChain:kind':
921
941
  case 'DynamicStepSingle:kind':
942
+ case 'ExtendRelation:kind':
922
943
  case 'OutgoingRelationExpr:kind':
923
944
  case 'Relation:kind':
924
945
  case 'RelationKindDotRef:kind':
@@ -1375,6 +1396,28 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
1375
1396
  ]
1376
1397
  };
1377
1398
  }
1399
+ case ExtendRelation: {
1400
+ return {
1401
+ name: ExtendRelation,
1402
+ properties: [
1403
+ { name: 'body' },
1404
+ { name: 'dotKind' },
1405
+ { name: 'kind' },
1406
+ { name: 'source' },
1407
+ { name: 'target' },
1408
+ { name: 'title' }
1409
+ ]
1410
+ };
1411
+ }
1412
+ case ExtendRelationBody: {
1413
+ return {
1414
+ name: ExtendRelationBody,
1415
+ properties: [
1416
+ { name: 'props', defaultValue: [] },
1417
+ { name: 'tags' }
1418
+ ]
1419
+ };
1420
+ }
1378
1421
  case FqnExpressions: {
1379
1422
  return {
1380
1423
  name: FqnExpressions,
@@ -2002,6 +2045,15 @@ export class LikeC4AstReflection extends langium.AbstractAstReflection {
2002
2045
  ]
2003
2046
  };
2004
2047
  }
2048
+ case ViewRuleRank: {
2049
+ return {
2050
+ name: ViewRuleRank,
2051
+ properties: [
2052
+ { name: 'targets' },
2053
+ { name: 'value' }
2054
+ ]
2055
+ };
2056
+ }
2005
2057
  case ViewRuleStyle: {
2006
2058
  return {
2007
2059
  name: ViewRuleStyle,