@exode-team/react-recorder 1.0.3 → 1.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/{AudioRecorder.d.ts → components/AudioRecorder.d.ts} +1 -1
- package/dist/components/AudioRecorder.d.ts.map +1 -0
- package/dist/components/IdleControl/IdleControl.d.ts +13 -0
- package/dist/components/IdleControl/IdleControl.d.ts.map +1 -0
- package/dist/{atoms/IdleControlAtom.styled.d.ts → components/IdleControl/IdleControl.styled.d.ts} +2 -2
- package/dist/components/IdleControl/IdleControl.styled.d.ts.map +1 -0
- package/dist/{atoms/RecordingShellAtom.d.ts → components/RecordingShell/RecordingShell.d.ts} +4 -4
- package/dist/components/RecordingShell/RecordingShell.d.ts.map +1 -0
- package/dist/{atoms/RecordingShellAtom.styled.d.ts → components/RecordingShell/RecordingShell.styled.d.ts} +2 -2
- package/dist/components/RecordingShell/RecordingShell.styled.d.ts.map +1 -0
- package/dist/components/VoiceMessagePlayer/VoiceMessagePlayer.d.ts +16 -0
- package/dist/components/VoiceMessagePlayer/VoiceMessagePlayer.d.ts.map +1 -0
- package/dist/components/VoiceMessagePlayer/VoiceMessagePlayer.styled.d.ts +13 -0
- package/dist/components/VoiceMessagePlayer/VoiceMessagePlayer.styled.d.ts.map +1 -0
- package/dist/components/VoiceRecorderInput/VoiceRecorderInput.d.ts +22 -0
- package/dist/components/VoiceRecorderInput/VoiceRecorderInput.d.ts.map +1 -0
- package/dist/components/VoiceRecorderInput/VoiceRecorderInput.styled.d.ts +18 -0
- package/dist/components/VoiceRecorderInput/VoiceRecorderInput.styled.d.ts.map +1 -0
- package/dist/{atoms/WaveformBarsAtom.d.ts → components/WaveformBars/WaveformBars.d.ts} +4 -4
- package/dist/components/WaveformBars/WaveformBars.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +9 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useAudioPlayback.d.ts +19 -0
- package/dist/hooks/useAudioPlayback.d.ts.map +1 -0
- package/dist/hooks/useMediaRecorder.d.ts +27 -0
- package/dist/hooks/useMediaRecorder.d.ts.map +1 -0
- package/dist/hooks/useRecorderVisualization.d.ts +2 -0
- package/dist/hooks/useRecorderVisualization.d.ts.map +1 -1
- package/dist/hooks/useRecordingTiming.d.ts.map +1 -1
- package/dist/hooks/useVoiceMessagePlayer.d.ts +26 -0
- package/dist/hooks/useVoiceMessagePlayer.d.ts.map +1 -0
- package/dist/hooks/useVoiceRecorder.d.ts +0 -1
- package/dist/hooks/useVoiceRecorder.d.ts.map +1 -1
- package/dist/index.cjs +1328 -17616
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1324 -17620
- package/dist/index.js.map +1 -1
- package/dist/platform/animation-frame-adapter.d.ts +8 -0
- package/dist/platform/animation-frame-adapter.d.ts.map +1 -0
- package/dist/platform/audio-analyzer-adapter.d.ts +13 -0
- package/dist/platform/audio-analyzer-adapter.d.ts.map +1 -0
- package/dist/platform/audio-playback-adapter.d.ts +19 -0
- package/dist/platform/audio-playback-adapter.d.ts.map +1 -0
- package/dist/platform/audio-playback-manager.d.ts +14 -0
- package/dist/platform/audio-playback-manager.d.ts.map +1 -0
- package/dist/platform/index.d.ts +15 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/media-recorder-adapter.d.ts +20 -0
- package/dist/platform/media-recorder-adapter.d.ts.map +1 -0
- package/dist/platform/microphone.d.ts +9 -0
- package/dist/platform/microphone.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{types.d.ts → types/recorder.d.ts} +3 -20
- package/dist/types/recorder.d.ts.map +1 -0
- package/dist/types/upload.d.ts +24 -0
- package/dist/types/upload.d.ts.map +1 -0
- package/dist/utils/format.d.ts +7 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/math.d.ts +8 -0
- package/dist/utils/math.d.ts.map +1 -0
- package/package.json +5 -5
- package/dist/AudioRecorder.d.ts.map +0 -1
- package/dist/atoms/IdleControlAtom.d.ts +0 -13
- package/dist/atoms/IdleControlAtom.d.ts.map +0 -1
- package/dist/atoms/IdleControlAtom.styled.d.ts.map +0 -1
- package/dist/atoms/RecordingShellAtom.d.ts.map +0 -1
- package/dist/atoms/RecordingShellAtom.styled.d.ts.map +0 -1
- package/dist/atoms/WaveformBarsAtom.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
6
|
-
import { type StorageFileEntity, type StorageSpace, type UploadStrategy, type UseVoiceRecorderOptions } from '
|
|
6
|
+
import { type StorageFileEntity, type StorageSpace, type UploadStrategy, type UseVoiceRecorderOptions } from '../types';
|
|
7
7
|
type RecorderOptionOverrides = Omit<UseVoiceRecorderOptions<Partial<StorageFileEntity>>, 'space' | 'uploadId' | 'onUploaded' | 'uploader'>;
|
|
8
8
|
interface RecorderMessages {
|
|
9
9
|
buttons: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioRecorder.d.ts","sourceRoot":"","sources":["../../src/components/AudioRecorder.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC/B,MAAM,UAAU,CAAC;AAGlB,KAAK,uBAAuB,GAAG,IAAI,CAC/B,uBAAuB,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,EACnD,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CACnD,CAAC;AAEF,UAAU,gBAAgB;IACtB,OAAO,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACF,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,MAAM,EAAE;QACJ,cAAc,EAAE,MAAM,CAAC;KAC1B,CAAC;CACL;AAED,KAAK,qBAAqB,GAAG,OAAO,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9C,WAAW,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC7C,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC/C,CAAC,CAAC;AAEH,UAAU,KAAM,SAAQ,OAAO,CAAC,uBAAuB,CAAC;IACpD,QAAQ,EAAE,cAAc,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3E;AAoDD,QAAA,MAAM,aAAa,GAAI,OAAO,KAAK,QA8NlC,CAAC;AAGF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IdleControl
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
interface Props {
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
instruction: string;
|
|
9
|
+
startAriaLabel: string;
|
|
10
|
+
}
|
|
11
|
+
declare const IdleControl: (props: Props) => any;
|
|
12
|
+
export { IdleControl };
|
|
13
|
+
//# sourceMappingURL=IdleControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdleControl.d.ts","sourceRoot":"","sources":["../../../src/components/IdleControl/IdleControl.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,UAAU,KAAK;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAGD,QAAA,MAAM,WAAW,GAAI,OAAO,KAAK,QAsBhC,CAAC;AAGF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/{atoms/IdleControlAtom.styled.d.ts → components/IdleControl/IdleControl.styled.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* IdleControl styles
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
@@ -8,4 +8,4 @@ export declare const IdleButton: any;
|
|
|
8
8
|
export declare const IdleButtonOutline: any;
|
|
9
9
|
export declare const IdleButtonGlow: any;
|
|
10
10
|
export declare const IdleInstruction: any;
|
|
11
|
-
//# sourceMappingURL=
|
|
11
|
+
//# sourceMappingURL=IdleControl.styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdleControl.styled.d.ts","sourceRoot":"","sources":["../../../src/components/IdleControl/IdleControl.styled.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,WAAW,KAKvB,CAAC;AAEF,eAAO,MAAM,UAAU,KA0BtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,KAM7B,CAAC;AAEF,eAAO,MAAM,cAAc,KAY1B,CAAC;AAEF,eAAO,MAAM,eAAe,KAI3B,CAAC"}
|
package/dist/{atoms/RecordingShellAtom.d.ts → components/RecordingShell/RecordingShell.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* RecordingShell
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
@@ -28,6 +28,6 @@ interface Props {
|
|
|
28
28
|
onTogglePlayback: () => void;
|
|
29
29
|
formatTime: (seconds: number) => string;
|
|
30
30
|
}
|
|
31
|
-
declare const
|
|
32
|
-
export {
|
|
33
|
-
//# sourceMappingURL=
|
|
31
|
+
declare const RecordingShell: (props: Props) => any;
|
|
32
|
+
export { RecordingShell };
|
|
33
|
+
//# sourceMappingURL=RecordingShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordingShell.d.ts","sourceRoot":"","sources":["../../../src/components/RecordingShell/RecordingShell.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AA4BH,UAAU,KAAK;IACX,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAGD,QAAA,MAAM,cAAc,GAAI,OAAO,KAAK,QAyHnC,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* RecordingShell styles
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
@@ -14,4 +14,4 @@ export declare const Timer: any;
|
|
|
14
14
|
export declare const SendButton: any;
|
|
15
15
|
export declare const SpinnerSlot: any;
|
|
16
16
|
export declare const Spinner: any;
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=RecordingShell.styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordingShell.styled.d.ts","sourceRoot":"","sources":["../../../src/components/RecordingShell/RecordingShell.styled.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,OAAO,KAQnB,CAAC;AAEF,eAAO,MAAM,YAAY,KAqBxB,CAAC;AAEF,eAAO,MAAM,KAAK,KAQjB,CAAC;AAEF,eAAO,MAAM,YAAY,KA2CxB,CAAC;AAEF,eAAO,MAAM,QAAQ,KAOpB,CAAC;AAEF,eAAO,MAAM,IAAI,KAMhB,CAAC;AAEF,eAAO,MAAM,GAAG,KAOf,CAAC;AAEF,eAAO,MAAM,KAAK,KAKjB,CAAC;AAEF,eAAO,MAAM,UAAU,KAyBtB,CAAC;AAEF,eAAO,MAAM,WAAW,KAMvB,CAAC;AAEF,eAAO,MAAM,OAAO,KAoBnB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VoiceMessagePlayer
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
interface Props {
|
|
8
|
+
src: string;
|
|
9
|
+
duration?: number;
|
|
10
|
+
waveformData?: number[];
|
|
11
|
+
className?: string;
|
|
12
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const VoiceMessagePlayer: (props: Props) => any;
|
|
15
|
+
export { VoiceMessagePlayer };
|
|
16
|
+
//# sourceMappingURL=VoiceMessagePlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceMessagePlayer.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceMessagePlayer/VoiceMessagePlayer.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAkE,MAAM,OAAO,CAAC;AAsBvF,UAAU,KAAK;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CAC3C;AAGD,QAAA,MAAM,kBAAkB,GAAI,OAAO,KAAK,QA2HvC,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VoiceMessagePlayer styles
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
export declare const PlayerWrapper: any;
|
|
7
|
+
export declare const PlayButton: any;
|
|
8
|
+
export declare const ContentColumn: any;
|
|
9
|
+
export declare const WaveformTrack: any;
|
|
10
|
+
export declare const WaveformBar: any;
|
|
11
|
+
export declare const Duration: any;
|
|
12
|
+
export declare const LoadingSpinner: any;
|
|
13
|
+
//# sourceMappingURL=VoiceMessagePlayer.styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceMessagePlayer.styled.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceMessagePlayer/VoiceMessagePlayer.styled.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,aAAa,KAOzB,CAAC;AAEF,eAAO,MAAM,UAAU,KA8BtB,CAAC;AAEF,eAAO,MAAM,aAAa,KAMzB,CAAC;AAEF,eAAO,MAAM,aAAa,KAQzB,CAAC;AAEF,eAAO,MAAM,WAAW,KAKvB,CAAC;AAEF,eAAO,MAAM,QAAQ,KAMpB,CAAC;AAEF,eAAO,MAAM,cAAc,KAa1B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VoiceRecorderInput
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
import { type StorageSpace, type UploadStrategy } from '../../types';
|
|
7
|
+
interface Props {
|
|
8
|
+
uploader?: UploadStrategy<any>;
|
|
9
|
+
onUploaded?: (file: any) => void | Promise<void>;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
onSend?: (file: File, duration: number) => void | Promise<void>;
|
|
12
|
+
onError?: (error: unknown) => void;
|
|
13
|
+
onPermissionDenied?: (error: unknown) => void;
|
|
14
|
+
autoStart?: boolean;
|
|
15
|
+
mimeType?: string;
|
|
16
|
+
fileName?: string;
|
|
17
|
+
space?: StorageSpace;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const VoiceRecorderInput: (props: Props) => any;
|
|
21
|
+
export { VoiceRecorderInput };
|
|
22
|
+
//# sourceMappingURL=VoiceRecorderInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecorderInput.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceRecorderInput/VoiceRecorderInput.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH,OAAO,EAAE,KAAK,YAAY,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAuBvF,UAAU,KAAK;IACX,QAAQ,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,QAAA,MAAM,kBAAkB,GAAI,OAAO,KAAK,QAgWvC,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VoiceRecorderInput styles
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
export declare const Wrapper: any;
|
|
7
|
+
export declare const CancelButton: any;
|
|
8
|
+
export declare const RecordTrack: any;
|
|
9
|
+
/** Container for control buttons — auto-sized, no fixed width */
|
|
10
|
+
export declare const ButtonSlot: any;
|
|
11
|
+
export declare const StopButton: any;
|
|
12
|
+
export declare const WaveformArea: any;
|
|
13
|
+
export declare const Timer: any;
|
|
14
|
+
export declare const SendButton: any;
|
|
15
|
+
export declare const MicIndicator: any;
|
|
16
|
+
export declare const PlayPauseButton: any;
|
|
17
|
+
export declare const SpinnerIcon: any;
|
|
18
|
+
//# sourceMappingURL=VoiceRecorderInput.styled.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoiceRecorderInput.styled.d.ts","sourceRoot":"","sources":["../../../src/components/VoiceRecorderInput/VoiceRecorderInput.styled.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,eAAO,MAAM,OAAO,KAOnB,CAAC;AAEF,eAAO,MAAM,YAAY,KAkBxB,CAAC;AAEF,eAAO,MAAM,WAAW,KASvB,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,UAAU,KAKtB,CAAC;AAEF,eAAO,MAAM,UAAU,KA0BtB,CAAC;AAEF,eAAO,MAAM,YAAY,KAUxB,CAAC;AAEF,eAAO,MAAM,KAAK,KAMjB,CAAC;AAEF,eAAO,MAAM,UAAU,KAuBtB,CAAC;AAEF,eAAO,MAAM,YAAY,KAqBxB,CAAC;AAEF,eAAO,MAAM,eAAe,KAqB3B,CAAC;AAEF,eAAO,MAAM,WAAW,KAcvB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* WaveformBars
|
|
3
3
|
*
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
@@ -15,6 +15,6 @@ interface Props {
|
|
|
15
15
|
index: number;
|
|
16
16
|
}) => React.CSSProperties;
|
|
17
17
|
}
|
|
18
|
-
declare const
|
|
19
|
-
export {
|
|
20
|
-
//# sourceMappingURL=
|
|
18
|
+
declare const WaveformBars: (props: Props) => any;
|
|
19
|
+
export { WaveformBars };
|
|
20
|
+
//# sourceMappingURL=WaveformBars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaveformBars.d.ts","sourceRoot":"","sources":["../../../src/components/WaveformBars/WaveformBars.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,KAAK;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACjB,KAAK,KAAK,CAAC,aAAa,CAAC;CAC7B;AAGD,QAAA,MAAM,YAAY,GAAI,OAAO,KAAK,QA0BjC,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hooks barrel
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
export { useVoiceRecorder } from './useVoiceRecorder';
|
|
7
|
+
export { useRecorderVisualization } from './useRecorderVisualization';
|
|
8
|
+
export { useRecordingTiming } from './useRecordingTiming';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useAudioPlayback
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
interface UseAudioPlaybackResult {
|
|
7
|
+
audioURL: string | null;
|
|
8
|
+
isPlaying: boolean;
|
|
9
|
+
playbackTime: number;
|
|
10
|
+
playbackDuration: number;
|
|
11
|
+
mountBlob: (blob: Blob) => string;
|
|
12
|
+
togglePlayback: (onError?: (error: unknown) => void) => void;
|
|
13
|
+
stopPlayback: () => void;
|
|
14
|
+
resetPlayback: () => void;
|
|
15
|
+
cleanupAudioElement: () => void;
|
|
16
|
+
}
|
|
17
|
+
declare const useAudioPlayback: () => UseAudioPlaybackResult;
|
|
18
|
+
export { useAudioPlayback };
|
|
19
|
+
//# sourceMappingURL=useAudioPlayback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAudioPlayback.d.ts","sourceRoot":"","sources":["../../src/hooks/useAudioPlayback.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,UAAU,sBAAsB;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAClC,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;IAC7D,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,mBAAmB,EAAE,MAAM,IAAI,CAAC;CACnC;AAED,QAAA,MAAM,gBAAgB,QAAO,sBA2H5B,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useMediaRecorder
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
interface MediaRecorderCallbacks {
|
|
7
|
+
onDataChunk: (chunk: Blob) => void;
|
|
8
|
+
onNeedsPreview: (chunks: Blob[]) => void;
|
|
9
|
+
onStopped: (chunks: Blob[], discarded: boolean) => void;
|
|
10
|
+
onPaused: () => void;
|
|
11
|
+
onResumed: () => void;
|
|
12
|
+
onStreamAcquired: (stream: MediaStream) => void;
|
|
13
|
+
onPermissionDenied: (error: unknown) => void;
|
|
14
|
+
onError: (error: unknown) => void;
|
|
15
|
+
}
|
|
16
|
+
interface UseMediaRecorderResult {
|
|
17
|
+
isRecording: boolean;
|
|
18
|
+
isPaused: boolean;
|
|
19
|
+
startRecording: (mimeType: string) => Promise<void>;
|
|
20
|
+
stopRecording: () => void;
|
|
21
|
+
cancelRecording: () => void;
|
|
22
|
+
togglePause: () => void;
|
|
23
|
+
cleanupStream: () => void;
|
|
24
|
+
}
|
|
25
|
+
declare const useMediaRecorder: (callbacks: MediaRecorderCallbacks) => UseMediaRecorderResult;
|
|
26
|
+
export { useMediaRecorder };
|
|
27
|
+
//# sourceMappingURL=useMediaRecorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaRecorder.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaRecorder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,UAAU,sBAAsB;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,cAAc,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzC,SAAS,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,gBAAgB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAChD,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC;AAED,UAAU,sBAAsB;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,QAAA,MAAM,gBAAgB,GAAI,WAAW,sBAAsB,KAAG,sBAkI7D,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -8,11 +8,13 @@ interface UseRecorderVisualizationResult {
|
|
|
8
8
|
previewLevels: number[];
|
|
9
9
|
resetAudioLevels: () => void;
|
|
10
10
|
resetPreviewLevels: () => void;
|
|
11
|
+
resumeVisualization: () => void;
|
|
11
12
|
cleanupVisualization: () => void;
|
|
12
13
|
generatePreviewLevels: (blob: Blob) => Promise<void>;
|
|
13
14
|
initializeVisualization: (stream: MediaStream) => void;
|
|
14
15
|
stopVisualization: (options?: {
|
|
15
16
|
resetLevels?: boolean;
|
|
17
|
+
closeContext?: boolean;
|
|
16
18
|
}) => void;
|
|
17
19
|
}
|
|
18
20
|
declare const useRecorderVisualization: () => UseRecorderVisualizationResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRecorderVisualization.d.ts","sourceRoot":"","sources":["../../src/hooks/useRecorderVisualization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"useRecorderVisualization.d.ts","sourceRoot":"","sources":["../../src/hooks/useRecorderVisualization.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,UAAU,8BAA8B;IACpC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,qBAAqB,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,uBAAuB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACvD,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAC5F;AAGD,QAAA,MAAM,wBAAwB,QAAO,8BAyGpC,CAAC;AAGF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRecordingTiming.d.ts","sourceRoot":"","sources":["../../src/hooks/useRecordingTiming.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,UAAU,wBAAwB;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B;
|
|
1
|
+
{"version":3,"file":"useRecordingTiming.d.ts","sourceRoot":"","sources":["../../src/hooks/useRecordingTiming.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,UAAU,wBAAwB;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,QAAA,MAAM,kBAAkB,QAAO,wBAgF9B,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useVoiceMessagePlayer
|
|
3
|
+
*
|
|
4
|
+
* @author: exode <hello@exode.ru>
|
|
5
|
+
*/
|
|
6
|
+
interface UseVoiceMessagePlayerOptions {
|
|
7
|
+
src: string;
|
|
8
|
+
duration?: number;
|
|
9
|
+
waveformData?: number[];
|
|
10
|
+
}
|
|
11
|
+
interface UseVoiceMessagePlayerResult {
|
|
12
|
+
isPlaying: boolean;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
isLoaded: boolean;
|
|
15
|
+
currentTime: number;
|
|
16
|
+
duration: number;
|
|
17
|
+
progress: number;
|
|
18
|
+
waveformLevels: number[];
|
|
19
|
+
preload: () => void;
|
|
20
|
+
togglePlayback: () => void;
|
|
21
|
+
seekTo: (progress: number) => void;
|
|
22
|
+
formatTime: (seconds: number) => string;
|
|
23
|
+
}
|
|
24
|
+
declare const useVoiceMessagePlayer: (options: UseVoiceMessagePlayerOptions) => UseVoiceMessagePlayerResult;
|
|
25
|
+
export { useVoiceMessagePlayer };
|
|
26
|
+
//# sourceMappingURL=useVoiceMessagePlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVoiceMessagePlayer.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceMessagePlayer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,UAAU,4BAA4B;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,UAAU,2BAA2B;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3C;AAGD,QAAA,MAAM,qBAAqB,GAAI,SAAS,4BAA4B,KAAG,2BA0MtE,CAAC;AAGF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* @author: exode <hello@exode.ru>
|
|
5
5
|
*/
|
|
6
6
|
import type { UseVoiceRecorderOptions, UseVoiceRecorderResult } from '../types';
|
|
7
|
-
export declare const clampValue: (value: number, lowerBound?: number, upperBound?: number) => number;
|
|
8
7
|
declare function useVoiceRecorder<TFile = unknown>(props: UseVoiceRecorderOptions<TFile>): UseVoiceRecorderResult;
|
|
9
8
|
export { useVoiceRecorder };
|
|
10
9
|
//# sourceMappingURL=useVoiceRecorder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"useVoiceRecorder.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceRecorder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGhF,iBAAS,gBAAgB,CAAC,KAAK,GAAG,OAAO,EAAE,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,GAAG,sBAAsB,CAwOxG;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|