@likec4/core 1.12.1 → 1.13.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 +777 -251
- package/dist/index.d.cts +301 -32
- package/dist/index.d.mts +301 -32
- package/dist/index.d.ts +301 -32
- package/dist/index.mjs +774 -252
- package/dist/shared/{core.BvFch1jG.mjs → core.BJDxVHFh.mjs} +19 -19
- package/dist/shared/{core.dY8efyk0.d.ts → core.C4jDMQ1i.d.cts} +242 -238
- package/dist/shared/{core.dY8efyk0.d.cts → core.C4jDMQ1i.d.mts} +242 -238
- package/dist/shared/{core.dY8efyk0.d.mts → core.C4jDMQ1i.d.ts} +242 -238
- package/dist/shared/{core.CTiE4teS.cjs → core.IR7XOEkQ.cjs} +19 -18
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +4 -3
- package/src/builder/Builder.element.ts +221 -0
- package/src/builder/Builder.model.ts +346 -0
- package/src/builder/Builder.test-d.ts +69 -0
- package/src/builder/Builder.ts +574 -0
- package/src/builder/Builder.view.ts +358 -0
- package/src/builder/Builder.views.ts +318 -0
- package/src/builder/_types.ts +195 -0
- package/src/builder/index.ts +5 -0
- package/src/index.ts +4 -0
- package/src/model/LikeC4DiagramModel.ts +5 -5
- package/src/model/LikeC4Model.ts +63 -46
- package/src/model/LikeC4ViewModel.ts +7 -7
- package/src/model/__test__/fixture.ts +5 -0
- package/src/types/element.ts +19 -11
- package/src/types/model.ts +13 -8
- package/src/types/relation.ts +1 -1
- package/src/types/view-changes.ts +6 -2
- package/src/types/view.ts +53 -22
- package/src/utils/fqn.ts +12 -11
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
function u$1(t,n,a){let o=r=>t(r,...n);return a===void 0?o:Object.assign(o,{lazy:a,lazyArgs:n})}
|
|
2
|
+
|
|
3
|
+
function u(r,n,a){let o=r.length-n.length;if(o===0)return r(...n);if(o===1)return u$1(r,n,a);throw new Error("Wrong number of arguments")}
|
|
4
|
+
|
|
5
|
+
function o(a){return t=>!a(t)}
|
|
6
|
+
|
|
7
|
+
function e$1(n){return n==null}
|
|
8
|
+
|
|
9
|
+
function n(r){return Array.isArray(r)}
|
|
10
|
+
|
|
11
|
+
function t(...a){return u(e,a)}var e=(a,o)=>o.every(l=>l(a));
|
|
12
|
+
|
|
13
|
+
function y(...a){return u(r,a)}var r=(a,o)=>o.some(e=>e(a));
|
|
14
|
+
|
|
1
15
|
function nonNullable(value, message) {
|
|
2
16
|
if (typeof value === "undefined" || value == null) {
|
|
3
17
|
throw new Error(message ?? `Expected defined value, but received ${value}`);
|
|
@@ -14,24 +28,6 @@ function nonexhaustive(value) {
|
|
|
14
28
|
throw new Error(`NonExhaustive value: ${value}`);
|
|
15
29
|
}
|
|
16
30
|
|
|
17
|
-
function u$1(t,n,a){let o=r=>t(r,...n);return a===void 0?o:Object.assign(o,{lazy:a,lazyArgs:n})}
|
|
18
|
-
|
|
19
|
-
function u(r,n,a){let o=r.length-n.length;if(o===0)return r(...n);if(o===1)return u$1(r,n,a);throw new Error("Wrong number of arguments")}
|
|
20
|
-
|
|
21
|
-
function o(a){return t=>!a(t)}
|
|
22
|
-
|
|
23
|
-
function e$1(n){return n==null}
|
|
24
|
-
|
|
25
|
-
function n(r){return Array.isArray(r)}
|
|
26
|
-
|
|
27
|
-
function t(...a){return u(e,a)}var e=(a,o)=>o.every(l=>l(a));
|
|
28
|
-
|
|
29
|
-
function y(...a){return u(r,a)}var r=(a,o)=>o.some(e=>e(a));
|
|
30
|
-
|
|
31
|
-
const DefaultLineStyle = "dashed";
|
|
32
|
-
const DefaultArrowType = "normal";
|
|
33
|
-
const DefaultRelationshipColor = "gray";
|
|
34
|
-
|
|
35
31
|
function AsFqn(name, parent) {
|
|
36
32
|
return parent ? parent + "." + name : name;
|
|
37
33
|
}
|
|
@@ -179,6 +175,10 @@ function whereOperatorAsPredicate(operator) {
|
|
|
179
175
|
}
|
|
180
176
|
}
|
|
181
177
|
|
|
178
|
+
const DefaultLineStyle = "dashed";
|
|
179
|
+
const DefaultArrowType = "normal";
|
|
180
|
+
const DefaultRelationshipColor = "gray";
|
|
181
|
+
|
|
182
182
|
const ThemeColors = [
|
|
183
183
|
"amber",
|
|
184
184
|
"blue",
|
|
@@ -263,4 +263,4 @@ function getBBoxCenter({
|
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
export {
|
|
266
|
+
export { isComputedDynamicView as $, AsFqn as A, BorderStyles as B, isRelationPredicateExpr as C, DefaultThemeColor as D, ElementShapes as E, isTagEqual as F, isKindEqual as G, isNotOperator as H, isAndOperator as I, isOrOperator as J, whereOperatorAsPredicate as K, DefaultLineStyle as L, DefaultArrowType as M, isThemeColor as N, isViewRulePredicate as O, isViewRuleStyle as P, isAutoLayoutDirection as Q, isViewRuleAutoLayout as R, isDynamicViewIncludeRule as S, isDynamicViewParallelSteps as T, isDynamicView as U, isElementView as V, isExtendsElementView as W, StepEdgeId as X, isStepEdgeId as Y, extractStep as Z, getParallelStepsPrefix as _, invariant as a, isComputedElementView as a0, getBBoxCenter as a1, isScopedElementView as b, DefaultElementShape as c, nonNullable as d, e$1 as e, DefaultRelationshipColor as f, expression as g, nonexhaustive as h, isElementPredicateExpr as i, isElementRef as j, isExpandedElementExpr as k, isCustomElement as l, isWildcard as m, n, isElementKindExpr as o, isElementTagExpr as p, isElement as q, isElementWhere as r, isRelation as s, isInOut as t, u, isIncoming as v, isOutgoing as w, isRelationExpression as x, isRelationWhere as y, isCustomRelationExpr as z };
|