likec4 1.19.0 → 1.19.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/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { F as Fqn, $ as ViewId, K as ElementKind$1, a2 as NonEmptyArray, Z as Tag$1, a3 as ElementShape$1, a4 as IconUrl, m as Color$1, a5 as BorderStyle, a6 as RelationshipKind$1, a7 as RelationshipLineType, a8 as RelationshipArrowType, a9 as CustomColor$1, O as HexColorLiteral, v as DeploymentNodeKind$1, aa as DeploymentNodeKindSpecification, X as RelationId, t as DeploymentElement$1, u as DeploymentNode$1, s as DeployedInstance$1, w as DeploymentRelation$1, ab as ModelGlobals, ac as ViewRule$1, ad as ViewManualLayout, ae as DynamicViewStepOrParallel, af as DynamicViewRule$1, ag as DeploymentViewRule$1, U as ParsedLikeC4Model, r as ComputedLikeC4Model, i as ComputedView, ah as ViewChange, T as OverviewGraph, z as DiagramView, L as LikeC4Model } from './shared/likec4.DCwaTTuF.mjs';
2
- export { k as AbstractRelation, A as AnyAux, l as AutoLayoutDirection, e as Aux, B as BBox, n as ComputedDeploymentView, o as ComputedDynamicView, p as ComputedEdge, q as ComputedElementView, C as ComputedNode, x as DeploymentView, y as DiagramEdge, j as DiagramNode, G as DynamicView, H as EdgeId, J as Element, M as ElementView, P as LayoutedLikeC4Model, g as LikeC4DeploymentModel, Q as LikeC4View, h as LikeC4ViewModel, S as NodeId, V as Point, W as RelationExpr, Y as StepEdgeId, _ as ThemeColor, a1 as XYPoint } from './shared/likec4.DCwaTTuF.mjs';
3
- import { Writable, ValueOf, ConditionalPick, Tagged } from 'type-fest';
1
+ import { i as ComputedView, T as OverviewGraph, z as DiagramView, F as Fqn, $ as ViewId, K as ElementKind$1, a2 as NonEmptyArray, Z as Tag$1, a3 as ElementShape$1, a4 as IconUrl, m as Color$1, a5 as BorderStyle, a6 as RelationshipKind$1, a7 as RelationshipLineType, a8 as RelationshipArrowType, a9 as CustomColor$1, O as HexColorLiteral, v as DeploymentNodeKind$1, aa as DeploymentNodeKindSpecification, X as RelationId, t as DeploymentElement$1, u as DeploymentNode$1, s as DeployedInstance$1, w as DeploymentRelation$1, ab as ModelGlobals, ac as ViewRule$1, ad as ViewManualLayout, ae as DynamicViewStepOrParallel, af as DynamicViewRule$1, ag as DeploymentViewRule$1, U as ParsedLikeC4Model, r as ComputedLikeC4Model, ah as ViewChange, L as LikeC4Model } from './shared/likec4.DJeGiAvE.mjs';
2
+ export { k as AbstractRelation, A as AnyAux, l as AutoLayoutDirection, e as Aux, B as BBox, n as ComputedDeploymentView, o as ComputedDynamicView, p as ComputedEdge, q as ComputedElementView, C as ComputedNode, x as DeploymentView, y as DiagramEdge, j as DiagramNode, G as DynamicView, H as EdgeId, J as Element, M as ElementView, P as LayoutedLikeC4Model, g as LikeC4DeploymentModel, Q as LikeC4View, h as LikeC4ViewModel, S as NodeId, V as Point, W as RelationExpr, Y as StepEdgeId, _ as ThemeColor, a1 as XYPoint } from './shared/likec4.DJeGiAvE.mjs';
3
+ import { Tagged, Writable, ValueOf, ConditionalPick } from 'type-fest';
4
4
 
5
5
  declare function invariant(condition: any, message?: string): asserts condition;
6
6
 
@@ -11835,6 +11835,64 @@ type LangiumDefaultSharedCoreServices = {
11835
11835
  */
11836
11836
  type LangiumSharedCoreServices = LangiumDefaultSharedCoreServices & LangiumGeneratedSharedCoreServices;
11837
11837
 
11838
+ /**
11839
+ * @hidden
11840
+ */
11841
+ type $keywords<T extends string> = {
11842
+ [key in T]: key;
11843
+ };
11844
+
11845
+ declare module 'ts-graphviz' {
11846
+ namespace ClusterSubgraphAttributeKey {
11847
+ interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
11848
+ }
11849
+ }
11850
+ namespace NodeAttributeKey {
11851
+ interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level'> {
11852
+ }
11853
+ }
11854
+ namespace EdgeAttributeKey {
11855
+ interface $values extends $keywords<'likec4_id'> {
11856
+ }
11857
+ }
11858
+ namespace Attribute {
11859
+ interface $keys extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
11860
+ }
11861
+ interface $types {
11862
+ likec4_type: 'folder' | 'file' | 'view';
11863
+ likec4_path: string;
11864
+ likec4_id: string;
11865
+ likec4_level: number;
11866
+ likec4_depth: number;
11867
+ }
11868
+ }
11869
+ }
11870
+ type DotSource = Tagged<string, 'DotSource'>;
11871
+
11872
+ interface GraphvizPort {
11873
+ unflatten(dot: DotSource): Promise<DotSource>;
11874
+ acyclic(dot: DotSource): Promise<DotSource>;
11875
+ layoutJson(dot: DotSource): Promise<string>;
11876
+ svg(dot: DotSource): Promise<string>;
11877
+ }
11878
+ type LayoutResult = {
11879
+ dot: DotSource;
11880
+ diagram: DiagramView;
11881
+ };
11882
+ declare class GraphvizLayouter {
11883
+ private graphviz;
11884
+ constructor(graphviz: GraphvizPort);
11885
+ get port(): GraphvizPort;
11886
+ changePort(graphviz: GraphvizPort): void;
11887
+ layout(view: ComputedView): Promise<LayoutResult>;
11888
+ svg(view: ComputedView): Promise<{
11889
+ svg: string;
11890
+ dot: DotSource;
11891
+ }>;
11892
+ dot(computedView: ComputedView): Promise<DotSource>;
11893
+ layoutOverviewGraph(views: ComputedView[]): Promise<OverviewGraph>;
11894
+ }
11895
+
11838
11896
  interface WorkDoneProgressReporter {
11839
11897
  begin(title: string, percentage?: number, message?: string, cancellable?: boolean): void;
11840
11898
  report(percentage: number): void;
@@ -13823,6 +13881,13 @@ declare class DefaultCompletionProvider implements CompletionProvider {
13823
13881
  protected buildCompletionTextEdit(context: CompletionContext, label: string, newText: string): TextEdit$1 | undefined;
13824
13882
  }
13825
13883
 
13884
+ declare class LikeC4DocumentationProvider implements DocumentationProvider {
13885
+ private parser;
13886
+ private locator;
13887
+ constructor(services: LikeC4Services);
13888
+ getDocumentation(node: AstNode): string | undefined;
13889
+ }
13890
+
13826
13891
  declare class LikeC4CodeLensProvider implements CodeLensProvider {
13827
13892
  private services;
13828
13893
  constructor(services: LikeC4Services);
@@ -13873,7 +13938,7 @@ declare const ElementPredicateOrWhere = "ElementPredicateOrWhere";
13873
13938
  type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
13874
13939
  declare const ElementProperty = "ElementProperty";
13875
13940
  type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
13876
- type ExpressionV2 = FqnExpr | RelationExpr;
13941
+ type ExpressionV2 = FqnExpr | RelationPredicateOrWhereV2;
13877
13942
  declare const ExpressionV2 = "ExpressionV2";
13878
13943
  type FqnExpr = FqnRefExpr | WildcardExpression;
13879
13944
  declare const FqnExpr = "FqnExpr";
@@ -13898,6 +13963,8 @@ type RelationPredicate = RelationPredicateOrWhere | RelationPredicateWith;
13898
13963
  declare const RelationPredicate = "RelationPredicate";
13899
13964
  type RelationPredicateOrWhere = RelationExpression | RelationPredicateWhere;
13900
13965
  declare const RelationPredicateOrWhere = "RelationPredicateOrWhere";
13966
+ type RelationPredicateOrWhereV2 = RelationExpr | RelationPredicateWhereV2;
13967
+ declare const RelationPredicateOrWhereV2 = "RelationPredicateOrWhereV2";
13901
13968
  type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
13902
13969
  declare const RelationProperty = "RelationProperty";
13903
13970
  type RelationshipStyleProperty = ArrowProperty | ColorProperty | LineProperty;
@@ -14066,7 +14133,7 @@ interface DeploymentViewRuleStyle extends AstNode {
14066
14133
  }
14067
14134
  declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
14068
14135
  interface DirectedRelationExpr extends AstNode {
14069
- readonly $container: DeploymentViewRulePredicateExpression;
14136
+ readonly $container: DeploymentViewRulePredicateExpression | RelationPredicateWhereV2;
14070
14137
  readonly $type: 'DirectedRelationExpr';
14071
14138
  source: OutgoingRelationExpr;
14072
14139
  target: FqnExpr;
@@ -14357,7 +14424,7 @@ interface IncludePredicate extends AstNode {
14357
14424
  }
14358
14425
  declare const IncludePredicate = "IncludePredicate";
14359
14426
  interface IncomingRelationExpr extends AstNode {
14360
- readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr;
14427
+ readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr | RelationPredicateWhereV2;
14361
14428
  readonly $type: 'IncomingRelationExpr';
14362
14429
  to: FqnExpr;
14363
14430
  }
@@ -14369,7 +14436,7 @@ interface IncomingRelationExpression extends AstNode {
14369
14436
  }
14370
14437
  declare const IncomingRelationExpression = "IncomingRelationExpression";
14371
14438
  interface InOutRelationExpr extends AstNode {
14372
- readonly $container: DeploymentViewRulePredicateExpression;
14439
+ readonly $container: DeploymentViewRulePredicateExpression | RelationPredicateWhereV2;
14373
14440
  readonly $type: 'InOutRelationExpr';
14374
14441
  inout: IncomingRelationExpr;
14375
14442
  }
@@ -14481,7 +14548,7 @@ interface OpacityProperty extends AstNode {
14481
14548
  }
14482
14549
  declare const OpacityProperty = "OpacityProperty";
14483
14550
  interface OutgoingRelationExpr extends AstNode {
14484
- readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr;
14551
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | RelationPredicateWhereV2;
14485
14552
  readonly $type: 'OutgoingRelationExpr';
14486
14553
  from: FqnExpr;
14487
14554
  isBidirectional: boolean;
@@ -14536,6 +14603,13 @@ interface RelationPredicateWhere extends AstNode {
14536
14603
  where?: WhereRelationExpression;
14537
14604
  }
14538
14605
  declare const RelationPredicateWhere = "RelationPredicateWhere";
14606
+ interface RelationPredicateWhereV2 extends AstNode {
14607
+ readonly $container: DeploymentViewRulePredicateExpression;
14608
+ readonly $type: 'RelationPredicateWhereV2';
14609
+ subject: RelationExpr;
14610
+ where?: WhereRelationExpression;
14611
+ }
14612
+ declare const RelationPredicateWhereV2 = "RelationPredicateWhereV2";
14539
14613
  interface RelationPredicateWith extends AstNode {
14540
14614
  readonly $container: Predicates;
14541
14615
  readonly $type: 'RelationPredicateWith';
@@ -14691,7 +14765,7 @@ interface ViewStringProperty extends AstNode {
14691
14765
  }
14692
14766
  declare const ViewStringProperty = "ViewStringProperty";
14693
14767
  interface WhereBinaryExpression extends AstNode {
14694
- readonly $container: ElementPredicateWhere | RelationPredicateWhere | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
14768
+ readonly $container: ElementPredicateWhere | RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereElementNegation | WhereRelationNegation;
14695
14769
  readonly $type: 'WhereBinaryExpression';
14696
14770
  left: WhereElementExpression | WhereRelationExpression;
14697
14771
  operator: 'and' | 'or';
@@ -14721,7 +14795,7 @@ interface WhereElementTag extends AstNode {
14721
14795
  }
14722
14796
  declare const WhereElementTag = "WhereElementTag";
14723
14797
  interface WhereRelationKind extends AstNode {
14724
- readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
14798
+ readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
14725
14799
  readonly $type: 'WhereRelationKind';
14726
14800
  not: boolean;
14727
14801
  operator: 'is' | string;
@@ -14729,13 +14803,13 @@ interface WhereRelationKind extends AstNode {
14729
14803
  }
14730
14804
  declare const WhereRelationKind = "WhereRelationKind";
14731
14805
  interface WhereRelationNegation extends AstNode {
14732
- readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
14806
+ readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
14733
14807
  readonly $type: 'WhereRelationNegation';
14734
14808
  value: WhereRelationExpression;
14735
14809
  }
14736
14810
  declare const WhereRelationNegation = "WhereRelationNegation";
14737
14811
  interface WhereRelationTag extends AstNode {
14738
- readonly $container: RelationPredicateWhere | WhereBinaryExpression | WhereRelationNegation;
14812
+ readonly $container: RelationPredicateWhere | RelationPredicateWhereV2 | WhereBinaryExpression | WhereRelationNegation;
14739
14813
  readonly $type: 'WhereRelationTag';
14740
14814
  not: boolean;
14741
14815
  operator: 'is' | string;
@@ -14850,7 +14924,9 @@ type LikeC4AstType = {
14850
14924
  RelationNavigateToProperty: RelationNavigateToProperty;
14851
14925
  RelationPredicate: RelationPredicate;
14852
14926
  RelationPredicateOrWhere: RelationPredicateOrWhere;
14927
+ RelationPredicateOrWhereV2: RelationPredicateOrWhereV2;
14853
14928
  RelationPredicateWhere: RelationPredicateWhere;
14929
+ RelationPredicateWhereV2: RelationPredicateWhereV2;
14854
14930
  RelationPredicateWith: RelationPredicateWith;
14855
14931
  RelationProperty: RelationProperty;
14856
14932
  RelationStringProperty: RelationStringProperty;
@@ -14900,7 +14976,7 @@ type LikeC4AstType = {
14900
14976
 
14901
14977
  type Guard<N extends AstNode> = (n: AstNode) => n is N;
14902
14978
  type Guarded<G> = G extends Guard<infer N> ? N : never;
14903
- declare const isValidatableAstNode: (n: AstNode) => n is DeployedInstance | DeploymentNode | DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout | DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleGlobalStyle | ViewRuleStyle | ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression | ElementPredicateWhere | ElementPredicateWith | ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataBody | FqnRefExpr | DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr | Element | ExtendElement | DeploymentView | DynamicView | ElementView | DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression | RelationPredicateWhere | RelationPredicateWith | RelationStringProperty | ArrowProperty | ColorProperty | LineProperty | MetadataAttribute | NotationProperty | NotesProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty | BorderProperty | OpacityProperty | ShapeProperty | ViewRuleGlobalPredicateRef | ViewRuleGroup | ExcludePredicate | IncludePredicate | SpecificationRelationshipKind | GlobalStyle | SpecificationColor | NavigateToProperty | DynamicViewStep | Tags | DeploymentRelation | SpecificationDeploymentNodeKind | DynamicViewParallelSteps | GlobalDynamicPredicateGroup | DynamicViewPredicateIterator | Relation | SpecificationElementKind | GlobalPredicateGroup | Globals | GlobalStyleGroup | SpecificationRule | SpecificationTag;
14979
+ declare const isValidatableAstNode: (n: AstNode) => n is DeployedInstance | DeploymentNode | DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout | DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleGlobalStyle | ViewRuleStyle | ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression | ElementPredicateWhere | ElementPredicateWith | ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataBody | FqnRefExpr | DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr | RelationPredicateWhereV2 | Element | ExtendElement | DeploymentView | DynamicView | ElementView | DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression | RelationPredicateWhere | RelationPredicateWith | RelationStringProperty | ArrowProperty | ColorProperty | LineProperty | MetadataAttribute | NotationProperty | NotesProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty | BorderProperty | OpacityProperty | ShapeProperty | ViewRuleGlobalPredicateRef | ViewRuleGroup | ExcludePredicate | IncludePredicate | SpecificationRelationshipKind | GlobalStyle | SpecificationColor | NavigateToProperty | DynamicViewStep | Tags | DeploymentRelation | SpecificationDeploymentNodeKind | DynamicViewParallelSteps | GlobalDynamicPredicateGroup | DynamicViewPredicateIterator | Relation | SpecificationElementKind | GlobalPredicateGroup | Globals | GlobalStyleGroup | SpecificationRule | SpecificationTag;
14904
14980
  type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
14905
14981
  declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
14906
14982
  isValid: (n: ValidatableAstNode) => boolean;
@@ -15065,38 +15141,6 @@ interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentPro
15065
15141
  interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
15066
15142
  }
15067
15143
 
15068
- declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
15069
- private services;
15070
- protected readonly nodeKindProvider: NodeKindProvider$1;
15071
- constructor(services: LikeC4Services);
15072
- getSymbols({ parseResult: { value: { specifications, models, views, likec4lib } } }: LikeC4LangiumDocument): MaybePromise<DocumentSymbol[]>;
15073
- protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
15074
- protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
15075
- protected getModelSymbol(astModel: Model): DocumentSymbol[];
15076
- protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
15077
- protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
15078
- protected getElementSymbol(astElement: Element): DocumentSymbol[];
15079
- protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
15080
- protected getKindSymbol(astKind: SpecificationElementKind | SpecificationRelationshipKind): DocumentSymbol | null;
15081
- protected getTagSymbol(astTag: SpecificationTag): DocumentSymbol | null;
15082
- protected getLibIconSymbol(astTag: LibIcon): DocumentSymbol | null;
15083
- protected getViewSymbol(astView: LikeC4View): DocumentSymbol[];
15084
- protected symbolKind(node: AstNode): SymbolKind;
15085
- }
15086
-
15087
- declare class LikeC4HoverProvider extends AstNodeHoverProvider {
15088
- private parser;
15089
- private locator;
15090
- constructor(services: LikeC4Services);
15091
- protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
15092
- }
15093
-
15094
- declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
15095
- protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
15096
- private highlightNameAndKind;
15097
- private highlightView;
15098
- }
15099
-
15100
15144
  declare class LikeC4NameProvider extends DefaultNameProvider {
15101
15145
  protected services: LikeC4Services;
15102
15146
  constructor(services: LikeC4Services);
@@ -15327,6 +15371,7 @@ declare const DocumentParserFromMixins: {
15327
15371
  parseFqnExpr(astNode: FqnExpr): invariant;
15328
15372
  parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15329
15373
  parseFqnExpressions(astNode: FqnExpressions): invariant[];
15374
+ parseRelationWhereExpr(astNode: RelationPredicateWhereV2): invariant;
15330
15375
  parseRelationExpr(astNode: RelationExpr): invariant;
15331
15376
  parseDeployment(): void;
15332
15377
  parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
@@ -15384,6 +15429,7 @@ declare const DocumentParserFromMixins: {
15384
15429
  parseFqnExpr(astNode: FqnExpr): invariant;
15385
15430
  parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15386
15431
  parseFqnExpressions(astNode: FqnExpressions): invariant[];
15432
+ parseRelationWhereExpr(astNode: RelationPredicateWhereV2): invariant;
15387
15433
  parseRelationExpr(astNode: RelationExpr): invariant;
15388
15434
  parseDeployment(): void;
15389
15435
  parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
@@ -15450,6 +15496,7 @@ declare const DocumentParserFromMixins: {
15450
15496
  parseFqnExpr(astNode: FqnExpr): invariant;
15451
15497
  parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15452
15498
  parseFqnExpressions(astNode: FqnExpressions): invariant[];
15499
+ parseRelationWhereExpr(astNode: RelationPredicateWhereV2): invariant;
15453
15500
  parseRelationExpr(astNode: RelationExpr): invariant;
15454
15501
  isValid: IsValidFn;
15455
15502
  readonly services: LikeC4Services;
@@ -15482,6 +15529,7 @@ declare const DocumentParserFromMixins: {
15482
15529
  parseFqnExpr(astNode: FqnExpr): invariant;
15483
15530
  parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15484
15531
  parseFqnExpressions(astNode: FqnExpressions): invariant[];
15532
+ parseRelationWhereExpr(astNode: RelationPredicateWhereV2): invariant;
15485
15533
  parseRelationExpr(astNode: RelationExpr): invariant;
15486
15534
  isValid: IsValidFn;
15487
15535
  readonly services: LikeC4Services;
@@ -15528,6 +15576,7 @@ declare const DocumentParserFromMixins: {
15528
15576
  parseFqnExpr(astNode: FqnExpr): invariant;
15529
15577
  parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15530
15578
  parseFqnExpressions(astNode: FqnExpressions): invariant[];
15579
+ parseRelationWhereExpr(astNode: RelationPredicateWhereV2): invariant;
15531
15580
  parseRelationExpr(astNode: RelationExpr): invariant;
15532
15581
  isValid: IsValidFn;
15533
15582
  readonly services: LikeC4Services;
@@ -15557,6 +15606,45 @@ declare class LikeC4ModelParser {
15557
15606
  forDocument(doc: LangiumDocument): DocumentParser;
15558
15607
  }
15559
15608
 
15609
+ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
15610
+ private services;
15611
+ protected readonly nodeKindProvider: NodeKindProvider$1;
15612
+ protected readonly nameProvider: LikeC4NameProvider;
15613
+ protected readonly parser: LikeC4ModelParser;
15614
+ protected readonly locator: LikeC4ModelLocator;
15615
+ constructor(services: LikeC4Services);
15616
+ getSymbols({ parseResult: { value: { specifications, models, deployments, views, likec4lib }, }, }: LikeC4LangiumDocument): MaybePromise<DocumentSymbol[]>;
15617
+ protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
15618
+ protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
15619
+ protected getModelSymbol(astModel: Model): DocumentSymbol[];
15620
+ protected getDeploymentModelSymbol(astModel: ModelDeployments): DocumentSymbol[];
15621
+ protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
15622
+ protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
15623
+ protected getElementSymbol(astElement: Element): DocumentSymbol[];
15624
+ protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
15625
+ protected getKindSymbol(astKind: SpecificationElementKind | SpecificationRelationshipKind): DocumentSymbol | null;
15626
+ protected getTagSymbol(astTag: SpecificationTag): DocumentSymbol | null;
15627
+ protected getLibIconSymbol(astTag: LibIcon): DocumentSymbol | null;
15628
+ protected getViewSymbol(astView: LikeC4View): DocumentSymbol[];
15629
+ protected getDeploymentElementSymbol(el: DeploymentElement | DeploymentRelation): DocumentSymbol[];
15630
+ protected getDeploymentNodeSymbol(astElement: DeploymentNode): DocumentSymbol[];
15631
+ protected getDeployedInstanceSymbol(astElement: DeployedInstance): DocumentSymbol[];
15632
+ protected symbolKind(node: AstNode): SymbolKind;
15633
+ }
15634
+
15635
+ declare class LikeC4HoverProvider extends AstNodeHoverProvider {
15636
+ private parser;
15637
+ private locator;
15638
+ constructor(services: LikeC4Services);
15639
+ protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
15640
+ }
15641
+
15642
+ declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
15643
+ protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
15644
+ private highlightNameAndKind;
15645
+ private highlightView;
15646
+ }
15647
+
15560
15648
  interface ChangeViewRequestParams {
15561
15649
  viewId: ViewId;
15562
15650
  change: ViewChange;
@@ -15612,6 +15700,29 @@ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
15612
15700
  declare class WorkspaceSymbolProvider extends DefaultWorkspaceSymbolProvider {
15613
15701
  }
15614
15702
 
15703
+ type GraphvizOut = {
15704
+ dot: string;
15705
+ diagram: DiagramView;
15706
+ };
15707
+ type GraphvizSvgOut = {
15708
+ id: ViewId;
15709
+ dot: string;
15710
+ svg: string;
15711
+ };
15712
+ declare class LikeC4Views {
15713
+ private services;
15714
+ private cache;
15715
+ private viewsWithReportedErrors;
15716
+ constructor(services: LikeC4Services);
15717
+ private get layouter();
15718
+ computedViews(cancelToken?: CancellationToken): Promise<ComputedView[]>;
15719
+ layoutAllViews(cancelToken?: CancellationToken): Promise<Array<Readonly<GraphvizOut>>>;
15720
+ layoutView(viewId: ViewId, cancelToken?: CancellationToken): Promise<GraphvizOut | null>;
15721
+ diagrams(): Promise<Array<DiagramView>>;
15722
+ viewsAsGraphvizOut(): Promise<Array<GraphvizSvgOut>>;
15723
+ overviewGraph(): Promise<OverviewGraph>;
15724
+ }
15725
+
15615
15726
  interface LikeC4AddedSharedServices {
15616
15727
  lsp: {
15617
15728
  NodeKindProvider: NodeKindProvider;
@@ -15626,10 +15737,15 @@ type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
15626
15737
  * Declaration of custom services - add your own service classes here.
15627
15738
  */
15628
15739
  interface LikeC4AddedServices {
15740
+ documentation: {
15741
+ DocumentationProvider: LikeC4DocumentationProvider;
15742
+ };
15629
15743
  WorkspaceCache: WorkspaceCache<string, any>;
15630
15744
  DocumentCache: DocumentCache<string, any>;
15631
15745
  Rpc: Rpc;
15632
15746
  likec4: {
15747
+ Views: LikeC4Views;
15748
+ Layouter: GraphvizLayouter;
15633
15749
  DeploymentsIndex: DeploymentsIndex;
15634
15750
  FqnIndex: FqnIndex;
15635
15751
  ModelParser: LikeC4ModelParser;
@@ -15655,64 +15771,6 @@ interface LikeC4AddedServices {
15655
15771
  }
15656
15772
  type LikeC4Services = LangiumServices & LikeC4AddedServices;
15657
15773
 
15658
- /**
15659
- * @hidden
15660
- */
15661
- type $keywords<T extends string> = {
15662
- [key in T]: key;
15663
- };
15664
-
15665
- declare module 'ts-graphviz' {
15666
- namespace ClusterSubgraphAttributeKey {
15667
- interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
15668
- }
15669
- }
15670
- namespace NodeAttributeKey {
15671
- interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level'> {
15672
- }
15673
- }
15674
- namespace EdgeAttributeKey {
15675
- interface $values extends $keywords<'likec4_id'> {
15676
- }
15677
- }
15678
- namespace Attribute {
15679
- interface $keys extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
15680
- }
15681
- interface $types {
15682
- likec4_type: 'folder' | 'file' | 'view';
15683
- likec4_path: string;
15684
- likec4_id: string;
15685
- likec4_level: number;
15686
- likec4_depth: number;
15687
- }
15688
- }
15689
- }
15690
- type DotSource = Tagged<string, 'DotSource'>;
15691
-
15692
- interface GraphvizPort {
15693
- unflatten(dot: DotSource): Promise<DotSource>;
15694
- acyclic(dot: DotSource): Promise<DotSource>;
15695
- layoutJson(dot: DotSource): Promise<string>;
15696
- svg(dot: DotSource): Promise<string>;
15697
- }
15698
- type LayoutResult = {
15699
- dot: DotSource;
15700
- diagram: DiagramView;
15701
- };
15702
- declare class GraphvizLayouter {
15703
- private graphviz;
15704
- constructor(graphviz: GraphvizPort);
15705
- get port(): GraphvizPort;
15706
- changePort(graphviz: GraphvizPort): void;
15707
- layout(view: ComputedView): Promise<LayoutResult>;
15708
- svg(view: ComputedView): Promise<{
15709
- svg: string;
15710
- dot: DotSource;
15711
- }>;
15712
- dot(computedView: ComputedView): Promise<DotSource>;
15713
- layoutOverviewGraph(views: ComputedView[]): Promise<OverviewGraph>;
15714
- }
15715
-
15716
15774
  // This definition file follows a somewhat unusual format. ESTree allows
15717
15775
  // runtime type checks based on the `type` parameter. In order to explain this
15718
15776
  // to typescript we want to use discriminated union types:
@@ -16327,50 +16385,6 @@ type Logger = {
16327
16385
  error(err: unknown): void;
16328
16386
  };
16329
16387
 
16330
- declare class CliWorkspace {
16331
- private services;
16332
- private isInitialized;
16333
- constructor(services: CliServices);
16334
- initWorkspace(workspace: WorkspaceFolder): Promise<void>;
16335
- init(): Promise<void>;
16336
- }
16337
-
16338
- type CliAddedServices = {
16339
- logger: Logger;
16340
- likec4: {
16341
- Layouter: GraphvizLayouter;
16342
- Views: Views;
16343
- };
16344
- cli: {
16345
- Workspace: CliWorkspace;
16346
- };
16347
- };
16348
- type CliServices = LikeC4Services & CliAddedServices;
16349
-
16350
- type GraphvizOut = {
16351
- dot: string;
16352
- diagram: DiagramView;
16353
- };
16354
- type GraphvizSvgOut = {
16355
- id: ViewId;
16356
- dot: string;
16357
- svg: string;
16358
- };
16359
- declare class Views {
16360
- private services;
16361
- private cache;
16362
- private layouter;
16363
- private previousAction;
16364
- private limit;
16365
- constructor(services: CliServices);
16366
- private inflightRequest;
16367
- computedViews(): Promise<ComputedView[]>;
16368
- layoutViews(): Promise<Array<Readonly<GraphvizOut>>>;
16369
- diagrams(): Promise<Array<DiagramView>>;
16370
- viewsAsGraphvizOut(): Promise<Array<GraphvizSvgOut>>;
16371
- overviewGraph(): Promise<OverviewGraph>;
16372
- }
16373
-
16374
16388
  type LikeC4Options = {
16375
16389
  /**
16376
16390
  * By default, if LikeC4 model is invalid, errors are printed to the console.
@@ -16415,7 +16429,7 @@ declare class LikeC4 {
16415
16429
  private modelLayoutedRef;
16416
16430
  private logger;
16417
16431
  private constructor();
16418
- get viewsService(): Views;
16432
+ get viewsService(): LikeC4Views;
16419
16433
  private get LangiumDocuments();
16420
16434
  /**
16421
16435
  * Diagram is a computed view, layouted using Graphviz