@stacksjs/stx
Version:
A performant UI Framework. Powered by Bun.
68 lines • 1.59 kB
TypeScript
import type { StoryContext } from './types';
/**
* Get current theme
*/
export declare function getCurrentTheme(): ThemeConfig;
/**
* Check if dark mode is active
*/
export declare function isDark(): boolean;
/**
* Toggle dark mode
*/
export declare function toggleDarkMode(): void;
/**
* Set theme
*/
export declare function setTheme(theme: Partial<ThemeConfig>): void;
/**
* Initialize theme from context
*/
export declare function initializeTheme(ctx: StoryContext): void;
/**
* Generate CSS variables from theme
*/
export declare function generateThemeCSS(theme?: ThemeConfig): string;
/**
* Generate theme toggle button HTML
*/
export declare function generateThemeToggle(): string;
/**
* Get theme toggle script
*/
export declare function getThemeToggleScript(): string;
/**
* Export theme tokens to JSON
*/
export declare function exportThemeTokensJSON(theme?: ThemeConfig): string;
/**
* Export theme tokens to CSS custom properties
*/
export declare function exportThemeTokensCSS(theme?: ThemeConfig): string;
/**
* Get theme styles
*/
export declare function getThemeStyles(): string;
/**
* Default light theme
*/
export declare const lightTheme: ThemeConfig;
/**
* Default dark theme
*/
export declare const darkTheme: ThemeConfig;
/**
* Theme configuration
*/
export declare interface ThemeConfig {
colorScheme: 'light' | 'dark' | 'auto'
primaryColor: string
backgroundColor: string
textColor: string
borderColor: string
secondaryBackground: string
secondaryText: string
fontFamily: string
codeFontFamily: string
borderRadius: string
}