@likec4/language-server 1.48.0 → 1.50.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 (75) hide show
  1. package/browser/package.json +2 -2
  2. package/browser-worker/package.json +2 -2
  3. package/dist/THIRD-PARTY-LICENSES.md +178 -0
  4. package/dist/_chunks/ConfigurableLayouter.mjs +1 -1956
  5. package/dist/_chunks/LikeC4FileSystem.mjs +3 -0
  6. package/dist/_chunks/WithMCPServer.mjs +1154 -0
  7. package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -805
  8. package/dist/_chunks/libs/eventemitter3.mjs +1 -243
  9. package/dist/_chunks/libs/fast-equals.mjs +1 -446
  10. package/dist/_chunks/libs/p-queue.mjs +1 -449
  11. package/dist/_chunks/libs/parse-ms.mjs +1 -36
  12. package/dist/_chunks/libs/picomatch.mjs +1 -1673
  13. package/dist/_chunks/libs/pretty-ms.mjs +1 -80
  14. package/dist/_chunks/libs/remeda.mjs +2 -482
  15. package/dist/_chunks/libs/strip-indent.mjs +1 -15
  16. package/dist/_chunks/libs/ufo.mjs +1 -166
  17. package/dist/_chunks/likec4lib.mjs +2 -9
  18. package/dist/_chunks/{LikeC4LanguageServices.d.mts → module.d.mts} +2101 -732
  19. package/dist/_chunks/module.mjs +34 -28
  20. package/dist/_chunks/noop.mjs +1 -0
  21. package/dist/_chunks/protocol.d.mts +6 -2
  22. package/dist/_chunks/rolldown-runtime.mjs +1 -42
  23. package/dist/_chunks/utils.mjs +1 -0
  24. package/dist/_chunks/workspace.mjs +1 -0
  25. package/dist/browser/index.d.mts +15 -0
  26. package/dist/browser/index.mjs +1 -0
  27. package/dist/browser/worker.mjs +1 -0
  28. package/dist/bundled.d.mts +1 -2
  29. package/dist/bundled.mjs +1 -51
  30. package/dist/filesystem/index.d.mts +2 -3
  31. package/dist/filesystem/index.mjs +1 -3
  32. package/dist/index.d.mts +1 -2
  33. package/dist/index.mjs +1 -48
  34. package/dist/likec4lib.d.mts +10 -3
  35. package/dist/likec4lib.mjs +1 -4
  36. package/dist/mcp/index.d.mts +2 -3
  37. package/dist/mcp/index.mjs +1 -3
  38. package/dist/module.d.mts +2 -3
  39. package/dist/module.mjs +1 -3
  40. package/dist/protocol.mjs +1 -3
  41. package/filesystem/package.json +4 -0
  42. package/mcp/package.json +4 -0
  43. package/module/package.json +4 -0
  44. package/package.json +79 -56
  45. package/LICENSE +0 -21
  46. package/dist/LikeC4LanguageServices.d.mts +0 -4
  47. package/dist/LikeC4LanguageServices.mjs +0 -3
  48. package/dist/_chunks/LikeC4LanguageServices.mjs +0 -725
  49. package/dist/_chunks/ast.d.mts +0 -1444
  50. package/dist/_chunks/ast.mjs +0 -2375
  51. package/dist/_chunks/ast2.mjs +0 -176
  52. package/dist/_chunks/filesystem.mjs +0 -58
  53. package/dist/_chunks/grammar.mjs +0 -8
  54. package/dist/_chunks/icons.mjs +0 -5211
  55. package/dist/_chunks/libs/@hono/node-server.mjs +0 -436
  56. package/dist/_chunks/libs/hono.mjs +0 -1829
  57. package/dist/_chunks/mcp.mjs +0 -33
  58. package/dist/_chunks/module2.mjs +0 -6576
  59. package/dist/_chunks/protocol.mjs +0 -78
  60. package/dist/ast.d.mts +0 -4
  61. package/dist/ast.mjs +0 -4
  62. package/dist/browser-worker.mjs +0 -6
  63. package/dist/browser.d.mts +0 -11
  64. package/dist/browser.mjs +0 -27
  65. package/dist/common-exports.d.mts +0 -4
  66. package/dist/common-exports.mjs +0 -5
  67. package/dist/generated/ast.d.mts +0 -2
  68. package/dist/generated/ast.mjs +0 -3
  69. package/dist/generated/grammar.d.mts +0 -6
  70. package/dist/generated/grammar.mjs +0 -3
  71. package/dist/generated/module.d.mts +0 -14
  72. package/dist/generated/module.mjs +0 -3
  73. package/dist/generated-lib/icons.d.mts +0 -4
  74. package/dist/generated-lib/icons.mjs +0 -3
  75. /package/dist/{browser-worker.d.mts → browser/worker.d.mts} +0 -0
@@ -1,45 +1,65 @@
1
- import { $n as ViewLayoutDirection, $t as MetadataBody, A as DynamicView, An as RelationshipStyleProperty, At as IconProperty, B as DynamicViewStep, Bn as SpecificationRelationshipStringProperty, Bt as LikeC4Grammar, Cn as RelationExprWith, D as DirectedRelationExpr, Dn as RelationStringProperty, E as DeploymentViewRuleStyle, Et as IconColorProperty, F as DynamicViewIncludePredicate, Fn as SpecificationColor, Ft as InOutRelationExpr, G as ElementProperty, H as ElementBody, Hn as SpecificationTag, Ht as LikeC4Lib, I as DynamicViewParallelSteps, In as SpecificationDeploymentNodeKind, It as IncomingRelationExpr, J as ElementStringProperty, Jt as LineProperty, K as ElementRef, Kn as StyleProperty, Kt as LikeC4View, Ln as SpecificationElementKind, Lt as LibIcon, M as DynamicViewDisplayVariantProperty, Mn as ShapeSizeProperty, Nt as Imported, O as DynamicStepChain, Or as WildcardExpression, Ot as IconPositionProperty, P as DynamicViewGlobalPredicateRef, Pn as SizeValue, Pt as ImportsFromPoject, Qt as MetadataAttribute, Rn as SpecificationElementStringProperty, S as DeploymentView, Sn as RelationExprWhere, St as GlobalStyleGroup, T as DeploymentViewRulePredicate, Tt as HexColor, V as Element, Vn as SpecificationRule, W as ElementKindExpression, Wn as StrictFqnRef, X as ElementTagExpression, Xn as TextSizeProperty, Xt as MarkdownOrString, Y as ElementStyleProperty, Yn as Tags, Yt as LinkProperty, Z as ElementView, _ as DeploymentNodeBody, _n as Relation, _t as FqnRefExpr, a as BorderProperty, an as ModelViews, ar as ViewRuleGlobalStyle, at as ExtendElementBody, b as DeploymentRelation, bn as RelationExprOrWhere, bt as GlobalPredicateGroup, c as ColorProperty, cn as NotationProperty, cr as ViewRuleRank, dn as OutgoingRelationExpr, dr as ViewStringProperty, dt as FqnExprOrWhere, en as MetadataProperty, et as ExpressionV2, f as CustomRelationProperties, fn as PaddingSizeProperty, ft as FqnExprOrWith, g as DeploymentNode, gn as Referenceable, gt as FqnRef$2, h as DeploymentElement, ht as FqnExpressions, ir as ViewRuleGlobalPredicateRef, it as ExtendElement, jn as ShapeProperty, jt as IconSizeProperty, k as DynamicStepSingle, kt as IconPositionValue, ln as NotesProperty, lr as ViewRuleStyle, m as DeployedInstanceBody, mn as RGBAColor, mt as FqnExprWith, nn as Model, nr as ViewRule, nt as ExtendDeployment, on as MultipleProperty, or as ViewRuleGroup, p as DeployedInstance, pt as FqnExprWhere, r as ArrowProperty, rn as ModelDeployments, rr as ViewRuleAutoLayout, rt as ExtendDeploymentBody, s as ColorLiteral, sn as NavigateToProperty, sr as ViewRulePredicate, st as ExtendRelation, t as AbstractDynamicStep, un as OpacityProperty, ur as ViewRuleStyleOrGlobalRef, ut as FqnExpr$2, vt as FqnReferenceable, w as DeploymentViewRule, wt as Globals, xn as RelationExprOrWith, xt as GlobalStyle, yn as RelationExpr$1, yt as GlobalDynamicPredicateGroup, z as DynamicViewRule, zn as SpecificationRelationshipKind, zt as LikeC4AstType } from "./ast.mjs";
2
1
  import { h as Locate, n as ChangeView, o as DidRequestOpenViewNotification } from "./protocol.mjs";
3
- import { AbstractFormatter, AbstractSemanticTokenProvider, AstNodeHoverProvider, CodeActionProvider, CodeLensProvider, CompletionAcceptor, CompletionContext, DefaultCompletionProvider, DefaultDocumentHighlightProvider, DefaultSharedModuleContext, DefaultWorkspaceSymbolProvider, DocumentLinkProvider, DocumentSymbolProvider, FormattingRegion, LangiumServices, LangiumSharedServices, NextFeature, NodeKindProvider, PartialLangiumServices, SemanticTokenAcceptor } from "langium/lsp";
4
- import * as langium0 from "langium";
5
- import { AstNode, AstNodeDescription, AsyncDisposable, BuildOptions, Cancellation, CstNode, DefaultAstNodeDescriptionProvider, DefaultDocumentValidator, DefaultIndexManager, DefaultLangiumDocuments, DefaultNameProvider, DefaultScopeComputation, DefaultScopeProvider, DefaultValueConverter, DefaultWorkspaceManager, DiagnosticInfo, Disposable, DocumentationProvider, FileSelector, FileSystemNode, FileSystemProvider, GrammarAST, LangiumDocument, LangiumDocumentFactory, MaybePromise, Module, PrecomputedScopes, ReferenceDescription, ReferenceInfo, Scope, Stream, URI, ValidationOptions, ValueType, WorkspaceCache } from "langium";
2
+ import * as langium from "langium";
3
+ import { AstNode, AstNodeDescription, AsyncDisposable, BuildOptions, Cancellation, CstNode, DefaultAstNodeDescriptionProvider, DefaultDocumentValidator, DefaultIndexManager, DefaultLangiumDocuments, DefaultNameProvider, DefaultScopeComputation, DefaultScopeProvider, DefaultValueConverter, DefaultWorkspaceManager, DiagnosticInfo, Disposable, FileSelector, FileSystemNode, FileSystemProvider, GrammarAST, JSDocDocumentationProvider, LangiumDocument, LangiumDocumentFactory, MaybePromise, Module, PrecomputedScopes, Reference, ReferenceDescription, ReferenceInfo, Scope, SimpleCache, Stream, URI, ValidationOptions, ValueType, WorkspaceCache } from "langium";
6
4
  import { DefaultWeakMap, MultiMap as MultiMap$1 } from "@likec4/core/utils";
7
5
  import { CompletionItemKind, Diagnostic, DocumentSymbol, FormattingOptions, Hover, Location, Range, SemanticTokens, SemanticTokensDelta, SymbolKind, TextEdit } from "vscode-languageserver-types";
6
+ import { AbstractFormatter, AbstractSemanticTokenProvider, AstNodeHoverProvider, CodeActionProvider, CodeLensProvider, CompletionAcceptor, CompletionContext, DefaultCompletionProvider, DefaultDocumentHighlightProvider, DefaultSharedModuleContext, DefaultWorkspaceSymbolProvider, DocumentLinkProvider, DocumentSymbolProvider, FormattingRegion, LangiumServices, LangiumSharedServices, NextFeature, NodeKindProvider, PartialLangiumServices, SemanticTokenAcceptor } from "langium/lsp";
7
+ import { GraphvizLayouter, QueueGraphvizLayoter } from "@likec4/layouts";
8
+ import * as c4 from "@likec4/core";
9
+ import { ComputedView, DiagramView, LayoutType, LayoutedView, NonEmptyArray, NonEmptyReadonlyArray, ProjectId, Tag, UnknownComputed, UnknownLayouted, UnknownParsed, ViewChange, ViewId } from "@likec4/core";
10
+ import { AdhocViewPredicate, LayoutedProjectsView as LayoutedProjectsView$1 } from "@likec4/core/compute-view";
11
+ import { ElementModel, LikeC4Model } from "@likec4/core/model";
8
12
  import { IncludeConfig, LikeC4ProjectConfig, LikeC4ProjectConfigInput } from "@likec4/config";
9
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
10
- import { LikeC4Model } from "@likec4/core/model";
11
13
  import { URI as URI$2 } from "vscode-uri";
12
- import * as c4 from "@likec4/core";
13
- import { ComputedView, DiagramView, LayoutType, LayoutedView, NonEmptyArray, NonEmptyReadonlyArray, ProjectId, UnknownComputed, UnknownLayouted, UnknownParsed, ViewChange, ViewId } from "@likec4/core";
14
+ import { LikeC4Styles } from "@likec4/core/styles";
14
15
  import { CancellationToken, CodeLens, CodeLensParams, Connection, DocumentHighlight, DocumentLink, DocumentLinkParams, DocumentSymbolParams, WorkspaceFolder } from "vscode-languageserver";
15
- import { GraphvizLayouter, QueueGraphvizLayoter } from "@likec4/layouts";
16
- import { AdhocViewPredicate, LayoutedProjectsView as LayoutedProjectsView$1 } from "@likec4/core/compute-view";
17
16
  import { CancellationToken as CancellationToken$1, CodeAction, CodeActionParams, Command, SemanticTokensDeltaParams, SemanticTokensParams, SemanticTokensRangeParams } from "vscode-languageserver-protocol";
18
- import { Fqn as Fqn$1, LayoutedView as LayoutedView$1, ProjectId as ProjectId$1, ViewId as ViewId$1 } from "@likec4/core/types";
17
+ import { Fqn as Fqn$1, GuardedBy, LayoutedView as LayoutedView$1, ProjectId as ProjectId$1, ViewId as ViewId$1 } from "@likec4/core/types";
19
18
  import { CancellationToken as CancellationToken$2 } from "vscode-jsonrpc";
19
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
20
20
  import * as type_fest0 from "type-fest";
21
21
  import { ConditionalPick, MergeExclusive, Simplify, Tagged, ValueOf, Writable } from "type-fest";
22
22
  import { ServerOptions } from "@modelcontextprotocol/sdk/server/index.js";
23
23
 
24
24
  //#region src/documentation/documentation-provider.d.ts
25
- declare class LikeC4DocumentationProvider implements DocumentationProvider {
25
+ /**
26
+ * Provides documentation for LikeC4 AST nodes, extending JSDoc parsing
27
+ * with specialized formatting for deployment nodes, deployed instances, and elements.
28
+ */
29
+ declare class LikeC4DocumentationProvider extends JSDocDocumentationProvider {
26
30
  private parser;
27
31
  private locator;
32
+ /**
33
+ * Creates a new documentation provider.
34
+ * @param services - The LikeC4 language services.
35
+ */
28
36
  constructor(services: LikeC4Services);
37
+ /**
38
+ * Returns documentation for the given AST node (deployment nodes, deployed instances, elements, or JSDoc fallback).
39
+ * @param node - The AST node to document.
40
+ * @returns Formatted documentation string, or undefined if none.
41
+ */
29
42
  getDocumentation(node: AstNode): string | undefined;
30
43
  }
31
44
  //#endregion
32
45
  //#region src/workspace/ProjectsManager.d.ts
46
+ type DocOrUri = LangiumDocument | string | URI;
33
47
  /**
34
48
  * A tagged string that represents a project folder URI
35
49
  * Always has trailing slash.
36
50
  */
37
51
  type ProjectFolder = Tagged<string, 'ProjectFolder'>;
38
52
  declare function ProjectFolder(folder: URI | string): ProjectFolder;
39
- interface ProjectData {
53
+ interface Project {
40
54
  id: ProjectId$1;
55
+ folderUri: URI;
41
56
  config: LikeC4ProjectConfig;
57
+ }
58
+ interface ProjectData extends Project {
59
+ id: ProjectId$1;
42
60
  folder: ProjectFolder;
61
+ config: LikeC4ProjectConfig;
62
+ configUri: URI;
43
63
  folderUri: URI;
44
64
  exclude?: {
45
65
  (test: string): boolean;
@@ -57,15 +77,13 @@ interface ProjectData {
57
77
  */
58
78
  includeConfig: IncludeConfig;
59
79
  }
60
- interface Project {
61
- id: ProjectId$1;
62
- folderUri: URI;
63
- config: LikeC4ProjectConfig;
64
- /**
65
- * Resolved include paths as URIs (if configured).
66
- */
67
- includePaths?: NonEmptyReadonlyArray<URI>;
68
- }
80
+ type RegisterProjectOptions = {
81
+ config: LikeC4ProjectConfig | LikeC4ProjectConfigInput;
82
+ } & ({
83
+ configUri: URI | string;
84
+ } | {
85
+ folderUri: URI | string;
86
+ });
69
87
  declare class ProjectsManager {
70
88
  #private;
71
89
  protected services: LikeC4SharedServices;
@@ -86,11 +104,11 @@ declare class ProjectsManager {
86
104
  set defaultProjectId(id: string | ProjectId$1 | undefined);
87
105
  get default(): ProjectData;
88
106
  get all(): NonEmptyReadonlyArray<ProjectId$1>;
89
- getProject(arg: ProjectId$1 | LangiumDocument): Project;
107
+ getProject(arg: ProjectId$1 | LangiumDocument): ProjectData;
90
108
  /**
91
- * Returns all projects that include the specified folder, or inside the folder.
109
+ * Returns all projects that overlap with the specified folder (is parent or child)
92
110
  */
93
- findAllProjectsByFolder(folder: URI | string): ProjectData[];
111
+ findOverlaped(folder: URI | string): ProjectData[];
94
112
  /**
95
113
  * Validates and ensures the project ID.
96
114
  * If no project ID is specified, returns default project ID
@@ -100,53 +118,38 @@ declare class ProjectsManager {
100
118
  /**
101
119
  * Validates and ensures the project.
102
120
  */
103
- ensureProject(projectId?: ProjectId$1 | undefined): Project;
121
+ ensureProject(projectId?: ProjectId$1 | undefined): ProjectData;
104
122
  hasMultipleProjects(): boolean;
105
123
  /**
106
124
  * Checks if the specified document should be excluded from processing.
107
125
  */
108
- isExcluded(document: LangiumDocument | URI | string): boolean;
126
+ isExcluded(document: DocOrUri): boolean;
127
+ isExcluded(projectId: ProjectId$1, document: DocOrUri): boolean;
109
128
  /**
110
129
  * Checks if the specified document is included by the project:
111
130
  * - if the document belongs to the project and is not excluded
112
131
  * - if the document is included by the project
113
132
  */
114
133
  isIncluded(projectId: ProjectId$1, document: LangiumDocument | URI | string): boolean;
115
- /**
116
- * Checks if it is a config file and it is not excluded by default exclude pattern
117
- *
118
- * @param entry The file system entry to check
119
- */
120
- isConfigFile(entry: URI): boolean;
121
134
  /**
122
135
  * Registers likec4 project by config file.
123
136
  */
124
- registerConfigFile(configFile: URI, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
137
+ registerConfigFile(configUri: URI, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
125
138
  /**
126
139
  * Registers (or reloads) likec4 project by config file or config object.
127
140
  * If there is some project registered at same folder, it will be reloaded.
128
141
  */
129
- registerProject(opts: {
130
- config: LikeC4ProjectConfig | LikeC4ProjectConfigInput;
131
- folderUri: URI | string;
132
- }, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
142
+ registerProject(opts: RegisterProjectOptions, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
133
143
  /**
134
144
  * Determines which project the given document belongs to.
135
145
  * If the document does not belong to any project, returns the default project ID.
136
146
  */
137
- belongsTo(document: LangiumDocument | URI | string): ProjectId$1;
147
+ ownerProjectId(document: LangiumDocument | URI | string): ProjectId$1;
138
148
  reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
139
149
  protected _reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
140
150
  protected uniqueProjectId(name: string): ProjectId$1;
141
- protected reset(): void;
142
- rebuidProject(projectId: ProjectId$1, cancelToken?: Cancellation.CancellationToken): Promise<void>;
143
- protected findProjectForDocument(documentUri: string): ProjectData;
144
- protected get mappingsToProject(): WorkspaceCache<string, ProjectData>;
145
- /**
146
- * The mapping between documents and projects they belong to.
147
- * Lazy-created due to initialization order of the LanguageServer
148
- */
149
- protected get documentBelongsTo(): WorkspaceCache<LangiumDocument, ProjectData>;
151
+ protected resetCaches(): void;
152
+ rebuildProject(projectId: ProjectId$1, cancelToken?: Cancellation.CancellationToken): Promise<void>;
150
153
  /**
151
154
  * Returns all include paths from all projects.
152
155
  * Used by WorkspaceManager to scan additional directories for C4 files.
@@ -163,6 +166,7 @@ declare class ProjectsManager {
163
166
  onProjectsUpdate(callback: () => void): Disposable;
164
167
  private getWorkspaceFolder;
165
168
  private notifyListeners;
169
+ private updateIncludesExcludes;
166
170
  }
167
171
  //#endregion
168
172
  //#region src/filesystem/types.d.ts
@@ -179,6 +183,7 @@ interface FileSystemProvider$1 extends FileSystemProvider {
179
183
  /**
180
184
  * Loads the project config from the given file.
181
185
  * @returns The project config.
186
+ * @throws Error if the file does not exist or is not a valid project config.
182
187
  */
183
188
  loadProjectConfig(filepath: URI): Promise<LikeC4ProjectConfig>;
184
189
  /**
@@ -221,8 +226,12 @@ interface FileSystemWatcher extends AsyncDisposable {
221
226
  interface LikeC4ManualLayoutsModuleContext {
222
227
  manualLayouts: (services: LikeC4SharedServices) => LikeC4ManualLayouts;
223
228
  }
229
+ type ManualLayoutsSnapshot = {
230
+ hash: string;
231
+ views: Record<ViewId$1, LayoutedView$1>;
232
+ };
224
233
  interface LikeC4ManualLayouts {
225
- read(project: Project): Promise<Record<ViewId$1, LayoutedView$1> | null>;
234
+ read(project: Project): Promise<ManualLayoutsSnapshot | null>;
226
235
  write(project: Project, layouted: LayoutedView$1): Promise<Location>;
227
236
  remove(project: Project, view: ViewId$1): Promise<Location | null>;
228
237
  clearCaches(): void;
@@ -233,6 +242,15 @@ declare const NoFileSystemWatcher: FileSystemWatcherModuleContext;
233
242
  declare const NoFileSystem: FileSystemModuleContext;
234
243
  declare const NoLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
235
244
  //#endregion
245
+ //#region src/filesystem/LikeC4FileSystem.d.ts
246
+ declare const WithFileSystem: (ehableWatcher?: boolean) => FileSystemModuleContext;
247
+ //#endregion
248
+ //#region src/filesystem/ChokidarWatcher.d.ts
249
+ declare const WithChokidarWatcher: FileSystemWatcherModuleContext;
250
+ //#endregion
251
+ //#region src/filesystem/LikeC4ManualLayouts.d.ts
252
+ declare const WithLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
253
+ //#endregion
236
254
  //#region src/formatting/LikeC4Formatter.d.ts
237
255
  type QuoteStyle = 'single' | 'double' | 'ignore' | 'auto';
238
256
  interface LikeC4FormatterOptions {
@@ -289,523 +307,1269 @@ declare class LikeC4Formatter extends AbstractFormatter {
289
307
  private onConfigurationUpdate;
290
308
  }
291
309
  //#endregion
292
- //#region src/lsp/CodeLensProvider.d.ts
293
- declare class LikeC4CodeLensProvider implements CodeLensProvider {
294
- private services;
295
- constructor(services: LikeC4Services);
296
- provideCodeLens(doc: LangiumDocument, _params: CodeLensParams, cancelToken?: CancellationToken): Promise<CodeLens[] | undefined>;
297
- }
298
- //#endregion
299
- //#region src/lsp/CompletionProvider.d.ts
300
- declare class LikeC4CompletionProvider extends DefaultCompletionProvider {
301
- protected services: LikeC4Services;
302
- constructor(services: LikeC4Services);
303
- readonly completionOptions: {
304
- triggerCharacters: string[];
305
- };
306
- protected completionFor(context: CompletionContext, next: NextFeature, acceptor: CompletionAcceptor): MaybePromise<void>;
307
- protected completionForKeyword(context: CompletionContext, keyword: GrammarAST.Keyword, acceptor: CompletionAcceptor): MaybePromise<void>;
308
- protected completionForImportedProject(context: CompletionContext, acceptor: CompletionAcceptor): void;
310
+ //#region src/mcp/types.d.ts
311
+ interface LikeC4MCPServer {
312
+ readonly mcp: McpServer;
313
+ readonly isStarted: boolean;
314
+ readonly port: number;
315
+ start(port?: number): Promise<void>;
316
+ stop(): Promise<void>;
309
317
  }
310
- //#endregion
311
- //#region src/lsp/DocumentHighlightProvider.d.ts
312
- declare class LikeC4DocumentHighlightProvider extends DefaultDocumentHighlightProvider {
313
- /**
314
- * Override this method to determine the highlight kind of the given reference.
315
- */
316
- protected createDocumentHighlight(reference: ReferenceDescription): DocumentHighlight;
318
+ interface LikeC4MCPServerFactory {
319
+ create(options?: ServerOptions): McpServer;
317
320
  }
318
- //#endregion
319
- //#region src/lsp/DocumentLinkProvider.d.ts
320
- declare class LikeC4DocumentLinkProvider implements DocumentLinkProvider {
321
- private services;
322
- constructor(services: LikeC4Services);
323
- getDocumentLinks(doc: LangiumDocument, _params: DocumentLinkParams, _cancelToken?: CancellationToken): Promise<DocumentLink[]>;
324
- resolveLink(doc: LangiumDocument, link: string): string;
325
- relativeLink(doc: LangiumDocument, link: string): string | null;
321
+ interface LikeC4MCPServerModuleContext {
322
+ mcpServer: (services: LikeC4Services) => LikeC4MCPServer;
323
+ mcpServerFactory: (services: LikeC4Services) => LikeC4MCPServerFactory;
326
324
  }
327
325
  //#endregion
328
- //#region src/references/name-provider.d.ts
329
- declare class LikeC4NameProvider extends DefaultNameProvider {
330
- protected services: LikeC4Services;
331
- constructor(services: LikeC4Services);
332
- getNameStrict(node: AstNode): string;
333
- getName(node: AstNode): string | undefined;
334
- getNameNode(node: AstNode): CstNode | undefined;
326
+ //#region src/generated/ast.d.ts
327
+ type AnyProperty = DynamicViewProperty | ElementProperty | RelationProperty | StringProperty | ViewProperty;
328
+ declare const AnyProperty = "AnyProperty";
329
+ type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | 'odot' | 'onormal' | 'open' | 'vee';
330
+ type BorderStyleValue = 'none' | LineOptions;
331
+ type ColorLiteral$1 = HexColor | RGBAColor;
332
+ declare const ColorLiteral$1 = "ColorLiteral";
333
+ type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOptions | Participant | string;
334
+ type DeploymentElement = DeployedInstance | DeploymentNode;
335
+ declare const DeploymentElement = "DeploymentElement";
336
+ type DeploymentNodeOrElementKind = DeploymentNodeKind | ElementKind;
337
+ declare const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
338
+ type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
339
+ declare const DeploymentViewRule = "DeploymentViewRule";
340
+ type DynamicViewDisplayVariantValue = 'diagram' | 'sequence';
341
+ type DynamicViewProperty = DynamicViewDisplayVariantProperty | ViewProperty;
342
+ declare const DynamicViewProperty = "DynamicViewProperty";
343
+ type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
344
+ declare const DynamicViewRule = "DynamicViewRule";
345
+ type DynamicViewStep = DynamicStepChain | DynamicStepSingle;
346
+ declare const DynamicViewStep = "DynamicViewStep";
347
+ type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
348
+ declare const ElementProperty = "ElementProperty";
349
+ type ElementShape = 'browser' | 'bucket' | 'component' | 'cylinder' | 'document' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
350
+ type ExpressionV2 = FqnExprOrWith | RelationExprOrWith;
351
+ declare const ExpressionV2 = "ExpressionV2";
352
+ type ExtendElementProperty = LinkProperty | MetadataProperty;
353
+ declare const ExtendElementProperty = "ExtendElementProperty";
354
+ type ExtendRelationProperty = LinkProperty | MetadataProperty;
355
+ declare const ExtendRelationProperty = "ExtendRelationProperty";
356
+ type FqnExpr$2 = ElementKindExpression | ElementTagExpression | FqnRefExpr | WildcardExpression;
357
+ declare const FqnExpr$2 = "FqnExpr";
358
+ type FqnExprOrWhere = FqnExpr$2 | FqnExprWhere;
359
+ declare const FqnExprOrWhere = "FqnExprOrWhere";
360
+ type FqnExprOrWith = FqnExprOrWhere | FqnExprWith;
361
+ declare const FqnExprOrWith = "FqnExprOrWith";
362
+ type FqnReferenceable = Element | ExtendDeployment | ExtendElement | Referenceable;
363
+ declare const FqnReferenceable = "FqnReferenceable";
364
+ type IconId = string;
365
+ type IconPositionValue = 'bottom' | 'left' | 'right' | 'top';
366
+ type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | DynamicViewDisplayVariantValue | ElementShape | IconPositionValue | LineOptions | Participant | RankValue | SizeValue | ThemeColor | string;
367
+ type LikeC4View = DeploymentView | DynamicView | ElementView;
368
+ declare const LikeC4View = "LikeC4View";
369
+ type LineOptions = 'dashed' | 'dotted' | 'solid';
370
+ type MetadataProperty = MetadataBody;
371
+ declare const MetadataProperty = "MetadataProperty";
372
+ type MetadataValue = MarkdownOrString | MetadataArray;
373
+ declare const MetadataValue = "MetadataValue";
374
+ type ModelReferenceable = Element | Imported;
375
+ declare const ModelReferenceable = "ModelReferenceable";
376
+ type Participant = 'source' | 'target';
377
+ type RankValue = 'max' | 'min' | 'same' | 'sink' | 'source';
378
+ type Referenceable = DeployedInstance | DeploymentNode | Element | Imported;
379
+ declare const Referenceable = "Referenceable";
380
+ type RelationExpr$1 = DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr;
381
+ declare const RelationExpr$1 = "RelationExpr";
382
+ type RelationExprOrWhere = RelationExpr$1 | RelationExprWhere;
383
+ declare const RelationExprOrWhere = "RelationExprOrWhere";
384
+ type RelationExprOrWith = RelationExprOrWhere | RelationExprWith;
385
+ declare const RelationExprOrWith = "RelationExprOrWith";
386
+ type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
387
+ declare const RelationProperty = "RelationProperty";
388
+ type RelationshipStyleProperty = ArrowProperty | ColorProperty | LineProperty;
389
+ declare const RelationshipStyleProperty = "RelationshipStyleProperty";
390
+ type SizeProperty = IconSizeProperty | PaddingSizeProperty | ShapeSizeProperty | TextSizeProperty;
391
+ declare const SizeProperty = "SizeProperty";
392
+ type SizeValue = 'large' | 'lg' | 'md' | 'medium' | 'sm' | 'small' | 'xl' | 'xlarge' | 'xs' | 'xsmall';
393
+ type StringProperty = ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
394
+ declare const StringProperty = "StringProperty";
395
+ type StyleProperty = BorderProperty | ColorProperty | IconColorProperty | IconPositionProperty | IconProperty | IconSizeProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty;
396
+ declare const StyleProperty = "StyleProperty";
397
+ type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
398
+ type Uri = string;
399
+ type ViewLayoutDirection = 'BottomTop' | 'LeftRight' | 'RightLeft' | 'TopBottom';
400
+ type ViewProperty = LinkProperty | ViewStringProperty;
401
+ declare const ViewProperty = "ViewProperty";
402
+ type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleRank | ViewRuleStyleOrGlobalRef;
403
+ declare const ViewRule = "ViewRule";
404
+ type ViewRuleStyleOrGlobalRef = ViewRuleGlobalStyle | ViewRuleStyle;
405
+ declare const ViewRuleStyleOrGlobalRef = "ViewRuleStyleOrGlobalRef";
406
+ type WhereElement = WhereElementKind | WhereElementTag;
407
+ declare const WhereElement = "WhereElement";
408
+ type WhereElementExpression = WhereBinaryExpression | WhereElement | WhereElementNegation;
409
+ declare const WhereElementExpression = "WhereElementExpression";
410
+ type WhereExpression = WhereElementExpression | WhereRelationExpression;
411
+ declare const WhereExpression = "WhereExpression";
412
+ type WhereKindEqual = WhereElementKind | WhereRelationKind | WhereRelationParticipantKind;
413
+ declare const WhereKindEqual = "WhereKindEqual";
414
+ type WhereRelation = WhereRelationKind | WhereRelationParticipantKind | WhereRelationParticipantTag | WhereRelationTag;
415
+ declare const WhereRelation = "WhereRelation";
416
+ type WhereRelationExpression = WhereBinaryExpression | WhereRelation | WhereRelationNegation;
417
+ declare const WhereRelationExpression = "WhereRelationExpression";
418
+ type WhereTagEqual = WhereElementTag | WhereRelationParticipantTag | WhereRelationTag;
419
+ declare const WhereTagEqual = "WhereTagEqual";
420
+ interface AbstractDynamicStep extends langium.AstNode {
421
+ readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
422
+ readonly $type: 'AbstractDynamicStep' | 'DynamicStepChain' | 'DynamicStepSingle';
423
+ custom?: CustomRelationProperties;
424
+ dotKind?: RelationKindDotRef;
425
+ kind?: langium.Reference<RelationshipKind>;
426
+ target: ElementRef;
427
+ title?: string;
428
+ }
429
+ declare const AbstractDynamicStep = "AbstractDynamicStep";
430
+ interface ArrowProperty extends langium.AstNode {
431
+ readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
432
+ readonly $type: 'ArrowProperty';
433
+ key: 'head' | 'tail';
434
+ value: ArrowType;
435
+ }
436
+ declare const ArrowProperty = "ArrowProperty";
437
+ interface BorderProperty extends langium.AstNode {
438
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
439
+ readonly $type: 'BorderProperty';
440
+ key: 'border';
441
+ value: BorderStyleValue;
442
+ }
443
+ declare const BorderProperty = "BorderProperty";
444
+ interface ColorProperty extends langium.AstNode {
445
+ readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
446
+ readonly $type: 'ColorProperty';
447
+ customColor?: langium.Reference<CustomColor>;
448
+ key: 'color';
449
+ themeColor?: ThemeColor;
450
+ }
451
+ declare const ColorProperty = "ColorProperty";
452
+ interface CustomColor extends langium.AstNode {
453
+ readonly $container: SpecificationColor;
454
+ readonly $type: 'CustomColor';
455
+ name: CustomColorId;
456
+ }
457
+ declare const CustomColor = "CustomColor";
458
+ interface CustomElementProperties extends langium.AstNode {
459
+ readonly $container: FqnExprWith;
460
+ readonly $type: 'CustomElementProperties';
461
+ props: Array<ElementStringProperty | NavigateToProperty | NotationProperty | NotesProperty | StyleProperty>;
462
+ }
463
+ declare const CustomElementProperties = "CustomElementProperties";
464
+ interface CustomRelationProperties extends langium.AstNode {
465
+ readonly $container: AbstractDynamicStep | RelationExprWith;
466
+ readonly $type: 'CustomRelationProperties';
467
+ props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
468
+ }
469
+ declare const CustomRelationProperties = "CustomRelationProperties";
470
+ interface DeployedInstance extends langium.AstNode {
471
+ readonly $container: DeploymentNodeBody | ExtendDeploymentBody;
472
+ readonly $type: 'DeployedInstance';
473
+ body?: DeployedInstanceBody;
474
+ name?: Id;
475
+ summary?: string;
476
+ target: ElementRef;
477
+ title?: string;
478
+ }
479
+ declare const DeployedInstance = "DeployedInstance";
480
+ interface DeployedInstanceBody extends langium.AstNode {
481
+ readonly $container: DeployedInstance;
482
+ readonly $type: 'DeployedInstanceBody';
483
+ elements: Array<DeploymentRelation>;
484
+ props: Array<ElementProperty>;
485
+ tags?: Tags;
486
+ }
487
+ declare const DeployedInstanceBody = "DeployedInstanceBody";
488
+ interface DeploymentNode extends langium.AstNode {
489
+ readonly $container: DeploymentNodeBody | ExtendDeploymentBody | ModelDeployments;
490
+ readonly $type: 'DeploymentNode';
491
+ body?: DeploymentNodeBody;
492
+ kind: langium.Reference<DeploymentNodeKind>;
493
+ name: Id;
494
+ summary?: string;
495
+ title?: string;
496
+ }
497
+ declare const DeploymentNode = "DeploymentNode";
498
+ interface DeploymentNodeBody extends langium.AstNode {
499
+ readonly $container: DeploymentNode;
500
+ readonly $type: 'DeploymentNodeBody';
501
+ elements: Array<DeployedInstance | DeploymentNode | DeploymentRelation>;
502
+ props: Array<ElementProperty>;
503
+ tags?: Tags;
504
+ }
505
+ declare const DeploymentNodeBody = "DeploymentNodeBody";
506
+ interface DeploymentNodeKind extends langium.AstNode {
507
+ readonly $container: SpecificationDeploymentNodeKind;
508
+ readonly $type: 'DeploymentNodeKind';
509
+ name: Id;
510
+ }
511
+ declare const DeploymentNodeKind = "DeploymentNodeKind";
512
+ interface DeploymentRelation extends langium.AstNode {
513
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | ExtendDeploymentBody | ModelDeployments;
514
+ readonly $type: 'DeploymentRelation';
515
+ body?: DeploymentRelationBody;
516
+ description?: string;
517
+ dotKind?: RelationKindDotRef;
518
+ kind?: langium.Reference<RelationshipKind>;
519
+ source?: FqnRef$2;
520
+ tags?: Tags;
521
+ target: FqnRef$2;
522
+ technology?: string;
523
+ title?: string;
524
+ }
525
+ declare const DeploymentRelation = "DeploymentRelation";
526
+ interface DeploymentRelationBody extends langium.AstNode {
527
+ readonly $container: DeploymentRelation;
528
+ readonly $type: 'DeploymentRelationBody';
529
+ props: Array<RelationProperty>;
530
+ tags?: Tags;
531
+ }
532
+ declare const DeploymentRelationBody = "DeploymentRelationBody";
533
+ interface DeploymentView extends langium.AstNode {
534
+ readonly $container: ModelViews;
535
+ readonly $type: 'DeploymentView';
536
+ body?: DeploymentViewBody;
537
+ name: Id;
538
+ }
539
+ declare const DeploymentView = "DeploymentView";
540
+ interface DeploymentViewBody extends langium.AstNode {
541
+ readonly $container: DeploymentView;
542
+ readonly $type: 'DeploymentViewBody';
543
+ props: Array<ViewProperty>;
544
+ rules: Array<DeploymentViewRule>;
545
+ tags?: Tags;
546
+ }
547
+ declare const DeploymentViewBody = "DeploymentViewBody";
548
+ interface DeploymentViewRulePredicate extends langium.AstNode {
549
+ readonly $container: DeploymentViewBody;
550
+ readonly $type: 'DeploymentViewRulePredicate';
551
+ expr: Expressions;
552
+ isInclude: boolean;
553
+ }
554
+ declare const DeploymentViewRulePredicate = "DeploymentViewRulePredicate";
555
+ interface DeploymentViewRuleStyle extends langium.AstNode {
556
+ readonly $container: DeploymentViewBody;
557
+ readonly $type: 'DeploymentViewRuleStyle';
558
+ props: Array<NotationProperty | StyleProperty>;
559
+ targets: FqnExpressions;
560
+ }
561
+ declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
562
+ interface DirectedRelationExpr extends langium.AstNode {
563
+ readonly $container: Expressions | RelationExprWhere | RelationExprWith;
564
+ readonly $type: 'DirectedRelationExpr';
565
+ source: OutgoingRelationExpr;
566
+ target: FqnExpr$2;
567
+ }
568
+ declare const DirectedRelationExpr = "DirectedRelationExpr";
569
+ interface DynamicView extends langium.AstNode {
570
+ readonly $container: ModelViews;
571
+ readonly $type: 'DynamicView';
572
+ body?: DynamicViewBody;
573
+ name: Id;
574
+ }
575
+ declare const DynamicView = "DynamicView";
576
+ interface DynamicViewBody extends langium.AstNode {
577
+ readonly $container: DynamicView;
578
+ readonly $type: 'DynamicViewBody';
579
+ props: Array<DynamicViewProperty>;
580
+ rules: Array<DynamicViewRule>;
581
+ steps: Array<DynamicViewParallelSteps | DynamicViewStep>;
582
+ tags?: Tags;
583
+ }
584
+ declare const DynamicViewBody = "DynamicViewBody";
585
+ interface DynamicViewDisplayVariantProperty extends langium.AstNode {
586
+ readonly $container: DynamicViewBody;
587
+ readonly $type: 'DynamicViewDisplayVariantProperty';
588
+ key: 'variant';
589
+ value: DynamicViewDisplayVariantValue;
590
+ }
591
+ declare const DynamicViewDisplayVariantProperty = "DynamicViewDisplayVariantProperty";
592
+ interface DynamicViewGlobalPredicateRef extends langium.AstNode {
593
+ readonly $container: DynamicViewBody;
594
+ readonly $type: 'DynamicViewGlobalPredicateRef';
595
+ predicate: langium.Reference<GlobalDynamicPredicateGroup>;
596
+ }
597
+ declare const DynamicViewGlobalPredicateRef = "DynamicViewGlobalPredicateRef";
598
+ interface DynamicViewIncludePredicate extends langium.AstNode {
599
+ readonly $container: DynamicViewBody | GlobalDynamicPredicateGroup;
600
+ readonly $type: 'DynamicViewIncludePredicate';
601
+ exprs: Expressions;
602
+ }
603
+ declare const DynamicViewIncludePredicate = "DynamicViewIncludePredicate";
604
+ interface DynamicViewParallelSteps extends langium.AstNode {
605
+ readonly $container: DynamicViewBody;
606
+ readonly $type: 'DynamicViewParallelSteps';
607
+ steps: Array<DynamicViewStep>;
608
+ }
609
+ declare const DynamicViewParallelSteps = "DynamicViewParallelSteps";
610
+ interface DynamicViewRef extends langium.AstNode {
611
+ readonly $container: RelationNavigateToProperty;
612
+ readonly $type: 'DynamicViewRef';
613
+ view: langium.Reference<DynamicView>;
614
+ }
615
+ declare const DynamicViewRef = "DynamicViewRef";
616
+ interface Element extends langium.AstNode {
617
+ readonly $container: ElementBody | ExtendElementBody | Model;
618
+ readonly $type: 'Element';
619
+ body?: ElementBody;
620
+ kind: langium.Reference<ElementKind>;
621
+ name: Id;
622
+ props: Array<string>;
623
+ }
624
+ declare const Element = "Element";
625
+ interface ElementBody extends langium.AstNode {
626
+ readonly $container: Element;
627
+ readonly $type: 'ElementBody';
628
+ elements: Array<Element | Relation>;
629
+ props: Array<ElementProperty>;
630
+ tags?: Tags;
631
+ }
632
+ declare const ElementBody = "ElementBody";
633
+ interface ElementKind extends langium.AstNode {
634
+ readonly $container: SpecificationElementKind;
635
+ readonly $type: 'ElementKind';
636
+ name: Id;
637
+ }
638
+ declare const ElementKind = "ElementKind";
639
+ interface ElementKindExpression extends langium.AstNode {
640
+ readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
641
+ readonly $type: 'ElementKindExpression';
642
+ isEqual: boolean;
643
+ kind: langium.Reference<ElementKind>;
644
+ }
645
+ declare const ElementKindExpression = "ElementKindExpression";
646
+ interface ElementRef extends langium.AstNode {
647
+ readonly $container: AbstractDynamicStep | DeployedInstance | DynamicStepSingle | ElementView;
648
+ readonly $type: 'ElementRef';
649
+ modelElement: FqnRef$2;
650
+ }
651
+ declare const ElementRef = "ElementRef";
652
+ interface ElementStringProperty extends langium.AstNode {
653
+ readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
654
+ readonly $type: 'ElementStringProperty';
655
+ key: 'description' | 'summary' | 'technology' | 'title';
656
+ value: MarkdownOrString;
657
+ }
658
+ declare const ElementStringProperty = "ElementStringProperty";
659
+ interface ElementStyleProperty extends langium.AstNode {
660
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | ElementBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
661
+ readonly $type: 'ElementStyleProperty';
662
+ key: 'style';
663
+ props: Array<StyleProperty>;
664
+ }
665
+ declare const ElementStyleProperty = "ElementStyleProperty";
666
+ interface ElementTagExpression extends langium.AstNode {
667
+ readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
668
+ readonly $type: 'ElementTagExpression';
669
+ isEqual: boolean;
670
+ tag: TagRef;
671
+ }
672
+ declare const ElementTagExpression = "ElementTagExpression";
673
+ interface ElementView extends langium.AstNode {
674
+ readonly $container: ModelViews;
675
+ readonly $type: 'ElementView';
676
+ body?: ElementViewBody;
677
+ extends?: ElementViewRef;
678
+ name?: Id;
679
+ viewOf?: ElementRef;
680
+ }
681
+ declare const ElementView = "ElementView";
682
+ interface ElementViewBody extends langium.AstNode {
683
+ readonly $container: ElementView;
684
+ readonly $type: 'ElementViewBody';
685
+ props: Array<ViewProperty>;
686
+ rules: Array<ViewRule>;
687
+ tags?: Tags;
688
+ }
689
+ declare const ElementViewBody = "ElementViewBody";
690
+ interface ElementViewRef extends langium.AstNode {
691
+ readonly $container: ElementView;
692
+ readonly $type: 'ElementViewRef';
693
+ view: langium.Reference<ElementView>;
694
+ }
695
+ declare const ElementViewRef = "ElementViewRef";
696
+ interface Expressions extends langium.AstNode {
697
+ readonly $container: DeploymentViewRulePredicate | DynamicViewIncludePredicate | Expressions | ViewRulePredicate;
698
+ readonly $type: 'Expressions';
699
+ prev?: Expressions;
700
+ value: ExpressionV2;
701
+ }
702
+ declare const Expressions = "Expressions";
703
+ interface ExtendDeployment extends langium.AstNode {
704
+ readonly $container: ModelDeployments;
705
+ readonly $type: 'ExtendDeployment';
706
+ body: ExtendDeploymentBody;
707
+ deploymentNode: StrictFqnRef;
708
+ }
709
+ declare const ExtendDeployment = "ExtendDeployment";
710
+ interface ExtendDeploymentBody extends langium.AstNode {
711
+ readonly $container: ExtendDeployment;
712
+ readonly $type: 'ExtendDeploymentBody';
713
+ elements: Array<DeployedInstance | DeploymentNode | DeploymentRelation>;
714
+ props: Array<ExtendElementProperty>;
715
+ tags?: Tags;
716
+ }
717
+ declare const ExtendDeploymentBody = "ExtendDeploymentBody";
718
+ interface ExtendElement extends langium.AstNode {
719
+ readonly $container: Model;
720
+ readonly $type: 'ExtendElement';
721
+ body: ExtendElementBody;
722
+ element: StrictFqnElementRef;
723
+ }
724
+ declare const ExtendElement = "ExtendElement";
725
+ interface ExtendElementBody extends langium.AstNode {
726
+ readonly $container: ExtendElement;
727
+ readonly $type: 'ExtendElementBody';
728
+ elements: Array<Element | Relation>;
729
+ props: Array<ExtendElementProperty>;
730
+ tags?: Tags;
731
+ }
732
+ declare const ExtendElementBody = "ExtendElementBody";
733
+ interface ExtendRelation extends langium.AstNode {
734
+ readonly $container: Model;
735
+ readonly $type: 'ExtendRelation';
736
+ body: ExtendRelationBody;
737
+ dotKind?: RelationKindDotRef;
738
+ kind?: langium.Reference<RelationshipKind>;
739
+ source: FqnRef$2;
740
+ target: FqnRef$2;
741
+ title?: string;
742
+ }
743
+ declare const ExtendRelation = "ExtendRelation";
744
+ interface ExtendRelationBody extends langium.AstNode {
745
+ readonly $container: ExtendRelation;
746
+ readonly $type: 'ExtendRelationBody';
747
+ props: Array<ExtendRelationProperty>;
748
+ tags?: Tags;
749
+ }
750
+ declare const ExtendRelationBody = "ExtendRelationBody";
751
+ interface FqnExpressions extends langium.AstNode {
752
+ readonly $container: DeploymentViewRuleStyle | FqnExpressions | GlobalStyle | ViewRuleRank | ViewRuleStyle;
753
+ readonly $type: 'FqnExpressions';
754
+ prev?: FqnExpressions;
755
+ value: FqnExpr$2;
756
+ }
757
+ declare const FqnExpressions = "FqnExpressions";
758
+ interface FqnExprWhere extends langium.AstNode {
759
+ readonly $container: Expressions | FqnExprWith;
760
+ readonly $type: 'FqnExprWhere';
761
+ subject: FqnExpr$2;
762
+ where?: WhereElementExpression;
763
+ }
764
+ declare const FqnExprWhere = "FqnExprWhere";
765
+ interface FqnExprWith extends langium.AstNode {
766
+ readonly $container: Expressions;
767
+ readonly $type: 'FqnExprWith';
768
+ custom?: CustomElementProperties;
769
+ subject: FqnExprOrWhere;
770
+ }
771
+ declare const FqnExprWith = "FqnExprWith";
772
+ interface FqnRef$2 extends langium.AstNode {
773
+ readonly $container: DeploymentRelation | ElementRef | ExtendRelation | FqnRef$2 | FqnRefExpr | Relation;
774
+ readonly $type: 'FqnRef';
775
+ parent?: FqnRef$2;
776
+ value: langium.Reference<Referenceable>;
777
+ }
778
+ declare const FqnRef$2 = "FqnRef";
779
+ interface FqnRefExpr extends langium.AstNode {
780
+ readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
781
+ readonly $type: 'FqnRefExpr';
782
+ ref: FqnRef$2;
783
+ selector?: string;
784
+ }
785
+ declare const FqnRefExpr = "FqnRefExpr";
786
+ interface GlobalDynamicPredicateGroup extends langium.AstNode {
787
+ readonly $container: Globals;
788
+ readonly $type: 'GlobalDynamicPredicateGroup';
789
+ name: string;
790
+ predicates: Array<DynamicViewIncludePredicate>;
791
+ }
792
+ declare const GlobalDynamicPredicateGroup = "GlobalDynamicPredicateGroup";
793
+ interface GlobalPredicateGroup extends langium.AstNode {
794
+ readonly $container: Globals;
795
+ readonly $type: 'GlobalPredicateGroup';
796
+ name: string;
797
+ predicates: Array<ViewRulePredicate>;
798
+ }
799
+ declare const GlobalPredicateGroup = "GlobalPredicateGroup";
800
+ interface Globals extends langium.AstNode {
801
+ readonly $container: LikeC4Grammar;
802
+ readonly $type: 'Globals';
803
+ name: 'global';
804
+ predicates: Array<GlobalDynamicPredicateGroup | GlobalPredicateGroup>;
805
+ styles: Array<GlobalStyle | GlobalStyleGroup>;
806
+ }
807
+ declare const Globals = "Globals";
808
+ interface GlobalStyle extends langium.AstNode {
809
+ readonly $container: Globals;
810
+ readonly $type: 'GlobalStyle';
811
+ id: GlobalStyleId;
812
+ props: Array<NotationProperty | StyleProperty>;
813
+ targets: FqnExpressions;
814
+ }
815
+ declare const GlobalStyle = "GlobalStyle";
816
+ interface GlobalStyleGroup extends langium.AstNode {
817
+ readonly $container: Globals;
818
+ readonly $type: 'GlobalStyleGroup';
819
+ id: GlobalStyleId;
820
+ styles: Array<ViewRuleStyle>;
821
+ }
822
+ declare const GlobalStyleGroup = "GlobalStyleGroup";
823
+ interface GlobalStyleId extends langium.AstNode {
824
+ readonly $container: GlobalStyle | GlobalStyleGroup;
825
+ readonly $type: 'GlobalStyleId';
826
+ name: string;
827
+ }
828
+ declare const GlobalStyleId = "GlobalStyleId";
829
+ interface HexColor extends langium.AstNode {
830
+ readonly $container: SpecificationColor | SpecificationTag;
831
+ readonly $type: 'HexColor';
832
+ hex: number | string;
833
+ }
834
+ declare const HexColor = "HexColor";
835
+ interface IconColorProperty extends langium.AstNode {
836
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
837
+ readonly $type: 'IconColorProperty';
838
+ customColor?: langium.Reference<CustomColor>;
839
+ key: 'iconColor';
840
+ themeColor?: ThemeColor;
841
+ }
842
+ declare const IconColorProperty = "IconColorProperty";
843
+ interface IconPositionProperty extends langium.AstNode {
844
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
845
+ readonly $type: 'IconPositionProperty';
846
+ key: 'iconPosition';
847
+ value: IconPositionValue;
335
848
  }
336
- //#endregion
337
- //#region src/references/scope-computation.d.ts
338
- type ElementsContainer = Model | ElementBody | ExtendElementBody;
339
- type DeploymentsContainer = ModelDeployments | DeploymentNodeBody | ExtendDeploymentBody | DeployedInstanceBody;
340
- declare class LikeC4ScopeComputation extends DefaultScopeComputation {
341
- constructor(services: LikeC4Services);
342
- computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
343
- private exportViews;
344
- private exportGlobals;
345
- private exportModel;
346
- private exportLibrary;
347
- private exportSpecification;
348
- private exportDeployments;
349
- computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
350
- protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
351
- protected processDeployments(container: DeploymentsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
849
+ declare const IconPositionProperty = "IconPositionProperty";
850
+ interface IconProperty extends langium.AstNode {
851
+ readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | DeploymentViewRuleStyle | ElementBody | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
852
+ readonly $type: 'IconProperty';
853
+ key: 'icon';
854
+ libicon?: langium.Reference<LibIcon>;
855
+ value?: 'none' | Uri;
856
+ }
857
+ declare const IconProperty = "IconProperty";
858
+ interface IconSizeProperty extends langium.AstNode {
859
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
860
+ readonly $type: 'IconSizeProperty';
861
+ key: 'iconSize';
862
+ value: SizeValue;
352
863
  }
353
- //#endregion
354
- //#region src/workspace/IndexManager.d.ts
355
- declare class IndexManager extends DefaultIndexManager {
356
- protected services: LikeC4SharedServices;
357
- constructor(services: LikeC4SharedServices);
358
- updateContent(document: LangiumDocument, cancelToken?: CancellationToken): Promise<void>;
359
- projectElements(projectId: ProjectId, nodeType?: string, uris?: Set<string>): Stream<AstNodeDescription>;
864
+ declare const IconSizeProperty = "IconSizeProperty";
865
+ interface Imported extends langium.AstNode {
866
+ readonly $container: Imported | ImportsFromPoject;
867
+ readonly $type: 'Imported';
868
+ imported: langium.Reference<Element>;
869
+ prev?: Imported;
870
+ }
871
+ declare const Imported = "Imported";
872
+ interface ImportsFromPoject extends langium.AstNode {
873
+ readonly $container: LikeC4Grammar;
874
+ readonly $type: 'ImportsFromPoject';
875
+ imports: Imported;
876
+ project: string;
877
+ }
878
+ declare const ImportsFromPoject = "ImportsFromPoject";
879
+ interface IncomingRelationExpr extends langium.AstNode {
880
+ readonly $container: Expressions | InOutRelationExpr | RelationExprWhere | RelationExprWith;
881
+ readonly $type: 'IncomingRelationExpr';
882
+ to: FqnExpr$2;
883
+ }
884
+ declare const IncomingRelationExpr = "IncomingRelationExpr";
885
+ interface InOutRelationExpr extends langium.AstNode {
886
+ readonly $container: Expressions | RelationExprWhere | RelationExprWith;
887
+ readonly $type: 'InOutRelationExpr';
888
+ inout: IncomingRelationExpr;
889
+ }
890
+ declare const InOutRelationExpr = "InOutRelationExpr";
891
+ interface LibIcon extends langium.AstNode {
892
+ readonly $container: LikeC4Lib;
893
+ readonly $type: 'LibIcon';
894
+ name: IconId;
895
+ }
896
+ declare const LibIcon = "LibIcon";
897
+ interface LikeC4Grammar extends langium.AstNode {
898
+ readonly $type: 'LikeC4Grammar';
899
+ deployments: Array<ModelDeployments>;
900
+ globals: Array<Globals>;
901
+ imports: Array<ImportsFromPoject>;
902
+ likec4lib: Array<LikeC4Lib>;
903
+ models: Array<Model>;
904
+ specifications: Array<SpecificationRule>;
905
+ views: Array<ModelViews>;
906
+ }
907
+ declare const LikeC4Grammar = "LikeC4Grammar";
908
+ interface LikeC4Lib extends langium.AstNode {
909
+ readonly $container: LikeC4Grammar;
910
+ readonly $type: 'LikeC4Lib';
911
+ icons: Array<LibIcon>;
912
+ }
913
+ declare const LikeC4Lib = "LikeC4Lib";
914
+ interface LineProperty extends langium.AstNode {
915
+ readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
916
+ readonly $type: 'LineProperty';
917
+ key: 'line';
918
+ value: LineOptions;
919
+ }
920
+ declare const LineProperty = "LineProperty";
921
+ interface LinkProperty extends langium.AstNode {
922
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
923
+ readonly $type: 'LinkProperty';
924
+ key: 'link';
925
+ title?: string;
926
+ value: Uri;
927
+ }
928
+ declare const LinkProperty = "LinkProperty";
929
+ interface MarkdownOrString extends langium.AstNode {
930
+ readonly $container: ElementStringProperty | MetadataArray | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
931
+ readonly $type: 'MarkdownOrString';
932
+ markdown?: string;
933
+ text?: string;
934
+ }
935
+ declare const MarkdownOrString = "MarkdownOrString";
936
+ interface MetadataArray extends langium.AstNode {
937
+ readonly $container: MetadataAttribute;
938
+ readonly $type: 'MetadataArray';
939
+ values: Array<MarkdownOrString>;
940
+ }
941
+ declare const MetadataArray = "MetadataArray";
942
+ interface MetadataAttribute extends langium.AstNode {
943
+ readonly $container: MetadataBody;
944
+ readonly $type: 'MetadataAttribute';
945
+ key: string;
946
+ value: MetadataValue;
947
+ }
948
+ declare const MetadataAttribute = "MetadataAttribute";
949
+ interface MetadataBody extends langium.AstNode {
950
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | RelationBody;
951
+ readonly $type: 'MetadataBody';
952
+ props: Array<MetadataAttribute>;
953
+ }
954
+ declare const MetadataBody = "MetadataBody";
955
+ interface Model extends langium.AstNode {
956
+ readonly $container: LikeC4Grammar;
957
+ readonly $type: 'Model';
958
+ elements: Array<Element | ExtendElement | ExtendRelation | Relation>;
959
+ name: 'model';
960
+ }
961
+ declare const Model = "Model";
962
+ interface ModelDeployments extends langium.AstNode {
963
+ readonly $container: LikeC4Grammar;
964
+ readonly $type: 'ModelDeployments';
965
+ elements: Array<DeploymentNode | DeploymentRelation | ExtendDeployment>;
966
+ name: 'deployment';
967
+ }
968
+ declare const ModelDeployments = "ModelDeployments";
969
+ interface ModelViews extends langium.AstNode {
970
+ readonly $container: LikeC4Grammar;
971
+ readonly $type: 'ModelViews';
972
+ folder?: string;
973
+ name: 'views';
974
+ styles: Array<ViewRuleStyleOrGlobalRef>;
975
+ views: Array<LikeC4View>;
976
+ }
977
+ declare const ModelViews = "ModelViews";
978
+ interface MultipleProperty extends langium.AstNode {
979
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
980
+ readonly $type: 'MultipleProperty';
981
+ key: 'multiple';
982
+ value: boolean;
983
+ }
984
+ declare const MultipleProperty = "MultipleProperty";
985
+ interface NavigateToProperty extends langium.AstNode {
986
+ readonly $container: CustomElementProperties;
987
+ readonly $type: 'NavigateToProperty';
988
+ key: 'navigateTo';
989
+ value: ViewRef;
990
+ }
991
+ declare const NavigateToProperty = "NavigateToProperty";
992
+ interface NotationProperty extends langium.AstNode {
993
+ readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | GlobalStyle | ViewRuleStyle;
994
+ readonly $type: 'NotationProperty';
995
+ key: 'notation';
996
+ value: MarkdownOrString;
997
+ }
998
+ declare const NotationProperty = "NotationProperty";
999
+ interface NotesProperty extends langium.AstNode {
1000
+ readonly $container: CustomElementProperties | CustomRelationProperties;
1001
+ readonly $type: 'NotesProperty';
1002
+ key: 'notes';
1003
+ value: MarkdownOrString;
1004
+ }
1005
+ declare const NotesProperty = "NotesProperty";
1006
+ interface OpacityProperty extends langium.AstNode {
1007
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
1008
+ readonly $type: 'OpacityProperty';
1009
+ key: 'opacity';
1010
+ value: string;
1011
+ }
1012
+ declare const OpacityProperty = "OpacityProperty";
1013
+ interface OutgoingRelationExpr extends langium.AstNode {
1014
+ readonly $container: DirectedRelationExpr | Expressions | RelationExprWhere | RelationExprWith;
1015
+ readonly $type: 'OutgoingRelationExpr';
1016
+ dotKind?: RelationKindDotRef;
1017
+ from: FqnExpr$2;
1018
+ isBidirectional: boolean;
1019
+ kind?: langium.Reference<RelationshipKind>;
1020
+ }
1021
+ declare const OutgoingRelationExpr = "OutgoingRelationExpr";
1022
+ interface PaddingSizeProperty extends langium.AstNode {
1023
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
1024
+ readonly $type: 'PaddingSizeProperty';
1025
+ key: 'padding';
1026
+ value: SizeValue;
360
1027
  }
361
- //#endregion
362
- //#region src/workspace/LangiumDocuments.d.ts
363
- declare class LangiumDocuments extends DefaultLangiumDocuments {
364
- protected services: LikeC4SharedServices;
365
- constructor(services: LikeC4SharedServices);
366
- addDocument(document: LangiumDocument): void;
367
- getDocument(uri: URI): LikeC4LangiumDocument | undefined;
368
- /**
369
- * Returns all known documents, without any filtering.
370
- */
371
- get allKnownDocuments(): Stream<LangiumDocument>;
372
- get all(): Stream<LikeC4LangiumDocument>;
373
- /**
374
- * Returns all documents, excluding built-in documents and documents excluded by ProjectsManager.
375
- */
376
- get allExcludingBuiltin(): Stream<LikeC4LangiumDocument>;
377
- /**
378
- * Returns all documents for a project, including both project documents and documents included by the project.
379
- */
380
- projectDocuments(projectId: ProjectId): Stream<LikeC4LangiumDocument>;
381
- groupedByProject(): Record<ProjectId, NonEmptyArray<LikeC4LangiumDocument>>;
382
- /**
383
- * Reset the project IDs of all documents.
384
- */
385
- resetProjectIds(): void;
1028
+ declare const PaddingSizeProperty = "PaddingSizeProperty";
1029
+ interface Relation extends langium.AstNode {
1030
+ readonly $container: ElementBody | ExtendElementBody | Model;
1031
+ readonly $type: 'Relation';
1032
+ body?: RelationBody;
1033
+ description?: string;
1034
+ dotKind?: RelationKindDotRef;
1035
+ kind?: langium.Reference<RelationshipKind>;
1036
+ source?: FqnRef$2;
1037
+ tags?: Tags;
1038
+ target: FqnRef$2;
1039
+ technology?: string;
1040
+ title?: string;
1041
+ }
1042
+ declare const Relation = "Relation";
1043
+ interface RelationBody extends langium.AstNode {
1044
+ readonly $container: Relation;
1045
+ readonly $type: 'RelationBody';
1046
+ props: Array<RelationProperty>;
1047
+ tags?: Tags;
1048
+ }
1049
+ declare const RelationBody = "RelationBody";
1050
+ interface RelationExprWhere extends langium.AstNode {
1051
+ readonly $container: Expressions | RelationExprWith;
1052
+ readonly $type: 'RelationExprWhere';
1053
+ subject: RelationExpr$1;
1054
+ where?: WhereRelationExpression;
1055
+ }
1056
+ declare const RelationExprWhere = "RelationExprWhere";
1057
+ interface RelationExprWith extends langium.AstNode {
1058
+ readonly $container: Expressions;
1059
+ readonly $type: 'RelationExprWith';
1060
+ custom?: CustomRelationProperties;
1061
+ subject: RelationExprOrWhere;
1062
+ }
1063
+ declare const RelationExprWith = "RelationExprWith";
1064
+ interface RelationKindDotRef extends langium.AstNode {
1065
+ readonly $container: AbstractDynamicStep | DeploymentRelation | ExtendRelation | OutgoingRelationExpr | Relation;
1066
+ readonly $type: 'RelationKindDotRef';
1067
+ kind: langium.Reference<RelationshipKind>;
1068
+ }
1069
+ declare const RelationKindDotRef = "RelationKindDotRef";
1070
+ interface RelationNavigateToProperty extends langium.AstNode {
1071
+ readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
1072
+ readonly $type: 'RelationNavigateToProperty';
1073
+ key: 'navigateTo';
1074
+ value: DynamicViewRef;
1075
+ }
1076
+ declare const RelationNavigateToProperty = "RelationNavigateToProperty";
1077
+ interface RelationshipKind extends langium.AstNode {
1078
+ readonly $container: SpecificationRelationshipKind;
1079
+ readonly $type: 'RelationshipKind';
1080
+ name: Id;
1081
+ }
1082
+ declare const RelationshipKind = "RelationshipKind";
1083
+ interface RelationStringProperty extends langium.AstNode {
1084
+ readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
1085
+ readonly $type: 'RelationStringProperty';
1086
+ key: 'description' | 'technology' | 'title';
1087
+ value: MarkdownOrString;
1088
+ }
1089
+ declare const RelationStringProperty = "RelationStringProperty";
1090
+ interface RelationStyleProperty extends langium.AstNode {
1091
+ readonly $container: DeploymentRelationBody | RelationBody;
1092
+ readonly $type: 'RelationStyleProperty';
1093
+ key: 'style';
1094
+ props: Array<RelationshipStyleProperty>;
1095
+ }
1096
+ declare const RelationStyleProperty = "RelationStyleProperty";
1097
+ interface RGBAColor extends langium.AstNode {
1098
+ readonly $container: SpecificationColor | SpecificationTag;
1099
+ readonly $type: 'RGBAColor';
1100
+ alpha?: number | string;
1101
+ blue: number;
1102
+ green: number;
1103
+ red: number;
1104
+ }
1105
+ declare const RGBAColor = "RGBAColor";
1106
+ interface ShapeProperty extends langium.AstNode {
1107
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
1108
+ readonly $type: 'ShapeProperty';
1109
+ key: 'shape';
1110
+ value: ElementShape;
1111
+ }
1112
+ declare const ShapeProperty = "ShapeProperty";
1113
+ interface ShapeSizeProperty extends langium.AstNode {
1114
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
1115
+ readonly $type: 'ShapeSizeProperty';
1116
+ key: 'size';
1117
+ value: SizeValue;
386
1118
  }
387
- //#endregion
388
- //#region src/workspace/WorkspaceManager.d.ts
389
- declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
390
- private services;
391
- protected readonly documentFactory: LangiumDocumentFactory;
392
- protected readonly fileSystemProvider: FileSystemProvider$1;
393
- initialBuildOptions: BuildOptions;
394
- constructor(services: LikeC4SharedServices);
395
- /**
396
- * First load all project config files, then load all documents in the workspace.
397
- */
398
- protected performStartup(folders: WorkspaceFolder[]): Promise<LangiumDocument[]>;
399
- /**
400
- * Load all additional documents that shall be visible in the context of the given workspace
401
- * folders and add them to the collector. This can be used to include built-in libraries of
402
- * your language, which can be either loaded from provided files or constructed in memory.
403
- */
404
- protected loadAdditionalDocuments(folders: WorkspaceFolder[], collector: (document: LangiumDocument) => void): Promise<void>;
405
- /**
406
- * Determine whether the given folder entry shall be included while indexing the workspace.
407
- */
408
- protected includeEntry(_workspaceFolder: WorkspaceFolder, entry: FileSystemNode, selector: FileSelector): boolean;
409
- workspace(): WorkspaceFolder | null;
410
- rebuildAll(cancelToken?: Cancellation.CancellationToken): Promise<void>;
411
- get workspaceUri(): URI$2;
412
- get workspaceURL(): URL;
1119
+ declare const ShapeSizeProperty = "ShapeSizeProperty";
1120
+ interface SpecificationColor extends langium.AstNode {
1121
+ readonly $container: SpecificationRule;
1122
+ readonly $type: 'SpecificationColor';
1123
+ color: ColorLiteral$1;
1124
+ name: CustomColor;
1125
+ }
1126
+ declare const SpecificationColor = "SpecificationColor";
1127
+ interface SpecificationDeploymentNodeKind extends langium.AstNode {
1128
+ readonly $container: SpecificationRule;
1129
+ readonly $type: 'SpecificationDeploymentNodeKind';
1130
+ kind: DeploymentNodeKind;
1131
+ props: Array<ElementStyleProperty | LinkProperty | SpecificationElementStringProperty>;
1132
+ tags?: Tags;
1133
+ }
1134
+ declare const SpecificationDeploymentNodeKind = "SpecificationDeploymentNodeKind";
1135
+ interface SpecificationElementKind extends langium.AstNode {
1136
+ readonly $container: SpecificationRule;
1137
+ readonly $type: 'SpecificationElementKind';
1138
+ kind: ElementKind;
1139
+ props: Array<ElementStyleProperty | LinkProperty | SpecificationElementStringProperty>;
1140
+ tags?: Tags;
1141
+ }
1142
+ declare const SpecificationElementKind = "SpecificationElementKind";
1143
+ interface SpecificationElementStringProperty extends langium.AstNode {
1144
+ readonly $container: SpecificationDeploymentNodeKind | SpecificationElementKind;
1145
+ readonly $type: 'SpecificationElementStringProperty';
1146
+ key: 'description' | 'notation' | 'summary' | 'technology' | 'title';
1147
+ value: MarkdownOrString;
1148
+ }
1149
+ declare const SpecificationElementStringProperty = "SpecificationElementStringProperty";
1150
+ interface SpecificationRelationshipKind extends langium.AstNode {
1151
+ readonly $container: SpecificationRule;
1152
+ readonly $type: 'SpecificationRelationshipKind';
1153
+ kind: RelationshipKind;
1154
+ props: Array<RelationshipStyleProperty | SpecificationRelationshipStringProperty>;
1155
+ }
1156
+ declare const SpecificationRelationshipKind = "SpecificationRelationshipKind";
1157
+ interface SpecificationRelationshipStringProperty extends langium.AstNode {
1158
+ readonly $container: SpecificationRelationshipKind;
1159
+ readonly $type: 'SpecificationRelationshipStringProperty';
1160
+ key: 'notation' | 'technology';
1161
+ value: MarkdownOrString;
1162
+ }
1163
+ declare const SpecificationRelationshipStringProperty = "SpecificationRelationshipStringProperty";
1164
+ interface SpecificationRule extends langium.AstNode {
1165
+ readonly $container: LikeC4Grammar;
1166
+ readonly $type: 'SpecificationRule';
1167
+ colors: Array<SpecificationColor>;
1168
+ deploymentNodes: Array<SpecificationDeploymentNodeKind>;
1169
+ elements: Array<SpecificationElementKind>;
1170
+ name: 'specification';
1171
+ relationships: Array<SpecificationRelationshipKind>;
1172
+ tags: Array<SpecificationTag>;
1173
+ }
1174
+ declare const SpecificationRule = "SpecificationRule";
1175
+ interface SpecificationTag extends langium.AstNode {
1176
+ readonly $container: SpecificationRule;
1177
+ readonly $type: 'SpecificationTag';
1178
+ color?: ColorLiteral$1;
1179
+ tag: Tag$1;
1180
+ }
1181
+ declare const SpecificationTag = "SpecificationTag";
1182
+ interface StrictFqnElementRef extends langium.AstNode {
1183
+ readonly $container: ExtendElement | StrictFqnElementRef;
1184
+ readonly $type: 'StrictFqnElementRef';
1185
+ el: langium.Reference<Element>;
1186
+ parent?: StrictFqnElementRef;
1187
+ }
1188
+ declare const StrictFqnElementRef = "StrictFqnElementRef";
1189
+ interface StrictFqnRef extends langium.AstNode {
1190
+ readonly $container: ExtendDeployment | StrictFqnRef;
1191
+ readonly $type: 'StrictFqnRef';
1192
+ parent?: StrictFqnRef;
1193
+ value: langium.Reference<Referenceable>;
1194
+ }
1195
+ declare const StrictFqnRef = "StrictFqnRef";
1196
+ interface Tag$1 extends langium.AstNode {
1197
+ readonly $container: SpecificationTag;
1198
+ readonly $type: 'Tag';
1199
+ name: Id;
1200
+ }
1201
+ declare const Tag$1 = "Tag";
1202
+ interface TagRef extends langium.AstNode {
1203
+ readonly $container: ElementTagExpression | Tags | WhereElementTag | WhereRelationParticipantTag | WhereRelationTag;
1204
+ readonly $type: 'TagRef';
1205
+ tag: langium.Reference<Tag$1>;
1206
+ }
1207
+ declare const TagRef = "TagRef";
1208
+ interface Tags extends langium.AstNode {
1209
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | Relation | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind | Tags;
1210
+ readonly $type: 'Tags';
1211
+ prev?: Tags;
1212
+ values: Array<TagRef>;
1213
+ }
1214
+ declare const Tags = "Tags";
1215
+ interface TextSizeProperty extends langium.AstNode {
1216
+ readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
1217
+ readonly $type: 'TextSizeProperty';
1218
+ key: 'textSize';
1219
+ value: SizeValue;
413
1220
  }
1221
+ declare const TextSizeProperty = "TextSizeProperty";
1222
+ interface ViewRef extends langium.AstNode {
1223
+ readonly $container: NavigateToProperty;
1224
+ readonly $type: 'ViewRef';
1225
+ view: langium.Reference<LikeC4View>;
1226
+ }
1227
+ declare const ViewRef = "ViewRef";
1228
+ interface ViewRuleAutoLayout extends langium.AstNode {
1229
+ readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
1230
+ readonly $type: 'ViewRuleAutoLayout';
1231
+ direction: ViewLayoutDirection;
1232
+ nodeSep?: number;
1233
+ rankSep?: number;
1234
+ }
1235
+ declare const ViewRuleAutoLayout = "ViewRuleAutoLayout";
1236
+ interface ViewRuleGlobalPredicateRef extends langium.AstNode {
1237
+ readonly $container: ElementViewBody;
1238
+ readonly $type: 'ViewRuleGlobalPredicateRef';
1239
+ predicate: langium.Reference<GlobalPredicateGroup>;
1240
+ }
1241
+ declare const ViewRuleGlobalPredicateRef = "ViewRuleGlobalPredicateRef";
1242
+ interface ViewRuleGlobalStyle extends langium.AstNode {
1243
+ readonly $container: DynamicViewBody | ElementViewBody | ModelViews;
1244
+ readonly $type: 'ViewRuleGlobalStyle';
1245
+ style: langium.Reference<GlobalStyleId>;
1246
+ }
1247
+ declare const ViewRuleGlobalStyle = "ViewRuleGlobalStyle";
1248
+ interface ViewRuleGroup extends langium.AstNode {
1249
+ readonly $container: ElementViewBody | ViewRuleGroup;
1250
+ readonly $type: 'ViewRuleGroup';
1251
+ groupRules: Array<ViewRuleGroup | ViewRulePredicate>;
1252
+ props: Array<BorderProperty | ColorProperty | OpacityProperty>;
1253
+ title?: string;
1254
+ }
1255
+ declare const ViewRuleGroup = "ViewRuleGroup";
1256
+ interface ViewRulePredicate extends langium.AstNode {
1257
+ readonly $container: ElementViewBody | GlobalPredicateGroup | ViewRuleGroup;
1258
+ readonly $type: 'ViewRulePredicate';
1259
+ exprs: Expressions;
1260
+ isInclude: boolean;
1261
+ }
1262
+ declare const ViewRulePredicate = "ViewRulePredicate";
1263
+ interface ViewRuleRank extends langium.AstNode {
1264
+ readonly $container: ElementViewBody;
1265
+ readonly $type: 'ViewRuleRank';
1266
+ targets: FqnExpressions;
1267
+ value?: RankValue;
1268
+ }
1269
+ declare const ViewRuleRank = "ViewRuleRank";
1270
+ interface ViewRuleStyle extends langium.AstNode {
1271
+ readonly $container: DynamicViewBody | ElementViewBody | GlobalStyleGroup | ModelViews;
1272
+ readonly $type: 'ViewRuleStyle';
1273
+ props: Array<NotationProperty | StyleProperty>;
1274
+ targets: FqnExpressions;
1275
+ }
1276
+ declare const ViewRuleStyle = "ViewRuleStyle";
1277
+ interface ViewStringProperty extends langium.AstNode {
1278
+ readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
1279
+ readonly $type: 'ViewStringProperty';
1280
+ key: 'description' | 'title';
1281
+ value: MarkdownOrString;
1282
+ }
1283
+ declare const ViewStringProperty = "ViewStringProperty";
1284
+ interface WhereBinaryExpression extends langium.AstNode {
1285
+ readonly $container: FqnExprWhere | RelationExprWhere | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
1286
+ readonly $type: 'WhereBinaryExpression';
1287
+ left: WhereElementExpression | WhereRelationExpression;
1288
+ operator: 'and' | 'or';
1289
+ right: WhereElementExpression | WhereRelationExpression;
1290
+ }
1291
+ declare const WhereBinaryExpression = "WhereBinaryExpression";
1292
+ interface WhereElementKind extends langium.AstNode {
1293
+ readonly $container: FqnExprWhere | WhereBinaryExpression | WhereElementNegation;
1294
+ readonly $type: 'WhereElementKind';
1295
+ not: boolean;
1296
+ operator: 'is' | string;
1297
+ value: langium.Reference<DeploymentNodeOrElementKind>;
1298
+ }
1299
+ declare const WhereElementKind = "WhereElementKind";
1300
+ interface WhereElementNegation extends langium.AstNode {
1301
+ readonly $container: FqnExprWhere | WhereBinaryExpression | WhereElementNegation;
1302
+ readonly $type: 'WhereElementNegation';
1303
+ value: WhereElementExpression;
1304
+ }
1305
+ declare const WhereElementNegation = "WhereElementNegation";
1306
+ interface WhereElementTag extends langium.AstNode {
1307
+ readonly $container: FqnExprWhere | WhereBinaryExpression | WhereElementNegation;
1308
+ readonly $type: 'WhereElementTag';
1309
+ not: boolean;
1310
+ operator: 'is' | string;
1311
+ value: TagRef;
1312
+ }
1313
+ declare const WhereElementTag = "WhereElementTag";
1314
+ interface WhereRelationKind extends langium.AstNode {
1315
+ readonly $container: RelationExprWhere | WhereBinaryExpression | WhereRelationNegation;
1316
+ readonly $type: 'WhereRelationKind';
1317
+ not: boolean;
1318
+ operator: 'is' | string;
1319
+ value: langium.Reference<RelationshipKind>;
1320
+ }
1321
+ declare const WhereRelationKind = "WhereRelationKind";
1322
+ interface WhereRelationNegation extends langium.AstNode {
1323
+ readonly $container: RelationExprWhere | WhereBinaryExpression | WhereRelationNegation;
1324
+ readonly $type: 'WhereRelationNegation';
1325
+ value: WhereRelationExpression;
1326
+ }
1327
+ declare const WhereRelationNegation = "WhereRelationNegation";
1328
+ interface WhereRelationParticipantKind extends langium.AstNode {
1329
+ readonly $container: RelationExprWhere | WhereBinaryExpression | WhereRelationNegation;
1330
+ readonly $type: 'WhereRelationParticipantKind';
1331
+ not: boolean;
1332
+ operator: 'is' | string;
1333
+ participant: Participant;
1334
+ value: langium.Reference<DeploymentNodeOrElementKind>;
1335
+ }
1336
+ declare const WhereRelationParticipantKind = "WhereRelationParticipantKind";
1337
+ interface WhereRelationParticipantTag extends langium.AstNode {
1338
+ readonly $container: RelationExprWhere | WhereBinaryExpression | WhereRelationNegation;
1339
+ readonly $type: 'WhereRelationParticipantTag';
1340
+ not: boolean;
1341
+ operator: 'is' | string;
1342
+ participant: Participant;
1343
+ value: TagRef;
1344
+ }
1345
+ declare const WhereRelationParticipantTag = "WhereRelationParticipantTag";
1346
+ interface WhereRelationTag extends langium.AstNode {
1347
+ readonly $container: RelationExprWhere | WhereBinaryExpression | WhereRelationNegation;
1348
+ readonly $type: 'WhereRelationTag';
1349
+ not: boolean;
1350
+ operator: 'is' | string;
1351
+ value: TagRef;
1352
+ }
1353
+ declare const WhereRelationTag = "WhereRelationTag";
1354
+ interface WildcardExpression extends langium.AstNode {
1355
+ readonly $container: DirectedRelationExpr | Expressions | FqnExprWhere | FqnExprWith | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
1356
+ readonly $type: 'WildcardExpression';
1357
+ isWildcard: boolean;
1358
+ }
1359
+ declare const WildcardExpression = "WildcardExpression";
1360
+ interface DynamicStepChain extends AbstractDynamicStep {
1361
+ readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
1362
+ readonly $type: 'DynamicStepChain';
1363
+ source: DynamicStepChain | DynamicStepSingle;
1364
+ }
1365
+ declare const DynamicStepChain = "DynamicStepChain";
1366
+ interface DynamicStepSingle extends AbstractDynamicStep {
1367
+ readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
1368
+ readonly $type: 'DynamicStepSingle';
1369
+ isBackward: boolean;
1370
+ source: ElementRef;
1371
+ }
1372
+ declare const DynamicStepSingle = "DynamicStepSingle";
1373
+ type LikeC4AstType = {
1374
+ AbstractDynamicStep: AbstractDynamicStep;
1375
+ AnyProperty: AnyProperty;
1376
+ ArrowProperty: ArrowProperty;
1377
+ BorderProperty: BorderProperty;
1378
+ ColorLiteral: ColorLiteral$1;
1379
+ ColorProperty: ColorProperty;
1380
+ CustomColor: CustomColor;
1381
+ CustomElementProperties: CustomElementProperties;
1382
+ CustomRelationProperties: CustomRelationProperties;
1383
+ DeployedInstance: DeployedInstance;
1384
+ DeployedInstanceBody: DeployedInstanceBody;
1385
+ DeploymentElement: DeploymentElement;
1386
+ DeploymentNode: DeploymentNode;
1387
+ DeploymentNodeBody: DeploymentNodeBody;
1388
+ DeploymentNodeKind: DeploymentNodeKind;
1389
+ DeploymentNodeOrElementKind: DeploymentNodeOrElementKind;
1390
+ DeploymentRelation: DeploymentRelation;
1391
+ DeploymentRelationBody: DeploymentRelationBody;
1392
+ DeploymentView: DeploymentView;
1393
+ DeploymentViewBody: DeploymentViewBody;
1394
+ DeploymentViewRule: DeploymentViewRule;
1395
+ DeploymentViewRulePredicate: DeploymentViewRulePredicate;
1396
+ DeploymentViewRuleStyle: DeploymentViewRuleStyle;
1397
+ DirectedRelationExpr: DirectedRelationExpr;
1398
+ DynamicStepChain: DynamicStepChain;
1399
+ DynamicStepSingle: DynamicStepSingle;
1400
+ DynamicView: DynamicView;
1401
+ DynamicViewBody: DynamicViewBody;
1402
+ DynamicViewDisplayVariantProperty: DynamicViewDisplayVariantProperty;
1403
+ DynamicViewGlobalPredicateRef: DynamicViewGlobalPredicateRef;
1404
+ DynamicViewIncludePredicate: DynamicViewIncludePredicate;
1405
+ DynamicViewParallelSteps: DynamicViewParallelSteps;
1406
+ DynamicViewProperty: DynamicViewProperty;
1407
+ DynamicViewRef: DynamicViewRef;
1408
+ DynamicViewRule: DynamicViewRule;
1409
+ DynamicViewStep: DynamicViewStep;
1410
+ Element: Element;
1411
+ ElementBody: ElementBody;
1412
+ ElementKind: ElementKind;
1413
+ ElementKindExpression: ElementKindExpression;
1414
+ ElementProperty: ElementProperty;
1415
+ ElementRef: ElementRef;
1416
+ ElementStringProperty: ElementStringProperty;
1417
+ ElementStyleProperty: ElementStyleProperty;
1418
+ ElementTagExpression: ElementTagExpression;
1419
+ ElementView: ElementView;
1420
+ ElementViewBody: ElementViewBody;
1421
+ ElementViewRef: ElementViewRef;
1422
+ ExpressionV2: ExpressionV2;
1423
+ Expressions: Expressions;
1424
+ ExtendDeployment: ExtendDeployment;
1425
+ ExtendDeploymentBody: ExtendDeploymentBody;
1426
+ ExtendElement: ExtendElement;
1427
+ ExtendElementBody: ExtendElementBody;
1428
+ ExtendElementProperty: ExtendElementProperty;
1429
+ ExtendRelation: ExtendRelation;
1430
+ ExtendRelationBody: ExtendRelationBody;
1431
+ ExtendRelationProperty: ExtendRelationProperty;
1432
+ FqnExpr: FqnExpr$2;
1433
+ FqnExprOrWhere: FqnExprOrWhere;
1434
+ FqnExprOrWith: FqnExprOrWith;
1435
+ FqnExprWhere: FqnExprWhere;
1436
+ FqnExprWith: FqnExprWith;
1437
+ FqnExpressions: FqnExpressions;
1438
+ FqnRef: FqnRef$2;
1439
+ FqnRefExpr: FqnRefExpr;
1440
+ FqnReferenceable: FqnReferenceable;
1441
+ GlobalDynamicPredicateGroup: GlobalDynamicPredicateGroup;
1442
+ GlobalPredicateGroup: GlobalPredicateGroup;
1443
+ GlobalStyle: GlobalStyle;
1444
+ GlobalStyleGroup: GlobalStyleGroup;
1445
+ GlobalStyleId: GlobalStyleId;
1446
+ Globals: Globals;
1447
+ HexColor: HexColor;
1448
+ IconColorProperty: IconColorProperty;
1449
+ IconPositionProperty: IconPositionProperty;
1450
+ IconProperty: IconProperty;
1451
+ IconSizeProperty: IconSizeProperty;
1452
+ Imported: Imported;
1453
+ ImportsFromPoject: ImportsFromPoject;
1454
+ InOutRelationExpr: InOutRelationExpr;
1455
+ IncomingRelationExpr: IncomingRelationExpr;
1456
+ LibIcon: LibIcon;
1457
+ LikeC4Grammar: LikeC4Grammar;
1458
+ LikeC4Lib: LikeC4Lib;
1459
+ LikeC4View: LikeC4View;
1460
+ LineProperty: LineProperty;
1461
+ LinkProperty: LinkProperty;
1462
+ MarkdownOrString: MarkdownOrString;
1463
+ MetadataArray: MetadataArray;
1464
+ MetadataAttribute: MetadataAttribute;
1465
+ MetadataBody: MetadataBody;
1466
+ MetadataProperty: MetadataProperty;
1467
+ MetadataValue: MetadataValue;
1468
+ Model: Model;
1469
+ ModelDeployments: ModelDeployments;
1470
+ ModelReferenceable: ModelReferenceable;
1471
+ ModelViews: ModelViews;
1472
+ MultipleProperty: MultipleProperty;
1473
+ NavigateToProperty: NavigateToProperty;
1474
+ NotationProperty: NotationProperty;
1475
+ NotesProperty: NotesProperty;
1476
+ OpacityProperty: OpacityProperty;
1477
+ OutgoingRelationExpr: OutgoingRelationExpr;
1478
+ PaddingSizeProperty: PaddingSizeProperty;
1479
+ RGBAColor: RGBAColor;
1480
+ Referenceable: Referenceable;
1481
+ Relation: Relation;
1482
+ RelationBody: RelationBody;
1483
+ RelationExpr: RelationExpr$1;
1484
+ RelationExprOrWhere: RelationExprOrWhere;
1485
+ RelationExprOrWith: RelationExprOrWith;
1486
+ RelationExprWhere: RelationExprWhere;
1487
+ RelationExprWith: RelationExprWith;
1488
+ RelationKindDotRef: RelationKindDotRef;
1489
+ RelationNavigateToProperty: RelationNavigateToProperty;
1490
+ RelationProperty: RelationProperty;
1491
+ RelationStringProperty: RelationStringProperty;
1492
+ RelationStyleProperty: RelationStyleProperty;
1493
+ RelationshipKind: RelationshipKind;
1494
+ RelationshipStyleProperty: RelationshipStyleProperty;
1495
+ ShapeProperty: ShapeProperty;
1496
+ ShapeSizeProperty: ShapeSizeProperty;
1497
+ SizeProperty: SizeProperty;
1498
+ SpecificationColor: SpecificationColor;
1499
+ SpecificationDeploymentNodeKind: SpecificationDeploymentNodeKind;
1500
+ SpecificationElementKind: SpecificationElementKind;
1501
+ SpecificationElementStringProperty: SpecificationElementStringProperty;
1502
+ SpecificationRelationshipKind: SpecificationRelationshipKind;
1503
+ SpecificationRelationshipStringProperty: SpecificationRelationshipStringProperty;
1504
+ SpecificationRule: SpecificationRule;
1505
+ SpecificationTag: SpecificationTag;
1506
+ StrictFqnElementRef: StrictFqnElementRef;
1507
+ StrictFqnRef: StrictFqnRef;
1508
+ StringProperty: StringProperty;
1509
+ StyleProperty: StyleProperty;
1510
+ Tag: Tag$1;
1511
+ TagRef: TagRef;
1512
+ Tags: Tags;
1513
+ TextSizeProperty: TextSizeProperty;
1514
+ ViewProperty: ViewProperty;
1515
+ ViewRef: ViewRef;
1516
+ ViewRule: ViewRule;
1517
+ ViewRuleAutoLayout: ViewRuleAutoLayout;
1518
+ ViewRuleGlobalPredicateRef: ViewRuleGlobalPredicateRef;
1519
+ ViewRuleGlobalStyle: ViewRuleGlobalStyle;
1520
+ ViewRuleGroup: ViewRuleGroup;
1521
+ ViewRulePredicate: ViewRulePredicate;
1522
+ ViewRuleRank: ViewRuleRank;
1523
+ ViewRuleStyle: ViewRuleStyle;
1524
+ ViewRuleStyleOrGlobalRef: ViewRuleStyleOrGlobalRef;
1525
+ ViewStringProperty: ViewStringProperty;
1526
+ WhereBinaryExpression: WhereBinaryExpression;
1527
+ WhereElement: WhereElement;
1528
+ WhereElementExpression: WhereElementExpression;
1529
+ WhereElementKind: WhereElementKind;
1530
+ WhereElementNegation: WhereElementNegation;
1531
+ WhereElementTag: WhereElementTag;
1532
+ WhereExpression: WhereExpression;
1533
+ WhereKindEqual: WhereKindEqual;
1534
+ WhereRelation: WhereRelation;
1535
+ WhereRelationExpression: WhereRelationExpression;
1536
+ WhereRelationKind: WhereRelationKind;
1537
+ WhereRelationNegation: WhereRelationNegation;
1538
+ WhereRelationParticipantKind: WhereRelationParticipantKind;
1539
+ WhereRelationParticipantTag: WhereRelationParticipantTag;
1540
+ WhereRelationTag: WhereRelationTag;
1541
+ WhereTagEqual: WhereTagEqual;
1542
+ WildcardExpression: WildcardExpression;
1543
+ };
414
1544
  //#endregion
415
- //#region src/references/scope-provider.d.ts
416
- declare class LikeC4ScopeProvider extends DefaultScopeProvider {
417
- protected deploymentsIndex: DeploymentsIndex;
418
- protected fqnIndex: FqnIndex;
419
- protected readonly indexManager: IndexManager;
1545
+ //#region src/validation/DocumentValidator.d.ts
1546
+ declare class LikeC4DocumentValidator extends DefaultDocumentValidator {
1547
+ protected services: LikeC4Services;
420
1548
  constructor(services: LikeC4Services);
421
- getScope(context: ReferenceInfo): Scope;
422
- protected genUniqueDescedants(element: Element | DeploymentNode | undefined): Generator<AstNodeDescriptionWithFqn, void, any>;
423
- protected genScopeExtendElement({
424
- element
425
- }: ExtendElement): Generator<AstNodeDescription>;
426
- protected genScopeElementView({
427
- viewOf,
428
- extends: ext
429
- }: ElementView): Generator<AstNodeDescription>;
430
- protected getScopeForStrictFqnRef(projectId: ProjectId, container: StrictFqnRef, context: ReferenceInfo): Scope;
431
- protected genScopeExtendDeployment({
432
- deploymentNode
433
- }: ExtendDeployment): Generator<AstNodeDescription>;
434
- protected streamForFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Stream<AstNodeDescription>;
435
- protected genScopeForParentlessFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Generator<AstNodeDescription>;
436
- /**
437
- * Computes the scope for a given reference context.
438
- *
439
- * @param context - The reference information containing the context for which the scope is being computed.
440
- * @param referenceType - The type of reference being resolved. Defaults to the reference type derived from the context.
441
- * @returns A scope containing the relevant AST node descriptions for the given reference context.
442
- *
443
- * This method first checks if there are precomputed scopes available in the document. If not, it falls back to the global scope.
444
- * It then iterates through the container hierarchy, collecting relevant scopes based on the reference type and container type.
445
- * Finally, it combines the collected scopes with the global scope to produce the final scope.
446
- */
447
- protected computeScope(projectId: ProjectId, context: ReferenceInfo, referenceType?: string): Generator<AstNodeDescription>;
448
- /**
449
- * Create a global scope filtered for the given reference type.
450
- */
451
- protected getProjectScope(projectId: ProjectId, referenceType: string, context: ReferenceInfo): Scope;
452
1549
  /**
453
- * Create a global scope filtered for the given reference type.
1550
+ * If the document is excluded, then we skip validation and return an empty array of diagnostics.
454
1551
  */
455
- protected getGlobalScope(referenceType: string, context: ReferenceInfo): Scope;
1552
+ validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: Cancellation.CancellationToken): Promise<Diagnostic[]>;
456
1553
  }
457
1554
  //#endregion
458
- //#region src/lsp/DocumentSymbolProvider.d.ts
459
- declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
460
- private services;
461
- protected readonly nodeKindProvider: NodeKindProvider;
462
- protected readonly nameProvider: LikeC4NameProvider;
463
- protected readonly parser: LikeC4ModelParser;
464
- protected readonly locator: LikeC4ModelLocator;
465
- constructor(services: LikeC4Services);
466
- getSymbols(doc: LangiumDocument, _params: DocumentSymbolParams, cancelToken?: CancellationToken): Promise<DocumentSymbol[]>;
467
- protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
468
- protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
469
- protected getModelSymbol(astModel: Model): DocumentSymbol[];
470
- protected getDeploymentModelSymbol(astModel: ModelDeployments): DocumentSymbol[];
471
- protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
472
- protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
473
- protected getElementSymbol(astElement: Element): DocumentSymbol[];
474
- protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
475
- protected getKindSymbol(astKind: SpecificationElementKind | SpecificationRelationshipKind): DocumentSymbol | null;
476
- protected getTagSymbol(astTag: SpecificationTag): DocumentSymbol | null;
477
- protected getLibIconSymbol(astTag: LibIcon): DocumentSymbol | null;
478
- protected getViewSymbol(astView: LikeC4View): DocumentSymbol[];
479
- protected getDeploymentElementSymbol(el: DeploymentElement | DeploymentRelation | ExtendDeployment): DocumentSymbol[];
480
- protected getDeploymentNodeSymbol(astElement: DeploymentNode): DocumentSymbol[];
481
- protected getDeployedInstanceSymbol(astElement: DeployedInstance): DocumentSymbol[];
482
- protected symbolKind(node: AstNode): SymbolKind;
483
- }
1555
+ //#region src/validation/index.d.ts
1556
+ declare const isValidatableAstNode: any;
1557
+ type ValidatableAstNode = GuardedBy<typeof isValidatableAstNode>;
1558
+ declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
1559
+ isValid: (n: ValidatableAstNode) => boolean;
1560
+ invalidNodes: WeakSet<WeakKey>;
1561
+ };
1562
+ type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
1563
+ type IsValidFn = ChecksFromDiagnostics['isValid'];
484
1564
  //#endregion
485
- //#region src/lsp/HoverProvider.d.ts
486
- declare class LikeC4HoverProvider extends AstNodeHoverProvider {
487
- private parser;
488
- private locator;
489
- constructor(services: LikeC4Services);
490
- protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
491
- }
492
- //#endregion
493
- //#region src/lsp/CodeActionProvider.d.ts
494
- type CommandOrCodeAction = Command | CodeAction;
495
- declare class LikeC4CodeActionProvider implements CodeActionProvider {
496
- /**
497
- * Handle a code action request.
498
- *
499
- * @throws `OperationCancelled` if cancellation is detected during execution
500
- * @throws `ResponseError` if an error is detected that should be sent as response to the client
501
- */
502
- getCodeActions(document: LangiumDocument, params: CodeActionParams): CommandOrCodeAction[] | undefined;
503
- }
504
- //#endregion
505
- //#region src/lsp/SemanticTokenProvider.d.ts
506
- declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
507
- protected services: LikeC4Services;
508
- private rules;
509
- constructor(services: LikeC4Services);
510
- protected initRules(): void;
511
- semanticHighlight(document: LangiumDocument, params: SemanticTokensParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens>;
512
- semanticHighlightRange(document: LangiumDocument, params: SemanticTokensRangeParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens>;
513
- semanticHighlightDelta(document: LangiumDocument, params: SemanticTokensDeltaParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens | SemanticTokensDelta>;
514
- protected ensureState(document: LangiumDocument, cancelToken: CancellationToken$1): Promise<void>;
515
- protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
516
- private highlightNameAndKind;
517
- private highlightView;
518
- private mark;
519
- }
520
- //#endregion
521
- //#region src/mcp/types.d.ts
522
- interface LikeC4MCPServer {
523
- readonly mcp: McpServer;
524
- readonly isStarted: boolean;
525
- readonly port: number;
526
- start(port?: number): Promise<void>;
527
- stop(): Promise<void>;
528
- }
529
- interface LikeC4MCPServerFactory {
530
- create(options?: ServerOptions): McpServer;
531
- }
532
- interface LikeC4MCPServerModuleContext {
533
- mcpServer: (services: LikeC4Services) => LikeC4MCPServer;
534
- mcpServerFactory: (services: LikeC4Services) => LikeC4MCPServerFactory;
535
- }
536
- //#endregion
537
- //#region src/mcp/index.d.ts
538
- declare const NoMCPServer: LikeC4MCPServerModuleContext;
539
- //#endregion
540
- //#region src/model-change/ModelChanges.d.ts
541
- declare class LikeC4ModelChanges {
542
- private services;
543
- private locator;
544
- constructor(services: LikeC4Services);
545
- applyChange(changeView: ChangeView.Params): Promise<ChangeView.Res>;
546
- protected convertToTextEdit({
547
- lookup,
548
- change
549
- }: {
550
- lookup: ViewLocateResult;
551
- change: Exclude<ViewChange, ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout>;
552
- }): {
553
- modifiedRange: Range;
554
- edits: TextEdit[];
555
- };
556
- }
557
- //#endregion
558
- //#region src/utils/disposable.d.ts
559
- declare abstract class ADisposable implements Disposable {
560
- protected toDispose: Disposable[];
561
- protected isDisposed: boolean;
562
- onDispose(...disposable: Disposable[]): void;
563
- dispose(): void;
564
- protected throwIfDisposed(): void;
565
- }
566
- //#endregion
567
- //#region src/Rpc.d.ts
568
- declare class Rpc extends ADisposable {
569
- private services;
570
- constructor(services: LikeC4Services);
571
- init(): void;
572
- openView(params: DidRequestOpenViewNotification.Params): Promise<void>;
573
- }
574
- //#endregion
575
- //#region src/shared/NodeKindProvider.d.ts
576
- declare class NodeKindProvider$1 implements NodeKindProvider {
577
- private services;
578
- constructor(services: LangiumSharedServices);
579
- /**
580
- * Returns a `SymbolKind` as used by `WorkspaceSymbolProvider` or `DocumentSymbolProvider`.
581
- */
582
- getSymbolKind(node: AstNode | AstNodeDescription): SymbolKind;
583
- /**
584
- * Returns a `CompletionItemKind` as used by the `CompletionProvider`.
585
- */
586
- getCompletionItemKind(node: AstNode | AstNodeDescription): CompletionItemKind;
587
- }
588
- //#endregion
589
- //#region src/shared/WorkspaceSymbolProvider.d.ts
590
- declare class WorkspaceSymbolProvider extends DefaultWorkspaceSymbolProvider {}
591
- //#endregion
592
- //#region src/views/LikeC4Views.d.ts
593
- type GraphvizOut = {
594
- readonly dot: string;
595
- readonly diagram: LayoutedView;
596
- };
597
- type GraphvizSvgOut = {
598
- readonly id: ViewId;
599
- readonly dot: string;
600
- readonly svg: string;
601
- };
602
- type LayoutViewParams = {
603
- viewId: ViewId;
604
- /**
605
- * Type of layout to apply
606
- * - 'manual' - applies manual layout if any
607
- * - 'auto' - returns latest version with drifts from manual layout if any
608
- * - undefined - returns latest layout as is
609
- */
610
- layoutType?: LayoutType | undefined;
611
- projectId?: ProjectId | undefined;
612
- cancelToken?: CancellationToken | undefined;
613
- };
614
- interface LikeC4Views {
615
- readonly layouter: GraphvizLayouter;
616
- /**
617
- * Returns computed views (i.e. views with predicates computed)
618
- *
619
- * @param projectId - project id, if not specified - uses the default project
620
- */
621
- computedViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<ComputedView[]>;
622
- /**
623
- * Layouts all views (ignoring any manual snapshots)
624
- *
625
- * @param projectId - project id, if not specified - uses the default project
626
- */
627
- layoutAllViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<GraphvizOut[]>;
628
- /**
629
- * Layouts a view.
630
- * If layoutType is 'manual' - applies manual layout if any.
631
- * If layoutType is 'auto' - returns latest version with drifts from manual layout if any
632
- * If not specified - returns latest layout as is
633
- *
634
- * If view not found in model, but there is a snapshot - it will be returned (with empty DOT)
635
- *
636
- * @param projectId - project id, if not specified - uses the default project
637
- */
638
- layoutView(params: LayoutViewParams): Promise<GraphvizOut | null>;
639
- /**
640
- * Returns diagrams.
641
- * If diagram has manual layout, it will be used.
642
- * @param projectId - project id, if not specified - uses the default project
643
- */
644
- diagrams(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<Array<DiagramView>>;
645
- /**
646
- * Returns all layouted views as Graphviz output (i.e. views with layout computed)
647
- * @param projectId - project id, if not specified - uses the default project
648
- */
649
- viewsAsGraphvizOut(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<Array<GraphvizSvgOut>>;
650
- /**
651
- * Open view in the preview panel.
652
- * (works only if running as a vscode extension)
653
- *
654
- * @param projectId - project id, if not specified - uses the default project
655
- */
656
- openView(viewId: ViewId, projectId?: ProjectId | undefined): Promise<void>;
657
- /**
658
- * Computes and layouts an adhoc view (not defined in the model)
659
- *
660
- * @param projectId - project id, if not specified - uses the default project
661
- */
662
- adhocView(predicates: AdhocViewPredicate[], projectId?: ProjectId | undefined): Promise<LayoutedView>;
663
- }
664
- //#endregion
665
- //#region src/module.d.ts
666
- type LanguageServicesContext = Omit<DefaultSharedModuleContext, 'fileSystemProvider'> & FileSystemModuleContext & LikeC4MCPServerModuleContext & LikeC4ManualLayoutsModuleContext;
667
- interface LikeC4AddedSharedServices {
668
- lsp: {
669
- NodeKindProvider: NodeKindProvider$1;
670
- WorkspaceSymbolProvider: WorkspaceSymbolProvider;
671
- };
672
- workspace: {
673
- Cache: WorkspaceCache<string, any>;
674
- ProjectsManager: ProjectsManager;
675
- IndexManager: IndexManager;
676
- LangiumDocuments: LangiumDocuments;
677
- WorkspaceManager: LikeC4WorkspaceManager;
678
- FileSystemProvider: FileSystemProvider$1;
679
- FileSystemWatcher: FileSystemWatcher;
680
- ManualLayouts: LikeC4ManualLayouts;
681
- };
682
- }
683
- type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
684
- /**
685
- * Declaration of custom services - add your own service classes here.
686
- */
687
- interface LikeC4AddedServices {
688
- documentation: {
689
- DocumentationProvider: LikeC4DocumentationProvider;
690
- };
691
- validation: {
692
- DocumentValidator: LikeC4DocumentValidator;
693
- };
694
- Rpc: Rpc;
695
- mcp: {
696
- Server: LikeC4MCPServer;
697
- ServerFactory: LikeC4MCPServerFactory;
698
- };
699
- likec4: {
700
- LanguageServices: LikeC4LanguageServices;
701
- Views: LikeC4Views;
702
- Layouter: QueueGraphvizLayoter;
703
- DeploymentsIndex: DeploymentsIndex;
704
- FqnIndex: FqnIndex;
705
- ModelParser: LikeC4ModelParser;
706
- ModelBuilder: LikeC4ModelBuilder;
707
- ModelLocator: LikeC4ModelLocator;
708
- ModelChanges: LikeC4ModelChanges;
709
- };
710
- lsp: {
711
- CompletionProvider: LikeC4CompletionProvider;
712
- DocumentHighlightProvider: LikeC4DocumentHighlightProvider;
713
- DocumentSymbolProvider: LikeC4DocumentSymbolProvider;
714
- SemanticTokenProvider: LikeC4SemanticTokenProvider;
715
- HoverProvider: LikeC4HoverProvider;
716
- CodeLensProvider: LikeC4CodeLensProvider;
717
- DocumentLinkProvider: LikeC4DocumentLinkProvider;
718
- Formatter: LikeC4Formatter;
719
- CodeActionProvider: LikeC4CodeActionProvider;
720
- };
721
- references: {
722
- NameProvider: LikeC4NameProvider;
723
- ScopeComputation: LikeC4ScopeComputation;
724
- ScopeProvider: LikeC4ScopeProvider;
725
- };
726
- shared?: LikeC4SharedServices;
727
- parser: {
728
- ValueConverter: LikeC4ValueConverter;
729
- };
730
- }
731
- type LikeC4Services = LangiumServices & LikeC4AddedServices;
732
- /**
733
- * Most probably you don't need to use this function directly.
734
- * Use {@link createLanguageServices} instead.
735
- * @internal
736
- */
737
- declare function createLikeC4Module(context: LikeC4MCPServerModuleContext): Module<LikeC4Services, PartialLangiumServices & LikeC4AddedServices>;
738
- /**
739
- * Create and initialize likec4 language services with the given context
740
- * @example
741
- * ```ts
742
- * const { shared, likec4 } = createLanguageServices({
743
- * ...WithFileSystem(enableWatcher = true),
744
- * ...WithLikeC4ManualLayouts(),
745
- * ...NoMcpServer(),
746
- * });
747
- * ```
748
- *
749
- * It is possible to extend/override the context with additional modules
750
- * See Langium documentation for more details (or at the CliContext in packages/likec4/src/language/module.ts).
751
- */
752
- declare function createLanguageServices(context: Partial<LanguageServicesContext>): {
753
- shared: LikeC4SharedServices;
754
- likec4: LikeC4Services;
755
- };
756
- declare function createLanguageServices(context: Partial<LanguageServicesContext>): {
757
- shared: LikeC4SharedServices;
758
- likec4: LikeC4Services;
759
- };
760
- declare function createLanguageServices<I1, I extends I1 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1> | undefined): {
761
- shared: LikeC4SharedServices;
762
- likec4: I;
763
- };
764
- declare function createLanguageServices<I1, I2, I extends I1 & I2 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1>, module2: Module<I, I2>): {
765
- shared: LikeC4SharedServices;
766
- likec4: I;
767
- };
768
- declare function createLanguageServices<I1, I2, I3, I extends I1 & I2 & I3 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1>, module2: Module<I, I2>, module3: Module<I, I3>): {
769
- shared: LikeC4SharedServices;
770
- likec4: I;
771
- };
772
- /**
773
- * Most probably you don't need to use this function directly.
774
- * Use {@link createLanguageServices} instead.
775
- * @internal
776
- */
777
- declare function createSharedServices(context?: Partial<LanguageServicesContext>): LikeC4SharedServices;
778
- //#endregion
779
- //#region src/validation/DocumentValidator.d.ts
780
- declare class LikeC4DocumentValidator extends DefaultDocumentValidator {
781
- protected services: LikeC4Services;
782
- constructor(services: LikeC4Services);
783
- /**
784
- * If the document is excluded, then we skip validation and return an empty array of diagnostics.
785
- */
786
- validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: Cancellation.CancellationToken): Promise<Diagnostic[]>;
787
- }
788
- //#endregion
789
- //#region src/validation/index.d.ts
790
- type Guard<N extends AstNode> = (n: AstNode) => n is N;
791
- type Guarded<G> = G extends Guard<infer N> ? N : never;
792
- declare const isValidatableAstNode: (n: AstNode) => n is DeploymentView | DynamicView | ElementView | Element | DeployedInstance | DeploymentNode | ImportsFromPoject | Imported | Globals | GlobalPredicateGroup | GlobalDynamicPredicateGroup | GlobalStyle | GlobalStyleGroup | FqnExprWith | DeploymentViewRulePredicate | DynamicViewIncludePredicate | ViewRulePredicate | ViewRuleGroup | RelationExprWith | ElementKindExpression | ElementTagExpression | FqnRefExpr | WildcardExpression | DirectedRelationExpr | FqnExprWhere | IncomingRelationExpr | OutgoingRelationExpr | RelationExprWhere | DeploymentViewRuleStyle | ViewRuleRank | ViewRuleStyle | InOutRelationExpr | DynamicViewParallelSteps | DynamicStepChain | DynamicStepSingle | ViewRuleAutoLayout | LinkProperty | ViewStringProperty | SpecificationDeploymentNodeKind | SpecificationElementKind | ExtendDeployment | DeploymentRelation | ExtendElement | ExtendRelation | Relation | SpecificationRule | BorderProperty | ColorProperty | IconColorProperty | IconPositionProperty | IconProperty | IconSizeProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty | ElementStyleProperty | SpecificationRelationshipKind | Tags | ViewRuleGlobalPredicateRef | ViewRuleGlobalStyle | DynamicViewGlobalPredicateRef | ArrowProperty | LineProperty | DynamicViewDisplayVariantProperty | MetadataBody | ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | NavigateToProperty | ElementRef | SpecificationTag | SpecificationColor | HexColor | RGBAColor;
793
- type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
794
- declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
795
- isValid: (n: ValidatableAstNode) => boolean;
796
- invalidNodes: WeakSet<WeakKey>;
797
- };
798
- type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
799
- type IsValidFn = ChecksFromDiagnostics['isValid'];
800
- //#endregion
801
- //#region src/ast.d.ts
802
- declare module 'langium' {
803
- interface LangiumDocument {
804
- likec4ProjectId?: c4.ProjectId;
805
- }
806
- interface AstNodeDescription {
807
- likec4ProjectId?: c4.ProjectId;
808
- }
1565
+ //#region src/ast.d.ts
1566
+ declare module 'langium' {
1567
+ interface LangiumDocument {
1568
+ likec4ProjectId?: c4.ProjectId;
1569
+ }
1570
+ interface AstNodeDescription {
1571
+ likec4ProjectId?: c4.ProjectId;
1572
+ }
809
1573
  }
810
1574
  declare const idattr: unique symbol;
811
1575
  declare module './generated/ast' {
@@ -865,7 +1629,7 @@ interface ParsedAstElement {
865
1629
  id: c4.Fqn;
866
1630
  astPath: string;
867
1631
  kind: c4.ElementKind;
868
- title: string;
1632
+ title?: string;
869
1633
  summary?: c4.MarkdownOrString;
870
1634
  description?: c4.MarkdownOrString;
871
1635
  technology?: string;
@@ -960,14 +1724,6 @@ interface ParsedAstDeploymentView {
960
1724
  manualLayout?: c4.ViewManualLayout;
961
1725
  }
962
1726
  type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
963
- declare const ViewOps: {
964
- writeId<T extends LikeC4View>(node: T, id: c4.ViewId): T;
965
- readId(node: LikeC4View): c4.ViewId | undefined;
966
- };
967
- declare const ElementOps: {
968
- writeId(node: Element | DeploymentElement, id: c4.Fqn | null): Element | DeploymentElement;
969
- readId(node: Element | DeploymentElement): any;
970
- };
971
1727
  interface AstNodeDescriptionWithFqn extends AstNodeDescription {
972
1728
  likec4ProjectId: c4.ProjectId;
973
1729
  id: c4.Fqn;
@@ -995,36 +1751,155 @@ interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentPro
995
1751
  interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
996
1752
  likec4ProjectId: c4.ProjectId;
997
1753
  }
998
- declare function isLikeC4LangiumDocument(doc: LangiumDocument): doc is LikeC4LangiumDocument;
999
- declare function isParsedLikeC4LangiumDocument(doc: LangiumDocument): doc is ParsedLikeC4LangiumDocument;
1000
- declare function parseMarkdownAsString(node?: MarkdownOrString): string | undefined;
1001
- declare function parseAstPercent(value: string): number;
1002
- declare function parseAstOpacityProperty({
1003
- value
1004
- }: OpacityProperty): number;
1005
- declare function parseAstSizeValue({
1006
- value
1007
- }: {
1008
- value: SizeValue;
1009
- }): 'xs' | 'sm' | 'md' | 'lg' | 'xl';
1010
- declare function parseAstIconPositionValue({
1011
- value
1012
- }: {
1013
- value: IconPositionValue;
1014
- }): c4.IconPosition;
1015
- declare function toRelationshipStyle(props: RelationshipStyleProperty[] | undefined, isValid: IsValidFn): {
1016
- color?: c4.Color;
1017
- line?: c4.RelationshipLineType;
1018
- head?: c4.RelationshipArrowType;
1019
- tail?: c4.RelationshipArrowType;
1020
- };
1021
- declare function toColor(astNode: ColorProperty | IconColorProperty): c4.Color | undefined;
1022
- declare function toAutoLayout(rule: ViewRuleAutoLayout): c4.ViewRuleAutoLayout;
1023
- declare function toAstViewLayoutDirection(c4: c4.ViewRuleAutoLayout['direction']): ViewLayoutDirection;
1024
- declare function getViewRulePredicateContainer<T extends AstNode>(el: T): ViewRulePredicate | DeploymentViewRulePredicate | DynamicViewIncludePredicate | undefined;
1025
- declare function isFqnRefInsideGlobals(astNode: AstNode): boolean;
1026
- declare function isFqnRefInsideModel(astNode: AstNode): boolean;
1027
- declare function isFqnRefInsideDeployment(astNode: AstNode): boolean;
1754
+ //#endregion
1755
+ //#region src/references/name-provider.d.ts
1756
+ declare class LikeC4NameProvider extends DefaultNameProvider {
1757
+ protected services: LikeC4Services;
1758
+ constructor(services: LikeC4Services);
1759
+ getNameStrict(node: AstNode): string;
1760
+ getName(node: AstNode): string | undefined;
1761
+ getNameNode(node: AstNode): CstNode | undefined;
1762
+ }
1763
+ //#endregion
1764
+ //#region src/references/scope-computation.d.ts
1765
+ type ElementsContainer = Model | ElementBody | ExtendElementBody;
1766
+ type DeploymentsContainer = ModelDeployments | DeploymentNodeBody | ExtendDeploymentBody | DeployedInstanceBody;
1767
+ declare class LikeC4ScopeComputation extends DefaultScopeComputation {
1768
+ constructor(services: LikeC4Services);
1769
+ computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
1770
+ private exportViews;
1771
+ private exportGlobals;
1772
+ private exportModel;
1773
+ private exportLibrary;
1774
+ private exportSpecification;
1775
+ private exportDeployments;
1776
+ computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
1777
+ protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
1778
+ protected processDeployments(container: DeploymentsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
1779
+ }
1780
+ //#endregion
1781
+ //#region src/workspace/IndexManager.d.ts
1782
+ declare class IndexManager extends DefaultIndexManager {
1783
+ protected services: LikeC4SharedServices;
1784
+ constructor(services: LikeC4SharedServices);
1785
+ updateContent(document: LangiumDocument, cancelToken?: CancellationToken): Promise<void>;
1786
+ projectElements(projectId: ProjectId, nodeType?: string, uris?: Set<string>): Stream<AstNodeDescription>;
1787
+ }
1788
+ //#endregion
1789
+ //#region src/workspace/LangiumDocuments.d.ts
1790
+ declare class LangiumDocuments extends DefaultLangiumDocuments {
1791
+ protected services: LikeC4SharedServices;
1792
+ constructor(services: LikeC4SharedServices);
1793
+ protected get projectsManager(): ProjectsManager;
1794
+ addDocument(document: LangiumDocument): void;
1795
+ getDocument(uri: URI): LangiumDocument | undefined;
1796
+ /**
1797
+ * Returns all user documents
1798
+ */
1799
+ get userDocuments(): Stream<LikeC4LangiumDocument>;
1800
+ /**
1801
+ * Returns all documents (ensures project IDs are set)
1802
+ */
1803
+ get all(): Stream<LangiumDocument>;
1804
+ /**
1805
+ * Returns all documents for a project, including both project documents and documents included by the project.
1806
+ */
1807
+ projectDocuments(projectId: ProjectId): Stream<LikeC4LangiumDocument>;
1808
+ groupedByProject(): Record<ProjectId, NonEmptyArray<LikeC4LangiumDocument>>;
1809
+ /**
1810
+ * Reset the project IDs of all documents.
1811
+ * Returns the URIs
1812
+ */
1813
+ resetProjectIds(): URI[];
1814
+ }
1815
+ //#endregion
1816
+ //#region src/workspace/WorkspaceManager.d.ts
1817
+ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
1818
+ #private;
1819
+ private services;
1820
+ protected readonly documentFactory: LangiumDocumentFactory;
1821
+ protected readonly fileSystemProvider: FileSystemProvider$1;
1822
+ initialBuildOptions: BuildOptions;
1823
+ constructor(services: LikeC4SharedServices);
1824
+ /**
1825
+ * First load all project config files, then load all documents in the workspace.
1826
+ */
1827
+ protected performStartup(folders: WorkspaceFolder[]): Promise<LangiumDocument[]>;
1828
+ /**
1829
+ * Load all additional documents that shall be visible in the context of the given workspace
1830
+ * folders and add them to the collector. This can be used to include built-in libraries of
1831
+ * your language, which can be either loaded from provided files or constructed in memory.
1832
+ */
1833
+ protected loadAdditionalDocuments(folders: WorkspaceFolder[], collector: (document: LangiumDocument) => void): Promise<void>;
1834
+ /**
1835
+ * Determine whether the given folder entry shall be included while indexing the workspace.
1836
+ */
1837
+ protected includeEntry(_: WorkspaceFolder, entry: FileSystemNode, selector: FileSelector): boolean;
1838
+ workspace(): WorkspaceFolder | null;
1839
+ rebuildAll(cancelToken?: Cancellation.CancellationToken): Promise<void>;
1840
+ get workspaceUri(): URI$2;
1841
+ get workspaceURL(): URL;
1842
+ /**
1843
+ * Force clean all caches
1844
+ */
1845
+ forceCleanCaches(): void;
1846
+ /**
1847
+ * Register a listener to be called when caches are force cleaned
1848
+ */
1849
+ onForceCleanCache(listener: () => void): Disposable;
1850
+ }
1851
+ //#endregion
1852
+ //#region src/references/scope-provider.d.ts
1853
+ declare class LikeC4ScopeProvider extends DefaultScopeProvider {
1854
+ protected deploymentsIndex: DeploymentsIndex;
1855
+ protected fqnIndex: FqnIndex;
1856
+ protected readonly indexManager: IndexManager;
1857
+ constructor(services: LikeC4Services);
1858
+ getScope(context: ReferenceInfo): Scope;
1859
+ protected genUniqueDescedants(element: Element | DeploymentNode | undefined): Generator<AstNodeDescriptionWithFqn, void, any>;
1860
+ protected genScopeExtendElement({
1861
+ element
1862
+ }: ExtendElement): Generator<AstNodeDescription>;
1863
+ protected genScopeElementView({
1864
+ viewOf,
1865
+ extends: ext
1866
+ }: ElementView): Generator<AstNodeDescription>;
1867
+ protected getScopeForStrictFqnRef(projectId: ProjectId, container: StrictFqnRef, context: ReferenceInfo): Scope;
1868
+ protected genScopeExtendDeployment({
1869
+ deploymentNode
1870
+ }: ExtendDeployment): Generator<AstNodeDescription>;
1871
+ protected streamForFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Stream<AstNodeDescription>;
1872
+ protected genScopeForParentlessFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Generator<AstNodeDescription>;
1873
+ /**
1874
+ * Computes the scope for a given reference context.
1875
+ *
1876
+ * @param context - The reference information containing the context for which the scope is being computed.
1877
+ * @param referenceType - The type of reference being resolved. Defaults to the reference type derived from the context.
1878
+ * @returns A scope containing the relevant AST node descriptions for the given reference context.
1879
+ *
1880
+ * This method first checks if there are precomputed scopes available in the document. If not, it falls back to the global scope.
1881
+ * It then iterates through the container hierarchy, collecting relevant scopes based on the reference type and container type.
1882
+ * Finally, it combines the collected scopes with the global scope to produce the final scope.
1883
+ */
1884
+ protected computeScope(projectId: ProjectId, context: ReferenceInfo, referenceType?: string): Generator<AstNodeDescription>;
1885
+ /**
1886
+ * Create a global scope filtered for the given reference type.
1887
+ */
1888
+ protected getProjectScope(projectId: ProjectId, referenceType: string, context: ReferenceInfo): Scope;
1889
+ /**
1890
+ * Create a global scope filtered for the given reference type.
1891
+ */
1892
+ protected getGlobalScope(referenceType: string, context: ReferenceInfo): Scope;
1893
+ }
1894
+ //#endregion
1895
+ //#region src/utils/disposable.d.ts
1896
+ declare abstract class ADisposable implements Disposable {
1897
+ protected toDispose: Disposable[];
1898
+ protected isDisposed: boolean;
1899
+ onDispose(...disposable: Disposable[]): void;
1900
+ dispose(): void;
1901
+ protected throwIfDisposed(): void;
1902
+ }
1028
1903
  //#endregion
1029
1904
  //#region src/model/fqn-index.d.ts
1030
1905
  declare class FqnIndex<AstNd = Element> extends ADisposable {
@@ -1033,6 +1908,7 @@ declare class FqnIndex<AstNd = Element> extends ADisposable {
1033
1908
  protected langiumDocuments: LangiumDocuments;
1034
1909
  protected documentCache: DefaultWeakMap<LikeC4LangiumDocument, DocumentFqnIndex>;
1035
1910
  protected workspaceCache: WorkspaceCache<string, AstNodeDescriptionWithFqn[]>;
1911
+ protected logger: any;
1036
1912
  constructor(services: LikeC4Services);
1037
1913
  private documents;
1038
1914
  get(document: LikeC4LangiumDocument): DocumentFqnIndex;
@@ -1089,10 +1965,113 @@ declare class DocumentFqnIndex {
1089
1965
  declare class DeploymentsIndex extends FqnIndex<DeploymentElement> {
1090
1966
  protected services: LikeC4Services;
1091
1967
  protected Names: LikeC4NameProvider;
1968
+ protected logger: any;
1092
1969
  constructor(services: LikeC4Services);
1093
1970
  protected createDocumentIndex(document: LikeC4LangiumDocument): DocumentFqnIndex;
1094
1971
  }
1095
1972
  //#endregion
1973
+ //#region src/model/builder/MergedSpecification.d.ts
1974
+ /**
1975
+ * The `MergedSpecification` class is responsible for merging multiple parsed
1976
+ * LikeC4Langium documents into a single specification. It consolidates tags,
1977
+ * elements, deployments, relationships, and colors from the provided documents
1978
+ * and provides methods to convert parsed models into C4 model elements and relations.
1979
+ */
1980
+ declare class MergedSpecification {
1981
+ readonly specs: Omit<ParsedAstSpecification, 'tags'>;
1982
+ readonly tags: Readonly<Record<c4.Tag, c4.TagSpecification>>;
1983
+ readonly globals: c4.ModelGlobals;
1984
+ readonly imports: MultiMap$1<c4.ProjectId, c4.Fqn, Set<c4.Fqn>>;
1985
+ readonly projectId: c4.ProjectId | undefined;
1986
+ readonly inferTechFromIcon: boolean;
1987
+ constructor(docs: ReadonlyArray<ParsedLikeC4LangiumDocument>, opts?: {
1988
+ inferTechFromIcon?: boolean;
1989
+ });
1990
+ /**
1991
+ * Converts a parsed model into a C4 model element.
1992
+ */
1993
+ toModelElement: ({
1994
+ tags,
1995
+ links,
1996
+ style,
1997
+ id,
1998
+ kind,
1999
+ title,
2000
+ description,
2001
+ technology,
2002
+ summary,
2003
+ metadata
2004
+ }: ParsedAstElement) => c4.Element | null;
2005
+ /**
2006
+ * Converts a parsed model into a C4 model relation.
2007
+ */
2008
+ toModelRelation: ({
2009
+ astPath: _astPath,
2010
+ source,
2011
+ target,
2012
+ kind,
2013
+ links,
2014
+ id,
2015
+ ...model
2016
+ }: ParsedAstRelation) => c4.Relationship | null;
2017
+ /**
2018
+ * Converts a parsed deployment model into a C4 deployment model
2019
+ */
2020
+ toDeploymentElement: (parsed: ParsedAstDeployment) => c4.DeploymentElement | null;
2021
+ /**
2022
+ * Converts a parsed deployment relation into a C4 deployment relation.
2023
+ */
2024
+ toDeploymentRelation: ({
2025
+ astPath: _astPath,
2026
+ source,
2027
+ target,
2028
+ kind,
2029
+ links,
2030
+ id,
2031
+ ...model
2032
+ }: ParsedAstDeploymentRelation) => c4.DeploymentRelationship | null;
2033
+ }
2034
+ //#endregion
2035
+ //#region src/model/last-seen-artifacts.d.ts
2036
+ /**
2037
+ * Provides access to "last seen artifacts" for a given project,
2038
+ * (Results of the last successful parsing)
2039
+ */
2040
+ declare class LastSeenArtifacts {
2041
+ #private;
2042
+ constructor(services: LikeC4Services);
2043
+ /**
2044
+ * Cache the last successful merged specification for its project.
2045
+ * @param specification - MergedSpecification to store (by projectId).
2046
+ * @returns The same specification (stores in internal map when projectId is set).
2047
+ */
2048
+ rememberSpecification(specification: MergedSpecification): MergedSpecification;
2049
+ /**
2050
+ * Cache the last successful computed model and its styles for the project.
2051
+ * @param model - LikeC4Model.Computed to store (by projectId).
2052
+ * @returns The same model (stores model and styles in internal maps).
2053
+ */
2054
+ rememberModel<M extends LikeC4Model.Computed>(model: M): M;
2055
+ /**
2056
+ * Returns the last seen merged specification for the given project, if available.
2057
+ * @param projectId - Project id to look up.
2058
+ * @returns MergedSpecification or undefined.
2059
+ */
2060
+ specification(projectId: c4.ProjectId): MergedSpecification | undefined;
2061
+ /**
2062
+ * Returns the last seen styles for the given project, if available.
2063
+ * @param projectId - Project id to look up.
2064
+ * @returns LikeC4Styles or undefined.
2065
+ */
2066
+ styles(projectId: c4.ProjectId): LikeC4Styles | undefined;
2067
+ /**
2068
+ * Returns the last seen computed model for the given project, if available.
2069
+ * @param projectId - Project id to look up.
2070
+ * @returns LikeC4Model.Computed or undefined.
2071
+ */
2072
+ model(projectId: c4.ProjectId): LikeC4Model.Computed | undefined;
2073
+ }
2074
+ //#endregion
1096
2075
  //#region src/model/model-builder.d.ts
1097
2076
  type ModelParsedListener = (docs: URI[]) => void;
1098
2077
  interface LikeC4ModelBuilder extends Disposable {
@@ -1104,11 +2083,16 @@ interface LikeC4ModelBuilder extends Disposable {
1104
2083
  }
1105
2084
  //#endregion
1106
2085
  //#region src/model/model-locator.d.ts
2086
+ /** Result of locating a view: document, view AST, and view block node. */
1107
2087
  type ViewLocateResult = {
1108
2088
  doc: ParsedLikeC4LangiumDocument;
1109
2089
  view: ParsedAstView;
1110
2090
  viewAst: LikeC4View;
1111
2091
  };
2092
+ /**
2093
+ * Locates elements, views, and documents in the LikeC4 model by FQN or AST node.
2094
+ * Used by LSP features (hover, go-to-definition, document tags, etc.).
2095
+ */
1112
2096
  declare class LikeC4ModelLocator {
1113
2097
  private services;
1114
2098
  private fqnIndex;
@@ -1117,16 +2101,47 @@ declare class LikeC4ModelLocator {
1117
2101
  private parser;
1118
2102
  private projects;
1119
2103
  constructor(services: LikeC4Services);
2104
+ /**
2105
+ * Returns the parsed documents
2106
+ */
1120
2107
  private documents;
1121
- getParsedElement(...args: [Element] | [c4.Fqn] | [c4.Fqn, c4.ProjectId]): ParsedAstElement | null;
2108
+ /**
2109
+ * Get parsed element by AST node or by FQN (and optional projectId).
2110
+ * @param args - Either [element AST], [fqn], or [fqn, projectId]
2111
+ * @returns { projectId, element, document } or null if not found
2112
+ */
2113
+ getParsedElement(...args: [Element] | [c4.Fqn] | [c4.Fqn, c4.ProjectId]): null | {
2114
+ projectId: c4.ProjectId;
2115
+ element: ParsedAstElement;
2116
+ document: LangiumDocument;
2117
+ };
2118
+ private findParsedElementByFqnIn;
2119
+ /**
2120
+ * Get LSP Location for an element by FQN (and optional projectId).
2121
+ * @param fqn - Fully qualified name (may include project prefix)
2122
+ * @param projectId - Optional project scope
2123
+ * @returns Location or null
2124
+ */
1122
2125
  locateElement(fqn: c4.Fqn, projectId?: c4.ProjectId | undefined): Location | null;
1123
2126
  locateDeploymentElement(deploymentFqn: c4.DeploymentFqn, projectId?: c4.ProjectId | undefined): Location | null;
1124
2127
  locateRelation(relationId: c4.RelationId, projectId?: c4.ProjectId): Location | null;
1125
2128
  locateViewAst(viewId: c4.ViewId, projectId?: c4.ProjectId | undefined): null | ViewLocateResult;
2129
+ /**
2130
+ * Get LSP Location for a view by id (and optional projectId).
2131
+ * @param viewId - View id
2132
+ * @param projectId - Optional project scope
2133
+ * @returns Location or null
2134
+ */
1126
2135
  locateView(viewId: c4.ViewId, projectId?: c4.ProjectId): Location | null;
1127
- locateDocumentTags(documentUri: URI$2, cancelToken?: Cancellation.CancellationToken): Promise<Array<{
1128
- name: string;
1129
- color: string;
2136
+ /**
2137
+ * Returns an array of tags with their name, color, range and whether they are defined in the specification or not.
2138
+ * If the document is not linked, it will wait until it is linked before locating the tags.
2139
+ *
2140
+ * If the document does not belong to any project, it will return null.
2141
+ */
2142
+ locateDocumentTags(documentUri: URI$2, cancelToken?: Cancellation.CancellationToken): Promise<null | Array<{
2143
+ name: Tag;
2144
+ color: c4.ColorLiteral;
1130
2145
  range: Range;
1131
2146
  isSpecification: boolean;
1132
2147
  }>>;
@@ -1137,17 +2152,85 @@ declare class LikeC4ModelLocator {
1137
2152
  }): Location | null;
1138
2153
  }
1139
2154
  //#endregion
1140
- //#region src/filesystem/LikeC4FileSystem.d.ts
1141
- declare const WithFileSystem: (ehableWatcher?: boolean) => FileSystemModuleContext;
1142
- //#endregion
1143
- //#region src/filesystem/LikeC4ManualLayouts.d.ts
1144
- declare const WithLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
2155
+ //#region src/mcp/noop.d.ts
2156
+ declare const NoMCPServer: LikeC4MCPServerModuleContext;
1145
2157
  //#endregion
1146
2158
  //#region src/mcp/server/WithMCPServer.d.ts
1147
2159
  declare function WithMCPServer(type?: 'stdio' | 'sse' | {
1148
2160
  port: number;
1149
2161
  }): LikeC4MCPServerModuleContext;
1150
2162
  //#endregion
2163
+ //#region src/views/LikeC4Views.d.ts
2164
+ type GraphvizOut = {
2165
+ readonly dot: string;
2166
+ readonly diagram: LayoutedView;
2167
+ };
2168
+ type GraphvizSvgOut = {
2169
+ readonly id: ViewId;
2170
+ readonly dot: string;
2171
+ readonly svg: string;
2172
+ };
2173
+ type LayoutViewParams = {
2174
+ viewId: ViewId;
2175
+ /**
2176
+ * Type of layout to apply
2177
+ * - 'manual' - applies manual layout if any
2178
+ * - 'auto' - returns latest version with drifts from manual layout if any
2179
+ * - undefined - returns latest layout as is
2180
+ */
2181
+ layoutType?: LayoutType | undefined;
2182
+ projectId?: ProjectId | undefined;
2183
+ cancelToken?: CancellationToken | undefined;
2184
+ };
2185
+ interface LikeC4Views {
2186
+ readonly layouter: GraphvizLayouter;
2187
+ /**
2188
+ * Returns computed views (i.e. views with predicates computed)
2189
+ *
2190
+ * @param projectId - project id, if not specified - uses the default project
2191
+ */
2192
+ computedViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<ComputedView[]>;
2193
+ /**
2194
+ * Layouts all views (ignoring any manual snapshots)
2195
+ *
2196
+ * @param projectId - project id, if not specified - uses the default project
2197
+ */
2198
+ layoutAllViews(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<GraphvizOut[]>;
2199
+ /**
2200
+ * Layouts a view.
2201
+ * If layoutType is 'manual' - applies manual layout if any.
2202
+ * If layoutType is 'auto' - returns latest version with drifts from manual layout if any
2203
+ * If not specified - returns latest layout as is
2204
+ *
2205
+ * If view not found in model, but there is a snapshot - it will be returned (with empty DOT)
2206
+ */
2207
+ layoutView(params: LayoutViewParams): Promise<GraphvizOut | null>;
2208
+ /**
2209
+ * Returns diagrams.
2210
+ * If diagram has manual layout, it will be used.
2211
+ * @param projectId - project id, if not specified - uses the default project
2212
+ */
2213
+ diagrams(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<Array<DiagramView>>;
2214
+ /**
2215
+ * Returns all layouted views as Graphviz output (i.e. views with layout computed)
2216
+ * @param projectId - project id, if not specified - uses the default project
2217
+ */
2218
+ viewsAsGraphvizOut(projectId?: ProjectId | undefined, cancelToken?: CancellationToken): Promise<Array<GraphvizSvgOut>>;
2219
+ /**
2220
+ * Open view in the preview panel.
2221
+ * (works only if running as a vscode extension)
2222
+ *
2223
+ * @param projectId - project id, if not specified - uses the default project
2224
+ */
2225
+ openView(viewId: ViewId, projectId?: ProjectId | undefined): Promise<void>;
2226
+ /**
2227
+ * Computes and layouts an adhoc view (not defined in the model)
2228
+ *
2229
+ * @param projectId - project id, if not specified - uses the default project
2230
+ */
2231
+ adhocView(predicates: AdhocViewPredicate[], projectId?: ProjectId | undefined): Promise<LayoutedView>;
2232
+ }
2233
+ //#endregion
1151
2234
  //#region src/index.d.ts
1152
2235
  type StartLanguageServerOptions = {
1153
2236
  /**
@@ -1182,12 +2265,16 @@ declare function startLanguageServer$1(options?: StartLanguageServerOptions): {
1182
2265
  };
1183
2266
  //#endregion
1184
2267
  //#region src/model/parser/Base.d.ts
2268
+ type ParserLevel = 'base' | 'model' | 'deployment' | 'fqnref' | 'relation' | 'views' | 'globals' | 'imports' | 'specification';
1185
2269
  declare class BaseParser {
1186
2270
  readonly services: LikeC4Services;
1187
2271
  readonly doc: ParsedLikeC4LangiumDocument;
2272
+ readonly project: Project;
1188
2273
  isValid: IsValidFn;
1189
- constructor(services: LikeC4Services, doc: ParsedLikeC4LangiumDocument);
1190
- get project(): Project;
2274
+ constructor(services: LikeC4Services, doc: ParsedLikeC4LangiumDocument, project: Project);
2275
+ logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: ParserLevel): void;
2276
+ tryParse<N extends AstNode, T>(level: ParserLevel, node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2277
+ tryMap<N extends AstNode, T>(level: ParserLevel, iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1191
2278
  resolveFqn(node: FqnReferenceable): c4.Fqn;
1192
2279
  getAstNodePath(node: AstNode): string;
1193
2280
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
@@ -1200,11 +2287,11 @@ declare class BaseParser {
1200
2287
  parseTags<E extends {
1201
2288
  tags?: Tags;
1202
2289
  }>(withTags?: E): c4.NonEmptyArray<c4.Tag> | null;
1203
- convertLinks(source?: LinkProperty['$container']): c4.Link[] | undefined;
1204
- parseLinks(source?: LinkProperty['$container']): c4.Link[] | undefined;
2290
+ convertLinks(source?: LinkProperty['$container']): c4.NonEmptyArray<c4.Link> | undefined;
2291
+ parseLinks(source?: LinkProperty['$container']): c4.NonEmptyArray<c4.Link> | undefined;
1205
2292
  parseIconProperty(prop: IconProperty | undefined): c4.IconUrl | undefined;
1206
2293
  parseImageAlias(value: string): string | undefined;
1207
- parseColorLiteral(astNode: ColorLiteral): c4.ColorLiteral | undefined;
2294
+ parseColorLiteral(astNode: ColorLiteral$1): c4.ColorLiteral | undefined;
1208
2295
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1209
2296
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1210
2297
  /**
@@ -1291,9 +2378,12 @@ declare const DocumentParserFromMixins: {
1291
2378
  isValid: IsValidFn;
1292
2379
  readonly services: LikeC4Services;
1293
2380
  readonly doc: ParsedLikeC4LangiumDocument;
1294
- get project(): Project;
2381
+ readonly project: Project;
2382
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2383
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2384
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1295
2385
  resolveFqn(node: FqnReferenceable): ProjectId;
1296
- getAstNodePath(node: langium0.AstNode): string;
2386
+ getAstNodePath(node: langium.AstNode): string;
1297
2387
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1298
2388
  [key: string]: string | string[];
1299
2389
  } | undefined;
@@ -1304,11 +2394,11 @@ declare const DocumentParserFromMixins: {
1304
2394
  parseTags<E extends {
1305
2395
  tags?: Tags;
1306
2396
  }>(withTags?: E): ProjectId<ProjectId> | null;
1307
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1308
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2397
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2398
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1309
2399
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1310
2400
  parseImageAlias(value: string): string | undefined;
1311
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2401
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1312
2402
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1313
2403
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1314
2404
  parseBaseProps(props: {
@@ -1391,9 +2481,12 @@ declare const DocumentParserFromMixins: {
1391
2481
  isValid: IsValidFn;
1392
2482
  readonly services: LikeC4Services;
1393
2483
  readonly doc: ParsedLikeC4LangiumDocument;
1394
- get project(): Project;
2484
+ readonly project: Project;
2485
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2486
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2487
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1395
2488
  resolveFqn(node: FqnReferenceable): ProjectId;
1396
- getAstNodePath(node: langium0.AstNode): string;
2489
+ getAstNodePath(node: langium.AstNode): string;
1397
2490
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1398
2491
  [key: string]: string | string[];
1399
2492
  } | undefined;
@@ -1404,11 +2497,11 @@ declare const DocumentParserFromMixins: {
1404
2497
  parseTags<E extends {
1405
2498
  tags?: Tags;
1406
2499
  }>(withTags?: E): ProjectId<ProjectId> | null;
1407
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1408
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2500
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2501
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1409
2502
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1410
2503
  parseImageAlias(value: string): string | undefined;
1411
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2504
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1412
2505
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1413
2506
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1414
2507
  parseBaseProps(props: {
@@ -1446,9 +2539,12 @@ declare const DocumentParserFromMixins: {
1446
2539
  isValid: IsValidFn;
1447
2540
  readonly services: LikeC4Services;
1448
2541
  readonly doc: ParsedLikeC4LangiumDocument;
1449
- get project(): Project;
2542
+ readonly project: Project;
2543
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2544
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2545
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1450
2546
  resolveFqn(node: FqnReferenceable): ProjectId;
1451
- getAstNodePath(node: langium0.AstNode): string;
2547
+ getAstNodePath(node: langium.AstNode): string;
1452
2548
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1453
2549
  [key: string]: string | string[];
1454
2550
  } | undefined;
@@ -1459,11 +2555,11 @@ declare const DocumentParserFromMixins: {
1459
2555
  parseTags<E extends {
1460
2556
  tags?: Tags;
1461
2557
  }>(withTags?: E): ProjectId<ProjectId> | null;
1462
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1463
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2558
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2559
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1464
2560
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1465
2561
  parseImageAlias(value: string): string | undefined;
1466
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2562
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1467
2563
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1468
2564
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1469
2565
  parseBaseProps(props: {
@@ -1516,9 +2612,12 @@ declare const DocumentParserFromMixins: {
1516
2612
  isValid: IsValidFn;
1517
2613
  readonly services: LikeC4Services;
1518
2614
  readonly doc: ParsedLikeC4LangiumDocument;
1519
- get project(): Project;
2615
+ readonly project: Project;
2616
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2617
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2618
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1520
2619
  resolveFqn(node: FqnReferenceable): ProjectId;
1521
- getAstNodePath(node: langium0.AstNode): string;
2620
+ getAstNodePath(node: langium.AstNode): string;
1522
2621
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1523
2622
  [key: string]: string | string[];
1524
2623
  } | undefined;
@@ -1529,11 +2628,11 @@ declare const DocumentParserFromMixins: {
1529
2628
  parseTags<E extends {
1530
2629
  tags?: Tags;
1531
2630
  }>(withTags?: E): ProjectId<ProjectId> | null;
1532
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1533
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2631
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2632
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1534
2633
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1535
2634
  parseImageAlias(value: string): string | undefined;
1536
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2635
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1537
2636
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1538
2637
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1539
2638
  parseBaseProps(props: {
@@ -1579,9 +2678,12 @@ declare const DocumentParserFromMixins: {
1579
2678
  isValid: IsValidFn;
1580
2679
  readonly services: LikeC4Services;
1581
2680
  readonly doc: ParsedLikeC4LangiumDocument;
1582
- get project(): Project;
2681
+ readonly project: Project;
2682
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2683
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2684
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1583
2685
  resolveFqn(node: FqnReferenceable): ProjectId;
1584
- getAstNodePath(node: langium0.AstNode): string;
2686
+ getAstNodePath(node: langium.AstNode): string;
1585
2687
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1586
2688
  [key: string]: string | string[];
1587
2689
  } | undefined;
@@ -1592,11 +2694,11 @@ declare const DocumentParserFromMixins: {
1592
2694
  parseTags<E extends {
1593
2695
  tags?: Tags;
1594
2696
  }>(withTags?: E): ProjectId<ProjectId> | null;
1595
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1596
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2697
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2698
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1597
2699
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1598
2700
  parseImageAlias(value: string): string | undefined;
1599
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2701
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1600
2702
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1601
2703
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1602
2704
  parseBaseProps(props: {
@@ -1650,9 +2752,12 @@ declare const DocumentParserFromMixins: {
1650
2752
  isValid: IsValidFn;
1651
2753
  readonly services: LikeC4Services;
1652
2754
  readonly doc: ParsedLikeC4LangiumDocument;
1653
- get project(): Project;
2755
+ readonly project: Project;
2756
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2757
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2758
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1654
2759
  resolveFqn(node: FqnReferenceable): ProjectId;
1655
- getAstNodePath(node: langium0.AstNode): string;
2760
+ getAstNodePath(node: langium.AstNode): string;
1656
2761
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1657
2762
  [key: string]: string | string[];
1658
2763
  } | undefined;
@@ -1663,11 +2768,11 @@ declare const DocumentParserFromMixins: {
1663
2768
  parseTags<E extends {
1664
2769
  tags?: Tags;
1665
2770
  }>(withTags?: E): ProjectId<ProjectId> | null;
1666
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1667
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2771
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2772
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1668
2773
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1669
2774
  parseImageAlias(value: string): string | undefined;
1670
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2775
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1671
2776
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1672
2777
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1673
2778
  parseBaseProps(props: {
@@ -1715,9 +2820,12 @@ declare const DocumentParserFromMixins: {
1715
2820
  isValid: IsValidFn;
1716
2821
  readonly services: LikeC4Services;
1717
2822
  readonly doc: ParsedLikeC4LangiumDocument;
1718
- get project(): Project;
2823
+ readonly project: Project;
2824
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2825
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2826
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1719
2827
  resolveFqn(node: FqnReferenceable): ProjectId;
1720
- getAstNodePath(node: langium0.AstNode): string;
2828
+ getAstNodePath(node: langium.AstNode): string;
1721
2829
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1722
2830
  [key: string]: string | string[];
1723
2831
  } | undefined;
@@ -1728,11 +2836,11 @@ declare const DocumentParserFromMixins: {
1728
2836
  parseTags<E extends {
1729
2837
  tags?: Tags;
1730
2838
  }>(withTags?: E): ProjectId<ProjectId> | null;
1731
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1732
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2839
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2840
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1733
2841
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1734
2842
  parseImageAlias(value: string): string | undefined;
1735
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2843
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1736
2844
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1737
2845
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1738
2846
  parseBaseProps(props: {
@@ -1758,9 +2866,12 @@ declare const DocumentParserFromMixins: {
1758
2866
  isValid: IsValidFn;
1759
2867
  readonly services: LikeC4Services;
1760
2868
  readonly doc: ParsedLikeC4LangiumDocument;
1761
- get project(): Project;
2869
+ readonly project: Project;
2870
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2871
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2872
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1762
2873
  resolveFqn(node: FqnReferenceable): ProjectId;
1763
- getAstNodePath(node: langium0.AstNode): string;
2874
+ getAstNodePath(node: langium.AstNode): string;
1764
2875
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1765
2876
  [key: string]: string | string[];
1766
2877
  } | undefined;
@@ -1771,11 +2882,11 @@ declare const DocumentParserFromMixins: {
1771
2882
  parseTags<E extends {
1772
2883
  tags?: Tags;
1773
2884
  }>(withTags?: E): ProjectId<ProjectId> | null;
1774
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1775
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2885
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2886
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1776
2887
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1777
2888
  parseImageAlias(value: string): string | undefined;
1778
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2889
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1779
2890
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1780
2891
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1781
2892
  parseBaseProps(props: {
@@ -1817,9 +2928,12 @@ declare const DocumentParserFromMixins: {
1817
2928
  isValid: IsValidFn;
1818
2929
  readonly services: LikeC4Services;
1819
2930
  readonly doc: ParsedLikeC4LangiumDocument;
1820
- get project(): Project;
2931
+ readonly project: Project;
2932
+ logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2933
+ tryParse<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2934
+ tryMap<N extends langium.AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
1821
2935
  resolveFqn(node: FqnReferenceable): ProjectId;
1822
- getAstNodePath(node: langium0.AstNode): string;
2936
+ getAstNodePath(node: langium.AstNode): string;
1823
2937
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
1824
2938
  [key: string]: string | string[];
1825
2939
  } | undefined;
@@ -1830,11 +2944,11 @@ declare const DocumentParserFromMixins: {
1830
2944
  parseTags<E extends {
1831
2945
  tags?: Tags;
1832
2946
  }>(withTags?: E): ProjectId<ProjectId> | null;
1833
- convertLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
1834
- parseLinks(source?: LinkProperty["$container"]): ProjectId[] | undefined;
2947
+ convertLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
2948
+ parseLinks(source?: LinkProperty["$container"]): ProjectId<ProjectId> | undefined;
1835
2949
  parseIconProperty(prop: IconProperty | undefined): ProjectId | undefined;
1836
2950
  parseImageAlias(value: string): string | undefined;
1837
- parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
2951
+ parseColorLiteral(astNode: ColorLiteral$1): ProjectId | undefined;
1838
2952
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
1839
2953
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
1840
2954
  parseBaseProps(props: {
@@ -1871,108 +2985,363 @@ declare class LikeC4ValueConverter extends DefaultValueConverter {
1871
2985
  protected runConverter(rule: any, input: string, cstNode: CstNode): ValueType;
1872
2986
  }
1873
2987
  //#endregion
1874
- //#region src/LikeC4LanguageServices.d.ts
1875
- interface LikeC4LanguageServices {
1876
- readonly views: LikeC4Views;
1877
- readonly builder: LikeC4ModelBuilder;
1878
- readonly workspaceUri: URI;
1879
- readonly projectsManager: ProjectsManager;
1880
- readonly editor: LikeC4ModelChanges;
2988
+ //#region src/model-change/ModelChanges.d.ts
2989
+ declare class LikeC4ModelChanges {
2990
+ private services;
2991
+ private locator;
2992
+ constructor(services: LikeC4Services);
2993
+ applyChange(changeView: ChangeView.Params): Promise<ChangeView.Res>;
2994
+ protected convertToTextEdit({
2995
+ lookup,
2996
+ change
2997
+ }: {
2998
+ lookup: ViewLocateResult;
2999
+ change: Exclude<ViewChange, ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout>;
3000
+ }): {
3001
+ modifiedRange: Range;
3002
+ edits: TextEdit[];
3003
+ };
3004
+ }
3005
+ //#endregion
3006
+ //#region src/LikeC4LanguageServices.d.ts
3007
+ interface LikeC4LanguageServices {
3008
+ readonly views: LikeC4Views;
3009
+ readonly builder: LikeC4ModelBuilder;
3010
+ readonly workspaceUri: URI;
3011
+ readonly projectsManager: ProjectsManager;
3012
+ readonly editor: LikeC4ModelChanges;
3013
+ readonly mcpServer: LikeC4MCPServer | null;
3014
+ /**
3015
+ * Returns all projects with relevant documents
3016
+ */
3017
+ projects(): NonEmptyArray<{
3018
+ id: ProjectId;
3019
+ folder: URI;
3020
+ title: string;
3021
+ documents: ReadonlyArray<URI>;
3022
+ config: Readonly<LikeC4ProjectConfig>;
3023
+ }>;
3024
+ /**
3025
+ * Returns project by ID, returns default project if no ID is specified
3026
+ */
3027
+ project(projectId?: ProjectId): {
3028
+ id: ProjectId;
3029
+ folder: URI;
3030
+ title: string;
3031
+ documents: ReadonlyArray<URI>;
3032
+ config: Readonly<LikeC4ProjectConfig>;
3033
+ };
3034
+ /**
3035
+ * Computes and layouts projects overview - a special diagram
3036
+ * that shows all projects and their relationships
3037
+ */
3038
+ projectsOverview(cancelToken?: CancellationToken$2): Promise<LayoutedProjectsView$1>;
3039
+ /**
3040
+ * Returns {@link LikeC4Model} of the specified project, with computed views {@link ComputedView}
3041
+ * Not ready for rendering, but enough to traverse model. Much faster than {@link layoutedModel}
3042
+ *
3043
+ * If no {@link project} is specified, returns for default project
3044
+ */
3045
+ computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownComputed>>;
3046
+ /**
3047
+ * Returns {@link LikeC4Model} of the specified project, with layouted views {@link LayoutedView}
3048
+ * Ready for rendering. Applies manual layouts if available.
3049
+ *
3050
+ * If no {@link project} is specified, returns for default project
3051
+ */
3052
+ layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownLayouted>>;
3053
+ /**
3054
+ * Returns diagrams (i.e. layouted views {@link LayoutedView}) for the specified project
3055
+ * Applies manual layouts if available.
3056
+ *
3057
+ * If no {@link project} is specified, returns diagrams for default project
3058
+ */
3059
+ diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LayoutedView[]>;
3060
+ getErrors(): Array<{
3061
+ message: string;
3062
+ line: number;
3063
+ range: Range;
3064
+ sourceFsPath: string;
3065
+ }>;
3066
+ /**
3067
+ * Returns the location of the specified element, relation, view or deployment element
3068
+ */
3069
+ locate(params: Locate.Params): Locate.Res;
3070
+ dispose(): Promise<void>;
3071
+ }
3072
+ //#endregion
3073
+ //#region src/lsp/CodeLensProvider.d.ts
3074
+ declare class LikeC4CodeLensProvider implements CodeLensProvider {
3075
+ private services;
3076
+ constructor(services: LikeC4Services);
3077
+ provideCodeLens(doc: LangiumDocument, _params: CodeLensParams, cancelToken?: CancellationToken): Promise<CodeLens[] | undefined>;
3078
+ }
3079
+ //#endregion
3080
+ //#region src/lsp/CompletionProvider.d.ts
3081
+ declare class LikeC4CompletionProvider extends DefaultCompletionProvider {
3082
+ protected services: LikeC4Services;
3083
+ constructor(services: LikeC4Services);
3084
+ readonly completionOptions: {
3085
+ triggerCharacters: string[];
3086
+ };
3087
+ protected completionFor(context: CompletionContext, next: NextFeature, acceptor: CompletionAcceptor): MaybePromise<void>;
3088
+ protected completionForKeyword(context: CompletionContext, keyword: GrammarAST.Keyword, acceptor: CompletionAcceptor): MaybePromise<void>;
3089
+ protected completionForImportedProject(context: CompletionContext, acceptor: CompletionAcceptor): void;
3090
+ }
3091
+ //#endregion
3092
+ //#region src/lsp/DocumentHighlightProvider.d.ts
3093
+ declare class LikeC4DocumentHighlightProvider extends DefaultDocumentHighlightProvider {
3094
+ /**
3095
+ * Override this method to determine the highlight kind of the given reference.
3096
+ */
3097
+ protected createDocumentHighlight(reference: ReferenceDescription): DocumentHighlight;
3098
+ }
3099
+ //#endregion
3100
+ //#region src/lsp/DocumentLinkProvider.d.ts
3101
+ declare class LikeC4DocumentLinkProvider implements DocumentLinkProvider {
3102
+ private services;
3103
+ constructor(services: LikeC4Services);
3104
+ getDocumentLinks(doc: LangiumDocument, _params: DocumentLinkParams, _cancelToken?: CancellationToken): Promise<DocumentLink[]>;
3105
+ resolveLink(doc: LangiumDocument, link: string): string;
3106
+ relativeLink(doc: LangiumDocument, link: string): string | null;
3107
+ }
3108
+ //#endregion
3109
+ //#region src/lsp/DocumentSymbolProvider.d.ts
3110
+ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
3111
+ private services;
3112
+ protected readonly nodeKindProvider: NodeKindProvider;
3113
+ protected readonly nameProvider: LikeC4NameProvider;
3114
+ protected readonly parser: LikeC4ModelParser;
3115
+ protected readonly locator: LikeC4ModelLocator;
3116
+ constructor(services: LikeC4Services);
3117
+ getSymbols(doc: LangiumDocument, _params: DocumentSymbolParams, cancelToken?: CancellationToken): Promise<DocumentSymbol[]>;
3118
+ protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
3119
+ protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
3120
+ protected getModelSymbol(astModel: Model): DocumentSymbol[];
3121
+ protected getDeploymentModelSymbol(astModel: ModelDeployments): DocumentSymbol[];
3122
+ protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
3123
+ protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
3124
+ protected getElementSymbol(astElement: Element): DocumentSymbol[];
3125
+ protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
3126
+ protected getKindSymbol(astKind: SpecificationElementKind | SpecificationRelationshipKind): DocumentSymbol | null;
3127
+ protected getTagSymbol(astTag: SpecificationTag): DocumentSymbol | null;
3128
+ protected getLibIconSymbol(astTag: LibIcon): DocumentSymbol | null;
3129
+ protected getViewSymbol(astView: LikeC4View): DocumentSymbol[];
3130
+ protected getDeploymentElementSymbol(el: DeploymentElement | DeploymentRelation | ExtendDeployment): DocumentSymbol[];
3131
+ protected getDeploymentNodeSymbol(astElement: DeploymentNode): DocumentSymbol[];
3132
+ protected getDeployedInstanceSymbol(astElement: DeployedInstance): DocumentSymbol[];
3133
+ protected symbolKind(node: AstNode): SymbolKind;
3134
+ }
3135
+ //#endregion
3136
+ //#region src/lsp/HoverProvider.d.ts
3137
+ /**
3138
+ * Provides hover content for LikeC4 AST nodes (elements, tags, relations, etc.)
3139
+ * in the language server. Resolves model references and formats markdown hover text.
3140
+ */
3141
+ declare class LikeC4HoverProvider extends AstNodeHoverProvider {
3142
+ protected services: LikeC4Services;
3143
+ private parser;
3144
+ private locator;
3145
+ /** @param services - LikeC4 language services (parser, locator, etc.) */
3146
+ constructor(services: LikeC4Services);
3147
+ protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
1881
3148
  /**
1882
- * Returns all projects with relevant documents
3149
+ * Builds hover content for an element node (title, summary, model details and view links).
3150
+ * @param node - The element AST node to generate hover content for.
3151
+ * @returns Hover information with markdown content, or undefined if element not found.
1883
3152
  */
1884
- projects(): NonEmptyArray<{
1885
- id: ProjectId;
1886
- folder: URI;
1887
- title: string;
1888
- documents: ReadonlyArray<URI>;
1889
- config: Readonly<LikeC4ProjectConfig>;
1890
- }>;
3153
+ protected getElementHover(node: Element): MaybePromise<Hover | undefined>;
1891
3154
  /**
1892
- * Returns project by ID, returns default project if no ID is specified
3155
+ * Builds markdown hover content for an element model (relationship counts and links to views).
3156
+ * @param model - The element model containing relationship and view information.
3157
+ * @param projectId - The project identifier for constructing view links.
3158
+ * @returns Markdown string with model details, or undefined if no details available.
1893
3159
  */
1894
- project(projectId?: ProjectId): {
1895
- id: ProjectId;
1896
- folder: URI;
1897
- title: string;
1898
- documents: ReadonlyArray<URI>;
1899
- config: Readonly<LikeC4ProjectConfig>;
1900
- };
3160
+ protected getElementModelHover(model: ElementModel, projectId: ProjectId): string | undefined;
1901
3161
  /**
1902
- * Computes and layouts projects overview - a special diagram
1903
- * that shows all projects and their relationships
3162
+ * Builds hover content for a deployment node (id, title, kind, summary).
3163
+ * @param node - The deployment node AST node to generate hover content for.
3164
+ * @returns Hover information with markdown content.
1904
3165
  */
1905
- projectsOverview(cancelToken?: CancellationToken$2): Promise<LayoutedProjectsView$1>;
3166
+ protected getDeploymentNodeHover(node: DeploymentNode): MaybePromise<Hover | undefined>;
1906
3167
  /**
1907
- * Returns {@link LikeC4Model} of the specified project, with computed views {@link ComputedView}
1908
- * Not ready for rendering, but enough to traverse model. Much faster than {@link layoutedModel}
1909
- *
1910
- * If no {@link project} is specified, returns for default project
3168
+ * Builds hover content for a deployed instance (instance id, element ref, title and kind).
3169
+ * @param node - The deployed instance AST node to generate hover content for.
3170
+ * @returns Hover information with markdown content showing instance details.
1911
3171
  */
1912
- computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownComputed>>;
3172
+ protected getDeployedInstanceHover(node: DeployedInstance): MaybePromise<Hover | undefined>;
3173
+ }
3174
+ //#endregion
3175
+ //#region src/lsp/CodeActionProvider.d.ts
3176
+ type CommandOrCodeAction = Command | CodeAction;
3177
+ declare class LikeC4CodeActionProvider implements CodeActionProvider {
1913
3178
  /**
1914
- * Returns {@link LikeC4Model} of the specified project, with layouted views {@link LayoutedView}
1915
- * Ready for rendering. Applies manual layouts if available.
3179
+ * Handle a code action request.
1916
3180
  *
1917
- * If no {@link project} is specified, returns for default project
3181
+ * @throws `OperationCancelled` if cancellation is detected during execution
3182
+ * @throws `ResponseError` if an error is detected that should be sent as response to the client
1918
3183
  */
1919
- layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownLayouted>>;
3184
+ getCodeActions(document: LangiumDocument, params: CodeActionParams): CommandOrCodeAction[] | undefined;
3185
+ }
3186
+ //#endregion
3187
+ //#region src/lsp/SemanticTokenProvider.d.ts
3188
+ declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
3189
+ protected services: LikeC4Services;
3190
+ private rules;
3191
+ constructor(services: LikeC4Services);
3192
+ protected initRules(): void;
3193
+ semanticHighlight(document: LangiumDocument, params: SemanticTokensParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens>;
3194
+ semanticHighlightRange(document: LangiumDocument, params: SemanticTokensRangeParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens>;
3195
+ semanticHighlightDelta(document: LangiumDocument, params: SemanticTokensDeltaParams, cancelToken?: CancellationToken$1): Promise<SemanticTokens | SemanticTokensDelta>;
3196
+ protected ensureState(document: LangiumDocument, cancelToken: CancellationToken$1): Promise<void>;
3197
+ protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
3198
+ private highlightNameAndKind;
3199
+ private highlightView;
3200
+ private mark;
3201
+ }
3202
+ //#endregion
3203
+ //#region src/Rpc.d.ts
3204
+ declare class Rpc extends ADisposable {
3205
+ private services;
3206
+ constructor(services: LikeC4Services);
3207
+ init: () => void;
3208
+ openView(params: DidRequestOpenViewNotification.Params): Promise<void>;
3209
+ }
3210
+ //#endregion
3211
+ //#region src/shared/NodeKindProvider.d.ts
3212
+ declare class NodeKindProvider$1 implements NodeKindProvider {
3213
+ private services;
3214
+ constructor(services: LangiumSharedServices);
1920
3215
  /**
1921
- * Returns diagrams (i.e. layouted views {@link LayoutedView}) for the specified project
1922
- * Applies manual layouts if available.
1923
- *
1924
- * If no {@link project} is specified, returns diagrams for default project
3216
+ * Returns a `SymbolKind` as used by `WorkspaceSymbolProvider` or `DocumentSymbolProvider`.
1925
3217
  */
1926
- diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LayoutedView[]>;
1927
- getErrors(): Array<{
1928
- message: string;
1929
- line: number;
1930
- range: Range;
1931
- sourceFsPath: string;
1932
- }>;
3218
+ getSymbolKind(node: AstNode | AstNodeDescription): SymbolKind;
1933
3219
  /**
1934
- * Returns the location of the specified element, relation, view or deployment element
3220
+ * Returns a `CompletionItemKind` as used by the `CompletionProvider`.
1935
3221
  */
1936
- locate(params: Locate.Params): Locate.Res;
1937
- dispose(): Promise<void>;
3222
+ getCompletionItemKind(node: AstNode | AstNodeDescription): CompletionItemKind;
3223
+ }
3224
+ //#endregion
3225
+ //#region src/shared/WorkspaceSymbolProvider.d.ts
3226
+ declare class WorkspaceSymbolProvider extends DefaultWorkspaceSymbolProvider {}
3227
+ //#endregion
3228
+ //#region src/module.d.ts
3229
+ type LanguageServicesContext = Omit<DefaultSharedModuleContext, 'fileSystemProvider'> & FileSystemModuleContext & LikeC4MCPServerModuleContext & LikeC4ManualLayoutsModuleContext;
3230
+ interface LikeC4AddedSharedServices {
3231
+ lsp: {
3232
+ NodeKindProvider: NodeKindProvider$1;
3233
+ WorkspaceSymbolProvider: WorkspaceSymbolProvider;
3234
+ };
3235
+ workspace: {
3236
+ Cache: WorkspaceCache<string, any>;
3237
+ ProjectsManager: ProjectsManager;
3238
+ IndexManager: IndexManager;
3239
+ LangiumDocuments: LangiumDocuments;
3240
+ WorkspaceManager: LikeC4WorkspaceManager;
3241
+ FileSystemProvider: FileSystemProvider$1;
3242
+ FileSystemWatcher: FileSystemWatcher;
3243
+ ManualLayouts: LikeC4ManualLayouts;
3244
+ };
1938
3245
  }
3246
+ type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
1939
3247
  /**
1940
- * Public Language Services
3248
+ * Declaration of custom services - add your own service classes here.
1941
3249
  */
1942
- declare class DefaultLikeC4LanguageServices implements LikeC4LanguageServices {
1943
- private services;
1944
- readonly builder: LikeC4ModelBuilder;
1945
- readonly editor: LikeC4ModelChanges;
1946
- readonly projectsManager: ProjectsManager;
1947
- constructor(services: LikeC4Services);
1948
- get views(): LikeC4Views;
1949
- get workspaceUri(): URI;
1950
- projects(): NonEmptyArray<{
1951
- id: ProjectId;
1952
- folder: URI;
1953
- title: string;
1954
- documents: ReadonlyArray<URI>;
1955
- config: LikeC4ProjectConfig;
1956
- }>;
1957
- project(projectId?: ProjectId): {
1958
- id: ProjectId;
1959
- folder: URI;
1960
- title: string;
1961
- documents: ReadonlyArray<URI>;
1962
- config: LikeC4ProjectConfig;
3250
+ interface LikeC4AddedServices {
3251
+ documentation: {
3252
+ DocumentationProvider: LikeC4DocumentationProvider;
3253
+ };
3254
+ validation: {
3255
+ DocumentValidator: LikeC4DocumentValidator;
3256
+ };
3257
+ Rpc: Rpc;
3258
+ mcp: {
3259
+ Server: LikeC4MCPServer;
3260
+ ServerFactory: LikeC4MCPServerFactory;
3261
+ };
3262
+ likec4: {
3263
+ LanguageServices: LikeC4LanguageServices;
3264
+ Views: LikeC4Views;
3265
+ Layouter: QueueGraphvizLayoter;
3266
+ DeploymentsIndex: DeploymentsIndex;
3267
+ FqnIndex: FqnIndex;
3268
+ ModelParser: LikeC4ModelParser;
3269
+ ModelBuilder: LikeC4ModelBuilder;
3270
+ ModelLocator: LikeC4ModelLocator;
3271
+ ModelChanges: LikeC4ModelChanges;
3272
+ LastSeen: LastSeenArtifacts;
3273
+ };
3274
+ lsp: {
3275
+ CompletionProvider: LikeC4CompletionProvider;
3276
+ DocumentHighlightProvider: LikeC4DocumentHighlightProvider;
3277
+ DocumentSymbolProvider: LikeC4DocumentSymbolProvider;
3278
+ SemanticTokenProvider: LikeC4SemanticTokenProvider;
3279
+ HoverProvider: LikeC4HoverProvider;
3280
+ CodeLensProvider: LikeC4CodeLensProvider;
3281
+ DocumentLinkProvider: LikeC4DocumentLinkProvider;
3282
+ Formatter: LikeC4Formatter;
3283
+ CodeActionProvider: LikeC4CodeActionProvider;
3284
+ };
3285
+ references: {
3286
+ NameProvider: LikeC4NameProvider;
3287
+ ScopeComputation: LikeC4ScopeComputation;
3288
+ ScopeProvider: LikeC4ScopeProvider;
3289
+ };
3290
+ shared?: LikeC4SharedServices;
3291
+ parser: {
3292
+ ValueConverter: LikeC4ValueConverter;
1963
3293
  };
1964
- diagrams(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LayoutedView<UnknownLayouted>[]>;
1965
- computedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownComputed>>;
1966
- layoutedModel(project?: ProjectId | undefined, cancelToken?: CancellationToken$2): Promise<LikeC4Model<UnknownLayouted>>;
1967
- projectsOverview(cancelToken?: CancellationToken$2): Promise<LayoutedProjectsView$1>;
1968
- getErrors(): Array<{
1969
- message: string;
1970
- line: number;
1971
- range: Range;
1972
- sourceFsPath: string;
1973
- }>;
1974
- locate(params: Locate.Params): Locate.Res;
1975
- dispose(): Promise<void>;
1976
3294
  }
3295
+ type LikeC4Services = LangiumServices & LikeC4AddedServices;
3296
+ /**
3297
+ * Most probably you don't need to use this function directly.
3298
+ * Use {@link createLanguageServices} instead.
3299
+ * @internal
3300
+ */
3301
+ declare function createLikeC4Module(context: LikeC4MCPServerModuleContext): Module<LikeC4Services, PartialLangiumServices & LikeC4AddedServices>;
3302
+ /**
3303
+ * Create and initialize likec4 language services with the given context
3304
+ * @example
3305
+ * ```ts
3306
+ * const { shared, likec4 } = createLanguageServices({
3307
+ * ...WithFileSystem(enableWatcher = true),
3308
+ * ...WithLikeC4ManualLayouts(),
3309
+ * ...NoMcpServer(),
3310
+ * });
3311
+ * ```
3312
+ *
3313
+ * It is possible to extend/override the context with additional modules
3314
+ * See Langium documentation for more details (or at the CliContext in packages/likec4/src/language/module.ts).
3315
+ */
3316
+ declare function createLanguageServices(): {
3317
+ shared: LikeC4SharedServices;
3318
+ likec4: LikeC4Services;
3319
+ };
3320
+ declare function createLanguageServices(context: Partial<LanguageServicesContext>): {
3321
+ shared: LikeC4SharedServices;
3322
+ likec4: LikeC4Services;
3323
+ };
3324
+ declare function createLanguageServices(context: Partial<LanguageServicesContext>): {
3325
+ shared: LikeC4SharedServices;
3326
+ likec4: LikeC4Services;
3327
+ };
3328
+ declare function createLanguageServices<I1, I extends I1 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1> | undefined): {
3329
+ shared: LikeC4SharedServices;
3330
+ likec4: I;
3331
+ };
3332
+ declare function createLanguageServices<I1, I2, I extends I1 & I2 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1>, module2: Module<I, I2>): {
3333
+ shared: LikeC4SharedServices;
3334
+ likec4: I;
3335
+ };
3336
+ declare function createLanguageServices<I1, I2, I3, I extends I1 & I2 & I3 & LikeC4Services>(context: Partial<LanguageServicesContext>, module: Module<I, I1>, module2: Module<I, I2>, module3: Module<I, I3>): {
3337
+ shared: LikeC4SharedServices;
3338
+ likec4: I;
3339
+ };
3340
+ /**
3341
+ * Most probably you don't need to use this function directly.
3342
+ * Use {@link createLanguageServices} instead.
3343
+ * @internal
3344
+ */
3345
+ declare function createSharedServices(context?: Partial<LanguageServicesContext>): LikeC4SharedServices;
1977
3346
  //#endregion
1978
- export { createLikeC4Module as $, ParsedElementStyle as A, parseAstOpacityProperty as B, ParsedAstElementView as C, ParsedAstRelation as D, ParsedAstGlobals as E, isFqnRefInsideGlobals as F, toAutoLayout as G, parseAstSizeValue as H, isFqnRefInsideModel as I, LanguageServicesContext as J, toColor as K, isLikeC4LangiumDocument as L, ViewOps as M, getViewRulePredicateContainer as N, ParsedAstSpecification as O, isFqnRefInsideDeployment as P, createLanguageServices as Q, isParsedLikeC4LangiumDocument as R, ParsedAstElement as S, ParsedAstExtendRelation as T, parseMarkdownAsString as U, parseAstPercent as V, toAstViewLayoutDirection as W, LikeC4Services as X, LikeC4AddedServices as Y, LikeC4SharedServices as Z, LikeC4LangiumDocument as _, LikeC4ManualLayoutsModuleContext as _t, startLanguageServer$1 as a, LikeC4MCPServerModuleContext as at, ParsedAstDeploymentView as b, ProjectsManager as bt, WithFileSystem as c, NoFileSystem as ct, LikeC4ModelBuilder as d, FileNode as dt, createSharedServices as et, FqnIndex as f, FileSystemModuleContext as ft, LikeC4DocumentProps as g, LikeC4ManualLayouts as gt, LikeC4AstNode as h, FileSystemWatcherModuleContext as ht, LikeC4ModelParser as i, LikeC4MCPServerFactory as it, ParsedLikeC4LangiumDocument as j, ParsedAstView as k, LikeC4ModelLocator as l, NoFileSystemWatcher as lt, ElementOps as m, FileSystemWatcher as mt, LikeC4LanguageServices as n, NoMCPServer as nt, WithMCPServer as o, LikeC4WorkspaceManager as ot, AstNodeDescriptionWithFqn as p, FileSystemProvider$1 as pt, toRelationshipStyle as q, DocumentParser as r, LikeC4MCPServer as rt, WithLikeC4ManualLayouts as s, LangiumDocuments as st, DefaultLikeC4LanguageServices as t, LikeC4Views as tt, ViewLocateResult as u, NoLikeC4ManualLayouts as ut, ParsedAstDeployment as v, Project as vt, ParsedAstExtend as w, ParsedAstDynamicView as x, ParsedAstDeploymentRelation as y, ProjectData as yt, parseAstIconPositionValue as z };
3347
+ export { FileNode as A, ProjectsManager as B, LikeC4MCPServerModuleContext as C, NoFileSystem as D, WithFileSystem as E, LikeC4ManualLayouts as F, LikeC4ManualLayoutsModuleContext as I, ManualLayoutsSnapshot as L, FileSystemProvider$1 as M, FileSystemWatcher as N, NoFileSystemWatcher as O, FileSystemWatcherModuleContext as P, Project as R, LikeC4MCPServerFactory as S, WithChokidarWatcher as T, LikeC4ModelBuilder as _, createLanguageServices as a, LangiumDocuments as b, LikeC4LanguageServices as c, startLanguageServer$1 as d, LikeC4Views as f, ViewLocateResult as g, LikeC4ModelLocator as h, LikeC4SharedServices as i, FileSystemModuleContext as j, NoLikeC4ManualLayouts as k, DocumentParser as l, NoMCPServer as m, LikeC4AddedServices as n, createLikeC4Module as o, WithMCPServer as p, LikeC4Services as r, createSharedServices as s, LanguageServicesContext as t, LikeC4ModelParser as u, FqnIndex as v, WithLikeC4ManualLayouts as w, LikeC4MCPServer as x, LikeC4WorkspaceManager as y, ProjectData as z };