@llmnative/react 1.37.2 → 1.39.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.
@@ -359,6 +359,7 @@ export interface I18nDict {
359
359
  less: string;
360
360
  more: string;
361
361
  dataTable: string;
362
+ sequence: string;
362
363
  };
363
364
  }
364
365
  type DeepPartial<T> = {
@@ -58,6 +58,42 @@ export interface StackedColumnChartProps {
58
58
  }
59
59
  /** CR-112 — columns per bucket, stacked by series, gliding between periods; optional comparison tick per column. */
60
60
  export declare function StackedColumnChart({ series, labels, ariaLabel, titles, labelEvery, format: formatProp, comparison, comparisonLabel, height, className }: StackedColumnChartProps): React.JSX.Element;
61
+ export interface SequenceSeries {
62
+ readonly id: string;
63
+ readonly label: string;
64
+ /** A slot of the palette (1…8) or a theme token; by default the slot of its position. */
65
+ readonly color?: ChartColor;
66
+ }
67
+ export interface SequenceSegment {
68
+ /** The id of its series: its colour and its name. A series may come back in the same column. */
69
+ readonly series: string;
70
+ readonly value: number;
71
+ }
72
+ export interface SequenceColumn {
73
+ readonly label: string;
74
+ /** Title of its tooltip and of its row in the data table; by default its label. */
75
+ readonly title?: string;
76
+ /** Bottom to top, in the order they happened. */
77
+ readonly segments: readonly SequenceSegment[];
78
+ /** Rows added to its tooltip, after the segments. */
79
+ readonly tooltip?: readonly ChartTooltipRow[];
80
+ }
81
+ export interface SequenceColumnChartProps {
82
+ series: readonly SequenceSeries[];
83
+ columns: readonly SequenceColumn[];
84
+ ariaLabel: string;
85
+ /** One axis label every N columns (the last always shown). */
86
+ labelEvery?: number;
87
+ format?: (value: number) => string;
88
+ height?: number;
89
+ className?: string;
90
+ onColumnClick?: (column: SequenceColumn, index: number) => void;
91
+ }
92
+ /**
93
+ * CR-114 — columns of segments in sequence: each column keeps its own order, bottom to top, and a series
94
+ * may come back in it (the turns of the agents on one item, a rework a second segment of the same colour).
95
+ */
96
+ export declare function SequenceColumnChart({ series, columns, ariaLabel, labelEvery, format: formatProp, height, className, onColumnClick }: SequenceColumnChartProps): React.JSX.Element;
61
97
  export interface DivergingBar {
62
98
  readonly label: string;
63
99
  /** Above the zero line; null: no data (nothing drawn). */
@@ -32,6 +32,46 @@ export interface BarListProps {
32
32
  }
33
33
  /** CR-112 — horizontal bars, label on the left and value at the end: rankings, funnels, averages per group. */
34
34
  export declare function BarList({ rows, ariaLabel, color, format: formatProp, max: fixedMax, labelWidth, legend, className, onRowClick }: BarListProps): React.JSX.Element;
35
+ export interface MeasureBarPart {
36
+ readonly id: string;
37
+ readonly label: string;
38
+ readonly color?: ChartColor;
39
+ }
40
+ export interface MeasureBarColumn {
41
+ readonly id: string;
42
+ /** Its name in the legend and in the tooltip. */
43
+ readonly label: string;
44
+ readonly format?: (value: number) => string;
45
+ readonly color?: ChartColor;
46
+ /** The parts of each of its bars, left to right, each of its colour (in the legend in place of the measure): input and output tokens. */
47
+ readonly parts?: readonly MeasureBarPart[];
48
+ }
49
+ export interface MeasureBarRow {
50
+ readonly id: string;
51
+ readonly label: string;
52
+ /** For each column, by its id: a number, or one number per part. */
53
+ readonly values: Readonly<Record<string, number | readonly number[]>>;
54
+ readonly trailing?: {
55
+ readonly text: string;
56
+ readonly tone: 'good' | 'bad' | 'neutral';
57
+ };
58
+ readonly tooltip?: readonly ChartTooltipRow[];
59
+ }
60
+ export interface MeasureBarListProps {
61
+ columns: readonly MeasureBarColumn[];
62
+ rows: readonly MeasureBarRow[];
63
+ ariaLabel: string;
64
+ /** Room for the labels, in px. */
65
+ labelWidth?: number;
66
+ className?: string;
67
+ onRowClick?: (row: MeasureBarRow) => void;
68
+ }
69
+ /**
70
+ * CR-115 — grouped bars: each item once, and next to it a bar per measure one under the other, each
71
+ * measure of its colour (the legend) and on its own scale (time, cost, tokens: quantities of different
72
+ * units read together). A bar of a measure with parts is split in proportion, each part of its colour.
73
+ */
74
+ export declare function MeasureBarList({ columns, rows, ariaLabel, labelWidth, className, onRowClick }: MeasureBarListProps): React.JSX.Element;
35
75
  export interface HeatmapProps {
36
76
  /** values[row][column]. */
37
77
  values: ReadonlyArray<readonly number[]>;
@@ -1,11 +1,11 @@
1
- export { ColumnChart, StackedColumnChart, DivergingBarChart } from './ColumnCharts';
2
- export type { ColumnChartColumn, ColumnChartMarker, ColumnChartProps, ChartSeries, StackedColumnChartProps, DivergingBar, DivergingBarChartProps } from './ColumnCharts';
1
+ export { ColumnChart, StackedColumnChart, SequenceColumnChart, DivergingBarChart } from './ColumnCharts';
2
+ export type { ColumnChartColumn, ColumnChartMarker, ColumnChartProps, ChartSeries, StackedColumnChartProps, SequenceSeries, SequenceSegment, SequenceColumn, SequenceColumnChartProps, DivergingBar, DivergingBarChartProps } from './ColumnCharts';
3
3
  export { LineChart, AreaChart, Sparkline } from './LineCharts';
4
4
  export type { LineSeries, LineChartProps, AreaChartProps, SparklineProps } from './LineCharts';
5
5
  export { ScatterChart } from './ScatterChart';
6
6
  export type { ScatterPoint, ScatterChartProps } from './ScatterChart';
7
- export { BarList, Heatmap, CalendarHeatmap, AnimatedNumber } from './ListCharts';
8
- export type { BarListRow, BarListProps, HeatmapProps, CalendarHeatmapProps } from './ListCharts';
7
+ export { BarList, MeasureBarList, Heatmap, CalendarHeatmap, AnimatedNumber } from './ListCharts';
8
+ export type { BarListRow, BarListProps, MeasureBarPart, MeasureBarColumn, MeasureBarRow, MeasureBarListProps, HeatmapProps, CalendarHeatmapProps } from './ListCharts';
9
9
  export { ChartLegend, ChartDataTable, useChartTooltip } from './ChartParts';
10
10
  export type { ChartLegendItem, ChartTooltipRow } from './ChartParts';
11
11
  export { chartToken, chartFill, niceMax, ticks, useAnimatedValues, useReveal, useChartWidth, useChartFormat } from './chartCore';
package/llms-full.txt CHANGED
@@ -881,6 +881,14 @@ finché sono al massimo 40), tabella dei dati `sr-only` con `ariaLabel` come did
881
881
  <StackedColumnChart ariaLabel="Ore per agente" labels={days} labelEvery={2} format={(v) => `${v} h`}
882
882
  series={[{ id: 'dev', label: 'Developer', values: dev }, { id: 'qa', label: 'Tester', values: qa, color: 3 }]}
883
883
  comparison={previousTotals} comparisonLabel="periodo precedente" />
884
+ <MeasureBarList ariaLabel="Agenti" // CR-115: barre raggruppate, ogni agente una volta, una barra per misura (colore in legenda), ognuna sulla sua scala
885
+ columns={[{ id: 'time', label: 'Ore', format: (v) => `${v} h` }, { id: 'cost', label: 'Costo' },
886
+ { id: 'tokens', label: 'Token', parts: [{ id: 'in', label: 'Input' }, { id: 'out', label: 'Output' }] }]} // parts: la barra divisa in proporzione
887
+ rows={[{ id: 'dev', label: 'Developer', values: { time: 18, cost: 4.27, tokens: [2400000, 190000] }, trailing: { text: '18 back', tone: 'bad' } }]} />
888
+ <SequenceColumnChart ariaLabel="Turni per CR" format={(v) => `${v} min`} // CR-114: ogni colonna nel suo ordine, una serie può tornare
889
+ series={[{ id: 'dev', label: 'Developer' }, { id: 'rev', label: 'Reviewer' }]}
890
+ columns={[{ label: '#34', title: 'CR #34', segments: [{ series: 'dev', value: 18 }, { series: 'rev', value: 6 }, { series: 'dev', value: 11 }] }]}
891
+ onColumnClick={(column) => {}} />
884
892
  <LineChart ariaLabel="Lead time" labels={days} threshold={{ value: 6.5, label: 'obiettivo' }} baseline={0} domain={[0, 10]}
885
893
  series={[{ id: 'now', label: 'Ora', values: [3, null, 5], area: true, band: { min, max } }, { id: 'before', label: 'Prima', values: prev, dashed: true }]} />
886
894
  <AreaChart ariaLabel="Flusso cumulativo" labels={days} stacked series={[{ id: 'closed', label: 'Chiuse', values: closed }]} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "1.37.2",
3
+ "version": "1.39.1",
4
4
  "description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",