@kolkrabbi/kol-shell 0.48.0 → 0.49.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 +1 -1
- package/src/CatalogPage.jsx +8 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.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",
|
package/src/CatalogPage.jsx
CHANGED
|
@@ -53,7 +53,8 @@ import WalkthroughPanel from './WalkthroughPanel.jsx'
|
|
|
53
53
|
* `bleed` (default) fills the window — the app tier; `capped` centres on the
|
|
54
54
|
* framework container — the site tier, so a brand book adopting this page keeps its geometry
|
|
55
55
|
* @param {ReactNode} trailingActions the header's RIGHT slot (ContentFilters' — MediaLibrary's SELECT / FLAT); never empty beside the divider
|
|
56
|
-
* @param {number} minColumn the grid track's floor in px (default 160)
|
|
56
|
+
* @param {number} minColumn the grid track's floor in px (default 160) — a minimum, never a count
|
|
57
|
+
* @param {number} maxColumns the grid's ceiling (default 6, the ruling); a three-deck shelf passes 3 and the tracks share the width
|
|
57
58
|
* @param {string} cardVariant the grid card's variant, per page (default `catalog`); `toCard` may return `variant` per card
|
|
58
59
|
* @param {'catalog'|'file'} rowVariant the list row (default `catalog`, the 36px no-thumb row); `file` = the 48px thumb row, for a catalog whose grid shows a cover —
|
|
59
60
|
* its slots (`date` · `size` · `meta` · `selected`) come from `toCard` like everything else
|
|
@@ -104,6 +105,10 @@ export default function CatalogPage({
|
|
|
104
105
|
/* the grid track's floor. 160 is a 26-tile catalog's; a shelf of three decks
|
|
105
106
|
wants ~280 so the cards read at all. A ceiling of 6 tracks still applies. */
|
|
106
107
|
minColumn = 160,
|
|
108
|
+
/* the ceiling — the six-column ruling is a MAXIMUM; a three-deck shelf says 3
|
|
109
|
+
(kol-client-olina 2026-09-03; user: "why are the cards so small? they could
|
|
110
|
+
use 2 columns each" — raising the floor to force it was backwards) */
|
|
111
|
+
maxColumns = 6,
|
|
107
112
|
/* the LIST row's variant. `catalog` (default) is the 36px GridCard row — title
|
|
108
113
|
and detail on one line, no thumb — which is what every app-tier list was
|
|
109
114
|
ruled on (CatalogPageMonitorParity). A catalog whose grid shows a cover
|
|
@@ -142,12 +147,12 @@ export default function CatalogPage({
|
|
|
142
147
|
observer.current?.disconnect()
|
|
143
148
|
observer.current = null
|
|
144
149
|
if (!el) return
|
|
145
|
-
const measure = (W) => setCols((c) => { const n = Math.max(1, Math.min(
|
|
150
|
+
const measure = (W) => setCols((c) => { const n = Math.max(1, Math.min(maxColumns, Math.floor((W + 24) / (minColumn + 24)))); return c === n ? c : n })
|
|
146
151
|
measure(el.getBoundingClientRect().width)
|
|
147
152
|
const ro = new ResizeObserver(([entry]) => measure(entry.contentRect.width))
|
|
148
153
|
ro.observe(el)
|
|
149
154
|
observer.current = ro
|
|
150
|
-
}, [minColumn])
|
|
155
|
+
}, [minColumn, maxColumns])
|
|
151
156
|
|
|
152
157
|
return (
|
|
153
158
|
<PageShell width={width} className={className} style={{ overflow: 'hidden', '--kol-catalog-n': cols ?? undefined, ...style }}>
|