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.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { DiagramView } from '@likec4/core/types';
2
2
  export * from '@likec4/core/types';
3
- import { W as WorkspaceFolder, a as LikeC4Services, L as LikeC4LanguageServices, P as ProjectsManager, b as LikeC4Views, R as Range } from './shared/likec4.DDO3vjMr.mjs';
3
+ import { W as WorkspaceFolder, a as LikeC4Services, L as LikeC4LanguageServices, P as ProjectsManager, b as LikeC4Views, R as Range } from './shared/likec4.3AlS7pfZ.mjs';
4
4
  import { ProjectId, NonEmptyArray } from '@likec4/core';
5
5
  import { LikeC4Model } from '@likec4/core/model';
6
6
  import 'type-fest';
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export{L as LikeC4}from"./shared/likec4.hpe1blK6.mjs";
1
+ export{L as LikeC4}from"./shared/likec4.bxIrQhth.mjs";
@@ -14207,6 +14207,7 @@ interface DeployedInstance extends AstNode {
14207
14207
  readonly $type: 'DeployedInstance';
14208
14208
  body?: DeployedInstanceBody;
14209
14209
  name?: Id;
14210
+ summary?: string;
14210
14211
  target: ElementRef;
14211
14212
  title?: string;
14212
14213
  }
@@ -14225,6 +14226,7 @@ interface DeploymentNode extends AstNode {
14225
14226
  body?: DeploymentNodeBody;
14226
14227
  kind: Reference<DeploymentNodeKind>;
14227
14228
  name: Id;
14229
+ summary?: string;
14228
14230
  title?: string;
14229
14231
  }
14230
14232
  declare const DeploymentNode = "DeploymentNode";
@@ -14397,7 +14399,7 @@ declare const ElementRef = "ElementRef";
14397
14399
  interface ElementStringProperty extends AstNode {
14398
14400
  readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
14399
14401
  readonly $type: 'ElementStringProperty';
14400
- key: 'description' | 'technology' | 'title';
14402
+ key: 'description' | 'summary' | 'technology' | 'title';
14401
14403
  value: MarkdownOrString;
14402
14404
  }
14403
14405
  declare const ElementStringProperty = "ElementStringProperty";
@@ -14842,7 +14844,7 @@ declare const SpecificationElementKind = "SpecificationElementKind";
14842
14844
  interface SpecificationElementStringProperty extends AstNode {
14843
14845
  readonly $container: SpecificationDeploymentNodeKind | SpecificationElementKind;
14844
14846
  readonly $type: 'SpecificationElementStringProperty';
14845
- key: 'description' | 'notation' | 'technology' | 'title';
14847
+ key: 'description' | 'notation' | 'summary' | 'technology' | 'title';
14846
14848
  value: MarkdownOrString;
14847
14849
  }
14848
14850
  declare const SpecificationElementStringProperty = "SpecificationElementStringProperty";
@@ -15292,6 +15294,7 @@ interface ParsedAstElement {
15292
15294
  astPath: string;
15293
15295
  kind: c4.ElementKind;
15294
15296
  title: string;
15297
+ summary?: c4.MarkdownOrString;
15295
15298
  description?: c4.MarkdownOrString;
15296
15299
  technology?: string;
15297
15300
  tags?: c4.NonEmptyArray<c4.Tag>;
@@ -15304,8 +15307,8 @@ interface ParsedAstElement {
15304
15307
  interface ParsedAstExtend {
15305
15308
  id: c4.Fqn;
15306
15309
  astPath: string;
15307
- tags?: c4.NonEmptyArray<c4.Tag>;
15308
- links?: c4.NonEmptyArray<c4.Link>;
15310
+ tags: c4.NonEmptyArray<c4.Tag> | null;
15311
+ links: c4.NonEmptyArray<c4.Link> | null;
15309
15312
  metadata?: {
15310
15313
  [key: string]: string;
15311
15314
  };
@@ -15732,19 +15735,25 @@ declare class BaseParser {
15732
15735
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
15733
15736
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
15734
15737
  /**
15735
- * Parses title, description and technology
15736
- * Inline properties (right on node) have higher priority than body properties (inside '{...}')
15738
+ * Parse base properties: title, description and technology
15739
+ *
15740
+ * @param props - body properties (inside '{...}')
15741
+ * @param override - optional, inline properties (right on the node)
15742
+ * have higher priority and override body properties
15737
15743
  */
15738
- parseTitleDescriptionTechnology(inlineProps: {
15739
- title?: string | undefined;
15740
- description?: string | undefined;
15741
- technology?: string | undefined;
15742
- }, bodyProps: {
15744
+ parseBaseProps(props: {
15743
15745
  title?: MarkdownOrString | undefined;
15746
+ summary?: MarkdownOrString | undefined;
15744
15747
  description?: MarkdownOrString | undefined;
15745
15748
  technology?: MarkdownOrString | undefined;
15749
+ }, override?: {
15750
+ title?: string | undefined;
15751
+ summary?: string | undefined;
15752
+ description?: string | undefined;
15753
+ technology?: string | undefined;
15746
15754
  }): {
15747
15755
  title?: string;
15756
+ summary?: c4.MarkdownOrString;
15748
15757
  description?: c4.MarkdownOrString;
15749
15758
  technology?: string;
15750
15759
  };
@@ -15821,16 +15830,19 @@ declare const DocumentParserFromMixins: {
15821
15830
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
15822
15831
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
15823
15832
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
15824
- parseTitleDescriptionTechnology(inlineProps: {
15825
- title?: string | undefined;
15826
- description?: string | undefined;
15827
- technology?: string | undefined;
15828
- }, bodyProps: {
15833
+ parseBaseProps(props: {
15829
15834
  title?: MarkdownOrString | undefined;
15835
+ summary?: MarkdownOrString | undefined;
15830
15836
  description?: MarkdownOrString | undefined;
15831
15837
  technology?: MarkdownOrString | undefined;
15838
+ }, override?: {
15839
+ title?: string | undefined;
15840
+ summary?: string | undefined;
15841
+ description?: string | undefined;
15842
+ technology?: string | undefined;
15832
15843
  }): {
15833
15844
  title?: string;
15845
+ summary?: ProjectId;
15834
15846
  description?: ProjectId;
15835
15847
  technology?: string;
15836
15848
  };
@@ -15911,16 +15923,19 @@ declare const DocumentParserFromMixins: {
15911
15923
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
15912
15924
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
15913
15925
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
15914
- parseTitleDescriptionTechnology(inlineProps: {
15915
- title?: string | undefined;
15916
- description?: string | undefined;
15917
- technology?: string | undefined;
15918
- }, bodyProps: {
15926
+ parseBaseProps(props: {
15919
15927
  title?: MarkdownOrString | undefined;
15928
+ summary?: MarkdownOrString | undefined;
15920
15929
  description?: MarkdownOrString | undefined;
15921
15930
  technology?: MarkdownOrString | undefined;
15931
+ }, override?: {
15932
+ title?: string | undefined;
15933
+ summary?: string | undefined;
15934
+ description?: string | undefined;
15935
+ technology?: string | undefined;
15922
15936
  }): {
15923
15937
  title?: string;
15938
+ summary?: ProjectId;
15924
15939
  description?: ProjectId;
15925
15940
  technology?: string;
15926
15941
  };
@@ -15963,16 +15978,19 @@ declare const DocumentParserFromMixins: {
15963
15978
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
15964
15979
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
15965
15980
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
15966
- parseTitleDescriptionTechnology(inlineProps: {
15967
- title?: string | undefined;
15968
- description?: string | undefined;
15969
- technology?: string | undefined;
15970
- }, bodyProps: {
15981
+ parseBaseProps(props: {
15971
15982
  title?: MarkdownOrString | undefined;
15983
+ summary?: MarkdownOrString | undefined;
15972
15984
  description?: MarkdownOrString | undefined;
15973
15985
  technology?: MarkdownOrString | undefined;
15986
+ }, override?: {
15987
+ title?: string | undefined;
15988
+ summary?: string | undefined;
15989
+ description?: string | undefined;
15990
+ technology?: string | undefined;
15974
15991
  }): {
15975
15992
  title?: string;
15993
+ summary?: ProjectId;
15976
15994
  description?: ProjectId;
15977
15995
  technology?: string;
15978
15996
  };
@@ -16029,16 +16047,19 @@ declare const DocumentParserFromMixins: {
16029
16047
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
16030
16048
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
16031
16049
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
16032
- parseTitleDescriptionTechnology(inlineProps: {
16033
- title?: string | undefined;
16034
- description?: string | undefined;
16035
- technology?: string | undefined;
16036
- }, bodyProps: {
16050
+ parseBaseProps(props: {
16037
16051
  title?: MarkdownOrString | undefined;
16052
+ summary?: MarkdownOrString | undefined;
16038
16053
  description?: MarkdownOrString | undefined;
16039
16054
  technology?: MarkdownOrString | undefined;
16055
+ }, override?: {
16056
+ title?: string | undefined;
16057
+ summary?: string | undefined;
16058
+ description?: string | undefined;
16059
+ technology?: string | undefined;
16040
16060
  }): {
16041
16061
  title?: string;
16062
+ summary?: ProjectId;
16042
16063
  description?: ProjectId;
16043
16064
  technology?: string;
16044
16065
  };
@@ -16088,16 +16109,19 @@ declare const DocumentParserFromMixins: {
16088
16109
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
16089
16110
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
16090
16111
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
16091
- parseTitleDescriptionTechnology(inlineProps: {
16092
- title?: string | undefined;
16093
- description?: string | undefined;
16094
- technology?: string | undefined;
16095
- }, bodyProps: {
16112
+ parseBaseProps(props: {
16096
16113
  title?: MarkdownOrString | undefined;
16114
+ summary?: MarkdownOrString | undefined;
16097
16115
  description?: MarkdownOrString | undefined;
16098
16116
  technology?: MarkdownOrString | undefined;
16117
+ }, override?: {
16118
+ title?: string | undefined;
16119
+ summary?: string | undefined;
16120
+ description?: string | undefined;
16121
+ technology?: string | undefined;
16099
16122
  }): {
16100
16123
  title?: string;
16124
+ summary?: ProjectId;
16101
16125
  description?: ProjectId;
16102
16126
  technology?: string;
16103
16127
  };
@@ -16155,16 +16179,19 @@ declare const DocumentParserFromMixins: {
16155
16179
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
16156
16180
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
16157
16181
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
16158
- parseTitleDescriptionTechnology(inlineProps: {
16159
- title?: string | undefined;
16160
- description?: string | undefined;
16161
- technology?: string | undefined;
16162
- }, bodyProps: {
16182
+ parseBaseProps(props: {
16163
16183
  title?: MarkdownOrString | undefined;
16184
+ summary?: MarkdownOrString | undefined;
16164
16185
  description?: MarkdownOrString | undefined;
16165
16186
  technology?: MarkdownOrString | undefined;
16187
+ }, override?: {
16188
+ title?: string | undefined;
16189
+ summary?: string | undefined;
16190
+ description?: string | undefined;
16191
+ technology?: string | undefined;
16166
16192
  }): {
16167
16193
  title?: string;
16194
+ summary?: ProjectId;
16168
16195
  description?: ProjectId;
16169
16196
  technology?: string;
16170
16197
  };
@@ -16215,16 +16242,19 @@ declare const DocumentParserFromMixins: {
16215
16242
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
16216
16243
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
16217
16244
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
16218
- parseTitleDescriptionTechnology(inlineProps: {
16219
- title?: string | undefined;
16220
- description?: string | undefined;
16221
- technology?: string | undefined;
16222
- }, bodyProps: {
16245
+ parseBaseProps(props: {
16223
16246
  title?: MarkdownOrString | undefined;
16247
+ summary?: MarkdownOrString | undefined;
16224
16248
  description?: MarkdownOrString | undefined;
16225
16249
  technology?: MarkdownOrString | undefined;
16250
+ }, override?: {
16251
+ title?: string | undefined;
16252
+ summary?: string | undefined;
16253
+ description?: string | undefined;
16254
+ technology?: string | undefined;
16226
16255
  }): {
16227
16256
  title?: string;
16257
+ summary?: ProjectId;
16228
16258
  description?: ProjectId;
16229
16259
  technology?: string;
16230
16260
  };
@@ -16255,16 +16285,19 @@ declare const DocumentParserFromMixins: {
16255
16285
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
16256
16286
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
16257
16287
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
16258
- parseTitleDescriptionTechnology(inlineProps: {
16259
- title?: string | undefined;
16260
- description?: string | undefined;
16261
- technology?: string | undefined;
16262
- }, bodyProps: {
16288
+ parseBaseProps(props: {
16263
16289
  title?: MarkdownOrString | undefined;
16290
+ summary?: MarkdownOrString | undefined;
16264
16291
  description?: MarkdownOrString | undefined;
16265
16292
  technology?: MarkdownOrString | undefined;
16293
+ }, override?: {
16294
+ title?: string | undefined;
16295
+ summary?: string | undefined;
16296
+ description?: string | undefined;
16297
+ technology?: string | undefined;
16266
16298
  }): {
16267
16299
  title?: string;
16300
+ summary?: ProjectId;
16268
16301
  description?: ProjectId;
16269
16302
  technology?: string;
16270
16303
  };
@@ -16310,16 +16343,19 @@ declare const DocumentParserFromMixins: {
16310
16343
  parseColorLiteral(astNode: ColorLiteral): ProjectId | undefined;
16311
16344
  parseElementStyle(elementProps: Array<ElementProperty> | ElementStyleProperty | undefined): ParsedElementStyle;
16312
16345
  parseStyleProps(styleProps: Array<StyleProperty> | undefined): ParsedElementStyle;
16313
- parseTitleDescriptionTechnology(inlineProps: {
16314
- title?: string | undefined;
16315
- description?: string | undefined;
16316
- technology?: string | undefined;
16317
- }, bodyProps: {
16346
+ parseBaseProps(props: {
16318
16347
  title?: MarkdownOrString | undefined;
16348
+ summary?: MarkdownOrString | undefined;
16319
16349
  description?: MarkdownOrString | undefined;
16320
16350
  technology?: MarkdownOrString | undefined;
16351
+ }, override?: {
16352
+ title?: string | undefined;
16353
+ summary?: string | undefined;
16354
+ description?: string | undefined;
16355
+ technology?: string | undefined;
16321
16356
  }): {
16322
16357
  title?: string;
16358
+ summary?: ProjectId;
16323
16359
  description?: ProjectId;
16324
16360
  technology?: string;
16325
16361
  };
@@ -1,4 +1,4 @@
1
- import{invariant as le,isNonEmptyArray as pe}from"@likec4/core";import{relative as ue}from"node:path";import{t as fe}from"./likec4.C8C0fF8a.mjs";import{f as ge,g as J,T as he,N as V,i as me,e as U,j as _,u as N,t as we,a as Ie,b as Ne,n as ye,c as ve,d as ke,h as Le,k as G,L as $e}from"./likec4.hpe1blK6.mjs";import{compareNatural as je}from"@likec4/core/utils";import{l as W}from"./likec4.CxmGAh_J.mjs";import{t as Se}from"./likec4.CdNNo2L4.mjs";import{RichText as Ce}from"@likec4/core/types";function Re(...t){
1
+ import{invariant as le,isNonEmptyArray as pe}from"@likec4/core";import{relative as ue}from"node:path";import{t as fe}from"./likec4.C8C0fF8a.mjs";import{f as ge,g as J,T as he,N as V,i as me,e as U,j as _,u as N,t as we,a as Ie,b as Ne,n as ye,c as ve,d as ke,h as Le,k as G,L as $e}from"./likec4.bxIrQhth.mjs";import{compareNatural as je}from"@likec4/core/utils";import{l as W}from"./likec4.CxmGAh_J.mjs";import{t as Se}from"./likec4.CdNNo2L4.mjs";import{RichText as Ce}from"@likec4/core/types";function Re(...t){
2
2
  return Se(Te,t)}function Te(t,e){let i={};for(let n of e)n in t&&(i[n]=t[n]);return i}function Ee(t){var e,i;if(t){if("astNode"in t)return xe(t);if(Array.isArray(t))return t.reduce(z,void 0);{const n=t,r=be(n)?Me((i=(e=n?.root)===null||e===void 0?void 0:e.astNode)!==null&&i!==void 0?i:n?.astNode):void 0;return C(n,r)}}else return}function be(t){return typeof t<"u"&&"element"in t&&"text"in t}function Me(t){try{return J(t).uri.toString()}catch{return}}function xe(t){var e,i;const{astNode:n,property:r,
3
3
  index:a}=t??{},d=(e=n?.$cstNode)!==null&&e!==void 0?e:n?.$textRegion;if(!(n===void 0||d===void 0)){if(r===void 0)return C(d,O(n));{const o=s=>a!==void 0&&a>-1&&Array.isArray(n[r])?a<s.length?s[a]:void 0:s.reduce(z,void 0);if(!((i=d.assignments)===null||i===void 0)&&i[r]){const s=o(d.assignments[r]);return s&&C(s,O(n))}else if(n.$cstNode){const s=o(ge(n.$cstNode,r));return s&&C(s,O(n))}else return}}}function O(t){var e,i,n,r;return t.$cstNode?(i=(e=J(t))===null||e===void 0?void 0:e.uri)===null||i===
4
4
  void 0?void 0:i.toString():t.$textRegion?t.$textRegion.documentURI||((r=(n=new he(t,a=>a.$container?[a.$container]:[]).find(a=>{var d;return(d=a.$textRegion)===null||d===void 0?void 0:d.documentURI}))===null||n===void 0?void 0:n.$textRegion)===null||r===void 0?void 0:r.documentURI):void 0}function C(t,e){var i,n;const r={offset:t.offset,end:(i=t.end)!==null&&i!==void 0?i:t.offset+t.length,length:(n=t.length)!==null&&n!==void 0?n:t.end-t.offset};return t.range&&(r.range=t.range),e??(e=t.fileURI),