@likec4/language-server 1.57.0 → 1.59.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.
@@ -1,12 +1,13 @@
1
+ import { t as __name } from "./rolldown-runtime.mjs";
1
2
  import { h as Locate, n as ChangeView, o as DidRequestOpenViewNotification } from "./protocol.mjs";
2
3
  import { DefaultWeakMap, MultiMap } from "@likec4/core/utils";
3
4
  import * as langium from "langium";
4
- 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";
5
+ import { AstNode, AstNodeDescription, AsyncDisposable, BuildOptions, Cancellation, CstNode, DefaultDocumentValidator, DefaultIndexManager, DefaultLangiumDocuments, DefaultNameProvider, DefaultScopeComputation, DefaultScopeProvider, DefaultValueConverter, DefaultWorkspaceManager, DiagnosticInfo, Disposable, FileSystemNode, FileSystemProvider, GrammarAST, JSDocDocumentationProvider, LangiumDocument, LangiumDocumentFactory, MaybePromise, Module, PrecomputedScopes, Reference, ReferenceDescription, ReferenceInfo, Scope, SimpleCache, Stream, URI, ValidationOptions, ValueType, WorkspaceCache } from "langium";
5
6
  import * as c4 from "@likec4/core";
6
7
  import { ComputedView, DiagramView, LayoutType, LayoutedView, NonEmptyArray, NonEmptyReadonlyArray, ProjectId, Tag, UnknownComputed, UnknownLayouted, UnknownParsed, ViewChange, ViewId } from "@likec4/core";
7
- import { CompletionItemKind, Diagnostic, DocumentSymbol, FormattingOptions, Hover, Location, Range, SymbolKind, TextEdit } from "vscode-languageserver-types";
8
8
  import { IncludeConfig, LikeC4ProjectConfig, LikeC4ProjectConfigInput } from "@likec4/config";
9
- import { URI as URI$2 } from "vscode-uri";
9
+ import { URI as URI$1 } from "vscode-uri";
10
+ import { CompletionItemKind, Diagnostic, DocumentSymbol, FormattingOptions, Hover, Location, Range, SymbolKind, TextEdit } from "vscode-languageserver-types";
10
11
  import { AbstractFormatter, AbstractSemanticTokenProvider, AstNodeHoverProvider, CodeActionProvider, CodeLensProvider, CompletionAcceptor, CompletionContext, DefaultCompletionProvider, DefaultDocumentHighlightProvider, DefaultSharedModuleContext, DefaultWorkspaceSymbolProvider, DocumentLinkProvider, DocumentSymbolProvider, FormattingRegion, LangiumServices, LangiumSharedServices, NextFeature, NodeKindProvider, PartialLangiumServices, SemanticTokenAcceptor } from "langium/lsp";
11
12
  import { GraphvizLayouter, GraphvizPort, QueueGraphvizLayoter } from "@likec4/layouts";
12
13
  import { AdhocViewPredicate, LayoutedProjectsView as LayoutedProjectsView$1 } from "@likec4/core/compute-view";
@@ -16,10 +17,9 @@ import { CancellationToken, CodeLens, CodeLensParams, Connection, DocumentHighli
16
17
  import { CodeAction, CodeActionParams, Command } from "vscode-languageserver-protocol";
17
18
  import { Fqn as Fqn$1, GuardedBy, LayoutedView as LayoutedView$1, ProjectId as ProjectId$1, ViewId as ViewId$1 } from "@likec4/core/types";
18
19
  import { CancellationToken as CancellationToken$1 } from "vscode-jsonrpc";
19
- import * as type_fest0 from "type-fest";
20
+ import "unstorage";
20
21
  import { ConditionalPick, MergeExclusive, Simplify, Tagged, ValueOf, Writable } from "type-fest";
21
22
  import { AILayoutHints } from "@likec4/layouts/ai";
22
-
23
23
  //#region src/documentation/documentation-provider.d.ts
24
24
  /**
25
25
  * Provides documentation for LikeC4 AST nodes, extending JSDoc parsing
@@ -41,339 +41,17 @@ declare class LikeC4DocumentationProvider extends JSDocDocumentationProvider {
41
41
  getDocumentation(node: AstNode): string | undefined;
42
42
  }
43
43
  //#endregion
44
- //#region src/workspace/ProjectsManager.d.ts
45
- type NormalizedUri = Tagged<string, 'NormalizedUri'>;
46
- type DocOrUri = LangiumDocument | string | URI;
47
- /**
48
- * A tagged string that represents a project folder URI (with trailing slash).
49
- * Used in `startsWith` checks to determine if a document belongs to a project.
50
- */
51
- type ProjectFolder = Tagged<string, 'ProjectFolder'>;
52
- declare function ProjectFolder(folder: URI | string): ProjectFolder;
53
- interface Project {
54
- id: ProjectId$1;
55
- folderUri: URI;
56
- config: LikeC4ProjectConfig;
57
- }
58
- interface ProjectData extends Project {
59
- id: ProjectId$1;
60
- folder: ProjectFolder;
61
- config: LikeC4ProjectConfig;
62
- configUri: URI;
63
- folderUri: URI;
64
- exclude?: {
65
- (test: string): boolean;
66
- };
67
- /**
68
- * Resolved include paths with both URI and folder string representations.
69
- * These are additional directories that are part of this project.
70
- */
71
- includePaths?: NonEmptyArray<{
72
- uri: URI;
73
- folder: ProjectFolder;
74
- }>;
75
- /**
76
- * Normalized include configuration (paths, maxDepth, fileThreshold).
77
- */
78
- includeConfig: IncludeConfig;
79
- }
80
- type RegisterProjectOptions = {
81
- config: LikeC4ProjectConfig | LikeC4ProjectConfigInput;
82
- } & ({
83
- configUri: URI | string;
84
- } | {
85
- folderUri: URI | string;
86
- });
87
- declare class ProjectsManager {
88
- #private;
89
- protected services: LikeC4SharedServices;
90
- /**
91
- * The global project ID used for all documents
92
- * that are not part of a specific project.
93
- */
94
- static readonly DefaultProjectId: ProjectId$1;
95
- constructor(services: LikeC4SharedServices);
96
- /**
97
- * Checks if a document is excluded by workspace-level patterns.
98
- * These patterns come from VS Code settings and take precedence over project-level excludes.
99
- */
100
- isExcludedByWorkspace(uri: NormalizedUri | URI): boolean;
101
- /**
102
- * Updates the workspace-level exclude patterns from VS Code settings.
103
- * Called during initial server startup; dynamic changes restart the server.
104
- */
105
- setWorkspaceExcludePatterns(patterns: string[] | undefined): void;
106
- /**
107
- * Returns:
108
- * - configured default project ID if set
109
- * - the default project ID if there are no projects.
110
- * - the ID of the only project
111
- * - undefined if there are multiple projects.
112
- */
113
- get defaultProjectId(): ProjectId$1 | undefined;
114
- set defaultProjectId(id: string | ProjectId$1 | undefined);
115
- get default(): ProjectData;
116
- get all(): NonEmptyReadonlyArray<ProjectId$1>;
117
- getProject(arg: ProjectId$1 | LangiumDocument): ProjectData;
118
- /**
119
- * Returns all projects that overlap with the specified folder (is parent or child)
120
- */
121
- findOverlaped(folder: URI | string): ReadonlyArray<ProjectData>;
122
- /**
123
- * Validates and ensures the project ID.
124
- * If no project ID is specified, returns default project ID
125
- * If there are multiple projects and default project is not set, throws an error
126
- */
127
- ensureProjectId(projectId?: ProjectId$1 | undefined): ProjectId$1;
128
- /**
129
- * Validates and ensures the project data.
130
- * If projectId is not specified, returns default project
131
- *
132
- * If there are multiple projects and default project is not set, throws an error
133
- *
134
- * @see ensureProjectId - to validate project ID only
135
- */
136
- ensureProject(projectId?: ProjectId$1 | undefined): ProjectData;
137
- hasMultipleProjects(): boolean;
138
- /**
139
- * Checks if given document (or URI) must be excluded from processing.
140
- */
141
- isExcluded(document: DocOrUri): boolean;
142
- /**
143
- * Checks if given document (or URI) must be excluded in the context of the project.
144
- */
145
- isExcluded(projectId: ProjectId$1, document: DocOrUri): boolean;
146
- /**
147
- * Checks if the specified document is included by the project:
148
- * - if the document belongs to the project and is not excluded
149
- * - if the document is included by the project
150
- */
151
- isIncluded(projectId: ProjectId$1, document: LangiumDocument | URI | string): boolean;
152
- /**
153
- * Registers likec4 project by config file.
154
- */
155
- registerConfigFile(configUri: URI, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
156
- /**
157
- * Registers (or reloads) likec4 project by config file or config object.
158
- * If there is some project registered at same folder, it will be reloaded.
159
- */
160
- registerProject(opts: RegisterProjectOptions, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
161
- /**
162
- * Determines which project the given document belongs to.
163
- * If the document does not belong to any project, returns the default project ID.
164
- */
165
- ownerProjectId(document: LangiumDocument | URI | string): ProjectId$1;
166
- /**
167
- * Returns path to the document relative to the project folder.
168
- * If the document does not belong to any project, returns the document URI as string.
169
- */
170
- relativePath(document: LangiumDocument | URI | string): string;
171
- /**
172
- * Returns true if the manager is currently initializing or reloading projects.
173
- * This is used to prevent duplicate reload operations.
174
- */
175
- protected get isInitiatingOrReloading(): boolean;
176
- reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
177
- protected _reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
178
- protected uniqueProjectId(name: string): ProjectId$1;
179
- protected resetCaches(): void;
180
- rebuildProject(projectId: ProjectId$1, cancelToken?: Cancellation.CancellationToken): Promise<void>;
181
- /**
182
- * Returns all include paths from all projects.
183
- * Used by WorkspaceManager to scan additional directories for C4 files.
184
- */
185
- getAllIncludePaths(): Array<{
186
- projectId: ProjectId$1;
187
- includePath: URI;
188
- includeConfig: IncludeConfig;
189
- }>;
190
- /**
191
- * Register a listener to be called when the projects configuration has changed.
192
- * @returns A disposable that can be used to unregister the callback.
193
- */
194
- onProjectsUpdate(callback: () => void): Disposable;
195
- private getWorkspaceFolder;
196
- private notifyListeners;
197
- private updateIncludesExcludes;
198
- private warnIfConfigOverride;
199
- }
200
- //#endregion
201
- //#region src/filesystem/types.d.ts
202
- interface FileNode extends FileSystemNode {
203
- readonly isFile: true;
204
- readonly isDirectory: false;
205
- }
206
- interface FileSystemProvider$1 extends FileSystemProvider {
207
- /**
208
- * Scans the project files for the given URI.
209
- * @returns The list of file system entries that are contained within the specified directory.
210
- */
211
- scanProjectFiles(folderUri: URI): Promise<FileNode[]>;
212
- /**
213
- * Loads the project config from the given file.
214
- * @returns The project config.
215
- * @throws Error if the file does not exist or is not a valid project config.
216
- */
217
- loadProjectConfig(filepath: URI): Promise<LikeC4ProjectConfig>;
218
- /**
219
- * Reads the directory and returns LikeC4 files.
220
- *
221
- * @param options.recursive If true, recursively reads the directory,
222
- * @param options.maxDepth Maximum depth to traverse when recursive is true (default: Infinity)
223
- */
224
- readDirectory(uri: URI, options?: {
225
- recursive?: boolean;
226
- maxDepth?: number;
227
- }): Promise<FileNode[]>;
228
- /**
229
- * Finds all files in the given directory, matching the given filter.
230
- */
231
- scanDirectory(directory: URI, filter: (filepath: string, isDirectory: boolean) => boolean): Promise<FileNode[]>;
232
- /**
233
- * Writes the content to the file system.
234
- * Used by manual layouts.
235
- */
236
- writeFile(uri: URI, content: string): Promise<void>;
237
- /**
238
- * Deletes the file from the file system.
239
- * Used by manual layouts.
240
- * @return true if the file was deleted, false if the file did not exist.
241
- */
242
- deleteFile(uri: URI): Promise<boolean>;
243
- }
244
- interface FileSystemModuleContext extends FileSystemWatcherModuleContext {
245
- fileSystemProvider: () => FileSystemProvider$1;
246
- }
247
- interface FileSystemWatcherModuleContext {
248
- fileSystemWatcher: (services: LikeC4SharedServices) => FileSystemWatcher;
249
- }
250
- interface FileSystemWatcher extends AsyncDisposable {
251
- /**
252
- * Watches a folder for changes and triggers a reload of the documents and projects.
253
- */
254
- watch(folder: string): void;
255
- }
256
- interface LikeC4ManualLayoutsModuleContext {
257
- manualLayouts: (services: LikeC4SharedServices) => LikeC4ManualLayouts;
258
- }
259
- type ManualLayoutsSnapshot = {
260
- hash: string;
261
- views: Record<ViewId$1, LayoutedView$1>;
262
- };
263
- type ManualLayoutUpdateEvent = {
264
- updated: URI;
265
- projectId: ProjectId$1;
266
- viewId: ViewId$1;
267
- } | {
268
- removed: URI;
269
- projectId: ProjectId$1;
270
- /**
271
- * Missing if triggered by FS event (file was deleted)
272
- */
273
- viewId?: ViewId$1;
274
- };
275
- type ManualLayoutUpdateListener = (event: ManualLayoutUpdateEvent) => void;
276
- interface LikeC4ManualLayouts {
277
- /**
278
- * Reads a single layouted view from the file system by its URI.
279
- * Used by the language server to get the current layout state.
280
- */
281
- readSnapshot(uri: URI): Promise<LayoutedView$1 | null>;
282
- read(project: Project): Promise<ManualLayoutsSnapshot | null>;
283
- write(project: Project, layouted: LayoutedView$1): Promise<Location>;
284
- remove(project: Project, view: ViewId$1): Promise<Location | null>;
285
- clearCaches(): void;
286
- /**
287
- * Registers a listener for manual layout updates.
288
- * The listener will be called when a manual layout is created, updated, or deleted.
289
- */
290
- onManualLayoutUpdate(listener: ManualLayoutUpdateListener): Disposable;
291
- /**
292
- * Handles file system updates for manual layouts.
293
- * Used by the file system watcher to notify the manual layouts module of changes.
294
- * @param event The file system event
295
- */
296
- handleFileSystemUpdate(event: {
297
- update: URI;
298
- delete?: never;
299
- } | {
300
- delete: URI;
301
- update?: never;
302
- }): Promise<void>;
303
- }
304
- //#endregion
305
- //#region src/filesystem/noop.d.ts
306
- declare const NoFileSystemWatcher: FileSystemWatcherModuleContext;
307
- declare const NoFileSystem: FileSystemModuleContext;
308
- declare const NoLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
309
- //#endregion
310
- //#region src/filesystem/LikeC4FileSystem.d.ts
311
- declare const WithFileSystem: (enableWatcher?: boolean) => FileSystemModuleContext;
312
- //#endregion
313
- //#region src/filesystem/ChokidarWatcher.d.ts
314
- declare const WithChokidarWatcher: FileSystemWatcherModuleContext;
315
- //#endregion
316
- //#region src/filesystem/LikeC4ManualLayouts.d.ts
317
- declare const WithLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
318
- //#endregion
319
- //#region src/formatting/LikeC4Formatter.d.ts
320
- type QuoteStyle = 'single' | 'double' | 'ignore' | 'auto';
321
- interface LikeC4FormatterOptions {
322
- quoteStyle: QuoteStyle;
323
- }
324
- type ExtendedFormattingCommandType = 'normalizeQuotes';
325
- interface ExtendedFormattingCommand {
326
- type: ExtendedFormattingCommandType;
327
- region: FormattingRegion;
328
- }
329
- declare class LikeC4Formatter extends AbstractFormatter {
330
- protected options: LikeC4FormatterOptions;
331
- extendedFormattingCommands: ExtendedFormattingCommand[];
332
- constructor(services: LikeC4Services);
333
- protected doDocumentFormat(document: LangiumDocument, options: FormattingOptions, range?: Range): TextEdit[];
334
- protected format(node: AstNode): void;
335
- protected formatTags(node: AstNode): void;
336
- protected formatDeploymentRelation(node: AstNode): void;
337
- protected formatExtendDeployment(node: AstNode): void;
338
- protected formatRelation(node: AstNode): void;
339
- protected removeIndentFromTopLevelStatements(node: AstNode): void;
340
- protected indentContentInBraces(node: AstNode): void;
341
- protected appendKeywordsWithSpace(node: AstNode): void;
342
- protected formatView(node: AstNode): void;
343
- protected formatLeafProperty(node: AstNode): void;
344
- protected formatLinkProperty(node: AstNode): void;
345
- protected formatNavigateToProperty(node: AstNode): void;
346
- protected formatAutolayoutProperty(node: AstNode): void;
347
- protected formatMetadataProperty(node: AstNode): void;
348
- protected formatElementDeclaration(node: AstNode): void;
349
- protected formatExtendElement(node: AstNode): void;
350
- protected formatGlobals(node: AstNode): void;
351
- protected formatImports(node: AstNode): void;
352
- protected formatSpecificationRule(node: AstNode): void;
353
- protected formatWithPredicate(node: AstNode): void;
354
- protected formatDeploymentNodeDeclaration(node: AstNode): void;
355
- protected formatDeployedInstance(node: AstNode): void;
356
- protected formatViewRuleGlobalStyle(node: AstNode): void;
357
- protected formatViewRuleGlobalPredicate(node: AstNode): void;
358
- protected formatViewRuleGroup(node: AstNode): void;
359
- protected formatViewRuleStyle(node: AstNode): void;
360
- protected formatWhereExpression(node: AstNode): void;
361
- protected formatWhereRelationExpression(node: AstNode): void;
362
- protected formatWhereElementExpression(node: AstNode): void;
363
- protected formatIncludeExcludeExpressions(node: AstNode): void;
364
- protected formatRelationExpression(node: AstNode): void;
365
- private findPredicateExpressionRoot;
366
- private on;
367
- private doExtendedFormatting;
368
- protected normalizeQuotes(node: AstNode): void;
369
- private quotesNormalizerFactory;
370
- private escapeQuotesInternalQuotes;
371
- private getAutoQuoteStyle;
372
- private onConfigurationUpdate;
44
+ //#region src/utils/disposable.d.ts
45
+ declare abstract class ADisposable implements Disposable {
46
+ protected toDispose: Disposable[];
47
+ protected isDisposed: boolean;
48
+ onDispose(...disposable: Disposable[]): void;
49
+ dispose(): void;
50
+ protected throwIfDisposed(): void;
373
51
  }
374
52
  //#endregion
375
53
  //#region src/generated/ast.d.ts
376
- type AnyProperty = DynamicViewProperty | ElementProperty | NavigateToProperty | NotationProperty | NotesProperty | RelationProperty | RelationshipStyleProperty | StringProperty | StyleProperty | ViewProperty;
54
+ type AnyProperty = DynamicViewProperty | ElementProperty | NavigateToProperty | RelationProperty | RelationshipStyleProperty | StringProperty | StyleProperty | ViewProperty;
377
55
  declare const AnyProperty = "AnyProperty";
378
56
  type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | 'odot' | 'onormal' | 'open' | 'vee';
379
57
  type BorderStyleValue = 'none' | LineOptions;
@@ -391,13 +69,13 @@ type DynamicViewProperty = DynamicViewDisplayVariantProperty | ViewProperty;
391
69
  declare const DynamicViewProperty = "DynamicViewProperty";
392
70
  type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
393
71
  declare const DynamicViewRule = "DynamicViewRule";
394
- type DynamicViewStep = DynamicStepChain | DynamicStepSingle;
395
- declare const DynamicViewStep = "DynamicViewStep";
396
72
  type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
397
73
  declare const ElementProperty = "ElementProperty";
398
74
  type ElementShape = 'browser' | 'bucket' | 'component' | 'cylinder' | 'document' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
399
75
  type ExpressionV2 = FqnExprOrWith | RelationExprOrWith;
400
76
  declare const ExpressionV2 = "ExpressionV2";
77
+ type ExtendElementOrRelation = ExtendElement | ExtendRelation;
78
+ declare const ExtendElementOrRelation = "ExtendElementOrRelation";
401
79
  type ExtendElementProperty = LinkProperty | MetadataProperty;
402
80
  declare const ExtendElementProperty = "ExtendElementProperty";
403
81
  type ExtendRelationProperty = LinkProperty | MetadataProperty;
@@ -421,6 +99,8 @@ type MetadataProperty = MetadataBody;
421
99
  declare const MetadataProperty = "MetadataProperty";
422
100
  type MetadataValue = MarkdownOrString | MetadataArray;
423
101
  declare const MetadataValue = "MetadataValue";
102
+ type ModelElement = Element | ExtendElementOrRelation | Relation;
103
+ declare const ModelElement = "ModelElement";
424
104
  type ModelReferenceable = Element | Imported;
425
105
  declare const ModelReferenceable = "ModelReferenceable";
426
106
  type Participant = 'source' | 'target';
@@ -440,11 +120,17 @@ declare const RelationshipStyleProperty = "RelationshipStyleProperty";
440
120
  type SizeProperty = IconSizeProperty | PaddingSizeProperty | ShapeSizeProperty | TextSizeProperty;
441
121
  declare const SizeProperty = "SizeProperty";
442
122
  type SizeValue = 'large' | 'lg' | 'md' | 'medium' | 'sm' | 'small' | 'xl' | 'xlarge' | 'xs' | 'xsmall';
123
+ type StepOrSeries = Step | StepSeries;
124
+ declare const StepOrSeries = "StepOrSeries";
125
+ type StepStatement = AltSteps | StepOrSeries | SubflowStep | TryStep;
126
+ declare const StepStatement = "StepStatement";
443
127
  type StringProperty = ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
444
128
  declare const StringProperty = "StringProperty";
445
129
  type StyleProperty = BorderProperty | ColorProperty | IconColorProperty | IconPositionProperty | IconProperty | IconSizeProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty;
446
130
  declare const StyleProperty = "StyleProperty";
447
131
  type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
132
+ type TryStep = CatchBlock | FinallyBlock | TryBlock;
133
+ declare const TryStep = "TryStep";
448
134
  type Uri = string;
449
135
  type ViewLayoutDirection = 'BottomTop' | 'LeftRight' | 'RightLeft' | 'TopBottom';
450
136
  type ViewProperty = LinkProperty | ViewStringProperty;
@@ -469,16 +155,23 @@ type WhereRelationExpression = WhereBinaryExpression | WhereRelation | WhereRela
469
155
  declare const WhereRelationExpression = "WhereRelationExpression";
470
156
  type WhereTagEqual = WhereElementTag | WhereRelationParticipantTag | WhereRelationTag;
471
157
  declare const WhereTagEqual = "WhereTagEqual";
472
- interface AbstractDynamicStep extends langium.AstNode {
473
- readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
474
- readonly $type: 'AbstractDynamicStep' | 'DynamicStepChain' | 'DynamicStepSingle';
158
+ interface AbstractStep extends langium.AstNode {
159
+ readonly $container: DynamicViewBody | StepSeries | StepsBlock;
160
+ readonly $type: 'AbstractStep' | 'Step' | 'StepSeries';
475
161
  custom?: CustomRelationProperties;
476
162
  dotKind?: RelationKindDotRef;
477
163
  kind?: langium.Reference<RelationshipKind>;
478
164
  target: ElementRef;
479
165
  title?: string;
480
166
  }
481
- declare const AbstractDynamicStep = "AbstractDynamicStep";
167
+ declare const AbstractStep = "AbstractStep";
168
+ interface AltSteps extends langium.AstNode {
169
+ readonly $container: DynamicViewBody | StepsBlock;
170
+ readonly $type: 'AltSteps';
171
+ branches: Array<SubflowStep>;
172
+ title?: string;
173
+ }
174
+ declare const AltSteps = "AltSteps";
482
175
  interface ArrowProperty extends langium.AstNode {
483
176
  readonly $container: CustomRelationProperties | RelationStyleProperty | SpecificationRelationshipKind;
484
177
  readonly $type: 'ArrowProperty';
@@ -493,6 +186,14 @@ interface BorderProperty extends langium.AstNode {
493
186
  value: BorderStyleValue;
494
187
  }
495
188
  declare const BorderProperty = "BorderProperty";
189
+ interface CatchBlock extends langium.AstNode {
190
+ readonly $container: DynamicViewBody | FinallyBlock | StepsBlock;
191
+ readonly $type: 'CatchBlock';
192
+ catch: StepsBlock;
193
+ title?: string;
194
+ try: TryBlock;
195
+ }
196
+ declare const CatchBlock = "CatchBlock";
496
197
  interface ColorProperty extends langium.AstNode {
497
198
  readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
498
199
  readonly $type: 'ColorProperty';
@@ -514,7 +215,7 @@ interface CustomElementProperties extends langium.AstNode {
514
215
  }
515
216
  declare const CustomElementProperties = "CustomElementProperties";
516
217
  interface CustomRelationProperties extends langium.AstNode {
517
- readonly $container: AbstractDynamicStep | RelationExprWith;
218
+ readonly $container: AbstractStep | RelationExprWith;
518
219
  readonly $type: 'CustomRelationProperties';
519
220
  props: Array<MultipleProperty | NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
520
221
  }
@@ -630,7 +331,7 @@ interface DynamicViewBody extends langium.AstNode {
630
331
  readonly $type: 'DynamicViewBody';
631
332
  props: Array<DynamicViewProperty>;
632
333
  rules: Array<DynamicViewRule>;
633
- steps: Array<DynamicViewParallelSteps | DynamicViewStep>;
334
+ steps: Array<StepStatement>;
634
335
  tags?: Tags;
635
336
  }
636
337
  declare const DynamicViewBody = "DynamicViewBody";
@@ -653,12 +354,6 @@ interface DynamicViewIncludePredicate extends langium.AstNode {
653
354
  exprs: Expressions;
654
355
  }
655
356
  declare const DynamicViewIncludePredicate = "DynamicViewIncludePredicate";
656
- interface DynamicViewParallelSteps extends langium.AstNode {
657
- readonly $container: DynamicViewBody;
658
- readonly $type: 'DynamicViewParallelSteps';
659
- steps: Array<DynamicViewStep>;
660
- }
661
- declare const DynamicViewParallelSteps = "DynamicViewParallelSteps";
662
357
  interface DynamicViewRef extends langium.AstNode {
663
358
  readonly $container: RelationNavigateToProperty;
664
359
  readonly $type: 'DynamicViewRef';
@@ -696,7 +391,7 @@ interface ElementKindExpression extends langium.AstNode {
696
391
  }
697
392
  declare const ElementKindExpression = "ElementKindExpression";
698
393
  interface ElementRef extends langium.AstNode {
699
- readonly $container: AbstractDynamicStep | DeployedInstance | DynamicStepSingle | ElementView;
394
+ readonly $container: AbstractStep | DeployedInstance | ElementView | Step;
700
395
  readonly $type: 'ElementRef';
701
396
  modelElement: FqnRef$2;
702
397
  }
@@ -800,6 +495,14 @@ interface ExtendRelationBody extends langium.AstNode {
800
495
  tags?: Tags;
801
496
  }
802
497
  declare const ExtendRelationBody = "ExtendRelationBody";
498
+ interface FinallyBlock extends langium.AstNode {
499
+ readonly $container: DynamicViewBody | StepsBlock;
500
+ readonly $type: 'FinallyBlock';
501
+ finally: StepsBlock;
502
+ title?: string;
503
+ tryCatch: CatchBlock | TryBlock;
504
+ }
505
+ declare const FinallyBlock = "FinallyBlock";
803
506
  interface FqnExpressions extends langium.AstNode {
804
507
  readonly $container: DeploymentViewRuleStyle | FqnExpressions | GlobalStyle | ViewRuleRank | ViewRuleStyle;
805
508
  readonly $type: 'FqnExpressions';
@@ -971,7 +674,7 @@ interface LineProperty extends langium.AstNode {
971
674
  }
972
675
  declare const LineProperty = "LineProperty";
973
676
  interface LinkProperty extends langium.AstNode {
974
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
677
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind | SpecificationRelationshipKind;
975
678
  readonly $type: 'LinkProperty';
976
679
  key: 'link';
977
680
  title?: string;
@@ -1008,7 +711,7 @@ declare const MetadataBody = "MetadataBody";
1008
711
  interface Model extends langium.AstNode {
1009
712
  readonly $container: LikeC4Grammar;
1010
713
  readonly $type: 'Model';
1011
- elements: Array<Element | ExtendElement | ExtendRelation | Relation>;
714
+ elements: Array<ModelElement>;
1012
715
  name: 'model';
1013
716
  }
1014
717
  declare const Model = "Model";
@@ -1115,7 +818,7 @@ interface RelationExprWith extends langium.AstNode {
1115
818
  }
1116
819
  declare const RelationExprWith = "RelationExprWith";
1117
820
  interface RelationKindDotRef extends langium.AstNode {
1118
- readonly $container: AbstractDynamicStep | DeploymentRelation | ExtendRelation | OutgoingRelationExpr | Relation;
821
+ readonly $container: AbstractStep | DeploymentRelation | ExtendRelation | OutgoingRelationExpr | Relation;
1119
822
  readonly $type: 'RelationKindDotRef';
1120
823
  kind: langium.Reference<RelationshipKind>;
1121
824
  }
@@ -1204,13 +907,14 @@ interface SpecificationRelationshipKind extends langium.AstNode {
1204
907
  readonly $container: SpecificationRule;
1205
908
  readonly $type: 'SpecificationRelationshipKind';
1206
909
  kind: RelationshipKind;
1207
- props: Array<MultipleProperty | RelationshipStyleProperty | SpecificationRelationshipStringProperty>;
910
+ props: Array<LinkProperty | MultipleProperty | RelationshipStyleProperty | SpecificationRelationshipStringProperty>;
911
+ tags?: Tags;
1208
912
  }
1209
913
  declare const SpecificationRelationshipKind = "SpecificationRelationshipKind";
1210
914
  interface SpecificationRelationshipStringProperty extends langium.AstNode {
1211
915
  readonly $container: SpecificationRelationshipKind;
1212
916
  readonly $type: 'SpecificationRelationshipStringProperty';
1213
- key: 'notation' | 'technology';
917
+ key: 'description' | 'notation' | 'technology' | 'title';
1214
918
  value: MarkdownOrString;
1215
919
  }
1216
920
  declare const SpecificationRelationshipStringProperty = "SpecificationRelationshipStringProperty";
@@ -1232,6 +936,12 @@ interface SpecificationTag extends langium.AstNode {
1232
936
  tag: Tag$1;
1233
937
  }
1234
938
  declare const SpecificationTag = "SpecificationTag";
939
+ interface StepsBlock extends langium.AstNode {
940
+ readonly $container: AltSteps | CatchBlock | DynamicViewBody | FinallyBlock | StepsBlock;
941
+ readonly $type: 'StepsBlock' | 'SubflowStep' | 'TryBlock';
942
+ steps: Array<StepStatement>;
943
+ }
944
+ declare const StepsBlock = "StepsBlock";
1235
945
  interface StrictFqnElementRef extends langium.AstNode {
1236
946
  readonly $container: ExtendElement | StrictFqnElementRef;
1237
947
  readonly $type: 'StrictFqnElementRef';
@@ -1259,7 +969,7 @@ interface TagRef extends langium.AstNode {
1259
969
  }
1260
970
  declare const TagRef = "TagRef";
1261
971
  interface Tags extends langium.AstNode {
1262
- readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | Relation | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind | Tags;
972
+ readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | ExtendDeploymentBody | ExtendElementBody | ExtendRelationBody | Relation | RelationBody | SpecificationDeploymentNodeKind | SpecificationElementKind | SpecificationRelationshipKind | Tags;
1263
973
  readonly $type: 'Tags';
1264
974
  prev?: Tags;
1265
975
  values: Array<TagRef>;
@@ -1445,24 +1155,47 @@ interface WildcardExpression extends langium.AstNode {
1445
1155
  isWildcard: boolean;
1446
1156
  }
1447
1157
  declare const WildcardExpression = "WildcardExpression";
1448
- interface DynamicStepChain extends AbstractDynamicStep {
1449
- readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
1450
- readonly $type: 'DynamicStepChain';
1451
- source: DynamicStepChain | DynamicStepSingle;
1452
- }
1453
- declare const DynamicStepChain = "DynamicStepChain";
1454
- interface DynamicStepSingle extends AbstractDynamicStep {
1455
- readonly $container: DynamicStepChain | DynamicViewBody | DynamicViewParallelSteps;
1456
- readonly $type: 'DynamicStepSingle';
1158
+ /**
1159
+ * A single step in a dynamic view flow
1160
+ * source -> target
1161
+ */
1162
+ interface Step extends AbstractStep {
1163
+ readonly $container: DynamicViewBody | StepSeries | StepsBlock;
1164
+ readonly $type: 'Step';
1457
1165
  isBackward: boolean;
1458
1166
  source: ElementRef;
1459
1167
  }
1460
- declare const DynamicStepSingle = "DynamicStepSingle";
1168
+ declare const Step = "Step";
1169
+ /**
1170
+ * A series of steps in a dynamic view flow
1171
+ * source -> target1 -> target2 -> ...
1172
+ */
1173
+ interface StepSeries extends AbstractStep {
1174
+ readonly $container: DynamicViewBody | StepSeries | StepsBlock;
1175
+ readonly $type: 'StepSeries';
1176
+ source: Step | StepSeries;
1177
+ }
1178
+ declare const StepSeries = "StepSeries";
1179
+ interface SubflowStep extends StepsBlock {
1180
+ readonly $container: AltSteps | DynamicViewBody | StepsBlock;
1181
+ readonly $type: 'SubflowStep';
1182
+ kind: 'break' | 'else' | 'if' | 'loop' | 'opt' | 'par' | 'parallel' | 'when';
1183
+ title?: string;
1184
+ }
1185
+ declare const SubflowStep = "SubflowStep";
1186
+ interface TryBlock extends StepsBlock {
1187
+ readonly $container: CatchBlock | DynamicViewBody | FinallyBlock | StepsBlock;
1188
+ readonly $type: 'TryBlock';
1189
+ title?: string;
1190
+ }
1191
+ declare const TryBlock = "TryBlock";
1461
1192
  type LikeC4AstType = {
1462
- AbstractDynamicStep: AbstractDynamicStep;
1193
+ AbstractStep: AbstractStep;
1194
+ AltSteps: AltSteps;
1463
1195
  AnyProperty: AnyProperty;
1464
1196
  ArrowProperty: ArrowProperty;
1465
1197
  BorderProperty: BorderProperty;
1198
+ CatchBlock: CatchBlock;
1466
1199
  ColorLiteral: ColorLiteral$1;
1467
1200
  ColorProperty: ColorProperty;
1468
1201
  CustomColor: CustomColor;
@@ -1483,18 +1216,14 @@ type LikeC4AstType = {
1483
1216
  DeploymentViewRulePredicate: DeploymentViewRulePredicate;
1484
1217
  DeploymentViewRuleStyle: DeploymentViewRuleStyle;
1485
1218
  DirectedRelationExpr: DirectedRelationExpr;
1486
- DynamicStepChain: DynamicStepChain;
1487
- DynamicStepSingle: DynamicStepSingle;
1488
1219
  DynamicView: DynamicView;
1489
1220
  DynamicViewBody: DynamicViewBody;
1490
1221
  DynamicViewDisplayVariantProperty: DynamicViewDisplayVariantProperty;
1491
1222
  DynamicViewGlobalPredicateRef: DynamicViewGlobalPredicateRef;
1492
1223
  DynamicViewIncludePredicate: DynamicViewIncludePredicate;
1493
- DynamicViewParallelSteps: DynamicViewParallelSteps;
1494
1224
  DynamicViewProperty: DynamicViewProperty;
1495
1225
  DynamicViewRef: DynamicViewRef;
1496
1226
  DynamicViewRule: DynamicViewRule;
1497
- DynamicViewStep: DynamicViewStep;
1498
1227
  Element: Element;
1499
1228
  ElementBody: ElementBody;
1500
1229
  ElementKind: ElementKind;
@@ -1513,10 +1242,12 @@ type LikeC4AstType = {
1513
1242
  ExtendDeploymentBody: ExtendDeploymentBody;
1514
1243
  ExtendElement: ExtendElement;
1515
1244
  ExtendElementBody: ExtendElementBody;
1245
+ ExtendElementOrRelation: ExtendElementOrRelation;
1516
1246
  ExtendElementProperty: ExtendElementProperty;
1517
1247
  ExtendRelation: ExtendRelation;
1518
1248
  ExtendRelationBody: ExtendRelationBody;
1519
1249
  ExtendRelationProperty: ExtendRelationProperty;
1250
+ FinallyBlock: FinallyBlock;
1520
1251
  FqnExpr: FqnExpr$2;
1521
1252
  FqnExprOrWhere: FqnExprOrWhere;
1522
1253
  FqnExprOrWith: FqnExprOrWith;
@@ -1555,6 +1286,7 @@ type LikeC4AstType = {
1555
1286
  MetadataValue: MetadataValue;
1556
1287
  Model: Model;
1557
1288
  ModelDeployments: ModelDeployments;
1289
+ ModelElement: ModelElement;
1558
1290
  ModelReferenceable: ModelReferenceable;
1559
1291
  ModelViews: ModelViews;
1560
1292
  MultipleProperty: MultipleProperty;
@@ -1591,14 +1323,22 @@ type LikeC4AstType = {
1591
1323
  SpecificationRelationshipStringProperty: SpecificationRelationshipStringProperty;
1592
1324
  SpecificationRule: SpecificationRule;
1593
1325
  SpecificationTag: SpecificationTag;
1326
+ Step: Step;
1327
+ StepOrSeries: StepOrSeries;
1328
+ StepSeries: StepSeries;
1329
+ StepStatement: StepStatement;
1330
+ StepsBlock: StepsBlock;
1594
1331
  StrictFqnElementRef: StrictFqnElementRef;
1595
1332
  StrictFqnRef: StrictFqnRef;
1596
1333
  StringProperty: StringProperty;
1597
1334
  StyleProperty: StyleProperty;
1335
+ SubflowStep: SubflowStep;
1598
1336
  Tag: Tag$1;
1599
1337
  TagRef: TagRef;
1600
1338
  Tags: Tags;
1601
1339
  TextSizeProperty: TextSizeProperty;
1340
+ TryBlock: TryBlock;
1341
+ TryStep: TryStep;
1602
1342
  ViewProperty: ViewProperty;
1603
1343
  ViewRef: ViewRef;
1604
1344
  ViewRule: ViewRule;
@@ -1705,15 +1445,7 @@ interface ParsedAstSpecification {
1705
1445
  color?: c4.ColorLiteral;
1706
1446
  }>;
1707
1447
  elements: Record<c4.ElementKind, c4.ElementSpecification>;
1708
- relationships: Record<c4.RelationshipKind, {
1709
- technology?: string;
1710
- notation?: string;
1711
- color?: c4.Color;
1712
- line?: c4.RelationshipLineType;
1713
- head?: c4.RelationshipArrowType;
1714
- tail?: c4.RelationshipArrowType;
1715
- multiple?: boolean;
1716
- }>;
1448
+ relationships: Record<c4.RelationshipKind, c4.RelationshipSpecification>;
1717
1449
  colors: Record<c4.CustomColor, {
1718
1450
  color: c4.ColorLiteral;
1719
1451
  }>;
@@ -1752,95 +1484,428 @@ interface ParsedAstExtendRelation {
1752
1484
  [key: string]: string | string[];
1753
1485
  };
1754
1486
  }
1755
- interface ParsedAstRelation {
1756
- id: c4.RelationId;
1757
- astPath: string;
1758
- source: c4.FqnRef.ModelRef;
1759
- target: c4.FqnRef.ModelRef;
1760
- kind?: c4.RelationshipKind;
1761
- tags?: c4.NonEmptyArray<c4.Tag>;
1762
- title: string;
1763
- description?: c4.MarkdownOrString;
1764
- technology?: string;
1765
- color?: c4.Color;
1766
- line?: c4.RelationshipLineType;
1767
- head?: c4.RelationshipArrowType;
1768
- tail?: c4.RelationshipArrowType;
1769
- links?: c4.NonEmptyArray<c4.Link>;
1770
- navigateTo?: c4.ViewId;
1771
- metadata?: {
1772
- [key: string]: string | string[];
1773
- };
1487
+ interface ParsedAstRelation {
1488
+ id: c4.RelationId;
1489
+ astPath: string;
1490
+ source: c4.FqnRef.ModelRef;
1491
+ target: c4.FqnRef.ModelRef;
1492
+ kind?: c4.RelationshipKind;
1493
+ tags?: c4.NonEmptyArray<c4.Tag>;
1494
+ title: string;
1495
+ description?: c4.MarkdownOrString;
1496
+ technology?: string;
1497
+ color?: c4.Color;
1498
+ line?: c4.RelationshipLineType;
1499
+ head?: c4.RelationshipArrowType;
1500
+ tail?: c4.RelationshipArrowType;
1501
+ links?: c4.NonEmptyArray<c4.Link>;
1502
+ navigateTo?: c4.ViewId;
1503
+ metadata?: {
1504
+ [key: string]: string | string[];
1505
+ };
1506
+ }
1507
+ type ParsedAstDeployment = Simplify<MergeExclusive<ParsedAstDeployment.Node, ParsedAstDeployment.Instance>>;
1508
+ declare namespace ParsedAstDeployment {
1509
+ type Node = c4.DeploymentNode;
1510
+ type Instance = Omit<c4.DeployedInstance, 'element'> & {
1511
+ readonly element: c4.FqnRef.ModelRef;
1512
+ };
1513
+ }
1514
+ type ParsedAstDeploymentRelation = c4.DeploymentRelationship & {
1515
+ astPath: string;
1516
+ };
1517
+ type ParsedAstGlobals = Writable<c4.ModelGlobals>;
1518
+ interface ParsedAstElementView {
1519
+ id: c4.ViewId;
1520
+ viewOf?: c4.Fqn;
1521
+ extends?: c4.ViewId;
1522
+ astPath: string;
1523
+ title: string | null;
1524
+ description: c4.MarkdownOrString | null;
1525
+ tags: c4.NonEmptyArray<c4.Tag> | null;
1526
+ links: c4.NonEmptyArray<c4.Link> | null;
1527
+ rules: c4.ElementViewRule[];
1528
+ }
1529
+ interface ParsedAstDynamicView {
1530
+ id: c4.ViewId;
1531
+ astPath: string;
1532
+ title: string | null;
1533
+ description: c4.MarkdownOrString | null;
1534
+ tags: c4.NonEmptyArray<c4.Tag> | null;
1535
+ links: c4.NonEmptyArray<c4.Link> | null;
1536
+ steps: c4.Step.Any[];
1537
+ rules: Array<c4.DynamicViewRule>;
1538
+ variant: c4.DynamicViewDisplayVariant | undefined;
1539
+ }
1540
+ interface ParsedAstDeploymentView {
1541
+ id: c4.ViewId;
1542
+ astPath: string;
1543
+ title: string | null;
1544
+ description: c4.MarkdownOrString | null;
1545
+ tags: c4.NonEmptyArray<c4.Tag> | null;
1546
+ links: c4.NonEmptyArray<c4.Link> | null;
1547
+ rules: Array<c4.DeploymentViewRule>;
1548
+ }
1549
+ type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
1550
+ interface AstNodeDescriptionWithFqn extends AstNodeDescription {
1551
+ likec4ProjectId: c4.ProjectId;
1552
+ id: c4.Fqn;
1553
+ }
1554
+ type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
1555
+ type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
1556
+ interface LikeC4DocumentProps {
1557
+ diagnostics?: Array<LikeC4DocumentDiagnostic>;
1558
+ c4Specification?: ParsedAstSpecification;
1559
+ c4Elements?: ParsedAstElement[];
1560
+ c4ExtendElements?: ParsedAstExtend[];
1561
+ c4ExtendDeployments?: ParsedAstExtend[];
1562
+ c4ExtendRelations?: ParsedAstExtendRelation[];
1563
+ c4Relations?: ParsedAstRelation[];
1564
+ c4Globals?: ParsedAstGlobals;
1565
+ c4Views?: ParsedAstView[];
1566
+ c4Deployments?: ParsedAstDeployment[];
1567
+ c4DeploymentRelations?: ParsedAstDeploymentRelation[];
1568
+ c4Imports?: MultiMap<c4.ProjectId, c4.Fqn, Set<c4.Fqn>>;
1569
+ }
1570
+ type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
1571
+ interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
1572
+ likec4ProjectId: c4.ProjectId;
1573
+ }
1574
+ interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
1575
+ likec4ProjectId: c4.ProjectId;
1576
+ }
1577
+ //#endregion
1578
+ //#region src/workspace/ProjectsManager.d.ts
1579
+ type NormalizedUri = Tagged<string, 'NormalizedUri'>;
1580
+ type DocOrUri = LangiumDocument | string | URI;
1581
+ /**
1582
+ * A tagged string that represents a project folder URI (with trailing slash).
1583
+ * Used in `startsWith` checks to determine if a document belongs to a project.
1584
+ */
1585
+ type ProjectFolder = Tagged<string, 'ProjectFolder'>;
1586
+ declare function ProjectFolder(folder: URI | string): ProjectFolder;
1587
+ interface Project {
1588
+ id: ProjectId$1;
1589
+ folderUri: URI;
1590
+ config: LikeC4ProjectConfig;
1591
+ }
1592
+ interface ProjectData extends Project {
1593
+ id: ProjectId$1;
1594
+ folder: ProjectFolder;
1595
+ config: LikeC4ProjectConfig;
1596
+ configUri: URI;
1597
+ folderUri: URI;
1598
+ exclude?: {
1599
+ (test: string): boolean;
1600
+ };
1601
+ /**
1602
+ * Resolved include paths with both URI and folder string representations.
1603
+ * These are additional directories that are part of this project.
1604
+ */
1605
+ includePaths?: NonEmptyArray<{
1606
+ uri: URI;
1607
+ folder: ProjectFolder;
1608
+ }>;
1609
+ /**
1610
+ * Normalized include configuration (paths, maxDepth, fileThreshold).
1611
+ */
1612
+ includeConfig: IncludeConfig;
1613
+ }
1614
+ type RegisterProjectOptions = {
1615
+ config: LikeC4ProjectConfig | LikeC4ProjectConfigInput;
1616
+ } & ({
1617
+ configUri: URI | string;
1618
+ } | {
1619
+ folderUri: URI | string;
1620
+ });
1621
+ declare class ProjectsManager extends ADisposable {
1622
+ #private;
1623
+ protected services: LikeC4SharedServices;
1624
+ /**
1625
+ * The global project ID used for all documents
1626
+ * that are not part of a specific project.
1627
+ */
1628
+ static readonly DefaultProjectId: ProjectId$1;
1629
+ constructor(services: LikeC4SharedServices);
1630
+ /**
1631
+ * Checks if a document is excluded by workspace-level patterns.
1632
+ * These patterns come from VS Code settings and take precedence over project-level excludes.
1633
+ */
1634
+ isExcludedByWorkspace(uri: NormalizedUri | URI): boolean;
1635
+ /**
1636
+ * Updates the workspace-level exclude patterns from VS Code settings.
1637
+ * Called during initial server startup; dynamic changes restart the server.
1638
+ */
1639
+ setWorkspaceExcludePatterns(patterns: string[] | undefined): void;
1640
+ /**
1641
+ * Returns:
1642
+ * - configured default project ID if set
1643
+ * - the default project ID if there are no projects.
1644
+ * - the ID of the only project
1645
+ * - undefined if there are multiple projects.
1646
+ */
1647
+ get defaultProjectId(): ProjectId$1 | undefined;
1648
+ set defaultProjectId(id: string | ProjectId$1 | undefined);
1649
+ get default(): ProjectData;
1650
+ get all(): NonEmptyReadonlyArray<ProjectId$1>;
1651
+ getProject(arg: ProjectId$1 | LangiumDocument): ProjectData;
1652
+ /**
1653
+ * Returns all projects that overlap with the specified folder (is parent or child)
1654
+ */
1655
+ findOverlaped(folder: URI | string): ReadonlyArray<ProjectData>;
1656
+ /**
1657
+ * Validates and ensures the project ID.
1658
+ * If no project ID is specified, returns default project ID
1659
+ * If there are multiple projects and default project is not set, throws an error
1660
+ */
1661
+ ensureProjectId(projectId?: ProjectId$1 | undefined): ProjectId$1;
1662
+ /**
1663
+ * Validates and ensures the project data.
1664
+ * If projectId is not specified, returns default project
1665
+ *
1666
+ * If there are multiple projects and default project is not set, throws an error
1667
+ *
1668
+ * @see ensureProjectId - to validate project ID only
1669
+ */
1670
+ ensureProject(projectId?: ProjectId$1 | undefined): ProjectData;
1671
+ hasMultipleProjects(): boolean;
1672
+ /**
1673
+ * Checks if given document (or URI) must be excluded from processing.
1674
+ */
1675
+ isExcluded(document: DocOrUri): boolean;
1676
+ /**
1677
+ * Checks if given document (or URI) must be excluded in the context of the project.
1678
+ */
1679
+ isExcluded(projectId: ProjectId$1, document: DocOrUri): boolean;
1680
+ /**
1681
+ * Checks if the specified document is included by the project:
1682
+ * - if the document belongs to the project and is not excluded
1683
+ * - if the document is included by the project
1684
+ */
1685
+ isIncluded(projectId: ProjectId$1, document: LangiumDocument | URI | string): boolean;
1686
+ /**
1687
+ * Registers likec4 project by config file.
1688
+ */
1689
+ registerConfigFile(configUri: URI, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
1690
+ /**
1691
+ * Registers (or reloads) likec4 project by config file or config object.
1692
+ * If there is some project registered at same folder, it will be reloaded.
1693
+ */
1694
+ registerProject(opts: RegisterProjectOptions, cancelToken?: Cancellation.CancellationToken): Promise<ProjectData>;
1695
+ /**
1696
+ * Determines which project the given document belongs to.
1697
+ * If the document does not belong to any project, returns the default project ID.
1698
+ */
1699
+ ownerProjectId(document: LangiumDocument | URI | string): ProjectId$1;
1700
+ protected findOwnerProject(uri: NormalizedUri): ProjectData | undefined;
1701
+ /**
1702
+ * Returns path to the document relative to the project folder.
1703
+ * If the document does not belong to any project, returns the document URI as string.
1704
+ */
1705
+ relativePath(document: LangiumDocument | URI | string): string;
1706
+ /**
1707
+ * Returns true if the manager is currently initializing or reloading projects.
1708
+ * This is used to prevent duplicate reload operations.
1709
+ */
1710
+ protected get isInitiatingOrReloading(): boolean;
1711
+ reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
1712
+ protected _reloadProjects(cancelToken?: Cancellation.CancellationToken): Promise<void>;
1713
+ protected uniqueProjectId(name: string): ProjectId$1;
1714
+ clearCaches(): void;
1715
+ rebuildProject(projectId: ProjectId$1, cancelToken?: Cancellation.CancellationToken): Promise<void>;
1716
+ /**
1717
+ * Returns all include paths from all projects.
1718
+ * Used by WorkspaceManager to scan additional directories for C4 files.
1719
+ */
1720
+ getAllIncludePaths(): Array<{
1721
+ projectId: ProjectId$1;
1722
+ includePath: URI;
1723
+ includeConfig: IncludeConfig;
1724
+ }>;
1725
+ /**
1726
+ * Register a listener to be called when the projects configuration has changed.
1727
+ * @returns A disposable that can be used to unregister the callback.
1728
+ */
1729
+ onProjectsUpdate(callback: () => void): Disposable;
1730
+ private getWorkspaceFolder;
1731
+ private notifyListeners;
1732
+ private updateIncludesExcludes;
1733
+ private warnIfConfigOverride;
1734
+ }
1735
+ //#endregion
1736
+ //#region src/filesystem/types.d.ts
1737
+ interface FileNode extends FileSystemNode {
1738
+ readonly isFile: true;
1739
+ readonly isDirectory: false;
1740
+ }
1741
+ interface FileSystemProvider$1 extends FileSystemProvider {
1742
+ /**
1743
+ * Scans the project files for the given URI.
1744
+ * @returns The list of file system entries that are contained within the specified directory.
1745
+ */
1746
+ scanProjectFiles(folderUri: URI): Promise<FileNode[]>;
1747
+ /**
1748
+ * Loads the project config from the given file.
1749
+ * @returns The project config.
1750
+ * @throws Error if the file does not exist or is not a valid project config.
1751
+ */
1752
+ loadProjectConfig(filepath: URI): Promise<LikeC4ProjectConfig>;
1753
+ /**
1754
+ * Reads the directory and returns LikeC4 files.
1755
+ *
1756
+ * @param options.recursive If true, recursively reads the directory,
1757
+ * @param options.maxDepth Maximum depth to traverse when recursive is true (default: Infinity)
1758
+ */
1759
+ readDirectory(uri: URI, options?: {
1760
+ recursive?: boolean;
1761
+ maxDepth?: number;
1762
+ }): Promise<FileNode[]>;
1763
+ /**
1764
+ * Finds all files in the given directory, matching the given filter.
1765
+ */
1766
+ scanDirectory(directory: URI, filter: (filepath: string, isDirectory: boolean) => boolean): Promise<FileNode[]>;
1767
+ /**
1768
+ * Writes the content to the file system.
1769
+ * Used by manual layouts.
1770
+ */
1771
+ writeFile(uri: URI, content: string): Promise<void>;
1772
+ /**
1773
+ * Deletes the file from the file system.
1774
+ * Used by manual layouts.
1775
+ * @return true if the file was deleted, false if the file did not exist.
1776
+ */
1777
+ deleteFile(uri: URI): Promise<boolean>;
1774
1778
  }
1775
- type ParsedAstDeployment = Simplify<MergeExclusive<ParsedAstDeployment.Node, ParsedAstDeployment.Instance>>;
1776
- declare namespace ParsedAstDeployment {
1777
- type Node = c4.DeploymentNode;
1778
- type Instance = Omit<c4.DeployedInstance, 'element'> & {
1779
- readonly element: c4.FqnRef.ModelRef;
1780
- };
1779
+ interface FileSystemModuleContext extends FileSystemWatcherModuleContext {
1780
+ fileSystemProvider: () => FileSystemProvider$1;
1781
1781
  }
1782
- type ParsedAstDeploymentRelation = c4.DeploymentRelationship & {
1783
- astPath: string;
1784
- };
1785
- type ParsedAstGlobals = Writable<c4.ModelGlobals>;
1786
- interface ParsedAstElementView {
1787
- id: c4.ViewId;
1788
- viewOf?: c4.Fqn;
1789
- extends?: c4.ViewId;
1790
- astPath: string;
1791
- title: string | null;
1792
- description: c4.MarkdownOrString | null;
1793
- tags: c4.NonEmptyArray<c4.Tag> | null;
1794
- links: c4.NonEmptyArray<c4.Link> | null;
1795
- rules: c4.ElementViewRule[];
1782
+ interface FileSystemWatcherModuleContext {
1783
+ fileSystemWatcher: (services: LikeC4SharedServices) => FileSystemWatcher;
1796
1784
  }
1797
- interface ParsedAstDynamicView {
1798
- id: c4.ViewId;
1799
- astPath: string;
1800
- title: string | null;
1801
- description: c4.MarkdownOrString | null;
1802
- tags: c4.NonEmptyArray<c4.Tag> | null;
1803
- links: c4.NonEmptyArray<c4.Link> | null;
1804
- steps: c4.DynamicViewStep[];
1805
- rules: Array<c4.DynamicViewRule>;
1806
- variant: c4.DynamicViewDisplayVariant | undefined;
1785
+ interface FileSystemWatcher extends AsyncDisposable {
1786
+ /**
1787
+ * Watches a folder for changes and triggers a reload of the documents and projects.
1788
+ */
1789
+ watch(folder: string): void;
1807
1790
  }
1808
- interface ParsedAstDeploymentView {
1809
- id: c4.ViewId;
1810
- astPath: string;
1811
- title: string | null;
1812
- description: c4.MarkdownOrString | null;
1813
- tags: c4.NonEmptyArray<c4.Tag> | null;
1814
- links: c4.NonEmptyArray<c4.Link> | null;
1815
- rules: Array<c4.DeploymentViewRule>;
1791
+ interface LikeC4ManualLayoutsModuleContext {
1792
+ manualLayouts: (services: LikeC4SharedServices) => LikeC4ManualLayouts;
1816
1793
  }
1817
- type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
1818
- interface AstNodeDescriptionWithFqn extends AstNodeDescription {
1819
- likec4ProjectId: c4.ProjectId;
1820
- id: c4.Fqn;
1794
+ type ManualLayoutsSnapshot = {
1795
+ hash: string;
1796
+ views: Record<ViewId$1, LayoutedView$1>;
1797
+ };
1798
+ type ManualLayoutUpdateEvent = {
1799
+ updated: URI;
1800
+ projectId: ProjectId$1;
1801
+ viewId: ViewId$1;
1802
+ } | {
1803
+ removed: URI;
1804
+ projectId: ProjectId$1;
1805
+ /**
1806
+ * Missing if triggered by FS event (file was deleted)
1807
+ */
1808
+ viewId?: ViewId$1;
1809
+ };
1810
+ type ManualLayoutUpdateListener = (event: ManualLayoutUpdateEvent) => void;
1811
+ interface LikeC4ManualLayouts extends Disposable {
1812
+ /**
1813
+ * Reads a single layouted view from the file system by its URI.
1814
+ * Used by the language server to get the current layout state.
1815
+ */
1816
+ readSnapshot(uri: URI): Promise<LayoutedView$1 | null>;
1817
+ read(project: Project): Promise<ManualLayoutsSnapshot | null>;
1818
+ write(project: Project, layouted: LayoutedView$1): Promise<Location>;
1819
+ remove(project: Project, view: ViewId$1): Promise<Location | null>;
1820
+ clearCaches(): void;
1821
+ /**
1822
+ * Registers a listener for manual layout updates.
1823
+ * The listener will be called when a manual layout is created, updated, or deleted.
1824
+ */
1825
+ onManualLayoutUpdate(listener: ManualLayoutUpdateListener): Disposable;
1826
+ /**
1827
+ * Handles file system updates for manual layouts.
1828
+ * Used by the file system watcher to notify the manual layouts module of changes.
1829
+ * @param event The file system event
1830
+ */
1831
+ handleFileSystemUpdate(event: {
1832
+ update: URI;
1833
+ delete?: never;
1834
+ } | {
1835
+ delete: URI;
1836
+ update?: never;
1837
+ }): Promise<void>;
1821
1838
  }
1822
- type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
1823
- type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
1824
- interface LikeC4DocumentProps {
1825
- diagnostics?: Array<LikeC4DocumentDiagnostic>;
1826
- c4Specification?: ParsedAstSpecification;
1827
- c4Elements?: ParsedAstElement[];
1828
- c4ExtendElements?: ParsedAstExtend[];
1829
- c4ExtendDeployments?: ParsedAstExtend[];
1830
- c4ExtendRelations?: ParsedAstExtendRelation[];
1831
- c4Relations?: ParsedAstRelation[];
1832
- c4Globals?: ParsedAstGlobals;
1833
- c4Views?: ParsedAstView[];
1834
- c4Deployments?: ParsedAstDeployment[];
1835
- c4DeploymentRelations?: ParsedAstDeploymentRelation[];
1836
- c4Imports?: MultiMap<c4.ProjectId, c4.Fqn, Set<c4.Fqn>>;
1839
+ //#endregion
1840
+ //#region src/filesystem/noop.d.ts
1841
+ declare const NoFileSystemWatcher: FileSystemWatcherModuleContext;
1842
+ declare const NoFileSystem: FileSystemModuleContext;
1843
+ declare const NoLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
1844
+ //#endregion
1845
+ //#region src/filesystem/LikeC4FileSystem.d.ts
1846
+ declare const WithFileSystem: (enableWatcher?: boolean) => FileSystemModuleContext;
1847
+ //#endregion
1848
+ //#region src/filesystem/ChokidarWatcher.d.ts
1849
+ declare const WithChokidarWatcher: FileSystemWatcherModuleContext;
1850
+ //#endregion
1851
+ //#region src/filesystem/LikeC4ManualLayouts.d.ts
1852
+ declare const WithLikeC4ManualLayouts: LikeC4ManualLayoutsModuleContext;
1853
+ //#endregion
1854
+ //#region src/formatting/LikeC4Formatter.d.ts
1855
+ type QuoteStyle = 'single' | 'double' | 'ignore' | 'auto';
1856
+ interface LikeC4FormatterOptions {
1857
+ quoteStyle: QuoteStyle;
1837
1858
  }
1838
- type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
1839
- interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
1840
- likec4ProjectId: c4.ProjectId;
1859
+ type ExtendedFormattingCommandType = 'normalizeQuotes';
1860
+ interface ExtendedFormattingCommand {
1861
+ type: ExtendedFormattingCommandType;
1862
+ region: FormattingRegion;
1841
1863
  }
1842
- interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
1843
- likec4ProjectId: c4.ProjectId;
1864
+ declare class LikeC4Formatter extends AbstractFormatter {
1865
+ protected options: LikeC4FormatterOptions;
1866
+ extendedFormattingCommands: ExtendedFormattingCommand[];
1867
+ constructor(services: LikeC4Services);
1868
+ protected doDocumentFormat(document: LangiumDocument, options: FormattingOptions, range?: Range): TextEdit[];
1869
+ protected format(node: AstNode): void;
1870
+ protected formatTags(node: AstNode): void;
1871
+ protected formatDeploymentRelation(node: AstNode): void;
1872
+ protected formatExtendDeployment(node: AstNode): void;
1873
+ protected formatRelation(node: AstNode): void;
1874
+ protected removeIndentFromTopLevelStatements(node: AstNode): void;
1875
+ protected indentContentInBraces(node: AstNode): void;
1876
+ protected appendKeywordsWithSpace(node: AstNode): void;
1877
+ protected formatView(node: AstNode): void;
1878
+ protected formatLeafProperty(node: AstNode): void;
1879
+ protected formatLinkProperty(node: AstNode): void;
1880
+ protected formatNavigateToProperty(node: AstNode): void;
1881
+ protected formatAutolayoutProperty(node: AstNode): void;
1882
+ protected formatMetadataProperty(node: AstNode): void;
1883
+ protected formatElementDeclaration(node: AstNode): void;
1884
+ protected formatExtendElement(node: AstNode): void;
1885
+ protected formatGlobals(node: AstNode): void;
1886
+ protected formatImports(node: AstNode): void;
1887
+ protected formatSpecificationRule(node: AstNode): void;
1888
+ protected formatWithPredicate(node: AstNode): void;
1889
+ protected formatDeploymentNodeDeclaration(node: AstNode): void;
1890
+ protected formatDeployedInstance(node: AstNode): void;
1891
+ protected formatViewRuleGlobalStyle(node: AstNode): void;
1892
+ protected formatViewRuleGlobalPredicate(node: AstNode): void;
1893
+ protected formatViewRuleGroup(node: AstNode): void;
1894
+ protected formatViewRuleStyle(node: AstNode): void;
1895
+ protected formatWhereExpression(node: AstNode): void;
1896
+ protected formatWhereRelationExpression(node: AstNode): void;
1897
+ protected formatWhereElementExpression(node: AstNode): void;
1898
+ protected formatIncludeExcludeExpressions(node: AstNode): void;
1899
+ protected formatRelationExpression(node: AstNode): void;
1900
+ protected formatSteps(node: AstNode): void;
1901
+ private findPredicateExpressionRoot;
1902
+ private on;
1903
+ private doExtendedFormatting;
1904
+ protected normalizeQuotes(node: AstNode): void;
1905
+ private quotesNormalizerFactory;
1906
+ private escapeQuotesInternalQuotes;
1907
+ private getAutoQuoteStyle;
1908
+ private onConfigurationUpdate;
1844
1909
  }
1845
1910
  //#endregion
1846
1911
  //#region src/references/name-provider.d.ts
@@ -1908,10 +1973,10 @@ declare class LangiumDocuments extends DefaultLangiumDocuments {
1908
1973
  declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
1909
1974
  #private;
1910
1975
  private services;
1911
- protected readonly documentFactory: LangiumDocumentFactory;
1912
1976
  protected readonly fileSystemProvider: FileSystemProvider$1;
1913
1977
  initialBuildOptions: BuildOptions;
1914
1978
  constructor(services: LikeC4SharedServices);
1979
+ protected get documentFactory(): LangiumDocumentFactory;
1915
1980
  /**
1916
1981
  * Whether the workspace is ready, use {@link ready} promise to wait for it
1917
1982
  */
@@ -1921,23 +1986,14 @@ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
1921
1986
  */
1922
1987
  protected performStartup(folders: WorkspaceFolder[]): Promise<LangiumDocument[]>;
1923
1988
  /**
1924
- * Load all additional documents that shall be visible in the context of the given workspace
1925
- * folders and add them to the collector. This can be used to include built-in libraries of
1926
- * your language, which can be either loaded from provided files or constructed in memory.
1927
- */
1928
- protected loadAdditionalDocuments(folders: WorkspaceFolder[], collector: (document: LangiumDocument) => void): Promise<void>;
1929
- /**
1930
- * Traverse the file system folder identified by the given URI and its subfolders. All
1931
- * contained files that match the file extensions are added to the collector.
1989
+ * Scans all include paths (from all projects) and returns found likec4 files
1932
1990
  */
1933
- protected traverseFolder(workspaceFolder: WorkspaceFolder, folderPath: URI$2, selector: FileSelector, collector: (document: LangiumDocument) => void): Promise<void>;
1934
- /**
1935
- * Determine whether the given folder entry shall be included while indexing the workspace.
1936
- */
1937
- protected includeEntry(_: WorkspaceFolder, entry: FileSystemNode, selector: FileSelector): boolean;
1991
+ protected scanProjectIncludePaths(): Promise<FileSystemNode[]>;
1992
+ protected loadDocuments(files: FileSystemNode[]): Promise<LangiumDocument[]>;
1993
+ protected saveAddDocument(document: LangiumDocument): void;
1938
1994
  workspace(): WorkspaceFolder | null;
1939
1995
  rebuildAll(cancelToken?: Cancellation.CancellationToken): Promise<void>;
1940
- get workspaceUri(): URI$2;
1996
+ get workspaceUri(): URI$1;
1941
1997
  get workspaceURL(): URL;
1942
1998
  /**
1943
1999
  * Force clean all caches
@@ -1956,23 +2012,17 @@ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
1956
2012
  //#endregion
1957
2013
  //#region src/references/scope-provider.d.ts
1958
2014
  declare class LikeC4ScopeProvider extends DefaultScopeProvider {
1959
- protected deploymentsIndex: DeploymentsIndex;
1960
- protected fqnIndex: FqnIndex;
2015
+ protected services: LikeC4Services;
1961
2016
  protected readonly indexManager: IndexManager;
1962
2017
  constructor(services: LikeC4Services);
2018
+ protected get fqnIndex(): FqnIndex;
2019
+ protected get deploymentsIndex(): DeploymentsIndex;
1963
2020
  getScope(context: ReferenceInfo): Scope;
1964
2021
  protected genUniqueDescedants(element: Element | DeploymentNode | undefined): Generator<AstNodeDescriptionWithFqn, void, any>;
1965
- protected genScopeExtendElement({
1966
- element
1967
- }: ExtendElement): Generator<AstNodeDescription>;
1968
- protected genScopeElementView({
1969
- viewOf,
1970
- extends: ext
1971
- }: ElementView): Generator<AstNodeDescription>;
2022
+ protected genScopeExtendElement({ element }: ExtendElement): Generator<AstNodeDescription>;
2023
+ protected genScopeElementView({ viewOf, extends: ext }: ElementView): Generator<AstNodeDescription>;
1972
2024
  protected getScopeForStrictFqnRef(projectId: ProjectId, container: StrictFqnRef, context: ReferenceInfo): Scope;
1973
- protected genScopeExtendDeployment({
1974
- deploymentNode
1975
- }: ExtendDeployment): Generator<AstNodeDescription>;
2025
+ protected genScopeExtendDeployment({ deploymentNode }: ExtendDeployment): Generator<AstNodeDescription>;
1976
2026
  protected streamForFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Stream<AstNodeDescription>;
1977
2027
  protected genScopeForParentlessFqnRef(projectId: ProjectId, container: FqnRef$2, context: ReferenceInfo): Generator<AstNodeDescription>;
1978
2028
  /**
@@ -1997,15 +2047,6 @@ declare class LikeC4ScopeProvider extends DefaultScopeProvider {
1997
2047
  protected getGlobalScope(referenceType: string, context: ReferenceInfo): Scope;
1998
2048
  }
1999
2049
  //#endregion
2000
- //#region src/utils/disposable.d.ts
2001
- declare abstract class ADisposable implements Disposable {
2002
- protected toDispose: Disposable[];
2003
- protected isDisposed: boolean;
2004
- onDispose(...disposable: Disposable[]): void;
2005
- dispose(): void;
2006
- protected throwIfDisposed(): void;
2007
- }
2008
- //#endregion
2009
2050
  //#region src/model/fqn-index.d.ts
2010
2051
  declare class FqnIndex<AstNd = Element> extends ADisposable {
2011
2052
  protected services: LikeC4Services;
@@ -2048,17 +2089,14 @@ declare class DocumentFqnIndex {
2048
2089
  /**
2049
2090
  * direct children of elements
2050
2091
  */
2051
-
2052
2092
  _children: MultiMap<Fqn$1, AstNodeDescriptionWithFqn>,
2053
2093
  /**
2054
2094
  * All descendants of an element (unique by name)
2055
2095
  */
2056
-
2057
2096
  _descendants: MultiMap<Fqn$1, AstNodeDescriptionWithFqn>,
2058
2097
  /**
2059
2098
  * All elements by FQN
2060
2099
  */
2061
-
2062
2100
  _byfqn: MultiMap<Fqn$1, AstNodeDescriptionWithFqn>, projectId: ProjectId$1);
2063
2101
  rootElements(): readonly AstNodeDescriptionWithFqn[];
2064
2102
  byFqn(fqn: Fqn$1): readonly AstNodeDescriptionWithFqn[];
@@ -2095,30 +2133,11 @@ declare class MergedSpecification {
2095
2133
  /**
2096
2134
  * Converts a parsed model into a C4 model element.
2097
2135
  */
2098
- toModelElement: ({
2099
- tags,
2100
- links,
2101
- style,
2102
- id,
2103
- kind,
2104
- title,
2105
- description,
2106
- technology,
2107
- summary,
2108
- metadata
2109
- }: ParsedAstElement) => c4.Element | null;
2136
+ toModelElement: ({ tags, links, style, id, kind, title, description, technology, summary, metadata }: ParsedAstElement) => c4.Element | null;
2110
2137
  /**
2111
2138
  * Converts a parsed model into a C4 model relation.
2112
2139
  */
2113
- toModelRelation: ({
2114
- astPath: _astPath,
2115
- source,
2116
- target,
2117
- kind,
2118
- links,
2119
- id,
2120
- ...model
2121
- }: ParsedAstRelation) => c4.Relationship | null;
2140
+ toModelRelation: ({ astPath: _astPath, source, target, kind, links, id, title, tags, ...model }: ParsedAstRelation) => c4.Relationship | null;
2122
2141
  /**
2123
2142
  * Converts a parsed deployment model into a C4 deployment model
2124
2143
  */
@@ -2126,15 +2145,7 @@ declare class MergedSpecification {
2126
2145
  /**
2127
2146
  * Converts a parsed deployment relation into a C4 deployment relation.
2128
2147
  */
2129
- toDeploymentRelation: ({
2130
- astPath: _astPath,
2131
- source,
2132
- target,
2133
- kind,
2134
- links,
2135
- id,
2136
- ...model
2137
- }: ParsedAstDeploymentRelation) => c4.DeploymentRelationship | null;
2148
+ toDeploymentRelation: ({ astPath: _astPath, source, target, kind, links, id, tags, ...model }: ParsedAstDeploymentRelation) => c4.DeploymentRelationship | null;
2138
2149
  }
2139
2150
  //#endregion
2140
2151
  //#region src/model/last-seen-artifacts.d.ts
@@ -2142,7 +2153,7 @@ declare class MergedSpecification {
2142
2153
  * Provides access to "last seen artifacts" for a given project,
2143
2154
  * (Results of the last successful parsing)
2144
2155
  */
2145
- declare class LastSeenArtifacts {
2156
+ declare class LastSeenArtifacts extends ADisposable {
2146
2157
  #private;
2147
2158
  constructor(services: LikeC4Services);
2148
2159
  /**
@@ -2244,7 +2255,7 @@ declare class LikeC4ModelLocator {
2244
2255
  *
2245
2256
  * If the document does not belong to any project, it will return null.
2246
2257
  */
2247
- locateDocumentTags(documentUri: URI$2, cancelToken?: Cancellation.CancellationToken): Promise<null | Array<{
2258
+ locateDocumentTags(documentUri: URI$1, cancelToken?: Cancellation.CancellationToken): Promise<null | Array<{
2248
2259
  name: Tag;
2249
2260
  color: c4.ColorLiteral;
2250
2261
  range: Range;
@@ -2277,10 +2288,11 @@ type LayoutViewParams = {
2277
2288
  */
2278
2289
  layoutType?: LayoutType | undefined;
2279
2290
  projectId?: ProjectId | undefined;
2280
- cancelToken?: CancellationToken | undefined; /** Optional AI-generated layout hints */
2291
+ cancelToken?: CancellationToken | undefined;
2292
+ /** Optional AI-generated layout hints */
2281
2293
  layoutHints?: AILayoutHints | undefined;
2282
2294
  };
2283
- interface LikeC4Views {
2295
+ interface LikeC4Views extends Disposable {
2284
2296
  readonly layouter: GraphvizLayouter;
2285
2297
  /**
2286
2298
  * Returns computed views (i.e. views with predicates computed)
@@ -2370,14 +2382,7 @@ type ConfigureLanguageServerLoggerOptions = {
2370
2382
  */
2371
2383
  colors?: boolean;
2372
2384
  };
2373
- declare function configureLanguageServerLogger({
2374
- lspConnection: connection,
2375
- enableTelemetry,
2376
- useStdErr,
2377
- logLevel: lowestLevel,
2378
- nonBlocking,
2379
- colors
2380
- }?: ConfigureLanguageServerLoggerOptions): void;
2385
+ declare function configureLanguageServerLogger({ lspConnection: connection, enableTelemetry, useStdErr, logLevel: lowestLevel, nonBlocking, colors }?: ConfigureLanguageServerLoggerOptions): void;
2381
2386
  //#endregion
2382
2387
  //#region src/index.d.ts
2383
2388
  interface StartLanguageServerOptions {
@@ -2433,7 +2438,7 @@ declare class BaseParser {
2433
2438
  constructor(services: LikeC4Services, doc: ParsedLikeC4LangiumDocument, project: Project);
2434
2439
  logError(error: unknown, astNode?: AstNode | Reference<AstNode>, level?: ParserLevel): void;
2435
2440
  tryParse<N extends AstNode, T>(level: ParserLevel, node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2436
- tryMap<N extends AstNode, T>(level: ParserLevel, iterable: ReadonlyArray<N>, fn: (node: N) => T | undefined): T[];
2441
+ tryMap<N extends AstNode, T>(level: ParserLevel, iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
2437
2442
  resolveFqn(node: FqnReferenceable): c4.Fqn;
2438
2443
  getAstNodePath(node: AstNode): string;
2439
2444
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
@@ -2499,13 +2504,17 @@ declare const DocumentParserFromMixins: {
2499
2504
  parseDynamicElementView(astNode: DynamicView, additionalStyles: any[]): ParsedAstDynamicView;
2500
2505
  parseDynamicViewRule(astRule: DynamicViewRule): ProjectId;
2501
2506
  parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId;
2502
- parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId;
2503
- parseDynamicStep(node: DynamicViewStep): ProjectId | ProjectId;
2504
- recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
2505
- parseDynamicStepSingle(node: DynamicStepSingle): ProjectId;
2506
- parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId, "source", {
2507
+ parseSteps(nodes: StepStatement[]): ProjectId[];
2508
+ parseStepStatement(node: StepStatement): ProjectId;
2509
+ parseStepSeries(node: StepSeries): ProjectId;
2510
+ recursiveParseStepSeries(node: StepSeries, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
2511
+ parseStep(node: Step): ProjectId;
2512
+ parseAbstractDynamicStep(astnode: AbstractStep): import("type-fest").Writable<import("type-fest").Except<ProjectId, "source", {
2507
2513
  requireExactProps: true;
2508
2514
  }>>;
2515
+ parseSubflowStep(node: SubflowStep): ProjectId | ProjectId | ProjectId | ProjectId;
2516
+ parseTryStep(node: TryStep): ProjectId;
2517
+ parseAltSteps(node: AltSteps): ProjectId;
2509
2518
  parsePredicate(astNode: ExpressionV2): ProjectId;
2510
2519
  parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
2511
2520
  parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
@@ -2528,7 +2537,7 @@ declare const DocumentParserFromMixins: {
2528
2537
  parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
2529
2538
  parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
2530
2539
  parseRelationExprWith(astNode: RelationExprWith): ProjectId;
2531
- parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
2540
+ parseCustomRelationProperties(custom: CustomRelationProperties | undefined): import("type-fest").Except<ProjectId["customRelation"], "expr">;
2532
2541
  parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
2533
2542
  parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
2534
2543
  parseRelationExpr(astNode: RelationExpr$1): ProjectId;
@@ -2540,11 +2549,11 @@ declare const DocumentParserFromMixins: {
2540
2549
  readonly services: LikeC4Services;
2541
2550
  readonly doc: ParsedLikeC4LangiumDocument;
2542
2551
  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[];
2552
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2553
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2554
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
2546
2555
  resolveFqn(node: FqnReferenceable): ProjectId;
2547
- getAstNodePath(node: langium.AstNode): string;
2556
+ getAstNodePath(node: import("langium").AstNode): string;
2548
2557
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
2549
2558
  [key: string]: string | string[];
2550
2559
  } | undefined;
@@ -2604,13 +2613,17 @@ declare const DocumentParserFromMixins: {
2604
2613
  parseDynamicElementView(astNode: DynamicView, additionalStyles: any[]): ParsedAstDynamicView;
2605
2614
  parseDynamicViewRule(astRule: DynamicViewRule): ProjectId;
2606
2615
  parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): ProjectId;
2607
- parseDynamicParallelSteps(node: DynamicViewParallelSteps): ProjectId;
2608
- parseDynamicStep(node: DynamicViewStep): ProjectId | ProjectId;
2609
- recursiveParseDynamicStepChain(node: DynamicStepChain, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
2610
- parseDynamicStepSingle(node: DynamicStepSingle): ProjectId;
2611
- parseAbstractDynamicStep(astnode: AbstractDynamicStep): type_fest0.Writable<type_fest0.Except<ProjectId, "source", {
2616
+ parseSteps(nodes: StepStatement[]): ProjectId[];
2617
+ parseStepStatement(node: StepStatement): ProjectId;
2618
+ parseStepSeries(node: StepSeries): ProjectId;
2619
+ recursiveParseStepSeries(node: StepSeries, callstack?: Array<[source: ProjectId, target: ProjectId]>): ProjectId[];
2620
+ parseStep(node: Step): ProjectId;
2621
+ parseAbstractDynamicStep(astnode: AbstractStep): import("type-fest").Writable<import("type-fest").Except<ProjectId, "source", {
2612
2622
  requireExactProps: true;
2613
2623
  }>>;
2624
+ parseSubflowStep(node: SubflowStep): ProjectId | ProjectId | ProjectId | ProjectId;
2625
+ parseTryStep(node: TryStep): ProjectId;
2626
+ parseAltSteps(node: AltSteps): ProjectId;
2614
2627
  parsePredicate(astNode: ExpressionV2): ProjectId;
2615
2628
  parseElementPredicate(astNode: FqnExprOrWith): ProjectId;
2616
2629
  parseElementPredicateOrWhere(astNode: FqnExprOrWhere): ProjectId;
@@ -2633,7 +2646,7 @@ declare const DocumentParserFromMixins: {
2633
2646
  parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
2634
2647
  parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
2635
2648
  parseRelationExprWith(astNode: RelationExprWith): ProjectId;
2636
- parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
2649
+ parseCustomRelationProperties(custom: CustomRelationProperties | undefined): import("type-fest").Except<ProjectId["customRelation"], "expr">;
2637
2650
  parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
2638
2651
  parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
2639
2652
  parseRelationExpr(astNode: RelationExpr$1): ProjectId;
@@ -2645,11 +2658,11 @@ declare const DocumentParserFromMixins: {
2645
2658
  readonly services: LikeC4Services;
2646
2659
  readonly doc: ParsedLikeC4LangiumDocument;
2647
2660
  readonly project: Project;
2648
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2649
- 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;
2650
- 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[];
2661
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2662
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2663
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
2651
2664
  resolveFqn(node: FqnReferenceable): ProjectId;
2652
- getAstNodePath(node: langium.AstNode): string;
2665
+ getAstNodePath(node: import("langium").AstNode): string;
2653
2666
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
2654
2667
  [key: string]: string | string[];
2655
2668
  } | undefined;
@@ -2705,11 +2718,11 @@ declare const DocumentParserFromMixins: {
2705
2718
  readonly services: LikeC4Services;
2706
2719
  readonly doc: ParsedLikeC4LangiumDocument;
2707
2720
  readonly project: Project;
2708
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2709
- 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;
2710
- 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[];
2721
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2722
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2723
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
2711
2724
  resolveFqn(node: FqnReferenceable): ProjectId;
2712
- getAstNodePath(node: langium.AstNode): string;
2725
+ getAstNodePath(node: import("langium").AstNode): string;
2713
2726
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
2714
2727
  [key: string]: string | string[];
2715
2728
  } | undefined;
@@ -2768,7 +2781,7 @@ declare const DocumentParserFromMixins: {
2768
2781
  parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
2769
2782
  parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
2770
2783
  parseRelationExprWith(astNode: RelationExprWith): ProjectId;
2771
- parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
2784
+ parseCustomRelationProperties(custom: CustomRelationProperties | undefined): import("type-fest").Except<ProjectId["customRelation"], "expr">;
2772
2785
  parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
2773
2786
  parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
2774
2787
  parseRelationExpr(astNode: RelationExpr$1): ProjectId;
@@ -2780,11 +2793,11 @@ declare const DocumentParserFromMixins: {
2780
2793
  readonly services: LikeC4Services;
2781
2794
  readonly doc: ParsedLikeC4LangiumDocument;
2782
2795
  readonly project: Project;
2783
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2784
- 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;
2785
- 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[];
2796
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2797
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2798
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
2786
2799
  resolveFqn(node: FqnReferenceable): ProjectId;
2787
- getAstNodePath(node: langium.AstNode): string;
2800
+ getAstNodePath(node: import("langium").AstNode): string;
2788
2801
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
2789
2802
  [key: string]: string | string[];
2790
2803
  } | undefined;
@@ -2836,7 +2849,7 @@ declare const DocumentParserFromMixins: {
2836
2849
  parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
2837
2850
  parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
2838
2851
  parseRelationExprWith(astNode: RelationExprWith): ProjectId;
2839
- parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
2852
+ parseCustomRelationProperties(custom: CustomRelationProperties | undefined): import("type-fest").Except<ProjectId["customRelation"], "expr">;
2840
2853
  parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
2841
2854
  parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
2842
2855
  parseRelationExpr(astNode: RelationExpr$1): ProjectId;
@@ -2848,11 +2861,11 @@ declare const DocumentParserFromMixins: {
2848
2861
  readonly services: LikeC4Services;
2849
2862
  readonly doc: ParsedLikeC4LangiumDocument;
2850
2863
  readonly project: Project;
2851
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2852
- 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;
2853
- 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[];
2864
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2865
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2866
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
2854
2867
  resolveFqn(node: FqnReferenceable): ProjectId;
2855
- getAstNodePath(node: langium.AstNode): string;
2868
+ getAstNodePath(node: import("langium").AstNode): string;
2856
2869
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
2857
2870
  [key: string]: string | string[];
2858
2871
  } | undefined;
@@ -2912,7 +2925,7 @@ declare const DocumentParserFromMixins: {
2912
2925
  parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
2913
2926
  parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
2914
2927
  parseRelationExprWith(astNode: RelationExprWith): ProjectId;
2915
- parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
2928
+ parseCustomRelationProperties(custom: CustomRelationProperties | undefined): import("type-fest").Except<ProjectId["customRelation"], "expr">;
2916
2929
  parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
2917
2930
  parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
2918
2931
  parseRelationExpr(astNode: RelationExpr$1): ProjectId;
@@ -2924,11 +2937,11 @@ declare const DocumentParserFromMixins: {
2924
2937
  readonly services: LikeC4Services;
2925
2938
  readonly doc: ParsedLikeC4LangiumDocument;
2926
2939
  readonly project: Project;
2927
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2928
- 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;
2929
- 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[];
2940
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2941
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
2942
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
2930
2943
  resolveFqn(node: FqnReferenceable): ProjectId;
2931
- getAstNodePath(node: langium.AstNode): string;
2944
+ getAstNodePath(node: import("langium").AstNode): string;
2932
2945
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
2933
2946
  [key: string]: string | string[];
2934
2947
  } | undefined;
@@ -2982,7 +2995,7 @@ declare const DocumentParserFromMixins: {
2982
2995
  parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
2983
2996
  parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
2984
2997
  parseRelationExprWith(astNode: RelationExprWith): ProjectId;
2985
- parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
2998
+ parseCustomRelationProperties(custom: CustomRelationProperties | undefined): import("type-fest").Except<ProjectId["customRelation"], "expr">;
2986
2999
  parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
2987
3000
  parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
2988
3001
  parseRelationExpr(astNode: RelationExpr$1): ProjectId;
@@ -2994,11 +3007,11 @@ declare const DocumentParserFromMixins: {
2994
3007
  readonly services: LikeC4Services;
2995
3008
  readonly doc: ParsedLikeC4LangiumDocument;
2996
3009
  readonly project: Project;
2997
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
2998
- 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;
2999
- 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[];
3010
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
3011
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
3012
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
3000
3013
  resolveFqn(node: FqnReferenceable): ProjectId;
3001
- getAstNodePath(node: langium.AstNode): string;
3014
+ getAstNodePath(node: import("langium").AstNode): string;
3002
3015
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
3003
3016
  [key: string]: string | string[];
3004
3017
  } | undefined;
@@ -3042,11 +3055,11 @@ declare const DocumentParserFromMixins: {
3042
3055
  readonly services: LikeC4Services;
3043
3056
  readonly doc: ParsedLikeC4LangiumDocument;
3044
3057
  readonly project: Project;
3045
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
3046
- 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;
3047
- 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[];
3058
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
3059
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
3060
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
3048
3061
  resolveFqn(node: FqnReferenceable): ProjectId;
3049
- getAstNodePath(node: langium.AstNode): string;
3062
+ getAstNodePath(node: import("langium").AstNode): string;
3050
3063
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
3051
3064
  [key: string]: string | string[];
3052
3065
  } | undefined;
@@ -3094,7 +3107,7 @@ declare const DocumentParserFromMixins: {
3094
3107
  parseFqnExpressions(astNode: FqnExpressions): ProjectId[];
3095
3108
  parseRelationExprOrWith(astNode: RelationExprOrWith): ProjectId;
3096
3109
  parseRelationExprWith(astNode: RelationExprWith): ProjectId;
3097
- parseCustomRelationProperties(custom: CustomRelationProperties | undefined): type_fest0.Except<ProjectId["customRelation"], "expr">;
3110
+ parseCustomRelationProperties(custom: CustomRelationProperties | undefined): import("type-fest").Except<ProjectId["customRelation"], "expr">;
3098
3111
  parseRelationExprOrWhere(astNode: RelationExprOrWhere): ProjectId;
3099
3112
  parseRelationExprWhere(astNode: RelationExprWhere): ProjectId;
3100
3113
  parseRelationExpr(astNode: RelationExpr$1): ProjectId;
@@ -3106,11 +3119,11 @@ declare const DocumentParserFromMixins: {
3106
3119
  readonly services: LikeC4Services;
3107
3120
  readonly doc: ParsedLikeC4LangiumDocument;
3108
3121
  readonly project: Project;
3109
- logError(error: unknown, astNode?: langium.AstNode | langium.Reference<langium.AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
3110
- 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;
3111
- 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[];
3122
+ logError(error: unknown, astNode?: import("langium").AstNode | import("langium").Reference<import("langium").AstNode>, level?: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification"): void;
3123
+ tryParse<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", node: N | undefined, fn: (node: NoInfer<N>) => T | undefined): T | undefined;
3124
+ tryMap<N extends import("langium").AstNode, T>(level: "base" | "model" | "deployment" | "fqnref" | "relation" | "views" | "globals" | "imports" | "specification", iterable: ReadonlyArray<N>, fn: (node: N, index: number) => T | undefined): T[];
3112
3125
  resolveFqn(node: FqnReferenceable): ProjectId;
3113
- getAstNodePath(node: langium.AstNode): string;
3126
+ getAstNodePath(node: import("langium").AstNode): string;
3114
3127
  getMetadata(metadataAstNode: MetadataProperty | undefined): {
3115
3128
  [key: string]: string | string[];
3116
3129
  } | undefined;
@@ -3147,7 +3160,7 @@ declare const DocumentParserFromMixins: {
3147
3160
  };
3148
3161
  } & typeof BaseParser;
3149
3162
  declare class DocumentParser extends DocumentParserFromMixins {}
3150
- declare class LikeC4ModelParser {
3163
+ declare class LikeC4ModelParser extends ADisposable {
3151
3164
  private services;
3152
3165
  protected cachedParsers: any;
3153
3166
  constructor(services: LikeC4Services);
@@ -3168,10 +3181,7 @@ declare class LikeC4ModelChanges {
3168
3181
  private locator;
3169
3182
  constructor(services: LikeC4Services);
3170
3183
  applyChange(changeView: ChangeView.Params): Promise<ChangeView.Res>;
3171
- protected convertToTextEdit({
3172
- lookup,
3173
- change
3174
- }: {
3184
+ protected convertToTextEdit({ lookup, change }: {
3175
3185
  lookup: ViewLocateResult;
3176
3186
  change: Exclude<ViewChange, ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout | ViewChange.ChangeProperty>;
3177
3187
  }): {
@@ -3332,7 +3342,7 @@ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
3332
3342
  protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
3333
3343
  protected getModelSymbol(astModel: Model): DocumentSymbol[];
3334
3344
  protected getDeploymentModelSymbol(astModel: ModelDeployments): DocumentSymbol[];
3335
- protected getElementsSymbol(el: Element | Relation | ExtendElement, parentFqn?: string): DocumentSymbol[];
3345
+ protected getElementsSymbol(el: Element | Relation | ExtendElement, _parentFqn?: string): DocumentSymbol[];
3336
3346
  protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
3337
3347
  protected getElementSymbol(astElement: Element): DocumentSymbol[];
3338
3348
  protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];