@likec4/language-server 1.32.2 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ast.d.ts +6 -5
- package/dist/ast.js +3 -0
- package/dist/bundled.mjs +3342 -2550
- package/dist/generated/ast.d.ts +20 -11
- package/dist/generated/ast.js +17 -5
- package/dist/generated/grammar.js +1 -1
- package/dist/lsp/SemanticTokenProvider.js +1 -1
- package/dist/mcp/LikeC4MCPTools.js +5 -2
- package/dist/model/builder/MergedSpecification.js +8 -4
- package/dist/model/index.d.ts +1 -0
- package/dist/model/index.js +1 -0
- package/dist/model/model-parser.d.ts +126 -0
- package/dist/model/parser/Base.d.ts +30 -2
- package/dist/model/parser/Base.js +54 -3
- package/dist/model/parser/DeploymentModelParser.d.ts +14 -0
- package/dist/model/parser/DeploymentModelParser.js +24 -21
- package/dist/model/parser/DeploymentViewParser.d.ts +14 -0
- package/dist/model/parser/DeploymentViewParser.js +15 -6
- package/dist/model/parser/FqnRefParser.d.ts +14 -0
- package/dist/model/parser/FqnRefParser.js +8 -6
- package/dist/model/parser/GlobalsParser.d.ts +14 -0
- package/dist/model/parser/ImportsParser.d.ts +14 -0
- package/dist/model/parser/ModelParser.d.ts +14 -0
- package/dist/model/parser/ModelParser.js +22 -14
- package/dist/model/parser/PredicatesParser.d.ts +14 -0
- package/dist/model/parser/SpecificationParser.d.ts +14 -0
- package/dist/model/parser/SpecificationParser.js +16 -11
- package/dist/model/parser/ValueConverter.d.ts +4 -0
- package/dist/model/parser/ValueConverter.js +12 -0
- package/dist/model/parser/ViewsParser.d.ts +14 -0
- package/dist/model/parser/ViewsParser.js +21 -7
- package/dist/module.d.ts +4 -1
- package/dist/module.js +5 -1
- package/dist/views/configurable-layouter.js +22 -28
- package/dist/views/likec4-views.js +0 -1
- package/package.json +19 -18
package/dist/ast.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export interface ParsedAstElement {
|
|
|
71
71
|
astPath: string;
|
|
72
72
|
kind: c4.ElementKind;
|
|
73
73
|
title: string;
|
|
74
|
-
description?:
|
|
74
|
+
description?: c4.MarkdownOrString;
|
|
75
75
|
technology?: string;
|
|
76
76
|
tags?: c4.NonEmptyArray<c4.Tag>;
|
|
77
77
|
links?: c4.NonEmptyArray<c4.Link>;
|
|
@@ -97,7 +97,7 @@ export interface ParsedAstRelation {
|
|
|
97
97
|
kind?: c4.RelationshipKind;
|
|
98
98
|
tags?: c4.NonEmptyArray<c4.Tag>;
|
|
99
99
|
title: string;
|
|
100
|
-
description?:
|
|
100
|
+
description?: c4.MarkdownOrString;
|
|
101
101
|
technology?: string;
|
|
102
102
|
color?: c4.Color;
|
|
103
103
|
line?: c4.RelationshipLineType;
|
|
@@ -126,7 +126,7 @@ export interface ParsedAstElementView {
|
|
|
126
126
|
extends?: c4.ViewId;
|
|
127
127
|
astPath: string;
|
|
128
128
|
title: string | null;
|
|
129
|
-
description:
|
|
129
|
+
description: c4.MarkdownOrString | null;
|
|
130
130
|
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
131
131
|
links: c4.NonEmptyArray<c4.Link> | null;
|
|
132
132
|
rules: c4.ElementViewRule[];
|
|
@@ -136,7 +136,7 @@ export interface ParsedAstDynamicView {
|
|
|
136
136
|
id: c4.ViewId;
|
|
137
137
|
astPath: string;
|
|
138
138
|
title: string | null;
|
|
139
|
-
description:
|
|
139
|
+
description: c4.MarkdownOrString | null;
|
|
140
140
|
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
141
141
|
links: c4.NonEmptyArray<c4.Link> | null;
|
|
142
142
|
steps: c4.DynamicViewStepOrParallel[];
|
|
@@ -147,7 +147,7 @@ export interface ParsedAstDeploymentView {
|
|
|
147
147
|
id: c4.ViewId;
|
|
148
148
|
astPath: string;
|
|
149
149
|
title: string | null;
|
|
150
|
-
description:
|
|
150
|
+
description: c4.MarkdownOrString | null;
|
|
151
151
|
tags: c4.NonEmptyArray<c4.Tag> | null;
|
|
152
152
|
links: c4.NonEmptyArray<c4.Link> | null;
|
|
153
153
|
rules: Array<c4.DeploymentViewRule>;
|
|
@@ -189,6 +189,7 @@ export interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Requ
|
|
|
189
189
|
}
|
|
190
190
|
export declare function isLikeC4LangiumDocument(doc: LangiumDocument): doc is LikeC4LangiumDocument;
|
|
191
191
|
export declare function isParsedLikeC4LangiumDocument(doc: LangiumDocument): doc is ParsedLikeC4LangiumDocument;
|
|
192
|
+
export declare function parseMarkdownAsString(node?: ast.MarkdownOrString): string | undefined;
|
|
192
193
|
export declare function parseAstPercent(value: string): number;
|
|
193
194
|
export declare function parseAstOpacityProperty({ value }: ast.OpacityProperty): number;
|
|
194
195
|
export declare function parseAstSizeValue({ value }: {
|
package/dist/ast.js
CHANGED
|
@@ -33,6 +33,9 @@ export function isLikeC4LangiumDocument(doc) {
|
|
|
33
33
|
export function isParsedLikeC4LangiumDocument(doc) {
|
|
34
34
|
return isLikeC4LangiumDocument(doc) && doc.state == DocumentState.Validated && !!doc.c4Specification && !!doc.c4Elements && !!doc.c4ExtendElements && !!doc.c4ExtendDeployments && !!doc.c4Relations && !!doc.c4Views && !!doc.c4Deployments && !!doc.c4DeploymentRelations && !!doc.c4Imports;
|
|
35
35
|
}
|
|
36
|
+
export function parseMarkdownAsString(node) {
|
|
37
|
+
return node?.markdown || node?.text;
|
|
38
|
+
}
|
|
36
39
|
export function parseAstPercent(value) {
|
|
37
40
|
const opacity = parseFloat(value);
|
|
38
41
|
return isNaN(opacity) ? 100 : clamp(opacity, { min: 0, max: 100 });
|