@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/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as ThemeMode, A as AccentName } from './article-
|
|
2
|
-
export { C as CalloutKind, a as CategoryName, b as ColorScheme, D as DEFAULT_ACCENT, c as DEFAULT_MODE, N as NavItem, P as PostSummary, R as READING_PROGRESS_VAR, d as TocItem, e as TocLinkOptions, f as accentNames, g as accents, h as
|
|
1
|
+
import { T as ThemeMode, A as AccentName } from './article-Dl8rGW5l.cjs';
|
|
2
|
+
export { C as CalloutKind, a as CategoryName, b as ColorScheme, D as DEFAULT_ACCENT, c as DEFAULT_MODE, N as NavItem, P as PostSummary, R as READING_PROGRESS_VAR, S as SemanticName, d as TocItem, e as TocLinkOptions, f as accentNames, g as accents, h as accentsInk, i as articleHeader, j as articleHeaderClasses, k as callout, l as calloutClasses, m as calloutLabels, n as codeBlock, o as codeBlockClasses, p as colors, q as defaultCategoryColors, r as prose, s as proseClasses, t as readingProgress, u as readingProgressClasses, v as resolveAccentColor, w as resolveCategoryColor, x as semantic, y as semanticInk, z as tableOfContents, B as themeModes, E as tocLink } from './article-Dl8rGW5l.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Still Void typography tokens.
|
|
6
6
|
* Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).
|
|
7
7
|
* System fallbacks are loading fallbacks only — the final family must be the correct one.
|
|
8
8
|
*/
|
|
@@ -44,7 +44,7 @@ type FontSize = keyof typeof fontSizes;
|
|
|
44
44
|
type FontWeight = keyof typeof fontWeights;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Still Void spacing scale (4→72px) and radii (6/8/12/16/full).
|
|
48
48
|
*/
|
|
49
49
|
declare const spacing: {
|
|
50
50
|
readonly 1: "4px";
|
|
@@ -71,7 +71,7 @@ type SpacingStep = keyof typeof spacing;
|
|
|
71
71
|
type Radius = keyof typeof radii;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Still Void motion tokens.
|
|
75
75
|
* Hover transitions use the signature easing; the reading progress bar is linear.
|
|
76
76
|
*/
|
|
77
77
|
declare const easings: {
|
|
@@ -86,6 +86,21 @@ declare const durations: {
|
|
|
86
86
|
type Easing = keyof typeof easings;
|
|
87
87
|
type Duration = keyof typeof durations;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Still Void z-index scale. Named steps instead of arbitrary numbers so new
|
|
91
|
+
* layered components (dropdown, modal, toast, tooltip) stack predictably
|
|
92
|
+
* against the existing sticky header and reading progress bar.
|
|
93
|
+
*/
|
|
94
|
+
declare const zIndex: {
|
|
95
|
+
readonly dropdown: 10;
|
|
96
|
+
readonly sticky: 20;
|
|
97
|
+
readonly backdrop: 30;
|
|
98
|
+
readonly modal: 40;
|
|
99
|
+
readonly toast: 50;
|
|
100
|
+
readonly tooltip: 60;
|
|
101
|
+
};
|
|
102
|
+
type ZIndexStep = keyof typeof zIndex;
|
|
103
|
+
|
|
89
104
|
/** Minimal class-name joiner. Falsy values are dropped. */
|
|
90
105
|
declare function cx(...parts: Array<string | false | null | undefined>): string;
|
|
91
106
|
|
|
@@ -100,19 +115,19 @@ interface HeaderOptions {
|
|
|
100
115
|
}
|
|
101
116
|
declare function header(options?: HeaderOptions): string;
|
|
102
117
|
declare const headerClasses: {
|
|
103
|
-
readonly nav: "
|
|
104
|
-
readonly link: "
|
|
118
|
+
readonly nav: "sv-header__nav";
|
|
119
|
+
readonly link: "sv-header__link";
|
|
105
120
|
readonly linkActive: string;
|
|
106
|
-
readonly actions: "
|
|
121
|
+
readonly actions: "sv-header__actions";
|
|
107
122
|
};
|
|
108
123
|
declare function logo(): string;
|
|
109
124
|
declare const logoClasses: {
|
|
110
|
-
readonly dot: "
|
|
125
|
+
readonly dot: "sv-logo__dot";
|
|
111
126
|
};
|
|
112
127
|
declare function footer(): string;
|
|
113
128
|
declare const footerClasses: {
|
|
114
|
-
readonly links: "
|
|
115
|
-
readonly link: "
|
|
129
|
+
readonly links: "sv-footer__links";
|
|
130
|
+
readonly link: "sv-footer__link";
|
|
116
131
|
};
|
|
117
132
|
|
|
118
133
|
/**
|
|
@@ -125,7 +140,7 @@ interface CategoryPillOptions {
|
|
|
125
140
|
}
|
|
126
141
|
declare function categoryPill(options?: CategoryPillOptions): string;
|
|
127
142
|
declare const categoryPillClasses: {
|
|
128
|
-
readonly dot: "
|
|
143
|
+
readonly dot: "sv-pill__dot";
|
|
129
144
|
};
|
|
130
145
|
interface PostCardOptions {
|
|
131
146
|
dense?: boolean;
|
|
@@ -133,15 +148,15 @@ interface PostCardOptions {
|
|
|
133
148
|
}
|
|
134
149
|
declare function postCard(options?: PostCardOptions): string;
|
|
135
150
|
declare const postCardClasses: {
|
|
136
|
-
readonly meta: "
|
|
137
|
-
readonly title: "
|
|
138
|
-
readonly excerpt: "
|
|
151
|
+
readonly meta: "sv-post-card__meta";
|
|
152
|
+
readonly title: "sv-post-card__title";
|
|
153
|
+
readonly excerpt: "sv-post-card__excerpt";
|
|
139
154
|
};
|
|
140
155
|
declare function featuredPostCard(): string;
|
|
141
156
|
declare const featuredPostCardClasses: {
|
|
142
|
-
readonly body: "
|
|
143
|
-
readonly title: "
|
|
144
|
-
readonly visual: "
|
|
157
|
+
readonly body: "sv-featured-card__body";
|
|
158
|
+
readonly title: "sv-featured-card__title";
|
|
159
|
+
readonly visual: "sv-featured-card__visual";
|
|
145
160
|
};
|
|
146
161
|
declare function postGrid(): string;
|
|
147
162
|
interface LayoutOptions {
|
|
@@ -150,13 +165,13 @@ interface LayoutOptions {
|
|
|
150
165
|
declare function layout(options?: LayoutOptions): string;
|
|
151
166
|
declare function sidebar(): string;
|
|
152
167
|
declare const sidebarClasses: {
|
|
153
|
-
readonly sectionTitle: "
|
|
168
|
+
readonly sectionTitle: "sv-sidebar__section-title";
|
|
154
169
|
};
|
|
155
170
|
declare function hero(): string;
|
|
156
171
|
declare const heroClasses: {
|
|
157
|
-
readonly eyebrow: "
|
|
158
|
-
readonly title: "
|
|
159
|
-
readonly description: "
|
|
172
|
+
readonly eyebrow: "sv-hero__eyebrow";
|
|
173
|
+
readonly title: "sv-hero__title";
|
|
174
|
+
readonly description: "sv-hero__description";
|
|
160
175
|
};
|
|
161
176
|
interface SkeletonOptions {
|
|
162
177
|
small?: boolean;
|
|
@@ -184,6 +199,7 @@ interface ThemeManager {
|
|
|
184
199
|
subscribe: (listener: (state: ThemeState) => void) => () => void;
|
|
185
200
|
destroy: () => void;
|
|
186
201
|
}
|
|
202
|
+
declare const DEFAULT_STORAGE_KEY = "still-void-theme";
|
|
187
203
|
/**
|
|
188
204
|
* Framework-agnostic theme controller. Applies `data-theme` and `data-accent`
|
|
189
205
|
* attributes; theme.css does the rest via CSS vars. If the server already
|
|
@@ -222,11 +238,11 @@ interface ReadingProgress {
|
|
|
222
238
|
}
|
|
223
239
|
/**
|
|
224
240
|
* Tracks document (or element) reading progress. Writes the
|
|
225
|
-
* `--
|
|
241
|
+
* `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.
|
|
226
242
|
*/
|
|
227
243
|
declare function createReadingProgress(options?: ReadingProgressOptions): ReadingProgress;
|
|
228
244
|
|
|
229
245
|
/** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */
|
|
230
246
|
declare function copyToClipboard(text: string): Promise<boolean>;
|
|
231
247
|
|
|
232
|
-
export { AccentName, type CategoryPillOptions, type Duration, type Easing, type FontFamily, type FontSize, type FontWeight, type HeaderOptions, type LayoutOptions, type PostCardOptions, type Radius, type ReadingProgress, type ReadingProgressOptions, type ScrollSpy, type ScrollSpyOptions, type SkeletonOptions, type SpacingStep, type ThemeManager, type ThemeManagerOptions, ThemeMode, type ThemeState, cardSkeleton, categoryPill, categoryPillClasses, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, cx, durations, easings, featuredPostCard, featuredPostCardClasses, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, radii, sidebar, sidebarClasses, skeletonLine, spacing };
|
|
248
|
+
export { AccentName, type CategoryPillOptions, DEFAULT_STORAGE_KEY, type Duration, type Easing, type FontFamily, type FontSize, type FontWeight, type HeaderOptions, type LayoutOptions, type PostCardOptions, type Radius, type ReadingProgress, type ReadingProgressOptions, type ScrollSpy, type ScrollSpyOptions, type SkeletonOptions, type SpacingStep, type ThemeManager, type ThemeManagerOptions, ThemeMode, type ThemeState, type ZIndexStep, cardSkeleton, categoryPill, categoryPillClasses, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, cx, durations, easings, featuredPostCard, featuredPostCardClasses, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, radii, sidebar, sidebarClasses, skeletonLine, spacing, zIndex };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as ThemeMode, A as AccentName } from './article-
|
|
2
|
-
export { C as CalloutKind, a as CategoryName, b as ColorScheme, D as DEFAULT_ACCENT, c as DEFAULT_MODE, N as NavItem, P as PostSummary, R as READING_PROGRESS_VAR, d as TocItem, e as TocLinkOptions, f as accentNames, g as accents, h as
|
|
1
|
+
import { T as ThemeMode, A as AccentName } from './article-Dl8rGW5l.js';
|
|
2
|
+
export { C as CalloutKind, a as CategoryName, b as ColorScheme, D as DEFAULT_ACCENT, c as DEFAULT_MODE, N as NavItem, P as PostSummary, R as READING_PROGRESS_VAR, S as SemanticName, d as TocItem, e as TocLinkOptions, f as accentNames, g as accents, h as accentsInk, i as articleHeader, j as articleHeaderClasses, k as callout, l as calloutClasses, m as calloutLabels, n as codeBlock, o as codeBlockClasses, p as colors, q as defaultCategoryColors, r as prose, s as proseClasses, t as readingProgress, u as readingProgressClasses, v as resolveAccentColor, w as resolveCategoryColor, x as semantic, y as semanticInk, z as tableOfContents, B as themeModes, E as tocLink } from './article-Dl8rGW5l.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Still Void typography tokens.
|
|
6
6
|
* Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).
|
|
7
7
|
* System fallbacks are loading fallbacks only — the final family must be the correct one.
|
|
8
8
|
*/
|
|
@@ -44,7 +44,7 @@ type FontSize = keyof typeof fontSizes;
|
|
|
44
44
|
type FontWeight = keyof typeof fontWeights;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Still Void spacing scale (4→72px) and radii (6/8/12/16/full).
|
|
48
48
|
*/
|
|
49
49
|
declare const spacing: {
|
|
50
50
|
readonly 1: "4px";
|
|
@@ -71,7 +71,7 @@ type SpacingStep = keyof typeof spacing;
|
|
|
71
71
|
type Radius = keyof typeof radii;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Still Void motion tokens.
|
|
75
75
|
* Hover transitions use the signature easing; the reading progress bar is linear.
|
|
76
76
|
*/
|
|
77
77
|
declare const easings: {
|
|
@@ -86,6 +86,21 @@ declare const durations: {
|
|
|
86
86
|
type Easing = keyof typeof easings;
|
|
87
87
|
type Duration = keyof typeof durations;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Still Void z-index scale. Named steps instead of arbitrary numbers so new
|
|
91
|
+
* layered components (dropdown, modal, toast, tooltip) stack predictably
|
|
92
|
+
* against the existing sticky header and reading progress bar.
|
|
93
|
+
*/
|
|
94
|
+
declare const zIndex: {
|
|
95
|
+
readonly dropdown: 10;
|
|
96
|
+
readonly sticky: 20;
|
|
97
|
+
readonly backdrop: 30;
|
|
98
|
+
readonly modal: 40;
|
|
99
|
+
readonly toast: 50;
|
|
100
|
+
readonly tooltip: 60;
|
|
101
|
+
};
|
|
102
|
+
type ZIndexStep = keyof typeof zIndex;
|
|
103
|
+
|
|
89
104
|
/** Minimal class-name joiner. Falsy values are dropped. */
|
|
90
105
|
declare function cx(...parts: Array<string | false | null | undefined>): string;
|
|
91
106
|
|
|
@@ -100,19 +115,19 @@ interface HeaderOptions {
|
|
|
100
115
|
}
|
|
101
116
|
declare function header(options?: HeaderOptions): string;
|
|
102
117
|
declare const headerClasses: {
|
|
103
|
-
readonly nav: "
|
|
104
|
-
readonly link: "
|
|
118
|
+
readonly nav: "sv-header__nav";
|
|
119
|
+
readonly link: "sv-header__link";
|
|
105
120
|
readonly linkActive: string;
|
|
106
|
-
readonly actions: "
|
|
121
|
+
readonly actions: "sv-header__actions";
|
|
107
122
|
};
|
|
108
123
|
declare function logo(): string;
|
|
109
124
|
declare const logoClasses: {
|
|
110
|
-
readonly dot: "
|
|
125
|
+
readonly dot: "sv-logo__dot";
|
|
111
126
|
};
|
|
112
127
|
declare function footer(): string;
|
|
113
128
|
declare const footerClasses: {
|
|
114
|
-
readonly links: "
|
|
115
|
-
readonly link: "
|
|
129
|
+
readonly links: "sv-footer__links";
|
|
130
|
+
readonly link: "sv-footer__link";
|
|
116
131
|
};
|
|
117
132
|
|
|
118
133
|
/**
|
|
@@ -125,7 +140,7 @@ interface CategoryPillOptions {
|
|
|
125
140
|
}
|
|
126
141
|
declare function categoryPill(options?: CategoryPillOptions): string;
|
|
127
142
|
declare const categoryPillClasses: {
|
|
128
|
-
readonly dot: "
|
|
143
|
+
readonly dot: "sv-pill__dot";
|
|
129
144
|
};
|
|
130
145
|
interface PostCardOptions {
|
|
131
146
|
dense?: boolean;
|
|
@@ -133,15 +148,15 @@ interface PostCardOptions {
|
|
|
133
148
|
}
|
|
134
149
|
declare function postCard(options?: PostCardOptions): string;
|
|
135
150
|
declare const postCardClasses: {
|
|
136
|
-
readonly meta: "
|
|
137
|
-
readonly title: "
|
|
138
|
-
readonly excerpt: "
|
|
151
|
+
readonly meta: "sv-post-card__meta";
|
|
152
|
+
readonly title: "sv-post-card__title";
|
|
153
|
+
readonly excerpt: "sv-post-card__excerpt";
|
|
139
154
|
};
|
|
140
155
|
declare function featuredPostCard(): string;
|
|
141
156
|
declare const featuredPostCardClasses: {
|
|
142
|
-
readonly body: "
|
|
143
|
-
readonly title: "
|
|
144
|
-
readonly visual: "
|
|
157
|
+
readonly body: "sv-featured-card__body";
|
|
158
|
+
readonly title: "sv-featured-card__title";
|
|
159
|
+
readonly visual: "sv-featured-card__visual";
|
|
145
160
|
};
|
|
146
161
|
declare function postGrid(): string;
|
|
147
162
|
interface LayoutOptions {
|
|
@@ -150,13 +165,13 @@ interface LayoutOptions {
|
|
|
150
165
|
declare function layout(options?: LayoutOptions): string;
|
|
151
166
|
declare function sidebar(): string;
|
|
152
167
|
declare const sidebarClasses: {
|
|
153
|
-
readonly sectionTitle: "
|
|
168
|
+
readonly sectionTitle: "sv-sidebar__section-title";
|
|
154
169
|
};
|
|
155
170
|
declare function hero(): string;
|
|
156
171
|
declare const heroClasses: {
|
|
157
|
-
readonly eyebrow: "
|
|
158
|
-
readonly title: "
|
|
159
|
-
readonly description: "
|
|
172
|
+
readonly eyebrow: "sv-hero__eyebrow";
|
|
173
|
+
readonly title: "sv-hero__title";
|
|
174
|
+
readonly description: "sv-hero__description";
|
|
160
175
|
};
|
|
161
176
|
interface SkeletonOptions {
|
|
162
177
|
small?: boolean;
|
|
@@ -184,6 +199,7 @@ interface ThemeManager {
|
|
|
184
199
|
subscribe: (listener: (state: ThemeState) => void) => () => void;
|
|
185
200
|
destroy: () => void;
|
|
186
201
|
}
|
|
202
|
+
declare const DEFAULT_STORAGE_KEY = "still-void-theme";
|
|
187
203
|
/**
|
|
188
204
|
* Framework-agnostic theme controller. Applies `data-theme` and `data-accent`
|
|
189
205
|
* attributes; theme.css does the rest via CSS vars. If the server already
|
|
@@ -222,11 +238,11 @@ interface ReadingProgress {
|
|
|
222
238
|
}
|
|
223
239
|
/**
|
|
224
240
|
* Tracks document (or element) reading progress. Writes the
|
|
225
|
-
* `--
|
|
241
|
+
* `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.
|
|
226
242
|
*/
|
|
227
243
|
declare function createReadingProgress(options?: ReadingProgressOptions): ReadingProgress;
|
|
228
244
|
|
|
229
245
|
/** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */
|
|
230
246
|
declare function copyToClipboard(text: string): Promise<boolean>;
|
|
231
247
|
|
|
232
|
-
export { AccentName, type CategoryPillOptions, type Duration, type Easing, type FontFamily, type FontSize, type FontWeight, type HeaderOptions, type LayoutOptions, type PostCardOptions, type Radius, type ReadingProgress, type ReadingProgressOptions, type ScrollSpy, type ScrollSpyOptions, type SkeletonOptions, type SpacingStep, type ThemeManager, type ThemeManagerOptions, ThemeMode, type ThemeState, cardSkeleton, categoryPill, categoryPillClasses, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, cx, durations, easings, featuredPostCard, featuredPostCardClasses, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, radii, sidebar, sidebarClasses, skeletonLine, spacing };
|
|
248
|
+
export { AccentName, type CategoryPillOptions, DEFAULT_STORAGE_KEY, type Duration, type Easing, type FontFamily, type FontSize, type FontWeight, type HeaderOptions, type LayoutOptions, type PostCardOptions, type Radius, type ReadingProgress, type ReadingProgressOptions, type ScrollSpy, type ScrollSpyOptions, type SkeletonOptions, type SpacingStep, type ThemeManager, type ThemeManagerOptions, ThemeMode, type ThemeState, type ZIndexStep, cardSkeleton, categoryPill, categoryPillClasses, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, cx, durations, easings, featuredPostCard, featuredPostCardClasses, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, radii, sidebar, sidebarClasses, skeletonLine, spacing, zIndex };
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,10 @@ var colors = {
|
|
|
23
23
|
text: "#16161B",
|
|
24
24
|
text2: "#5A5A66",
|
|
25
25
|
// Corrected from #8B8B96 (~3.1:1 on white) to meet WCAG AA 4.5:1, same reasoning as dark.
|
|
26
|
-
|
|
26
|
+
// A further step from #6F6F78 to #6D6D76: the first fix cleared white/paper (≥4.7:1) but
|
|
27
|
+
// was only ~4.44:1 against surface2 (#F2F2EF), the darkest of the light surfaces — still a
|
|
28
|
+
// failure. Verified against bg/bgElev/surface/surface2 together, not just one background.
|
|
29
|
+
text3: "#6D6D76"
|
|
27
30
|
}
|
|
28
31
|
};
|
|
29
32
|
var accents = {
|
|
@@ -32,6 +35,48 @@ var accents = {
|
|
|
32
35
|
mint: "oklch(0.78 0.10 160)",
|
|
33
36
|
amber: "oklch(0.78 0.12 75)"
|
|
34
37
|
};
|
|
38
|
+
var accentsInk = {
|
|
39
|
+
dark: {
|
|
40
|
+
cyan: "oklch(0.78 0.12 210)",
|
|
41
|
+
violet: "oklch(0.72 0.14 295)",
|
|
42
|
+
mint: "oklch(0.78 0.10 160)",
|
|
43
|
+
amber: "oklch(0.78 0.12 75)"
|
|
44
|
+
},
|
|
45
|
+
light: {
|
|
46
|
+
cyan: "oklch(0.525 0.09 210)",
|
|
47
|
+
violet: "oklch(0.545 0.14 295)",
|
|
48
|
+
mint: "oklch(0.52 0.1 160)",
|
|
49
|
+
amber: "oklch(0.535 0.11 75)"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var semantic = {
|
|
53
|
+
dark: {
|
|
54
|
+
danger: "oklch(0.68 0.19 25)",
|
|
55
|
+
success: "oklch(0.75 0.15 150)",
|
|
56
|
+
info: "oklch(0.78 0.12 210)",
|
|
57
|
+
warning: "oklch(0.78 0.12 75)"
|
|
58
|
+
},
|
|
59
|
+
light: {
|
|
60
|
+
danger: "oklch(0.68 0.19 25)",
|
|
61
|
+
success: "oklch(0.75 0.15 150)",
|
|
62
|
+
info: "oklch(0.78 0.12 210)",
|
|
63
|
+
warning: "oklch(0.78 0.12 75)"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
var semanticInk = {
|
|
67
|
+
dark: {
|
|
68
|
+
danger: "oklch(0.68 0.19 25)",
|
|
69
|
+
success: "oklch(0.75 0.15 150)",
|
|
70
|
+
info: "oklch(0.78 0.12 210)",
|
|
71
|
+
warning: "oklch(0.78 0.12 75)"
|
|
72
|
+
},
|
|
73
|
+
light: {
|
|
74
|
+
danger: "oklch(0.555 0.19 25)",
|
|
75
|
+
success: "oklch(0.515 0.14 150)",
|
|
76
|
+
info: "oklch(0.525 0.09 210)",
|
|
77
|
+
warning: "oklch(0.535 0.11 75)"
|
|
78
|
+
}
|
|
79
|
+
};
|
|
35
80
|
var themeModes = Object.keys(colors);
|
|
36
81
|
var accentNames = Object.keys(accents);
|
|
37
82
|
var DEFAULT_MODE = "dark";
|
|
@@ -123,16 +168,27 @@ var defaultCategoryColors = {
|
|
|
123
168
|
arch: "cyan",
|
|
124
169
|
ts: "cyan"
|
|
125
170
|
};
|
|
171
|
+
var hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
|
|
126
172
|
function resolveAccentColor(color) {
|
|
127
|
-
return color
|
|
173
|
+
return hasOwn(accents, color) ? accents[color] : color;
|
|
128
174
|
}
|
|
129
175
|
function resolveCategoryColor(color) {
|
|
130
|
-
if (color
|
|
176
|
+
if (hasOwn(defaultCategoryColors, color)) {
|
|
131
177
|
return accents[defaultCategoryColors[color]];
|
|
132
178
|
}
|
|
133
179
|
return resolveAccentColor(color);
|
|
134
180
|
}
|
|
135
181
|
|
|
182
|
+
// src/tokens/zIndex.ts
|
|
183
|
+
var zIndex = {
|
|
184
|
+
dropdown: 10,
|
|
185
|
+
sticky: 20,
|
|
186
|
+
backdrop: 30,
|
|
187
|
+
modal: 40,
|
|
188
|
+
toast: 50,
|
|
189
|
+
tooltip: 60
|
|
190
|
+
};
|
|
191
|
+
|
|
136
192
|
// src/recipes/cx.ts
|
|
137
193
|
function cx(...parts) {
|
|
138
194
|
return parts.filter(Boolean).join(" ");
|
|
@@ -140,101 +196,101 @@ function cx(...parts) {
|
|
|
140
196
|
|
|
141
197
|
// src/recipes/shell.ts
|
|
142
198
|
function header(options = {}) {
|
|
143
|
-
return cx("
|
|
199
|
+
return cx("sv-header", options.glass !== false && "sv-glass");
|
|
144
200
|
}
|
|
145
201
|
var headerClasses = {
|
|
146
|
-
nav: "
|
|
147
|
-
link: "
|
|
148
|
-
linkActive: cx("
|
|
149
|
-
actions: "
|
|
202
|
+
nav: "sv-header__nav",
|
|
203
|
+
link: "sv-header__link",
|
|
204
|
+
linkActive: cx("sv-header__link", "sv-header__link--active"),
|
|
205
|
+
actions: "sv-header__actions"
|
|
150
206
|
};
|
|
151
207
|
function logo() {
|
|
152
|
-
return "
|
|
208
|
+
return "sv-logo";
|
|
153
209
|
}
|
|
154
210
|
var logoClasses = {
|
|
155
|
-
dot: "
|
|
211
|
+
dot: "sv-logo__dot"
|
|
156
212
|
};
|
|
157
213
|
function footer() {
|
|
158
|
-
return "
|
|
214
|
+
return "sv-footer";
|
|
159
215
|
}
|
|
160
216
|
var footerClasses = {
|
|
161
|
-
links: "
|
|
162
|
-
link: "
|
|
217
|
+
links: "sv-footer__links",
|
|
218
|
+
link: "sv-footer__link"
|
|
163
219
|
};
|
|
164
220
|
|
|
165
221
|
// src/recipes/content.ts
|
|
166
222
|
function categoryPill(options = {}) {
|
|
167
223
|
return cx(
|
|
168
|
-
"
|
|
169
|
-
options.interactive && "
|
|
170
|
-
options.active && "
|
|
224
|
+
"sv-pill",
|
|
225
|
+
options.interactive && "sv-pill--interactive",
|
|
226
|
+
options.active && "sv-pill--active"
|
|
171
227
|
);
|
|
172
228
|
}
|
|
173
229
|
var categoryPillClasses = {
|
|
174
|
-
dot: "
|
|
230
|
+
dot: "sv-pill__dot"
|
|
175
231
|
};
|
|
176
232
|
function postCard(options = {}) {
|
|
177
233
|
return cx(
|
|
178
|
-
"
|
|
179
|
-
options.dense && "
|
|
180
|
-
options.hover !== false && "
|
|
234
|
+
"sv-post-card",
|
|
235
|
+
options.dense && "sv-post-card--dense",
|
|
236
|
+
options.hover !== false && "sv-card-hover"
|
|
181
237
|
);
|
|
182
238
|
}
|
|
183
239
|
var postCardClasses = {
|
|
184
|
-
meta: "
|
|
185
|
-
title: "
|
|
186
|
-
excerpt: "
|
|
240
|
+
meta: "sv-post-card__meta",
|
|
241
|
+
title: "sv-post-card__title",
|
|
242
|
+
excerpt: "sv-post-card__excerpt"
|
|
187
243
|
};
|
|
188
244
|
function featuredPostCard() {
|
|
189
|
-
return cx("
|
|
245
|
+
return cx("sv-featured-card", "sv-gradient-border", "sv-card-hover");
|
|
190
246
|
}
|
|
191
247
|
var featuredPostCardClasses = {
|
|
192
|
-
body: "
|
|
193
|
-
title: "
|
|
194
|
-
visual: "
|
|
248
|
+
body: "sv-featured-card__body",
|
|
249
|
+
title: "sv-featured-card__title",
|
|
250
|
+
visual: "sv-featured-card__visual"
|
|
195
251
|
};
|
|
196
252
|
function postGrid() {
|
|
197
|
-
return "
|
|
253
|
+
return "sv-post-grid";
|
|
198
254
|
}
|
|
199
255
|
function layout(options = {}) {
|
|
200
|
-
return cx("
|
|
256
|
+
return cx("sv-layout", options.withSidebar && "sv-layout--with-sidebar");
|
|
201
257
|
}
|
|
202
258
|
function sidebar() {
|
|
203
|
-
return "
|
|
259
|
+
return "sv-sidebar";
|
|
204
260
|
}
|
|
205
261
|
var sidebarClasses = {
|
|
206
|
-
sectionTitle: "
|
|
262
|
+
sectionTitle: "sv-sidebar__section-title"
|
|
207
263
|
};
|
|
208
264
|
function hero() {
|
|
209
|
-
return "
|
|
265
|
+
return "sv-hero";
|
|
210
266
|
}
|
|
211
267
|
var heroClasses = {
|
|
212
|
-
eyebrow: "
|
|
213
|
-
title: "
|
|
214
|
-
description: "
|
|
268
|
+
eyebrow: "sv-hero__eyebrow",
|
|
269
|
+
title: "sv-hero__title",
|
|
270
|
+
description: "sv-hero__description"
|
|
215
271
|
};
|
|
216
272
|
function skeletonLine(options = {}) {
|
|
217
|
-
return cx("
|
|
273
|
+
return cx("sv-skeleton", "sv-skeleton-line", options.small && "sv-skeleton-line--sm");
|
|
218
274
|
}
|
|
219
275
|
function cardSkeleton() {
|
|
220
|
-
return "
|
|
276
|
+
return "sv-card-skeleton";
|
|
221
277
|
}
|
|
222
278
|
|
|
223
279
|
// src/recipes/article.ts
|
|
224
280
|
function codeBlock() {
|
|
225
|
-
return "
|
|
281
|
+
return "sv-code-block";
|
|
226
282
|
}
|
|
227
283
|
var codeBlockClasses = {
|
|
228
|
-
header: "
|
|
229
|
-
pre: "
|
|
230
|
-
copy: "
|
|
231
|
-
copyCopied: cx("
|
|
284
|
+
header: "sv-code-block__header",
|
|
285
|
+
pre: "sv-code-block__pre",
|
|
286
|
+
copy: "sv-code-block__copy",
|
|
287
|
+
copyCopied: cx("sv-code-block__copy", "sv-code-block__copy--copied")
|
|
232
288
|
};
|
|
233
289
|
function callout(kind) {
|
|
234
|
-
return cx("
|
|
290
|
+
return cx("sv-callout", `sv-callout--${kind}`);
|
|
235
291
|
}
|
|
236
292
|
var calloutClasses = {
|
|
237
|
-
label: "
|
|
293
|
+
label: "sv-callout__label"
|
|
238
294
|
};
|
|
239
295
|
var calloutLabels = {
|
|
240
296
|
note: "Note",
|
|
@@ -242,39 +298,39 @@ var calloutLabels = {
|
|
|
242
298
|
aha: "Aha!"
|
|
243
299
|
};
|
|
244
300
|
function tableOfContents() {
|
|
245
|
-
return "
|
|
301
|
+
return "sv-toc";
|
|
246
302
|
}
|
|
247
303
|
function tocLink(options = {}) {
|
|
248
304
|
return cx(
|
|
249
|
-
"
|
|
250
|
-
options.active && "
|
|
251
|
-
options.depth === 3 && "
|
|
305
|
+
"sv-toc__link",
|
|
306
|
+
options.active && "sv-toc__link--active",
|
|
307
|
+
options.depth === 3 && "sv-toc__link--depth-3"
|
|
252
308
|
);
|
|
253
309
|
}
|
|
254
310
|
function readingProgress() {
|
|
255
|
-
return "
|
|
311
|
+
return "sv-reading-progress";
|
|
256
312
|
}
|
|
257
313
|
var readingProgressClasses = {
|
|
258
|
-
bar: "
|
|
314
|
+
bar: "sv-reading-progress__bar"
|
|
259
315
|
};
|
|
260
|
-
var READING_PROGRESS_VAR = "--
|
|
316
|
+
var READING_PROGRESS_VAR = "--sv-reading-progress";
|
|
261
317
|
function articleHeader() {
|
|
262
|
-
return "
|
|
318
|
+
return "sv-article-header";
|
|
263
319
|
}
|
|
264
320
|
var articleHeaderClasses = {
|
|
265
|
-
title: "
|
|
266
|
-
meta: "
|
|
267
|
-
author: "
|
|
321
|
+
title: "sv-article-header__title",
|
|
322
|
+
meta: "sv-article-header__meta",
|
|
323
|
+
author: "sv-article-header__author"
|
|
268
324
|
};
|
|
269
325
|
function prose() {
|
|
270
|
-
return "
|
|
326
|
+
return "sv-prose";
|
|
271
327
|
}
|
|
272
328
|
var proseClasses = {
|
|
273
|
-
lead: "
|
|
329
|
+
lead: "sv-prose__lead"
|
|
274
330
|
};
|
|
275
331
|
|
|
276
332
|
// src/behaviors/themeManager.ts
|
|
277
|
-
var DEFAULT_STORAGE_KEY = "
|
|
333
|
+
var DEFAULT_STORAGE_KEY = "still-void-theme";
|
|
278
334
|
function isMode(value) {
|
|
279
335
|
return themeModes.includes(value);
|
|
280
336
|
}
|
|
@@ -373,6 +429,8 @@ function createScrollSpy(ids, options) {
|
|
|
373
429
|
}
|
|
374
430
|
|
|
375
431
|
// src/behaviors/readingProgress.ts
|
|
432
|
+
var raf = typeof window !== "undefined" && typeof window.requestAnimationFrame === "function" ? (cb) => window.requestAnimationFrame(cb) : (cb) => setTimeout(cb, 16);
|
|
433
|
+
var cancelRaf = typeof window !== "undefined" && typeof window.cancelAnimationFrame === "function" ? (id) => window.cancelAnimationFrame(id) : (id) => clearTimeout(id);
|
|
376
434
|
function createReadingProgress(options = {}) {
|
|
377
435
|
const varTarget = options.varTarget === null ? null : options.varTarget ?? document.documentElement;
|
|
378
436
|
let percent = 0;
|
|
@@ -394,14 +452,24 @@ function createReadingProgress(options = {}) {
|
|
|
394
452
|
varTarget?.style.setProperty(READING_PROGRESS_VAR, String(percent));
|
|
395
453
|
options.onChange?.(percent);
|
|
396
454
|
}
|
|
455
|
+
let frame = null;
|
|
456
|
+
function onFrame() {
|
|
457
|
+
frame = null;
|
|
458
|
+
update();
|
|
459
|
+
}
|
|
460
|
+
function schedule() {
|
|
461
|
+
if (frame !== null) return;
|
|
462
|
+
frame = raf(onFrame);
|
|
463
|
+
}
|
|
397
464
|
update();
|
|
398
|
-
window.addEventListener("scroll",
|
|
399
|
-
window.addEventListener("resize",
|
|
465
|
+
window.addEventListener("scroll", schedule, { passive: true });
|
|
466
|
+
window.addEventListener("resize", schedule, { passive: true });
|
|
400
467
|
return {
|
|
401
468
|
getPercent: () => percent,
|
|
402
469
|
destroy() {
|
|
403
|
-
window.removeEventListener("scroll",
|
|
404
|
-
window.removeEventListener("resize",
|
|
470
|
+
window.removeEventListener("scroll", schedule);
|
|
471
|
+
window.removeEventListener("resize", schedule);
|
|
472
|
+
if (frame !== null) cancelRaf(frame);
|
|
405
473
|
}
|
|
406
474
|
};
|
|
407
475
|
}
|
|
@@ -419,9 +487,11 @@ async function copyToClipboard(text) {
|
|
|
419
487
|
export {
|
|
420
488
|
DEFAULT_ACCENT,
|
|
421
489
|
DEFAULT_MODE,
|
|
490
|
+
DEFAULT_STORAGE_KEY,
|
|
422
491
|
READING_PROGRESS_VAR,
|
|
423
492
|
accentNames,
|
|
424
493
|
accents,
|
|
494
|
+
accentsInk,
|
|
425
495
|
articleHeader,
|
|
426
496
|
articleHeaderClasses,
|
|
427
497
|
callout,
|
|
@@ -467,12 +537,15 @@ export {
|
|
|
467
537
|
readingProgressClasses,
|
|
468
538
|
resolveAccentColor,
|
|
469
539
|
resolveCategoryColor,
|
|
540
|
+
semantic,
|
|
541
|
+
semanticInk,
|
|
470
542
|
sidebar,
|
|
471
543
|
sidebarClasses,
|
|
472
544
|
skeletonLine,
|
|
473
545
|
spacing,
|
|
474
546
|
tableOfContents,
|
|
475
547
|
themeModes,
|
|
476
|
-
tocLink
|
|
548
|
+
tocLink,
|
|
549
|
+
zIndex
|
|
477
550
|
};
|
|
478
551
|
//# sourceMappingURL=index.js.map
|