likec4 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) 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.mjs +35 -35
  16. package/dist/cli/index.mjs +91 -88
  17. package/dist/index.d.mts +410 -2388
  18. package/dist/index.d.ts +410 -2388
  19. package/dist/index.mjs +1 -1
  20. package/dist/model/index.d.mts +258 -0
  21. package/dist/model/index.d.ts +258 -0
  22. package/dist/model/index.mjs +1 -0
  23. package/dist/shared/likec4.CbSUX9bc.mjs +1853 -0
  24. package/dist/shared/likec4.DCwaTTuF.d.mts +1625 -0
  25. package/dist/shared/likec4.DCwaTTuF.d.ts +1625 -0
  26. package/dist/shared/likec4.LktBLTET.mjs +9 -0
  27. package/package.json +65 -62
  28. package/react/index.d.ts +150 -918
  29. package/react/index.js +39830 -0
  30. package/react/style.css +1 -1
  31. package/__app__/src/chunks/-index-overview-CBnvpD1d.js +0 -309
  32. package/__app__/src/chunks/-view-lazy-data-WZmbIsHq.js +0 -9
  33. package/__app__/src/chunks/index-CIsxIzOH.js +0 -465
  34. package/__app__/src/chunks/likec4-DslTxitT.js +0 -6109
  35. package/__app__/src/chunks/main-ByUdz_Be.js +0 -24285
  36. package/__app__/src/chunks/mantine-oFa3ZrEq.js +0 -13658
  37. package/__app__/src/chunks/tanstack-router-BWjXKr0n.js +0 -2373
  38. package/dist/shared/likec4.lgHXhASw.mjs +0 -1832
  39. package/react/index.mjs +0 -41515
package/dist/index.d.ts 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
- }
1147
-
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
- }
1
+ import { F as Fqn, $ as ViewId, K as ElementKind$1, a2 as NonEmptyArray, Z as Tag$1, a3 as ElementShape$1, a4 as IconUrl, m as Color$1, a5 as BorderStyle, a6 as RelationshipKind$1, a7 as RelationshipLineType, a8 as RelationshipArrowType, a9 as CustomColor$1, O as HexColorLiteral, v as DeploymentNodeKind$1, aa as DeploymentNodeKindSpecification, X as RelationId, t as DeploymentElement$1, u as DeploymentNode$1, s as DeployedInstance$1, w as DeploymentRelation$1, ab as ModelGlobals, ac as ViewRule$1, ad as ViewManualLayout, ae as DynamicViewStepOrParallel, af as DynamicViewRule$1, ag as DeploymentViewRule$1, U as ParsedLikeC4Model, r as ComputedLikeC4Model, i as ComputedView, ah as ViewChange, T as OverviewGraph, z as DiagramView, L as LikeC4Model } from './shared/likec4.DCwaTTuF.js';
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.js';
3
+ import { Writable, ValueOf, ConditionalPick, Tagged } from 'type-fest';
1309
4
 
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[]>;
@@ -15928,7 +13703,7 @@ interface CompletionContext {
15928
13703
  offset: number;
15929
13704
  position: Position$2;
15930
13705
  }
15931
- interface CompletionProviderOptions {
13706
+ interface CompletionProviderOptions$1 {
15932
13707
  /**
15933
13708
  * Most tools trigger completion request automatically without explicitly requesting
15934
13709
  * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
@@ -15975,7 +13750,7 @@ interface CompletionProvider {
15975
13750
  *
15976
13751
  * If multiple languages return different options, they are merged before being sent to the language client.
15977
13752
  */
15978
- readonly completionOptions?: CompletionProviderOptions;
13753
+ readonly completionOptions?: CompletionProviderOptions$1;
15979
13754
  }
15980
13755
  declare class DefaultCompletionProvider implements CompletionProvider {
15981
13756
  protected readonly completionParser: LangiumCompletionParser;
@@ -15988,7 +13763,7 @@ declare class DefaultCompletionProvider implements CompletionProvider {
15988
13763
  protected readonly fuzzyMatcher: FuzzyMatcher;
15989
13764
  protected readonly grammarConfig: GrammarConfig;
15990
13765
  protected readonly astReflection: AstReflection;
15991
- readonly completionOptions?: CompletionProviderOptions;
13766
+ readonly completionOptions?: CompletionProviderOptions$1;
15992
13767
  constructor(services: LangiumServices);
15993
13768
  getCompletion(document: LangiumDocument, params: CompletionParams, _cancelToken?: CancellationToken): Promise<CompletionList | undefined>;
15994
13769
  /**
@@ -16048,11 +13823,6 @@ declare class DefaultCompletionProvider implements CompletionProvider {
16048
13823
  protected buildCompletionTextEdit(context: CompletionContext, label: string, newText: string): TextEdit$1 | undefined;
16049
13824
  }
16050
13825
 
16051
- interface ChangeViewRequestParams {
16052
- viewId: ViewId;
16053
- change: ViewChange;
16054
- }
16055
-
16056
13826
  declare class LikeC4CodeLensProvider implements CodeLensProvider {
16057
13827
  private services;
16058
13828
  constructor(services: LikeC4Services);
@@ -16060,9 +13830,7 @@ declare class LikeC4CodeLensProvider implements CodeLensProvider {
16060
13830
  }
16061
13831
 
16062
13832
  declare class LikeC4CompletionProvider extends DefaultCompletionProvider {
16063
- readonly completionOptions: {
16064
- triggerCharacters: string[];
16065
- };
13833
+ readonly completionOptions: CompletionProviderOptions;
16066
13834
  protected completionForKeyword(context: CompletionContext, keyword: Keyword, acceptor: CompletionAcceptor): MaybePromise<void>;
16067
13835
  }
16068
13836
 
@@ -16092,14 +13860,6 @@ type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOption
16092
13860
  type CustomColorValue = string;
16093
13861
  type DeploymentElement = DeployedInstance | DeploymentNode;
16094
13862
  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
13863
  type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
16104
13864
  declare const DeploymentViewRule = "DeploymentViewRule";
16105
13865
  type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
@@ -16113,10 +13873,14 @@ declare const ElementPredicateOrWhere = "ElementPredicateOrWhere";
16113
13873
  type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
16114
13874
  declare const ElementProperty = "ElementProperty";
16115
13875
  type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
16116
- type FqnReferenceable = DeploymentReferenceable | Element | ExtendElement;
13876
+ type ExpressionV2 = FqnExpr | RelationExpr;
13877
+ declare const ExpressionV2 = "ExpressionV2";
13878
+ type FqnExpr = FqnRefExpr | WildcardExpression;
13879
+ declare const FqnExpr = "FqnExpr";
13880
+ type FqnReferenceable = Element | ExtendElement | Referenceable;
16117
13881
  declare const FqnReferenceable = "FqnReferenceable";
16118
13882
  type IconId = string;
16119
- type Id = 'deployment' | 'element' | 'group' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
13883
+ type Id = 'deployment' | 'element' | 'group' | 'instance' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
16120
13884
  type LikeC4View = DeploymentView | DynamicView | ElementView;
16121
13885
  declare const LikeC4View = "LikeC4View";
16122
13886
  type LineOptions = 'dashed' | 'dotted' | 'solid';
@@ -16124,6 +13888,10 @@ type MetadataProperty = MetadataBody;
16124
13888
  declare const MetadataProperty = "MetadataProperty";
16125
13889
  type Predicate = ElementPredicate | RelationPredicate;
16126
13890
  declare const Predicate = "Predicate";
13891
+ type Referenceable = DeployedInstance | DeploymentNode | Element;
13892
+ declare const Referenceable = "Referenceable";
13893
+ type RelationExpr = DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr;
13894
+ declare const RelationExpr = "RelationExpr";
16127
13895
  type RelationExpression = DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression;
16128
13896
  declare const RelationExpression = "RelationExpression";
16129
13897
  type RelationPredicate = RelationPredicateOrWhere | RelationPredicateWith;
@@ -16219,13 +13987,6 @@ interface DeployedInstanceBody extends AstNode {
16219
13987
  tags?: Tags;
16220
13988
  }
16221
13989
  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
13990
  interface DeploymentNode extends AstNode {
16230
13991
  readonly $container: DeploymentNodeBody | ModelDeployments;
16231
13992
  readonly $type: 'DeploymentNode';
@@ -16249,28 +14010,14 @@ interface DeploymentNodeKind extends AstNode {
16249
14010
  name: Id;
16250
14011
  }
16251
14012
  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
14013
  interface DeploymentRelation extends AstNode {
16267
14014
  readonly $container: DeploymentNodeBody | ModelDeployments;
16268
14015
  readonly $type: 'DeploymentRelation';
16269
14016
  body?: DeploymentRelationBody;
16270
14017
  kind?: Reference<RelationshipKind>;
16271
- source: DeploymentRef;
14018
+ source: FqnRef;
16272
14019
  tags?: Tags;
16273
- target: DeploymentRef;
14020
+ target: FqnRef;
16274
14021
  technology?: string;
16275
14022
  title?: string;
16276
14023
  }
@@ -16308,23 +14055,23 @@ interface DeploymentViewRulePredicateExpression extends AstNode {
16308
14055
  readonly $container: DeploymentViewRulePredicate | DeploymentViewRulePredicateExpression;
16309
14056
  readonly $type: 'DeploymentViewRulePredicateExpression';
16310
14057
  prev?: DeploymentViewRulePredicateExpression;
16311
- value: DeploymentExpression;
14058
+ value: ExpressionV2;
16312
14059
  }
16313
14060
  declare const DeploymentViewRulePredicateExpression = "DeploymentViewRulePredicateExpression";
16314
14061
  interface DeploymentViewRuleStyle extends AstNode {
16315
14062
  readonly $container: DeploymentViewBody;
16316
14063
  readonly $type: 'DeploymentViewRuleStyle';
16317
14064
  props: Array<NotationProperty | StyleProperty>;
16318
- target: DeploymentExpressionIterator;
14065
+ targets: FqnExpressions;
16319
14066
  }
16320
14067
  declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
16321
- interface DirectedDeploymentRelationExpression extends AstNode {
14068
+ interface DirectedRelationExpr extends AstNode {
16322
14069
  readonly $container: DeploymentViewRulePredicateExpression;
16323
- readonly $type: 'DirectedDeploymentRelationExpression';
16324
- source: OutgoingDeploymentRelationExpression;
16325
- target: DeploymentElementExpression;
14070
+ readonly $type: 'DirectedRelationExpr';
14071
+ source: OutgoingRelationExpr;
14072
+ target: FqnExpr;
16326
14073
  }
16327
- declare const DirectedDeploymentRelationExpression = "DirectedDeploymentRelationExpression";
14074
+ declare const DirectedRelationExpr = "DirectedRelationExpr";
16328
14075
  interface DirectedRelationExpression extends AstNode {
16329
14076
  readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
16330
14077
  readonly $type: 'DirectedRelationExpression';
@@ -16531,6 +14278,27 @@ interface FqnElementRef extends AstNode {
16531
14278
  parent?: FqnElementRef;
16532
14279
  }
16533
14280
  declare const FqnElementRef = "FqnElementRef";
14281
+ interface FqnExpressions extends AstNode {
14282
+ readonly $container: DeploymentViewRuleStyle | FqnExpressions;
14283
+ readonly $type: 'FqnExpressions';
14284
+ prev?: FqnExpressions;
14285
+ value: FqnExpr;
14286
+ }
14287
+ declare const FqnExpressions = "FqnExpressions";
14288
+ interface FqnRef extends AstNode {
14289
+ readonly $container: DeploymentRelation | FqnRef | FqnRefExpr;
14290
+ readonly $type: 'FqnRef';
14291
+ parent?: FqnRef;
14292
+ value: Reference<Referenceable>;
14293
+ }
14294
+ declare const FqnRef = "FqnRef";
14295
+ interface FqnRefExpr extends AstNode {
14296
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | FqnExpressions | IncomingRelationExpr | OutgoingRelationExpr;
14297
+ readonly $type: 'FqnRefExpr';
14298
+ ref: FqnRef;
14299
+ selector?: string;
14300
+ }
14301
+ declare const FqnRefExpr = "FqnRefExpr";
16534
14302
  interface GlobalDynamicPredicateGroup extends AstNode {
16535
14303
  readonly $container: Globals;
16536
14304
  readonly $type: 'GlobalDynamicPredicateGroup';
@@ -16588,24 +14356,24 @@ interface IncludePredicate extends AstNode {
16588
14356
  predicates: Predicates;
16589
14357
  }
16590
14358
  declare const IncludePredicate = "IncludePredicate";
16591
- interface IncomingDeploymentRelationExpression extends AstNode {
16592
- readonly $container: DeploymentViewRulePredicateExpression | InOutDeploymentRelationExpression;
16593
- readonly $type: 'IncomingDeploymentRelationExpression';
16594
- to: DeploymentElementExpression;
14359
+ interface IncomingRelationExpr extends AstNode {
14360
+ readonly $container: DeploymentViewRulePredicateExpression | InOutRelationExpr;
14361
+ readonly $type: 'IncomingRelationExpr';
14362
+ to: FqnExpr;
16595
14363
  }
16596
- declare const IncomingDeploymentRelationExpression = "IncomingDeploymentRelationExpression";
14364
+ declare const IncomingRelationExpr = "IncomingRelationExpr";
16597
14365
  interface IncomingRelationExpression extends AstNode {
16598
14366
  readonly $container: InOutRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
16599
14367
  readonly $type: 'IncomingRelationExpression';
16600
14368
  to: ElementExpression;
16601
14369
  }
16602
14370
  declare const IncomingRelationExpression = "IncomingRelationExpression";
16603
- interface InOutDeploymentRelationExpression extends AstNode {
14371
+ interface InOutRelationExpr extends AstNode {
16604
14372
  readonly $container: DeploymentViewRulePredicateExpression;
16605
- readonly $type: 'InOutDeploymentRelationExpression';
16606
- inout: IncomingDeploymentRelationExpression;
14373
+ readonly $type: 'InOutRelationExpr';
14374
+ inout: IncomingRelationExpr;
16607
14375
  }
16608
- declare const InOutDeploymentRelationExpression = "InOutDeploymentRelationExpression";
14376
+ declare const InOutRelationExpr = "InOutRelationExpr";
16609
14377
  interface InOutRelationExpression extends AstNode {
16610
14378
  readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
16611
14379
  readonly $type: 'InOutRelationExpression';
@@ -16712,14 +14480,14 @@ interface OpacityProperty extends AstNode {
16712
14480
  value: string;
16713
14481
  }
16714
14482
  declare const OpacityProperty = "OpacityProperty";
16715
- interface OutgoingDeploymentRelationExpression extends AstNode {
16716
- readonly $container: DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression;
16717
- readonly $type: 'OutgoingDeploymentRelationExpression';
16718
- from: DeploymentElementExpression;
14483
+ interface OutgoingRelationExpr extends AstNode {
14484
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr;
14485
+ readonly $type: 'OutgoingRelationExpr';
14486
+ from: FqnExpr;
16719
14487
  isBidirectional: boolean;
16720
14488
  kind?: Reference<RelationshipKind>;
16721
14489
  }
16722
- declare const OutgoingDeploymentRelationExpression = "OutgoingDeploymentRelationExpression";
14490
+ declare const OutgoingRelationExpr = "OutgoingRelationExpr";
16723
14491
  interface OutgoingRelationExpression extends AstNode {
16724
14492
  readonly $container: DirectedRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
16725
14493
  readonly $type: 'OutgoingRelationExpression';
@@ -16975,7 +14743,7 @@ interface WhereRelationTag extends AstNode {
16975
14743
  }
16976
14744
  declare const WhereRelationTag = "WhereRelationTag";
16977
14745
  interface WildcardExpression extends AstNode {
16978
- readonly $container: DeploymentExpressionIterator | DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingDeploymentRelationExpression | IncomingRelationExpression | OutgoingDeploymentRelationExpression | OutgoingRelationExpression | Predicates;
14746
+ readonly $container: DeploymentViewRulePredicateExpression | DirectedRelationExpr | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | FqnExpressions | IncomingRelationExpr | IncomingRelationExpression | OutgoingRelationExpr | OutgoingRelationExpression | Predicates;
16979
14747
  readonly $type: 'WildcardExpression';
16980
14748
  isWildcard: boolean;
16981
14749
  }
@@ -16990,25 +14758,18 @@ type LikeC4AstType = {
16990
14758
  DeployedInstance: DeployedInstance;
16991
14759
  DeployedInstanceBody: DeployedInstanceBody;
16992
14760
  DeploymentElement: DeploymentElement;
16993
- DeploymentElementExpression: DeploymentElementExpression;
16994
- DeploymentExpression: DeploymentExpression;
16995
- DeploymentExpressionIterator: DeploymentExpressionIterator;
16996
14761
  DeploymentNode: DeploymentNode;
16997
14762
  DeploymentNodeBody: DeploymentNodeBody;
16998
14763
  DeploymentNodeKind: DeploymentNodeKind;
16999
- DeploymentRef: DeploymentRef;
17000
- DeploymentRefExpression: DeploymentRefExpression;
17001
- DeploymentReferenceable: DeploymentReferenceable;
17002
14764
  DeploymentRelation: DeploymentRelation;
17003
14765
  DeploymentRelationBody: DeploymentRelationBody;
17004
- DeploymentRelationExpression: DeploymentRelationExpression;
17005
14766
  DeploymentView: DeploymentView;
17006
14767
  DeploymentViewBody: DeploymentViewBody;
17007
14768
  DeploymentViewRule: DeploymentViewRule;
17008
14769
  DeploymentViewRulePredicate: DeploymentViewRulePredicate;
17009
14770
  DeploymentViewRulePredicateExpression: DeploymentViewRulePredicateExpression;
17010
14771
  DeploymentViewRuleStyle: DeploymentViewRuleStyle;
17011
- DirectedDeploymentRelationExpression: DirectedDeploymentRelationExpression;
14772
+ DirectedRelationExpr: DirectedRelationExpr;
17012
14773
  DirectedRelationExpression: DirectedRelationExpression;
17013
14774
  DynamicView: DynamicView;
17014
14775
  DynamicViewBody: DynamicViewBody;
@@ -17040,9 +14801,14 @@ type LikeC4AstType = {
17040
14801
  ElementViewRef: ElementViewRef;
17041
14802
  ExcludePredicate: ExcludePredicate;
17042
14803
  ExpandElementExpression: ExpandElementExpression;
14804
+ ExpressionV2: ExpressionV2;
17043
14805
  ExtendElement: ExtendElement;
17044
14806
  ExtendElementBody: ExtendElementBody;
17045
14807
  FqnElementRef: FqnElementRef;
14808
+ FqnExpr: FqnExpr;
14809
+ FqnExpressions: FqnExpressions;
14810
+ FqnRef: FqnRef;
14811
+ FqnRefExpr: FqnRefExpr;
17046
14812
  FqnReferenceable: FqnReferenceable;
17047
14813
  GlobalDynamicPredicateGroup: GlobalDynamicPredicateGroup;
17048
14814
  GlobalPredicateGroup: GlobalPredicateGroup;
@@ -17051,10 +14817,10 @@ type LikeC4AstType = {
17051
14817
  GlobalStyleId: GlobalStyleId;
17052
14818
  Globals: Globals;
17053
14819
  IconProperty: IconProperty;
17054
- InOutDeploymentRelationExpression: InOutDeploymentRelationExpression;
14820
+ InOutRelationExpr: InOutRelationExpr;
17055
14821
  InOutRelationExpression: InOutRelationExpression;
17056
14822
  IncludePredicate: IncludePredicate;
17057
- IncomingDeploymentRelationExpression: IncomingDeploymentRelationExpression;
14823
+ IncomingRelationExpr: IncomingRelationExpr;
17058
14824
  IncomingRelationExpression: IncomingRelationExpression;
17059
14825
  LibIcon: LibIcon;
17060
14826
  LikeC4Grammar: LikeC4Grammar;
@@ -17072,12 +14838,14 @@ type LikeC4AstType = {
17072
14838
  NotationProperty: NotationProperty;
17073
14839
  NotesProperty: NotesProperty;
17074
14840
  OpacityProperty: OpacityProperty;
17075
- OutgoingDeploymentRelationExpression: OutgoingDeploymentRelationExpression;
14841
+ OutgoingRelationExpr: OutgoingRelationExpr;
17076
14842
  OutgoingRelationExpression: OutgoingRelationExpression;
17077
14843
  Predicate: Predicate;
17078
14844
  Predicates: Predicates;
14845
+ Referenceable: Referenceable;
17079
14846
  Relation: Relation;
17080
14847
  RelationBody: RelationBody;
14848
+ RelationExpr: RelationExpr;
17081
14849
  RelationExpression: RelationExpression;
17082
14850
  RelationNavigateToProperty: RelationNavigateToProperty;
17083
14851
  RelationPredicate: RelationPredicate;
@@ -17130,6 +14898,17 @@ type LikeC4AstType = {
17130
14898
  WildcardExpression: WildcardExpression;
17131
14899
  };
17132
14900
 
14901
+ type Guard<N extends AstNode> = (n: AstNode) => n is N;
14902
+ type Guarded<G> = G extends Guard<infer N> ? N : never;
14903
+ declare const isValidatableAstNode: (n: AstNode) => n is DeployedInstance | DeploymentNode | DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout | DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleGlobalStyle | ViewRuleStyle | ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression | ElementPredicateWhere | ElementPredicateWith | ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataBody | FqnRefExpr | DirectedRelationExpr | InOutRelationExpr | IncomingRelationExpr | OutgoingRelationExpr | Element | ExtendElement | DeploymentView | DynamicView | ElementView | DirectedRelationExpression | InOutRelationExpression | IncomingRelationExpression | OutgoingRelationExpression | RelationPredicateWhere | RelationPredicateWith | RelationStringProperty | ArrowProperty | ColorProperty | LineProperty | MetadataAttribute | NotationProperty | NotesProperty | SpecificationElementStringProperty | SpecificationRelationshipStringProperty | ViewStringProperty | BorderProperty | OpacityProperty | ShapeProperty | ViewRuleGlobalPredicateRef | ViewRuleGroup | ExcludePredicate | IncludePredicate | SpecificationRelationshipKind | GlobalStyle | SpecificationColor | NavigateToProperty | DynamicViewStep | Tags | DeploymentRelation | SpecificationDeploymentNodeKind | DynamicViewParallelSteps | GlobalDynamicPredicateGroup | DynamicViewPredicateIterator | Relation | SpecificationElementKind | GlobalPredicateGroup | Globals | GlobalStyleGroup | SpecificationRule | SpecificationTag;
14904
+ type ValidatableAstNode = Guarded<typeof isValidatableAstNode>;
14905
+ declare function checksFromDiagnostics(doc: LikeC4LangiumDocument): {
14906
+ isValid: (n: ValidatableAstNode) => boolean;
14907
+ invalidNodes: WeakSet<object>;
14908
+ };
14909
+ type ChecksFromDiagnostics = ReturnType<typeof checksFromDiagnostics>;
14910
+ type IsValidFn = ChecksFromDiagnostics['isValid'];
14911
+
17133
14912
  declare const idattr: unique symbol;
17134
14913
  declare module './generated/ast' {
17135
14914
  interface Element {
@@ -17220,7 +14999,7 @@ declare namespace ParsedAstDeployment {
17220
14999
  type ParsedAstDeploymentRelation = DeploymentRelation$1 & {
17221
15000
  astPath: string;
17222
15001
  };
17223
- type ParsedAstGlobals = ModelGlobals;
15002
+ type ParsedAstGlobals = Writable<ModelGlobals>;
17224
15003
  interface ParsedAstElementView {
17225
15004
  __: 'element';
17226
15005
  id: ViewId;
@@ -17283,19 +15062,8 @@ interface LikeC4DocumentProps {
17283
15062
  type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
17284
15063
  interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
17285
15064
  }
17286
- interface FqnIndexedDocument extends SetRequired<LikeC4LangiumDocument, 'c4fqnIndex'> {
17287
- }
17288
15065
  interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
17289
15066
  }
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
15067
 
17300
15068
  declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
17301
15069
  private services;
@@ -17363,8 +15131,8 @@ declare class LikeC4ScopeProvider extends DefaultScopeProvider {
17363
15131
  private scopeExtendElement;
17364
15132
  private scopeElementView;
17365
15133
  getScope(context: ReferenceInfo): Scope;
17366
- protected getScopeForDeploymentRef(container: DeploymentRef, context: ReferenceInfo): Scope;
17367
- protected computeScope(context: ReferenceInfo, referenceType?: string): Scope;
15134
+ protected getScopeForFqnRef(container: FqnRef, context: ReferenceInfo): any;
15135
+ protected computeScope(context: ReferenceInfo, referenceType?: any): any;
17368
15136
  }
17369
15137
 
17370
15138
  declare class DeploymentsIndex {
@@ -17381,9 +15149,12 @@ declare class DeploymentsIndex {
17381
15149
  */
17382
15150
  nested(node: DeploymentNode): Stream<DeploymentAstNodeDescription>;
17383
15151
  byFqn(fqnName: string): Stream<DeploymentAstNodeDescription>;
17384
- getFqnName(node: DeploymentElement): Fqn;
15152
+ getFqn(node: DeploymentElement): Fqn;
17385
15153
  createDocumentIndex(document: LikeC4LangiumDocument): DocumentDeploymentsIndex;
17386
15154
  }
15155
+ /**
15156
+ * Index of deployment elements in the document
15157
+ */
17387
15158
  declare class DocumentDeploymentsIndex {
17388
15159
  private _rootNodes;
17389
15160
  /**
@@ -17418,11 +15189,12 @@ declare class DocumentDeploymentsIndex {
17418
15189
  */
17419
15190
  unique(): readonly DeploymentAstNodeDescription[];
17420
15191
  }
15192
+
17421
15193
  declare class FqnIndex {
17422
15194
  private services;
17423
15195
  protected langiumDocuments: LangiumDocuments;
17424
15196
  constructor(services: LikeC4Services);
17425
- get documents(): Stream<FqnIndexedDocument>;
15197
+ get documents(): any;
17426
15198
  private entries;
17427
15199
  getFqn(el: Element): Fqn | null;
17428
15200
  byFqn(fqn: Fqn): Stream<AstNodeDescription>;
@@ -17433,7 +15205,7 @@ declare class FqnIndex {
17433
15205
  uniqueDescedants(parent: Fqn): Stream<AstNodeDescription>;
17434
15206
  }
17435
15207
 
17436
- type ModelParsedListener$1 = (docs: URI[]) => void;
15208
+ type ModelParsedListener = (docs: URI[]) => void;
17437
15209
  declare class LikeC4ModelBuilder {
17438
15210
  private services;
17439
15211
  private langiumDocuments;
@@ -17455,7 +15227,7 @@ declare class LikeC4ModelBuilder {
17455
15227
  unsafeSyncBuildComputedModel(model: ParsedLikeC4Model): ComputedLikeC4Model;
17456
15228
  buildComputedModel(cancelToken?: CancellationToken): Promise<ComputedLikeC4Model | null>;
17457
15229
  computeView(viewId: ViewId, cancelToken?: CancellationToken): Promise<ComputedView | null>;
17458
- onModelParsed(callback: ModelParsedListener$1): Disposable;
15230
+ onModelParsed(callback: ModelParsedListener): Disposable;
17459
15231
  private documents;
17460
15232
  private notifyListeners;
17461
15233
  }
@@ -17472,72 +15244,322 @@ declare class LikeC4ModelLocator {
17472
15244
  locateDeploymentElement(fqn: Fqn, _prop?: string): Location | null;
17473
15245
  locateRelation(relationId: RelationId): Location | null;
17474
15246
  locateViewAst(viewId: ViewId): {
17475
- doc: ParsedLikeC4LangiumDocument;
17476
- view: ParsedAstView;
15247
+ doc: any;
15248
+ view: any;
17477
15249
  viewAst: LikeC4View;
17478
- };
15250
+ } | null;
17479
15251
  locateView(viewId: ViewId): Location | null;
17480
15252
  }
17481
- type IsValidFn = ChecksFromDiagnostics['isValid'];
15253
+
15254
+ declare class BaseParser {
15255
+ readonly services: LikeC4Services;
15256
+ readonly doc: ParsedLikeC4LangiumDocument;
15257
+ isValid: IsValidFn;
15258
+ constructor(services: LikeC4Services, doc: ParsedLikeC4LangiumDocument);
15259
+ resolveFqn(node: FqnReferenceable): Fqn;
15260
+ getAstNodePath(node: AstNode): any;
15261
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15262
+ [key: string]: string;
15263
+ } | undefined;
15264
+ convertTags<E extends {
15265
+ tags?: Tags;
15266
+ }>(withTags?: E): any;
15267
+ parseTags<E extends {
15268
+ tags?: Tags;
15269
+ }>(withTags?: E): NonEmptyArray<Tag$1> | null;
15270
+ convertLinks(source?: LinkProperty['$container']): ParsedLink[] | undefined;
15271
+ parseLinks(source?: LinkProperty['$container']): ParsedLink[] | undefined;
15272
+ }
15273
+
15274
+ declare const DocumentParserFromMixins: {
15275
+ new (...args: any[]): {
15276
+ parseGlobals(): void;
15277
+ parseAndStoreGlobalPredicateGroupOrDynamic(astRule: GlobalPredicateGroup | GlobalDynamicPredicateGroup, id: invariant, c4Globals: ParsedAstGlobals): void;
15278
+ parseGlobalPredicateGroup(astRule: GlobalPredicateGroup): invariant[];
15279
+ parseGlobalDynamicPredicateGroup(astRule: GlobalDynamicPredicateGroup): invariant[];
15280
+ parseGlobalStyleOrGroup(astRule: GlobalStyle | GlobalStyleGroup): invariant[];
15281
+ parseViews(): void;
15282
+ parseElementView(astNode: ElementView, additionalStyles: invariant[]): ParsedAstElementView;
15283
+ parseViewRule(astRule: ViewRule): invariant;
15284
+ parseViewRulePredicate(astNode: ViewRulePredicate): invariant;
15285
+ parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): invariant;
15286
+ parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): invariant;
15287
+ parseViewRuleGroup(astNode: ViewRuleGroup): invariant;
15288
+ parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): invariant;
15289
+ parseRuleStyle(styleProperties: StyleProperty[], elementExpressionsIterator: ElementExpressionsIterator, notationProperty?: NotationProperty): invariant;
15290
+ parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): invariant;
15291
+ parseDynamicElementView(astNode: DynamicView, additionalStyles: invariant[]): ParsedAstDynamicView;
15292
+ parseDynamicViewRule(astRule: DynamicViewRule): invariant;
15293
+ parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): invariant;
15294
+ parseDynamicParallelSteps(node: DynamicViewParallelSteps): invariant;
15295
+ parseDynamicStep(node: DynamicViewStep): invariant;
15296
+ parsePredicate(astNode: Predicate): invariant;
15297
+ parseElementPredicate(astNode: ElementPredicate): invariant;
15298
+ parseElementExpressionsIterator(astNode: ElementExpressionsIterator): invariant[];
15299
+ parseElementExpression(astNode: ElementExpression): invariant;
15300
+ parseElementPredicateWhere(astNode: ElementPredicateWhere): invariant;
15301
+ parseElementPredicateWith(astNode: ElementPredicateWith): invariant;
15302
+ parseRelationPredicate(astNode: RelationPredicate): invariant;
15303
+ parseRelationPredicateWhere(astNode: RelationPredicateWhere): invariant;
15304
+ parseRelationPredicateWith(astNode: RelationPredicateWith, relation: invariant | invariant): invariant;
15305
+ parseRelationExpression(astNode: RelationExpression): invariant;
15306
+ isValid: IsValidFn;
15307
+ readonly services: LikeC4Services;
15308
+ readonly doc: ParsedLikeC4LangiumDocument;
15309
+ resolveFqn(node: FqnReferenceable): invariant;
15310
+ getAstNodePath(node: invariant): any;
15311
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15312
+ [key: string]: string;
15313
+ } | undefined;
15314
+ convertTags<E extends {
15315
+ tags?: Tags;
15316
+ }>(withTags?: E | undefined): any;
15317
+ parseTags<E extends {
15318
+ tags?: Tags;
15319
+ }>(withTags?: E): invariant<invariant> | null;
15320
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15321
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15322
+ parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
15323
+ parseDeploymentViewRule(astRule: DeploymentViewRule): invariant;
15324
+ parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): invariant;
15325
+ parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): invariant;
15326
+ parseFqnRef(astNode: FqnRef): invariant;
15327
+ parseFqnExpr(astNode: FqnExpr): invariant;
15328
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15329
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15330
+ parseRelationExpr(astNode: RelationExpr): invariant;
15331
+ parseDeployment(): void;
15332
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15333
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15334
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15335
+ };
15336
+ } & {
15337
+ new (...args: any[]): {
15338
+ parseViews(): void;
15339
+ parseElementView(astNode: ElementView, additionalStyles: invariant[]): ParsedAstElementView;
15340
+ parseViewRule(astRule: ViewRule): invariant;
15341
+ parseViewRulePredicate(astNode: ViewRulePredicate): invariant;
15342
+ parseViewRuleGlobalPredicateRef(astRule: ViewRuleGlobalPredicateRef | DynamicViewGlobalPredicateRef): invariant;
15343
+ parseViewRuleStyleOrGlobalRef(astRule: ViewRuleStyleOrGlobalRef): invariant;
15344
+ parseViewRuleGroup(astNode: ViewRuleGroup): invariant;
15345
+ parseViewRuleStyle(astRule: ViewRuleStyle | GlobalStyle): invariant;
15346
+ parseRuleStyle(styleProperties: StyleProperty[], elementExpressionsIterator: ElementExpressionsIterator, notationProperty?: NotationProperty): invariant;
15347
+ parseViewRuleGlobalStyle(astRule: ViewRuleGlobalStyle): invariant;
15348
+ parseDynamicElementView(astNode: DynamicView, additionalStyles: invariant[]): ParsedAstDynamicView;
15349
+ parseDynamicViewRule(astRule: DynamicViewRule): invariant;
15350
+ parseDynamicViewIncludePredicate(astRule: DynamicViewIncludePredicate): invariant;
15351
+ parseDynamicParallelSteps(node: DynamicViewParallelSteps): invariant;
15352
+ parseDynamicStep(node: DynamicViewStep): invariant;
15353
+ parsePredicate(astNode: Predicate): invariant;
15354
+ parseElementPredicate(astNode: ElementPredicate): invariant;
15355
+ parseElementExpressionsIterator(astNode: ElementExpressionsIterator): invariant[];
15356
+ parseElementExpression(astNode: ElementExpression): invariant;
15357
+ parseElementPredicateWhere(astNode: ElementPredicateWhere): invariant;
15358
+ parseElementPredicateWith(astNode: ElementPredicateWith): invariant;
15359
+ parseRelationPredicate(astNode: RelationPredicate): invariant;
15360
+ parseRelationPredicateWhere(astNode: RelationPredicateWhere): invariant;
15361
+ parseRelationPredicateWith(astNode: RelationPredicateWith, relation: invariant | invariant): invariant;
15362
+ parseRelationExpression(astNode: RelationExpression): invariant;
15363
+ isValid: IsValidFn;
15364
+ readonly services: LikeC4Services;
15365
+ readonly doc: ParsedLikeC4LangiumDocument;
15366
+ resolveFqn(node: FqnReferenceable): invariant;
15367
+ getAstNodePath(node: invariant): any;
15368
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15369
+ [key: string]: string;
15370
+ } | undefined;
15371
+ convertTags<E extends {
15372
+ tags?: Tags;
15373
+ }>(withTags?: E | undefined): any;
15374
+ parseTags<E extends {
15375
+ tags?: Tags;
15376
+ }>(withTags?: E): invariant<invariant> | null;
15377
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15378
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15379
+ parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
15380
+ parseDeploymentViewRule(astRule: DeploymentViewRule): invariant;
15381
+ parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): invariant;
15382
+ parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): invariant;
15383
+ parseFqnRef(astNode: FqnRef): invariant;
15384
+ parseFqnExpr(astNode: FqnExpr): invariant;
15385
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15386
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15387
+ parseRelationExpr(astNode: RelationExpr): invariant;
15388
+ parseDeployment(): void;
15389
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15390
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15391
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15392
+ };
15393
+ } & {
15394
+ new (...args: any[]): {
15395
+ parseSpecification(): void;
15396
+ parseSpecificationDeploymentNodeKind({ kind, props }: SpecificationDeploymentNodeKind): {};
15397
+ isValid: IsValidFn;
15398
+ readonly services: LikeC4Services;
15399
+ readonly doc: ParsedLikeC4LangiumDocument;
15400
+ resolveFqn(node: FqnReferenceable): invariant;
15401
+ getAstNodePath(node: invariant): any;
15402
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15403
+ [key: string]: string;
15404
+ } | undefined;
15405
+ convertTags<E extends {
15406
+ tags?: Tags;
15407
+ }>(withTags?: E | undefined): any;
15408
+ parseTags<E extends {
15409
+ tags?: Tags;
15410
+ }>(withTags?: E): invariant<invariant> | null;
15411
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15412
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15413
+ };
15414
+ } & {
15415
+ new (...args: any[]): {
15416
+ parsePredicate(astNode: Predicate): invariant;
15417
+ parseElementPredicate(astNode: ElementPredicate): invariant;
15418
+ parseElementExpressionsIterator(astNode: ElementExpressionsIterator): invariant[];
15419
+ parseElementExpression(astNode: ElementExpression): invariant;
15420
+ parseElementPredicateWhere(astNode: ElementPredicateWhere): invariant;
15421
+ parseElementPredicateWith(astNode: ElementPredicateWith): invariant;
15422
+ parseRelationPredicate(astNode: RelationPredicate): invariant;
15423
+ parseRelationPredicateWhere(astNode: RelationPredicateWhere): invariant;
15424
+ parseRelationPredicateWith(astNode: RelationPredicateWith, relation: invariant | invariant): invariant;
15425
+ parseRelationExpression(astNode: RelationExpression): invariant;
15426
+ isValid: IsValidFn;
15427
+ readonly services: LikeC4Services;
15428
+ readonly doc: ParsedLikeC4LangiumDocument;
15429
+ resolveFqn(node: FqnReferenceable): invariant;
15430
+ getAstNodePath(node: invariant): any;
15431
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15432
+ [key: string]: string;
15433
+ } | undefined;
15434
+ convertTags<E extends {
15435
+ tags?: Tags;
15436
+ }>(withTags?: E | undefined): any;
15437
+ parseTags<E extends {
15438
+ tags?: Tags;
15439
+ }>(withTags?: E): invariant<invariant> | null;
15440
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15441
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15442
+ };
15443
+ } & {
15444
+ new (...args: any[]): {
15445
+ parseDeploymentView(astNode: DeploymentView): ParsedAstDeploymentView;
15446
+ parseDeploymentViewRule(astRule: DeploymentViewRule): invariant;
15447
+ parseDeploymentViewRulePredicate(astRule: DeploymentViewRulePredicate): invariant;
15448
+ parseDeploymentViewRuleStyle(astRule: DeploymentViewRuleStyle): invariant;
15449
+ parseFqnRef(astNode: FqnRef): invariant;
15450
+ parseFqnExpr(astNode: FqnExpr): invariant;
15451
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15452
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15453
+ parseRelationExpr(astNode: RelationExpr): invariant;
15454
+ isValid: IsValidFn;
15455
+ readonly services: LikeC4Services;
15456
+ readonly doc: ParsedLikeC4LangiumDocument;
15457
+ resolveFqn(node: FqnReferenceable): invariant;
15458
+ getAstNodePath(node: invariant): any;
15459
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15460
+ [key: string]: string;
15461
+ } | undefined;
15462
+ convertTags<E extends {
15463
+ tags?: Tags;
15464
+ }>(withTags?: E | undefined): any;
15465
+ parseTags<E extends {
15466
+ tags?: Tags;
15467
+ }>(withTags?: E): invariant<invariant> | null;
15468
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15469
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15470
+ parseDeployment(): void;
15471
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15472
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15473
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15474
+ };
15475
+ } & {
15476
+ new (...args: any[]): {
15477
+ parseDeployment(): void;
15478
+ parseDeploymentNode(astNode: DeploymentNode): ParsedAstDeployment.Node;
15479
+ parseDeployedInstance(astNode: DeployedInstance): ParsedAstDeployment.Instance;
15480
+ parseDeploymentRelation(astNode: DeploymentRelation): ParsedAstDeploymentRelation;
15481
+ parseFqnRef(astNode: FqnRef): invariant;
15482
+ parseFqnExpr(astNode: FqnExpr): invariant;
15483
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15484
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15485
+ parseRelationExpr(astNode: RelationExpr): invariant;
15486
+ isValid: IsValidFn;
15487
+ readonly services: LikeC4Services;
15488
+ readonly doc: ParsedLikeC4LangiumDocument;
15489
+ resolveFqn(node: FqnReferenceable): invariant;
15490
+ getAstNodePath(node: invariant): any;
15491
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15492
+ [key: string]: string;
15493
+ } | undefined;
15494
+ convertTags<E extends {
15495
+ tags?: Tags;
15496
+ }>(withTags?: E | undefined): any;
15497
+ parseTags<E extends {
15498
+ tags?: Tags;
15499
+ }>(withTags?: E): invariant<invariant> | null;
15500
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15501
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15502
+ };
15503
+ } & {
15504
+ new (...args: any[]): {
15505
+ parseModel(): void;
15506
+ parseElement(astNode: Element): ParsedAstElement;
15507
+ parseRelation(astNode: Relation): ParsedAstRelation;
15508
+ isValid: IsValidFn;
15509
+ readonly services: LikeC4Services;
15510
+ readonly doc: ParsedLikeC4LangiumDocument;
15511
+ resolveFqn(node: FqnReferenceable): invariant;
15512
+ getAstNodePath(node: invariant): any;
15513
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15514
+ [key: string]: string;
15515
+ } | undefined;
15516
+ convertTags<E extends {
15517
+ tags?: Tags;
15518
+ }>(withTags?: E | undefined): any;
15519
+ parseTags<E extends {
15520
+ tags?: Tags;
15521
+ }>(withTags?: E): invariant<invariant> | null;
15522
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15523
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15524
+ };
15525
+ } & {
15526
+ new (...args: any[]): {
15527
+ parseFqnRef(astNode: FqnRef): invariant;
15528
+ parseFqnExpr(astNode: FqnExpr): invariant;
15529
+ parseFqnRefExpr(astNode: FqnRefExpr): invariant;
15530
+ parseFqnExpressions(astNode: FqnExpressions): invariant[];
15531
+ parseRelationExpr(astNode: RelationExpr): invariant;
15532
+ isValid: IsValidFn;
15533
+ readonly services: LikeC4Services;
15534
+ readonly doc: ParsedLikeC4LangiumDocument;
15535
+ resolveFqn(node: FqnReferenceable): invariant;
15536
+ getAstNodePath(node: invariant): any;
15537
+ getMetadata(metadataAstNode: MetadataProperty | undefined): {
15538
+ [key: string]: string;
15539
+ } | undefined;
15540
+ convertTags<E extends {
15541
+ tags?: Tags;
15542
+ }>(withTags?: E | undefined): any;
15543
+ parseTags<E extends {
15544
+ tags?: Tags;
15545
+ }>(withTags?: E): invariant<invariant> | null;
15546
+ convertLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15547
+ parseLinks(source?: LinkProperty["$container"]): ParsedLink[] | undefined;
15548
+ };
15549
+ } & typeof BaseParser;
15550
+ declare class DocumentParser extends DocumentParserFromMixins {
15551
+ }
17482
15552
  declare class LikeC4ModelParser {
17483
15553
  private services;
17484
- private fqnIndex;
15554
+ private cachedParsers;
17485
15555
  constructor(services: LikeC4Services);
17486
15556
  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;
15557
+ forDocument(doc: LangiumDocument): DocumentParser;
15558
+ }
15559
+
15560
+ interface ChangeViewRequestParams {
15561
+ viewId: ViewId;
15562
+ change: ViewChange;
17541
15563
  }
17542
15564
 
17543
15565
  declare class LikeC4ModelChanges {
@@ -17582,7 +15604,7 @@ declare class LikeC4WorkspaceManager extends DefaultWorkspaceManager {
17582
15604
  * your language, which can be either loaded from provided files or constructed in memory.
17583
15605
  */
17584
15606
  protected loadAdditionalDocuments(folders: WorkspaceFolder[], collector: (document: LangiumDocument) => void): Promise<void>;
17585
- workspace(): WorkspaceFolder;
15607
+ workspace(): any;
17586
15608
  get workspaceUri(): URI;
17587
15609
  get workspaceURL(): URL;
17588
15610
  }
@@ -18436,4 +16458,4 @@ declare class LikeC4 {
18436
16458
  dispose(): void;
18437
16459
  }
18438
16460
 
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 };
16461
+ 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 };