@still-void/ui 1.1.0 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@still-void/ui",
3
- "version": "1.1.0",
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.",
3
+ "version": "2.0.0",
4
+ "description": "Still Void design system — React/Next.js design system with a server-safe entry and a client-only entry, built on shadcn/ui.",
5
5
  "license": "MIT",
6
6
  "author": "Kalleo Pinheiro",
7
7
  "keywords": [
@@ -13,40 +13,64 @@
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"
25
35
  ],
26
- "main": "./dist/index.cjs",
27
- "module": "./dist/index.js",
28
- "types": "./dist/index.d.ts",
29
36
  "exports": {
30
- ".": {
31
- "types": "./dist/index.d.ts",
32
- "import": "./dist/index.js",
33
- "require": "./dist/index.cjs"
34
- },
35
37
  "./react": {
36
- "types": "./dist/react/index.d.ts",
37
- "import": "./dist/react/index.js",
38
- "require": "./dist/react/index.cjs"
38
+ "import": {
39
+ "types": "./dist/react/index.d.ts",
40
+ "default": "./dist/react/index.js"
41
+ },
42
+ "require": {
43
+ "types": "./dist/react/index.d.cts",
44
+ "default": "./dist/react/index.cjs"
45
+ }
39
46
  },
40
47
  "./react/client": {
41
- "types": "./dist/react/client/index.d.ts",
42
- "import": "./dist/react/client/index.js",
43
- "require": "./dist/react/client/index.cjs"
48
+ "import": {
49
+ "types": "./dist/react/client/index.d.ts",
50
+ "default": "./dist/react/client/index.js"
51
+ },
52
+ "require": {
53
+ "types": "./dist/react/client/index.d.cts",
54
+ "default": "./dist/react/client/index.cjs"
55
+ }
44
56
  },
45
57
  "./theme.css": "./dist/theme.css",
46
- "./style.css": "./dist/style.css"
58
+ "./style.css": "./dist/style.css",
59
+ "./package.json": "./package.json"
60
+ },
61
+ "typesVersions": {
62
+ "*": {
63
+ "react": [
64
+ "./dist/react/index.d.ts"
65
+ ],
66
+ "react/client": [
67
+ "./dist/react/client/index.d.ts"
68
+ ]
69
+ }
47
70
  },
48
71
  "files": [
49
- "dist"
72
+ "dist",
73
+ "CHANGELOG.md"
50
74
  ],
51
75
  "scripts": {
52
76
  "build": "tsup && npm run build:css",
@@ -54,10 +78,11 @@
54
78
  "dev": "tsup --watch",
55
79
  "test": "vitest run",
56
80
  "test:watch": "vitest",
81
+ "test:coverage": "vitest run --coverage",
57
82
  "typecheck": "tsc --noEmit",
58
- "playground": "npx serve .",
83
+ "lint:package": "publint --strict && attw --pack . --exclude-entrypoints theme.css style.css",
59
84
  "changeset": "changeset",
60
- "version": "changeset version",
85
+ "version-packages": "changeset version && npm install --package-lock-only --ignore-scripts",
61
86
  "release": "npm run build && changeset publish",
62
87
  "storybook": "storybook dev -p 6006",
63
88
  "build-storybook": "storybook build"
@@ -66,29 +91,40 @@
66
91
  "react": ">=18",
67
92
  "react-dom": ">=18"
68
93
  },
69
- "peerDependenciesMeta": {
70
- "react": {
71
- "optional": true
72
- },
73
- "react-dom": {
74
- "optional": true
75
- }
76
- },
77
94
  "devDependencies": {
95
+ "@arethetypeswrong/cli": "^0.18.5",
96
+ "@changesets/changelog-github": "^0.7.0",
78
97
  "@changesets/cli": "^2.31.1",
98
+ "@storybook/addon-a11y": "^10.5.2",
99
+ "@storybook/addon-docs": "^10.5.2",
100
+ "@storybook/react-vite": "^10.5.2",
79
101
  "@testing-library/jest-dom": "^6.9.1",
80
102
  "@testing-library/react": "^16.3.2",
81
103
  "@types/react": "^19",
82
104
  "@types/react-dom": "^19",
105
+ "@vitest/coverage-v8": "^4.1.10",
106
+ "autoprefixer": "^10.5.4",
83
107
  "jsdom": "^29.1.1",
108
+ "postcss": "^8.5.26",
109
+ "publint": "^0.3.22",
84
110
  "react": "19.2.4",
85
111
  "react-dom": "19.2.4",
112
+ "shadcn": "^4.18.0",
113
+ "storybook": "^10.5.2",
114
+ "tailwindcss": "^4.3.3",
86
115
  "tsup": "^8.3.5",
87
116
  "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"
117
+ "vitest": "^4.1.10"
118
+ },
119
+ "dependencies": {
120
+ "@radix-ui/react-alert-dialog": "^1.1.23",
121
+ "@radix-ui/react-dialog": "^1.1.23",
122
+ "@radix-ui/react-dropdown-menu": "^2.1.24",
123
+ "@radix-ui/react-primitive": "^2.1.10",
124
+ "@radix-ui/react-select": "^2.3.7",
125
+ "@radix-ui/react-tabs": "^1.1.21",
126
+ "@radix-ui/react-tooltip": "^1.2.16",
127
+ "clsx": "^2.1.1",
128
+ "tailwind-merge": "^3.6.0"
93
129
  }
94
130
  }
@@ -1,177 +0,0 @@
1
- /**
2
- * Still Void color tokens.
3
- * Values ported literally from the Still Void spec (blog.kalleopinheiro.dev).
4
- * Do not round or "approximate" — fidelity rule.
5
- */
6
- declare const colors: {
7
- readonly dark: {
8
- readonly bg: "#0A0A0C";
9
- readonly bgElev: "#111114";
10
- readonly surface: "#16161B";
11
- readonly surface2: "#1C1C22";
12
- readonly border: "rgba(255,255,255,0.08)";
13
- readonly borderStrong: "rgba(255,255,255,0.14)";
14
- readonly text: "#EDEDF0";
15
- readonly text2: "#8B8B96";
16
- readonly text3: "#83838F";
17
- };
18
- readonly light: {
19
- readonly bg: "#F7F7F5";
20
- readonly bgElev: "#FFFFFF";
21
- readonly surface: "#FFFFFF";
22
- readonly surface2: "#F2F2EF";
23
- readonly border: "rgba(0,0,0,0.08)";
24
- readonly borderStrong: "rgba(0,0,0,0.14)";
25
- readonly text: "#16161B";
26
- readonly text2: "#5A5A66";
27
- readonly text3: "#6D6D76";
28
- };
29
- };
30
- declare const accents: {
31
- readonly cyan: "oklch(0.78 0.12 210)";
32
- readonly violet: "oklch(0.72 0.14 295)";
33
- readonly mint: "oklch(0.78 0.10 160)";
34
- readonly amber: "oklch(0.78 0.12 75)";
35
- };
36
- /**
37
- * Text/UI-safe accent variants ("ink"). `accents` above is tuned for surface use
38
- * (dots, gradient border, progress bar) and fails WCAG AA as text on light
39
- * backgrounds (e.g. cyan is ~1.8:1 on white). These preserve the dark-mode
40
- * values (already ≥6.9:1) and darken each hue for light mode to clear 4.5:1
41
- * against both light surfaces. Used anywhere the accent colors text: prose
42
- * links, active TOC state, callout labels, hero eyebrow, copy-success, focus ring.
43
- */
44
- declare const accentsInk: {
45
- readonly dark: {
46
- readonly cyan: "oklch(0.78 0.12 210)";
47
- readonly violet: "oklch(0.72 0.14 295)";
48
- readonly mint: "oklch(0.78 0.10 160)";
49
- readonly amber: "oklch(0.78 0.12 75)";
50
- };
51
- readonly light: {
52
- readonly cyan: "oklch(0.525 0.09 210)";
53
- readonly violet: "oklch(0.545 0.14 295)";
54
- readonly mint: "oklch(0.52 0.1 160)";
55
- readonly amber: "oklch(0.535 0.11 75)";
56
- };
57
- };
58
- /**
59
- * Semantic state colors — independent of the switchable `accent`, so a
60
- * consumer picking `data-accent="amber"` never collides a warning with the
61
- * site accent. Fixed per meaning in both surface and text/UI ("ink") forms,
62
- * same split as `accents`/`accentsInk`.
63
- */
64
- declare const semantic: {
65
- readonly dark: {
66
- readonly danger: "oklch(0.68 0.19 25)";
67
- readonly success: "oklch(0.75 0.15 150)";
68
- readonly info: "oklch(0.78 0.12 210)";
69
- readonly warning: "oklch(0.78 0.12 75)";
70
- };
71
- readonly light: {
72
- readonly danger: "oklch(0.68 0.19 25)";
73
- readonly success: "oklch(0.75 0.15 150)";
74
- readonly info: "oklch(0.78 0.12 210)";
75
- readonly warning: "oklch(0.78 0.12 75)";
76
- };
77
- };
78
- declare const semanticInk: {
79
- readonly dark: {
80
- readonly danger: "oklch(0.68 0.19 25)";
81
- readonly success: "oklch(0.75 0.15 150)";
82
- readonly info: "oklch(0.78 0.12 210)";
83
- readonly warning: "oklch(0.78 0.12 75)";
84
- };
85
- readonly light: {
86
- readonly danger: "oklch(0.555 0.19 25)";
87
- readonly success: "oklch(0.515 0.14 150)";
88
- readonly info: "oklch(0.525 0.09 210)";
89
- readonly warning: "oklch(0.535 0.11 75)";
90
- };
91
- };
92
- type ThemeMode = keyof typeof colors;
93
- type AccentName = keyof typeof accents;
94
- type ColorScheme = (typeof colors)[ThemeMode];
95
- type SemanticName = keyof (typeof semantic)['dark'];
96
- declare const themeModes: ThemeMode[];
97
- declare const accentNames: AccentName[];
98
- declare const DEFAULT_MODE: ThemeMode;
99
- declare const DEFAULT_ACCENT: AccentName;
100
-
101
- /**
102
- * Blog categories from the prototype. Categories render as a colored dot + label
103
- * (never an emoji). The pill also accepts any CSS color for whitelabel use.
104
- */
105
- type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';
106
- declare const defaultCategoryColors: Record<CategoryName, AccentName>;
107
- /** Resolve an accent name or raw CSS color to a CSS color value. */
108
- declare function resolveAccentColor(color: AccentName | (string & {})): string;
109
- /** Resolve a category name, accent name, or raw CSS color to a CSS color value. */
110
- declare function resolveCategoryColor(color: CategoryName | AccentName | (string & {})): string;
111
-
112
- /** Data shape consumed by PostCard / FeaturedPostCard. The library never ships mock data. */
113
- interface PostSummary {
114
- title: string;
115
- href: string;
116
- excerpt?: string;
117
- date?: string;
118
- readMinutes?: number;
119
- category?: {
120
- label: string;
121
- /** Accent token name, known category, or any CSS color. */
122
- color?: AccentName | CategoryName | (string & {});
123
- };
124
- }
125
- interface TocItem {
126
- id: string;
127
- label: string;
128
- depth?: 2 | 3;
129
- }
130
- interface NavItem {
131
- label: string;
132
- href: string;
133
- active?: boolean;
134
- }
135
-
136
- /**
137
- * Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,
138
- * ArticleHeader, Prose. Pure functions — Server Component safe.
139
- */
140
- declare function codeBlock(): string;
141
- declare const codeBlockClasses: {
142
- readonly header: "sv-code-block__header";
143
- readonly pre: "sv-code-block__pre";
144
- readonly copy: "sv-code-block__copy";
145
- readonly copyCopied: string;
146
- };
147
- type CalloutKind = 'note' | 'warn' | 'aha';
148
- declare function callout(kind: CalloutKind): string;
149
- declare const calloutClasses: {
150
- readonly label: "sv-callout__label";
151
- };
152
- declare const calloutLabels: Record<CalloutKind, string>;
153
- declare function tableOfContents(): string;
154
- interface TocLinkOptions {
155
- active?: boolean;
156
- /** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */
157
- depth?: 2 | 3;
158
- }
159
- declare function tocLink(options?: TocLinkOptions): string;
160
- declare function readingProgress(): string;
161
- declare const readingProgressClasses: {
162
- readonly bar: "sv-reading-progress__bar";
163
- };
164
- /** CSS var read by `.sv-reading-progress__bar` (0 → 1). */
165
- declare const READING_PROGRESS_VAR = "--sv-reading-progress";
166
- declare function articleHeader(): string;
167
- declare const articleHeaderClasses: {
168
- readonly title: "sv-article-header__title";
169
- readonly meta: "sv-article-header__meta";
170
- readonly author: "sv-article-header__author";
171
- };
172
- declare function prose(): string;
173
- declare const proseClasses: {
174
- readonly lead: "sv-prose__lead";
175
- };
176
-
177
- export { type AccentName as A, themeModes as B, type CalloutKind as C, DEFAULT_ACCENT as D, tocLink as E, type NavItem as N, type PostSummary as P, READING_PROGRESS_VAR as R, type SemanticName as S, type ThemeMode as T, type CategoryName as a, type ColorScheme as b, DEFAULT_MODE as c, type TocItem as d, type TocLinkOptions as e, accentNames as f, accents as g, accentsInk as h, articleHeader as i, articleHeaderClasses as j, callout as k, calloutClasses as l, calloutLabels as m, codeBlock as n, codeBlockClasses as o, colors as p, defaultCategoryColors as q, prose as r, proseClasses as s, readingProgress as t, readingProgressClasses as u, resolveAccentColor as v, resolveCategoryColor as w, semantic as x, semanticInk as y, tableOfContents as z };
@@ -1,177 +0,0 @@
1
- /**
2
- * Still Void color tokens.
3
- * Values ported literally from the Still Void spec (blog.kalleopinheiro.dev).
4
- * Do not round or "approximate" — fidelity rule.
5
- */
6
- declare const colors: {
7
- readonly dark: {
8
- readonly bg: "#0A0A0C";
9
- readonly bgElev: "#111114";
10
- readonly surface: "#16161B";
11
- readonly surface2: "#1C1C22";
12
- readonly border: "rgba(255,255,255,0.08)";
13
- readonly borderStrong: "rgba(255,255,255,0.14)";
14
- readonly text: "#EDEDF0";
15
- readonly text2: "#8B8B96";
16
- readonly text3: "#83838F";
17
- };
18
- readonly light: {
19
- readonly bg: "#F7F7F5";
20
- readonly bgElev: "#FFFFFF";
21
- readonly surface: "#FFFFFF";
22
- readonly surface2: "#F2F2EF";
23
- readonly border: "rgba(0,0,0,0.08)";
24
- readonly borderStrong: "rgba(0,0,0,0.14)";
25
- readonly text: "#16161B";
26
- readonly text2: "#5A5A66";
27
- readonly text3: "#6D6D76";
28
- };
29
- };
30
- declare const accents: {
31
- readonly cyan: "oklch(0.78 0.12 210)";
32
- readonly violet: "oklch(0.72 0.14 295)";
33
- readonly mint: "oklch(0.78 0.10 160)";
34
- readonly amber: "oklch(0.78 0.12 75)";
35
- };
36
- /**
37
- * Text/UI-safe accent variants ("ink"). `accents` above is tuned for surface use
38
- * (dots, gradient border, progress bar) and fails WCAG AA as text on light
39
- * backgrounds (e.g. cyan is ~1.8:1 on white). These preserve the dark-mode
40
- * values (already ≥6.9:1) and darken each hue for light mode to clear 4.5:1
41
- * against both light surfaces. Used anywhere the accent colors text: prose
42
- * links, active TOC state, callout labels, hero eyebrow, copy-success, focus ring.
43
- */
44
- declare const accentsInk: {
45
- readonly dark: {
46
- readonly cyan: "oklch(0.78 0.12 210)";
47
- readonly violet: "oklch(0.72 0.14 295)";
48
- readonly mint: "oklch(0.78 0.10 160)";
49
- readonly amber: "oklch(0.78 0.12 75)";
50
- };
51
- readonly light: {
52
- readonly cyan: "oklch(0.525 0.09 210)";
53
- readonly violet: "oklch(0.545 0.14 295)";
54
- readonly mint: "oklch(0.52 0.1 160)";
55
- readonly amber: "oklch(0.535 0.11 75)";
56
- };
57
- };
58
- /**
59
- * Semantic state colors — independent of the switchable `accent`, so a
60
- * consumer picking `data-accent="amber"` never collides a warning with the
61
- * site accent. Fixed per meaning in both surface and text/UI ("ink") forms,
62
- * same split as `accents`/`accentsInk`.
63
- */
64
- declare const semantic: {
65
- readonly dark: {
66
- readonly danger: "oklch(0.68 0.19 25)";
67
- readonly success: "oklch(0.75 0.15 150)";
68
- readonly info: "oklch(0.78 0.12 210)";
69
- readonly warning: "oklch(0.78 0.12 75)";
70
- };
71
- readonly light: {
72
- readonly danger: "oklch(0.68 0.19 25)";
73
- readonly success: "oklch(0.75 0.15 150)";
74
- readonly info: "oklch(0.78 0.12 210)";
75
- readonly warning: "oklch(0.78 0.12 75)";
76
- };
77
- };
78
- declare const semanticInk: {
79
- readonly dark: {
80
- readonly danger: "oklch(0.68 0.19 25)";
81
- readonly success: "oklch(0.75 0.15 150)";
82
- readonly info: "oklch(0.78 0.12 210)";
83
- readonly warning: "oklch(0.78 0.12 75)";
84
- };
85
- readonly light: {
86
- readonly danger: "oklch(0.555 0.19 25)";
87
- readonly success: "oklch(0.515 0.14 150)";
88
- readonly info: "oklch(0.525 0.09 210)";
89
- readonly warning: "oklch(0.535 0.11 75)";
90
- };
91
- };
92
- type ThemeMode = keyof typeof colors;
93
- type AccentName = keyof typeof accents;
94
- type ColorScheme = (typeof colors)[ThemeMode];
95
- type SemanticName = keyof (typeof semantic)['dark'];
96
- declare const themeModes: ThemeMode[];
97
- declare const accentNames: AccentName[];
98
- declare const DEFAULT_MODE: ThemeMode;
99
- declare const DEFAULT_ACCENT: AccentName;
100
-
101
- /**
102
- * Blog categories from the prototype. Categories render as a colored dot + label
103
- * (never an emoji). The pill also accepts any CSS color for whitelabel use.
104
- */
105
- type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';
106
- declare const defaultCategoryColors: Record<CategoryName, AccentName>;
107
- /** Resolve an accent name or raw CSS color to a CSS color value. */
108
- declare function resolveAccentColor(color: AccentName | (string & {})): string;
109
- /** Resolve a category name, accent name, or raw CSS color to a CSS color value. */
110
- declare function resolveCategoryColor(color: CategoryName | AccentName | (string & {})): string;
111
-
112
- /** Data shape consumed by PostCard / FeaturedPostCard. The library never ships mock data. */
113
- interface PostSummary {
114
- title: string;
115
- href: string;
116
- excerpt?: string;
117
- date?: string;
118
- readMinutes?: number;
119
- category?: {
120
- label: string;
121
- /** Accent token name, known category, or any CSS color. */
122
- color?: AccentName | CategoryName | (string & {});
123
- };
124
- }
125
- interface TocItem {
126
- id: string;
127
- label: string;
128
- depth?: 2 | 3;
129
- }
130
- interface NavItem {
131
- label: string;
132
- href: string;
133
- active?: boolean;
134
- }
135
-
136
- /**
137
- * Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,
138
- * ArticleHeader, Prose. Pure functions — Server Component safe.
139
- */
140
- declare function codeBlock(): string;
141
- declare const codeBlockClasses: {
142
- readonly header: "sv-code-block__header";
143
- readonly pre: "sv-code-block__pre";
144
- readonly copy: "sv-code-block__copy";
145
- readonly copyCopied: string;
146
- };
147
- type CalloutKind = 'note' | 'warn' | 'aha';
148
- declare function callout(kind: CalloutKind): string;
149
- declare const calloutClasses: {
150
- readonly label: "sv-callout__label";
151
- };
152
- declare const calloutLabels: Record<CalloutKind, string>;
153
- declare function tableOfContents(): string;
154
- interface TocLinkOptions {
155
- active?: boolean;
156
- /** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */
157
- depth?: 2 | 3;
158
- }
159
- declare function tocLink(options?: TocLinkOptions): string;
160
- declare function readingProgress(): string;
161
- declare const readingProgressClasses: {
162
- readonly bar: "sv-reading-progress__bar";
163
- };
164
- /** CSS var read by `.sv-reading-progress__bar` (0 → 1). */
165
- declare const READING_PROGRESS_VAR = "--sv-reading-progress";
166
- declare function articleHeader(): string;
167
- declare const articleHeaderClasses: {
168
- readonly title: "sv-article-header__title";
169
- readonly meta: "sv-article-header__meta";
170
- readonly author: "sv-article-header__author";
171
- };
172
- declare function prose(): string;
173
- declare const proseClasses: {
174
- readonly lead: "sv-prose__lead";
175
- };
176
-
177
- export { type AccentName as A, themeModes as B, type CalloutKind as C, DEFAULT_ACCENT as D, tocLink as E, type NavItem as N, type PostSummary as P, READING_PROGRESS_VAR as R, type SemanticName as S, type ThemeMode as T, type CategoryName as a, type ColorScheme as b, DEFAULT_MODE as c, type TocItem as d, type TocLinkOptions as e, accentNames as f, accents as g, accentsInk as h, articleHeader as i, articleHeaderClasses as j, callout as k, calloutClasses as l, calloutLabels as m, codeBlock as n, codeBlockClasses as o, colors as p, defaultCategoryColors as q, prose as r, proseClasses as s, readingProgress as t, readingProgressClasses as u, resolveAccentColor as v, resolveCategoryColor as w, semantic as x, semanticInk as y, tableOfContents as z };