@likec4/core 1.49.0 → 1.50.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/THIRD-PARTY-LICENSES.md +24 -2
- package/dist/_chunks/Builder.view-element.mjs +2 -2
- package/dist/_chunks/LikeC4Model.d.mts +3 -3
- package/dist/_chunks/_types.d.mts +1 -1
- package/dist/_chunks/_types2.d.mts +2 -2
- package/dist/_chunks/assignTagColors.mjs +1 -1
- package/dist/_chunks/geometry.mjs +1 -0
- package/dist/_chunks/index.d.mts +1964 -219
- package/dist/_chunks/{theme.d.mts → index3.d.mts} +1 -1
- package/dist/_chunks/index4.d.mts +288 -0
- package/dist/_chunks/{to-text.d.mts → index5.d.mts} +1 -1
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +2 -2
- package/dist/_chunks/libs/@radix-ui/colors.mjs +1 -1
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +1 -1
- package/dist/_chunks/libs/bail.mjs +1 -1
- package/dist/_chunks/libs/ccount.mjs +1 -1
- package/dist/_chunks/libs/character-entities-html4.mjs +1 -1
- package/dist/_chunks/libs/character-entities-legacy.mjs +1 -1
- package/dist/_chunks/libs/character-entities.mjs +2 -2
- package/dist/_chunks/libs/comma-separated-tokens.mjs +1 -1
- package/dist/_chunks/libs/decode-named-character-reference.mjs +1 -1
- package/dist/_chunks/libs/defu.mjs +1 -1
- package/dist/_chunks/libs/devlop.mjs +1 -1
- package/dist/_chunks/libs/escape-string-regexp.mjs +1 -1
- package/dist/_chunks/libs/extend.mjs +1 -1
- package/dist/_chunks/libs/graphology-dag.mjs +1 -1
- package/dist/_chunks/libs/graphology.mjs +1 -1
- package/dist/_chunks/libs/hast-util-sanitize.mjs +1 -1
- package/dist/_chunks/libs/hast-util-to-html.mjs +2 -2
- package/dist/_chunks/libs/is-plain-obj.mjs +1 -1
- package/dist/_chunks/libs/longest-streak.mjs +1 -1
- package/dist/_chunks/libs/markdown-table.mjs +2 -2
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +1 -1
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +2 -2
- package/dist/_chunks/libs/mdast-util-gfm.mjs +9 -9
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +7 -7
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +1 -1
- package/dist/_chunks/libs/mnemonist.mjs +1 -1
- package/dist/_chunks/libs/natural-compare-lite.mjs +2 -2
- package/dist/_chunks/libs/ohash.mjs +1 -1
- package/dist/_chunks/libs/rehype-sanitize.mjs +1 -1
- package/dist/_chunks/libs/rehype-stringify.mjs +1 -1
- package/dist/_chunks/libs/remark-gfm.mjs +1 -1
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +2 -2
- package/dist/_chunks/libs/remark-parse.mjs +1 -1
- package/dist/_chunks/libs/remark-rehype.mjs +1 -1
- package/dist/_chunks/libs/remeda.mjs +2 -1
- package/dist/_chunks/libs/trough.mjs +1 -1
- package/dist/_chunks/libs/unified.mjs +1 -1
- package/dist/_chunks/manual-layout.mjs +1 -0
- package/dist/_chunks/mnemonist.d.mts +1 -0
- package/dist/_chunks/model.mjs +4 -0
- package/dist/_chunks/rolldown-runtime.mjs +1 -1
- package/dist/_chunks/types.mjs +1 -0
- package/dist/_chunks/utils.mjs +1 -0
- package/dist/builder/index.d.mts +5 -2
- package/dist/builder/index.mjs +1 -1
- package/dist/compute-view/index.d.mts +6 -5
- package/dist/compute-view/index.mjs +2 -2
- package/dist/geometry/index.d.mts +1 -1
- package/dist/geometry/index.mjs +1 -1
- package/dist/index.d.mts +5 -7
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +7 -4
- package/dist/model/index.mjs +1 -1
- package/dist/styles/index.d.mts +3 -2
- package/dist/styles/index.mjs +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.mjs +1 -1
- package/dist/utils/graphology/index.mjs +1 -1
- package/dist/utils/index.d.mts +4 -2
- package/dist/utils/index.mjs +1 -1
- package/package.json +10 -10
- package/dist/_chunks/RichText.mjs +0 -1
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +0 -1
- package/dist/_chunks/guards.d.mts +0 -2026
- package/dist/_chunks/guards.mjs +0 -4
- package/dist/_chunks/to-text.mjs +0 -1
- package/dist/_chunks/vector.mjs +0 -1
- /package/dist/_chunks/{vector.d.mts → index2.d.mts} +0 -0
package/dist/_chunks/index.d.mts
CHANGED
|
@@ -1,288 +1,2033 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c as XYPoint, i as BBox, s as Point } from "./index2.mjs";
|
|
2
|
+
import { IfNever, IsAny, IsLiteral, IsNever, KeysOfUnion, PartialDeep, SetNonNullable, SetRequired, Simplify, Tagged, TupleToUnion, UnionToIntersection, WritableDeep } from "type-fest";
|
|
3
3
|
|
|
4
|
-
//#region src/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
4
|
+
//#region src/types/_common.d.ts
|
|
5
|
+
type NonEmptyArray<T> = [T, ...T[]];
|
|
6
|
+
type NonEmptyReadonlyArray<T> = readonly [T, ...T[]];
|
|
7
|
+
type IterableContainer<T = unknown> = ReadonlyArray<T> | readonly [];
|
|
8
|
+
type ReorderedArray<T extends IterableContainer> = { -readonly [P in keyof T]: T[number] };
|
|
9
|
+
type KeysOf<T> = keyof T extends infer K extends string ? K : never;
|
|
10
|
+
type AllNever$1<Expressions> = UnionToIntersection<{ [Name in keyof Expressions]: { -readonly [Key in keyof Expressions[Name]]?: never } }[keyof Expressions]>;
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* type Variant1 = {
|
|
15
|
+
* a: string
|
|
16
|
+
* }
|
|
17
|
+
* type Variant2 = {
|
|
18
|
+
* b: number
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* type Variants = ExclusiveUnion<{
|
|
22
|
+
* Variant1: Variant1,
|
|
23
|
+
* Variant2: Variant2
|
|
24
|
+
* }>
|
|
25
|
+
*
|
|
26
|
+
* // Fail here
|
|
27
|
+
* const variant1: Variants = {
|
|
28
|
+
* a: 'one',
|
|
29
|
+
* b: 1
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
type ExclusiveUnion<Expressions, All = AllNever$1<Expressions>> = Expressions extends object ? { [Name in keyof Expressions]: Simplify<Omit<All, keyof Expressions[Name]> & Expressions[Name]> }[keyof Expressions] : never;
|
|
34
|
+
/**
|
|
35
|
+
* Copy from https://github.com/remeda/remeda/blob/main/packages/remeda/src/internal/types/NTuple.ts
|
|
36
|
+
* An array with *exactly* N elements in it.
|
|
37
|
+
*
|
|
38
|
+
* Only literal N values are supported. For very large N the type might result
|
|
39
|
+
* in a recurse depth error. For negative N the type would result in an infinite
|
|
40
|
+
* recursion. None of these have protections because this is an internal type!
|
|
41
|
+
*/
|
|
42
|
+
type NTuple<T, N extends number, Result extends Array<unknown> = []> = Result['length'] extends N ? Result : NTuple<T, N, [...Result, T]>;
|
|
43
|
+
type IteratorLike<T> = IteratorObject<T, BuiltinIteratorReturn, unknown>;
|
|
44
|
+
type Predicate<T> = (x: T) => boolean;
|
|
45
|
+
interface Link {
|
|
46
|
+
title?: string;
|
|
47
|
+
url: string;
|
|
48
|
+
relative?: string;
|
|
37
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Coalesce `V` to a string if it is `any`
|
|
52
|
+
*/
|
|
53
|
+
type Coalesce<V extends string, OrIfAny = string> = IsAny<V> extends true ? OrIfAny : V;
|
|
54
|
+
type ExactObject<T, InputType = unknown> = { [KeyType in keyof T]: undefined extends T[KeyType] ? T[KeyType] | undefined : T[KeyType] } & Record<Exclude<keyof InputType, KeysOfUnion<T>>, never>;
|
|
55
|
+
/**
|
|
56
|
+
* Allows only exact properties of `U` to be present in `T` and omits undefined values
|
|
57
|
+
*
|
|
58
|
+
* See {@link Exact} for more details (this version is non-deep)
|
|
59
|
+
*/
|
|
60
|
+
declare function exact<Expected, T extends ExactObject<Expected, T>>(a: T): Expected;
|
|
38
61
|
//#endregion
|
|
39
|
-
//#region src/
|
|
40
|
-
|
|
62
|
+
//#region src/types/const.d.ts
|
|
63
|
+
/**
|
|
64
|
+
* Determines the stage of the model:
|
|
65
|
+
* 1. `parsed` - parsed from DSL or returned from Builder
|
|
66
|
+
* 2. `computed` - views are computed
|
|
67
|
+
* 3. `layouted` - views are layouted
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
type ModelStage = 'parsed' | 'computed' | 'layouted';
|
|
72
|
+
type ExtractOnStage<T, S extends ModelStage> = Extract<T, {
|
|
73
|
+
[_stage]: S;
|
|
74
|
+
}>;
|
|
75
|
+
declare function isOnStage<T extends {
|
|
76
|
+
[_stage]: ModelStage;
|
|
77
|
+
}, S extends ModelStage>(value: T, stage: S): value is ExtractOnStage<T, S>;
|
|
78
|
+
/**
|
|
79
|
+
* Property name to store the stage of the model
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
declare const _stage = "_stage";
|
|
84
|
+
type _stage = typeof _stage;
|
|
85
|
+
/**
|
|
86
|
+
* Property name to store type information, used to identify the type of the view
|
|
87
|
+
*
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
declare const _type = "_type";
|
|
91
|
+
type _type = typeof _type;
|
|
92
|
+
/**
|
|
93
|
+
* Property name to store layout type information, used to identify the type of the layout*
|
|
94
|
+
* @internal
|
|
95
|
+
*/
|
|
96
|
+
declare const _layout = "_layout";
|
|
97
|
+
type _layout = typeof _layout;
|
|
98
|
+
declare namespace scalar_d_exports {
|
|
99
|
+
export { AnyFqn, BuiltInIcon, DeploymentFqn$1 as DeploymentFqn, DeploymentKind$1 as DeploymentKind, EdgeId$1 as EdgeId, ElementKind$1 as ElementKind, Fqn$1 as Fqn, GlobalFqn, GroupElementKind, Icon, IconUrl, MarkdownOrString, NodeId$1 as NodeId, NoneIcon, ProjectId$1 as ProjectId, RelationId$1 as RelationId, RelationKind$1 as RelationKind, RelationshipKind, StepEdgeId, StepEdgeIdLiteral, StepEdgeKind, Tag$1 as Tag, ViewId$1 as ViewId, extractStep, flattenMarkdownOrString, isGlobalFqn, isGroupElementKind, isStepEdgeId, splitGlobalFqn, stepEdgeId };
|
|
100
|
+
}
|
|
101
|
+
type ProjectId$1<T = string> = Tagged<T, 'ProjectID'>;
|
|
102
|
+
declare function ProjectId$1(name: string): ProjectId$1;
|
|
103
|
+
type MarkdownOrString = {
|
|
104
|
+
txt: string;
|
|
105
|
+
md?: never;
|
|
106
|
+
} | {
|
|
107
|
+
md: string;
|
|
108
|
+
txt?: never;
|
|
109
|
+
};
|
|
110
|
+
declare function MarkdownOrString(value: {
|
|
111
|
+
txt: string;
|
|
112
|
+
md?: never;
|
|
113
|
+
} | {
|
|
114
|
+
md: string;
|
|
115
|
+
txt?: never;
|
|
116
|
+
} | string): MarkdownOrString;
|
|
117
|
+
/**
|
|
118
|
+
* Converts a MarkdownOrString object or a plain string into a simple string representation.
|
|
119
|
+
* This utility function handles different types of text content and normalizes them to a string format.
|
|
120
|
+
*
|
|
121
|
+
* @param value - The content to be flattened.
|
|
122
|
+
* Can be one of:
|
|
123
|
+
* - A plain string
|
|
124
|
+
* - A MarkdownOrString object with either txt or md property
|
|
125
|
+
* - undefined or null
|
|
126
|
+
*
|
|
127
|
+
* @returns The string content contained within the input value.
|
|
128
|
+
* - Returns the input directly if it's already a string
|
|
129
|
+
* - Returns the txt property if available in a MarkdownOrString object
|
|
130
|
+
* - Falls back to the md property if txt is not available
|
|
131
|
+
* - Returns null if:
|
|
132
|
+
* - The input is null or undefined
|
|
133
|
+
* - The resulting string value is empty, whitespace, or null
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* // String input
|
|
137
|
+
* flattenMarkdownOrString("Hello world") // Returns: "Hello world"
|
|
138
|
+
* flattenMarkdownOrString(" ") // Returns: null
|
|
139
|
+
*
|
|
140
|
+
* // MarkdownOrString with txt property
|
|
141
|
+
* flattenMarkdownOrString({ txt: "Plain text" }) // Returns: "Plain text"
|
|
142
|
+
* flattenMarkdownOrString({ txt: " " }) // Returns: null
|
|
143
|
+
*
|
|
144
|
+
* // MarkdownOrString with md property
|
|
145
|
+
* flattenMarkdownOrString({ md: "**Bold markdown**" }) // Returns: "**Bold markdown**"
|
|
146
|
+
*
|
|
147
|
+
* // Null input
|
|
148
|
+
* flattenMarkdownOrString(null) // Returns: null
|
|
149
|
+
*/
|
|
150
|
+
declare function flattenMarkdownOrString(value: MarkdownOrString | string): string;
|
|
151
|
+
declare function flattenMarkdownOrString(value: MarkdownOrString | string | undefined | null): string | null;
|
|
152
|
+
type BuiltInIcon = 'none' | `${'aws' | 'azure' | 'gcp' | 'tech' | 'bootstrap'}:${string}`;
|
|
153
|
+
type Icon = Tagged<string, 'Icon'> | BuiltInIcon;
|
|
154
|
+
declare const NoneIcon: Icon;
|
|
155
|
+
type IconUrl = Icon;
|
|
156
|
+
/**
|
|
157
|
+
* Full-qualified-name for model elements
|
|
158
|
+
*/
|
|
159
|
+
type Fqn$1<Id = string> = Tagged<Id, 'Fqn'>;
|
|
160
|
+
declare function Fqn$1(name: string, parent?: Fqn$1 | null): Fqn$1;
|
|
161
|
+
type ElementKind$1<Kinds = string> = Tagged<Kinds, 'ElementKind'>;
|
|
162
|
+
declare const GroupElementKind: ElementKind$1<"@group">;
|
|
163
|
+
type GroupElementKind = typeof GroupElementKind;
|
|
164
|
+
declare function isGroupElementKind<V extends {
|
|
165
|
+
kind?: any;
|
|
166
|
+
}>(v: V): v is V & {
|
|
167
|
+
kind: GroupElementKind;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Full-qualified-name for deployment elements
|
|
171
|
+
*/
|
|
172
|
+
type DeploymentFqn$1<T = string> = Tagged<T, 'DeploymentFqn'>;
|
|
173
|
+
declare function DeploymentFqn$1(name: string, parent?: DeploymentFqn$1 | null): DeploymentFqn$1;
|
|
174
|
+
type DeploymentKind$1<Kinds = string> = Tagged<Kinds, 'DeploymentKind'>;
|
|
175
|
+
type ViewId$1<Id = string> = Tagged<Id, 'ViewId'>;
|
|
176
|
+
declare function ViewId$1(id: string): ViewId$1;
|
|
177
|
+
type AnyFqn<T = string> = DeploymentFqn$1<T> | Fqn$1<T>;
|
|
178
|
+
/**
|
|
179
|
+
* @deprecated Use {@link RelationshipKind} instead
|
|
180
|
+
*/
|
|
181
|
+
type RelationKind$1<Kinds = string> = RelationshipKind<Kinds>;
|
|
182
|
+
type RelationshipKind<Kinds = string> = Tagged<Kinds, 'RelationshipKind'>;
|
|
183
|
+
type RelationId$1<Id = string> = Tagged<Id, 'RelationId'>;
|
|
184
|
+
declare function RelationId$1(id: string): RelationId$1;
|
|
185
|
+
type Tag$1<T = string> = Tagged<T, 'Tag'>;
|
|
186
|
+
type GlobalFqn<Id = string> = Tagged<Fqn$1<Id>, 'GlobalFqn'>;
|
|
187
|
+
declare function GlobalFqn<A>(projectId: A | ProjectId$1<A>, name: string): GlobalFqn<A>;
|
|
188
|
+
declare function isGlobalFqn<A extends string>(fqn: A): fqn is GlobalFqn<A>;
|
|
189
|
+
declare function splitGlobalFqn<I extends string>(fqn: Fqn$1<I> | GlobalFqn<I>): [ProjectId$1 | null, Fqn$1<I>];
|
|
190
|
+
type NodeId$1 = Tagged<string, 'NodeId' | 'Fqn' | 'DeploymentFqn'>;
|
|
191
|
+
declare function NodeId$1(id: string): NodeId$1;
|
|
192
|
+
type EdgeId$1 = Tagged<string, 'EdgeId'>;
|
|
193
|
+
declare function EdgeId$1(id: string): EdgeId$1;
|
|
194
|
+
type StepEdgeIdLiteral = `step-${number}` | `step-${number}.${number}`;
|
|
195
|
+
type StepEdgeId = Tagged<StepEdgeIdLiteral, 'EdgeId'>;
|
|
196
|
+
declare function stepEdgeId(step: number, parallelStep?: number): StepEdgeId;
|
|
197
|
+
declare const StepEdgeKind = "@step";
|
|
198
|
+
declare function isStepEdgeId(id: string): id is StepEdgeId;
|
|
199
|
+
declare function extractStep(id: EdgeId$1): number;
|
|
200
|
+
declare namespace _aux_d_exports {
|
|
201
|
+
export { AllKinds, Any, Any as AnyAux, AnyComputed, AnyLayouted, AnyOnStage, AnyParsed, AnySpec, Aux, DeploymentFqn, DeploymentId, DeploymentKind, EdgeId, ElementId, ElementKind, Fqn, LooseDeploymentId, LooseDeploymentKind, LooseElementId, LooseElementKind, LooseLiteral, LooseRelationKind, LooseTag, LooseTags, LooseViewId, Metadata, MetadataKey, Never, NodeId, OrString, PickByStage, ProjectId, RelationId, RelationKind, Spec, SpecAux, Stage, DeploymentFqn as StrictDeploymentFqn, StrictDeploymentKind, StrictElementKind, Fqn as StrictFqn, StrictProjectId, StrictRelationKind, StrictTag, StrictViewId, Tag, Tags, Unknown, UnknownComputed, UnknownLayouted, UnknownParsed, ViewId, WithDescriptionAndTech, WithLinks, WithMetadata, WithNotation, WithOptionalLinks, WithOptionalTags, WithTags, preferDescription, preferSummary, setProject, setStage, toComputed, toLayouted, toParsed };
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Specification types (kinds, tags, metadata keys)
|
|
205
|
+
*
|
|
206
|
+
* @param ElementKind - Literal union of element kinds
|
|
207
|
+
* @param DeploymentKind - Literal union of deployment kinds
|
|
208
|
+
* @param RelationKind - Literal union of relationship kinds
|
|
209
|
+
* @param Tag - Literal union of tags
|
|
210
|
+
* @param MetadataKey - Literal union of metadata keys
|
|
211
|
+
*/
|
|
212
|
+
interface SpecAux<ElementKind extends string, DeploymentKind extends string, RelationKind extends string, Tag extends string, MetadataKey extends string> {
|
|
213
|
+
ElementKind: ElementKind;
|
|
214
|
+
DeploymentKind: DeploymentKind;
|
|
215
|
+
RelationKind: RelationKind;
|
|
216
|
+
Tag: Tag;
|
|
217
|
+
MetadataKey: MetadataKey;
|
|
218
|
+
}
|
|
219
|
+
type AnySpec = SpecAux<any, any, any, any, any>;
|
|
220
|
+
/**
|
|
221
|
+
* Auxilary interface to keep inferred types
|
|
222
|
+
*
|
|
223
|
+
* @typeParam Stage - View stage
|
|
224
|
+
* @typeParam Element - Literal union of FQNs of model elements
|
|
225
|
+
* @typeParam Deployment - Literal union of FQNs of deployment elements
|
|
226
|
+
* @typeParam View - Literal union of view identifiers
|
|
227
|
+
* @typeParam Project - Project identifier type
|
|
228
|
+
* @typeParam Spec - Specification types (kinds, tags, metadata keys)
|
|
229
|
+
*/
|
|
230
|
+
interface Aux<Stage extends ModelStage, Element extends string, Deployment extends string, View extends string, Project extends string, Spec extends AnySpec> {
|
|
231
|
+
Stage: Stage;
|
|
232
|
+
ProjectId: Project;
|
|
233
|
+
ElementId: Element;
|
|
234
|
+
DeploymentId: Deployment;
|
|
235
|
+
ViewId: View;
|
|
236
|
+
ElementKind: Spec['ElementKind'];
|
|
237
|
+
DeploymentKind: Spec['DeploymentKind'];
|
|
238
|
+
RelationKind: Spec['RelationKind'];
|
|
239
|
+
Tag: Spec['Tag'];
|
|
240
|
+
MetadataKey: Spec['MetadataKey'];
|
|
241
|
+
}
|
|
242
|
+
type AnyOnStage<Stage extends ModelStage> = Aux<Stage, any, any, any, any, any>;
|
|
243
|
+
type AnyParsed = AnyOnStage<'parsed'>;
|
|
244
|
+
type AnyComputed = AnyOnStage<'computed'>;
|
|
245
|
+
type AnyLayouted = AnyOnStage<'layouted'>;
|
|
246
|
+
type Any = Aux<any, any, any, any, any, any>;
|
|
247
|
+
type Never = Aux<never, never, never, never, never, SpecAux<never, never, never, never, never>>;
|
|
248
|
+
/**
|
|
249
|
+
* Fallback when {@link Aux} can't be inferred.
|
|
250
|
+
* By default assumes non parsed model
|
|
251
|
+
*/
|
|
252
|
+
type Unknown = UnknownComputed | UnknownLayouted;
|
|
253
|
+
type UnknownParsed = Aux<'parsed', string, string, string, string, SpecAux<string, string, string, string, string>>;
|
|
254
|
+
type UnknownComputed = Aux<'computed', string, string, string, string, SpecAux<string, string, string, string, string>>;
|
|
255
|
+
type UnknownLayouted = Aux<'layouted', string, string, string, string, SpecAux<string, string, string, string, string>>;
|
|
256
|
+
/**
|
|
257
|
+
* Reads stage from Aux
|
|
258
|
+
*/
|
|
259
|
+
type Stage<A> = A extends Aux<infer S, any, any, any, any, any> ? IfNever<S, never, Coalesce<S, ModelStage>> : never;
|
|
260
|
+
/**
|
|
261
|
+
* Picks type based on stage from Aux
|
|
262
|
+
*/
|
|
263
|
+
type PickByStage<A extends Any, OnParsed, OnComputed, OnLayouted = OnComputed> = {
|
|
264
|
+
parsed: OnParsed;
|
|
265
|
+
computed: OnComputed;
|
|
266
|
+
layouted: OnLayouted;
|
|
267
|
+
}[A['Stage']];
|
|
268
|
+
type setStage<A, S extends ModelStage> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<S, E, D, V, P, Spec> : never;
|
|
269
|
+
type toParsed<A> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<'parsed', E, D, V, P, Spec> : never;
|
|
270
|
+
type toComputed<A> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<'computed', E, D, V, P, Spec> : never;
|
|
271
|
+
type toLayouted<A> = A extends Aux<any, infer E, infer D, infer V, infer P, infer Spec> ? Aux<'layouted', E, D, V, P, Spec> : never;
|
|
272
|
+
/**
|
|
273
|
+
* Project identifier from Aux
|
|
274
|
+
*/
|
|
275
|
+
type ProjectId<A> = A extends Aux<any, any, any, any, infer P, any> ? Coalesce<P> : never;
|
|
276
|
+
type setProject<A, P extends string> = A extends Aux<infer S, infer E, infer D, infer V, any, infer Spec> ? Aux<S, E, D, V, P, Spec> : never;
|
|
277
|
+
/**
|
|
278
|
+
* Element FQN from Aux as branded type
|
|
279
|
+
*/
|
|
280
|
+
type Fqn<A> = A extends Any ? Fqn$1<ElementId<A>> : never;
|
|
281
|
+
/**
|
|
282
|
+
* Element FQN from Aux as a literal union
|
|
283
|
+
*/
|
|
284
|
+
type ElementId<A> = A extends Any ? Coalesce<A['ElementId']> : never;
|
|
285
|
+
/**
|
|
286
|
+
* Deployment FQN from Aux as branded type
|
|
287
|
+
*/
|
|
288
|
+
type DeploymentFqn<A> = A extends Any ? DeploymentFqn$1<DeploymentId<A>> : never;
|
|
289
|
+
/**
|
|
290
|
+
* Deployment FQN from Aux as a literal union
|
|
291
|
+
* @alias {@link DeploymentFqn}
|
|
292
|
+
*/
|
|
293
|
+
type DeploymentId<A> = A extends Any ? Coalesce<A['DeploymentId']> : never;
|
|
294
|
+
/**
|
|
295
|
+
* View identifier from Aux as a literal union
|
|
296
|
+
*/
|
|
297
|
+
type ViewId<A> = A extends Any ? Coalesce<A['ViewId']> : never;
|
|
298
|
+
type RelationId = RelationId$1;
|
|
299
|
+
type NodeId = NodeId$1;
|
|
300
|
+
type EdgeId = EdgeId$1;
|
|
301
|
+
/**
|
|
302
|
+
* ElementKind from Aux as a literal union
|
|
303
|
+
*/
|
|
304
|
+
type ElementKind<A> = A extends Any ? Coalesce<A['ElementKind']> : never;
|
|
305
|
+
/**
|
|
306
|
+
* DeploymentKind from Aux as a literal union
|
|
307
|
+
*/
|
|
308
|
+
type DeploymentKind<A> = A extends Any ? Coalesce<A['DeploymentKind']> : never;
|
|
309
|
+
/**
|
|
310
|
+
* RelationKind from Aux as a literal union
|
|
311
|
+
*/
|
|
312
|
+
type RelationKind<A> = A extends Any ? Coalesce<A['RelationKind']> : never;
|
|
313
|
+
/**
|
|
314
|
+
* Tags from Aux as a literal union
|
|
315
|
+
*/
|
|
316
|
+
type Tag<A> = A extends Any ? Coalesce<A['Tag']> : never;
|
|
317
|
+
/**
|
|
318
|
+
* Array of tags from Aux
|
|
319
|
+
*/
|
|
320
|
+
type Tags<A extends Any> = readonly Tag<A>[];
|
|
321
|
+
/**
|
|
322
|
+
* Metadata key from Aux
|
|
323
|
+
*/
|
|
324
|
+
type MetadataKey<A> = A extends Any ? Coalesce<A['MetadataKey']> : never;
|
|
325
|
+
/**
|
|
326
|
+
* Metadata object from Aux
|
|
327
|
+
*/
|
|
328
|
+
type Metadata<A extends Any> = IsNever<A['MetadataKey']> extends true ? never : IsLiteral<A['MetadataKey']> extends true ? { [key in A['MetadataKey']]?: string | string[] } : Record<string, string | string[]>;
|
|
329
|
+
/**
|
|
330
|
+
* All known kinds from Aux as a literal union.
|
|
331
|
+
*/
|
|
332
|
+
type AllKinds<A> = ElementKind<A> | DeploymentKind<A> | RelationKind<A>;
|
|
333
|
+
/**
|
|
334
|
+
* Specification from Aux
|
|
335
|
+
*/
|
|
336
|
+
type Spec<A> = A extends Aux<any, any, any, any, any, SpecAux<infer E, infer D, infer R, infer T, infer M>> ? SpecAux<E, D, R, T, M> : never;
|
|
337
|
+
type StrictProjectId<A> = A extends infer T extends Any ? ProjectId$1<ProjectId<T>> : never;
|
|
338
|
+
type StrictViewId<A> = A extends infer T extends Any ? ViewId$1<ViewId<T>> : never;
|
|
339
|
+
type StrictTag<A> = A extends infer T extends Any ? Tag$1<Tag<T>> : never;
|
|
340
|
+
type StrictElementKind<A> = A extends infer T extends Any ? ElementKind$1<ElementKind<T>> : never;
|
|
341
|
+
type StrictDeploymentKind<A> = A extends infer T extends Any ? DeploymentKind$1<DeploymentKind<T>> : never;
|
|
342
|
+
type StrictRelationKind<A> = A extends infer T extends Any ? RelationshipKind<RelationKind<T>> : never;
|
|
343
|
+
type WithDescriptionAndTech = {
|
|
344
|
+
readonly summary?: MarkdownOrString | null;
|
|
345
|
+
readonly description?: MarkdownOrString | null;
|
|
346
|
+
readonly technology?: string | null;
|
|
347
|
+
};
|
|
348
|
+
/**
|
|
349
|
+
* Returns summary if it is not null, otherwise returns description
|
|
350
|
+
*/
|
|
351
|
+
declare function preferSummary(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
|
|
352
|
+
/**
|
|
353
|
+
* Returns description if it is not null, otherwise returns summary
|
|
354
|
+
*/
|
|
355
|
+
declare function preferDescription(a: WithDescriptionAndTech): MarkdownOrString | null | undefined;
|
|
356
|
+
type WithTags<A extends Any> = {
|
|
357
|
+
readonly tags: Tags<A>;
|
|
358
|
+
};
|
|
359
|
+
type WithOptionalTags<A extends Any> = {
|
|
360
|
+
readonly tags?: Tags<A> | null;
|
|
361
|
+
};
|
|
362
|
+
type WithLinks = {
|
|
363
|
+
readonly links: readonly Link[];
|
|
364
|
+
};
|
|
365
|
+
type WithOptionalLinks = {
|
|
366
|
+
readonly links?: readonly Link[] | null;
|
|
367
|
+
};
|
|
368
|
+
type WithMetadata<A extends Any> = {
|
|
369
|
+
readonly metadata?: Metadata<A>;
|
|
370
|
+
};
|
|
371
|
+
type WithNotation = {
|
|
372
|
+
readonly notation?: string | null;
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* @see {@link LiteralUnion} from type-fest (https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts)
|
|
376
|
+
*/
|
|
377
|
+
type OrString = string & Record<never, never>;
|
|
378
|
+
/**
|
|
379
|
+
* Allows any string value, but still auto-completes to the possible values in IDE
|
|
380
|
+
*/
|
|
381
|
+
type LooseLiteral<V extends string> = Coalesce<V> | OrString;
|
|
382
|
+
type LooseElementId<A> = A extends Any ? LooseLiteral<A['ElementId']> : string;
|
|
383
|
+
type LooseDeploymentId<A> = A extends Any ? LooseLiteral<A['DeploymentId']> : string;
|
|
384
|
+
type LooseViewId<A> = A extends Any ? LooseLiteral<A['ViewId']> : string;
|
|
385
|
+
type LooseTag<A> = A extends Any ? LooseLiteral<A['Tag']> : string;
|
|
386
|
+
type LooseTags<A> = A extends Any ? readonly (LooseLiteral<A['Tag']>)[] : string[];
|
|
387
|
+
type LooseElementKind<A> = A extends Any ? LooseLiteral<A['ElementKind']> : string;
|
|
388
|
+
type LooseDeploymentKind<A> = A extends Any ? LooseLiteral<A['DeploymentKind']> : string;
|
|
389
|
+
type LooseRelationKind<A> = A extends Any ? LooseLiteral<A['RelationKind']> : string;
|
|
41
390
|
//#endregion
|
|
42
|
-
//#region
|
|
391
|
+
//#region ../../styled-system/preset/dist/defaults/index.d.mts
|
|
392
|
+
//#region src/defaults/types.d.ts
|
|
393
|
+
declare const Sizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
394
|
+
declare const IconPositions: readonly ["left", "right", "top", "bottom"];
|
|
395
|
+
declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
|
|
396
|
+
declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue", "bucket", "document", "component"];
|
|
397
|
+
declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
|
|
398
|
+
declare const DefaultTagColors: readonly ["tomato", "grass", "blue", "ruby", "orange", "indigo", "pink", "teal", "purple", "amber", "crimson", "red", "lime", "yellow", "violet"];
|
|
399
|
+
//#endregion
|
|
400
|
+
//#region src/styles/types.d.ts
|
|
43
401
|
/**
|
|
44
|
-
*
|
|
45
|
-
* Includes direct relationships and/or between their nested elements.
|
|
402
|
+
* For padding, margin, etc.
|
|
46
403
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
404
|
+
type Size = typeof Sizes[number];
|
|
405
|
+
type TextSize = Size;
|
|
406
|
+
type ShapeSize = Size;
|
|
407
|
+
type SpacingSize = Size;
|
|
408
|
+
type IconSize = Size;
|
|
409
|
+
type IconPosition = typeof IconPositions[number];
|
|
410
|
+
type BorderStyle = typeof BorderStyles[number];
|
|
411
|
+
type ElementShape = typeof ElementShapes[number];
|
|
412
|
+
type HexColor = `#${string}`;
|
|
413
|
+
type ColorLiteral = HexColor | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})`;
|
|
414
|
+
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
415
|
+
declare const RelationshipArrowTypes: readonly ["none", "normal", "onormal", "dot", "odot", "diamond", "odiamond", "crow", "open", "vee"];
|
|
416
|
+
type RelationshipArrowType = TupleToUnion<typeof RelationshipArrowTypes>;
|
|
417
|
+
type ThemeColor = typeof ThemeColors[number];
|
|
418
|
+
declare function isThemeColor(color: string): color is ThemeColor;
|
|
419
|
+
type CustomColorDefinitions = {
|
|
420
|
+
[key: string]: ThemeColorValues;
|
|
421
|
+
};
|
|
422
|
+
type CustomColor = Tagged<string, 'CustomColor'>;
|
|
423
|
+
declare function isCustomColor(color: string): color is CustomColor;
|
|
424
|
+
type Color = ThemeColor | CustomColor;
|
|
425
|
+
interface ElementColorValues {
|
|
426
|
+
readonly fill: ColorLiteral;
|
|
427
|
+
readonly stroke: ColorLiteral;
|
|
428
|
+
readonly hiContrast: ColorLiteral;
|
|
429
|
+
readonly loContrast: ColorLiteral;
|
|
430
|
+
}
|
|
431
|
+
interface RelationshipColorValues {
|
|
432
|
+
readonly line: ColorLiteral;
|
|
433
|
+
readonly labelBg: ColorLiteral;
|
|
434
|
+
readonly label: ColorLiteral;
|
|
435
|
+
}
|
|
436
|
+
interface ThemeColorValues {
|
|
437
|
+
readonly elements: ElementColorValues;
|
|
438
|
+
readonly relationships: RelationshipColorValues;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Default style values for elements, groups and relationships
|
|
442
|
+
*/
|
|
443
|
+
interface LikeC4StyleDefaults {
|
|
444
|
+
readonly color: ThemeColor;
|
|
445
|
+
readonly size: ShapeSize;
|
|
446
|
+
readonly shape: ElementShape;
|
|
447
|
+
readonly opacity?: number;
|
|
448
|
+
readonly border?: BorderStyle;
|
|
449
|
+
readonly padding?: SpacingSize;
|
|
450
|
+
readonly text?: TextSize;
|
|
451
|
+
readonly iconPosition?: IconPosition;
|
|
59
452
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
453
|
+
* Default style values for groups
|
|
454
|
+
* If not specified, the default values for elements are used
|
|
62
455
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
456
|
+
readonly group: {
|
|
457
|
+
readonly color?: ThemeColor;
|
|
458
|
+
readonly opacity: number;
|
|
459
|
+
readonly border: BorderStyle;
|
|
460
|
+
};
|
|
461
|
+
readonly relationship: {
|
|
462
|
+
readonly color: ThemeColor;
|
|
463
|
+
readonly line: RelationshipLineType;
|
|
464
|
+
readonly arrow: RelationshipArrowType;
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
interface LikeC4Theme {
|
|
468
|
+
readonly colors: Readonly<Record<ThemeColor, ThemeColorValues>>;
|
|
469
|
+
readonly sizes: Readonly<Record<ShapeSize, {
|
|
470
|
+
readonly width: number;
|
|
471
|
+
readonly height: number;
|
|
472
|
+
}>>;
|
|
473
|
+
readonly spacing: Readonly<Record<SpacingSize, number>>;
|
|
474
|
+
readonly textSizes: Readonly<Record<TextSize, number>>;
|
|
475
|
+
readonly iconSizes: Readonly<Record<IconSize, number>>;
|
|
476
|
+
}
|
|
477
|
+
interface LikeC4StylesConfig {
|
|
478
|
+
readonly theme: LikeC4Theme;
|
|
479
|
+
readonly defaults: LikeC4StyleDefaults;
|
|
480
|
+
}
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region src/types/fqnRef.d.ts
|
|
483
|
+
type AnyAux$2 = Any;
|
|
484
|
+
declare namespace FqnRef {
|
|
67
485
|
/**
|
|
68
|
-
*
|
|
69
|
-
* that is directly connected to source or target.
|
|
486
|
+
* Reference to logical model element
|
|
70
487
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
488
|
+
interface ElementRef<A extends AnyAux$2 = AnyAux$2> {
|
|
489
|
+
project?: never;
|
|
490
|
+
model: ElementId<A>;
|
|
491
|
+
}
|
|
492
|
+
function isElementRef<A extends AnyAux$2>(ref: FqnRef<A>): ref is ElementRef<A>;
|
|
73
493
|
/**
|
|
74
|
-
*
|
|
75
|
-
* Returns new connection with union of relationships.
|
|
494
|
+
* Reference to imported logical model element
|
|
76
495
|
*/
|
|
77
|
-
|
|
496
|
+
interface ImportRef<A extends AnyAux$2 = AnyAux$2> {
|
|
497
|
+
project: ProjectId<A>;
|
|
498
|
+
model: ElementId<A>;
|
|
499
|
+
}
|
|
500
|
+
function isImportRef<A extends AnyAux$2>(ref: FqnRef<A>): ref is ImportRef<A>;
|
|
501
|
+
function flatten<A extends AnyAux$2>(ref: FqnRef<A>): Fqn<A>;
|
|
502
|
+
type ModelRef<A extends AnyAux$2 = AnyAux$2> = ImportRef<A> | ElementRef<A>;
|
|
503
|
+
function isModelRef<A extends AnyAux$2>(ref: FqnRef<A>): ref is ModelRef<A>;
|
|
78
504
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
505
|
+
* Represents a reference to an instance within a deployment.
|
|
506
|
+
*
|
|
507
|
+
* @template D - The type representing the deployment fqn. Defaults to `Fqn`.
|
|
508
|
+
* @template M - The type representing the model fqn. Defaults to `Fqn`.
|
|
509
|
+
*
|
|
510
|
+
* @property {D} deployment - TThe fully qualified name (FQN) of the deployed instance.
|
|
511
|
+
* @property {M} element - The element reference within the deployment.
|
|
81
512
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
513
|
+
interface InsideInstanceRef<A extends AnyAux$2 = AnyAux$2> {
|
|
514
|
+
deployment: DeploymentId<A>;
|
|
515
|
+
element: ElementId<A>;
|
|
516
|
+
}
|
|
517
|
+
function isInsideInstanceRef<A extends AnyAux$2>(ref: FqnRef<A>): ref is InsideInstanceRef<A>;
|
|
86
518
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
519
|
+
* Represents a reference to a deployment element.
|
|
520
|
+
*
|
|
521
|
+
* @template F - The type of the fully qualified name (FQN) of the deployment element. Defaults to `Fqn`.
|
|
522
|
+
* @property {F} deployment - The fully qualified name (FQN) of the deployment element.
|
|
89
523
|
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
524
|
+
interface DeploymentElementRef<A extends AnyAux$2> {
|
|
525
|
+
deployment: DeploymentId<A>;
|
|
526
|
+
element?: never;
|
|
527
|
+
}
|
|
528
|
+
function isDeploymentElementRef<A extends AnyAux$2>(ref: FqnRef<A>): ref is DeploymentElementRef<A>;
|
|
529
|
+
type DeploymentRef<A extends AnyAux$2> = DeploymentElementRef<A> | InsideInstanceRef<A>;
|
|
530
|
+
function isDeploymentRef<A extends AnyAux$2>(ref: FqnRef<A>): ref is DeploymentRef<A>;
|
|
94
531
|
}
|
|
532
|
+
type FqnRef<A extends AnyAux$2 = AnyAux$2> = ExclusiveUnion<{
|
|
533
|
+
DeploymentRef: FqnRef.DeploymentRef<A>;
|
|
534
|
+
ModelRef: FqnRef.ModelRef<A>;
|
|
535
|
+
}>;
|
|
536
|
+
//#endregion
|
|
537
|
+
//#region src/types/operators.d.ts
|
|
538
|
+
type EqualOperator<V> = {
|
|
539
|
+
eq: V;
|
|
540
|
+
neq?: never;
|
|
541
|
+
} | {
|
|
542
|
+
eq?: never;
|
|
543
|
+
neq: V;
|
|
544
|
+
};
|
|
545
|
+
type AllNever = {
|
|
546
|
+
not?: never;
|
|
547
|
+
and?: never;
|
|
548
|
+
or?: never;
|
|
549
|
+
tag?: never;
|
|
550
|
+
kind?: never;
|
|
551
|
+
participant?: never;
|
|
552
|
+
operator?: never;
|
|
553
|
+
};
|
|
554
|
+
type TagEqual<A extends Any> = Omit<AllNever, 'tag'> & {
|
|
555
|
+
tag: EqualOperator<Tag<A>> | Tag<A>;
|
|
556
|
+
};
|
|
557
|
+
declare function isTagEqual<A extends Any>(operator: WhereOperator<A>): operator is TagEqual<A>;
|
|
558
|
+
type KindEqual<A extends Any> = Omit<AllNever, 'kind'> & {
|
|
559
|
+
kind: EqualOperator<AllKinds<A>> | AllKinds<A>;
|
|
560
|
+
};
|
|
561
|
+
declare function isKindEqual<A extends Any>(operator: WhereOperator<A>): operator is KindEqual<A>;
|
|
562
|
+
type Participant = 'source' | 'target';
|
|
563
|
+
type ParticipantOperator<A extends Any> = Omit<AllNever, 'participant' | 'operator'> & {
|
|
564
|
+
participant: Participant;
|
|
565
|
+
operator: KindEqual<A> | TagEqual<A>;
|
|
566
|
+
};
|
|
567
|
+
declare function isParticipantOperator<A extends Any>(operator: WhereOperator<A>): operator is ParticipantOperator<A>;
|
|
568
|
+
type NotOperator<A extends Any> = Omit<AllNever, 'not'> & {
|
|
569
|
+
not: WhereOperator<A>;
|
|
570
|
+
};
|
|
571
|
+
declare function isNotOperator<A extends Any>(operator: WhereOperator<A>): operator is NotOperator<A>;
|
|
572
|
+
type AndOperator<A extends Any> = Omit<AllNever, 'and'> & {
|
|
573
|
+
and: NonEmptyArray<WhereOperator<A>>;
|
|
574
|
+
};
|
|
575
|
+
declare function isAndOperator<A extends Any>(operator: WhereOperator<A>): operator is AndOperator<A>;
|
|
576
|
+
type OrOperator<A extends Any> = Omit<AllNever, 'or'> & {
|
|
577
|
+
or: NonEmptyArray<WhereOperator<A>>;
|
|
578
|
+
};
|
|
579
|
+
declare function isOrOperator<A extends Any>(operator: WhereOperator<A>): operator is OrOperator<A>;
|
|
580
|
+
type WhereOperator<A extends Any = Any> = TagEqual<A> | KindEqual<A> | ParticipantOperator<A> | NotOperator<A> | AndOperator<A> | OrOperator<A>;
|
|
581
|
+
type Filterable<A extends Any> = {
|
|
582
|
+
tags?: Tags<A> | null | undefined;
|
|
583
|
+
kind?: AllKinds<A> | null | undefined;
|
|
584
|
+
source?: Filterable<A>;
|
|
585
|
+
target?: Filterable<A>;
|
|
586
|
+
};
|
|
587
|
+
type OperatorPredicate<A extends Any> = (value: Filterable<A>) => boolean;
|
|
588
|
+
declare function whereOperatorAsPredicate<A extends Any>(operator: WhereOperator<A>): OperatorPredicate<A>;
|
|
95
589
|
//#endregion
|
|
96
|
-
//#region src/
|
|
590
|
+
//#region src/types/expression.d.ts
|
|
591
|
+
type AnyAux$1 = Any;
|
|
592
|
+
type PredicateSelector = 'children' | 'expanded' | 'descendants';
|
|
593
|
+
declare namespace FqnExpr {
|
|
594
|
+
type Wildcard = {
|
|
595
|
+
wildcard: true;
|
|
596
|
+
};
|
|
597
|
+
function isWildcard<A extends AnyAux$1>(expr: Expression<A>): expr is FqnExpr.Wildcard;
|
|
598
|
+
interface ModelRef<M extends AnyAux$1 = AnyAux$1> {
|
|
599
|
+
ref: FqnRef.ModelRef<M>;
|
|
600
|
+
selector?: PredicateSelector;
|
|
601
|
+
}
|
|
602
|
+
function isModelRef<A extends AnyAux$1>(ref: Expression<A>): ref is FqnExpr.ModelRef<A>;
|
|
603
|
+
interface DeploymentRef<A extends AnyAux$1 = AnyAux$1> {
|
|
604
|
+
ref: FqnRef.DeploymentRef<A>;
|
|
605
|
+
selector?: PredicateSelector;
|
|
606
|
+
}
|
|
607
|
+
function isDeploymentRef<A extends AnyAux$1>(expr: Expression<A>): expr is FqnExpr.DeploymentRef<A>;
|
|
608
|
+
interface ElementKindExpr<A extends AnyAux$1 = AnyAux$1> {
|
|
609
|
+
elementKind: ElementKind<A>;
|
|
610
|
+
isEqual: boolean;
|
|
611
|
+
}
|
|
612
|
+
function isElementKindExpr<A extends AnyAux$1>(expr: Expression<A>): expr is ElementKindExpr<A>;
|
|
613
|
+
interface ElementTagExpr<A extends AnyAux$1 = AnyAux$1> {
|
|
614
|
+
elementTag: Tag<A>;
|
|
615
|
+
isEqual: boolean;
|
|
616
|
+
}
|
|
617
|
+
function isElementTagExpr<A extends AnyAux$1>(expr: Expression<A>): expr is ElementTagExpr<A>;
|
|
618
|
+
type NonWildcard<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
619
|
+
ModelRef: ModelRef<A>;
|
|
620
|
+
DeploymentRef: DeploymentRef<A>;
|
|
621
|
+
ElementKind: ElementKindExpr<A>;
|
|
622
|
+
ElementTag: ElementTagExpr<A>;
|
|
623
|
+
}>;
|
|
624
|
+
interface Where<A extends AnyAux$1 = AnyAux$1> {
|
|
625
|
+
where: {
|
|
626
|
+
expr: ExclusiveUnion<{
|
|
627
|
+
Wildcard: Wildcard;
|
|
628
|
+
ModelRef: ModelRef<A>;
|
|
629
|
+
DeploymentRef: DeploymentRef<A>;
|
|
630
|
+
ElementKind: ElementKindExpr<A>;
|
|
631
|
+
ElementTag: ElementTagExpr<A>;
|
|
632
|
+
}>;
|
|
633
|
+
condition: WhereOperator<A>;
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
function isWhere<A extends AnyAux$1>(expr: Expression<A>): expr is FqnExpr.Where<A>;
|
|
637
|
+
interface Custom<A extends AnyAux$1 = AnyAux$1> {
|
|
638
|
+
custom: {
|
|
639
|
+
expr: OrWhere<A>;
|
|
640
|
+
title?: string;
|
|
641
|
+
description?: MarkdownOrString;
|
|
642
|
+
technology?: string;
|
|
643
|
+
notation?: string;
|
|
644
|
+
notes?: MarkdownOrString;
|
|
645
|
+
shape?: ElementShape;
|
|
646
|
+
color?: Color;
|
|
647
|
+
icon?: Icon;
|
|
648
|
+
iconColor?: Color;
|
|
649
|
+
iconSize?: ShapeSize;
|
|
650
|
+
iconPosition?: IconPosition;
|
|
651
|
+
border?: BorderStyle;
|
|
652
|
+
opacity?: number;
|
|
653
|
+
navigateTo?: StrictViewId<A>;
|
|
654
|
+
multiple?: boolean;
|
|
655
|
+
size?: ShapeSize;
|
|
656
|
+
padding?: ShapeSize;
|
|
657
|
+
textSize?: ShapeSize;
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
function isCustom<A extends AnyAux$1>(expr: Expression<A>): expr is Custom<A>;
|
|
661
|
+
function is<A extends AnyAux$1>(expr: Expression<A>): expr is FqnExpr<A>;
|
|
662
|
+
type OrWhere<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
663
|
+
Wildcard: FqnExpr.Wildcard;
|
|
664
|
+
ModelRef: FqnExpr.ModelRef<A>;
|
|
665
|
+
DeploymentRef: FqnExpr.DeploymentRef<A>;
|
|
666
|
+
ElementKind: ElementKindExpr<A>;
|
|
667
|
+
ElementTag: ElementTagExpr<A>;
|
|
668
|
+
Where: FqnExpr.Where<A>;
|
|
669
|
+
}>;
|
|
670
|
+
type Any<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
671
|
+
Wildcard: Wildcard;
|
|
672
|
+
ModelRef: ModelRef<A>;
|
|
673
|
+
DeploymentRef: DeploymentRef<A>;
|
|
674
|
+
ElementKind: ElementKindExpr<A>;
|
|
675
|
+
ElementTag: ElementTagExpr<A>;
|
|
676
|
+
Where: Where<A>;
|
|
677
|
+
Custom: Custom<A>;
|
|
678
|
+
}>;
|
|
679
|
+
function unwrap<A extends AnyAux$1>(expr: FqnExpr.Any<A>): Wildcard | ModelRef<A> | DeploymentRef<A> | ElementKindExpr<A> | ElementTagExpr<A>;
|
|
680
|
+
}
|
|
681
|
+
type FqnExpr<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
682
|
+
Wildcard: FqnExpr.Wildcard;
|
|
683
|
+
ModelRef: FqnExpr.ModelRef<A>;
|
|
684
|
+
DeploymentRef: FqnExpr.DeploymentRef<A>;
|
|
685
|
+
ElementKind: FqnExpr.ElementKindExpr<A>;
|
|
686
|
+
ElementTag: FqnExpr.ElementTagExpr<A>;
|
|
687
|
+
}>;
|
|
688
|
+
declare namespace RelationExpr {
|
|
689
|
+
type Endpoint<A extends AnyAux$1 = AnyAux$1> = FqnExpr.Where<A>['where']['expr'];
|
|
690
|
+
interface Direct<A extends AnyAux$1 = AnyAux$1> {
|
|
691
|
+
source: Endpoint<A>;
|
|
692
|
+
target: Endpoint<A>;
|
|
693
|
+
isBidirectional?: boolean;
|
|
694
|
+
}
|
|
695
|
+
function isDirect<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr.Direct<A>;
|
|
696
|
+
interface Incoming<A extends AnyAux$1 = AnyAux$1> {
|
|
697
|
+
incoming: Endpoint<A>;
|
|
698
|
+
}
|
|
699
|
+
function isIncoming<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr.Incoming<A>;
|
|
700
|
+
interface Outgoing<A extends AnyAux$1 = AnyAux$1> {
|
|
701
|
+
outgoing: Endpoint<A>;
|
|
702
|
+
}
|
|
703
|
+
function isOutgoing<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr.Outgoing<A>;
|
|
704
|
+
interface InOut<A extends AnyAux$1 = AnyAux$1> {
|
|
705
|
+
inout: Endpoint<A>;
|
|
706
|
+
}
|
|
707
|
+
function isInOut<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr.InOut<A>;
|
|
708
|
+
interface Where<A extends AnyAux$1 = AnyAux$1> {
|
|
709
|
+
where: {
|
|
710
|
+
expr: ExclusiveUnion<{
|
|
711
|
+
Direct: RelationExpr.Direct<A>;
|
|
712
|
+
Incoming: RelationExpr.Incoming<A>;
|
|
713
|
+
Outgoing: RelationExpr.Outgoing<A>;
|
|
714
|
+
InOut: RelationExpr.InOut<A>;
|
|
715
|
+
}>;
|
|
716
|
+
condition: WhereOperator<A>;
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
function isWhere<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr.Where<A>;
|
|
720
|
+
interface Custom<A extends AnyAux$1 = AnyAux$1> {
|
|
721
|
+
customRelation: {
|
|
722
|
+
expr: OrWhere<A>;
|
|
723
|
+
title?: string;
|
|
724
|
+
description?: MarkdownOrString;
|
|
725
|
+
technology?: string;
|
|
726
|
+
notation?: string;
|
|
727
|
+
navigateTo?: StrictViewId<A>;
|
|
728
|
+
notes?: MarkdownOrString;
|
|
729
|
+
color?: Color;
|
|
730
|
+
line?: RelationshipLineType;
|
|
731
|
+
head?: RelationshipArrowType;
|
|
732
|
+
tail?: RelationshipArrowType;
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
function isCustom<A extends AnyAux$1>(expr: Expression<A>): expr is Custom<A>;
|
|
736
|
+
function is<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr<A>;
|
|
737
|
+
type OrWhere<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
738
|
+
Direct: Direct<A>;
|
|
739
|
+
Incoming: Incoming<A>;
|
|
740
|
+
Outgoing: Outgoing<A>;
|
|
741
|
+
InOut: InOut<A>;
|
|
742
|
+
Where: Where<A>;
|
|
743
|
+
}>;
|
|
744
|
+
type Any<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
745
|
+
Direct: Direct<A>;
|
|
746
|
+
Incoming: Incoming<A>;
|
|
747
|
+
Outgoing: Outgoing<A>;
|
|
748
|
+
InOut: InOut<A>;
|
|
749
|
+
Where: Where<A>;
|
|
750
|
+
Custom: Custom<A>;
|
|
751
|
+
}>;
|
|
752
|
+
function unwrap<A extends AnyAux$1>(expr: RelationExpr.Any<A>): Direct<A> | Incoming<A> | Outgoing<A> | InOut<A>;
|
|
753
|
+
}
|
|
754
|
+
type RelationExpr<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
755
|
+
Direct: RelationExpr.Direct<A>;
|
|
756
|
+
Incoming: RelationExpr.Incoming<A>;
|
|
757
|
+
Outgoing: RelationExpr.Outgoing<A>;
|
|
758
|
+
InOut: RelationExpr.InOut<A>;
|
|
759
|
+
}>;
|
|
97
760
|
/**
|
|
98
|
-
*
|
|
99
|
-
* both direct and implicit ones (between their nested elements).
|
|
761
|
+
* Represents a version 2 expression which can be one of several types.
|
|
100
762
|
*
|
|
101
|
-
*
|
|
763
|
+
* @template D - The type for the deployment FQN, defaults to `Fqn`.
|
|
764
|
+
* @template M - The type for the model FQN, defaults to `Fqn`.
|
|
102
765
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
766
|
+
type Expression<A extends AnyAux$1 = AnyAux$1> = ExclusiveUnion<{
|
|
767
|
+
Wildcard: FqnExpr.Wildcard;
|
|
768
|
+
ModelRef: FqnExpr.ModelRef<A>;
|
|
769
|
+
DeploymentRef: FqnExpr.DeploymentRef<A>;
|
|
770
|
+
ElementKind: FqnExpr.ElementKindExpr<A>;
|
|
771
|
+
ElementTag: FqnExpr.ElementTagExpr<A>;
|
|
772
|
+
Custom: FqnExpr.Custom<A>;
|
|
773
|
+
Direct: RelationExpr.Direct<A>;
|
|
774
|
+
Incoming: RelationExpr.Incoming<A>;
|
|
775
|
+
Outgoing: RelationExpr.Outgoing<A>;
|
|
776
|
+
InOut: RelationExpr.InOut<A>;
|
|
777
|
+
Where: Expression.Where<A>;
|
|
778
|
+
CustomRelation: RelationExpr.Custom<A>;
|
|
779
|
+
}>;
|
|
780
|
+
declare namespace Expression {
|
|
781
|
+
type Where<A extends AnyAux$1 = AnyAux$1> = FqnExpr.Where<A> | RelationExpr.Where<A>;
|
|
782
|
+
function isWhere<A extends AnyAux$1>(expr: Expression<A>): expr is Expression.Where<A>;
|
|
783
|
+
function isRelationWhere<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr.Where<A>;
|
|
784
|
+
function isFqnExprWhere<A extends AnyAux$1>(expr: Expression<A>): expr is FqnExpr.Where<A>;
|
|
785
|
+
function isFqnExpr<A extends AnyAux$1>(expr: Expression<A>): expr is FqnExpr.Any<A>;
|
|
786
|
+
function isRelation<A extends AnyAux$1>(expr: Expression<A>): expr is RelationExpr.Any<A>;
|
|
787
|
+
}
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region src/types/expression-model.d.ts
|
|
790
|
+
type AnyAux = Any;
|
|
791
|
+
declare namespace ModelFqnExpr {
|
|
792
|
+
type Wildcard = {
|
|
793
|
+
wildcard: true;
|
|
794
|
+
};
|
|
795
|
+
function isWildcard<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Wildcard;
|
|
796
|
+
interface Ref<M extends AnyAux = AnyAux> {
|
|
797
|
+
ref: FqnRef.ModelRef<M>;
|
|
798
|
+
selector?: PredicateSelector;
|
|
799
|
+
}
|
|
800
|
+
function isModelRef<A extends AnyAux>(ref: ModelExpression<A>): ref is ModelFqnExpr.Ref<A>;
|
|
801
|
+
interface ElementKindExpr<A extends AnyAux = AnyAux> {
|
|
802
|
+
elementKind: ElementKind<A>;
|
|
803
|
+
isEqual: boolean;
|
|
804
|
+
}
|
|
805
|
+
function isElementKindExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ElementKindExpr<A>;
|
|
806
|
+
interface ElementTagExpr<A extends AnyAux> {
|
|
807
|
+
elementTag: Tag<A>;
|
|
808
|
+
isEqual: boolean;
|
|
809
|
+
}
|
|
810
|
+
function isElementTagExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ElementTagExpr<A>;
|
|
811
|
+
type NonWildcard<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
812
|
+
Ref: Ref<A>;
|
|
813
|
+
ElementKind: ElementKindExpr<A>;
|
|
814
|
+
ElementTag: ElementTagExpr<A>;
|
|
815
|
+
}>;
|
|
816
|
+
interface Where<A extends AnyAux = AnyAux> {
|
|
817
|
+
where: {
|
|
818
|
+
expr: ExclusiveUnion<{
|
|
819
|
+
Wildcard: Wildcard;
|
|
820
|
+
Ref: Ref<A>;
|
|
821
|
+
ElementKind: ElementKindExpr<A>;
|
|
822
|
+
ElementTag: ElementTagExpr<A>;
|
|
823
|
+
}>;
|
|
824
|
+
condition: WhereOperator<A>;
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Where<A>;
|
|
828
|
+
interface Custom<A extends AnyAux = AnyAux> {
|
|
829
|
+
custom: {
|
|
830
|
+
expr: OrWhere<A>;
|
|
831
|
+
title?: string;
|
|
832
|
+
description?: MarkdownOrString;
|
|
833
|
+
technology?: string;
|
|
834
|
+
notation?: string;
|
|
835
|
+
notes?: MarkdownOrString;
|
|
836
|
+
shape?: ElementShape;
|
|
837
|
+
color?: Color;
|
|
838
|
+
icon?: Icon;
|
|
839
|
+
iconColor?: Color;
|
|
840
|
+
iconSize?: ShapeSize;
|
|
841
|
+
iconPosition?: IconPosition;
|
|
842
|
+
border?: BorderStyle;
|
|
843
|
+
opacity?: number;
|
|
844
|
+
navigateTo?: StrictViewId<A>;
|
|
845
|
+
multiple?: boolean;
|
|
846
|
+
size?: ShapeSize;
|
|
847
|
+
padding?: ShapeSize;
|
|
848
|
+
textSize?: ShapeSize;
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
function isCustom<A extends AnyAux>(expr: ModelExpression<A>): expr is Custom<A>;
|
|
852
|
+
function is<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr<A>;
|
|
853
|
+
type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
854
|
+
Wildcard: ModelFqnExpr.Wildcard;
|
|
855
|
+
Ref: ModelFqnExpr.Ref<A>;
|
|
856
|
+
ElementKind: ElementKindExpr<A>;
|
|
857
|
+
ElementTag: ElementTagExpr<A>;
|
|
858
|
+
Where: ModelFqnExpr.Where<A>;
|
|
859
|
+
}>;
|
|
860
|
+
type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
861
|
+
Wildcard: Wildcard;
|
|
862
|
+
Ref: Ref<A>;
|
|
863
|
+
ElementKind: ElementKindExpr<A>;
|
|
864
|
+
ElementTag: ElementTagExpr<A>;
|
|
865
|
+
Where: Where<A>;
|
|
866
|
+
Custom: Custom<A>;
|
|
867
|
+
}>;
|
|
868
|
+
function unwrap<A extends AnyAux>(expr: ModelFqnExpr.Any<A>): Wildcard | Ref<A> | ElementKindExpr<A> | ElementTagExpr<A>;
|
|
869
|
+
}
|
|
870
|
+
type ModelFqnExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
871
|
+
Wildcard: ModelFqnExpr.Wildcard;
|
|
872
|
+
Ref: ModelFqnExpr.Ref<A>;
|
|
873
|
+
ElementKind: ModelFqnExpr.ElementKindExpr<A>;
|
|
874
|
+
ElementTag: ModelFqnExpr.ElementTagExpr<A>;
|
|
875
|
+
}>;
|
|
876
|
+
declare namespace ModelRelationExpr {
|
|
877
|
+
type Endpoint<A extends AnyAux = AnyAux> = ModelFqnExpr.Where<A>['where']['expr'];
|
|
878
|
+
interface Direct<A extends AnyAux = AnyAux> {
|
|
879
|
+
source: Endpoint<A>;
|
|
880
|
+
target: Endpoint<A>;
|
|
881
|
+
isBidirectional?: boolean;
|
|
882
|
+
}
|
|
883
|
+
function isDirect<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Direct<A>;
|
|
884
|
+
interface Incoming<A extends AnyAux = AnyAux> {
|
|
885
|
+
incoming: Endpoint<A>;
|
|
886
|
+
}
|
|
887
|
+
function isIncoming<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Incoming<A>;
|
|
888
|
+
interface Outgoing<A extends AnyAux = AnyAux> {
|
|
889
|
+
outgoing: Endpoint<A>;
|
|
890
|
+
}
|
|
891
|
+
function isOutgoing<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Outgoing<A>;
|
|
892
|
+
interface InOut<A extends AnyAux = AnyAux> {
|
|
893
|
+
inout: Endpoint<A>;
|
|
894
|
+
}
|
|
895
|
+
function isInOut<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.InOut<A>;
|
|
896
|
+
interface Where<A extends AnyAux = AnyAux> {
|
|
897
|
+
where: {
|
|
898
|
+
expr: ExclusiveUnion<{
|
|
899
|
+
Direct: ModelRelationExpr.Direct<A>;
|
|
900
|
+
Incoming: ModelRelationExpr.Incoming<A>;
|
|
901
|
+
Outgoing: ModelRelationExpr.Outgoing<A>;
|
|
902
|
+
InOut: ModelRelationExpr.InOut<A>;
|
|
903
|
+
}>;
|
|
904
|
+
condition: WhereOperator<A>;
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Where<A>;
|
|
908
|
+
interface Custom<A extends AnyAux = AnyAux> {
|
|
909
|
+
customRelation: {
|
|
910
|
+
expr: OrWhere<A>;
|
|
911
|
+
title?: string;
|
|
912
|
+
description?: MarkdownOrString;
|
|
913
|
+
technology?: string;
|
|
914
|
+
notation?: string;
|
|
915
|
+
navigateTo?: StrictViewId<A>;
|
|
916
|
+
notes?: MarkdownOrString;
|
|
917
|
+
color?: Color;
|
|
918
|
+
line?: RelationshipLineType;
|
|
919
|
+
head?: RelationshipArrowType;
|
|
920
|
+
tail?: RelationshipArrowType;
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
function isCustom<A extends AnyAux>(expr: ModelExpression<A>): expr is Custom<A>;
|
|
924
|
+
function is<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr<A>;
|
|
925
|
+
type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
926
|
+
Direct: Direct<A>;
|
|
927
|
+
Incoming: Incoming<A>;
|
|
928
|
+
Outgoing: Outgoing<A>;
|
|
929
|
+
InOut: InOut<A>;
|
|
930
|
+
Where: Where<A>;
|
|
931
|
+
}>;
|
|
932
|
+
type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
933
|
+
Direct: Direct<A>;
|
|
934
|
+
Incoming: Incoming<A>;
|
|
935
|
+
Outgoing: Outgoing<A>;
|
|
936
|
+
InOut: InOut<A>;
|
|
937
|
+
Where: Where<A>;
|
|
938
|
+
Custom: Custom<A>;
|
|
939
|
+
}>;
|
|
940
|
+
function unwrap<A extends AnyAux>(expr: ModelRelationExpr.Any<A>): Direct<A> | Incoming<A> | Outgoing<A> | InOut<A>;
|
|
941
|
+
}
|
|
942
|
+
type ModelRelationExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
943
|
+
Direct: ModelRelationExpr.Direct<A>;
|
|
944
|
+
Incoming: ModelRelationExpr.Incoming<A>;
|
|
945
|
+
Outgoing: ModelRelationExpr.Outgoing<A>;
|
|
946
|
+
InOut: ModelRelationExpr.InOut<A>;
|
|
947
|
+
}>;
|
|
948
|
+
/**
|
|
949
|
+
* Represents a version 2 expression which can be one of several types.
|
|
950
|
+
*
|
|
951
|
+
* @template D - The type for the deployment FQN, defaults to `Fqn`.
|
|
952
|
+
* @template M - The type for the model FQN, defaults to `Fqn`.
|
|
953
|
+
*/
|
|
954
|
+
type ModelExpression<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
955
|
+
Wildcard: ModelFqnExpr.Wildcard;
|
|
956
|
+
Ref: ModelFqnExpr.Ref<A>;
|
|
957
|
+
ElementKind: ModelFqnExpr.ElementKindExpr<A>;
|
|
958
|
+
ElementTag: ModelFqnExpr.ElementTagExpr<A>;
|
|
959
|
+
Custom: ModelFqnExpr.Custom<A>;
|
|
960
|
+
Direct: ModelRelationExpr.Direct<A>;
|
|
961
|
+
Incoming: ModelRelationExpr.Incoming<A>;
|
|
962
|
+
Outgoing: ModelRelationExpr.Outgoing<A>;
|
|
963
|
+
InOut: ModelRelationExpr.InOut<A>;
|
|
964
|
+
Where: ModelExpression.Where<A>;
|
|
965
|
+
CustomRelation: ModelRelationExpr.Custom<A>;
|
|
966
|
+
}>;
|
|
967
|
+
declare namespace ModelExpression {
|
|
968
|
+
type Where<A extends AnyAux = AnyAux> = ModelFqnExpr.Where<A> | ModelRelationExpr.Where<A>;
|
|
969
|
+
function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelExpression.Where<A>;
|
|
970
|
+
function isRelationWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Where<A>;
|
|
971
|
+
function isFqnExprWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Where<A>;
|
|
972
|
+
function isFqnExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Any<A>;
|
|
973
|
+
function isRelationExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Any<A>;
|
|
974
|
+
}
|
|
975
|
+
//#endregion
|
|
976
|
+
//#region src/types/view-common.d.ts
|
|
977
|
+
interface AnyIncludePredicate<Expr> {
|
|
978
|
+
include: Expr[];
|
|
979
|
+
exclude?: never;
|
|
980
|
+
}
|
|
981
|
+
interface AnyExcludePredicate<Expr> {
|
|
982
|
+
include?: never;
|
|
983
|
+
exclude: Expr[];
|
|
984
|
+
}
|
|
985
|
+
interface AnyViewRuleStyle<Expr> {
|
|
986
|
+
targets: Expr[];
|
|
987
|
+
notation?: string;
|
|
988
|
+
style: {
|
|
989
|
+
border?: BorderStyle;
|
|
990
|
+
opacity?: number;
|
|
991
|
+
multiple?: boolean;
|
|
992
|
+
size?: ShapeSize;
|
|
993
|
+
padding?: SpacingSize;
|
|
994
|
+
textSize?: TextSize;
|
|
995
|
+
color?: Color;
|
|
996
|
+
shape?: ElementShape;
|
|
997
|
+
icon?: Icon;
|
|
998
|
+
iconColor?: Color;
|
|
999
|
+
iconSize?: IconSize;
|
|
1000
|
+
iconPosition?: IconPosition;
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
interface ViewRuleGlobalStyle {
|
|
1004
|
+
styleId: GlobalStyleID;
|
|
1005
|
+
}
|
|
1006
|
+
declare function isViewRuleGlobalStyle(rule: object): rule is ViewRuleGlobalStyle;
|
|
1007
|
+
interface ViewRuleGlobalPredicateRef {
|
|
1008
|
+
predicateId: GlobalPredicateId;
|
|
1009
|
+
}
|
|
1010
|
+
declare function isViewRuleGlobalPredicateRef(rule: object): rule is ViewRuleGlobalPredicateRef;
|
|
1011
|
+
type RankValue = 'max' | 'min' | 'same' | 'sink' | 'source';
|
|
1012
|
+
interface ViewRuleRank<Expr> {
|
|
1013
|
+
targets: Expr[];
|
|
1014
|
+
rank: RankValue;
|
|
1015
|
+
}
|
|
1016
|
+
type AutoLayoutDirection = 'TB' | 'BT' | 'LR' | 'RL';
|
|
1017
|
+
declare function isAutoLayoutDirection(autoLayout: unknown): autoLayout is AutoLayoutDirection;
|
|
1018
|
+
interface ViewRuleAutoLayout {
|
|
1019
|
+
direction: AutoLayoutDirection;
|
|
1020
|
+
nodeSep?: number;
|
|
1021
|
+
rankSep?: number;
|
|
1022
|
+
}
|
|
1023
|
+
declare function isViewRuleAutoLayout(rule: object): rule is ViewRuleAutoLayout;
|
|
1024
|
+
interface ViewAutoLayout {
|
|
1025
|
+
direction: ViewRuleAutoLayout['direction'];
|
|
1026
|
+
rankSep?: number;
|
|
1027
|
+
nodeSep?: number;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* v1 Manual layout of a view, stored in the block comment to the view definition.
|
|
1031
|
+
* Keeping this type for backward compatibility and migration purposes.
|
|
1032
|
+
*
|
|
1033
|
+
* @deprecated Use {@link ViewManualLayoutSnapshot} instead
|
|
1034
|
+
*/
|
|
1035
|
+
type ViewManualLayout = {
|
|
1036
|
+
readonly hash: string;
|
|
1037
|
+
readonly x: number;
|
|
1038
|
+
readonly y: number;
|
|
1039
|
+
readonly width: number;
|
|
1040
|
+
readonly height: number;
|
|
1041
|
+
readonly autoLayout: ViewAutoLayout;
|
|
1042
|
+
readonly nodes: Record<string, {
|
|
1043
|
+
isCompound: boolean;
|
|
1044
|
+
x: number;
|
|
1045
|
+
y: number;
|
|
1046
|
+
width: number;
|
|
1047
|
+
height: number;
|
|
1048
|
+
}>;
|
|
1049
|
+
readonly edges: Record<string, {
|
|
1050
|
+
points: NonEmptyArray<Point>;
|
|
1051
|
+
controlPoints?: NonEmptyArray<XYPoint>;
|
|
1052
|
+
labelBBox?: BBox;
|
|
1053
|
+
}>;
|
|
1054
|
+
};
|
|
1055
|
+
type ViewType = 'element' | 'dynamic' | 'deployment';
|
|
1056
|
+
interface BaseViewProperties<A extends Any> extends WithOptionalTags<A>, WithOptionalLinks {
|
|
1057
|
+
readonly id: StrictViewId<A>;
|
|
1058
|
+
readonly title: string | null;
|
|
1059
|
+
readonly description: MarkdownOrString | null;
|
|
110
1060
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
1061
|
+
* Source file containing this view, relative to the project root.
|
|
1062
|
+
* Undefined if the view is auto-generated.
|
|
113
1063
|
*/
|
|
114
|
-
|
|
1064
|
+
readonly sourcePath?: string | undefined;
|
|
1065
|
+
}
|
|
1066
|
+
interface BaseParsedViewProperties<A extends Any> extends BaseViewProperties<A> {
|
|
115
1067
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
1068
|
+
* Internal field to identify the stage of the view.
|
|
1069
|
+
* This is used to create the correct type of the view.
|
|
118
1070
|
*/
|
|
119
|
-
|
|
1071
|
+
readonly [_stage]: 'parsed';
|
|
120
1072
|
/**
|
|
121
|
-
*
|
|
1073
|
+
* URI to the source file of this view.
|
|
1074
|
+
* Undefined if the view is auto-generated.
|
|
122
1075
|
*/
|
|
123
|
-
|
|
1076
|
+
readonly docUri?: string | undefined;
|
|
1077
|
+
}
|
|
1078
|
+
type NodeNotation = {
|
|
1079
|
+
kinds: string[];
|
|
1080
|
+
shape: ElementShape;
|
|
1081
|
+
color: Color;
|
|
1082
|
+
title: string;
|
|
1083
|
+
};
|
|
1084
|
+
interface ViewWithNotation {
|
|
1085
|
+
notation?: {
|
|
1086
|
+
nodes: NodeNotation[];
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
interface ViewWithHash {
|
|
124
1090
|
/**
|
|
125
|
-
*
|
|
1091
|
+
* Hash of the view object.
|
|
1092
|
+
* This is used to detect changes in layout
|
|
126
1093
|
*/
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
1094
|
+
hash: string;
|
|
1095
|
+
}
|
|
1096
|
+
//#endregion
|
|
1097
|
+
//#region src/types/view-parsed.element.d.ts
|
|
1098
|
+
/**
|
|
1099
|
+
* Predicates scoped to logical model
|
|
1100
|
+
*/
|
|
1101
|
+
interface ElementViewIncludePredicate<A extends Any = Any> extends AnyIncludePredicate<ModelExpression<A>> {}
|
|
1102
|
+
interface ElementViewExcludePredicate<A extends Any = Any> extends AnyExcludePredicate<ModelExpression<A>> {}
|
|
1103
|
+
type ElementViewPredicate<A extends Any = Any> = ElementViewIncludePredicate<A> | ElementViewExcludePredicate<A>;
|
|
1104
|
+
interface ElementViewRuleGroup<A extends Any = Any> {
|
|
1105
|
+
groupRules: Array<ElementViewPredicate<A> | ElementViewRuleGroup<A>>;
|
|
1106
|
+
title: string | null;
|
|
1107
|
+
color?: Color;
|
|
1108
|
+
border?: BorderStyle;
|
|
1109
|
+
opacity?: number;
|
|
1110
|
+
multiple?: boolean;
|
|
1111
|
+
size?: ShapeSize;
|
|
1112
|
+
padding?: SpacingSize;
|
|
1113
|
+
textSize?: TextSize;
|
|
1114
|
+
}
|
|
1115
|
+
declare function isViewRuleGroup<A extends Any>(rule: ElementViewRule<A>): rule is ElementViewRuleGroup<A>;
|
|
1116
|
+
interface ElementViewRuleStyle<A extends Any = Any> extends AnyViewRuleStyle<ModelFqnExpr<A>> {}
|
|
1117
|
+
interface ElementViewRuleRank<A extends Any = Any> extends ViewRuleRank<ModelFqnExpr<A>> {}
|
|
1118
|
+
declare function isViewRuleRank<A extends Any>(rule: ElementViewRule<A>): rule is ElementViewRuleRank<A>;
|
|
1119
|
+
type ElementViewRule<A extends Any = Any> = ExclusiveUnion<{
|
|
1120
|
+
IncludePredicate: ElementViewIncludePredicate<A>;
|
|
1121
|
+
ExcludePredicate: ElementViewExcludePredicate<A>;
|
|
1122
|
+
Group: ElementViewRuleGroup<A>;
|
|
1123
|
+
Style: ElementViewRuleStyle<A>;
|
|
1124
|
+
GlobalStyle: ViewRuleGlobalStyle;
|
|
1125
|
+
GlobalPredicateRef: ViewRuleGlobalPredicateRef;
|
|
1126
|
+
AutoLayout: ViewRuleAutoLayout;
|
|
1127
|
+
Rank: ElementViewRuleRank<A>;
|
|
1128
|
+
}>;
|
|
1129
|
+
interface ParsedElementView<A extends Any = Any> extends BaseParsedViewProperties<A> {
|
|
1130
|
+
[_type]: 'element';
|
|
1131
|
+
readonly rules: ElementViewRule<A>[];
|
|
1132
|
+
readonly viewOf?: Fqn<A>;
|
|
1133
|
+
readonly extends?: StrictViewId<A>;
|
|
1134
|
+
}
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region src/types/view-parsed.dynamic.d.ts
|
|
1137
|
+
interface DynamicStep<A extends Any = Any> {
|
|
1138
|
+
readonly source: Fqn<A>;
|
|
1139
|
+
readonly target: Fqn<A>;
|
|
1140
|
+
readonly title?: string | null;
|
|
1141
|
+
readonly kind?: RelationKind<A>;
|
|
1142
|
+
readonly description?: MarkdownOrString;
|
|
1143
|
+
readonly technology?: string;
|
|
1144
|
+
readonly notation?: string;
|
|
1145
|
+
readonly notes?: MarkdownOrString;
|
|
1146
|
+
readonly color?: Color;
|
|
1147
|
+
readonly line?: RelationshipLineType;
|
|
1148
|
+
readonly head?: RelationshipArrowType;
|
|
1149
|
+
readonly tail?: RelationshipArrowType;
|
|
1150
|
+
readonly isBackward?: boolean;
|
|
1151
|
+
readonly navigateTo?: StrictViewId<A>;
|
|
134
1152
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* @param relations - A readonly set of `RelationshipModel` instances representing the new relations.
|
|
138
|
-
* @returns A new `ConnectionModel` instance with the updated relations.
|
|
1153
|
+
* Path to the AST node relative to the view body ast
|
|
1154
|
+
* Used to locate the step in the source code
|
|
139
1155
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1156
|
+
readonly astPath: string;
|
|
1157
|
+
}
|
|
1158
|
+
interface DynamicStepsSeries<A extends Any = Any> {
|
|
1159
|
+
readonly seriesId: string;
|
|
1160
|
+
readonly __series: NonEmptyReadonlyArray<DynamicStep<A>>;
|
|
1161
|
+
}
|
|
1162
|
+
interface DynamicStepsParallel<A extends Any = Any> {
|
|
1163
|
+
readonly parallelId: string;
|
|
1164
|
+
readonly __parallel: NonEmptyReadonlyArray<DynamicStep<A> | DynamicStepsSeries<A>>;
|
|
1165
|
+
}
|
|
1166
|
+
declare function getParallelStepsPrefix(id: string): string | null;
|
|
1167
|
+
type DynamicViewStep<A extends Any = Any> = ExclusiveUnion<{
|
|
1168
|
+
Step: DynamicStep<A>;
|
|
1169
|
+
Series: DynamicStepsSeries<A>;
|
|
1170
|
+
Parallel: DynamicStepsParallel<A>;
|
|
1171
|
+
}>;
|
|
1172
|
+
declare function isDynamicStep<A extends Any>(step: DynamicViewStep<A> | undefined): step is DynamicStep<A>;
|
|
1173
|
+
declare function isDynamicStepsParallel<A extends Any>(step: DynamicViewStep<A> | undefined): step is DynamicStepsParallel<A>;
|
|
1174
|
+
declare function isDynamicStepsSeries<A extends Any>(step: DynamicViewStep<A> | undefined): step is DynamicStepsSeries<A>;
|
|
1175
|
+
interface DynamicViewIncludeRule<A extends Any = Any> {
|
|
1176
|
+
include: ModelFqnExpr.Any<A>[];
|
|
1177
|
+
}
|
|
1178
|
+
type DynamicViewRule<A extends Any = Any> = ExclusiveUnion<{
|
|
1179
|
+
Include: DynamicViewIncludeRule<A>;
|
|
1180
|
+
GlobalPredicateRef: ViewRuleGlobalPredicateRef;
|
|
1181
|
+
ElementViewRuleStyle: ElementViewRuleStyle<A>;
|
|
1182
|
+
GlobalStyle: ViewRuleGlobalStyle;
|
|
1183
|
+
AutoLayout: ViewRuleAutoLayout;
|
|
1184
|
+
}>;
|
|
1185
|
+
type DynamicViewDisplayVariant = 'diagram' | 'sequence';
|
|
1186
|
+
interface ParsedDynamicView<A extends Any = Any> extends BaseParsedViewProperties<A> {
|
|
1187
|
+
[_type]: 'dynamic';
|
|
143
1188
|
/**
|
|
144
|
-
*
|
|
1189
|
+
* How to display the dynamic view
|
|
1190
|
+
* - `diagram`: display as a regular likec4 view
|
|
1191
|
+
* - `sequence`: display as a sequence diagram
|
|
1192
|
+
*
|
|
1193
|
+
* @default 'diagram'
|
|
145
1194
|
*/
|
|
146
|
-
|
|
1195
|
+
readonly variant?: DynamicViewDisplayVariant;
|
|
1196
|
+
readonly steps: DynamicViewStep<A>[];
|
|
1197
|
+
readonly rules: DynamicViewRule<A>[];
|
|
1198
|
+
}
|
|
1199
|
+
//#endregion
|
|
1200
|
+
//#region src/types/global.d.ts
|
|
1201
|
+
type GlobalPredicateId = Tagged<string, 'GlobalPredicateId'>;
|
|
1202
|
+
type GlobalPredicates<A extends Any = Any> = NonEmptyArray<ElementViewPredicate<A>>;
|
|
1203
|
+
type GlobalDynamicPredicates<A extends Any = Any> = NonEmptyArray<DynamicViewIncludeRule<A>>;
|
|
1204
|
+
type GlobalStyleID = Tagged<string, 'GlobalStyleID'>;
|
|
1205
|
+
type GlobalStyles<A extends Any = Any> = NonEmptyArray<ElementViewRuleStyle<A>>;
|
|
1206
|
+
interface ModelGlobals<A extends Any = Any> {
|
|
1207
|
+
readonly predicates: Record<GlobalPredicateId, GlobalPredicates<A>>;
|
|
1208
|
+
readonly dynamicPredicates: Record<GlobalPredicateId, GlobalDynamicPredicates<A>>;
|
|
1209
|
+
readonly styles: Record<GlobalStyleID, GlobalStyles<A>>;
|
|
147
1210
|
}
|
|
148
1211
|
//#endregion
|
|
149
|
-
//#region src/model
|
|
1212
|
+
//#region src/types/model-logical.d.ts
|
|
1213
|
+
interface ElementStyle {
|
|
1214
|
+
readonly icon?: Icon;
|
|
1215
|
+
readonly iconColor?: Color;
|
|
1216
|
+
readonly iconSize?: IconSize;
|
|
1217
|
+
readonly iconPosition?: IconPosition;
|
|
1218
|
+
readonly shape?: ElementShape;
|
|
1219
|
+
readonly color?: Color;
|
|
1220
|
+
readonly border?: BorderStyle;
|
|
1221
|
+
/**
|
|
1222
|
+
* In percentage 0-100, 0 is fully transparent
|
|
1223
|
+
*
|
|
1224
|
+
* @default 100
|
|
1225
|
+
*/
|
|
1226
|
+
readonly opacity?: number;
|
|
1227
|
+
/**
|
|
1228
|
+
* If true, the element is rendered as multiple shapes
|
|
1229
|
+
* @default false
|
|
1230
|
+
*/
|
|
1231
|
+
readonly multiple?: boolean;
|
|
1232
|
+
/**
|
|
1233
|
+
* Shape size
|
|
1234
|
+
*
|
|
1235
|
+
* @default 'md'
|
|
1236
|
+
*/
|
|
1237
|
+
readonly size?: ShapeSize;
|
|
1238
|
+
readonly padding?: SpacingSize;
|
|
1239
|
+
readonly textSize?: TextSize;
|
|
1240
|
+
}
|
|
1241
|
+
type WithSizes = Pick<ElementStyle, 'size' | 'padding' | 'textSize' | 'iconSize'>;
|
|
150
1242
|
/**
|
|
151
|
-
*
|
|
152
|
-
* (i.e. between descendants)
|
|
1243
|
+
* Ensures that the sizes are set to default values if they are not set
|
|
153
1244
|
*/
|
|
154
|
-
declare function
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
1245
|
+
declare function ensureSizes<S extends WithSizes>({
|
|
1246
|
+
size,
|
|
1247
|
+
padding,
|
|
1248
|
+
textSize,
|
|
1249
|
+
iconSize,
|
|
1250
|
+
...rest
|
|
1251
|
+
}: S, defaultSize?: "xs" | "sm" | "md" | "lg" | "xl"): Omit<S, keyof WithSizes> & Required<WithSizes>;
|
|
1252
|
+
interface Element<A extends Any = Any> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
|
|
1253
|
+
readonly id: Fqn<A>;
|
|
1254
|
+
readonly kind: ElementKind<A>;
|
|
1255
|
+
readonly title: string;
|
|
1256
|
+
readonly style: ElementStyle;
|
|
1257
|
+
}
|
|
1258
|
+
interface AbstractRelationship<A extends Any> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A> {
|
|
1259
|
+
readonly id: RelationId$1;
|
|
1260
|
+
readonly title?: string | null;
|
|
1261
|
+
readonly kind?: RelationKind<A>;
|
|
1262
|
+
readonly color?: Color;
|
|
1263
|
+
readonly line?: RelationshipLineType;
|
|
1264
|
+
readonly head?: RelationshipArrowType;
|
|
1265
|
+
readonly tail?: RelationshipArrowType;
|
|
1266
|
+
readonly navigateTo?: StrictViewId<A>;
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Relationship between two model elements
|
|
1270
|
+
*/
|
|
1271
|
+
interface Relationship<A extends Any = Any> extends AbstractRelationship<A> {
|
|
1272
|
+
readonly source: FqnRef.ModelRef<A>;
|
|
1273
|
+
readonly target: FqnRef.ModelRef<A>;
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Backward compatibility alias
|
|
1277
|
+
* @deprecated Use {@link Relationship} instead
|
|
1278
|
+
*/
|
|
1279
|
+
type ModelRelation<A extends Any = Any> = Relationship<A>;
|
|
1280
|
+
//#endregion
|
|
1281
|
+
//#region src/types/model-deployment.d.ts
|
|
1282
|
+
interface DeploymentNode<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
|
|
1283
|
+
element?: never;
|
|
1284
|
+
readonly id: DeploymentFqn<A>;
|
|
1285
|
+
readonly kind: DeploymentKind<A>;
|
|
1286
|
+
readonly title: string;
|
|
1287
|
+
readonly style: ElementStyle;
|
|
1288
|
+
}
|
|
1289
|
+
interface DeployedInstance<A extends Any = Unknown> extends WithDescriptionAndTech, WithOptionalTags<A>, WithOptionalLinks, WithMetadata<A>, WithNotation {
|
|
1290
|
+
kind?: never;
|
|
1291
|
+
/**
|
|
1292
|
+
* Format: `<DeploymentNode Fqn>.<Instance Id>`
|
|
1293
|
+
* i.e parent fqn is deployment target
|
|
1294
|
+
*/
|
|
1295
|
+
readonly id: DeploymentFqn<A>;
|
|
1296
|
+
readonly element: Fqn<A>;
|
|
1297
|
+
readonly title?: string;
|
|
1298
|
+
readonly style: ElementStyle;
|
|
1299
|
+
}
|
|
1300
|
+
type DeploymentElement<A extends Any = Unknown> = DeploymentNode<A> | DeployedInstance<A>;
|
|
1301
|
+
type DeploymentElementRef$1<A extends Any = Unknown> = {
|
|
1302
|
+
readonly id: DeploymentFqn<A>;
|
|
1303
|
+
readonly element?: Fqn<A>;
|
|
170
1304
|
};
|
|
171
|
-
declare function
|
|
172
|
-
declare function
|
|
1305
|
+
declare function isDeploymentNode<A extends Any>(el: DeploymentElement<A>): el is DeploymentNode<A>;
|
|
1306
|
+
declare function isDeployedInstance<A extends Any>(el: DeploymentElement<A>): el is DeployedInstance<A>;
|
|
173
1307
|
/**
|
|
174
|
-
*
|
|
1308
|
+
* Relationship in deployment model
|
|
175
1309
|
*/
|
|
176
|
-
|
|
1310
|
+
interface DeploymentRelationship<A extends Any = Unknown> extends AbstractRelationship<A> {
|
|
1311
|
+
readonly source: FqnRef.DeploymentRef<A>;
|
|
1312
|
+
readonly target: FqnRef.DeploymentRef<A>;
|
|
1313
|
+
}
|
|
177
1314
|
/**
|
|
178
|
-
*
|
|
1315
|
+
* Backward compatibility alias
|
|
1316
|
+
* @deprecated Use {@link DeploymentRelationship} instead
|
|
179
1317
|
*/
|
|
180
|
-
|
|
181
|
-
|
|
1318
|
+
type DeploymentRelation<A extends Any = Unknown> = DeploymentRelationship<A>;
|
|
1319
|
+
//#endregion
|
|
1320
|
+
//#region src/types/model-spec.d.ts
|
|
182
1321
|
/**
|
|
183
|
-
*
|
|
184
|
-
* The output maintains the same order as the input.
|
|
1322
|
+
* Element and deployment kind specification
|
|
185
1323
|
*/
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
1324
|
+
interface ElementSpecification {
|
|
1325
|
+
tags?: Tag$1[];
|
|
1326
|
+
title?: string;
|
|
1327
|
+
summary?: MarkdownOrString;
|
|
1328
|
+
description?: MarkdownOrString;
|
|
1329
|
+
technology?: string;
|
|
1330
|
+
notation?: string;
|
|
1331
|
+
links?: NonEmptyArray<Link>;
|
|
1332
|
+
style: {
|
|
1333
|
+
shape?: ElementShape;
|
|
1334
|
+
icon?: Icon;
|
|
1335
|
+
iconColor?: Color;
|
|
1336
|
+
iconSize?: ShapeSize;
|
|
1337
|
+
iconPosition?: IconPosition;
|
|
1338
|
+
color?: Color;
|
|
1339
|
+
border?: BorderStyle;
|
|
1340
|
+
opacity?: number;
|
|
1341
|
+
size?: ShapeSize;
|
|
1342
|
+
padding?: SpacingSize;
|
|
1343
|
+
textSize?: TextSize;
|
|
1344
|
+
multiple?: boolean;
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
interface TagSpecification {
|
|
1348
|
+
color: ThemeColor | ColorLiteral;
|
|
1349
|
+
}
|
|
1350
|
+
/**
|
|
1351
|
+
* Checks if tag color is defined in the specification
|
|
1352
|
+
* Expects HEX, `rgb(...)` or `rgba(...)` color
|
|
1353
|
+
*/
|
|
1354
|
+
declare function isTagColorSpecified(spec: string | TagSpecification): spec is {
|
|
1355
|
+
color: ColorLiteral;
|
|
199
1356
|
};
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
1357
|
+
interface RelationshipSpecification {
|
|
1358
|
+
technology?: string;
|
|
1359
|
+
notation?: string;
|
|
1360
|
+
color?: Color;
|
|
1361
|
+
line?: RelationshipLineType;
|
|
1362
|
+
head?: RelationshipArrowType;
|
|
1363
|
+
tail?: RelationshipArrowType;
|
|
1364
|
+
}
|
|
1365
|
+
type Specification<A> = A extends Any ? {
|
|
1366
|
+
tags: { [key in Tag<A>]: TagSpecification };
|
|
1367
|
+
elements: { [key in ElementKind<A>]: Partial<ElementSpecification> };
|
|
1368
|
+
deployments: { [key in DeploymentKind<A>]: Partial<ElementSpecification> };
|
|
1369
|
+
relationships: { [key in RelationKind<A>]: Partial<RelationshipSpecification> };
|
|
1370
|
+
metadataKeys?: IsNever<MetadataKey<A>> extends true ? never : MetadataKey<A>[];
|
|
1371
|
+
customColors?: CustomColorDefinitions;
|
|
1372
|
+
} : never;
|
|
1373
|
+
//#endregion
|
|
1374
|
+
//#region src/types/project.d.ts
|
|
1375
|
+
type LikeC4ProjectTheme = PartialDeep<WritableDeep<LikeC4Theme>, {
|
|
1376
|
+
recurseIntoArrays: false;
|
|
1377
|
+
allowUndefinedInNonTupleArrays: false;
|
|
1378
|
+
}>;
|
|
1379
|
+
type LikeC4ProjectStyleDefaults = PartialDeep<WritableDeep<LikeC4StyleDefaults>, {
|
|
1380
|
+
recurseIntoArrays: false;
|
|
1381
|
+
allowUndefinedInNonTupleArrays: false;
|
|
1382
|
+
}>;
|
|
1383
|
+
interface LikeC4ProjectStylesCustomStylesheets {
|
|
1384
|
+
/**
|
|
1385
|
+
* List of paths to CSS files, relative to the project root
|
|
1386
|
+
* (available in LSP, but not in dumped JSON)
|
|
1387
|
+
*/
|
|
1388
|
+
paths?: string[];
|
|
1389
|
+
/**
|
|
1390
|
+
* Merged CSS
|
|
1391
|
+
*/
|
|
1392
|
+
content: string;
|
|
1393
|
+
}
|
|
1394
|
+
interface LikeC4ProjectStylesConfig {
|
|
1395
|
+
theme?: LikeC4ProjectTheme;
|
|
1396
|
+
defaults?: LikeC4ProjectStyleDefaults;
|
|
1397
|
+
customCss?: LikeC4ProjectStylesCustomStylesheets;
|
|
1398
|
+
}
|
|
1399
|
+
interface LikeC4ProjectManualLayoutsConfig {
|
|
1400
|
+
outDir: string;
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* Configuration of the project, as read from the config file.
|
|
1404
|
+
* LikeC4 projects encapsulate models, and can import from each other
|
|
214
1405
|
*/
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
1406
|
+
interface LikeC4Project {
|
|
1407
|
+
/**
|
|
1408
|
+
* ID of the project, casted to {@link ProjectId}
|
|
1409
|
+
*/
|
|
1410
|
+
readonly id: ProjectId$1;
|
|
1411
|
+
/**
|
|
1412
|
+
* Title of the project
|
|
1413
|
+
*/
|
|
1414
|
+
title?: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* Custom styles
|
|
1417
|
+
*/
|
|
1418
|
+
styles?: LikeC4ProjectStylesConfig | undefined;
|
|
1419
|
+
/**
|
|
1420
|
+
* Configuration for manual layouts snapshots
|
|
1421
|
+
*/
|
|
1422
|
+
manualLayouts?: LikeC4ProjectManualLayoutsConfig | undefined;
|
|
1423
|
+
/**
|
|
1424
|
+
* Automatically derive element technology from icon name
|
|
1425
|
+
* when technology is not explicitly set.
|
|
1426
|
+
* Applies to aws:, azure:, gcp:, and tech: icons.
|
|
1427
|
+
* Defaults to true.
|
|
1428
|
+
*/
|
|
1429
|
+
inferTechnologyFromIcon?: boolean | undefined;
|
|
1430
|
+
}
|
|
1431
|
+
//#endregion
|
|
1432
|
+
//#region src/types/view-computed.d.ts
|
|
1433
|
+
type ComputedNodeStyle = Simplify<ElementStyle & {
|
|
1434
|
+
icon?: never;
|
|
1435
|
+
shape?: never;
|
|
1436
|
+
color?: never;
|
|
1437
|
+
}>;
|
|
1438
|
+
interface ComputedNode<A extends Any = Any> extends WithTags<A>, WithOptionalLinks {
|
|
1439
|
+
id: NodeId$1;
|
|
1440
|
+
kind: ElementKind<A> | DeploymentKind<A> | '@group';
|
|
1441
|
+
parent: NodeId$1 | null;
|
|
1442
|
+
/**
|
|
1443
|
+
* Reference to model element
|
|
1444
|
+
*/
|
|
1445
|
+
modelRef?: Fqn<A>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Reference to deployment element
|
|
1448
|
+
*/
|
|
1449
|
+
deploymentRef?: DeploymentFqn<A>;
|
|
1450
|
+
title: string;
|
|
1451
|
+
/**
|
|
1452
|
+
* Description of the node
|
|
1453
|
+
* either summary or description
|
|
1454
|
+
*/
|
|
1455
|
+
description?: MarkdownOrString | null;
|
|
1456
|
+
technology?: string | null;
|
|
1457
|
+
children: NodeId$1[];
|
|
1458
|
+
inEdges: EdgeId$1[];
|
|
1459
|
+
outEdges: EdgeId$1[];
|
|
1460
|
+
shape: ElementShape;
|
|
1461
|
+
color: Color;
|
|
1462
|
+
icon?: Icon | null;
|
|
1463
|
+
style: ComputedNodeStyle;
|
|
1464
|
+
navigateTo?: StrictViewId<A> | null;
|
|
1465
|
+
level: number;
|
|
1466
|
+
depth?: number | null;
|
|
1467
|
+
/**
|
|
1468
|
+
* If this node was customized in the view
|
|
1469
|
+
*/
|
|
1470
|
+
isCustomized?: boolean;
|
|
1471
|
+
notation?: string | null;
|
|
1472
|
+
notes?: MarkdownOrString | undefined;
|
|
1473
|
+
}
|
|
1474
|
+
interface ComputedEdge<A extends Any = Any> extends WithOptionalTags<A> {
|
|
1475
|
+
id: EdgeId$1;
|
|
1476
|
+
parent: NodeId$1 | null;
|
|
1477
|
+
source: NodeId$1;
|
|
1478
|
+
target: NodeId$1;
|
|
1479
|
+
label: string | null;
|
|
1480
|
+
description?: MarkdownOrString | null;
|
|
1481
|
+
technology?: string | null;
|
|
1482
|
+
relations: RelationId$1[];
|
|
1483
|
+
kind?: RelationKind<A> | typeof StepEdgeKind;
|
|
1484
|
+
notation?: string;
|
|
1485
|
+
notes?: MarkdownOrString;
|
|
1486
|
+
color: Color;
|
|
1487
|
+
line: RelationshipLineType;
|
|
1488
|
+
head?: RelationshipArrowType;
|
|
1489
|
+
tail?: RelationshipArrowType;
|
|
1490
|
+
navigateTo?: StrictViewId<A> | null;
|
|
1491
|
+
/**
|
|
1492
|
+
* If this edge is derived from custom relationship predicate
|
|
1493
|
+
*/
|
|
1494
|
+
isCustomized?: boolean;
|
|
1495
|
+
/**
|
|
1496
|
+
* Path to the AST node relative to the view body ast
|
|
1497
|
+
* Available only in dynamic views
|
|
1498
|
+
* @internal
|
|
1499
|
+
*/
|
|
1500
|
+
astPath?: string;
|
|
1501
|
+
/**
|
|
1502
|
+
* For layouting purposes
|
|
1503
|
+
* @default 'forward'
|
|
1504
|
+
*/
|
|
1505
|
+
dir?: 'forward' | 'back' | 'both';
|
|
1506
|
+
}
|
|
1507
|
+
interface ComputedRankConstraint {
|
|
1508
|
+
type: RankValue;
|
|
1509
|
+
nodes: NodeId$1[];
|
|
1510
|
+
}
|
|
1511
|
+
interface BaseComputedViewProperties<A extends Any> extends BaseViewProperties<A>, ViewWithHash, ViewWithNotation {
|
|
1512
|
+
readonly [_stage]: 'computed';
|
|
1513
|
+
readonly autoLayout: ViewAutoLayout;
|
|
1514
|
+
readonly nodes: ReadonlyArray<ComputedNode<A>>;
|
|
1515
|
+
readonly edges: ReadonlyArray<ComputedEdge<A>>;
|
|
1516
|
+
/**
|
|
1517
|
+
* If the view has manual layout (v2)
|
|
1518
|
+
*/
|
|
1519
|
+
readonly hasManualLayout?: boolean;
|
|
1520
|
+
/**
|
|
1521
|
+
* Manual layout data (v1), for compatibility during migration
|
|
1522
|
+
* @deprecated
|
|
1523
|
+
*/
|
|
1524
|
+
readonly manualLayout?: ViewManualLayout | undefined;
|
|
1525
|
+
}
|
|
1526
|
+
interface ComputedElementView<A extends Any = Any> extends BaseComputedViewProperties<A> {
|
|
1527
|
+
readonly [_type]: 'element';
|
|
1528
|
+
readonly viewOf?: Fqn<A>;
|
|
1529
|
+
readonly extends?: StrictViewId<A>;
|
|
1530
|
+
readonly ranks?: ComputedRankConstraint[];
|
|
1531
|
+
}
|
|
1532
|
+
interface ComputedDeploymentView<A extends Any = Any> extends BaseComputedViewProperties<A> {
|
|
1533
|
+
readonly [_type]: 'deployment';
|
|
1534
|
+
}
|
|
1535
|
+
interface ComputedDynamicView<A extends Any = Any> extends BaseComputedViewProperties<A> {
|
|
1536
|
+
readonly [_type]: 'dynamic';
|
|
1537
|
+
/**
|
|
1538
|
+
* How to display the dynamic view
|
|
1539
|
+
* - `diagram`: display as a regular likec4 view
|
|
1540
|
+
* - `sequence`: display as a sequence diagram
|
|
1541
|
+
*/
|
|
1542
|
+
readonly variant: DynamicViewDisplayVariant;
|
|
1543
|
+
}
|
|
1544
|
+
//#endregion
|
|
1545
|
+
//#region src/types/view-manual-layout.d.ts
|
|
1546
|
+
type LayoutedViewDriftReason = 'not-exists' | 'type-changed' | 'nodes-added' | 'nodes-removed' | 'nodes-drift' | 'edges-added' | 'edges-removed' | 'edges-drift';
|
|
1547
|
+
type DiagramNodeDriftReason = 'removed' | 'added' | 'label-changed' | 'modelRef-changed' | 'parent-changed' | 'children-changed' | 'became-compound' | 'became-leaf' | 'shape-changed';
|
|
1548
|
+
type DiagramEdgeDriftReason = 'removed' | 'added' | 'label-added' | 'label-removed' | 'label-changed' | 'notes-changed' | 'direction-changed' | 'source-changed' | 'target-changed';
|
|
1549
|
+
type ViewManualLayoutSnapshotPerType = {
|
|
1550
|
+
readonly [_type]: 'element';
|
|
1551
|
+
readonly viewOf?: Fqn$1;
|
|
1552
|
+
readonly extends?: ViewId$1;
|
|
1553
|
+
} | {
|
|
1554
|
+
readonly [_type]: 'deployment';
|
|
1555
|
+
} | {
|
|
1556
|
+
readonly [_type]: 'dynamic';
|
|
1557
|
+
readonly sequenceLayout: LayoutedDynamicView.Sequence.Layout;
|
|
1558
|
+
};
|
|
1559
|
+
type ViewManualLayoutSnapshot<Type extends ViewType = ViewType> = Simplify<ViewManualLayoutSnapshotPerType & {
|
|
1560
|
+
readonly id: ViewId$1;
|
|
1561
|
+
readonly title: string | null;
|
|
1562
|
+
readonly description: MarkdownOrString | null;
|
|
1563
|
+
readonly [_type]: Type;
|
|
1564
|
+
readonly [_stage]: 'layouted';
|
|
1565
|
+
readonly hash: string;
|
|
1566
|
+
readonly nodes: ReadonlyArray<DiagramNode>;
|
|
1567
|
+
readonly edges: ReadonlyArray<DiagramEdge>;
|
|
1568
|
+
readonly bounds: BBox;
|
|
1569
|
+
readonly autoLayout: ViewAutoLayout;
|
|
1570
|
+
} & ViewWithNotation>;
|
|
1571
|
+
//#endregion
|
|
1572
|
+
//#region src/types/view-layouted.d.ts
|
|
1573
|
+
interface DiagramNode<A extends Any = Any> extends ComputedNode<A>, BBox {
|
|
1574
|
+
/**
|
|
1575
|
+
* Absolute X coordinate
|
|
1576
|
+
*/
|
|
1577
|
+
x: number;
|
|
1578
|
+
/**
|
|
1579
|
+
* Absolute Y coordinate
|
|
1580
|
+
*/
|
|
1581
|
+
y: number;
|
|
1582
|
+
width: number;
|
|
1583
|
+
height: number;
|
|
1584
|
+
/**
|
|
1585
|
+
* Bounding box of label
|
|
1586
|
+
* (Absolute coordinates)
|
|
1587
|
+
*/
|
|
1588
|
+
labelBBox: BBox;
|
|
1589
|
+
/**
|
|
1590
|
+
* List of reasons causing node drift
|
|
1591
|
+
*/
|
|
1592
|
+
drifts?: NonEmptyReadonlyArray<DiagramNodeDriftReason> | null;
|
|
1593
|
+
}
|
|
1594
|
+
interface DiagramEdge<A extends Any = Any> extends ComputedEdge<A> {
|
|
1595
|
+
/**
|
|
1596
|
+
* Bezier points
|
|
1597
|
+
* (Absolute coordinates)
|
|
1598
|
+
*/
|
|
1599
|
+
points: NonEmptyArray<Point>;
|
|
1600
|
+
/**
|
|
1601
|
+
* Control points to adjust the edge
|
|
1602
|
+
* (Absolute coordinates)
|
|
1603
|
+
*/
|
|
1604
|
+
controlPoints?: NonEmptyArray<XYPoint> | null;
|
|
1605
|
+
/**
|
|
1606
|
+
* Bounding box of label
|
|
1607
|
+
* (Absolute coordinates)
|
|
1608
|
+
*/
|
|
1609
|
+
labelBBox?: BBox | null;
|
|
1610
|
+
/**
|
|
1611
|
+
* List of reasons causing edge drift
|
|
1612
|
+
*/
|
|
1613
|
+
drifts?: NonEmptyReadonlyArray<DiagramEdgeDriftReason> | null;
|
|
1614
|
+
}
|
|
218
1615
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
* @default direction both
|
|
1616
|
+
* Type of the layout
|
|
1617
|
+
* - `auto`: auto-layouted from the current sources
|
|
1618
|
+
* - `manual`: read from the manually layouted snapshot
|
|
223
1619
|
*/
|
|
224
|
-
|
|
1620
|
+
type LayoutType = 'auto' | 'manual';
|
|
1621
|
+
interface BaseLayoutedViewProperties<A extends Any> extends BaseViewProperties<A>, ViewWithHash, ViewWithNotation {
|
|
1622
|
+
readonly [_stage]: 'layouted';
|
|
1623
|
+
/**
|
|
1624
|
+
* If undefined, view does not have any manual layouts, and is auto-layouted
|
|
1625
|
+
*/
|
|
1626
|
+
readonly [_layout]?: LayoutType;
|
|
1627
|
+
readonly autoLayout: ViewAutoLayout;
|
|
1628
|
+
readonly nodes: ReadonlyArray<DiagramNode<A>>;
|
|
1629
|
+
readonly edges: ReadonlyArray<DiagramEdge<A>>;
|
|
1630
|
+
readonly bounds: BBox;
|
|
1631
|
+
/**
|
|
1632
|
+
* If diagram has manual layout
|
|
1633
|
+
* But was changed and layout should be recalculated
|
|
1634
|
+
* @deprecated manual layout v2 uses {@link drifts}
|
|
1635
|
+
*/
|
|
1636
|
+
readonly hasLayoutDrift?: boolean;
|
|
1637
|
+
/**
|
|
1638
|
+
* List of reasons causing layout drift
|
|
1639
|
+
* If undefined or null, there is no layout drift or view is auto-layouted
|
|
1640
|
+
*/
|
|
1641
|
+
readonly drifts?: NonEmptyReadonlyArray<LayoutedViewDriftReason> | null;
|
|
1642
|
+
}
|
|
1643
|
+
interface LayoutedElementView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
|
|
1644
|
+
readonly [_type]: 'element';
|
|
1645
|
+
readonly viewOf?: Fqn<A>;
|
|
1646
|
+
readonly extends?: StrictViewId<A>;
|
|
1647
|
+
}
|
|
1648
|
+
interface LayoutedDeploymentView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
|
|
1649
|
+
readonly [_type]: 'deployment';
|
|
1650
|
+
}
|
|
1651
|
+
interface LayoutedDynamicView<A extends Any = Any> extends BaseLayoutedViewProperties<A> {
|
|
1652
|
+
readonly [_type]: 'dynamic';
|
|
1653
|
+
/**
|
|
1654
|
+
* Default variant of this dynamic view
|
|
1655
|
+
* - `diagram`: display as a regular likec4 view (default if not specified)
|
|
1656
|
+
* - `sequence`: display as a sequence diagram
|
|
1657
|
+
*/
|
|
1658
|
+
readonly variant: DynamicViewDisplayVariant;
|
|
1659
|
+
/**
|
|
1660
|
+
* Sequence layout of this dynamic view
|
|
1661
|
+
*/
|
|
1662
|
+
readonly sequenceLayout: LayoutedDynamicView.Sequence.Layout;
|
|
1663
|
+
}
|
|
1664
|
+
declare namespace LayoutedDynamicView {
|
|
1665
|
+
namespace Sequence {
|
|
1666
|
+
interface ActorPort {
|
|
1667
|
+
readonly id: string;
|
|
1668
|
+
readonly cx: number;
|
|
1669
|
+
readonly cy: number;
|
|
1670
|
+
readonly height: number;
|
|
1671
|
+
readonly type: 'target' | 'source';
|
|
1672
|
+
readonly position: 'left' | 'right' | 'top' | 'bottom';
|
|
1673
|
+
}
|
|
1674
|
+
interface Actor {
|
|
1675
|
+
readonly id: NodeId;
|
|
1676
|
+
readonly x: number;
|
|
1677
|
+
readonly y: number;
|
|
1678
|
+
readonly width: number;
|
|
1679
|
+
readonly height: number;
|
|
1680
|
+
readonly ports: ReadonlyArray<ActorPort>;
|
|
1681
|
+
}
|
|
1682
|
+
interface Compound {
|
|
1683
|
+
readonly id: NodeId;
|
|
1684
|
+
/**
|
|
1685
|
+
* Original node id, since multiple compound nodes can be built from one node
|
|
1686
|
+
*/
|
|
1687
|
+
readonly origin: NodeId;
|
|
1688
|
+
readonly x: number;
|
|
1689
|
+
readonly y: number;
|
|
1690
|
+
readonly width: number;
|
|
1691
|
+
readonly height: number;
|
|
1692
|
+
readonly depth: number;
|
|
1693
|
+
}
|
|
1694
|
+
interface ParallelArea {
|
|
1695
|
+
readonly parallelPrefix: string;
|
|
1696
|
+
readonly x: number;
|
|
1697
|
+
readonly y: number;
|
|
1698
|
+
readonly width: number;
|
|
1699
|
+
readonly height: number;
|
|
1700
|
+
}
|
|
1701
|
+
interface Step {
|
|
1702
|
+
readonly id: EdgeId;
|
|
1703
|
+
readonly labelBBox?: {
|
|
1704
|
+
width: number;
|
|
1705
|
+
height: number;
|
|
1706
|
+
} | undefined;
|
|
1707
|
+
readonly sourceHandle: string;
|
|
1708
|
+
readonly targetHandle: string;
|
|
1709
|
+
}
|
|
1710
|
+
interface Layout {
|
|
1711
|
+
readonly actors: ReadonlyArray<Actor>;
|
|
1712
|
+
/**
|
|
1713
|
+
* Steps in the sequence diagram (filtered edges with compound nodes)
|
|
1714
|
+
*/
|
|
1715
|
+
readonly steps: ReadonlyArray<Step>;
|
|
1716
|
+
readonly compounds: ReadonlyArray<Compound>;
|
|
1717
|
+
readonly parallelAreas: ReadonlyArray<ParallelArea>;
|
|
1718
|
+
readonly bounds: BBox;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region src/types/view-parsed.deployment.d.ts
|
|
225
1724
|
/**
|
|
226
|
-
*
|
|
1725
|
+
* Predicates scoped to deployment model
|
|
227
1726
|
*/
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
1727
|
+
interface DeploymentViewIncludePredicate<A extends Any = Unknown> extends AnyIncludePredicate<Expression<A>> {}
|
|
1728
|
+
interface DeploymentViewExcludePredicate<A extends Any = Unknown> extends AnyExcludePredicate<Expression<A>> {}
|
|
1729
|
+
type DeploymentViewPredicate<A extends Any = Unknown> = DeploymentViewIncludePredicate<A> | DeploymentViewExcludePredicate<A>;
|
|
1730
|
+
interface DeploymentViewRuleStyle<A extends Any = Unknown> extends AnyViewRuleStyle<FqnExpr<A>> {}
|
|
1731
|
+
type DeploymentViewRule<A extends Any = Unknown> = ExclusiveUnion<{
|
|
1732
|
+
Include: DeploymentViewIncludePredicate<A>;
|
|
1733
|
+
Exclude: DeploymentViewExcludePredicate<A>;
|
|
1734
|
+
Style: DeploymentViewRuleStyle<A>;
|
|
1735
|
+
AutoLayout: ViewRuleAutoLayout;
|
|
1736
|
+
}>;
|
|
1737
|
+
interface ParsedDeploymentView<A extends Any = Unknown> extends BaseParsedViewProperties<A> {
|
|
1738
|
+
[_type]: 'deployment';
|
|
1739
|
+
readonly rules: DeploymentViewRule<A>[];
|
|
231
1740
|
}
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region src/types/view.d.ts
|
|
1743
|
+
type ParsedView<A extends Any = Any> = ParsedElementView<A> | ParsedDeploymentView<A> | ParsedDynamicView<A>;
|
|
1744
|
+
type ComputedView<A extends Any = Any> = ComputedElementView<A> | ComputedDeploymentView<A> | ComputedDynamicView<A>;
|
|
1745
|
+
type LayoutedView<A extends Any = Any> = LayoutedElementView<A> | LayoutedDeploymentView<A> | LayoutedDynamicView<A>;
|
|
1746
|
+
type ProcessedView<A extends Any = Any> = ComputedView<A> | LayoutedView<A>;
|
|
1747
|
+
type AnyView<A extends Any = Any> = ParsedElementView<A> | ParsedDeploymentView<A> | ParsedDynamicView<A> | ComputedElementView<A> | ComputedDeploymentView<A> | ComputedDynamicView<A> | LayoutedElementView<A> | LayoutedDeploymentView<A> | LayoutedDynamicView<A>;
|
|
1748
|
+
type ViewOnStage<V extends AnyView<Any>, T extends ModelStage> = Extract<V, {
|
|
1749
|
+
[_stage]: T;
|
|
1750
|
+
}>;
|
|
1751
|
+
type ViewWithType<V extends AnyView<Any>, T extends ViewType> = Extract<V, {
|
|
1752
|
+
[_type]: T;
|
|
1753
|
+
}>;
|
|
1754
|
+
type ViewRule<A extends Any = Any> = ParsedView<A>['rules'][number];
|
|
1755
|
+
type ViewRulePredicate<A extends Any = Any> = Extract<ViewRule<A>, {
|
|
1756
|
+
include: any[];
|
|
1757
|
+
} | {
|
|
1758
|
+
exclude: any[];
|
|
1759
|
+
}>;
|
|
1760
|
+
declare function isViewRulePredicate<V extends ViewRule<any>>(rule: V): rule is Extract<V, {
|
|
1761
|
+
include: any[];
|
|
1762
|
+
} | {
|
|
1763
|
+
exclude: any[];
|
|
1764
|
+
}>;
|
|
1765
|
+
declare function isViewRuleStyle<V extends ViewRule<any>>(rule: V): rule is Extract<V, {
|
|
1766
|
+
targets: any[];
|
|
1767
|
+
style: {};
|
|
1768
|
+
}>;
|
|
1769
|
+
declare function isComputedView<V extends AnyView<any>>(view: V): view is ExtractOnStage<V, 'computed'>;
|
|
1770
|
+
declare function isDiagramView<V extends AnyView<any>>(view: V): view is ExtractOnStage<V, 'layouted'>;
|
|
1771
|
+
declare function isElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'>;
|
|
1772
|
+
declare function isScopedElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'> & {
|
|
1773
|
+
viewOf: Fqn<Any>;
|
|
1774
|
+
};
|
|
1775
|
+
declare function isExtendsElementView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'element'> & {
|
|
1776
|
+
extends: StrictViewId<Any>;
|
|
1777
|
+
};
|
|
1778
|
+
declare function isDeploymentView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'deployment'>;
|
|
1779
|
+
declare function isDynamicView<V extends AnyView<any>>(view: V): view is ViewWithType<V, 'dynamic'>;
|
|
1780
|
+
//#endregion
|
|
1781
|
+
//#region src/types/model-data.d.ts
|
|
232
1782
|
/**
|
|
233
|
-
*
|
|
1783
|
+
* Represents a LikeC4 model data, in different stages of processing
|
|
1784
|
+
* - {@link ParsedLikeC4ModelData} - parsed from DSL or result from Builder
|
|
1785
|
+
* - {@link ComputedLikeC4ModelData} - computed from parsed model
|
|
1786
|
+
* - {@link LayoutedLikeC4ModelData} - layouted from computed model
|
|
234
1787
|
*
|
|
235
|
-
*
|
|
236
|
-
* @default `directed`
|
|
1788
|
+
* !IMPORTANT: This is a low-level type, use `LikeC4Model` instead.
|
|
237
1789
|
*/
|
|
238
|
-
|
|
1790
|
+
interface BaseLikeC4ModelData<A extends Any> {
|
|
1791
|
+
[_stage]: A['Stage'];
|
|
1792
|
+
projectId: ProjectId<A>;
|
|
1793
|
+
project: LikeC4Project;
|
|
1794
|
+
specification: Specification<A>;
|
|
1795
|
+
elements: Record<ElementId<A>, Element<A>>;
|
|
1796
|
+
deployments: {
|
|
1797
|
+
elements: Record<DeploymentId<A>, DeploymentElement<A>>;
|
|
1798
|
+
relations: Record<RelationId$1, DeploymentRelationship<A>>;
|
|
1799
|
+
};
|
|
1800
|
+
relations: Record<RelationId$1, Relationship<A>>;
|
|
1801
|
+
globals: ModelGlobals;
|
|
1802
|
+
imports: Record<string, NonEmptyArray<Element<A>>>;
|
|
1803
|
+
}
|
|
1804
|
+
type AuxFromLikeC4ModelData<D> = D extends BaseLikeC4ModelData<infer A extends Any> ? IsAny<A> extends true ? never : A : never;
|
|
1805
|
+
interface ParsedLikeC4ModelData<A extends AnyParsed = UnknownParsed> extends BaseLikeC4ModelData<A> {
|
|
1806
|
+
[_stage]: 'parsed';
|
|
1807
|
+
views: Record<ViewId<A>, ParsedView<A>>;
|
|
1808
|
+
}
|
|
1809
|
+
interface ComputedLikeC4ModelData<A extends AnyComputed = UnknownComputed> extends BaseLikeC4ModelData<A> {
|
|
1810
|
+
[_stage]: 'computed';
|
|
1811
|
+
views: Record<ViewId<A>, ComputedView<A>>;
|
|
1812
|
+
/**
|
|
1813
|
+
* If project contains saved manual layouts
|
|
1814
|
+
*/
|
|
1815
|
+
manualLayouts?: Record<ViewId$1, ViewManualLayoutSnapshot>;
|
|
1816
|
+
}
|
|
1817
|
+
interface LayoutedLikeC4ModelData<A extends AnyLayouted = UnknownLayouted> extends BaseLikeC4ModelData<A> {
|
|
1818
|
+
[_stage]: 'layouted';
|
|
1819
|
+
views: Record<ViewId<A>, LayoutedView<A>>;
|
|
1820
|
+
/**
|
|
1821
|
+
* If this model contains saved manual layouts
|
|
1822
|
+
*/
|
|
1823
|
+
manualLayouts?: Record<ViewId$1, ViewManualLayoutSnapshot>;
|
|
1824
|
+
}
|
|
1825
|
+
type LikeC4ModelData<A extends Any> = ParsedLikeC4ModelData<A> | ComputedLikeC4ModelData<A> | LayoutedLikeC4ModelData<A>;
|
|
1826
|
+
//#endregion
|
|
1827
|
+
//#region src/types/model-dump.d.ts
|
|
239
1828
|
/**
|
|
240
|
-
*
|
|
241
|
-
* @param direction - if 'directed', only look for outgoing connections from the element to others
|
|
242
|
-
* @default `both`
|
|
1829
|
+
* JSON representation of {@link Specification}
|
|
243
1830
|
*/
|
|
244
|
-
|
|
1831
|
+
interface SpecificationDump {
|
|
1832
|
+
elements: {
|
|
1833
|
+
[kind: string]: object;
|
|
1834
|
+
};
|
|
1835
|
+
tags?: {
|
|
1836
|
+
[tag: string]: object;
|
|
1837
|
+
};
|
|
1838
|
+
deployments?: {
|
|
1839
|
+
[kind: string]: object;
|
|
1840
|
+
};
|
|
1841
|
+
relationships?: {
|
|
1842
|
+
[kind: string]: object;
|
|
1843
|
+
};
|
|
1844
|
+
metadataKeys?: string[];
|
|
1845
|
+
customColors?: {
|
|
1846
|
+
[kind: string]: object;
|
|
1847
|
+
};
|
|
1848
|
+
}
|
|
1849
|
+
type SpecTypesFromDump<J> = J extends SpecificationDump ? SpecAux<KeysOf<J['elements']>, KeysOf<J['deployments']>, KeysOf<J['relationships']>, KeysOf<J['tags']>, J['metadataKeys'] extends readonly [string, ...string[]] ? J['metadataKeys'][number] : never> : SpecAux<never, never, never, never, never>;
|
|
245
1850
|
/**
|
|
246
|
-
*
|
|
1851
|
+
* Dump differs from {@link ParsedLikeC4ModelData} by the fact that it is computed or layouted
|
|
247
1852
|
*/
|
|
248
|
-
|
|
1853
|
+
type LikeC4ModelDump = {
|
|
1854
|
+
[_stage]?: 'computed' | 'layouted';
|
|
1855
|
+
projectId?: string;
|
|
1856
|
+
project?: ProjectDump;
|
|
1857
|
+
specification: SpecificationDump;
|
|
1858
|
+
elements?: {
|
|
1859
|
+
[kind: string]: object;
|
|
1860
|
+
};
|
|
1861
|
+
deployments: {
|
|
1862
|
+
elements?: {
|
|
1863
|
+
[kind: string]: object;
|
|
1864
|
+
};
|
|
1865
|
+
relations?: {};
|
|
1866
|
+
};
|
|
1867
|
+
views?: {
|
|
1868
|
+
[kind: string]: object;
|
|
1869
|
+
};
|
|
1870
|
+
relations?: {};
|
|
1871
|
+
globals?: {
|
|
1872
|
+
predicates?: {};
|
|
1873
|
+
dynamicPredicates?: {};
|
|
1874
|
+
styles?: {};
|
|
1875
|
+
};
|
|
1876
|
+
imports?: {};
|
|
1877
|
+
};
|
|
1878
|
+
type ProjectDump = {
|
|
1879
|
+
id: string;
|
|
1880
|
+
name?: string;
|
|
1881
|
+
title?: string | undefined;
|
|
1882
|
+
};
|
|
1883
|
+
type AuxFromDump<D> = D extends LikeC4ModelDump ? Aux<D[_stage] extends infer S extends 'computed' | 'layouted' ? S : 'computed' | 'layouted' | 'parsed', KeysOf<D['elements']>, KeysOf<D['deployments']['elements']>, KeysOf<D['views']>, D['projectId'] extends infer PID extends string ? PID : never, SpecTypesFromDump<D['specification']>> : Never;
|
|
249
1884
|
//#endregion
|
|
250
|
-
//#region src/
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
1885
|
+
//#region src/types/view-changes.d.ts
|
|
1886
|
+
declare namespace ViewChange {
|
|
1887
|
+
interface ChangeElementStyle {
|
|
1888
|
+
op: 'change-element-style';
|
|
1889
|
+
style: {
|
|
1890
|
+
border?: BorderStyle;
|
|
1891
|
+
opacity?: number;
|
|
1892
|
+
shape?: ElementShape;
|
|
1893
|
+
color?: ThemeColor;
|
|
1894
|
+
};
|
|
1895
|
+
targets: NonEmptyArray<Fqn$1 | DeploymentFqn$1>;
|
|
1896
|
+
}
|
|
1897
|
+
interface SaveViewSnapshot {
|
|
1898
|
+
op: 'save-view-snapshot';
|
|
1899
|
+
layout: LayoutedView;
|
|
1900
|
+
}
|
|
1901
|
+
interface ResetManualLayout {
|
|
1902
|
+
op: 'reset-manual-layout';
|
|
1903
|
+
}
|
|
1904
|
+
interface ChangeAutoLayout {
|
|
1905
|
+
op: 'change-autolayout';
|
|
1906
|
+
layout: {
|
|
1907
|
+
direction: AutoLayoutDirection;
|
|
1908
|
+
nodeSep?: number | null;
|
|
1909
|
+
rankSep?: number | null;
|
|
1910
|
+
};
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
type ViewChange = ViewChange.ChangeElementStyle | ViewChange.SaveViewSnapshot | ViewChange.ResetManualLayout | ViewChange.ChangeAutoLayout;
|
|
262
1914
|
//#endregion
|
|
263
|
-
//#region src/
|
|
264
|
-
|
|
1915
|
+
//#region src/types/RichText.d.ts
|
|
1916
|
+
interface RichTextEmpty {
|
|
1917
|
+
readonly isEmpty: true;
|
|
1918
|
+
readonly isMarkdown: false;
|
|
1919
|
+
readonly nonEmpty: false;
|
|
1920
|
+
readonly $source: null;
|
|
1921
|
+
readonly text: null;
|
|
1922
|
+
readonly md: null;
|
|
1923
|
+
readonly html: null;
|
|
1924
|
+
equals(other: unknown): boolean;
|
|
1925
|
+
}
|
|
1926
|
+
interface RichTextNonEmpty {
|
|
1927
|
+
readonly isEmpty: false;
|
|
1928
|
+
readonly nonEmpty: true;
|
|
1929
|
+
readonly isMarkdown: boolean;
|
|
1930
|
+
readonly $source: MarkdownOrString;
|
|
1931
|
+
readonly text: string;
|
|
1932
|
+
readonly md: string;
|
|
1933
|
+
readonly html: string;
|
|
1934
|
+
equals(other: unknown): boolean;
|
|
1935
|
+
}
|
|
1936
|
+
type RichTextOrEmpty = RichTextNonEmpty | RichTextEmpty;
|
|
265
1937
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
* normalizeViewPath('One / Tw o / Thre e') === 'One/Tw o/Thre e'
|
|
1938
|
+
* RichText is a class that represents a potentially markdown string.
|
|
1939
|
+
* It can be either a plain text or a markdown.
|
|
1940
|
+
* It is used to represent the content of a node or a link.
|
|
270
1941
|
*/
|
|
271
|
-
declare
|
|
1942
|
+
declare class RichText {
|
|
1943
|
+
private static mdcache;
|
|
1944
|
+
private static txtcache;
|
|
1945
|
+
private static getOrCreateFromText;
|
|
1946
|
+
private static getOrCreateFromMarkdown;
|
|
1947
|
+
/**
|
|
1948
|
+
* Creates and memoizes a RichText instance.
|
|
1949
|
+
* @see ElementModel.description
|
|
1950
|
+
* @example
|
|
1951
|
+
*
|
|
1952
|
+
* get description(): RichTextOrEmpty {
|
|
1953
|
+
* return RichText.memoize(this, 'description', this.$element.description)
|
|
1954
|
+
* }
|
|
1955
|
+
*/
|
|
1956
|
+
static memoize(obj: object, tag: symbol | string, source: MarkdownOrString | null | undefined): RichTextOrEmpty;
|
|
1957
|
+
/**
|
|
1958
|
+
* Creates a RichText instance from a source.
|
|
1959
|
+
*/
|
|
1960
|
+
static from(source: RichTextOrEmpty | MarkdownOrString | string | null | undefined): RichTextOrEmpty;
|
|
1961
|
+
/**
|
|
1962
|
+
* This is a workaround for the fact that we need instance of RichText for `instanceof` checks
|
|
1963
|
+
* It is invalid inheritance (returning `null` from getters), and we cast to @see RichTextEmpty
|
|
1964
|
+
*/
|
|
1965
|
+
static EMPTY: RichTextEmpty;
|
|
1966
|
+
readonly $source: Readonly<MarkdownOrString> | null;
|
|
1967
|
+
readonly isEmpty: boolean;
|
|
1968
|
+
readonly nonEmpty: boolean;
|
|
1969
|
+
readonly isMarkdown: boolean;
|
|
1970
|
+
/**
|
|
1971
|
+
* Private constructor to prevent direct instantiation.
|
|
1972
|
+
* Use {@link RichText.from} or {@link RichText.memoize} instead.
|
|
1973
|
+
*/
|
|
1974
|
+
private constructor();
|
|
1975
|
+
/**
|
|
1976
|
+
* Returns the text content of the rich text.
|
|
1977
|
+
* If the source is a string, it returns the string.
|
|
1978
|
+
* If the source is a markdown, it returns the markdown.
|
|
1979
|
+
*/
|
|
1980
|
+
get text(): string;
|
|
1981
|
+
/**
|
|
1982
|
+
* Returns the markdown content of the rich text.
|
|
1983
|
+
* If the source is a string, it returns the string.
|
|
1984
|
+
* If the source is a markdown, it returns the markdown.
|
|
1985
|
+
*/
|
|
1986
|
+
get md(): string;
|
|
1987
|
+
/**
|
|
1988
|
+
* Returns the html content of the rich text.
|
|
1989
|
+
* If the source is a string, it returns the string.
|
|
1990
|
+
* If the source is a markdown, it returns the HTML.
|
|
1991
|
+
*/
|
|
1992
|
+
get html(): string;
|
|
1993
|
+
equals(other: unknown): boolean;
|
|
1994
|
+
}
|
|
1995
|
+
//#endregion
|
|
1996
|
+
//#region src/types/guards.d.ts
|
|
1997
|
+
declare function isString(value: unknown): value is string;
|
|
1998
|
+
declare function isNonEmptyArray<A>(arr: ArrayLike<A> | undefined): arr is NonEmptyArray<A>;
|
|
1999
|
+
declare function hasProp<T extends object, P extends keyof T & string>(value: T, path: P): value is SetRequired<SetNonNullable<T, P>, P>;
|
|
2000
|
+
type Guard<N = unknown> = (n: unknown) => n is N;
|
|
272
2001
|
/**
|
|
273
|
-
*
|
|
274
|
-
*
|
|
2002
|
+
* Extracts the guarded type from a Guard type.
|
|
2003
|
+
*
|
|
2004
|
+
* @template G - A Guard type or union of Guard types
|
|
2005
|
+
* @returns The type that the guard narrows to
|
|
2006
|
+
*
|
|
275
2007
|
* @example
|
|
276
|
-
*
|
|
277
|
-
*
|
|
2008
|
+
* ```typescript
|
|
2009
|
+
* const isString = (n): n is string => typeof n === 'string';
|
|
2010
|
+
* GuardedBy<typeof isString>; // string
|
|
2011
|
+
* ```
|
|
278
2012
|
*/
|
|
279
|
-
|
|
2013
|
+
type GuardedBy<G> = G extends Guard<infer N> ? N : never;
|
|
280
2014
|
/**
|
|
281
|
-
*
|
|
2015
|
+
* Creates a type guard that checks if a value matches any of the provided predicates.
|
|
2016
|
+
*
|
|
2017
|
+
* @template Predicates - A non-empty array of guard functions
|
|
2018
|
+
* @param predicates - The guard functions to test against
|
|
2019
|
+
* @returns A type guard function that returns true if the value matches any of the predicates
|
|
2020
|
+
*
|
|
282
2021
|
* @example
|
|
283
|
-
*
|
|
284
|
-
*
|
|
2022
|
+
* ```typescript
|
|
2023
|
+
* const isStringOrNumber = isAnyOf(isString, isNumber);
|
|
2024
|
+
*
|
|
2025
|
+
* if (isStringOrNumber(value)) {
|
|
2026
|
+
* // value is now typed as string | number
|
|
2027
|
+
* console.log(value);
|
|
2028
|
+
* }
|
|
2029
|
+
* ```
|
|
285
2030
|
*/
|
|
286
|
-
declare const
|
|
2031
|
+
declare function isAnyOf<const Predicates extends NonEmptyArray<Guard>>(...predicates: Predicates): <T>(value: T) => value is T & GuardedBy<Predicates[number]>;
|
|
287
2032
|
//#endregion
|
|
288
|
-
export {
|
|
2033
|
+
export { LayoutedViewDriftReason as $, IterableContainer as $i, FqnRef as $n, SpecAux as $r, ElementViewPredicate as $t, isComputedView as A, RelationKind$1 as Ai, ModelRelationExpr as An, ThemeColors as Ar, ModelRelation as At, DeploymentViewIncludePredicate as B, isGroupElementKind as Bi, OperatorPredicate as Bn, ElementId as Br, DynamicStepsParallel as Bt, LayoutedView as C, Icon as Ci, ViewWithNotation as Cn, isCustomColor as Cr, DeploymentRelation as Ct, ViewRule as D, NoneIcon as Di, isViewRuleGlobalStyle as Dn, ElementShapes as Dr, AbstractRelationship as Dt, ViewOnStage as E, NodeId$1 as Ei, isViewRuleGlobalPredicateRef as En, DefaultTagColors as Er, isDeploymentNode as Et, isExtendsElementView as F, Tag$1 as Fi, AndOperator as Fn, Aux as Fr, GlobalPredicates as Ft, DiagramEdge as G, ExtractOnStage as Gi, WhereOperator as Gn, LooseLiteral as Gr, DynamicViewStep as Gt, DeploymentViewRule as H, scalar_d_exports as Hi, Participant as Hn, Fqn as Hr, DynamicViewDisplayVariant as Ht, isScopedElementView as I, ViewId$1 as Ii, EqualOperator as In, DeploymentFqn as Ir, GlobalStyleID as It, LayoutedDeploymentView as J, _stage as Ji, isNotOperator as Jn, Metadata as Jr, isDynamicStep as Jt, DiagramNode as K, ModelStage as Ki, isAndOperator as Kn, LooseTag as Kr, ParsedDynamicView as Kt, isViewRulePredicate as L, extractStep as Li, Filterable as Ln, DeploymentId as Lr, GlobalStyles as Lt, isDiagramView as M, StepEdgeId as Mi, FqnExpr as Mn, AnyComputed as Mr, ensureSizes as Mt, isDynamicView as N, StepEdgeIdLiteral as Ni, PredicateSelector as Nn, AnyLayouted as Nr, GlobalDynamicPredicates as Nt, ViewRulePredicate as O, ProjectId$1 as Oi, ModelExpression as On, IconPositions as Or, Element as Ot, isElementView as P, StepEdgeKind as Pi, RelationExpr as Pn, AnyParsed as Pr, GlobalPredicateId as Pt, DiagramNodeDriftReason as Q, ExclusiveUnion as Qi, whereOperatorAsPredicate as Qn, RelationKind as Qr, ElementViewIncludePredicate as Qt, isViewRuleStyle as R, flattenMarkdownOrString as Ri, KindEqual as Rn, DeploymentKind as Rr, ModelGlobals as Rt, ComputedView as S, GroupElementKind as Si, ViewWithHash as Sn, ThemeColorValues as Sr, DeploymentNode as St, ProcessedView as T, MarkdownOrString as Ti, isViewRuleAutoLayout as Tn, BorderStyles as Tr, isDeployedInstance as Tt, DeploymentViewRuleStyle as U, splitGlobalFqn as Ui, ParticipantOperator as Un, LooseDeploymentId as Ur, DynamicViewIncludeRule as Ut, DeploymentViewPredicate as V, isStepEdgeId as Vi, OrOperator as Vn, ElementKind as Vr, DynamicStepsSeries as Vt, ParsedDeploymentView as W, stepEdgeId as Wi, TagEqual as Wn, LooseElementId as Wr, DynamicViewRule as Wt, LayoutedElementView as X, isOnStage as Xi, isParticipantOperator as Xn, ProjectId as Xr, isDynamicStepsSeries as Xt, LayoutedDynamicView as Y, _type as Yi, isOrOperator as Yn, MetadataKey as Yr, isDynamicStepsParallel as Yt, DiagramEdgeDriftReason as Z, Coalesce as Zi, isTagEqual as Zn, RelationId as Zr, ElementViewExcludePredicate as Zt, ComputedLikeC4ModelData as _, DeploymentKind$1 as _i, ViewRuleAutoLayout as _n, ShapeSize as _r, TagSpecification as _t, isNonEmptyArray as a, NonEmptyReadonlyArray as aa, UnknownComputed as ai, isViewRuleGroup as an, ElementColorValues as ar, ComputedNode as at, ParsedLikeC4ModelData as b, Fqn$1 as bi, ViewRuleRank as bn, TextSize as br, DeploymentElement as bt, RichTextEmpty as c, exact as ca, ViewId as ci, AnyIncludePredicate as cn, IconPosition as cr, LikeC4Project as ct, AuxFromDump as d, preferSummary as di, BaseParsedViewProperties as dn, LikeC4StylesConfig as dr, LikeC4ProjectStylesConfig as dt, IteratorLike as ea, Stage as ei, ElementViewRule as en, BorderStyle as er, ViewManualLayoutSnapshot as et, LikeC4ModelDump as f, setProject as fi, BaseViewProperties as fn, LikeC4Theme as fr, LikeC4ProjectStylesCustomStylesheets as ft, AuxFromLikeC4ModelData as g, DeploymentFqn$1 as gi, ViewManualLayout as gn, RelationshipLineType as gr, Specification as gt, SpecificationDump as h, BuiltInIcon as hi, ViewAutoLayout as hn, RelationshipColorValues as hr, RelationshipSpecification as ht, isAnyOf as i, NonEmptyArray as ia, Unknown as ii, ParsedElementView as in, CustomColorDefinitions as ir, ComputedElementView as it, isDeploymentView as j, RelationshipKind as ji, Expression as jn, Any as jr, Relationship as jt, ViewWithType as k, RelationId$1 as ki, ModelFqnExpr as kn, Sizes as kr, ElementStyle as kt, RichTextOrEmpty as l, _aux_d_exports as li, AnyViewRuleStyle as ln, IconSize as lr, LikeC4ProjectManualLayoutsConfig as lt, SpecTypesFromDump as m, AnyFqn as mi, RankValue as mn, RelationshipArrowTypes as mr, ElementSpecification as mt, GuardedBy as n, Link as na, Tag as ni, ElementViewRuleRank as nn, ColorLiteral as nr, ComputedDynamicView as nt, isString as o, Predicate as oa, UnknownLayouted as oi, isViewRuleRank as on, ElementShape as or, ComputedNodeStyle as ot, ProjectDump as p, toComputed as pi, NodeNotation as pn, RelationshipArrowType as pr, LikeC4ProjectTheme as pt, LayoutType as q, _layout as qi, isKindEqual as qn, LooseViewId as qr, getParallelStepsPrefix as qt, hasProp as r, NTuple as ra, Tags as ri, ElementViewRuleStyle as rn, CustomColor as rr, ComputedEdge as rt, RichText as s, ReorderedArray as sa, UnknownParsed as si, AnyExcludePredicate as sn, HexColor as sr, ComputedRankConstraint as st, Guard as t, KeysOf as ta, StrictViewId as ti, ElementViewRuleGroup as tn, Color as tr, ComputedDeploymentView as tt, ViewChange as u, preferDescription as ui, AutoLayoutDirection as un, LikeC4StyleDefaults as ur, LikeC4ProjectStyleDefaults as ut, LayoutedLikeC4ModelData as v, EdgeId$1 as vi, ViewRuleGlobalPredicateRef as vn, Size as vr, isTagColorSpecified as vt, ParsedView as w, IconUrl as wi, isAutoLayoutDirection as wn, isThemeColor as wr, DeploymentRelationship as wt, AnyView as x, GlobalFqn as xi, ViewType as xn, ThemeColor as xr, DeploymentElementRef$1 as xt, LikeC4ModelData as y, ElementKind$1 as yi, ViewRuleGlobalStyle as yn, SpacingSize as yr, DeployedInstance as yt, DeploymentViewExcludePredicate as z, isGlobalFqn as zi, NotOperator as zn, EdgeId as zr, DynamicStep as zt };
|