@kolkrabbi/kol-framework 0.54.0 → 0.55.0
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/package.json +2 -2
- package/src/theme.js +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"description": "Site shell and page layout",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react-router-dom": "^6.0.0 || ^7.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@kolkrabbi/kol-component": "^0.
|
|
25
|
+
"@kolkrabbi/kol-component": "^0.301.0",
|
|
26
26
|
"@kolkrabbi/kol-icons": "^0.45.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
package/src/theme.js
CHANGED
|
@@ -63,6 +63,12 @@ export function applyTheme(theme) {
|
|
|
63
63
|
if (theme === 'system') {
|
|
64
64
|
delete document.documentElement.dataset.theme
|
|
65
65
|
try { localStorage.removeItem(THEME_STORAGE_KEY) } catch { /* storage blocked */ }
|
|
66
|
+
/* THE APP'S DEFAULT STANDS IN FOR THE OS (AppHubDefaultTheme, kol-mirror 2026-10-24 — user: *"make this repo dark
|
|
67
|
+
* mode default"*): a dark-first app stamps `data-theme-default="dark"` on the root (the Hub does it from
|
|
68
|
+
* `defaultTheme`), and handing the page back to the system lands on that, not on prefers-color-scheme — stamped,
|
|
69
|
+
* never persisted, so the saved choice stays "none" and a reload stamps the same default again. */
|
|
70
|
+
const fallback = document.documentElement.dataset.themeDefault
|
|
71
|
+
if (fallback === 'light' || fallback === 'dark') document.documentElement.dataset.theme = fallback
|
|
66
72
|
return
|
|
67
73
|
}
|
|
68
74
|
document.documentElement.dataset.theme = theme
|