From 8d85f13ce7bb325660ff0c5d14339a4456964b59 Mon Sep 17 00:00:00 2001 From: mayank1513 Date: Wed, 11 Dec 2024 08:16:58 +0000 Subject: [PATCH] upgrade deps && docs --- ...color-switch_color-switch.ColorSwitch.html | 2 +- ...switcher_theme-switcher.ThemeSwitcher.html | 2 +- docs/functions/constants.useRGSMinify.html | 2 +- .../functions/hooks_use-theme.useTheme-1.html | 2 +- ...er_force-theme_force-theme.ForceTheme.html | 2 +- ...ver-target_server-target.ServerTarget.html | 2 +- ...or-switch._internal_.ColorSwitchProps.html | 8 ++++---- ...her_theme-switcher.ThemeSwitcherProps.html | 10 +++++----- docs/interfaces/constants.ThemeState.html | 8 ++++---- docs/interfaces/hooks_use-theme.UseTheme.html | 4 ++-- ...orce-theme._internal_.ForceThemeProps.html | 8 ++++---- ...r-target._internal_.ServerTargetProps.html | 8 ++++---- .../constants.ColorSchemePreference.html | 2 +- docs/variables/constants.DEFAULT_ID.html | 2 +- pnpm-lock.yaml | 20 +++++++++---------- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/docs/functions/client_color-switch_color-switch.ColorSwitch.html b/docs/functions/client_color-switch_color-switch.ColorSwitch.html index 32ad5f1b..5cb6f540 100644 --- a/docs/functions/client_color-switch_color-switch.ColorSwitch.html +++ b/docs/functions/client_color-switch_color-switch.ColorSwitch.html @@ -13,4 +13,4 @@
export const ColorSwitch = ({ targetId, skipSystem, size, ...props }: ColorSwitchProps) => {
const {
setColorSchemePreference,
resolvedColorScheme: rcs,
colorSchemePreference: csp,
} = useTheme(targetId);
const toggleColorScheme = () => {
switch (csp) {
case "dark":
setColorSchemePreference("light");
break;
case "light":
setColorSchemePreference(skipSystem ? "dark" : "system");
break;
case "system":
default:
setColorSchemePreference("dark");
break;
}
};
return (
<button
className={["nthul--color-switch", rcs, csp === "system" ? "system" : ""].join(" ")}
data-testid="color-switch"
{...props}
onClick={toggleColorScheme}
// @ts-expect-error -- setting custom attribute
style={{ "--size": `${size}px` }}
type="button"
/>
);
};
-
+
diff --git a/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html b/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html index a51718bb..2f28b397 100644 --- a/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html +++ b/docs/functions/client_theme-switcher_theme-switcher.ThemeSwitcher.html @@ -1,3 +1,3 @@ ThemeSwitcher | React18 Loaders

The core ThemeSwitcher component wich applies classes and transitions. Cookies are set only if corresponding ServerTarget is detected.

-
+
diff --git a/docs/functions/constants.useRGSMinify.html b/docs/functions/constants.useRGSMinify.html index 02a31f3f..ac1281ff 100644 --- a/docs/functions/constants.useRGSMinify.html +++ b/docs/functions/constants.useRGSMinify.html @@ -1,2 +1,2 @@ useRGSMinify | React18 Loaders

To avoid multiple r18gs imports

-
+
diff --git a/docs/functions/hooks_use-theme.useTheme-1.html b/docs/functions/hooks_use-theme.useTheme-1.html index 2365f7cc..9e31a65c 100644 --- a/docs/functions/hooks_use-theme.useTheme-1.html +++ b/docs/functions/hooks_use-theme.useTheme-1.html @@ -1,4 +1,4 @@ useTheme | React18 Loaders

use this hook to gain access to theme state and setters from your components.

  • Parameters

    • OptionaltargetId: string

      targetId corresponding to ThemeSwitcher and others tied to specific container.

    Returns UseTheme

    themeState and setter fucntions

    -
+
diff --git a/docs/functions/server_force-theme_force-theme.ForceTheme.html b/docs/functions/server_force-theme_force-theme.ForceTheme.html index b80cc07a..7b07da0d 100644 --- a/docs/functions/server_force-theme_force-theme.ForceTheme.html +++ b/docs/functions/server_force-theme_force-theme.ForceTheme.html @@ -1 +1 @@ -ForceTheme | React18 Loaders

ForceTheme

+ForceTheme | React18 Loaders

ForceTheme

diff --git a/docs/functions/server_server-target_server-target.ServerTarget.html b/docs/functions/server_server-target_server-target.ServerTarget.html index 601f1f31..c3a510d7 100644 --- a/docs/functions/server_server-target_server-target.ServerTarget.html +++ b/docs/functions/server_server-target_server-target.ServerTarget.html @@ -2,4 +2,4 @@
<html>
...
<body>
<ServerTarget />
...
</body>
</html>
-
+
diff --git a/docs/interfaces/client_color-switch_color-switch._internal_.ColorSwitchProps.html b/docs/interfaces/client_color-switch_color-switch._internal_.ColorSwitchProps.html index 330c2bfe..b3d3ad3b 100644 --- a/docs/interfaces/client_color-switch_color-switch._internal_.ColorSwitchProps.html +++ b/docs/interfaces/client_color-switch_color-switch._internal_.ColorSwitchProps.html @@ -1,7 +1,7 @@ -ColorSwitchProps | React18 Loaders
interface ColorSwitchProps {
    size?: number;
    skipSystem?: boolean;
    targetId?: string;
}

Hierarchy

Properties

size? +ColorSwitchProps | React18 Loaders
interface ColorSwitchProps {
    size?: number;
    skipSystem?: boolean;
    targetId?: string;
}

Hierarchy

Properties

size?: number

Diameter of the color switch

-
skipSystem?: boolean

Skip system colorScheme while toggling

-
targetId?: string

id of target element if you are applying theme only to specific container. Should be same as corresponding ThemeSwitcher, etc.

-
+
skipSystem?: boolean

Skip system colorScheme while toggling

+
targetId?: string

id of target element if you are applying theme only to specific container. Should be same as corresponding ThemeSwitcher, etc.

+
diff --git a/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html b/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html index 4934d273..130adda1 100644 --- a/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html +++ b/docs/interfaces/client_theme-switcher_theme-switcher.ThemeSwitcherProps.html @@ -1,9 +1,9 @@ -ThemeSwitcherProps | React18 Loaders
interface ThemeSwitcherProps {
    dontSync?: boolean;
    styles?: Record<string, string>;
    targetId?: string;
    themeTransition?: string;
}

Properties

dontSync? +ThemeSwitcherProps | React18 Loaders
interface ThemeSwitcherProps {
    dontSync?: boolean;
    styles?: Record<string, string>;
    targetId?: string;
    themeTransition?: string;
}

Properties

dontSync?: boolean

To stop persisting and syncing theme between tabs.

-
styles?: Record<string, string>

provide styles object imported from CSS/SCSS modules, if you are using CSS/SCSS modules.

-
targetId?: string

id of target element to apply classes to. This is useful when you want to apply theme only to specific container.

-
themeTransition?: string

force apply CSS transition property to all the elements during theme switching. E.g., all .3s

-
+
styles?: Record<string, string>

provide styles object imported from CSS/SCSS modules, if you are using CSS/SCSS modules.

+
targetId?: string

id of target element to apply classes to. This is useful when you want to apply theme only to specific container.

+
themeTransition?: string

force apply CSS transition property to all the elements during theme switching. E.g., all .3s

+
diff --git a/docs/interfaces/constants.ThemeState.html b/docs/interfaces/constants.ThemeState.html index dff675df..050dfb98 100644 --- a/docs/interfaces/constants.ThemeState.html +++ b/docs/interfaces/constants.ThemeState.html @@ -1,7 +1,7 @@ -ThemeState | React18 Loaders
interface ThemeState {
    c: ColorSchemePreference;
    s: "dark" | "light";
    t: string;
}

Properties

c +ThemeState | React18 Loaders
interface ThemeState {
    c: ColorSchemePreference;
    s: "dark" | "light";
    t: string;
}

Properties

c s t

Properties

ColorSchemePreference

-
s: "dark" | "light"

SystemColorScheme

-
t: string

Theme

-
+
s: "dark" | "light"

SystemColorScheme

+
t: string

Theme

+
diff --git a/docs/interfaces/hooks_use-theme.UseTheme.html b/docs/interfaces/hooks_use-theme.UseTheme.html index 6afa69e6..6c4aa81c 100644 --- a/docs/interfaces/hooks_use-theme.UseTheme.html +++ b/docs/interfaces/hooks_use-theme.UseTheme.html @@ -1,7 +1,7 @@ -UseTheme | React18 Loaders
interface UseTheme {
    colorSchemePreference: ColorSchemePreference;
    resolvedColorScheme: "dark" | "light";
    setColorSchemePreference: (
        colorSchemePreference: ColorSchemePreference,
    ) => void;
    setTheme: (theme: string) => void;
    systemColorScheme: "dark" | "light";
    theme: string;
}

Properties

colorSchemePreference +UseTheme | React18 Loaders
interface UseTheme {
    colorSchemePreference: ColorSchemePreference;
    resolvedColorScheme: "dark" | "light";
    setColorSchemePreference: (
        colorSchemePreference: ColorSchemePreference,
    ) => void;
    setTheme: (theme: string) => void;
    systemColorScheme: "dark" | "light";
    theme: string;
}

Properties

colorSchemePreference: ColorSchemePreference
resolvedColorScheme: "dark" | "light"
setColorSchemePreference: (colorSchemePreference: ColorSchemePreference) => void
setTheme: (theme: string) => void
systemColorScheme: "dark" | "light"
theme: string
+

Properties

colorSchemePreference: ColorSchemePreference
resolvedColorScheme: "dark" | "light"
setColorSchemePreference: (colorSchemePreference: ColorSchemePreference) => void
setTheme: (theme: string) => void
systemColorScheme: "dark" | "light"
theme: string
diff --git a/docs/interfaces/server_force-theme_force-theme._internal_.ForceThemeProps.html b/docs/interfaces/server_force-theme_force-theme._internal_.ForceThemeProps.html index 7229e849..10d7643a 100644 --- a/docs/interfaces/server_force-theme_force-theme._internal_.ForceThemeProps.html +++ b/docs/interfaces/server_force-theme_force-theme._internal_.ForceThemeProps.html @@ -1,10 +1,10 @@ -ForceThemeProps | React18 Loaders
interface ForceThemeProps {
    children?: ReactNode;
    colorScheme?: "dark" | "light";
    styles?: Record<string, string>;
    tag?: undefined;
    theme?: string;
}

Hierarchy

Properties

children? +ForceThemeProps | React18 Loaders
interface ForceThemeProps {
    children?: ReactNode;
    colorScheme?: "dark" | "light";
    styles?: Record<string, string>;
    tag?: undefined;
    theme?: string;
}

Hierarchy

Properties

children?: ReactNode
colorScheme?: "dark" | "light"
styles?: Record<string, string>

provide styles object if you are using CSS/SCSS modules.

-
tag?: undefined
'div'
+

Properties

children?: ReactNode
colorScheme?: "dark" | "light"
styles?: Record<string, string>

provide styles object if you are using CSS/SCSS modules.

+
tag?: undefined
'div'
 
-
theme?: string
+
theme?: string
diff --git a/docs/interfaces/server_server-target_server-target._internal_.ServerTargetProps.html b/docs/interfaces/server_server-target_server-target._internal_.ServerTargetProps.html index cd91a136..7f36be7e 100644 --- a/docs/interfaces/server_server-target_server-target._internal_.ServerTargetProps.html +++ b/docs/interfaces/server_server-target_server-target._internal_.ServerTargetProps.html @@ -1,13 +1,13 @@ -ServerTargetProps | React18 Loaders
interface ServerTargetProps {
    styles?: Record<string, string>;
    tag?: undefined;
    targetId?: string;
}

Properties

styles? +ServerTargetProps | React18 Loaders
interface ServerTargetProps {
    styles?: Record<string, string>;
    tag?: undefined;
    targetId?: string;
}

Properties

styles?: Record<string, string>

provide styles object if you are using CSS/SCSS modules.

-
tag?: undefined
'div'
+
tag?: undefined
'div'
 
-
targetId?: string

id of target element if you are applying theme only to specific container. +

targetId?: string

id of target element if you are applying theme only to specific container. make sure you pass same targetId to corresponding ThemeSwitcher, ColorSwitch and useTheme hook as well.

undefined
 
-
+
diff --git a/docs/types/constants.ColorSchemePreference.html b/docs/types/constants.ColorSchemePreference.html index e670474d..b587b79d 100644 --- a/docs/types/constants.ColorSchemePreference.html +++ b/docs/types/constants.ColorSchemePreference.html @@ -1 +1 @@ -ColorSchemePreference | React18 Loaders

Type Alias ColorSchemePreference

ColorSchemePreference: "system" | "dark" | "light"
+ColorSchemePreference | React18 Loaders

Type Alias ColorSchemePreference

ColorSchemePreference: "system" | "dark" | "light"
diff --git a/docs/variables/constants.DEFAULT_ID.html b/docs/variables/constants.DEFAULT_ID.html index 3ffe23dd..e2566cae 100644 --- a/docs/variables/constants.DEFAULT_ID.html +++ b/docs/variables/constants.DEFAULT_ID.html @@ -1,2 +1,2 @@ DEFAULT_ID | React18 Loaders

Variable DEFAULT_IDConst

DEFAULT_ID: "nthul"

shared constants -- keep in separate files for better tree-shaking and dependency injection

-
+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c41da128..a3f91872 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1878,8 +1878,8 @@ packages: '@shikijs/types@1.24.2': resolution: {integrity: sha512-bdeWZiDtajGLG9BudI0AHet0b6e7FbR0EsE4jpGaI0YwHm/XJunI9+3uZnzFtX65gsyJ6ngCIWUfA4NWRPnBkQ==} - '@shikijs/vscode-textmate@9.3.0': - resolution: {integrity: sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA==} + '@shikijs/vscode-textmate@9.3.1': + resolution: {integrity: sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==} '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -2047,8 +2047,8 @@ packages: peerDependencies: '@types/react': ^19.0.0 - '@types/react@18.3.15': - resolution: {integrity: sha512-XQzbwkCwrsabawgWsvDDwsDTRuH1sf6Uj1fnFYoG03ZXfT54/aBvlylKR9ix70pXAtTn8dFzj358zVcZN4m83w==} + '@types/react@18.3.16': + resolution: {integrity: sha512-oh8AMIC4Y2ciKufU8hnKgs+ufgbA/dhPTACaZPM86AbwX9QwnFtSoPWEeRUj8fge+v6kFt78BXcDhAU1SrrAsw==} '@types/react@19.0.1': resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==} @@ -7814,7 +7814,7 @@ snapshots: dependencies: '@shikijs/engine-oniguruma': 1.24.2 '@shikijs/types': 1.24.2 - '@shikijs/vscode-textmate': 9.3.0 + '@shikijs/vscode-textmate': 9.3.1 '@humanfs/core@0.19.1': {} @@ -8540,7 +8540,7 @@ snapshots: dependencies: '@remix-run/router': 1.3.1 '@types/cookie': 0.4.1 - '@types/react': 18.3.15 + '@types/react': 18.3.16 '@web3-storage/multipart-parser': 1.0.0 cookie: 0.4.2 set-cookie-parser: 2.7.1 @@ -8650,14 +8650,14 @@ snapshots: '@shikijs/engine-oniguruma@1.24.2': dependencies: '@shikijs/types': 1.24.2 - '@shikijs/vscode-textmate': 9.3.0 + '@shikijs/vscode-textmate': 9.3.1 '@shikijs/types@1.24.2': dependencies: - '@shikijs/vscode-textmate': 9.3.0 + '@shikijs/vscode-textmate': 9.3.1 '@types/hast': 3.0.4 - '@shikijs/vscode-textmate@9.3.0': {} + '@shikijs/vscode-textmate@9.3.1': {} '@sinclair/typebox@0.27.8': {} @@ -8843,7 +8843,7 @@ snapshots: dependencies: '@types/react': 19.0.1 - '@types/react@18.3.15': + '@types/react@18.3.16': dependencies: '@types/prop-types': 15.7.14 csstype: 3.1.3