@olwiba/cn 0.1.58 → 0.1.60
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/dist/index.d.ts +3 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/preset.css +16 -3
package/dist/index.d.ts
CHANGED
|
@@ -1160,10 +1160,9 @@ declare function useCopyToClipboard(timeout?: number): {
|
|
|
1160
1160
|
* matter who moved it: a switch component, another tab replaying localStorage,
|
|
1161
1161
|
* or devtools.
|
|
1162
1162
|
*
|
|
1163
|
-
* SSR
|
|
1164
|
-
*
|
|
1165
|
-
*
|
|
1166
|
-
* swapped.
|
|
1163
|
+
* SSR and the first client render both report `'dark'`, so the two agree and
|
|
1164
|
+
* hydration is safe whatever the app's ThemeScript default is. The real class
|
|
1165
|
+
* is picked up immediately afterwards, in an effect.
|
|
1167
1166
|
*/
|
|
1168
1167
|
declare function useResolvedTheme(): 'light' | 'dark';
|
|
1169
1168
|
|
package/dist/index.js
CHANGED
|
@@ -7560,7 +7560,7 @@ function useCopyToClipboard(timeout = 2e3) {
|
|
|
7560
7560
|
return { copyToClipboard, isCopied };
|
|
7561
7561
|
}
|
|
7562
7562
|
function useResolvedTheme() {
|
|
7563
|
-
const [theme, setTheme] = React39.useState(
|
|
7563
|
+
const [theme, setTheme] = React39.useState("dark");
|
|
7564
7564
|
React39.useEffect(() => {
|
|
7565
7565
|
setTheme(read());
|
|
7566
7566
|
const observer = new MutationObserver(() => setTheme(read()));
|