@kolkrabbi/kol-component 0.241.0 → 0.242.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.241.0",
3
+ "version": "0.242.0",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1077,6 +1077,10 @@ export function MediaLibraryBrowse({
1077
1077
  /* `bucketLevel` — keep title → bucket → folders with ONE bucket (kol-client-olina 2026-09-23).
1078
1078
  * Absent, a one-bucket consumer collapses the level as ruled 2026-09-03. */
1079
1079
  bucketLevel = false,
1080
+ /* `onPickFile(o | null)` — the selected file, reported as it changes (picker A, 2026-10-08: the
1081
+ * browse surface inside the modal card needs the selection for its Use button). Keys are
1082
+ * bucket-relative. Absent, nothing. */
1083
+ onPickFile,
1080
1084
  }) {
1081
1085
  const [ownPrefix, setOwnPrefix] = useState('')
1082
1086
  const prefix = prefixProp ?? ownPrefix
@@ -1090,6 +1094,7 @@ export function MediaLibraryBrowse({
1090
1094
  const [settingsOpen, setSettingsOpen] = useState(false)
1091
1095
  const [trashOpen, setTrashOpen] = useState(false)
1092
1096
  const [pickedFile, setPickedFile] = useState(null)
1097
+ useEffect(() => { onPickFile?.(pickedFile) }, [pickedFile]) // eslint-disable-line react-hooks/exhaustive-deps
1093
1098
  /* ROW VIEW PICKS, and only one at a time: a click selects and fills the preview, a DOUBLE click
1094
1099
  * opens (user 2026-09-22, Finder's behaviour — "clicking shouldnt automatically open it"). The
1095
1100
  * chevron still expands in place, which is the third thing and always was. */