@olwiba/cn 0.1.59 → 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 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 returns `'dark'`, matching ThemeScript's own default for a visitor with
1164
- * no stored preference. A first client render still reports the real class, so
1165
- * a light-theme visitor does not get a dark-flavoured asset requested and then
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(read);
7563
+ const [theme, setTheme] = React39.useState("dark");
7564
7564
  React39.useEffect(() => {
7565
7565
  setTheme(read());
7566
7566
  const observer = new MutationObserver(() => setTheme(read()));