claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
54 lines • 1.92 kB
TypeScript
/**
* Initialization utilities for ClarityKit
* Provides setup functions for theme management and other core features
*/
/**
* Initializes ClarityKit theme management
* Call this once when your application starts to ensure proper theme handling
*
* @param options - Configuration options for theme initialization
*/
export declare function initializeTheme(options?: {
/** Whether to auto-apply theme on initialization */
autoApply?: boolean;
/** Default theme when no preference is stored */
defaultTheme?: 'light' | 'dark' | 'auto';
/** Element to apply theme classes to (defaults to document.documentElement) */
target?: HTMLElement;
}): import("./theme").ThemeManager | null | undefined;
/**
* Initializes all ClarityKit features
* Convenience function that sets up theme management and other core features
*
* @param options - Configuration options for initialization
*/
export declare function initializeClarityKit(options?: {
/** Theme initialization options */
theme?: Parameters<typeof initializeTheme>[0];
/** Whether to log initialization status */
verbose?: boolean;
}): {
themeManager: import("./theme").ThemeManager | null | undefined;
success: boolean;
error?: undefined;
} | {
themeManager: null;
success: boolean;
error: unknown;
};
/**
* Sets up reduced motion preferences
* Adds CSS class to document based on user's motion preferences
*/
export declare function setupReducedMotion(): (() => void) | undefined;
/**
* Sets up high contrast preferences
* Adds CSS class to document based on user's contrast preferences
*/
export declare function setupHighContrast(): (() => void) | undefined;
/**
* Sets up all accessibility preferences
* Convenience function that sets up reduced motion, high contrast, etc.
*/
export declare function setupAccessibilityPreferences(): () => void;
//# sourceMappingURL=init.d.ts.map