smooth-player 1.0.4 → 2.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/types.d.ts CHANGED
@@ -1,4 +1,14 @@
1
1
  export type VisualizerMode = "spectrum" | "waveform" | "none";
2
+ export interface SpectrumStyleOptions {
3
+ dualLayer: boolean;
4
+ inverted: boolean;
5
+ barWidth: "thin" | "medium" | "large";
6
+ }
7
+ export interface WaveformStyleOptions {
8
+ doubleLine: boolean;
9
+ fill: boolean;
10
+ thickLine: boolean;
11
+ }
2
12
  export interface TrackMetadata {
3
13
  title?: string;
4
14
  artist?: string;
@@ -92,6 +102,15 @@ export interface PlaylistPanelController {
92
102
  getOpen: () => boolean;
93
103
  setOpen: (open: boolean) => void;
94
104
  }
105
+ export interface AudioDropMountOptions {
106
+ activeClassName?: string;
107
+ onDrop?: (payload: {
108
+ file: File;
109
+ track: AudioTrack;
110
+ tracks: AudioTrack[];
111
+ kind: "audio" | "playlist";
112
+ }) => void;
113
+ }
95
114
  export interface DebugPanelMountOptions {
96
115
  enabled?: boolean;
97
116
  panel: HTMLElement;
@@ -106,6 +125,12 @@ export interface DebugPanelMountOptions {
106
125
  }
107
126
  export interface StandardPlayerUIMountOptions {
108
127
  debugEnabled?: boolean;
128
+ enableAudioDrop?: boolean;
129
+ enableErrorNotice?: boolean;
130
+ showLogo?: boolean;
131
+ persistUserPreferences?: boolean;
132
+ userPreferencesCookieName?: string;
133
+ userPreferencesMaxAgeDays?: number;
109
134
  }
110
135
  export interface StandardPlayerUIController {
111
136
  destroy: () => void;
@@ -121,8 +146,11 @@ export interface SmoothPlayerOptions {
121
146
  initialVolume?: number;
122
147
  initialTrackIndex?: number;
123
148
  accentColor?: string;
149
+ backgroundColor?: string;
124
150
  analyzer?: AnalyzerOptions;
125
151
  visualizer?: VisualizerMode;
152
+ spectrumStyle?: Partial<SpectrumStyleOptions>;
153
+ waveformStyle?: Partial<WaveformStyleOptions>;
126
154
  initialShuffle?: boolean;
127
155
  durationFallback?: boolean;
128
156
  }
@@ -137,7 +165,10 @@ export interface PlaybackState {
137
165
  playlistTitle: string;
138
166
  playlistCount: number;
139
167
  visualizer: VisualizerMode;
168
+ spectrumStyle: SpectrumStyleOptions;
169
+ waveformStyle: WaveformStyleOptions;
140
170
  accentColor: string;
171
+ backgroundColor: string;
141
172
  shuffle: boolean;
142
173
  }
143
174
  export interface PlayerEvents {
package/dist/ui.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { SmoothPlayer } from "./SmoothPlayer.js";
2
2
  import { type StandardPlayerUIController, type StandardPlayerUIMountOptions } from "./types.js";
3
- export declare function mountStandardPlayerUI(player: SmoothPlayer, root: HTMLElement, options?: StandardPlayerUIMountOptions): StandardPlayerUIController;
3
+ export declare function mountPlayerUI(player: SmoothPlayer, root: HTMLElement, options?: StandardPlayerUIMountOptions): StandardPlayerUIController;