@kolkrabbi/kol-shell 0.66.0 → 0.68.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 +4 -4
- package/src/AppHub.jsx +15 -12
- package/src/HubDev.jsx +7 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.68.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The application shell",
|
|
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.
|
|
23
|
+
"@kolkrabbi/kol-component": "^0.268.0",
|
|
24
|
+
"@kolkrabbi/kol-framework": "^0.51.0",
|
|
24
25
|
"@kolkrabbi/kol-icons": "^0.39.0",
|
|
25
|
-
"@kolkrabbi/kol-theme": "^0.
|
|
26
|
-
"@kolkrabbi/kol-framework": "^0.50.0"
|
|
26
|
+
"@kolkrabbi/kol-theme": "^0.175.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src",
|
package/src/AppHub.jsx
CHANGED
|
@@ -3,9 +3,9 @@ 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 {
|
|
6
|
+
import { ShortcutsOverlay } from '@kolkrabbi/kol-component'
|
|
7
7
|
|
|
8
|
-
/* taxonomy-ok: organism — nests AppShell / HubHome / HubSettings / HubDev (relative) + kol-component's
|
|
8
|
+
/* taxonomy-ok: organism — nests AppShell / HubHome / HubSettings / HubDev (relative) + kol-component's ShortcutsOverlay */
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* AppHub — An app's shell and hub in one. Shell + Hub in one call; the app passes its Tool as children (the app anatomy,
|
|
@@ -39,8 +39,8 @@ import { CommandOverlay } from '@kolkrabbi/kol-component'
|
|
|
39
39
|
* to neccessarily have settings manditory part of the rail"*) — no `settings`, no rail
|
|
40
40
|
* row, no route, no `,` key. It was pinned whether the app had settings or not.
|
|
41
41
|
* @param {Object} dev HubDev's props (`tabs`, `title`, `subtitle`) + `path` (default `/dev`). OPT-IN, and only on
|
|
42
|
-
* a dev server (`import.meta.env.DEV`; `always: true` overrides) — a `code` row
|
|
43
|
-
*
|
|
42
|
+
* a dev server (`import.meta.env.DEV`; `always: true` overrides) — a `code` row after
|
|
43
|
+
* the app's own rows (CompareGridDevTab · HubDevChrome, kol-monitor)
|
|
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)
|
|
@@ -70,12 +70,11 @@ export default function AppHub({
|
|
|
70
70
|
children,
|
|
71
71
|
}) {
|
|
72
72
|
const [sheet, setSheet] = useState(false)
|
|
73
|
-
const [sheetQuery, setSheetQuery] = useState('')
|
|
74
73
|
|
|
75
74
|
useEffect(() => {
|
|
76
75
|
if (!shortcutsKey) return undefined
|
|
77
76
|
const onKey = (e) => {
|
|
78
|
-
if (e.key
|
|
77
|
+
if (e.key !== shortcutsKey || e.shiftKey || e.metaKey || e.ctrlKey || e.altKey || e.repeat) return
|
|
79
78
|
const t = e.target
|
|
80
79
|
if (t?.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t?.tagName)) return
|
|
81
80
|
e.preventDefault()
|
|
@@ -96,13 +95,16 @@ export default function AppHub({
|
|
|
96
95
|
: devOn && (currentPath === devPath || currentPath?.startsWith(`${devPath}/`))
|
|
97
96
|
? <HubDev storageKey={`kol-dev-tab:${app.name ?? 'app'}`} {...devProps} />
|
|
98
97
|
: children
|
|
99
|
-
|
|
98
|
+
/* the Dev row closes the app's own rows — under Stage in monitor (HubDevChrome, kol-monitor 2026-10-18 — user:
|
|
99
|
+
* *"why did the dev tab move? it was fine where it was. below stage"*); Settings keeps the bottom alone */
|
|
100
|
+
const rows = devOn ? [...items, { icon: 'code', path: devPath, label: 'Dev' }] : items
|
|
101
|
+
const bottom = settings ? SETTINGS_ROW(settingsPath) : []
|
|
100
102
|
/* the phone bar lists Home as a tab — the rail draws it as the mark, the bar has no mark */
|
|
101
|
-
const barItems = [...(home ? [{ icon: 'home-01', path: homePath, label: 'Home' }] : []), ...
|
|
103
|
+
const barItems = [...(home ? [{ icon: 'home-01', path: homePath, label: 'Home' }] : []), ...rows, ...bottom]
|
|
102
104
|
|
|
103
105
|
return (
|
|
104
106
|
<AppShell
|
|
105
|
-
items={
|
|
107
|
+
items={rows}
|
|
106
108
|
bottomItems={bottom}
|
|
107
109
|
barItems={barItems}
|
|
108
110
|
logomark={app.logomark ? { svgUrl: app.logomark, title: app.name } : undefined}
|
|
@@ -123,9 +125,10 @@ export default function AppHub({
|
|
|
123
125
|
{...shell}
|
|
124
126
|
>
|
|
125
127
|
{page}
|
|
126
|
-
{/* THE SHEET IS
|
|
127
|
-
*
|
|
128
|
-
|
|
128
|
+
{/* THE SHEET IS A LIST, NOT A SEARCH (ShortcutsOverlayList, kol-monitor 2026-10-18 — user: *"its alist of
|
|
129
|
+
* shortcuts NOT A SEARCH"*, *"why are we showing disabled shortcuts, named category elsewhere"*): this
|
|
130
|
+
* page's sections only, no field, no Run; `S` toggles it, Esc closes it. Reverses 5.3 (2026-10-17). */}
|
|
131
|
+
{sheet && <ShortcutsOverlay shortcuts={shortcuts} currentPath={currentPath} onClose={() => setSheet(false)} />}
|
|
129
132
|
</AppShell>
|
|
130
133
|
)
|
|
131
134
|
}
|
package/src/HubDev.jsx
CHANGED
|
@@ -13,14 +13,14 @@ const write = (key, value) => { try { localStorage.setItem(key, value) } catch {
|
|
|
13
13
|
* instructions for making the dev tab to the hub … localhost only using the </> icon"*). Each app had built
|
|
14
14
|
* this page by hand and each read differently; this is the page made once, for reading.
|
|
15
15
|
*
|
|
16
|
-
* The shape: a small mono masthead with one line saying what the page is, the tabs on their own row under
|
|
17
|
-
* it,
|
|
16
|
+
* The shape: a small mono masthead with one line saying what the page is, the chip tabs on their own row under
|
|
17
|
+
* it, then the tab's content at full width. Detail belongs in the
|
|
18
18
|
* content's own toggles, not in more text here. The open tab is remembered per app.
|
|
19
19
|
*
|
|
20
20
|
* Rendered by `AppHub` / `AppStudio` from their `dev` prop, only on a dev server (`import.meta.env.DEV`),
|
|
21
|
-
* at `/dev`, behind
|
|
21
|
+
* at `/dev`, behind a `code` rail row after the app's own rows.
|
|
22
22
|
*
|
|
23
|
-
* @param {Array} tabs `[{ value, label,
|
|
23
|
+
* @param {Array} tabs `[{ value, label, content }]`
|
|
24
24
|
* @param {string} [title='Dev']
|
|
25
25
|
* @param {string} [subtitle] one line: what the page is
|
|
26
26
|
* @param {string} [storageKey] where the open tab is remembered
|
|
@@ -34,10 +34,9 @@ export default function HubDev({ tabs = [], title = 'Dev', subtitle = 'Experimen
|
|
|
34
34
|
<PageShell className="gap-6">
|
|
35
35
|
<PageHeader size="sm" voice="mono" title={title} subtitle={subtitle} />
|
|
36
36
|
{tabs.length > 1 && (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</div>
|
|
37
|
+
/* chip tabs — the ones ui.kolkrabbi.io's component pages use — and nothing between them and the
|
|
38
|
+
* content (HubDevChrome, kol-monitor 2026-10-18 — user: *"why are we puttin sub description below the tabs?"*) */
|
|
39
|
+
<TabsRow look="chip" tabs={tabs.map(({ value, label }) => ({ value, label }))} value={active?.value} onChange={pick} ariaLabel={title} />
|
|
41
40
|
)}
|
|
42
41
|
{active && <div className="min-w-0">{active.content}</div>}
|
|
43
42
|
</PageShell>
|