webamp 1.4.3-beta.5 → 2.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.
- package/README.md +20 -0
- package/built/types/js/Disposable.d.ts +11 -0
- package/built/types/js/actionCreators/equalizer.d.ts +8 -0
- package/built/types/js/actionCreators/files.d.ts +24 -0
- package/built/types/js/actionCreators/index.d.ts +22 -0
- package/built/types/js/actionCreators/media.d.ts +20 -0
- package/built/types/js/actionCreators/milkdrop.d.ts +13 -0
- package/built/types/js/actionCreators/playlist.d.ts +16 -0
- package/built/types/js/actionCreators/windows.d.ts +27 -0
- package/built/types/js/actionTypes.d.ts +87 -0
- package/built/types/js/components/App.d.ts +12 -0
- package/built/types/js/components/Balance.d.ts +8 -0
- package/built/types/js/components/Character.d.ts +9 -0
- package/built/types/js/components/CharacterString.d.ts +6 -0
- package/built/types/js/components/ClickedDiv.d.ts +8 -0
- package/built/types/js/components/ClipPaths.d.ts +8 -0
- package/built/types/js/components/ContextMenu.d.ts +31 -0
- package/built/types/js/components/ContextMenuTarget.d.ts +9 -0
- package/built/types/js/components/ContextMenuWrapper.d.ts +7 -0
- package/built/types/js/components/Css.d.ts +7 -0
- package/built/types/js/components/DropTarget.d.ts +13 -0
- package/built/types/js/components/EqualizerWindow/Band.d.ts +14 -0
- package/built/types/js/components/EqualizerWindow/EqAuto.d.ts +3 -0
- package/built/types/js/components/EqualizerWindow/EqGraph.d.ts +2 -0
- package/built/types/js/components/EqualizerWindow/EqOn.d.ts +2 -0
- package/built/types/js/components/EqualizerWindow/EqTitleButtons.d.ts +1 -0
- package/built/types/js/components/EqualizerWindow/EqualizerShade.d.ts +2 -0
- package/built/types/js/components/EqualizerWindow/PresetsContextMenu.d.ts +2 -0
- package/built/types/js/components/EqualizerWindow/index.d.ts +2 -0
- package/built/types/js/components/EqualizerWindow/spline.d.ts +1 -0
- package/built/types/js/components/FFTNullsoft.d.ts +16 -0
- package/built/types/js/components/FocusTarget.d.ts +9 -0
- package/built/types/js/components/Fullscreen.d.ts +8 -0
- package/built/types/js/components/GenWindow/index.d.ts +14 -0
- package/built/types/js/components/MainWindow/ActionButtons.d.ts +3 -0
- package/built/types/js/components/MainWindow/Close.d.ts +3 -0
- package/built/types/js/components/MainWindow/ClutterBar.d.ts +3 -0
- package/built/types/js/components/MainWindow/Eject.d.ts +3 -0
- package/built/types/js/components/MainWindow/EqToggleButton.d.ts +3 -0
- package/built/types/js/components/MainWindow/Kbps.d.ts +3 -0
- package/built/types/js/components/MainWindow/Khz.d.ts +3 -0
- package/built/types/js/components/MainWindow/MainBalance.d.ts +4 -0
- package/built/types/js/components/MainWindow/MainContextMenu.d.ts +7 -0
- package/built/types/js/components/MainWindow/MainVolume.d.ts +3 -0
- package/built/types/js/components/MainWindow/Marquee.d.ts +7 -0
- package/built/types/js/components/MainWindow/Minimize.d.ts +3 -0
- package/built/types/js/components/MainWindow/MonoStereo.d.ts +3 -0
- package/built/types/js/components/MainWindow/PlaylistToggleButton.d.ts +3 -0
- package/built/types/js/components/MainWindow/Position.d.ts +3 -0
- package/built/types/js/components/MainWindow/Repeat.d.ts +3 -0
- package/built/types/js/components/MainWindow/Shade.d.ts +3 -0
- package/built/types/js/components/MainWindow/Shuffle.d.ts +3 -0
- package/built/types/js/components/MainWindow/Time.d.ts +3 -0
- package/built/types/js/components/MainWindow/index.d.ts +8 -0
- package/built/types/js/components/MilkdropWindow/Background.d.ts +7 -0
- package/built/types/js/components/MilkdropWindow/Desktop.d.ts +7 -0
- package/built/types/js/components/MilkdropWindow/MilkdropContextMenu.d.ts +6 -0
- package/built/types/js/components/MilkdropWindow/PresetOverlay.d.ts +7 -0
- package/built/types/js/components/MilkdropWindow/Visualizer.d.ts +7 -0
- package/built/types/js/components/MilkdropWindow/index.d.ts +5 -0
- package/built/types/js/components/MiniTime.d.ts +2 -0
- package/built/types/js/components/OptionsContextMenu.d.ts +2 -0
- package/built/types/js/components/PlaybackContextMenu.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/AddMenu.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/ListMenu.d.ts +1 -0
- package/built/types/js/components/PlaylistWindow/MiscMenu.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/MiscOptionsContextMenu.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/PlaylistActionArea.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/PlaylistMenu.d.ts +8 -0
- package/built/types/js/components/PlaylistWindow/PlaylistMenuEntry.d.ts +7 -0
- package/built/types/js/components/PlaylistWindow/PlaylistResizeTarget.d.ts +5 -0
- package/built/types/js/components/PlaylistWindow/PlaylistScrollBar.d.ts +1 -0
- package/built/types/js/components/PlaylistWindow/PlaylistShade.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/RemoveMenu.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/RunningTimeDisplay.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/SelectionMenu.d.ts +1 -0
- package/built/types/js/components/PlaylistWindow/SortContextMenu.d.ts +1 -0
- package/built/types/js/components/PlaylistWindow/TrackCell.d.ts +9 -0
- package/built/types/js/components/PlaylistWindow/TrackList.d.ts +2 -0
- package/built/types/js/components/PlaylistWindow/TrackTitle.d.ts +6 -0
- package/built/types/js/components/PlaylistWindow/index.d.ts +5 -0
- package/built/types/js/components/ResizeTarget.d.ts +11 -0
- package/built/types/js/components/Skin.d.ts +1 -0
- package/built/types/js/components/SkinsContextMenu.d.ts +2 -0
- package/built/types/js/components/VerticalSlider.d.ts +15 -0
- package/built/types/js/components/Vis.d.ts +5 -0
- package/built/types/js/components/VisPainter.d.ts +147 -0
- package/built/types/js/components/Volume.d.ts +8 -0
- package/built/types/js/components/WinampButton.d.ts +23 -0
- package/built/types/js/components/WindowManager.d.ts +8 -0
- package/built/types/js/constants.d.ts +38 -0
- package/built/types/js/emitter.d.ts +9 -0
- package/built/types/js/fileUtils.d.ts +15 -0
- package/built/types/js/hooks.d.ts +21 -0
- package/built/types/js/hotkeys.d.ts +2 -0
- package/built/types/js/loadQueue.d.ts +9 -0
- package/built/types/js/marqueeUtils.d.ts +6 -0
- package/built/types/js/marqueeUtils.test.d.ts +1 -0
- package/built/types/js/media/StereoBalanceNode.d.ts +3 -0
- package/built/types/js/media/elementSource.d.ts +26 -0
- package/built/types/js/media/index.d.ts +43 -0
- package/built/types/js/mediaMiddleware.d.ts +4 -0
- package/built/types/js/playlistHtml.d.ts +10 -0
- package/built/types/js/reducers/display.d.ts +26 -0
- package/built/types/js/reducers/equalizer.d.ts +10 -0
- package/built/types/js/reducers/index.d.ts +4 -0
- package/built/types/js/reducers/media.d.ts +14 -0
- package/built/types/js/reducers/milkdrop.d.ts +15 -0
- package/built/types/js/reducers/network.d.ts +6 -0
- package/built/types/js/reducers/playlist.d.ts +9 -0
- package/built/types/js/reducers/settings.d.ts +6 -0
- package/built/types/js/reducers/tracks.d.ts +7 -0
- package/built/types/js/reducers/tracks.test.d.ts +1 -0
- package/built/types/js/reducers/userInput.d.ts +9 -0
- package/built/types/js/reducers/windows.d.ts +34 -0
- package/built/types/js/regionParser.d.ts +6 -0
- package/built/types/js/resizeUtils.d.ts +23 -0
- package/built/types/js/resizeUtils.test.d.ts +1 -0
- package/built/types/js/selectors.d.ts +184 -0
- package/built/types/js/selectors.test.d.ts +1 -0
- package/built/types/js/serialization.test.d.ts +1 -0
- package/built/types/js/serializedStates/v1Types.d.ts +64 -0
- package/built/types/js/skinParser.d.ts +12 -0
- package/built/types/js/skinParserUtils.d.ts +19 -0
- package/built/types/js/skinSelectors.d.ts +6 -0
- package/built/types/js/skinSprites.d.ts +17 -0
- package/built/types/js/snapUtils.d.ts +32 -0
- package/built/types/js/snapUtils.test.d.ts +1 -0
- package/built/types/js/spinParserUtils.test.d.ts +1 -0
- package/built/types/js/store.d.ts +4 -0
- package/built/types/js/trackUtils.d.ts +3 -0
- package/built/types/js/types.d.ts +734 -0
- package/built/types/js/utils.d.ts +71 -0
- package/built/types/js/utils.test.d.ts +1 -0
- package/built/types/js/webamp.d.ts +6 -0
- package/built/types/js/webampLazy.d.ts +156 -0
- package/built/types/scripts/postcss-optimize-data-uri-pngs.d.ts +2 -0
- package/built/types/scripts/rollupPlugins.d.mts +8 -0
- package/built/types/vite.config.d.ts +2 -0
- package/built/webamp.bundle.js +43627 -36184
- package/built/webamp.bundle.js.map +1 -0
- package/built/webamp.bundle.min.js +43 -71
- package/built/webamp.bundle.min.js.map +1 -1
- package/built/webamp.bundle.min.mjs +44 -0
- package/built/webamp.bundle.min.mjs.map +1 -0
- package/built/webamp.lazy-bundle.js +14215 -18995
- package/built/webamp.lazy-bundle.js.map +1 -0
- package/built/webamp.lazy-bundle.min.js +41 -50
- package/built/webamp.lazy-bundle.min.js.map +1 -1
- package/built/webamp.lazy-bundle.min.mjs +42 -0
- package/built/webamp.lazy-bundle.min.mjs.map +1 -0
- package/package.json +68 -75
- package/CHANGELOG.md +0 -198
- package/index.d.ts +0 -277
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { FilePicker } from "../../types";
|
|
3
|
+
interface Props {
|
|
4
|
+
analyser: AnalyserNode;
|
|
5
|
+
filePickers: FilePicker[];
|
|
6
|
+
}
|
|
7
|
+
declare const MainWindow: React.MemoExoticComponent<({ analyser, filePickers }: Props) => import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
export default MainWindow;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
height: number;
|
|
3
|
+
width: number;
|
|
4
|
+
}
|
|
5
|
+
declare function PresetOverlay({ height, width }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function getRangeCenteredOnIndex(length: number, maxRangeSize: number, indexToCenter: number): [number, number];
|
|
7
|
+
export default PresetOverlay;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ListMenu(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
id: string;
|
|
4
|
+
children: ReactNode | Array<ReactNode>;
|
|
5
|
+
}
|
|
6
|
+
declare function PlaylistMenu(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const _default: import("react").MemoExoticComponent<typeof PlaylistMenu>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare function PlaylistMenuEntry({ children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const _default: import("react").MemoExoticComponent<typeof PlaylistMenuEntry>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function PlaylistScrollBar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SelectionMenu(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SortContextMenu(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
id: number;
|
|
4
|
+
index: number;
|
|
5
|
+
handleMoveClick: (e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function TrackCell({ children, handleMoveClick, index, id }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default TrackCell;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Size = [number, number];
|
|
3
|
+
interface Props {
|
|
4
|
+
currentSize: Size;
|
|
5
|
+
setWindowSize(size: Size): void;
|
|
6
|
+
widthOnly?: boolean;
|
|
7
|
+
id?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function ResizeTarget(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const _default: import("react").MemoExoticComponent<typeof ResizeTarget>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Skin(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
height: number;
|
|
4
|
+
width: number;
|
|
5
|
+
handleHeight: number;
|
|
6
|
+
value: number;
|
|
7
|
+
handle: ReactNode;
|
|
8
|
+
onBeforeChange?: () => void;
|
|
9
|
+
onChange: (value: number) => void;
|
|
10
|
+
onAfterChange?: () => void;
|
|
11
|
+
requireClicksOriginateLocally?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export default function VerticalSlider({ value, height, width, handle, handleHeight, onBeforeChange, onChange, onAfterChange, requireClicksOriginateLocally, disabled, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { FFT } from "./FFTNullsoft";
|
|
2
|
+
export interface Vis {
|
|
3
|
+
canvas: HTMLCanvasElement;
|
|
4
|
+
colors: string[];
|
|
5
|
+
analyser?: AnalyserNode;
|
|
6
|
+
oscStyle?: "dots" | "solid" | "lines";
|
|
7
|
+
bandwidth?: "wide" | "thin";
|
|
8
|
+
coloring?: "fire" | "line" | "normal";
|
|
9
|
+
peaks?: boolean;
|
|
10
|
+
saFalloff?: "slower" | "slow" | "moderate" | "fast" | "faster";
|
|
11
|
+
saPeakFalloff?: "slower" | "slow" | "moderate" | "fast" | "faster";
|
|
12
|
+
sa?: "analyzer" | "oscilloscope" | "none";
|
|
13
|
+
renderHeight: number;
|
|
14
|
+
smallVis?: boolean;
|
|
15
|
+
pixelDensity?: number;
|
|
16
|
+
doubled?: boolean;
|
|
17
|
+
isMWOpen?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Base class of Visualizer (animation frame renderer engine)
|
|
21
|
+
*/
|
|
22
|
+
declare abstract class VisPaintHandler {
|
|
23
|
+
_vis: Vis;
|
|
24
|
+
_ctx: CanvasRenderingContext2D | null;
|
|
25
|
+
constructor(vis: Vis);
|
|
26
|
+
/**
|
|
27
|
+
* Attempt to build cached bitmaps for later use while rendering a frame.
|
|
28
|
+
* Purpose: fast rendering in animation loop
|
|
29
|
+
*/
|
|
30
|
+
prepare(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Called once per frame rendering
|
|
33
|
+
*/
|
|
34
|
+
paintFrame(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Attempt to cleanup cached bitmaps
|
|
37
|
+
*/
|
|
38
|
+
dispose(): void;
|
|
39
|
+
}
|
|
40
|
+
type PaintFrameFunction = () => void;
|
|
41
|
+
type PaintBarFunction = (ctx: CanvasRenderingContext2D, x1: number, x2: number, barHeight: number, peakHeight: number) => void;
|
|
42
|
+
export declare class BarPaintHandler extends VisPaintHandler {
|
|
43
|
+
private saPeaks;
|
|
44
|
+
private saData2;
|
|
45
|
+
private saData;
|
|
46
|
+
private saFalloff;
|
|
47
|
+
private sample;
|
|
48
|
+
private barPeak;
|
|
49
|
+
private chunk;
|
|
50
|
+
private uVar12;
|
|
51
|
+
private falloff;
|
|
52
|
+
private peakFalloff;
|
|
53
|
+
private pushDown;
|
|
54
|
+
private inWaveData;
|
|
55
|
+
private outSpectralData;
|
|
56
|
+
_analyser: AnalyserNode;
|
|
57
|
+
_fft: FFT;
|
|
58
|
+
_color: string;
|
|
59
|
+
_colorPeak: string;
|
|
60
|
+
_bar: HTMLCanvasElement;
|
|
61
|
+
_peak: HTMLCanvasElement;
|
|
62
|
+
_16h: HTMLCanvasElement;
|
|
63
|
+
_bufferLength: number;
|
|
64
|
+
_dataArray: Uint8Array;
|
|
65
|
+
colorssmall: string[];
|
|
66
|
+
colorssmall2: string[];
|
|
67
|
+
_renderHeight: number;
|
|
68
|
+
_smallVis: boolean;
|
|
69
|
+
_pixelDensity: number;
|
|
70
|
+
_doubled: boolean;
|
|
71
|
+
_isMWOpen: boolean;
|
|
72
|
+
paintBar: PaintBarFunction;
|
|
73
|
+
paintFrame: PaintFrameFunction;
|
|
74
|
+
constructor(vis: Vis);
|
|
75
|
+
prepare(): void;
|
|
76
|
+
/**
|
|
77
|
+
* ⬜⬜⬜ ⬜⬜⬜
|
|
78
|
+
* 🟧🟧🟧
|
|
79
|
+
* 🟫🟫🟫 🟧🟧🟧
|
|
80
|
+
* 🟫🟫🟫 🟫🟫🟫
|
|
81
|
+
* 🟫🟫🟫 🟫🟫🟫 ⬜⬜⬜
|
|
82
|
+
* 🟫🟫🟫 🟫🟫🟫 🟧🟧🟧
|
|
83
|
+
* 🟫🟫🟫 🟫🟫🟫 🟫🟫🟫
|
|
84
|
+
* 1 bar = multiple pixels
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* ⬜⬜
|
|
88
|
+
* 🟧
|
|
89
|
+
* 🟫🟧
|
|
90
|
+
* 🟫🟫⬜⬜
|
|
91
|
+
* 🟫🟫🟧
|
|
92
|
+
* 🟫🟫🟫🟧⬜
|
|
93
|
+
* 🟫🟫🟫🟫🟧
|
|
94
|
+
* drawing 1pixel width bars
|
|
95
|
+
*/
|
|
96
|
+
paintAnalyzer(): void;
|
|
97
|
+
/**
|
|
98
|
+
* 🟥
|
|
99
|
+
* 🟧🟧
|
|
100
|
+
* 🟨🟨🟨
|
|
101
|
+
* 🟩🟩🟩🟩
|
|
102
|
+
*/
|
|
103
|
+
paintBarNormal(ctx: CanvasRenderingContext2D, x: number, x2: number, barHeight: number, peakHeight: number): void;
|
|
104
|
+
/**
|
|
105
|
+
* 🟥
|
|
106
|
+
* 🟧🟥
|
|
107
|
+
* 🟨🟧🟥
|
|
108
|
+
* 🟩🟨🟧🟥
|
|
109
|
+
*/
|
|
110
|
+
paintBarFire(ctx: CanvasRenderingContext2D, x: number, x2: number, barHeight: number, peakHeight: number): void;
|
|
111
|
+
/**
|
|
112
|
+
* 🟥
|
|
113
|
+
* 🟥🟧
|
|
114
|
+
* 🟥🟧🟨
|
|
115
|
+
* 🟥🟧🟨🟩
|
|
116
|
+
*/
|
|
117
|
+
paintBarLine(ctx: CanvasRenderingContext2D, x: number, x2: number, barHeight: number, peakHeight: number): void;
|
|
118
|
+
}
|
|
119
|
+
type PaintWavFunction = (x: number, y: number) => void;
|
|
120
|
+
export declare class WavePaintHandler extends VisPaintHandler {
|
|
121
|
+
private pushDown;
|
|
122
|
+
_analyser: AnalyserNode;
|
|
123
|
+
_bufferLength: number;
|
|
124
|
+
_lastX: number;
|
|
125
|
+
_lastY: number;
|
|
126
|
+
_dataArray: Uint8Array;
|
|
127
|
+
_pixelRatio: number;
|
|
128
|
+
_bar: HTMLCanvasElement;
|
|
129
|
+
_16h: HTMLCanvasElement;
|
|
130
|
+
paintWav: PaintWavFunction;
|
|
131
|
+
constructor(vis: Vis);
|
|
132
|
+
prepare(): void;
|
|
133
|
+
paintFrame(): void;
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* @param y 0..5
|
|
137
|
+
* @returns value in use for coloring stuff in
|
|
138
|
+
*/
|
|
139
|
+
colorIndex(y: number): number;
|
|
140
|
+
paintOscilloscope(x: number, y: number): void;
|
|
141
|
+
}
|
|
142
|
+
export declare class NoVisualizerHandler extends VisPaintHandler {
|
|
143
|
+
cleared: boolean;
|
|
144
|
+
prepare(): void;
|
|
145
|
+
paintFrame(): void;
|
|
146
|
+
}
|
|
147
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react/experimental" />
|
|
2
|
+
import { DetailedHTMLProps, HTMLAttributes } from "react";
|
|
3
|
+
interface DetailedHTMLPropsAndMore extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
+
requireClicksOriginateLocally?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type Props = DetailedHTMLPropsAndMore;
|
|
7
|
+
/**
|
|
8
|
+
* Renders a `div` with an `.winamp-active` class if the element is being clicked/tapped.
|
|
9
|
+
*
|
|
10
|
+
* For now this mimicks the behavior of `:active`, but in the future we will use
|
|
11
|
+
* this component to mimic Winamp's behavior, which is quite different than
|
|
12
|
+
* `:active`.
|
|
13
|
+
*
|
|
14
|
+
* https://html.spec.whatwg.org/multipage/semantics-other.html#selector-active
|
|
15
|
+
*
|
|
16
|
+
* > An element is said to be being actively pointed at while the user indicates
|
|
17
|
+
* > the element using a pointing device while that pointing device is in the
|
|
18
|
+
* > "down" state (e.g. for a mouse, between the time the mouse button is pressed
|
|
19
|
+
* > and the time it is depressed; for a finger in a multitouch environment, while
|
|
20
|
+
* > the finger is touching the display surface).
|
|
21
|
+
*/
|
|
22
|
+
export default function WinampButton({ requireClicksOriginateLocally, onPointerDown: originalOnPointerDown, className, ...htmlProps }: Props): JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Band, MediaTagRequestStatus, MediaStatus, LoadStyle, TimeMode, WindowId } from "./types";
|
|
2
|
+
export declare const BANDS: Band[];
|
|
3
|
+
export declare const WINDOWS: {
|
|
4
|
+
[key: string]: WindowId;
|
|
5
|
+
};
|
|
6
|
+
export declare const LOAD_STYLE: Record<LoadStyle, LoadStyle>;
|
|
7
|
+
export declare const MEDIA_TAG_REQUEST_STATUS: Record<MediaTagRequestStatus, MediaTagRequestStatus>;
|
|
8
|
+
export declare const UTF8_ELLIPSIS = "\u2026";
|
|
9
|
+
export declare const CHARACTER_WIDTH = 5;
|
|
10
|
+
export declare const WINDOW_RESIZE_SEGMENT_WIDTH = 25;
|
|
11
|
+
export declare const WINDOW_RESIZE_SEGMENT_HEIGHT = 29;
|
|
12
|
+
export declare const WINDOW_HEIGHT = 116;
|
|
13
|
+
export declare const WINDOW_WIDTH = 275;
|
|
14
|
+
export declare const TRACK_HEIGHT = 13;
|
|
15
|
+
export declare const LETTERS: string[];
|
|
16
|
+
export declare const DEFAULT_SKIN: {
|
|
17
|
+
images: {
|
|
18
|
+
EQ_PREAMP_LINE: string;
|
|
19
|
+
EQ_GRAPH_LINE_COLORS: string;
|
|
20
|
+
};
|
|
21
|
+
colors: string[];
|
|
22
|
+
playlistStyle: {
|
|
23
|
+
normal: string;
|
|
24
|
+
current: string;
|
|
25
|
+
normalbg: string;
|
|
26
|
+
selectedbg: string;
|
|
27
|
+
font: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare const VISUALIZERS: {
|
|
31
|
+
OSCILLOSCOPE: string;
|
|
32
|
+
BAR: string;
|
|
33
|
+
NONE: string;
|
|
34
|
+
MILKDROP: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const VISUALIZER_ORDER: string[];
|
|
37
|
+
export declare const TIME_MODE: Record<TimeMode, TimeMode>;
|
|
38
|
+
export declare const MEDIA_STATUS: Record<MediaStatus, MediaStatus>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IMusicMetadataBrowserApi } from "./types";
|
|
2
|
+
import { IAudioMetadata } from "music-metadata-browser";
|
|
3
|
+
type MediaDataType = string | ArrayBuffer | Blob;
|
|
4
|
+
export declare function genMediaTags(file: MediaDataType, musicMetadata: IMusicMetadataBrowserApi): Promise<IAudioMetadata>;
|
|
5
|
+
export declare function genMediaDuration(url: string): Promise<number>;
|
|
6
|
+
export declare function genArrayBufferFromFileReference(fileReference: File): Promise<any>;
|
|
7
|
+
export declare function genStringFromFileReference(fileReference: File): Promise<string>;
|
|
8
|
+
interface PromptForFileReferenceOptions {
|
|
9
|
+
accept?: string | null;
|
|
10
|
+
directory?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function promptForFileReferences({ accept, directory }?: PromptForFileReferenceOptions): Promise<FileList>;
|
|
13
|
+
export declare function curUrlFromByteArray(arr: Uint8Array): string;
|
|
14
|
+
export declare function filenameFromUrl(url: string): string | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Action, Thunk, AppState } from "./types";
|
|
3
|
+
interface Size {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function useUnmountedRef(): {
|
|
8
|
+
current: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function usePromiseValueOrNull<T>(propValue: Promise<T>): T | null;
|
|
11
|
+
export declare function useScreenSize(): Size;
|
|
12
|
+
export declare function useWindowSize(): Size;
|
|
13
|
+
export declare function useIsHovered(): {
|
|
14
|
+
ref: import("react").Dispatch<import("react").SetStateAction<HTMLElement | null>>;
|
|
15
|
+
hover: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function useOnClickAway(ref: Element | null, callback: null | (() => void)): void;
|
|
18
|
+
export declare function useTypedSelector<T>(selector: (state: AppState) => T): T;
|
|
19
|
+
export declare function useActionCreator<T extends (...args: any[]) => Action | Thunk>(actionCreator: T): (...funcArgs: Parameters<T>) => void;
|
|
20
|
+
export declare function useTypedDispatch(): (action: Action | Thunk) => void;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Slider } from "./types";
|
|
2
|
+
export declare const getBalanceText: (balance: number) => string;
|
|
3
|
+
export declare const getVolumeText: (volume: number) => string;
|
|
4
|
+
export declare const getPositionText: (duration: number, seekToPercent: number) => string;
|
|
5
|
+
export declare const getDoubleSizeModeText: (enabled: boolean) => string;
|
|
6
|
+
export declare const getEqText: (band: Slider, level: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Emitter from "../emitter";
|
|
2
|
+
import { MediaStatus } from "../types";
|
|
3
|
+
export default class ElementSource {
|
|
4
|
+
_emitter: Emitter;
|
|
5
|
+
_context: AudioContext;
|
|
6
|
+
_source: AudioNode;
|
|
7
|
+
_destination: AudioNode;
|
|
8
|
+
_audio: HTMLAudioElement;
|
|
9
|
+
_stalled: boolean;
|
|
10
|
+
_status: MediaStatus;
|
|
11
|
+
on(eventType: string, cb: (...args: any[]) => void): () => void;
|
|
12
|
+
constructor(context: AudioContext, destination: AudioNode);
|
|
13
|
+
_setStalled(stalled: boolean): void;
|
|
14
|
+
disconnect(): void;
|
|
15
|
+
loadUrl(url: string): Promise<void>;
|
|
16
|
+
play(): Promise<void>;
|
|
17
|
+
pause(): void;
|
|
18
|
+
stop(): void;
|
|
19
|
+
seekToTime(time: number): void;
|
|
20
|
+
getStalled(): boolean;
|
|
21
|
+
getStatus(): MediaStatus;
|
|
22
|
+
getDuration(): number;
|
|
23
|
+
getTimeElapsed(): number;
|
|
24
|
+
_setStatus(status: MediaStatus): void;
|
|
25
|
+
dispose(): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Band } from "../types";
|
|
2
|
+
import Emitter from "../emitter";
|
|
3
|
+
import ElementSource from "./elementSource";
|
|
4
|
+
interface StereoBalanceNodeType extends AudioNode {
|
|
5
|
+
constructor(context: AudioContext): StereoBalanceNodeType;
|
|
6
|
+
balance: {
|
|
7
|
+
value: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export default class Media {
|
|
11
|
+
_emitter: Emitter;
|
|
12
|
+
_context: AudioContext;
|
|
13
|
+
_balance: StereoBalanceNodeType;
|
|
14
|
+
_staticSource: GainNode;
|
|
15
|
+
_preamp: GainNode;
|
|
16
|
+
_analyser: AnalyserNode;
|
|
17
|
+
_gainNode: GainNode;
|
|
18
|
+
_source: ElementSource;
|
|
19
|
+
_bands: {
|
|
20
|
+
[band: number]: BiquadFilterNode;
|
|
21
|
+
};
|
|
22
|
+
constructor();
|
|
23
|
+
getAnalyser(): AnalyserNode;
|
|
24
|
+
duration(): number;
|
|
25
|
+
timeElapsed(): number;
|
|
26
|
+
timeRemaining(): number;
|
|
27
|
+
percentComplete(): number;
|
|
28
|
+
play(): Promise<void>;
|
|
29
|
+
pause(): void;
|
|
30
|
+
stop(): void;
|
|
31
|
+
seekToPercentComplete(percent: number): void;
|
|
32
|
+
setVolume(volume: number): void;
|
|
33
|
+
setPreamp(value: number): void;
|
|
34
|
+
setBalance(balance: number): void;
|
|
35
|
+
setEqBand(band: Band, value: number): void;
|
|
36
|
+
disableEq(): void;
|
|
37
|
+
enableEq(): void;
|
|
38
|
+
on(event: string, callback: (...args: any[]) => void): void;
|
|
39
|
+
seekToTime(time: number): void;
|
|
40
|
+
loadFromUrl(url: string, autoPlay: boolean): Promise<void>;
|
|
41
|
+
dispose(): void;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
averageTrackLength: string;
|
|
3
|
+
numberOfTracks: number;
|
|
4
|
+
playlistLengthSeconds: number;
|
|
5
|
+
playlistLengthMinutes: number;
|
|
6
|
+
tracks: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare const getAsDataURI: (text: string) => string;
|
|
9
|
+
export declare const createPlaylistURL: (props: Props) => string;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Action, SkinImages, Cursors, SkinRegion, GenLetterWidths, PlaylistStyle, SkinGenExColors, DummyVizData } from "../types";
|
|
2
|
+
import { DisplaySerializedStateV1 } from "../serializedStates/v1Types";
|
|
3
|
+
export interface DisplayState {
|
|
4
|
+
visualizerStyle: number;
|
|
5
|
+
doubled: boolean;
|
|
6
|
+
llama: boolean;
|
|
7
|
+
disableMarquee: boolean;
|
|
8
|
+
marqueeStep: number;
|
|
9
|
+
skinImages: SkinImages;
|
|
10
|
+
skinCursors: Cursors | null;
|
|
11
|
+
skinRegion: SkinRegion;
|
|
12
|
+
skinGenLetterWidths: GenLetterWidths | null;
|
|
13
|
+
skinColors: string[];
|
|
14
|
+
skinPlaylistStyle: PlaylistStyle | null;
|
|
15
|
+
skinGenExColors: SkinGenExColors;
|
|
16
|
+
working: boolean;
|
|
17
|
+
closed: boolean;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
playlistScrollPosition: number;
|
|
20
|
+
zIndex: number;
|
|
21
|
+
dummyVizData: DummyVizData | null;
|
|
22
|
+
}
|
|
23
|
+
declare const display: (state: DisplayState | undefined, action: Action) => DisplayState;
|
|
24
|
+
export default display;
|
|
25
|
+
export declare const getSerializedState: (state: DisplayState) => DisplaySerializedStateV1;
|
|
26
|
+
export declare const getVisualizerStyle: import("reselect").OutputSelector<DisplayState, string, (res: number) => string>;
|