@dxos/plugin-transcription 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs +54 -0
- package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.mjs +34 -0
- package/dist/lib/neutral/TranscriptionPlugin.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs +25 -0
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs +21 -0
- package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/chunk-NQQK7UZQ.mjs → neutral/chunk-2O3ONPRZ.mjs} +94 -40
- package/dist/lib/neutral/chunk-2O3ONPRZ.mjs.map +7 -0
- package/dist/lib/{browser/chunk-L4HW35L6.mjs → neutral/chunk-5FXU36PN.mjs} +19 -10
- package/dist/lib/neutral/chunk-5FXU36PN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GL4RS533.mjs +22 -0
- package/dist/lib/neutral/chunk-GL4RS533.mjs.map +7 -0
- package/dist/lib/{browser/index.mjs → neutral/chunk-ILSA3DU7.mjs} +32 -70
- package/dist/lib/neutral/chunk-ILSA3DU7.mjs.map +7 -0
- package/dist/lib/neutral/chunk-Y5EQAFFR.mjs +8 -0
- package/dist/lib/neutral/chunk-Y5EQAFFR.mjs.map +7 -0
- package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-ZR4BH4QQ.mjs} +4 -5
- package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/components/index.mjs +83 -18
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/{browser/create-ULR5DPJZ.mjs → neutral/create-RRWRIUSR.mjs} +4 -4
- package/dist/lib/neutral/create-RRWRIUSR.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/hooks/index.mjs +5 -3
- package/dist/lib/neutral/index.mjs +44 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/{browser/open-SFMPLZVW.mjs → neutral/open-CVMX5KXZ.mjs} +5 -5
- package/dist/lib/neutral/open-CVMX5KXZ.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +13 -0
- package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-YMZRO242.mjs +26 -0
- package/dist/lib/neutral/react-surface-YMZRO242.mjs.map +7 -0
- package/dist/lib/{browser/summarize-BDFX4APN.mjs → neutral/summarize-LA7TRW7A.mjs} +5 -5
- package/dist/lib/neutral/summarize-LA7TRW7A.mjs.map +7 -0
- package/dist/lib/neutral/text-content-F4ASMITB.mjs +30 -0
- package/dist/lib/neutral/text-content-F4ASMITB.mjs.map +7 -0
- package/dist/lib/neutral/transcriber-ABHATBVH.mjs +59 -0
- package/dist/lib/neutral/transcriber-ABHATBVH.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +24 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/TranscriptionPlugin.node.d.ts.map +1 -1
- package/dist/types/src/TranscriptionPlugin.workerd.d.ts +4 -0
- package/dist/types/src/TranscriptionPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/text-content.d.ts +8 -0
- package/dist/types/src/capabilities/text-content.d.ts.map +1 -0
- package/dist/types/src/components/Oracle/Oracle.d.ts +24 -0
- package/dist/types/src/components/Oracle/Oracle.d.ts.map +1 -0
- package/dist/types/src/components/Oracle/Oracle.stories.d.ts +32 -0
- package/dist/types/src/components/Oracle/Oracle.stories.d.ts.map +1 -0
- package/dist/types/src/components/Oracle/index.d.ts +2 -0
- package/dist/types/src/components/Oracle/index.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/Transcription.d.ts +0 -5
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +13 -16
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts +6 -0
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts +28 -0
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionArticle/index.d.ts +2 -0
- package/dist/types/src/containers/TranscriptionArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/enrichment/conversation.test.d.ts +2 -0
- package/dist/types/src/enrichment/conversation.test.d.ts.map +1 -0
- package/dist/types/src/enrichment/operations.d.ts +200 -0
- package/dist/types/src/enrichment/operations.d.ts.map +1 -0
- package/dist/types/src/enrichment/parser.d.ts +26 -0
- package/dist/types/src/enrichment/parser.d.ts.map +1 -0
- package/dist/types/src/enrichment/stream-simulator.d.ts +38 -0
- package/dist/types/src/enrichment/stream-simulator.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useFeedModelAdapter.d.ts +12 -0
- package/dist/types/src/hooks/useFeedModelAdapter.d.ts.map +1 -0
- package/dist/types/src/hooks/useTranscriptionRecording.d.ts +12 -0
- package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/normalization/message-normalizer.d.ts +7 -5
- package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -1
- package/dist/types/src/normalization/normalization.d.ts +180 -1
- package/dist/types/src/normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/operations/create.d.ts +2 -2
- package/dist/types/src/operations/create.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +0 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts +2 -2
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/operations/summarize.d.ts +2 -2
- package/dist/types/src/operations/summarize.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/stories/FileTranscription.stories.d.ts +5 -3
- package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/stories/{MicrophoneTranscription.stories.d.ts → LiveTranscription.stories.d.ts} +4 -4
- package/dist/types/src/stories/LiveTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/stories/TranscriptionStory.d.ts +11 -13
- package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/stories/common.d.ts +46 -0
- package/dist/types/src/stories/common.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +5 -6
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +4 -4
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +6 -4
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/{operations/definitions.d.ts → types/TranscriptOperation.d.ts} +1 -1
- package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -0
- package/dist/types/src/types/TranscriptionCapabilities.d.ts +17 -0
- package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +125 -94
- package/src/TranscriptionPlugin.node.ts +3 -31
- package/src/TranscriptionPlugin.test.ts +3 -3
- package/src/TranscriptionPlugin.tsx +3 -31
- package/src/TranscriptionPlugin.workerd.ts +18 -0
- package/src/blueprints/transcription-blueprint.ts +1 -1
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/capabilities/text-content.ts +33 -0
- package/src/capabilities/transcriber.ts +1 -1
- package/src/components/Oracle/Oracle.stories.tsx +147 -0
- package/src/components/Oracle/Oracle.tsx +141 -0
- package/src/components/Oracle/index.ts +5 -0
- package/src/components/Transcription/Transcription.stories.tsx +116 -150
- package/src/components/Transcription/Transcription.tsx +7 -13
- package/src/components/index.ts +1 -0
- package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +61 -0
- package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +62 -0
- package/src/containers/TranscriptionArticle/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/enrichment/conversation.test.ts +162 -0
- package/src/enrichment/conversation.txt +23 -0
- package/src/enrichment/operations.ts +268 -0
- package/src/enrichment/parser.ts +101 -0
- package/src/enrichment/stream-simulator.ts +125 -0
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useFeedModelAdapter.ts +46 -0
- package/src/hooks/useTranscriptionRecording.ts +87 -0
- package/src/index.ts +3 -9
- package/src/normalization/message-normalizer.ts +25 -13
- package/src/normalization/normalization.test.ts +3 -37
- package/src/normalization/normalization.ts +6 -7
- package/src/operations/create.ts +2 -2
- package/src/operations/index.ts +0 -2
- package/src/operations/open.ts +2 -2
- package/src/operations/summarize.ts +3 -3
- package/src/plugin.ts +11 -0
- package/src/stories/FileTranscription.stories.tsx +49 -175
- package/src/stories/KeyWordRecognition.stories.tsx +7 -9
- package/src/stories/LiveTranscription.stories.tsx +153 -0
- package/src/stories/TranscriptionStory.tsx +32 -24
- package/src/stories/common.ts +233 -0
- package/src/testing/testing.ts +20 -27
- package/src/transcriber/transcriber.test.ts +9 -9
- package/src/transcriber/transcriber.ts +18 -14
- package/src/transcriber/transcription-manager.ts +14 -9
- package/src/translations.ts +3 -0
- package/src/{operations/definitions.ts → types/TranscriptOperation.ts} +2 -0
- package/src/types/TranscriptionCapabilities.ts +39 -0
- package/src/types/index.ts +2 -2
- package/dist/lib/browser/blueprints/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-3L623EVL.mjs +0 -17
- package/dist/lib/browser/chunk-3L623EVL.mjs.map +0 -7
- package/dist/lib/browser/chunk-L4HW35L6.mjs.map +0 -7
- package/dist/lib/browser/chunk-NQQK7UZQ.mjs.map +0 -7
- package/dist/lib/browser/components/index.mjs.map +0 -7
- package/dist/lib/browser/create-ULR5DPJZ.mjs.map +0 -7
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/open-SFMPLZVW.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/summarize-BDFX4APN.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node-esm/blueprints/index.mjs +0 -32
- package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7UIZWCD4.mjs +0 -112
- package/dist/lib/node-esm/chunk-7UIZWCD4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs +0 -181
- package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-KO3IOD2O.mjs +0 -19
- package/dist/lib/node-esm/chunk-KO3IOD2O.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MQK4R6GT.mjs +0 -245
- package/dist/lib/node-esm/chunk-MQK4R6GT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-O533NBMK.mjs +0 -37
- package/dist/lib/node-esm/chunk-O533NBMK.mjs.map +0 -7
- package/dist/lib/node-esm/components/index.mjs +0 -208
- package/dist/lib/node-esm/components/index.mjs.map +0 -7
- package/dist/lib/node-esm/create-A5QHNWRF.mjs +0 -22
- package/dist/lib/node-esm/create-A5QHNWRF.mjs.map +0 -7
- package/dist/lib/node-esm/hooks/index.mjs +0 -18
- package/dist/lib/node-esm/index.mjs +0 -474
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/open-OI24QNTO.mjs +0 -28
- package/dist/lib/node-esm/open-OI24QNTO.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/summarize-3UNN24I2.mjs +0 -79
- package/dist/lib/node-esm/summarize-3UNN24I2.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +0 -6
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +0 -1
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts +0 -2
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +0 -8
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
- package/dist/types/src/stories/useIsSpeaking.d.ts +0 -3
- package/dist/types/src/stories/useIsSpeaking.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -19
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/defs.d.ts +0 -5
- package/dist/types/src/types/defs.d.ts.map +0 -1
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +0 -35
- package/src/containers/TranscriptionContainer/index.ts +0 -5
- package/src/hooks/useQueueModelAdapter.ts +0 -66
- package/src/stories/MicrophoneTranscription.stories.tsx +0 -264
- package/src/stories/useIsSpeaking.tsx +0 -40
- package/src/types/capabilities.ts +0 -39
- package/src/types/defs.ts +0 -9
- /package/dist/lib/{browser/hooks → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-KAEXRX3Y.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-KAEXRX3Y.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-MLRJWAQH.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-MLRJWAQH.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral/hooks}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/hooks → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.bc2380dfbc",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -8,68 +8,93 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"imports": {
|
|
15
|
-
"#blueprints":
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"#
|
|
21
|
-
|
|
15
|
+
"#blueprints": {
|
|
16
|
+
"source": "./src/blueprints/index.ts",
|
|
17
|
+
"types": "./dist/types/src/blueprints/index.d.ts",
|
|
18
|
+
"default": "./dist/lib/neutral/blueprints/index.mjs"
|
|
19
|
+
},
|
|
20
|
+
"#capabilities": {
|
|
21
|
+
"source": "./src/capabilities/index.ts",
|
|
22
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
23
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
24
|
+
},
|
|
25
|
+
"#components": {
|
|
26
|
+
"source": "./src/components/index.ts",
|
|
27
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
28
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"#containers": {
|
|
31
|
+
"source": "./src/containers/index.ts",
|
|
32
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
33
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"#hooks": {
|
|
36
|
+
"source": "./src/hooks/index.ts",
|
|
37
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
38
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"#meta": {
|
|
41
|
+
"source": "./src/meta.ts",
|
|
42
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
43
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
44
|
+
},
|
|
45
|
+
"#operations": {
|
|
46
|
+
"source": "./src/operations/index.ts",
|
|
47
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
48
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
49
|
+
},
|
|
22
50
|
"#plugin": {
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
51
|
+
"source": {
|
|
52
|
+
"workerd": "./src/TranscriptionPlugin.workerd.ts",
|
|
53
|
+
"node": "./src/TranscriptionPlugin.node.ts",
|
|
54
|
+
"default": "./src/TranscriptionPlugin.tsx"
|
|
55
|
+
},
|
|
56
|
+
"types": "./dist/types/src/TranscriptionPlugin.d.ts",
|
|
57
|
+
"workerd": "./dist/lib/neutral/TranscriptionPlugin.workerd.mjs",
|
|
58
|
+
"node": "./dist/lib/neutral/TranscriptionPlugin.node.mjs",
|
|
59
|
+
"default": "./dist/lib/neutral/TranscriptionPlugin.mjs"
|
|
26
60
|
},
|
|
27
61
|
"#testing": "./src/testing/index.ts",
|
|
28
|
-
"#translations":
|
|
29
|
-
|
|
62
|
+
"#translations": {
|
|
63
|
+
"source": "./src/translations.ts",
|
|
64
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
65
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
66
|
+
},
|
|
67
|
+
"#types": {
|
|
68
|
+
"source": "./src/types/index.ts",
|
|
69
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
70
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
71
|
+
}
|
|
30
72
|
},
|
|
31
73
|
"exports": {
|
|
32
74
|
".": {
|
|
33
75
|
"source": "./src/index.ts",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"types": "./dist/types/src/index.d.ts"
|
|
76
|
+
"types": "./dist/types/src/index.d.ts",
|
|
77
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
37
78
|
},
|
|
38
79
|
"./components": {
|
|
39
80
|
"source": "./src/components/index.ts",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"types": "./dist/types/src/components/index.d.ts"
|
|
81
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
82
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
43
83
|
},
|
|
44
84
|
"./hooks": {
|
|
45
85
|
"source": "./src/hooks/index.ts",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"types": "./dist/types/src/hooks/index.d.ts"
|
|
86
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
87
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
49
88
|
},
|
|
50
|
-
"./
|
|
51
|
-
"source": "./src/
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
55
|
-
},
|
|
56
|
-
"./operations": {
|
|
57
|
-
"source": "./src/operations/index.ts",
|
|
58
|
-
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
59
|
-
"node": "./dist/lib/node-esm/operations/index.mjs",
|
|
60
|
-
"types": "./dist/types/src/operations/index.d.ts"
|
|
89
|
+
"./plugin": {
|
|
90
|
+
"source": "./src/plugin.ts",
|
|
91
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
92
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
61
93
|
},
|
|
62
94
|
"./translations": {
|
|
63
95
|
"source": "./src/translations.ts",
|
|
64
96
|
"types": "./dist/types/src/translations.d.ts",
|
|
65
|
-
"
|
|
66
|
-
"node": "./dist/lib/node-esm/translations.mjs"
|
|
67
|
-
},
|
|
68
|
-
"./types": {
|
|
69
|
-
"source": "./src/types/index.ts",
|
|
70
|
-
"browser": "./dist/lib/browser/types/index.mjs",
|
|
71
|
-
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
72
|
-
"types": "./dist/types/src/types/index.d.ts"
|
|
97
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
73
98
|
}
|
|
74
99
|
},
|
|
75
100
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -79,7 +104,9 @@
|
|
|
79
104
|
],
|
|
80
105
|
"dependencies": {
|
|
81
106
|
"@codemirror/state": "^6.5.2",
|
|
82
|
-
"@codemirror/view": "^6.38.
|
|
107
|
+
"@codemirror/view": "^6.38.5",
|
|
108
|
+
"@radix-ui/react-primitive": "2.0.2",
|
|
109
|
+
"@radix-ui/react-slot": "1.1.2",
|
|
83
110
|
"date-fns": "^3.6.0",
|
|
84
111
|
"extendable-media-recorder": "^9.2.19",
|
|
85
112
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
@@ -88,45 +115,49 @@
|
|
|
88
115
|
"react-router-dom": "^6.30.3",
|
|
89
116
|
"react-use": "^17.5.1",
|
|
90
117
|
"wavefile": "^11.0.0",
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/app-toolkit": "0.8.4-main.
|
|
93
|
-
"@dxos/
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/client": "0.8.4-main.
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/echo": "0.8.4-main.
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/functions-runtime": "0.8.4-main.
|
|
105
|
-
"@dxos/keys": "0.8.4-main.
|
|
106
|
-
"@dxos/
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/plugin-
|
|
109
|
-
"@dxos/plugin-
|
|
110
|
-
"@dxos/plugin-
|
|
111
|
-
"@dxos/plugin-
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/react-
|
|
116
|
-
"@dxos/react-
|
|
117
|
-
"@dxos/react-
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/react-ui-editor": "0.8.4-main.
|
|
120
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
121
|
-
"@dxos/react-ui-
|
|
122
|
-
"@dxos/react-ui-
|
|
123
|
-
"@dxos/react-ui-
|
|
124
|
-
"@dxos/
|
|
125
|
-
"@dxos/
|
|
126
|
-
"@dxos/
|
|
127
|
-
"@dxos/
|
|
128
|
-
"@dxos/
|
|
129
|
-
"@dxos/
|
|
118
|
+
"@dxos/assistant": "0.8.4-main.bc2380dfbc",
|
|
119
|
+
"@dxos/app-toolkit": "0.8.4-main.bc2380dfbc",
|
|
120
|
+
"@dxos/async": "0.8.4-main.bc2380dfbc",
|
|
121
|
+
"@dxos/app-framework": "0.8.4-main.bc2380dfbc",
|
|
122
|
+
"@dxos/client": "0.8.4-main.bc2380dfbc",
|
|
123
|
+
"@dxos/codec-protobuf": "0.8.4-main.bc2380dfbc",
|
|
124
|
+
"@dxos/compute": "0.8.4-main.bc2380dfbc",
|
|
125
|
+
"@dxos/context": "0.8.4-main.bc2380dfbc",
|
|
126
|
+
"@dxos/debug": "0.8.4-main.bc2380dfbc",
|
|
127
|
+
"@dxos/display-name": "0.8.4-main.bc2380dfbc",
|
|
128
|
+
"@dxos/echo": "0.8.4-main.bc2380dfbc",
|
|
129
|
+
"@dxos/echo-db": "0.8.4-main.bc2380dfbc",
|
|
130
|
+
"@dxos/invariant": "0.8.4-main.bc2380dfbc",
|
|
131
|
+
"@dxos/functions-runtime": "0.8.4-main.bc2380dfbc",
|
|
132
|
+
"@dxos/keys": "0.8.4-main.bc2380dfbc",
|
|
133
|
+
"@dxos/log": "0.8.4-main.bc2380dfbc",
|
|
134
|
+
"@dxos/effect": "0.8.4-main.bc2380dfbc",
|
|
135
|
+
"@dxos/plugin-calls": "0.8.4-main.bc2380dfbc",
|
|
136
|
+
"@dxos/plugin-client": "0.8.4-main.bc2380dfbc",
|
|
137
|
+
"@dxos/plugin-deck": "0.8.4-main.bc2380dfbc",
|
|
138
|
+
"@dxos/plugin-graph": "0.8.4-main.bc2380dfbc",
|
|
139
|
+
"@dxos/plugin-markdown": "0.8.4-main.bc2380dfbc",
|
|
140
|
+
"@dxos/protocols": "0.8.4-main.bc2380dfbc",
|
|
141
|
+
"@dxos/plugin-space": "0.8.4-main.bc2380dfbc",
|
|
142
|
+
"@dxos/react-client": "0.8.4-main.bc2380dfbc",
|
|
143
|
+
"@dxos/react-ui-attention": "0.8.4-main.bc2380dfbc",
|
|
144
|
+
"@dxos/react-edge-client": "0.8.4-main.bc2380dfbc",
|
|
145
|
+
"@dxos/react-ui-components": "0.8.4-main.bc2380dfbc",
|
|
146
|
+
"@dxos/react-ui-editor": "0.8.4-main.bc2380dfbc",
|
|
147
|
+
"@dxos/react-ui-form": "0.8.4-main.bc2380dfbc",
|
|
148
|
+
"@dxos/react-ui-graph": "0.8.4-main.bc2380dfbc",
|
|
149
|
+
"@dxos/react-ui-grid": "0.8.4-main.bc2380dfbc",
|
|
150
|
+
"@dxos/react-ui-menu": "0.8.4-main.bc2380dfbc",
|
|
151
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.bc2380dfbc",
|
|
152
|
+
"@dxos/react-ui-sfx": "0.8.4-main.bc2380dfbc",
|
|
153
|
+
"@dxos/react-ui-stack": "0.8.4-main.bc2380dfbc",
|
|
154
|
+
"@dxos/tracing": "0.8.4-main.bc2380dfbc",
|
|
155
|
+
"@dxos/schema": "0.8.4-main.bc2380dfbc",
|
|
156
|
+
"@dxos/ui-types": "0.8.4-main.bc2380dfbc",
|
|
157
|
+
"@dxos/ui-editor": "0.8.4-main.bc2380dfbc",
|
|
158
|
+
"@dxos/util": "0.8.4-main.bc2380dfbc",
|
|
159
|
+
"@dxos/types": "0.8.4-main.bc2380dfbc",
|
|
160
|
+
"@dxos/ai": "0.8.4-main.bc2380dfbc"
|
|
130
161
|
},
|
|
131
162
|
"devDependencies": {
|
|
132
163
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -137,16 +168,16 @@
|
|
|
137
168
|
"react": "~19.2.3",
|
|
138
169
|
"react-dom": "~19.2.3",
|
|
139
170
|
"tailwindcss": "^4.2.0",
|
|
140
|
-
"@dxos/plugin-
|
|
141
|
-
"@dxos/plugin-
|
|
142
|
-
"@dxos/plugin-
|
|
143
|
-
"@dxos/
|
|
144
|
-
"@dxos/react-ui
|
|
145
|
-
"@dxos/
|
|
146
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.
|
|
147
|
-
"@dxos/
|
|
148
|
-
"@dxos/test-utils": "0.8.4-main.
|
|
149
|
-
"@dxos/
|
|
171
|
+
"@dxos/plugin-theme": "0.8.4-main.bc2380dfbc",
|
|
172
|
+
"@dxos/plugin-preview": "0.8.4-main.bc2380dfbc",
|
|
173
|
+
"@dxos/plugin-testing": "0.8.4-main.bc2380dfbc",
|
|
174
|
+
"@dxos/random": "0.8.4-main.bc2380dfbc",
|
|
175
|
+
"@dxos/react-ui": "0.8.4-main.bc2380dfbc",
|
|
176
|
+
"@dxos/react-ui-form": "0.8.4-main.bc2380dfbc",
|
|
177
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.bc2380dfbc",
|
|
178
|
+
"@dxos/ui-theme": "0.8.4-main.bc2380dfbc",
|
|
179
|
+
"@dxos/test-utils": "0.8.4-main.bc2380dfbc",
|
|
180
|
+
"@dxos/storybook-utils": "0.8.4-main.bc2380dfbc"
|
|
150
181
|
},
|
|
151
182
|
"peerDependencies": {
|
|
152
183
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -154,8 +185,8 @@
|
|
|
154
185
|
"effect": "3.20.0",
|
|
155
186
|
"react": "~19.2.3",
|
|
156
187
|
"react-dom": "~19.2.3",
|
|
157
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
158
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
188
|
+
"@dxos/react-ui": "0.8.4-main.bc2380dfbc",
|
|
189
|
+
"@dxos/ui-theme": "0.8.4-main.bc2380dfbc"
|
|
159
190
|
},
|
|
160
191
|
"publishConfig": {
|
|
161
192
|
"access": "public"
|
|
@@ -2,44 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Option from 'effect/Option';
|
|
6
|
-
|
|
7
5
|
import { Plugin } from '@dxos/app-framework';
|
|
8
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import {
|
|
10
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
11
|
-
import { Message, Transcript } from '@dxos/types';
|
|
7
|
+
import { Transcript } from '@dxos/types';
|
|
12
8
|
|
|
13
|
-
import { BlueprintDefinition, OperationHandler } from '#capabilities';
|
|
9
|
+
import { BlueprintDefinition, OperationHandler, TextContent } from '#capabilities';
|
|
14
10
|
import { meta } from '#meta';
|
|
15
11
|
|
|
16
|
-
import { renderByline } from './util';
|
|
17
|
-
|
|
18
12
|
export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
19
13
|
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
20
|
-
AppPlugin.
|
|
21
|
-
metadata: {
|
|
22
|
-
id: Transcript.Transcript.typename,
|
|
23
|
-
metadata: {
|
|
24
|
-
icon: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).icon,
|
|
25
|
-
iconHue: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).hue ?? 'white',
|
|
26
|
-
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
27
|
-
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
28
|
-
const space = getSpace(transcript);
|
|
29
|
-
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
30
|
-
const feed = await transcript.feed.load();
|
|
31
|
-
const queueDxn = Feed.getQueueDxn(feed);
|
|
32
|
-
const queue = queueDxn ? space?.queues.get<Message.Message>(queueDxn) : undefined;
|
|
33
|
-
await queue?.refresh();
|
|
34
|
-
const content = queue?.objects
|
|
35
|
-
.filter((message) => Obj.instanceOf(Message.Message, message))
|
|
36
|
-
.flatMap((message, index) => renderByline(members)(message, index))
|
|
37
|
-
.join('\n\n');
|
|
38
|
-
return content;
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
}),
|
|
14
|
+
AppPlugin.addTextContentModule({ activate: TextContent }),
|
|
43
15
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
44
16
|
AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),
|
|
45
17
|
Plugin.make,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { describe, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
8
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
8
|
+
import { ClientPlugin } from '@dxos/plugin-client/plugin';
|
|
9
9
|
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
10
10
|
|
|
11
11
|
import { meta } from '#meta';
|
|
@@ -19,9 +19,9 @@ describe('TranscriptionPlugin', () => {
|
|
|
19
19
|
plugins: [ClientPlugin({}), TranscriptionPlugin()],
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
// After autoStart:
|
|
22
|
+
// After autoStart: schema, OperationHandler all auto-cascade.
|
|
23
23
|
expect(harness.manager.getActive()).toEqual(
|
|
24
|
-
expect.arrayContaining([moduleId('
|
|
24
|
+
expect.arrayContaining([moduleId('schema'), moduleId('OperationHandler')]),
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
// SetupArtifactDefinition is fired by AssistantPlugin, which can't be included here due to a workspace cycle.
|
|
@@ -2,45 +2,17 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import * as Option from 'effect/Option';
|
|
6
|
-
|
|
7
5
|
import { Plugin } from '@dxos/app-framework';
|
|
8
6
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import {
|
|
10
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
11
|
-
import { Message, Transcript } from '@dxos/types';
|
|
7
|
+
import { Transcript } from '@dxos/types';
|
|
12
8
|
|
|
13
|
-
import { BlueprintDefinition, OperationHandler, ReactSurface, Transcriber } from '#capabilities';
|
|
9
|
+
import { BlueprintDefinition, OperationHandler, ReactSurface, TextContent, Transcriber } from '#capabilities';
|
|
14
10
|
import { meta } from '#meta';
|
|
15
11
|
import { translations } from '#translations';
|
|
16
12
|
|
|
17
|
-
import { renderByline } from './util';
|
|
18
|
-
|
|
19
13
|
export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
20
14
|
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
21
|
-
AppPlugin.
|
|
22
|
-
metadata: {
|
|
23
|
-
id: Transcript.Transcript.typename,
|
|
24
|
-
metadata: {
|
|
25
|
-
icon: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).icon,
|
|
26
|
-
iconHue: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).hue ?? 'white',
|
|
27
|
-
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
28
|
-
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
29
|
-
const space = getSpace(transcript);
|
|
30
|
-
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
31
|
-
const feed = await transcript.feed.load();
|
|
32
|
-
const queueDxn = Feed.getQueueDxn(feed);
|
|
33
|
-
const queue = queueDxn ? space?.queues.get<Message.Message>(queueDxn) : undefined;
|
|
34
|
-
await queue?.refresh();
|
|
35
|
-
const content = queue?.objects
|
|
36
|
-
.filter((message) => Obj.instanceOf(Message.Message, message))
|
|
37
|
-
.flatMap((message, index) => renderByline(members)(message, index))
|
|
38
|
-
.join('\n\n');
|
|
39
|
-
return content;
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
}),
|
|
15
|
+
AppPlugin.addTextContentModule({ activate: TextContent }),
|
|
44
16
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
45
17
|
AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),
|
|
46
18
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
import { Transcript } from '@dxos/types';
|
|
8
|
+
|
|
9
|
+
import { OperationHandler } from '#capabilities';
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
|
|
12
|
+
export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
13
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
14
|
+
AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),
|
|
15
|
+
Plugin.make,
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
export default TranscriptionPlugin;
|
|
@@ -7,6 +7,7 @@ import { Capability } from '@dxos/app-framework';
|
|
|
7
7
|
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
8
8
|
|
|
9
9
|
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
10
|
+
export const TextContent = Capability.lazy('TextContent', () => import('./text-content'));
|
|
10
11
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
11
12
|
'OperationHandler',
|
|
12
13
|
() => import('./operation-handler'),
|
|
@@ -10,7 +10,7 @@ import { Surface } from '@dxos/app-framework/ui';
|
|
|
10
10
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
11
11
|
import { Transcript } from '@dxos/types';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { TranscriptionArticle } from '#containers';
|
|
14
14
|
|
|
15
15
|
export default Capability.makeModule(() =>
|
|
16
16
|
Effect.succeed(
|
|
@@ -23,7 +23,7 @@ export default Capability.makeModule(() =>
|
|
|
23
23
|
AppSurface.object(AppSurface.Section, Transcript.Transcript),
|
|
24
24
|
),
|
|
25
25
|
component: ({ data, role }) => (
|
|
26
|
-
<
|
|
26
|
+
<TranscriptionArticle role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
27
27
|
),
|
|
28
28
|
}),
|
|
29
29
|
]),
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { Feed, Obj } from '@dxos/echo';
|
|
10
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
11
|
+
import { Message, Transcript } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { renderByline } from '../util';
|
|
14
|
+
|
|
15
|
+
export default Capability.makeModule(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
return Capability.contributes(AppCapabilities.TextContent, {
|
|
18
|
+
id: Transcript.Transcript.typename,
|
|
19
|
+
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
20
|
+
const space = getSpace(transcript);
|
|
21
|
+
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
22
|
+
const feed = await transcript.feed.load();
|
|
23
|
+
const feedDXN = Feed.getQueueDxn(feed);
|
|
24
|
+
const queue = feedDXN ? space?.queues.get<Message.Message>(feedDXN) : undefined;
|
|
25
|
+
await queue?.refresh();
|
|
26
|
+
return queue?.objects
|
|
27
|
+
.filter((message) => Obj.instanceOf(Message.Message, message))
|
|
28
|
+
.flatMap((message, index) => renderByline(members)(message, index))
|
|
29
|
+
.join('\n\n');
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import { ClientCapabilities } from '@dxos/plugin-client
|
|
8
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
9
9
|
|
|
10
10
|
import { TranscriptionCapabilities } from '#types';
|
|
11
11
|
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
8
|
+
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { ClientPlugin, initializeIdentity } from '@dxos/plugin-client/testing';
|
|
11
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
12
|
+
import { IconButton, Panel, Toolbar } from '@dxos/react-ui';
|
|
13
|
+
import { withLayout } from '@dxos/react-ui/testing';
|
|
14
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
15
|
+
|
|
16
|
+
import { useAudioTrack, useTranscriber } from '#hooks';
|
|
17
|
+
import { translations } from '#translations';
|
|
18
|
+
|
|
19
|
+
import { TranscriptionPlugin } from '../../TranscriptionPlugin';
|
|
20
|
+
import { Oracle } from './Oracle';
|
|
21
|
+
|
|
22
|
+
type DefaultStoryProps = {
|
|
23
|
+
delay?: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const DefaultStory = ({ delay }: DefaultStoryProps) => {
|
|
27
|
+
const [recording, setRecording] = useState(false);
|
|
28
|
+
const [text, setText] = useState('');
|
|
29
|
+
const elapsed = useStopwatch(recording);
|
|
30
|
+
const track = useAudioTrack(recording);
|
|
31
|
+
|
|
32
|
+
// Build the latest transcribed text from incoming blocks.
|
|
33
|
+
const handleSegments = useCallback(async (blocks: Message.Message['blocks']) => {
|
|
34
|
+
const phrase = blocks
|
|
35
|
+
.filter((block): block is ContentBlock.Transcript => block._tag === 'transcript')
|
|
36
|
+
.map((block) => block.text.trim())
|
|
37
|
+
.filter(Boolean)
|
|
38
|
+
.join(' ');
|
|
39
|
+
|
|
40
|
+
setText((prev) => (prev ? `${prev} ${phrase}` : phrase));
|
|
41
|
+
}, []);
|
|
42
|
+
|
|
43
|
+
// Drive the transcriber off the recording flag.
|
|
44
|
+
// Default `transcribeAfterChunksAmount` is 50 × 200ms = 10s, so the first phrase only
|
|
45
|
+
// surfaces after ~10s. Drop it to 15 chunks (~3s) so the TextBlock starts updating fast.
|
|
46
|
+
const transcriber = useTranscriber({
|
|
47
|
+
audioStreamTrack: track,
|
|
48
|
+
onSegments: handleSegments,
|
|
49
|
+
transcriberConfig: { transcribeAfterChunksAmount: 15, prefixBufferChunksAmount: 5 },
|
|
50
|
+
});
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (!transcriber) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
let cancelled = false;
|
|
57
|
+
void transcriber.open().then(() => {
|
|
58
|
+
if (!cancelled && recording) {
|
|
59
|
+
transcriber.startChunksRecording();
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
return () => {
|
|
64
|
+
cancelled = true;
|
|
65
|
+
transcriber.stopChunksRecording();
|
|
66
|
+
};
|
|
67
|
+
}, [transcriber, recording]);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<Panel.Root>
|
|
71
|
+
<Panel.Toolbar asChild>
|
|
72
|
+
<Toolbar.Root>
|
|
73
|
+
<IconButton
|
|
74
|
+
icon={recording ? 'ph--stop-circle--regular' : 'ph--microphone--regular'}
|
|
75
|
+
label={recording ? 'Stop' : 'Record'}
|
|
76
|
+
onClick={() => setRecording((value) => !value)}
|
|
77
|
+
/>
|
|
78
|
+
<IconButton disabled={recording} icon='ph--x--regular' label='Clear' onClick={() => setText('')} />
|
|
79
|
+
<Toolbar.Separator />
|
|
80
|
+
<Toolbar.Text classNames='text-right tabular-nums text-subdued'>{elapsed}s</Toolbar.Text>
|
|
81
|
+
</Toolbar.Root>
|
|
82
|
+
</Panel.Toolbar>
|
|
83
|
+
<Oracle.Root text={text} delay={delay}>
|
|
84
|
+
<Panel.Content asChild>
|
|
85
|
+
<Oracle.Content>
|
|
86
|
+
<Oracle.Canvas />
|
|
87
|
+
<Oracle.Text />
|
|
88
|
+
</Oracle.Content>
|
|
89
|
+
</Panel.Content>
|
|
90
|
+
</Oracle.Root>
|
|
91
|
+
</Panel.Root>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const meta = {
|
|
96
|
+
title: 'plugins/plugin-transcription/components/Oracle',
|
|
97
|
+
render: DefaultStory,
|
|
98
|
+
decorators: [
|
|
99
|
+
withLayout({ layout: 'fullscreen' }),
|
|
100
|
+
withPluginManager({
|
|
101
|
+
plugins: [
|
|
102
|
+
...corePlugins(),
|
|
103
|
+
ClientPlugin({
|
|
104
|
+
onClientInitialized: ({ client }) =>
|
|
105
|
+
Effect.gen(function* () {
|
|
106
|
+
yield* initializeIdentity(client);
|
|
107
|
+
}),
|
|
108
|
+
}),
|
|
109
|
+
TranscriptionPlugin(),
|
|
110
|
+
],
|
|
111
|
+
}),
|
|
112
|
+
],
|
|
113
|
+
parameters: {
|
|
114
|
+
layout: 'fullscreen',
|
|
115
|
+
translations,
|
|
116
|
+
},
|
|
117
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
118
|
+
|
|
119
|
+
export default meta;
|
|
120
|
+
|
|
121
|
+
type Story = StoryObj<typeof meta>;
|
|
122
|
+
|
|
123
|
+
export const Default: Story = {
|
|
124
|
+
args: {
|
|
125
|
+
delay: 12,
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const Instant: Story = {
|
|
130
|
+
args: {
|
|
131
|
+
delay: 0,
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/** Seconds elapsed while `running`; resets to 0 each time `running` toggles back to true. */
|
|
136
|
+
const useStopwatch = (running: boolean): number => {
|
|
137
|
+
const [seconds, setSeconds] = useState(0);
|
|
138
|
+
useEffect(() => {
|
|
139
|
+
if (!running) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
setSeconds(0);
|
|
143
|
+
const id = setInterval(() => setSeconds((value) => value + 1), 1_000);
|
|
144
|
+
return () => clearInterval(id);
|
|
145
|
+
}, [running]);
|
|
146
|
+
return seconds;
|
|
147
|
+
};
|