@kolkrabbi/kol-framework 0.27.1 → 0.28.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-framework",
3
- "version": "0.27.1",
3
+ "version": "0.28.0",
4
4
  "description": "KOL app shell — sidenav, layout, theme toggle, footer, heroes + brand color layer. SideNav takes nav data as props so the tree stays app-local.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,8 +20,8 @@
20
20
  "react-router-dom": "^6.0.0 || ^7.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@kolkrabbi/kol-component": "^0.81.0",
24
- "@kolkrabbi/kol-icons": "^0.18.0"
23
+ "@kolkrabbi/kol-component": "^0.99.0",
24
+ "@kolkrabbi/kol-icons": "^0.20.0"
25
25
  },
26
26
  "files": [
27
27
  "src",
package/src/index.js CHANGED
@@ -13,7 +13,7 @@ export { default as SideNav } from './SideNav.jsx'
13
13
  export { default as useDragResize } from './useDragResize.js'
14
14
  export { default as ShellHeader, HEADER_ICON } from './ShellHeader.jsx'
15
15
  export { default as ThemeToggle } from './ThemeToggle.jsx'
16
- export { useTheme, applyTheme, getInitialTheme, THEME_STORAGE_KEY } from './theme.js'
16
+ export { useTheme, applyTheme, getInitialTheme, THEME_STORAGE_KEY, THEME_BOOT_SCRIPT } from './theme.js'
17
17
  export { default as Layout } from './Layout.jsx'
18
18
  export { default as PageSection } from './PageSection.jsx'
19
19
  export { default as PortalFooter } from './PortalFooter.jsx'
package/src/theme.js CHANGED
@@ -18,6 +18,22 @@ import { useEffect, useState } from 'react'
18
18
 
19
19
  export const THEME_STORAGE_KEY = 'kol-theme'
20
20
 
21
+ /* THE NO-FLASH BOOT SNIPPET (ShellHomeSystem, 2026-08-27 — every app hand-wrote
22
+ * it against this file's key): inline it in index.html before the app script.
23
+ * USER law: explicit choice > system > light — a saved light/dark stamps
24
+ * `data-theme` before first paint; no saved choice leaves the page un-stamped
25
+ * so the theme CSS follows the OS live. The versioned cutover (v3, 2026-07-30)
26
+ * discards stamps written by the old two-state toggle, once. */
27
+ export const THEME_BOOT_SCRIPT = `try {
28
+ if (localStorage.getItem('kol-theme-v') !== '3') {
29
+ localStorage.removeItem('kol-theme')
30
+ localStorage.removeItem('theme')
31
+ localStorage.setItem('kol-theme-v', '3')
32
+ }
33
+ var t = localStorage.getItem('kol-theme')
34
+ if (t === 'light' || t === 'dark') document.documentElement.dataset.theme = t
35
+ } catch (e) {}`
36
+
21
37
  function getExplicitTheme() {
22
38
  const attr = document.documentElement.dataset.theme
23
39
  if (attr === 'light' || attr === 'dark') return attr