@likec4/core 1.19.1 → 1.20.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/builder/index.cjs +881 -0
- package/dist/builder/index.d.cts +503 -0
- package/dist/builder/index.d.mts +5 -4
- package/dist/builder/index.d.ts +5 -4
- package/dist/builder/{index.js → index.mjs} +14 -4
- package/dist/compute-view/index.cjs +86 -0
- package/dist/compute-view/index.d.cts +23 -0
- package/dist/compute-view/index.d.mts +3 -2
- package/dist/compute-view/index.d.ts +3 -2
- package/dist/compute-view/{index.js → index.mjs} +6 -5
- package/dist/index.cjs +4320 -0
- package/dist/index.d.cts +270 -0
- package/dist/index.d.mts +130 -4
- package/dist/index.d.ts +130 -4
- package/dist/{index.js → index.mjs} +512 -7
- package/dist/model/index.cjs +40 -0
- package/dist/model/index.d.cts +259 -0
- package/dist/model/index.d.mts +8 -3
- package/dist/model/index.d.ts +8 -3
- package/dist/model/index.mjs +1 -0
- package/dist/shared/core.B2QYWlYe.cjs +435 -0
- package/dist/shared/core.B72vUaNB.d.cts +850 -0
- package/dist/shared/core.BGus30EM.cjs +8027 -0
- package/dist/shared/core.BRuJ3Wzf.d.mts +12 -0
- package/dist/shared/{core.BZ9Msq7w.d.mts → core.BdbFkE_p.d.cts} +14 -4
- package/dist/shared/core.BvdNMbcA.d.cts +12 -0
- package/dist/shared/{object_hash.CE_oF3I3.js → core.BxvDITEI.mjs} +26 -389
- package/dist/shared/core.ByNgh-mC.d.cts +127 -0
- package/dist/shared/core.C9DCnJh8.cjs +908 -0
- package/dist/shared/{index.DafVOuVd.js → core.CqCTxzMY.mjs} +1111 -572
- package/dist/shared/core.D74xkKkG.d.cts +148 -0
- package/dist/shared/{core.C05RDLhi.d.ts → core.D_Gc58Gt.d.ts} +23 -5
- package/dist/shared/core.Damrzla-.d.ts +12 -0
- package/dist/shared/{core.CmYMqgha.d.mts → core.Dfzrh1VA.d.mts} +23 -5
- package/dist/shared/core.DsoCu540.cjs +26 -0
- package/dist/shared/{view.CyZrG8BJ.js → core.DunIMHRf.mjs} +27 -1
- package/dist/shared/{core.BIfgabEw.d.ts → core.ZWiGANIJ.d.ts} +14 -4
- package/dist/shared/core.gv1bMwCC.cjs +39 -0
- package/dist/shared/core.jy6z2iRn.d.mts +729 -0
- package/dist/shared/core.m3rCQAv6.mjs +37 -0
- package/dist/types/index.cjs +107 -0
- package/dist/types/index.d.cts +72 -0
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/{index.js → index.mjs} +1 -1
- package/dist/utils/index.cjs +95 -0
- package/dist/utils/index.d.cts +356 -0
- package/dist/utils/index.d.mts +1 -64
- package/dist/utils/index.d.ts +1 -64
- package/dist/utils/index.mjs +56 -0
- package/package.json +52 -26
- package/src/builder/Builder.view-common.ts +21 -1
- package/src/compute-view/deployment-view/__test__/fixture.ts +31 -3
- package/src/compute-view/deployment-view/_types.ts +2 -1
- package/src/compute-view/deployment-view/compute.ts +4 -36
- package/src/compute-view/deployment-view/predicates/index.ts +8 -0
- package/src/compute-view/deployment-view/predicates/relation-direct.ts +125 -99
- package/src/compute-view/deployment-view/predicates/relation-in-out.ts +16 -8
- package/src/compute-view/deployment-view/predicates/relation-incoming.ts +18 -12
- package/src/compute-view/deployment-view/predicates/relation-outgoing.ts +16 -9
- package/src/compute-view/deployment-view/predicates/relation-where.ts +18 -0
- package/src/compute-view/deployment-view/predicates/utils.ts +214 -0
- package/src/compute-view/element-view/__test__/fixture.ts +17 -4
- package/src/compute-view/element-view/compute.ts +3 -2
- package/src/compute-view/element-view/predicates.ts +520 -0
- package/src/compute-view/element-view/utils.ts +11 -7
- package/src/compute-view/index.ts +1 -0
- package/src/compute-view/relationships-view/_types.ts +16 -0
- package/src/compute-view/relationships-view/compute.ts +74 -0
- package/src/compute-view/relationships-view/layout.ts +357 -0
- package/src/compute-view/relationships-view/utils.ts +40 -0
- package/src/compute-view/utils/relationExpressionToPredicates.ts +11 -4
- package/src/index.ts +16 -0
- package/src/model/DeploymentElementModel.ts +18 -1
- package/src/model/ElementModel.ts +13 -0
- package/src/model/LikeC4Model.ts +2 -2
- package/src/model/RelationModel.ts +9 -0
- package/src/model/connection/deployment/DeploymentConnectionModel.ts +11 -1
- package/src/model/guards.ts +17 -1
- package/src/model/view/LikeC4ViewModel.ts +7 -1
- package/src/model/view/NodeModel.ts +5 -0
- package/src/types/deployments.ts +1 -0
- package/src/types/expression-v2.ts +12 -0
- package/src/types/index.ts +1 -0
- package/src/types/operators.ts +46 -6
- package/src/types/view.ts +2 -2
- package/src/utils/index.ts +0 -5
- package/src/utils/iterable/unique.ts +1 -7
- package/dist/model/index.js +0 -1
- package/dist/utils/index.js +0 -347
- /package/dist/shared/{chunk-RAAYCPUM.M-JWF7SS.js → core.M-JWF7SS.mjs} +0 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const chunkRAAYCPUM = require('./core.DsoCu540.cjs');
|
|
4
|
+
|
|
5
|
+
function o$1(a){return t=>!a(t)}
|
|
6
|
+
|
|
7
|
+
function n(e){return e==null}
|
|
8
|
+
|
|
9
|
+
function o(r){return Array.isArray(r)}
|
|
10
|
+
|
|
11
|
+
function t(...a){return chunkRAAYCPUM.u(e,a)}var e=(a,o)=>o.every(l=>l(a));
|
|
12
|
+
|
|
13
|
+
function y(...a){return chunkRAAYCPUM.u(r,a)}var r=(a,o)=>o.some(e=>e(a));
|
|
14
|
+
|
|
15
|
+
exports.DeploymentElement = void 0;
|
|
16
|
+
((DeploymentElement2) => {
|
|
17
|
+
DeploymentElement2.isDeploymentNode = (el) => {
|
|
18
|
+
return "kind" in el && !("element" in el);
|
|
19
|
+
};
|
|
20
|
+
DeploymentElement2.isInstance = (el) => {
|
|
21
|
+
return "element" in el && !("kind" in el);
|
|
22
|
+
};
|
|
23
|
+
})(exports.DeploymentElement || (exports.DeploymentElement = {}));
|
|
24
|
+
|
|
25
|
+
function AsFqn(name, parent) {
|
|
26
|
+
return parent ? parent + "." + name : name;
|
|
27
|
+
}
|
|
28
|
+
const BorderStyles = ["solid", "dashed", "dotted", "none"];
|
|
29
|
+
exports.ElementKind = void 0;
|
|
30
|
+
((ElementKind2) => {
|
|
31
|
+
ElementKind2.Group = "@group";
|
|
32
|
+
})(exports.ElementKind || (exports.ElementKind = {}));
|
|
33
|
+
const ElementShapes = [
|
|
34
|
+
"rectangle",
|
|
35
|
+
"person",
|
|
36
|
+
"browser",
|
|
37
|
+
"mobile",
|
|
38
|
+
"cylinder",
|
|
39
|
+
"storage",
|
|
40
|
+
"queue"
|
|
41
|
+
];
|
|
42
|
+
const DefaultThemeColor = "primary";
|
|
43
|
+
const DefaultElementShape = "rectangle";
|
|
44
|
+
|
|
45
|
+
function isElementRef(expr) {
|
|
46
|
+
return "element" in expr;
|
|
47
|
+
}
|
|
48
|
+
function isExpandedElementExpr(expr) {
|
|
49
|
+
return "expanded" in expr;
|
|
50
|
+
}
|
|
51
|
+
function isCustomElement(expr) {
|
|
52
|
+
return "custom" in expr && (isElement(expr.custom.expr) || isElementWhere(expr.custom.expr));
|
|
53
|
+
}
|
|
54
|
+
function isWildcard(expr) {
|
|
55
|
+
return "wildcard" in expr;
|
|
56
|
+
}
|
|
57
|
+
function isElementKindExpr(expr) {
|
|
58
|
+
return "elementKind" in expr && "isEqual" in expr;
|
|
59
|
+
}
|
|
60
|
+
function isElementTagExpr(expr) {
|
|
61
|
+
return "elementTag" in expr && "isEqual" in expr;
|
|
62
|
+
}
|
|
63
|
+
function isElement(expr) {
|
|
64
|
+
return isElementRef(expr) || isWildcard(expr) || isElementKindExpr(expr) || isElementTagExpr(expr) || isExpandedElementExpr(expr);
|
|
65
|
+
}
|
|
66
|
+
function isElementWhere(expr) {
|
|
67
|
+
return "where" in expr && isElement(expr.where.expr);
|
|
68
|
+
}
|
|
69
|
+
function isElementPredicateExpr(expr) {
|
|
70
|
+
return isElement(expr) || isElementWhere(expr) || isCustomElement(expr);
|
|
71
|
+
}
|
|
72
|
+
function isRelation(expr) {
|
|
73
|
+
return "source" in expr && "target" in expr;
|
|
74
|
+
}
|
|
75
|
+
function isInOut(expr) {
|
|
76
|
+
return "inout" in expr;
|
|
77
|
+
}
|
|
78
|
+
function isIncoming(expr) {
|
|
79
|
+
return "incoming" in expr;
|
|
80
|
+
}
|
|
81
|
+
function isOutgoing(expr) {
|
|
82
|
+
return "outgoing" in expr;
|
|
83
|
+
}
|
|
84
|
+
function isRelationExpression(expr) {
|
|
85
|
+
return isRelation(expr) || isInOut(expr) || isIncoming(expr) || isOutgoing(expr);
|
|
86
|
+
}
|
|
87
|
+
function isRelationWhere(expr) {
|
|
88
|
+
return "where" in expr && isRelationExpression(expr.where.expr);
|
|
89
|
+
}
|
|
90
|
+
function isCustomRelationExpr(expr) {
|
|
91
|
+
return "customRelation" in expr;
|
|
92
|
+
}
|
|
93
|
+
function isRelationPredicateExpr(expr) {
|
|
94
|
+
return isRelationExpression(expr) || isRelationWhere(expr) || isCustomRelationExpr(expr);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const expression = {
|
|
98
|
+
__proto__: null,
|
|
99
|
+
isCustomElement: isCustomElement,
|
|
100
|
+
isCustomRelationExpr: isCustomRelationExpr,
|
|
101
|
+
isElement: isElement,
|
|
102
|
+
isElementKindExpr: isElementKindExpr,
|
|
103
|
+
isElementPredicateExpr: isElementPredicateExpr,
|
|
104
|
+
isElementRef: isElementRef,
|
|
105
|
+
isElementTagExpr: isElementTagExpr,
|
|
106
|
+
isElementWhere: isElementWhere,
|
|
107
|
+
isExpandedElementExpr: isExpandedElementExpr,
|
|
108
|
+
isInOut: isInOut,
|
|
109
|
+
isIncoming: isIncoming,
|
|
110
|
+
isOutgoing: isOutgoing,
|
|
111
|
+
isRelation: isRelation,
|
|
112
|
+
isRelationExpression: isRelationExpression,
|
|
113
|
+
isRelationPredicateExpr: isRelationPredicateExpr,
|
|
114
|
+
isRelationWhere: isRelationWhere,
|
|
115
|
+
isWildcard: isWildcard
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
exports.FqnRef = void 0;
|
|
119
|
+
((FqnRef2) => {
|
|
120
|
+
FqnRef2.isInsideInstanceRef = (ref) => {
|
|
121
|
+
return "deployment" in ref && "element" in ref;
|
|
122
|
+
};
|
|
123
|
+
FqnRef2.isDeploymentElementRef = (ref) => {
|
|
124
|
+
return "deployment" in ref && !("element" in ref);
|
|
125
|
+
};
|
|
126
|
+
FqnRef2.isDeploymentRef = (ref) => {
|
|
127
|
+
return !(0, FqnRef2.isModelRef)(ref);
|
|
128
|
+
};
|
|
129
|
+
FqnRef2.isModelRef = (ref) => {
|
|
130
|
+
return "model" in ref;
|
|
131
|
+
};
|
|
132
|
+
FqnRef2.toDeploymentRef = (ref) => {
|
|
133
|
+
chunkRAAYCPUM.invariant((0, FqnRef2.isDeploymentRef)(ref), "Expected DeploymentRef");
|
|
134
|
+
return (0, FqnRef2.isInsideInstanceRef)(ref) ? {
|
|
135
|
+
id: ref.deployment,
|
|
136
|
+
element: ref.element
|
|
137
|
+
} : {
|
|
138
|
+
id: ref.deployment
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
})(exports.FqnRef || (exports.FqnRef = {}));
|
|
142
|
+
exports.FqnExpr = void 0;
|
|
143
|
+
((FqnExpr2) => {
|
|
144
|
+
FqnExpr2.isWildcard = (expr) => {
|
|
145
|
+
return "wildcard" in expr && expr.wildcard === true;
|
|
146
|
+
};
|
|
147
|
+
FqnExpr2.isModelRef = (ref) => {
|
|
148
|
+
return "ref" in ref && exports.FqnRef.isModelRef(ref.ref);
|
|
149
|
+
};
|
|
150
|
+
FqnExpr2.isDeploymentRef = (ref) => {
|
|
151
|
+
return "ref" in ref && exports.FqnRef.isDeploymentRef(ref.ref);
|
|
152
|
+
};
|
|
153
|
+
})(exports.FqnExpr || (exports.FqnExpr = {}));
|
|
154
|
+
exports.RelationExpr = void 0;
|
|
155
|
+
((RelationExpr2) => {
|
|
156
|
+
RelationExpr2.isDirect = (expr) => {
|
|
157
|
+
return "source" in expr && "target" in expr;
|
|
158
|
+
};
|
|
159
|
+
RelationExpr2.isIncoming = (expr) => {
|
|
160
|
+
return "incoming" in expr;
|
|
161
|
+
};
|
|
162
|
+
RelationExpr2.isOutgoing = (expr) => {
|
|
163
|
+
return "outgoing" in expr;
|
|
164
|
+
};
|
|
165
|
+
RelationExpr2.isInOut = (expr) => {
|
|
166
|
+
return "inout" in expr;
|
|
167
|
+
};
|
|
168
|
+
RelationExpr2.isWhere = (expr) => {
|
|
169
|
+
return "where" in expr;
|
|
170
|
+
};
|
|
171
|
+
})(exports.RelationExpr || (exports.RelationExpr = {}));
|
|
172
|
+
exports.ExpressionV2 = void 0;
|
|
173
|
+
((ExpressionV22) => {
|
|
174
|
+
ExpressionV22.isFqnExpr = (expr) => {
|
|
175
|
+
return exports.FqnExpr.isWildcard(expr) || exports.FqnExpr.isModelRef(expr) || exports.FqnExpr.isDeploymentRef(expr);
|
|
176
|
+
};
|
|
177
|
+
ExpressionV22.isRelation = (expr) => {
|
|
178
|
+
return exports.RelationExpr.isDirect(expr) || exports.RelationExpr.isIncoming(expr) || exports.RelationExpr.isOutgoing(expr) || exports.RelationExpr.isInOut(expr);
|
|
179
|
+
};
|
|
180
|
+
})(exports.ExpressionV2 || (exports.ExpressionV2 = {}));
|
|
181
|
+
|
|
182
|
+
const isTagEqual = (operator) => {
|
|
183
|
+
return "tag" in operator;
|
|
184
|
+
};
|
|
185
|
+
const isKindEqual = (operator) => {
|
|
186
|
+
return "kind" in operator;
|
|
187
|
+
};
|
|
188
|
+
const isParticipantOperator = (operator) => {
|
|
189
|
+
return "participant" in operator;
|
|
190
|
+
};
|
|
191
|
+
const isNotOperator = (operator) => {
|
|
192
|
+
return "not" in operator;
|
|
193
|
+
};
|
|
194
|
+
const isAndOperator = (operator) => {
|
|
195
|
+
return "and" in operator;
|
|
196
|
+
};
|
|
197
|
+
const isOrOperator = (operator) => {
|
|
198
|
+
return "or" in operator;
|
|
199
|
+
};
|
|
200
|
+
function whereOperatorAsPredicate(operator) {
|
|
201
|
+
switch (true) {
|
|
202
|
+
case isParticipantOperator(operator): {
|
|
203
|
+
const participant = operator.participant;
|
|
204
|
+
const participantPredicate = whereOperatorAsPredicate(operator.operator);
|
|
205
|
+
return participantIs(participant, participantPredicate);
|
|
206
|
+
}
|
|
207
|
+
case isTagEqual(operator): {
|
|
208
|
+
if ("eq" in operator.tag) {
|
|
209
|
+
const tag2 = operator.tag.eq;
|
|
210
|
+
return (value) => {
|
|
211
|
+
return Array.isArray(value.tags) && value.tags.includes(tag2);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
const tag = operator.tag.neq;
|
|
215
|
+
return (value) => {
|
|
216
|
+
return !Array.isArray(value.tags) || !value.tags.includes(tag);
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
case isKindEqual(operator): {
|
|
220
|
+
if ("eq" in operator.kind) {
|
|
221
|
+
const kind2 = operator.kind.eq;
|
|
222
|
+
return (value) => {
|
|
223
|
+
return value.kind === kind2;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
const kind = operator.kind.neq;
|
|
227
|
+
return (value) => {
|
|
228
|
+
return n(value.kind) || value.kind !== kind;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
case isNotOperator(operator): {
|
|
232
|
+
const predicate = whereOperatorAsPredicate(operator.not);
|
|
233
|
+
return o$1(predicate);
|
|
234
|
+
}
|
|
235
|
+
case isAndOperator(operator): {
|
|
236
|
+
const predicates = operator.and.map(whereOperatorAsPredicate);
|
|
237
|
+
return t(predicates);
|
|
238
|
+
}
|
|
239
|
+
case isOrOperator(operator): {
|
|
240
|
+
const predicates = operator.or.map(whereOperatorAsPredicate);
|
|
241
|
+
return y(predicates);
|
|
242
|
+
}
|
|
243
|
+
default:
|
|
244
|
+
chunkRAAYCPUM.nonexhaustive(operator);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function participantIs(participant, predicate) {
|
|
248
|
+
return (value) => {
|
|
249
|
+
if (!value.source || !value.target) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
switch (participant) {
|
|
253
|
+
case "source": {
|
|
254
|
+
return predicate(value.source);
|
|
255
|
+
}
|
|
256
|
+
case "target": {
|
|
257
|
+
return predicate(value.target);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const DefaultLineStyle = "dashed";
|
|
264
|
+
const DefaultArrowType = "normal";
|
|
265
|
+
const DefaultRelationshipColor = "gray";
|
|
266
|
+
|
|
267
|
+
function isViewRulePredicate(rule) {
|
|
268
|
+
return "include" in rule && Array.isArray(rule.include) || "exclude" in rule && Array.isArray(rule.exclude);
|
|
269
|
+
}
|
|
270
|
+
function isViewRuleGlobalPredicateRef(rule) {
|
|
271
|
+
return "predicateId" in rule;
|
|
272
|
+
}
|
|
273
|
+
function isViewRuleStyle(rule) {
|
|
274
|
+
return "style" in rule && "targets" in rule && Array.isArray(rule.targets);
|
|
275
|
+
}
|
|
276
|
+
function isViewRuleGlobalStyle(rule) {
|
|
277
|
+
return "styleId" in rule;
|
|
278
|
+
}
|
|
279
|
+
function isAutoLayoutDirection(autoLayout) {
|
|
280
|
+
return autoLayout === "TB" || autoLayout === "BT" || autoLayout === "LR" || autoLayout === "RL";
|
|
281
|
+
}
|
|
282
|
+
function isViewRuleAutoLayout(rule) {
|
|
283
|
+
return "direction" in rule;
|
|
284
|
+
}
|
|
285
|
+
function isViewRuleGroup(rule) {
|
|
286
|
+
return "title" in rule && "groupRules" in rule && Array.isArray(rule.groupRules);
|
|
287
|
+
}
|
|
288
|
+
function isDynamicViewParallelSteps(step) {
|
|
289
|
+
return "__parallel" in step && o(step.__parallel);
|
|
290
|
+
}
|
|
291
|
+
function isDeploymentView(view) {
|
|
292
|
+
return view.__ === "deployment";
|
|
293
|
+
}
|
|
294
|
+
function isDynamicView(view) {
|
|
295
|
+
return view.__ === "dynamic";
|
|
296
|
+
}
|
|
297
|
+
function isElementView(view) {
|
|
298
|
+
return n(view.__) || view.__ === "element";
|
|
299
|
+
}
|
|
300
|
+
function isExtendsElementView(view) {
|
|
301
|
+
return isElementView(view) && "extends" in view;
|
|
302
|
+
}
|
|
303
|
+
function isScopedElementView(view) {
|
|
304
|
+
return isElementView(view) && "viewOf" in view;
|
|
305
|
+
}
|
|
306
|
+
function stepEdgeId(step, parallelStep) {
|
|
307
|
+
const id = `step-${String(step).padStart(2, "0")}`;
|
|
308
|
+
return parallelStep ? `${id}.${parallelStep}` : id;
|
|
309
|
+
}
|
|
310
|
+
function isStepEdgeId(id) {
|
|
311
|
+
return id.startsWith("step-");
|
|
312
|
+
}
|
|
313
|
+
function extractStep(id) {
|
|
314
|
+
if (!isStepEdgeId(id)) {
|
|
315
|
+
throw new Error(`Invalid step edge id: ${id}`);
|
|
316
|
+
}
|
|
317
|
+
return parseFloat(id.slice("step-".length));
|
|
318
|
+
}
|
|
319
|
+
function getParallelStepsPrefix(id) {
|
|
320
|
+
if (isStepEdgeId(id) && id.includes(".")) {
|
|
321
|
+
return id.slice(0, id.indexOf(".") + 1);
|
|
322
|
+
}
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
exports.ComputedNode = void 0;
|
|
326
|
+
((ComputedNode2) => {
|
|
327
|
+
function modelRef(node) {
|
|
328
|
+
return node.modelRef === 1 ? node.id : node.modelRef ?? null;
|
|
329
|
+
}
|
|
330
|
+
ComputedNode2.modelRef = modelRef;
|
|
331
|
+
function deploymentRef(node) {
|
|
332
|
+
return node.deploymentRef === 1 ? node.id : node.deploymentRef ?? null;
|
|
333
|
+
}
|
|
334
|
+
ComputedNode2.deploymentRef = deploymentRef;
|
|
335
|
+
function isNodesGroup(node) {
|
|
336
|
+
return node.kind === exports.ElementKind.Group;
|
|
337
|
+
}
|
|
338
|
+
ComputedNode2.isNodesGroup = isNodesGroup;
|
|
339
|
+
})(exports.ComputedNode || (exports.ComputedNode = {}));
|
|
340
|
+
exports.ComputedView = void 0;
|
|
341
|
+
((ComputedView2) => {
|
|
342
|
+
function isDeployment(view) {
|
|
343
|
+
return view.__ === "deployment";
|
|
344
|
+
}
|
|
345
|
+
ComputedView2.isDeployment = isDeployment;
|
|
346
|
+
function isDynamic(view) {
|
|
347
|
+
return view.__ === "dynamic";
|
|
348
|
+
}
|
|
349
|
+
ComputedView2.isDynamic = isDynamic;
|
|
350
|
+
function isElement(view) {
|
|
351
|
+
return n(view.__) || view.__ === "element";
|
|
352
|
+
}
|
|
353
|
+
ComputedView2.isElement = isElement;
|
|
354
|
+
})(exports.ComputedView || (exports.ComputedView = {}));
|
|
355
|
+
function getBBoxCenter({
|
|
356
|
+
x,
|
|
357
|
+
y,
|
|
358
|
+
width,
|
|
359
|
+
height
|
|
360
|
+
}) {
|
|
361
|
+
return {
|
|
362
|
+
x: x + width / 2,
|
|
363
|
+
y: y + height / 2
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
exports.DiagramNode = void 0;
|
|
367
|
+
((DiagramNode2) => {
|
|
368
|
+
function modelRef(node) {
|
|
369
|
+
return node.modelRef === 1 ? node.id : node.modelRef ?? null;
|
|
370
|
+
}
|
|
371
|
+
DiagramNode2.modelRef = modelRef;
|
|
372
|
+
function deploymentRef(node) {
|
|
373
|
+
return node.deploymentRef === 1 ? node.id : node.deploymentRef ?? null;
|
|
374
|
+
}
|
|
375
|
+
DiagramNode2.deploymentRef = deploymentRef;
|
|
376
|
+
function isNodesGroup(node) {
|
|
377
|
+
return node.kind === exports.ElementKind.Group;
|
|
378
|
+
}
|
|
379
|
+
DiagramNode2.isNodesGroup = isNodesGroup;
|
|
380
|
+
})(exports.DiagramNode || (exports.DiagramNode = {}));
|
|
381
|
+
|
|
382
|
+
exports.AsFqn = AsFqn;
|
|
383
|
+
exports.BorderStyles = BorderStyles;
|
|
384
|
+
exports.DefaultArrowType = DefaultArrowType;
|
|
385
|
+
exports.DefaultElementShape = DefaultElementShape;
|
|
386
|
+
exports.DefaultLineStyle = DefaultLineStyle;
|
|
387
|
+
exports.DefaultRelationshipColor = DefaultRelationshipColor;
|
|
388
|
+
exports.DefaultThemeColor = DefaultThemeColor;
|
|
389
|
+
exports.ElementShapes = ElementShapes;
|
|
390
|
+
exports.expression = expression;
|
|
391
|
+
exports.extractStep = extractStep;
|
|
392
|
+
exports.getBBoxCenter = getBBoxCenter;
|
|
393
|
+
exports.getParallelStepsPrefix = getParallelStepsPrefix;
|
|
394
|
+
exports.isAndOperator = isAndOperator;
|
|
395
|
+
exports.isAutoLayoutDirection = isAutoLayoutDirection;
|
|
396
|
+
exports.isCustomElement = isCustomElement;
|
|
397
|
+
exports.isCustomRelationExpr = isCustomRelationExpr;
|
|
398
|
+
exports.isDeploymentView = isDeploymentView;
|
|
399
|
+
exports.isDynamicView = isDynamicView;
|
|
400
|
+
exports.isDynamicViewParallelSteps = isDynamicViewParallelSteps;
|
|
401
|
+
exports.isElement = isElement;
|
|
402
|
+
exports.isElementKindExpr = isElementKindExpr;
|
|
403
|
+
exports.isElementPredicateExpr = isElementPredicateExpr;
|
|
404
|
+
exports.isElementRef = isElementRef;
|
|
405
|
+
exports.isElementTagExpr = isElementTagExpr;
|
|
406
|
+
exports.isElementView = isElementView;
|
|
407
|
+
exports.isElementWhere = isElementWhere;
|
|
408
|
+
exports.isExpandedElementExpr = isExpandedElementExpr;
|
|
409
|
+
exports.isExtendsElementView = isExtendsElementView;
|
|
410
|
+
exports.isInOut = isInOut;
|
|
411
|
+
exports.isIncoming = isIncoming;
|
|
412
|
+
exports.isKindEqual = isKindEqual;
|
|
413
|
+
exports.isNotOperator = isNotOperator;
|
|
414
|
+
exports.isOrOperator = isOrOperator;
|
|
415
|
+
exports.isOutgoing = isOutgoing;
|
|
416
|
+
exports.isRelation = isRelation;
|
|
417
|
+
exports.isRelationExpression = isRelationExpression;
|
|
418
|
+
exports.isRelationPredicateExpr = isRelationPredicateExpr;
|
|
419
|
+
exports.isRelationWhere = isRelationWhere;
|
|
420
|
+
exports.isScopedElementView = isScopedElementView;
|
|
421
|
+
exports.isStepEdgeId = isStepEdgeId;
|
|
422
|
+
exports.isTagEqual = isTagEqual;
|
|
423
|
+
exports.isViewRuleAutoLayout = isViewRuleAutoLayout;
|
|
424
|
+
exports.isViewRuleGlobalPredicateRef = isViewRuleGlobalPredicateRef;
|
|
425
|
+
exports.isViewRuleGlobalStyle = isViewRuleGlobalStyle;
|
|
426
|
+
exports.isViewRuleGroup = isViewRuleGroup;
|
|
427
|
+
exports.isViewRulePredicate = isViewRulePredicate;
|
|
428
|
+
exports.isViewRuleStyle = isViewRuleStyle;
|
|
429
|
+
exports.isWildcard = isWildcard;
|
|
430
|
+
exports.n = n;
|
|
431
|
+
exports.o = o;
|
|
432
|
+
exports.o$1 = o$1;
|
|
433
|
+
exports.stepEdgeId = stepEdgeId;
|
|
434
|
+
exports.whereOperatorAsPredicate = whereOperatorAsPredicate;
|
|
435
|
+
exports.y = y;
|