likec4 1.18.0 → 1.19.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.
Files changed (49) hide show
  1. package/LICENSE +1 -1
  2. package/__app__/index.html +0 -1
  3. package/__app__/react/likec4.tsx +11 -8
  4. package/__app__/src/chunks/-index-overview-C9eO_hFX.js +309 -0
  5. package/__app__/src/chunks/-view-lazy-data-CI4xD57c.js +9 -0
  6. package/__app__/src/chunks/index-KI-kE60c.js +465 -0
  7. package/__app__/src/chunks/likec4-CusAw_j6.js +6106 -0
  8. package/__app__/src/chunks/main-DY2KbFcO.js +24136 -0
  9. package/__app__/src/chunks/mantine-B_6mKFFA.js +13671 -0
  10. package/__app__/src/chunks/tanstack-router-BBWuTKWO.js +2373 -0
  11. package/__app__/src/icons.js +6 -6
  12. package/__app__/src/main.js +1 -1
  13. package/__app__/src/style.css +1 -1
  14. package/__app__/webcomponent/webcomponent.js +21699 -21851
  15. package/dist/chunks/prompt.cjs +45 -0
  16. package/dist/chunks/prompt.mjs +35 -35
  17. package/dist/cli/index.cjs +469 -0
  18. package/dist/cli/index.d.cts +1 -0
  19. package/dist/cli/index.mjs +91 -88
  20. package/dist/index.cjs +1 -0
  21. package/dist/index.d.cts +16459 -0
  22. package/dist/index.d.mts +546 -2526
  23. package/dist/index.d.ts +546 -2526
  24. package/dist/index.mjs +1 -1
  25. package/dist/model/index.cjs +1 -0
  26. package/dist/model/index.d.cts +258 -0
  27. package/dist/model/index.d.mts +258 -0
  28. package/dist/model/index.d.ts +258 -0
  29. package/dist/model/index.mjs +1 -0
  30. package/dist/shared/likec4.1r1CQuHw.mjs +9 -0
  31. package/dist/shared/likec4.CLgnaOeL.mjs +1856 -0
  32. package/dist/shared/likec4.CfqfZIn-.cjs +1856 -0
  33. package/dist/shared/likec4.D81G5JV4.cjs +9 -0
  34. package/dist/shared/likec4.DCwaTTuF.d.cts +1625 -0
  35. package/dist/shared/likec4.DCwaTTuF.d.mts +1625 -0
  36. package/dist/shared/likec4.DCwaTTuF.d.ts +1625 -0
  37. package/package.json +72 -62
  38. package/react/index.d.ts +150 -918
  39. package/react/index.js +39830 -0
  40. package/react/style.css +1 -1
  41. package/__app__/src/chunks/-index-overview-CBnvpD1d.js +0 -309
  42. package/__app__/src/chunks/-view-lazy-data-WZmbIsHq.js +0 -9
  43. package/__app__/src/chunks/index-CIsxIzOH.js +0 -465
  44. package/__app__/src/chunks/likec4-DslTxitT.js +0 -6109
  45. package/__app__/src/chunks/main-ByUdz_Be.js +0 -24285
  46. package/__app__/src/chunks/mantine-oFa3ZrEq.js +0 -13658
  47. package/__app__/src/chunks/tanstack-router-BWjXKr0n.js +0 -2373
  48. package/dist/shared/likec4.lgHXhASw.mjs +0 -1832
  49. package/react/index.mjs +0 -41515
package/dist/index.d.mts CHANGED
@@ -1,2233 +1,8 @@
1
- import { LiteralUnion, Tagged, Simplify, MergeExclusive, TupleToUnion, NonEmptyTuple, UnionToIntersection, IsLiteral, SetRequired, IsNumericLiteral, IfNever, ValueOf, ConditionalPick } from 'type-fest';
2
-
3
- type NonEmptyArray<T> = [T, ...T[]];
4
- type IconUrl = Tagged<string, 'IconUrl'> | 'none';
5
- type CustomColor$1 = string;
6
- type Point = readonly [x: number, y: number];
7
- interface XYPoint {
8
- x: number;
9
- y: number;
10
- }
11
- type KeysOf<T> = keyof T extends infer K extends string ? K : never;
12
-
13
- declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
14
- type ThemeColor$1 = typeof ThemeColors[number];
15
- type HexColorLiteral = `#${string}`;
16
- type ColorLiteral = HexColorLiteral;
17
- type Color$1 = LiteralUnion<ThemeColor$1, string>;
18
- interface ElementThemeColorValues {
19
- fill: ColorLiteral;
20
- stroke: ColorLiteral;
21
- hiContrast: ColorLiteral;
22
- loContrast: ColorLiteral;
23
- }
24
- interface RelationshipThemeColorValues {
25
- lineColor: ColorLiteral;
26
- labelBgColor: ColorLiteral;
27
- labelColor: ColorLiteral;
28
- }
29
- interface ThemeColorValues {
30
- elements: ElementThemeColorValues;
31
- relationships: RelationshipThemeColorValues;
32
- }
33
-
34
- type Fqn<Id extends string = string> = Tagged<Id, 'Fqn'>;
35
- declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
36
- type BorderStyle = TupleToUnion<typeof BorderStyles>;
37
- type ElementKind$1<Kinds extends string = string> = Tagged<Kinds, 'ElementKind'>;
38
- declare namespace ElementKind$1 {
39
- const Group: ElementKind$1;
40
- }
41
- declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
42
- type ElementShape$1 = TupleToUnion<typeof ElementShapes>;
43
- interface ElementStyle {
44
- readonly border?: BorderStyle;
45
- /**
46
- * In percentage 0-100, 0 is fully transparent
47
- *
48
- * @default 100
49
- */
50
- readonly opacity?: number;
51
- }
52
- type Tag$1<Tags extends string = string> = Tagged<Tags, 'Tag'>;
53
- interface Link {
54
- readonly title?: string;
55
- readonly url: string;
56
- readonly relative?: string;
57
- }
58
- interface TypedElement<Ids extends string, Kinds extends string, Tags extends string, MetadataKeys extends string = never> {
59
- readonly id: Fqn<Ids>;
60
- readonly kind: ElementKind$1<Kinds>;
61
- readonly title: string;
62
- readonly description: string | null;
63
- readonly technology: string | null;
64
- readonly tags: NonEmptyArray<Tag$1<Tags>> | null;
65
- readonly links: NonEmptyArray<Link> | null;
66
- readonly icon?: IconUrl;
67
- readonly shape?: ElementShape$1;
68
- readonly color?: Color$1;
69
- readonly style?: ElementStyle;
70
- readonly notation?: string;
71
- readonly metadata?: Record<MetadataKeys, string>;
72
- }
73
- interface Element$1 extends TypedElement<string, string, string, string> {
74
- }
75
- interface ElementKindSpecificationStyle {
76
- shape?: ElementShape$1;
77
- icon?: IconUrl;
78
- color?: Color$1;
79
- border?: BorderStyle;
80
- opacity?: number;
81
- }
82
- interface ElementKindSpecification {
83
- readonly technology?: string;
84
- readonly notation?: string;
85
- readonly style: ElementKindSpecificationStyle;
86
- }
87
-
88
- type EqualOperator<V> = {
89
- eq: V;
90
- neq?: never;
91
- } | {
92
- eq?: never;
93
- neq: V;
94
- };
95
- type AllNever$1 = {
96
- not?: never;
97
- and?: never;
98
- or?: never;
99
- tag?: never;
100
- kind?: never;
101
- };
102
- type TagEqual<Tag> = Omit<AllNever$1, 'tag'> & {
103
- tag: EqualOperator<Tag>;
104
- };
105
- type KindEqual<Kind> = Omit<AllNever$1, 'kind'> & {
106
- kind: EqualOperator<Kind>;
107
- };
108
- type NotOperator<Tag, Kind> = Omit<AllNever$1, 'not'> & {
109
- not: WhereOperator<Tag, Kind>;
110
- };
111
- type AndOperator<Tag, Kind> = Omit<AllNever$1, 'and'> & {
112
- and: NonEmptyArray<WhereOperator<Tag, Kind>>;
113
- };
114
- type OrOperator<Tag, Kind> = Omit<AllNever$1, 'or'> & {
115
- or: NonEmptyArray<WhereOperator<Tag, Kind>>;
116
- };
117
- type WhereOperator<Tag, Kind> = TagEqual<Tag> | KindEqual<Kind> | NotOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
118
-
119
- interface BaseExpr {
120
- where?: never;
121
- element?: never;
122
- custom?: never;
123
- expanded?: never;
124
- elementKind?: never;
125
- elementTag?: never;
126
- isEqual?: never;
127
- isChildren?: never;
128
- isDescendants?: never;
129
- wildcard?: never;
130
- source?: never;
131
- target?: never;
132
- inout?: never;
133
- incoming?: never;
134
- outgoing?: never;
135
- customRelation?: never;
136
- }
137
- interface ElementRefExpr extends Omit<BaseExpr, 'element' | 'isChildren' | 'isDescendants'> {
138
- element: Fqn;
139
- isChildren?: boolean;
140
- isDescendants?: boolean;
141
- }
142
- interface ExpandedElementExpr extends Omit<BaseExpr, 'expanded'> {
143
- expanded: Fqn;
144
- }
145
- interface CustomElementExpr extends Omit<BaseExpr, 'custom'> {
146
- custom: {
147
- expr: ElementExpression$1 | ElementWhereExpr;
148
- title?: string;
149
- description?: string;
150
- technology?: string;
151
- notation?: string;
152
- shape?: ElementShape$1;
153
- color?: Color$1;
154
- icon?: IconUrl;
155
- border?: BorderStyle;
156
- opacity?: number;
157
- navigateTo?: ViewId;
158
- };
159
- }
160
- interface WildcardExpr extends Omit<BaseExpr, 'wildcard'> {
161
- wildcard: true;
162
- }
163
- interface ElementKindExpr extends Omit<BaseExpr, 'elementKind' | 'isEqual'> {
164
- elementKind: ElementKind$1;
165
- isEqual: boolean;
166
- }
167
- interface ElementTagExpr extends Omit<BaseExpr, 'elementTag' | 'isEqual'> {
168
- elementTag: Tag$1;
169
- isEqual: boolean;
170
- }
171
- type ElementExpression$1 = ElementRefExpr | WildcardExpr | ElementKindExpr | ElementTagExpr | ExpandedElementExpr;
172
- interface ElementWhereExpr extends Omit<BaseExpr, 'where'> {
173
- where: {
174
- expr: ElementExpression$1;
175
- condition: WhereOperator<string, string>;
176
- };
177
- }
178
- type ElementPredicateExpression = ElementExpression$1 | ElementWhereExpr | CustomElementExpr;
179
- interface RelationExpr extends Omit<BaseExpr, 'source' | 'target'> {
180
- source: ElementExpression$1;
181
- target: ElementExpression$1;
182
- isBidirectional?: boolean;
183
- }
184
- interface InOutExpr extends Omit<BaseExpr, 'inout'> {
185
- inout: ElementExpression$1;
186
- }
187
- interface IncomingExpr extends Omit<BaseExpr, 'incoming'> {
188
- incoming: ElementExpression$1;
189
- }
190
- interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
191
- outgoing: ElementExpression$1;
192
- }
193
- type RelationExpression$1 = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
194
- interface RelationWhereExpr extends Omit<BaseExpr, 'where'> {
195
- where: {
196
- expr: RelationExpression$1;
197
- condition: WhereOperator<string, string>;
198
- };
199
- }
200
- interface CustomRelationExpr extends Omit<BaseExpr, 'customRelation'> {
201
- customRelation: {
202
- relation: RelationExpression$1 | RelationWhereExpr;
203
- title?: string;
204
- description?: string;
205
- technology?: string;
206
- notation?: string;
207
- navigateTo?: ViewId;
208
- notes?: string;
209
- color?: Color$1;
210
- line?: RelationshipLineType;
211
- head?: RelationshipArrowType;
212
- tail?: RelationshipArrowType;
213
- };
214
- }
215
- type RelationPredicateExpression = RelationExpression$1 | RelationWhereExpr | CustomRelationExpr;
216
- type Expression$1 = ElementPredicateExpression | RelationPredicateExpression;
217
-
218
- type GlobalPredicateId = Tagged<string, 'GlobalPredicateId'>;
219
- type GlobalPredicates = NonEmptyArray<ViewRulePredicate$1>;
220
- type GlobalDynamicPredicates = NonEmptyArray<DynamicViewIncludeRule>;
221
- type GlobalStyleID = Tagged<string, 'GlobalStyleID'>;
222
- type GlobalStyles = NonEmptyTuple<ViewRuleStyle$1>;
223
- interface ModelGlobals {
224
- predicates: Record<GlobalPredicateId, GlobalPredicates>;
225
- dynamicPredicates: Record<GlobalPredicateId, GlobalDynamicPredicates>;
226
- styles: Record<GlobalStyleID, GlobalStyles>;
227
- }
228
-
229
- type ElementNotation = {
230
- kinds: string[];
231
- shape: ElementShape$1;
232
- color: Color$1;
233
- title: string;
234
- };
235
-
236
- type ViewId<Id extends string = string> = Tagged<Id, 'ViewID'>;
237
- type ViewRulePredicate$1 = {
238
- include: Expression$1[];
239
- exclude?: never;
240
- } | {
241
- include?: never;
242
- exclude: Expression$1[];
243
- };
244
- interface ViewRuleGlobalPredicateRef$1 {
245
- predicateId: GlobalPredicateId;
246
- }
247
- interface ViewRuleStyle$1 {
248
- targets: ElementExpression$1[];
249
- notation?: string;
250
- style: ElementStyle & {
251
- color?: Color$1;
252
- shape?: ElementShape$1;
253
- icon?: IconUrl;
254
- };
255
- }
256
- interface ViewRuleGlobalStyle$1 {
257
- styleId: GlobalStyleID;
258
- }
259
- type AutoLayoutDirection = 'TB' | 'BT' | 'LR' | 'RL';
260
- interface ViewRuleAutoLayout$1 {
261
- direction: AutoLayoutDirection;
262
- nodeSep?: number;
263
- rankSep?: number;
264
- }
265
- interface ViewRuleGroup$1 {
266
- groupRules: Array<ViewRulePredicate$1 | ViewRuleGroup$1>;
267
- title: string | null;
268
- color?: Color$1;
269
- border?: BorderStyle;
270
- opacity?: number;
271
- }
272
- type ViewRule$1 = ViewRulePredicate$1 | ViewRuleGlobalPredicateRef$1 | ViewRuleGroup$1 | ViewRuleStyle$1 | ViewRuleGlobalStyle$1 | ViewRuleAutoLayout$1;
273
- interface BasicView<ViewType extends 'element' | 'dynamic' | 'deployment', ViewIDs extends string, Tags extends string> {
274
- readonly __?: ViewType;
275
- readonly id: ViewId<ViewIDs>;
276
- readonly title: string | null;
277
- readonly description: string | null;
278
- readonly tags: NonEmptyArray<Tag$1<Tags>> | null;
279
- readonly links: NonEmptyArray<Link> | null;
280
- /**
281
- * URI to the source file of this view.
282
- * Undefined if the view is auto-generated.
283
- */
284
- readonly docUri?: string;
285
- /**
286
- * For all views we find common ancestor path.
287
- * This is used to generate relative paths, i.e.:
288
- * - "/home/project/index.c4" becomes "index.c4"
289
- * - "/home/project/subdir/views.c4" becomes "subdir/views.c4"
290
- *
291
- * Undefined if the view is auto-generated.
292
- */
293
- readonly relativePath?: string;
294
- /**
295
- * If the view is changed manually this field contains the layout data.
296
- */
297
- readonly manualLayout?: ViewManualLayout | undefined;
298
- readonly customColorDefinitions: CustomColorDefinitions;
299
- }
300
- interface BasicElementView<ViewIDs extends string, Tags extends string> extends BasicView<'element', ViewIDs, Tags> {
301
- readonly viewOf?: Fqn;
302
- readonly rules: ViewRule$1[];
303
- }
304
- interface ScopedElementView<ViewIDs extends string, Tags extends string> extends BasicElementView<ViewIDs, Tags> {
305
- readonly viewOf: Fqn;
306
- }
307
- interface ExtendsElementView<ViewIDs extends string, Tags extends string> extends BasicElementView<ViewIDs, Tags> {
308
- readonly extends: ViewId<ViewIDs>;
309
- }
310
- type ElementView$1<ViewIDs extends string = string, Tags extends string = string> = ScopedElementView<ViewIDs, Tags> | ExtendsElementView<ViewIDs, Tags> | BasicElementView<ViewIDs, Tags>;
311
- interface DynamicViewStep$1 {
312
- readonly source: Fqn;
313
- readonly target: Fqn;
314
- readonly title: string | null;
315
- readonly description?: string;
316
- readonly technology?: string;
317
- readonly notation?: string;
318
- readonly notes?: string;
319
- readonly color?: Color$1;
320
- readonly line?: RelationshipLineType;
321
- readonly head?: RelationshipArrowType;
322
- readonly tail?: RelationshipArrowType;
323
- readonly isBackward?: boolean;
324
- readonly navigateTo?: ViewId;
325
- __parallel?: never;
326
- }
327
- interface DynamicViewParallelSteps$1 {
328
- readonly __parallel: DynamicViewStep$1[];
329
- }
330
- type DynamicViewStepOrParallel = DynamicViewStep$1 | DynamicViewParallelSteps$1;
331
- type DynamicViewIncludeRule = {
332
- include: ElementPredicateExpression[];
333
- };
334
- type DynamicViewRule$1 = DynamicViewIncludeRule | ViewRuleGlobalPredicateRef$1 | ViewRuleStyle$1 | ViewRuleGlobalStyle$1 | ViewRuleAutoLayout$1;
335
- interface DynamicView$1<ViewIDs extends string = string, Tags extends string = string> extends BasicView<'dynamic', ViewIDs, Tags> {
336
- readonly __: 'dynamic';
337
- readonly steps: DynamicViewStepOrParallel[];
338
- readonly rules: DynamicViewRule$1[];
339
- }
340
- type CustomColorDefinitions = {
341
- [key: string]: ThemeColorValues;
342
- };
343
- type DeploymentViewRulePredicate$1 = {
344
- include: DeploymentExpression$1[];
345
- exclude?: never;
346
- } | {
347
- include?: never;
348
- exclude: DeploymentExpression$1[];
349
- };
350
- type DeploymentViewRuleStyle$1 = {
351
- targets: DeploymentExpression$1[];
352
- notation?: string;
353
- style: ElementStyle & {
354
- color?: Color$1;
355
- shape?: ElementShape$1;
356
- icon?: IconUrl;
357
- };
358
- };
359
- type DeploymentViewRule$1 = DeploymentViewRulePredicate$1 | ViewRuleAutoLayout$1 | DeploymentViewRuleStyle$1;
360
- interface DeploymentView$1<ViewIDs extends string = string, Tags extends string = string> extends BasicView<'deployment', ViewIDs, Tags> {
361
- readonly __: 'deployment';
362
- readonly rules: DeploymentViewRule$1[];
363
- }
364
- type LikeC4View$1<ViewIDs extends string = string, Tags extends string = string> = ElementView$1<ViewIDs, Tags> | DynamicView$1<ViewIDs, Tags> | DeploymentView$1<ViewIDs, Tags>;
365
- declare function isDeploymentView(view: LikeC4View$1): view is DeploymentView$1;
366
- declare function isDeploymentView<V extends {
367
- __?: string;
368
- }>(view: V): boolean;
369
- declare function isDynamicView(view: LikeC4View$1): view is DynamicView$1;
370
- declare function isElementView(view: LikeC4View$1): view is ElementView$1;
371
- type NodeId<IDs extends string = string> = Tagged<IDs, 'Fqn'>;
372
- type EdgeId = Tagged<string, 'EdgeId'>;
373
- type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
374
- type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
375
- declare function isStepEdgeId(id: string): id is StepEdgeId;
376
- declare function extractStep(id: EdgeId): number;
377
- interface ComputedNode {
378
- id: NodeId;
379
- kind: string;
380
- parent: NodeId | null;
381
- /**
382
- * Reference to model element
383
- * If 1 - node id is a reference
384
- */
385
- modelRef?: 1 | Fqn;
386
- /**
387
- * Reference to deployment element
388
- * If 1 - node id is a reference
389
- */
390
- deploymentRef?: 1 | Fqn;
391
- title: string;
392
- description: string | null;
393
- technology: string | null;
394
- notation?: string;
395
- tags: NonEmptyArray<Tag$1> | null;
396
- links: NonEmptyArray<Link> | null;
397
- children: NodeId[];
398
- inEdges: EdgeId[];
399
- outEdges: EdgeId[];
400
- shape: ElementShape$1;
401
- color: Color$1;
402
- /**
403
- * @deprecated Use `style` instead
404
- */
405
- icon?: IconUrl;
406
- style: ElementStyle;
407
- navigateTo?: ViewId;
408
- level: number;
409
- depth?: number;
410
- /**
411
- * If this node was customized in the view
412
- */
413
- isCustomized?: boolean;
414
- }
415
- declare namespace ComputedNode {
416
- function modelRef(node: ComputedNode): Fqn | null;
417
- function deploymentRef(node: ComputedNode): Fqn | null;
418
- /**
419
- * Nodes group is a special kind of node, exisiting only in view
420
- */
421
- function isNodesGroup(node: ComputedNode): boolean;
422
- }
423
- interface ComputedEdge {
424
- id: EdgeId;
425
- parent: NodeId | null;
426
- source: NodeId;
427
- target: NodeId;
428
- label: string | null;
429
- description?: string;
430
- technology?: string;
431
- relations: RelationId[];
432
- kind?: RelationshipKind$1;
433
- notation?: string;
434
- notes?: string;
435
- color?: Color$1;
436
- line?: RelationshipLineType;
437
- head?: RelationshipArrowType;
438
- tail?: RelationshipArrowType;
439
- tags?: NonEmptyArray<Tag$1>;
440
- navigateTo?: ViewId;
441
- /**
442
- * If this edge is derived from custom relationship predicate
443
- */
444
- isCustomized?: boolean;
445
- /**
446
- * For layouting purposes
447
- * @default 'forward'
448
- */
449
- dir?: 'forward' | 'back' | 'both';
450
- }
451
- interface ViewWithHash {
452
- /**
453
- * Hash of the view object.
454
- * This is used to detect changes in layout
455
- */
456
- hash: string;
457
- }
458
- interface ViewWithNotation {
459
- notation?: {
460
- elements: ElementNotation[];
461
- };
462
- }
463
- interface ViewAutoLayout {
464
- direction: ViewRuleAutoLayout$1['direction'];
465
- rankSep?: number;
466
- nodeSep?: number;
467
- }
468
- interface ComputedElementView<ViewIDs extends string = string, Tags extends string = string> extends Omit<ElementView$1<ViewIDs, Tags>, 'rules' | 'docUri'>, ViewWithHash, ViewWithNotation {
469
- readonly extends?: ViewId<ViewIDs>;
470
- readonly autoLayout: ViewAutoLayout;
471
- readonly nodes: ComputedNode[];
472
- readonly edges: ComputedEdge[];
473
- rules?: never;
474
- docUri?: never;
475
- }
476
- interface ComputedDynamicView<ViewIDs extends string = string, Tags extends string = string> extends Omit<DynamicView$1<ViewIDs, Tags>, 'rules' | 'steps' | 'docUri'>, ViewWithHash, ViewWithNotation {
477
- readonly autoLayout: ViewAutoLayout;
478
- readonly nodes: ComputedNode[];
479
- readonly edges: ComputedEdge[];
480
- steps?: never;
481
- rules?: never;
482
- docUri?: never;
483
- }
484
- interface ComputedDeploymentView<ViewIDs extends string = string, Tags extends string = string> extends Omit<DeploymentView$1<ViewIDs, Tags>, 'rules' | 'docUri'>, ViewWithHash, ViewWithNotation {
485
- readonly autoLayout: ViewAutoLayout;
486
- readonly nodes: ComputedNode[];
487
- readonly edges: ComputedEdge[];
488
- rules?: never;
489
- docUri?: never;
490
- }
491
- type ComputedView<ViewIDs extends string = string, Tags extends string = string> = ComputedElementView<ViewIDs, Tags> | ComputedDynamicView<ViewIDs, Tags> | ComputedDeploymentView<ViewIDs, Tags>;
492
- declare namespace ComputedView {
493
- function isDeployment(view: ComputedView): view is ComputedDeploymentView;
494
- function isDynamic(view: ComputedView): view is ComputedDynamicView;
495
- function isElement(view: ComputedView): view is ComputedElementView;
496
- }
497
- type BBox = {
498
- x: number;
499
- y: number;
500
- width: number;
501
- height: number;
502
- };
503
- interface DiagramNode extends ComputedNode {
504
- width: number;
505
- height: number;
506
- position: Point;
507
- labelBBox: BBox;
508
- }
509
- declare namespace DiagramNode {
510
- function modelRef(node: DiagramNode): Fqn | null;
511
- function deploymentRef(node: DiagramNode): Fqn | null;
512
- /**
513
- * Nodes group is a special kind of node, exisiting only in view
514
- */
515
- function isNodesGroup(node: DiagramNode): boolean;
516
- }
517
- interface DiagramEdge extends ComputedEdge {
518
- points: NonEmptyArray<Point>;
519
- controlPoints?: NonEmptyArray<XYPoint>;
520
- labelBBox?: BBox | null;
521
- dotpos?: string;
522
- }
523
- interface DiagramView<ViewIDs extends string = string, Tags extends string = string> extends Omit<ComputedView<ViewIDs, Tags>, 'nodes' | 'edges' | 'manualLayout'> {
524
- readonly nodes: DiagramNode[];
525
- readonly edges: DiagramEdge[];
526
- readonly bounds: BBox;
527
- /**
528
- * If diagram has manual layout
529
- * But was changed and layout should be recalculated
530
- */
531
- hasLayoutDrift?: boolean;
532
- manualLayout?: never;
533
- }
534
- type ViewManualLayout = {
535
- readonly hash: string;
536
- readonly x: number;
537
- readonly y: number;
538
- readonly width: number;
539
- readonly height: number;
540
- readonly autoLayout: ViewAutoLayout;
541
- readonly nodes: Record<string, {
542
- isCompound: boolean;
543
- x: number;
544
- y: number;
545
- width: number;
546
- height: number;
547
- }>;
548
- readonly edges: Record<string, {
549
- dotpos?: string;
550
- points: NonEmptyArray<Point>;
551
- controlPoints?: NonEmptyArray<XYPoint>;
552
- labelBBox?: BBox;
553
- }>;
554
- };
555
-
556
- type RelationId = Tagged<string, 'RelationID'>;
557
- type RelationshipKind$1<Kinds extends string = string> = Tagged<Kinds, 'RelationshipKind'>;
558
- type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
559
- type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
560
- interface Relation$1 {
561
- readonly id: RelationId;
562
- readonly source: Fqn;
563
- readonly target: Fqn;
564
- readonly title: string;
565
- readonly description?: string;
566
- readonly technology?: string;
567
- readonly tags?: NonEmptyArray<Tag$1>;
568
- readonly kind?: RelationshipKind$1;
569
- readonly color?: Color$1;
570
- readonly line?: RelationshipLineType;
571
- readonly head?: RelationshipArrowType;
572
- readonly tail?: RelationshipArrowType;
573
- readonly links?: NonEmptyArray<Link>;
574
- readonly navigateTo?: ViewId;
575
- readonly metadata?: {
576
- [key: string]: string;
577
- };
578
- }
579
- interface RelationshipKindSpecification {
580
- readonly technology?: string;
581
- readonly notation?: string;
582
- readonly color?: Color$1;
583
- readonly line?: RelationshipLineType;
584
- readonly head?: RelationshipArrowType;
585
- readonly tail?: RelationshipArrowType;
586
- }
587
-
588
- type DeploymentNodeKind$1<Kinds extends string = string> = Tagged<Kinds, 'DeploymentNodeKind'>;
589
- type PhysicalElementStyle = ElementStyle & {
590
- readonly icon?: IconUrl;
591
- readonly shape?: ElementShape$1;
592
- readonly color?: Color$1;
593
- };
594
- interface DeploymentNodeKindSpecification {
595
- readonly technology?: string;
596
- readonly notation?: string;
597
- readonly style: PhysicalElementStyle;
598
- }
599
- interface DeploymentNode$1 {
600
- readonly id: Fqn;
601
- readonly kind: DeploymentNodeKind$1;
602
- readonly title: string;
603
- readonly description?: string | null;
604
- readonly technology?: string | null;
605
- readonly tags?: NonEmptyArray<Tag$1> | null;
606
- readonly links?: NonEmptyArray<Link> | null;
607
- readonly style?: PhysicalElementStyle;
608
- readonly notation?: string;
609
- readonly metadata?: Record<string, string>;
610
- }
611
- interface DeployedInstance$1 {
612
- /**
613
- * Format: `<DeploymentNode Fqn>.<Instance Id>`
614
- * i.e parent fqn is deployment target
615
- */
616
- readonly id: Fqn;
617
- readonly element: Fqn;
618
- readonly title?: string;
619
- readonly description?: string | null;
620
- readonly technology?: string | null;
621
- readonly tags?: NonEmptyArray<Tag$1> | null;
622
- readonly links?: NonEmptyArray<Link> | null;
623
- readonly style?: PhysicalElementStyle;
624
- readonly notation?: string;
625
- readonly metadata?: Record<string, string>;
626
- }
627
- type DeploymentElement$1 = Simplify<MergeExclusive<DeploymentNode$1, DeployedInstance$1>>;
628
- declare namespace DeploymentElement$1 {
629
- const isDeploymentNode: (el: DeploymentElement$1) => el is DeploymentNode$1;
630
- const isInstance: (el: DeploymentElement$1) => el is DeployedInstance$1;
631
- }
632
- interface DeploymentRef$1 {
633
- readonly id: Fqn;
634
- readonly element?: Fqn;
635
- }
636
- /**
637
- * NOTE:
638
- */
639
- interface DeploymentRelation$1 {
640
- readonly id: RelationId;
641
- readonly source: DeploymentRef$1;
642
- readonly target: DeploymentRef$1;
643
- readonly title?: string;
644
- readonly tags?: NonEmptyArray<Tag$1> | null;
645
- readonly description?: string;
646
- readonly technology?: string;
647
- readonly kind?: RelationshipKind$1;
648
- readonly color?: Color$1;
649
- readonly line?: RelationshipLineType;
650
- readonly head?: RelationshipArrowType;
651
- readonly tail?: RelationshipArrowType;
652
- readonly links?: NonEmptyArray<Link> | null;
653
- readonly navigateTo?: ViewId;
654
- readonly metadata?: {
655
- [key: string]: string;
656
- };
657
- }
658
- type AllNever<Expressions> = UnionToIntersection<{
659
- [Name in keyof Expressions]: {
660
- -readonly [Key in keyof Expressions[Name]]?: never;
661
- };
662
- }[keyof Expressions]>;
663
- type ExclusiveUnion<Expressions> = Expressions extends object ? {
664
- [Name in keyof Expressions]: Simplify<Omit<AllNever<Expressions>, keyof Expressions[Name]> & Expressions[Name]>;
665
- }[keyof Expressions] : Expressions;
666
- declare namespace DeploymentRelationExpression$1 {
667
- type Direct = {
668
- source: DeploymentElementExpression$1;
669
- target: DeploymentElementExpression$1;
670
- isBidirectional?: boolean;
671
- };
672
- const isDirect: (expr: DeploymentExpression$1) => expr is Direct;
673
- type Incoming = {
674
- incoming: DeploymentElementExpression$1;
675
- };
676
- const isIncoming: (expr: DeploymentExpression$1) => expr is Incoming;
677
- type Outgoing = {
678
- outgoing: DeploymentElementExpression$1;
679
- };
680
- const isOutgoing: (expr: DeploymentExpression$1) => expr is Outgoing;
681
- type InOut = {
682
- inout: DeploymentElementExpression$1;
683
- };
684
- const isInOut: (expr: DeploymentExpression$1) => expr is InOut;
685
- }
686
- type DeploymentRelationExpression$1 = ExclusiveUnion<{
687
- Direct: DeploymentRelationExpression$1.Direct;
688
- Incoming: DeploymentRelationExpression$1.Incoming;
689
- Outgoing: DeploymentRelationExpression$1.Outgoing;
690
- InOut: DeploymentRelationExpression$1.InOut;
691
- }>;
692
- declare namespace DeploymentElementExpression$1 {
693
- type Ref = {
694
- ref: DeploymentRef$1;
695
- selector?: 'children' | 'expanded' | 'descendants';
696
- };
697
- const isRef: (expr: DeploymentExpression$1) => expr is Ref;
698
- type Wildcard = {
699
- wildcard: true;
700
- };
701
- const isWildcard: (expr: DeploymentExpression$1) => expr is Wildcard;
702
- }
703
- type DeploymentElementExpression$1 = ExclusiveUnion<{
704
- DeploymentRef: DeploymentElementExpression$1.Ref;
705
- Wildcard: DeploymentElementExpression$1.Wildcard;
706
- }>;
707
- type DeploymentExpression$1 = ExclusiveUnion<{
708
- Element: DeploymentElementExpression$1;
709
- Relation: DeploymentRelationExpression$1;
710
- }>;
711
- declare namespace DeploymentExpression$1 {
712
- type Element = DeploymentElementExpression$1;
713
- type Relation = DeploymentRelationExpression$1;
714
- const isElement: (expr: DeploymentExpression$1) => expr is DeploymentElementExpression$1;
715
- const isRelation: (expr: DeploymentExpression$1) => expr is DeploymentRelationExpression$1;
716
- }
717
-
718
- /**
719
- * Parsed elements, relations, and views.
720
- */
721
- interface ParsedLikeC4Model<ElementKinds extends string = string, RelationKinds extends string = string, Tags extends string = string, Fqns extends string = string, Views extends string = string, DeploymentFqns extends string = string> {
722
- specification: {
723
- tags: Tag$1<Tags>[];
724
- elements: Record<ElementKinds, ElementKindSpecification>;
725
- deployments: Record<DeploymentNodeKind$1, DeploymentNodeKindSpecification>;
726
- relationships: Record<RelationKinds, RelationshipKindSpecification>;
727
- };
728
- elements: Record<Fqns, TypedElement<Fqns, ElementKinds, Tags>>;
729
- relations: Record<RelationId, Relation$1>;
730
- globals: ModelGlobals;
731
- views: Record<Views, LikeC4View$1<Views, Tags>>;
732
- /**
733
- * Deployment Model.
734
- */
735
- deployments: {
736
- elements: Record<DeploymentFqns, DeploymentElement$1>;
737
- relations: Record<RelationId, DeploymentRelation$1>;
738
- };
739
- }
740
- /**
741
- * Hook to get types from dump
742
- */
743
- type ParsedLikeC4ModelDump = {
744
- elements: {
745
- [kind: string]: object;
746
- };
747
- deployments: {
748
- elements: {
749
- [kind: string]: object;
750
- };
751
- };
752
- views: {
753
- [kind: string]: object;
754
- };
755
- };
756
- interface AnyLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string, T = 'computed' | 'layouted'> extends Omit<ParsedLikeC4Model<string, string, Tags, Fqns, Views, DeploymentFqns>, 'views'> {
757
- __?: T;
758
- views: Record<Views, ComputedView | DiagramView>;
759
- }
760
- /**
761
- * Same as `ParsedLikeC4Model` but with computed views.
762
- */
763
- interface ComputedLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string> extends Omit<AnyLikeC4Model<Fqns, DeploymentFqns, Views, Tags, 'computed'>, 'views'> {
764
- views: Record<Views, ComputedView>;
765
- }
766
- /**
767
- * Same as `ParsedLikeC4Model` but with layouted views (DiagramView)
768
- */
769
- interface LayoutedLikeC4Model<Fqns extends string = string, DeploymentFqns extends string = string, Views extends string = string, Tags extends string = string> extends Omit<AnyLikeC4Model<Fqns, DeploymentFqns, Views, Tags, 'layouted'>, 'views'> {
770
- __: 'layouted';
771
- views: Record<Views, DiagramView<Views, Tags>>;
772
- }
773
-
774
- type IncomingFilter = 'all' | 'direct' | 'to-descendants';
775
- type OutgoingFilter = 'all' | 'direct' | 'from-descendants';
776
- type IteratorLike<T> = IteratorObject<T, BuiltinIteratorReturn>;
777
- type WithId<Id> = {
778
- id: Id;
779
- };
780
- type WithViews<Id extends string, ViewType> = {
781
- views: Record<Id, ViewType>;
782
- };
783
- type AnyAux = Aux<string, string, string, any>;
784
- /**
785
- * Auxilary type to keep track
786
- */
787
- interface Aux<Element extends string, Deployment extends string, Views extends string, ViewType> {
788
- Fqn: IsLiteral<Element> extends true ? Fqn<Element> : Fqn;
789
- Element: Element;
790
- ElementOrFqn: Element | WithId<this['Fqn']>;
791
- DeploymentFqn: IsLiteral<Deployment> extends true ? Fqn<Deployment> : Fqn;
792
- Deployment: Deployment;
793
- DeploymentOrFqn: Deployment | WithId<this['DeploymentFqn']>;
794
- ViewId: IsLiteral<Views> extends true ? ViewId<Views> : ViewId;
795
- ViewIdLiteral: Views;
796
- ViewType: ViewType;
797
- RelationId: RelationId;
798
- NodeId: NodeId;
799
- NodeIdLiteral: string;
800
- EdgeId: EdgeId;
801
- EdgeIdLiteral: string;
802
- NodeOrId: LiteralUnion<this['NodeIdLiteral'], string> | WithId<this['NodeId']>;
803
- EdgeOrId: LiteralUnion<this['EdgeIdLiteral'], string> | WithId<this['EdgeId']>;
804
- Model: Simplify<Omit<AnyLikeC4Model, 'views'> & WithViews<this['ViewId'], ViewType>>;
805
- }
806
- declare namespace Aux {
807
- type FromModel<M> = M extends AnyLikeC4Model ? Aux<KeysOf<M['elements']>, KeysOf<M['deployments']['elements']>, KeysOf<M['views']>, M extends LayoutedLikeC4Model ? DiagramView<ViewId<KeysOf<M['views']>>, string> : ComputedView<ViewId<KeysOf<M['views']>>, string>> : never;
808
- type FromDump<M> = M extends ParsedLikeC4ModelDump ? Aux<KeysOf<M['elements']>, KeysOf<M['deployments']['elements']>, KeysOf<M['views']>, DiagramView<ViewId<KeysOf<M['views']>>, string>> : never;
809
- }
810
-
811
- type RelationshipsIterator<M extends AnyAux> = IteratorLike<RelationshipModel<M>>;
812
- declare class RelationshipModel<M extends AnyAux> {
813
- readonly model: LikeC4Model<M>;
814
- readonly $relationship: Relation$1;
815
- readonly source: ElementModel<M>;
816
- readonly target: ElementModel<M>;
817
- /**
818
- * Common ancestor of the source and target elements.
819
- * Represents the boundary of the Relation.
820
- */
821
- readonly boundary: ElementModel<M> | null;
822
- constructor(model: LikeC4Model<M>, $relationship: Relation$1);
823
- get id(): M['RelationId'];
824
- get expression(): string;
825
- get title(): string | null;
826
- get technology(): string | null;
827
- get description(): string | null;
828
- get navigateTo(): LikeC4ViewModel<M> | null;
829
- get tags(): ReadonlyArray<Tag$1>;
830
- get links(): ReadonlyArray<Link>;
831
- /**
832
- * Iterate over all views that include this relationship.
833
- */
834
- views(): ViewsIterator<M>;
835
- }
836
-
837
- type ElementsIterator<M extends AnyAux> = IteratorLike<ElementModel<M>>;
838
- declare class ElementModel<M extends AnyAux> {
839
- readonly model: LikeC4Model<M>;
840
- readonly $element: Element$1;
841
- constructor(model: LikeC4Model<M>, $element: Element$1);
842
- get id(): M['Fqn'];
843
- get kind(): ElementKind$1;
844
- get shape(): ElementShape$1;
845
- get color(): ThemeColor$1;
846
- get tags(): ReadonlyArray<Tag$1>;
847
- get title(): string;
848
- get description(): string | null;
849
- get technology(): string | null;
850
- get links(): ReadonlyArray<Link>;
851
- get parent(): ElementModel<M> | null;
852
- get defaultView(): LikeC4ViewModel<M> | null;
853
- /**
854
- * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
855
- * (from closest to root)
856
- */
857
- ancestors(): ElementsIterator<M>;
858
- /**
859
- * Returns the common ancestor of this element and another element.
860
- */
861
- commonAncestor(another: ElementModel<M>): ElementModel<M> | null;
862
- children(): ReadonlySet<ElementModel<M>>;
863
- /**
864
- * Get all descendant elements (i.e. children, children’s children, etc.)
865
- */
866
- descendants(): ElementsIterator<M>;
867
- /**
868
- * Get all sibling (i.e. same parent)
869
- */
870
- siblings(): ElementsIterator<M>;
871
- /**
872
- * Resolve siblings of the element and its ancestors
873
- * (from closest to root)
874
- */
875
- ascendingSiblings(): ElementsIterator<M>;
876
- incoming(filter?: IncomingFilter): RelationshipsIterator<M>;
877
- incomers(filter?: IncomingFilter): ElementsIterator<M>;
878
- outgoing(filter?: OutgoingFilter): RelationshipsIterator<M>;
879
- outgoers(filter?: OutgoingFilter): ElementsIterator<M>;
880
- protected cachedOutgoing: Set<RelationshipModel<M>> | null;
881
- protected cachedIncoming: Set<RelationshipModel<M>> | null;
882
- get allOutgoing(): ReadonlySet<RelationshipModel<M>>;
883
- get allIncoming(): ReadonlySet<RelationshipModel<M>>;
884
- /**
885
- * Iterate over all views that include this element.
886
- */
887
- views(): ViewsIterator<M>;
888
- /**
889
- * Iterate over all views that scope this element.
890
- * It is possible that element is not included in the view.
891
- */
892
- scopedViews(): ViewsIterator<M>;
893
- /**
894
- * @returns true if the element is deployed
895
- */
896
- isDeployed(): boolean;
897
- deployments(): DeployedInstancesIterator<M>;
898
- }
899
-
900
- type NodesIterator<M extends AnyAux, V extends ComputedView | DiagramView> = IteratorLike<NodeModel<M, V>>;
901
- declare namespace NodeModel {
902
- interface WithParent<M extends AnyAux, V extends ComputedView | DiagramView> extends NodeModel<M, V> {
903
- parent: NodeModel<M, V>;
904
- }
905
- interface WithElement<M extends AnyAux, V extends ComputedView | DiagramView> extends NodeModel<M, V> {
906
- kind: ElementKind$1;
907
- element: ElementModel<M>;
908
- }
909
- interface WithDeploymentElement<M extends AnyAux, V extends ComputedView | DiagramView> extends NodeModel<M, V> {
910
- kind: DeploymentNodeKind$1;
911
- deployment: DeploymentElementModel<M>;
912
- }
913
- interface WithDeployedInstance<M extends AnyAux, V extends ComputedView | DiagramView> extends NodeModel<M, V> {
914
- kind: 'instance';
915
- element: ElementModel<M>;
916
- deployment: DeployedInstanceModel<M>;
917
- }
918
- interface IsGroup<M extends AnyAux, V extends ComputedView | DiagramView> extends NodeModel<M, V> {
919
- kind: typeof ElementKind$1.Group;
920
- element: null;
921
- deployment: null;
922
- }
923
- }
924
- declare class NodeModel<M extends AnyAux, V extends ComputedView | DiagramView = M['ViewType']> {
925
- readonly $view: LikeC4ViewModel<M, V>;
926
- readonly $node: V['nodes'][number];
927
- constructor($view: LikeC4ViewModel<M, V>, $node: V['nodes'][number]);
928
- get id(): NodeId;
929
- get title(): string;
930
- get kind(): ElementKind$1 | DeploymentNodeKind$1 | typeof ElementKind$1.Group | 'instance';
931
- get description(): string | null;
932
- get technology(): string | null;
933
- get parent(): NodeModel<M, V> | null;
934
- get element(): ElementModel<M> | null;
935
- get deployment(): DeploymentElementModel<M> | null;
936
- get shape(): ElementShape$1;
937
- get color(): Color$1;
938
- get tags(): ReadonlyArray<Tag$1>;
939
- get links(): ReadonlyArray<Link>;
940
- get navigateTo(): LikeC4ViewModel<M> | null;
941
- /**
942
- * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
943
- * (from closest to root)
944
- */
945
- ancestors(): NodesIterator<M, V>;
946
- children(): NodesIterator<M, V>;
947
- sublings(): NodesIterator<M, V>;
948
- incoming(filter?: IncomingFilter): EdgesIterator<M, V>;
949
- incomers(filter?: IncomingFilter): NodesIterator<M, V>;
950
- outgoing(filter?: OutgoingFilter): EdgesIterator<M, V>;
951
- outgoers(filter?: OutgoingFilter): NodesIterator<M, V>;
952
- isDiagramNode(): this is NodeModel<M, DiagramView>;
953
- hasChildren(): boolean;
954
- hasParent(): this is NodeModel.WithParent<M, V>;
955
- /**
956
- * Check if this node references to logical model element.
957
- */
958
- hasElement(): this is NodeModel.WithElement<M, V>;
959
- /**
960
- * Check if this node references to deployment element (Node or Instance).
961
- */
962
- hasDeployment(): this is NodeModel.WithDeploymentElement<M, V>;
963
- /**
964
- * Check if this node references to deployed instance
965
- * Deployed instance always references to element and deployment element.
966
- */
967
- hasDeployedInstance(): this is NodeModel.WithDeployedInstance<M, V>;
968
- isGroup(): this is NodeModel.IsGroup<M, V>;
969
- }
970
-
971
- type EdgesIterator<M extends AnyAux, V extends ComputedView | DiagramView> = IteratorLike<EdgeModel<M, V>>;
972
- declare class EdgeModel<M extends AnyAux, V extends ComputedView | DiagramView = M['ViewType']> {
973
- readonly view: LikeC4ViewModel<M, V>;
974
- readonly $edge: V['edges'][number];
975
- readonly source: NodeModel<M, V>;
976
- readonly target: NodeModel<M, V>;
977
- constructor(view: LikeC4ViewModel<M, V>, $edge: V['edges'][number], source: NodeModel<M, V>, target: NodeModel<M, V>);
978
- get id(): M['EdgeId'];
979
- get parent(): NodeModel<M, V> | null;
980
- get label(): string | null;
981
- get description(): string | null;
982
- get technology(): string | null;
983
- hasParent(): this is EdgeModel.WithParent<M, V>;
984
- get tags(): ReadonlyArray<Tag$1>;
985
- get stepNumber(): number | null;
986
- get navigateTo(): LikeC4ViewModel<M> | null;
987
- isStep(): this is EdgeModel.StepEdge<M, ComputedDynamicView>;
988
- relationships(type: 'model'): IteratorLike<RelationshipModel<M>>;
989
- relationships(type: 'deployment'): IteratorLike<DeploymentRelationModel<M>>;
990
- relationships(type?: 'model' | 'deployment'): IteratorLike<LikeC4Model.AnyRelation<M>>;
991
- includesRelation(rel: M['RelationId']): boolean;
992
- }
993
- declare namespace EdgeModel {
994
- interface StepEdge<M extends AnyAux, V extends ComputedView | DiagramView> extends EdgeModel<M, V> {
995
- id: StepEdgeId;
996
- stepNumber: number;
997
- }
998
- interface WithParent<M extends AnyAux, V extends ComputedView | DiagramView> extends EdgeModel<M, V> {
999
- parent: NodeModel<M, V>;
1000
- }
1001
- }
1002
-
1003
- type ViewsIterator<M extends AnyAux> = IteratorLike<LikeC4ViewModel<M>>;
1004
- declare class LikeC4ViewModel<M extends AnyAux, V extends ComputedView | DiagramView = M['ViewType']> {
1005
- #private;
1006
- readonly $model: LikeC4Model<M>;
1007
- readonly $view: V;
1008
- constructor($model: LikeC4Model<M>, $view: V);
1009
- get __(): NonNullable<M['ViewType']['__']>;
1010
- get id(): M['ViewId'];
1011
- get title(): string | null;
1012
- get tags(): ReadonlyArray<Tag$1>;
1013
- get links(): ReadonlyArray<Link>;
1014
- get viewOf(): ElementModel<M> | null;
1015
- /**
1016
- * All tags from nodes and edges.
1017
- */
1018
- get includedTags(): ReadonlyArray<Tag$1>;
1019
- roots(): NodesIterator<M, V>;
1020
- /**
1021
- * Iterate over all nodes that have children.
1022
- */
1023
- compounds(): NodesIterator<M, V>;
1024
- /**
1025
- * Get node by id.
1026
- * @throws Error if node is not found.
1027
- */
1028
- node(node: M['NodeOrId']): NodeModel<M, V>;
1029
- /**
1030
- * Find node by id.
1031
- */
1032
- findNode(node: M['NodeOrId']): NodeModel<M, V> | null;
1033
- /**
1034
- * Iterate over all nodes.
1035
- */
1036
- nodes(): NodesIterator<M, V>;
1037
- /**
1038
- * Find edge by id.
1039
- * @param edge Edge or id
1040
- * @returns EdgeModel
1041
- */
1042
- edge(edge: M['EdgeOrId']): EdgeModel<M, V>;
1043
- findEdge(edge: M['EdgeOrId']): EdgeModel<M, V> | null;
1044
- /**
1045
- * Iterate over all edges.
1046
- */
1047
- edges(): EdgesIterator<M, V>;
1048
- /**
1049
- * Iterate over all edges.
1050
- */
1051
- edgesWithRelation(relation: M['RelationId']): EdgesIterator<M, V>;
1052
- /**
1053
- * Nodes that have references to elements from logical model.
1054
- */
1055
- elements(): IteratorLike<NodeModel.WithElement<M, V>>;
1056
- includesElement(elementId: M['Element']): boolean;
1057
- includesDeployment(deploymentId: M['Deployment']): boolean;
1058
- includesRelation(relationId: M['RelationId']): boolean;
1059
- /**
1060
- * Below are type guards.
1061
- */
1062
- isComputed(): this is LikeC4ViewModel<M, ComputedView>;
1063
- isDiagram(): this is LikeC4ViewModel<M, DiagramView>;
1064
- isElementView(): this is LikeC4ViewModel<M, ComputedElementView>;
1065
- isDeploymentView(): this is LikeC4ViewModel<M, ComputedDeploymentView>;
1066
- isDynamicView(): this is LikeC4ViewModel<M, ComputedDynamicView>;
1067
- }
1068
-
1069
- declare class LikeC4DeploymentModel<M extends AnyAux = AnyAux> {
1070
- #private;
1071
- readonly $model: LikeC4Model<M>;
1072
- readonly $deployments: AnyLikeC4Model['deployments'];
1073
- constructor($model: LikeC4Model<M>, $deployments: AnyLikeC4Model['deployments']);
1074
- element(el: M['DeploymentOrFqn']): DeploymentElementModel<M>;
1075
- findElement(el: M['Deployment']): DeploymentElementModel<M> | null;
1076
- node(el: M['DeploymentOrFqn']): DeploymentNodeModel<M>;
1077
- findNode(el: M['Deployment']): DeploymentNodeModel<M> | null;
1078
- instance(el: M['DeploymentOrFqn']): DeployedInstanceModel<M>;
1079
- findInstance(el: M['Deployment']): DeployedInstanceModel<M> | null;
1080
- /**
1081
- * Returns the root elements of the model.
1082
- */
1083
- roots(): DeploymentNodesIterator<M>;
1084
- /**
1085
- * Returns all elements in the model.
1086
- */
1087
- elements(): DeploymentElementsIterator<M>;
1088
- /**
1089
- * Returns all elements in the model.
1090
- */
1091
- nodes(): DeploymentNodesIterator<M>;
1092
- instances(): DeployedInstancesIterator<M>;
1093
- /**
1094
- * Iterate over all instances of the given logical element.
1095
- */
1096
- instancesOf(element: M['ElementOrFqn']): DeployedInstancesIterator<M>;
1097
- deploymentRef(ref: DeploymentRef$1): DeploymentElementModel<M> | NestedElementOfDeployedInstanceModel<M>;
1098
- /**
1099
- * Returns all relationships in the model.
1100
- */
1101
- relationships(): IteratorLike<DeploymentRelationModel<M>>;
1102
- /**
1103
- * Returns a specific relationship by its ID.
1104
- */
1105
- relationship(id: M['RelationId']): DeploymentRelationModel<M>;
1106
- findRelationship(id: LiteralUnion<M['RelationId'], string>): DeploymentRelationModel<M> | null;
1107
- /**
1108
- * Returns all deployment views in the model.
1109
- */
1110
- views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>>;
1111
- /**
1112
- * Returns the parent element of given element.
1113
- * @see ancestors
1114
- */
1115
- parent(element: M['DeploymentOrFqn']): DeploymentNodeModel<M> | null;
1116
- /**
1117
- * Get all children of the element (only direct children),
1118
- * @see descendants
1119
- */
1120
- children(element: M['DeploymentOrFqn']): ReadonlySet<DeploymentElementModel<M>>;
1121
- /**
1122
- * Get all sibling (i.e. same parent)
1123
- */
1124
- siblings(element: M['DeploymentOrFqn']): DeploymentElementsIterator<M>;
1125
- /**
1126
- * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
1127
- * (from closest to root)
1128
- */
1129
- ancestors(element: M['DeploymentOrFqn']): DeploymentNodesIterator<M>;
1130
- /**
1131
- * Get all descendant elements (i.e. children, children’s children, etc.)
1132
- */
1133
- descendants(element: M['DeploymentOrFqn']): DeploymentElementsIterator<M>;
1134
- /**
1135
- * Incoming relationships to the element and its descendants
1136
- * @see incomers
1137
- */
1138
- incoming(element: M['DeploymentOrFqn'], filter?: IncomingFilter): IteratorLike<DeploymentRelationModel<M>>;
1139
- /**
1140
- * Outgoing relationships from the element and its descendants
1141
- * @see outgoers
1142
- */
1143
- outgoing(element: M['DeploymentOrFqn'], filter?: OutgoingFilter): IteratorLike<DeploymentRelationModel<M>>;
1144
- private addElement;
1145
- private addRelation;
1146
- }
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.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 { Tagged, Writable, ValueOf, ConditionalPick } from 'type-fest';
1147
4
 
1148
- type DeploymentElementsIterator<M extends AnyAux> = IteratorLike<DeploymentElementModel<M>>;
1149
- type DeployedInstancesIterator<M extends AnyAux> = IteratorLike<DeployedInstanceModel<M>>;
1150
- type DeploymentNodesIterator<M extends AnyAux> = IteratorLike<DeploymentNodeModel<M>>;
1151
- declare abstract class DeploymentElementModel<M extends AnyAux = AnyAux> {
1152
- abstract readonly $model: LikeC4DeploymentModel<M>;
1153
- abstract readonly $node: DeploymentNode$1 | DeployedInstance$1;
1154
- get id(): M['DeploymentFqn'];
1155
- get style(): SetRequired<PhysicalElementStyle, 'shape' | 'color'>;
1156
- get shape(): ElementShape$1;
1157
- get color(): ThemeColor$1;
1158
- get tags(): ReadonlyArray<Tag$1>;
1159
- get title(): string;
1160
- get description(): string | null;
1161
- get technology(): string | null;
1162
- get parent(): DeploymentNodeModel<M> | null;
1163
- get links(): ReadonlyArray<Link>;
1164
- /**
1165
- * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
1166
- * (from closest to root)
1167
- */
1168
- ancestors(): DeploymentNodesIterator<M>;
1169
- /**
1170
- * Returns the common ancestor of this element and another element.
1171
- */
1172
- commonAncestor(another: DeploymentElementModel<M>): DeploymentNodeModel<M> | null;
1173
- /**
1174
- * Get all sibling (i.e. same parent)
1175
- */
1176
- siblings(): DeploymentElementsIterator<M>;
1177
- /**
1178
- * Check if the element is a sibling of another element
1179
- */
1180
- isSibling(other: DeploymentElementModel<M>): boolean;
1181
- /**
1182
- * Resolve siblings of the element and its ancestors
1183
- * (from closest to root)
1184
- */
1185
- ascendingSiblings(): DeploymentElementsIterator<M>;
1186
- incoming(filter?: IncomingFilter): IteratorLike<DeploymentRelationModel<M>>;
1187
- outgoing(filter?: OutgoingFilter): IteratorLike<DeploymentRelationModel<M>>;
1188
- incomers(filter?: IncomingFilter): IteratorLike<DeploymentRelationEndpoint<M>>;
1189
- outgoers(filter?: OutgoingFilter): IteratorLike<DeploymentRelationEndpoint<M>>;
1190
- /**
1191
- * Iterate over all views that include this deployment element.
1192
- */
1193
- views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>>;
1194
- isDeploymentNode(): this is DeploymentNodeModel<M>;
1195
- isInstance(): this is DeployedInstanceModel<M>;
1196
- abstract outgoingFromModel(): RelationshipsIterator<M>;
1197
- abstract incomingFromModel(): RelationshipsIterator<M>;
1198
- protected cachedOutgoing: RelationshipsAccum<M> | null;
1199
- protected cachedIncoming: RelationshipsAccum<M> | null;
1200
- get allOutgoing(): RelationshipsAccum<M>;
1201
- get allIncoming(): RelationshipsAccum<M>;
1202
- }
1203
- declare class DeploymentNodeModel<M extends AnyAux = AnyAux> extends DeploymentElementModel<M> {
1204
- readonly $model: LikeC4DeploymentModel<M>;
1205
- readonly $node: DeploymentNode$1;
1206
- constructor($model: LikeC4DeploymentModel<M>, $node: DeploymentNode$1);
1207
- get kind(): DeploymentNodeKind$1;
1208
- children(): ReadonlySet<DeploymentElementModel<M>>;
1209
- descendants(): DeploymentElementsIterator<M>;
1210
- isDeploymentNode(): this is DeploymentNodeModel<M>;
1211
- /**
1212
- * Iterate over all instances nested in this deployment node.
1213
- */
1214
- instances(): DeployedInstancesIterator<M>;
1215
- /**
1216
- * Returns deployed instance inside this deployment node
1217
- * if only there are no more instances
1218
- */
1219
- onlyOneInstance(): DeployedInstanceModel<M> | null;
1220
- /**
1221
- * Cached result of relationships from instances
1222
- */
1223
- private _relationshipsFromInstances;
1224
- private relationshipsFromInstances;
1225
- /**
1226
- * We return only relationships that are not already present in nested instances
1227
- */
1228
- outgoingFromModel(): RelationshipsIterator<M>;
1229
- /**
1230
- * We return only relationships that are not already present in nested instances
1231
- */
1232
- incomingFromModel(): RelationshipsIterator<M>;
1233
- }
1234
- declare class DeployedInstanceModel<M extends AnyAux = AnyAux> extends DeploymentElementModel<M> {
1235
- readonly $model: LikeC4DeploymentModel<M>;
1236
- readonly $instance: DeployedInstance$1;
1237
- readonly $element: ElementModel<M>;
1238
- constructor($model: LikeC4DeploymentModel<M>, $instance: DeployedInstance$1, $element: ElementModel<M>);
1239
- get parent(): DeploymentNodeModel<M>;
1240
- get $node(): DeployedInstance$1;
1241
- get style(): SetRequired<PhysicalElementStyle, 'shape' | 'color'>;
1242
- get shape(): ElementShape$1;
1243
- get color(): ThemeColor$1;
1244
- get tags(): ReadonlyArray<Tag$1>;
1245
- get title(): string;
1246
- get description(): string | null;
1247
- get technology(): string | null;
1248
- get links(): ReadonlyArray<Link>;
1249
- isInstance(): this is DeployedInstanceModel<M>;
1250
- outgoingFromModel(): RelationshipsIterator<M>;
1251
- incomingFromModel(): RelationshipsIterator<M>;
1252
- }
1253
- declare class NestedElementOfDeployedInstanceModel<M extends AnyAux> {
1254
- readonly instance: DeployedInstanceModel<M>;
1255
- readonly element: ElementModel<M>;
1256
- constructor(instance: DeployedInstanceModel<M>, element: ElementModel<M>);
1257
- get id(): M['DeploymentFqn'];
1258
- get style(): SetRequired<PhysicalElementStyle, 'shape' | 'color'>;
1259
- get shape(): ElementShape$1;
1260
- get color(): ThemeColor$1;
1261
- get title(): string;
1262
- get description(): string | null;
1263
- get technology(): string | null;
1264
- isDeploymentNode(): this is DeploymentNodeModel<M>;
1265
- isInstance(): this is DeployedInstanceModel<M>;
1266
- }
1267
- type DeploymentRelationEndpoint<M extends AnyAux> = DeploymentElementModel<M> | NestedElementOfDeployedInstanceModel<M>;
1268
- declare class DeploymentRelationModel<M extends AnyAux> {
1269
- readonly $model: LikeC4DeploymentModel<M>;
1270
- readonly $relationship: DeploymentRelation$1;
1271
- boundary: DeploymentNodeModel<M> | null;
1272
- source: DeploymentRelationEndpoint<M>;
1273
- target: DeploymentRelationEndpoint<M>;
1274
- constructor($model: LikeC4DeploymentModel<M>, $relationship: DeploymentRelation$1);
1275
- get id(): M['RelationId'];
1276
- get expression(): string;
1277
- get title(): string | null;
1278
- get technology(): string | null;
1279
- get description(): string | null;
1280
- get tags(): ReadonlyArray<Tag$1>;
1281
- get navigateTo(): LikeC4ViewModel<M> | null;
1282
- get links(): ReadonlyArray<Link>;
1283
- views(): IteratorLike<LikeC4ViewModel<M, ComputedDeploymentView>>;
1284
- }
1285
- declare class RelationshipsAccum<M extends AnyAux> {
1286
- readonly model: ReadonlySet<RelationshipModel<M>>;
1287
- readonly deployment: ReadonlySet<DeploymentRelationModel<M>>;
1288
- /**
1289
- * @param model relationships from logical model
1290
- * @param deployment relationships from deployment model
1291
- */
1292
- constructor(model: ReadonlySet<RelationshipModel<M>>, deployment: ReadonlySet<DeploymentRelationModel<M>>);
1293
- get isEmpty(): boolean;
1294
- get nonEmpty(): boolean;
1295
- get size(): number;
1296
- /**
1297
- * Returns new Accum containing all the elements which are both in this and otherAccum
1298
- */
1299
- intersect(otherAccum: RelationshipsAccum<M>): RelationshipsAccum<M>;
1300
- /**
1301
- * Returns new Accum containing all the elements which are both in this and otherAccum
1302
- */
1303
- difference(otherAccum: RelationshipsAccum<M>): RelationshipsAccum<M>;
1304
- /**
1305
- * Returns new Accum containing all the elements from both
1306
- */
1307
- union(otherAccum: RelationshipsAccum<M>): RelationshipsAccum<M>;
1308
- }
1309
-
1310
- declare class LikeC4Model<M extends AnyAux = LikeC4Model.Any> {
1311
- #private;
1312
- readonly $model: M['Model'];
1313
- /**
1314
- * Only available in compile time
1315
- */
1316
- readonly Aux: M;
1317
- readonly deployment: LikeC4DeploymentModel<M>;
1318
- static create<const M extends AnyLikeC4Model>(model: M): LikeC4Model<Aux.FromModel<M>>;
1319
- /**
1320
- * This method is supposed to be used only in dumps
1321
- */
1322
- static fromDump<const M extends ParsedLikeC4ModelDump>(dump: M): LikeC4Model<Aux.FromDump<M>>;
1323
- private constructor();
1324
- get type(): 'computed' | 'layouted';
1325
- element(el: M['ElementOrFqn']): ElementModel<M>;
1326
- findElement(el: LiteralUnion<M['Element'], string>): ElementModel<M> | null;
1327
- /**
1328
- * Returns the root elements of the model.
1329
- */
1330
- roots(): ElementsIterator<M>;
1331
- /**
1332
- * Returns all elements in the model.
1333
- */
1334
- elements(): ElementsIterator<M>;
1335
- /**
1336
- * Returns all relationships in the model.
1337
- */
1338
- relationships(): RelationshipsIterator<M>;
1339
- /**
1340
- * Returns a specific relationship by its ID.
1341
- * If the relationship is not found in the model, it will be searched in the deployment model.
1342
- * Search can be limited to the model or deployment model only.
1343
- */
1344
- relationship(id: M['RelationId'], type: 'model'): RelationshipModel<M>;
1345
- relationship(id: M['RelationId'], type: 'deployment'): DeploymentRelationModel<M>;
1346
- relationship(id: M['RelationId'], type?: 'model' | 'deployment'): RelationshipModel<M> | DeploymentRelationModel<M>;
1347
- findRelationship(id: LiteralUnion<M['RelationId'], string>, type: 'model'): RelationshipModel<M> | null;
1348
- findRelationship(id: LiteralUnion<M['RelationId'], string>, type: 'deployment'): DeploymentRelationModel<M> | null;
1349
- findRelationship(id: LiteralUnion<M['RelationId'], string>, type?: 'model' | 'deployment'): RelationshipModel<M> | DeploymentRelationModel<M> | null;
1350
- /**
1351
- * Returns all views in the model.
1352
- */
1353
- views(): MapIterator<LikeC4ViewModel<M, M["ViewType"]>>;
1354
- /**
1355
- * Returns a specific view by its ID.
1356
- */
1357
- view(viewId: M['ViewIdLiteral']): LikeC4ViewModel<M>;
1358
- findView(viewId: LiteralUnion<M['ViewId'], string>): LikeC4ViewModel<M>;
1359
- /**
1360
- * Returns the parent element of given element.
1361
- * @see ancestors
1362
- */
1363
- parent(element: M['ElementOrFqn']): ElementModel<M> | null;
1364
- /**
1365
- * Get all children of the element (only direct children),
1366
- * @see descendants
1367
- */
1368
- children(element: M['ElementOrFqn']): ReadonlySet<ElementModel<M>>;
1369
- /**
1370
- * Get all sibling (i.e. same parent)
1371
- */
1372
- siblings(element: M['ElementOrFqn']): ElementsIterator<M>;
1373
- /**
1374
- * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
1375
- * (from closest to root)
1376
- */
1377
- ancestors(element: M['ElementOrFqn']): ElementsIterator<M>;
1378
- /**
1379
- * Get all descendant elements (i.e. children, children’s children, etc.)
1380
- */
1381
- descendants(element: M['ElementOrFqn']): ElementsIterator<M>;
1382
- /**
1383
- * Incoming relationships to the element and its descendants
1384
- * @see incomers
1385
- */
1386
- incoming(element: M['ElementOrFqn'], filter?: IncomingFilter): RelationshipsIterator<M>;
1387
- /**
1388
- * Outgoing relationships from the element and its descendants
1389
- * @see outgoers
1390
- */
1391
- outgoing(element: M['ElementOrFqn'], filter?: OutgoingFilter): RelationshipsIterator<M>;
1392
- private addElement;
1393
- private addRelation;
1394
- }
1395
- declare namespace LikeC4Model {
1396
- type Any = Aux<string, string, string, ComputedView | DiagramView>;
1397
- type Element<M extends AnyAux = Any> = ElementModel<M>;
1398
- type Relation<M extends AnyAux = Any> = RelationshipModel<M>;
1399
- type AnyRelation<M extends AnyAux = Any> = RelationshipModel<M> | DeploymentRelationModel<M>;
1400
- type View<M extends AnyAux = Any, V extends ComputedView | DiagramView = M['ViewType']> = LikeC4ViewModel<M, V>;
1401
- type Node<M extends AnyAux = Any, V extends ComputedView | DiagramView = M['ViewType']> = NodeModel<M, V>;
1402
- type Edge<M extends AnyAux = Any, V extends ComputedView | DiagramView = M['ViewType']> = EdgeModel<M, V>;
1403
- type DeploymentModel<M extends AnyAux = AnyAux> = LikeC4DeploymentModel<M>;
1404
- type Deployment<M extends AnyAux = AnyAux> = DeploymentElementModel<M>;
1405
- type DeploymentNode<M extends AnyAux = AnyAux> = DeploymentNodeModel<M>;
1406
- type DeployedInstance<M extends AnyAux = AnyAux> = DeployedInstanceModel<M>;
1407
- type Typed<Elements extends string = string, Deployments extends string = string, Views extends string = string, ViewType = DiagramView<Views> | ComputedView<Views>> = Aux<Elements, Deployments, Views, ViewType>;
1408
- type Computed<Elements extends string = string, Deployments extends string = string, Views extends string = string> = LikeC4Model<Typed<Elements, Deployments, Views, ComputedView<Views>>>;
1409
- type Layouted<Elements extends string = string, Deployments extends string = string, Views extends string = string> = LikeC4Model<Typed<Elements, Deployments, Views, DiagramView<Views>>>;
1410
- }
1411
-
1412
- /**
1413
- * OverviewGraph is a graph representation of all views in a model
1414
- */
1415
- declare namespace OverviewGraph {
1416
- type Node = {
1417
- id: string;
1418
- type: 'folder' | 'file';
1419
- path: string;
1420
- label: string;
1421
- parentId: string | null;
1422
- position: XYPoint;
1423
- width: number;
1424
- height: number;
1425
- } | {
1426
- id: string;
1427
- type: 'view';
1428
- viewId: ViewId;
1429
- label: string;
1430
- parentId: string | null;
1431
- position: XYPoint;
1432
- width: number;
1433
- height: number;
1434
- };
1435
- /**
1436
- * Edge represents a navigational link from one view to another
1437
- */
1438
- type Edge = {
1439
- id: string;
1440
- source: string;
1441
- target: string;
1442
- points: NonEmptyArray<Point>;
1443
- };
1444
- }
1445
- interface OverviewGraph {
1446
- nodes: OverviewGraph.Node[];
1447
- edges: OverviewGraph.Edge[];
1448
- bounds: BBox;
1449
- }
1450
-
1451
- declare namespace ViewChange {
1452
- interface ChangeElementStyle {
1453
- op: 'change-element-style';
1454
- style: {
1455
- border?: BorderStyle;
1456
- opacity?: number;
1457
- shape?: ElementShape$1;
1458
- color?: ThemeColor$1;
1459
- };
1460
- targets: NonEmptyArray<Fqn>;
1461
- }
1462
- interface SaveManualLayout {
1463
- op: 'save-manual-layout';
1464
- layout: ViewManualLayout;
1465
- }
1466
- interface ChangeAutoLayout {
1467
- op: 'change-autolayout';
1468
- layout: {
1469
- direction: AutoLayoutDirection;
1470
- nodeSep?: number | null;
1471
- rankSep?: number | null;
1472
- };
1473
- }
1474
- }
1475
- type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
1476
-
1477
- type BuilderSpecification = {
1478
- elements: {
1479
- [kind: string]: Partial<ElementKindSpecification>;
1480
- };
1481
- relationships?: {
1482
- [kind: string]: Partial<RelationshipKindSpecification>;
1483
- };
1484
- deployments?: {
1485
- [kind: string]: Partial<DeploymentNodeKindSpecification>;
1486
- };
1487
- tags?: [string, ...string[]];
1488
- metadataKeys?: [string, ...string[]];
1489
- };
1490
- type Metadata<MetadataKey extends string> = IfNever<MetadataKey, never, Record<MetadataKey, string>>;
1491
- type NewElementProps<Tag, Metadata> = {
1492
- title?: string;
1493
- description?: string;
1494
- technology?: string;
1495
- tags?: IfNever<Tag, never, [Tag, ...Tag[]]>;
1496
- metadata?: Metadata;
1497
- icon?: string;
1498
- shape?: ElementShape$1;
1499
- color?: Color$1;
1500
- links?: Array<string | {
1501
- title?: string;
1502
- url: string;
1503
- }>;
1504
- style?: {
1505
- border?: BorderStyle;
1506
- opacity?: number;
1507
- };
1508
- };
1509
- type NewDeploymentNodeProps<Tag, Metadata> = {
1510
- title?: string;
1511
- description?: string;
1512
- technology?: string;
1513
- tags?: IfNever<Tag, never, [Tag, ...Tag[]]>;
1514
- metadata?: Metadata;
1515
- icon?: string;
1516
- shape?: ElementShape$1;
1517
- color?: Color$1;
1518
- links?: NonEmptyArray<string | {
1519
- title?: string;
1520
- url: string;
1521
- }>;
1522
- style?: {
1523
- border?: BorderStyle;
1524
- opacity?: number;
1525
- };
1526
- };
1527
- type NewViewProps<Tag> = {
1528
- title?: string;
1529
- description?: string;
1530
- tags?: IfNever<Tag, never, [Tag, ...Tag[]]>;
1531
- links?: Array<string | {
1532
- title?: string;
1533
- url: string;
1534
- }>;
1535
- };
1536
- type NewRelationProps<Kind, Tag, Metadata> = {
1537
- kind?: Kind;
1538
- title?: string;
1539
- description?: string;
1540
- technology?: string;
1541
- tags?: IfNever<Tag, never, [Tag, ...Tag[]]>;
1542
- metadata?: Metadata;
1543
- head?: RelationshipArrowType;
1544
- tail?: RelationshipArrowType;
1545
- line?: RelationshipLineType;
1546
- color?: Color$1;
1547
- links?: NonEmptyArray<string | {
1548
- title?: string;
1549
- url: string;
1550
- }>;
1551
- };
1552
- type Invalid<Message extends string> = Tagged<Message, 'Error'>;
1553
- /**
1554
- * When building nested objects
1555
- */
1556
- interface TypesNested<Parent extends string, ElementKind extends string, Fqn extends string, ViewId extends string, RelationshipKind extends string, Tag extends string, MetadataKey extends string, DeploymentKind extends string, DeploymentFqn extends string> extends Types<ElementKind, Fqn, ViewId, RelationshipKind, Tag, MetadataKey, DeploymentKind, DeploymentFqn> {
1557
- Parent: Parent;
1558
- }
1559
- type AnyTypes = Types<any, any, any, any, any, any, any, any>;
1560
- type AnyTypesNested = TypesNested<any, any, any, any, any, any, any, any, any>;
1561
- /**
1562
- * Auxilary type to keep track of the types in builder
1563
- */
1564
- interface Types<ElementKind extends string, Fqn extends string, ViewId extends string, RelationshipKind extends string, Tag extends string, MetadataKey extends string, DeploymentKind extends string, DeploymentFqn extends string> {
1565
- ElementKind: ElementKind;
1566
- Fqn: Fqn;
1567
- ViewId: ViewId;
1568
- RelationshipKind: RelationshipKind;
1569
- Tag: Tag;
1570
- MetadataKey: MetadataKey;
1571
- DeploymentKind: DeploymentKind;
1572
- DeploymentFqn: DeploymentFqn;
1573
- Tags: IfNever<Tag, never, [Tag, ...Tag[]]>;
1574
- NewElementProps: NewElementProps<Tag, Metadata<MetadataKey>>;
1575
- NewRelationshipProps: NewRelationProps<RelationshipKind, Tag, Metadata<MetadataKey>>;
1576
- NewViewProps: NewViewProps<Tag>;
1577
- NewDeploymentNodeProps: NewDeploymentNodeProps<Tag, Metadata<MetadataKey>>;
1578
- }
1579
- declare namespace Types {
1580
- type FromSpecification<Spec> = Spec extends BuilderSpecification ? Types<KeysOf<Spec['elements']>, never, never, KeysOf<Spec['relationships']>, TupleToUnion<Spec['tags']>, TupleToUnion<Spec['metadataKeys']>, KeysOf<Spec['deployments']>, never> : never;
1581
- type AddFqn<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any, any, any> ? TypesNested<P, T['ElementKind'], `${P}.${Id}` | T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : T extends AnyTypes ? Types<T['ElementKind'], Id | T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : never;
1582
- type AddDeploymentFqn<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any, any, any> ? TypesNested<P, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], `${P}.${Id}` | T['DeploymentFqn']> : T extends AnyTypes ? Types<T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], Id | T['DeploymentFqn']> : never;
1583
- type AddView<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any, any, any> ? TypesNested<P, T['ElementKind'], T['Fqn'], Id | T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : T extends AnyTypes ? Types<T['ElementKind'], T['Fqn'], Id | T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : never;
1584
- type ToParsedLikeC4Model<T> = T extends AnyTypes ? ParsedLikeC4Model<T['ElementKind'], T['RelationshipKind'], T['Tag'], T['Fqn'], T['ViewId']> : never;
1585
- }
1586
-
1587
- type ToNested$1<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any, any, infer F> ? TypesNested<`${P}.${Id}`, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], `${P}.${Id}` | F> : T extends AnyTypes ? TypesNested<Id, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], Id | T['DeploymentFqn']> : never;
1588
- type FromNested$1<T extends AnyTypes, N> = N extends TypesNested<any, any, any, any, any, any, any, any, infer F> ? T extends TypesNested<infer P, any, any, any, any, any, any, any, any> ? TypesNested<P, T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], F> : T extends AnyTypes ? Types<T['ElementKind'], T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], F> : never : never;
1589
- /**
1590
- * Chainable builder to create deployment node
1591
- */
1592
- interface AddDeploymentNode<Id extends string> {
1593
- <T extends AnyTypes>(builder: DeploymentModelBuilder<T>): DeploymentModelBuilder<Types.AddDeploymentFqn<T, Id>>;
1594
- with<T extends AnyTypes, A extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, A>>;
1595
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, B>>;
1596
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, C>>;
1597
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op4: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, D>>;
1598
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op4: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op5: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, E>>;
1599
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op4: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op5: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op6: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, F>>;
1600
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op4: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op5: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op6: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op7: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, G>>;
1601
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op4: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op5: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op6: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op7: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op8: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, H>>;
1602
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op4: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op5: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op6: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op7: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op8: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op9: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, I>>;
1603
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes>(op1: (input: DeploymentModelBuilder<ToNested$1<T, Id>>) => DeploymentModelBuilder<A>, op2: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op3: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op4: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op5: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op6: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op7: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op8: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op9: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op10: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>): (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<FromNested$1<T, J>>;
1604
- }
1605
-
1606
- interface DeploymentModelBuilder<T extends AnyTypes> {
1607
- addDeployment(node: DeploymentElement$1): Builder<T>;
1608
- addDeploymentRelation(rel: Omit<DeploymentRelation$1, 'id'>): Builder<T>;
1609
- /**
1610
- * Create a fully qualified name from an id (for nested models)
1611
- */
1612
- fqn(id: string): Fqn;
1613
- }
1614
- declare function deployment<A extends AnyTypes, B extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>): (input: Builder<A>) => Builder<B>;
1615
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>): (input: Builder<A>) => Builder<C>;
1616
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>): (input: Builder<A>) => Builder<D>;
1617
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>): (input: Builder<A>) => Builder<E>;
1618
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>): (input: Builder<A>) => Builder<F>;
1619
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>): (input: Builder<A>) => Builder<G>;
1620
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>): (input: Builder<A>) => Builder<H>;
1621
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>): (input: Builder<A>) => Builder<I>;
1622
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op9: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>): (input: Builder<A>) => Builder<J>;
1623
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op9: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>, op10: (input: DeploymentModelBuilder<J>) => DeploymentModelBuilder<K>): (input: Builder<A>) => Builder<K>;
1624
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op9: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>, op10: (input: DeploymentModelBuilder<J>) => DeploymentModelBuilder<K>, op11: (input: DeploymentModelBuilder<K>) => DeploymentModelBuilder<L>): (input: Builder<A>) => Builder<L>;
1625
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op9: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>, op10: (input: DeploymentModelBuilder<J>) => DeploymentModelBuilder<K>, op11: (input: DeploymentModelBuilder<K>) => DeploymentModelBuilder<L>, op12: (input: DeploymentModelBuilder<L>) => DeploymentModelBuilder<M>): (input: Builder<A>) => Builder<M>;
1626
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op9: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>, op10: (input: DeploymentModelBuilder<J>) => DeploymentModelBuilder<K>, op11: (input: DeploymentModelBuilder<K>) => DeploymentModelBuilder<L>, op12: (input: DeploymentModelBuilder<L>) => DeploymentModelBuilder<M>, op13: (input: DeploymentModelBuilder<M>) => DeploymentModelBuilder<N>): (input: Builder<A>) => Builder<N>;
1627
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes, O extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op9: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>, op10: (input: DeploymentModelBuilder<J>) => DeploymentModelBuilder<K>, op11: (input: DeploymentModelBuilder<K>) => DeploymentModelBuilder<L>, op12: (input: DeploymentModelBuilder<L>) => DeploymentModelBuilder<M>, op13: (input: DeploymentModelBuilder<M>) => DeploymentModelBuilder<N>, op14: (input: DeploymentModelBuilder<N>) => DeploymentModelBuilder<O>): (input: Builder<A>) => Builder<O>;
1628
- declare function deployment<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes, O extends AnyTypes, P extends AnyTypes>(op1: (input: DeploymentModelBuilder<A>) => DeploymentModelBuilder<B>, op2: (input: DeploymentModelBuilder<B>) => DeploymentModelBuilder<C>, op3: (input: DeploymentModelBuilder<C>) => DeploymentModelBuilder<D>, op4: (input: DeploymentModelBuilder<D>) => DeploymentModelBuilder<E>, op5: (input: DeploymentModelBuilder<E>) => DeploymentModelBuilder<F>, op6: (input: DeploymentModelBuilder<F>) => DeploymentModelBuilder<G>, op7: (input: DeploymentModelBuilder<G>) => DeploymentModelBuilder<H>, op8: (input: DeploymentModelBuilder<H>) => DeploymentModelBuilder<I>, op9: (input: DeploymentModelBuilder<I>) => DeploymentModelBuilder<J>, op10: (input: DeploymentModelBuilder<J>) => DeploymentModelBuilder<K>, op11: (input: DeploymentModelBuilder<K>) => DeploymentModelBuilder<L>, op12: (input: DeploymentModelBuilder<L>) => DeploymentModelBuilder<M>, op13: (input: DeploymentModelBuilder<M>) => DeploymentModelBuilder<N>, op14: (input: DeploymentModelBuilder<N>) => DeploymentModelBuilder<O>, op15: (input: DeploymentModelBuilder<O>) => DeploymentModelBuilder<P>): (input: Builder<A>) => Builder<P>;
1629
- type AddDeploymentRelation<Props = unknown> = <T extends AnyTypes, Source extends string & T['DeploymentFqn'], Target extends string & T['DeploymentFqn']>(source: Source, target: Target, titleOrProps?: string | Props) => (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<T>;
1630
- type AddDeployedInstance<Props = unknown> = <const Id extends string, T extends AnyTypes, To extends string & T['Fqn']>(id: Id, to: To, titleOrProps?: string | Props | undefined) => (builder: DeploymentModelBuilder<T>) => DeploymentModelBuilder<Types.AddDeploymentFqn<T, Id>>;
1631
- type AddDeploymentNodeHelper<T = unknown> = <const Id extends string>(id: Id, titleOrProps?: string | T) => AddDeploymentNode<Id>;
1632
- type AddDeploymentNodeHelpers<T extends AnyTypes> = T extends Types<any, any, any, any, any, any, infer Kinds extends string, any> ? {
1633
- [Kind in Kinds]: AddDeploymentNodeHelper<T['NewDeploymentNodeProps']>;
1634
- } : Invalid<'No Deployment Kinds'>;
1635
- type DeloymentModelHelpers<T extends AnyTypes> = AddDeploymentNodeHelpers<T> & {
1636
- instanceOf: AddDeployedInstance<T['NewDeploymentNodeProps']>;
1637
- rel: AddDeploymentRelation<T['NewRelationshipProps']>;
1638
- deployment: typeof deployment;
1639
- };
1640
-
1641
- type ToNested<T, Id extends string> = T extends TypesNested<infer P, any, infer F, any, any, any, any, any, any> ? TypesNested<`${P}.${Id}`, T['ElementKind'], `${P}.${Id}` | F, T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : T extends AnyTypes ? TypesNested<Id, T['ElementKind'], Id | T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : never;
1642
- type FromNested<T extends AnyTypes, N> = N extends TypesNested<any, any, infer F, any, any, any, any, any, any> ? T extends TypesNested<infer P, any, any, any, any, any, any, any, any> ? TypesNested<P, T['ElementKind'], F, T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : T extends AnyTypes ? Types<T['ElementKind'], F, T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey'], T['DeploymentKind'], T['DeploymentFqn']> : never : never;
1643
- /**
1644
- * Chainable builder to create element
1645
- */
1646
- interface AddElement<Id extends string> {
1647
- <T extends AnyTypes>(builder: ModelBuilder<T>): ModelBuilder<Types.AddFqn<T, Id>>;
1648
- with<T extends AnyTypes, A extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, A>>;
1649
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, B>>;
1650
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, C>>;
1651
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>, op4: (input: ModelBuilder<C>) => ModelBuilder<D>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, D>>;
1652
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>, op4: (input: ModelBuilder<C>) => ModelBuilder<D>, op5: (input: ModelBuilder<D>) => ModelBuilder<E>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, E>>;
1653
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>, op4: (input: ModelBuilder<C>) => ModelBuilder<D>, op5: (input: ModelBuilder<D>) => ModelBuilder<E>, op6: (input: ModelBuilder<E>) => ModelBuilder<F>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, F>>;
1654
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>, op4: (input: ModelBuilder<C>) => ModelBuilder<D>, op5: (input: ModelBuilder<D>) => ModelBuilder<E>, op6: (input: ModelBuilder<E>) => ModelBuilder<F>, op7: (input: ModelBuilder<F>) => ModelBuilder<G>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, G>>;
1655
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>, op4: (input: ModelBuilder<C>) => ModelBuilder<D>, op5: (input: ModelBuilder<D>) => ModelBuilder<E>, op6: (input: ModelBuilder<E>) => ModelBuilder<F>, op7: (input: ModelBuilder<F>) => ModelBuilder<G>, op8: (input: ModelBuilder<G>) => ModelBuilder<H>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, H>>;
1656
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>, op4: (input: ModelBuilder<C>) => ModelBuilder<D>, op5: (input: ModelBuilder<D>) => ModelBuilder<E>, op6: (input: ModelBuilder<E>) => ModelBuilder<F>, op7: (input: ModelBuilder<F>) => ModelBuilder<G>, op8: (input: ModelBuilder<G>) => ModelBuilder<H>, op9: (input: ModelBuilder<H>) => ModelBuilder<I>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, I>>;
1657
- with<T extends AnyTypes, A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes>(op1: (input: ModelBuilder<ToNested<T, Id>>) => ModelBuilder<A>, op2: (input: ModelBuilder<A>) => ModelBuilder<B>, op3: (input: ModelBuilder<B>) => ModelBuilder<C>, op4: (input: ModelBuilder<C>) => ModelBuilder<D>, op5: (input: ModelBuilder<D>) => ModelBuilder<E>, op6: (input: ModelBuilder<E>) => ModelBuilder<F>, op7: (input: ModelBuilder<F>) => ModelBuilder<G>, op8: (input: ModelBuilder<G>) => ModelBuilder<H>, op9: (input: ModelBuilder<H>) => ModelBuilder<I>, op10: (input: ModelBuilder<I>) => ModelBuilder<J>): (builder: ModelBuilder<T>) => ModelBuilder<FromNested<T, J>>;
1658
- }
1659
-
1660
- interface ModelBuilder<T extends AnyTypes> {
1661
- addElement(element: Element$1): Builder<T>;
1662
- addRelation(relation: Omit<Relation$1, 'id'>): Builder<T>;
1663
- /**
1664
- * Create a fully qualified name from an id (for nested models)
1665
- */
1666
- fqn(id: string): Fqn;
1667
- addSourcelessRelation(relation: Omit<Relation$1, 'id' | 'source'>): Builder<T>;
1668
- }
1669
- declare function model<A extends AnyTypes, B extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>): (input: Builder<A>) => Builder<B>;
1670
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>): (input: Builder<A>) => Builder<C>;
1671
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>): (input: Builder<A>) => Builder<D>;
1672
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>): (input: Builder<A>) => Builder<E>;
1673
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>): (input: Builder<A>) => Builder<F>;
1674
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>): (input: Builder<A>) => Builder<G>;
1675
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>): (input: Builder<A>) => Builder<H>;
1676
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>): (input: Builder<A>) => Builder<I>;
1677
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>, op9: (input: ModelBuilder<I>) => ModelBuilder<J>): (input: Builder<A>) => Builder<J>;
1678
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>, op9: (input: ModelBuilder<I>) => ModelBuilder<J>, op10: (input: ModelBuilder<J>) => ModelBuilder<K>): (input: Builder<A>) => Builder<K>;
1679
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>, op9: (input: ModelBuilder<I>) => ModelBuilder<J>, op10: (input: ModelBuilder<J>) => ModelBuilder<K>, op11: (input: ModelBuilder<K>) => ModelBuilder<L>): (input: Builder<A>) => Builder<L>;
1680
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>, op9: (input: ModelBuilder<I>) => ModelBuilder<J>, op10: (input: ModelBuilder<J>) => ModelBuilder<K>, op11: (input: ModelBuilder<K>) => ModelBuilder<L>, op12: (input: ModelBuilder<L>) => ModelBuilder<M>): (input: Builder<A>) => Builder<M>;
1681
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>, op9: (input: ModelBuilder<I>) => ModelBuilder<J>, op10: (input: ModelBuilder<J>) => ModelBuilder<K>, op11: (input: ModelBuilder<K>) => ModelBuilder<L>, op12: (input: ModelBuilder<L>) => ModelBuilder<M>, op13: (input: ModelBuilder<M>) => ModelBuilder<N>): (input: Builder<A>) => Builder<N>;
1682
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes, O extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>, op9: (input: ModelBuilder<I>) => ModelBuilder<J>, op10: (input: ModelBuilder<J>) => ModelBuilder<K>, op11: (input: ModelBuilder<K>) => ModelBuilder<L>, op12: (input: ModelBuilder<L>) => ModelBuilder<M>, op13: (input: ModelBuilder<M>) => ModelBuilder<N>, op14: (input: ModelBuilder<N>) => ModelBuilder<O>): (input: Builder<A>) => Builder<O>;
1683
- declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes, O extends AnyTypes, P extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>, op2: (input: ModelBuilder<B>) => ModelBuilder<C>, op3: (input: ModelBuilder<C>) => ModelBuilder<D>, op4: (input: ModelBuilder<D>) => ModelBuilder<E>, op5: (input: ModelBuilder<E>) => ModelBuilder<F>, op6: (input: ModelBuilder<F>) => ModelBuilder<G>, op7: (input: ModelBuilder<G>) => ModelBuilder<H>, op8: (input: ModelBuilder<H>) => ModelBuilder<I>, op9: (input: ModelBuilder<I>) => ModelBuilder<J>, op10: (input: ModelBuilder<J>) => ModelBuilder<K>, op11: (input: ModelBuilder<K>) => ModelBuilder<L>, op12: (input: ModelBuilder<L>) => ModelBuilder<M>, op13: (input: ModelBuilder<M>) => ModelBuilder<N>, op14: (input: ModelBuilder<N>) => ModelBuilder<O>, op15: (input: ModelBuilder<O>) => ModelBuilder<P>): (input: Builder<A>) => Builder<P>;
1684
- type RelationshipHelper<Props = unknown> = <T extends AnyTypes, From extends string & T['Fqn'], To extends string & T['Fqn']>(from: From, to: To, titleOrProps?: string | Props) => (builder: ModelBuilder<T>) => ModelBuilder<T>;
1685
- type NestedRelationshipHelper<Props = unknown> = <T extends AnyTypesNested, To extends string & T['Fqn']>(to: To, titleOrProps?: string | Props) => (builder: ModelBuilder<T>) => ModelBuilder<T>;
1686
- type AddElementHelper<T = unknown> = <const Id extends string>(id: Id, titleOrProps?: string | T) => AddElement<Id>;
1687
- type AddElementHelpers<T extends AnyTypes> = T extends Types<infer Kinds extends string, any, any, any, any, any, any, any> ? {
1688
- [Kind in Kinds]: AddElementHelper<T['NewElementProps']>;
1689
- } : Invalid<'No Element Kinds'>;
1690
- type ModelHelpers<T extends AnyTypes> = AddElementHelpers<T> & {
1691
- model: typeof model;
1692
- rel: RelationshipHelper<T['NewRelationshipProps']>;
1693
- relTo: NestedRelationshipHelper<T['NewRelationshipProps']>;
1694
- };
1695
-
1696
- interface ViewsBuilder<T extends AnyTypes> {
1697
- addView(view: LikeC4View$1): Builder<T>;
1698
- }
1699
- declare function views<A extends AnyTypes, B extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>): (input: Builder<A>) => Builder<B>;
1700
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>): (input: Builder<A>) => Builder<C>;
1701
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>): (input: Builder<A>) => Builder<D>;
1702
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>): (input: Builder<A>) => Builder<E>;
1703
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>): (input: Builder<A>) => Builder<F>;
1704
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>): (input: Builder<A>) => Builder<G>;
1705
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>): (input: Builder<A>) => Builder<H>;
1706
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>): (input: Builder<A>) => Builder<I>;
1707
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>, op9: (input: ViewsBuilder<I>) => ViewsBuilder<J>): (input: Builder<A>) => Builder<J>;
1708
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>, op9: (input: ViewsBuilder<I>) => ViewsBuilder<J>, op10: (input: ViewsBuilder<J>) => ViewsBuilder<K>): (input: Builder<A>) => Builder<K>;
1709
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>, op9: (input: ViewsBuilder<I>) => ViewsBuilder<J>, op10: (input: ViewsBuilder<J>) => ViewsBuilder<K>, op11: (input: ViewsBuilder<K>) => ViewsBuilder<L>): (input: Builder<A>) => Builder<L>;
1710
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>, op9: (input: ViewsBuilder<I>) => ViewsBuilder<J>, op10: (input: ViewsBuilder<J>) => ViewsBuilder<K>, op11: (input: ViewsBuilder<K>) => ViewsBuilder<L>, op12: (input: ViewsBuilder<L>) => ViewsBuilder<M>): (input: Builder<A>) => Builder<M>;
1711
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>, op9: (input: ViewsBuilder<I>) => ViewsBuilder<J>, op10: (input: ViewsBuilder<J>) => ViewsBuilder<K>, op11: (input: ViewsBuilder<K>) => ViewsBuilder<L>, op12: (input: ViewsBuilder<L>) => ViewsBuilder<M>, op13: (input: ViewsBuilder<M>) => ViewsBuilder<N>): (input: Builder<A>) => Builder<N>;
1712
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes, O extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>, op9: (input: ViewsBuilder<I>) => ViewsBuilder<J>, op10: (input: ViewsBuilder<J>) => ViewsBuilder<K>, op11: (input: ViewsBuilder<K>) => ViewsBuilder<L>, op12: (input: ViewsBuilder<L>) => ViewsBuilder<M>, op13: (input: ViewsBuilder<M>) => ViewsBuilder<N>, op14: (input: ViewsBuilder<N>) => ViewsBuilder<O>): (input: Builder<A>) => Builder<O>;
1713
- declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes, K extends AnyTypes, L extends AnyTypes, M extends AnyTypes, N extends AnyTypes, O extends AnyTypes, P extends AnyTypes>(op1: (input: ViewsBuilder<A>) => ViewsBuilder<B>, op2: (input: ViewsBuilder<B>) => ViewsBuilder<C>, op3: (input: ViewsBuilder<C>) => ViewsBuilder<D>, op4: (input: ViewsBuilder<D>) => ViewsBuilder<E>, op5: (input: ViewsBuilder<E>) => ViewsBuilder<F>, op6: (input: ViewsBuilder<F>) => ViewsBuilder<G>, op7: (input: ViewsBuilder<G>) => ViewsBuilder<H>, op8: (input: ViewsBuilder<H>) => ViewsBuilder<I>, op9: (input: ViewsBuilder<I>) => ViewsBuilder<J>, op10: (input: ViewsBuilder<J>) => ViewsBuilder<K>, op11: (input: ViewsBuilder<K>) => ViewsBuilder<L>, op12: (input: ViewsBuilder<L>) => ViewsBuilder<M>, op13: (input: ViewsBuilder<M>) => ViewsBuilder<N>, op14: (input: ViewsBuilder<N>) => ViewsBuilder<O>, op15: (input: ViewsBuilder<O>) => ViewsBuilder<P>): (input: Builder<A>) => Builder<P>;
1714
-
1715
- interface AViewBuilder<Types extends AnyTypes, Fqn extends string, TypedExpr, ElementExpr extends string = ViewPredicate.ElementExpr<Fqn>, Expr extends string = ViewPredicate.AllExpression<ElementExpr>> {
1716
- Types: Types;
1717
- ElementExpr: ElementExpr;
1718
- Expr: Expr;
1719
- TypedExpr: TypedExpr;
1720
- $expr(expr: Expr | TypedExpr): TypedExpr;
1721
- include(...exprs: Expr[]): this;
1722
- exclude(...exprs: Expr[]): this;
1723
- style(rule: ViewRuleStyle$1): this;
1724
- autoLayout(layout: AutoLayoutDirection): this;
1725
- }
1726
- interface ViewBuilder<T extends AnyTypes> extends AViewBuilder<T, T['Fqn'], Expression$1> {
1727
- $expr(expr: ViewPredicate.Expression<T> | Expression$1): TypedC4Expression<T>;
1728
- include(...exprs: Expression$1[]): this;
1729
- exclude(...exprs: Expression$1[]): this;
1730
- style(rule: ViewRuleStyle$1): this;
1731
- autoLayout(layout: AutoLayoutDirection): this;
1732
- }
1733
- interface DeploymentViewBuilder<T extends AnyTypes> extends AViewBuilder<T, T['DeploymentFqn'], DeploymentExpression$1> {
1734
- $expr(expr: ViewPredicate.DeploymentExpression<T> | DeploymentExpression$1): TypedDeploymentExpression<T>;
1735
- include(...exprs: DeploymentExpression$1[]): this;
1736
- exclude(...exprs: DeploymentExpression$1[]): this;
1737
- style(rule: ViewRuleStyle$1): this;
1738
- autoLayout(layout: AutoLayoutDirection): this;
1739
- }
1740
- declare namespace ViewPredicate {
1741
- type ElementExpr<Fqn extends string> = '*' | Fqn | `${Fqn}.*` | `${Fqn}._` | `${Fqn}.**`;
1742
- type AllExpression<ElementExpr extends string> = ElementExpr | `-> ${ElementExpr} ->` | `-> ${ElementExpr}` | `${ElementExpr} ->` | `${ElementExpr} ${'->' | '<->'} ${ElementExpr}`;
1743
- type Expression<T extends AnyTypes> = T extends Types<any, infer F extends string, any, any, any, any, any, any> ? AllExpression<ViewPredicate.ElementExpr<F>> : never;
1744
- type DeploymentExpression<T extends AnyTypes> = T extends Types<any, any, any, any, any, any, any, infer F extends string> ? AllExpression<ViewPredicate.ElementExpr<F>> : never;
1745
- type WhereTag<Tag extends string> = `tag ${'is' | 'is not'} #${Tag}`;
1746
- type WhereKind<Kind extends string> = `kind ${'is' | 'is not'} ${Kind}`;
1747
- type WhereEq<Types extends AnyTypes> = ViewPredicate.WhereTag<Types['Tag']> | ViewPredicate.WhereKind<Types['ElementKind']>;
1748
- type WhereOperator<Types extends AnyTypes> = ViewPredicate.WhereEq<Types> | {
1749
- and: NonEmptyArray<ViewPredicate.WhereOperator<Types>>;
1750
- or?: never;
1751
- not?: never;
1752
- } | {
1753
- or: NonEmptyArray<ViewPredicate.WhereOperator<Types>>;
1754
- and?: never;
1755
- not?: never;
1756
- } | {
1757
- not: ViewPredicate.WhereOperator<Types>;
1758
- and?: never;
1759
- or?: never;
1760
- };
1761
- type Custom<Types extends AnyTypes> = {
1762
- where?: ViewPredicate.WhereOperator<Types>;
1763
- with?: Simplify<Omit<CustomElementExpr['custom'] & CustomRelationExpr['customRelation'], 'expr' | 'relation' | 'navigateTo'> & {
1764
- navigateTo?: Types['ViewId'];
1765
- }>;
1766
- };
1767
- }
1768
- type Op<T> = (b: T) => T;
1769
- type DeploymentViewRuleBuilderOp<Types extends AnyTypes> = (b: DeploymentViewBuilder<Types>) => DeploymentViewBuilder<Types>;
1770
- interface AddViewHelper<Props = unknown> {
1771
- <const Id extends string, T extends AnyTypes>(id: Id, builder: (b: ViewBuilder<T>) => ViewBuilder<T>): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1772
- <const Id extends string, T extends AnyTypes>(id: Id, propsOrTitle: Props | string): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1773
- <const Id extends string, T extends AnyTypes>(id: Id, propsOrTitle: Props | string | undefined, builder: (b: ViewBuilder<T>) => ViewBuilder<T>): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1774
- }
1775
- interface AddViewOfHelper<Props = unknown> {
1776
- <const Id extends string, T extends AnyTypes, Of extends string & T['Fqn']>(id: Id, of: Of): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1777
- <const Id extends string, T extends AnyTypes, Of extends string & T['Fqn']>(id: Id, of: Of, builder: (b: ViewBuilder<T>) => ViewBuilder<T>): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1778
- <const Id extends string, T extends AnyTypes, Of extends string & T['Fqn']>(id: Id, of: Of, propsOrTitle: Props | string): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1779
- <const Id extends string, T extends AnyTypes, Of extends string & T['Fqn']>(id: Id, of: Of, propsOrTitle: Props | string | undefined, builder: (b: ViewBuilder<T>) => ViewBuilder<T>): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1780
- }
1781
- interface AddDeploymentViewHelper<Props = unknown> {
1782
- <const Id extends string, T extends AnyTypes>(id: Id, builder: DeploymentViewRuleBuilderOp<T>): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1783
- <const Id extends string, T extends AnyTypes>(id: Id, propsOrTitle: Props | string | undefined, builder: DeploymentViewRuleBuilderOp<T>): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
1784
- }
1785
- type TypedC4Expression<Types extends AnyTypes> = Tagged<Expression$1, 'typed', Types>;
1786
- type TypedDeploymentExpression<Types extends AnyTypes> = Tagged<DeploymentExpression$1, 'typed', Types>;
1787
- declare function $include<B extends AViewBuilder<AnyTypes, any, any>>(...args: [B['Expr']] | [B['Expr'], ViewPredicate.Custom<B['Types']>]): (b: B) => B;
1788
- declare function $exclude<B extends AViewBuilder<AnyTypes, any, any>>(...args: [B['Expr']] | [B['Expr'], ViewPredicate.Custom<B['Types']>]): (b: B) => B;
1789
- declare function $style<B extends AViewBuilder<AnyTypes, any, any>>(element: B['ElementExpr'] | NonEmptyArray<B['ElementExpr']>, { notation, ...style }: ViewRuleStyle$1['style'] & {
1790
- notation?: string;
1791
- }): (b: B) => B;
1792
- declare function $autoLayout<B extends AViewBuilder<AnyTypes, any, any>>(layout: AutoLayoutDirection): (b: B) => B;
1793
- declare function $rules<B extends AViewBuilder<AnyTypes, any, any>>(...rules: Op<B>[]): (b: B) => B;
1794
-
1795
- type ViewHelpers<T = unknown> = {
1796
- views: typeof views;
1797
- view: AddViewHelper<T>;
1798
- viewOf: AddViewOfHelper<T>;
1799
- deploymentView: AddDeploymentViewHelper<T>;
1800
- $include: typeof $include;
1801
- $exclude: typeof $exclude;
1802
- $style: typeof $style;
1803
- $rules: typeof $rules;
1804
- $autoLayout: typeof $autoLayout;
1805
- };
1806
-
1807
- interface Builder<T extends AnyTypes> {
1808
- /**
1809
- * Only available in compile time
1810
- */
1811
- readonly Types: T;
1812
- clone(): Builder<T>;
1813
- /**
1814
- * Builders for each element kind
1815
- */
1816
- helpers(): {
1817
- model: ModelHelpers<T>;
1818
- views: ViewHelpers<T['NewViewProps']>;
1819
- deployment: DeloymentModelHelpers<T>;
1820
- };
1821
- __model(): ModelBuilder<T>;
1822
- __views(): ViewsBuilder<T>;
1823
- __deployment(): DeploymentModelBuilder<T>;
1824
- /**
1825
- * Returns model as result of parsing only
1826
- * Model is not computed or layouted
1827
- */
1828
- build(): ParsedLikeC4Model<T['ElementKind'], T['RelationshipKind'], T['Tag'], T['Fqn'], T['ViewId'], T['DeploymentFqn']>;
1829
- /**
1830
- * Returns model with computed views
1831
- */
1832
- buildComputedModel(): LikeC4Model.Computed<T['Fqn'], T['DeploymentFqn'], T['ViewId']>;
1833
- with<A extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>): Builder<A>;
1834
- with<A extends AnyTypes, B extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>): Builder<B>;
1835
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>): Builder<C>;
1836
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>, op4: (input: Builder<C>) => Builder<D>): Builder<D>;
1837
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>, op4: (input: Builder<C>) => Builder<D>, op5: (input: Builder<D>) => Builder<E>): Builder<E>;
1838
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>, op4: (input: Builder<C>) => Builder<D>, op5: (input: Builder<D>) => Builder<E>, op6: (input: Builder<E>) => Builder<F>): Builder<F>;
1839
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>, op4: (input: Builder<C>) => Builder<D>, op5: (input: Builder<D>) => Builder<E>, op6: (input: Builder<E>) => Builder<F>, op7: (input: Builder<F>) => Builder<G>): Builder<G>;
1840
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>, op4: (input: Builder<C>) => Builder<D>, op5: (input: Builder<D>) => Builder<E>, op6: (input: Builder<E>) => Builder<F>, op7: (input: Builder<F>) => Builder<G>, op8: (input: Builder<G>) => Builder<H>): Builder<H>;
1841
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>, op4: (input: Builder<C>) => Builder<D>, op5: (input: Builder<D>) => Builder<E>, op6: (input: Builder<E>) => Builder<F>, op7: (input: Builder<F>) => Builder<G>, op8: (input: Builder<G>) => Builder<H>, op9: (input: Builder<H>) => Builder<I>): Builder<I>;
1842
- with<A extends AnyTypes, B extends AnyTypes, C extends AnyTypes, D extends AnyTypes, E extends AnyTypes, F extends AnyTypes, G extends AnyTypes, H extends AnyTypes, I extends AnyTypes, J extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>, op3: (input: Builder<B>) => Builder<C>, op4: (input: Builder<C>) => Builder<D>, op5: (input: Builder<D>) => Builder<E>, op6: (input: Builder<E>) => Builder<F>, op7: (input: Builder<F>) => Builder<G>, op8: (input: Builder<G>) => Builder<H>, op9: (input: Builder<H>) => Builder<I>, op10: (input: Builder<I>) => Builder<J>): Builder<J>;
1843
- }
1844
- declare namespace Builder {
1845
- function forSpecification<const Spec extends BuilderSpecification>(spec: Spec): {
1846
- builder: Builder<Types.FromSpecification<Spec>>;
1847
- model: ModelHelpers<Types.FromSpecification<Spec>>;
1848
- deployment: DeloymentModelHelpers<Types.FromSpecification<Spec>>;
1849
- views: ViewHelpers<Types.FromSpecification<Spec>['NewViewProps']>;
1850
- };
1851
- }
1852
-
1853
- declare const ElementColors: {
1854
- readonly primary: {
1855
- fill: "#3b82f6";
1856
- stroke: "#2563eb";
1857
- hiContrast: "#eff6ff";
1858
- loContrast: "#bfdbfe";
1859
- };
1860
- readonly blue: {
1861
- fill: "#3b82f6";
1862
- stroke: "#2563eb";
1863
- hiContrast: "#eff6ff";
1864
- loContrast: "#bfdbfe";
1865
- };
1866
- readonly secondary: {
1867
- fill: "#0284c7";
1868
- stroke: "#0369a1";
1869
- hiContrast: "#f0f9ff";
1870
- loContrast: "#B6ECF7";
1871
- };
1872
- readonly sky: {
1873
- fill: "#0284c7";
1874
- stroke: "#0369a1";
1875
- hiContrast: "#f0f9ff";
1876
- loContrast: "#B6ECF7";
1877
- };
1878
- readonly muted: {
1879
- fill: "#64748b";
1880
- stroke: "#475569";
1881
- hiContrast: "#f8fafc";
1882
- loContrast: "#cbd5e1";
1883
- };
1884
- readonly slate: {
1885
- fill: "#64748b";
1886
- stroke: "#475569";
1887
- hiContrast: "#f8fafc";
1888
- loContrast: "#cbd5e1";
1889
- };
1890
- readonly gray: {
1891
- readonly fill: "#737373";
1892
- readonly stroke: "#525252";
1893
- readonly hiContrast: "#fafafa";
1894
- readonly loContrast: "#d4d4d4";
1895
- };
1896
- readonly red: {
1897
- readonly fill: "#AC4D39";
1898
- readonly stroke: "#853A2D";
1899
- readonly hiContrast: "#FBD3CB";
1900
- readonly loContrast: "#f5b2a3";
1901
- };
1902
- readonly green: {
1903
- readonly fill: "#428a4f";
1904
- readonly stroke: "#2d5d39";
1905
- readonly hiContrast: "#f8fafc";
1906
- readonly loContrast: "#c2f0c2";
1907
- };
1908
- readonly amber: {
1909
- readonly fill: "#A35829";
1910
- readonly stroke: "#7E451D";
1911
- readonly hiContrast: "#FFE0C2";
1912
- readonly loContrast: "#f9b27c";
1913
- };
1914
- readonly indigo: {
1915
- readonly fill: "#6366f1";
1916
- readonly stroke: "#4f46e5";
1917
- readonly hiContrast: "#eef2ff";
1918
- readonly loContrast: "#c7d2fe";
1919
- };
1920
- };
1921
-
1922
- declare const RelationshipColors: {
1923
- amber: {
1924
- lineColor: "#b45309";
1925
- labelBgColor: "#78350f";
1926
- labelColor: "#FFE0C2";
1927
- };
1928
- blue: {
1929
- lineColor: "#3b82f6";
1930
- labelBgColor: "#172554";
1931
- labelColor: "#60a5fa";
1932
- };
1933
- gray: {
1934
- lineColor: "#6E6E6E";
1935
- labelBgColor: "#18191b";
1936
- labelColor: "#C6C6C6";
1937
- };
1938
- green: {
1939
- lineColor: "#15803d";
1940
- labelBgColor: "#052e16";
1941
- labelColor: "#22c55e";
1942
- };
1943
- indigo: {
1944
- lineColor: "#6366f1";
1945
- labelBgColor: "#1e1b4b";
1946
- labelColor: "#818cf8";
1947
- };
1948
- muted: {
1949
- lineColor: "#64748b";
1950
- labelBgColor: "#0f172a";
1951
- labelColor: "#cbd5e1";
1952
- };
1953
- primary: {
1954
- lineColor: "#3b82f6";
1955
- labelBgColor: "#172554";
1956
- labelColor: "#60a5fa";
1957
- };
1958
- red: {
1959
- lineColor: "#AC4D39";
1960
- labelBgColor: "#b91c1c";
1961
- labelColor: "#f5b2a3";
1962
- };
1963
- secondary: {
1964
- lineColor: "#0ea5e9";
1965
- labelBgColor: "#082f49";
1966
- labelColor: "#38bdf8";
1967
- };
1968
- sky: {
1969
- lineColor: "#0ea5e9";
1970
- labelBgColor: "#082f49";
1971
- labelColor: "#38bdf8";
1972
- };
1973
- slate: {
1974
- lineColor: "#64748b";
1975
- labelBgColor: "#0f172a";
1976
- labelColor: "#cbd5e1";
1977
- };
1978
- };
1979
-
1980
- declare const defaultTheme: {
1981
- elements: {
1982
- readonly primary: {
1983
- fill: "#3b82f6";
1984
- stroke: "#2563eb";
1985
- hiContrast: "#eff6ff";
1986
- loContrast: "#bfdbfe";
1987
- };
1988
- readonly blue: {
1989
- fill: "#3b82f6";
1990
- stroke: "#2563eb";
1991
- hiContrast: "#eff6ff";
1992
- loContrast: "#bfdbfe";
1993
- };
1994
- readonly secondary: {
1995
- fill: "#0284c7";
1996
- stroke: "#0369a1";
1997
- hiContrast: "#f0f9ff";
1998
- loContrast: "#B6ECF7";
1999
- };
2000
- readonly sky: {
2001
- fill: "#0284c7";
2002
- stroke: "#0369a1";
2003
- hiContrast: "#f0f9ff";
2004
- loContrast: "#B6ECF7";
2005
- };
2006
- readonly muted: {
2007
- fill: "#64748b";
2008
- stroke: "#475569";
2009
- hiContrast: "#f8fafc";
2010
- loContrast: "#cbd5e1";
2011
- };
2012
- readonly slate: {
2013
- fill: "#64748b";
2014
- stroke: "#475569";
2015
- hiContrast: "#f8fafc";
2016
- loContrast: "#cbd5e1";
2017
- };
2018
- readonly gray: {
2019
- readonly fill: "#737373";
2020
- readonly stroke: "#525252";
2021
- readonly hiContrast: "#fafafa";
2022
- readonly loContrast: "#d4d4d4";
2023
- };
2024
- readonly red: {
2025
- readonly fill: "#AC4D39";
2026
- readonly stroke: "#853A2D";
2027
- readonly hiContrast: "#FBD3CB";
2028
- readonly loContrast: "#f5b2a3";
2029
- };
2030
- readonly green: {
2031
- readonly fill: "#428a4f";
2032
- readonly stroke: "#2d5d39";
2033
- readonly hiContrast: "#f8fafc";
2034
- readonly loContrast: "#c2f0c2";
2035
- };
2036
- readonly amber: {
2037
- readonly fill: "#A35829";
2038
- readonly stroke: "#7E451D";
2039
- readonly hiContrast: "#FFE0C2";
2040
- readonly loContrast: "#f9b27c";
2041
- };
2042
- readonly indigo: {
2043
- readonly fill: "#6366f1";
2044
- readonly stroke: "#4f46e5";
2045
- readonly hiContrast: "#eef2ff";
2046
- readonly loContrast: "#c7d2fe";
2047
- };
2048
- };
2049
- relationships: {
2050
- amber: {
2051
- lineColor: "#b45309";
2052
- labelBgColor: "#78350f";
2053
- labelColor: "#FFE0C2";
2054
- };
2055
- blue: {
2056
- lineColor: "#3b82f6";
2057
- labelBgColor: "#172554";
2058
- labelColor: "#60a5fa";
2059
- };
2060
- gray: {
2061
- lineColor: "#6E6E6E";
2062
- labelBgColor: "#18191b";
2063
- labelColor: "#C6C6C6";
2064
- };
2065
- green: {
2066
- lineColor: "#15803d";
2067
- labelBgColor: "#052e16";
2068
- labelColor: "#22c55e";
2069
- };
2070
- indigo: {
2071
- lineColor: "#6366f1";
2072
- labelBgColor: "#1e1b4b";
2073
- labelColor: "#818cf8";
2074
- };
2075
- muted: {
2076
- lineColor: "#64748b";
2077
- labelBgColor: "#0f172a";
2078
- labelColor: "#cbd5e1";
2079
- };
2080
- primary: {
2081
- lineColor: "#3b82f6";
2082
- labelBgColor: "#172554";
2083
- labelColor: "#60a5fa";
2084
- };
2085
- red: {
2086
- lineColor: "#AC4D39";
2087
- labelBgColor: "#b91c1c";
2088
- labelColor: "#f5b2a3";
2089
- };
2090
- secondary: {
2091
- lineColor: "#0ea5e9";
2092
- labelBgColor: "#082f49";
2093
- labelColor: "#38bdf8";
2094
- };
2095
- sky: {
2096
- lineColor: "#0ea5e9";
2097
- labelBgColor: "#082f49";
2098
- labelColor: "#38bdf8";
2099
- };
2100
- slate: {
2101
- lineColor: "#64748b";
2102
- labelBgColor: "#0f172a";
2103
- labelColor: "#cbd5e1";
2104
- };
2105
- };
2106
- font: "Arial";
2107
- shadow: "#0a0a0a";
2108
- };
2109
-
2110
- declare function nonNullable<T>(value: T, message?: string): NonNullable<T>;
2111
5
  declare function invariant(condition: any, message?: string): asserts condition;
2112
- declare function nonexhaustive(value: never): never;
2113
- declare function parentFqn<E extends string>(fqn: E): E | null;
2114
- declare function nameFromFqn<E extends string>(fqn: E): string;
2115
- declare function isAncestor<E extends {
2116
- id: string;
2117
- }>(...args: [ancestor: string, another: string] | [ancestor: E, another: E]): boolean;
2118
- declare function isSameHierarchy<E extends string | {
2119
- id: Fqn;
2120
- }>(one: E, another: E): boolean;
2121
- declare function isDescendantOf<E extends {
2122
- id: Fqn;
2123
- }>(ancestors: E[]): (e: E) => boolean;
2124
- declare function commonAncestor<E extends string>(first: E, second: E): E;
2125
- /**
2126
- * Get all ancestor elements (i.e. parent, parent’s parent, etc.)
2127
- * going up from parent to the root
2128
- */
2129
- declare function ancestorsFqn<Id extends string>(fqn: Id): Id[];
2130
- /**
2131
- * Compares two fully qualified names (fqns) hierarchically based on their depth.
2132
- * From parent nodes to leaves
2133
- *
2134
- * @param {string} a - The first fqn to compare.
2135
- * @param {string} b - The second fqn to compare.
2136
- * @returns {number} - 0 if the fqns have the same depth.
2137
- * - Positive number if a is deeper than b.
2138
- * - Negative number if b is deeper than a.
2139
- */
2140
- declare function compareFqnHierarchically<T extends string = string>(a: T, b: T): -1 | 0 | 1;
2141
- declare function compareByFqnHierarchically<T extends {
2142
- id: string;
2143
- }>(a: T, b: T): 0 | 1 | -1;
2144
-
2145
- /**
2146
- * This should only be used for defining generics which extend any kind of JS
2147
- * array under the hood, this includes arrays *AND* tuples (of the form [x, y],
2148
- * and of the form [x, ...y[]], etc...), and their readonly equivalent. This
2149
- * allows us to be more inclusive to what functions can process.
2150
- *
2151
- * @example
2152
- * function map<T extends IterableContainer>(items: T) { ... }
2153
- *
2154
- * We would've named this `ArrayLike`, but that's already used by typescript...
2155
- * @see This was inspired by the type-definition of Promise.all (https://github.com/microsoft/TypeScript/blob/1df5717b120cddd325deab8b0f2b2c3eecaf2b01/src/lib/es2015.promise.d.ts#L21)
2156
- */
2157
- type IterableContainer<T = unknown> = ReadonlyArray<T> | readonly [];
2158
-
2159
- type ArraySetRequired<T extends IterableContainer, Min extends number, Iteration extends ReadonlyArray<unknown> = []> = number extends Min ? never : Iteration["length"] extends Min ? T : T extends readonly [] ? never : T extends [infer Head, ...infer Rest] ? [
2160
- Head,
2161
- ...ArraySetRequired<Rest, Min, [unknown, ...Iteration]>
2162
- ] : T extends readonly [infer Head, ...infer Rest] ? readonly [
2163
- Head,
2164
- ...ArraySetRequired<Rest, Min, [unknown, ...Iteration]>
2165
- ] : T extends Array<infer Item> ? [
2166
- Item,
2167
- ...ArraySetRequired<T, Min, [unknown, ...Iteration]>
2168
- ] : T extends ReadonlyArray<infer Item> ? readonly [
2169
- Item,
2170
- ...ArraySetRequired<T, Min, [unknown, ...Iteration]>
2171
- ] : never;
2172
- /**
2173
- * Checks if the given array has at least the defined number of elements. When
2174
- * the minimum used is a literal (e.g. `3`) the output is refined accordingly so
2175
- * that those indices are defined when accessing the array even when using
2176
- * typescript's 'noUncheckedIndexAccess'.
2177
- *
2178
- * @param data - The input array.
2179
- * @param minimum - The minimum number of elements the array must have.
2180
- * @returns True if the array's length is *at least* `minimum`. When `minimum`
2181
- * is a literal value, the output is narrowed to ensure the first items are
2182
- * guaranteed.
2183
- * @signature
2184
- * R.hasAtLeast(data, minimum)
2185
- * @example
2186
- * R.hasAtLeast([], 4); // => false
2187
- *
2188
- * const data: number[] = [1,2,3,4];
2189
- * R.hasAtLeast(data, 1); // => true
2190
- * data[0]; // 1, with type `number`
2191
- * @dataFirst
2192
- * @category Array
2193
- */
2194
- declare function hasAtLeast<T extends IterableContainer, N extends number>(data: IterableContainer | T, minimum: IsNumericLiteral<N> extends true ? N : never): data is ArraySetRequired<T, N>;
2195
- declare function hasAtLeast(data: IterableContainer, minimum: number): boolean;
2196
- /**
2197
- * Checks if the given array has at least the defined number of elements. When
2198
- * the minimum used is a literal (e.g. `3`) the output is refined accordingly so
2199
- * that those indices are defined when accessing the array even when using
2200
- * typescript's 'noUncheckedIndexAccess'.
2201
- *
2202
- * @param minimum - The minimum number of elements the array must have.
2203
- * @returns True if the array's length is *at least* `minimum`. When `minimum`
2204
- * is a literal value, the output is narrowed to ensure the first items are
2205
- * guaranteed.
2206
- * @signature
2207
- * R.hasAtLeast(minimum)(data)
2208
- * @example
2209
- * R.pipe([], R.hasAtLeast(4)); // => false
2210
- *
2211
- * const data = [[1,2], [3], [4,5]];
2212
- * R.pipe(
2213
- * data,
2214
- * R.filter(R.hasAtLeast(2)),
2215
- * R.map(([, second]) => second),
2216
- * ); // => [2,5], with type `number[]`
2217
- * @dataLast
2218
- * @category Array
2219
- */
2220
- declare function hasAtLeast<N extends number>(minimum: IsNumericLiteral<N> extends true ? N : never): <T extends IterableContainer>(data: IterableContainer | T) => data is ArraySetRequired<T, N>;
2221
- declare function hasAtLeast(minimum: number): (data: IterableContainer) => boolean;
2222
-
2223
- /**
2224
- * Compares two relations hierarchically.
2225
- * From the most general (implicit) to the most specific.
2226
- */
2227
- declare const compareRelations: <T extends {
2228
- source: string;
2229
- target: string;
2230
- }>(a: T, b: T) => 0 | 1 | -1;
2231
6
 
2232
7
  /**
2233
8
  * A tagging type for string properties that are actually document URIs.
@@ -5028,7 +2803,7 @@ type ParserMethod<ARGS extends unknown[], R> = (...args: ARGS) => R;
5028
2803
  * This is just a helper to avoid duplications in the Type Definitions
5029
2804
  * Of `CstParser` and `EmbeddedActionsParser`
5030
2805
  */
5031
- declare abstract class BaseParser$1 {
2806
+ declare abstract class BaseParser$2 {
5032
2807
  /**
5033
2808
  * This must be called at the end of a Parser constructor.
5034
2809
  * See: http://chevrotain.io/docs/tutorial/step2_parsing.html#under-the-hood
@@ -5903,7 +3678,7 @@ declare abstract class BaseParser$1 {
5903
3678
  * - https://chevrotain.io/docs/tutorial/step3_adding_actions_root.html#alternatives
5904
3679
  * - https://chevrotain.io/docs/tutorial/step3b_adding_actions_embedded.html#simple-example
5905
3680
  */
5906
- declare class EmbeddedActionsParser extends BaseParser$1 {
3681
+ declare class EmbeddedActionsParser extends BaseParser$2 {
5907
3682
  /**
5908
3683
  * Creates a Grammar Rule
5909
3684
  *
@@ -7693,7 +5468,7 @@ type RuleImpl = (args: Args) => any;
7693
5468
  * * AST parser: Based on a string, create an AST for the current grammar
7694
5469
  * * Completion parser: Based on a partial string, identify the current position of the input within the grammar
7695
5470
  */
7696
- interface BaseParser {
5471
+ interface BaseParser$1 {
7697
5472
  /**
7698
5473
  * Adds a new parser rule to the parser
7699
5474
  */
@@ -7753,7 +5528,7 @@ interface BaseParser {
7753
5528
  */
7754
5529
  getRuleStack(): number[];
7755
5530
  }
7756
- declare abstract class AbstractLangiumParser implements BaseParser {
5531
+ declare abstract class AbstractLangiumParser implements BaseParser$1 {
7757
5532
  protected readonly lexer: Lexer;
7758
5533
  protected readonly wrapper: ChevrotainWrapper;
7759
5534
  protected _unorderedGroups: Map<string, boolean[]>;
@@ -14054,11 +11829,69 @@ type LangiumDefaultSharedCoreServices = {
14054
11829
  readonly WorkspaceManager: WorkspaceManager;
14055
11830
  };
14056
11831
  };
14057
- /**
14058
- * The shared core services are a set of services that are used by every language within a Langium project (excluding LSP services)
14059
- * This is necessary to enable features like cross references across different languages.
14060
- */
14061
- type LangiumSharedCoreServices = LangiumDefaultSharedCoreServices & LangiumGeneratedSharedCoreServices;
11832
+ /**
11833
+ * The shared core services are a set of services that are used by every language within a Langium project (excluding LSP services)
11834
+ * This is necessary to enable features like cross references across different languages.
11835
+ */
11836
+ type LangiumSharedCoreServices = LangiumDefaultSharedCoreServices & LangiumGeneratedSharedCoreServices;
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
+ }
14062
11895
 
14063
11896
  interface WorkDoneProgressReporter {
14064
11897
  begin(title: string, percentage?: number, message?: string, cancellable?: boolean): void;
@@ -15928,7 +13761,7 @@ interface CompletionContext {
15928
13761
  offset: number;
15929
13762
  position: Position$2;
15930
13763
  }
15931
- interface CompletionProviderOptions {
13764
+ interface CompletionProviderOptions$1 {
15932
13765
  /**
15933
13766
  * Most tools trigger completion request automatically without explicitly requesting
15934
13767
  * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
@@ -15975,7 +13808,7 @@ interface CompletionProvider {
15975
13808
  *
15976
13809
  * If multiple languages return different options, they are merged before being sent to the language client.
15977
13810
  */
15978
- readonly completionOptions?: CompletionProviderOptions;
13811
+ readonly completionOptions?: CompletionProviderOptions$1;
15979
13812
  }
15980
13813
  declare class DefaultCompletionProvider implements CompletionProvider {
15981
13814
  protected readonly completionParser: LangiumCompletionParser;
@@ -15988,7 +13821,7 @@ declare class DefaultCompletionProvider implements CompletionProvider {
15988
13821
  protected readonly fuzzyMatcher: FuzzyMatcher;
15989
13822
  protected readonly grammarConfig: GrammarConfig;
15990
13823
  protected readonly astReflection: AstReflection;
15991
- readonly completionOptions?: CompletionProviderOptions;
13824
+ readonly completionOptions?: CompletionProviderOptions$1;
15992
13825
  constructor(services: LangiumServices);
15993
13826
  getCompletion(document: LangiumDocument, params: CompletionParams, _cancelToken?: CancellationToken): Promise<CompletionList | undefined>;
15994
13827
  /**
@@ -16048,9 +13881,11 @@ declare class DefaultCompletionProvider implements CompletionProvider {
16048
13881
  protected buildCompletionTextEdit(context: CompletionContext, label: string, newText: string): TextEdit$1 | undefined;
16049
13882
  }
16050
13883
 
16051
- interface ChangeViewRequestParams {
16052
- viewId: ViewId;
16053
- change: ViewChange;
13884
+ declare class LikeC4DocumentationProvider implements DocumentationProvider {
13885
+ private parser;
13886
+ private locator;
13887
+ constructor(services: LikeC4Services);
13888
+ getDocumentation(node: AstNode): string | undefined;
16054
13889
  }
16055
13890
 
16056
13891
  declare class LikeC4CodeLensProvider implements CodeLensProvider {
@@ -16060,9 +13895,7 @@ declare class LikeC4CodeLensProvider implements CodeLensProvider {
16060
13895
  }
16061
13896
 
16062
13897
  declare class LikeC4CompletionProvider extends DefaultCompletionProvider {
16063
- readonly completionOptions: {
16064
- triggerCharacters: string[];
16065
- };
13898
+ readonly completionOptions: CompletionProviderOptions;
16066
13899
  protected completionForKeyword(context: CompletionContext, keyword: Keyword, acceptor: CompletionAcceptor): MaybePromise<void>;
16067
13900
  }
16068
13901
 
@@ -16092,14 +13925,6 @@ type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOption
16092
13925
  type CustomColorValue = string;
16093
13926
  type DeploymentElement = DeployedInstance | DeploymentNode;
16094
13927
  declare const DeploymentElement = "DeploymentElement";
16095
- type DeploymentElementExpression = DeploymentRefExpression | WildcardExpression;
16096
- declare const DeploymentElementExpression = "DeploymentElementExpression";
16097
- type DeploymentExpression = DeploymentElementExpression | DeploymentRelationExpression;
16098
- declare const DeploymentExpression = "DeploymentExpression";
16099
- type DeploymentReferenceable = DeployedInstance | DeploymentNode | Element;
16100
- declare const DeploymentReferenceable = "DeploymentReferenceable";
16101
- type DeploymentRelationExpression = DirectedDeploymentRelationExpression | InOutDeploymentRelationExpression | IncomingDeploymentRelationExpression | OutgoingDeploymentRelationExpression;
16102
- declare const DeploymentRelationExpression = "DeploymentRelationExpression";
16103
13928
  type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
16104
13929
  declare const DeploymentViewRule = "DeploymentViewRule";
16105
13930
  type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
@@ -16113,10 +13938,14 @@ declare const ElementPredicateOrWhere = "ElementPredicateOrWhere";
16113
13938
  type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
16114
13939
  declare const ElementProperty = "ElementProperty";
16115
13940
  type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
16116
- type FqnReferenceable = DeploymentReferenceable | Element | ExtendElement;
13941
+ type ExpressionV2 = FqnExpr | RelationExpr;
13942
+ declare const ExpressionV2 = "ExpressionV2";
13943
+ type FqnExpr = FqnRefExpr | WildcardExpression;
13944
+ declare const FqnExpr = "FqnExpr";
13945
+ type FqnReferenceable = Element | ExtendElement | Referenceable;
16117
13946
  declare const FqnReferenceable = "FqnReferenceable";
16118
13947
  type IconId = string;
16119
- type Id = 'deployment' | 'element' | 'group' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
13948
+ type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
16120
13949
  type LikeC4View = DeploymentView | DynamicView | ElementView;
16121
13950
  declare const LikeC4View = "LikeC4View";
16122
13951
  type LineOptions = 'dashed' | 'dotted' | 'solid';
@@ -16124,6 +13953,10 @@ type MetadataProperty = MetadataBody;
16124
13953
  declare const MetadataProperty = "MetadataProperty";
16125
13954
  type Predicate = ElementPredicate | RelationPredicate;
16126
13955
  declare const Predicate = "Predicate";
13956
+ type Referenceable = DeployedInstance | DeploymentNode | Element;
13957
+ declare const Referenceable = "Referenceable";
13958
+ type RelationExpr = DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr;
13959
+ declare const RelationExpr = "RelationExpr";
16127
13960
  type RelationExpression = DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression;
16128
13961
  declare const RelationExpression = "RelationExpression";
16129
13962
  type RelationPredicate = RelationPredicateOrWhere | RelationPredicateWith;
@@ -16219,13 +14052,6 @@ interface DeployedInstanceBody extends AstNode {
16219
14052
  tags?: Tags;
16220
14053
  }
16221
14054
  declare const DeployedInstanceBody = "DeployedInstanceBody";
16222
- interface DeploymentExpressionIterator extends AstNode {
16223
- readonly $container: DeploymentExpressionIterator | DeploymentViewRuleStyle;
16224
- readonly $type: 'DeploymentExpressionIterator';
16225
- prev?: DeploymentExpressionIterator;
16226
- value: DeploymentElementExpression;
16227
- }
16228
- declare const DeploymentExpressionIterator = "DeploymentExpressionIterator";
16229
14055
  interface DeploymentNode extends AstNode {
16230
14056
  readonly $container: DeploymentNodeBody | ModelDeployments;
16231
14057
  readonly $type: 'DeploymentNode';
@@ -16249,28 +14075,14 @@ interface DeploymentNodeKind extends AstNode {
16249
14075
  name: Id;
16250
14076
  }
16251
14077
  declare const DeploymentNodeKind = "DeploymentNodeKind";
16252
- interface DeploymentRef extends AstNode {
16253
- readonly $container: DeploymentRef | DeploymentRefExpression | DeploymentRelation;
16254
- readonly $type: 'DeploymentRef';
16255
- parent?: DeploymentRef;
16256
- value: Reference<DeploymentReferenceable>;
16257
- }
16258
- declare const DeploymentRef = "DeploymentRef";
16259
- interface DeploymentRefExpression extends AstNode {
16260
- readonly $container: DeploymentExpressionIterator | DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression | IncomingDeploymentRelationExpression | OutgoingDeploymentRelationExpression;
16261
- readonly $type: 'DeploymentRefExpression';
16262
- ref: DeploymentRef;
16263
- selector?: string;
16264
- }
16265
- declare const DeploymentRefExpression = "DeploymentRefExpression";
16266
14078
  interface DeploymentRelation extends AstNode {
16267
14079
  readonly $container: DeploymentNodeBody | ModelDeployments;
16268
14080
  readonly $type: 'DeploymentRelation';
16269
14081
  body?: DeploymentRelationBody;
16270
14082
  kind?: Reference<RelationshipKind>;
16271
- source: DeploymentRef;
14083
+ source: FqnRef;
16272
14084
  tags?: Tags;
16273
- target: DeploymentRef;
14085
+ target: FqnRef;
16274
14086
  technology?: string;
16275
14087
  title?: string;
16276
14088
  }
@@ -16308,23 +14120,23 @@ interface DeploymentViewRulePredicateExpression extends AstNode {
16308
14120
  readonly $container: DeploymentViewRulePredicate | DeploymentViewRulePredicateExpression;
16309
14121
  readonly $type: 'DeploymentViewRulePredicateExpression';
16310
14122
  prev?: DeploymentViewRulePredicateExpression;
16311
- value: DeploymentExpression;
14123
+ value: ExpressionV2;
16312
14124
  }
16313
14125
  declare const DeploymentViewRulePredicateExpression = "DeploymentViewRulePredicateExpression";
16314
14126
  interface DeploymentViewRuleStyle extends AstNode {
16315
14127
  readonly $container: DeploymentViewBody;
16316
14128
  readonly $type: 'DeploymentViewRuleStyle';
16317
14129
  props: Array<NotationProperty | StyleProperty>;
16318
- target: DeploymentExpressionIterator;
14130
+ targets: FqnExpressions;
16319
14131
  }
16320
14132
  declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
16321
- interface DirectedDeploymentRelationExpression extends AstNode {
14133
+ interface DirectedRelationExpr extends AstNode {
16322
14134
  readonly $container: DeploymentViewRulePredicateExpression;
16323
- readonly $type: 'DirectedDeploymentRelationExpression';
16324
- source: OutgoingDeploymentRelationExpression;
16325
- target: DeploymentElementExpression;
14135
+ readonly $type: 'DirectedRelationExpr';
14136
+ source: OutgoingRelationExpr;
14137
+ target: FqnExpr;
16326
14138
  }
16327
- declare const DirectedDeploymentRelationExpression = "DirectedDeploymentRelationExpression";
14139
+ declare const DirectedRelationExpr = "DirectedRelationExpr";
16328
14140
  interface DirectedRelationExpression extends AstNode {
16329
14141
  readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
16330
14142
  readonly $type: 'DirectedRelationExpression';
@@ -16531,6 +14343,27 @@ interface FqnElementRef extends AstNode {
16531
14343
  parent?: FqnElementRef;
16532
14344
  }
16533
14345
  declare const FqnElementRef = "FqnElementRef";
14346
+ interface FqnExpressions extends AstNode {
14347
+ readonly $container: DeploymentViewRuleStyle | FqnExpressions;
14348
+ readonly $type: 'FqnExpressions';
14349
+ prev?: FqnExpressions;
14350
+ value: FqnExpr;
14351
+ }
14352
+ declare const FqnExpressions = "FqnExpressions";
14353
+ interface FqnRef extends AstNode {
14354
+ readonly $container: DeploymentRelation | FqnRef | FqnRefExpr;
14355
+ readonly $type: 'FqnRef';
14356
+ parent?: FqnRef;
14357
+ value: Reference<Referenceable>;
14358
+ }
14359
+ declare const FqnRef = "FqnRef";
14360
+ interface FqnRefExpr extends AstNode {
14361
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
14362
+ readonly $type: 'FqnRefExpr';
14363
+ ref: FqnRef;
14364
+ selector?: string;
14365
+ }
14366
+ declare const FqnRefExpr = "FqnRefExpr";
16534
14367
  interface GlobalDynamicPredicateGroup extends AstNode {
16535
14368
  readonly $container: Globals;
16536
14369
  readonly $type: 'GlobalDynamicPredicateGroup';
@@ -16588,24 +14421,24 @@ interface IncludePredicate extends AstNode {
16588
14421
  predicates: Predicates;
16589
14422
  }
16590
14423
  declare const IncludePredicate = "IncludePredicate";
16591
- interface IncomingDeploymentRelationExpression extends AstNode {
16592
- readonly $container: DeploymentViewRulePredicateExpression | InOutDeploymentRelationExpression;
16593
- readonly $type: 'IncomingDeploymentRelationExpression';
16594
- to: DeploymentElementExpression;
14424
+ interface IncomingRelationExpr extends AstNode {
14425
+ readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr;
14426
+ readonly $type: 'IncomingRelationExpr';
14427
+ to: FqnExpr;
16595
14428
  }
16596
- declare const IncomingDeploymentRelationExpression = "IncomingDeploymentRelationExpression";
14429
+ declare const IncomingRelationExpr = "IncomingRelationExpr";
16597
14430
  interface IncomingRelationExpression extends AstNode {
16598
14431
  readonly $container: InOutRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
16599
14432
  readonly $type: 'IncomingRelationExpression';
16600
14433
  to: ElementExpression;
16601
14434
  }
16602
14435
  declare const IncomingRelationExpression = "IncomingRelationExpression";
16603
- interface InOutDeploymentRelationExpression extends AstNode {
14436
+ interface InOutRelationExpr extends AstNode {
16604
14437
  readonly $container: DeploymentViewRulePredicateExpression;
16605
- readonly $type: 'InOutDeploymentRelationExpression';
16606
- inout: IncomingDeploymentRelationExpression;
14438
+ readonly $type: 'InOutRelationExpr';
14439
+ inout: IncomingRelationExpr;
16607
14440
  }
16608
- declare const InOutDeploymentRelationExpression = "InOutDeploymentRelationExpression";
14441
+ declare const InOutRelationExpr = "InOutRelationExpr";
16609
14442
  interface InOutRelationExpression extends AstNode {
16610
14443
  readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
16611
14444
  readonly $type: 'InOutRelationExpression';
@@ -16712,14 +14545,14 @@ interface OpacityProperty extends AstNode {
16712
14545
  value: string;
16713
14546
  }
16714
14547
  declare const OpacityProperty = "OpacityProperty";
16715
- interface OutgoingDeploymentRelationExpression extends AstNode {
16716
- readonly $container: DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression;
16717
- readonly $type: 'OutgoingDeploymentRelationExpression';
16718
- from: DeploymentElementExpression;
14548
+ interface OutgoingRelationExpr extends AstNode {
14549
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr;
14550
+ readonly $type: 'OutgoingRelationExpr';
14551
+ from: FqnExpr;
16719
14552
  isBidirectional: boolean;
16720
14553
  kind?: Reference<RelationshipKind>;
16721
14554
  }
16722
- declare const OutgoingDeploymentRelationExpression = "OutgoingDeploymentRelationExpression";
14555
+ declare const OutgoingRelationExpr = "OutgoingRelationExpr";
16723
14556
  interface OutgoingRelationExpression extends AstNode {
16724
14557
  readonly $container: DirectedRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
16725
14558
  readonly $type: 'OutgoingRelationExpression';
@@ -16975,7 +14808,7 @@ interface WhereRelationTag extends AstNode {
16975
14808
  }
16976
14809
  declare const WhereRelationTag = "WhereRelationTag";
16977
14810
  interface WildcardExpression extends AstNode {
16978
- readonly $container: DeploymentExpressionIterator | DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingDeploymentRelationExpression | IncomingRelationExpression | OutgoingDeploymentRelationExpression | OutgoingRelationExpression | Predicates;
14811
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | FqnExpressions | IncomingRelationExpr | IncomingRelationExpression | OutgoingRelationExpr | OutgoingRelationExpression | Predicates;
16979
14812
  readonly $type: 'WildcardExpression';
16980
14813
  isWildcard: boolean;
16981
14814
  }
@@ -16990,25 +14823,18 @@ type LikeC4AstType = {
16990
14823
  DeployedInstance: DeployedInstance;
16991
14824
  DeployedInstanceBody: DeployedInstanceBody;
16992
14825
  DeploymentElement: DeploymentElement;
16993
- DeploymentElementExpression: DeploymentElementExpression;
16994
- DeploymentExpression: DeploymentExpression;
16995
- DeploymentExpressionIterator: DeploymentExpressionIterator;
16996
14826
  DeploymentNode: DeploymentNode;
16997
14827
  DeploymentNodeBody: DeploymentNodeBody;
16998
14828
  DeploymentNodeKind: DeploymentNodeKind;
16999
- DeploymentRef: DeploymentRef;
17000
- DeploymentRefExpression: DeploymentRefExpression;
17001
- DeploymentReferenceable: DeploymentReferenceable;
17002
14829
  DeploymentRelation: DeploymentRelation;
17003
14830
  DeploymentRelationBody: DeploymentRelationBody;
17004
- DeploymentRelationExpression: DeploymentRelationExpression;
17005
14831
  DeploymentView: DeploymentView;
17006
14832
  DeploymentViewBody: DeploymentViewBody;
17007
14833
  DeploymentViewRule: DeploymentViewRule;
17008
14834
  DeploymentViewRulePredicate: DeploymentViewRulePredicate;
17009
14835
  DeploymentViewRulePredicateExpression: DeploymentViewRulePredicateExpression;
17010
14836
  DeploymentViewRuleStyle: DeploymentViewRuleStyle;
17011
- DirectedDeploymentRelationExpression: DirectedDeploymentRelationExpression;
14837
+ DirectedRelationExpr: DirectedRelationExpr;
17012
14838
  DirectedRelationExpression: DirectedRelationExpression;
17013
14839
  DynamicView: DynamicView;
17014
14840
  DynamicViewBody: DynamicViewBody;
@@ -17040,9 +14866,14 @@ type LikeC4AstType = {
17040
14866
  ElementViewRef: ElementViewRef;
17041
14867
  ExcludePredicate: ExcludePredicate;
17042
14868
  ExpandElementExpression: ExpandElementExpression;
14869
+ ExpressionV2: ExpressionV2;
17043
14870
  ExtendElement: ExtendElement;
17044
14871
  ExtendElementBody: ExtendElementBody;
17045
14872
  FqnElementRef: FqnElementRef;
14873
+ FqnExpr: FqnExpr;
14874
+ FqnExpressions: FqnExpressions;
14875
+ FqnRef: FqnRef;
14876
+ FqnRefExpr: FqnRefExpr;
17046
14877
  FqnReferenceable: FqnReferenceable;
17047
14878
  GlobalDynamicPredicateGroup: GlobalDynamicPredicateGroup;
17048
14879
  GlobalPredicateGroup: GlobalPredicateGroup;
@@ -17051,10 +14882,10 @@ type LikeC4AstType = {
17051
14882
  GlobalStyleId: GlobalStyleId;
17052
14883
  Globals: Globals;
17053
14884
  IconProperty: IconProperty;
17054
- InOutDeploymentRelationExpression: InOutDeploymentRelationExpression;
14885
+ InOutRelationExpr: InOutRelationExpr;
17055
14886
  InOutRelationExpression: InOutRelationExpression;
17056
14887
  IncludePredicate: IncludePredicate;
17057
- IncomingDeploymentRelationExpression: IncomingDeploymentRelationExpression;
14888
+ IncomingRelationExpr: IncomingRelationExpr;
17058
14889
  IncomingRelationExpression: IncomingRelationExpression;
17059
14890
  LibIcon: LibIcon;
17060
14891
  LikeC4Grammar: LikeC4Grammar;
@@ -17072,12 +14903,14 @@ type LikeC4AstType = {
17072
14903
  NotationProperty: NotationProperty;
17073
14904
  NotesProperty: NotesProperty;
17074
14905
  OpacityProperty: OpacityProperty;
17075
- OutgoingDeploymentRelationExpression: OutgoingDeploymentRelationExpression;
14906
+ OutgoingRelationExpr: OutgoingRelationExpr;
17076
14907
  OutgoingRelationExpression: OutgoingRelationExpression;
17077
14908
  Predicate: Predicate;
17078
14909
  Predicates: Predicates;
14910
+ Referenceable: Referenceable;
17079
14911
  Relation: Relation;
17080
14912
  RelationBody: RelationBody;
14913
+ RelationExpr: RelationExpr;
17081
14914
  RelationExpression: RelationExpression;
17082
14915
  RelationNavigateToProperty: RelationNavigateToProperty;
17083
14916
  RelationPredicate: RelationPredicate;
@@ -17130,6 +14963,17 @@ type LikeC4AstType = {
17130
14963
  WildcardExpression: WildcardExpression;
17131
14964
  };
17132
14965
 
14966
+ type Guard<N extends AstNode> = (n: AstNode) => n is N;
14967
+ type Guarded<G> = G extends Guard<infer N> ? N : never;
14968
+ 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;
14969
+ type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
14970
+ declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
14971
+ isValid: (n: ValidatableAstNode) => boolean;
14972
+ invalidNodes: WeakSet<object>;
14973
+ };
14974
+ type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
14975
+ type IsValidFn = ChecksFromDiagnostics['isValid'];
14976
+
17133
14977
  declare const idattr: unique symbol;
17134
14978
  declare module './generated/ast' {
17135
14979
  interface Element {
@@ -17220,7 +15064,7 @@ declare namespace ParsedAstDeployment {
17220
15064
  type ParsedAstDeploymentRelation = DeploymentRelation$1 & {
17221
15065
  astPath: string;
17222
15066
  };
17223
- type ParsedAstGlobals = ModelGlobals;
15067
+ type ParsedAstGlobals = Writable<ModelGlobals>;
17224
15068
  interface ParsedAstElementView {
17225
15069
  __: 'element';
17226
15070
  id: ViewId;
@@ -17283,51 +15127,8 @@ interface LikeC4DocumentProps {
17283
15127
  type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
17284
15128
  interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
17285
15129
  }
17286
- interface FqnIndexedDocument extends SetRequired<LikeC4LangiumDocument, 'c4fqnIndex'> {
17287
- }
17288
15130
  interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
17289
15131
  }
17290
- type Guard<N extends AstNode> = (n: AstNode) => n is N;
17291
- type Guarded<G> = G extends Guard<infer N> ? N : never;
17292
- declare const isValidatableAstNode: (n: AstNode) => n is ArrowProperty | SpecificationRelationshipKind | DynamicViewStep | RelationPredicateWith | DynamicViewParallelSteps | DynamicView | ExcludePredicate | IncludePredicate | GlobalPredicateGroup | ViewRuleGroup | ElementView | Globals | DeploymentNode | Relation | Element | ExtendElement | SpecificationRule | BorderProperty | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle | ElementPredicateWith | DynamicViewPredicateIterator | DynamicViewIncludePredicate | GlobalDynamicPredicateGroup | DeploymentView | SpecificationDeploymentNodeKind | SpecificationElementKind | DeployedInstance | GlobalStyleGroup | ColorProperty | SpecificationColor | DeploymentRefExpression | WildcardExpression | DirectedDeploymentRelationExpression | IncomingDeploymentRelationExpression | OutgoingDeploymentRelationExpression | DeploymentViewRulePredicate | InOutDeploymentRelationExpression | DirectedRelationExpression | ElementPredicateWhere | IncomingRelationExpression | OutgoingRelationExpression | RelationPredicateWhere | InOutRelationExpression | ViewRuleAutoLayout | DynamicViewGlobalPredicateRef | ViewRuleGlobalStyle | ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | ElementStringProperty | IconProperty | LinkProperty | MetadataBody | LineProperty | MetadataAttribute | NavigateToProperty | NotationProperty | NotesProperty | OpacityProperty | RelationStringProperty | ShapeProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | SpecificationTag | ViewStringProperty | Tags | ViewRuleGlobalPredicateRef;
17293
- type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
17294
- declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
17295
- isValid: (n: ValidatableAstNode) => boolean;
17296
- invalidNodes: WeakSet<object>;
17297
- };
17298
- type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
17299
-
17300
- declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
17301
- private services;
17302
- protected readonly nodeKindProvider: NodeKindProvider$1;
17303
- constructor(services: LikeC4Services);
17304
- getSymbols({ parseResult: { value: { specifications, models, views, likec4lib } } }: LikeC4LangiumDocument): MaybePromise<DocumentSymbol[]>;
17305
- protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
17306
- protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
17307
- protected getModelSymbol(astModel: Model): DocumentSymbol[];
17308
- protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
17309
- protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
17310
- protected getElementSymbol(astElement: Element): DocumentSymbol[];
17311
- protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
17312
- protected getKindSymbol(astKind: SpecificationElementKind | SpecificationRelationshipKind): DocumentSymbol | null;
17313
- protected getTagSymbol(astTag: SpecificationTag): DocumentSymbol | null;
17314
- protected getLibIconSymbol(astTag: LibIcon): DocumentSymbol | null;
17315
- protected getViewSymbol(astView: LikeC4View): DocumentSymbol[];
17316
- protected symbolKind(node: AstNode): SymbolKind;
17317
- }
17318
-
17319
- declare class LikeC4HoverProvider extends AstNodeHoverProvider {
17320
- private parser;
17321
- private locator;
17322
- constructor(services: LikeC4Services);
17323
- protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
17324
- }
17325
-
17326
- declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
17327
- protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
17328
- private highlightNameAndKind;
17329
- private highlightView;
17330
- }
17331
15132
 
17332
15133
  declare class LikeC4NameProvider extends DefaultNameProvider {
17333
15134
  protected services: LikeC4Services;
@@ -17363,8 +15164,8 @@ declare class LikeC4ScopeProvider extends DefaultScopeProvider {
17363
15164
  private scopeExtendElement;
17364
15165
  private scopeElementView;
17365
15166
  getScope(context: ReferenceInfo): Scope;
17366
- protected getScopeForDeploymentRef(container: DeploymentRef, context: ReferenceInfo): Scope;
17367
- protected computeScope(context: ReferenceInfo, referenceType?: string): Scope;
15167
+ protected getScopeForFqnRef(container: FqnRef, context: ReferenceInfo): any;
15168
+ protected computeScope(context: ReferenceInfo, referenceType?: any): any;
17368
15169
  }
17369
15170
 
17370
15171
  declare class DeploymentsIndex {
@@ -17381,9 +15182,12 @@ declare class DeploymentsIndex {
17381
15182
  */
17382
15183
  nested(node: DeploymentNode): Stream<DeploymentAstNodeDescription>;
17383
15184
  byFqn(fqnName: string): Stream<DeploymentAstNodeDescription>;
17384
- getFqnName(node: DeploymentElement): Fqn;
15185
+ getFqn(node: DeploymentElement): Fqn;
17385
15186
  createDocumentIndex(document: LikeC4LangiumDocument): DocumentDeploymentsIndex;
17386
15187
  }
15188
+ /**
15189
+ * Index of deployment elements in the document
15190
+ */
17387
15191
  declare class DocumentDeploymentsIndex {
17388
15192
  private _rootNodes;
17389
15193
  /**
@@ -17418,11 +15222,12 @@ declare class DocumentDeploymentsIndex {
17418
15222
  */
17419
15223
  unique(): readonly DeploymentAstNodeDescription[];
17420
15224
  }
15225
+
17421
15226
  declare class FqnIndex {
17422
15227
  private services;
17423
15228
  protected langiumDocuments: LangiumDocuments;
17424
15229
  constructor(services: LikeC4Services);
17425
- get documents(): Stream<FqnIndexedDocument>;
15230
+ get documents(): any;
17426
15231
  private entries;
17427
15232
  getFqn(el: Element): Fqn | null;
17428
15233
  byFqn(fqn: Fqn): Stream<AstNodeDescription>;
@@ -17433,7 +15238,7 @@ declare class FqnIndex {
17433
15238
  uniqueDescedants(parent: Fqn): Stream<AstNodeDescription>;
17434
15239
  }
17435
15240
 
17436
- type ModelParsedListener$1 = (docs: URI[]) => void;
15241
+ type ModelParsedListener = (docs: URI[]) => void;
17437
15242
  declare class LikeC4ModelBuilder {
17438
15243
  private services;
17439
15244
  private langiumDocuments;
@@ -17455,7 +15260,7 @@ declare class LikeC4ModelBuilder {
17455
15260
  unsafeSyncBuildComputedModel(model: ParsedLikeC4Model): ComputedLikeC4Model;
17456
15261
  buildComputedModel(cancelToken?: CancellationToken): Promise<ComputedLikeC4Model | null>;
17457
15262
  computeView(viewId: ViewId, cancelToken?: CancellationToken): Promise<ComputedView | null>;
17458
- onModelParsed(callback: ModelParsedListener$1): Disposable;
15263
+ onModelParsed(callback: ModelParsedListener): Disposable;
17459
15264
  private documents;
17460
15265
  private notifyListeners;
17461
15266
  }
@@ -17472,72 +15277,361 @@ declare class LikeC4ModelLocator {
17472
15277
  locateDeploymentElement(fqn: Fqn, _prop?: string): Location | null;
17473
15278
  locateRelation(relationId: RelationId): Location | null;
17474
15279
  locateViewAst(viewId: ViewId): {
17475
- doc: ParsedLikeC4LangiumDocument;
17476
- view: ParsedAstView;
15280
+ doc: any;
15281
+ view: any;
17477
15282
  viewAst: LikeC4View;
17478
- };
15283
+ } | null;
17479
15284
  locateView(viewId: ViewId): Location | null;
17480
15285
  }
17481
- type IsValidFn = ChecksFromDiagnostics['isValid'];
15286
+
15287
+ declare class BaseParser {
15288
+ readonly services: LikeC4Services;
15289
+ readonly doc: ParsedLikeC4LangiumDocument;
15290
+ isValid: IsValidFn;
15291
+ constructor(services: LikeC4Services, doc: ParsedLikeC4LangiumDocument);
15292
+ resolveFqn(node: FqnReferenceable): Fqn;
15293
+ getAstNodePath(node: AstNode): any;
15294
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15295
+ [key: string]: string;
15296
+ } | undefined;
15297
+ convertTags<E extends {
15298
+ tags?: Tags;
15299
+ }>(withTags?: E): any;
15300
+ parseTags<E extends {
15301
+ tags?: Tags;
15302
+ }>(withTags?: E): NonEmptyArray<Tag$1> | null;
15303
+ convertLinks(source?: LinkProperty['$container']): ParsedLink[] | undefined;
15304
+ parseLinks(source?: LinkProperty['$container']): ParsedLink[] | undefined;
15305
+ }
15306
+
15307
+ declare const DocumentParserFromMixins: {
15308
+ new (...args: any[]): {
15309
+ parseGlobals(): void;
15310
+ parseAndStoreGlobalPredicateGroupOrDynamic(astRule: GlobalPredicateGroup | GlobalDynamicPredicateGroup, id: invariant, c4Globals: ParsedAstGlobals): void;
15311
+ parseGlobalPredicateGroup(astRule: GlobalPredicateGroup): invariant[];
15312
+ parseGlobalDynamicPredicateGroup(astRule: GlobalDynamicPredicateGroup): invariant[];
15313
+ parseGlobalStyleOrGroup(astRule: GlobalStyle | GlobalStyleGroup): invariant[];
15314
+ parseViews(): void;
15315
+ parseElementView(astNode: ElementView, additionalStyles: invariant[]): ParsedAstElementView;
15316
+ parseViewRule(astRule: ViewRule): invariant;
15317
+ parseViewRulePredicate(astNode: ViewRulePredicate): invariant;
15318
+ parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): invariant;
15319
+ parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): invariant;
15320
+ parseViewRuleGroup(astNode: ViewRuleGroup): invariant;
15321
+ parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): invariant;
15322
+ parseRuleStyle(styleProperties: StyleProperty[], elementExpressionsIterator: ElementExpressionsIterator, notationProperty?: NotationProperty): invariant;
15323
+ parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): invariant;
15324
+ parseDynamicElementView(astNode: DynamicView, additionalStyles: invariant[]): ParsedAstDynamicView;
15325
+ parseDynamicViewRule(astRule: DynamicViewRule): invariant;
15326
+ parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): invariant;
15327
+ parseDynamicParallelSteps(node: DynamicViewParallelSteps): invariant;
15328
+ parseDynamicStep(node: DynamicViewStep): invariant;
15329
+ parsePredicate(astNode: Predicate): invariant;
15330
+ parseElementPredicate(astNode: ElementPredicate): invariant;
15331
+ parseElementExpressionsIterator(astNode: ElementExpressionsIterator): invariant[];
15332
+ parseElementExpression(astNode: ElementExpression): invariant;
15333
+ parseElementPredicateWhere(astNode: ElementPredicateWhere): invariant;
15334
+ parseElementPredicateWith(astNode: ElementPredicateWith): invariant;
15335
+ parseRelationPredicate(astNode: RelationPredicate): invariant;
15336
+ parseRelationPredicateWhere(astNode: RelationPredicateWhere): invariant;
15337
+ parseRelationPredicateWith(astNode: RelationPredicateWith, relation: invariant | invariant): invariant;
15338
+ parseRelationExpression(astNode: RelationExpression): invariant;
15339
+ isValid: IsValidFn;
15340
+ readonly services: LikeC4Services;
15341
+ readonly doc: ParsedLikeC4LangiumDocument;
15342
+ resolveFqn(node: FqnReferenceable): invariant;
15343
+ getAstNodePath(node: invariant): any;
15344
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15345
+ [key: string]: string;
15346
+ } | undefined;
15347
+ convertTags<E extends {
15348
+ tags?: Tags;
15349
+ }>(withTags?: E | undefined): any;
15350
+ parseTags<E extends {
15351
+ tags?: Tags;
15352
+ }>(withTags?: E): invariant<invariant> | null;
15353
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15354
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15355
+ parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
15356
+ parseDeploymentViewRule(astRule: DeploymentViewRule): invariant;
15357
+ parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): invariant;
15358
+ parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): invariant;
15359
+ parseFqnRef(astNode: FqnRef): invariant;
15360
+ parseFqnExpr(astNode: FqnExpr): invariant;
15361
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15362
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15363
+ parseRelationExpr(astNode: RelationExpr): invariant;
15364
+ parseDeployment(): void;
15365
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15366
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15367
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15368
+ };
15369
+ } & {
15370
+ new (...args: any[]): {
15371
+ parseViews(): void;
15372
+ parseElementView(astNode: ElementView, additionalStyles: invariant[]): ParsedAstElementView;
15373
+ parseViewRule(astRule: ViewRule): invariant;
15374
+ parseViewRulePredicate(astNode: ViewRulePredicate): invariant;
15375
+ parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): invariant;
15376
+ parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): invariant;
15377
+ parseViewRuleGroup(astNode: ViewRuleGroup): invariant;
15378
+ parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): invariant;
15379
+ parseRuleStyle(styleProperties: StyleProperty[], elementExpressionsIterator: ElementExpressionsIterator, notationProperty?: NotationProperty): invariant;
15380
+ parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): invariant;
15381
+ parseDynamicElementView(astNode: DynamicView, additionalStyles: invariant[]): ParsedAstDynamicView;
15382
+ parseDynamicViewRule(astRule: DynamicViewRule): invariant;
15383
+ parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): invariant;
15384
+ parseDynamicParallelSteps(node: DynamicViewParallelSteps): invariant;
15385
+ parseDynamicStep(node: DynamicViewStep): invariant;
15386
+ parsePredicate(astNode: Predicate): invariant;
15387
+ parseElementPredicate(astNode: ElementPredicate): invariant;
15388
+ parseElementExpressionsIterator(astNode: ElementExpressionsIterator): invariant[];
15389
+ parseElementExpression(astNode: ElementExpression): invariant;
15390
+ parseElementPredicateWhere(astNode: ElementPredicateWhere): invariant;
15391
+ parseElementPredicateWith(astNode: ElementPredicateWith): invariant;
15392
+ parseRelationPredicate(astNode: RelationPredicate): invariant;
15393
+ parseRelationPredicateWhere(astNode: RelationPredicateWhere): invariant;
15394
+ parseRelationPredicateWith(astNode: RelationPredicateWith, relation: invariant | invariant): invariant;
15395
+ parseRelationExpression(astNode: RelationExpression): invariant;
15396
+ isValid: IsValidFn;
15397
+ readonly services: LikeC4Services;
15398
+ readonly doc: ParsedLikeC4LangiumDocument;
15399
+ resolveFqn(node: FqnReferenceable): invariant;
15400
+ getAstNodePath(node: invariant): any;
15401
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15402
+ [key: string]: string;
15403
+ } | undefined;
15404
+ convertTags<E extends {
15405
+ tags?: Tags;
15406
+ }>(withTags?: E | undefined): any;
15407
+ parseTags<E extends {
15408
+ tags?: Tags;
15409
+ }>(withTags?: E): invariant<invariant> | null;
15410
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15411
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15412
+ parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
15413
+ parseDeploymentViewRule(astRule: DeploymentViewRule): invariant;
15414
+ parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): invariant;
15415
+ parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): invariant;
15416
+ parseFqnRef(astNode: FqnRef): invariant;
15417
+ parseFqnExpr(astNode: FqnExpr): invariant;
15418
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15419
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15420
+ parseRelationExpr(astNode: RelationExpr): invariant;
15421
+ parseDeployment(): void;
15422
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15423
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15424
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15425
+ };
15426
+ } & {
15427
+ new (...args: any[]): {
15428
+ parseSpecification(): void;
15429
+ parseSpecificationDeploymentNodeKind({ kind, props }: SpecificationDeploymentNodeKind): {};
15430
+ isValid: IsValidFn;
15431
+ readonly services: LikeC4Services;
15432
+ readonly doc: ParsedLikeC4LangiumDocument;
15433
+ resolveFqn(node: FqnReferenceable): invariant;
15434
+ getAstNodePath(node: invariant): any;
15435
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15436
+ [key: string]: string;
15437
+ } | undefined;
15438
+ convertTags<E extends {
15439
+ tags?: Tags;
15440
+ }>(withTags?: E | undefined): any;
15441
+ parseTags<E extends {
15442
+ tags?: Tags;
15443
+ }>(withTags?: E): invariant<invariant> | null;
15444
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15445
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15446
+ };
15447
+ } & {
15448
+ new (...args: any[]): {
15449
+ parsePredicate(astNode: Predicate): invariant;
15450
+ parseElementPredicate(astNode: ElementPredicate): invariant;
15451
+ parseElementExpressionsIterator(astNode: ElementExpressionsIterator): invariant[];
15452
+ parseElementExpression(astNode: ElementExpression): invariant;
15453
+ parseElementPredicateWhere(astNode: ElementPredicateWhere): invariant;
15454
+ parseElementPredicateWith(astNode: ElementPredicateWith): invariant;
15455
+ parseRelationPredicate(astNode: RelationPredicate): invariant;
15456
+ parseRelationPredicateWhere(astNode: RelationPredicateWhere): invariant;
15457
+ parseRelationPredicateWith(astNode: RelationPredicateWith, relation: invariant | invariant): invariant;
15458
+ parseRelationExpression(astNode: RelationExpression): invariant;
15459
+ isValid: IsValidFn;
15460
+ readonly services: LikeC4Services;
15461
+ readonly doc: ParsedLikeC4LangiumDocument;
15462
+ resolveFqn(node: FqnReferenceable): invariant;
15463
+ getAstNodePath(node: invariant): any;
15464
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15465
+ [key: string]: string;
15466
+ } | undefined;
15467
+ convertTags<E extends {
15468
+ tags?: Tags;
15469
+ }>(withTags?: E | undefined): any;
15470
+ parseTags<E extends {
15471
+ tags?: Tags;
15472
+ }>(withTags?: E): invariant<invariant> | null;
15473
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15474
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15475
+ };
15476
+ } & {
15477
+ new (...args: any[]): {
15478
+ parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
15479
+ parseDeploymentViewRule(astRule: DeploymentViewRule): invariant;
15480
+ parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): invariant;
15481
+ parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): invariant;
15482
+ parseFqnRef(astNode: FqnRef): invariant;
15483
+ parseFqnExpr(astNode: FqnExpr): invariant;
15484
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15485
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15486
+ parseRelationExpr(astNode: RelationExpr): invariant;
15487
+ isValid: IsValidFn;
15488
+ readonly services: LikeC4Services;
15489
+ readonly doc: ParsedLikeC4LangiumDocument;
15490
+ resolveFqn(node: FqnReferenceable): invariant;
15491
+ getAstNodePath(node: invariant): any;
15492
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15493
+ [key: string]: string;
15494
+ } | undefined;
15495
+ convertTags<E extends {
15496
+ tags?: Tags;
15497
+ }>(withTags?: E | undefined): any;
15498
+ parseTags<E extends {
15499
+ tags?: Tags;
15500
+ }>(withTags?: E): invariant<invariant> | null;
15501
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15502
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15503
+ parseDeployment(): void;
15504
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15505
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15506
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15507
+ };
15508
+ } & {
15509
+ new (...args: any[]): {
15510
+ parseDeployment(): void;
15511
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15512
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15513
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15514
+ parseFqnRef(astNode: FqnRef): invariant;
15515
+ parseFqnExpr(astNode: FqnExpr): invariant;
15516
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15517
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15518
+ parseRelationExpr(astNode: RelationExpr): invariant;
15519
+ isValid: IsValidFn;
15520
+ readonly services: LikeC4Services;
15521
+ readonly doc: ParsedLikeC4LangiumDocument;
15522
+ resolveFqn(node: FqnReferenceable): invariant;
15523
+ getAstNodePath(node: invariant): any;
15524
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15525
+ [key: string]: string;
15526
+ } | undefined;
15527
+ convertTags<E extends {
15528
+ tags?: Tags;
15529
+ }>(withTags?: E | undefined): any;
15530
+ parseTags<E extends {
15531
+ tags?: Tags;
15532
+ }>(withTags?: E): invariant<invariant> | null;
15533
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15534
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15535
+ };
15536
+ } & {
15537
+ new (...args: any[]): {
15538
+ parseModel(): void;
15539
+ parseElement(astNode: Element): ParsedAstElement;
15540
+ parseRelation(astNode: Relation): ParsedAstRelation;
15541
+ isValid: IsValidFn;
15542
+ readonly services: LikeC4Services;
15543
+ readonly doc: ParsedLikeC4LangiumDocument;
15544
+ resolveFqn(node: FqnReferenceable): invariant;
15545
+ getAstNodePath(node: invariant): any;
15546
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15547
+ [key: string]: string;
15548
+ } | undefined;
15549
+ convertTags<E extends {
15550
+ tags?: Tags;
15551
+ }>(withTags?: E | undefined): any;
15552
+ parseTags<E extends {
15553
+ tags?: Tags;
15554
+ }>(withTags?: E): invariant<invariant> | null;
15555
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15556
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15557
+ };
15558
+ } & {
15559
+ new (...args: any[]): {
15560
+ parseFqnRef(astNode: FqnRef): invariant;
15561
+ parseFqnExpr(astNode: FqnExpr): invariant;
15562
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15563
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15564
+ parseRelationExpr(astNode: RelationExpr): invariant;
15565
+ isValid: IsValidFn;
15566
+ readonly services: LikeC4Services;
15567
+ readonly doc: ParsedLikeC4LangiumDocument;
15568
+ resolveFqn(node: FqnReferenceable): invariant;
15569
+ getAstNodePath(node: invariant): any;
15570
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15571
+ [key: string]: string;
15572
+ } | undefined;
15573
+ convertTags<E extends {
15574
+ tags?: Tags;
15575
+ }>(withTags?: E | undefined): any;
15576
+ parseTags<E extends {
15577
+ tags?: Tags;
15578
+ }>(withTags?: E): invariant<invariant> | null;
15579
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15580
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15581
+ };
15582
+ } & typeof BaseParser;
15583
+ declare class DocumentParser extends DocumentParserFromMixins {
15584
+ }
17482
15585
  declare class LikeC4ModelParser {
17483
15586
  private services;
17484
- private fqnIndex;
15587
+ private cachedParsers;
17485
15588
  constructor(services: LikeC4Services);
17486
15589
  parse(doc: LangiumDocument): ParsedLikeC4LangiumDocument;
17487
- protected parseLikeC4Document(_doc: FqnIndexedDocument): ParsedLikeC4LangiumDocument;
17488
- private parseSpecification;
17489
- private parseSpecificationDeploymentNodeKind;
17490
- private parseModel;
17491
- private parseElement;
17492
- private parseRelation;
17493
- private parseGlobal;
17494
- private parseAndStoreGlobalPredicateGroupOrDynamic;
17495
- private parseGlobalPredicateGroup;
17496
- private parseGlobalDynamicPredicateGroup;
17497
- private parseGlobalStyleOrGroup;
17498
- private parseViews;
17499
- private parseViewRulePredicate;
17500
- private parsePredicate;
17501
- private parseElementExpressionsIterator;
17502
- private parseElementPredicate;
17503
- private parseElementExpr;
17504
- private parseElementPredicateWith;
17505
- private parseElementPredicateWhere;
17506
- private parseRelationPredicate;
17507
- private parseRelationPredicateWhere;
17508
- private parseRelationPredicateWith;
17509
- private parseRelationExpr;
17510
- private parseViewRule;
17511
- private parseViewRuleGlobalPredicateRef;
17512
- private parseViewRuleStyleOrGlobalRef;
17513
- private parseViewRuleStyle;
17514
- private parseViewRuleGroup;
17515
- private parseRuleStyle;
17516
- private parseViewRuleGlobalStyle;
17517
- private parseViewManualLayout;
17518
- private parseDynamicParallelSteps;
17519
- private parseDynamicStep;
17520
- private parseElementView;
17521
- private parseDynamicElementView;
17522
- private parseDynamicViewRule;
17523
- private parseDynamicViewIncludePredicate;
17524
- private parseDeployment;
17525
- parseDeploymentNode(astNode: DeploymentNode, isValid: IsValidFn): ParsedAstDeployment.Node;
17526
- parseDeployedInstance(astNode: DeployedInstance, isValid: IsValidFn): ParsedAstDeployment.Instance;
17527
- parseDeploymentRelation(astNode: DeploymentRelation, isValid: IsValidFn): ParsedAstDeploymentRelation;
17528
- private parseDeploymentView;
17529
- private parseDeploymentViewRule;
17530
- private parseDeploymentViewRulePredicate;
17531
- private parseDeploymentElementExpression;
17532
- private parseDeploymentRelationExpression;
17533
- private parseDeploymentExpressionIterator;
17534
- private parseDeploymentDef;
17535
- protected parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle, isValid: IsValidFn): DeploymentViewRuleStyle$1;
17536
- protected resolveFqn(node: FqnReferenceable): Fqn;
17537
- private getAstNodePath;
17538
- private getMetadata;
17539
- private convertTags;
17540
- private convertLinks;
15590
+ forDocument(doc: LangiumDocument): DocumentParser;
15591
+ }
15592
+
15593
+ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
15594
+ private services;
15595
+ protected readonly nodeKindProvider: NodeKindProvider$1;
15596
+ protected readonly nameProvider: LikeC4NameProvider;
15597
+ protected readonly parser: LikeC4ModelParser;
15598
+ protected readonly locator: LikeC4ModelLocator;
15599
+ constructor(services: LikeC4Services);
15600
+ getSymbols({ parseResult: { value: { specifications, models, deployments, views, likec4lib }, }, }: LikeC4LangiumDocument): MaybePromise<DocumentSymbol[]>;
15601
+ protected getLikec4LibSymbol(astLib: LikeC4Lib): DocumentSymbol[];
15602
+ protected getSpecSymbol(astSpec: SpecificationRule): DocumentSymbol[];
15603
+ protected getModelSymbol(astModel: Model): DocumentSymbol[];
15604
+ protected getDeploymentModelSymbol(astModel: ModelDeployments): DocumentSymbol[];
15605
+ protected getElementsSymbol(el: Element | Relation | ExtendElement): DocumentSymbol[];
15606
+ protected getExtendElementSymbol(astElement: ExtendElement): DocumentSymbol[];
15607
+ protected getElementSymbol(astElement: Element): DocumentSymbol[];
15608
+ protected getModelViewsSymbol(astViews: ModelViews): DocumentSymbol[];
15609
+ protected getKindSymbol(astKind: SpecificationElementKind | SpecificationRelationshipKind): DocumentSymbol | null;
15610
+ protected getTagSymbol(astTag: SpecificationTag): DocumentSymbol | null;
15611
+ protected getLibIconSymbol(astTag: LibIcon): DocumentSymbol | null;
15612
+ protected getViewSymbol(astView: LikeC4View): DocumentSymbol[];
15613
+ protected getDeploymentElementSymbol(el: DeploymentElement | DeploymentRelation): DocumentSymbol[];
15614
+ protected getDeploymentNodeSymbol(astElement: DeploymentNode): DocumentSymbol[];
15615
+ protected getDeployedInstanceSymbol(astElement: DeployedInstance): DocumentSymbol[];
15616
+ protected symbolKind(node: AstNode): SymbolKind;
15617
+ }
15618
+
15619
+ declare class LikeC4HoverProvider extends AstNodeHoverProvider {
15620
+ private parser;
15621
+ private locator;
15622
+ constructor(services: LikeC4Services);
15623
+ protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
15624
+ }
15625
+
15626
+ declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
15627
+ protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
15628
+ private highlightNameAndKind;
15629
+ private highlightView;
15630
+ }
15631
+
15632
+ interface ChangeViewRequestParams {
15633
+ viewId: ViewId;
15634
+ change: ViewChange;
17541
15635
  }
17542
15636
 
17543
15637
  declare class LikeC4ModelChanges {
@@ -17582,7 +15676,7 @@ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
17582
15676
  * your language, which can be either loaded from provided files or constructed in memory.
17583
15677
  */
17584
15678
  protected loadAdditionalDocuments(folders: WorkspaceFolder[], collector: (document: LangiumDocument) => void): Promise<void>;
17585
- workspace(): WorkspaceFolder;
15679
+ workspace(): any;
17586
15680
  get workspaceUri(): URI;
17587
15681
  get workspaceURL(): URL;
17588
15682
  }
@@ -17590,6 +15684,29 @@ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
17590
15684
  declare class WorkspaceSymbolProvider extends DefaultWorkspaceSymbolProvider {
17591
15685
  }
17592
15686
 
15687
+ type GraphvizOut = {
15688
+ dot: string;
15689
+ diagram: DiagramView;
15690
+ };
15691
+ type GraphvizSvgOut = {
15692
+ id: ViewId;
15693
+ dot: string;
15694
+ svg: string;
15695
+ };
15696
+ declare class LikeC4Views {
15697
+ private services;
15698
+ private cache;
15699
+ private viewsWithReportedErrors;
15700
+ constructor(services: LikeC4Services);
15701
+ private get layouter();
15702
+ computedViews(cancelToken?: CancellationToken): Promise<ComputedView[]>;
15703
+ layoutAllViews(cancelToken?: CancellationToken): Promise<Array<Readonly<GraphvizOut>>>;
15704
+ layoutView(viewId: ViewId, cancelToken?: CancellationToken): Promise<GraphvizOut | null>;
15705
+ diagrams(): Promise<Array<DiagramView>>;
15706
+ viewsAsGraphvizOut(): Promise<Array<GraphvizSvgOut>>;
15707
+ overviewGraph(): Promise<OverviewGraph>;
15708
+ }
15709
+
17593
15710
  interface LikeC4AddedSharedServices {
17594
15711
  lsp: {
17595
15712
  NodeKindProvider: NodeKindProvider;
@@ -17604,10 +15721,15 @@ type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
17604
15721
  * Declaration of custom services - add your own service classes here.
17605
15722
  */
17606
15723
  interface LikeC4AddedServices {
15724
+ documentation: {
15725
+ DocumentationProvider: LikeC4DocumentationProvider;
15726
+ };
17607
15727
  WorkspaceCache: WorkspaceCache<string, any>;
17608
15728
  DocumentCache: DocumentCache<string, any>;
17609
15729
  Rpc: Rpc;
17610
15730
  likec4: {
15731
+ Views: LikeC4Views;
15732
+ Layouter: GraphvizLayouter;
17611
15733
  DeploymentsIndex: DeploymentsIndex;
17612
15734
  FqnIndex: FqnIndex;
17613
15735
  ModelParser: LikeC4ModelParser;
@@ -17633,64 +15755,6 @@ interface LikeC4AddedServices {
17633
15755
  }
17634
15756
  type LikeC4Services = LangiumServices & LikeC4AddedServices;
17635
15757
 
17636
- /**
17637
- * @hidden
17638
- */
17639
- type $keywords<T extends string> = {
17640
- [key in T]: key;
17641
- };
17642
-
17643
- declare module 'ts-graphviz' {
17644
- namespace ClusterSubgraphAttributeKey {
17645
- interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
17646
- }
17647
- }
17648
- namespace NodeAttributeKey {
17649
- interface $values extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level'> {
17650
- }
17651
- }
17652
- namespace EdgeAttributeKey {
17653
- interface $values extends $keywords<'likec4_id'> {
17654
- }
17655
- }
17656
- namespace Attribute {
17657
- interface $keys extends $keywords<'likec4_type' | 'likec4_path' | 'likec4_id' | 'likec4_level' | 'likec4_depth'> {
17658
- }
17659
- interface $types {
17660
- likec4_type: 'folder' | 'file' | 'view';
17661
- likec4_path: string;
17662
- likec4_id: string;
17663
- likec4_level: number;
17664
- likec4_depth: number;
17665
- }
17666
- }
17667
- }
17668
- type DotSource = Tagged<string, 'DotSource'>;
17669
-
17670
- interface GraphvizPort {
17671
- unflatten(dot: DotSource): Promise<DotSource>;
17672
- acyclic(dot: DotSource): Promise<DotSource>;
17673
- layoutJson(dot: DotSource): Promise<string>;
17674
- svg(dot: DotSource): Promise<string>;
17675
- }
17676
- type LayoutResult = {
17677
- dot: DotSource;
17678
- diagram: DiagramView;
17679
- };
17680
- declare class GraphvizLayouter {
17681
- private graphviz;
17682
- constructor(graphviz: GraphvizPort);
17683
- get port(): GraphvizPort;
17684
- changePort(graphviz: GraphvizPort): void;
17685
- layout(view: ComputedView): Promise<LayoutResult>;
17686
- svg(view: ComputedView): Promise<{
17687
- svg: string;
17688
- dot: DotSource;
17689
- }>;
17690
- dot(computedView: ComputedView): Promise<DotSource>;
17691
- layoutOverviewGraph(views: ComputedView[]): Promise<OverviewGraph>;
17692
- }
17693
-
17694
15758
  // This definition file follows a somewhat unusual format. ESTree allows
17695
15759
  // runtime type checks based on the `type` parameter. In order to explain this
17696
15760
  // to typescript we want to use discriminated union types:
@@ -18305,50 +16369,6 @@ type Logger = {
18305
16369
  error(err: unknown): void;
18306
16370
  };
18307
16371
 
18308
- declare class CliWorkspace {
18309
- private services;
18310
- private isInitialized;
18311
- constructor(services: CliServices);
18312
- initWorkspace(workspace: WorkspaceFolder): Promise<void>;
18313
- init(): Promise<void>;
18314
- }
18315
-
18316
- type CliAddedServices = {
18317
- logger: Logger;
18318
- likec4: {
18319
- Layouter: GraphvizLayouter;
18320
- Views: Views;
18321
- };
18322
- cli: {
18323
- Workspace: CliWorkspace;
18324
- };
18325
- };
18326
- type CliServices = LikeC4Services & CliAddedServices;
18327
-
18328
- type GraphvizOut = {
18329
- dot: string;
18330
- diagram: DiagramView;
18331
- };
18332
- type GraphvizSvgOut = {
18333
- id: ViewId;
18334
- dot: string;
18335
- svg: string;
18336
- };
18337
- declare class Views {
18338
- private services;
18339
- private cache;
18340
- private layouter;
18341
- private previousAction;
18342
- private limit;
18343
- constructor(services: CliServices);
18344
- private inflightRequest;
18345
- computedViews(): Promise<ComputedView[]>;
18346
- layoutViews(): Promise<Array<Readonly<GraphvizOut>>>;
18347
- diagrams(): Promise<Array<DiagramView>>;
18348
- viewsAsGraphvizOut(): Promise<Array<GraphvizSvgOut>>;
18349
- overviewGraph(): Promise<OverviewGraph>;
18350
- }
18351
-
18352
16372
  type LikeC4Options = {
18353
16373
  /**
18354
16374
  * By default, if LikeC4 model is invalid, errors are printed to the console.
@@ -18393,7 +16413,7 @@ declare class LikeC4 {
18393
16413
  private modelLayoutedRef;
18394
16414
  private logger;
18395
16415
  private constructor();
18396
- get viewsService(): Views;
16416
+ get viewsService(): LikeC4Views;
18397
16417
  private get LangiumDocuments();
18398
16418
  /**
18399
16419
  * Diagram is a computed view, layouted using Graphviz
@@ -18436,4 +16456,4 @@ declare class LikeC4 {
18436
16456
  dispose(): void;
18437
16457
  }
18438
16458
 
18439
- export { type AutoLayoutDirection, type BBox, BorderStyles, Builder, type BuilderSpecification, type Color$1 as Color, type ComputedDeploymentView, type ComputedDynamicView, type ComputedEdge, type ComputedElementView, type ComputedLikeC4Model, ComputedNode, ComputedView, type DeployedInstance$1 as DeployedInstance, DeploymentElement$1 as DeploymentElement, type DeploymentNode$1 as DeploymentNode, type DeploymentNodeKind$1 as DeploymentNodeKind, type DeploymentRelation$1 as DeploymentRelation, type DeploymentView$1 as DeploymentView, type DiagramEdge, DiagramNode, type DiagramView, type DynamicView$1 as DynamicView, type EdgeId, type Element$1 as Element, ElementColors, ElementKind$1 as ElementKind, ElementShapes, type ElementView$1 as ElementView, type Fqn, type HexColorLiteral, type LayoutedLikeC4Model, LikeC4, Builder as LikeC4Builder, LikeC4Model, type LikeC4View$1 as LikeC4View, type NodeId, type ParsedLikeC4Model, type Point, type Relation$1 as Relation, type RelationExpr, type RelationId, RelationshipColors, type StepEdgeId, type Tag$1 as Tag, type ThemeColor$1 as ThemeColor, type ViewId, type XYPoint, ancestorsFqn, commonAncestor, compareByFqnHierarchically, compareFqnHierarchically, compareRelations, defaultTheme, extractStep, hasAtLeast, invariant, isAncestor, isDeploymentView, isDescendantOf, isDynamicView, isElementView, isSameHierarchy, isStepEdgeId, nameFromFqn, nonNullable, nonexhaustive, parentFqn };
16459
+ export { Color$1 as Color, ComputedLikeC4Model, ComputedView, DeployedInstance$1 as DeployedInstance, DeploymentElement$1 as DeploymentElement, DeploymentNode$1 as DeploymentNode, DeploymentNodeKind$1 as DeploymentNodeKind, DeploymentRelation$1 as DeploymentRelation, DiagramView, ElementKind$1 as ElementKind, Fqn, HexColorLiteral, LikeC4, LikeC4Model, ParsedLikeC4Model, RelationId, Tag$1 as Tag, ViewId };