Compare commits

..
52 changed files with 523 additions and 1852 deletions

No files matched your search

+5 -6
View File
@@ -54,12 +54,11 @@ playwright.config.*
*~
*.log
# Environment variables (only commit template files)
.env
.env*.local
.env.development
.env.test
.env.production.local
# Environment variables, in any workspace. Next.js inlines NEXT_PUBLIC_* values
# into the bundle and the Convex CLI reads .env.local on deploy.
**/.env
**/.env.*
!**/.env.example
# Docker configuration files (not needed inside build context)
Dockerfile*
+6 -1
View File
@@ -195,7 +195,12 @@ RUN node --version \
&& ldd /convex/generate_key \
&& ! ldd /convex/convex-local-backend /convex/generate_key | grep -q 'not found'
RUN useradd --system --user-group --home-dir /app --shell /usr/sbin/nologin otunes
# The backend gets its own user so the web server cannot read the database or
# instance secret. It joins the otunes group to clean up the web server's HLS
# cache in /tmp/otunes.
RUN useradd --system --user-group --home-dir /app --shell /usr/sbin/nologin otunes \
&& useradd --system --user-group --groups otunes --create-home --home-dir /home/convex \
--shell /usr/sbin/nologin convex
COPY --from=convex-functions /app /opt/otunes/convex
COPY docker/generate-auth-keys.mjs /opt/otunes/generate-auth-keys.mjs
+4 -9
View File
@@ -73,15 +73,10 @@ select your signing team, then build and run. For a Release build, use Xcode's
Archive action with the Catalyst destination. EAS's existing iOS profiles still
build iPhone/iPad apps.
Don't enable Catalyst by hand in Xcode; the plugin configures everything during
prebuild. It enables the Xcode target and React Native's CocoaPods patches,
raises pod deployment targets to the app's, and disables precompiled React
Native and Expo modules so dependencies can compile for Catalyst. System volume
stays under macOS control.
The Mac app uses the same bundle identifier as the iOS app, so sign both with the
same team. Handoff only pairs apps with a matching team and activity type, which
`app.config.ts` declares once per build profile in `NSUserActivityTypes`.
The Catalyst plugin enables the Xcode target and React Native's CocoaPods
patches. It disables precompiled React Native and Expo modules so dependencies
can compile for Catalyst. The Mac app derives a separate bundle identifier with
Apple's `maccatalyst.` prefix. System volume stays under macOS control.
To return a checkout to ordinary iOS builds, rerun prebuild without
`MAC_CATALYST=1`. Keep `APP_VARIANT` consistent when starting Metro.
+2 -5
View File
@@ -26,8 +26,6 @@ export default ({ config }: ConfigContext): ExpoConfig => {
production: "oTunes",
}[variant]
const bundleIdentifier = `${config.ios!.bundleIdentifier}${suffix}`
return {
...config,
plugins: [
@@ -42,12 +40,11 @@ export default ({ config }: ConfigContext): ExpoConfig => {
icon: `./assets/icon${iconSuffix}.png`,
ios: {
...config.ios,
bundleIdentifier,
bundleIdentifier: `${config.ios!.bundleIdentifier}${suffix}`,
icon: `./assets/${composer}.icon`,
infoPlist: {
...config.ios?.infoPlist,
// HandoffModule publishes this `.media` type; Catalyst shares this bundle ID.
NSUserActivityTypes: [`${bundleIdentifier}.media`],
NSUserActivityTypes: [`com.abunchofknowitalls.otunes${suffix}.media`],
},
},
android: {
@@ -1 +0,0 @@
export { default } from "../library/queue"
@@ -35,7 +35,7 @@ import {
MediaActionMenu,
MediaContextMenu,
type MediaAction,
} from "@/components/media-actions-sheet"
} from "@/components/media-context-menu"
import { CollectionDetailSkeleton } from "@/components/skeletons"
import { Button } from "@/components/ui/primitives"
import { contentBottomInset } from "@/components/player"
@@ -488,7 +488,7 @@ const AlbumTrackRow = memo(function AlbumTrackRow({
action: MediaAction
) => Promise<void>
}) {
const Row = Platform.OS === "ios" ? SongSwipeRow : Pressable
const Row = Platform.OS !== "web" ? SongSwipeRow : Pressable
const { config } = useServerConfig()
return (
<MediaContextMenu
@@ -523,6 +523,7 @@ const AlbumTrackRow = memo(function AlbumTrackRow({
group={swipeGroup}
backgroundColor={palette.background}
onPlayNext={() => void onAction(track, album, "play-next")}
onAddToQueue={() => void onAction(track, album, "play-last")}
style={styles.trackRow}
onPress={() => void onPlay(track.id as Id<"songs">, songIds)}
>
@@ -6,7 +6,7 @@ import { Ionicons } from "@expo/vector-icons"
import { CoverImage } from "@/components/cover-image"
import { MediaGridList } from "@/components/media-cards"
import { MediaActionMenu } from "@/components/media-actions-sheet"
import { MediaActionMenu } from "@/components/media-context-menu"
import { CollectionDetailSkeleton } from "@/components/skeletons"
import { Button } from "@/components/ui/primitives"
import { contentBottomInset } from "@/components/player"
@@ -46,7 +46,7 @@ import {
import {
MediaActionMenu,
type MediaAction,
} from "@/components/media-actions-sheet"
} from "@/components/media-context-menu"
import { CollectionDetailSkeleton } from "@/components/skeletons"
import { Button } from "@/components/ui/primitives"
import { contentBottomInset, SongListRow } from "@/components/player"
@@ -314,7 +314,6 @@ function PlaylistContent({
deletePlaylist,
handlePlaylistDetailAction,
palette.foreground,
palette.background,
palette.isDark,
playlistId,
playlist?.title,
@@ -434,11 +433,18 @@ const PlaylistSongRow = memo(function PlaylistSongRow({
palette={palette}
inset
swipe={
Platform.OS === "ios"
Platform.OS !== "web"
? {
group: swipeGroup,
backgroundColor: palette.background,
onPlayNext: () => onAction(song, "play-next"),
onAddToQueue: () => onAction(song, "play-last"),
onRemove:
Platform.OS === "android" && removable
? () => {
void onRemove(song.id)
}
: undefined,
}
: undefined
}
@@ -447,7 +453,7 @@ const PlaylistSongRow = memo(function PlaylistSongRow({
/>
)
if (Platform.OS === "ios" || !removable) {
if (Platform.OS !== "web" || !removable) {
return row
}
-186
View File
@@ -1,186 +0,0 @@
import { Stack, useRouter } from "expo-router"
import { memo, useCallback, useMemo } from "react"
import { FlatList, Pressable, StyleSheet, Text, View } from "react-native"
import { Button } from "@/components/ui/primitives"
import { contentBottomInset, SongRow } from "@/components/player"
import { SongRowSkeleton } from "@/components/skeletons"
import { usePlaybackActions, usePlaybackQueue } from "@/contexts/playback"
import type { Id } from "@otunes/convex/_generated/dataModel"
import { longListProps } from "@/lib/list"
import { useSong, useSongs } from "@/lib/song-cache"
import { spacing, useThemeColors } from "@/lib/theme"
/** `key` stays stable when earlier songs leave the queue, so rows are not remounted on skip. */
type QueueItem = { songId: Id<"songs">; queueIndex: number; key: string }
function queueItemKey(item: QueueItem) {
return item.key
}
const QueueRow = memo(function QueueRow({
songId,
queueIndex,
isLast,
isCurrent,
onSkipTo,
onMove,
}: Omit<QueueItem, "key"> & {
isLast: boolean
isCurrent: boolean
onSkipTo: (index: number) => void
onMove: (index: number, direction: -1 | 1) => void
}) {
const colors = useThemeColors()
const song = useSong(songId)
return (
<View>
{song ? (
<SongRow song={song} onPress={() => onSkipTo(queueIndex)} />
) : (
<SongRowSkeleton />
)}
<View style={styles.queueActions}>
<Pressable
disabled={queueIndex === 0}
onPress={() => onMove(queueIndex, -1)}
>
<Text style={{ color: colors.foreground }}>Move up</Text>
</Pressable>
<Pressable disabled={isLast} onPress={() => onMove(queueIndex, 1)}>
<Text style={{ color: colors.foreground }}>Move down</Text>
</Pressable>
{isCurrent ? (
<Text style={{ color: colors.primary, fontWeight: "700" }}>
Now playing
</Text>
) : null}
</View>
</View>
)
})
export default function QueueScreen() {
const router = useRouter()
const colors = useThemeColors()
const { queueSongIds, queueHistorySongIds } = usePlaybackQueue()
const { skipToQueueIndex, clearQueue, reorderQueue } = usePlaybackActions()
const historySongs = useSongs(queueHistorySongIds)
const items = useMemo<QueueItem[]>(() => {
const occurrences = new Map<string, number>()
return queueSongIds.map((songId, queueIndex) => {
const occurrence = occurrences.get(songId) ?? 0
occurrences.set(songId, occurrence + 1)
return { songId, queueIndex, key: `${songId}:${occurrence}` }
})
}, [queueSongIds])
const moveSong = useCallback(
(fromIndex: number, direction: -1 | 1) => {
const toIndex = fromIndex + direction
if (toIndex < 0 || toIndex >= queueSongIds.length) return
const next = [...queueSongIds]
const [item] = next.splice(fromIndex, 1)
next.splice(toIndex, 0, item)
void reorderQueue(next)
},
[queueSongIds, reorderQueue]
)
function handleClearQueue() {
if (router.canGoBack()) {
router.back()
setTimeout(() => {
void clearQueue()
}, 0)
return
}
void clearQueue()
}
return (
<>
<Stack.Screen
options={{
headerRight: () =>
queueSongIds.length > 0 ? (
<Button
title="Clear"
variant="ghost"
onPress={handleClearQueue}
/>
) : null,
}}
/>
<FlatList
style={{ flex: 1, backgroundColor: colors.background }}
ListHeaderComponent={
<View>
<Text style={[styles.section, { color: colors.mutedForeground }]}>
Up Next
</Text>
{queueSongIds.length === 0 ? (
<Text style={[styles.empty, { color: colors.mutedForeground }]}>
Queue is empty
</Text>
) : null}
</View>
}
{...longListProps}
data={items}
keyExtractor={queueItemKey}
contentContainerStyle={{ paddingBottom: contentBottomInset }}
contentInsetAdjustmentBehavior="automatic"
renderItem={({ item }) => (
<QueueRow
songId={item.songId}
queueIndex={item.queueIndex}
isLast={item.queueIndex === queueSongIds.length - 1}
isCurrent={item.queueIndex === 0}
onSkipTo={skipToQueueIndex}
onMove={moveSong}
/>
)}
ListFooterComponent={
queueHistorySongIds.length > 0 ? (
<View style={styles.history}>
<Text style={[styles.section, { color: colors.mutedForeground }]}>
History
</Text>
{historySongs.map((song, index) =>
song ? (
<SongRow key={`${song.id}-${index}`} song={song} />
) : (
<SongRowSkeleton
key={`${queueHistorySongIds[index]}-${index}`}
/>
)
)}
</View>
) : undefined
}
/>
</>
)
}
const styles = StyleSheet.create({
section: {
paddingHorizontal: spacing.lg,
paddingTop: spacing.md,
fontSize: 12,
fontWeight: "700",
textTransform: "uppercase",
},
empty: { padding: spacing.lg },
queueActions: {
flexDirection: "row",
gap: spacing.lg,
paddingHorizontal: spacing.lg,
paddingBottom: spacing.sm,
},
history: { marginTop: spacing.lg },
})
@@ -23,7 +23,6 @@ import { useServerConfig } from "@/contexts/server-config"
import {
setArtworkColorsEnabled,
useArtworkColorsEnabled,
useArtworkColorPreferenceLoaded,
} from "@/lib/artwork-color-preference"
import { initialsFromName } from "@/lib/format"
import { useCachedQuery } from "@/hooks/use-cached-query"
@@ -172,7 +171,6 @@ export default function SettingsScreen() {
function AppearanceSection() {
const enabled = useArtworkColorsEnabled()
const loaded = useArtworkColorPreferenceLoaded()
const [saving, setSaving] = useState(false)
return (
@@ -180,8 +178,8 @@ function AppearanceSection() {
<SwitchRow
title="New artwork colors"
subtitle="Use the new color algorithm on this device."
value={enabled}
disabled={!loaded || saving}
value={enabled ?? false}
disabled={enabled === undefined || saving}
onValueChange={async (checked) => {
setSaving(true)
try {
@@ -1 +0,0 @@
export { default } from "../home/queue"
@@ -1 +0,0 @@
export { default } from "../home/queue"
+1 -1
View File
@@ -39,7 +39,7 @@ import { MarqueeText } from "@/components/marquee-text"
import {
MediaActionMenu,
type MediaAction,
} from "@/components/media-actions-sheet"
} from "@/components/media-context-menu"
import {
NowPlayingQueue,
QUEUE_HORIZONTAL_INSET,
+1 -5
View File
@@ -35,11 +35,7 @@ export function HandoffBridge() {
if (!active || !activity) return
try {
const source = new URL(activity.server)
if (!config) {
showError("Connect to an oTunes server to continue this activity.")
return
}
if (source.origin !== new URL(config.serverUrl).origin) {
if (!config || source.origin !== new URL(config.serverUrl).origin) {
showError("This activity belongs to a different oTunes server.")
return
}
@@ -1,7 +0,0 @@
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"
+7 -1
View File
@@ -45,6 +45,8 @@ export const SongRow = memo(function SongRow({
swipe?: {
group: SwipeRowGroup
onPlayNext: () => void
onAddToQueue: () => void
onRemove?: () => void
backgroundColor: string
}
/** Album/playlist layout: the divider starts at the title, not the artwork. */
@@ -107,10 +109,12 @@ export const SongRow = memo(function SongRow({
? styles.insetRow
: [styles.row, { borderBottomColor: divider }]
const row =
swipe && Platform.OS === "ios" ? (
swipe && Platform.OS !== "web" ? (
<SongSwipeRow
group={swipe.group}
onPlayNext={swipe.onPlayNext}
onAddToQueue={swipe.onAddToQueue}
onRemove={swipe.onRemove}
backgroundColor={swipe.backgroundColor}
onPress={onPress}
style={rowStyle}
@@ -167,6 +171,8 @@ export const SongListRow = memo(function SongListRow({
swipe?: {
group: SwipeRowGroup
onPlayNext: () => void
onAddToQueue: () => void
onRemove?: () => void
backgroundColor: string
}
onPlay: (song: BrowseSong) => void
+160 -31
View File
@@ -1,3 +1,4 @@
import { Ionicons } from "@expo/vector-icons"
import * as Haptics from "expo-haptics"
import { SymbolView } from "expo-symbols"
import {
@@ -8,6 +9,7 @@ import {
type ReactNode,
} from "react"
import {
Platform,
Pressable,
StyleSheet,
type StyleProp,
@@ -26,7 +28,10 @@ import Animated, {
import { scheduleOnRN } from "react-native-worklets"
import type { SwipeRowGroup } from "@/components/ios-swipe-to-remove-row"
const IS_ANDROID = Platform.OS === "android"
const ACTION_WIDTH = 82
const LEADING_ACTION_WIDTH = 72
const SPRING = { duration: 450, dampingRatio: 1 }
function impact() {
@@ -41,6 +46,8 @@ export function SongSwipeRow({
group,
onPress,
onPlayNext,
onAddToQueue,
onRemove,
}: {
children: ReactNode
style?: StyleProp<ViewStyle>
@@ -48,7 +55,10 @@ export function SongSwipeRow({
group: SwipeRowGroup
onPress?: () => void
onPlayNext: () => void
onAddToQueue: () => void
onRemove?: () => void
}) {
const hasRemove = IS_ANDROID && !!onRemove
const x = useSharedValue(0)
const startX = useSharedValue(0)
const width = useSharedValue(0)
@@ -78,10 +88,10 @@ export function SongSwipeRow({
const activate = useCallback(
(side: number) => {
close()
if (side > 0) onPlayNext()
if (side > 0) onAddToQueue()
// Download is intentionally a placeholder.
},
[close, onPlayNext]
[close, onAddToQueue]
)
const tapRow = useCallback(() => {
if (open) close()
@@ -105,7 +115,13 @@ export function SongSwipeRow({
Math.min(width.value, startX.value + event.translationX)
)
const commit =
Math.abs(x.value) > Math.max(ACTION_WIDTH, width.value * 0.55)
Math.abs(x.value) >
Math.max(
x.value > 0
? LEADING_ACTION_WIDTH * 2
: ACTION_WIDTH * (hasRemove ? 2 : 1),
width.value * 0.55
)
if (commit !== committed.value) {
committed.value = commit
commitProgress.value = withSpring(commit ? 1 : 0, SPRING)
@@ -124,10 +140,16 @@ export function SongSwipeRow({
Math.abs(x.value) > 10 && projected * side > ACTION_WIDTH / 2
? side
: 0
x.value = withSpring(target * ACTION_WIDTH, {
...SPRING,
velocity: event.velocityX,
})
x.value = withSpring(
target *
(target > 0
? LEADING_ACTION_WIDTH * 2
: ACTION_WIDTH * (hasRemove ? 2 : 1)),
{
...SPRING,
velocity: event.velocityX,
}
)
scheduleOnRN(settle, target)
})
.onFinalize((_event, success) => {
@@ -145,6 +167,7 @@ export function SongSwipeRow({
return Gesture.Exclusive(pan, tap)
}, [
activate,
hasRemove,
begin,
close,
commitProgress,
@@ -158,12 +181,14 @@ export function SongSwipeRow({
const rowStyle = useAnimatedStyle(() => ({
transform: [{ translateX: x.value }],
borderRadius: interpolate(
Math.abs(x.value),
[0, 40],
[0, height.value / 2],
Extrapolation.CLAMP
),
borderRadius: IS_ANDROID
? 0
: interpolate(
Math.abs(x.value),
[0, 40],
[0, height.value / 2],
Extrapolation.CLAMP
),
}))
const fillStyle = useAnimatedStyle(() => ({
opacity: interpolate(
@@ -190,8 +215,37 @@ export function SongSwipeRow({
open={open === 1}
onPress={() => activate(1)}
/>
<SwipeAction
side={1}
secondary
x={x}
height={height}
progress={commitProgress}
open={open === 1}
onPress={() => {
close()
onPlayNext()
}}
/>
{hasRemove && (
<SwipeAction
side={-1}
secondary
paired
remove
x={x}
height={height}
progress={commitProgress}
open={open === -1}
onPress={() => {
close()
onRemove?.()
}}
/>
)}
<SwipeAction
side={-1}
paired={hasRemove}
x={x}
height={height}
progress={commitProgress}
@@ -204,11 +258,23 @@ export function SongSwipeRow({
accessibilityRole="button"
onAccessibilityTap={tapRow}
accessibilityActions={[
{ name: "addToQueue", label: "Add to Queue" },
{ name: "playNext", label: "Play Next" },
{ name: "download", label: "Download" },
...(hasRemove
? [{ name: "remove", label: "Remove from Playlist" }]
: []),
]}
onAccessibilityAction={(event) => {
if (event.nativeEvent.actionName === "playNext") activate(1)
if (event.nativeEvent.actionName === "remove" && hasRemove) {
close()
onRemove?.()
}
if (event.nativeEvent.actionName === "addToQueue") activate(1)
if (event.nativeEvent.actionName === "playNext") {
close()
onPlayNext()
}
}}
style={[styles.row, { backgroundColor }, rowStyle]}
>
@@ -225,6 +291,9 @@ export function SongSwipeRow({
function SwipeAction({
side,
secondary = false,
paired = side > 0,
remove = false,
x,
height,
progress,
@@ -232,22 +301,48 @@ function SwipeAction({
onPress,
}: {
side: 1 | -1
secondary?: boolean
paired?: boolean
remove?: boolean
x: SharedValue<number>
height: SharedValue<number>
progress: SharedValue<number>
open: boolean
onPress: () => void
}) {
const actionStyle = useAnimatedStyle(() => ({
width: Math.max(0, x.value * side),
}))
const pillStyle = useAnimatedStyle(() => {
const actionStyle = useAnimatedStyle(() => {
const revealed = Math.max(0, x.value * side)
const primaryWidth = (revealed * (1 + progress.value)) / 2
return {
width: !paired
? revealed
: secondary
? revealed - primaryWidth
: primaryWidth,
...(secondary
? side > 0
? { left: primaryWidth }
: { right: primaryWidth }
: {}),
}
})
const pillStyle = useAnimatedStyle(() => {
const total = Math.max(0, x.value * side)
const revealed = !paired
? total
: (total * (secondary ? 1 - progress.value : 1 + progress.value)) / 2
if (IS_ANDROID) {
return { width: revealed, height: height.value, borderRadius: 0 }
}
const resting = Math.max(
0,
Math.min(
revealed - 20,
interpolate(revealed, [24, ACTION_WIDTH, 220], [0, 62, 200])
revealed - (side > 0 ? 10 : 20),
interpolate(
revealed,
[24, side > 0 ? LEADING_ACTION_WIDTH : ACTION_WIDTH, 220],
[0, 62, 200]
)
)
)
const pillWidth =
@@ -292,27 +387,61 @@ function SwipeAction({
>
<Pressable
accessibilityRole="button"
accessibilityLabel={side > 0 ? "Play Next" : "Download"}
accessibilityLabel={
remove
? "Remove from Playlist"
: side > 0
? secondary
? "Play Next"
: "Add to Queue"
: "Download"
}
onPress={onPress}
style={styles.actionButton}
>
<Animated.View
style={[
styles.pill,
{ backgroundColor: side > 0 ? "#6b5bff" : "#008dff" },
{
backgroundColor: remove
? "#d32f2f"
: side > 0
? secondary
? "#6b5bff"
: "#f29943"
: "#008dff",
},
pillStyle,
]}
>
<Animated.View style={iconStyle}>
<SymbolView
name={
side > 0
? "text.line.first.and.arrowtriangle.forward"
: "arrow.down"
}
size={22}
tintColor="white"
/>
{IS_ANDROID ? (
<Ionicons
name={
remove
? "trash-outline"
: side < 0
? "arrow-down"
: secondary
? "play-forward"
: "list"
}
size={22}
color="white"
/>
) : (
<SymbolView
name={
side > 0
? secondary
? "text.line.first.and.arrowtriangle.forward"
: "text.line.last.and.arrowtriangle.forward"
: "arrow.down"
}
size={22}
tintColor="white"
/>
)}
</Animated.View>
</Animated.View>
</Pressable>
@@ -18,7 +18,7 @@ import {
import { useTabletPlayerInsets } from "@/contexts/tablet-player-layout"
import { CoverImage } from "@/components/cover-image"
import { MediaActionMenu } from "@/components/media-actions-sheet"
import { MediaActionMenu } from "@/components/media-context-menu"
import { PlayerSymbol } from "@/components/player-symbol"
import { useFavorites } from "@/contexts/favorites"
import { usePlaybackActions, usePlaybackQueue } from "@/contexts/playback"
+8 -6
View File
@@ -1,12 +1,11 @@
import { createContext, useContext, type ReactNode } from "react"
import { createContext, useContext, useMemo, type ReactNode } from "react"
type ConvexAuthSessionContextValue = {
invalidateSession: () => Promise<void>
}
const ConvexAuthSessionContext = createContext<ConvexAuthSessionContextValue | null>(
null
)
const ConvexAuthSessionContext =
createContext<ConvexAuthSessionContextValue | null>(null)
export function ConvexAuthSessionProvider({
children,
@@ -15,8 +14,9 @@ export function ConvexAuthSessionProvider({
children: ReactNode
invalidateSession: () => Promise<void>
}) {
const value = useMemo(() => ({ invalidateSession }), [invalidateSession])
return (
<ConvexAuthSessionContext.Provider value={{ invalidateSession }}>
<ConvexAuthSessionContext.Provider value={value}>
{children}
</ConvexAuthSessionContext.Provider>
)
@@ -25,7 +25,9 @@ export function ConvexAuthSessionProvider({
export function useInvalidateAuthSession() {
const context = useContext(ConvexAuthSessionContext)
if (!context) {
throw new Error("useInvalidateAuthSession must be used within ConvexAppProvider")
throw new Error(
"useInvalidateAuthSession must be used within ConvexAuthSessionProvider"
)
}
return context
}
+11 -3
View File
@@ -376,7 +376,8 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
const handlePlaylistStatusUpdate = useCallback(
(status: AudioPlaylistStatus) => {
if (!status.isLoaded) return
// iOS may remove the finished item before delivering its final status.
if (!status.isLoaded && !status.didJustFinish) return
const state = storeRef.current.getState()
if (loadedSongIdsRef.current[status.currentIndex] !== state.queue[0]) {
return
@@ -427,7 +428,14 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
isPlayingRef.current = false
setIsPlayingState(false)
storeRef.current.update(playbackQueue.skipNext)
void playlistRef.current?.seekTo(0)
const playlist = playlistRef.current
if (playlist) {
playlist.pause()
// Reload the final item, which iOS removes when playback ends.
ignoreTrackChangeRef.current = true
playlist.skipTo(status.currentIndex)
scheduleTrackChangeHandling()
}
currentTimeRef.current = 0
setCurrentTime(0)
return
@@ -443,7 +451,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
playlist?.play()
}
},
[]
[scheduleTrackChangeHandling]
)
const handleTrackChanged = useCallback(
+142
View File
@@ -0,0 +1,142 @@
import { useEffect, useMemo, useState } from "react"
import { themeCoverPalette, type CoverPalette } from "@/lib/cover-palette"
import { readCache, writeCache } from "@/lib/persistent-cache"
import { useIsDark, useThemeColors } from "@/lib/theme"
import { withCoverImageSize } from "@/lib/urls"
// How long a screen holds its skeleton for the first extraction of a cover,
// so rows render once with final colors instead of flashing from the theme.
export const COVER_PALETTE_WAIT_MS = 400
export type CoverPaletteResult = { palette: CoverPalette; settled: boolean }
type CoverPaletteSourceOptions<Swatches> = {
/** Persistent cache key for a 64px cover URI. */
cacheKey: (colorSourceUri: string) => string
extract: (colorSourceUri: string) => Promise<Swatches | null>
derive: (swatches: Swatches, isDark: boolean) => CoverPalette | null
/** Reject persisted entries written in an older shape. */
isValidCache?: (swatches: Swatches) => boolean
}
/**
* One artwork color pipeline: an extractor and palette derivation with their
* own memory cache, persistent cache and in-flight requests.
*/
export function createCoverPaletteSource<Swatches>({
cacheKey,
extract,
derive,
isValidCache,
}: CoverPaletteSourceOptions<Swatches>) {
const swatchesByKey = new Map<string, Swatches | null>()
const pending = new Map<string, Promise<Swatches | null>>()
function cachedSwatches(key: string): Swatches | null | undefined {
if (swatchesByKey.has(key)) return swatchesByKey.get(key)
const cached = readCache<Swatches>(cacheKey(key))
return cached && isValidCache && !isValidCache(cached) ? undefined : cached
}
function extractSwatches(key: string) {
const inFlight = pending.get(key)
if (inFlight) return inFlight
const request = extract(key)
.catch(() => null)
.then((swatches) => {
swatchesByKey.set(key, swatches)
if (swatches) writeCache(cacheKey(key), swatches)
pending.delete(key)
return swatches
})
pending.set(key, request)
return request
}
function prefetch(uri: string) {
const key = withCoverImageSize(uri, 64)
if (cachedSwatches(key) !== undefined) return
void extractSwatches(key)
}
/**
* Colors for a screen tinted by `uri`'s cover art. Pass `uri` as "" to skip
* extraction. Pass `hasCover` as `undefined` while it isn't known yet so
* extraction can start early.
*
* `settled` turns true once the palette is final or after
* `COVER_PALETTE_WAIT_MS`, whichever comes first.
*/
function usePalette(
uri: string,
hasCover: boolean | undefined
): CoverPaletteResult {
const theme = useThemeColors()
const isDark = useIsDark()
const key = uri ? withCoverImageSize(uri, 64) : ""
const [resolved, setResolved] = useState(() => ({
key,
swatches: key ? cachedSwatches(key) : null,
}))
const [waitedKey, setWaitedKey] = useState<string | null>(null)
const swatches =
resolved.key === key ? resolved.swatches : key ? cachedSwatches(key) : null
useEffect(() => {
if (!key || hasCover === false) return
let cancelled = false
const known = cachedSwatches(key)
const show = (next: Swatches | null) =>
setResolved((prev) =>
prev.key === key && sameSwatches(prev.swatches, next)
? prev
: { key, swatches: next }
)
if (known !== undefined && swatchesByKey.has(key)) {
show(known)
return
}
// Persisted swatches render immediately; refresh them in the background
// in case the cover changed.
const timer =
known === undefined
? setTimeout(
() => !cancelled && setWaitedKey(key),
COVER_PALETTE_WAIT_MS
)
: null
void extractSwatches(key).then((next) => {
if (!cancelled) show(next ?? known ?? null)
})
return () => {
cancelled = true
if (timer) clearTimeout(timer)
}
}, [hasCover, key])
const palette = useMemo(() => {
const fromArt =
hasCover !== false && swatches ? derive(swatches, isDark) : null
return fromArt ?? themeCoverPalette(theme, isDark)
}, [hasCover, isDark, swatches, theme])
return {
palette,
settled:
!key ||
hasCover === false ||
swatches !== undefined ||
waitedKey === key,
}
}
return { prefetch, usePalette }
}
function sameSwatches(a: unknown, b: unknown) {
return a === b || JSON.stringify(a) === JSON.stringify(b)
}
+30 -130
View File
@@ -1,147 +1,47 @@
import { useEffect, useMemo, useState } from "react"
import {
artworkColorsEnabled,
createCoverPaletteSource,
type CoverPaletteResult,
} from "@/hooks/cover-palette-source"
import {
prefetchLegacyCoverPalette,
useLegacyCoverPalette,
} from "@/hooks/use-legacy-cover-palette"
import {
loadArtworkColorsEnabled,
useArtworkColorsEnabled,
} from "@/lib/artwork-color-preference"
import { prefetchLegacyCoverPalette, useLegacyCoverPalette } from "@/hooks/use-legacy-cover-palette"
import { extractCoverSwatches } from "@/lib/artwork-colors"
import { deriveCoverPalette, type CoverSwatches } from "@/lib/cover-palette"
import {
deriveCoverPalette,
themeCoverPalette,
type CoverPalette,
type CoverSwatches,
} from "@/lib/cover-palette"
import { readCache, writeCache } from "@/lib/persistent-cache"
import { useIsDark, useThemeColors } from "@/lib/theme"
import { withCoverImageSize } from "@/lib/urls"
export { COVER_PALETTE_WAIT_MS } from "@/hooks/cover-palette-source"
// How long a screen holds its skeleton for the first extraction of a cover,
// so rows render once with final colors instead of flashing from the theme.
export const COVER_PALETTE_WAIT_MS = 400
const swatchesByKey = new Map<string, CoverSwatches | null>()
const pending = new Map<string, Promise<CoverSwatches | null>>()
function cacheKey(colorSourceUri: string) {
return `palette:v2:${colorSourceUri}`
}
function sameSwatches(
a: CoverSwatches | null | undefined,
b: CoverSwatches | null | undefined
) {
return a === b || JSON.stringify(a) === JSON.stringify(b)
}
function cachedSwatches(key: string): CoverSwatches | null | undefined {
if (swatchesByKey.has(key)) return swatchesByKey.get(key)
return readCache<CoverSwatches>(cacheKey(key))
}
function extractSwatches(key: string) {
const inFlight = pending.get(key)
if (inFlight) return inFlight
const request = extractCoverSwatches(key)
.catch(() => null)
.then((swatches) => {
swatchesByKey.set(key, swatches)
if (swatches) writeCache(cacheKey(key), swatches)
pending.delete(key)
return swatches
})
pending.set(key, request)
return request
}
const region = createCoverPaletteSource<CoverSwatches>({
cacheKey: (colorSourceUri) => `palette:v2:${colorSourceUri}`,
extract: extractCoverSwatches,
derive: (swatches) => deriveCoverPalette(swatches),
})
/** Warm visible artwork colors before a detail page is pushed. */
export function prefetchCoverPalette(uri: string) {
if (!artworkColorsEnabled()) {
prefetchLegacyCoverPalette(uri)
return
}
const key = withCoverImageSize(uri, 64)
if (cachedSwatches(key) !== undefined) return
void extractSwatches(key)
void loadArtworkColorsEnabled().then((enabled) =>
enabled ? region.prefetch(uri) : prefetchLegacyCoverPalette(uri)
)
}
/**
* Colors for a screen tinted by `uri`'s cover art. Extraction runs once per
* cover and is cached on device. Pass `hasCover` as `undefined` while it isn't
* known yet so extraction can start early.
*
* `settled` turns true once the palette is final or after
* `COVER_PALETTE_WAIT_MS`, whichever comes first.
* Colors for a screen tinted by `uri`'s cover art, from whichever pipeline the
* device preference selects. Nothing is extracted until the preference loads,
* and the screen stays unsettled meanwhile so it doesn't flash theme colors.
*/
function useRegionCoverPalette(
export function useCoverPalette(
uri: string,
hasCover: boolean | undefined
): { palette: CoverPalette; settled: boolean } {
const theme = useThemeColors()
const isDark = useIsDark()
const key = uri ? withCoverImageSize(uri, 64) : ""
const [resolved, setResolved] = useState(() => ({
key,
swatches: key ? cachedSwatches(key) : null,
}))
const [waitedKey, setWaitedKey] = useState<string | null>(null)
const swatches =
resolved.key === key ? resolved.swatches : key ? cachedSwatches(key) : null
useEffect(() => {
if (!key || hasCover === false) return
let cancelled = false
const known = cachedSwatches(key)
const show = (next: CoverSwatches | null) =>
setResolved((prev) =>
prev.key === key && sameSwatches(prev.swatches, next)
? prev
: { key, swatches: next }
)
if (known !== undefined && swatchesByKey.has(key)) {
show(known)
return
}
// Persisted swatches render immediately; refresh them in the background in
// case the cover changed.
const timer =
known === undefined
? setTimeout(
() => !cancelled && setWaitedKey(key),
COVER_PALETTE_WAIT_MS
)
: null
void extractSwatches(key).then((next) => {
if (!cancelled) show(next ?? known ?? null)
})
return () => {
cancelled = true
if (timer) clearTimeout(timer)
}
}, [hasCover, key])
const palette = useMemo(() => {
const fromArt =
hasCover !== false && swatches
? deriveCoverPalette(swatches)
: null
return fromArt ?? themeCoverPalette(theme, isDark)
}, [hasCover, isDark, swatches, theme])
return {
palette,
settled:
!key || hasCover === false || swatches !== undefined || waitedKey === key,
}
}
/** Switch both extraction and palette derivation without mixing their caches. */
export function useCoverPalette(uri: string, hasCover: boolean | undefined) {
): CoverPaletteResult {
const enabled = useArtworkColorsEnabled()
const region = useRegionCoverPalette(enabled ? uri : "", hasCover)
const legacy = useLegacyCoverPalette(enabled ? "" : uri, hasCover)
return enabled ? region : legacy
const current = region.usePalette(enabled === true ? uri : "", hasCover)
const legacy = useLegacyCoverPalette(enabled === false ? uri : "", hasCover)
if (enabled === undefined) {
return { palette: current.palette, settled: !uri || hasCover === false }
}
return enabled ? current : legacy
}
+21 -132
View File
@@ -1,29 +1,14 @@
import { useEffect, useMemo, useState } from "react"
import { getColors, type ImageColorsResult } from "react-native-image-colors"
import { createCoverPaletteSource } from "@/hooks/cover-palette-source"
import {
themeCoverPalette,
type CoverPalette,
} from "@/lib/cover-palette"
import { deriveCoverPalette, type LegacyCoverSwatches as CoverSwatches } from "@/lib/legacy-cover-palette"
import { readCache, writeCache } from "@/lib/persistent-cache"
import { useIsDark, useThemeColors } from "@/lib/theme"
import { withCoverImageSize } from "@/lib/urls"
// How long a screen holds its skeleton for the first extraction of a cover,
// so rows render once with final colors instead of flashing from the theme.
const COVER_PALETTE_WAIT_MS = 400
deriveCoverPalette,
type LegacyCoverSwatches as CoverSwatches,
} from "@/lib/legacy-cover-palette"
// image-colors substitutes this for swatches it couldn't find.
const MISSING = "#010203"
const swatchesByKey = new Map<string, CoverSwatches | null>()
const pending = new Map<string, Promise<CoverSwatches | null>>()
function cacheKey(colorSourceUri: string) {
return `palette:${colorSourceUri}`
}
function present(colors: (string | undefined)[]) {
return colors.filter(
(color): color is string => !!color && color.toLowerCase() !== MISSING
@@ -59,120 +44,24 @@ function toSwatches(result: ImageColorsResult): CoverSwatches | null {
}
}
function sameSwatches(
a: CoverSwatches | null | undefined,
b: CoverSwatches | null | undefined
) {
return a === b || JSON.stringify(a) === JSON.stringify(b)
}
function cachedSwatches(key: string): CoverSwatches | null | undefined {
if (swatchesByKey.has(key)) return swatchesByKey.get(key)
const cached = readCache<CoverSwatches>(cacheKey(key))
const legacy = createCoverPaletteSource<CoverSwatches>({
cacheKey: (colorSourceUri) => `palette:${colorSourceUri}`,
extract: (key) =>
getColors(key, {
fallback: MISSING,
cache: true,
key,
quality: "low",
pixelSpacing: 4,
}).then(toSwatches),
derive: deriveCoverPalette,
// Discard the background-only entries written by the tablet palette experiment.
return cached && (!Array.isArray(cached.text) || !Array.isArray(cached.accent))
? undefined
: cached
}
function extractSwatches(key: string) {
const inFlight = pending.get(key)
if (inFlight) return inFlight
const request = getColors(key, {
fallback: MISSING,
cache: true,
key,
quality: "low",
pixelSpacing: 4,
})
.then(toSwatches)
.catch(() => null)
.then((swatches) => {
swatchesByKey.set(key, swatches)
if (swatches) writeCache(cacheKey(key), swatches)
pending.delete(key)
return swatches
})
pending.set(key, request)
return request
}
isValidCache: (cached) =>
Array.isArray(cached.text) && Array.isArray(cached.accent),
})
/** Warm visible artwork colors before a detail page is pushed. */
export function prefetchLegacyCoverPalette(uri: string) {
const key = withCoverImageSize(uri, 64)
if (cachedSwatches(key) !== undefined) return
void extractSwatches(key)
}
export const prefetchLegacyCoverPalette = legacy.prefetch
/**
* Colors for a screen tinted by `uri`'s cover art. Extraction runs once per
* cover and is cached on device. Pass `hasCover` as `undefined` while it isn't
* known yet so extraction can start early.
*
* `settled` turns true once the palette is final or after
* `COVER_PALETTE_WAIT_MS`, whichever comes first.
*/
export function useLegacyCoverPalette(
uri: string,
hasCover: boolean | undefined
): { palette: CoverPalette; settled: boolean } {
const theme = useThemeColors()
const isDark = useIsDark()
const key = uri ? withCoverImageSize(uri, 64) : ""
const [resolved, setResolved] = useState(() => ({
key,
swatches: key ? cachedSwatches(key) : null,
}))
const [waitedKey, setWaitedKey] = useState<string | null>(null)
const swatches =
resolved.key === key ? resolved.swatches : key ? cachedSwatches(key) : null
useEffect(() => {
if (!key || hasCover === false) return
let cancelled = false
const known = cachedSwatches(key)
const show = (next: CoverSwatches | null) =>
setResolved((prev) =>
prev.key === key && sameSwatches(prev.swatches, next)
? prev
: { key, swatches: next }
)
if (known !== undefined && swatchesByKey.has(key)) {
show(known)
return
}
// Persisted swatches render immediately; refresh them in the background in
// case the cover changed.
const timer =
known === undefined
? setTimeout(
() => !cancelled && setWaitedKey(key),
COVER_PALETTE_WAIT_MS
)
: null
void extractSwatches(key).then((next) => {
if (!cancelled) show(next ?? known ?? null)
})
return () => {
cancelled = true
if (timer) clearTimeout(timer)
}
}, [hasCover, key])
const palette = useMemo(() => {
const fromArt =
hasCover !== false && swatches
? deriveCoverPalette(swatches, isDark)
: null
return fromArt ?? themeCoverPalette(theme, isDark)
}, [hasCover, isDark, swatches, theme])
return {
palette,
settled:
!key || hasCover === false || swatches !== undefined || waitedKey === key,
}
}
/** `react-native-image-colors` pipeline used when new artwork colors are off. */
export const useLegacyCoverPalette = legacy.usePalette
+21 -18
View File
@@ -3,8 +3,8 @@ import { useSyncExternalStore } from "react"
const STORAGE_KEY = "otunes:artwork-colors"
const listeners = new Set<() => void>()
let enabled = true
let loaded = false
// Undefined until storage has been read, so callers never act on a guess.
let enabled: boolean | undefined
let loading: Promise<void> | undefined
function notify() {
@@ -13,37 +13,40 @@ function notify() {
function load() {
return (loading ??= AsyncStorage.getItem(STORAGE_KEY)
.then((value) => value !== "false")
// Keep the default when local storage is unavailable.
.catch(() => true)
.then((value) => {
enabled = value !== "false"
})
.catch(() => {
// Keep the default when local storage is unavailable.
})
.finally(() => {
loaded = true
enabled = value
notify()
}))
}
void load()
function subscribe(listener: () => void) {
listeners.add(listener)
void load()
return () => {
listeners.delete(listener)
}
}
/** Device preference, kept outside account data and the disposable query cache. */
/**
* Device preference, kept outside account data and the disposable query cache.
* `undefined` until it has loaded.
*/
export function useArtworkColorsEnabled() {
return useSyncExternalStore(subscribe, () => loaded && enabled, () => false)
return useSyncExternalStore(
subscribe,
() => enabled,
() => undefined
)
}
export function useArtworkColorPreferenceLoaded() {
return useSyncExternalStore(subscribe, () => loaded, () => false)
}
export function artworkColorsEnabled() {
return loaded && enabled
/** Resolves with the preference once it has loaded. */
export async function loadArtworkColorsEnabled() {
await load()
return enabled ?? true
}
export async function setArtworkColorsEnabled(value: boolean) {
@@ -7,15 +7,11 @@ private enum HandoffState {
static var pending: [String: String]?
static var notify: (() -> Void)?
// app.config.ts declares the one `.media` type per build profile; iOS and
// Catalyst must publish the same string for Handoff to pair them. Other
// plugins (expo-router) append their own types, so match by suffix.
static let activityType =
(Bundle.main.object(forInfoDictionaryKey: "NSUserActivityTypes") as! [String])
.first { $0.hasSuffix(".media") }!
static var activityType: String {
"\(Bundle.main.bundleIdentifier!).media"
}
}
// ExpoAppSceneDelegate forwards scene(_:continue:) and cold-start activities here.
public final class HandoffAppDelegateSubscriber: ExpoAppDelegateSubscriber {
public func application(
_ application: UIApplication,
+7 -33
View File
@@ -1,24 +1,9 @@
const {
withEntitlementsPlist,
withPodfile,
withPodfileProperties,
withXcodeProject,
} = require("expo/config-plugins")
// Pods left at React Native's iOS 15.1 minimum map to a macOS target below what
// current Xcode accepts for Catalyst, so raise them to the app's own target.
const raisePodDeploymentTargets = `
app_target = installer.aggregate_targets.first.platform.deployment_target
installer.pods_project.targets.each do |target|
target.build_configurations.each do |build|
current = build.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
if current.nil? || Pod::Version.new(current) < app_target
build.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = app_target.to_s
end
end
end
`
// Opt in during prebuild so normal iOS builds keep their precompiled dependencies.
module.exports = (config) => {
config = withPodfileProperties(config, (config) => {
@@ -27,25 +12,15 @@ module.exports = (config) => {
return config
})
// macOS rejects expo-secure-store's Keychain writes without an access group,
// and requesting one makes Xcode provision the Mac app with a profile.
config = withEntitlementsPlist(config, (config) => {
config.modResults["keychain-access-groups"] = [
`$(AppIdentifierPrefix)${config.ios.bundleIdentifier}`,
]
return config
})
config = withPodfile(config, (config) => {
const flag = /:mac_catalyst_enabled\s*=>\s*(?:false|true)/
const postInstall = /(react_native_post_install\([\s\S]*?\n {4}\)\n)/
let contents = config.modResults.contents
if (!flag.test(contents) || !postInstall.test(contents)) {
const pattern = /:mac_catalyst_enabled\s*=>\s*(?:false|true)/
if (!pattern.test(config.modResults.contents)) {
throw new Error("Cannot enable Catalyst: Expo's Podfile template has changed")
}
contents = contents.replace(flag, ":mac_catalyst_enabled => true")
contents = contents.replace(postInstall, `$1${raisePodDeploymentTargets}`)
config.modResults.contents = contents
config.modResults.contents = config.modResults.contents.replace(
pattern,
":mac_catalyst_enabled => true"
)
return config
})
@@ -57,8 +32,7 @@ module.exports = (config) => {
for (const { value } of lists[target.buildConfigurationList].buildConfigurations) {
const settings = configurations[value].buildSettings
settings.SUPPORTS_MACCATALYST = "YES"
// Share the iOS bundle ID so Handoff and the App ID match across devices.
settings.DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = "NO"
settings.DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = "YES"
settings.TARGETED_DEVICE_FAMILY = '"1,2"'
}
return config
+1 -6
View File
@@ -44,12 +44,7 @@ import {
import { albumCoverUrl } from "@/lib/cover-urls"
import { sumDurationSeconds } from "@/lib/media-summary"
import { albumDetailSongs, rememberSongs } from "@/lib/song-cache"
function formatDuration(seconds: number): string {
const minutes = Math.floor(seconds / 60)
const remainingSeconds = seconds % 60
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`
}
import { formatDuration } from "@/lib/format-duration"
function formatMetadata(genre: string | null, year: number | null): string | null {
const parts: string[] = []
@@ -955,6 +955,7 @@ export function PlaybackProvider({ children }: { children: ReactNode }) {
if (!shouldContinuePlaying) {
autoPlayNextRef.current = false
isPlayingRef.current = false
audio.pause()
audio.currentTime = 0
currentTimeRef.current = 0
setCurrentTime(0)
+1 -7
View File
@@ -31,13 +31,7 @@ import { Slider } from "@/components/ui/slider"
import { useSidebar } from "@/components/ui/sidebar"
import { albumCoverUrl } from "@/lib/cover-urls"
import { cn } from "@/lib/utils"
function formatDuration(seconds: number): string {
const total = Math.max(0, Math.floor(seconds))
const minutes = Math.floor(total / 60)
const remainingSeconds = total % 60
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`
}
import { formatDuration } from "@/lib/format-duration"
export function PlayerBar() {
const {
+1 -6
View File
@@ -46,15 +46,10 @@ import {
TRACK_ROW_PADDING,
type SelectionRangePosition,
} from "@/lib/selection-range-styles"
import { formatDuration } from "@/lib/format-duration"
const ADD_TO_ANOTHER_PLAYLIST = "Add to Another Playlist"
function formatDuration(seconds: number): string {
const minutes = Math.floor(seconds / 60)
const remainingSeconds = seconds % 60
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`
}
function PlaylistSongCover({
song,
inRange,
+1 -6
View File
@@ -28,6 +28,7 @@ import {
} from "@/lib/selection-range-styles"
import { useSongs } from "@/lib/song-cache"
import { cn } from "@/lib/utils"
import { formatDuration } from "@/lib/format-duration"
const QUEUE_INITIAL_VISIBLE_COUNT = 100
const QUEUE_PAGE_SIZE = 50
@@ -40,12 +41,6 @@ type QueueItem = {
song: QueueSelectable | null
}
function formatDuration(seconds: number): string {
const minutes = Math.floor(seconds / 60)
const remainingSeconds = seconds % 60
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`
}
function toSelectableQueue(
songIds: Id<"songs">[],
songs: (BrowseSong | undefined)[]
+1 -6
View File
@@ -52,6 +52,7 @@ import {
TRACK_ROW_PADDING,
type SelectionRangePosition,
} from "@/lib/selection-range-styles"
import { formatDuration } from "@/lib/format-duration"
type SortKey = "title" | "artist" | "album"
type SortDirection = "asc" | "desc"
@@ -64,12 +65,6 @@ const nameColumnLayout =
"grid grid-cols-[2rem_2.5rem_minmax(0,10rem)] items-center gap-x-2"
const songColumnClass = "w-36 shrink-0 truncate"
function formatDuration(seconds: number): string {
const minutes = Math.floor(seconds / 60)
const remainingSeconds = seconds % 60
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`
}
function SongCover({
song,
inRange,
-15
View File
@@ -1,15 +0,0 @@
import { exportJWK, exportPKCS8, generateKeyPair } from "jose";
const keys = await generateKeyPair("RS256", {
extractable: true,
});
const privateKey = await exportPKCS8(keys.privateKey);
const publicKey = await exportJWK(keys.publicKey);
const jwks = JSON.stringify({ keys: [{ use: "sig", ...publicKey }] });
process.stdout.write(
`JWT_PRIVATE_KEY="${privateKey.trimEnd().replace(/\n/g, " ")}"`,
);
process.stdout.write("\n");
process.stdout.write(`JWKS=${jwks}`);
process.stdout.write("\n");
+1 -7
View File
@@ -1,9 +1,3 @@
/** Shared layout for album grids and carousel slides (gap-x-6 = 1.5rem). */
/** Shared layout for album grids. */
export const albumGridClassName =
"grid grid-cols-2 gap-x-6 gap-y-8 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6"
/** Slide width matches one cell of `albumGridClassName` inside an `@container` ancestor. */
export const albumGridCarouselSlideClassName =
"w-[calc((100cqw-1.5rem)/2)] shrink-0 grow-0 basis-auto pl-6 sm:w-[calc((100cqw-3rem)/3)] md:w-[calc((100cqw-4.5rem)/4)] lg:w-[calc((100cqw-6rem)/5)] xl:w-[calc((100cqw-7.5rem)/6)]"
export const albumGridCarouselContentClassName = "-ml-6"
-19
View File
@@ -1,19 +0,0 @@
import type {
BrowseAlbum,
BrowseAlbumDetail,
BrowseAlbumTrack,
BrowseArtist,
BrowsePlaylistDetail,
BrowsePlaylistOwner,
BrowseSong,
PlaylistSummary,
} from "@otunes/convex/types"
export type Artist = BrowseArtist
export type Album = BrowseAlbum
export type Song = BrowseSong
export type Playlist = PlaylistSummary
export type PlaylistOwner = BrowsePlaylistOwner
export type PlaylistDetail = BrowsePlaylistDetail
export type AlbumTrack = BrowseAlbumTrack
export type AlbumDetail = BrowseAlbumDetail
+7
View File
@@ -0,0 +1,7 @@
/** Formats seconds as `m:ss`, flooring fractional and negative input. */
export function formatDuration(seconds: number): string {
const total = Math.max(0, Math.floor(seconds))
const minutes = Math.floor(total / 60)
const remainingSeconds = total % 60
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`
}
+6 -14
View File
@@ -13,15 +13,15 @@ function mediaOrigin() {
return window.location.origin
}
export function albumShareUrl(albumId: string) {
function albumShareUrl(albumId: string) {
return `${mediaOrigin()}/album/${albumId}`
}
export function songShareUrl(albumId: string, songId: string) {
function songShareUrl(albumId: string, songId: string) {
return `${mediaOrigin()}/album/${albumId}?s=${songId}`
}
export function playlistShareUrl(
function playlistShareUrl(
playlistId: string,
options?: { isFavorites?: boolean }
) {
@@ -31,11 +31,11 @@ export function playlistShareUrl(
return `${mediaOrigin()}/playlist/${playlistId}`
}
export function artistShareUrl(artistId: string) {
function artistShareUrl(artistId: string) {
return `${mediaOrigin()}/artist/${artistId}`
}
export function mediaShareUrl(share: MediaShareContext) {
function mediaShareUrl(share: MediaShareContext) {
switch (share.type) {
case "album":
return albumShareUrl(share.albumId)
@@ -50,7 +50,7 @@ export function mediaShareUrl(share: MediaShareContext) {
}
}
export async function copyTextToClipboard(text: string) {
async function copyTextToClipboard(text: string) {
await navigator.clipboard.writeText(text)
toast.success("Link Copied")
}
@@ -63,10 +63,6 @@ export async function copyAlbumLink(albumId: string) {
await copyMediaShareLink({ type: "album", albumId })
}
export async function copySongLink(albumId: string, songId: string) {
await copyMediaShareLink({ type: "song", albumId, songId })
}
export async function copyPlaylistLink(
playlistId: string,
options?: { isFavorites?: boolean }
@@ -77,7 +73,3 @@ export async function copyPlaylistLink(
isFavorites: options?.isFavorites,
})
}
export async function copyArtistLink(artistId: string) {
await copyMediaShareLink({ type: "artist", artistId })
}
+4 -4
View File
@@ -46,7 +46,7 @@ export function getSelectionRangePositions(
return positions
}
export function selectionHighlightRadiusClass(
function selectionHighlightRadiusClass(
position: SelectionRangePosition
) {
switch (position) {
@@ -61,7 +61,7 @@ export function selectionHighlightRadiusClass(
}
}
export const TRACK_ROW_HIGHLIGHT_INSET = "absolute inset-y-0 left-2 right-2"
const TRACK_ROW_HIGHLIGHT_INSET = "absolute inset-y-0 left-2 right-2"
export function SelectionRangeHighlight({
position,
@@ -117,7 +117,7 @@ export const TRACK_ROW_PADDING = "pl-8 pr-10"
export const TRACK_LIST_CONTAINER = "mx-auto w-full max-w-9/10"
/** Full-width highlight for library song rows (no horizontal inset). */
export const SONGS_ROW_HIGHLIGHT_INSET = "absolute inset-0"
const SONGS_ROW_HIGHLIGHT_INSET = "absolute inset-0"
export function SongsSelectionRangeHighlight({
position,
@@ -162,7 +162,7 @@ export function isInSelectionRange(position: SelectionRangePosition) {
}
/** Full-width, square-corner highlights for the queue sidebar. */
export const QUEUE_ROW_HIGHLIGHT_INSET = "absolute inset-0"
const QUEUE_ROW_HIGHLIGHT_INSET = "absolute inset-0"
export function QueueSelectionRangeHighlight({
position,
-30
View File
@@ -1,30 +0,0 @@
import assert from "node:assert/strict"
import test from "node:test"
import { stationArtistId } from "./station-artist.ts"
const songs = [
{ id: "song-a", artist: { id: "artist-a" } },
{ id: "song-b", artist: { id: "artist-a" } },
{ id: "song-c", artist: { id: "artist-b" } },
]
test("a single song or a selection sharing one artist can create a station", () => {
assert.equal(stationArtistId(songs, new Set(["song-c"])), "artist-b")
assert.equal(
stationArtistId(songs, new Set(["song-a", "song-b"])),
"artist-a"
)
})
test("mixed artists cannot create a station", () => {
assert.equal(stationArtistId(songs, new Set(["song-a", "song-c"])), undefined)
})
test("empty or partially missing selections cannot create a station", () => {
assert.equal(stationArtistId(songs, new Set()), undefined)
assert.equal(
stationArtistId(songs, new Set(["song-a", "missing"])),
undefined
)
})
+27 -6
View File
@@ -46,22 +46,34 @@ stop() {
}
trap 'stop; exit 0' TERM INT
as_convex=(setpriv --reuid=convex --regid=convex --init-groups env HOME=/home/convex)
convex_cli() {
(
cd "$FUNCTIONS_DIR"
unset CONVEX_DEPLOYMENT CONVEX_DEPLOY_KEY
CONVEX_SELF_HOSTED_URL="$BACKEND_URL" \
CONVEX_SELF_HOSTED_ADMIN_KEY="$admin_key" \
"$NODE" node_modules/convex/bin/main.js "$@"
"${as_convex[@]}" "$NODE" node_modules/convex/bin/main.js "$@"
)
}
# Only root (the backend) may read the database and instance secret.
# Only the convex user may read the database and instance secret. Volumes from
# images that ran the backend as root are still owned by root, and
# read_credentials.sh generates a new instance secret if it cannot read the old one.
mkdir -p "$CONVEX_DATA_DIR"
find "$CONVEX_DATA_DIR" \( ! -user convex -o ! -group convex \) \
-exec chown -h convex:convex {} +
chmod 700 "$CONVEX_DATA_DIR"
# The web server writes HLS streams here and a Convex cron deletes stale ones.
mkdir -p /tmp/otunes
chown otunes:otunes /tmp/otunes
chmod -R g+rwX /tmp/otunes
chmod g+s,o-rwx /tmp/otunes
log "Starting Convex backend"
(cd /convex && umask 077 && exec ./run_backend.sh) &
(cd /convex && umask 077 && exec "${as_convex[@]}" ./run_backend.sh) &
backend_pid=$!
for _ in $(seq 1 120); do
@@ -80,17 +92,24 @@ if ! curl -fsS "$BACKEND_URL/version" >/dev/null 2>&1; then
exit 1
fi
admin_key=$(cd /convex && ./generate_admin_key.sh)
admin_key=$(cd /convex && umask 077 && "${as_convex[@]}" ./generate_admin_key.sh)
log "Deploying Convex functions"
convex_cli deploy --typecheck disable --codegen disable
if [ -z "$(convex_cli env get JWKS 2>/dev/null || true)" ]; then
# `env get` exits 0 with no output when the variable is unset. Any other failure
# must not be read as "no keys": regenerating them signs every user out.
if ! jwks=$(convex_cli env get JWKS); then
log "Could not read Convex Auth signing keys"
stop
exit 1
fi
if [ -z "$jwks" ]; then
log "Generating Convex Auth signing keys"
"$NODE" /opt/otunes/generate-auth-keys.mjs | convex_cli env set --force
fi
unset admin_key
unset admin_key jwks
log "Starting web server"
(
@@ -100,6 +119,8 @@ log "Starting web server"
# Server-side Convex helpers fall back to this at runtime. The browser bundle
# is built without it, so browsers still derive their own URL.
export NEXT_PUBLIC_CONVEX_URL="$BACKEND_URL"
# Lets the convex group member delete stale HLS streams.
umask 0002
exec setpriv --reuid=otunes --regid=otunes --init-groups \
"$NODE" apps/web/server.js
) &
+1 -5
View File
@@ -22,11 +22,7 @@
"pnpm": {
"patchedDependencies": {
"expo-audio@58.0.10": "patches/expo-audio@58.0.10.patch",
"react-native-screens@4.30.0": "patches/react-native-screens@4.30.0.patch",
"react-native-reanimated@4.7.1": "patches/react-native-reanimated@4.7.1.patch",
"expo-modules-core@58.0.24": "patches/expo-modules-core@58.0.24.patch",
"expo-file-system@58.0.10": "patches/expo-file-system@58.0.10.patch",
"@react-native-community/slider@5.2.1": "patches/@react-native-community__slider@5.2.1.patch"
"react-native-screens@4.30.0": "patches/react-native-screens@4.30.0.patch"
}
}
}
-7
View File
@@ -578,13 +578,6 @@ export const updateLibrary = action({
},
})
export const cleanupHlsStreams = internalAction({
args: {},
handler: async () => {
return await cleanHlsStreamsOlderThan(HLS_MAX_IDLE_MS)
},
})
export const adminCleanupHlsStreams = action({
args: {},
handler: async (ctx) => {
+1 -25
View File
@@ -1,11 +1,10 @@
import { getAuthUserId } from "@convex-dev/auth/server"
import { ConvexError, v } from "convex/values"
import { paginationOptsValidator } from "convex/server"
import type { Doc, Id } from "./_generated/dataModel"
import type { MutationCtx, QueryCtx } from "./_generated/server"
import { mutation, query } from "./_generated/server"
import type { BrowsePlaylistDetail, BrowsePlaylistSummary } from "./library"
import { browseSongsFromIds, paginateSlice } from "./library"
import { browseSongsFromIds } from "./library"
function uniqueIds<T extends string>(ids: T[]): T[] {
return [...new Set(ids)]
@@ -181,11 +180,6 @@ async function browseFavoritesSummaryHandler(
}
}
export const browseFavoritesSummary = query({
args: {},
handler: async (ctx) => browseFavoritesSummaryHandler(ctx),
})
export const browseFavoritesPlaylistDetail = query({
args: {},
handler: async (ctx): Promise<BrowsePlaylistDetail | null> => {
@@ -209,24 +203,6 @@ export const browseFavoritesPlaylistDetail = query({
},
})
export const browseFavoritesSongsPaginated = query({
args: { paginationOpts: paginationOptsValidator },
handler: async (ctx, args) => {
const summary = await browseFavoritesSummaryHandler(ctx)
if (!summary) {
return { page: [], isDone: true, continueCursor: "" }
}
const slice = paginateSlice(summary.songIds, args.paginationOpts)
const page = await browseSongsFromIds(ctx, slice.page)
return {
...slice,
page,
}
},
})
export const favoriteSong = mutation({
args: { songId: v.id("songs") },
handler: async (ctx, { songId }) => {
+1 -290
View File
@@ -8,7 +8,6 @@ import type { PaginationOptions, PaginationResult } from "convex/server"
import type {
BrowseAlbum,
BrowseAlbumDetail,
BrowseAlbumSummary,
BrowseAlbumTrack,
BrowseArtist,
BrowseArtistDetail,
@@ -26,7 +25,6 @@ import type {
export type {
BrowseAlbum,
BrowseAlbumDetail,
BrowseAlbumSummary,
BrowseAlbumTrack,
BrowseArtist,
BrowseArtistDetail,
@@ -224,7 +222,7 @@ export const browseArtists = query({
},
})
export function paginateSlice<T>(
function paginateSlice<T>(
items: T[],
paginationOpts: PaginationOptions
): PaginationResult<T> {
@@ -280,27 +278,6 @@ export const browseAlbumsPaginated = query({
},
})
export const browseSongs = query({
args: {},
handler: async (ctx) => {
const artistMap = await loadArtistMap(ctx)
const albums = await ctx.db.query("albums").collect()
const albumMap = new Map(albums.map((album) => [album._id, album]))
const songs = await ctx.db.query("songs").collect()
return songs
.flatMap((song) => {
const album = albumMap.get(song.album)
const albumArtist = artistMap.get(song.albumArtist)
if (!album || !albumArtist) {
return []
}
return [toBrowseSong(song, album, albumArtist)]
})
.sort((a, b) => a.title.localeCompare(b.title))
},
})
export const songsSortKeyValidator = v.union(
v.literal("title"),
v.literal("artist"),
@@ -545,72 +522,6 @@ export const browseAlbumDetail = query({
},
})
async function browseAlbumSummaryHandler(
ctx: QueryCtx,
albumId: Id<"albums">
): Promise<BrowseAlbumSummary | null> {
const album = await ctx.db.get("albums", albumId)
if (!album) {
return null
}
const artist = await ctx.db.get("artists", album.artist)
if (!artist) {
return null
}
const songs = await ctx.db
.query("songs")
.withIndex("by_album", (q) => q.eq("album", albumId))
.collect()
songs.sort(compareAlbumSongs)
const primarySong = songs[0]
return {
...toBrowseAlbum(album, artist),
year: primarySong?.year ?? null,
genre: primarySong?.genres[0] ?? null,
releaseDate: album.date,
hasLossless: songs.some((song) => "lossless" in song.files),
hasAtmos: songs.some((song) => "atmos" in song.files),
trackCount: songs.length,
}
}
export const browseAlbumSummary = query({
args: { id: v.id("albums") },
handler: async (ctx, args) => browseAlbumSummaryHandler(ctx, args.id),
})
export const browseAlbumTracksPaginated = query({
args: {
albumId: v.id("albums"),
paginationOpts: paginationOptsValidator,
},
handler: async (ctx, args) => {
const album = await ctx.db.get("albums", args.albumId)
if (!album) {
return { page: [], isDone: true, continueCursor: "" }
}
const artist = await ctx.db.get("artists", album.artist)
if (!artist) {
return { page: [], isDone: true, continueCursor: "" }
}
const songs = await ctx.db
.query("songs")
.withIndex("by_album", (q) => q.eq("album", args.albumId))
.collect()
songs.sort(compareAlbumSongs)
const tracks = songs.map((song) => toBrowseAlbumTrack(song, artist.name))
return paginateSlice(tracks, args.paginationOpts)
},
})
export const browseArtistDetail = query({
args: { id: v.id("artists") },
handler: async (ctx, args) => {
@@ -908,16 +819,6 @@ export const getAlbums = internalQuery({
},
})
export const getAlbumsInArtist = internalQuery({
args: { artistID: v.id("artists") },
handler: async (ctx, args) => {
return await ctx.db
.query("albums")
.withIndex("by_artist", (q) => q.eq("artist", args.artistID))
.collect()
},
})
export const getSongs = internalQuery({
args: {},
handler: async (ctx) => {
@@ -925,26 +826,6 @@ export const getSongs = internalQuery({
},
})
export const getSongsInArtist = internalQuery({
args: { artistID: v.id("artists") },
handler: async (ctx, args) => {
return await ctx.db
.query("songs")
.withIndex("by_artist", (q) => q.eq("albumArtist", args.artistID))
.collect()
},
})
export const getSongsInAlbum = internalQuery({
args: { albumID: v.id("albums") },
handler: async (ctx, args) => {
return await ctx.db
.query("songs")
.withIndex("by_album", (q) => q.eq("album", args.albumID))
.collect()
},
})
export const getArtist = query({
args: { id: v.id("artists") },
handler: async (ctx, args) => {
@@ -952,16 +833,6 @@ export const getArtist = query({
},
})
export const getArtistByName = internalQuery({
args: { name: v.string() },
handler: async (ctx, args) => {
return await ctx.db
.query("artists")
.withIndex("by_name", (q) => q.eq("name", args.name))
.first()
},
})
export const getAlbum = query({
args: { id: v.id("albums") },
handler: async (ctx, args) => {
@@ -969,28 +840,6 @@ export const getAlbum = query({
},
})
export const getAlbumByName = internalQuery({
args: { name: v.string() },
handler: async (ctx, args) => {
return await ctx.db
.query("albums")
.withIndex("by_name", (q) => q.eq("name", args.name))
.first()
},
})
export const getAlbumByAll = internalQuery({
args: { folder: v.string(), artist: v.id("artists") },
handler: async (ctx, args) => {
return await ctx.db
.query("albums")
.withIndex("by_all", (q) =>
q.eq("artist", args.artist).eq("folder", args.folder)
)
.first()
},
})
export const getPlaylist = query({
args: { id: v.id("playlists") },
handler: async (ctx, args) => {
@@ -1175,49 +1024,6 @@ export const intentCatalogPage = query({
},
})
export const getSongByName = internalQuery({
args: { name: v.string() },
handler: async (ctx, args) => {
return await ctx.db
.query("songs")
.withIndex("by_name", (q) => q.eq("name", args.name))
.first()
},
})
export const getSongByAll = internalQuery({
args: {
name: v.string(),
albumArtist: v.id("artists"),
album: v.id("albums"),
},
handler: async (ctx, args) => {
return await ctx.db
.query("songs")
.withIndex("by_all", (q) =>
q
.eq("name", args.name)
.eq("albumArtist", args.albumArtist)
.eq("album", args.album)
)
.first()
},
})
export const createArtist = internalMutation({
args: { name: v.string(), folder: v.string(), cover: v.nullable(v.string()) },
handler: async (ctx, args) => {
const existing = await ctx.db
.query("artists")
.withIndex("by_folder", (q) => q.eq("folder", args.folder))
.first()
if (existing) {
return existing._id
}
return await ctx.db.insert("artists", args)
},
})
export const createArtists = internalMutation({
args: {
artists: v.array(
@@ -1242,29 +1048,6 @@ export const createArtists = internalMutation({
},
})
export const createAlbum = internalMutation({
args: {
name: v.string(),
folder: v.string(),
cover: v.nullable(v.string()),
year: v.number(),
date: v.string(),
artist: v.id("artists"),
},
handler: async (ctx, args) => {
const existing = await ctx.db
.query("albums")
.withIndex("by_all", (q) =>
q.eq("artist", args.artist).eq("folder", args.folder)
)
.first()
if (existing) {
return existing._id
}
return await ctx.db.insert("albums", args)
},
})
export const createAlbums = internalMutation({
args: {
albums: v.array(
@@ -1294,50 +1077,6 @@ export const createAlbums = internalMutation({
},
})
export const updateAlbumName = internalMutation({
args: {
id: v.id("albums"),
newName: v.string(),
},
handler: async (ctx, args) => {
return await ctx.db.patch("albums", args.id, { name: args.newName })
},
})
export const createSong = internalMutation({
args: {
name: v.string(),
files: v.record(v.string(), v.string()),
album: v.id("albums"),
artist: v.union(v.string(), v.array(v.string())),
albumArtist: v.id("artists"),
length: v.number(),
diskNumber: v.nullable(v.number()),
track: v.number(),
year: v.number(),
date: v.string(),
genres: v.array(v.string()),
},
handler: async (ctx, args) => {
const existing = await ctx.db
.query("songs")
.withIndex("by_all", (q) =>
q
.eq("name", args.name)
.eq("albumArtist", args.albumArtist)
.eq("album", args.album)
)
.first()
if (existing) {
await ctx.db.patch(existing._id, {
files: { ...existing.files, ...args.files },
})
return existing._id
}
return await ctx.db.insert("songs", args)
},
})
export const createSongs = internalMutation({
args: {
songs: v.array(
@@ -1485,13 +1224,6 @@ export const purgeArtistsFromUsers = internalMutation({
},
})
export const removeArtist = internalMutation({
args: { id: v.id("artists") },
handler: async (ctx, args) => {
return await ctx.db.delete("artists", args.id)
},
})
export const removeArtists = internalMutation({
args: { ids: v.array(v.id("artists")) },
handler: async (ctx, args) => {
@@ -1501,13 +1233,6 @@ export const removeArtists = internalMutation({
},
})
export const removeAlbum = internalMutation({
args: { id: v.id("albums") },
handler: async (ctx, args) => {
return await ctx.db.delete("albums", args.id)
},
})
export const removeAlbums = internalMutation({
args: { ids: v.array(v.id("albums")) },
handler: async (ctx, args) => {
@@ -1517,20 +1242,6 @@ export const removeAlbums = internalMutation({
},
})
export const removeSong = internalMutation({
args: { id: v.id("songs") },
handler: async (ctx, args) => {
return await ctx.db.delete("songs", args.id)
},
})
export const changeFilesForSong = internalMutation({
args: { id: v.id("songs"), files: v.record(v.string(), v.string()) },
handler: async (ctx, args) => {
return await ctx.db.patch("songs", args.id, { files: args.files })
},
})
export const changeFilesForSongs = internalMutation({
args: {
songs: v.array(
+1 -654
View File
@@ -1,17 +1,9 @@
import { getAuthUserId } from "@convex-dev/auth/server"
import { paginationOptsValidator } from "convex/server"
import { ConvexError, v } from "convex/values"
import type { Doc, Id } from "./_generated/dataModel"
import type { MutationCtx } from "./_generated/server"
import { mutation, query } from "./_generated/server"
import type { QueueSong } from "./types"
import {
browseSongsFromIds,
compareAlbumSongs,
getSortedLibrarySongIds,
songsSortDirectionValidator,
songsSortKeyValidator,
} from "./library"
import { browseSongsFromIds } from "./library"
export type { HistorySong, QueueSong } from "./types"
@@ -59,35 +51,6 @@ async function recordRecentlyPlayedFromSong(
await recordRecentlyPlayed(ctx, userId, song.album)
}
async function recordPlaybackStart(
ctx: MutationCtx,
userId: Id<"users">,
options: {
songIds: Id<"songs">[]
playlistId?: Id<"playlists">
}
) {
if (options.songIds.length === 0) {
return
}
if (options.playlistId) {
await recordRecentlyPlayed(ctx, userId, options.playlistId)
return
}
await recordRecentlyPlayedFromSong(ctx, userId, options.songIds[0])
}
function shuffleArray<T>(items: T[]): T[] {
const next = [...items]
for (let i = next.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1))
;[next[i], next[j]] = [next[j], next[i]]
}
return next
}
async function requireAuth(ctx: MutationCtx) {
const userId = await getAuthUserId(ctx)
if (userId === null) {
@@ -96,54 +59,6 @@ async function requireAuth(ctx: MutationCtx) {
return userId
}
function uniqueSongIds(songIds: Id<"songs">[]) {
return [...new Set(songIds)]
}
function haveSameSongCounts(first: Id<"songs">[], second: Id<"songs">[]) {
if (first.length !== second.length) {
return false
}
const counts = new Map<Id<"songs">, number>()
for (const songId of first) {
counts.set(songId, (counts.get(songId) ?? 0) + 1)
}
for (const songId of second) {
const count = counts.get(songId)
if (!count) {
return false
}
if (count === 1) {
counts.delete(songId)
} else {
counts.set(songId, count - 1)
}
}
return counts.size === 0
}
function appendToQueueHistory(
history: Id<"songs">[],
songId: Id<"songs">
): Id<"songs">[] {
const next = [...history, songId]
if (next.length <= MAX_QUEUE_HISTORY) {
return next
}
return next.slice(next.length - MAX_QUEUE_HISTORY)
}
function appendManyToQueueHistory(
history: Id<"songs">[],
songIds: Id<"songs">[]
): Id<"songs">[] {
let next = history
for (const songId of songIds) {
next = appendToQueueHistory(next, songId)
}
return next
}
async function patchPlayback(
ctx: MutationCtx,
userId: Id<"users">,
@@ -168,26 +83,6 @@ async function patchPlayback(
return playbackRevision
}
async function setQueueState(
ctx: MutationCtx,
userId: Id<"users">,
patch: {
songQueue: Id<"songs">[]
shuffleEnabled?: boolean
currentSongProgress?: number
resetHistory?: boolean
}
) {
await patchPlayback(ctx, userId, {
songQueue: patch.songQueue,
currentSongProgress: patch.currentSongProgress ?? 0,
...(patch.resetHistory ? { queueHistory: [] } : {}),
...(patch.shuffleEnabled !== undefined
? { shuffleEnabled: patch.shuffleEnabled }
: {}),
})
}
export const getPlaybackState = query({
args: {},
handler: async (ctx) => {
@@ -264,554 +159,6 @@ export const recordPlay = mutation({
},
})
export const getQueueHistory = query({
args: {},
handler: async (ctx) => {
const userId = await getAuthUserId(ctx)
if (userId === null) {
return []
}
const user = await ctx.db.get(userId)
if (!user) {
return []
}
const songIds = user.queueHistory ?? []
const songs = await browseSongsFromIds(ctx, songIds)
return songs.map((song, index) => ({
...song,
historyIndex: index,
}))
},
})
export const getQueuePaginated = query({
args: {
paginationOpts: paginationOptsValidator,
queueVersion: v.string(),
},
handler: async (ctx, args) => {
const userId = await getAuthUserId(ctx)
if (userId === null) {
return { page: [], isDone: true, continueCursor: "" }
}
const user = await ctx.db.get(userId)
if (!user) {
return { page: [], isDone: true, continueCursor: "" }
}
const songIds = user.songQueue ?? []
const startIndex = args.paginationOpts.cursor
? Number.parseInt(args.paginationOpts.cursor, 10)
: 0
const endIndex = Math.min(
startIndex + args.paginationOpts.numItems,
songIds.length
)
const pageIds = songIds.slice(startIndex, endIndex)
const songs = await browseSongsFromIds(ctx, pageIds)
const page: QueueSong[] = songs.map((song, index) => ({
...song,
queueIndex: startIndex + index,
}))
const isDone = endIndex >= songIds.length
return {
page,
isDone,
continueCursor: isDone ? "" : String(endIndex),
}
},
})
export const playInOrder = mutation({
args: {
songIds: v.array(v.id("songs")),
playlistId: v.optional(v.id("playlists")),
},
handler: async (ctx, { songIds, playlistId }) => {
const userId = await requireAuth(ctx)
const queue = uniqueSongIds(songIds)
await setQueueState(ctx, userId, {
songQueue: queue,
shuffleEnabled: false,
resetHistory: true,
})
await recordPlaybackStart(ctx, userId, { songIds: queue, playlistId })
},
})
export const playShuffled = mutation({
args: {
songIds: v.array(v.id("songs")),
playlistId: v.optional(v.id("playlists")),
},
handler: async (ctx, { songIds, playlistId }) => {
const userId = await requireAuth(ctx)
const queue = shuffleArray(uniqueSongIds(songIds))
await setQueueState(ctx, userId, {
songQueue: queue,
shuffleEnabled: true,
resetHistory: true,
})
await recordPlaybackStart(ctx, userId, { songIds: queue, playlistId })
},
})
function orderSongsForInsert(
songIds: Id<"songs">[],
shuffleEnabled: boolean
): Id<"songs">[] {
return shuffleEnabled ? shuffleArray(songIds) : songIds
}
export const addToQueueNext = mutation({
args: { songIds: v.array(v.id("songs")) },
handler: async (ctx, { songIds }) => {
if (songIds.length === 0) {
return
}
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const toAdd = orderSongsForInsert(songIds, user.shuffleEnabled ?? false)
const queue = user.songQueue ?? []
if (queue.length === 0) {
await setQueueState(ctx, userId, { songQueue: toAdd })
return
}
const [current, ...rest] = queue
await setQueueState(ctx, userId, {
songQueue: [current, ...toAdd, ...rest],
})
},
})
export const addToQueueLast = mutation({
args: { songIds: v.array(v.id("songs")) },
handler: async (ctx, { songIds }) => {
if (songIds.length === 0) {
return
}
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const toAdd = orderSongsForInsert(songIds, user.shuffleEnabled ?? false)
const queue = user.songQueue ?? []
await setQueueState(ctx, userId, {
songQueue: queue.length === 0 ? toAdd : [...queue, ...toAdd],
})
},
})
export const playFromSong = mutation({
args: {
songId: v.id("songs"),
songIds: v.array(v.id("songs")),
},
handler: async (ctx, { songId, songIds }) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const index = songIds.indexOf(songId)
const rest = user.shuffleEnabled
? uniqueSongIds(songIds).filter((id) => id !== songId)
: index === -1
? []
: songIds.slice(index + 1)
const queueRest = user.shuffleEnabled ? shuffleArray(rest) : rest
await setQueueState(ctx, userId, {
songQueue: [songId, ...queueRest],
resetHistory: true,
})
await recordRecentlyPlayedFromSong(ctx, userId, songId)
},
})
async function albumSongIds(ctx: MutationCtx, albumId: Id<"albums">) {
const songs = await ctx.db
.query("songs")
.withIndex("by_album", (q) => q.eq("album", albumId))
.collect()
songs.sort(compareAlbumSongs)
return songs.map((song) => song._id)
}
async function orderedArtistSongIds(
ctx: MutationCtx,
artistId: Id<"artists">
) {
const songs = await ctx.db
.query("songs")
.withIndex("by_artist", (q) => q.eq("albumArtist", artistId))
.collect()
const albums = await ctx.db
.query("albums")
.withIndex("by_artist", (q) => q.eq("artist", artistId))
.collect()
const albumMap = new Map(albums.map((album) => [album._id, album]))
songs.sort((a, b) => {
const albumA = albumMap.get(a.album)?.name ?? ""
const albumB = albumMap.get(b.album)?.name ?? ""
if (albumA !== albumB) {
return albumA.localeCompare(albumB)
}
if (a.track !== b.track) {
return a.track - b.track
}
return a.name.localeCompare(b.name)
})
return songs.map((song) => song._id)
}
async function playCollection(
ctx: MutationCtx,
options: {
songIds: Id<"songs">[]
shuffled: boolean
playlistId?: Id<"playlists">
}
) {
const userId = await requireAuth(ctx)
const unique = uniqueSongIds(options.songIds)
if (unique.length === 0) {
return
}
const queue = options.shuffled ? shuffleArray(unique) : unique
await setQueueState(ctx, userId, {
songQueue: queue,
shuffleEnabled: options.shuffled,
resetHistory: true,
})
await recordPlaybackStart(ctx, userId, {
songIds: queue,
playlistId: options.playlistId,
})
}
export const playAlbum = mutation({
args: { albumId: v.id("albums") },
handler: async (ctx, { albumId }) => {
await playCollection(ctx, {
songIds: await albumSongIds(ctx, albumId),
shuffled: false,
})
},
})
export const playAlbumShuffled = mutation({
args: { albumId: v.id("albums") },
handler: async (ctx, { albumId }) => {
await playCollection(ctx, {
songIds: await albumSongIds(ctx, albumId),
shuffled: true,
})
},
})
export const playArtist = mutation({
args: { artistId: v.id("artists") },
handler: async (ctx, { artistId }) => {
await playCollection(ctx, {
songIds: await orderedArtistSongIds(ctx, artistId),
shuffled: false,
})
},
})
export const playArtistShuffled = mutation({
args: { artistId: v.id("artists") },
handler: async (ctx, { artistId }) => {
await playCollection(ctx, {
songIds: await orderedArtistSongIds(ctx, artistId),
shuffled: true,
})
},
})
export const playPlaylist = mutation({
args: { playlistId: v.id("playlists") },
handler: async (ctx, { playlistId }) => {
const playlist = await ctx.db.get("playlists", playlistId)
await playCollection(ctx, {
songIds: playlist?.songs ?? [],
shuffled: false,
playlistId,
})
},
})
export const playPlaylistShuffled = mutation({
args: { playlistId: v.id("playlists") },
handler: async (ctx, { playlistId }) => {
const playlist = await ctx.db.get("playlists", playlistId)
await playCollection(ctx, {
songIds: playlist?.songs ?? [],
shuffled: true,
playlistId,
})
},
})
export const playFromLibrarySong = mutation({
args: {
songId: v.id("songs"),
sortKey: songsSortKeyValidator,
sortDirection: songsSortDirectionValidator,
},
handler: async (ctx, { songId, sortKey, sortDirection }) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const songIds = await getSortedLibrarySongIds(ctx, sortKey, sortDirection)
const index = songIds.indexOf(songId)
const rest = user.shuffleEnabled
? uniqueSongIds(songIds).filter((id) => id !== songId)
: index === -1
? []
: songIds.slice(index + 1)
const queueRest = user.shuffleEnabled ? shuffleArray(rest) : rest
await setQueueState(ctx, userId, {
songQueue: [songId, ...queueRest],
resetHistory: true,
})
await recordRecentlyPlayedFromSong(ctx, userId, songId)
},
})
export const toggleShuffle = mutation({
args: {},
handler: async (ctx) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const shuffleEnabled = !(user.shuffleEnabled ?? false)
const queue = user.songQueue ?? []
if (shuffleEnabled && queue.length > 1) {
const [current, ...upNext] = queue
await patchPlayback(ctx, userId, {
shuffleEnabled: true,
songQueue: [current, ...shuffleArray(upNext)],
})
return
}
await patchPlayback(ctx, userId, { shuffleEnabled })
},
})
export const cycleRepeat = mutation({
args: {},
handler: async (ctx) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const current = user.repeatEnabled ?? "none"
const next =
current === "none" ? "once" : current === "once" ? "always" : "none"
await patchPlayback(ctx, userId, { repeatEnabled: next })
},
})
export const clearQueue = mutation({
args: {},
handler: async (ctx) => {
const userId = await requireAuth(ctx)
await patchPlayback(ctx, userId, {
songQueue: [],
queueHistory: [],
currentSongProgress: 0,
})
},
})
export const reorderQueue = mutation({
args: { songIds: v.array(v.id("songs")) },
handler: async (ctx, { songIds }) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const queue = user.songQueue ?? []
if (!haveSameSongCounts(queue, songIds)) {
throw new ConvexError("Invalid queue order")
}
const currentSongChanged = songIds.length > 0 && songIds[0] !== queue[0]
const history =
currentSongChanged && queue.length > 0
? appendToQueueHistory(user.queueHistory ?? [], queue[0])
: (user.queueHistory ?? [])
await patchPlayback(ctx, userId, {
songQueue: songIds,
queueHistory: history,
...(currentSongChanged ? { currentSongProgress: 0 } : {}),
})
},
})
export const skipToQueueIndex = mutation({
args: { index: v.number() },
handler: async (ctx, { index }) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const queue = user.songQueue ?? []
if (index < 0 || index >= queue.length || index === 0) {
return
}
const skipped = queue.slice(0, index)
const history = appendManyToQueueHistory(user.queueHistory ?? [], skipped)
await patchPlayback(ctx, userId, {
songQueue: queue.slice(index),
queueHistory: history,
currentSongProgress: 0,
})
},
})
export const skipNext = mutation({
args: {},
handler: async (ctx) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const queue = user.songQueue ?? []
if (queue.length === 0) {
return
}
const repeat = user.repeatEnabled ?? "none"
if (repeat === "once") {
await patchPlayback(ctx, userId, { currentSongProgress: 0 })
return
}
const [current, ...rest] = queue
if (repeat === "always") {
await patchPlayback(ctx, userId, {
songQueue: [...rest, current],
currentSongProgress: 0,
})
return
}
if (rest.length === 0) {
await patchPlayback(ctx, userId, {
songQueue: [current],
currentSongProgress: 0,
})
return
}
const history = appendToQueueHistory(user.queueHistory ?? [], current)
await patchPlayback(ctx, userId, {
songQueue: rest,
queueHistory: history,
currentSongProgress: 0,
})
},
})
export const skipPrevious = mutation({
args: {},
handler: async (ctx) => {
const userId = await requireAuth(ctx)
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
const queue = user.songQueue ?? []
const history = user.queueHistory ?? []
if (queue.length === 0) {
return
}
if (history.length === 0) {
await patchPlayback(ctx, userId, { currentSongProgress: 0 })
return
}
const [current, ...rest] = queue
const previous = history[history.length - 1]
const newHistory = history.slice(0, -1)
await patchPlayback(ctx, userId, {
songQueue: [previous, current, ...rest],
queueHistory: newHistory,
currentSongProgress: 0,
})
},
})
export const getSongProgress = query({
args: {},
handler: async (ctx) => {
const userId = await getAuthUserId(ctx)
if (userId === null) {
throw new ConvexError("User not logged in")
}
const user = await ctx.db.get(userId)
if (!user) {
throw new ConvexError("User not found")
}
return user.currentSongProgress ?? 0
},
})
export const updateSongProgress = mutation({
args: {
songId: v.id("songs"),
+3 -33
View File
@@ -1,4 +1,3 @@
import { paginationOptsValidator } from "convex/server"
import { getAuthUserId } from "@convex-dev/auth/server"
import { ConvexError, v } from "convex/values"
import type { Doc, Id } from "./_generated/dataModel"
@@ -11,7 +10,7 @@ import type {
PlaylistSummary,
SidebarPlaylists,
} from "./library"
import { browseSongsFromIds, compareAlbumSongs, paginateSlice } from "./library"
import { browseSongsFromIds, compareAlbumSongs } from "./library"
function toPlaylistSummary(
playlist: Doc<"playlists">,
@@ -109,23 +108,15 @@ async function browsePlaylistSummaryHandler(
}
}
export const browsePlaylistSummary = query({
args: { id: v.id("playlists") },
handler: async (ctx, args) => browsePlaylistSummaryHandler(ctx, args.id),
})
export const browsePlaylistDetail = query({
args: { id: v.id("playlists"), includeSongs: v.optional(v.boolean()) },
args: { id: v.id("playlists") },
handler: async (ctx, args): Promise<BrowsePlaylistDetail | null> => {
const summary = await browsePlaylistSummaryHandler(ctx, args.id)
if (!summary) {
return null
}
const songs =
(args.includeSongs ?? true)
? await browseSongsFromIds(ctx, summary.songIds)
: []
const songs = await browseSongsFromIds(ctx, summary.songIds)
return {
id: summary.id,
@@ -139,27 +130,6 @@ export const browsePlaylistDetail = query({
},
})
export const browsePlaylistSongsPaginated = query({
args: {
id: v.id("playlists"),
paginationOpts: paginationOptsValidator,
},
handler: async (ctx, args) => {
const playlist = await ctx.db.get("playlists", args.id)
if (!playlist) {
return { page: [], isDone: true, continueCursor: "" }
}
const slice = paginateSlice(playlist.songs, args.paginationOpts)
const page = await browseSongsFromIds(ctx, slice.page)
return {
...slice,
page,
}
},
})
export const listOwnedPlaylists = query({
args: {},
handler: async (ctx) => {
-4
View File
@@ -41,10 +41,6 @@ export type BrowseAlbumDetail = BrowseAlbum & {
tracks: BrowseAlbumTrack[]
}
export type BrowseAlbumSummary = Omit<BrowseAlbumDetail, "tracks"> & {
trackCount: number
}
export type BrowseArtistDetail = {
artist: BrowseArtist
albums: BrowseAlbum[]
@@ -1,14 +0,0 @@
diff --git a/ios/RNCSliderComponentView.mm b/ios/RNCSliderComponentView.mm
index aa9eb66a486a53762490ed720c5dd2f3a618a166..feb786dce183fff6ee326aa949ee90820cf80c96 100644
--- a/ios/RNCSliderComponentView.mm
+++ b/ios/RNCSliderComponentView.mm
@@ -24,7 +24,8 @@ using namespace facebook::react;
{
RNCSlider *slider;
UIImage *_image;
- BOOL _isSliding;
+ // Match the protocol's C++ bool; BOOL is signed char on x86_64 Catalyst.
+ bool _isSliding;
}
+ (ComponentDescriptorProvider)componentDescriptorProvider
-36
View File
@@ -1,36 +0,0 @@
diff --git a/ios/FileSystemModule.swift b/ios/FileSystemModule.swift
index 3bc078d127da36062b3df214ca92db981793cf12..dd1c89213260e21b3b3e4021cb8b8b7a5562f758 100644
--- a/ios/FileSystemModule.swift
+++ b/ios/FileSystemModule.swift
@@ -61,12 +61,21 @@ public final class FileSystemModule: Module {
}
#if os(iOS)
+ // canPreview is unavailable on Mac Catalyst; Quick Look reports unsupported files itself.
+ private func isPreviewable(_ item: QLPreviewItem) -> Bool {
+ #if targetEnvironment(macCatalyst)
+ return true
+ #else
+ return QLPreviewController.canPreview(item)
+ #endif
+ }
+
private func canPreview(file: FileSystemFile) throws -> Bool {
return try file.withCorrectTypeAndScopedAccess(permission: .read) {
guard file.exists else {
return false
}
- return QLPreviewController.canPreview(FileSystemPreviewItem(url: file.url, title: nil))
+ return isPreviewable(FileSystemPreviewItem(url: file.url, title: nil))
}
}
@@ -98,7 +107,7 @@ public final class FileSystemModule: Module {
throw FilePreviewFileNotFoundException(file.url)
}
let item = FileSystemPreviewItem(url: file.url, title: options?.title)
- guard QLPreviewController.canPreview(item) else {
+ guard isPreviewable(item) else {
throw FilePreviewUnsupportedException(file.url)
}
items.append(item)
-14
View File
@@ -1,14 +0,0 @@
diff --git a/ios/Core/Functions/AsyncFunctionDefinition.swift b/ios/Core/Functions/AsyncFunctionDefinition.swift
index 48ee585ff3c7c5f71eceda36a3384619834e6e6e..81ca378035663da2db30ab6007daa2546189507b 100644
--- a/ios/Core/Functions/AsyncFunctionDefinition.swift
+++ b/ios/Core/Functions/AsyncFunctionDefinition.swift
@@ -197,7 +197,8 @@ public class AsyncFunctionDefinition<Args, FirstArgType, ReturnType>: AnyAsyncFu
switch consume result {
case .success(let value):
promise.resolve(value)
- case .failure(let error as any Error):
+ // Swift 6.4.2 crashes lowering `let error as any Error` when compiled from source.
+ case .failure(let error):
promise.reject(error)
}
}
@@ -1,17 +0,0 @@
diff --git a/apple/reanimated/apple/REAReducedMotion.h b/apple/reanimated/apple/REAReducedMotion.h
index 5e22e18c7abe91f6ca6b1a58a5ff14a0f4e97647..7eabe9952af372982eb24595f999321b966996f7 100644
--- a/apple/reanimated/apple/REAReducedMotion.h
+++ b/apple/reanimated/apple/REAReducedMotion.h
@@ -1,10 +1,9 @@
#import <Foundation/Foundation.h>
+// Mac Catalyst can see AppKit too, but its Quickdraw types clash with React's.
#if __has_include(<UIKit/UIAccessibility.h>)
#import <UIKit/UIAccessibility.h>
-#endif
-
-#if __has_include(<AppKit/AppKit.h>)
+#elif __has_include(<AppKit/AppKit.h>)
#import <AppKit/AppKit.h>
#endif
+19 -31
View File
@@ -5,21 +5,9 @@ settings:
excludeLinksFromLockfile: false
patchedDependencies:
'@react-native-community/slider@5.2.1':
hash: 73deacaea9aae000a42050d343517da9e16e736e92a4fff3f61f81dba093a1c4
path: patches/@react-native-community__slider@5.2.1.patch
expo-audio@58.0.10:
hash: f7f102c0f17b28e763d828acd4f138d62809f5be576e316a13008c27e84968c5
path: patches/expo-audio@58.0.10.patch
expo-file-system@58.0.10:
hash: 8e68fafb653077a9ba74fe6c33a742af88e3299ce9470723f8c2ec97fe86073c
path: patches/expo-file-system@58.0.10.patch
expo-modules-core@58.0.24:
hash: c6fb26bed9ccbc12a81ff69ff56d98af89bacc0a3e44770950f9addf302657ed
path: patches/expo-modules-core@58.0.24.patch
react-native-reanimated@4.7.1:
hash: badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3
path: patches/react-native-reanimated@4.7.1.patch
react-native-screens@4.30.0:
hash: f79520899c22be4c5109cdeacfecb373c9116181b7be338d898899bfcf0b262d
path: patches/react-native-screens@4.30.0.patch
@@ -60,7 +48,7 @@ importers:
version: 2.2.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))
'@react-native-community/slider':
specifier: 5.2.1
version: 5.2.1(patch_hash=73deacaea9aae000a42050d343517da9e16e736e92a4fff3f61f81dba093a1c4)
version: 5.2.1
'@react-native/metro-config':
specifier: 0.88.0
version: 0.88.0(@babel/core@7.29.7)
@@ -111,7 +99,7 @@ importers:
version: 58.0.4(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
expo-router:
specifier: ~58.0.25
version: 58.0.25(8aefb264c8a29c1f36eeb4f71100c585)
version: 58.0.25(88877fdcf2b70b064063b5f62591c4ab)
expo-secure-store:
specifier: ~58.0.2
version: 58.0.2(expo@58.0.17)
@@ -147,7 +135,7 @@ importers:
version: 2.6.0(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-reanimated:
specifier: 4.7.1
version: 4.7.1(patch_hash=badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
version: 4.7.1(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-safe-area-context:
specifier: ~5.10.1
version: 5.10.1(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
@@ -162,7 +150,7 @@ importers:
version: 0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
sonner-native:
specifier: ^0.26.2
version: 0.26.4(9d30290a128c046b3db5fe7a9d46b005)
version: 0.26.4(5bf7f10fae9db32d21c97f8e81e5bd9a)
devDependencies:
'@types/node':
specifier: ^20
@@ -7550,7 +7538,7 @@ snapshots:
ws: 8.21.0
zod: 3.25.76
optionalDependencies:
expo-router: 58.0.25(8aefb264c8a29c1f36eeb4f71100c585)
expo-router: 58.0.25(88877fdcf2b70b064063b5f62591c4ab)
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
transitivePeerDependencies:
- '@expo/dom-webview'
@@ -7851,7 +7839,7 @@ snapshots:
react: 19.3.0
optionalDependencies:
'@expo/metro-runtime': 58.0.15(@expo/log-box@58.0.13)(expo@58.0.17)(react-dom@19.3.0(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
expo-router: 58.0.25(8aefb264c8a29c1f36eeb4f71100c585)
expo-router: 58.0.25(88877fdcf2b70b064063b5f62591c4ab)
react-dom: 19.3.0(react@19.3.0)
transitivePeerDependencies:
- supports-color
@@ -9235,7 +9223,7 @@ snapshots:
merge-options: 3.0.4
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
'@react-native-community/slider@5.2.1(patch_hash=73deacaea9aae000a42050d343517da9e16e736e92a4fff3f61f81dba093a1c4)': {}
'@react-native-community/slider@5.2.1': {}
'@react-native-masked-view/masked-view@0.3.2(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)':
dependencies:
@@ -11147,7 +11135,7 @@ snapshots:
expo-dev-menu-interface: 58.0.1(expo@58.0.17)
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
expo-file-system@58.0.10(patch_hash=8e68fafb653077a9ba74fe6c33a742af88e3299ce9470723f8c2ec97fe86073c)(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)):
expo-file-system@58.0.10(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)):
dependencies:
expo: 58.0.17(@babel/core@7.29.7)(@expo/dom-webview@58.0.2)(@expo/metro-runtime@58.0.15)(expo-router@58.0.25)(react-dom@19.3.0(react@19.3.0))(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)(typescript@6.0.3)
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
@@ -11222,7 +11210,7 @@ snapshots:
dependencies:
arg: 5.0.2
expo-modules-core@58.0.24(patch_hash=c6fb26bed9ccbc12a81ff69ff56d98af89bacc0a3e44770950f9addf302657ed)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0):
expo-modules-core@58.0.24(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0):
dependencies:
expo-modules-jsi: 58.0.17(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))
expo-modules-macros: 0.22.0
@@ -11252,7 +11240,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
expo-router@58.0.25(8aefb264c8a29c1f36eeb4f71100c585):
expo-router@58.0.25(88877fdcf2b70b064063b5f62591c4ab):
dependencies:
'@expo/log-box': 58.0.13(@expo/dom-webview@58.0.2)(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
'@expo/metro-runtime': 58.0.15(@expo/log-box@58.0.13)(expo@58.0.17)(react-dom@19.3.0(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
@@ -11272,7 +11260,7 @@ snapshots:
react-fast-compare: 3.2.2
react-is: 19.2.7
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
react-native-drawer-layout: 4.2.12(react-native-gesture-handler@3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native-reanimated@4.7.1(patch_hash=badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-drawer-layout: 4.2.12(react-native-gesture-handler@3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native-reanimated@4.7.1(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-safe-area-context: 5.10.1(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-screens: 4.30.0(patch_hash=f79520899c22be4c5109cdeacfecb373c9116181b7be338d898899bfcf0b262d)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
server-only: 0.0.1
@@ -11283,7 +11271,7 @@ snapshots:
expo-symbols: 58.0.4(expo-font@58.0.9)(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-dom: 19.3.0(react@19.3.0)
react-native-gesture-handler: 3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-reanimated: 4.7.1(patch_hash=badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-reanimated: 4.7.1(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-worklets: 0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
transitivePeerDependencies:
- '@types/react'
@@ -11362,12 +11350,12 @@ snapshots:
babel-preset-expo: 58.0.19(@babel/core@7.29.7)(@babel/runtime@7.29.7)(expo@58.0.17)(react-refresh@0.14.2)
expo-asset: 58.0.18(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)(typescript@6.0.3)
expo-constants: 58.0.13(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(typescript@6.0.3)
expo-file-system: 58.0.10(patch_hash=8e68fafb653077a9ba74fe6c33a742af88e3299ce9470723f8c2ec97fe86073c)(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))
expo-file-system: 58.0.10(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))
expo-font: 58.0.9(expo@58.0.17)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
expo-keep-awake: 58.0.3(expo@58.0.17)(react@19.3.0)
expo-modules-autolinking: 58.0.14(typescript@6.0.3)
expo-modules-cli: 0.3.1
expo-modules-core: 58.0.24(patch_hash=c6fb26bed9ccbc12a81ff69ff56d98af89bacc0a3e44770950f9addf302657ed)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
expo-modules-core: 58.0.24(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
pretty-format: 29.7.0
react: 19.3.0
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
@@ -12933,13 +12921,13 @@ snapshots:
react-is@19.2.7: {}
react-native-drawer-layout@4.2.12(react-native-gesture-handler@3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native-reanimated@4.7.1(patch_hash=badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0):
react-native-drawer-layout@4.2.12(react-native-gesture-handler@3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native-reanimated@4.7.1(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0):
dependencies:
color: 4.2.3
react: 19.3.0
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
react-native-gesture-handler: 3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-reanimated: 4.7.1(patch_hash=badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-reanimated: 4.7.1(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
use-latest-callback: 0.2.6(react@19.3.0)
react-native-gesture-handler@3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0):
@@ -12963,7 +12951,7 @@ snapshots:
react: 19.3.0
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
react-native-reanimated@4.7.1(patch_hash=badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0):
react-native-reanimated@4.7.1(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0):
dependencies:
react: 19.3.0
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
@@ -13525,12 +13513,12 @@ snapshots:
slugify@1.6.9: {}
sonner-native@0.26.4(9d30290a128c046b3db5fe7a9d46b005):
sonner-native@0.26.4(5bf7f10fae9db32d21c97f8e81e5bd9a):
dependencies:
react: 19.3.0
react-native: 0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0)
react-native-gesture-handler: 3.3.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-reanimated: 4.7.1(patch_hash=badfed6babfff7fa495b3a06ba8f324be0e5ff82cedb6084f9f4d1dad65984d3)(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-reanimated: 4.7.1(react-native-worklets@0.13.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0))(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-safe-area-context: 5.10.1(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-screens: 4.30.0(patch_hash=f79520899c22be4c5109cdeacfecb373c9116181b7be338d898899bfcf0b262d)(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)
react-native-svg: 15.16.0(react-native@0.88.0(@babel/core@7.29.7)(@react-native/metro-config@0.88.0(@babel/core@7.29.7))(@types/react@19.3.0)(react@19.3.0))(react@19.3.0)