@kolkrabbi/kol-component 0.214.0 → 0.215.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.
|
|
3
|
+
"version": "0.215.0",
|
|
4
4
|
"description": "KOL design-system components \u2014 atoms through organisms, emitting canonical kol-* classes. Pairs with @kolkrabbi/kol-theme for styling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -99,7 +99,10 @@ const SORT_OPTIONS = [
|
|
|
99
99
|
]
|
|
100
100
|
|
|
101
101
|
/* bytes → weight: `utilities/formatSize` since 0.178.0 — one copy, exported */
|
|
102
|
-
|
|
102
|
+
/* the pages' shared date default. Named `default*` because BOTH pages now take
|
|
103
|
+
* a `formatDate` prop, and a prop of the same name would shadow this into a TDZ
|
|
104
|
+
* error at the destructure. */
|
|
105
|
+
const defaultFormatDate = (iso) => (iso ? new Date(iso).toISOString().slice(0, 10) : '')
|
|
103
106
|
const isImage = (ct) => !!ct && ct.startsWith('image/')
|
|
104
107
|
const isVideo = (ct) => !!ct && ct.startsWith('video/')
|
|
105
108
|
|
|
@@ -378,7 +381,9 @@ export function MediaLibraryBrowse({
|
|
|
378
381
|
* `ColumnBrowser`, IT IS ADDED HERE IN THE SAME EDIT, unless the page holds a
|
|
379
382
|
* real opinion about it (it owns `height`, the widths and `partition`, so
|
|
380
383
|
* those are deliberately absent from this list). */
|
|
381
|
-
thumbnailFor, folderMeta,
|
|
384
|
+
thumbnailFor, folderMeta, stackView,
|
|
385
|
+
/* defaulted, not bare — see the note on the sibling page */
|
|
386
|
+
formatDate = defaultFormatDate,
|
|
382
387
|
/* THE TAB PILL'S LIST (ColumnBrowserMobileViews item 16). What a tab MEANS is
|
|
383
388
|
* the consumer's — a repo whose surfaces are routes wires its router here.
|
|
384
389
|
* No tabs, no pill, and the page is exactly what it was. */
|
|
@@ -699,6 +704,21 @@ export function MediaLibraryLibrary({
|
|
|
699
704
|
/* the same pill the browse page takes — the wall is one of the surfaces it
|
|
700
705
|
switches between, so it has to carry it too (item 16) */
|
|
701
706
|
tabs, activeTab, onTabChange,
|
|
707
|
+
/* A SEAM ON ONE PAGE IS A SEAM ON BOTH, when the field is one both render
|
|
708
|
+
* (FormatDateSkipsTheLibraryPage, kol-r2b2 2026-09-04). This reached
|
|
709
|
+
* `MediaLibraryBrowse` and not here, so a consumer passing ONE props object
|
|
710
|
+
* to both got `19.6.2026` on the Browse tab and `2026-06-19` on the Files tab
|
|
711
|
+
* — two formats for one field, one tap apart. The desktop stack had the same
|
|
712
|
+
* mismatch; the tab pill just moved the two halves close enough to see it.
|
|
713
|
+
*
|
|
714
|
+
* THE RULE, WIDENED — the fourth defect of this exact shape (`settingsFooter`
|
|
715
|
+
* documented and hardcoded past · `thumbnailFor` and `folderMeta` not
|
|
716
|
+
* forwarded · now this). These two pages are ONE SURFACE SPLIT IN TWO and a
|
|
717
|
+
* consumer hands the same props object to both, so: a prop naming how a
|
|
718
|
+
* SHARED FIELD renders is added to BOTH pages in the same edit. Props about a
|
|
719
|
+
* concept only one page has stay put — `thumbnailFor`, `folderMeta` and
|
|
720
|
+
* `stackView` are folder and stack concepts and are correctly absent here. */
|
|
721
|
+
formatDate = defaultFormatDate,
|
|
702
722
|
}) {
|
|
703
723
|
const [ownBucket, setOwnBucket] = useState(bucket)
|
|
704
724
|
const bucketId = bucket ?? ownBucket
|