@lucaismyname/ginger 0.0.15 → 0.0.20
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 +113 -1
- package/dist/client.cjs +1 -1
- package/dist/client.js +31 -28
- package/dist/client.test.d.ts +2 -0
- package/dist/client.test.d.ts.map +1 -0
- package/dist/components/controls/Controls.d.ts +26 -13
- package/dist/components/controls/Controls.d.ts.map +1 -1
- package/dist/components/current/Chapters.d.ts +15 -0
- package/dist/components/current/Chapters.d.ts.map +1 -0
- package/dist/components/current/ChaptersLyricsSynced.test.d.ts +2 -0
- package/dist/components/current/ChaptersLyricsSynced.test.d.ts.map +1 -0
- package/dist/components/current/LyricsSynced.d.ts +16 -0
- package/dist/components/current/LyricsSynced.d.ts.map +1 -0
- package/dist/components/current/index.d.ts +4 -0
- package/dist/components/current/index.d.ts.map +1 -1
- package/dist/core/transitions.d.ts +5 -3
- package/dist/core/transitions.d.ts.map +1 -1
- package/dist/experimental-gapless/index.cjs.map +1 -1
- package/dist/experimental-gapless/index.d.ts +3 -1
- package/dist/experimental-gapless/index.d.ts.map +1 -1
- package/dist/experimental-gapless/index.js.map +1 -1
- package/dist/ginger-8x4WzVmw.js +1818 -0
- package/dist/ginger-8x4WzVmw.js.map +1 -0
- package/dist/ginger-CMbd3s8C.cjs +2 -0
- package/dist/ginger-CMbd3s8C.cjs.map +1 -0
- package/dist/ginger.d.ts +2 -0
- package/dist/ginger.d.ts.map +1 -1
- package/dist/hooks/useNextTrackPrefetch.d.ts +16 -0
- package/dist/hooks/useNextTrackPrefetch.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +50 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -28
- package/dist/testing/helpers.d.ts +29 -0
- package/dist/testing/helpers.d.ts.map +1 -1
- package/dist/testing/helpers.test.d.ts +2 -0
- package/dist/testing/helpers.test.d.ts.map +1 -0
- package/dist/testing/index.cjs +48 -43
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +6888 -3749
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/index.test.d.ts +2 -0
- package/dist/testing/index.test.d.ts.map +1 -0
- package/dist/testing/renderGinger.d.ts.map +1 -1
- package/dist/useNextTrackPrefetch-CFoUynDv.cjs +2 -0
- package/dist/useNextTrackPrefetch-CFoUynDv.cjs.map +1 -0
- package/dist/useNextTrackPrefetch-CV1khU0h.js +257 -0
- package/dist/useNextTrackPrefetch-CV1khU0h.js.map +1 -0
- package/package.json +9 -1
- package/dist/ginger-BTPRqWHs.js +0 -1621
- package/dist/ginger-BTPRqWHs.js.map +0 -1
- package/dist/ginger-BiI69vrn.cjs +0 -2
- package/dist/ginger-BiI69vrn.cjs.map +0 -1
- package/dist/useSeekDrag-Br1V0Vao.js +0 -290
- package/dist/useSeekDrag-Br1V0Vao.js.map +0 -1
- package/dist/useSeekDrag-aS7uk26h.cjs +0 -2
- package/dist/useSeekDrag-aS7uk26h.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
|
1
|
+
# @lucaismyname/ginger
|
|
2
|
+
|
|
3
|
+
Headless React audio player primitives for building custom music and podcast UIs.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @lucaismyname/ginger
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependencies:
|
|
12
|
+
|
|
13
|
+
- `react >= 18`
|
|
14
|
+
- `react-dom >= 18`
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { Ginger } from "@lucaismyname/ginger";
|
|
20
|
+
|
|
21
|
+
const tracks = [{ id: "a", title: "Track A", fileUrl: "/audio/a.mp3" }];
|
|
22
|
+
|
|
23
|
+
export function Player() {
|
|
24
|
+
return (
|
|
25
|
+
<Ginger.Provider initialTracks={tracks}>
|
|
26
|
+
<Ginger.Player />
|
|
27
|
+
<Ginger.Control.PlayPause />
|
|
28
|
+
<Ginger.Control.Previous />
|
|
29
|
+
<Ginger.Control.Next />
|
|
30
|
+
<Ginger.Control.SeekBar />
|
|
31
|
+
<Ginger.Control.Volume />
|
|
32
|
+
<Ginger.Current.Title fallback="No track" />
|
|
33
|
+
</Ginger.Provider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Documentation
|
|
39
|
+
|
|
40
|
+
- Getting started: [`docs/getting-started.md`](./docs/getting-started.md)
|
|
41
|
+
- Testing guide: [`docs/guides/testing.md`](./docs/guides/testing.md)
|
|
42
|
+
- Recipes: [`docs/guides/recipes.md`](./docs/guides/recipes.md)
|
|
43
|
+
- Accessibility checklist: [`docs/guides/accessibility.md`](./docs/guides/accessibility.md)
|
|
44
|
+
- Streaming adapters: [`docs/guides/streaming-adapters.md`](./docs/guides/streaming-adapters.md)
|
|
45
|
+
- Components reference: [`docs/reference/components.md`](./docs/reference/components.md)
|
|
46
|
+
- Hooks reference: [`docs/reference/hooks.md`](./docs/reference/hooks.md)
|
|
47
|
+
- Subpath exports: [`docs/reference/subpaths.md`](./docs/reference/subpaths.md)
|
|
48
|
+
- Generated API docs: [`docs/api/index.html`](./docs/api/index.html)
|
|
49
|
+
|
|
50
|
+
## Subpath Exports
|
|
51
|
+
|
|
52
|
+
- `@lucaismyname/ginger/client`
|
|
53
|
+
- `@lucaismyname/ginger/testing`
|
|
54
|
+
- `@lucaismyname/ginger/waveform`
|
|
55
|
+
- `@lucaismyname/ginger/experimental-gapless`
|
|
56
|
+
|
|
57
|
+
### Experimental Notice
|
|
58
|
+
|
|
59
|
+
`@lucaismyname/ginger/experimental-gapless` is intentionally non-production.
|
|
60
|
+
It currently provides capability metadata only and does not alter playback behavior.
|
|
61
|
+
|
|
62
|
+
## Release Process
|
|
63
|
+
|
|
64
|
+
- Changelog: [`CHANGELOG.md`](./CHANGELOG.md)
|
|
65
|
+
- Release note template: [`../../.github/release-template.md`](../../.github/release-template.md)
|
|
66
|
+
|
|
67
|
+
Before publishing:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm run build
|
|
71
|
+
npm run test
|
|
72
|
+
npm run typecheck
|
|
73
|
+
npm run lint
|
|
74
|
+
npm run docs:api
|
|
75
|
+
```
|
|
76
|
+
|
|
1
77
|
# ginger
|
|
2
78
|
|
|
3
79
|
**`@lucaismyname/ginger`** is a headless React audio player built on the native **`<audio>`** element. It gives you a provider, a hidden media element, a typed state/control hook, and composable React components for transport controls, track metadata, queue metadata, and playlists.
|
|
@@ -491,6 +567,8 @@ Other current-track components:
|
|
|
491
567
|
|-----------|-------------|-----------------|
|
|
492
568
|
| `Ginger.Current.Artwork` | Current track artwork or playlist artwork fallback | `unstyled`, `imgStyle`, `sizes`, `loading`, `decoding`, `onError`, display-base props |
|
|
493
569
|
| `Ginger.Current.Lyrics` | Track lyrics | `preserveWhitespace`, render-prop `children` |
|
|
570
|
+
| `Ginger.Current.LyricsSynced` | Timed / LRC lyrics with active line | `activeClassName`, `lineClassName`, `unstyled`, render-prop `children` |
|
|
571
|
+
| `Ginger.Current.Chapters` | Chapter list; click seeks to `startSeconds` | `formatStart`, `unstyled`, render-prop `children` |
|
|
494
572
|
| `Ginger.Current.FileUrl` | Track `fileUrl`, hidden unless explicitly enabled | `visible`, display-base props |
|
|
495
573
|
| `Ginger.Current.QueueIndex` | Current queue index | `base`, render-prop `children` |
|
|
496
574
|
| `Ginger.Current.QueueLength` | Queue length | render-prop `children` |
|
|
@@ -688,7 +766,7 @@ Example:
|
|
|
688
766
|
|
|
689
767
|
- **Headless control bindings** (bind to your own components): **`useSeekBarBinding()`**, **`useVolumeSlider()`**, **`usePlayPauseBinding({ playAriaLabel?, pauseAriaLabel? })`**. Each returns props such as `value`, `min`, `max`, handlers, and `ariaLabel` / `ariaValueText` where relevant.
|
|
690
768
|
|
|
691
|
-
- **Advanced hooks** — **`useGingerKeyboardShortcuts()`**, **`useGingerSleepTimer()`**, **`useSeekDrag()`**, **`useGingerChapters()`**, **`useGingerLyricsSync()`**, and **`useGingerDebugLog()`** are available for custom UX and diagnostics.
|
|
769
|
+
- **Advanced hooks** — **`useGingerKeyboardShortcuts()`**, **`useGingerSleepTimer()`**, **`useSeekDrag()`**, **`useNextTrackPrefetch()`**, **`useGingerChapters()`**, **`useGingerLyricsSync()`**, and **`useGingerDebugLog()`** are available for custom UX and diagnostics.
|
|
692
770
|
|
|
693
771
|
- **Locale** — Pass **`locale={partialMessages}`** on `Ginger.Provider` (type **`GingerLocaleMessages`**) to translate built-in control strings; **`useGingerLocale()`** reads the merged messages anywhere under the provider.
|
|
694
772
|
|
|
@@ -847,6 +925,31 @@ function ChapterAndLyrics() {
|
|
|
847
925
|
|
|
848
926
|
`Track` now supports optional `chapters` and `lyricsTimed` fields. For LRC parsing, use `parseLrc()`.
|
|
849
927
|
|
|
928
|
+
For ready-made UI, use **`Ginger.Current.Chapters`** and **`Ginger.Current.LyricsSynced`** (same data as the hooks above).
|
|
929
|
+
|
|
930
|
+
### Next-track prefetch
|
|
931
|
+
|
|
932
|
+
```tsx
|
|
933
|
+
import { Ginger, useNextTrackPrefetch } from "@lucaismyname/ginger";
|
|
934
|
+
|
|
935
|
+
function PrefetchNext() {
|
|
936
|
+
useNextTrackPrefetch({ crossOrigin: "anonymous" });
|
|
937
|
+
return null;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
export function App() {
|
|
941
|
+
return (
|
|
942
|
+
<Ginger.Provider initialTracks={tracks}>
|
|
943
|
+
<Ginger.Player crossOrigin="anonymous" />
|
|
944
|
+
<PrefetchNext />
|
|
945
|
+
{/* ... */}
|
|
946
|
+
</Ginger.Provider>
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
```
|
|
950
|
+
|
|
951
|
+
The hook preloads the **logical** next track (same rules as the Next button) using a detached `HTMLAudioElement` with `preload="auto"`. Pass **`crossOrigin`** when it matches **`Ginger.Player`** for cross-origin URLs.
|
|
952
|
+
|
|
850
953
|
### Sleep timer and drag seek
|
|
851
954
|
|
|
852
955
|
```tsx
|
|
@@ -896,6 +999,7 @@ Use `useGingerDebugLog(true)` during development to log core state transitions i
|
|
|
896
999
|
- `Ginger.Control.SeekBar` and `Ginger.Control.Volume` accept `unstyled`.
|
|
897
1000
|
- `Ginger.Current.Artwork`, `Ginger.Queue.Artwork`, `Ginger.Current.TimeRail`, and `Ginger.Current.BufferRail` accept `unstyled`.
|
|
898
1001
|
- `Ginger.Playlist` and `Ginger.Playlist.Track` accept `unstyled`.
|
|
1002
|
+
- `Ginger.Current.Chapters` and `Ginger.Current.LyricsSynced` accept `unstyled`.
|
|
899
1003
|
|
|
900
1004
|
This gives you a pure state+behavior layer while keeping convenience components available.
|
|
901
1005
|
|
|
@@ -924,6 +1028,14 @@ There is no `window` at import time, but playback only starts when the audio ele
|
|
|
924
1028
|
|
|
925
1029
|
See [Recipes — Updating the queue after mount](#updating-the-queue-after-mount).
|
|
926
1030
|
|
|
1031
|
+
## Development priorities
|
|
1032
|
+
|
|
1033
|
+
These priorities guide new work in the library; they are not a guarantee of shipping order.
|
|
1034
|
+
|
|
1035
|
+
1. **Music libraries and continuous listening** — Features that make track-to-track playback feel better come first: **next-track prefetch** (`useNextTrackPrefetch`), future gapless or crossfade (see `@lucaismyname/ginger/experimental-gapless`), and first-class **chapter** / **synced lyrics** UI (`Ginger.Current.Chapters`, `Ginger.Current.LyricsSynced`).
|
|
1036
|
+
2. **Podcasts and live-style streams** — **HLS / DASH** integration is emphasized when a concrete app needs it; the core package stays on native `<audio>` with optional adapters or documentation rather than hard dependencies.
|
|
1037
|
+
3. **Embedded or internal players** — **Accessibility**, persistence, and **testing** helpers are favored over heavier ecosystem integrations (Cast, remote playback modules) unless there is a dedicated use case.
|
|
1038
|
+
|
|
927
1039
|
## Monorepo Development
|
|
928
1040
|
|
|
929
1041
|
| Path | Purpose |
|
package/dist/client.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ginger-CMbd3s8C.cjs"),r=require("./useNextTrackPrefetch-CFoUynDv.cjs"),a=require("./GingerSplitContexts-C7puo0M7.cjs");exports.Chapters=e.Chapters;exports.Ginger=e.Ginger;exports.LyricsSynced=e.LyricsSynced;exports.clampPlaybackRate=e.clampPlaybackRate;exports.clampVolume=e.clampVolume;exports.defaultGingerLocale=e.defaultGingerLocale;exports.derivePlaybackUiState=e.derivePlaybackUiState;exports.parseLrc=e.parseLrc;exports.useGingerChapters=e.useGingerChapters;exports.useGingerLocale=e.useGingerLocale;exports.useGingerLyricsSync=e.useGingerLyricsSync;exports.usePlayPauseBinding=e.usePlayPauseBinding;exports.useSeekBarBinding=e.useSeekBarBinding;exports.useVolumeSlider=e.useVolumeSlider;exports.attachLiveAnalyser=r.attachLiveAnalyser;exports.detachLiveAnalyser=r.detachLiveAnalyser;exports.useGinger=r.useGinger;exports.useGingerDebugLog=r.useGingerDebugLog;exports.useGingerKeyboardShortcuts=r.useGingerKeyboardShortcuts;exports.useGingerLiveAnalyzer=r.useGingerLiveAnalyzer;exports.useGingerSleepTimer=r.useGingerSleepTimer;exports.useNextTrackPrefetch=r.useNextTrackPrefetch;exports.useSeekDrag=r.useSeekDrag;exports.gingerStateFromContextValues=a.gingerStateFromContextValues;exports.gingerStateFromContexts=a.gingerStateFromContexts;exports.useGingerMedia=a.useGingerMedia;exports.useGingerPlayback=a.useGingerPlayback;exports.useGingerState=a.useGingerState;
|
|
2
2
|
//# sourceMappingURL=client.cjs.map
|
package/dist/client.js
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { g as
|
|
1
|
+
import { C as s, G as r, L as i, c as n, a as t, d as u, b as g, p as c, u as l, e as o, f as G, g as y, h as d, i as S } from "./ginger-8x4WzVmw.js";
|
|
2
|
+
import { a as p, d as L, u as b, b as h, c as f, e as k, f as x, g as P, h as C } from "./useNextTrackPrefetch-CV1khU0h.js";
|
|
3
|
+
import { g as A, a as B, u as V, b as D, c as F } from "./GingerSplitContexts-BzBExb95.js";
|
|
4
4
|
export {
|
|
5
|
-
s as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
5
|
+
s as Chapters,
|
|
6
|
+
r as Ginger,
|
|
7
|
+
i as LyricsSynced,
|
|
8
|
+
p as attachLiveAnalyser,
|
|
9
|
+
n as clampPlaybackRate,
|
|
10
|
+
t as clampVolume,
|
|
11
|
+
u as defaultGingerLocale,
|
|
12
|
+
g as derivePlaybackUiState,
|
|
13
|
+
L as detachLiveAnalyser,
|
|
14
|
+
A as gingerStateFromContextValues,
|
|
15
|
+
B as gingerStateFromContexts,
|
|
16
|
+
c as parseLrc,
|
|
17
|
+
b as useGinger,
|
|
18
|
+
l as useGingerChapters,
|
|
19
|
+
h as useGingerDebugLog,
|
|
20
|
+
f as useGingerKeyboardShortcuts,
|
|
21
|
+
k as useGingerLiveAnalyzer,
|
|
22
|
+
o as useGingerLocale,
|
|
23
|
+
G as useGingerLyricsSync,
|
|
24
|
+
V as useGingerMedia,
|
|
25
|
+
D as useGingerPlayback,
|
|
26
|
+
x as useGingerSleepTimer,
|
|
27
|
+
F as useGingerState,
|
|
28
|
+
P as useNextTrackPrefetch,
|
|
29
|
+
y as usePlayPauseBinding,
|
|
30
|
+
d as useSeekBarBinding,
|
|
31
|
+
C as useSeekDrag,
|
|
32
|
+
S as useVolumeSlider
|
|
30
33
|
};
|
|
31
34
|
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.test.d.ts","sourceRoot":"","sources":["../src/client.test.ts"],"names":[],"mappings":""}
|
|
@@ -7,62 +7,75 @@ export type PlayPauseProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
7
7
|
playAriaLabel?: string;
|
|
8
8
|
/** Screen-reader label when playing (action would pause); defaults to match `pauseLabel` when it is a string */
|
|
9
9
|
pauseAriaLabel?: string;
|
|
10
|
+
children?: ReactNode;
|
|
10
11
|
};
|
|
11
|
-
export declare function PlayPause({ playLabel, pauseLabel, playAriaLabel, pauseAriaLabel, type, onClick, ...rest }: PlayPauseProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function PlayPause({ playLabel, pauseLabel, playAriaLabel, pauseAriaLabel, children, type, onClick, ...rest }: PlayPauseProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare namespace PlayPause {
|
|
13
14
|
var displayName: string;
|
|
14
15
|
}
|
|
15
|
-
export type RepeatProps = ButtonHTMLAttributes<HTMLButtonElement
|
|
16
|
-
|
|
16
|
+
export type RepeatProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function Repeat({ type, ariaLabel, onClick, ...rest }: RepeatProps): import("react/jsx-runtime").JSX.Element;
|
|
17
20
|
export declare namespace Repeat {
|
|
18
21
|
var displayName: string;
|
|
19
22
|
}
|
|
20
|
-
export type NextProps = ButtonHTMLAttributes<HTMLButtonElement
|
|
21
|
-
|
|
23
|
+
export type NextProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
24
|
+
ariaLabel?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function Next({ type, children, ariaLabel, onClick, ...rest }: NextProps): import("react/jsx-runtime").JSX.Element;
|
|
22
27
|
export declare namespace Next {
|
|
23
28
|
var displayName: string;
|
|
24
29
|
}
|
|
25
|
-
export type PreviousProps = ButtonHTMLAttributes<HTMLButtonElement
|
|
26
|
-
|
|
30
|
+
export type PreviousProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
};
|
|
33
|
+
export declare function Previous({ type, children, ariaLabel, onClick, ...rest }: PreviousProps): import("react/jsx-runtime").JSX.Element;
|
|
27
34
|
export declare namespace Previous {
|
|
28
35
|
var displayName: string;
|
|
29
36
|
}
|
|
30
|
-
export type ShuffleProps = ButtonHTMLAttributes<HTMLButtonElement
|
|
31
|
-
|
|
37
|
+
export type ShuffleProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
38
|
+
ariaLabel?: string;
|
|
39
|
+
};
|
|
40
|
+
export declare function Shuffle({ type, children, ariaLabel, onClick, ...rest }: ShuffleProps): import("react/jsx-runtime").JSX.Element;
|
|
32
41
|
export declare namespace Shuffle {
|
|
33
42
|
var displayName: string;
|
|
34
43
|
}
|
|
35
44
|
export type SeekBarProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange" | "onInput" | "min" | "max" | "step"> & {
|
|
36
45
|
/** Remove default width style for fully custom styling. */
|
|
37
46
|
unstyled?: boolean;
|
|
47
|
+
ariaLabel?: string;
|
|
38
48
|
inputStyle?: CSSProperties;
|
|
39
49
|
};
|
|
40
|
-
export declare function SeekBar({ inputStyle, style, unstyled, ...rest }: SeekBarProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare function SeekBar({ inputStyle, style, unstyled, ariaLabel, ...rest }: SeekBarProps): import("react/jsx-runtime").JSX.Element;
|
|
41
51
|
export declare namespace SeekBar {
|
|
42
52
|
var displayName: string;
|
|
43
53
|
}
|
|
44
54
|
export type VolumeProps = Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "onChange" | "onInput" | "min" | "max" | "step"> & {
|
|
45
55
|
/** Remove default width style for fully custom styling. */
|
|
46
56
|
unstyled?: boolean;
|
|
57
|
+
ariaLabel?: string;
|
|
47
58
|
inputStyle?: CSSProperties;
|
|
48
59
|
};
|
|
49
|
-
export declare function Volume({ inputStyle, style, unstyled, ...rest }: VolumeProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare function Volume({ inputStyle, style, unstyled, ariaLabel, ...rest }: VolumeProps): import("react/jsx-runtime").JSX.Element;
|
|
50
61
|
export declare namespace Volume {
|
|
51
62
|
var displayName: string;
|
|
52
63
|
}
|
|
53
64
|
export type MuteProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
65
|
+
ariaLabel?: string;
|
|
54
66
|
muteLabel?: ReactNode;
|
|
55
67
|
unmuteLabel?: ReactNode;
|
|
56
68
|
};
|
|
57
|
-
export declare function Mute({ muteLabel, unmuteLabel, type, onClick, ...rest }: MuteProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare function Mute({ ariaLabel, muteLabel, unmuteLabel, type, onClick, ...rest }: MuteProps): import("react/jsx-runtime").JSX.Element;
|
|
58
70
|
export declare namespace Mute {
|
|
59
71
|
var displayName: string;
|
|
60
72
|
}
|
|
61
73
|
export type PlaybackRateProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, "value" | "onChange"> & {
|
|
62
74
|
/** Playback speed options (default: 0.5 … 2) */
|
|
63
75
|
rates?: readonly number[];
|
|
76
|
+
ariaLabel?: string;
|
|
64
77
|
};
|
|
65
|
-
export declare function PlaybackRate({ rates, style, ...rest }: PlaybackRateProps): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
export declare function PlaybackRate({ rates, style, ariaLabel, ...rest }: PlaybackRateProps): import("react/jsx-runtime").JSX.Element;
|
|
66
79
|
export declare namespace PlaybackRate {
|
|
67
80
|
var displayName: string;
|
|
68
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../src/components/controls/Controls.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACrB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Controls.d.ts","sourceRoot":"","sources":["../../../src/components/controls/Controls.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DisplayBaseProps, GingerState } from '../../types';
|
|
3
|
+
import { GingerChapter } from '../../hooks/useGingerChapters';
|
|
4
|
+
export type ChaptersProps = Omit<DisplayBaseProps, "children"> & {
|
|
5
|
+
/** Remove default list/row styles for fully custom styling. */
|
|
6
|
+
unstyled?: boolean;
|
|
7
|
+
/** Prefix before each chapter title (default: `formatMmSs(startSeconds)`). */
|
|
8
|
+
formatStart?: (startSeconds: number) => string;
|
|
9
|
+
children?: (chapter: GingerChapter, index: number, active: boolean, state: GingerState) => ReactNode;
|
|
10
|
+
};
|
|
11
|
+
export declare function Chapters({ className, style, fallback, empty, unstyled, formatStart, children, }: ChaptersProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export declare namespace Chapters {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=Chapters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chapters.d.ts","sourceRoot":"","sources":["../../../src/components/current/Chapters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IAC/D,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,KAAK,SAAS,CAAC;CACtG,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,WAAwB,EACxB,QAAQ,GACT,EAAE,aAAa,kDA4Df;yBApEe,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChaptersLyricsSynced.test.d.ts","sourceRoot":"","sources":["../../../src/components/current/ChaptersLyricsSynced.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DisplayBaseProps, GingerState } from '../../types';
|
|
3
|
+
import { TimedLyricLine } from '../../internal/lyrics';
|
|
4
|
+
export type LyricsSyncedProps = Omit<DisplayBaseProps, "children"> & {
|
|
5
|
+
unstyled?: boolean;
|
|
6
|
+
/** Class applied to the line that matches the current playback time. */
|
|
7
|
+
activeClassName?: string;
|
|
8
|
+
/** Class applied to every line. */
|
|
9
|
+
lineClassName?: string;
|
|
10
|
+
children?: (line: TimedLyricLine, index: number, active: boolean, state: GingerState) => ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export declare function LyricsSynced({ className, style, fallback, empty, unstyled, activeClassName, lineClassName, children, }: LyricsSyncedProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export declare namespace LyricsSynced {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=LyricsSynced.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LyricsSynced.d.ts","sourceRoot":"","sources":["../../../src/components/current/LyricsSynced.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,GAAG;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,KAAK,SAAS,CAAC;CACpG,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,eAAe,EACf,aAAa,EACb,QAAQ,GACT,EAAE,iBAAiB,kDA8CnB;yBAvDe,YAAY"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export * from './texts';
|
|
2
2
|
export { Year } from './Year';
|
|
3
3
|
export { Lyrics } from './Lyrics';
|
|
4
|
+
export { LyricsSynced } from './LyricsSynced';
|
|
5
|
+
export type { LyricsSyncedProps } from './LyricsSynced';
|
|
6
|
+
export { Chapters } from './Chapters';
|
|
7
|
+
export type { ChaptersProps } from './Chapters';
|
|
4
8
|
export { FileUrl } from './FileUrl';
|
|
5
9
|
export { Artwork } from './Artwork';
|
|
6
10
|
export { QueueIndex, QueueLength, QueuePosition } from './QueueMeta';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/current/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/current/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GingerState, RepeatMode, Track } from '../types';
|
|
2
|
+
/** Fields used by next/prev/ended navigation; avoids coupling helpers to full `GingerState`. */
|
|
3
|
+
export type GingerPlaybackNavigationSlice = Pick<GingerState, "tracks" | "currentIndex" | "repeatMode" | "playbackMode">;
|
|
2
4
|
export type EndedTransition = {
|
|
3
5
|
kind: "replay_same";
|
|
4
6
|
} | {
|
|
@@ -11,9 +13,9 @@ export type EndedTransition = {
|
|
|
11
13
|
kind: "stop";
|
|
12
14
|
nextIndex: number;
|
|
13
15
|
};
|
|
14
|
-
export declare function computeEndedTransition(state:
|
|
15
|
-
export declare function computeNextIndex(state:
|
|
16
|
-
export declare function computePrevIndex(state:
|
|
16
|
+
export declare function computeEndedTransition(state: GingerPlaybackNavigationSlice): EndedTransition;
|
|
17
|
+
export declare function computeNextIndex(state: GingerPlaybackNavigationSlice): number;
|
|
18
|
+
export declare function computePrevIndex(state: GingerPlaybackNavigationSlice): number;
|
|
17
19
|
export declare function cycleRepeatMode(mode: RepeatMode): RepeatMode;
|
|
18
20
|
export declare function resolveArtworkUrl(track: Track | null, playlistArtwork?: string | null): string | undefined;
|
|
19
21
|
export declare function resolveAlbumLine(track: Track | null, playlistSubtitle?: string | null): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/core/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAG/D,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/core/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAG/D,gGAAgG;AAChG,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,WAAW,EACX,QAAQ,GAAG,cAAc,GAAG,YAAY,GAAG,cAAc,CAC1D,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,6BAA6B,GAAG,eAAe,CAS5F;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,6BAA6B,GAAG,MAAM,CAQ7E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,6BAA6B,GAAG,MAAM,CAQ7E;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,CAI5D;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAE1G;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAE1G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/experimental-gapless/index.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useGingerPlayback } from \"../context/GingerSplitContexts\";\n\nexport type ExperimentalGaplessState = {\n supported: false;\n reason: string;\n preloadedTrackIds: string[];\n};\n\n/**\n * Experimental-only helper surface.\n * This does not alter Ginger playback behavior.\n */\nexport function useExperimentalGapless(): ExperimentalGaplessState {\n const { tracks } = useGingerPlayback();\n return useMemo(\n () => ({\n supported: false as const,\n reason: \"Gapless playback requires dedicated Web Audio graph orchestration.\",\n preloadedTrackIds: tracks.map((track) => track.id ?? track.fileUrl),\n }),\n [tracks],\n );\n}\n"],"names":["useExperimentalGapless","tracks","useGingerPlayback","useMemo","track"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/experimental-gapless/index.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useGingerPlayback } from \"../context/GingerSplitContexts\";\n\nexport type ExperimentalGaplessState = {\n supported: false;\n reason: string;\n preloadedTrackIds: string[];\n};\n\n/**\n * Experimental-only helper surface.\n *\n * @deprecated This export is intentionally non-production and currently reports capabilities only.\n * It does not alter Ginger playback behavior.\n */\nexport function useExperimentalGapless(): ExperimentalGaplessState {\n const { tracks } = useGingerPlayback();\n return useMemo(\n () => ({\n supported: false as const,\n reason: \"Gapless playback requires dedicated Web Audio graph orchestration.\",\n preloadedTrackIds: tracks.map((track) => track.id ?? track.fileUrl),\n }),\n [tracks],\n );\n}\n"],"names":["useExperimentalGapless","tracks","useGingerPlayback","useMemo","track"],"mappings":"0JAeO,SAASA,GAAmD,CACjE,KAAM,CAAE,OAAAC,CAAA,EAAWC,oBAAA,EACnB,OAAOC,EAAAA,QACL,KAAO,CACL,UAAW,GACX,OAAQ,qEACR,kBAAmBF,EAAO,IAAKG,GAAUA,EAAM,IAAMA,EAAM,OAAO,CAAA,GAEpE,CAACH,CAAM,CAAA,CAEX"}
|
|
@@ -5,7 +5,9 @@ export type ExperimentalGaplessState = {
|
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* Experimental-only helper surface.
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* @deprecated This export is intentionally non-production and currently reports capabilities only.
|
|
10
|
+
* It does not alter Ginger playback behavior.
|
|
9
11
|
*/
|
|
10
12
|
export declare function useExperimentalGapless(): ExperimentalGaplessState;
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/experimental-gapless/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,KAAK,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/experimental-gapless/index.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,KAAK,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,wBAAwB,CAUjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/experimental-gapless/index.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useGingerPlayback } from \"../context/GingerSplitContexts\";\n\nexport type ExperimentalGaplessState = {\n supported: false;\n reason: string;\n preloadedTrackIds: string[];\n};\n\n/**\n * Experimental-only helper surface.\n * This does not alter Ginger playback behavior.\n */\nexport function useExperimentalGapless(): ExperimentalGaplessState {\n const { tracks } = useGingerPlayback();\n return useMemo(\n () => ({\n supported: false as const,\n reason: \"Gapless playback requires dedicated Web Audio graph orchestration.\",\n preloadedTrackIds: tracks.map((track) => track.id ?? track.fileUrl),\n }),\n [tracks],\n );\n}\n"],"names":["useExperimentalGapless","tracks","useGingerPlayback","useMemo","track"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/experimental-gapless/index.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useGingerPlayback } from \"../context/GingerSplitContexts\";\n\nexport type ExperimentalGaplessState = {\n supported: false;\n reason: string;\n preloadedTrackIds: string[];\n};\n\n/**\n * Experimental-only helper surface.\n *\n * @deprecated This export is intentionally non-production and currently reports capabilities only.\n * It does not alter Ginger playback behavior.\n */\nexport function useExperimentalGapless(): ExperimentalGaplessState {\n const { tracks } = useGingerPlayback();\n return useMemo(\n () => ({\n supported: false as const,\n reason: \"Gapless playback requires dedicated Web Audio graph orchestration.\",\n preloadedTrackIds: tracks.map((track) => track.id ?? track.fileUrl),\n }),\n [tracks],\n );\n}\n"],"names":["useExperimentalGapless","tracks","useGingerPlayback","useMemo","track"],"mappings":";;AAeO,SAASA,IAAmD;AACjE,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA;AACnB,SAAOC;AAAA,IACL,OAAO;AAAA,MACL,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,mBAAmBF,EAAO,IAAI,CAACG,MAAUA,EAAM,MAAMA,EAAM,OAAO;AAAA,IAAA;AAAA,IAEpE,CAACH,CAAM;AAAA,EAAA;AAEX;"}
|