@behindthemusictree/app-kit-ui 37.0.0 → 38.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.
@@ -488,4 +488,56 @@ interface RatingProps {
488
488
  }
489
489
  declare function Rating({ rating, handleChange }: RatingProps): react.JSX.Element;
490
490
 
491
- export { type ArtistSearchProps, GenreDetailPanel, type GenreDetailPanelProps, type GenreDetailSlots, type GenreFocusProps, GenreInfoPanelBody, type GenreInfoPanelBodyProps, GenreNodeActionBand, type GenrePlaylistPlayback, type GenrePlaylistTracksSlots, GenrePlaylistTreePerRoot, type GenrePlaylistTreePerRootProps, GenreSearch, type GenreSearchExtraGroup, type GenreSearchGroupsProps, type GenreSearchProps, type GenreTreeShareTarget, GenreTreeView, type GenreTreeViewProps, type GetGenreTreeShareUrl, type ParentChange, type PlayableGenrePlaylist, PlayerPanel, type PlayerPanelProps, Rating, type RatingProps, SEARCH_FAILED_STATUS, SearchBox, type SearchBoxProps, type SearchGroup, type SearchGroupItem, TrackItem, type TrackItemProps, TrackListSidebar, type TrackListSidebarProps, TrackPositionPlayPause, type TrackPositionPlayPauseProps, type UseGenrePlaylistPlaybackOptions, type UseGenreRemoteSearchGroupOptions, searchStatus, useArtistSearchGroup, useGenrePlaylistPlayback, useGenreRemoteSearchGroup, useSongSearchGroup };
491
+ /** How the song's genre is opened: through the loaded tree's playlists, or by the genre alone for a host without a tree. */
492
+ type SongGenreNavigation = {
493
+ /** Root-to-leaf playlists of a genre in the loaded tree; empty when the tree doesn't hold it. */
494
+ getGenrePath: (genre: CriteriaMinimum) => CriteriaPlaylistSimple[];
495
+ onSelectGenrePlaylist: (genrePlaylist: CriteriaPlaylistSimple) => void;
496
+ onSelectGenre?: never;
497
+ } | {
498
+ onSelectGenre: (genre: CriteriaMinimum) => void;
499
+ getGenrePath?: never;
500
+ onSelectGenrePlaylist?: never;
501
+ };
502
+
503
+ interface EntityPanelState {
504
+ uuid: string | null;
505
+ expanded: boolean;
506
+ onExpandedChange: (expanded: boolean) => void;
507
+ onClose: () => void;
508
+ }
509
+ type EntityPanelOptions = {
510
+ scope: Scope;
511
+ getBackendBaseUrl: () => string;
512
+ /** Artist requests go here when the host serves them from elsewhere; defaults to `getBackendBaseUrl`. */
513
+ getArtistBackendBaseUrl?: () => string;
514
+ getShareUrl?: GetGenreTreeShareUrl;
515
+ renderArtistLink: RenderArtistLink;
516
+ renderSongLink: RenderSongLink;
517
+ song: EntityPanelState;
518
+ artist: EntityPanelState;
519
+ } & SongGenreNavigation;
520
+ /** The song or artist detail overlay panel; a song takes precedence over an artist, undefined when neither is set. */
521
+ declare function useEntityPanel({ scope, getBackendBaseUrl, getArtistBackendBaseUrl, getShareUrl, renderArtistLink, renderSongLink, song, artist, ...navigation }: EntityPanelOptions): OverlayPanel | undefined;
522
+
523
+ type EntityDetailPanelProps = {
524
+ scope: Scope;
525
+ getBackendBaseUrl: () => string;
526
+ getArtistBackendBaseUrl?: () => string;
527
+ getShareUrl?: GetGenreTreeShareUrl;
528
+ songUuid: string | null;
529
+ onSongUuidChange: (uuid: string | null) => void;
530
+ artistUuid: string | null;
531
+ onArtistUuidChange: (uuid: string | null) => void;
532
+ /** Names render as buttons that open the artist by default. */
533
+ renderArtistLink?: RenderArtistLink;
534
+ /** Titles render as buttons that open the song by default. */
535
+ renderSongLink?: RenderSongLink;
536
+ collapsed?: boolean;
537
+ edgeTab?: ComponentProps<typeof DetailPanel>["edgeTab"];
538
+ } & SongGenreNavigation;
539
+ /** The song or artist detail in the shared left DetailPanel, for a host that has no genre tree. Renders nothing
540
+ * while neither is set; a song takes precedence over an artist. */
541
+ declare function EntityDetailPanel({ scope, getBackendBaseUrl, getArtistBackendBaseUrl, getShareUrl, songUuid, onSongUuidChange, artistUuid, onArtistUuidChange, renderArtistLink, renderSongLink, collapsed, edgeTab, ...navigation }: EntityDetailPanelProps): react.JSX.Element | null;
542
+
543
+ export { type ArtistSearchProps, EntityDetailPanel, type EntityDetailPanelProps, type EntityPanelOptions, type EntityPanelState, GenreDetailPanel, type GenreDetailPanelProps, type GenreDetailSlots, type GenreFocusProps, GenreInfoPanelBody, type GenreInfoPanelBodyProps, GenreNodeActionBand, type GenrePlaylistPlayback, type GenrePlaylistTracksSlots, GenrePlaylistTreePerRoot, type GenrePlaylistTreePerRootProps, GenreSearch, type GenreSearchExtraGroup, type GenreSearchGroupsProps, type GenreSearchProps, type GenreTreeShareTarget, GenreTreeView, type GenreTreeViewProps, type GetGenreTreeShareUrl, type ParentChange, type PlayableGenrePlaylist, PlayerPanel, type PlayerPanelProps, Rating, type RatingProps, SEARCH_FAILED_STATUS, SearchBox, type SearchBoxProps, type SearchGroup, type SearchGroupItem, type SongGenreNavigation, TrackItem, type TrackItemProps, TrackListSidebar, type TrackListSidebarProps, TrackPositionPlayPause, type TrackPositionPlayPauseProps, type UseGenrePlaylistPlaybackOptions, type UseGenreRemoteSearchGroupOptions, searchStatus, useArtistSearchGroup, useEntityPanel, useGenrePlaylistPlayback, useGenreRemoteSearchGroup, useSongSearchGroup };
@@ -1,4 +1,5 @@
1
1
  import {
2
+ EntityDetailPanel,
2
3
  GenreDetailPanel,
3
4
  GenreInfoPanelBody,
4
5
  GenreNodeActionBand,
@@ -18,12 +19,14 @@ import {
18
19
  TrackPositionPlayPause,
19
20
  searchStatus,
20
21
  useArtistSearchGroup,
22
+ useEntityPanel,
21
23
  useGenrePlaylistPlayback,
22
24
  useGenreRemoteSearchGroup,
23
25
  useSongSearchGroup
24
- } from "../chunk-FTYMRCJS.js";
25
- import "../chunk-DKQQLLMY.js";
26
+ } from "../chunk-F7H5XPWU.js";
27
+ import "../chunk-2GH7CSCE.js";
26
28
  export {
29
+ EntityDetailPanel,
27
30
  GenreDetailPanel,
28
31
  GenreInfoPanelBody,
29
32
  GenreNodeActionBand,
@@ -43,6 +46,7 @@ export {
43
46
  TrackPositionPlayPause,
44
47
  searchStatus,
45
48
  useArtistSearchGroup,
49
+ useEntityPanel,
46
50
  useGenrePlaylistPlayback,
47
51
  useGenreRemoteSearchGroup,
48
52
  useSongSearchGroup