@likec4/core 1.46.4 → 1.48.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/LICENSE +1 -1
- package/dist/_chunks/Builder.view-element.mjs +3284 -0
- package/dist/_chunks/LikeC4Model.d.mts +1287 -0
- package/dist/_chunks/LikeC4Styles.mjs +691 -0
- package/dist/_chunks/RichText.d.mts +84 -0
- package/dist/_chunks/RichText.mjs +148 -0
- package/dist/_chunks/_aux.d.mts +289 -0
- package/dist/_chunks/_aux.mjs +18 -0
- package/dist/_chunks/_types.d.mts +781 -0
- package/dist/_chunks/_types2.d.mts +38 -0
- package/dist/_chunks/assignTagColors.mjs +24 -0
- package/dist/_chunks/calcDriftsFromSnapshot.mjs +379 -0
- package/dist/_chunks/connection.mjs +0 -0
- package/dist/_chunks/const.d.mts +43 -0
- package/dist/_chunks/const.mjs +33 -0
- package/dist/_chunks/expression-model.d.mts +192 -0
- package/dist/_chunks/expression-model.mjs +103 -0
- package/dist/_chunks/expression.d.mts +347 -0
- package/dist/_chunks/expression.mjs +107 -0
- package/dist/_chunks/find.d.mts +82 -0
- package/dist/_chunks/find.mjs +646 -0
- package/dist/_chunks/find2.d.mts +78 -0
- package/dist/_chunks/find2.mjs +287 -0
- package/dist/_chunks/fqnRef.d.mts +58 -0
- package/dist/_chunks/fqnRef.mjs +41 -0
- package/dist/_chunks/geometry.mjs +335 -0
- package/dist/_chunks/index.d.mts +169 -0
- package/dist/_chunks/index2.d.mts +937 -0
- package/dist/_chunks/index3.d.mts +146 -0
- package/dist/_chunks/index4.d.mts +62 -0
- package/dist/_chunks/index5.d.mts +42 -0
- package/dist/_chunks/index6.d.mts +43 -0
- package/dist/{shared/core.OtRNdMxy.d.mts → _chunks/index7.d.mts} +113 -197
- package/dist/_chunks/index8.d.mts +144 -0
- package/dist/_chunks/invariant.mjs +18 -0
- package/dist/_chunks/iterable.mjs +146 -0
- package/dist/_chunks/libs/@mantine/colors-generator.mjs +3416 -0
- package/dist/_chunks/libs/@ungap/structured-clone.mjs +213 -0
- package/dist/_chunks/libs/bail.mjs +14 -0
- package/dist/_chunks/libs/ccount.mjs +25 -0
- package/dist/_chunks/libs/character-entities-html4.mjs +263 -0
- package/dist/_chunks/libs/character-entities-legacy.mjs +117 -0
- package/dist/_chunks/libs/character-entities.mjs +2136 -0
- package/dist/_chunks/libs/comma-separated-tokens.mjs +18 -0
- package/dist/_chunks/libs/decode-named-character-reference.mjs +21 -0
- package/dist/_chunks/libs/defu.mjs +42 -0
- package/dist/_chunks/libs/devlop.mjs +5 -0
- package/dist/_chunks/libs/escape-string-regexp.mjs +8 -0
- package/dist/_chunks/libs/extend.mjs +77 -0
- package/dist/_chunks/libs/graphology-dag.mjs +703 -0
- package/dist/_chunks/libs/graphology-types.d.mts +601 -0
- package/dist/_chunks/libs/graphology.d.mts +6 -0
- package/dist/_chunks/libs/graphology.mjs +4565 -0
- package/dist/_chunks/libs/hast-util-sanitize.mjs +863 -0
- package/dist/_chunks/libs/hast-util-to-html.mjs +2696 -0
- package/dist/_chunks/libs/is-plain-obj.mjs +9 -0
- package/dist/_chunks/libs/longest-streak.mjs +30 -0
- package/dist/_chunks/libs/markdown-table.mjs +290 -0
- package/dist/_chunks/libs/mdast-util-find-and-replace.mjs +653 -0
- package/dist/_chunks/libs/mdast-util-from-markdown.mjs +8522 -0
- package/dist/_chunks/libs/mdast-util-gfm.mjs +2393 -0
- package/dist/_chunks/libs/mdast-util-to-hast.mjs +1803 -0
- package/dist/_chunks/libs/micromark-extension-gfm.mjs +2243 -0
- package/dist/_chunks/libs/mnemonist.d.mts +254 -0
- package/dist/_chunks/libs/mnemonist.mjs +1978 -0
- package/dist/_chunks/libs/natural-compare-lite.mjs +42 -0
- package/dist/_chunks/libs/rehype-sanitize.mjs +29 -0
- package/dist/_chunks/libs/rehype-stringify.mjs +34 -0
- package/dist/_chunks/libs/remark-gfm.mjs +36 -0
- package/dist/_chunks/libs/remark-github-blockquote-alert.mjs +100 -0
- package/dist/_chunks/libs/remark-parse.mjs +39 -0
- package/dist/_chunks/libs/remark-rehype.mjs +171 -0
- package/dist/_chunks/libs/remeda.mjs +702 -0
- package/dist/_chunks/libs/trough.mjs +158 -0
- package/dist/_chunks/libs/unified.mjs +2212 -0
- package/dist/_chunks/mnemonist.d.mts +1 -0
- package/dist/_chunks/mnemonist.mjs +0 -0
- package/dist/_chunks/model.mjs +1898 -0
- package/dist/_chunks/model2.mjs +0 -0
- package/dist/_chunks/relationships-view.mjs +132 -0
- package/dist/_chunks/rolldown-runtime.mjs +42 -0
- package/dist/{shared/core.C_3y3eqV.d.mts → _chunks/scalar.d.mts} +13 -43
- package/dist/_chunks/scalar.mjs +84 -0
- package/dist/_chunks/utils.mjs +483 -0
- package/dist/builder/index.d.mts +11 -773
- package/dist/builder/index.mjs +631 -978
- package/dist/compute-view/index.d.mts +90 -27
- package/dist/compute-view/index.mjs +253 -83
- package/dist/compute-view/relationships-view/index.d.mts +16 -51
- package/dist/compute-view/relationships-view/index.mjs +6 -184
- package/dist/geometry/index.d.mts +2 -109
- package/dist/geometry/index.mjs +2 -327
- package/dist/index.d.mts +18 -20
- package/dist/index.mjs +27 -18
- package/dist/model/connection/deployment/index.d.mts +12 -15
- package/dist/model/connection/deployment/index.mjs +9 -2
- package/dist/model/connection/index.d.mts +14 -75
- package/dist/model/connection/index.mjs +10 -3
- package/dist/model/connection/model/index.d.mts +12 -15
- package/dist/model/connection/model/index.mjs +8 -2
- package/dist/model/index.d.mts +15 -57
- package/dist/model/index.mjs +11 -4
- package/dist/styles/index.d.mts +9 -117
- package/dist/styles/index.mjs +26 -59
- package/dist/types/RichText.d.mts +3 -0
- package/dist/types/RichText.mjs +7 -0
- package/dist/types/_aux.d.mts +3 -4
- package/dist/types/_aux.mjs +2 -7
- package/dist/types/expression-model.d.mts +6 -190
- package/dist/types/expression-model.mjs +6 -108
- package/dist/types/expression.d.mts +5 -6
- package/dist/types/expression.mjs +6 -112
- package/dist/types/fqnRef.d.mts +4 -60
- package/dist/types/fqnRef.mjs +6 -44
- package/dist/types/index.d.mts +9 -47
- package/dist/types/index.mjs +14 -16
- package/dist/types/scalar.d.mts +2 -2
- package/dist/types/scalar.mjs +7 -4
- package/dist/utils/graphology/index.d.mts +2 -1864
- package/dist/utils/graphology/index.mjs +3 -1
- package/dist/utils/index.d.mts +11 -124
- package/dist/utils/index.mjs +16 -43
- package/dist/utils/iterable/index.d.mts +9 -132
- package/dist/utils/iterable/index.mjs +2 -61
- package/dist/utils/mnemonist.d.mts +2 -0
- package/dist/utils/mnemonist.mjs +12 -0
- package/package.json +18 -22
- package/compute-view/relationships/package.json +0 -4
- package/dist/shared/core.3ZhnKAlZ.mjs +0 -106
- package/dist/shared/core.78IWAHAE.mjs +0 -332
- package/dist/shared/core.B85MJLTf.mjs +0 -5
- package/dist/shared/core.BFd1lU9R.mjs +0 -29
- package/dist/shared/core.BKlholso.mjs +0 -3
- package/dist/shared/core.BPGOjone.d.mts +0 -46
- package/dist/shared/core.BYdtmqY5.mjs +0 -1255
- package/dist/shared/core.BZCgljZd.d.mts +0 -83
- package/dist/shared/core.BbE4y-yl.mjs +0 -177
- package/dist/shared/core.BhNcrwzK.mjs +0 -7
- package/dist/shared/core.BkVA6gjl.mjs +0 -5
- package/dist/shared/core.BoYfZOBm.mjs +0 -3
- package/dist/shared/core.BsSXS-_R.mjs +0 -7
- package/dist/shared/core.BspBF3SJ.mjs +0 -3944
- package/dist/shared/core.BvPm_-u3.d.mts +0 -334
- package/dist/shared/core.C-Jdx7xo.d.mts +0 -1263
- package/dist/shared/core.C3JowhaZ.mjs +0 -32
- package/dist/shared/core.C4x8aaWa.mjs +0 -27
- package/dist/shared/core.CBLX4mT8.mjs +0 -28411
- package/dist/shared/core.CLSZtnFh.mjs +0 -69
- package/dist/shared/core.CRhT4Iio.mjs +0 -785
- package/dist/shared/core.CbT8JVYL.mjs +0 -5
- package/dist/shared/core.CdNCAwq7.mjs +0 -176
- package/dist/shared/core.ClTP6-TN.d.mts +0 -87
- package/dist/shared/core.CmGY9blO.mjs +0 -6717
- package/dist/shared/core.CmPXpJ8l.mjs +0 -21
- package/dist/shared/core.Coi_LOUZ.mjs +0 -7
- package/dist/shared/core.CqAJJpK_.mjs +0 -3
- package/dist/shared/core.Ctj2S3bD.d.mts +0 -466
- package/dist/shared/core.CywrQs86.d.mts +0 -31
- package/dist/shared/core.D00YbOhQ.d.mts +0 -300
- package/dist/shared/core.D0WZutNd.mjs +0 -94
- package/dist/shared/core.D4npX2q8.mjs +0 -18
- package/dist/shared/core.DB0Ue5Wx.d.mts +0 -70
- package/dist/shared/core.DEK-BO3_.mjs +0 -1206
- package/dist/shared/core.DH7TXqXf.mjs +0 -136
- package/dist/shared/core.DRJma0Ol.mjs +0 -22
- package/dist/shared/core.DSalPD6v.mjs +0 -1352
- package/dist/shared/core.DVfPJPJj.mjs +0 -2200
- package/dist/shared/core.DXhDWKFZ.d.mts +0 -3
- package/dist/shared/core.DbfO90vF.mjs +0 -434
- package/dist/shared/core.DcS-0zys.mjs +0 -10
- package/dist/shared/core.DeDCYTDR.d.mts +0 -98
- package/dist/shared/core.DpKY_3NF.d.mts +0 -504
- package/dist/shared/core.Dt0v3djy.d.mts +0 -41
- package/dist/shared/core.FZ305VYd.mjs +0 -21
- package/dist/shared/core.RfnaEmgA.mjs +0 -7
- package/dist/shared/core.oSV6SRfk.mjs +0 -13
- package/dist/shared/core.om36dXXW.mjs +0 -41
- package/dist/shared/core.q10OP9oJ.mjs +0 -5
- package/dist/shared/core.uFk_o9X6.mjs +0 -13
- package/dist/shared/core.xeuDd__E.mjs +0 -300
- package/dist/shared/core.xgoPk2RG.mjs +0 -4989
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { H as StrictViewId, U as Tag, m as ElementKind, n as Any, vt as ExclusiveUnion } from "./_aux.mjs";
|
|
2
|
+
import { f as MarkdownOrString, u as Icon } from "./scalar.mjs";
|
|
3
|
+
import { B as ShapeSize, C as BorderStyle, I as RelationshipArrowType, h as WhereOperator, j as IconPosition, k as ElementShape, r as PredicateSelector, w as Color, z as RelationshipLineType } from "./expression.mjs";
|
|
4
|
+
import { t as FqnRef } from "./fqnRef.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/types/expression-model.d.ts
|
|
7
|
+
type AnyAux = Any;
|
|
8
|
+
declare namespace ModelFqnExpr {
|
|
9
|
+
type Wildcard = {
|
|
10
|
+
wildcard: true;
|
|
11
|
+
};
|
|
12
|
+
function isWildcard<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Wildcard;
|
|
13
|
+
interface Ref<M extends AnyAux> {
|
|
14
|
+
ref: FqnRef.ModelRef<M>;
|
|
15
|
+
selector?: PredicateSelector;
|
|
16
|
+
}
|
|
17
|
+
function isModelRef<A extends AnyAux>(ref: ModelExpression<A>): ref is ModelFqnExpr.Ref<A>;
|
|
18
|
+
interface ElementKindExpr<A extends AnyAux = AnyAux> {
|
|
19
|
+
elementKind: ElementKind<A>;
|
|
20
|
+
isEqual: boolean;
|
|
21
|
+
}
|
|
22
|
+
function isElementKindExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ElementKindExpr<A>;
|
|
23
|
+
interface ElementTagExpr<A extends AnyAux> {
|
|
24
|
+
elementTag: Tag<A>;
|
|
25
|
+
isEqual: boolean;
|
|
26
|
+
}
|
|
27
|
+
function isElementTagExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ElementTagExpr<A>;
|
|
28
|
+
type NonWildcard<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
29
|
+
Ref: Ref<A>;
|
|
30
|
+
ElementKind: ElementKindExpr<A>;
|
|
31
|
+
ElementTag: ElementTagExpr<A>;
|
|
32
|
+
}>;
|
|
33
|
+
interface Where<A extends AnyAux = AnyAux> {
|
|
34
|
+
where: {
|
|
35
|
+
expr: ExclusiveUnion<{
|
|
36
|
+
Wildcard: Wildcard;
|
|
37
|
+
Ref: Ref<A>;
|
|
38
|
+
ElementKind: ElementKindExpr<A>;
|
|
39
|
+
ElementTag: ElementTagExpr<A>;
|
|
40
|
+
}>;
|
|
41
|
+
condition: WhereOperator<A>;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Where<A>;
|
|
45
|
+
interface Custom<A extends AnyAux = AnyAux> {
|
|
46
|
+
custom: {
|
|
47
|
+
expr: OrWhere<A>;
|
|
48
|
+
title?: string;
|
|
49
|
+
description?: MarkdownOrString;
|
|
50
|
+
technology?: string;
|
|
51
|
+
notation?: string;
|
|
52
|
+
shape?: ElementShape;
|
|
53
|
+
color?: Color;
|
|
54
|
+
icon?: Icon;
|
|
55
|
+
iconColor?: Color;
|
|
56
|
+
iconSize?: ShapeSize;
|
|
57
|
+
iconPosition?: IconPosition;
|
|
58
|
+
border?: BorderStyle;
|
|
59
|
+
opacity?: number;
|
|
60
|
+
navigateTo?: StrictViewId<A>;
|
|
61
|
+
multiple?: boolean;
|
|
62
|
+
size?: ShapeSize;
|
|
63
|
+
padding?: ShapeSize;
|
|
64
|
+
textSize?: ShapeSize;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function isCustom<A extends AnyAux>(expr: ModelExpression<A>): expr is Custom<A>;
|
|
68
|
+
function is<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr<A>;
|
|
69
|
+
type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
70
|
+
Wildcard: ModelFqnExpr.Wildcard;
|
|
71
|
+
Ref: ModelFqnExpr.Ref<A>;
|
|
72
|
+
ElementKind: ElementKindExpr<A>;
|
|
73
|
+
ElementTag: ElementTagExpr<A>;
|
|
74
|
+
Where: ModelFqnExpr.Where<A>;
|
|
75
|
+
}>;
|
|
76
|
+
type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
77
|
+
Wildcard: Wildcard;
|
|
78
|
+
Ref: Ref<A>;
|
|
79
|
+
ElementKind: ElementKindExpr<A>;
|
|
80
|
+
ElementTag: ElementTagExpr<A>;
|
|
81
|
+
Where: Where<A>;
|
|
82
|
+
Custom: Custom<A>;
|
|
83
|
+
}>;
|
|
84
|
+
function unwrap<A extends AnyAux>(expr: ModelFqnExpr.Any<A>): Wildcard | Ref<A> | ElementKindExpr<A> | ElementTagExpr<A>;
|
|
85
|
+
}
|
|
86
|
+
type ModelFqnExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
87
|
+
Wildcard: ModelFqnExpr.Wildcard;
|
|
88
|
+
Ref: ModelFqnExpr.Ref<A>;
|
|
89
|
+
ElementKind: ModelFqnExpr.ElementKindExpr<A>;
|
|
90
|
+
ElementTag: ModelFqnExpr.ElementTagExpr<A>;
|
|
91
|
+
}>;
|
|
92
|
+
declare namespace ModelRelationExpr {
|
|
93
|
+
type Endpoint<A extends AnyAux = AnyAux> = ModelFqnExpr.Where<A>['where']['expr'];
|
|
94
|
+
interface Direct<A extends AnyAux = AnyAux> {
|
|
95
|
+
source: Endpoint<A>;
|
|
96
|
+
target: Endpoint<A>;
|
|
97
|
+
isBidirectional?: boolean;
|
|
98
|
+
}
|
|
99
|
+
function isDirect<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Direct<A>;
|
|
100
|
+
interface Incoming<A extends AnyAux = AnyAux> {
|
|
101
|
+
incoming: Endpoint<A>;
|
|
102
|
+
}
|
|
103
|
+
function isIncoming<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Incoming<A>;
|
|
104
|
+
interface Outgoing<A extends AnyAux = AnyAux> {
|
|
105
|
+
outgoing: Endpoint<A>;
|
|
106
|
+
}
|
|
107
|
+
function isOutgoing<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Outgoing<A>;
|
|
108
|
+
interface InOut<A extends AnyAux = AnyAux> {
|
|
109
|
+
inout: Endpoint<A>;
|
|
110
|
+
}
|
|
111
|
+
function isInOut<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.InOut<A>;
|
|
112
|
+
interface Where<A extends AnyAux = AnyAux> {
|
|
113
|
+
where: {
|
|
114
|
+
expr: ExclusiveUnion<{
|
|
115
|
+
Direct: ModelRelationExpr.Direct<A>;
|
|
116
|
+
Incoming: ModelRelationExpr.Incoming<A>;
|
|
117
|
+
Outgoing: ModelRelationExpr.Outgoing<A>;
|
|
118
|
+
InOut: ModelRelationExpr.InOut<A>;
|
|
119
|
+
}>;
|
|
120
|
+
condition: WhereOperator<A>;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Where<A>;
|
|
124
|
+
interface Custom<A extends AnyAux = AnyAux> {
|
|
125
|
+
customRelation: {
|
|
126
|
+
expr: OrWhere<A>;
|
|
127
|
+
title?: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
technology?: string;
|
|
130
|
+
notation?: string;
|
|
131
|
+
navigateTo?: StrictViewId<A>;
|
|
132
|
+
notes?: string;
|
|
133
|
+
color?: Color;
|
|
134
|
+
line?: RelationshipLineType;
|
|
135
|
+
head?: RelationshipArrowType;
|
|
136
|
+
tail?: RelationshipArrowType;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function isCustom<A extends AnyAux>(expr: ModelExpression<A>): expr is Custom<A>;
|
|
140
|
+
function is<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr<A>;
|
|
141
|
+
type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
142
|
+
Direct: Direct<A>;
|
|
143
|
+
Incoming: Incoming<A>;
|
|
144
|
+
Outgoing: Outgoing<A>;
|
|
145
|
+
InOut: InOut<A>;
|
|
146
|
+
Where: Where<A>;
|
|
147
|
+
}>;
|
|
148
|
+
type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
149
|
+
Direct: Direct<A>;
|
|
150
|
+
Incoming: Incoming<A>;
|
|
151
|
+
Outgoing: Outgoing<A>;
|
|
152
|
+
InOut: InOut<A>;
|
|
153
|
+
Where: Where<A>;
|
|
154
|
+
Custom: Custom<A>;
|
|
155
|
+
}>;
|
|
156
|
+
function unwrap<A extends AnyAux>(expr: ModelRelationExpr.Any<A>): Direct<A> | Incoming<A> | Outgoing<A> | InOut<A>;
|
|
157
|
+
}
|
|
158
|
+
type ModelRelationExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
159
|
+
Direct: ModelRelationExpr.Direct<A>;
|
|
160
|
+
Incoming: ModelRelationExpr.Incoming<A>;
|
|
161
|
+
Outgoing: ModelRelationExpr.Outgoing<A>;
|
|
162
|
+
InOut: ModelRelationExpr.InOut<A>;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Represents a version 2 expression which can be one of several types.
|
|
166
|
+
*
|
|
167
|
+
* @template D - The type for the deployment FQN, defaults to `Fqn`.
|
|
168
|
+
* @template M - The type for the model FQN, defaults to `Fqn`.
|
|
169
|
+
*/
|
|
170
|
+
type ModelExpression<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
171
|
+
Wildcard: ModelFqnExpr.Wildcard;
|
|
172
|
+
Ref: ModelFqnExpr.Ref<A>;
|
|
173
|
+
ElementKind: ModelFqnExpr.ElementKindExpr<A>;
|
|
174
|
+
ElementTag: ModelFqnExpr.ElementTagExpr<A>;
|
|
175
|
+
Custom: ModelFqnExpr.Custom<A>;
|
|
176
|
+
Direct: ModelRelationExpr.Direct<A>;
|
|
177
|
+
Incoming: ModelRelationExpr.Incoming<A>;
|
|
178
|
+
Outgoing: ModelRelationExpr.Outgoing<A>;
|
|
179
|
+
InOut: ModelRelationExpr.InOut<A>;
|
|
180
|
+
Where: ModelExpression.Where<A>;
|
|
181
|
+
CustomRelation: ModelRelationExpr.Custom<A>;
|
|
182
|
+
}>;
|
|
183
|
+
declare namespace ModelExpression {
|
|
184
|
+
type Where<A extends AnyAux = AnyAux> = ModelFqnExpr.Where<A> | ModelRelationExpr.Where<A>;
|
|
185
|
+
function isWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelExpression.Where<A>;
|
|
186
|
+
function isRelationWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Where<A>;
|
|
187
|
+
function isFqnExprWhere<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Where<A>;
|
|
188
|
+
function isFqnExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelFqnExpr.Any<A>;
|
|
189
|
+
function isRelationExpr<A extends AnyAux>(expr: ModelExpression<A>): expr is ModelRelationExpr.Any<A>;
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { ModelFqnExpr as n, ModelRelationExpr as r, ModelExpression as t };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { t as FqnRef } from "./fqnRef.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/types/expression-model.ts
|
|
4
|
+
let ModelFqnExpr;
|
|
5
|
+
(function(_ModelFqnExpr) {
|
|
6
|
+
function isWildcard(expr) {
|
|
7
|
+
return "wildcard" in expr && expr.wildcard === true;
|
|
8
|
+
}
|
|
9
|
+
_ModelFqnExpr.isWildcard = isWildcard;
|
|
10
|
+
function isModelRef(ref) {
|
|
11
|
+
return "ref" in ref && FqnRef.isModelRef(ref.ref);
|
|
12
|
+
}
|
|
13
|
+
_ModelFqnExpr.isModelRef = isModelRef;
|
|
14
|
+
function isElementKindExpr(expr) {
|
|
15
|
+
return "elementKind" in expr && "isEqual" in expr;
|
|
16
|
+
}
|
|
17
|
+
_ModelFqnExpr.isElementKindExpr = isElementKindExpr;
|
|
18
|
+
function isElementTagExpr(expr) {
|
|
19
|
+
return "elementTag" in expr && "isEqual" in expr;
|
|
20
|
+
}
|
|
21
|
+
_ModelFqnExpr.isElementTagExpr = isElementTagExpr;
|
|
22
|
+
function isWhere(expr) {
|
|
23
|
+
return "where" in expr && is(expr.where.expr);
|
|
24
|
+
}
|
|
25
|
+
_ModelFqnExpr.isWhere = isWhere;
|
|
26
|
+
function isCustom(expr) {
|
|
27
|
+
return "custom" in expr && (is(expr.custom.expr) || isWhere(expr.custom.expr));
|
|
28
|
+
}
|
|
29
|
+
_ModelFqnExpr.isCustom = isCustom;
|
|
30
|
+
function is(expr) {
|
|
31
|
+
return isWildcard(expr) || isModelRef(expr) || isElementKindExpr(expr) || isElementTagExpr(expr);
|
|
32
|
+
}
|
|
33
|
+
_ModelFqnExpr.is = is;
|
|
34
|
+
function unwrap(expr) {
|
|
35
|
+
if (isCustom(expr)) expr = expr.custom.expr;
|
|
36
|
+
if (isWhere(expr)) expr = expr.where.expr;
|
|
37
|
+
return expr;
|
|
38
|
+
}
|
|
39
|
+
_ModelFqnExpr.unwrap = unwrap;
|
|
40
|
+
})(ModelFqnExpr || (ModelFqnExpr = {}));
|
|
41
|
+
let ModelRelationExpr;
|
|
42
|
+
(function(_ModelRelationExpr) {
|
|
43
|
+
function isDirect(expr) {
|
|
44
|
+
return "source" in expr && "target" in expr;
|
|
45
|
+
}
|
|
46
|
+
_ModelRelationExpr.isDirect = isDirect;
|
|
47
|
+
function isIncoming(expr) {
|
|
48
|
+
return "incoming" in expr;
|
|
49
|
+
}
|
|
50
|
+
_ModelRelationExpr.isIncoming = isIncoming;
|
|
51
|
+
function isOutgoing(expr) {
|
|
52
|
+
return "outgoing" in expr;
|
|
53
|
+
}
|
|
54
|
+
_ModelRelationExpr.isOutgoing = isOutgoing;
|
|
55
|
+
function isInOut(expr) {
|
|
56
|
+
return "inout" in expr;
|
|
57
|
+
}
|
|
58
|
+
_ModelRelationExpr.isInOut = isInOut;
|
|
59
|
+
function isWhere(expr) {
|
|
60
|
+
return "where" in expr && (isDirect(expr.where.expr) || isIncoming(expr.where.expr) || isOutgoing(expr.where.expr) || isInOut(expr.where.expr));
|
|
61
|
+
}
|
|
62
|
+
_ModelRelationExpr.isWhere = isWhere;
|
|
63
|
+
function isCustom(expr) {
|
|
64
|
+
return "customRelation" in expr;
|
|
65
|
+
}
|
|
66
|
+
_ModelRelationExpr.isCustom = isCustom;
|
|
67
|
+
function is(expr) {
|
|
68
|
+
return isDirect(expr) || isIncoming(expr) || isOutgoing(expr) || isInOut(expr);
|
|
69
|
+
}
|
|
70
|
+
_ModelRelationExpr.is = is;
|
|
71
|
+
function unwrap(expr) {
|
|
72
|
+
if (isCustom(expr)) expr = expr.customRelation.expr;
|
|
73
|
+
if (isWhere(expr)) expr = expr.where.expr;
|
|
74
|
+
return expr;
|
|
75
|
+
}
|
|
76
|
+
_ModelRelationExpr.unwrap = unwrap;
|
|
77
|
+
})(ModelRelationExpr || (ModelRelationExpr = {}));
|
|
78
|
+
let ModelExpression;
|
|
79
|
+
(function(_ModelExpression) {
|
|
80
|
+
function isWhere(expr) {
|
|
81
|
+
return "where" in expr;
|
|
82
|
+
}
|
|
83
|
+
_ModelExpression.isWhere = isWhere;
|
|
84
|
+
function isRelationWhere(expr) {
|
|
85
|
+
return ModelRelationExpr.isWhere(expr);
|
|
86
|
+
}
|
|
87
|
+
_ModelExpression.isRelationWhere = isRelationWhere;
|
|
88
|
+
function isFqnExprWhere(expr) {
|
|
89
|
+
return ModelFqnExpr.isWhere(expr);
|
|
90
|
+
}
|
|
91
|
+
_ModelExpression.isFqnExprWhere = isFqnExprWhere;
|
|
92
|
+
function isFqnExpr(expr) {
|
|
93
|
+
return ModelFqnExpr.is(expr) || ModelFqnExpr.isWhere(expr) || ModelFqnExpr.isCustom(expr);
|
|
94
|
+
}
|
|
95
|
+
_ModelExpression.isFqnExpr = isFqnExpr;
|
|
96
|
+
function isRelationExpr(expr) {
|
|
97
|
+
return ModelRelationExpr.is(expr) || ModelRelationExpr.isWhere(expr) || ModelRelationExpr.isCustom(expr);
|
|
98
|
+
}
|
|
99
|
+
_ModelExpression.isRelationExpr = isRelationExpr;
|
|
100
|
+
})(ModelExpression || (ModelExpression = {}));
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
export { ModelFqnExpr as n, ModelRelationExpr as r, ModelExpression as t };
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { H as StrictViewId, U as Tag, W as Tags, m as ElementKind, n as Any, t as AllKinds, vt as ExclusiveUnion, wt as NonEmptyArray } from "./_aux.mjs";
|
|
2
|
+
import { f as MarkdownOrString, u as Icon } from "./scalar.mjs";
|
|
3
|
+
import { t as FqnRef } from "./fqnRef.mjs";
|
|
4
|
+
import { Tagged, TupleToUnion } from "type-fest";
|
|
5
|
+
|
|
6
|
+
//#region ../../styled-system/preset/src/defaults/types.d.ts
|
|
7
|
+
declare const Sizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
8
|
+
declare const IconPositions: readonly ["left", "right", "top", "bottom"];
|
|
9
|
+
declare const BorderStyles: readonly ["solid", "dashed", "dotted", "none"];
|
|
10
|
+
declare const ElementShapes: readonly ["rectangle", "person", "browser", "mobile", "cylinder", "storage", "queue", "bucket", "document"];
|
|
11
|
+
declare const ThemeColors: readonly ["amber", "blue", "gray", "slate", "green", "indigo", "muted", "primary", "red", "secondary", "sky"];
|
|
12
|
+
declare const DefaultTagColors: readonly ["tomato", "grass", "blue", "ruby", "orange", "indigo", "pink", "teal", "purple", "amber", "crimson", "red", "lime", "yellow", "violet"];
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/styles/types.d.ts
|
|
15
|
+
/**
|
|
16
|
+
* For padding, margin, etc.
|
|
17
|
+
*/
|
|
18
|
+
type Size = typeof Sizes[number];
|
|
19
|
+
type TextSize = Size;
|
|
20
|
+
type ShapeSize = Size;
|
|
21
|
+
type SpacingSize = Size;
|
|
22
|
+
type IconSize = Size;
|
|
23
|
+
type IconPosition = typeof IconPositions[number];
|
|
24
|
+
type BorderStyle = typeof BorderStyles[number];
|
|
25
|
+
type ElementShape = typeof ElementShapes[number];
|
|
26
|
+
type HexColor = `#${string}`;
|
|
27
|
+
type ColorLiteral = HexColor | `rgb(${number},${number},${number})` | `rgba(${number},${number},${number},${number})`;
|
|
28
|
+
type RelationshipLineType = 'dashed' | 'solid' | 'dotted';
|
|
29
|
+
declare const RelationshipArrowTypes: readonly ["none", "normal", "onormal", "dot", "odot", "diamond", "odiamond", "crow", "open", "vee"];
|
|
30
|
+
type RelationshipArrowType = TupleToUnion<typeof RelationshipArrowTypes>;
|
|
31
|
+
type ThemeColor = typeof ThemeColors[number];
|
|
32
|
+
declare function isThemeColor(color: string): color is ThemeColor;
|
|
33
|
+
type CustomColorDefinitions = {
|
|
34
|
+
[key: string]: ThemeColorValues;
|
|
35
|
+
};
|
|
36
|
+
type CustomColor = Tagged<string, 'CustomColor'>;
|
|
37
|
+
declare function isCustomColor(color: string): color is CustomColor;
|
|
38
|
+
type Color = ThemeColor | CustomColor;
|
|
39
|
+
interface ElementColorValues {
|
|
40
|
+
readonly fill: ColorLiteral;
|
|
41
|
+
readonly stroke: ColorLiteral;
|
|
42
|
+
readonly hiContrast: ColorLiteral;
|
|
43
|
+
readonly loContrast: ColorLiteral;
|
|
44
|
+
}
|
|
45
|
+
interface RelationshipColorValues {
|
|
46
|
+
readonly line: ColorLiteral;
|
|
47
|
+
readonly labelBg: ColorLiteral;
|
|
48
|
+
readonly label: ColorLiteral;
|
|
49
|
+
}
|
|
50
|
+
interface ThemeColorValues {
|
|
51
|
+
readonly elements: ElementColorValues;
|
|
52
|
+
readonly relationships: RelationshipColorValues;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Default style values for elements, groups and relationships
|
|
56
|
+
*/
|
|
57
|
+
interface LikeC4StyleDefaults {
|
|
58
|
+
readonly color: ThemeColor;
|
|
59
|
+
readonly size: ShapeSize;
|
|
60
|
+
readonly shape: ElementShape;
|
|
61
|
+
readonly opacity?: number;
|
|
62
|
+
readonly border?: BorderStyle;
|
|
63
|
+
readonly padding?: SpacingSize;
|
|
64
|
+
readonly text?: TextSize;
|
|
65
|
+
readonly iconPosition?: IconPosition;
|
|
66
|
+
/**
|
|
67
|
+
* Default style values for groups
|
|
68
|
+
* If not specified, the default values for elements are used
|
|
69
|
+
*/
|
|
70
|
+
readonly group?: {
|
|
71
|
+
readonly color?: ThemeColor;
|
|
72
|
+
readonly opacity?: number;
|
|
73
|
+
readonly border?: BorderStyle;
|
|
74
|
+
};
|
|
75
|
+
readonly relationship: {
|
|
76
|
+
readonly color: ThemeColor;
|
|
77
|
+
readonly line: RelationshipLineType;
|
|
78
|
+
readonly arrow: RelationshipArrowType;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
interface LikeC4Theme {
|
|
82
|
+
readonly colors: Readonly<Record<ThemeColor, ThemeColorValues>>;
|
|
83
|
+
readonly sizes: Readonly<Record<ShapeSize, {
|
|
84
|
+
readonly width: number;
|
|
85
|
+
readonly height: number;
|
|
86
|
+
}>>;
|
|
87
|
+
readonly spacing: Readonly<Record<SpacingSize, number>>;
|
|
88
|
+
readonly textSizes: Readonly<Record<TextSize, number>>;
|
|
89
|
+
readonly iconSizes: Readonly<Record<IconSize, number>>;
|
|
90
|
+
}
|
|
91
|
+
interface LikeC4StylesConfig {
|
|
92
|
+
readonly theme: LikeC4Theme;
|
|
93
|
+
readonly defaults: LikeC4StyleDefaults;
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/types/operators.d.ts
|
|
97
|
+
type EqualOperator<V> = {
|
|
98
|
+
eq: V;
|
|
99
|
+
neq?: never;
|
|
100
|
+
} | {
|
|
101
|
+
eq?: never;
|
|
102
|
+
neq: V;
|
|
103
|
+
};
|
|
104
|
+
type AllNever = {
|
|
105
|
+
not?: never;
|
|
106
|
+
and?: never;
|
|
107
|
+
or?: never;
|
|
108
|
+
tag?: never;
|
|
109
|
+
kind?: never;
|
|
110
|
+
participant?: never;
|
|
111
|
+
operator?: never;
|
|
112
|
+
};
|
|
113
|
+
type TagEqual<A extends Any> = Omit<AllNever, 'tag'> & {
|
|
114
|
+
tag: EqualOperator<Tag<A>> | Tag<A>;
|
|
115
|
+
};
|
|
116
|
+
declare function isTagEqual<A extends Any>(operator: WhereOperator<A>): operator is TagEqual<A>;
|
|
117
|
+
type KindEqual<A extends Any> = Omit<AllNever, 'kind'> & {
|
|
118
|
+
kind: EqualOperator<AllKinds<A>> | AllKinds<A>;
|
|
119
|
+
};
|
|
120
|
+
declare function isKindEqual<A extends Any>(operator: WhereOperator<A>): operator is KindEqual<A>;
|
|
121
|
+
type Participant = 'source' | 'target';
|
|
122
|
+
type ParticipantOperator<A extends Any> = Omit<AllNever, 'participant' | 'operator'> & {
|
|
123
|
+
participant: Participant;
|
|
124
|
+
operator: KindEqual<A> | TagEqual<A>;
|
|
125
|
+
};
|
|
126
|
+
declare function isParticipantOperator<A extends Any>(operator: WhereOperator<A>): operator is ParticipantOperator<A>;
|
|
127
|
+
type NotOperator<A extends Any> = Omit<AllNever, 'not'> & {
|
|
128
|
+
not: WhereOperator<A>;
|
|
129
|
+
};
|
|
130
|
+
declare function isNotOperator<A extends Any>(operator: WhereOperator<A>): operator is NotOperator<A>;
|
|
131
|
+
type AndOperator<A extends Any> = Omit<AllNever, 'and'> & {
|
|
132
|
+
and: NonEmptyArray<WhereOperator<A>>;
|
|
133
|
+
};
|
|
134
|
+
declare function isAndOperator<A extends Any>(operator: WhereOperator<A>): operator is AndOperator<A>;
|
|
135
|
+
type OrOperator<A extends Any> = Omit<AllNever, 'or'> & {
|
|
136
|
+
or: NonEmptyArray<WhereOperator<A>>;
|
|
137
|
+
};
|
|
138
|
+
declare function isOrOperator<A extends Any>(operator: WhereOperator<A>): operator is OrOperator<A>;
|
|
139
|
+
type WhereOperator<A extends Any = Any> = TagEqual<A> | KindEqual<A> | ParticipantOperator<A> | NotOperator<A> | AndOperator<A> | OrOperator<A>;
|
|
140
|
+
type Filterable<A extends Any> = {
|
|
141
|
+
tags?: Tags<A> | null | undefined;
|
|
142
|
+
kind?: AllKinds<A> | null | undefined;
|
|
143
|
+
source?: Filterable<A>;
|
|
144
|
+
target?: Filterable<A>;
|
|
145
|
+
};
|
|
146
|
+
type OperatorPredicate<A extends Any> = (value: Filterable<A>) => boolean;
|
|
147
|
+
declare function whereOperatorAsPredicate<A extends Any>(operator: WhereOperator<A>): OperatorPredicate<A>;
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/types/expression.d.ts
|
|
150
|
+
type AnyAux = Any;
|
|
151
|
+
type PredicateSelector = 'children' | 'expanded' | 'descendants';
|
|
152
|
+
declare namespace FqnExpr {
|
|
153
|
+
type Wildcard = {
|
|
154
|
+
wildcard: true;
|
|
155
|
+
};
|
|
156
|
+
function isWildcard<A extends AnyAux>(expr: Expression<A>): expr is FqnExpr.Wildcard;
|
|
157
|
+
interface ModelRef<M extends AnyAux = AnyAux> {
|
|
158
|
+
ref: FqnRef.ModelRef<M>;
|
|
159
|
+
selector?: PredicateSelector;
|
|
160
|
+
}
|
|
161
|
+
function isModelRef<A extends AnyAux>(ref: Expression<A>): ref is FqnExpr.ModelRef<A>;
|
|
162
|
+
interface DeploymentRef<A extends AnyAux = AnyAux> {
|
|
163
|
+
ref: FqnRef.DeploymentRef<A>;
|
|
164
|
+
selector?: PredicateSelector;
|
|
165
|
+
}
|
|
166
|
+
function isDeploymentRef<A extends AnyAux>(expr: Expression<A>): expr is FqnExpr.DeploymentRef<A>;
|
|
167
|
+
interface ElementKindExpr<A extends AnyAux = AnyAux> {
|
|
168
|
+
elementKind: ElementKind<A>;
|
|
169
|
+
isEqual: boolean;
|
|
170
|
+
}
|
|
171
|
+
function isElementKindExpr<A extends AnyAux>(expr: Expression<A>): expr is ElementKindExpr<A>;
|
|
172
|
+
interface ElementTagExpr<A extends AnyAux = AnyAux> {
|
|
173
|
+
elementTag: Tag<A>;
|
|
174
|
+
isEqual: boolean;
|
|
175
|
+
}
|
|
176
|
+
function isElementTagExpr<A extends AnyAux>(expr: Expression<A>): expr is ElementTagExpr<A>;
|
|
177
|
+
type NonWildcard<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
178
|
+
ModelRef: ModelRef<A>;
|
|
179
|
+
DeploymentRef: DeploymentRef<A>;
|
|
180
|
+
ElementKind: ElementKindExpr<A>;
|
|
181
|
+
ElementTag: ElementTagExpr<A>;
|
|
182
|
+
}>;
|
|
183
|
+
interface Where<A extends AnyAux = AnyAux> {
|
|
184
|
+
where: {
|
|
185
|
+
expr: ExclusiveUnion<{
|
|
186
|
+
Wildcard: Wildcard;
|
|
187
|
+
ModelRef: ModelRef<A>;
|
|
188
|
+
DeploymentRef: DeploymentRef<A>;
|
|
189
|
+
ElementKind: ElementKindExpr<A>;
|
|
190
|
+
ElementTag: ElementTagExpr<A>;
|
|
191
|
+
}>;
|
|
192
|
+
condition: WhereOperator<A>;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function isWhere<A extends AnyAux>(expr: Expression<A>): expr is FqnExpr.Where<A>;
|
|
196
|
+
interface Custom<A extends AnyAux = AnyAux> {
|
|
197
|
+
custom: {
|
|
198
|
+
expr: OrWhere<A>;
|
|
199
|
+
title?: string;
|
|
200
|
+
description?: MarkdownOrString;
|
|
201
|
+
technology?: string;
|
|
202
|
+
notation?: string;
|
|
203
|
+
shape?: ElementShape;
|
|
204
|
+
color?: Color;
|
|
205
|
+
icon?: Icon;
|
|
206
|
+
iconColor?: Color;
|
|
207
|
+
iconSize?: ShapeSize;
|
|
208
|
+
iconPosition?: IconPosition;
|
|
209
|
+
border?: BorderStyle;
|
|
210
|
+
opacity?: number;
|
|
211
|
+
navigateTo?: StrictViewId<A>;
|
|
212
|
+
multiple?: boolean;
|
|
213
|
+
size?: ShapeSize;
|
|
214
|
+
padding?: ShapeSize;
|
|
215
|
+
textSize?: ShapeSize;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function isCustom<A extends AnyAux>(expr: Expression<A>): expr is Custom<A>;
|
|
219
|
+
function is<A extends AnyAux>(expr: Expression<A>): expr is FqnExpr<A>;
|
|
220
|
+
type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
221
|
+
Wildcard: FqnExpr.Wildcard;
|
|
222
|
+
ModelRef: FqnExpr.ModelRef<A>;
|
|
223
|
+
DeploymentRef: FqnExpr.DeploymentRef<A>;
|
|
224
|
+
ElementKind: ElementKindExpr<A>;
|
|
225
|
+
ElementTag: ElementTagExpr<A>;
|
|
226
|
+
Where: FqnExpr.Where<A>;
|
|
227
|
+
}>;
|
|
228
|
+
type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
229
|
+
Wildcard: Wildcard;
|
|
230
|
+
ModelRef: ModelRef<A>;
|
|
231
|
+
DeploymentRef: DeploymentRef<A>;
|
|
232
|
+
ElementKind: ElementKindExpr<A>;
|
|
233
|
+
ElementTag: ElementTagExpr<A>;
|
|
234
|
+
Where: Where<A>;
|
|
235
|
+
Custom: Custom<A>;
|
|
236
|
+
}>;
|
|
237
|
+
function unwrap<A extends AnyAux>(expr: FqnExpr.Any<A>): Wildcard | ModelRef<A> | DeploymentRef<A> | ElementKindExpr<A> | ElementTagExpr<A>;
|
|
238
|
+
}
|
|
239
|
+
type FqnExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
240
|
+
Wildcard: FqnExpr.Wildcard;
|
|
241
|
+
ModelRef: FqnExpr.ModelRef<A>;
|
|
242
|
+
DeploymentRef: FqnExpr.DeploymentRef<A>;
|
|
243
|
+
ElementKind: FqnExpr.ElementKindExpr<A>;
|
|
244
|
+
ElementTag: FqnExpr.ElementTagExpr<A>;
|
|
245
|
+
}>;
|
|
246
|
+
declare namespace RelationExpr {
|
|
247
|
+
type Endpoint<A extends AnyAux = AnyAux> = FqnExpr.Where<A>['where']['expr'];
|
|
248
|
+
interface Direct<A extends AnyAux = AnyAux> {
|
|
249
|
+
source: Endpoint<A>;
|
|
250
|
+
target: Endpoint<A>;
|
|
251
|
+
isBidirectional?: boolean;
|
|
252
|
+
}
|
|
253
|
+
function isDirect<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.Direct<A>;
|
|
254
|
+
interface Incoming<A extends AnyAux = AnyAux> {
|
|
255
|
+
incoming: Endpoint<A>;
|
|
256
|
+
}
|
|
257
|
+
function isIncoming<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.Incoming<A>;
|
|
258
|
+
interface Outgoing<A extends AnyAux = AnyAux> {
|
|
259
|
+
outgoing: Endpoint<A>;
|
|
260
|
+
}
|
|
261
|
+
function isOutgoing<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.Outgoing<A>;
|
|
262
|
+
interface InOut<A extends AnyAux = AnyAux> {
|
|
263
|
+
inout: Endpoint<A>;
|
|
264
|
+
}
|
|
265
|
+
function isInOut<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.InOut<A>;
|
|
266
|
+
interface Where<A extends AnyAux = AnyAux> {
|
|
267
|
+
where: {
|
|
268
|
+
expr: ExclusiveUnion<{
|
|
269
|
+
Direct: RelationExpr.Direct<A>;
|
|
270
|
+
Incoming: RelationExpr.Incoming<A>;
|
|
271
|
+
Outgoing: RelationExpr.Outgoing<A>;
|
|
272
|
+
InOut: RelationExpr.InOut<A>;
|
|
273
|
+
}>;
|
|
274
|
+
condition: WhereOperator<A>;
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function isWhere<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.Where<A>;
|
|
278
|
+
interface Custom<A extends AnyAux = AnyAux> {
|
|
279
|
+
customRelation: {
|
|
280
|
+
expr: OrWhere<A>;
|
|
281
|
+
title?: string;
|
|
282
|
+
description?: string;
|
|
283
|
+
technology?: string;
|
|
284
|
+
notation?: string;
|
|
285
|
+
navigateTo?: StrictViewId<A>;
|
|
286
|
+
notes?: string;
|
|
287
|
+
color?: Color;
|
|
288
|
+
line?: RelationshipLineType;
|
|
289
|
+
head?: RelationshipArrowType;
|
|
290
|
+
tail?: RelationshipArrowType;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function isCustom<A extends AnyAux>(expr: Expression<A>): expr is Custom<A>;
|
|
294
|
+
function is<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr<A>;
|
|
295
|
+
type OrWhere<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
296
|
+
Direct: Direct<A>;
|
|
297
|
+
Incoming: Incoming<A>;
|
|
298
|
+
Outgoing: Outgoing<A>;
|
|
299
|
+
InOut: InOut<A>;
|
|
300
|
+
Where: Where<A>;
|
|
301
|
+
}>;
|
|
302
|
+
type Any<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
303
|
+
Direct: Direct<A>;
|
|
304
|
+
Incoming: Incoming<A>;
|
|
305
|
+
Outgoing: Outgoing<A>;
|
|
306
|
+
InOut: InOut<A>;
|
|
307
|
+
Where: Where<A>;
|
|
308
|
+
Custom: Custom<A>;
|
|
309
|
+
}>;
|
|
310
|
+
function unwrap<A extends AnyAux>(expr: RelationExpr.Any<A>): Direct<A> | Incoming<A> | Outgoing<A> | InOut<A>;
|
|
311
|
+
}
|
|
312
|
+
type RelationExpr<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
313
|
+
Direct: RelationExpr.Direct<A>;
|
|
314
|
+
Incoming: RelationExpr.Incoming<A>;
|
|
315
|
+
Outgoing: RelationExpr.Outgoing<A>;
|
|
316
|
+
InOut: RelationExpr.InOut<A>;
|
|
317
|
+
}>;
|
|
318
|
+
/**
|
|
319
|
+
* Represents a version 2 expression which can be one of several types.
|
|
320
|
+
*
|
|
321
|
+
* @template D - The type for the deployment FQN, defaults to `Fqn`.
|
|
322
|
+
* @template M - The type for the model FQN, defaults to `Fqn`.
|
|
323
|
+
*/
|
|
324
|
+
type Expression<A extends AnyAux = AnyAux> = ExclusiveUnion<{
|
|
325
|
+
Wildcard: FqnExpr.Wildcard;
|
|
326
|
+
ModelRef: FqnExpr.ModelRef<A>;
|
|
327
|
+
DeploymentRef: FqnExpr.DeploymentRef<A>;
|
|
328
|
+
ElementKind: FqnExpr.ElementKindExpr<A>;
|
|
329
|
+
ElementTag: FqnExpr.ElementTagExpr<A>;
|
|
330
|
+
Custom: FqnExpr.Custom<A>;
|
|
331
|
+
Direct: RelationExpr.Direct<A>;
|
|
332
|
+
Incoming: RelationExpr.Incoming<A>;
|
|
333
|
+
Outgoing: RelationExpr.Outgoing<A>;
|
|
334
|
+
InOut: RelationExpr.InOut<A>;
|
|
335
|
+
Where: Expression.Where<A>;
|
|
336
|
+
CustomRelation: RelationExpr.Custom<A>;
|
|
337
|
+
}>;
|
|
338
|
+
declare namespace Expression {
|
|
339
|
+
type Where<A extends AnyAux = AnyAux> = FqnExpr.Where<A> | RelationExpr.Where<A>;
|
|
340
|
+
function isWhere<A extends AnyAux>(expr: Expression<A>): expr is Expression.Where<A>;
|
|
341
|
+
function isRelationWhere<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.Where<A>;
|
|
342
|
+
function isFqnExprWhere<A extends AnyAux>(expr: Expression<A>): expr is FqnExpr.Where<A>;
|
|
343
|
+
function isFqnExpr<A extends AnyAux>(expr: Expression<A>): expr is FqnExpr.Any<A>;
|
|
344
|
+
function isRelation<A extends AnyAux>(expr: Expression<A>): expr is RelationExpr.Any<A>;
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
347
|
+
export { ThemeColors as $, HexColor as A, ShapeSize as B, BorderStyle as C, CustomColorDefinitions as D, CustomColor as E, LikeC4Theme as F, ThemeColorValues as G, SpacingSize as H, RelationshipArrowType as I, BorderStyles as J, isCustomColor as K, RelationshipArrowTypes as L, IconSize as M, LikeC4StyleDefaults as N, ElementColorValues as O, LikeC4StylesConfig as P, Sizes as Q, RelationshipColorValues as R, whereOperatorAsPredicate as S, ColorLiteral as T, TextSize as U, Size as V, ThemeColor as W, ElementShapes as X, DefaultTagColors as Y, IconPositions as Z, isKindEqual as _, AndOperator as a, isParticipantOperator as b, KindEqual as c, OrOperator as d, Participant as f, isAndOperator as g, WhereOperator as h, RelationExpr as i, IconPosition as j, ElementShape as k, NotOperator as l, TagEqual as m, FqnExpr as n, EqualOperator as o, ParticipantOperator as p, isThemeColor as q, PredicateSelector as r, Filterable as s, Expression as t, OperatorPredicate as u, isNotOperator as v, Color as w, isTagEqual as x, isOrOperator as y, RelationshipLineType as z };
|