@lobehub/charts 6.0.1 → 6.1.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 (308) hide show
  1. package/README.md +8 -10
  2. package/es/AccuracyBarChart/index.d.mts +7 -5
  3. package/es/AccuracyBarChart/index.mjs +36 -37
  4. package/es/AccuracyBarChart/index.mjs.map +1 -1
  5. package/es/AccuracyBarChart/styles.d.mts +1 -4
  6. package/es/AccuracyBarChart/styles.mjs +6 -7
  7. package/es/AccuracyBarChart/styles.mjs.map +1 -1
  8. package/es/AreaChart/index.d.mts +11 -7
  9. package/es/AreaChart/index.mjs +100 -60
  10. package/es/AreaChart/index.mjs.map +1 -1
  11. package/es/AreaChart/styles.d.mts +1 -4
  12. package/es/AreaChart/styles.mjs +1 -2
  13. package/es/BarChart/A2uiBarChart.d.mts +56 -0
  14. package/es/BarChart/A2uiBarChart.mjs +368 -0
  15. package/es/BarChart/A2uiBarChart.mjs.map +1 -0
  16. package/es/BarChart/index.d.mts +10 -6
  17. package/es/BarChart/index.mjs +70 -33
  18. package/es/BarChart/index.mjs.map +1 -1
  19. package/es/BarChart/renderShape.d.mts +1 -4
  20. package/es/BarChart/renderShape.mjs +5 -6
  21. package/es/BarChart/renderShape.mjs.map +1 -1
  22. package/es/BarChart/styles.d.mts +1 -4
  23. package/es/BarChart/styles.mjs +1 -2
  24. package/es/BarList/index.d.mts +8 -6
  25. package/es/BarList/index.mjs +13 -14
  26. package/es/BarList/index.mjs.map +1 -1
  27. package/es/BarList/styles.d.mts +1 -4
  28. package/es/BarList/styles.mjs +3 -5
  29. package/es/BarList/styles.mjs.map +1 -1
  30. package/es/BenchmarkColumnChart/index.d.mts +8 -6
  31. package/es/BenchmarkColumnChart/index.mjs +38 -39
  32. package/es/BenchmarkColumnChart/index.mjs.map +1 -1
  33. package/es/BenchmarkColumnChart/styles.d.mts +1 -4
  34. package/es/BenchmarkColumnChart/styles.mjs +6 -8
  35. package/es/BenchmarkColumnChart/styles.mjs.map +1 -1
  36. package/es/BenchmarkRankingChart/index.d.mts +8 -6
  37. package/es/BenchmarkRankingChart/index.mjs +16 -17
  38. package/es/BenchmarkRankingChart/index.mjs.map +1 -1
  39. package/es/BenchmarkRankingChart/styles.d.mts +1 -4
  40. package/es/BenchmarkRankingChart/styles.mjs +25 -27
  41. package/es/BenchmarkRankingChart/styles.mjs.map +1 -1
  42. package/es/BenchmarkScatterChart/index.d.mts +7 -5
  43. package/es/BenchmarkScatterChart/index.mjs +22 -23
  44. package/es/BenchmarkScatterChart/index.mjs.map +1 -1
  45. package/es/BenchmarkScatterChart/styles.d.mts +1 -4
  46. package/es/BenchmarkScatterChart/styles.mjs +3 -2
  47. package/es/BenchmarkScatterChart/styles.mjs.map +1 -1
  48. package/es/BenchmarkScatterChart/utils.d.mts +1 -4
  49. package/es/BenchmarkScatterChart/utils.mjs +4 -5
  50. package/es/BenchmarkScatterChart/utils.mjs.map +1 -1
  51. package/es/CandlestickChart/index.d.mts +52 -0
  52. package/es/CandlestickChart/index.mjs +205 -0
  53. package/es/CandlestickChart/index.mjs.map +1 -0
  54. package/es/CandlestickChart/styles.d.mts +5 -0
  55. package/es/CandlestickChart/styles.mjs +24 -0
  56. package/es/CandlestickChart/styles.mjs.map +1 -0
  57. package/es/CandlestickChart/utils.d.mts +17 -0
  58. package/es/CandlestickChart/utils.mjs +56 -0
  59. package/es/CandlestickChart/utils.mjs.map +1 -0
  60. package/es/ChartFrame/index.d.mts +40 -0
  61. package/es/ChartFrame/index.mjs +18 -0
  62. package/es/ChartFrame/index.mjs.map +1 -0
  63. package/es/ComposedChart/index.d.mts +7 -5
  64. package/es/ComposedChart/index.mjs +37 -38
  65. package/es/ComposedChart/index.mjs.map +1 -1
  66. package/es/ComposedChart/styles.d.mts +1 -4
  67. package/es/ComposedChart/styles.mjs +1 -2
  68. package/es/ComposedChart/types.d.mts +3 -6
  69. package/es/DataBars/CategoryBar.d.mts +8 -6
  70. package/es/DataBars/CategoryBar.mjs +13 -14
  71. package/es/DataBars/CategoryBar.mjs.map +1 -1
  72. package/es/DataBars/DeltaBar.d.mts +7 -5
  73. package/es/DataBars/DeltaBar.mjs +10 -12
  74. package/es/DataBars/DeltaBar.mjs.map +1 -1
  75. package/es/DataBars/MarkerBar.d.mts +7 -5
  76. package/es/DataBars/MarkerBar.mjs +10 -12
  77. package/es/DataBars/MarkerBar.mjs.map +1 -1
  78. package/es/DataBars/ProgressBar.d.mts +7 -5
  79. package/es/DataBars/ProgressBar.mjs +10 -12
  80. package/es/DataBars/ProgressBar.mjs.map +1 -1
  81. package/es/DataBars/styles.d.mts +1 -4
  82. package/es/DataBars/styles.mjs +2 -3
  83. package/es/DataBars/styles.mjs.map +1 -1
  84. package/es/DonutChart/A2uiDonutChart.d.mts +35 -0
  85. package/es/DonutChart/A2uiDonutChart.mjs +189 -0
  86. package/es/DonutChart/A2uiDonutChart.mjs.map +1 -0
  87. package/es/DonutChart/DonutChartTooltip.d.mts +2 -5
  88. package/es/DonutChart/DonutChartTooltip.mjs +3 -4
  89. package/es/DonutChart/DonutChartTooltip.mjs.map +1 -1
  90. package/es/DonutChart/a2uiStyles.d.mts +13 -0
  91. package/es/DonutChart/a2uiStyles.mjs +90 -0
  92. package/es/DonutChart/a2uiStyles.mjs.map +1 -0
  93. package/es/DonutChart/index.d.mts +42 -9
  94. package/es/DonutChart/index.mjs +48 -16
  95. package/es/DonutChart/index.mjs.map +1 -1
  96. package/es/DonutChart/inputParser.d.mts +1 -4
  97. package/es/DonutChart/inputParser.mjs +1 -2
  98. package/es/DonutChart/inputParser.mjs.map +1 -1
  99. package/es/DonutChart/renderInactiveShape.d.mts +1 -4
  100. package/es/DonutChart/renderInactiveShape.mjs +1 -2
  101. package/es/DonutChart/styles.d.mts +1 -4
  102. package/es/DonutChart/styles.mjs +1 -2
  103. package/es/FunnelChart/ArrowRightIcon.d.mts +1 -4
  104. package/es/FunnelChart/ArrowRightIcon.mjs +1 -2
  105. package/es/FunnelChart/index.d.mts +7 -5
  106. package/es/FunnelChart/index.mjs +43 -44
  107. package/es/FunnelChart/index.mjs.map +1 -1
  108. package/es/FunnelChart/styles.d.mts +1 -4
  109. package/es/FunnelChart/styles.mjs +1 -2
  110. package/es/FunnelChart/types.d.mts +1 -4
  111. package/es/GaugeChart/index.d.mts +49 -0
  112. package/es/GaugeChart/index.mjs +77 -0
  113. package/es/GaugeChart/index.mjs.map +1 -0
  114. package/es/GaugeChart/styles.d.mts +9 -0
  115. package/es/GaugeChart/styles.mjs +73 -0
  116. package/es/GaugeChart/styles.mjs.map +1 -0
  117. package/es/GaugeChart/utils.d.mts +5 -0
  118. package/es/GaugeChart/utils.mjs +32 -0
  119. package/es/GaugeChart/utils.mjs.map +1 -0
  120. package/es/HeatmapChart/index.d.mts +68 -0
  121. package/es/HeatmapChart/index.mjs +162 -0
  122. package/es/HeatmapChart/index.mjs.map +1 -0
  123. package/es/HeatmapChart/styles.d.mts +4 -0
  124. package/es/HeatmapChart/styles.mjs +24 -0
  125. package/es/HeatmapChart/styles.mjs.map +1 -0
  126. package/es/HeatmapChart/utils.d.mts +18 -0
  127. package/es/HeatmapChart/utils.mjs +40 -0
  128. package/es/HeatmapChart/utils.mjs.map +1 -0
  129. package/es/Heatmaps/Calendar.d.mts +2 -5
  130. package/es/Heatmaps/Calendar.mjs +8 -9
  131. package/es/Heatmaps/Calendar.mjs.map +1 -1
  132. package/es/Heatmaps/ChartLabels.d.mts +2 -5
  133. package/es/Heatmaps/ChartLabels.mjs +3 -4
  134. package/es/Heatmaps/ChartLabels.mjs.map +1 -1
  135. package/es/Heatmaps/Footer.d.mts +1 -4
  136. package/es/Heatmaps/Footer.mjs +3 -4
  137. package/es/Heatmaps/index.d.mts +10 -8
  138. package/es/Heatmaps/index.mjs +10 -11
  139. package/es/Heatmaps/index.mjs.map +1 -1
  140. package/es/Heatmaps/styles.d.mts +1 -4
  141. package/es/Heatmaps/styles.mjs +2 -3
  142. package/es/Heatmaps/styles.mjs.map +1 -1
  143. package/es/Legend/LegendItem.d.mts +1 -4
  144. package/es/Legend/LegendItem.mjs +7 -8
  145. package/es/Legend/LegendItem.mjs.map +1 -1
  146. package/es/Legend/ScrollButton.d.mts +1 -4
  147. package/es/Legend/ScrollButton.mjs +6 -7
  148. package/es/Legend/ScrollButton.mjs.map +1 -1
  149. package/es/Legend/index.d.mts +7 -5
  150. package/es/Legend/index.mjs +13 -18
  151. package/es/Legend/index.mjs.map +1 -1
  152. package/es/LineChart/index.d.mts +11 -7
  153. package/es/LineChart/index.mjs +91 -53
  154. package/es/LineChart/index.mjs.map +1 -1
  155. package/es/LineChart/styles.d.mts +1 -4
  156. package/es/LineChart/styles.mjs +1 -2
  157. package/es/RadarChart/A2uiRadarChart.d.mts +37 -0
  158. package/es/RadarChart/A2uiRadarChart.mjs +203 -0
  159. package/es/RadarChart/A2uiRadarChart.mjs.map +1 -0
  160. package/es/RadarChart/index.d.mts +11 -7
  161. package/es/RadarChart/index.mjs +51 -18
  162. package/es/RadarChart/index.mjs.map +1 -1
  163. package/es/RadarChart/styles.d.mts +1 -4
  164. package/es/RadarChart/styles.mjs +1 -2
  165. package/es/SankeyChart/index.d.mts +73 -0
  166. package/es/SankeyChart/index.mjs +156 -0
  167. package/es/SankeyChart/index.mjs.map +1 -0
  168. package/es/SankeyChart/utils.d.mts +54 -0
  169. package/es/SankeyChart/utils.mjs +270 -0
  170. package/es/SankeyChart/utils.mjs.map +1 -0
  171. package/es/ScatterChart/A2uiScatterChart.d.mts +41 -0
  172. package/es/ScatterChart/A2uiScatterChart.mjs +259 -0
  173. package/es/ScatterChart/A2uiScatterChart.mjs.map +1 -0
  174. package/es/ScatterChart/ScatterChartTooltip.d.mts +2 -5
  175. package/es/ScatterChart/ScatterChartTooltip.mjs +7 -8
  176. package/es/ScatterChart/ScatterChartTooltip.mjs.map +1 -1
  177. package/es/ScatterChart/ScatterChartTooltipRow.d.mts +1 -4
  178. package/es/ScatterChart/ScatterChartTooltipRow.mjs +3 -4
  179. package/es/ScatterChart/ScatterChartTooltipRow.mjs.map +1 -1
  180. package/es/ScatterChart/index.d.mts +15 -9
  181. package/es/ScatterChart/index.mjs +70 -33
  182. package/es/ScatterChart/index.mjs.map +1 -1
  183. package/es/ScatterChart/renderShape.d.mts +1 -4
  184. package/es/ScatterChart/renderShape.mjs +4 -5
  185. package/es/ScatterChart/renderShape.mjs.map +1 -1
  186. package/es/ScatterChart/styles.d.mts +1 -4
  187. package/es/ScatterChart/styles.mjs +1 -2
  188. package/es/SparkChart/A2uiSparkChart.d.mts +41 -0
  189. package/es/SparkChart/A2uiSparkChart.mjs +179 -0
  190. package/es/SparkChart/A2uiSparkChart.mjs.map +1 -0
  191. package/es/SparkChart/SparkAreaChart.d.mts +12 -7
  192. package/es/SparkChart/SparkAreaChart.mjs +47 -22
  193. package/es/SparkChart/SparkAreaChart.mjs.map +1 -1
  194. package/es/SparkChart/SparkBarChart.d.mts +11 -6
  195. package/es/SparkChart/SparkBarChart.mjs +39 -16
  196. package/es/SparkChart/SparkBarChart.mjs.map +1 -1
  197. package/es/SparkChart/SparkLineChart.d.mts +12 -7
  198. package/es/SparkChart/SparkLineChart.mjs +41 -16
  199. package/es/SparkChart/SparkLineChart.mjs.map +1 -1
  200. package/es/SparkChart/index.d.mts +2 -1
  201. package/es/Tracker/TrackerBlock.d.mts +5 -5
  202. package/es/Tracker/TrackerBlock.mjs +8 -9
  203. package/es/Tracker/TrackerBlock.mjs.map +1 -1
  204. package/es/Tracker/index.d.mts +8 -6
  205. package/es/Tracker/index.mjs +11 -13
  206. package/es/Tracker/index.mjs.map +1 -1
  207. package/es/Tracker/styles.d.mts +1 -4
  208. package/es/Tracker/styles.mjs +1 -2
  209. package/es/TreemapChart/index.d.mts +64 -0
  210. package/es/TreemapChart/index.mjs +140 -0
  211. package/es/TreemapChart/index.mjs.map +1 -0
  212. package/es/TreemapChart/utils.d.mts +23 -0
  213. package/es/TreemapChart/utils.mjs +175 -0
  214. package/es/TreemapChart/utils.mjs.map +1 -0
  215. package/es/common/BaseAnimationTimingProps.d.mts +1 -4
  216. package/es/common/BaseChartProps.d.mts +3 -6
  217. package/es/common/BaseSparkChartProps.d.mts +2 -5
  218. package/es/common/ChartLegend.d.mts +1 -4
  219. package/es/common/ChartLegend.mjs +4 -5
  220. package/es/common/ChartLegend.mjs.map +1 -1
  221. package/es/common/ChartTooltip/ChartTooltipFrame.d.mts +1 -4
  222. package/es/common/ChartTooltip/ChartTooltipFrame.mjs +1 -2
  223. package/es/common/ChartTooltip/ChartTooltipFrame.mjs.map +1 -1
  224. package/es/common/ChartTooltip/ChartTooltipRow.d.mts +1 -4
  225. package/es/common/ChartTooltip/ChartTooltipRow.mjs +5 -6
  226. package/es/common/ChartTooltip/ChartTooltipRow.mjs.map +1 -1
  227. package/es/common/ChartTooltip/index.d.mts +2 -5
  228. package/es/common/ChartTooltip/index.mjs +3 -4
  229. package/es/common/ChartTooltip/index.mjs.map +1 -1
  230. package/es/common/CustomTooltipProps.d.mts +3 -6
  231. package/es/common/CustomYAxisTick.d.mts +2 -5
  232. package/es/common/CustomYAxisTick.mjs +1 -2
  233. package/es/common/CustomYAxisTick.mjs.map +1 -1
  234. package/es/common/NoData.d.mts +1 -4
  235. package/es/common/NoData.mjs +2 -3
  236. package/es/common/NoData.mjs.map +1 -1
  237. package/es/common/a2ui/A2uiTrendChart.d.mts +43 -0
  238. package/es/common/a2ui/A2uiTrendChart.mjs +353 -0
  239. package/es/common/a2ui/A2uiTrendChart.mjs.map +1 -0
  240. package/es/common/a2ui/Frame.d.mts +20 -0
  241. package/es/common/a2ui/Frame.mjs +43 -0
  242. package/es/common/a2ui/Frame.mjs.map +1 -0
  243. package/es/common/a2ui/HoverTooltip.d.mts +28 -0
  244. package/es/common/a2ui/HoverTooltip.mjs +36 -0
  245. package/es/common/a2ui/HoverTooltip.mjs.map +1 -0
  246. package/es/common/a2ui/Legend.d.mts +11 -0
  247. package/es/common/a2ui/Legend.mjs +33 -0
  248. package/es/common/a2ui/Legend.mjs.map +1 -0
  249. package/es/common/a2ui/PlacedTooltip.d.mts +22 -0
  250. package/es/common/a2ui/PlacedTooltip.mjs +58 -0
  251. package/es/common/a2ui/PlacedTooltip.mjs.map +1 -0
  252. package/es/common/a2ui/Tooltip.d.mts +13 -0
  253. package/es/common/a2ui/Tooltip.mjs +33 -0
  254. package/es/common/a2ui/Tooltip.mjs.map +1 -0
  255. package/es/common/a2ui/axis.d.mts +38 -0
  256. package/es/common/a2ui/axis.mjs +48 -0
  257. package/es/common/a2ui/axis.mjs.map +1 -0
  258. package/es/common/a2ui/curve.d.mts +20 -0
  259. package/es/common/a2ui/curve.mjs +58 -0
  260. package/es/common/a2ui/curve.mjs.map +1 -0
  261. package/es/common/a2ui/format.d.mts +17 -0
  262. package/es/common/a2ui/format.mjs +56 -0
  263. package/es/common/a2ui/format.mjs.map +1 -0
  264. package/es/common/a2ui/index.d.mts +16 -0
  265. package/es/common/a2ui/index.mjs +15 -0
  266. package/es/common/a2ui/scale.d.mts +20 -0
  267. package/es/common/a2ui/scale.mjs +112 -0
  268. package/es/common/a2ui/scale.mjs.map +1 -0
  269. package/es/common/a2ui/styles.d.mts +35 -0
  270. package/es/common/a2ui/styles.mjs +254 -0
  271. package/es/common/a2ui/styles.mjs.map +1 -0
  272. package/es/common/a2ui/tokens.d.mts +20 -0
  273. package/es/common/a2ui/tokens.mjs +103 -0
  274. package/es/common/a2ui/tokens.mjs.map +1 -0
  275. package/es/common/a2ui/types.d.mts +25 -0
  276. package/es/common/a2ui/types.mjs +0 -0
  277. package/es/common/a2ui/useA2uiTheme.d.mts +2 -0
  278. package/es/common/a2ui/useA2uiTheme.mjs +11 -0
  279. package/es/common/a2ui/useA2uiTheme.mjs.map +1 -0
  280. package/es/common/a2ui/useElementWidth.d.mts +2 -0
  281. package/es/common/a2ui/useElementWidth.mjs +31 -0
  282. package/es/common/a2ui/useElementWidth.mjs.map +1 -0
  283. package/es/common/benchmark/types.d.mts +2 -5
  284. package/es/common/benchmark/utils.d.mts +1 -4
  285. package/es/common/benchmark/utils.mjs +1 -2
  286. package/es/common/utils.d.mts +1 -4
  287. package/es/common/utils.mjs +1 -2
  288. package/es/hooks/useOnWindowResize.d.mts +1 -4
  289. package/es/hooks/useOnWindowResize.mjs +2 -3
  290. package/es/hooks/usePrefersReducedMotion.d.mts +1 -4
  291. package/es/hooks/usePrefersReducedMotion.mjs +2 -3
  292. package/es/hooks/useThemeColorRange.d.mts +1 -4
  293. package/es/hooks/useThemeColorRange.mjs +1 -2
  294. package/es/index.d.mts +20 -9
  295. package/es/index.mjs +15 -9
  296. package/es/types/charts.d.mts +1 -4
  297. package/es/types/charts.mjs +1 -2
  298. package/es/utils/calendar.d.mts +2 -5
  299. package/es/utils/calendar.mjs +2 -3
  300. package/es/utils/getMaxLabelLength.d.mts +1 -4
  301. package/es/utils/getMaxLabelLength.mjs +1 -2
  302. package/es/utils/getMaxLabelLength.mjs.map +1 -1
  303. package/es/utils/index.d.mts +1 -4
  304. package/es/utils/index.mjs +1 -2
  305. package/es/utils/index.mjs.map +1 -1
  306. package/es/utils/theme.d.mts +1 -4
  307. package/es/utils/theme.mjs +1 -2
  308. package/package.json +32 -8
package/es/index.d.mts CHANGED
@@ -1,34 +1,45 @@
1
- import { Activity, BlockElement, CurveType, DeltaType, DeltaTypes, EventHandlerMap, EventProps, Interval, IntervalType, LabelFormatter, Labels, ReactEvent, SVGRectEventHandler, ScatterChartValueFormatter, ValueFormatter, Week } from "./types/charts.mjs";
2
- import ScatterChart, { ScatterChartProps } from "./ScatterChart/index.mjs";
3
1
  import AccuracyBarChart, { AccuracyBarChartProps } from "./AccuracyBarChart/index.mjs";
2
+ import { ChartNumberFormat } from "./common/a2ui/format.mjs";
3
+ import { ChartFrameLegendItem } from "./common/a2ui/Legend.mjs";
4
+ import { ChartVariant } from "./common/a2ui/types.mjs";
4
5
  import AreaChart, { AreaChartProps } from "./AreaChart/index.mjs";
5
6
  import BarChart, { BarChartProps } from "./BarChart/index.mjs";
6
7
  import BarList, { Bar, BarListProps } from "./BarList/index.mjs";
7
- import { BenchmarkEventProps, BenchmarkFieldKeys, BenchmarkPointShape, BenchmarkRecord, BenchmarkRenderIcon } from "./common/benchmark/types.mjs";
8
- import "./common/benchmark/index.mjs";
9
8
  import BenchmarkColumnChart, { BenchmarkColumnChartProps } from "./BenchmarkColumnChart/index.mjs";
10
9
  import BenchmarkRankingChart, { BenchmarkRankingChartProps } from "./BenchmarkRankingChart/index.mjs";
11
10
  import BenchmarkScatterChart, { BenchmarkScatterChartProps, BenchmarkScatterMetric } from "./BenchmarkScatterChart/index.mjs";
11
+ import { BenchmarkEventProps, BenchmarkFieldKeys, BenchmarkPointShape, BenchmarkRecord, BenchmarkRenderIcon } from "./common/benchmark/types.mjs";
12
+ import CandlestickChart, { CandlestickChartProps } from "./CandlestickChart/index.mjs";
13
+ import ChartFrame, { ChartFrameProps } from "./ChartFrame/index.mjs";
14
+ import "./common/a2ui/index.mjs";
15
+ import "./common/benchmark/index.mjs";
16
+ import ChartTooltip, { ChartTooltipProps } from "./common/ChartTooltip/index.mjs";
17
+ import { ChartTooltipFrame } from "./common/ChartTooltip/ChartTooltipFrame.mjs";
12
18
  import { ComposedChartProps, SeriesItem, YAxisConfig } from "./ComposedChart/types.mjs";
13
- import ComposedChart from "./ComposedChart/index.mjs";
19
+ import ChartTooltipRow from "./common/ChartTooltip/ChartTooltipRow.mjs";
14
20
  import CategoryBar, { CategoryBarProps } from "./DataBars/CategoryBar.mjs";
15
21
  import DeltaBar, { DeltaBarProps } from "./DataBars/DeltaBar.mjs";
16
22
  import MarkerBar, { MarkerBarProps } from "./DataBars/MarkerBar.mjs";
17
23
  import ProgressBar, { ProgressBarProps } from "./DataBars/ProgressBar.mjs";
24
+ import ComposedChart from "./ComposedChart/index.mjs";
18
25
  import "./DataBars/index.mjs";
19
26
  import DonutChart, { DonutChartProps } from "./DonutChart/index.mjs";
20
27
  import FunnelChart, { FunnelChartProps } from "./FunnelChart/index.mjs";
28
+ import GaugeChart, { GaugeChartProps } from "./GaugeChart/index.mjs";
29
+ import HeatmapChart, { HeatmapChartProps } from "./HeatmapChart/index.mjs";
21
30
  import Heatmaps, { HeatmapsProps } from "./Heatmaps/index.mjs";
22
31
  import Legend, { LegendProps } from "./Legend/index.mjs";
23
32
  import LineChart, { LineChartProps } from "./LineChart/index.mjs";
24
33
  import RadarChart, { RadarChartProps } from "./RadarChart/index.mjs";
34
+ import { A2uiSparkProps, SparkTone } from "./SparkChart/A2uiSparkChart.mjs";
25
35
  import SparkAreaChart, { SparkAreaChartProps } from "./SparkChart/SparkAreaChart.mjs";
26
36
  import SparkBarChart, { SparkBarChartProps } from "./SparkChart/SparkBarChart.mjs";
27
37
  import SparkLineChart, { SparkLineChartProps } from "./SparkChart/SparkLineChart.mjs";
38
+ import SankeyChart, { SankeyChartProps } from "./SankeyChart/index.mjs";
39
+ import ScatterChart, { ScatterChartProps } from "./ScatterChart/index.mjs";
28
40
  import "./SparkChart/index.mjs";
29
41
  import Tracker, { TrackerProps } from "./Tracker/index.mjs";
30
- import { ChartTooltipFrame } from "./common/ChartTooltip/ChartTooltipFrame.mjs";
31
- import ChartTooltipRow from "./common/ChartTooltip/ChartTooltipRow.mjs";
32
- import ChartTooltip, { ChartTooltipProps } from "./common/ChartTooltip/index.mjs";
42
+ import TreemapChart, { TreemapChartProps } from "./TreemapChart/index.mjs";
43
+ import { Activity, BlockElement, CurveType, DeltaType, DeltaTypes, EventHandlerMap, EventProps, Interval, IntervalType, LabelFormatter, Labels, ReactEvent, SVGRectEventHandler, ScatterChartValueFormatter, ValueFormatter, Week } from "./types/charts.mjs";
33
44
  import { useThemeColorRange } from "./hooks/useThemeColorRange.mjs";
34
- export { AccuracyBarChart, type AccuracyBarChartProps, type Activity, AreaChart, type AreaChartProps, type Bar, BarChart, type BarChartProps, BarList, type BarListProps, BenchmarkColumnChart, type BenchmarkColumnChartProps, type BenchmarkEventProps, type BenchmarkFieldKeys, type BenchmarkPointShape, BenchmarkRankingChart, type BenchmarkRankingChartProps, type BenchmarkRecord, type BenchmarkRenderIcon, BenchmarkScatterChart, type BenchmarkScatterChartProps, type BenchmarkScatterMetric, type BlockElement, CategoryBar, type CategoryBarProps, ChartTooltip, ChartTooltipFrame, type ChartTooltipProps, ChartTooltipRow, ComposedChart, type ComposedChartProps, type CurveType, DeltaBar, type DeltaBarProps, type DeltaType, type DeltaTypes, DonutChart, type DonutChartProps, type EventHandlerMap, type EventProps, FunnelChart, type FunnelChartProps, Heatmaps, type HeatmapsProps, type Interval, type IntervalType, type LabelFormatter, type Labels, Legend, type LegendProps, LineChart, type LineChartProps, MarkerBar, type MarkerBarProps, ProgressBar, type ProgressBarProps, RadarChart, type RadarChartProps, type ReactEvent, type SVGRectEventHandler, ScatterChart, type ScatterChartProps, type ScatterChartValueFormatter, type SeriesItem, SparkAreaChart, type SparkAreaChartProps, SparkBarChart, type SparkBarChartProps, SparkLineChart, type SparkLineChartProps, Tracker, type TrackerProps, type ValueFormatter, type Week, type YAxisConfig, useThemeColorRange };
45
+ export { type A2uiSparkProps, AccuracyBarChart, type AccuracyBarChartProps, type Activity, AreaChart, type AreaChartProps, type Bar, BarChart, type BarChartProps, BarList, type BarListProps, BenchmarkColumnChart, type BenchmarkColumnChartProps, type BenchmarkEventProps, type BenchmarkFieldKeys, type BenchmarkPointShape, BenchmarkRankingChart, type BenchmarkRankingChartProps, type BenchmarkRecord, type BenchmarkRenderIcon, BenchmarkScatterChart, type BenchmarkScatterChartProps, type BenchmarkScatterMetric, type BlockElement, CandlestickChart, type CandlestickChartProps, CategoryBar, type CategoryBarProps, ChartFrame, type ChartFrameLegendItem, type ChartFrameProps, type ChartNumberFormat, ChartTooltip, ChartTooltipFrame, type ChartTooltipProps, ChartTooltipRow, type ChartVariant, ComposedChart, type ComposedChartProps, type CurveType, DeltaBar, type DeltaBarProps, type DeltaType, type DeltaTypes, DonutChart, type DonutChartProps, type EventHandlerMap, type EventProps, FunnelChart, type FunnelChartProps, GaugeChart, type GaugeChartProps, HeatmapChart, type HeatmapChartProps, Heatmaps, type HeatmapsProps, type Interval, type IntervalType, type LabelFormatter, type Labels, Legend, type LegendProps, LineChart, type LineChartProps, MarkerBar, type MarkerBarProps, ProgressBar, type ProgressBarProps, RadarChart, type RadarChartProps, type ReactEvent, type SVGRectEventHandler, SankeyChart, type SankeyChartProps, ScatterChart, type ScatterChartProps, type ScatterChartValueFormatter, type SeriesItem, SparkAreaChart, type SparkAreaChartProps, SparkBarChart, type SparkBarChartProps, SparkLineChart, type SparkLineChartProps, type SparkTone, Tracker, type TrackerProps, TreemapChart, type TreemapChartProps, type ValueFormatter, type Week, type YAxisConfig, useThemeColorRange };
package/es/index.mjs CHANGED
@@ -1,8 +1,3 @@
1
- import { useThemeColorRange } from "./hooks/useThemeColorRange.mjs";
2
- import Legend from "./Legend/index.mjs";
3
- import { ChartTooltipFrame } from "./common/ChartTooltip/ChartTooltipFrame.mjs";
4
- import ChartTooltipRow from "./common/ChartTooltip/ChartTooltipRow.mjs";
5
- import ChartTooltip from "./common/ChartTooltip/index.mjs";
6
1
  import AccuracyBarChart from "./AccuracyBarChart/index.mjs";
7
2
  import AreaChart from "./AreaChart/index.mjs";
8
3
  import BarChart from "./BarChart/index.mjs";
@@ -10,19 +5,30 @@ import BarList from "./BarList/index.mjs";
10
5
  import BenchmarkColumnChart from "./BenchmarkColumnChart/index.mjs";
11
6
  import BenchmarkRankingChart from "./BenchmarkRankingChart/index.mjs";
12
7
  import BenchmarkScatterChart from "./BenchmarkScatterChart/index.mjs";
8
+ import CandlestickChart from "./CandlestickChart/index.mjs";
9
+ import ChartFrame from "./ChartFrame/index.mjs";
10
+ import ChartTooltip from "./common/ChartTooltip/index.mjs";
11
+ import { ChartTooltipFrame } from "./common/ChartTooltip/ChartTooltipFrame.mjs";
12
+ import ChartTooltipRow from "./common/ChartTooltip/ChartTooltipRow.mjs";
13
13
  import ComposedChart from "./ComposedChart/index.mjs";
14
+ import DonutChart from "./DonutChart/index.mjs";
15
+ import FunnelChart from "./FunnelChart/index.mjs";
14
16
  import CategoryBar from "./DataBars/CategoryBar.mjs";
15
17
  import DeltaBar from "./DataBars/DeltaBar.mjs";
16
18
  import MarkerBar from "./DataBars/MarkerBar.mjs";
17
19
  import ProgressBar from "./DataBars/ProgressBar.mjs";
18
- import DonutChart from "./DonutChart/index.mjs";
19
- import FunnelChart from "./FunnelChart/index.mjs";
20
+ import GaugeChart from "./GaugeChart/index.mjs";
21
+ import HeatmapChart from "./HeatmapChart/index.mjs";
20
22
  import Heatmaps from "./Heatmaps/index.mjs";
23
+ import Legend from "./Legend/index.mjs";
21
24
  import LineChart from "./LineChart/index.mjs";
22
25
  import RadarChart from "./RadarChart/index.mjs";
26
+ import SankeyChart from "./SankeyChart/index.mjs";
23
27
  import ScatterChart from "./ScatterChart/index.mjs";
28
+ import Tracker from "./Tracker/index.mjs";
24
29
  import SparkAreaChart from "./SparkChart/SparkAreaChart.mjs";
25
30
  import SparkBarChart from "./SparkChart/SparkBarChart.mjs";
26
31
  import SparkLineChart from "./SparkChart/SparkLineChart.mjs";
27
- import Tracker from "./Tracker/index.mjs";
28
- export { AccuracyBarChart, AreaChart, BarChart, BarList, BenchmarkColumnChart, BenchmarkRankingChart, BenchmarkScatterChart, CategoryBar, ChartTooltip, ChartTooltipFrame, ChartTooltipRow, ComposedChart, DeltaBar, DonutChart, FunnelChart, Heatmaps, Legend, LineChart, MarkerBar, ProgressBar, RadarChart, ScatterChart, SparkAreaChart, SparkBarChart, SparkLineChart, Tracker, useThemeColorRange };
32
+ import TreemapChart from "./TreemapChart/index.mjs";
33
+ import { useThemeColorRange } from "./hooks/useThemeColorRange.mjs";
34
+ export { AccuracyBarChart, AreaChart, BarChart, BarList, BenchmarkColumnChart, BenchmarkRankingChart, BenchmarkScatterChart, CandlestickChart, CategoryBar, ChartFrame, ChartTooltip, ChartTooltipFrame, ChartTooltipRow, ComposedChart, DeltaBar, DonutChart, FunnelChart, GaugeChart, HeatmapChart, Heatmaps, Legend, LineChart, MarkerBar, ProgressBar, RadarChart, SankeyChart, ScatterChart, SparkAreaChart, SparkBarChart, SparkLineChart, Tracker, TreemapChart, useThemeColorRange };
@@ -1,5 +1,4 @@
1
1
  import { AnimationEvent, ClipboardEvent, CompositionEvent, DOMAttributes, DragEvent, FocusEvent, FormEvent, HTMLAttributes, JSXElementConstructor, KeyboardEvent, MouseEvent, PointerEvent, ReactElement, SVGAttributes, SyntheticEvent, TouchEvent, TransitionEvent, UIEvent, WheelEvent } from "react";
2
- //#region src/types/charts.d.ts
3
2
  export interface Activity {
4
3
  count: number;
5
4
  date: string;
@@ -48,6 +47,4 @@ export type DeltaType = (typeof deltaTypeValues)[number];
48
47
  export declare const DeltaTypes: {
49
48
  [key: string]: DeltaType;
50
49
  };
51
- //#endregion
52
- export {};
53
- //# sourceMappingURL=charts.d.mts.map
50
+ export {};
@@ -1,4 +1,4 @@
1
- //#region src/types/charts.ts
1
+ // src/types/charts.ts
2
2
  const DeltaTypes = {
3
3
  Decrease: "decrease",
4
4
  Increase: "increase",
@@ -6,7 +6,6 @@ const DeltaTypes = {
6
6
  ModerateIncrease: "moderateIncrease",
7
7
  Unchanged: "unchanged"
8
8
  };
9
- //#endregion
10
9
  export { DeltaTypes };
11
10
 
12
11
  //# sourceMappingURL=charts.mjs.map
@@ -1,6 +1,5 @@
1
- import { Activity, Week } from "../types/charts.mjs";
2
1
  import { Day } from "date-fns";
3
- //#region src/utils/calendar.d.ts
2
+ import { Activity, Week } from "../types/charts.mjs";
4
3
  export declare const DEFAULT_MONTH_LABELS: string[];
5
4
  export declare const DEFAULT_LABELS: {
6
5
  legend: {
@@ -27,6 +26,4 @@ export declare const generateTestData: (args: {
27
26
  maxLevel?: number;
28
27
  }) => Array<Activity>;
29
28
  export declare const maxWeekdayLabelLength: (firstWeek: Week, weekStart: number, labels: string[], fontSize: number) => number;
30
- //#endregion
31
- export {};
32
- //# sourceMappingURL=calendar.d.mts.map
29
+ export {};
@@ -1,6 +1,6 @@
1
- import { isOnSeverSide } from "./index.mjs";
2
1
  import { differenceInCalendarDays, eachDayOfInterval, endOfYear, formatISO, getDay, getMonth, nextDay, parseISO, startOfYear, subWeeks } from "date-fns";
3
- //#region src/utils/calendar.ts
2
+ import { isOnSeverSide } from "./index.mjs";
3
+ // src/utils/calendar.ts
4
4
  const DEFAULT_MONTH_LABELS = [
5
5
  "Jan",
6
6
  "Feb",
@@ -148,7 +148,6 @@ const maxWeekdayLabelLength = (firstWeek, weekStart, labels, fontSize) => {
148
148
  return maxLength;
149
149
  }, 0);
150
150
  };
151
- //#endregion
152
151
  export { DEFAULT_LABELS, DEFAULT_MONTH_LABELS, generateEmptyData, generateTestData, getMonthLabels, groupByWeeks, maxWeekdayLabelLength };
153
152
 
154
153
  //# sourceMappingURL=calendar.mjs.map
@@ -1,5 +1,4 @@
1
1
  import { ValueFormatter } from "../types/charts.mjs";
2
- //#region src/utils/getMaxLabelLength.d.ts
3
2
  export declare const getTextWidth: (text: string) => number;
4
3
  export declare const getMaxLabelLength: ({ data, valueFormatter, index, layout, margin, isScatterChart }: {
5
4
  data: Array<Record<string, any>>;
@@ -8,6 +7,4 @@ export declare const getMaxLabelLength: ({ data, valueFormatter, index, layout,
8
7
  layout?: "vertical" | "horizontal";
9
8
  margin?: number;
10
9
  valueFormatter?: ValueFormatter;
11
- }) => number;
12
- //#endregion
13
- //# sourceMappingURL=getMaxLabelLength.d.mts.map
10
+ }) => number;
@@ -1,5 +1,5 @@
1
1
  import { defaultValueFormatter, isOnSeverSide } from "./index.mjs";
2
- //#region src/utils/getMaxLabelLength.ts
2
+ // src/utils/getMaxLabelLength.ts
3
3
  const getTextWidth = (text) => {
4
4
  if (isOnSeverSide) return 0;
5
5
  const span = document.createElement("span");
@@ -42,7 +42,6 @@ const getMaxLabelLength = ({ data, valueFormatter = defaultValueFormatter, index
42
42
  }
43
43
  return getTextWidth(maxLabel) + margin;
44
44
  };
45
- //#endregion
46
45
  export { getMaxLabelLength, getTextWidth };
47
46
 
48
47
  //# sourceMappingURL=getMaxLabelLength.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getMaxLabelLength.mjs","names":[],"sources":["../../src/utils/getMaxLabelLength.ts"],"sourcesContent":["import { ValueFormatter } from '@/types/charts';\nimport { defaultValueFormatter, isOnSeverSide } from '@/utils/index';\n\nexport const getTextWidth = (text: string) => {\n if (isOnSeverSide) return 0;\n\n // 创建临时 span 元素\n const span = document.createElement('span');\n\n // 设置样式使其不可见\n span.style.fontSize = '12px';\n span.style.position = 'absolute';\n span.style.visibility = 'hidden';\n span.style.whiteSpace = 'nowrap';\n\n // 设置文本内容\n span.textContent = text;\n\n // 添加到 body\n document.body.append(span);\n\n // 获取宽度\n const width = span.getBoundingClientRect().width;\n\n // 移除临时元素\n span.remove();\n\n return width;\n};\n\nexport const getMaxLabelLength = ({\n data,\n valueFormatter = defaultValueFormatter,\n index,\n layout = 'horizontal',\n margin = 24,\n isScatterChart,\n}: {\n data: Array<Record<string, any>>;\n index: string;\n isScatterChart?: boolean;\n layout?: 'vertical' | 'horizontal';\n margin?: number;\n valueFormatter?: ValueFormatter;\n}): number => {\n let maxLength = 0;\n let maxLabel = '';\n\n if (isScatterChart) {\n for (const item of data) {\n const formattedValue = valueFormatter(item[index]);\n if (formattedValue.length > maxLength) {\n maxLength = formattedValue.length;\n maxLabel = formattedValue;\n }\n }\n } else if (layout === 'vertical') {\n for (const item of data) {\n if (item[index].length > maxLength) {\n maxLength = item[index].length;\n maxLabel = item[index];\n }\n }\n } else {\n for (const item of data) {\n const categories = Object.keys(item).filter((key) => key !== index);\n for (const category of categories) {\n const value = item[category];\n if (value === undefined) continue; // Skip null or undefined values\n const formattedValue = valueFormatter(value);\n if (formattedValue.length > maxLength) {\n maxLength = formattedValue.length;\n maxLabel = formattedValue;\n }\n }\n }\n }\n\n return getTextWidth(maxLabel) + margin;\n};\n"],"mappings":";;AAGA,MAAa,gBAAgB,SAAiB;CAC5C,IAAI,eAAe,OAAO;CAG1B,MAAM,OAAO,SAAS,cAAc,MAAM;CAG1C,KAAK,MAAM,WAAW;CACtB,KAAK,MAAM,WAAW;CACtB,KAAK,MAAM,aAAa;CACxB,KAAK,MAAM,aAAa;CAGxB,KAAK,cAAc;CAGnB,SAAS,KAAK,OAAO,IAAI;CAGzB,MAAM,QAAQ,KAAK,sBAAsB,CAAC,CAAC;CAG3C,KAAK,OAAO;CAEZ,OAAO;AACT;AAEA,MAAa,qBAAqB,EAChC,MACA,iBAAiB,uBACjB,OACA,SAAS,cACT,SAAS,IACT,qBAQY;CACZ,IAAI,YAAY;CAChB,IAAI,WAAW;CAEf,IAAI,gBACF,KAAK,MAAM,QAAQ,MAAM;EACvB,MAAM,iBAAiB,eAAe,KAAK,MAAM;EACjD,IAAI,eAAe,SAAS,WAAW;GACrC,YAAY,eAAe;GAC3B,WAAW;EACb;CACF;MACK,IAAI,WAAW,YACf;OAAA,MAAM,QAAQ,MACjB,IAAI,KAAK,MAAM,CAAC,SAAS,WAAW;GAClC,YAAY,KAAK,MAAM,CAAC;GACxB,WAAW,KAAK;EAClB;QAGF,KAAK,MAAM,QAAQ,MAAM;EACvB,MAAM,aAAa,OAAO,KAAK,IAAI,CAAC,CAAC,QAAQ,QAAQ,QAAQ,KAAK;EAClE,KAAK,MAAM,YAAY,YAAY;GACjC,MAAM,QAAQ,KAAK;GACnB,IAAI,UAAU,KAAA,GAAW;GACzB,MAAM,iBAAiB,eAAe,KAAK;GAC3C,IAAI,eAAe,SAAS,WAAW;IACrC,YAAY,eAAe;IAC3B,WAAW;GACb;EACF;CACF;CAGF,OAAO,aAAa,QAAQ,IAAI;AAClC"}
1
+ {"version":3,"file":"getMaxLabelLength.mjs","names":[],"sources":["../../src/utils/getMaxLabelLength.ts"],"sourcesContent":["import type { ValueFormatter } from '@/types/charts';\nimport { defaultValueFormatter, isOnSeverSide } from '@/utils/index';\n\nexport const getTextWidth = (text: string) => {\n if (isOnSeverSide) return 0;\n\n // 创建临时 span 元素\n const span = document.createElement('span');\n\n // 设置样式使其不可见\n span.style.fontSize = '12px';\n span.style.position = 'absolute';\n span.style.visibility = 'hidden';\n span.style.whiteSpace = 'nowrap';\n\n // 设置文本内容\n span.textContent = text;\n\n // 添加到 body\n document.body.append(span);\n\n // 获取宽度\n const width = span.getBoundingClientRect().width;\n\n // 移除临时元素\n span.remove();\n\n return width;\n};\n\nexport const getMaxLabelLength = ({\n data,\n valueFormatter = defaultValueFormatter,\n index,\n layout = 'horizontal',\n margin = 24,\n isScatterChart,\n}: {\n data: Array<Record<string, any>>;\n index: string;\n isScatterChart?: boolean;\n layout?: 'vertical' | 'horizontal';\n margin?: number;\n valueFormatter?: ValueFormatter;\n}): number => {\n let maxLength = 0;\n let maxLabel = '';\n\n if (isScatterChart) {\n for (const item of data) {\n const formattedValue = valueFormatter(item[index]);\n if (formattedValue.length > maxLength) {\n maxLength = formattedValue.length;\n maxLabel = formattedValue;\n }\n }\n } else if (layout === 'vertical') {\n for (const item of data) {\n if (item[index].length > maxLength) {\n maxLength = item[index].length;\n maxLabel = item[index];\n }\n }\n } else {\n for (const item of data) {\n const categories = Object.keys(item).filter((key) => key !== index);\n for (const category of categories) {\n const value = item[category];\n if (value === undefined) continue; // Skip null or undefined values\n const formattedValue = valueFormatter(value);\n if (formattedValue.length > maxLength) {\n maxLength = formattedValue.length;\n maxLabel = formattedValue;\n }\n }\n }\n }\n\n return getTextWidth(maxLabel) + margin;\n};\n"],"mappings":";;AAGA,MAAa,gBAAgB,SAAiB;CAC5C,IAAI,eAAe,OAAO;CAG1B,MAAM,OAAO,SAAS,cAAc,MAAM;CAG1C,KAAK,MAAM,WAAW;CACtB,KAAK,MAAM,WAAW;CACtB,KAAK,MAAM,aAAa;CACxB,KAAK,MAAM,aAAa;CAGxB,KAAK,cAAc;CAGnB,SAAS,KAAK,OAAO,IAAI;CAGzB,MAAM,QAAQ,KAAK,sBAAsB,CAAC,CAAC;CAG3C,KAAK,OAAO;CAEZ,OAAO;AACT;AAEA,MAAa,qBAAqB,EAChC,MACA,iBAAiB,uBACjB,OACA,SAAS,cACT,SAAS,IACT,qBAQY;CACZ,IAAI,YAAY;CAChB,IAAI,WAAW;CAEf,IAAI,gBACF,KAAK,MAAM,QAAQ,MAAM;EACvB,MAAM,iBAAiB,eAAe,KAAK,MAAM;EACjD,IAAI,eAAe,SAAS,WAAW;GACrC,YAAY,eAAe;GAC3B,WAAW;EACb;CACF;MACK,IAAI,WAAW,YACf;OAAA,MAAM,QAAQ,MACjB,IAAI,KAAK,MAAM,CAAC,SAAS,WAAW;GAClC,YAAY,KAAK,MAAM,CAAC;GACxB,WAAW,KAAK;EAClB;QAGF,KAAK,MAAM,QAAQ,MAAM;EACvB,MAAM,aAAa,OAAO,KAAK,IAAI,CAAC,CAAC,QAAQ,QAAQ,QAAQ,KAAK;EAClE,KAAK,MAAM,YAAY,YAAY;GACjC,MAAM,QAAQ,KAAK;GACnB,IAAI,UAAU,KAAA,GAAW;GACzB,MAAM,iBAAiB,eAAe,KAAK;GAC3C,IAAI,eAAe,SAAS,WAAW;IACrC,YAAY,eAAe;IAC3B,WAAW;GACb;EACF;CACF;CAGF,OAAO,aAAa,QAAQ,IAAI;AAClC"}
@@ -1,8 +1,5 @@
1
1
  import { ValueFormatter } from "../types/charts.mjs";
2
- //#region src/utils/index.d.ts
3
2
  export declare const defaultValueFormatter: ValueFormatter;
4
3
  export declare const sumNumericArray: (arr: number[]) => number;
5
4
  export declare const isOnSeverSide: boolean;
6
- export declare const mapInputsToDeltaType: (deltaType: string, isIncreasePositive: boolean) => string;
7
- //#endregion
8
- //# sourceMappingURL=index.d.mts.map
5
+ export declare const mapInputsToDeltaType: (deltaType: string, isIncreasePositive: boolean) => string;
@@ -1,5 +1,5 @@
1
1
  import { DeltaTypes } from "../types/charts.mjs";
2
- //#region src/utils/index.ts
2
+ // src/utils/index.ts
3
3
  const defaultValueFormatter = String;
4
4
  const sumNumericArray = (arr) => arr.reduce((prefixSum, num) => prefixSum + num, 0);
5
5
  const isOnSeverSide = typeof document === "undefined" || typeof window === "undefined";
@@ -13,7 +13,6 @@ const mapInputsToDeltaType = (deltaType, isIncreasePositive) => {
13
13
  }
14
14
  return "";
15
15
  };
16
- //#endregion
17
16
  export { defaultValueFormatter, isOnSeverSide, mapInputsToDeltaType, sumNumericArray };
18
17
 
19
18
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["import { DeltaTypes, ValueFormatter } from '@/types/charts';\n\nexport const defaultValueFormatter: ValueFormatter = String;\n\nexport const sumNumericArray = (arr: number[]) =>\n arr.reduce((prefixSum, num) => prefixSum + num, 0);\n\nexport const isOnSeverSide = typeof document === 'undefined' || typeof window === 'undefined';\n\nexport const mapInputsToDeltaType = (deltaType: string, isIncreasePositive: boolean): string => {\n if (isIncreasePositive || deltaType === DeltaTypes.Unchanged) {\n return deltaType;\n }\n switch (deltaType) {\n case DeltaTypes.Increase: {\n return DeltaTypes.Decrease;\n }\n case DeltaTypes.ModerateIncrease: {\n return DeltaTypes.ModerateDecrease;\n }\n case DeltaTypes.Decrease: {\n return DeltaTypes.Increase;\n }\n case DeltaTypes.ModerateDecrease: {\n return DeltaTypes.ModerateIncrease;\n }\n }\n return '';\n};\n"],"mappings":";;AAEA,MAAa,wBAAwC;AAErD,MAAa,mBAAmB,QAC9B,IAAI,QAAQ,WAAW,QAAQ,YAAY,KAAK,CAAC;AAEnD,MAAa,gBAAgB,OAAO,aAAa,eAAe,OAAO,WAAW;AAElF,MAAa,wBAAwB,WAAmB,uBAAwC;CAC9F,IAAI,sBAAsB,cAAc,WAAW,WACjD,OAAO;CAET,QAAQ,WAAR;EACE,KAAK,WAAW,UACd,OAAO,WAAW;EAEpB,KAAK,WAAW,kBACd,OAAO,WAAW;EAEpB,KAAK,WAAW,UACd,OAAO,WAAW;EAEpB,KAAK,WAAW,kBACd,OAAO,WAAW;CAEtB;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["import type { ValueFormatter } from '@/types/charts';\nimport { DeltaTypes } from '@/types/charts';\n\nexport const defaultValueFormatter: ValueFormatter = String;\n\nexport const sumNumericArray = (arr: number[]) =>\n arr.reduce((prefixSum, num) => prefixSum + num, 0);\n\nexport const isOnSeverSide = typeof document === 'undefined' || typeof window === 'undefined';\n\nexport const mapInputsToDeltaType = (deltaType: string, isIncreasePositive: boolean): string => {\n if (isIncreasePositive || deltaType === DeltaTypes.Unchanged) {\n return deltaType;\n }\n switch (deltaType) {\n case DeltaTypes.Increase: {\n return DeltaTypes.Decrease;\n }\n case DeltaTypes.ModerateIncrease: {\n return DeltaTypes.ModerateDecrease;\n }\n case DeltaTypes.Decrease: {\n return DeltaTypes.Increase;\n }\n case DeltaTypes.ModerateDecrease: {\n return DeltaTypes.ModerateIncrease;\n }\n }\n return '';\n};\n"],"mappings":";;AAGA,MAAa,wBAAwC;AAErD,MAAa,mBAAmB,QAC9B,IAAI,QAAQ,WAAW,QAAQ,YAAY,KAAK,CAAC;AAEnD,MAAa,gBAAgB,OAAO,aAAa,eAAe,OAAO,WAAW;AAElF,MAAa,wBAAwB,WAAmB,uBAAwC;CAC9F,IAAI,sBAAsB,cAAc,WAAW,WACjD,OAAO;CAET,QAAQ,WAAR;EACE,KAAK,WAAW,UACd,OAAO,WAAW;EAEpB,KAAK,WAAW,kBACd,OAAO,WAAW;EAEpB,KAAK,WAAW,UACd,OAAO,WAAW;EAEpB,KAAK,WAAW,kBACd,OAAO,WAAW;CAEtB;CACA,OAAO;AACT"}
@@ -1,4 +1 @@
1
- //#region src/utils/theme.d.ts
2
- export declare function createTheme(input?: string[], size?: number): string[];
3
- //#endregion
4
- //# sourceMappingURL=theme.d.mts.map
1
+ export declare function createTheme(input?: string[], size?: number): string[];
@@ -1,5 +1,5 @@
1
1
  import chroma from "chroma-js";
2
- //#region src/utils/theme.ts
2
+ // src/utils/theme.ts
3
3
  const isstringScale = (colors, size) => {
4
4
  const invalidstring = colors.find((color) => !chroma.valid(color));
5
5
  if (invalidstring) throw new Error(`Invalid color "${String(invalidstring)}" passed. All CSS color formats are accepted.`);
@@ -27,7 +27,6 @@ function createTheme(input, size = 5) {
27
27
  }
28
28
  return defaultTheme;
29
29
  }
30
- //#endregion
31
30
  export { createTheme };
32
31
 
33
32
  //# sourceMappingURL=theme.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/charts",
3
- "version": "6.0.1",
3
+ "version": "6.1.0",
4
4
  "description": "React modern charts components built on recharts",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -25,7 +25,14 @@
25
25
  "import": "./es/index.mjs",
26
26
  "default": "./es/index.mjs"
27
27
  },
28
+ "./es/Legend": "./es/Legend/index.mjs",
28
29
  "./es/utils": "./es/utils/index.mjs",
30
+ "./es/*/A2uiBarChart": "./es/*/A2uiBarChart.mjs",
31
+ "./es/*/A2uiDonutChart": "./es/*/A2uiDonutChart.mjs",
32
+ "./es/*/A2uiRadarChart": "./es/*/A2uiRadarChart.mjs",
33
+ "./es/*/A2uiScatterChart": "./es/*/A2uiScatterChart.mjs",
34
+ "./es/*/A2uiSparkChart": "./es/*/A2uiSparkChart.mjs",
35
+ "./es/*/A2uiTrendChart": "./es/*/A2uiTrendChart.mjs",
29
36
  "./es/*/ArrowRightIcon": "./es/*/ArrowRightIcon.mjs",
30
37
  "./es/*/BaseAnimationTimingProps": "./es/*/BaseAnimationTimingProps.mjs",
31
38
  "./es/*/BaseChartProps": "./es/*/BaseChartProps.mjs",
@@ -41,9 +48,13 @@
41
48
  "./es/*/DeltaBar": "./es/*/DeltaBar.mjs",
42
49
  "./es/*/DonutChartTooltip": "./es/*/DonutChartTooltip.mjs",
43
50
  "./es/*/Footer": "./es/*/Footer.mjs",
51
+ "./es/*/Frame": "./es/*/Frame.mjs",
52
+ "./es/*/HoverTooltip": "./es/*/HoverTooltip.mjs",
53
+ "./es/*/Legend": "./es/*/Legend.mjs",
44
54
  "./es/*/LegendItem": "./es/*/LegendItem.mjs",
45
55
  "./es/*/MarkerBar": "./es/*/MarkerBar.mjs",
46
56
  "./es/*/NoData": "./es/*/NoData.mjs",
57
+ "./es/*/PlacedTooltip": "./es/*/PlacedTooltip.mjs",
47
58
  "./es/*/ProgressBar": "./es/*/ProgressBar.mjs",
48
59
  "./es/*/ScatterChartTooltip": "./es/*/ScatterChartTooltip.mjs",
49
60
  "./es/*/ScatterChartTooltipRow": "./es/*/ScatterChartTooltipRow.mjs",
@@ -51,16 +62,25 @@
51
62
  "./es/*/SparkAreaChart": "./es/*/SparkAreaChart.mjs",
52
63
  "./es/*/SparkBarChart": "./es/*/SparkBarChart.mjs",
53
64
  "./es/*/SparkLineChart": "./es/*/SparkLineChart.mjs",
65
+ "./es/*/Tooltip": "./es/*/Tooltip.mjs",
54
66
  "./es/*/TrackerBlock": "./es/*/TrackerBlock.mjs",
67
+ "./es/*/a2uiStyles": "./es/*/a2uiStyles.mjs",
68
+ "./es/*/axis": "./es/*/axis.mjs",
55
69
  "./es/*/calendar": "./es/*/calendar.mjs",
56
70
  "./es/*/charts": "./es/*/charts.mjs",
71
+ "./es/*/curve": "./es/*/curve.mjs",
72
+ "./es/*/format": "./es/*/format.mjs",
57
73
  "./es/*/getMaxLabelLength": "./es/*/getMaxLabelLength.mjs",
58
74
  "./es/*/inputParser": "./es/*/inputParser.mjs",
59
75
  "./es/*/renderInactiveShape": "./es/*/renderInactiveShape.mjs",
60
76
  "./es/*/renderShape": "./es/*/renderShape.mjs",
77
+ "./es/*/scale": "./es/*/scale.mjs",
61
78
  "./es/*/styles": "./es/*/styles.mjs",
62
79
  "./es/*/theme": "./es/*/theme.mjs",
80
+ "./es/*/tokens": "./es/*/tokens.mjs",
63
81
  "./es/*/types": "./es/*/types.mjs",
82
+ "./es/*/useA2uiTheme": "./es/*/useA2uiTheme.mjs",
83
+ "./es/*/useElementWidth": "./es/*/useElementWidth.mjs",
64
84
  "./es/*/useOnWindowResize": "./es/*/useOnWindowResize.mjs",
65
85
  "./es/*/usePrefersReducedMotion": "./es/*/usePrefersReducedMotion.mjs",
66
86
  "./es/*/useThemeColorRange": "./es/*/useThemeColorRange.mjs",
@@ -79,6 +99,10 @@
79
99
  "files": [
80
100
  "es"
81
101
  ],
102
+ "workspaces": [
103
+ "*",
104
+ "packages/*"
105
+ ],
82
106
  "scripts": {
83
107
  "build": "tsdown",
84
108
  "postbuild": "node scripts/generateExports.mjs",
@@ -102,11 +126,10 @@
102
126
  "test": "vitest --passWithNoTests",
103
127
  "test:coverage": "vitest run --coverage --passWithNoTests",
104
128
  "test:update": "vitest -u",
105
- "type-check": "tsc --noEmit"
129
+ "type-check": "tsrs --noEmit"
106
130
  },
107
131
  "lint-staged": {
108
- "*.md": [
109
- "remark --quiet --output --",
132
+ "*.{md,mdx}": [
110
133
  "prettier --write --no-error-on-unmatched-pattern"
111
134
  ],
112
135
  "*.json": [
@@ -139,7 +162,7 @@
139
162
  "@lobehub/docs-kit": "^6.0.0",
140
163
  "@lobehub/fluent-emoji": "^5.0.0-beta.1",
141
164
  "@lobehub/icons": "^6.0.0-beta.1",
142
- "@lobehub/lint": "^1.26.3",
165
+ "@lobehub/lint": "^2.1.6",
143
166
  "@lobehub/ui": "^6.0.0",
144
167
  "@react-router/dev": "8.2.0",
145
168
  "@testing-library/react": "^16.3.3",
@@ -151,19 +174,20 @@
151
174
  "commitlint": "^19.8.1",
152
175
  "cross-env": "^10.1.0",
153
176
  "dpdm": "^3.15.1",
154
- "eslint": "^8.57.1",
177
+ "eslint": "^10.12.0",
155
178
  "husky": "^9.1.7",
156
179
  "jsdom": "^27.4.0",
157
180
  "lint-staged": "^16.4.0",
158
- "prettier": "^3.9.8",
181
+ "prettier": "^3.9.10",
159
182
  "react": "^19.3.0",
160
183
  "react-dom": "^19.3.0",
161
184
  "react-router": "8.2.0",
162
185
  "remark": "^15.0.1",
163
186
  "remark-cli": "^12.0.1",
164
187
  "semantic-release": "^21.1.2",
165
- "stylelint": "^15.11.0",
188
+ "stylelint": "^16.26.1",
166
189
  "tsdown": "^0.23.1",
190
+ "tsrs": "0.18.0-ts7.1.0-dev.20260929",
167
191
  "tsx": "^4.23.15",
168
192
  "typescript": "^5.9.3",
169
193
  "vite": "8.1.4",