@kolkrabbi/kol-shell 0.40.0 → 0.42.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.40.0",
3
+ "version": "0.42.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.127.0",
15
+ "@kolkrabbi/kol-component": ">=0.174.0",
16
16
  "@kolkrabbi/kol-icons": ">=0.16.0",
17
17
  "@kolkrabbi/kol-theme": ">=0.84.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.162.0",
23
+ "@kolkrabbi/kol-component": "^0.176.0",
24
+ "@kolkrabbi/kol-framework": "^0.40.0",
24
25
  "@kolkrabbi/kol-icons": "^0.25.0",
25
- "@kolkrabbi/kol-framework": "^0.36.0",
26
- "@kolkrabbi/kol-theme": "^0.128.0"
26
+ "@kolkrabbi/kol-theme": "^0.134.0"
27
27
  },
28
28
  "files": [
29
29
  "src",
@@ -1,6 +1,6 @@
1
1
  import { ContentCard, ContentFilters, ContentRow } from '@kolkrabbi/kol-component'
2
2
  import PageShell from './PageShell.jsx'
3
- import PageHeader from './PageHeader.jsx'
3
+ import { PageHeader } from '@kolkrabbi/kol-component'
4
4
  import WalkthroughPanel from './WalkthroughPanel.jsx'
5
5
 
6
6
  /* taxonomy-ok: organism — nests PageShell / PageHeader / WalkthroughPanel (relative) + kol-component's ContentFilters + ContentCard / ContentRow */
@@ -18,7 +18,7 @@ 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, expanded, expandedContent, fit }` is
21
+ * media, actions, onClick, href, onNavigate, expanded, expandedContent, fit, ratio }` is
22
22
  * the whole contract — `expanded` / `expandedContent` reach `ContentCard catalog`'s
23
23
  * 2×2 cell (ShellHomeSystemMonitorGaps, kol-monitor 2026-08-27) — and the page
24
24
  * HIDES the cell's three neighbours itself (CatalogPageMonitorParity: the
@@ -27,7 +27,10 @@ import WalkthroughPanel from './WalkthroughPanel.jsx'
27
27
  * instead of reflowing around the expanded card); `fit` (`cover` default | `natural` | `compact`) is the
28
28
  * card's media fit, PER CARD because one catalog mixes photographs (cover) and
29
29
  * diagrams (natural) — CatalogPageCardFit, kol-monitor: a rack preview wider
30
- * than the card lost its left rail to `cover`. Anything `ContentFilters` takes that the page has no
30
+ * than the card lost its left rail to `cover`; `ratio` (catalogpage-card-ratio, kol-client-olina
31
+ * 2026-09-03) is the card's aspect, PER CARD for the same reason — one page renders the same artwork
32
+ * at 1:1, 4:5 and 9:16 side by side, and a deck is a 16:9 stage — unset falling through to the
33
+ * variant's A4, so nothing existing moves. Anything `ContentFilters` takes that the page has no
31
34
  * prop for goes through `filtersProps` — `mutuallyExclusiveFilters` was the gap.
32
35
  *
33
36
  * @param {Object} header PageHeader props — `{ title, subtitle, size, voice, eyebrow }`
@@ -131,7 +134,7 @@ export default function CatalogPage({
131
134
  const key = c.key ?? item.key ?? item.id ?? item.name ?? i
132
135
  return layout === 'list'
133
136
  ? <ContentRow key={key} variant="catalog" title={c.title} detail={c.detail} actions={c.actions} onClick={c.onClick} href={c.href} onNavigate={c.onNavigate} />
134
- : <ContentCard key={key} variant="catalog" fit={c.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} />
137
+ : <ContentCard key={key} variant="catalog" fit={c.fit ?? 'cover'} ratio={c.ratio} 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} />
135
138
  })}
136
139
  </div>
137
140
  )
package/src/NavRail.jsx CHANGED
@@ -50,7 +50,7 @@ import Logomark from './Logomark.jsx'
50
50
  * method sections; on one level they flatten into an icon column built for five
51
51
  * destinations and the section names have nowhere to render at all.
52
52
  *
53
- * L2 is NOT a `Button`: the icon-button ladder is sm 28 / md 32 / lg 36 and this
53
+ * L2 is NOT a `Button`: the icon-button ladder is 22/26/32/40 (2026-09-03) and this
54
54
  * rung is 20 — there is nothing below sm, and adding one is a change to that
55
55
  * ladder's law, which is the user's call and not this ticket's. The row is
56
56
  * written directly and keys `aria-current`, so kol-theme's
@@ -1,7 +1,7 @@
1
1
  import { useState } from 'react'
2
2
  import { ContentFilters, IconFrame } from '@kolkrabbi/kol-component'
3
3
  import PageShell from './PageShell.jsx'
4
- import PageHeader from './PageHeader.jsx'
4
+ import { PageHeader } from '@kolkrabbi/kol-component'
5
5
 
6
6
  /**
7
7
  * SettingsScaffold — the settings-page idiom both shells re-implemented inline:
package/src/index.js CHANGED
@@ -15,7 +15,9 @@ export { NavHiddenContext, useNavHidden } from './navHidden.js'
15
15
  export { SettingsToggleContext, useSettingsToggle } from './settingsToggle.js'
16
16
  export { default as NavRail } from './NavRail.jsx'
17
17
  export { default as PageShell, PageBleed } from './PageShell.jsx'
18
- export { default as PageHeader } from './PageHeader.jsx'
18
+ /* PageHeader MOVED to @kolkrabbi/kol-component 2026-09-03 (page-header-one-masthead).
19
+ * Not re-exported: every kol-shell consumer already has kol-component as a peer,
20
+ * so the import path changes and nothing else. See docs retirements. */
19
21
  /* ContentFilters is NOT exported here — it lives in @kolkrabbi/kol-component,
20
22
  * where it always did. This package shipped a recreated duplicate 0.1.0–0.2.0;
21
23
  * retired 2026-08-15, quarantined in _tmp/. Import it from kol-component. */
@@ -1,109 +0,0 @@
1
- /**
2
- * PageHeader — the page's masthead: an optional eyebrow, the title, and a mono
3
- * subtitle.
4
- *
5
- * TWO SCALES, because two things were being called a page header. An app page
6
- * (monitor's Library, mirror's settings) wears a compact heading; a SITE page
7
- * (kol-website's /work) opens on the display scale and the difference is not a
8
- * preference, it is which register you are in. `size` picks:
9
- *
10
- * sm kol-sans-heading-03 32px — app chrome, a titled panel
11
- * md kol-sans-display-03 36 / 42 / 48px — the default page masthead
12
- * lg kol-sans-display-02 44 / 56 / 64px — a landing or section opener
13
- *
14
- * The title used to be `kol-heading-sm`, a retired t-shirt stop with NO rule
15
- * anywhere in kol-theme, so every page title in every shell app fell through to
16
- * the browser's default h1 (found 2026-08-15). It was mapped to heading-03,
17
- * which was still too quiet for a page — hence the scale.
18
- *
19
- * `eyebrow` is the small label above the title (kol-website's "USE CASES").
20
- * It self-hides when unset, so an app page passes nothing and gets nothing.
21
- *
22
- * @param {ReactNode} eyebrow small label above the title
23
- * @param {ReactNode} title
24
- * @param {ReactNode} subtitle mono line under the title
25
- * @param {string} size sm | md | lg (default md)
26
- * @param {'sans'|'mono'} voice the title's family (default sans). `mono` = the
27
- * app tier's masthead (PageHeaderMonoTitle, kol-fxr 2026-08-27 —
28
- * user ruling: kol-monitor's JetBrains Mono 32 / 500 is the look):
29
- * kol-mono-heading-03 · kol-mono-display-03 · kol-mono-display-02
30
- * (kol-theme ≥0.67.0). The subtitle stays kol-mono-14.
31
- * @param {string} titleClass replaces the title role whole (the ContentText seam)
32
- * @param {ReactNode} actions a control cluster on the SUBTITLE's first baseline — on the title's
33
- * when there is no subtitle (PageHeaderTrailingSlot, kol-website 2026-08-28;
34
- * kol-r2b2's header is the reference: wordmark left, controls right, on the
35
- * line). Without it the consumer wrapped the header in a flex row and got the
36
- * h1's baseline, or re-rendered the subtitle as a bare <p> off copied classes
37
- * with an `!important` on the margin — a DS text role re-implemented outside.
38
- * @param {string} subtitleMaxWidth the lede's measure (e.g. '800px' or '60ch'), a prop
39
- * instead of a consumer selector reaching inside
40
- * The bottom rhythm is `--kol-page-header-mb` (default 40px): inline, as before, but through a
41
- * variable a consumer can re-point where an inline literal could only be `!important`-ed.
42
- */
43
- const TITLE = {
44
- sans: { sm: 'kol-sans-heading-03', md: 'kol-sans-display-03', lg: 'kol-sans-display-02' },
45
- mono: { sm: 'kol-mono-heading-03', md: 'kol-mono-display-03', lg: 'kol-mono-display-02' },
46
- }
47
-
48
- export default function PageHeader({ eyebrow, title, subtitle, actions, subtitleMaxWidth, size = 'md', voice = 'sans', titleClass, className = '' }) {
49
- const roles = TITLE[voice] ?? TITLE.sans
50
- const h1 = <h1 className={`text-fg-96 ${titleClass ?? roles[size] ?? roles.md}`}>{title}</h1>
51
- const lede = subtitle && <p className="text-oq-64 kol-mono-14 min-w-0" style={{ marginTop: actions ? undefined : 12, maxWidth: subtitleMaxWidth }}>{subtitle}</p>
52
- /* The cluster shares a baseline row with the lede (or the title): flexbox
53
- exposes a flex item's FIRST baseline, so putting them in one row is the one
54
- way to land on the subtitle's line rather than the h1's.
55
-
56
- AND IT CONTRIBUTES NO HEIGHT (PageHeaderActionsGrowsBlock, kol-fxr
57
- 2026-08-28). A flex row takes its tallest child, so a cluster of `sm`
58
- controls (28px since kol-theme 0.90.0) against a one-line `kol-mono-14`
59
- lede (18px) made the masthead 10px taller — measured, monitor's `/` at 65.2
60
- against fxr's `/settings` at 75.2 with identical titles. The masthead is the
61
- one block every page of an app shares, so a page with a control cluster sat
62
- 10px lower than every page without one, with no way to opt out.
63
-
64
- `h-0` + `self-center` is the fix and it is not a magic number: a zero-height
65
- box centred on the row makes the children overflow it symmetrically, so the
66
- row's height is the TEXT's and the cluster is free at any rung (the gap is
67
- 10px at `sm`, 14 at `md` — a constant would have been wrong). Horizontal
68
- layout is untouched: the box still takes its width, so `justify-between`
69
- holds and a long lede cannot run under the controls. */
70
- const cluster = actions && <div className="flex items-center gap-4 shrink-0 h-0 self-center">{actions}</div>
71
- return (
72
- /* the block owns its own rhythm — margins inline, never in a shared type
73
- class, which leaks estate-wide (ShellHeaderFilterRefinements, 2026-08-15) */
74
- <header className={`flex flex-col ${className}`.trim()} style={{ marginBottom: 'var(--kol-page-header-mb, 40px)' }}>
75
- {eyebrow && (
76
- /* HELPER, not mono (user ruling 2026-08-15). An eyebrow is single-line
77
- chrome — that is the whole definition of the `kol-helper-*` ramp, and
78
- it carries its own tracking, so no inline letter-spacing here.
79
- Uppercase, and off `fg-48`: under half the ink read as disabled
80
- rather than quiet, and this is a live label, not a footnote. */
81
- <p
82
- className="text-oq-64 kol-helper-12"
83
- style={{ marginBottom: 12, textTransform: 'uppercase' }}
84
- >
85
- {eyebrow}
86
- </p>
87
- )}
88
- {actions && subtitle ? (
89
- <>
90
- {h1}
91
- <div className="flex items-baseline justify-between gap-6" style={{ marginTop: 12 }}>
92
- {lede}
93
- {cluster}
94
- </div>
95
- </>
96
- ) : actions ? (
97
- <div className="flex items-baseline justify-between gap-6">
98
- {h1}
99
- {cluster}
100
- </div>
101
- ) : (
102
- <>
103
- {h1}
104
- {lede}
105
- </>
106
- )}
107
- </header>
108
- )
109
- }