@still-void/ui 1.1.1 → 2.0.1
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 +18 -0
- package/README.md +77 -29
- package/dist/react/client/index.cjs +492 -3
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +141 -7
- package/dist/react/client/index.d.ts +141 -7
- package/dist/react/client/index.js +434 -3
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +467 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +401 -23
- package/dist/react/index.d.ts +401 -23
- package/dist/react/index.js +387 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +19 -24
- package/dist/article-Dl8rGW5l.d.cts +0 -177
- package/dist/article-Dl8rGW5l.d.ts +0 -177
- package/dist/index.cjs +0 -639
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -248
- package/dist/index.d.ts +0 -248
- package/dist/index.js +0 -551
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @still-void/ui
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#8](https://github.com/KalleoPinheiro/still-void/pull/8) [`854f674`](https://github.com/KalleoPinheiro/still-void/commit/854f6743ce2b1f258681fcb80c7724575255d93d) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Refresh README to match the v2.0.0 shape: correct test count (31 → 320), remove the dead `npm run playground` script reference (the framework-free catalog was removed with the core entry point), and correct the note about Tailwind CSS — it's a required app dependency for shadcn/ui components, not a declared peer dependency of this package.
|
|
8
|
+
|
|
9
|
+
## 2.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
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)! - **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`.
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#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.
|
|
18
|
+
|
|
19
|
+
- [#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.
|
|
20
|
+
|
|
3
21
|
## 1.1.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,23 +3,22 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@still-void/ui)
|
|
4
4
|
[](https://github.com/KalleoPinheiro/still-void/actions/workflows/ci.yml)
|
|
5
5
|
|
|
6
|
-
**Still Void** design system
|
|
7
|
-
`blog.kalleopinheiro.dev` prototype.
|
|
8
|
-
|
|
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
|
-
| **
|
|
20
|
-
| **
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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:** shadcn/ui components use Tailwind utility classes, so your app needs Tailwind CSS installed and configured 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.
|
|
@@ -176,10 +225,9 @@ before your chosen font loads — see [Fidelity rules](#fidelity-rules-do-not-re
|
|
|
176
225
|
|
|
177
226
|
```sh
|
|
178
227
|
npm run build # tsup (ESM + CJS + .d.ts) + CSS to dist/
|
|
179
|
-
npm test # vitest (
|
|
228
|
+
npm test # vitest (320 tests)
|
|
180
229
|
npm run typecheck # tsc --noEmit (strict)
|
|
181
230
|
npm run lint:package # publint + are-the-types-wrong on the packed tarball
|
|
182
|
-
npm run playground # serve the framework-free catalog
|
|
183
231
|
npm run storybook # component catalog at localhost:6006
|
|
184
232
|
npm run build-storybook # static Storybook build → storybook-static/
|
|
185
233
|
npm run changeset # record a change for the next release
|