@likec4/language-server 0.6.1 → 0.6.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 (101) hide show
  1. package/package.json +5 -5
  2. package/contrib/likec4.monarch.ts +0 -31
  3. package/contrib/likec4.tmLanguage.json +0 -73
  4. package/dist/__test__/parser-smoke/01-Specification.d.ts +0 -3
  5. package/dist/__test__/parser-smoke/01-Specification.js +0 -42
  6. package/dist/__test__/parser-smoke/02-Model.d.ts +0 -9
  7. package/dist/__test__/parser-smoke/02-Model.js +0 -110
  8. package/dist/__test__/parser-smoke/03-ModelRelation.d.ts +0 -6
  9. package/dist/__test__/parser-smoke/03-ModelRelation.js +0 -81
  10. package/dist/__test__/parser-smoke/04-Scope.d.ts +0 -2
  11. package/dist/__test__/parser-smoke/04-Scope.js +0 -38
  12. package/dist/__test__/parser-smoke/05-StrictElementRef.d.ts +0 -3
  13. package/dist/__test__/parser-smoke/05-StrictElementRef.js +0 -46
  14. package/dist/__test__/parser-smoke/06-ElementRef.d.ts +0 -2
  15. package/dist/__test__/parser-smoke/06-ElementRef.js +0 -59
  16. package/dist/__test__/parser-smoke/07-Views.d.ts +0 -10
  17. package/dist/__test__/parser-smoke/07-Views.js +0 -146
  18. package/dist/__test__/parser-smoke/08-Structurizr.d.ts +0 -1
  19. package/dist/__test__/parser-smoke/08-Structurizr.js +0 -22
  20. package/dist/__test__/parser-smoke/index.d.ts +0 -8
  21. package/dist/__test__/parser-smoke/index.js +0 -8
  22. package/dist/__test__/parser-smoke-extendsElement.spec.d.ts +0 -1
  23. package/dist/__test__/parser-smoke-extendsElement.spec.js +0 -36
  24. package/dist/__test__/parser-smoke.spec.d.ts +0 -1
  25. package/dist/__test__/parser-smoke.spec.js +0 -28
  26. package/dist/ast.d.ts +0 -73
  27. package/dist/ast.js +0 -133
  28. package/dist/builtin.d.ts +0 -4
  29. package/dist/builtin.js +0 -8
  30. package/dist/elementRef.d.ts +0 -6
  31. package/dist/elementRef.js +0 -39
  32. package/dist/generated/ast.d.ts +0 -359
  33. package/dist/generated/ast.js +0 -376
  34. package/dist/generated/grammar.d.ts +0 -6
  35. package/dist/generated/grammar.js +0 -2542
  36. package/dist/generated/module.d.ts +0 -9
  37. package/dist/generated/module.js +0 -26
  38. package/dist/index.d.ts +0 -3
  39. package/dist/index.js +0 -14
  40. package/dist/logger.d.ts +0 -8
  41. package/dist/logger.js +0 -20
  42. package/dist/lsp/DocumentSymbolProvider.d.ts +0 -21
  43. package/dist/lsp/DocumentSymbolProvider.js +0 -149
  44. package/dist/lsp/HoverProvider.d.ts +0 -8
  45. package/dist/lsp/HoverProvider.js +0 -54
  46. package/dist/lsp/SemanticTokenProvider.d.ts +0 -6
  47. package/dist/lsp/SemanticTokenProvider.js +0 -221
  48. package/dist/lsp/index.d.ts +0 -3
  49. package/dist/lsp/index.js +0 -3
  50. package/dist/model/fqn-index.d.ts +0 -17
  51. package/dist/model/fqn-index.js +0 -138
  52. package/dist/model/index.d.ts +0 -3
  53. package/dist/model/index.js +0 -3
  54. package/dist/model/model-builder.d.ts +0 -26
  55. package/dist/model/model-builder.js +0 -332
  56. package/dist/model/model-builder.spec.d.ts +0 -1
  57. package/dist/model/model-builder.spec.js +0 -141
  58. package/dist/model/model-locator.d.ts +0 -16
  59. package/dist/model/model-locator.js +0 -108
  60. package/dist/module.d.ts +0 -18
  61. package/dist/module.js +0 -61
  62. package/dist/protocol.d.ts +0 -39
  63. package/dist/protocol.js +0 -19
  64. package/dist/references/index.d.ts +0 -2
  65. package/dist/references/index.js +0 -2
  66. package/dist/references/scope-computation.d.ts +0 -10
  67. package/dist/references/scope-computation.js +0 -76
  68. package/dist/references/scope-provider.d.ts +0 -15
  69. package/dist/references/scope-provider.js +0 -110
  70. package/dist/registerProtocolHandlers.d.ts +0 -2
  71. package/dist/registerProtocolHandlers.js +0 -64
  72. package/dist/shared/CodeLensProvider.d.ts +0 -8
  73. package/dist/shared/CodeLensProvider.js +0 -35
  74. package/dist/shared/WorkspaceManager.d.ts +0 -13
  75. package/dist/shared/WorkspaceManager.js +0 -19
  76. package/dist/shared/index.d.ts +0 -2
  77. package/dist/shared/index.js +0 -2
  78. package/dist/test/index.d.ts +0 -1
  79. package/dist/test/index.js +0 -1
  80. package/dist/test/testServices.d.ts +0 -15
  81. package/dist/test/testServices.js +0 -57
  82. package/dist/utils.d.ts +0 -2
  83. package/dist/utils.js +0 -7
  84. package/dist/validation/element.d.ts +0 -5
  85. package/dist/validation/element.js +0 -20
  86. package/dist/validation/element.spec.d.ts +0 -1
  87. package/dist/validation/element.spec.js +0 -65
  88. package/dist/validation/index.d.ts +0 -2
  89. package/dist/validation/index.js +0 -22
  90. package/dist/validation/relation.d.ts +0 -4
  91. package/dist/validation/relation.js +0 -53
  92. package/dist/validation/relation.spec.d.ts +0 -1
  93. package/dist/validation/relation.spec.js +0 -93
  94. package/dist/validation/specification.d.ts +0 -5
  95. package/dist/validation/specification.js +0 -33
  96. package/dist/validation/specification.spec.d.ts +0 -1
  97. package/dist/validation/specification.spec.js +0 -31
  98. package/dist/validation/view.d.ts +0 -4
  99. package/dist/validation/view.js +0 -20
  100. package/dist/validation/view.spec.d.ts +0 -1
  101. package/dist/validation/view.spec.js +0 -20
@@ -1,359 +0,0 @@
1
- /******************************************************************************
2
- * This file was generated by langium-cli 1.1.0.
3
- * DO NOT EDIT MANUALLY!
4
- ******************************************************************************/
5
- import { AstNode, AbstractAstReflection, Reference, ReferenceInfo, TypeMetaData } from 'langium';
6
- export type AnyStringProperty = ElementStringProperty | RelationStringProperty | ViewProperty;
7
- export declare const AnyStringProperty = "AnyStringProperty";
8
- export declare function isAnyStringProperty(item: unknown): item is AnyStringProperty;
9
- export type AStyleProperty = ColorProperty | ShapeProperty;
10
- export declare const AStyleProperty = "AStyleProperty";
11
- export declare function isAStyleProperty(item: unknown): item is AStyleProperty;
12
- export type ElementExpression = ElementRefExpression | WildcardExpression;
13
- export declare const ElementExpression = "ElementExpression";
14
- export declare function isElementExpression(item: unknown): item is ElementExpression;
15
- export type ElementProperty = ElementStringProperty | ElementStyleProperty;
16
- export declare const ElementProperty = "ElementProperty";
17
- export declare function isElementProperty(item: unknown): item is ElementProperty;
18
- export type ElementShape = 'browser' | 'cylinder' | 'person' | 'queue' | 'rectangle' | 'storage';
19
- export type Expression = ElementExpression | InOutExpression | IncomingExpression | OutgoingExpression | RelationExpression;
20
- export declare const Expression = "Expression";
21
- export declare function isExpression(item: unknown): item is Expression;
22
- export type Name = 'element' | 'model' | ElementShape | ThemeColor | string;
23
- export type ThemeColor = 'muted' | 'primary' | 'secondary';
24
- export type View = ElementView;
25
- export declare const View = "View";
26
- export declare function isView(item: unknown): item is View;
27
- export type ViewRule = ViewRuleAutoLayout | ViewRuleExpression | ViewRuleStyle;
28
- export declare const ViewRule = "ViewRule";
29
- export declare function isViewRule(item: unknown): item is ViewRule;
30
- export type ViewRuleLayoutDirection = 'BottomTop' | 'LeftRight' | 'RightLeft' | 'TopBottom';
31
- export interface ColorProperty extends AstNode {
32
- readonly $container: ElementStyleProperty | SpecificationElementKindStyle | ViewRuleStyle;
33
- readonly $type: 'ColorProperty';
34
- key: 'color';
35
- value: ThemeColor;
36
- }
37
- export declare const ColorProperty = "ColorProperty";
38
- export declare function isColorProperty(item: unknown): item is ColorProperty;
39
- export interface Element extends AstNode {
40
- readonly $container: ElementBody | ExtendElementBody | Model;
41
- readonly $type: 'Element';
42
- body?: ElementBody;
43
- kind: Reference<ElementKind>;
44
- name: Name;
45
- props: Array<string>;
46
- }
47
- export declare const Element = "Element";
48
- export declare function isElement(item: unknown): item is Element;
49
- export interface ElementBody extends AstNode {
50
- readonly $container: Element;
51
- readonly $type: 'ElementBody';
52
- elements: Array<Element | Relation>;
53
- props: Array<ElementProperty>;
54
- tags?: Tags;
55
- }
56
- export declare const ElementBody = "ElementBody";
57
- export declare function isElementBody(item: unknown): item is ElementBody;
58
- export interface ElementKind extends AstNode {
59
- readonly $container: SpecificationElementKind;
60
- readonly $type: 'ElementKind';
61
- name: Name;
62
- }
63
- export declare const ElementKind = "ElementKind";
64
- export declare function isElementKind(item: unknown): item is ElementKind;
65
- export interface ElementRef extends AstNode {
66
- readonly $container: ElementRef | ElementRefExpression | ElementView | Relation | RelationWithSource;
67
- readonly $type: 'ElementRef';
68
- el: Reference<Element>;
69
- next?: ElementRef;
70
- }
71
- export declare const ElementRef = "ElementRef";
72
- export declare function isElementRef(item: unknown): item is ElementRef;
73
- export interface ElementRefExpression extends AstNode {
74
- readonly $container: InOutExpression | IncomingExpression | OutgoingExpression | RelationExpression | ViewRuleExpression | ViewRuleStyle;
75
- readonly $type: 'ElementRefExpression';
76
- id: ElementRef;
77
- isDescedants: boolean;
78
- }
79
- export declare const ElementRefExpression = "ElementRefExpression";
80
- export declare function isElementRefExpression(item: unknown): item is ElementRefExpression;
81
- export interface ElementStringProperty extends AstNode {
82
- readonly $container: ElementBody | ElementView | RelationBody;
83
- readonly $type: 'ElementStringProperty';
84
- key: 'description' | 'technology' | 'title';
85
- value: string;
86
- }
87
- export declare const ElementStringProperty = "ElementStringProperty";
88
- export declare function isElementStringProperty(item: unknown): item is ElementStringProperty;
89
- export interface ElementStyleProperty extends AstNode {
90
- readonly $container: ElementBody | ElementView | RelationBody;
91
- readonly $type: 'ElementStyleProperty';
92
- key: 'style';
93
- props: Array<ColorProperty | ShapeProperty>;
94
- }
95
- export declare const ElementStyleProperty = "ElementStyleProperty";
96
- export declare function isElementStyleProperty(item: unknown): item is ElementStyleProperty;
97
- export interface ElementView extends AstNode {
98
- readonly $container: ModelViews;
99
- readonly $type: 'ElementView';
100
- name?: Name;
101
- properties: Array<ViewProperty>;
102
- rules: Array<ViewRuleAutoLayout | ViewRuleExpression | ViewRuleStyle>;
103
- viewOf?: ElementRef;
104
- }
105
- export declare const ElementView = "ElementView";
106
- export declare function isElementView(item: unknown): item is ElementView;
107
- export interface ExtendElement extends AstNode {
108
- readonly $container: Model;
109
- readonly $type: 'ExtendElement';
110
- body: ExtendElementBody;
111
- element: StrictElementRef;
112
- }
113
- export declare const ExtendElement = "ExtendElement";
114
- export declare function isExtendElement(item: unknown): item is ExtendElement;
115
- export interface ExtendElementBody extends AstNode {
116
- readonly $container: ExtendElement;
117
- readonly $type: 'ExtendElementBody';
118
- elements: Array<Element | RelationWithSource>;
119
- }
120
- export declare const ExtendElementBody = "ExtendElementBody";
121
- export declare function isExtendElementBody(item: unknown): item is ExtendElementBody;
122
- export interface IncomingExpression extends AstNode {
123
- readonly $container: InOutExpression | IncomingExpression | OutgoingExpression | RelationExpression | ViewRuleExpression | ViewRuleStyle;
124
- readonly $type: 'IncomingExpression';
125
- target: ElementExpression;
126
- }
127
- export declare const IncomingExpression = "IncomingExpression";
128
- export declare function isIncomingExpression(item: unknown): item is IncomingExpression;
129
- export interface InOutExpression extends AstNode {
130
- readonly $container: InOutExpression | IncomingExpression | OutgoingExpression | RelationExpression | ViewRuleExpression | ViewRuleStyle;
131
- readonly $type: 'InOutExpression';
132
- inout: IncomingExpression;
133
- }
134
- export declare const InOutExpression = "InOutExpression";
135
- export declare function isInOutExpression(item: unknown): item is InOutExpression;
136
- export interface LikeC4Document extends AstNode {
137
- readonly $type: 'LikeC4Document';
138
- model?: Model;
139
- specification?: SpecificationRule;
140
- views?: ModelViews;
141
- }
142
- export declare const LikeC4Document = "LikeC4Document";
143
- export declare function isLikeC4Document(item: unknown): item is LikeC4Document;
144
- export interface Model extends AstNode {
145
- readonly $container: LikeC4Document;
146
- readonly $type: 'Model';
147
- elements: Array<Element | ExtendElement | RelationWithSource>;
148
- name: 'model';
149
- }
150
- export declare const Model = "Model";
151
- export declare function isModel(item: unknown): item is Model;
152
- export interface ModelViews extends AstNode {
153
- readonly $container: LikeC4Document;
154
- readonly $type: 'ModelViews';
155
- name: 'views';
156
- views: Array<View>;
157
- }
158
- export declare const ModelViews = "ModelViews";
159
- export declare function isModelViews(item: unknown): item is ModelViews;
160
- export interface OutgoingExpression extends AstNode {
161
- readonly $container: InOutExpression | IncomingExpression | OutgoingExpression | RelationExpression | ViewRuleExpression | ViewRuleStyle;
162
- readonly $type: 'OutgoingExpression';
163
- source: ElementExpression;
164
- }
165
- export declare const OutgoingExpression = "OutgoingExpression";
166
- export declare function isOutgoingExpression(item: unknown): item is OutgoingExpression;
167
- export interface Relation extends AstNode {
168
- readonly $container: ElementBody | ExtendElementBody | Model;
169
- readonly $type: 'Relation' | 'RelationWithSource';
170
- definition?: RelationBody;
171
- target: ElementRef;
172
- title?: string;
173
- }
174
- export declare const Relation = "Relation";
175
- export declare function isRelation(item: unknown): item is Relation;
176
- export interface RelationBody extends AstNode {
177
- readonly $container: Relation | RelationWithSource;
178
- readonly $type: 'RelationBody';
179
- props: Array<RelationStringProperty>;
180
- tags?: Tags;
181
- }
182
- export declare const RelationBody = "RelationBody";
183
- export declare function isRelationBody(item: unknown): item is RelationBody;
184
- export interface RelationExpression extends AstNode {
185
- readonly $container: InOutExpression | IncomingExpression | OutgoingExpression | RelationExpression | ViewRuleExpression | ViewRuleStyle;
186
- readonly $type: 'RelationExpression';
187
- source: ElementExpression;
188
- target: ElementExpression;
189
- }
190
- export declare const RelationExpression = "RelationExpression";
191
- export declare function isRelationExpression(item: unknown): item is RelationExpression;
192
- export interface RelationStringProperty extends AstNode {
193
- readonly $container: ElementBody | ElementView | RelationBody;
194
- readonly $type: 'RelationStringProperty';
195
- key: 'title';
196
- value: string;
197
- }
198
- export declare const RelationStringProperty = "RelationStringProperty";
199
- export declare function isRelationStringProperty(item: unknown): item is RelationStringProperty;
200
- export interface ShapeProperty extends AstNode {
201
- readonly $container: ElementStyleProperty | SpecificationElementKindStyle | ViewRuleStyle;
202
- readonly $type: 'ShapeProperty';
203
- key: 'shape';
204
- value: ElementShape;
205
- }
206
- export declare const ShapeProperty = "ShapeProperty";
207
- export declare function isShapeProperty(item: unknown): item is ShapeProperty;
208
- export interface SpecificationElementKind extends AstNode {
209
- readonly $container: SpecificationRule;
210
- readonly $type: 'SpecificationElementKind';
211
- kind: ElementKind;
212
- style?: SpecificationElementKindStyle;
213
- }
214
- export declare const SpecificationElementKind = "SpecificationElementKind";
215
- export declare function isSpecificationElementKind(item: unknown): item is SpecificationElementKind;
216
- export interface SpecificationElementKindStyle extends AstNode {
217
- readonly $container: SpecificationElementKind;
218
- readonly $type: 'SpecificationElementKindStyle';
219
- props: Array<ColorProperty | ShapeProperty>;
220
- }
221
- export declare const SpecificationElementKindStyle = "SpecificationElementKindStyle";
222
- export declare function isSpecificationElementKindStyle(item: unknown): item is SpecificationElementKindStyle;
223
- export interface SpecificationRule extends AstNode {
224
- readonly $container: LikeC4Document;
225
- readonly $type: 'SpecificationRule';
226
- elementKinds: Array<SpecificationElementKind>;
227
- name: 'specification';
228
- tags: Array<SpecificationTag>;
229
- }
230
- export declare const SpecificationRule = "SpecificationRule";
231
- export declare function isSpecificationRule(item: unknown): item is SpecificationRule;
232
- export interface SpecificationTag extends AstNode {
233
- readonly $container: SpecificationRule;
234
- readonly $type: 'SpecificationTag';
235
- tag: Tag;
236
- }
237
- export declare const SpecificationTag = "SpecificationTag";
238
- export declare function isSpecificationTag(item: unknown): item is SpecificationTag;
239
- export interface StrictElementRef extends AstNode {
240
- readonly $container: ExtendElement | StrictElementRef;
241
- readonly $type: 'StrictElementRef';
242
- el: Reference<Element>;
243
- next?: StrictElementRef;
244
- }
245
- export declare const StrictElementRef = "StrictElementRef";
246
- export declare function isStrictElementRef(item: unknown): item is StrictElementRef;
247
- export interface Tag extends AstNode {
248
- readonly $container: SpecificationTag;
249
- readonly $type: 'Tag';
250
- name: Name;
251
- }
252
- export declare const Tag = "Tag";
253
- export declare function isTag(item: unknown): item is Tag;
254
- export interface Tags extends AstNode {
255
- readonly $container: ElementBody | RelationBody;
256
- readonly $type: 'Tags';
257
- value: Array<Reference<Tag>>;
258
- }
259
- export declare const Tags = "Tags";
260
- export declare function isTags(item: unknown): item is Tags;
261
- export interface ViewProperty extends AstNode {
262
- readonly $container: ElementBody | ElementView | RelationBody;
263
- readonly $type: 'ViewProperty';
264
- key: 'description' | 'title';
265
- value: string;
266
- }
267
- export declare const ViewProperty = "ViewProperty";
268
- export declare function isViewProperty(item: unknown): item is ViewProperty;
269
- export interface ViewRuleAutoLayout extends AstNode {
270
- readonly $container: ElementView;
271
- readonly $type: 'ViewRuleAutoLayout';
272
- direction: ViewRuleLayoutDirection;
273
- }
274
- export declare const ViewRuleAutoLayout = "ViewRuleAutoLayout";
275
- export declare function isViewRuleAutoLayout(item: unknown): item is ViewRuleAutoLayout;
276
- export interface ViewRuleExpression extends AstNode {
277
- readonly $container: ElementView;
278
- readonly $type: 'ViewRuleExpression';
279
- expressions: Array<Expression>;
280
- isInclude: boolean;
281
- }
282
- export declare const ViewRuleExpression = "ViewRuleExpression";
283
- export declare function isViewRuleExpression(item: unknown): item is ViewRuleExpression;
284
- export interface ViewRuleStyle extends AstNode {
285
- readonly $container: ElementView;
286
- readonly $type: 'ViewRuleStyle';
287
- props: Array<ColorProperty | ShapeProperty>;
288
- targets: Array<ElementExpression>;
289
- }
290
- export declare const ViewRuleStyle = "ViewRuleStyle";
291
- export declare function isViewRuleStyle(item: unknown): item is ViewRuleStyle;
292
- export interface WildcardExpression extends AstNode {
293
- readonly $container: InOutExpression | IncomingExpression | OutgoingExpression | RelationExpression | ViewRuleExpression | ViewRuleStyle;
294
- readonly $type: 'WildcardExpression';
295
- isWildcard: boolean;
296
- }
297
- export declare const WildcardExpression = "WildcardExpression";
298
- export declare function isWildcardExpression(item: unknown): item is WildcardExpression;
299
- export interface RelationWithSource extends Relation {
300
- readonly $container: ElementBody | ExtendElementBody | Model;
301
- readonly $type: 'RelationWithSource';
302
- definition?: RelationBody;
303
- source: ElementRef;
304
- target: ElementRef;
305
- title?: string;
306
- }
307
- export declare const RelationWithSource = "RelationWithSource";
308
- export declare function isRelationWithSource(item: unknown): item is RelationWithSource;
309
- export interface LikeC4AstType {
310
- AStyleProperty: AStyleProperty;
311
- AnyStringProperty: AnyStringProperty;
312
- ColorProperty: ColorProperty;
313
- Element: Element;
314
- ElementBody: ElementBody;
315
- ElementExpression: ElementExpression;
316
- ElementKind: ElementKind;
317
- ElementProperty: ElementProperty;
318
- ElementRef: ElementRef;
319
- ElementRefExpression: ElementRefExpression;
320
- ElementStringProperty: ElementStringProperty;
321
- ElementStyleProperty: ElementStyleProperty;
322
- ElementView: ElementView;
323
- Expression: Expression;
324
- ExtendElement: ExtendElement;
325
- ExtendElementBody: ExtendElementBody;
326
- InOutExpression: InOutExpression;
327
- IncomingExpression: IncomingExpression;
328
- LikeC4Document: LikeC4Document;
329
- Model: Model;
330
- ModelViews: ModelViews;
331
- OutgoingExpression: OutgoingExpression;
332
- Relation: Relation;
333
- RelationBody: RelationBody;
334
- RelationExpression: RelationExpression;
335
- RelationStringProperty: RelationStringProperty;
336
- RelationWithSource: RelationWithSource;
337
- ShapeProperty: ShapeProperty;
338
- SpecificationElementKind: SpecificationElementKind;
339
- SpecificationElementKindStyle: SpecificationElementKindStyle;
340
- SpecificationRule: SpecificationRule;
341
- SpecificationTag: SpecificationTag;
342
- StrictElementRef: StrictElementRef;
343
- Tag: Tag;
344
- Tags: Tags;
345
- View: View;
346
- ViewProperty: ViewProperty;
347
- ViewRule: ViewRule;
348
- ViewRuleAutoLayout: ViewRuleAutoLayout;
349
- ViewRuleExpression: ViewRuleExpression;
350
- ViewRuleStyle: ViewRuleStyle;
351
- WildcardExpression: WildcardExpression;
352
- }
353
- export declare class LikeC4AstReflection extends AbstractAstReflection {
354
- getAllTypes(): string[];
355
- protected computeIsSubtype(subtype: string, supertype: string): boolean;
356
- getReferenceType(refInfo: ReferenceInfo): string;
357
- getTypeMetaData(type: string): TypeMetaData;
358
- }
359
- export declare const reflection: LikeC4AstReflection;