@antdv-next/x 1.0.2-beta.2 → 1.0.2-beta.4
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/actions/Actions.js +1 -1
- package/dist/attachments/index.js +1 -1
- package/dist/conversations/index.js +1 -1
- package/dist/file-card/FileCard.js +1 -1
- package/dist/file-card/List.js +1 -1
- package/dist/index.umd.js +25 -25
- package/dist/locale/useLocale.js +1 -1
- package/dist/mermaid/Mermaid.js +1 -1
- package/dist/package.js +1 -1
- package/dist/prompts/Prompts.js +1 -1
- package/dist/sender/Sender.js +1 -1
- package/dist/sender/SenderHeader.js +1 -1
- package/dist/sender/SenderSwitch.js +1 -1
- package/dist/sources/Sources.js +1 -1
- package/dist/suggestion/Suggestion.js +1 -1
- package/dist/theme/genStyleUtils.js +1 -1
- package/dist/think/Think.js +1 -1
- package/dist/thought-chain/Item.js +1 -1
- package/dist/thought-chain/Node.js +1 -1
- package/dist/thought-chain/ThoughtChain.js +1 -1
- package/dist/welcome/index.js +1 -1
- package/dist/x-provider/hooks/use-x-provider-context.js +1 -1
- package/es/{Serializer-y_SfSPKv.js → Serializer-D1JYN1kI.js} +4 -4
- package/es/{_basePickBy-DPqob0cQ.js → _basePickBy-DFHEGO2M.js} +23 -23
- package/es/{_baseUniq-AMhRdOMz.js → _baseUniq-BlS7rXTs.js} +83 -83
- package/es/antdv-next-x.esm.js +44833 -7290
- package/es/{arc-caEkbRYF.js → arc-BuXEd18J.js} +3 -3
- package/es/architecture-PBZL5I3N-D7tS55xM.js +3 -0
- package/es/{architectureDiagram-2XIMDMQ5-ZOgJV9Kg.js → architectureDiagram-2XIMDMQ5-CmfsCwJk.js} +85 -85
- package/es/{blockDiagram-WCTKOSBZ-8iZwAKBK.js → blockDiagram-WCTKOSBZ-lJAan65A.js} +530 -530
- package/es/{c4Diagram-IC4MRINW-DrH9eRMR.js → c4Diagram-IC4MRINW-B1c2x_1Q.js} +170 -170
- package/es/channel-DFgF_2F7.js +5 -0
- package/es/{chunk-4BX2VUAB-DUVpjbJi.js → chunk-4BX2VUAB-J2N81Fpp.js} +2 -2
- package/es/{chunk-55IACEB6-RlJ-J3tE.js → chunk-55IACEB6-DGtfGRgi.js} +2 -2
- package/es/{chunk-7E7YKBS2-ChLFamzc.js → chunk-7E7YKBS2-CL2d4WAf.js} +2 -2
- package/es/{chunk-7R4GIKGN-B9vamSzt.js → chunk-7R4GIKGN-QT6IorJ_.js} +3 -3
- package/es/{chunk-C72U2L5F-BV-rXau1.js → chunk-C72U2L5F-OHTVpS-m.js} +2 -2
- package/es/{chunk-EGIJ26TM-GvsuORRL.js → chunk-EGIJ26TM-DyMPGYrB.js} +2 -2
- package/es/{chunk-FMBD7UC4-D6ZlqqMC.js → chunk-FMBD7UC4-DCcRjunY.js} +2 -2
- package/es/{chunk-GEFDOKGD-DM6dsEsk.js → chunk-GEFDOKGD-BWpC-zoH.js} +278 -278
- package/es/chunk-GLR3WWYH-DiXcKb5Y.js +41 -0
- package/es/{chunk-HHEYEP7N-FVfYw94p.js → chunk-HHEYEP7N-Cxc7E4dX.js} +3 -3
- package/es/{chunk-JSJVCQXG-Wr9uPcCh.js → chunk-JSJVCQXG-D8_heHOp.js} +4 -4
- package/es/{chunk-KX2RTZJC-BGffjoxB.js → chunk-KX2RTZJC-D5cc4rj6.js} +3 -3
- package/es/{chunk-KYZI473N-Bit5smNE.js → chunk-KYZI473N-BHJ3T5Zv.js} +573 -573
- package/es/{chunk-L3YUKLVL-DBuHDpQ2.js → chunk-L3YUKLVL-7oGaUOdc.js} +2 -2
- package/es/{chunk-MX3YWQON-Cbj2WwUZ.js → chunk-MX3YWQON-BxE-Aq9c.js} +2 -2
- package/es/{chunk-NQ4KR5QH-FPQ-IHJN.js → chunk-NQ4KR5QH-EYQBXkqP.js} +120 -120
- package/es/{chunk-O4XLMI2P-BCDk0ZIW.js → chunk-O4XLMI2P-qjOoGpnx.js} +238 -238
- package/es/{chunk-OZEHJAEY-BZ24IOgQ.js → chunk-OZEHJAEY-D82nx27s.js} +2 -2
- package/es/{chunk-PQ6SQG4A-DpwBx6Hx.js → chunk-PQ6SQG4A-D3jtNCWN.js} +3 -3
- package/es/{chunk-PU5JKC2W-BNpJuXxn.js → chunk-PU5JKC2W-DdP8BS-S.js} +76 -76
- package/es/{chunk-QZHKN3VN-NEMwPryC.js → chunk-QZHKN3VN-CW3cFN-h.js} +2 -2
- package/es/{chunk-R5LLSJPH-g44vgerl.js → chunk-R5LLSJPH-CreI2kO9.js} +2 -2
- package/es/{chunk-WL4C6EOR-B6l-Yy2t.js → chunk-WL4C6EOR-BDbxJyGk.js} +120 -120
- package/es/{chunk-XIRO2GV7-CaFInIOW.js → chunk-XIRO2GV7-S5KkbVnN.js} +2 -2
- package/es/{chunk-XPW4576I-Cp1j6iTN.js → chunk-XPW4576I-B0KVSHwE.js} +2 -2
- package/es/{chunk-XZSTWKYB-CGk7ipHd.js → chunk-XZSTWKYB-CucN1XvM.js} +93 -93
- package/es/{chunk-YBOYWFTD-dOTBpTYs.js → chunk-YBOYWFTD-CvaddD9G.js} +8 -8
- package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +29 -0
- package/es/clone-r3YukIBB.js +8 -0
- package/es/{cose-bilkent-S5V4N54A-DlmXyn6m.js → cose-bilkent-S5V4N54A-B5OQuIhl.js} +3 -3
- package/es/{cytoscape.esm-BY3wHcbp.js → cytoscape.esm-i2CZcWd-.js} +1 -1
- package/es/{dagre-B1qTL793.js → dagre-5aGJFKmT.js} +57 -57
- package/es/dagre-KLK3FWXG-BI5QQMXo.js +294 -0
- package/es/{defaultLocale-BaPFSbai.js → defaultLocale-bckJcYh1.js} +12 -12
- package/es/{diagram-E7M64L7V-Dnd8N74o.js → diagram-E7M64L7V-Dz62Vz_a.js} +83 -83
- package/es/{diagram-IFDJBPK2-Dan7RsGr.js → diagram-IFDJBPK2-9fjvFkSc.js} +31 -31
- package/es/{diagram-P4PSJMXO-DwKJpttH.js → diagram-P4PSJMXO-BlX6jFjZ.js} +32 -32
- package/es/{dist-DltyvPj3.js → dist-BX_roQzC.js} +1 -1
- package/es/{erDiagram-INFDFZHY-CGO6k23w.js → erDiagram-INFDFZHY-BcRXu8Cp.js} +128 -128
- package/es/{flowDiagram-PKNHOUZH-DFN1GsRx.js → flowDiagram-PKNHOUZH-UeyfgU8z.js} +156 -156
- package/es/{ganttDiagram-A5KZAMGK-Cf5NxH1w.js → ganttDiagram-A5KZAMGK-txCzqgQ5.js} +625 -622
- package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +3 -0
- package/es/{gitGraphDiagram-K3NZZRJ6-BgE6aSZO.js → gitGraphDiagram-K3NZZRJ6-DghWYaFU.js} +176 -176
- package/es/{graphlib-DFxSohCv.js → graphlib-dRkI1OCL.js} +4 -4
- package/es/{html-C2-_98S6.js → html-B6UxjOv0.js} +1 -1
- package/es/html-Hb1oe8XT.js +2 -0
- package/es/info-3K5VOQVL-COqdvM99.js +3 -0
- package/es/{infoDiagram-LFFYTUFH-WcApcdl5.js → infoDiagram-LFFYTUFH-CA-vlAvP.js} +5 -5
- package/es/{init-PAs0hR-b.js → init-B75p2clj.js} +1 -1
- package/es/{isArrayLikeObject-BEG9p74d.js → isArrayLikeObject-jl2bjkAJ.js} +80 -80
- package/es/{isEmpty-B1YrVV8B.js → isEmpty-CmA-HYrg.js} +3 -3
- package/es/{ishikawaDiagram-PHBUUO56-DwK7J31a.js → ishikawaDiagram-PHBUUO56-DjdpS9Lb.js} +67 -67
- package/es/{journeyDiagram-4ABVD52K-CWuA57by.js → journeyDiagram-4ABVD52K-CIJfC1fp.js} +6 -6
- package/es/{kanban-definition-K7BYSVSG-DBt3gYRQ.js → kanban-definition-K7BYSVSG-CC2vwGck.js} +11 -11
- package/es/{katex-OR8z_f6I.js → katex-DCMiIo1z.js} +1 -1
- package/es/{line-zOBKZCP5.js → line-Cu9NTacD.js} +4 -4
- package/es/{linear-DttXWw4q.js → linear-C0rAYYmp.js} +23 -23
- package/es/{math-DPzKeDKn.js → math-CoDOuve-.js} +1 -1
- package/es/{mermaid-parser.core-CWNEdmZ_.js → mermaid-parser.core-7Wn2L29P.js} +16 -16
- package/es/{mermaid.core-DPBXXViR.js → mermaid.core-Bvy_Q6Hu.js} +208 -208
- package/es/{mindmap-definition-YRQLILUH-Bq2xqboX.js → mindmap-definition-YRQLILUH-BzTYDYmK.js} +16 -16
- package/es/{ordinal-D8PKtxfM.js → ordinal-F3U6aXtP.js} +3 -3
- package/es/packet-RMMSAZCW-2PTjWKLd.js +3 -0
- package/es/{path-DZ-6AyWK.js → path-Dm3C8WEs.js} +3 -3
- package/es/pie-UPGHQEXC-Du8-k-EA.js +3 -0
- package/es/{pieDiagram-SKSYHLDU-D4iMzwzH.js → pieDiagram-SKSYHLDU-COvqE_C6.js} +32 -32
- package/es/{quadrantDiagram-337W2JSQ-DSbXC0z6.js → quadrantDiagram-337W2JSQ-Dgv8ccjt.js} +4 -4
- package/es/radar-KQ55EAFF-jJOhyjxC.js +3 -0
- package/es/{requirementDiagram-Z7DCOOCP-D7eLn3fs.js → requirementDiagram-Z7DCOOCP-B2NyhxO-.js} +59 -59
- package/es/{rough.esm-C_hJ3ICT.js → rough.esm-BhGP2Udb.js} +1 -1
- package/es/{sankeyDiagram-WA2Y5GQK-DN5ZPgWU.js → sankeyDiagram-WA2Y5GQK-BfnH_gpl.js} +18 -18
- package/es/{sequenceDiagram-2WXFIKYE-CRFEBP8-.js → sequenceDiagram-2WXFIKYE-DXssVQOF.js} +390 -390
- package/es/{src-BH16DVv0.js → src-CUQ6oOYk.js} +86 -86
- package/es/{stateDiagram-RAJIS63D-CfO23QJX.js → stateDiagram-RAJIS63D-DvDLfupV.js} +68 -68
- package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +27 -0
- package/es/{timeline-definition-YZTLITO2-DmpPrD-3.js → timeline-definition-YZTLITO2-ErcRjbZf.js} +4 -4
- package/es/treemap-KZPCXAKY-CvZAIYVa.js +3 -0
- package/es/{vennDiagram-LZ73GAT5-B80Xr4jV.js → vennDiagram-LZ73GAT5-CDTZUtc8.js} +107 -107
- package/es/{vue-DTiWrQBM.js → vue-2aJw7p5p.js} +2 -2
- package/es/{vue-html-BG3Xflut.js → vue-html-DEjI8X9t.js} +1 -1
- package/es/{xychartDiagram-JWTSCODW-DvQyPDr4.js → xychartDiagram-JWTSCODW-Y21jBOTg.js} +103 -103
- package/package.json +1 -1
- package/es/architecture-PBZL5I3N-CBmkTWjb.js +0 -3
- package/es/channel-DIQFjdG3.js +0 -5
- package/es/chunk-GLR3WWYH-CqFdLic9.js +0 -41
- package/es/classDiagram-VBA2DB6C-B3yBiQy3.js +0 -29
- package/es/classDiagram-v2-RAHNMMFH-jbFYm_Xj.js +0 -29
- package/es/clone-DXVS0uSx.js +0 -8
- package/es/dagre-KLK3FWXG-CEhXRLVR.js +0 -294
- package/es/gitGraph-HDMCJU4V-CrEEHSZS.js +0 -3
- package/es/html-JbFqcNgP.js +0 -2
- package/es/info-3K5VOQVL-Dg3DCp4F.js +0 -3
- package/es/packet-RMMSAZCW-Dk7mKMJ4.js +0 -3
- package/es/pie-UPGHQEXC-CnM5YLNO.js +0 -3
- package/es/radar-KQ55EAFF-BwfADDx8.js +0 -3
- package/es/stateDiagram-v2-FVOUBMTO-BGWbXepL.js +0 -27
- package/es/treemap-KZPCXAKY-BWfn7JxQ.js +0 -3
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import { g as e, h as t } from "./src-CUQ6oOYk.js";
|
|
2
|
+
import { r as n } from "./_baseUniq-BlS7rXTs.js";
|
|
3
|
+
import { s as r } from "./_basePickBy-DFHEGO2M.js";
|
|
4
|
+
import { t as i } from "./dagre-5aGJFKmT.js";
|
|
5
|
+
import "./chunk-GEFDOKGD-BWpC-zoH.js";
|
|
6
|
+
import { t as a } from "./clone-r3YukIBB.js";
|
|
7
|
+
import { t as o } from "./graphlib-dRkI1OCL.js";
|
|
8
|
+
import { b as s } from "./chunk-7R4GIKGN-QT6IorJ_.js";
|
|
9
|
+
import "./chunk-PU5JKC2W-DdP8BS-S.js";
|
|
10
|
+
import "./chunk-MX3YWQON-BxE-Aq9c.js";
|
|
11
|
+
import { n as c } from "./chunk-YBOYWFTD-CvaddD9G.js";
|
|
12
|
+
import "./chunk-PQ6SQG4A-D3jtNCWN.js";
|
|
13
|
+
import { a as l, c as u, i as d, l as f, n as p, t as m, u as h } from "./chunk-KYZI473N-BHJ3T5Zv.js";
|
|
14
|
+
import { a as g, i as _, n as v, r as y, t as b } from "./chunk-O4XLMI2P-qjOoGpnx.js";
|
|
15
|
+
//#region ../../node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/json.js
|
|
16
|
+
function x(e) {
|
|
17
|
+
var t = {
|
|
18
|
+
options: {
|
|
19
|
+
directed: e.isDirected(),
|
|
20
|
+
multigraph: e.isMultigraph(),
|
|
21
|
+
compound: e.isCompound()
|
|
22
|
+
},
|
|
23
|
+
nodes: S(e),
|
|
24
|
+
edges: C(e)
|
|
25
|
+
};
|
|
26
|
+
return n(e.graph()) || (t.value = a(e.graph())), t;
|
|
27
|
+
}
|
|
28
|
+
function S(e) {
|
|
29
|
+
return r(e.nodes(), function(t) {
|
|
30
|
+
var r = e.node(t), i = e.parent(t), a = { v: t };
|
|
31
|
+
return n(r) || (a.value = r), n(i) || (a.parent = i), a;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function C(e) {
|
|
35
|
+
return r(e.edges(), function(t) {
|
|
36
|
+
var r = e.edge(t), i = {
|
|
37
|
+
v: t.v,
|
|
38
|
+
w: t.w
|
|
39
|
+
};
|
|
40
|
+
return n(t.name) || (i.name = t.name), n(r) || (i.value = r), i;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region ../../node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-KLK3FWXG.mjs
|
|
45
|
+
var w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ t(() => {
|
|
46
|
+
T.clear(), E.clear(), w.clear();
|
|
47
|
+
}, "clear"), O = /* @__PURE__ */ t((t, n) => {
|
|
48
|
+
let r = T.get(n) || [];
|
|
49
|
+
return e.trace("In isDescendant", n, " ", t, " = ", r.includes(t)), r.includes(t);
|
|
50
|
+
}, "isDescendant"), k = /* @__PURE__ */ t((t, n) => {
|
|
51
|
+
let r = T.get(n) || [];
|
|
52
|
+
return e.info("Descendants of ", n, " is ", r), e.info("Edge is ", t), t.v === n || t.w === n ? !1 : r ? r.includes(t.v) || O(t.v, n) || O(t.w, n) || r.includes(t.w) : (e.debug("Tilt, ", n, ",not in descendants"), !1);
|
|
53
|
+
}, "edgeInCluster"), A = /* @__PURE__ */ t((t, n, r, i) => {
|
|
54
|
+
e.warn("Copying children of ", t, "root", i, "data", n.node(t), i);
|
|
55
|
+
let a = n.children(t) || [];
|
|
56
|
+
t !== i && a.push(t), e.warn("Copying (nodes) clusterId", t, "nodes", a), a.forEach((a) => {
|
|
57
|
+
if (n.children(a).length > 0) A(a, n, r, i);
|
|
58
|
+
else {
|
|
59
|
+
let o = n.node(a);
|
|
60
|
+
e.info("cp ", a, " to ", i, " with parent ", t), r.setNode(a, o), i !== n.parent(a) && (e.warn("Setting parent", a, n.parent(a)), r.setParent(a, n.parent(a))), t !== i && a !== t ? (e.debug("Setting parent", a, t), r.setParent(a, t)) : (e.info("In copy ", t, "root", i, "data", n.node(t), i), e.debug("Not Setting parent for node=", a, "cluster!==rootId", t !== i, "node!==clusterId", a !== t));
|
|
61
|
+
let s = n.edges(a);
|
|
62
|
+
e.debug("Copying Edges", s), s.forEach((a) => {
|
|
63
|
+
e.info("Edge", a);
|
|
64
|
+
let o = n.edge(a.v, a.w, a.name);
|
|
65
|
+
e.info("Edge data", o, i);
|
|
66
|
+
try {
|
|
67
|
+
k(a, i) ? (e.info("Copying as ", a.v, a.w, o, a.name), r.setEdge(a.v, a.w, o, a.name), e.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : e.info("Skipping copy of edge ", a.v, "-->", a.w, " rootId: ", i, " clusterId:", t);
|
|
68
|
+
} catch (t) {
|
|
69
|
+
e.error(t);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
e.debug("Removing node", a), n.removeNode(a);
|
|
74
|
+
});
|
|
75
|
+
}, "copy"), j = /* @__PURE__ */ t((e, t) => {
|
|
76
|
+
let n = t.children(e), r = [...n];
|
|
77
|
+
for (let i of n) E.set(i, e), r = [...r, ...j(i, t)];
|
|
78
|
+
return r;
|
|
79
|
+
}, "extractDescendants"), M = /* @__PURE__ */ t((e, t, n) => {
|
|
80
|
+
let r = e.edges().filter((e) => e.v === t || e.w === t), i = e.edges().filter((e) => e.v === n || e.w === n), a = r.map((e) => ({
|
|
81
|
+
v: e.v === t ? n : e.v,
|
|
82
|
+
w: e.w === t ? t : e.w
|
|
83
|
+
})), o = i.map((e) => ({
|
|
84
|
+
v: e.v,
|
|
85
|
+
w: e.w
|
|
86
|
+
}));
|
|
87
|
+
return a.filter((e) => o.some((t) => e.v === t.v && e.w === t.w));
|
|
88
|
+
}, "findCommonEdges"), N = /* @__PURE__ */ t((t, n, r) => {
|
|
89
|
+
let i = n.children(t);
|
|
90
|
+
if (e.trace("Searching children of id ", t, i), i.length < 1) return t;
|
|
91
|
+
let a;
|
|
92
|
+
for (let e of i) {
|
|
93
|
+
let t = N(e, n, r), i = M(n, r, t);
|
|
94
|
+
if (t) if (i.length > 0) a = t;
|
|
95
|
+
else return t;
|
|
96
|
+
}
|
|
97
|
+
return a;
|
|
98
|
+
}, "findNonClusterChild"), P = /* @__PURE__ */ t((e) => !w.has(e) || !w.get(e).externalConnections ? e : w.has(e) ? w.get(e).id : e, "getAnchorId"), F = /* @__PURE__ */ t((t, n) => {
|
|
99
|
+
if (!t || n > 10) {
|
|
100
|
+
e.debug("Opting out, no graph ");
|
|
101
|
+
return;
|
|
102
|
+
} else e.debug("Opting in, graph ");
|
|
103
|
+
t.nodes().forEach(function(n) {
|
|
104
|
+
t.children(n).length > 0 && (e.warn("Cluster identified", n, " Replacement id in edges: ", N(n, t, n)), T.set(n, j(n, t)), w.set(n, {
|
|
105
|
+
id: N(n, t, n),
|
|
106
|
+
clusterData: t.node(n)
|
|
107
|
+
}));
|
|
108
|
+
}), t.nodes().forEach(function(n) {
|
|
109
|
+
let r = t.children(n), i = t.edges();
|
|
110
|
+
r.length > 0 ? (e.debug("Cluster identified", n, T), i.forEach((t) => {
|
|
111
|
+
O(t.v, n) ^ O(t.w, n) && (e.warn("Edge: ", t, " leaves cluster ", n), e.warn("Descendants of XXX ", n, ": ", T.get(n)), w.get(n).externalConnections = !0);
|
|
112
|
+
})) : e.debug("Not a cluster ", n, T);
|
|
113
|
+
});
|
|
114
|
+
for (let e of w.keys()) {
|
|
115
|
+
let n = w.get(e).id, r = t.parent(n);
|
|
116
|
+
r !== e && w.has(r) && !w.get(r).externalConnections && (w.get(e).id = r);
|
|
117
|
+
}
|
|
118
|
+
t.edges().forEach(function(n) {
|
|
119
|
+
let r = t.edge(n);
|
|
120
|
+
e.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), e.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(t.edge(n)));
|
|
121
|
+
let i = n.v, a = n.w;
|
|
122
|
+
if (e.warn("Fix XXX", w, "ids:", n.v, n.w, "Translating: ", w.get(n.v), " --- ", w.get(n.w)), w.get(n.v) || w.get(n.w)) {
|
|
123
|
+
if (e.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), i = P(n.v), a = P(n.w), t.removeEdge(n.v, n.w, n.name), i !== n.v) {
|
|
124
|
+
let e = t.parent(i);
|
|
125
|
+
w.get(e).externalConnections = !0, r.fromCluster = n.v;
|
|
126
|
+
}
|
|
127
|
+
if (a !== n.w) {
|
|
128
|
+
let e = t.parent(a);
|
|
129
|
+
w.get(e).externalConnections = !0, r.toCluster = n.w;
|
|
130
|
+
}
|
|
131
|
+
e.warn("Fix Replacing with XXX", i, a, n.name), t.setEdge(i, a, r, n.name);
|
|
132
|
+
}
|
|
133
|
+
}), e.warn("Adjusted Graph", x(t)), I(t, 0), e.trace(w);
|
|
134
|
+
}, "adjustClustersAndEdges"), I = /* @__PURE__ */ t((t, n) => {
|
|
135
|
+
if (e.warn("extractor - ", n, x(t), t.children("D")), n > 10) {
|
|
136
|
+
e.error("Bailing out");
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
let r = t.nodes(), i = !1;
|
|
140
|
+
for (let e of r) {
|
|
141
|
+
let n = t.children(e);
|
|
142
|
+
i ||= n.length > 0;
|
|
143
|
+
}
|
|
144
|
+
if (!i) {
|
|
145
|
+
e.debug("Done, no node has children", t.nodes());
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
e.debug("Nodes = ", r, n);
|
|
149
|
+
for (let i of r) if (e.debug("Extracting node", i, w, w.has(i) && !w.get(i).externalConnections, !t.parent(i), t.node(i), t.children("D"), " Depth ", n), !w.has(i)) e.debug("Not a cluster", i, n);
|
|
150
|
+
else if (!w.get(i).externalConnections && t.children(i) && t.children(i).length > 0) {
|
|
151
|
+
e.warn("Cluster without external connections, without a parent and with children", i, n);
|
|
152
|
+
let r = t.graph().rankdir === "TB" ? "LR" : "TB";
|
|
153
|
+
w.get(i)?.clusterData?.dir && (r = w.get(i).clusterData.dir, e.warn("Fixing dir", w.get(i).clusterData.dir, r));
|
|
154
|
+
let a = new o({
|
|
155
|
+
multigraph: !0,
|
|
156
|
+
compound: !0
|
|
157
|
+
}).setGraph({
|
|
158
|
+
rankdir: r,
|
|
159
|
+
nodesep: 50,
|
|
160
|
+
ranksep: 50,
|
|
161
|
+
marginx: 8,
|
|
162
|
+
marginy: 8
|
|
163
|
+
}).setDefaultEdgeLabel(function() {
|
|
164
|
+
return {};
|
|
165
|
+
});
|
|
166
|
+
e.warn("Old graph before copy", x(t)), A(i, t, a, i), t.setNode(i, {
|
|
167
|
+
clusterNode: !0,
|
|
168
|
+
id: i,
|
|
169
|
+
clusterData: w.get(i).clusterData,
|
|
170
|
+
label: w.get(i).label,
|
|
171
|
+
graph: a
|
|
172
|
+
}), e.warn("New graph after copy node: (", i, ")", x(a)), e.debug("Old graph after copy", x(t));
|
|
173
|
+
} else e.warn("Cluster ** ", i, " **not meeting the criteria !externalConnections:", !w.get(i).externalConnections, " no parent: ", !t.parent(i), " children ", t.children(i) && t.children(i).length > 0, t.children("D"), n), e.debug(w);
|
|
174
|
+
r = t.nodes(), e.warn("New list of nodes", r);
|
|
175
|
+
for (let i of r) {
|
|
176
|
+
let r = t.node(i);
|
|
177
|
+
e.warn(" Now next level", i, r), r?.clusterNode && I(r.graph, n + 1);
|
|
178
|
+
}
|
|
179
|
+
}, "extractor"), L = /* @__PURE__ */ t((e, t) => {
|
|
180
|
+
if (t.length === 0) return [];
|
|
181
|
+
let n = Object.assign([], t);
|
|
182
|
+
return t.forEach((t) => {
|
|
183
|
+
let r = L(e, e.children(t));
|
|
184
|
+
n = [...n, ...r];
|
|
185
|
+
}), n;
|
|
186
|
+
}, "sorter"), R = /* @__PURE__ */ t((e) => L(e, e.children()), "sortNodesByHierarchy"), z = /* @__PURE__ */ t(async (n, r, a, o, s, p) => {
|
|
187
|
+
e.warn("Graph in recursive render:XAX", x(r), s);
|
|
188
|
+
let m = r.graph().rankdir;
|
|
189
|
+
e.trace("Dir in recursive render - dir:", m);
|
|
190
|
+
let _ = n.insert("g").attr("class", "root");
|
|
191
|
+
r.nodes() ? e.info("Recursive render XXX", r.nodes()) : e.info("No nodes found for", r), r.edges().length > 0 && e.info("Recursive edges", r.edge(r.edges()[0]));
|
|
192
|
+
let b = _.insert("g").attr("class", "clusters"), S = _.insert("g").attr("class", "edgePaths"), C = _.insert("g").attr("class", "edgeLabels"), T = _.insert("g").attr("class", "nodes");
|
|
193
|
+
await Promise.all(r.nodes().map(async function(t) {
|
|
194
|
+
let n = r.node(t);
|
|
195
|
+
if (s !== void 0) {
|
|
196
|
+
let n = JSON.parse(JSON.stringify(s.clusterData));
|
|
197
|
+
e.trace("Setting data for parent cluster XXX\n Node.id = ", t, "\n data=", n.height, "\nParent cluster", s.height), r.setNode(s.id, n), r.parent(t) || (e.trace("Setting parent", t, s.id), r.setParent(t, s.id, n));
|
|
198
|
+
}
|
|
199
|
+
if (e.info("(Insert) Node XXX" + t + ": " + JSON.stringify(r.node(t))), n?.clusterNode) {
|
|
200
|
+
e.info("Cluster identified XBX", t, n.width, r.node(t));
|
|
201
|
+
let { ranksep: i, nodesep: s } = r.graph();
|
|
202
|
+
n.graph.setGraph({
|
|
203
|
+
...n.graph.graph(),
|
|
204
|
+
ranksep: i + 25,
|
|
205
|
+
nodesep: s
|
|
206
|
+
});
|
|
207
|
+
let c = await z(T, n.graph, a, o, r.node(t), p), l = c.elem;
|
|
208
|
+
h(n, l), n.diff = c.diff || 0, e.info("New compound node after recursive render XAX", t, "width", n.width, "height", n.height), f(l, n);
|
|
209
|
+
} else r.children(t).length > 0 ? (e.trace("Cluster - the non recursive path XBX", t, n.id, n, n.width, "Graph:", r), e.trace(N(n.id, r)), w.set(n.id, {
|
|
210
|
+
id: N(n.id, r),
|
|
211
|
+
node: n
|
|
212
|
+
})) : (e.trace("Node - the non recursive path XAX", t, T, r.node(t), m), await l(T, r.node(t), {
|
|
213
|
+
config: p,
|
|
214
|
+
dir: m
|
|
215
|
+
}));
|
|
216
|
+
})), await (/* @__PURE__ */ t(async () => {
|
|
217
|
+
let t = r.edges().map(async function(t) {
|
|
218
|
+
let n = r.edge(t.v, t.w, t.name);
|
|
219
|
+
e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(t)), e.info("Edge " + t.v + " -> " + t.w + ": ", t, " ", JSON.stringify(r.edge(t))), e.info("Fix", w, "ids:", t.v, t.w, "Translating: ", w.get(t.v), w.get(t.w)), await y(C, n);
|
|
220
|
+
});
|
|
221
|
+
await Promise.all(t);
|
|
222
|
+
}, "processEdges"))(), e.info("Graph before layout:", JSON.stringify(x(r))), e.info("############################################# XXX"), e.info("### Layout ### XXX"), e.info("############################################# XXX"), i(r), e.info("Graph after layout:", JSON.stringify(x(r)));
|
|
223
|
+
let E = 0, { subGraphTitleTotalMargin: D } = c(p);
|
|
224
|
+
return await Promise.all(R(r).map(async function(t) {
|
|
225
|
+
let n = r.node(t);
|
|
226
|
+
if (e.info("Position XBX => " + t + ": (" + n.x, "," + n.y, ") width: ", n.width, " height: ", n.height), n?.clusterNode) n.y += D, e.info("A tainted cluster node XBX1", t, n.id, n.width, n.height, n.x, n.y, r.parent(t)), w.get(n.id).node = n, u(n);
|
|
227
|
+
else if (r.children(t).length > 0) {
|
|
228
|
+
e.info("A pure cluster node XBX1", t, n.id, n.x, n.y, n.width, n.height, r.parent(t)), n.height += D, r.node(n.parentId);
|
|
229
|
+
let i = n?.padding / 2 || 0, a = n?.labelBBox?.height || 0, o = a - i || 0;
|
|
230
|
+
e.debug("OffsetY", o, "labelHeight", a, "halfPadding", i), await d(b, n), w.get(n.id).node = n;
|
|
231
|
+
} else {
|
|
232
|
+
let t = r.node(n.parentId);
|
|
233
|
+
n.y += D / 2, e.info("A regular node XBX1 - using the padding", n.id, "parent", n.parentId, n.width, n.height, n.x, n.y, "offsetY", n.offsetY, "parent", t, t?.offsetY, n), u(n);
|
|
234
|
+
}
|
|
235
|
+
})), r.edges().forEach(function(t) {
|
|
236
|
+
let n = r.edge(t);
|
|
237
|
+
e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(n), n), n.points.forEach((e) => e.y += D / 2), g(n, v(S, n, w, a, r.node(t.v), r.node(t.w), o));
|
|
238
|
+
}), r.nodes().forEach(function(t) {
|
|
239
|
+
let n = r.node(t);
|
|
240
|
+
e.info(t, n.type, n.diff), n.isGroup && (E = n.diff);
|
|
241
|
+
}), e.warn("Returning from recursive render XAX", _, E), {
|
|
242
|
+
elem: _,
|
|
243
|
+
diff: E
|
|
244
|
+
};
|
|
245
|
+
}, "recursiveRender"), B = /* @__PURE__ */ t(async (t, n) => {
|
|
246
|
+
let r = new o({
|
|
247
|
+
multigraph: !0,
|
|
248
|
+
compound: !0
|
|
249
|
+
}).setGraph({
|
|
250
|
+
rankdir: t.direction,
|
|
251
|
+
nodesep: t.config?.nodeSpacing || t.config?.flowchart?.nodeSpacing || t.nodeSpacing,
|
|
252
|
+
ranksep: t.config?.rankSpacing || t.config?.flowchart?.rankSpacing || t.rankSpacing,
|
|
253
|
+
marginx: 8,
|
|
254
|
+
marginy: 8
|
|
255
|
+
}).setDefaultEdgeLabel(function() {
|
|
256
|
+
return {};
|
|
257
|
+
}), i = n.select("g");
|
|
258
|
+
_(i, t.markers, t.type, t.diagramId), p(), b(), m(), D(), t.nodes.forEach((e) => {
|
|
259
|
+
r.setNode(e.id, { ...e }), e.parentId && r.setParent(e.id, e.parentId);
|
|
260
|
+
}), e.debug("Edges:", t.edges), t.edges.forEach((e) => {
|
|
261
|
+
if (e.start === e.end) {
|
|
262
|
+
let t = e.start, n = t + "---" + t + "---1", i = t + "---" + t + "---2", a = r.node(t);
|
|
263
|
+
r.setNode(n, {
|
|
264
|
+
domId: n,
|
|
265
|
+
id: n,
|
|
266
|
+
parentId: a.parentId,
|
|
267
|
+
labelStyle: "",
|
|
268
|
+
label: "",
|
|
269
|
+
padding: 0,
|
|
270
|
+
shape: "labelRect",
|
|
271
|
+
style: "",
|
|
272
|
+
width: 10,
|
|
273
|
+
height: 10
|
|
274
|
+
}), r.setParent(n, a.parentId), r.setNode(i, {
|
|
275
|
+
domId: i,
|
|
276
|
+
id: i,
|
|
277
|
+
parentId: a.parentId,
|
|
278
|
+
labelStyle: "",
|
|
279
|
+
padding: 0,
|
|
280
|
+
shape: "labelRect",
|
|
281
|
+
label: "",
|
|
282
|
+
style: "",
|
|
283
|
+
width: 10,
|
|
284
|
+
height: 10
|
|
285
|
+
}), r.setParent(i, a.parentId);
|
|
286
|
+
let o = structuredClone(e), s = structuredClone(e), c = structuredClone(e);
|
|
287
|
+
o.label = "", o.arrowTypeEnd = "none", o.id = t + "-cyclic-special-1", s.arrowTypeStart = "none", s.arrowTypeEnd = "none", s.id = t + "-cyclic-special-mid", c.label = "", a.isGroup && (o.fromCluster = t, c.toCluster = t), c.id = t + "-cyclic-special-2", c.arrowTypeStart = "none", r.setEdge(t, n, o, t + "-cyclic-special-0"), r.setEdge(n, i, s, t + "-cyclic-special-1"), r.setEdge(i, t, c, t + "-cyc<lic-special-2");
|
|
288
|
+
} else r.setEdge(e.start, e.end, { ...e }, e.id);
|
|
289
|
+
}), e.warn("Graph at first:", JSON.stringify(x(r))), F(r), e.warn("Graph after XAX:", JSON.stringify(x(r)));
|
|
290
|
+
let a = s();
|
|
291
|
+
await z(i, r, t.type, t.diagramId, void 0, a);
|
|
292
|
+
}, "render");
|
|
293
|
+
//#endregion
|
|
294
|
+
export { B as render };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/d3-format/src/formatDecimal.js
|
|
1
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatDecimal.js
|
|
2
2
|
function e(e) {
|
|
3
3
|
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
|
|
4
4
|
}
|
|
@@ -8,12 +8,12 @@ function t(e, t) {
|
|
|
8
8
|
return [r.length > 1 ? r[0] + r.slice(2) : r, +e.slice(n + 1)];
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
//#region ../../node_modules/d3-format/src/exponent.js
|
|
11
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/exponent.js
|
|
12
12
|
function n(e) {
|
|
13
13
|
return e = t(Math.abs(e)), e ? e[1] : NaN;
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
//#region ../../node_modules/d3-format/src/formatGroup.js
|
|
16
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatGroup.js
|
|
17
17
|
function r(e, t) {
|
|
18
18
|
return function(n, r) {
|
|
19
19
|
for (var i = n.length, a = [], o = 0, s = e[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r));) s = e[o = (o + 1) % e.length];
|
|
@@ -21,7 +21,7 @@ function r(e, t) {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
|
-
//#region ../../node_modules/d3-format/src/formatNumerals.js
|
|
24
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatNumerals.js
|
|
25
25
|
function i(e) {
|
|
26
26
|
return function(t) {
|
|
27
27
|
return t.replace(/[0-9]/g, function(t) {
|
|
@@ -30,7 +30,7 @@ function i(e) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
|
-
//#region ../../node_modules/d3-format/src/formatSpecifier.js
|
|
33
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatSpecifier.js
|
|
34
34
|
var a = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
35
35
|
function o(e) {
|
|
36
36
|
if (!(t = a.exec(e))) throw Error("invalid format: " + e);
|
|
@@ -56,7 +56,7 @@ s.prototype.toString = function() {
|
|
|
56
56
|
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
57
57
|
};
|
|
58
58
|
//#endregion
|
|
59
|
-
//#region ../../node_modules/d3-format/src/formatTrim.js
|
|
59
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatTrim.js
|
|
60
60
|
function c(e) {
|
|
61
61
|
out: for (var t = e.length, n = 1, r = -1, i; n < t; ++n) switch (e[n]) {
|
|
62
62
|
case ".":
|
|
@@ -73,7 +73,7 @@ function c(e) {
|
|
|
73
73
|
return r > 0 ? e.slice(0, r) + e.slice(i + 1) : e;
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
|
-
//#region ../../node_modules/d3-format/src/formatPrefixAuto.js
|
|
76
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatPrefixAuto.js
|
|
77
77
|
var l;
|
|
78
78
|
function u(e, n) {
|
|
79
79
|
var r = t(e, n);
|
|
@@ -82,7 +82,7 @@ function u(e, n) {
|
|
|
82
82
|
return o === s ? i : o > s ? i + Array(o - s + 1).join("0") : o > 0 ? i.slice(0, o) + "." + i.slice(o) : "0." + Array(1 - o).join("0") + t(e, Math.max(0, n + o - 1))[0];
|
|
83
83
|
}
|
|
84
84
|
//#endregion
|
|
85
|
-
//#region ../../node_modules/d3-format/src/formatRounded.js
|
|
85
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatRounded.js
|
|
86
86
|
function d(e, n) {
|
|
87
87
|
var r = t(e, n);
|
|
88
88
|
if (!r) return e + "";
|
|
@@ -90,7 +90,7 @@ function d(e, n) {
|
|
|
90
90
|
return a < 0 ? "0." + Array(-a).join("0") + i : i.length > a + 1 ? i.slice(0, a + 1) + "." + i.slice(a + 1) : i + Array(a - i.length + 2).join("0");
|
|
91
91
|
}
|
|
92
92
|
//#endregion
|
|
93
|
-
//#region ../../node_modules/d3-format/src/formatTypes.js
|
|
93
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatTypes.js
|
|
94
94
|
var f = {
|
|
95
95
|
"%": (e, t) => (e * 100).toFixed(t),
|
|
96
96
|
b: (e) => Math.round(e).toString(2),
|
|
@@ -107,12 +107,12 @@ var f = {
|
|
|
107
107
|
x: (e) => Math.round(e).toString(16)
|
|
108
108
|
};
|
|
109
109
|
//#endregion
|
|
110
|
-
//#region ../../node_modules/d3-format/src/identity.js
|
|
110
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/identity.js
|
|
111
111
|
function p(e) {
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
|
-
//#region ../../node_modules/d3-format/src/locale.js
|
|
115
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/locale.js
|
|
116
116
|
var m = Array.prototype.map, h = [
|
|
117
117
|
"y",
|
|
118
118
|
"z",
|
|
@@ -187,7 +187,7 @@ function g(e) {
|
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
//#endregion
|
|
190
|
-
//#region ../../node_modules/d3-format/src/defaultLocale.js
|
|
190
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/defaultLocale.js
|
|
191
191
|
var _, v, y;
|
|
192
192
|
b({
|
|
193
193
|
thousands: ",",
|