refactor(lib): relocate cardGridLayout → lib/util (store-free)

cardGridLayout's only store dep was three grid-column constants it imported from
authStoreDefaults. Flipped ownership: the constants now live in lib/util/cardGridLayout
(pure layout config) and authStoreDefaults re-exports them (store→lib), so the auth
settings clamp/default and every existing consumer are unchanged. cardGridLayout is now
store-free and homes in lib/util alongside the other pure helpers — consumed cleanly by
ui/VirtualCardGrid + cover/layoutSizes. Resolves the documented store-free-lib block for
the card-grid layout helper. Pure move + constant relocation; tests pass unmodified.
This commit is contained in:
Psychotoxical
2026-06-30 21:28:03 +02:00
parent c37d5f7389
commit 10d948db61
7 changed files with 23 additions and 16 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import { albumGridWarmCovers, coverDisplayCssPxForAlbumGrid } from '@/cover/layo
import { useLibraryCoverPrefetch } from '@/cover/useLibraryCoverPrefetch';
import { useAuthStore } from '@/store/authStore';
import { clampLibraryGridMaxColumns } from '@/store/authStoreHelpers';
import { computeCardGridColumnCount } from '@/utils/cardGridLayout';
import { computeCardGridColumnCount } from '@/lib/util/cardGridLayout';
import GenreFilterBar from '@/ui/GenreFilterBar';
import YearFilterButton from '@/ui/YearFilterButton';
import StarFilterButton from '@/ui/StarFilterButton';