@humain/ui 2.4.1 → 2.4.3

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 (157) hide show
  1. package/dist/index150.js +1 -1
  2. package/dist/index150.js.map +1 -1
  3. package/dist/index194.js +6 -8
  4. package/dist/index194.js.map +1 -1
  5. package/dist/index24.js +1 -1
  6. package/dist/index24.js.map +1 -1
  7. package/dist/styles.css +1 -1
  8. package/dist/wc/AIClarificationCard.js +1 -1
  9. package/dist/wc/AIContainer.js +1 -1
  10. package/dist/wc/AIForm.js +17 -17
  11. package/dist/wc/AIInput.js +32 -32
  12. package/dist/wc/AIInput.js.map +1 -1
  13. package/dist/wc/AIMermaidDiagram.js +1 -1
  14. package/dist/wc/AIMessage.js +1 -1
  15. package/dist/wc/AIScrollButton.js +4 -4
  16. package/dist/wc/AIToolCall.js +5 -5
  17. package/dist/wc/AppSidebar.constants.js +1 -1
  18. package/dist/wc/AvatarFallback.js +5 -5
  19. package/dist/wc/CheckboxIndicator.js +7 -7
  20. package/dist/wc/CollapsiblePanel.js +1 -1
  21. package/dist/wc/DialogTrigger.js +9 -9
  22. package/dist/wc/DropdownMenu.js +16 -16
  23. package/dist/wc/MenuSubmenuTrigger.js +31 -31
  24. package/dist/wc/PopoverDescription.js +30 -30
  25. package/dist/wc/PrehydrationScript.js +1 -1
  26. package/dist/wc/Select.js +18 -18
  27. package/dist/wc/SelectSeparator.js +72 -72
  28. package/dist/wc/SelectSeparator.js.map +1 -1
  29. package/dist/wc/Tabs.js +18 -18
  30. package/dist/wc/TooltipProvider.js +9 -9
  31. package/dist/wc/chart.js +1 -1
  32. package/dist/wc/chunk-75Z2AOVW.js +39 -39
  33. package/dist/wc/chunk-OSK3NFVY.js +32 -32
  34. package/dist/wc/command.js +4 -4
  35. package/dist/wc/form-field.js +1 -1
  36. package/dist/wc/form-fieldset.js +5 -5
  37. package/dist/wc/hf-accordion-card.js +4 -4
  38. package/dist/wc/hf-accordion.js +6 -6
  39. package/dist/wc/hf-ai-feedback-bar.js +5 -5
  40. package/dist/wc/hf-ai-reasoning-block.js +6 -6
  41. package/dist/wc/hf-ai-system-message.js +1 -1
  42. package/dist/wc/hf-ai-tool-run.js +1 -1
  43. package/dist/wc/hf-area-chart.js +15 -15
  44. package/dist/wc/hf-autocomplete.js +36 -36
  45. package/dist/wc/hf-bar-chart.js +4 -4
  46. package/dist/wc/hf-calendar.js +4 -4
  47. package/dist/wc/hf-carousel.js +1 -1
  48. package/dist/wc/hf-context-menu.js +8 -8
  49. package/dist/wc/hf-donut-chart.js +10 -10
  50. package/dist/wc/hf-empty-state.js +87 -88
  51. package/dist/wc/hf-empty-state.js.map +1 -1
  52. package/dist/wc/hf-history.js +4 -4
  53. package/dist/wc/hf-horizontal-bar-chart.js +7 -7
  54. package/dist/wc/hf-hover-card.js +6 -6
  55. package/dist/wc/hf-line-chart.js +4 -4
  56. package/dist/wc/hf-metric-card.js +5 -5
  57. package/dist/wc/hf-metric-item.js +8 -8
  58. package/dist/wc/hf-metric-item.js.map +1 -1
  59. package/dist/wc/hf-nav-account-menu.js +4 -4
  60. package/dist/wc/hf-notification-panel.js +2 -2
  61. package/dist/wc/hf-pie-chart.js +17 -17
  62. package/dist/wc/hf-radar-chart.js +16 -16
  63. package/dist/wc/hf-section-header.js +6 -6
  64. package/dist/wc/hf-sheet.js +1 -1
  65. package/dist/wc/hf-sparkline-chart.js +5 -5
  66. package/dist/wc/hf-steps.js +6 -6
  67. package/dist/wc/journeyDiagram-3NMN7TZE.js +10 -10
  68. package/dist/wc/pieDiagram-E7YTZNPT.js +16 -16
  69. package/dist/wc/popupStateMapping.js +53 -53
  70. package/dist/wc/popupStateMapping.js.map +1 -1
  71. package/dist/wc/selection-group.js +1 -1
  72. package/dist/wc/selection-group.js.map +1 -1
  73. package/dist/wc/{useOpenChangeComplete.js → stateAttributesMapping.js} +21 -21
  74. package/dist/wc/stateAttributesMapping.js.map +1 -0
  75. package/dist/wc/stateDiagram-D77RDMKH.js +3 -3
  76. package/dist/wc/timeline-definition-24CTP7MA.js +19 -19
  77. package/dist/wc/useCollapsiblePanel.js +3 -3
  78. package/dist/wc/usePopupHandleStore.js +4 -4
  79. package/dist/wc/useScrollLock.js +1 -1
  80. package/dist/wc/vendor/recharts.js +525 -524
  81. package/dist/wc/vendor/recharts.js.map +1 -1
  82. package/dist/wc/xychartDiagram-S5SC5T6Z.js +6 -6
  83. package/dist/wc-react/AIClarificationCard.js +1 -1
  84. package/dist/wc-react/AIContainer.js +1 -1
  85. package/dist/wc-react/AIForm.js +17 -17
  86. package/dist/wc-react/AIInput.js +2 -2
  87. package/dist/wc-react/AIInput.js.map +1 -1
  88. package/dist/wc-react/AIMermaidDiagram.js +1 -1
  89. package/dist/wc-react/AIMessage.js +1 -1
  90. package/dist/wc-react/AIScrollButton.js +4 -4
  91. package/dist/wc-react/AIToolCall.js +5 -5
  92. package/dist/wc-react/AppSidebar.constants.js +1 -1
  93. package/dist/wc-react/AvatarFallback.js +5 -5
  94. package/dist/wc-react/CheckboxIndicator.js +7 -7
  95. package/dist/wc-react/CollapsiblePanel.js +1 -1
  96. package/dist/wc-react/DialogTrigger.js +9 -9
  97. package/dist/wc-react/DropdownMenu.js +16 -16
  98. package/dist/wc-react/FloatingPortalLite.js +3 -3
  99. package/dist/wc-react/MenuSubmenuTrigger.js +31 -31
  100. package/dist/wc-react/PopoverDescription.js +31 -31
  101. package/dist/wc-react/PrehydrationScript.js +1 -1
  102. package/dist/wc-react/Select.js +18 -18
  103. package/dist/wc-react/SelectSeparator.js +71 -70
  104. package/dist/wc-react/SelectSeparator.js.map +1 -1
  105. package/dist/wc-react/Tabs.js +18 -18
  106. package/dist/wc-react/TooltipProvider.js +9 -9
  107. package/dist/wc-react/chart.js +1 -1
  108. package/dist/wc-react/chunk-75Z2AOVW.js +39 -39
  109. package/dist/wc-react/chunk-OSK3NFVY.js +32 -32
  110. package/dist/wc-react/command.js +4 -4
  111. package/dist/wc-react/form-field.js +1 -1
  112. package/dist/wc-react/form-fieldset.js +77 -77
  113. package/dist/wc-react/hf-accordion-card.js +4 -4
  114. package/dist/wc-react/hf-accordion.js +6 -6
  115. package/dist/wc-react/hf-ai-feedback-bar.js +5 -5
  116. package/dist/wc-react/hf-ai-reasoning-block.js +6 -6
  117. package/dist/wc-react/hf-ai-system-message.js +1 -1
  118. package/dist/wc-react/hf-ai-tool-run.js +1 -1
  119. package/dist/wc-react/hf-autocomplete.js +37 -37
  120. package/dist/wc-react/hf-calendar.js +4 -4
  121. package/dist/wc-react/hf-carousel.js +1 -1
  122. package/dist/wc-react/hf-context-menu.js +8 -8
  123. package/dist/wc-react/hf-data-table.js +1 -1
  124. package/dist/wc-react/hf-empty-state.js +87 -88
  125. package/dist/wc-react/hf-empty-state.js.map +1 -1
  126. package/dist/wc-react/hf-history.js +4 -4
  127. package/dist/wc-react/hf-hover-card.js +6 -6
  128. package/dist/wc-react/hf-metric-item.js +6 -6
  129. package/dist/wc-react/hf-metric-item.js.map +1 -1
  130. package/dist/wc-react/hf-nav-account-menu.js +4 -4
  131. package/dist/wc-react/hf-notification-panel.js +2 -2
  132. package/dist/wc-react/hf-section-header.js +6 -6
  133. package/dist/wc-react/hf-sheet.js +1 -1
  134. package/dist/wc-react/hf-steps.js +5 -5
  135. package/dist/wc-react/journeyDiagram-3NMN7TZE.js +10 -10
  136. package/dist/wc-react/pieDiagram-E7YTZNPT.js +16 -16
  137. package/dist/wc-react/popupStateMapping.js +54 -54
  138. package/dist/wc-react/popupStateMapping.js.map +1 -1
  139. package/dist/wc-react/selection-group.js +1 -1
  140. package/dist/wc-react/selection-group.js.map +1 -1
  141. package/dist/wc-react/{useOpenChangeComplete.js → stateAttributesMapping.js} +19 -19
  142. package/dist/wc-react/stateAttributesMapping.js.map +1 -0
  143. package/dist/wc-react/stateDiagram-D77RDMKH.js +3 -3
  144. package/dist/wc-react/timeline-definition-24CTP7MA.js +19 -19
  145. package/dist/wc-react/useCollapsiblePanel.js +3 -3
  146. package/dist/wc-react/usePopupHandleStore.js +3 -3
  147. package/dist/wc-react/useScrollLock.js +1 -1
  148. package/dist/wc-react/vendor/recharts.js +525 -524
  149. package/dist/wc-react/vendor/recharts.js.map +1 -1
  150. package/dist/wc-react/xychartDiagram-S5SC5T6Z.js +6 -6
  151. package/package.json +1 -1
  152. package/skills/humain-ui/SKILL.md +1 -1
  153. package/skills/humain-ui-wc/SKILL.md +1 -1
  154. package/skills/humain-ui-wc.skill +0 -0
  155. package/skills/humain-ui.skill +0 -0
  156. package/dist/wc/useOpenChangeComplete.js.map +0 -1
  157. package/dist/wc-react/useOpenChangeComplete.js.map +0 -1
@@ -2,9 +2,9 @@ import { a as A } from "./rolldown-runtime.js";
2
2
  import { i as $, n as D, t as O } from "./vendor/react.js";
3
3
  import { t as g } from "./dist.js";
4
4
  import { t as L } from "./check.js";
5
- import { t as M } from "./create-safe-context.js";
6
- import { n as p, r as q } from "./utils.js";
7
- import { c as H, s as z } from "./_shared.js";
5
+ import { n as p, r as M } from "./utils.js";
6
+ import { c as q, s as z } from "./_shared.js";
7
+ import { t as H } from "./create-safe-context.js";
8
8
  var o = /* @__PURE__ */ A($(), 1), s = O(), W = g("flex items-center justify-center shrink-0 size-[38px] font-medium text-lg transition-all duration-200 ease-out motion-reduce:transition-none", {
9
9
  variants: {
10
10
  shape: {
@@ -43,7 +43,7 @@ var o = /* @__PURE__ */ A($(), 1), s = O(), W = g("flex items-center justify-cen
43
43
  incomplete: "text-secondary-foreground"
44
44
  } },
45
45
  defaultVariants: { status: "incomplete" }
46
- }), R = g("text-sm leading-5 text-secondary-foreground"), [X, B] = M("Steps"), S = o.createContext(0);
46
+ }), R = g("text-sm leading-5 text-secondary-foreground"), [X, B] = H("Steps"), S = o.createContext(0);
47
47
  function G({ index: e, status: t, shape: r, bulletType: i, showIncompleteDot: a = !0 }) {
48
48
  return i === "icon" ? t === "complete" ? /* @__PURE__ */ (0, s.jsx)(L, { className: "size-[22px] delight-check-draw" }) : t === "active" ? /* @__PURE__ */ (0, s.jsx)("div", { className: p("size-5 bg-primary", r === "rounded" ? "rounded-sm" : "rounded-full") }) : a ? /* @__PURE__ */ (0, s.jsx)("div", { className: "size-1.5 rounded-full bg-current" }) : null : e + 1;
49
49
  }
@@ -118,7 +118,7 @@ function j({ status: e, onClick: t, showIncompleteDot: r, children: i, className
118
118
  className: "flex items-center",
119
119
  children: [N, w]
120
120
  })]
121
- }), y = o.useMemo(() => q(h), [h]), k = d === "complete" ? ", completed" : d === "active" ? ", current" : "";
121
+ }), y = o.useMemo(() => M(h), [h]), k = d === "complete" ? ", completed" : d === "active" ? ", current" : "";
122
122
  return /* @__PURE__ */ (0, s.jsx)("li", {
123
123
  "data-slot": "steps-item",
124
124
  "aria-current": d === "active" ? "step" : void 0,
@@ -230,7 +230,7 @@ var b = {
230
230
  }
231
231
  _setProp(e, t) {
232
232
  const r = b[e] || "string";
233
- this._props[e] = H(t, r), this._render();
233
+ this._props[e] = q(t, r), this._render();
234
234
  }
235
235
  _getProp(e) {
236
236
  if (e in this._props) return this._props[e];
@@ -1,4 +1,4 @@
1
- import { Ot as rt, u as U } from "./vendor/recharts.js";
1
+ import { Et as rt, u as U } from "./vendor/recharts.js";
2
2
  import { n as s } from "./chunk-Y2CYZVJY.js";
3
3
  import { H as mt, K as xt, U as kt, a as _t, c as bt, v as vt, w as wt, x as V, y as Tt } from "./chunk-DU6HZSFF.js";
4
4
  import { t as St } from "./chunk-5VM5RSS4.js";
@@ -165,7 +165,7 @@ var K = (function() {
165
165
  }, "parseError"),
166
166
  parse: /* @__PURE__ */ s(function(i) {
167
167
  var a = this, o = [0], f = [], p = [null], u = [], _ = this.table, x = "", C = 0, A = 0, D = 0, dt = 2, tt = 1, ft = u.slice.call(arguments, 1), k = Object.create(this.lexer), P = { yy: {} };
168
- for (var W in this.yy) Object.prototype.hasOwnProperty.call(this.yy, W) && (P.yy[W] = this.yy[W]);
168
+ for (var O in this.yy) Object.prototype.hasOwnProperty.call(this.yy, O) && (P.yy[O] = this.yy[O]);
169
169
  k.setInput(i, P.yy), P.yy.lexer = k, P.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
170
170
  var Y = k.yylloc;
171
171
  u.push(Y);
@@ -705,7 +705,7 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
705
705
  }, "drawLabel"), zt = /* @__PURE__ */ s(function(e, t, l) {
706
706
  const d = e.append("g"), r = ot();
707
707
  r.x = t.x, r.y = t.y, r.fill = t.fill, r.width = l.width * t.taskCount + l.diagramMarginX * (t.taskCount - 1), r.height = l.height, r.class = "journey-section section-type-" + t.num, r.rx = 3, r.ry = 3, Q(d, r), ut(l)(t.text, d, r.x, r.y, r.width, r.height, { class: "journey-section section-type-" + t.num }, l, t.colour);
708
- }, "drawSection"), Z = -1, Ot = /* @__PURE__ */ s(function(e, t, l, d) {
708
+ }, "drawSection"), Z = -1, Wt = /* @__PURE__ */ s(function(e, t, l, d) {
709
709
  const r = t.x + l.width / 2, c = e.append("g");
710
710
  Z++, c.append("line").attr("id", d + "-task" + Z).attr("x1", r).attr("y1", t.y).attr("x2", r).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), jt(c, {
711
711
  cx: r,
@@ -727,7 +727,7 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
727
727
  };
728
728
  ct(c, n), y += 10;
729
729
  }), ut(l)(t.task, c, h.x, h.y, h.width, h.height, { class: "task" }, l, t.colour);
730
- }, "drawTask"), Wt = /* @__PURE__ */ s(function(e, t) {
730
+ }, "drawTask"), Ot = /* @__PURE__ */ s(function(e, t) {
731
731
  Mt(e, t);
732
732
  }, "drawBackgroundRect"), ut = /* @__PURE__ */ (function() {
733
733
  function e(r, c, h, y, g, m, n, i) {
@@ -759,8 +759,8 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
759
759
  drawSection: zt,
760
760
  drawText: ht,
761
761
  drawLabel: Nt,
762
- drawTask: Ot,
763
- drawBackgroundRect: Wt,
762
+ drawTask: Wt,
763
+ drawBackgroundRect: Ot,
764
764
  initGraphics: /* @__PURE__ */ s(function(e, t) {
765
765
  Z = -1, e.append("defs").append("marker").attr("id", t + "-arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
766
766
  }, "initGraphics")
@@ -768,10 +768,10 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
768
768
  Object.keys(e).forEach(function(t) {
769
769
  S[t] = e[t];
770
770
  });
771
- }, "setConf"), M = {}, O = 0;
771
+ }, "setConf"), M = {}, W = 0;
772
772
  function yt(e) {
773
773
  const t = V().journey, l = t.maxLabelWidth;
774
- O = 0;
774
+ W = 0;
775
775
  let d = 60;
776
776
  Object.keys(M).forEach((r) => {
777
777
  const c = M[r].color, h = {
@@ -811,7 +811,7 @@ function yt(e) {
811
811
  text: n,
812
812
  textMargin: t.boxTextMargin ?? 5
813
813
  }, o = j.drawText(e, a).node().getBoundingClientRect().width;
814
- o > O && o > t.leftMargin - o && (O = o);
814
+ o > W && o > t.leftMargin - o && (W = o);
815
815
  }), d += Math.max(20, m.length * 20);
816
816
  });
817
817
  }
@@ -832,7 +832,7 @@ var S = V().journey, E = 0, qt = /* @__PURE__ */ s(function(e, t, l, d) {
832
832
  color: S.actorColours[p % S.actorColours.length],
833
833
  position: p
834
834
  }, p++;
835
- }), yt(i), E = S.leftMargin + O, T.insert(0, 0, E, Object.keys(M).length * 50), Xt(i, a, 0, t);
835
+ }), yt(i), E = S.leftMargin + W, T.insert(0, 0, E, Object.keys(M).length * 50), Xt(i, a, 0, t);
836
836
  const u = T.getBounds();
837
837
  o && i.append("text").text(o).attr("x", E).attr("font-size", h).attr("font-weight", "bold").attr("y", 25).attr("fill", c).attr("font-family", y);
838
838
  const _ = u.stopy - u.starty + 2 * S.diagramMarginY, x = E + u.stopx + 2 * S.diagramMarginX;
@@ -1,4 +1,4 @@
1
- import { $ as et, Ot as N, Tt as at } from "./vendor/recharts.js";
1
+ import { $ as et, Ct as at, Et as N } from "./vendor/recharts.js";
2
2
  import { n as rt } from "./mermaid-parser.core.js";
3
3
  import { n } from "./chunk-Y2CYZVJY.js";
4
4
  import { t as z } from "./chunk-X3CZISLH.js";
@@ -35,7 +35,7 @@ var I = ct.pie, H = {
35
35
  }, "populateDb"), wt = { parse: /* @__PURE__ */ n(async (t) => {
36
36
  const a = await rt("pie", t);
37
37
  z.debug(a), xt(a, B);
38
- }, "parse") }, $t = /* @__PURE__ */ n((t) => `
38
+ }, "parse") }, Ct = /* @__PURE__ */ n((t) => `
39
39
  .pieCircle{
40
40
  stroke: ${t.pieStrokeColor};
41
41
  stroke-width : ${t.pieStrokeWidth};
@@ -72,7 +72,7 @@ var I = ct.pie, H = {
72
72
  font-family: ${t.fontFamily};
73
73
  font-size: ${t.pieLegendTextSize};
74
74
  }
75
- `, "getStyles"), Ct = /* @__PURE__ */ n((t) => {
75
+ `, "getStyles"), $t = /* @__PURE__ */ n((t) => {
76
76
  const a = [...t.values()].reduce((s, l) => s + l, 0), L = [...t.entries()].map(([s, l]) => ({
77
77
  label: s,
78
78
  value: l
@@ -84,14 +84,14 @@ var I = ct.pie, H = {
84
84
  renderer: { draw: /* @__PURE__ */ n((t, a, L, s) => {
85
85
  z.debug(`rendering pie chart
86
86
  ` + t);
87
- const l = s.db, O = gt(), c = ut(l.getConfig(), O.pie), U = 40, w = 18, K = 4, $ = 450, C = $, D = St(a), m = D.append("g");
87
+ const l = s.db, W = gt(), c = ut(l.getConfig(), W.pie), U = 40, w = 18, K = 4, C = 450, $ = C, D = St(a), m = D.append("g");
88
88
  m.attr("transform", "translate(225,225)");
89
- const { themeVariables: i } = O;
90
- let [W] = mt(i.pieOuterStrokeWidth);
91
- W ??= 2;
92
- const V = c.legendPosition, F = c.textPosition, X = c.donutHole > 0 && c.donutHole <= 0.9 ? c.donutHole : 0, g = Math.min(C, $) / 2 - U, Z = N().innerRadius(X * g).outerRadius(g), j = N().innerRadius(g * F).outerRadius(g * F), f = m.append("g");
93
- f.append("circle").attr("cx", 0).attr("cy", 0).attr("r", g + W / 2).attr("class", "pieOuterCircle");
94
- const S = l.getSections(), q = Ct(S), J = [
89
+ const { themeVariables: i } = W;
90
+ let [F] = mt(i.pieOuterStrokeWidth);
91
+ F ??= 2;
92
+ const V = c.legendPosition, M = c.textPosition, X = c.donutHole > 0 && c.donutHole <= 0.9 ? c.donutHole : 0, g = Math.min($, C) / 2 - U, Z = N().innerRadius(X * g).outerRadius(g), j = N().innerRadius(g * M).outerRadius(g * M), f = m.append("g");
93
+ f.append("circle").attr("cx", 0).attr("cy", 0).attr("r", g + F / 2).attr("class", "pieOuterCircle");
94
+ const S = l.getSections(), q = $t(S), J = [
95
95
  i.pie1,
96
96
  i.pie2,
97
97
  i.pie3,
@@ -109,18 +109,18 @@ var I = ct.pie, H = {
109
109
  S.forEach((e) => {
110
110
  y += e;
111
111
  });
112
- const M = q.filter((e) => (e.data.value / y * 100).toFixed(0) !== "0"), T = et(J).domain([...S.keys()]);
113
- f.selectAll("mySlices").data(M).enter().append("path").attr("d", Z).attr("fill", (e) => T(e.data.label)).attr("class", (e) => {
112
+ const O = q.filter((e) => (e.data.value / y * 100).toFixed(0) !== "0"), T = et(J).domain([...S.keys()]);
113
+ f.selectAll("mySlices").data(O).enter().append("path").attr("d", Z).attr("fill", (e) => T(e.data.label)).attr("class", (e) => {
114
114
  let r = "pieCircle";
115
115
  return c.highlightSlice === "hover" ? r += " highlightedOnHover" : c.highlightSlice === e.data.label && (r += " highlighted"), r;
116
- }), f.selectAll("mySlices").data(M).enter().append("text").text((e) => (e.data.value / y * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + j.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
116
+ }), f.selectAll("mySlices").data(O).enter().append("text").text((e) => (e.data.value / y * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + j.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
117
117
  const Q = m.append("text").text(l.getDiagramTitle()).attr("x", 0).attr("y", -200).attr("class", "pieTitleText"), u = [...S.entries()].map(([e, r]) => ({
118
118
  label: e,
119
119
  value: r
120
120
  })), d = m.selectAll(".legend").data(u).enter().append("g").attr("class", "legend");
121
121
  d.append("rect").attr("width", w).attr("height", w).style("fill", (e) => T(e.label)).style("stroke", (e) => T(e.label)), d.append("text").attr("x", 22).attr("y", 14).text((e) => l.getShowData() ? `${e.label} [${e.value}]` : e.label);
122
122
  const h = Math.max(...d.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0));
123
- let v = $, A = 490;
123
+ let v = C, A = 490;
124
124
  const o = 22, b = u.length * o;
125
125
  switch (V) {
126
126
  case "center":
@@ -153,10 +153,10 @@ var I = ct.pie, H = {
153
153
  return "translate(216," + (r * o - p) + ")";
154
154
  });
155
155
  }
156
- const P = Q.node()?.getBoundingClientRect().width ?? 0, Y = C / 2 - P / 2, tt = C / 2 + P / 2, R = Math.min(0, Y), G = Math.max(A, tt) - R;
156
+ const P = Q.node()?.getBoundingClientRect().width ?? 0, Y = $ / 2 - P / 2, tt = $ / 2 + P / 2, R = Math.min(0, Y), G = Math.max(A, tt) - R;
157
157
  D.attr("viewBox", `${R} 0 ${G} ${v}`), lt(D, v, G, c.useMaxWidth);
158
158
  }, "draw") },
159
- styles: $t
159
+ styles: Ct
160
160
  };
161
161
  export {
162
162
  zt as diagram
@@ -1,6 +1,6 @@
1
1
  import { a as Be } from "./rolldown-runtime.js";
2
2
  import { i as vt, r as yt, t as Ct } from "./vendor/react.js";
3
- import { at as Rt, it as It } from "./vendor/recharts.js";
3
+ import { Dt as Rt, Ot as It } from "./vendor/recharts.js";
4
4
  import { a as L, c as Ot, d as z, f as Q, g as Le, m as Pt, p as de, t as Ue } from "./floating-ui.utils.dom.js";
5
5
  import { t as G } from "./owner.js";
6
6
  import { n as R, t as v } from "./useIsoLayoutEffect.js";
@@ -14,9 +14,9 @@ import { n as W, r as pe, t as Vt } from "./shadowDom.js";
14
14
  import { i as jt, n as ge } from "./element.js";
15
15
  import { t as T } from "./addEventListener.js";
16
16
  import { t as Kt } from "./visuallyHidden.js";
17
- import { a as Wt, i as ke, o as Gt, t as Yt } from "./useOpenChangeComplete.js";
18
- import { n as Ae, t as Fe } from "./useTimeout.js";
19
- var Xt = Ht, c = /* @__PURE__ */ Be(vt(), 1), Ce = /* @__PURE__ */ Be(yt(), 1), je = Rt(), qt = It(), B = Ct();
17
+ import { n as ke, t as Ae } from "./useTimeout.js";
18
+ import { a as Wt, n as Gt, r as Yt, t as Fe } from "./stateAttributesMapping.js";
19
+ var Xt = Ht, c = /* @__PURE__ */ Be(vt(), 1), Ce = /* @__PURE__ */ Be(yt(), 1), B = Ct();
20
20
  function Ee(e, t, n = !0) {
21
21
  return e.filter((r) => r.parentId === t).flatMap((r) => [...!n || r.context?.open ? [r] : [], ...Ee(e, r.id, n)]);
22
22
  }
@@ -28,8 +28,8 @@ function nr(e, t) {
28
28
  }
29
29
  return n;
30
30
  }
31
- var $t = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
32
- function zt(e) {
31
+ var qt = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
32
+ function $t(e) {
33
33
  const t = e.assignedSlot;
34
34
  if (t) return t;
35
35
  if (e.parentElement) return e.parentElement;
@@ -40,27 +40,27 @@ function Se(e) {
40
40
  for (const t of Array.from(e.children)) if (L(t) === "summary") return t;
41
41
  return null;
42
42
  }
43
- function Jt(e, t) {
43
+ function zt(e, t) {
44
44
  const n = Se(t);
45
45
  return !!n && (e === n || W(n, e));
46
46
  }
47
- function Ke(e) {
47
+ function je(e) {
48
48
  const t = e ? L(e) : "";
49
- return e != null && e.matches($t) && (t !== "summary" || e.parentElement != null && L(e.parentElement) === "details" && Se(e.parentElement) === e) && (t !== "details" || Se(e) == null) && (t !== "input" || e.type !== "hidden");
49
+ return e != null && e.matches(qt) && (t !== "summary" || e.parentElement != null && L(e.parentElement) === "details" && Se(e.parentElement) === e) && (t !== "details" || Se(e) == null) && (t !== "input" || e.type !== "hidden");
50
50
  }
51
- function We(e) {
52
- if (!Ke(e) || !e.isConnected || e.matches(":disabled")) return !1;
53
- for (let t = e; t; t = zt(t)) {
51
+ function Ke(e) {
52
+ if (!je(e) || !e.isConnected || e.matches(":disabled")) return !1;
53
+ for (let t = e; t; t = $t(t)) {
54
54
  const n = t !== e, r = L(t) === "slot";
55
- if (t.hasAttribute("inert") || n && L(t) === "details" && !t.open && !Jt(e, t) || t.hasAttribute("hidden") || !r && !Qt(t, n)) return !1;
55
+ if (t.hasAttribute("inert") || n && L(t) === "details" && !t.open && !zt(e, t) || t.hasAttribute("hidden") || !r && !Jt(t, n)) return !1;
56
56
  }
57
57
  return !0;
58
58
  }
59
- function Qt(e, t) {
59
+ function Jt(e, t) {
60
60
  const n = Ue(e);
61
61
  return t ? n.display !== "none" : Bt(e, n);
62
62
  }
63
- function Ge(e) {
63
+ function We(e) {
64
64
  const t = e.tabIndex;
65
65
  if (t < 0) {
66
66
  const n = L(e);
@@ -73,7 +73,7 @@ function he(e) {
73
73
  const t = e;
74
74
  return t.type === "radio" && t.name !== "" ? t : null;
75
75
  }
76
- function Zt(e, t) {
76
+ function Qt(e, t) {
77
77
  const n = he(e);
78
78
  if (!n) return !0;
79
79
  const r = t.find((s) => {
@@ -85,47 +85,47 @@ function Zt(e, t) {
85
85
  return o?.name === n.name && o.form === n.form;
86
86
  }) === n;
87
87
  }
88
- function Ye(e) {
88
+ function Ge(e) {
89
89
  if (Q(e) && L(e) === "slot") {
90
90
  const t = e.assignedElements({ flatten: !0 });
91
91
  if (t.length > 0) return t;
92
92
  }
93
93
  return Q(e) && e.shadowRoot ? Array.from(e.shadowRoot.children) : Array.from(e.children);
94
94
  }
95
- function Xe(e, t) {
96
- Ye(e).forEach((n) => {
97
- Ke(n) && t.push(n), Xe(n, t);
95
+ function Ye(e, t) {
96
+ Ge(e).forEach((n) => {
97
+ je(n) && t.push(n), Ye(n, t);
98
98
  });
99
99
  }
100
- function qe(e, t, n) {
101
- Ye(e).forEach((r) => {
102
- Q(r) && r.matches(t) && n.push(r), qe(r, t, n);
100
+ function Xe(e, t, n) {
101
+ Ge(e).forEach((r) => {
102
+ Q(r) && r.matches(t) && n.push(r), Xe(r, t, n);
103
103
  });
104
104
  }
105
105
  function rr(e) {
106
- return We(e) && Ge(e) >= 0;
106
+ return Ke(e) && We(e) >= 0;
107
107
  }
108
- function en(e) {
108
+ function Zt(e) {
109
109
  const t = [];
110
- return Xe(e, t), t.filter(We);
110
+ return Ye(e, t), t.filter(Ke);
111
111
  }
112
112
  function Re(e) {
113
- const t = en(e);
114
- return t.filter((n) => Ge(n) >= 0 && Zt(n, t));
113
+ const t = Zt(e);
114
+ return t.filter((n) => We(n) >= 0 && Qt(n, t));
115
115
  }
116
- function $e(e, t) {
116
+ function qe(e, t) {
117
117
  const n = Re(e), r = n.length;
118
118
  if (r === 0) return;
119
119
  const s = Vt(G(e)), o = n.indexOf(s);
120
120
  return n[o === -1 ? t === 1 ? 0 : r - 1 : o + t];
121
121
  }
122
- function tn(e) {
123
- return $e(G(e).body, 1) || e;
122
+ function en(e) {
123
+ return qe(G(e).body, 1) || e;
124
124
  }
125
- function nn(e) {
126
- return $e(G(e).body, -1) || e;
125
+ function tn(e) {
126
+ return qe(G(e).body, -1) || e;
127
127
  }
128
- function ze(e, t) {
128
+ function $e(e, t) {
129
129
  if (!e) return null;
130
130
  const n = Re(G(e).body), r = n.length;
131
131
  if (r === 0) return null;
@@ -133,28 +133,28 @@ function ze(e, t) {
133
133
  return s === -1 ? null : n[(s + t + r) % r];
134
134
  }
135
135
  function sr(e) {
136
- return ze(e, 1);
136
+ return $e(e, 1);
137
137
  }
138
138
  function or(e) {
139
- return ze(e, -1);
139
+ return $e(e, -1);
140
140
  }
141
141
  function me(e, t) {
142
142
  const n = t || e.currentTarget, r = e.relatedTarget;
143
143
  return !r || !W(n, r);
144
144
  }
145
- function rn(e) {
145
+ function nn(e) {
146
146
  Re(e).forEach((t) => {
147
147
  t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
148
148
  });
149
149
  }
150
150
  function De(e) {
151
151
  const t = [];
152
- qe(e, "[data-tabindex]", t), t.forEach((n) => {
152
+ Xe(e, "[data-tabindex]", t), t.forEach((n) => {
153
153
  const r = n.dataset.tabindex;
154
154
  delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
155
155
  });
156
156
  }
157
- var be = [], Te = void 0;
157
+ var ze = It(), rn = Rt(), be = [], Te = void 0;
158
158
  function sn() {
159
159
  return Te;
160
160
  }
@@ -196,7 +196,7 @@ function ln(e, t, n, r, s) {
196
196
  r,
197
197
  s
198
198
  ]);
199
- return (0, je.useSyncExternalStore)(e.subscribe, o, o);
199
+ return (0, ze.useSyncExternalStore)(e.subscribe, o, o);
200
200
  }
201
201
  on({
202
202
  before(e) {
@@ -218,7 +218,7 @@ on({
218
218
  return () => {
219
219
  for (const s of r) s();
220
220
  };
221
- }), (0, je.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getSnapshot));
221
+ }), (0, ze.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getSnapshot));
222
222
  }
223
223
  });
224
224
  function fn(e, t, n, r, s) {
@@ -237,7 +237,7 @@ function fn(e, t, n, r, s) {
237
237
  }, o.syncHooks.push(l)), l.value;
238
238
  }
239
239
  function dn(e, t, n, r, s) {
240
- return (0, qt.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (o) => t(o, n, r, s));
240
+ return (0, rn.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (o) => t(o, n, r, s));
241
241
  }
242
242
  var pn = class {
243
243
  constructor(e) {
@@ -429,7 +429,7 @@ var pr = /* @__PURE__ */ c.forwardRef(function(t, n) {
429
429
  c.useEffect(() => {
430
430
  if (!i || Y) return;
431
431
  function x(_) {
432
- i && _.relatedTarget && me(_) && (_.type === "focusin" ? M.current && (De(i), M.current = !1) : (rn(i), M.current = !0));
432
+ i && _.relatedTarget && me(_) && (_.type === "focusin" ? M.current && (De(i), M.current = !1) : (nn(i), M.current = !0));
433
433
  }
434
434
  return re(T(i, "focusin", x, !0), T(i, "focusout", x, !0));
435
435
  }, [i, Y]), v(() => {
@@ -453,7 +453,7 @@ var pr = /* @__PURE__ */ c.forwardRef(function(t, n) {
453
453
  if (me(x, i)) b.current?.focus();
454
454
  else {
455
455
  const _ = y ? y.domReference : null;
456
- nn(_)?.focus();
456
+ tn(_)?.focus();
457
457
  }
458
458
  }
459
459
  }),
@@ -469,7 +469,7 @@ var pr = /* @__PURE__ */ c.forwardRef(function(t, n) {
469
469
  if (me(x, i)) E.current?.focus();
470
470
  else {
471
471
  const _ = y ? y.domReference : null;
472
- tn(_)?.focus(), y?.closeOnFocusOut && y?.onOpenChange(!1, J("focus-out", x.nativeEvent));
472
+ en(_)?.focus(), y?.closeOnFocusOut && y?.onOpenChange(!1, J("focus-out", x.nativeEvent));
473
473
  }
474
474
  }
475
475
  })
@@ -548,7 +548,7 @@ function Cn(e) {
548
548
  };
549
549
  }
550
550
  function Er(e, t = {}) {
551
- const { enabled: n = !0, escapeKey: r = !0, outsidePress: s = !0, outsidePressEvent: o = "sloppy", referencePress: p = yn, bubbles: l, externalTree: f } = t, i = "rootStore" in e ? e.rootStore : e, g = i.useState("open"), S = i.useState("floatingElement"), { dataRef: d } = i.context, h = rt(f), b = R(typeof s == "function" ? s : () => !1), E = typeof s == "function" ? b : s, y = E !== !1, Z = R(() => o), { escapeKey: M, outsidePress: Y } = Cn(l), A = c.useRef(!1), F = c.useRef(!1), k = c.useRef(!1), x = c.useRef(!1), _ = c.useRef(""), C = c.useRef(null), X = Ae(), Oe = Ae(), D = R(() => {
551
+ const { enabled: n = !0, escapeKey: r = !0, outsidePress: s = !0, outsidePressEvent: o = "sloppy", referencePress: p = yn, bubbles: l, externalTree: f } = t, i = "rootStore" in e ? e.rootStore : e, g = i.useState("open"), S = i.useState("floatingElement"), { dataRef: d } = i.context, h = rt(f), b = R(typeof s == "function" ? s : () => !1), E = typeof s == "function" ? b : s, y = E !== !1, Z = R(() => o), { escapeKey: M, outsidePress: Y } = Cn(l), A = c.useRef(!1), F = c.useRef(!1), k = c.useRef(!1), x = c.useRef(!1), _ = c.useRef(""), C = c.useRef(null), X = ke(), Oe = ke(), D = R(() => {
552
552
  Oe.clear(), d.current.insideReactTree = !1;
553
553
  }), se = R((m) => {
554
554
  const N = d.current.floatingContext?.nodeId;
@@ -571,7 +571,7 @@ function Er(e, t = {}) {
571
571
  c.useEffect(() => {
572
572
  if (!g || !n) return D;
573
573
  d.current.__escapeKeyBubbles = M, d.current.__outsidePressBubbles = Y;
574
- const m = new Fe(), N = new Fe();
574
+ const m = new Ae(), N = new Ae();
575
575
  function H() {
576
576
  m.clear(), x.current = !0;
577
577
  }
@@ -968,7 +968,7 @@ function Rr(e, t = {}) {
968
968
  ]);
969
969
  }
970
970
  function Ir(e, t, n) {
971
- const { mounted: r, setMounted: s, transitionStatus: o } = Gt(e), p = t.useState("preventUnmountingOnClose"), l = e ? !1 : p;
971
+ const { mounted: r, setMounted: s, transitionStatus: o } = Wt(e), p = t.useState("preventUnmountingOnClose"), l = e ? !1 : p;
972
972
  t.useSyncedValues({
973
973
  mounted: r,
974
974
  transitionStatus: o,
@@ -1041,7 +1041,7 @@ var xr = class {
1041
1041
  return this.idMap.size;
1042
1042
  }
1043
1043
  }, _r = (function(e) {
1044
- return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = ke.startingStyle] = "startingStyle", e[e.endingStyle = ke.endingStyle] = "endingStyle", e.anchorHidden = "data-anchor-hidden", e.side = "data-side", e.align = "data-align", e;
1044
+ return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = Fe.startingStyle] = "startingStyle", e[e.endingStyle = Fe.endingStyle] = "endingStyle", e.anchorHidden = "data-anchor-hidden", e.side = "data-side", e.align = "data-align", e;
1045
1045
  })({}), Nn = { "data-popup-open": "" }, Mn = {
1046
1046
  "data-popup-open": "",
1047
1047
  "data-pressed": ""
@@ -1058,7 +1058,7 @@ var xr = class {
1058
1058
  }
1059
1059
  }, wr = {
1060
1060
  ...Fn,
1061
- ...Wt
1061
+ ...Gt
1062
1062
  };
1063
1063
  export {
1064
1064
  Xt as $,
@@ -1068,7 +1068,7 @@ export {
1068
1068
  vn as D,
1069
1069
  rt as E,
1070
1070
  Qe as F,
1071
- nn as G,
1071
+ tn as G,
1072
1072
  ir as H,
1073
1073
  He as I,
1074
1074
  me as J,
@@ -1082,9 +1082,9 @@ export {
1082
1082
  gn as R,
1083
1083
  hr as S,
1084
1084
  Ie as T,
1085
- en as U,
1085
+ Zt as U,
1086
1086
  an as V,
1087
- tn as W,
1087
+ en as W,
1088
1088
  Re as X,
1089
1089
  rr as Y,
1090
1090
  nr as Z,