@behindthemusictree/app-kit-ui 38.0.0 → 40.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.
@@ -43,9 +43,10 @@ type GenreDetailExtrasProps<O extends CriteriaOverview> = GenreDetailSlots<O> &
43
43
  family: ReactNode;
44
44
  };
45
45
 
46
- /** An artist or song detail the host renders in the shared DetailPanel in place of a genre's. */
46
+ /** A detail panel shown in the shared DetailPanel in place of a genre's: an artist, a song or a host page. */
47
47
  interface OverlayPanel {
48
- title: ReactNode;
48
+ /** Plain text, like a genre's name: it fills the search field, whose clear button closes the panel. */
49
+ title: string;
49
50
  content: ReactNode;
50
51
  /** Second column, shown only while expanded. */
51
52
  extraContent?: ReactNode;
@@ -65,9 +66,18 @@ type HostPanelProps = Partial<Pick<GenreTreeProps, "obscuredInset" | "onNodeStyl
65
66
  type PlayableGenrePlaylistInput = CriteriaPlaylistMinimum & {
66
67
  criteria?: CriteriaPlaylistSimple["criteria"];
67
68
  };
69
+ /** The playlist loaded in the player; `selectionKey` is `genreMusicSelectionKey(selection).join()`, empty without a selection. */
70
+ type PlayingGenrePlaylist = {
71
+ uuid: string;
72
+ selectionKey: string;
73
+ };
68
74
  type GenrePlaylistPlayback = {
69
- playingNodeId: string | null;
70
- play: (genrePlaylist: PlayableGenrePlaylistInput) => Promise<void>;
75
+ playing: PlayingGenrePlaylist | null;
76
+ /**
77
+ * Plays `genrePlaylist`; `selection` overrides the default coverage of a reference genre. Never rejects: connectivity
78
+ * errors reach the global popup through the backend request layer, any other failure is shown here with its real code.
79
+ */
80
+ play: (genrePlaylist: PlayableGenrePlaylistInput, selection?: GenreMusicSelection) => Promise<void>;
71
81
  };
72
82
  type UseGenrePlaylistPlaybackOptions = {
73
83
  scope: Scope;
@@ -316,7 +326,8 @@ type GenreTreeViewProps<O extends CriteriaOverview = CriteriaOverview> = {
316
326
  /** Controlled expanded state of the genre panel. Uncontrolled when omitted. */
317
327
  expanded?: boolean;
318
328
  onExpandedChange?: (expanded: boolean) => void;
319
- /** A host panel rendered in the detail panel's slot; it takes precedence over the genre, song and artist panels. */
329
+ /** A host panel rendered in the detail panel's slot; it takes precedence over the genre, song and artist panels.
330
+ * Like theirs, its title fills the search field, whose clear button closes it. */
320
331
  overlayPanel?: HostOverlayPanel;
321
332
  /** Hides the info panel behind its edge tab; uncontrolled when omitted. Only applies with `placement="regions"`. */
322
333
  collapsed?: boolean;
@@ -326,9 +337,8 @@ declare function GenreTreeView<O extends CriteriaOverview = CriteriaOverview>({
326
337
 
327
338
  type GenreActionBandProps = {
328
339
  node: GenreTreeNode;
329
- /** When set, shows the Play/Pause action. */
330
- onPlayPause?: () => void;
331
- isPlaying?: boolean;
340
+ /** Play buttons, shown first. */
341
+ playActions?: ReactNode;
332
342
  /** When set, shows the "Zoom in" action. */
333
343
  onZoomIn?: () => void;
334
344
  /** When set, shows the "Add" (sub-genre) action. */
@@ -346,7 +356,7 @@ type GenreActionBandProps = {
346
356
  shareTarget?: GenreTreeShareTarget;
347
357
  shareUrl?: string;
348
358
  };
349
- declare function GenreActionBand({ node, onPlayPause, isPlaying, onZoomIn, onAddChild, onRename, onChangeParent, side, onToggleSide, toggleSideDisabledReason, additionalActions, shareTarget, shareUrl, }: GenreActionBandProps): react.JSX.Element | null;
359
+ declare function GenreActionBand({ node, playActions, onZoomIn, onAddChild, onRename, onChangeParent, side, onToggleSide, toggleSideDisabledReason, additionalActions, shareTarget, shareUrl, }: GenreActionBandProps): react.JSX.Element | null;
350
360
 
351
361
  /** What the action band reads of a genre's playlist: enough to play it and to know whether it can be. */
352
362
  type PlayableGenrePlaylist = ((CriteriaPlaylistMinimum & {
@@ -354,7 +364,7 @@ type PlayableGenrePlaylist = ((CriteriaPlaylistMinimum & {
354
364
  }) | GenrePlaylistSummary) & {
355
365
  criteria?: CriteriaMinimum | null;
356
366
  };
357
- type GenreNodeActionBandProps = Omit<ComponentProps<typeof GenreActionBand>, "onPlayPause" | "isPlaying"> & {
367
+ type GenreNodeActionBandProps = Omit<ComponentProps<typeof GenreActionBand>, "playActions"> & {
358
368
  genrePlaylist: PlayableGenrePlaylist;
359
369
  playback: GenrePlaylistPlayback;
360
370
  };
@@ -365,7 +375,6 @@ type GenreInfoPanelBodyProps<O extends CriteriaOverview> = {
365
375
  family: ReactNode;
366
376
  genreUuid: GenreUuid;
367
377
  catalogue?: GenreCatalogueCounts;
368
- countsContext?: string;
369
378
  genrePlaylist: PlayableGenrePlaylist | null;
370
379
  wikidataId?: string | null;
371
380
  scope: Scope;
@@ -377,7 +386,7 @@ type GenreInfoPanelBodyProps<O extends CriteriaOverview> = {
377
386
  };
378
387
  /** The body of a genre's info panel: action band, then the genre's overview, family and tracks.
379
388
  * 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;
389
+ declare function GenreInfoPanelBody<O extends CriteriaOverview>({ toolbar, family, genreUuid, genrePlaylist, catalogue, wikidataId, scope, getBackendBaseUrl, playback, band, extras, }: GenreInfoPanelBodyProps<O>): react.JSX.Element;
381
390
 
382
391
  type GenreDetailPanelProps<O extends CriteriaOverview> = {
383
392
  genreUuid: GenreUuid;
@@ -427,8 +436,10 @@ type GenrePlaylistTreePerRootProps<T extends TrackBase> = {
427
436
  onViewportChange?: (viewport: GenreTreeViewport) => void;
428
437
  /** What node play buttons play; defaults to each node's whole genre playlist. */
429
438
  playback?: GenrePlaylistPlayback;
439
+ /** The open artist's footprint; nodes outside it are drawn muted. */
440
+ focusUuids?: ReadonlySet<string>;
430
441
  } & HostPanelProps;
431
- declare function GenrePlaylistTreePerRoot<T extends TrackBase>({ scope, className, rootUuid, genrePlaylistTreePerRoot, handleGenreCreationAction, handleGenreRenameAction, additionalActions, onNodeClick, onNodeHover, selectedNodeId, onSelectedNodeChange, readOnly, wheelZoom, defaultViewport, viewportRestore, onViewportChange, playback, ...hostPanel }: GenrePlaylistTreePerRootProps<T>): react.JSX.Element;
442
+ declare function GenrePlaylistTreePerRoot<T extends TrackBase>({ scope, className, rootUuid, genrePlaylistTreePerRoot, handleGenreCreationAction, handleGenreRenameAction, additionalActions, onNodeClick, onNodeHover, selectedNodeId, onSelectedNodeChange, readOnly, wheelZoom, defaultViewport, viewportRestore, onViewportChange, playback, focusUuids, ...hostPanel }: GenrePlaylistTreePerRootProps<T>): react.JSX.Element;
432
443
 
433
444
  interface TrackListSidebarProps<T extends TrackBase> {
434
445
  className?: string;
@@ -23,7 +23,7 @@ import {
23
23
  useGenrePlaylistPlayback,
24
24
  useGenreRemoteSearchGroup,
25
25
  useSongSearchGroup
26
- } from "../chunk-F7H5XPWU.js";
26
+ } from "../chunk-I2TEOHVG.js";
27
27
  import "../chunk-2GH7CSCE.js";
28
28
  export {
29
29
  EntityDetailPanel,