@wakastellar/ui 3.3.3 → 3.5.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 (140) hide show
  1. package/dist/badge-BbwO7QeZ.js +1 -0
  2. package/dist/badge-BfiocODp.mjs +23 -0
  3. package/dist/charts.cjs.js +1 -1
  4. package/dist/charts.es.js +1 -1
  5. package/dist/chunk-14q5BKub.js +1 -0
  6. package/dist/{chunk-BH6uBOac.mjs → chunk-Cr9pTUWm.mjs} +5 -5
  7. package/dist/cn-DEtaFQsA.js +1 -0
  8. package/dist/cn-DUn6aSIQ.mjs +24 -0
  9. package/dist/doc.cjs.js +2 -2
  10. package/dist/doc.es.js +19 -19
  11. package/dist/editor.cjs.js +48 -0
  12. package/dist/editor.d.ts +1 -0
  13. package/dist/editor.es.js +6551 -0
  14. package/dist/{exceljs.min-DG9M8IZ1.mjs → exceljs.min-DL1XYDll.mjs} +1 -1
  15. package/dist/{exceljs.min-BuefmDRS.js → exceljs.min-qeIfSCbF.js} +1 -1
  16. package/dist/export.cjs.js +1 -1
  17. package/dist/export.es.js +1 -1
  18. package/dist/index.cjs.js +150 -150
  19. package/dist/index.es.js +26782 -27591
  20. package/dist/input-BfaSAGVw.js +1 -0
  21. package/dist/input-DVr_Qkl8.mjs +14 -0
  22. package/dist/rich-text.cjs.js +1 -1
  23. package/dist/rich-text.es.js +1 -1
  24. package/dist/security-CyBpuklN.mjs +122 -0
  25. package/dist/security-bFWwDrlg.js +1 -0
  26. package/dist/separator-NrkltulH.js +1 -0
  27. package/dist/separator-ibN2mycs.mjs +51 -0
  28. package/dist/src/components/editor/blocks/index.d.ts +51 -0
  29. package/dist/src/components/editor/blocks/waka-acceptance-criteria-block.d.ts +60 -0
  30. package/dist/src/components/editor/blocks/waka-ai-assist-block.d.ts +58 -0
  31. package/dist/src/components/editor/blocks/waka-api-endpoint-block.d.ts +63 -0
  32. package/dist/src/components/editor/blocks/waka-code-playground-block.d.ts +61 -0
  33. package/dist/src/components/editor/blocks/waka-comment-thread-block.d.ts +85 -0
  34. package/dist/src/components/editor/blocks/waka-diagram-block.d.ts +52 -0
  35. package/dist/src/components/editor/blocks/waka-embed-block.d.ts +58 -0
  36. package/dist/src/components/editor/blocks/waka-slash-menu-block.d.ts +67 -0
  37. package/dist/src/components/editor/blocks/waka-user-story-block.d.ts +79 -0
  38. package/dist/src/components/editor/blocks/waka-version-diff-block.d.ts +73 -0
  39. package/dist/src/components/editor/index.d.ts +66 -0
  40. package/dist/src/components/editor/waka-ai-writer.d.ts +80 -0
  41. package/dist/src/components/editor/waka-collaborative-editor.d.ts +93 -0
  42. package/dist/src/components/editor/waka-diff-viewer.d.ts +71 -0
  43. package/dist/src/components/editor/waka-dnd-editor.d.ts +64 -0
  44. package/dist/src/components/editor/waka-document-editor.d.ts +92 -0
  45. package/dist/src/components/editor/waka-editor-elements.d.ts +79 -0
  46. package/dist/src/components/editor/waka-editor-leaves.d.ts +39 -0
  47. package/dist/src/components/editor/waka-editor-plugins.d.ts +41 -0
  48. package/dist/src/components/editor/waka-editor-toolbar.d.ts +20 -0
  49. package/dist/src/components/editor/waka-editor.d.ts +59 -0
  50. package/dist/src/components/editor/waka-floating-toolbar.d.ts +47 -0
  51. package/dist/src/components/editor/waka-markdown-editor.d.ts +60 -0
  52. package/dist/src/components/editor/waka-mention-editor.d.ts +125 -0
  53. package/dist/src/components/editor/waka-slash-menu.d.ts +70 -0
  54. package/dist/src/components/editor/waka-spec-editor.d.ts +88 -0
  55. package/dist/src/components/index.d.ts +1 -15
  56. package/dist/src/editor.d.ts +26 -0
  57. package/dist/textarea-CdQWggYG.js +1 -0
  58. package/dist/textarea-DJDXJ3nd.mjs +23 -0
  59. package/dist/types-C2St0wOW.js +1 -0
  60. package/dist/{types-B6GVaSIP.mjs → types-JnqoLyuv.mjs} +214 -211
  61. package/dist/{useDataTableImport-BPvfo--2.mjs → useDataTableImport-BWUFesPi.mjs} +3 -3
  62. package/dist/{useDataTableImport-Cm_pCKnO.js → useDataTableImport-T7ddpN5k.js} +3 -3
  63. package/dist/waka-doc-renderer-CTxC7Trf.js +3 -0
  64. package/dist/{waka-doc-renderer-BkIvas3z.mjs → waka-doc-renderer-Cw-Xnyen.mjs} +264 -281
  65. package/dist/waka-editor-plugins-DR6tpsUC.mjs +135 -0
  66. package/dist/waka-editor-plugins-sGSh9hn2.js +1 -0
  67. package/dist/waka-rich-text-editor-BlIdtknG.js +1 -0
  68. package/dist/waka-rich-text-editor-D1uA3zbB.js +1 -0
  69. package/dist/waka-rich-text-editor-DgSWiXMW.mjs +342 -0
  70. package/dist/waka-rich-text-editor-DndVJuDw.mjs +2 -0
  71. package/package.json +87 -2
  72. package/src/blocks/footer/index.tsx +1 -6
  73. package/src/blocks/login/index.tsx +1 -7
  74. package/src/blocks/profile/index.tsx +3 -5
  75. package/src/components/editor/blocks/index.ts +182 -0
  76. package/src/components/editor/blocks/waka-acceptance-criteria-block.tsx +326 -0
  77. package/src/components/editor/blocks/waka-ai-assist-block.tsx +284 -0
  78. package/src/components/editor/blocks/waka-api-endpoint-block.tsx +382 -0
  79. package/src/components/editor/blocks/waka-code-playground-block.tsx +331 -0
  80. package/src/components/editor/blocks/waka-comment-thread-block.tsx +448 -0
  81. package/src/components/editor/blocks/waka-diagram-block.tsx +293 -0
  82. package/src/components/editor/blocks/waka-embed-block.tsx +416 -0
  83. package/src/components/editor/blocks/waka-slash-menu-block.tsx +432 -0
  84. package/src/components/editor/blocks/waka-user-story-block.tsx +295 -0
  85. package/src/components/editor/blocks/waka-version-diff-block.tsx +426 -0
  86. package/src/components/editor/index.ts +279 -0
  87. package/src/components/editor/waka-ai-writer.tsx +434 -0
  88. package/src/components/editor/waka-collaborative-editor.tsx +426 -0
  89. package/src/components/editor/waka-diff-viewer.tsx +352 -0
  90. package/src/components/editor/waka-dnd-editor.tsx +284 -0
  91. package/src/components/editor/waka-document-editor.tsx +502 -0
  92. package/src/components/editor/waka-editor-elements.tsx +312 -0
  93. package/src/components/editor/waka-editor-leaves.tsx +101 -0
  94. package/src/components/editor/waka-editor-plugins.ts +207 -0
  95. package/src/components/editor/waka-editor-toolbar.tsx +358 -0
  96. package/src/components/editor/waka-editor.tsx +431 -0
  97. package/src/components/editor/waka-floating-toolbar.tsx +268 -0
  98. package/src/components/editor/waka-markdown-editor.tsx +395 -0
  99. package/src/components/editor/waka-mention-editor.tsx +459 -0
  100. package/src/components/editor/waka-slash-menu.tsx +392 -0
  101. package/src/components/editor/waka-spec-editor.tsx +657 -0
  102. package/src/components/index.ts +1 -18
  103. package/dist/chunk-BDDJmn7V.js +0 -1
  104. package/dist/cn-DnPbmOCy.js +0 -1
  105. package/dist/cn-DpLcAzrf.mjs +0 -22
  106. package/dist/separator-BDReXBvI.mjs +0 -59
  107. package/dist/separator-BKjNl9sI.js +0 -1
  108. package/dist/src/components/waka-actor-badge/index.d.ts +0 -8
  109. package/dist/src/components/waka-actors-list/index.d.ts +0 -18
  110. package/dist/src/components/waka-ai-assistant-button/index.d.ts +0 -8
  111. package/dist/src/components/waka-document-flyover/index.d.ts +0 -10
  112. package/dist/src/components/waka-document-preview-popup/index.d.ts +0 -26
  113. package/dist/src/components/waka-hour-balance-badge/index.d.ts +0 -8
  114. package/dist/src/components/waka-hour-consumption-table/index.d.ts +0 -15
  115. package/dist/src/components/waka-hour-pack-dialog/index.d.ts +0 -8
  116. package/dist/src/components/waka-project-stats-header/index.d.ts +0 -15
  117. package/dist/src/components/waka-step-comment-bubble/index.d.ts +0 -13
  118. package/dist/src/components/waka-step-comment-panel/index.d.ts +0 -20
  119. package/dist/src/components/waka-step-permission-matrix/index.d.ts +0 -12
  120. package/dist/src/components/waka-time-entry-dialog/index.d.ts +0 -16
  121. package/dist/src/components/waka-time-tracking-flyover/index.d.ts +0 -11
  122. package/dist/types-BH9cQRqZ.js +0 -1
  123. package/dist/waka-doc-renderer-BZ2-SqyT.js +0 -3
  124. package/dist/waka-rich-text-editor-BJGlQgpq.js +0 -1
  125. package/dist/waka-rich-text-editor-BJzzxeP1.mjs +0 -361
  126. package/dist/waka-rich-text-editor-wnXLwvUo.js +0 -1
  127. package/src/components/waka-actor-badge/index.tsx +0 -34
  128. package/src/components/waka-actors-list/index.tsx +0 -125
  129. package/src/components/waka-ai-assistant-button/index.tsx +0 -31
  130. package/src/components/waka-document-flyover/index.tsx +0 -36
  131. package/src/components/waka-document-preview-popup/index.tsx +0 -103
  132. package/src/components/waka-hour-balance-badge/index.tsx +0 -43
  133. package/src/components/waka-hour-consumption-table/index.tsx +0 -72
  134. package/src/components/waka-hour-pack-dialog/index.tsx +0 -72
  135. package/src/components/waka-project-stats-header/index.tsx +0 -69
  136. package/src/components/waka-step-comment-bubble/index.tsx +0 -71
  137. package/src/components/waka-step-comment-panel/index.tsx +0 -106
  138. package/src/components/waka-step-permission-matrix/index.tsx +0 -65
  139. package/src/components/waka-time-entry-dialog/index.tsx +0 -131
  140. package/src/components/waka-time-tracking-flyover/index.tsx +0 -41
@@ -1,20 +1,21 @@
1
- import { t as e } from "./cn-DpLcAzrf.mjs";
2
- import * as t from "react";
3
- import { useEffect as n, useMemo as r, useState as i } from "react";
4
- import { Minus as a, TrendingDown as o, TrendingUp as s } from "lucide-react";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
1
+ import { n as e, t } from "./cn-DUn6aSIQ.mjs";
2
+ import * as n from "react";
3
+ import { useEffect as r, useMemo as i, useState as a } from "react";
4
+ import { Minus as o, TrendingDown as s, TrendingUp as c } from "lucide-react";
5
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
6
  //#region src/components/skeleton/index.tsx
7
- function u({ className: t, ...n }) {
8
- return /* @__PURE__ */ c("div", {
9
- className: e("animate-pulse rounded-md bg-muted", t),
7
+ e();
8
+ function d({ className: e, ...n }) {
9
+ return /* @__PURE__ */ l("div", {
10
+ className: t("animate-pulse rounded-md bg-muted", e),
10
11
  ...n
11
12
  });
12
13
  }
13
14
  //#endregion
14
15
  //#region src/components/waka-charts/hooks/useRechartsLoader.ts
15
- function d() {
16
- let [e, t] = i(null), [r, a] = i(!0), [o, s] = i(null);
17
- return n(() => {
16
+ function f() {
17
+ let [e, t] = a(null), [n, i] = a(!0), [o, s] = a(null);
18
+ return r(() => {
18
19
  let e = !0;
19
20
  return (async () => {
20
21
  try {
@@ -38,23 +39,23 @@ function d() {
38
39
  defs: "defs",
39
40
  linearGradient: "linearGradient",
40
41
  stop: "stop"
41
- }), a(!1));
42
+ }), i(!1));
42
43
  } catch (t) {
43
- e && (s(t instanceof Error ? t : /* @__PURE__ */ Error("Failed to load Recharts")), a(!1));
44
+ e && (s(t instanceof Error ? t : /* @__PURE__ */ Error("Failed to load Recharts")), i(!1));
44
45
  }
45
46
  })(), () => {
46
47
  e = !1;
47
48
  };
48
49
  }, []), {
49
50
  components: e,
50
- loading: r,
51
+ loading: n,
51
52
  error: o,
52
- isAvailable: !r && !o && e !== null
53
+ isAvailable: !n && !o && e !== null
53
54
  };
54
55
  }
55
56
  //#endregion
56
57
  //#region src/components/waka-charts/hooks/useChartTheme.ts
57
- var f = {
58
+ var p = {
58
59
  colors: [
59
60
  "hsl(var(--chart-1, 220 70% 50%))",
60
61
  "hsl(var(--chart-2, 160 60% 45%))",
@@ -70,21 +71,21 @@ var f = {
70
71
  tooltipBorder: "hsl(var(--border, 220 13% 91%))",
71
72
  fontFamily: "inherit"
72
73
  };
73
- function p(e, t = "default") {
74
- let n = r(() => ({
75
- colors: e?.colors ?? f.colors,
76
- gridColor: e?.gridColor ?? f.gridColor,
77
- axisColor: e?.axisColor ?? f.axisColor,
78
- textColor: e?.textColor ?? f.textColor,
79
- tooltipBackground: e?.tooltipBackground ?? f.tooltipBackground,
80
- tooltipText: e?.tooltipText ?? f.tooltipText,
81
- tooltipBorder: e?.tooltipBorder ?? f.tooltipBorder,
82
- fontFamily: e?.fontFamily ?? f.fontFamily
74
+ function m(e, t = "default") {
75
+ let n = i(() => ({
76
+ colors: e?.colors ?? p.colors,
77
+ gridColor: e?.gridColor ?? p.gridColor,
78
+ axisColor: e?.axisColor ?? p.axisColor,
79
+ textColor: e?.textColor ?? p.textColor,
80
+ tooltipBackground: e?.tooltipBackground ?? p.tooltipBackground,
81
+ tooltipText: e?.tooltipText ?? p.tooltipText,
82
+ tooltipBorder: e?.tooltipBorder ?? p.tooltipBorder,
83
+ fontFamily: e?.fontFamily ?? p.fontFamily
83
84
  }), [e]);
84
85
  return {
85
86
  theme: n,
86
- getColor: r(() => (e) => n.colors[e % n.colors.length], [n.colors]),
87
- tooltipStyles: r(() => ({
87
+ getColor: i(() => (e) => n.colors[e % n.colors.length], [n.colors]),
88
+ tooltipStyles: i(() => ({
88
89
  contentStyle: {
89
90
  backgroundColor: n.tooltipBackground,
90
91
  color: n.tooltipText,
@@ -105,7 +106,7 @@ function p(e, t = "default") {
105
106
  marginBottom: "4px"
106
107
  }
107
108
  }), [n]),
108
- containerClasses: r(() => {
109
+ containerClasses: i(() => {
109
110
  let e = "relative";
110
111
  switch (t) {
111
112
  case "gradient": return `${e} bg-gradient-to-br from-background to-muted/20`;
@@ -118,7 +119,8 @@ function p(e, t = "default") {
118
119
  }
119
120
  //#endregion
120
121
  //#region src/components/waka-charts/WakaChart.tsx
121
- var m = {
122
+ e();
123
+ var h = {
122
124
  sm: {
123
125
  width: "100%",
124
126
  height: 150
@@ -139,33 +141,33 @@ var m = {
139
141
  width: "100%",
140
142
  height: 300
141
143
  }
142
- }, h = t.forwardRef(({ children: t, variant: n = "default", size: r = "md", height: i, width: a, theme: o, className: s, style: f, title: h, description: _, loading: v, error: y, responsive: b = !0 }, x) => {
143
- let { components: S, loading: C, error: w, isAvailable: T } = d(), { containerClasses: E } = p(o, n), D = v || C, O = y || (w ? "Recharts non disponible. Installez recharts pour utiliser les graphiques." : null), k = m[r], A = a ?? k.width, j = i ?? k.height;
144
- if (D) return /* @__PURE__ */ l("div", {
144
+ }, g = n.forwardRef(({ children: e, variant: n = "default", size: r = "md", height: i, width: a, theme: o, className: s, style: c, title: p, description: g, loading: v, error: y, responsive: b = !0 }, x) => {
145
+ let { components: S, loading: C, error: w, isAvailable: T } = f(), { containerClasses: E } = m(o, n), D = v || C, O = y || (w ? "Recharts non disponible. Installez recharts pour utiliser les graphiques." : null), k = h[r], A = a ?? k.width, j = i ?? k.height;
146
+ if (D) return /* @__PURE__ */ u("div", {
145
147
  ref: x,
146
- className: e(E, s),
147
- style: f,
148
- children: [h && /* @__PURE__ */ c(g, {
149
- title: h,
150
- description: _
151
- }), /* @__PURE__ */ c(u, {
148
+ className: t(E, s),
149
+ style: c,
150
+ children: [p && /* @__PURE__ */ l(_, {
151
+ title: p,
152
+ description: g
153
+ }), /* @__PURE__ */ l(d, {
152
154
  className: "w-full",
153
155
  style: { height: j }
154
156
  })]
155
157
  });
156
- if (O || !T) return /* @__PURE__ */ l("div", {
158
+ if (O || !T) return /* @__PURE__ */ u("div", {
157
159
  ref: x,
158
- className: e(E, s),
159
- style: f,
160
- children: [h && /* @__PURE__ */ c(g, {
161
- title: h,
162
- description: _
163
- }), /* @__PURE__ */ c("div", {
160
+ className: t(E, s),
161
+ style: c,
162
+ children: [p && /* @__PURE__ */ l(_, {
163
+ title: p,
164
+ description: g
165
+ }), /* @__PURE__ */ l("div", {
164
166
  className: "flex items-center justify-center text-muted-foreground text-sm border border-dashed border-border rounded-lg",
165
167
  style: { height: j },
166
- children: /* @__PURE__ */ l("div", {
168
+ children: /* @__PURE__ */ u("div", {
167
169
  className: "text-center p-4",
168
- children: [/* @__PURE__ */ c("p", { children: O || "Graphique non disponible" }), /* @__PURE__ */ c("p", {
170
+ children: [/* @__PURE__ */ l("p", { children: O || "Graphique non disponible" }), /* @__PURE__ */ l("p", {
169
171
  className: "text-xs mt-1",
170
172
  children: "Installez recharts: pnpm add recharts"
171
173
  })]
@@ -173,34 +175,34 @@ var m = {
173
175
  })]
174
176
  });
175
177
  let { ResponsiveContainer: M } = S;
176
- return /* @__PURE__ */ l("div", {
178
+ return /* @__PURE__ */ u("div", {
177
179
  ref: x,
178
- className: e(E, s),
179
- style: f,
180
- children: [h && /* @__PURE__ */ c(g, {
181
- title: h,
182
- description: _
183
- }), b ? /* @__PURE__ */ c(M, {
180
+ className: t(E, s),
181
+ style: c,
182
+ children: [p && /* @__PURE__ */ l(_, {
183
+ title: p,
184
+ description: g
185
+ }), b ? /* @__PURE__ */ l(M, {
184
186
  width: A,
185
187
  height: j,
186
- children: t(S)
187
- }) : /* @__PURE__ */ c("div", {
188
+ children: e(S)
189
+ }) : /* @__PURE__ */ l("div", {
188
190
  style: {
189
191
  width: A,
190
192
  height: j
191
193
  },
192
- children: t(S)
194
+ children: e(S)
193
195
  })]
194
196
  });
195
197
  });
196
- h.displayName = "WakaChart";
197
- function g({ title: e, description: t }) {
198
- return /* @__PURE__ */ l("div", {
198
+ g.displayName = "WakaChart";
199
+ function _({ title: e, description: t }) {
200
+ return /* @__PURE__ */ u("div", {
199
201
  className: "mb-4",
200
- children: [/* @__PURE__ */ c("h3", {
202
+ children: [/* @__PURE__ */ l("h3", {
201
203
  className: "text-lg font-semibold",
202
204
  children: e
203
- }), t && /* @__PURE__ */ c("p", {
205
+ }), t && /* @__PURE__ */ l("p", {
204
206
  className: "text-sm text-muted-foreground",
205
207
  children: t
206
208
  })]
@@ -208,10 +210,10 @@ function g({ title: e, description: t }) {
208
210
  }
209
211
  //#endregion
210
212
  //#region src/components/waka-charts/WakaBarChart.tsx
211
- var _ = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default", size: a = "md", height: o, width: s, animation: u = !0, animationDuration: d = 500, grid: f = !0, tooltip: m = !0, legend: g, axis: _, theme: v, className: y, style: b, title: x, description: S, loading: C, error: w, onClick: T, responsive: E = !0, layout: D = "vertical", stacked: O = !1, radius: k = 4, barSize: A, barGap: j = 4, barCategoryGap: M = "20%" }, N) => {
212
- let { theme: P, getColor: F, tooltipStyles: I } = p(v, i), L = t.useMemo(() => {
213
+ var v = n.forwardRef(({ data: e, dataKeys: t, series: r, variant: i = "default", size: a = "md", height: o, width: s, animation: c = !0, animationDuration: d = 500, grid: f = !0, tooltip: p = !0, legend: h, axis: _, theme: v, className: y, style: b, title: x, description: S, loading: C, error: w, onClick: T, responsive: E = !0, layout: D = "vertical", stacked: O = !1, radius: k = 4, barSize: A, barGap: j = 4, barCategoryGap: M = "20%" }, N) => {
214
+ let { theme: P, getColor: F, tooltipStyles: I } = m(v, i), L = n.useMemo(() => {
213
215
  if (r && r.length > 0) return r;
214
- if (n && n.length > 0) return n.map((e, t) => ({
216
+ if (t && t.length > 0) return t.map((e, t) => ({
215
217
  dataKey: e,
216
218
  label: e,
217
219
  color: F(t)
@@ -221,23 +223,23 @@ var _ = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
221
223
  label: "Value",
222
224
  color: F(0)
223
225
  }];
224
- let t = e[0];
225
- return t ? Object.keys(t).filter((e) => e !== "name" && typeof t[e] == "number").map((e, t) => ({
226
+ let n = e[0];
227
+ return n ? Object.keys(n).filter((e) => e !== "name" && typeof n[e] == "number").map((e, t) => ({
226
228
  dataKey: e,
227
229
  label: e,
228
230
  color: F(t)
229
231
  })) : [];
230
232
  }, [
231
233
  r,
232
- n,
234
+ t,
233
235
  e,
234
236
  F
235
- ]), R = t.useMemo(() => g ? typeof g == "boolean" ? {
236
- enabled: g,
237
+ ]), R = n.useMemo(() => h ? typeof h == "boolean" ? {
238
+ enabled: h,
237
239
  position: "bottom",
238
240
  align: "center"
239
- } : g : null, [g]), z = t.useMemo(() => m ? typeof m == "boolean" ? { enabled: m } : m : null, [m]);
240
- return /* @__PURE__ */ c(h, {
241
+ } : h : null, [h]), z = n.useMemo(() => p ? typeof p == "boolean" ? { enabled: p } : p : null, [p]);
242
+ return /* @__PURE__ */ l(g, {
241
243
  ref: N,
242
244
  variant: i,
243
245
  size: a,
@@ -253,20 +255,20 @@ var _ = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
253
255
  responsive: E,
254
256
  children: (t) => {
255
257
  if (!t) return null;
256
- let { BarChart: n, Bar: r, XAxis: i, YAxis: a, CartesianGrid: o, Tooltip: s, Legend: p } = t;
257
- return /* @__PURE__ */ l(n, {
258
+ let { BarChart: n, Bar: r, XAxis: i, YAxis: a, CartesianGrid: o, Tooltip: s, Legend: m } = t;
259
+ return /* @__PURE__ */ u(n, {
258
260
  data: e,
259
261
  layout: D === "horizontal" ? "vertical" : "horizontal",
260
262
  barGap: j,
261
263
  barCategoryGap: M,
262
264
  children: [
263
- f && /* @__PURE__ */ c(o, {
265
+ f && /* @__PURE__ */ l(o, {
264
266
  strokeDasharray: "3 3",
265
267
  stroke: P.gridColor,
266
268
  horizontal: !0,
267
269
  vertical: !1
268
270
  }),
269
- _?.showXAxis !== !1 && /* @__PURE__ */ c(i, {
271
+ _?.showXAxis !== !1 && /* @__PURE__ */ l(i, {
270
272
  dataKey: "name",
271
273
  axisLine: { stroke: P.axisColor },
272
274
  tickLine: { stroke: P.axisColor },
@@ -276,7 +278,7 @@ var _ = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
276
278
  },
277
279
  tickFormatter: _?.xAxisFormatter
278
280
  }),
279
- _?.showYAxis !== !1 && /* @__PURE__ */ c(a, {
281
+ _?.showYAxis !== !1 && /* @__PURE__ */ l(a, {
280
282
  axisLine: { stroke: P.axisColor },
281
283
  tickLine: { stroke: P.axisColor },
282
284
  tick: {
@@ -287,16 +289,16 @@ var _ = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
287
289
  domain: _?.yAxisDomain,
288
290
  unit: _?.yAxisUnit
289
291
  }),
290
- z?.enabled !== !1 && m && /* @__PURE__ */ c(s, {
292
+ z?.enabled !== !1 && p && /* @__PURE__ */ l(s, {
291
293
  ...I,
292
294
  formatter: z && typeof z != "boolean" && z.formatter ? (t, n) => z.formatter(t, n, e[0]) : (e) => `${z && typeof z != "boolean" && z.valuePrefix || ""}${e}${z && typeof z != "boolean" && z.valueSuffix || ""}`
293
295
  }),
294
- R?.enabled && /* @__PURE__ */ c(p, {
296
+ R?.enabled && /* @__PURE__ */ l(m, {
295
297
  align: R.align,
296
298
  verticalAlign: R.position === "top" ? "top" : "bottom",
297
299
  wrapperStyle: { paddingTop: R.position === "bottom" ? 16 : 0 }
298
300
  }),
299
- L.map((e, t) => /* @__PURE__ */ c(r, {
301
+ L.map((e, t) => /* @__PURE__ */ l(r, {
300
302
  dataKey: e.dataKey,
301
303
  name: e.label,
302
304
  fill: e.color || F(t),
@@ -304,20 +306,20 @@ var _ = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
304
306
  stackId: O ? "stack" : void 0,
305
307
  barSize: A,
306
308
  animationDuration: d,
307
- isAnimationActive: u
309
+ isAnimationActive: c
308
310
  }, e.dataKey))
309
311
  ]
310
312
  });
311
313
  }
312
314
  });
313
315
  });
314
- _.displayName = "WakaBarChart";
316
+ v.displayName = "WakaBarChart";
315
317
  //#endregion
316
318
  //#region src/components/waka-charts/WakaLineChart.tsx
317
- var v = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default", size: a = "md", height: o, width: s, animation: u = !0, animationDuration: d = 500, grid: f = !0, tooltip: m = !0, legend: g, axis: _, theme: v, className: y, style: b, title: x, description: S, loading: C, error: w, onClick: T, responsive: E = !0, curve: D = "monotone", dots: O = !0, dotSize: k = 4, activeDot: A = !0, strokeWidth: j = 2 }, M) => {
318
- let { theme: N, getColor: P, tooltipStyles: F } = p(v, i), I = t.useMemo(() => {
319
+ var y = n.forwardRef(({ data: e, dataKeys: t, series: r, variant: i = "default", size: a = "md", height: o, width: s, animation: c = !0, animationDuration: d = 500, grid: f = !0, tooltip: p = !0, legend: h, axis: _, theme: v, className: y, style: b, title: x, description: S, loading: C, error: w, onClick: T, responsive: E = !0, curve: D = "monotone", dots: O = !0, dotSize: k = 4, activeDot: A = !0, strokeWidth: j = 2 }, M) => {
320
+ let { theme: N, getColor: P, tooltipStyles: F } = m(v, i), I = n.useMemo(() => {
319
321
  if (r && r.length > 0) return r;
320
- if (n && n.length > 0) return n.map((e, t) => ({
322
+ if (t && t.length > 0) return t.map((e, t) => ({
321
323
  dataKey: e,
322
324
  label: e,
323
325
  color: P(t),
@@ -329,8 +331,8 @@ var v = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
329
331
  color: P(0),
330
332
  strokeWidth: j
331
333
  }];
332
- let t = e[0];
333
- return t ? Object.keys(t).filter((e) => e !== "name" && typeof t[e] == "number").map((e, t) => ({
334
+ let n = e[0];
335
+ return n ? Object.keys(n).filter((e) => e !== "name" && typeof n[e] == "number").map((e, t) => ({
334
336
  dataKey: e,
335
337
  label: e,
336
338
  color: P(t),
@@ -338,16 +340,16 @@ var v = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
338
340
  })) : [];
339
341
  }, [
340
342
  r,
341
- n,
343
+ t,
342
344
  e,
343
345
  P,
344
346
  j
345
- ]), L = t.useMemo(() => g ? typeof g == "boolean" ? {
346
- enabled: g,
347
+ ]), L = n.useMemo(() => h ? typeof h == "boolean" ? {
348
+ enabled: h,
347
349
  position: "bottom",
348
350
  align: "center"
349
- } : g : null, [g]), R = t.useMemo(() => m ? typeof m == "boolean" ? { enabled: m } : m : null, [m]);
350
- return /* @__PURE__ */ c(h, {
351
+ } : h : null, [h]), R = n.useMemo(() => p ? typeof p == "boolean" ? { enabled: p } : p : null, [p]);
352
+ return /* @__PURE__ */ l(g, {
351
353
  ref: M,
352
354
  variant: i,
353
355
  size: a,
@@ -363,17 +365,17 @@ var v = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
363
365
  responsive: E,
364
366
  children: (t) => {
365
367
  if (!t) return null;
366
- let { LineChart: n, Line: r, XAxis: i, YAxis: a, CartesianGrid: o, Tooltip: s, Legend: p } = t;
367
- return /* @__PURE__ */ l(n, {
368
+ let { LineChart: n, Line: r, XAxis: i, YAxis: a, CartesianGrid: o, Tooltip: s, Legend: m } = t;
369
+ return /* @__PURE__ */ u(n, {
368
370
  data: e,
369
371
  children: [
370
- f && /* @__PURE__ */ c(o, {
372
+ f && /* @__PURE__ */ l(o, {
371
373
  strokeDasharray: "3 3",
372
374
  stroke: N.gridColor,
373
375
  horizontal: !0,
374
376
  vertical: !1
375
377
  }),
376
- _?.showXAxis !== !1 && /* @__PURE__ */ c(i, {
378
+ _?.showXAxis !== !1 && /* @__PURE__ */ l(i, {
377
379
  dataKey: "name",
378
380
  axisLine: { stroke: N.axisColor },
379
381
  tickLine: { stroke: N.axisColor },
@@ -383,7 +385,7 @@ var v = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
383
385
  },
384
386
  tickFormatter: _?.xAxisFormatter
385
387
  }),
386
- _?.showYAxis !== !1 && /* @__PURE__ */ c(a, {
388
+ _?.showYAxis !== !1 && /* @__PURE__ */ l(a, {
387
389
  axisLine: { stroke: N.axisColor },
388
390
  tickLine: { stroke: N.axisColor },
389
391
  tick: {
@@ -394,16 +396,16 @@ var v = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
394
396
  domain: _?.yAxisDomain,
395
397
  unit: _?.yAxisUnit
396
398
  }),
397
- R?.enabled !== !1 && m && /* @__PURE__ */ c(s, {
399
+ R?.enabled !== !1 && p && /* @__PURE__ */ l(s, {
398
400
  ...F,
399
401
  formatter: R && typeof R != "boolean" && R.formatter ? (t, n) => R.formatter(t, n, e[0]) : (e) => `${R && typeof R != "boolean" && R.valuePrefix || ""}${e}${R && typeof R != "boolean" && R.valueSuffix || ""}`
400
402
  }),
401
- L?.enabled && /* @__PURE__ */ c(p, {
403
+ L?.enabled && /* @__PURE__ */ l(m, {
402
404
  align: L.align,
403
405
  verticalAlign: L.position === "top" ? "top" : "bottom",
404
406
  wrapperStyle: { paddingTop: L.position === "bottom" ? 16 : 0 }
405
407
  }),
406
- I.map((e, t) => /* @__PURE__ */ c(r, {
408
+ I.map((e, t) => /* @__PURE__ */ l(r, {
407
409
  dataKey: e.dataKey,
408
410
  name: e.label,
409
411
  stroke: e.color || P(t),
@@ -416,20 +418,20 @@ var v = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
416
418
  } : !1,
417
419
  activeDot: A ? { r: k + 2 } : !1,
418
420
  animationDuration: d,
419
- isAnimationActive: u
421
+ isAnimationActive: c
420
422
  }, e.dataKey))
421
423
  ]
422
424
  });
423
425
  }
424
426
  });
425
427
  });
426
- v.displayName = "WakaLineChart";
428
+ y.displayName = "WakaLineChart";
427
429
  //#endregion
428
430
  //#region src/components/waka-charts/WakaAreaChart.tsx
429
- var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default", size: a = "md", height: o, width: s, animation: u = !0, animationDuration: d = 500, grid: f = !0, tooltip: m = !0, legend: g, axis: _, theme: v, className: y, style: b, title: x, description: S, loading: C, error: w, onClick: T, responsive: E = !0, curve: D = "monotone", dots: O = !1, dotSize: k = 4, activeDot: A = !0, strokeWidth: j = 2, stacked: M = !1, fillOpacity: N = .3, gradientDirection: P = "vertical" }, F) => {
430
- let { theme: I, getColor: L, tooltipStyles: R } = p(v, i), z = t.useMemo(() => {
431
+ var b = n.forwardRef(({ data: e, dataKeys: t, series: r, variant: i = "default", size: a = "md", height: o, width: s, animation: c = !0, animationDuration: d = 500, grid: f = !0, tooltip: p = !0, legend: h, axis: _, theme: v, className: y, style: b, title: x, description: S, loading: C, error: w, onClick: T, responsive: E = !0, curve: D = "monotone", dots: O = !1, dotSize: k = 4, activeDot: A = !0, strokeWidth: j = 2, stacked: M = !1, fillOpacity: N = .3, gradientDirection: P = "vertical" }, F) => {
432
+ let { theme: I, getColor: L, tooltipStyles: R } = m(v, i), z = n.useMemo(() => {
431
433
  if (r && r.length > 0) return r;
432
- if (n && n.length > 0) return n.map((e, t) => ({
434
+ if (t && t.length > 0) return t.map((e, t) => ({
433
435
  dataKey: e,
434
436
  label: e,
435
437
  color: L(t),
@@ -443,8 +445,8 @@ var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
443
445
  strokeWidth: j,
444
446
  fillOpacity: N
445
447
  }];
446
- let t = e[0];
447
- return t ? Object.keys(t).filter((e) => e !== "name" && typeof t[e] == "number").map((e, t) => ({
448
+ let n = e[0];
449
+ return n ? Object.keys(n).filter((e) => e !== "name" && typeof n[e] == "number").map((e, t) => ({
448
450
  dataKey: e,
449
451
  label: e,
450
452
  color: L(t),
@@ -453,17 +455,17 @@ var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
453
455
  })) : [];
454
456
  }, [
455
457
  r,
456
- n,
458
+ t,
457
459
  e,
458
460
  L,
459
461
  j,
460
462
  N
461
- ]), B = t.useMemo(() => g ? typeof g == "boolean" ? {
462
- enabled: g,
463
+ ]), B = n.useMemo(() => h ? typeof h == "boolean" ? {
464
+ enabled: h,
463
465
  position: "bottom",
464
466
  align: "center"
465
- } : g : null, [g]), V = t.useMemo(() => m ? typeof m == "boolean" ? { enabled: m } : m : null, [m]);
466
- return /* @__PURE__ */ c(h, {
467
+ } : h : null, [h]), V = n.useMemo(() => p ? typeof p == "boolean" ? { enabled: p } : p : null, [p]);
468
+ return /* @__PURE__ */ l(g, {
467
469
  ref: F,
468
470
  variant: i,
469
471
  size: a,
@@ -479,36 +481,36 @@ var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
479
481
  responsive: E,
480
482
  children: (t) => {
481
483
  if (!t) return null;
482
- let { AreaChart: n, Area: r, XAxis: i, YAxis: a, CartesianGrid: o, Tooltip: s, Legend: p } = t;
483
- return /* @__PURE__ */ l(n, {
484
+ let { AreaChart: n, Area: r, XAxis: i, YAxis: a, CartesianGrid: o, Tooltip: s, Legend: m } = t;
485
+ return /* @__PURE__ */ u(n, {
484
486
  data: e,
485
487
  children: [
486
- /* @__PURE__ */ c("defs", { children: z.map((e, t) => {
488
+ /* @__PURE__ */ l("defs", { children: z.map((e, t) => {
487
489
  let n = e.color || L(t), r = `gradient-${e.dataKey}-${t}`;
488
- return /* @__PURE__ */ l("linearGradient", {
490
+ return /* @__PURE__ */ u("linearGradient", {
489
491
  id: r,
490
492
  x1: "0",
491
493
  y1: "0",
492
494
  x2: P === "horizontal" ? "1" : "0",
493
495
  y2: P === "horizontal" ? "0" : "1",
494
- children: [/* @__PURE__ */ c("stop", {
496
+ children: [/* @__PURE__ */ l("stop", {
495
497
  offset: "5%",
496
498
  stopColor: n,
497
499
  stopOpacity: .8
498
- }), /* @__PURE__ */ c("stop", {
500
+ }), /* @__PURE__ */ l("stop", {
499
501
  offset: "95%",
500
502
  stopColor: n,
501
503
  stopOpacity: .1
502
504
  })]
503
505
  }, r);
504
506
  }) }),
505
- f && /* @__PURE__ */ c(o, {
507
+ f && /* @__PURE__ */ l(o, {
506
508
  strokeDasharray: "3 3",
507
509
  stroke: I.gridColor,
508
510
  horizontal: !0,
509
511
  vertical: !1
510
512
  }),
511
- _?.showXAxis !== !1 && /* @__PURE__ */ c(i, {
513
+ _?.showXAxis !== !1 && /* @__PURE__ */ l(i, {
512
514
  dataKey: "name",
513
515
  axisLine: { stroke: I.axisColor },
514
516
  tickLine: { stroke: I.axisColor },
@@ -518,7 +520,7 @@ var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
518
520
  },
519
521
  tickFormatter: _?.xAxisFormatter
520
522
  }),
521
- _?.showYAxis !== !1 && /* @__PURE__ */ c(a, {
523
+ _?.showYAxis !== !1 && /* @__PURE__ */ l(a, {
522
524
  axisLine: { stroke: I.axisColor },
523
525
  tickLine: { stroke: I.axisColor },
524
526
  tick: {
@@ -529,18 +531,18 @@ var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
529
531
  domain: _?.yAxisDomain,
530
532
  unit: _?.yAxisUnit
531
533
  }),
532
- V?.enabled !== !1 && m && /* @__PURE__ */ c(s, {
534
+ V?.enabled !== !1 && p && /* @__PURE__ */ l(s, {
533
535
  ...R,
534
536
  formatter: V && typeof V != "boolean" && V.formatter ? (t, n) => V.formatter(t, n, e[0]) : (e) => `${V && typeof V != "boolean" && V.valuePrefix || ""}${e}${V && typeof V != "boolean" && V.valueSuffix || ""}`
535
537
  }),
536
- B?.enabled && /* @__PURE__ */ c(p, {
538
+ B?.enabled && /* @__PURE__ */ l(m, {
537
539
  align: B.align,
538
540
  verticalAlign: B.position === "top" ? "top" : "bottom",
539
541
  wrapperStyle: { paddingTop: B.position === "bottom" ? 16 : 0 }
540
542
  }),
541
543
  z.map((e, t) => {
542
544
  let n = e.color || L(t), i = `gradient-${e.dataKey}-${t}`;
543
- return /* @__PURE__ */ c(r, {
545
+ return /* @__PURE__ */ l(r, {
544
546
  dataKey: e.dataKey,
545
547
  name: e.label,
546
548
  stroke: n,
@@ -554,7 +556,7 @@ var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
554
556
  } : !1,
555
557
  stackId: M ? "stack" : void 0,
556
558
  animationDuration: d,
557
- isAnimationActive: u
559
+ isAnimationActive: c
558
560
  }, e.dataKey);
559
561
  })
560
562
  ]
@@ -562,18 +564,18 @@ var y = t.forwardRef(({ data: e, dataKeys: n, series: r, variant: i = "default",
562
564
  }
563
565
  });
564
566
  });
565
- y.displayName = "WakaAreaChart";
567
+ b.displayName = "WakaAreaChart";
566
568
  //#endregion
567
569
  //#region src/components/waka-charts/WakaPieChart.tsx
568
- var b = t.forwardRef(({ data: e, variant: n = "default", size: r = "md", height: i, width: a, animation: o = !0, animationDuration: s = 500, tooltip: u = !0, legend: d = !0, theme: f, className: m, style: g, title: _, description: v, loading: y, error: b, onClick: x, responsive: S = !0, dataKey: C = "value", nameKey: w = "name", innerRadius: T = 0, outerRadius: E = "80%", startAngle: D = 90, endAngle: O = -270, paddingAngle: k = 2, label: A = !1, labelPosition: j = "outside" }, M) => {
569
- let { theme: N, getColor: P, tooltipStyles: F } = p(f, n), I = t.useMemo(() => d ? typeof d == "boolean" ? {
570
+ var x = n.forwardRef(({ data: e, variant: t = "default", size: r = "md", height: i, width: a, animation: o = !0, animationDuration: s = 500, tooltip: c = !0, legend: d = !0, theme: f, className: p, style: h, title: _, description: v, loading: y, error: b, onClick: x, responsive: S = !0, dataKey: C = "value", nameKey: w = "name", innerRadius: T = 0, outerRadius: E = "80%", startAngle: D = 90, endAngle: O = -270, paddingAngle: k = 2, label: A = !1, labelPosition: j = "outside" }, M) => {
571
+ let { theme: N, getColor: P, tooltipStyles: F } = m(f, t), I = n.useMemo(() => d ? typeof d == "boolean" ? {
570
572
  enabled: d,
571
573
  position: "bottom",
572
574
  align: "center"
573
- } : d : null, [d]), L = t.useMemo(() => u ? typeof u == "boolean" ? { enabled: u } : u : null, [u]), R = t.useCallback((e) => {
575
+ } : d : null, [d]), L = n.useMemo(() => c ? typeof c == "boolean" ? { enabled: c } : c : null, [c]), R = n.useCallback((e) => {
574
576
  if (!A) return null;
575
577
  let t = Math.PI / 180, n = j === "inside" ? e.innerRadius + (e.outerRadius - e.innerRadius) * .5 : e.outerRadius * 1.1, r = e.cx + n * Math.cos(-e.midAngle * t), i = e.cy + n * Math.sin(-e.midAngle * t), a = "";
576
- return a = A === "percent" ? `${(e.percent * 100).toFixed(0)}%` : A === "value" ? String(e.value) : A === "name" ? e.name : `${(e.percent * 100).toFixed(0)}%`, /* @__PURE__ */ c("text", {
578
+ return a = A === "percent" ? `${(e.percent * 100).toFixed(0)}%` : A === "value" ? String(e.value) : A === "name" ? e.name : `${(e.percent * 100).toFixed(0)}%`, /* @__PURE__ */ l("text", {
577
579
  x: r,
578
580
  y: i,
579
581
  fill: j === "inside" ? "#fff" : N.textColor,
@@ -587,15 +589,15 @@ var b = t.forwardRef(({ data: e, variant: n = "default", size: r = "md", height:
587
589
  j,
588
590
  N.textColor
589
591
  ]);
590
- return /* @__PURE__ */ c(h, {
592
+ return /* @__PURE__ */ l(g, {
591
593
  ref: M,
592
- variant: n,
594
+ variant: t,
593
595
  size: r,
594
596
  height: i,
595
597
  width: a,
596
598
  theme: f,
597
- className: m,
598
- style: g,
599
+ className: p,
600
+ style: h,
599
601
  title: _,
600
602
  description: v,
601
603
  loading: y,
@@ -604,18 +606,18 @@ var b = t.forwardRef(({ data: e, variant: n = "default", size: r = "md", height:
604
606
  children: (t) => {
605
607
  if (!t) return null;
606
608
  let { PieChart: n, Pie: r, Cell: i, Tooltip: a, Legend: d } = t;
607
- return /* @__PURE__ */ l(n, { children: [
608
- L?.enabled !== !1 && u && /* @__PURE__ */ c(a, {
609
+ return /* @__PURE__ */ u(n, { children: [
610
+ L?.enabled !== !1 && c && /* @__PURE__ */ l(a, {
609
611
  ...F,
610
612
  formatter: L && typeof L != "boolean" && L.formatter ? (t, n) => L.formatter(t, n, e[0]) : (e) => `${L && typeof L != "boolean" && L.valuePrefix || ""}${e}${L && typeof L != "boolean" && L.valueSuffix || ""}`
611
613
  }),
612
- I?.enabled && /* @__PURE__ */ c(d, {
614
+ I?.enabled && /* @__PURE__ */ l(d, {
613
615
  align: I.align,
614
616
  verticalAlign: I.position === "top" ? "top" : "bottom",
615
617
  layout: I.position === "left" || I.position === "right" ? "vertical" : "horizontal",
616
618
  wrapperStyle: { paddingTop: I.position === "bottom" ? 16 : 0 }
617
619
  }),
618
- /* @__PURE__ */ c(r, {
620
+ /* @__PURE__ */ l(r, {
619
621
  data: e,
620
622
  dataKey: C,
621
623
  nameKey: w,
@@ -630,7 +632,7 @@ var b = t.forwardRef(({ data: e, variant: n = "default", size: r = "md", height:
630
632
  isAnimationActive: o,
631
633
  label: A ? R : !1,
632
634
  labelLine: A && j === "outside",
633
- children: e.map((e, t) => /* @__PURE__ */ c(i, {
635
+ children: e.map((e, t) => /* @__PURE__ */ l(i, {
634
636
  fill: P(t),
635
637
  stroke: "transparent"
636
638
  }, `cell-${t}`))
@@ -639,25 +641,25 @@ var b = t.forwardRef(({ data: e, variant: n = "default", size: r = "md", height:
639
641
  }
640
642
  });
641
643
  });
642
- b.displayName = "WakaPieChart";
643
644
  //#endregion
644
645
  //#region src/components/waka-charts/WakaSparkline.tsx
645
- var x = t.forwardRef(({ data: n, type: r = "line", width: i = 100, height: a = 30, color: o = "hsl(var(--chart-1))", fillColor: s, fillOpacity: u = .3, showMinMax: f = !1, showValue: p = !1, className: m, animation: h = !0 }, g) => {
646
- let { components: _, loading: v, isAvailable: y } = d(), b = t.useMemo(() => n.map((e, t) => ({
646
+ x.displayName = "WakaPieChart", e();
647
+ var S = n.forwardRef(({ data: e, type: r = "line", width: i = 100, height: a = 30, color: o = "hsl(var(--chart-1))", fillColor: s, fillOpacity: c = .3, showMinMax: d = !1, showValue: p = !1, className: m, animation: h = !0 }, g) => {
648
+ let { components: _, loading: v, isAvailable: y } = f(), b = n.useMemo(() => e.map((e, t) => ({
647
649
  index: t,
648
650
  value: e
649
- })), [n]), { min: x, max: C, current: w } = t.useMemo(() => {
650
- let e = n.filter((e) => typeof e == "number" && !isNaN(e));
651
+ })), [e]), { min: x, max: S, current: w } = n.useMemo(() => {
652
+ let t = e.filter((e) => typeof e == "number" && !isNaN(e));
651
653
  return {
652
- min: Math.min(...e),
653
- max: Math.max(...e),
654
- current: e[e.length - 1]
654
+ min: Math.min(...t),
655
+ max: Math.max(...t),
656
+ current: t[t.length - 1]
655
657
  };
656
- }, [n]);
657
- if (v) return /* @__PURE__ */ c("div", {
658
+ }, [e]);
659
+ if (v) return /* @__PURE__ */ l("div", {
658
660
  ref: g,
659
- className: e("inline-flex items-center gap-2", m),
660
- children: /* @__PURE__ */ c("div", {
661
+ className: t("inline-flex items-center gap-2", m),
662
+ children: /* @__PURE__ */ l("div", {
661
663
  className: "bg-muted animate-pulse rounded",
662
664
  style: {
663
665
  width: i,
@@ -665,73 +667,73 @@ var x = t.forwardRef(({ data: n, type: r = "line", width: i = 100, height: a = 3
665
667
  }
666
668
  })
667
669
  });
668
- if (!y || !_) return /* @__PURE__ */ l("div", {
670
+ if (!y || !_) return /* @__PURE__ */ u("div", {
669
671
  ref: g,
670
- className: e("inline-flex items-center gap-2", m),
671
- children: [/* @__PURE__ */ c(S, {
672
- data: n,
672
+ className: t("inline-flex items-center gap-2", m),
673
+ children: [/* @__PURE__ */ l(C, {
674
+ data: e,
673
675
  width: i,
674
676
  height: a,
675
677
  color: o,
676
678
  type: r,
677
679
  fillColor: s,
678
- fillOpacity: u
679
- }), p && /* @__PURE__ */ c("span", {
680
+ fillOpacity: c
681
+ }), p && /* @__PURE__ */ l("span", {
680
682
  className: "text-sm font-medium",
681
683
  children: w
682
684
  })]
683
685
  });
684
686
  let { ResponsiveContainer: T, LineChart: E, BarChart: D, AreaChart: O, Line: k, Bar: A, Area: j } = _;
685
- return /* @__PURE__ */ l("div", {
687
+ return /* @__PURE__ */ u("div", {
686
688
  ref: g,
687
- className: e("inline-flex items-center gap-2", m),
689
+ className: t("inline-flex items-center gap-2", m),
688
690
  children: [
689
- /* @__PURE__ */ c("div", {
691
+ /* @__PURE__ */ l("div", {
690
692
  style: {
691
693
  width: i,
692
694
  height: a
693
695
  },
694
- children: /* @__PURE__ */ c(T, {
696
+ children: /* @__PURE__ */ l(T, {
695
697
  width: "100%",
696
698
  height: "100%",
697
- children: r === "bar" ? /* @__PURE__ */ c(D, {
699
+ children: r === "bar" ? /* @__PURE__ */ l(D, {
698
700
  data: b,
699
- children: /* @__PURE__ */ c(A, {
701
+ children: /* @__PURE__ */ l(A, {
700
702
  dataKey: "value",
701
703
  fill: o,
702
704
  radius: 1,
703
705
  isAnimationActive: h
704
706
  })
705
- }) : r === "area" ? /* @__PURE__ */ l(O, {
707
+ }) : r === "area" ? /* @__PURE__ */ u(O, {
706
708
  data: b,
707
- children: [/* @__PURE__ */ c("defs", { children: /* @__PURE__ */ l("linearGradient", {
709
+ children: [/* @__PURE__ */ l("defs", { children: /* @__PURE__ */ u("linearGradient", {
708
710
  id: `sparkline-gradient-${o.replace(/[^a-z0-9]/gi, "")}`,
709
711
  x1: "0",
710
712
  y1: "0",
711
713
  x2: "0",
712
714
  y2: "1",
713
- children: [/* @__PURE__ */ c("stop", {
715
+ children: [/* @__PURE__ */ l("stop", {
714
716
  offset: "5%",
715
717
  stopColor: s || o,
716
718
  stopOpacity: .8
717
- }), /* @__PURE__ */ c("stop", {
719
+ }), /* @__PURE__ */ l("stop", {
718
720
  offset: "95%",
719
721
  stopColor: s || o,
720
722
  stopOpacity: .1
721
723
  })]
722
- }) }), /* @__PURE__ */ c(j, {
724
+ }) }), /* @__PURE__ */ l(j, {
723
725
  type: "monotone",
724
726
  dataKey: "value",
725
727
  stroke: o,
726
728
  fill: `url(#sparkline-gradient-${o.replace(/[^a-z0-9]/gi, "")})`,
727
- fillOpacity: u,
729
+ fillOpacity: c,
728
730
  strokeWidth: 1.5,
729
731
  dot: !1,
730
732
  isAnimationActive: h
731
733
  })]
732
- }) : /* @__PURE__ */ c(E, {
734
+ }) : /* @__PURE__ */ l(E, {
733
735
  data: b,
734
- children: /* @__PURE__ */ c(k, {
736
+ children: /* @__PURE__ */ l(k, {
735
737
  type: "monotone",
736
738
  dataKey: "value",
737
739
  stroke: o,
@@ -742,34 +744,34 @@ var x = t.forwardRef(({ data: n, type: r = "line", width: i = 100, height: a = 3
742
744
  })
743
745
  })
744
746
  }),
745
- f && /* @__PURE__ */ l("div", {
747
+ d && /* @__PURE__ */ u("div", {
746
748
  className: "flex flex-col text-xs text-muted-foreground",
747
- children: [/* @__PURE__ */ l("span", { children: ["↑ ", C] }), /* @__PURE__ */ l("span", { children: ["↓ ", x] })]
749
+ children: [/* @__PURE__ */ u("span", { children: ["↑ ", S] }), /* @__PURE__ */ u("span", { children: ["↓ ", x] })]
748
750
  }),
749
- p && /* @__PURE__ */ c("span", {
751
+ p && /* @__PURE__ */ l("span", {
750
752
  className: "text-sm font-medium",
751
753
  children: w
752
754
  })
753
755
  ]
754
756
  });
755
757
  });
756
- x.displayName = "WakaSparkline";
757
- function S({ data: e, width: t, height: n, color: r, type: i, fillColor: a, fillOpacity: o }) {
758
- let s = t - 4, u = n - 4, d = Math.min(...e), f = Math.max(...e) - d || 1, p = e.map((t, n) => ({
758
+ S.displayName = "WakaSparkline";
759
+ function C({ data: e, width: t, height: n, color: r, type: i, fillColor: a, fillOpacity: o }) {
760
+ let s = t - 4, c = n - 4, d = Math.min(...e), f = Math.max(...e) - d || 1, p = e.map((t, n) => ({
759
761
  x: 2 + n / (e.length - 1 || 1) * s,
760
- y: 2 + u - (t - d) / f * u,
762
+ y: 2 + c - (t - d) / f * c,
761
763
  value: t
762
764
  }));
763
765
  if (i === "bar") {
764
766
  let i = s / e.length - 1;
765
- return /* @__PURE__ */ c("svg", {
767
+ return /* @__PURE__ */ l("svg", {
766
768
  width: t,
767
769
  height: n,
768
770
  children: e.map((e, t) => {
769
- let n = (e - d) / f * u;
770
- return /* @__PURE__ */ c("rect", {
771
+ let n = (e - d) / f * c;
772
+ return /* @__PURE__ */ l("rect", {
771
773
  x: 2 + t * (i + 1),
772
- y: 2 + u - n,
774
+ y: 2 + c - n,
773
775
  width: i,
774
776
  height: n,
775
777
  fill: r,
@@ -779,23 +781,23 @@ function S({ data: e, width: t, height: n, color: r, type: i, fillColor: a, fill
779
781
  });
780
782
  }
781
783
  let m = p.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x} ${e.y}`).join(" ");
782
- return i === "area" ? /* @__PURE__ */ l("svg", {
784
+ return i === "area" ? /* @__PURE__ */ u("svg", {
783
785
  width: t,
784
786
  height: n,
785
- children: [/* @__PURE__ */ c("path", {
787
+ children: [/* @__PURE__ */ l("path", {
786
788
  d: `${m} L ${p[p.length - 1].x} ${n - 2} L 2 ${n - 2} Z`,
787
789
  fill: a || r,
788
790
  fillOpacity: o
789
- }), /* @__PURE__ */ c("path", {
791
+ }), /* @__PURE__ */ l("path", {
790
792
  d: m,
791
793
  fill: "none",
792
794
  stroke: r,
793
795
  strokeWidth: 1.5
794
796
  })]
795
- }) : /* @__PURE__ */ c("svg", {
797
+ }) : /* @__PURE__ */ l("svg", {
796
798
  width: t,
797
799
  height: n,
798
- children: /* @__PURE__ */ c("path", {
800
+ children: /* @__PURE__ */ l("path", {
799
801
  d: m,
800
802
  fill: "none",
801
803
  stroke: r,
@@ -805,11 +807,12 @@ function S({ data: e, width: t, height: n, color: r, type: i, fillColor: a, fill
805
807
  }
806
808
  //#endregion
807
809
  //#region src/components/waka-charts/WakaMiniChart.tsx
808
- var C = t.forwardRef(({ data: n, type: r = "sparkline", width: i = 80, height: u = 24, color: d, showTrend: f = !0, valueFormatter: p, className: m }, h) => {
809
- let g = t.useMemo(() => !n || n.length === 0 ? [] : typeof n[0] == "number" ? n : n.map((e) => {
810
+ e();
811
+ var w = n.forwardRef(({ data: e, type: r = "sparkline", width: i = 80, height: a = 24, color: d, showTrend: f = !0, valueFormatter: p, className: m }, h) => {
812
+ let g = n.useMemo(() => !e || e.length === 0 ? [] : typeof e[0] == "number" ? e : e.map((e) => {
810
813
  let t = e.value ?? Object.values(e).find((e) => typeof e == "number");
811
814
  return typeof t == "number" ? t : 0;
812
- }), [n]), { trend: _, trendPercent: v, currentValue: y } = t.useMemo(() => {
815
+ }), [e]), { trend: _, trendPercent: v, currentValue: y } = n.useMemo(() => {
813
816
  if (g.length < 2) return {
814
817
  trend: "neutral",
815
818
  trendPercent: 0,
@@ -821,29 +824,29 @@ var C = t.forwardRef(({ data: n, type: r = "sparkline", width: i = 80, height: u
821
824
  trendPercent: r,
822
825
  currentValue: t
823
826
  };
824
- }, [g]), b = t.useMemo(() => d || (_ === "up" ? "hsl(var(--chart-2, 142 76% 36%))" : _ === "down" ? "hsl(var(--destructive, 0 84% 60%))" : "hsl(var(--muted-foreground, 220 9% 46%))"), [d, _]);
825
- return g.length === 0 ? /* @__PURE__ */ c("div", {
827
+ }, [g]), b = n.useMemo(() => d || (_ === "up" ? "hsl(var(--chart-2, 142 76% 36%))" : _ === "down" ? "hsl(var(--destructive, 0 84% 60%))" : "hsl(var(--muted-foreground, 220 9% 46%))"), [d, _]);
828
+ return g.length === 0 ? /* @__PURE__ */ l("div", {
826
829
  ref: h,
827
- className: e("flex items-center gap-1 text-muted-foreground", m),
828
- children: /* @__PURE__ */ c(a, { className: "h-3 w-3" })
829
- }) : (p ? p(y) : y.toLocaleString(), /* @__PURE__ */ l("div", {
830
+ className: t("flex items-center gap-1 text-muted-foreground", m),
831
+ children: /* @__PURE__ */ l(o, { className: "h-3 w-3" })
832
+ }) : (p ? p(y) : y.toLocaleString(), /* @__PURE__ */ u("div", {
830
833
  ref: h,
831
- className: e("flex items-center gap-2", m),
832
- children: [/* @__PURE__ */ c(x, {
834
+ className: t("flex items-center gap-2", m),
835
+ children: [/* @__PURE__ */ l(S, {
833
836
  data: g,
834
837
  type: r === "sparkline" ? "line" : r,
835
838
  width: i,
836
- height: u,
839
+ height: a,
837
840
  color: b,
838
841
  animation: !1
839
- }), f && /* @__PURE__ */ l("div", {
842
+ }), f && /* @__PURE__ */ u("div", {
840
843
  className: "flex items-center gap-1",
841
844
  children: [
842
- _ === "up" && /* @__PURE__ */ c(s, { className: "h-3 w-3 text-green-600 dark:text-green-400" }),
843
- _ === "down" && /* @__PURE__ */ c(o, { className: "h-3 w-3 text-red-600 dark:text-red-400" }),
844
- _ === "neutral" && /* @__PURE__ */ c(a, { className: "h-3 w-3 text-muted-foreground" }),
845
- /* @__PURE__ */ l("span", {
846
- className: e("text-xs font-medium", _ === "up" && "text-green-600 dark:text-green-400", _ === "down" && "text-red-600 dark:text-red-400", _ === "neutral" && "text-muted-foreground"),
845
+ _ === "up" && /* @__PURE__ */ l(c, { className: "h-3 w-3 text-green-600 dark:text-green-400" }),
846
+ _ === "down" && /* @__PURE__ */ l(s, { className: "h-3 w-3 text-red-600 dark:text-red-400" }),
847
+ _ === "neutral" && /* @__PURE__ */ l(o, { className: "h-3 w-3 text-muted-foreground" }),
848
+ /* @__PURE__ */ u("span", {
849
+ className: t("text-xs font-medium", _ === "up" && "text-green-600 dark:text-green-400", _ === "down" && "text-red-600 dark:text-red-400", _ === "neutral" && "text-muted-foreground"),
847
850
  children: [
848
851
  _ !== "neutral" && (v > 0 ? "+" : ""),
849
852
  v.toFixed(1),
@@ -854,10 +857,10 @@ var C = t.forwardRef(({ data: n, type: r = "sparkline", width: i = 80, height: u
854
857
  })]
855
858
  }));
856
859
  });
857
- C.displayName = "WakaMiniChart";
860
+ w.displayName = "WakaMiniChart";
858
861
  //#endregion
859
862
  //#region src/components/waka-charts/dataTableHelpers.ts
860
- function w(e) {
863
+ function T(e) {
861
864
  let { accessorKey: t, header: n = String(t), chartType: r = "sparkline", width: i = 100, height: a = 24, color: o, showValue: s = !1, valueFormatter: c } = e;
862
865
  return {
863
866
  accessorKey: t,
@@ -887,7 +890,7 @@ function w(e) {
887
890
  }
888
891
  };
889
892
  }
890
- var T = {
893
+ var E = {
891
894
  cell: (e) => {
892
895
  if (!Array.isArray(e)) return null;
893
896
  let t = [];
@@ -902,13 +905,13 @@ var T = {
902
905
  size: 100,
903
906
  enableSorting: !1,
904
907
  enableFiltering: !1
905
- }, E = [
908
+ }, D = [
906
909
  "hsl(var(--chart-1))",
907
910
  "hsl(var(--chart-2))",
908
911
  "hsl(var(--chart-3))",
909
912
  "hsl(var(--chart-4))",
910
913
  "hsl(var(--chart-5))"
911
- ], D = {
914
+ ], O = {
912
915
  sm: {
913
916
  width: "100%",
914
917
  height: 150
@@ -931,4 +934,4 @@ var T = {
931
934
  }
932
935
  };
933
936
  //#endregion
934
- export { C as a, y as c, h as d, p as f, T as i, v as l, u as m, E as n, x as o, d as p, w as r, b as s, D as t, _ as u };
937
+ export { w as a, b as c, g as d, m as f, E as i, y as l, d as m, D as n, S as o, f as p, T as r, x as s, O as t, v as u };