@behindthemusictree/app-kit-ui 24.0.1 → 26.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-BPCFNBFO.js → chunk-KPWV4LEJ.js} +163 -75
- package/dist/chunk-KPWV4LEJ.js.map +1 -0
- package/dist/genre-tree/index.cjs +180 -92
- package/dist/genre-tree/index.cjs.map +1 -1
- package/dist/genre-tree/index.d.ts +21 -5
- package/dist/genre-tree/index.js +1 -1
- package/dist/index.cjs +180 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-BPCFNBFO.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { GenreTreeProps, FocusChangeReason, GenreTreeNode, GenreTreeAction, GenreTreeViewMode, GenreTreeViewport, ControlsOrientation, InfoPanelSections, InfoPanelBody, WheelZoomMode } from '@behindthemusictree/genre-tree-view';
|
|
5
5
|
export { ControlsOrientation, FocusChangeReason, GenreTreeAction, GenreTreeOutlineSkeleton, GenreTreeSkeleton, GenreTreeViewMode, GenreTreeViewSkeleton, GenreTreeViewSkeletonProps, GenreTreeViewport, GenreTreeWheelSkeleton } from '@behindthemusictree/genre-tree-view';
|
|
6
|
-
import { TrackBase, CriteriaOverview, CriteriaPlaylistSimple, ArtistSearchResult, CriteriaMinimum, RenderArtistLink } from '@behindthemusictree/app-kit/genre-tree';
|
|
6
|
+
import { TrackBase, CriteriaOverview, CriteriaPlaylistSimple, GenreUuid, ArtistSearchResult, CriteriaMinimum, RenderArtistLink } from '@behindthemusictree/app-kit/genre-tree';
|
|
7
7
|
import { Scope } from '@behindthemusictree/app-kit/transport';
|
|
8
8
|
|
|
9
9
|
type GenrePlaylistTracksSlots = {
|
|
@@ -22,8 +22,8 @@ type GenreDetailSlots<O extends CriteriaOverview> = {
|
|
|
22
22
|
renderEssentialTracks?: (overview: O) => ReactNode;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
/** Controlled
|
|
26
|
-
type InfoPanelCurationProps = Partial<Pick<GenreTreeProps, "
|
|
25
|
+
/** Controlled expand state and danger-zone slot of the info panel, plus the generic overlay panel, as typed by genre-tree-view. */
|
|
26
|
+
type InfoPanelCurationProps = Partial<Pick<GenreTreeProps, "renderDangerZone" | "expanded" | "onExpandedChange" | "collapsed" | "hideExpandButton" | "overlayPanel">>;
|
|
27
27
|
|
|
28
28
|
/** What a tree node's play button plays, and which node is the one currently playing. */
|
|
29
29
|
type GenrePlaylistPlayback = {
|
|
@@ -31,6 +31,8 @@ type GenrePlaylistPlayback = {
|
|
|
31
31
|
play: (genrePlaylist: CriteriaPlaylistSimple) => Promise<void>;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
type GenreTreeSizeMetric = "songs" | "views";
|
|
35
|
+
|
|
34
36
|
/** Pop-core focus is controlled-only: pass both props or neither. Ignored in outline mode. */
|
|
35
37
|
type GenreFocusProps = {
|
|
36
38
|
focusGenreUuid?: undefined;
|
|
@@ -46,6 +48,12 @@ type GenreFocusProps = {
|
|
|
46
48
|
onFocusGenreChange: (uuid: string | null, reason: FocusChangeReason) => void;
|
|
47
49
|
};
|
|
48
50
|
|
|
51
|
+
type ParentChange = {
|
|
52
|
+
genre: GenreUuid;
|
|
53
|
+
from: GenreUuid | null;
|
|
54
|
+
to: GenreUuid;
|
|
55
|
+
};
|
|
56
|
+
|
|
49
57
|
/** Artists are searched by default; picking one opens its panel (see `artistUuid`). */
|
|
50
58
|
type ArtistSearchProps = {
|
|
51
59
|
artistSearch: false;
|
|
@@ -65,6 +73,8 @@ type GenreTreeViewProps<O extends CriteriaOverview = CriteriaOverview> = {
|
|
|
65
73
|
handleGenreCreationAction: (parent: CriteriaMinimum | null) => void;
|
|
66
74
|
handleGenreRenameAction: (genre: CriteriaMinimum) => void;
|
|
67
75
|
getBackendBaseUrl: () => string;
|
|
76
|
+
/** Called after the Parent popup moved a genre; `from` and `to` are genre (criteria) uuids, `from` null for a root genre. */
|
|
77
|
+
onParentChanged?: (change: ParentChange) => void;
|
|
68
78
|
additionalActions?: (node: GenreTreeNode) => GenreTreeAction[];
|
|
69
79
|
/** Controlled view mode. When provided, the internal Stacked/Wheel toggle is not rendered — the consumer owns that UI. */
|
|
70
80
|
viewMode?: GenreTreeViewMode;
|
|
@@ -94,6 +104,10 @@ type GenreTreeViewProps<O extends CriteriaOverview = CriteriaOverview> = {
|
|
|
94
104
|
renderGenreDetailExtras?: (overview: O) => ReactNode;
|
|
95
105
|
/** Layout of the wheel/tree floating zoom/pop/fit controls. Defaults to "horizontal". */
|
|
96
106
|
controlsOrientation?: ControlsOrientation;
|
|
107
|
+
/** Controlled size metric of the wheel and pop-core nodes: song count or summed song views. Uncontrolled when omitted
|
|
108
|
+
* (starts on songs). The toggle is hidden while an artist filters the tree, which only has song counts. */
|
|
109
|
+
sizeMetric?: GenreTreeSizeMetric;
|
|
110
|
+
onSizeMetricChange?: (metric: GenreTreeSizeMetric) => void;
|
|
97
111
|
/** When set, artist names in the info panel's track list render through it (e.g. a router `Link`). In the artist
|
|
98
112
|
* panel, names otherwise render as buttons that switch the panel to that artist. */
|
|
99
113
|
renderArtistLink?: RenderArtistLink;
|
|
@@ -112,7 +126,7 @@ type GenreTreeViewProps<O extends CriteriaOverview = CriteriaOverview> = {
|
|
|
112
126
|
collapsed?: boolean;
|
|
113
127
|
onCollapsedChange?: (collapsed: boolean) => void;
|
|
114
128
|
};
|
|
115
|
-
declare function GenreTreeView<O extends CriteriaOverview = CriteriaOverview>({ scope, handleGenreCreationAction, handleGenreRenameAction, getBackendBaseUrl, additionalActions, viewMode: controlledViewMode, selectedNodeId: controlledSelectedNodeId, onSelectedNodeIdChange, defaultViewport, onViewportChange, readOnly, className, showDisplayOptions, showAddRoot, allowWheelRotation: controlledAllowWheelRotation, criteriaOverviewSchema, renderGenreDetailExtras, controlsOrientation, renderArtistLink, artistUuid: controlledArtistUuid, onArtistUuidChange, artistExpanded: controlledArtistExpanded, onArtistExpandedChange, artistSearch, onArtistSelect, artistSearchBaseUrl, renderSummary, renderEssentialTracks, renderSongLeading, renderSongActions, renderTracksToolbar,
|
|
129
|
+
declare function GenreTreeView<O extends CriteriaOverview = CriteriaOverview>({ scope, handleGenreCreationAction, handleGenreRenameAction, onParentChanged, getBackendBaseUrl, additionalActions, viewMode: controlledViewMode, selectedNodeId: controlledSelectedNodeId, onSelectedNodeIdChange, defaultViewport, onViewportChange, readOnly, className, showDisplayOptions, showAddRoot, allowWheelRotation: controlledAllowWheelRotation, criteriaOverviewSchema, renderGenreDetailExtras, controlsOrientation, sizeMetric: controlledSizeMetric, onSizeMetricChange, renderArtistLink, artistUuid: controlledArtistUuid, onArtistUuidChange, artistExpanded: controlledArtistExpanded, onArtistExpandedChange, artistSearch, onArtistSelect, artistSearchBaseUrl, renderSummary, renderEssentialTracks, renderSongLeading, renderSongActions, renderTracksToolbar, renderDangerZone, expanded, onExpandedChange, collapsed, onCollapsedChange, overlayPanel, placement, ...focus }: GenreTreeViewProps<O>): react.JSX.Element;
|
|
116
130
|
|
|
117
131
|
type GenrePlaylistTreePerRootProps<T extends TrackBase> = {
|
|
118
132
|
scope: Scope;
|
|
@@ -159,6 +173,8 @@ type GenreSearchExtraResults = {
|
|
|
159
173
|
}[];
|
|
160
174
|
/** Announced politely, e.g. "No artists found". */
|
|
161
175
|
status?: string;
|
|
176
|
+
/** Shows a spinner in place of the search icon while the host resolves this group. */
|
|
177
|
+
loading?: boolean;
|
|
162
178
|
};
|
|
163
179
|
type GenreSearchProps<T extends CriteriaPlaylistSimple = CriteriaPlaylistSimple> = {
|
|
164
180
|
genrePlaylists: T[];
|
|
@@ -243,4 +259,4 @@ interface PanelEdgeTabProps {
|
|
|
243
259
|
}
|
|
244
260
|
declare function PanelEdgeTab({ side, edge, center, controls, className }: PanelEdgeTabProps): react.JSX.Element | null;
|
|
245
261
|
|
|
246
|
-
export { type ArtistSearchProps, type GenreDetailSlots, type GenreFocusProps, type GenrePlaylistTracksSlots, GenrePlaylistTreePerRoot, type GenrePlaylistTreePerRootProps, GenreSearch, type GenreSearchExtraResults, type GenreSearchProps, GenreTreeView, type GenreTreeViewProps, type InfoPanelCurationProps, PanelEdgeTab, type PanelEdgeTabAction, type PanelEdgeTabProps, PlayerPanel, type PlayerPanelProps, Rating, type RatingProps, TrackItem, type TrackItemProps, TrackListSidebar, type TrackListSidebarProps, TrackPositionPlayPause, type TrackPositionPlayPauseProps };
|
|
262
|
+
export { type ArtistSearchProps, type GenreDetailSlots, type GenreFocusProps, type GenrePlaylistTracksSlots, GenrePlaylistTreePerRoot, type GenrePlaylistTreePerRootProps, GenreSearch, type GenreSearchExtraResults, type GenreSearchProps, GenreTreeView, type GenreTreeViewProps, type InfoPanelCurationProps, PanelEdgeTab, type PanelEdgeTabAction, type PanelEdgeTabProps, type ParentChange, PlayerPanel, type PlayerPanelProps, Rating, type RatingProps, TrackItem, type TrackItemProps, TrackListSidebar, type TrackListSidebarProps, TrackPositionPlayPause, type TrackPositionPlayPauseProps };
|