diff --git a/docs/functions/client_color_switch_color_switch.ColorSwitch.html b/docs/functions/client_color_switch_color_switch.ColorSwitch.html index c233c696..3eb2f398 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 />
 
-
\ No newline at end of file +
\ No newline at end of file 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 1db150dd..acb733f4 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

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/client_force_theme_force_theme.ForceTheme.html b/docs/functions/client_force_theme_force_theme.ForceTheme.html index 38a663cf..49a86100 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;
      }
      • OptionaltargetSelector?: string
      • theme: string

    Returns null

\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/client_switcher_switcher.Switcher.html b/docs/functions/client_switcher_switcher.Switcher.html index 455f244a..e5e34315 100644 --- a/docs/functions/client_switcher_switcher.Switcher.html +++ b/docs/functions/client_switcher_switcher.Switcher.html @@ -3,4 +3,4 @@
<Switcher targetSelector="#container1" />
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/client_theme_switcher_theme_switcher.ThemeSwitcher.html b/docs/functions/client_theme_switcher_theme_switcher.ThemeSwitcher.html index 5e464dab..f2b81b16 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] />
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/hooks_use_theme.useTheme.html b/docs/functions/hooks_use_theme.useTheme.html index 2414eb6b..7d38f00b 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);
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/interfaces/client_color_switch_color_switch.ColorSwitchProps.html b/docs/interfaces/client_color_switch_color_switch.ColorSwitchProps.html index 722032d8..f84c46f5 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
\ No newline at end of file +
skipSystem?: boolean

Skip system colorScheme while toggling

+
targetSelector?: string
\ No newline at end of file diff --git a/docs/interfaces/client_theme_switcher_theme_switcher.ThemeSwitcherProps.html b/docs/interfaces/client_theme_switcher_theme_switcher.ThemeSwitcherProps.html index 9d8769c1..589400a0 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'
 
-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/interfaces/hooks_use_theme.UseThemeYield.html b/docs/interfaces/hooks_use_theme.UseThemeYield.html index 53eeb549..58d4dffc 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)
\ No newline at end of file +

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)
\ No newline at end of file diff --git a/docs/modules/client_color_switch_color_switch.html b/docs/modules/client_color_switch_color_switch.html index b548eb5d..2a77f3b4 100644 --- a/docs/modules/client_color_switch_color_switch.html +++ b/docs/modules/client_color_switch_color_switch.html @@ -1,3 +1,3 @@ -client/color-switch/color-switch | Nextjs Themes

Module client/color-switch/color-switch

Index

Interfaces

ColorSwitchProps +client/color-switch/color-switch | Nextjs Themes

Module client/color-switch/color-switch

Index

Interfaces

Functions

\ No newline at end of file diff --git a/docs/modules/client_force_color_scheme_force_color_scheme.html b/docs/modules/client_force_color_scheme_force_color_scheme.html index 7c38bde1..fe7315ca 100644 --- a/docs/modules/client_force_color_scheme_force_color_scheme.html +++ b/docs/modules/client_force_color_scheme_force_color_scheme.html @@ -1,2 +1,2 @@ -client/force-color-scheme/force-color-scheme | Nextjs Themes

Module client/force-color-scheme/force-color-scheme

Index

Functions

ForceColorScheme +client/force-color-scheme/force-color-scheme | Nextjs Themes
\ No newline at end of file diff --git a/docs/modules/client_force_theme_force_theme.html b/docs/modules/client_force_theme_force_theme.html index e50c87b4..3bf97435 100644 --- a/docs/modules/client_force_theme_force_theme.html +++ b/docs/modules/client_force_theme_force_theme.html @@ -1,2 +1,2 @@ -client/force-theme/force-theme | Nextjs Themes

Module client/force-theme/force-theme

Index

Functions

ForceTheme +client/force-theme/force-theme | Nextjs Themes

Module client/force-theme/force-theme

Index

Functions

\ No newline at end of file diff --git a/docs/modules/client_switcher_switcher.html b/docs/modules/client_switcher_switcher.html index 915cf5fa..de83ab62 100644 --- a/docs/modules/client_switcher_switcher.html +++ b/docs/modules/client_switcher_switcher.html @@ -1,2 +1,2 @@ -client/switcher/switcher | Nextjs Themes

Module client/switcher/switcher

Index

Functions

Switcher +client/switcher/switcher | Nextjs Themes

Module client/switcher/switcher

Index

Functions

\ No newline at end of file diff --git a/docs/modules/client_theme_switcher_theme_switcher.html b/docs/modules/client_theme_switcher_theme_switcher.html index 591cc010..da487cdd 100644 --- a/docs/modules/client_theme_switcher_theme_switcher.html +++ b/docs/modules/client_theme_switcher_theme_switcher.html @@ -1,3 +1,3 @@ -client/theme-switcher/theme-switcher | Nextjs Themes

Module client/theme-switcher/theme-switcher

Index

Interfaces

ThemeSwitcherProps +client/theme-switcher/theme-switcher | Nextjs Themes
\ No newline at end of file diff --git a/docs/modules/hooks_use_theme.html b/docs/modules/hooks_use_theme.html index c219362c..19a67e1a 100644 --- a/docs/modules/hooks_use_theme.html +++ b/docs/modules/hooks_use_theme.html @@ -1,3 +1,3 @@ -hooks/use-theme | Nextjs Themes

Module hooks/use-theme

Index

Interfaces

UseThemeYield +hooks/use-theme | Nextjs Themes

Module hooks/use-theme

Index

Interfaces

Functions

\ No newline at end of file diff --git a/docs/modules/types.html b/docs/modules/types.html index 5857a9fd..5c6c13b0 100644 --- a/docs/modules/types.html +++ b/docs/modules/types.html @@ -1,3 +1,3 @@ -types | Nextjs Themes

Module types

Index

Type Aliases

ColorSchemeType +types | Nextjs Themes
\ No newline at end of file diff --git a/docs/types/types.ColorSchemeType.html b/docs/types/types.ColorSchemeType.html index db8cc0fa..bf53f9fe 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

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/types/types.ResolvedColorSchemeType.html b/docs/types/types.ResolvedColorSchemeType.html index aede664c..f3144dac 100644 --- a/docs/types/types.ResolvedColorSchemeType.html +++ b/docs/types/types.ResolvedColorSchemeType.html @@ -1 +1 @@ -ResolvedColorSchemeType | Nextjs Themes

Type Alias ResolvedColorSchemeType

ResolvedColorSchemeType: "dark" | "light"
\ No newline at end of file +ResolvedColorSchemeType | Nextjs Themes

Type Alias ResolvedColorSchemeType

ResolvedColorSchemeType: "dark" | "light"
\ No newline at end of file diff --git a/examples/pages-router/package.json b/examples/pages-router/package.json index f64be906..68080d73 100644 --- a/examples/pages-router/package.json +++ b/examples/pages-router/package.json @@ -22,7 +22,7 @@ "@types/node": "^20.14.9", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "react-webgl-trails": "^0.0.3", + "react-webgl-trails": "^0.0.4", "typescript": "^5.5.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d5b9f7d..c2e34d77 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -138,8 +138,8 @@ importers: specifier: ^18.3.0 version: 18.3.0 react-webgl-trails: - specifier: ^0.0.3 - version: 0.0.3(@types/react@18.3.3)(react@18.3.1) + specifier: ^0.0.4 + version: 0.0.4(@types/react@18.3.3)(react@18.3.1) typescript: specifier: ^5.5.2 version: 5.5.2 @@ -3720,8 +3720,8 @@ packages: peerDependencies: react: '>=16.8' - react-webgl-trails@0.0.3: - resolution: {integrity: sha512-7a3vY4vyKuidRsyglfLz3R83SOi260/EpJFeZ5MegobkY4LA78YfeV7e32eh3GJAZj9xgRoRX95LVgZAFix6Tg==} + react-webgl-trails@0.0.4: + resolution: {integrity: sha512-jPJLWT5ouwemu51aIgyUdx4bdThx3zkq9HGr3TMSGs7Pl5Mcr+hYP0QKG9m8keH4OLsi0tXpzxnArph1jNSWAA==} peerDependencies: '@types/react': 16.8 - 19 react: 16.8 - 19 @@ -4038,8 +4038,8 @@ packages: resolution: {integrity: sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==} engines: {node: '>=16'} - string-width@7.1.0: - resolution: {integrity: sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} string.prototype.includes@2.0.0: @@ -8204,7 +8204,7 @@ snapshots: is-unicode-supported: 2.0.0 log-symbols: 6.0.0 stdin-discarder: 0.2.2 - string-width: 7.1.0 + string-width: 7.2.0 strip-ansi: 7.1.0 os-tmpdir@1.0.2: {} @@ -8555,7 +8555,7 @@ snapshots: '@remix-run/router': 1.17.0 react: 18.3.1 - react-webgl-trails@0.0.3(@types/react@18.3.3)(react@18.3.1): + react-webgl-trails@0.0.4(@types/react@18.3.3)(react@18.3.1): dependencies: '@types/react': 18.3.3 react: 18.3.1 @@ -8921,7 +8921,7 @@ snapshots: emoji-regex: 10.3.0 strip-ansi: 7.1.0 - string-width@7.1.0: + string-width@7.2.0: dependencies: emoji-regex: 10.3.0 get-east-asian-width: 1.2.0