@kolkrabbi/kol-shell 0.16.0 → 0.16.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 +4 -4
- package/src/NavRail.jsx +8 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.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.
|
|
15
|
+
"@kolkrabbi/kol-component": ">=0.126.0",
|
|
16
16
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
17
17
|
"@kolkrabbi/kol-theme": ">=0.84.0",
|
|
18
18
|
"gsap": "^3.13.0",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@kolkrabbi/kol-component": "^0.
|
|
24
|
-
"@kolkrabbi/kol-framework": "^0.35.0",
|
|
23
|
+
"@kolkrabbi/kol-component": "^0.126.0",
|
|
25
24
|
"@kolkrabbi/kol-icons": "^0.24.0",
|
|
25
|
+
"@kolkrabbi/kol-framework": "^0.35.0",
|
|
26
26
|
"@kolkrabbi/kol-theme": "^0.88.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
package/src/NavRail.jsx
CHANGED
|
@@ -53,10 +53,12 @@ const openWidth = () => {
|
|
|
53
53
|
|
|
54
54
|
/* THE GRAB EDGE — proximity, not contact: the pill wakes within `GRAB.near` of
|
|
55
55
|
* the line and sleeps only past `GRAB.sleep` (hovering the line itself flapped
|
|
56
|
-
* the class every frame and restarted the fade). Along the line it
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
56
|
+
* the class every frame and restarted the fade). Along the line it DWELLS (user
|
|
57
|
+
* ruling 2026-08-28: "make it come to the cursor but have some sticky time where
|
|
58
|
+
* it lands, so it's not constantly jerking"): it targets the pointer's own
|
|
59
|
+
* position and re-targets only once the pointer is `GRAB.stick` px away, so it
|
|
60
|
+
* lands on you, holds while you move inside the radius, then travels to where you
|
|
61
|
+
* are now. One window listener, rAF-throttled. */
|
|
60
62
|
function useGrabEdge(ref) {
|
|
61
63
|
useEffect(() => {
|
|
62
64
|
let raf = 0
|
|
@@ -71,11 +73,8 @@ function useGrabEdge(ref) {
|
|
|
71
73
|
const near = dist <= GRAB.near || (h.classList.contains('is-near') && dist <= GRAB.sleep)
|
|
72
74
|
h.classList.toggle('is-near', near)
|
|
73
75
|
if (!near) return
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
if (h.dataset.grabSeeded && Math.abs(frac - mark) > GRAB.stick) return
|
|
77
|
-
const along = mark * r.height
|
|
78
|
-
if (h.dataset.grabSeeded && along === Number(h.dataset.grabTarget)) return
|
|
76
|
+
const along = Math.min(Math.max(clientY - r.top, 0), r.height)
|
|
77
|
+
if (h.dataset.grabSeeded && Math.abs(along - Number(h.dataset.grabTarget)) < GRAB.stick) return
|
|
79
78
|
h.dataset.grabTarget = String(along)
|
|
80
79
|
const vars = { '--kol-rail-grab-y': `${along}px` }
|
|
81
80
|
/* the CSS fallback is 50%, a percentage — nothing to tween from, so the
|