diff --git a/src/app/AppShell.tsx b/src/app/AppShell.tsx index bfb90fd4..8f0b6feb 100644 --- a/src/app/AppShell.tsx +++ b/src/app/AppShell.tsx @@ -28,7 +28,7 @@ import { mainRouteInpageScrollViewportId, } from '../constants/appScroll'; import ConnectionIndicator from '@/app/ConnectionIndicator'; -import MusicNetworkIndicator from '../components/MusicNetworkIndicator'; +import { MusicNetworkIndicator } from '@/music-network'; import { OfflineBanner } from '@/features/offline'; import AppUpdater from '@/features/updater/components/AppUpdater'; import TitleBar from '@/app/TitleBar'; diff --git a/src/features/contextMenu/components/QueueItemContextItems.tsx b/src/features/contextMenu/components/QueueItemContextItems.tsx index c1de9e4f..ff66aa7a 100644 --- a/src/features/contextMenu/components/QueueItemContextItems.tsx +++ b/src/features/contextMenu/components/QueueItemContextItems.tsx @@ -4,7 +4,7 @@ import { queueSongStar } from '@/features/playback/store/pendingStarSync'; import { getMusicNetworkRuntime, useEnrichmentPrimary } from '@/music-network'; import type { Track } from '@/lib/media/trackTypes'; import { useAuthStore } from '@/store/authStore'; -import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon'; +import { renderPresetIcon } from '@/music-network'; import StarRating from '@/ui/StarRating'; import { AddToPlaylistSubmenu } from '@/features/contextMenu/components/AddToPlaylistSubmenu'; import type { ContextMenuItemsProps } from '@/features/contextMenu/components/contextMenuItemTypes'; diff --git a/src/features/contextMenu/components/SongContextItems.tsx b/src/features/contextMenu/components/SongContextItems.tsx index 55aa46b5..89e8a6c1 100644 --- a/src/features/contextMenu/components/SongContextItems.tsx +++ b/src/features/contextMenu/components/SongContextItems.tsx @@ -11,7 +11,7 @@ import { usePlaylistStore } from '@/features/playlist'; import { songToTrack } from '@/lib/media/songToTrack'; import { showToast } from '@/utils/ui/toast'; import { suggestOrbitTrack, hostEnqueueToOrbit, evaluateOrbitSuggestGate, OrbitSuggestBlockedError } from '@/features/orbit'; -import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon'; +import { renderPresetIcon } from '@/music-network'; import StarRating from '@/ui/StarRating'; import { AddToPlaylistSubmenu } from '@/features/contextMenu/components/AddToPlaylistSubmenu'; import type { ContextMenuItemsProps } from '@/features/contextMenu/components/contextMenuItemTypes'; diff --git a/src/features/nowPlaying/components/Hero.tsx b/src/features/nowPlaying/components/Hero.tsx index 963c2b08..42914c10 100644 --- a/src/features/nowPlaying/components/Hero.tsx +++ b/src/features/nowPlaying/components/Hero.tsx @@ -9,7 +9,7 @@ import { OpenArtistRefInline } from '@/features/artist'; import { formatTrackTime } from '@/lib/format/formatDuration'; import { useEnrichmentPrimaryLabel } from '@/hooks/useEnrichmentPrimaryLabel'; import { useEnrichmentPrimaryIcon } from '@/hooks/useEnrichmentPrimaryIcon'; -import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon'; +import { renderPresetIcon } from '@/music-network'; interface HeroProps { track: { title: string; artist: string; album: string; year?: number; diff --git a/src/features/playback/components/playerBar/PlayerTrackInfo.tsx b/src/features/playback/components/playerBar/PlayerTrackInfo.tsx index ce762b2d..9b631219 100644 --- a/src/features/playback/components/playerBar/PlayerTrackInfo.tsx +++ b/src/features/playback/components/playerBar/PlayerTrackInfo.tsx @@ -17,7 +17,7 @@ import { PlaybackBufferingOverlay } from '@/features/playback/components/Playbac import { usePlayerStore } from '@/features/playback/store/playerStore'; import { useEnrichmentPrimaryLabel } from '@/hooks/useEnrichmentPrimaryLabel'; import { useEnrichmentPrimaryIcon } from '@/hooks/useEnrichmentPrimaryIcon'; -import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon'; +import { renderPresetIcon } from '@/music-network'; import { usePlayerBarLayoutStore, type PlayerBarLayoutItemId, diff --git a/src/features/settings/components/musicNetwork/ConnectProviderForm.tsx b/src/features/settings/components/musicNetwork/ConnectProviderForm.tsx index 7760eed4..bc5068bd 100644 --- a/src/features/settings/components/musicNetwork/ConnectProviderForm.tsx +++ b/src/features/settings/components/musicNetwork/ConnectProviderForm.tsx @@ -7,7 +7,7 @@ import { type BuiltinPreset, type PresetId, } from '@/music-network'; -import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon'; +import { renderPresetIcon } from '@/music-network'; /** * "Add a service" list, driven entirely by the preset registry. Token-poll diff --git a/src/features/settings/components/musicNetwork/ScrobbleDestinationCard.tsx b/src/features/settings/components/musicNetwork/ScrobbleDestinationCard.tsx index 1dff4e2c..dea25569 100644 --- a/src/features/settings/components/musicNetwork/ScrobbleDestinationCard.tsx +++ b/src/features/settings/components/musicNetwork/ScrobbleDestinationCard.tsx @@ -1,6 +1,6 @@ import { useTranslation } from 'react-i18next'; import { getPreset, type Account, type UserProfile } from '@/music-network'; -import { renderPresetIcon } from '@/components/settings/musicNetwork/presetIcon'; +import { renderPresetIcon } from '@/music-network'; /** * One connected account as a single self-contained block: header (icon, label, diff --git a/src/music-network/index.ts b/src/music-network/index.ts index 669d236b..12c8f4d7 100644 --- a/src/music-network/index.ts +++ b/src/music-network/index.ts @@ -12,6 +12,8 @@ export { export type { MusicNetworkStore, RuntimeHost } from './runtime/store'; export { listPresets, getPreset } from './registry/presetRegistry'; export { useEnrichmentPrimary, type EnrichmentPrimary } from './ui/useEnrichmentPrimary'; +export { renderPresetIcon } from './ui/presetIcon'; +export { default as MusicNetworkIndicator } from './ui/MusicNetworkIndicator'; export { migrateLegacyLastfm, sanitizeAccounts, diff --git a/src/components/MusicNetworkIndicator.tsx b/src/music-network/ui/MusicNetworkIndicator.tsx similarity index 92% rename from src/components/MusicNetworkIndicator.tsx rename to src/music-network/ui/MusicNetworkIndicator.tsx index 0ef95ecd..4a4fed55 100644 --- a/src/components/MusicNetworkIndicator.tsx +++ b/src/music-network/ui/MusicNetworkIndicator.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { useEnrichmentPrimary } from '../music-network'; -import { renderPresetIcon } from './settings/musicNetwork/presetIcon'; +import { useEnrichmentPrimary } from '@/music-network'; +import { renderPresetIcon } from '@/music-network/ui/presetIcon'; /** * Sidebar status indicator for the enrichment primary (the account that drives diff --git a/src/components/settings/musicNetwork/presetIcon.tsx b/src/music-network/ui/presetIcon.tsx similarity index 93% rename from src/components/settings/musicNetwork/presetIcon.tsx rename to src/music-network/ui/presetIcon.tsx index dbd69542..cad4ed6f 100644 --- a/src/components/settings/musicNetwork/presetIcon.tsx +++ b/src/music-network/ui/presetIcon.tsx @@ -1,6 +1,6 @@ import { Globe, Radio, Server, Music2, Headphones } from 'lucide-react'; import LastfmIcon from '@/ui/LastfmIcon'; -import type { PresetIcon } from '../../../music-network'; +import type { PresetIcon } from '@/music-network'; /** * Maps a preset manifest icon id to a rendered icon. Feature code references the