@kolkrabbi/kol-framework 0.26.0 → 0.27.1

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.26.0",
3
+ "version": "0.27.1",
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,7 +20,7 @@
20
20
  "react-router-dom": "^6.0.0 || ^7.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@kolkrabbi/kol-component": "^0.80.0",
23
+ "@kolkrabbi/kol-component": "^0.81.0",
24
24
  "@kolkrabbi/kol-icons": "^0.18.0"
25
25
  },
26
26
  "files": [
package/src/AppShell.jsx CHANGED
@@ -44,7 +44,12 @@ export default function AppShell({ navTree = [], getActivePage: _getActivePage,
44
44
  <ShellTocContext.Provider value={setTocContent}>
45
45
  <ShellTocCollapsedContext.Provider value={setTocCollapsed}>
46
46
  <div
47
- className="kol-brand-layout"
47
+ /* the PAGE is surface-tertiary, the rail surface-primary — the brand
48
+ * split (appshell-content-surface, kol-studio 2026-08-26, user:
49
+ * "sidenav primary, site tertiary, like brand"). BrandLayout's own
50
+ * line, verbatim; the fork dropped it on 2026-08-09 and every
51
+ * AppShell app rendered one flat colour. */
52
+ className="kol-brand-layout bg-surface-tertiary min-h-dvh"
48
53
  data-drawer-open={drawerOpen ? 'true' : undefined}
49
54
  data-toc={showToc ? 'true' : undefined}
50
55
  >
@@ -64,6 +64,11 @@ import { useTheme } from './theme.js'
64
64
  * sees) and one click commits it. The reset lives behind a modifier — alt- or
65
65
  * shift-click — which is the "separate affordance" the ruling allows, with no
66
66
  * new chrome and no third stop. */
67
+ /* The VISIBLE label names the TARGET, not the state (ThemeToggleLabelTarget,
68
+ * user 2026-08-27: "should it not say dark mode in light mode and vice versa?
69
+ * as to what the button actually does when you click it?"). A button's label
70
+ * names its action — the aria-label / title always said "Switch to …"; the eye
71
+ * was told the opposite. Rendered as MODE_LABEL[next], never MODE_LABEL[shown]. */
67
72
  const MODE_LABEL = { light: 'Light mode', dark: 'Dark mode' }
68
73
  const SLOT = { dark: 0, light: 1 }
69
74
 
@@ -171,7 +176,7 @@ export default function ThemeToggle({
171
176
  {iconSwap(bare ? glyphWithText : glyphSolo)}
172
177
  </span>
173
178
  <span className="kol-sidenav-hop-label flex-1 min-w-0 text-left">
174
- {MODE_LABEL[shown]}
179
+ {MODE_LABEL[next]}
175
180
  </span>
176
181
  </button>
177
182
  )
@@ -186,7 +191,7 @@ export default function ThemeToggle({
186
191
  return (
187
192
  <button {...shared} className={cls.replace(/\s+/g, ' ').trim()}>
188
193
  {!iconRight && iconSwap(glyph)}
189
- {label && <span className={fullWidth ? 'flex-1 min-w-0 text-left' : ''}>{MODE_LABEL[shown]}</span>}
194
+ {label && <span className={fullWidth ? 'flex-1 min-w-0 text-left' : ''}>{MODE_LABEL[next]}</span>}
190
195
  {iconRight && iconSwap(glyph)}
191
196
  </button>
192
197
  )
@@ -207,7 +212,7 @@ export default function ThemeToggle({
207
212
  return (
208
213
  <button {...shared} className={`kol-theme-toggle ${fillCls} kol-btn-${size} ${mono} gap-2 ${width} ${className}`.replace(/\s+/g, ' ').trim()}>
209
214
  {!iconRight && iconSwap(glyphWithText)}
210
- <span className={fullWidth ? 'flex-1 min-w-0 text-left' : ''}>{MODE_LABEL[shown]}</span>
215
+ <span className={fullWidth ? 'flex-1 min-w-0 text-left' : ''}>{MODE_LABEL[next]}</span>
211
216
  {iconRight && iconSwap(glyphWithText)}
212
217
  </button>
213
218
  )