diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx index 6d72a7ff..dc0c998f 100644 --- a/src/components/Hero.tsx +++ b/src/components/Hero.tsx @@ -10,7 +10,7 @@ import { useAlbumCoverRef } from '../cover/useLibraryCoverRef'; import { useArtistBanner, useArtistFanart } from '../cover/useArtistFanart'; import { useCoverArt } from '../cover/useCoverArt'; import { useHeroBackdrop } from '../cover/useHeroBackdrop'; -import { useCachedUrl } from './CachedImage'; +import { useCachedUrl } from '@/ui/CachedImage'; import { usePlayerStore } from '../store/playerStore'; import { useTranslation } from 'react-i18next'; import { useIsMobile } from '../hooks/useIsMobile'; diff --git a/src/components/LiveSearch.tsx b/src/components/LiveSearch.tsx index 45dffb0c..77a3953d 100644 --- a/src/components/LiveSearch.tsx +++ b/src/components/LiveSearch.tsx @@ -29,7 +29,7 @@ import { useAuthStore } from '../store/authStore'; import { useLibraryIndexStore } from '../store/libraryIndexStore'; import { useTranslation } from 'react-i18next'; import { albumArtistDisplayName } from '../utils/album/deriveAlbumHeaderArtistRefs'; -import { FETCH_QUEUE_BIAS_SEARCH_ARTIST_OVER_ALBUM } from './CachedImage'; +import { FETCH_QUEUE_BIAS_SEARCH_ARTIST_OVER_ALBUM } from '@/ui/CachedImage'; import type { SubsonicSong } from '../api/subsonicTypes'; import { AlbumCoverArtImage } from '../cover/AlbumCoverArtImage'; import { ArtistCoverArtImage } from '../cover/ArtistCoverArtImage'; diff --git a/src/components/MobilePlayerView.tsx b/src/components/MobilePlayerView.tsx index 1f209ed5..c99d5b2b 100644 --- a/src/components/MobilePlayerView.tsx +++ b/src/components/MobilePlayerView.tsx @@ -14,7 +14,7 @@ import { Moon, Sunrise, } from 'lucide-react'; import { usePlayerStore } from '../store/playerStore'; -import { useCachedUrl } from './CachedImage'; +import { useCachedUrl } from '@/ui/CachedImage'; import { OpenArtistRefInline } from './OpenArtistRefInline'; import { formatTrackTime } from '../utils/format/formatDuration'; import { resolveQueueTrack } from '../utils/library/queueTrackView'; diff --git a/src/components/MobileSearchOverlay.tsx b/src/components/MobileSearchOverlay.tsx index d9c7eeda..224eed00 100644 --- a/src/components/MobileSearchOverlay.tsx +++ b/src/components/MobileSearchOverlay.tsx @@ -10,7 +10,7 @@ import { X, Search, Disc3, Users, Music, Music2, Clock, ChevronRight } from 'luc import { usePlayerStore } from '../store/playerStore'; import { useAuthStore } from '../store/authStore'; import { useTranslation } from 'react-i18next'; -import { FETCH_QUEUE_BIAS_SEARCH_ARTIST_OVER_ALBUM } from './CachedImage'; +import { FETCH_QUEUE_BIAS_SEARCH_ARTIST_OVER_ALBUM } from '@/ui/CachedImage'; import { AlbumCoverArtImage } from '../cover/AlbumCoverArtImage'; import { ArtistCoverArtImage } from '../cover/ArtistCoverArtImage'; import { CoverArtImage } from '../cover/CoverArtImage'; diff --git a/src/components/NowPlayingInfo.tsx b/src/components/NowPlayingInfo.tsx index be9ea05d..25e1474f 100644 --- a/src/components/NowPlayingInfo.tsx +++ b/src/components/NowPlayingInfo.tsx @@ -9,7 +9,7 @@ import { usePlayerStore } from '../store/playerStore'; import { useAuthStore } from '../store/authStore'; import { usePlaybackServerId } from '../hooks/usePlaybackServerId'; import { fetchBandsintownEvents, type BandsintownEvent } from '../api/bandsintown'; -import CachedImage from './CachedImage'; +import CachedImage from '@/ui/CachedImage'; import OverlayScrollArea from '@/ui/OverlayScrollArea'; import { primaryTrackArtistRef } from '../utils/playback/trackArtistRefs'; diff --git a/src/components/artistDetail/ArtistDetailHero.tsx b/src/components/artistDetail/ArtistDetailHero.tsx index 9f4fa2dd..9a8634e6 100644 --- a/src/components/artistDetail/ArtistDetailHero.tsx +++ b/src/components/artistDetail/ArtistDetailHero.tsx @@ -15,7 +15,7 @@ import { ArtistHeroCover } from '../../cover/artistHero'; import { useArtistBanner, useArtistFanart } from '../../cover/useArtistFanart'; import { backdropFromConfig } from '../../cover/artistBackdrop'; import { usePlaybackCoverArt } from '../../cover/usePlaybackCoverArt'; -import { useCachedUrl } from '../CachedImage'; +import { useCachedUrl } from '@/ui/CachedImage'; import { useCoverLightboxSrc } from '../../cover/lightbox'; import type { CoverArtRef } from '../../cover/types'; import LastfmIcon from '../LastfmIcon'; diff --git a/src/components/fullscreenPlayer/FullscreenPlayerStatic.tsx b/src/components/fullscreenPlayer/FullscreenPlayerStatic.tsx index 152ab305..5af854e7 100644 --- a/src/components/fullscreenPlayer/FullscreenPlayerStatic.tsx +++ b/src/components/fullscreenPlayer/FullscreenPlayerStatic.tsx @@ -8,7 +8,7 @@ import { usePlayerStore } from '../../store/playerStore'; import { queueSongStar, queueSongRating } from '../../store/pendingStarSync'; import { useAlbumCoverRef, useArtistCoverRef } from '../../cover/useLibraryCoverRef'; import { usePlaybackCoverArt } from '../../hooks/usePlaybackCoverArt'; -import { useCachedUrl } from '../CachedImage'; +import { useCachedUrl } from '@/ui/CachedImage'; import { useArtistFanart } from '../../cover/useArtistFanart'; import { backdropFromConfig } from '../../cover/artistBackdrop'; import { useThemeStore } from '../../store/themeStore'; diff --git a/src/components/miniPlayer/MiniMeta.tsx b/src/components/miniPlayer/MiniMeta.tsx index 0435e33b..0376ca71 100644 --- a/src/components/miniPlayer/MiniMeta.tsx +++ b/src/components/miniPlayer/MiniMeta.tsx @@ -1,5 +1,5 @@ import { emit } from '@tauri-apps/api/event'; -import CachedImage from '../CachedImage'; +import CachedImage from '@/ui/CachedImage'; import { OpenArtistRefInline } from '../OpenArtistRefInline'; import type { MiniTrackInfo } from '../../utils/miniPlayerBridge'; diff --git a/src/components/nowPlaying/ArtistCard.tsx b/src/components/nowPlaying/ArtistCard.tsx index 059158cb..84823e9e 100644 --- a/src/components/nowPlaying/ArtistCard.tsx +++ b/src/components/nowPlaying/ArtistCard.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { ExternalLink } from 'lucide-react'; import type { SubsonicArtistInfo } from '../../api/subsonicTypes'; import { isRealArtistImage, sanitizeHtml } from '../../utils/componentHelpers/nowPlayingHelpers'; -import CachedImage from '../CachedImage'; +import CachedImage from '@/ui/CachedImage'; export interface ArtistCardTab { id?: string; diff --git a/src/components/search/ShareSearchResults.tsx b/src/components/search/ShareSearchResults.tsx index b98c9cc7..1f9b2e44 100644 --- a/src/components/search/ShareSearchResults.tsx +++ b/src/components/search/ShareSearchResults.tsx @@ -8,7 +8,7 @@ import { songToTrack } from '../../utils/playback/songToTrack'; import { activateShareSearchServer } from '../../utils/share/enqueueShareSearchPayload'; import { sharePayloadTotal, type ShareSearchMatch } from '../../utils/share/shareSearch'; import type { ShareSearchPreviewState } from '../../hooks/useShareSearchPreview'; -import { FETCH_QUEUE_BIAS_SEARCH_ARTIST_OVER_ALBUM } from '../CachedImage'; +import { FETCH_QUEUE_BIAS_SEARCH_ARTIST_OVER_ALBUM } from '@/ui/CachedImage'; import { AlbumCoverArtImage } from '../../cover/AlbumCoverArtImage'; import { ArtistCoverArtImage } from '../../cover/ArtistCoverArtImage'; import { COVER_DENSE_SEARCH_CSS_PX } from '../../cover/layoutSizes'; diff --git a/src/cover/CoverArtImage.tsx b/src/cover/CoverArtImage.tsx index 744a4dc0..27bd27cc 100644 --- a/src/cover/CoverArtImage.tsx +++ b/src/cover/CoverArtImage.tsx @@ -1,7 +1,7 @@ import type { ImgHTMLAttributes } from 'react'; import type React from 'react'; import { useEffect, useLayoutEffect, useRef, useState } from 'react'; -import { DEFAULT_CACHED_IMAGE_PREPARE_MARGIN } from '../components/CachedImage'; +import { DEFAULT_CACHED_IMAGE_PREPARE_MARGIN } from '@/ui/CachedImage'; import { resolveIntersectionScrollRoot } from '../utils/ui/resolveIntersectionScrollRoot'; import { coverEnsureQueued, coverEnsureReprioritize } from './ensureQueue'; import { coverPrefetchBumpPriority } from './prefetchRegistry'; diff --git a/src/components/CachedImage.tsx b/src/ui/CachedImage.tsx similarity index 98% rename from src/components/CachedImage.tsx rename to src/ui/CachedImage.tsx index b4eaf311..a1844cac 100644 --- a/src/components/CachedImage.tsx +++ b/src/ui/CachedImage.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react'; -import { acquireUrl, getCachedBlob, releaseUrl, subscribeCoverUpgraded } from '../utils/imageCache'; -import { resolveIntersectionScrollRoot } from '../utils/ui/resolveIntersectionScrollRoot'; +import { acquireUrl, getCachedBlob, releaseUrl, subscribeCoverUpgraded } from '@/utils/imageCache'; +import { resolveIntersectionScrollRoot } from '@/utils/ui/resolveIntersectionScrollRoot'; interface CachedImageProps extends React.ImgHTMLAttributes { src: string;