@behindthemusictree/app-kit-ui 43.0.0 → 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;
@@ -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;
@@ -23,7 +23,7 @@ import {
23
23
  useGenrePlaylistPlayback,
24
24
  useGenreRemoteSearchGroup,
25
25
  useSongSearchGroup
26
- } from "../chunk-UTUU463Q.js";
26
+ } from "../chunk-24PBIPA4.js";
27
27
  import "../chunk-2GH7CSCE.js";
28
28
  export {
29
29
  EntityDetailPanel,