@llmnative/react 1.38.0 → 1.40.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.
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1529 -1417
- 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/dist/types/src/components/ui/fields/Input.d.ts +5 -2
- package/llms-full.txt +5 -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';
|
|
@@ -27,9 +27,12 @@ interface LabelProps {
|
|
|
27
27
|
}
|
|
28
28
|
export type InputProps = Omit<BaseInputProps, 'type'>;
|
|
29
29
|
export interface CheckboxProps extends FormFieldProps {
|
|
30
|
+
/** Shown on hover, on the label too: with `disabled`, why it cannot be changed. */
|
|
30
31
|
title?: string;
|
|
31
32
|
ariaLabel?: string;
|
|
32
33
|
valueChecked?: string | number;
|
|
34
|
+
/** It cannot be changed, by click nor keyboard (CR-116); its value stays in the form. */
|
|
35
|
+
disabled?: boolean;
|
|
33
36
|
}
|
|
34
37
|
export interface HiddenProps extends FormFieldProps {
|
|
35
38
|
id?: string;
|
|
@@ -84,8 +87,8 @@ export declare const Month: (props: InputProps) => React.JSX.Element;
|
|
|
84
87
|
export declare const Range: (props: InputProps) => React.JSX.Element;
|
|
85
88
|
export declare const Url: (props: InputProps) => React.JSX.Element;
|
|
86
89
|
export declare const Hidden: ({ name, onChange, defaultValue, value, id, inheritWrapperClassName, wrapperClassName, }: HiddenProps) => React.JSX.Element;
|
|
87
|
-
export declare const Checkbox: ({ name, onChange, defaultValue, label, title, ariaLabel, required, valueChecked, before, after, inheritWrapperClassName, wrapperClassName, className }: CheckboxProps) => React.JSX.Element;
|
|
88
|
-
export declare const Switch: ({ name, onChange, defaultValue, label, title, ariaLabel, required, valueChecked, before, after, inheritWrapperClassName, wrapperClassName, className }: CheckboxProps) => React.JSX.Element;
|
|
90
|
+
export declare const Checkbox: ({ name, onChange, defaultValue, label, title, ariaLabel, required, valueChecked, disabled, before, after, inheritWrapperClassName, wrapperClassName, className }: CheckboxProps) => React.JSX.Element;
|
|
91
|
+
export declare const Switch: ({ name, onChange, defaultValue, label, title, ariaLabel, required, valueChecked, disabled, before, after, inheritWrapperClassName, wrapperClassName, className }: CheckboxProps) => React.JSX.Element;
|
|
89
92
|
export declare const Label: ({ label, required, htmlFor, className }: LabelProps) => React.JSX.Element;
|
|
90
93
|
export declare const TextArea: ({ name, onChange, defaultValue, placeholder, label, required, readOnlyAfterSet, disabled, minHeight, maxHeight, textareaRef, before, after, feedback, id, labelClassName, inheritWrapperClassName, className, wrapperClassName, validator, onKeyDown, onClick, onBlur, labelMode, }: TextAreaProps) => React.JSX.Element;
|
|
91
94
|
export declare const ListGroup: ({ children, onClick, label, activeIndices, draggable, onDrop, disabledIndices, loadingIndices, before, after, wrapperClassName, className, itemClassName }: ListGroupProps) => React.JSX.Element;
|
package/llms-full.txt
CHANGED
|
@@ -362,6 +362,7 @@ Azioni: `save()`, `delete()`, `reset()`, `restoreDraft()`, `discardDraft()`.
|
|
|
362
362
|
<Input name="color" type="color" />
|
|
363
363
|
<TextArea name="bio" minHeight={96} />
|
|
364
364
|
<Checkbox name="active" valueChecked="yes" />
|
|
365
|
+
<Switch name="gate" label="Passa dalla CI" disabled title="L'agente non committa" /> // CR-116: disabled (non cambia né con il clic né da tastiera), title anche sull'etichetta: il motivo al passaggio del mouse
|
|
365
366
|
```
|
|
366
367
|
`Input` props: `name`(req) `label` `type` `required` `disabled` `placeholder` `min` `max` `step` `validator:(v)=>string|undefined`
|
|
367
368
|
`type`: `'text' | 'number' | 'email' | 'password' | 'color' | 'date' | 'time' | 'datetime-local' | 'week' | 'month' | 'range' | 'checkbox' | 'radio' | 'url'`
|
|
@@ -881,6 +882,10 @@ finché sono al massimo 40), tabella dei dati `sr-only` con `ariaLabel` come did
|
|
|
881
882
|
<StackedColumnChart ariaLabel="Ore per agente" labels={days} labelEvery={2} format={(v) => `${v} h`}
|
|
882
883
|
series={[{ id: 'dev', label: 'Developer', values: dev }, { id: 'qa', label: 'Tester', values: qa, color: 3 }]}
|
|
883
884
|
comparison={previousTotals} comparisonLabel="periodo precedente" />
|
|
885
|
+
<MeasureBarList ariaLabel="Agenti" // CR-115: barre raggruppate, ogni agente una volta, una barra per misura (colore in legenda), ognuna sulla sua scala
|
|
886
|
+
columns={[{ id: 'time', label: 'Ore', format: (v) => `${v} h` }, { id: 'cost', label: 'Costo' },
|
|
887
|
+
{ id: 'tokens', label: 'Token', parts: [{ id: 'in', label: 'Input' }, { id: 'out', label: 'Output' }] }]} // parts: la barra divisa in proporzione
|
|
888
|
+
rows={[{ id: 'dev', label: 'Developer', values: { time: 18, cost: 4.27, tokens: [2400000, 190000] }, trailing: { text: '18 back', tone: 'bad' } }]} />
|
|
884
889
|
<SequenceColumnChart ariaLabel="Turni per CR" format={(v) => `${v} min`} // CR-114: ogni colonna nel suo ordine, una serie può tornare
|
|
885
890
|
series={[{ id: 'dev', label: 'Developer' }, { id: 'rev', label: 'Reviewer' }]}
|
|
886
891
|
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.40.0",
|
|
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",
|