@kolkrabbi/kol-shell 0.19.1 → 0.21.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.19.1",
3
+ "version": "0.21.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.128.0",
23
+ "@kolkrabbi/kol-component": "^0.133.0",
24
24
  "@kolkrabbi/kol-framework": "^0.35.0",
25
25
  "@kolkrabbi/kol-icons": "^0.25.0",
26
- "@kolkrabbi/kol-theme": "^0.94.0"
26
+ "@kolkrabbi/kol-theme": "^0.97.0"
27
27
  },
28
28
  "files": [
29
29
  "src",
@@ -10,13 +10,16 @@ import TabStrip from './TabStrip.jsx'
10
10
  * `flex:1 overflow:auto` body. Content is consumer-authored via
11
11
  * `renderContent(tabValue)` — sections/rows are content, not markup.
12
12
  *
13
- * Building blocks exported for the body: `SettingsSection` (h2 + column) and
14
- * `LabelRow` (the 160px label-column row the de-facto standard both repos
15
- * and monitor's ColorPickerPage share).
13
+ * Body building blocks live in **kol-component**, not here: `LabeledControlSection`
14
+ * (the eyebrow-headed section) and `SettingsRow` (the 160px label column).
15
+ * This file used to export its own `SettingsSection` + `LabelRow` — a second
16
+ * implementation of that pair, and the DS does not ship two of one thing
17
+ * (user ruling 2026-08-30: "dont ship duplicate components"). Both retired to
18
+ * `_tmp/2026-08-30-shell-settings-duplicates/`; kol-component's are the survivors.
16
19
  *
17
20
  * Shortcuts single-source: both repos hand-maintained the shortcut list twice
18
21
  * (settings + overlay) and both pairs drifted. Feed ONE array to both your
19
- * `ShortcutsOverlay` and a `LabelRow` map here.
22
+ * `ShortcutsOverlay` and `SettingsShortcuts`.
20
23
  *
21
24
  * @param {Array} props.tabs - `[{ value, label, title, subtitle }]` — title/subtitle feed the header
22
25
  * @param {Function} props.renderContent - `(tabValue) => node`
@@ -47,33 +50,3 @@ export default function SettingsScaffold({ tabs = [], defaultTab, renderContent,
47
50
  )
48
51
  }
49
52
 
50
- /** Section — `h2` header + 8px column, the body block both repos share. */
51
- export function SettingsSection({ title, children }) {
52
- return (
53
- <div>
54
- {/* fg-96 on helper-14 — the tab strip's role (PageHeaderMonoTitle addendum 2,
55
- * kol-fxr 2026-08-27; was fg-80 / helper-16 with no seam) */}
56
- <h2 className="text-fg-96 kol-helper-14" style={{ marginBottom: 16 }}>{title}</h2>
57
- <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
58
- {children}
59
- </div>
60
- </div>
61
- )
62
- }
63
-
64
- /**
65
- * LabelRow — 160px flex-shrink-0 label column + value. `align="center"` for
66
- * control rows (a toggle), `align="baseline"` (default) for text rows.
67
- */
68
- export function LabelRow({ label, align = 'baseline', children }) {
69
- return (
70
- <div style={{ display: 'flex', gap: 12, alignItems: align }}>
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>
74
- {typeof children === 'string'
75
- ? <span className="text-fg-32 kol-helper-12">{children}</span>
76
- : children}
77
- </div>
78
- )
79
- }
@@ -1,11 +1,17 @@
1
- import { LabelRow } from './SettingsScaffold.jsx'
1
+ import { SettingsRow } from '@kolkrabbi/kol-component'
2
+
3
+ /* Was kol-shell's own `LabelRow`, retired 2026-08-30 — it was a second
4
+ * implementation of kol-component's `SettingsRow` (same 160px label column,
5
+ * same value cell), and the DS does not ship two of one thing. `align="fill"`
6
+ * keeps the combo left-aligned in its cell, which is what LabelRow's default
7
+ * baseline row did. */
2
8
 
3
9
  /**
4
10
  * SettingsShortcuts — the keyboard-shortcuts block of a settings page
5
11
  * (ShellHomeSystem, kol-fxr 2026-08-27): the same `[{ section, items: [{ id,
6
12
  * label, combo }] }]` array `ShortcutsOverlay` takes, laid out six columns ×
7
13
  * two sections per column, filled column-first (user, 2026-08-27) — each
8
- * section an eyebrow (`kol-eyebrow`, strong ink) over LabelRows. A combo is one
14
+ * section an eyebrow (`kol-eyebrow`, strong ink) over SettingsRows. A combo is one
9
15
  * token by nature — the value cell is `whitespace-nowrap` and the label yields
10
16
  * (SettingsShortcutsComboWrap, kol-monitor 2026-08-27: `⌘ K` broke as `⌘` over
11
17
  * `K` in the six-column grid — the cell was squeezed to min-content, not full).
@@ -20,9 +26,9 @@ export default function SettingsShortcuts({ sections = [], comboLabel = (c) => c
20
26
  <div key={section} style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
21
27
  <span className="kol-eyebrow text-strong mb-2">{section}</span>
22
28
  {items.map((k) => (
23
- <LabelRow key={k.id ?? k.label} label={k.label}>
29
+ <SettingsRow key={k.id ?? k.label} label={k.label} align="fill">
24
30
  <span className="text-fg-32 kol-helper-12 whitespace-nowrap">{comboLabel(k.combo)}</span>
25
- </LabelRow>
31
+ </SettingsRow>
26
32
  ))}
27
33
  </div>
28
34
  ))}
package/src/index.js CHANGED
@@ -19,8 +19,7 @@ export { default as PageHeader } from './PageHeader.jsx'
19
19
  * where it always did. This package shipped a recreated duplicate 0.1.0–0.2.0;
20
20
  * retired 2026-08-15, quarantined in _tmp/. Import it from kol-component. */
21
21
  export { default as TabStrip } from './TabStrip.jsx'
22
- export { default as GridCard } from './GridCard.jsx'
23
- export { default as SettingsScaffold, SettingsSection, LabelRow } from './SettingsScaffold.jsx'
22
+ export { default as SettingsScaffold } from './SettingsScaffold.jsx'
24
23
  export { default as WalkthroughPanel } from './WalkthroughPanel.jsx'
25
24
  export { default as ShortcutsOverlay } from './ShortcutsOverlay.jsx'
26
25
  export { default as Logomark } from './Logomark.jsx'
package/src/GridCard.jsx DELETED
@@ -1,75 +0,0 @@
1
- /**
2
- * @deprecated 2026-08-26 — absorbed by `ContentCard variant="catalog" (row: ContentRow variant="catalog")` in @kolkrabbi/kol-component
3
- * (the Content Set, 2026-08-15). Step 1 of the retirement wave: this export
4
- * stays and renders unchanged until the next major, then it is removed.
5
- * Consumers: swap on your next bump. Map + row-by-row diff:
6
- * docs/documentation/03-components/06-content-card-system.md.
7
- *
8
- * GridCard — A4-ratio card for catalog grids (monitor's full cut: expanded
9
- * 2×2 mode + previewFit). Preview clipped on top, label plate at bottom;
10
- * `variant="list"` renders the compact 36px row.
11
- *
12
- * Recreated from both repos with the shipped divergences fixed:
13
- * - the label plate's hardcoded `borderTop: rgba(255,255,255,0.06)` (a live
14
- * light-theme bug in both apps) → `border-t border-fg-04`
15
- * - monitor's `textTransform: capitalize` on the list detail dropped (no
16
- * auto-casing law — author the string in the case it should render)
17
- *
18
- * Preview fits: `.kol-shell-card-preview--{natural|compact|cover}` in
19
- * kol-theme. Grid geometry law (documented default, both source repos):
20
- * grid = `repeat(6, 1fr)` gap 24 · list = `repeat(4, 1fr)` gap 8.
21
- * Neighbour-hiding for `expanded` stays consumer-side.
22
- */
23
- export default function GridCard({ title, detail, preview, expanded, expandedContent, onClick, variant, action, previewFit = 'natural' }) {
24
- if (variant === 'list') {
25
- return (
26
- <div
27
- onClick={onClick}
28
- className="flex items-center justify-between px-3 cursor-pointer bg-surface-tertiary hover:bg-fg-04 rounded border border-fg-04 transition-colors select-none"
29
- style={{ height: 36 }}
30
- >
31
- <span className="kol-helper-12 text-fg-64">{title}</span>
32
- {action || (detail && <span className="kol-helper-10 text-fg-32">{detail}</span>)}
33
- </div>
34
- )
35
- }
36
-
37
- return (
38
- <div
39
- onClick={onClick}
40
- className="bg-fg-04 hover:bg-surface-tertiary border border-fg-04"
41
- style={{
42
- borderRadius: 4, cursor: 'pointer',
43
- aspectRatio: expanded ? undefined : '1 / 1.41421',
44
- gridColumn: expanded ? 'span 2' : 'span 1',
45
- gridRow: expanded ? 'span 2' : 'span 1',
46
- position: 'relative', overflow: 'hidden',
47
- display: 'flex', flexDirection: expanded ? 'row-reverse' : 'column',
48
- transition: 'all 300ms var(--kol-ease-house)',
49
- }}
50
- >
51
- <div style={{
52
- overflow: 'hidden',
53
- position: 'relative',
54
- flex: expanded ? '0 0 50%' : 1,
55
- minHeight: 0,
56
- minWidth: 0,
57
- }}>
58
- <div className={`kol-shell-card-preview kol-shell-card-preview--${previewFit}`} style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%' }}>
59
- {preview}
60
- </div>
61
- </div>
62
-
63
- {expanded ? (
64
- <div style={{ flex: 1, padding: 24, display: 'flex', flexDirection: 'column', justifyContent: 'space-between', overflow: 'auto' }}>
65
- {expandedContent}
66
- </div>
67
- ) : (
68
- <div className="bg-surface-primary border-t border-fg-04" style={{ padding: '12px 16px', width: '100%' }}>
69
- <div className="text-fg-96 kol-helper-14" style={{ marginBottom: 4 }}>{title}</div>
70
- {detail && <div className="text-fg-32 kol-helper-8">{detail}</div>}
71
- </div>
72
- )}
73
- </div>
74
- )
75
- }