qstd 0.2.3 → 0.2.4
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/CHANGELOG.md +6 -0
- package/dist/react/index.cjs +2 -2
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.4] - 2025-11-24
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Renamed `toggleTheme` to `toggle` in `useTheme` hook for cleaner API
|
|
15
|
+
|
|
10
16
|
## [0.2.3] - 2025-11-24
|
|
11
17
|
|
|
12
18
|
### Changed
|
package/dist/react/index.cjs
CHANGED
|
@@ -3617,7 +3617,7 @@ function useTheme() {
|
|
|
3617
3617
|
return next;
|
|
3618
3618
|
});
|
|
3619
3619
|
};
|
|
3620
|
-
const
|
|
3620
|
+
const toggle = (theme) => {
|
|
3621
3621
|
setStore((prev) => {
|
|
3622
3622
|
const next = {
|
|
3623
3623
|
value: theme ?? (prev.value === "light" ? "dark" : "light"),
|
|
@@ -3627,7 +3627,7 @@ function useTheme() {
|
|
|
3627
3627
|
return next;
|
|
3628
3628
|
});
|
|
3629
3629
|
};
|
|
3630
|
-
return { ...store, update,
|
|
3630
|
+
return { ...store, update, toggle };
|
|
3631
3631
|
}
|
|
3632
3632
|
|
|
3633
3633
|
// src/react/index.ts
|
package/dist/react/index.d.cts
CHANGED
|
@@ -21003,7 +21003,7 @@ type ThemeStore = {
|
|
|
21003
21003
|
*/
|
|
21004
21004
|
declare function useTheme(): {
|
|
21005
21005
|
update: (updates: Partial<ThemeStore>) => void;
|
|
21006
|
-
|
|
21006
|
+
toggle: (theme?: "light" | "dark") => void;
|
|
21007
21007
|
value: Theme;
|
|
21008
21008
|
isManual: boolean;
|
|
21009
21009
|
};
|
package/dist/react/index.d.ts
CHANGED
|
@@ -21003,7 +21003,7 @@ type ThemeStore = {
|
|
|
21003
21003
|
*/
|
|
21004
21004
|
declare function useTheme(): {
|
|
21005
21005
|
update: (updates: Partial<ThemeStore>) => void;
|
|
21006
|
-
|
|
21006
|
+
toggle: (theme?: "light" | "dark") => void;
|
|
21007
21007
|
value: Theme;
|
|
21008
21008
|
isManual: boolean;
|
|
21009
21009
|
};
|
package/dist/react/index.js
CHANGED
|
@@ -3594,7 +3594,7 @@ function useTheme() {
|
|
|
3594
3594
|
return next;
|
|
3595
3595
|
});
|
|
3596
3596
|
};
|
|
3597
|
-
const
|
|
3597
|
+
const toggle = (theme) => {
|
|
3598
3598
|
setStore((prev) => {
|
|
3599
3599
|
const next = {
|
|
3600
3600
|
value: theme ?? (prev.value === "light" ? "dark" : "light"),
|
|
@@ -3604,7 +3604,7 @@ function useTheme() {
|
|
|
3604
3604
|
return next;
|
|
3605
3605
|
});
|
|
3606
3606
|
};
|
|
3607
|
-
return { ...store, update,
|
|
3607
|
+
return { ...store, update, toggle };
|
|
3608
3608
|
}
|
|
3609
3609
|
|
|
3610
3610
|
// src/react/index.ts
|