@kolkrabbi/kol-shell 0.37.1 → 0.39.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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/NavRail.jsx +26 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-shell",
3
- "version": "0.37.1",
3
+ "version": "0.39.0",
4
4
  "private": false,
5
5
  "description": "KOL application shell — fixed 48px NavRail + AppShell layout root, PageShell/PageHeader scaffolds, ContentFilters catalog organism, GridCard, SettingsScaffold, WalkthroughPanel, ShortcutsOverlay. App chrome (kol-framework owns site chrome). Nav items, content, shortcuts and settings are consumer-injected. Sits above @kolkrabbi/kol-{theme,component,framework}.",
6
6
  "license": "MIT",
@@ -20,10 +20,10 @@
20
20
  "react-dom": "^18.3.0 || ^19.0.0"
21
21
  },
22
22
  "devDependencies": {
23
+ "@kolkrabbi/kol-component": "^0.161.0",
23
24
  "@kolkrabbi/kol-framework": "^0.36.0",
24
- "@kolkrabbi/kol-component": "^0.156.0",
25
25
  "@kolkrabbi/kol-icons": "^0.25.0",
26
- "@kolkrabbi/kol-theme": "^0.122.0"
26
+ "@kolkrabbi/kol-theme": "^0.128.0"
27
27
  },
28
28
  "files": [
29
29
  "src",
package/src/NavRail.jsx CHANGED
@@ -119,7 +119,9 @@ function useRailDrag(railRef, grabRef, onSnap, snapRef, enabled = true) {
119
119
  * a consumer setting `--kol-shell-rail-width` from outside widens the rail
120
120
  * but leaves `railOpen` false, and the L2 rows render behind it: a wide,
121
121
  * EMPTY rail, worse than the dead press this fixes. */
122
- if (snapRef) snapRef.current = () => snapTo(openWidth())
122
+ /* `(false)` closes, anything else opens — the same seam the L2 rows use
123
+ * to open, now also the tap opener's toggle */
124
+ if (snapRef) snapRef.current = (open = true) => snapTo(open === false ? CLOSED : openWidth())
123
125
  const onDown = (e) => {
124
126
  strip.setPointerCapture(e.pointerId)
125
127
  gsap.killTweensOf(root)
@@ -295,7 +297,29 @@ export default function NavRail({
295
297
  * zeroed in drawer mode so the content gets the whole viewport back. */
296
298
  style={{ width: drawer ? 'var(--kol-shell-drawer-width, 240px)' : `var(${RAIL_W})` }}
297
299
  >
298
- {!drawer && <div ref={grabRef} className="kol-rail-grab" />}
300
+ {!drawer && (
301
+ /* A BUTTON, and on touch A THICKER LINE (ShellRailCollapsedWithTapOpen,
302
+ * kol-mirror 2026-09-01; corrected by RailGrabTapIsALine, kol-monitor
303
+ * 2026-09-02 — user: "it was a thicker line" · "who decided it should be
304
+ * a chevron?"): `touch="shell"` keeps the 48px rail visible and its
305
+ * only opener was this 8px strip, whose pill wakes on pointer
306
+ * PROXIMITY — a thumb never hovers. The 0.38.0 answer was a disc with a
307
+ * chevron; that was the DS agent's shape, not the user's ruling. The
308
+ * opener is the strip ITSELF: under `(pointer: coarse)` the theme
309
+ * widens it to a thumb-sized hit and shows the pill thick at rest — the
310
+ * same affordance a fine pointer drags, no glyph. A press with no travel
311
+ * already toggled; it just had no hit area on touch. The drag hook binds
312
+ * pointer events, so a button works exactly as the div did, and it says
313
+ * what it is. Enter/Space toggle for the keyboard. */
314
+ <button
315
+ type="button"
316
+ ref={grabRef}
317
+ className="kol-rail-grab"
318
+ aria-label={railOpen ? 'Collapse navigation' : 'Expand navigation'}
319
+ aria-expanded={railOpen}
320
+ onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); snapOpenRef.current?.(!railOpen) } }}
321
+ />
322
+ )}
299
323
  {logomark && (
300
324
  /* the mark, and the app name beside it when open — uppercase like the
301
325
  * rows (user 2026-08-28: "uppercase CONSISTENCY"). The `w-8` centring box