@likec4/language-server 1.19.0 → 1.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/Rpc.js +6 -0
  2. package/dist/browser.d.ts +1 -0
  3. package/dist/documentation/documentation-provider.d.ts +8 -0
  4. package/dist/documentation/documentation-provider.js +46 -0
  5. package/dist/documentation/index.d.ts +1 -0
  6. package/dist/documentation/index.js +1 -0
  7. package/dist/generated/ast.d.ts +22 -9
  8. package/dist/generated/ast.js +23 -2
  9. package/dist/generated/grammar.js +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +3 -2
  12. package/dist/like-c4.langium +4 -1
  13. package/dist/lsp/DocumentSymbolProvider.d.ts +11 -2
  14. package/dist/lsp/DocumentSymbolProvider.js +78 -6
  15. package/dist/model/fqn-computation.js +2 -2
  16. package/dist/model/model-builder.js +3 -3
  17. package/dist/model/model-parser.d.ts +5 -0
  18. package/dist/model/parser/DeploymentModelParser.d.ts +1 -0
  19. package/dist/model/parser/DeploymentViewParser.d.ts +2 -1
  20. package/dist/model/parser/DeploymentViewParser.js +3 -0
  21. package/dist/model/parser/FqnRefParser.d.ts +1 -0
  22. package/dist/model/parser/FqnRefParser.js +13 -0
  23. package/dist/model/parser/GlobalsParser.d.ts +1 -0
  24. package/dist/model/parser/ViewsParser.d.ts +1 -0
  25. package/dist/module.d.ts +9 -1
  26. package/dist/module.js +47 -8
  27. package/dist/protocol.d.ts +19 -1
  28. package/dist/protocol.js +1 -0
  29. package/dist/references/scope-computation.d.ts +2 -2
  30. package/dist/references/scope-computation.js +9 -9
  31. package/dist/validation/dynamic-view-rule.js +3 -2
  32. package/dist/validation/dynamic-view-step.js +23 -27
  33. package/dist/validation/index.d.ts +1 -1
  34. package/dist/validation/property-checks.js +3 -2
  35. package/dist/validation/specification.js +14 -14
  36. package/dist/validation/view-predicates/element-with.js +3 -2
  37. package/dist/validation/view-predicates/expanded-element.js +3 -2
  38. package/dist/validation/view-predicates/incoming.js +3 -2
  39. package/dist/validation/view-predicates/outgoing.js +3 -2
  40. package/dist/validation/view-predicates/relation-with.js +3 -2
  41. package/dist/validation/view.js +3 -3
  42. package/dist/views/configurable-layouter.d.ts +7 -0
  43. package/dist/views/configurable-layouter.js +55 -0
  44. package/dist/views/index.d.ts +1 -0
  45. package/dist/views/index.js +1 -0
  46. package/dist/views/likec4-views.d.ts +26 -0
  47. package/dist/views/likec4-views.js +113 -0
  48. package/package.json +14 -11
  49. package/src/Rpc.ts +13 -7
  50. package/src/browser.ts +1 -0
  51. package/src/documentation/documentation-provider.ts +52 -0
  52. package/src/documentation/index.ts +1 -0
  53. package/src/generated/ast.ts +47 -11
  54. package/src/generated/grammar.ts +1 -1
  55. package/src/index.ts +4 -2
  56. package/src/like-c4.langium +4 -1
  57. package/src/lsp/DocumentSymbolProvider.ts +110 -28
  58. package/src/model/fqn-computation.ts +8 -8
  59. package/src/model/model-builder.ts +52 -52
  60. package/src/model/parser/DeploymentViewParser.ts +10 -7
  61. package/src/model/parser/FqnRefParser.ts +14 -0
  62. package/src/module.ts +56 -9
  63. package/src/protocol.ts +29 -4
  64. package/src/references/scope-computation.ts +35 -35
  65. package/src/validation/dynamic-view-rule.ts +5 -4
  66. package/src/validation/dynamic-view-step.ts +23 -26
  67. package/src/validation/property-checks.ts +11 -10
  68. package/src/validation/specification.ts +38 -38
  69. package/src/validation/view-predicates/element-with.ts +6 -5
  70. package/src/validation/view-predicates/expanded-element.ts +6 -5
  71. package/src/validation/view-predicates/incoming.ts +6 -5
  72. package/src/validation/view-predicates/outgoing.ts +6 -5
  73. package/src/validation/view-predicates/relation-with.ts +6 -5
  74. package/src/validation/view.ts +5 -5
  75. package/src/views/configurable-layouter.ts +65 -0
  76. package/src/views/index.ts +1 -0
  77. package/src/views/likec4-views.ts +139 -0
package/dist/Rpc.js CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  computeView,
11
11
  fetchComputedModel,
12
12
  fetchModel,
13
+ layoutView,
13
14
  locate,
14
15
  onDidChangeModel
15
16
  } from "./protocol.js";
@@ -22,6 +23,7 @@ export class Rpc {
22
23
  const modelBuilder = this.services.likec4.ModelBuilder;
23
24
  const modelLocator = this.services.likec4.ModelLocator;
24
25
  const modelEditor = this.services.likec4.ModelChanges;
26
+ const views = this.services.likec4.Views;
25
27
  const connection = this.services.shared.lsp.Connection;
26
28
  if (!connection) {
27
29
  logger.info(`[ServerRpc] no connection, not initializing`);
@@ -64,6 +66,10 @@ export class Rpc {
64
66
  const view = await modelBuilder.computeView(viewId, cancelToken);
65
67
  return { view };
66
68
  }),
69
+ connection.onRequest(layoutView, async ({ viewId }, cancelToken) => {
70
+ const result = await views.layoutView(viewId, cancelToken);
71
+ return { result };
72
+ }),
67
73
  connection.onRequest(buildDocuments, async ({ docs }, cancelToken) => {
68
74
  const changed = docs.map((d) => URI.parse(d));
69
75
  const notChanged = (uri) => changed.every((c) => !UriUtils.equals(c, uri));
package/dist/browser.d.ts CHANGED
@@ -3,6 +3,7 @@ export { logger as lspLogger, setLogLevel } from './logger';
3
3
  export type { DocumentParser, LikeC4ModelBuilder, LikeC4ModelLocator, LikeC4ModelParser } from './model';
4
4
  export { createCustomLanguageServices, createLanguageServices, LikeC4Module } from './module';
5
5
  export type { LikeC4Services, LikeC4SharedServices } from './module';
6
+ export type { LikeC4Views } from './views';
6
7
  export declare function startLanguageServer(): {
7
8
  shared: LikeC4SharedServices;
8
9
  likec4: LikeC4Services;
@@ -0,0 +1,8 @@
1
+ import { type AstNode, type DocumentationProvider } from 'langium';
2
+ import type { LikeC4Services } from '../module';
3
+ export declare class LikeC4DocumentationProvider implements DocumentationProvider {
4
+ private parser;
5
+ private locator;
6
+ constructor(services: LikeC4Services);
7
+ getDocumentation(node: AstNode): string | undefined;
8
+ }
@@ -0,0 +1,46 @@
1
+ import { AstUtils } from "langium";
2
+ import { ast } from "../ast.js";
3
+ import { logWarnError } from "../logger.js";
4
+ export class LikeC4DocumentationProvider {
5
+ parser;
6
+ locator;
7
+ constructor(services) {
8
+ this.parser = services.likec4.ModelParser;
9
+ this.locator = services.likec4.ModelLocator;
10
+ }
11
+ getDocumentation(node) {
12
+ try {
13
+ if (ast.isDeploymentNode(node)) {
14
+ const doc = AstUtils.getDocument(node);
15
+ const el = this.parser.forDocument(doc).parseDeploymentNode(node);
16
+ const lines = [el.id];
17
+ if (el.title !== node.name) {
18
+ lines.push(" ", `**${el.title}**`);
19
+ }
20
+ return lines.join(" \n");
21
+ }
22
+ if (ast.isDeployedInstance(node)) {
23
+ const doc = AstUtils.getDocument(node);
24
+ const instance = this.parser.forDocument(doc).parseDeployedInstance(node);
25
+ const el = this.locator.getParsedElement(instance.element);
26
+ const lines = [instance.id, `_instance of_ ${instance.element}`];
27
+ if (el) {
28
+ lines.push(" ", `**${el.title}**`);
29
+ }
30
+ return lines.join(" \n");
31
+ }
32
+ if (ast.isElement(node)) {
33
+ const doc = AstUtils.getDocument(node);
34
+ const el = this.parser.forDocument(doc).parseElement(node);
35
+ if (!el) {
36
+ return;
37
+ }
38
+ const lines = [el.id, " ", `**${el.title}**`];
39
+ return lines.join(" \n");
40
+ }
41
+ } catch (e) {
42
+ logWarnError(e);
43
+ }
44
+ return;
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ export { LikeC4DocumentationProvider } from './documentation-provider';
@@ -0,0 +1 @@
1
+ export { LikeC4DocumentationProvider } from "./documentation-provider.js";
@@ -61,7 +61,7 @@ export declare const ElementProperty = "ElementProperty";
61
61
  export declare function isElementProperty(item: unknown): item is ElementProperty;
62
62
  export type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
63
63
  export declare function isElementShape(item: unknown): item is ElementShape;
64
- export type ExpressionV2 = FqnExpr | RelationExpr;
64
+ export type ExpressionV2 = FqnExpr | RelationPredicateOrWhereV2;
65
65
  export declare const ExpressionV2 = "ExpressionV2";
66
66
  export declare function isExpressionV2(item: unknown): item is ExpressionV2;
67
67
  export type FqnExpr = FqnRefExpr | WildcardExpression;
@@ -100,6 +100,9 @@ export declare function isRelationPredicate(item: unknown): item is RelationPred
100
100
  export type RelationPredicateOrWhere = RelationExpression | RelationPredicateWhere;
101
101
  export declare const RelationPredicateOrWhere = "RelationPredicateOrWhere";
102
102
  export declare function isRelationPredicateOrWhere(item: unknown): item is RelationPredicateOrWhere;
103
+ export type RelationPredicateOrWhereV2 = RelationExpr | RelationPredicateWhereV2;
104
+ export declare const RelationPredicateOrWhereV2 = "RelationPredicateOrWhereV2";
105
+ export declare function isRelationPredicateOrWhereV2(item: unknown): item is RelationPredicateOrWhereV2;
103
106
  export type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
104
107
  export declare const RelationProperty = "RelationProperty";
105
108
  export declare function isRelationProperty(item: unknown): item is RelationProperty;
@@ -306,7 +309,7 @@ export interface DeploymentViewRuleStyle extends AstNode {
306
309
  export declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
307
310
  export declare function isDeploymentViewRuleStyle(item: unknown): item is DeploymentViewRuleStyle;
308
311
  export interface DirectedRelationExpr extends AstNode {
309
- readonly $container: DeploymentViewRulePredicateExpression;
312
+ readonly $container: DeploymentViewRulePredicateExpression | RelationPredicateWhereV2;
310
313
  readonly $type: 'DirectedRelationExpr';
311
314
  source: OutgoingRelationExpr;
312
315
  target: FqnExpr;
@@ -638,7 +641,7 @@ export interface IncludePredicate extends AstNode {
638
641
  export declare const IncludePredicate = "IncludePredicate";
639
642
  export declare function isIncludePredicate(item: unknown): item is IncludePredicate;
640
643
  export interface IncomingRelationExpr extends AstNode {
641
- readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr;
644
+ readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr | RelationPredicateWhereV2;
642
645
  readonly $type: 'IncomingRelationExpr';
643
646
  to: FqnExpr;
644
647
  }
@@ -652,7 +655,7 @@ export interface IncomingRelationExpression extends AstNode {
652
655
  export declare const IncomingRelationExpression = "IncomingRelationExpression";
653
656
  export declare function isIncomingRelationExpression(item: unknown): item is IncomingRelationExpression;
654
657
  export interface InOutRelationExpr extends AstNode {
655
- readonly $container: DeploymentViewRulePredicateExpression;
658
+ readonly $container: DeploymentViewRulePredicateExpression | RelationPredicateWhereV2;
656
659
  readonly $type: 'InOutRelationExpr';
657
660
  inout: IncomingRelationExpr;
658
661
  }
@@ -780,7 +783,7 @@ export interface OpacityProperty extends AstNode {
780
783
  export declare const OpacityProperty = "OpacityProperty";
781
784
  export declare function isOpacityProperty(item: unknown): item is OpacityProperty;
782
785
  export interface OutgoingRelationExpr extends AstNode {
783
- readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr;
786
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | RelationPredicateWhereV2;
784
787
  readonly $type: 'OutgoingRelationExpr';
785
788
  from: FqnExpr;
786
789
  isBidirectional: boolean;
@@ -842,6 +845,14 @@ export interface RelationPredicateWhere extends AstNode {
842
845
  }
843
846
  export declare const RelationPredicateWhere = "RelationPredicateWhere";
844
847
  export declare function isRelationPredicateWhere(item: unknown): item is RelationPredicateWhere;
848
+ export interface RelationPredicateWhereV2 extends AstNode {
849
+ readonly $container: DeploymentViewRulePredicateExpression;
850
+ readonly $type: 'RelationPredicateWhereV2';
851
+ subject: RelationExpr;
852
+ where?: WhereRelationExpression;
853
+ }
854
+ export declare const RelationPredicateWhereV2 = "RelationPredicateWhereV2";
855
+ export declare function isRelationPredicateWhereV2(item: unknown): item is RelationPredicateWhereV2;
845
856
  export interface RelationPredicateWith extends AstNode {
846
857
  readonly $container: Predicates;
847
858
  readonly $type: 'RelationPredicateWith';
@@ -1019,7 +1030,7 @@ export interface ViewStringProperty extends AstNode {
1019
1030
  export declare const ViewStringProperty = "ViewStringProperty";
1020
1031
  export declare function isViewStringProperty(item: unknown): item is ViewStringProperty;
1021
1032
  export interface WhereBinaryExpression extends AstNode {
1022
- readonly $container: ElementPredicateWhere | RelationPredicateWhere | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
1033
+ readonly $container: ElementPredicateWhere | RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
1023
1034
  readonly $type: 'WhereBinaryExpression';
1024
1035
  left: WhereElementExpression | WhereRelationExpression;
1025
1036
  operator: 'and' | 'or';
@@ -1053,7 +1064,7 @@ export interface WhereElementTag extends AstNode {
1053
1064
  export declare const WhereElementTag = "WhereElementTag";
1054
1065
  export declare function isWhereElementTag(item: unknown): item is WhereElementTag;
1055
1066
  export interface WhereRelationKind extends AstNode {
1056
- readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
1067
+ readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
1057
1068
  readonly $type: 'WhereRelationKind';
1058
1069
  not: boolean;
1059
1070
  operator: 'is' | string;
@@ -1062,14 +1073,14 @@ export interface WhereRelationKind extends AstNode {
1062
1073
  export declare const WhereRelationKind = "WhereRelationKind";
1063
1074
  export declare function isWhereRelationKind(item: unknown): item is WhereRelationKind;
1064
1075
  export interface WhereRelationNegation extends AstNode {
1065
- readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
1076
+ readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
1066
1077
  readonly $type: 'WhereRelationNegation';
1067
1078
  value: WhereRelationExpression;
1068
1079
  }
1069
1080
  export declare const WhereRelationNegation = "WhereRelationNegation";
1070
1081
  export declare function isWhereRelationNegation(item: unknown): item is WhereRelationNegation;
1071
1082
  export interface WhereRelationTag extends AstNode {
1072
- readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
1083
+ readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
1073
1084
  readonly $type: 'WhereRelationTag';
1074
1085
  not: boolean;
1075
1086
  operator: 'is' | string;
@@ -1186,7 +1197,9 @@ export type LikeC4AstType = {
1186
1197
  RelationNavigateToProperty: RelationNavigateToProperty;
1187
1198
  RelationPredicate: RelationPredicate;
1188
1199
  RelationPredicateOrWhere: RelationPredicateOrWhere;
1200
+ RelationPredicateOrWhereV2: RelationPredicateOrWhereV2;
1189
1201
  RelationPredicateWhere: RelationPredicateWhere;
1202
+ RelationPredicateWhereV2: RelationPredicateWhereV2;
1190
1203
  RelationPredicateWith: RelationPredicateWith;
1191
1204
  RelationProperty: RelationProperty;
1192
1205
  RelationStringProperty: RelationStringProperty;
@@ -119,6 +119,10 @@ export const RelationPredicateOrWhere = "RelationPredicateOrWhere";
119
119
  export function isRelationPredicateOrWhere(item) {
120
120
  return reflection.isInstance(item, RelationPredicateOrWhere);
121
121
  }
122
+ export const RelationPredicateOrWhereV2 = "RelationPredicateOrWhereV2";
123
+ export function isRelationPredicateOrWhereV2(item) {
124
+ return reflection.isInstance(item, RelationPredicateOrWhereV2);
125
+ }
122
126
  export const RelationProperty = "RelationProperty";
123
127
  export function isRelationProperty(item) {
124
128
  return reflection.isInstance(item, RelationProperty);
@@ -527,6 +531,10 @@ export const RelationPredicateWhere = "RelationPredicateWhere";
527
531
  export function isRelationPredicateWhere(item) {
528
532
  return reflection.isInstance(item, RelationPredicateWhere);
529
533
  }
534
+ export const RelationPredicateWhereV2 = "RelationPredicateWhereV2";
535
+ export function isRelationPredicateWhereV2(item) {
536
+ return reflection.isInstance(item, RelationPredicateWhereV2);
537
+ }
530
538
  export const RelationPredicateWith = "RelationPredicateWith";
531
539
  export function isRelationPredicateWith(item) {
532
540
  return reflection.isInstance(item, RelationPredicateWith);
@@ -649,7 +657,7 @@ export function isWildcardExpression(item) {
649
657
  }
650
658
  export class LikeC4AstReflection extends AbstractAstReflection {
651
659
  getAllTypes() {
652
- return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRulePredicateExpression, DeploymentViewRuleStyle, DirectedRelationExpr, DirectedRelationExpression, DynamicView, DynamicViewBody, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewPredicateIterator, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementDescedantsExpression, ElementExpression, ElementExpressionsIterator, ElementKind, ElementKindExpression, ElementPredicate, ElementPredicateOrWhere, ElementPredicateWhere, ElementPredicateWith, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExcludePredicate, ExpandElementExpression, ExpressionV2, ExtendElement, ExtendElementBody, FqnElementRef, FqnExpr, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, IconProperty, InOutRelationExpr, InOutRelationExpression, IncludePredicate, IncomingRelationExpr, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelDeployments, ModelViews, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, OutgoingRelationExpression, Predicate, Predicates, Referenceable, Relation, RelationBody, RelationExpr, RelationExpression, RelationNavigateToProperty, RelationPredicate, RelationPredicateOrWhere, RelationPredicateWhere, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StringProperty, StyleProperty, Tag, Tags, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationTag, WhereTagEqual, WildcardExpression];
660
+ return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentRelation, DeploymentRelationBody, DeploymentView, DeploymentViewBody, DeploymentViewRule, DeploymentViewRulePredicate, DeploymentViewRulePredicateExpression, DeploymentViewRuleStyle, DirectedRelationExpr, DirectedRelationExpression, DynamicView, DynamicViewBody, DynamicViewGlobalPredicateRef, DynamicViewIncludePredicate, DynamicViewParallelSteps, DynamicViewPredicateIterator, DynamicViewRef, DynamicViewRule, DynamicViewStep, Element, ElementBody, ElementDescedantsExpression, ElementExpression, ElementExpressionsIterator, ElementKind, ElementKindExpression, ElementPredicate, ElementPredicateOrWhere, ElementPredicateWhere, ElementPredicateWith, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExcludePredicate, ExpandElementExpression, ExpressionV2, ExtendElement, ExtendElementBody, FqnElementRef, FqnExpr, FqnExpressions, FqnRef, FqnRefExpr, FqnReferenceable, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, IconProperty, InOutRelationExpr, InOutRelationExpression, IncludePredicate, IncomingRelationExpr, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelDeployments, ModelViews, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, OutgoingRelationExpression, Predicate, Predicates, Referenceable, Relation, RelationBody, RelationExpr, RelationExpression, RelationNavigateToProperty, RelationPredicate, RelationPredicateOrWhere, RelationPredicateOrWhereV2, RelationPredicateWhere, RelationPredicateWhereV2, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StringProperty, StyleProperty, Tag, Tags, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalPredicateRef, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationTag, WhereTagEqual, WildcardExpression];
653
661
  }
654
662
  computeIsSubtype(subtype, supertype) {
655
663
  switch (subtype) {
@@ -731,7 +739,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
731
739
  return this.isSubtype(FqnReferenceable, supertype);
732
740
  }
733
741
  case FqnExpr:
734
- case RelationExpr: {
742
+ case RelationPredicateOrWhereV2: {
735
743
  return this.isSubtype(ExpressionV2, supertype);
736
744
  }
737
745
  case FqnRefExpr: {
@@ -756,6 +764,10 @@ export class LikeC4AstReflection extends AbstractAstReflection {
756
764
  case MetadataProperty: {
757
765
  return this.isSubtype(ElementProperty, supertype) || this.isSubtype(RelationProperty, supertype);
758
766
  }
767
+ case RelationExpr:
768
+ case RelationPredicateWhereV2: {
769
+ return this.isSubtype(RelationPredicateOrWhereV2, supertype);
770
+ }
759
771
  case RelationExpression:
760
772
  case RelationPredicateWhere: {
761
773
  return this.isSubtype(RelationPredicateOrWhere, supertype);
@@ -1661,6 +1673,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
1661
1673
  ]
1662
1674
  };
1663
1675
  }
1676
+ case RelationPredicateWhereV2: {
1677
+ return {
1678
+ name: RelationPredicateWhereV2,
1679
+ properties: [
1680
+ { name: "subject" },
1681
+ { name: "where" }
1682
+ ]
1683
+ };
1684
+ }
1664
1685
  case RelationPredicateWith: {
1665
1686
  return {
1666
1687
  name: RelationPredicateWith,