@voltstack/bravais 1.0.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/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # bravais
2
+
3
+ The VOLT design-system primitives — the shared React visual language used across VoltLabs surfaces (VOLT, Console, Registry).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i bravais
9
+ ```
10
+
11
+ Peer dependencies (provided by the consuming app): `react`, `react-dom`, `react-router-dom`, `@floating-ui/react`, `lucide-react`, `recharts`, `framer-motion`.
12
+
13
+ ## Usage
14
+
15
+ ```tsx
16
+ import { Stack, Row, Text, Heading, Button, TextInput, Card } from 'bravais';
17
+ // Once, at your app root:
18
+ import 'bravais/styles.css'; // design tokens + utility classes (REQUIRED)
19
+ import 'bravais/components.css'; // per-component styles (REQUIRED)
20
+
21
+ export const Example = () => (
22
+ <Card>
23
+ <Stack gap='1'>
24
+ <Heading level={2}>Title</Heading>
25
+ <Row gap='05'>
26
+ <TextInput placeholder='Name' aria-label='Name' />
27
+ <Button intent='brand'>Save</Button>
28
+ </Row>
29
+ </Stack>
30
+ </Card>
31
+ );
32
+ ```
33
+
34
+ Layout/typography primitives (`Box`/`Row`/`Stack`/`Grid`/`Text`/`Heading`) map style props to the utility classes shipped in `styles.css`, so that stylesheet is required.
35
+
36
+ ## Build
37
+
38
+ ```bash
39
+ npm run build # tsup -> dist/ (ESM + d.ts + CSS)
40
+ ```
41
+
42
+ ## Status & follow-ups (0.1.0)
43
+
44
+ - **Self-contained:** the primitives, their internal helpers (cn, compose-refs, hooks, FloatingRootContext, types) and the token/utility stylesheets live under `src/`; the build has no dependency on VOLT's source.
45
+ - VOLT still ships its own copy of these primitives under `client/src`. **Next step:** point VOLT (and Console/Registry) at this package and delete the in-app copy, so there's a single source of truth.
46
+ - App-level wrappers (`AsyncMenuItemWrapper`, `ContextMenuPopover`) are intentionally **not exported** — they depend on the host app's error/toast system. Compose `Popover` + `PopoverMenu` with your own async/error handling.
47
+ - Some primitives (`Card`, `Toast`, `Meter`, `ProgressBar`, `Menu`, `Checkbox`, `Radio`) are not yet exercised by VOLT itself; treat as provisional until adopted/visually verified.