@krizaka/charts 0.4.0 → 0.6.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 (75) 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/pie.d.ts +3 -2
  31. package/dist/pie.js +2 -1
  32. package/dist/provider.d.ts +3 -2
  33. package/dist/radar.d.ts +3 -2
  34. package/dist/sankey.d.ts +3 -2
  35. package/dist/scatter.d.ts +3 -2
  36. package/dist/sparkline.d.ts +3 -2
  37. package/dist/throughput.d.ts +4 -3
  38. package/dist/ticker.d.ts +4 -3
  39. package/dist/treemap.d.ts +3 -2
  40. package/dist/types-BL149CsX.d.ts +84 -0
  41. package/package.json +8 -4
  42. package/registry/area-chart.json +11 -0
  43. package/registry/bar-chart.json +11 -0
  44. package/registry/calendar-heatmap.json +13 -0
  45. package/registry/candlestick.json +13 -0
  46. package/registry/chart-card.json +13 -0
  47. package/registry/chart.json +13 -0
  48. package/registry/charts-provider.json +11 -0
  49. package/registry/credit-usage.json +11 -0
  50. package/registry/earnings-chart.json +11 -0
  51. package/registry/examples/genui-catalog/dashboard.d.ts +4 -0
  52. package/registry/examples/genui-catalog/dashboard.js +22 -0
  53. package/registry/examples/genui-catalog/dashboard.tsx +18 -0
  54. package/registry/funnel.json +13 -0
  55. package/registry/gauge.json +11 -0
  56. package/registry/genui-catalog.json +91 -0
  57. package/registry/geo-map.json +13 -0
  58. package/registry/globe.json +14 -0
  59. package/registry/goal-progress.json +11 -0
  60. package/registry/heatmap.json +13 -0
  61. package/registry/index.json +351 -1
  62. package/registry/job-throughput.json +11 -0
  63. package/registry/kpi-stat.json +13 -0
  64. package/registry/latency-chart.json +11 -0
  65. package/registry/line-chart.json +11 -0
  66. package/registry/pie-chart.json +11 -0
  67. package/registry/price-ticker.json +11 -0
  68. package/registry/radar-chart.json +13 -0
  69. package/registry/sankey.json +13 -0
  70. package/registry/scatter-chart.json +13 -0
  71. package/registry/sparkline.json +11 -0
  72. package/registry/treemap.json +13 -0
  73. package/dist/context-DNW7bJYw.d.ts +0 -182
  74. /package/dist/{chunk-YHQFW2PR.js.map → chunk-AX3QU25V.js.map} +0 -0
  75. /package/dist/{chunk-MK2ZFUWM.js.map → chunk-BHMUX6F5.js.map} +0 -0
@@ -1,9 +1,10 @@
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-DNW7bJYw.js';
3
+ import { c as Tone, D as Datum, A as Accessor, C as CategoryFormat } 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
  /** A status of a job: the field holding its count per period, its name, its tone, and its part in the success rate. */
9
10
  interface JobStatus {
package/dist/ticker.d.ts CHANGED
@@ -1,10 +1,11 @@
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-DNW7bJYw.js';
4
+ import { C as CategoryFormat } from './types-BL149CsX.js';
5
5
  import { LineChartProps } from './line.js';
6
- import './cartesian-CEY_wwe_.js';
7
- import './frame-B1HDNm7c.js';
6
+ import './cartesian-XyEi00ub.js';
7
+ import './frame-7tt0uRS5.js';
8
+ import './context-CSEXYepn.js';
8
9
 
9
10
  /** A bid: when (an ISO date-time or a `Date`) and how much, in money minor units. */
10
11
  interface Bid {
package/dist/treemap.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as react from 'react';
2
- import { V as ValueFormat } from './context-DNW7bJYw.js';
2
+ import { 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
  /** A part: a name and either a value or children (whose values add up). */
7
8
  interface TreemapNode {
@@ -0,0 +1,84 @@
1
+ /** A row of data: any object; the chart reads the fields its `x`, `y` and `series` name. */
2
+ type Datum = object;
3
+ /** A field of a row (`"month"`) or a function that reads it. */
4
+ type Accessor<T, V> = (keyof T & string) | ((datum: T, index: number) => V);
5
+ /** A Krizaka brand: its palette leads with the brand's own hue (Krizaka blue, Orazaka orange, Orochia violet). */
6
+ type BrandId = "krizaka" | "orazaka" | "orochia";
7
+ /** A BCP 47 locale (`"en-US"`, `"fr-FR"`), always explicit: server and client write the same figures. */
8
+ type Locale = string | readonly string[];
9
+ /**
10
+ * How a value is written, through `@krizaka/intl`:
11
+ * - `"number"` (default) `12,345.6`, `"integer"` `12,346`, `"compact"` `12.3K`, `"percent"` (a ratio: `0.42` → `42%`);
12
+ * - `{ style: "money", currency }`: the values are **integer minor units** (cents), as the ledger stores them;
13
+ * - `{ style: "unit", unit }`: an `Intl` unit (`"second"`, `"megabyte"`);
14
+ * - a function, for anything else.
15
+ */
16
+ type ValueFormat = "number" | "integer" | "compact" | "percent" | {
17
+ readonly style: "money";
18
+ readonly currency: string;
19
+ readonly compact?: boolean;
20
+ } | {
21
+ readonly style: "unit";
22
+ readonly unit: string;
23
+ readonly compact?: boolean;
24
+ } | {
25
+ readonly style: "number";
26
+ readonly options: Intl.NumberFormatOptions;
27
+ } | ((value: number, locale: Locale) => string);
28
+ /**
29
+ * How a category of the x axis is written. A category that is a `Date`, an epoch or an ISO date (`"2026-04"`,
30
+ * `"2026-04-12"`) is a date: `"month"` (`Apr 2026`), `"day"` (`Apr 12`), `"date"` (`Apr 12, 2026`), `"time"`
31
+ * (`14:30`), `"datetime"`, `"year"`. `"text"` writes it as is (the default for anything that is not a date).
32
+ */
33
+ type CategoryFormat = "text" | "year" | "month" | "day" | "date" | "time" | "datetime" | ((category: unknown, locale: Locale) => string);
34
+ /** A series to draw: the field holding its values and the words that name it. */
35
+ interface SeriesSpec<T extends Datum = Datum> {
36
+ /** The field (or a function) holding the series' value in each row. */
37
+ readonly key: Accessor<T, number | null | undefined>;
38
+ /** Its name: in the legend, the tooltip, the data table and the summary. */
39
+ readonly label: string;
40
+ /** A colour role instead of the next palette slot: `"accent"`, a status (`"success"`…) or a `var(--…)`. */
41
+ readonly color?: SeriesColor;
42
+ /** Draw it dashed (a forecast, a previous period). Lines and areas only. */
43
+ readonly dashed?: boolean;
44
+ }
45
+ /** A status or brand role a series, a threshold or a marker may wear instead of a palette slot. */
46
+ type Tone = "neutral" | "accent" | "success" | "warning" | "danger" | "info";
47
+ /** A palette slot (1–8), a tone, or any CSS colour (`var(--kz-…)` preferred). */
48
+ type SeriesColor = Tone | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | (string & {});
49
+ /** A horizontal line at a value: a goal, a payout threshold, a quota. */
50
+ interface Threshold {
51
+ readonly value: number;
52
+ /** What it means, written beside the line and in the summary: “Payout threshold”. */
53
+ readonly label: string;
54
+ /** Default `"neutral"`; a goal reads well in `"success"`, a limit in `"danger"`. */
55
+ readonly tone?: Tone;
56
+ }
57
+ /** A vertical marker at a category: an event worth pointing at (“Campaign launch”). */
58
+ interface Marker {
59
+ /** The category it marks, as in the data (`"2026-04"`). */
60
+ readonly x: unknown;
61
+ readonly label: string;
62
+ readonly tone?: Tone;
63
+ }
64
+ /** What a series says about itself, for the written summary. */
65
+ interface SeriesSummary {
66
+ readonly label: string;
67
+ readonly count: number;
68
+ readonly min: {
69
+ readonly value: number;
70
+ readonly category: string;
71
+ } | null;
72
+ readonly max: {
73
+ readonly value: number;
74
+ readonly category: string;
75
+ } | null;
76
+ readonly first: number | null;
77
+ readonly last: number | null;
78
+ readonly total: number;
79
+ /** `last / first − 1`, or null when it cannot be said (no first value, a first value of 0). */
80
+ readonly change: number | null;
81
+ readonly trend: "up" | "down" | "flat" | "none";
82
+ }
83
+
84
+ export type { Accessor as A, BrandId as B, CategoryFormat as C, Datum as D, Locale as L, Marker as M, SeriesColor as S, Threshold as T, ValueFormat as V, SeriesSpec as a, SeriesSummary as b, Tone as c };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krizaka/charts",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Krizaka's data visualisation: typed, declarative React charts (line, area, bar, pie, radar, heatmap, calendar, sankey, funnel, gauge, sparkline, candlestick, treemap, scatter, geo map, 3D globe) on the --kz-* tokens and the brand palettes — an accessible data table, a written summary and keyboard navigation in every chart, SSR without layout shift, and React Native for the simple types.",
5
5
  "keywords": [
6
6
  "krizaka",
@@ -128,6 +128,10 @@
128
128
  "types": "./dist/chart.d.ts",
129
129
  "import": "./dist/chart.js"
130
130
  },
131
+ "./genui": {
132
+ "types": "./dist/genui.d.ts",
133
+ "import": "./dist/genui.js"
134
+ },
131
135
  "./native": {
132
136
  "types": "./dist/native.d.ts",
133
137
  "import": "./dist/native.js"
@@ -161,7 +165,7 @@
161
165
  "react-dom": ">=19",
162
166
  "react-native": ">=0.76",
163
167
  "react-native-svg": ">=15",
164
- "@krizaka/ui": "^3.19.0"
168
+ "@krizaka/ui": "^3.22.0"
165
169
  },
166
170
  "peerDependenciesMeta": {
167
171
  "react-dom": {
@@ -214,8 +218,8 @@
214
218
  "vitest": "^4.1.11",
215
219
  "world-atlas": "^2.0.2",
216
220
  "@krizaka/config": "0.4.1",
217
- "@krizaka/tokens": "3.19.0",
218
- "@krizaka/ui": "3.19.0"
221
+ "@krizaka/tokens": "3.22.0",
222
+ "@krizaka/ui": "3.22.0"
219
223
  },
220
224
  "engines": {
221
225
  "node": ">=22"
@@ -8,6 +8,17 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
11
22
  "engine": "svg",
12
23
  "tier": "core",
13
24
  "whenToUse": [
@@ -8,6 +8,17 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
11
22
  "engine": "svg",
12
23
  "tier": "core",
13
24
  "whenToUse": [
@@ -8,6 +8,19 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "Advanced tier: no phone screen needs it yet.",
18
+ "issue": "krizaka/krizaka-ui#280"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
11
24
  "engine": "echarts",
12
25
  "tier": "advanced",
13
26
  "whenToUse": [
@@ -8,6 +8,19 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "Advanced tier: no phone screen needs it yet.",
18
+ "issue": "krizaka/krizaka-ui#280"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
11
24
  "engine": "echarts",
12
25
  "tier": "advanced",
13
26
  "whenToUse": [
@@ -8,6 +8,19 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "A phone dashboard frames its charts in a Card by hand today.",
18
+ "issue": "krizaka/krizaka-ui#275"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
11
24
  "engine": null,
12
25
  "tier": "ready-made",
13
26
  "whenToUse": [
@@ -8,6 +8,19 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "n/a",
17
+ "reason": "The ECharts escape hatch needs the DOM; a phone draws the SVG charts of the native entry.",
18
+ "use": "line-chart"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
11
24
  "engine": "echarts",
12
25
  "tier": "advanced",
13
26
  "whenToUse": [
@@ -8,6 +8,17 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
11
22
  "engine": null,
12
23
  "tier": "core",
13
24
  "whenToUse": [
@@ -8,6 +8,17 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
11
22
  "engine": "svg",
12
23
  "tier": "ready-made",
13
24
  "whenToUse": [
@@ -8,6 +8,17 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
11
22
  "engine": "svg",
12
23
  "tier": "ready-made",
13
24
  "whenToUse": [
@@ -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,22 @@
1
+ "use client";
2
+
3
+ // registry/examples/genui-catalog/dashboard.tsx
4
+ import { chartsGenUiCatalog } from "@krizaka/charts/genui";
5
+ import { baseGenUiCatalog, GenUiStream } from "@krizaka/ui/genui";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var catalog = { ...baseGenUiCatalog, ...chartsGenUiCatalog };
8
+ var days = ["2026-10-11", "2026-10-12", "2026-10-13", "2026-10-14", "2026-10-15"].map((day, i) => ({ day, views: [40, 52, 47, 61, 75][i] }));
9
+ var ANSWER = [
10
+ "Views grew all week; likes followed.",
11
+ "```a2ui",
12
+ '{"version":"v0.9","createSurface":{"surfaceId":"week","catalogId":"krizaka:genui/v1"}}',
13
+ '{"version":"v0.9","updateComponents":{"surfaceId":"week","components":[{"id":"root","component":"Column","children":["figures","trend"]},{"id":"figures","component":"Row","children":["views","likes"]},{"id":"views","component":"KpiStat","label":"Views","value":275,"previous":211,"format":"integer"},{"id":"likes","component":"KpiStat","label":"Likes","value":38,"previous":30,"format":"integer"},{"id":"trend","component":"ChartCard","title":"Views per day","kind":"area","x":"day","series":[{"key":"views","label":"Views"}],"data":{"path":"/days"}}]}}',
14
+ JSON.stringify({ version: "v0.9", updateDataModel: { surfaceId: "week", path: "/days", value: days } }),
15
+ "```"
16
+ ].join("\n");
17
+ function GenUiDashboard() {
18
+ return /* @__PURE__ */ jsx(GenUiStream, { text: ANSWER, catalog });
19
+ }
20
+ export {
21
+ GenUiDashboard as default
22
+ };
@@ -0,0 +1,18 @@
1
+ import { chartsGenUiCatalog } from "@krizaka/charts/genui";
2
+ import { baseGenUiCatalog, GenUiStream } from "@krizaka/ui/genui";
3
+
4
+ const catalog = { ...baseGenUiCatalog, ...chartsGenUiCatalog };
5
+ const days = ["2026-10-11", "2026-10-12", "2026-10-13", "2026-10-14", "2026-10-15"].map((day, i) => ({ day, views: [40, 52, 47, 61, 75][i] }));
6
+
7
+ const ANSWER = [
8
+ "Views grew all week; likes followed.",
9
+ "```a2ui",
10
+ '{"version":"v0.9","createSurface":{"surfaceId":"week","catalogId":"krizaka:genui/v1"}}',
11
+ '{"version":"v0.9","updateComponents":{"surfaceId":"week","components":[{"id":"root","component":"Column","children":["figures","trend"]},{"id":"figures","component":"Row","children":["views","likes"]},{"id":"views","component":"KpiStat","label":"Views","value":275,"previous":211,"format":"integer"},{"id":"likes","component":"KpiStat","label":"Likes","value":38,"previous":30,"format":"integer"},{"id":"trend","component":"ChartCard","title":"Views per day","kind":"area","x":"day","series":[{"key":"views","label":"Views"}],"data":{"path":"/days"}}]}}',
12
+ JSON.stringify({ version: "v0.9", updateDataModel: { surfaceId: "week", path: "/days", value: days } }),
13
+ "```",
14
+ ].join("\n");
15
+
16
+ export default function GenUiDashboard() {
17
+ return <GenUiStream text={ANSWER} catalog={catalog} />;
18
+ }
@@ -8,6 +8,19 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "Advanced tier: no phone screen needs it yet.",
18
+ "issue": "krizaka/krizaka-ui#280"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
11
24
  "engine": "echarts",
12
25
  "tier": "advanced",
13
26
  "whenToUse": [
@@ -8,6 +8,17 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
11
22
  "engine": "svg",
12
23
  "tier": "core",
13
24
  "whenToUse": [
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "genui-catalog",
3
+ "package": "@krizaka/charts",
4
+ "type": "chart",
5
+ "title": "Generated view catalog",
6
+ "summary": "KpiStat and ChartCard as entries of the data-driven UI catalog (A2UI v0.9): a model's answer draws figures and charts from data, never code.",
7
+ "description": "KpiStat and ChartCard as entries of the data-driven UI catalog (A2UI v0.9): a model's answer draws figures and charts from data, never code.",
8
+ "status": "beta",
9
+ "category": "charts",
10
+ "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "Slice 3 of the data-driven UI epic: the same messages drawn by the native charts.",
18
+ "issue": "krizaka/orazaka#207"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
24
+ "engine": null,
25
+ "tier": "advanced",
26
+ "whenToUse": [
27
+ "With `GenUiStream` of @krizaka/ui: merge `chartsGenUiCatalog` with `baseGenUiCatalog` so a model's answer can hold figures and charts.",
28
+ "When an assistant answers a question about data with a dashboard the reader can then refine."
29
+ ],
30
+ "whenNotToUse": [
31
+ {
32
+ "when": "A dashboard the app knows in advance: use the charts directly.",
33
+ "use": "chart-card"
34
+ },
35
+ {
36
+ "when": "One figure in a page.",
37
+ "use": "kpi-stat"
38
+ }
39
+ ],
40
+ "bestPractices": [
41
+ "Tell the model the catalog and that every number must come from the data it was given: the entries check shapes, not truth.",
42
+ "Formats are a closed list (number, integer, compact, percent, money with a currency): no free-form format string reaches the chart."
43
+ ],
44
+ "accessibility": {
45
+ "keyboard": [],
46
+ "notes": [
47
+ "Each generated chart keeps its title as accessible name, its written summary and its data table, as any chart of the package."
48
+ ]
49
+ },
50
+ "related": [
51
+ "kpi-stat",
52
+ "chart-card",
53
+ "line-chart",
54
+ "bar-chart",
55
+ "pie-chart"
56
+ ],
57
+ "source": "packages/charts/src/meta/genui-catalog.ts",
58
+ "install": {
59
+ "web": "npm install @krizaka/charts",
60
+ "native": "npx expo install react-native-svg\nnpm install @krizaka/charts"
61
+ },
62
+ "web": {
63
+ "entry": "@krizaka/charts/genui",
64
+ "import": "import { chartsGenUiCatalog } from \"@krizaka/charts/genui\";",
65
+ "props": [],
66
+ "examples": [
67
+ {
68
+ "name": "dashboard",
69
+ "title": "A generated dashboard",
70
+ "description": "Two figures and a chart from a model's answer, drawn with both catalogs.",
71
+ "path": "examples/genui-catalog/dashboard.tsx",
72
+ "module": "@krizaka/charts/registry/examples/genui-catalog/dashboard",
73
+ "code": "import { chartsGenUiCatalog } from \"@krizaka/charts/genui\";\nimport { baseGenUiCatalog, GenUiStream } from \"@krizaka/ui/genui\";\n\nconst catalog = { ...baseGenUiCatalog, ...chartsGenUiCatalog };\nconst days = [\"2026-10-11\", \"2026-10-12\", \"2026-10-13\", \"2026-10-14\", \"2026-10-15\"].map((day, i) => ({ day, views: [40, 52, 47, 61, 75][i] }));\n\nconst ANSWER = [\n \"Views grew all week; likes followed.\",\n \"```a2ui\",\n '{\"version\":\"v0.9\",\"createSurface\":{\"surfaceId\":\"week\",\"catalogId\":\"krizaka:genui/v1\"}}',\n '{\"version\":\"v0.9\",\"updateComponents\":{\"surfaceId\":\"week\",\"components\":[{\"id\":\"root\",\"component\":\"Column\",\"children\":[\"figures\",\"trend\"]},{\"id\":\"figures\",\"component\":\"Row\",\"children\":[\"views\",\"likes\"]},{\"id\":\"views\",\"component\":\"KpiStat\",\"label\":\"Views\",\"value\":275,\"previous\":211,\"format\":\"integer\"},{\"id\":\"likes\",\"component\":\"KpiStat\",\"label\":\"Likes\",\"value\":38,\"previous\":30,\"format\":\"integer\"},{\"id\":\"trend\",\"component\":\"ChartCard\",\"title\":\"Views per day\",\"kind\":\"area\",\"x\":\"day\",\"series\":[{\"key\":\"views\",\"label\":\"Views\"}],\"data\":{\"path\":\"/days\"}}]}}',\n JSON.stringify({ version: \"v0.9\", updateDataModel: { surfaceId: \"week\", path: \"/days\", value: days } }),\n \"```\",\n].join(\"\\n\");\n\nexport default function GenUiDashboard() {\n return <GenUiStream text={ANSWER} catalog={catalog} />;\n}\n"
74
+ }
75
+ ]
76
+ },
77
+ "native": null,
78
+ "files": [],
79
+ "dependencies": [
80
+ "@krizaka/intl@workspace:^",
81
+ "d3-geo@^3.1.1",
82
+ "echarts@^6.1.0",
83
+ "topojson-client@^3.1.0"
84
+ ],
85
+ "registryDependencies": [],
86
+ "demo": {
87
+ "path": "examples/genui-catalog/dashboard.tsx",
88
+ "content": "import { chartsGenUiCatalog } from \"@krizaka/charts/genui\";\nimport { baseGenUiCatalog, GenUiStream } from \"@krizaka/ui/genui\";\n\nconst catalog = { ...baseGenUiCatalog, ...chartsGenUiCatalog };\nconst days = [\"2026-10-11\", \"2026-10-12\", \"2026-10-13\", \"2026-10-14\", \"2026-10-15\"].map((day, i) => ({ day, views: [40, 52, 47, 61, 75][i] }));\n\nconst ANSWER = [\n \"Views grew all week; likes followed.\",\n \"```a2ui\",\n '{\"version\":\"v0.9\",\"createSurface\":{\"surfaceId\":\"week\",\"catalogId\":\"krizaka:genui/v1\"}}',\n '{\"version\":\"v0.9\",\"updateComponents\":{\"surfaceId\":\"week\",\"components\":[{\"id\":\"root\",\"component\":\"Column\",\"children\":[\"figures\",\"trend\"]},{\"id\":\"figures\",\"component\":\"Row\",\"children\":[\"views\",\"likes\"]},{\"id\":\"views\",\"component\":\"KpiStat\",\"label\":\"Views\",\"value\":275,\"previous\":211,\"format\":\"integer\"},{\"id\":\"likes\",\"component\":\"KpiStat\",\"label\":\"Likes\",\"value\":38,\"previous\":30,\"format\":\"integer\"},{\"id\":\"trend\",\"component\":\"ChartCard\",\"title\":\"Views per day\",\"kind\":\"area\",\"x\":\"day\",\"series\":[{\"key\":\"views\",\"label\":\"Views\"}],\"data\":{\"path\":\"/days\"}}]}}',\n JSON.stringify({ version: \"v0.9\", updateDataModel: { surfaceId: \"week\", path: \"/days\", value: days } }),\n \"```\",\n].join(\"\\n\");\n\nexport default function GenUiDashboard() {\n return <GenUiStream text={ANSWER} catalog={catalog} />;\n}\n"
89
+ },
90
+ "props": []
91
+ }
@@ -8,6 +8,19 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "n/a",
17
+ "reason": "A choropleth over the world; a phone shows the MapLibre map of @krizaka/ui/native/map or a ranked list.",
18
+ "use": "bar-chart"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
11
24
  "engine": "svg",
12
25
  "tier": "advanced",
13
26
  "whenToUse": [
@@ -8,6 +8,20 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "n/a",
17
+ "reason": "A WebGL globe for a site's hero; a phone shows a map or a list.",
18
+ "use": "bar-chart"
19
+ },
20
+ "desktop": {
21
+ "state": "n/a",
22
+ "reason": "A public site's page, not a window of the Mac app."
23
+ }
24
+ },
11
25
  "engine": "svg",
12
26
  "tier": "advanced",
13
27
  "whenToUse": [
@@ -8,6 +8,17 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "both",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "yes"
17
+ },
18
+ "desktop": {
19
+ "state": "yes"
20
+ }
21
+ },
11
22
  "engine": "svg",
12
23
  "tier": "ready-made",
13
24
  "whenToUse": [
@@ -8,6 +8,19 @@
8
8
  "status": "beta",
9
9
  "category": "charts",
10
10
  "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "Advanced tier: no phone screen needs it yet.",
18
+ "issue": "krizaka/krizaka-ui#280"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
11
24
  "engine": "echarts",
12
25
  "tier": "advanced",
13
26
  "whenToUse": [