diff --git a/apps/mobile/app.json b/apps/mobile/app.json
index 5ef104a..810f791 100644
--- a/apps/mobile/app.json
+++ b/apps/mobile/app.json
@@ -10,7 +10,9 @@
"supportsTablet": true,
"bundleIdentifier": "com.abunchofknowitalls.otunes",
"infoPlist": {
- "UIBackgroundModes": ["audio"]
+ "UIBackgroundModes": [
+ "audio"
+ ]
}
},
"android": {
@@ -26,7 +28,8 @@
"microphonePermission": false,
"enableBackgroundPlayback": true
}
- ]
+ ],
+ "expo-sharing"
],
"experiments": {
"typedRoutes": true
diff --git a/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx
index bec7d39..70e6724 100644
--- a/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/album/[id].tsx
@@ -1,18 +1,20 @@
import { useQuery } from "convex/react"
import { Stack, useLocalSearchParams } from "expo-router"
-import { useState } from "react"
import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native"
import { Ionicons } from "@expo/vector-icons"
import { CoverImage } from "@/components/cover-image"
-import { MediaActionsSheet, type MediaAction } from "@/components/media-actions-sheet"
+import {
+ MediaActionMenu,
+ MediaContextMenu,
+} from "@/components/media-actions-sheet"
import { Button, LoadingView } from "@/components/ui/primitives"
import { contentBottomInset } from "@/components/player"
-import { useAddToPlaylist } from "@/contexts/add-to-playlist"
import { useFavorites } from "@/contexts/favorites"
import { usePlayback } from "@/contexts/playback"
import { useServerConfig } from "@/contexts/server-config"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { api } from "@otunes/convex/_generated/api"
import type { Id } from "@otunes/convex/_generated/dataModel"
import type { BrowseAlbumTrack } from "@otunes/convex/types"
@@ -31,9 +33,9 @@ export default function AlbumScreen() {
typeof id === "string" ? { id: id as Id<"albums"> } : "skip"
)
const { playAlbum, playAlbumShuffled, playFromSong } = usePlayback()
- const { isAlbumFavorite, toggleAlbumFavorite } = useFavorites()
- const { openAddAlbumToPlaylist } = useAddToPlaylist()
- const [actionsOpen, setActionsOpen] = useState(false)
+ const { isAlbumFavorite, toggleAlbumFavorite, isSongFavorite } = useFavorites()
+ const { handleAlbumDetailAction, handleAlbumTrackAction, isAlbumFavorite: isAlbumFav } =
+ useMediaMenuActions()
if (album === undefined || !config) {
return
@@ -47,23 +49,9 @@ export default function AlbumScreen() {
)
}
- const songIds = album.tracks.map((track: BrowseAlbumTrack) => track.id)
+ const songIds = album.tracks.map((track: BrowseAlbumTrack) => track.id as Id<"songs">)
const metadata = formatMetadata(album.genre, album.year)
- function handleAlbumAction(action: MediaAction) {
- if (!album) return
- switch (action) {
- case "playlist":
- void openAddAlbumToPlaylist(album.id)
- break
- case "favorite":
- void toggleAlbumFavorite(album.id)
- break
- default:
- break
- }
- }
-
return (
<>
(
- setActionsOpen(true)} hitSlop={8}>
-
-
+
+ void handleAlbumDetailAction(album.id as Id<"albums">, songIds, action)
+ }
+ >
+
+
+
+
),
}}
/>
@@ -109,39 +106,44 @@ export default function AlbumScreen() {
{album.tracks.map((track: BrowseAlbumTrack, index: number) => (
- void playFromSong(track.id, songIds)}
+ favorited={isSongFavorite(track.id)}
+ navigation={{
+ artist: { id: album.artist.id },
+ album: { id: album.id },
+ }}
+ share={{
+ type: "song",
+ albumId: album.id,
+ songId: track.id,
+ }}
+ onAction={(action) => void handleAlbumTrackAction(track, album, action)}
>
-
- {track.track || index + 1}
-
-
-
- {track.title}
+ void playFromSong(track.id, songIds)}
+ >
+
+ {track.track || index + 1}
- {track.artists ? (
-
- {track.artists.join(", ")}
+
+
+ {track.title}
- ) : null}
-
-
- {formatDuration(track.durationSeconds)}
-
-
+ {track.artists ? (
+
+ {track.artists.join(", ")}
+
+ ) : null}
+
+
+ {formatDuration(track.durationSeconds)}
+
+
+
))}
-
- setActionsOpen(false)}
- onAction={handleAlbumAction}
- />
>
)
}
diff --git a/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx
index 263a923..d927a10 100644
--- a/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/artist/[id].tsx
@@ -1,19 +1,18 @@
import { useQuery } from "convex/react"
import { Stack, useLocalSearchParams } from "expo-router"
-import { useState } from "react"
import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native"
import { Ionicons } from "@expo/vector-icons"
import { CoverImage } from "@/components/cover-image"
import { MediaGrid } from "@/components/media-cards"
-import { MediaActionsSheet, type MediaAction } from "@/components/media-actions-sheet"
+import { MediaActionMenu } from "@/components/media-actions-sheet"
import { Button, LoadingView } from "@/components/ui/primitives"
import { contentBottomInset } from "@/components/player"
-import { useAddToPlaylist } from "@/contexts/add-to-playlist"
import { useFavorites } from "@/contexts/favorites"
import { usePlayback } from "@/contexts/playback"
import { useServerConfig } from "@/contexts/server-config"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { api } from "@otunes/convex/_generated/api"
import type { Id } from "@otunes/convex/_generated/dataModel"
import { artistCoverUrl } from "@/lib/urls"
@@ -26,8 +25,7 @@ export default function ArtistScreen() {
const data = useQuery(api.library.browseArtistDetail, { id: id as Id<"artists"> })
const { playArtist, playArtistShuffled } = usePlayback()
const { isArtistFavorite, toggleArtistFavorite } = useFavorites()
- const { openAddArtistToPlaylist } = useAddToPlaylist()
- const [actionsOpen, setActionsOpen] = useState(false)
+ const { handleArtistAction, isArtistFavorite: isArtistFav } = useMediaMenuActions()
if (data === undefined || !config) {
return
@@ -41,20 +39,6 @@ export default function ArtistScreen() {
)
}
- function handleAction(action: MediaAction) {
- if (!data) return
- switch (action) {
- case "playlist":
- void openAddArtistToPlaylist(data.artist.id)
- break
- case "favorite":
- void toggleArtistFavorite(data.artist.id)
- break
- default:
- break
- }
- }
-
return (
<>
(
- setActionsOpen(true)} hitSlop={8}>
-
-
+ void handleArtistAction(data.artist, action)}
+ >
+
+
+
+
),
}}
/>
@@ -97,14 +88,6 @@ export default function ArtistScreen() {
-
- setActionsOpen(false)}
- onAction={handleAction}
- />
>
)
}
diff --git a/apps/mobile/app/(app)/(tabs)/home/browse/artists.tsx b/apps/mobile/app/(app)/(tabs)/home/browse/artists.tsx
index 627a8d5..83a7411 100644
--- a/apps/mobile/app/(app)/(tabs)/home/browse/artists.tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/browse/artists.tsx
@@ -1,12 +1,13 @@
import { useQuery } from "convex/react"
import { Pressable, ScrollView, StyleSheet, Text } from "react-native"
+import { MediaContextMenu } from "@/components/media-context-menu"
import { CoverImage } from "@/components/cover-image"
-
import { LoadingView } from "@/components/ui/primitives"
import { contentBottomInset } from "@/components/player"
import { useServerConfig } from "@/contexts/server-config"
import { useAppNavigation } from "@/lib/app-navigation"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { api } from "@otunes/convex/_generated/api"
import type { BrowseArtist } from "@otunes/convex/types"
import { artistCoverUrl } from "@/lib/urls"
@@ -17,6 +18,7 @@ export default function ArtistsScreen() {
const colors = useThemeColors()
const { config } = useServerConfig()
const artists = useQuery(api.library.browseArtists)
+ const { handleArtistAction, isArtistFavorite } = useMediaMenuActions()
if (artists === undefined || !config) {
return
@@ -29,18 +31,24 @@ export default function ArtistsScreen() {
contentInsetAdjustmentBehavior="automatic"
>
{artists.map((artist: BrowseArtist) => (
- push(`/artist/${artist.id}`)}
+ favorited={isArtistFavorite(artist.id)}
+ share={{ type: "artist", artistId: artist.id }}
+ onAction={(action) => void handleArtistAction(artist, action)}
>
-
- {artist.name}
-
+ push(`/artist/${artist.id}`)}
+ >
+
+ {artist.name}
+
+
))}
)
diff --git a/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx b/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx
index f472ac0..7deb33b 100644
--- a/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/browse/songs.tsx
@@ -1,33 +1,24 @@
import { usePaginatedQuery } from "convex/react"
import { useState } from "react"
-import { FlatList, Pressable, StyleSheet, Text, View } from "react-native"
+import { FlatList, StyleSheet } from "react-native"
-import {
- MediaActionsSheet,
- type MediaAction,
-} from "@/components/media-actions-sheet"
import { contentBottomInset, SongRow } from "@/components/player"
import { LoadingView } from "@/components/ui/primitives"
-import { useAddToPlaylist } from "@/contexts/add-to-playlist"
import { useFavorites } from "@/contexts/favorites"
import { usePlayback } from "@/contexts/playback"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { api } from "@otunes/convex/_generated/api"
import type { Id } from "@otunes/convex/_generated/dataModel"
-import type { BrowseSong } from "@otunes/convex/types"
-import { showSuccess } from "@/lib/toast"
-import { spacing, useThemeColors } from "@/lib/theme"
+import { spacing } from "@/lib/theme"
const PAGE_SIZE = 50
export default function SongsScreen() {
- const colors = useThemeColors()
- const { playFromLibrarySong, addToQueueNext, addToQueueLast, playShuffled } =
- usePlayback()
- const { openAddToPlaylist } = useAddToPlaylist()
- const { isSongFavorite, toggleSongFavorite } = useFavorites()
+ const { playFromLibrarySong } = usePlayback()
+ const { isSongFavorite } = useFavorites()
+ const { handleSongAction } = useMediaMenuActions()
const [sortKey, setSortKey] = useState<"title" | "artist" | "album">("title")
const [sortDirection, setSortDirection] = useState<"asc" | "desc">("asc")
- const [actionSong, setActionSong] = useState(null)
const { results, status, loadMore } = usePaginatedQuery(
api.library.browseSongsPaginated,
@@ -35,80 +26,45 @@ export default function SongsScreen() {
{ initialNumItems: PAGE_SIZE }
)
- function cycleSort(key: "title" | "artist" | "album") {
- if (sortKey === key) {
- setSortDirection((d) => (d === "asc" ? "desc" : "asc"))
- } else {
- setSortKey(key)
- setSortDirection("asc")
- }
- }
-
- function handleAction(action: MediaAction) {
- if (!actionSong) return
- const songIds = [actionSong.id]
- switch (action) {
- case "playlist":
- openAddToPlaylist(songIds)
- break
- case "play-next":
- void addToQueueNext(songIds).then(() =>
- showSuccess("Queued to play next")
- )
- break
- case "play-last":
- void addToQueueLast(songIds).then(() =>
- showSuccess("Queued to play last")
- )
- break
- case "shuffle":
- void playShuffled(songIds)
- break
- case "favorite":
- void toggleSongFavorite(actionSong.id)
- break
- default:
- break
- }
- }
-
if (results === undefined) {
return
}
return (
- <>
- item.id}
- contentContainerStyle={{ paddingBottom: contentBottomInset }}
- contentInsetAdjustmentBehavior="automatic"
- onEndReached={() => {
- if (status === "CanLoadMore") loadMore(PAGE_SIZE)
- }}
- onEndReachedThreshold={0.5}
- renderItem={({ item }) => (
-
- void playFromLibrarySong(item.id as Id<"songs">, {
- sortKey,
- sortDirection,
- })
- }
- onLongPress={() => setActionSong(item)}
- />
- )}
- />
-
- setActionSong(null)}
- onAction={handleAction}
- />
- >
+ item.id}
+ contentContainerStyle={{ paddingBottom: contentBottomInset }}
+ contentInsetAdjustmentBehavior="automatic"
+ onEndReached={() => {
+ if (status === "CanLoadMore") loadMore(PAGE_SIZE)
+ }}
+ onEndReachedThreshold={0.5}
+ renderItem={({ item }) => (
+
+ void playFromLibrarySong(item.id as Id<"songs">, {
+ sortKey,
+ sortDirection,
+ })
+ }
+ contextMenu={{
+ favorited: isSongFavorite(item.id),
+ navigation: {
+ artist: { id: item.artist.id },
+ album: { id: item.album.id },
+ },
+ share: {
+ type: "song",
+ albumId: item.album.id,
+ songId: item.id,
+ },
+ onAction: (action) => void handleSongAction(item, action),
+ }}
+ />
+ )}
+ />
)
}
diff --git a/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx b/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx
index 4439153..c53c1e1 100644
--- a/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/playlist/[id].tsx
@@ -1,18 +1,17 @@
import { useMutation, useQuery } from "convex/react"
import { Stack, useLocalSearchParams, useRouter } from "expo-router"
-import { useState } from "react"
import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native"
import { Ionicons } from "@expo/vector-icons"
import { CoverImage } from "@/components/cover-image"
-import { MediaActionsSheet, type MediaAction } from "@/components/media-actions-sheet"
+import { MediaActionMenu } from "@/components/media-actions-sheet"
import { Button, LoadingView } from "@/components/ui/primitives"
import { contentBottomInset, SongRow } from "@/components/player"
-import { useAddToPlaylist } from "@/contexts/add-to-playlist"
import { useFavorites } from "@/contexts/favorites"
import { usePlayback } from "@/contexts/playback"
import { useServerConfig } from "@/contexts/server-config"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { api } from "@otunes/convex/_generated/api"
import type { Id } from "@otunes/convex/_generated/dataModel"
import type { BrowseSong } from "@otunes/convex/types"
@@ -29,14 +28,12 @@ export default function PlaylistScreen() {
id: id as Id<"playlists">,
})
const { playPlaylist, playPlaylistShuffled, playFromSong } = usePlayback()
- const { openAddToPlaylist, openAddPlaylistToPlaylist } = useAddToPlaylist()
- const { isSongFavorite, toggleSongFavorite } = useFavorites()
+ const { isSongFavorite } = useFavorites()
+ const { handleSongAction, handlePlaylistDetailAction } = useMediaMenuActions()
const subscribe = useMutation(api.playlists.subscribeToPlaylist)
const unsubscribe = useMutation(api.playlists.unsubscribeFromPlaylist)
const deletePlaylist = useMutation(api.playlists.deletePlaylist)
const removeSongs = useMutation(api.playlists.removeSongsFromPlaylist)
- const [actionSong, setActionSong] = useState(null)
- const [menuOpen, setMenuOpen] = useState(false)
if (playlist === undefined || !config) {
return
@@ -78,21 +75,6 @@ export default function PlaylistScreen() {
}
}
- function handleSongAction(action: MediaAction) {
- if (!actionSong) return
- const ids = [actionSong.id]
- switch (action) {
- case "playlist":
- openAddToPlaylist(ids)
- break
- case "favorite":
- void toggleSongFavorite(actionSong.id)
- break
- default:
- break
- }
- }
-
return (
<>
(
- setMenuOpen(true)} hitSlop={8}>
-
-
+
+ void handlePlaylistDetailAction(songIds, action)
+ }
+ >
+
+
+
+
),
}}
/>
@@ -144,7 +138,20 @@ export default function PlaylistScreen() {
key={song.id}
song={song}
onPress={() => void playFromSong(song.id, songIds)}
- onLongPress={() => setActionSong(song)}
+ contextMenu={{
+ favorited: isSongFavorite(song.id),
+ playlistLabel: "Add to Another Playlist",
+ navigation: {
+ artist: { id: song.artist.id },
+ album: { id: song.album.id },
+ },
+ share: {
+ type: "song",
+ albumId: song.album.id,
+ songId: song.id,
+ },
+ onAction: (action) => void handleSongAction(song, action),
+ }}
trailing={
playlist.isOwner && playlist.id ? (
))}
-
- setActionSong(null)}
- onAction={handleSongAction}
- />
-
- setMenuOpen(false)}
- onAction={(action) => {
- if (action === "playlist" && playlist.id) {
- void openAddPlaylistToPlaylist(playlist.id)
- }
- }}
- />
>
)
}
diff --git a/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx b/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx
index 5b162e2..f0f8541 100644
--- a/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx
+++ b/apps/mobile/app/(app)/(tabs)/home/playlist/favorites.tsx
@@ -1,22 +1,14 @@
import { useQuery } from "convex/react"
-import { useState } from "react"
-import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native"
+import { ScrollView, StyleSheet, Text, View } from "react-native"
-import { CoverImage } from "@/components/cover-image"
-
-import {
- MediaActionsSheet,
- type MediaAction,
-} from "@/components/media-actions-sheet"
import { Button, LoadingView } from "@/components/ui/primitives"
import { contentBottomInset, SongRow } from "@/components/player"
-import { useAddToPlaylist } from "@/contexts/add-to-playlist"
import { useFavorites } from "@/contexts/favorites"
import { usePlayback } from "@/contexts/playback"
import { useServerConfig } from "@/contexts/server-config"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { api } from "@otunes/convex/_generated/api"
import type { BrowseSong } from "@otunes/convex/types"
-import { playlistCoverUrl } from "@/lib/urls"
import { radius, spacing, useThemeColors } from "@/lib/theme"
import { Ionicons } from "@expo/vector-icons"
import { Stack } from "expo-router"
@@ -26,9 +18,8 @@ export default function FavoritesScreen() {
const { config } = useServerConfig()
const favorites = useQuery(api.favorites.browseFavoritesPlaylistDetail)
const { playInOrder, playShuffled, playFromSong } = usePlayback()
- const { openAddToPlaylist } = useAddToPlaylist()
- const { isSongFavorite, toggleSongFavorite } = useFavorites()
- const [actionSong, setActionSong] = useState(null)
+ const { isSongFavorite } = useFavorites()
+ const { handleSongAction } = useMediaMenuActions()
if (favorites === undefined || !config) {
return
@@ -46,20 +37,6 @@ export default function FavoritesScreen() {
const songIds = favorites.songs.map((song: BrowseSong) => song.id)
- function handleSongAction(action: MediaAction) {
- if (!actionSong) return
- switch (action) {
- case "playlist":
- openAddToPlaylist([actionSong.id])
- break
- case "favorite":
- void toggleSongFavorite(actionSong.id)
- break
- default:
- break
- }
- }
-
return (
<>
void playFromSong(song.id, songIds)}
- onLongPress={() => setActionSong(song)}
+ contextMenu={{
+ favorited: isSongFavorite(song.id),
+ playlistLabel: "Add to Another Playlist",
+ navigation: {
+ artist: { id: song.artist.id },
+ album: { id: song.album.id },
+ },
+ share: {
+ type: "song",
+ albumId: song.album.id,
+ songId: song.id,
+ },
+ onAction: (action) => void handleSongAction(song, action),
+ }}
/>
))}
-
- setActionSong(null)}
- onAction={handleSongAction}
- />
>
)
}
diff --git a/apps/mobile/app/(app)/player.tsx b/apps/mobile/app/(app)/player.tsx
index bde97fd..f5d2852 100644
--- a/apps/mobile/app/(app)/player.tsx
+++ b/apps/mobile/app/(app)/player.tsx
@@ -3,7 +3,6 @@ import Slider from "@react-native-community/slider"
import { BlurView } from "expo-blur"
import { useRouter } from "expo-router"
import * as Haptics from "expo-haptics"
-import { useState } from "react"
import {
Platform,
Pressable,
@@ -14,7 +13,8 @@ import {
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context"
import { StatusBar } from "expo-status-bar"
-import { MediaActionsSheet, type MediaAction } from "@/components/media-actions-sheet"
+import { MediaActionMenu, type MediaAction } from "@/components/media-actions-sheet"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { CoverImage } from "@/components/cover-image"
import { useFavorites } from "@/contexts/favorites"
import { usePlayback } from "@/contexts/playback"
@@ -31,7 +31,7 @@ export default function PlayerScreen() {
const player = usePlayerTheme()
const { config } = useServerConfig()
const { isSongFavorite, toggleSongFavorite } = useFavorites()
- const [actionsOpen, setActionsOpen] = useState(false)
+ const { handleSongAction } = useMediaMenuActions()
const {
currentSong,
isPlaying,
@@ -48,9 +48,6 @@ export default function PlayerScreen() {
cycleRepeat,
skipNext,
skipPrevious,
- addToQueueNext,
- addToQueueLast,
- playShuffled,
} = usePlayback()
if (!currentSong || !config) {
@@ -64,29 +61,8 @@ export default function PlayerScreen() {
const { colors } = player
async function handleAction(action: MediaAction) {
- setActionsOpen(false)
- switch (action) {
- case "favorite":
- await toggleSongFavorite(currentSong!.id)
- break
- case "play-next":
- await addToQueueNext([currentSong!.id])
- break
- case "play-last":
- await addToQueueLast([currentSong!.id])
- break
- case "shuffle":
- await playShuffled([currentSong!.id])
- break
- case "go-artist":
- push(`/artist/${currentSong!.artist.id}`)
- break
- case "go-album":
- push(`/album/${currentSong!.album.id}`)
- break
- default:
- break
- }
+ if (!currentSong) return
+ await handleSongAction(currentSong, action)
}
function togglePlayback() {
@@ -153,13 +129,29 @@ export default function PlayerScreen() {
color={favorited ? appleMusic.pink : colors.foreground}
/>
- setActionsOpen(true)}
- hitSlop={10}
- style={[styles.circleButton, { backgroundColor: player.buttonSurface }]}
+
-
-
+
+
+
+
@@ -241,15 +233,6 @@ export default function PlayerScreen() {
-
- setActionsOpen(false)}
- onAction={handleAction}
- />
)
}
diff --git a/apps/mobile/components/media-actions-sheet.tsx b/apps/mobile/components/media-actions-sheet.tsx
index 5e8ae02..23e7b6e 100644
--- a/apps/mobile/components/media-actions-sheet.tsx
+++ b/apps/mobile/components/media-actions-sheet.tsx
@@ -1,111 +1,7 @@
-import { Ionicons } from "@expo/vector-icons"
-import { Modal, Pressable, StyleSheet, Text, View } from "react-native"
-
-import { useThemeColors, spacing, radius } from "@/lib/theme"
-
-export type MediaAction =
- | "playlist"
- | "play-next"
- | "play-last"
- | "shuffle"
- | "favorite"
- | "go-artist"
- | "go-album"
-
-export function MediaActionsSheet({
- visible,
- title,
- selectedCount = 1,
- favorited,
- showFavorite = true,
- showNavigation = false,
- onClose,
- onAction,
-}: {
- visible: boolean
- title: string
- selectedCount?: number
- favorited?: boolean
- showFavorite?: boolean
- showNavigation?: boolean
- onClose: () => void
- onAction: (action: MediaAction) => void
-}) {
- const colors = useThemeColors()
-
- const items: { action: MediaAction; label: string; icon: keyof typeof Ionicons.glyphMap }[] = [
- { action: "playlist", label: `Add to Playlist${selectedCount > 1 ? ` (${selectedCount})` : ""}`, icon: "list" },
- { action: "play-next", label: `Play Next${selectedCount > 1 ? ` (${selectedCount})` : ""}`, icon: "arrow-down-circle-outline" },
- { action: "play-last", label: `Play Last${selectedCount > 1 ? ` (${selectedCount})` : ""}`, icon: "arrow-up-circle-outline" },
- { action: "shuffle", label: `Shuffle${selectedCount > 1 ? ` (${selectedCount})` : ""}`, icon: "shuffle" },
- ]
-
- if (showFavorite) {
- items.push({
- action: "favorite",
- label: favorited ? "Remove from Favorites" : "Add to Favorites",
- icon: favorited ? "star" : "star-outline",
- })
- }
-
- if (showNavigation) {
- items.push(
- { action: "go-artist", label: "Go to Artist", icon: "person" },
- { action: "go-album", label: "Go to Album", icon: "disc" }
- )
- }
-
- return (
-
-
- event.stopPropagation()}
- >
-
- {title}
-
- {items.map((item) => (
- {
- onAction(item.action)
- onClose()
- }}
- >
-
- {item.label}
-
- ))}
-
-
-
- )
-}
-
-const styles = StyleSheet.create({
- overlay: {
- flex: 1,
- backgroundColor: "rgba(0,0,0,0.45)",
- justifyContent: "flex-end",
- },
- sheet: {
- borderTopLeftRadius: radius.lg,
- borderTopRightRadius: radius.lg,
- borderWidth: 1,
- padding: spacing.lg,
- gap: spacing.xs,
- },
- title: {
- fontSize: 16,
- fontWeight: "700",
- marginBottom: spacing.sm,
- },
- row: {
- flexDirection: "row",
- alignItems: "center",
- gap: spacing.md,
- paddingVertical: spacing.md,
- },
-})
+export type { MediaAction, MediaMenuConfig, MediaNavigation } from "@/components/media-context-menu"
+export type { MediaShareContext } from "@/lib/media-links"
+export {
+ buildMediaMenuActions,
+ MediaActionMenu,
+ MediaContextMenu,
+} from "@/components/media-context-menu"
diff --git a/apps/mobile/components/media-cards.tsx b/apps/mobile/components/media-cards.tsx
index bb7958a..05d697c 100644
--- a/apps/mobile/components/media-cards.tsx
+++ b/apps/mobile/components/media-cards.tsx
@@ -2,6 +2,8 @@ import { Ionicons } from "@expo/vector-icons"
import { Pressable, ScrollView, StyleSheet, Text, View } from "react-native"
import { CoverImage } from "@/components/cover-image"
+import { MediaContextMenu } from "@/components/media-context-menu"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { useServerConfig } from "@/contexts/server-config"
import { useAppNavigation } from "@/lib/app-navigation"
import type { BrowseAlbum, BrowseArtist, PlaylistSummary } from "@otunes/convex/types"
@@ -20,9 +22,10 @@ export function AlbumCard({
const { push } = useAppNavigation()
const { config } = useServerConfig()
const colors = useThemeColors()
+ const { handleAlbumAction, isAlbumFavorite } = useMediaMenuActions()
if (!config) return null
- return (
+ const card = (
push(`/album/${album.id}`)}
@@ -40,6 +43,17 @@ export function AlbumCard({
)
+
+ return (
+ void handleAlbumAction(album, action)}
+ >
+ {card}
+
+ )
}
export function ArtistCard({
@@ -52,9 +66,10 @@ export function ArtistCard({
const { push } = useAppNavigation()
const { config } = useServerConfig()
const colors = useThemeColors()
+ const { handleArtistAction, isArtistFavorite } = useMediaMenuActions()
if (!config) return null
- return (
+ const card = (
push(`/artist/${artist.id}`)}
@@ -69,6 +84,16 @@ export function ArtistCard({
)
+
+ return (
+ void handleArtistAction(artist, action)}
+ >
+ {card}
+
+ )
}
export function PlaylistCard({
@@ -81,9 +106,10 @@ export function PlaylistCard({
const { push } = useAppNavigation()
const { config } = useServerConfig()
const colors = useThemeColors()
+ const { handlePlaylistAction } = useMediaMenuActions()
if (!config) return null
- return (
+ const card = (
push(`/playlist/${playlist.id}`)}
@@ -101,6 +127,16 @@ export function PlaylistCard({
)
+
+ return (
+ void handlePlaylistAction(playlist, action)}
+ >
+ {card}
+
+ )
}
function renderMediaItem(item: MediaItem, width: number) {
diff --git a/apps/mobile/components/media-context-menu.tsx b/apps/mobile/components/media-context-menu.tsx
new file mode 100644
index 0000000..08a9386
--- /dev/null
+++ b/apps/mobile/components/media-context-menu.tsx
@@ -0,0 +1,191 @@
+import { MenuView, type MenuAction } from "@expo/ui/community/menu"
+import type { ReactNode } from "react"
+import type { StyleProp, ViewStyle } from "react-native"
+
+import { useServerConfig } from "@/contexts/server-config"
+import type { MediaShareContext } from "@/lib/media-links"
+import { shouldShowShare } from "@/lib/media-links"
+import { shareMediaLink } from "@/lib/share-media-link"
+
+export type MediaAction =
+ | "share"
+ | "playlist"
+ | "play-next"
+ | "play-last"
+ | "shuffle"
+ | "favorite"
+ | "go-artist"
+ | "go-album"
+
+export type MediaNavigation = {
+ artist?: { id: string }
+ album?: { id: string }
+}
+
+export type MediaMenuConfig = {
+ selectedCount?: number
+ playlistLabel?: string
+ favorited?: boolean
+ showFavorite?: boolean
+ navigation?: MediaNavigation
+ share?: MediaShareContext
+ includeActions?: MediaAction[]
+ onAction: (action: MediaAction) => void
+}
+
+type MediaMenuWrapperProps = MediaMenuConfig & {
+ children: ReactNode
+ style?: StyleProp
+}
+
+const QUEUE_ACTIONS: MediaAction[] = ["play-next", "play-last", "shuffle"]
+
+const MEDIA_ACTION_ITEMS: {
+ action: MediaAction
+ label: (
+ countSuffix: string,
+ favorited: boolean | undefined,
+ playlistLabel: string
+ ) => string
+ image: NonNullable & string
+}[] = [
+ {
+ action: "playlist",
+ label: (countSuffix, _favorited, playlistLabel) =>
+ `${playlistLabel}${countSuffix}`,
+ image: "text.badge.plus",
+ },
+ {
+ action: "play-next",
+ label: (countSuffix) => `Play Next${countSuffix}`,
+ image: "text.line.first.and.arrowtriangle.forward",
+ },
+ {
+ action: "play-last",
+ label: (countSuffix) => `Play Last${countSuffix}`,
+ image: "text.line.last.and.arrowtriangle.forward",
+ },
+ {
+ action: "shuffle",
+ label: (countSuffix) => `Shuffle${countSuffix}`,
+ image: "shuffle",
+ },
+ {
+ action: "go-artist",
+ label: () => "Go to Artist",
+ image: "person",
+ },
+ {
+ action: "go-album",
+ label: () => "Go to Album",
+ image: "opticaldisc",
+ },
+ {
+ action: "favorite",
+ label: (countSuffix, favorited) =>
+ `${favorited ? "Unfavorite" : "Favorite"}${countSuffix}`,
+ image: "star",
+ },
+]
+
+function isActionIncluded(
+ action: MediaAction,
+ config: Omit
+): boolean {
+ if (config.includeActions) {
+ return config.includeActions.includes(action)
+ }
+
+ if (action === "share") {
+ return shouldShowShare(config.share, config.selectedCount ?? 1)
+ }
+
+ if (action === "favorite" && config.showFavorite === false) {
+ return false
+ }
+
+ if (action === "go-artist" && !config.navigation?.artist) {
+ return false
+ }
+
+ if (action === "go-album" && !config.navigation?.album) {
+ return false
+ }
+
+ return true
+}
+
+export function buildMediaMenuActions(
+ config: Omit
+): MenuAction[] {
+ const {
+ selectedCount = 1,
+ favorited,
+ playlistLabel = "Add to Playlist",
+ } = config
+ const countSuffix = selectedCount > 1 ? ` (${selectedCount})` : ""
+
+ const actions: MenuAction[] = []
+
+ if (isActionIncluded("share", config)) {
+ actions.push({
+ id: "share",
+ title: "Share",
+ image: "square.and.arrow.up",
+ })
+ }
+
+ for (const item of MEDIA_ACTION_ITEMS) {
+ if (!isActionIncluded(item.action, config)) {
+ continue
+ }
+
+ actions.push({
+ id: item.action,
+ title: item.label(countSuffix, favorited, playlistLabel),
+ image:
+ item.action === "favorite" && favorited ? "star.fill" : item.image,
+ })
+ }
+
+ return actions
+}
+
+function MediaMenuBase({
+ children,
+ style,
+ shouldOpenOnLongPress,
+ onAction,
+ share,
+ ...actionConfig
+}: MediaMenuWrapperProps & { shouldOpenOnLongPress?: boolean }) {
+ const { config } = useServerConfig()
+
+ return (
+ {
+ const action = event.nativeEvent.event as MediaAction
+ if (action === "share" && share && config) {
+ void shareMediaLink(config.serverUrl, share)
+ return
+ }
+ onAction(action)
+ }}
+ style={[{ alignSelf: "stretch" }, style]}
+ >
+ {children}
+
+ )
+}
+
+export function MediaContextMenu(props: MediaMenuWrapperProps) {
+ return
+}
+
+export function MediaActionMenu(props: MediaMenuWrapperProps) {
+ return
+}
+
+export const MEDIA_QUEUE_ACTIONS = QUEUE_ACTIONS
diff --git a/apps/mobile/components/player.tsx b/apps/mobile/components/player.tsx
index 11d33f4..cec4a78 100644
--- a/apps/mobile/components/player.tsx
+++ b/apps/mobile/components/player.tsx
@@ -11,26 +11,32 @@ import {
} from "@/lib/theme"
import { Pressable, StyleSheet, Text, View } from "react-native"
+import {
+ MediaContextMenu,
+ type MediaMenuConfig,
+} from "@/components/media-context-menu"
+
export function SongRow({
song,
onPress,
- onLongPress,
+ contextMenu,
trailing,
}: {
song: BrowseSong
onPress?: () => void
- onLongPress?: () => void
+ contextMenu?: Omit & {
+ onAction: MediaMenuConfig["onAction"]
+ }
trailing?: React.ReactNode
}) {
const { config } = useServerConfig()
const colors = useThemeColors()
if (!config) return null
- return (
+ const row = (
)
+
+ if (!contextMenu) {
+ return row
+ }
+
+ return (
+
+ {row}
+
+ )
}
export const tabContentBottomInset = spacing.lg
diff --git a/apps/mobile/components/search-results.tsx b/apps/mobile/components/search-results.tsx
index cc790d3..3478442 100644
--- a/apps/mobile/components/search-results.tsx
+++ b/apps/mobile/components/search-results.tsx
@@ -5,7 +5,9 @@ import { ScrollView, StyleSheet, Text, View } from "react-native"
import { ContentCarousel } from "@/components/media-cards"
import { tabContentBottomInset, SongRow } from "@/components/player"
import { LoadingView } from "@/components/ui/primitives"
+import { useFavorites } from "@/contexts/favorites"
import { usePlayback } from "@/contexts/playback"
+import { useMediaMenuActions } from "@/hooks/use-media-menu-actions"
import { api } from "@otunes/convex/_generated/api"
import type { BrowseSong } from "@otunes/convex/types"
import { spacing, useThemeColors } from "@/lib/theme"
@@ -13,6 +15,8 @@ import { spacing, useThemeColors } from "@/lib/theme"
function SearchResultsBody({ searchQuery }: { searchQuery: string }) {
const colors = useThemeColors()
const { playFromSong } = usePlayback()
+ const { isSongFavorite } = useFavorites()
+ const { handleSongAction } = useMediaMenuActions()
const hasQuery = searchQuery.length > 0
const results = useQuery(
@@ -85,6 +89,19 @@ function SearchResultsBody({ searchQuery }: { searchQuery: string }) {
results.songs.map((s: BrowseSong) => s.id)
)
}
+ contextMenu={{
+ favorited: isSongFavorite(song.id),
+ navigation: {
+ artist: { id: song.artist.id },
+ album: { id: song.album.id },
+ },
+ share: {
+ type: "song",
+ albumId: song.album.id,
+ songId: song.id,
+ },
+ onAction: (action) => void handleSongAction(song, action),
+ }}
/>
))}
diff --git a/apps/mobile/hooks/use-media-menu-actions.ts b/apps/mobile/hooks/use-media-menu-actions.ts
new file mode 100644
index 0000000..8c6b451
--- /dev/null
+++ b/apps/mobile/hooks/use-media-menu-actions.ts
@@ -0,0 +1,255 @@
+import { useConvex, useMutation } from "convex/react"
+import { useCallback } from "react"
+
+import type { MediaAction } from "@/components/media-context-menu"
+import { useAddToPlaylist } from "@/contexts/add-to-playlist"
+import { useFavorites } from "@/contexts/favorites"
+import { usePlayback } from "@/contexts/playback"
+import { useAppNavigation } from "@/lib/app-navigation"
+import { showSuccess } from "@/lib/toast"
+import { api } from "@otunes/convex/_generated/api"
+import type { Id } from "@otunes/convex/_generated/dataModel"
+import type {
+ BrowseAlbum,
+ BrowseAlbumDetail,
+ BrowseAlbumTrack,
+ BrowseArtist,
+ BrowseSong,
+ PlaylistSummary,
+} from "@otunes/convex/types"
+
+export function useMediaMenuActions() {
+ const convex = useConvex()
+ const { push } = useAppNavigation()
+ const { openAddToPlaylist, openAddAlbumToPlaylist, openAddArtistToPlaylist, openAddPlaylistToPlaylist } =
+ useAddToPlaylist()
+ const {
+ isAlbumFavorite,
+ isArtistFavorite,
+ toggleAlbumFavorite,
+ toggleArtistFavorite,
+ toggleSongFavorite,
+ } = useFavorites()
+ const { addToQueueNext, addToQueueLast, playShuffled } = usePlayback()
+ const favoriteSongs = useMutation(api.favorites.favoriteSongs)
+
+ const runQueueAction = useCallback(
+ async (action: MediaAction, songIds: Id<"songs">[]) => {
+ if (songIds.length === 0) return
+ switch (action) {
+ case "play-next":
+ await addToQueueNext(songIds)
+ showSuccess("Queued to play next")
+ break
+ case "play-last":
+ await addToQueueLast(songIds)
+ showSuccess("Queued to play last")
+ break
+ case "shuffle":
+ await playShuffled(songIds)
+ break
+ default:
+ break
+ }
+ },
+ [addToQueueLast, addToQueueNext, playShuffled]
+ )
+
+ const handleSongAction = useCallback(
+ async (song: BrowseSong, action: MediaAction) => {
+ const songIds = [song.id as Id<"songs">]
+ switch (action) {
+ case "playlist":
+ openAddToPlaylist(songIds)
+ break
+ case "play-next":
+ case "play-last":
+ case "shuffle":
+ await runQueueAction(action, songIds)
+ break
+ case "favorite":
+ await toggleSongFavorite(song.id as Id<"songs">)
+ break
+ case "go-artist":
+ push(`/artist/${song.artist.id}`)
+ break
+ case "go-album":
+ push(`/album/${song.album.id}`)
+ break
+ default:
+ break
+ }
+ },
+ [openAddToPlaylist, push, runQueueAction, toggleSongFavorite]
+ )
+
+ const handleAlbumAction = useCallback(
+ async (album: BrowseAlbum, action: MediaAction) => {
+ switch (action) {
+ case "playlist":
+ await openAddAlbumToPlaylist(album.id as Id<"albums">)
+ break
+ case "favorite":
+ await toggleAlbumFavorite(album.id as Id<"albums">)
+ break
+ case "play-next":
+ case "play-last":
+ case "shuffle": {
+ const songIds = await convex.query(api.playlists.getAlbumSongIds, {
+ albumId: album.id as Id<"albums">,
+ })
+ await runQueueAction(action, songIds)
+ break
+ }
+ case "go-artist":
+ push(`/artist/${album.artist.id}`)
+ break
+ default:
+ break
+ }
+ },
+ [
+ convex,
+ openAddAlbumToPlaylist,
+ push,
+ runQueueAction,
+ toggleAlbumFavorite,
+ ]
+ )
+
+ const handleArtistAction = useCallback(
+ async (artist: BrowseArtist, action: MediaAction) => {
+ switch (action) {
+ case "playlist":
+ await openAddArtistToPlaylist(artist.id as Id<"artists">)
+ break
+ case "favorite":
+ await toggleArtistFavorite(artist.id as Id<"artists">)
+ break
+ case "play-next":
+ case "play-last":
+ case "shuffle": {
+ const songIds = await convex.query(
+ api.playlists.getOrderedArtistSongIds,
+ { artistId: artist.id as Id<"artists"> }
+ )
+ await runQueueAction(action, songIds)
+ break
+ }
+ default:
+ break
+ }
+ },
+ [
+ convex,
+ openAddArtistToPlaylist,
+ runQueueAction,
+ toggleArtistFavorite,
+ ]
+ )
+
+ const handlePlaylistAction = useCallback(
+ async (playlist: PlaylistSummary, action: MediaAction) => {
+ switch (action) {
+ case "playlist":
+ await openAddPlaylistToPlaylist(playlist.id as Id<"playlists">)
+ break
+ case "play-next":
+ case "play-last":
+ case "shuffle": {
+ const songIds = await convex.query(api.playlists.getPlaylistSongIds, {
+ playlistId: playlist.id as Id<"playlists">,
+ })
+ await runQueueAction(action, songIds)
+ break
+ }
+ default:
+ break
+ }
+ },
+ [convex, openAddPlaylistToPlaylist, runQueueAction]
+ )
+
+ const handleAlbumDetailAction = useCallback(
+ async (
+ albumId: Id<"albums">,
+ songIds: Id<"songs">[],
+ action: MediaAction
+ ) => {
+ switch (action) {
+ case "favorite":
+ await toggleAlbumFavorite(albumId)
+ break
+ case "playlist":
+ openAddToPlaylist(songIds)
+ break
+ case "play-next":
+ case "play-last":
+ case "shuffle":
+ await runQueueAction(action, songIds)
+ break
+ default:
+ break
+ }
+ },
+ [openAddToPlaylist, runQueueAction, toggleAlbumFavorite]
+ )
+
+ const handleAlbumTrackAction = useCallback(
+ async (
+ track: BrowseAlbumTrack,
+ album: BrowseAlbumDetail,
+ action: MediaAction
+ ) => {
+ const song: BrowseSong = {
+ id: track.id,
+ title: track.title,
+ durationSeconds: track.durationSeconds,
+ artist: album.artist,
+ album: {
+ id: album.id,
+ title: album.title,
+ cover: album.cover,
+ },
+ }
+ await handleSongAction(song, action)
+ },
+ [handleSongAction]
+ )
+
+ const handlePlaylistDetailAction = useCallback(
+ async (songIds: Id<"songs">[], action: MediaAction) => {
+ switch (action) {
+ case "favorite":
+ if (songIds.length > 0) {
+ await favoriteSongs({ songIds })
+ showSuccess("Added to favorites")
+ }
+ break
+ case "playlist":
+ openAddToPlaylist(songIds)
+ break
+ case "play-next":
+ case "play-last":
+ case "shuffle":
+ await runQueueAction(action, songIds)
+ break
+ default:
+ break
+ }
+ },
+ [favoriteSongs, openAddToPlaylist, runQueueAction]
+ )
+
+ return {
+ handleSongAction,
+ handleAlbumAction,
+ handleArtistAction,
+ handlePlaylistAction,
+ handleAlbumDetailAction,
+ handleAlbumTrackAction,
+ handlePlaylistDetailAction,
+ isAlbumFavorite,
+ isArtistFavorite,
+ }
+}
diff --git a/apps/mobile/lib/media-links.ts b/apps/mobile/lib/media-links.ts
new file mode 100644
index 0000000..a87be1e
--- /dev/null
+++ b/apps/mobile/lib/media-links.ts
@@ -0,0 +1,39 @@
+export type MediaShareContext =
+ | { type: "album"; albumId: string }
+ | { type: "song"; albumId: string; songId: string }
+ | { type: "playlist"; playlistId: string; isFavorites?: boolean }
+ | { type: "artist"; artistId: string }
+
+export function shouldShowShare(
+ share: MediaShareContext | undefined,
+ selectedCount: number
+) {
+ if (!share) {
+ return false
+ }
+ if (share.type === "song") {
+ return selectedCount === 1
+ }
+ return true
+}
+
+export function mediaShareUrl(
+ serverUrl: string,
+ share: MediaShareContext
+): string {
+ const origin = serverUrl.replace(/\/+$/, "")
+
+ switch (share.type) {
+ case "album":
+ return `${origin}/album/${share.albumId}`
+ case "song":
+ return `${origin}/album/${share.albumId}?s=${share.songId}`
+ case "playlist":
+ if (share.isFavorites) {
+ return `${origin}/playlist/favorites`
+ }
+ return `${origin}/playlist/${share.playlistId}`
+ case "artist":
+ return `${origin}/artist/${share.artistId}`
+ }
+}
diff --git a/apps/mobile/lib/share-media-link.ts b/apps/mobile/lib/share-media-link.ts
new file mode 100644
index 0000000..00c30c5
--- /dev/null
+++ b/apps/mobile/lib/share-media-link.ts
@@ -0,0 +1,33 @@
+import * as Sharing from "expo-sharing"
+import { Platform, Share } from "react-native"
+
+import type { MediaShareContext } from "@/lib/media-links"
+import { mediaShareUrl } from "@/lib/media-links"
+import { showError } from "@/lib/toast"
+
+export async function shareMediaLink(
+ serverUrl: string,
+ share: MediaShareContext
+) {
+ const url = mediaShareUrl(serverUrl, share)
+
+ try {
+ if (Platform.OS === "web") {
+ if (!(await Sharing.isAvailableAsync())) {
+ showError("Sharing is not available on this device")
+ return
+ }
+ await Sharing.shareAsync(url, { dialogTitle: "Share" })
+ return
+ }
+
+ await Share.share(
+ Platform.OS === "ios" ? { url } : { message: url }
+ )
+ } catch (error) {
+ if (error instanceof Error && /cancel/i.test(error.message)) {
+ return
+ }
+ showError(error instanceof Error ? error.message : "Failed to share link")
+ }
+}
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index cff9534..fe15a8b 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -13,6 +13,7 @@
},
"dependencies": {
"@convex-dev/auth": "^0.0.93",
+ "@expo/ui": "~56.0.17",
"@expo/vector-icons": "^15.0.2",
"@otunes/convex": "workspace:*",
"@react-native-async-storage/async-storage": "2.2.0",
@@ -29,6 +30,7 @@
"expo-linking": "~56.0.14",
"expo-router": "~56.2.10",
"expo-secure-store": "~56.0.4",
+ "expo-sharing": "~56.0.18",
"expo-status-bar": "~56.0.4",
"expo-symbols": "~56.0.6",
"react": "19.2.3",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6acade1..6331b4f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -20,6 +20,9 @@ importers:
'@convex-dev/auth':
specifier: ^0.0.93
version: 0.0.93(@auth/core@0.37.4)(convex@1.41.0(react@19.2.3))(react@19.2.3)
+ '@expo/ui':
+ specifier: ~56.0.17
+ version: 56.0.17(@babel/core@7.29.7)(@types/react-dom@19.2.3(@types/react@19.2.17))(@types/react@19.2.17)(expo@56.0.11)(react-dom@19.2.4(react@19.2.3))(react-native-reanimated@4.3.1(react-native-worklets@0.8.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3))(react-native-worklets@0.8.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)
'@expo/vector-icons':
specifier: ^15.0.2
version: 15.1.1(expo-font@56.0.6)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)
@@ -68,6 +71,9 @@ importers:
expo-secure-store:
specifier: ~56.0.4
version: 56.0.4(expo@56.0.11)
+ expo-sharing:
+ specifier: ~56.0.18
+ version: 56.0.18(expo@56.0.11)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)(typescript@6.0.3)
expo-status-bar:
specifier: ~56.0.4
version: 56.0.4(expo@56.0.11)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)
@@ -942,9 +948,15 @@ packages:
'@expo/config-plugins@56.0.8':
resolution: {integrity: sha512-phTuyBhgVLfqUHMjQkAfRtbyoY6yTxoKja1awtpVnEkoJDxPJuXx1KX5uvq1eZtt4bJQ08OBJ6P95INqRSHpRg==}
+ '@expo/config-plugins@56.0.9':
+ resolution: {integrity: sha512-/6a/S9USwx8OC9tGjHxbviLFiBHyueN3aoNWMLvWDEJoZ1CIVW800ZBzwXq/FYNK2qzcN1LxFmQtzD1zeFQKNA==}
+
'@expo/config-types@56.0.5':
resolution: {integrity: sha512-GsAHO/MwW9ZRdgnmyfRXqVGLCP/zejD6rWnp5OROp8mBGRObKm4HfrjlUyT1skjMwCj1OrURx9ZfIc6yeBAkIA==}
+ '@expo/config-types@56.0.6':
+ resolution: {integrity: sha512-4Y6Aum5J4Re5NnxGVofRNe1aDwUBOmWhQYkynZsqzRtX/zEA1ADUeyHXuEckv9YD9djiyT7bKtLt5gKL3mA6VQ==}
+
'@expo/config@56.0.9':
resolution: {integrity: sha512-/lqFeWGSrhpKJVP8tTN8LjuoIe8u8q2w7FzBL0C+wHgl+WM8l1qUIEYWy/sMvsG/NbpUIUsDHJRhQvOkU58eIw==}
@@ -3807,6 +3819,13 @@ packages:
resolution: {integrity: sha512-SmM2p2g3Jrktpiazcst+OxhjSzOHXKAY4BPURHYHXvApzzoybMmrNF4IEZ8DKZ145BhSe4ydAmlEFCRTsdtgUQ==}
engines: {node: '>=20.16.0'}
+ expo-sharing@56.0.18:
+ resolution: {integrity: sha512-45w4BWNFmdTczp+fJX6YfwJrn9sX+VeRWz2VWLhauygcCrym44HtVDXX5yVYPB9TW9ZesLcEI+CCrCBNWL7smQ==}
+ peerDependencies:
+ expo: '*'
+ react: '*'
+ react-native: '*'
+
expo-status-bar@56.0.4:
resolution: {integrity: sha512-IGs/fDfkHXofy2ZQrGiXayhFK04HB85FZXorhcEhDZEcqASKgSqpak+HwUtAaR0MeTJwWyHNF7I6VmVbbp8EcA==}
peerDependencies:
@@ -7100,8 +7119,29 @@ snapshots:
- supports-color
- typescript
+ '@expo/config-plugins@56.0.9(typescript@6.0.3)':
+ dependencies:
+ '@expo/config-types': 56.0.6
+ '@expo/json-file': 10.2.0
+ '@expo/plist': 0.7.0
+ '@expo/require-utils': 56.1.3(typescript@6.0.3)
+ '@expo/sdk-runtime-versions': 1.0.0
+ chalk: 4.1.2
+ debug: 4.4.3
+ getenv: 2.0.0
+ glob: 13.0.6
+ semver: 7.8.4
+ slugify: 1.6.9
+ xcode: 3.0.1
+ xml2js: 0.6.0
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
'@expo/config-types@56.0.5': {}
+ '@expo/config-types@56.0.6': {}
+
'@expo/config@56.0.9(typescript@6.0.3)':
dependencies:
'@expo/config-plugins': 56.0.8(typescript@6.0.3)
@@ -10557,6 +10597,18 @@ snapshots:
expo-server@56.0.5: {}
+ expo-sharing@56.0.18(expo@56.0.11)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)(typescript@6.0.3):
+ dependencies:
+ '@expo/config-plugins': 56.0.9(typescript@6.0.3)
+ '@expo/config-types': 56.0.6
+ '@expo/plist': 0.7.0
+ expo: 56.0.11(@babel/core@7.29.7)(@expo/dom-webview@56.0.5)(@expo/metro-runtime@56.0.15)(expo-router@56.2.10)(react-dom@19.2.4(react@19.2.3))(react-native-worklets@0.8.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)(typescript@6.0.3)
+ react: 19.2.3
+ react-native: 0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3)
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
expo-status-bar@56.0.4(expo@56.0.11)(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3):
dependencies:
expo: 56.0.11(@babel/core@7.29.7)(@expo/dom-webview@56.0.5)(@expo/metro-runtime@56.0.15)(expo-router@56.2.10)(react-dom@19.2.4(react@19.2.3))(react-native-worklets@0.8.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3))(react-native@0.85.3(@babel/core@7.29.7)(@react-native/metro-config@0.86.0(@babel/core@7.29.7))(@types/react@19.2.17)(react@19.2.3))(react@19.2.3)(typescript@6.0.3)