@behindthemusictree/app-kit-ui 33.0.0 → 33.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GHFKICEB.js → chunk-2M4Q2IJU.js} +13 -7
- package/dist/chunk-2M4Q2IJU.js.map +1 -0
- package/dist/genre-tree/index.cjs +11 -5
- package/dist/genre-tree/index.cjs.map +1 -1
- package/dist/genre-tree/index.js +1 -1
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-GHFKICEB.js.map +0 -1
|
@@ -554,7 +554,7 @@ function GenreSearch({
|
|
|
554
554
|
onPick: handlePick,
|
|
555
555
|
status,
|
|
556
556
|
loading: loading ? "Searching\u2026" : void 0,
|
|
557
|
-
inputClassName: `h-[var(--layout-search-h,3rem)] ${onPrevious ? "pl-11" : "pl-6"} pr-20 text-base transition-[padding] duration-200 ease-out motion-reduce:transition-none bg-[var(--color-surface)] border-[var(--color-border)] rounded-full shadow-md`,
|
|
557
|
+
inputClassName: `h-[var(--layout-search-h,3rem)] ${onPrevious ? "pl-11" : "pl-6"} pr-20 text-base transition-[padding] duration-200 ease-out motion-reduce:transition-none bg-[var(--color-surface)] border-[var(--color-border)] rounded-full shadow-md focus-visible:ring-0`,
|
|
558
558
|
className: "genre-search-results z-40 rounded-xl shadow-md",
|
|
559
559
|
listClassName: "max-h-[min(20rem,50dvh)]",
|
|
560
560
|
optionClassName: "[@media(pointer:coarse)]:min-h-[var(--layout-touch-target)]"
|
|
@@ -953,7 +953,7 @@ import { z } from "zod";
|
|
|
953
953
|
import { FaPlay, FaPause } from "react-icons/fa";
|
|
954
954
|
import { PanelSection, RingLoader, Skeleton } from "@behindthemusictree/ui";
|
|
955
955
|
import { useSession } from "@behindthemusictree/app-kit/auth";
|
|
956
|
-
import { useFetchWrapper } from "@behindthemusictree/app-kit/transport";
|
|
956
|
+
import { usePlaybackContext, useFetchWrapper } from "@behindthemusictree/app-kit/transport";
|
|
957
957
|
import { PaginatedResponseSchema } from "@behindthemusictree/app-kit/transport";
|
|
958
958
|
import { parseWithLog } from "@behindthemusictree/app-kit/transport";
|
|
959
959
|
import { usePlayer as usePlayer4 } from "@behindthemusictree/app-kit/player";
|
|
@@ -1028,8 +1028,9 @@ function GenrePlaylistTracks({
|
|
|
1028
1028
|
const trackNoun = useTrackNoun();
|
|
1029
1029
|
const { uuid } = genrePlaylist;
|
|
1030
1030
|
const { fetch } = useFetchWrapper(getBackendBaseUrl);
|
|
1031
|
+
const playback = usePlaybackContext();
|
|
1031
1032
|
const { data, isPending, isError, refetch, hasNextPage, isFetchingNextPage, fetchNextPage } = useInfiniteQuery({
|
|
1032
|
-
queryKey: scope === "me" ? genrePlaylistQueryKeys.me.tracks(uuid) : artist ? [...libraryQueryKeys.reference.songs.byGenre(getBackendBaseUrl(), genreUuid), "artist", artist.uuid] : libraryQueryKeys.reference.songs.byGenre(getBackendBaseUrl(), genreUuid),
|
|
1033
|
+
queryKey: [...scope === "me" ? genrePlaylistQueryKeys.me.tracks(uuid) : artist ? [...libraryQueryKeys.reference.songs.byGenre(getBackendBaseUrl(), genreUuid), "artist", artist.uuid] : libraryQueryKeys.reference.songs.byGenre(getBackendBaseUrl(), genreUuid), ...playback.key ? [playback.key] : []],
|
|
1033
1034
|
queryFn: async ({ pageParam }) => {
|
|
1034
1035
|
if (scope === "me") return fetchGenrePlaylistTracksPage(uuid, scope, Number(pageParam));
|
|
1035
1036
|
const response = await fetch(
|
|
@@ -1044,7 +1045,7 @@ function GenrePlaylistTracks({
|
|
|
1044
1045
|
},
|
|
1045
1046
|
initialPageParam: scope === "me" ? 1 : "",
|
|
1046
1047
|
getNextPageParam: (lastPage) => lastPage.nextPage ?? void 0,
|
|
1047
|
-
enabled: scope !== "me" || sessionRestored && !!session?.accessToken
|
|
1048
|
+
enabled: playback.ready && (scope !== "me" || sessionRestored && !!session?.accessToken)
|
|
1048
1049
|
});
|
|
1049
1050
|
const [sentinel, setSentinel] = useState5(null);
|
|
1050
1051
|
useEffect3(() => {
|
|
@@ -3157,7 +3158,7 @@ function PlayerPanel({
|
|
|
3157
3158
|
renderArtistLink,
|
|
3158
3159
|
renderSongLink
|
|
3159
3160
|
}) {
|
|
3160
|
-
const { playerTrackObject } = usePlayer11();
|
|
3161
|
+
const { playerTrackObject, retryPlayback } = usePlayer11();
|
|
3161
3162
|
const { toggleTrackListSidebar, isTrackListSidebarVisible } = useTrackListSidebarVisibility();
|
|
3162
3163
|
const [lastLoadedTrackTitle, setLastLoadedTrackTitle] = useState9("");
|
|
3163
3164
|
const loadedTrackTitle = playerTrackObject?.track.title;
|
|
@@ -3220,7 +3221,12 @@ function PlayerPanel({
|
|
|
3220
3221
|
/* @__PURE__ */ jsx33("div", { className: "flex shrink-0 items-center justify-between gap-2 border-b border-zinc-800 p-2", children: /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate text-sm font-semibold", children: loadedTrackTitle || lastLoadedTrackTitle }) }),
|
|
3221
3222
|
/* @__PURE__ */ jsxs26("div", { className: "relative w-full shrink-0", children: [
|
|
3222
3223
|
/* @__PURE__ */ jsx33(PlayerVideoSurface, { className: "aspect-video w-full bg-black" }),
|
|
3223
|
-
playerTrackObject?.loadError && /* @__PURE__ */
|
|
3224
|
+
playerTrackObject?.loadError && /* @__PURE__ */ jsxs26("span", { className: "absolute bottom-2 left-2 right-2 text-xs text-red-400", children: [
|
|
3225
|
+
playerTrackObject.loadError,
|
|
3226
|
+
/* @__PURE__ */ jsx33("button", { type: "button", className: "ml-2 underline", onClick: () => {
|
|
3227
|
+
void retryPlayback();
|
|
3228
|
+
}, children: "Retry" })
|
|
3229
|
+
] })
|
|
3224
3230
|
] }),
|
|
3225
3231
|
/* @__PURE__ */ jsx33(PlayerControls, {})
|
|
3226
3232
|
] }),
|
|
@@ -3303,4 +3309,4 @@ export {
|
|
|
3303
3309
|
GenreTreeViewSkeleton2 as GenreTreeViewSkeleton,
|
|
3304
3310
|
GenreTreeOutlineSkeleton
|
|
3305
3311
|
};
|
|
3306
|
-
//# sourceMappingURL=chunk-
|
|
3312
|
+
//# sourceMappingURL=chunk-2M4Q2IJU.js.map
|