@kolkrabbi/kol-shell 0.51.0 → 0.53.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-shell",
3
- "version": "0.51.0",
3
+ "version": "0.53.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",
@@ -20,10 +20,10 @@
20
20
  "react-dom": "^18.3.0 || ^19.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@kolkrabbi/kol-component": "^0.179.0",
24
- "@kolkrabbi/kol-icons": "^0.25.0",
25
- "@kolkrabbi/kol-framework": "^0.42.0",
26
- "@kolkrabbi/kol-theme": "^0.138.0"
23
+ "@kolkrabbi/kol-component": "^0.201.0",
24
+ "@kolkrabbi/kol-framework": "^0.44.0",
25
+ "@kolkrabbi/kol-icons": "^0.26.0",
26
+ "@kolkrabbi/kol-theme": "^0.142.0"
27
27
  },
28
28
  "files": [
29
29
  "src",
@@ -1,4 +1,5 @@
1
1
  import { useEffect } from 'react'
2
+ import { SettingsSections } from '@kolkrabbi/kol-component'
2
3
 
3
4
  /**
4
5
  * ShortcutsOverlay — the keyboard-shortcut sheet: blurred scrim, centred
@@ -21,10 +22,18 @@ import { useEffect } from 'react'
21
22
  * have lost the grouping. That consumer kept a 99-line local overlay instead,
22
23
  * which is the duplication this component exists to end.
23
24
  *
24
- * ONE GRID, NOT NESTED ONES. The headings span both columns
25
- * (`gridColumn: 1 / -1`) so every `keys` cell in the sheet stays on the same
26
- * axis nesting a grid per section would let each group compute its own
27
- * column width and the keys would stagger down the panel.
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.
28
37
  *
29
38
  * `keys` is a DISPLAY STRING and is never bound — this component shows a
30
39
  * keymap, it does not own one. Formatting a combo (⌘⇧Z) is the consumer's,
@@ -36,15 +45,15 @@ import { useEffect } from 'react'
36
45
 
37
46
  const isSectioned = (list) => Array.isArray(list?.[0]?.items)
38
47
 
39
- /* One row of the shared grid. `contents` keeps the pair on the parent grid
40
- * rather than making the wrapper a cell of its own. */
41
- function Row({ label, combo, keys }) {
42
- return (
43
- <span className="contents">
44
- <span>{label}</span><span className="text-fg-96">{combo ?? keys}</span>
45
- </span>
46
- )
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
+ })
48
57
 
49
58
  export default function ShortcutsOverlay({ shortcuts = [], onClose }) {
50
59
  useEffect(() => {
@@ -65,24 +74,23 @@ export default function ShortcutsOverlay({ shortcuts = [], onClose }) {
65
74
  className="fixed inset-0 select-none kol-overlay-scrim"
66
75
  style={{ display: 'grid', placeItems: 'center', zIndex: 'var(--kol-z-modal)' }}
67
76
  >
68
- <div className="text-fg-64 kol-helper-12 bg-surface-primary border border-fg-16" style={{ display: 'grid', gridTemplateColumns: 'auto auto', gap: '10px 62px', padding: 24, borderRadius: 4 }}>
69
- {sectioned
70
- ? shortcuts.map(({ section, items = [] }, i) => (
71
- <span key={section} className="contents">
72
- <span
73
- className="text-fg-32"
74
- style={{ gridColumn: '1 / -1', marginTop: i === 0 ? 0 : 14 }}
75
- >
76
- {section}
77
- </span>
78
- {items.map(({ label, combo, keys }) => (
79
- <Row key={`${section}:${label}`} label={label} combo={combo} keys={keys} />
80
- ))}
81
- </span>
82
- ))
83
- : shortcuts.map(({ label, combo, keys }) => (
84
- <Row key={label} label={label} combo={combo} keys={keys} />
85
- ))}
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
+ className="kol-shortcuts-panel text-fg-64 kol-helper-12 bg-oq-04 flex flex-col gap-6"
86
+ style={{ padding: 24, borderRadius: 4 }}
87
+ onClick={(e) => e.stopPropagation()}
88
+ >
89
+ <SettingsSections
90
+ sections={sectioned
91
+ ? shortcuts.map(({ section, items = [] }) => ({ label: section, rowGap: 1, rows: items.map(toRow) }))
92
+ : [{ rowGap: 1, rows: shortcuts.map(toRow) }]}
93
+ />
86
94
  </div>
87
95
  </div>
88
96
  )