@likec4/language-server 1.59.1 → 1.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/chunks/module.d.mts
CHANGED
|
@@ -65,6 +65,7 @@ declare const DeploymentNodeOrElementKind = "DeploymentNodeOrElementKind";
|
|
|
65
65
|
type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAncestors | ViewRuleAutoLayout;
|
|
66
66
|
declare const DeploymentViewRule = "DeploymentViewRule";
|
|
67
67
|
type DynamicViewDisplayVariantValue = 'diagram' | 'sequence';
|
|
68
|
+
type DynamicViewFlowKeyword = 'alt' | 'break' | 'catch' | 'else' | 'finally' | 'if' | 'loop' | 'opt' | 'par' | 'parallel' | 'try' | 'when';
|
|
68
69
|
type DynamicViewProperty = DynamicViewDisplayVariantProperty | ViewProperty;
|
|
69
70
|
declare const DynamicViewProperty = "DynamicViewProperty";
|
|
70
71
|
type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
|
|
@@ -90,7 +91,7 @@ type FqnReferenceable = Element | ExtendDeployment | ExtendElement | Referenceab
|
|
|
90
91
|
declare const FqnReferenceable = "FqnReferenceable";
|
|
91
92
|
type IconId = string;
|
|
92
93
|
type IconPositionValue = 'bottom' | 'left' | 'right' | 'top';
|
|
93
|
-
type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | 'relationship' | ArrowType | DynamicViewDisplayVariantValue | ElementShape | IconPositionValue | LineOptions | Participant | RankValue | SizeValue | ThemeColor | string;
|
|
94
|
+
type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | 'relationship' | ArrowType | DynamicViewDisplayVariantValue | DynamicViewFlowKeyword | ElementShape | IconPositionValue | LineOptions | Participant | RankValue | SizeValue | ThemeColor | string;
|
|
94
95
|
type LikeC4View = DeploymentView | DynamicView | ElementView;
|
|
95
96
|
declare const LikeC4View = "LikeC4View";
|
|
96
97
|
type LineOptions = 'dashed' | 'dotted' | 'solid';
|
|
@@ -128,6 +129,7 @@ type StringProperty = ElementStringProperty | MetadataAttribute | NotationProper
|
|
|
128
129
|
declare const StringProperty = "StringProperty";
|
|
129
130
|
type StyleProperty = BorderProperty | ColorProperty | IconColorProperty | IconPositionProperty | IconProperty | IconSizeProperty | MultipleProperty | OpacityProperty | PaddingSizeProperty | ShapeProperty | ShapeSizeProperty | TextSizeProperty;
|
|
130
131
|
declare const StyleProperty = "StyleProperty";
|
|
132
|
+
type SubflowKind = 'break' | 'else' | 'if' | 'loop' | 'opt' | 'par' | 'parallel' | 'when';
|
|
131
133
|
type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
|
|
132
134
|
type TryStep = CatchBlock | FinallyBlock | TryBlock;
|
|
133
135
|
declare const TryStep = "TryStep";
|
|
@@ -1179,7 +1181,7 @@ declare const StepSeries = "StepSeries";
|
|
|
1179
1181
|
interface SubflowStep extends StepsBlock {
|
|
1180
1182
|
readonly $container: AltSteps | DynamicViewBody | StepsBlock;
|
|
1181
1183
|
readonly $type: 'SubflowStep';
|
|
1182
|
-
kind:
|
|
1184
|
+
kind: SubflowKind;
|
|
1183
1185
|
title?: string;
|
|
1184
1186
|
}
|
|
1185
1187
|
declare const SubflowStep = "SubflowStep";
|
|
@@ -2512,6 +2514,7 @@ declare const DocumentParserFromMixins: {
|
|
|
2512
2514
|
parseAbstractDynamicStep(astnode: AbstractStep): import("type-fest").Writable<import("type-fest").Except<ProjectId, "source", {
|
|
2513
2515
|
requireExactProps: true;
|
|
2514
2516
|
}>>;
|
|
2517
|
+
parseDynamicStepEndpoint(node: ElementRef, endpoint: "source" | "target"): ProjectId;
|
|
2515
2518
|
parseSubflowStep(node: SubflowStep): ProjectId | ProjectId | ProjectId | ProjectId;
|
|
2516
2519
|
parseTryStep(node: TryStep): ProjectId;
|
|
2517
2520
|
parseAltSteps(node: AltSteps): ProjectId;
|
|
@@ -2621,6 +2624,7 @@ declare const DocumentParserFromMixins: {
|
|
|
2621
2624
|
parseAbstractDynamicStep(astnode: AbstractStep): import("type-fest").Writable<import("type-fest").Except<ProjectId, "source", {
|
|
2622
2625
|
requireExactProps: true;
|
|
2623
2626
|
}>>;
|
|
2627
|
+
parseDynamicStepEndpoint(node: ElementRef, endpoint: "source" | "target"): ProjectId;
|
|
2624
2628
|
parseSubflowStep(node: SubflowStep): ProjectId | ProjectId | ProjectId | ProjectId;
|
|
2625
2629
|
parseTryStep(node: TryStep): ProjectId;
|
|
2626
2630
|
parseAltSteps(node: AltSteps): ProjectId;
|
package/dist/chunks/module.mjs
CHANGED
|
@@ -6450,11 +6450,9 @@ function ViewsParser(B) {
|
|
|
6450
6450
|
return [...allprevious, thisStep];
|
|
6451
6451
|
}
|
|
6452
6452
|
parseStep(node) {
|
|
6453
|
-
const sourceEl = elementRef(node.source);
|
|
6454
|
-
if (!sourceEl) throw new Error("Invalid reference to source");
|
|
6455
6453
|
let baseStep = {
|
|
6456
6454
|
...this.parseAbstractDynamicStep(node),
|
|
6457
|
-
source: this.
|
|
6455
|
+
source: this.parseDynamicStepEndpoint(node.source, "source")
|
|
6458
6456
|
};
|
|
6459
6457
|
if (node.isBackward) baseStep = {
|
|
6460
6458
|
...baseStep,
|
|
@@ -6465,11 +6463,9 @@ function ViewsParser(B) {
|
|
|
6465
6463
|
return baseStep;
|
|
6466
6464
|
}
|
|
6467
6465
|
parseAbstractDynamicStep(astnode) {
|
|
6468
|
-
const targetEl = elementRef(astnode.target);
|
|
6469
|
-
if (!targetEl) throw new Error("Invalid reference to target");
|
|
6470
6466
|
const astPath = pathInsideDynamicView(astnode);
|
|
6471
6467
|
const step = {
|
|
6472
|
-
target: this.
|
|
6468
|
+
target: this.parseDynamicStepEndpoint(astnode.target, "target"),
|
|
6473
6469
|
astPath
|
|
6474
6470
|
};
|
|
6475
6471
|
const title = removeIndent(astnode.title);
|
|
@@ -6512,6 +6508,11 @@ function ViewsParser(B) {
|
|
|
6512
6508
|
}
|
|
6513
6509
|
return step;
|
|
6514
6510
|
}
|
|
6511
|
+
parseDynamicStepEndpoint(node, endpoint) {
|
|
6512
|
+
const ref = this.parseFqnRef(node.modelElement);
|
|
6513
|
+
if (!c4.FqnRef.isModelRef(ref)) throw new Error(`Invalid reference to ${endpoint}`);
|
|
6514
|
+
return c4.FqnRef.flatten(ref);
|
|
6515
|
+
}
|
|
6515
6516
|
parseSubflowStep(node) {
|
|
6516
6517
|
const kind = node.kind === "parallel" ? "par" : node.kind;
|
|
6517
6518
|
switch (kind) {
|