@behindthemusictree/app-kit-ui 37.1.0 → 39.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.
@@ -65,9 +65,15 @@ type HostPanelProps = Partial<Pick<GenreTreeProps, "obscuredInset" | "onNodeStyl
65
65
  type PlayableGenrePlaylistInput = CriteriaPlaylistMinimum & {
66
66
  criteria?: CriteriaPlaylistSimple["criteria"];
67
67
  };
68
+ /** The playlist loaded in the player; `selectionKey` is `genreMusicSelectionKey(selection).join()`, empty without a selection. */
69
+ type PlayingGenrePlaylist = {
70
+ uuid: string;
71
+ selectionKey: string;
72
+ };
68
73
  type GenrePlaylistPlayback = {
69
- playingNodeId: string | null;
70
- play: (genrePlaylist: PlayableGenrePlaylistInput) => Promise<void>;
74
+ playing: PlayingGenrePlaylist | null;
75
+ /** Plays `genrePlaylist`; `selection` overrides the default coverage of a reference genre. */
76
+ play: (genrePlaylist: PlayableGenrePlaylistInput, selection?: GenreMusicSelection) => Promise<void>;
71
77
  };
72
78
  type UseGenrePlaylistPlaybackOptions = {
73
79
  scope: Scope;
@@ -326,9 +332,8 @@ declare function GenreTreeView<O extends CriteriaOverview = CriteriaOverview>({
326
332
 
327
333
  type GenreActionBandProps = {
328
334
  node: GenreTreeNode;
329
- /** When set, shows the Play/Pause action. */
330
- onPlayPause?: () => void;
331
- isPlaying?: boolean;
335
+ /** Play buttons, shown first. */
336
+ playActions?: ReactNode;
332
337
  /** When set, shows the "Zoom in" action. */
333
338
  onZoomIn?: () => void;
334
339
  /** When set, shows the "Add" (sub-genre) action. */
@@ -346,7 +351,7 @@ type GenreActionBandProps = {
346
351
  shareTarget?: GenreTreeShareTarget;
347
352
  shareUrl?: string;
348
353
  };
349
- declare function GenreActionBand({ node, onPlayPause, isPlaying, onZoomIn, onAddChild, onRename, onChangeParent, side, onToggleSide, toggleSideDisabledReason, additionalActions, shareTarget, shareUrl, }: GenreActionBandProps): react.JSX.Element | null;
354
+ declare function GenreActionBand({ node, playActions, onZoomIn, onAddChild, onRename, onChangeParent, side, onToggleSide, toggleSideDisabledReason, additionalActions, shareTarget, shareUrl, }: GenreActionBandProps): react.JSX.Element | null;
350
355
 
351
356
  /** What the action band reads of a genre's playlist: enough to play it and to know whether it can be. */
352
357
  type PlayableGenrePlaylist = ((CriteriaPlaylistMinimum & {
@@ -354,7 +359,7 @@ type PlayableGenrePlaylist = ((CriteriaPlaylistMinimum & {
354
359
  }) | GenrePlaylistSummary) & {
355
360
  criteria?: CriteriaMinimum | null;
356
361
  };
357
- type GenreNodeActionBandProps = Omit<ComponentProps<typeof GenreActionBand>, "onPlayPause" | "isPlaying"> & {
362
+ type GenreNodeActionBandProps = Omit<ComponentProps<typeof GenreActionBand>, "playActions"> & {
358
363
  genrePlaylist: PlayableGenrePlaylist;
359
364
  playback: GenrePlaylistPlayback;
360
365
  };
@@ -365,7 +370,6 @@ type GenreInfoPanelBodyProps<O extends CriteriaOverview> = {
365
370
  family: ReactNode;
366
371
  genreUuid: GenreUuid;
367
372
  catalogue?: GenreCatalogueCounts;
368
- countsContext?: string;
369
373
  genrePlaylist: PlayableGenrePlaylist | null;
370
374
  wikidataId?: string | null;
371
375
  scope: Scope;
@@ -377,7 +381,7 @@ type GenreInfoPanelBodyProps<O extends CriteriaOverview> = {
377
381
  };
378
382
  /** The body of a genre's info panel: action band, then the genre's overview, family and tracks.
379
383
  * Shared by the tree's panel and the standalone GenreDetailPanel. */
380
- declare function GenreInfoPanelBody<O extends CriteriaOverview>({ toolbar, family, genreUuid, genrePlaylist, catalogue, countsContext, wikidataId, scope, getBackendBaseUrl, playback, band, extras, }: GenreInfoPanelBodyProps<O>): react.JSX.Element;
384
+ declare function GenreInfoPanelBody<O extends CriteriaOverview>({ toolbar, family, genreUuid, genrePlaylist, catalogue, wikidataId, scope, getBackendBaseUrl, playback, band, extras, }: GenreInfoPanelBodyProps<O>): react.JSX.Element;
381
385
 
382
386
  type GenreDetailPanelProps<O extends CriteriaOverview> = {
383
387
  genreUuid: GenreUuid;
@@ -23,8 +23,8 @@ import {
23
23
  useGenrePlaylistPlayback,
24
24
  useGenreRemoteSearchGroup,
25
25
  useSongSearchGroup
26
- } from "../chunk-57OI426Y.js";
27
- import "../chunk-DKQQLLMY.js";
26
+ } from "../chunk-2K2SQOUJ.js";
27
+ import "../chunk-2GH7CSCE.js";
28
28
  export {
29
29
  EntityDetailPanel,
30
30
  GenreDetailPanel,