@likec4/language-server 1.17.0 → 1.17.1

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.
@@ -39,7 +39,7 @@ declare class LikeC4DocumentLinkProvider implements DocumentLinkProvider {
39
39
  }
40
40
 
41
41
  /******************************************************************************
42
- * This file was generated by langium-cli 3.2.0.
42
+ * This file was generated by langium-cli 3.3.0.
43
43
  * DO NOT EDIT MANUALLY!
44
44
  ******************************************************************************/
45
45
 
@@ -49,23 +49,19 @@ type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOption
49
49
  type CustomColorValue = string;
50
50
  type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
51
51
  declare const DynamicViewRule = "DynamicViewRule";
52
- declare function isDynamicViewRule(item: unknown): item is DynamicViewRule;
53
52
  type ElementExpression = ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression;
54
53
  declare const ElementExpression = "ElementExpression";
55
- declare function isElementExpression(item: unknown): item is ElementExpression;
56
54
  type ElementPredicate = ElementPredicateOrWhere | ElementPredicateWith;
57
55
  declare const ElementPredicate = "ElementPredicate";
58
56
  type ElementPredicateOrWhere = ElementExpression | ElementPredicateWhere;
59
57
  declare const ElementPredicateOrWhere = "ElementPredicateOrWhere";
60
58
  type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
61
59
  declare const ElementProperty = "ElementProperty";
62
- declare function isElementProperty(item: unknown): item is ElementProperty;
63
60
  type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
64
61
  type IconId = string;
65
62
  type Id = 'element' | 'group' | 'model' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
66
63
  type LikeC4View = DynamicView | ElementView;
67
64
  declare const LikeC4View = "LikeC4View";
68
- declare function isLikeC4View(item: unknown): item is LikeC4View;
69
65
  type LineOptions = 'dashed' | 'dotted' | 'solid';
70
66
  type MetadataProperty = MetadataBody;
71
67
  declare const MetadataProperty = "MetadataProperty";
@@ -73,30 +69,25 @@ type Predicate = ElementPredicate | RelationPredicate;
73
69
  declare const Predicate = "Predicate";
74
70
  type RelationExpression = DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression;
75
71
  declare const RelationExpression = "RelationExpression";
76
- declare function isRelationExpression(item: unknown): item is RelationExpression;
77
72
  type RelationPredicate = RelationPredicateOrWhere | RelationPredicateWith;
78
73
  declare const RelationPredicate = "RelationPredicate";
79
74
  type RelationPredicateOrWhere = RelationExpression | RelationPredicateWhere;
80
75
  declare const RelationPredicateOrWhere = "RelationPredicateOrWhere";
81
76
  type RelationProperty = LinkProperty | MetadataProperty | RelationNavigateToProperty | RelationStringProperty | RelationStyleProperty;
82
77
  declare const RelationProperty = "RelationProperty";
83
- declare function isRelationProperty(item: unknown): item is RelationProperty;
84
78
  type RelationshipStyleProperty = ArrowProperty | ColorProperty | LineProperty;
85
79
  declare const RelationshipStyleProperty = "RelationshipStyleProperty";
86
80
  type StringProperty = ElementStringProperty | MetadataAttribute | NotationProperty | NotesProperty | RelationStringProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty;
87
81
  declare const StringProperty = "StringProperty";
88
82
  type StyleProperty = BorderProperty | ColorProperty | IconProperty | OpacityProperty | ShapeProperty;
89
83
  declare const StyleProperty = "StyleProperty";
90
- declare function isStyleProperty(item: unknown): item is StyleProperty;
91
84
  type ThemeColor = 'amber' | 'blue' | 'gray' | 'green' | 'indigo' | 'muted' | 'primary' | 'red' | 'secondary' | 'sky' | 'slate';
92
85
  type Uri = string;
93
86
  type ViewLayoutDirection = 'BottomTop' | 'LeftRight' | 'RightLeft' | 'TopBottom';
94
87
  type ViewProperty = LinkProperty | ViewStringProperty;
95
88
  declare const ViewProperty = "ViewProperty";
96
- declare function isViewProperty(item: unknown): item is ViewProperty;
97
89
  type ViewRule = ViewRuleAutoLayout | ViewRuleGlobalPredicateRef | ViewRuleGroup | ViewRulePredicate | ViewRuleStyleOrGlobalRef;
98
90
  declare const ViewRule = "ViewRule";
99
- declare function isViewRule(item: unknown): item is ViewRule;
100
91
  type ViewRulePredicate = ExcludePredicate | IncludePredicate;
101
92
  declare const ViewRulePredicate = "ViewRulePredicate";
102
93
  type ViewRuleStyleOrGlobalRef = ViewRuleGlobalStyle | ViewRuleStyle;
@@ -178,7 +169,6 @@ interface DynamicViewBody extends AstNode {
178
169
  tags?: Tags;
179
170
  }
180
171
  declare const DynamicViewBody = "DynamicViewBody";
181
- declare function isDynamicViewBody(item: unknown): item is DynamicViewBody;
182
172
  interface DynamicViewGlobalPredicateRef extends AstNode {
183
173
  readonly $container: DynamicViewBody;
184
174
  readonly $type: 'DynamicViewGlobalPredicateRef';
@@ -197,7 +187,6 @@ interface DynamicViewParallelSteps extends AstNode {
197
187
  steps: Array<DynamicViewStep>;
198
188
  }
199
189
  declare const DynamicViewParallelSteps = "DynamicViewParallelSteps";
200
- declare function isDynamicViewParallelSteps(item: unknown): item is DynamicViewParallelSteps;
201
190
  interface DynamicViewPredicateIterator extends AstNode {
202
191
  readonly $container: DynamicViewIncludePredicate | DynamicViewPredicateIterator;
203
192
  readonly $type: 'DynamicViewPredicateIterator';
@@ -205,7 +194,6 @@ interface DynamicViewPredicateIterator extends AstNode {
205
194
  value: ElementPredicate;
206
195
  }
207
196
  declare const DynamicViewPredicateIterator = "DynamicViewPredicateIterator";
208
- declare function isDynamicViewPredicateIterator(item: unknown): item is DynamicViewPredicateIterator;
209
197
  interface DynamicViewRef extends AstNode {
210
198
  readonly $container: RelationNavigateToProperty;
211
199
  readonly $type: 'DynamicViewRef';
@@ -223,7 +211,6 @@ interface DynamicViewStep extends AstNode {
223
211
  title?: string;
224
212
  }
225
213
  declare const DynamicViewStep = "DynamicViewStep";
226
- declare function isDynamicViewStep(item: unknown): item is DynamicViewStep;
227
214
  interface Element extends AstNode {
228
215
  readonly $container: ElementBody | ExtendElementBody | Model;
229
216
  readonly $type: 'Element';
@@ -233,7 +220,6 @@ interface Element extends AstNode {
233
220
  props: Array<string>;
234
221
  }
235
222
  declare const Element = "Element";
236
- declare function isElement(item: unknown): item is Element;
237
223
  interface ElementBody extends AstNode {
238
224
  readonly $container: Element;
239
225
  readonly $type: 'ElementBody';
@@ -242,7 +228,6 @@ interface ElementBody extends AstNode {
242
228
  tags?: Tags;
243
229
  }
244
230
  declare const ElementBody = "ElementBody";
245
- declare function isElementBody(item: unknown): item is ElementBody;
246
231
  interface ElementDescedantsExpression extends AstNode {
247
232
  readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
248
233
  readonly $type: 'ElementDescedantsExpression';
@@ -283,7 +268,6 @@ interface ElementPredicateWith extends AstNode {
283
268
  subject: ElementPredicateOrWhere;
284
269
  }
285
270
  declare const ElementPredicateWith = "ElementPredicateWith";
286
- declare function isElementPredicateWith(item: unknown): item is ElementPredicateWith;
287
271
  interface ElementRef extends AstNode {
288
272
  readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | DynamicViewStep | ElementDescedantsExpression | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | ElementRef | ElementView | ExpandElementExpression | IncomingRelationExpression | OutgoingRelationExpression | Predicates | Relation;
289
273
  readonly $type: 'ElementRef';
@@ -329,7 +313,6 @@ interface ElementViewBody extends AstNode {
329
313
  tags?: Tags;
330
314
  }
331
315
  declare const ElementViewBody = "ElementViewBody";
332
- declare function isElementViewBody(item: unknown): item is ElementViewBody;
333
316
  interface ElementViewRef extends AstNode {
334
317
  readonly $container: ElementView;
335
318
  readonly $type: 'ElementViewRef';
@@ -355,14 +338,12 @@ interface ExtendElement extends AstNode {
355
338
  element: FqnElementRef;
356
339
  }
357
340
  declare const ExtendElement = "ExtendElement";
358
- declare function isExtendElement(item: unknown): item is ExtendElement;
359
341
  interface ExtendElementBody extends AstNode {
360
342
  readonly $container: ExtendElement;
361
343
  readonly $type: 'ExtendElementBody';
362
344
  elements: Array<Element | Relation>;
363
345
  }
364
346
  declare const ExtendElementBody = "ExtendElementBody";
365
- declare function isExtendElementBody(item: unknown): item is ExtendElementBody;
366
347
  interface FqnElementRef extends AstNode {
367
348
  readonly $container: ExtendElement | FqnElementRef;
368
349
  readonly $type: 'FqnElementRef';
@@ -377,7 +358,6 @@ interface GlobalDynamicPredicateGroup extends AstNode {
377
358
  predicates: Array<DynamicViewIncludePredicate>;
378
359
  }
379
360
  declare const GlobalDynamicPredicateGroup = "GlobalDynamicPredicateGroup";
380
- declare function isGlobalDynamicPredicateGroup(item: unknown): item is GlobalDynamicPredicateGroup;
381
361
  interface GlobalPredicateGroup extends AstNode {
382
362
  readonly $container: Globals;
383
363
  readonly $type: 'GlobalPredicateGroup';
@@ -385,7 +365,6 @@ interface GlobalPredicateGroup extends AstNode {
385
365
  predicates: Array<ViewRulePredicate>;
386
366
  }
387
367
  declare const GlobalPredicateGroup = "GlobalPredicateGroup";
388
- declare function isGlobalPredicateGroup(item: unknown): item is GlobalPredicateGroup;
389
368
  interface Globals extends AstNode {
390
369
  readonly $container: LikeC4Grammar;
391
370
  readonly $type: 'Globals';
@@ -394,7 +373,6 @@ interface Globals extends AstNode {
394
373
  styles: Array<GlobalStyle | GlobalStyleGroup>;
395
374
  }
396
375
  declare const Globals = "Globals";
397
- declare function isGlobals(item: unknown): item is Globals;
398
376
  interface GlobalStyle extends AstNode {
399
377
  readonly $container: Globals;
400
378
  readonly $type: 'GlobalStyle';
@@ -403,7 +381,6 @@ interface GlobalStyle extends AstNode {
403
381
  target: ElementExpressionsIterator;
404
382
  }
405
383
  declare const GlobalStyle = "GlobalStyle";
406
- declare function isGlobalStyle(item: unknown): item is GlobalStyle;
407
384
  interface GlobalStyleGroup extends AstNode {
408
385
  readonly $container: Globals;
409
386
  readonly $type: 'GlobalStyleGroup';
@@ -411,7 +388,6 @@ interface GlobalStyleGroup extends AstNode {
411
388
  styles: Array<ViewRuleStyle>;
412
389
  }
413
390
  declare const GlobalStyleGroup = "GlobalStyleGroup";
414
- declare function isGlobalStyleGroup(item: unknown): item is GlobalStyleGroup;
415
391
  interface GlobalStyleId extends AstNode {
416
392
  readonly $container: GlobalStyle | GlobalStyleGroup;
417
393
  readonly $type: 'GlobalStyleId';
@@ -500,7 +476,6 @@ interface Model extends AstNode {
500
476
  name: 'model';
501
477
  }
502
478
  declare const Model = "Model";
503
- declare function isModel(item: unknown): item is Model;
504
479
  interface ModelViews extends AstNode {
505
480
  readonly $container: LikeC4Grammar;
506
481
  readonly $type: 'ModelViews';
@@ -509,7 +484,6 @@ interface ModelViews extends AstNode {
509
484
  views: Array<LikeC4View>;
510
485
  }
511
486
  declare const ModelViews = "ModelViews";
512
- declare function isModelViews(item: unknown): item is ModelViews;
513
487
  interface NavigateToProperty extends AstNode {
514
488
  readonly $container: CustomElementProperties;
515
489
  readonly $type: 'NavigateToProperty';
@@ -565,7 +539,6 @@ interface Relation extends AstNode {
565
539
  title?: string;
566
540
  }
567
541
  declare const Relation = "Relation";
568
- declare function isRelation(item: unknown): item is Relation;
569
542
  interface RelationBody extends AstNode {
570
543
  readonly $container: Relation;
571
544
  readonly $type: 'RelationBody';
@@ -573,7 +546,6 @@ interface RelationBody extends AstNode {
573
546
  tags?: Tags;
574
547
  }
575
548
  declare const RelationBody = "RelationBody";
576
- declare function isRelationBody(item: unknown): item is RelationBody;
577
549
  interface RelationNavigateToProperty extends AstNode {
578
550
  readonly $container: CustomRelationProperties | RelationBody;
579
551
  readonly $type: 'RelationNavigateToProperty';
@@ -595,7 +567,6 @@ interface RelationPredicateWith extends AstNode {
595
567
  subject: RelationPredicateOrWhere;
596
568
  }
597
569
  declare const RelationPredicateWith = "RelationPredicateWith";
598
- declare function isRelationPredicateWith(item: unknown): item is RelationPredicateWith;
599
570
  interface RelationshipKind extends AstNode {
600
571
  readonly $container: SpecificationRelationshipKind;
601
572
  readonly $type: 'RelationshipKind';
@@ -630,7 +601,6 @@ interface SpecificationColor extends AstNode {
630
601
  name: CustomColor;
631
602
  }
632
603
  declare const SpecificationColor = "SpecificationColor";
633
- declare function isSpecificationColor(item: unknown): item is SpecificationColor;
634
604
  interface SpecificationElementKind extends AstNode {
635
605
  readonly $container: SpecificationRule;
636
606
  readonly $type: 'SpecificationElementKind';
@@ -638,7 +608,6 @@ interface SpecificationElementKind extends AstNode {
638
608
  props: Array<ElementStyleProperty | SpecificationElementStringProperty>;
639
609
  }
640
610
  declare const SpecificationElementKind = "SpecificationElementKind";
641
- declare function isSpecificationElementKind(item: unknown): item is SpecificationElementKind;
642
611
  interface SpecificationElementStringProperty extends AstNode {
643
612
  readonly $container: SpecificationElementKind;
644
613
  readonly $type: 'SpecificationElementStringProperty';
@@ -653,7 +622,6 @@ interface SpecificationRelationshipKind extends AstNode {
653
622
  props: Array<RelationshipStyleProperty | SpecificationRelationshipStringProperty>;
654
623
  }
655
624
  declare const SpecificationRelationshipKind = "SpecificationRelationshipKind";
656
- declare function isSpecificationRelationshipKind(item: unknown): item is SpecificationRelationshipKind;
657
625
  interface SpecificationRelationshipStringProperty extends AstNode {
658
626
  readonly $container: SpecificationRelationshipKind;
659
627
  readonly $type: 'SpecificationRelationshipStringProperty';
@@ -671,14 +639,12 @@ interface SpecificationRule extends AstNode {
671
639
  tags: Array<SpecificationTag>;
672
640
  }
673
641
  declare const SpecificationRule = "SpecificationRule";
674
- declare function isSpecificationRule(item: unknown): item is SpecificationRule;
675
642
  interface SpecificationTag extends AstNode {
676
643
  readonly $container: SpecificationRule;
677
644
  readonly $type: 'SpecificationTag';
678
645
  tag: Tag;
679
646
  }
680
647
  declare const SpecificationTag = "SpecificationTag";
681
- declare function isSpecificationTag(item: unknown): item is SpecificationTag;
682
648
  interface Tag extends AstNode {
683
649
  readonly $container: SpecificationTag;
684
650
  readonly $type: 'Tag';
@@ -692,7 +658,6 @@ interface Tags extends AstNode {
692
658
  values: Array<Reference<Tag>>;
693
659
  }
694
660
  declare const Tags = "Tags";
695
- declare function isTags(item: unknown): item is Tags;
696
661
  interface ViewRef extends AstNode {
697
662
  readonly $container: NavigateToProperty;
698
663
  readonly $type: 'ViewRef';
@@ -1046,7 +1011,7 @@ interface ParsedLikeC4LangiumDocument extends Omit<LangiumDocument<LikeC4Grammar
1046
1011
  }
1047
1012
  type Guard<N extends AstNode> = (n: AstNode) => n is N;
1048
1013
  type Guarded<G> = G extends Guard<infer N> ? N : never;
1049
- declare const isValidatableAstNode: (n: AstNode) => n is Guarded<typeof isRelation | typeof isExtendElement | typeof isElement | typeof isLikeC4View | typeof isGlobals | typeof isGlobalPredicateGroup | typeof isGlobalDynamicPredicateGroup | typeof isGlobalStyle | typeof isGlobalStyleGroup | typeof isDynamicViewPredicateIterator | typeof isElementPredicateWith | typeof isRelationPredicateWith | typeof isElementExpression | typeof isRelationExpression | typeof isDynamicViewParallelSteps | typeof isDynamicViewStep | typeof isViewProperty | typeof isStyleProperty | typeof isTags | typeof isViewRule | typeof isDynamicViewRule | typeof isElementViewBody | typeof isDynamicViewBody | typeof isRelationProperty | typeof isRelationBody | typeof isElementProperty | typeof isElementBody | typeof isExtendElementBody | typeof isSpecificationElementKind | typeof isSpecificationRelationshipKind | typeof isSpecificationTag | typeof isSpecificationColor | typeof isSpecificationRule | typeof isModelViews | typeof isModel>;
1014
+ declare const isValidatableAstNode: (n: AstNode) => n is RelationStyleProperty | SpecificationRelationshipKind | DynamicViewStep | RelationPredicateWith | DynamicViewBody | DynamicViewParallelSteps | DynamicView | ModelViews | ExcludePredicate | IncludePredicate | ElementViewBody | GlobalPredicateGroup | ViewRuleGroup | ElementView | Globals | RelationBody | Relation | ElementBody | ExtendElementBody | Model | Element | ExtendElement | SpecificationRule | BorderProperty | ElementStyleProperty | GlobalStyle | ViewRuleStyle | ElementPredicateWith | DynamicViewPredicateIterator | DynamicViewIncludePredicate | GlobalDynamicPredicateGroup | SpecificationElementKind | GlobalStyleGroup | ColorProperty | SpecificationColor | DirectedRelationExpression | DynamicViewGlobalPredicateRef | RelationNavigateToProperty | ViewRuleAutoLayout | ViewRuleGlobalStyle | ElementDescedantsExpression | IncomingRelationExpression | OutgoingRelationExpression | InOutRelationExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression | ElementStringProperty | IconProperty | LinkProperty | MetadataBody | OpacityProperty | RelationStringProperty | ShapeProperty | SpecificationTag | ViewStringProperty | Tags | ViewRuleGlobalPredicateRef;
1050
1015
  type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
1051
1016
  declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
1052
1017
  isValid: (n: ValidatableAstNode) => boolean;
@@ -1520,7 +1520,12 @@ class DynamicViewComputeCtx {
1520
1520
  title,
1521
1521
  relations,
1522
1522
  tags,
1523
- navigateTo: derivedNavigateTo
1523
+ navigateTo: derivedNavigateTo,
1524
+ head,
1525
+ tail,
1526
+ color,
1527
+ line,
1528
+ notation
1524
1529
  } = this.findRelations(source, target);
1525
1530
  const navigateTo = remeda.isTruthy(stepNavigateTo) && stepNavigateTo !== this.view.id ? stepNavigateTo : derivedNavigateTo;
1526
1531
  this.steps.push({
@@ -1532,7 +1537,12 @@ class DynamicViewComputeCtx {
1532
1537
  relations: relations ?? [],
1533
1538
  isBackward: isBackward ?? false,
1534
1539
  ...navigateTo ? { navigateTo } : {},
1535
- ...tags ? { tags } : {}
1540
+ ...tags ? { tags } : {},
1541
+ ...head ? { head } : {},
1542
+ ...tail ? { tail } : {},
1543
+ ...color ? { color } : {},
1544
+ ...line ? { line } : {},
1545
+ ...notation ? { notation } : {}
1536
1546
  });
1537
1547
  }
1538
1548
  compute() {
@@ -1646,7 +1656,12 @@ class DynamicViewComputeCtx {
1646
1656
  title: null,
1647
1657
  tags: null,
1648
1658
  relations: null,
1649
- navigateTo: null
1659
+ navigateTo: null,
1660
+ tail: null,
1661
+ head: null,
1662
+ color: null,
1663
+ line: null,
1664
+ notation: null
1650
1665
  };
1651
1666
  }
1652
1667
  const alltags = remeda.pipe(
@@ -1658,13 +1673,6 @@ class DynamicViewComputeCtx {
1658
1673
  const tags = remeda.hasAtLeast(alltags, 1) ? alltags : null;
1659
1674
  const relations = remeda.hasAtLeast(relationships, 1) ? remeda.map(relationships, (r) => r.id) : null;
1660
1675
  const relation = remeda.only(relationships) || relationships.find((r) => r.source === source.id && r.target === target.id);
1661
- const title = remeda.isTruthy(relation?.title) ? relation.title : remeda.pipe(
1662
- relationships,
1663
- remeda.map((r) => r.title),
1664
- remeda.filter(remeda.isTruthy),
1665
- remeda.unique(),
1666
- remeda.only()
1667
- );
1668
1676
  const navigateTo = !!relation?.navigateTo && relation.navigateTo !== this.view.id ? relation.navigateTo : remeda.pipe(
1669
1677
  relationships,
1670
1678
  remeda.map((r) => r.navigateTo),
@@ -1673,11 +1681,31 @@ class DynamicViewComputeCtx {
1673
1681
  remeda.unique(),
1674
1682
  remeda.only()
1675
1683
  );
1684
+ const commonProperties = relationships.reduce((acc, r) => {
1685
+ remeda.isTruthy(r.title) && acc.title.push(r.title);
1686
+ remeda.isTruthy(r.tail) && acc.tail.push(r.tail);
1687
+ remeda.isTruthy(r.head) && acc.head.push(r.head);
1688
+ remeda.isTruthy(r.color) && acc.color.push(r.color);
1689
+ remeda.isTruthy(r.line) && acc.line.push(r.line);
1690
+ return acc;
1691
+ }, {
1692
+ title: [],
1693
+ tail: [],
1694
+ head: [],
1695
+ color: [],
1696
+ line: [],
1697
+ notation: []
1698
+ });
1676
1699
  return {
1677
- title: title ?? null,
1678
1700
  tags,
1679
1701
  relations,
1680
- navigateTo: navigateTo ?? null
1702
+ navigateTo: navigateTo ?? null,
1703
+ title: remeda.pipe(commonProperties.title, remeda.unique(), remeda.only()) ?? null,
1704
+ tail: remeda.pipe(commonProperties.tail, remeda.unique(), remeda.only()) ?? null,
1705
+ head: remeda.pipe(commonProperties.head, remeda.unique(), remeda.only()) ?? null,
1706
+ color: remeda.pipe(commonProperties.color, remeda.unique(), remeda.only()) ?? null,
1707
+ line: remeda.pipe(commonProperties.line, remeda.unique(), remeda.only()) ?? null,
1708
+ notation: remeda.pipe(commonProperties.notation, remeda.unique(), remeda.only()) ?? null
1681
1709
  };
1682
1710
  }
1683
1711
  }
@@ -1513,7 +1513,12 @@ class DynamicViewComputeCtx {
1513
1513
  title,
1514
1514
  relations,
1515
1515
  tags,
1516
- navigateTo: derivedNavigateTo
1516
+ navigateTo: derivedNavigateTo,
1517
+ head,
1518
+ tail,
1519
+ color,
1520
+ line,
1521
+ notation
1517
1522
  } = this.findRelations(source, target);
1518
1523
  const navigateTo = isTruthy(stepNavigateTo) && stepNavigateTo !== this.view.id ? stepNavigateTo : derivedNavigateTo;
1519
1524
  this.steps.push({
@@ -1525,7 +1530,12 @@ class DynamicViewComputeCtx {
1525
1530
  relations: relations ?? [],
1526
1531
  isBackward: isBackward ?? false,
1527
1532
  ...navigateTo ? { navigateTo } : {},
1528
- ...tags ? { tags } : {}
1533
+ ...tags ? { tags } : {},
1534
+ ...head ? { head } : {},
1535
+ ...tail ? { tail } : {},
1536
+ ...color ? { color } : {},
1537
+ ...line ? { line } : {},
1538
+ ...notation ? { notation } : {}
1529
1539
  });
1530
1540
  }
1531
1541
  compute() {
@@ -1639,7 +1649,12 @@ class DynamicViewComputeCtx {
1639
1649
  title: null,
1640
1650
  tags: null,
1641
1651
  relations: null,
1642
- navigateTo: null
1652
+ navigateTo: null,
1653
+ tail: null,
1654
+ head: null,
1655
+ color: null,
1656
+ line: null,
1657
+ notation: null
1643
1658
  };
1644
1659
  }
1645
1660
  const alltags = pipe(
@@ -1651,13 +1666,6 @@ class DynamicViewComputeCtx {
1651
1666
  const tags = hasAtLeast$1(alltags, 1) ? alltags : null;
1652
1667
  const relations = hasAtLeast$1(relationships, 1) ? map(relationships, (r) => r.id) : null;
1653
1668
  const relation = only(relationships) || relationships.find((r) => r.source === source.id && r.target === target.id);
1654
- const title = isTruthy(relation?.title) ? relation.title : pipe(
1655
- relationships,
1656
- map((r) => r.title),
1657
- filter(isTruthy),
1658
- unique(),
1659
- only()
1660
- );
1661
1669
  const navigateTo = !!relation?.navigateTo && relation.navigateTo !== this.view.id ? relation.navigateTo : pipe(
1662
1670
  relationships,
1663
1671
  map((r) => r.navigateTo),
@@ -1666,11 +1674,31 @@ class DynamicViewComputeCtx {
1666
1674
  unique(),
1667
1675
  only()
1668
1676
  );
1677
+ const commonProperties = relationships.reduce((acc, r) => {
1678
+ isTruthy(r.title) && acc.title.push(r.title);
1679
+ isTruthy(r.tail) && acc.tail.push(r.tail);
1680
+ isTruthy(r.head) && acc.head.push(r.head);
1681
+ isTruthy(r.color) && acc.color.push(r.color);
1682
+ isTruthy(r.line) && acc.line.push(r.line);
1683
+ return acc;
1684
+ }, {
1685
+ title: [],
1686
+ tail: [],
1687
+ head: [],
1688
+ color: [],
1689
+ line: [],
1690
+ notation: []
1691
+ });
1669
1692
  return {
1670
- title: title ?? null,
1671
1693
  tags,
1672
1694
  relations,
1673
- navigateTo: navigateTo ?? null
1695
+ navigateTo: navigateTo ?? null,
1696
+ title: pipe(commonProperties.title, unique(), only()) ?? null,
1697
+ tail: pipe(commonProperties.tail, unique(), only()) ?? null,
1698
+ head: pipe(commonProperties.head, unique(), only()) ?? null,
1699
+ color: pipe(commonProperties.color, unique(), only()) ?? null,
1700
+ line: pipe(commonProperties.line, unique(), only()) ?? null,
1701
+ notation: pipe(commonProperties.notation, unique(), only()) ?? null
1674
1702
  };
1675
1703
  }
1676
1704
  }
@@ -15,7 +15,7 @@ const vscodeUri = require('vscode-uri');
15
15
  const stripIndent = require('strip-indent');
16
16
  const hash = require('string-hash');
17
17
  const fastEquals = require('fast-equals');
18
- const LikeC4ModelGraph = require('./language-server.N8HLDQqz.cjs');
18
+ const LikeC4ModelGraph = require('./language-server.D2QdbOJO.cjs');
19
19
  const ufo = require('ufo');
20
20
  const vscodeLanguageserver = require('vscode-languageserver');
21
21
 
@@ -1538,7 +1538,8 @@ const LikeC4Grammar = () => loadedLikeC4Grammar ?? (loadedLikeC4Grammar = langiu
1538
1538
  const LikeC4LanguageMetaData = {
1539
1539
  languageId: "likec4",
1540
1540
  fileExtensions: [".c4", ".likec4", ".like-c4"],
1541
- caseInsensitive: false
1541
+ caseInsensitive: false,
1542
+ mode: "production"
1542
1543
  };
1543
1544
  const parserConfig = {
1544
1545
  skipValidations: true,
@@ -5981,7 +5982,11 @@ class LikeC4Formatter extends lsp.AbstractFormatter {
5981
5982
  f.cst(sourceNodes).append(FormattingOptions.oneSpace);
5982
5983
  f.keywords("]->").prepend(FormattingOptions.noSpace);
5983
5984
  f.keywords("-[").append(FormattingOptions.noSpace);
5984
- f.properties("target", "title", "technology", "tags").prepend(FormattingOptions.oneSpace);
5985
+ f.nodes(...remeda.filter([
5986
+ n.target,
5987
+ n.tags
5988
+ ], remeda.isTruthy)).prepend(FormattingOptions.oneSpace);
5989
+ f.properties("title", "technology").prepend(FormattingOptions.oneSpace);
5985
5990
  });
5986
5991
  this.on(node, isDynamicViewStep, (n, f) => {
5987
5992
  f.keywords("->", "<-").surround(FormattingOptions.oneSpace);