@still-void/ui 1.0.0 → 1.1.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 +35 -2
- package/dist/article-Dl8rGW5l.d.cts +177 -0
- package/dist/article-Dl8rGW5l.d.ts +177 -0
- package/dist/index.cjs +142 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -24
- package/dist/index.d.ts +40 -24
- package/dist/index.js +136 -63
- package/dist/index.js.map +1 -1
- package/dist/react/client/index.cjs +49 -42
- package/dist/react/client/index.cjs.map +1 -1
- package/dist/react/client/index.d.cts +29 -7
- package/dist/react/client/index.d.ts +29 -7
- package/dist/react/client/index.js +49 -42
- package/dist/react/client/index.js.map +1 -1
- package/dist/react/index.cjs +99 -63
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +22 -5
- package/dist/react/index.d.ts +22 -5
- package/dist/react/index.js +98 -63
- package/dist/react/index.js.map +1 -1
- package/dist/style.css +309 -262
- package/dist/theme.css +161 -95
- package/package.json +1 -1
- package/dist/article-CNQxbFAz.d.cts +0 -120
- package/dist/article-CNQxbFAz.d.ts +0 -120
package/dist/theme.css
CHANGED
|
@@ -1,108 +1,163 @@
|
|
|
1
1
|
/* ============================================================
|
|
2
|
-
|
|
3
|
-
Import once: `import '@
|
|
2
|
+
Still Void — theme tokens
|
|
3
|
+
Import once: `import '@still-void/ui/theme.css'`
|
|
4
4
|
Theming is attribute-driven and therefore Server-Component
|
|
5
5
|
safe: render <html data-theme="dark" data-accent="cyan"> on
|
|
6
6
|
the server and no JS is required for correct first paint.
|
|
7
|
+
|
|
8
|
+
Fonts (Sora, Manrope, JetBrains Mono) are NOT loaded here. A
|
|
9
|
+
render-blocking @import of a third-party font stylesheet inside
|
|
10
|
+
this file would serialize "download theme.css" → "discover font
|
|
11
|
+
URLs" → "download fonts" on every consumer's critical path, and
|
|
12
|
+
forces a runtime dependency on Google's CDN. Load fonts yourself
|
|
13
|
+
— see the README's Fonts section for `next/font` and self-hosted
|
|
14
|
+
examples — the family names below already match what you load.
|
|
7
15
|
============================================================ */
|
|
8
|
-
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
|
|
9
16
|
|
|
10
17
|
:root {
|
|
11
18
|
/* dark is the default scheme */
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--
|
|
19
|
+
--sv-bg: #0a0a0c;
|
|
20
|
+
--sv-bg-elev: #111114;
|
|
21
|
+
--sv-surface: #16161b;
|
|
22
|
+
--sv-surface-2: #1c1c22;
|
|
23
|
+
--sv-border: rgba(255, 255, 255, 0.08);
|
|
24
|
+
--sv-border-strong: rgba(255, 255, 255, 0.14);
|
|
25
|
+
--sv-text: #ededf0;
|
|
26
|
+
--sv-text-2: #8b8b96;
|
|
20
27
|
/* WCAG AA fix: was #5a5a66 (~2.6:1 on surface) — text3 carries real copy, not decoration. */
|
|
21
|
-
--
|
|
22
|
-
|
|
23
|
-
/* accent palette */
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
28
|
+
--sv-text-3: #83838f;
|
|
29
|
+
|
|
30
|
+
/* accent palette — surface use (dots, gradient border, progress track). */
|
|
31
|
+
--sv-accent-cyan: oklch(0.78 0.12 210);
|
|
32
|
+
--sv-accent-violet: oklch(0.72 0.14 295);
|
|
33
|
+
--sv-accent-mint: oklch(0.78 0.1 160);
|
|
34
|
+
--sv-accent-amber: oklch(0.78 0.12 75);
|
|
35
|
+
--sv-accent: var(--sv-accent-cyan);
|
|
36
|
+
|
|
37
|
+
/* accent "ink" — text/UI-state use (links, active states, focus ring).
|
|
38
|
+
Dark mode: identical to the surface accent (already ≥6.9:1). Light mode
|
|
39
|
+
overrides these to a darker step of the same hue so text meets 4.5:1 —
|
|
40
|
+
see accentsInk in tokens/colors.ts for the derivation. */
|
|
41
|
+
--sv-accent-cyan-ink: var(--sv-accent-cyan);
|
|
42
|
+
--sv-accent-violet-ink: var(--sv-accent-violet);
|
|
43
|
+
--sv-accent-mint-ink: var(--sv-accent-mint);
|
|
44
|
+
--sv-accent-amber-ink: var(--sv-accent-amber);
|
|
45
|
+
--sv-accent-ink: var(--sv-accent-cyan-ink);
|
|
29
46
|
|
|
30
47
|
/* typography */
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--
|
|
34
|
-
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
39
|
-
--
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
48
|
+
--sv-font-display: 'Sora', ui-sans-serif, system-ui, sans-serif;
|
|
49
|
+
--sv-font-body: 'Manrope', ui-sans-serif, system-ui, sans-serif;
|
|
50
|
+
--sv-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
|
|
51
|
+
|
|
52
|
+
--sv-text-xs: 0.75rem;
|
|
53
|
+
--sv-text-sm: 0.8125rem;
|
|
54
|
+
--sv-text-base: 0.9375rem;
|
|
55
|
+
--sv-text-md: 1rem;
|
|
56
|
+
--sv-text-lg: 1.125rem;
|
|
57
|
+
--sv-text-xl: 1.375rem;
|
|
58
|
+
--sv-text-2xl: 1.75rem;
|
|
59
|
+
--sv-text-3xl: 2.25rem;
|
|
60
|
+
--sv-text-4xl: 2.75rem;
|
|
44
61
|
|
|
45
62
|
/* spacing 4→72px */
|
|
46
|
-
--
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
--
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--
|
|
63
|
+
--sv-space-1: 4px;
|
|
64
|
+
--sv-space-2: 8px;
|
|
65
|
+
--sv-space-3: 12px;
|
|
66
|
+
--sv-space-4: 16px;
|
|
67
|
+
--sv-space-5: 20px;
|
|
68
|
+
--sv-space-6: 24px;
|
|
69
|
+
--sv-space-8: 32px;
|
|
70
|
+
--sv-space-10: 40px;
|
|
71
|
+
--sv-space-12: 48px;
|
|
72
|
+
--sv-space-14: 56px;
|
|
73
|
+
--sv-space-16: 64px;
|
|
74
|
+
--sv-space-18: 72px;
|
|
58
75
|
|
|
59
76
|
/* radii */
|
|
60
|
-
--
|
|
61
|
-
--
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
77
|
+
--sv-radius-sm: 6px;
|
|
78
|
+
--sv-radius-md: 8px;
|
|
79
|
+
--sv-radius-lg: 12px;
|
|
80
|
+
--sv-radius-xl: 16px;
|
|
81
|
+
--sv-radius-full: 9999px;
|
|
65
82
|
|
|
66
83
|
/* motion */
|
|
67
|
-
--
|
|
68
|
-
--
|
|
69
|
-
--
|
|
70
|
-
--
|
|
84
|
+
--sv-ease-hover: cubic-bezier(0.3, 0.7, 0.4, 1);
|
|
85
|
+
--sv-duration-fast: 120ms;
|
|
86
|
+
--sv-duration-base: 200ms;
|
|
87
|
+
--sv-duration-slow: 320ms;
|
|
88
|
+
|
|
89
|
+
/* z-index scale — named steps, never arbitrary values like 999/9999. */
|
|
90
|
+
--sv-z-dropdown: 10;
|
|
91
|
+
--sv-z-sticky: 20;
|
|
92
|
+
--sv-z-backdrop: 30;
|
|
93
|
+
--sv-z-modal: 40;
|
|
94
|
+
--sv-z-toast: 50;
|
|
95
|
+
--sv-z-tooltip: 60;
|
|
96
|
+
|
|
97
|
+
/* semantic state colors — fixed regardless of the active site accent. */
|
|
98
|
+
--sv-danger: oklch(0.68 0.19 25);
|
|
99
|
+
--sv-success: oklch(0.75 0.15 150);
|
|
100
|
+
--sv-info: oklch(0.78 0.12 210);
|
|
101
|
+
--sv-warning: oklch(0.78 0.12 75);
|
|
102
|
+
--sv-danger-ink: var(--sv-danger);
|
|
103
|
+
--sv-success-ink: var(--sv-success);
|
|
104
|
+
--sv-info-ink: var(--sv-info);
|
|
105
|
+
--sv-warning-ink: var(--sv-warning);
|
|
71
106
|
|
|
72
107
|
color-scheme: dark;
|
|
73
108
|
}
|
|
74
109
|
|
|
75
110
|
[data-theme='light'] {
|
|
76
|
-
--
|
|
77
|
-
--
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
--
|
|
81
|
-
--
|
|
82
|
-
--
|
|
83
|
-
--
|
|
84
|
-
/* WCAG AA fix: was #8b8b96 (~3.1:1 on white)
|
|
85
|
-
|
|
111
|
+
--sv-bg: #f7f7f5;
|
|
112
|
+
--sv-bg-elev: #ffffff;
|
|
113
|
+
--sv-surface: #ffffff;
|
|
114
|
+
--sv-surface-2: #f2f2ef;
|
|
115
|
+
--sv-border: rgba(0, 0, 0, 0.08);
|
|
116
|
+
--sv-border-strong: rgba(0, 0, 0, 0.14);
|
|
117
|
+
--sv-text: #16161b;
|
|
118
|
+
--sv-text-2: #5a5a66;
|
|
119
|
+
/* WCAG AA fix: was #8b8b96 (~3.1:1 on white). #6f6f78 (a first fix) cleared
|
|
120
|
+
white/paper but was ~4.44:1 on surface2 (#f2f2ef) — still a failure. */
|
|
121
|
+
--sv-text-3: #6d6d76;
|
|
86
122
|
color-scheme: light;
|
|
123
|
+
|
|
124
|
+
/* WCAG AA fix: the dark-mode accent hues read 1.8–2.6:1 as text on light
|
|
125
|
+
surfaces. Darkened per-hue steps restore ≥4.5:1 without touching the
|
|
126
|
+
canonical (dark-mode, surface-use) accent values above. */
|
|
127
|
+
--sv-accent-cyan-ink: oklch(0.525 0.09 210);
|
|
128
|
+
--sv-accent-violet-ink: oklch(0.545 0.14 295);
|
|
129
|
+
--sv-accent-mint-ink: oklch(0.52 0.1 160);
|
|
130
|
+
--sv-accent-amber-ink: oklch(0.535 0.11 75);
|
|
131
|
+
|
|
132
|
+
/* Same WCAG AA fix, applied to the semantic state colors. */
|
|
133
|
+
--sv-danger-ink: oklch(0.555 0.19 25);
|
|
134
|
+
--sv-success-ink: oklch(0.515 0.14 150);
|
|
135
|
+
--sv-info-ink: oklch(0.525 0.09 210);
|
|
136
|
+
--sv-warning-ink: oklch(0.535 0.11 75);
|
|
87
137
|
}
|
|
88
138
|
|
|
89
139
|
/* Accent switching is pure CSS — works in Server Components. */
|
|
90
140
|
[data-accent='cyan'] {
|
|
91
|
-
--
|
|
141
|
+
--sv-accent: var(--sv-accent-cyan);
|
|
142
|
+
--sv-accent-ink: var(--sv-accent-cyan-ink);
|
|
92
143
|
}
|
|
93
144
|
[data-accent='violet'] {
|
|
94
|
-
--
|
|
145
|
+
--sv-accent: var(--sv-accent-violet);
|
|
146
|
+
--sv-accent-ink: var(--sv-accent-violet-ink);
|
|
95
147
|
}
|
|
96
148
|
[data-accent='mint'] {
|
|
97
|
-
--
|
|
149
|
+
--sv-accent: var(--sv-accent-mint);
|
|
150
|
+
--sv-accent-ink: var(--sv-accent-mint-ink);
|
|
98
151
|
}
|
|
99
152
|
[data-accent='amber'] {
|
|
100
|
-
--
|
|
153
|
+
--sv-accent: var(--sv-accent-amber);
|
|
154
|
+
--sv-accent-ink: var(--sv-accent-amber-ink);
|
|
101
155
|
}
|
|
102
156
|
|
|
103
|
-
/* Visible keyboard focus everywhere — never removed without a replacement.
|
|
157
|
+
/* Visible keyboard focus everywhere — never removed without a replacement.
|
|
158
|
+
Uses the ink accent so the ring clears 3:1 (WCAG 1.4.11) in light mode too. */
|
|
104
159
|
:focus-visible {
|
|
105
|
-
outline: 2px solid var(--
|
|
160
|
+
outline: 2px solid var(--sv-accent-ink);
|
|
106
161
|
outline-offset: 2px;
|
|
107
162
|
}
|
|
108
163
|
|
|
@@ -110,14 +165,14 @@
|
|
|
110
165
|
Signature utilities
|
|
111
166
|
============================================================ */
|
|
112
167
|
|
|
113
|
-
/* .
|
|
168
|
+
/* .sv-gradient-border — the system's visual signature.
|
|
114
169
|
Never replace with box-shadow. */
|
|
115
|
-
.
|
|
170
|
+
.sv-gradient-border {
|
|
116
171
|
position: relative;
|
|
117
|
-
background: var(--
|
|
118
|
-
border-radius: var(--
|
|
172
|
+
background: var(--sv-surface);
|
|
173
|
+
border-radius: var(--sv-radius-lg);
|
|
119
174
|
}
|
|
120
|
-
.
|
|
175
|
+
.sv-gradient-border::before {
|
|
121
176
|
content: '';
|
|
122
177
|
position: absolute;
|
|
123
178
|
inset: 0;
|
|
@@ -125,10 +180,10 @@
|
|
|
125
180
|
padding: 1px;
|
|
126
181
|
background: linear-gradient(
|
|
127
182
|
135deg,
|
|
128
|
-
var(--
|
|
183
|
+
var(--sv-accent) 0%,
|
|
129
184
|
transparent 40%,
|
|
130
185
|
transparent 60%,
|
|
131
|
-
var(--
|
|
186
|
+
var(--sv-border-strong) 100%
|
|
132
187
|
);
|
|
133
188
|
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
134
189
|
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
@@ -138,29 +193,29 @@
|
|
|
138
193
|
}
|
|
139
194
|
|
|
140
195
|
/* Cards have no shadow — hover lifts via border/transform only. */
|
|
141
|
-
.
|
|
196
|
+
.sv-card-hover {
|
|
142
197
|
transition:
|
|
143
|
-
transform var(--
|
|
144
|
-
border-color var(--
|
|
145
|
-
background var(--
|
|
198
|
+
transform var(--sv-duration-base) var(--sv-ease-hover),
|
|
199
|
+
border-color var(--sv-duration-base) var(--sv-ease-hover),
|
|
200
|
+
background var(--sv-duration-base) var(--sv-ease-hover);
|
|
146
201
|
}
|
|
147
|
-
.
|
|
202
|
+
.sv-card-hover:hover {
|
|
148
203
|
transform: translateY(-2px);
|
|
149
|
-
border-color: var(--
|
|
204
|
+
border-color: var(--sv-border-strong);
|
|
150
205
|
}
|
|
151
206
|
|
|
152
|
-
.
|
|
207
|
+
.sv-skeleton {
|
|
153
208
|
background: linear-gradient(
|
|
154
209
|
90deg,
|
|
155
|
-
var(--
|
|
156
|
-
var(--
|
|
157
|
-
var(--
|
|
210
|
+
var(--sv-surface-2) 25%,
|
|
211
|
+
var(--sv-surface) 50%,
|
|
212
|
+
var(--sv-surface-2) 75%
|
|
158
213
|
);
|
|
159
214
|
background-size: 200% 100%;
|
|
160
|
-
animation:
|
|
161
|
-
border-radius: var(--
|
|
215
|
+
animation: sv-skeleton-shimmer 1.4s linear infinite;
|
|
216
|
+
border-radius: var(--sv-radius-md);
|
|
162
217
|
}
|
|
163
|
-
@keyframes
|
|
218
|
+
@keyframes sv-skeleton-shimmer {
|
|
164
219
|
from {
|
|
165
220
|
background-position: 200% 0;
|
|
166
221
|
}
|
|
@@ -169,20 +224,31 @@
|
|
|
169
224
|
}
|
|
170
225
|
}
|
|
171
226
|
|
|
172
|
-
.
|
|
173
|
-
background: color-mix(in srgb, var(--
|
|
227
|
+
.sv-glass {
|
|
228
|
+
background: color-mix(in srgb, var(--sv-bg-elev) 72%, transparent);
|
|
174
229
|
backdrop-filter: blur(12px) saturate(1.4);
|
|
175
230
|
-webkit-backdrop-filter: blur(12px) saturate(1.4);
|
|
176
|
-
border-bottom: 1px solid var(--
|
|
231
|
+
border-bottom: 1px solid var(--sv-border);
|
|
177
232
|
}
|
|
178
233
|
|
|
179
234
|
@media (prefers-reduced-motion: reduce) {
|
|
180
|
-
.
|
|
181
|
-
.
|
|
235
|
+
.sv-card-hover,
|
|
236
|
+
.sv-card-hover:hover {
|
|
182
237
|
transition: none;
|
|
183
238
|
transform: none;
|
|
184
239
|
}
|
|
185
|
-
.
|
|
240
|
+
.sv-skeleton {
|
|
186
241
|
animation: none;
|
|
187
242
|
}
|
|
243
|
+
/* Hover/active color fades across nav, pills and the copy button are
|
|
244
|
+
non-essential motion too — instant is the reduced-motion default.
|
|
245
|
+
(The reading progress bar is intentionally excluded: its transition is
|
|
246
|
+
1:1 with the user's own scroll input, not decorative.) */
|
|
247
|
+
.sv-header__link,
|
|
248
|
+
.sv-footer__link,
|
|
249
|
+
.sv-pill--interactive,
|
|
250
|
+
.sv-code-block__copy,
|
|
251
|
+
.sv-toc__link {
|
|
252
|
+
transition: none;
|
|
253
|
+
}
|
|
188
254
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@still-void/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
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",
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quiet Tech color tokens.
|
|
3
|
-
* Values ported literally from the Quiet Tech 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: "#6F6F78";
|
|
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
|
-
type ThemeMode = keyof typeof colors;
|
|
37
|
-
type AccentName = keyof typeof accents;
|
|
38
|
-
type ColorScheme = (typeof colors)[ThemeMode];
|
|
39
|
-
declare const themeModes: ThemeMode[];
|
|
40
|
-
declare const accentNames: AccentName[];
|
|
41
|
-
declare const DEFAULT_MODE: ThemeMode;
|
|
42
|
-
declare const DEFAULT_ACCENT: AccentName;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Blog categories from the prototype. Categories render as a colored dot + label
|
|
46
|
-
* (never an emoji). The pill also accepts any CSS color for whitelabel use.
|
|
47
|
-
*/
|
|
48
|
-
type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';
|
|
49
|
-
declare const defaultCategoryColors: Record<CategoryName, AccentName>;
|
|
50
|
-
/** Resolve an accent name or raw CSS color to a CSS color value. */
|
|
51
|
-
declare function resolveAccentColor(color: AccentName | (string & {})): string;
|
|
52
|
-
/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */
|
|
53
|
-
declare function resolveCategoryColor(color: CategoryName | AccentName | (string & {})): string;
|
|
54
|
-
|
|
55
|
-
/** Data shape consumed by PostCard / FeaturedPostCard. The library never ships mock data. */
|
|
56
|
-
interface PostSummary {
|
|
57
|
-
title: string;
|
|
58
|
-
href: string;
|
|
59
|
-
excerpt?: string;
|
|
60
|
-
date?: string;
|
|
61
|
-
readMinutes?: number;
|
|
62
|
-
category?: {
|
|
63
|
-
label: string;
|
|
64
|
-
/** Accent token name, known category, or any CSS color. */
|
|
65
|
-
color?: AccentName | CategoryName | (string & {});
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
interface TocItem {
|
|
69
|
-
id: string;
|
|
70
|
-
label: string;
|
|
71
|
-
depth?: 2 | 3;
|
|
72
|
-
}
|
|
73
|
-
interface NavItem {
|
|
74
|
-
label: string;
|
|
75
|
-
href: string;
|
|
76
|
-
active?: boolean;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,
|
|
81
|
-
* ArticleHeader, Prose. Pure functions — Server Component safe.
|
|
82
|
-
*/
|
|
83
|
-
declare function codeBlock(): string;
|
|
84
|
-
declare const codeBlockClasses: {
|
|
85
|
-
readonly header: "qt-code-block__header";
|
|
86
|
-
readonly pre: "qt-code-block__pre";
|
|
87
|
-
readonly copy: "qt-code-block__copy";
|
|
88
|
-
readonly copyCopied: string;
|
|
89
|
-
};
|
|
90
|
-
type CalloutKind = 'note' | 'warn' | 'aha';
|
|
91
|
-
declare function callout(kind: CalloutKind): string;
|
|
92
|
-
declare const calloutClasses: {
|
|
93
|
-
readonly label: "qt-callout__label";
|
|
94
|
-
};
|
|
95
|
-
declare const calloutLabels: Record<CalloutKind, string>;
|
|
96
|
-
declare function tableOfContents(): string;
|
|
97
|
-
interface TocLinkOptions {
|
|
98
|
-
active?: boolean;
|
|
99
|
-
/** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */
|
|
100
|
-
depth?: 2 | 3;
|
|
101
|
-
}
|
|
102
|
-
declare function tocLink(options?: TocLinkOptions): string;
|
|
103
|
-
declare function readingProgress(): string;
|
|
104
|
-
declare const readingProgressClasses: {
|
|
105
|
-
readonly bar: "qt-reading-progress__bar";
|
|
106
|
-
};
|
|
107
|
-
/** CSS var read by `.qt-reading-progress__bar` (0 → 1). */
|
|
108
|
-
declare const READING_PROGRESS_VAR = "--qt-reading-progress";
|
|
109
|
-
declare function articleHeader(): string;
|
|
110
|
-
declare const articleHeaderClasses: {
|
|
111
|
-
readonly title: "qt-article-header__title";
|
|
112
|
-
readonly meta: "qt-article-header__meta";
|
|
113
|
-
readonly author: "qt-article-header__author";
|
|
114
|
-
};
|
|
115
|
-
declare function prose(): string;
|
|
116
|
-
declare const proseClasses: {
|
|
117
|
-
readonly lead: "qt-prose__lead";
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export { type AccentName as A, type CalloutKind as C, DEFAULT_ACCENT as D, type NavItem as N, type PostSummary as P, READING_PROGRESS_VAR as R, 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, articleHeader as h, articleHeaderClasses as i, callout as j, calloutClasses as k, calloutLabels as l, codeBlock as m, codeBlockClasses as n, colors as o, defaultCategoryColors as p, prose as q, proseClasses as r, readingProgress as s, readingProgressClasses as t, resolveAccentColor as u, resolveCategoryColor as v, tableOfContents as w, themeModes as x, tocLink as y };
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quiet Tech color tokens.
|
|
3
|
-
* Values ported literally from the Quiet Tech 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: "#6F6F78";
|
|
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
|
-
type ThemeMode = keyof typeof colors;
|
|
37
|
-
type AccentName = keyof typeof accents;
|
|
38
|
-
type ColorScheme = (typeof colors)[ThemeMode];
|
|
39
|
-
declare const themeModes: ThemeMode[];
|
|
40
|
-
declare const accentNames: AccentName[];
|
|
41
|
-
declare const DEFAULT_MODE: ThemeMode;
|
|
42
|
-
declare const DEFAULT_ACCENT: AccentName;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Blog categories from the prototype. Categories render as a colored dot + label
|
|
46
|
-
* (never an emoji). The pill also accepts any CSS color for whitelabel use.
|
|
47
|
-
*/
|
|
48
|
-
type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';
|
|
49
|
-
declare const defaultCategoryColors: Record<CategoryName, AccentName>;
|
|
50
|
-
/** Resolve an accent name or raw CSS color to a CSS color value. */
|
|
51
|
-
declare function resolveAccentColor(color: AccentName | (string & {})): string;
|
|
52
|
-
/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */
|
|
53
|
-
declare function resolveCategoryColor(color: CategoryName | AccentName | (string & {})): string;
|
|
54
|
-
|
|
55
|
-
/** Data shape consumed by PostCard / FeaturedPostCard. The library never ships mock data. */
|
|
56
|
-
interface PostSummary {
|
|
57
|
-
title: string;
|
|
58
|
-
href: string;
|
|
59
|
-
excerpt?: string;
|
|
60
|
-
date?: string;
|
|
61
|
-
readMinutes?: number;
|
|
62
|
-
category?: {
|
|
63
|
-
label: string;
|
|
64
|
-
/** Accent token name, known category, or any CSS color. */
|
|
65
|
-
color?: AccentName | CategoryName | (string & {});
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
interface TocItem {
|
|
69
|
-
id: string;
|
|
70
|
-
label: string;
|
|
71
|
-
depth?: 2 | 3;
|
|
72
|
-
}
|
|
73
|
-
interface NavItem {
|
|
74
|
-
label: string;
|
|
75
|
-
href: string;
|
|
76
|
-
active?: boolean;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,
|
|
81
|
-
* ArticleHeader, Prose. Pure functions — Server Component safe.
|
|
82
|
-
*/
|
|
83
|
-
declare function codeBlock(): string;
|
|
84
|
-
declare const codeBlockClasses: {
|
|
85
|
-
readonly header: "qt-code-block__header";
|
|
86
|
-
readonly pre: "qt-code-block__pre";
|
|
87
|
-
readonly copy: "qt-code-block__copy";
|
|
88
|
-
readonly copyCopied: string;
|
|
89
|
-
};
|
|
90
|
-
type CalloutKind = 'note' | 'warn' | 'aha';
|
|
91
|
-
declare function callout(kind: CalloutKind): string;
|
|
92
|
-
declare const calloutClasses: {
|
|
93
|
-
readonly label: "qt-callout__label";
|
|
94
|
-
};
|
|
95
|
-
declare const calloutLabels: Record<CalloutKind, string>;
|
|
96
|
-
declare function tableOfContents(): string;
|
|
97
|
-
interface TocLinkOptions {
|
|
98
|
-
active?: boolean;
|
|
99
|
-
/** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */
|
|
100
|
-
depth?: 2 | 3;
|
|
101
|
-
}
|
|
102
|
-
declare function tocLink(options?: TocLinkOptions): string;
|
|
103
|
-
declare function readingProgress(): string;
|
|
104
|
-
declare const readingProgressClasses: {
|
|
105
|
-
readonly bar: "qt-reading-progress__bar";
|
|
106
|
-
};
|
|
107
|
-
/** CSS var read by `.qt-reading-progress__bar` (0 → 1). */
|
|
108
|
-
declare const READING_PROGRESS_VAR = "--qt-reading-progress";
|
|
109
|
-
declare function articleHeader(): string;
|
|
110
|
-
declare const articleHeaderClasses: {
|
|
111
|
-
readonly title: "qt-article-header__title";
|
|
112
|
-
readonly meta: "qt-article-header__meta";
|
|
113
|
-
readonly author: "qt-article-header__author";
|
|
114
|
-
};
|
|
115
|
-
declare function prose(): string;
|
|
116
|
-
declare const proseClasses: {
|
|
117
|
-
readonly lead: "qt-prose__lead";
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export { type AccentName as A, type CalloutKind as C, DEFAULT_ACCENT as D, type NavItem as N, type PostSummary as P, READING_PROGRESS_VAR as R, 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, articleHeader as h, articleHeaderClasses as i, callout as j, calloutClasses as k, calloutLabels as l, codeBlock as m, codeBlockClasses as n, colors as o, defaultCategoryColors as p, prose as q, proseClasses as r, readingProgress as s, readingProgressClasses as t, resolveAccentColor as u, resolveCategoryColor as v, tableOfContents as w, themeModes as x, tocLink as y };
|