@krizaka/charts 0.0.0-stage → 0.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 (273) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +47 -2
  3. package/dist/bar.d.ts +17 -0
  4. package/dist/bar.js +16 -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-6FINSUOS.js +49 -0
  20. package/dist/chunk-6FINSUOS.js.map +1 -0
  21. package/dist/chunk-7CSAGFBW.js +166 -0
  22. package/dist/chunk-7CSAGFBW.js.map +1 -0
  23. package/dist/chunk-7TIFCK5E.js +103 -0
  24. package/dist/chunk-7TIFCK5E.js.map +1 -0
  25. package/dist/chunk-AHQXJSAQ.js +38 -0
  26. package/dist/chunk-AHQXJSAQ.js.map +1 -0
  27. package/dist/chunk-ANUCSRUN.js +43 -0
  28. package/dist/chunk-ANUCSRUN.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-BZ5CQFPH.js +19 -0
  32. package/dist/chunk-BZ5CQFPH.js.map +1 -0
  33. package/dist/chunk-DWJPPEMC.js +455 -0
  34. package/dist/chunk-DWJPPEMC.js.map +1 -0
  35. package/dist/chunk-DZB6HEVO.js +73 -0
  36. package/dist/chunk-DZB6HEVO.js.map +1 -0
  37. package/dist/chunk-EK3Z647J.js +133 -0
  38. package/dist/chunk-EK3Z647J.js.map +1 -0
  39. package/dist/chunk-I5QUZVU2.js +234 -0
  40. package/dist/chunk-I5QUZVU2.js.map +1 -0
  41. package/dist/chunk-OB5EFDDH.js +118 -0
  42. package/dist/chunk-OB5EFDDH.js.map +1 -0
  43. package/dist/chunk-OER6ETT4.js +155 -0
  44. package/dist/chunk-OER6ETT4.js.map +1 -0
  45. package/dist/chunk-PTSB3H5Q.js +205 -0
  46. package/dist/chunk-PTSB3H5Q.js.map +1 -0
  47. package/dist/chunk-TPJDOB7R.js +15 -0
  48. package/dist/chunk-TPJDOB7R.js.map +1 -0
  49. package/dist/chunk-UNK4MJVG.js +378 -0
  50. package/dist/chunk-UNK4MJVG.js.map +1 -0
  51. package/dist/chunk-VKO2OYYM.js +88 -0
  52. package/dist/chunk-VKO2OYYM.js.map +1 -0
  53. package/dist/chunk-VKTZD7UT.js +107 -0
  54. package/dist/chunk-VKTZD7UT.js.map +1 -0
  55. package/dist/chunk-W5FX4TU3.js +102 -0
  56. package/dist/chunk-W5FX4TU3.js.map +1 -0
  57. package/dist/chunk-WBH2QU77.js +178 -0
  58. package/dist/chunk-WBH2QU77.js.map +1 -0
  59. package/dist/chunk-WIRCIOLH.js +145 -0
  60. package/dist/chunk-WIRCIOLH.js.map +1 -0
  61. package/dist/chunk-XAJ3KCC4.js +116 -0
  62. package/dist/chunk-XAJ3KCC4.js.map +1 -0
  63. package/dist/chunk-XC6BQ3RN.js +92 -0
  64. package/dist/chunk-XC6BQ3RN.js.map +1 -0
  65. package/dist/chunk-XLLYNNC6.js +89 -0
  66. package/dist/chunk-XLLYNNC6.js.map +1 -0
  67. package/dist/chunk-XR4ZJDOV.js +15 -0
  68. package/dist/chunk-XR4ZJDOV.js.map +1 -0
  69. package/dist/context-BgYUymEO.d.ts +163 -0
  70. package/dist/frame-I7_xYGy5.d.ts +45 -0
  71. package/dist/full-S2MBPEEP.js +11 -0
  72. package/dist/full-S2MBPEEP.js.map +1 -0
  73. package/dist/funnel-QU5ZPC52.js +13 -0
  74. package/dist/funnel-QU5ZPC52.js.map +1 -0
  75. package/dist/funnel.d.ts +26 -0
  76. package/dist/funnel.js +13 -0
  77. package/dist/funnel.js.map +1 -0
  78. package/dist/gauge.d.ts +38 -0
  79. package/dist/gauge.js +12 -0
  80. package/dist/gauge.js.map +1 -0
  81. package/dist/geo.d.ts +37 -0
  82. package/dist/geo.js +13 -0
  83. package/dist/geo.js.map +1 -0
  84. package/dist/globe.d.ts +36 -0
  85. package/dist/globe.js +12 -0
  86. package/dist/globe.js.map +1 -0
  87. package/dist/heatmap-JWQOKUGM.js +13 -0
  88. package/dist/heatmap-JWQOKUGM.js.map +1 -0
  89. package/dist/heatmap.d.ts +47 -0
  90. package/dist/heatmap.js +15 -0
  91. package/dist/heatmap.js.map +1 -0
  92. package/dist/host-_F8RgiIz.d.ts +15 -0
  93. package/dist/index.d.ts +22 -0
  94. package/dist/index.js +101 -0
  95. package/dist/index.js.map +1 -0
  96. package/dist/line.d.ts +25 -0
  97. package/dist/line.js +18 -0
  98. package/dist/line.js.map +1 -0
  99. package/dist/native.d.ts +300 -0
  100. package/dist/native.js +875 -0
  101. package/dist/native.js.map +1 -0
  102. package/dist/pie.d.ts +37 -0
  103. package/dist/pie.js +16 -0
  104. package/dist/pie.js.map +1 -0
  105. package/dist/provider.d.ts +73 -0
  106. package/dist/provider.js +24 -0
  107. package/dist/provider.js.map +1 -0
  108. package/dist/radar-75GRJ2IK.js +13 -0
  109. package/dist/radar-75GRJ2IK.js.map +1 -0
  110. package/dist/radar.d.ts +22 -0
  111. package/dist/radar.js +13 -0
  112. package/dist/radar.js.map +1 -0
  113. package/dist/sankey-XQTX2EG6.js +13 -0
  114. package/dist/sankey-XQTX2EG6.js.map +1 -0
  115. package/dist/sankey.d.ts +28 -0
  116. package/dist/sankey.js +13 -0
  117. package/dist/sankey.js.map +1 -0
  118. package/dist/scatter-XSNG4OKD.js +13 -0
  119. package/dist/scatter-XSNG4OKD.js.map +1 -0
  120. package/dist/scatter.d.ts +41 -0
  121. package/dist/scatter.js +15 -0
  122. package/dist/scatter.js.map +1 -0
  123. package/dist/sparkline.d.ts +26 -0
  124. package/dist/sparkline.js +15 -0
  125. package/dist/sparkline.js.map +1 -0
  126. package/dist/svg-BJUHYX3B.js +14 -0
  127. package/dist/svg-BJUHYX3B.js.map +1 -0
  128. package/dist/treemap-OMGGGB5U.js +13 -0
  129. package/dist/treemap-OMGGGB5U.js.map +1 -0
  130. package/dist/treemap.d.ts +24 -0
  131. package/dist/treemap.js +14 -0
  132. package/dist/treemap.js.map +1 -0
  133. package/dist/world-110m-DVFWXS42.js +18 -0
  134. package/dist/world-110m-DVFWXS42.js.map +1 -0
  135. package/package.json +518 -3
  136. package/registry/area-chart.json +784 -0
  137. package/registry/bar-chart.json +783 -0
  138. package/registry/calendar-heatmap.json +459 -0
  139. package/registry/candlestick.json +552 -0
  140. package/registry/chart.json +440 -0
  141. package/registry/charts-provider.json +190 -0
  142. package/registry/examples/area-chart/credits-usage.d.ts +4 -0
  143. package/registry/examples/area-chart/credits-usage.js +38 -0
  144. package/registry/examples/area-chart/credits-usage.tsx +32 -0
  145. package/registry/examples/area-chart/native/credits-usage.d.ts +4 -0
  146. package/registry/examples/area-chart/native/credits-usage.dark.png +0 -0
  147. package/registry/examples/area-chart/native/credits-usage.js +33 -0
  148. package/registry/examples/area-chart/native/credits-usage.light.png +0 -0
  149. package/registry/examples/area-chart/native/credits-usage.tsx +27 -0
  150. package/registry/examples/area-chart/storage.d.ts +4 -0
  151. package/registry/examples/area-chart/storage.js +27 -0
  152. package/registry/examples/area-chart/storage.tsx +21 -0
  153. package/registry/examples/bar-chart/jobs-by-status.d.ts +4 -0
  154. package/registry/examples/bar-chart/jobs-by-status.js +37 -0
  155. package/registry/examples/bar-chart/jobs-by-status.tsx +31 -0
  156. package/registry/examples/bar-chart/native/jobs-by-status.d.ts +4 -0
  157. package/registry/examples/bar-chart/native/jobs-by-status.dark.png +0 -0
  158. package/registry/examples/bar-chart/native/jobs-by-status.js +32 -0
  159. package/registry/examples/bar-chart/native/jobs-by-status.light.png +0 -0
  160. package/registry/examples/bar-chart/native/jobs-by-status.tsx +26 -0
  161. package/registry/examples/bar-chart/plans-by-quarter.d.ts +4 -0
  162. package/registry/examples/bar-chart/plans-by-quarter.js +31 -0
  163. package/registry/examples/bar-chart/plans-by-quarter.tsx +26 -0
  164. package/registry/examples/bar-chart/top-supporters.d.ts +4 -0
  165. package/registry/examples/bar-chart/top-supporters.js +32 -0
  166. package/registry/examples/bar-chart/top-supporters.tsx +27 -0
  167. package/registry/examples/calendar-heatmap/publishing.d.ts +4 -0
  168. package/registry/examples/calendar-heatmap/publishing.js +28 -0
  169. package/registry/examples/calendar-heatmap/publishing.tsx +23 -0
  170. package/registry/examples/candlestick/auction-bids.d.ts +4 -0
  171. package/registry/examples/candlestick/auction-bids.js +37 -0
  172. package/registry/examples/candlestick/auction-bids.tsx +32 -0
  173. package/registry/examples/chart/polar-uploads.d.ts +4 -0
  174. package/registry/examples/chart/polar-uploads.js +34 -0
  175. package/registry/examples/chart/polar-uploads.tsx +30 -0
  176. package/registry/examples/charts-provider/french-orazaka.d.ts +4 -0
  177. package/registry/examples/charts-provider/french-orazaka.js +26 -0
  178. package/registry/examples/charts-provider/french-orazaka.tsx +22 -0
  179. package/registry/examples/charts-provider/native/french-orazaka.d.ts +4 -0
  180. package/registry/examples/charts-provider/native/french-orazaka.dark.png +0 -0
  181. package/registry/examples/charts-provider/native/french-orazaka.js +17 -0
  182. package/registry/examples/charts-provider/native/french-orazaka.light.png +0 -0
  183. package/registry/examples/charts-provider/native/french-orazaka.tsx +17 -0
  184. package/registry/examples/funnel/signup.d.ts +4 -0
  185. package/registry/examples/funnel/signup.js +30 -0
  186. package/registry/examples/funnel/signup.tsx +24 -0
  187. package/registry/examples/gauge/challenge-goal.d.ts +4 -0
  188. package/registry/examples/gauge/challenge-goal.js +24 -0
  189. package/registry/examples/gauge/challenge-goal.tsx +18 -0
  190. package/registry/examples/gauge/credits-quota.d.ts +4 -0
  191. package/registry/examples/gauge/credits-quota.js +26 -0
  192. package/registry/examples/gauge/credits-quota.tsx +19 -0
  193. package/registry/examples/gauge/native/credits-quota.d.ts +4 -0
  194. package/registry/examples/gauge/native/credits-quota.dark.png +0 -0
  195. package/registry/examples/gauge/native/credits-quota.js +25 -0
  196. package/registry/examples/gauge/native/credits-quota.light.png +0 -0
  197. package/registry/examples/gauge/native/credits-quota.tsx +18 -0
  198. package/registry/examples/geo-map/viewers.d.ts +4 -0
  199. package/registry/examples/geo-map/viewers.js +43 -0
  200. package/registry/examples/geo-map/viewers.tsx +29 -0
  201. package/registry/examples/globe/deployment-regions.d.ts +4 -0
  202. package/registry/examples/globe/deployment-regions.js +36 -0
  203. package/registry/examples/globe/deployment-regions.tsx +30 -0
  204. package/registry/examples/heatmap/upload-activity.d.ts +4 -0
  205. package/registry/examples/heatmap/upload-activity.js +30 -0
  206. package/registry/examples/heatmap/upload-activity.tsx +25 -0
  207. package/registry/examples/line-chart/creator-earnings.d.ts +4 -0
  208. package/registry/examples/line-chart/creator-earnings.js +35 -0
  209. package/registry/examples/line-chart/creator-earnings.tsx +30 -0
  210. package/registry/examples/line-chart/forecast.d.ts +4 -0
  211. package/registry/examples/line-chart/forecast.js +36 -0
  212. package/registry/examples/line-chart/forecast.tsx +30 -0
  213. package/registry/examples/line-chart/live-jobs.d.ts +4 -0
  214. package/registry/examples/line-chart/live-jobs.js +21 -0
  215. package/registry/examples/line-chart/live-jobs.tsx +23 -0
  216. package/registry/examples/line-chart/native/creator-earnings.d.ts +4 -0
  217. package/registry/examples/line-chart/native/creator-earnings.dark.png +0 -0
  218. package/registry/examples/line-chart/native/creator-earnings.js +32 -0
  219. package/registry/examples/line-chart/native/creator-earnings.light.png +0 -0
  220. package/registry/examples/line-chart/native/creator-earnings.tsx +26 -0
  221. package/registry/examples/line-chart/states.d.ts +4 -0
  222. package/registry/examples/line-chart/states.js +16 -0
  223. package/registry/examples/line-chart/states.tsx +13 -0
  224. package/registry/examples/pie-chart/credit-spend.d.ts +4 -0
  225. package/registry/examples/pie-chart/credit-spend.js +30 -0
  226. package/registry/examples/pie-chart/credit-spend.tsx +24 -0
  227. package/registry/examples/pie-chart/native/credit-spend.d.ts +4 -0
  228. package/registry/examples/pie-chart/native/credit-spend.dark.png +0 -0
  229. package/registry/examples/pie-chart/native/credit-spend.js +17 -0
  230. package/registry/examples/pie-chart/native/credit-spend.light.png +0 -0
  231. package/registry/examples/pie-chart/native/credit-spend.tsx +12 -0
  232. package/registry/examples/pie-chart/storage-by-kind.d.ts +4 -0
  233. package/registry/examples/pie-chart/storage-by-kind.js +31 -0
  234. package/registry/examples/pie-chart/storage-by-kind.tsx +26 -0
  235. package/registry/examples/radar-chart/model-comparison.d.ts +4 -0
  236. package/registry/examples/radar-chart/model-comparison.js +33 -0
  237. package/registry/examples/radar-chart/model-comparison.tsx +28 -0
  238. package/registry/examples/sankey/credit-flow.d.ts +4 -0
  239. package/registry/examples/sankey/credit-flow.js +37 -0
  240. package/registry/examples/sankey/credit-flow.tsx +32 -0
  241. package/registry/examples/scatter-chart/watch-time.d.ts +4 -0
  242. package/registry/examples/scatter-chart/watch-time.js +36 -0
  243. package/registry/examples/scatter-chart/watch-time.tsx +31 -0
  244. package/registry/examples/sparkline/bars.d.ts +4 -0
  245. package/registry/examples/sparkline/bars.js +12 -0
  246. package/registry/examples/sparkline/bars.tsx +7 -0
  247. package/registry/examples/sparkline/native/stat-trend.d.ts +4 -0
  248. package/registry/examples/sparkline/native/stat-trend.dark.png +0 -0
  249. package/registry/examples/sparkline/native/stat-trend.js +12 -0
  250. package/registry/examples/sparkline/native/stat-trend.light.png +0 -0
  251. package/registry/examples/sparkline/native/stat-trend.tsx +7 -0
  252. package/registry/examples/sparkline/stat-trend.d.ts +4 -0
  253. package/registry/examples/sparkline/stat-trend.js +18 -0
  254. package/registry/examples/sparkline/stat-trend.tsx +15 -0
  255. package/registry/examples/sparkline/table-rows.d.ts +4 -0
  256. package/registry/examples/sparkline/table-rows.js +23 -0
  257. package/registry/examples/sparkline/table-rows.tsx +26 -0
  258. package/registry/examples/treemap/storage.d.ts +4 -0
  259. package/registry/examples/treemap/storage.js +17 -0
  260. package/registry/examples/treemap/storage.tsx +13 -0
  261. package/registry/funnel.json +486 -0
  262. package/registry/gauge.json +599 -0
  263. package/registry/geo-map.json +483 -0
  264. package/registry/globe.json +468 -0
  265. package/registry/heatmap.json +530 -0
  266. package/registry/index.json +420 -0
  267. package/registry/line-chart.json +792 -0
  268. package/registry/pie-chart.json +1287 -0
  269. package/registry/radar-chart.json +458 -0
  270. package/registry/sankey.json +502 -0
  271. package/registry/scatter-chart.json +558 -0
  272. package/registry/sparkline.json +562 -0
  273. package/registry/treemap.json +431 -0
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/charts registry. */
3
+ declare const Example: ComponentType;
4
+ export default Example;
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ // registry/examples/sparkline/native/stat-trend.tsx
4
+ import { Sparkline } from "@krizaka/charts/native";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var views = [820, 760, 910, 880, 1020, 990, 1130, 1210, 1090, 1340, 1280, 1420, 1390, 1510, 1620, 1580, 1700, 1640, 1810, 1760, 1930, 2040, 1980, 2150, 2090, 2260, 2340, 2280, 2410, 2520];
7
+ function StatTrend() {
8
+ return /* @__PURE__ */ jsx(Sparkline, { title: "Views, last 30 days", data: views, variant: "area", trendTone: true, width: 160, height: 40, format: "integer" });
9
+ }
10
+ export {
11
+ StatTrend as default
12
+ };
@@ -0,0 +1,7 @@
1
+ import { Sparkline } from "@krizaka/charts/native";
2
+
3
+ const views = [820, 760, 910, 880, 1_020, 990, 1_130, 1_210, 1_090, 1_340, 1_280, 1_420, 1_390, 1_510, 1_620, 1_580, 1_700, 1_640, 1_810, 1_760, 1_930, 2_040, 1_980, 2_150, 2_090, 2_260, 2_340, 2_280, 2_410, 2_520];
4
+
5
+ export default function StatTrend() {
6
+ return <Sparkline title="Views, last 30 days" data={views} variant="area" trendTone width={160} height={40} format="integer" />;
7
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/charts registry. */
3
+ declare const Example: ComponentType;
4
+ export default Example;
@@ -0,0 +1,18 @@
1
+ "use client";
2
+
3
+ // registry/examples/sparkline/stat-trend.tsx
4
+ import { Sparkline } from "@krizaka/charts/sparkline";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var views = [820, 760, 910, 880, 1020, 990, 1130, 1210, 1090, 1340, 1280, 1420, 1390, 1510, 1620, 1580, 1700, 1640, 1810, 1760, 1930, 2040, 1980, 2150, 2090, 2260, 2340, 2280, 2410, 2520];
7
+ function StatTrend() {
8
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-end", gap: 16 }, children: [
9
+ /* @__PURE__ */ jsxs("div", { children: [
10
+ /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: 13, color: "var(--kz-text-secondary)" }, children: "Views, last 30 days" }),
11
+ /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: 28, fontWeight: 600, color: "var(--kz-text-primary)" }, children: "2,520" })
12
+ ] }),
13
+ /* @__PURE__ */ jsx(Sparkline, { title: "Views, last 30 days", data: views, variant: "area", trendTone: true, width: 140, height: 40, format: "integer" })
14
+ ] });
15
+ }
16
+ export {
17
+ StatTrend as default
18
+ };
@@ -0,0 +1,15 @@
1
+ import { Sparkline } from "@krizaka/charts/sparkline";
2
+
3
+ const views = [820, 760, 910, 880, 1_020, 990, 1_130, 1_210, 1_090, 1_340, 1_280, 1_420, 1_390, 1_510, 1_620, 1_580, 1_700, 1_640, 1_810, 1_760, 1_930, 2_040, 1_980, 2_150, 2_090, 2_260, 2_340, 2_280, 2_410, 2_520];
4
+
5
+ export default function StatTrend() {
6
+ return (
7
+ <div style={{ display: "flex", alignItems: "flex-end", gap: 16 }}>
8
+ <div>
9
+ <p style={{ margin: 0, fontSize: 13, color: "var(--kz-text-secondary)" }}>Views, last 30 days</p>
10
+ <p style={{ margin: 0, fontSize: 28, fontWeight: 600, color: "var(--kz-text-primary)" }}>2,520</p>
11
+ </div>
12
+ <Sparkline title="Views, last 30 days" data={views} variant="area" trendTone width={140} height={40} format="integer" />
13
+ </div>
14
+ );
15
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/charts registry. */
3
+ declare const Example: ComponentType;
4
+ export default Example;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ // registry/examples/sparkline/table-rows.tsx
4
+ import { Sparkline } from "@krizaka/charts/sparkline";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var models = [
7
+ { name: "Chat \xB7 Mistral Large", p95: [820, 790, 805, 760, 742, 731, 720, 704, 699, 688, 690, 676] },
8
+ { name: "Image \xB7 Flux", p95: [2400, 2380, 2520, 2610, 2590, 2700, 2760, 2810, 2790, 2880, 2910, 2950] },
9
+ { name: "Speech \xB7 Whisper", p95: [310, 305, 312, 309, 300, 311, 306, 304, 308, 302, 307, 305] }
10
+ ];
11
+ function TableRows() {
12
+ return /* @__PURE__ */ jsx("table", { style: { borderCollapse: "collapse", fontSize: 13, color: "var(--kz-text-primary)" }, children: /* @__PURE__ */ jsx("tbody", { children: models.map((m) => /* @__PURE__ */ jsxs("tr", { style: { borderTop: "1px solid var(--kz-border-subtle)" }, children: [
13
+ /* @__PURE__ */ jsx("th", { scope: "row", style: { padding: "8px 16px 8px 0", textAlign: "left", fontWeight: 500 }, children: m.name }),
14
+ /* @__PURE__ */ jsx("td", { style: { padding: 8 }, children: /* @__PURE__ */ jsx(Sparkline, { title: `${m.name}, p95 latency`, data: m.p95, trendTone: "inverse", width: 120, height: 28, format: { style: "unit", unit: "millisecond" } }) }),
15
+ /* @__PURE__ */ jsxs("td", { style: { padding: 8, textAlign: "right" }, children: [
16
+ m.p95[m.p95.length - 1],
17
+ " ms"
18
+ ] })
19
+ ] }, m.name)) }) });
20
+ }
21
+ export {
22
+ TableRows as default
23
+ };
@@ -0,0 +1,26 @@
1
+ import { Sparkline } from "@krizaka/charts/sparkline";
2
+
3
+ // p95 latency (ms) over the last 12 hours: down is good, hence `trendTone="inverse"`.
4
+ const models = [
5
+ { name: "Chat · Mistral Large", p95: [820, 790, 805, 760, 742, 731, 720, 704, 699, 688, 690, 676] },
6
+ { name: "Image · Flux", p95: [2_400, 2_380, 2_520, 2_610, 2_590, 2_700, 2_760, 2_810, 2_790, 2_880, 2_910, 2_950] },
7
+ { name: "Speech · Whisper", p95: [310, 305, 312, 309, 300, 311, 306, 304, 308, 302, 307, 305] },
8
+ ];
9
+
10
+ export default function TableRows() {
11
+ return (
12
+ <table style={{ borderCollapse: "collapse", fontSize: 13, color: "var(--kz-text-primary)" }}>
13
+ <tbody>
14
+ {models.map((m) => (
15
+ <tr key={m.name} style={{ borderTop: "1px solid var(--kz-border-subtle)" }}>
16
+ <th scope="row" style={{ padding: "8px 16px 8px 0", textAlign: "left", fontWeight: 500 }}>{m.name}</th>
17
+ <td style={{ padding: 8 }}>
18
+ <Sparkline title={`${m.name}, p95 latency`} data={m.p95} trendTone="inverse" width={120} height={28} format={{ style: "unit", unit: "millisecond" }} />
19
+ </td>
20
+ <td style={{ padding: 8, textAlign: "right" }}>{m.p95[m.p95.length - 1]} ms</td>
21
+ </tr>
22
+ ))}
23
+ </tbody>
24
+ </table>
25
+ );
26
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/charts registry. */
3
+ declare const Example: ComponentType;
4
+ export default Example;
@@ -0,0 +1,17 @@
1
+ "use client";
2
+
3
+ // registry/examples/treemap/storage.tsx
4
+ import { Treemap } from "@krizaka/charts/treemap";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var projects = [
7
+ { name: "Documentary \u201CFleuve\u201D", children: [{ name: "Rushes", value: 412 }, { name: "Exports", value: 96 }, { name: "Audio", value: 38 }] },
8
+ { name: "Weekly vlog", children: [{ name: "Rushes", value: 188 }, { name: "Exports", value: 71 }, { name: "Thumbnails", value: 12 }] },
9
+ { name: "Course \u201CColour\u201D", children: [{ name: "Lessons", value: 143 }, { name: "Exports", value: 52 }] },
10
+ { name: "Archive", value: 61 }
11
+ ];
12
+ function Storage() {
13
+ return /* @__PURE__ */ jsx(Treemap, { title: "Storage by project", data: projects, format: { style: "unit", unit: "gigabyte" }, pathLabel: "Project \u203A kind", valueLabel: "Size" });
14
+ }
15
+ export {
16
+ Storage as default
17
+ };
@@ -0,0 +1,13 @@
1
+ import { Treemap } from "@krizaka/charts/treemap";
2
+
3
+ // Gigabytes by project, then by kind of file.
4
+ const projects = [
5
+ { name: "Documentary “Fleuve”", children: [{ name: "Rushes", value: 412 }, { name: "Exports", value: 96 }, { name: "Audio", value: 38 }] },
6
+ { name: "Weekly vlog", children: [{ name: "Rushes", value: 188 }, { name: "Exports", value: 71 }, { name: "Thumbnails", value: 12 }] },
7
+ { name: "Course “Colour”", children: [{ name: "Lessons", value: 143 }, { name: "Exports", value: 52 }] },
8
+ { name: "Archive", value: 61 },
9
+ ];
10
+
11
+ export default function Storage() {
12
+ return <Treemap title="Storage by project" data={projects} format={{ style: "unit", unit: "gigabyte" }} pathLabel="Project › kind" valueLabel="Size" />;
13
+ }
@@ -0,0 +1,486 @@
1
+ {
2
+ "name": "funnel",
3
+ "package": "@krizaka/charts",
4
+ "type": "chart",
5
+ "title": "Funnel",
6
+ "summary": "Stages that lose people on the way, with the conversion from each stage to the next and from the first written beside it.",
7
+ "description": "Stages that lose people on the way, with the conversion from each stage to the next and from the first written beside it.",
8
+ "status": "beta",
9
+ "category": "charts",
10
+ "platforms": "web",
11
+ "engine": "echarts",
12
+ "whenToUse": [
13
+ "A sign-up or purchase journey: visit, sign-up, verification, first video, first sale."
14
+ ],
15
+ "whenNotToUse": [
16
+ {
17
+ "when": "Flows that branch.",
18
+ "use": "sankey"
19
+ },
20
+ {
21
+ "when": "Stages that do not contain each other.",
22
+ "use": "bar-chart"
23
+ }
24
+ ],
25
+ "bestPractices": [
26
+ "Order the stages as the journey goes; each count includes the next.",
27
+ "Name the columns of the table in your language (`fromFirstLabel`, `fromPreviousLabel`)."
28
+ ],
29
+ "accessibility": {
30
+ "keyboard": [
31
+ {
32
+ "keys": "Tab",
33
+ "action": "Moves the focus to the plot (one tab stop), then to the data and export buttons."
34
+ },
35
+ {
36
+ "keys": "Arrow keys",
37
+ "action": "Walk the items one by one: each is announced and highlighted, its tooltip shown."
38
+ },
39
+ {
40
+ "keys": "Home / End",
41
+ "action": "Jump to the first or the last item."
42
+ },
43
+ {
44
+ "keys": "Esc",
45
+ "action": "Hides the tooltip and clears the highlight."
46
+ }
47
+ ],
48
+ "notes": [
49
+ "The plot is a group named by the title and described by a summary written from the data, read before anything else.",
50
+ "The data table is always in the page for assistive technology; “Show data” reveals it for everyone.",
51
+ "The engine (ECharts core and this one chart type) loads when the chart nears the screen; a skeleton of the same height holds its place, so nothing shifts.",
52
+ "Under reduced motion the chart is drawn without animation.",
53
+ "The summary says each step's conversion and the overall one."
54
+ ]
55
+ },
56
+ "related": [
57
+ "sankey",
58
+ "bar-chart"
59
+ ],
60
+ "source": "packages/charts/src/meta/funnel.ts",
61
+ "install": {
62
+ "web": "npm install @krizaka/charts",
63
+ "native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
64
+ },
65
+ "web": {
66
+ "entry": "@krizaka/charts/funnel",
67
+ "import": "import { Funnel } from \"@krizaka/charts/funnel\";",
68
+ "props": [
69
+ {
70
+ "component": "Funnel",
71
+ "description": "",
72
+ "props": [
73
+ {
74
+ "name": "data",
75
+ "type": "readonly T[]",
76
+ "default": null,
77
+ "description": "One row per stage, first stage first.",
78
+ "required": true
79
+ },
80
+ {
81
+ "name": "label",
82
+ "type": "string | ((datum: T, index: number) => string)",
83
+ "default": null,
84
+ "description": "The field (or function) naming the stage.",
85
+ "required": true
86
+ },
87
+ {
88
+ "name": "title",
89
+ "type": "string",
90
+ "default": null,
91
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
92
+ "required": true
93
+ },
94
+ {
95
+ "name": "value",
96
+ "type": "string | ((datum: T, index: number) => number)",
97
+ "default": null,
98
+ "description": "The field of how many reached it.",
99
+ "required": true
100
+ },
101
+ {
102
+ "name": "brand",
103
+ "type": "BrandId",
104
+ "default": null,
105
+ "description": "The brand whose palette the charts use. Without it, a chart follows a `.brand-<id>` ancestor, else Krizaka. Set it\nwhen the app loads a brand stylesheet on `:root` (`@krizaka/tokens/brands/orazaka.css`).",
106
+ "required": false
107
+ },
108
+ {
109
+ "name": "className",
110
+ "type": "string",
111
+ "default": null,
112
+ "description": "A class on the figure (layout: margins, grid placement).",
113
+ "required": false
114
+ },
115
+ {
116
+ "name": "dataTable",
117
+ "type": "boolean",
118
+ "default": null,
119
+ "description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
120
+ "required": false
121
+ },
122
+ {
123
+ "name": "description",
124
+ "type": "ReactNode",
125
+ "default": null,
126
+ "description": "A sentence under the title: the period, the unit, the source.",
127
+ "required": false
128
+ },
129
+ {
130
+ "name": "empty",
131
+ "type": "ReactNode",
132
+ "default": null,
133
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
134
+ "required": false
135
+ },
136
+ {
137
+ "name": "error",
138
+ "type": "ReactNode",
139
+ "default": null,
140
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
141
+ "required": false
142
+ },
143
+ {
144
+ "name": "exportable",
145
+ "type": "boolean | readonly ExportFormat[]",
146
+ "default": null,
147
+ "description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
148
+ "required": false
149
+ },
150
+ {
151
+ "name": "format",
152
+ "type": "ValueFormat",
153
+ "default": null,
154
+ "description": "How the counts are written. Default `\"integer\"`.",
155
+ "required": false
156
+ },
157
+ {
158
+ "name": "fromFirstLabel",
159
+ "type": "string",
160
+ "default": null,
161
+ "description": "The header of the share of the first stage. Default “% first”.",
162
+ "required": false
163
+ },
164
+ {
165
+ "name": "fromPreviousLabel",
166
+ "type": "string",
167
+ "default": null,
168
+ "description": "The header of the share of the previous stage. Default “% previous”.",
169
+ "required": false
170
+ },
171
+ {
172
+ "name": "height",
173
+ "type": "number",
174
+ "default": null,
175
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
176
+ "required": false
177
+ },
178
+ {
179
+ "name": "hideTitle",
180
+ "type": "boolean",
181
+ "default": null,
182
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
183
+ "required": false
184
+ },
185
+ {
186
+ "name": "id",
187
+ "type": "string",
188
+ "default": null,
189
+ "description": "The id of the figure.",
190
+ "required": false
191
+ },
192
+ {
193
+ "name": "labels",
194
+ "type": "ChartLabelsInput",
195
+ "default": null,
196
+ "description": "The words, translated: the buttons, the states, the written summary.",
197
+ "required": false
198
+ },
199
+ {
200
+ "name": "live",
201
+ "type": "boolean",
202
+ "default": null,
203
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
204
+ "required": false
205
+ },
206
+ {
207
+ "name": "loading",
208
+ "type": "boolean",
209
+ "default": null,
210
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
211
+ "required": false
212
+ },
213
+ {
214
+ "name": "locale",
215
+ "type": "Locale",
216
+ "default": null,
217
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
218
+ "required": false
219
+ },
220
+ {
221
+ "name": "renderer",
222
+ "type": "Renderer",
223
+ "default": null,
224
+ "description": "`svg` (default): sharp, exportable as SVG. `canvas`: for tens of thousands of marks.",
225
+ "required": false
226
+ },
227
+ {
228
+ "name": "stageLabel",
229
+ "type": "string",
230
+ "default": null,
231
+ "description": "The headers of the data table: the stage, the count, the share of the first, of the previous.",
232
+ "required": false
233
+ },
234
+ {
235
+ "name": "style",
236
+ "type": "CSSProperties",
237
+ "default": null,
238
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
239
+ "required": false
240
+ },
241
+ {
242
+ "name": "summary",
243
+ "type": "\"hidden\" | \"visible\"",
244
+ "default": null,
245
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
246
+ "required": false
247
+ },
248
+ {
249
+ "name": "summaryText",
250
+ "type": "string",
251
+ "default": null,
252
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
253
+ "required": false
254
+ },
255
+ {
256
+ "name": "valueLabel",
257
+ "type": "string",
258
+ "default": null,
259
+ "description": "The header of the counts.",
260
+ "required": false
261
+ }
262
+ ]
263
+ }
264
+ ],
265
+ "examples": [
266
+ {
267
+ "name": "signup",
268
+ "title": "Sign-up funnel",
269
+ "description": "Orochia's creator sign-up, from visit to first sale.",
270
+ "path": "examples/funnel/signup.tsx",
271
+ "module": "@krizaka/charts/registry/examples/funnel/signup",
272
+ "code": "import { Funnel } from \"@krizaka/charts/funnel\";\n\nconst stages = [\n { stage: \"Visited the creator page\", people: 48_200 },\n { stage: \"Created an account\", people: 9_640 },\n { stage: \"Verified their identity\", people: 6_170 },\n { stage: \"Published a first video\", people: 3_210 },\n { stage: \"Made a first sale\", people: 1_180 },\n];\n\nexport default function Signup() {\n return (\n <Funnel\n title=\"Creator sign-up, September\"\n data={stages}\n label=\"stage\"\n value=\"people\"\n stageLabel=\"Stage\"\n valueLabel=\"Creators\"\n fromFirstLabel=\"% of visits\"\n fromPreviousLabel=\"% of previous\"\n />\n );\n}\n"
273
+ }
274
+ ]
275
+ },
276
+ "native": null,
277
+ "files": [],
278
+ "dependencies": [
279
+ "@krizaka/intl@workspace:^",
280
+ "d3-geo@^3.1.1",
281
+ "echarts@^6.1.0",
282
+ "topojson-client@^3.1.0"
283
+ ],
284
+ "registryDependencies": [],
285
+ "demo": {
286
+ "path": "examples/funnel/signup.tsx",
287
+ "content": "import { Funnel } from \"@krizaka/charts/funnel\";\n\nconst stages = [\n { stage: \"Visited the creator page\", people: 48_200 },\n { stage: \"Created an account\", people: 9_640 },\n { stage: \"Verified their identity\", people: 6_170 },\n { stage: \"Published a first video\", people: 3_210 },\n { stage: \"Made a first sale\", people: 1_180 },\n];\n\nexport default function Signup() {\n return (\n <Funnel\n title=\"Creator sign-up, September\"\n data={stages}\n label=\"stage\"\n value=\"people\"\n stageLabel=\"Stage\"\n valueLabel=\"Creators\"\n fromFirstLabel=\"% of visits\"\n fromPreviousLabel=\"% of previous\"\n />\n );\n}\n"
288
+ },
289
+ "props": [
290
+ {
291
+ "component": "Funnel",
292
+ "description": "",
293
+ "props": [
294
+ {
295
+ "name": "data",
296
+ "type": "readonly T[]",
297
+ "default": null,
298
+ "description": "One row per stage, first stage first.",
299
+ "required": true
300
+ },
301
+ {
302
+ "name": "label",
303
+ "type": "string | ((datum: T, index: number) => string)",
304
+ "default": null,
305
+ "description": "The field (or function) naming the stage.",
306
+ "required": true
307
+ },
308
+ {
309
+ "name": "title",
310
+ "type": "string",
311
+ "default": null,
312
+ "description": "What the chart shows, in a few words: its accessible name, and its heading unless `hideTitle`.",
313
+ "required": true
314
+ },
315
+ {
316
+ "name": "value",
317
+ "type": "string | ((datum: T, index: number) => number)",
318
+ "default": null,
319
+ "description": "The field of how many reached it.",
320
+ "required": true
321
+ },
322
+ {
323
+ "name": "brand",
324
+ "type": "BrandId",
325
+ "default": null,
326
+ "description": "The brand whose palette the charts use. Without it, a chart follows a `.brand-<id>` ancestor, else Krizaka. Set it\nwhen the app loads a brand stylesheet on `:root` (`@krizaka/tokens/brands/orazaka.css`).",
327
+ "required": false
328
+ },
329
+ {
330
+ "name": "className",
331
+ "type": "string",
332
+ "default": null,
333
+ "description": "A class on the figure (layout: margins, grid placement).",
334
+ "required": false
335
+ },
336
+ {
337
+ "name": "dataTable",
338
+ "type": "boolean",
339
+ "default": null,
340
+ "description": "The \"Show data\" button (the table is in the page for screen readers either way). Default true.",
341
+ "required": false
342
+ },
343
+ {
344
+ "name": "description",
345
+ "type": "ReactNode",
346
+ "default": null,
347
+ "description": "A sentence under the title: the period, the unit, the source.",
348
+ "required": false
349
+ },
350
+ {
351
+ "name": "empty",
352
+ "type": "ReactNode",
353
+ "default": null,
354
+ "description": "What to show when there is nothing to draw (default: the `empty` label). An `EmptyState` of\n@krizaka /ui fits.",
355
+ "required": false
356
+ },
357
+ {
358
+ "name": "error",
359
+ "type": "ReactNode",
360
+ "default": null,
361
+ "description": "The data could not be loaded: `true` says the default words, a node says yours (a retry button…).",
362
+ "required": false
363
+ },
364
+ {
365
+ "name": "exportable",
366
+ "type": "boolean | readonly ExportFormat[]",
367
+ "default": null,
368
+ "description": "Export buttons: `true` for PNG, SVG and CSV, or the formats you want.",
369
+ "required": false
370
+ },
371
+ {
372
+ "name": "format",
373
+ "type": "ValueFormat",
374
+ "default": null,
375
+ "description": "How the counts are written. Default `\"integer\"`.",
376
+ "required": false
377
+ },
378
+ {
379
+ "name": "fromFirstLabel",
380
+ "type": "string",
381
+ "default": null,
382
+ "description": "The header of the share of the first stage. Default “% first”.",
383
+ "required": false
384
+ },
385
+ {
386
+ "name": "fromPreviousLabel",
387
+ "type": "string",
388
+ "default": null,
389
+ "description": "The header of the share of the previous stage. Default “% previous”.",
390
+ "required": false
391
+ },
392
+ {
393
+ "name": "height",
394
+ "type": "number",
395
+ "default": null,
396
+ "description": "The height of the plot in pixels. Default 280 (a sparkline: 32).",
397
+ "required": false
398
+ },
399
+ {
400
+ "name": "hideTitle",
401
+ "type": "boolean",
402
+ "default": null,
403
+ "description": "Visually hide the title (it stays the chart's accessible name): a card that already has its heading.",
404
+ "required": false
405
+ },
406
+ {
407
+ "name": "id",
408
+ "type": "string",
409
+ "default": null,
410
+ "description": "The id of the figure.",
411
+ "required": false
412
+ },
413
+ {
414
+ "name": "labels",
415
+ "type": "ChartLabelsInput",
416
+ "default": null,
417
+ "description": "The words, translated: the buttons, the states, the written summary.",
418
+ "required": false
419
+ },
420
+ {
421
+ "name": "live",
422
+ "type": "boolean",
423
+ "default": null,
424
+ "description": "Streaming data (a job queue, an auction): no entrance on updates, no announcement of every new point.",
425
+ "required": false
426
+ },
427
+ {
428
+ "name": "loading",
429
+ "type": "boolean",
430
+ "default": null,
431
+ "description": "The data is on its way: a skeleton of the chart, announced once.",
432
+ "required": false
433
+ },
434
+ {
435
+ "name": "locale",
436
+ "type": "Locale",
437
+ "default": null,
438
+ "description": "The locale of every figure and date (`\"fr-FR\"`). Default `\"en-US\"`.",
439
+ "required": false
440
+ },
441
+ {
442
+ "name": "renderer",
443
+ "type": "Renderer",
444
+ "default": null,
445
+ "description": "`svg` (default): sharp, exportable as SVG. `canvas`: for tens of thousands of marks.",
446
+ "required": false
447
+ },
448
+ {
449
+ "name": "stageLabel",
450
+ "type": "string",
451
+ "default": null,
452
+ "description": "The headers of the data table: the stage, the count, the share of the first, of the previous.",
453
+ "required": false
454
+ },
455
+ {
456
+ "name": "style",
457
+ "type": "CSSProperties",
458
+ "default": null,
459
+ "description": "Inline style on the figure (layout only: colours come from the tokens).",
460
+ "required": false
461
+ },
462
+ {
463
+ "name": "summary",
464
+ "type": "\"hidden\" | \"visible\"",
465
+ "default": null,
466
+ "description": "The written summary: read by screen readers only (`\"hidden\"`, default), or shown under the chart (`\"visible\"`).",
467
+ "required": false
468
+ },
469
+ {
470
+ "name": "summaryText",
471
+ "type": "string",
472
+ "default": null,
473
+ "description": "Your own summary instead of the generated one (still read first by screen readers).",
474
+ "required": false
475
+ },
476
+ {
477
+ "name": "valueLabel",
478
+ "type": "string",
479
+ "default": null,
480
+ "description": "The header of the counts.",
481
+ "required": false
482
+ }
483
+ ]
484
+ }
485
+ ]
486
+ }