@kolkrabbi/kol-shell 0.57.1 → 0.58.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 +6 -6
- package/src/AppHub.jsx +1 -1
- package/src/index.js +2 -1
- package/src/ShortcutsOverlay.jsx +0 -100
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
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.228.0",
|
|
16
16
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
17
17
|
"@kolkrabbi/kol-theme": ">=0.138.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-component": "^0.
|
|
24
|
-
"@kolkrabbi/kol-
|
|
25
|
-
"@kolkrabbi/kol-
|
|
26
|
-
"@kolkrabbi/kol-theme": "^0.
|
|
23
|
+
"@kolkrabbi/kol-component": "^0.228.0",
|
|
24
|
+
"@kolkrabbi/kol-framework": "^0.45.0",
|
|
25
|
+
"@kolkrabbi/kol-icons": "^0.29.0",
|
|
26
|
+
"@kolkrabbi/kol-theme": "^0.155.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src",
|
package/src/AppHub.jsx
CHANGED
|
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
|
|
|
2
2
|
import AppShell from './AppShell.jsx'
|
|
3
3
|
import HubHome from './HubHome.jsx'
|
|
4
4
|
import HubSettings from './HubSettings.jsx'
|
|
5
|
-
import ShortcutsOverlay from '
|
|
5
|
+
import { ShortcutsOverlay } from '@kolkrabbi/kol-component'
|
|
6
6
|
|
|
7
7
|
/* taxonomy-ok: organism — nests AppShell / HubHome / HubSettings / ShortcutsOverlay (relative) */
|
|
8
8
|
|
package/src/index.js
CHANGED
|
@@ -24,7 +24,8 @@ export { default as PageShell, PageBleed } from './PageShell.jsx'
|
|
|
24
24
|
export { default as TabStrip } from './TabStrip.jsx'
|
|
25
25
|
export { default as SettingsScaffold } from './SettingsScaffold.jsx'
|
|
26
26
|
export { default as WalkthroughPanel } from './WalkthroughPanel.jsx'
|
|
27
|
-
|
|
27
|
+
/* lives in kol-component since 0.228.0 — re-exported so every kol-shell import keeps resolving */
|
|
28
|
+
export { ShortcutsOverlay } from '@kolkrabbi/kol-component'
|
|
28
29
|
export { default as Logomark } from './Logomark.jsx'
|
|
29
30
|
// the app tier, shipped once (ShellHomeSystem, kol-fxr 2026-08-27)
|
|
30
31
|
export { default as CatalogPage } from './CatalogPage.jsx'
|
package/src/ShortcutsOverlay.jsx
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react'
|
|
2
|
-
import { SettingsSections } from '@kolkrabbi/kol-component'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* ShortcutsOverlay — the keyboard-shortcut sheet: blurred scrim, centred
|
|
6
|
-
* panel, a 2-col grid (label · keys), Esc / backdrop-click close.
|
|
7
|
-
* Ported from the shared cut (mirror's, "copied from kol-monitor").
|
|
8
|
-
*
|
|
9
|
-
* `shortcuts` is a prop — feed the SAME array your settings page renders
|
|
10
|
-
* (both repos hand-maintained the list twice and both pairs drifted).
|
|
11
|
-
* Stacks at `--kol-z-modal`, above the rail's sticky tier.
|
|
12
|
-
*
|
|
13
|
-
* TWO FORMS, DETECTED ON SHAPE (ShortcutsOverlaySections, kol-fxr 2026-08-15):
|
|
14
|
-
*
|
|
15
|
-
* flat `[{ label, keys }]` — one grid, as shipped
|
|
16
|
-
* sectioned `[{ section, items: [{label,keys}] }]` — headings between groups
|
|
17
|
-
*
|
|
18
|
-
* The flat form renders EXACTLY as it did before, so no existing caller moves.
|
|
19
|
-
* The sectioned form exists because a real keymap is grouped — kol-fxr's is
|
|
20
|
-
* Edit · Selection · Layer · Tools · View, and its `shortcutsBySection()`
|
|
21
|
-
* already emits this shape — and flattening it to adopt this component would
|
|
22
|
-
* have lost the grouping. That consumer kept a 99-line local overlay instead,
|
|
23
|
-
* which is the duplication this component exists to end.
|
|
24
|
-
*
|
|
25
|
-
* ONE COMPONENT WITH THE SETTINGS PAGE AND THE DRAWER (user, 2026-09-03:
|
|
26
|
-
* *"align it more to the settings sidebar"* → *"lets normalise a component
|
|
27
|
-
* they can grab"*). This sheet and `SettingsShortcuts` render the SAME keymap
|
|
28
|
-
* array and had drifted into two anatomies — a bespoke two-column grid with a
|
|
29
|
-
* plain `text-fg-32` heading and hand-rolled `<span>` pairs here, against
|
|
30
|
-
* eyebrow sections over `SettingsRow`s there, down to the combo being `fg-96`
|
|
31
|
-
* in one and `fg-32` in the other. Both go through `SettingsSections` now, the
|
|
32
|
-
* same call the settings page and the settings drawer use, so a shortcut reads
|
|
33
|
-
* identically wherever it is shown and a change to the row lands in all of
|
|
34
|
-
* them. The FRAME stays each one's own: a scrim and a centred sheet here, a
|
|
35
|
-
* six-column grid on the page, a right-anchored drawer over the thing you are
|
|
36
|
-
* looking at.
|
|
37
|
-
*
|
|
38
|
-
* `keys` is a DISPLAY STRING and is never bound — this component shows a
|
|
39
|
-
* keymap, it does not own one. Formatting a combo (⌘⇧Z) is the consumer's,
|
|
40
|
-
* next to wherever the binding actually lives.
|
|
41
|
-
*
|
|
42
|
-
* @param {Array} props.shortcuts - `[{ label, combo }]` or `[{ section, items: [{ id, label, combo }] }]` — the same array `SettingsShortcuts` takes (ShellHomeSystemMonitorGaps, kol-monitor 2026-08-27: the overlay read `keys` while the settings block read `combo`; `combo` is the name, `keys` is tolerated for a release)
|
|
43
|
-
* @param {Function} props.onClose
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
const isSectioned = (list) => Array.isArray(list?.[0]?.items)
|
|
47
|
-
|
|
48
|
-
/* A shortcut as a settings ROW: the label on the left, the combo as the row's
|
|
49
|
-
* value. `labelWidth="auto"` makes the label yield and the combo hug — a combo
|
|
50
|
-
* is one token by nature and must not wrap. */
|
|
51
|
-
const toRow = ({ label, combo, keys }) => ({
|
|
52
|
-
label,
|
|
53
|
-
align: 'fill',
|
|
54
|
-
labelWidth: 'auto',
|
|
55
|
-
value: <span className="text-fg-32 kol-helper-12 whitespace-nowrap">{combo ?? keys}</span>,
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
export default function ShortcutsOverlay({ shortcuts = [], onClose }) {
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
const onKey = (e) => { if (e.key === 'Escape') onClose?.() }
|
|
61
|
-
window.addEventListener('keydown', onKey)
|
|
62
|
-
return () => window.removeEventListener('keydown', onKey)
|
|
63
|
-
}, [onClose])
|
|
64
|
-
|
|
65
|
-
const sectioned = isSectioned(shortcuts)
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<div
|
|
69
|
-
onClick={onClose}
|
|
70
|
-
/* THE scrim (overlay-scrim-outliers, kol-client-olina 2026-09-03; user: "we
|
|
71
|
-
removed the blur and put just color on the background … we missed this").
|
|
72
|
-
This drew its own — an 8 % inverse wash plus a 2px blur — after the
|
|
73
|
-
2026-09-01 no-blur ruling and the one-tint-48 class. */
|
|
74
|
-
className="fixed inset-0 select-none kol-overlay-scrim"
|
|
75
|
-
style={{ display: 'grid', placeItems: 'center', zIndex: 'var(--kol-z-modal)' }}
|
|
76
|
-
>
|
|
77
|
-
{/* `bg-oq-04`, not `bg-surface-primary` (user, 2026-09-03: *"this is too
|
|
78
|
-
bright"*). Over a near-black editor canvas the raised page surface
|
|
79
|
-
reads as a lit slab, and an `fg-16` stroke on top of it was the
|
|
80
|
-
brightest edge on screen. The OPAQUE ramp is right here: the sheet
|
|
81
|
-
must not let the canvas through, and `oq-04` is a 4 % lift off the
|
|
82
|
-
ground rather than a surface from the page's own ladder — so the
|
|
83
|
-
panel separates from the scrimmed canvas without a stroke. */}
|
|
84
|
-
<div
|
|
85
|
-
/* THE SHEET FITS THE WINDOW (editor review #4, 2026-09-27): a long keymap — the design
|
|
86
|
-
* editor's is six sections — ran past both edges of the viewport with no way to reach the
|
|
87
|
-
* rest. Capped to the window less a margin, scrolling inside. */
|
|
88
|
-
className="kol-shortcuts-panel text-fg-64 kol-helper-12 bg-oq-04 flex flex-col gap-6 overflow-y-auto"
|
|
89
|
-
style={{ padding: 24, borderRadius: 4, maxHeight: 'calc(100dvh - 48px)' }}
|
|
90
|
-
onClick={(e) => e.stopPropagation()}
|
|
91
|
-
>
|
|
92
|
-
<SettingsSections
|
|
93
|
-
sections={sectioned
|
|
94
|
-
? shortcuts.map(({ section, items = [] }) => ({ label: section, rowGap: 1, rows: items.map(toRow) }))
|
|
95
|
-
: [{ rowGap: 1, rows: shortcuts.map(toRow) }]}
|
|
96
|
-
/>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
)
|
|
100
|
-
}
|