@kolkrabbi/kol-shell 0.44.0 → 0.46.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 +3 -3
- package/src/CatalogPage.jsx +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.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",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"@kolkrabbi/kol-component": ">=0.174.0",
|
|
16
16
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
17
|
-
"@kolkrabbi/kol-theme": ">=0.
|
|
17
|
+
"@kolkrabbi/kol-theme": ">=0.137.0",
|
|
18
18
|
"gsap": "^3.13.0",
|
|
19
19
|
"react": "^18.3.0 || ^19.0.0",
|
|
20
20
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@kolkrabbi/kol-component": "^0.176.0",
|
|
24
24
|
"@kolkrabbi/kol-framework": "^0.41.0",
|
|
25
25
|
"@kolkrabbi/kol-icons": "^0.25.0",
|
|
26
|
-
"@kolkrabbi/kol-theme": "^0.
|
|
26
|
+
"@kolkrabbi/kol-theme": "^0.137.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src",
|
package/src/CatalogPage.jsx
CHANGED
|
@@ -50,6 +50,7 @@ import WalkthroughPanel from './WalkthroughPanel.jsx'
|
|
|
50
50
|
* framework container — the site tier, so a brand book adopting this page keeps its geometry
|
|
51
51
|
* @param {ReactNode} trailingActions the header's RIGHT slot (ContentFilters' — MediaLibrary's SELECT / FLAT); never empty beside the divider
|
|
52
52
|
* @param {number} minColumn the grid track's floor in px (default 160); a shelf of three decks passes 280 — the six-track ceiling still applies
|
|
53
|
+
* @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
|
|
53
54
|
* @param {ElementType} iconComponent icon renderer seam for ContentFilters
|
|
54
55
|
* @param {boolean} showCountOnlyWhenFiltering (default true)
|
|
55
56
|
* @param {Object} filtersProps spread onto ContentFilters last — e.g. `{ mutuallyExclusiveFilters: ['category', 'u_label'] }`
|
|
@@ -96,6 +97,12 @@ export default function CatalogPage({
|
|
|
96
97
|
/* the grid track's floor. 160 is a 26-tile catalog's; a shelf of three decks
|
|
97
98
|
wants ~280 so the cards read at all. A ceiling of 6 tracks still applies. */
|
|
98
99
|
minColumn = 160,
|
|
100
|
+
/* the LIST row's variant. `catalog` (default) is the 36px GridCard row — title
|
|
101
|
+
and detail on one line, no thumb — which is what every app-tier list was
|
|
102
|
+
ruled on (CatalogPageMonitorParity). A catalog whose grid shows a cover
|
|
103
|
+
passes `file`: the 48px thumb row, so the list shows the same cover small
|
|
104
|
+
(kol-client-olina 2026-09-03; user, on the bare row: "ugly ugly ugly"). */
|
|
105
|
+
rowVariant = 'catalog',
|
|
99
106
|
iconComponent,
|
|
100
107
|
showCountOnlyWhenFiltering = true,
|
|
101
108
|
filtersProps,
|
|
@@ -105,7 +112,7 @@ export default function CatalogPage({
|
|
|
105
112
|
}) {
|
|
106
113
|
const open = walkthrough?.open === true
|
|
107
114
|
return (
|
|
108
|
-
<PageShell width={width} className={className} style={{ overflow: 'hidden', ...style }}>
|
|
115
|
+
<PageShell width={width} className={className} style={{ overflow: 'hidden', '--kol-catalog-min': `${minColumn}px`, ...style }}>
|
|
109
116
|
{header && <PageHeader {...header} />}
|
|
110
117
|
<div style={{ flex: 1, position: 'relative' }}>
|
|
111
118
|
{open && <WalkthroughPanel steps={walkthrough.steps} iconComponent={walkthrough.iconComponent} />}
|
|
@@ -141,13 +148,16 @@ export default function CatalogPage({
|
|
|
141
148
|
* six-column ruling — below the ceiling the hide-set is
|
|
142
149
|
* desktop-only geometry. */
|
|
143
150
|
return (
|
|
144
|
-
|
|
151
|
+
/* the catalog grid is a CLASS (`.kol-catalog-grid`, kol-theme ≥0.137.0) so the
|
|
152
|
+
* filter row's first group can read the track count it renders; `minColumn`
|
|
153
|
+
* reaches it as `--kol-catalog-min` on the page (set on PageShell above) */
|
|
154
|
+
<div className={layout === 'list' ? undefined : 'kol-catalog-grid'} style={layout === 'list' ? { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(min(100%, max(240px, calc((100% - 3 * 8px) / 4))), 1fr))', gap: 8 } : undefined}>
|
|
145
155
|
{rows.map((item, i) => {
|
|
146
156
|
if (hidden.has(i)) return null
|
|
147
157
|
const c = cards[i]
|
|
148
158
|
const key = c.key ?? item.key ?? item.id ?? item.name ?? i
|
|
149
159
|
return layout === 'list'
|
|
150
|
-
? <ContentRow key={key} variant=
|
|
160
|
+
? <ContentRow key={key} variant={rowVariant} media={c.media} ratio={c.ratio} title={c.title} detail={c.detail} actions={c.actions} onClick={c.onClick} href={c.href} onNavigate={c.onNavigate} />
|
|
151
161
|
: <ContentCard key={key} variant="catalog" fit={c.fit ?? 'cover'} ratio={c.ratio} title={c.title} detail={c.detail} media={c.media} actions={c.actions} onClick={c.onClick} href={c.href} onNavigate={c.onNavigate} expanded={c.expanded} expandedContent={c.expandedContent} />
|
|
152
162
|
})}
|
|
153
163
|
</div>
|