@kolkrabbi/kol-shell 0.80.0 → 0.81.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-shell",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "private": false,
5
5
  "description": "The application shell",
6
6
  "license": "MIT",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "peerDependencies": {
15
15
  "@kolkrabbi/kol-component": ">=0.299.0",
16
- "@kolkrabbi/kol-framework": ">=0.53.0",
16
+ "@kolkrabbi/kol-framework": ">=0.55.0",
17
17
  "@kolkrabbi/kol-icons": ">=0.16.0",
18
18
  "@kolkrabbi/kol-theme": ">=0.187.0",
19
19
  "gsap": "^3.13.0",
@@ -21,10 +21,10 @@
21
21
  "react-dom": "^18.3.0 || ^19.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@kolkrabbi/kol-component": "^0.299.0",
25
- "@kolkrabbi/kol-framework": "^0.54.0",
24
+ "@kolkrabbi/kol-component": "^0.301.0",
26
25
  "@kolkrabbi/kol-icons": "^0.45.0",
27
- "@kolkrabbi/kol-theme": "^0.187.0"
26
+ "@kolkrabbi/kol-framework": "^0.55.0",
27
+ "@kolkrabbi/kol-theme": "^0.189.0"
28
28
  },
29
29
  "files": [
30
30
  "src",
package/src/AppHub.jsx CHANGED
@@ -46,6 +46,10 @@ import { CommandOverlay, LabeledControlSection, MediaLibrary, ModalProvider, RAI
46
46
  * picker over the consumer's client, Sign in asks for the password in the DS dialog and hands it to the consumer. `shell.bottomItems` still replaces
47
47
  * the whole foot, as it always did.
48
48
  *
49
+ * @param {'light'|'dark'} defaultTheme THE APP'S DEFAULT THEME (AppHubDefaultTheme, kol-mirror 2026-10-24 — *"make this repo dark mode
50
+ * default"*): reset and the toggle's system choice land on it instead of the OS (kol-framework ≥0.55.0
51
+ * reads `data-theme-default`, which the Hub stamps). `app.defaultTheme` says the same. Omit it and
52
+ * nothing changes
49
53
  * @param {Object} app `{ name, subtitle, logomark (svg url), about (string | paragraphs), links [{label,url}], docs [{ label, paragraphs }] }` —
50
54
  * `docs` is the rail's Docs tab, an app's explanatory prose as data (SettingsRailDocsTab, 2026-10-24)
51
55
  * @param {Array} items the tool's rail rows `{ icon, path, label }` — Home is the mark, Settings is pinned
@@ -162,6 +166,8 @@ export default function AppHub(props) {
162
166
 
163
167
  function HubFrame({
164
168
  app = {},
169
+ /* the app's default theme (AppHubDefaultTheme, kol-mirror 2026-10-24): what reset and the toggle's system fall back to */
170
+ defaultTheme,
165
171
  items = [],
166
172
  currentPath,
167
173
  onNavigate,
@@ -196,6 +202,14 @@ function HubFrame({
196
202
  const [settingsTab, setSettingsTab] = useState('settings')
197
203
  const modal = useModal()
198
204
  const theme = useTheme()
205
+ /* THE DEFAULT THEME IS A ROOT ATTRIBUTE kol-framework's theme reads (`data-theme-default`): reset (`theme.clear()`)
206
+ * and the toggle's alt-click hand the page to it, not to the OS — a dark-first app stays dark on a light-mode Mac */
207
+ const themeDefault = defaultTheme ?? app.defaultTheme
208
+ useEffect(() => {
209
+ if (!themeDefault) return undefined
210
+ document.documentElement.dataset.themeDefault = themeDefault
211
+ return () => { delete document.documentElement.dataset.themeDefault }
212
+ }, [themeDefault])
199
213
  if (themeToggle != null) warnJsx('themeToggle', 'The Hub draws the theme toggle itself; drop the prop.')
200
214
  /* THE RAIL'S TABS, the same four on every hub: Settings · Shortcuts · About · Docs, the three from what the app already
201
215
  * passes — Repo's links sit under About since SettingsRailDocsTab (kol-mirror 2026-10-24: *"settings are so overloaded with
@@ -83,6 +83,8 @@ import CatalogGrid from './CatalogGrid.jsx'
83
83
  * @param {ReactNode} lead a node between the masthead and the catalog (HubHome's quick links on a phone)
84
84
  * @param {ElementType} iconComponent icon renderer seam for ContentFilters
85
85
  * @param {boolean} showCountOnlyWhenFiltering (default true)
86
+ * @param {boolean} flipped · backHover the cards' back (AppCardWholeFlip, 2026-10-24): `flipped` turns every card that has a `back`
87
+ * (a page turns them on a key), `backHover` opts the hover reveal in; a card's own from `toCard` wins
86
88
  * @param {Object} filtersProps spread onto ContentFilters last — e.g. `{ mutuallyExclusiveFilters: ['category', 'u_label'] }`
87
89
  *
88
90
  * THE PAGE KEEPS ITS PLACE per history entry (CatalogPageKeepsPlaceOnBack, kol-mirror 2026-10-24): Back restores the
@@ -304,6 +306,8 @@ export default function CatalogPage({
304
306
  filtersProps,
305
307
  phoneLayout = 'list',
306
308
  lead,
309
+ flipped,
310
+ backHover,
307
311
  children,
308
312
  className = '',
309
313
  style,
@@ -389,7 +393,7 @@ export default function CatalogPage({
389
393
  const { key: _key, ...forwarded } = c
390
394
  return layout === 'list'
391
395
  ? <ContentRow key={key} {...forwarded} variant={c.variant ?? rowVariant} />
392
- : <ContentCard key={key} {...forwarded} variant={c.variant ?? cardVariant} fit={c.fit ?? 'cover'} />
396
+ : <ContentCard key={key} {...forwarded} variant={c.variant ?? cardVariant} fit={c.fit ?? 'cover'} flipped={c.flipped ?? flipped} backHover={c.backHover ?? backHover} />
393
397
  })}
394
398
  </CatalogGrid>
395
399
  )
package/src/HubHome.jsx CHANGED
@@ -57,6 +57,8 @@ import { useTouchPrimary } from './TouchDeviceOverlay.jsx'
57
57
  * file's cover; the consumer stores it as the file's `cover`. Absent → no Cover row. With `images`
58
58
  * on the file it is the Cover PICK instead — `src` is the picked image's, or `null` when that image is removed (FileRailImages)
59
59
  * @param {Function} onBack `(file, src)` — the rail's Back pick over the file's `images`; the consumer stores it as `back`
60
+ * @param {boolean} flipped · backHover the cards' back (AppCardWholeFlip, 2026-10-24): `flipped` turns every card that has a `back` — the
61
+ * page turns them on a key; `backHover` opts the hover reveal in (default off)
60
62
  * @param {Function} onImages `(file, next)` — the rail's Upload tile and × write the WHOLE list back (`[{ id, src, label? }]`, the
61
63
  * rail names a new image's id); the consumer stores it as the file's `images`. Absent → no tile, no ×.
62
64
  * An image removed while it was the cover or the back clears it: `onCover(file, null)` · `onBack(file, null)`
@@ -126,6 +128,8 @@ export default function HubHome({
126
128
  onCover,
127
129
  onBack,
128
130
  onImages,
131
+ flipped,
132
+ backHover,
129
133
  filterGroups,
130
134
  action,
131
135
  views = HUB_VIEWS,
@@ -223,6 +227,8 @@ export default function HubHome({
223
227
  header={{ title: title ?? app.name, subtitle: subtitle ?? app.subtitle, size: 'sm', voice: 'mono', actions: headerMenu, actionsPlacement: headerMenu ? 'head' : undefined }}
224
228
  items={items}
225
229
  toCard={toCard}
230
+ flipped={flipped}
231
+ backHover={backHover}
226
232
  filtersTitle="All Files"
227
233
  filterGroups={groups?.map(({ exclusive: _x, ...g }) => g)}
228
234
  filtersProps={exclusive?.length ? { mutuallyExclusiveFilters: exclusive } : undefined}