@behindthemusictree/app-kit-ui 42.0.2 → 43.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.
@@ -23,6 +23,8 @@ type GenreDetailSlots<O extends CriteriaOverview> = {
23
23
  renderEssentialTracks?: (overview: O) => ReactNode;
24
24
  };
25
25
  type GenreDetailExtrasProps<O extends CriteriaOverview> = GenreDetailSlots<O> & GenrePlaylistTracksSlots & {
26
+ /** The shell already renders the overview image as its cover. */
27
+ imageInCover?: boolean;
26
28
  genreUuid: GenreUuid;
27
29
  genrePlaylist: CriteriaPlaylistMinimum | null;
28
30
  genreName?: string;
@@ -48,6 +50,8 @@ interface OverlayPanel {
48
50
  /** Plain text, like a genre's name: it fills the search field, whose clear button closes the panel. */
49
51
  title: string;
50
52
  content: ReactNode;
53
+ /** Full-width cover shown behind the floating search field. Keep image credits in content. */
54
+ cover?: ReactNode;
51
55
  /** Second column, shown only while expanded. */
52
56
  extraContent?: ReactNode;
53
57
  expanded: boolean;
@@ -143,12 +147,14 @@ type SearchBoxProps = {
143
147
  clearLabel?: string;
144
148
  /** An action left of the text, e.g. a Previous button. */
145
149
  leading?: ReactNode;
150
+ trailingAction?: ReactNode;
151
+ trailingActionBreakpoint?: "sm" | "md";
146
152
  className?: string;
147
153
  /** Called when the input gains focus, e.g. to load an index lazily. */
148
154
  onFocus?: () => void;
149
155
  };
150
156
  /** A search pill over any number of result groups; picking an item calls that item's `onSelect`. */
151
- declare function SearchBox({ label, placeholder, value, onValueChange, groups, onPicked, onClear, clearLabel, leading, className, onFocus, }: SearchBoxProps): react.JSX.Element;
157
+ declare function SearchBox({ label, placeholder, value, onValueChange, groups, onPicked, onClear, clearLabel, leading, trailingAction, trailingActionBreakpoint, className, onFocus, }: SearchBoxProps): react.JSX.Element;
152
158
 
153
159
  declare function useArtistSearchGroup(getBaseUrl: () => string, text: string, onSelect: (artist: ArtistSearchResult) => void, enabled?: boolean): SearchGroup | undefined;
154
160
 
@@ -186,8 +192,12 @@ type GenreSearchProps<T extends CriteriaPlaylistSimple = CriteriaPlaylistSimple>
186
192
  extraGroups?: SearchGroup[];
187
193
  /** Called when the input gains focus. */
188
194
  onFocus?: () => void;
195
+ trailingAction?: ReactNode;
196
+ trailingActionBreakpoint?: "sm" | "md";
197
+ /** Below this breakpoint the search fills its available width. Defaults to md. */
198
+ fullWidthBreakpoint?: "sm" | "md";
189
199
  };
190
- declare function GenreSearch<T extends CriteriaPlaylistSimple = CriteriaPlaylistSimple>({ genrePlaylists, onSelect, selectedName, onClear, showClear, clearLabel, onPrevious, placeholder, onQueryChange, extraGroups, onFocus, }: GenreSearchProps<T>): react.JSX.Element;
200
+ declare function GenreSearch<T extends CriteriaPlaylistSimple = CriteriaPlaylistSimple>({ genrePlaylists, onSelect, selectedName, onClear, showClear, clearLabel, onPrevious, placeholder, onQueryChange, extraGroups, onFocus, trailingAction, trailingActionBreakpoint, fullWidthBreakpoint, }: GenreSearchProps<T>): react.JSX.Element;
191
201
 
192
202
  interface GenreSearchGroupsProps {
193
203
  query: string;
@@ -199,7 +209,7 @@ interface GenreSearchGroupsProps {
199
209
  type ParentChange = {
200
210
  genre: GenreUuid;
201
211
  from: GenreUuid | null;
202
- to: GenreUuid;
212
+ to: GenreUuid | null;
203
213
  };
204
214
 
205
215
  /** Identifies the detail-panel entity whose current host route should be shared. */
@@ -245,7 +255,7 @@ type GenreTreeViewProps<O extends CriteriaOverview = CriteriaOverview> = {
245
255
  handleGenreCreationAction: (parent: CriteriaMinimum | null) => void;
246
256
  handleGenreRenameAction: (genre: CriteriaMinimum) => void;
247
257
  getBackendBaseUrl: () => string;
248
- /** Called after the Parent popup moved a genre; `from` and `to` are genre (criteria) uuids, `from` null for a root genre. */
258
+ /** Called after the Parent popup moved a genre; `from` and `to` are genre (criteria) uuids, `from` null for a root genre, `to` null when the genre was made a root. */
249
259
  onParentChanged?: (change: ParentChange) => void;
250
260
  additionalActions?: (node: GenreTreeNode) => GenreTreeAction[];
251
261
  /** Controlled view mode. When provided, the internal Stacked/Wheel toggle is not rendered — the consumer owns that UI. */
@@ -290,6 +300,10 @@ type GenreTreeViewProps<O extends CriteriaOverview = CriteriaOverview> = {
290
300
  renderGenreDetailExtras?: (overview: O) => ReactNode;
291
301
  /** Host control displayed before the size metric in the floating controls. */
292
302
  floatingControlsLeading?: ReactNode;
303
+ /** Optional mobile action inside the search pill; e.g. the host's account menu. */
304
+ searchTrailingAction?: ReactNode;
305
+ /** Defaults to md. */
306
+ searchFullWidthBreakpoint?: "sm" | "md";
293
307
  /** Controlled size metric of the wheel and pop-core nodes: song count or summed song views. Uncontrolled when omitted
294
308
  * (starts on songs). The toggle is hidden while an artist filters the tree, which only has song counts. */
295
309
  sizeMetric?: GenreTreeSizeMetric;
@@ -338,7 +352,7 @@ type GenreTreeViewProps<O extends CriteriaOverview = CriteriaOverview> = {
338
352
  collapsed?: boolean;
339
353
  onCollapsedChange?: (collapsed: boolean) => void;
340
354
  };
341
- declare function GenreTreeView<O extends CriteriaOverview = CriteriaOverview>({ scope, handleGenreCreationAction, handleGenreRenameAction, onParentChanged, getBackendBaseUrl, additionalActions, viewMode: controlledViewMode, selectedGenreUuid: controlledSelectedGenreUuid, onSelectedGenreUuidChange, defaultViewport, viewportRestore, onViewportChange, readOnly, className, showDisplayOptions, showAddRoot, allowWheelRotation: controlledAllowWheelRotation, criteriaOverviewSchema, renderGenreDetailExtras, floatingControlsLeading, sizeMetric: controlledSizeMetric, onSizeMetricChange, renderArtistLink, artistUuid: controlledArtistUuid, onArtistUuidChange, artistExpanded: controlledArtistExpanded, onArtistExpandedChange, getShareUrl, extraSearchGroups, SearchGroups, onSearchQueryChange, onSearchFocus, artistSearch, onArtistSelect, artistSearchBaseUrl, songUuid: controlledSongUuid, onSongUuidChange, songExpanded: controlledSongExpanded, onSongExpandedChange, songSearch, onSongSelect, renderSongLink, renderPlaceLink, renderSummary, renderEssentialTracks, renderSongLeading, renderSongActions, renderTracksToolbar, renderDangerZone, expanded, onExpandedChange, collapsed, onCollapsedChange, overlayPanel, placement, ...focus }: GenreTreeViewProps<O>): react.JSX.Element;
355
+ declare function GenreTreeView<O extends CriteriaOverview = CriteriaOverview>({ scope, handleGenreCreationAction, handleGenreRenameAction, onParentChanged, getBackendBaseUrl, additionalActions, viewMode: controlledViewMode, selectedGenreUuid: controlledSelectedGenreUuid, onSelectedGenreUuidChange, defaultViewport, viewportRestore, onViewportChange, readOnly, className, showDisplayOptions, showAddRoot, allowWheelRotation: controlledAllowWheelRotation, criteriaOverviewSchema, renderGenreDetailExtras, floatingControlsLeading, searchTrailingAction, searchFullWidthBreakpoint, sizeMetric: controlledSizeMetric, onSizeMetricChange, renderArtistLink, artistUuid: controlledArtistUuid, onArtistUuidChange, artistExpanded: controlledArtistExpanded, onArtistExpandedChange, getShareUrl, extraSearchGroups, SearchGroups, onSearchQueryChange, onSearchFocus, artistSearch, onArtistSelect, artistSearchBaseUrl, songUuid: controlledSongUuid, onSongUuidChange, songExpanded: controlledSongExpanded, onSongExpandedChange, songSearch, onSongSelect, renderSongLink, renderPlaceLink, renderSummary, renderEssentialTracks, renderSongLeading, renderSongActions, renderTracksToolbar, renderDangerZone, expanded, onExpandedChange, collapsed, onCollapsedChange, overlayPanel, placement, ...focus }: GenreTreeViewProps<O>): react.JSX.Element;
342
356
 
343
357
  type GenreActionBandProps = {
344
358
  node: GenreTreeNode;
@@ -466,8 +480,6 @@ interface PlayerPanelProps {
466
480
  className?: string;
467
481
  /** Hidden via CSS, never unmounted, so the video keeps playing while the host hides the panel. */
468
482
  isVisible?: boolean;
469
- /** @deprecated The player no longer closes; its header action minimizes to video-only mode. */
470
- onClose?: () => void;
471
483
  /** Controlled extended state; uncontrolled when omitted. */
472
484
  expanded?: boolean;
473
485
  onExpandedChange?: (expanded: boolean) => void;
@@ -23,7 +23,7 @@ import {
23
23
  useGenrePlaylistPlayback,
24
24
  useGenreRemoteSearchGroup,
25
25
  useSongSearchGroup
26
- } from "../chunk-PVYUC2PN.js";
26
+ } from "../chunk-24PBIPA4.js";
27
27
  import "../chunk-2GH7CSCE.js";
28
28
  export {
29
29
  EntityDetailPanel,