@dxos/plugin-transcription 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae

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 (263) hide show
  1. package/dist/lib/browser/TranscriptionContainer-RBFHP2AV.mjs +41 -0
  2. package/dist/lib/browser/TranscriptionContainer-RBFHP2AV.mjs.map +7 -0
  3. package/dist/lib/browser/blueprint-definition-C6XA2SVZ.mjs +18 -0
  4. package/dist/lib/browser/blueprint-definition-C6XA2SVZ.mjs.map +7 -0
  5. package/dist/lib/browser/blueprints/index.mjs +9 -0
  6. package/dist/lib/browser/chunk-2B74LZZD.mjs +22 -0
  7. package/dist/lib/browser/chunk-2B74LZZD.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-COBQIZ6B.mjs → chunk-EV5ZYKET.mjs} +60 -86
  9. package/dist/lib/browser/chunk-EV5ZYKET.mjs.map +7 -0
  10. package/dist/lib/browser/chunk-GH4IIQ6C.mjs +54 -0
  11. package/dist/lib/browser/chunk-GH4IIQ6C.mjs.map +7 -0
  12. package/dist/lib/browser/chunk-HOOPZ7EM.mjs +35 -0
  13. package/dist/lib/browser/chunk-HOOPZ7EM.mjs.map +7 -0
  14. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  15. package/dist/lib/browser/{blueprint-definition-GO6GTEBT.mjs → chunk-O7ILGNBZ.mjs} +39 -41
  16. package/dist/lib/browser/chunk-O7ILGNBZ.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-ZS2FXKEF.mjs → chunk-XLMRCOQN.mjs} +383 -470
  18. package/dist/lib/browser/chunk-XLMRCOQN.mjs.map +7 -0
  19. package/dist/lib/browser/index.mjs +62 -77
  20. package/dist/lib/browser/index.mjs.map +4 -4
  21. package/dist/lib/browser/meta.json +1 -1
  22. package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs +23 -0
  23. package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs.map +7 -0
  24. package/dist/lib/browser/react-surface-U2SI74JK.mjs +36 -0
  25. package/dist/lib/browser/react-surface-U2SI74JK.mjs.map +7 -0
  26. package/dist/lib/browser/{transcriber-NG5MRCP6.mjs → transcriber-WCPHHJYY.mjs} +19 -14
  27. package/dist/lib/browser/transcriber-WCPHHJYY.mjs.map +7 -0
  28. package/dist/lib/browser/types/index.mjs +8 -5
  29. package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs +42 -0
  30. package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs.map +7 -0
  31. package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs +19 -0
  32. package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs.map +7 -0
  33. package/dist/lib/node-esm/blueprints/index.mjs +10 -0
  34. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-6GW5NZYG.mjs +55 -0
  36. package/dist/lib/node-esm/chunk-6GW5NZYG.mjs.map +7 -0
  37. package/dist/lib/node-esm/{chunk-A6SB234F.mjs → chunk-7UE7G6DE.mjs} +60 -86
  38. package/dist/lib/node-esm/chunk-7UE7G6DE.mjs.map +7 -0
  39. package/dist/lib/node-esm/{chunk-PEZRQYKO.mjs → chunk-DYUGYQCB.mjs} +383 -470
  40. package/dist/lib/node-esm/chunk-DYUGYQCB.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-KLTPFUKN.mjs → chunk-F47HK7GT.mjs} +7 -8
  42. package/dist/lib/node-esm/chunk-F47HK7GT.mjs.map +7 -0
  43. package/dist/lib/node-esm/{blueprint-definition-6SU7GLBR.mjs → chunk-H3MXHMQL.mjs} +39 -41
  44. package/dist/lib/node-esm/chunk-H3MXHMQL.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  46. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-NVM2QUMX.mjs +37 -0
  48. package/dist/lib/node-esm/chunk-NVM2QUMX.mjs.map +7 -0
  49. package/dist/lib/node-esm/index.mjs +62 -77
  50. package/dist/lib/node-esm/index.mjs.map +4 -4
  51. package/dist/lib/node-esm/meta.json +1 -1
  52. package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs +24 -0
  53. package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs.map +7 -0
  54. package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs +37 -0
  55. package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs.map +7 -0
  56. package/dist/lib/node-esm/{transcriber-SMU7HD6F.mjs → transcriber-2RIHUEX4.mjs} +19 -14
  57. package/dist/lib/node-esm/transcriber-2RIHUEX4.mjs.map +7 -0
  58. package/dist/lib/node-esm/types/index.mjs +8 -5
  59. package/dist/types/src/TranscriptionPlugin.d.ts +2 -1
  60. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  61. package/dist/types/src/blueprints/index.d.ts +2 -0
  62. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  63. package/dist/types/src/blueprints/transcription-blueprint.d.ts +4 -0
  64. package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -0
  65. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
  66. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
  67. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
  68. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
  69. package/dist/types/src/capabilities/index.d.ts +4 -5
  70. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  71. package/dist/types/src/capabilities/operation-handler/index.d.ts +3 -0
  72. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
  73. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +5 -0
  74. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
  75. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  76. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  78. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  79. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  80. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  82. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/transcriber/index.d.ts +3 -0
  84. package/dist/types/src/capabilities/transcriber/index.d.ts.map +1 -0
  85. package/dist/types/src/capabilities/transcriber/transcriber.d.ts +9 -0
  86. package/dist/types/src/capabilities/transcriber/transcriber.d.ts.map +1 -0
  87. package/dist/types/src/components/Transcription/Transcription.d.ts +17 -0
  88. package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
  89. package/dist/types/src/components/{Transcript/Transcript.stories.d.ts → Transcription/Transcription.stories.d.ts} +7 -6
  90. package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
  91. package/dist/types/src/components/Transcription/index.d.ts +2 -0
  92. package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
  93. package/dist/types/src/components/Transcription/transcription-extension.d.ts +15 -0
  94. package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
  95. package/dist/types/src/components/index.d.ts +1 -3
  96. package/dist/types/src/components/index.d.ts.map +1 -1
  97. package/dist/types/src/components/stories/FileTranscription.stories.d.ts +3 -6
  98. package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
  99. package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +0 -3
  100. package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
  101. package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +3 -6
  102. package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
  103. package/dist/types/src/components/stories/TranscriptionStory.d.ts +2 -2
  104. package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
  105. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +6 -0
  106. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -0
  107. package/dist/types/src/containers/TranscriptionContainer/index.d.ts +3 -0
  108. package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -0
  109. package/dist/types/src/containers/index.d.ts +3 -0
  110. package/dist/types/src/containers/index.d.ts.map +1 -0
  111. package/dist/types/src/functions/index.d.ts +17 -2
  112. package/dist/types/src/functions/index.d.ts.map +1 -1
  113. package/dist/types/src/functions/open.d.ts +6 -2
  114. package/dist/types/src/functions/open.d.ts.map +1 -1
  115. package/dist/types/src/functions/summarize.d.ts +1 -1
  116. package/dist/types/src/hooks/useQueueModelAdapter.d.ts +1 -1
  117. package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -1
  118. package/dist/types/src/hooks/useTranscriber.d.ts +1 -1
  119. package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
  120. package/dist/types/src/index.d.ts +1 -1
  121. package/dist/types/src/index.d.ts.map +1 -1
  122. package/dist/types/src/meta.d.ts +2 -2
  123. package/dist/types/src/meta.d.ts.map +1 -1
  124. package/dist/types/src/segments-normalization/message-normalizer.d.ts +5 -5
  125. package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +1 -1
  126. package/dist/types/src/segments-normalization/normalization.d.ts +515 -448
  127. package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -1
  128. package/dist/types/src/segments-normalization/utils.d.ts +2 -2
  129. package/dist/types/src/segments-normalization/utils.d.ts.map +1 -1
  130. package/dist/types/src/testing/testing.d.ts +9 -9
  131. package/dist/types/src/testing/testing.d.ts.map +1 -1
  132. package/dist/types/src/transcriber/media-stream-recorder.d.ts +2 -2
  133. package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
  134. package/dist/types/src/transcriber/transcriber.d.ts +4 -4
  135. package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
  136. package/dist/types/src/transcriber/transcription-manager.d.ts +9 -6
  137. package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
  138. package/dist/types/src/types/TranscriptAction.d.ts +22 -20
  139. package/dist/types/src/types/TranscriptAction.d.ts.map +1 -1
  140. package/dist/types/src/types/capabilities.d.ts +18 -0
  141. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  142. package/dist/types/src/types/index.d.ts +2 -1
  143. package/dist/types/src/types/index.d.ts.map +1 -1
  144. package/dist/types/src/util/index.d.ts +1 -0
  145. package/dist/types/src/util/index.d.ts.map +1 -1
  146. package/dist/types/src/util/render-byline.d.ts +4 -0
  147. package/dist/types/src/util/render-byline.d.ts.map +1 -0
  148. package/dist/types/tsconfig.tsbuildinfo +1 -1
  149. package/package.json +84 -69
  150. package/src/TranscriptionPlugin.tsx +35 -57
  151. package/src/blueprints/index.ts +5 -0
  152. package/src/blueprints/transcription-blueprint.ts +33 -0
  153. package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -0
  154. package/src/capabilities/blueprint-definition/index.ts +7 -0
  155. package/src/capabilities/index.ts +4 -8
  156. package/src/capabilities/operation-handler/index.ts +7 -0
  157. package/src/capabilities/operation-handler/operation-handler.ts +25 -0
  158. package/src/capabilities/operation-resolver/index.ts +7 -0
  159. package/src/capabilities/operation-resolver/operation-resolver.ts +25 -0
  160. package/src/capabilities/react-surface/index.ts +7 -0
  161. package/src/capabilities/react-surface/react-surface.tsx +28 -0
  162. package/src/capabilities/transcriber/index.ts +7 -0
  163. package/src/capabilities/transcriber/transcriber.ts +85 -0
  164. package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +42 -41
  165. package/src/components/Transcription/Transcription.tsx +63 -0
  166. package/src/components/{Transcript → Transcription}/index.ts +1 -1
  167. package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +13 -9
  168. package/src/components/index.ts +1 -6
  169. package/src/components/stories/FileTranscription.stories.tsx +30 -36
  170. package/src/components/stories/KeyWordRecognition.stories.tsx +5 -8
  171. package/src/components/stories/MicrophoneTranscription.stories.tsx +50 -55
  172. package/src/components/stories/TranscriptionStory.tsx +7 -11
  173. package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +33 -0
  174. package/src/containers/TranscriptionContainer/index.ts +7 -0
  175. package/src/containers/index.ts +7 -0
  176. package/src/functions/index.ts +7 -2
  177. package/src/functions/open.ts +9 -11
  178. package/src/hooks/useQueueModelAdapter.ts +1 -1
  179. package/src/hooks/useTranscriber.ts +8 -3
  180. package/src/hooks/useVoiceInput.ts +2 -2
  181. package/src/index.ts +1 -1
  182. package/src/meta.ts +8 -3
  183. package/src/model/model.test.ts +20 -14
  184. package/src/segments-normalization/message-normalizer.ts +18 -13
  185. package/src/segments-normalization/normalization.test.ts +6 -11
  186. package/src/segments-normalization/normalization.ts +6 -6
  187. package/src/segments-normalization/utils.ts +2 -2
  188. package/src/testing/testing.ts +28 -18
  189. package/src/transcriber/media-stream-recorder.ts +3 -3
  190. package/src/transcriber/transcriber.browser.test.ts +4 -4
  191. package/src/transcriber/transcriber.ts +6 -6
  192. package/src/transcriber/transcription-manager.ts +21 -15
  193. package/src/types/TranscriptAction.ts +21 -13
  194. package/src/{capabilities → types}/capabilities.ts +8 -8
  195. package/src/types/index.ts +2 -1
  196. package/src/util/index.ts +1 -0
  197. package/src/util/render-byline.ts +33 -0
  198. package/dist/lib/browser/TranscriptContainer-QN5WUMWJ.mjs +0 -11
  199. package/dist/lib/browser/blueprint-definition-GO6GTEBT.mjs.map +0 -7
  200. package/dist/lib/browser/chunk-77NWYLC6.mjs +0 -8
  201. package/dist/lib/browser/chunk-77NWYLC6.mjs.map +0 -7
  202. package/dist/lib/browser/chunk-7LNCQDTT.mjs +0 -24
  203. package/dist/lib/browser/chunk-7LNCQDTT.mjs.map +0 -7
  204. package/dist/lib/browser/chunk-COBQIZ6B.mjs.map +0 -7
  205. package/dist/lib/browser/chunk-GGHMOEKZ.mjs +0 -63
  206. package/dist/lib/browser/chunk-GGHMOEKZ.mjs.map +0 -7
  207. package/dist/lib/browser/chunk-LCK3YRQF.mjs +0 -16
  208. package/dist/lib/browser/chunk-LCK3YRQF.mjs.map +0 -7
  209. package/dist/lib/browser/chunk-ZS2FXKEF.mjs.map +0 -7
  210. package/dist/lib/browser/intent-resolver-52EPFRMR.mjs +0 -25
  211. package/dist/lib/browser/intent-resolver-52EPFRMR.mjs.map +0 -7
  212. package/dist/lib/browser/react-surface-LCP2D2MF.mjs +0 -34
  213. package/dist/lib/browser/react-surface-LCP2D2MF.mjs.map +0 -7
  214. package/dist/lib/browser/transcriber-NG5MRCP6.mjs.map +0 -7
  215. package/dist/lib/node-esm/TranscriptContainer-WCUWVVSD.mjs +0 -12
  216. package/dist/lib/node-esm/blueprint-definition-6SU7GLBR.mjs.map +0 -7
  217. package/dist/lib/node-esm/chunk-A6SB234F.mjs.map +0 -7
  218. package/dist/lib/node-esm/chunk-FTTZ4YSX.mjs +0 -64
  219. package/dist/lib/node-esm/chunk-FTTZ4YSX.mjs.map +0 -7
  220. package/dist/lib/node-esm/chunk-KLTPFUKN.mjs.map +0 -7
  221. package/dist/lib/node-esm/chunk-N5Z4SKPH.mjs +0 -10
  222. package/dist/lib/node-esm/chunk-N5Z4SKPH.mjs.map +0 -7
  223. package/dist/lib/node-esm/chunk-PEZRQYKO.mjs.map +0 -7
  224. package/dist/lib/node-esm/chunk-RWRG3S2O.mjs +0 -17
  225. package/dist/lib/node-esm/chunk-RWRG3S2O.mjs.map +0 -7
  226. package/dist/lib/node-esm/intent-resolver-DZBQQRHN.mjs +0 -26
  227. package/dist/lib/node-esm/intent-resolver-DZBQQRHN.mjs.map +0 -7
  228. package/dist/lib/node-esm/react-surface-7UC2YXX2.mjs +0 -35
  229. package/dist/lib/node-esm/react-surface-7UC2YXX2.mjs.map +0 -7
  230. package/dist/lib/node-esm/transcriber-SMU7HD6F.mjs.map +0 -7
  231. package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
  232. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
  233. package/dist/types/src/capabilities/capabilities.d.ts +0 -17
  234. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  235. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  236. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  237. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  238. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  239. package/dist/types/src/capabilities/transcriber.d.ts +0 -8
  240. package/dist/types/src/capabilities/transcriber.d.ts.map +0 -1
  241. package/dist/types/src/components/Transcript/Transcript.d.ts +0 -20
  242. package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
  243. package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
  244. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
  245. package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
  246. package/dist/types/src/components/Transcript/index.d.ts +0 -2
  247. package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
  248. package/dist/types/src/components/Transcript/transcript-extension.d.ts +0 -15
  249. package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
  250. package/dist/types/src/components/TranscriptContainer.d.ts +0 -9
  251. package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
  252. package/dist/types/src/types/Transcript.d.ts +0 -30
  253. package/dist/types/src/types/Transcript.d.ts.map +0 -1
  254. package/src/capabilities/blueprint-definition.ts +0 -31
  255. package/src/capabilities/intent-resolver.ts +0 -18
  256. package/src/capabilities/react-surface.tsx +0 -22
  257. package/src/capabilities/transcriber.ts +0 -77
  258. package/src/components/Transcript/Transcript.tsx +0 -93
  259. package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
  260. package/src/components/TranscriptContainer.tsx +0 -36
  261. package/src/types/Transcript.ts +0 -44
  262. /package/dist/lib/browser/{TranscriptContainer-QN5WUMWJ.mjs.map → blueprints/index.mjs.map} +0 -0
  263. /package/dist/lib/{node-esm/TranscriptContainer-WCUWVVSD.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
@@ -3,24 +3,22 @@
3
3
  //
4
4
 
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Effect from 'effect/Effect';
7
+ import type * as Types from 'effect/Types';
6
8
  import React, { type FC, useEffect, useMemo, useState } from 'react';
7
9
 
8
- import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
9
10
  import { withPluginManager } from '@dxos/app-framework/testing';
10
11
  import { Key } from '@dxos/echo';
11
12
  import { ClientPlugin } from '@dxos/plugin-client';
12
13
  import { PreviewPlugin } from '@dxos/plugin-preview';
13
- import { SpacePlugin } from '@dxos/plugin-space';
14
- import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
15
- import { ThemePlugin } from '@dxos/plugin-theme';
14
+ import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
16
15
  import { faker } from '@dxos/random';
17
16
  import { useMembers, useSpace } from '@dxos/react-client/echo';
18
17
  import { IconButton, Toolbar } from '@dxos/react-ui';
19
- import { withTheme } from '@dxos/react-ui/testing';
18
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
20
19
  import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
21
- import { defaultTx } from '@dxos/react-ui-theme';
22
- import { DataType } from '@dxos/schema';
23
- import { Testing } from '@dxos/schema/testing';
20
+ import { TestSchema } from '@dxos/schema/testing';
21
+ import { type ContentBlock, type Message, Organization, Person } from '@dxos/types';
24
22
 
25
23
  import { useQueueModelAdapter } from '../../hooks';
26
24
  import { SerializationModel } from '../../model';
@@ -31,8 +29,9 @@ import {
31
29
  useTestTranscriptionQueueWithEntityExtraction,
32
30
  } from '../../testing';
33
31
  import { translations } from '../../translations';
32
+ import { renderByline } from '../../util';
34
33
 
35
- import { TranscriptView, type TranscriptViewProps, renderByline } from './Transcript';
34
+ import { Transcription, type TranscriptionProps } from './Transcription';
36
35
 
37
36
  faker.seed(1);
38
37
 
@@ -40,15 +39,15 @@ faker.seed(1);
40
39
  * Story wrapper with test controls.
41
40
  */
42
41
  const TranscriptContainer: FC<
43
- TranscriptViewProps & {
42
+ TranscriptionProps & {
44
43
  running: boolean;
45
44
  onRunningChange: (running: boolean) => void;
46
45
  onReset?: () => void;
47
46
  }
48
- > = ({ space, model, running, onRunningChange, onReset }) => {
47
+ > = ({ model, running, onRunningChange, onReset }) => {
49
48
  return (
50
49
  <div className='grid grid-rows-[1fr_40px] grow divide-y divide-separator'>
51
- <TranscriptView space={space} model={model} />
50
+ <Transcription model={model} />
52
51
  <div className='grid grid-cols-[1fr_16rem] overflow-hidden'>
53
52
  <div className='flex items-center'>
54
53
  <SyntaxHighlighter language='json' className='text-sm'>
@@ -68,7 +67,7 @@ const TranscriptContainer: FC<
68
67
  );
69
68
  };
70
69
 
71
- type StoryProps = { messages?: DataType.Message[] } & Pick<TranscriptViewProps, 'ignoreAttention' | 'attendableId'>;
70
+ type StoryProps = { messages?: Message.Message[] } & Pick<TranscriptionProps, 'ignoreAttention' | 'attendableId'>;
72
71
 
73
72
  /**
74
73
  * Basic story mutates array of messages.
@@ -77,11 +76,12 @@ const BasicStory = ({ messages: initialMessages = [], ...props }: StoryProps) =>
77
76
  const [reset, setReset] = useState({});
78
77
  const builder = useMemo(() => new MessageBuilder(), []);
79
78
  const model = useMemo(
80
- () => new SerializationModel<DataType.Message>(renderByline([]), initialMessages),
79
+ () => new SerializationModel<Message.Message>(renderByline([]), initialMessages),
81
80
  [initialMessages, reset],
82
81
  );
83
82
  const [running, setRunning] = useState(true);
84
- const [currentMessage, setCurrentMessage] = useState<DataType.Message | null>(null);
83
+ // Use mutable type for local message building (not ECHO-managed).
84
+ const [currentMessage, setCurrentMessage] = useState<Types.Mutable<Message.Message> | null>(null);
85
85
  useEffect(() => {
86
86
  if (!running) {
87
87
  return;
@@ -102,7 +102,7 @@ const BasicStory = ({ messages: initialMessages = [], ...props }: StoryProps) =>
102
102
  return;
103
103
  }
104
104
 
105
- currentMessage.blocks.push(builder.createBlock());
105
+ (currentMessage.blocks as ContentBlock.Any[]).push(builder.createBlock());
106
106
  model.updateChunk(currentMessage);
107
107
  }, 3_000);
108
108
 
@@ -137,19 +137,12 @@ const QueueStory = ({
137
137
  }: StoryProps & { queueId: Key.ObjectId; onReset: () => void }) => {
138
138
  const [running, setRunning] = useState(true);
139
139
  const space = useSpace();
140
- const members = useMembers(space?.key).map((member) => member.identity);
140
+ const members = useMembers(space?.id).map((member) => member.identity);
141
141
  const queue = useTestTranscriptionQueue(space, queueId, running, 2_000);
142
142
  const model = useQueueModelAdapter(renderByline(members), queue, initialMessages);
143
143
 
144
144
  return (
145
- <TranscriptContainer
146
- space={space}
147
- model={model}
148
- running={running}
149
- onRunningChange={setRunning}
150
- onReset={onReset}
151
- {...props}
152
- />
145
+ <TranscriptContainer model={model} running={running} onRunningChange={setRunning} onReset={onReset} {...props} />
153
146
  );
154
147
  };
155
148
 
@@ -161,7 +154,7 @@ const EntityExtractionQueueStory = () => {
161
154
  const queue = useTestTranscriptionQueueWithEntityExtraction(space, undefined, running, 2_000);
162
155
  const model = useQueueModelAdapter(renderByline(members), queue, []);
163
156
 
164
- return <TranscriptContainer space={space} model={model} running={running} onRunningChange={setRunning} />;
157
+ return <TranscriptContainer model={model} running={running} onRunningChange={setRunning} />;
165
158
  };
166
159
 
167
160
  /**
@@ -178,25 +171,23 @@ const QueueStoryWrapper = () => {
178
171
  };
179
172
 
180
173
  const meta = {
181
- title: 'plugins/plugin-transcription/Transcript',
174
+ title: 'plugins/plugin-transcription/components/Transcription',
182
175
  decorators: [
183
- withTheme,
176
+ withTheme(),
177
+ withLayout({ layout: 'fullscreen' }),
184
178
  withPluginManager({
185
179
  plugins: [
180
+ ...corePlugins(),
181
+ StorybookPlugin({}),
186
182
  ClientPlugin({
187
- types: [TestItem, Testing.DocumentType, DataType.Person, DataType.Organization],
188
- onClientInitialized: async ({ client }) => {
189
- await client.halo.createIdentity();
190
- },
183
+ types: [TestItem, TestSchema.DocumentType, Person.Person, Organization.Organization],
184
+ onClientInitialized: ({ client }) =>
185
+ Effect.gen(function* () {
186
+ yield* Effect.promise(() => client.halo.createIdentity());
187
+ }),
191
188
  }),
192
- SpacePlugin({}),
193
- IntentPlugin(),
194
- SettingsPlugin(),
195
189
 
196
- // UI
197
190
  PreviewPlugin(),
198
- ThemePlugin({ tx: defaultTx }),
199
- StorybookLayoutPlugin({}),
200
191
  ],
201
192
  }),
202
193
  ],
@@ -208,12 +199,22 @@ const meta = {
208
199
 
209
200
  export default meta;
210
201
 
211
- export const Default: StoryObj<typeof BasicStory> = {
212
- render: BasicStory,
202
+ const DefaultStory = (props: StoryProps) => {
203
+ const [messages, setMessages] = useState<Message.Message[]>([]);
204
+ useEffect(() => {
205
+ void Promise.all(Array.from({ length: 10 }, () => MessageBuilder.singleton.createMessage())).then(setMessages);
206
+ }, []);
207
+ if (messages.length === 0) {
208
+ return <div>Loading messages...</div>;
209
+ }
210
+ return <BasicStory {...props} messages={messages} />;
211
+ };
212
+
213
+ export const Default: StoryObj<typeof DefaultStory> = {
214
+ render: DefaultStory,
213
215
  args: {
214
216
  ignoreAttention: true,
215
217
  attendableId: 'story',
216
- messages: await Promise.all(Array.from({ length: 10 }, () => MessageBuilder.singleton.createMessage())),
217
218
  },
218
219
  };
219
220
 
@@ -0,0 +1,63 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
8
+ import { useTextEditor } from '@dxos/react-ui-editor';
9
+ import { type Message, type Transcript } from '@dxos/types';
10
+ import {
11
+ autoScroll,
12
+ createBasicExtensions,
13
+ createMarkdownExtensions,
14
+ createThemeExtensions,
15
+ decorateMarkdown,
16
+ editorSlots,
17
+ preview,
18
+ } from '@dxos/ui-editor';
19
+ import { mx } from '@dxos/ui-theme';
20
+ import { isTruthy } from '@dxos/util';
21
+
22
+ import { type SerializationModel } from '../../model';
23
+ import { renderByline } from '../../util';
24
+
25
+ import { transcription } from './transcription-extension';
26
+
27
+ export { renderByline };
28
+
29
+ export type TranscriptionProps = ThemedClassName<{
30
+ transcript?: Transcript.Transcript;
31
+ model: SerializationModel<Message.Message>;
32
+ // TODO(burdon): Are these still in use?
33
+ attendableId?: string;
34
+ ignoreAttention?: boolean;
35
+ }>;
36
+
37
+ /**
38
+ * Transcript component implemented using the editor.
39
+ */
40
+ export const Transcription = ({ classNames, transcript: object, model }: TranscriptionProps) => {
41
+ const { themeMode } = useThemeContext();
42
+ const { parentRef } = useTextEditor(() => {
43
+ return {
44
+ extensions: [
45
+ createBasicExtensions({ readOnly: true, lineWrapping: true, search: true }),
46
+ createMarkdownExtensions(),
47
+ createThemeExtensions({ themeMode, slots: editorSlots }),
48
+ decorateMarkdown(),
49
+ preview(),
50
+ transcription({ model, started: object?.started ? new Date(object.started) : undefined }),
51
+ autoScroll(),
52
+ ].filter(isTruthy),
53
+ };
54
+ }, [model]);
55
+
56
+ return (
57
+ <div
58
+ ref={parentRef}
59
+ className={mx('dx-container', classNames)}
60
+ data-popover-collision-boundary={true /* TODO(thure): Make this a constant and document it. */}
61
+ />
62
+ );
63
+ };
@@ -2,4 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- export * from './Transcript';
5
+ export * from './Transcription';
@@ -8,22 +8,22 @@ import { format } from 'date-fns/format';
8
8
  import { intervalToDuration } from 'date-fns/intervalToDuration';
9
9
 
10
10
  import { type CleanupFn, addEventListener, combine } from '@dxos/async';
11
- import { type DataType } from '@dxos/schema';
11
+ import { type Message } from '@dxos/types';
12
12
 
13
13
  import { DocumentAdapter, type SerializationModel } from '../../model';
14
14
 
15
15
  /**
16
16
  * Data structure that maps Chunks queue to lines with transcript state.
17
17
  */
18
- export type TranscriptOptions = {
19
- model: SerializationModel<DataType.Message>;
18
+ export type TranscriptionOptions = {
19
+ model: SerializationModel<Message.Message>;
20
20
  started?: Date;
21
21
  };
22
22
 
23
23
  /**
24
24
  * Scrolling transcript with timestamps.
25
25
  */
26
- export const transcript = ({ model, started }: TranscriptOptions): Extension => {
26
+ export const transcription = ({ model, started }: TranscriptionOptions): Extension => {
27
27
  return [
28
28
  // Show timestamps in the gutter.
29
29
  gutter({
@@ -131,8 +131,12 @@ export const transcript = ({ model, started }: TranscriptOptions): Extension =>
131
131
  ),
132
132
 
133
133
  EditorView.theme({
134
+ '.cm-gutters': {
135
+ backgroundColor: 'var(--color-base-surface)',
136
+ },
134
137
  '.cm-timestamp-gutter': {
135
138
  width: '6rem',
139
+ paddingLeft: '0.5rem',
136
140
  paddingRight: '1rem',
137
141
  },
138
142
  '.cm-timestamp-gutter > .cm-gutterElement > div': {
@@ -156,13 +160,13 @@ class TimestampMarker extends GutterMarker {
156
160
  super();
157
161
  }
158
162
 
159
- override eq(other: this): boolean {
160
- return other._timestamp === this._timestamp;
163
+ override eq(other: this) {
164
+ return this._timestamp === other._timestamp;
161
165
  }
162
166
 
163
- override toDOM(view: EditorView): HTMLDivElement {
167
+ override toDOM(view: EditorView) {
164
168
  const el = document.createElement('div');
165
- el.className = 'text-sm text-subdued hover:bg-hoverSurface cursor-pointer';
169
+ el.className = 'text-sm text-subdued hover:bg-hover-surface cursor-pointer';
166
170
  el.textContent = formatTimestamp(this._timestamp, this._started);
167
171
  // TODO(burdon): Click to bookmark or copy hyperlink.
168
172
  el.onclick = () => {
@@ -176,7 +180,7 @@ class TimestampMarker extends GutterMarker {
176
180
  }
177
181
  }
178
182
 
179
- const getStartTime = (started?: Date, message?: DataType.Message): Date | undefined => {
183
+ const getStartTime = (started?: Date, message?: Message.Message): Date | undefined => {
180
184
  if (started) {
181
185
  return started;
182
186
  }
@@ -2,9 +2,4 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from 'react';
6
-
7
- export * from './Transcript';
8
- export * from './TranscriptContainer';
9
-
10
- export const TranscriptContainer = lazy(() => import('./TranscriptContainer'));
5
+ export * from './Transcription';
@@ -3,33 +3,32 @@
3
3
  //
4
4
 
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Effect from 'effect/Effect';
6
7
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
8
 
8
- import { Events, IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
+ import { AppActivationEvents } from '@dxos/app-toolkit';
10
11
  import { scheduleTask } from '@dxos/async';
11
12
  import { Context } from '@dxos/context';
12
13
  import { Obj } from '@dxos/echo';
13
14
  import { createQueueDXN } from '@dxos/echo/internal';
14
15
  import { MemoryQueue } from '@dxos/echo-db';
15
- import { FunctionExecutor, ServiceContainer } from '@dxos/functions';
16
+ import { FunctionExecutor, ServiceContainer } from '@dxos/functions-runtime';
16
17
  import { log } from '@dxos/log';
17
18
  import { ClientPlugin } from '@dxos/plugin-client';
18
19
  import { PreviewPlugin } from '@dxos/plugin-preview';
19
- import { SpacePlugin } from '@dxos/plugin-space';
20
- import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
21
- import { ThemePlugin } from '@dxos/plugin-theme';
22
- import { withTheme } from '@dxos/react-ui/testing';
23
- import { defaultTx } from '@dxos/react-ui-theme';
24
- import { DataType } from '@dxos/schema';
25
- import { Testing, seedTestData } from '@dxos/schema/testing';
20
+ import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
21
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
22
+ import { TestSchema } from '@dxos/schema/testing';
23
+ import { type Actor, Message, Organization, Person } from '@dxos/types';
24
+ import { seedTestData } from '@dxos/types/testing';
26
25
 
27
26
  import { useAudioFile, useQueueModelAdapter, useTranscriber } from '../../hooks';
28
27
  import { MessageNormalizer, getActorId } from '../../segments-normalization';
29
28
  import { TestItem } from '../../testing';
30
- import { type MediaStreamRecorderParams, type TranscriberParams } from '../../transcriber';
29
+ import { type MediaStreamRecorderProps, type TranscriberProps } from '../../transcriber';
31
30
  import { TranscriptionPlugin } from '../../TranscriptionPlugin';
32
- import { renderByline } from '../Transcript';
31
+ import { renderByline } from '../../util';
33
32
 
34
33
  import { TranscriptionStory } from './TranscriptionStory';
35
34
  import { useIsSpeaking } from './useIsSpeaking';
@@ -45,12 +44,12 @@ const AudioFile = ({
45
44
  detectSpeaking?: boolean;
46
45
  normalizeSentences?: boolean;
47
46
  audioUrl: string;
48
- transcriberConfig?: TranscriberParams['config'];
49
- recorderConfig?: MediaStreamRecorderParams['config'];
47
+ transcriberConfig?: TranscriberProps['config'];
48
+ recorderConfig?: MediaStreamRecorderProps['config'];
50
49
  audioConstraints?: MediaTrackConstraints;
51
50
  }) => {
52
51
  const [running, setRunning] = useState(false);
53
- const actor: DataType.Actor = useMemo(() => ({ name: 'You' }), []);
52
+ const actor: Actor.Actor = useMemo(() => ({ name: 'You' }), []);
54
53
 
55
54
  // Audio.
56
55
  const { audio, track, stream } = useAudioFile(audioUrl, audioConstraints);
@@ -79,13 +78,13 @@ const AudioFile = ({
79
78
  // Transcriber.
80
79
  // TODO(dmaretskyi): Use space.queues.create() instead.
81
80
  const queueDxn = useMemo(() => createQueueDXN(), []);
82
- const queue = useMemo(() => new MemoryQueue<DataType.Message>(queueDxn), [queueDxn]);
81
+ const queue = useMemo(() => new MemoryQueue<Message.Message>(queueDxn), [queueDxn]);
83
82
 
84
83
  const model = useQueueModelAdapter(renderByline([]), queue);
85
- const handleSegments = useCallback<TranscriberParams['onSegments']>(
84
+ const handleSegments = useCallback<TranscriberProps['onSegments']>(
86
85
  async (blocks) => {
87
86
  void queue?.append([
88
- Obj.make(DataType.Message, {
87
+ Obj.make(Message.Message, {
89
88
  created: new Date().toISOString(),
90
89
  sender: actor,
91
90
  blocks,
@@ -185,36 +184,31 @@ const AudioFile = ({
185
184
  };
186
185
 
187
186
  const meta = {
188
- title: 'plugins/plugin-transcription/FileTranscription',
187
+ title: 'plugins/plugin-transcription/components/FileTranscription',
189
188
  decorators: [
190
- withTheme,
189
+ withTheme(),
190
+ withLayout({ layout: 'column' }),
191
191
  withPluginManager({
192
192
  plugins: [
193
+ ...corePlugins(),
194
+ StorybookPlugin({}),
193
195
  ClientPlugin({
194
- types: [TestItem, DataType.Person, DataType.Organization, Testing.DocumentType],
195
- onClientInitialized: async ({ client }) => {
196
- await client.halo.createIdentity();
197
- await client.spaces.waitUntilReady();
198
- await client.spaces.default.waitUntilReady();
199
- await seedTestData(client.spaces.default);
200
- },
196
+ types: [TestItem, Person.Person, Organization.Organization, TestSchema.DocumentType],
197
+ onClientInitialized: ({ client }) =>
198
+ Effect.gen(function* () {
199
+ yield* Effect.promise(() => client.halo.createIdentity());
200
+ yield* Effect.promise(() => client.spaces.waitUntilReady());
201
+ yield* Effect.promise(() => client.spaces.default.waitUntilReady());
202
+ yield* Effect.promise(() => seedTestData(client.spaces.default));
203
+ }),
201
204
  }),
202
- SpacePlugin({}),
203
- IntentPlugin(),
204
205
 
205
- // UI
206
- ThemePlugin({ tx: defaultTx }),
207
- SettingsPlugin(),
208
206
  PreviewPlugin(),
209
207
  TranscriptionPlugin(),
210
- StorybookLayoutPlugin({}),
211
208
  ],
212
- fireEvents: [Events.SetupAppGraph],
209
+ fireEvents: [AppActivationEvents.SetupAppGraph],
213
210
  }),
214
211
  ],
215
- parameters: {
216
- layout: 'column',
217
- },
218
212
  } satisfies Meta;
219
213
 
220
214
  export default meta;
@@ -7,8 +7,8 @@ import React, { useEffect, useMemo, useState } from 'react';
7
7
 
8
8
  import { log } from '@dxos/log';
9
9
  import { Toolbar } from '@dxos/react-ui';
10
- import { withTheme } from '@dxos/react-ui/testing';
11
- import { mx } from '@dxos/react-ui-theme';
10
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
11
+ import { mx } from '@dxos/ui-theme';
12
12
 
13
13
  type Word = {
14
14
  text: string;
@@ -101,7 +101,7 @@ const DefaultStory = ({ keywords }: StoryProps) => {
101
101
  <span
102
102
  key={index}
103
103
  className={mx(
104
- 'px-3 py-1 m-2 rounded border',
104
+ 'px-3 py-1 m-2 rounded-sm border',
105
105
  word.matched ? 'bg-red-200 text-red-800 border-red-300' : 'bg-gray-200 text-gray-600 border-gray-300',
106
106
  )}
107
107
  >
@@ -116,12 +116,9 @@ const DefaultStory = ({ keywords }: StoryProps) => {
116
116
  };
117
117
 
118
118
  const meta = {
119
- title: 'plugins/plugin-transcription/KeyWordDetection',
119
+ title: 'plugins/plugin-transcription/components/KeyWordDetection',
120
120
  render: DefaultStory,
121
- decorators: [withTheme],
122
- parameters: {
123
- layout: 'column',
124
- },
121
+ decorators: [withTheme(), withLayout({ layout: 'column' })],
125
122
  } satisfies Meta<typeof DefaultStory>;
126
123
 
127
124
  export default meta;