@llmnative/react 1.38.0 → 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.
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1504 -1400
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/charts/ListCharts.d.ts +40 -0
- package/dist/types/src/components/charts/index.d.ts +2 -2
- package/llms-full.txt +4 -0
- package/package.json +1 -1
|
@@ -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[]>;
|
|
@@ -4,8 +4,8 @@ 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,10 @@ 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' } }]} />
|
|
884
888
|
<SequenceColumnChart ariaLabel="Turni per CR" format={(v) => `${v} min`} // CR-114: ogni colonna nel suo ordine, una serie può tornare
|
|
885
889
|
series={[{ id: 'dev', label: 'Developer' }, { id: 'rev', label: 'Reviewer' }]}
|
|
886
890
|
columns={[{ label: '#34', title: 'CR #34', segments: [{ series: 'dev', value: 18 }, { series: 'rev', value: 6 }, { series: 'dev', value: 11 }] }]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "1.
|
|
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",
|