@krizaka/charts 0.5.0 → 0.6.1

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 (77) hide show
  1. package/dist/bar.d.ts +4 -3
  2. package/dist/candlestick.d.ts +3 -2
  3. package/dist/card.d.ts +2 -1
  4. package/dist/card.js +2 -1
  5. package/dist/{cartesian-CEY_wwe_.d.ts → cartesian-XyEi00ub.d.ts} +2 -2
  6. package/dist/chart.d.ts +3 -2
  7. package/dist/chunk-3VCCSEVF.js +2 -0
  8. package/dist/chunk-3VCCSEVF.js.map +1 -0
  9. package/dist/chunk-6NYD3ROH.js +2 -0
  10. package/dist/chunk-6NYD3ROH.js.map +1 -0
  11. package/dist/{chunk-YHQFW2PR.js → chunk-AX3QU25V.js} +1 -1
  12. package/dist/{chunk-MK2ZFUWM.js → chunk-BHMUX6F5.js} +1 -1
  13. package/dist/context-CSEXYepn.d.ts +100 -0
  14. package/dist/credits.d.ts +2 -1
  15. package/dist/earnings.d.ts +4 -3
  16. package/dist/{frame-B1HDNm7c.d.ts → frame-7tt0uRS5.d.ts} +1 -1
  17. package/dist/funnel.d.ts +3 -2
  18. package/dist/gauge.d.ts +3 -2
  19. package/dist/genui.d.ts +11 -0
  20. package/dist/genui.js +122 -0
  21. package/dist/genui.js.map +1 -0
  22. package/dist/geo.d.ts +3 -2
  23. package/dist/globe.d.ts +3 -2
  24. package/dist/goal.d.ts +3 -2
  25. package/dist/heatmap.d.ts +3 -2
  26. package/dist/index.d.ts +4 -3
  27. package/dist/index.js +4 -2
  28. package/dist/latency.d.ts +4 -3
  29. package/dist/line.d.ts +4 -3
  30. package/dist/native.js +62 -50
  31. package/dist/native.js.map +1 -1
  32. package/dist/pie.d.ts +3 -2
  33. package/dist/pie.js +2 -1
  34. package/dist/provider.d.ts +3 -2
  35. package/dist/radar.d.ts +3 -2
  36. package/dist/sankey.d.ts +3 -2
  37. package/dist/scatter.d.ts +3 -2
  38. package/dist/sparkline.d.ts +3 -2
  39. package/dist/throughput.d.ts +4 -3
  40. package/dist/ticker.d.ts +4 -3
  41. package/dist/treemap.d.ts +3 -2
  42. package/dist/types-BL149CsX.d.ts +84 -0
  43. package/package.json +11 -7
  44. package/registry/examples/area-chart/native/credits-usage.dark.png +0 -0
  45. package/registry/examples/area-chart/native/credits-usage.light.png +0 -0
  46. package/registry/examples/bar-chart/native/jobs-by-status.dark.png +0 -0
  47. package/registry/examples/bar-chart/native/jobs-by-status.light.png +0 -0
  48. package/registry/examples/charts-provider/native/french-orazaka.dark.png +0 -0
  49. package/registry/examples/charts-provider/native/french-orazaka.light.png +0 -0
  50. package/registry/examples/credit-usage/native/monthly-credits.dark.png +0 -0
  51. package/registry/examples/credit-usage/native/monthly-credits.light.png +0 -0
  52. package/registry/examples/earnings-chart/native/creator-month.dark.png +0 -0
  53. package/registry/examples/earnings-chart/native/creator-month.light.png +0 -0
  54. package/registry/examples/gauge/native/credits-quota.dark.png +0 -0
  55. package/registry/examples/gauge/native/credits-quota.light.png +0 -0
  56. package/registry/examples/genui-catalog/dashboard.d.ts +4 -0
  57. package/registry/examples/genui-catalog/dashboard.js +22 -0
  58. package/registry/examples/genui-catalog/dashboard.tsx +18 -0
  59. package/registry/examples/goal-progress/native/challenge-pot.dark.png +0 -0
  60. package/registry/examples/goal-progress/native/challenge-pot.light.png +0 -0
  61. package/registry/examples/job-throughput/native/week-of-jobs.dark.png +0 -0
  62. package/registry/examples/job-throughput/native/week-of-jobs.light.png +0 -0
  63. package/registry/examples/latency-chart/native/by-capability.dark.png +0 -0
  64. package/registry/examples/latency-chart/native/by-capability.light.png +0 -0
  65. package/registry/examples/line-chart/native/creator-earnings.dark.png +0 -0
  66. package/registry/examples/line-chart/native/creator-earnings.light.png +0 -0
  67. package/registry/examples/pie-chart/native/credit-spend.dark.png +0 -0
  68. package/registry/examples/pie-chart/native/credit-spend.light.png +0 -0
  69. package/registry/examples/price-ticker/native/auction-room.dark.png +0 -0
  70. package/registry/examples/price-ticker/native/auction-room.light.png +0 -0
  71. package/registry/examples/sparkline/native/stat-trend.dark.png +0 -0
  72. package/registry/examples/sparkline/native/stat-trend.light.png +0 -0
  73. package/registry/genui-catalog.json +91 -0
  74. package/registry/index.json +38 -1
  75. package/dist/context-DNW7bJYw.d.ts +0 -182
  76. /package/dist/{chunk-YHQFW2PR.js.map → chunk-AX3QU25V.js.map} +0 -0
  77. /package/dist/{chunk-MK2ZFUWM.js.map → chunk-BHMUX6F5.js.map} +0 -0
package/dist/bar.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { C as CartesianProps } from './cartesian-CEY_wwe_.js';
1
+ import { C as CartesianProps } from './cartesian-XyEi00ub.js';
2
2
  import * as react from 'react';
3
- import { g as Datum } from './context-DNW7bJYw.js';
4
- import './frame-B1HDNm7c.js';
3
+ import { D as Datum } from './types-BL149CsX.js';
4
+ import './frame-7tt0uRS5.js';
5
+ import './context-CSEXYepn.js';
5
6
 
6
7
  interface BarChartProps<T extends Datum> extends CartesianProps<T> {
7
8
  /** Stack the series in one bar per category (a total and its parts); default: grouped side by side. */
@@ -1,7 +1,8 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, V as ValueFormat, C as CategoryFormat, T as Threshold } from './context-DNW7bJYw.js';
2
+ import { D as Datum, A as Accessor, V as ValueFormat, C as CategoryFormat, T as Threshold } from './types-BL149CsX.js';
3
3
  import { E as EngineProps } from './host-_F8RgiIz.js';
4
- import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
4
+ import { C as ChartFrameProps } from './frame-7tt0uRS5.js';
5
+ import './context-CSEXYepn.js';
5
6
 
6
7
  interface CandlestickProps<T extends Datum> extends ChartFrameProps, EngineProps {
7
8
  /** One row per period, oldest first. */
package/dist/card.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { StatProps } from '@krizaka/ui/stat';
4
- import { f as ChartsSettings, V as ValueFormat, S as SeriesColor } from './context-DNW7bJYw.js';
4
+ import { V as ValueFormat, S as SeriesColor } from './types-BL149CsX.js';
5
+ import { e as ChartsSettings } from './context-CSEXYepn.js';
5
6
 
6
7
  interface ChartCardProps {
7
8
  /** What the chart shows, in a few words (a heading and the chart's accessible name). */
package/dist/card.js CHANGED
@@ -1,8 +1,9 @@
1
1
  "use client";
2
+ import "./chunk-3VCCSEVF.js";
2
3
  import {
3
4
  ChartCard,
4
5
  KpiStat
5
- } from "./chunk-YHQFW2PR.js";
6
+ } from "./chunk-AX3QU25V.js";
6
7
  import "./chunk-FIQHMJZK.js";
7
8
  import "./chunk-BISL7DYW.js";
8
9
  import "./chunk-GD7TWEN3.js";
@@ -1,5 +1,5 @@
1
- import { g as Datum, A as Accessor, h as SeriesSpec, V as ValueFormat, C as CategoryFormat, T as Threshold, M as Marker } from './context-DNW7bJYw.js';
2
- import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
1
+ import { D as Datum, A as Accessor, a as SeriesSpec, V as ValueFormat, C as CategoryFormat, T as Threshold, M as Marker } from './types-BL149CsX.js';
2
+ import { C as ChartFrameProps } from './frame-7tt0uRS5.js';
3
3
 
4
4
  /** What every cartesian chart takes: rows, the category field, the series, the formats, thresholds and markers. */
5
5
  interface CartesianProps<T extends Datum> extends ChartFrameProps {
package/dist/chart.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { E as EngineProps, W as WalkItem } from './host-_F8RgiIz.js';
2
- import { C as ChartFrameProps, T as TableModel } from './frame-B1HDNm7c.js';
2
+ import { C as ChartFrameProps, T as TableModel } from './frame-7tt0uRS5.js';
3
3
  import * as react from 'react';
4
4
  import { EChartsCoreOption } from 'echarts/core';
5
- import './context-DNW7bJYw.js';
5
+ import './context-CSEXYepn.js';
6
+ import './types-BL149CsX.js';
6
7
 
7
8
  interface ResolvedTheme {
8
9
  readonly text: string;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ //# sourceMappingURL=chunk-3VCCSEVF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ //# sourceMappingURL=chunk-6NYD3ROH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -68,4 +68,4 @@ export {
68
68
  ChartCard,
69
69
  KpiStat
70
70
  };
71
- //# sourceMappingURL=chunk-YHQFW2PR.js.map
71
+ //# sourceMappingURL=chunk-AX3QU25V.js.map
@@ -157,4 +157,4 @@ export {
157
157
  PieChart,
158
158
  DonutChart
159
159
  };
160
- //# sourceMappingURL=chunk-MK2ZFUWM.js.map
160
+ //# sourceMappingURL=chunk-BHMUX6F5.js.map
@@ -0,0 +1,100 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { L as Locale, B as BrandId } from './types-BL149CsX.js';
4
+
5
+ interface ChartLabels {
6
+ /** The button that shows the data table. */
7
+ showData: string;
8
+ /** The button that hides it. */
9
+ hideData: string;
10
+ /** The caption of the data table: `{title}`. */
11
+ tableCaption: string;
12
+ /** The export buttons. */
13
+ exportPng: string;
14
+ exportSvg: string;
15
+ exportCsv: string;
16
+ /** The actions menu (⋯) of a chart: its accessible name, and its entries. */
17
+ actions: string;
18
+ viewTable: string;
19
+ downloadCsv: string;
20
+ downloadPng: string;
21
+ downloadSvg: string;
22
+ copyData: string;
23
+ /** Announced once the data is on the clipboard. */
24
+ copied: string;
25
+ /** The close button of the table sheet. */
26
+ close: string;
27
+ /** The sheet's description: `{count}` rows. */
28
+ tableRows: string;
29
+ /** Legend chips filter: the chip's accessible name, `{label}`. */
30
+ toggleSeries: string;
31
+ /** Sparse data: under the chart, `{count}` periods with data out of `{total}`. */
32
+ sparse: string;
33
+ /** A KPI's change: `{change}` (`+12 %`) against the previous period. */
34
+ trendVsPrevious: string;
35
+ /** Announced while the data loads. */
36
+ loading: string;
37
+ /** Shown when there is nothing to draw. */
38
+ empty: string;
39
+ /** Shown when the data could not be loaded. */
40
+ error: string;
41
+ /** The keyboard hint, read once when the plot takes the focus. */
42
+ keyboardHint: string;
43
+ /** The role description of the plot (`chart`). */
44
+ roleDescription: string;
45
+ /** Summary pieces. `{kind}` is the chart's name (`Line chart`), `{count}` a number of points or series. */
46
+ summaryIntro: string;
47
+ summarySeries: string;
48
+ summaryRange: string;
49
+ summaryTrendUp: string;
50
+ summaryTrendDown: string;
51
+ summaryTrendFlat: string;
52
+ summaryTotal: string;
53
+ summaryThreshold: string;
54
+ summaryShare: string;
55
+ /** Scatter: the correlation of x and y (Pearson's r). */
56
+ summaryCorrelation: string;
57
+ /** Funnel: from one stage to the next, and from the first to the last. */
58
+ summaryConversion: string;
59
+ summaryOverall: string;
60
+ /** Heatmap, calendar: the largest cell and the number of cells with a value. */
61
+ summaryPeak: string;
62
+ summaryActive: string;
63
+ /** Candlestick: the period's range. */
64
+ summaryOhlc: string;
65
+ /** The names of the charts, read first in the summary. */
66
+ kinds: Record<ChartKind, string>;
67
+ /** The column of the values, when the chart has no value label. */
68
+ value: string;
69
+ /** The column of the categories in the data table, when the chart has no x label. */
70
+ category: string;
71
+ /** The total row of a stacked chart, a pie, a funnel. */
72
+ total: string;
73
+ /** What a missing value reads as. */
74
+ noValue: string;
75
+ }
76
+ type ChartKind = "line" | "area" | "bar" | "pie" | "donut" | "gauge" | "sparkline" | "radar" | "heatmap" | "calendar" | "sankey" | "funnel" | "candlestick" | "treemap" | "scatter" | "map" | "globe" | "chart";
77
+ declare const DEFAULT_LABELS: ChartLabels;
78
+ /** The words an app or a chart passes: any of them, and any of the chart names. */
79
+ type ChartLabelsInput = Partial<Omit<ChartLabels, "kinds">> & {
80
+ kinds?: Partial<Record<ChartKind, string>>;
81
+ };
82
+
83
+ interface ChartsSettings {
84
+ /** The locale of every figure and date (`"fr-FR"`). Default `"en-US"`. */
85
+ locale?: Locale;
86
+ /**
87
+ * The brand whose palette the charts use. Without it, a chart follows a `.brand-<id>` ancestor, else Krizaka. Set it
88
+ * when the app loads a brand stylesheet on `:root` (`@krizaka/tokens/brands/orazaka.css`).
89
+ */
90
+ brand?: BrandId;
91
+ /** The words, translated: the buttons, the states, the written summary. */
92
+ labels?: ChartLabelsInput;
93
+ }
94
+ interface ChartsProviderProps extends ChartsSettings {
95
+ children: ReactNode;
96
+ }
97
+ /** Sets the locale, the brand and the words of every chart below it. */
98
+ declare function ChartsProvider({ locale, brand, labels, children }: ChartsProviderProps): react.JSX.Element;
99
+
100
+ export { type ChartKind as C, DEFAULT_LABELS as D, type ChartLabels as a, type ChartLabelsInput as b, ChartsProvider as c, type ChartsProviderProps as d, type ChartsSettings as e };
package/dist/credits.d.ts CHANGED
@@ -2,7 +2,8 @@ import { a as CreditLabels } from './labels-DE_743fQ.js';
2
2
  export { C as CREDIT_LABELS } from './labels-DE_743fQ.js';
3
3
  import * as react from 'react';
4
4
  import { ReactNode, CSSProperties } from 'react';
5
- import { f as ChartsSettings, V as ValueFormat } from './context-DNW7bJYw.js';
5
+ import { V as ValueFormat } from './types-BL149CsX.js';
6
+ import { e as ChartsSettings } from './context-CSEXYepn.js';
6
7
 
7
8
  interface CreditUsageProps extends Omit<ChartsSettings, "labels"> {
8
9
  /** What the allowance is (“Credits this month”): the heading and the meter's name. */
@@ -1,9 +1,10 @@
1
1
  import { b as EarningsLabels } from './labels-DE_743fQ.js';
2
2
  export { E as EARNINGS_LABELS } from './labels-DE_743fQ.js';
3
3
  import * as react from 'react';
4
- import { C as CartesianProps } from './cartesian-CEY_wwe_.js';
5
- import { g as Datum, A as Accessor, C as CategoryFormat, T as Threshold } from './context-DNW7bJYw.js';
6
- import './frame-B1HDNm7c.js';
4
+ import { C as CartesianProps } from './cartesian-XyEi00ub.js';
5
+ import { D as Datum, A as Accessor, C as CategoryFormat, T as Threshold } from './types-BL149CsX.js';
6
+ import './frame-7tt0uRS5.js';
7
+ import './context-CSEXYepn.js';
7
8
 
8
9
  interface EarningsChartProps<T extends Datum> extends Omit<CartesianProps<T>, "y" | "yLabel" | "series" | "format" | "x" | "xFormat" | "thresholds" | "labels"> {
9
10
  /** The field (or function) of the period: an ISO month (`"2026-04"`), a day. Default `"month"`. */
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, CSSProperties } from 'react';
2
- import { f as ChartsSettings } from './context-DNW7bJYw.js';
2
+ import { e as ChartsSettings } from './context-CSEXYepn.js';
3
3
 
4
4
  type ExportFormat = "png" | "svg" | "csv";
5
5
  /** The props every web chart takes, on top of its data. */
package/dist/funnel.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, V as ValueFormat } from './context-DNW7bJYw.js';
2
+ import { D as Datum, A as Accessor, V as ValueFormat } from './types-BL149CsX.js';
3
3
  import { E as EngineProps } from './host-_F8RgiIz.js';
4
- import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
4
+ import { C as ChartFrameProps } from './frame-7tt0uRS5.js';
5
+ import './context-CSEXYepn.js';
5
6
 
6
7
  interface FunnelProps<T extends Datum> extends ChartFrameProps, EngineProps {
7
8
  /** One row per stage, first stage first. */
package/dist/gauge.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react from 'react';
2
- import { V as ValueFormat, T as Threshold, j as Tone } from './context-DNW7bJYw.js';
3
- import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
2
+ import { V as ValueFormat, T as Threshold, c as Tone } from './types-BL149CsX.js';
3
+ import { C as ChartFrameProps } from './frame-7tt0uRS5.js';
4
+ import './context-CSEXYepn.js';
4
5
 
5
6
  interface GaugeZone {
6
7
  /** The zone runs from the previous one's end (or `min`) to this value. */
@@ -0,0 +1,11 @@
1
+ import { GenUiCatalog } from '@krizaka/ui/genui';
2
+ import { V as ValueFormat } from './types-BL149CsX.js';
3
+
4
+ /** The most rows a generated chart draws (a year of days). */
5
+ declare const GENUI_CHART_ROWS = 366;
6
+ /** A closed format of the spec as the charts' `ValueFormat`. */
7
+ declare function chartFormat(format: unknown, currency: unknown): ValueFormat;
8
+ /** `KpiStat`, `ChartCard` — the data entries of the catalog `krizaka:genui/v1`. */
9
+ declare const chartsGenUiCatalog: GenUiCatalog;
10
+
11
+ export { GENUI_CHART_ROWS, chartFormat, chartsGenUiCatalog };
package/dist/genui.js ADDED
@@ -0,0 +1,122 @@
1
+ "use client";
2
+ import {
3
+ AreaChart,
4
+ LineChart
5
+ } from "./chunk-Z4T3JFNU.js";
6
+ import {
7
+ PieChart
8
+ } from "./chunk-BHMUX6F5.js";
9
+ import {
10
+ ChartCard,
11
+ KpiStat
12
+ } from "./chunk-AX3QU25V.js";
13
+ import {
14
+ BarChart
15
+ } from "./chunk-IURCLBUQ.js";
16
+ import "./chunk-JST4HJC3.js";
17
+ import "./chunk-FIQHMJZK.js";
18
+ import "./chunk-BISL7DYW.js";
19
+ import "./chunk-GD7TWEN3.js";
20
+ import "./chunk-PGD6SH5I.js";
21
+ import "./chunk-OB5EFDDH.js";
22
+ import "./chunk-XLLYNNC6.js";
23
+ import "./chunk-P6RS2L23.js";
24
+ import "./chunk-OVASCEGF.js";
25
+ import "./chunk-GRRFPI27.js";
26
+
27
+ // src/genui/catalog.tsx
28
+ import { allowKeys, checkBinding, checkCurrency, checkEnum, checkNumber, checkText, GENUI_FORMATS } from "@krizaka/ui/genui";
29
+ import { jsx } from "react/jsx-runtime";
30
+ var GENUI_CHART_ROWS = 366;
31
+ var KINDS = ["line", "bar", "area", "pie"];
32
+ var first = (...problems) => problems.find((p) => p !== null) ?? null;
33
+ var KEY = /^[A-Za-z0-9_]{1,64}$/;
34
+ function chartFormat(format, currency) {
35
+ if (format === "money" && typeof currency === "string") return { style: "money", currency };
36
+ if (format === "integer" || format === "compact" || format === "percent") return format;
37
+ return "number";
38
+ }
39
+ var text = (value) => typeof value === "string" ? value : typeof value === "number" ? String(value) : "";
40
+ var num = (value) => typeof value === "number" && Number.isFinite(value) ? value : void 0;
41
+ var kpiStat = {
42
+ check: (c) => first(
43
+ allowKeys(c, ["label", "value", "previous", "format", "currency", "good"]),
44
+ checkText(c.label, "label", true),
45
+ checkNumber(c.value, "value", true),
46
+ checkNumber(c.previous, "previous", false),
47
+ checkEnum(c.format, "format", GENUI_FORMATS),
48
+ checkCurrency(c.currency, c.format === "money"),
49
+ checkEnum(c.good, "good", ["up", "down"])
50
+ ),
51
+ render: (c, ctx) => /* @__PURE__ */ jsx(
52
+ KpiStat,
53
+ {
54
+ label: text(ctx.resolve(c.label)),
55
+ value: num(ctx.resolve(c.value)) ?? 0,
56
+ previous: num(ctx.resolve(c.previous)),
57
+ format: chartFormat(c.format, c.currency),
58
+ good: c.good ?? "up",
59
+ locale: ctx.locale
60
+ }
61
+ )
62
+ };
63
+ function checkSeries(value) {
64
+ if (!Array.isArray(value) || value.length === 0 || value.length > 12) return "series is an array of 1 to 12";
65
+ for (const s of value) {
66
+ if (s === null || typeof s !== "object" || Array.isArray(s)) return "a series is an object";
67
+ const extra = Object.keys(s).find((k) => k !== "key" && k !== "label");
68
+ if (extra) return `a series has no key "${extra}"`;
69
+ const { key, label } = s;
70
+ if (typeof key !== "string" || !KEY.test(key)) return "a series key is 1-64 characters of [A-Za-z0-9_]";
71
+ if (typeof label !== "string" || label.length > 80) return "a series label is a string";
72
+ }
73
+ return null;
74
+ }
75
+ function rowsOf(value) {
76
+ if (!Array.isArray(value)) return [];
77
+ return value.slice(0, GENUI_CHART_ROWS).flatMap((r) => {
78
+ if (r === null || typeof r !== "object" || Array.isArray(r)) return [];
79
+ const row = {};
80
+ for (const [k, v] of Object.entries(r)) if (KEY.test(k)) row[k] = typeof v === "number" || typeof v === "string" ? v : null;
81
+ return [row];
82
+ });
83
+ }
84
+ function Chart({ c, rows, locale }) {
85
+ const series = c.series.map((s) => ({ key: s.key, label: s.label }));
86
+ const format = chartFormat(c.format, c.currency);
87
+ const common = { data: rows, x: c.x, series, format, locale, height: 240 };
88
+ switch (c.kind) {
89
+ case "bar":
90
+ return /* @__PURE__ */ jsx(BarChart, { ...common });
91
+ case "area":
92
+ return /* @__PURE__ */ jsx(AreaChart, { ...common });
93
+ case "pie":
94
+ return /* @__PURE__ */ jsx(PieChart, { data: rows, label: (r) => text(r[c.x]), value: (r) => num(r[series[0].key]) ?? 0, format, locale, donut: true, height: 240 });
95
+ default:
96
+ return /* @__PURE__ */ jsx(LineChart, { ...common });
97
+ }
98
+ }
99
+ var chartCard = {
100
+ check: (c) => first(
101
+ allowKeys(c, ["title", "insight", "kind", "x", "series", "data", "format", "currency"]),
102
+ checkText(c.title, "title", true),
103
+ checkText(c.insight, "insight", false),
104
+ checkEnum(c.kind, "kind", KINDS, true),
105
+ typeof c.x === "string" && KEY.test(c.x) ? null : "x is a column key",
106
+ checkSeries(c.series),
107
+ checkBinding(c.data, "data"),
108
+ checkEnum(c.format, "format", GENUI_FORMATS),
109
+ checkCurrency(c.currency, c.format === "money")
110
+ ),
111
+ render: (c, ctx) => {
112
+ const rows = rowsOf(ctx.resolve(c.data));
113
+ return /* @__PURE__ */ jsx(ChartCard, { title: text(ctx.resolve(c.title)), insight: c.insight === void 0 ? void 0 : text(ctx.resolve(c.insight)), children: rows.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-fg-muted", children: ctx.labels.noData }) : /* @__PURE__ */ jsx(Chart, { c, rows, locale: ctx.locale }) });
114
+ }
115
+ };
116
+ var chartsGenUiCatalog = { KpiStat: kpiStat, ChartCard: chartCard };
117
+ export {
118
+ GENUI_CHART_ROWS,
119
+ chartFormat,
120
+ chartsGenUiCatalog
121
+ };
122
+ //# sourceMappingURL=genui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/genui/catalog.tsx"],"sourcesContent":["\"use client\";\n// The data entries of `krizaka:genui/v1` (ADR-082): `KpiStat` and `ChartCard`, drawn with this package's components.\n// Merge with @krizaka/ui's base catalog: `{ ...baseGenUiCatalog, ...chartsGenUiCatalog }`. The checks are strict — a\n// property outside the list, a format outside the closed list or data that is not a list of rows refuses the message.\nimport { allowKeys, checkBinding, checkCurrency, checkEnum, checkNumber, checkText, GENUI_FORMATS, type GenUiCatalog, type GenUiComponent, type GenUiEntry, type GenUiFormat } from \"@krizaka/ui/genui\";\n\nimport { BarChart } from \"../bar/bar-chart\";\nimport { ChartCard } from \"../card/chart-card\";\nimport { KpiStat } from \"../card/kpi-stat\";\nimport type { ValueFormat } from \"../core/types\";\nimport { AreaChart, LineChart } from \"../line/line-chart\";\nimport { PieChart } from \"../pie/pie-chart\";\n\n/** The most rows a generated chart draws (a year of days). */\n// @fixed: a safety bound of the renderer against an oversized model answer (one leap year of daily points), not a business parameter\nexport const GENUI_CHART_ROWS = 366;\nconst KINDS = [\"line\", \"bar\", \"area\", \"pie\"] as const;\nconst first = (...problems: (string | null)[]) => problems.find((p) => p !== null) ?? null;\nconst KEY = /^[A-Za-z0-9_]{1,64}$/;\n\n/** A closed format of the spec as the charts' `ValueFormat`. */\nexport function chartFormat(format: unknown, currency: unknown): ValueFormat {\n if (format === \"money\" && typeof currency === \"string\") return { style: \"money\", currency };\n if (format === \"integer\" || format === \"compact\" || format === \"percent\") return format;\n return \"number\";\n}\n\nconst text = (value: unknown) => (typeof value === \"string\" ? value : typeof value === \"number\" ? String(value) : \"\");\nconst num = (value: unknown) => (typeof value === \"number\" && Number.isFinite(value) ? value : undefined);\n\nconst kpiStat: GenUiEntry = {\n check: (c) =>\n first(\n allowKeys(c, [\"label\", \"value\", \"previous\", \"format\", \"currency\", \"good\"]),\n checkText(c.label, \"label\", true),\n checkNumber(c.value, \"value\", true),\n checkNumber(c.previous, \"previous\", false),\n checkEnum(c.format, \"format\", GENUI_FORMATS),\n checkCurrency(c.currency, c.format === \"money\"),\n checkEnum(c.good, \"good\", [\"up\", \"down\"]),\n ),\n render: (c, ctx) => (\n <KpiStat\n label={text(ctx.resolve(c.label))}\n value={num(ctx.resolve(c.value)) ?? 0}\n previous={num(ctx.resolve(c.previous))}\n format={chartFormat(c.format as GenUiFormat | undefined, c.currency)}\n good={(c.good as \"up\" | \"down\" | undefined) ?? \"up\"}\n locale={ctx.locale}\n />\n ),\n};\n\nfunction checkSeries(value: unknown): string | null {\n if (!Array.isArray(value) || value.length === 0 || value.length > 12) return \"series is an array of 1 to 12\";\n for (const s of value) {\n if (s === null || typeof s !== \"object\" || Array.isArray(s)) return \"a series is an object\";\n const extra = Object.keys(s).find((k) => k !== \"key\" && k !== \"label\");\n if (extra) return `a series has no key \"${extra}\"`;\n const { key, label } = s as Record<string, unknown>;\n if (typeof key !== \"string\" || !KEY.test(key)) return \"a series key is 1-64 characters of [A-Za-z0-9_]\";\n if (typeof label !== \"string\" || label.length > 80) return \"a series label is a string\";\n }\n return null;\n}\n\ntype Row = Record<string, string | number | null>;\n\n/** The rows a binding points at, as flat records of strings and numbers (anything else dropped). */\nfunction rowsOf(value: unknown): Row[] {\n if (!Array.isArray(value)) return [];\n return value.slice(0, GENUI_CHART_ROWS).flatMap((r) => {\n if (r === null || typeof r !== \"object\" || Array.isArray(r)) return [];\n const row: Row = {};\n for (const [k, v] of Object.entries(r)) if (KEY.test(k)) row[k] = typeof v === \"number\" || typeof v === \"string\" ? v : null;\n return [row];\n });\n}\n\nfunction Chart({ c, rows, locale }: { c: GenUiComponent; rows: Row[]; locale: string }) {\n const series = (c.series as { key: string; label: string }[]).map((s) => ({ key: s.key, label: s.label }));\n const format = chartFormat(c.format, c.currency);\n const common = { data: rows, x: c.x as string, series, format, locale, height: 240 };\n switch (c.kind) {\n case \"bar\":\n return <BarChart {...common} />;\n case \"area\":\n return <AreaChart {...common} />;\n case \"pie\":\n return <PieChart data={rows} label={(r: Row) => text(r[c.x as string])} value={(r: Row) => num(r[series[0].key]) ?? 0} format={format} locale={locale} donut height={240} />;\n default:\n return <LineChart {...common} />;\n }\n}\n\nconst chartCard: GenUiEntry = {\n check: (c) =>\n first(\n allowKeys(c, [\"title\", \"insight\", \"kind\", \"x\", \"series\", \"data\", \"format\", \"currency\"]),\n checkText(c.title, \"title\", true),\n checkText(c.insight, \"insight\", false),\n checkEnum(c.kind, \"kind\", KINDS, true),\n typeof c.x === \"string\" && KEY.test(c.x) ? null : \"x is a column key\",\n checkSeries(c.series),\n checkBinding(c.data, \"data\"),\n checkEnum(c.format, \"format\", GENUI_FORMATS),\n checkCurrency(c.currency, c.format === \"money\"),\n ),\n render: (c, ctx) => {\n const rows = rowsOf(ctx.resolve(c.data));\n return (\n <ChartCard title={text(ctx.resolve(c.title))} insight={c.insight === undefined ? undefined : text(ctx.resolve(c.insight))}>\n {rows.length === 0 ? <p className=\"text-sm text-fg-muted\">{ctx.labels.noData}</p> : <Chart c={c} rows={rows} locale={ctx.locale} />}\n </ChartCard>\n );\n },\n};\n\n/** `KpiStat`, `ChartCard` — the data entries of the catalog `krizaka:genui/v1`. */\nexport const chartsGenUiCatalog: GenUiCatalog = { KpiStat: kpiStat, ChartCard: chartCard };\n"],"mappings":"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","names":[]}
package/dist/geo.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, V as ValueFormat } from './context-DNW7bJYw.js';
3
- import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
2
+ import { D as Datum, A as Accessor, V as ValueFormat } from './types-BL149CsX.js';
3
+ import { C as ChartFrameProps } from './frame-7tt0uRS5.js';
4
+ import './context-CSEXYepn.js';
4
5
 
5
6
  /** A place on the map or the globe. */
6
7
  interface GeoPoint {
package/dist/globe.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as react from 'react';
2
- import { j as Tone, V as ValueFormat } from './context-DNW7bJYw.js';
2
+ import { c as Tone, V as ValueFormat } from './types-BL149CsX.js';
3
3
  import { GeoPoint } from './geo.js';
4
- import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
4
+ import { C as ChartFrameProps } from './frame-7tt0uRS5.js';
5
+ import './context-CSEXYepn.js';
5
6
 
6
7
  interface GlobePoint extends GeoPoint {
7
8
  /** Its tone: a healthy region in `"success"`, a degraded one in `"warning"`. Default `"accent"`. */
package/dist/goal.d.ts CHANGED
@@ -3,8 +3,9 @@ export { G as GOAL_LABELS } from './labels-DE_743fQ.js';
3
3
  import * as react from 'react';
4
4
  import { ReactNode } from 'react';
5
5
  import { GaugeProps } from './gauge.js';
6
- import './context-DNW7bJYw.js';
7
- import './frame-B1HDNm7c.js';
6
+ import './types-BL149CsX.js';
7
+ import './frame-7tt0uRS5.js';
8
+ import './context-CSEXYepn.js';
8
9
 
9
10
  interface GoalProgressProps extends Omit<GaugeProps, "value" | "min" | "max" | "format" | "caption" | "target" | "zones" | "tone" | "labels"> {
10
11
  /** The amount raised, in **minor units** (cents). */
package/dist/heatmap.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as react from 'react';
2
- import { g as Datum, A as Accessor, V as ValueFormat, C as CategoryFormat } from './context-DNW7bJYw.js';
2
+ import { D as Datum, A as Accessor, V as ValueFormat, C as CategoryFormat } from './types-BL149CsX.js';
3
3
  import { E as EngineProps } from './host-_F8RgiIz.js';
4
- import { C as ChartFrameProps } from './frame-B1HDNm7c.js';
4
+ import { C as ChartFrameProps } from './frame-7tt0uRS5.js';
5
+ import './context-CSEXYepn.js';
5
6
 
6
7
  interface HeatmapProps<T extends Datum> extends ChartFrameProps, EngineProps {
7
8
  /** One row per cell. */
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export { C as CartesianProps } from './cartesian-CEY_wwe_.js';
1
+ export { C as CartesianProps } from './cartesian-XyEi00ub.js';
2
2
  export { BarChart, BarChartProps } from './bar.js';
3
3
  export { Candlestick, CandlestickProps } from './candlestick.js';
4
4
  export { ChartCard, ChartCardProps, KpiStat, KpiStatProps } from './card.js';
5
5
  export { W as WalkItem } from './host-_F8RgiIz.js';
6
- export { T as TableModel } from './frame-B1HDNm7c.js';
6
+ export { T as TableModel } from './frame-7tt0uRS5.js';
7
7
  export { Chart, ChartProps, ResolvedTheme } from './chart.js';
8
8
  export { C as CREDIT_LABELS, a as CreditLabels, E as EARNINGS_LABELS, b as EarningsLabels, G as GOAL_LABELS, c as GoalLabels, L as LATENCY_LABELS, d as LatencyLabels, T as THROUGHPUT_LABELS, e as TICKER_LABELS, f as ThroughputLabels, g as TickerLabels } from './labels-DE_743fQ.js';
9
9
  export { CreditUsage, CreditUsageProps } from './credits.js';
@@ -17,8 +17,9 @@ export { CalendarHeatmap, CalendarHeatmapProps, Heatmap, HeatmapProps } from './
17
17
  export { LatencyChart, LatencyChartProps, formatDuration } from './latency.js';
18
18
  export { AreaChart, AreaChartProps, LineChart, LineChartProps } from './line.js';
19
19
  export { DonutChart, PieChart, PieChartProps } from './pie.js';
20
- export { A as Accessor, B as BrandId, 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';
20
+ export { C as ChartKind, a as ChartLabels, b as ChartLabelsInput, c as ChartsProvider, d as ChartsProviderProps, e as ChartsSettings, D as DEFAULT_LABELS } from './context-CSEXYepn.js';
21
21
  export { DIVERGING, HUES, ORDERS, SlidingWindow, palette, sequential, useSlidingWindow } from './provider.js';
22
+ export { A as Accessor, B as BrandId, C as CategoryFormat, D as Datum, L as Locale, M as Marker, S as SeriesColor, a as SeriesSpec, b as SeriesSummary, T as Threshold, c as Tone, V as ValueFormat } from './types-BL149CsX.js';
22
23
  export { RadarChart, RadarChartProps } from './radar.js';
23
24
  export { Sankey, SankeyProps } from './sankey.js';
24
25
  export { ScatterChart, ScatterChartProps, correlation } from './scatter.js';
package/dist/index.js CHANGED
@@ -35,10 +35,11 @@ import {
35
35
  LineChart
36
36
  } from "./chunk-Z4T3JFNU.js";
37
37
  import "./chunk-FINOPIDN.js";
38
+ import "./chunk-6NYD3ROH.js";
38
39
  import {
39
40
  DonutChart,
40
41
  PieChart
41
- } from "./chunk-MK2ZFUWM.js";
42
+ } from "./chunk-BHMUX6F5.js";
42
43
  import "./chunk-G2KF2WL4.js";
43
44
  import "./chunk-POQIHFAZ.js";
44
45
  import {
@@ -51,10 +52,11 @@ import "./chunk-6FINSUOS.js";
51
52
  import {
52
53
  useSlidingWindow
53
54
  } from "./chunk-TPJDOB7R.js";
55
+ import "./chunk-3VCCSEVF.js";
54
56
  import {
55
57
  ChartCard,
56
58
  KpiStat
57
- } from "./chunk-YHQFW2PR.js";
59
+ } from "./chunk-AX3QU25V.js";
58
60
  import {
59
61
  EarningsChart
60
62
  } from "./chunk-IJTI6VJD.js";
package/dist/latency.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { d as LatencyLabels } from './labels-DE_743fQ.js';
2
2
  export { L as LATENCY_LABELS } from './labels-DE_743fQ.js';
3
- import { L as Locale, g as Datum, A as Accessor } from './context-DNW7bJYw.js';
3
+ import { L as Locale, D as Datum, A as Accessor } from './types-BL149CsX.js';
4
4
  import * as react from 'react';
5
- import { C as CartesianProps } from './cartesian-CEY_wwe_.js';
6
- import './frame-B1HDNm7c.js';
5
+ import { C as CartesianProps } from './cartesian-XyEi00ub.js';
6
+ import './frame-7tt0uRS5.js';
7
+ import './context-CSEXYepn.js';
7
8
 
8
9
  /** Milliseconds as a duration: `840 ms`, `1.2 s`, `2.5 min` — the unit follows the size, through Intl. */
9
10
  declare function formatDuration(ms: number, locale: Locale): string;
package/dist/line.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { C as CartesianProps } from './cartesian-CEY_wwe_.js';
1
+ import { C as CartesianProps } from './cartesian-XyEi00ub.js';
2
2
  import * as react from 'react';
3
- import { g as Datum } from './context-DNW7bJYw.js';
4
- import './frame-B1HDNm7c.js';
3
+ import { D as Datum } from './types-BL149CsX.js';
4
+ import './frame-7tt0uRS5.js';
5
+ import './context-CSEXYepn.js';
5
6
 
6
7
  type Curve = "linear" | "monotone" | "step";
7
8