sveltacular 1.0.31 → 1.0.32
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.
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
const STORAGE_KEY = 'sveltacular-theme';
|
|
21
21
|
const MEDIA_QUERY = '(prefers-color-scheme: dark)';
|
|
22
22
|
class ThemeManager {
|
|
23
|
-
current = $state('
|
|
23
|
+
current = $state('light');
|
|
24
24
|
resolved = $state('light');
|
|
25
25
|
mediaQuery = null;
|
|
26
26
|
initialized = false;
|
|
@@ -33,9 +33,9 @@ class ThemeManager {
|
|
|
33
33
|
if (this.initialized)
|
|
34
34
|
return;
|
|
35
35
|
this.initialized = true;
|
|
36
|
-
// Load saved preference or default to '
|
|
36
|
+
// Load saved preference or default to 'light'
|
|
37
37
|
const saved = localStorage.getItem(STORAGE_KEY);
|
|
38
|
-
this.current = saved || '
|
|
38
|
+
this.current = saved || 'light';
|
|
39
39
|
// Set up media query listener for system preference
|
|
40
40
|
this.mediaQuery = window.matchMedia(MEDIA_QUERY);
|
|
41
41
|
this.updateResolvedTheme();
|