@dheme/react 2.1.0 → 2.2.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.
- package/dist/index.d.mts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +881 -12
- package/dist/index.mjs +880 -12
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -40,6 +40,37 @@ declare function DhemeProvider({ apiKey, theme: primaryColor, themeParams, defau
|
|
|
40
40
|
|
|
41
41
|
declare function DhemeScript({ defaultMode, nonce, }: DhemeScriptProps): React__default.ReactElement;
|
|
42
42
|
|
|
43
|
+
interface ThemeGeneratorProps {
|
|
44
|
+
defaultTheme?: string;
|
|
45
|
+
defaultSecondaryColor?: string;
|
|
46
|
+
defaultSaturation?: number;
|
|
47
|
+
defaultLightness?: number;
|
|
48
|
+
defaultRadius?: number;
|
|
49
|
+
position?: 'bottom-right' | 'bottom-left';
|
|
50
|
+
open?: boolean;
|
|
51
|
+
onOpenChange?: (open: boolean) => void;
|
|
52
|
+
labels?: {
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
baseColors?: string;
|
|
56
|
+
primary?: string;
|
|
57
|
+
secondary?: string;
|
|
58
|
+
optional?: string;
|
|
59
|
+
fineTuning?: string;
|
|
60
|
+
saturation?: string;
|
|
61
|
+
lightness?: string;
|
|
62
|
+
borderRadius?: string;
|
|
63
|
+
advancedOptions?: string;
|
|
64
|
+
colorfulCard?: string;
|
|
65
|
+
colorfulBackground?: string;
|
|
66
|
+
colorfulBorder?: string;
|
|
67
|
+
reset?: string;
|
|
68
|
+
fabPrimaryLabel?: string;
|
|
69
|
+
};
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
declare function ThemeGenerator({ defaultTheme, defaultSecondaryColor, defaultSaturation, defaultLightness, defaultRadius, position, open: controlledOpen, onOpenChange, labels: labelsProp, className, }: ThemeGeneratorProps): React__default.ReactElement;
|
|
73
|
+
|
|
43
74
|
declare function useTheme(): ThemeDataState;
|
|
44
75
|
|
|
45
76
|
declare function useThemeActions(): ThemeActionsState;
|
|
@@ -66,4 +97,4 @@ declare const ThemeDataContext: React$1.Context<ThemeDataState | null>;
|
|
|
66
97
|
|
|
67
98
|
declare const ThemeActionsContext: React$1.Context<ThemeActionsState | null>;
|
|
68
99
|
|
|
69
|
-
export { DhemeProvider, type DhemeProviderProps, DhemeScript, type DhemeScriptProps, ThemeActionsContext, type ThemeActionsState, ThemeDataContext, type ThemeDataState, type ThemeMode, applyThemeCSSVariables, buildCacheKey, getBlockingScriptPayload, getNextBlockingScriptPayload, removeThemeCSSVariables, themeToCSS, themeToCSSBothModes, useDhemeClient, useGenerateTheme, useTheme, useThemeActions };
|
|
100
|
+
export { DhemeProvider, type DhemeProviderProps, DhemeScript, type DhemeScriptProps, ThemeActionsContext, type ThemeActionsState, ThemeDataContext, type ThemeDataState, ThemeGenerator, type ThemeGeneratorProps, type ThemeMode, applyThemeCSSVariables, buildCacheKey, getBlockingScriptPayload, getNextBlockingScriptPayload, removeThemeCSSVariables, themeToCSS, themeToCSSBothModes, useDhemeClient, useGenerateTheme, useTheme, useThemeActions };
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,37 @@ declare function DhemeProvider({ apiKey, theme: primaryColor, themeParams, defau
|
|
|
40
40
|
|
|
41
41
|
declare function DhemeScript({ defaultMode, nonce, }: DhemeScriptProps): React__default.ReactElement;
|
|
42
42
|
|
|
43
|
+
interface ThemeGeneratorProps {
|
|
44
|
+
defaultTheme?: string;
|
|
45
|
+
defaultSecondaryColor?: string;
|
|
46
|
+
defaultSaturation?: number;
|
|
47
|
+
defaultLightness?: number;
|
|
48
|
+
defaultRadius?: number;
|
|
49
|
+
position?: 'bottom-right' | 'bottom-left';
|
|
50
|
+
open?: boolean;
|
|
51
|
+
onOpenChange?: (open: boolean) => void;
|
|
52
|
+
labels?: {
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
baseColors?: string;
|
|
56
|
+
primary?: string;
|
|
57
|
+
secondary?: string;
|
|
58
|
+
optional?: string;
|
|
59
|
+
fineTuning?: string;
|
|
60
|
+
saturation?: string;
|
|
61
|
+
lightness?: string;
|
|
62
|
+
borderRadius?: string;
|
|
63
|
+
advancedOptions?: string;
|
|
64
|
+
colorfulCard?: string;
|
|
65
|
+
colorfulBackground?: string;
|
|
66
|
+
colorfulBorder?: string;
|
|
67
|
+
reset?: string;
|
|
68
|
+
fabPrimaryLabel?: string;
|
|
69
|
+
};
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
declare function ThemeGenerator({ defaultTheme, defaultSecondaryColor, defaultSaturation, defaultLightness, defaultRadius, position, open: controlledOpen, onOpenChange, labels: labelsProp, className, }: ThemeGeneratorProps): React__default.ReactElement;
|
|
73
|
+
|
|
43
74
|
declare function useTheme(): ThemeDataState;
|
|
44
75
|
|
|
45
76
|
declare function useThemeActions(): ThemeActionsState;
|
|
@@ -66,4 +97,4 @@ declare const ThemeDataContext: React$1.Context<ThemeDataState | null>;
|
|
|
66
97
|
|
|
67
98
|
declare const ThemeActionsContext: React$1.Context<ThemeActionsState | null>;
|
|
68
99
|
|
|
69
|
-
export { DhemeProvider, type DhemeProviderProps, DhemeScript, type DhemeScriptProps, ThemeActionsContext, type ThemeActionsState, ThemeDataContext, type ThemeDataState, type ThemeMode, applyThemeCSSVariables, buildCacheKey, getBlockingScriptPayload, getNextBlockingScriptPayload, removeThemeCSSVariables, themeToCSS, themeToCSSBothModes, useDhemeClient, useGenerateTheme, useTheme, useThemeActions };
|
|
100
|
+
export { DhemeProvider, type DhemeProviderProps, DhemeScript, type DhemeScriptProps, ThemeActionsContext, type ThemeActionsState, ThemeDataContext, type ThemeDataState, ThemeGenerator, type ThemeGeneratorProps, type ThemeMode, applyThemeCSSVariables, buildCacheKey, getBlockingScriptPayload, getNextBlockingScriptPayload, removeThemeCSSVariables, themeToCSS, themeToCSSBothModes, useDhemeClient, useGenerateTheme, useTheme, useThemeActions };
|