From edea138e000b4ba8a79608e8c91e1bce201a3b3b Mon Sep 17 00:00:00 2001 From: mayank1513 Date: Wed, 9 Oct 2024 16:14:01 +0000 Subject: [PATCH] upgrade deps && docs --- ...nt_color_switch_color_switch.ColorSwitch.html | 2 +- ...me_switcher_theme_switcher.ThemeSwitcher.html | 2 +- docs/functions/constants.useRGSMinify.html | 2 +- docs/functions/hooks_use_theme.useTheme-1.html | 2 +- ...erver_force_theme_force_theme.ForceTheme.html | 2 +- ...server_target_server_target.ServerTarget.html | 2 +- ...color_switch._internal_.ColorSwitchProps.html | 8 ++++---- ...itcher_theme_switcher.ThemeSwitcherProps.html | 10 +++++----- docs/interfaces/constants.ThemeState.html | 8 ++++---- docs/interfaces/hooks_use_theme.UseTheme.html | 4 ++-- ...e_force_theme._internal_.ForceThemeProps.html | 8 ++++---- ...rver_target._internal_.ServerTargetProps.html | 8 ++++---- .../client_color_switch_color_switch.html | 2 +- .../client_theme_switcher_theme_switcher.html | 2 +- docs/modules/constants.html | 2 +- docs/modules/hooks_use_theme.html | 2 +- docs/modules/hooks_use_theme_test.html | 2 +- docs/modules/server_force_theme_force_theme.html | 2 +- .../server_server_target_server_target.html | 2 +- docs/types/constants.ColorSchemePreference.html | 2 +- docs/variables/constants.DEFAULT_ID.html | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 22 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/functions/client_color_switch_color_switch.ColorSwitch.html b/docs/functions/client_color_switch_color_switch.ColorSwitch.html index 952d8879..9e3b9f6c 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 7246060b..bc5f6c32 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 44316105..2bdfe13c 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 6f6b5002..c0d369b6 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 429356b9..b0c41407 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 c90f1743..703959ff 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 2f544055..67645f79 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 3fbb6164..341bc6f2 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 2dba7830..6d7c3b46 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 487dfa75..2b9b0bc5 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 9e307f8e..b0d9df2a 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?: keyof IntrinsicElements;
    theme?: string;
}

Hierarchy

Properties

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

Hierarchy

Properties

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

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

-
tag?: keyof IntrinsicElements
'div'
+

Properties

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

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

+
tag?: keyof IntrinsicElements
'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 3a93142d..b4cba9bc 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?: keyof IntrinsicElements;
    targetId?: string;
}

Properties

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

Properties

styles?: Record<string, string>

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

-
tag?: keyof IntrinsicElements
'div'
+
tag?: keyof IntrinsicElements
'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/modules/client_color_switch_color_switch.html b/docs/modules/client_color_switch_color_switch.html index 747c07fa..bfb49c7b 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 | React18 Loaders

Module client/color-switch/color-switch

Index

Modules

<internal> +client/color-switch/color-switch | React18 Loaders

Module client/color-switch/color-switch

Index

Modules

Functions

diff --git a/docs/modules/client_theme_switcher_theme_switcher.html b/docs/modules/client_theme_switcher_theme_switcher.html index 68b95f4e..dd5abe61 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 | React18 Loaders

Module client/theme-switcher/theme-switcher

Index

Interfaces

ThemeSwitcherProps +client/theme-switcher/theme-switcher | React18 Loaders
diff --git a/docs/modules/constants.html b/docs/modules/constants.html index 4bfc1c0a..ff04ef80 100644 --- a/docs/modules/constants.html +++ b/docs/modules/constants.html @@ -1,4 +1,4 @@ -constants | React18 Loaders

Module constants

Index

Interfaces

ThemeState +constants | React18 Loaders

Module constants

Index

Interfaces

Type Aliases

Variables

Functions

useRGSMinify diff --git a/docs/modules/hooks_use_theme.html b/docs/modules/hooks_use_theme.html index 321c362f..334608e6 100644 --- a/docs/modules/hooks_use_theme.html +++ b/docs/modules/hooks_use_theme.html @@ -1,3 +1,3 @@ -hooks/use-theme | React18 Loaders

Module hooks/use-theme

Index

Interfaces

UseTheme +hooks/use-theme | React18 Loaders

Module hooks/use-theme

Index

Interfaces

Functions

diff --git a/docs/modules/hooks_use_theme_test.html b/docs/modules/hooks_use_theme_test.html index 8478d624..a7b97356 100644 --- a/docs/modules/hooks_use_theme_test.html +++ b/docs/modules/hooks_use_theme_test.html @@ -1 +1 @@ -hooks/use-theme.test | React18 Loaders
+hooks/use-theme.test | React18 Loaders
diff --git a/docs/modules/server_force_theme_force_theme.html b/docs/modules/server_force_theme_force_theme.html index c54a8486..5f6fd8b4 100644 --- a/docs/modules/server_force_theme_force_theme.html +++ b/docs/modules/server_force_theme_force_theme.html @@ -1,3 +1,3 @@ -server/force-theme/force-theme | React18 Loaders

Module server/force-theme/force-theme

Index

Modules

<internal> +server/force-theme/force-theme | React18 Loaders

Module server/force-theme/force-theme

Index

Modules

Functions

diff --git a/docs/modules/server_server_target_server_target.html b/docs/modules/server_server_target_server_target.html index 2731722f..7ea52aec 100644 --- a/docs/modules/server_server_target_server_target.html +++ b/docs/modules/server_server_target_server_target.html @@ -1,3 +1,3 @@ -server/server-target/server-target | React18 Loaders

Module server/server-target/server-target

Index

Modules

<internal> +server/server-target/server-target | React18 Loaders

Module server/server-target/server-target

Index

Modules

Functions

diff --git a/docs/types/constants.ColorSchemePreference.html b/docs/types/constants.ColorSchemePreference.html index 67101fa2..1f0c3cc5 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 9911a253..3b596ab3 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 907ffd8d..0f4e31f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2794,8 +2794,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.33: - resolution: {integrity: sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==} + electron-to-chromium@1.5.34: + resolution: {integrity: sha512-/TZAiChbAflBNjCg+VvstbcwAtIL/VdMFO3NgRFIzBjpvPzWOTIbbO8kNb6RwU4bt9TP7K+3KqBKw/lOU+Y+GA==} emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} @@ -5006,8 +5006,8 @@ packages: package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - package-manager-detector@0.2.1: - resolution: {integrity: sha512-/hVW2fZvAdEas+wyKh0SnlZ2mx0NIa1+j11YaQkogEJkcMErbwchHCuo8z7lEtajZJQZ6rgZNVTWMVVd71Bjng==} + package-manager-detector@0.2.2: + resolution: {integrity: sha512-VgXbyrSNsml4eHWIvxxG/nTL4wgybMTXCV2Un/+yEc3aDKKU6nQBZjbeP3Pl3qm9Qg92X/1ng4ffvCeD/zwHgg==} pako@0.2.9: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} @@ -7120,7 +7120,7 @@ snapshots: fs-extra: 7.0.1 mri: 1.2.0 p-limit: 2.3.0 - package-manager-detector: 0.2.1 + package-manager-detector: 0.2.2 picocolors: 1.1.0 resolve-from: 5.0.0 semver: 7.6.3 @@ -8986,7 +8986,7 @@ snapshots: browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001667 - electron-to-chromium: 1.5.33 + electron-to-chromium: 1.5.34 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -9491,7 +9491,7 @@ snapshots: dependencies: jake: 10.9.2 - electron-to-chromium@1.5.33: {} + electron-to-chromium@1.5.34: {} emittery@0.13.1: {} @@ -12655,7 +12655,7 @@ snapshots: package-json-from-dist@1.0.1: {} - package-manager-detector@0.2.1: {} + package-manager-detector@0.2.2: {} pako@0.2.9: {}