@kolkrabbi/kol-component 0.275.0 → 0.276.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.275.0",
3
+ "version": "0.276.0",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "react-dom": "^18.3.0 || ^19.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@kolkrabbi/kol-icons": "^0.39.0"
41
+ "@kolkrabbi/kol-icons": "^0.41.0"
42
42
  },
43
43
  "files": [
44
44
  "src",
@@ -10,8 +10,10 @@ import React from 'react'
10
10
  * @param {Object} props
11
11
  * @param {string} props.variant - 'horizontal' or 'vertical' (default: 'horizontal')
12
12
  * @param {string} props.className - Additional classes
13
- * @param {number} props.height - vertical variant only: the rule's height in px
14
- * (default 16 — sized to the type it separates, not to the row)
13
+ * @param {number|'fill'} props.height - vertical variant only: the rule's height in px
14
+ * (default 16 — sized to the type it separates, not to the row), or `'fill'` — the rule
15
+ * stretches to the row (DividerHeightFill, kol-monitor 2026-10-18: eurorack panels separate
16
+ * jack and knob groups with full-height rules); `className` padding insets it
15
17
  * @param {string} props.opacity - Opacity level (01, 02, 04, 08, 12, 16, 24, 32, 48, 64, 80, 88, 96) (default: '08')
16
18
  */
17
19
  const Divider = ({ variant = 'horizontal', className = '', opacity = '08', inverse = false, height = 16 }) => {
@@ -26,6 +28,13 @@ const Divider = ({ variant = 'horizontal', className = '', opacity = '08', inver
26
28
  * gave a rule taller than the 18px type beside it, and any `self-*` passed
27
29
  * from a call site lost to the hardcoded one. `align-self: center` with an
28
30
  * explicit height puts it back on the type; `height` stays overridable. */
31
+ if (height === 'fill') {
32
+ return (
33
+ <div className={`flex self-stretch ${className}`.trim()}>
34
+ <div className={opacityClass} style={{ width: '1px' }} />
35
+ </div>
36
+ )
37
+ }
29
38
  return (
30
39
  <div className={`flex self-center items-center justify-center ${className}`.trim()} style={{ height }}>
31
40
  <div className={opacityClass} style={{ width: '1px', height: '100%' }} />
@@ -1,5 +1,4 @@
1
1
  import SectionText from './SectionText.jsx'
2
- import { TITLE_ROLES, useMasthead } from '../utilities/masthead.js'
3
2
  /**
4
3
  * PageHeader — The page masthead. the page's masthead: an optional eyebrow, the title, and a
5
4
  * sub-line.
@@ -20,45 +19,20 @@ import { TITLE_ROLES, useMasthead } from '../utilities/masthead.js'
20
19
  * `kol-component` at `>=0.127.0`, so every shell consumer already had it.
21
20
  * This overrides ARCHITECTURE §3's list, which named it kol-shell's.
22
21
  *
23
- * TWO SCALES, because two things were being called a page header. An app page
24
- * (monitor's Library, mirror's settings) wears a compact heading; a SITE page
25
- * (kol-website's /work) opens on the display scale and the difference is not a
26
- * preference, it is which register you are in. `size` picks:
27
- *
28
- * sm kol-sans-heading-03 32px — app chrome, a titled panel
29
- * md kol-sans-display-03 36 / 42 / 48px — the default page masthead
30
- * lg kol-sans-display-02 44 / 56 / 64px — a landing or section opener
31
- *
32
- * The title used to be `kol-heading-sm`, a retired t-shirt stop with NO rule
33
- * anywhere in kol-theme, so every page title in every shell app fell through to
34
- * the browser's default h1 (found 2026-08-15). It was mapped to heading-03,
35
- * which was still too quiet for a page — hence the scale.
22
+ * ONE SCALE since 2026-10-18 (Round 11): the app/site split, `size` sm–xl and the mono voice are
23
+ * retired — `level` page | section is the only choice (see the block under this one).
36
24
  *
37
25
  * `eyebrow` is the small label above the title (kol-website's "USE CASES").
38
26
  * It self-hides when unset, so an app page passes nothing and gets nothing.
39
27
  *
40
28
  * @param {ReactNode} eyebrow small label above the title
41
29
  * @param {ReactNode} title
42
- * @param {ReactNode} subtitle mono line under the title
43
- * @param {'app'|'site'} register which REGISTER the masthead is in (default `app`).
44
- * The registers differ in the sub-line's voice and nothing else — the
45
- * title roles, the sizes and the actions baseline are shared, which is
46
- * what made this one component rather than two:
47
- * app mono sub-line (`kol-mono-14`) — an app page's masthead. The
48
- * default, so no shell page moves.
49
- * site sans lede (`kol-sans-body-01`) — what kolkrabbi.io's `/prints`
50
- * and `/work` build by hand today.
51
- * @param {string} size sm | md | lg | xl (default md; xl = display-01, the approved page header)
52
- * @param {'page'|'section'} level ONE HEADER, TWO LEVELS (Round 11, approved 2026-10-18): `section` is the same
53
- * header one step down — an h2, and in the site register the section description
54
- * (16/24 Light +0.5px) under the page's (22/28 Light +0.01em). Default `page`.
30
+ * @param {ReactNode} subtitle the lede under the title (`description` is its other name)
31
+ * @param {'page'|'section'} level ONE HEADER, TWO LEVELS (Round 11, approved 2026-10-18): page = h1
32
+ * display-01 over `.kol-header-lede` (22/28 Light); section = h2 display-03 over
33
+ * `.kol-header-lede-section` (16/24 Light +0.5px). Default `page`.
55
34
  * @param {ReactNode} media a mark above the eyebrow (a logo, an SVG) — shown only when passed
56
35
  * @param {ReactNode} description the subtitle's other name — the header's description
57
- * @param {'sans'|'mono'} voice the title's family (default sans). `mono` = the
58
- * app tier's masthead (PageHeaderMonoTitle, kol-fxr 2026-08-27 —
59
- * user ruling: kol-monitor's JetBrains Mono 32 / 500 is the look):
60
- * kol-mono-heading-03 · kol-mono-display-03 · kol-mono-display-02
61
- * (kol-theme ≥0.67.0). The subtitle stays kol-mono-14.
62
36
  * @param {string} titleClass replaces the title role whole (the ContentText seam)
63
37
  * @param {ReactNode} actions a control cluster on the SUBTITLE's first baseline — on the title's
64
38
  * when there is no subtitle (PageHeaderTrailingSlot, kol-website 2026-08-28;
@@ -68,28 +42,22 @@ import { TITLE_ROLES, useMasthead } from '../utilities/masthead.js'
68
42
  * with an `!important` on the margin — a DS text role re-implemented outside.
69
43
  * @param {string} subtitleMaxWidth the lede's measure (e.g. '800px' or '60ch'), a prop
70
44
  * instead of a consumer selector reaching inside
71
- * @param {'display'|'mono'} masthead the APP's masthead (utilities/masthead.js, 2026-09-29): inside
72
- * a Shell it comes from `AppShell masthead` and WINS over `voice`/`size`, and
73
- * `display` drops the subtitle — one app, one header. Outside a Shell, unset =
74
- * the props as given, so no site page moves.
45
+ * size · voice · register · masthead — retired 2026-10-18, accepted and ignored.
75
46
  * The bottom rhythm is `--kol-page-header-mb` (default 40px): inline, as before, but through a
76
47
  * variable a consumer can re-point where an inline literal could only be `!important`-ed.
77
48
  */
78
- /* the title role per size and voice — the one thing PageHeader knows that the
79
- * base does not, because the base's ladder is the SECTION scale. Lives in
80
- * utilities/masthead.js since 2026-09-29 so a tool's own title reads the same table. */
81
- const TITLE = TITLE_ROLES
82
- /* the ONE thing the registers disagree about */
83
- const LEDE = { app: 'text-oq-64 kol-mono-14', site: 'kol-header-lede', 'site-section': 'kol-header-lede-section' }
49
+ /* ONE HEADER (Round 11 made the default, user 2026-10-18 — "did we not update any of the apps that
50
+ * use it?"). 0.267.0 shipped the approved header behind `register="site"` + `size="xl"` and left the
51
+ * defaults alone, so no app moved: monitor's Home still wore the mono masthead. Now the level is the
52
+ * only choice — page = display-01 over the 22/28 lede, section = display-03 over the 16/24 lede — and
53
+ * `size` · `voice` · `register` · `masthead` are accepted and ignored, so every caller (and every
54
+ * Shell's masthead) renders the one header with no edit. `titleClass` stays the seam. */
55
+ const TITLE = { page: 'kol-sans-display-01', section: 'kol-sans-display-03' }
56
+ const LEDE = { page: 'kol-header-lede', section: 'kol-header-lede-section' }
84
57
 
85
- export default function PageHeader({ eyebrow, title, subtitle: ownSubtitle0, description, actions, subtitleMaxWidth, size: ownSize = 'md', voice: ownVoice = 'sans', register = 'app', level = 'page', media, titleClass, masthead, className = '' }) {
86
- const ownSubtitle = ownSubtitle0 ?? description
58
+ export default function PageHeader({ eyebrow, title, subtitle, description, actions, subtitleMaxWidth, level = 'page', media, titleClass, className = '' }) {
87
59
  const section = level === 'section'
88
- const m = useMasthead(masthead)
89
- const voice = m ? m.voice : ownVoice
90
- const size = m ? m.size : ownSize
91
- const subtitle = m && !m.subtitle ? undefined : ownSubtitle
92
- const roles = TITLE[voice] ?? TITLE.sans
60
+ const lvl = section ? 'section' : 'page'
93
61
  const header = (
94
62
  /* the block owns its own rhythm — margins inline, never in a shared type
95
63
  class, which leaks estate-wide (ShellHeaderFilterRefinements, 2026-08-15) */
@@ -97,9 +65,9 @@ export default function PageHeader({ eyebrow, title, subtitle: ownSubtitle0, des
97
65
  eyebrow={eyebrow}
98
66
  headline={title}
99
67
  headlineAs={section ? 'h2' : 'h1'}
100
- headlineClass={`text-fg-96 ${titleClass ?? roles[size] ?? roles.md}${m?.upper ? ' uppercase' : ''}`}
101
- body={subtitle}
102
- bodyClass={`${(register === 'site' && section ? LEDE['site-section'] : LEDE[register]) ?? LEDE.app} min-w-0`}
68
+ headlineClass={`text-fg-96 ${titleClass ?? TITLE[lvl]}`}
69
+ body={subtitle ?? description}
70
+ bodyClass={`${LEDE[lvl]} min-w-0`}
103
71
  actions={actions}
104
72
  actionsPlacement="inline"
105
73
  actionsClass="flex items-center gap-4"