@behindthemusictree/app-kit-ui 33.3.0 → 34.0.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.
@@ -3,7 +3,7 @@ import { ReactNode, ComponentProps } from 'react';
3
3
  import { z } from 'zod';
4
4
  import { GenreTreeProps, FocusChangeReason, GenreTreeNode, GenreTreeAction, GenreTreeViewMode, GenreTreeViewport, WheelZoomMode } from '@behindthemusictree/genre-tree-view';
5
5
  export { FocusChangeReason, GenreTreeAction, GenreTreeOutlineSkeleton, GenreTreeSkeleton, GenreTreeViewMode, GenreTreeViewSkeleton, GenreTreeViewSkeletonProps, GenreTreeViewport, GenreTreeWheelSkeleton } from '@behindthemusictree/genre-tree-view';
6
- import { TrackBase, CriteriaOverview, GenreUuid, CriteriaPlaylistMinimum, RenderArtistLink, RenderSongLink, CriteriaPlaylistSimple, ArtistSearchResult, SongSearchResult, UseGenreRemoteSearchOptions, GenreSearchResult, GenrePlaylistUuid, CriteriaMinimum } from '@behindthemusictree/app-kit/genre-tree';
6
+ import { TrackBase, CriteriaOverview, GenreUuid, CriteriaPlaylistMinimum, GenreMusicSelection, RenderArtistLink, RenderSongLink, CriteriaPlaylistSimple, ArtistSearchResult, SongSearchResult, UseGenreRemoteSearchOptions, GenreSearchResult, GenrePlaylistUuid, CriteriaMinimum, GenreCatalogueCounts, GenrePlaylistSummary } from '@behindthemusictree/app-kit/genre-tree';
7
7
  import { Scope } from '@behindthemusictree/app-kit/transport';
8
8
  import { DetailPanel } from '@behindthemusictree/ui';
9
9
 
@@ -25,6 +25,7 @@ type GenreDetailSlots<O extends CriteriaOverview> = {
25
25
  type GenreDetailExtrasProps<O extends CriteriaOverview> = GenreDetailSlots<O> & GenrePlaylistTracksSlots & {
26
26
  genreUuid: GenreUuid;
27
27
  genrePlaylist: CriteriaPlaylistMinimum;
28
+ selection?: GenreMusicSelection;
28
29
  wikidataId?: string | null;
29
30
  scope: Scope;
30
31
  getBackendBaseUrl: () => string;
@@ -60,11 +61,9 @@ type HostOverlayPanel = Omit<OverlayPanel, "expanded" | "onExpandedChange"> & {
60
61
  /** The host-owned detail panel's contract with the tree: the area the panel covers, and the node-style resolver the tree publishes back. */
61
62
  type HostPanelProps = Partial<Pick<GenreTreeProps, "obscuredInset" | "onNodeStyleResolverChange">>;
62
63
 
63
- /** What a play button needs of a playlist; `criteria` is only read when playing one artist's songs in the genre. */
64
64
  type PlayableGenrePlaylistInput = CriteriaPlaylistMinimum & {
65
65
  criteria?: CriteriaPlaylistSimple["criteria"];
66
66
  };
67
- /** What a tree node's play button plays, and which node is the one currently playing. */
68
67
  type GenrePlaylistPlayback = {
69
68
  playingNodeId: string | null;
70
69
  play: (genrePlaylist: PlayableGenrePlaylistInput) => Promise<void>;
@@ -72,7 +71,6 @@ type GenrePlaylistPlayback = {
72
71
  type UseGenrePlaylistPlaybackOptions = {
73
72
  scope: Scope;
74
73
  genrePlaylists: CriteriaPlaylistSimple[];
75
- /** When set, nodes play only this artist's songs in the genre's subtree instead of the whole genre playlist. */
76
74
  artist?: {
77
75
  uuid: string;
78
76
  name: string;
@@ -317,9 +315,9 @@ type GenreActionBandProps = {
317
315
  declare function GenreActionBand({ node, onPlayPause, isPlaying, onZoomIn, onAddChild, onRename, onChangeParent, side, onToggleSide, toggleSideDisabledReason, additionalActions, shareTarget, shareUrl, }: GenreActionBandProps): react.JSX.Element | null;
318
316
 
319
317
  /** What the action band reads of a genre's playlist: enough to play it and to know whether it can be. */
320
- type PlayableGenrePlaylist = CriteriaPlaylistMinimum & {
318
+ type PlayableGenrePlaylist = (CriteriaPlaylistMinimum & {
321
319
  tracksCount: number;
322
- };
320
+ }) | GenrePlaylistSummary;
323
321
  type GenreNodeActionBandProps = Omit<ComponentProps<typeof GenreActionBand>, "onPlayPause" | "isPlaying"> & {
324
322
  genrePlaylist: PlayableGenrePlaylist;
325
323
  playback: GenrePlaylistPlayback;
@@ -330,6 +328,7 @@ type GenreInfoPanelBodyProps<O extends CriteriaOverview> = {
330
328
  toolbar?: ReactNode;
331
329
  family: ReactNode;
332
330
  genreUuid: GenreUuid;
331
+ catalogue?: GenreCatalogueCounts;
333
332
  genrePlaylist: PlayableGenrePlaylist;
334
333
  wikidataId?: string | null;
335
334
  scope: Scope;
@@ -341,7 +340,7 @@ type GenreInfoPanelBodyProps<O extends CriteriaOverview> = {
341
340
  };
342
341
  /** The body of a genre's info panel: action band, then the genre's overview, family and tracks.
343
342
  * Shared by the tree's panel and the standalone GenreDetailPanel. */
344
- declare function GenreInfoPanelBody<O extends CriteriaOverview>({ toolbar, family, genreUuid, genrePlaylist, wikidataId, scope, getBackendBaseUrl, playback, band, extras, }: GenreInfoPanelBodyProps<O>): react.JSX.Element;
343
+ declare function GenreInfoPanelBody<O extends CriteriaOverview>({ toolbar, family, genreUuid, genrePlaylist, catalogue, wikidataId, scope, getBackendBaseUrl, playback, band, extras, }: GenreInfoPanelBodyProps<O>): react.JSX.Element;
345
344
 
346
345
  type GenreDetailPanelProps<O extends CriteriaOverview> = {
347
346
  genreUuid: GenreUuid;
@@ -21,7 +21,7 @@ import {
21
21
  useGenrePlaylistPlayback,
22
22
  useGenreRemoteSearchGroup,
23
23
  useSongSearchGroup
24
- } from "../chunk-QMELESFB.js";
24
+ } from "../chunk-A7OWCEIK.js";
25
25
  import "../chunk-DKQQLLMY.js";
26
26
  export {
27
27
  GenreDetailPanel,