@apple-pie/slice 0.1.22 → 0.1.23
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/cjs/chunks/AudioBubble-v4xKclI8.js +54 -0
- package/dist/cjs/chunks/{Button-KGA0e9-0.js → Button-DmWbooXb.js} +1 -1
- package/dist/cjs/chunks/{FileList-CIRALfrW.js → FileList-DjTXjXnK.js} +1 -1
- package/dist/cjs/chunks/{ProgressIndicator-DETWiASA.js → ProgressIndicator-8QZwTSyY.js} +3 -2
- package/dist/cjs/chunks/{PromptInput-DUxwal3V.js → PromptInput-D1wP5-uN.js} +1 -1
- package/dist/cjs/chunks/{TextArea-mSespe9z.js → TextArea-rWqDDui3.js} +1 -1
- package/dist/cjs/chunks/{TextField-Cz2lh-fP.js → TextField-C6U-qhDt.js} +1 -1
- package/dist/cjs/chunks/{UploadArea-CtvvqLU7.js → UploadArea-BS2BPuhZ.js} +1 -1
- package/dist/cjs/chunks/audioVisualizer-EIfIjWH7.js +60 -0
- package/dist/cjs/components/AudioBubble/index.js +10 -0
- package/dist/cjs/components/Button/index.js +2 -2
- package/dist/cjs/components/FileList/index.js +2 -2
- package/dist/cjs/components/Progress/index.js +1 -1
- package/dist/cjs/components/PromptInput/index.js +4 -4
- package/dist/cjs/components/TextArea/index.js +3 -3
- package/dist/cjs/components/Textfield/index.js +3 -3
- package/dist/cjs/components/UploadArea/index.js +3 -3
- package/dist/cjs/hooks/useAudioRecorder.js +70 -0
- package/dist/cjs/hooks/useMicrophone.js +132 -0
- package/dist/cjs/hooks.js +3 -2
- package/dist/cjs/index.js +14 -12
- package/dist/cjs/utils/index.js +3 -3
- package/dist/cjs/utils/objects/index.js +3 -3
- package/dist/esm/chunks/AudioBubble-Dvsrq1dZ.mjs +62 -0
- package/dist/esm/chunks/{Avatar-CSLVUF_y.mjs → Avatar-C8uV7ROZ.mjs} +2 -2
- package/dist/esm/chunks/{AvatarGroup--ELW-bO1.mjs → AvatarGroup-Bt1Lkn5S.mjs} +2 -2
- package/dist/esm/chunks/{Badge-DyICxZP2.mjs → Badge-D-U1jomY.mjs} +1 -1
- package/dist/esm/chunks/{Button-Bp51g5jC.mjs → Button-sEYjFcR2.mjs} +5 -5
- package/dist/esm/chunks/{ButtonBar-BK-uB7oe.mjs → ButtonBar-DSR2lhhN.mjs} +3 -3
- package/dist/esm/chunks/{Camera-BYi_Aqbl.mjs → Camera-DSSiOeJd.mjs} +4 -4
- package/dist/esm/chunks/{CheckBox-BB5olQbT.mjs → CheckBox-B6zWSySW.mjs} +3 -3
- package/dist/esm/chunks/{Chip-CxqFCtT6.mjs → Chip-BBKJ6wG4.mjs} +3 -3
- package/dist/esm/chunks/{DivInput-DeSpC8Wm.mjs → DivInput-cIMIH07H.mjs} +2 -2
- package/dist/esm/chunks/{Dot-CLGwQu-i.mjs → Dot-Cj6gWj4_.mjs} +1 -1
- package/dist/esm/chunks/{DrggablePanel-BfBCRXa8.mjs → DrggablePanel-CQcIbxpX.mjs} +2 -2
- package/dist/esm/chunks/{DropDown-CK-sPjsQ.mjs → DropDown-B98ZoY1x.mjs} +3 -3
- package/dist/esm/chunks/{ErrorSummary-BNdjCQbn.mjs → ErrorSummary-Mz9siVxm.mjs} +1 -1
- package/dist/esm/chunks/{FileIcon-BXKnFJBn.mjs → FileIcon-DeW-ZBiv.mjs} +2 -2
- package/dist/esm/chunks/{FileList-CyUhkk-m.mjs → FileList-0Dzx15hl.mjs} +5 -5
- package/dist/esm/chunks/{Grouper-Daz1o_Ai.mjs → Grouper-B04WxD6K.mjs} +3 -3
- package/dist/esm/chunks/{Icon-CbwaBi0l.mjs → Icon-KDwlMXzH.mjs} +2 -2
- package/dist/esm/chunks/{IconButton-BKZD9jsp.mjs → IconButton-oAB8ZFTf.mjs} +4 -4
- package/dist/esm/chunks/{IndexedDB-CJgzPHPB.mjs → IndexedDB-Dk7a4fPS.mjs} +1 -1
- package/dist/esm/chunks/{Label-QTsUvGme.mjs → Label-BD7VlTDw.mjs} +2 -2
- package/dist/esm/chunks/{Overlay-TOzZXnwF.mjs → Overlay-3KkyDm1f.mjs} +1 -1
- package/dist/esm/chunks/{Pager-BYT7_mCb.mjs → Pager-DmiwYLl5.mjs} +2 -2
- package/dist/esm/chunks/{ProgressIndicator-Cg7CCrAE.mjs → ProgressIndicator-CxsZm_As.mjs} +5 -4
- package/dist/esm/chunks/{PromptInput-DJInpjRX.mjs → PromptInput-D4Q-DWjz.mjs} +3 -3
- package/dist/esm/chunks/{RadioButton-CYp8RkDK.mjs → RadioButton-B0jvM5VW.mjs} +3 -3
- package/dist/esm/chunks/{RadioButtonList-BSzV9Zz-.mjs → RadioButtonList-DBRAv87_.mjs} +3 -3
- package/dist/esm/chunks/{Slider-DL2iuNlh.mjs → Slider-CONGTXUE.mjs} +2 -2
- package/dist/esm/chunks/{Spacer-BlgEdKEM.mjs → Spacer-C5fcJYq-.mjs} +1 -1
- package/dist/esm/chunks/{Switch-BhCOo5Lu.mjs → Switch-CyoaJwSX.mjs} +1 -1
- package/dist/esm/chunks/{TabBar-Dd5-VZcG.mjs → TabBar-DmO1ixBz.mjs} +4 -4
- package/dist/esm/chunks/{TextArea-C_2D7sZV.mjs → TextArea-Bd_obSSH.mjs} +2 -2
- package/dist/esm/chunks/{TextField-RG1AsLTh.mjs → TextField-CZnUNhFe.mjs} +5 -5
- package/dist/esm/chunks/{Tip-BnKB9qMi.mjs → Tip-DrQvxDsH.mjs} +2 -2
- package/dist/esm/chunks/{Toast-BfuKRAns.mjs → Toast-C5XSDgno.mjs} +3 -3
- package/dist/esm/chunks/{UploadArea-ByvnUxhr.mjs → UploadArea-Gpq-MhqB.mjs} +4 -4
- package/dist/esm/chunks/{WSConnection-D9mpsVdc.mjs → WSConnection-DV7k84B4.mjs} +1 -1
- package/dist/esm/chunks/{_types-CPrEyJX9.mjs → _types-DOQAaLqq.mjs} +1 -1
- package/dist/esm/chunks/audioVisualizer-ZgT77nUw.mjs +60 -0
- package/dist/esm/chunks/{localDBStore-B4jkR5Jx.mjs → localDBStore-Dnpo5nSv.mjs} +2 -2
- package/dist/esm/chunks/{misc-N8KLjOXc.mjs → misc-BeEWwOaJ.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-2JIpEKfz.mjs → sseStore-DjrfpNAS.mjs} +1 -1
- package/dist/esm/chunks/{tslib.es6-c-7TIv71.mjs → tslib.es6-C-olHjXV.mjs} +1 -1
- package/dist/esm/chunks/{uploads-worker-Dv-4zGnC.mjs → uploads-worker-7X9EwX9N.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-D69fEXMY.mjs → uploadsStore-B7VECR5Q.mjs} +1 -1
- package/dist/esm/chunks/{windowStore-BOTh1g37.mjs → windowStore-CAzx2-QV.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +31 -0
- package/dist/esm/components/Avatar/index.mjs +3 -3
- package/dist/esm/components/AvatarGroup/index.mjs +4 -4
- package/dist/esm/components/Badge/index.mjs +2 -2
- package/dist/esm/components/Button/index.mjs +7 -7
- package/dist/esm/components/ButtonBar/index.mjs +4 -4
- package/dist/esm/components/Camera/index.mjs +5 -5
- package/dist/esm/components/CheckBox/index.mjs +4 -4
- package/dist/esm/components/Chip/index.mjs +4 -4
- package/dist/esm/components/DivInput/index.mjs +3 -3
- package/dist/esm/components/Dot/index.mjs +2 -2
- package/dist/esm/components/DraggablePanel/index.mjs +3 -3
- package/dist/esm/components/DropDown/index.mjs +4 -4
- package/dist/esm/components/ErrorSummary/index.mjs +2 -2
- package/dist/esm/components/FileIcon/index.mjs +3 -3
- package/dist/esm/components/FileList/index.mjs +6 -6
- package/dist/esm/components/FlexDiv/index.mjs +2 -2
- package/dist/esm/components/Grouper/index.mjs +5 -5
- package/dist/esm/components/Icon/index.mjs +3 -3
- package/dist/esm/components/IconButton/index.mjs +6 -6
- package/dist/esm/components/Label/index.mjs +3 -3
- package/dist/esm/components/Overlay/index.mjs +2 -2
- package/dist/esm/components/Pager/index.mjs +3 -3
- package/dist/esm/components/Progress/index.mjs +4 -4
- package/dist/esm/components/PromptInput/index.mjs +10 -10
- package/dist/esm/components/RadioButton/index.mjs +4 -4
- package/dist/esm/components/RadioButtonList/index.mjs +5 -5
- package/dist/esm/components/Slider/index.mjs +3 -3
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -2
- package/dist/esm/components/TabBar/index.mjs +7 -7
- package/dist/esm/components/TextArea/index.mjs +8 -8
- package/dist/esm/components/Textfield/index.mjs +9 -9
- package/dist/esm/components/Tip/index.mjs +3 -3
- package/dist/esm/components/Toast/index.mjs +4 -4
- package/dist/esm/components/UploadArea/index.mjs +7 -7
- package/dist/esm/hooks/useAudioRecorder.mjs +74 -0
- package/dist/esm/hooks/useMdStreamBuffer.mjs +1 -1
- package/dist/esm/hooks/useMicrophone.mjs +134 -0
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +5 -1
- package/dist/esm/index.mjs +47 -39
- package/dist/esm/stores/LocalDB.mjs +3 -3
- package/dist/esm/stores/SSE.mjs +2 -2
- package/dist/esm/stores/WS.mjs +2 -2
- package/dist/esm/stores/uploads.mjs +3 -3
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +7 -7
- package/dist/esm/utils/index.mjs +6 -4
- package/dist/esm/utils/objects/index.mjs +5 -3
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/types/components/AudioBubble/AudioBubble.d.ts +3 -0
- package/dist/types/components/AudioBubble/_types.d.ts +18 -0
- package/dist/types/components/AudioBubble/index.d.ts +2 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useAudioRecorder/useAudioRecorder.d.ts +14 -0
- package/dist/types/hooks/useMicrophone/useMicrophone.d.ts +19 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +86 -0
- package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +11 -0
- package/dist/types/utils/objects/audioVisualizer/audioVisualizer.d.ts +40 -0
- package/dist/types/utils/objects/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { _ as __awaiter } from "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
2
|
+
|
|
3
|
+
import { useRef, useState, useCallback, useMemo, useEffect } from "react";
|
|
4
|
+
|
|
5
|
+
function useMicrophone(startMuted = !0, microphoneDeviceId) {
|
|
6
|
+
const micStream = useRef(null), micTrack = useRef(null), mutedRef = useRef(startMuted), mountedRef = useRef(!0), initializedRef = useRef(!1), [microphones, setMicrophones] = useState([]), [muted, setMuted] = useState(startMuted), [isRequesting, setIsRequesting] = useState(!1), [error, setError] = useState(null), waitForPaint = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
7
|
+
yield new Promise(resolve => {
|
|
8
|
+
requestAnimationFrame(() => resolve());
|
|
9
|
+
});
|
|
10
|
+
}), []), waitForTrackToBecomeActive = useCallback(track => __awaiter(this, void 0, void 0, function*() {
|
|
11
|
+
("live" !== track.readyState || track.muted) && (yield new Promise(resolve => {
|
|
12
|
+
const handleUnmute = () => {
|
|
13
|
+
track.removeEventListener("unmute", handleUnmute), resolve();
|
|
14
|
+
};
|
|
15
|
+
track.addEventListener("unmute", handleUnmute, {
|
|
16
|
+
once: !0
|
|
17
|
+
});
|
|
18
|
+
}));
|
|
19
|
+
}), []), stopMicStream = useCallback(() => {
|
|
20
|
+
var _a;
|
|
21
|
+
const tracks = null === (_a = micStream.current) || void 0 === _a ? void 0 : _a.getTracks();
|
|
22
|
+
for (const track of null != tracks ? tracks : []) track.stop();
|
|
23
|
+
micStream.current = null, micTrack.current = null;
|
|
24
|
+
}, []), hasMediaSupport = useMemo(() => {
|
|
25
|
+
var _a;
|
|
26
|
+
return "undefined" != typeof navigator && Boolean(null === (_a = navigator.mediaDevices) || void 0 === _a ? void 0 : _a.getUserMedia);
|
|
27
|
+
}, []), getMicTrack = useCallback(() => {
|
|
28
|
+
if (!micStream.current) throw new Error("No microphone stream found");
|
|
29
|
+
const audioTrack = micStream.current.getAudioTracks()[0];
|
|
30
|
+
if (!audioTrack) throw new Error("No audio track found");
|
|
31
|
+
return audioTrack;
|
|
32
|
+
}, []), muteMic = useCallback(() => (getMicTrack().enabled = !1, mutedRef.current = !0,
|
|
33
|
+
setMuted(!0), !0), [ getMicTrack ]), unmuteMic = useCallback(() => (getMicTrack().enabled = !0,
|
|
34
|
+
mutedRef.current = !1, setMuted(!1), !0), [ getMicTrack ]), constraints = useCallback(deviceId => {
|
|
35
|
+
var _a;
|
|
36
|
+
const id = null !== (_a = null != deviceId ? deviceId : microphoneDeviceId) && void 0 !== _a ? _a : void 0;
|
|
37
|
+
return {
|
|
38
|
+
audio: {
|
|
39
|
+
deviceId: id ? {
|
|
40
|
+
exact: id
|
|
41
|
+
} : void 0
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}, [ microphoneDeviceId ]), requestMicrophone = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
45
|
+
if (setIsRequesting(!0), yield waitForPaint(), !hasMediaSupport) {
|
|
46
|
+
const nextError = new Error("Microphone access is not supported");
|
|
47
|
+
return setError(nextError), mountedRef.current && setIsRequesting(!1), null;
|
|
48
|
+
}
|
|
49
|
+
setError(null), stopMicStream();
|
|
50
|
+
try {
|
|
51
|
+
return micStream.current = yield navigator.mediaDevices.getUserMedia(constraints()),
|
|
52
|
+
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
53
|
+
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current)), micStream.current;
|
|
54
|
+
} catch (error) {
|
|
55
|
+
if (!(error instanceof DOMException && "OverconstrainedError" === error.name || error instanceof DOMException && "NotFoundError" === error.name)) {
|
|
56
|
+
const nextError = error instanceof Error ? error : new Error("Failed to access microphone");
|
|
57
|
+
throw setError(nextError), nextError;
|
|
58
|
+
}
|
|
59
|
+
return micStream.current = yield navigator.mediaDevices.getUserMedia({
|
|
60
|
+
audio: !0
|
|
61
|
+
}), micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
62
|
+
micStream.current;
|
|
63
|
+
} finally {
|
|
64
|
+
setIsRequesting(!1);
|
|
65
|
+
}
|
|
66
|
+
}), [ constraints, getMicTrack, hasMediaSupport, stopMicStream, waitForPaint, waitForTrackToBecomeActive ]), refreshMicrophones = useCallback(() => __awaiter(this, void 0, void 0, function*() {
|
|
67
|
+
if (!hasMediaSupport) return [];
|
|
68
|
+
try {
|
|
69
|
+
const devices = yield navigator.mediaDevices.enumerateDevices(), mics = devices.filter(device => "audioinput" === device.kind);
|
|
70
|
+
return setMicrophones(mics), devices.filter(device => "audioinput" === device.kind);
|
|
71
|
+
} catch (error) {
|
|
72
|
+
return console.warn("Error getting microphone devices:", error), setMicrophones([]),
|
|
73
|
+
[];
|
|
74
|
+
}
|
|
75
|
+
}), [ hasMediaSupport ]), setMicrophone = useCallback(deviceId => __awaiter(this, void 0, void 0, function*() {
|
|
76
|
+
setIsRequesting(!0), yield waitForPaint();
|
|
77
|
+
try {
|
|
78
|
+
if (!deviceId) return;
|
|
79
|
+
setError(null), stopMicStream(), micStream.current = yield navigator.mediaDevices.getUserMedia(constraints(deviceId)),
|
|
80
|
+
micTrack.current = getMicTrack(), micTrack.current.enabled = !mutedRef.current,
|
|
81
|
+
mutedRef.current || (yield waitForTrackToBecomeActive(micTrack.current));
|
|
82
|
+
} catch (err) {
|
|
83
|
+
setError(err instanceof Error ? err : new Error("Error switching microphone")),
|
|
84
|
+
console.warn("Error switching microphone:", err);
|
|
85
|
+
} finally {
|
|
86
|
+
setIsRequesting(!1);
|
|
87
|
+
}
|
|
88
|
+
}), [ constraints, getMicTrack, stopMicStream, waitForPaint, waitForTrackToBecomeActive ]), toggleMute = useCallback(() => {
|
|
89
|
+
try {
|
|
90
|
+
muted ? unmuteMic() : muteMic();
|
|
91
|
+
} catch (error) {
|
|
92
|
+
return void console.warn("Error toggling microphone mute:", error);
|
|
93
|
+
}
|
|
94
|
+
}, [ muted, unmuteMic, muteMic ]);
|
|
95
|
+
return useEffect(() => {
|
|
96
|
+
if (mountedRef.current = !0, hasMediaSupport && !initializedRef.current) return initializedRef.current = !0,
|
|
97
|
+
requestMicrophone().then(() => {
|
|
98
|
+
startMuted && muteMic();
|
|
99
|
+
}).catch(err => {
|
|
100
|
+
console.error("Error accessing microphone:", err);
|
|
101
|
+
}), () => {
|
|
102
|
+
mountedRef.current = !1, stopMicStream();
|
|
103
|
+
};
|
|
104
|
+
}, [ hasMediaSupport, requestMicrophone, startMuted, muteMic, stopMicStream ]),
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
var _a;
|
|
107
|
+
if (!hasMediaSupport || !(null === (_a = navigator.mediaDevices) || void 0 === _a ? void 0 : _a.addEventListener)) return;
|
|
108
|
+
refreshMicrophones();
|
|
109
|
+
const handleDeviceChange = () => {
|
|
110
|
+
refreshMicrophones();
|
|
111
|
+
};
|
|
112
|
+
return navigator.mediaDevices.addEventListener("devicechange", handleDeviceChange),
|
|
113
|
+
() => {
|
|
114
|
+
navigator.mediaDevices.removeEventListener("devicechange", handleDeviceChange);
|
|
115
|
+
};
|
|
116
|
+
}, [ hasMediaSupport, refreshMicrophones ]), {
|
|
117
|
+
micStream: micStream,
|
|
118
|
+
micTrack: micTrack,
|
|
119
|
+
muted: muted,
|
|
120
|
+
isSupported: hasMediaSupport,
|
|
121
|
+
isRequesting: isRequesting,
|
|
122
|
+
error: error,
|
|
123
|
+
microphones: microphones,
|
|
124
|
+
requestMicrophone: requestMicrophone,
|
|
125
|
+
stopMicrophone: stopMicStream,
|
|
126
|
+
muteMic: muteMic,
|
|
127
|
+
unmuteMic: unmuteMic,
|
|
128
|
+
toggleMute: toggleMute,
|
|
129
|
+
refreshMicrophones: refreshMicrophones,
|
|
130
|
+
setMicrophone: setMicrophone
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export { useMicrophone };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useRef, useEffect } from "react";
|
|
2
2
|
|
|
3
|
-
import { d as debug } from "../chunks/misc-
|
|
3
|
+
import { d as debug } from "../chunks/misc-BeEWwOaJ.mjs";
|
|
4
4
|
|
|
5
|
-
import "../chunks/tslib.es6-
|
|
5
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Hook to log component renders, mounts, and unmounts
|
package/dist/esm/hooks.mjs
CHANGED
|
@@ -14,6 +14,10 @@ export { useLocalStore } from "./hooks/useLocalStore.mjs";
|
|
|
14
14
|
|
|
15
15
|
export { useMDStreamBuffer } from "./hooks/useMdStreamBuffer.mjs";
|
|
16
16
|
|
|
17
|
+
export { useMicrophone } from "./hooks/useMicrophone.mjs";
|
|
18
|
+
|
|
19
|
+
export { useAudioRecorder } from "./hooks/useAudioRecorder.mjs";
|
|
20
|
+
|
|
17
21
|
export { FormFactor, useWindow } from "./hooks/useWindow.mjs";
|
|
18
22
|
|
|
19
23
|
export { useObserveResize } from "./hooks/useObserveResize.mjs";
|
|
@@ -32,6 +36,6 @@ import "./theme/motion.mjs";
|
|
|
32
36
|
|
|
33
37
|
import "./theme/type.mjs";
|
|
34
38
|
|
|
35
|
-
import "./chunks/tslib.es6-
|
|
39
|
+
import "./chunks/tslib.es6-C-olHjXV.mjs";
|
|
36
40
|
|
|
37
41
|
import "./chunks/MdStreamBuffer-DNXE4XbN.mjs";
|
package/dist/esm/index.mjs
CHANGED
|
@@ -24,81 +24,87 @@ export { useLocalStore } from "./hooks/useLocalStore.mjs";
|
|
|
24
24
|
|
|
25
25
|
export { useMDStreamBuffer } from "./hooks/useMdStreamBuffer.mjs";
|
|
26
26
|
|
|
27
|
+
export { useMicrophone } from "./hooks/useMicrophone.mjs";
|
|
28
|
+
|
|
29
|
+
export { useAudioRecorder } from "./hooks/useAudioRecorder.mjs";
|
|
30
|
+
|
|
27
31
|
export { useWindow } from "./hooks/useWindow.mjs";
|
|
28
32
|
|
|
29
33
|
export { useObserveResize } from "./hooks/useObserveResize.mjs";
|
|
30
34
|
|
|
31
|
-
export { A as
|
|
35
|
+
export { A as AudioBubble } from "./chunks/AudioBubble-Dvsrq1dZ.mjs";
|
|
32
36
|
|
|
33
|
-
export { A as
|
|
37
|
+
export { A as Avatar } from "./chunks/Avatar-C8uV7ROZ.mjs";
|
|
34
38
|
|
|
35
|
-
export {
|
|
39
|
+
export { A as AvatarGroup } from "./chunks/AvatarGroup-Bt1Lkn5S.mjs";
|
|
36
40
|
|
|
37
|
-
export {
|
|
41
|
+
export { B as Badge } from "./chunks/Badge-D-U1jomY.mjs";
|
|
38
42
|
|
|
39
|
-
export {
|
|
43
|
+
export { I as IconButton } from "./chunks/IconButton-oAB8ZFTf.mjs";
|
|
40
44
|
|
|
41
|
-
export { C as
|
|
45
|
+
export { C as Camera } from "./chunks/Camera-DSSiOeJd.mjs";
|
|
42
46
|
|
|
43
|
-
export {
|
|
47
|
+
export { C as CheckBox } from "./chunks/CheckBox-B6zWSySW.mjs";
|
|
44
48
|
|
|
45
|
-
export { D as
|
|
49
|
+
export { D as DivInput } from "./chunks/DivInput-cIMIH07H.mjs";
|
|
46
50
|
|
|
47
|
-
export { D as
|
|
51
|
+
export { D as Dot } from "./chunks/Dot-Cj6gWj4_.mjs";
|
|
48
52
|
|
|
49
|
-
export { D as
|
|
53
|
+
export { D as DraggablePanel } from "./chunks/DrggablePanel-CQcIbxpX.mjs";
|
|
50
54
|
|
|
51
|
-
export {
|
|
55
|
+
export { D as DropDown } from "./chunks/DropDown-B98ZoY1x.mjs";
|
|
52
56
|
|
|
53
|
-
export {
|
|
57
|
+
export { E as ErrorSummary } from "./chunks/ErrorSummary-Mz9siVxm.mjs";
|
|
54
58
|
|
|
55
|
-
export {
|
|
59
|
+
export { G as Grouper } from "./chunks/Grouper-B04WxD6K.mjs";
|
|
56
60
|
|
|
57
|
-
export {
|
|
61
|
+
export { O as Overlay } from "./chunks/Overlay-3KkyDm1f.mjs";
|
|
58
62
|
|
|
59
|
-
export {
|
|
63
|
+
export { F as FlexDiv, S as Size } from "./chunks/_types-DOQAaLqq.mjs";
|
|
60
64
|
|
|
61
|
-
export { P as
|
|
65
|
+
export { P as Pager } from "./chunks/Pager-DmiwYLl5.mjs";
|
|
62
66
|
|
|
63
|
-
export {
|
|
67
|
+
export { P as PromptInput } from "./chunks/PromptInput-D4Q-DWjz.mjs";
|
|
64
68
|
|
|
65
|
-
export {
|
|
69
|
+
export { D as DoneCheck, P as ProgressIndicator } from "./chunks/ProgressIndicator-CxsZm_As.mjs";
|
|
66
70
|
|
|
67
|
-
export { R as
|
|
71
|
+
export { R as RadioButton } from "./chunks/RadioButton-B0jvM5VW.mjs";
|
|
68
72
|
|
|
69
|
-
export {
|
|
73
|
+
export { R as RadioButtonList } from "./chunks/RadioButtonList-DBRAv87_.mjs";
|
|
70
74
|
|
|
71
|
-
export { S as
|
|
75
|
+
export { S as Slider } from "./chunks/Slider-CONGTXUE.mjs";
|
|
72
76
|
|
|
73
|
-
export { S as
|
|
77
|
+
export { S as Spacer } from "./chunks/Spacer-C5fcJYq-.mjs";
|
|
74
78
|
|
|
75
|
-
export {
|
|
79
|
+
export { S as Switch } from "./chunks/Switch-CyoaJwSX.mjs";
|
|
76
80
|
|
|
77
|
-
export { T as
|
|
81
|
+
export { T as TabBar } from "./chunks/TabBar-DmO1ixBz.mjs";
|
|
78
82
|
|
|
79
|
-
export { T as
|
|
83
|
+
export { T as TextArea } from "./chunks/TextArea-Bd_obSSH.mjs";
|
|
84
|
+
|
|
85
|
+
export { T as TextField } from "./chunks/TextField-CZnUNhFe.mjs";
|
|
80
86
|
|
|
81
87
|
export { ThemeProvider } from "./providers/ThemeProvider.mjs";
|
|
82
88
|
|
|
83
|
-
export { T as Tip } from "./chunks/Tip-
|
|
89
|
+
export { T as Tip } from "./chunks/Tip-DrQvxDsH.mjs";
|
|
84
90
|
|
|
85
|
-
export { T as Toast, a as ToastType } from "./chunks/Toast-
|
|
91
|
+
export { T as Toast, a as ToastType } from "./chunks/Toast-C5XSDgno.mjs";
|
|
86
92
|
|
|
87
|
-
export { B as Button } from "./chunks/Button-
|
|
93
|
+
export { B as Button } from "./chunks/Button-sEYjFcR2.mjs";
|
|
88
94
|
|
|
89
|
-
export { C as Chip } from "./chunks/Chip-
|
|
95
|
+
export { C as Chip } from "./chunks/Chip-BBKJ6wG4.mjs";
|
|
90
96
|
|
|
91
|
-
export { F as FileIcon, a as FileIconNames } from "./chunks/FileIcon-
|
|
97
|
+
export { F as FileIcon, a as FileIconNames } from "./chunks/FileIcon-DeW-ZBiv.mjs";
|
|
92
98
|
|
|
93
|
-
export { I as Icon } from "./chunks/Icon-
|
|
99
|
+
export { I as Icon } from "./chunks/Icon-KDwlMXzH.mjs";
|
|
94
100
|
|
|
95
101
|
export { S as SliceIcons } from "./chunks/_types-C2C2Zwd0.mjs";
|
|
96
102
|
|
|
97
|
-
export { B as ButtonBar } from "./chunks/ButtonBar-
|
|
103
|
+
export { B as ButtonBar } from "./chunks/ButtonBar-DSR2lhhN.mjs";
|
|
98
104
|
|
|
99
|
-
export { L as Label, a as LabelBackground } from "./chunks/Label-
|
|
105
|
+
export { L as Label, a as LabelBackground } from "./chunks/Label-BD7VlTDw.mjs";
|
|
100
106
|
|
|
101
|
-
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "./chunks/UploadArea-
|
|
107
|
+
export { U as UploadArea, a as allTypes, b as audioTypes, d as documentTypes, i as imageTypes, t as textTypes, v as videoTypes } from "./chunks/UploadArea-Gpq-MhqB.mjs";
|
|
102
108
|
|
|
103
109
|
import "./theme/corners.mjs";
|
|
104
110
|
|
|
@@ -106,20 +112,22 @@ import "./theme/type.mjs";
|
|
|
106
112
|
|
|
107
113
|
import "react";
|
|
108
114
|
|
|
109
|
-
import "./chunks/tslib.es6-
|
|
115
|
+
import "./chunks/tslib.es6-C-olHjXV.mjs";
|
|
110
116
|
|
|
111
117
|
import "./chunks/MdStreamBuffer-DNXE4XbN.mjs";
|
|
112
118
|
|
|
113
119
|
import "react/jsx-runtime";
|
|
114
120
|
|
|
115
|
-
import "./chunks/
|
|
121
|
+
import "./chunks/colors-FQ0uNQcW.mjs";
|
|
122
|
+
|
|
123
|
+
import "./chunks/audioVisualizer-ZgT77nUw.mjs";
|
|
116
124
|
|
|
117
125
|
import "./chunks/style-inject.es-D0BjEaN8.mjs";
|
|
118
126
|
|
|
119
|
-
import "
|
|
127
|
+
import "./chunks/misc-BeEWwOaJ.mjs";
|
|
120
128
|
|
|
121
|
-
import "
|
|
129
|
+
import "motion/react";
|
|
122
130
|
|
|
123
|
-
import "./chunks/FileList-
|
|
131
|
+
import "./chunks/FileList-0Dzx15hl.mjs";
|
|
124
132
|
|
|
125
133
|
import "./chunks/debounce-Bst1jxMS.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { l as localDBActions, u as useLocalDB, a as useLocalDBError, b as useLocalDBStore, c as useLocalDBValues, d as useManageLocalDB } from "../chunks/localDBStore-
|
|
1
|
+
export { l as localDBActions, u as useLocalDB, a as useLocalDBError, b as useLocalDBStore, c as useLocalDBValues, d as useManageLocalDB } from "../chunks/localDBStore-Dnpo5nSv.mjs";
|
|
2
2
|
|
|
3
|
-
import "../chunks/tslib.es6-
|
|
3
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
4
4
|
|
|
5
5
|
import "react";
|
|
6
6
|
|
|
@@ -8,4 +8,4 @@ import "zustand";
|
|
|
8
8
|
|
|
9
9
|
import "zustand/react/shallow";
|
|
10
10
|
|
|
11
|
-
import "../chunks/IndexedDB-
|
|
11
|
+
import "../chunks/IndexedDB-Dk7a4fPS.mjs";
|
package/dist/esm/stores/SSE.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { u as useConnectionClose, a as useConnectionMessage, b as useIsConnected, c as useLastSSEMessage, d as useMessage, e as useSSE, f as useSSEActions, g as useSSEStore } from "../chunks/sseStore-
|
|
1
|
+
export { u as useConnectionClose, a as useConnectionMessage, b as useIsConnected, c as useLastSSEMessage, d as useMessage, e as useSSE, f as useSSEActions, g as useSSEStore } from "../chunks/sseStore-DjrfpNAS.mjs";
|
|
2
2
|
|
|
3
3
|
import "zustand";
|
|
4
4
|
|
|
5
|
-
import "../chunks/tslib.es6-
|
|
5
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
6
6
|
|
|
7
7
|
import "../chunks/SSEConnection-DcA3wFsO.mjs";
|
package/dist/esm/stores/WS.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { create } from "zustand";
|
|
2
2
|
|
|
3
|
-
import "../chunks/tslib.es6-
|
|
3
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
4
4
|
|
|
5
|
-
import { W as WSConnection } from "../chunks/WSConnection-
|
|
5
|
+
import { W as WSConnection } from "../chunks/WSConnection-DV7k84B4.mjs";
|
|
6
6
|
|
|
7
7
|
const useWSStore = create((set, get) => ({
|
|
8
8
|
connections: [],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as createUploadsWorker, g as getUploads, a as getUploadsError, b as getUploadsWorkerStatus, u as uploadsActions, d as uploadsInitialized, e as useUploads, f as useUploadsActions, h as useUploadsError, i as useUploadsInitialized, j as useUploadsStore, k as useUploadsWorkerStatus } from "../chunks/uploadsStore-
|
|
1
|
+
export { c as createUploadsWorker, g as getUploads, a as getUploadsError, b as getUploadsWorkerStatus, u as uploadsActions, d as uploadsInitialized, e as useUploads, f as useUploadsActions, h as useUploadsError, i as useUploadsInitialized, j as useUploadsStore, k as useUploadsWorkerStatus } from "../chunks/uploadsStore-B7VECR5Q.mjs";
|
|
2
2
|
|
|
3
3
|
import "zustand";
|
|
4
4
|
|
|
5
|
-
import "../chunks/uploads-worker-
|
|
5
|
+
import "../chunks/uploads-worker-7X9EwX9N.mjs";
|
|
6
6
|
|
|
7
|
-
import "../chunks/tslib.es6-
|
|
7
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { F as FormFactor, d as dpr, f as formFactor, g as gettingLocation, i as isAppleDevice, a as isElectron, b as isTouchDevice, l as location, c as locationError, u as useDpr, e as useFormFactor, h as useGetLocation, j as useGettingLocation, k as useInitializeWindow, m as useIsAppleDevice, n as useIsElectron, o as useIsTouchDevice, p as useLocation, q as useLocationError, r as useViewportHeight, s as useViewportWidth, t as useWindowStore, v as viewportHeight, w as viewportWidth } from "../chunks/windowStore-
|
|
1
|
+
export { F as FormFactor, d as dpr, f as formFactor, g as gettingLocation, i as isAppleDevice, a as isElectron, b as isTouchDevice, l as location, c as locationError, u as useDpr, e as useFormFactor, h as useGetLocation, j as useGettingLocation, k as useInitializeWindow, m as useIsAppleDevice, n as useIsElectron, o as useIsTouchDevice, p as useLocation, q as useLocationError, r as useViewportHeight, s as useViewportWidth, t as useWindowStore, v as viewportHeight, w as viewportWidth } from "../chunks/windowStore-CAzx2-QV.mjs";
|
|
2
2
|
|
|
3
|
-
import "../chunks/tslib.es6-
|
|
3
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
4
4
|
|
|
5
5
|
import "zustand";
|
package/dist/esm/stores.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export { F as FormFactor, d as dpr, f as formFactor, g as gettingLocation, i as isAppleDevice, a as isElectron, b as isTouchDevice, l as location, c as locationError, u as useDpr, e as useFormFactor, h as useGetLocation, j as useGettingLocation, k as useInitializeWindow, m as useIsAppleDevice, n as useIsElectron, o as useIsTouchDevice, p as useLocation, q as useLocationError, r as useViewportHeight, s as useViewportWidth, t as useWindowStore, v as viewportHeight, w as viewportWidth } from "./chunks/windowStore-
|
|
1
|
+
export { F as FormFactor, d as dpr, f as formFactor, g as gettingLocation, i as isAppleDevice, a as isElectron, b as isTouchDevice, l as location, c as locationError, u as useDpr, e as useFormFactor, h as useGetLocation, j as useGettingLocation, k as useInitializeWindow, m as useIsAppleDevice, n as useIsElectron, o as useIsTouchDevice, p as useLocation, q as useLocationError, r as useViewportHeight, s as useViewportWidth, t as useWindowStore, v as viewportHeight, w as viewportWidth } from "./chunks/windowStore-CAzx2-QV.mjs";
|
|
2
2
|
|
|
3
|
-
export { c as createUploadsWorker, g as getUploads, a as getUploadsError, b as getUploadsWorkerStatus, u as uploadsActions, d as uploadsInitialized, e as useUploads, f as useUploadsActions, h as useUploadsError, i as useUploadsInitialized, j as useUploadsStore, k as useUploadsWorkerStatus } from "./chunks/uploadsStore-
|
|
3
|
+
export { c as createUploadsWorker, g as getUploads, a as getUploadsError, b as getUploadsWorkerStatus, u as uploadsActions, d as uploadsInitialized, e as useUploads, f as useUploadsActions, h as useUploadsError, i as useUploadsInitialized, j as useUploadsStore, k as useUploadsWorkerStatus } from "./chunks/uploadsStore-B7VECR5Q.mjs";
|
|
4
4
|
|
|
5
5
|
export { g as getTip, t as tipActions, u as useTip, a as useTipActions, b as useTipStore } from "./chunks/tipStore-CL5a95Bl.mjs";
|
|
6
6
|
|
|
7
7
|
export { g as getToast, t as toastActions, u as useToast, a as useToastActions, b as useToastStore } from "./chunks/toastStore-D2PEIqCo.mjs";
|
|
8
8
|
|
|
9
|
-
export { l as localDBActions, u as useLocalDB, a as useLocalDBError, b as useLocalDBStore, c as useLocalDBValues, d as useManageLocalDB } from "./chunks/localDBStore-
|
|
9
|
+
export { l as localDBActions, u as useLocalDB, a as useLocalDBError, b as useLocalDBStore, c as useLocalDBValues, d as useManageLocalDB } from "./chunks/localDBStore-Dnpo5nSv.mjs";
|
|
10
10
|
|
|
11
|
-
export { u as useConnectionClose, a as useConnectionMessage, b as useIsConnected, c as useLastSSEMessage, d as useMessage, e as useSSE, f as useSSEActions, g as useSSEStore } from "./chunks/sseStore-
|
|
11
|
+
export { u as useConnectionClose, a as useConnectionMessage, b as useIsConnected, c as useLastSSEMessage, d as useMessage, e as useSSE, f as useSSEActions, g as useSSEStore } from "./chunks/sseStore-DjrfpNAS.mjs";
|
|
12
12
|
|
|
13
|
-
import "./chunks/tslib.es6-
|
|
13
|
+
import "./chunks/tslib.es6-C-olHjXV.mjs";
|
|
14
14
|
|
|
15
15
|
import "zustand";
|
|
16
16
|
|
|
17
|
-
import "./chunks/uploads-worker-
|
|
17
|
+
import "./chunks/uploads-worker-7X9EwX9N.mjs";
|
|
18
18
|
|
|
19
19
|
import "react";
|
|
20
20
|
|
|
21
21
|
import "zustand/react/shallow";
|
|
22
22
|
|
|
23
|
-
import "./chunks/IndexedDB-
|
|
23
|
+
import "./chunks/IndexedDB-Dk7a4fPS.mjs";
|
|
24
24
|
|
|
25
25
|
import "./chunks/SSEConnection-DcA3wFsO.mjs";
|
package/dist/esm/utils/index.mjs
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { c as copyToClipboard, h as hexToRgb } from "../chunks/misc-
|
|
1
|
+
export { c as copyToClipboard, h as hexToRgb } from "../chunks/misc-BeEWwOaJ.mjs";
|
|
2
2
|
|
|
3
3
|
export { d as debounce } from "../chunks/debounce-Bst1jxMS.mjs";
|
|
4
4
|
|
|
5
5
|
export { a as addOpacity, t as tintFromColor } from "../chunks/colors-FQ0uNQcW.mjs";
|
|
6
6
|
|
|
7
|
-
export { I as IndexedDB } from "../chunks/IndexedDB-
|
|
7
|
+
export { I as IndexedDB } from "../chunks/IndexedDB-Dk7a4fPS.mjs";
|
|
8
|
+
|
|
9
|
+
export { A as AudioVisualizer } from "../chunks/audioVisualizer-ZgT77nUw.mjs";
|
|
8
10
|
|
|
9
11
|
export { M as MdBuffer } from "../chunks/MdStreamBuffer-DNXE4XbN.mjs";
|
|
10
12
|
|
|
11
13
|
export { S as SSEConnection } from "../chunks/SSEConnection-DcA3wFsO.mjs";
|
|
12
14
|
|
|
13
|
-
export { W as WSConnection } from "../chunks/WSConnection-
|
|
15
|
+
export { W as WSConnection } from "../chunks/WSConnection-DV7k84B4.mjs";
|
|
14
16
|
|
|
15
|
-
import "../chunks/tslib.es6-
|
|
17
|
+
import "../chunks/tslib.es6-C-olHjXV.mjs";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export { I as IndexedDB } from "../../chunks/IndexedDB-
|
|
1
|
+
export { I as IndexedDB } from "../../chunks/IndexedDB-Dk7a4fPS.mjs";
|
|
2
|
+
|
|
3
|
+
export { A as AudioVisualizer } from "../../chunks/audioVisualizer-ZgT77nUw.mjs";
|
|
2
4
|
|
|
3
5
|
export { M as MdBuffer } from "../../chunks/MdStreamBuffer-DNXE4XbN.mjs";
|
|
4
6
|
|
|
5
7
|
export { S as SSEConnection } from "../../chunks/SSEConnection-DcA3wFsO.mjs";
|
|
6
8
|
|
|
7
|
-
export { W as WSConnection } from "../../chunks/WSConnection-
|
|
9
|
+
export { W as WSConnection } from "../../chunks/WSConnection-DV7k84B4.mjs";
|
|
8
10
|
|
|
9
|
-
import "../../chunks/tslib.es6-
|
|
11
|
+
import "../../chunks/tslib.es6-C-olHjXV.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerUploadsWorker } from "../../chunks/uploads-worker-
|
|
1
|
+
import { r as registerUploadsWorker } from "../../chunks/uploads-worker-7X9EwX9N.mjs";
|
|
2
2
|
|
|
3
|
-
import "../../chunks/tslib.es6-
|
|
3
|
+
import "../../chunks/tslib.es6-C-olHjXV.mjs";
|
|
4
4
|
|
|
5
5
|
registerUploadsWorker();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
export type AudioBubbleBaseProps = {
|
|
3
|
+
audioStream?: MediaStream | MediaStreamTrack | null;
|
|
4
|
+
playing?: boolean;
|
|
5
|
+
size?: number;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
glow?: boolean;
|
|
8
|
+
glowColor?: string;
|
|
9
|
+
glowSize?: number;
|
|
10
|
+
glowOffset?: number;
|
|
11
|
+
minScale?: number;
|
|
12
|
+
maxScale?: number;
|
|
13
|
+
intensity?: number;
|
|
14
|
+
peakIntensity?: number;
|
|
15
|
+
risePerSeconds?: number;
|
|
16
|
+
ReleasePerSeconds?: number;
|
|
17
|
+
};
|
|
18
|
+
export type AudioBubbleProps = Omit<React.HTMLAttributes<HTMLDivElement>, keyof AudioBubbleBaseProps> & AudioBubbleBaseProps;
|
|
@@ -6,5 +6,7 @@ export { type KeyboardShortcut, type KeyboardShortcuts, useKeyboardShortcuts, }
|
|
|
6
6
|
export { useLastUpdated } from './useLastUpdated/useLastUpdated';
|
|
7
7
|
export { useLocalStore } from './useLocalStore/useLocalStore';
|
|
8
8
|
export { useMDStreamBuffer } from './useMdStreamBuffer/useMdStreamBuffer';
|
|
9
|
+
export { useMicrophone } from './useMicrophone/useMicrophone';
|
|
10
|
+
export { useAudioRecorder } from './useAudioRecorder/useAudioRecorder';
|
|
9
11
|
export { useWindow, FormFactor, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, } from './useWindow/useWindow';
|
|
10
12
|
export { useObserveResize } from './useObserveResize/useObserveResize';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
type UseStreamToMp3Return = {
|
|
3
|
+
audioBlob: RefObject<Blob | null>;
|
|
4
|
+
error: Error | null;
|
|
5
|
+
isRecording: boolean;
|
|
6
|
+
recordingSizeMb: number;
|
|
7
|
+
mimeType: string | null;
|
|
8
|
+
resetRecording: () => void;
|
|
9
|
+
startRecording: () => void;
|
|
10
|
+
stopRecording: () => Promise<Blob | null>;
|
|
11
|
+
};
|
|
12
|
+
type AudioRecorderSource = MediaStream | MediaStreamTrack | RefObject<MediaStream | MediaStreamTrack | null> | null | undefined;
|
|
13
|
+
export declare function useAudioRecorder(audioStream: AudioRecorderSource): UseStreamToMp3Return;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
type UseMicrophoneReturn = {
|
|
3
|
+
micStream: RefObject<MediaStream | null>;
|
|
4
|
+
micTrack: RefObject<MediaStreamTrack | null>;
|
|
5
|
+
muted: boolean;
|
|
6
|
+
isSupported: boolean;
|
|
7
|
+
isRequesting: boolean;
|
|
8
|
+
error: Error | null;
|
|
9
|
+
microphones: MediaDeviceInfo[];
|
|
10
|
+
requestMicrophone: () => Promise<MediaStream | null>;
|
|
11
|
+
stopMicrophone: () => void;
|
|
12
|
+
muteMic: () => boolean;
|
|
13
|
+
unmuteMic: () => boolean;
|
|
14
|
+
toggleMute: () => void;
|
|
15
|
+
refreshMicrophones: () => Promise<MediaDeviceInfo[]>;
|
|
16
|
+
setMicrophone: (deviceId: string) => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export declare function useMicrophone(startMuted?: boolean, microphoneDeviceId?: string): UseMicrophoneReturn;
|
|
19
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ export type { ToolTip, ToolTipInfo } from './components/sharedTypes';
|
|
|
2
2
|
export { ToolTipType } from './components/sharedTypes';
|
|
3
3
|
export { light, dark, lightTheme, darkTheme, motion, elevations, Elevation, } from './theme';
|
|
4
4
|
export type { SliceTheme, Colors, Type, Corners, Elevations, } from './theme';
|
|
5
|
-
export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useWindow, useDoubleClick, useObserveResize, } from './hooks';
|
|
5
|
+
export { type KeyboardShortcut, type KeyboardShortcuts, type BreakPoints, type WindowGeolocation, type WindowGeolocationError, useKeyboardShortcuts, useTheme, useObserveTheme, useToolTip, useLastUpdated, useLocalStore, useMDStreamBuffer, useAudioRecorder, useMicrophone, useWindow, useDoubleClick, useObserveResize, } from './hooks';
|
|
6
|
+
export { AudioBubble } from './components/AudioBubble/index';
|
|
7
|
+
export type { AudioBubbleProps } from './components/AudioBubble/index';
|
|
6
8
|
export { Avatar } from './components/Avatar/index';
|
|
7
9
|
export type { AvatarProps } from './components/Avatar/index';
|
|
8
10
|
export { AvatarGroup } from './components/AvatarGroup';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { copyToClipboard, hexToRgb } from './functions/misc';
|
|
2
2
|
export { debounce } from './functions/debounce';
|
|
3
3
|
export * from './functions/colors';
|
|
4
|
-
export { IndexedDB, MdBuffer, SSEConnection, WSConnection, } from './objects';
|
|
5
|
-
export type { IndexedDBOptions, MarkdownAutoCloseRule, MarkdownStreamBufferOptions, MarkdownStreamBufferSnapshot, SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, UnifiedMessageEvent, WSConnectionOptions, } from './objects';
|
|
4
|
+
export { AudioVisualizer, IndexedDB, MdBuffer, SSEConnection, WSConnection, } from './objects';
|
|
5
|
+
export type { AudioVisualizerOptions, AudioVisualizerSource, IndexedDBOptions, MarkdownAutoCloseRule, MarkdownStreamBufferOptions, MarkdownStreamBufferSnapshot, SSECustomEvent, SSEConnectionCloseOption, SSEConnectionOptions, SSEEventMap, SSEUnifiedBuiltInMessage, SSEUnifiedCustomMessage, SSEUnifiedMessage, UnifiedMessageEvent, WSConnectionOptions, } from './objects';
|