@kolkrabbi/kol-framework 0.32.0 → 0.33.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/kol-framework.css CHANGED
@@ -146,6 +146,21 @@ body {
146
146
  position: relative;
147
147
  padding: 0.5rem 2.5rem 0.5rem 1.5rem;
148
148
  }
149
+ /* THE HEADER SLOT (RailLogomarkAtTop, kol-fxr 2026-08-28 — user, on the
150
+ * raven in the footer: "why did you move the logo from top to bottom?"): the
151
+ * `header` node sits ABOVE the tree, outside the scroll region, in the hop's
152
+ * own horizontal geometry — its `.kol-sidenav-hop-icon` centres on the icon
153
+ * column collapsed and left-aligns to it expanded, its `.kol-sidenav-hop-label`
154
+ * hides with the labels. 1rem above it; the scroll region's own top pad is the
155
+ * gap to the first row, so the first tree glyph's y is one number in every
156
+ * consumer that passes the same header. */
157
+ .kol-sidenav-header {
158
+ display: flex;
159
+ align-items: center;
160
+ gap: 0.75rem;
161
+ width: 100%;
162
+ padding: 1rem 2.5rem 0 1.5rem;
163
+ }
149
164
  /* the caret rides a PLAIN span (Icon stamps inline-flex on its own element,
150
165
  * which would outrank the collapsed display:none) */
151
166
  .kol-sidenav-hop-caret {
@@ -208,6 +223,7 @@ body {
208
223
  :root[data-sidenav="collapsed"] .kol-brand-layout { grid-template-columns: var(--kol-sidenav-w-collapsed) minmax(0, 1fr); }
209
224
  :root[data-sidenav="collapsed"] .kol-sidenav-hops { padding: 0 0 var(--kol-spacing-4); margin-bottom: var(--kol-spacing-4); }
210
225
  :root[data-sidenav="collapsed"] .kol-sidenav-hop { padding: var(--kol-spacing-2) 0; justify-content: center; gap: 0; }
226
+ :root[data-sidenav="collapsed"] .kol-sidenav-header { padding: 1rem 0 0; justify-content: center; gap: 0; }
211
227
  :root[data-sidenav="collapsed"] .kol-sidenav-hop-label { display: none; }
212
228
  :root[data-sidenav="collapsed"] .kol-sidenav-body { display: none; }
213
229
  :root[data-sidenav="collapsed"] .kol-sidenav-hop-count,
@@ -281,6 +297,7 @@ body {
281
297
  .kol-brand-layout { grid-template-columns: var(--kol-sidenav-w-collapsed) minmax(0, 1fr); }
282
298
  .kol-sidenav-hops { padding: 0 0 var(--kol-spacing-4); margin-bottom: var(--kol-spacing-4); }
283
299
  .kol-sidenav-hop { padding: var(--kol-spacing-2) 0; justify-content: center; gap: 0; }
300
+ .kol-sidenav-header { padding: 1rem 0 0; justify-content: center; gap: 0; }
284
301
  .kol-sidenav-hop-label { display: none; }
285
302
  .kol-sidenav-section { display: none; }
286
303
  .kol-sidenav-body { display: none; }
@@ -303,6 +320,7 @@ body {
303
320
  .kol-sidenav.is-drawer-open { transform: translateX(0); }
304
321
  /* Restore expanded labels + body inside the open drawer (override the rail rules above). */
305
322
  .kol-sidenav.is-drawer-open .kol-sidenav-hop { padding: 8px 0; justify-content: flex-start; gap: 12px; }
323
+ .kol-sidenav.is-drawer-open .kol-sidenav-header { padding: 1rem 2.5rem 0 1.5rem; justify-content: flex-start; gap: 12px; }
306
324
  .kol-sidenav.is-drawer-open .kol-sidenav-hop-label { display: inline; }
307
325
  .kol-sidenav.is-drawer-open .kol-sidenav-section { display: block; }
308
326
  .kol-sidenav.is-drawer-open .kol-sidenav-body { display: block; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-framework",
3
- "version": "0.32.0",
3
+ "version": "0.33.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",
package/src/SideNav.jsx CHANGED
@@ -71,6 +71,14 @@ import useDragResize from './useDragResize'
71
71
  * pixel (fxr measured 48 vs 56 wide, 20 vs 16px glyphs, 40 vs 38 pitch, first
72
72
  * glyph at y 76 vs 26 between the old NavRail and this rail collapsed). The
73
73
  * seams the shell needed, all opt-in, a tree with none of them renders as before:
74
+ * `header` a node ABOVE the tree, outside the scroll region, in the
75
+ * hop's geometry (`.kol-sidenav-header`, kol-framework.css)
76
+ * — the app's logomark (RailLogomarkAtTop, 2026-08-28 —
77
+ * user: "why did you move the logo from top to bottom?").
78
+ * Give it a `.kol-sidenav-hop-icon` span (20px mark on the
79
+ * icon column) and, optionally, a `.kol-sidenav-hop-label`;
80
+ * both follow the collapse. Same node in every consumer =
81
+ * the first tree glyph at one y — the parity contract
74
82
  * `bottomItems` top-level nodes pinned BELOW the theme slot, above the
75
83
  * footer (the shell pins theme → Settings; a Settings row in
76
84
  * the tree landed above the theme instead — "same rail, two
@@ -143,6 +151,7 @@ function SideNavInner({
143
151
  * name; a rail floating over media and a rail without a line are different
144
152
  * choices. */
145
153
  hairline = false,
154
+ header,
146
155
  bottomItems = [],
147
156
  footer,
148
157
  themeToggle = true,
@@ -344,6 +353,8 @@ function SideNavInner({
344
353
  * THE single collapse/resize control — click toggles, drag resizes,
345
354
  * snap-to-default on release, Home/Enter/Space on the keyboard. */}
346
355
 
356
+ {header && <div className="kol-sidenav-header">{header}</div>}
357
+
347
358
  {/* ONLY the tree scrolls (fxr's re-measure, 2026-08-28): the theme slot
348
359
  * and the pinned rows used to sit inside this region, so on a 26-row
349
360
  * collapsed tree they scrolled off below the footer — "pinned" only