@kolkrabbi/kol-component 0.278.0 → 0.280.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.278.0",
3
+ "version": "0.280.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",
@@ -190,6 +190,8 @@ export default function ActionButton({
190
190
  </button>
191
191
  )
192
192
  /* The label shows as the DS Tooltip, not a native `title` (kol-client-olina 2026-09-22) — and
193
- * it follows the swap, so a Copy URL reads "Copied" while the check is up. */
194
- return aria ? <Tooltip label={aria}>{control}</Tooltip> : control
193
+ * it follows the swap, so a Copy URL reads "Copied" while the check is up. `asChild` anchors it to
194
+ * the control itself: a positioned control (CodeBlock's `kol-frame-control`) leaves the wrapper span
195
+ * behind in flow (kol-atlas 2026-10-19). */
196
+ return aria ? <Tooltip label={aria} asChild>{control}</Tooltip> : control
195
197
  }
@@ -29,8 +29,8 @@ import SectionText from './SectionText.jsx'
29
29
  * @param {ReactNode} title
30
30
  * @param {ReactNode} subtitle the lede under the title (`description` is its other name)
31
31
  * @param {'page'|'app'|'section'} level ONE HEADER (Round 11, approved 2026-10-18): page = h1
32
- * display-01 over `.kol-header-lede` (22/28 Light) — the hero; app = h1 display-02
33
- * over `.kol-header-lede-app` (19/26 Light) — the app tier's pages; section = h2
32
+ * display-01 over `.kol-header-lede` (22/28 Light) — the hero; app = h1 display-01 at
33
+ * 46/60 (`text-[46px] md:text-[60px]`) over `.kol-header-lede-app` (19/26 Light) — the app tier's pages; section = h2
34
34
  * display-03 over `.kol-header-lede-section` (16/24 Light +0.5px). Default `page`.
35
35
  * Classes per level: `PAGE_HEADER_ROLES`.
36
36
  * @param {ReactNode} media a mark above the eyebrow (a logo, an SVG) — shown only when passed
@@ -57,12 +57,13 @@ import SectionText from './SectionText.jsx'
57
57
  /* THREE LEVELS since 0.277.0 (PageHeaderAppLevel, kol-monitor — user: *"that display is fine for Section
58
58
  * Hero like in brand but not for EVERYTHING ELSE that uses the mono"*). `app` sits BETWEEN page and section,
59
59
  * in their family (0.278.0 — user: *"did I ask for mono?!?! … MAKE THE TEXT SMALLER … SO THAT IT IS BETWEEN
60
- * SECTION AND PAGE"*; 0.277.0 had made it mono): display-02 over a 19/26 light lede. The app tier's Home ·
60
+ * SECTION AND PAGE"*; 0.277.0 had made it mono): page's display-01 at 46 · 60 (from 768) in Tailwind,
61
+ * no new style (0.279.0), over a 19/26 light lede. The app tier's Home ·
61
62
  * Library · Settings · Dev pages, which kol-shell defaults to it. Exported so a page drawing its own title
62
63
  * (monitor's Create inputs) matches the level. */
63
64
  export const PAGE_HEADER_ROLES = {
64
65
  page: { title: 'kol-sans-display-01', lede: 'kol-header-lede' },
65
- app: { title: 'kol-sans-display-02', lede: 'kol-header-lede-app' },
66
+ app: { title: 'kol-sans-display-01 text-[46px] md:text-[60px]', lede: 'kol-header-lede-app' },
66
67
  section: { title: 'kol-sans-display-03', lede: 'kol-header-lede-section' },
67
68
  }
68
69
 
@@ -636,6 +636,9 @@ export function MediaInspector({ files, index, onClose, onPrev, onNext, mediaUrl
636
636
  * which remounts whenever the kind changes */
637
637
  const [size, setSize] = useState(null)
638
638
  const shownDims = dims && dims.key === o?.key ? dims : null
639
+ /* fill width is per file: paging lands on a key that is not this one, so it opens in fit */
640
+ const [fillKey, setFillKey] = useState(null)
641
+ const fill = fillKey != null && fillKey === o?.key
639
642
  useEffect(() => {
640
643
  const onKey = (e) => { if (e.shiftKey) return; if (e.key === 'ArrowLeft') onPrev(); if (e.key === 'ArrowRight') onNext() }
641
644
  window.addEventListener('keydown', onKey)
@@ -694,11 +697,14 @@ export function MediaInspector({ files, index, onClose, onPrev, onNext, mediaUrl
694
697
  </QuickLookFrame>
695
698
  ) : isImage(o.contentType) ? (
696
699
  <QuickLookFrame {...frame}>
697
- {/* A VECTOR HAS NO PIXEL SIZE (user 2026-09-24: a 32px logo.svg opened as a 32px window). It
698
- * is drawn in a 640 box — the window's max if that is smaller — and contained in it. */}
700
+ {/* A SMALL VECTOR HAS NO USEFUL PIXEL SIZE (user 2026-09-24: a 32px logo.svg opened as a 32px
701
+ * window). One under 640 wide — or with no size at all — is drawn in a 640 box, the window's
702
+ * max if that is smaller; a big one fits the window like a raster (kol-atlas 2026-10-19: its
703
+ * 1200×800 cards sat in the 640 box). A click toggles fit ↔ fill width; paging resets to fit. */}
699
704
  <img src={mediaUrl(o.key)} alt={o.displayKey}
700
- className="kol-quicklook-media"
701
- style={extOf(o.key) === 'svg' || o.contentType === 'image/svg+xml' ? { width: 'min(var(--kol-ql-max-w), 640px)', height: 'min(var(--kol-ql-media-h), 640px)' } : undefined}
705
+ className={`kol-quicklook-media${fill ? ' kol-quicklook-media--fill' : ''}`}
706
+ style={!fill && (extOf(o.key) === 'svg' || o.contentType === 'image/svg+xml') && !(shownDims?.w >= 640) ? { width: 'min(var(--kol-ql-max-w), 640px)', height: 'min(var(--kol-ql-media-h), 640px)' } : undefined}
707
+ onClick={() => setFillKey(fill ? null : o.key)}
702
708
  onLoad={(e) => setDims({ key: o.key, w: e.target.naturalWidth, h: e.target.naturalHeight })} />
703
709
  </QuickLookFrame>
704
710
  ) : isVideo(o.contentType) ? (