diff --git a/docs/functions/client_color-switch_color-switch.ColorSwitch.html b/docs/functions/client_color-switch_color-switch.ColorSwitch.html index ef7ec340..a94e903d 100644 --- a/docs/functions/client_color-switch_color-switch.ColorSwitch.html +++ b/docs/functions/client_color-switch_color-switch.ColorSwitch.html @@ -6,4 +6,4 @@
<ColorSwitch size={20} skipSystem />
 
-
+
diff --git a/docs/functions/client_force-color-scheme_force-color-scheme.ForceColorScheme.html b/docs/functions/client_force-color-scheme_force-color-scheme.ForceColorScheme.html index 603ddd35..4521bfbe 100644 --- a/docs/functions/client_force-color-scheme_force-color-scheme.ForceColorScheme.html +++ b/docs/functions/client_force-color-scheme_force-color-scheme.ForceColorScheme.html @@ -1,2 +1,2 @@ ForceColorScheme | Nextjs Themes

Force color scheme on a page

-
+
diff --git a/docs/functions/client_force-theme_force-theme.ForceTheme.html b/docs/functions/client_force-theme_force-theme.ForceTheme.html index c64c4b11..da1c8b3d 100644 --- a/docs/functions/client_force-theme_force-theme.ForceTheme.html +++ b/docs/functions/client_force-theme_force-theme.ForceTheme.html @@ -1,2 +1,2 @@ ForceTheme | Nextjs Themes

Force theme on a page

-
  • Parameters

    • props: { targetSelector?: string; theme: string }

    Returns null

+
diff --git a/docs/functions/client_switcher_switcher.Switcher.html b/docs/functions/client_switcher_switcher.Switcher.html index 2e907e28..e721379c 100644 --- a/docs/functions/client_switcher_switcher.Switcher.html +++ b/docs/functions/client_switcher_switcher.Switcher.html @@ -3,4 +3,4 @@
<Switcher targetSelector="#container1" />
 
-
+
diff --git a/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html b/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html index 30d809c1..b953945f 100644 --- a/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html +++ b/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html @@ -3,4 +3,4 @@
<ThemeSwitcher [...props] />
 
-
+
diff --git a/docs/functions/hooks_use-theme.useTheme.html b/docs/functions/hooks_use-theme.useTheme.html index 6a93dc7c..da91edf5 100644 --- a/docs/functions/hooks_use-theme.useTheme.html +++ b/docs/functions/hooks_use-theme.useTheme.html @@ -1,4 +1,4 @@ useTheme | Nextjs Themes
const [] = useTheme(options);
 
-
+
diff --git a/docs/interfaces/client_color-switch_color-switch.ColorSwitchProps.html b/docs/interfaces/client_color-switch_color-switch.ColorSwitchProps.html index 38056cd1..446cace0 100644 --- a/docs/interfaces/client_color-switch_color-switch.ColorSwitchProps.html +++ b/docs/interfaces/client_color-switch_color-switch.ColorSwitchProps.html @@ -1,6 +1,6 @@ -ColorSwitchProps | Nextjs Themes
interface ColorSwitchProps {
    size?: number;
    skipSystem?: boolean;
    targetSelector?: string;
}

Hierarchy

Properties

size? +ColorSwitchProps | Nextjs Themes
interface ColorSwitchProps {
    size?: number;
    skipSystem?: boolean;
    targetSelector?: string;
}

Hierarchy

Properties

size?: number

Diameter of the color switch

-
skipSystem?: boolean

Skip system colorScheme while toggling

-
targetSelector?: string
+
skipSystem?: boolean

Skip system colorScheme while toggling

+
targetSelector?: string
diff --git a/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html b/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html index 1cd5dbd6..a2c7fb57 100644 --- a/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html +++ b/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html @@ -1,4 +1,4 @@ -ThemeSwitcherProps | Nextjs Themes
interface ThemeSwitcherProps {
    forcedColorScheme?: ColorSchemeType;
    forcedTheme?: string;
    nonce?: string;
    styles?: Record<string, string>;
    targetSelector?: string;
    themeTransition?: string;
}

Properties

forcedColorScheme? +ThemeSwitcherProps | Nextjs Themes
interface ThemeSwitcherProps {
    forcedColorScheme?: ColorSchemeType;
    forcedTheme?: string;
    nonce?: string;
    styles?: Record<string, string>;
    targetSelector?: string;
    themeTransition?: string;
}

Properties

forcedColorScheme?: ColorSchemeType

Forced color scheme for the current page

forcedTheme?: string

Forced theme name for the current page

+
forcedTheme?: string

Forced theme name for the current page

nonce?: string

The nonce value for your Content Security Policy.

-
styles?: Record<string, string>

Provide a styles object imported from CSS/SCSS modules if you are using these modules to define theme and color-scheme classes. +

nonce?: string

The nonce value for your Content Security Policy.

+
styles?: Record<string, string>

Provide a styles object imported from CSS/SCSS modules if you are using these modules to define theme and color-scheme classes. All classes applied to the target are modified using the styles object as follows: if (styles) classes = classes.map(cls => styles[cls] ?? cls);

-
targetSelector?: string

CSS selector for the target element to apply the theme. +

targetSelector?: string

CSS selector for the target element to apply the theme. Use this to specify a different target element than the default (html or documentElement). This is particularly useful for controlling the theme of different parts of the page independently.

-
themeTransition?: string

The transition property to enforce on all elements, preventing unwanted transitions during theme changes.

+
themeTransition?: string

The transition property to enforce on all elements, preventing unwanted transitions during theme changes.

'background .3s'
 
'none'
 
-
+
diff --git a/docs/interfaces/hooks_use-theme.UseThemeYield.html b/docs/interfaces/hooks_use-theme.UseThemeYield.html index 30256c42..c6944fca 100644 --- a/docs/interfaces/hooks_use-theme.UseThemeYield.html +++ b/docs/interfaces/hooks_use-theme.UseThemeYield.html @@ -1,4 +1,4 @@ -UseThemeYield | Nextjs Themes
interface UseThemeYield {
    colorSchemePref: ColorSchemeType;
    darkTheme: string;
    lightTheme: string;
    resolvedColorScheme: ResolvedColorSchemeType;
    resolvedTheme: string;
    setColorSchemePref: (colorSchemePref: ColorSchemeType) => void;
    setDarkTheme: (darkTheme: string) => void;
    setForcedColorScheme: (forcedColorScheme: ColorSchemeType) => void;
    setForcedTheme: (forcedTheme: string) => void;
    setLightTheme: (lightTheme: string) => void;
    setTheme: (theme: string) => void;
    setThemeSet: (themeSet: { darkTheme: string; lightTheme: string }) => void;
    systemColorScheme: ResolvedColorSchemeType;
    theme: string;
    toggleColorScheme: (skipSystem?: boolean) => void;
}

Properties

colorSchemePref +UseThemeYield | Nextjs Themes
interface UseThemeYield {
    colorSchemePref: ColorSchemeType;
    darkTheme: string;
    lightTheme: string;
    resolvedColorScheme: ResolvedColorSchemeType;
    resolvedTheme: string;
    setColorSchemePref: (colorSchemePref: ColorSchemeType) => void;
    setDarkTheme: (darkTheme: string) => void;
    setForcedColorScheme: (forcedColorScheme: ColorSchemeType) => void;
    setForcedTheme: (forcedTheme: string) => void;
    setLightTheme: (lightTheme: string) => void;
    setTheme: (theme: string) => void;
    setThemeSet: (themeSet: { darkTheme: string; lightTheme: string }) => void;
    systemColorScheme: ResolvedColorSchemeType;
    theme: string;
    toggleColorScheme: (skipSystem?: boolean) => void;
}

Properties

colorSchemePref: ColorSchemeType
darkTheme: string
lightTheme: string
resolvedColorScheme: ResolvedColorSchemeType
resolvedTheme: string
setColorSchemePref: (colorSchemePref: ColorSchemeType) => void
setDarkTheme: (darkTheme: string) => void
setForcedColorScheme: (forcedColorScheme: ColorSchemeType) => void
setForcedTheme: (forcedTheme: string) => void
setLightTheme: (lightTheme: string) => void
setTheme: (theme: string) => void

actions

-
setThemeSet: (themeSet: { darkTheme: string; lightTheme: string }) => void
systemColorScheme: ResolvedColorSchemeType
theme: string
toggleColorScheme: (skipSystem?: boolean) => void
+

Properties

colorSchemePref: ColorSchemeType
darkTheme: string
lightTheme: string
resolvedColorScheme: ResolvedColorSchemeType
resolvedTheme: string
setColorSchemePref: (colorSchemePref: ColorSchemeType) => void
setDarkTheme: (darkTheme: string) => void
setForcedColorScheme: (forcedColorScheme: ColorSchemeType) => void
setForcedTheme: (forcedTheme: string) => void
setLightTheme: (lightTheme: string) => void
setTheme: (theme: string) => void

actions

+
setThemeSet: (themeSet: { darkTheme: string; lightTheme: string }) => void
systemColorScheme: ResolvedColorSchemeType
theme: string
toggleColorScheme: (skipSystem?: boolean) => void
diff --git a/docs/types/types.ColorSchemeType.html b/docs/types/types.ColorSchemeType.html index bad1ee80..b1dfbaa3 100644 --- a/docs/types/types.ColorSchemeType.html +++ b/docs/types/types.ColorSchemeType.html @@ -1,2 +1,2 @@ ColorSchemeType | Nextjs Themes

Type Alias ColorSchemeType

ColorSchemeType: "" | "system" | "dark" | "light"

Types to be exposed to users

-
+
diff --git a/docs/types/types.ResolvedColorSchemeType.html b/docs/types/types.ResolvedColorSchemeType.html index 050c9a9b..00fe10c9 100644 --- a/docs/types/types.ResolvedColorSchemeType.html +++ b/docs/types/types.ResolvedColorSchemeType.html @@ -1 +1 @@ -ResolvedColorSchemeType | Nextjs Themes

Type Alias ResolvedColorSchemeType

ResolvedColorSchemeType: "dark" | "light"
+ResolvedColorSchemeType | Nextjs Themes

Type Alias ResolvedColorSchemeType

ResolvedColorSchemeType: "dark" | "light"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff8c5a4b..0531b06c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4828,11 +4828,11 @@ packages: title-case@3.0.3: resolution: {integrity: sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==} - tldts-core@6.1.69: - resolution: {integrity: sha512-nygxy9n2PBUFQUtAXAc122gGo+04/j5qr5TGQFZTHafTKYvmARVXt2cA5rgero2/dnXUfkdPtiJoKmrd3T+wdA==} + tldts-core@6.1.70: + resolution: {integrity: sha512-RNnIXDB1FD4T9cpQRErEqw6ZpjLlGdMOitdV+0xtbsnwr4YFka1zpc7D4KD+aAn8oSG5JyFrdasZTE04qDE9Yg==} - tldts@6.1.69: - resolution: {integrity: sha512-Oh/CqRQ1NXNY7cy9NkTPUauOWiTro0jEYZTioGbOmcQh6EC45oribyIMJp0OJO3677r13tO6SKdWoGZUx2BDFw==} + tldts@6.1.70: + resolution: {integrity: sha512-/W1YVgYVJd9ZDjey5NXadNh0mJXkiUMUue9Zebd0vpdo1sU+H4zFFTaJ1RKD4N6KFoHfcXy6l+Vu7bh+bdWCzA==} hasBin: true tmp@0.0.33: @@ -10238,11 +10238,11 @@ snapshots: dependencies: tslib: 2.8.1 - tldts-core@6.1.69: {} + tldts-core@6.1.70: {} - tldts@6.1.69: + tldts@6.1.70: dependencies: - tldts-core: 6.1.69 + tldts-core: 6.1.70 tmp@0.0.33: dependencies: @@ -10254,7 +10254,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.69 + tldts: 6.1.70 tr46@1.0.1: dependencies: