@kolkrabbi/kol-shell 0.17.0 → 0.17.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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/NavRail.jsx +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-shell",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
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",
@@ -12,7 +12,7 @@
12
12
  "./src/*": "./src/*"
13
13
  },
14
14
  "peerDependencies": {
15
- "@kolkrabbi/kol-component": ">=0.126.0",
15
+ "@kolkrabbi/kol-component": ">=0.127.0",
16
16
  "@kolkrabbi/kol-icons": ">=0.16.0",
17
17
  "@kolkrabbi/kol-theme": ">=0.84.0",
18
18
  "gsap": "^3.13.0",
@@ -20,8 +20,8 @@
20
20
  "react-dom": "^18.3.0 || ^19.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@kolkrabbi/kol-component": "^0.126.0",
24
23
  "@kolkrabbi/kol-framework": "^0.35.0",
24
+ "@kolkrabbi/kol-component": "^0.127.0",
25
25
  "@kolkrabbi/kol-icons": "^0.24.0",
26
26
  "@kolkrabbi/kol-theme": "^0.88.0"
27
27
  },
package/src/NavRail.jsx CHANGED
@@ -81,7 +81,8 @@ const openWidth = () => {
81
81
  * it lands, so it's not constantly jerking"): it targets the pointer's own
82
82
  * position and re-targets only once the pointer is `GRAB.stick` px away, so it
83
83
  * lands on you, holds while you move inside the radius, then travels to where you
84
- * are now. One window listener, rAF-throttled. */
84
+ * are now — inside `GRAB.range`, the middle band of the edge, so it never rides
85
+ * up beside the logomark. One window listener, rAF-throttled. */
85
86
  function useGrabEdge(ref) {
86
87
  useEffect(() => {
87
88
  let raf = 0
@@ -96,7 +97,9 @@ function useGrabEdge(ref) {
96
97
  const near = dist <= GRAB.near || (h.classList.contains('is-near') && dist <= GRAB.sleep)
97
98
  h.classList.toggle('is-near', near)
98
99
  if (!near) return
99
- const along = Math.min(Math.max(clientY - r.top, 0), r.height)
100
+ /* the travel band: bipolar from the middle, GRAB.range of the height */
101
+ const edge = (r.height * (1 - GRAB.range)) / 2
102
+ const along = Math.min(Math.max(clientY - r.top, edge), r.height - edge)
100
103
  if (h.dataset.grabSeeded && Math.abs(along - Number(h.dataset.grabTarget)) < GRAB.stick) return
101
104
  h.dataset.grabTarget = String(along)
102
105
  const vars = { '--kol-rail-grab-y': `${along}px` }