@dxos/plugin-transcription 0.8.4-main.bc674ce → 0.8.4-main.bcb3aa67d6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/blueprints/index.mjs +27 -5
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-RIUSFL62.mjs +112 -0
- package/dist/lib/browser/chunk-RIUSFL62.mjs.map +7 -0
- package/dist/lib/browser/chunk-YXU2ZO6W.mjs +17 -0
- package/dist/lib/browser/chunk-YXU2ZO6W.mjs.map +7 -0
- package/dist/lib/browser/create-IZPB7VZW.mjs +19 -0
- package/dist/lib/browser/create-IZPB7VZW.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1154 -60
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-SN5O5I6X.mjs +29 -0
- package/dist/lib/browser/open-SN5O5I6X.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/summarize-5MZENAU5.mjs +71 -0
- package/dist/lib/browser/summarize-5MZENAU5.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -5
- package/dist/lib/node-esm/blueprints/index.mjs +27 -5
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-3GSFEN4L.mjs +113 -0
- package/dist/lib/node-esm/chunk-3GSFEN4L.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BR2R6PCT.mjs +19 -0
- package/dist/lib/node-esm/chunk-BR2R6PCT.mjs.map +7 -0
- package/dist/lib/node-esm/create-TQDGXQBL.mjs +20 -0
- package/dist/lib/node-esm/create-TQDGXQBL.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1154 -60
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/open-4GAAWWKJ.mjs +30 -0
- package/dist/lib/node-esm/open-4GAAWWKJ.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/summarize-RVOSRHEC.mjs +72 -0
- package/dist/lib/node-esm/summarize-RVOSRHEC.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -5
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +1 -1
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/transcription-blueprint.d.ts +3 -20
- package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/transcriber.d.ts +9 -0
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -0
- package/dist/types/src/components/{Transcript/Transcript.d.ts → Transcription/Transcription.d.ts} +10 -5
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
- package/dist/types/src/components/{Transcript/Transcript.stories.d.ts → Transcription/Transcription.stories.d.ts} +12 -12
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/index.d.ts +2 -0
- package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
- package/dist/types/src/components/{Transcript/transcript-extension.d.ts → Transcription/transcription-extension.d.ts} +3 -3
- package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +2 -2
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +2 -2
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +6 -0
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts +3 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useTranscriber.d.ts +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +905 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/summarize.d.ts +8 -0
- package/dist/types/src/operations/summarize.d.ts.map +1 -0
- package/dist/types/src/segments-normalization/normalization.d.ts +41 -200
- package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -7
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +86 -65
- package/src/TranscriptionPlugin.tsx +17 -13
- package/src/blueprints/index.ts +1 -1
- package/src/blueprints/transcription-blueprint.ts +13 -8
- package/src/capabilities/blueprint-definition.ts +17 -0
- package/src/capabilities/index.ts +10 -4
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +30 -0
- package/src/capabilities/{transcriber/transcriber.ts → transcriber.ts} +6 -6
- package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +17 -14
- package/src/components/Transcription/Transcription.tsx +65 -0
- package/src/components/{Transcript → Transcription}/index.ts +1 -1
- package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +4 -4
- package/src/components/index.ts +1 -6
- package/src/components/stories/FileTranscription.stories.tsx +9 -11
- package/src/components/stories/KeyWordRecognition.stories.tsx +6 -6
- package/src/components/stories/MicrophoneTranscription.stories.tsx +13 -31
- package/src/components/stories/TranscriptionStory.tsx +7 -5
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +32 -0
- package/src/containers/TranscriptionContainer/index.ts +7 -0
- package/src/containers/index.ts +7 -0
- package/src/hooks/useTranscriber.ts +2 -2
- package/src/meta.ts +1 -1
- package/src/model/model.test.ts +6 -6
- package/src/operations/create.ts +22 -0
- package/src/operations/definitions.ts +102 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/open.ts +31 -0
- package/src/{functions → operations}/summarize.ts +41 -47
- package/src/segments-normalization/normalization.test.ts +1 -1
- package/src/segments-normalization/normalization.ts +33 -71
- package/src/testing/testing.ts +1 -11
- package/src/transcriber/transcriber.ts +1 -1
- package/src/translations.ts +7 -7
- package/src/types/capabilities.ts +3 -3
- package/src/types/index.ts +0 -2
- package/dist/lib/browser/TranscriptContainer-6EHKWVS4.mjs +0 -12
- package/dist/lib/browser/TranscriptContainer-6EHKWVS4.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-FTRNMLJZ.mjs +0 -18
- package/dist/lib/browser/blueprint-definition-FTRNMLJZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-ICM7JRCO.mjs +0 -698
- package/dist/lib/browser/chunk-ICM7JRCO.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q5OC3WVG.mjs +0 -72
- package/dist/lib/browser/chunk-Q5OC3WVG.mjs.map +0 -7
- package/dist/lib/browser/chunk-SYGEFDWO.mjs +0 -8
- package/dist/lib/browser/chunk-SYGEFDWO.mjs.map +0 -7
- package/dist/lib/browser/chunk-TKFU53OZ.mjs +0 -460
- package/dist/lib/browser/chunk-TKFU53OZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZZF7ICVM.mjs +0 -150
- package/dist/lib/browser/chunk-ZZF7ICVM.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-ZUWTU7C5.mjs +0 -22
- package/dist/lib/browser/operation-resolver-ZUWTU7C5.mjs.map +0 -7
- package/dist/lib/browser/react-surface-ZXH5267I.mjs +0 -34
- package/dist/lib/browser/react-surface-ZXH5267I.mjs.map +0 -7
- package/dist/lib/browser/transcriber-EZZTUCPE.mjs +0 -60
- package/dist/lib/browser/transcriber-EZZTUCPE.mjs.map +0 -7
- package/dist/lib/node-esm/TranscriptContainer-5YT5W73I.mjs +0 -13
- package/dist/lib/node-esm/TranscriptContainer-5YT5W73I.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-IOX35YUX.mjs +0 -19
- package/dist/lib/node-esm/blueprint-definition-IOX35YUX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4BFY6P2D.mjs +0 -73
- package/dist/lib/node-esm/chunk-4BFY6P2D.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BX2AB7S7.mjs +0 -699
- package/dist/lib/node-esm/chunk-BX2AB7S7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CWP22IHV.mjs +0 -151
- package/dist/lib/node-esm/chunk-CWP22IHV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-EPC27WWV.mjs +0 -461
- package/dist/lib/node-esm/chunk-EPC27WWV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GVAVEVZ6.mjs +0 -10
- package/dist/lib/node-esm/chunk-GVAVEVZ6.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-Z72B4H2Q.mjs +0 -23
- package/dist/lib/node-esm/operation-resolver-Z72B4H2Q.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-6GUBZX2V.mjs +0 -35
- package/dist/lib/node-esm/react-surface-6GUBZX2V.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-RGW3YYT4.mjs +0 -61
- package/dist/lib/node-esm/transcriber-RGW3YYT4.mjs.map +0 -7
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -9
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +0 -5
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/transcriber/index.d.ts +0 -3
- package/dist/types/src/capabilities/transcriber/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/transcriber/transcriber.d.ts +0 -9
- package/dist/types/src/capabilities/transcriber/transcriber.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/index.d.ts +0 -2
- package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +0 -7
- package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -3
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/open.d.ts +0 -7
- package/dist/types/src/functions/open.d.ts.map +0 -1
- package/dist/types/src/functions/summarize.d.ts +0 -11
- package/dist/types/src/functions/summarize.d.ts.map +0 -1
- package/dist/types/src/types/TranscriptAction.d.ts +0 -25
- package/dist/types/src/types/TranscriptAction.d.ts.map +0 -1
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +0 -23
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/operation-handler/index.ts +0 -7
- package/src/capabilities/operation-handler/operation-handler.ts +0 -25
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -25
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -27
- package/src/capabilities/transcriber/index.ts +0 -7
- package/src/components/Transcript/Transcript.tsx +0 -66
- package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
- package/src/components/TranscriptContainer.tsx +0 -34
- package/src/functions/index.ts +0 -6
- package/src/functions/open.ts +0 -39
- package/src/types/TranscriptAction.ts +0 -32
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.bcb3aa67d6",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -11,23 +11,40 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"type": "module",
|
|
14
|
+
"imports": {
|
|
15
|
+
"#blueprints": "./src/blueprints/index.ts",
|
|
16
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
17
|
+
"#components": "./src/components/index.ts",
|
|
18
|
+
"#containers": "./src/containers/index.ts",
|
|
19
|
+
"#hooks": "./src/hooks/index.ts",
|
|
20
|
+
"#meta": "./src/meta.ts",
|
|
21
|
+
"#operations": "./src/operations/index.ts",
|
|
22
|
+
"#testing": "./src/testing/index.ts",
|
|
23
|
+
"#types": "./src/types/index.ts"
|
|
24
|
+
},
|
|
14
25
|
"exports": {
|
|
15
26
|
".": {
|
|
27
|
+
"source": "./src/index.ts",
|
|
16
28
|
"browser": "./dist/lib/browser/index.mjs",
|
|
17
29
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
18
|
-
"source": "./src/index.ts",
|
|
19
30
|
"types": "./dist/types/src/index.d.ts"
|
|
20
31
|
},
|
|
21
32
|
"./blueprints": {
|
|
33
|
+
"source": "./src/blueprints/index.ts",
|
|
22
34
|
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
23
35
|
"node": "./dist/lib/node-esm/blueprints/index.mjs",
|
|
24
|
-
"source": "./src/blueprints/index.ts",
|
|
25
36
|
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
26
37
|
},
|
|
38
|
+
"./operations": {
|
|
39
|
+
"source": "./src/operations/index.ts",
|
|
40
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
41
|
+
"node": "./dist/lib/node-esm/operations/index.mjs",
|
|
42
|
+
"types": "./dist/types/src/operations/index.d.ts"
|
|
43
|
+
},
|
|
27
44
|
"./types": {
|
|
45
|
+
"source": "./src/types/index.ts",
|
|
28
46
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
29
47
|
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
30
|
-
"source": "./src/types/index.ts",
|
|
31
48
|
"types": "./dist/types/src/types/index.d.ts"
|
|
32
49
|
}
|
|
33
50
|
},
|
|
@@ -37,6 +54,9 @@
|
|
|
37
54
|
"blueprints": [
|
|
38
55
|
"dist/types/src/blueprints/index.d.ts"
|
|
39
56
|
],
|
|
57
|
+
"operations": [
|
|
58
|
+
"dist/types/src/operations/index.d.ts"
|
|
59
|
+
],
|
|
40
60
|
"types": [
|
|
41
61
|
"dist/types/src/types/index.d.ts"
|
|
42
62
|
]
|
|
@@ -49,83 +69,84 @@
|
|
|
49
69
|
"dependencies": {
|
|
50
70
|
"@codemirror/state": "^6.5.2",
|
|
51
71
|
"@codemirror/view": "^6.38.4",
|
|
52
|
-
"date-fns": "^3.
|
|
72
|
+
"date-fns": "^3.6.0",
|
|
53
73
|
"extendable-media-recorder": "^9.2.19",
|
|
54
74
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
55
75
|
"main-thread-scheduling": "^14.1.1",
|
|
56
76
|
"react-resize-detector": "^11.0.1",
|
|
57
|
-
"react-router-dom": "^6.
|
|
77
|
+
"react-router-dom": "^6.30.3",
|
|
58
78
|
"react-use": "^17.5.1",
|
|
59
79
|
"wavefile": "^11.0.0",
|
|
60
|
-
"@dxos/ai": "0.8.4-main.
|
|
61
|
-
"@dxos/app-
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/debug": "0.8.4-main.
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/plugin-client": "0.8.4-main.
|
|
79
|
-
"@dxos/plugin-
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/plugin-
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/react-
|
|
88
|
-
"@dxos/react-ui-
|
|
89
|
-
"@dxos/react-ui-
|
|
90
|
-
"@dxos/react-ui-
|
|
91
|
-
"@dxos/react-ui-
|
|
92
|
-
"@dxos/react-ui-
|
|
93
|
-
"@dxos/react-ui-
|
|
94
|
-
"@dxos/react-ui-
|
|
95
|
-
"@dxos/schema": "0.8.4-main.
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
80
|
+
"@dxos/ai": "0.8.4-main.bcb3aa67d6",
|
|
81
|
+
"@dxos/app-toolkit": "0.8.4-main.bcb3aa67d6",
|
|
82
|
+
"@dxos/app-framework": "0.8.4-main.bcb3aa67d6",
|
|
83
|
+
"@dxos/blueprints": "0.8.4-main.bcb3aa67d6",
|
|
84
|
+
"@dxos/assistant": "0.8.4-main.bcb3aa67d6",
|
|
85
|
+
"@dxos/codec-protobuf": "0.8.4-main.bcb3aa67d6",
|
|
86
|
+
"@dxos/client": "0.8.4-main.bcb3aa67d6",
|
|
87
|
+
"@dxos/async": "0.8.4-main.bcb3aa67d6",
|
|
88
|
+
"@dxos/context": "0.8.4-main.bcb3aa67d6",
|
|
89
|
+
"@dxos/debug": "0.8.4-main.bcb3aa67d6",
|
|
90
|
+
"@dxos/display-name": "0.8.4-main.bcb3aa67d6",
|
|
91
|
+
"@dxos/echo-db": "0.8.4-main.bcb3aa67d6",
|
|
92
|
+
"@dxos/functions": "0.8.4-main.bcb3aa67d6",
|
|
93
|
+
"@dxos/echo": "0.8.4-main.bcb3aa67d6",
|
|
94
|
+
"@dxos/functions-runtime": "0.8.4-main.bcb3aa67d6",
|
|
95
|
+
"@dxos/keys": "0.8.4-main.bcb3aa67d6",
|
|
96
|
+
"@dxos/log": "0.8.4-main.bcb3aa67d6",
|
|
97
|
+
"@dxos/invariant": "0.8.4-main.bcb3aa67d6",
|
|
98
|
+
"@dxos/plugin-client": "0.8.4-main.bcb3aa67d6",
|
|
99
|
+
"@dxos/plugin-graph": "0.8.4-main.bcb3aa67d6",
|
|
100
|
+
"@dxos/operation": "0.8.4-main.bcb3aa67d6",
|
|
101
|
+
"@dxos/plugin-deck": "0.8.4-main.bcb3aa67d6",
|
|
102
|
+
"@dxos/plugin-markdown": "0.8.4-main.bcb3aa67d6",
|
|
103
|
+
"@dxos/plugin-space": "0.8.4-main.bcb3aa67d6",
|
|
104
|
+
"@dxos/protocols": "0.8.4-main.bcb3aa67d6",
|
|
105
|
+
"@dxos/plugin-thread": "0.8.4-main.bcb3aa67d6",
|
|
106
|
+
"@dxos/react-edge-client": "0.8.4-main.bcb3aa67d6",
|
|
107
|
+
"@dxos/react-client": "0.8.4-main.bcb3aa67d6",
|
|
108
|
+
"@dxos/react-ui-attention": "0.8.4-main.bcb3aa67d6",
|
|
109
|
+
"@dxos/react-ui-components": "0.8.4-main.bcb3aa67d6",
|
|
110
|
+
"@dxos/react-ui-editor": "0.8.4-main.bcb3aa67d6",
|
|
111
|
+
"@dxos/react-ui-form": "0.8.4-main.bcb3aa67d6",
|
|
112
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.bcb3aa67d6",
|
|
113
|
+
"@dxos/react-ui-sfx": "0.8.4-main.bcb3aa67d6",
|
|
114
|
+
"@dxos/react-ui-grid": "0.8.4-main.bcb3aa67d6",
|
|
115
|
+
"@dxos/schema": "0.8.4-main.bcb3aa67d6",
|
|
116
|
+
"@dxos/react-ui-stack": "0.8.4-main.bcb3aa67d6",
|
|
117
|
+
"@dxos/tracing": "0.8.4-main.bcb3aa67d6",
|
|
118
|
+
"@dxos/types": "0.8.4-main.bcb3aa67d6",
|
|
119
|
+
"@dxos/ui-editor": "0.8.4-main.bcb3aa67d6",
|
|
120
|
+
"@dxos/util": "0.8.4-main.bcb3aa67d6"
|
|
100
121
|
},
|
|
101
122
|
"devDependencies": {
|
|
102
|
-
"@effect-atom/atom-react": "^0.
|
|
103
|
-
"@effect/platform": "0.
|
|
123
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
124
|
+
"@effect/platform": "0.94.4",
|
|
104
125
|
"@types/dom-speech-recognition": "^0.0.6",
|
|
105
126
|
"@types/react": "~19.2.7",
|
|
106
|
-
"effect": "3.
|
|
127
|
+
"effect": "3.20.0",
|
|
107
128
|
"react": "~19.2.3",
|
|
108
129
|
"react-dom": "~19.2.3",
|
|
109
|
-
"tailwindcss": "
|
|
110
|
-
"@dxos/plugin-preview": "0.8.4-main.
|
|
111
|
-
"@dxos/plugin-testing": "0.8.4-main.
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/react-ui
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
130
|
+
"tailwindcss": "^4.2.0",
|
|
131
|
+
"@dxos/plugin-preview": "0.8.4-main.bcb3aa67d6",
|
|
132
|
+
"@dxos/plugin-testing": "0.8.4-main.bcb3aa67d6",
|
|
133
|
+
"@dxos/random": "0.8.4-main.bcb3aa67d6",
|
|
134
|
+
"@dxos/plugin-theme": "0.8.4-main.bcb3aa67d6",
|
|
135
|
+
"@dxos/react-ui-form": "0.8.4-main.bcb3aa67d6",
|
|
136
|
+
"@dxos/storybook-utils": "0.8.4-main.bcb3aa67d6",
|
|
137
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.bcb3aa67d6",
|
|
138
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6",
|
|
139
|
+
"@dxos/test-utils": "0.8.4-main.bcb3aa67d6",
|
|
140
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6"
|
|
120
141
|
},
|
|
121
142
|
"peerDependencies": {
|
|
122
|
-
"@effect-atom/atom-react": "^0.
|
|
123
|
-
"@effect/platform": "0.
|
|
124
|
-
"effect": "3.
|
|
143
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
144
|
+
"@effect/platform": "0.94.4",
|
|
145
|
+
"effect": "3.20.0",
|
|
125
146
|
"react": "~19.2.3",
|
|
126
147
|
"react-dom": "~19.2.3",
|
|
127
|
-
"@dxos/
|
|
128
|
-
"@dxos/ui
|
|
148
|
+
"@dxos/ui-theme": "0.8.4-main.bcb3aa67d6",
|
|
149
|
+
"@dxos/react-ui": "0.8.4-main.bcb3aa67d6"
|
|
129
150
|
},
|
|
130
151
|
"publishConfig": {
|
|
131
152
|
"access": "public"
|
|
@@ -2,24 +2,28 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
6
|
+
|
|
7
|
+
import { Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
+
import { Annotation, Obj } from '@dxos/echo';
|
|
7
10
|
import { getSpace } from '@dxos/react-client/echo';
|
|
8
11
|
import { Message, Transcript } from '@dxos/types';
|
|
9
12
|
|
|
10
|
-
import {
|
|
11
|
-
import { meta } from './meta';
|
|
13
|
+
import { meta } from '#meta';
|
|
12
14
|
import { translations } from './translations';
|
|
13
15
|
import { renderByline } from './util';
|
|
14
16
|
|
|
17
|
+
import { BlueprintDefinition, OperationHandler, ReactSurface, Transcriber } from '#capabilities';
|
|
18
|
+
|
|
15
19
|
export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
21
|
+
AppPlugin.addMetadataModule({
|
|
18
22
|
metadata: {
|
|
19
23
|
id: Transcript.Transcript.typename,
|
|
20
24
|
metadata: {
|
|
21
|
-
icon:
|
|
22
|
-
iconHue: '
|
|
25
|
+
icon: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).icon,
|
|
26
|
+
iconHue: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).hue ?? 'white',
|
|
23
27
|
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
24
28
|
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
25
29
|
const space = getSpace(transcript);
|
|
@@ -35,14 +39,14 @@ export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
|
35
39
|
},
|
|
36
40
|
},
|
|
37
41
|
}),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
43
|
+
AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),
|
|
44
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
45
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
41
46
|
Plugin.addModule({
|
|
42
47
|
id: 'transcription',
|
|
43
|
-
activatesOn:
|
|
48
|
+
activatesOn: AppActivationEvents.SetupAppGraph,
|
|
44
49
|
activate: Transcriber,
|
|
45
50
|
}),
|
|
46
|
-
Common.Plugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
47
51
|
Plugin.make,
|
|
48
52
|
);
|
package/src/blueprints/index.ts
CHANGED
|
@@ -2,24 +2,29 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
5
6
|
import { Blueprint, Template } from '@dxos/blueprints';
|
|
6
|
-
import { type FunctionDefinition } from '@dxos/functions';
|
|
7
7
|
import { trim } from '@dxos/util';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { TranscriptOperation } from '#operations';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.transcription';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const make = () =>
|
|
13
|
+
const make = () =>
|
|
16
14
|
Blueprint.make({
|
|
17
|
-
key:
|
|
15
|
+
key: BLUEPRINT_KEY,
|
|
18
16
|
name: 'Transcription',
|
|
19
|
-
tools: Blueprint.toolDefinitions({
|
|
17
|
+
tools: Blueprint.toolDefinitions({ operations: [TranscriptOperation.Open, TranscriptOperation.Summarize] }),
|
|
20
18
|
instructions: Template.make({
|
|
21
19
|
source: trim`
|
|
22
20
|
You can open and summarize a meeting transcript.
|
|
23
21
|
`,
|
|
24
22
|
}),
|
|
25
23
|
});
|
|
24
|
+
|
|
25
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
26
|
+
key: BLUEPRINT_KEY,
|
|
27
|
+
make,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default blueprint;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
10
|
+
import { TranscriptionBlueprint } from '#blueprints';
|
|
11
|
+
|
|
12
|
+
const blueprintDefinition = Capability.makeModule<
|
|
13
|
+
[],
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
15
|
+
>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint)]));
|
|
16
|
+
|
|
17
|
+
export default blueprintDefinition;
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
7
|
+
|
|
8
|
+
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
9
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
10
|
+
'OperationHandler',
|
|
11
|
+
() => import('./operation-handler'),
|
|
12
|
+
);
|
|
13
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
14
|
+
export const Transcriber = Capability.lazy('Transcriber', () => import('./transcriber'));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { TranscriptionOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, TranscriptionOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { Transcript } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { TranscriptionContainer } from '#containers';
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
|
|
16
|
+
export default Capability.makeModule(() =>
|
|
17
|
+
Effect.succeed(
|
|
18
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
19
|
+
Surface.create({
|
|
20
|
+
id: `${meta.id}.article.transcript`,
|
|
21
|
+
role: ['article', 'section'],
|
|
22
|
+
filter: (data): data is { attendableId: string; subject: Transcript.Transcript } =>
|
|
23
|
+
typeof data.attendableId === 'string' && Obj.instanceOf(Transcript.Transcript, data.subject),
|
|
24
|
+
component: ({ data, role }) => (
|
|
25
|
+
<TranscriptionContainer role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
26
|
+
),
|
|
27
|
+
}),
|
|
28
|
+
]),
|
|
29
|
+
),
|
|
30
|
+
);
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { ClientCapabilities } from '@dxos/plugin-client/types';
|
|
9
9
|
|
|
10
|
-
import { MediaStreamRecorder, Transcriber, TranscriptionManager } from '
|
|
11
|
-
import { TranscriptionCapabilities } from '
|
|
10
|
+
import { MediaStreamRecorder, Transcriber, TranscriptionManager } from '../transcriber';
|
|
11
|
+
import { TranscriptionCapabilities } from '#types';
|
|
12
12
|
|
|
13
13
|
// TODO(burdon): Move to config?
|
|
14
14
|
|
|
@@ -35,7 +35,7 @@ export default Capability.makeModule(
|
|
|
35
35
|
Effect.fnUntraced(function* () {
|
|
36
36
|
// Get context for lazy capability access in callbacks.
|
|
37
37
|
const capabilities = yield* Capability.Service;
|
|
38
|
-
const registry = yield* Capability.get(
|
|
38
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
39
39
|
|
|
40
40
|
const getTranscriber: TranscriptionCapabilities.GetTranscriber = ({
|
|
41
41
|
audioStreamTrack,
|
|
@@ -64,7 +64,7 @@ export default Capability.makeModule(
|
|
|
64
64
|
const getTranscriptionManager: TranscriptionCapabilities.GetTranscriptionManager = ({ messageEnricher }) => {
|
|
65
65
|
const client = capabilities.get(ClientCapabilities.Client);
|
|
66
66
|
const transcriptionManager = new TranscriptionManager({
|
|
67
|
-
edgeClient: client.edge,
|
|
67
|
+
edgeClient: client.edge.http,
|
|
68
68
|
messageEnricher,
|
|
69
69
|
registry,
|
|
70
70
|
});
|
package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx}
RENAMED
|
@@ -10,28 +10,29 @@ import React, { type FC, useEffect, useMemo, useState } from 'react';
|
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
11
|
import { Key } from '@dxos/echo';
|
|
12
12
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
13
|
+
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
13
14
|
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
14
15
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
15
16
|
import { faker } from '@dxos/random';
|
|
16
17
|
import { useMembers, useSpace } from '@dxos/react-client/echo';
|
|
17
18
|
import { IconButton, Toolbar } from '@dxos/react-ui';
|
|
18
|
-
import {
|
|
19
|
+
import { withLayout } from '@dxos/react-ui/testing';
|
|
19
20
|
import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
20
21
|
import { TestSchema } from '@dxos/schema/testing';
|
|
21
22
|
import { type ContentBlock, type Message, Organization, Person } from '@dxos/types';
|
|
22
23
|
|
|
23
|
-
import { useQueueModelAdapter } from '
|
|
24
|
+
import { useQueueModelAdapter } from '#hooks';
|
|
24
25
|
import { SerializationModel } from '../../model';
|
|
25
26
|
import {
|
|
26
27
|
MessageBuilder,
|
|
27
28
|
TestItem,
|
|
28
29
|
useTestTranscriptionQueue,
|
|
29
30
|
useTestTranscriptionQueueWithEntityExtraction,
|
|
30
|
-
} from '
|
|
31
|
+
} from '#testing';
|
|
31
32
|
import { translations } from '../../translations';
|
|
32
33
|
import { renderByline } from '../../util';
|
|
33
34
|
|
|
34
|
-
import {
|
|
35
|
+
import { Transcription, type TranscriptionProps } from './Transcription';
|
|
35
36
|
|
|
36
37
|
faker.seed(1);
|
|
37
38
|
|
|
@@ -39,7 +40,7 @@ faker.seed(1);
|
|
|
39
40
|
* Story wrapper with test controls.
|
|
40
41
|
*/
|
|
41
42
|
const TranscriptContainer: FC<
|
|
42
|
-
|
|
43
|
+
TranscriptionProps & {
|
|
43
44
|
running: boolean;
|
|
44
45
|
onRunningChange: (running: boolean) => void;
|
|
45
46
|
onReset?: () => void;
|
|
@@ -47,7 +48,7 @@ const TranscriptContainer: FC<
|
|
|
47
48
|
> = ({ model, running, onRunningChange, onReset }) => {
|
|
48
49
|
return (
|
|
49
50
|
<div className='grid grid-rows-[1fr_40px] grow divide-y divide-separator'>
|
|
50
|
-
<
|
|
51
|
+
<Transcription model={model} />
|
|
51
52
|
<div className='grid grid-cols-[1fr_16rem] overflow-hidden'>
|
|
52
53
|
<div className='flex items-center'>
|
|
53
54
|
<SyntaxHighlighter language='json' className='text-sm'>
|
|
@@ -67,12 +68,15 @@ const TranscriptContainer: FC<
|
|
|
67
68
|
);
|
|
68
69
|
};
|
|
69
70
|
|
|
70
|
-
type
|
|
71
|
+
type DefaultStoryProps = { messages?: Message.Message[] } & Pick<
|
|
72
|
+
TranscriptionProps,
|
|
73
|
+
'ignoreAttention' | 'attendableId'
|
|
74
|
+
>;
|
|
71
75
|
|
|
72
76
|
/**
|
|
73
77
|
* Basic story mutates array of messages.
|
|
74
78
|
*/
|
|
75
|
-
const BasicStory = ({ messages: initialMessages = [], ...props }:
|
|
79
|
+
const BasicStory = ({ messages: initialMessages = [], ...props }: DefaultStoryProps) => {
|
|
76
80
|
const [reset, setReset] = useState({});
|
|
77
81
|
const builder = useMemo(() => new MessageBuilder(), []);
|
|
78
82
|
const model = useMemo(
|
|
@@ -134,7 +138,7 @@ const QueueStory = ({
|
|
|
134
138
|
queueId,
|
|
135
139
|
onReset,
|
|
136
140
|
...props
|
|
137
|
-
}:
|
|
141
|
+
}: DefaultStoryProps & { queueId: Key.ObjectId; onReset: () => void }) => {
|
|
138
142
|
const [running, setRunning] = useState(true);
|
|
139
143
|
const space = useSpace();
|
|
140
144
|
const members = useMembers(space?.id).map((member) => member.identity);
|
|
@@ -171,9 +175,9 @@ const QueueStoryWrapper = () => {
|
|
|
171
175
|
};
|
|
172
176
|
|
|
173
177
|
const meta = {
|
|
174
|
-
title: 'plugins/plugin-transcription/
|
|
178
|
+
title: 'plugins/plugin-transcription/components/Transcription',
|
|
175
179
|
decorators: [
|
|
176
|
-
|
|
180
|
+
withLayout({ layout: 'fullscreen' }),
|
|
177
181
|
withPluginManager({
|
|
178
182
|
plugins: [
|
|
179
183
|
...corePlugins(),
|
|
@@ -182,7 +186,7 @@ const meta = {
|
|
|
182
186
|
types: [TestItem, TestSchema.DocumentType, Person.Person, Organization.Organization],
|
|
183
187
|
onClientInitialized: ({ client }) =>
|
|
184
188
|
Effect.gen(function* () {
|
|
185
|
-
yield*
|
|
189
|
+
yield* initializeIdentity(client);
|
|
186
190
|
}),
|
|
187
191
|
}),
|
|
188
192
|
|
|
@@ -198,8 +202,7 @@ const meta = {
|
|
|
198
202
|
|
|
199
203
|
export default meta;
|
|
200
204
|
|
|
201
|
-
|
|
202
|
-
const DefaultStory = (props: StoryProps) => {
|
|
205
|
+
const DefaultStory = (props: DefaultStoryProps) => {
|
|
203
206
|
const [messages, setMessages] = useState<Message.Message[]>([]);
|
|
204
207
|
useEffect(() => {
|
|
205
208
|
void Promise.all(Array.from({ length: 10 }, () => MessageBuilder.singleton.createMessage())).then(setMessages);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { 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
|
+
documentSlots,
|
|
17
|
+
preview,
|
|
18
|
+
} from '@dxos/ui-editor';
|
|
19
|
+
import { composable, composableProps } 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 = {
|
|
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 = composable<HTMLDivElement, TranscriptionProps>(
|
|
41
|
+
({ transcript: object, model, children, ...props }, forwardedRef) => {
|
|
42
|
+
const { themeMode } = useThemeContext();
|
|
43
|
+
const { parentRef } = useTextEditor(() => {
|
|
44
|
+
return {
|
|
45
|
+
extensions: [
|
|
46
|
+
createBasicExtensions({ readOnly: true, lineWrapping: true, search: true }),
|
|
47
|
+
createMarkdownExtensions(),
|
|
48
|
+
createThemeExtensions({ themeMode, slots: documentSlots }),
|
|
49
|
+
decorateMarkdown(),
|
|
50
|
+
preview(),
|
|
51
|
+
transcription({ model, started: object?.started ? new Date(object.started) : undefined }),
|
|
52
|
+
autoScroll(),
|
|
53
|
+
].filter(isTruthy),
|
|
54
|
+
};
|
|
55
|
+
}, [model]);
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<div
|
|
59
|
+
{...composableProps(props, { classNames: 'dx-container' })}
|
|
60
|
+
ref={parentRef}
|
|
61
|
+
data-popover-collision-boundary={true /* TODO(thure): Make this a constant and document it. */}
|
|
62
|
+
/>
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
);
|
|
@@ -15,7 +15,7 @@ import { DocumentAdapter, type SerializationModel } from '../../model';
|
|
|
15
15
|
/**
|
|
16
16
|
* Data structure that maps Chunks queue to lines with transcript state.
|
|
17
17
|
*/
|
|
18
|
-
export type
|
|
18
|
+
export type TranscriptionOptions = {
|
|
19
19
|
model: SerializationModel<Message.Message>;
|
|
20
20
|
started?: Date;
|
|
21
21
|
};
|
|
@@ -23,7 +23,7 @@ export type TranscriptOptions = {
|
|
|
23
23
|
/**
|
|
24
24
|
* Scrolling transcript with timestamps.
|
|
25
25
|
*/
|
|
26
|
-
export const
|
|
26
|
+
export const transcription = ({ model, started }: TranscriptionOptions): Extension => {
|
|
27
27
|
return [
|
|
28
28
|
// Show timestamps in the gutter.
|
|
29
29
|
gutter({
|
|
@@ -132,7 +132,7 @@ export const transcript = ({ model, started }: TranscriptOptions): Extension =>
|
|
|
132
132
|
|
|
133
133
|
EditorView.theme({
|
|
134
134
|
'.cm-gutters': {
|
|
135
|
-
backgroundColor: 'var(--
|
|
135
|
+
backgroundColor: 'var(--color-base-surface)',
|
|
136
136
|
},
|
|
137
137
|
'.cm-timestamp-gutter': {
|
|
138
138
|
width: '6rem',
|
|
@@ -166,7 +166,7 @@ class TimestampMarker extends GutterMarker {
|
|
|
166
166
|
|
|
167
167
|
override toDOM(view: EditorView) {
|
|
168
168
|
const el = document.createElement('div');
|
|
169
|
-
el.className = 'text-sm text-subdued hover:bg-
|
|
169
|
+
el.className = 'text-sm text-subdued hover:bg-hover-surface cursor-pointer';
|
|
170
170
|
el.textContent = formatTimestamp(this._timestamp, this._started);
|
|
171
171
|
// TODO(burdon): Click to bookmark or copy hyperlink.
|
|
172
172
|
el.onclick = () => {
|