@stacksjs/stx 0.2.30 → 0.2.32

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.
@@ -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
@@ -51,4 +56,5 @@ export declare interface SiteRouterOptions {
51
56
  progress?: boolean
52
57
  prefetch?: boolean
53
58
  cache?: boolean
59
+ interceptAllLinks?: boolean
54
60
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.30",
4
+ "version": "0.2.32",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -121,7 +121,7 @@
121
121
  "@stacksjs/ts-craft": "^0.0.2",
122
122
  "bun-plugin-stx": "0.2.29",
123
123
  "bunfig": "^0.15.6",
124
- "stx-router": "0.2.27",
124
+ "stx-router": "0.2.32",
125
125
  "ts-broadcasting": "^0.0.4",
126
126
  "ts-syntax-highlighter": "^0.2.1"
127
127
  }