@vocalstack/player 0.0.0-stage → 0.1.0-alpha.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.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -2
  3. package/dist/core/audio.d.ts +39 -0
  4. package/dist/core/background.d.ts +54 -0
  5. package/dist/core/clipPrefetch.d.ts +38 -0
  6. package/dist/core/clipQueue.d.ts +130 -0
  7. package/dist/core/format.d.ts +17 -0
  8. package/dist/core/mediaKeys.d.ts +14 -0
  9. package/dist/core/noAudio.d.ts +18 -0
  10. package/dist/core/playPosition.d.ts +18 -0
  11. package/dist/core/qr.d.ts +2 -0
  12. package/dist/core/readalong.d.ts +17 -0
  13. package/dist/core/transcript.d.ts +126 -0
  14. package/dist/core/voiceFollow.d.ts +44 -0
  15. package/dist/core/voiceRetry.d.ts +2 -0
  16. package/dist/core/voiceplayer.d.ts +31 -0
  17. package/dist/core/youtube.d.ts +9 -0
  18. package/dist/data/connect.d.ts +14 -0
  19. package/dist/data/context.d.ts +60 -0
  20. package/dist/data/errors.d.ts +9 -0
  21. package/dist/data/i18n.d.ts +425 -0
  22. package/dist/data/prefs.d.ts +14 -0
  23. package/dist/data/transcript.d.ts +27 -0
  24. package/dist/data/tx.d.ts +37 -0
  25. package/dist/data/voicePreview.d.ts +15 -0
  26. package/dist/ds/Controls.d.ts +163 -0
  27. package/dist/ds/Icons.d.ts +141 -0
  28. package/dist/ds/LanguagePicker.d.ts +34 -0
  29. package/dist/index.d.ts +6 -0
  30. package/dist/index.js +5377 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/style.css +1 -0
  33. package/dist/ui/EndCard.d.ts +11 -0
  34. package/dist/ui/SideColumn.d.ts +49 -0
  35. package/dist/ui/VocalStackPlayer.d.ts +33 -0
  36. package/dist/ui/core.d.ts +227 -0
  37. package/dist/ui/full.d.ts +108 -0
  38. package/dist/ui/shared.d.ts +276 -0
  39. package/dist/ui/useDesk.d.ts +1 -0
  40. package/dist/ui/wait.d.ts +24 -0
  41. package/package.json +49 -4
@@ -0,0 +1,163 @@
1
+ import { type ReactNode } from 'react';
2
+ export declare function Card({ children, panel, inset, className, style }: {
3
+ children: ReactNode;
4
+ panel?: boolean;
5
+ inset?: boolean;
6
+ className?: string;
7
+ style?: React.CSSProperties;
8
+ }): import("react").JSX.Element;
9
+ export declare function Toggle({ checked, onChange, label, disabled }: {
10
+ checked: boolean;
11
+ onChange: (v: boolean) => void;
12
+ label: string;
13
+ disabled?: boolean;
14
+ }): import("react").JSX.Element;
15
+ export declare function TextField({ label, value, onChange, onKeyDown, type, placeholder, hint, error, mono, inputMode, autoComplete, ariaLabel }: {
16
+ label?: string;
17
+ value: string;
18
+ onChange: (v: string) => void;
19
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
20
+ type?: string;
21
+ placeholder?: string;
22
+ hint?: ReactNode;
23
+ error?: string;
24
+ mono?: boolean;
25
+ inputMode?: React.HTMLAttributes<HTMLInputElement>['inputMode'];
26
+ autoComplete?: string;
27
+ ariaLabel?: string;
28
+ }): import("react").JSX.Element;
29
+ export interface SwitchOption<T extends string> {
30
+ value: T;
31
+ label: ReactNode;
32
+ icon?: ReactNode;
33
+ }
34
+ export declare function Checkbox({ checked, indeterminate, disabled, label, title, size, onChange }: {
35
+ checked?: boolean;
36
+ indeterminate?: boolean;
37
+ disabled?: boolean;
38
+ label?: string;
39
+ title?: string;
40
+ size?: 'sm';
41
+ onChange?: (v: boolean) => void;
42
+ }): import("react").JSX.Element;
43
+ export declare function Tooltip({ open, onDismiss, content, side, align, width, children }: {
44
+ open: boolean;
45
+ onDismiss: () => void;
46
+ content: ReactNode;
47
+ side?: 'top' | 'bottom';
48
+ align?: 'start' | 'center' | 'end';
49
+ width?: number;
50
+ children: ReactNode;
51
+ }): import("react").JSX.Element;
52
+ export declare function Switch<T extends string>({ value, onChange, options, size, bordered, fill }: {
53
+ value: T;
54
+ onChange: (v: T) => void;
55
+ options: SwitchOption<T>[];
56
+ size?: 'sm';
57
+ bordered?: boolean;
58
+ fill?: boolean;
59
+ }): import("react").JSX.Element;
60
+ export declare function IconButton({ children, onClick, label, size, variant, bordered, active, title }: {
61
+ children: ReactNode;
62
+ onClick?: () => void;
63
+ label: string;
64
+ size?: 'sm';
65
+ variant?: 'default' | 'primary';
66
+ bordered?: boolean;
67
+ active?: boolean;
68
+ title?: string;
69
+ }): import("react").JSX.Element;
70
+ export declare function LanguageChip({ flag, code, label, onClick, variant, block, bordered, size, style }: {
71
+ flag: ReactNode;
72
+ code: string;
73
+ label?: string;
74
+ onClick?: () => void;
75
+ variant?: 'primary';
76
+ block?: boolean;
77
+ bordered?: boolean;
78
+ size?: 'sm';
79
+ style?: React.CSSProperties;
80
+ }): import("react").JSX.Element;
81
+ export declare function CopyButton({ value, label, onCopied }: {
82
+ value: string;
83
+ label?: string;
84
+ onCopied?: () => void;
85
+ }): import("react").JSX.Element;
86
+ export declare function Copyable({ value, label }: {
87
+ value: string;
88
+ label?: string;
89
+ }): import("react").JSX.Element;
90
+ export declare function GrowBox({ children, ms }: {
91
+ children: ReactNode;
92
+ ms?: number;
93
+ }): import("react").JSX.Element;
94
+ export declare function Sheet({ open, onClose, title, titleNode, note, doneLabel, children, drawer, header, kind, sticky }: {
95
+ open: boolean;
96
+ onClose: () => void;
97
+ title: string;
98
+ titleNode?: ReactNode;
99
+ note?: string;
100
+ doneLabel?: string;
101
+ children: ReactNode;
102
+ drawer?: boolean;
103
+ header?: ReactNode;
104
+ kind?: string;
105
+ sticky?: boolean;
106
+ }): import("react").JSX.Element | null;
107
+ export interface ModalAction {
108
+ label: string;
109
+ variant?: 'primary' | 'danger' | 'ghost';
110
+ onClick: () => void;
111
+ }
112
+ export declare function Modal({ open, onClose, title, body, actions, children, dismissible, zIndex, width, page }: {
113
+ open: boolean;
114
+ onClose: () => void;
115
+ title?: string;
116
+ body?: ReactNode;
117
+ actions?: ModalAction[];
118
+ children?: ReactNode;
119
+ dismissible?: boolean;
120
+ zIndex?: number;
121
+ width?: number;
122
+ page?: boolean;
123
+ }): import("react").JSX.Element | null;
124
+ export declare function LiveBadge({ state, label, size, tone }: {
125
+ state: 'live' | 'paused' | 'ended' | 'starting' | 'idle';
126
+ label?: string;
127
+ size?: 'sm';
128
+ tone?: 'muted';
129
+ }): import("react").JSX.Element;
130
+ export declare function RecordButton({ state, onClick, size, disabled, label }: {
131
+ state: 'idle' | 'connecting' | 'recording' | 'paused' | 'captured' | 'warming' | 'ended';
132
+ onClick?: () => void;
133
+ size?: 'sm' | 'md';
134
+ disabled?: boolean;
135
+ label?: string;
136
+ }): import("react").JSX.Element;
137
+ export declare const MenuBadge: import("react").Context<number>;
138
+ export declare function MenuBadgeDot(): import("react").JSX.Element | null;
139
+ export declare function ScreenHeader({ onBack, backLabel, leading, center, centerAlign, onCenter, centerLabel, title, avatar, badge, subtitle, actions, onMenu, menuActive, showMenu, headerRef, frost }: {
140
+ onBack?: () => void;
141
+ backLabel?: string;
142
+ leading?: ReactNode;
143
+ center?: ReactNode;
144
+ centerAlign?: 'start' | 'center';
145
+ onCenter?: () => void;
146
+ centerLabel?: string;
147
+ title?: string;
148
+ avatar?: ReactNode;
149
+ badge?: ReactNode;
150
+ subtitle?: ReactNode;
151
+ actions?: ReactNode;
152
+ onMenu?: () => void;
153
+ menuActive?: boolean;
154
+ showMenu?: boolean;
155
+ headerRef?: React.Ref<HTMLDivElement>;
156
+ frost?: boolean;
157
+ }): import("react").JSX.Element;
158
+ export declare function Eyebrow({ children, style, className }: {
159
+ children: ReactNode;
160
+ style?: React.CSSProperties;
161
+ className?: string;
162
+ }): import("react").JSX.Element;
163
+ export declare function portalTheme(): 'dark' | 'light';
@@ -0,0 +1,141 @@
1
+ /** Heroicons v2 outline paths (24px, stroke 1.5) used by the app, as
2
+ * they appear in the design. `currentColor` throughout. */
3
+ import type { SVGProps } from 'react';
4
+ export declare const SITE = "https://vocalstack.com";
5
+ type P = SVGProps<SVGSVGElement> & {
6
+ size?: number;
7
+ stroke?: string;
8
+ sw?: number;
9
+ };
10
+ export declare const D: {
11
+ plus: string;
12
+ check: string;
13
+ downloaded: string;
14
+ chevronRight: string;
15
+ chevronLeft: string;
16
+ chevronDown: string;
17
+ external: string;
18
+ arrowLeft: string;
19
+ arrowRight: string;
20
+ volumeOffSpk: string;
21
+ notice: string;
22
+ close: string;
23
+ search: string;
24
+ info: string;
25
+ pencil: string;
26
+ infoNote: string;
27
+ copy: string;
28
+ extLink: string;
29
+ pin: string;
30
+ pencilEdit: string;
31
+ squarePen: string;
32
+ voiceClone: string;
33
+ headphonesOff: string;
34
+ broadcast: string;
35
+ globeAlt: string;
36
+ uturn: string;
37
+ tabGauge: string;
38
+ tabScript: string;
39
+ tabFix: string;
40
+ pencilFix: string;
41
+ tabEnding: string;
42
+ tabSummary: string;
43
+ tabExport: string;
44
+ tabSettings: string;
45
+ tabSources: string;
46
+ textLines: string;
47
+ mic: string;
48
+ signal: string;
49
+ checkCircle: string;
50
+ warnCircle: string;
51
+ infoCircle: string;
52
+ discard: string;
53
+ micOff: string[];
54
+ venus: string;
55
+ mars: string;
56
+ language: string;
57
+ langAuto: string;
58
+ share: string;
59
+ users: string;
60
+ globe: string;
61
+ clock: string;
62
+ bolt: string;
63
+ sparkles: string;
64
+ viewfinder: string;
65
+ speaker: string;
66
+ warnTri: string[];
67
+ checkThick: string;
68
+ warn: string;
69
+ link: string;
70
+ archive: string;
71
+ restore: string;
72
+ archiveDown: string;
73
+ lockRow: string;
74
+ userRow: string;
75
+ usersRow: string;
76
+ upload: string;
77
+ music: string;
78
+ trash: string;
79
+ qr: string;
80
+ lockOpen: string;
81
+ calendar: string;
82
+ lock: string;
83
+ user: string;
84
+ userGroup: string;
85
+ home: string;
86
+ cog: string;
87
+ docs: string;
88
+ speakerOne: string;
89
+ cc: string;
90
+ ccOff: string;
91
+ volume: string;
92
+ volumeOff: string;
93
+ volumeSq: string;
94
+ volumeOffSq: string;
95
+ book: string;
96
+ headphones: string[];
97
+ video: string;
98
+ squares: string;
99
+ code: string;
100
+ card: string;
101
+ };
102
+ export declare function Icon({ d, ...rest }: Omit<P, 'd'> & {
103
+ d: string | string[];
104
+ }): import("react").JSX.Element;
105
+ export declare function AppsGlyph({ size }: {
106
+ size?: number;
107
+ }): import("react").JSX.Element;
108
+ export declare function MenuGlyph({ size, r }: {
109
+ size?: number;
110
+ r?: number;
111
+ }): import("react").JSX.Element;
112
+ export declare function StopGlyph({ size }: {
113
+ size?: number;
114
+ }): import("react").JSX.Element;
115
+ export declare function PlayGlyph({ size }: {
116
+ size?: number;
117
+ }): import("react").JSX.Element;
118
+ export declare function Spinner({ size, color, track, sw }: {
119
+ size?: number;
120
+ color?: string;
121
+ track?: string;
122
+ sw?: number;
123
+ }): import("react").JSX.Element;
124
+ export declare function PauseGlyph({ size }: {
125
+ size?: number;
126
+ }): import("react").JSX.Element;
127
+ export declare function EqBars({ bars, height, color }: {
128
+ bars?: number;
129
+ height?: number;
130
+ color?: string;
131
+ }): import("react").JSX.Element;
132
+ export declare function Logo({ dark, height, link }: {
133
+ dark: boolean;
134
+ height?: number;
135
+ link?: boolean;
136
+ }): import("react").JSX.Element;
137
+ export declare function Mark({ dark, size }: {
138
+ dark: boolean;
139
+ size?: number;
140
+ }): import("react").JSX.Element;
141
+ export {};
@@ -0,0 +1,34 @@
1
+ export interface PickerLanguage {
2
+ code: string;
3
+ label: string;
4
+ native: string;
5
+ flag: string;
6
+ voice?: boolean;
7
+ live?: boolean;
8
+ }
9
+ export interface LanguageListProps {
10
+ value: string | null;
11
+ onSelect: (code: string | null) => void;
12
+ languages: PickerLanguage[];
13
+ searchPlaceholder?: string;
14
+ none?: string;
15
+ pinned?: string[];
16
+ recent?: string[];
17
+ requireVoice?: boolean;
18
+ keepOpen?: boolean;
19
+ busy?: string | null;
20
+ }
21
+ export declare function useLanguageList({ open, onClose, value, onSelect, languages, searchPlaceholder, none, pinned, recent, requireVoice, keepOpen, busy }: LanguageListProps & {
22
+ open: boolean;
23
+ onClose: () => void;
24
+ }): {
25
+ search: import("react").JSX.Element;
26
+ list: import("react").JSX.Element;
27
+ };
28
+ export declare function LanguagePicker({ open, onClose, title, note, sticky, ...rest }: LanguageListProps & {
29
+ open: boolean;
30
+ onClose: () => void;
31
+ title: string;
32
+ note?: string;
33
+ sticky?: boolean;
34
+ }): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import './styles.css';
2
+ export { VocalStackPlayer, type VocalStackPlayerProps, type PlayerSettings } from './ui/VocalStackPlayer';
3
+ export type { EndCardOptions } from './ui/EndCard';
4
+ export type { PlayerSource, TokenSource } from './data/context';
5
+ export type { ErrorLike } from './data/errors';
6
+ export { setErrorReporter } from './core/audio';