@omg-dev/app 0.5.0 → 0.6.1

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.
Files changed (113) hide show
  1. package/dist-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
  2. package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
  3. package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
  4. package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
  5. package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
  6. package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
  7. package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
  8. package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
  9. package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
  10. package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
  11. package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
  12. package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
  13. package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
  14. package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
  15. package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
  16. package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
  17. package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
  18. package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
  19. package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
  20. package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
  21. package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
  22. package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
  23. package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
  24. package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
  25. package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
  26. package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
  27. package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
  28. package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
  29. package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
  30. package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
  31. package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
  32. package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
  33. package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
  34. package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
  35. package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
  36. package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
  37. package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
  38. package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
  39. package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
  40. package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
  41. package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
  42. package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
  43. package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
  44. package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
  45. package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
  46. package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
  47. package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
  48. package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
  49. package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
  50. package/dist-lib/index-B0neMIbR.js +16520 -0
  51. package/dist-lib/index-BBC0E3Qg.js +4994 -0
  52. package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
  53. package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
  54. package/dist-lib/index.js +1 -1
  55. package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
  56. package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
  57. package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
  58. package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
  59. package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
  60. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  61. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  62. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  63. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  64. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  65. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  66. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  67. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  68. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  69. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  70. package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
  71. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  72. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  73. package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
  74. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  75. package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
  76. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  77. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  78. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  79. package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
  80. package/dist-lib/styles.css +1 -1
  81. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  82. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  83. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  84. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  85. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  86. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  87. package/package.json +4 -3
  88. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  89. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  90. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  91. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  92. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  93. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  94. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  95. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  96. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  97. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  98. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  99. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  100. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  101. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  102. package/dist-lib/index-DcwavxA1.js +0 -5062
  103. package/dist-lib/index-JkCQXUYs.js +0 -16566
  104. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  105. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  106. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  107. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  108. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  109. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  110. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  111. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  112. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  113. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -1,346 +0,0 @@
1
- import { c as O, w as M, a as J, f as P, b as N, s as A } from "./chunk-RYQCIY6F-fkeERzIG.js";
2
- import { _ as X, am as v, an as D, ao as H, ap as Y, l as d, c as _, aq as W, ar as $, ag as j, as as q, ah as R, af as F, at as z, au as K, av as G } from "./index-JkCQXUYs.js";
3
- import { G as Q } from "./graph-B68L3K2T.js";
4
- import { l as U } from "./layout-BGrtsiRL.js";
5
- var C = /* @__PURE__ */ X((o, s, l) => Math.max(s, Math.min(l, o)), "clamp"), B = /* @__PURE__ */ X((o = "TB") => {
6
- switch (o) {
7
- case "BT":
8
- return "bottom";
9
- case "LR":
10
- return "right";
11
- case "RL":
12
- return "left";
13
- case "TB":
14
- default:
15
- return "top";
16
- }
17
- }, "getDefaultSelfLoopSide"), V = /* @__PURE__ */ X((o) => o === "flowchart" || o === "flowchart-v2" || o === "stateDiagram", "shouldMergeSelfLoopSegments"), Z = /* @__PURE__ */ X((o, s, l, y, a) => {
18
- const f = [], p = /* @__PURE__ */ new Set();
19
- if (l.forEach(({ start: r, end: t }) => {
20
- r !== y && p.add(r), t !== y && p.add(t);
21
- }), p.forEach((r) => {
22
- const t = o.node(r);
23
- typeof (t == null ? void 0 : t.x) == "number" && typeof (t == null ? void 0 : t.y) == "number" && f.push(t);
24
- }), f.length === 0 && l.forEach(({ edge: r }) => {
25
- (r.points ?? []).forEach((t) => {
26
- typeof (t == null ? void 0 : t.x) == "number" && typeof (t == null ? void 0 : t.y) == "number" && f.push(t);
27
- });
28
- }), f.length === 0)
29
- return B(a);
30
- const c = f.reduce(
31
- (r, t) => ({
32
- x: r.x + t.x / f.length,
33
- y: r.y + t.y / f.length
34
- }),
35
- { x: 0, y: 0 }
36
- ), h = c.x - s.x, i = c.y - s.y;
37
- return Math.abs(h) > Math.abs(i) ? h > 0 ? "right" : "left" : Math.abs(i) > 0 ? i > 0 ? "bottom" : "top" : B(a);
38
- }, "getSelfLoopSide"), ee = /* @__PURE__ */ X((o, s = "top", l = 0, y = 0) => {
39
- const a = o.x, f = o.y - l, p = o.width / 2, c = o.height / 2, h = Math.max(36, Math.min(100, o.width * 0.8)), i = C(Math.max(y, o.width * 0.35), 36, h), r = C(Math.min(o.width, o.height) * 0.45, 24, 48);
40
- switch (s) {
41
- case "bottom": {
42
- const t = f + c;
43
- return [
44
- { x: a - i / 2, y: t },
45
- { x: a - i / 2, y: t + r },
46
- { x: a + i / 2, y: t + r },
47
- { x: a + i / 2, y: t }
48
- ];
49
- }
50
- case "right": {
51
- const t = a + p;
52
- return [
53
- { x: t, y: f - i / 2 },
54
- { x: t + r, y: f - i / 2 },
55
- { x: t + r, y: f + i / 2 },
56
- { x: t, y: f + i / 2 }
57
- ];
58
- }
59
- case "left": {
60
- const t = a - p;
61
- return [
62
- { x: t, y: f - i / 2 },
63
- { x: t - r, y: f - i / 2 },
64
- { x: t - r, y: f + i / 2 },
65
- { x: t, y: f + i / 2 }
66
- ];
67
- }
68
- case "top":
69
- default: {
70
- const t = f - c;
71
- return [
72
- { x: a - i / 2, y: t },
73
- { x: a - i / 2, y: t - r },
74
- { x: a + i / 2, y: t - r },
75
- { x: a + i / 2, y: t }
76
- ];
77
- }
78
- }
79
- }, "getSelfLoopPoints"), te = /* @__PURE__ */ X((o, s, l = "top", y = 0, a = {}) => {
80
- const p = o.x, c = o.y - y, h = a.width ?? 0, i = a.height ?? 0;
81
- switch (l) {
82
- case "bottom":
83
- return { x: p, y: Math.max(...s.map((r) => r.y)) + i / 2 + 4 };
84
- case "right":
85
- return { x: Math.max(...s.map((r) => r.x)) + h / 2 + 4, y: c };
86
- case "left":
87
- return { x: Math.min(...s.map((r) => r.x)) - h / 2 - 4, y: c };
88
- case "top":
89
- default:
90
- return { x: p, y: Math.min(...s.map((r) => r.y)) - i / 2 - 4 };
91
- }
92
- }, "getSelfLoopLabelPosition"), se = /* @__PURE__ */ X((o, s = 0, { mergeSelfLoops: l = !0 } = {}) => {
93
- var p;
94
- const y = /* @__PURE__ */ new Map(), a = [], f = (p = o.graph()) == null ? void 0 : p.rankdir;
95
- return o.edges().forEach((c) => {
96
- const h = o.edge(c);
97
- if (l && h.selfLoop) {
98
- const i = h.selfLoop.id;
99
- y.has(i) || y.set(i, []), y.get(i).push({ edge: h, start: c.v, end: c.w });
100
- } else
101
- a.push({ edge: h, start: c.v, end: c.w });
102
- }), y.forEach((c) => {
103
- if (c.length !== 3) {
104
- c.forEach((n) => a.push(n));
105
- return;
106
- }
107
- c.sort((n, e) => n.edge.selfLoop.order - e.edge.selfLoop.order);
108
- const [h, i, r] = c, t = h.edge.originalEdge ?? i.edge.originalEdge ?? r.edge.originalEdge ?? i.edge, g = o.node(t.start);
109
- if (!g) {
110
- c.forEach((n) => a.push(n));
111
- return;
112
- }
113
- const S = {
114
- width: i.edge.width,
115
- height: i.edge.height
116
- }, w = Z(o, g, c, t.start, f), b = ee(g, w, s, S.width ?? 0), E = te(g, b, w, s, S), m = {
117
- ...i.edge,
118
- ...t,
119
- id: t.id,
120
- points: b,
121
- start: t.start,
122
- end: t.end,
123
- x: E.x,
124
- y: E.y,
125
- width: S.width,
126
- height: S.height,
127
- labelStyle: i.edge.labelStyle,
128
- fromCluster: h.edge.fromCluster ?? i.edge.fromCluster ?? r.edge.fromCluster,
129
- toCluster: h.edge.toCluster ?? i.edge.toCluster ?? r.edge.toCluster
130
- };
131
- delete m.selfLoop, delete m.originalEdge, a.push({ edge: m, start: m.start, end: m.end });
132
- }), a;
133
- }, "getEdgesToRender"), T = /* @__PURE__ */ X(async (o, s, l, y, a, f) => {
134
- d.warn("Graph in recursive render:XAX", M(s), a);
135
- const p = s.graph().rankdir;
136
- d.trace("Dir in recursive render - dir:", p);
137
- const c = o.insert("g").attr("class", "root");
138
- s.nodes() ? d.info("Recursive render XXX", s.nodes()) : d.info("No nodes found for", s), s.edges().length > 0 && d.info("Recursive edges", s.edge(s.edges()[0]));
139
- const h = c.insert("g").attr("class", "clusters"), i = c.insert("g").attr("class", "edgePaths"), r = c.insert("g").attr("class", "edgeLabels"), t = c.insert("g").attr("class", "nodes"), g = V(l);
140
- await Promise.all(
141
- s.nodes().map(async function(n) {
142
- const e = s.node(n);
143
- if (a !== void 0) {
144
- const u = JSON.parse(JSON.stringify(a.clusterData));
145
- d.trace(
146
- `Setting data for parent cluster XXX
147
- Node.id = `,
148
- n,
149
- `
150
- data=`,
151
- u.height,
152
- `
153
- Parent cluster`,
154
- a.height
155
- ), s.setNode(a.id, u), s.parent(n) || (d.trace("Setting parent", n, a.id), s.setParent(n, a.id, u));
156
- }
157
- if (d.info("(Insert) Node XXX" + n + ": " + JSON.stringify(s.node(n))), e != null && e.clusterNode) {
158
- d.info("Cluster identified XBX", n, e.width, s.node(n));
159
- const { ranksep: u, nodesep: x } = s.graph();
160
- e.graph.setGraph({
161
- ...e.graph.graph(),
162
- ranksep: u + 25,
163
- nodesep: x
164
- });
165
- const L = await T(
166
- t,
167
- e.graph,
168
- l,
169
- y,
170
- s.node(n),
171
- f
172
- ), I = L.elem;
173
- W(e, I), e.diff = L.diff || 0, d.info(
174
- "New compound node after recursive render XAX",
175
- n,
176
- "width",
177
- // node,
178
- e.width,
179
- "height",
180
- e.height
181
- // node.x,
182
- // node.y
183
- ), $(I, e);
184
- } else
185
- s.children(n).length > 0 ? (d.trace(
186
- "Cluster - the non recursive path XBX",
187
- n,
188
- e.id,
189
- e,
190
- e.width,
191
- "Graph:",
192
- s
193
- ), d.trace(P(e.id, s)), N.set(e.id, { id: P(e.id, s), node: e })) : (d.trace("Node - the non recursive path XAX", n, t, s.node(n), p), await j(t, s.node(n), { config: f, dir: p }));
194
- })
195
- ), await (/* @__PURE__ */ X(async () => {
196
- const n = s.edges().map(async function(e) {
197
- const u = s.edge(e.v, e.w, e.name);
198
- if (d.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), d.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(s.edge(e))), d.info(
199
- "Fix",
200
- N,
201
- "ids:",
202
- e.v,
203
- e.w,
204
- "Translating: ",
205
- N.get(e.v),
206
- N.get(e.w)
207
- ), g && u.selfLoop) {
208
- if (u.selfLoop.order !== 1)
209
- return;
210
- const x = u.id;
211
- u.id = u.selfLoop.id, await G(r, u), u.id = x;
212
- return;
213
- }
214
- await G(r, u);
215
- });
216
- await Promise.all(n);
217
- }, "processEdges"))(), d.info("Graph before layout:", JSON.stringify(M(s))), d.info("############################################# XXX"), d.info("### Layout ### XXX"), d.info("############################################# XXX"), U(s), d.info("Graph after layout:", JSON.stringify(M(s)));
218
- let w = 0, { subGraphTitleTotalMargin: b } = q(f);
219
- await Promise.all(
220
- A(s).map(async function(n) {
221
- var u;
222
- const e = s.node(n);
223
- if (d.info(
224
- "Position XBX => " + n + ": (" + e.x,
225
- "," + e.y,
226
- ") width: ",
227
- e.width,
228
- " height: ",
229
- e.height
230
- ), e != null && e.clusterNode)
231
- e.y += b, d.info(
232
- "A tainted cluster node XBX1",
233
- n,
234
- e.id,
235
- e.width,
236
- e.height,
237
- e.x,
238
- e.y,
239
- s.parent(n)
240
- ), N.get(e.id).node = e, R(e);
241
- else if (s.children(n).length > 0) {
242
- d.info(
243
- "A pure cluster node XBX1",
244
- n,
245
- e.id,
246
- e.x,
247
- e.y,
248
- e.width,
249
- e.height,
250
- s.parent(n)
251
- ), e.height += b, s.node(e.parentId);
252
- const x = (e == null ? void 0 : e.padding) / 2 || 0, L = ((u = e == null ? void 0 : e.labelBBox) == null ? void 0 : u.height) || 0, I = L - x || 0;
253
- d.debug("OffsetY", I, "labelHeight", L, "halfPadding", x), await F(h, e), N.get(e.id).node = e;
254
- } else {
255
- const x = s.node(e.parentId);
256
- e.y += b / 2, d.info(
257
- "A regular node XBX1 - using the padding",
258
- e.id,
259
- "parent",
260
- e.parentId,
261
- e.width,
262
- e.height,
263
- e.x,
264
- e.y,
265
- "offsetY",
266
- e.offsetY,
267
- "parent",
268
- x,
269
- x == null ? void 0 : x.offsetY,
270
- e
271
- ), R(e);
272
- }
273
- })
274
- );
275
- const E = b / 2;
276
- return se(s, E, { mergeSelfLoops: g }).forEach(function({ edge: n, start: e, end: u }) {
277
- d.info("Edge " + e + " -> " + u + ": " + JSON.stringify(n), n), n.points.forEach((k) => k.y += E);
278
- const x = s.node(e), L = s.node(u), I = z(i, n, N, l, x, L, y);
279
- K(n, I);
280
- }), s.nodes().forEach(function(n) {
281
- const e = s.node(n);
282
- d.info(n, e.type, e.diff), e.isGroup && (w = e.diff);
283
- }), d.warn("Returning from recursive render XAX", c, w), { elem: c, diff: w };
284
- }, "recursiveRender"), ae = /* @__PURE__ */ X(async (o, s) => {
285
- var f, p, c, h, i, r;
286
- const l = new Q({
287
- multigraph: !0,
288
- compound: !0
289
- }).setGraph({
290
- rankdir: o.direction,
291
- nodesep: ((f = o.config) == null ? void 0 : f.nodeSpacing) || ((c = (p = o.config) == null ? void 0 : p.flowchart) == null ? void 0 : c.nodeSpacing) || o.nodeSpacing,
292
- ranksep: ((h = o.config) == null ? void 0 : h.rankSpacing) || ((r = (i = o.config) == null ? void 0 : i.flowchart) == null ? void 0 : r.rankSpacing) || o.rankSpacing,
293
- marginx: 8,
294
- marginy: 8
295
- }).setDefaultEdgeLabel(function() {
296
- return {};
297
- }), y = s.select("g");
298
- v(y, o.markers, o.type, o.diagramId), D(), H(), Y(), O(), o.nodes.forEach((t) => {
299
- l.setNode(t.id, { ...t }), t.parentId && l.setParent(t.id, t.parentId);
300
- }), d.debug("Edges:", o.edges), o.edges.forEach((t) => {
301
- if (t.start === t.end) {
302
- const g = t.start, S = g + "---" + g + "---1", w = g + "---" + g + "---2", b = l.node(g);
303
- l.setNode(S, {
304
- domId: S,
305
- id: S,
306
- parentId: b.parentId,
307
- labelStyle: "",
308
- label: "",
309
- padding: 0,
310
- shape: "labelRect",
311
- // shape: 'rect',
312
- style: "",
313
- width: 10,
314
- height: 10
315
- }), l.setParent(S, b.parentId), l.setNode(w, {
316
- domId: w,
317
- id: w,
318
- parentId: b.parentId,
319
- labelStyle: "",
320
- padding: 0,
321
- // shape: 'rect',
322
- shape: "labelRect",
323
- label: "",
324
- style: "",
325
- width: 10,
326
- height: 10
327
- }), l.setParent(w, b.parentId);
328
- const E = structuredClone(t), m = structuredClone(t), n = structuredClone(t), e = structuredClone(t);
329
- m.originalEdge = E, m.selfLoop = { id: E.id, order: 0 }, n.originalEdge = E, n.selfLoop = { id: E.id, order: 1 }, e.originalEdge = E, e.selfLoop = { id: E.id, order: 2 }, m.label = "", m.arrowTypeEnd = "none", m.endLabelLeft = "", m.endLabelRight = "", m.startLabelLeft = "", m.id = g + "-cyclic-special-1", n.startLabelRight = "", n.startLabelLeft = "", n.endLabelLeft = "", n.endLabelRight = "", n.arrowTypeStart = "none", n.arrowTypeEnd = "none", n.id = g + "-cyclic-special-mid", e.label = "", e.startLabelRight = "", e.startLabelLeft = "", e.arrowTypeStart = "none", b.isGroup && (m.fromCluster = g, e.toCluster = g), e.id = g + "-cyclic-special-2", e.arrowTypeStart = "none", l.setEdge(g, S, m, g + "-cyclic-special-0"), l.setEdge(S, w, n, g + "-cyclic-special-1"), l.setEdge(w, g, e, g + "-cyclic-special-2");
330
- } else
331
- l.setEdge(t.start, t.end, { ...t }, t.id);
332
- }), d.warn("Graph at first:", JSON.stringify(M(l))), J(l), d.warn("Graph after XAX:", JSON.stringify(M(l)));
333
- const a = _();
334
- await T(
335
- y,
336
- l,
337
- o.type,
338
- o.diagramId,
339
- void 0,
340
- a
341
- );
342
- }, "render");
343
- export {
344
- se as getEdgesToRender,
345
- ae as render
346
- };