@likec4/language-server 1.20.3 → 1.21.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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/ast.d.ts +16 -0
  3. package/dist/ast.js +42 -10
  4. package/dist/bundled.mjs +2845 -2828
  5. package/dist/formatting/LikeC4Formatter.js +6 -3
  6. package/dist/generated/ast.d.ts +76 -24
  7. package/dist/generated/ast.js +103 -25
  8. package/dist/generated/grammar.js +1 -1
  9. package/dist/lsp/CompletionProvider.js +2 -1
  10. package/dist/lsp/SemanticTokenProvider.js +50 -2
  11. package/dist/model/model-builder.js +57 -3
  12. package/dist/model/model-parser.d.ts +6 -0
  13. package/dist/model/model-parser.js +1 -0
  14. package/dist/model/parser/Base.js +11 -5
  15. package/dist/model/parser/DeploymentModelParser.d.ts +1 -0
  16. package/dist/model/parser/DeploymentViewParser.d.ts +1 -0
  17. package/dist/model/parser/DeploymentViewParser.js +3 -0
  18. package/dist/model/parser/FqnRefParser.d.ts +1 -0
  19. package/dist/model/parser/FqnRefParser.js +10 -0
  20. package/dist/model/parser/GlobalsParser.d.ts +1 -0
  21. package/dist/model/parser/ModelParser.d.ts +2 -1
  22. package/dist/model/parser/ModelParser.js +26 -1
  23. package/dist/model/parser/PredicatesParser.js +19 -1
  24. package/dist/model/parser/ViewsParser.d.ts +1 -0
  25. package/dist/references/scope-provider.d.ts +1 -1
  26. package/dist/references/scope-provider.js +1 -1
  27. package/dist/test/testServices.d.ts +1 -0
  28. package/dist/test/testServices.js +8 -0
  29. package/dist/utils/elementRef.d.ts +3 -3
  30. package/dist/validation/index.d.ts +1 -1
  31. package/package.json +12 -12
  32. package/src/ast.ts +55 -9
  33. package/src/formatting/LikeC4Formatter.ts +7 -1
  34. package/src/generated/ast.ts +200 -49
  35. package/src/generated/grammar.ts +1 -1
  36. package/src/like-c4.langium +45 -7
  37. package/src/lsp/CompletionProvider.ts +1 -0
  38. package/src/lsp/SemanticTokenProvider.ts +56 -1
  39. package/src/model/model-builder.ts +65 -6
  40. package/src/model/model-parser.ts +1 -0
  41. package/src/model/parser/Base.ts +11 -5
  42. package/src/model/parser/DeploymentViewParser.ts +3 -0
  43. package/src/model/parser/FqnRefParser.ts +11 -0
  44. package/src/model/parser/ModelParser.ts +30 -1
  45. package/src/model/parser/PredicatesParser.ts +19 -1
  46. package/src/references/scope-provider.ts +9 -9
  47. package/src/test/testServices.ts +18 -9
  48. package/src/utils/elementRef.ts +3 -3
@@ -85,9 +85,13 @@ export type LikeC4KeywordNames =
85
85
  | "instanceOf"
86
86
  | "is"
87
87
  | "kind"
88
+ | "large"
89
+ | "lg"
88
90
  | "likec4lib"
89
91
  | "line"
90
92
  | "link"
93
+ | "md"
94
+ | "medium"
91
95
  | "metadata"
92
96
  | "mobile"
93
97
  | "model"
@@ -107,6 +111,7 @@ export type LikeC4KeywordNames =
107
111
  | "opacity"
108
112
  | "open"
109
113
  | "or"
114
+ | "padding"
110
115
  | "par"
111
116
  | "parallel"
112
117
  | "person"
@@ -119,8 +124,11 @@ export type LikeC4KeywordNames =
119
124
  | "relationship"
120
125
  | "secondary"
121
126
  | "shape"
127
+ | "size"
122
128
  | "sky"
123
129
  | "slate"
130
+ | "sm"
131
+ | "small"
124
132
  | "solid"
125
133
  | "source"
126
134
  | "specification"
@@ -131,6 +139,7 @@ export type LikeC4KeywordNames =
131
139
  | "tail"
132
140
  | "target"
133
141
  | "technology"
142
+ | "textSize"
134
143
  | "title"
135
144
  | "true"
136
145
  | "vee"
@@ -138,6 +147,10 @@ export type LikeC4KeywordNames =
138
147
  | "views"
139
148
  | "where"
140
149
  | "with"
150
+ | "xl"
151
+ | "xlarge"
152
+ | "xs"
153
+ | "xsmall"
141
154
  | "{"
142
155
  | "}";
143
156
 
@@ -235,6 +248,14 @@ export function isElementPredicateOrWhere(item: unknown): item is ElementPredica
235
248
  return reflection.isInstance(item, ElementPredicateOrWhere);
236
249
  }
237
250
 
251
+ export type ElementPredicateOrWhereV2 = ElementPredicateWhereV2 | FqnExpr;
252
+
253
+ export const ElementPredicateOrWhereV2 = 'ElementPredicateOrWhereV2';
254
+
255
+ export function isElementPredicateOrWhereV2(item: unknown): item is ElementPredicateOrWhereV2 {
256
+ return reflection.isInstance(item, ElementPredicateOrWhereV2);
257
+ }
258
+
238
259
  export type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
239
260
 
240
261
  export const ElementProperty = 'ElementProperty';
@@ -249,7 +270,7 @@ export function isElementShape(item: unknown): item is ElementShape {
249
270
  return item === 'rectangle' || item === 'person' || item === 'browser' || item === 'mobile' || item === 'cylinder' || item === 'storage' || item === 'queue';
250
271
  }
251
272
 
252
- export type ExpressionV2 = FqnExpr | RelationPredicateOrWhereV2;
273
+ export type ExpressionV2 = ElementPredicateOrWhereV2 | RelationPredicateOrWhereV2;
253
274
 
254
275
  export const ExpressionV2 = 'ExpressionV2';
255
276
 
@@ -257,6 +278,14 @@ export function isExpressionV2(item: unknown): item is ExpressionV2 {
257
278
  return reflection.isInstance(item, ExpressionV2);
258
279
  }
259
280
 
281
+ export type ExtendElementProperty = LinkProperty | MetadataProperty;
282
+
283
+ export const ExtendElementProperty = 'ExtendElementProperty';
284
+
285
+ export function isExtendElementProperty(item: unknown): item is ExtendElementProperty {
286
+ return reflection.isInstance(item, ExtendElementProperty);
287
+ }
288
+
260
289
  export type FqnExpr = FqnRefExpr | WildcardExpression;
261
290
 
262
291
  export const FqnExpr = 'FqnExpr';
@@ -279,10 +308,10 @@ export function isIconId(item: unknown): item is IconId {
279
308
  return (typeof item === 'string' && (/(aws|azure|gcp|tech):[-\w]*/.test(item)));
280
309
  }
281
310
 
282
- export type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | Participant | ThemeColor | string;
311
+ export type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | Participant | SizeValue | ThemeColor | string;
283
312
 
284
313
  export function isId(item: unknown): item is Id {
285
- return isElementShape(item) || isThemeColor(item) || isArrowType(item) || isLineOptions(item) || isParticipant(item) || item === 'element' || item === 'model' || item === 'group' || item === 'node' || item === 'deployment' || item === 'instance' || (typeof item === 'string' && (/[_]*[a-zA-Z][-\w]*/.test(item)));
314
+ return isElementShape(item) || isThemeColor(item) || isArrowType(item) || isLineOptions(item) || isParticipant(item) || isSizeValue(item) || item === 'element' || item === 'model' || item === 'group' || item === 'node' || item === 'deployment' || item === 'instance' || (typeof item === 'string' && (/[_]*[a-zA-Z][-\w]*/.test(item)));
286
315
  }
287
316
 
288
317
  export type LikeC4View = DeploymentView | DynamicView | ElementView;
@@ -385,6 +414,20 @@ export function isRelationshipStyleProperty(item: unknown): item is Relationship
385
414
  return reflection.isInstance(item, RelationshipStyleProperty);
386
415
  }
387
416
 
417
+ export type SizeProperty = PaddingSizeProperty | ShapeSizeProperty | TextSizeProperty;
418
+
419
+ export const SizeProperty = 'SizeProperty';
420
+
421
+ export function isSizeProperty(item: unknown): item is SizeProperty {
422
+ return reflection.isInstance(item, SizeProperty);
423
+ }
424
+
425
+ export type SizeValue = 'large' | 'lg' | 'md' | 'medium' | 'sm' | 'small' | 'xl' | 'xlarge' | 'xs' | 'xsmall';
426
+
427
+ export function isSizeValue(item: unknown): item is SizeValue {
428
+ return item === 'xs' || item === 'sm' || item === 'md' || item === 'lg' || item === 'xl' || item === 'xsmall' || item === 'small' || item === 'medium' || item === 'large' || item === 'xlarge';
429
+ }
430
+
388
431
  export type StringProperty = ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
389
432
 
390
433
  export const StringProperty = 'StringProperty';
@@ -393,7 +436,7 @@ export function isStringProperty(item: unknown): item is StringProperty {
393
436
  return reflection.isInstance(item, StringProperty);
394
437
  }
395
438
 
396
- export type StyleProperty = BorderProperty | ColorProperty | IconProperty | MultipleProperty | OpacityProperty | ShapeProperty;
439
+ export type StyleProperty = BorderProperty | ColorProperty | IconProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty;
397
440
 
398
441
  export const StyleProperty = 'StyleProperty';
399
442
 
@@ -980,6 +1023,19 @@ export function isElementPredicateWhere(item: unknown): item is ElementPredicate
980
1023
  return reflection.isInstance(item, ElementPredicateWhere);
981
1024
  }
982
1025
 
1026
+ export interface ElementPredicateWhereV2 extends AstNode {
1027
+ readonly $container: DeploymentViewRulePredicateExpression;
1028
+ readonly $type: 'ElementPredicateWhereV2';
1029
+ subject: FqnExpr;
1030
+ where?: WhereElementExpression;
1031
+ }
1032
+
1033
+ export const ElementPredicateWhereV2 = 'ElementPredicateWhereV2';
1034
+
1035
+ export function isElementPredicateWhereV2(item: unknown): item is ElementPredicateWhereV2 {
1036
+ return reflection.isInstance(item, ElementPredicateWhereV2);
1037
+ }
1038
+
983
1039
  export interface ElementPredicateWith extends AstNode {
984
1040
  readonly $container: DynamicViewPredicateIterator | Predicates;
985
1041
  readonly $type: 'ElementPredicateWith';
@@ -1114,7 +1170,7 @@ export interface ExtendElement extends AstNode {
1114
1170
  readonly $container: Model;
1115
1171
  readonly $type: 'ExtendElement';
1116
1172
  body: ExtendElementBody;
1117
- element: FqnElementRef;
1173
+ element: StrictFqnElementRef;
1118
1174
  }
1119
1175
 
1120
1176
  export const ExtendElement = 'ExtendElement';
@@ -1127,6 +1183,8 @@ export interface ExtendElementBody extends AstNode {
1127
1183
  readonly $container: ExtendElement;
1128
1184
  readonly $type: 'ExtendElementBody';
1129
1185
  elements: Array<Element | Relation>;
1186
+ props: Array<ExtendElementProperty>;
1187
+ tags?: Tags;
1130
1188
  }
1131
1189
 
1132
1190
  export const ExtendElementBody = 'ExtendElementBody';
@@ -1135,19 +1193,6 @@ export function isExtendElementBody(item: unknown): item is ExtendElementBody {
1135
1193
  return reflection.isInstance(item, ExtendElementBody);
1136
1194
  }
1137
1195
 
1138
- export interface FqnElementRef extends AstNode {
1139
- readonly $container: ExtendElement | FqnElementRef;
1140
- readonly $type: 'FqnElementRef';
1141
- el: Reference<Element>;
1142
- parent?: FqnElementRef;
1143
- }
1144
-
1145
- export const FqnElementRef = 'FqnElementRef';
1146
-
1147
- export function isFqnElementRef(item: unknown): item is FqnElementRef {
1148
- return reflection.isInstance(item, FqnElementRef);
1149
- }
1150
-
1151
1196
  export interface FqnExpressions extends AstNode {
1152
1197
  readonly $container: DeploymentViewRuleStyle | FqnExpressions;
1153
1198
  readonly $type: 'FqnExpressions';
@@ -1175,7 +1220,7 @@ export function isFqnRef(item: unknown): item is FqnRef {
1175
1220
  }
1176
1221
 
1177
1222
  export interface FqnRefExpr extends AstNode {
1178
- readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
1223
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | ElementPredicateWhereV2 | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
1179
1224
  readonly $type: 'FqnRefExpr';
1180
1225
  ref: FqnRef;
1181
1226
  selector?: string;
@@ -1394,7 +1439,7 @@ export function isLineProperty(item: unknown): item is LineProperty {
1394
1439
  }
1395
1440
 
1396
1441
  export interface LinkProperty extends AstNode {
1397
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | RelationBody;
1442
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendElementBody | RelationBody;
1398
1443
  readonly $type: 'LinkProperty';
1399
1444
  key: 'link';
1400
1445
  title?: string;
@@ -1421,7 +1466,7 @@ export function isMetadataAttribute(item: unknown): item is MetadataAttribute {
1421
1466
  }
1422
1467
 
1423
1468
  export interface MetadataBody extends AstNode {
1424
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | RelationBody;
1469
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | ExtendElementBody | RelationBody;
1425
1470
  readonly $type: 'MetadataBody';
1426
1471
  props: Array<MetadataAttribute>;
1427
1472
  }
@@ -1565,6 +1610,19 @@ export function isOutgoingRelationExpression(item: unknown): item is OutgoingRel
1565
1610
  return reflection.isInstance(item, OutgoingRelationExpression);
1566
1611
  }
1567
1612
 
1613
+ export interface PaddingSizeProperty extends AstNode {
1614
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
1615
+ readonly $type: 'PaddingSizeProperty';
1616
+ key: 'padding';
1617
+ value: SizeValue;
1618
+ }
1619
+
1620
+ export const PaddingSizeProperty = 'PaddingSizeProperty';
1621
+
1622
+ export function isPaddingSizeProperty(item: unknown): item is PaddingSizeProperty {
1623
+ return reflection.isInstance(item, PaddingSizeProperty);
1624
+ }
1625
+
1568
1626
  export interface Predicates extends AstNode {
1569
1627
  readonly $container: ExcludePredicate | IncludePredicate | Predicates;
1570
1628
  readonly $type: 'Predicates';
@@ -1712,6 +1770,19 @@ export function isShapeProperty(item: unknown): item is ShapeProperty {
1712
1770
  return reflection.isInstance(item, ShapeProperty);
1713
1771
  }
1714
1772
 
1773
+ export interface ShapeSizeProperty extends AstNode {
1774
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
1775
+ readonly $type: 'ShapeSizeProperty';
1776
+ key: 'size';
1777
+ value: SizeValue;
1778
+ }
1779
+
1780
+ export const ShapeSizeProperty = 'ShapeSizeProperty';
1781
+
1782
+ export function isShapeSizeProperty(item: unknown): item is ShapeSizeProperty {
1783
+ return reflection.isInstance(item, ShapeSizeProperty);
1784
+ }
1785
+
1715
1786
  export interface SpecificationColor extends AstNode {
1716
1787
  readonly $container: SpecificationRule;
1717
1788
  readonly $type: 'SpecificationColor';
@@ -1819,6 +1890,19 @@ export function isSpecificationTag(item: unknown): item is SpecificationTag {
1819
1890
  return reflection.isInstance(item, SpecificationTag);
1820
1891
  }
1821
1892
 
1893
+ export interface StrictFqnElementRef extends AstNode {
1894
+ readonly $container: ExtendElement | StrictFqnElementRef;
1895
+ readonly $type: 'StrictFqnElementRef';
1896
+ el: Reference<Element>;
1897
+ parent?: StrictFqnElementRef;
1898
+ }
1899
+
1900
+ export const StrictFqnElementRef = 'StrictFqnElementRef';
1901
+
1902
+ export function isStrictFqnElementRef(item: unknown): item is StrictFqnElementRef {
1903
+ return reflection.isInstance(item, StrictFqnElementRef);
1904
+ }
1905
+
1822
1906
  export interface Tag extends AstNode {
1823
1907
  readonly $container: SpecificationTag;
1824
1908
  readonly $type: 'Tag';
@@ -1832,7 +1916,7 @@ export function isTag(item: unknown): item is Tag {
1832
1916
  }
1833
1917
 
1834
1918
  export interface Tags extends AstNode {
1835
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | Relation | RelationBody | Tags;
1919
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendElementBody | Relation | RelationBody | Tags;
1836
1920
  readonly $type: 'Tags';
1837
1921
  prev?: Tags;
1838
1922
  values: Array<Reference<Tag>>;
@@ -1844,6 +1928,19 @@ export function isTags(item: unknown): item is Tags {
1844
1928
  return reflection.isInstance(item, Tags);
1845
1929
  }
1846
1930
 
1931
+ export interface TextSizeProperty extends AstNode {
1932
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
1933
+ readonly $type: 'TextSizeProperty';
1934
+ key: 'textSize';
1935
+ value: SizeValue;
1936
+ }
1937
+
1938
+ export const TextSizeProperty = 'TextSizeProperty';
1939
+
1940
+ export function isTextSizeProperty(item: unknown): item is TextSizeProperty {
1941
+ return reflection.isInstance(item, TextSizeProperty);
1942
+ }
1943
+
1847
1944
  export interface ViewRef extends AstNode {
1848
1945
  readonly $container: NavigateToProperty;
1849
1946
  readonly $type: 'ViewRef';
@@ -1935,7 +2032,7 @@ export function isViewStringProperty(item: unknown): item is ViewStringProperty
1935
2032
  }
1936
2033
 
1937
2034
  export interface WhereBinaryExpression extends AstNode {
1938
- readonly $container: ElementPredicateWhere | RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
2035
+ readonly $container: ElementPredicateWhere | ElementPredicateWhereV2 | RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
1939
2036
  readonly $type: 'WhereBinaryExpression';
1940
2037
  left: WhereElementExpression | WhereRelationExpression;
1941
2038
  operator: 'and' | 'or';
@@ -1949,11 +2046,11 @@ export function isWhereBinaryExpression(item: unknown): item is WhereBinaryExpre
1949
2046
  }
1950
2047
 
1951
2048
  export interface WhereElementKind extends AstNode {
1952
- readonly $container: ElementPredicateWhere | WhereBinaryExpression | WhereElementNegation;
2049
+ readonly $container: ElementPredicateWhere | ElementPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation;
1953
2050
  readonly $type: 'WhereElementKind';
1954
2051
  not: boolean;
1955
2052
  operator: 'is' | string;
1956
- value?: Reference<ElementKind>;
2053
+ value?: Reference<DeploymentNodeOrElementKind>;
1957
2054
  }
1958
2055
 
1959
2056
  export const WhereElementKind = 'WhereElementKind';
@@ -1963,7 +2060,7 @@ export function isWhereElementKind(item: unknown): item is WhereElementKind {
1963
2060
  }
1964
2061
 
1965
2062
  export interface WhereElementNegation extends AstNode {
1966
- readonly $container: ElementPredicateWhere | WhereBinaryExpression | WhereElementNegation;
2063
+ readonly $container: ElementPredicateWhere | ElementPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation;
1967
2064
  readonly $type: 'WhereElementNegation';
1968
2065
  value: WhereElementExpression;
1969
2066
  }
@@ -1975,7 +2072,7 @@ export function isWhereElementNegation(item: unknown): item is WhereElementNegat
1975
2072
  }
1976
2073
 
1977
2074
  export interface WhereElementTag extends AstNode {
1978
- readonly $container: ElementPredicateWhere | WhereBinaryExpression | WhereElementNegation;
2075
+ readonly $container: ElementPredicateWhere | ElementPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation;
1979
2076
  readonly $type: 'WhereElementTag';
1980
2077
  not: boolean;
1981
2078
  operator: 'is' | string;
@@ -2059,7 +2156,7 @@ export function isWhereRelationTag(item: unknown): item is WhereRelationTag {
2059
2156
  }
2060
2157
 
2061
2158
  export interface WildcardExpression extends AstNode {
2062
- readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | FqnExpressions | IncomingRelationExpr | IncomingRelationExpression | OutgoingRelationExpr | OutgoingRelationExpression | Predicates;
2159
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWhereV2 | ElementPredicateWith | FqnExpressions | IncomingRelationExpr | IncomingRelationExpression | OutgoingRelationExpr | OutgoingRelationExpression | Predicates;
2063
2160
  readonly $type: 'WildcardExpression';
2064
2161
  isWildcard: boolean;
2065
2162
  }
@@ -2112,7 +2209,9 @@ export type LikeC4AstType = {
2112
2209
  ElementKindExpression: ElementKindExpression
2113
2210
  ElementPredicate: ElementPredicate
2114
2211
  ElementPredicateOrWhere: ElementPredicateOrWhere
2212
+ ElementPredicateOrWhereV2: ElementPredicateOrWhereV2
2115
2213
  ElementPredicateWhere: ElementPredicateWhere
2214
+ ElementPredicateWhereV2: ElementPredicateWhereV2
2116
2215
  ElementPredicateWith: ElementPredicateWith
2117
2216
  ElementProperty: ElementProperty
2118
2217
  ElementRef: ElementRef
@@ -2127,7 +2226,7 @@ export type LikeC4AstType = {
2127
2226
  ExpressionV2: ExpressionV2
2128
2227
  ExtendElement: ExtendElement
2129
2228
  ExtendElementBody: ExtendElementBody
2130
- FqnElementRef: FqnElementRef
2229
+ ExtendElementProperty: ExtendElementProperty
2131
2230
  FqnExpr: FqnExpr
2132
2231
  FqnExpressions: FqnExpressions
2133
2232
  FqnRef: FqnRef
@@ -2164,6 +2263,7 @@ export type LikeC4AstType = {
2164
2263
  OpacityProperty: OpacityProperty
2165
2264
  OutgoingRelationExpr: OutgoingRelationExpr
2166
2265
  OutgoingRelationExpression: OutgoingRelationExpression
2266
+ PaddingSizeProperty: PaddingSizeProperty
2167
2267
  Predicate: Predicate
2168
2268
  Predicates: Predicates
2169
2269
  Referenceable: Referenceable
@@ -2184,6 +2284,8 @@ export type LikeC4AstType = {
2184
2284
  RelationshipKind: RelationshipKind
2185
2285
  RelationshipStyleProperty: RelationshipStyleProperty
2186
2286
  ShapeProperty: ShapeProperty
2287
+ ShapeSizeProperty: ShapeSizeProperty
2288
+ SizeProperty: SizeProperty
2187
2289
  SpecificationColor: SpecificationColor
2188
2290
  SpecificationDeploymentNodeKind: SpecificationDeploymentNodeKind
2189
2291
  SpecificationElementKind: SpecificationElementKind
@@ -2192,10 +2294,12 @@ export type LikeC4AstType = {
2192
2294
  SpecificationRelationshipStringProperty: SpecificationRelationshipStringProperty
2193
2295
  SpecificationRule: SpecificationRule
2194
2296
  SpecificationTag: SpecificationTag
2297
+ StrictFqnElementRef: StrictFqnElementRef
2195
2298
  StringProperty: StringProperty
2196
2299
  StyleProperty: StyleProperty
2197
2300
  Tag: Tag
2198
2301
  Tags: Tags
2302
+ TextSizeProperty: TextSizeProperty
2199
2303
  ViewProperty: ViewProperty
2200
2304
  ViewRef: ViewRef
2201
2305
  ViewRule: ViewRule
@@ -2229,7 +2333,7 @@ export type LikeC4AstType = {
2229
2333
  export class LikeC4AstReflection extends AbstractAstReflection {
2230
2334
 
2231
2335
  getAllTypes(): string[] {
2232
- return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, 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, MultipleProperty, 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, WhereRelationParticipantKind, WhereRelationParticipantTag, WhereRelationTag, WhereTagEqual, WildcardExpression];
2336
+ return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DeployedInstance, DeployedInstanceBody, DeploymentElement, DeploymentNode, DeploymentNodeBody, DeploymentNodeKind, DeploymentNodeOrElementKind, 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, ElementPredicateOrWhereV2, ElementPredicateWhere, ElementPredicateWhereV2, ElementPredicateWith, ElementProperty, ElementRef, ElementStringProperty, ElementStyleProperty, ElementTagExpression, ElementView, ElementViewBody, ElementViewRef, ExcludePredicate, ExpandElementExpression, ExpressionV2, ExtendElement, ExtendElementBody, ExtendElementProperty, 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, MultipleProperty, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpr, OutgoingRelationExpression, PaddingSizeProperty, Predicate, Predicates, Referenceable, Relation, RelationBody, RelationExpr, RelationExpression, RelationNavigateToProperty, RelationPredicate, RelationPredicateOrWhere, RelationPredicateOrWhereV2, RelationPredicateWhere, RelationPredicateWhereV2, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, ShapeSizeProperty, SizeProperty, SpecificationColor, SpecificationDeploymentNodeKind, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StrictFqnElementRef, StringProperty, StyleProperty, Tag, 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];
2233
2337
  }
2234
2338
 
2235
2339
  protected override computeIsSubtype(subtype: string, supertype: string): boolean {
@@ -2302,6 +2406,14 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2302
2406
  case ElementPredicateWith: {
2303
2407
  return this.isSubtype(ElementPredicate, supertype);
2304
2408
  }
2409
+ case ElementPredicateOrWhereV2:
2410
+ case RelationPredicateOrWhereV2: {
2411
+ return this.isSubtype(ExpressionV2, supertype);
2412
+ }
2413
+ case ElementPredicateWhereV2:
2414
+ case FqnExpr: {
2415
+ return this.isSubtype(ElementPredicateOrWhereV2, supertype);
2416
+ }
2305
2417
  case ElementStringProperty: {
2306
2418
  return this.isSubtype(ElementProperty, supertype) || this.isSubtype(StringProperty, supertype);
2307
2419
  }
@@ -2316,10 +2428,6 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2316
2428
  case Referenceable: {
2317
2429
  return this.isSubtype(FqnReferenceable, supertype);
2318
2430
  }
2319
- case FqnExpr:
2320
- case RelationPredicateOrWhereV2: {
2321
- return this.isSubtype(ExpressionV2, supertype);
2322
- }
2323
2431
  case FqnRefExpr: {
2324
2432
  return this.isSubtype(FqnExpr, supertype);
2325
2433
  }
@@ -2327,7 +2435,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2327
2435
  return this.isSubtype(ElementProperty, supertype) || this.isSubtype(StyleProperty, supertype);
2328
2436
  }
2329
2437
  case LinkProperty: {
2330
- return this.isSubtype(ElementProperty, supertype) || this.isSubtype(RelationProperty, supertype) || this.isSubtype(ViewProperty, supertype);
2438
+ return this.isSubtype(ElementProperty, supertype) || this.isSubtype(ExtendElementProperty, supertype) || this.isSubtype(RelationProperty, supertype) || this.isSubtype(ViewProperty, supertype);
2331
2439
  }
2332
2440
  case MetadataAttribute:
2333
2441
  case NotationProperty:
@@ -2340,7 +2448,12 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2340
2448
  return this.isSubtype(MetadataProperty, supertype);
2341
2449
  }
2342
2450
  case MetadataProperty: {
2343
- return this.isSubtype(ElementProperty, supertype) || this.isSubtype(RelationProperty, supertype);
2451
+ return this.isSubtype(ElementProperty, supertype) || this.isSubtype(ExtendElementProperty, supertype) || this.isSubtype(RelationProperty, supertype);
2452
+ }
2453
+ case PaddingSizeProperty:
2454
+ case ShapeSizeProperty:
2455
+ case TextSizeProperty: {
2456
+ return this.isSubtype(SizeProperty, supertype) || this.isSubtype(StyleProperty, supertype);
2344
2457
  }
2345
2458
  case RelationExpr:
2346
2459
  case RelationPredicateWhereV2: {
@@ -2441,12 +2554,11 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2441
2554
  return DynamicView;
2442
2555
  }
2443
2556
  case 'Element:kind':
2444
- case 'ElementKindExpression:kind':
2445
- case 'WhereElementKind:value': {
2557
+ case 'ElementKindExpression:kind': {
2446
2558
  return ElementKind;
2447
2559
  }
2448
2560
  case 'ElementRef:el':
2449
- case 'FqnElementRef:el': {
2561
+ case 'StrictFqnElementRef:el': {
2450
2562
  return Element;
2451
2563
  }
2452
2564
  case 'ElementTagExpression:tag':
@@ -2474,6 +2586,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2474
2586
  case 'ViewRuleGlobalStyle:style': {
2475
2587
  return GlobalStyleId;
2476
2588
  }
2589
+ case 'WhereElementKind:value':
2477
2590
  case 'WhereRelationParticipantKind:value': {
2478
2591
  return DeploymentNodeOrElementKind;
2479
2592
  }
@@ -2812,6 +2925,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2812
2925
  ]
2813
2926
  };
2814
2927
  }
2928
+ case ElementPredicateWhereV2: {
2929
+ return {
2930
+ name: ElementPredicateWhereV2,
2931
+ properties: [
2932
+ { name: 'subject' },
2933
+ { name: 'where' }
2934
+ ]
2935
+ };
2936
+ }
2815
2937
  case ElementPredicateWith: {
2816
2938
  return {
2817
2939
  name: ElementPredicateWith,
@@ -2915,16 +3037,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
2915
3037
  return {
2916
3038
  name: ExtendElementBody,
2917
3039
  properties: [
2918
- { name: 'elements', defaultValue: [] }
2919
- ]
2920
- };
2921
- }
2922
- case FqnElementRef: {
2923
- return {
2924
- name: FqnElementRef,
2925
- properties: [
2926
- { name: 'el' },
2927
- { name: 'parent' }
3040
+ { name: 'elements', defaultValue: [] },
3041
+ { name: 'props', defaultValue: [] },
3042
+ { name: 'tags' }
2928
3043
  ]
2929
3044
  };
2930
3045
  }
@@ -3218,6 +3333,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
3218
3333
  ]
3219
3334
  };
3220
3335
  }
3336
+ case PaddingSizeProperty: {
3337
+ return {
3338
+ name: PaddingSizeProperty,
3339
+ properties: [
3340
+ { name: 'key' },
3341
+ { name: 'value' }
3342
+ ]
3343
+ };
3344
+ }
3221
3345
  case Predicates: {
3222
3346
  return {
3223
3347
  name: Predicates,
@@ -3321,6 +3445,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
3321
3445
  ]
3322
3446
  };
3323
3447
  }
3448
+ case ShapeSizeProperty: {
3449
+ return {
3450
+ name: ShapeSizeProperty,
3451
+ properties: [
3452
+ { name: 'key' },
3453
+ { name: 'value' }
3454
+ ]
3455
+ };
3456
+ }
3324
3457
  case SpecificationColor: {
3325
3458
  return {
3326
3459
  name: SpecificationColor,
@@ -3396,6 +3529,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
3396
3529
  ]
3397
3530
  };
3398
3531
  }
3532
+ case StrictFqnElementRef: {
3533
+ return {
3534
+ name: StrictFqnElementRef,
3535
+ properties: [
3536
+ { name: 'el' },
3537
+ { name: 'parent' }
3538
+ ]
3539
+ };
3540
+ }
3399
3541
  case Tag: {
3400
3542
  return {
3401
3543
  name: Tag,
@@ -3413,6 +3555,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
3413
3555
  ]
3414
3556
  };
3415
3557
  }
3558
+ case TextSizeProperty: {
3559
+ return {
3560
+ name: TextSizeProperty,
3561
+ properties: [
3562
+ { name: 'key' },
3563
+ { name: 'value' }
3564
+ ]
3565
+ };
3566
+ }
3416
3567
  case ViewRef: {
3417
3568
  return {
3418
3569
  name: ViewRef,