bg-editor 0.0.1 → 0.0.3
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/_baseUniq-DtZISqda.js +473 -0
- package/dist/{arc-wItjmL5I.js → arc-BpOtYBpP.js} +1 -7
- package/dist/architecture-U656AL7Q-BN22wDFh.js +6 -0
- package/dist/{architectureDiagram-VXUJARFQ-iG5MkBjx.js → architectureDiagram-VXUJARFQ-D90AF2uK.js} +4 -10
- package/dist/{blockDiagram-VD42YOAC-i2GlXmWy.js → blockDiagram-VD42YOAC-DXQNldkG.js} +5 -11
- package/dist/{c4Diagram-YG6GDRKO-IufO7T1R.js → c4Diagram-YG6GDRKO-Bl1xCfsC.js} +2 -8
- package/dist/channel-BiQYlsVc.js +6 -0
- package/dist/{chunk-4BX2VUAB-5_v9rnje.js → chunk-4BX2VUAB-JnvgOgeI.js} +1 -7
- package/dist/{chunk-55IACEB6-BDNtSypP.js → chunk-55IACEB6-DvzYdqd0.js} +1 -7
- package/dist/{chunk-B4BG7PRW-DzaYPsfW.js → chunk-B4BG7PRW-D2zs0pMT.js} +4 -10
- package/dist/{chunk-DI55MBZ5-Buwrprkw.js → chunk-DI55MBZ5-IhCs2q12.js} +3 -9
- package/dist/{chunk-FMBD7UC4-BaEPEIWb.js → chunk-FMBD7UC4-CI7_2stl.js} +1 -7
- package/dist/{chunk-QN33PNHL-DhbA7i5G.js → chunk-QN33PNHL-D3gdmDbi.js} +1 -7
- package/dist/{chunk-QZHKN3VN-BAb_D1oz.js → chunk-QZHKN3VN-BaqG_46X.js} +1 -7
- package/dist/{chunk-TZMSLE5B-OU1MJ2do.js → chunk-TZMSLE5B-fUTKpgTY.js} +1 -7
- package/dist/{classDiagram-v2-WZHVMYZB-KStC8v09.js → classDiagram-2ON5EDUG-BbUC7jyd.js} +2 -8
- package/dist/{classDiagram-2ON5EDUG-KStC8v09.js → classDiagram-v2-WZHVMYZB-BbUC7jyd.js} +2 -8
- package/dist/clone-CDwfUPH_.js +9 -0
- package/dist/{cose-bilkent-S5V4N54A-eRXCoix2.js → cose-bilkent-S5V4N54A-BfRx9IMy.js} +8 -14
- package/dist/{cytoscape.esm-BG3R4uVs.js → cytoscape.esm-DoU_GB5M.js} +0 -6
- package/dist/{dagre-6UL2VRFP-Bi83jPQf.js → dagre-6UL2VRFP-pX_n00Op.js} +116 -123
- package/dist/{defaultLocale-DgmhL6Re.js → defaultLocale-DEnRyJdC.js} +3 -9
- package/dist/diagram-PSM6KHXK-CwWsOtmB.js +396 -0
- package/dist/{diagram-QEK2KX5R-BR--iNM5.js → diagram-QEK2KX5R-Dxmoi6nm.js} +3 -9
- package/dist/{diagram-S2PKOQOG-NTnEy5_O.js → diagram-S2PKOQOG-HSYMJfV1.js} +3 -9
- package/dist/{erDiagram-Q2GNP2WA-C8oZ5c-S.js → erDiagram-Q2GNP2WA-DQP8lHpe.js} +4 -10
- package/dist/{flowDiagram-NV44I4VS-DiKad3Bb.js → flowDiagram-NV44I4VS-Cl_9jtIL.js} +5 -11
- package/dist/{ganttDiagram-LVOFAZNH-CthzjjJq.js → ganttDiagram-LVOFAZNH-CPmFv-yQ.js} +3 -9
- package/dist/gitGraph-F6HP7TQM-80sPVnm_.js +6 -0
- package/dist/{gitGraphDiagram-NY62KEGX-d4KszKqi.js → gitGraphDiagram-NY62KEGX-B-81Admd.js} +4 -10
- package/dist/graph-rMBrFJ2v.js +382 -0
- package/dist/index-D5tpgmxE.js +164793 -0
- package/dist/info-NVLQJR56-DBCgZtPg.js +6 -0
- package/dist/{infoDiagram-ER5ION4S-DedidjTu.js → infoDiagram-ER5ION4S-CqZmP7Ed.js} +2 -8
- package/dist/{init-d639unba.js → init-Dbt-6wo9.js} +0 -6
- package/dist/{journeyDiagram-XKPGCS4Q-BylvmUWL.js → journeyDiagram-XKPGCS4Q-Stv9y4h1.js} +4 -10
- package/dist/{kanban-definition-3W4ZIXB7-DGV_aVgU.js → kanban-definition-3W4ZIXB7-C5R0pumf.js} +2 -8
- package/dist/layout-DHK3CzAK.js +1416 -0
- package/dist/{linear-CO_vz87n.js → linear-CD94DoB6.js} +7 -13
- package/dist/{mermaid-parser.core-CYtF6phW.js → mermaid-parser.core-D1WCqkLE.js} +6707 -5492
- package/dist/min-CDOTJW1A.js +39 -0
- package/dist/{mindmap-definition-VGOIOE7T-BU05Y6Vz.js → mindmap-definition-VGOIOE7T-BONuOB6H.js} +11 -17
- package/dist/{ordinal-CofNqUw2.js → ordinal-mgyNSFm_.js} +1 -7
- package/dist/packet-BFZMPI3H-ByqiBqYS.js +6 -0
- package/dist/pie-7BOR55EZ-Bzv7npkH.js +6 -0
- package/dist/{pieDiagram-ADFJNKIX-reGTUsiW.js → pieDiagram-ADFJNKIX-CQ6y-x9k.js} +10 -16
- package/dist/{quadrantDiagram-AYHSOK5B-NeHOJ0lX.js → quadrantDiagram-AYHSOK5B-C4hTUyLY.js} +2 -8
- package/dist/radar-NHE76QYJ-OVSgPUhl.js +6 -0
- package/dist/{requirementDiagram-UZGBJVZJ-BE76XNaT.js → requirementDiagram-UZGBJVZJ-CM3F7AET.js} +3 -9
- package/dist/{sankeyDiagram-TZEHDZUN-UHfMLEKl.js → sankeyDiagram-TZEHDZUN-F2yxFEnc.js} +2 -8
- package/dist/{sequenceDiagram-WL72ISMW-62KWnVbh.js → sequenceDiagram-WL72ISMW-CZgiwPgi.js} +3 -9
- package/dist/{stateDiagram-FKZM4ZOC--_CkWvu6.js → stateDiagram-FKZM4ZOC-Bxzbhi-m.js} +4 -10
- package/dist/{stateDiagram-v2-4FDKWEC3-Dj7ZjAmI.js → stateDiagram-v2-4FDKWEC3-DfVPJhMD.js} +2 -8
- package/dist/style.css +1 -1
- package/dist/{timeline-definition-IT6M3QCI-C3Wb0xMN.js → timeline-definition-IT6M3QCI-_z700I-W.js} +2 -8
- package/dist/treemap-KMMF4GRG-D5Tr-XRi.js +6 -0
- package/dist/umo-editor.js +1 -7
- package/dist/{xychartDiagram-PRI3JC2R-D2J307cO.js → xychartDiagram-PRI3JC2R-yKhqmxR_.js} +4 -10
- package/package.json +6 -1
- package/dist/_basePickBy-4kmg42pS.js +0 -158
- package/dist/_baseUniq-WOvvCHTI.js +0 -621
- package/dist/architecture-U656AL7Q-FYDwFSxk.js +0 -12
- package/dist/channel-Dah4F59k.js +0 -12
- package/dist/clone-C74UiRbr.js +0 -15
- package/dist/diagram-PSM6KHXK-aW98k2-4.js +0 -539
- package/dist/gitGraph-F6HP7TQM-CuXAC0XT.js +0 -12
- package/dist/graph-CnOTx4E0.js +0 -254
- package/dist/index-D6-Wf75-.js +0 -122127
- package/dist/info-NVLQJR56-Dhmtdc7O.js +0 -12
- package/dist/layout-OXk4OSoz.js +0 -1342
- package/dist/packet-BFZMPI3H-D7H_8Q-U.js +0 -12
- package/dist/pie-7BOR55EZ-BNWNcO5Z.js +0 -12
- package/dist/radar-NHE76QYJ-DrVEcvh1.js +0 -12
- package/dist/treemap-KMMF4GRG-Bc8F2dFd.js +0 -12
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-
|
|
3
|
-
import { _ as l } from "./index-
|
|
4
|
-
/**
|
|
5
|
-
* @umoteam/editor 9.0.1
|
|
6
|
-
* @license MIT
|
|
7
|
-
* @author umodoc https://www.umodoc.com
|
|
8
|
-
* @see https://www.umodoc.com
|
|
9
|
-
**/
|
|
2
|
+
import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-D2zs0pMT.js";
|
|
3
|
+
import { _ as l } from "./index-D5tpgmxE.js";
|
|
10
4
|
var m = {
|
|
11
5
|
parser: e,
|
|
12
6
|
get db() {
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-
|
|
3
|
-
import { _ as l } from "./index-
|
|
4
|
-
/**
|
|
5
|
-
* @umoteam/editor 9.0.1
|
|
6
|
-
* @license MIT
|
|
7
|
-
* @author umodoc https://www.umodoc.com
|
|
8
|
-
* @see https://www.umodoc.com
|
|
9
|
-
**/
|
|
2
|
+
import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-D2zs0pMT.js";
|
|
3
|
+
import { _ as l } from "./index-D5tpgmxE.js";
|
|
10
4
|
var m = {
|
|
11
5
|
parser: e,
|
|
12
6
|
get db() {
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
|
|
5
|
-
* @umoteam/editor 9.0.1
|
|
6
|
-
* @license MIT
|
|
7
|
-
* @author umodoc https://www.umodoc.com
|
|
8
|
-
* @see https://www.umodoc.com
|
|
9
|
-
**/
|
|
10
|
-
var tt = { exports: {} }, Z = { exports: {} }, Q = { exports: {} }, J;
|
|
2
|
+
import { aH as $, aI as lt, _ as V, l as k, d as gt } from "./index-D5tpgmxE.js";
|
|
3
|
+
import { c as J } from "./cytoscape.esm-DoU_GB5M.js";
|
|
4
|
+
var tt = { exports: {} }, Z = { exports: {} }, Q = { exports: {} }, q;
|
|
11
5
|
function ut() {
|
|
12
|
-
return
|
|
6
|
+
return q || (q = 1, function(G, b) {
|
|
13
7
|
(function(I, L) {
|
|
14
8
|
G.exports = L();
|
|
15
9
|
})($, function() {
|
|
@@ -1611,9 +1605,9 @@ function ut() {
|
|
|
1611
1605
|
});
|
|
1612
1606
|
}(Q)), Q.exports;
|
|
1613
1607
|
}
|
|
1614
|
-
var
|
|
1608
|
+
var z;
|
|
1615
1609
|
function ft() {
|
|
1616
|
-
return
|
|
1610
|
+
return z || (z = 1, function(G, b) {
|
|
1617
1611
|
(function(I, L) {
|
|
1618
1612
|
G.exports = L(ut());
|
|
1619
1613
|
})($, function(N) {
|
|
@@ -2383,7 +2377,7 @@ function ft() {
|
|
|
2383
2377
|
})(tt);
|
|
2384
2378
|
var ct = tt.exports;
|
|
2385
2379
|
const pt = /* @__PURE__ */ lt(ct);
|
|
2386
|
-
|
|
2380
|
+
J.use(pt);
|
|
2387
2381
|
function et(G, b) {
|
|
2388
2382
|
G.forEach((N) => {
|
|
2389
2383
|
const I = {
|
|
@@ -2424,7 +2418,7 @@ function rt(G, b) {
|
|
|
2424
2418
|
V(rt, "addEdges");
|
|
2425
2419
|
function it(G) {
|
|
2426
2420
|
return new Promise((b) => {
|
|
2427
|
-
const N = gt("body").append("div").attr("id", "cy").attr("style", "display:none"), I =
|
|
2421
|
+
const N = gt("body").append("div").attr("id", "cy").attr("style", "display:none"), I = J({
|
|
2428
2422
|
container: document.getElementById("cy"),
|
|
2429
2423
|
// container to render in
|
|
2430
2424
|
style: [
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
/**
|
|
3
|
-
* @umoteam/editor 9.0.1
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @author umodoc https://www.umodoc.com
|
|
6
|
-
* @see https://www.umodoc.com
|
|
7
|
-
**/
|
|
8
2
|
function Bs(r, e) {
|
|
9
3
|
(e == null || e > r.length) && (e = r.length);
|
|
10
4
|
for (var t = 0, a = Array(e); t < e; t++) a[t] = r[t];
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { _ as w, ar as F, as as Y, at as _, au as H, l as
|
|
3
|
-
import { G as B } from "./graph-
|
|
4
|
-
import { l as I } from "./layout-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { m as A } from "./_basePickBy-4kmg42pS.js";
|
|
8
|
-
/**
|
|
9
|
-
* @umoteam/editor 9.0.1
|
|
10
|
-
* @license MIT
|
|
11
|
-
* @author umodoc https://www.umodoc.com
|
|
12
|
-
* @see https://www.umodoc.com
|
|
13
|
-
**/
|
|
2
|
+
import { _ as w, ar as F, as as Y, at as _, au as H, l as i, c as V, av as z, aw as U, ag as $, al as q, ah as P, af as K, ax as Q, ay as W, az as Z } from "./index-D5tpgmxE.js";
|
|
3
|
+
import { i as b, G as B } from "./graph-rMBrFJ2v.js";
|
|
4
|
+
import { l as I } from "./layout-DHK3CzAK.js";
|
|
5
|
+
import { c as L } from "./clone-CDwfUPH_.js";
|
|
6
|
+
import { m as A } from "./min-CDOTJW1A.js";
|
|
14
7
|
function h(e) {
|
|
15
8
|
var t = {
|
|
16
9
|
options: {
|
|
@@ -25,8 +18,8 @@ function h(e) {
|
|
|
25
18
|
}
|
|
26
19
|
function ee(e) {
|
|
27
20
|
return A(e.nodes(), function(t) {
|
|
28
|
-
var n = e.node(t), a = e.parent(t),
|
|
29
|
-
return b(n) || (
|
|
21
|
+
var n = e.node(t), a = e.parent(t), r = { v: t };
|
|
22
|
+
return b(n) || (r.value = n), b(a) || (r.parent = a), r;
|
|
30
23
|
});
|
|
31
24
|
}
|
|
32
25
|
function ne(e) {
|
|
@@ -35,16 +28,16 @@ function ne(e) {
|
|
|
35
28
|
return b(t.name) || (a.name = t.name), b(n) || (a.value = n), a;
|
|
36
29
|
});
|
|
37
30
|
}
|
|
38
|
-
var d = /* @__PURE__ */ new Map(),
|
|
39
|
-
|
|
31
|
+
var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ w(() => {
|
|
32
|
+
y.clear(), J.clear(), d.clear();
|
|
40
33
|
}, "clear"), D = /* @__PURE__ */ w((e, t) => {
|
|
41
|
-
const n =
|
|
42
|
-
return
|
|
34
|
+
const n = y.get(t) || [];
|
|
35
|
+
return i.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
|
|
43
36
|
}, "isDescendant"), se = /* @__PURE__ */ w((e, t) => {
|
|
44
|
-
const n =
|
|
45
|
-
return
|
|
37
|
+
const n = y.get(t) || [];
|
|
38
|
+
return i.info("Descendants of ", t, " is ", n), i.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || D(e.v, t) || D(e.w, t) || n.includes(e.w) : (i.debug("Tilt, ", t, ",not in descendants"), !1);
|
|
46
39
|
}, "edgeInCluster"), G = /* @__PURE__ */ w((e, t, n, a) => {
|
|
47
|
-
|
|
40
|
+
i.warn(
|
|
48
41
|
"Copying children of ",
|
|
49
42
|
e,
|
|
50
43
|
"root",
|
|
@@ -53,13 +46,13 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
53
46
|
t.node(e),
|
|
54
47
|
a
|
|
55
48
|
);
|
|
56
|
-
const
|
|
57
|
-
e !== a &&
|
|
49
|
+
const r = t.children(e) || [];
|
|
50
|
+
e !== a && r.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", r), r.forEach((o) => {
|
|
58
51
|
if (t.children(o).length > 0)
|
|
59
52
|
G(o, t, n, a);
|
|
60
53
|
else {
|
|
61
54
|
const l = t.node(o);
|
|
62
|
-
|
|
55
|
+
i.info("cp ", o, " to ", a, " with parent ", e), n.setNode(o, l), a !== t.parent(o) && (i.warn("Setting parent", o, t.parent(o)), n.setParent(o, t.parent(o))), e !== a && o !== e ? (i.debug("Setting parent", o, e), n.setParent(o, e)) : (i.info("In copy ", e, "root", a, "data", t.node(e), a), i.debug(
|
|
63
56
|
"Not Setting parent for node=",
|
|
64
57
|
o,
|
|
65
58
|
"cluster!==rootId",
|
|
@@ -68,12 +61,12 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
68
61
|
o !== e
|
|
69
62
|
));
|
|
70
63
|
const u = t.edges(o);
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
i.debug("Copying Edges", u), u.forEach((c) => {
|
|
65
|
+
i.info("Edge", c);
|
|
73
66
|
const m = t.edge(c.v, c.w, c.name);
|
|
74
|
-
|
|
67
|
+
i.info("Edge data", m, a);
|
|
75
68
|
try {
|
|
76
|
-
se(c, a) ? (
|
|
69
|
+
se(c, a) ? (i.info("Copying as ", c.v, c.w, m, c.name), n.setEdge(c.v, c.w, m, c.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
|
|
77
70
|
"Skipping copy of edge ",
|
|
78
71
|
c.v,
|
|
79
72
|
"-->",
|
|
@@ -84,64 +77,64 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
84
77
|
e
|
|
85
78
|
);
|
|
86
79
|
} catch (v) {
|
|
87
|
-
|
|
80
|
+
i.error(v);
|
|
88
81
|
}
|
|
89
82
|
});
|
|
90
83
|
}
|
|
91
|
-
|
|
84
|
+
i.debug("Removing node", o), t.removeNode(o);
|
|
92
85
|
});
|
|
93
86
|
}, "copy"), R = /* @__PURE__ */ w((e, t) => {
|
|
94
87
|
const n = t.children(e);
|
|
95
88
|
let a = [...n];
|
|
96
|
-
for (const
|
|
97
|
-
J.set(
|
|
89
|
+
for (const r of n)
|
|
90
|
+
J.set(r, e), a = [...a, ...R(r, t)];
|
|
98
91
|
return a;
|
|
99
|
-
}, "extractDescendants"),
|
|
100
|
-
const a = e.edges().filter((c) => c.v === t || c.w === t),
|
|
92
|
+
}, "extractDescendants"), ie = /* @__PURE__ */ w((e, t, n) => {
|
|
93
|
+
const a = e.edges().filter((c) => c.v === t || c.w === t), r = e.edges().filter((c) => c.v === n || c.w === n), o = a.map((c) => ({ v: c.v === t ? n : c.v, w: c.w === t ? t : c.w })), l = r.map((c) => ({ v: c.v, w: c.w }));
|
|
101
94
|
return o.filter((c) => l.some((m) => c.v === m.v && c.w === m.w));
|
|
102
95
|
}, "findCommonEdges"), C = /* @__PURE__ */ w((e, t, n) => {
|
|
103
96
|
const a = t.children(e);
|
|
104
|
-
if (
|
|
97
|
+
if (i.trace("Searching children of id ", e, a), a.length < 1)
|
|
105
98
|
return e;
|
|
106
|
-
let
|
|
99
|
+
let r;
|
|
107
100
|
for (const o of a) {
|
|
108
|
-
const l = C(o, t, n), u =
|
|
101
|
+
const l = C(o, t, n), u = ie(t, n, l);
|
|
109
102
|
if (l)
|
|
110
103
|
if (u.length > 0)
|
|
111
|
-
|
|
104
|
+
r = l;
|
|
112
105
|
else
|
|
113
106
|
return l;
|
|
114
107
|
}
|
|
115
|
-
return
|
|
116
|
-
}, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"),
|
|
108
|
+
return r;
|
|
109
|
+
}, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"), re = /* @__PURE__ */ w((e, t) => {
|
|
117
110
|
if (!e || t > 10) {
|
|
118
|
-
|
|
111
|
+
i.debug("Opting out, no graph ");
|
|
119
112
|
return;
|
|
120
113
|
} else
|
|
121
|
-
|
|
114
|
+
i.debug("Opting in, graph ");
|
|
122
115
|
e.nodes().forEach(function(n) {
|
|
123
|
-
e.children(n).length > 0 && (
|
|
116
|
+
e.children(n).length > 0 && (i.warn(
|
|
124
117
|
"Cluster identified",
|
|
125
118
|
n,
|
|
126
119
|
" Replacement id in edges: ",
|
|
127
120
|
C(n, e, n)
|
|
128
|
-
),
|
|
121
|
+
), y.set(n, R(n, e)), d.set(n, { id: C(n, e, n), clusterData: e.node(n) }));
|
|
129
122
|
}), e.nodes().forEach(function(n) {
|
|
130
|
-
const a = e.children(n),
|
|
131
|
-
a.length > 0 ? (
|
|
123
|
+
const a = e.children(n), r = e.edges();
|
|
124
|
+
a.length > 0 ? (i.debug("Cluster identified", n, y), r.forEach((o) => {
|
|
132
125
|
const l = D(o.v, n), u = D(o.w, n);
|
|
133
|
-
l ^ u && (
|
|
134
|
-
})) :
|
|
126
|
+
l ^ u && (i.warn("Edge: ", o, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", y.get(n)), d.get(n).externalConnections = !0);
|
|
127
|
+
})) : i.debug("Not a cluster ", n, y);
|
|
135
128
|
});
|
|
136
129
|
for (let n of d.keys()) {
|
|
137
|
-
const a = d.get(n).id,
|
|
138
|
-
|
|
130
|
+
const a = d.get(n).id, r = e.parent(a);
|
|
131
|
+
r !== n && d.has(r) && !d.get(r).externalConnections && (d.get(n).id = r);
|
|
139
132
|
}
|
|
140
133
|
e.edges().forEach(function(n) {
|
|
141
134
|
const a = e.edge(n);
|
|
142
|
-
|
|
143
|
-
let
|
|
144
|
-
if (
|
|
135
|
+
i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
|
|
136
|
+
let r = n.v, o = n.w;
|
|
137
|
+
if (i.warn(
|
|
145
138
|
"Fix XXX",
|
|
146
139
|
d,
|
|
147
140
|
"ids:",
|
|
@@ -152,53 +145,53 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
152
145
|
" --- ",
|
|
153
146
|
d.get(n.w)
|
|
154
147
|
), d.get(n.v) || d.get(n.w)) {
|
|
155
|
-
if (
|
|
156
|
-
const l = e.parent(
|
|
148
|
+
if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), r = k(n.v), o = k(n.w), e.removeEdge(n.v, n.w, n.name), r !== n.v) {
|
|
149
|
+
const l = e.parent(r);
|
|
157
150
|
d.get(l).externalConnections = !0, a.fromCluster = n.v;
|
|
158
151
|
}
|
|
159
152
|
if (o !== n.w) {
|
|
160
153
|
const l = e.parent(o);
|
|
161
154
|
d.get(l).externalConnections = !0, a.toCluster = n.w;
|
|
162
155
|
}
|
|
163
|
-
|
|
156
|
+
i.warn("Fix Replacing with XXX", r, o, n.name), e.setEdge(r, o, a, n.name);
|
|
164
157
|
}
|
|
165
|
-
}),
|
|
158
|
+
}), i.warn("Adjusted Graph", h(e)), T(e, 0), i.trace(d);
|
|
166
159
|
}, "adjustClustersAndEdges"), T = /* @__PURE__ */ w((e, t) => {
|
|
167
|
-
if (
|
|
168
|
-
|
|
160
|
+
if (i.warn("extractor - ", t, h(e), e.children("D")), t > 10) {
|
|
161
|
+
i.error("Bailing out");
|
|
169
162
|
return;
|
|
170
163
|
}
|
|
171
164
|
let n = e.nodes(), a = !1;
|
|
172
|
-
for (const
|
|
173
|
-
const o = e.children(
|
|
165
|
+
for (const r of n) {
|
|
166
|
+
const o = e.children(r);
|
|
174
167
|
a = a || o.length > 0;
|
|
175
168
|
}
|
|
176
169
|
if (!a) {
|
|
177
|
-
|
|
170
|
+
i.debug("Done, no node has children", e.nodes());
|
|
178
171
|
return;
|
|
179
172
|
}
|
|
180
|
-
|
|
181
|
-
for (const
|
|
182
|
-
if (
|
|
173
|
+
i.debug("Nodes = ", n, t);
|
|
174
|
+
for (const r of n)
|
|
175
|
+
if (i.debug(
|
|
183
176
|
"Extracting node",
|
|
184
|
-
|
|
177
|
+
r,
|
|
185
178
|
d,
|
|
186
|
-
d.has(
|
|
187
|
-
!e.parent(
|
|
188
|
-
e.node(
|
|
179
|
+
d.has(r) && !d.get(r).externalConnections,
|
|
180
|
+
!e.parent(r),
|
|
181
|
+
e.node(r),
|
|
189
182
|
e.children("D"),
|
|
190
183
|
" Depth ",
|
|
191
184
|
t
|
|
192
|
-
), !d.has(
|
|
193
|
-
|
|
194
|
-
else if (!d.get(
|
|
195
|
-
|
|
185
|
+
), !d.has(r))
|
|
186
|
+
i.debug("Not a cluster", r, t);
|
|
187
|
+
else if (!d.get(r).externalConnections && e.children(r) && e.children(r).length > 0) {
|
|
188
|
+
i.warn(
|
|
196
189
|
"Cluster without external connections, without a parent and with children",
|
|
197
|
-
|
|
190
|
+
r,
|
|
198
191
|
t
|
|
199
192
|
);
|
|
200
193
|
let l = e.graph().rankdir === "TB" ? "LR" : "TB";
|
|
201
|
-
d.get(
|
|
194
|
+
d.get(r)?.clusterData?.dir && (l = d.get(r).clusterData.dir, i.warn("Fixing dir", d.get(r).clusterData.dir, l));
|
|
202
195
|
const u = new B({
|
|
203
196
|
multigraph: !0,
|
|
204
197
|
compound: !0
|
|
@@ -211,52 +204,52 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
211
204
|
}).setDefaultEdgeLabel(function() {
|
|
212
205
|
return {};
|
|
213
206
|
});
|
|
214
|
-
|
|
207
|
+
i.warn("Old graph before copy", h(e)), G(r, e, u, r), e.setNode(r, {
|
|
215
208
|
clusterNode: !0,
|
|
216
|
-
id:
|
|
217
|
-
clusterData: d.get(
|
|
218
|
-
label: d.get(
|
|
209
|
+
id: r,
|
|
210
|
+
clusterData: d.get(r).clusterData,
|
|
211
|
+
label: d.get(r).label,
|
|
219
212
|
graph: u
|
|
220
|
-
}),
|
|
213
|
+
}), i.warn("New graph after copy node: (", r, ")", h(u)), i.debug("Old graph after copy", h(e));
|
|
221
214
|
} else
|
|
222
|
-
|
|
215
|
+
i.warn(
|
|
223
216
|
"Cluster ** ",
|
|
224
|
-
|
|
217
|
+
r,
|
|
225
218
|
" **not meeting the criteria !externalConnections:",
|
|
226
|
-
!d.get(
|
|
219
|
+
!d.get(r).externalConnections,
|
|
227
220
|
" no parent: ",
|
|
228
|
-
!e.parent(
|
|
221
|
+
!e.parent(r),
|
|
229
222
|
" children ",
|
|
230
|
-
e.children(
|
|
223
|
+
e.children(r) && e.children(r).length > 0,
|
|
231
224
|
e.children("D"),
|
|
232
225
|
t
|
|
233
|
-
),
|
|
234
|
-
n = e.nodes(),
|
|
235
|
-
for (const
|
|
236
|
-
const o = e.node(
|
|
237
|
-
|
|
226
|
+
), i.debug(d);
|
|
227
|
+
n = e.nodes(), i.warn("New list of nodes", n);
|
|
228
|
+
for (const r of n) {
|
|
229
|
+
const o = e.node(r);
|
|
230
|
+
i.warn(" Now next level", r, o), o?.clusterNode && T(o.graph, t + 1);
|
|
238
231
|
}
|
|
239
232
|
}, "extractor"), M = /* @__PURE__ */ w((e, t) => {
|
|
240
233
|
if (t.length === 0)
|
|
241
234
|
return [];
|
|
242
235
|
let n = Object.assign([], t);
|
|
243
236
|
return t.forEach((a) => {
|
|
244
|
-
const
|
|
237
|
+
const r = e.children(a), o = M(e, r);
|
|
245
238
|
n = [...n, ...o];
|
|
246
239
|
}), n;
|
|
247
|
-
}, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a,
|
|
248
|
-
|
|
240
|
+
}, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a, r, o) => {
|
|
241
|
+
i.warn("Graph in recursive render:XAX", h(t), r);
|
|
249
242
|
const l = t.graph().rankdir;
|
|
250
|
-
|
|
243
|
+
i.trace("Dir in recursive render - dir:", l);
|
|
251
244
|
const u = e.insert("g").attr("class", "root");
|
|
252
|
-
t.nodes() ?
|
|
245
|
+
t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.info("Recursive edges", t.edge(t.edges()[0]));
|
|
253
246
|
const c = u.insert("g").attr("class", "clusters"), m = u.insert("g").attr("class", "edgePaths"), v = u.insert("g").attr("class", "edgeLabels"), X = u.insert("g").attr("class", "nodes");
|
|
254
247
|
await Promise.all(
|
|
255
248
|
t.nodes().map(async function(f) {
|
|
256
249
|
const s = t.node(f);
|
|
257
|
-
if (
|
|
258
|
-
const g = JSON.parse(JSON.stringify(
|
|
259
|
-
|
|
250
|
+
if (r !== void 0) {
|
|
251
|
+
const g = JSON.parse(JSON.stringify(r.clusterData));
|
|
252
|
+
i.trace(
|
|
260
253
|
`Setting data for parent cluster XXX
|
|
261
254
|
Node.id = `,
|
|
262
255
|
f,
|
|
@@ -265,11 +258,11 @@ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
265
258
|
g.height,
|
|
266
259
|
`
|
|
267
260
|
Parent cluster`,
|
|
268
|
-
|
|
269
|
-
), t.setNode(
|
|
261
|
+
r.height
|
|
262
|
+
), t.setNode(r.id, g), t.parent(f) || (i.trace("Setting parent", f, r.id), t.setParent(f, r.id, g));
|
|
270
263
|
}
|
|
271
|
-
if (
|
|
272
|
-
|
|
264
|
+
if (i.info("(Insert) Node XXX" + f + ": " + JSON.stringify(t.node(f))), s?.clusterNode) {
|
|
265
|
+
i.info("Cluster identified XBX", f, s.width, t.node(f));
|
|
273
266
|
const { ranksep: g, nodesep: E } = t.graph();
|
|
274
267
|
s.graph.setGraph({
|
|
275
268
|
...s.graph.graph(),
|
|
@@ -284,7 +277,7 @@ Parent cluster`,
|
|
|
284
277
|
t.node(f),
|
|
285
278
|
o
|
|
286
279
|
), x = N.elem;
|
|
287
|
-
z(s, x), s.diff = N.diff || 0,
|
|
280
|
+
z(s, x), s.diff = N.diff || 0, i.info(
|
|
288
281
|
"New compound node after recursive render XAX",
|
|
289
282
|
f,
|
|
290
283
|
"width",
|
|
@@ -296,7 +289,7 @@ Parent cluster`,
|
|
|
296
289
|
// node.y
|
|
297
290
|
), U(x, s);
|
|
298
291
|
} else
|
|
299
|
-
t.children(f).length > 0 ? (
|
|
292
|
+
t.children(f).length > 0 ? (i.trace(
|
|
300
293
|
"Cluster - the non recursive path XBX",
|
|
301
294
|
f,
|
|
302
295
|
s.id,
|
|
@@ -304,12 +297,12 @@ Parent cluster`,
|
|
|
304
297
|
s.width,
|
|
305
298
|
"Graph:",
|
|
306
299
|
t
|
|
307
|
-
),
|
|
300
|
+
), i.trace(C(s.id, t)), d.set(s.id, { id: C(s.id, t), node: s })) : (i.trace("Node - the non recursive path XAX", f, X, t.node(f), l), await $(X, t.node(f), { config: o, dir: l }));
|
|
308
301
|
})
|
|
309
302
|
), await (/* @__PURE__ */ w(async () => {
|
|
310
303
|
const f = t.edges().map(async function(s) {
|
|
311
304
|
const g = t.edge(s.v, s.w, s.name);
|
|
312
|
-
|
|
305
|
+
i.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), i.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), i.info(
|
|
313
306
|
"Fix",
|
|
314
307
|
d,
|
|
315
308
|
"ids:",
|
|
@@ -321,12 +314,12 @@ Parent cluster`,
|
|
|
321
314
|
), await Z(v, g);
|
|
322
315
|
});
|
|
323
316
|
await Promise.all(f);
|
|
324
|
-
}, "processEdges"))(),
|
|
317
|
+
}, "processEdges"))(), i.info("Graph before layout:", JSON.stringify(h(t))), i.info("############################################# XXX"), i.info("### Layout ### XXX"), i.info("############################################# XXX"), I(t), i.info("Graph after layout:", JSON.stringify(h(t)));
|
|
325
318
|
let O = 0, { subGraphTitleTotalMargin: S } = q(o);
|
|
326
319
|
return await Promise.all(
|
|
327
320
|
oe(t).map(async function(f) {
|
|
328
321
|
const s = t.node(f);
|
|
329
|
-
if (
|
|
322
|
+
if (i.info(
|
|
330
323
|
"Position XBX => " + f + ": (" + s.x,
|
|
331
324
|
"," + s.y,
|
|
332
325
|
") width: ",
|
|
@@ -334,7 +327,7 @@ Parent cluster`,
|
|
|
334
327
|
" height: ",
|
|
335
328
|
s.height
|
|
336
329
|
), s?.clusterNode)
|
|
337
|
-
s.y += S,
|
|
330
|
+
s.y += S, i.info(
|
|
338
331
|
"A tainted cluster node XBX1",
|
|
339
332
|
f,
|
|
340
333
|
s.id,
|
|
@@ -345,7 +338,7 @@ Parent cluster`,
|
|
|
345
338
|
t.parent(f)
|
|
346
339
|
), d.get(s.id).node = s, P(s);
|
|
347
340
|
else if (t.children(f).length > 0) {
|
|
348
|
-
|
|
341
|
+
i.info(
|
|
349
342
|
"A pure cluster node XBX1",
|
|
350
343
|
f,
|
|
351
344
|
s.id,
|
|
@@ -356,10 +349,10 @@ Parent cluster`,
|
|
|
356
349
|
t.parent(f)
|
|
357
350
|
), s.height += S, t.node(s.parentId);
|
|
358
351
|
const g = s?.padding / 2 || 0, E = s?.labelBBox?.height || 0, N = E - g || 0;
|
|
359
|
-
|
|
352
|
+
i.debug("OffsetY", N, "labelHeight", E, "halfPadding", g), await K(c, s), d.get(s.id).node = s;
|
|
360
353
|
} else {
|
|
361
354
|
const g = t.node(s.parentId);
|
|
362
|
-
s.y += S / 2,
|
|
355
|
+
s.y += S / 2, i.info(
|
|
363
356
|
"A regular node XBX1 - using the padding",
|
|
364
357
|
s.id,
|
|
365
358
|
"parent",
|
|
@@ -379,16 +372,16 @@ Parent cluster`,
|
|
|
379
372
|
})
|
|
380
373
|
), t.edges().forEach(function(f) {
|
|
381
374
|
const s = t.edge(f);
|
|
382
|
-
|
|
375
|
+
i.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(s), s), s.points.forEach((x) => x.y += S / 2);
|
|
383
376
|
const g = t.node(f.v);
|
|
384
377
|
var E = t.node(f.w);
|
|
385
378
|
const N = Q(m, s, d, n, g, E, a);
|
|
386
379
|
W(s, N);
|
|
387
380
|
}), t.nodes().forEach(function(f) {
|
|
388
381
|
const s = t.node(f);
|
|
389
|
-
|
|
390
|
-
}),
|
|
391
|
-
}, "recursiveRender"),
|
|
382
|
+
i.info(f, s.type, s.diff), s.isGroup && (O = s.diff);
|
|
383
|
+
}), i.warn("Returning from recursive render XAX", u, O), { elem: u, diff: O };
|
|
384
|
+
}, "recursiveRender"), ge = /* @__PURE__ */ w(async (e, t) => {
|
|
392
385
|
const n = new B({
|
|
393
386
|
multigraph: !0,
|
|
394
387
|
compound: !0
|
|
@@ -403,7 +396,7 @@ Parent cluster`,
|
|
|
403
396
|
}), a = t.select("g");
|
|
404
397
|
F(a, e.markers, e.type, e.diagramId), Y(), _(), H(), te(), e.nodes.forEach((o) => {
|
|
405
398
|
n.setNode(o.id, { ...o }), o.parentId && n.setParent(o.id, o.parentId);
|
|
406
|
-
}),
|
|
399
|
+
}), i.debug("Edges:", e.edges), e.edges.forEach((o) => {
|
|
407
400
|
if (o.start === o.end) {
|
|
408
401
|
const l = o.start, u = l + "---" + l + "---1", c = l + "---" + l + "---2", m = n.node(l);
|
|
409
402
|
n.setNode(u, {
|
|
@@ -431,21 +424,21 @@ Parent cluster`,
|
|
|
431
424
|
width: 10,
|
|
432
425
|
height: 10
|
|
433
426
|
}), n.setParent(c, m.parentId);
|
|
434
|
-
const v = structuredClone(o), X = structuredClone(o),
|
|
435
|
-
v.label = "", v.arrowTypeEnd = "none", v.id = l + "-cyclic-special-1", X.arrowTypeStart = "none", X.arrowTypeEnd = "none", X.id = l + "-cyclic-special-mid",
|
|
427
|
+
const v = structuredClone(o), X = structuredClone(o), p = structuredClone(o);
|
|
428
|
+
v.label = "", v.arrowTypeEnd = "none", v.id = l + "-cyclic-special-1", X.arrowTypeStart = "none", X.arrowTypeEnd = "none", X.id = l + "-cyclic-special-mid", p.label = "", m.isGroup && (v.fromCluster = l, p.toCluster = l), p.id = l + "-cyclic-special-2", p.arrowTypeStart = "none", n.setEdge(l, u, v, l + "-cyclic-special-0"), n.setEdge(u, c, X, l + "-cyclic-special-1"), n.setEdge(c, l, p, l + "-cyc<lic-special-2");
|
|
436
429
|
} else
|
|
437
430
|
n.setEdge(o.start, o.end, { ...o }, o.id);
|
|
438
|
-
}),
|
|
439
|
-
const
|
|
431
|
+
}), i.warn("Graph at first:", JSON.stringify(h(n))), re(n), i.warn("Graph after XAX:", JSON.stringify(h(n)));
|
|
432
|
+
const r = V();
|
|
440
433
|
await j(
|
|
441
434
|
a,
|
|
442
435
|
n,
|
|
443
436
|
e.type,
|
|
444
437
|
e.diagramId,
|
|
445
438
|
void 0,
|
|
446
|
-
|
|
439
|
+
r
|
|
447
440
|
);
|
|
448
441
|
}, "render");
|
|
449
442
|
export {
|
|
450
|
-
|
|
443
|
+
ge as render
|
|
451
444
|
};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
/**
|
|
3
|
-
* @umoteam/editor 9.0.1
|
|
4
|
-
* @license MIT
|
|
5
|
-
* @author umodoc https://www.umodoc.com
|
|
6
|
-
* @see https://www.umodoc.com
|
|
7
|
-
**/
|
|
8
2
|
function H(n) {
|
|
9
3
|
return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
|
|
10
4
|
}
|
|
@@ -171,8 +165,8 @@ function rn(n) {
|
|
|
171
165
|
return A = v(n), nn = A.format, tn = A.formatPrefix, A;
|
|
172
166
|
}
|
|
173
167
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
168
|
+
N as a,
|
|
169
|
+
tn as b,
|
|
176
170
|
J as e,
|
|
177
|
-
|
|
171
|
+
nn as f
|
|
178
172
|
};
|