@krizaka/charts 0.0.0-stage → 0.2.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 (388) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +59 -2
  3. package/dist/bar.d.ts +17 -0
  4. package/dist/bar.js +17 -0
  5. package/dist/bar.js.map +1 -0
  6. package/dist/candlestick-IG626XL4.js +13 -0
  7. package/dist/candlestick-IG626XL4.js.map +1 -0
  8. package/dist/candlestick.d.ts +42 -0
  9. package/dist/candlestick.js +13 -0
  10. package/dist/candlestick.js.map +1 -0
  11. package/dist/canvas-4MSYDVFO.js +14 -0
  12. package/dist/canvas-4MSYDVFO.js.map +1 -0
  13. package/dist/cartesian-BRhNQ3ib.d.ts +34 -0
  14. package/dist/chart.d.ts +58 -0
  15. package/dist/chart.js +11 -0
  16. package/dist/chart.js.map +1 -0
  17. package/dist/chunk-3CJHBJXA.js +186 -0
  18. package/dist/chunk-3CJHBJXA.js.map +1 -0
  19. package/dist/chunk-4LBXEAGC.js +133 -0
  20. package/dist/chunk-4LBXEAGC.js.map +1 -0
  21. package/dist/chunk-6FINSUOS.js +49 -0
  22. package/dist/chunk-6FINSUOS.js.map +1 -0
  23. package/dist/chunk-AA5EWWYV.js +38 -0
  24. package/dist/chunk-AA5EWWYV.js.map +1 -0
  25. package/dist/chunk-ANUCSRUN.js +43 -0
  26. package/dist/chunk-ANUCSRUN.js.map +1 -0
  27. package/dist/chunk-ARARFMNE.js +88 -0
  28. package/dist/chunk-ARARFMNE.js.map +1 -0
  29. package/dist/chunk-BISL7DYW.js +66 -0
  30. package/dist/chunk-BISL7DYW.js.map +1 -0
  31. package/dist/chunk-BV4DBGN7.js +178 -0
  32. package/dist/chunk-BV4DBGN7.js.map +1 -0
  33. package/dist/chunk-C4MFZLJM.js +19 -0
  34. package/dist/chunk-C4MFZLJM.js.map +1 -0
  35. package/dist/chunk-CSSZLFLO.js +116 -0
  36. package/dist/chunk-CSSZLFLO.js.map +1 -0
  37. package/dist/chunk-CVWSMUUB.js +378 -0
  38. package/dist/chunk-CVWSMUUB.js.map +1 -0
  39. package/dist/chunk-E5DKBSWX.js +2 -0
  40. package/dist/chunk-E5DKBSWX.js.map +1 -0
  41. package/dist/chunk-EEP7PS2L.js +54 -0
  42. package/dist/chunk-EEP7PS2L.js.map +1 -0
  43. package/dist/chunk-EQLC2QVN.js +73 -0
  44. package/dist/chunk-EQLC2QVN.js.map +1 -0
  45. package/dist/chunk-FINOPIDN.js +2 -0
  46. package/dist/chunk-FINOPIDN.js.map +1 -0
  47. package/dist/chunk-G2KF2WL4.js +2 -0
  48. package/dist/chunk-G2KF2WL4.js.map +1 -0
  49. package/dist/chunk-I3D7KUGN.js +205 -0
  50. package/dist/chunk-I3D7KUGN.js.map +1 -0
  51. package/dist/chunk-IKQV3NSL.js +76 -0
  52. package/dist/chunk-IKQV3NSL.js.map +1 -0
  53. package/dist/chunk-JTKR7ZWP.js +468 -0
  54. package/dist/chunk-JTKR7ZWP.js.map +1 -0
  55. package/dist/chunk-KNDHO67X.js +78 -0
  56. package/dist/chunk-KNDHO67X.js.map +1 -0
  57. package/dist/chunk-L2EKYWVI.js +94 -0
  58. package/dist/chunk-L2EKYWVI.js.map +1 -0
  59. package/dist/chunk-MXLITIGU.js +92 -0
  60. package/dist/chunk-MXLITIGU.js.map +1 -0
  61. package/dist/chunk-NCIQMRV3.js +155 -0
  62. package/dist/chunk-NCIQMRV3.js.map +1 -0
  63. package/dist/chunk-OB5EFDDH.js +118 -0
  64. package/dist/chunk-OB5EFDDH.js.map +1 -0
  65. package/dist/chunk-OIRHLJBC.js +83 -0
  66. package/dist/chunk-OIRHLJBC.js.map +1 -0
  67. package/dist/chunk-PBQV3B6O.js +145 -0
  68. package/dist/chunk-PBQV3B6O.js.map +1 -0
  69. package/dist/chunk-POQIHFAZ.js +2 -0
  70. package/dist/chunk-POQIHFAZ.js.map +1 -0
  71. package/dist/chunk-PWMMXRMC.js +234 -0
  72. package/dist/chunk-PWMMXRMC.js.map +1 -0
  73. package/dist/chunk-SLEJDQ3A.js +81 -0
  74. package/dist/chunk-SLEJDQ3A.js.map +1 -0
  75. package/dist/chunk-TPJDOB7R.js +15 -0
  76. package/dist/chunk-TPJDOB7R.js.map +1 -0
  77. package/dist/chunk-VKZZY2QD.js +103 -0
  78. package/dist/chunk-VKZZY2QD.js.map +1 -0
  79. package/dist/chunk-W5FX4TU3.js +102 -0
  80. package/dist/chunk-W5FX4TU3.js.map +1 -0
  81. package/dist/chunk-W5ILLSPK.js +107 -0
  82. package/dist/chunk-W5ILLSPK.js.map +1 -0
  83. package/dist/chunk-WBHFVBSK.js +25 -0
  84. package/dist/chunk-WBHFVBSK.js.map +1 -0
  85. package/dist/chunk-WNUFGMS7.js +113 -0
  86. package/dist/chunk-WNUFGMS7.js.map +1 -0
  87. package/dist/chunk-WVTIKOII.js +15 -0
  88. package/dist/chunk-WVTIKOII.js.map +1 -0
  89. package/dist/chunk-XDDALY4C.js +166 -0
  90. package/dist/chunk-XDDALY4C.js.map +1 -0
  91. package/dist/chunk-XLLYNNC6.js +89 -0
  92. package/dist/chunk-XLLYNNC6.js.map +1 -0
  93. package/dist/context-BgYUymEO.d.ts +163 -0
  94. package/dist/credits.d.ts +42 -0
  95. package/dist/credits.js +21 -0
  96. package/dist/credits.js.map +1 -0
  97. package/dist/earnings.d.ts +29 -0
  98. package/dist/earnings.js +22 -0
  99. package/dist/earnings.js.map +1 -0
  100. package/dist/frame-I7_xYGy5.d.ts +45 -0
  101. package/dist/full-S2MBPEEP.js +11 -0
  102. package/dist/full-S2MBPEEP.js.map +1 -0
  103. package/dist/funnel-QU5ZPC52.js +13 -0
  104. package/dist/funnel-QU5ZPC52.js.map +1 -0
  105. package/dist/funnel.d.ts +26 -0
  106. package/dist/funnel.js +13 -0
  107. package/dist/funnel.js.map +1 -0
  108. package/dist/gauge.d.ts +38 -0
  109. package/dist/gauge.js +13 -0
  110. package/dist/gauge.js.map +1 -0
  111. package/dist/geo.d.ts +37 -0
  112. package/dist/geo.js +13 -0
  113. package/dist/geo.js.map +1 -0
  114. package/dist/globe.d.ts +36 -0
  115. package/dist/globe.js +12 -0
  116. package/dist/globe.js.map +1 -0
  117. package/dist/goal.d.ts +26 -0
  118. package/dist/goal.js +17 -0
  119. package/dist/goal.js.map +1 -0
  120. package/dist/heatmap-JWQOKUGM.js +13 -0
  121. package/dist/heatmap-JWQOKUGM.js.map +1 -0
  122. package/dist/heatmap.d.ts +47 -0
  123. package/dist/heatmap.js +15 -0
  124. package/dist/heatmap.js.map +1 -0
  125. package/dist/host-_F8RgiIz.d.ts +15 -0
  126. package/dist/index.d.ts +29 -0
  127. package/dist/index.js +148 -0
  128. package/dist/index.js.map +1 -0
  129. package/dist/labels-DE_743fQ.d.ts +72 -0
  130. package/dist/latency.d.ts +33 -0
  131. package/dist/latency.js +24 -0
  132. package/dist/latency.js.map +1 -0
  133. package/dist/line.d.ts +25 -0
  134. package/dist/line.js +19 -0
  135. package/dist/line.js.map +1 -0
  136. package/dist/native.d.ts +494 -0
  137. package/dist/native.js +1244 -0
  138. package/dist/native.js.map +1 -0
  139. package/dist/pie.d.ts +37 -0
  140. package/dist/pie.js +16 -0
  141. package/dist/pie.js.map +1 -0
  142. package/dist/provider.d.ts +73 -0
  143. package/dist/provider.js +24 -0
  144. package/dist/provider.js.map +1 -0
  145. package/dist/radar-75GRJ2IK.js +13 -0
  146. package/dist/radar-75GRJ2IK.js.map +1 -0
  147. package/dist/radar.d.ts +22 -0
  148. package/dist/radar.js +13 -0
  149. package/dist/radar.js.map +1 -0
  150. package/dist/sankey-XQTX2EG6.js +13 -0
  151. package/dist/sankey-XQTX2EG6.js.map +1 -0
  152. package/dist/sankey.d.ts +28 -0
  153. package/dist/sankey.js +13 -0
  154. package/dist/sankey.js.map +1 -0
  155. package/dist/scatter-XSNG4OKD.js +13 -0
  156. package/dist/scatter-XSNG4OKD.js.map +1 -0
  157. package/dist/scatter.d.ts +41 -0
  158. package/dist/scatter.js +15 -0
  159. package/dist/scatter.js.map +1 -0
  160. package/dist/sparkline.d.ts +26 -0
  161. package/dist/sparkline.js +16 -0
  162. package/dist/sparkline.js.map +1 -0
  163. package/dist/svg-BJUHYX3B.js +14 -0
  164. package/dist/svg-BJUHYX3B.js.map +1 -0
  165. package/dist/throughput.d.ts +37 -0
  166. package/dist/throughput.js +24 -0
  167. package/dist/throughput.js.map +1 -0
  168. package/dist/ticker.d.ts +38 -0
  169. package/dist/ticker.js +22 -0
  170. package/dist/ticker.js.map +1 -0
  171. package/dist/treemap-OMGGGB5U.js +13 -0
  172. package/dist/treemap-OMGGGB5U.js.map +1 -0
  173. package/dist/treemap.d.ts +24 -0
  174. package/dist/treemap.js +14 -0
  175. package/dist/treemap.js.map +1 -0
  176. package/dist/world-110m-DVFWXS42.js +18 -0
  177. package/dist/world-110m-DVFWXS42.js.map +1 -0
  178. package/package.json +614 -3
  179. package/registry/area-chart.json +785 -0
  180. package/registry/bar-chart.json +784 -0
  181. package/registry/calendar-heatmap.json +460 -0
  182. package/registry/candlestick.json +553 -0
  183. package/registry/chart.json +441 -0
  184. package/registry/charts-provider.json +191 -0
  185. package/registry/credit-usage.json +473 -0
  186. package/registry/earnings-chart.json +703 -0
  187. package/registry/examples/area-chart/credits-usage.d.ts +4 -0
  188. package/registry/examples/area-chart/credits-usage.js +38 -0
  189. package/registry/examples/area-chart/credits-usage.tsx +32 -0
  190. package/registry/examples/area-chart/native/credits-usage.d.ts +4 -0
  191. package/registry/examples/area-chart/native/credits-usage.dark.png +0 -0
  192. package/registry/examples/area-chart/native/credits-usage.js +33 -0
  193. package/registry/examples/area-chart/native/credits-usage.light.png +0 -0
  194. package/registry/examples/area-chart/native/credits-usage.tsx +27 -0
  195. package/registry/examples/area-chart/storage.d.ts +4 -0
  196. package/registry/examples/area-chart/storage.js +27 -0
  197. package/registry/examples/area-chart/storage.tsx +21 -0
  198. package/registry/examples/bar-chart/jobs-by-status.d.ts +4 -0
  199. package/registry/examples/bar-chart/jobs-by-status.js +37 -0
  200. package/registry/examples/bar-chart/jobs-by-status.tsx +31 -0
  201. package/registry/examples/bar-chart/native/jobs-by-status.d.ts +4 -0
  202. package/registry/examples/bar-chart/native/jobs-by-status.dark.png +0 -0
  203. package/registry/examples/bar-chart/native/jobs-by-status.js +32 -0
  204. package/registry/examples/bar-chart/native/jobs-by-status.light.png +0 -0
  205. package/registry/examples/bar-chart/native/jobs-by-status.tsx +26 -0
  206. package/registry/examples/bar-chart/plans-by-quarter.d.ts +4 -0
  207. package/registry/examples/bar-chart/plans-by-quarter.js +31 -0
  208. package/registry/examples/bar-chart/plans-by-quarter.tsx +26 -0
  209. package/registry/examples/bar-chart/top-supporters.d.ts +4 -0
  210. package/registry/examples/bar-chart/top-supporters.js +32 -0
  211. package/registry/examples/bar-chart/top-supporters.tsx +27 -0
  212. package/registry/examples/calendar-heatmap/publishing.d.ts +4 -0
  213. package/registry/examples/calendar-heatmap/publishing.js +28 -0
  214. package/registry/examples/calendar-heatmap/publishing.tsx +23 -0
  215. package/registry/examples/candlestick/auction-bids.d.ts +4 -0
  216. package/registry/examples/candlestick/auction-bids.js +37 -0
  217. package/registry/examples/candlestick/auction-bids.tsx +32 -0
  218. package/registry/examples/chart/polar-uploads.d.ts +4 -0
  219. package/registry/examples/chart/polar-uploads.js +34 -0
  220. package/registry/examples/chart/polar-uploads.tsx +30 -0
  221. package/registry/examples/charts-provider/french-orazaka.d.ts +4 -0
  222. package/registry/examples/charts-provider/french-orazaka.js +26 -0
  223. package/registry/examples/charts-provider/french-orazaka.tsx +22 -0
  224. package/registry/examples/charts-provider/native/french-orazaka.d.ts +4 -0
  225. package/registry/examples/charts-provider/native/french-orazaka.dark.png +0 -0
  226. package/registry/examples/charts-provider/native/french-orazaka.js +17 -0
  227. package/registry/examples/charts-provider/native/french-orazaka.light.png +0 -0
  228. package/registry/examples/charts-provider/native/french-orazaka.tsx +17 -0
  229. package/registry/examples/credit-usage/monthly-credits.d.ts +4 -0
  230. package/registry/examples/credit-usage/monthly-credits.js +24 -0
  231. package/registry/examples/credit-usage/monthly-credits.tsx +19 -0
  232. package/registry/examples/credit-usage/native/monthly-credits.d.ts +4 -0
  233. package/registry/examples/credit-usage/native/monthly-credits.dark.png +0 -0
  234. package/registry/examples/credit-usage/native/monthly-credits.js +23 -0
  235. package/registry/examples/credit-usage/native/monthly-credits.light.png +0 -0
  236. package/registry/examples/credit-usage/native/monthly-credits.tsx +18 -0
  237. package/registry/examples/credit-usage/storage-plan.d.ts +4 -0
  238. package/registry/examples/credit-usage/storage-plan.js +21 -0
  239. package/registry/examples/credit-usage/storage-plan.tsx +15 -0
  240. package/registry/examples/earnings-chart/creator-month.d.ts +4 -0
  241. package/registry/examples/earnings-chart/creator-month.js +29 -0
  242. package/registry/examples/earnings-chart/creator-month.tsx +24 -0
  243. package/registry/examples/earnings-chart/gross-and-net.d.ts +4 -0
  244. package/registry/examples/earnings-chart/gross-and-net.js +29 -0
  245. package/registry/examples/earnings-chart/gross-and-net.tsx +24 -0
  246. package/registry/examples/earnings-chart/native/creator-month.d.ts +4 -0
  247. package/registry/examples/earnings-chart/native/creator-month.dark.png +0 -0
  248. package/registry/examples/earnings-chart/native/creator-month.js +29 -0
  249. package/registry/examples/earnings-chart/native/creator-month.light.png +0 -0
  250. package/registry/examples/earnings-chart/native/creator-month.tsx +24 -0
  251. package/registry/examples/funnel/signup.d.ts +4 -0
  252. package/registry/examples/funnel/signup.js +30 -0
  253. package/registry/examples/funnel/signup.tsx +24 -0
  254. package/registry/examples/gauge/challenge-goal.d.ts +4 -0
  255. package/registry/examples/gauge/challenge-goal.js +24 -0
  256. package/registry/examples/gauge/challenge-goal.tsx +18 -0
  257. package/registry/examples/gauge/credits-quota.d.ts +4 -0
  258. package/registry/examples/gauge/credits-quota.js +26 -0
  259. package/registry/examples/gauge/credits-quota.tsx +19 -0
  260. package/registry/examples/gauge/native/credits-quota.d.ts +4 -0
  261. package/registry/examples/gauge/native/credits-quota.dark.png +0 -0
  262. package/registry/examples/gauge/native/credits-quota.js +25 -0
  263. package/registry/examples/gauge/native/credits-quota.light.png +0 -0
  264. package/registry/examples/gauge/native/credits-quota.tsx +18 -0
  265. package/registry/examples/geo-map/viewers.d.ts +4 -0
  266. package/registry/examples/geo-map/viewers.js +43 -0
  267. package/registry/examples/geo-map/viewers.tsx +29 -0
  268. package/registry/examples/globe/deployment-regions.d.ts +4 -0
  269. package/registry/examples/globe/deployment-regions.js +36 -0
  270. package/registry/examples/globe/deployment-regions.tsx +30 -0
  271. package/registry/examples/goal-progress/challenge-pot.d.ts +4 -0
  272. package/registry/examples/goal-progress/challenge-pot.js +22 -0
  273. package/registry/examples/goal-progress/challenge-pot.tsx +16 -0
  274. package/registry/examples/goal-progress/goal-reached.d.ts +4 -0
  275. package/registry/examples/goal-progress/goal-reached.js +11 -0
  276. package/registry/examples/goal-progress/goal-reached.tsx +6 -0
  277. package/registry/examples/goal-progress/native/challenge-pot.d.ts +4 -0
  278. package/registry/examples/goal-progress/native/challenge-pot.dark.png +0 -0
  279. package/registry/examples/goal-progress/native/challenge-pot.js +11 -0
  280. package/registry/examples/goal-progress/native/challenge-pot.light.png +0 -0
  281. package/registry/examples/goal-progress/native/challenge-pot.tsx +6 -0
  282. package/registry/examples/heatmap/upload-activity.d.ts +4 -0
  283. package/registry/examples/heatmap/upload-activity.js +30 -0
  284. package/registry/examples/heatmap/upload-activity.tsx +25 -0
  285. package/registry/examples/job-throughput/live-hours.d.ts +4 -0
  286. package/registry/examples/job-throughput/live-hours.js +33 -0
  287. package/registry/examples/job-throughput/live-hours.tsx +28 -0
  288. package/registry/examples/job-throughput/native/week-of-jobs.d.ts +4 -0
  289. package/registry/examples/job-throughput/native/week-of-jobs.dark.png +0 -0
  290. package/registry/examples/job-throughput/native/week-of-jobs.js +20 -0
  291. package/registry/examples/job-throughput/native/week-of-jobs.light.png +0 -0
  292. package/registry/examples/job-throughput/native/week-of-jobs.tsx +16 -0
  293. package/registry/examples/job-throughput/week-of-jobs.d.ts +4 -0
  294. package/registry/examples/job-throughput/week-of-jobs.js +20 -0
  295. package/registry/examples/job-throughput/week-of-jobs.tsx +16 -0
  296. package/registry/examples/latency-chart/by-capability.d.ts +4 -0
  297. package/registry/examples/latency-chart/by-capability.js +26 -0
  298. package/registry/examples/latency-chart/by-capability.tsx +21 -0
  299. package/registry/examples/latency-chart/native/by-capability.d.ts +4 -0
  300. package/registry/examples/latency-chart/native/by-capability.dark.png +0 -0
  301. package/registry/examples/latency-chart/native/by-capability.js +17 -0
  302. package/registry/examples/latency-chart/native/by-capability.light.png +0 -0
  303. package/registry/examples/latency-chart/native/by-capability.tsx +13 -0
  304. package/registry/examples/latency-chart/time-to-result.d.ts +4 -0
  305. package/registry/examples/latency-chart/time-to-result.js +27 -0
  306. package/registry/examples/latency-chart/time-to-result.tsx +22 -0
  307. package/registry/examples/line-chart/creator-earnings.d.ts +4 -0
  308. package/registry/examples/line-chart/creator-earnings.js +35 -0
  309. package/registry/examples/line-chart/creator-earnings.tsx +30 -0
  310. package/registry/examples/line-chart/forecast.d.ts +4 -0
  311. package/registry/examples/line-chart/forecast.js +36 -0
  312. package/registry/examples/line-chart/forecast.tsx +30 -0
  313. package/registry/examples/line-chart/live-jobs.d.ts +4 -0
  314. package/registry/examples/line-chart/live-jobs.js +21 -0
  315. package/registry/examples/line-chart/live-jobs.tsx +23 -0
  316. package/registry/examples/line-chart/native/creator-earnings.d.ts +4 -0
  317. package/registry/examples/line-chart/native/creator-earnings.dark.png +0 -0
  318. package/registry/examples/line-chart/native/creator-earnings.js +32 -0
  319. package/registry/examples/line-chart/native/creator-earnings.light.png +0 -0
  320. package/registry/examples/line-chart/native/creator-earnings.tsx +26 -0
  321. package/registry/examples/line-chart/states.d.ts +4 -0
  322. package/registry/examples/line-chart/states.js +16 -0
  323. package/registry/examples/line-chart/states.tsx +13 -0
  324. package/registry/examples/pie-chart/credit-spend.d.ts +4 -0
  325. package/registry/examples/pie-chart/credit-spend.js +30 -0
  326. package/registry/examples/pie-chart/credit-spend.tsx +24 -0
  327. package/registry/examples/pie-chart/native/credit-spend.d.ts +4 -0
  328. package/registry/examples/pie-chart/native/credit-spend.dark.png +0 -0
  329. package/registry/examples/pie-chart/native/credit-spend.js +17 -0
  330. package/registry/examples/pie-chart/native/credit-spend.light.png +0 -0
  331. package/registry/examples/pie-chart/native/credit-spend.tsx +12 -0
  332. package/registry/examples/pie-chart/storage-by-kind.d.ts +4 -0
  333. package/registry/examples/pie-chart/storage-by-kind.js +31 -0
  334. package/registry/examples/pie-chart/storage-by-kind.tsx +26 -0
  335. package/registry/examples/price-ticker/auction-room.d.ts +4 -0
  336. package/registry/examples/price-ticker/auction-room.js +21 -0
  337. package/registry/examples/price-ticker/auction-room.tsx +17 -0
  338. package/registry/examples/price-ticker/native/auction-room.d.ts +4 -0
  339. package/registry/examples/price-ticker/native/auction-room.dark.png +0 -0
  340. package/registry/examples/price-ticker/native/auction-room.js +19 -0
  341. package/registry/examples/price-ticker/native/auction-room.light.png +0 -0
  342. package/registry/examples/price-ticker/native/auction-room.tsx +15 -0
  343. package/registry/examples/price-ticker/no-bid-yet.d.ts +4 -0
  344. package/registry/examples/price-ticker/no-bid-yet.js +11 -0
  345. package/registry/examples/price-ticker/no-bid-yet.tsx +6 -0
  346. package/registry/examples/radar-chart/model-comparison.d.ts +4 -0
  347. package/registry/examples/radar-chart/model-comparison.js +33 -0
  348. package/registry/examples/radar-chart/model-comparison.tsx +28 -0
  349. package/registry/examples/sankey/credit-flow.d.ts +4 -0
  350. package/registry/examples/sankey/credit-flow.js +37 -0
  351. package/registry/examples/sankey/credit-flow.tsx +32 -0
  352. package/registry/examples/scatter-chart/watch-time.d.ts +4 -0
  353. package/registry/examples/scatter-chart/watch-time.js +36 -0
  354. package/registry/examples/scatter-chart/watch-time.tsx +31 -0
  355. package/registry/examples/sparkline/bars.d.ts +4 -0
  356. package/registry/examples/sparkline/bars.js +12 -0
  357. package/registry/examples/sparkline/bars.tsx +7 -0
  358. package/registry/examples/sparkline/native/stat-trend.d.ts +4 -0
  359. package/registry/examples/sparkline/native/stat-trend.dark.png +0 -0
  360. package/registry/examples/sparkline/native/stat-trend.js +12 -0
  361. package/registry/examples/sparkline/native/stat-trend.light.png +0 -0
  362. package/registry/examples/sparkline/native/stat-trend.tsx +7 -0
  363. package/registry/examples/sparkline/stat-trend.d.ts +4 -0
  364. package/registry/examples/sparkline/stat-trend.js +18 -0
  365. package/registry/examples/sparkline/stat-trend.tsx +15 -0
  366. package/registry/examples/sparkline/table-rows.d.ts +4 -0
  367. package/registry/examples/sparkline/table-rows.js +23 -0
  368. package/registry/examples/sparkline/table-rows.tsx +26 -0
  369. package/registry/examples/treemap/storage.d.ts +4 -0
  370. package/registry/examples/treemap/storage.js +17 -0
  371. package/registry/examples/treemap/storage.tsx +13 -0
  372. package/registry/funnel.json +487 -0
  373. package/registry/gauge.json +600 -0
  374. package/registry/geo-map.json +484 -0
  375. package/registry/globe.json +469 -0
  376. package/registry/goal-progress.json +520 -0
  377. package/registry/heatmap.json +531 -0
  378. package/registry/index.json +582 -0
  379. package/registry/job-throughput.json +654 -0
  380. package/registry/latency-chart.json +671 -0
  381. package/registry/line-chart.json +793 -0
  382. package/registry/pie-chart.json +1288 -0
  383. package/registry/price-ticker.json +684 -0
  384. package/registry/radar-chart.json +459 -0
  385. package/registry/sankey.json +503 -0
  386. package/registry/scatter-chart.json +559 -0
  387. package/registry/sparkline.json +563 -0
  388. package/registry/treemap.json +432 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/shape.ts"],"sourcesContent":["// SVG path data for the marks: lines (linear, monotone, step), areas, bars with a rounded data end, arcs. Shared by\n// the web (`<path d>`) and React Native (react-native-svg's `<Path d>`): the same geometry on both platforms.\n\nexport type Point = readonly [number, number];\nexport type Curve = \"linear\" | \"monotone\" | \"step\";\n\nconst r = (n: number) => Math.round(n * 100) / 100;\n\n/** The segments of a line, split where a value is missing (a gap stays a gap, never a fake zero). */\nexport function segments(points: readonly (Point | null)[]): Point[][] {\n const out: Point[][] = [];\n let current: Point[] = [];\n for (const point of points) {\n if (point) current.push(point);\n else if (current.length) {\n out.push(current);\n current = [];\n }\n }\n if (current.length) out.push(current);\n return out;\n}\n\n/** The path of one segment. `monotone` (Fritsch–Carlson) never overshoots: a curve that never invents a peak. */\nexport function linePath(points: readonly Point[], curve: Curve = \"monotone\"): string {\n if (points.length === 0) return \"\";\n const [x0, y0] = points[0]!;\n if (points.length === 1) return `M${r(x0)},${r(y0)}`;\n if (curve === \"step\") {\n let d = `M${r(x0)},${r(y0)}`;\n for (let i = 1; i < points.length; i += 1) {\n const [px] = points[i - 1]!;\n const [x, y] = points[i]!;\n const mid = (px + x) / 2;\n d += `H${r(mid)}V${r(y)}H${r(x)}`;\n }\n return d;\n }\n if (curve === \"linear\" || points.length === 2) return points.map(([x, y], i) => `${i ? \"L\" : \"M\"}${r(x)},${r(y)}`).join(\"\");\n const tangents = monotoneTangents(points);\n let d = `M${r(x0)},${r(y0)}`;\n for (let i = 1; i < points.length; i += 1) {\n const [xa, ya] = points[i - 1]!;\n const [xb, yb] = points[i]!;\n const h = (xb - xa) / 3;\n d += `C${r(xa + h)},${r(ya + h * tangents[i - 1]!)} ${r(xb - h)},${r(yb - h * tangents[i]!)} ${r(xb)},${r(yb)}`;\n }\n return d;\n}\n\nfunction monotoneTangents(points: readonly Point[]): number[] {\n const n = points.length;\n const slopes: number[] = [];\n for (let i = 0; i < n - 1; i += 1) {\n const [xa, ya] = points[i]!;\n const [xb, yb] = points[i + 1]!;\n slopes.push(xb === xa ? 0 : (yb - ya) / (xb - xa));\n }\n const tangents = [slopes[0]!];\n for (let i = 1; i < n - 1; i += 1) {\n const a = slopes[i - 1]!;\n const b = slopes[i]!;\n tangents.push(a * b <= 0 ? 0 : (3 * a * b) / (Math.max(a, b) * 2 + Math.min(a, b)) || 0);\n }\n tangents.push(slopes[n - 2]!);\n return tangents;\n}\n\n/** An area under (or between) lines: the top points left to right, then the base right to left. */\nexport function areaPath(top: readonly Point[], base: readonly Point[] | number, curve: Curve = \"monotone\"): string {\n if (top.length === 0) return \"\";\n const line = linePath(top, curve);\n const bottom: Point[] = typeof base === \"number\" ? [top[top.length - 1]!, top[0]!].map(([x]) => [x, base] as Point) : [...base].reverse();\n if (typeof base === \"number\") return `${line}L${r(bottom[0]![0])},${r(base)}L${r(bottom[1]![0])},${r(base)}Z`;\n return `${line}L${linePath(bottom, curve).slice(1)}Z`;\n}\n\n/**\n * A bar from its baseline to its value, the data end rounded (`radius`, 4 px by default), square on the baseline.\n * `horizontal` bars grow to the right (or left for a negative value).\n */\nexport function barPath(x: number, y: number, width: number, height: number, radius = 4, horizontal = false, negative = false): string {\n if (width <= 0 || height <= 0) return \"\";\n const rad = Math.min(radius, horizontal ? height / 2 : width / 2, horizontal ? width : height);\n if (!horizontal) {\n if (!negative) {\n // Rounded at the top, square at the baseline (bottom).\n return `M${r(x)},${r(y + height)}V${r(y + rad)}Q${r(x)},${r(y)} ${r(x + rad)},${r(y)}H${r(x + width - rad)}Q${r(x + width)},${r(y)} ${r(x + width)},${r(y + rad)}V${r(y + height)}Z`;\n }\n return `M${r(x)},${r(y)}V${r(y + height - rad)}Q${r(x)},${r(y + height)} ${r(x + rad)},${r(y + height)}H${r(x + width - rad)}Q${r(x + width)},${r(y + height)} ${r(x + width)},${r(y + height - rad)}V${r(y)}Z`;\n }\n if (!negative) {\n return `M${r(x)},${r(y)}H${r(x + width - rad)}Q${r(x + width)},${r(y)} ${r(x + width)},${r(y + rad)}V${r(y + height - rad)}Q${r(x + width)},${r(y + height)} ${r(x + width - rad)},${r(y + height)}H${r(x)}Z`;\n }\n return `M${r(x + width)},${r(y)}H${r(x + rad)}Q${r(x)},${r(y)} ${r(x)},${r(y + rad)}V${r(y + height - rad)}Q${r(x)},${r(y + height)} ${r(x + rad)},${r(y + height)}H${r(x + width)}Z`;\n}\n\n/** A point on a circle, the angle in radians from twelve o'clock, clockwise. */\nexport function polar(cx: number, cy: number, radius: number, angle: number): Point {\n return [cx + radius * Math.sin(angle), cy - radius * Math.cos(angle)];\n}\n\n/**\n * A ring sector (a pie slice when `inner` is 0), from `start` to `end` (radians, clockwise from twelve o'clock).\n * A full turn is drawn as two halves: an SVG arc cannot start and end on the same point.\n */\nexport function arcPath(cx: number, cy: number, inner: number, outer: number, start: number, end: number): string {\n const sweep = end - start;\n if (sweep <= 0 || outer <= 0) return \"\";\n if (sweep >= Math.PI * 2 - 1e-6) {\n const mid = start + Math.PI;\n return `${arcPath(cx, cy, inner, outer, start, mid)}${arcPath(cx, cy, inner, outer, mid, start + Math.PI * 2)}`;\n }\n const large = sweep > Math.PI ? 1 : 0;\n const [ox0, oy0] = polar(cx, cy, outer, start);\n const [ox1, oy1] = polar(cx, cy, outer, end);\n let d = `M${r(ox0)},${r(oy0)}A${r(outer)},${r(outer)} 0 ${large} 1 ${r(ox1)},${r(oy1)}`;\n if (inner > 0) {\n const [ix1, iy1] = polar(cx, cy, inner, end);\n const [ix0, iy0] = polar(cx, cy, inner, start);\n d += `L${r(ix1)},${r(iy1)}A${r(inner)},${r(inner)} 0 ${large} 0 ${r(ix0)},${r(iy0)}Z`;\n } else d += `L${r(cx)},${r(cy)}Z`;\n return d;\n}\n\n/** An open arc (a gauge's track), stroked rather than filled. */\nexport function strokeArcPath(cx: number, cy: number, radius: number, start: number, end: number): string {\n if (end - start <= 0) return \"\";\n const [x0, y0] = polar(cx, cy, radius, start);\n const [x1, y1] = polar(cx, cy, radius, end);\n return `M${r(x0)},${r(y0)}A${r(radius)},${r(radius)} 0 ${end - start > Math.PI ? 1 : 0} 1 ${r(x1)},${r(y1)}`;\n}\n"],"mappings":";;;AAMA,IAAM,IAAI,CAAC,MAAc,KAAK,MAAM,IAAI,GAAG,IAAI;AAGxC,SAAS,SAAS,QAA8C;AACrE,QAAM,MAAiB,CAAC;AACxB,MAAI,UAAmB,CAAC;AACxB,aAAW,SAAS,QAAQ;AAC1B,QAAI,MAAO,SAAQ,KAAK,KAAK;AAAA,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EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,MAAM,QAAQ,KAAK,KAAK,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;AAC5G;","names":["d"]}
@@ -0,0 +1,83 @@
1
+ "use client";
2
+ import {
3
+ BarChart
4
+ } from "./chunk-WVTIKOII.js";
5
+ import {
6
+ Kpi,
7
+ toneOf
8
+ } from "./chunk-WBHFVBSK.js";
9
+ import {
10
+ EARNINGS_LABELS,
11
+ direction,
12
+ fillIn,
13
+ lastChange,
14
+ numberOf,
15
+ signedPercent,
16
+ total
17
+ } from "./chunk-WNUFGMS7.js";
18
+ import {
19
+ valueFormatter
20
+ } from "./chunk-XLLYNNC6.js";
21
+ import {
22
+ useSettings
23
+ } from "./chunk-JTKR7ZWP.js";
24
+
25
+ // src/earnings/earnings-chart.tsx
26
+ import { useMemo } from "react";
27
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
28
+ function EarningsChart({
29
+ x = "month",
30
+ net,
31
+ gross,
32
+ currency,
33
+ period = "month",
34
+ payoutThreshold,
35
+ hideSummary,
36
+ labels: given,
37
+ description,
38
+ data,
39
+ ...props
40
+ }) {
41
+ const words = { ...EARNINGS_LABELS, ...given };
42
+ const { locale } = useSettings(props);
43
+ const format = { style: "money", currency };
44
+ const series = useMemo(
45
+ () => gross ? [{ key: gross, label: words.gross, color: 2 }, { key: net, label: words.net, color: 1 }] : [{ key: net, label: words.net, color: 1 }],
46
+ [gross, net, words.gross, words.net]
47
+ );
48
+ const values = data.map((row, i) => numberOf(row, net, i));
49
+ const change = lastChange(values);
50
+ const way = direction(change);
51
+ const summary = hideSummary ? null : /* @__PURE__ */ jsx(
52
+ Kpi,
53
+ {
54
+ value: valueFormatter(format, locale)(total(data, net)),
55
+ label: fillIn(words.total, { count: data.length }),
56
+ delta: change == null ? null : fillIn(words.change, { change: signedPercent(change, locale) }),
57
+ direction: way,
58
+ tone: toneOf(way, "up")
59
+ }
60
+ );
61
+ return /* @__PURE__ */ jsx(
62
+ BarChart,
63
+ {
64
+ ...props,
65
+ data,
66
+ x,
67
+ series,
68
+ format,
69
+ xFormat: period,
70
+ thresholds: payoutThreshold ? [{ tone: "success", ...payoutThreshold }] : void 0,
71
+ description: description || summary ? /* @__PURE__ */ jsxs(Fragment, { children: [
72
+ description,
73
+ description && summary ? /* @__PURE__ */ jsx("br", {}) : null,
74
+ summary
75
+ ] }) : void 0
76
+ }
77
+ );
78
+ }
79
+
80
+ export {
81
+ EarningsChart
82
+ };
83
+ //# sourceMappingURL=chunk-OIRHLJBC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/earnings/earnings-chart.tsx"],"sourcesContent":["\"use client\";\n// A creator's earnings per period (Orochia /earnings, the console's treasury): bars of the net amount in money minor\n// units, the total and the last period's change written above, the payout threshold as a line. A BarChart preset:\n// the money format, the period format and the words are chosen for the need.\nimport { useMemo } from \"react\";\n\nimport { BarChart } from \"../bar/bar-chart\";\nimport type { CartesianProps } from \"../cartesian/cartesian\";\nimport { valueFormatter } from \"../core/format\";\nimport type { Accessor, CategoryFormat, Datum, SeriesSpec, Threshold } from \"../core/types\";\nimport { Kpi, toneOf } from \"../needs/kpi\";\nimport { EARNINGS_LABELS, type EarningsLabels } from \"../needs/labels\";\nimport { direction, fillIn, lastChange, numberOf, signedPercent, total } from \"../needs/model\";\nimport { useSettings } from \"../web/frame\";\n\nexport interface EarningsChartProps<T extends Datum>\n extends Omit<CartesianProps<T>, \"y\" | \"yLabel\" | \"series\" | \"format\" | \"x\" | \"xFormat\" | \"thresholds\" | \"labels\"> {\n /** The field (or function) of the period: an ISO month (`\"2026-04\"`), a day. Default `\"month\"`. */\n x?: Accessor<T, unknown>;\n /** The net amount of each period, in **minor units** (cents), as the ledger stores it. */\n net: Accessor<T, number | null | undefined>;\n /** The gross amount (before fees), drawn beside the net when given. */\n gross?: Accessor<T, number | null | undefined>;\n /** The ISO 4217 currency (`\"USD\"`, `\"EUR\"`). */\n currency: string;\n /** How the periods are written. Default `\"month\"` (`Apr 2026`). */\n period?: CategoryFormat;\n /** The minimum to withdraw, drawn as a line: `{ value: 5000, label: \"Payout threshold\" }`. */\n payoutThreshold?: Threshold;\n /** Hide the total and the change above the bars. */\n hideSummary?: boolean;\n /** The words, passed translated; English by default. */\n labels?: Partial<EarningsLabels>;\n}\n\n/** Earnings per period in money — the total, the change of the last period, the payout threshold. */\nexport function EarningsChart<T extends Datum>({\n x = \"month\" as Accessor<T, unknown>,\n net,\n gross,\n currency,\n period = \"month\",\n payoutThreshold,\n hideSummary,\n labels: given,\n description,\n data,\n ...props\n}: EarningsChartProps<T>) {\n const words = { ...EARNINGS_LABELS, ...given };\n const { locale } = useSettings(props as CartesianProps<T>);\n const format = { style: \"money\", currency } as const;\n const series = useMemo<SeriesSpec<T>[]>(\n () => (gross ? [{ key: gross, label: words.gross, color: 2 }, { key: net, label: words.net, color: 1 }] : [{ key: net, label: words.net, color: 1 }]),\n [gross, net, words.gross, words.net],\n );\n const values = data.map((row, i) => numberOf(row, net, i));\n const change = lastChange(values);\n const way = direction(change);\n const summary = hideSummary ? null : (\n <Kpi\n value={valueFormatter(format, locale)(total(data, net))}\n label={fillIn(words.total, { count: data.length })}\n delta={change == null ? null : fillIn(words.change, { change: signedPercent(change, locale) })}\n direction={way}\n tone={toneOf(way, \"up\")}\n />\n );\n return (\n <BarChart\n {...props}\n data={data}\n x={x}\n series={series}\n format={format}\n xFormat={period}\n thresholds={payoutThreshold ? [{ tone: \"success\", ...payoutThreshold }] : undefined}\n description={\n description || summary ? (\n <>\n {description}\n {description && summary ? <br /> : null}\n {summary}\n </>\n ) : undefined\n }\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,eAAe;AAwDpB,SAmBM,UAnBN,KAmBM,YAnBN;AAxBG,SAAS,cAA+B;AAAA,EAC7C,IAAI;AAAA,EACJ;AAAA,EACA;AAAA,EACA;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Ae,UACb,iCACG;AAAA;AAAA,QACA,eAAe,UAAU,oBAAC,QAAG,IAAK;AAAA,QAClC;AAAA,SACH,IACE;AAAA;AAAA,EAER;AAEJ;","names":[]}
@@ -0,0 +1,145 @@
1
+ "use client";
2
+ import {
3
+ describeParts
4
+ } from "./chunk-ANUCSRUN.js";
5
+ import {
6
+ read
7
+ } from "./chunk-W5FX4TU3.js";
8
+ import {
9
+ arcPath,
10
+ polar
11
+ } from "./chunk-OB5EFDDH.js";
12
+ import {
13
+ shareFormatter,
14
+ valueFormatter
15
+ } from "./chunk-XLLYNNC6.js";
16
+ import {
17
+ ChartFrame,
18
+ Tooltip,
19
+ colorOf,
20
+ useSettings
21
+ } from "./chunk-JTKR7ZWP.js";
22
+
23
+ // src/pie/pie-chart.tsx
24
+ import { useMemo, useState } from "react";
25
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
26
+ function PieChart(props) {
27
+ const { data, label, value, color, format, donut = false, centerLabel, centerValue, maxSlices = 6, otherLabel = "Other", onSelect, labelHeader, valueHeader } = props;
28
+ const { locale, labels } = useSettings(props);
29
+ const fmt = useMemo(() => ({ value: valueFormatter(format, locale, labels.noValue), share: shareFormatter(locale) }), [format, locale, labels.noValue]);
30
+ const slices = useMemo(() => {
31
+ const rows = data.map((datum, index) => ({ datum, index, label: read(label, datum, index), value: Math.max(0, Number(read(value, datum, index)) || 0) })).sort((a, b) => b.value - a.value);
32
+ const kept = rows.length > maxSlices ? rows.slice(0, maxSlices - 1) : rows;
33
+ const out = kept.map((row, i) => ({ ...row, color: colorOf(color ? read(color, row.datum, row.index) : void 0, i + 1) }));
34
+ if (rows.length > maxSlices) {
35
+ const rest = rows.slice(maxSlices - 1).reduce((sum, row) => sum + row.value, 0);
36
+ out.push({ label: otherLabel, value: rest, color: "var(--kz-text-muted)", index: -1 });
37
+ }
38
+ return out;
39
+ }, [data, label, value, color, maxSlices, otherLabel]);
40
+ const total = slices.reduce((sum, s) => sum + s.value, 0);
41
+ const isEmpty = total <= 0;
42
+ const kind = donut ? "donut" : "pie";
43
+ const summary = useMemo(() => isEmpty ? labels.empty : describeParts(kind, slices, { labels, value: fmt.value, share: fmt.share }), [isEmpty, kind, slices, labels, fmt]);
44
+ const table = useMemo(
45
+ () => ({
46
+ columns: [labelHeader ?? labels.category, valueHeader ?? labels.value, "%"],
47
+ rows: [...slices.map((s) => [s.label, fmt.value(s.value), fmt.share(total ? s.value / total : 0)]), [labels.total, fmt.value(total), fmt.share(1)]]
48
+ }),
49
+ [slices, fmt, total, labels, labelHeader, valueHeader]
50
+ );
51
+ const [active, setActive] = useState(null);
52
+ const onKeyDown = (event) => {
53
+ const n = slices.length;
54
+ const moves = {
55
+ ArrowRight: () => ((active ?? -1) + 1) % n,
56
+ ArrowDown: () => ((active ?? -1) + 1) % n,
57
+ ArrowLeft: () => ((active ?? 0) - 1 + n) % n,
58
+ ArrowUp: () => ((active ?? 0) - 1 + n) % n,
59
+ Home: () => 0,
60
+ End: () => n - 1,
61
+ Escape: () => null
62
+ };
63
+ if (event.key === "Enter" && active !== null && onSelect) {
64
+ const slice = slices[active];
65
+ if (slice.datum) onSelect(slice.datum, slice.index);
66
+ return;
67
+ }
68
+ const move = moves[event.key];
69
+ if (!move) return;
70
+ event.preventDefault();
71
+ setActive(move());
72
+ };
73
+ const say = (s) => `${s.label}: ${fmt.value(s.value)} (${fmt.share(total ? s.value / total : 0)})`;
74
+ const legend = /* @__PURE__ */ jsx("ul", { className: "kzc-legend", "aria-hidden": true, children: slices.map((s) => /* @__PURE__ */ jsxs("li", { children: [
75
+ /* @__PURE__ */ jsx("span", { className: "kzc-key", style: { background: s.color } }),
76
+ s.label,
77
+ " \xB7 ",
78
+ fmt.share(total ? s.value / total : 0)
79
+ ] }, s.label)) });
80
+ return /* @__PURE__ */ jsx(
81
+ ChartFrame,
82
+ {
83
+ kind,
84
+ frame: props,
85
+ defaultHeight: 240,
86
+ table,
87
+ summary,
88
+ isEmpty,
89
+ legend: isEmpty ? null : legend,
90
+ announcement: active === null ? "" : say(slices[active]),
91
+ active: active !== null,
92
+ handlers: { onKeyDown, onBlur: () => setActive(null), onPointerLeave: () => setActive(null) },
93
+ children: (width, height) => {
94
+ const radius = Math.max(10, Math.min(width, height) / 2 - 6);
95
+ const inner = donut ? radius * 0.64 : 0;
96
+ const cx = width / 2;
97
+ const cy = height / 2;
98
+ let angle = 0;
99
+ const arcs = slices.map((s, i) => {
100
+ const sweep = total ? s.value / total * Math.PI * 2 : 0;
101
+ const start = angle;
102
+ angle += sweep;
103
+ return { s, i, start, end: angle };
104
+ });
105
+ const current = active !== null ? arcs[active] : null;
106
+ const mid = current ? (current.start + current.end) / 2 : 0;
107
+ const [tx, ty] = current ? polar(cx, cy, (radius + inner) / 2 + (donut ? 0 : radius * 0.2), mid) : [0, 0];
108
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
109
+ /* @__PURE__ */ jsxs("svg", { className: "kzc-svg", width, height, viewBox: `0 0 ${width} ${height}`, "aria-hidden": true, children: [
110
+ /* @__PURE__ */ jsx("g", { className: "kzc-enter-pop", children: arcs.map(({ s, i, start, end }) => {
111
+ const lift = active === i ? 4 : 0;
112
+ const [dx, dy] = lift ? polar(0, 0, lift, (start + end) / 2) : [0, 0];
113
+ return /* @__PURE__ */ jsx(
114
+ "path",
115
+ {
116
+ d: arcPath(cx + dx, cy + dy, inner, radius, start, end),
117
+ className: "kzc-mark",
118
+ "data-dim": active !== null && active !== i ? "" : void 0,
119
+ style: { fill: s.color, stroke: "var(--kzc-surface)", strokeWidth: slices.length > 1 ? 2 : 0, strokeLinejoin: "round", cursor: onSelect ? "pointer" : void 0 },
120
+ onPointerEnter: () => setActive(i),
121
+ onClick: onSelect && s.datum ? () => onSelect(s.datum, s.index) : void 0
122
+ },
123
+ s.label
124
+ );
125
+ }) }),
126
+ donut && /* @__PURE__ */ jsxs("g", { className: "kzc-enter-fade", children: [
127
+ /* @__PURE__ */ jsx("text", { x: cx, y: cy - (centerLabel ? 6 : 0), textAnchor: "middle", dominantBaseline: "central", className: "kzc-strong", style: { fontSize: Math.max(14, Math.min(26, inner / 3)) }, children: centerValue ?? fmt.value(total) }),
128
+ centerLabel && /* @__PURE__ */ jsx("text", { x: cx, y: cy + Math.max(12, Math.min(20, inner / 4)), textAnchor: "middle", dominantBaseline: "central", children: centerLabel })
129
+ ] })
130
+ ] }),
131
+ current && /* @__PURE__ */ jsx(Tooltip, { x: tx, y: ty, width, title: current.s.label, rows: [{ label: fmt.share(total ? current.s.value / total : 0), value: fmt.value(current.s.value), color: current.s.color }] })
132
+ ] });
133
+ }
134
+ }
135
+ );
136
+ }
137
+ function DonutChart(props) {
138
+ return /* @__PURE__ */ jsx(PieChart, { ...props, donut: true });
139
+ }
140
+
141
+ export {
142
+ PieChart,
143
+ DonutChart
144
+ };
145
+ //# sourceMappingURL=chunk-PBQV3B6O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/pie/pie-chart.tsx"],"sourcesContent":["\"use client\";\n// Part of a whole: a pie, or a donut with the total in its hole. Plain SVG. The slices are sorted largest first and\n// folded into “Other” past `maxSlices` (a ninth hue is never invented); a 2 px surface gap separates them; the legend\n// carries each part's value and share, so the colour is never the only way to read it.\nimport { type KeyboardEvent, useMemo, useState } from \"react\";\n\nimport { read } from \"../core/data\";\nimport { describeParts } from \"../core/describe\";\nimport { shareFormatter, valueFormatter } from \"../core/format\";\nimport { arcPath, polar } from \"../core/shape\";\nimport type { Accessor, Datum, SeriesColor, ValueFormat } from \"../core/types\";\nimport { ChartFrame, type ChartFrameProps, useSettings } from \"../web/frame\";\nimport { colorOf, Tooltip } from \"../web/parts\";\n\nexport interface PieChartProps<T extends Datum> extends ChartFrameProps {\n /** One row per part. */\n data: readonly T[];\n /** The field (or function) naming the part. */\n label: Accessor<T, string>;\n /** The field (or function) of its amount (≥ 0). */\n value: Accessor<T, number>;\n /** A part's own colour (a slot, a tone or a CSS colour); default: the palette in order of size. */\n color?: Accessor<T, SeriesColor | undefined>;\n /** How the amounts are written. */\n format?: ValueFormat;\n /** A ring rather than a pie: the total (or `centerValue`) is written in its hole. */\n donut?: boolean;\n /** The words under the number in the hole of a donut (“Total credits”). */\n centerLabel?: string;\n /** The number in the hole, written already. Default: the total. */\n centerValue?: string;\n /** At most this many slices; the rest fold into one, named `otherLabel`. Default 6. */\n maxSlices?: number;\n /** The name of the folded slice. Default “Other”. */\n otherLabel?: string;\n /** Called with the row when a slice is clicked (or Enter is pressed on it). */\n onSelect?: (datum: T, index: number) => void;\n /** The header of the parts in the data table. */\n labelHeader?: string;\n /** The header of the amounts in the data table. */\n valueHeader?: string;\n}\n\ninterface Slice<T> {\n readonly label: string;\n readonly value: number;\n readonly color: string;\n readonly datum?: T;\n readonly index: number;\n}\n\nexport function PieChart<T extends Datum>(props: PieChartProps<T>) {\n const { data, label, value, color, format, donut = false, centerLabel, centerValue, maxSlices = 6, otherLabel = \"Other\", onSelect, labelHeader, valueHeader } = props;\n const { locale, labels } = useSettings(props);\n const fmt = useMemo(() => ({ value: valueFormatter(format, locale, labels.noValue), share: shareFormatter(locale) }), [format, locale, labels.noValue]);\n\n const slices = useMemo<Slice<T>[]>(() => {\n const rows = data\n .map((datum, index) => ({ datum, index, label: read(label, datum, index), value: Math.max(0, Number(read(value, datum, index)) || 0) }))\n .sort((a, b) => b.value - a.value);\n const kept = rows.length > maxSlices ? rows.slice(0, maxSlices - 1) : rows;\n const out: Slice<T>[] = kept.map((row, i) => ({ ...row, color: colorOf(color ? read(color, row.datum, row.index) : undefined, i + 1) }));\n if (rows.length > maxSlices) {\n const rest = rows.slice(maxSlices - 1).reduce((sum, row) => sum + row.value, 0);\n out.push({ label: otherLabel, value: rest, color: \"var(--kz-text-muted)\", index: -1 });\n }\n return out;\n }, [data, label, value, color, maxSlices, otherLabel]);\n\n const total = slices.reduce((sum, s) => sum + s.value, 0);\n const isEmpty = total <= 0;\n const kind = donut ? \"donut\" : \"pie\";\n const summary = useMemo(() => (isEmpty ? labels.empty : describeParts(kind, slices, { labels, value: fmt.value, share: fmt.share })), [isEmpty, kind, slices, labels, fmt]);\n const table = useMemo(\n () => ({\n columns: [labelHeader ?? labels.category, valueHeader ?? labels.value, \"%\"],\n rows: [...slices.map((s) => [s.label, fmt.value(s.value), fmt.share(total ? s.value / total : 0)]), [labels.total, fmt.value(total), fmt.share(1)]],\n }),\n [slices, fmt, total, labels, labelHeader, valueHeader],\n );\n\n const [active, setActive] = useState<number | null>(null);\n const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const n = slices.length;\n const moves: Record<string, () => number | null> = {\n ArrowRight: () => ((active ?? -1) + 1) % n,\n ArrowDown: () => ((active ?? -1) + 1) % n,\n ArrowLeft: () => ((active ?? 0) - 1 + n) % n,\n ArrowUp: () => ((active ?? 0) - 1 + n) % n,\n Home: () => 0,\n End: () => n - 1,\n Escape: () => null,\n };\n if (event.key === \"Enter\" && active !== null && onSelect) {\n const slice = slices[active]!;\n if (slice.datum) onSelect(slice.datum, slice.index);\n return;\n }\n const move = moves[event.key];\n if (!move) return;\n event.preventDefault();\n setActive(move());\n };\n const say = (s: Slice<T>) => `${s.label}: ${fmt.value(s.value)} (${fmt.share(total ? s.value / total : 0)})`;\n\n const legend = (\n <ul className=\"kzc-legend\" aria-hidden>\n {slices.map((s) => (\n <li key={s.label}>\n <span className=\"kzc-key\" style={{ background: s.color }} />\n {s.label} · {fmt.share(total ? s.value / total : 0)}\n </li>\n ))}\n </ul>\n );\n\n return (\n <ChartFrame\n kind={kind}\n frame={props}\n defaultHeight={240}\n table={table}\n summary={summary}\n isEmpty={isEmpty}\n legend={isEmpty ? null : legend}\n announcement={active === null ? \"\" : say(slices[active]!)}\n active={active !== null}\n handlers={{ onKeyDown, onBlur: () => setActive(null), onPointerLeave: () => setActive(null) }}\n >\n {(width, height) => {\n const radius = Math.max(10, Math.min(width, height) / 2 - 6);\n const inner = donut ? radius * 0.64 : 0;\n const cx = width / 2;\n const cy = height / 2;\n let angle = 0;\n const arcs = slices.map((s, i) => {\n const sweep = total ? (s.value / total) * Math.PI * 2 : 0;\n const start = angle;\n angle += sweep;\n return { s, i, start, end: angle };\n });\n const current = active !== null ? arcs[active] : null;\n const mid = current ? (current.start + current.end) / 2 : 0;\n const [tx, ty] = current ? polar(cx, cy, (radius + inner) / 2 + (donut ? 0 : radius * 0.2), mid) : [0, 0];\n return (\n <>\n <svg className=\"kzc-svg\" width={width} height={height} viewBox={`0 0 ${width} ${height}`} aria-hidden>\n <g className=\"kzc-enter-pop\">\n {arcs.map(({ s, i, start, end }) => {\n const lift = active === i ? 4 : 0;\n const [dx, dy] = lift ? polar(0, 0, lift, (start + end) / 2) : [0, 0];\n return (\n <path\n key={s.label}\n d={arcPath(cx + dx, cy + dy, inner, radius, start, end)}\n className=\"kzc-mark\"\n data-dim={active !== null && active !== i ? \"\" : undefined}\n style={{ fill: s.color, stroke: \"var(--kzc-surface)\", strokeWidth: slices.length > 1 ? 2 : 0, strokeLinejoin: \"round\", cursor: onSelect ? \"pointer\" : undefined }}\n onPointerEnter={() => setActive(i)}\n onClick={onSelect && s.datum ? () => onSelect(s.datum!, s.index) : undefined}\n />\n );\n })}\n </g>\n {donut && (\n <g className=\"kzc-enter-fade\">\n <text x={cx} y={cy - (centerLabel ? 6 : 0)} textAnchor=\"middle\" dominantBaseline=\"central\" className=\"kzc-strong\" style={{ fontSize: Math.max(14, Math.min(26, inner / 3)) }}>\n {centerValue ?? fmt.value(total)}\n </text>\n {centerLabel && (\n <text x={cx} y={cy + Math.max(12, Math.min(20, inner / 4))} textAnchor=\"middle\" dominantBaseline=\"central\">\n {centerLabel}\n </text>\n )}\n </g>\n )}\n </svg>\n {current && <Tooltip x={tx} y={ty} width={width} title={current.s.label} rows={[{ label: fmt.share(total ? current.s.value / total : 0), value: fmt.value(current.s.value), color: current.s.color }]} />}\n </>\n );\n }}\n </ChartFrame>\n );\n}\n\n/** A pie with a hole: the total (or `centerValue`) and `centerLabel` in it. */\nexport function DonutChart<T extends Datum>(props: Omit<PieChartProps<T>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AA,YACC,SACC,qBAAC,OAAE,WAAU,kBACX;AAAA,kCAAC,UAAK,GAAG,IAAI,GAAG,MAAM,cAAc,IAAI,IAAI,YAAW,UAAS,kBAAiB,WAAU,WAAU,cAAa,OAAO,EAAE,UAAU,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,QAAQ,CAAC,CAAC,EAAE,GACxK,yBAAe,IAAI,MAAM,KAAK,GACjC;AAAA,cACC,eACC,oBAAC,UAAK,GAAG,IAAI,GAAG,KAAK,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,QAAQ,CAAC,CAAC,GAAG,YAAW,UAAS,kBAAiB,WAC9F,uBACH;AAAA,eAEJ;AAAA,aAEJ;AAAA,UACC,WAAW,oBAAC,WAAQ,GAAG,IAAI,GAAG,IAAI,OAAc,OAAO,QAAQ,EAAE,OAAO,MAAM,CAAC,EAAE,OAAO,IAAI,MAAM,QAAQ,QAAQ,EAAE,QAAQ,QAAQ,CAAC,GAAG,OAAO,IAAI,MAAM,QAAQ,EAAE,KAAK,GAAG,OAAO,QAAQ,EAAE,MAAM,CAAC,GAAG;AAAA,WACzM;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;AAGO,SAAS,WAA4B,OAAwC;AAClF,SAAO,oBAAC,YAAU,GAAG,OAAO,OAAK,MAAC;AACpC;","names":[]}
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ //# sourceMappingURL=chunk-POQIHFAZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,234 @@
1
+ "use client";
2
+ import {
3
+ ChartFrame,
4
+ resolveColor,
5
+ useInView,
6
+ useReducedMotion,
7
+ useThemeVersion
8
+ } from "./chunk-JTKR7ZWP.js";
9
+ import {
10
+ sequential
11
+ } from "./chunk-3CJHBJXA.js";
12
+
13
+ // src/echarts/theme.ts
14
+ var ROLES = {
15
+ text: "--kz-text-primary",
16
+ text2: "--kz-text-secondary",
17
+ text3: "--kz-text-muted",
18
+ grid: "--kz-border-subtle",
19
+ axis: "--kz-border-default",
20
+ surface: "--kz-surface-1",
21
+ surface2: "--kz-surface-2",
22
+ surface3: "--kz-surface-3",
23
+ border: "--kz-border-default",
24
+ accent: "--kz-accent",
25
+ success: "--kz-success",
26
+ warning: "--kz-warning",
27
+ danger: "--kz-danger",
28
+ info: "--kz-info",
29
+ low: "--kzc-low",
30
+ high: "--kzc-high"
31
+ };
32
+ function resolveTheme(el) {
33
+ const color = (name) => resolveColor(`var(${name})`, el);
34
+ const roles = Object.fromEntries(Object.entries(ROLES).map(([key, name]) => [key, color(name)]));
35
+ const palette = Array.from({ length: 8 }, (_, i) => color(`--kzc-${i + 1}`));
36
+ const font = getComputedStyle(el).fontFamily || "system-ui, sans-serif";
37
+ return { ...roles, palette, ramp: sequential(palette[0], roles.surface, 5), font };
38
+ }
39
+ function baseOption(theme, animate) {
40
+ return {
41
+ color: [...theme.palette],
42
+ backgroundColor: "transparent",
43
+ textStyle: { color: theme.text2, fontFamily: theme.font, fontSize: 11 },
44
+ animation: animate,
45
+ animationDuration: 700,
46
+ animationEasing: "cubicOut",
47
+ animationDurationUpdate: 300,
48
+ tooltip: {
49
+ confine: true,
50
+ backgroundColor: theme.surface2,
51
+ borderColor: theme.border,
52
+ borderWidth: 1,
53
+ padding: [8, 10],
54
+ textStyle: { color: theme.text, fontFamily: theme.font, fontSize: 12 },
55
+ extraCssText: "border-radius:10px;box-shadow:var(--kz-shadow-lg);min-width:140px;"
56
+ }
57
+ };
58
+ }
59
+ function valueAxis(theme, formatter) {
60
+ return {
61
+ type: "value",
62
+ axisLine: { show: false },
63
+ axisTick: { show: false },
64
+ splitLine: { lineStyle: { color: theme.grid, width: 1 } },
65
+ axisLabel: { color: theme.text2, formatter }
66
+ };
67
+ }
68
+ function categoryAxis(theme, data) {
69
+ return {
70
+ type: "category",
71
+ data,
72
+ axisLine: { lineStyle: { color: theme.axis } },
73
+ axisTick: { show: false },
74
+ axisLabel: { color: theme.text2, hideOverlap: true },
75
+ splitLine: { show: false }
76
+ };
77
+ }
78
+ var escape = (text) => text.replace(/[&<>"]/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" })[c]);
79
+ function tooltipHtml(title, rows, note) {
80
+ const head = title ? `<p class="kzc-tip-title">${escape(title)}</p>` : "";
81
+ const body = rows.map((row) => `<p class="kzc-tip-row">${row.color ? `<span class="kzc-key" style="background:${escape(row.color)}"></span>` : "<span></span>"}<span>${escape(row.label)}</span><b>${escape(row.value)}</b></p>`).join("");
82
+ return `${head}${body}${note ? `<p class="kzc-tip-note">${escape(note)}</p>` : ""}`;
83
+ }
84
+
85
+ // src/echarts/host.tsx
86
+ import { useEffect, useRef, useState } from "react";
87
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
88
+ var RENDERERS = {
89
+ svg: () => import("./svg-BJUHYX3B.js"),
90
+ canvas: () => import("./canvas-4MSYDVFO.js")
91
+ };
92
+ var install = (module) => {
93
+ const fn = module?.install;
94
+ if (typeof fn === "function") fn();
95
+ };
96
+ function EChartHost({ kind, frame, defaultHeight, table, summary, isEmpty, legend, engine, build, items = [], onItem }) {
97
+ const instance = useRef(null);
98
+ const [active, setActive] = useState(null);
99
+ const [failed, setFailed] = useState(false);
100
+ const renderer = frame.renderer ?? "svg";
101
+ const onKeyDown = (event) => {
102
+ const n = items.length;
103
+ if (!n) return;
104
+ if (event.key === "Enter" && active !== null && onItem) {
105
+ onItem(items[active]);
106
+ return;
107
+ }
108
+ const moves = {
109
+ ArrowRight: () => ((active ?? -1) + 1) % n,
110
+ ArrowDown: () => ((active ?? -1) + 1) % n,
111
+ ArrowLeft: () => ((active ?? 0) - 1 + n) % n,
112
+ ArrowUp: () => ((active ?? 0) - 1 + n) % n,
113
+ Home: () => 0,
114
+ End: () => n - 1,
115
+ Escape: () => null
116
+ };
117
+ const move = moves[event.key];
118
+ if (!move) return;
119
+ event.preventDefault();
120
+ setActive(move());
121
+ };
122
+ const exportImage = (format) => {
123
+ const chart = instance.current;
124
+ if (!chart) return null;
125
+ const dom = chart.getDom();
126
+ const background = resolveTheme(dom).surface;
127
+ return chart.getDataURL({ type: format === "svg" && renderer === "svg" ? "svg" : "png", pixelRatio: 2, backgroundColor: background });
128
+ };
129
+ return /* @__PURE__ */ jsx(
130
+ ChartFrame,
131
+ {
132
+ kind,
133
+ frame: { ...frame, error: frame.error ?? (failed || void 0) },
134
+ defaultHeight,
135
+ table,
136
+ summary,
137
+ isEmpty,
138
+ legend,
139
+ announcement: active === null ? "" : items[active]?.text ?? "",
140
+ handlers: { onKeyDown, onBlur: () => setActive(null) },
141
+ navigable: items.length > 0,
142
+ exportImage,
143
+ children: (width, height) => /* @__PURE__ */ jsx(
144
+ Host,
145
+ {
146
+ width,
147
+ height,
148
+ renderer,
149
+ engine,
150
+ build,
151
+ active: active === null ? null : items[active] ?? null,
152
+ instance,
153
+ onItem,
154
+ onFail: () => setFailed(true)
155
+ }
156
+ )
157
+ }
158
+ );
159
+ }
160
+ function Host({ width, height, renderer, engine, build, active, instance, onItem, onFail }) {
161
+ const ref = useRef(null);
162
+ const near = useInView(ref, { once: true, margin: "200px" });
163
+ const reduced = useReducedMotion();
164
+ const themeVersion = useThemeVersion();
165
+ const [ready, setReady] = useState(false);
166
+ const [drawn, setDrawn] = useState(false);
167
+ const size = useRef({ width, height });
168
+ const itemRef = useRef(onItem);
169
+ const failRef = useRef(onFail);
170
+ useEffect(() => {
171
+ size.current = { width, height };
172
+ itemRef.current = onItem;
173
+ failRef.current = onFail;
174
+ });
175
+ useEffect(() => {
176
+ if (!near) return void 0;
177
+ let alive = true;
178
+ Promise.all([engine(), RENDERERS[renderer]()]).then(
179
+ ([module, painter]) => {
180
+ if (!alive || !ref.current) return;
181
+ install(module);
182
+ painter.install();
183
+ const { init } = painter;
184
+ const chart = init(ref.current, null, { renderer, ...size.current });
185
+ chart.on("finished", () => setDrawn(true));
186
+ chart.on("click", (params) => {
187
+ const p = params;
188
+ if (p.seriesIndex != null && p.dataIndex != null) itemRef.current?.({ seriesIndex: p.seriesIndex, dataIndex: p.dataIndex });
189
+ });
190
+ instance.current = chart;
191
+ setReady(true);
192
+ },
193
+ () => alive && failRef.current()
194
+ );
195
+ return () => {
196
+ alive = false;
197
+ instance.current?.dispose();
198
+ instance.current = null;
199
+ setReady(false);
200
+ };
201
+ }, [near, renderer, engine, instance]);
202
+ useEffect(() => {
203
+ if (ready) instance.current?.resize({ width, height });
204
+ }, [ready, width, height, instance]);
205
+ useEffect(() => {
206
+ const chart = instance.current;
207
+ if (!ready || !chart || !ref.current) return;
208
+ const option = build(resolveTheme(ref.current), { width, height });
209
+ chart.setOption({ ...option, animation: !reduced && option.animation !== false }, { notMerge: true });
210
+ }, [ready, build, themeVersion, reduced, width, height, instance]);
211
+ useEffect(() => {
212
+ const chart = instance.current;
213
+ if (!ready || !chart) return;
214
+ chart.dispatchAction({ type: "downplay" });
215
+ if (active) {
216
+ const target = { seriesIndex: active.seriesIndex, dataIndex: active.dataIndex, ...active.dataType ? { dataType: active.dataType } : {} };
217
+ chart.dispatchAction({ type: "highlight", ...target });
218
+ chart.dispatchAction({ type: "showTip", ...target });
219
+ } else chart.dispatchAction({ type: "hideTip" });
220
+ }, [ready, active, instance]);
221
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
222
+ !drawn && /* @__PURE__ */ jsx("div", { className: "kzc-skeleton", "aria-hidden": true, children: [0.55, 0.8, 0.45, 0.95, 0.7, 0.6].map((h, i) => /* @__PURE__ */ jsx("i", { style: { height: `${h * 100}%` } }, i)) }),
223
+ /* @__PURE__ */ jsx("div", { ref, className: "kzc-host", "data-pending": drawn ? void 0 : "", "aria-hidden": true })
224
+ ] });
225
+ }
226
+
227
+ export {
228
+ baseOption,
229
+ valueAxis,
230
+ categoryAxis,
231
+ tooltipHtml,
232
+ EChartHost
233
+ };
234
+ //# sourceMappingURL=chunk-PWMMXRMC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/echarts/theme.ts","../src/echarts/host.tsx"],"sourcesContent":["\"use client\";\n// The ECharts side of the theme: the --kz-* roles and the palette's variables resolved to plain colours on the chart's\n// own element (a canvas has no CSS variables) — so a `.brand-<id>` ancestor, a `.theme-light` island and the\n// chart's `data-brand` all apply — and the option pieces every chart shares (text, axes, grid, tooltip).\nimport type { EChartsCoreOption } from \"echarts/core\";\n\nimport { sequential } from \"../core/palette\";\nimport { resolveColor } from \"../web/frame\";\n\nexport interface ResolvedTheme {\n readonly text: string;\n readonly text2: string;\n readonly text3: string;\n readonly grid: string;\n readonly axis: string;\n readonly surface: string;\n readonly surface2: string;\n readonly surface3: string;\n readonly border: string;\n readonly accent: string;\n readonly success: string;\n readonly warning: string;\n readonly danger: string;\n readonly info: string;\n /** The categorical palette, slot 1 first. */\n readonly palette: readonly string[];\n /** A sequential ramp of the brand hue (5 steps, near the surface → full). */\n readonly ramp: readonly string[];\n /** The diverging poles. */\n readonly low: string;\n readonly high: string;\n readonly font: string;\n}\n\nconst ROLES = {\n text: \"--kz-text-primary\",\n text2: \"--kz-text-secondary\",\n text3: \"--kz-text-muted\",\n grid: \"--kz-border-subtle\",\n axis: \"--kz-border-default\",\n surface: \"--kz-surface-1\",\n surface2: \"--kz-surface-2\",\n surface3: \"--kz-surface-3\",\n border: \"--kz-border-default\",\n accent: \"--kz-accent\",\n success: \"--kz-success\",\n warning: \"--kz-warning\",\n danger: \"--kz-danger\",\n info: \"--kz-info\",\n low: \"--kzc-low\",\n high: \"--kzc-high\",\n} as const;\n\n/** The theme as the browser resolves it on `el` (call again after a theme change). */\nexport function resolveTheme(el: Element): ResolvedTheme {\n const color = (name: string) => resolveColor(`var(${name})`, el);\n const roles = Object.fromEntries(Object.entries(ROLES).map(([key, name]) => [key, color(name)])) as Record<keyof typeof ROLES, string>;\n const palette = Array.from({ length: 8 }, (_, i) => color(`--kzc-${i + 1}`));\n const font = getComputedStyle(el).fontFamily || \"system-ui, sans-serif\";\n return { ...roles, palette, ramp: sequential(palette[0]!, roles.surface, 5), font };\n}\n\n/** The option every ECharts chart starts from: colours, text, the tooltip's surface, motion. */\nexport function baseOption(theme: ResolvedTheme, animate: boolean): EChartsCoreOption {\n return {\n color: [...theme.palette],\n backgroundColor: \"transparent\",\n textStyle: { color: theme.text2, fontFamily: theme.font, fontSize: 11 },\n animation: animate,\n animationDuration: 700,\n animationEasing: \"cubicOut\",\n animationDurationUpdate: 300,\n tooltip: {\n confine: true,\n backgroundColor: theme.surface2,\n borderColor: theme.border,\n borderWidth: 1,\n padding: [8, 10],\n textStyle: { color: theme.text, fontFamily: theme.font, fontSize: 12 },\n extraCssText: \"border-radius:10px;box-shadow:var(--kz-shadow-lg);min-width:140px;\",\n },\n };\n}\n\n/** A value axis: recessive, hairline grid, text-secondary labels. */\nexport function valueAxis(theme: ResolvedTheme, formatter: (v: number) => string): Record<string, unknown> {\n return {\n type: \"value\",\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: { lineStyle: { color: theme.grid, width: 1 } },\n axisLabel: { color: theme.text2, formatter },\n };\n}\n\n/** A category axis: a baseline in the axis colour, no ticks. */\nexport function categoryAxis(theme: ResolvedTheme, data: readonly string[]): Record<string, unknown> {\n return {\n type: \"category\",\n data,\n axisLine: { lineStyle: { color: theme.axis } },\n axisTick: { show: false },\n axisLabel: { color: theme.text2, hideOverlap: true },\n splitLine: { show: false },\n };\n}\n\nconst escape = (text: string) => text.replace(/[&<>\"]/g, (c) => ({ \"&\": \"&amp;\", \"<\": \"&lt;\", \">\": \"&gt;\", '\"': \"&quot;\" })[c]!);\n\n/** The tooltip's content in the package's markup (`kzc-tip-*`): a title, rows of key · name · value, a note. */\nexport function tooltipHtml(title: string | undefined, rows: readonly { label: string; value: string; color?: string }[], note?: string): string {\n const head = title ? `<p class=\"kzc-tip-title\">${escape(title)}</p>` : \"\";\n const body = rows\n .map((row) => `<p class=\"kzc-tip-row\">${row.color ? `<span class=\"kzc-key\" style=\"background:${escape(row.color)}\"></span>` : \"<span></span>\"}<span>${escape(row.label)}</span><b>${escape(row.value)}</b></p>`)\n .join(\"\");\n return `${head}${body}${note ? `<p class=\"kzc-tip-note\">${escape(note)}</p>` : \"\"}`;\n}\n","\"use client\";\n// The ECharts host behind Radar, Heatmap, Calendar, Sankey, Funnel, Candlestick, Treemap, Scatter and <Chart>: the same\n// frame as the SVG charts (title, summary, data table, keyboard, states, export), and an engine that is loaded only\n// when the chart comes near the screen — `echarts/core`, the one chart type and its components, one renderer (SVG by\n// default; canvas for large volumes). The option is rebuilt from the resolved theme on every theme change; motion\n// follows the reader's preference; the chart is disposed with the component.\nimport type { EChartsCoreOption, EChartsType } from \"echarts/core\";\nimport { type KeyboardEvent, type ReactNode, type RefObject, useEffect, useRef, useState } from \"react\";\n\nimport type { ChartKind } from \"../core/labels\";\nimport { ChartFrame, type ChartFrameProps, type TableModel } from \"../web/frame\";\nimport { useInView, useReducedMotion, useThemeVersion } from \"../web/hooks\";\nimport { type ResolvedTheme, resolveTheme } from \"./theme\";\n\nexport type Renderer = \"svg\" | \"canvas\";\n\n/** What the keyboard walks: one ECharts data item, and what it says. */\nexport interface WalkItem {\n readonly seriesIndex: number;\n readonly dataIndex: number;\n /** A graph's link (`edge`) rather than its node: Sankey's flows. */\n readonly dataType?: \"node\" | \"edge\";\n readonly text: string;\n}\n\nexport interface EngineProps {\n /** `svg` (default): sharp, exportable as SVG. `canvas`: for tens of thousands of marks. */\n renderer?: Renderer;\n}\n\ninterface HostProps {\n readonly kind: ChartKind;\n readonly frame: ChartFrameProps & EngineProps;\n readonly defaultHeight?: number;\n readonly table: TableModel;\n readonly summary: string;\n readonly isEmpty: boolean;\n readonly legend?: ReactNode;\n /** Loads the chart type and its components (a dynamic import of `./engines/<type>`), whose `install` registers them. */\n readonly engine: () => Promise<unknown>;\n /** The option, from the resolved theme and the size. Memoise it: a new function redraws. */\n readonly build: (theme: ResolvedTheme, size: { width: number; height: number }) => EChartsCoreOption;\n readonly items?: readonly WalkItem[];\n /** A click (or Enter) on an item. */\n readonly onItem?: (item: { seriesIndex: number; dataIndex: number }) => void;\n}\n\ntype Init = (el: HTMLElement, theme: null, options: { renderer: Renderer; width: number; height: number }) => EChartsType;\ntype RendererModule = { init: Init; install: () => void };\n\nconst RENDERERS: Record<Renderer, () => Promise<RendererModule>> = {\n svg: () => import(\"./engines/svg\") as Promise<RendererModule>,\n canvas: () => import(\"./engines/canvas\") as Promise<RendererModule>,\n};\n\n/** Calls the `install` of an engine module (a typed chart's), if it has one (a `<Chart modules>` function may not). */\nconst install = (module: unknown) => {\n const fn = (module as { install?: unknown } | null)?.install;\n if (typeof fn === \"function\") fn();\n};\n\nexport function EChartHost({ kind, frame, defaultHeight, table, summary, isEmpty, legend, engine, build, items = [], onItem }: HostProps) {\n const instance = useRef<EChartsType | null>(null);\n const [active, setActive] = useState<number | null>(null);\n const [failed, setFailed] = useState(false);\n const renderer = frame.renderer ?? \"svg\";\n\n const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n const n = items.length;\n if (!n) return;\n if (event.key === \"Enter\" && active !== null && onItem) {\n onItem(items[active]!);\n return;\n }\n const moves: Record<string, () => number | null> = {\n ArrowRight: () => ((active ?? -1) + 1) % n,\n ArrowDown: () => ((active ?? -1) + 1) % n,\n ArrowLeft: () => ((active ?? 0) - 1 + n) % n,\n ArrowUp: () => ((active ?? 0) - 1 + n) % n,\n Home: () => 0,\n End: () => n - 1,\n Escape: () => null,\n };\n const move = moves[event.key];\n if (!move) return;\n event.preventDefault();\n setActive(move());\n };\n\n const exportImage = (format: \"png\" | \"svg\") => {\n const chart = instance.current;\n if (!chart) return null;\n const dom = chart.getDom();\n const background = resolveTheme(dom).surface;\n return chart.getDataURL({ type: format === \"svg\" && renderer === \"svg\" ? \"svg\" : \"png\", pixelRatio: 2, backgroundColor: background });\n };\n\n return (\n <ChartFrame\n kind={kind}\n frame={{ ...frame, error: frame.error ?? (failed || undefined) }}\n defaultHeight={defaultHeight}\n table={table}\n summary={summary}\n isEmpty={isEmpty}\n legend={legend}\n announcement={active === null ? \"\" : (items[active]?.text ?? \"\")}\n handlers={{ onKeyDown, onBlur: () => setActive(null) }}\n navigable={items.length > 0}\n exportImage={exportImage}\n >\n {(width, height) => (\n <Host\n width={width}\n height={height}\n renderer={renderer}\n engine={engine}\n build={build}\n active={active === null ? null : (items[active] ?? null)}\n instance={instance}\n onItem={onItem}\n onFail={() => setFailed(true)}\n />\n )}\n </ChartFrame>\n );\n}\n\ninterface InnerProps {\n width: number;\n height: number;\n renderer: Renderer;\n engine: () => Promise<unknown>;\n build: HostProps[\"build\"];\n active: WalkItem | null;\n instance: RefObject<EChartsType | null>;\n onItem?: HostProps[\"onItem\"];\n onFail: () => void;\n}\n\nfunction Host({ width, height, renderer, engine, build, active, instance, onItem, onFail }: InnerProps) {\n const ref = useRef<HTMLDivElement | null>(null);\n const near = useInView(ref, { once: true, margin: \"200px\" });\n const reduced = useReducedMotion();\n const themeVersion = useThemeVersion();\n const [ready, setReady] = useState(false);\n const [drawn, setDrawn] = useState(false);\n // The latest size and callbacks, read by the loader without restarting it.\n const size = useRef({ width, height });\n const itemRef = useRef(onItem);\n const failRef = useRef(onFail);\n useEffect(() => {\n size.current = { width, height };\n itemRef.current = onItem;\n failRef.current = onFail;\n });\n\n // Load the engine once the chart is near the screen; init; dispose with the component.\n useEffect(() => {\n if (!near) return undefined;\n let alive = true;\n Promise.all([engine(), RENDERERS[renderer]()]).then(\n ([module, painter]) => {\n if (!alive || !ref.current) return;\n install(module);\n painter.install();\n const { init } = painter;\n const chart = init(ref.current, null, { renderer, ...size.current });\n chart.on(\"finished\", () => setDrawn(true));\n chart.on(\"click\", (params) => {\n const p = params as { seriesIndex?: number; dataIndex?: number };\n if (p.seriesIndex != null && p.dataIndex != null) itemRef.current?.({ seriesIndex: p.seriesIndex, dataIndex: p.dataIndex });\n });\n instance.current = chart;\n setReady(true);\n },\n () => alive && failRef.current(),\n );\n return () => {\n alive = false;\n instance.current?.dispose();\n instance.current = null;\n setReady(false);\n };\n }, [near, renderer, engine, instance]);\n\n useEffect(() => {\n if (ready) instance.current?.resize({ width, height });\n }, [ready, width, height, instance]);\n\n // The option: rebuilt from the theme resolved on the chart's element, on every change of data, size or theme.\n useEffect(() => {\n const chart = instance.current;\n if (!ready || !chart || !ref.current) return;\n const option = build(resolveTheme(ref.current), { width, height });\n chart.setOption({ ...option, animation: !reduced && (option.animation as boolean | undefined) !== false }, { notMerge: true });\n }, [ready, build, themeVersion, reduced, width, height, instance]);\n\n // The keyboard's active item: ECharts' own tooltip and highlight.\n useEffect(() => {\n const chart = instance.current;\n if (!ready || !chart) return;\n chart.dispatchAction({ type: \"downplay\" });\n if (active) {\n const target = { seriesIndex: active.seriesIndex, dataIndex: active.dataIndex, ...(active.dataType ? { dataType: active.dataType } : {}) };\n chart.dispatchAction({ type: \"highlight\", ...target });\n chart.dispatchAction({ type: \"showTip\", ...target });\n } else chart.dispatchAction({ type: \"hideTip\" });\n }, [ready, active, instance]);\n\n return (\n <>\n {!drawn && (\n <div className=\"kzc-skeleton\" aria-hidden>\n {[0.55, 0.8, 0.45, 0.95, 0.7, 0.6].map((h, i) => (\n <i key={i} style={{ height: `${h * 100}%` }} />\n ))}\n </div>\n )}\n <div ref={ref} className=\"kzc-host\" data-pending={drawn ? undefined : \"\"} aria-hidden />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAkCA,IAAM,QAAQ;AAAA,EACZ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,MAAM;AACR;AAGO,SAAS,aAAa,IAA4B;AACvD,QAAM,QAAQ,CAAC,SAAiB,aAAa,OAAO,IAAI,KAAK,EAAE;AAC/D,QAAM,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