@apple-pie/slice 0.1.21 → 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.
Files changed (174) hide show
  1. package/README.md +25 -1
  2. package/dist/cjs/chunks/AudioBubble-v4xKclI8.js +54 -0
  3. package/dist/cjs/chunks/{Button-DXvjvGtY.js → Button-DmWbooXb.js} +1 -1
  4. package/dist/cjs/chunks/{ButtonBar-BZ6sme27.js → ButtonBar-RSBwFaU-.js} +1 -1
  5. package/dist/cjs/chunks/{Camera-rVC4KI4v.js → Camera-CLm3aQR8.js} +6 -2
  6. package/dist/cjs/chunks/{CheckBox-DQRLqTAK.js → CheckBox-DDINn56u.js} +1 -1
  7. package/dist/cjs/chunks/{Chip-Pv9-KTnh.js → Chip-DRSg6kLh.js} +1 -1
  8. package/dist/cjs/chunks/{DrggablePanel-CkhCXqKv.js → DrggablePanel-CERavfv3.js} +6 -2
  9. package/dist/cjs/chunks/{DropDown-C3AZ5b_b.js → DropDown-CJH-Y6Z5.js} +1 -1
  10. package/dist/cjs/chunks/{ErrorSummary-BTgAd3sK.js → ErrorSummary-BfVHS893.js} +6 -2
  11. package/dist/cjs/chunks/{FileIcon-CZLe2S2l.js → FileIcon-xoD-xIme.js} +2 -2
  12. package/dist/cjs/chunks/{FileList-BHwBIics.js → FileList-DjTXjXnK.js} +1 -1
  13. package/dist/cjs/chunks/{Grouper-D4yyHHkM.js → Grouper-RYRxazG9.js} +1 -1
  14. package/dist/cjs/chunks/{Icon-D1EB8S5r.js → Icon-BB-t50Yt.js} +6 -2
  15. package/dist/cjs/chunks/{IconButton-B07Ttxbr.js → IconButton-BUw3YUsI.js} +1 -1
  16. package/dist/cjs/chunks/{Label-CTzvGcds.js → Label-NzMpkZo2.js} +1 -1
  17. package/dist/cjs/chunks/MdStreamBuffer-DObxjnAm.js +381 -0
  18. package/dist/cjs/chunks/{ProgressIndicator-BGqIwycX.js → ProgressIndicator-8QZwTSyY.js} +9 -4
  19. package/dist/cjs/chunks/{PromptInput-z6TuhHsG.js → PromptInput-D1wP5-uN.js} +2 -2
  20. package/dist/cjs/chunks/{RadioButton-DuIsM4lu.js → RadioButton-Cvqum7dU.js} +1 -1
  21. package/dist/cjs/chunks/{RadioButtonList-bu11ILyw.js → RadioButtonList-CPHTioGa.js} +1 -1
  22. package/dist/cjs/chunks/{TabBar-Bcq_n4Mk.js → TabBar-CnD3E-qa.js} +1 -1
  23. package/dist/cjs/chunks/{TextArea-BSKbDOEt.js → TextArea-rWqDDui3.js} +6 -6
  24. package/dist/cjs/chunks/{TextField-BNacOZVx.js → TextField-C6U-qhDt.js} +20 -22
  25. package/dist/cjs/chunks/{Toast-CZzAWG0S.js → Toast-D2fpwdjF.js} +6 -2
  26. package/dist/cjs/chunks/{UploadArea-CKuE4rtg.js → UploadArea-BS2BPuhZ.js} +1 -1
  27. package/dist/cjs/chunks/audioVisualizer-EIfIjWH7.js +60 -0
  28. package/dist/cjs/components/AudioBubble/index.js +10 -0
  29. package/dist/cjs/components/Button/index.js +4 -4
  30. package/dist/cjs/components/ButtonBar/index.js +2 -2
  31. package/dist/cjs/components/Camera/index.js +4 -4
  32. package/dist/cjs/components/CheckBox/index.js +2 -2
  33. package/dist/cjs/components/Chip/index.js +2 -2
  34. package/dist/cjs/components/DraggablePanel/index.js +3 -3
  35. package/dist/cjs/components/DropDown/index.js +2 -2
  36. package/dist/cjs/components/ErrorSummary/index.js +2 -2
  37. package/dist/cjs/components/FileIcon/index.js +3 -4
  38. package/dist/cjs/components/FileList/index.js +4 -4
  39. package/dist/cjs/components/Grouper/index.js +2 -2
  40. package/dist/cjs/components/Icon/index.js +3 -3
  41. package/dist/cjs/components/IconButton/index.js +4 -4
  42. package/dist/cjs/components/Label/index.js +1 -1
  43. package/dist/cjs/components/Progress/index.js +5 -5
  44. package/dist/cjs/components/PromptInput/index.js +7 -7
  45. package/dist/cjs/components/RadioButton/index.js +2 -2
  46. package/dist/cjs/components/RadioButtonList/index.js +3 -3
  47. package/dist/cjs/components/TabBar/index.js +3 -3
  48. package/dist/cjs/components/TextArea/index.js +4 -4
  49. package/dist/cjs/components/Textfield/index.js +5 -5
  50. package/dist/cjs/components/Toast/index.js +2 -2
  51. package/dist/cjs/components/UploadArea/index.js +5 -5
  52. package/dist/cjs/hooks/useAudioRecorder.js +70 -0
  53. package/dist/cjs/hooks/useMdStreamBuffer.js +41 -0
  54. package/dist/cjs/hooks/useMicrophone.js +132 -0
  55. package/dist/cjs/hooks.js +4 -2
  56. package/dist/cjs/index.js +7 -4
  57. package/dist/cjs/utils/index.js +2 -1
  58. package/dist/cjs/utils/objects/index.js +2 -1
  59. package/dist/esm/chunks/AudioBubble-Dvsrq1dZ.mjs +62 -0
  60. package/dist/esm/chunks/{Avatar-CSLVUF_y.mjs → Avatar-C8uV7ROZ.mjs} +2 -2
  61. package/dist/esm/chunks/{AvatarGroup--ELW-bO1.mjs → AvatarGroup-Bt1Lkn5S.mjs} +2 -2
  62. package/dist/esm/chunks/{Badge-DyICxZP2.mjs → Badge-D-U1jomY.mjs} +1 -1
  63. package/dist/esm/chunks/{Button-daLv0i7S.mjs → Button-sEYjFcR2.mjs} +5 -5
  64. package/dist/esm/chunks/{ButtonBar-DXK8meQq.mjs → ButtonBar-DSR2lhhN.mjs} +3 -3
  65. package/dist/esm/chunks/{Camera-BqmVsVKy.mjs → Camera-DSSiOeJd.mjs} +6 -6
  66. package/dist/esm/chunks/{CheckBox-BsaYFNC6.mjs → CheckBox-B6zWSySW.mjs} +3 -3
  67. package/dist/esm/chunks/{Chip-BRZeD1OX.mjs → Chip-BBKJ6wG4.mjs} +3 -3
  68. package/dist/esm/chunks/{DivInput-DeSpC8Wm.mjs → DivInput-cIMIH07H.mjs} +2 -2
  69. package/dist/esm/chunks/{Dot-CLGwQu-i.mjs → Dot-Cj6gWj4_.mjs} +1 -1
  70. package/dist/esm/chunks/{DrggablePanel-Ddi0vPRp.mjs → DrggablePanel-CQcIbxpX.mjs} +3 -3
  71. package/dist/esm/chunks/{DropDown-DOJvg96J.mjs → DropDown-B98ZoY1x.mjs} +3 -3
  72. package/dist/esm/chunks/{ErrorSummary-CHLkvdHk.mjs → ErrorSummary-Mz9siVxm.mjs} +3 -3
  73. package/dist/esm/chunks/{FileIcon-ePouoJpT.mjs → FileIcon-DeW-ZBiv.mjs} +3 -3
  74. package/dist/esm/chunks/{FileList-5LElsgoE.mjs → FileList-0Dzx15hl.mjs} +5 -5
  75. package/dist/esm/chunks/{Grouper-DR14qDXP.mjs → Grouper-B04WxD6K.mjs} +3 -3
  76. package/dist/esm/chunks/{Icon-CUSQtytG.mjs → Icon-KDwlMXzH.mjs} +3 -3
  77. package/dist/esm/chunks/{IconButton-DG69Vlhj.mjs → IconButton-oAB8ZFTf.mjs} +4 -4
  78. package/dist/esm/chunks/{IndexedDB-CJgzPHPB.mjs → IndexedDB-Dk7a4fPS.mjs} +1 -1
  79. package/dist/esm/chunks/{Label-CRsE7o3D.mjs → Label-BD7VlTDw.mjs} +3 -3
  80. package/dist/esm/chunks/MdStreamBuffer-DNXE4XbN.mjs +381 -0
  81. package/dist/esm/chunks/{Overlay-TOzZXnwF.mjs → Overlay-3KkyDm1f.mjs} +1 -1
  82. package/dist/esm/chunks/{Pager-BYT7_mCb.mjs → Pager-DmiwYLl5.mjs} +2 -2
  83. package/dist/esm/chunks/{ProgressIndicator-D7paCpgY.mjs → ProgressIndicator-CxsZm_As.mjs} +6 -5
  84. package/dist/esm/chunks/{PromptInput-CpxUcInZ.mjs → PromptInput-D4Q-DWjz.mjs} +4 -2
  85. package/dist/esm/chunks/{RadioButton-B5ZF5oJ_.mjs → RadioButton-B0jvM5VW.mjs} +3 -3
  86. package/dist/esm/chunks/{RadioButtonList-D9ZAZgkK.mjs → RadioButtonList-DBRAv87_.mjs} +3 -3
  87. package/dist/esm/chunks/{Slider-DL2iuNlh.mjs → Slider-CONGTXUE.mjs} +2 -2
  88. package/dist/esm/chunks/{Spacer-BlgEdKEM.mjs → Spacer-C5fcJYq-.mjs} +1 -1
  89. package/dist/esm/chunks/{Switch-BhCOo5Lu.mjs → Switch-CyoaJwSX.mjs} +1 -1
  90. package/dist/esm/chunks/{TabBar-BK7OcjPl.mjs → TabBar-DmO1ixBz.mjs} +4 -4
  91. package/dist/esm/chunks/{TextArea-BmsEj6IA.mjs → TextArea-Bd_obSSH.mjs} +7 -7
  92. package/dist/esm/chunks/{TextField-DWPpevsj.mjs → TextField-CZnUNhFe.mjs} +20 -26
  93. package/dist/esm/chunks/{Tip-BnKB9qMi.mjs → Tip-DrQvxDsH.mjs} +2 -2
  94. package/dist/esm/chunks/{Toast-DPHLwDES.mjs → Toast-C5XSDgno.mjs} +4 -4
  95. package/dist/esm/chunks/{UploadArea-DPiOaNpc.mjs → UploadArea-Gpq-MhqB.mjs} +4 -4
  96. package/dist/esm/chunks/{WSConnection-D9mpsVdc.mjs → WSConnection-DV7k84B4.mjs} +1 -1
  97. package/dist/esm/chunks/{_types-CPrEyJX9.mjs → _types-DOQAaLqq.mjs} +1 -1
  98. package/dist/esm/chunks/audioVisualizer-ZgT77nUw.mjs +60 -0
  99. package/dist/esm/chunks/{localDBStore-B4jkR5Jx.mjs → localDBStore-Dnpo5nSv.mjs} +2 -2
  100. package/dist/esm/chunks/{misc-N8KLjOXc.mjs → misc-BeEWwOaJ.mjs} +1 -1
  101. package/dist/esm/chunks/{sseStore-2JIpEKfz.mjs → sseStore-DjrfpNAS.mjs} +1 -1
  102. package/dist/esm/chunks/{tslib.es6-c-7TIv71.mjs → tslib.es6-C-olHjXV.mjs} +1 -1
  103. package/dist/esm/chunks/{uploads-worker-Dv-4zGnC.mjs → uploads-worker-7X9EwX9N.mjs} +1 -1
  104. package/dist/esm/chunks/{uploadsStore-D69fEXMY.mjs → uploadsStore-B7VECR5Q.mjs} +1 -1
  105. package/dist/esm/chunks/{windowStore-BOTh1g37.mjs → windowStore-CAzx2-QV.mjs} +1 -1
  106. package/dist/esm/components/AudioBubble/index.mjs +31 -0
  107. package/dist/esm/components/Avatar/index.mjs +3 -3
  108. package/dist/esm/components/AvatarGroup/index.mjs +4 -4
  109. package/dist/esm/components/Badge/index.mjs +2 -2
  110. package/dist/esm/components/Button/index.mjs +8 -8
  111. package/dist/esm/components/ButtonBar/index.mjs +4 -4
  112. package/dist/esm/components/Camera/index.mjs +7 -7
  113. package/dist/esm/components/CheckBox/index.mjs +4 -4
  114. package/dist/esm/components/Chip/index.mjs +4 -4
  115. package/dist/esm/components/DivInput/index.mjs +3 -3
  116. package/dist/esm/components/Dot/index.mjs +2 -2
  117. package/dist/esm/components/DraggablePanel/index.mjs +4 -4
  118. package/dist/esm/components/DropDown/index.mjs +4 -4
  119. package/dist/esm/components/ErrorSummary/index.mjs +4 -4
  120. package/dist/esm/components/FileIcon/index.mjs +4 -4
  121. package/dist/esm/components/FileList/index.mjs +6 -6
  122. package/dist/esm/components/FlexDiv/index.mjs +2 -2
  123. package/dist/esm/components/Grouper/index.mjs +5 -5
  124. package/dist/esm/components/Icon/index.mjs +4 -4
  125. package/dist/esm/components/IconButton/index.mjs +7 -7
  126. package/dist/esm/components/Label/index.mjs +3 -3
  127. package/dist/esm/components/Overlay/index.mjs +2 -2
  128. package/dist/esm/components/Pager/index.mjs +3 -3
  129. package/dist/esm/components/Progress/index.mjs +5 -5
  130. package/dist/esm/components/PromptInput/index.mjs +11 -11
  131. package/dist/esm/components/RadioButton/index.mjs +4 -4
  132. package/dist/esm/components/RadioButtonList/index.mjs +5 -5
  133. package/dist/esm/components/Slider/index.mjs +3 -3
  134. package/dist/esm/components/Spacer/index.mjs +2 -2
  135. package/dist/esm/components/Switch/index.mjs +2 -2
  136. package/dist/esm/components/TabBar/index.mjs +7 -7
  137. package/dist/esm/components/TextArea/index.mjs +9 -9
  138. package/dist/esm/components/Textfield/index.mjs +10 -10
  139. package/dist/esm/components/Tip/index.mjs +3 -3
  140. package/dist/esm/components/Toast/index.mjs +5 -5
  141. package/dist/esm/components/UploadArea/index.mjs +7 -7
  142. package/dist/esm/hooks/useAudioRecorder.mjs +74 -0
  143. package/dist/esm/hooks/useMdStreamBuffer.mjs +42 -0
  144. package/dist/esm/hooks/useMicrophone.mjs +134 -0
  145. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  146. package/dist/esm/hooks.mjs +10 -0
  147. package/dist/esm/index.mjs +51 -39
  148. package/dist/esm/stores/LocalDB.mjs +3 -3
  149. package/dist/esm/stores/SSE.mjs +2 -2
  150. package/dist/esm/stores/WS.mjs +2 -2
  151. package/dist/esm/stores/uploads.mjs +3 -3
  152. package/dist/esm/stores/window.mjs +2 -2
  153. package/dist/esm/stores.mjs +7 -7
  154. package/dist/esm/utils/index.mjs +8 -4
  155. package/dist/esm/utils/objects/index.mjs +7 -3
  156. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  157. package/dist/types/components/AudioBubble/AudioBubble.d.ts +3 -0
  158. package/dist/types/components/AudioBubble/_types.d.ts +18 -0
  159. package/dist/types/components/AudioBubble/index.d.ts +2 -0
  160. package/dist/types/components/Textfield/_types.d.ts +1 -3
  161. package/dist/types/hooks/index.d.ts +3 -0
  162. package/dist/types/hooks/useAudioRecorder/useAudioRecorder.d.ts +14 -0
  163. package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.d.ts +10 -0
  164. package/dist/types/hooks/useMicrophone/useMicrophone.d.ts +19 -0
  165. package/dist/types/index.d.ts +3 -1
  166. package/dist/types/utils/index.d.ts +2 -2
  167. package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +63 -0
  168. package/dist/types/utils/objects/MDStreamBuffer/_defaults.d.ts +3 -0
  169. package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +25 -0
  170. package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +86 -0
  171. package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +11 -0
  172. package/dist/types/utils/objects/audioVisualizer/audioVisualizer.d.ts +40 -0
  173. package/dist/types/utils/objects/index.d.ts +4 -0
  174. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ import { _ as __awaiter } from "../chunks/tslib.es6-C-olHjXV.mjs";
2
+
3
+ import { useRef, useState, useCallback, useEffect } from "react";
4
+
5
+ /**
6
+ * Get supported audio mime type - perfer mpeg
7
+ */ function useAudioRecorder(audioStream) {
8
+ const audioBlob = useRef(null), mediaRecorderRef = useRef(null), recordedChunksRef = useRef([]), stopResolveRef = useRef(null), [error, setError] = useState(null), [isRecording, setIsRecording] = useState(!1), [recordingSizeMb, setRecordingSizeMb] = useState(0), [mimeType, setMimeType] = useState(null), resetRecording = useCallback(() => {
9
+ audioBlob.current = null, recordedChunksRef.current = [], setRecordingSizeMb(0),
10
+ setError(null);
11
+ }, []), startRecording = useCallback(() => {
12
+ var _a;
13
+ try {
14
+ if ("undefined" == typeof MediaRecorder) throw new TypeError("MediaRecorder is not supported in this browser");
15
+ if ("recording" === (null === (_a = mediaRecorderRef.current) || void 0 === _a ? void 0 : _a.state)) return;
16
+ const stream = (audioStream => {
17
+ const source = (audioStream => audioStream ? "object" == typeof audioStream && "current" in audioStream ? audioStream.current : audioStream : null)(audioStream);
18
+ return source ? "undefined" == typeof MediaStream ? null : source instanceof MediaStream ? source : new MediaStream([ source ]) : null;
19
+ })(audioStream);
20
+ if (!stream) throw new Error("No audio stream or track provided");
21
+ resetRecording();
22
+ const nextMimeType = (() => {
23
+ if ("undefined" == typeof MediaRecorder) return null;
24
+ const mimeTypes = [ "audio/mpeg", "audio/mp4", "audio/webm;codecs=opus", "audio/webm", "audio/ogg;codecs=opus", "audio/ogg" ];
25
+ for (const mimeType of mimeTypes) if (MediaRecorder.isTypeSupported(mimeType)) return mimeType;
26
+ return null;
27
+ })();
28
+ setMimeType(nextMimeType);
29
+ const mediaRecorder = nextMimeType ? new MediaRecorder(stream, {
30
+ mimeType: nextMimeType
31
+ }) : new MediaRecorder(stream);
32
+ mediaRecorder.ondataavailable = event => {
33
+ event.data.size > 0 && (recordedChunksRef.current.push(event.data), setRecordingSizeMb(size => size + event.data.size / 1024 / 1024));
34
+ }, mediaRecorder.onerror = () => {
35
+ setError(new Error("Audio recording failed")), setIsRecording(!1);
36
+ }, mediaRecorder.onstop = () => {
37
+ var _a;
38
+ const nextBlob = new Blob(recordedChunksRef.current, {
39
+ type: mediaRecorder.mimeType || nextMimeType || "audio/webm"
40
+ });
41
+ audioBlob.current = nextBlob, setIsRecording(!1), null === (_a = stopResolveRef.current) || void 0 === _a || _a.call(stopResolveRef, nextBlob),
42
+ stopResolveRef.current = null;
43
+ }, mediaRecorderRef.current = mediaRecorder, mediaRecorder.start(250), setIsRecording(!0);
44
+ } catch (error) {
45
+ console.error("Error recording audio:", error), setError(error instanceof Error ? error : new Error("Unknown error")),
46
+ setIsRecording(!1);
47
+ }
48
+ }, [ audioStream, resetRecording ]), stopRecording = useCallback(() => __awaiter(this, void 0, void 0, function*() {
49
+ try {
50
+ const mediaRecorder = mediaRecorderRef.current;
51
+ return mediaRecorder && "inactive" !== mediaRecorder.state ? new Promise(resolve => {
52
+ stopResolveRef.current = resolve, mediaRecorder.stop();
53
+ }) : (setIsRecording(!1), audioBlob.current);
54
+ } catch (error) {
55
+ return console.error("Error stopping recording:", error), setError(error instanceof Error ? error : new Error("Unknown error")),
56
+ setIsRecording(!1), null;
57
+ }
58
+ }), []);
59
+ return useEffect(() => () => {
60
+ mediaRecorderRef.current && "inactive" !== mediaRecorderRef.current.state && mediaRecorderRef.current.stop(),
61
+ mediaRecorderRef.current = null, stopResolveRef.current = null;
62
+ }, []), {
63
+ audioBlob: audioBlob,
64
+ error: error,
65
+ isRecording: isRecording,
66
+ recordingSizeMb: recordingSizeMb,
67
+ mimeType: mimeType,
68
+ resetRecording: resetRecording,
69
+ startRecording: startRecording,
70
+ stopRecording: stopRecording
71
+ };
72
+ }
73
+
74
+ export { useAudioRecorder };
@@ -0,0 +1,42 @@
1
+ import { useRef, useState, useEffect, useCallback } from "react";
2
+
3
+ import "../chunks/tslib.es6-C-olHjXV.mjs";
4
+
5
+ import { M as MdBuffer } from "../chunks/MdStreamBuffer-DNXE4XbN.mjs";
6
+
7
+ function useMDStreamBuffer(options) {
8
+ const bufferRef = useRef(null), [healthy, setHealthy] = useState(""), [raw, setRaw] = useState(""), [isComplete, setIsComplete] = useState(!1);
9
+ useEffect(() => (bufferRef.current = new MdBuffer(Object.assign(Object.assign({}, options), {
10
+ onFlush: snapshot => {
11
+ const {healthy: healthy, raw: raw, isComplete: isComplete} = snapshot;
12
+ setHealthy(healthy), setRaw(raw), setIsComplete(isComplete);
13
+ }
14
+ })), () => {
15
+ var _a;
16
+ null === (_a = bufferRef.current) || void 0 === _a || _a.dispose(), bufferRef.current = null;
17
+ }), []);
18
+ return {
19
+ raw: raw,
20
+ healthy: healthy,
21
+ isComplete: isComplete,
22
+ append: useCallback(value => {
23
+ var _a;
24
+ value && (null === (_a = bufferRef.current) || void 0 === _a || _a.append(value));
25
+ }, []),
26
+ flush: useCallback(() => {
27
+ var _a;
28
+ return null === (_a = bufferRef.current) || void 0 === _a ? void 0 : _a.flush();
29
+ }, []),
30
+ complete: useCallback(() => {
31
+ var _a;
32
+ return null === (_a = bufferRef.current) || void 0 === _a ? void 0 : _a.complete();
33
+ }, []),
34
+ reset: useCallback(() => {
35
+ var _a;
36
+ null === (_a = bufferRef.current) || void 0 === _a || _a.reset(), setHealthy(""),
37
+ setRaw("");
38
+ }, [])
39
+ };
40
+ }
41
+
42
+ export { useMDStreamBuffer };
@@ -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-N8KLjOXc.mjs";
3
+ import { d as debug } from "../chunks/misc-BeEWwOaJ.mjs";
4
4
 
5
- import "../chunks/tslib.es6-c-7TIv71.mjs";
5
+ import "../chunks/tslib.es6-C-olHjXV.mjs";
6
6
 
7
7
  /**
8
8
  * Hook to log component renders, mounts, and unmounts
@@ -12,6 +12,12 @@ export { useLastUpdated } from "./hooks/useLastUpdated.mjs";
12
12
 
13
13
  export { useLocalStore } from "./hooks/useLocalStore.mjs";
14
14
 
15
+ export { useMDStreamBuffer } from "./hooks/useMdStreamBuffer.mjs";
16
+
17
+ export { useMicrophone } from "./hooks/useMicrophone.mjs";
18
+
19
+ export { useAudioRecorder } from "./hooks/useAudioRecorder.mjs";
20
+
15
21
  export { FormFactor, useWindow } from "./hooks/useWindow.mjs";
16
22
 
17
23
  export { useObserveResize } from "./hooks/useObserveResize.mjs";
@@ -29,3 +35,7 @@ import "./theme/elevations.mjs";
29
35
  import "./theme/motion.mjs";
30
36
 
31
37
  import "./theme/type.mjs";
38
+
39
+ import "./chunks/tslib.es6-C-olHjXV.mjs";
40
+
41
+ import "./chunks/MdStreamBuffer-DNXE4XbN.mjs";
@@ -22,81 +22,89 @@ export { useLastUpdated } from "./hooks/useLastUpdated.mjs";
22
22
 
23
23
  export { useLocalStore } from "./hooks/useLocalStore.mjs";
24
24
 
25
+ export { useMDStreamBuffer } from "./hooks/useMdStreamBuffer.mjs";
26
+
27
+ export { useMicrophone } from "./hooks/useMicrophone.mjs";
28
+
29
+ export { useAudioRecorder } from "./hooks/useAudioRecorder.mjs";
30
+
25
31
  export { useWindow } from "./hooks/useWindow.mjs";
26
32
 
27
33
  export { useObserveResize } from "./hooks/useObserveResize.mjs";
28
34
 
29
- export { A as Avatar } from "./chunks/Avatar-CSLVUF_y.mjs";
35
+ export { A as AudioBubble } from "./chunks/AudioBubble-Dvsrq1dZ.mjs";
30
36
 
31
- export { A as AvatarGroup } from "./chunks/AvatarGroup--ELW-bO1.mjs";
37
+ export { A as Avatar } from "./chunks/Avatar-C8uV7ROZ.mjs";
32
38
 
33
- export { B as Badge } from "./chunks/Badge-DyICxZP2.mjs";
39
+ export { A as AvatarGroup } from "./chunks/AvatarGroup-Bt1Lkn5S.mjs";
34
40
 
35
- export { I as IconButton } from "./chunks/IconButton-DG69Vlhj.mjs";
41
+ export { B as Badge } from "./chunks/Badge-D-U1jomY.mjs";
36
42
 
37
- export { C as Camera } from "./chunks/Camera-BqmVsVKy.mjs";
43
+ export { I as IconButton } from "./chunks/IconButton-oAB8ZFTf.mjs";
38
44
 
39
- export { C as CheckBox } from "./chunks/CheckBox-BsaYFNC6.mjs";
45
+ export { C as Camera } from "./chunks/Camera-DSSiOeJd.mjs";
40
46
 
41
- export { D as DivInput } from "./chunks/DivInput-DeSpC8Wm.mjs";
47
+ export { C as CheckBox } from "./chunks/CheckBox-B6zWSySW.mjs";
42
48
 
43
- export { D as Dot } from "./chunks/Dot-CLGwQu-i.mjs";
49
+ export { D as DivInput } from "./chunks/DivInput-cIMIH07H.mjs";
44
50
 
45
- export { D as DraggablePanel } from "./chunks/DrggablePanel-Ddi0vPRp.mjs";
51
+ export { D as Dot } from "./chunks/Dot-Cj6gWj4_.mjs";
46
52
 
47
- export { D as DropDown } from "./chunks/DropDown-DOJvg96J.mjs";
53
+ export { D as DraggablePanel } from "./chunks/DrggablePanel-CQcIbxpX.mjs";
48
54
 
49
- export { E as ErrorSummary } from "./chunks/ErrorSummary-CHLkvdHk.mjs";
55
+ export { D as DropDown } from "./chunks/DropDown-B98ZoY1x.mjs";
50
56
 
51
- export { G as Grouper } from "./chunks/Grouper-DR14qDXP.mjs";
57
+ export { E as ErrorSummary } from "./chunks/ErrorSummary-Mz9siVxm.mjs";
52
58
 
53
- export { O as Overlay } from "./chunks/Overlay-TOzZXnwF.mjs";
59
+ export { G as Grouper } from "./chunks/Grouper-B04WxD6K.mjs";
54
60
 
55
- export { F as FlexDiv, S as Size } from "./chunks/_types-CPrEyJX9.mjs";
61
+ export { O as Overlay } from "./chunks/Overlay-3KkyDm1f.mjs";
56
62
 
57
- export { P as Pager } from "./chunks/Pager-BYT7_mCb.mjs";
63
+ export { F as FlexDiv, S as Size } from "./chunks/_types-DOQAaLqq.mjs";
58
64
 
59
- export { P as PromptInput } from "./chunks/PromptInput-CpxUcInZ.mjs";
65
+ export { P as Pager } from "./chunks/Pager-DmiwYLl5.mjs";
60
66
 
61
- export { D as DoneCheck, P as ProgressIndicator } from "./chunks/ProgressIndicator-D7paCpgY.mjs";
67
+ export { P as PromptInput } from "./chunks/PromptInput-D4Q-DWjz.mjs";
62
68
 
63
- export { R as RadioButton } from "./chunks/RadioButton-B5ZF5oJ_.mjs";
69
+ export { D as DoneCheck, P as ProgressIndicator } from "./chunks/ProgressIndicator-CxsZm_As.mjs";
64
70
 
65
- export { R as RadioButtonList } from "./chunks/RadioButtonList-D9ZAZgkK.mjs";
71
+ export { R as RadioButton } from "./chunks/RadioButton-B0jvM5VW.mjs";
66
72
 
67
- export { S as Slider } from "./chunks/Slider-DL2iuNlh.mjs";
73
+ export { R as RadioButtonList } from "./chunks/RadioButtonList-DBRAv87_.mjs";
68
74
 
69
- export { S as Spacer } from "./chunks/Spacer-BlgEdKEM.mjs";
75
+ export { S as Slider } from "./chunks/Slider-CONGTXUE.mjs";
70
76
 
71
- export { S as Switch } from "./chunks/Switch-BhCOo5Lu.mjs";
77
+ export { S as Spacer } from "./chunks/Spacer-C5fcJYq-.mjs";
72
78
 
73
- export { T as TabBar } from "./chunks/TabBar-BK7OcjPl.mjs";
79
+ export { S as Switch } from "./chunks/Switch-CyoaJwSX.mjs";
74
80
 
75
- export { T as TextArea } from "./chunks/TextArea-BmsEj6IA.mjs";
81
+ export { T as TabBar } from "./chunks/TabBar-DmO1ixBz.mjs";
76
82
 
77
- export { T as TextField } from "./chunks/TextField-DWPpevsj.mjs";
83
+ export { T as TextArea } from "./chunks/TextArea-Bd_obSSH.mjs";
84
+
85
+ export { T as TextField } from "./chunks/TextField-CZnUNhFe.mjs";
78
86
 
79
87
  export { ThemeProvider } from "./providers/ThemeProvider.mjs";
80
88
 
81
- export { T as Tip } from "./chunks/Tip-BnKB9qMi.mjs";
89
+ export { T as Tip } from "./chunks/Tip-DrQvxDsH.mjs";
82
90
 
83
- export { T as Toast, a as ToastType } from "./chunks/Toast-DPHLwDES.mjs";
91
+ export { T as Toast, a as ToastType } from "./chunks/Toast-C5XSDgno.mjs";
84
92
 
85
- export { B as Button } from "./chunks/Button-daLv0i7S.mjs";
93
+ export { B as Button } from "./chunks/Button-sEYjFcR2.mjs";
86
94
 
87
- export { C as Chip } from "./chunks/Chip-BRZeD1OX.mjs";
95
+ export { C as Chip } from "./chunks/Chip-BBKJ6wG4.mjs";
88
96
 
89
- export { F as FileIcon, a as FileIconNames } from "./chunks/FileIcon-ePouoJpT.mjs";
97
+ export { F as FileIcon, a as FileIconNames } from "./chunks/FileIcon-DeW-ZBiv.mjs";
90
98
 
91
- export { I as Icon } from "./chunks/Icon-CUSQtytG.mjs";
99
+ export { I as Icon } from "./chunks/Icon-KDwlMXzH.mjs";
92
100
 
93
101
  export { S as SliceIcons } from "./chunks/_types-C2C2Zwd0.mjs";
94
102
 
95
- export { B as ButtonBar } from "./chunks/ButtonBar-DXK8meQq.mjs";
103
+ export { B as ButtonBar } from "./chunks/ButtonBar-DSR2lhhN.mjs";
96
104
 
97
- export { L as Label, a as LabelBackground } from "./chunks/Label-CRsE7o3D.mjs";
105
+ export { L as Label, a as LabelBackground } from "./chunks/Label-BD7VlTDw.mjs";
98
106
 
99
- 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-DPiOaNpc.mjs";
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";
100
108
 
101
109
  import "./theme/corners.mjs";
102
110
 
@@ -104,18 +112,22 @@ import "./theme/type.mjs";
104
112
 
105
113
  import "react";
106
114
 
107
- import "./chunks/tslib.es6-c-7TIv71.mjs";
115
+ import "./chunks/tslib.es6-C-olHjXV.mjs";
116
+
117
+ import "./chunks/MdStreamBuffer-DNXE4XbN.mjs";
108
118
 
109
119
  import "react/jsx-runtime";
110
120
 
111
- import "./chunks/misc-N8KLjOXc.mjs";
121
+ import "./chunks/colors-FQ0uNQcW.mjs";
122
+
123
+ import "./chunks/audioVisualizer-ZgT77nUw.mjs";
112
124
 
113
125
  import "./chunks/style-inject.es-D0BjEaN8.mjs";
114
126
 
115
- import "motion/react";
127
+ import "./chunks/misc-BeEWwOaJ.mjs";
116
128
 
117
- import "./chunks/colors-FQ0uNQcW.mjs";
129
+ import "motion/react";
118
130
 
119
- import "./chunks/FileList-5LElsgoE.mjs";
131
+ import "./chunks/FileList-0Dzx15hl.mjs";
120
132
 
121
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-B4jkR5Jx.mjs";
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-c-7TIv71.mjs";
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-CJgzPHPB.mjs";
11
+ import "../chunks/IndexedDB-Dk7a4fPS.mjs";
@@ -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-2JIpEKfz.mjs";
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-c-7TIv71.mjs";
5
+ import "../chunks/tslib.es6-C-olHjXV.mjs";
6
6
 
7
7
  import "../chunks/SSEConnection-DcA3wFsO.mjs";
@@ -1,8 +1,8 @@
1
1
  import { create } from "zustand";
2
2
 
3
- import "../chunks/tslib.es6-c-7TIv71.mjs";
3
+ import "../chunks/tslib.es6-C-olHjXV.mjs";
4
4
 
5
- import { W as WSConnection } from "../chunks/WSConnection-D9mpsVdc.mjs";
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-D69fEXMY.mjs";
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-Dv-4zGnC.mjs";
5
+ import "../chunks/uploads-worker-7X9EwX9N.mjs";
6
6
 
7
- import "../chunks/tslib.es6-c-7TIv71.mjs";
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-BOTh1g37.mjs";
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-c-7TIv71.mjs";
3
+ import "../chunks/tslib.es6-C-olHjXV.mjs";
4
4
 
5
5
  import "zustand";
@@ -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-BOTh1g37.mjs";
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-D69fEXMY.mjs";
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-B4jkR5Jx.mjs";
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-2JIpEKfz.mjs";
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-c-7TIv71.mjs";
13
+ import "./chunks/tslib.es6-C-olHjXV.mjs";
14
14
 
15
15
  import "zustand";
16
16
 
17
- import "./chunks/uploads-worker-Dv-4zGnC.mjs";
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-CJgzPHPB.mjs";
23
+ import "./chunks/IndexedDB-Dk7a4fPS.mjs";
24
24
 
25
25
  import "./chunks/SSEConnection-DcA3wFsO.mjs";
@@ -1,13 +1,17 @@
1
- export { c as copyToClipboard, h as hexToRgb } from "../chunks/misc-N8KLjOXc.mjs";
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-CJgzPHPB.mjs";
7
+ export { I as IndexedDB } from "../chunks/IndexedDB-Dk7a4fPS.mjs";
8
+
9
+ export { A as AudioVisualizer } from "../chunks/audioVisualizer-ZgT77nUw.mjs";
10
+
11
+ export { M as MdBuffer } from "../chunks/MdStreamBuffer-DNXE4XbN.mjs";
8
12
 
9
13
  export { S as SSEConnection } from "../chunks/SSEConnection-DcA3wFsO.mjs";
10
14
 
11
- export { W as WSConnection } from "../chunks/WSConnection-D9mpsVdc.mjs";
15
+ export { W as WSConnection } from "../chunks/WSConnection-DV7k84B4.mjs";
12
16
 
13
- import "../chunks/tslib.es6-c-7TIv71.mjs";
17
+ import "../chunks/tslib.es6-C-olHjXV.mjs";
@@ -1,7 +1,11 @@
1
- export { I as IndexedDB } from "../../chunks/IndexedDB-CJgzPHPB.mjs";
1
+ export { I as IndexedDB } from "../../chunks/IndexedDB-Dk7a4fPS.mjs";
2
+
3
+ export { A as AudioVisualizer } from "../../chunks/audioVisualizer-ZgT77nUw.mjs";
4
+
5
+ export { M as MdBuffer } from "../../chunks/MdStreamBuffer-DNXE4XbN.mjs";
2
6
 
3
7
  export { S as SSEConnection } from "../../chunks/SSEConnection-DcA3wFsO.mjs";
4
8
 
5
- export { W as WSConnection } from "../../chunks/WSConnection-D9mpsVdc.mjs";
9
+ export { W as WSConnection } from "../../chunks/WSConnection-DV7k84B4.mjs";
6
10
 
7
- import "../../chunks/tslib.es6-c-7TIv71.mjs";
11
+ import "../../chunks/tslib.es6-C-olHjXV.mjs";
@@ -1,5 +1,5 @@
1
- import { r as registerUploadsWorker } from "../../chunks/uploads-worker-Dv-4zGnC.mjs";
1
+ import { r as registerUploadsWorker } from "../../chunks/uploads-worker-7X9EwX9N.mjs";
2
2
 
3
- import "../../chunks/tslib.es6-c-7TIv71.mjs";
3
+ import "../../chunks/tslib.es6-C-olHjXV.mjs";
4
4
 
5
5
  registerUploadsWorker();
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { AudioBubbleProps } from './_types';
3
+ export declare const AudioBubble: React.MemoExoticComponent<(props: AudioBubbleProps) => import("react/jsx-runtime").JSX.Element>;
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { AudioBubble } from './AudioBubble';
2
+ export type { AudioBubbleProps } from './_types';
@@ -17,8 +17,7 @@ type TextFieldBaseProps = {
17
17
  onPaste?: (value: React.ClipboardEvent<HTMLInputElement>) => void;
18
18
  onClear?: () => void;
19
19
  onAction?: () => void;
20
- onValidate?: (state: boolean) => void;
21
- isValid?: boolean;
20
+ error?: boolean;
22
21
  inline?: boolean;
23
22
  maxLength?: number;
24
23
  size?: {
@@ -39,7 +38,6 @@ type TextFieldBaseProps = {
39
38
  textColorPlaceholder?: string;
40
39
  textColorDisabled?: string;
41
40
  labelColor?: string;
42
- validate?: boolean;
43
41
  iconLeft?: {
44
42
  name?: string;
45
43
  size?: number;