likec4 1.40.0 → 1.41.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,4 +1,4 @@
1
- import { L as LikeC4LanguageServices } from '../shared/likec4.DDO3vjMr.mjs';
1
+ import { L as LikeC4LanguageServices } from '../shared/likec4.3AlS7pfZ.mjs';
2
2
  import '@likec4/core';
3
3
  import 'type-fest';
4
4
  import '../shared/likec4.DX1wM3Or.mjs';
@@ -1 +1 @@
1
- export{L as LikeC4VitePlugin}from"../shared/likec4.P9UC3Wd_.mjs";
1
+ export{L as LikeC4VitePlugin}from"../shared/likec4.Db3cTW-C.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "likec4",
3
3
  "description": "Toolchain for your architecture diagrams",
4
- "version": "1.40.0",
4
+ "version": "1.41.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://likec4.dev",
7
7
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -112,7 +112,7 @@
112
112
  "vite": "^6.3.6",
113
113
  "std-env": "^3.9.0",
114
114
  "yargs": "17.7.2",
115
- "@likec4/core": "1.40.0"
115
+ "@likec4/core": "1.41.0"
116
116
  },
117
117
  "peerDependencies": {
118
118
  "react": "^18.x || ^19.x",
@@ -190,16 +190,16 @@
190
190
  "vscode-uri": "3.1.0",
191
191
  "which": "^5.0.0",
192
192
  "wireit": "0.14.12",
193
- "@likec4/diagram": "1.40.0",
194
- "@likec4/icons": "1.40.0",
195
- "@likec4/generators": "1.40.0",
196
- "@likec4/language-server": "1.40.0",
197
- "@likec4/config": "1.40.0",
198
- "@likec4/log": "1.40.0",
199
- "@likec4/layouts": "1.40.0",
200
- "@likec4/style-preset": "1.40.0",
201
- "@likec4/tsconfig": "1.40.0",
202
- "@likec4/styles": "1.40.0"
193
+ "@likec4/diagram": "1.41.0",
194
+ "@likec4/generators": "1.41.0",
195
+ "@likec4/language-server": "1.41.0",
196
+ "@likec4/icons": "1.41.0",
197
+ "@likec4/layouts": "1.41.0",
198
+ "@likec4/config": "1.41.0",
199
+ "@likec4/log": "1.41.0",
200
+ "@likec4/style-preset": "1.41.0",
201
+ "@likec4/styles": "1.41.0",
202
+ "@likec4/tsconfig": "1.41.0"
203
203
  },
204
204
  "scripts": {
205
205
  "typecheck": "tsc --build --verbose",
package/react/index.d.mts CHANGED
@@ -1573,6 +1573,13 @@ export type StrictTag<A> = A extends infer T extends Any ? Tag$1<Tag$2<T>> : nev
1573
1573
  export type StrictElementKind<A> = A extends infer T extends Any ? ElementKind<ElementKind$1<T>> : never;
1574
1574
  export type StrictDeploymentKind<A> = A extends infer T extends Any ? DeploymentKind<DeploymentKind$1<T>> : never;
1575
1575
  export type StrictRelationKind<A> = A extends infer T extends Any ? RelationshipKind<RelationKind<T>> : never;
1576
+ export type WithDescriptionAndTech = {
1577
+ readonly summary?: MarkdownOrString | null;
1578
+ readonly description?: MarkdownOrString | null;
1579
+ readonly technology?: string | null;
1580
+ };
1581
+ declare function preferSummary(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
1582
+ declare function preferDescription(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
1576
1583
  export type WithTags<A extends Any> = {
1577
1584
  readonly tags: Tags<A>;
1578
1585
  };
@@ -1588,6 +1595,9 @@ export type WithOptionalLinks = {
1588
1595
  export type WithMetadata<A extends Any> = {
1589
1596
  readonly metadata?: Metadata<A>;
1590
1597
  };
1598
+ export type WithNotation = {
1599
+ readonly notation?: string | null;
1600
+ };
1591
1601
  /**
1592
1602
  * @see {@link LiteralUnion} from type-fest (https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts)
1593
1603
  */
@@ -1644,18 +1654,22 @@ export type _aux_UnknownComputed = UnknownComputed;
1644
1654
  export type _aux_UnknownLayouted = UnknownLayouted;
1645
1655
  export type _aux_UnknownParsed = UnknownParsed;
1646
1656
  export type _aux_ViewId<A> = ViewId$1<A>;
1657
+ export type _aux_WithDescriptionAndTech = WithDescriptionAndTech;
1647
1658
  export type _aux_WithLinks = WithLinks;
1648
1659
  export type _aux_WithMetadata<A extends Any> = WithMetadata<A>;
1660
+ export type _aux_WithNotation = WithNotation;
1649
1661
  export type _aux_WithOptionalLinks = WithOptionalLinks;
1650
1662
  export type _aux_WithOptionalTags<A extends Any> = WithOptionalTags<A>;
1651
1663
  export type _aux_WithTags<A extends Any> = WithTags<A>;
1664
+ declare const _aux_preferDescription: typeof preferDescription;
1665
+ declare const _aux_preferSummary: typeof preferSummary;
1652
1666
  export type _aux_setProject<A, P extends string> = setProject<A, P>;
1653
1667
  export type _aux_setStage<A, S extends ModelStage> = setStage<A, S>;
1654
1668
  export type _aux_toComputed<A> = toComputed<A>;
1655
1669
  export type _aux_toLayouted<A> = toLayouted<A>;
1656
1670
  export type _aux_toParsed<A> = toParsed<A>;
1657
1671
  declare namespace _aux {
1658
- export type { _aux_AllKinds as _aux_AllKinds, _aux_Any as _aux_Any, Any as Any, _aux_AnySpec as _aux_AnySpec, _aux_Aux as _aux_Aux, _aux_DeploymentFqn as _aux_DeploymentFqn, _aux_DeploymentId as _aux_DeploymentId, _aux_DeploymentKind as _aux_DeploymentKind, _aux_EdgeId as _aux_EdgeId, _aux_ElementId as _aux_ElementId, _aux_ElementKind as _aux_ElementKind, _aux_Fqn as _aux_Fqn, _aux_LooseDeploymentId as _aux_LooseDeploymentId, _aux_LooseDeploymentKind as _aux_LooseDeploymentKind, _aux_LooseElementId as _aux_LooseElementId, _aux_LooseElementKind as _aux_LooseElementKind, _aux_LooseRelationKind as _aux_LooseRelationKind, _aux_LooseTag as _aux_LooseTag, _aux_LooseTags as _aux_LooseTags, _aux_LooseViewId as _aux_LooseViewId, _aux_Metadata as _aux_Metadata, _aux_MetadataKey as _aux_MetadataKey, _aux_Never as _aux_Never, _aux_NodeId as _aux_NodeId, _aux_OrString as _aux_OrString, _aux_PickByStage as _aux_PickByStage, _aux_ProjectId as _aux_ProjectId, _aux_RelationId as _aux_RelationId, _aux_RelationKind as _aux_RelationKind, _aux_Spec as _aux_Spec, _aux_SpecAux as _aux_SpecAux, _aux_Stage as _aux_Stage, DeploymentFqn$1 as DeploymentFqn$1, _aux_StrictDeploymentKind as _aux_StrictDeploymentKind, _aux_StrictElementKind as _aux_StrictElementKind, Fqn$1 as Fqn$1, _aux_StrictProjectId as _aux_StrictProjectId, _aux_StrictRelationKind as _aux_StrictRelationKind, _aux_StrictTag as _aux_StrictTag, _aux_StrictViewId as _aux_StrictViewId, _aux_Tag as _aux_Tag, _aux_Tags as _aux_Tags, _aux_Unknown as _aux_Unknown, _aux_UnknownComputed as _aux_UnknownComputed, _aux_UnknownLayouted as _aux_UnknownLayouted, _aux_UnknownParsed as _aux_UnknownParsed, _aux_ViewId as _aux_ViewId, _aux_WithLinks as _aux_WithLinks, _aux_WithMetadata as _aux_WithMetadata, _aux_WithOptionalLinks as _aux_WithOptionalLinks, _aux_WithOptionalTags as _aux_WithOptionalTags, _aux_WithTags as _aux_WithTags, _aux_setProject as _aux_setProject, _aux_setStage as _aux_setStage, _aux_toComputed as _aux_toComputed, _aux_toLayouted as _aux_toLayouted, _aux_toParsed as _aux_toParsed };
1672
+ export { type _aux_AllKinds as _aux_AllKinds, type _aux_Any as _aux_Any, type Any as Any, type _aux_AnySpec as _aux_AnySpec, type _aux_Aux as _aux_Aux, type _aux_DeploymentFqn as _aux_DeploymentFqn, type _aux_DeploymentId as _aux_DeploymentId, type _aux_DeploymentKind as _aux_DeploymentKind, type _aux_EdgeId as _aux_EdgeId, type _aux_ElementId as _aux_ElementId, type _aux_ElementKind as _aux_ElementKind, type _aux_Fqn as _aux_Fqn, type _aux_LooseDeploymentId as _aux_LooseDeploymentId, type _aux_LooseDeploymentKind as _aux_LooseDeploymentKind, type _aux_LooseElementId as _aux_LooseElementId, type _aux_LooseElementKind as _aux_LooseElementKind, type _aux_LooseRelationKind as _aux_LooseRelationKind, type _aux_LooseTag as _aux_LooseTag, type _aux_LooseTags as _aux_LooseTags, type _aux_LooseViewId as _aux_LooseViewId, type _aux_Metadata as _aux_Metadata, type _aux_MetadataKey as _aux_MetadataKey, type _aux_Never as _aux_Never, type _aux_NodeId as _aux_NodeId, type _aux_OrString as _aux_OrString, type _aux_PickByStage as _aux_PickByStage, type _aux_ProjectId as _aux_ProjectId, type _aux_RelationId as _aux_RelationId, type _aux_RelationKind as _aux_RelationKind, type _aux_Spec as _aux_Spec, type _aux_SpecAux as _aux_SpecAux, type _aux_Stage as _aux_Stage, type DeploymentFqn$1 as DeploymentFqn$1, type _aux_StrictDeploymentKind as _aux_StrictDeploymentKind, type _aux_StrictElementKind as _aux_StrictElementKind, type Fqn$1 as Fqn$1, type _aux_StrictProjectId as _aux_StrictProjectId, type _aux_StrictRelationKind as _aux_StrictRelationKind, type _aux_StrictTag as _aux_StrictTag, type _aux_StrictViewId as _aux_StrictViewId, type _aux_Tag as _aux_Tag, type _aux_Tags as _aux_Tags, type _aux_Unknown as _aux_Unknown, type _aux_UnknownComputed as _aux_UnknownComputed, type _aux_UnknownLayouted as _aux_UnknownLayouted, type _aux_UnknownParsed as _aux_UnknownParsed, type _aux_ViewId as _aux_ViewId, type _aux_WithDescriptionAndTech as _aux_WithDescriptionAndTech, type _aux_WithLinks as _aux_WithLinks, type _aux_WithMetadata as _aux_WithMetadata, type _aux_WithNotation as _aux_WithNotation, type _aux_WithOptionalLinks as _aux_WithOptionalLinks, type _aux_WithOptionalTags as _aux_WithOptionalTags, type _aux_WithTags as _aux_WithTags, _aux_preferDescription as _aux_preferDescription, _aux_preferSummary as _aux_preferSummary, type _aux_setProject as _aux_setProject, type _aux_setStage as _aux_setStage, type _aux_toComputed as _aux_toComputed, type _aux_toLayouted as _aux_toLayouted, type _aux_toParsed as _aux_toParsed };
1659
1673
  }
1660
1674
  export type AnyAux = Any;
1661
1675
  type Unknown$1 = Unknown;
@@ -2441,35 +2455,24 @@ export interface ElementStyle {
2441
2455
  readonly padding?: SpacingSize;
2442
2456
  readonly textSize?: TextSize;
2443
2457
  }
2444
- interface Element$1<A extends Any = Any> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
2458
+ interface Element$1<A extends Any = Any> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
2445
2459
  readonly id: Fqn$1<A>;
2446
2460
  readonly kind: ElementKind$1<A>;
2447
2461
  readonly title: string;
2448
- readonly description?: MarkdownOrString | null;
2449
- readonly technology?: string | null;
2450
- readonly tags?: Tags<A> | null;
2451
- readonly links?: readonly Link[] | null;
2452
2462
  readonly icon?: Icon;
2453
2463
  readonly shape?: ElementShape;
2454
2464
  readonly color?: Color;
2455
2465
  readonly style?: ElementStyle;
2456
- readonly notation?: string | null;
2457
- readonly metadata?: Metadata<A>;
2458
2466
  }
2459
- export interface AbstractRelationship<A extends Any> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
2467
+ export interface AbstractRelationship<A extends Any> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
2460
2468
  readonly id: RelationId;
2461
2469
  readonly title?: string | null;
2462
- readonly description?: MarkdownOrString | null;
2463
- readonly technology?: string | null;
2464
2470
  readonly kind?: RelationKind<A>;
2465
2471
  readonly color?: Color;
2466
2472
  readonly line?: RelationshipLineType;
2467
2473
  readonly head?: RelationshipArrowType;
2468
2474
  readonly tail?: RelationshipArrowType;
2469
- readonly tags?: Tags<A> | null;
2470
- readonly links?: readonly Link[] | null;
2471
2475
  readonly navigateTo?: ViewId$1<A>;
2472
- readonly metadata?: Metadata<A>;
2473
2476
  }
2474
2477
  /**
2475
2478
  * Relationship between two model elements
@@ -2483,20 +2486,14 @@ export interface DeploymentElementStyle extends ElementStyle {
2483
2486
  readonly shape?: ElementShape;
2484
2487
  readonly color?: Color;
2485
2488
  }
2486
- export interface DeploymentNode<A extends Any = Unknown> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
2489
+ export interface DeploymentNode<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
2487
2490
  element?: never;
2488
2491
  readonly id: DeploymentFqn$1<A>;
2489
2492
  readonly kind: DeploymentKind$1<A>;
2490
2493
  readonly title: string;
2491
- readonly description?: MarkdownOrString | null;
2492
- readonly technology?: string | null;
2493
- readonly tags?: Tags<A> | null;
2494
- readonly links?: readonly Link[] | null;
2495
2494
  readonly style: DeploymentElementStyle;
2496
- readonly notation?: string | null;
2497
- readonly metadata?: Metadata<A>;
2498
2495
  }
2499
- export interface DeployedInstance<A extends Any = Unknown> extends WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
2496
+ export interface DeployedInstance<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
2500
2497
  kind?: never;
2501
2498
  /**
2502
2499
  * Format: `<DeploymentNode Fqn>.<Instance Id>`
@@ -2505,13 +2502,7 @@ export interface DeployedInstance<A extends Any = Unknown> extends WithOptionalT
2505
2502
  readonly id: DeploymentFqn$1<A>;
2506
2503
  readonly element: Fqn$1<A>;
2507
2504
  readonly title?: string;
2508
- readonly description?: MarkdownOrString | null;
2509
- readonly technology?: string | null;
2510
- readonly tags?: Tags<A> | null;
2511
- readonly links?: readonly Link[] | null;
2512
2505
  readonly style?: DeploymentElementStyle;
2513
- readonly notation?: string;
2514
- readonly metadata?: Metadata<A>;
2515
2506
  }
2516
2507
  export type DeploymentElement<A extends Any = Unknown> = DeploymentNode<A> | DeployedInstance<A>;
2517
2508
  /**
@@ -2527,6 +2518,7 @@ export interface DeploymentRelationship<A extends Any = Unknown> extends Abstrac
2527
2518
  export interface ElementSpecification {
2528
2519
  tags?: Tag$1[];
2529
2520
  title?: string;
2521
+ summary?: MarkdownOrString;
2530
2522
  description?: MarkdownOrString;
2531
2523
  technology?: string;
2532
2524
  notation?: string;
@@ -2581,37 +2573,40 @@ export interface LikeC4Project {
2581
2573
  readonly id: ProjectId;
2582
2574
  title?: string;
2583
2575
  }
2584
- export interface ComputedNode<A extends Any = Any> extends WithOptionalLinks {
2576
+ export interface ComputedNode<A extends Any = Any> extends WithTags<A>, WithOptionalLinks {
2585
2577
  id: NodeId;
2586
2578
  kind: ElementKind$1<A> | DeploymentKind$1<A> | "@group";
2587
2579
  parent: NodeId | null;
2588
2580
  /**
2589
2581
  * Reference to model element
2590
2582
  */
2591
- modelRef?: Fqn$1<A> | undefined;
2583
+ modelRef?: Fqn$1<A>;
2592
2584
  /**
2593
2585
  * Reference to deployment element
2594
2586
  */
2595
- deploymentRef?: DeploymentFqn$1<A> | undefined;
2587
+ deploymentRef?: DeploymentFqn$1<A>;
2596
2588
  title: string;
2589
+ /**
2590
+ * Description of the node
2591
+ * either summary or description
2592
+ */
2597
2593
  description?: MarkdownOrString | null;
2598
2594
  technology?: string | null;
2599
- notation?: string;
2600
2595
  children: NodeId[];
2601
2596
  inEdges: EdgeId[];
2602
2597
  outEdges: EdgeId[];
2603
- tags: Tags<A>;
2604
2598
  shape: ElementShape;
2605
2599
  color: Color;
2606
2600
  icon?: Icon;
2607
2601
  style: ElementStyle;
2608
2602
  navigateTo?: StrictViewId<A> | null;
2609
2603
  level: number;
2610
- depth?: number;
2604
+ depth?: number | null;
2611
2605
  /**
2612
2606
  * If this node was customized in the view
2613
2607
  */
2614
2608
  isCustomized?: boolean;
2609
+ notation?: string | null;
2615
2610
  }
2616
2611
  export interface ComputedEdge<A extends Any = Any> extends WithOptionalTags<A> {
2617
2612
  id: EdgeId;
@@ -2620,7 +2615,7 @@ export interface ComputedEdge<A extends Any = Any> extends WithOptionalTags<A> {
2620
2615
  target: NodeId;
2621
2616
  label: string | null;
2622
2617
  description?: MarkdownOrString | null;
2623
- technology?: string;
2618
+ technology?: string | null;
2624
2619
  relations: RelationId[];
2625
2620
  kind?: RelationKind<A> | typeof StepEdgeKind;
2626
2621
  notation?: string;
@@ -4762,6 +4757,20 @@ declare class ElementModel<A extends Any = Any> implements WithTags$1<A>, WithMe
4762
4757
  */
4763
4758
  get tags(): Tags<A>;
4764
4759
  get title(): string;
4760
+ /**
4761
+ * Returns true if the element has a summary and a description
4762
+ * (if one is missing - it falls back to another)
4763
+ */
4764
+ get hasSummary(): boolean;
4765
+ /**
4766
+ * Short description of the element.
4767
+ * Falls back to description if summary is not provided.
4768
+ */
4769
+ get summary(): RichTextOrEmpty;
4770
+ /**
4771
+ * Long description of the element.
4772
+ * Falls back to summary if description is not provided.
4773
+ */
4765
4774
  get description(): RichTextOrEmpty;
4766
4775
  get technology(): string | null;
4767
4776
  get links(): ReadonlyArray<Link>;
@@ -5298,6 +5307,15 @@ declare abstract class AbstractDeploymentElementModel<A extends Any> implements
5298
5307
  get name(): string;
5299
5308
  get shape(): ElementShape;
5300
5309
  get color(): Color;
5310
+ /**
5311
+ * Short description of the element.
5312
+ * Falls back to description if summary is not provided.
5313
+ */
5314
+ get summary(): RichTextOrEmpty;
5315
+ /**
5316
+ * Long description of the element.
5317
+ * Falls back to summary if description is not provided.
5318
+ */
5301
5319
  get description(): RichTextOrEmpty;
5302
5320
  get technology(): string | null;
5303
5321
  get links(): ReadonlyArray<Link>;
@@ -5407,6 +5425,7 @@ declare class DeployedInstanceModel<A extends Any = Any> extends AbstractDeploym
5407
5425
  get color(): Color;
5408
5426
  get tags(): Tags<A>;
5409
5427
  get kind(): ElementKind$1<A>;
5428
+ get summary(): RichTextOrEmpty;
5410
5429
  get description(): RichTextOrEmpty;
5411
5430
  get technology(): string | null;
5412
5431
  get links(): ReadonlyArray<Link>;
@@ -5429,6 +5448,7 @@ declare class NestedElementOfDeployedInstanceModel<A extends Any = Any> {
5429
5448
  get shape(): ElementShape;
5430
5449
  get color(): Color;
5431
5450
  get title(): string;
5451
+ get summary(): RichTextOrEmpty;
5432
5452
  get description(): RichTextOrEmpty;
5433
5453
  get technology(): string | null;
5434
5454
  isDeploymentNode(): this is DeploymentNodeModel<A>;