likec4 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/__app__ → __app__}/react/likec4.tsx +9 -26
- package/{dist/__app__/src/chunks/-index-overview-DNT3FQkn.js → __app__/src/chunks/-index-overview-CBnvpD1d.js} +12 -12
- package/{dist/__app__/src/chunks/likec4-CLNXvKhh.js → __app__/src/chunks/likec4-DslTxitT.js} +50 -41
- package/{dist/__app__/src/chunks/main-Beyl8kQ7.js → __app__/src/chunks/main-ByUdz_Be.js} +14236 -13301
- package/{dist/__app__/src/chunks/mantine-CdYQpHSU.js → __app__/src/chunks/mantine-oFa3ZrEq.js} +1731 -713
- package/{dist/__app__/src/chunks/tanstack-router-DJI32bwX.js → __app__/src/chunks/tanstack-router-BWjXKr0n.js} +1 -1
- package/{dist/__app__ → __app__}/src/main.js +1 -1
- package/{dist/__app__ → __app__}/src/style.css +1 -1
- package/{dist/__app__ → __app__}/webcomponent/webcomponent.js +30987 -28447
- package/dist/chunks/prompt.mjs +3 -3
- package/dist/cli/index.mjs +210 -179
- package/dist/index.d.mts +1785 -722
- package/dist/index.d.ts +1785 -722
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.lgHXhASw.mjs +1832 -0
- package/package.json +37 -37
- package/react/index.d.ts +896 -423
- package/react/index.mjs +32935 -29389
- package/react/style.css +1 -1
- package/dist/shared/likec4.D5WUQlNc.mjs +0 -1824
- /package/{dist/__app__ → __app__}/favicon.ico +0 -0
- /package/{dist/__app__ → __app__}/favicon.svg +0 -0
- /package/{dist/__app__ → __app__}/index.html +0 -0
- /package/{dist/__app__ → __app__}/robots.txt +0 -0
- /package/{dist/__app__ → __app__}/src/chunks/-view-lazy-data-WZmbIsHq.js +0 -0
- /package/{dist/__app__ → __app__}/src/chunks/index-CIsxIzOH.js +0 -0
- /package/{dist/__app__ → __app__}/src/const.js +0 -0
- /package/{dist/__app__ → __app__}/src/icons.js +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LiteralUnion, Tagged, TupleToUnion, NonEmptyTuple,
|
|
1
|
+
import { LiteralUnion, Tagged, Simplify, MergeExclusive, TupleToUnion, NonEmptyTuple, UnionToIntersection, IsLiteral, SetRequired, IsNumericLiteral, IfNever, ValueOf, ConditionalPick } from 'type-fest';
|
|
2
2
|
|
|
3
3
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
4
4
|
type IconUrl = Tagged<string, 'IconUrl'> | 'none';
|
|
@@ -8,6 +8,7 @@ interface XYPoint {
|
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
}
|
|
11
|
+
type KeysOf<T> = keyof T extends infer K extends string ? K : never;
|
|
11
12
|
|
|
12
13
|
declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
|
|
13
14
|
type ThemeColor$1 = typeof ThemeColors[number];
|
|
@@ -30,7 +31,7 @@ interface ThemeColorValues {
|
|
|
30
31
|
relationships: RelationshipThemeColorValues;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
type Fqn
|
|
34
|
+
type Fqn<Id extends string = string> = Tagged<Id, 'Fqn'>;
|
|
34
35
|
declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
|
|
35
36
|
type BorderStyle = TupleToUnion<typeof BorderStyles>;
|
|
36
37
|
type ElementKind$1<Kinds extends string = string> = Tagged<Kinds, 'ElementKind'>;
|
|
@@ -40,8 +41,13 @@ declare namespace ElementKind$1 {
|
|
|
40
41
|
declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue"];
|
|
41
42
|
type ElementShape$1 = TupleToUnion<typeof ElementShapes>;
|
|
42
43
|
interface ElementStyle {
|
|
43
|
-
border?: BorderStyle;
|
|
44
|
-
|
|
44
|
+
readonly border?: BorderStyle;
|
|
45
|
+
/**
|
|
46
|
+
* In percentage 0-100, 0 is fully transparent
|
|
47
|
+
*
|
|
48
|
+
* @default 100
|
|
49
|
+
*/
|
|
50
|
+
readonly opacity?: number;
|
|
45
51
|
}
|
|
46
52
|
type Tag$1<Tags extends string = string> = Tagged<Tags, 'Tag'>;
|
|
47
53
|
interface Link {
|
|
@@ -50,7 +56,7 @@ interface Link {
|
|
|
50
56
|
readonly relative?: string;
|
|
51
57
|
}
|
|
52
58
|
interface TypedElement<Ids extends string, Kinds extends string, Tags extends string, MetadataKeys extends string = never> {
|
|
53
|
-
readonly id: Fqn
|
|
59
|
+
readonly id: Fqn<Ids>;
|
|
54
60
|
readonly kind: ElementKind$1<Kinds>;
|
|
55
61
|
readonly title: string;
|
|
56
62
|
readonly description: string | null;
|
|
@@ -86,30 +92,129 @@ type EqualOperator<V> = {
|
|
|
86
92
|
eq?: never;
|
|
87
93
|
neq: V;
|
|
88
94
|
};
|
|
89
|
-
type AllNever = {
|
|
95
|
+
type AllNever$1 = {
|
|
90
96
|
not?: never;
|
|
91
97
|
and?: never;
|
|
92
98
|
or?: never;
|
|
93
99
|
tag?: never;
|
|
94
100
|
kind?: never;
|
|
95
101
|
};
|
|
96
|
-
type TagEqual<Tag> = Omit<AllNever, 'tag'> & {
|
|
102
|
+
type TagEqual<Tag> = Omit<AllNever$1, 'tag'> & {
|
|
97
103
|
tag: EqualOperator<Tag>;
|
|
98
104
|
};
|
|
99
|
-
type KindEqual<Kind> = Omit<AllNever, 'kind'> & {
|
|
105
|
+
type KindEqual<Kind> = Omit<AllNever$1, 'kind'> & {
|
|
100
106
|
kind: EqualOperator<Kind>;
|
|
101
107
|
};
|
|
102
|
-
type NotOperator<Tag, Kind> = Omit<AllNever, 'not'> & {
|
|
108
|
+
type NotOperator<Tag, Kind> = Omit<AllNever$1, 'not'> & {
|
|
103
109
|
not: WhereOperator<Tag, Kind>;
|
|
104
110
|
};
|
|
105
|
-
type AndOperator<Tag, Kind> = Omit<AllNever, 'and'> & {
|
|
111
|
+
type AndOperator<Tag, Kind> = Omit<AllNever$1, 'and'> & {
|
|
106
112
|
and: NonEmptyArray<WhereOperator<Tag, Kind>>;
|
|
107
113
|
};
|
|
108
|
-
type OrOperator<Tag, Kind> = Omit<AllNever, 'or'> & {
|
|
114
|
+
type OrOperator<Tag, Kind> = Omit<AllNever$1, 'or'> & {
|
|
109
115
|
or: NonEmptyArray<WhereOperator<Tag, Kind>>;
|
|
110
116
|
};
|
|
111
117
|
type WhereOperator<Tag, Kind> = TagEqual<Tag> | KindEqual<Kind> | NotOperator<Tag, Kind> | AndOperator<Tag, Kind> | OrOperator<Tag, Kind>;
|
|
112
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
|
+
|
|
113
218
|
type GlobalPredicateId = Tagged<string, 'GlobalPredicateId'>;
|
|
114
219
|
type GlobalPredicates = NonEmptyArray<ViewRulePredicate$1>;
|
|
115
220
|
type GlobalDynamicPredicates = NonEmptyArray<DynamicViewIncludeRule>;
|
|
@@ -122,13 +227,13 @@ interface ModelGlobals {
|
|
|
122
227
|
}
|
|
123
228
|
|
|
124
229
|
type ElementNotation = {
|
|
125
|
-
kinds:
|
|
230
|
+
kinds: string[];
|
|
126
231
|
shape: ElementShape$1;
|
|
127
232
|
color: Color$1;
|
|
128
233
|
title: string;
|
|
129
234
|
};
|
|
130
235
|
|
|
131
|
-
type
|
|
236
|
+
type ViewId<Id extends string = string> = Tagged<Id, 'ViewID'>;
|
|
132
237
|
type ViewRulePredicate$1 = {
|
|
133
238
|
include: Expression$1[];
|
|
134
239
|
exclude?: never;
|
|
@@ -165,9 +270,9 @@ interface ViewRuleGroup$1 {
|
|
|
165
270
|
opacity?: number;
|
|
166
271
|
}
|
|
167
272
|
type ViewRule$1 = ViewRulePredicate$1 | ViewRuleGlobalPredicateRef$1 | ViewRuleGroup$1 | ViewRuleStyle$1 | ViewRuleGlobalStyle$1 | ViewRuleAutoLayout$1;
|
|
168
|
-
interface BasicView<ViewType extends 'element' | 'dynamic', ViewIDs extends string, Tags extends string> {
|
|
273
|
+
interface BasicView<ViewType extends 'element' | 'dynamic' | 'deployment', ViewIDs extends string, Tags extends string> {
|
|
169
274
|
readonly __?: ViewType;
|
|
170
|
-
readonly id:
|
|
275
|
+
readonly id: ViewId<ViewIDs>;
|
|
171
276
|
readonly title: string | null;
|
|
172
277
|
readonly description: string | null;
|
|
173
278
|
readonly tags: NonEmptyArray<Tag$1<Tags>> | null;
|
|
@@ -193,19 +298,19 @@ interface BasicView<ViewType extends 'element' | 'dynamic', ViewIDs extends stri
|
|
|
193
298
|
readonly customColorDefinitions: CustomColorDefinitions;
|
|
194
299
|
}
|
|
195
300
|
interface BasicElementView<ViewIDs extends string, Tags extends string> extends BasicView<'element', ViewIDs, Tags> {
|
|
196
|
-
readonly viewOf?: Fqn
|
|
301
|
+
readonly viewOf?: Fqn;
|
|
197
302
|
readonly rules: ViewRule$1[];
|
|
198
303
|
}
|
|
199
304
|
interface ScopedElementView<ViewIDs extends string, Tags extends string> extends BasicElementView<ViewIDs, Tags> {
|
|
200
|
-
readonly viewOf: Fqn
|
|
305
|
+
readonly viewOf: Fqn;
|
|
201
306
|
}
|
|
202
307
|
interface ExtendsElementView<ViewIDs extends string, Tags extends string> extends BasicElementView<ViewIDs, Tags> {
|
|
203
|
-
readonly extends:
|
|
308
|
+
readonly extends: ViewId<ViewIDs>;
|
|
204
309
|
}
|
|
205
310
|
type ElementView$1<ViewIDs extends string = string, Tags extends string = string> = ScopedElementView<ViewIDs, Tags> | ExtendsElementView<ViewIDs, Tags> | BasicElementView<ViewIDs, Tags>;
|
|
206
311
|
interface DynamicViewStep$1 {
|
|
207
|
-
readonly source: Fqn
|
|
208
|
-
readonly target: Fqn
|
|
312
|
+
readonly source: Fqn;
|
|
313
|
+
readonly target: Fqn;
|
|
209
314
|
readonly title: string | null;
|
|
210
315
|
readonly description?: string;
|
|
211
316
|
readonly technology?: string;
|
|
@@ -216,7 +321,7 @@ interface DynamicViewStep$1 {
|
|
|
216
321
|
readonly head?: RelationshipArrowType;
|
|
217
322
|
readonly tail?: RelationshipArrowType;
|
|
218
323
|
readonly isBackward?: boolean;
|
|
219
|
-
readonly navigateTo?:
|
|
324
|
+
readonly navigateTo?: ViewId;
|
|
220
325
|
__parallel?: never;
|
|
221
326
|
}
|
|
222
327
|
interface DynamicViewParallelSteps$1 {
|
|
@@ -235,18 +340,54 @@ interface DynamicView$1<ViewIDs extends string = string, Tags extends string = s
|
|
|
235
340
|
type CustomColorDefinitions = {
|
|
236
341
|
[key: string]: ThemeColorValues;
|
|
237
342
|
};
|
|
238
|
-
type
|
|
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;
|
|
239
371
|
type NodeId<IDs extends string = string> = Tagged<IDs, 'Fqn'>;
|
|
240
|
-
type EdgeId
|
|
372
|
+
type EdgeId = Tagged<string, 'EdgeId'>;
|
|
241
373
|
type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
|
|
242
374
|
type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
|
|
243
|
-
declare function StepEdgeId(step: number, parallelStep?: number): StepEdgeId;
|
|
244
375
|
declare function isStepEdgeId(id: string): id is StepEdgeId;
|
|
245
|
-
declare function extractStep(id: EdgeId
|
|
376
|
+
declare function extractStep(id: EdgeId): number;
|
|
246
377
|
interface ComputedNode {
|
|
247
378
|
id: NodeId;
|
|
248
|
-
kind:
|
|
379
|
+
kind: string;
|
|
249
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;
|
|
250
391
|
title: string;
|
|
251
392
|
description: string | null;
|
|
252
393
|
technology: string | null;
|
|
@@ -254,19 +395,16 @@ interface ComputedNode {
|
|
|
254
395
|
tags: NonEmptyArray<Tag$1> | null;
|
|
255
396
|
links: NonEmptyArray<Link> | null;
|
|
256
397
|
children: NodeId[];
|
|
257
|
-
inEdges: EdgeId
|
|
258
|
-
outEdges: EdgeId
|
|
398
|
+
inEdges: EdgeId[];
|
|
399
|
+
outEdges: EdgeId[];
|
|
259
400
|
shape: ElementShape$1;
|
|
260
|
-
/**
|
|
261
|
-
* @deprecated Use `style` instead
|
|
262
|
-
*/
|
|
263
401
|
color: Color$1;
|
|
264
402
|
/**
|
|
265
403
|
* @deprecated Use `style` instead
|
|
266
404
|
*/
|
|
267
405
|
icon?: IconUrl;
|
|
268
406
|
style: ElementStyle;
|
|
269
|
-
navigateTo?:
|
|
407
|
+
navigateTo?: ViewId;
|
|
270
408
|
level: number;
|
|
271
409
|
depth?: number;
|
|
272
410
|
/**
|
|
@@ -275,20 +413,22 @@ interface ComputedNode {
|
|
|
275
413
|
isCustomized?: boolean;
|
|
276
414
|
}
|
|
277
415
|
declare namespace ComputedNode {
|
|
416
|
+
function modelRef(node: ComputedNode): Fqn | null;
|
|
417
|
+
function deploymentRef(node: ComputedNode): Fqn | null;
|
|
278
418
|
/**
|
|
279
419
|
* Nodes group is a special kind of node, exisiting only in view
|
|
280
420
|
*/
|
|
281
421
|
function isNodesGroup(node: ComputedNode): boolean;
|
|
282
422
|
}
|
|
283
423
|
interface ComputedEdge {
|
|
284
|
-
id: EdgeId
|
|
424
|
+
id: EdgeId;
|
|
285
425
|
parent: NodeId | null;
|
|
286
426
|
source: NodeId;
|
|
287
427
|
target: NodeId;
|
|
288
428
|
label: string | null;
|
|
289
429
|
description?: string;
|
|
290
430
|
technology?: string;
|
|
291
|
-
relations:
|
|
431
|
+
relations: RelationId[];
|
|
292
432
|
kind?: RelationshipKind$1;
|
|
293
433
|
notation?: string;
|
|
294
434
|
notes?: string;
|
|
@@ -297,7 +437,7 @@ interface ComputedEdge {
|
|
|
297
437
|
head?: RelationshipArrowType;
|
|
298
438
|
tail?: RelationshipArrowType;
|
|
299
439
|
tags?: NonEmptyArray<Tag$1>;
|
|
300
|
-
navigateTo?:
|
|
440
|
+
navigateTo?: ViewId;
|
|
301
441
|
/**
|
|
302
442
|
* If this edge is derived from custom relationship predicate
|
|
303
443
|
*/
|
|
@@ -306,7 +446,7 @@ interface ComputedEdge {
|
|
|
306
446
|
* For layouting purposes
|
|
307
447
|
* @default 'forward'
|
|
308
448
|
*/
|
|
309
|
-
dir?: 'forward' | 'back';
|
|
449
|
+
dir?: 'forward' | 'back' | 'both';
|
|
310
450
|
}
|
|
311
451
|
interface ViewWithHash {
|
|
312
452
|
/**
|
|
@@ -326,7 +466,7 @@ interface ViewAutoLayout {
|
|
|
326
466
|
nodeSep?: number;
|
|
327
467
|
}
|
|
328
468
|
interface ComputedElementView<ViewIDs extends string = string, Tags extends string = string> extends Omit<ElementView$1<ViewIDs, Tags>, 'rules' | 'docUri'>, ViewWithHash, ViewWithNotation {
|
|
329
|
-
readonly extends?:
|
|
469
|
+
readonly extends?: ViewId<ViewIDs>;
|
|
330
470
|
readonly autoLayout: ViewAutoLayout;
|
|
331
471
|
readonly nodes: ComputedNode[];
|
|
332
472
|
readonly edges: ComputedEdge[];
|
|
@@ -341,8 +481,19 @@ interface ComputedDynamicView<ViewIDs extends string = string, Tags extends stri
|
|
|
341
481
|
rules?: never;
|
|
342
482
|
docUri?: never;
|
|
343
483
|
}
|
|
344
|
-
|
|
345
|
-
|
|
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
|
+
}
|
|
346
497
|
type BBox = {
|
|
347
498
|
x: number;
|
|
348
499
|
y: number;
|
|
@@ -356,6 +507,8 @@ interface DiagramNode extends ComputedNode {
|
|
|
356
507
|
labelBBox: BBox;
|
|
357
508
|
}
|
|
358
509
|
declare namespace DiagramNode {
|
|
510
|
+
function modelRef(node: DiagramNode): Fqn | null;
|
|
511
|
+
function deploymentRef(node: DiagramNode): Fqn | null;
|
|
359
512
|
/**
|
|
360
513
|
* Nodes group is a special kind of node, exisiting only in view
|
|
361
514
|
*/
|
|
@@ -400,14 +553,14 @@ type ViewManualLayout = {
|
|
|
400
553
|
}>;
|
|
401
554
|
};
|
|
402
555
|
|
|
403
|
-
type
|
|
556
|
+
type RelationId = Tagged<string, 'RelationID'>;
|
|
404
557
|
type RelationshipKind$1<Kinds extends string = string> = Tagged<Kinds, 'RelationshipKind'>;
|
|
405
558
|
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
406
559
|
type RelationshipArrowType = 'none' | 'normal' | 'onormal' | 'dot' | 'odot' | 'diamond' | 'odiamond' | 'crow' | 'open' | 'vee';
|
|
407
560
|
interface Relation$1 {
|
|
408
|
-
readonly id:
|
|
409
|
-
readonly source: Fqn
|
|
410
|
-
readonly target: Fqn
|
|
561
|
+
readonly id: RelationId;
|
|
562
|
+
readonly source: Fqn;
|
|
563
|
+
readonly target: Fqn;
|
|
411
564
|
readonly title: string;
|
|
412
565
|
readonly description?: string;
|
|
413
566
|
readonly technology?: string;
|
|
@@ -418,7 +571,7 @@ interface Relation$1 {
|
|
|
418
571
|
readonly head?: RelationshipArrowType;
|
|
419
572
|
readonly tail?: RelationshipArrowType;
|
|
420
573
|
readonly links?: NonEmptyArray<Link>;
|
|
421
|
-
readonly navigateTo?:
|
|
574
|
+
readonly navigateTo?: ViewId;
|
|
422
575
|
readonly metadata?: {
|
|
423
576
|
[key: string]: string;
|
|
424
577
|
};
|
|
@@ -432,130 +585,828 @@ interface RelationshipKindSpecification {
|
|
|
432
585
|
readonly tail?: RelationshipArrowType;
|
|
433
586
|
}
|
|
434
587
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
source?: never;
|
|
446
|
-
target?: never;
|
|
447
|
-
inout?: never;
|
|
448
|
-
incoming?: never;
|
|
449
|
-
outgoing?: never;
|
|
450
|
-
customRelation?: never;
|
|
451
|
-
}
|
|
452
|
-
interface ElementRefExpr extends Omit<BaseExpr, 'element' | 'isDescedants'> {
|
|
453
|
-
element: Fqn$1;
|
|
454
|
-
isDescedants?: boolean;
|
|
455
|
-
}
|
|
456
|
-
interface ExpandedElementExpr extends Omit<BaseExpr, 'expanded'> {
|
|
457
|
-
expanded: Fqn$1;
|
|
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;
|
|
458
598
|
}
|
|
459
|
-
interface
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
opacity?: number;
|
|
471
|
-
navigateTo?: ViewID$1;
|
|
472
|
-
};
|
|
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>;
|
|
473
610
|
}
|
|
474
|
-
interface
|
|
475
|
-
|
|
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>;
|
|
476
626
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
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;
|
|
480
631
|
}
|
|
481
|
-
interface
|
|
482
|
-
|
|
483
|
-
|
|
632
|
+
interface DeploymentRef$1 {
|
|
633
|
+
readonly id: Fqn;
|
|
634
|
+
readonly element?: Fqn;
|
|
484
635
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
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;
|
|
490
656
|
};
|
|
491
657
|
}
|
|
492
|
-
type
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
target: ElementExpression$1;
|
|
496
|
-
isBidirectional?: boolean;
|
|
497
|
-
}
|
|
498
|
-
interface InOutExpr extends Omit<BaseExpr, 'inout'> {
|
|
499
|
-
inout: ElementExpression$1;
|
|
500
|
-
}
|
|
501
|
-
interface IncomingExpr extends Omit<BaseExpr, 'incoming'> {
|
|
502
|
-
incoming: ElementExpression$1;
|
|
503
|
-
}
|
|
504
|
-
interface OutgoingExpr extends Omit<BaseExpr, 'outgoing'> {
|
|
505
|
-
outgoing: ElementExpression$1;
|
|
506
|
-
}
|
|
507
|
-
type RelationExpression$1 = RelationExpr | InOutExpr | IncomingExpr | OutgoingExpr;
|
|
508
|
-
interface RelationWhereExpr extends Omit<BaseExpr, 'where'> {
|
|
509
|
-
where: {
|
|
510
|
-
expr: RelationExpression$1;
|
|
511
|
-
condition: WhereOperator<string, string>;
|
|
658
|
+
type AllNever<Expressions> = UnionToIntersection<{
|
|
659
|
+
[Name in keyof Expressions]: {
|
|
660
|
+
-readonly [Key in keyof Expressions[Name]]?: never;
|
|
512
661
|
};
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
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';
|
|
527
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;
|
|
528
716
|
}
|
|
529
|
-
type RelationPredicateExpression = RelationExpression$1 | RelationWhereExpr | CustomRelationExpr;
|
|
530
|
-
type Expression$1 = ElementPredicateExpression | RelationPredicateExpression;
|
|
531
717
|
|
|
532
718
|
/**
|
|
533
719
|
* Parsed elements, relations, and views.
|
|
534
720
|
*/
|
|
535
|
-
interface ParsedLikeC4Model<ElementKinds extends string = string, RelationKinds extends string = string, Tags extends string = string, Fqns extends string = string, Views extends string = string> {
|
|
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> {
|
|
536
722
|
specification: {
|
|
537
723
|
tags: Tag$1<Tags>[];
|
|
538
724
|
elements: Record<ElementKinds, ElementKindSpecification>;
|
|
725
|
+
deployments: Record<DeploymentNodeKind$1, DeploymentNodeKindSpecification>;
|
|
539
726
|
relationships: Record<RelationKinds, RelationshipKindSpecification>;
|
|
540
727
|
};
|
|
541
728
|
elements: Record<Fqns, TypedElement<Fqns, ElementKinds, Tags>>;
|
|
542
|
-
relations: Record<
|
|
729
|
+
relations: Record<RelationId, Relation$1>;
|
|
543
730
|
globals: ModelGlobals;
|
|
544
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>;
|
|
545
1308
|
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
1309
|
+
|
|
1310
|
+
declare class LikeC4Model<M extends AnyAux = LikeC4Model.Any> {
|
|
1311
|
+
#private;
|
|
1312
|
+
readonly $model: M['Model'];
|
|
1313
|
+
/**
|
|
1314
|
+
* Only available in compile time
|
|
1315
|
+
*/
|
|
1316
|
+
readonly Aux: M;
|
|
1317
|
+
readonly deployment: LikeC4DeploymentModel<M>;
|
|
1318
|
+
static create<const M extends AnyLikeC4Model>(model: M): LikeC4Model<Aux.FromModel<M>>;
|
|
1319
|
+
/**
|
|
1320
|
+
* This method is supposed to be used only in dumps
|
|
1321
|
+
*/
|
|
1322
|
+
static fromDump<const M extends ParsedLikeC4ModelDump>(dump: M): LikeC4Model<Aux.FromDump<M>>;
|
|
1323
|
+
private constructor();
|
|
1324
|
+
get type(): 'computed' | 'layouted';
|
|
1325
|
+
element(el: M['ElementOrFqn']): ElementModel<M>;
|
|
1326
|
+
findElement(el: LiteralUnion<M['Element'], string>): ElementModel<M> | null;
|
|
1327
|
+
/**
|
|
1328
|
+
* Returns the root elements of the model.
|
|
1329
|
+
*/
|
|
1330
|
+
roots(): ElementsIterator<M>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Returns all elements in the model.
|
|
1333
|
+
*/
|
|
1334
|
+
elements(): ElementsIterator<M>;
|
|
1335
|
+
/**
|
|
1336
|
+
* Returns all relationships in the model.
|
|
1337
|
+
*/
|
|
1338
|
+
relationships(): RelationshipsIterator<M>;
|
|
1339
|
+
/**
|
|
1340
|
+
* Returns a specific relationship by its ID.
|
|
1341
|
+
* If the relationship is not found in the model, it will be searched in the deployment model.
|
|
1342
|
+
* Search can be limited to the model or deployment model only.
|
|
1343
|
+
*/
|
|
1344
|
+
relationship(id: M['RelationId'], type: 'model'): RelationshipModel<M>;
|
|
1345
|
+
relationship(id: M['RelationId'], type: 'deployment'): DeploymentRelationModel<M>;
|
|
1346
|
+
relationship(id: M['RelationId'], type?: 'model' | 'deployment'): RelationshipModel<M> | DeploymentRelationModel<M>;
|
|
1347
|
+
findRelationship(id: LiteralUnion<M['RelationId'], string>, type: 'model'): RelationshipModel<M> | null;
|
|
1348
|
+
findRelationship(id: LiteralUnion<M['RelationId'], string>, type: 'deployment'): DeploymentRelationModel<M> | null;
|
|
1349
|
+
findRelationship(id: LiteralUnion<M['RelationId'], string>, type?: 'model' | 'deployment'): RelationshipModel<M> | DeploymentRelationModel<M> | null;
|
|
1350
|
+
/**
|
|
1351
|
+
* Returns all views in the model.
|
|
1352
|
+
*/
|
|
1353
|
+
views(): MapIterator<LikeC4ViewModel<M, M["ViewType"]>>;
|
|
1354
|
+
/**
|
|
1355
|
+
* Returns a specific view by its ID.
|
|
1356
|
+
*/
|
|
1357
|
+
view(viewId: M['ViewIdLiteral']): LikeC4ViewModel<M>;
|
|
1358
|
+
findView(viewId: LiteralUnion<M['ViewId'], string>): LikeC4ViewModel<M>;
|
|
1359
|
+
/**
|
|
1360
|
+
* Returns the parent element of given element.
|
|
1361
|
+
* @see ancestors
|
|
1362
|
+
*/
|
|
1363
|
+
parent(element: M['ElementOrFqn']): ElementModel<M> | null;
|
|
1364
|
+
/**
|
|
1365
|
+
* Get all children of the element (only direct children),
|
|
1366
|
+
* @see descendants
|
|
1367
|
+
*/
|
|
1368
|
+
children(element: M['ElementOrFqn']): ReadonlySet<ElementModel<M>>;
|
|
1369
|
+
/**
|
|
1370
|
+
* Get all sibling (i.e. same parent)
|
|
1371
|
+
*/
|
|
1372
|
+
siblings(element: M['ElementOrFqn']): ElementsIterator<M>;
|
|
1373
|
+
/**
|
|
1374
|
+
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1375
|
+
* (from closest to root)
|
|
1376
|
+
*/
|
|
1377
|
+
ancestors(element: M['ElementOrFqn']): ElementsIterator<M>;
|
|
1378
|
+
/**
|
|
1379
|
+
* Get all descendant elements (i.e. children, children’s children, etc.)
|
|
1380
|
+
*/
|
|
1381
|
+
descendants(element: M['ElementOrFqn']): ElementsIterator<M>;
|
|
1382
|
+
/**
|
|
1383
|
+
* Incoming relationships to the element and its descendants
|
|
1384
|
+
* @see incomers
|
|
1385
|
+
*/
|
|
1386
|
+
incoming(element: M['ElementOrFqn'], filter?: IncomingFilter): RelationshipsIterator<M>;
|
|
1387
|
+
/**
|
|
1388
|
+
* Outgoing relationships from the element and its descendants
|
|
1389
|
+
* @see outgoers
|
|
1390
|
+
*/
|
|
1391
|
+
outgoing(element: M['ElementOrFqn'], filter?: OutgoingFilter): RelationshipsIterator<M>;
|
|
1392
|
+
private addElement;
|
|
1393
|
+
private addRelation;
|
|
552
1394
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
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>>>;
|
|
559
1410
|
}
|
|
560
1411
|
|
|
561
1412
|
/**
|
|
@@ -574,7 +1425,7 @@ declare namespace OverviewGraph {
|
|
|
574
1425
|
} | {
|
|
575
1426
|
id: string;
|
|
576
1427
|
type: 'view';
|
|
577
|
-
viewId:
|
|
1428
|
+
viewId: ViewId;
|
|
578
1429
|
label: string;
|
|
579
1430
|
parentId: string | null;
|
|
580
1431
|
position: XYPoint;
|
|
@@ -606,7 +1457,7 @@ declare namespace ViewChange {
|
|
|
606
1457
|
shape?: ElementShape$1;
|
|
607
1458
|
color?: ThemeColor$1;
|
|
608
1459
|
};
|
|
609
|
-
targets: NonEmptyArray<Fqn
|
|
1460
|
+
targets: NonEmptyArray<Fqn>;
|
|
610
1461
|
}
|
|
611
1462
|
interface SaveManualLayout {
|
|
612
1463
|
op: 'save-manual-layout';
|
|
@@ -623,12 +1474,16 @@ declare namespace ViewChange {
|
|
|
623
1474
|
}
|
|
624
1475
|
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveManualLayout | ViewChange.ChangeAutoLayout;
|
|
625
1476
|
|
|
626
|
-
type KeysOf<T> = keyof T extends infer K extends string ? K : never;
|
|
627
1477
|
type BuilderSpecification = {
|
|
628
1478
|
elements: {
|
|
629
1479
|
[kind: string]: Partial<ElementKindSpecification>;
|
|
630
1480
|
};
|
|
631
|
-
relationships?:
|
|
1481
|
+
relationships?: {
|
|
1482
|
+
[kind: string]: Partial<RelationshipKindSpecification>;
|
|
1483
|
+
};
|
|
1484
|
+
deployments?: {
|
|
1485
|
+
[kind: string]: Partial<DeploymentNodeKindSpecification>;
|
|
1486
|
+
};
|
|
632
1487
|
tags?: [string, ...string[]];
|
|
633
1488
|
metadataKeys?: [string, ...string[]];
|
|
634
1489
|
};
|
|
@@ -651,6 +1506,24 @@ type NewElementProps<Tag, Metadata> = {
|
|
|
651
1506
|
opacity?: number;
|
|
652
1507
|
};
|
|
653
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
|
+
};
|
|
654
1527
|
type NewViewProps<Tag> = {
|
|
655
1528
|
title?: string;
|
|
656
1529
|
description?: string;
|
|
@@ -671,7 +1544,7 @@ type NewRelationProps<Kind, Tag, Metadata> = {
|
|
|
671
1544
|
tail?: RelationshipArrowType;
|
|
672
1545
|
line?: RelationshipLineType;
|
|
673
1546
|
color?: Color$1;
|
|
674
|
-
links?:
|
|
1547
|
+
links?: NonEmptyArray<string | {
|
|
675
1548
|
title?: string;
|
|
676
1549
|
url: string;
|
|
677
1550
|
}>;
|
|
@@ -680,35 +1553,93 @@ type Invalid<Message extends string> = Tagged<Message, 'Error'>;
|
|
|
680
1553
|
/**
|
|
681
1554
|
* When building nested objects
|
|
682
1555
|
*/
|
|
683
|
-
interface TypesNested<Parent extends string, ElementKind extends string, Fqn extends string, ViewId extends string, RelationshipKind extends string, Tag extends string, MetadataKey extends string> extends Types<ElementKind, Fqn, ViewId, RelationshipKind, Tag, MetadataKey> {
|
|
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> {
|
|
684
1557
|
Parent: Parent;
|
|
685
1558
|
}
|
|
686
|
-
type AnyTypes = Types<any, any, any, any, any, any>;
|
|
687
|
-
type AnyTypesNested = TypesNested<any, any, any, any, any, any, any>;
|
|
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>;
|
|
688
1561
|
/**
|
|
689
1562
|
* Auxilary type to keep track of the types in builder
|
|
690
1563
|
*/
|
|
691
|
-
interface Types<ElementKind extends string, Fqn extends string, ViewId extends string, RelationshipKind extends string, Tag extends string, MetadataKey extends string> {
|
|
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> {
|
|
692
1565
|
ElementKind: ElementKind;
|
|
693
1566
|
Fqn: Fqn;
|
|
694
1567
|
ViewId: ViewId;
|
|
695
1568
|
RelationshipKind: RelationshipKind;
|
|
696
1569
|
Tag: Tag;
|
|
697
1570
|
MetadataKey: MetadataKey;
|
|
1571
|
+
DeploymentKind: DeploymentKind;
|
|
1572
|
+
DeploymentFqn: DeploymentFqn;
|
|
698
1573
|
Tags: IfNever<Tag, never, [Tag, ...Tag[]]>;
|
|
699
1574
|
NewElementProps: NewElementProps<Tag, Metadata<MetadataKey>>;
|
|
700
1575
|
NewRelationshipProps: NewRelationProps<RelationshipKind, Tag, Metadata<MetadataKey>>;
|
|
701
1576
|
NewViewProps: NewViewProps<Tag>;
|
|
1577
|
+
NewDeploymentNodeProps: NewDeploymentNodeProps<Tag, Metadata<MetadataKey>>;
|
|
702
1578
|
}
|
|
703
1579
|
declare namespace Types {
|
|
704
|
-
type FromSpecification<Spec> = Spec extends BuilderSpecification ? Types<KeysOf<Spec['elements']>, never, never, KeysOf<Spec['relationships']>, TupleToUnion<Spec['tags']>, TupleToUnion<Spec['metadataKeys']
|
|
705
|
-
type AddFqn<T, Id extends string> = T extends TypesNested<infer P, any, any, any, any, any, any> ? TypesNested<P, T['ElementKind'], `${P}.${Id}` | T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey']> : T extends AnyTypes ? Types<T['ElementKind'], Id | T['Fqn'], T['ViewId'], T['RelationshipKind'], T['Tag'], T['MetadataKey']> : never;
|
|
706
|
-
type
|
|
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;
|
|
707
1584
|
type ToParsedLikeC4Model<T> = T extends AnyTypes ? ParsedLikeC4Model<T['ElementKind'], T['RelationshipKind'], T['Tag'], T['Fqn'], T['ViewId']> : never;
|
|
708
1585
|
}
|
|
709
1586
|
|
|
710
|
-
type ToNested<T, Id extends string> = T extends TypesNested<infer P, any,
|
|
711
|
-
type FromNested<T extends AnyTypes, N> = N extends TypesNested<any, any,
|
|
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;
|
|
712
1643
|
/**
|
|
713
1644
|
* Chainable builder to create element
|
|
714
1645
|
*/
|
|
@@ -725,10 +1656,6 @@ interface AddElement<Id extends string> {
|
|
|
725
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>>;
|
|
726
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>>;
|
|
727
1658
|
}
|
|
728
|
-
type AddElementHelper<T = unknown> = <const Id extends string>(id: Id, titleOrProps?: string | T) => AddElement<Id>;
|
|
729
|
-
type AddElementHelpers<T extends AnyTypes> = T extends Types<infer Kinds extends string, any, any, any, any, any> ? {
|
|
730
|
-
[Kind in Kinds]: AddElementHelper<T['NewElementProps']>;
|
|
731
|
-
} : Invalid<'No Element Kinds'>;
|
|
732
1659
|
|
|
733
1660
|
interface ModelBuilder<T extends AnyTypes> {
|
|
734
1661
|
addElement(element: Element$1): Builder<T>;
|
|
@@ -736,7 +1663,7 @@ interface ModelBuilder<T extends AnyTypes> {
|
|
|
736
1663
|
/**
|
|
737
1664
|
* Create a fully qualified name from an id (for nested models)
|
|
738
1665
|
*/
|
|
739
|
-
fqn(id: string): Fqn
|
|
1666
|
+
fqn(id: string): Fqn;
|
|
740
1667
|
addSourcelessRelation(relation: Omit<Relation$1, 'id' | 'source'>): Builder<T>;
|
|
741
1668
|
}
|
|
742
1669
|
declare function model<A extends AnyTypes, B extends AnyTypes>(op1: (input: ModelBuilder<A>) => ModelBuilder<B>): (input: Builder<A>) => Builder<B>;
|
|
@@ -756,6 +1683,10 @@ declare function model<A extends AnyTypes, B extends AnyTypes, C extends AnyType
|
|
|
756
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>;
|
|
757
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>;
|
|
758
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'>;
|
|
759
1690
|
type ModelHelpers<T extends AnyTypes> = AddElementHelpers<T> & {
|
|
760
1691
|
model: typeof model;
|
|
761
1692
|
rel: RelationshipHelper<T['NewRelationshipProps']>;
|
|
@@ -781,20 +1712,40 @@ declare function views<A extends AnyTypes, B extends AnyTypes, C extends AnyType
|
|
|
781
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>;
|
|
782
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>;
|
|
783
1714
|
|
|
784
|
-
interface
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
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;
|
|
789
1739
|
}
|
|
790
1740
|
declare namespace ViewPredicate {
|
|
791
|
-
|
|
1741
|
+
type ElementExpr<Fqn extends string> = '*' | Fqn | `${Fqn}.*` | `${Fqn}._` | `${Fqn}.**`;
|
|
792
1742
|
type AllExpression<ElementExpr extends string> = ElementExpr | `-> ${ElementExpr} ->` | `-> ${ElementExpr}` | `${ElementExpr} ->` | `${ElementExpr} ${'->' | '<->'} ${ElementExpr}`;
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
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> | {
|
|
798
1749
|
and: NonEmptyArray<ViewPredicate.WhereOperator<Types>>;
|
|
799
1750
|
or?: never;
|
|
800
1751
|
not?: never;
|
|
@@ -807,15 +1758,15 @@ declare namespace ViewPredicate {
|
|
|
807
1758
|
and?: never;
|
|
808
1759
|
or?: never;
|
|
809
1760
|
};
|
|
810
|
-
|
|
1761
|
+
type Custom<Types extends AnyTypes> = {
|
|
811
1762
|
where?: ViewPredicate.WhereOperator<Types>;
|
|
812
1763
|
with?: Simplify<Omit<CustomElementExpr['custom'] & CustomRelationExpr['customRelation'], 'expr' | 'relation' | 'navigateTo'> & {
|
|
813
1764
|
navigateTo?: Types['ViewId'];
|
|
814
1765
|
}>;
|
|
815
1766
|
};
|
|
816
|
-
export { };
|
|
817
1767
|
}
|
|
818
|
-
type
|
|
1768
|
+
type Op<T> = (b: T) => T;
|
|
1769
|
+
type DeploymentViewRuleBuilderOp<Types extends AnyTypes> = (b: DeploymentViewBuilder<Types>) => DeploymentViewBuilder<Types>;
|
|
819
1770
|
interface AddViewHelper<Props = unknown> {
|
|
820
1771
|
<const Id extends string, T extends AnyTypes>(id: Id, builder: (b: ViewBuilder<T>) => ViewBuilder<T>): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
|
|
821
1772
|
<const Id extends string, T extends AnyTypes>(id: Id, propsOrTitle: Props | string): (builder: ViewsBuilder<T>) => ViewsBuilder<Types.AddView<T, Id>>;
|
|
@@ -827,19 +1778,25 @@ interface AddViewOfHelper<Props = unknown> {
|
|
|
827
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>>;
|
|
828
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>>;
|
|
829
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
|
+
}
|
|
830
1785
|
type TypedC4Expression<Types extends AnyTypes> = Tagged<Expression$1, 'typed', Types>;
|
|
831
|
-
|
|
832
|
-
declare function $
|
|
833
|
-
declare function $
|
|
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'] & {
|
|
834
1790
|
notation?: string;
|
|
835
|
-
}): (b:
|
|
836
|
-
declare function $autoLayout<
|
|
837
|
-
declare function $rules<
|
|
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;
|
|
838
1794
|
|
|
839
1795
|
type ViewHelpers<T = unknown> = {
|
|
840
1796
|
views: typeof views;
|
|
841
1797
|
view: AddViewHelper<T>;
|
|
842
1798
|
viewOf: AddViewOfHelper<T>;
|
|
1799
|
+
deploymentView: AddDeploymentViewHelper<T>;
|
|
843
1800
|
$include: typeof $include;
|
|
844
1801
|
$exclude: typeof $exclude;
|
|
845
1802
|
$style: typeof $style;
|
|
@@ -859,10 +1816,20 @@ interface Builder<T extends AnyTypes> {
|
|
|
859
1816
|
helpers(): {
|
|
860
1817
|
model: ModelHelpers<T>;
|
|
861
1818
|
views: ViewHelpers<T['NewViewProps']>;
|
|
1819
|
+
deployment: DeloymentModelHelpers<T>;
|
|
862
1820
|
};
|
|
863
1821
|
__model(): ModelBuilder<T>;
|
|
864
1822
|
__views(): ViewsBuilder<T>;
|
|
865
|
-
|
|
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']>;
|
|
866
1833
|
with<A extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>): Builder<A>;
|
|
867
1834
|
with<A extends AnyTypes, B extends AnyTypes>(op1: (input: Builder<T>) => Builder<A>, op2: (input: Builder<A>) => Builder<B>): Builder<B>;
|
|
868
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>;
|
|
@@ -878,6 +1845,7 @@ declare namespace Builder {
|
|
|
878
1845
|
function forSpecification<const Spec extends BuilderSpecification>(spec: Spec): {
|
|
879
1846
|
builder: Builder<Types.FromSpecification<Spec>>;
|
|
880
1847
|
model: ModelHelpers<Types.FromSpecification<Spec>>;
|
|
1848
|
+
deployment: DeloymentModelHelpers<Types.FromSpecification<Spec>>;
|
|
881
1849
|
views: ViewHelpers<Types.FromSpecification<Spec>['NewViewProps']>;
|
|
882
1850
|
};
|
|
883
1851
|
}
|
|
@@ -1092,452 +2060,73 @@ declare const defaultTheme: {
|
|
|
1092
2060
|
gray: {
|
|
1093
2061
|
lineColor: "#6E6E6E";
|
|
1094
2062
|
labelBgColor: "#18191b";
|
|
1095
|
-
labelColor: "#C6C6C6";
|
|
1096
|
-
};
|
|
1097
|
-
green: {
|
|
1098
|
-
lineColor: "#15803d";
|
|
1099
|
-
labelBgColor: "#052e16";
|
|
1100
|
-
labelColor: "#22c55e";
|
|
1101
|
-
};
|
|
1102
|
-
indigo: {
|
|
1103
|
-
lineColor: "#6366f1";
|
|
1104
|
-
labelBgColor: "#1e1b4b";
|
|
1105
|
-
labelColor: "#818cf8";
|
|
1106
|
-
};
|
|
1107
|
-
muted: {
|
|
1108
|
-
lineColor: "#64748b";
|
|
1109
|
-
labelBgColor: "#0f172a";
|
|
1110
|
-
labelColor: "#cbd5e1";
|
|
1111
|
-
};
|
|
1112
|
-
primary: {
|
|
1113
|
-
lineColor: "#3b82f6";
|
|
1114
|
-
labelBgColor: "#172554";
|
|
1115
|
-
labelColor: "#60a5fa";
|
|
1116
|
-
};
|
|
1117
|
-
red: {
|
|
1118
|
-
lineColor: "#AC4D39";
|
|
1119
|
-
labelBgColor: "#b91c1c";
|
|
1120
|
-
labelColor: "#f5b2a3";
|
|
1121
|
-
};
|
|
1122
|
-
secondary: {
|
|
1123
|
-
lineColor: "#0ea5e9";
|
|
1124
|
-
labelBgColor: "#082f49";
|
|
1125
|
-
labelColor: "#38bdf8";
|
|
1126
|
-
};
|
|
1127
|
-
sky: {
|
|
1128
|
-
lineColor: "#0ea5e9";
|
|
1129
|
-
labelBgColor: "#082f49";
|
|
1130
|
-
labelColor: "#38bdf8";
|
|
1131
|
-
};
|
|
1132
|
-
slate: {
|
|
1133
|
-
lineColor: "#64748b";
|
|
1134
|
-
labelBgColor: "#0f172a";
|
|
1135
|
-
labelColor: "#cbd5e1";
|
|
1136
|
-
};
|
|
1137
|
-
};
|
|
1138
|
-
font: "Arial";
|
|
1139
|
-
shadow: "#0a0a0a";
|
|
1140
|
-
};
|
|
1141
|
-
|
|
1142
|
-
declare function nonNullable<T>(value: T, message?: string): NonNullable<T>;
|
|
1143
|
-
declare function invariant(condition: any, message?: string): asserts condition;
|
|
1144
|
-
declare function nonexhaustive(value: never): never;
|
|
1145
|
-
|
|
1146
|
-
type Fqn = LiteralUnion<Fqn$1, string>;
|
|
1147
|
-
type RelationID = LiteralUnion<RelationID$1, string>;
|
|
1148
|
-
type ViewID = LiteralUnion<ViewID$1, string>;
|
|
1149
|
-
type EdgeId = LiteralUnion<EdgeId$1, string>;
|
|
1150
|
-
type IncomingFilter = 'all' | 'direct' | 'to-descendants';
|
|
1151
|
-
type OutgoingFilter = 'all' | 'direct' | 'from-descendants';
|
|
1152
|
-
type ElementOrFqn = Fqn | {
|
|
1153
|
-
id: Fqn;
|
|
1154
|
-
};
|
|
1155
|
-
|
|
1156
|
-
/**
|
|
1157
|
-
* All methods are view-scoped, i.e. only return elements and connections in the view.
|
|
1158
|
-
*/
|
|
1159
|
-
declare class LikeC4ViewModel {
|
|
1160
|
-
readonly view: ComputedView;
|
|
1161
|
-
readonly model: LikeC4Model<LikeC4ViewModel>;
|
|
1162
|
-
private readonly _rootElements;
|
|
1163
|
-
private readonly _elements;
|
|
1164
|
-
private readonly _connections;
|
|
1165
|
-
constructor(view: ComputedView, model: LikeC4Model<LikeC4ViewModel>);
|
|
1166
|
-
get id(): ViewID$1<string>;
|
|
1167
|
-
get title(): string;
|
|
1168
|
-
get viewOf(): LikeC4Model.ElementModel<LikeC4ViewModel>;
|
|
1169
|
-
get tags(): Tag$1[];
|
|
1170
|
-
roots(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1171
|
-
elements(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1172
|
-
element(id: Fqn): LikeC4ViewModel.Element;
|
|
1173
|
-
hasElement(id: Fqn): boolean;
|
|
1174
|
-
connections(): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1175
|
-
connection(id: EdgeId): LikeC4ViewModel.Connection;
|
|
1176
|
-
findConnections(source: ElementOrFqn, target: ElementOrFqn, direction?: 'both' | 'direct'): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1177
|
-
parent(element: ElementOrFqn): LikeC4ViewModel.Element | null;
|
|
1178
|
-
children(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1179
|
-
siblings(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1180
|
-
/**
|
|
1181
|
-
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1182
|
-
* (from closest to root)
|
|
1183
|
-
*/
|
|
1184
|
-
ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1185
|
-
descendants(element: ElementOrFqn): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1186
|
-
incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1187
|
-
incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1188
|
-
/**
|
|
1189
|
-
* Outgoing relationships from the element and its descendants
|
|
1190
|
-
*/
|
|
1191
|
-
outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1192
|
-
outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1193
|
-
}
|
|
1194
|
-
declare namespace LikeC4ViewModel {
|
|
1195
|
-
/**
|
|
1196
|
-
* Represents an element in the view. (Diagram node)
|
|
1197
|
-
* All methods are view-scoped, i.e. `children` returns only children of the element in the view.
|
|
1198
|
-
*/
|
|
1199
|
-
class Element {
|
|
1200
|
-
readonly node: ComputedNode;
|
|
1201
|
-
private readonly viewmodel;
|
|
1202
|
-
constructor(node: ComputedNode, viewmodel: LikeC4ViewModel);
|
|
1203
|
-
get id(): NodeId<string>;
|
|
1204
|
-
get title(): string;
|
|
1205
|
-
get kind(): ElementKind$1;
|
|
1206
|
-
get isRoot(): boolean;
|
|
1207
|
-
get hasNested(): boolean;
|
|
1208
|
-
get shape(): ElementShape$1;
|
|
1209
|
-
get color(): Color$1;
|
|
1210
|
-
get tags(): Tag$1[];
|
|
1211
|
-
model(): LikeC4Model.ElementModel<LikeC4ViewModel>;
|
|
1212
|
-
parent(): LikeC4ViewModel.Element | null;
|
|
1213
|
-
metadata(key: string): string | undefined;
|
|
1214
|
-
metadata(key: string, defaultValue: string): string;
|
|
1215
|
-
hasMetadata(key: string): boolean;
|
|
1216
|
-
ancestors(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1217
|
-
siblings(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1218
|
-
descendants(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1219
|
-
children(): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1220
|
-
incoming(filter?: 'all' | 'direct' | 'to-descendants'): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1221
|
-
incomers(filter?: 'all' | 'direct' | 'to-descendants'): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1222
|
-
outgoing(filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1223
|
-
outgoers(filter?: OutgoingFilter): ReadonlyArray<LikeC4ViewModel.Element>;
|
|
1224
|
-
connectionsTo(target: Fqn | LikeC4ViewModel.Element): ReadonlyArray<LikeC4ViewModel.Connection>;
|
|
1225
|
-
}
|
|
1226
|
-
/**
|
|
1227
|
-
* Represents a connection between two elements.
|
|
1228
|
-
* May be source from multiple model relationships.
|
|
1229
|
-
*/
|
|
1230
|
-
class Connection {
|
|
1231
|
-
readonly edge: ComputedEdge;
|
|
1232
|
-
private readonly viewmodel;
|
|
1233
|
-
constructor(edge: ComputedEdge, viewmodel: LikeC4ViewModel);
|
|
1234
|
-
get id(): EdgeId$1;
|
|
1235
|
-
get source(): LikeC4ViewModel.Element;
|
|
1236
|
-
get target(): LikeC4ViewModel.Element;
|
|
1237
|
-
get tags(): Tag$1[];
|
|
1238
|
-
/**
|
|
1239
|
-
* Model relationships
|
|
1240
|
-
*/
|
|
1241
|
-
relationships(): ReadonlyArray<LikeC4Model.Relationship<LikeC4ViewModel>>;
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
type PickBySource<Source> = Source extends LikeC4Model.Layouted.SourceModel ? LikeC4Model.Layouted : Source extends LikeC4Model.Computed.SourceModel ? LikeC4Model.Computed : never;
|
|
1246
|
-
declare class LikeC4Model<M extends LikeC4Model.ViewModel = LikeC4Model.ViewModel> {
|
|
1247
|
-
readonly type: LikeC4Model.ModelType<M>;
|
|
1248
|
-
readonly sourcemodel: LikeC4Model.SourceModel<M>;
|
|
1249
|
-
private _elements;
|
|
1250
|
-
private _parents;
|
|
1251
|
-
private _children;
|
|
1252
|
-
private _rootElements;
|
|
1253
|
-
private _relations;
|
|
1254
|
-
private _incoming;
|
|
1255
|
-
private _outgoing;
|
|
1256
|
-
private _internal;
|
|
1257
|
-
private _cacheAscendingSiblings;
|
|
1258
|
-
private _views;
|
|
1259
|
-
constructor(type: LikeC4Model.ModelType<M>, sourcemodel: LikeC4Model.SourceModel<M>, elements: Element$1[], relations: Relation$1[], views: LikeC4Model.SourceModel<M>['views'], ViewModelClass: Class<M>);
|
|
1260
|
-
/**
|
|
1261
|
-
* Returns the root elements of the model.
|
|
1262
|
-
*/
|
|
1263
|
-
roots(): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1264
|
-
/**
|
|
1265
|
-
* Returns all elements in the model.
|
|
1266
|
-
*/
|
|
1267
|
-
elements(): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1268
|
-
/**
|
|
1269
|
-
* Returns a specific element by its FQN.
|
|
1270
|
-
*/
|
|
1271
|
-
element(id: Fqn): LikeC4Model.ElementModel<M>;
|
|
1272
|
-
/**
|
|
1273
|
-
* Returns all relationships in the model.
|
|
1274
|
-
*/
|
|
1275
|
-
relationships(): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1276
|
-
/**
|
|
1277
|
-
* Returns a specific relationship by its ID.
|
|
1278
|
-
*/
|
|
1279
|
-
relationship(id: RelationID): LikeC4Model.Relationship<M>;
|
|
1280
|
-
/**
|
|
1281
|
-
* Returns all views in the model.
|
|
1282
|
-
*/
|
|
1283
|
-
views(): ReadonlyArray<M>;
|
|
1284
|
-
/**
|
|
1285
|
-
* Returns a specific view by its ID.
|
|
1286
|
-
*/
|
|
1287
|
-
view(viewId: ViewID): M;
|
|
1288
|
-
/**
|
|
1289
|
-
* Returns the parent element of given element.
|
|
1290
|
-
* @see ancestors
|
|
1291
|
-
*/
|
|
1292
|
-
parent(element: ElementOrFqn): LikeC4Model.ElementModel<M> | null;
|
|
1293
|
-
/**
|
|
1294
|
-
* Get all children of the element (only direct children),
|
|
1295
|
-
* @see descendants
|
|
1296
|
-
*/
|
|
1297
|
-
children(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1298
|
-
/**
|
|
1299
|
-
* Get all sibling (i.e. same parent)
|
|
1300
|
-
*/
|
|
1301
|
-
siblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1302
|
-
/**
|
|
1303
|
-
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1304
|
-
* (from closest to root)
|
|
1305
|
-
*/
|
|
1306
|
-
ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1307
|
-
/**
|
|
1308
|
-
* Get all descendant elements (i.e. children, children’s children, etc.)
|
|
1309
|
-
*/
|
|
1310
|
-
descendants(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1311
|
-
/**
|
|
1312
|
-
* Incoming relationships to the element and its descendants
|
|
1313
|
-
* @see incomers
|
|
1314
|
-
*/
|
|
1315
|
-
incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1316
|
-
/**
|
|
1317
|
-
* Source elements of incoming relationships
|
|
1318
|
-
*/
|
|
1319
|
-
incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1320
|
-
/**
|
|
1321
|
-
* Outgoing relationships from the element and its descendants
|
|
1322
|
-
* @see outgoers
|
|
1323
|
-
*/
|
|
1324
|
-
outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1325
|
-
/**
|
|
1326
|
-
* Target elements of outgoing relationships
|
|
1327
|
-
*/
|
|
1328
|
-
outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1329
|
-
/**
|
|
1330
|
-
* Relationships inside the element, among descendants
|
|
1331
|
-
*/
|
|
1332
|
-
internal(element: ElementOrFqn): ReadonlyArray<LikeC4Model.Relationship<M>>;
|
|
1333
|
-
/**
|
|
1334
|
-
* Resolve siblings of the element and siblings of ancestors
|
|
1335
|
-
* (from closest to root)
|
|
1336
|
-
*/
|
|
1337
|
-
ascendingSiblings(element: ElementOrFqn): ReadonlyArray<LikeC4Model.ElementModel<M>>;
|
|
1338
|
-
/**
|
|
1339
|
-
* Resolve all views that contain the element
|
|
1340
|
-
*/
|
|
1341
|
-
viewsWithElement(element: ElementOrFqn): ReadonlyArray<M>;
|
|
1342
|
-
private addElement;
|
|
1343
|
-
private addRelation;
|
|
1344
|
-
private _childrenOf;
|
|
1345
|
-
private _incomingTo;
|
|
1346
|
-
private _outgoingFrom;
|
|
1347
|
-
private _internalOf;
|
|
1348
|
-
}
|
|
1349
|
-
declare namespace LikeC4Model {
|
|
1350
|
-
function create(source: LikeC4Model.SourceModel): PickBySource<typeof source>;
|
|
1351
|
-
function computed(source: ComputedLikeC4Model): LikeC4Model<LikeC4ViewModel>;
|
|
1352
|
-
function layouted(source: LayoutedLikeC4Model): LikeC4Model<LikeC4DiagramModel>;
|
|
1353
|
-
function isModel(model: any): model is LikeC4Model;
|
|
1354
|
-
type SourceModel<M extends ViewModel = ViewModel> = M extends LikeC4DiagramModel ? LayoutedLikeC4Model : ComputedLikeC4Model;
|
|
1355
|
-
type ViewModel = LikeC4ViewModel | LikeC4DiagramModel;
|
|
1356
|
-
namespace ViewModel {
|
|
1357
|
-
type ElementModel = LikeC4ViewModel.Element | LikeC4DiagramModel.Element;
|
|
1358
|
-
type Relationship = LikeC4Model.Relationship<ViewModel>;
|
|
1359
|
-
function isLayouted(model: ViewModel): model is LikeC4DiagramModel;
|
|
1360
|
-
}
|
|
1361
|
-
type Computed = LikeC4Model<LikeC4ViewModel>;
|
|
1362
|
-
namespace Computed {
|
|
1363
|
-
type ViewModel = LikeC4ViewModel;
|
|
1364
|
-
type SourceModel = LikeC4Model.SourceModel<ViewModel>;
|
|
1365
|
-
}
|
|
1366
|
-
type Layouted = LikeC4Model<LikeC4DiagramModel>;
|
|
1367
|
-
namespace Layouted {
|
|
1368
|
-
type ViewModel = LikeC4DiagramModel;
|
|
1369
|
-
type SourceModel = LikeC4Model.SourceModel<ViewModel>;
|
|
1370
|
-
}
|
|
1371
|
-
type ModelType<M extends ViewModel = ViewModel> = M extends LikeC4DiagramModel ? 'layouted' : M extends LikeC4ViewModel ? 'computed' : never;
|
|
1372
|
-
function isLayouted(model: LikeC4Model): model is Layouted;
|
|
1373
|
-
class Relationship<M extends ViewModel = ViewModel> {
|
|
1374
|
-
readonly relationship: Relation$1;
|
|
1375
|
-
private readonly model;
|
|
1376
|
-
constructor(relationship: Relation$1, model: LikeC4Model<M>);
|
|
1377
|
-
get id(): RelationID$1;
|
|
1378
|
-
get title(): string;
|
|
1379
|
-
get kind(): RelationshipKind$1<string>;
|
|
1380
|
-
get tags(): Tag$1[];
|
|
1381
|
-
get source(): ElementModel<M>;
|
|
1382
|
-
get target(): ElementModel<M>;
|
|
1383
|
-
metadata(key: string): string | undefined;
|
|
1384
|
-
metadata(key: string, defaultValue: string): string;
|
|
1385
|
-
hasMetadata(key: string): boolean;
|
|
1386
|
-
}
|
|
1387
|
-
class ElementModel<M extends ViewModel = ViewModel> {
|
|
1388
|
-
readonly element: Element$1;
|
|
1389
|
-
private readonly model;
|
|
1390
|
-
constructor(element: Element$1, model: LikeC4Model<M>);
|
|
1391
|
-
get id(): Fqn$1<string>;
|
|
1392
|
-
get title(): string;
|
|
1393
|
-
get kind(): ElementKind$1;
|
|
1394
|
-
get isRoot(): boolean;
|
|
1395
|
-
get hasNested(): boolean;
|
|
1396
|
-
get shape(): ElementShape$1;
|
|
1397
|
-
get color(): Color$1;
|
|
1398
|
-
get tags(): Tag$1[];
|
|
1399
|
-
parent(): ElementModel<M> | null;
|
|
1400
|
-
metadata(key: string): string | undefined;
|
|
1401
|
-
metadata(key: string, defaultValue: string): string;
|
|
1402
|
-
hasMetadata(key: string): boolean;
|
|
1403
|
-
ancestors(): readonly ElementModel<M>[];
|
|
1404
|
-
siblings(): readonly ElementModel<M>[];
|
|
1405
|
-
descendants(): readonly ElementModel<M>[];
|
|
1406
|
-
children(): readonly ElementModel<M>[];
|
|
1407
|
-
/**
|
|
1408
|
-
* First 'view of' current element
|
|
1409
|
-
*/
|
|
1410
|
-
viewOf(): M;
|
|
1411
|
-
/**
|
|
1412
|
-
* All views 'view of' current element
|
|
1413
|
-
*/
|
|
1414
|
-
viewsOf(): M[];
|
|
1415
|
-
/**
|
|
1416
|
-
* Views that contain this element
|
|
1417
|
-
*/
|
|
1418
|
-
views(): readonly M[];
|
|
1419
|
-
incoming(filter?: IncomingFilter): readonly Relationship<M>[];
|
|
1420
|
-
incomers(filter?: IncomingFilter): readonly ElementModel<M>[];
|
|
1421
|
-
outgoing(filter?: OutgoingFilter): readonly Relationship<M>[];
|
|
1422
|
-
outgoers(filter?: OutgoingFilter): readonly ElementModel<M>[];
|
|
1423
|
-
internal(): readonly Relationship<M>[];
|
|
1424
|
-
/**
|
|
1425
|
-
* Resolve siblings of the element and siblings of ancestors
|
|
1426
|
-
* (from closest to root)
|
|
1427
|
-
*/
|
|
1428
|
-
ascendingSiblings(): readonly ElementModel<M>[];
|
|
1429
|
-
}
|
|
1430
|
-
}
|
|
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
|
+
};
|
|
1431
2109
|
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
declare
|
|
1436
|
-
|
|
1437
|
-
readonly model: LikeC4Model.Layouted;
|
|
1438
|
-
private readonly _rootElements;
|
|
1439
|
-
private readonly _elements;
|
|
1440
|
-
private readonly _connections;
|
|
1441
|
-
constructor(view: DiagramView, model: LikeC4Model.Layouted);
|
|
1442
|
-
get isDynamic(): boolean;
|
|
1443
|
-
get id(): ViewID$1<string>;
|
|
1444
|
-
get title(): string;
|
|
1445
|
-
get viewOf(): LikeC4Model.ElementModel<LikeC4DiagramModel>;
|
|
1446
|
-
get tags(): Tag$1[];
|
|
1447
|
-
roots(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1448
|
-
elements(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1449
|
-
element(id: Fqn): LikeC4DiagramModel.Element;
|
|
1450
|
-
hasElement(id: Fqn): boolean;
|
|
1451
|
-
connections(): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1452
|
-
connection(id: EdgeId): LikeC4DiagramModel.Connection;
|
|
1453
|
-
findConnections(source: ElementOrFqn, target: ElementOrFqn, direction?: 'both' | 'direct'): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1454
|
-
parent(element: ElementOrFqn): LikeC4DiagramModel.Element | null;
|
|
1455
|
-
children(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1456
|
-
siblings(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1457
|
-
/**
|
|
1458
|
-
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1459
|
-
* (from closest to root)
|
|
1460
|
-
*/
|
|
1461
|
-
ancestors(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1462
|
-
descendants(element: ElementOrFqn): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1463
|
-
incoming(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1464
|
-
incomers(element: ElementOrFqn, filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1465
|
-
/**
|
|
1466
|
-
* Outgoing relationships from the element and its descendants
|
|
1467
|
-
*/
|
|
1468
|
-
outgoing(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1469
|
-
outgoers(element: ElementOrFqn, filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1470
|
-
}
|
|
1471
|
-
declare namespace LikeC4DiagramModel {
|
|
1472
|
-
/**
|
|
1473
|
-
* Represents an element in the view. (Diagram node)
|
|
1474
|
-
* All methods are view-scoped, i.e. `children` returns only children of the element in the view.
|
|
1475
|
-
*/
|
|
1476
|
-
class Element {
|
|
1477
|
-
readonly node: DiagramNode;
|
|
1478
|
-
private readonly view;
|
|
1479
|
-
constructor(node: DiagramNode, view: LikeC4DiagramModel);
|
|
1480
|
-
get id(): NodeId<string>;
|
|
1481
|
-
get title(): string;
|
|
1482
|
-
get kind(): ElementKind$1;
|
|
1483
|
-
get isRoot(): boolean;
|
|
1484
|
-
get hasNested(): boolean;
|
|
1485
|
-
get shape(): ElementShape$1;
|
|
1486
|
-
get color(): Color$1;
|
|
1487
|
-
get tags(): Tag$1[];
|
|
1488
|
-
get level(): number;
|
|
1489
|
-
get depth(): number;
|
|
1490
|
-
model(): LikeC4Model.ElementModel<LikeC4DiagramModel>;
|
|
1491
|
-
parent(): LikeC4DiagramModel.Element | null;
|
|
1492
|
-
metadata(key: string): string | undefined;
|
|
1493
|
-
metadata(key: string, defaultValue: string): string;
|
|
1494
|
-
hasMetadata(key: string): boolean;
|
|
1495
|
-
ancestors(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1496
|
-
siblings(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1497
|
-
descendants(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1498
|
-
children(): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1499
|
-
incoming(filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1500
|
-
incomers(filter?: IncomingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1501
|
-
outgoing(filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1502
|
-
outgoers(filter?: OutgoingFilter): ReadonlyArray<LikeC4DiagramModel.Element>;
|
|
1503
|
-
connectionsTo(target: Fqn | LikeC4DiagramModel.Element): ReadonlyArray<LikeC4DiagramModel.Connection>;
|
|
1504
|
-
}
|
|
1505
|
-
/**
|
|
1506
|
-
* Represents a connection between two elements.
|
|
1507
|
-
* May be source from multiple model relationships.
|
|
1508
|
-
*/
|
|
1509
|
-
class Connection {
|
|
1510
|
-
readonly edge: DiagramEdge;
|
|
1511
|
-
private readonly view;
|
|
1512
|
-
constructor(edge: DiagramEdge, view: LikeC4DiagramModel);
|
|
1513
|
-
get id(): EdgeId$1;
|
|
1514
|
-
get source(): LikeC4DiagramModel.Element;
|
|
1515
|
-
get target(): LikeC4DiagramModel.Element;
|
|
1516
|
-
get tags(): Tag$1[];
|
|
1517
|
-
get color(): Color$1;
|
|
1518
|
-
/**
|
|
1519
|
-
* Model relationships
|
|
1520
|
-
*/
|
|
1521
|
-
relationships(): ReadonlyArray<LikeC4Model.Relationship<LikeC4DiagramModel>>;
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
declare function nameFromFqn(fqn: LiteralUnion<Fqn$1, string>): string;
|
|
2110
|
+
declare function nonNullable<T>(value: T, message?: string): NonNullable<T>;
|
|
2111
|
+
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;
|
|
1525
2115
|
declare function isAncestor<E extends {
|
|
1526
|
-
id:
|
|
2116
|
+
id: string;
|
|
1527
2117
|
}>(...args: [ancestor: string, another: string] | [ancestor: E, another: E]): boolean;
|
|
1528
|
-
declare function isSameHierarchy<E extends {
|
|
1529
|
-
id: Fqn
|
|
1530
|
-
}>(one: E
|
|
2118
|
+
declare function isSameHierarchy<E extends string | {
|
|
2119
|
+
id: Fqn;
|
|
2120
|
+
}>(one: E, another: E): boolean;
|
|
1531
2121
|
declare function isDescendantOf<E extends {
|
|
1532
|
-
id: Fqn
|
|
2122
|
+
id: Fqn;
|
|
1533
2123
|
}>(ancestors: E[]): (e: E) => boolean;
|
|
1534
|
-
declare function commonAncestor<
|
|
1535
|
-
declare function parentFqn<IDs extends string>(fqn: Fqn$1<IDs>): Fqn$1<IDs> | null;
|
|
2124
|
+
declare function commonAncestor<E extends string>(first: E, second: E): E;
|
|
1536
2125
|
/**
|
|
1537
2126
|
* Get all ancestor elements (i.e. parent, parent’s parent, etc.)
|
|
1538
|
-
*
|
|
2127
|
+
* going up from parent to the root
|
|
1539
2128
|
*/
|
|
1540
|
-
declare function ancestorsFqn<
|
|
2129
|
+
declare function ancestorsFqn<Id extends string>(fqn: Id): Id[];
|
|
1541
2130
|
/**
|
|
1542
2131
|
* Compares two fully qualified names (fqns) hierarchically based on their depth.
|
|
1543
2132
|
* From parent nodes to leaves
|
|
@@ -1559,7 +2148,8 @@ declare function compareByFqnHierarchically<T extends {
|
|
|
1559
2148
|
* and of the form [x, ...y[]], etc...), and their readonly equivalent. This
|
|
1560
2149
|
* allows us to be more inclusive to what functions can process.
|
|
1561
2150
|
*
|
|
1562
|
-
* @example
|
|
2151
|
+
* @example
|
|
2152
|
+
* function map<T extends IterableContainer>(items: T) { ... }
|
|
1563
2153
|
*
|
|
1564
2154
|
* We would've named this `ArrayLike`, but that's already used by typescript...
|
|
1565
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)
|
|
@@ -5462,6 +6052,41 @@ interface ILexingError {
|
|
|
5462
6052
|
message: string;
|
|
5463
6053
|
}
|
|
5464
6054
|
|
|
6055
|
+
interface ILexerErrorMessageProvider {
|
|
6056
|
+
/**
|
|
6057
|
+
* An Unexpected Character Error occurs when the lexer is unable to match a range of one or more
|
|
6058
|
+
* characters in the input text against any of the Token Types in it's Lexer definition
|
|
6059
|
+
*
|
|
6060
|
+
* @param fullText - Full original input text.
|
|
6061
|
+
*
|
|
6062
|
+
* @param startOffset - Offset in input text where error starts.
|
|
6063
|
+
*
|
|
6064
|
+
* @param length - Error length.
|
|
6065
|
+
*
|
|
6066
|
+
* @param line - Line number where the error occurred. (optional)
|
|
6067
|
+
* Will not be provided when lexer is not defined to track lines/columns
|
|
6068
|
+
*
|
|
6069
|
+
* @param column - Column number where the error occurred. (optional)
|
|
6070
|
+
* Will not be provided when lexer is not defined to track lines/columns
|
|
6071
|
+
*/
|
|
6072
|
+
buildUnexpectedCharactersMessage(
|
|
6073
|
+
fullText: string,
|
|
6074
|
+
startOffset: number,
|
|
6075
|
+
length: number,
|
|
6076
|
+
line?: number,
|
|
6077
|
+
column?: number,
|
|
6078
|
+
): string;
|
|
6079
|
+
|
|
6080
|
+
/**
|
|
6081
|
+
* Unable To Pop Lexer Mode Error happens when lexer tries to pop the last remaining mode from the mode stack
|
|
6082
|
+
* so that there is no longer any active lexer mode
|
|
6083
|
+
* This error only relevant for multi-mode lexers
|
|
6084
|
+
*
|
|
6085
|
+
* @param token - The Token that requested pop mode.
|
|
6086
|
+
*/
|
|
6087
|
+
buildUnableToPopLexerModeMessage(token: IToken): string;
|
|
6088
|
+
}
|
|
6089
|
+
|
|
5465
6090
|
type TokenPattern =
|
|
5466
6091
|
| RegExp
|
|
5467
6092
|
| string
|
|
@@ -6314,7 +6939,7 @@ interface UriComponents {
|
|
|
6314
6939
|
}
|
|
6315
6940
|
|
|
6316
6941
|
/******************************************************************************
|
|
6317
|
-
* This file was generated by langium-cli 3.
|
|
6942
|
+
* This file was generated by langium-cli 3.3.0.
|
|
6318
6943
|
* DO NOT EDIT MANUALLY!
|
|
6319
6944
|
******************************************************************************/
|
|
6320
6945
|
|
|
@@ -7220,7 +7845,7 @@ declare class LangiumCompletionParser extends AbstractLangiumParser {
|
|
|
7220
7845
|
*/
|
|
7221
7846
|
declare class ChevrotainWrapper extends EmbeddedActionsParser {
|
|
7222
7847
|
definitionErrors: IParserDefinitionError[];
|
|
7223
|
-
constructor(tokens: TokenVocabulary, config
|
|
7848
|
+
constructor(tokens: TokenVocabulary, config: IParserConfig);
|
|
7224
7849
|
get IS_RECORDING(): boolean;
|
|
7225
7850
|
DEFINE_RULE(name: string, impl: RuleImpl): RuleResult;
|
|
7226
7851
|
wrapSelfAnalysis(): void;
|
|
@@ -7805,12 +8430,52 @@ declare class SimpleCache<K, V> extends DisposableCache {
|
|
|
7805
8430
|
delete(key: K): boolean;
|
|
7806
8431
|
clear(): void;
|
|
7807
8432
|
}
|
|
8433
|
+
declare class ContextCache<Context, Key, Value, ContextKey = Context> extends DisposableCache {
|
|
8434
|
+
private readonly cache;
|
|
8435
|
+
private readonly converter;
|
|
8436
|
+
constructor(converter?: (input: Context) => ContextKey);
|
|
8437
|
+
has(contextKey: Context, key: Key): boolean;
|
|
8438
|
+
set(contextKey: Context, key: Key, value: Value): void;
|
|
8439
|
+
get(contextKey: Context, key: Key): Value | undefined;
|
|
8440
|
+
get(contextKey: Context, key: Key, provider: () => Value): Value;
|
|
8441
|
+
delete(contextKey: Context, key: Key): boolean;
|
|
8442
|
+
clear(): void;
|
|
8443
|
+
clear(contextKey: Context): void;
|
|
8444
|
+
protected cacheForContext(contextKey: Context): Map<Key, Value>;
|
|
8445
|
+
}
|
|
8446
|
+
/**
|
|
8447
|
+
* Every key/value pair in this cache is scoped to a document.
|
|
8448
|
+
* If this document is changed or deleted, all associated key/value pairs are deleted.
|
|
8449
|
+
*/
|
|
8450
|
+
declare class DocumentCache<K, V> extends ContextCache<URI | string, K, V, string> {
|
|
8451
|
+
/**
|
|
8452
|
+
* Creates a new document cache.
|
|
8453
|
+
*
|
|
8454
|
+
* @param sharedServices Service container instance to hook into document lifecycle events.
|
|
8455
|
+
* @param state Optional document state on which the cache should evict.
|
|
8456
|
+
* If not provided, the cache will evict on `DocumentBuilder#onUpdate`.
|
|
8457
|
+
* *Deleted* documents are considered in both cases.
|
|
8458
|
+
*
|
|
8459
|
+
* Providing a state here will use `DocumentBuilder#onDocumentPhase` instead,
|
|
8460
|
+
* which triggers on all documents that have been affected by this change, assuming that the
|
|
8461
|
+
* state is `DocumentState.Linked` or a later state.
|
|
8462
|
+
*/
|
|
8463
|
+
constructor(sharedServices: LangiumSharedCoreServices, state?: DocumentState);
|
|
8464
|
+
}
|
|
7808
8465
|
/**
|
|
7809
8466
|
* Every key/value pair in this cache is scoped to the whole workspace.
|
|
7810
|
-
* If any document in the workspace
|
|
8467
|
+
* If any document in the workspace is added, changed or deleted, the whole cache is evicted.
|
|
7811
8468
|
*/
|
|
7812
8469
|
declare class WorkspaceCache<K, V> extends SimpleCache<K, V> {
|
|
7813
|
-
|
|
8470
|
+
/**
|
|
8471
|
+
* Creates a new workspace cache.
|
|
8472
|
+
*
|
|
8473
|
+
* @param sharedServices Service container instance to hook into document lifecycle events.
|
|
8474
|
+
* @param state Optional document state on which the cache should evict.
|
|
8475
|
+
* If not provided, the cache will evict on `DocumentBuilder#onUpdate`.
|
|
8476
|
+
* *Deleted* documents are considered in both cases.
|
|
8477
|
+
*/
|
|
8478
|
+
constructor(sharedServices: LangiumSharedCoreServices, state?: DocumentState);
|
|
7814
8479
|
}
|
|
7815
8480
|
|
|
7816
8481
|
/******************************************************************************
|
|
@@ -7834,6 +8499,10 @@ interface NameProvider {
|
|
|
7834
8499
|
*/
|
|
7835
8500
|
getNameNode(node: AstNode): CstNode | undefined;
|
|
7836
8501
|
}
|
|
8502
|
+
declare class DefaultNameProvider implements NameProvider {
|
|
8503
|
+
getName(node: AstNode): string | undefined;
|
|
8504
|
+
getNameNode(node: AstNode): CstNode | undefined;
|
|
8505
|
+
}
|
|
7837
8506
|
|
|
7838
8507
|
/******************************************************************************
|
|
7839
8508
|
* Copyright 2021 TypeFox GmbH
|
|
@@ -8007,10 +8676,19 @@ interface DocumentationProvider {
|
|
|
8007
8676
|
* This program and the accompanying materials are made available under the
|
|
8008
8677
|
* terms of the MIT License, which is available in the project root.
|
|
8009
8678
|
******************************************************************************/
|
|
8679
|
+
/**
|
|
8680
|
+
* Metadata of a language.
|
|
8681
|
+
*/
|
|
8010
8682
|
interface LanguageMetaData {
|
|
8011
8683
|
languageId: string;
|
|
8012
8684
|
fileExtensions: readonly string[];
|
|
8013
8685
|
caseInsensitive: boolean;
|
|
8686
|
+
/**
|
|
8687
|
+
* Mode used to optimize code for development or production environments.
|
|
8688
|
+
*
|
|
8689
|
+
* In production mode, all Chevrotain lexer/parser validations are disabled.
|
|
8690
|
+
*/
|
|
8691
|
+
mode: 'development' | 'production';
|
|
8014
8692
|
}
|
|
8015
8693
|
|
|
8016
8694
|
/******************************************************************************
|
|
@@ -8112,9 +8790,7 @@ interface Linker {
|
|
|
8112
8790
|
/**
|
|
8113
8791
|
* Determines a candidate AST node description for linking the given reference.
|
|
8114
8792
|
*
|
|
8115
|
-
* @param
|
|
8116
|
-
* @param refId The reference identifier used to build a scope.
|
|
8117
|
-
* @param reference The actual reference to resolve.
|
|
8793
|
+
* @param refInfo Information about the reference.
|
|
8118
8794
|
*/
|
|
8119
8795
|
getCandidate(refInfo: ReferenceInfo): AstNodeDescription | LinkingError;
|
|
8120
8796
|
/**
|
|
@@ -8129,8 +8805,8 @@ interface Linker {
|
|
|
8129
8805
|
* and further resolution attempts will *not* be performed.
|
|
8130
8806
|
*
|
|
8131
8807
|
* @param node The containing AST node
|
|
8808
|
+
* @param property The AST node property being referenced
|
|
8132
8809
|
* @param refNode The corresponding CST node
|
|
8133
|
-
* @param refId The cross reference identifier like '<entityTypeName>:<propertyName>'
|
|
8134
8810
|
* @param refText The cross reference text denoting the target AstNode
|
|
8135
8811
|
* @returns the desired Reference node, whose behavior wrt. resolving the cross reference is implementation specific.
|
|
8136
8812
|
*/
|
|
@@ -8184,8 +8860,9 @@ declare class Deferred<T = void> {
|
|
|
8184
8860
|
/**
|
|
8185
8861
|
* Async parser that allows cancellation of the current parsing process.
|
|
8186
8862
|
*
|
|
8187
|
-
* @
|
|
8188
|
-
*
|
|
8863
|
+
* @remarks
|
|
8864
|
+
* The sync parser implementation is blocking the event loop, which can become quite problematic for large files.
|
|
8865
|
+
* The default implementation is not actually async. It just wraps the sync parser in a promise. A real implementation would create worker threads or web workers to offload the parsing work.
|
|
8189
8866
|
*/
|
|
8190
8867
|
interface AsyncParser {
|
|
8191
8868
|
/**
|
|
@@ -8195,7 +8872,7 @@ interface AsyncParser {
|
|
|
8195
8872
|
* @param cancelToken A cancellation token that can be used to cancel the parsing process.
|
|
8196
8873
|
* @returns A promise that resolves to the parse result.
|
|
8197
8874
|
*
|
|
8198
|
-
* @
|
|
8875
|
+
* @throws `OperationCancelled` if the parsing process is cancelled.
|
|
8199
8876
|
*/
|
|
8200
8877
|
parse<T extends AstNode>(text: string, cancelToken: CancellationToken): Promise<ParseResult<T>>;
|
|
8201
8878
|
}
|
|
@@ -8388,7 +9065,7 @@ interface JsonSerializer {
|
|
|
8388
9065
|
/**
|
|
8389
9066
|
* Serialize an `AstNode` into a JSON `string`.
|
|
8390
9067
|
* @param node The `AstNode` to be serialized.
|
|
8391
|
-
* @param
|
|
9068
|
+
* @param options Serialization options
|
|
8392
9069
|
*/
|
|
8393
9070
|
serialize(node: AstNode, options?: JsonSerializeOptions): string;
|
|
8394
9071
|
/**
|
|
@@ -8428,6 +9105,19 @@ type DiagnosticInfo<N extends AstNode, P extends string = Properties<N>> = {
|
|
|
8428
9105
|
type ValidationSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
8429
9106
|
type ValidationAcceptor = <N extends AstNode>(severity: ValidationSeverity, message: string, info: DiagnosticInfo<N>) => void;
|
|
8430
9107
|
type ValidationCheck<T extends AstNode = AstNode> = (node: T, accept: ValidationAcceptor, cancelToken: CancellationToken) => MaybePromise<void>;
|
|
9108
|
+
/**
|
|
9109
|
+
* A utility type for describing functions which will be called once before or after all the AstNodes of an AST/Langium document are validated.
|
|
9110
|
+
*
|
|
9111
|
+
* The AST is represented by its root AstNode.
|
|
9112
|
+
*
|
|
9113
|
+
* The given validation acceptor helps to report some early or lately detected issues.
|
|
9114
|
+
*
|
|
9115
|
+
* The 'categories' indicate, which validation categories are executed for all the AstNodes.
|
|
9116
|
+
* This helps to tailor the preparations/tear-down logic to the actually executed checks on the nodes.
|
|
9117
|
+
*
|
|
9118
|
+
* It is recommended to support interrupts during long-running logic with 'interruptAndCheck(cancelToken)'.
|
|
9119
|
+
*/
|
|
9120
|
+
type ValidationPreparation = (rootNode: AstNode, accept: ValidationAcceptor, categories: ValidationCategory[], cancelToken: CancellationToken) => MaybePromise<void>;
|
|
8431
9121
|
/**
|
|
8432
9122
|
* A utility type for associating non-primitive AST types to corresponding validation checks. For example:
|
|
8433
9123
|
*
|
|
@@ -8470,6 +9160,8 @@ type ValidationCheckEntry = {
|
|
|
8470
9160
|
declare class ValidationRegistry {
|
|
8471
9161
|
private readonly entries;
|
|
8472
9162
|
private readonly reflection;
|
|
9163
|
+
private entriesBefore;
|
|
9164
|
+
private entriesAfter;
|
|
8473
9165
|
constructor(services: LangiumCoreServices);
|
|
8474
9166
|
/**
|
|
8475
9167
|
* Register a set of validation checks. Each value in the record can be either a single validation check (i.e. a function)
|
|
@@ -8481,8 +9173,46 @@ declare class ValidationRegistry {
|
|
|
8481
9173
|
*/
|
|
8482
9174
|
register<T>(checksRecord: ValidationChecks<T>, thisObj?: ThisParameterType<unknown>, category?: ValidationCategory): void;
|
|
8483
9175
|
protected wrapValidationException(check: ValidationCheck, thisObj: unknown): ValidationCheck;
|
|
9176
|
+
protected handleException(functionality: () => MaybePromise<void>, messageContext: string, accept: ValidationAcceptor, node: AstNode): Promise<void>;
|
|
8484
9177
|
protected addEntry(type: string, entry: ValidationCheckEntry): void;
|
|
8485
9178
|
getChecks(type: string, categories?: ValidationCategory[]): Stream<ValidationCheck>;
|
|
9179
|
+
/**
|
|
9180
|
+
* Register logic which will be executed once before validating all the nodes of an AST/Langium document.
|
|
9181
|
+
* This helps to prepare or initialize some information which are required or reusable for the following checks on the AstNodes.
|
|
9182
|
+
*
|
|
9183
|
+
* As an example, for validating unique fully-qualified names of nodes in the AST,
|
|
9184
|
+
* here the map for mapping names to nodes could be established.
|
|
9185
|
+
* During the usual checks on the nodes, they are put into this map with their name.
|
|
9186
|
+
*
|
|
9187
|
+
* Note that this approach makes validations stateful, which is relevant e.g. when cancelling the validation.
|
|
9188
|
+
* Therefore it is recommended to clear stored information
|
|
9189
|
+
* _before_ validating an AST to validate each AST unaffected from other ASTs
|
|
9190
|
+
* AND _after_ validating the AST to free memory by information which are no longer used.
|
|
9191
|
+
*
|
|
9192
|
+
* @param checkBefore a set-up function which will be called once before actually validating an AST
|
|
9193
|
+
* @param thisObj Optional object to be used as `this` when calling the validation check functions.
|
|
9194
|
+
*/
|
|
9195
|
+
registerBeforeDocument(checkBefore: ValidationPreparation, thisObj?: ThisParameterType<unknown>): void;
|
|
9196
|
+
/**
|
|
9197
|
+
* Register logic which will be executed once after validating all the nodes of an AST/Langium document.
|
|
9198
|
+
* This helps to finally evaluate information which are collected during the checks on the AstNodes.
|
|
9199
|
+
*
|
|
9200
|
+
* As an example, for validating unique fully-qualified names of nodes in the AST,
|
|
9201
|
+
* here the map with all the collected nodes and their names is checked
|
|
9202
|
+
* and validation hints are created for all nodes with the same name.
|
|
9203
|
+
*
|
|
9204
|
+
* Note that this approach makes validations stateful, which is relevant e.g. when cancelling the validation.
|
|
9205
|
+
* Therefore it is recommended to clear stored information
|
|
9206
|
+
* _before_ validating an AST to validate each AST unaffected from other ASTs
|
|
9207
|
+
* AND _after_ validating the AST to free memory by information which are no longer used.
|
|
9208
|
+
*
|
|
9209
|
+
* @param checkBefore a set-up function which will be called once before actually validating an AST
|
|
9210
|
+
* @param thisObj Optional object to be used as `this` when calling the validation check functions.
|
|
9211
|
+
*/
|
|
9212
|
+
registerAfterDocument(checkAfter: ValidationPreparation, thisObj?: ThisParameterType<unknown>): void;
|
|
9213
|
+
protected wrapPreparationException(check: ValidationPreparation, messageContext: string, thisObj: unknown): ValidationPreparation;
|
|
9214
|
+
get checksBefore(): ValidationPreparation[];
|
|
9215
|
+
get checksAfter(): ValidationPreparation[];
|
|
8486
9216
|
}
|
|
8487
9217
|
|
|
8488
9218
|
/******************************************************************************
|
|
@@ -13167,6 +13897,11 @@ interface WorkspaceManager {
|
|
|
13167
13897
|
* Use this to ensure that the workspace manager has finished its initialization.
|
|
13168
13898
|
*/
|
|
13169
13899
|
readonly ready: Promise<void>;
|
|
13900
|
+
/**
|
|
13901
|
+
* The workspace folders of the current workspace.
|
|
13902
|
+
* Available only after the `ready` promise resolves.
|
|
13903
|
+
*/
|
|
13904
|
+
get workspaceFolders(): readonly WorkspaceFolder[] | undefined;
|
|
13170
13905
|
/**
|
|
13171
13906
|
* When used in a language server context, this method is called when the server receives
|
|
13172
13907
|
* the `initialize` request.
|
|
@@ -13200,6 +13935,7 @@ declare class DefaultWorkspaceManager implements WorkspaceManager {
|
|
|
13200
13935
|
protected folders?: WorkspaceFolder[];
|
|
13201
13936
|
constructor(services: LangiumSharedCoreServices);
|
|
13202
13937
|
get ready(): Promise<void>;
|
|
13938
|
+
get workspaceFolders(): readonly WorkspaceFolder[] | undefined;
|
|
13203
13939
|
initialize(params: InitializeParams): void;
|
|
13204
13940
|
initialized(_params: InitializedParams): Promise<void>;
|
|
13205
13941
|
initializeWorkspace(folders: WorkspaceFolder[], cancelToken?: CancellationToken): Promise<void>;
|
|
@@ -13258,6 +13994,7 @@ type LangiumDefaultCoreServices = {
|
|
|
13258
13994
|
readonly ValueConverter: ValueConverter;
|
|
13259
13995
|
readonly LangiumParser: LangiumParser;
|
|
13260
13996
|
readonly ParserErrorMessageProvider: IParserErrorMessageProvider;
|
|
13997
|
+
readonly LexerErrorMessageProvider: ILexerErrorMessageProvider;
|
|
13261
13998
|
readonly CompletionParser: LangiumCompletionParser;
|
|
13262
13999
|
readonly TokenBuilder: TokenBuilder;
|
|
13263
14000
|
readonly Lexer: Lexer;
|
|
@@ -15312,7 +16049,7 @@ declare class DefaultCompletionProvider implements CompletionProvider {
|
|
|
15312
16049
|
}
|
|
15313
16050
|
|
|
15314
16051
|
interface ChangeViewRequestParams {
|
|
15315
|
-
viewId:
|
|
16052
|
+
viewId: ViewId;
|
|
15316
16053
|
change: ViewChange;
|
|
15317
16054
|
}
|
|
15318
16055
|
|
|
@@ -15345,7 +16082,7 @@ declare class LikeC4DocumentLinkProvider implements DocumentLinkProvider {
|
|
|
15345
16082
|
}
|
|
15346
16083
|
|
|
15347
16084
|
/******************************************************************************
|
|
15348
|
-
* This file was generated by langium-cli 3.
|
|
16085
|
+
* This file was generated by langium-cli 3.3.0.
|
|
15349
16086
|
* DO NOT EDIT MANUALLY!
|
|
15350
16087
|
******************************************************************************/
|
|
15351
16088
|
|
|
@@ -15353,6 +16090,18 @@ type ArrowType = 'crow' | 'diamond' | 'dot' | 'none' | 'normal' | 'odiamond' | '
|
|
|
15353
16090
|
type BorderStyleValue = 'none' | LineOptions;
|
|
15354
16091
|
type CustomColorId = 'element' | 'model' | ArrowType | ElementShape | LineOptions | string;
|
|
15355
16092
|
type CustomColorValue = string;
|
|
16093
|
+
type DeploymentElement = DeployedInstance | DeploymentNode;
|
|
16094
|
+
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
|
+
type DeploymentViewRule = DeploymentViewRulePredicate | DeploymentViewRuleStyle | ViewRuleAutoLayout;
|
|
16104
|
+
declare const DeploymentViewRule = "DeploymentViewRule";
|
|
15356
16105
|
type DynamicViewRule = DynamicViewGlobalPredicateRef | DynamicViewIncludePredicate | ViewRuleAutoLayout | ViewRuleStyleOrGlobalRef;
|
|
15357
16106
|
declare const DynamicViewRule = "DynamicViewRule";
|
|
15358
16107
|
type ElementExpression = ElementDescedantsExpression | ElementKindExpression | ElementRef | ElementTagExpression | ExpandElementExpression | WildcardExpression;
|
|
@@ -15364,9 +16113,11 @@ declare const ElementPredicateOrWhere = "ElementPredicateOrWhere";
|
|
|
15364
16113
|
type ElementProperty = ElementStringProperty | ElementStyleProperty | IconProperty | LinkProperty | MetadataProperty;
|
|
15365
16114
|
declare const ElementProperty = "ElementProperty";
|
|
15366
16115
|
type ElementShape = 'browser' | 'cylinder' | 'mobile' | 'person' | 'queue' | 'rectangle' | 'storage';
|
|
16116
|
+
type FqnReferenceable = DeploymentReferenceable | Element | ExtendElement;
|
|
16117
|
+
declare const FqnReferenceable = "FqnReferenceable";
|
|
15367
16118
|
type IconId = string;
|
|
15368
|
-
type Id = 'element' | 'group' | 'model' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
15369
|
-
type LikeC4View = DynamicView | ElementView;
|
|
16119
|
+
type Id = 'deployment' | 'element' | 'group' | 'model' | 'node' | ArrowType | ElementShape | LineOptions | ThemeColor | string;
|
|
16120
|
+
type LikeC4View = DeploymentView | DynamicView | ElementView;
|
|
15370
16121
|
declare const LikeC4View = "LikeC4View";
|
|
15371
16122
|
type LineOptions = 'dashed' | 'dotted' | 'solid';
|
|
15372
16123
|
type MetadataProperty = MetadataBody;
|
|
@@ -15420,14 +16171,14 @@ interface ArrowProperty extends AstNode {
|
|
|
15420
16171
|
}
|
|
15421
16172
|
declare const ArrowProperty = "ArrowProperty";
|
|
15422
16173
|
interface BorderProperty extends AstNode {
|
|
15423
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
16174
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
15424
16175
|
readonly $type: 'BorderProperty';
|
|
15425
16176
|
key: 'border';
|
|
15426
16177
|
value: BorderStyleValue;
|
|
15427
16178
|
}
|
|
15428
16179
|
declare const BorderProperty = "BorderProperty";
|
|
15429
16180
|
interface ColorProperty extends AstNode {
|
|
15430
|
-
readonly $container: CustomElementProperties | CustomRelationProperties | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
|
|
16181
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | RelationStyleProperty | SpecificationRelationshipKind | ViewRuleGroup | ViewRuleStyle;
|
|
15431
16182
|
readonly $type: 'ColorProperty';
|
|
15432
16183
|
customColor?: Reference<CustomColor>;
|
|
15433
16184
|
key: 'color';
|
|
@@ -15452,6 +16203,128 @@ interface CustomRelationProperties extends AstNode {
|
|
|
15452
16203
|
props: Array<NotationProperty | NotesProperty | RelationNavigateToProperty | RelationStringProperty | RelationshipStyleProperty>;
|
|
15453
16204
|
}
|
|
15454
16205
|
declare const CustomRelationProperties = "CustomRelationProperties";
|
|
16206
|
+
interface DeployedInstance extends AstNode {
|
|
16207
|
+
readonly $container: DeploymentNodeBody;
|
|
16208
|
+
readonly $type: 'DeployedInstance';
|
|
16209
|
+
body?: DeployedInstanceBody;
|
|
16210
|
+
element: ElementRef;
|
|
16211
|
+
name?: Id;
|
|
16212
|
+
title?: string;
|
|
16213
|
+
}
|
|
16214
|
+
declare const DeployedInstance = "DeployedInstance";
|
|
16215
|
+
interface DeployedInstanceBody extends AstNode {
|
|
16216
|
+
readonly $container: DeployedInstance;
|
|
16217
|
+
readonly $type: 'DeployedInstanceBody';
|
|
16218
|
+
props: Array<ElementProperty>;
|
|
16219
|
+
tags?: Tags;
|
|
16220
|
+
}
|
|
16221
|
+
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
|
+
interface DeploymentNode extends AstNode {
|
|
16230
|
+
readonly $container: DeploymentNodeBody | ModelDeployments;
|
|
16231
|
+
readonly $type: 'DeploymentNode';
|
|
16232
|
+
body?: DeploymentNodeBody;
|
|
16233
|
+
kind: Reference<DeploymentNodeKind>;
|
|
16234
|
+
name: Id;
|
|
16235
|
+
title?: string;
|
|
16236
|
+
}
|
|
16237
|
+
declare const DeploymentNode = "DeploymentNode";
|
|
16238
|
+
interface DeploymentNodeBody extends AstNode {
|
|
16239
|
+
readonly $container: DeploymentNode;
|
|
16240
|
+
readonly $type: 'DeploymentNodeBody';
|
|
16241
|
+
elements: Array<DeployedInstance | DeploymentNode | DeploymentRelation>;
|
|
16242
|
+
props: Array<ElementProperty>;
|
|
16243
|
+
tags?: Tags;
|
|
16244
|
+
}
|
|
16245
|
+
declare const DeploymentNodeBody = "DeploymentNodeBody";
|
|
16246
|
+
interface DeploymentNodeKind extends AstNode {
|
|
16247
|
+
readonly $container: SpecificationDeploymentNodeKind;
|
|
16248
|
+
readonly $type: 'DeploymentNodeKind';
|
|
16249
|
+
name: Id;
|
|
16250
|
+
}
|
|
16251
|
+
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
|
+
interface DeploymentRelation extends AstNode {
|
|
16267
|
+
readonly $container: DeploymentNodeBody | ModelDeployments;
|
|
16268
|
+
readonly $type: 'DeploymentRelation';
|
|
16269
|
+
body?: DeploymentRelationBody;
|
|
16270
|
+
kind?: Reference<RelationshipKind>;
|
|
16271
|
+
source: DeploymentRef;
|
|
16272
|
+
tags?: Tags;
|
|
16273
|
+
target: DeploymentRef;
|
|
16274
|
+
technology?: string;
|
|
16275
|
+
title?: string;
|
|
16276
|
+
}
|
|
16277
|
+
declare const DeploymentRelation = "DeploymentRelation";
|
|
16278
|
+
interface DeploymentRelationBody extends AstNode {
|
|
16279
|
+
readonly $container: DeploymentRelation;
|
|
16280
|
+
readonly $type: 'DeploymentRelationBody';
|
|
16281
|
+
props: Array<RelationProperty>;
|
|
16282
|
+
tags?: Tags;
|
|
16283
|
+
}
|
|
16284
|
+
declare const DeploymentRelationBody = "DeploymentRelationBody";
|
|
16285
|
+
interface DeploymentView extends AstNode {
|
|
16286
|
+
readonly $container: ModelViews;
|
|
16287
|
+
readonly $type: 'DeploymentView';
|
|
16288
|
+
body?: DeploymentViewBody;
|
|
16289
|
+
name: Id;
|
|
16290
|
+
}
|
|
16291
|
+
declare const DeploymentView = "DeploymentView";
|
|
16292
|
+
interface DeploymentViewBody extends AstNode {
|
|
16293
|
+
readonly $container: DeploymentView;
|
|
16294
|
+
readonly $type: 'DeploymentViewBody';
|
|
16295
|
+
props: Array<ViewProperty>;
|
|
16296
|
+
rules: Array<DeploymentViewRule>;
|
|
16297
|
+
tags?: Tags;
|
|
16298
|
+
}
|
|
16299
|
+
declare const DeploymentViewBody = "DeploymentViewBody";
|
|
16300
|
+
interface DeploymentViewRulePredicate extends AstNode {
|
|
16301
|
+
readonly $container: DeploymentViewBody;
|
|
16302
|
+
readonly $type: 'DeploymentViewRulePredicate';
|
|
16303
|
+
expr: DeploymentViewRulePredicateExpression;
|
|
16304
|
+
isInclude: boolean;
|
|
16305
|
+
}
|
|
16306
|
+
declare const DeploymentViewRulePredicate = "DeploymentViewRulePredicate";
|
|
16307
|
+
interface DeploymentViewRulePredicateExpression extends AstNode {
|
|
16308
|
+
readonly $container: DeploymentViewRulePredicate | DeploymentViewRulePredicateExpression;
|
|
16309
|
+
readonly $type: 'DeploymentViewRulePredicateExpression';
|
|
16310
|
+
prev?: DeploymentViewRulePredicateExpression;
|
|
16311
|
+
value: DeploymentExpression;
|
|
16312
|
+
}
|
|
16313
|
+
declare const DeploymentViewRulePredicateExpression = "DeploymentViewRulePredicateExpression";
|
|
16314
|
+
interface DeploymentViewRuleStyle extends AstNode {
|
|
16315
|
+
readonly $container: DeploymentViewBody;
|
|
16316
|
+
readonly $type: 'DeploymentViewRuleStyle';
|
|
16317
|
+
props: Array<NotationProperty | StyleProperty>;
|
|
16318
|
+
target: DeploymentExpressionIterator;
|
|
16319
|
+
}
|
|
16320
|
+
declare const DeploymentViewRuleStyle = "DeploymentViewRuleStyle";
|
|
16321
|
+
interface DirectedDeploymentRelationExpression extends AstNode {
|
|
16322
|
+
readonly $container: DeploymentViewRulePredicateExpression;
|
|
16323
|
+
readonly $type: 'DirectedDeploymentRelationExpression';
|
|
16324
|
+
source: OutgoingDeploymentRelationExpression;
|
|
16325
|
+
target: DeploymentElementExpression;
|
|
16326
|
+
}
|
|
16327
|
+
declare const DirectedDeploymentRelationExpression = "DirectedDeploymentRelationExpression";
|
|
15455
16328
|
interface DirectedRelationExpression extends AstNode {
|
|
15456
16329
|
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
15457
16330
|
readonly $type: 'DirectedRelationExpression';
|
|
@@ -15538,6 +16411,7 @@ interface ElementDescedantsExpression extends AstNode {
|
|
|
15538
16411
|
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
15539
16412
|
readonly $type: 'ElementDescedantsExpression';
|
|
15540
16413
|
parent: ElementRef;
|
|
16414
|
+
suffix: string;
|
|
15541
16415
|
}
|
|
15542
16416
|
declare const ElementDescedantsExpression = "ElementDescedantsExpression";
|
|
15543
16417
|
interface ElementExpressionsIterator extends AstNode {
|
|
@@ -15575,21 +16449,21 @@ interface ElementPredicateWith extends AstNode {
|
|
|
15575
16449
|
}
|
|
15576
16450
|
declare const ElementPredicateWith = "ElementPredicateWith";
|
|
15577
16451
|
interface ElementRef extends AstNode {
|
|
15578
|
-
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | DynamicViewStep | ElementDescedantsExpression | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | ElementRef | ElementView | ExpandElementExpression | IncomingRelationExpression | OutgoingRelationExpression | Predicates | Relation;
|
|
16452
|
+
readonly $container: DeployedInstance | DirectedRelationExpression | DynamicViewPredicateIterator | DynamicViewStep | ElementDescedantsExpression | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | ElementRef | ElementView | ExpandElementExpression | IncomingRelationExpression | OutgoingRelationExpression | Predicates | Relation;
|
|
15579
16453
|
readonly $type: 'ElementRef';
|
|
15580
16454
|
el: Reference<Element>;
|
|
15581
16455
|
parent?: ElementRef;
|
|
15582
16456
|
}
|
|
15583
16457
|
declare const ElementRef = "ElementRef";
|
|
15584
16458
|
interface ElementStringProperty extends AstNode {
|
|
15585
|
-
readonly $container: CustomElementProperties | ElementBody;
|
|
16459
|
+
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | ElementBody;
|
|
15586
16460
|
readonly $type: 'ElementStringProperty';
|
|
15587
16461
|
key: 'description' | 'technology' | 'title';
|
|
15588
16462
|
value: string;
|
|
15589
16463
|
}
|
|
15590
16464
|
declare const ElementStringProperty = "ElementStringProperty";
|
|
15591
16465
|
interface ElementStyleProperty extends AstNode {
|
|
15592
|
-
readonly $container: ElementBody | SpecificationElementKind;
|
|
16466
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | ElementBody | SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
15593
16467
|
readonly $type: 'ElementStyleProperty';
|
|
15594
16468
|
key: 'style';
|
|
15595
16469
|
props: Array<StyleProperty>;
|
|
@@ -15701,7 +16575,7 @@ interface GlobalStyleId extends AstNode {
|
|
|
15701
16575
|
}
|
|
15702
16576
|
declare const GlobalStyleId = "GlobalStyleId";
|
|
15703
16577
|
interface IconProperty extends AstNode {
|
|
15704
|
-
readonly $container: CustomElementProperties | ElementBody | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
16578
|
+
readonly $container: CustomElementProperties | DeployedInstanceBody | DeploymentNodeBody | DeploymentViewRuleStyle | ElementBody | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
15705
16579
|
readonly $type: 'IconProperty';
|
|
15706
16580
|
key: 'icon';
|
|
15707
16581
|
libicon?: Reference<LibIcon>;
|
|
@@ -15714,12 +16588,24 @@ interface IncludePredicate extends AstNode {
|
|
|
15714
16588
|
predicates: Predicates;
|
|
15715
16589
|
}
|
|
15716
16590
|
declare const IncludePredicate = "IncludePredicate";
|
|
16591
|
+
interface IncomingDeploymentRelationExpression extends AstNode {
|
|
16592
|
+
readonly $container: DeploymentViewRulePredicateExpression | InOutDeploymentRelationExpression;
|
|
16593
|
+
readonly $type: 'IncomingDeploymentRelationExpression';
|
|
16594
|
+
to: DeploymentElementExpression;
|
|
16595
|
+
}
|
|
16596
|
+
declare const IncomingDeploymentRelationExpression = "IncomingDeploymentRelationExpression";
|
|
15717
16597
|
interface IncomingRelationExpression extends AstNode {
|
|
15718
16598
|
readonly $container: InOutRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
15719
16599
|
readonly $type: 'IncomingRelationExpression';
|
|
15720
16600
|
to: ElementExpression;
|
|
15721
16601
|
}
|
|
15722
16602
|
declare const IncomingRelationExpression = "IncomingRelationExpression";
|
|
16603
|
+
interface InOutDeploymentRelationExpression extends AstNode {
|
|
16604
|
+
readonly $container: DeploymentViewRulePredicateExpression;
|
|
16605
|
+
readonly $type: 'InOutDeploymentRelationExpression';
|
|
16606
|
+
inout: IncomingDeploymentRelationExpression;
|
|
16607
|
+
}
|
|
16608
|
+
declare const InOutDeploymentRelationExpression = "InOutDeploymentRelationExpression";
|
|
15723
16609
|
interface InOutRelationExpression extends AstNode {
|
|
15724
16610
|
readonly $container: Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
15725
16611
|
readonly $type: 'InOutRelationExpression';
|
|
@@ -15734,6 +16620,7 @@ interface LibIcon extends AstNode {
|
|
|
15734
16620
|
declare const LibIcon = "LibIcon";
|
|
15735
16621
|
interface LikeC4Grammar extends AstNode {
|
|
15736
16622
|
readonly $type: 'LikeC4Grammar';
|
|
16623
|
+
deployments: Array<ModelDeployments>;
|
|
15737
16624
|
globals: Array<Globals>;
|
|
15738
16625
|
likec4lib: Array<LikeC4Lib>;
|
|
15739
16626
|
models: Array<Model>;
|
|
@@ -15755,7 +16642,7 @@ interface LineProperty extends AstNode {
|
|
|
15755
16642
|
}
|
|
15756
16643
|
declare const LineProperty = "LineProperty";
|
|
15757
16644
|
interface LinkProperty extends AstNode {
|
|
15758
|
-
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | RelationBody;
|
|
16645
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | RelationBody;
|
|
15759
16646
|
readonly $type: 'LinkProperty';
|
|
15760
16647
|
key: 'link';
|
|
15761
16648
|
title?: string;
|
|
@@ -15770,7 +16657,7 @@ interface MetadataAttribute extends AstNode {
|
|
|
15770
16657
|
}
|
|
15771
16658
|
declare const MetadataAttribute = "MetadataAttribute";
|
|
15772
16659
|
interface MetadataBody extends AstNode {
|
|
15773
|
-
readonly $container: ElementBody | RelationBody;
|
|
16660
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelationBody | ElementBody | RelationBody;
|
|
15774
16661
|
readonly $type: 'MetadataBody';
|
|
15775
16662
|
props: Array<MetadataAttribute>;
|
|
15776
16663
|
}
|
|
@@ -15782,6 +16669,13 @@ interface Model extends AstNode {
|
|
|
15782
16669
|
name: 'model';
|
|
15783
16670
|
}
|
|
15784
16671
|
declare const Model = "Model";
|
|
16672
|
+
interface ModelDeployments extends AstNode {
|
|
16673
|
+
readonly $container: LikeC4Grammar;
|
|
16674
|
+
readonly $type: 'ModelDeployments';
|
|
16675
|
+
elements: Array<DeploymentNode | DeploymentRelation>;
|
|
16676
|
+
name: 'deployment';
|
|
16677
|
+
}
|
|
16678
|
+
declare const ModelDeployments = "ModelDeployments";
|
|
15785
16679
|
interface ModelViews extends AstNode {
|
|
15786
16680
|
readonly $container: LikeC4Grammar;
|
|
15787
16681
|
readonly $type: 'ModelViews';
|
|
@@ -15798,7 +16692,7 @@ interface NavigateToProperty extends AstNode {
|
|
|
15798
16692
|
}
|
|
15799
16693
|
declare const NavigateToProperty = "NavigateToProperty";
|
|
15800
16694
|
interface NotationProperty extends AstNode {
|
|
15801
|
-
readonly $container: CustomElementProperties | CustomRelationProperties | GlobalStyle | ViewRuleStyle;
|
|
16695
|
+
readonly $container: CustomElementProperties | CustomRelationProperties | DeploymentViewRuleStyle | GlobalStyle | ViewRuleStyle;
|
|
15802
16696
|
readonly $type: 'NotationProperty';
|
|
15803
16697
|
key: 'notation';
|
|
15804
16698
|
value: string;
|
|
@@ -15812,12 +16706,20 @@ interface NotesProperty extends AstNode {
|
|
|
15812
16706
|
}
|
|
15813
16707
|
declare const NotesProperty = "NotesProperty";
|
|
15814
16708
|
interface OpacityProperty extends AstNode {
|
|
15815
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
16709
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleGroup | ViewRuleStyle;
|
|
15816
16710
|
readonly $type: 'OpacityProperty';
|
|
15817
16711
|
key: 'opacity';
|
|
15818
16712
|
value: string;
|
|
15819
16713
|
}
|
|
15820
16714
|
declare const OpacityProperty = "OpacityProperty";
|
|
16715
|
+
interface OutgoingDeploymentRelationExpression extends AstNode {
|
|
16716
|
+
readonly $container: DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression;
|
|
16717
|
+
readonly $type: 'OutgoingDeploymentRelationExpression';
|
|
16718
|
+
from: DeploymentElementExpression;
|
|
16719
|
+
isBidirectional: boolean;
|
|
16720
|
+
kind?: Reference<RelationshipKind>;
|
|
16721
|
+
}
|
|
16722
|
+
declare const OutgoingDeploymentRelationExpression = "OutgoingDeploymentRelationExpression";
|
|
15821
16723
|
interface OutgoingRelationExpression extends AstNode {
|
|
15822
16724
|
readonly $container: DirectedRelationExpression | Predicates | RelationPredicateWhere | RelationPredicateWith;
|
|
15823
16725
|
readonly $type: 'OutgoingRelationExpression';
|
|
@@ -15853,7 +16755,7 @@ interface RelationBody extends AstNode {
|
|
|
15853
16755
|
}
|
|
15854
16756
|
declare const RelationBody = "RelationBody";
|
|
15855
16757
|
interface RelationNavigateToProperty extends AstNode {
|
|
15856
|
-
readonly $container: CustomRelationProperties | RelationBody;
|
|
16758
|
+
readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
|
|
15857
16759
|
readonly $type: 'RelationNavigateToProperty';
|
|
15858
16760
|
key: 'navigateTo';
|
|
15859
16761
|
value: DynamicViewRef;
|
|
@@ -15880,21 +16782,21 @@ interface RelationshipKind extends AstNode {
|
|
|
15880
16782
|
}
|
|
15881
16783
|
declare const RelationshipKind = "RelationshipKind";
|
|
15882
16784
|
interface RelationStringProperty extends AstNode {
|
|
15883
|
-
readonly $container: CustomRelationProperties | RelationBody;
|
|
16785
|
+
readonly $container: CustomRelationProperties | DeploymentRelationBody | RelationBody;
|
|
15884
16786
|
readonly $type: 'RelationStringProperty';
|
|
15885
16787
|
key: 'description' | 'technology' | 'title';
|
|
15886
16788
|
value: string;
|
|
15887
16789
|
}
|
|
15888
16790
|
declare const RelationStringProperty = "RelationStringProperty";
|
|
15889
16791
|
interface RelationStyleProperty extends AstNode {
|
|
15890
|
-
readonly $container: RelationBody;
|
|
16792
|
+
readonly $container: DeploymentRelationBody | RelationBody;
|
|
15891
16793
|
readonly $type: 'RelationStyleProperty';
|
|
15892
16794
|
key: 'style';
|
|
15893
16795
|
props: Array<RelationshipStyleProperty>;
|
|
15894
16796
|
}
|
|
15895
16797
|
declare const RelationStyleProperty = "RelationStyleProperty";
|
|
15896
16798
|
interface ShapeProperty extends AstNode {
|
|
15897
|
-
readonly $container: CustomElementProperties | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
16799
|
+
readonly $container: CustomElementProperties | DeploymentViewRuleStyle | ElementStyleProperty | GlobalStyle | ViewRuleStyle;
|
|
15898
16800
|
readonly $type: 'ShapeProperty';
|
|
15899
16801
|
key: 'shape';
|
|
15900
16802
|
value: ElementShape;
|
|
@@ -15907,6 +16809,13 @@ interface SpecificationColor extends AstNode {
|
|
|
15907
16809
|
name: CustomColor;
|
|
15908
16810
|
}
|
|
15909
16811
|
declare const SpecificationColor = "SpecificationColor";
|
|
16812
|
+
interface SpecificationDeploymentNodeKind extends AstNode {
|
|
16813
|
+
readonly $container: SpecificationRule;
|
|
16814
|
+
readonly $type: 'SpecificationDeploymentNodeKind';
|
|
16815
|
+
kind: DeploymentNodeKind;
|
|
16816
|
+
props: Array<ElementStyleProperty | SpecificationElementStringProperty>;
|
|
16817
|
+
}
|
|
16818
|
+
declare const SpecificationDeploymentNodeKind = "SpecificationDeploymentNodeKind";
|
|
15910
16819
|
interface SpecificationElementKind extends AstNode {
|
|
15911
16820
|
readonly $container: SpecificationRule;
|
|
15912
16821
|
readonly $type: 'SpecificationElementKind';
|
|
@@ -15915,7 +16824,7 @@ interface SpecificationElementKind extends AstNode {
|
|
|
15915
16824
|
}
|
|
15916
16825
|
declare const SpecificationElementKind = "SpecificationElementKind";
|
|
15917
16826
|
interface SpecificationElementStringProperty extends AstNode {
|
|
15918
|
-
readonly $container: SpecificationElementKind;
|
|
16827
|
+
readonly $container: SpecificationDeploymentNodeKind | SpecificationElementKind;
|
|
15919
16828
|
readonly $type: 'SpecificationElementStringProperty';
|
|
15920
16829
|
key: 'notation' | 'technology';
|
|
15921
16830
|
value: string;
|
|
@@ -15939,6 +16848,7 @@ interface SpecificationRule extends AstNode {
|
|
|
15939
16848
|
readonly $container: LikeC4Grammar;
|
|
15940
16849
|
readonly $type: 'SpecificationRule';
|
|
15941
16850
|
colors: Array<SpecificationColor>;
|
|
16851
|
+
deploymentNodes: Array<SpecificationDeploymentNodeKind>;
|
|
15942
16852
|
elements: Array<SpecificationElementKind>;
|
|
15943
16853
|
name: 'specification';
|
|
15944
16854
|
relationships: Array<SpecificationRelationshipKind>;
|
|
@@ -15958,7 +16868,7 @@ interface Tag extends AstNode {
|
|
|
15958
16868
|
}
|
|
15959
16869
|
declare const Tag = "Tag";
|
|
15960
16870
|
interface Tags extends AstNode {
|
|
15961
|
-
readonly $container: DynamicViewBody | ElementBody | ElementViewBody | Relation | RelationBody | Tags;
|
|
16871
|
+
readonly $container: DeployedInstanceBody | DeploymentNodeBody | DeploymentRelation | DeploymentRelationBody | DeploymentViewBody | DynamicViewBody | ElementBody | ElementViewBody | Relation | RelationBody | Tags;
|
|
15962
16872
|
readonly $type: 'Tags';
|
|
15963
16873
|
prev?: Tags;
|
|
15964
16874
|
values: Array<Reference<Tag>>;
|
|
@@ -15971,7 +16881,7 @@ interface ViewRef extends AstNode {
|
|
|
15971
16881
|
}
|
|
15972
16882
|
declare const ViewRef = "ViewRef";
|
|
15973
16883
|
interface ViewRuleAutoLayout extends AstNode {
|
|
15974
|
-
readonly $container: DynamicViewBody | ElementViewBody;
|
|
16884
|
+
readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
|
|
15975
16885
|
readonly $type: 'ViewRuleAutoLayout';
|
|
15976
16886
|
direction: ViewLayoutDirection;
|
|
15977
16887
|
nodeSep?: number;
|
|
@@ -16006,7 +16916,7 @@ interface ViewRuleStyle extends AstNode {
|
|
|
16006
16916
|
}
|
|
16007
16917
|
declare const ViewRuleStyle = "ViewRuleStyle";
|
|
16008
16918
|
interface ViewStringProperty extends AstNode {
|
|
16009
|
-
readonly $container: DynamicViewBody | ElementViewBody;
|
|
16919
|
+
readonly $container: DeploymentViewBody | DynamicViewBody | ElementViewBody;
|
|
16010
16920
|
readonly $type: 'ViewStringProperty';
|
|
16011
16921
|
key: 'description' | 'title';
|
|
16012
16922
|
value: string;
|
|
@@ -16065,7 +16975,7 @@ interface WhereRelationTag extends AstNode {
|
|
|
16065
16975
|
}
|
|
16066
16976
|
declare const WhereRelationTag = "WhereRelationTag";
|
|
16067
16977
|
interface WildcardExpression extends AstNode {
|
|
16068
|
-
readonly $container: DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingRelationExpression | OutgoingRelationExpression | Predicates;
|
|
16978
|
+
readonly $container: DeploymentExpressionIterator | DeploymentViewRulePredicateExpression | DirectedDeploymentRelationExpression | DirectedRelationExpression | DynamicViewPredicateIterator | ElementExpressionsIterator | ElementPredicateWhere | ElementPredicateWith | IncomingDeploymentRelationExpression | IncomingRelationExpression | OutgoingDeploymentRelationExpression | OutgoingRelationExpression | Predicates;
|
|
16069
16979
|
readonly $type: 'WildcardExpression';
|
|
16070
16980
|
isWildcard: boolean;
|
|
16071
16981
|
}
|
|
@@ -16077,6 +16987,28 @@ type LikeC4AstType = {
|
|
|
16077
16987
|
CustomColor: CustomColor;
|
|
16078
16988
|
CustomElementProperties: CustomElementProperties;
|
|
16079
16989
|
CustomRelationProperties: CustomRelationProperties;
|
|
16990
|
+
DeployedInstance: DeployedInstance;
|
|
16991
|
+
DeployedInstanceBody: DeployedInstanceBody;
|
|
16992
|
+
DeploymentElement: DeploymentElement;
|
|
16993
|
+
DeploymentElementExpression: DeploymentElementExpression;
|
|
16994
|
+
DeploymentExpression: DeploymentExpression;
|
|
16995
|
+
DeploymentExpressionIterator: DeploymentExpressionIterator;
|
|
16996
|
+
DeploymentNode: DeploymentNode;
|
|
16997
|
+
DeploymentNodeBody: DeploymentNodeBody;
|
|
16998
|
+
DeploymentNodeKind: DeploymentNodeKind;
|
|
16999
|
+
DeploymentRef: DeploymentRef;
|
|
17000
|
+
DeploymentRefExpression: DeploymentRefExpression;
|
|
17001
|
+
DeploymentReferenceable: DeploymentReferenceable;
|
|
17002
|
+
DeploymentRelation: DeploymentRelation;
|
|
17003
|
+
DeploymentRelationBody: DeploymentRelationBody;
|
|
17004
|
+
DeploymentRelationExpression: DeploymentRelationExpression;
|
|
17005
|
+
DeploymentView: DeploymentView;
|
|
17006
|
+
DeploymentViewBody: DeploymentViewBody;
|
|
17007
|
+
DeploymentViewRule: DeploymentViewRule;
|
|
17008
|
+
DeploymentViewRulePredicate: DeploymentViewRulePredicate;
|
|
17009
|
+
DeploymentViewRulePredicateExpression: DeploymentViewRulePredicateExpression;
|
|
17010
|
+
DeploymentViewRuleStyle: DeploymentViewRuleStyle;
|
|
17011
|
+
DirectedDeploymentRelationExpression: DirectedDeploymentRelationExpression;
|
|
16080
17012
|
DirectedRelationExpression: DirectedRelationExpression;
|
|
16081
17013
|
DynamicView: DynamicView;
|
|
16082
17014
|
DynamicViewBody: DynamicViewBody;
|
|
@@ -16111,6 +17043,7 @@ type LikeC4AstType = {
|
|
|
16111
17043
|
ExtendElement: ExtendElement;
|
|
16112
17044
|
ExtendElementBody: ExtendElementBody;
|
|
16113
17045
|
FqnElementRef: FqnElementRef;
|
|
17046
|
+
FqnReferenceable: FqnReferenceable;
|
|
16114
17047
|
GlobalDynamicPredicateGroup: GlobalDynamicPredicateGroup;
|
|
16115
17048
|
GlobalPredicateGroup: GlobalPredicateGroup;
|
|
16116
17049
|
GlobalStyle: GlobalStyle;
|
|
@@ -16118,8 +17051,10 @@ type LikeC4AstType = {
|
|
|
16118
17051
|
GlobalStyleId: GlobalStyleId;
|
|
16119
17052
|
Globals: Globals;
|
|
16120
17053
|
IconProperty: IconProperty;
|
|
17054
|
+
InOutDeploymentRelationExpression: InOutDeploymentRelationExpression;
|
|
16121
17055
|
InOutRelationExpression: InOutRelationExpression;
|
|
16122
17056
|
IncludePredicate: IncludePredicate;
|
|
17057
|
+
IncomingDeploymentRelationExpression: IncomingDeploymentRelationExpression;
|
|
16123
17058
|
IncomingRelationExpression: IncomingRelationExpression;
|
|
16124
17059
|
LibIcon: LibIcon;
|
|
16125
17060
|
LikeC4Grammar: LikeC4Grammar;
|
|
@@ -16131,11 +17066,13 @@ type LikeC4AstType = {
|
|
|
16131
17066
|
MetadataBody: MetadataBody;
|
|
16132
17067
|
MetadataProperty: MetadataProperty;
|
|
16133
17068
|
Model: Model;
|
|
17069
|
+
ModelDeployments: ModelDeployments;
|
|
16134
17070
|
ModelViews: ModelViews;
|
|
16135
17071
|
NavigateToProperty: NavigateToProperty;
|
|
16136
17072
|
NotationProperty: NotationProperty;
|
|
16137
17073
|
NotesProperty: NotesProperty;
|
|
16138
17074
|
OpacityProperty: OpacityProperty;
|
|
17075
|
+
OutgoingDeploymentRelationExpression: OutgoingDeploymentRelationExpression;
|
|
16139
17076
|
OutgoingRelationExpression: OutgoingRelationExpression;
|
|
16140
17077
|
Predicate: Predicate;
|
|
16141
17078
|
Predicates: Predicates;
|
|
@@ -16154,6 +17091,7 @@ type LikeC4AstType = {
|
|
|
16154
17091
|
RelationshipStyleProperty: RelationshipStyleProperty;
|
|
16155
17092
|
ShapeProperty: ShapeProperty;
|
|
16156
17093
|
SpecificationColor: SpecificationColor;
|
|
17094
|
+
SpecificationDeploymentNodeKind: SpecificationDeploymentNodeKind;
|
|
16157
17095
|
SpecificationElementKind: SpecificationElementKind;
|
|
16158
17096
|
SpecificationElementStringProperty: SpecificationElementStringProperty;
|
|
16159
17097
|
SpecificationRelationshipKind: SpecificationRelationshipKind;
|
|
@@ -16195,13 +17133,22 @@ type LikeC4AstType = {
|
|
|
16195
17133
|
declare const idattr: unique symbol;
|
|
16196
17134
|
declare module './generated/ast' {
|
|
16197
17135
|
interface Element {
|
|
16198
|
-
[idattr]?: Fqn
|
|
17136
|
+
[idattr]?: Fqn | undefined;
|
|
16199
17137
|
}
|
|
16200
17138
|
interface ElementView {
|
|
16201
|
-
[idattr]?:
|
|
17139
|
+
[idattr]?: ViewId | undefined;
|
|
16202
17140
|
}
|
|
16203
17141
|
interface DynamicView {
|
|
16204
|
-
[idattr]?:
|
|
17142
|
+
[idattr]?: ViewId | undefined;
|
|
17143
|
+
}
|
|
17144
|
+
interface DeploymentView {
|
|
17145
|
+
[idattr]?: ViewId | undefined;
|
|
17146
|
+
}
|
|
17147
|
+
interface DeploymentNode {
|
|
17148
|
+
[idattr]?: Fqn | undefined;
|
|
17149
|
+
}
|
|
17150
|
+
interface DeployedInstance {
|
|
17151
|
+
[idattr]?: Fqn | undefined;
|
|
16205
17152
|
}
|
|
16206
17153
|
}
|
|
16207
17154
|
type ParsedElementStyle = {
|
|
@@ -16229,9 +17176,10 @@ interface ParsedAstSpecification {
|
|
|
16229
17176
|
colors: Record<CustomColor$1, {
|
|
16230
17177
|
color: HexColorLiteral;
|
|
16231
17178
|
}>;
|
|
17179
|
+
deployments: Record<DeploymentNodeKind$1, DeploymentNodeKindSpecification>;
|
|
16232
17180
|
}
|
|
16233
17181
|
interface ParsedAstElement {
|
|
16234
|
-
id: Fqn
|
|
17182
|
+
id: Fqn;
|
|
16235
17183
|
astPath: string;
|
|
16236
17184
|
kind: ElementKind$1;
|
|
16237
17185
|
title: string;
|
|
@@ -16245,10 +17193,10 @@ interface ParsedAstElement {
|
|
|
16245
17193
|
};
|
|
16246
17194
|
}
|
|
16247
17195
|
interface ParsedAstRelation {
|
|
16248
|
-
id:
|
|
17196
|
+
id: RelationId;
|
|
16249
17197
|
astPath: string;
|
|
16250
|
-
source: Fqn
|
|
16251
|
-
target: Fqn
|
|
17198
|
+
source: Fqn;
|
|
17199
|
+
target: Fqn;
|
|
16252
17200
|
kind?: RelationshipKind$1;
|
|
16253
17201
|
tags?: NonEmptyArray<Tag$1>;
|
|
16254
17202
|
title: string;
|
|
@@ -16259,17 +17207,25 @@ interface ParsedAstRelation {
|
|
|
16259
17207
|
head?: RelationshipArrowType;
|
|
16260
17208
|
tail?: RelationshipArrowType;
|
|
16261
17209
|
links?: NonEmptyArray<ParsedLink>;
|
|
16262
|
-
navigateTo?:
|
|
17210
|
+
navigateTo?: ViewId;
|
|
16263
17211
|
metadata?: {
|
|
16264
17212
|
[key: string]: string;
|
|
16265
17213
|
};
|
|
16266
17214
|
}
|
|
17215
|
+
type ParsedAstDeployment = DeploymentElement$1;
|
|
17216
|
+
declare namespace ParsedAstDeployment {
|
|
17217
|
+
type Node = DeploymentNode$1;
|
|
17218
|
+
type Instance = DeployedInstance$1;
|
|
17219
|
+
}
|
|
17220
|
+
type ParsedAstDeploymentRelation = DeploymentRelation$1 & {
|
|
17221
|
+
astPath: string;
|
|
17222
|
+
};
|
|
16267
17223
|
type ParsedAstGlobals = ModelGlobals;
|
|
16268
17224
|
interface ParsedAstElementView {
|
|
16269
17225
|
__: 'element';
|
|
16270
|
-
id:
|
|
16271
|
-
viewOf?: Fqn
|
|
16272
|
-
extends?:
|
|
17226
|
+
id: ViewId;
|
|
17227
|
+
viewOf?: Fqn;
|
|
17228
|
+
extends?: ViewId;
|
|
16273
17229
|
astPath: string;
|
|
16274
17230
|
title: string | null;
|
|
16275
17231
|
description: string | null;
|
|
@@ -16280,7 +17236,7 @@ interface ParsedAstElementView {
|
|
|
16280
17236
|
}
|
|
16281
17237
|
interface ParsedAstDynamicView {
|
|
16282
17238
|
__: 'dynamic';
|
|
16283
|
-
id:
|
|
17239
|
+
id: ViewId;
|
|
16284
17240
|
astPath: string;
|
|
16285
17241
|
title: string | null;
|
|
16286
17242
|
description: string | null;
|
|
@@ -16290,13 +17246,26 @@ interface ParsedAstDynamicView {
|
|
|
16290
17246
|
rules: Array<DynamicViewRule$1>;
|
|
16291
17247
|
manualLayout?: ViewManualLayout;
|
|
16292
17248
|
}
|
|
16293
|
-
|
|
17249
|
+
interface ParsedAstDeploymentView {
|
|
17250
|
+
__: 'deployment';
|
|
17251
|
+
id: ViewId;
|
|
17252
|
+
astPath: string;
|
|
17253
|
+
title: string | null;
|
|
17254
|
+
description: string | null;
|
|
17255
|
+
tags: NonEmptyArray<Tag$1> | null;
|
|
17256
|
+
links: NonEmptyArray<ParsedLink> | null;
|
|
17257
|
+
rules: Array<DeploymentViewRule$1>;
|
|
17258
|
+
}
|
|
17259
|
+
type ParsedAstView = ParsedAstElementView | ParsedAstDynamicView | ParsedAstDeploymentView;
|
|
16294
17260
|
interface ParsedLink {
|
|
16295
17261
|
title?: string;
|
|
16296
17262
|
url: string;
|
|
16297
17263
|
}
|
|
16298
17264
|
interface DocFqnIndexAstNodeDescription extends AstNodeDescription {
|
|
16299
|
-
fqn: Fqn
|
|
17265
|
+
fqn: Fqn;
|
|
17266
|
+
}
|
|
17267
|
+
interface DeploymentAstNodeDescription extends AstNodeDescription {
|
|
17268
|
+
fqn: string;
|
|
16300
17269
|
}
|
|
16301
17270
|
type LikeC4AstNode = ValueOf<ConditionalPick<LikeC4AstType, AstNode>>;
|
|
16302
17271
|
type LikeC4DocumentDiagnostic = Diagnostic & DiagnosticInfo<LikeC4AstNode>;
|
|
@@ -16307,14 +17276,26 @@ interface LikeC4DocumentProps {
|
|
|
16307
17276
|
c4Relations?: ParsedAstRelation[];
|
|
16308
17277
|
c4Globals?: ParsedAstGlobals;
|
|
16309
17278
|
c4Views?: ParsedAstView[];
|
|
16310
|
-
|
|
17279
|
+
c4Deployments?: ParsedAstDeployment[];
|
|
17280
|
+
c4DeploymentRelations?: ParsedAstDeploymentRelation[];
|
|
17281
|
+
c4fqnIndex?: MultiMap<Fqn, DocFqnIndexAstNodeDescription>;
|
|
16311
17282
|
}
|
|
16312
|
-
|
|
17283
|
+
type LikeC4GrammarDocument = Omit<LangiumDocument<LikeC4Grammar>, 'diagnostics'>;
|
|
17284
|
+
interface LikeC4LangiumDocument extends LikeC4GrammarDocument, LikeC4DocumentProps {
|
|
16313
17285
|
}
|
|
16314
|
-
interface FqnIndexedDocument extends
|
|
17286
|
+
interface FqnIndexedDocument extends SetRequired<LikeC4LangiumDocument, 'c4fqnIndex'> {
|
|
16315
17287
|
}
|
|
16316
|
-
interface ParsedLikeC4LangiumDocument extends
|
|
17288
|
+
interface ParsedLikeC4LangiumDocument extends LikeC4GrammarDocument, Required<LikeC4DocumentProps> {
|
|
16317
17289
|
}
|
|
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>;
|
|
16318
17299
|
|
|
16319
17300
|
declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
16320
17301
|
private services;
|
|
@@ -16336,6 +17317,7 @@ declare class LikeC4DocumentSymbolProvider implements DocumentSymbolProvider {
|
|
|
16336
17317
|
}
|
|
16337
17318
|
|
|
16338
17319
|
declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
17320
|
+
private parser;
|
|
16339
17321
|
private locator;
|
|
16340
17322
|
constructor(services: LikeC4Services);
|
|
16341
17323
|
protected getAstNodeHoverContent(node: AstNode): MaybePromise<Hover | undefined>;
|
|
@@ -16343,22 +17325,112 @@ declare class LikeC4HoverProvider extends AstNodeHoverProvider {
|
|
|
16343
17325
|
|
|
16344
17326
|
declare class LikeC4SemanticTokenProvider extends AbstractSemanticTokenProvider {
|
|
16345
17327
|
protected highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune';
|
|
16346
|
-
private
|
|
17328
|
+
private highlightNameAndKind;
|
|
16347
17329
|
private highlightView;
|
|
16348
17330
|
}
|
|
17331
|
+
|
|
17332
|
+
declare class LikeC4NameProvider extends DefaultNameProvider {
|
|
17333
|
+
protected services: LikeC4Services;
|
|
17334
|
+
constructor(services: LikeC4Services);
|
|
17335
|
+
getNameStrict(node: AstNode): string;
|
|
17336
|
+
getName(node: AstNode): string | undefined;
|
|
17337
|
+
getNameNode(node: AstNode): CstNode | undefined;
|
|
17338
|
+
}
|
|
17339
|
+
|
|
17340
|
+
type ElementsContainer = Model | ElementBody | ExtendElementBody;
|
|
17341
|
+
type DeploymentsContainer = ModelDeployments | DeploymentNodeBody;
|
|
17342
|
+
declare class LikeC4ScopeComputation extends DefaultScopeComputation {
|
|
17343
|
+
constructor(services: LikeC4Services);
|
|
17344
|
+
computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
17345
|
+
private exportViews;
|
|
17346
|
+
private exportGlobals;
|
|
17347
|
+
private exportModel;
|
|
17348
|
+
private exportLibrary;
|
|
17349
|
+
private exportSpecification;
|
|
17350
|
+
private exportDeployments;
|
|
17351
|
+
computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
|
|
17352
|
+
protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
17353
|
+
protected processDeployments(container: DeploymentsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): AstNodeDescription[];
|
|
17354
|
+
}
|
|
17355
|
+
|
|
17356
|
+
declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
17357
|
+
private deploymentsIndex;
|
|
17358
|
+
private fqnIndex;
|
|
17359
|
+
constructor(services: LikeC4Services);
|
|
17360
|
+
private directChildrenOf;
|
|
17361
|
+
private uniqueDescedants;
|
|
17362
|
+
private scopeElementRef;
|
|
17363
|
+
private scopeExtendElement;
|
|
17364
|
+
private scopeElementView;
|
|
17365
|
+
getScope(context: ReferenceInfo): Scope;
|
|
17366
|
+
protected getScopeForDeploymentRef(container: DeploymentRef, context: ReferenceInfo): Scope;
|
|
17367
|
+
protected computeScope(context: ReferenceInfo, referenceType?: string): Scope;
|
|
17368
|
+
}
|
|
17369
|
+
|
|
17370
|
+
declare class DeploymentsIndex {
|
|
17371
|
+
private services;
|
|
17372
|
+
protected Names: LikeC4NameProvider;
|
|
17373
|
+
protected langiumDocuments: LangiumDocuments;
|
|
17374
|
+
constructor(services: LikeC4Services);
|
|
17375
|
+
private documents;
|
|
17376
|
+
get(document: LikeC4LangiumDocument): DocumentDeploymentsIndex;
|
|
17377
|
+
/**
|
|
17378
|
+
* Nested elements (nodes/artifacts) of the node
|
|
17379
|
+
* @param nodeName Name of the deployment node
|
|
17380
|
+
* @returns Stream of artifacts
|
|
17381
|
+
*/
|
|
17382
|
+
nested(node: DeploymentNode): Stream<DeploymentAstNodeDescription>;
|
|
17383
|
+
byFqn(fqnName: string): Stream<DeploymentAstNodeDescription>;
|
|
17384
|
+
getFqnName(node: DeploymentElement): Fqn;
|
|
17385
|
+
createDocumentIndex(document: LikeC4LangiumDocument): DocumentDeploymentsIndex;
|
|
17386
|
+
}
|
|
17387
|
+
declare class DocumentDeploymentsIndex {
|
|
17388
|
+
private _rootNodes;
|
|
17389
|
+
/**
|
|
17390
|
+
* Nested of a deployment node
|
|
17391
|
+
*/
|
|
17392
|
+
private _nested;
|
|
17393
|
+
/**
|
|
17394
|
+
* All elements by FQN
|
|
17395
|
+
*/
|
|
17396
|
+
private _byfqn;
|
|
17397
|
+
static readonly EMPTY: DocumentDeploymentsIndex;
|
|
17398
|
+
constructor(_rootNodes: Array<DeploymentAstNodeDescription>,
|
|
17399
|
+
/**
|
|
17400
|
+
* Nested of a deployment node
|
|
17401
|
+
*/
|
|
17402
|
+
_nested: MultiMap<string, DeploymentAstNodeDescription>,
|
|
17403
|
+
/**
|
|
17404
|
+
* All elements by FQN
|
|
17405
|
+
*/
|
|
17406
|
+
_byfqn: MultiMap<string, DeploymentAstNodeDescription>);
|
|
17407
|
+
rootNodes(): readonly DeploymentAstNodeDescription[];
|
|
17408
|
+
byFqn(fqnName: string): readonly DeploymentAstNodeDescription[];
|
|
17409
|
+
/**
|
|
17410
|
+
* Returns artifacts of a deployment node
|
|
17411
|
+
* @param nodeName Name of the deployment node
|
|
17412
|
+
* @returns Stream of artifacts
|
|
17413
|
+
*/
|
|
17414
|
+
nested(nodeName: string): readonly DeploymentAstNodeDescription[];
|
|
17415
|
+
/**
|
|
17416
|
+
* Returns all deployment elements in the document,
|
|
17417
|
+
* with unique combination "type and name"
|
|
17418
|
+
*/
|
|
17419
|
+
unique(): readonly DeploymentAstNodeDescription[];
|
|
17420
|
+
}
|
|
16349
17421
|
declare class FqnIndex {
|
|
16350
17422
|
private services;
|
|
16351
17423
|
protected langiumDocuments: LangiumDocuments;
|
|
16352
17424
|
constructor(services: LikeC4Services);
|
|
16353
17425
|
get documents(): Stream<FqnIndexedDocument>;
|
|
16354
17426
|
private entries;
|
|
16355
|
-
getFqn(el: Element): Fqn
|
|
16356
|
-
byFqn(fqn: Fqn
|
|
16357
|
-
directChildrenOf(parent: Fqn
|
|
17427
|
+
getFqn(el: Element): Fqn | null;
|
|
17428
|
+
byFqn(fqn: Fqn): Stream<AstNodeDescription>;
|
|
17429
|
+
directChildrenOf(parent: Fqn): Stream<AstNodeDescription>;
|
|
16358
17430
|
/**
|
|
16359
17431
|
* Returns descedant elements with unique names in the scope
|
|
16360
17432
|
*/
|
|
16361
|
-
uniqueDescedants(parent: Fqn
|
|
17433
|
+
uniqueDescedants(parent: Fqn): Stream<AstNodeDescription>;
|
|
16362
17434
|
}
|
|
16363
17435
|
|
|
16364
17436
|
type ModelParsedListener$1 = (docs: URI[]) => void;
|
|
@@ -16382,7 +17454,7 @@ declare class LikeC4ModelBuilder {
|
|
|
16382
17454
|
*/
|
|
16383
17455
|
unsafeSyncBuildComputedModel(model: ParsedLikeC4Model): ComputedLikeC4Model;
|
|
16384
17456
|
buildComputedModel(cancelToken?: CancellationToken): Promise<ComputedLikeC4Model | null>;
|
|
16385
|
-
computeView(viewId:
|
|
17457
|
+
computeView(viewId: ViewId, cancelToken?: CancellationToken): Promise<ComputedView | null>;
|
|
16386
17458
|
onModelParsed(callback: ModelParsedListener$1): Disposable;
|
|
16387
17459
|
private documents;
|
|
16388
17460
|
private notifyListeners;
|
|
@@ -16391,26 +17463,30 @@ declare class LikeC4ModelBuilder {
|
|
|
16391
17463
|
declare class LikeC4ModelLocator {
|
|
16392
17464
|
private services;
|
|
16393
17465
|
private fqnIndex;
|
|
17466
|
+
private deploymentsIndex;
|
|
16394
17467
|
private langiumDocuments;
|
|
16395
17468
|
constructor(services: LikeC4Services);
|
|
16396
17469
|
private documents;
|
|
16397
|
-
getParsedElement(
|
|
16398
|
-
locateElement(fqn: Fqn
|
|
16399
|
-
|
|
16400
|
-
|
|
17470
|
+
getParsedElement(astNodeOrFqn: Element | Fqn): ParsedAstElement | null;
|
|
17471
|
+
locateElement(fqn: Fqn, _prop?: string): Location | null;
|
|
17472
|
+
locateDeploymentElement(fqn: Fqn, _prop?: string): Location | null;
|
|
17473
|
+
locateRelation(relationId: RelationId): Location | null;
|
|
17474
|
+
locateViewAst(viewId: ViewId): {
|
|
16401
17475
|
doc: ParsedLikeC4LangiumDocument;
|
|
16402
17476
|
view: ParsedAstView;
|
|
16403
17477
|
viewAst: LikeC4View;
|
|
16404
17478
|
};
|
|
16405
|
-
locateView(viewId:
|
|
17479
|
+
locateView(viewId: ViewId): Location | null;
|
|
16406
17480
|
}
|
|
17481
|
+
type IsValidFn = ChecksFromDiagnostics['isValid'];
|
|
16407
17482
|
declare class LikeC4ModelParser {
|
|
16408
17483
|
private services;
|
|
16409
17484
|
private fqnIndex;
|
|
16410
17485
|
constructor(services: LikeC4Services);
|
|
16411
|
-
parse(doc: LangiumDocument
|
|
17486
|
+
parse(doc: LangiumDocument): ParsedLikeC4LangiumDocument;
|
|
16412
17487
|
protected parseLikeC4Document(_doc: FqnIndexedDocument): ParsedLikeC4LangiumDocument;
|
|
16413
17488
|
private parseSpecification;
|
|
17489
|
+
private parseSpecificationDeploymentNodeKind;
|
|
16414
17490
|
private parseModel;
|
|
16415
17491
|
private parseElement;
|
|
16416
17492
|
private parseRelation;
|
|
@@ -16438,14 +17514,26 @@ declare class LikeC4ModelParser {
|
|
|
16438
17514
|
private parseViewRuleGroup;
|
|
16439
17515
|
private parseRuleStyle;
|
|
16440
17516
|
private parseViewRuleGlobalStyle;
|
|
16441
|
-
private
|
|
17517
|
+
private parseViewManualLayout;
|
|
16442
17518
|
private parseDynamicParallelSteps;
|
|
16443
17519
|
private parseDynamicStep;
|
|
16444
17520
|
private parseElementView;
|
|
16445
17521
|
private parseDynamicElementView;
|
|
16446
17522
|
private parseDynamicViewRule;
|
|
16447
17523
|
private parseDynamicViewIncludePredicate;
|
|
16448
|
-
|
|
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;
|
|
16449
17537
|
private getAstNodePath;
|
|
16450
17538
|
private getMetadata;
|
|
16451
17539
|
private convertTags;
|
|
@@ -16464,34 +17552,6 @@ declare class LikeC4ModelChanges {
|
|
|
16464
17552
|
};
|
|
16465
17553
|
}
|
|
16466
17554
|
|
|
16467
|
-
type ElementsContainer = Model | ElementBody | ExtendElementBody;
|
|
16468
|
-
declare class LikeC4ScopeComputation extends DefaultScopeComputation {
|
|
16469
|
-
computeExports(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<AstNodeDescription[]>;
|
|
16470
|
-
private exportViews;
|
|
16471
|
-
private exportGlobals;
|
|
16472
|
-
private exportModel;
|
|
16473
|
-
private exportLibrary;
|
|
16474
|
-
private exportSpecification;
|
|
16475
|
-
computeLocalScopes(document: LikeC4LangiumDocument, _cancelToken?: CancellationToken): Promise<PrecomputedScopes>;
|
|
16476
|
-
protected processContainer(container: ElementsContainer, scopes: PrecomputedScopes, document: LikeC4LangiumDocument): MultiMap<string, AstNodeDescription>;
|
|
16477
|
-
}
|
|
16478
|
-
|
|
16479
|
-
declare class LikeC4ScopeProvider extends DefaultScopeProvider {
|
|
16480
|
-
private fqnIndex;
|
|
16481
|
-
constructor(services: LikeC4Services);
|
|
16482
|
-
private directChildrenOf;
|
|
16483
|
-
private uniqueDescedants;
|
|
16484
|
-
private scopeElementRef;
|
|
16485
|
-
private scopeExtendElement;
|
|
16486
|
-
private scopeElementView;
|
|
16487
|
-
getScope(context: ReferenceInfo): Scope;
|
|
16488
|
-
protected computeScope(context: ReferenceInfo): Scope;
|
|
16489
|
-
/**
|
|
16490
|
-
* Create a global scope filtered for the given reference type.
|
|
16491
|
-
*/
|
|
16492
|
-
protected getGlobalScope(referenceType: string): Scope;
|
|
16493
|
-
}
|
|
16494
|
-
|
|
16495
17555
|
declare class Rpc implements Disposable {
|
|
16496
17556
|
private services;
|
|
16497
17557
|
private disposables;
|
|
@@ -16545,8 +17605,10 @@ type LikeC4SharedServices = LangiumSharedServices & LikeC4AddedSharedServices;
|
|
|
16545
17605
|
*/
|
|
16546
17606
|
interface LikeC4AddedServices {
|
|
16547
17607
|
WorkspaceCache: WorkspaceCache<string, any>;
|
|
17608
|
+
DocumentCache: DocumentCache<string, any>;
|
|
16548
17609
|
Rpc: Rpc;
|
|
16549
17610
|
likec4: {
|
|
17611
|
+
DeploymentsIndex: DeploymentsIndex;
|
|
16550
17612
|
FqnIndex: FqnIndex;
|
|
16551
17613
|
ModelParser: LikeC4ModelParser;
|
|
16552
17614
|
ModelBuilder: LikeC4ModelBuilder;
|
|
@@ -16563,6 +17625,7 @@ interface LikeC4AddedServices {
|
|
|
16563
17625
|
DocumentLinkProvider: LikeC4DocumentLinkProvider;
|
|
16564
17626
|
};
|
|
16565
17627
|
references: {
|
|
17628
|
+
NameProvider: LikeC4NameProvider;
|
|
16566
17629
|
ScopeComputation: LikeC4ScopeComputation;
|
|
16567
17630
|
ScopeProvider: LikeC4ScopeProvider;
|
|
16568
17631
|
};
|
|
@@ -17238,7 +18301,7 @@ declare global {
|
|
|
17238
18301
|
|
|
17239
18302
|
type Logger = {
|
|
17240
18303
|
info(msg: string): void;
|
|
17241
|
-
warn(msg:
|
|
18304
|
+
warn(msg: unknown): void;
|
|
17242
18305
|
error(err: unknown): void;
|
|
17243
18306
|
};
|
|
17244
18307
|
|
|
@@ -17267,7 +18330,7 @@ type GraphvizOut = {
|
|
|
17267
18330
|
diagram: DiagramView;
|
|
17268
18331
|
};
|
|
17269
18332
|
type GraphvizSvgOut = {
|
|
17270
|
-
id:
|
|
18333
|
+
id: ViewId;
|
|
17271
18334
|
dot: string;
|
|
17272
18335
|
svg: string;
|
|
17273
18336
|
};
|
|
@@ -17329,9 +18392,9 @@ declare class LikeC4 {
|
|
|
17329
18392
|
private modelComputedRef;
|
|
17330
18393
|
private modelLayoutedRef;
|
|
17331
18394
|
private logger;
|
|
17332
|
-
private langiumDocuments;
|
|
17333
18395
|
private constructor();
|
|
17334
18396
|
get viewsService(): Views;
|
|
18397
|
+
private get LangiumDocuments();
|
|
17335
18398
|
/**
|
|
17336
18399
|
* Diagram is a computed view, layouted using Graphviz
|
|
17337
18400
|
* Used in React components
|
|
@@ -17373,4 +18436,4 @@ declare class LikeC4 {
|
|
|
17373
18436
|
dispose(): void;
|
|
17374
18437
|
}
|
|
17375
18438
|
|
|
17376
|
-
export { type AutoLayoutDirection, type BBox, BorderStyles, Builder, type BuilderSpecification, type Color$1 as Color, type ComputedDynamicView, type ComputedEdge, type ComputedElementView, type ComputedLikeC4Model, ComputedNode, type
|
|
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 };
|