@kolkrabbi/kol-shell 0.5.0 → 0.6.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/PageHeader.jsx +41 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-shell",
3
- "version": "0.5.0",
3
+ "version": "0.6.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,7 +20,7 @@
20
20
  "react-dom": "^18.3.0 || ^19.0.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@kolkrabbi/kol-component": "^0.52.0",
23
+ "@kolkrabbi/kol-component": "^0.53.0",
24
24
  "@kolkrabbi/kol-framework": "^0.22.0",
25
25
  "@kolkrabbi/kol-icons": "^0.17.0",
26
26
  "@kolkrabbi/kol-theme": "^0.46.1"
@@ -1,22 +1,47 @@
1
1
  /**
2
- * PageHeader — page title + mono subtitle. The mirror cut (subtitle
3
- * `kol-mono-14`, the newer voice) wins over monitor's `kol-text-sm`; override
4
- * via a wrapper if a consumer needs otherwise. Takes title/subtitle as values
5
- * so tab-driven headers (Settings) stop re-implementing the markup inline.
2
+ * PageHeader — the page's masthead: an optional eyebrow, the title, and a mono
3
+ * subtitle.
6
4
  *
7
- * The title was `kol-heading-sm` a RETIRED t-shirt stop with NO RULE anywhere
8
- * in kol-theme, so every page title in every shell app has been falling through
9
- * to the browser's default h1 with no DS type on it at all (found 2026-08-15).
10
- * Mapped to the numeric scale at `kol-sans-heading-03` (32px), the same way the
11
- * dead `kol-mono-sm` and `kol-helper-lg` stops were mapped.
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)
12
26
  */
13
- export default function PageHeader({ title, subtitle }) {
27
+ const TITLE = {
28
+ sm: 'kol-sans-heading-03',
29
+ md: 'kol-sans-display-03',
30
+ lg: 'kol-sans-display-02',
31
+ }
32
+
33
+ export default function PageHeader({ eyebrow, title, subtitle, size = 'md', className = '' }) {
14
34
  return (
15
- <>
16
- {/* gap inline, never in the type class — margin in a shared type class
17
- leaks estate-wide (ShellHeaderFilterRefinements, 2026-08-15) */}
18
- <h1 className="text-fg-96 kol-sans-heading-03" style={{ marginBottom: 8 }}>{title}</h1>
19
- <p className="text-fg-48 kol-mono-14" style={{ marginBottom: 40 }}>{subtitle}</p>
20
- </>
35
+ /* the block owns its own rhythm — margins inline, never in a shared type
36
+ class, which leaks estate-wide (ShellHeaderFilterRefinements, 2026-08-15) */
37
+ <header className={`flex flex-col ${className}`.trim()} style={{ marginBottom: 40 }}>
38
+ {eyebrow && (
39
+ <p className="text-fg-48 kol-mono-12" style={{ marginBottom: 12 }}>{eyebrow}</p>
40
+ )}
41
+ <h1 className={`text-fg-96 ${TITLE[size] ?? TITLE.md}`}>{title}</h1>
42
+ {subtitle && (
43
+ <p className="text-fg-48 kol-mono-14" style={{ marginTop: 12 }}>{subtitle}</p>
44
+ )}
45
+ </header>
21
46
  )
22
47
  }