@kolkrabbi/kol-shell 0.8.0 → 0.9.1

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.8.0",
3
+ "version": "0.9.1",
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.99.0",
24
- "@kolkrabbi/kol-icons": "^0.20.0",
23
+ "@kolkrabbi/kol-component": "^0.106.0",
25
24
  "@kolkrabbi/kol-framework": "^0.28.0",
26
- "@kolkrabbi/kol-theme": "^0.68.0"
25
+ "@kolkrabbi/kol-icons": "^0.20.0",
26
+ "@kolkrabbi/kol-theme": "^0.71.0"
27
27
  },
28
28
  "files": [
29
29
  "src",
@@ -18,7 +18,11 @@ import WalkthroughPanel from './WalkthroughPanel.jsx'
18
18
  *
19
19
  * Semantics are the consumer's: what RECENT / SAVED mean, what an item is,
20
20
  * what a click does. `toCard(item, { view, layout })` → `{ key, title, detail,
21
- * media, actions, onClick, href, onNavigate }` is the whole contract.
21
+ * media, actions, onClick, href, onNavigate, expanded, expandedContent }` is the
22
+ * whole contract — `expanded` / `expandedContent` reach `ContentCard catalog`'s
23
+ * 2×2 cell (ShellHomeSystemMonitorGaps, kol-monitor 2026-08-27; neighbour-hiding
24
+ * stays the consumer's). Anything `ContentFilters` takes that the page has no
25
+ * prop for goes through `filtersProps` — `mutuallyExclusiveFilters` was the gap.
22
26
  *
23
27
  * @param {Object} header PageHeader props — `{ title, subtitle, size, voice, eyebrow }`
24
28
  * @param {Array} items the objects `ContentFilters` filters and searches
@@ -34,6 +38,7 @@ import WalkthroughPanel from './WalkthroughPanel.jsx'
34
38
  * @param {ReactNode} actions the bottom row's buttons
35
39
  * @param {ElementType} iconComponent icon renderer seam for ContentFilters
36
40
  * @param {boolean} showCountOnlyWhenFiltering (default true)
41
+ * @param {Object} filtersProps spread onto ContentFilters last — e.g. `{ mutuallyExclusiveFilters: ['category', 'u_label'] }`
37
42
  */
38
43
  const LAYOUTS = [
39
44
  { value: 'list', label: 'LIST' },
@@ -57,6 +62,7 @@ export default function CatalogPage({
57
62
  actions,
58
63
  iconComponent,
59
64
  showCountOnlyWhenFiltering = true,
65
+ filtersProps,
60
66
  children,
61
67
  className = '',
62
68
  style,
@@ -88,10 +94,11 @@ export default function CatalogPage({
88
94
  const key = c.key ?? item.key ?? item.id ?? item.name ?? i
89
95
  return layout === 'list'
90
96
  ? <ContentRow key={key} variant="catalog" title={c.title} detail={c.detail} actions={c.actions} onClick={c.onClick} href={c.href} onNavigate={c.onNavigate} />
91
- : <ContentCard key={key} variant="catalog" fit="cover" title={c.title} detail={c.detail} media={c.media} actions={c.actions} onClick={c.onClick} href={c.href} onNavigate={c.onNavigate} />
97
+ : <ContentCard key={key} variant="catalog" fit="cover" title={c.title} detail={c.detail} media={c.media} actions={c.actions} onClick={c.onClick} href={c.href} onNavigate={c.onNavigate} expanded={c.expanded} expandedContent={c.expandedContent} />
92
98
  })}
93
99
  </div>
94
100
  )}
101
+ {...filtersProps}
95
102
  />
96
103
  </div>
97
104
  {children}
@@ -68,7 +68,9 @@ export function SettingsSection({ title, children }) {
68
68
  export function LabelRow({ label, align = 'baseline', children }) {
69
69
  return (
70
70
  <div style={{ display: 'flex', gap: 12, alignItems: align }}>
71
- <span className="text-fg-48 kol-helper-12" style={{ width: 160, flexShrink: 0 }}>{label}</span>
71
+ {/* 160 wide, but it yields and truncates when the row is squeezed — the label
72
+ * is the prose, the value is the datum (SettingsShortcutsComboWrap, 2026-08-27) */}
73
+ <span className="text-fg-48 kol-helper-12 truncate" style={{ flex: '0 1 160px', minWidth: 0 }}>{label}</span>
72
74
  {typeof children === 'string'
73
75
  ? <span className="text-fg-32 kol-helper-12">{children}</span>
74
76
  : children}
@@ -5,7 +5,10 @@ import { LabelRow } from './SettingsScaffold.jsx'
5
5
  * (ShellHomeSystem, kol-fxr 2026-08-27): the same `[{ section, items: [{ id,
6
6
  * label, combo }] }]` array `ShortcutsOverlay` takes, laid out six columns ×
7
7
  * two sections per column, filled column-first (user, 2026-08-27) — each
8
- * section an eyebrow (`kol-eyebrow`, strong ink) over LabelRows.
8
+ * section an eyebrow (`kol-eyebrow`, strong ink) over LabelRows. A combo is one
9
+ * token by nature — the value cell is `whitespace-nowrap` and the label yields
10
+ * (SettingsShortcutsComboWrap, kol-monitor 2026-08-27: `⌘ K` broke as `⌘` over
11
+ * `K` in the six-column grid — the cell was squeezed to min-content, not full).
9
12
  *
10
13
  * @param {Array} sections `[{ section, items: [{ id, label, combo }] }]`
11
14
  * @param {Function} comboLabel (combo) => string (default: the combo as given)
@@ -17,7 +20,9 @@ export default function SettingsShortcuts({ sections = [], comboLabel = (c) => c
17
20
  <div key={section} style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
18
21
  <span className="kol-eyebrow text-strong mb-2">{section}</span>
19
22
  {items.map((k) => (
20
- <LabelRow key={k.id ?? k.label} label={k.label}>{comboLabel(k.combo)}</LabelRow>
23
+ <LabelRow key={k.id ?? k.label} label={k.label}>
24
+ <span className="text-fg-32 kol-helper-12 whitespace-nowrap">{comboLabel(k.combo)}</span>
25
+ </LabelRow>
21
26
  ))}
22
27
  </div>
23
28
  ))}
@@ -30,7 +30,7 @@ import { useEffect } from 'react'
30
30
  * keymap, it does not own one. Formatting a combo (⌘⇧Z) is the consumer's,
31
31
  * next to wherever the binding actually lives.
32
32
  *
33
- * @param {Array} props.shortcuts - `[{ label, keys }]` or `[{ section, items }]`
33
+ * @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)
34
34
  * @param {Function} props.onClose
35
35
  */
36
36
 
@@ -38,10 +38,10 @@ const isSectioned = (list) => Array.isArray(list?.[0]?.items)
38
38
 
39
39
  /* One row of the shared grid. `contents` keeps the pair on the parent grid
40
40
  * rather than making the wrapper a cell of its own. */
41
- function Row({ label, keys }) {
41
+ function Row({ label, combo, keys }) {
42
42
  return (
43
43
  <span className="contents">
44
- <span>{label}</span><span className="text-fg-96">{keys}</span>
44
+ <span>{label}</span><span className="text-fg-96">{combo ?? keys}</span>
45
45
  </span>
46
46
  )
47
47
  }
@@ -71,13 +71,13 @@ export default function ShortcutsOverlay({ shortcuts = [], onClose }) {
71
71
  >
72
72
  {section}
73
73
  </span>
74
- {items.map(({ label, keys }) => (
75
- <Row key={`${section}:${label}`} label={label} keys={keys} />
74
+ {items.map(({ label, combo, keys }) => (
75
+ <Row key={`${section}:${label}`} label={label} combo={combo} keys={keys} />
76
76
  ))}
77
77
  </span>
78
78
  ))
79
- : shortcuts.map(({ label, keys }) => (
80
- <Row key={label} label={label} keys={keys} />
79
+ : shortcuts.map(({ label, combo, keys }) => (
80
+ <Row key={label} label={label} combo={combo} keys={keys} />
81
81
  ))}
82
82
  </div>
83
83
  </div>