yukinovel
Version:
Yukinovel is a simple web visual novel engine.
101 lines (100 loc) • 2.57 kB
TypeScript
export interface ThemeConfig {
name: string;
version: string;
author?: string;
description?: string;
colors: {
primary: string;
secondary: string;
accent: string;
background: string;
surface: string;
text: string;
textSecondary: string;
border: string;
shadow: string;
success: string;
warning: string;
error: string;
info: string;
[key: string]: string;
};
typography: {
fontFamily: string;
fontSize: {
xs: string;
sm: string;
base: string;
lg: string;
xl: string;
'2xl': string;
'3xl': string;
'4xl': string;
[key: string]: string;
};
fontWeight: {
light: number;
normal: number;
medium: number;
semibold: number;
bold: number;
[key: string]: number;
};
lineHeight: {
tight: number;
normal: number;
relaxed: number;
[key: string]: number;
};
};
components: {
textBox: {
background: string;
border: string;
borderRadius: string;
padding: string;
fontSize: string;
fontFamily: string;
color: string;
opacity: number;
backdropFilter?: string;
};
button: {
background: string;
color: string;
border: string;
borderRadius: string;
padding: string;
fontSize: string;
fontWeight: number;
transition: string;
hover: {
background: string;
color: string;
transform: string;
};
active: {
background: string;
transform: string;
};
};
[key: string]: any;
};
customCSS?: string;
}
export declare class ThemeManager {
private currentTheme;
private themes;
private styleElement;
private game;
constructor(game: any);
private initializeDefaultThemes;
private createStyleElement;
applyTheme(themeName: string): void;
private generateCSS;
registerTheme(theme: ThemeConfig): void;
getTheme(name: string): ThemeConfig | undefined;
getAllThemes(): ThemeConfig[];
getCurrentTheme(): ThemeConfig | null;
destroy(): void;
}