@kolkrabbi/kol-component 0.239.1 → 0.240.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.239.1",
3
+ "version": "0.240.0",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -26,8 +26,8 @@
26
26
  "embla-carousel-react": "^8.6.0",
27
27
  "pdfjs-dist": "^6.3.289",
28
28
  "react-syntax-highlighter": "^16.1.1",
29
- "@kolkrabbi/kol-markdown": "^0.1.3",
30
- "@kolkrabbi/kol-search": "^0.3.0"
29
+ "@kolkrabbi/kol-search": "^0.3.0",
30
+ "@kolkrabbi/kol-markdown": "^0.1.3"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@kolkrabbi/kol-icons": ">=0.22.0",
@@ -681,8 +681,11 @@ export default function ColumnBrowser({
681
681
  const rootRef = useRef(null)
682
682
  /* `autoFocus` (ColumnBrowserSeams, kol-r2b2 2026-08-28): the arrow keys were dead until a row was
683
683
  * clicked — nothing focused the root on mount, and the consumer reached into the DOM for it. Re-run
684
- * on `prefix`, so a bucket switch from the header (which takes focus) hands the keyboard back. */
685
- useEffect(() => { if (autoFocus) rootRef.current?.focus() }, [autoFocus, prefix])
684
+ * on `prefix`, so a bucket switch from the header (which takes focus) hands the keyboard back.
685
+ * `preventScroll` (explorer-autofocus-scrolls-the-fixed-page, kol-website 2026-10-06): inside
686
+ * `PageShell mode="fixed"` the focus scrolled the page's scroller 102px to bring the browser into
687
+ * view, and the header opened off-screen. The keyboard still lands here; the page stays put. */
688
+ useEffect(() => { if (autoFocus) rootRef.current?.focus({ preventScroll: true }) }, [autoFocus, prefix])
686
689
 
687
690
  /* THE KEYBOARD SELECTS TOO (user 2026-09-23: *"the highlight focus is on the correct item, this
688
691
  * has been a problem for awhile"*). Clicks reported through `onSelectClick`; the arrows moved
@@ -195,13 +195,18 @@ export default function SectionSplit({
195
195
  <section
196
196
  ref={themeRef}
197
197
  data-theme={themeStamp}
198
- className={`kol-section-split flex flex-col justify-center px-5 py-16 md:px-8 md:py-24 lg:px-14 lg:py-32 [--kol-section-py:4rem] md:[--kol-section-py:6rem] lg:[--kol-section-py:8rem] ${minHeightClass(height)} ${surfaceClass(background, 'none')} ${bleed} ${className}`.replace(/\s+/g, ' ').trim()}
198
+ className={`kol-section-split flex flex-col justify-center py-16 md:py-24 lg:py-32 [--kol-section-py:4rem] md:[--kol-section-py:6rem] lg:[--kol-section-py:8rem] ${minHeightClass(height)} ${surfaceClass(background, 'none')} ${bleed} ${className}`.replace(/\s+/g, ' ').trim()}
199
199
  style={sectionStyle}
200
200
  >
201
201
  {/* ONE cap for the whole section family (user ruling 2026-08-26): the shell's
202
202
  * --kol-container-max ladder — 100% → 1400 → 1600 → 1800. Split ran 1200,
203
203
  * cards 1400, the CTA 1600: three numbers for one job, unflagged. */}
204
- <div className={`w-full max-w-[var(--kol-container-max,var(--kol-content-shell,1800px))] mx-auto ${grid} ${innerClassName}`.replace(/\s+/g, ' ').trim()}>
204
+ {/* …AND THE RULED GUTTER IS INSIDE THAT CAP (section-split-content-media-and-ruled-gutter,
205
+ * kol-website 2026-10-06): the section padded itself px-5/8/14 OUTSIDE the cap, so its text
206
+ * started 56 at 1440 against 48 for every `.kol-page` band below it, and at 1920 the padding
207
+ * fell outside the cap and did nothing. Now the inner box is `.kol-page`'s own measure —
208
+ * the cap, then `--kol-pad-section-x` inside it. `fill` keeps its edge-to-edge halves. */}
209
+ <div className={`w-full max-w-[var(--kol-container-max,var(--kol-content-shell,1800px))] mx-auto px-[var(--kol-pad-section-x,20px)] ${grid} ${innerClassName}`.replace(/\s+/g, ' ').trim()}>
205
210
  {/* `order` rather than `flex-row-reverse`: the grid is one column below
206
211
  * 901px, and DOM order is what decides the stack there. */}
207
212
  <SectionText
@@ -262,8 +267,13 @@ export default function SectionSplit({
262
267
  * rendered 2.22 at 1600 and cropped its image. From 901 the width is `auto` again:
263
268
  * the rung sets the height, the ratio sets the width, the column caps it — the
264
269
  * 2026-08-27 rule written on the `ratio` prop. */
265
- className={`kol-section-split-visual relative w-full min-[901px]:w-auto max-w-full justify-self-center rounded-[var(--kol-radius-sm)] min-[901px]:h-[calc(var(--kol-section-h,60vh)_-_2*var(--kol-section-py,4rem))] ${mediaClip ? 'overflow-hidden' : ''} ${mediaHover ? 'is-hoverable' : ''} ${mediaFirst ? 'order-1' : ''} ${centred ? 'max-w-[640px]' : ''}`.replace(/\s+/g, ' ').trim()}
266
- style={{ aspectRatio: ratio }}
270
+ /* `ratio="auto"` IS CONTENT, NOT A FRAME (section-split-content-media-and-ruled-gutter,
271
+ * kol-website 2026-10-06): with no ratio there is nothing for the width to follow, so
272
+ * the rung-minus-padding height made a fixed window over a card with its own height —
273
+ * /studio's 621px ProfileCard showed as a 104px strip at 1440. Auto media takes the
274
+ * column's width and its own height, at every width; a ratio keeps the bounded rule. */
275
+ className={`kol-section-split-visual relative w-full max-w-full justify-self-center rounded-[var(--kol-radius-sm)] ${ratio === 'auto' ? '' : 'min-[901px]:w-auto min-[901px]:h-[calc(var(--kol-section-h,60vh)_-_2*var(--kol-section-py,4rem))]'} ${mediaClip ? 'overflow-hidden' : ''} ${mediaHover ? 'is-hoverable' : ''} ${mediaFirst ? 'order-1' : ''} ${centred ? 'max-w-[640px]' : ''}`.replace(/\s+/g, ' ').trim()}
276
+ style={ratio === 'auto' ? undefined : { aspectRatio: ratio }}
267
277
  >
268
278
  {media ?? (placeholder === true
269
279
  ? <AssetPlaceholder className="h-full w-full" />
@@ -121,7 +121,10 @@ export function usePopover({
121
121
 
122
122
  const interactions = useInteractions([
123
123
  useClick(data.context, { enabled: click }),
124
- useHover(data.context, { enabled: hover, delay: hoverDelay, move: false }),
124
+ /* `mouseOnly` — a hover is a mouse's (2026-10-05, found on labs' phone sheet). Touch has none:
125
+ * a tap read as a hover that never ends, so a tooltip opened on the tap and stayed over the
126
+ * next control. Only Tooltip opens on hover, and the keyboard still reaches it through `focus`. */
127
+ useHover(data.context, { enabled: hover, delay: hoverDelay, move: false, mouseOnly: true }),
125
128
  useFocus(data.context, { enabled: focus }),
126
129
  /* `dismiss` may be an object of floating-ui's own options — `{ outsidePress: false }` keeps Esc
127
130
  * and drops the outside click (Dropdown `stayOpen`) */