@kolkrabbi/kol-component 0.274.0 → 0.275.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-component",
3
- "version": "0.274.0",
3
+ "version": "0.275.0",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,6 +41,8 @@ import SettingsPanel, { LabeledControlSection, SettingsRow } from './SettingsPan
41
41
  * @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)
42
42
  * @param {Function} props.onClose
43
43
  * @param {string} [props.title] the header, beside the × (default `Shortcuts`)
44
+ * @param {'overlay'|'rail'} [props.variant] centred (default) or the right rail — SettingsPanel's two forms, so an app
45
+ * never hand-builds the rail (kol-monitor's ShortcutsRail, 2026-10-18)
44
46
  * @param {string} [props.currentPath] sections may carry `routes: ['/rack']` (CommandOverlayModes, kol-monitor
45
47
  * 2026-10-17 — user: *"im in dev, how can I cable lock here?"*): with a path, only the sections that work here
46
48
  * are drawn (ShortcutsOverlayList, kol-monitor 2026-10-18 — the muted ELSEWHERE block is gone). A section without `routes`
@@ -56,12 +58,12 @@ const isSectioned = (list) => Array.isArray(list?.[0]?.items)
56
58
  /* ONE OVERLAY, NOT TWO (user 2026-10-18, retiring the near-copy): the sheet is `SettingsPanel variant="overlay"` —
57
59
  * the title on the header with the × beside it, a Divider, then the sections exactly as monitor's ⇧S rail draws
58
60
  * them (LabeledControlSection divided · SettingsRow text · the combo in mono). Same props as before, plus `title`. */
59
- export default function ShortcutsOverlay({ shortcuts = [], onClose, currentPath, title = 'Shortcuts' }) {
61
+ export default function ShortcutsOverlay({ shortcuts = [], onClose, currentPath, title = 'Shortcuts', variant = 'overlay' }) {
60
62
  const sections = isSectioned(shortcuts)
61
63
  ? shortcuts.filter((s) => shortcutInScope(s, currentPath))
62
64
  : [{ items: shortcuts }]
63
65
  return (
64
- <SettingsPanel open variant="overlay" title={title} onClose={onClose}>
66
+ <SettingsPanel open variant={variant} title={title} onClose={onClose}>
65
67
  {sections.map((sec, n) => (
66
68
  <LabeledControlSection key={sec.section ?? n} label={sec.section} divided rowGap={1}>
67
69
  {(sec.items ?? []).map((it, i) => (