@kolkrabbi/kol-shell 0.105.0 → 0.105.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 +3 -3
- package/src/AppShell.jsx +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.105.
|
|
3
|
+
"version": "0.105.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The application shell",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./src/*": "./src/*"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@kolkrabbi/kol-component": ">=0.339.
|
|
15
|
+
"@kolkrabbi/kol-component": ">=0.339.1",
|
|
16
16
|
"@kolkrabbi/kol-framework": ">=0.55.0",
|
|
17
17
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
18
18
|
"@kolkrabbi/kol-theme": ">=0.211.1",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@kolkrabbi/kol-component": "^0.339.
|
|
24
|
+
"@kolkrabbi/kol-component": "^0.339.1",
|
|
25
25
|
"@kolkrabbi/kol-framework": "^0.70.0",
|
|
26
26
|
"@kolkrabbi/kol-icons": "^0.64.0",
|
|
27
27
|
"@kolkrabbi/kol-theme": "^0.211.1"
|
package/src/AppShell.jsx
CHANGED
|
@@ -347,10 +347,16 @@ export default function AppShell({
|
|
|
347
347
|
}, [pageWash])
|
|
348
348
|
/* the rail keys — `\` expand ↔ collapse (the app rail's own grab toggle, through `railToggle`), `⇧\` hide ↔ show */
|
|
349
349
|
const railToggle = useRef(null)
|
|
350
|
+
/* the rail's state when it hid — showing returns it open or collapsed, as it was (FloatLayout's `lastShown`) */
|
|
351
|
+
const wasOpen = useRef(false)
|
|
350
352
|
useRailKeys(railKeys ?? (railToggleKey ? { hide: railToggleKey } : undefined), {
|
|
351
353
|
onCollapse: () => { if (!navHidden) railToggle.current?.() },
|
|
352
|
-
onHide: () =>
|
|
354
|
+
onHide: () => { if (!navHidden) wasOpen.current = !!railToggle.current?.open; setNavHidden(!navHidden) },
|
|
353
355
|
})
|
|
356
|
+
/* runs after the remounted rail's own effect (children first), so the snap lands on the live rail */
|
|
357
|
+
useEffect(() => {
|
|
358
|
+
if (!navHidden && wasOpen.current) railToggle.current?.snap?.(true)
|
|
359
|
+
}, [navHidden])
|
|
354
360
|
|
|
355
361
|
/* Option+digit → the rail ROW in that position (never while typing).
|
|
356
362
|
*
|