triiiceratops 0.4.0 → 0.6.0

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.
@@ -0,0 +1,39 @@
1
+ import { ThemeConfig, DaisyUITheme } from './types';
2
+ /**
3
+ * Check if a string is a valid built-in DaisyUI theme name
4
+ */
5
+ export declare function isBuiltInTheme(theme: string): theme is DaisyUITheme;
6
+ /**
7
+ * Apply a built-in theme to an element by setting data-theme attribute
8
+ */
9
+ export declare function applyBuiltInTheme(element: HTMLElement, theme: DaisyUITheme): void;
10
+ /**
11
+ * Apply custom theme configuration as CSS custom properties on an element.
12
+ * These override the base theme's values.
13
+ */
14
+ export declare function applyThemeConfig(element: HTMLElement, config: ThemeConfig): void;
15
+ /**
16
+ * Clear all custom theme CSS variables from an element
17
+ */
18
+ export declare function clearThemeConfig(element: HTMLElement): void;
19
+ /**
20
+ * Parse a theme config from a JSON string (for HTML attribute usage)
21
+ */
22
+ export declare function parseThemeConfig(json: string): ThemeConfig | null;
23
+ /**
24
+ * Apply theme to an element.
25
+ *
26
+ * @param element - The HTML element to apply the theme to
27
+ * @param theme - Built-in theme name (defaults to light/dark based on prefers-color-scheme)
28
+ * @param config - Optional custom theme configuration to override the base theme
29
+ * @param prefersDark - Whether the user prefers dark mode (from media query)
30
+ */
31
+ export declare function applyTheme(element: HTMLElement, theme: DaisyUITheme | undefined, config: ThemeConfig | undefined): void;
32
+ /**
33
+ * Get all CSS variable names that can be customized
34
+ */
35
+ export declare function getThemeCssVariables(): string[];
36
+ /**
37
+ * Get all customizable theme property names
38
+ */
39
+ export declare function getThemePropertyNames(): (keyof ThemeConfig)[];
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Built-in DaisyUI theme names
3
+ */
4
+ export type DaisyUITheme = 'light' | 'dark' | 'cupcake' | 'bumblebee' | 'emerald' | 'corporate' | 'synthwave' | 'retro' | 'cyberpunk' | 'valentine' | 'halloween' | 'garden' | 'forest' | 'aqua' | 'lofi' | 'pastel' | 'fantasy' | 'wireframe' | 'black' | 'luxury' | 'dracula' | 'cmyk' | 'autumn' | 'business' | 'acid' | 'lemonade' | 'night' | 'coffee' | 'winter' | 'dim' | 'nord' | 'sunset' | 'caramellatte' | 'abyss' | 'silk';
5
+ /**
6
+ * List of all built-in DaisyUI themes for runtime validation
7
+ */
8
+ export declare const DAISYUI_THEMES: DaisyUITheme[];
9
+ /**
10
+ * Custom theme configuration with friendly property names.
11
+ * All color values accept hex (#rrggbb), rgb(r,g,b), or oklch() strings.
12
+ * This is used to override the base theme's values.
13
+ */
14
+ export interface ThemeConfig {
15
+ /** Primary brand color (hex, rgb, or oklch) */
16
+ primary?: string;
17
+ /** Text color for content on primary background */
18
+ primaryContent?: string;
19
+ /** Secondary brand color (hex, rgb, or oklch) */
20
+ secondary?: string;
21
+ /** Text color for content on secondary background */
22
+ secondaryContent?: string;
23
+ /** Accent brand color (hex, rgb, or oklch) */
24
+ accent?: string;
25
+ /** Text color for content on accent background */
26
+ accentContent?: string;
27
+ /** Neutral dark color (hex, rgb, or oklch) */
28
+ neutral?: string;
29
+ /** Text color for content on neutral background */
30
+ neutralContent?: string;
31
+ /** Main background color (base-100) */
32
+ base100?: string;
33
+ /** Slightly darker background (base-200) */
34
+ base200?: string;
35
+ /** Even darker background (base-300) */
36
+ base300?: string;
37
+ /** Default text color on base backgrounds */
38
+ baseContent?: string;
39
+ /** Info state color */
40
+ info?: string;
41
+ /** Text color for content on info background */
42
+ infoContent?: string;
43
+ /** Success state color */
44
+ success?: string;
45
+ /** Text color for content on success background */
46
+ successContent?: string;
47
+ /** Warning state color */
48
+ warning?: string;
49
+ /** Text color for content on warning background */
50
+ warningContent?: string;
51
+ /** Error state color */
52
+ error?: string;
53
+ /** Text color for content on error background */
54
+ errorContent?: string;
55
+ /** Border radius for large components like cards, modals (e.g., '1rem') */
56
+ radiusBox?: string;
57
+ /** Border radius for medium components like inputs, buttons (e.g., '0.5rem') */
58
+ radiusField?: string;
59
+ /** Border radius for small components like checkboxes, toggles (e.g., '0.25rem') */
60
+ radiusSelector?: string;
61
+ /** Base size for small components like checkboxes (e.g., '0.25rem') */
62
+ sizeSelector?: string;
63
+ /** Base size for form fields (e.g., '0.25rem') */
64
+ sizeField?: string;
65
+ /** Border width for components (e.g., '1px') */
66
+ border?: string;
67
+ /** Enable depth effect for components (0 or 1) */
68
+ depth?: 0 | 1;
69
+ /** Enable noise background effect for components (0 or 1) */
70
+ noise?: 0 | 1;
71
+ /** Color scheme hint for browser-provided UI elements */
72
+ colorScheme?: 'light' | 'dark';
73
+ }