@stacksjs/stx 0.2.30 → 0.2.31
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/dist/cli.js +435 -433
- package/dist/index.d.ts +3 -0
- package/dist/index.js +382 -380
- package/dist/site-builder/index.d.ts +2 -0
- package/dist/site-builder/theme.d.ts +11 -0
- package/dist/site-builder/types.d.ts +5 -0
- package/package.json +1 -1
|
@@ -5,9 +5,11 @@ export type {
|
|
|
5
5
|
SiteRouterOptions,
|
|
6
6
|
SiteSeo,
|
|
7
7
|
SiteSocial,
|
|
8
|
+
SiteThemeOptions,
|
|
8
9
|
} from './types';
|
|
9
10
|
export { buildStaticSite, defineSiteConfig, type BuildResult } from './build';
|
|
10
11
|
export { injectSeo } from './seo';
|
|
11
12
|
export { generateSitemap, type SitemapEntry } from './sitemap';
|
|
12
13
|
export { generateRobots } from './robots';
|
|
13
14
|
export { injectRouterScript, type RouterOptions } from './router';
|
|
15
|
+
export { injectThemeBootstrap, type ThemeOptions } from './theme';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SiteConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Inject the theme bootstrap (FOUC guard + class) and the toggle
|
|
4
|
+
* handler. Skips no-op if the markers are already present so rebuilds
|
|
5
|
+
* stay idempotent.
|
|
6
|
+
*/
|
|
7
|
+
export declare function injectThemeBootstrap(html: string, site: SiteConfig): string;
|
|
8
|
+
export declare interface ThemeOptions {
|
|
9
|
+
default?: 'dark' | 'light' | 'auto'
|
|
10
|
+
storageKey?: string
|
|
11
|
+
}
|
|
@@ -30,6 +30,11 @@ export declare interface SiteConfig {
|
|
|
30
30
|
pages?: Record<string, PageMeta>
|
|
31
31
|
spa?: boolean
|
|
32
32
|
router?: SiteRouterOptions
|
|
33
|
+
theme?: false | SiteThemeOptions
|
|
34
|
+
}
|
|
35
|
+
export declare interface SiteThemeOptions {
|
|
36
|
+
default?: 'dark' | 'light' | 'auto'
|
|
37
|
+
storageKey?: string
|
|
33
38
|
}
|
|
34
39
|
export declare interface PageMeta {
|
|
35
40
|
title?: string
|