@kolkrabbi/kol-component 0.305.0 → 0.307.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.305.0",
3
+ "version": "0.307.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-search": "^0.3.0",
30
- "@kolkrabbi/kol-markdown": "^0.1.3"
29
+ "@kolkrabbi/kol-markdown": "^0.1.3",
30
+ "@kolkrabbi/kol-search": "^0.3.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@kolkrabbi/kol-icons": ">=0.22.0",
@@ -306,7 +306,17 @@ export function MediaLibraryProvider({
306
306
  * `buckets()` lists one at a time and the modal's header switches it — the browse page's
307
307
  * rule, "a client with none is one bucket and no dropdown". Switching lands at the root:
308
308
  * a prefix is one bucket's path. */
309
- const buckets = useMemo(() => client?.buckets?.() ?? [], [client])
309
+ /* a client with a session (kol-media-client 0.7.0) hides its signed-in-only buckets until it knows: ask once,
310
+ * then read the list again */
311
+ const [sessionRev, setSessionRev] = useState(0)
312
+ useEffect(() => {
313
+ if (!client?.session) return undefined
314
+ let live = true
315
+ client.session().then(() => { if (live) setSessionRev((n) => n + 1) }, () => {})
316
+ return () => { live = false }
317
+ }, [client])
318
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- sessionRev re-reads the client's list
319
+ const buckets = useMemo(() => client?.buckets?.() ?? [], [client, sessionRev])
310
320
  const [bucket, setBucketState] = useState(() => buckets[0]?.id ?? null)
311
321
  const setBucket = (id) => { setBucketState(id); setPrefix('') }
312
322
 
@@ -108,8 +108,10 @@ import useDragResize from '../hooks/useDragResize.js'
108
108
  * footer (the shell pins theme → Settings; a Settings row in
109
109
  * the tree landed above the theme instead — "same rail, two
110
110
  * bottoms")
111
- * `footer` the footer box's content: undefined = the Kolkrabbi link
112
- * (K / wordmark, as ever); `false` = no footer; a node =
111
+ * `footer` the footer box's content: undefined or `false` = no footer
112
+ * (OPT-IN since 0.307.0, user ruling 2026-10-28 — every site had
113
+ * to remember `footer: false`, record.kolkrabbi.io didn't);
114
+ * `'credit'` = the Kolkrabbi link (K / wordmark); a node =
113
115
  * that node (the shell's logomark → '/')
114
116
  * `themeToggle` `false` drops the theme slot (default `true`)
115
117
  * `iconComponent` the hop glyph's renderer, kol-shell's seam — `(props:
@@ -508,9 +510,9 @@ export default function NavRailSite({
508
510
  )}
509
511
  </div>
510
512
 
511
- {footer !== false && footer !== null && (
513
+ {footer != null && footer !== false && (
512
514
  <div className="kol-sidenav-footer flex items-center h-14 border-t border-fg-08 min-w-0">
513
- {footer !== undefined ? footer : (
515
+ {footer !== 'credit' ? footer : (
514
516
  <a
515
517
  href="https://kolkrabbi.io"
516
518
  target="_blank"