@likec4/language-server 1.15.1 → 1.16.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.
- package/contrib/likec4.tmLanguage.json +1 -1
- package/dist/browser.cjs +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.mts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/model-graph/index.cjs +1 -1
- package/dist/model-graph/index.d.cts +4 -2
- package/dist/model-graph/index.d.mts +4 -2
- package/dist/model-graph/index.d.ts +4 -2
- package/dist/model-graph/index.mjs +1 -1
- package/dist/shared/language-server.7iILaJYc.d.ts +1338 -0
- package/dist/shared/{language-server.B8s2wfT_.cjs → language-server.Bd3NZ8uH.cjs} +123 -72
- package/dist/shared/{language-server.BT4WTbFI.mjs → language-server.C5gxpVUH.mjs} +125 -74
- package/dist/shared/language-server.CmBZHwSl.d.cts +1338 -0
- package/dist/shared/{language-server.U2piOAVt.d.cts → language-server.CnkCWVtf.d.cts} +44 -10
- package/dist/shared/{language-server.DfMwkd2l.d.mts → language-server.DIaiY0-C.d.mts} +44 -10
- package/dist/shared/language-server.DViE1Zxi.d.mts +1338 -0
- package/dist/shared/{language-server.BuChFlda.mjs → language-server.D_13fWJQ.mjs} +177 -84
- package/dist/shared/{language-server.j-ShR6as.d.ts → language-server.DwyQ1FtY.d.ts} +44 -10
- package/dist/shared/{language-server.DfjkvknB.cjs → language-server.Dym6GL4P.cjs} +175 -82
- package/package.json +7 -7
- package/src/ast.ts +11 -3
- package/src/generated/ast.ts +111 -10
- package/src/generated/grammar.ts +1 -1
- package/src/like-c4.langium +19 -0
- package/src/model/model-builder.ts +25 -30
- package/src/model/model-parser.ts +91 -18
- package/src/model-graph/LikeC4ModelGraph.ts +22 -11
- package/src/model-graph/compute-view/__test__/fixture.ts +63 -19
- package/src/model-graph/compute-view/compute.ts +77 -72
- package/src/model-graph/dynamic-view/compute.ts +4 -1
- package/src/model-graph/utils/applyViewRuleStyles.ts +0 -4
- package/src/references/scope-computation.ts +10 -0
- package/src/validation/index.ts +3 -0
- package/src/validation/specification.ts +21 -0
- package/src/view-utils/index.ts +0 -1
- package/src/view-utils/resolve-global-rules.ts +66 -50
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@likec4/language-server",
|
|
3
3
|
"description": "LikeC4 Language Server",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.16.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
114
|
"@dagrejs/dagre": "^1.1.4",
|
|
115
|
-
"@likec4/core": "1.
|
|
116
|
-
"@likec4/log": "1.
|
|
115
|
+
"@likec4/core": "1.16.0",
|
|
116
|
+
"@likec4/log": "1.16.0",
|
|
117
117
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
118
118
|
"@smithy/util-base64": "^3.0.0",
|
|
119
119
|
"fast-equals": "^5.0.1",
|
|
@@ -133,12 +133,12 @@
|
|
|
133
133
|
"vscode-uri": "3.0.8"
|
|
134
134
|
},
|
|
135
135
|
"devDependencies": {
|
|
136
|
-
"@likec4/icons": "1.
|
|
137
|
-
"@likec4/tsconfig": "1.
|
|
136
|
+
"@likec4/icons": "1.16.0",
|
|
137
|
+
"@likec4/tsconfig": "1.16.0",
|
|
138
138
|
"@types/node": "^20.16.14",
|
|
139
139
|
"@types/object-hash": "^3.0.6",
|
|
140
140
|
"@types/string-hash": "^1.1.3",
|
|
141
|
-
"@vitest/coverage-v8": "^2.1.
|
|
141
|
+
"@vitest/coverage-v8": "^2.1.4",
|
|
142
142
|
"execa": "^9.3.1",
|
|
143
143
|
"langium-cli": "3.2.0",
|
|
144
144
|
"npm-run-all2": "^6.2.6",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"turbo": "^2.2.3",
|
|
147
147
|
"typescript": "^5.6.3",
|
|
148
148
|
"unbuild": "^3.0.0-rc.11",
|
|
149
|
-
"vitest": "^2.1.
|
|
149
|
+
"vitest": "^2.1.4"
|
|
150
150
|
},
|
|
151
151
|
"packageManager": "yarn@4.5.1"
|
|
152
152
|
}
|
package/src/ast.ts
CHANGED
|
@@ -93,9 +93,13 @@ export interface ParsedAstRelation {
|
|
|
93
93
|
metadata?: { [key: string]: string }
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export interface ParsedAstGlobals {
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
// export interface ParsedAstGlobals {
|
|
97
|
+
// predicates: Record<c4.GlobalElRelID, c4.NonEmptyArray<c4.ViewRulePredicate>>
|
|
98
|
+
// dynamicPredicates: Record<c4.GlobalElRelID, c4.NonEmptyArray<c4.DynamicViewIncludeRule>>
|
|
99
|
+
// styles: Record<c4.GlobalStyleID, c4.NonEmptyArray<c4.ViewRuleStyle>>
|
|
100
|
+
// }
|
|
101
|
+
// Alias for refactoring
|
|
102
|
+
export type ParsedAstGlobals = c4.ModelGlobals
|
|
99
103
|
|
|
100
104
|
export interface ParsedAstElementView {
|
|
101
105
|
__: 'element'
|
|
@@ -196,6 +200,8 @@ export function cleanParsedModel(doc: LikeC4LangiumDocument) {
|
|
|
196
200
|
c4Elements: [],
|
|
197
201
|
c4Relations: [],
|
|
198
202
|
c4Globals: {
|
|
203
|
+
predicates: {},
|
|
204
|
+
dynamicPredicates: {},
|
|
199
205
|
styles: {}
|
|
200
206
|
},
|
|
201
207
|
c4Views: []
|
|
@@ -235,6 +241,8 @@ function validatableAstNodeGuards<const Predicates extends Guard<AstNode>[]>(
|
|
|
235
241
|
}
|
|
236
242
|
const isValidatableAstNode = validatableAstNodeGuards([
|
|
237
243
|
ast.isGlobals,
|
|
244
|
+
ast.isGlobalPredicateGroup,
|
|
245
|
+
ast.isGlobalDynamicPredicateGroup,
|
|
238
246
|
ast.isGlobalStyle,
|
|
239
247
|
ast.isGlobalStyleGroup,
|
|
240
248
|
ast.isDynamicViewPredicateIterator,
|
package/src/generated/ast.ts
CHANGED
|
@@ -62,6 +62,7 @@ export type LikeC4KeywordNames =
|
|
|
62
62
|
| "dot"
|
|
63
63
|
| "dotted"
|
|
64
64
|
| "dynamic"
|
|
65
|
+
| "dynamicPredicateGroup"
|
|
65
66
|
| "element"
|
|
66
67
|
| "element.kind"
|
|
67
68
|
| "element.tag"
|
|
@@ -102,6 +103,8 @@ export type LikeC4KeywordNames =
|
|
|
102
103
|
| "par"
|
|
103
104
|
| "parallel"
|
|
104
105
|
| "person"
|
|
106
|
+
| "predicate"
|
|
107
|
+
| "predicateGroup"
|
|
105
108
|
| "primary"
|
|
106
109
|
| "queue"
|
|
107
110
|
| "rectangle"
|
|
@@ -160,7 +163,7 @@ export function isDotId(item: unknown): item is DotId {
|
|
|
160
163
|
return typeof item === 'string';
|
|
161
164
|
}
|
|
162
165
|
|
|
163
|
-
export type DynamicViewRule = DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
|
|
166
|
+
export type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
|
|
164
167
|
|
|
165
168
|
export const DynamicViewRule = 'DynamicViewRule';
|
|
166
169
|
|
|
@@ -336,7 +339,7 @@ export function isViewProperty(item: unknown): item is ViewProperty {
|
|
|
336
339
|
return reflection.isInstance(item, ViewProperty);
|
|
337
340
|
}
|
|
338
341
|
|
|
339
|
-
export type ViewRule = ViewRuleAutoLayout | ViewRuleGroup | ViewRulePredicate | ViewRuleStyleOrGlobalRef;
|
|
342
|
+
export type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleStyleOrGlobalRef;
|
|
340
343
|
|
|
341
344
|
export const ViewRule = 'ViewRule';
|
|
342
345
|
|
|
@@ -533,8 +536,20 @@ export function isDynamicViewBody(item: unknown): item is DynamicViewBody {
|
|
|
533
536
|
return reflection.isInstance(item, DynamicViewBody);
|
|
534
537
|
}
|
|
535
538
|
|
|
536
|
-
export interface
|
|
539
|
+
export interface DynamicViewGlobalPredicateRef extends AstNode {
|
|
537
540
|
readonly $container: DynamicViewBody;
|
|
541
|
+
readonly $type: 'DynamicViewGlobalPredicateRef';
|
|
542
|
+
predicate: Reference<GlobalDynamicPredicateGroup>;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export const DynamicViewGlobalPredicateRef = 'DynamicViewGlobalPredicateRef';
|
|
546
|
+
|
|
547
|
+
export function isDynamicViewGlobalPredicateRef(item: unknown): item is DynamicViewGlobalPredicateRef {
|
|
548
|
+
return reflection.isInstance(item, DynamicViewGlobalPredicateRef);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
export interface DynamicViewIncludePredicate extends AstNode {
|
|
552
|
+
readonly $container: DynamicViewBody | GlobalDynamicPredicateGroup;
|
|
538
553
|
readonly $type: 'DynamicViewIncludePredicate';
|
|
539
554
|
predicates: DynamicViewPredicateIterator;
|
|
540
555
|
}
|
|
@@ -798,7 +813,7 @@ export function isElementViewRef(item: unknown): item is ElementViewRef {
|
|
|
798
813
|
}
|
|
799
814
|
|
|
800
815
|
export interface ExcludePredicate extends AstNode {
|
|
801
|
-
readonly $container: ElementViewBody | ViewRuleGroup;
|
|
816
|
+
readonly $container: ElementViewBody | GlobalPredicateGroup | ViewRuleGroup;
|
|
802
817
|
readonly $type: 'ExcludePredicate';
|
|
803
818
|
predicates: Predicates;
|
|
804
819
|
}
|
|
@@ -859,10 +874,37 @@ export function isFqnElementRef(item: unknown): item is FqnElementRef {
|
|
|
859
874
|
return reflection.isInstance(item, FqnElementRef);
|
|
860
875
|
}
|
|
861
876
|
|
|
877
|
+
export interface GlobalDynamicPredicateGroup extends AstNode {
|
|
878
|
+
readonly $container: Globals;
|
|
879
|
+
readonly $type: 'GlobalDynamicPredicateGroup';
|
|
880
|
+
name: string;
|
|
881
|
+
predicates: Array<DynamicViewIncludePredicate>;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export const GlobalDynamicPredicateGroup = 'GlobalDynamicPredicateGroup';
|
|
885
|
+
|
|
886
|
+
export function isGlobalDynamicPredicateGroup(item: unknown): item is GlobalDynamicPredicateGroup {
|
|
887
|
+
return reflection.isInstance(item, GlobalDynamicPredicateGroup);
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
export interface GlobalPredicateGroup extends AstNode {
|
|
891
|
+
readonly $container: Globals;
|
|
892
|
+
readonly $type: 'GlobalPredicateGroup';
|
|
893
|
+
name: string;
|
|
894
|
+
predicates: Array<ViewRulePredicate>;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export const GlobalPredicateGroup = 'GlobalPredicateGroup';
|
|
898
|
+
|
|
899
|
+
export function isGlobalPredicateGroup(item: unknown): item is GlobalPredicateGroup {
|
|
900
|
+
return reflection.isInstance(item, GlobalPredicateGroup);
|
|
901
|
+
}
|
|
902
|
+
|
|
862
903
|
export interface Globals extends AstNode {
|
|
863
904
|
readonly $container: LikeC4Grammar;
|
|
864
905
|
readonly $type: 'Globals';
|
|
865
906
|
name: 'global';
|
|
907
|
+
predicates: Array<GlobalDynamicPredicateGroup | GlobalPredicateGroup>;
|
|
866
908
|
styles: Array<GlobalStyle | GlobalStyleGroup>;
|
|
867
909
|
}
|
|
868
910
|
|
|
@@ -926,7 +968,7 @@ export function isIconProperty(item: unknown): item is IconProperty {
|
|
|
926
968
|
}
|
|
927
969
|
|
|
928
970
|
export interface IncludePredicate extends AstNode {
|
|
929
|
-
readonly $container: ElementViewBody | ViewRuleGroup;
|
|
971
|
+
readonly $container: ElementViewBody | GlobalPredicateGroup | ViewRuleGroup;
|
|
930
972
|
readonly $type: 'IncludePredicate';
|
|
931
973
|
predicates: Predicates;
|
|
932
974
|
}
|
|
@@ -1423,6 +1465,18 @@ export function isViewRuleAutoLayout(item: unknown): item is ViewRuleAutoLayout
|
|
|
1423
1465
|
return reflection.isInstance(item, ViewRuleAutoLayout);
|
|
1424
1466
|
}
|
|
1425
1467
|
|
|
1468
|
+
export interface ViewRuleGlobalPredicateRef extends AstNode {
|
|
1469
|
+
readonly $container: ElementViewBody;
|
|
1470
|
+
readonly $type: 'ViewRuleGlobalPredicateRef';
|
|
1471
|
+
predicate: Reference<GlobalPredicateGroup>;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
export const ViewRuleGlobalPredicateRef = 'ViewRuleGlobalPredicateRef';
|
|
1475
|
+
|
|
1476
|
+
export function isViewRuleGlobalPredicateRef(item: unknown): item is ViewRuleGlobalPredicateRef {
|
|
1477
|
+
return reflection.isInstance(item, ViewRuleGlobalPredicateRef);
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1426
1480
|
export interface ViewRuleGlobalStyle extends AstNode {
|
|
1427
1481
|
readonly $container: DynamicViewBody | ElementViewBody | ModelViews;
|
|
1428
1482
|
readonly $type: 'ViewRuleGlobalStyle';
|
|
@@ -1591,6 +1645,7 @@ export type LikeC4AstType = {
|
|
|
1591
1645
|
DirectedRelationExpression: DirectedRelationExpression
|
|
1592
1646
|
DynamicView: DynamicView
|
|
1593
1647
|
DynamicViewBody: DynamicViewBody
|
|
1648
|
+
DynamicViewGlobalPredicateRef: DynamicViewGlobalPredicateRef
|
|
1594
1649
|
DynamicViewIncludePredicate: DynamicViewIncludePredicate
|
|
1595
1650
|
DynamicViewParallelSteps: DynamicViewParallelSteps
|
|
1596
1651
|
DynamicViewPredicateIterator: DynamicViewPredicateIterator
|
|
@@ -1621,6 +1676,8 @@ export type LikeC4AstType = {
|
|
|
1621
1676
|
ExtendElement: ExtendElement
|
|
1622
1677
|
ExtendElementBody: ExtendElementBody
|
|
1623
1678
|
FqnElementRef: FqnElementRef
|
|
1679
|
+
GlobalDynamicPredicateGroup: GlobalDynamicPredicateGroup
|
|
1680
|
+
GlobalPredicateGroup: GlobalPredicateGroup
|
|
1624
1681
|
GlobalStyle: GlobalStyle
|
|
1625
1682
|
GlobalStyleGroup: GlobalStyleGroup
|
|
1626
1683
|
GlobalStyleId: GlobalStyleId
|
|
@@ -1676,6 +1733,7 @@ export type LikeC4AstType = {
|
|
|
1676
1733
|
ViewRef: ViewRef
|
|
1677
1734
|
ViewRule: ViewRule
|
|
1678
1735
|
ViewRuleAutoLayout: ViewRuleAutoLayout
|
|
1736
|
+
ViewRuleGlobalPredicateRef: ViewRuleGlobalPredicateRef
|
|
1679
1737
|
ViewRuleGlobalStyle: ViewRuleGlobalStyle
|
|
1680
1738
|
ViewRuleGroup: ViewRuleGroup
|
|
1681
1739
|
ViewRulePredicate: ViewRulePredicate
|
|
@@ -1702,7 +1760,7 @@ export type LikeC4AstType = {
|
|
|
1702
1760
|
export class LikeC4AstReflection extends AbstractAstReflection {
|
|
1703
1761
|
|
|
1704
1762
|
getAllTypes(): string[] {
|
|
1705
|
-
return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, DirectedRelationExpression, DynamicView, DynamicViewBody, 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, ExtendElement, ExtendElementBody, FqnElementRef, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, IconProperty, InOutRelationExpression, IncludePredicate, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelViews, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpression, Predicate, Predicates, Relation, RelationBody, RelationExpression, RelationNavigateToProperty, RelationPredicate, RelationPredicateOrWhere, RelationPredicateWhere, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationColor, SpecificationElementKind, SpecificationElementStringProperty, SpecificationRelationshipKind, SpecificationRelationshipStringProperty, SpecificationRule, SpecificationTag, StringProperty, StyleProperty, Tag, Tags, ViewProperty, ViewRef, ViewRule, ViewRuleAutoLayout, ViewRuleGlobalStyle, ViewRuleGroup, ViewRulePredicate, ViewRuleStyle, ViewRuleStyleOrGlobalRef, ViewStringProperty, WhereBinaryExpression, WhereElement, WhereElementExpression, WhereElementKind, WhereElementNegation, WhereElementTag, WhereExpression, WhereKindEqual, WhereRelation, WhereRelationExpression, WhereRelationKind, WhereRelationNegation, WhereRelationTag, WhereTagEqual, WildcardExpression];
|
|
1763
|
+
return [ArrowProperty, BorderProperty, ColorProperty, CustomColor, CustomElementProperties, CustomRelationProperties, 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, ExtendElement, ExtendElementBody, FqnElementRef, GlobalDynamicPredicateGroup, GlobalPredicateGroup, GlobalStyle, GlobalStyleGroup, GlobalStyleId, Globals, IconProperty, InOutRelationExpression, IncludePredicate, IncomingRelationExpression, LibIcon, LikeC4Grammar, LikeC4Lib, LikeC4View, LineProperty, LinkProperty, MetadataAttribute, MetadataBody, MetadataProperty, Model, ModelViews, NavigateToProperty, NotationProperty, NotesProperty, OpacityProperty, OutgoingRelationExpression, Predicate, Predicates, Relation, RelationBody, RelationExpression, RelationNavigateToProperty, RelationPredicate, RelationPredicateOrWhere, RelationPredicateWhere, RelationPredicateWith, RelationProperty, RelationStringProperty, RelationStyleProperty, RelationshipKind, RelationshipStyleProperty, ShapeProperty, SpecificationColor, 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];
|
|
1706
1764
|
}
|
|
1707
1765
|
|
|
1708
1766
|
protected override computeIsSubtype(subtype: string, supertype: string): boolean {
|
|
@@ -1729,6 +1787,7 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1729
1787
|
case ElementView: {
|
|
1730
1788
|
return this.isSubtype(LikeC4View, supertype);
|
|
1731
1789
|
}
|
|
1790
|
+
case DynamicViewGlobalPredicateRef:
|
|
1732
1791
|
case DynamicViewIncludePredicate: {
|
|
1733
1792
|
return this.isSubtype(DynamicViewRule, supertype);
|
|
1734
1793
|
}
|
|
@@ -1800,14 +1859,15 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1800
1859
|
case ViewRuleStyleOrGlobalRef: {
|
|
1801
1860
|
return this.isSubtype(DynamicViewRule, supertype) || this.isSubtype(ViewRule, supertype);
|
|
1802
1861
|
}
|
|
1803
|
-
case
|
|
1804
|
-
case ViewRuleStyle: {
|
|
1805
|
-
return this.isSubtype(ViewRuleStyleOrGlobalRef, supertype);
|
|
1806
|
-
}
|
|
1862
|
+
case ViewRuleGlobalPredicateRef:
|
|
1807
1863
|
case ViewRuleGroup:
|
|
1808
1864
|
case ViewRulePredicate: {
|
|
1809
1865
|
return this.isSubtype(ViewRule, supertype);
|
|
1810
1866
|
}
|
|
1867
|
+
case ViewRuleGlobalStyle:
|
|
1868
|
+
case ViewRuleStyle: {
|
|
1869
|
+
return this.isSubtype(ViewRuleStyleOrGlobalRef, supertype);
|
|
1870
|
+
}
|
|
1811
1871
|
case ViewStringProperty: {
|
|
1812
1872
|
return this.isSubtype(StringProperty, supertype) || this.isSubtype(ViewProperty, supertype);
|
|
1813
1873
|
}
|
|
@@ -1850,6 +1910,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1850
1910
|
case 'ColorProperty:customColor': {
|
|
1851
1911
|
return CustomColor;
|
|
1852
1912
|
}
|
|
1913
|
+
case 'DynamicViewGlobalPredicateRef:predicate': {
|
|
1914
|
+
return GlobalDynamicPredicateGroup;
|
|
1915
|
+
}
|
|
1853
1916
|
case 'DynamicViewRef:view': {
|
|
1854
1917
|
return DynamicView;
|
|
1855
1918
|
}
|
|
@@ -1883,6 +1946,9 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1883
1946
|
case 'ViewRef:view': {
|
|
1884
1947
|
return LikeC4View;
|
|
1885
1948
|
}
|
|
1949
|
+
case 'ViewRuleGlobalPredicateRef:predicate': {
|
|
1950
|
+
return GlobalPredicateGroup;
|
|
1951
|
+
}
|
|
1886
1952
|
case 'ViewRuleGlobalStyle:style': {
|
|
1887
1953
|
return GlobalStyleId;
|
|
1888
1954
|
}
|
|
@@ -1975,6 +2041,14 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
1975
2041
|
]
|
|
1976
2042
|
};
|
|
1977
2043
|
}
|
|
2044
|
+
case DynamicViewGlobalPredicateRef: {
|
|
2045
|
+
return {
|
|
2046
|
+
name: DynamicViewGlobalPredicateRef,
|
|
2047
|
+
properties: [
|
|
2048
|
+
{ name: 'predicate' }
|
|
2049
|
+
]
|
|
2050
|
+
};
|
|
2051
|
+
}
|
|
1978
2052
|
case DynamicViewIncludePredicate: {
|
|
1979
2053
|
return {
|
|
1980
2054
|
name: DynamicViewIncludePredicate,
|
|
@@ -2201,11 +2275,30 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
2201
2275
|
]
|
|
2202
2276
|
};
|
|
2203
2277
|
}
|
|
2278
|
+
case GlobalDynamicPredicateGroup: {
|
|
2279
|
+
return {
|
|
2280
|
+
name: GlobalDynamicPredicateGroup,
|
|
2281
|
+
properties: [
|
|
2282
|
+
{ name: 'name' },
|
|
2283
|
+
{ name: 'predicates', defaultValue: [] }
|
|
2284
|
+
]
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
case GlobalPredicateGroup: {
|
|
2288
|
+
return {
|
|
2289
|
+
name: GlobalPredicateGroup,
|
|
2290
|
+
properties: [
|
|
2291
|
+
{ name: 'name' },
|
|
2292
|
+
{ name: 'predicates', defaultValue: [] }
|
|
2293
|
+
]
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
2204
2296
|
case Globals: {
|
|
2205
2297
|
return {
|
|
2206
2298
|
name: Globals,
|
|
2207
2299
|
properties: [
|
|
2208
2300
|
{ name: 'name' },
|
|
2301
|
+
{ name: 'predicates', defaultValue: [] },
|
|
2209
2302
|
{ name: 'styles', defaultValue: [] }
|
|
2210
2303
|
]
|
|
2211
2304
|
};
|
|
@@ -2594,6 +2687,14 @@ export class LikeC4AstReflection extends AbstractAstReflection {
|
|
|
2594
2687
|
]
|
|
2595
2688
|
};
|
|
2596
2689
|
}
|
|
2690
|
+
case ViewRuleGlobalPredicateRef: {
|
|
2691
|
+
return {
|
|
2692
|
+
name: ViewRuleGlobalPredicateRef,
|
|
2693
|
+
properties: [
|
|
2694
|
+
{ name: 'predicate' }
|
|
2695
|
+
]
|
|
2696
|
+
};
|
|
2697
|
+
}
|
|
2597
2698
|
case ViewRuleGlobalStyle: {
|
|
2598
2699
|
return {
|
|
2599
2700
|
name: ViewRuleGlobalStyle,
|