@dxos/plugin-transcription 0.8.4-main.dedc0f3 → 0.8.4-main.dfabb4ec29

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 (331) hide show
  1. package/dist/lib/neutral/TranscriptionContainer-XNGXNGPX.mjs +35 -0
  2. package/dist/lib/neutral/TranscriptionContainer-XNGXNGPX.mjs.map +7 -0
  3. package/dist/lib/neutral/TranscriptionPlugin.mjs +34 -0
  4. package/dist/lib/neutral/TranscriptionPlugin.mjs.map +7 -0
  5. package/dist/lib/neutral/TranscriptionPlugin.node.mjs +25 -0
  6. package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +7 -0
  7. package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs +15 -0
  8. package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs.map +7 -0
  9. package/dist/lib/neutral/blueprints/index.mjs +8 -0
  10. package/dist/lib/neutral/capabilities/index.mjs +17 -0
  11. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  12. package/dist/lib/neutral/chunk-GL4RS533.mjs +22 -0
  13. package/dist/lib/neutral/chunk-GL4RS533.mjs.map +7 -0
  14. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  15. package/dist/lib/neutral/chunk-KAEXRX3Y.mjs +35 -0
  16. package/dist/lib/neutral/chunk-KAEXRX3Y.mjs.map +7 -0
  17. package/dist/lib/{browser/chunk-BA64VLLR.mjs → neutral/chunk-LS3R7EQI.mjs} +129 -185
  18. package/dist/lib/neutral/chunk-LS3R7EQI.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-MLRJWAQH.mjs +179 -0
  20. package/dist/lib/neutral/chunk-MLRJWAQH.mjs.map +7 -0
  21. package/dist/lib/neutral/chunk-NNR3EYR2.mjs +124 -0
  22. package/dist/lib/neutral/chunk-NNR3EYR2.mjs.map +7 -0
  23. package/dist/lib/neutral/chunk-NQQK7UZQ.mjs +244 -0
  24. package/dist/lib/neutral/chunk-NQQK7UZQ.mjs.map +7 -0
  25. package/dist/lib/neutral/chunk-WVEZMGBT.mjs +8 -0
  26. package/dist/lib/neutral/chunk-WVEZMGBT.mjs.map +7 -0
  27. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs +30 -0
  28. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +7 -0
  29. package/dist/lib/neutral/components/index.mjs +207 -0
  30. package/dist/lib/neutral/components/index.mjs.map +7 -0
  31. package/dist/lib/neutral/containers/index.mjs +9 -0
  32. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  33. package/dist/lib/neutral/create-2D6S4IMQ.mjs +21 -0
  34. package/dist/lib/neutral/create-2D6S4IMQ.mjs.map +7 -0
  35. package/dist/lib/neutral/hooks/index.mjs +17 -0
  36. package/dist/lib/neutral/index.mjs +44 -0
  37. package/dist/lib/neutral/meta.json +1 -0
  38. package/dist/lib/neutral/meta.mjs +8 -0
  39. package/dist/lib/neutral/meta.mjs.map +7 -0
  40. package/dist/lib/neutral/open-2QB6IIET.mjs +27 -0
  41. package/dist/lib/neutral/open-2QB6IIET.mjs.map +7 -0
  42. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +13 -0
  43. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +7 -0
  44. package/dist/lib/neutral/operations/index.mjs +8 -0
  45. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  46. package/dist/lib/neutral/plugin.mjs +16 -0
  47. package/dist/lib/neutral/plugin.mjs.map +7 -0
  48. package/dist/lib/neutral/react-surface-QF4MUMWG.mjs +26 -0
  49. package/dist/lib/neutral/react-surface-QF4MUMWG.mjs.map +7 -0
  50. package/dist/lib/neutral/summarize-CJPVKWYZ.mjs +78 -0
  51. package/dist/lib/neutral/summarize-CJPVKWYZ.mjs.map +7 -0
  52. package/dist/lib/neutral/text-content-LHSUG2D2.mjs +30 -0
  53. package/dist/lib/neutral/text-content-LHSUG2D2.mjs.map +7 -0
  54. package/dist/lib/{node-esm/transcriber-QPS55YP2.mjs → neutral/transcriber-M3R6HPTZ.mjs} +20 -18
  55. package/dist/lib/neutral/transcriber-M3R6HPTZ.mjs.map +7 -0
  56. package/dist/lib/neutral/translations.mjs +22 -0
  57. package/dist/lib/neutral/translations.mjs.map +7 -0
  58. package/dist/lib/neutral/types/index.mjs +12 -0
  59. package/dist/lib/neutral/types/index.mjs.map +7 -0
  60. package/dist/types/src/TranscriptionPlugin.d.ts +3 -1
  61. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  62. package/dist/types/src/TranscriptionPlugin.node.d.ts +4 -0
  63. package/dist/types/src/TranscriptionPlugin.node.d.ts.map +1 -0
  64. package/dist/types/src/TranscriptionPlugin.test.d.ts +2 -0
  65. package/dist/types/src/TranscriptionPlugin.test.d.ts.map +1 -0
  66. package/dist/types/src/blueprints/index.d.ts +2 -0
  67. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  68. package/dist/types/src/blueprints/transcription-blueprint.d.ts +4 -0
  69. package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -0
  70. package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -4
  71. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  72. package/dist/types/src/capabilities/index.d.ts +10 -5
  73. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  74. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  75. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  76. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  77. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  78. package/dist/types/src/capabilities/text-content.d.ts +8 -0
  79. package/dist/types/src/capabilities/text-content.d.ts.map +1 -0
  80. package/dist/types/src/capabilities/transcriber.d.ts +4 -3
  81. package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
  82. package/dist/types/src/components/Transcription/Transcription.d.ts +18 -0
  83. package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
  84. package/dist/types/src/components/Transcription/Transcription.stories.d.ts +40 -0
  85. package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
  86. package/dist/types/src/components/Transcription/index.d.ts +2 -0
  87. package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
  88. package/dist/types/src/components/Transcription/transcription-extension.d.ts +15 -0
  89. package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
  90. package/dist/types/src/components/index.d.ts +1 -3
  91. package/dist/types/src/components/index.d.ts.map +1 -1
  92. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +6 -0
  93. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -0
  94. package/dist/types/src/containers/TranscriptionContainer/index.d.ts +2 -0
  95. package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -0
  96. package/dist/types/src/containers/index.d.ts +3 -0
  97. package/dist/types/src/containers/index.d.ts.map +1 -0
  98. package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
  99. package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
  100. package/dist/types/src/hooks/useQueueModelAdapter.d.ts +1 -1
  101. package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
  102. package/dist/types/src/hooks/useTranscriber.d.ts +2 -2
  103. package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
  104. package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
  105. package/dist/types/src/index.d.ts +2 -3
  106. package/dist/types/src/index.d.ts.map +1 -1
  107. package/dist/types/src/meta.d.ts +2 -3
  108. package/dist/types/src/meta.d.ts.map +1 -1
  109. package/dist/types/src/model/model.d.ts +2 -2
  110. package/dist/types/src/model/model.d.ts.map +1 -1
  111. package/dist/types/src/{segments-normalization → normalization}/index.d.ts +1 -1
  112. package/dist/types/src/normalization/index.d.ts.map +1 -0
  113. package/dist/types/src/{segments-normalization → normalization}/message-normalizer.d.ts +5 -5
  114. package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -0
  115. package/dist/types/src/normalization/normalization.d.ts +543 -0
  116. package/dist/types/src/normalization/normalization.d.ts.map +1 -0
  117. package/dist/types/src/normalization/normalization.test.d.ts.map +1 -0
  118. package/dist/types/src/normalization/utils.d.ts +3 -0
  119. package/dist/types/src/normalization/utils.d.ts.map +1 -0
  120. package/dist/types/src/operations/create.d.ts +5 -0
  121. package/dist/types/src/operations/create.d.ts.map +1 -0
  122. package/dist/types/src/operations/index.d.ts +3 -0
  123. package/dist/types/src/operations/index.d.ts.map +1 -0
  124. package/dist/types/src/operations/open.d.ts +5 -0
  125. package/dist/types/src/operations/open.d.ts.map +1 -0
  126. package/dist/types/src/operations/summarize.d.ts +8 -0
  127. package/dist/types/src/operations/summarize.d.ts.map +1 -0
  128. package/dist/types/src/plugin.d.ts +4 -0
  129. package/dist/types/src/plugin.d.ts.map +1 -0
  130. package/dist/types/src/{components/stories → stories}/FileTranscription.stories.d.ts +3 -4
  131. package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -0
  132. package/dist/types/src/{components/stories → stories}/KeyWordRecognition.stories.d.ts +2 -3
  133. package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -0
  134. package/dist/types/src/{components/stories → stories}/MicrophoneTranscription.stories.d.ts +5 -6
  135. package/dist/types/src/stories/MicrophoneTranscription.stories.d.ts.map +1 -0
  136. package/dist/types/src/stories/TranscriptionStory.d.ts +23 -0
  137. package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -0
  138. package/dist/types/src/stories/useIsSpeaking.d.ts.map +1 -0
  139. package/dist/types/src/testing/testing.d.ts +10 -10
  140. package/dist/types/src/testing/testing.d.ts.map +1 -1
  141. package/dist/types/src/transcriber/index.d.ts +1 -1
  142. package/dist/types/src/transcriber/index.d.ts.map +1 -1
  143. package/dist/types/src/transcriber/media-stream-recorder.d.ts +2 -2
  144. package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
  145. package/dist/types/src/transcriber/transcriber.d.ts +60 -5
  146. package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
  147. package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
  148. package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
  149. package/dist/types/src/transcriber/transcription-manager.d.ts +9 -6
  150. package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
  151. package/dist/types/src/translations.d.ts +7 -8
  152. package/dist/types/src/translations.d.ts.map +1 -1
  153. package/dist/types/src/types/TranscriptOperation.d.ts +917 -0
  154. package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -0
  155. package/dist/types/src/types/TranscriptionCapabilities.d.ts +17 -0
  156. package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -0
  157. package/dist/types/src/types/{types.d.ts → defs.d.ts} +1 -1
  158. package/dist/types/src/types/defs.d.ts.map +1 -0
  159. package/dist/types/src/types/index.d.ts +3 -3
  160. package/dist/types/src/types/index.d.ts.map +1 -1
  161. package/dist/types/src/util/array.d.ts.map +1 -1
  162. package/dist/types/src/util/get-time-str.d.ts.map +1 -1
  163. package/dist/types/src/util/index.d.ts +1 -0
  164. package/dist/types/src/util/index.d.ts.map +1 -1
  165. package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
  166. package/dist/types/src/util/render-byline.d.ts +4 -0
  167. package/dist/types/src/util/render-byline.d.ts.map +1 -0
  168. package/dist/types/tsconfig.tsbuildinfo +1 -1
  169. package/package.json +148 -82
  170. package/src/TranscriptionPlugin.node.ts +20 -0
  171. package/src/TranscriptionPlugin.test.ts +31 -0
  172. package/src/TranscriptionPlugin.tsx +22 -66
  173. package/src/blueprints/index.ts +5 -0
  174. package/src/blueprints/transcription-blueprint.ts +29 -0
  175. package/src/capabilities/blueprint-definition.ts +12 -24
  176. package/src/capabilities/index.ts +11 -7
  177. package/src/capabilities/operation-handler.ts +16 -0
  178. package/src/capabilities/react-surface.tsx +23 -14
  179. package/src/capabilities/text-content.ts +33 -0
  180. package/src/capabilities/transcriber.ts +53 -42
  181. package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +62 -59
  182. package/src/components/Transcription/Transcription.tsx +64 -0
  183. package/src/components/{Transcript → Transcription}/index.ts +1 -1
  184. package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +13 -9
  185. package/src/components/index.ts +1 -6
  186. package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +35 -0
  187. package/src/containers/TranscriptionContainer/index.ts +5 -0
  188. package/src/containers/index.ts +7 -0
  189. package/src/hooks/useAudioFile.ts +50 -45
  190. package/src/hooks/useQueueModelAdapter.ts +1 -1
  191. package/src/hooks/useTranscriber.ts +12 -4
  192. package/src/hooks/useVoiceInput.ts +2 -3
  193. package/src/index.ts +4 -5
  194. package/src/meta.ts +9 -6
  195. package/src/model/model.test.ts +20 -14
  196. package/src/model/model.ts +3 -3
  197. package/src/{segments-normalization → normalization}/message-normalizer.ts +19 -18
  198. package/src/{segments-normalization → normalization}/normalization.test.ts +7 -12
  199. package/src/normalization/normalization.ts +76 -0
  200. package/src/{segments-normalization → normalization}/utils.ts +2 -2
  201. package/src/operations/create.ts +24 -0
  202. package/src/operations/index.ts +11 -0
  203. package/src/operations/open.ts +28 -0
  204. package/src/operations/summarize.ts +101 -0
  205. package/src/plugin.ts +11 -0
  206. package/src/{components/stories → stories}/FileTranscription.stories.tsx +56 -43
  207. package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +36 -36
  208. package/src/{components/stories → stories}/MicrophoneTranscription.stories.tsx +60 -81
  209. package/src/stories/TranscriptionStory.tsx +93 -0
  210. package/src/testing/testing.ts +37 -37
  211. package/src/transcriber/index.ts +1 -1
  212. package/src/transcriber/media-stream-recorder.ts +3 -3
  213. package/src/transcriber/transcriber.browser.test.ts +4 -5
  214. package/src/transcriber/transcriber.test.ts +104 -0
  215. package/src/transcriber/transcriber.ts +99 -58
  216. package/src/transcriber/transcription-manager.ts +21 -15
  217. package/src/translations.ts +7 -7
  218. package/src/types/TranscriptOperation.ts +103 -0
  219. package/src/types/TranscriptionCapabilities.ts +39 -0
  220. package/src/types/index.ts +4 -3
  221. package/src/util/index.ts +1 -0
  222. package/src/util/render-byline.ts +33 -0
  223. package/dist/lib/browser/TranscriptContainer-4RBK74JP.mjs +0 -11
  224. package/dist/lib/browser/blueprint-definition-TJABB43G.mjs +0 -142
  225. package/dist/lib/browser/blueprint-definition-TJABB43G.mjs.map +0 -7
  226. package/dist/lib/browser/chunk-3X7HP44M.mjs +0 -26
  227. package/dist/lib/browser/chunk-3X7HP44M.mjs.map +0 -7
  228. package/dist/lib/browser/chunk-AGZYQGSP.mjs +0 -8
  229. package/dist/lib/browser/chunk-AGZYQGSP.mjs.map +0 -7
  230. package/dist/lib/browser/chunk-BA64VLLR.mjs.map +0 -7
  231. package/dist/lib/browser/chunk-HXVGV7T6.mjs +0 -63
  232. package/dist/lib/browser/chunk-HXVGV7T6.mjs.map +0 -7
  233. package/dist/lib/browser/chunk-TNEQFHIU.mjs +0 -16
  234. package/dist/lib/browser/chunk-TNEQFHIU.mjs.map +0 -7
  235. package/dist/lib/browser/chunk-VVXRHJCH.mjs +0 -746
  236. package/dist/lib/browser/chunk-VVXRHJCH.mjs.map +0 -7
  237. package/dist/lib/browser/index.mjs +0 -131
  238. package/dist/lib/browser/index.mjs.map +0 -7
  239. package/dist/lib/browser/intent-resolver-T3EGLS3L.mjs +0 -25
  240. package/dist/lib/browser/intent-resolver-T3EGLS3L.mjs.map +0 -7
  241. package/dist/lib/browser/meta.json +0 -1
  242. package/dist/lib/browser/react-surface-4Y3YISAD.mjs +0 -34
  243. package/dist/lib/browser/react-surface-4Y3YISAD.mjs.map +0 -7
  244. package/dist/lib/browser/transcriber-JOOAQVYV.mjs +0 -56
  245. package/dist/lib/browser/transcriber-JOOAQVYV.mjs.map +0 -7
  246. package/dist/lib/browser/types/index.mjs +0 -12
  247. package/dist/lib/node-esm/TranscriptContainer-EGAAYVOP.mjs +0 -12
  248. package/dist/lib/node-esm/blueprint-definition-R4UF7YJZ.mjs +0 -143
  249. package/dist/lib/node-esm/blueprint-definition-R4UF7YJZ.mjs.map +0 -7
  250. package/dist/lib/node-esm/chunk-3QAIZGMW.mjs +0 -17
  251. package/dist/lib/node-esm/chunk-3QAIZGMW.mjs.map +0 -7
  252. package/dist/lib/node-esm/chunk-CF5Z6FAB.mjs +0 -10
  253. package/dist/lib/node-esm/chunk-CF5Z6FAB.mjs.map +0 -7
  254. package/dist/lib/node-esm/chunk-J5GQ3KGX.mjs +0 -487
  255. package/dist/lib/node-esm/chunk-J5GQ3KGX.mjs.map +0 -7
  256. package/dist/lib/node-esm/chunk-QARUDLHN.mjs +0 -27
  257. package/dist/lib/node-esm/chunk-QARUDLHN.mjs.map +0 -7
  258. package/dist/lib/node-esm/chunk-SFQNMFHX.mjs +0 -747
  259. package/dist/lib/node-esm/chunk-SFQNMFHX.mjs.map +0 -7
  260. package/dist/lib/node-esm/chunk-W72HVQMD.mjs +0 -64
  261. package/dist/lib/node-esm/chunk-W72HVQMD.mjs.map +0 -7
  262. package/dist/lib/node-esm/index.mjs +0 -132
  263. package/dist/lib/node-esm/index.mjs.map +0 -7
  264. package/dist/lib/node-esm/intent-resolver-VDHCUAIO.mjs +0 -26
  265. package/dist/lib/node-esm/intent-resolver-VDHCUAIO.mjs.map +0 -7
  266. package/dist/lib/node-esm/meta.json +0 -1
  267. package/dist/lib/node-esm/react-surface-ZIXDGJAN.mjs +0 -35
  268. package/dist/lib/node-esm/react-surface-ZIXDGJAN.mjs.map +0 -7
  269. package/dist/lib/node-esm/transcriber-QPS55YP2.mjs.map +0 -7
  270. package/dist/lib/node-esm/types/index.mjs +0 -13
  271. package/dist/types/src/capabilities/capabilities.d.ts +0 -17
  272. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  273. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  274. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  275. package/dist/types/src/components/Transcript/Transcript.d.ts +0 -20
  276. package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
  277. package/dist/types/src/components/Transcript/Transcript.stories.d.ts +0 -39
  278. package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
  279. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
  280. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
  281. package/dist/types/src/components/Transcript/index.d.ts +0 -2
  282. package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
  283. package/dist/types/src/components/Transcript/transcript-extension.d.ts +0 -15
  284. package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
  285. package/dist/types/src/components/TranscriptContainer.d.ts +0 -9
  286. package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
  287. package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +0 -1
  288. package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +0 -1
  289. package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
  290. package/dist/types/src/components/stories/TranscriptionStory.d.ts +0 -12
  291. package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +0 -1
  292. package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +0 -1
  293. package/dist/types/src/functions/index.d.ts +0 -3
  294. package/dist/types/src/functions/index.d.ts.map +0 -1
  295. package/dist/types/src/functions/open.d.ts +0 -7
  296. package/dist/types/src/functions/open.d.ts.map +0 -1
  297. package/dist/types/src/functions/summarize.d.ts +0 -11
  298. package/dist/types/src/functions/summarize.d.ts.map +0 -1
  299. package/dist/types/src/segments-normalization/index.d.ts.map +0 -1
  300. package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +0 -1
  301. package/dist/types/src/segments-normalization/normalization.d.ts +0 -461
  302. package/dist/types/src/segments-normalization/normalization.d.ts.map +0 -1
  303. package/dist/types/src/segments-normalization/normalization.test.d.ts.map +0 -1
  304. package/dist/types/src/segments-normalization/utils.d.ts +0 -3
  305. package/dist/types/src/segments-normalization/utils.d.ts.map +0 -1
  306. package/dist/types/src/types/Transcript.d.ts +0 -30
  307. package/dist/types/src/types/Transcript.d.ts.map +0 -1
  308. package/dist/types/src/types/TranscriptAction.d.ts +0 -23
  309. package/dist/types/src/types/TranscriptAction.d.ts.map +0 -1
  310. package/dist/types/src/types/types.d.ts.map +0 -1
  311. package/src/capabilities/capabilities.ts +0 -33
  312. package/src/capabilities/intent-resolver.ts +0 -18
  313. package/src/components/Transcript/Transcript.tsx +0 -93
  314. package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
  315. package/src/components/TranscriptContainer.tsx +0 -36
  316. package/src/components/stories/TranscriptionStory.tsx +0 -45
  317. package/src/functions/index.ts +0 -6
  318. package/src/functions/open.ts +0 -37
  319. package/src/functions/summarize.ts +0 -97
  320. package/src/segments-normalization/normalization.ts +0 -115
  321. package/src/types/Transcript.ts +0 -44
  322. package/src/types/TranscriptAction.ts +0 -24
  323. package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
  324. package/dist/lib/{browser/TranscriptContainer-4RBK74JP.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  325. package/dist/lib/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
  326. package/dist/lib/{node-esm/TranscriptContainer-EGAAYVOP.mjs.map → neutral/index.mjs.map} +0 -0
  327. package/dist/types/src/{segments-normalization → normalization}/normalization.test.d.ts +0 -0
  328. package/dist/types/src/{components/stories → stories}/useIsSpeaking.d.ts +0 -0
  329. package/src/{segments-normalization → normalization}/index.ts +1 -1
  330. /package/src/{components/stories → stories}/useIsSpeaking.tsx +0 -0
  331. /package/src/types/{types.ts → defs.ts} +0 -0
@@ -1,746 +0,0 @@
1
- import {
2
- TranscriptionCapabilities
3
- } from "./chunk-TNEQFHIU.mjs";
4
-
5
- // src/components/TranscriptContainer.tsx
6
- import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
7
- import React2 from "react";
8
- import { fullyQualifiedId, getSpace } from "@dxos/client/echo";
9
- import { useMembers, useQueue } from "@dxos/react-client/echo";
10
- import { StackItem } from "@dxos/react-ui-stack";
11
-
12
- // src/hooks/useAudioFile.ts
13
- import { useEffect, useState } from "react";
14
- import { scheduleTask } from "@dxos/async";
15
- import { Context } from "@dxos/context";
16
- import { log } from "@dxos/log";
17
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useAudioFile.ts";
18
- var useAudioFile = (audioUrl, constraints) => {
19
- const [{ audio, stream, track }, setStream] = useState({});
20
- useEffect(() => {
21
- const ctx = new Context(void 0, {
22
- F: __dxlog_file,
23
- L: 20
24
- });
25
- scheduleTask(ctx, async () => {
26
- const response = await fetch(audioUrl);
27
- const blob = await response.blob();
28
- const objectUrl = URL.createObjectURL(blob);
29
- ctx.onDispose(() => {
30
- URL.revokeObjectURL(objectUrl);
31
- });
32
- const audio2 = new Audio();
33
- audio2.src = objectUrl;
34
- await new Promise((resolve, reject) => {
35
- audio2.addEventListener("error", (err) => {
36
- log.error("error", {
37
- err
38
- }, {
39
- F: __dxlog_file,
40
- L: 37,
41
- S: void 0,
42
- C: (f, a) => f(...a)
43
- });
44
- reject(err);
45
- }, {
46
- once: true
47
- });
48
- audio2.addEventListener("canplay", async () => {
49
- resolve();
50
- }, {
51
- once: true
52
- });
53
- audio2.load();
54
- });
55
- const audioCtx = new AudioContext();
56
- if (audioCtx.state === "suspended") {
57
- await audioCtx.resume();
58
- }
59
- const destination = audioCtx.createMediaStreamDestination();
60
- destination.channelCount = 1;
61
- const source = audioCtx.createMediaElementSource(audio2);
62
- source.connect(destination);
63
- const track2 = destination.stream.getAudioTracks()[0];
64
- if (constraints) {
65
- await track2.applyConstraints(constraints).catch((err) => log.catch(err, void 0, {
66
- F: __dxlog_file,
67
- L: 66,
68
- S: void 0,
69
- C: (f, a) => f(...a)
70
- }));
71
- }
72
- setStream({
73
- audio: audio2,
74
- stream: destination.stream,
75
- track: destination.stream.getAudioTracks()[0]
76
- });
77
- });
78
- return () => {
79
- void ctx.dispose();
80
- };
81
- }, [
82
- audioUrl
83
- ]);
84
- return {
85
- audio,
86
- stream,
87
- track
88
- };
89
- };
90
-
91
- // src/hooks/useAudioTrack.ts
92
- import { useEffect as useEffect2, useState as useState2 } from "react";
93
- var useAudioTrack = (active, constraints) => {
94
- const [track, setTrack] = useState2();
95
- useEffect2(() => {
96
- if (!active) {
97
- track?.stop();
98
- setTrack(void 0);
99
- return;
100
- }
101
- const initAudio = async () => {
102
- const audio = new Audio();
103
- audio.srcObject = await navigator.mediaDevices.getUserMedia({
104
- audio: constraints ?? true
105
- });
106
- const [track2] = audio.srcObject.getAudioTracks();
107
- if (track2) {
108
- setTrack(track2);
109
- }
110
- };
111
- if (active) {
112
- void initAudio();
113
- }
114
- }, [
115
- active
116
- ]);
117
- return track;
118
- };
119
-
120
- // src/hooks/useQueueModelAdapter.ts
121
- import { useEffect as useEffect3, useMemo, useState as useState3 } from "react";
122
-
123
- // src/model/model.ts
124
- import { Text } from "@codemirror/state";
125
- import { Event } from "@dxos/async";
126
- import { invariant } from "@dxos/invariant";
127
- import { log as log2 } from "@dxos/log";
128
- function _define_property(obj, key, value) {
129
- if (key in obj) {
130
- Object.defineProperty(obj, key, {
131
- value,
132
- enumerable: true,
133
- configurable: true,
134
- writable: true
135
- });
136
- } else {
137
- obj[key] = value;
138
- }
139
- return obj;
140
- }
141
- var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/model/model.ts";
142
- var DocumentAdapter = class {
143
- /** The document must always have at least one line. */
144
- lineCount() {
145
- return this._view.state.doc.lines - 1;
146
- }
147
- replaceLines(from, remove, insert) {
148
- log2("replaceLines", {
149
- count: this._view.state.doc.lines,
150
- from,
151
- remove,
152
- insert
153
- }, {
154
- F: __dxlog_file2,
155
- L: 39,
156
- S: this,
157
- C: (f, a) => f(...a)
158
- });
159
- const numLines = this._view.state.doc.lines;
160
- const posFrom = this._view.state.doc.line(from).from;
161
- const posTo = remove === 0 ? posFrom : this._view.state.doc.line(Math.min(numLines, from + remove)).from;
162
- let text = insert.join("\n");
163
- if (posTo === this._view.state.doc.length) {
164
- text += "\n";
165
- }
166
- this._view.dispatch({
167
- changes: {
168
- from: posFrom,
169
- to: posTo,
170
- insert: text
171
- }
172
- });
173
- }
174
- constructor(_view) {
175
- _define_property(this, "_view", void 0);
176
- this._view = _view;
177
- }
178
- };
179
- var SerializationModel = class {
180
- toJSON() {
181
- return {
182
- chunks: this._chunks.length,
183
- changes: this._changes.length
184
- };
185
- }
186
- get doc() {
187
- return Text.of([
188
- ...this._chunks.flatMap((chunk, index) => this._renderer(chunk, index)),
189
- ""
190
- ]);
191
- }
192
- get chunks() {
193
- return this._chunks;
194
- }
195
- /**
196
- * Get the block ID at the given line number.
197
- */
198
- getChunkAtLine(line) {
199
- return this._lineToChunk.get(line);
200
- }
201
- reset() {
202
- this._chunks.length = 0;
203
- this._chunkLineCounts.clear();
204
- this._lineToChunk.clear();
205
- this.update.emit();
206
- return this;
207
- }
208
- appendChunk(chunk) {
209
- const index = this._chunks.length;
210
- this._chunks.push(chunk);
211
- this._changes.push({
212
- type: "append",
213
- index,
214
- chunk
215
- });
216
- this.update.emit();
217
- return this;
218
- }
219
- updateChunk(chunk) {
220
- const index = this._chunks.findIndex((c) => c.id === chunk.id);
221
- invariant(index !== -1, void 0, {
222
- F: __dxlog_file2,
223
- L: 147,
224
- S: this,
225
- A: [
226
- "index !== -1",
227
- ""
228
- ]
229
- });
230
- this._chunks[index] = chunk;
231
- this._changes.push({
232
- type: "update",
233
- index,
234
- chunk
235
- });
236
- this.update.emit();
237
- return this;
238
- }
239
- deleteBlock(id) {
240
- const index = this._chunks.findIndex((c) => c.id === id);
241
- invariant(index !== -1, void 0, {
242
- F: __dxlog_file2,
243
- L: 156,
244
- S: this,
245
- A: [
246
- "index !== -1",
247
- ""
248
- ]
249
- });
250
- this._chunks.splice(index, 1);
251
- this._changes.push({
252
- type: "delete",
253
- index,
254
- id
255
- });
256
- this.update.emit();
257
- return this;
258
- }
259
- /**
260
- * Syncs the tracked changes with the ChunkDocument.
261
- */
262
- sync(document2) {
263
- log2("sync", {
264
- changes: this._changes
265
- }, {
266
- F: __dxlog_file2,
267
- L: 167,
268
- S: this,
269
- C: (f, a) => f(...a)
270
- });
271
- for (const change of this._changes) {
272
- switch (change.type) {
273
- case "append": {
274
- const lines = this._renderer(change.chunk, change.index);
275
- const lastLine = document2.lineCount();
276
- document2.replaceLines(lastLine + 1, 0, lines);
277
- break;
278
- }
279
- case "update": {
280
- let lineStart = 1;
281
- for (let i = 0; i < change.index; i++) {
282
- lineStart += this._chunkLineCounts.get(this._chunks[i].id);
283
- }
284
- const previousLineCount = this._chunkLineCounts.get(change.chunk.id);
285
- const newLines = this._renderer(change.chunk, change.index);
286
- document2.replaceLines(lineStart, previousLineCount, newLines);
287
- break;
288
- }
289
- case "delete": {
290
- let lineStart = 1;
291
- for (let i = 0; i < change.index; i++) {
292
- lineStart += this._chunkLineCounts.get(this._chunks[i].id);
293
- }
294
- const previousLineCount = this._chunkLineCounts.get(change.id);
295
- document2.replaceLines(lineStart, previousLineCount, []);
296
- break;
297
- }
298
- }
299
- }
300
- this._lineToChunk.clear();
301
- let currentLine = 1;
302
- for (const [index, chunk] of this._chunks.entries()) {
303
- const lineCount = this._renderer(chunk, index).length;
304
- this._chunkLineCounts.set(chunk.id, lineCount);
305
- this._lineToChunk.set(currentLine, chunk);
306
- currentLine += lineCount;
307
- }
308
- const chunkIds = new Set(this._chunks.map((chunk) => chunk.id));
309
- for (const id of this._chunkLineCounts.keys()) {
310
- if (!chunkIds.has(id)) {
311
- this._chunkLineCounts.delete(id);
312
- }
313
- }
314
- this._changes.length = 0;
315
- return this;
316
- }
317
- constructor(_renderer, initialChunks = []) {
318
- _define_property(this, "_renderer", void 0);
319
- _define_property(this, "_chunks", void 0);
320
- _define_property(this, "_chunkLineCounts", void 0);
321
- _define_property(this, "_lineToChunk", void 0);
322
- _define_property(this, "_changes", void 0);
323
- _define_property(this, "update", void 0);
324
- this._renderer = _renderer;
325
- this._chunks = [];
326
- this._chunkLineCounts = /* @__PURE__ */ new Map();
327
- this._lineToChunk = /* @__PURE__ */ new Map();
328
- this._changes = [];
329
- this.update = new Event();
330
- initialChunks.forEach((chunk) => {
331
- this.appendChunk(chunk);
332
- });
333
- }
334
- };
335
-
336
- // src/hooks/useQueueModelAdapter.ts
337
- var useQueueModelAdapter = (renderer, queue, initialChunks = []) => {
338
- const model = useMemo(() => new SerializationModel(renderer, initialChunks), [
339
- queue
340
- ]);
341
- const [loaded, setLoaded] = useState3(false);
342
- useEffect3(() => {
343
- if (!queue) {
344
- return;
345
- }
346
- const update = () => {
347
- for (const block of queue?.objects ?? []) {
348
- model.appendChunk(block);
349
- }
350
- setLoaded(true);
351
- };
352
- let i;
353
- if (queue.isLoading) {
354
- i = setInterval(() => {
355
- if (!queue?.isLoading) {
356
- clearInterval(i);
357
- update();
358
- }
359
- }, 1e3);
360
- } else {
361
- update();
362
- }
363
- return () => clearTimeout(i);
364
- }, [
365
- model,
366
- queue
367
- ]);
368
- useEffect3(() => {
369
- if (!loaded || !queue || model.chunks.length === queue.objects.length) {
370
- return;
371
- }
372
- const chunk = queue.objects.at(-1);
373
- if (chunk) {
374
- model.appendChunk(chunk);
375
- }
376
- }, [
377
- model,
378
- loaded,
379
- queue?.objects.length
380
- ]);
381
- return model;
382
- };
383
-
384
- // src/hooks/useTranscriber.ts
385
- import { useEffect as useEffect4, useMemo as useMemo2 } from "react";
386
- import { useCapabilities } from "@dxos/app-framework";
387
-
388
- // src/capabilities/index.ts
389
- import { lazy } from "@dxos/app-framework";
390
- var BlueprintDefinition = lazy(() => import("./blueprint-definition-TJABB43G.mjs"));
391
- var IntentResolver = lazy(() => import("./intent-resolver-T3EGLS3L.mjs"));
392
- var ReactSurface = lazy(() => import("./react-surface-4Y3YISAD.mjs"));
393
- var Transcriber = lazy(() => import("./transcriber-JOOAQVYV.mjs"));
394
-
395
- // src/hooks/useTranscriber.ts
396
- var useTranscriber = ({ audioStreamTrack, recorderConfig, transcriberConfig, onSegments }) => {
397
- const [getTranscriber] = useCapabilities(TranscriptionCapabilities.Transcriber);
398
- const transcriber = useMemo2(() => {
399
- if (!getTranscriber || !audioStreamTrack || !onSegments) {
400
- return void 0;
401
- }
402
- return getTranscriber({
403
- audioStreamTrack,
404
- recorderConfig,
405
- transcriberConfig,
406
- onSegments
407
- });
408
- }, [
409
- getTranscriber,
410
- audioStreamTrack,
411
- recorderConfig,
412
- transcriberConfig,
413
- onSegments
414
- ]);
415
- useEffect4(() => {
416
- return () => {
417
- void transcriber?.close();
418
- };
419
- }, [
420
- transcriber
421
- ]);
422
- return transcriber;
423
- };
424
-
425
- // src/hooks/useVoiceInput.ts
426
- import { useCallback, useEffect as useEffect5, useState as useState4 } from "react";
427
- import { scheduleMicroTask } from "@dxos/async";
428
- import { Context as Context2 } from "@dxos/context";
429
- import { log as log3 } from "@dxos/log";
430
- import { useSoundEffect } from "@dxos/react-ui-sfx";
431
- var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useVoiceInput.ts";
432
- var useVoiceInput = ({ active, onUpdate }) => {
433
- const soundStart = useSoundEffect("StartRecording");
434
- const soundStop = useSoundEffect("StopRecording");
435
- const handleSegments = useCallback(async (segments) => {
436
- const text = segments.map((str) => str.text.trim().replace(/[^\w\s]/g, "")).join(" ");
437
- onUpdate(text);
438
- }, []);
439
- const [recording, setRecording] = useState4(false);
440
- const track = useAudioTrack(active);
441
- const transcriber = useTranscriber({
442
- audioStreamTrack: track,
443
- onSegments: handleSegments
444
- });
445
- useEffect5(() => {
446
- const ctx = new Context2(void 0, {
447
- F: __dxlog_file3,
448
- L: 44
449
- });
450
- scheduleMicroTask(ctx, async () => {
451
- if (active && transcriber) {
452
- await transcriber.open();
453
- log3.info("starting...", void 0, {
454
- F: __dxlog_file3,
455
- L: 48,
456
- S: void 0,
457
- C: (f, a) => f(...a)
458
- });
459
- setRecording(true);
460
- void soundStart.play();
461
- transcriber.startChunksRecording();
462
- } else if (!active && transcriber?.isOpen) {
463
- transcriber?.stopChunksRecording();
464
- await transcriber?.close();
465
- log3.info("stopped", void 0, {
466
- F: __dxlog_file3,
467
- L: 55,
468
- S: void 0,
469
- C: (f, a) => f(...a)
470
- });
471
- setRecording(false);
472
- void soundStop.play();
473
- }
474
- });
475
- return () => {
476
- void ctx.dispose();
477
- };
478
- }, [
479
- active,
480
- transcriber
481
- ]);
482
- return {
483
- recording
484
- };
485
- };
486
-
487
- // src/components/Transcript/Transcript.tsx
488
- import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
489
- import React from "react";
490
- import { useThemeContext } from "@dxos/react-ui";
491
- import { autoScroll, createBasicExtensions, createMarkdownExtensions, createThemeExtensions, decorateMarkdown, preview, useTextEditor } from "@dxos/react-ui-editor";
492
- import { mx } from "@dxos/react-ui-theme";
493
- import { isNotFalsy } from "@dxos/util";
494
-
495
- // src/components/Transcript/transcript-extension.ts
496
- import { RangeSetBuilder } from "@codemirror/state";
497
- import { EditorView, GutterMarker, ViewPlugin, gutter } from "@codemirror/view";
498
- import { format } from "date-fns/format";
499
- import { intervalToDuration } from "date-fns/intervalToDuration";
500
- import { addEventListener, combine } from "@dxos/async";
501
- function _define_property2(obj, key, value) {
502
- if (key in obj) {
503
- Object.defineProperty(obj, key, {
504
- value,
505
- enumerable: true,
506
- configurable: true,
507
- writable: true
508
- });
509
- } else {
510
- obj[key] = value;
511
- }
512
- return obj;
513
- }
514
- var transcript = ({ model, started }) => {
515
- return [
516
- // Show timestamps in the gutter.
517
- gutter({
518
- class: "cm-timestamp-gutter",
519
- lineMarkerChange: (update) => update.docChanged || update.viewportChanged,
520
- markers: (view) => {
521
- const start = getStartTime(started, model.chunks[0]);
522
- const builder = new RangeSetBuilder();
523
- for (const { from, to } of view.visibleRanges) {
524
- let line = view.state.doc.lineAt(from);
525
- while (line.from <= to) {
526
- const block = model.getChunkAtLine(line.number)?.blocks[0];
527
- const timestamp = block?._tag === "transcript" && block.started;
528
- if (timestamp) {
529
- builder.add(line.from, line.from, new TimestampMarker(line.number, new Date(timestamp), start));
530
- }
531
- if (line.to + 1 > view.state.doc.length) {
532
- break;
533
- }
534
- line = view.state.doc.lineAt(line.to + 1);
535
- }
536
- }
537
- return builder.finish();
538
- }
539
- }),
540
- // Listen for model updates.
541
- ViewPlugin.fromClass(class {
542
- update(_update) {
543
- if (!this._initialized) {
544
- this._initialized = true;
545
- setTimeout(() => {
546
- model.sync(this._adapter);
547
- });
548
- }
549
- }
550
- destroy() {
551
- this._controls?.remove();
552
- this._cleanup();
553
- }
554
- constructor(view) {
555
- _define_property2(this, "_controls", void 0);
556
- _define_property2(this, "_cleanup", void 0);
557
- _define_property2(this, "_adapter", void 0);
558
- _define_property2(this, "_initialized", false);
559
- this._adapter = new DocumentAdapter(view);
560
- const scroller = view.scrollDOM;
561
- let isAutoScrolling = false;
562
- let hasScrolled = false;
563
- let timeout;
564
- const scrollToBottom = (smooth = false) => {
565
- scroller.style.scrollBehavior = smooth ? "smooth" : "";
566
- scroller.classList.add("cm-hide-scrollbar");
567
- isAutoScrolling = true;
568
- clearTimeout(timeout);
569
- timeout = setTimeout(() => {
570
- this._controls?.classList.add("opacity-0");
571
- scroller.classList.remove("cm-hide-scrollbar");
572
- isAutoScrolling = false;
573
- }, 500);
574
- view.dispatch({
575
- effects: EditorView.scrollIntoView(view.state.doc.length, {
576
- y: "end"
577
- })
578
- });
579
- };
580
- this._cleanup = combine(addEventListener(view.scrollDOM, "scroll", () => {
581
- if (!isAutoScrolling) {
582
- hasScrolled = true;
583
- this._controls?.classList.remove("opacity-0");
584
- }
585
- }), model.update.on(() => {
586
- const autoScroll2 = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight === 0 || !hasScrolled;
587
- model.sync(this._adapter);
588
- if (autoScroll2) {
589
- scrollToBottom(true);
590
- }
591
- }));
592
- }
593
- }),
594
- EditorView.theme({
595
- ".cm-timestamp-gutter": {
596
- width: "6rem",
597
- paddingRight: "1rem"
598
- },
599
- ".cm-timestamp-gutter > .cm-gutterElement > div": {
600
- display: "inline-flex",
601
- textAlign: "right",
602
- padding: "3px"
603
- }
604
- })
605
- ];
606
- };
607
- var TimestampMarker = class extends GutterMarker {
608
- eq(other) {
609
- return other._timestamp === this._timestamp;
610
- }
611
- toDOM(view) {
612
- const el = document.createElement("div");
613
- el.className = "text-sm text-subdued hover:bg-hoverSurface cursor-pointer";
614
- el.textContent = formatTimestamp(this._timestamp, this._started);
615
- el.onclick = () => {
616
- const pos = view.state.doc.line(this._line).from;
617
- view.dispatch({
618
- effects: EditorView.scrollIntoView(pos, {
619
- y: "start"
620
- })
621
- });
622
- };
623
- return el;
624
- }
625
- constructor(_line, _timestamp, _started) {
626
- super(), _define_property2(this, "_line", void 0), _define_property2(this, "_timestamp", void 0), _define_property2(this, "_started", void 0), this._line = _line, this._timestamp = _timestamp, this._started = _started;
627
- }
628
- };
629
- var getStartTime = (started, message) => {
630
- if (started) {
631
- return started;
632
- }
633
- if (message?.blocks[0]?._tag === "transcript" && message.blocks[0].started) {
634
- return new Date(message.blocks[0].started);
635
- }
636
- return void 0;
637
- };
638
- var formatTimestamp = (timestamp, relative) => {
639
- if (relative) {
640
- const pad = (n = 0) => String(n).padStart(2, "0");
641
- const { hours, minutes, seconds } = intervalToDuration({
642
- start: relative,
643
- end: timestamp
644
- });
645
- return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
646
- } else {
647
- return format(timestamp, "HH:mm:ss");
648
- }
649
- };
650
-
651
- // src/components/Transcript/Transcript.tsx
652
- var renderByline = (identities) => (message, index, debug = false) => {
653
- if (message.sender.role === "assistant") {
654
- return [
655
- message.blocks.find((block) => block._tag === "transcript")?.text ?? "",
656
- ""
657
- ];
658
- }
659
- const identity = identities.find((identity2) => identity2.did === message.sender.identityDid);
660
- const name = identity?.profile?.displayName ?? message.sender.contact?.target?.fullName ?? message.sender.name ?? message.sender.email ?? message.sender.identityDid;
661
- const blocks = message.blocks.filter((block) => block._tag === "transcript");
662
- return [
663
- // TODO(thure): Use an XML tag with the bits needed here.
664
- `###### ${name}` + (debug ? ` [${index}]:${message.id}` : ""),
665
- blocks.map((block) => block.text.trim()).join(" "),
666
- ""
667
- ];
668
- };
669
- var TranscriptView = ({ classNames, space, transcript: object, model }) => {
670
- var _effect = _useSignals();
671
- try {
672
- const { themeMode } = useThemeContext();
673
- const { parentRef } = useTextEditor(() => {
674
- return {
675
- extensions: [
676
- createBasicExtensions({
677
- readOnly: true,
678
- lineWrapping: true,
679
- search: true
680
- }),
681
- createMarkdownExtensions(),
682
- createThemeExtensions({
683
- themeMode
684
- }),
685
- decorateMarkdown(),
686
- preview(),
687
- transcript({
688
- model,
689
- started: object?.started ? new Date(object.started) : void 0
690
- }),
691
- autoScroll()
692
- ].filter(isNotFalsy)
693
- };
694
- }, [
695
- space,
696
- model
697
- ]);
698
- return /* @__PURE__ */ React.createElement("div", {
699
- ref: parentRef,
700
- className: mx("flex grow overflow-hidden container-max-width", classNames),
701
- "data-popover-collision-boundary": true
702
- });
703
- } finally {
704
- _effect.f();
705
- }
706
- };
707
-
708
- // src/components/TranscriptContainer.tsx
709
- var TranscriptionContainer = ({ transcript: transcript2 }) => {
710
- var _effect = _useSignals2();
711
- try {
712
- const attendableId = fullyQualifiedId(transcript2);
713
- const space = getSpace(transcript2);
714
- const members = useMembers(space?.key).map((member) => member.identity);
715
- const queue = useQueue(transcript2.queue.dxn, {
716
- pollInterval: 1e3
717
- });
718
- const model = useQueueModelAdapter(renderByline(members), queue);
719
- return /* @__PURE__ */ React2.createElement(StackItem.Content, null, /* @__PURE__ */ React2.createElement(TranscriptView, {
720
- attendableId,
721
- space,
722
- model,
723
- transcript: transcript2
724
- }));
725
- } finally {
726
- _effect.f();
727
- }
728
- };
729
- var TranscriptContainer_default = TranscriptionContainer;
730
-
731
- export {
732
- renderByline,
733
- TranscriptView,
734
- useAudioFile,
735
- useAudioTrack,
736
- useQueueModelAdapter,
737
- useTranscriber,
738
- useVoiceInput,
739
- TranscriptionContainer,
740
- TranscriptContainer_default,
741
- BlueprintDefinition,
742
- IntentResolver,
743
- ReactSurface,
744
- Transcriber
745
- };
746
- //# sourceMappingURL=chunk-VVXRHJCH.mjs.map