basalt-ui 1.19.1 → 1.21.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/AGENTS.md +19 -1
- package/CHANGELOG.md +39 -0
- package/MIGRATING.md +326 -0
- package/README.md +87 -9
- package/agent/rules/basalt-app.md +84 -0
- package/agent/rules/basalt-charts.md +32 -17
- package/agent/rules/basalt-content.md +4 -0
- package/agent/rules/basalt-mantine.md +25 -10
- package/agent/rules/basalt-router.md +79 -15
- package/agent/rules/basalt-state.md +21 -3
- package/agent/rules/basalt-tokens.md +132 -6
- package/agent/skills/basalt-app/SKILL.md +45 -6
- package/agent/skills/basalt-charts/SKILL.md +5 -3
- package/agent/templates/CLAUDE-block.md.tpl +11 -5
- package/configs/check.yml +11 -4
- package/configs/lefthook.yml +59 -7
- package/configs/oxlint-plugin.js +633 -30
- package/configs/oxlint-plugin.test.ts +594 -15
- package/configs/oxlint.json +10 -1
- package/dist/agent/stick-to-bottom.js +1 -1
- package/dist/agent-chat/thread-detail-panel.js +1 -1
- package/dist/agent-chat/thread-message.js +2 -2
- package/dist/agent-chat/tool-chip.js +1 -1
- package/dist/charts/kinds/Bars.d.ts +1 -1
- package/dist/charts/kinds/Bars.d.ts.map +1 -1
- package/dist/charts/kinds/Donut.d.ts +1 -1
- package/dist/charts/kinds/Donut.d.ts.map +1 -1
- package/dist/charts/kinds/Donut.js +1 -1
- package/dist/charts/kinds/DualPanel.d.ts +1 -1
- package/dist/charts/kinds/DualPanel.d.ts.map +1 -1
- package/dist/charts/kinds/Heatmap.d.ts +1 -1
- package/dist/charts/kinds/Heatmap.d.ts.map +1 -1
- package/dist/charts/kinds/MultiLine.d.ts +1 -1
- package/dist/charts/kinds/MultiLine.d.ts.map +1 -1
- package/dist/charts/kinds/StackedArea.d.ts +1 -1
- package/dist/charts/kinds/StackedArea.d.ts.map +1 -1
- package/dist/charts/kinds/ZonedLine.d.ts +1 -1
- package/dist/charts/kinds/ZonedLine.d.ts.map +1 -1
- package/dist/charts/primitives/ChartLegend.js +2 -2
- package/dist/charts/primitives/ChartTooltip.js +1 -1
- package/dist/cli/index.d.ts +146 -20
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +901 -101
- package/dist/cli/toolchain-wiring.test.d.ts +2 -0
- package/dist/cli/toolchain-wiring.test.d.ts.map +1 -0
- package/dist/cli/waiver-audit.test.d.ts +2 -0
- package/dist/cli/waiver-audit.test.d.ts.map +1 -0
- package/dist/dashboard/delta-badge.js +2 -2
- package/dist/dashboard/stat-card.js +1 -1
- package/dist/data/virtual-list.js +5 -5
- package/dist/guard/index.d.ts +101 -2
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +474 -62
- package/dist/guard/types.d.ts +25 -5
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/register.d.ts +25 -0
- package/dist/register.d.ts.map +1 -1
- package/dist/router-tanstack/multi-search-param-store.d.ts +13 -0
- package/dist/router-tanstack/multi-search-param-store.d.ts.map +1 -1
- package/dist/router-tanstack/multi-search-param-store.js +4 -1
- package/dist/router-tanstack/search-param-store.d.ts +29 -5
- package/dist/router-tanstack/search-param-store.d.ts.map +1 -1
- package/dist/router-tanstack/search-param-store.js +31 -3
- package/dist/router-tanstack/search-param-store.test.d.ts +2 -0
- package/dist/router-tanstack/search-param-store.test.d.ts.map +1 -0
- package/dist/shell/app-mobile-nav.module.css +11 -3
- package/dist/shell/index.d.ts +12 -5
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +24 -6
- package/dist/surfaces.d.ts +1 -1
- package/dist/surfaces.js +1 -1
- package/dist/tokens/index.d.ts +5 -3
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +7 -1
- package/dist/tokens/palette.d.ts +35 -27
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +24 -18
- package/dist/tokens/text-scale.test.d.ts +2 -0
- package/dist/tokens/text-scale.test.d.ts.map +1 -0
- package/dist/tokens.css +21 -17
- package/dist/vite-color-mix.js +2 -2
- package/dist/vite.d.ts +24 -2
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +54 -13
- package/llms.txt +3 -3
- package/package.json +4 -3
- package/src/agent/stick-to-bottom.tsx +1 -1
- package/src/agent-chat/thread-detail-panel.tsx +1 -1
- package/src/agent-chat/thread-message.tsx +3 -3
- package/src/agent-chat/tool-chip.tsx +1 -1
- package/src/charts/kinds/Bars.tsx +1 -1
- package/src/charts/kinds/Donut.tsx +3 -2
- package/src/charts/kinds/DualPanel.tsx +2 -2
- package/src/charts/kinds/Heatmap.tsx +1 -1
- package/src/charts/kinds/MultiLine.tsx +1 -1
- package/src/charts/kinds/StackedArea.tsx +1 -1
- package/src/charts/kinds/ZonedLine.tsx +1 -1
- package/src/charts/primitives/ChartLegend.tsx +2 -2
- package/src/charts/primitives/ChartTooltip.tsx +1 -1
- package/src/cli/index.ts +1614 -164
- package/src/cli/init-sync.test.ts +21 -3
- package/src/cli/template-ledger.test.ts +1 -1
- package/src/cli/tokens-css.test.ts +27 -14
- package/src/cli/toolchain-wiring.test.ts +856 -0
- package/src/cli/waiver-audit.test.ts +131 -0
- package/src/dashboard/delta-badge.tsx +3 -3
- package/src/dashboard/stat-card.tsx +1 -1
- package/src/data/virtual-list.tsx +8 -8
- package/src/guard/check-source.test.ts +1104 -12
- package/src/guard/index.ts +1106 -103
- package/src/guard/types.ts +29 -4
- package/src/register.ts +32 -0
- package/src/router-tanstack/multi-search-param-store.ts +16 -1
- package/src/router-tanstack/search-param-store.test.ts +135 -0
- package/src/router-tanstack/search-param-store.ts +90 -8
- package/src/shell/app-mobile-nav.module.css +11 -3
- package/src/shell/app-mobile-nav.tsx +1 -1
- package/src/shell/index.test.tsx +52 -0
- package/src/shell/index.tsx +64 -13
- package/src/surfaces.ts +1 -1
- package/src/theme/density-relations.test.ts +8 -5
- package/src/theme/spacing.test.ts +2 -0
- package/src/theme-toggle/index.tsx +2 -2
- package/src/tokens/index.ts +28 -3
- package/src/tokens/palette.ts +24 -18
- package/src/tokens/text-scale.test.ts +51 -0
- package/src/vite-color-mix.ts +2 -2
- package/src/vite.test.ts +125 -6
- package/src/vite.ts +148 -20
|
@@ -615,7 +615,7 @@ type VirtualizedTranscriptProps = {
|
|
|
615
615
|
*/
|
|
616
616
|
function NonVirtualizedRows({ rows, height }: VirtualizedTranscriptProps): JSX.Element {
|
|
617
617
|
return (
|
|
618
|
-
// theme-allow — degrade target owns its own scroll node, same as the real virtualizer below.
|
|
618
|
+
// theme-allow raw-scroll-container — degrade target owns its own scroll node, same as the real virtualizer below.
|
|
619
619
|
<Box style={{ height, overflow: 'auto' }}>
|
|
620
620
|
<Stack gap="sm">
|
|
621
621
|
{rows.map((row) => (
|
|
@@ -895,7 +895,7 @@ const LazyVirtualizedRows = lazy(() =>
|
|
|
895
895
|
})
|
|
896
896
|
|
|
897
897
|
return (
|
|
898
|
-
// theme-allow — TanStack Virtual measures/scrolls this element (never nest in BasaltStickToBottom, see ./virtualize).
|
|
898
|
+
// theme-allow raw-scroll-container — TanStack Virtual measures/scrolls this element (never nest in BasaltStickToBottom, see ./virtualize).
|
|
899
899
|
<Box ref={parentRef} style={{ height, overflow: 'auto' }}>
|
|
900
900
|
<Box style={{ height: virtualizer.getTotalSize(), position: 'relative' }}>
|
|
901
901
|
{virtualizer.getVirtualItems().map((virtualItem) => {
|
|
@@ -938,7 +938,7 @@ const LazyVirtualizedRows = lazy(() =>
|
|
|
938
938
|
* flash without paying that cost — it settles state before any row has meaningfully mounted.
|
|
939
939
|
*/
|
|
940
940
|
function VirtualizeSuspenseFallback({ height }: { readonly height: number | string }): JSX.Element {
|
|
941
|
-
// theme-allow — placeholder owns its own scroll node, matching the real virtualizer's shape.
|
|
941
|
+
// theme-allow raw-scroll-container — placeholder owns its own scroll node, matching the real virtualizer's shape.
|
|
942
942
|
return <Box style={{ height, overflow: 'auto' }} />
|
|
943
943
|
}
|
|
944
944
|
|
|
@@ -138,7 +138,7 @@ export function ToolChip({
|
|
|
138
138
|
width: 6,
|
|
139
139
|
height: 6,
|
|
140
140
|
flexShrink: 0,
|
|
141
|
-
borderRadius: '50%', // theme-allow
|
|
141
|
+
borderRadius: '50%', // theme-allow raw-surface — a 6px state dot is a circle, not a surface corner
|
|
142
142
|
backgroundColor: dotToken,
|
|
143
143
|
}}
|
|
144
144
|
/>
|
|
@@ -125,7 +125,7 @@ export type BarsProps<T> = {
|
|
|
125
125
|
/** Legend config forwarded to `CartesianChart`; `false` disables the legend (sparkline escape).
|
|
126
126
|
* Default `{ placement: 'bottom' }`. */
|
|
127
127
|
legend?: ChartLegendConfig | false
|
|
128
|
-
/** Accessible text alternative, forwarded as `aria-label` (+ `role="
|
|
128
|
+
/** Accessible text alternative, forwarded as `aria-label` (+ `role="group"`). */
|
|
129
129
|
ariaLabel?: string
|
|
130
130
|
/** Forwarded to `CartesianChart` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
131
131
|
isPending?: boolean
|
|
@@ -50,7 +50,7 @@ export type DonutProps<K extends string = SeriesKey> = {
|
|
|
50
50
|
centerContent?: ReactNode
|
|
51
51
|
innerRatio?: number
|
|
52
52
|
padAngle?: number
|
|
53
|
-
/** Accessible text alternative, forwarded to `ChartFrame` as `aria-label` (+ `role="
|
|
53
|
+
/** Accessible text alternative, forwarded to `ChartFrame` as `aria-label` (+ `role="group"`). */
|
|
54
54
|
ariaLabel?: string
|
|
55
55
|
/** Forwarded to `ChartFrame` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
56
56
|
isPending?: boolean
|
|
@@ -208,7 +208,8 @@ function DonutPlot<K extends string = SeriesKey>(props: DonutPlotProps<K>) {
|
|
|
208
208
|
style={{
|
|
209
209
|
position: 'absolute',
|
|
210
210
|
inset: 0,
|
|
211
|
-
|
|
211
|
+
// Centering over the donut hole; charts/ is Mantine-free, so Center is unavailable here.
|
|
212
|
+
display: 'flex',
|
|
212
213
|
alignItems: 'center',
|
|
213
214
|
justifyContent: 'center',
|
|
214
215
|
pointerEvents: 'none',
|
|
@@ -94,7 +94,7 @@ export type DualPanelProps<T> = {
|
|
|
94
94
|
/** Legend config forwarded to `ChartFrame`; `false` disables the legend (sparkline escape).
|
|
95
95
|
* Default `{ placement: 'bottom' }`. */
|
|
96
96
|
legend?: ChartLegendConfig | false
|
|
97
|
-
/** Accessible text alternative, forwarded to `ChartFrame` as `aria-label` (+ `role="
|
|
97
|
+
/** Accessible text alternative, forwarded to `ChartFrame` as `aria-label` (+ `role="group"`). */
|
|
98
98
|
ariaLabel?: string
|
|
99
99
|
/** Forwarded to `ChartFrame` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
100
100
|
isPending?: boolean
|
|
@@ -521,7 +521,7 @@ function DualPanelPlot<T>(props: DualPanelPlotProps<T>) {
|
|
|
521
521
|
</>
|
|
522
522
|
)}
|
|
523
523
|
|
|
524
|
-
{/* theme-allow basalt/hand-rolled-plot: TWO panes over one x scale is not a single
|
|
524
|
+
{/* theme-allow-file basalt/hand-rolled-plot: TWO panes over one x scale is not a single
|
|
525
525
|
cartesian plot, so `CartesianChart` (one plot rect, one or two y axes) cannot express
|
|
526
526
|
it. This file therefore assembles the plot itself — but from the SAME parts every
|
|
527
527
|
other chart gets: `ChartFrame`, `autoMargin` + `probeAxisLabels`, `useChartCursor`,
|
|
@@ -53,7 +53,7 @@ export type HeatmapProps<T> = {
|
|
|
53
53
|
renderTooltip?: (cell: HeatmapCell) => ReactNode
|
|
54
54
|
/** Optional gradient legend strip below the grid (faint → solid color). */
|
|
55
55
|
legend?: { min: string; max: string }
|
|
56
|
-
/** Accessible text alternative, forwarded to `ChartFrame` as `aria-label` (+ `role="
|
|
56
|
+
/** Accessible text alternative, forwarded to `ChartFrame` as `aria-label` (+ `role="group"`). */
|
|
57
57
|
ariaLabel?: string
|
|
58
58
|
/** Forwarded to `ChartFrame` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
59
59
|
isPending?: boolean
|
|
@@ -52,7 +52,7 @@ export type MultiLineProps<T> = {
|
|
|
52
52
|
/** Legend config forwarded to `CartesianChart`; `false` disables the legend (sparkline escape).
|
|
53
53
|
* Default `{ placement: 'bottom' }`. */
|
|
54
54
|
legend?: ChartLegendConfig | false
|
|
55
|
-
/** Accessible text alternative, forwarded to `CartesianChart` as `aria-label` (+ `role="
|
|
55
|
+
/** Accessible text alternative, forwarded to `CartesianChart` as `aria-label` (+ `role="group"`). */
|
|
56
56
|
ariaLabel?: string
|
|
57
57
|
/** Forwarded to `CartesianChart` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
58
58
|
isPending?: boolean
|
|
@@ -33,7 +33,7 @@ export type StackedAreaProps<T> = {
|
|
|
33
33
|
/** Legend config forwarded to `CartesianChart`; `false` disables the legend (sparkline escape).
|
|
34
34
|
* Default `{ placement: 'bottom' }`. */
|
|
35
35
|
legend?: ChartLegendConfig | false
|
|
36
|
-
/** Accessible text alternative, forwarded as `aria-label` (+ `role="
|
|
36
|
+
/** Accessible text alternative, forwarded as `aria-label` (+ `role="group"`). */
|
|
37
37
|
ariaLabel?: string
|
|
38
38
|
/** Forwarded to `CartesianChart` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
39
39
|
isPending?: boolean
|
|
@@ -73,7 +73,7 @@ export type ZonedLineProps<T> = {
|
|
|
73
73
|
/** Legend config forwarded to `CartesianChart`; `false` disables the legend (sparkline escape).
|
|
74
74
|
* Default `{ placement: 'bottom' }`. */
|
|
75
75
|
legend?: ChartLegendConfig | false
|
|
76
|
-
/** Accessible text alternative, forwarded to `CartesianChart` as `aria-label` (+ `role="
|
|
76
|
+
/** Accessible text alternative, forwarded to `CartesianChart` as `aria-label` (+ `role="group"`). */
|
|
77
77
|
ariaLabel?: string
|
|
78
78
|
/** Forwarded to `CartesianChart` — see `ChartPending`'s JSDoc for the three-state rationale. */
|
|
79
79
|
isPending?: boolean
|
|
@@ -158,7 +158,7 @@ function LegendSwatch({ item, idPrefix }: { item: LegendEntry; idPrefix: string
|
|
|
158
158
|
style={{
|
|
159
159
|
width: 11,
|
|
160
160
|
height: 11,
|
|
161
|
-
borderRadius: 3, // theme-allow
|
|
161
|
+
borderRadius: 3, // theme-allow raw-surface — sub-scale legend-swatch corner, below the 4px radius floor
|
|
162
162
|
backgroundColor: item.color,
|
|
163
163
|
opacity: item.fillOpacity ?? 0.7,
|
|
164
164
|
flexShrink: 0,
|
|
@@ -211,7 +211,7 @@ function LegendChildSwatch({ item }: { item: LegendEntry }) {
|
|
|
211
211
|
style={{
|
|
212
212
|
width: 10,
|
|
213
213
|
height: 10,
|
|
214
|
-
borderRadius: 2, // theme-allow
|
|
214
|
+
borderRadius: 2, // theme-allow raw-surface — sub-scale legend-swatch corner, below the 4px radius floor
|
|
215
215
|
backgroundColor: item.color,
|
|
216
216
|
opacity: item.fillOpacity ?? 0.7,
|
|
217
217
|
flexShrink: 0,
|
|
@@ -121,7 +121,7 @@ export function TooltipRow({
|
|
|
121
121
|
style={{
|
|
122
122
|
width: 8,
|
|
123
123
|
height: 8,
|
|
124
|
-
borderRadius: 2, // theme-allow
|
|
124
|
+
borderRadius: 2, // theme-allow raw-surface — sub-scale tooltip micro-corner, below the 4px radius floor
|
|
125
125
|
backgroundColor: color,
|
|
126
126
|
flexShrink: 0,
|
|
127
127
|
}}
|