@leonardaustin/ui 0.20.0 → 0.22.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.
@@ -2,15 +2,34 @@ export interface AudioPlayerHandle {
2
2
  /** Seek in seconds, clamped to the recording. Queued until metadata loads. */
3
3
  seekTo: (seconds: number) => void;
4
4
  }
5
+ export type AudioPart = "skipBack" | "play" | "skipForward" | "time" | "currentTime" | "progress" | "duration" | "speed" | "mute" | "volume" | "download";
5
6
  export interface AudioPlayerProps {
6
7
  src: string;
8
+ /** Accessible group name; visible only with variant="card". */
7
9
  title?: string;
8
10
  preload?: "none" | "metadata" | "auto";
9
11
  onTimeUpdate?: (seconds: number) => void;
10
12
  onError?: (error: Error) => void;
11
13
  downloadHref?: string;
14
+ /** Download filename, used when downloadHref is set. */
15
+ downloadName?: string;
16
+ /** Plain controls by default; card adds a bordered surface and visible title. */
17
+ variant?: "plain" | "card";
18
+ /** Positive finite skip interval in seconds; false hides skip controls. */
19
+ skipSeconds?: number | false;
20
+ /** Show an optional mute toggle. Defaults to false. */
21
+ showMute?: boolean;
22
+ /** Space and K toggle playback on the focused seek slider. Defaults to true. */
23
+ keyboardShortcuts?: boolean;
24
+ /** Finite positive rates, sorted ascending with 1× always included. Defaults to [1, 1.25, 1.5, 2]. */
12
25
  playbackRates?: readonly number[];
13
26
  className?: string;
27
+ /** Native-style appearance; defaults to pill. */
28
+ appearance?: "pill" | "glass";
29
+ /** Only listed parts render, in order. Duplicates and unknown parts are ignored.
30
+ * Explicit skip parts use skipSeconds, or 10 when it is not finite and positive.
31
+ */
32
+ controls?: readonly AudioPart[];
14
33
  }
15
34
  export declare const AudioPlayer: import("react").ForwardRefExoticComponent<AudioPlayerProps & import("react").RefAttributes<AudioPlayerHandle>>;
16
35
  //# sourceMappingURL=AudioPlayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../../src/components/ui/AudioPlayer.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IACvC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,eAAO,MAAM,WAAW,gHAIvB,CAAC"}
1
+ {"version":3,"file":"AudioPlayer.d.ts","sourceRoot":"","sources":["../../../src/components/ui/AudioPlayer.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,iBAAiB;IAChC,8EAA8E;IAC9E,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AACD,MAAM,MAAM,SAAS,GACjB,UAAU,GACV,MAAM,GACN,aAAa,GACb,MAAM,GACN,aAAa,GACb,UAAU,GACV,UAAU,GACV,OAAO,GACP,MAAM,GACN,QAAQ,GACR,UAAU,CAAC;AAEf,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IACvC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,Y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