@still-void/ui 1.1.1 → 2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @still-void/ui
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#5](https://github.com/KalleoPinheiro/still-void/pull/5) [`9d5fdc8`](https://github.com/KalleoPinheiro/still-void/commit/9d5fdc86eba6d04ed568b2fc821f71d3c91aac50) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - **Breaking:** removes the framework-agnostic core entry point (`import ... from '@still-void/ui'`). The package is now React/Next.js-only. Tokens and recipes moved to `@still-void/ui/react`; DOM behaviors (`createThemeManager`, `createScrollSpy`, `createReadingProgress`, `copyToClipboard`) moved to `@still-void/ui/react/client`. `react`/`react-dom` (>=18) are now required peer dependencies instead of optional. No token/design values changed. See `docs/migration-v1-to-v2.md` for the full import map; non-React consumers have no migration path and should stay on `^1`.
8
+
9
+ ### Minor Changes
10
+
11
+ - [#5](https://github.com/KalleoPinheiro/still-void/pull/5) [`9d5fdc8`](https://github.com/KalleoPinheiro/still-void/commit/9d5fdc86eba6d04ed568b2fc821f71d3c91aac50) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Add Tailwind config extending Still Void tokens and shadcn/ui theme integration infrastructure. Includes `tailwind.config.ts` mapping Still Void colors, typography, spacing, and border radii as Tailwind utilities for use with shadcn/ui components.
12
+
13
+ - [#5](https://github.com/KalleoPinheiro/still-void/pull/5) [`9d5fdc8`](https://github.com/KalleoPinheiro/still-void/commit/9d5fdc86eba6d04ed568b2fc821f71d3c91aac50) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Add shadcn/ui components with Still Void theming. Exports ~40 components from `@still-void/ui/react` (server-safe) and `@still-void/ui/react/client` (client-only). Tailwind config extends Still Void tokens; CSS override layer removes shadows per design spec.
14
+
3
15
  ## 1.1.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -3,23 +3,22 @@
3
3
  [![npm](https://img.shields.io/npm/v/@still-void/ui?color=6b5bd6)](https://www.npmjs.com/package/@still-void/ui)
4
4
  [![CI](https://github.com/KalleoPinheiro/still-void/actions/workflows/ci.yml/badge.svg)](https://github.com/KalleoPinheiro/still-void/actions/workflows/ci.yml)
5
5
 
6
- **Still Void** design system as a framework-agnostic TypeScript library — extracted from the
7
- `blog.kalleopinheiro.dev` prototype. Works with React, Angular, Vue, or plain HTML, with
8
- first-class support for **Next.js Server Components**.
6
+ **Still Void** design system for **React and Next.js** — extracted from the
7
+ `blog.kalleopinheiro.dev` prototype. Ships as two entry points: a server-safe entry that
8
+ renders inside Next.js Server Components with zero hydration cost, and a `'use client'`
9
+ entry for interactive pieces. See [docs/design-system.md](docs/design-system.md) for the
10
+ full architecture and component catalog, and
11
+ [docs/migration-v1-to-v2.md](docs/migration-v1-to-v2.md) if you're upgrading from the
12
+ framework-agnostic `1.x` line.
9
13
 
10
14
  ## Architecture
11
15
 
12
- The library is layered so the core never depends on any framework:
13
-
14
16
  | Layer | Entry | Runs where | What it is |
15
17
  |---|---|---|---|
16
- | **Tokens** | `@still-void/ui` | anywhere | Typed constants: colors (hex + oklch), typography, spacing, radii, motion |
17
18
  | **Theme CSS** | `@still-void/ui/theme.css` | browser | CSS vars (`--sv-*`), dark/light via `data-theme`, accents via `data-accent`, signature utilities |
18
19
  | **Component CSS** | `@still-void/ui/style.css` | browser | All component classes (`sv-*`) |
19
- | **Recipes** | `@still-void/ui` | anywhere (RSC-safe) | Pure functions returning class strings: `postCard({ dense: true })` |
20
- | **Behaviors** | `@still-void/ui` | client | Vanilla DOM: `createThemeManager`, `createScrollSpy`, `createReadingProgress`, `copyToClipboard` |
21
- | **React (server-safe)** | `@still-void/ui/react` | server or client | Components without hooks — render inside Server Components |
22
- | **React (client)** | `@still-void/ui/react/client` | client | `'use client'` bundle: `ThemeProvider`, `ThemeToggle`, `CopyButton`, `TableOfContents`, `ReadingProgress`, hooks |
20
+ | **React (server-safe)** | `@still-void/ui/react` | server or client | Tokens, recipes, and components without hooks — render inside Server Components |
21
+ | **React (client)** | `@still-void/ui/react/client` | client | `'use client'` bundle: DOM behaviors (`createThemeManager`, `createScrollSpy`, `createReadingProgress`, `copyToClipboard`), `ThemeProvider`, `ThemeToggle`, `CopyButton`, `TableOfContents`, `ReadingProgress`, hooks |
23
22
 
24
23
  ## Install
25
24
 
@@ -27,7 +26,7 @@ The library is layered so the core never depends on any framework:
27
26
  npm install @still-void/ui
28
27
  ```
29
28
 
30
- React is an **optional** peer dependency — non-React consumers install nothing extra.
29
+ `react` and `react-dom` (>=18) are required peer dependencies.
31
30
 
32
31
  ## Usage — Next.js (App Router, Server Components)
33
32
 
@@ -97,30 +96,21 @@ import { CopyButton } from '@still-void/ui/react/client';
97
96
  Syntax highlighting is bring-your-own (by design — the prototype tokenizer was demo-only):
98
97
  render with Shiki on the server and pass the markup via `rendered`.
99
98
 
100
- ## Usage — any other framework (recipes + behaviors)
101
-
102
- ```ts
103
- import { postCard, postCardClasses, createThemeManager } from '@still-void/ui';
104
- ```
105
-
106
- ```html
107
- <!-- Angular -->
108
- <article [class]="postCard({ dense: true })">
109
- <h3 [class]="postCardClasses.title">{{ post.title }}</h3>
110
- </article>
111
- ```
99
+ ## Recipes and behaviors
112
100
 
113
- Behaviors are plain DOM and return a `destroy()`:
101
+ Recipes are pure class-name builders (server-safe, exported from `@still-void/ui/react`);
102
+ behaviors are plain DOM and return a `destroy()` (client-only, exported from
103
+ `@still-void/ui/react/client`):
114
104
 
115
105
  ```ts
106
+ import { postCard, postCardClasses } from '@still-void/ui/react';
107
+ import { createThemeManager } from '@still-void/ui/react/client';
108
+
116
109
  const theme = createThemeManager(); // drives data-theme / data-accent, persists to localStorage
117
110
  theme.toggleMode();
118
111
  theme.setAccent('violet');
119
112
  ```
120
113
 
121
- See [playground/index.html](playground/index.html) for the full catalog rendered with **zero
122
- framework code** — open it with `npm run playground` after `npm run build`.
123
-
124
114
  ## Fonts
125
115
 
126
116
  `theme.css` sets `--sv-font-display`/`--sv-font-body`/`--sv-font-mono` to Sora, Manrope and
@@ -156,6 +146,65 @@ before your chosen font loads — see [Fidelity rules](#fidelity-rules-do-not-re
156
146
  Server Components with no JS.
157
147
  - Everything is overridable via CSS vars (`--sv-accent`, `--sv-bg`, …). No `!important` anywhere.
158
148
 
149
+ ## shadcn/ui Components
150
+
151
+ A selection of **shadcn/ui** components has been ported to Still Void with the design system's palette, typography, and spacing applied. Both server-safe and client-only variants are available:
152
+
153
+ **Server-safe components** (import from `@still-void/ui/react`):
154
+ - `Button` — with variants (default, destructive, outline, secondary, ghost, link) and sizes (sm, default, lg, icon)
155
+ - `Card` — with header, title, description, content, footer
156
+ - `Input` — text input with placeholder, disabled, and focus states
157
+ - `Alert` — with optional title and description
158
+ - `Badge` — with variants (default, secondary, destructive, outline)
159
+
160
+ **Client-only components** (import from `@still-void/ui/react/client`):
161
+ - `Dialog` — modal with trigger, content, header, footer, title, description
162
+ - `Select` — dropdown with groups, labels, and scroll
163
+ - `Dropdown` — menu with items, checkboxes, radio groups, labels, separators
164
+ - `Tabs` — tabbed interface with triggers and content
165
+ - `Tooltip` — positioned tooltip with provider
166
+
167
+ ### Usage
168
+
169
+ ```tsx
170
+ // Server Component
171
+ import { Button, Card, CardHeader, CardTitle, CardContent } from '@still-void/ui/react';
172
+
173
+ export default function MyPage() {
174
+ return (
175
+ <Card>
176
+ <CardHeader>
177
+ <CardTitle>Settings</CardTitle>
178
+ </CardHeader>
179
+ <CardContent>
180
+ <Button>Save</Button>
181
+ </CardContent>
182
+ </Card>
183
+ );
184
+ }
185
+ ```
186
+
187
+ ```tsx
188
+ // Client Component ('use client')
189
+ import { Dialog, DialogTrigger, DialogContent } from '@still-void/ui/react/client';
190
+ import { Button } from '@still-void/ui/react';
191
+
192
+ export function SettingsDialog() {
193
+ return (
194
+ <Dialog>
195
+ <DialogTrigger asChild>
196
+ <Button>Open Settings</Button>
197
+ </DialogTrigger>
198
+ <DialogContent>
199
+ {/* modal content */}
200
+ </DialogContent>
201
+ </Dialog>
202
+ );
203
+ }
204
+ ```
205
+
206
+ **Note:** Tailwind CSS is now a peer dependency when using shadcn/ui components. Configure your `tailwind.config.ts` to extend Still Void's tokens (see [DESIGN.md](DESIGN.md) for the full config).
207
+
159
208
  ## Fidelity rules (do not regress)
160
209
 
161
210
  - Color values (hex/oklch) are literal from the spec — never rounded.