@peasant-labs/fairtrade 0.0.48 → 0.0.49

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 (118) hide show
  1. package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +89 -0
  2. package/dist/lib/{adapter-DnCl_ddK.js → adapter-CVKibszh.js} +136 -126
  3. package/dist/lib/arc-1xTxsoRi.js +80 -0
  4. package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +3 -0
  5. package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +4145 -0
  6. package/dist/lib/array-CApNbSU9.js +6 -0
  7. package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +1946 -0
  8. package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +2990 -0
  9. package/dist/lib/channel-DagAO2vE.js +5 -0
  10. package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +490 -0
  11. package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +15 -0
  12. package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +236 -0
  13. package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +61 -0
  14. package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +5 -0
  15. package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +1373 -0
  16. package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +1847 -0
  17. package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +4044 -0
  18. package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +10 -0
  19. package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +75 -0
  20. package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +4487 -0
  21. package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +363 -0
  22. package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +12 -0
  23. package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +8 -0
  24. package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +1513 -0
  25. package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +19774 -0
  26. package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +4258 -0
  27. package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +10 -0
  28. package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +67 -0
  29. package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +26 -0
  30. package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +693 -0
  31. package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +9 -0
  32. package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +12 -0
  33. package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +275 -0
  34. package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +37 -0
  35. package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +349 -0
  36. package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +3397 -0
  37. package/dist/lib/commons.js +729 -729
  38. package/dist/lib/components.css +1 -1
  39. package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +2250 -0
  40. package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +3 -0
  41. package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +349 -0
  42. package/dist/lib/cytoscape.esm-0ojxgO9x.js +18161 -0
  43. package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +2356 -0
  44. package/dist/lib/defaultLocale-BbgDuMnp.js +201 -0
  45. package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +525 -0
  46. package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +134 -0
  47. package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +301 -0
  48. package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +447 -0
  49. package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +214 -0
  50. package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +5084 -0
  51. package/dist/lib/dist-AMlsjiDX.js +59 -0
  52. package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +100 -0
  53. package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +47944 -0
  54. package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +1970 -0
  55. package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +3 -0
  56. package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +17 -0
  57. package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +3094 -0
  58. package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +3 -0
  59. package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +729 -0
  60. package/dist/lib/graphlib-Dndp26xU.js +1267 -0
  61. package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +3 -0
  62. package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +20 -0
  63. package/dist/lib/init-Bwwdo3M6.js +15 -0
  64. package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +719 -0
  65. package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +884 -0
  66. package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +976 -0
  67. package/dist/lib/katex-Dw0PnoPU.js +21850 -0
  68. package/dist/lib/line-C9krU3Sv.js +34 -0
  69. package/dist/lib/linear-Cvilv3OA.js +289 -0
  70. package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +638 -0
  71. package/dist/lib/mermaid.core-UNHMAbBP.js +1126 -0
  72. package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +1011 -0
  73. package/dist/lib/ordinal-C55HfHHp.js +65 -0
  74. package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +3 -0
  75. package/dist/lib/path-DNvJyUE8.js +85 -0
  76. package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +94 -0
  77. package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +3 -0
  78. package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +205 -0
  79. package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +2001 -0
  80. package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +3 -0
  81. package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +3 -0
  82. package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +3 -0
  83. package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +3 -0
  84. package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +3 -0
  85. package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +76 -0
  86. package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +2228 -0
  87. package/dist/lib/rough.esm-a8mysczE.js +1352 -0
  88. package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +970 -0
  89. package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +4253 -0
  90. package/dist/lib/share.js +1 -1
  91. package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +46 -0
  92. package/dist/lib/src-Dcy0zUZH.js +2153 -0
  93. package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +2143 -0
  94. package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +4764 -0
  95. package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +28 -0
  96. package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +1073 -0
  97. package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +3 -0
  98. package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +3 -0
  99. package/dist/lib/types/AppSidebar.d.ts +14 -1
  100. package/dist/lib/types/transcript/MermaidBlock.d.ts +3 -0
  101. package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
  102. package/dist/lib/types/transcript/UnverifiedPullRequests.d.ts +12 -0
  103. package/dist/lib/types/transcript/index.d.ts +1 -0
  104. package/dist/lib/types/transcript/mermaidSource.d.ts +2 -0
  105. package/dist/lib/types/transcript/mermaidSvg.d.ts +1 -0
  106. package/dist/lib/types/transcript/state-capabilities.d.ts +28 -8
  107. package/dist/lib/types/transcript/tool-state-key.d.ts +2 -0
  108. package/dist/lib/types/transcript/useReaderWidthAnchor.d.ts +20 -0
  109. package/dist/lib/types/transcript/view-model.d.ts +14 -0
  110. package/dist/lib/types/ui/transcript/view-model.d.ts +14 -0
  111. package/dist/lib/{ui-BLiaBlAK.js → ui-Beoq-HpN.js} +4875 -4130
  112. package/dist/lib/ui.js +6 -6
  113. package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +7190 -0
  114. package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +1880 -0
  115. package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +3 -0
  116. package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +645 -0
  117. package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +2218 -0
  118. package/package.json +3 -2
@@ -0,0 +1,301 @@
1
+ import { m as e } from "./src-Dcy0zUZH.js";
2
+ import { n as t } from "./mermaid-parser.core-I7qQ_fxz.js";
3
+ import { n } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
4
+ import { C as r, H as i, U as a, _ as o, a as s, c, f as l, q as u, v as d, y as f, z as p } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
5
+ import { i as m } from "./chunk-7S6XSTFO-CMt_p-O6.js";
6
+ import { t as h } from "./chunk-OYAV6JZA-B1yICcbU.js";
7
+ import { t as g } from "./chunk-JWPE2WC7-KRpHbrIX.js";
8
+ import { r as _, t as v } from "./chunk-YZO67HFG-D1jKt78p.js";
9
+ import { t as y } from "./chunk-2Q5K7J3B-DWNwIK5Y.js";
10
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-ODIL2UCW.mjs
11
+ var b = /[─━│┃└┗├┣]/, x = /[└┗├┣]/, S = /[─━]/, C = /^[\s│┃]+$/, w = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, T = /^\s*%%/, E = " ";
12
+ function D(e) {
13
+ return e.some((e) => b.test(e));
14
+ }
15
+ n(D, "isBoxDrawingFormat");
16
+ function O(e) {
17
+ for (let t of e) {
18
+ let e = x.exec(t);
19
+ if (e?.index && e.index > 0) return e.index;
20
+ }
21
+ return 4;
22
+ }
23
+ n(O, "inferSegmentWidth");
24
+ function k(e, t) {
25
+ return e.replace(/\bline\s+(\d+)\b/gi, (e, n) => {
26
+ let r = parseInt(n, 10), i = t.get(r);
27
+ return i ? `line ${i}` : e;
28
+ });
29
+ }
30
+ n(k, "remapErrorLines");
31
+ function A(e) {
32
+ let t = e.split("\n"), n = /* @__PURE__ */ new Map(), r = -1;
33
+ for (let [e, n] of t.entries()) if (n.trim() === "treeView-beta") {
34
+ r = e;
35
+ break;
36
+ }
37
+ if (r === -1) return {
38
+ text: e,
39
+ lineMap: n
40
+ };
41
+ let i = [];
42
+ for (let e = r + 1; e < t.length; e++) {
43
+ let n = t[e];
44
+ n.trim() === "" || T.test(n) || w.test(n) || C.test(n) || i.push(n.replace(/\t/g, " "));
45
+ }
46
+ if (!D(i)) return {
47
+ text: e,
48
+ lineMap: n
49
+ };
50
+ let a = O(i), o = [], s = 0;
51
+ for (let e = 0; e <= r; e++) o.push(t[e]), s++, n.set(s, e + 1);
52
+ for (let e = r + 1; e < t.length; e++) {
53
+ let r = t[e], i = r.trim(), c = e + 1;
54
+ if (i === "") {
55
+ o.push(r), s++, n.set(s, c);
56
+ continue;
57
+ }
58
+ if (T.test(r)) {
59
+ o.push(r), s++, n.set(s, c);
60
+ continue;
61
+ }
62
+ if (w.test(r)) {
63
+ o.push(r), s++, n.set(s, c);
64
+ continue;
65
+ }
66
+ if (C.test(r)) continue;
67
+ let l = r.replace(/\t/g, " "), u = x.exec(l);
68
+ if (u?.index !== void 0) {
69
+ let e = u.index, t = Math.round(e / a) + 1, r = e + 1;
70
+ for (; r < l.length && S.test(l[r]);) r++;
71
+ for (; r < l.length && l[r] === " ";) r++;
72
+ let i = l.slice(r).trimEnd();
73
+ if (!i) throw Error(`Line ${c}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);
74
+ let d = E.repeat(t);
75
+ o.push(d + i), s++, n.set(s, c);
76
+ } else if (/^[\s─━│┃└┗├┣]+$/.test(l)) continue;
77
+ else if (b.test(l)) o.push(r), s++, n.set(s, c);
78
+ else if (/^\s+/.test(l)) throw Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);
79
+ else o.push(r), s++, n.set(s, c);
80
+ }
81
+ return {
82
+ text: o.join("\n"),
83
+ lineMap: n
84
+ };
85
+ }
86
+ n(A, "preprocessBoxDrawing");
87
+ var j = new y(() => ({
88
+ cnt: 1,
89
+ stack: [{
90
+ id: 0,
91
+ level: -1,
92
+ name: "/",
93
+ nodeType: "directory",
94
+ children: []
95
+ }]
96
+ })), M = /* @__PURE__ */ n(() => {
97
+ j.reset(), s();
98
+ }, "clear"), N = /* @__PURE__ */ n(() => j.records.stack[0], "getRoot"), P = /* @__PURE__ */ n(() => j.records.cnt, "getCount"), F = l.treeView, I = {
99
+ clear: M,
100
+ addNode: /* @__PURE__ */ n((e, t, n, r, i, a) => {
101
+ for (; e <= j.records.stack[j.records.stack.length - 1].level;) j.records.stack.pop();
102
+ let o = {
103
+ id: j.records.cnt++,
104
+ level: e,
105
+ name: t,
106
+ nodeType: n,
107
+ icon: i,
108
+ cssClass: r,
109
+ description: a,
110
+ children: []
111
+ };
112
+ j.records.stack[j.records.stack.length - 1].children.push(o), j.records.stack.push(o);
113
+ }, "addNode"),
114
+ getRoot: N,
115
+ getCount: P,
116
+ getConfig: /* @__PURE__ */ n(() => m(F, f().treeView), "getConfig"),
117
+ getAccTitle: d,
118
+ getAccDescription: o,
119
+ getDiagramTitle: r,
120
+ setAccDescription: i,
121
+ setAccTitle: a,
122
+ setDiagramTitle: u
123
+ }, L = /* @__PURE__ */ n((e) => {
124
+ g(e, I);
125
+ for (let t of e.nodes) {
126
+ let e = typeof t.indent == "number" ? t.indent : 0, n = t.name, r = n.endsWith("/");
127
+ r && (n = n.slice(0, -1));
128
+ let i = r ? "directory" : "file", a = t.classAnnotation || void 0, o = t.iconAnnotation, s = o === void 0 ? void 0 : o || "none", c = t.descAnnotation || void 0, l = c ? p(c, f()) : void 0;
129
+ I.addNode(e, n, i, a, s, l);
130
+ }
131
+ }, "populate"), R = { parse: /* @__PURE__ */ n(async (n) => {
132
+ let { text: r, lineMap: i } = A(n);
133
+ try {
134
+ let n = await t("treeView", r);
135
+ e.debug(n), L(n);
136
+ } catch (e) {
137
+ throw i.size > 0 && e instanceof Error && (e.message = k(e.message, i)), e;
138
+ }
139
+ }, "parse") }, z = {
140
+ prefix: "mermaid-treeview",
141
+ height: 24,
142
+ width: 24,
143
+ icons: {
144
+ folder: { 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\"/>" },
145
+ file: { 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\"/>" }
146
+ }
147
+ };
148
+ function B(e, t) {
149
+ let n = t?.filenameIcons?.[e];
150
+ if (n) return n;
151
+ let r = e.lastIndexOf(".");
152
+ if (r > 0) {
153
+ let n = e.substring(r).toLowerCase(), i = t?.extensionIcons;
154
+ return i?.[n] ?? i?.[n.slice(1)];
155
+ }
156
+ }
157
+ n(B, "detectIcon");
158
+ function V(e, t) {
159
+ return e.includes(":") ? e : e in z.icons || !t ? `${z.prefix}:${e}` : `${t}:${e}`;
160
+ }
161
+ n(V, "qualifyIcon");
162
+ function H(e, t) {
163
+ if (e.icon !== "none") {
164
+ if (e.icon) return V(e.icon, t.defaultIconPack);
165
+ if (t.showIcons) {
166
+ if (e.nodeType === "file") {
167
+ let n = B(e.name, t);
168
+ if (n === "none") return;
169
+ if (n) return V(n, t.defaultIconPack);
170
+ }
171
+ return `${z.prefix}:${e.nodeType === "directory" ? "folder" : "file"}`;
172
+ }
173
+ }
174
+ }
175
+ n(H, "getNodeIcon"), _([{
176
+ name: z.prefix,
177
+ icons: z
178
+ }]);
179
+ var U = 14, W = 4, G = 16, K = /* @__PURE__ */ n(async (e, t) => {
180
+ let r = [], i = /* @__PURE__ */ n((e) => {
181
+ let n = H(e, t);
182
+ n && r.push({
183
+ icon: n,
184
+ node: e
185
+ }), e.children.forEach(i);
186
+ }, "collect");
187
+ i(e);
188
+ let a = await Promise.all(r.map(async ({ icon: e, node: t }) => ({
189
+ id: t.id,
190
+ svg: await v(e, {
191
+ height: U,
192
+ width: U
193
+ })
194
+ })));
195
+ return new Map(a.map(({ id: e, svg: t }) => [e, t]));
196
+ }, "resolveNodeIcons"), q = /* @__PURE__ */ n((e, t, n, r, i, a) => {
197
+ let o = r.append("g"), s = "treeView-node-label";
198
+ n.nodeType === "directory" && (s += " treeView-node-dir"), n.cssClass && (s += ` ${n.cssClass}`);
199
+ let c = U + W, l = H(n, i), u = l !== void 0;
200
+ l && o.append("g").attr("class", "treeView-node-icon").attr("transform", `translate(${e + i.paddingX}, ${t + i.paddingY})`).html(a.get(n.id) ?? "");
201
+ let d = o.append("text").text(n.name).attr("dominant-baseline", "middle").attr("class", s), { height: f, width: p } = d.node().getBBox(), m = f + i.paddingY * 2, h = e + i.paddingX + (u ? c : 0);
202
+ d.attr("x", h), d.attr("y", t + m / 2);
203
+ let g = h + p;
204
+ return n.BBox = {
205
+ x: e,
206
+ y: t,
207
+ width: p + i.paddingX * 2 + (u ? c : 0),
208
+ height: m
209
+ }, n.cssClass?.split(/\s+/).includes("highlight") && o.insert("rect", ":first-child").attr("x", e).attr("y", t + 1).attr("width", 0).attr("height", m - 2).attr("rx", 3).attr("class", "treeView-highlight-bg"), {
210
+ node: n,
211
+ nodeGroup: o,
212
+ labelRightEdge: g,
213
+ centerY: t + m / 2
214
+ };
215
+ }, "positionLabel"), J = /* @__PURE__ */ n((e, t, n, r, i, a) => e.append("line").attr("x1", t).attr("y1", n).attr("x2", r).attr("y2", i).attr("stroke-width", a).attr("class", "treeView-node-line"), "positionLine"), Y = /* @__PURE__ */ n((e, t, r, i) => {
216
+ let a = 0, o = 0, s = [], c = /* @__PURE__ */ n((e, t, n, r) => {
217
+ let c = r * (n.rowIndent + n.paddingX), l = q(c, a, t, e, n, i);
218
+ s.push(l);
219
+ let { height: u, width: d } = t.BBox;
220
+ J(e, c - n.rowIndent, a + u / 2, c, a + u / 2, n.lineThickness), o = Math.max(o, c + d), a += u;
221
+ }, "drawNode"), l = /* @__PURE__ */ n((t, n = 0) => {
222
+ c(e, t, r, n), t.children.forEach((e) => {
223
+ l(e, n + 1);
224
+ });
225
+ let { x: i, y: a, height: o } = t.BBox;
226
+ if (t.children.length) {
227
+ let { y: n, height: s } = t.children[t.children.length - 1].BBox;
228
+ J(e, i + r.paddingX, a + o, i + r.paddingX, n + s / 2 + r.lineThickness / 2, r.lineThickness);
229
+ }
230
+ }, "processNode");
231
+ l(t);
232
+ let u = s.filter((e) => e.node.description);
233
+ if (u.length > 0) {
234
+ let e = Math.max(...s.map((e) => e.labelRightEdge)) + G;
235
+ for (let t of u) {
236
+ let n = t.nodeGroup.append("text").text(t.node.description).attr("dominant-baseline", "middle").attr("class", "treeView-node-description").attr("x", e).attr("y", t.centerY).node().getBBox();
237
+ o = Math.max(o, e + n.width + r.paddingX);
238
+ }
239
+ }
240
+ for (let e of s) if (e.node.cssClass?.split(/\s+/).includes("highlight")) {
241
+ let t = e.nodeGroup.select(".treeView-highlight-bg");
242
+ if (!t.empty()) {
243
+ let n = o - e.node.BBox.x + 8;
244
+ t.attr("width", n), o = Math.max(o, e.node.BBox.x + n + 2);
245
+ }
246
+ }
247
+ return {
248
+ totalHeight: a,
249
+ totalWidth: o
250
+ };
251
+ }, "drawTree"), X = { draw: /* @__PURE__ */ n(async (t, n, r, i) => {
252
+ e.debug("Rendering treeView diagram\n" + t);
253
+ let a = i.db, o = a.getRoot(), s = a.getConfig(), l = h(n), u = l.append("g");
254
+ u.attr("class", "tree-view");
255
+ let { totalHeight: d, totalWidth: f } = Y(u, o, s, await K(o, s));
256
+ l.attr("viewBox", `-${s.lineThickness / 2} 0 ${f} ${d}`), c(l, d, f, s.useMaxWidth);
257
+ }, "draw") }, Z = {
258
+ labelFontSize: "16px",
259
+ labelColor: "black",
260
+ lineColor: "black",
261
+ iconColor: "#546e7a",
262
+ descriptionColor: "#6a9955",
263
+ highlightBg: "rgba(255, 193, 7, 0.15)",
264
+ highlightStroke: "#ffc107"
265
+ }, Q = {
266
+ db: I,
267
+ renderer: X,
268
+ parser: R,
269
+ styles: /* @__PURE__ */ n(({ treeView: e }) => {
270
+ let { labelFontSize: t, labelColor: n, lineColor: r, iconColor: i, descriptionColor: a, highlightBg: o, highlightStroke: s } = m(Z, e);
271
+ return `
272
+ .treeView-node-label {
273
+ font-size: ${t};
274
+ fill: ${n};
275
+ white-space: pre;
276
+ }
277
+ .treeView-node-dir {
278
+ font-weight: bold;
279
+ }
280
+ .treeView-node-line {
281
+ stroke: ${r};
282
+ }
283
+ .treeView-node-icon {
284
+ color: ${i};
285
+ }
286
+ .treeView-node-description {
287
+ font-size: ${t};
288
+ fill: ${a};
289
+ font-style: italic;
290
+ white-space: pre;
291
+ }
292
+ .treeView-highlight-bg {
293
+ fill: ${o};
294
+ stroke: ${s};
295
+ stroke-width: 1;
296
+ }
297
+ `;
298
+ }, "styles")
299
+ };
300
+ //#endregion
301
+ export { Q as diagram };