kss-modern 1.3.0-beta.1 → 1.3.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 +3 -2
- package/dist/node/lib/index.d.mts +11 -1
- package/dist/node/lib/index.d.ts +11 -1
- package/dist/node/lib/index.mjs +303 -121
- package/dist/node/lib/pug/worker.mjs +1 -1
- package/dist/node/shared/{kss-modern.BQiL0d8K.mjs → kss-modern.DQ_V-57G.mjs} +4 -1
- package/dist/styleguide-assets/.vite/manifest.json +45 -13
- package/dist/styleguide-assets/a11y-report-DJQyYaLp.js +187 -0
- package/dist/styleguide-assets/audit-runner-Ch009v98.js +40 -0
- package/dist/styleguide-assets/{clipboard-BUvXbiCa.js → clipboard-CHYspHPs.js} +1 -1
- package/dist/styleguide-assets/{fullpage-B5QPff3p.js → fullpage-B7IV3eSt.js} +71 -77
- package/dist/styleguide-assets/{html-validator-BxGmbFa-.js → html-validator-Cp2OkhS9.js} +69 -100
- package/dist/styleguide-assets/{icons-C6KKEuT_.js → icons-Cip2t08v.js} +1 -1
- package/dist/styleguide-assets/kss-modern-Cg1aeKi1.css +3 -0
- package/dist/styleguide-assets/{preview-D2-sk3lE.js → preview-CWqxR9nN.js} +12 -9
- package/dist/styleguide-assets/section-previews-V4M5aSu6.js +10 -0
- package/dist/styleguide-assets/section-theme-select-ygaSXIuK.js +48 -0
- package/dist/styleguide-assets/{utils-DrMb1LbR.js → utils-DtB-AzJa.js} +3 -3
- package/package.json +1 -1
- package/dist/styleguide-assets/kss-modern-CTiCJXSr.css +0 -3
package/README.md
CHANGED
|
@@ -6,10 +6,11 @@ A modern, KSS-compatible styleguide generator. Parses KSS comment blocks from CS
|
|
|
6
6
|
|
|
7
7
|
- KSS-compatible comment parsing from CSS/SCSS files
|
|
8
8
|
- Live component previews with modifier variants
|
|
9
|
+
- Per-section theme dropdown (`Themes:`) to switch previews between the default and themed views
|
|
9
10
|
- Pug template support via worker thread pool
|
|
10
11
|
- Color palette and icon gallery documentation
|
|
11
12
|
- Figma embed integration with light/dark theme sync
|
|
12
|
-
- Accessibility auditing (axe-core) and HTML validation
|
|
13
|
+
- Accessibility auditing (axe-core) and HTML validation, per component or page-wide via `window.kssAudit()` for CI and AI agents
|
|
13
14
|
- Markdown descriptions with custom components (alerts, accordions)
|
|
14
15
|
- Dark mode with three-way toggle (System/Light/Dark)
|
|
15
16
|
- Global search, keyboard navigation, and "Open in Editor" links
|
|
@@ -47,7 +48,7 @@ This scans all `.css` and `.scss` files in `contentDir` for KSS comment blocks a
|
|
|
47
48
|
## Documentation
|
|
48
49
|
|
|
49
50
|
- **[Setup Guide](docs/setup.md)** — Installation, configuration reference, watch mode, project structure, and API reference
|
|
50
|
-
- **[Usage Guide](docs/usage.md)** — Writing KSS comments, all available properties (markup, modifiers, colors, icons, Markdown, Figma, status, wrapper, html/body classes, etc.), and styleguide UI features
|
|
51
|
+
- **[Usage Guide](docs/usage.md)** — Writing KSS comments, all available properties (markup, modifiers, colors, icons, Markdown, Figma, status, wrapper, html/body classes, themes, etc.), and styleguide UI features
|
|
51
52
|
- **[Changelog](CHANGELOG.md)** — Version history and release notes
|
|
52
53
|
|
|
53
54
|
## Basic KSS Example
|
|
@@ -4,6 +4,14 @@ interface SectionMeta {
|
|
|
4
4
|
}[];
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* One entry of a section's `Themes:` block — a theme class (or class list, e.g. `.theme-a.compact`)
|
|
9
|
+
* written as in the KSS comment, plus the label shown in the theme dropdown.
|
|
10
|
+
*/
|
|
11
|
+
interface ThemeOption {
|
|
12
|
+
value: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
7
15
|
interface ColorObject {
|
|
8
16
|
name?: string;
|
|
9
17
|
color: string;
|
|
@@ -31,6 +39,8 @@ interface in2Section {
|
|
|
31
39
|
wrapper?: string;
|
|
32
40
|
htmlclass?: string;
|
|
33
41
|
bodyclass?: string;
|
|
42
|
+
/** Theme contexts offered by the section's theme dropdown; classes are applied to the preview's <html>. */
|
|
43
|
+
themes?: ThemeOption[];
|
|
34
44
|
source: {
|
|
35
45
|
css: {
|
|
36
46
|
file: string;
|
|
@@ -202,7 +212,7 @@ type StyleguideChange = {
|
|
|
202
212
|
type: 'structural';
|
|
203
213
|
} | {
|
|
204
214
|
type: 'markup';
|
|
205
|
-
|
|
215
|
+
files: string[];
|
|
206
216
|
sections: string[];
|
|
207
217
|
};
|
|
208
218
|
/**
|
package/dist/node/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,14 @@ interface SectionMeta {
|
|
|
4
4
|
}[];
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* One entry of a section's `Themes:` block — a theme class (or class list, e.g. `.theme-a.compact`)
|
|
9
|
+
* written as in the KSS comment, plus the label shown in the theme dropdown.
|
|
10
|
+
*/
|
|
11
|
+
interface ThemeOption {
|
|
12
|
+
value: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
7
15
|
interface ColorObject {
|
|
8
16
|
name?: string;
|
|
9
17
|
color: string;
|
|
@@ -31,6 +39,8 @@ interface in2Section {
|
|
|
31
39
|
wrapper?: string;
|
|
32
40
|
htmlclass?: string;
|
|
33
41
|
bodyclass?: string;
|
|
42
|
+
/** Theme contexts offered by the section's theme dropdown; classes are applied to the preview's <html>. */
|
|
43
|
+
themes?: ThemeOption[];
|
|
34
44
|
source: {
|
|
35
45
|
css: {
|
|
36
46
|
file: string;
|
|
@@ -202,7 +212,7 @@ type StyleguideChange = {
|
|
|
202
212
|
type: 'structural';
|
|
203
213
|
} | {
|
|
204
214
|
type: 'markup';
|
|
205
|
-
|
|
215
|
+
files: string[];
|
|
206
216
|
sections: string[];
|
|
207
217
|
};
|
|
208
218
|
/**
|