@krizaka/charts 0.3.0 → 0.4.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 (172) hide show
  1. package/README.md +1 -1
  2. package/dist/actions-5VG352VZ.js +53 -0
  3. package/dist/actions-5VG352VZ.js.map +1 -0
  4. package/dist/bar.d.ts +3 -3
  5. package/dist/bar.js +7 -6
  6. package/dist/candlestick.d.ts +2 -2
  7. package/dist/candlestick.js +6 -5
  8. package/dist/card.d.ts +52 -0
  9. package/dist/card.js +19 -0
  10. package/dist/card.js.map +1 -0
  11. package/dist/{cartesian-BRhNQ3ib.d.ts → cartesian-CEY_wwe_.d.ts} +12 -2
  12. package/dist/chart.d.ts +2 -2
  13. package/dist/chart.js +5 -4
  14. package/dist/{chunk-BV4DBGN7.js → chunk-7W4T255Q.js} +4 -4
  15. package/dist/{chunk-W5ILLSPK.js → chunk-AGSSNMK5.js} +5 -5
  16. package/dist/{chunk-VKZZY2QD.js → chunk-FE4LUGAE.js} +5 -5
  17. package/dist/{chunk-ARARFMNE.js → chunk-FIQHMJZK.js} +5 -5
  18. package/dist/chunk-FIQHMJZK.js.map +1 -0
  19. package/dist/{chunk-ANUCSRUN.js → chunk-GD7TWEN3.js} +3 -3
  20. package/dist/chunk-GRRFPI27.js +89 -0
  21. package/dist/chunk-GRRFPI27.js.map +1 -0
  22. package/dist/{chunk-SLEJDQ3A.js → chunk-HH65IEUV.js} +3 -3
  23. package/dist/{chunk-OIRHLJBC.js → chunk-IJTI6VJD.js} +3 -3
  24. package/dist/{chunk-WVTIKOII.js → chunk-IURCLBUQ.js} +2 -2
  25. package/dist/{chunk-CVWSMUUB.js → chunk-JST4HJC3.js} +33 -15
  26. package/dist/chunk-JST4HJC3.js.map +1 -0
  27. package/dist/{chunk-IKQV3NSL.js → chunk-KERGFVSN.js} +3 -3
  28. package/dist/{chunk-XDDALY4C.js → chunk-KMQ7RANJ.js} +5 -5
  29. package/dist/{chunk-NCIQMRV3.js → chunk-LLUQEK5J.js} +5 -5
  30. package/dist/{chunk-AA5EWWYV.js → chunk-LZPZWBBY.js} +2 -2
  31. package/dist/{chunk-PBQV3B6O.js → chunk-MK2ZFUWM.js} +31 -16
  32. package/dist/chunk-MK2ZFUWM.js.map +1 -0
  33. package/dist/{chunk-CSSZLFLO.js → chunk-MRGMLDNS.js} +5 -5
  34. package/dist/{chunk-I3D7KUGN.js → chunk-NLTZWJLV.js} +3 -3
  35. package/dist/{chunk-PWMMXRMC.js → chunk-NV52AKHG.js} +3 -3
  36. package/dist/{chunk-MXLITIGU.js → chunk-NWJ5VDN7.js} +5 -5
  37. package/dist/{chunk-3CJHBJXA.js → chunk-OVASCEGF.js} +12 -73
  38. package/dist/chunk-OVASCEGF.js.map +1 -0
  39. package/dist/{chunk-EQLC2QVN.js → chunk-OZOAKP5F.js} +4 -4
  40. package/dist/chunk-OZOAKP5F.js.map +1 -0
  41. package/dist/{chunk-KNDHO67X.js → chunk-P2NK5L3B.js} +3 -3
  42. package/dist/{chunk-JTKR7ZWP.js → chunk-P6RS2L23.js} +140 -36
  43. package/dist/chunk-P6RS2L23.js.map +1 -0
  44. package/dist/{chunk-W5FX4TU3.js → chunk-PGD6SH5I.js} +30 -2
  45. package/dist/chunk-PGD6SH5I.js.map +1 -0
  46. package/dist/{chunk-4LBXEAGC.js → chunk-PWZHIGPO.js} +5 -5
  47. package/dist/{chunk-L2EKYWVI.js → chunk-VEOJNMPF.js} +3 -3
  48. package/dist/chunk-YHQFW2PR.js +71 -0
  49. package/dist/chunk-YHQFW2PR.js.map +1 -0
  50. package/dist/{chunk-C4MFZLJM.js → chunk-Z4T3JFNU.js} +2 -2
  51. package/dist/{chunk-EEP7PS2L.js → chunk-ZF7LVQTR.js} +3 -3
  52. package/dist/{context-BgYUymEO.d.ts → context-DNW7bJYw.d.ts} +19 -0
  53. package/dist/credits.d.ts +1 -1
  54. package/dist/credits.js +7 -6
  55. package/dist/earnings.d.ts +3 -3
  56. package/dist/earnings.js +8 -7
  57. package/dist/{frame-I7_xYGy5.d.ts → frame-B1HDNm7c.d.ts} +9 -5
  58. package/dist/funnel.d.ts +2 -2
  59. package/dist/funnel.js +6 -5
  60. package/dist/gauge.d.ts +2 -2
  61. package/dist/gauge.js +4 -3
  62. package/dist/geo.d.ts +2 -2
  63. package/dist/geo.js +5 -4
  64. package/dist/globe.d.ts +2 -2
  65. package/dist/globe.js +4 -3
  66. package/dist/goal.d.ts +2 -2
  67. package/dist/goal.js +5 -4
  68. package/dist/heatmap.d.ts +2 -2
  69. package/dist/heatmap.js +6 -5
  70. package/dist/index.d.ts +5 -3
  71. package/dist/index.js +45 -37
  72. package/dist/latency.d.ts +3 -3
  73. package/dist/latency.js +8 -7
  74. package/dist/line.d.ts +3 -3
  75. package/dist/line.js +7 -6
  76. package/dist/native.d.ts +19 -0
  77. package/dist/native.js +13 -1
  78. package/dist/native.js.map +1 -1
  79. package/dist/pie.d.ts +2 -2
  80. package/dist/pie.js +6 -5
  81. package/dist/provider.d.ts +2 -2
  82. package/dist/provider.js +4 -2
  83. package/dist/radar.d.ts +2 -2
  84. package/dist/radar.js +6 -5
  85. package/dist/sankey.d.ts +2 -2
  86. package/dist/sankey.js +6 -5
  87. package/dist/scatter.d.ts +2 -2
  88. package/dist/scatter.js +6 -5
  89. package/dist/sparkline.d.ts +2 -2
  90. package/dist/sparkline.js +6 -5
  91. package/dist/table-sheet-CQBIAV5N.js +36 -0
  92. package/dist/table-sheet-CQBIAV5N.js.map +1 -0
  93. package/dist/throughput.d.ts +3 -3
  94. package/dist/throughput.js +8 -7
  95. package/dist/ticker.d.ts +3 -3
  96. package/dist/ticker.js +8 -7
  97. package/dist/treemap.d.ts +2 -2
  98. package/dist/treemap.js +7 -6
  99. package/package.json +295 -53
  100. package/registry/area-chart.json +82 -12
  101. package/registry/bar-chart.json +82 -12
  102. package/registry/calendar-heatmap.json +46 -18
  103. package/registry/candlestick.json +46 -18
  104. package/registry/chart-card.json +235 -0
  105. package/registry/chart.json +40 -12
  106. package/registry/charts-provider.json +2 -2
  107. package/registry/earnings-chart.json +82 -12
  108. package/registry/examples/chart-card/before-after.d.ts +4 -0
  109. package/registry/examples/chart-card/before-after.js +22 -0
  110. package/registry/examples/chart-card/before-after.tsx +22 -0
  111. package/registry/examples/chart-card/jobs-activity.d.ts +4 -0
  112. package/registry/examples/chart-card/jobs-activity.js +20 -0
  113. package/registry/examples/chart-card/jobs-activity.tsx +20 -0
  114. package/registry/examples/chart-card/sparse-and-empty.d.ts +4 -0
  115. package/registry/examples/chart-card/sparse-and-empty.js +16 -0
  116. package/registry/examples/chart-card/sparse-and-empty.tsx +18 -0
  117. package/registry/examples/chart-card/usage-donut.d.ts +4 -0
  118. package/registry/examples/chart-card/usage-donut.js +18 -0
  119. package/registry/examples/chart-card/usage-donut.tsx +18 -0
  120. package/registry/examples/charts-provider/french-orazaka.js +1 -1
  121. package/registry/examples/charts-provider/french-orazaka.tsx +1 -1
  122. package/registry/examples/kpi-stat/dashboard-row.d.ts +4 -0
  123. package/registry/examples/kpi-stat/dashboard-row.js +19 -0
  124. package/registry/examples/kpi-stat/dashboard-row.tsx +17 -0
  125. package/registry/examples/kpi-stat/single.d.ts +4 -0
  126. package/registry/examples/kpi-stat/single.js +11 -0
  127. package/registry/examples/kpi-stat/single.tsx +6 -0
  128. package/registry/funnel.json +46 -18
  129. package/registry/gauge.json +42 -14
  130. package/registry/geo-map.json +46 -18
  131. package/registry/globe.json +40 -12
  132. package/registry/goal-progress.json +36 -8
  133. package/registry/heatmap.json +46 -18
  134. package/registry/index.json +49 -1
  135. package/registry/job-throughput.json +82 -12
  136. package/registry/kpi-stat.json +296 -0
  137. package/registry/latency-chart.json +82 -12
  138. package/registry/line-chart.json +82 -12
  139. package/registry/pie-chart.json +92 -36
  140. package/registry/price-ticker.json +82 -12
  141. package/registry/radar-chart.json +46 -18
  142. package/registry/sankey.json +46 -18
  143. package/registry/scatter-chart.json +46 -18
  144. package/registry/sparkline.json +38 -10
  145. package/registry/treemap.json +40 -12
  146. package/dist/chunk-3CJHBJXA.js.map +0 -1
  147. package/dist/chunk-ARARFMNE.js.map +0 -1
  148. package/dist/chunk-CVWSMUUB.js.map +0 -1
  149. package/dist/chunk-EQLC2QVN.js.map +0 -1
  150. package/dist/chunk-JTKR7ZWP.js.map +0 -1
  151. package/dist/chunk-PBQV3B6O.js.map +0 -1
  152. package/dist/chunk-W5FX4TU3.js.map +0 -1
  153. /package/dist/{chunk-BV4DBGN7.js.map → chunk-7W4T255Q.js.map} +0 -0
  154. /package/dist/{chunk-W5ILLSPK.js.map → chunk-AGSSNMK5.js.map} +0 -0
  155. /package/dist/{chunk-VKZZY2QD.js.map → chunk-FE4LUGAE.js.map} +0 -0
  156. /package/dist/{chunk-ANUCSRUN.js.map → chunk-GD7TWEN3.js.map} +0 -0
  157. /package/dist/{chunk-SLEJDQ3A.js.map → chunk-HH65IEUV.js.map} +0 -0
  158. /package/dist/{chunk-OIRHLJBC.js.map → chunk-IJTI6VJD.js.map} +0 -0
  159. /package/dist/{chunk-WVTIKOII.js.map → chunk-IURCLBUQ.js.map} +0 -0
  160. /package/dist/{chunk-IKQV3NSL.js.map → chunk-KERGFVSN.js.map} +0 -0
  161. /package/dist/{chunk-XDDALY4C.js.map → chunk-KMQ7RANJ.js.map} +0 -0
  162. /package/dist/{chunk-NCIQMRV3.js.map → chunk-LLUQEK5J.js.map} +0 -0
  163. /package/dist/{chunk-AA5EWWYV.js.map → chunk-LZPZWBBY.js.map} +0 -0
  164. /package/dist/{chunk-CSSZLFLO.js.map → chunk-MRGMLDNS.js.map} +0 -0
  165. /package/dist/{chunk-I3D7KUGN.js.map → chunk-NLTZWJLV.js.map} +0 -0
  166. /package/dist/{chunk-PWMMXRMC.js.map → chunk-NV52AKHG.js.map} +0 -0
  167. /package/dist/{chunk-MXLITIGU.js.map → chunk-NWJ5VDN7.js.map} +0 -0
  168. /package/dist/{chunk-KNDHO67X.js.map → chunk-P2NK5L3B.js.map} +0 -0
  169. /package/dist/{chunk-4LBXEAGC.js.map → chunk-PWZHIGPO.js.map} +0 -0
  170. /package/dist/{chunk-L2EKYWVI.js.map → chunk-VEOJNMPF.js.map} +0 -0
  171. /package/dist/{chunk-C4MFZLJM.js.map → chunk-Z4T3JFNU.js.map} +0 -0
  172. /package/dist/{chunk-EEP7PS2L.js.map → chunk-ZF7LVQTR.js.map} +0 -0
package/dist/pie.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, S as SeriesColor, V as ValueFormat } from './context-BgYUymEO.js';
3
- import { C as ChartFrameProps } from './frame-I7_xYGy5.js';
2
+ import { g as Datum, A as Accessor, S as SeriesColor, V as ValueFormat } from './context-DNW7bJYw.js';
3
+ import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
4
4
 
5
5
  interface PieChartProps<T extends Datum> extends ChartFrameProps {
6
6
  /** One row per part. */
package/dist/pie.js CHANGED
@@ -2,13 +2,14 @@
2
2
  import {
3
3
  DonutChart,
4
4
  PieChart
5
- } from "./chunk-PBQV3B6O.js";
6
- import "./chunk-ANUCSRUN.js";
7
- import "./chunk-W5FX4TU3.js";
5
+ } from "./chunk-MK2ZFUWM.js";
6
+ import "./chunk-GD7TWEN3.js";
7
+ import "./chunk-PGD6SH5I.js";
8
8
  import "./chunk-OB5EFDDH.js";
9
9
  import "./chunk-XLLYNNC6.js";
10
- import "./chunk-JTKR7ZWP.js";
11
- import "./chunk-3CJHBJXA.js";
10
+ import "./chunk-P6RS2L23.js";
11
+ import "./chunk-OVASCEGF.js";
12
+ import "./chunk-GRRFPI27.js";
12
13
  export {
13
14
  DonutChart,
14
15
  PieChart
@@ -1,5 +1,5 @@
1
- import { B as BrandId } from './context-BgYUymEO.js';
2
- export { A as Accessor, C as CategoryFormat, a as ChartKind, b as ChartLabels, c as ChartLabelsInput, d as ChartsProvider, e as ChartsProviderProps, f as ChartsSettings, D as DEFAULT_LABELS, g as Datum, L as Locale, M as Marker, S as SeriesColor, h as SeriesSpec, i as SeriesSummary, T as Threshold, j as Tone, V as ValueFormat } from './context-BgYUymEO.js';
1
+ import { B as BrandId } from './context-DNW7bJYw.js';
2
+ export { A as Accessor, C as CategoryFormat, a as ChartKind, b as ChartLabels, c as ChartLabelsInput, d as ChartsProvider, e as ChartsProviderProps, f as ChartsSettings, D as DEFAULT_LABELS, g as Datum, L as Locale, M as Marker, S as SeriesColor, h as SeriesSpec, i as SeriesSummary, T as Threshold, j as Tone, V as ValueFormat } from './context-DNW7bJYw.js';
3
3
  import 'react';
4
4
 
5
5
  type Mode = "dark" | "light";
package/dist/provider.js CHANGED
@@ -4,13 +4,15 @@ import {
4
4
  } from "./chunk-TPJDOB7R.js";
5
5
  import {
6
6
  ChartsProvider,
7
- DEFAULT_LABELS,
8
7
  DIVERGING,
9
8
  HUES,
10
9
  ORDERS,
11
10
  palette,
12
11
  sequential
13
- } from "./chunk-3CJHBJXA.js";
12
+ } from "./chunk-OVASCEGF.js";
13
+ import {
14
+ DEFAULT_LABELS
15
+ } from "./chunk-GRRFPI27.js";
14
16
  export {
15
17
  ChartsProvider,
16
18
  DEFAULT_LABELS,
package/dist/radar.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, h as SeriesSpec, V as ValueFormat } from './context-BgYUymEO.js';
2
+ import { g as Datum, A as Accessor, h as SeriesSpec, V as ValueFormat } from './context-DNW7bJYw.js';
3
3
  import { E as EngineProps } from './host-_F8RgiIz.js';
4
- import { C as ChartFrameProps } from './frame-I7_xYGy5.js';
4
+ import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
5
5
 
6
6
  interface RadarChartProps<T extends Datum> extends ChartFrameProps, EngineProps {
7
7
  /** One row per axis (“Latency”, “Quality”…). */
package/dist/radar.js CHANGED
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  RadarChart
4
- } from "./chunk-VKZZY2QD.js";
5
- import "./chunk-PWMMXRMC.js";
6
- import "./chunk-W5FX4TU3.js";
4
+ } from "./chunk-FE4LUGAE.js";
5
+ import "./chunk-NV52AKHG.js";
6
+ import "./chunk-PGD6SH5I.js";
7
7
  import "./chunk-XLLYNNC6.js";
8
- import "./chunk-JTKR7ZWP.js";
9
- import "./chunk-3CJHBJXA.js";
8
+ import "./chunk-P6RS2L23.js";
9
+ import "./chunk-OVASCEGF.js";
10
+ import "./chunk-GRRFPI27.js";
10
11
  export {
11
12
  RadarChart
12
13
  };
package/dist/sankey.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, V as ValueFormat } from './context-BgYUymEO.js';
2
+ import { g as Datum, A as Accessor, V as ValueFormat } from './context-DNW7bJYw.js';
3
3
  import { E as EngineProps } from './host-_F8RgiIz.js';
4
- import { C as ChartFrameProps } from './frame-I7_xYGy5.js';
4
+ import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
5
5
 
6
6
  interface SankeyProps<T extends Datum> extends ChartFrameProps, EngineProps {
7
7
  /** One row per flow. */
package/dist/sankey.js CHANGED
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  Sankey
4
- } from "./chunk-MXLITIGU.js";
5
- import "./chunk-PWMMXRMC.js";
6
- import "./chunk-W5FX4TU3.js";
4
+ } from "./chunk-NWJ5VDN7.js";
5
+ import "./chunk-NV52AKHG.js";
6
+ import "./chunk-PGD6SH5I.js";
7
7
  import "./chunk-XLLYNNC6.js";
8
- import "./chunk-JTKR7ZWP.js";
9
- import "./chunk-3CJHBJXA.js";
8
+ import "./chunk-P6RS2L23.js";
9
+ import "./chunk-OVASCEGF.js";
10
+ import "./chunk-GRRFPI27.js";
10
11
  export {
11
12
  Sankey
12
13
  };
package/dist/scatter.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, V as ValueFormat, T as Threshold } from './context-BgYUymEO.js';
2
+ import { g as Datum, A as Accessor, V as ValueFormat, T as Threshold } from './context-DNW7bJYw.js';
3
3
  import { E as EngineProps } from './host-_F8RgiIz.js';
4
- import { C as ChartFrameProps } from './frame-I7_xYGy5.js';
4
+ import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
5
5
 
6
6
  interface ScatterChartProps<T extends Datum> extends ChartFrameProps, EngineProps {
7
7
  /** One row per point. */
package/dist/scatter.js CHANGED
@@ -2,12 +2,13 @@
2
2
  import {
3
3
  ScatterChart,
4
4
  correlation
5
- } from "./chunk-4LBXEAGC.js";
6
- import "./chunk-PWMMXRMC.js";
7
- import "./chunk-W5FX4TU3.js";
5
+ } from "./chunk-PWZHIGPO.js";
6
+ import "./chunk-NV52AKHG.js";
7
+ import "./chunk-PGD6SH5I.js";
8
8
  import "./chunk-XLLYNNC6.js";
9
- import "./chunk-JTKR7ZWP.js";
10
- import "./chunk-3CJHBJXA.js";
9
+ import "./chunk-P6RS2L23.js";
10
+ import "./chunk-OVASCEGF.js";
11
+ import "./chunk-GRRFPI27.js";
11
12
  export {
12
13
  ScatterChart,
13
14
  correlation
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
- import { S as SeriesColor, T as Threshold, V as ValueFormat } from './context-BgYUymEO.js';
3
- import { C as ChartFrameProps } from './frame-I7_xYGy5.js';
2
+ import { S as SeriesColor, T as Threshold, V as ValueFormat } from './context-DNW7bJYw.js';
3
+ import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
4
4
 
5
5
  interface SparklineProps extends Omit<ChartFrameProps, "hideTitle" | "dataTable" | "exportable" | "description"> {
6
6
  /** The values, oldest first (`null` for a gap). */
package/dist/sparkline.js CHANGED
@@ -2,14 +2,15 @@
2
2
  import "./chunk-POQIHFAZ.js";
3
3
  import {
4
4
  Sparkline
5
- } from "./chunk-ARARFMNE.js";
5
+ } from "./chunk-FIQHMJZK.js";
6
6
  import "./chunk-BISL7DYW.js";
7
- import "./chunk-ANUCSRUN.js";
8
- import "./chunk-W5FX4TU3.js";
7
+ import "./chunk-GD7TWEN3.js";
8
+ import "./chunk-PGD6SH5I.js";
9
9
  import "./chunk-OB5EFDDH.js";
10
10
  import "./chunk-XLLYNNC6.js";
11
- import "./chunk-JTKR7ZWP.js";
12
- import "./chunk-3CJHBJXA.js";
11
+ import "./chunk-P6RS2L23.js";
12
+ import "./chunk-OVASCEGF.js";
13
+ import "./chunk-GRRFPI27.js";
13
14
  export {
14
15
  Sparkline
15
16
  };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ "use client";
3
+ import {
4
+ fill
5
+ } from "./chunk-GRRFPI27.js";
6
+
7
+ // src/web/table-sheet.tsx
8
+ import { DataTable } from "@krizaka/ui/data-table";
9
+ import { Dialog } from "@krizaka/ui/dialog";
10
+ import { useMemo } from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ function TableSheet({ title, table, labels, onClose }) {
13
+ const rows = useMemo(() => table.rows.map((cells, i) => ({ id: String(i), cells })), [table.rows]);
14
+ const columns = useMemo(
15
+ () => table.columns.map((header, i) => ({
16
+ id: `c${i}`,
17
+ header,
18
+ value: (row) => row.cells[i] ?? "",
19
+ cell: (row) => row.cells[i] ?? "",
20
+ align: i === 0 ? "start" : "end",
21
+ type: i === 0 ? "title" : "number"
22
+ })),
23
+ [table.columns]
24
+ );
25
+ return /* @__PURE__ */ jsx(Dialog.Root, { open: true, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(Dialog.Content, { placement: "right", size: "lg", closeLabel: labels.close, children: [
26
+ /* @__PURE__ */ jsxs(Dialog.Header, { children: [
27
+ /* @__PURE__ */ jsx(Dialog.Title, { children: title }),
28
+ /* @__PURE__ */ jsx(Dialog.Description, { children: fill(labels.tableRows, { count: rows.length }) })
29
+ ] }),
30
+ /* @__PURE__ */ jsx(Dialog.Body, { children: /* @__PURE__ */ jsx(DataTable, { rows, columns, getRowId: (row) => row.id, caption: fill(labels.tableCaption, { title }) }) })
31
+ ] }) });
32
+ }
33
+ export {
34
+ TableSheet as default
35
+ };
36
+ //# sourceMappingURL=table-sheet-CQBIAV5N.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/web/table-sheet.tsx"],"sourcesContent":["\"use client\";\n// “View as table”: the chart's data in the kit DataTable, in a side Sheet. Loaded only when it opens (the table engine\n// is the heaviest part of the kit).\nimport { DataTable, type DataTableColumn } from \"@krizaka/ui/data-table\";\nimport { Dialog } from \"@krizaka/ui/dialog\";\nimport { useMemo } from \"react\";\n\nimport type { ChartLabels } from \"../core/labels\";\nimport { fill } from \"../core/labels\";\nimport type { TableModel } from \"./frame\";\n\ntype Row = { readonly id: string; readonly cells: readonly string[] };\n\nexport default function TableSheet({ title, table, labels, onClose }: { title: string; table: TableModel; labels: ChartLabels; onClose: () => void }) {\n const rows = useMemo<Row[]>(() => table.rows.map((cells, i) => ({ id: String(i), cells })), [table.rows]);\n const columns = useMemo<DataTableColumn<Row>[]>(\n () =>\n table.columns.map((header, i) => ({\n id: `c${i}`,\n header,\n value: (row) => row.cells[i] ?? \"\",\n cell: (row) => row.cells[i] ?? \"\",\n align: i === 0 ? \"start\" : \"end\",\n type: i === 0 ? \"title\" : \"number\",\n })),\n [table.columns],\n );\n return (\n <Dialog.Root open onOpenChange={(open) => !open && onClose()}>\n <Dialog.Content placement=\"right\" size=\"lg\" closeLabel={labels.close}>\n <Dialog.Header>\n <Dialog.Title>{title}</Dialog.Title>\n <Dialog.Description>{fill(labels.tableRows, { count: rows.length })}</Dialog.Description>\n </Dialog.Header>\n <Dialog.Body>\n <DataTable rows={rows} columns={columns} getRowId={(row) => row.id} caption={fill(labels.tableCaption, { title })} />\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n"],"mappings":";;;;;;;AAGA,SAAS,iBAAuC;AAChD,SAAS,cAAc;AACvB,SAAS,eAAe;AAyBhB,SACE,KADF;AAjBO,SAAR,WAA4B,EAAE,OAAO,OAAO,QAAQ,QAAQ,GAAmF;AACpJ,QAAM,OAAO,QAAe,MAAM,MAAM,KAAK,IAAI,CAAC,OAAO,OAAO,EAAE,IAAI,OAAO,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC;AACxG,QAAM,UAAU;AAAA,IACd,MACE,MAAM,QAAQ,IAAI,CAAC,QAAQ,OAAO;AAAA,MAChC,IAAI,IAAI,CAAC;AAAA,MACT;AAAA,MACA,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK;AAAA,MAChC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK;AAAA,MAC/B,OAAO,MAAM,IAAI,UAAU;AAAA,MAC3B,MAAM,MAAM,IAAI,UAAU;AAAA,IAC5B,EAAE;AAAA,IACJ,CAAC,MAAM,OAAO;AAAA,EAChB;AACA,SACE,oBAAC,OAAO,MAAP,EAAY,MAAI,MAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,QAAQ,GACzD,+BAAC,OAAO,SAAP,EAAe,WAAU,SAAQ,MAAK,MAAK,YAAY,OAAO,OAC7D;AAAA,yBAAC,OAAO,QAAP,EACC;AAAA,0BAAC,OAAO,OAAP,EAAc,iBAAM;AAAA,MACrB,oBAAC,OAAO,aAAP,EAAoB,eAAK,OAAO,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC,GAAE;AAAA,OACtE;AAAA,IACA,oBAAC,OAAO,MAAP,EACC,8BAAC,aAAU,MAAY,SAAkB,UAAU,CAAC,QAAQ,IAAI,IAAI,SAAS,KAAK,OAAO,cAAc,EAAE,MAAM,CAAC,GAAG,GACrH;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import { f as ThroughputLabels } from './labels-DE_743fQ.js';
2
2
  export { T as THROUGHPUT_LABELS } from './labels-DE_743fQ.js';
3
- import { j as Tone, g as Datum, A as Accessor, C as CategoryFormat } from './context-BgYUymEO.js';
3
+ import { j as Tone, g as Datum, A as Accessor, C as CategoryFormat } from './context-DNW7bJYw.js';
4
4
  import * as react from 'react';
5
- import { C as CartesianProps } from './cartesian-BRhNQ3ib.js';
6
- import './frame-I7_xYGy5.js';
5
+ import { C as CartesianProps } from './cartesian-CEY_wwe_.js';
6
+ import './frame-B1HDNm7c.js';
7
7
 
8
8
  /** A status of a job: the field holding its count per period, its name, its tone, and its part in the success rate. */
9
9
  interface JobStatus {
@@ -2,20 +2,21 @@
2
2
  import {
3
3
  DEFAULT_STATUSES,
4
4
  JobThroughput
5
- } from "./chunk-SLEJDQ3A.js";
6
- import "./chunk-WVTIKOII.js";
7
- import "./chunk-CVWSMUUB.js";
5
+ } from "./chunk-HH65IEUV.js";
6
+ import "./chunk-IURCLBUQ.js";
7
+ import "./chunk-JST4HJC3.js";
8
8
  import "./chunk-WBHFVBSK.js";
9
9
  import "./chunk-BISL7DYW.js";
10
- import "./chunk-ANUCSRUN.js";
11
- import "./chunk-W5FX4TU3.js";
10
+ import "./chunk-GD7TWEN3.js";
11
+ import "./chunk-PGD6SH5I.js";
12
12
  import {
13
13
  THROUGHPUT_LABELS
14
14
  } from "./chunk-WNUFGMS7.js";
15
15
  import "./chunk-OB5EFDDH.js";
16
16
  import "./chunk-XLLYNNC6.js";
17
- import "./chunk-JTKR7ZWP.js";
18
- import "./chunk-3CJHBJXA.js";
17
+ import "./chunk-P6RS2L23.js";
18
+ import "./chunk-OVASCEGF.js";
19
+ import "./chunk-GRRFPI27.js";
19
20
  export {
20
21
  DEFAULT_STATUSES,
21
22
  JobThroughput,
package/dist/ticker.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { g as TickerLabels } from './labels-DE_743fQ.js';
2
2
  export { e as TICKER_LABELS } from './labels-DE_743fQ.js';
3
3
  import * as react from 'react';
4
- import { C as CategoryFormat } from './context-BgYUymEO.js';
4
+ import { C as CategoryFormat } from './context-DNW7bJYw.js';
5
5
  import { LineChartProps } from './line.js';
6
- import './cartesian-BRhNQ3ib.js';
7
- import './frame-I7_xYGy5.js';
6
+ import './cartesian-CEY_wwe_.js';
7
+ import './frame-B1HDNm7c.js';
8
8
 
9
9
  /** A bid: when (an ISO date-time or a `Date`) and how much, in money minor units. */
10
10
  interface Bid {
package/dist/ticker.js CHANGED
@@ -1,20 +1,21 @@
1
1
  "use client";
2
2
  import {
3
3
  PriceTicker
4
- } from "./chunk-KNDHO67X.js";
5
- import "./chunk-C4MFZLJM.js";
6
- import "./chunk-CVWSMUUB.js";
4
+ } from "./chunk-P2NK5L3B.js";
5
+ import "./chunk-Z4T3JFNU.js";
6
+ import "./chunk-JST4HJC3.js";
7
7
  import "./chunk-WBHFVBSK.js";
8
8
  import "./chunk-BISL7DYW.js";
9
- import "./chunk-ANUCSRUN.js";
10
- import "./chunk-W5FX4TU3.js";
9
+ import "./chunk-GD7TWEN3.js";
10
+ import "./chunk-PGD6SH5I.js";
11
11
  import {
12
12
  TICKER_LABELS
13
13
  } from "./chunk-WNUFGMS7.js";
14
14
  import "./chunk-OB5EFDDH.js";
15
15
  import "./chunk-XLLYNNC6.js";
16
- import "./chunk-JTKR7ZWP.js";
17
- import "./chunk-3CJHBJXA.js";
16
+ import "./chunk-P6RS2L23.js";
17
+ import "./chunk-OVASCEGF.js";
18
+ import "./chunk-GRRFPI27.js";
18
19
  export {
19
20
  PriceTicker,
20
21
  TICKER_LABELS
package/dist/treemap.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
- import { V as ValueFormat } from './context-BgYUymEO.js';
2
+ import { V as ValueFormat } from './context-DNW7bJYw.js';
3
3
  import { E as EngineProps } from './host-_F8RgiIz.js';
4
- import { C as ChartFrameProps } from './frame-I7_xYGy5.js';
4
+ import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
5
5
 
6
6
  /** A part: a name and either a value or children (whose values add up). */
7
7
  interface TreemapNode {
package/dist/treemap.js CHANGED
@@ -1,13 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  Treemap
4
- } from "./chunk-W5ILLSPK.js";
5
- import "./chunk-PWMMXRMC.js";
6
- import "./chunk-ANUCSRUN.js";
7
- import "./chunk-W5FX4TU3.js";
4
+ } from "./chunk-AGSSNMK5.js";
5
+ import "./chunk-NV52AKHG.js";
6
+ import "./chunk-GD7TWEN3.js";
7
+ import "./chunk-PGD6SH5I.js";
8
8
  import "./chunk-XLLYNNC6.js";
9
- import "./chunk-JTKR7ZWP.js";
10
- import "./chunk-3CJHBJXA.js";
9
+ import "./chunk-P6RS2L23.js";
10
+ import "./chunk-OVASCEGF.js";
11
+ import "./chunk-GRRFPI27.js";
11
12
  export {
12
13
  Treemap
13
14
  };