/** * Environment-based configuration system * * This allows users to configure the player via environment variables * for easy customization without code changes. */ import type { LyricTheme, LyricDisplayOptions } from '../../types/components'; /** * Environment variable configuration interface */ export interface EnvLyricConfig { displayMode?: string; highlightMode?: string; themeName?: string; colorInactive?: string; colorActive?: string; colorCurrent?: string; colorPrev?: string; colorNext?: string; colorBackground?: string; fontFamily?: string; fontSizeCurrent?: string; fontSizePrev?: string; fontSizeNext?: string; fontWeightCurrent?: string; fontWeightPrev?: string; fontWeightNext?: string; lineHeight?: string; wordSpacing?: string; letterSpacing?: string; padding?: string; transitionDuration?: string; highlightDuration?: string; scrollDuration?: string; autoScroll?: string; smoothScroll?: string; } /** * SoundFont auto-load configuration interface */ export interface EnvSoundFontConfig { autoLoad?: string; defaultPath?: string; autoLoadTimeout?: string; } /** * Google Fonts configuration interface */ export interface EnvGoogleFontConfig { defaultFont?: string; autoLoad?: string; } /** * Load lyric configuration from environment variables */ export declare function loadEnvConfig(): EnvLyricConfig; /** * Convert env config to LyricDisplayOptions */ export declare function envConfigToDisplayOptions(envConfig: EnvLyricConfig): Partial; /** * Convert env config to LyricTheme */ export declare function envConfigToTheme(envConfig: EnvLyricConfig, baseName?: string): LyricTheme; /** * Create theme from environment variables */ export declare function createThemeFromEnv(name?: string): LyricTheme; /** * Load display options from environment */ export declare function loadDisplayOptionsFromEnv(): Partial; /** * Load soundfont configuration from environment variables */ export declare function loadSoundFontConfig(): EnvSoundFontConfig; /** * Check if auto-load soundfont is enabled */ export declare function isSoundFontAutoLoadEnabled(): boolean; /** * Get default soundfont path from env or return default */ export declare function getDefaultSoundFontPath(): string | null; /** * Get soundfont auto-load timeout (in ms) */ export declare function getSoundFontAutoLoadTimeout(): number; /** * Load Google Fonts configuration from environment variables */ export declare function loadGoogleFontConfig(): EnvGoogleFontConfig; /** * Get default font from env */ export declare function getDefaultFont(): string | null; /** * Check if font auto-load is enabled */ export declare function isFontAutoLoadEnabled(): boolean; /** * Helper to merge env config with user config */ export declare function mergeWithEnvConfig>(userConfig: T, envConfig?: Partial): T;