@kolkrabbi/kol-shell 0.70.0 → 0.72.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/package.json +5 -5
- package/src/AppHub.jsx +22 -3
- package/src/AppStudio.jsx +1 -1
- package/src/CatalogPage.jsx +1 -1
- package/src/HubDev.jsx +1 -1
- package/src/SettingsScaffold.jsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
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.
|
|
15
|
+
"@kolkrabbi/kol-component": ">=0.277.0",
|
|
16
16
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
17
17
|
"@kolkrabbi/kol-theme": ">=0.165.0",
|
|
18
18
|
"gsap": "^3.13.0",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@kolkrabbi/kol-icons": "^0.
|
|
23
|
+
"@kolkrabbi/kol-icons": "^0.41.0",
|
|
24
|
+
"@kolkrabbi/kol-component": "^0.277.0",
|
|
24
25
|
"@kolkrabbi/kol-framework": "^0.51.0",
|
|
25
|
-
"@kolkrabbi/kol-theme": "^0.176.0"
|
|
26
|
-
"@kolkrabbi/kol-component": "^0.274.0"
|
|
26
|
+
"@kolkrabbi/kol-theme": "^0.176.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src",
|
package/src/AppHub.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import AppShell from './AppShell.jsx'
|
|
|
3
3
|
import HubHome from './HubHome.jsx'
|
|
4
4
|
import HubSettings from './HubSettings.jsx'
|
|
5
5
|
import HubDev from './HubDev.jsx'
|
|
6
|
-
import { CommandOverlay } from '@kolkrabbi/kol-component'
|
|
6
|
+
import { CommandOverlay, ShortcutsOverlay } from '@kolkrabbi/kol-component'
|
|
7
7
|
|
|
8
8
|
/* taxonomy-ok: organism — nests AppShell / HubHome / HubSettings / HubDev (relative) + kol-component's CommandOverlay */
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ import { CommandOverlay } from '@kolkrabbi/kol-component'
|
|
|
23
23
|
* Router-agnostic like AppShell: pass `currentPath` + `onNavigate`, and your router's element
|
|
24
24
|
* (`<Outlet/>`) as children.
|
|
25
25
|
*
|
|
26
|
-
* KEYS: `,` toggles Settings · `S` toggles the shortcuts sheet · `\` hides the rail ·
|
|
26
|
+
* KEYS: `,` toggles Settings · `S` toggles the shortcuts sheet · `⇧S` the shortcuts rail · `\` hides the rail ·
|
|
27
27
|
* ⌥1…9 walks the rail top to bottom, mark first, Settings last. None fire while typing.
|
|
28
28
|
*
|
|
29
29
|
* @param {Object} app `{ name, subtitle, logomark (svg url), about (node), links [{label,url}] }`
|
|
@@ -44,6 +44,8 @@ import { CommandOverlay } from '@kolkrabbi/kol-component'
|
|
|
44
44
|
* @param {Array} shortcuts `[{ section, items: [{ id, label, combo }] }]` — the sheet AND Settings
|
|
45
45
|
* @param {ReactNode} themeToggle Settings' masthead toggle (a node — kol-framework is not a peer)
|
|
46
46
|
* @param {string} shortcutsKey default `s`; `null` turns the sheet key off (a tool that owns S)
|
|
47
|
+
* @param {string} shortcutsRailKey default `S` (⇧S) — the same keymap in the right rail (`ShortcutsOverlay variant="rail"`),
|
|
48
|
+
* this page's sections; `null` turns it off. The rail was hand-built in kol-monitor (2026-10-18)
|
|
47
49
|
* @param {'display'|'mono'} masthead the app's one masthead (AppShell's) — set, Home and Settings follow it; unset
|
|
48
50
|
* (the default), they keep the Hub's mono title (2026-09-29)
|
|
49
51
|
* @param {Object} shell any AppShell prop, spread last (`touch`, `pageWash`, `drawerOpenOn`, `railComponent`, …)
|
|
@@ -65,11 +67,27 @@ export default function AppHub({
|
|
|
65
67
|
settingsPath = '/settings',
|
|
66
68
|
homePath = '/',
|
|
67
69
|
shortcutsKey = 's',
|
|
70
|
+
shortcutsRailKey = 'S',
|
|
68
71
|
masthead,
|
|
69
72
|
shell,
|
|
70
73
|
children,
|
|
71
74
|
}) {
|
|
72
75
|
const [sheet, setSheet] = useState(false)
|
|
76
|
+
const [rail, setRail] = useState(false)
|
|
77
|
+
|
|
78
|
+
/* ⇧S — the keymap in the rail. Its own listener: the `S` listener ignores Shift, so the two never both fire */
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (!shortcutsRailKey) return undefined
|
|
81
|
+
const onKey = (e) => {
|
|
82
|
+
if (e.key !== shortcutsRailKey || !e.shiftKey || e.metaKey || e.ctrlKey || e.altKey || e.repeat) return
|
|
83
|
+
const t = e.target
|
|
84
|
+
if (t?.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t?.tagName)) return
|
|
85
|
+
e.preventDefault()
|
|
86
|
+
setRail((v) => !v)
|
|
87
|
+
}
|
|
88
|
+
window.addEventListener('keydown', onKey)
|
|
89
|
+
return () => window.removeEventListener('keydown', onKey)
|
|
90
|
+
}, [shortcutsRailKey])
|
|
73
91
|
|
|
74
92
|
useEffect(() => {
|
|
75
93
|
if (!shortcutsKey) return undefined
|
|
@@ -127,8 +145,9 @@ export default function AppHub({
|
|
|
127
145
|
{page}
|
|
128
146
|
{/* THE SHEET IS THE ⌘K MODAL WITH NO FIELD (ShortcutsOverlayCategories, kol-monitor 2026-10-18 — user: *"I said
|
|
129
147
|
* no search, I didnt say DONT USE THE FUCKIN MODAL OVERLAY"*): this page's sections as categories under
|
|
130
|
-
* "Shortcuts", each drilling in to its keys; `S` toggles, Esc closes
|
|
148
|
+
* "Shortcuts", each drilling in to its keys; `S` toggles, Esc closes; ⇧S is the rail's. Reverses 0.68.0's swap. */}
|
|
131
149
|
<CommandOverlay open={sheet} mode="shortcuts" shortcuts={shortcuts} currentPath={currentPath} onClose={() => setSheet(false)} />
|
|
150
|
+
{rail && <ShortcutsOverlay variant="rail" shortcuts={shortcuts} currentPath={currentPath} onClose={() => setRail(false)} />}
|
|
132
151
|
</AppShell>
|
|
133
152
|
)
|
|
134
153
|
}
|
package/src/AppStudio.jsx
CHANGED
|
@@ -74,7 +74,7 @@ export default function AppStudio({
|
|
|
74
74
|
} else if (make && at(make.path)) {
|
|
75
75
|
page = make.shell === false ? make.children : (
|
|
76
76
|
<PageShell>
|
|
77
|
-
{make.header && <PageHeader
|
|
77
|
+
{make.header && <PageHeader level="app" {...make.header} />}
|
|
78
78
|
{make.children}
|
|
79
79
|
</PageShell>
|
|
80
80
|
)
|
package/src/CatalogPage.jsx
CHANGED
|
@@ -208,7 +208,7 @@ export default function CatalogPage({
|
|
|
208
208
|
|
|
209
209
|
return (
|
|
210
210
|
<PageShell width={width} className={`${PRESETS[preset]?.className ?? ''} ${className}`.trim()} style={{ overflow: 'hidden', '--kol-catalog-n': cols ?? undefined, ...style }}>
|
|
211
|
-
{header && <PageHeader {...header} />}
|
|
211
|
+
{header && <PageHeader level="app" {...header} />}
|
|
212
212
|
<div style={{ flex: 1, position: 'relative' }}>
|
|
213
213
|
{open && <WalkthroughPanel steps={walkthrough.steps} iconComponent={walkthrough.iconComponent} onClose={walkthrough.onClose} />}
|
|
214
214
|
<ContentFilters
|
package/src/HubDev.jsx
CHANGED
|
@@ -32,7 +32,7 @@ export default function HubDev({ tabs = [], title = 'Dev', subtitle = 'Experimen
|
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
34
|
<PageShell className="gap-6">
|
|
35
|
-
<PageHeader
|
|
35
|
+
<PageHeader level="app" title={title} subtitle={subtitle} />
|
|
36
36
|
{tabs.length > 1 && (
|
|
37
37
|
/* chip tabs — the ones ui.kolkrabbi.io's component pages use — and nothing between them and the
|
|
38
38
|
* content (HubDevChrome, kol-monitor 2026-10-18 — user: *"why are we puttin sub description below the tabs?"*) */
|
package/src/SettingsScaffold.jsx
CHANGED
|
@@ -137,6 +137,7 @@ export default function SettingsScaffold({
|
|
|
137
137
|
* `voice="mono"`, `size`, `titleClass`, `eyebrow` all pass through.
|
|
138
138
|
* `actions` is where the drawer opener goes. */}
|
|
139
139
|
<PageHeader
|
|
140
|
+
level="app"
|
|
140
141
|
title={active?.title}
|
|
141
142
|
subtitle={active?.subtitle}
|
|
142
143
|
actions={cluster}
|