@kolkrabbi/kol-shell 0.74.0 → 0.75.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 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The application shell",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./src/*": "./src/*"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@kolkrabbi/kol-component": ">=0.
|
|
15
|
+
"@kolkrabbi/kol-component": ">=0.291.0",
|
|
16
16
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
17
17
|
"@kolkrabbi/kol-theme": ">=0.179.0",
|
|
18
18
|
"gsap": "^3.13.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@kolkrabbi/kol-component": "^0.
|
|
23
|
+
"@kolkrabbi/kol-component": "^0.291.0",
|
|
24
24
|
"@kolkrabbi/kol-icons": "^0.41.0",
|
|
25
25
|
"@kolkrabbi/kol-framework": "^0.53.0",
|
|
26
26
|
"@kolkrabbi/kol-theme": "^0.183.0"
|
package/src/CatalogPage.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useRef, useState } from 'react'
|
|
2
|
-
import { ActionButton, ContentCard, ContentFilters, ContentRow, SizeOrDownload, formatSize } from '@kolkrabbi/kol-component'
|
|
2
|
+
import { ActionButton, AppItemMenuProvider, ContentCard, ContentFilters, ContentRow, SizeOrDownload, formatSize } from '@kolkrabbi/kol-component'
|
|
3
3
|
import PageShell from './PageShell.jsx'
|
|
4
4
|
import { PageHeader } from '@kolkrabbi/kol-component'
|
|
5
5
|
import WalkthroughPanel from './WalkthroughPanel.jsx'
|
|
@@ -37,7 +37,9 @@ import WalkthroughPanel from './WalkthroughPanel.jsx'
|
|
|
37
37
|
* variant's A4, so nothing existing moves. Anything `ContentFilters` takes that the page has no
|
|
38
38
|
* prop for goes through `filtersProps` — `mutuallyExclusiveFilters` was the gap.
|
|
39
39
|
*
|
|
40
|
-
* @param {'catalog'|'shelf'} preset the whole page as one word (default `catalog` = today's defaults). `
|
|
40
|
+
* @param {'catalog'|'app'|'shelf'} preset the whole page as one word (default `catalog` = today's defaults). `app` = an
|
|
41
|
+
* app's saved files: the `app` card and row (`toCard` returns `verbs` · `download` ·
|
|
42
|
+
* `menuItems` · `date` ms · `size` bytes · `media` src) and one shared menu. `shelf` = a
|
|
41
43
|
* shelf of slide decks: capped · 3 tracks on a 280 floor · `slide` card and row · stacked
|
|
42
44
|
* list · `kol-tone-secondary` on the root · the All / Recent view strip; `toCard` returns
|
|
43
45
|
* the deck's fields and handlers — `title date bytes count cover href onNavigate onDownload
|
|
@@ -62,9 +64,9 @@ import WalkthroughPanel from './WalkthroughPanel.jsx'
|
|
|
62
64
|
* @param {number} minColumn the grid track's floor in px (default 160) — a minimum, never a count
|
|
63
65
|
* @param {number} maxColumns the grid's ceiling (default 6, the ruling); a three-deck shelf passes 3 and the tracks share the width
|
|
64
66
|
* @param {string} cardVariant the grid card's variant, per page (default `catalog`); `toCard` may return `variant` per card
|
|
65
|
-
* @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 —
|
|
67
|
+
* @param {'catalog'|'file'|'app'} rowVariant the list row (default `catalog`, the 36px no-thumb row); `file` = the 48px thumb row, for a catalog whose grid shows a cover —
|
|
66
68
|
* its slots (`date` · `size` · `meta` · `selected`) come from `toCard` like everything else
|
|
67
|
-
* @param {number} listColumns the list grid's column ceiling (default 3 for a file or slide row, else 4); tracks never go under 240
|
|
69
|
+
* @param {number} listColumns the list grid's column ceiling (default 3 for a file, app or slide row, else 4); tracks never go under 240
|
|
68
70
|
* @param {'grid'|'stack'} listLayout the list's container (default `grid`, rows four across — monitor's ruling); `stack` = one row per line
|
|
69
71
|
* @param {ElementType} iconComponent icon renderer seam for ContentFilters
|
|
70
72
|
* @param {boolean} showCountOnlyWhenFiltering (default true)
|
|
@@ -97,6 +99,9 @@ function computeHiddenSet(items, expandedIdx) {
|
|
|
97
99
|
* value read off the render. An explicit prop always wins over its preset. */
|
|
98
100
|
const PRESETS = {
|
|
99
101
|
catalog: {},
|
|
102
|
+
/* an app's saved files (CatalogAppVariant, kol-fxr 2026-10-23): the `app` card and row — `toCard`
|
|
103
|
+
* returns `verbs` · `download` · `menuItems` · `date` · `size` · `media` and the page draws the rest */
|
|
104
|
+
app: { cardVariant: 'app', rowVariant: 'app' },
|
|
100
105
|
shelf: {
|
|
101
106
|
width: 'capped', maxColumns: 3, minColumn: 280,
|
|
102
107
|
cardVariant: 'slide', rowVariant: 'slide', listLayout: 'stack',
|
|
@@ -178,7 +183,7 @@ export default function CatalogPage({
|
|
|
178
183
|
/* the LIST grid's column ceiling (2026-10-22 — user: *"are you passing props on number of items/columns?"*). It was
|
|
179
184
|
a hard 4 — monitor's ruling for the 36px catalog row. A file or slide row is a contained tile with a 72 thumb, so
|
|
180
185
|
it defaults to 3 (user: *"change this one to 3"*). Tracks still never go under 240. */
|
|
181
|
-
listColumns = rowVariant === 'file' || rowVariant === 'slide' ? 3 : 4,
|
|
186
|
+
listColumns = rowVariant === 'file' || rowVariant === 'app' || rowVariant === 'slide' ? 3 : 4,
|
|
182
187
|
iconComponent,
|
|
183
188
|
showCountOnlyWhenFiltering = true,
|
|
184
189
|
filtersProps,
|
|
@@ -211,7 +216,9 @@ export default function CatalogPage({
|
|
|
211
216
|
observer.current = ro
|
|
212
217
|
}, [minColumn, maxColumns])
|
|
213
218
|
|
|
219
|
+
/* the page's ONE menu for its `app` cards and rows (AppItem.jsx) — closed, it renders nothing */
|
|
214
220
|
return (
|
|
221
|
+
<AppItemMenuProvider>
|
|
215
222
|
<PageShell width={width} className={`${PRESETS[preset]?.className ?? ''} ${className}`.trim()} style={{ overflow: 'hidden', '--kol-catalog-n': cols ?? undefined, ...style }}>
|
|
216
223
|
{header && <PageHeader level="app" {...header} />}
|
|
217
224
|
<div style={{ flex: 1, position: 'relative' }}>
|
|
@@ -280,5 +287,6 @@ export default function CatalogPage({
|
|
|
280
287
|
{children}
|
|
281
288
|
{actions && <div style={{ display: 'flex', gap: 12, marginTop: 48, alignSelf: 'flex-start' }}>{actions}</div>}
|
|
282
289
|
</PageShell>
|
|
290
|
+
</AppItemMenuProvider>
|
|
283
291
|
)
|
|
284
292
|
}
|