@thebuoyant-tsdev/mui-ts-library 3.29.1 → 3.30.0

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 (53) hide show
  1. package/README.de.md +59 -1
  2. package/README.md +59 -1
  3. package/dist/components/chord-chart/ChordChart.js +112 -112
  4. package/dist/components/circle-packing-chart/CirclePackingChart.js +135 -135
  5. package/dist/components/color-picker/ColorPicker.js +217 -217
  6. package/dist/components/color-picker/PopoverColorPicker.js +7 -7
  7. package/dist/components/date-range-picker/DateRangePicker.js +9 -9
  8. package/dist/components/gantt-chart/GanttChart.js +18 -18
  9. package/dist/components/gantt-chart/GanttTaskDialog.js +43 -43
  10. package/dist/components/gantt-chart/GanttTaskPanel.js +128 -128
  11. package/dist/components/gantt-chart/GanttTimeline.js +16 -16
  12. package/dist/components/gantt-chart/GanttToolbar.js +24 -24
  13. package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +244 -244
  14. package/dist/components/json-editor/JsonEditor.js +9 -9
  15. package/dist/components/json-editor/JsonEditorContent.js +54 -54
  16. package/dist/components/json-editor/JsonEditorToolbar.js +12 -12
  17. package/dist/components/kanban-board/KanbanBoard.d.ts +2 -0
  18. package/dist/components/kanban-board/KanbanBoard.js +129 -0
  19. package/dist/components/kanban-board/KanbanBoard.types.d.ts +84 -0
  20. package/dist/components/kanban-board/KanbanBoard.types.js +19 -0
  21. package/dist/components/kanban-board/KanbanBoardCard.d.ts +13 -0
  22. package/dist/components/kanban-board/KanbanBoardCard.js +104 -0
  23. package/dist/components/kanban-board/KanbanBoardCardDialog.d.ts +23 -0
  24. package/dist/components/kanban-board/KanbanBoardCardDialog.js +120 -0
  25. package/dist/components/kanban-board/KanbanBoardColumn.d.ts +14 -0
  26. package/dist/components/kanban-board/KanbanBoardColumn.js +129 -0
  27. package/dist/components/kanban-board/kanbanBoardClasses.d.ts +47 -0
  28. package/dist/components/kanban-board/kanbanBoardClasses.js +18 -0
  29. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +27 -27
  30. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +48 -48
  31. package/dist/components/radial-tree-chart/RadialTreeChart.js +173 -173
  32. package/dist/components/rich-text-editor/RichTextEditor.js +32 -32
  33. package/dist/components/rich-text-editor/RichTextEditorColorPicker.js +20 -20
  34. package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.js +12 -12
  35. package/dist/components/rich-text-editor/RichTextEditorImageDialog.js +11 -11
  36. package/dist/components/rich-text-editor/RichTextEditorLinkDialog.js +11 -11
  37. package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +14 -14
  38. package/dist/components/rich-text-editor/RichTextEditorMentionList.js +14 -14
  39. package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +28 -28
  40. package/dist/components/rich-text-editor/RichTextEditorToolbar.js +35 -35
  41. package/dist/components/sql-editor/SqlEditor.js +24 -24
  42. package/dist/components/sql-editor/SqlEditorContent.js +16 -16
  43. package/dist/components/sql-editor/SqlEditorHistoryMenu.js +15 -15
  44. package/dist/components/sql-editor/SqlEditorToolbar.js +21 -21
  45. package/dist/components/sunburst-chart/SunburstChart.js +126 -126
  46. package/dist/components/tag-selection/TagSelection.js +18 -18
  47. package/dist/components/tag-selection/TagSelectionAutocomplete.js +120 -120
  48. package/dist/components/tag-selection/TagSelectionSelectedTags.js +10 -10
  49. package/dist/index.cjs +2 -2
  50. package/dist/index.d.cts +3 -0
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.js +38 -35
  53. package/package.json +9 -2
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_CIRCLE_PACKING_TRANSLATION as e } from "./CirclePackingChart.types.js";
2
- import { useCallback as t, useEffect as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
3
- import { Box as s, Tooltip as c, Typography as l, useTheme as u } from "@mui/material";
2
+ import { Box as t, Tooltip as n, Typography as r, useTheme as i } from "@mui/material";
3
+ import { useCallback as a, useEffect as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
4
4
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
5
  import * as p from "d3";
6
6
  //#region src/components/circle-packing-chart/CirclePackingChart.tsx
@@ -8,18 +8,18 @@ var m = .56;
8
8
  function ee(e, t, n) {
9
9
  return e.length * n * m <= t ? e : t >= 3 * n * m + n * 2 ? "…" : "";
10
10
  }
11
- function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLabels: v = !0, showAllLabels: y = !1, labelFontSize: te = 13, innerLabelFontSize: b = 9, labelColor: ne, chartColors: x, depthColorStart: S, depthColorEnd: C, background: re, duration: w = 750, zoomable: T = !1, disabled: E = !1, onCircleClick: ie, onCircleHover: D, onZoomChange: O, valueFormatter: k, translation: ae }) {
12
- let A = u(), oe = {
11
+ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLabels: v = !0, showAllLabels: y = !1, labelFontSize: te = 13, innerLabelFontSize: b = 9, labelColor: ne, chartColors: x, depthColorStart: S, depthColorEnd: C, background: w, duration: T = 750, zoomable: E = !1, disabled: D = !1, onCircleClick: re, onCircleHover: O, onZoomChange: k, valueFormatter: A, translation: ie }) {
12
+ let j = i(), ae = {
13
13
  ...e,
14
- ...ae
15
- }, se = !m.children?.length && !m.value, ce = [
16
- A.palette.primary.main,
17
- A.palette.secondary.main,
18
- A.palette.error.main,
19
- A.palette.warning.main,
20
- A.palette.success.main,
21
- A.palette.info.main
22
- ], j = ne || A.palette.text.primary, M = re || A.palette.background.default, le = A.typography.fontFamily, N = i(() => {
14
+ ...ie
15
+ }, oe = !m.children?.length && !m.value, se = [
16
+ j.palette.primary.main,
17
+ j.palette.secondary.main,
18
+ j.palette.error.main,
19
+ j.palette.warning.main,
20
+ j.palette.success.main,
21
+ j.palette.info.main
22
+ ], M = ne || j.palette.text.primary, N = w || j.palette.background.default, ce = j.typography.fontFamily, P = c(() => {
23
23
  let e = p.hierarchy(m).sum((e) => e.value ?? 0);
24
24
  return _ === "value" ? e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0)) : e.sort((e, t) => String(e.data.name).localeCompare(String(t.data.name), void 0, {
25
25
  numeric: !0,
@@ -30,36 +30,36 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
30
30
  h,
31
31
  g,
32
32
  _
33
- ]), P = N.descendants(), F = i(() => p.max(P, (e) => e.depth) ?? 0, [P]), I = !!(S && C), L = i(() => I ? p.scaleSequential(p.interpolateHcl(S, C)).domain([0, Math.max(1, F)]) : null, [
34
- I,
33
+ ]), F = P.descendants(), I = c(() => p.max(F, (e) => e.depth) ?? 0, [F]), L = !!(S && C), R = c(() => L ? p.scaleSequential(p.interpolateHcl(S, C)).domain([0, Math.max(1, I)]) : null, [
34
+ L,
35
35
  S,
36
36
  C,
37
- F
38
- ]), R = x && x.length > 0 ? x : ce, ue = t((e) => e.data.colorConfig?.fill ? e.data.colorConfig.fill : I && L ? e.children ? L(e.depth) : A.palette.background.paper : R[e.depth % R.length], [
39
- I,
37
+ I
38
+ ]), z = x && x.length > 0 ? x : se, le = a((e) => e.data.colorConfig?.fill ? e.data.colorConfig.fill : L && R ? e.children ? R(e.depth) : j.palette.background.paper : z[e.depth % z.length], [
40
39
  L,
41
40
  R,
42
- A
43
- ]), [z, B] = o(1), V = t((e) => {
44
- if (!T || E || !e.ctrlKey) return;
41
+ z,
42
+ j
43
+ ]), [B, V] = u(1), H = a((e) => {
44
+ if (!E || D || !e.ctrlKey) return;
45
45
  e.preventDefault();
46
46
  let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
47
- B((e) => Math.max(.25, Math.min(8, e * t)));
48
- }, [T, E]);
49
- r(() => {
50
- if (!T) return;
47
+ V((e) => Math.max(.25, Math.min(8, e * t)));
48
+ }, [E, D]);
49
+ s(() => {
50
+ if (!E) return;
51
51
  let e = (e) => {
52
- e.key === "Escape" && B(1);
52
+ e.key === "Escape" && V(1);
53
53
  };
54
54
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
55
- }, [T]);
56
- let H = i(() => {
55
+ }, [E]);
56
+ let U = c(() => {
57
57
  let e = `${-h / 2} ${-h / 2} ${h} ${h}`;
58
- if (z === 1) return e;
59
- let t = h / z, n = (h - t) / 2;
58
+ if (B === 1) return e;
59
+ let t = h / B, n = (h - t) / 2;
60
60
  return `${-h / 2 + n} ${-h / 2 + n} ${t} ${t}`;
61
- }, [h, z]), de = t((e) => {
62
- let t = e.value ?? 0, n = N.value ?? 0;
61
+ }, [h, B]), ue = a((e) => {
62
+ let t = e.value ?? 0, n = P.value ?? 0;
63
63
  return {
64
64
  id: e.data.id ?? null,
65
65
  name: e.data.name,
@@ -70,38 +70,38 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
70
70
  childrenCount: e.children?.length ?? 0,
71
71
  data: e.data
72
72
  };
73
- }, [N]), U = a(null), W = a([
74
- N.x,
75
- N.y,
76
- N.r * 2
77
- ]), G = a(N), [K, fe] = o(N), q = t((e) => {
78
- G.current = e, fe(e);
79
- }, []), [pe, J] = o(N);
80
- pe !== N && (J(N), q(N), G.current = N);
81
- let Y = t((e) => {
82
- let t = U.current;
73
+ }, [P]), W = l(null), G = l([
74
+ P.x,
75
+ P.y,
76
+ P.r * 2
77
+ ]), K = l(P), [q, de] = u(P), J = a((e) => {
78
+ K.current = e, de(e);
79
+ }, []), [fe, pe] = u(P);
80
+ fe !== P && (pe(P), J(P), K.current = P);
81
+ let Y = a((e) => {
82
+ let t = W.current;
83
83
  if (!t) return;
84
- W.current = e;
85
- let n = h / e[2], r = G.current, i = t.querySelectorAll("g[data-role='nodes'] > g"), a = t.querySelectorAll("g[data-role='nodes'] > g > circle");
86
- for (let t = 0; t < P.length; t++) {
87
- let r = P[t], o = i[t];
84
+ G.current = e;
85
+ let n = h / e[2], r = K.current, i = t.querySelectorAll("g[data-role='nodes'] > g"), a = t.querySelectorAll("g[data-role='nodes'] > g > circle");
86
+ for (let t = 0; t < F.length; t++) {
87
+ let r = F[t], o = i[t];
88
88
  o && o.setAttribute("transform", `translate(${(r.x - e[0]) * n},${(r.y - e[1]) * n})`);
89
89
  let s = t - 1;
90
90
  s >= 0 && a[s] && a[s].setAttribute("r", String(r.r * n));
91
91
  }
92
92
  if (v) {
93
93
  let r = t.querySelectorAll("g[data-role='labels'] > text");
94
- for (let t = 0; t < P.length; t++) {
95
- let i = P[t], a = r[t];
94
+ for (let t = 0; t < F.length; t++) {
95
+ let i = F[t], a = r[t];
96
96
  a && (a.setAttribute("transform", `translate(${(i.x - e[0]) * n},${(i.y - e[1]) * n})`), a.setAttribute("font-weight", i.children ? "bold" : "normal"));
97
97
  }
98
98
  }
99
99
  if (y) {
100
100
  let i = t.querySelectorAll("g[data-role='inner-labels'] > text");
101
- for (let t = 0; t < P.length; t++) {
102
- let a = P[t], o = i[t];
101
+ for (let t = 0; t < F.length; t++) {
102
+ let a = F[t], o = i[t];
103
103
  if (!o) continue;
104
- let s = a.r * n, c = s * 1.6, l = r === N ? a !== N : a.ancestors().includes(r), u = a.parent === r;
104
+ let s = a.r * n, c = s * 1.6, l = r === P ? a !== P : a.ancestors().includes(r), u = a.parent === r;
105
105
  if (l && !u && s >= 14) {
106
106
  let t = ee(a.data.name, c, b);
107
107
  t ? (o.textContent = t, o.setAttribute("transform", `translate(${(a.x - e[0]) * n},${(a.y - e[1]) * n})`), o.setAttribute("font-weight", a.children ? "bold" : "normal"), o.style.display = "inline") : o.style.display = "none";
@@ -109,127 +109,127 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
109
109
  }
110
110
  }
111
111
  }, [
112
- P,
112
+ F,
113
113
  h,
114
114
  v,
115
115
  y,
116
116
  b,
117
- N
117
+ P
118
118
  ]);
119
- r(() => {
119
+ s(() => {
120
120
  Y([
121
- K.x,
122
- K.y,
123
- K.r * 2
121
+ q.x,
122
+ q.y,
123
+ q.r * 2
124
124
  ]);
125
125
  }, [
126
- N,
126
+ P,
127
127
  h,
128
- K,
128
+ q,
129
129
  Y
130
130
  ]);
131
- let X = t((e, t) => {
132
- let n = U.current;
131
+ let X = a((e, t) => {
132
+ let n = W.current;
133
133
  if (!n) return;
134
- let r = K, i = W.current, a = [
134
+ let r = q, i = G.current, a = [
135
135
  e.x,
136
136
  e.y,
137
137
  e.r * 2
138
138
  ];
139
- q(e), p.select(n).transition().duration(t).ease(p.easeCubic).tween("zoom", () => {
139
+ J(e), p.select(n).transition().duration(t).ease(p.easeCubic).tween("zoom", () => {
140
140
  let e = p.interpolateZoom(i, a);
141
141
  return (t) => Y(e(t));
142
142
  });
143
143
  let o = n.querySelectorAll("g[data-role='labels'] > text");
144
- p.selectAll(o).transition().duration(t).ease(p.easeCubic).style("fill-opacity", (t, n) => +(P[n].parent === e)).on("start", function(t, n) {
145
- P[n].parent === e && (this.style.display = "inline");
144
+ p.selectAll(o).transition().duration(t).ease(p.easeCubic).style("fill-opacity", (t, n) => +(F[n].parent === e)).on("start", function(t, n) {
145
+ F[n].parent === e && (this.style.display = "inline");
146
146
  }).on("end", function(t, n) {
147
- P[n].parent !== e && (this.style.display = "none");
148
- }), O?.({
147
+ F[n].parent !== e && (this.style.display = "none");
148
+ }), k?.({
149
149
  previousName: r.data.name,
150
150
  currentName: e.data.name,
151
151
  currentDepth: e.depth,
152
- isRoot: e === N
152
+ isRoot: e === P
153
153
  });
154
154
  }, [
155
- K,
155
+ q,
156
+ F,
156
157
  P,
157
- N,
158
158
  Y,
159
- O,
160
- q
161
- ]), Z = a(null), me = (e) => {
159
+ k,
160
+ J
161
+ ]), Z = l(null), me = (e) => {
162
162
  Z.current &&= (clearTimeout(Z.current), null), Z.current = setTimeout(() => {
163
163
  e(), Z.current = null;
164
164
  }, 250);
165
165
  }, Q = () => {
166
166
  Z.current &&= (clearTimeout(Z.current), null);
167
- }, $ = a(X);
168
- n(() => {
167
+ }, $ = l(X);
168
+ o(() => {
169
169
  $.current = X;
170
- }, [X]), r(() => {
171
- if (E) return;
170
+ }, [X]), s(() => {
171
+ if (D) return;
172
172
  let e = (e) => {
173
- e.key === "Escape" && (Q(), $.current(N, w));
173
+ e.key === "Escape" && (Q(), $.current(P, T));
174
174
  };
175
175
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
176
176
  }, [
177
- E,
178
- N,
179
- w
177
+ D,
178
+ P,
179
+ T
180
180
  ]);
181
181
  let he = (e) => {
182
- if (E || !(e.ctrlKey || e.metaKey)) return;
182
+ if (D || !(e.ctrlKey || e.metaKey)) return;
183
183
  Q(), e.preventDefault();
184
- let t = K.parent ?? N;
185
- t !== K && X(t, e.altKey ? Math.max(250, w * 10) : w);
184
+ let t = q.parent ?? P;
185
+ t !== q && X(t, e.altKey ? Math.max(250, T * 10) : T);
186
186
  }, ge = {
187
187
  followCursor: !0,
188
188
  enterDelay: 50,
189
189
  enterNextDelay: 0,
190
- disableHoverListener: E,
190
+ disableHoverListener: D,
191
191
  slotProps: { tooltip: { sx: { maxWidth: 220 } } }
192
192
  };
193
- return /* @__PURE__ */ f(s, {
193
+ return /* @__PURE__ */ f(t, {
194
194
  sx: {
195
195
  display: "inline-flex",
196
196
  position: "relative",
197
- opacity: E ? .5 : 1,
198
- cursor: E ? "not-allowed" : "default",
197
+ opacity: D ? .5 : 1,
198
+ cursor: D ? "not-allowed" : "default",
199
199
  userSelect: "none"
200
200
  },
201
201
  children: [/* @__PURE__ */ f("svg", {
202
- ref: U,
202
+ ref: W,
203
203
  width: h,
204
204
  height: h,
205
- viewBox: H,
206
- onWheel: V,
205
+ viewBox: U,
206
+ onWheel: H,
207
207
  style: {
208
208
  display: "block",
209
- background: M,
210
- fontFamily: le ?? "sans-serif",
211
- overflow: T && z > 1 ? "hidden" : "visible"
209
+ background: N,
210
+ fontFamily: ce ?? "sans-serif",
211
+ overflow: E && B > 1 ? "hidden" : "visible"
212
212
  },
213
213
  role: "img",
214
214
  "aria-label": m.name,
215
215
  onDoubleClick: he,
216
216
  children: [
217
- se && /* @__PURE__ */ d("text", {
217
+ oe && /* @__PURE__ */ d("text", {
218
218
  textAnchor: "middle",
219
219
  dy: "0.35em",
220
220
  fontSize: 13,
221
- fill: A.palette.text.secondary,
222
- children: oe.noData
221
+ fill: j.palette.text.secondary,
222
+ children: ae.noData
223
223
  }),
224
224
  /* @__PURE__ */ d("g", {
225
225
  "data-role": "nodes",
226
- children: P.map((e, t) => {
227
- let n = de(e), r = /* @__PURE__ */ f(s, {
226
+ children: F.map((e, i) => {
227
+ let a = ue(e), o = /* @__PURE__ */ f(t, {
228
228
  sx: {
229
229
  py: .5,
230
230
  minWidth: 160
231
231
  },
232
- children: [/* @__PURE__ */ d(l, {
232
+ children: [/* @__PURE__ */ d(r, {
233
233
  variant: "caption",
234
234
  sx: {
235
235
  fontWeight: "bold",
@@ -237,54 +237,54 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
237
237
  fontSize: "0.8rem"
238
238
  },
239
239
  children: e.data.name
240
- }), (e.value ?? 0) > 0 && /* @__PURE__ */ f(s, {
240
+ }), (e.value ?? 0) > 0 && /* @__PURE__ */ f(t, {
241
241
  sx: {
242
242
  mt: .75,
243
243
  borderTop: "1px solid rgba(255,255,255,0.2)",
244
244
  pt: .75
245
245
  },
246
246
  children: [
247
- /* @__PURE__ */ f(s, {
247
+ /* @__PURE__ */ f(t, {
248
248
  sx: {
249
249
  display: "flex",
250
250
  justifyContent: "space-between",
251
251
  gap: 2
252
252
  },
253
- children: [/* @__PURE__ */ d(l, {
253
+ children: [/* @__PURE__ */ d(r, {
254
254
  variant: "caption",
255
255
  sx: { opacity: .6 },
256
256
  children: "Value"
257
- }), /* @__PURE__ */ d(l, {
257
+ }), /* @__PURE__ */ d(r, {
258
258
  variant: "caption",
259
- children: k ? k(e.value ?? 0) : (e.value ?? 0).toLocaleString()
259
+ children: A ? A(e.value ?? 0) : (e.value ?? 0).toLocaleString()
260
260
  })]
261
261
  }),
262
- /* @__PURE__ */ f(s, {
262
+ /* @__PURE__ */ f(t, {
263
263
  sx: {
264
264
  display: "flex",
265
265
  justifyContent: "space-between",
266
266
  gap: 2
267
267
  },
268
- children: [/* @__PURE__ */ d(l, {
268
+ children: [/* @__PURE__ */ d(r, {
269
269
  variant: "caption",
270
270
  sx: { opacity: .6 },
271
271
  children: "Share"
272
- }), /* @__PURE__ */ f(l, {
272
+ }), /* @__PURE__ */ f(r, {
273
273
  variant: "caption",
274
- children: [n.percentage, "%"]
274
+ children: [a.percentage, "%"]
275
275
  })]
276
276
  }),
277
- e.children && /* @__PURE__ */ f(s, {
277
+ e.children && /* @__PURE__ */ f(t, {
278
278
  sx: {
279
279
  display: "flex",
280
280
  justifyContent: "space-between",
281
281
  gap: 2
282
282
  },
283
- children: [/* @__PURE__ */ d(l, {
283
+ children: [/* @__PURE__ */ d(r, {
284
284
  variant: "caption",
285
285
  sx: { opacity: .6 },
286
286
  children: "Children"
287
- }), /* @__PURE__ */ d(l, {
287
+ }), /* @__PURE__ */ d(r, {
288
288
  variant: "caption",
289
289
  children: e.children.length
290
290
  })]
@@ -294,46 +294,46 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
294
294
  });
295
295
  return /* @__PURE__ */ d("g", {
296
296
  transform: `translate(${e.x - h / 2},${e.y - h / 2})`,
297
- children: t === 0 ? null : /* @__PURE__ */ d(c, {
297
+ children: i === 0 ? null : /* @__PURE__ */ d(n, {
298
298
  ...ge,
299
- title: r,
299
+ title: o,
300
300
  children: /* @__PURE__ */ d("circle", {
301
301
  r: e.r,
302
- fill: ue(e),
303
- stroke: e.data.colorConfig?.stroke ?? A.palette.background.paper,
302
+ fill: le(e),
303
+ stroke: e.data.colorConfig?.stroke ?? j.palette.background.paper,
304
304
  strokeWidth: .75,
305
305
  style: {
306
- cursor: E ? "not-allowed" : e.children ? "pointer" : "default",
306
+ cursor: D ? "not-allowed" : e.children ? "pointer" : "default",
307
307
  transition: "stroke-width 0.1s"
308
308
  },
309
309
  onMouseEnter: (e) => {
310
- E || (e.currentTarget.style.strokeWidth = "2", D?.(n, e));
310
+ D || (e.currentTarget.style.strokeWidth = "2", O?.(a, e));
311
311
  },
312
312
  onMouseLeave: (e) => {
313
- e.currentTarget.style.strokeWidth = "0.75", D?.(null, e);
313
+ e.currentTarget.style.strokeWidth = "0.75", O?.(null, e);
314
314
  },
315
315
  onClick: (t) => {
316
- if (!E) {
316
+ if (!D) {
317
317
  if (t.ctrlKey || t.metaKey) {
318
318
  if (e.children) {
319
- let n = t.altKey ? Math.max(250, w * 10) : w;
319
+ let n = t.altKey ? Math.max(250, T * 10) : T;
320
320
  me(() => X(e, n));
321
321
  }
322
322
  return;
323
323
  }
324
- ie?.(n, t);
324
+ re?.(a, t);
325
325
  }
326
326
  },
327
327
  onDoubleClick: (e) => {
328
- if (!E && (e.ctrlKey || e.metaKey)) {
328
+ if (!D && (e.ctrlKey || e.metaKey)) {
329
329
  Q(), e.preventDefault(), e.stopPropagation();
330
- let t = K.parent ?? N;
331
- t !== K && X(t, e.altKey ? Math.max(250, w * 10) : w);
330
+ let t = q.parent ?? P;
331
+ t !== q && X(t, e.altKey ? Math.max(250, T * 10) : T);
332
332
  }
333
333
  }
334
334
  })
335
335
  })
336
- }, `n-${t}`);
336
+ }, `n-${i}`);
337
337
  })
338
338
  }),
339
339
  v && /* @__PURE__ */ d("g", {
@@ -342,12 +342,12 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
342
342
  dominantBaseline: "middle",
343
343
  pointerEvents: "none",
344
344
  fontSize: te,
345
- fill: j,
346
- children: P.map((e, t) => /* @__PURE__ */ d("text", {
345
+ fill: M,
346
+ children: F.map((e, t) => /* @__PURE__ */ d("text", {
347
347
  transform: `translate(${e.x - h / 2},${e.y - h / 2})`,
348
348
  style: {
349
- display: e.parent === N ? "inline" : "none",
350
- fillOpacity: +(e.parent === N)
349
+ display: e.parent === P ? "inline" : "none",
350
+ fillOpacity: +(e.parent === P)
351
351
  },
352
352
  children: e.data.name
353
353
  }, `lbl-${t}`))
@@ -358,14 +358,14 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
358
358
  dominantBaseline: "middle",
359
359
  pointerEvents: "none",
360
360
  fontSize: b,
361
- fill: j,
362
- children: P.map((e, t) => /* @__PURE__ */ d("text", {
361
+ fill: M,
362
+ children: F.map((e, t) => /* @__PURE__ */ d("text", {
363
363
  transform: `translate(${e.x - h / 2},${e.y - h / 2})`,
364
364
  style: { display: "none" }
365
365
  }, `inner-lbl-${t}`))
366
366
  })
367
367
  ]
368
- }), K !== N && !E && /* @__PURE__ */ d(s, {
368
+ }), q !== P && !D && /* @__PURE__ */ d(t, {
369
369
  sx: {
370
370
  position: "absolute",
371
371
  bottom: 6,
@@ -375,7 +375,7 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
375
375
  justifyContent: "center",
376
376
  pointerEvents: "none"
377
377
  },
378
- children: /* @__PURE__ */ f(l, {
378
+ children: /* @__PURE__ */ f(r, {
379
379
  variant: "caption",
380
380
  sx: {
381
381
  bgcolor: "action.hover",
@@ -385,7 +385,7 @@ function h({ data: m, size: h = 600, padding: g = 3, sortBy: _ = "value", showLa
385
385
  color: "text.secondary",
386
386
  fontSize: "0.7rem"
387
387
  },
388
- children: [K.ancestors().map((e) => e.data.name).reverse().join(" › "), " · Ctrl / Cmd ⌘+DblClick to zoom out · Escape to reset"]
388
+ children: [q.ancestors().map((e) => e.data.name).reverse().join(" › "), " · Ctrl / Cmd ⌘+DblClick to zoom out · Escape to reset"]
389
389
  })
390
390
  })]
391
391
  });