@likec4/core 1.10.1 → 1.12.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/index.cjs +461 -167
- package/dist/index.d.cts +202 -242
- package/dist/index.d.mts +202 -242
- package/dist/index.d.ts +202 -242
- package/dist/index.mjs +461 -169
- package/dist/shared/{core.DeifT5lC.mjs → core.BvFch1jG.mjs} +9 -6
- package/dist/shared/{core.Db3ntVII.cjs → core.CTiE4teS.cjs} +9 -5
- package/dist/shared/{core.Czd51Dd8.d.cts → core.Ik3-ZP2n.d.cts} +210 -358
- package/dist/shared/{core.Czd51Dd8.d.mts → core.Ik3-ZP2n.d.mts} +210 -358
- package/dist/shared/{core.Czd51Dd8.d.ts → core.Ik3-ZP2n.d.ts} +210 -358
- package/dist/types/index.cjs +2 -2
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +13 -9
- package/src/index.ts +2 -0
- package/src/model/LikeC4DiagramModel.ts +338 -0
- package/src/model/LikeC4Model.ts +227 -145
- package/src/model/LikeC4ViewModel.ts +45 -43
- package/src/model/index.ts +3 -2
- package/src/model/types.ts +13 -0
- package/src/types/index.ts +0 -2
- package/src/types/model.ts +10 -1
- package/src/types/view.ts +16 -6
- package/src/utils/promises.ts +13 -2
- package/src/model/__test__/LikeC4Model.spec.ts +0 -79
- package/src/utils/compare-natural.spec.ts +0 -37
- package/src/utils/fqn.spec.ts +0 -202
- package/src/utils/relations.spec.ts +0 -266
|
@@ -28,6 +28,10 @@ function t(...a){return u(e,a)}var e=(a,o)=>o.every(l=>l(a));
|
|
|
28
28
|
|
|
29
29
|
function y(...a){return u(r,a)}var r=(a,o)=>o.some(e=>e(a));
|
|
30
30
|
|
|
31
|
+
const DefaultLineStyle = "dashed";
|
|
32
|
+
const DefaultArrowType = "normal";
|
|
33
|
+
const DefaultRelationshipColor = "gray";
|
|
34
|
+
|
|
31
35
|
function AsFqn(name, parent) {
|
|
32
36
|
return parent ? parent + "." + name : name;
|
|
33
37
|
}
|
|
@@ -175,10 +179,6 @@ function whereOperatorAsPredicate(operator) {
|
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
181
|
|
|
178
|
-
const DefaultLineStyle = "dashed";
|
|
179
|
-
const DefaultArrowType = "normal";
|
|
180
|
-
const DefaultRelationshipColor = "gray";
|
|
181
|
-
|
|
182
182
|
const ThemeColors = [
|
|
183
183
|
"amber",
|
|
184
184
|
"blue",
|
|
@@ -202,8 +202,11 @@ function isViewRulePredicate(rule) {
|
|
|
202
202
|
function isViewRuleStyle(rule) {
|
|
203
203
|
return "style" in rule && "targets" in rule;
|
|
204
204
|
}
|
|
205
|
+
function isAutoLayoutDirection(autoLayout) {
|
|
206
|
+
return autoLayout === "TB" || autoLayout === "BT" || autoLayout === "LR" || autoLayout === "RL";
|
|
207
|
+
}
|
|
205
208
|
function isViewRuleAutoLayout(rule) {
|
|
206
|
-
return "
|
|
209
|
+
return "direction" in rule;
|
|
207
210
|
}
|
|
208
211
|
function isDynamicViewIncludeRule(rule) {
|
|
209
212
|
return "include" in rule && Array.isArray(rule.include);
|
|
@@ -260,4 +263,4 @@ function getBBoxCenter({
|
|
|
260
263
|
};
|
|
261
264
|
}
|
|
262
265
|
|
|
263
|
-
export {
|
|
266
|
+
export { isComputedElementView as $, AsFqn as A, BorderStyles as B, isKindEqual as C, DefaultRelationshipColor as D, ElementShapes as E, isNotOperator as F, isAndOperator as G, isOrOperator as H, whereOperatorAsPredicate as I, DefaultLineStyle as J, DefaultArrowType as K, isThemeColor as L, isViewRulePredicate as M, isViewRuleStyle as N, isAutoLayoutDirection as O, isViewRuleAutoLayout as P, isDynamicViewIncludeRule as Q, isDynamicViewParallelSteps as R, isDynamicView as S, isElementView as T, isExtendsElementView as U, isScopedElementView as V, StepEdgeId as W, isStepEdgeId as X, extractStep as Y, getParallelStepsPrefix as Z, isComputedDynamicView as _, DefaultElementShape as a, getBBoxCenter as a0, DefaultThemeColor as b, expression as c, nonexhaustive as d, e$1 as e, isElementRef as f, isExpandedElementExpr as g, isCustomElement as h, invariant as i, isWildcard as j, isElementKindExpr as k, isElementTagExpr as l, isElement as m, nonNullable as n, isElementWhere as o, isElementPredicateExpr as p, isRelation as q, isInOut as r, isIncoming as s, isOutgoing as t, u, isRelationExpression as v, isRelationWhere as w, isCustomRelationExpr as x, isRelationPredicateExpr as y, isTagEqual as z };
|
|
@@ -30,6 +30,10 @@ function t(...a){return u(e,a)}var e=(a,o)=>o.every(l=>l(a));
|
|
|
30
30
|
|
|
31
31
|
function y(...a){return u(r,a)}var r=(a,o)=>o.some(e=>e(a));
|
|
32
32
|
|
|
33
|
+
const DefaultLineStyle = "dashed";
|
|
34
|
+
const DefaultArrowType = "normal";
|
|
35
|
+
const DefaultRelationshipColor = "gray";
|
|
36
|
+
|
|
33
37
|
function AsFqn(name, parent) {
|
|
34
38
|
return parent ? parent + "." + name : name;
|
|
35
39
|
}
|
|
@@ -177,10 +181,6 @@ function whereOperatorAsPredicate(operator) {
|
|
|
177
181
|
}
|
|
178
182
|
}
|
|
179
183
|
|
|
180
|
-
const DefaultLineStyle = "dashed";
|
|
181
|
-
const DefaultArrowType = "normal";
|
|
182
|
-
const DefaultRelationshipColor = "gray";
|
|
183
|
-
|
|
184
184
|
const ThemeColors = [
|
|
185
185
|
"amber",
|
|
186
186
|
"blue",
|
|
@@ -204,8 +204,11 @@ function isViewRulePredicate(rule) {
|
|
|
204
204
|
function isViewRuleStyle(rule) {
|
|
205
205
|
return "style" in rule && "targets" in rule;
|
|
206
206
|
}
|
|
207
|
+
function isAutoLayoutDirection(autoLayout) {
|
|
208
|
+
return autoLayout === "TB" || autoLayout === "BT" || autoLayout === "LR" || autoLayout === "RL";
|
|
209
|
+
}
|
|
207
210
|
function isViewRuleAutoLayout(rule) {
|
|
208
|
-
return "
|
|
211
|
+
return "direction" in rule;
|
|
209
212
|
}
|
|
210
213
|
function isDynamicViewIncludeRule(rule) {
|
|
211
214
|
return "include" in rule && Array.isArray(rule.include);
|
|
@@ -278,6 +281,7 @@ exports.getBBoxCenter = getBBoxCenter;
|
|
|
278
281
|
exports.getParallelStepsPrefix = getParallelStepsPrefix;
|
|
279
282
|
exports.invariant = invariant;
|
|
280
283
|
exports.isAndOperator = isAndOperator;
|
|
284
|
+
exports.isAutoLayoutDirection = isAutoLayoutDirection;
|
|
281
285
|
exports.isComputedDynamicView = isComputedDynamicView;
|
|
282
286
|
exports.isComputedElementView = isComputedElementView;
|
|
283
287
|
exports.isCustomElement = isCustomElement;
|