@dxos/plugin-transcription 0.8.3 → 0.8.4-main.1da679c
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/TranscriptContainer-W6CHJPIB.mjs +11 -0
- package/dist/lib/browser/blueprint-definition-C62MH2FL.mjs +142 -0
- package/dist/lib/browser/blueprint-definition-C62MH2FL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GOF7MJNV.mjs → chunk-3X7HP44M.mjs} +9 -2
- package/dist/lib/browser/{chunk-GOF7MJNV.mjs.map → chunk-3X7HP44M.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-IQ5ZRMHZ.mjs → chunk-BA64VLLR.mjs} +93 -102
- package/dist/lib/browser/chunk-BA64VLLR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-53AXUEIQ.mjs → chunk-DHMLTHPB.mjs} +424 -442
- package/dist/lib/browser/chunk-DHMLTHPB.mjs.map +7 -0
- package/dist/lib/browser/chunk-HXVGV7T6.mjs +63 -0
- package/dist/lib/browser/chunk-HXVGV7T6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-W2KNYJD6.mjs → chunk-TNEQFHIU.mjs} +3 -3
- package/dist/lib/browser/{chunk-W2KNYJD6.mjs.map → chunk-TNEQFHIU.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-UDCCT32F.mjs → chunk-ZNCGBPXR.mjs} +3 -3
- package/dist/lib/browser/index.mjs +27 -21
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/intent-resolver-LKRGWUX2.mjs +25 -0
- package/dist/lib/browser/intent-resolver-LKRGWUX2.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-HMJS5FSS.mjs → react-surface-2AGVHCYU.mjs} +11 -11
- package/dist/lib/browser/react-surface-2AGVHCYU.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-OYPLZFG5.mjs → transcriber-L3NQP2OM.mjs} +8 -8
- package/dist/lib/browser/transcriber-L3NQP2OM.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -8
- package/dist/lib/node-esm/{TranscriptContainer-G75LDEO5.mjs → TranscriptContainer-LJLH47VF.mjs} +4 -4
- package/dist/lib/node-esm/blueprint-definition-PH3DDDHR.mjs +143 -0
- package/dist/lib/node-esm/blueprint-definition-PH3DDDHR.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MFJPEIVB.mjs → chunk-3QAIZGMW.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-MFJPEIVB.mjs.map → chunk-3QAIZGMW.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-PRL64SRU.mjs → chunk-J5GQ3KGX.mjs} +93 -102
- package/dist/lib/node-esm/chunk-J5GQ3KGX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-56QHOX4A.mjs → chunk-JQARMZNW.mjs} +424 -442
- package/dist/lib/node-esm/chunk-JQARMZNW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-MFJO7EKD.mjs → chunk-JQBXD6KX.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-TXMDLLBR.mjs → chunk-QARUDLHN.mjs} +8 -2
- package/dist/lib/node-esm/{chunk-TXMDLLBR.mjs.map → chunk-QARUDLHN.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-W72HVQMD.mjs +64 -0
- package/dist/lib/node-esm/chunk-W72HVQMD.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +27 -21
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/intent-resolver-AGLWBOCO.mjs +26 -0
- package/dist/lib/node-esm/intent-resolver-AGLWBOCO.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-JGQSYGRR.mjs → react-surface-HPQQ3WIF.mjs} +11 -11
- package/dist/lib/node-esm/react-surface-HPQQ3WIF.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-TVG2MBBN.mjs → transcriber-KJX4U74D.mjs} +8 -8
- package/dist/lib/node-esm/transcriber-KJX4U74D.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -8
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +3 -3
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +3 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +5 -5
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +30 -15
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +2 -2
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +1 -5
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +6 -5
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +5 -3
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +10 -5
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +7 -5
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +1 -0
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +3 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/open.d.ts +7 -0
- package/dist/types/src/functions/open.d.ts.map +1 -0
- package/dist/types/src/functions/summarize.d.ts +11 -0
- package/dist/types/src/functions/summarize.d.ts.map +1 -0
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts +1 -1
- package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/normalization.d.ts +375 -243
- package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +1 -1
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/index.d.ts +1 -1
- package/dist/types/src/transcriber/index.d.ts.map +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +3 -7
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +11 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Transcript.d.ts +30 -0
- package/dist/types/src/types/Transcript.d.ts.map +1 -0
- package/dist/types/src/types/TranscriptAction.d.ts +23 -0
- package/dist/types/src/types/TranscriptAction.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +0 -26
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +61 -59
- package/src/TranscriptionPlugin.tsx +13 -8
- package/src/capabilities/blueprint-definition.ts +31 -0
- package/src/capabilities/capabilities.ts +5 -5
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +5 -11
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/capabilities/transcriber.ts +3 -2
- package/src/components/Transcript/Transcript.stories.tsx +26 -24
- package/src/components/Transcript/Transcript.tsx +20 -27
- package/src/components/Transcript/deprecated/OldTranscript.tsx +4 -4
- package/src/components/Transcript/transcript-extension.ts +4 -41
- package/src/components/TranscriptContainer.tsx +13 -7
- package/src/components/stories/FileTranscription.stories.tsx +53 -39
- package/src/components/stories/KeyWordRecognition.stories.tsx +12 -6
- package/src/components/stories/MicrophoneTranscription.stories.tsx +41 -36
- package/src/components/stories/TranscriptionStory.tsx +9 -5
- package/src/functions/index.ts +6 -0
- package/src/functions/open.ts +37 -0
- package/src/functions/summarize.ts +97 -0
- package/src/hooks/useAudioFile.ts +1 -10
- package/src/hooks/useTranscriber.ts +5 -5
- package/src/hooks/useVoiceInput.ts +3 -2
- package/src/model/model.test.ts +9 -9
- package/src/segments-normalization/message-normalizer.ts +1 -1
- package/src/segments-normalization/normalization.test.ts +19 -21
- package/src/segments-normalization/normalization.ts +54 -44
- package/src/testing/testing.ts +13 -13
- package/src/transcriber/index.ts +1 -1
- package/src/transcriber/media-stream-recorder.ts +1 -1
- package/src/transcriber/transcriber.browser.test.ts +4 -3
- package/src/transcriber/transcriber.ts +5 -7
- package/src/transcriber/transcription-manager.ts +18 -39
- package/src/translations.ts +6 -4
- package/src/types/{schema.ts → Transcript.ts} +11 -8
- package/src/types/TranscriptAction.ts +24 -0
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +0 -23
- package/dist/lib/browser/TranscriptContainer-H3AZQ4CQ.mjs +0 -11
- package/dist/lib/browser/chunk-53AXUEIQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQ5ZRMHZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-OSISJM2F.mjs +0 -55
- package/dist/lib/browser/chunk-OSISJM2F.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-BGADCHVM.mjs +0 -30
- package/dist/lib/browser/intent-resolver-BGADCHVM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HMJS5FSS.mjs.map +0 -7
- package/dist/lib/browser/transcriber-OYPLZFG5.mjs.map +0 -7
- package/dist/lib/node/TranscriptContainer-KIG3GMAB.cjs +0 -32
- package/dist/lib/node/TranscriptContainer-KIG3GMAB.cjs.map +0 -7
- package/dist/lib/node/chunk-3PYT3BDM.cjs +0 -40
- package/dist/lib/node/chunk-3PYT3BDM.cjs.map +0 -7
- package/dist/lib/node/chunk-6LW5RA3K.cjs +0 -75
- package/dist/lib/node/chunk-6LW5RA3K.cjs.map +0 -7
- package/dist/lib/node/chunk-AFUZI63A.cjs +0 -42
- package/dist/lib/node/chunk-AFUZI63A.cjs.map +0 -7
- package/dist/lib/node/chunk-CVUN3UO7.cjs +0 -778
- package/dist/lib/node/chunk-CVUN3UO7.cjs.map +0 -7
- package/dist/lib/node/chunk-FKDJNJ57.cjs +0 -35
- package/dist/lib/node/chunk-FKDJNJ57.cjs.map +0 -7
- package/dist/lib/node/chunk-ZFAUMZXE.cjs +0 -518
- package/dist/lib/node/chunk-ZFAUMZXE.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -133
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-LL3TTI4H.cjs +0 -45
- package/dist/lib/node/intent-resolver-LL3TTI4H.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-N25TBBG4.cjs +0 -56
- package/dist/lib/node/react-surface-N25TBBG4.cjs.map +0 -7
- package/dist/lib/node/transcriber-6J4FVFSZ.cjs +0 -68
- package/dist/lib/node/transcriber-6J4FVFSZ.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -36
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-56QHOX4A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FH75X4JC.mjs +0 -56
- package/dist/lib/node-esm/chunk-FH75X4JC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PRL64SRU.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-5LVCYSJS.mjs +0 -31
- package/dist/lib/node-esm/intent-resolver-5LVCYSJS.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-JGQSYGRR.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-TVG2MBBN.mjs.map +0 -7
- package/dist/types/src/types/schema.d.ts +0 -41
- package/dist/types/src/types/schema.d.ts.map +0 -1
- /package/dist/lib/browser/{TranscriptContainer-H3AZQ4CQ.mjs.map → TranscriptContainer-W6CHJPIB.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-UDCCT32F.mjs.map → chunk-ZNCGBPXR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-G75LDEO5.mjs.map → TranscriptContainer-LJLH47VF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-MFJO7EKD.mjs.map → chunk-JQBXD6KX.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.1da679c",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"source": "./src/index.ts",
|
|
12
13
|
"types": "./dist/types/src/index.d.ts",
|
|
13
14
|
"browser": "./dist/lib/browser/index.mjs",
|
|
14
15
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
15
16
|
},
|
|
16
17
|
"./types": {
|
|
18
|
+
"source": "./src/types/index.ts",
|
|
17
19
|
"types": "./dist/types/src/types/index.d.ts",
|
|
18
20
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
19
21
|
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
@@ -32,85 +34,85 @@
|
|
|
32
34
|
"src"
|
|
33
35
|
],
|
|
34
36
|
"dependencies": {
|
|
35
|
-
"@codemirror/state": "^6.
|
|
36
|
-
"@codemirror/view": "^6.
|
|
37
|
+
"@codemirror/state": "^6.5.2",
|
|
38
|
+
"@codemirror/view": "^6.38.2",
|
|
37
39
|
"@preact-signals/safe-react": "^0.9.0",
|
|
38
40
|
"@preact/signals-core": "^1.9.0",
|
|
39
41
|
"date-fns": "^3.3.1",
|
|
40
42
|
"extendable-media-recorder": "^9.2.19",
|
|
41
43
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
42
44
|
"main-thread-scheduling": "^14.1.1",
|
|
43
|
-
"react-resize-detector": "^
|
|
45
|
+
"react-resize-detector": "^11.0.1",
|
|
44
46
|
"react-router-dom": "^6.4.0",
|
|
45
47
|
"react-use": "^17.5.1",
|
|
46
48
|
"wavefile": "^11.0.0",
|
|
47
|
-
"@dxos/ai": "0.8.
|
|
48
|
-
"@dxos/app-framework": "0.8.
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/echo": "0.8.
|
|
58
|
-
"@dxos/echo-
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/invariant": "0.8.
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/local-storage": "0.8.
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/plugin-
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/plugin-graph": "0.8.
|
|
69
|
-
"@dxos/plugin-markdown": "0.8.
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/react-client": "0.8.
|
|
73
|
-
"@dxos/react-edge-client": "0.8.
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/react-ui-editor": "0.8.
|
|
77
|
-
"@dxos/react-ui-
|
|
78
|
-
"@dxos/react-ui-
|
|
79
|
-
"@dxos/react-ui-grid": "0.8.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
49
|
+
"@dxos/ai": "0.8.4-main.1da679c",
|
|
50
|
+
"@dxos/app-framework": "0.8.4-main.1da679c",
|
|
51
|
+
"@dxos/assistant": "0.8.4-main.1da679c",
|
|
52
|
+
"@dxos/async": "0.8.4-main.1da679c",
|
|
53
|
+
"@dxos/codec-protobuf": "0.8.4-main.1da679c",
|
|
54
|
+
"@dxos/blueprints": "0.8.4-main.1da679c",
|
|
55
|
+
"@dxos/context": "0.8.4-main.1da679c",
|
|
56
|
+
"@dxos/debug": "0.8.4-main.1da679c",
|
|
57
|
+
"@dxos/display-name": "0.8.4-main.1da679c",
|
|
58
|
+
"@dxos/echo": "0.8.4-main.1da679c",
|
|
59
|
+
"@dxos/echo-db": "0.8.4-main.1da679c",
|
|
60
|
+
"@dxos/echo-schema": "0.8.4-main.1da679c",
|
|
61
|
+
"@dxos/functions": "0.8.4-main.1da679c",
|
|
62
|
+
"@dxos/invariant": "0.8.4-main.1da679c",
|
|
63
|
+
"@dxos/client": "0.8.4-main.1da679c",
|
|
64
|
+
"@dxos/keys": "0.8.4-main.1da679c",
|
|
65
|
+
"@dxos/live-object": "0.8.4-main.1da679c",
|
|
66
|
+
"@dxos/local-storage": "0.8.4-main.1da679c",
|
|
67
|
+
"@dxos/plugin-client": "0.8.4-main.1da679c",
|
|
68
|
+
"@dxos/plugin-deck": "0.8.4-main.1da679c",
|
|
69
|
+
"@dxos/log": "0.8.4-main.1da679c",
|
|
70
|
+
"@dxos/plugin-graph": "0.8.4-main.1da679c",
|
|
71
|
+
"@dxos/plugin-markdown": "0.8.4-main.1da679c",
|
|
72
|
+
"@dxos/plugin-space": "0.8.4-main.1da679c",
|
|
73
|
+
"@dxos/plugin-thread": "0.8.4-main.1da679c",
|
|
74
|
+
"@dxos/react-client": "0.8.4-main.1da679c",
|
|
75
|
+
"@dxos/react-edge-client": "0.8.4-main.1da679c",
|
|
76
|
+
"@dxos/react-ui-attention": "0.8.4-main.1da679c",
|
|
77
|
+
"@dxos/protocols": "0.8.4-main.1da679c",
|
|
78
|
+
"@dxos/react-ui-editor": "0.8.4-main.1da679c",
|
|
79
|
+
"@dxos/react-ui-form": "0.8.4-main.1da679c",
|
|
80
|
+
"@dxos/react-ui-sfx": "0.8.4-main.1da679c",
|
|
81
|
+
"@dxos/react-ui-grid": "0.8.4-main.1da679c",
|
|
82
|
+
"@dxos/react-ui-components": "0.8.4-main.1da679c",
|
|
83
|
+
"@dxos/schema": "0.8.4-main.1da679c",
|
|
84
|
+
"@dxos/tracing": "0.8.4-main.1da679c",
|
|
85
|
+
"@dxos/util": "0.8.4-main.1da679c",
|
|
86
|
+
"@dxos/react-ui-stack": "0.8.4-main.1da679c"
|
|
85
87
|
},
|
|
86
88
|
"devDependencies": {
|
|
87
|
-
"@effect-rx/rx-react": "
|
|
88
|
-
"@effect/platform": "0.
|
|
89
|
+
"@effect-rx/rx-react": "0.38.0",
|
|
90
|
+
"@effect/platform": "0.90.2",
|
|
89
91
|
"@types/dom-speech-recognition": "^0.0.6",
|
|
90
92
|
"@types/react": "~18.2.0",
|
|
91
|
-
"effect": "3.
|
|
93
|
+
"effect": "3.17.7",
|
|
92
94
|
"react": "~18.2.0",
|
|
93
95
|
"react-dom": "~18.2.0",
|
|
94
96
|
"tailwindcss": "~3.4.1",
|
|
95
|
-
"@dxos/plugin-preview": "0.8.
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/random": "0.8.
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/
|
|
100
|
-
"@dxos/react-ui-
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/react-ui-theme": "0.8.
|
|
103
|
-
"@dxos/storybook-utils": "0.8.
|
|
104
|
-
"@dxos/test-utils": "0.8.
|
|
97
|
+
"@dxos/plugin-preview": "0.8.4-main.1da679c",
|
|
98
|
+
"@dxos/plugin-storybook-layout": "0.8.4-main.1da679c",
|
|
99
|
+
"@dxos/random": "0.8.4-main.1da679c",
|
|
100
|
+
"@dxos/react-ui": "0.8.4-main.1da679c",
|
|
101
|
+
"@dxos/plugin-theme": "0.8.4-main.1da679c",
|
|
102
|
+
"@dxos/react-ui-form": "0.8.4-main.1da679c",
|
|
103
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.1da679c",
|
|
104
|
+
"@dxos/react-ui-theme": "0.8.4-main.1da679c",
|
|
105
|
+
"@dxos/storybook-utils": "0.8.4-main.1da679c",
|
|
106
|
+
"@dxos/test-utils": "0.8.4-main.1da679c"
|
|
105
107
|
},
|
|
106
|
-
"
|
|
108
|
+
"peerDependencies": {
|
|
107
109
|
"@effect-rx/rx-react": "^0.34.1",
|
|
108
|
-
"@effect/platform": "0.80.12",
|
|
110
|
+
"@effect/platform": "^0.80.12",
|
|
109
111
|
"effect": "^3.13.3",
|
|
110
112
|
"react": "~18.2.0",
|
|
111
113
|
"react-dom": "~18.2.0",
|
|
112
|
-
"@dxos/react-ui
|
|
113
|
-
"@dxos/react-ui": "0.8.
|
|
114
|
+
"@dxos/react-ui": "0.8.4-main.1da679c",
|
|
115
|
+
"@dxos/react-ui-theme": "0.8.4-main.1da679c"
|
|
114
116
|
},
|
|
115
117
|
"publishConfig": {
|
|
116
118
|
"access": "public"
|
|
@@ -8,11 +8,11 @@ import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
|
8
8
|
import { getSpace } from '@dxos/react-client/echo';
|
|
9
9
|
import { DataType } from '@dxos/schema';
|
|
10
10
|
|
|
11
|
-
import { IntentResolver, ReactSurface, Transcriber } from './capabilities';
|
|
12
|
-
import {
|
|
11
|
+
import { BlueprintDefinition, IntentResolver, ReactSurface, Transcriber } from './capabilities';
|
|
12
|
+
import { renderByline } from './components';
|
|
13
13
|
import { meta } from './meta';
|
|
14
|
-
import translations from './translations';
|
|
15
|
-
import {
|
|
14
|
+
import { translations } from './translations';
|
|
15
|
+
import { Transcript } from './types';
|
|
16
16
|
|
|
17
17
|
export const TranscriptionPlugin = () =>
|
|
18
18
|
definePlugin(meta, [
|
|
@@ -26,18 +26,18 @@ export const TranscriptionPlugin = () =>
|
|
|
26
26
|
activatesOn: Events.SetupMetadata,
|
|
27
27
|
activate: (context) =>
|
|
28
28
|
contributes(Capabilities.Metadata, {
|
|
29
|
-
id:
|
|
29
|
+
id: Transcript.Transcript.typename,
|
|
30
30
|
metadata: {
|
|
31
31
|
icon: 'ph--subtitles--regular',
|
|
32
32
|
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
33
|
-
getTextContent: async (transcript:
|
|
33
|
+
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
34
34
|
const space = getSpace(transcript);
|
|
35
35
|
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
36
36
|
const queue = space?.queues.get<DataType.Message>(transcript.queue.dxn);
|
|
37
37
|
await queue?.refresh();
|
|
38
38
|
const content = queue?.objects
|
|
39
39
|
.filter((message) => Obj.instanceOf(DataType.Message, message))
|
|
40
|
-
.flatMap((message, index) =>
|
|
40
|
+
.flatMap((message, index) => renderByline(members)(message, index))
|
|
41
41
|
.join('\n\n');
|
|
42
42
|
return content;
|
|
43
43
|
},
|
|
@@ -47,7 +47,7 @@ export const TranscriptionPlugin = () =>
|
|
|
47
47
|
defineModule({
|
|
48
48
|
id: `${meta.id}/module/schema`,
|
|
49
49
|
activatesOn: ClientEvents.SetupSchema,
|
|
50
|
-
activate: () => [contributes(ClientCapabilities.Schema, [
|
|
50
|
+
activate: () => [contributes(ClientCapabilities.Schema, [Transcript.Transcript])],
|
|
51
51
|
}),
|
|
52
52
|
defineModule({
|
|
53
53
|
id: `${meta.id}/module/react-surface`,
|
|
@@ -64,4 +64,9 @@ export const TranscriptionPlugin = () =>
|
|
|
64
64
|
activatesOn: Events.SetupAppGraph,
|
|
65
65
|
activate: Transcriber,
|
|
66
66
|
}),
|
|
67
|
+
defineModule({
|
|
68
|
+
id: `${meta.id}/module/blueprint`,
|
|
69
|
+
activatesOn: Events.SetupArtifactDefinition,
|
|
70
|
+
activate: BlueprintDefinition,
|
|
71
|
+
}),
|
|
67
72
|
]);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
+
import { Blueprint, Template } from '@dxos/blueprints';
|
|
7
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
8
|
+
import { trim } from '@dxos/util';
|
|
9
|
+
|
|
10
|
+
import { open, summarize } from '../functions';
|
|
11
|
+
|
|
12
|
+
const functions: FunctionDefinition[] = [open, summarize];
|
|
13
|
+
|
|
14
|
+
export default () => {
|
|
15
|
+
return [
|
|
16
|
+
contributes(Capabilities.Functions, functions),
|
|
17
|
+
contributes(
|
|
18
|
+
Capabilities.BlueprintDefinition,
|
|
19
|
+
Blueprint.make({
|
|
20
|
+
key: 'dxos.org/blueprint/transcription',
|
|
21
|
+
name: 'Transcription',
|
|
22
|
+
tools: Blueprint.toolDefinitions({ functions }),
|
|
23
|
+
instructions: Template.make({
|
|
24
|
+
source: trim`
|
|
25
|
+
You can open and summarize a meeting transcript.
|
|
26
|
+
`,
|
|
27
|
+
}),
|
|
28
|
+
}),
|
|
29
|
+
),
|
|
30
|
+
];
|
|
31
|
+
};
|
|
@@ -6,19 +6,19 @@ import { defineCapability } from '@dxos/app-framework';
|
|
|
6
6
|
|
|
7
7
|
import { TRANSCRIPTION_PLUGIN } from '../meta';
|
|
8
8
|
import {
|
|
9
|
-
type
|
|
9
|
+
type MediaStreamRecorderParams,
|
|
10
10
|
type Transcriber,
|
|
11
|
-
type
|
|
11
|
+
type TranscriberParams,
|
|
12
12
|
type TranscriptMessageEnricher,
|
|
13
|
-
type
|
|
13
|
+
type TranscriptionManager,
|
|
14
14
|
} from '../transcriber';
|
|
15
15
|
|
|
16
16
|
export namespace TranscriptionCapabilities {
|
|
17
17
|
export type GetTranscriberProps = {
|
|
18
18
|
audioStreamTrack: MediaStreamTrack;
|
|
19
|
-
onSegments: TranscriberParams['onSegments'];
|
|
20
|
-
transcriberConfig?: Partial<TranscriberParams['config']>;
|
|
21
19
|
recorderConfig?: Partial<MediaStreamRecorderParams['config']>;
|
|
20
|
+
transcriberConfig?: Partial<TranscriberParams['config']>;
|
|
21
|
+
onSegments: TranscriberParams['onSegments'];
|
|
22
22
|
};
|
|
23
23
|
export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;
|
|
24
24
|
export const Transcriber = defineCapability<GetTranscriber>(`${TRANSCRIPTION_PLUGIN}/capability/transcriber`);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
+
export const BlueprintDefinition = lazy(() => import('./blueprint-definition'));
|
|
7
8
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
8
9
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
9
10
|
export const Transcriber = lazy(() => import('./transcriber'));
|
|
@@ -2,22 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, createResolver
|
|
6
|
-
import { type Key, Obj, Ref } from '@dxos/echo';
|
|
7
|
-
import { createQueueDXN } from '@dxos/echo-schema';
|
|
5
|
+
import { Capabilities, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
|
|
8
6
|
|
|
9
|
-
import {
|
|
7
|
+
import { Transcript, TranscriptAction } from '../types';
|
|
10
8
|
|
|
11
9
|
export default (context: PluginContext) =>
|
|
12
10
|
contributes(Capabilities.IntentResolver, [
|
|
13
11
|
createResolver({
|
|
14
|
-
intent:
|
|
15
|
-
resolve: ({ name,
|
|
16
|
-
const transcript =
|
|
17
|
-
// TODO(dmaretskyi): Use space.queues.create() instead.
|
|
18
|
-
queue: Ref.fromDXN(createQueueDXN(spaceId as Key.SpaceId)),
|
|
19
|
-
});
|
|
20
|
-
|
|
12
|
+
intent: TranscriptAction.Create,
|
|
13
|
+
resolve: ({ name, space }) => {
|
|
14
|
+
const transcript = Transcript.makeTranscript(space.queues.create().dxn);
|
|
21
15
|
return { data: { object: transcript } };
|
|
22
16
|
},
|
|
23
17
|
}),
|
|
@@ -9,14 +9,14 @@ import { Obj } from '@dxos/echo';
|
|
|
9
9
|
|
|
10
10
|
import { TranscriptionContainer } from '../components';
|
|
11
11
|
import { meta } from '../meta';
|
|
12
|
-
import {
|
|
12
|
+
import { Transcript } from '../types';
|
|
13
13
|
|
|
14
14
|
export default () =>
|
|
15
15
|
contributes(Capabilities.ReactSurface, [
|
|
16
16
|
createSurface({
|
|
17
17
|
id: `${meta.id}/article/transcript`,
|
|
18
18
|
role: ['article', 'section'],
|
|
19
|
-
filter: (data): data is { subject:
|
|
19
|
+
filter: (data): data is { subject: Transcript.Transcript } => Obj.instanceOf(Transcript.Transcript, data.subject),
|
|
20
20
|
component: ({ data, role }) => <TranscriptionContainer transcript={data.subject} role={role} />,
|
|
21
21
|
}),
|
|
22
22
|
]);
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type PluginContext, contributes } from '@dxos/app-framework';
|
|
6
6
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
7
7
|
|
|
8
|
-
import { TranscriptionCapabilities } from './capabilities';
|
|
9
8
|
import { MediaStreamRecorder, Transcriber, TranscriptionManager } from '../transcriber';
|
|
10
9
|
|
|
10
|
+
import { TranscriptionCapabilities } from './capabilities';
|
|
11
|
+
|
|
11
12
|
// TODO(burdon): Move to config?
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React, { type FC, useEffect, useMemo, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
|
|
@@ -24,7 +24,6 @@ import { DataType } from '@dxos/schema';
|
|
|
24
24
|
import { Testing } from '@dxos/schema/testing';
|
|
25
25
|
import { withLayout } from '@dxos/storybook-utils';
|
|
26
26
|
|
|
27
|
-
import { renderMarkdown, Transcript, type TranscriptProps } from './Transcript';
|
|
28
27
|
import { useQueueModelAdapter } from '../../hooks';
|
|
29
28
|
import { SerializationModel } from '../../model';
|
|
30
29
|
import {
|
|
@@ -33,7 +32,9 @@ import {
|
|
|
33
32
|
useTestTranscriptionQueue,
|
|
34
33
|
useTestTranscriptionQueueWithEntityExtraction,
|
|
35
34
|
} from '../../testing';
|
|
36
|
-
import translations from '../../translations';
|
|
35
|
+
import { translations } from '../../translations';
|
|
36
|
+
|
|
37
|
+
import { TranscriptView, type TranscriptViewProps, renderByline } from './Transcript';
|
|
37
38
|
|
|
38
39
|
faker.seed(1);
|
|
39
40
|
|
|
@@ -41,7 +42,7 @@ faker.seed(1);
|
|
|
41
42
|
* Story wrapper with test controls.
|
|
42
43
|
*/
|
|
43
44
|
const TranscriptContainer: FC<
|
|
44
|
-
|
|
45
|
+
TranscriptViewProps & {
|
|
45
46
|
running: boolean;
|
|
46
47
|
onRunningChange: (running: boolean) => void;
|
|
47
48
|
onReset?: () => void;
|
|
@@ -49,7 +50,7 @@ const TranscriptContainer: FC<
|
|
|
49
50
|
> = ({ space, model, running, onRunningChange, onReset }) => {
|
|
50
51
|
return (
|
|
51
52
|
<div className='grid grid-rows-[1fr_40px] grow divide-y divide-separator'>
|
|
52
|
-
<
|
|
53
|
+
<TranscriptView space={space} model={model} />
|
|
53
54
|
<div className='grid grid-cols-[1fr_16rem] overflow-hidden'>
|
|
54
55
|
<div className='flex items-center'>
|
|
55
56
|
<SyntaxHighlighter language='json' className='text-sm'>
|
|
@@ -69,7 +70,7 @@ const TranscriptContainer: FC<
|
|
|
69
70
|
);
|
|
70
71
|
};
|
|
71
72
|
|
|
72
|
-
type StoryProps = { messages?: DataType.Message[] } & Pick<
|
|
73
|
+
type StoryProps = { messages?: DataType.Message[] } & Pick<TranscriptViewProps, 'ignoreAttention' | 'attendableId'>;
|
|
73
74
|
|
|
74
75
|
/**
|
|
75
76
|
* Basic story mutates array of messages.
|
|
@@ -78,7 +79,7 @@ const BasicStory = ({ messages: initialMessages = [], ...props }: StoryProps) =>
|
|
|
78
79
|
const [reset, setReset] = useState({});
|
|
79
80
|
const builder = useMemo(() => new MessageBuilder(), []);
|
|
80
81
|
const model = useMemo(
|
|
81
|
-
() => new SerializationModel<DataType.Message>(
|
|
82
|
+
() => new SerializationModel<DataType.Message>(renderByline([]), initialMessages),
|
|
82
83
|
[initialMessages, reset],
|
|
83
84
|
);
|
|
84
85
|
const [running, setRunning] = useState(true);
|
|
@@ -140,7 +141,7 @@ const QueueStory = ({
|
|
|
140
141
|
const space = useSpace();
|
|
141
142
|
const members = useMembers(space?.key).map((member) => member.identity);
|
|
142
143
|
const queue = useTestTranscriptionQueue(space, queueId, running, 2_000);
|
|
143
|
-
const model = useQueueModelAdapter(
|
|
144
|
+
const model = useQueueModelAdapter(renderByline(members), queue, initialMessages);
|
|
144
145
|
|
|
145
146
|
return (
|
|
146
147
|
<TranscriptContainer
|
|
@@ -160,7 +161,7 @@ const EntityExtractionQueueStory = () => {
|
|
|
160
161
|
const space = useSpace();
|
|
161
162
|
const members = useMembers(space?.key).map((member) => member.identity);
|
|
162
163
|
const queue = useTestTranscriptionQueueWithEntityExtraction(space, undefined, running, 2_000);
|
|
163
|
-
const model = useQueueModelAdapter(
|
|
164
|
+
const model = useQueueModelAdapter(renderByline(members), queue, []);
|
|
164
165
|
|
|
165
166
|
return <TranscriptContainer space={space} model={model} running={running} onRunningChange={setRunning} />;
|
|
166
167
|
};
|
|
@@ -178,7 +179,7 @@ const QueueStoryWrapper = () => {
|
|
|
178
179
|
return <QueueStory key={key} queueId={queueId} onReset={handleReset} />;
|
|
179
180
|
};
|
|
180
181
|
|
|
181
|
-
const meta
|
|
182
|
+
const meta = {
|
|
182
183
|
title: 'plugins/plugin-transcription/Transcript',
|
|
183
184
|
decorators: [
|
|
184
185
|
withPluginManager({
|
|
@@ -187,7 +188,7 @@ const meta: Meta<typeof QueueStory> = {
|
|
|
187
188
|
StorybookLayoutPlugin(),
|
|
188
189
|
ClientPlugin({
|
|
189
190
|
types: [TestItem, Testing.DocumentType, DataType.Person, DataType.Organization],
|
|
190
|
-
onClientInitialized: async (
|
|
191
|
+
onClientInitialized: async ({ client }) => {
|
|
191
192
|
await client.halo.createIdentity();
|
|
192
193
|
},
|
|
193
194
|
}),
|
|
@@ -202,13 +203,11 @@ const meta: Meta<typeof QueueStory> = {
|
|
|
202
203
|
parameters: {
|
|
203
204
|
translations,
|
|
204
205
|
},
|
|
205
|
-
};
|
|
206
|
+
} satisfies Meta;
|
|
206
207
|
|
|
207
208
|
export default meta;
|
|
208
209
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
export const Default: Story = {
|
|
210
|
+
export const Default: StoryObj<typeof BasicStory> = {
|
|
212
211
|
render: BasicStory,
|
|
213
212
|
args: {
|
|
214
213
|
ignoreAttention: true,
|
|
@@ -217,7 +216,7 @@ export const Default: Story = {
|
|
|
217
216
|
},
|
|
218
217
|
};
|
|
219
218
|
|
|
220
|
-
export const Empty:
|
|
219
|
+
export const Empty: StoryObj<typeof BasicStory> = {
|
|
221
220
|
render: BasicStory,
|
|
222
221
|
args: {
|
|
223
222
|
ignoreAttention: true,
|
|
@@ -225,7 +224,7 @@ export const Empty: Story = {
|
|
|
225
224
|
},
|
|
226
225
|
};
|
|
227
226
|
|
|
228
|
-
export const WithQueue:
|
|
227
|
+
export const WithQueue: StoryObj<typeof QueueStoryWrapper> = {
|
|
229
228
|
render: QueueStoryWrapper,
|
|
230
229
|
args: {
|
|
231
230
|
ignoreAttention: true,
|
|
@@ -233,10 +232,13 @@ export const WithQueue: Story = {
|
|
|
233
232
|
},
|
|
234
233
|
};
|
|
235
234
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
235
|
+
// NOTE: We are running out of free quota on hugging face entity extraction.
|
|
236
|
+
// TODO(mykola): Fix AI service in entity extraction function.
|
|
237
|
+
// TODO(mykola): Fix hugging face quota issues.
|
|
238
|
+
// export const WithEntityExtractionQueue: StoryObj<typeof EntityExtractionQueueStory> = {
|
|
239
|
+
// render: EntityExtractionQueueStory,
|
|
240
|
+
// args: {
|
|
241
|
+
// ignoreAttention: true,
|
|
242
|
+
// attendableId: 'story',
|
|
243
|
+
// },
|
|
244
|
+
// };
|
|
@@ -6,14 +6,13 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { type Space } from '@dxos/react-client/echo';
|
|
8
8
|
import { type Identity } from '@dxos/react-client/halo';
|
|
9
|
-
import {
|
|
9
|
+
import { type ThemedClassName, useThemeContext } from '@dxos/react-ui';
|
|
10
10
|
import {
|
|
11
|
+
autoScroll,
|
|
11
12
|
createBasicExtensions,
|
|
12
13
|
createMarkdownExtensions,
|
|
13
|
-
createRenderer,
|
|
14
14
|
createThemeExtensions,
|
|
15
15
|
decorateMarkdown,
|
|
16
|
-
editorWidth,
|
|
17
16
|
preview,
|
|
18
17
|
useTextEditor,
|
|
19
18
|
} from '@dxos/react-ui-editor';
|
|
@@ -21,16 +20,18 @@ import { mx } from '@dxos/react-ui-theme';
|
|
|
21
20
|
import { type DataType } from '@dxos/schema';
|
|
22
21
|
import { isNotFalsy } from '@dxos/util';
|
|
23
22
|
|
|
24
|
-
import { transcript } from './transcript-extension';
|
|
25
23
|
import { type SerializationModel } from '../../model';
|
|
26
|
-
import { type
|
|
24
|
+
import { type Transcript } from '../../types';
|
|
25
|
+
|
|
26
|
+
import { transcript } from './transcript-extension';
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
// TODO(thure): Move this?
|
|
29
|
+
export const renderByline =
|
|
29
30
|
(identities: Identity[]) =>
|
|
30
31
|
(message: DataType.Message, index: number, debug = false): string[] => {
|
|
31
32
|
if (message.sender.role === 'assistant') {
|
|
32
33
|
// Start/stop block.
|
|
33
|
-
return [message.blocks.find((block) => block.
|
|
34
|
+
return [message.blocks.find((block) => block._tag === 'transcript')?.text ?? '', ''];
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
// TODO(burdon): Use link/reference markup for users (with popover).
|
|
@@ -42,19 +43,20 @@ export const renderMarkdown =
|
|
|
42
43
|
message.sender.name ??
|
|
43
44
|
message.sender.email ??
|
|
44
45
|
message.sender.identityDid;
|
|
45
|
-
const blocks = message.blocks.filter((block) => block.
|
|
46
|
+
const blocks = message.blocks.filter((block) => block._tag === 'transcript');
|
|
46
47
|
return [
|
|
48
|
+
// TODO(thure): Use an XML tag with the bits needed here.
|
|
47
49
|
`###### ${name}` + (debug ? ` [${index}]:${message.id}` : ''),
|
|
48
50
|
blocks.map((block) => block.text.trim()).join(' '),
|
|
49
51
|
'',
|
|
50
52
|
];
|
|
51
53
|
};
|
|
52
54
|
|
|
53
|
-
export type
|
|
54
|
-
transcript?: TranscriptType;
|
|
55
|
+
export type TranscriptViewProps = ThemedClassName<{
|
|
55
56
|
space?: Space;
|
|
57
|
+
transcript?: Transcript.Transcript;
|
|
56
58
|
model: SerializationModel<DataType.Message>;
|
|
57
|
-
// TODO(
|
|
59
|
+
// TODO(burdon): Are these still in use?
|
|
58
60
|
attendableId?: string;
|
|
59
61
|
ignoreAttention?: boolean;
|
|
60
62
|
}>;
|
|
@@ -62,30 +64,21 @@ export type TranscriptProps = ThemedClassName<{
|
|
|
62
64
|
/**
|
|
63
65
|
* Transcript component implemented using the editor.
|
|
64
66
|
*/
|
|
65
|
-
export const
|
|
66
|
-
classNames,
|
|
67
|
-
transcript: object,
|
|
68
|
-
space,
|
|
69
|
-
model,
|
|
70
|
-
attendableId,
|
|
71
|
-
ignoreAttention,
|
|
72
|
-
}: TranscriptProps) => {
|
|
67
|
+
export const TranscriptView = ({ classNames, space, transcript: object, model }: TranscriptViewProps) => {
|
|
73
68
|
const { themeMode } = useThemeContext();
|
|
74
69
|
const { parentRef } = useTextEditor(() => {
|
|
75
70
|
return {
|
|
76
71
|
extensions: [
|
|
77
|
-
createBasicExtensions({ readOnly: true, lineWrapping: true }),
|
|
78
|
-
createMarkdownExtensions(
|
|
72
|
+
createBasicExtensions({ readOnly: true, lineWrapping: true, search: true }),
|
|
73
|
+
createMarkdownExtensions(),
|
|
79
74
|
createThemeExtensions({ themeMode }),
|
|
80
75
|
decorateMarkdown(),
|
|
81
|
-
|
|
76
|
+
preview(),
|
|
82
77
|
transcript({
|
|
83
78
|
model,
|
|
84
79
|
started: object?.started ? new Date(object.started) : undefined,
|
|
85
|
-
renderButton: createRenderer(({ onClick }) => (
|
|
86
|
-
<IconButton icon='ph--arrow-line-down--regular' iconOnly label='Scroll to bottom' onClick={onClick} />
|
|
87
|
-
)),
|
|
88
80
|
}),
|
|
81
|
+
autoScroll(),
|
|
89
82
|
].filter(isNotFalsy),
|
|
90
83
|
};
|
|
91
84
|
}, [space, model]);
|
|
@@ -93,8 +86,8 @@ export const Transcript = ({
|
|
|
93
86
|
return (
|
|
94
87
|
<div
|
|
95
88
|
ref={parentRef}
|
|
96
|
-
className={mx('flex grow overflow-hidden',
|
|
97
|
-
data-popover-collision-boundary={true}
|
|
89
|
+
className={mx('flex grow overflow-hidden container-max-width', classNames)}
|
|
90
|
+
data-popover-collision-boundary={true /* TODO(thure): Make this a constant and document it. */}
|
|
98
91
|
/>
|
|
99
92
|
);
|
|
100
93
|
};
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
import { intervalToDuration } from 'date-fns/intervalToDuration';
|
|
6
6
|
import { Schema } from 'effect';
|
|
7
7
|
import { yieldOrContinue } from 'main-thread-scheduling';
|
|
8
|
-
import React, { type FC, useCallback, useEffect, useMemo, useRef, useState
|
|
8
|
+
import React, { type FC, type WheelEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { type OnResizeCallback, useResizeDetector } from 'react-resize-detector';
|
|
10
10
|
|
|
11
11
|
import { Type } from '@dxos/echo';
|
|
12
12
|
import { IconButton, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
13
13
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
14
14
|
import {
|
|
15
|
+
type DxGridAxisMeta,
|
|
15
16
|
type DxGridCellValue,
|
|
16
17
|
type DxGridElement,
|
|
17
|
-
type DxGridAxisMeta,
|
|
18
18
|
type DxGridPlaneCells,
|
|
19
19
|
Grid,
|
|
20
20
|
toPlaneCellIndex,
|
|
@@ -115,7 +115,7 @@ const measureRows = async (
|
|
|
115
115
|
return result;
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
export type
|
|
118
|
+
export type TranscriptViewProps = ThemedClassName<{
|
|
119
119
|
blocks?: TranscriptBlock[];
|
|
120
120
|
attendableId?: string;
|
|
121
121
|
ignoreAttention?: boolean;
|
|
@@ -124,7 +124,7 @@ export type TranscriptProps = ThemedClassName<{
|
|
|
124
124
|
/**
|
|
125
125
|
* @@deprecated
|
|
126
126
|
*/
|
|
127
|
-
export const Transcript: FC<
|
|
127
|
+
export const Transcript: FC<TranscriptViewProps> = ({ classNames, blocks, attendableId, ignoreAttention }) => {
|
|
128
128
|
const { t } = useTranslation(TRANSCRIPTION_PLUGIN);
|
|
129
129
|
const [dxGrid, setDxGrid] = useState<DxGridElement | null>(null);
|
|
130
130
|
const [rows, setRows] = useState<DxGridAxisMeta | undefined>(undefined);
|