@still-void/ui 1.1.0 → 1.1.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +23 -5
  3. package/package.json +60 -19
package/CHANGELOG.md ADDED
@@ -0,0 +1,55 @@
1
+ # @still-void/ui
2
+
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2](https://github.com/KalleoPinheiro/still-void/pull/2) [`7001676`](https://github.com/KalleoPinheiro/still-void/commit/7001676e20e9dd72269d347826d0546d25fefde8) Thanks [@KalleoPinheiro](https://github.com/KalleoPinheiro)! - Fix the types shipped to CommonJS consumers. Every export subpath advertised a single
8
+ `types` entry pointing at the ESM `.d.ts`, so anything using `require('@still-void/ui')`
9
+ resolved ESM type declarations against a CommonJS runtime file (attw: "Masquerading as
10
+ ESM"), and `@still-void/ui/react` / `@still-void/ui/react/client` resolved to nothing at
11
+ all under the legacy `node10` module resolution. `exports` now carries per-condition
12
+ `types` (`.d.ts` for `import`, the already-built `.d.cts` for `require`), plus
13
+ `typesVersions` for `node10` consumers and a `./package.json` export.
14
+
15
+ ## 1.1.0
16
+
17
+ ### Minor Changes
18
+
19
+ - feat(react): add ThemeScript to prevent flash of wrong theme on load
20
+
21
+ feat(tokens): WCAG AA accent/semantic color layer + z-index scale
22
+
23
+ fix(security): escape < in ThemeScript's embedded JSON to prevent </script> breakout
24
+
25
+ fix(storybook): apply sv-root theme class in preview decorator
26
+
27
+ fix(a11y): keyboard-operable CategoryPill + guard color resolvers
28
+
29
+ fix(a11y): CSS accessibility & consistency pass
30
+
31
+ fix(theme): remove render-blocking Google Fonts @import
32
+
33
+ perf(behaviors): rAF-throttle reading progress, quiet ARIA spam
34
+
35
+ ci: add GitHub Actions workflow for typecheck/test/build
36
+
37
+ ## 1.0.0
38
+
39
+ ### Major Changes
40
+
41
+ - ds first version
42
+
43
+ ## 0.1.0
44
+
45
+ Initial extraction from the `blog.kalleopinheiro.dev` prototype.
46
+
47
+ - Typed design tokens: colors (dark/light + 4 oklch accents), typography (Sora/Manrope/JetBrains Mono), spacing 4–72px, radii 6/8/12/16/full, motion easing `cubic-bezier(.3,.7,.4,1)`.
48
+ - `theme.css`: CSS vars with `data-theme` / `data-accent` switching (Server Component safe) and signature utilities (`.sv-gradient-border`, `.sv-card-hover`, `.sv-skeleton`, `.sv-glass`).
49
+ - `style.css`: full component styles (`sv-*` classes).
50
+ - Framework-agnostic recipes (class-name builders) for Header, Logo, Footer, CategoryPill, PostCard, FeaturedPostCard, PostGrid, Layout, Sidebar, Hero, Skeleton, CodeBlock, Callout, TableOfContents, ReadingProgress, ArticleHeader, Prose.
51
+ - Vanilla behaviors: `createThemeManager`, `createScrollSpy`, `createReadingProgress`, `copyToClipboard`.
52
+ - React adapter: server-safe components (`@still-void/ui/react`) + client bundle (`@still-void/ui/react/client`) with `ThemeProvider`, `ThemeToggle`, `CopyButton`, `TableOfContents`, `ReadingProgress`, `useScrollSpy`, `useReadingProgress`, `useTheme`.
53
+ - Build: tsup (ESM + CJS + `.d.ts`), `'use client'` banner on the client entry, CSS exported as `./theme.css` and `./style.css`.
54
+ - Tests: 31 vitest tests (recipes, theme manager, scroll spy, React components incl. copy button feedback).
55
+ - Playground: framework-free HTML catalog under `playground/`.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @still-void/ui
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@still-void/ui?color=6b5bd6)](https://www.npmjs.com/package/@still-void/ui)
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
+
3
6
  **Still Void** design system as a framework-agnostic TypeScript library — extracted from the
4
7
  `blog.kalleopinheiro.dev` prototype. Works with React, Angular, Vue, or plain HTML, with
5
8
  first-class support for **Next.js Server Components**.
@@ -175,16 +178,31 @@ before your chosen font loads — see [Fidelity rules](#fidelity-rules-do-not-re
175
178
  npm run build # tsup (ESM + CJS + .d.ts) + CSS to dist/
176
179
  npm test # vitest (31 tests)
177
180
  npm run typecheck # tsc --noEmit (strict)
181
+ npm run lint:package # publint + are-the-types-wrong on the packed tarball
178
182
  npm run playground # serve the framework-free catalog
179
183
  npm run storybook # component catalog at localhost:6006
180
184
  npm run build-storybook # static Storybook build → storybook-static/
181
185
  npm run changeset # record a change for the next release
182
- npm run version # apply pending changesets, bump version, update CHANGELOG
183
- npm run release # build + publish to npm
186
+ npm run version-packages # apply pending changesets, bump version, update CHANGELOG (CI does this)
187
+ npm run release # build + publish to npm (CI does this)
184
188
  ```
185
189
 
186
190
  ## Versioning
187
191
 
188
- Releases are managed with [Changesets](https://github.com/changesets/changesets). After a
189
- change that should ship in the next version, run `npm run changeset` and describe it — the
190
- changelog and version bump are generated from these entries, not written by hand.
192
+ Releases are managed with [Changesets](https://github.com/changesets/changesets) and are
193
+ fully automated — nobody publishes from a laptop:
194
+
195
+ 1. A pull request that touches `src/` or `scripts/` must carry a changeset
196
+ (`npm run changeset`); CI fails without one.
197
+ 2. Merging into `main` opens a **`chore: version packages`** pull request with the version
198
+ bump and the generated `CHANGELOG.md`.
199
+ 3. Merging *that* publishes to npm with
200
+ [provenance](https://docs.npmjs.com/generating-provenance-statements), tags `v<version>`,
201
+ creates the GitHub release and redeploys Storybook.
202
+
203
+ The changelog and the version are generated from changeset entries, never written by hand.
204
+ Unreleased changes can be tried out from a `canary` snapshot before they ship.
205
+
206
+ Bump levels for a design system (what counts as breaking, and why a corrected token is a
207
+ patch while a redesigned one is a major) are documented in
208
+ [CONTRIBUTING.md](CONTRIBUTING.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-void/ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Still Void design system — framework-agnostic TypeScript core (tokens, CSS, recipes, behaviors) with an optional React adapter compatible with Next.js Server Components.",
5
5
  "license": "MIT",
6
6
  "author": "Kalleo Pinheiro",
@@ -13,12 +13,22 @@
13
13
  "server-components",
14
14
  "typescript"
15
15
  ],
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/KalleoPinheiro/still-void.git"
19
+ },
20
+ "bugs": {
21
+ "url": "https://github.com/KalleoPinheiro/still-void/issues"
22
+ },
23
+ "homepage": "https://github.com/KalleoPinheiro/still-void#readme",
16
24
  "publishConfig": {
17
- "access": "public"
25
+ "access": "public",
26
+ "provenance": true
18
27
  },
19
28
  "engines": {
20
29
  "node": ">=18"
21
30
  },
31
+ "packageManager": "npm@10.9.7",
22
32
  "type": "module",
23
33
  "sideEffects": [
24
34
  "*.css"
@@ -28,25 +38,52 @@
28
38
  "types": "./dist/index.d.ts",
29
39
  "exports": {
30
40
  ".": {
31
- "types": "./dist/index.d.ts",
32
- "import": "./dist/index.js",
33
- "require": "./dist/index.cjs"
41
+ "import": {
42
+ "types": "./dist/index.d.ts",
43
+ "default": "./dist/index.js"
44
+ },
45
+ "require": {
46
+ "types": "./dist/index.d.cts",
47
+ "default": "./dist/index.cjs"
48
+ }
34
49
  },
35
50
  "./react": {
36
- "types": "./dist/react/index.d.ts",
37
- "import": "./dist/react/index.js",
38
- "require": "./dist/react/index.cjs"
51
+ "import": {
52
+ "types": "./dist/react/index.d.ts",
53
+ "default": "./dist/react/index.js"
54
+ },
55
+ "require": {
56
+ "types": "./dist/react/index.d.cts",
57
+ "default": "./dist/react/index.cjs"
58
+ }
39
59
  },
40
60
  "./react/client": {
41
- "types": "./dist/react/client/index.d.ts",
42
- "import": "./dist/react/client/index.js",
43
- "require": "./dist/react/client/index.cjs"
61
+ "import": {
62
+ "types": "./dist/react/client/index.d.ts",
63
+ "default": "./dist/react/client/index.js"
64
+ },
65
+ "require": {
66
+ "types": "./dist/react/client/index.d.cts",
67
+ "default": "./dist/react/client/index.cjs"
68
+ }
44
69
  },
45
70
  "./theme.css": "./dist/theme.css",
46
- "./style.css": "./dist/style.css"
71
+ "./style.css": "./dist/style.css",
72
+ "./package.json": "./package.json"
73
+ },
74
+ "typesVersions": {
75
+ "*": {
76
+ "react": [
77
+ "./dist/react/index.d.ts"
78
+ ],
79
+ "react/client": [
80
+ "./dist/react/client/index.d.ts"
81
+ ]
82
+ }
47
83
  },
48
84
  "files": [
49
- "dist"
85
+ "dist",
86
+ "CHANGELOG.md"
50
87
  ],
51
88
  "scripts": {
52
89
  "build": "tsup && npm run build:css",
@@ -55,9 +92,10 @@
55
92
  "test": "vitest run",
56
93
  "test:watch": "vitest",
57
94
  "typecheck": "tsc --noEmit",
95
+ "lint:package": "publint --strict && attw --pack . --exclude-entrypoints theme.css style.css",
58
96
  "playground": "npx serve .",
59
97
  "changeset": "changeset",
60
- "version": "changeset version",
98
+ "version-packages": "changeset version && npm install --package-lock-only --ignore-scripts",
61
99
  "release": "npm run build && changeset publish",
62
100
  "storybook": "storybook dev -p 6006",
63
101
  "build-storybook": "storybook build"
@@ -75,20 +113,23 @@
75
113
  }
76
114
  },
77
115
  "devDependencies": {
116
+ "@arethetypeswrong/cli": "^0.18.5",
117
+ "@changesets/changelog-github": "^0.7.0",
78
118
  "@changesets/cli": "^2.31.1",
119
+ "@storybook/addon-a11y": "^10.5.2",
120
+ "@storybook/addon-docs": "^10.5.2",
121
+ "@storybook/react-vite": "^10.5.2",
79
122
  "@testing-library/jest-dom": "^6.9.1",
80
123
  "@testing-library/react": "^16.3.2",
81
124
  "@types/react": "^19",
82
125
  "@types/react-dom": "^19",
83
126
  "jsdom": "^29.1.1",
127
+ "publint": "^0.3.22",
84
128
  "react": "19.2.4",
85
129
  "react-dom": "19.2.4",
130
+ "storybook": "^10.5.2",
86
131
  "tsup": "^8.3.5",
87
132
  "typescript": "^5",
88
- "vitest": "^4.1.10",
89
- "storybook": "^10.5.2",
90
- "@storybook/react-vite": "^10.5.2",
91
- "@storybook/addon-a11y": "^10.5.2",
92
- "@storybook/addon-docs": "^10.5.2"
133
+ "vitest": "^4.1.10"
93
134
  }
94
135
  }