basalt-ui 1.1.1 → 1.2.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 +2 -2
- package/CHANGELOG.md +30 -0
- package/README.md +47 -5
- package/agent/rules/basalt-app.md +126 -0
- package/agent/rules/basalt-content.md +3 -1
- package/agent/skills/basalt-app/SKILL.md +28 -7
- package/dist/agent/part-list.d.ts.map +1 -1
- package/dist/agent/part-list.js +17 -7
- package/dist/agent/stick-to-bottom.js +2 -2
- package/dist/agent-chat/thread-detail-panel.d.ts.map +1 -1
- package/dist/agent-chat/thread-detail-panel.js +37 -33
- package/dist/agent-chat/thread-message.d.ts.map +1 -1
- package/dist/agent-chat/thread-message.js +8 -5
- package/dist/agent-chat/thread-outcome-card.js +3 -3
- package/dist/agent-chat/thread-workspace.js +1 -1
- package/dist/charts/primitives/ChartLegend.js +2 -0
- package/dist/charts/primitives/ChartTooltip.js +2 -1
- package/dist/cli/index.d.ts +15 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +29 -7
- package/dist/connectivity/connectivity-indicator.d.ts.map +1 -1
- package/dist/connectivity/connectivity-indicator.js +3 -3
- package/dist/content/article-card.module.css +7 -5
- package/dist/content/article-layout.module.css +16 -12
- package/dist/content/callout.module.css +4 -4
- package/dist/content/code-block.module.css +8 -7
- package/dist/content/guide.module.css +3 -3
- package/dist/content/mermaid.module.css +2 -2
- package/dist/content/prose.module.css +59 -29
- package/dist/content/reading-progress.module.css +2 -0
- package/dist/content/toc.module.css +6 -3
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +10 -2
- package/dist/dashboard/empty-state.d.ts.map +1 -1
- package/dist/dashboard/empty-state.js +3 -16
- package/dist/dashboard/settings-section.js +2 -2
- package/dist/dashboard/settings-section.module.css +2 -2
- package/dist/dashboard/stat-card.js +2 -1
- package/dist/data/virtual-list.d.ts.map +1 -1
- package/dist/data/virtual-list.js +12 -2
- package/dist/forms/FormErrorSummary.js +2 -2
- package/dist/guard/index.d.ts +20 -4
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +250 -37
- package/dist/guard/types.d.ts +24 -3
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/provider/index.d.ts +30 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +32 -7
- package/dist/provider/lab-theme.d.ts +39 -0
- package/dist/provider/lab-theme.d.ts.map +1 -0
- package/dist/provider/lab-theme.js +52 -0
- package/dist/shell/app-header.module.css +2 -2
- package/dist/shell/app-mobile-nav.module.css +1 -1
- package/dist/shell/app-sidebar-account.d.ts.map +1 -1
- package/dist/shell/app-sidebar-account.js +4 -2
- package/dist/shell/app-sidebar.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +4 -2
- package/dist/shell/app-sidebar.module.css +36 -26
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +11 -4
- package/dist/shell/sidebar-search.module.css +16 -4
- package/dist/styles.css +1 -1
- package/dist/surfaces.d.ts +15 -11
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +4 -3
- package/dist/theme/controls.module.css +1 -1
- package/dist/theme/floating.module.css +1 -1
- package/dist/theme/index.d.ts +116 -11
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +703 -566
- package/dist/theme/nav-link.module.css +1 -1
- package/dist/theme/use-basalt-spacing.d.ts +3 -0
- package/dist/theme/use-basalt-spacing.d.ts.map +1 -0
- package/dist/theme/use-basalt-spacing.js +8 -0
- package/dist/theme-lab/derive-controls.d.ts +13 -0
- package/dist/theme-lab/derive-controls.d.ts.map +1 -0
- package/dist/theme-lab/derive-controls.js +137 -0
- package/dist/theme-lab/derive-state.d.ts +55 -0
- package/dist/theme-lab/derive-state.d.ts.map +1 -0
- package/dist/theme-lab/derive-state.js +81 -0
- package/dist/theme-lab/index.d.ts +12 -2
- package/dist/theme-lab/index.d.ts.map +1 -1
- package/dist/theme-lab/index.js +13 -62
- package/dist/theme-toggle/index.d.ts.map +1 -1
- package/dist/theme-toggle/index.js +3 -2
- package/dist/tokens/derive.d.ts +89 -0
- package/dist/tokens/derive.d.ts.map +1 -0
- package/dist/tokens/derive.js +250 -0
- package/dist/tokens/hct.d.ts +34 -0
- package/dist/tokens/hct.d.ts.map +1 -0
- package/dist/tokens/hct.js +159 -0
- package/dist/tokens/index.d.ts +71 -7
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +284 -46
- package/dist/tokens/palette.d.ts +984 -167
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +617 -119
- package/dist/vite-color-mix.d.ts +30 -0
- package/dist/vite-color-mix.d.ts.map +1 -0
- package/dist/vite-color-mix.js +80 -0
- package/dist/vite.d.ts +82 -1
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +312 -0
- package/llms.txt +5 -4
- package/package.json +24 -9
- package/src/agent/part-list.tsx +13 -7
- package/src/agent/stick-to-bottom.tsx +2 -2
- package/src/agent-chat/thread-detail-panel.tsx +13 -10
- package/src/agent-chat/thread-message.tsx +8 -5
- package/src/agent-chat/thread-outcome-card.tsx +2 -2
- package/src/agent-chat/thread-workspace.tsx +2 -2
- package/src/charts/primitives/ChartLegend.tsx +2 -2
- package/src/charts/primitives/ChartTooltip.tsx +2 -2
- package/src/cli/check-theme.test.ts +18 -0
- package/src/cli/index.ts +55 -5
- package/src/connectivity/connectivity-indicator.tsx +8 -2
- package/src/content/article-card.module.css +7 -5
- package/src/content/article-layout.module.css +16 -12
- package/src/content/callout.module.css +4 -4
- package/src/content/code-block.module.css +8 -7
- package/src/content/guide.module.css +3 -3
- package/src/content/mermaid.module.css +2 -2
- package/src/content/prose.module.css +59 -29
- package/src/content/prose.module.css.test.ts +55 -0
- package/src/content/reading-progress.module.css +2 -0
- package/src/content/toc.module.css +6 -3
- package/src/dashboard/delta-badge.tsx +10 -4
- package/src/dashboard/empty-state.tsx +3 -16
- package/src/dashboard/settings-section.module.css +2 -2
- package/src/dashboard/settings-section.tsx +2 -2
- package/src/dashboard/stat-card.tsx +2 -2
- package/src/data/virtual-list.tsx +12 -2
- package/src/forms/FormErrorSummary.tsx +1 -1
- package/src/guard/check-source.test.ts +416 -5
- package/src/guard/index.ts +367 -45
- package/src/guard/types.ts +24 -2
- package/src/index.ts +1 -0
- package/src/provider/index.test.tsx +100 -0
- package/src/provider/index.tsx +79 -7
- package/src/provider/lab-theme.test.ts +147 -0
- package/src/provider/lab-theme.ts +166 -0
- package/src/shell/app-header.module.css +2 -2
- package/src/shell/app-mobile-nav.module.css +1 -1
- package/src/shell/app-sidebar-account.tsx +9 -2
- package/src/shell/app-sidebar.module.css +36 -26
- package/src/shell/app-sidebar.tsx +12 -2
- package/src/shell/index.tsx +14 -3
- package/src/shell/sidebar-search.module.css +16 -4
- package/src/styles.css +1 -1
- package/src/surfaces.ts +17 -10
- package/src/theme/contrast.test.ts +19 -3
- package/src/theme/controls.module.css +1 -1
- package/src/theme/density-option.test.ts +96 -0
- package/src/theme/density-relations.test.ts +428 -0
- package/src/theme/derive-theme.test.ts +101 -0
- package/src/theme/floating.module.css +1 -1
- package/src/theme/fonts-option.test.ts +69 -0
- package/src/theme/index.ts +930 -563
- package/src/theme/nav-link.module.css +1 -1
- package/src/theme/radius-option.test.ts +86 -0
- package/src/theme/radius.test.ts +132 -0
- package/src/theme/spacing.test.ts +432 -0
- package/src/theme/use-basalt-spacing.test.tsx +51 -0
- package/src/theme/use-basalt-spacing.ts +38 -0
- package/src/theme-lab/derive-controls.test.ts +94 -0
- package/src/theme-lab/derive-controls.tsx +227 -0
- package/src/theme-lab/derive-state.test.ts +71 -0
- package/src/theme-lab/derive-state.ts +163 -0
- package/src/theme-lab/index.tsx +29 -68
- package/src/theme-lab/theme-lab.test.ts +4 -18
- package/src/theme-toggle/index.tsx +9 -4
- package/src/tokens/build-fonts-css.test.ts +51 -0
- package/src/tokens/build-radius-css.test.ts +25 -0
- package/src/tokens/density.test.ts +274 -0
- package/src/tokens/derive-radius.test.ts +62 -0
- package/src/tokens/derive.test.ts +30 -0
- package/src/tokens/derive.ts +481 -0
- package/src/tokens/hct.ts +231 -0
- package/src/tokens/index.ts +395 -45
- package/src/tokens/palette.test.ts +114 -0
- package/src/tokens/palette.ts +1118 -180
- package/src/vite-color-mix.test.ts +46 -0
- package/src/vite-color-mix.ts +137 -0
- package/src/vite.test.ts +192 -0
- package/src/vite.ts +502 -1
|
@@ -76,8 +76,8 @@ const LazyStickToBottom = lazy(() =>
|
|
|
76
76
|
justifyContent: 'center',
|
|
77
77
|
width: 30,
|
|
78
78
|
height: 30,
|
|
79
|
-
margin: '
|
|
80
|
-
borderRadius:
|
|
79
|
+
margin: 'var(--vx-space-agent-scroll-button-gap-top) auto 0',
|
|
80
|
+
borderRadius: 'var(--vx-radius-pill)',
|
|
81
81
|
border: 'none',
|
|
82
82
|
cursor: 'pointer',
|
|
83
83
|
backgroundColor: 'var(--vx-surface-panel)',
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* onClose={() => select(null)}
|
|
21
21
|
* />
|
|
22
22
|
*/
|
|
23
|
-
import { ActionIcon, Alert, Box, Button, Divider, Stack, Text } from '@mantine/core'
|
|
23
|
+
import { ActionIcon, Alert, Box, Button, Divider, Flex, Stack, Text } from '@mantine/core'
|
|
24
24
|
import { useReducedMotion } from '@mantine/hooks'
|
|
25
25
|
import { motion } from 'motion/react'
|
|
26
26
|
import type { JSX } from 'react'
|
|
@@ -113,11 +113,8 @@ export function ThreadDetailPanel({
|
|
|
113
113
|
const streaming = runStatus === 'streaming'
|
|
114
114
|
|
|
115
115
|
const panel = (
|
|
116
|
-
<
|
|
117
|
-
<
|
|
118
|
-
p="sm"
|
|
119
|
-
style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}
|
|
120
|
-
>
|
|
116
|
+
<Flex direction="column" h="100%">
|
|
117
|
+
<Flex p="sm" align="center" justify="space-between">
|
|
121
118
|
<Text
|
|
122
119
|
fw={550}
|
|
123
120
|
lineClamp={1}
|
|
@@ -132,11 +129,17 @@ export function ThreadDetailPanel({
|
|
|
132
129
|
<ActionIcon variant="subtle" color="gray" onClick={onClose} aria-label="Close thread">
|
|
133
130
|
<CloseGlyph />
|
|
134
131
|
</ActionIcon>
|
|
135
|
-
</
|
|
132
|
+
</Flex>
|
|
136
133
|
<Divider color="var(--vx-divider)" />
|
|
137
134
|
<Box style={{ flex: 1, minHeight: 0 }}>
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
<BasaltStickToBottom
|
|
136
|
+
style={{
|
|
137
|
+
height: '100%',
|
|
138
|
+
// theme-allow — BasaltStickToBottom owns this scroll node (see stick-to-bottom.tsx).
|
|
139
|
+
overflowY: 'auto',
|
|
140
|
+
padding: 'var(--vx-space-agent-transcript-inset)',
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
140
143
|
<ThreadTranscript
|
|
141
144
|
messages={thread.messages}
|
|
142
145
|
{...(liveParts !== undefined ? { liveParts } : {})}
|
|
@@ -172,7 +175,7 @@ export function ThreadDetailPanel({
|
|
|
172
175
|
)}
|
|
173
176
|
</Stack>
|
|
174
177
|
</Box>
|
|
175
|
-
</
|
|
178
|
+
</Flex>
|
|
176
179
|
)
|
|
177
180
|
|
|
178
181
|
if (reduceMotion) return panel
|
|
@@ -72,14 +72,17 @@ function TextRenderer({ part }: { part: TextPart; index: number }): JSX.Element
|
|
|
72
72
|
|
|
73
73
|
// Tool-call/reasoning parts (docs/DESIGN-SPEC.md §5): a mono micro-label header with a faint left
|
|
74
74
|
// divider rail — quieter than the card idiom, since these are transcript asides, not surfaces.
|
|
75
|
-
const RAIL_STYLE = {
|
|
75
|
+
const RAIL_STYLE = {
|
|
76
|
+
borderLeft: `2px solid ${VX.divider}`,
|
|
77
|
+
paddingLeft: 'var(--vx-space-agent-rail-inset-x)',
|
|
78
|
+
} as const
|
|
76
79
|
const CODE_BLOCK_STYLE = {
|
|
77
80
|
margin: 0,
|
|
78
|
-
marginTop:
|
|
81
|
+
marginTop: 'var(--vx-space-agent-part-gap-top)',
|
|
79
82
|
fontFamily: 'var(--basalt-font-mono)',
|
|
80
83
|
backgroundColor: alpha(VX.ink, 0.06),
|
|
81
|
-
borderRadius:
|
|
82
|
-
padding:
|
|
84
|
+
borderRadius: 'var(--vx-radius-card)',
|
|
85
|
+
padding: 'var(--vx-space-agent-code-inset)',
|
|
83
86
|
whiteSpace: 'pre-wrap',
|
|
84
87
|
overflowWrap: 'anywhere',
|
|
85
88
|
} as const
|
|
@@ -192,7 +195,7 @@ function MessageBlock({
|
|
|
192
195
|
return (
|
|
193
196
|
<Box
|
|
194
197
|
style={{
|
|
195
|
-
padding: '
|
|
198
|
+
padding: 'var(--vx-space-agent-message-inset-y) var(--vx-space-agent-message-inset-x)',
|
|
196
199
|
backgroundColor: author === 'user' ? VX.surface.subtle : VX.surface.panel,
|
|
197
200
|
borderRadius: VX.radiusCard,
|
|
198
201
|
boxShadow: VX.shadowCard,
|
|
@@ -107,12 +107,12 @@ function OutcomeBody({ thread }: { thread: AgentThread }): JSX.Element {
|
|
|
107
107
|
{badge !== undefined && (
|
|
108
108
|
<Badge
|
|
109
109
|
size="xs"
|
|
110
|
-
radius={6}
|
|
111
110
|
styles={{
|
|
112
111
|
root: {
|
|
113
112
|
backgroundColor: alpha(badge.statusToken, 0.13),
|
|
114
|
-
padding: '
|
|
113
|
+
padding: 'var(--vx-space-badge-inset-y) var(--vx-space-badge-inset-x)',
|
|
115
114
|
height: 'auto',
|
|
115
|
+
borderRadius: 'var(--vx-radius-ctrl)',
|
|
116
116
|
},
|
|
117
117
|
label: {
|
|
118
118
|
fontFamily: 'var(--basalt-font-mono)',
|
|
@@ -128,7 +128,7 @@ export function ThreadWorkspace({
|
|
|
128
128
|
// A plain pane, NOT a card — the feed's own rows carry the card idiom (docs/DESIGN-SPEC.md §5),
|
|
129
129
|
// so this pane stays flush with the page and the feed/detail split reads via the divider token.
|
|
130
130
|
const feed = (
|
|
131
|
-
<
|
|
131
|
+
<Flex direction="column" h="100%" style={{ overflow: 'hidden' }}>
|
|
132
132
|
<Box style={{ flex: 1, minHeight: 0 }}>
|
|
133
133
|
{store.threads.length === 0 ? (
|
|
134
134
|
(emptyState ?? <FeedEmptyState />)
|
|
@@ -143,7 +143,7 @@ export function ThreadWorkspace({
|
|
|
143
143
|
{...(newThreadPlaceholder !== undefined ? { placeholder: newThreadPlaceholder } : {})}
|
|
144
144
|
/>
|
|
145
145
|
</Box>
|
|
146
|
-
</
|
|
146
|
+
</Flex>
|
|
147
147
|
)
|
|
148
148
|
|
|
149
149
|
const detail = (
|
|
@@ -147,7 +147,7 @@ function LegendSwatch({ item, idPrefix }: { item: LegendEntry; idPrefix: string
|
|
|
147
147
|
style={{
|
|
148
148
|
width: 11,
|
|
149
149
|
height: 11,
|
|
150
|
-
borderRadius: 3,
|
|
150
|
+
borderRadius: 3, // theme-allow: sub-scale legend-swatch corner, below the 4px radius floor
|
|
151
151
|
backgroundColor: item.color,
|
|
152
152
|
opacity: item.fillOpacity ?? 0.7,
|
|
153
153
|
flexShrink: 0,
|
|
@@ -192,7 +192,7 @@ function LegendChildSwatch({ item }: { item: LegendEntry }) {
|
|
|
192
192
|
style={{
|
|
193
193
|
width: 10,
|
|
194
194
|
height: 10,
|
|
195
|
-
borderRadius: 2,
|
|
195
|
+
borderRadius: 2, // theme-allow: sub-scale legend-swatch corner, below the 4px radius floor
|
|
196
196
|
backgroundColor: item.color,
|
|
197
197
|
opacity: item.fillOpacity ?? 0.7,
|
|
198
198
|
flexShrink: 0,
|
|
@@ -10,7 +10,7 @@ const TOOLTIP_STYLES: CSSProperties = {
|
|
|
10
10
|
pointerEvents: 'none',
|
|
11
11
|
zIndex: 9999,
|
|
12
12
|
backgroundColor: VX.surface.panel,
|
|
13
|
-
borderRadius:
|
|
13
|
+
borderRadius: 'var(--vx-radius-floating)',
|
|
14
14
|
padding: '0',
|
|
15
15
|
fontSize: VX.text.xs,
|
|
16
16
|
lineHeight: '18px',
|
|
@@ -138,7 +138,7 @@ export function TooltipRow({
|
|
|
138
138
|
style={{
|
|
139
139
|
width: 8,
|
|
140
140
|
height: 8,
|
|
141
|
-
borderRadius: 2,
|
|
141
|
+
borderRadius: 2, // theme-allow: sub-scale tooltip micro-corner, below the 4px radius floor
|
|
142
142
|
backgroundColor: color,
|
|
143
143
|
flexShrink: 0,
|
|
144
144
|
}}
|
|
@@ -636,6 +636,24 @@ describe('check-theme roots fail-loud', () => {
|
|
|
636
636
|
})
|
|
637
637
|
})
|
|
638
638
|
|
|
639
|
+
describe('check-theme scans .css', () => {
|
|
640
|
+
it('flags a raw hex in a CSS module the walker collects', () => {
|
|
641
|
+
fixtureAt('theme/controls.module.css', '.input {\n color: #ff0000;\n}\n')
|
|
642
|
+
const { code, err } = run()
|
|
643
|
+
expect(code).toBe(1)
|
|
644
|
+
expect(err).toContain('raw-hex')
|
|
645
|
+
expect(err).toContain('controls.module.css')
|
|
646
|
+
})
|
|
647
|
+
|
|
648
|
+
it('does NOT false-positive a JSX-shaped rule on genuine CSS', () => {
|
|
649
|
+
fixtureAt('theme/controls.module.css', '.foo {\n display: flex;\n border-radius: 8px;\n}\n')
|
|
650
|
+
const { code, err } = run()
|
|
651
|
+
expect(code).toBe(0)
|
|
652
|
+
expect(err).not.toContain('inline-display')
|
|
653
|
+
expect(err).not.toContain('raw-html-layout')
|
|
654
|
+
})
|
|
655
|
+
})
|
|
656
|
+
|
|
639
657
|
describe('check-theme comment skipping', () => {
|
|
640
658
|
it('does NOT flag a banned element mentioned in a pure line comment', () => {
|
|
641
659
|
fixtureAt(
|
package/src/cli/index.ts
CHANGED
|
@@ -140,6 +140,18 @@ export type BasaltConfig = {
|
|
|
140
140
|
* Default: `<first basalt.root>/lib/series.ts` — see `resolveSeriesModulePath`.
|
|
141
141
|
*/
|
|
142
142
|
seriesModulePath?: string
|
|
143
|
+
/**
|
|
144
|
+
* Per-rule, per-path exemptions — complements whole-file `exempt` (which skips ALL rules for a
|
|
145
|
+
* file) and the hardcoded per-kind `appliesTo` scoping (e.g. `raw-visx-axis` → chart files
|
|
146
|
+
* only). Each value is a list of path-segment patterns matched against a finding's relative
|
|
147
|
+
* path: a pattern matches when the path split on `/` includes it as a WHOLE segment (`'agent'`
|
|
148
|
+
* matches `src/agent/x.tsx` but not `src/agenting.ts`; a trailing `/` is stripped, so `'agent'`
|
|
149
|
+
* and `'agent/'` are equivalent). Default: `{}` (no exemptions).
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* { exemptRules: { 'inline-display': ['agent'] } } // inline-display never fires under src/agent/**
|
|
153
|
+
*/
|
|
154
|
+
exemptRules?: Partial<Record<GuardKind, string[]>>
|
|
143
155
|
}
|
|
144
156
|
|
|
145
157
|
const DEFAULT_ROOT = 'src'
|
|
@@ -205,8 +217,13 @@ function readBasaltConfig(cwd: string): BasaltConfig {
|
|
|
205
217
|
}
|
|
206
218
|
}
|
|
207
219
|
|
|
208
|
-
/**
|
|
209
|
-
|
|
220
|
+
/**
|
|
221
|
+
* Recursively collect .ts/.tsx/.css files under a root, skipping dependency/build dirs.
|
|
222
|
+
* Node+Bun-safe. `.css` is included so the theme guard reaches CSS modules / `styles.css` —
|
|
223
|
+
* `checkSource` is already syntax-aware per extension (`guardSyntaxFor`); the walker was the only
|
|
224
|
+
* gap.
|
|
225
|
+
*/
|
|
226
|
+
function walkSourceFiles(dir: string, out: string[] = []): string[] {
|
|
210
227
|
let entries: string[]
|
|
211
228
|
try {
|
|
212
229
|
entries = readdirSync(dir)
|
|
@@ -222,8 +239,8 @@ function walkTsFiles(dir: string, out: string[] = []): string[] {
|
|
|
222
239
|
} catch {
|
|
223
240
|
continue
|
|
224
241
|
}
|
|
225
|
-
if (isDir)
|
|
226
|
-
else if (/\.tsx
|
|
242
|
+
if (isDir) walkSourceFiles(abs, out)
|
|
243
|
+
else if (/\.(?:tsx?|css)$/.test(name)) out.push(abs)
|
|
227
244
|
}
|
|
228
245
|
return out
|
|
229
246
|
}
|
|
@@ -274,6 +291,9 @@ const GUARD_KIND_EXPLANATIONS: Partial<Record<GuardKind, string>> = {
|
|
|
274
291
|
'sub-16-input-font':
|
|
275
292
|
'sub-16-input-font: fontSize below 16 on a form control is dead code against the `!important` ' +
|
|
276
293
|
'iOS floor in styles.css — drop the override or be honest about 16px.',
|
|
294
|
+
'raw-font-family':
|
|
295
|
+
'raw-font-family: route the font stack through createBasaltTheme(overrides, { fonts }) / the ' +
|
|
296
|
+
'--basalt-font-sans|head|mono vars instead of a hardcoded fontFamily literal.',
|
|
277
297
|
}
|
|
278
298
|
|
|
279
299
|
/**
|
|
@@ -303,12 +323,13 @@ export function checkTheme(cwd: string = process.cwd()): number {
|
|
|
303
323
|
rawFormControl: cfg.rawFormControl ?? DEFAULT_GUARD_CONFIG.rawFormControl,
|
|
304
324
|
sub16InputFont: cfg.sub16InputFont ?? DEFAULT_GUARD_CONFIG.sub16InputFont,
|
|
305
325
|
allowComment: 'theme-allow',
|
|
326
|
+
exemptRules: cfg.exemptRules ?? DEFAULT_GUARD_CONFIG.exemptRules,
|
|
306
327
|
}
|
|
307
328
|
|
|
308
329
|
const findings: Finding[] = []
|
|
309
330
|
let scannedCount = 0
|
|
310
331
|
for (const root of roots) {
|
|
311
|
-
for (const f of
|
|
332
|
+
for (const f of walkSourceFiles(resolve(cwd, root))) {
|
|
312
333
|
// Normalize to forward slashes so path matching (SKIP, exempt, isChartFile) is
|
|
313
334
|
// identical on Windows (where `relative` yields backslashes) and POSIX.
|
|
314
335
|
const rel = relative(cwd, f).replace(/\\/g, '/')
|
|
@@ -1304,6 +1325,8 @@ type DoctorResult = {
|
|
|
1304
1325
|
* stale).
|
|
1305
1326
|
* 3. The running CLI's own version matches the installed basalt-ui (catches a stale
|
|
1306
1327
|
* `bunx basalt-ui` npm fetch; best-effort, skipped if node_modules is absent).
|
|
1328
|
+
* 4. `basaltAppPlugin`'s (basalt-ui/vite) default icon filenames exist under public/ (only when
|
|
1329
|
+
* a public/ dir exists at all — skipped otherwise).
|
|
1307
1330
|
*
|
|
1308
1331
|
* Returns the exit code: 0 = all good, 1 = one or more hard failures.
|
|
1309
1332
|
*/
|
|
@@ -1379,6 +1402,32 @@ export function doctor(cwd: string = process.cwd()): number {
|
|
|
1379
1402
|
}
|
|
1380
1403
|
}
|
|
1381
1404
|
|
|
1405
|
+
// ── Warn check 4: basaltAppPlugin's default icon files exist in public/ ────
|
|
1406
|
+
// basalt-ui/vite's basaltAppPlugin (head/manifest metadata) references these filenames by
|
|
1407
|
+
// default (the realfavicongenerator convention). Only runs when a public/ dir exists at all —
|
|
1408
|
+
// apps that don't use the plugin, or don't use Vite's public-dir convention, get no false
|
|
1409
|
+
// warning. Best-effort: a custom `icons.dir` isn't visible here, so this checks the root only.
|
|
1410
|
+
const publicDir = resolve(cwd, 'public')
|
|
1411
|
+
if (existsSync(publicDir)) {
|
|
1412
|
+
const iconFiles = [
|
|
1413
|
+
'favicon.ico',
|
|
1414
|
+
'favicon.svg',
|
|
1415
|
+
'favicon-96x96.png',
|
|
1416
|
+
'apple-touch-icon.png',
|
|
1417
|
+
'web-app-manifest-192x192.png',
|
|
1418
|
+
'web-app-manifest-512x512.png',
|
|
1419
|
+
]
|
|
1420
|
+
const missingIcons = iconFiles.filter((f) => !existsSync(resolve(publicDir, f)))
|
|
1421
|
+
if (missingIcons.length > 0) {
|
|
1422
|
+
warn(
|
|
1423
|
+
`public/ is missing basaltAppPlugin icon file(s): ${missingIcons.join(', ')} — generate ` +
|
|
1424
|
+
'them (e.g. via realfavicongenerator.net) and place them at the public/ root.',
|
|
1425
|
+
)
|
|
1426
|
+
} else {
|
|
1427
|
+
pass("public/ has all of basaltAppPlugin's default icon files")
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1382
1431
|
// ── Report ──────────────────────────────────────────────────────────────────
|
|
1383
1432
|
lines.push('')
|
|
1384
1433
|
if (result.hardFailures === 0 && result.warnings === 0) {
|
|
@@ -1578,6 +1627,7 @@ export async function guardHook(cwd: string = process.cwd()): Promise<number> {
|
|
|
1578
1627
|
rawFormControl: cfg.rawFormControl ?? DEFAULT_GUARD_CONFIG.rawFormControl,
|
|
1579
1628
|
sub16InputFont: cfg.sub16InputFont ?? DEFAULT_GUARD_CONFIG.sub16InputFont,
|
|
1580
1629
|
allowComment: 'theme-allow',
|
|
1630
|
+
exemptRules: cfg.exemptRules ?? DEFAULT_GUARD_CONFIG.exemptRules,
|
|
1581
1631
|
}
|
|
1582
1632
|
|
|
1583
1633
|
// Honor the consumer's roots / exempt / skip config so the hook never blocks edits to exempted
|
|
@@ -195,7 +195,13 @@ export function ConnectivityIndicator() {
|
|
|
195
195
|
<ActionIcon
|
|
196
196
|
variant="transparent"
|
|
197
197
|
color={ICON_COLOR[status]}
|
|
198
|
-
size
|
|
198
|
+
// A numeric size, not the named `"md"` — the theme's `ActionIcon.extend` `vars` (see
|
|
199
|
+
// `theme/index.ts`) now re-points a `size="md"` ActionIcon at the density-tracking control-
|
|
200
|
+
// height anchor (for a `size="md"` ActionIcon meant to match a `size="md"` Input/Button), so
|
|
201
|
+
// this plain toolbar icon must opt OUT with an explicit number to keep Mantine's own static
|
|
202
|
+
// `--ai-size-md` (28px at the 16px root) — unaffected by that override (`props.size` is a
|
|
203
|
+
// number here, never the literal string `'md'`) and by the density knob.
|
|
204
|
+
size={28}
|
|
199
205
|
onClick={toggle}
|
|
200
206
|
onMouseEnter={scheduleOpen}
|
|
201
207
|
onMouseLeave={scheduleClose}
|
|
@@ -221,7 +227,6 @@ export function ConnectivityIndicator() {
|
|
|
221
227
|
</Text>
|
|
222
228
|
<Badge
|
|
223
229
|
size="sm"
|
|
224
|
-
radius={6}
|
|
225
230
|
styles={{
|
|
226
231
|
root: {
|
|
227
232
|
backgroundColor: alpha(statusCfg.token, 0.13),
|
|
@@ -229,6 +234,7 @@ export function ConnectivityIndicator() {
|
|
|
229
234
|
fontFamily: 'var(--basalt-font-mono)',
|
|
230
235
|
fontWeight: 600,
|
|
231
236
|
fontSize: VX.text.xs,
|
|
237
|
+
borderRadius: 'var(--vx-radius-ctrl)',
|
|
232
238
|
},
|
|
233
239
|
}}
|
|
234
240
|
>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
.card {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
|
-
gap:
|
|
10
|
+
gap: var(--vx-space-stack-sm);
|
|
11
11
|
text-decoration: none;
|
|
12
12
|
color: inherit;
|
|
13
13
|
}
|
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.clickable:focus-visible {
|
|
53
|
+
/* Focus-ring width/offset — paired with (and sized off) the outline's own 2px stroke, not a
|
|
54
|
+
* spacing gap; out of scope like a border-shorthand width. */
|
|
53
55
|
outline: 2px solid var(--vx-accent);
|
|
54
56
|
outline-offset: 2px;
|
|
55
57
|
}
|
|
@@ -83,12 +85,12 @@
|
|
|
83
85
|
.tags {
|
|
84
86
|
display: flex;
|
|
85
87
|
flex-wrap: wrap;
|
|
86
|
-
gap:
|
|
88
|
+
gap: var(--vx-space-article-card-tags-gap);
|
|
87
89
|
}
|
|
88
90
|
|
|
89
91
|
.tag {
|
|
90
|
-
padding:
|
|
91
|
-
border-radius:
|
|
92
|
+
padding: var(--vx-space-article-card-tag-inset-y) var(--vx-space-article-card-tag-inset-x);
|
|
93
|
+
border-radius: var(--vx-radius-fine);
|
|
92
94
|
background-color: color-mix(in srgb, var(--vx-ink) 6%, transparent);
|
|
93
95
|
color: var(--vx-muted);
|
|
94
96
|
font-size: var(--vx-text-micro);
|
|
@@ -100,7 +102,7 @@
|
|
|
100
102
|
* meta baseline regardless of how many lines each description clamps to. */
|
|
101
103
|
.meta {
|
|
102
104
|
margin-top: auto;
|
|
103
|
-
padding-top:
|
|
105
|
+
padding-top: var(--vx-space-article-card-meta-gap-top);
|
|
104
106
|
font-family: var(--basalt-font-mono);
|
|
105
107
|
font-size: var(--vx-text-micro);
|
|
106
108
|
letter-spacing: 0.06em;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
.root {
|
|
10
10
|
display: grid;
|
|
11
|
-
grid-template-columns: minmax(0, var(--vx-prose-measure))
|
|
11
|
+
grid-template-columns: minmax(0, var(--vx-prose-measure)) var(--vx-space-article-toc-rail-width);
|
|
12
12
|
justify-content: center;
|
|
13
|
-
column-gap:
|
|
13
|
+
column-gap: var(--vx-space-article-column-gap);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.root.noToc {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
grid-column: 1;
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
|
-
gap:
|
|
35
|
-
padding-bottom:
|
|
36
|
-
margin-bottom:
|
|
34
|
+
gap: var(--vx-space-article-header-gap);
|
|
35
|
+
padding-bottom: var(--vx-space-article-header-padding-bottom);
|
|
36
|
+
margin-bottom: var(--vx-space-article-header-margin-bottom);
|
|
37
37
|
border-bottom: 1px solid var(--vx-divider);
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
.metaRow {
|
|
57
57
|
display: flex;
|
|
58
58
|
align-items: center;
|
|
59
|
-
gap:
|
|
59
|
+
gap: var(--vx-space-article-meta-row-gap);
|
|
60
60
|
font-family: var(--basalt-font-mono);
|
|
61
61
|
font-size: var(--vx-text-micro);
|
|
62
62
|
letter-spacing: 0.06em;
|
|
@@ -72,7 +72,11 @@
|
|
|
72
72
|
.tocRail {
|
|
73
73
|
grid-column: 2;
|
|
74
74
|
position: sticky;
|
|
75
|
-
|
|
75
|
+
/* DESKTOP-only value on purpose (no `< sm` override needed): the rail is already `display: none`
|
|
76
|
+
* below the 1200px `@media` breakpoint just above, well above the `sm` (48em/768px) breakpoint
|
|
77
|
+
* that switches BasaltShell's header — and, by extension, this clearance — to its mobile value
|
|
78
|
+
* (see `content/prose.module.css` for the responsive split; docs/CONTENT-SPEC.md §5). */
|
|
79
|
+
top: var(--vx-space-sticky-header-clearance);
|
|
76
80
|
align-self: start;
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -80,9 +84,9 @@
|
|
|
80
84
|
grid-column: 1;
|
|
81
85
|
display: grid;
|
|
82
86
|
grid-template-columns: 1fr 1fr;
|
|
83
|
-
gap:
|
|
84
|
-
margin-top:
|
|
85
|
-
padding-top:
|
|
87
|
+
gap: var(--vx-space-article-footer-gap);
|
|
88
|
+
margin-top: var(--vx-space-article-footer-margin-top);
|
|
89
|
+
padding-top: var(--vx-space-article-footer-padding-top);
|
|
86
90
|
border-top: 1px solid var(--vx-divider);
|
|
87
91
|
}
|
|
88
92
|
|
|
@@ -96,7 +100,7 @@
|
|
|
96
100
|
.navCell {
|
|
97
101
|
display: flex;
|
|
98
102
|
flex-direction: column;
|
|
99
|
-
gap:
|
|
103
|
+
gap: var(--vx-space-stack-xs);
|
|
100
104
|
text-decoration: none;
|
|
101
105
|
color: inherit;
|
|
102
106
|
}
|
|
@@ -117,7 +121,7 @@
|
|
|
117
121
|
.navTarget {
|
|
118
122
|
display: flex;
|
|
119
123
|
align-items: center;
|
|
120
|
-
gap:
|
|
124
|
+
gap: var(--vx-space-article-nav-target-gap);
|
|
121
125
|
font-family: var(--basalt-font-head);
|
|
122
126
|
font-stretch: 88%;
|
|
123
127
|
font-weight: 550;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
.root {
|
|
8
8
|
border-radius: var(--vx-radius-card);
|
|
9
|
-
padding:
|
|
9
|
+
padding: var(--vx-space-callout-inset-y) var(--vx-space-callout-inset-x);
|
|
10
10
|
border-left: 2px solid var(--callout-ink);
|
|
11
11
|
background: color-mix(in srgb, var(--callout-ink) 8%, transparent);
|
|
12
12
|
}
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
.titleRow {
|
|
39
39
|
display: flex;
|
|
40
40
|
align-items: center;
|
|
41
|
-
gap:
|
|
42
|
-
margin-bottom:
|
|
41
|
+
gap: var(--vx-space-callout-title-row-gap);
|
|
42
|
+
margin-bottom: var(--vx-space-stack-xs);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.icon {
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.body p {
|
|
76
|
-
margin: 0 0
|
|
76
|
+
margin: 0 0 var(--vx-space-stack-sm);
|
|
77
77
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
.container {
|
|
8
8
|
position: relative;
|
|
9
|
-
border-radius:
|
|
9
|
+
border-radius: var(--vx-radius-floating);
|
|
10
10
|
background-color: color-mix(in srgb, var(--vx-ink) 6%, transparent);
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
}
|
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
justify-content: space-between;
|
|
18
|
-
gap:
|
|
19
|
-
padding:
|
|
18
|
+
gap: var(--vx-space-code-block-header-gap);
|
|
19
|
+
padding: var(--vx-space-code-block-header-inset-y) var(--vx-space-code-block-header-inset-right)
|
|
20
|
+
var(--vx-space-code-block-header-inset-y) var(--vx-space-code-block-content-inset-x);
|
|
20
21
|
border-bottom: 1px solid var(--vx-divider);
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
.headerRight {
|
|
33
34
|
display: flex;
|
|
34
35
|
align-items: center;
|
|
35
|
-
gap:
|
|
36
|
+
gap: var(--vx-space-code-block-header-right-gap);
|
|
36
37
|
flex-shrink: 0;
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
font-family: var(--basalt-font-mono);
|
|
52
53
|
font-size: var(--vx-text-sm);
|
|
53
54
|
line-height: 1.6;
|
|
54
|
-
padding:
|
|
55
|
+
padding: var(--vx-space-code-block-body-inset-y) var(--vx-space-code-block-content-inset-x);
|
|
55
56
|
overflow-x: auto;
|
|
56
57
|
}
|
|
57
58
|
|
|
@@ -74,8 +75,8 @@ html[data-mantine-color-scheme='light'] .body :global(.shiki span) {
|
|
|
74
75
|
/* Floating copy button — shown only when there is no header (no title), revealed on hover/focus. */
|
|
75
76
|
.floatingCopy {
|
|
76
77
|
position: absolute;
|
|
77
|
-
top:
|
|
78
|
-
right:
|
|
78
|
+
top: var(--vx-space-code-block-floating-copy-offset);
|
|
79
|
+
right: var(--vx-space-code-block-floating-copy-offset);
|
|
79
80
|
opacity: 0;
|
|
80
81
|
transition: opacity 120ms ease;
|
|
81
82
|
}
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.body {
|
|
16
|
-
padding-bottom:
|
|
16
|
+
padding-bottom: var(--vx-space-guide-body-gap-bottom);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.footer {
|
|
20
|
-
margin-top:
|
|
21
|
-
padding-top:
|
|
20
|
+
margin-top: var(--vx-space-guide-footer-gap-top);
|
|
21
|
+
padding-top: var(--vx-space-guide-footer-inset-top);
|
|
22
22
|
border-top: 1px solid var(--vx-divider);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
.container {
|
|
9
9
|
display: flex;
|
|
10
10
|
justify-content: center;
|
|
11
|
-
border-radius:
|
|
11
|
+
border-radius: var(--vx-radius-floating);
|
|
12
12
|
background-color: color-mix(in srgb, var(--vx-ink) 6%, transparent);
|
|
13
|
-
padding:
|
|
13
|
+
padding: var(--vx-space-mermaid-container-inset);
|
|
14
14
|
overflow-x: auto;
|
|
15
15
|
}
|
|
16
16
|
|