@omg-dev/app 0.5.1 → 0.6.2

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 (114) hide show
  1. package/dist-lib/{ChangelogPage-BzsTWlhq.js → ChangelogPage-CirRyMnC.js} +54 -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-K4lGGdJ4.js → SessionFilesPanel-W4QKB0HL.js} +64 -64
  7. package/dist-lib/{TermView-CWr-zJmM.js → TermView-CoD-VkHs.js} +495 -520
  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-P0yDhFOX.js → chat-engine-CRzDKNTH.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-DCafIpWL.js → coding-agents-page-OER8HHRF.js} +152 -131
  29. package/dist-lib/computer-page-D9cSNLa9.js +8990 -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-CLYU5z7h.js → embedded-DqTPdMCh.js} +10561 -10581
  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/keyboard-Yfa1ETse.js +21 -0
  61. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  62. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  63. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  64. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  65. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  66. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  67. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  68. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  69. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  70. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  71. package/dist-lib/{resume-session-sheet-CHwpwguS.js → resume-session-sheet-bjDJmwq6.js} +2 -3
  72. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  73. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  74. package/dist-lib/{session-token-usage-BUz6b-IB.js → session-token-usage-D2zDt9P7.js} +82 -83
  75. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  76. package/dist-lib/{shipped-page-CXy85bsL.js → shipped-page-Cr7dCCc2.js} +232 -235
  77. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  78. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  79. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  80. package/dist-lib/{streamdown-response-CUB9sK6V.js → streamdown-response-Qq9_RgFv.js} +290 -297
  81. package/dist-lib/styles.css +1 -1
  82. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  83. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  84. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  85. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  86. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  87. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  88. package/package.json +4 -3
  89. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  90. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  91. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  92. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  93. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  94. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  95. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  96. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  97. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  98. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  99. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  100. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  101. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  102. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  103. package/dist-lib/index-DcwavxA1.js +0 -5062
  104. package/dist-lib/index-JkCQXUYs.js +0 -16566
  105. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  106. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  107. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  108. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  109. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  110. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  111. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  112. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  113. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  114. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -1,353 +0,0 @@
1
- import { I as X } from "./chunk-2Q5K7J3B-Ex8Ly28R.js";
2
- import { p as O } from "./chunk-JWPE2WC7-DFPBClX_.js";
3
- import { o as G, b as Y, s as F, p as P, g as j, a as q, _ as p, B as D, l as N, F as Z, e as U, z as E, q as J, i as K, ai as Q, D as ee, aj as te } from "./index-JkCQXUYs.js";
4
- import { p as re } from "./cynefin-VYW2F7L2-DQXPWaog.js";
5
- var S = /[─━│┃└┗├┣]/, L = /[└┗├┣]/, ne = /[─━]/, $ = /^[\s│┃]+$/, k = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, T = /^\s*%%/, ie = " ";
6
- function _(r) {
7
- return r.some((e) => S.test(e));
8
- }
9
- p(_, "isBoxDrawingFormat");
10
- function M(r) {
11
- for (const e of r) {
12
- const t = L.exec(e);
13
- if (t != null && t.index && t.index > 0)
14
- return t.index;
15
- }
16
- return 4;
17
- }
18
- p(M, "inferSegmentWidth");
19
- function R(r, e) {
20
- return r.replace(/\bline\s+(\d+)\b/gi, (t, i) => {
21
- const o = parseInt(i, 10), c = e.get(o);
22
- return c ? `line ${c}` : t;
23
- });
24
- }
25
- p(R, "remapErrorLines");
26
- function z(r) {
27
- const e = r.split(`
28
- `), t = /* @__PURE__ */ new Map();
29
- let i = -1;
30
- for (const [a, s] of e.entries())
31
- if (s.trim() === "treeView-beta") {
32
- i = a;
33
- break;
34
- }
35
- if (i === -1)
36
- return { text: r, lineMap: t };
37
- const o = [];
38
- for (let a = i + 1; a < e.length; a++) {
39
- const s = e[a];
40
- s.trim() === "" || T.test(s) || k.test(s) || $.test(s) || o.push(s.replace(/\t/g, " "));
41
- }
42
- if (!_(o))
43
- return { text: r, lineMap: t };
44
- const c = M(o), n = [];
45
- let l = 0;
46
- for (let a = 0; a <= i; a++)
47
- n.push(e[a]), l++, t.set(l, a + 1);
48
- for (let a = i + 1; a < e.length; a++) {
49
- const s = e[a], u = s.trim(), d = a + 1;
50
- if (u === "") {
51
- n.push(s), l++, t.set(l, d);
52
- continue;
53
- }
54
- if (T.test(s)) {
55
- n.push(s), l++, t.set(l, d);
56
- continue;
57
- }
58
- if (k.test(s)) {
59
- n.push(s), l++, t.set(l, d);
60
- continue;
61
- }
62
- if ($.test(s))
63
- continue;
64
- const f = s.replace(/\t/g, " "), h = L.exec(f);
65
- if ((h == null ? void 0 : h.index) !== void 0) {
66
- const m = h.index, w = Math.round(m / c) + 1;
67
- let g = m + 1;
68
- for (; g < f.length && ne.test(f[g]); )
69
- g++;
70
- for (; g < f.length && f[g] === " "; )
71
- g++;
72
- const v = f.slice(g).trimEnd();
73
- if (!v)
74
- throw new Error(
75
- `Line ${d}: Empty node — expected a filename or directory name after the box-drawing prefix`
76
- );
77
- const b = ie.repeat(w);
78
- n.push(b + v), l++, t.set(l, d);
79
- } else {
80
- if (/^[\s─━│┃└┗├┣]+$/.test(f))
81
- continue;
82
- if (S.test(f))
83
- n.push(s), l++, t.set(l, d);
84
- else {
85
- if (/^\s+/.test(f))
86
- throw new Error(
87
- `Line ${d}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`
88
- );
89
- n.push(s), l++, t.set(l, d);
90
- }
91
- }
92
- }
93
- return { text: n.join(`
94
- `), lineMap: t };
95
- }
96
- p(z, "preprocessBoxDrawing");
97
- var x = new X(() => ({
98
- cnt: 1,
99
- stack: [
100
- {
101
- id: 0,
102
- level: -1,
103
- name: "/",
104
- nodeType: "directory",
105
- children: []
106
- }
107
- ]
108
- })), oe = /* @__PURE__ */ p(() => {
109
- x.reset(), J();
110
- }, "clear"), se = /* @__PURE__ */ p(() => x.records.stack[0], "getRoot"), ae = /* @__PURE__ */ p(() => x.records.cnt, "getCount"), ce = ee.treeView, le = /* @__PURE__ */ p(() => D(ce, E().treeView), "getConfig"), de = /* @__PURE__ */ p((r, e, t, i, o, c) => {
111
- for (; r <= x.records.stack[x.records.stack.length - 1].level; )
112
- x.records.stack.pop();
113
- const n = {
114
- id: x.records.cnt++,
115
- level: r,
116
- name: e,
117
- nodeType: t,
118
- icon: o,
119
- cssClass: i,
120
- description: c,
121
- children: []
122
- };
123
- x.records.stack[x.records.stack.length - 1].children.push(n), x.records.stack.push(n);
124
- }, "addNode"), he = {
125
- clear: oe,
126
- addNode: de,
127
- getRoot: se,
128
- getCount: ae,
129
- getConfig: le,
130
- getAccTitle: q,
131
- getAccDescription: j,
132
- getDiagramTitle: P,
133
- setAccDescription: F,
134
- setAccTitle: Y,
135
- setDiagramTitle: G
136
- }, y = he, pe = /* @__PURE__ */ p((r) => {
137
- O(r, y);
138
- for (const e of r.nodes) {
139
- const t = typeof e.indent == "number" ? e.indent : 0;
140
- let i = e.name;
141
- const o = i.endsWith("/");
142
- o && (i = i.slice(0, -1));
143
- const c = o ? "directory" : "file", n = e.classAnnotation || void 0, l = e.iconAnnotation, a = l !== void 0 ? l || "none" : void 0, s = e.descAnnotation || void 0, u = s ? K(s, E()) : void 0;
144
- y.addNode(t, i, c, n, a, u);
145
- }
146
- }, "populate"), fe = {
147
- parse: /* @__PURE__ */ p(async (r) => {
148
- const { text: e, lineMap: t } = z(r);
149
- try {
150
- const i = await re("treeView", e);
151
- N.debug(i), pe(i);
152
- } catch (i) {
153
- throw t.size > 0 && i instanceof Error && (i.message = R(i.message, t)), i;
154
- }
155
- }, "parse")
156
- }, C = {
157
- prefix: "mermaid-treeview",
158
- height: 24,
159
- width: 24,
160
- icons: {
161
- folder: {
162
- body: '<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'
163
- },
164
- file: {
165
- body: '<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'
166
- }
167
- }
168
- };
169
- function H(r, e) {
170
- var o;
171
- const t = (o = e == null ? void 0 : e.filenameIcons) == null ? void 0 : o[r];
172
- if (t)
173
- return t;
174
- const i = r.lastIndexOf(".");
175
- if (i > 0) {
176
- const c = r.substring(i).toLowerCase(), n = e == null ? void 0 : e.extensionIcons;
177
- return (n == null ? void 0 : n[c]) ?? (n == null ? void 0 : n[c.slice(1)]);
178
- }
179
- }
180
- p(H, "detectIcon");
181
- function I(r, e) {
182
- return r.includes(":") ? r : r in C.icons || !e ? `${C.prefix}:${r}` : `${e}:${r}`;
183
- }
184
- p(I, "qualifyIcon");
185
- function V(r, e) {
186
- if (r.icon !== "none") {
187
- if (r.icon)
188
- return I(r.icon, e.defaultIconPack);
189
- if (e.showIcons) {
190
- if (r.nodeType === "file") {
191
- const t = H(r.name, e);
192
- if (t === "none")
193
- return;
194
- if (t)
195
- return I(t, e.defaultIconPack);
196
- }
197
- return `${C.prefix}:${r.nodeType === "directory" ? "folder" : "file"}`;
198
- }
199
- }
200
- }
201
- p(V, "getNodeIcon");
202
- te([
203
- {
204
- name: C.prefix,
205
- icons: C
206
- }
207
- ]);
208
- var B = 14, ge = 4, ue = 16, W = /* @__PURE__ */ p((r, e) => `tv-icon-${r}-${e.replace(/[^\w-]/g, "-")}`, "iconSymbolId"), we = /* @__PURE__ */ p(async (r, e, t, i) => {
209
- const o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ p((a) => {
210
- const s = V(a, t);
211
- s && o.add(s), a.children.forEach(c);
212
- }, "collect");
213
- if (c(e), o.size === 0)
214
- return;
215
- const n = await Promise.all(
216
- [...o].map(async (a) => ({
217
- icon: a,
218
- svg: await Q(a, {
219
- height: B,
220
- width: B
221
- })
222
- }))
223
- ), l = r.append("defs");
224
- for (const { icon: a, svg: s } of n)
225
- l.append("g").attr("id", W(i, a)).html(s);
226
- }, "injectIconDefs"), me = /* @__PURE__ */ p((r, e, t, i, o, c) => {
227
- var b;
228
- const n = i.append("g");
229
- let l = "treeView-node-label";
230
- t.nodeType === "directory" && (l += " treeView-node-dir"), t.cssClass && (l += ` ${t.cssClass}`);
231
- const a = B + ge, s = V(t, o), u = s !== void 0;
232
- s && n.append("use").attr("xlink:href", `#${W(c, s)}`).attr("x", r + o.paddingX).attr("y", e + o.paddingY).attr("class", "treeView-node-icon");
233
- const d = n.append("text").text(t.name).attr("dominant-baseline", "middle").attr("class", l), { height: f, width: h } = d.node().getBBox(), m = f + o.paddingY * 2, w = r + o.paddingX + (u ? a : 0);
234
- d.attr("x", w), d.attr("y", e + m / 2);
235
- const g = w + h, v = h + o.paddingX * 2 + (u ? a : 0);
236
- return t.BBox = { x: r, y: e, width: v, height: m }, (b = t.cssClass) != null && b.split(/\s+/).includes("highlight") && n.insert("rect", ":first-child").attr("x", r).attr("y", e + 1).attr("width", 0).attr("height", m - 2).attr("rx", 3).attr("class", "treeView-highlight-bg"), { node: t, nodeGroup: n, labelRightEdge: g, centerY: e + m / 2 };
237
- }, "positionLabel"), A = /* @__PURE__ */ p((r, e, t, i, o, c) => r.append("line").attr("x1", e).attr("y1", t).attr("x2", i).attr("y2", o).attr("stroke-width", c).attr("class", "treeView-node-line"), "positionLine"), ve = /* @__PURE__ */ p((r, e, t, i) => {
238
- var u;
239
- let o = 0, c = 0;
240
- const n = [], l = /* @__PURE__ */ p((d, f, h, m) => {
241
- const w = m * (h.rowIndent + h.paddingX), g = me(w, o, f, d, h, i);
242
- n.push(g);
243
- const { height: v, width: b } = f.BBox;
244
- A(
245
- d,
246
- w - h.rowIndent,
247
- o + v / 2,
248
- w,
249
- o + v / 2,
250
- h.lineThickness
251
- ), c = Math.max(c, w + b), o += v;
252
- }, "drawNode"), a = /* @__PURE__ */ p((d, f = 0) => {
253
- l(r, d, t, f), d.children.forEach((g) => {
254
- a(g, f + 1);
255
- });
256
- const { x: h, y: m, height: w } = d.BBox;
257
- if (d.children.length) {
258
- const { y: g, height: v } = d.children[d.children.length - 1].BBox;
259
- A(
260
- r,
261
- h + t.paddingX,
262
- m + w,
263
- h + t.paddingX,
264
- g + v / 2 + t.lineThickness / 2,
265
- t.lineThickness
266
- );
267
- }
268
- }, "processNode");
269
- a(e);
270
- const s = n.filter((d) => d.node.description);
271
- if (s.length > 0) {
272
- const f = Math.max(...n.map((h) => h.labelRightEdge)) + ue;
273
- for (const h of s) {
274
- const w = h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline", "middle").attr("class", "treeView-node-description").attr("x", f).attr("y", h.centerY).node().getBBox();
275
- c = Math.max(c, f + w.width + t.paddingX);
276
- }
277
- }
278
- for (const d of n)
279
- if ((u = d.node.cssClass) != null && u.split(/\s+/).includes("highlight")) {
280
- const f = d.nodeGroup.select(".treeView-highlight-bg");
281
- if (!f.empty()) {
282
- const h = c - d.node.BBox.x + 8;
283
- f.attr("width", h), c = Math.max(c, d.node.BBox.x + h + 2);
284
- }
285
- }
286
- return { totalHeight: o, totalWidth: c };
287
- }, "drawTree"), xe = /* @__PURE__ */ p(async (r, e, t, i) => {
288
- N.debug(`Rendering treeView diagram
289
- ` + r);
290
- const o = i.db, c = o.getRoot(), n = o.getConfig(), l = Z(e);
291
- await we(l, c, n, e);
292
- const a = l.append("g");
293
- a.attr("class", "tree-view");
294
- const { totalHeight: s, totalWidth: u } = ve(a, c, n, e);
295
- l.attr("viewBox", `-${n.lineThickness / 2} 0 ${u} ${s}`), U(l, s, u, n.useMaxWidth);
296
- }, "draw"), be = {
297
- draw: xe
298
- }, Ce = be, ye = {
299
- labelFontSize: "16px",
300
- labelColor: "black",
301
- lineColor: "black",
302
- iconColor: "#546e7a",
303
- descriptionColor: "#6a9955",
304
- highlightBg: "rgba(255, 193, 7, 0.15)",
305
- highlightStroke: "#ffc107"
306
- }, Ie = /* @__PURE__ */ p(({
307
- treeView: r
308
- }) => {
309
- const {
310
- labelFontSize: e,
311
- labelColor: t,
312
- lineColor: i,
313
- iconColor: o,
314
- descriptionColor: c,
315
- highlightBg: n,
316
- highlightStroke: l
317
- } = D(ye, r);
318
- return `
319
- .treeView-node-label {
320
- font-size: ${e};
321
- fill: ${t};
322
- white-space: pre;
323
- }
324
- .treeView-node-dir {
325
- font-weight: bold;
326
- }
327
- .treeView-node-line {
328
- stroke: ${i};
329
- }
330
- .treeView-node-icon {
331
- color: ${o};
332
- }
333
- .treeView-node-description {
334
- font-size: ${e};
335
- fill: ${c};
336
- font-style: italic;
337
- white-space: pre;
338
- }
339
- .treeView-highlight-bg {
340
- fill: ${n};
341
- stroke: ${l};
342
- stroke-width: 1;
343
- }
344
- `;
345
- }, "styles"), Be = Ie, Ae = {
346
- db: y,
347
- renderer: Ce,
348
- parser: fe,
349
- styles: Be
350
- };
351
- export {
352
- Ae as diagram
353
- };