@dxos/plugin-thread 0.8.4-main.67995b8 → 0.8.4-main.ae835ea
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/ChannelContainer-SVV4ZX5T.mjs +16 -0
- package/dist/lib/browser/ChatContainer-ALFWQ65B.mjs +15 -0
- package/dist/lib/browser/{app-graph-builder-N7BE5TYW.mjs → app-graph-builder-ACBXRBOS.mjs} +22 -22
- package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs.map +7 -0
- package/dist/lib/browser/{call-manager-NIPDYUVD.mjs → call-manager-P3MYR2JS.mjs} +7 -7
- package/dist/lib/browser/call-manager-P3MYR2JS.mjs.map +7 -0
- package/dist/lib/browser/chunk-6CUDBEYP.mjs +377 -0
- package/dist/lib/browser/chunk-6CUDBEYP.mjs.map +7 -0
- package/dist/lib/browser/chunk-BBTXGRIR.mjs +18 -0
- package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GERVMFQW.mjs → chunk-CP7E2HRE.mjs} +2 -2
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KWPRNHTK.mjs → chunk-DJOUMWEL.mjs} +242 -238
- package/dist/lib/browser/chunk-DJOUMWEL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ERWASUQK.mjs → chunk-HDEQRBOC.mjs} +38 -6
- package/dist/lib/{node-esm/chunk-25ABSYP2.mjs.map → browser/chunk-HDEQRBOC.mjs.map} +4 -4
- package/dist/lib/browser/chunk-IQSXEHOW.mjs +618 -0
- package/dist/lib/browser/chunk-IQSXEHOW.mjs.map +7 -0
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs +27 -0
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-L6F2AG6W.mjs +23 -0
- package/dist/lib/browser/{chunk-FR7KJPNY.mjs.map → chunk-L6F2AG6W.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-ZE7KWN36.mjs → chunk-US5ZQYC3.mjs} +310 -186
- package/dist/lib/browser/chunk-US5ZQYC3.mjs.map +7 -0
- package/dist/lib/browser/chunk-UTSLSZED.mjs +178 -0
- package/dist/lib/browser/chunk-UTSLSZED.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6NSMBO3B.mjs → chunk-XYUJXHYV.mjs} +55 -5
- package/dist/lib/browser/chunk-XYUJXHYV.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +35 -24
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-JFGLZ6VI.mjs → intent-resolver-5POQTZ24.mjs} +83 -33
- package/dist/lib/browser/intent-resolver-5POQTZ24.mjs.map +7 -0
- package/dist/lib/browser/{markdown-M3FMR7OD.mjs → markdown-L7LDNF56.mjs} +10 -10
- package/dist/lib/browser/markdown-L7LDNF56.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-RCJLK4EP.mjs +28 -0
- package/dist/lib/browser/react-root-RCJLK4EP.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-XWS6GIZY.mjs → react-surface-IC576W2W.mjs} +27 -27
- package/dist/lib/browser/react-surface-IC576W2W.mjs.map +7 -0
- package/dist/lib/browser/{settings-E32MTL7A.mjs → settings-5FYGBOGI.mjs} +5 -5
- package/dist/lib/browser/{settings-E32MTL7A.mjs.map → settings-5FYGBOGI.mjs.map} +1 -1
- package/dist/lib/browser/{state-H6CYONWE.mjs → state-36REWXO5.mjs} +5 -5
- package/dist/lib/browser/state-36REWXO5.mjs.map +7 -0
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs +74 -0
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -9
- package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs +17 -0
- package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs → ChatContainer-MFKPXMIK.mjs} +6 -6
- package/dist/lib/node-esm/{app-graph-builder-VCW76Z6V.mjs → app-graph-builder-JXD7KY3G.mjs} +22 -22
- package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs.map +7 -0
- package/dist/lib/node-esm/{call-manager-D6O5ZJJ4.mjs → call-manager-FCEFP7EJ.mjs} +7 -7
- package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-25ABSYP2.mjs → chunk-2MMJF7DW.mjs} +38 -6
- package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OU5BYIDO.mjs → chunk-2V3WSLUZ.mjs} +55 -5
- package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-57XR3LEF.mjs → chunk-ABUFOZVX.mjs} +2 -2
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs +25 -0
- package/dist/lib/node-esm/{chunk-2CXOK2TD.mjs.map → chunk-AFDO2SUZ.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-IHDNQLLR.mjs → chunk-KGYDYYKJ.mjs} +310 -186
- package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs +378 -0
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs +619 -0
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-C3XFMUAY.mjs → chunk-QCQAAU6J.mjs} +242 -238
- package/dist/lib/node-esm/chunk-QCQAAU6J.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs +179 -0
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs +28 -0
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +19 -0
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +35 -24
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-OXGNQ44Y.mjs → intent-resolver-63NV3XD2.mjs} +83 -33
- package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-INKTE4MH.mjs → markdown-ZQW7MI5U.mjs} +10 -10
- package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs +29 -0
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-MJ33KPYE.mjs → react-surface-O4LGTAZ3.mjs} +27 -27
- package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SJ24YG7M.mjs → settings-EOBQUZSW.mjs} +5 -5
- package/dist/lib/node-esm/{settings-SJ24YG7M.mjs.map → settings-EOBQUZSW.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-D7WNDT3N.mjs → state-X3W67GTL.mjs} +5 -5
- package/dist/lib/node-esm/state-X3W67GTL.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs +75 -0
- package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -9
- package/dist/types/src/ThreadPlugin.d.ts +1 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/types.d.ts +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +4 -2
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
- package/dist/types/src/calls-service.stories.d.ts +10 -9
- package/dist/types/src/calls-service.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts.map +1 -1
- 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 +11 -10
- 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/markdown.d.ts +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +24 -0
- package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
- package/dist/types/src/components/Call/Call.d.ts.map +1 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +2 -2
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/CallDebugPanel.d.ts +7 -0
- package/dist/types/src/components/CallDebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts +2 -2
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +155 -5
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts +158 -5
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +6 -5
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +156 -4
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +2 -2
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +2 -2
- package/dist/types/src/components/Media/VideoObject.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +18 -4
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +4 -1
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +155 -3
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +157 -4
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
- package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/command-extension.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +3 -2
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +2 -0
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +1 -0
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +1 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +74 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +16 -0
- package/dist/types/src/types/Channel.d.ts.map +1 -0
- package/dist/types/src/types/Thread.d.ts +167 -0
- package/dist/types/src/types/Thread.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 +278 -206
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +64 -62
- package/src/ThreadPlugin.tsx +136 -126
- package/src/calls/call-manager.ts +2 -2
- package/src/calls/call-swarm-synchronizer.ts +1 -1
- package/src/calls/media-manager.ts +60 -34
- package/src/calls/types.ts +8 -4
- package/src/calls/util/calls-service.ts +65 -14
- package/src/calls/util/stub-media-streams.ts +62 -5
- package/src/calls-service.stories.tsx +78 -65
- package/src/capabilities/app-graph-builder.ts +24 -18
- package/src/capabilities/call-manager.ts +3 -2
- package/src/capabilities/capabilities.ts +8 -8
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +50 -20
- package/src/capabilities/markdown.ts +4 -3
- package/src/capabilities/react-root.tsx +2 -2
- package/src/capabilities/react-surface.tsx +19 -18
- package/src/capabilities/state.ts +2 -1
- package/src/capabilities/toolkit.ts +85 -0
- package/src/components/Call/Call.tsx +3 -2
- package/src/components/Call/Toolbar.tsx +7 -7
- package/src/components/CallDebugPanel.tsx +108 -49
- package/src/components/CallSidebar.tsx +2 -1
- package/src/components/ChannelContainer.stories.tsx +14 -13
- package/src/components/ChannelContainer.tsx +20 -16
- package/src/components/Chat.stories.tsx +32 -35
- package/src/components/ChatContainer.tsx +33 -20
- package/src/components/Comments.stories.tsx +38 -39
- package/src/components/CommentsContainer.tsx +4 -3
- package/src/components/CommentsThreadContainer.tsx +28 -21
- package/src/components/Lobby/Lobby.tsx +1 -1
- package/src/components/Media/VideoObject.stories.tsx +36 -28
- package/src/components/MessageContainer.tsx +43 -9
- package/src/components/Participant/Participant.tsx +13 -7
- package/src/components/Participant/ParticipantGrid.tsx +2 -1
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +8 -8
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +44 -42
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +2 -2
- package/src/components/ThreadComplementary.tsx +42 -12
- package/src/components/ThreadSettings.tsx +6 -7
- package/src/components/command-extension.ts +5 -2
- package/src/components/testing.ts +25 -3
- package/src/extensions/threads.ts +7 -7
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useBlackCanvasStreamTrack.tsx +27 -0
- package/src/hooks/useDebugMode.ts +1 -1
- package/src/hooks/useVideoStreamTrack.tsx +6 -3
- package/src/meta.ts +9 -5
- package/src/testing/stories.ts +5 -8
- package/src/translations.ts +6 -3
- package/src/types/Channel.ts +27 -0
- package/src/types/Thread.ts +26 -0
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +30 -20
- package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
- package/src/typings.d.ts +8 -0
- package/src/util.ts +1 -1
- package/dist/lib/browser/ChannelContainer-3GIE7ASU.mjs +0 -16
- package/dist/lib/browser/ChatContainer-AIGIWAUG.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-N7BE5TYW.mjs.map +0 -7
- package/dist/lib/browser/call-manager-NIPDYUVD.mjs.map +0 -7
- package/dist/lib/browser/chunk-3SGRT4NM.mjs +0 -367
- package/dist/lib/browser/chunk-3SGRT4NM.mjs.map +0 -7
- package/dist/lib/browser/chunk-6NSMBO3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERWASUQK.mjs.map +0 -7
- package/dist/lib/browser/chunk-EV4JWI7L.mjs +0 -17
- package/dist/lib/browser/chunk-EV4JWI7L.mjs.map +0 -7
- package/dist/lib/browser/chunk-FR7KJPNY.mjs +0 -21
- package/dist/lib/browser/chunk-GCLD5ESP.mjs +0 -137
- package/dist/lib/browser/chunk-GCLD5ESP.mjs.map +0 -7
- package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
- package/dist/lib/browser/chunk-KWPRNHTK.mjs.map +0 -7
- package/dist/lib/browser/chunk-LGSDKXPF.mjs +0 -18
- package/dist/lib/browser/chunk-LGSDKXPF.mjs.map +0 -7
- package/dist/lib/browser/chunk-VUWC4IJM.mjs +0 -479
- package/dist/lib/browser/chunk-VUWC4IJM.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZE7KWN36.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JFGLZ6VI.mjs.map +0 -7
- package/dist/lib/browser/markdown-M3FMR7OD.mjs.map +0 -7
- package/dist/lib/browser/react-root-JEUSQXI6.mjs +0 -28
- package/dist/lib/browser/react-root-JEUSQXI6.mjs.map +0 -7
- package/dist/lib/browser/react-surface-XWS6GIZY.mjs.map +0 -7
- package/dist/lib/browser/state-H6CYONWE.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-7FXCKO7X.mjs +0 -17
- package/dist/lib/node-esm/app-graph-builder-VCW76Z6V.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-D6O5ZJJ4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2CXOK2TD.mjs +0 -23
- package/dist/lib/node-esm/chunk-2MFNK53T.mjs +0 -480
- package/dist/lib/node-esm/chunk-2MFNK53T.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-75RJ5DJI.mjs +0 -19
- package/dist/lib/node-esm/chunk-75RJ5DJI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C3XFMUAY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FLBFYGBK.mjs +0 -368
- package/dist/lib/node-esm/chunk-FLBFYGBK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs +0 -19
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IHDNQLLR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OU5BYIDO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs +0 -138
- package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-OXGNQ44Y.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-INKTE4MH.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-XYYY2JXZ.mjs +0 -29
- package/dist/lib/node-esm/react-root-XYYY2JXZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-MJ33KPYE.mjs.map +0 -7
- package/dist/lib/node-esm/state-D7WNDT3N.mjs.map +0 -7
- package/dist/types/src/types/schema.d.ts +0 -162
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/types/schema.ts +0 -33
- /package/dist/lib/browser/{ChannelContainer-3GIE7ASU.mjs.map → ChannelContainer-SVV4ZX5T.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-AIGIWAUG.mjs.map → ChatContainer-ALFWQ65B.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChannelContainer-7FXCKO7X.mjs.map → ChannelContainer-63GMQ753.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs.map → ChatContainer-MFKPXMIK.mjs.map} +0 -0
|
@@ -9,31 +9,32 @@ import { Obj, type Ref } from '@dxos/echo';
|
|
|
9
9
|
import { SettingsStore } from '@dxos/local-storage';
|
|
10
10
|
import { getSpace } from '@dxos/react-client/echo';
|
|
11
11
|
|
|
12
|
-
import { ThreadCapabilities } from './capabilities';
|
|
13
12
|
import {
|
|
14
|
-
CallSidebar,
|
|
15
13
|
CallDebugPanel,
|
|
14
|
+
CallSidebar,
|
|
16
15
|
ChannelContainer,
|
|
16
|
+
ChatContainer,
|
|
17
17
|
ThreadComplementary,
|
|
18
18
|
ThreadSettings,
|
|
19
|
-
ChatContainer,
|
|
20
19
|
} from '../components';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
20
|
+
import { meta } from '../meta';
|
|
21
|
+
import { Channel, Thread, type ThreadSettingsProps } from '../types';
|
|
22
|
+
|
|
23
|
+
import { ThreadCapabilities } from './capabilities';
|
|
23
24
|
|
|
24
25
|
export default () =>
|
|
25
26
|
contributes(Capabilities.ReactSurface, [
|
|
26
27
|
createSurface({
|
|
27
|
-
id: `${
|
|
28
|
+
id: `${meta.id}/channel`,
|
|
28
29
|
role: 'article',
|
|
29
|
-
filter: (data): data is { subject:
|
|
30
|
+
filter: (data): data is { subject: Channel.Channel } => Obj.instanceOf(Channel.Channel, data.subject),
|
|
30
31
|
component: ({ data: { subject: channel }, role }) => <ChannelContainer channel={channel} role={role} />,
|
|
31
32
|
}),
|
|
32
33
|
createSurface({
|
|
33
|
-
id: `${
|
|
34
|
+
id: `${meta.id}/chat-companion`,
|
|
34
35
|
role: 'article',
|
|
35
|
-
filter: (data): data is { companionTo:
|
|
36
|
-
Obj.instanceOf(
|
|
36
|
+
filter: (data): data is { companionTo: Channel.Channel; subject: 'chat' } =>
|
|
37
|
+
Obj.instanceOf(Channel.Channel, data.companionTo) && data.subject === 'chat',
|
|
37
38
|
component: ({ data: { companionTo: channel } }) => {
|
|
38
39
|
const space = getSpace(channel);
|
|
39
40
|
const thread = channel.defaultThread.target;
|
|
@@ -45,9 +46,9 @@ export default () =>
|
|
|
45
46
|
},
|
|
46
47
|
}),
|
|
47
48
|
createSurface({
|
|
48
|
-
id: `${
|
|
49
|
+
id: `${meta.id}/thread`,
|
|
49
50
|
role: 'article',
|
|
50
|
-
filter: (data): data is { subject:
|
|
51
|
+
filter: (data): data is { subject: Thread.Thread } => Obj.instanceOf(Thread.Thread, data.subject),
|
|
51
52
|
component: ({ data: { subject: thread } }) => {
|
|
52
53
|
const space = getSpace(thread);
|
|
53
54
|
if (!space || !thread) {
|
|
@@ -58,27 +59,27 @@ export default () =>
|
|
|
58
59
|
},
|
|
59
60
|
}),
|
|
60
61
|
createSurface({
|
|
61
|
-
id: `${
|
|
62
|
+
id: `${meta.id}/comments`,
|
|
62
63
|
role: 'article',
|
|
63
|
-
filter: (data): data is { companionTo: { threads: Ref.Ref<
|
|
64
|
+
filter: (data): data is { companionTo: { threads: Ref.Ref<Thread.Thread>[] } } =>
|
|
64
65
|
data.subject === 'comments' && Obj.isObject(data.companionTo),
|
|
65
66
|
// TODO(wittjosiah): This isn't scrolling properly in a plank.
|
|
66
67
|
component: ({ data }) => <ThreadComplementary subject={data.companionTo} />,
|
|
67
68
|
}),
|
|
68
69
|
createSurface({
|
|
69
|
-
id: `${
|
|
70
|
+
id: `${meta.id}/plugin-settings`,
|
|
70
71
|
role: 'article',
|
|
71
72
|
filter: (data): data is { subject: SettingsStore<ThreadSettingsProps> } =>
|
|
72
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
73
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
73
74
|
component: ({ data: { subject } }) => <ThreadSettings settings={subject.value} />,
|
|
74
75
|
}),
|
|
75
76
|
createSurface({
|
|
76
|
-
id: `${
|
|
77
|
+
id: `${meta.id}/assistant`,
|
|
77
78
|
role: 'deck-companion--active-call',
|
|
78
79
|
component: () => <CallSidebar />,
|
|
79
80
|
}),
|
|
80
81
|
createSurface({
|
|
81
|
-
id: `${
|
|
82
|
+
id: `${meta.id}/devtools-overview`,
|
|
82
83
|
role: 'devtools-overview',
|
|
83
84
|
component: () => {
|
|
84
85
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import { contributes } from '@dxos/app-framework';
|
|
6
6
|
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
|
-
import { ThreadCapabilities } from './capabilities';
|
|
9
8
|
import { type ThreadState, type ViewStore } from '../types';
|
|
10
9
|
|
|
10
|
+
import { ThreadCapabilities } from './capabilities';
|
|
11
|
+
|
|
11
12
|
const initialViewState = { showResolvedThreads: false };
|
|
12
13
|
|
|
13
14
|
export default () => {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Tool from '@effect/ai/Tool';
|
|
6
|
+
import * as Toolkit from '@effect/ai/Toolkit';
|
|
7
|
+
import * as Array from 'effect/Array';
|
|
8
|
+
import * as Effect from 'effect/Effect';
|
|
9
|
+
import * as Function from 'effect/Function';
|
|
10
|
+
import * as Schema from 'effect/Schema';
|
|
11
|
+
|
|
12
|
+
import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
13
|
+
import { ArtifactId, computeDiffsWithCursors } from '@dxos/assistant';
|
|
14
|
+
import { type SpaceId } from '@dxos/keys';
|
|
15
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
16
|
+
import { type Markdown } from '@dxos/plugin-markdown/types';
|
|
17
|
+
import { createDocAccessor } from '@dxos/react-client/echo';
|
|
18
|
+
import { trim } from '@dxos/util';
|
|
19
|
+
|
|
20
|
+
import { ThreadAction } from '../types';
|
|
21
|
+
|
|
22
|
+
// TODO(wittjosiah): How to make this work for more than Documents?
|
|
23
|
+
const Toolkit$ = Toolkit.make(
|
|
24
|
+
Tool.make('add-proposals', {
|
|
25
|
+
description: trim`
|
|
26
|
+
Proposes a set of changes to a document.
|
|
27
|
+
`,
|
|
28
|
+
parameters: {
|
|
29
|
+
id: ArtifactId,
|
|
30
|
+
diffs: Schema.Array(Schema.String).annotations({
|
|
31
|
+
description: 'The diffs to propose for the document.',
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
success: Schema.Any,
|
|
35
|
+
failure: Schema.Never,
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export namespace ThreadToolkit {
|
|
40
|
+
export const Toolkit = Toolkit$;
|
|
41
|
+
|
|
42
|
+
export const createLayer = (context: PluginContext) =>
|
|
43
|
+
Toolkit$.toLayer({
|
|
44
|
+
'add-proposals': ({ id, diffs: _diffs }) =>
|
|
45
|
+
Effect.gen(function* () {
|
|
46
|
+
// TODO(wittjosiah): Get capabilities via layers.
|
|
47
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
48
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
49
|
+
const state = context.getCapability(Capabilities.Layout);
|
|
50
|
+
|
|
51
|
+
const dxn = ArtifactId.toDXN(id, state.workspace as SpaceId);
|
|
52
|
+
const echoDxn = dxn.asEchoDXN();
|
|
53
|
+
if (!echoDxn) {
|
|
54
|
+
throw new Error(`Invalid object ID: ${id}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const space = client.spaces.get(echoDxn.spaceId!);
|
|
58
|
+
const object = space?.db.getObjectById<Markdown.Document>(echoDxn.echoId);
|
|
59
|
+
if (!object) {
|
|
60
|
+
throw new Error(`Object not found: ${id}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const content = yield* Effect.promise(() => object.content.load());
|
|
64
|
+
const accessor = createDocAccessor(content, ['content']);
|
|
65
|
+
yield* Function.pipe(
|
|
66
|
+
computeDiffsWithCursors(accessor, _diffs),
|
|
67
|
+
Array.map(({ cursor, text }) =>
|
|
68
|
+
createIntent(ThreadAction.AddProposal, {
|
|
69
|
+
subject: object,
|
|
70
|
+
sender: { role: 'assistant' },
|
|
71
|
+
anchor: cursor,
|
|
72
|
+
text,
|
|
73
|
+
}),
|
|
74
|
+
),
|
|
75
|
+
Array.map(dispatch),
|
|
76
|
+
Effect.allWith({ concurrency: 'unbounded' }),
|
|
77
|
+
);
|
|
78
|
+
}).pipe(Effect.orDie),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export default (context: PluginContext) => [
|
|
83
|
+
contributes(Capabilities.Toolkit, ThreadToolkit.Toolkit),
|
|
84
|
+
contributes(Capabilities.ToolkitHandler, ThreadToolkit.createLayer(context)),
|
|
85
|
+
];
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { type
|
|
5
|
+
import React, { type FC, type PropsWithChildren } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useCapability } from '@dxos/app-framework';
|
|
8
8
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
|
-
import { Toolbar, type ToolbarProps } from './Toolbar';
|
|
11
10
|
import { ThreadCapabilities } from '../../capabilities';
|
|
12
11
|
import { useDebugMode } from '../../hooks';
|
|
13
12
|
import { AudioStream } from '../Media';
|
|
14
13
|
import { ParticipantGrid } from '../Participant';
|
|
15
14
|
|
|
15
|
+
import { Toolbar, type ToolbarProps } from './Toolbar';
|
|
16
|
+
|
|
16
17
|
//
|
|
17
18
|
// Root
|
|
18
19
|
//
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { useActions, useNode } from '@dxos/plugin-graph';
|
|
9
9
|
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
10
|
import {
|
|
11
11
|
Icon,
|
|
12
12
|
IconButton,
|
|
13
13
|
type IconButtonProps,
|
|
14
|
+
Toolbar as NaturalToolbar,
|
|
14
15
|
type ThemedClassName,
|
|
15
|
-
Toolbar as NativeToolbar,
|
|
16
16
|
toLocalizedString,
|
|
17
17
|
useTranslation,
|
|
18
18
|
} from '@dxos/react-ui';
|
|
@@ -20,10 +20,10 @@ import { groupHoverControlItemWithTransition, mx } from '@dxos/react-ui-theme';
|
|
|
20
20
|
|
|
21
21
|
import { ThreadCapabilities } from '../../capabilities';
|
|
22
22
|
import { meta } from '../../meta';
|
|
23
|
-
import { type
|
|
23
|
+
import { type Channel } from '../../types';
|
|
24
24
|
|
|
25
25
|
export type ToolbarProps = ThemedClassName<{
|
|
26
|
-
channel?:
|
|
26
|
+
channel?: Channel.Channel;
|
|
27
27
|
participants?: number;
|
|
28
28
|
autoHideControls?: boolean;
|
|
29
29
|
isInRoom?: boolean;
|
|
@@ -56,7 +56,7 @@ export const Toolbar = ({
|
|
|
56
56
|
// TODO(wittjosiah): In order to use toolbar, need to update to actually use the graph action callbacks directly.
|
|
57
57
|
return (
|
|
58
58
|
<div className={mx('z-20 flex justify-center m-8', autoHideControls && groupHoverControlItemWithTransition)}>
|
|
59
|
-
<
|
|
59
|
+
<NaturalToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', classNames]}>
|
|
60
60
|
<ToggleButton
|
|
61
61
|
active={call.media.audioEnabled}
|
|
62
62
|
state={{
|
|
@@ -95,7 +95,7 @@ export const Toolbar = ({
|
|
|
95
95
|
<Icon icon='ph--users--regular' size={4} />
|
|
96
96
|
<div>{participants}</div>
|
|
97
97
|
</div>
|
|
98
|
-
)) || <
|
|
98
|
+
)) || <NaturalToolbar.Separator variant='gap' />}
|
|
99
99
|
|
|
100
100
|
{call.joined && (
|
|
101
101
|
<>
|
|
@@ -151,7 +151,7 @@ export const Toolbar = ({
|
|
|
151
151
|
) : (
|
|
152
152
|
<IconButton variant='primary' icon='ph--phone-incoming--regular' label={t('join call')} onClick={onJoin} />
|
|
153
153
|
)}
|
|
154
|
-
</
|
|
154
|
+
</NaturalToolbar.Root>
|
|
155
155
|
</div>
|
|
156
156
|
);
|
|
157
157
|
};
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { WebRTCStats } from '@peermetrics/webrtc-stats';
|
|
5
|
+
import { WebRTCStats, type WebRTCStatsEvent } from '@peermetrics/webrtc-stats';
|
|
6
6
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { truncateKey } from '@dxos/debug';
|
|
9
|
+
import { JsonView, Panel } from '@dxos/devtools';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
|
-
import {
|
|
11
|
-
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
11
|
+
import { IconButton, Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
|
|
13
|
-
import { type GlobalState } from '../calls';
|
|
13
|
+
import { type EncodedTrackName, type GlobalState } from '../calls';
|
|
14
14
|
import { meta } from '../meta';
|
|
15
15
|
|
|
16
16
|
export type CallDebugPanelProps = ThemedClassName<{
|
|
@@ -19,11 +19,16 @@ export type CallDebugPanelProps = ThemedClassName<{
|
|
|
19
19
|
|
|
20
20
|
export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
21
21
|
const { t } = useTranslation(meta.id);
|
|
22
|
-
const users = state?.call?.users;
|
|
23
|
-
const self = state?.call?.self;
|
|
24
22
|
|
|
25
23
|
const [open, setOpen] = useState(false);
|
|
26
24
|
const handleToggle = () => setOpen(!open);
|
|
25
|
+
const [showServiceHistory, setShowServiceHistory] = useState(false);
|
|
26
|
+
const handleToggleServiceHistory = () => setShowServiceHistory(!showServiceHistory);
|
|
27
|
+
|
|
28
|
+
const handleCopyRaw = async () => {
|
|
29
|
+
await navigator.clipboard.writeText(JSON.stringify({ users: state?.call?.users, stats }, null, 2));
|
|
30
|
+
};
|
|
31
|
+
|
|
27
32
|
const [showDetailedWebRTCStats, setShowDetailedWebRTCStats] = useState(false);
|
|
28
33
|
const handleShowDetailedWebRTCStats = () => setShowDetailedWebRTCStats(!showDetailedWebRTCStats);
|
|
29
34
|
|
|
@@ -34,22 +39,24 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
|
34
39
|
}),
|
|
35
40
|
[],
|
|
36
41
|
);
|
|
42
|
+
const [stats, setStats] = useState<WebRTCStatsEvent['data']>();
|
|
37
43
|
|
|
38
|
-
const [stats, setStats] = useState<Record<string, any>>({});
|
|
39
44
|
useEffect(() => {
|
|
40
45
|
const pc = state?.media.peer?.session?.peerConnection;
|
|
41
|
-
const handleStats = (stats:
|
|
46
|
+
const handleStats = (stats: WebRTCStatsEvent) => {
|
|
47
|
+
setStats(stats.data);
|
|
48
|
+
};
|
|
42
49
|
let added = false;
|
|
43
50
|
if (pc && showDetailedWebRTCStats) {
|
|
44
51
|
webrtcStats.addConnection({ pc, peerId: 1, connectionId: '1' });
|
|
45
|
-
webrtcStats.on('stats', handleStats);
|
|
52
|
+
webrtcStats.on('stats', handleStats as never);
|
|
46
53
|
added = true;
|
|
47
54
|
}
|
|
48
55
|
return () => {
|
|
49
56
|
try {
|
|
50
57
|
if (pc && added) {
|
|
51
58
|
webrtcStats.removeConnection({ pc });
|
|
52
|
-
webrtcStats.removeListener('stats', handleStats);
|
|
59
|
+
webrtcStats.removeListener('stats', handleStats as never);
|
|
53
60
|
}
|
|
54
61
|
} catch (error) {
|
|
55
62
|
log.error('error removing webrtc stats', { error, pc, peerId: 1, connectionId: '1' });
|
|
@@ -57,6 +64,8 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
|
57
64
|
};
|
|
58
65
|
}, [state?.media.peer?.session?.peerConnection, showDetailedWebRTCStats]);
|
|
59
66
|
|
|
67
|
+
const rows = useMemo(() => getCallStatusTable(state), [state?.call.users, state?.media.pulledAudioTracks]);
|
|
68
|
+
|
|
60
69
|
return (
|
|
61
70
|
<Panel
|
|
62
71
|
id='meeting-status'
|
|
@@ -65,51 +74,101 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
|
65
74
|
onToggle={handleToggle}
|
|
66
75
|
title={t('meeting status title')}
|
|
67
76
|
maxHeight={false}
|
|
68
|
-
info={
|
|
69
|
-
<div className='flex items-center gap-2'>
|
|
70
|
-
<span title='Joined'>{self?.joined ? 'Active' : 'Inactive'}</span>
|
|
71
|
-
{users?.length !== undefined && <span title='Users'>{users?.length ?? 0} User(s)</span>}
|
|
72
|
-
</div>
|
|
73
|
-
}
|
|
77
|
+
info={<div className='flex items-center gap-2'> {state?.call.joined ? 'Active' : 'Inactive'}</div>}
|
|
74
78
|
>
|
|
75
|
-
<div className='flex flex-col gap-2
|
|
76
|
-
<div className='flex items-
|
|
79
|
+
<div className='flex flex-col w-full gap-2 text-xs'>
|
|
80
|
+
<div className='flex items-center gap-2'>
|
|
77
81
|
<Input.Root>
|
|
78
82
|
<Input.Label classNames={'text-sm'}>{t('show webrtc stats title')}</Input.Label>
|
|
79
83
|
<Input.Checkbox checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
|
|
80
84
|
</Input.Root>
|
|
81
85
|
</div>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
: {}),
|
|
96
|
-
tracks: state?.media.peer?.session?.peerConnection.getTransceivers().map((transceiver) => {
|
|
97
|
-
const track =
|
|
98
|
-
transceiver.direction === 'recvonly' ? transceiver.receiver.track : transceiver.sender.track;
|
|
99
|
-
return {
|
|
100
|
-
id: track?.id,
|
|
101
|
-
kind: track?.kind,
|
|
102
|
-
direction: transceiver.direction,
|
|
103
|
-
enabled: track?.enabled,
|
|
104
|
-
muted: track?.muted,
|
|
105
|
-
readyState: track?.readyState,
|
|
106
|
-
settings: track?.getSettings(),
|
|
107
|
-
};
|
|
108
|
-
}),
|
|
109
|
-
callsServiceHistory: state?.media.peer?.history.get(),
|
|
110
|
-
}}
|
|
111
|
-
/>
|
|
86
|
+
<div className='flex items-center gap-2'>
|
|
87
|
+
<Input.Root>
|
|
88
|
+
<Input.Label classNames={'text-sm'}>{t('show calls history title')}</Input.Label>
|
|
89
|
+
<Input.Checkbox checked={showServiceHistory} onCheckedChange={handleToggleServiceHistory} />
|
|
90
|
+
</Input.Root>
|
|
91
|
+
</div>
|
|
92
|
+
<div className='flex items-center gap-2'>
|
|
93
|
+
<IconButton classNames={'text-sm'} icon='ph--copy--regular' label={'copy raw'} onClick={handleCopyRaw} />
|
|
94
|
+
</div>
|
|
95
|
+
<Table rows={rows} />
|
|
96
|
+
{showDetailedWebRTCStats && <JsonView data={{ stats }} />}
|
|
97
|
+
{showServiceHistory && <JsonView data={{ history: state?.media.peer?.history.get() }} />}
|
|
112
98
|
</div>
|
|
113
99
|
</Panel>
|
|
114
100
|
);
|
|
115
101
|
};
|
|
102
|
+
|
|
103
|
+
const getCallStatusTable = (state?: GlobalState): TableProps['rows'] => {
|
|
104
|
+
if (!state || !state.call?.users) {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const self = state.call.self;
|
|
109
|
+
const users = state.call.users
|
|
110
|
+
.filter((user) => user.id !== self!.id)
|
|
111
|
+
.map((user) => {
|
|
112
|
+
const isOk = {
|
|
113
|
+
audio:
|
|
114
|
+
user.tracks?.audio &&
|
|
115
|
+
state.media.pulledAudioTracks[user.tracks?.audio as EncodedTrackName]?.ctx.disposed === false,
|
|
116
|
+
video:
|
|
117
|
+
user.tracks?.video &&
|
|
118
|
+
state.media.pulledVideoStreams[user.tracks?.video as EncodedTrackName]?.ctx.disposed === false,
|
|
119
|
+
screenshare:
|
|
120
|
+
user.tracks?.screenshare &&
|
|
121
|
+
state.media.pulledVideoStreams[user.tracks?.screenshare as EncodedTrackName]?.ctx.disposed === false,
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
...user,
|
|
126
|
+
isOk,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
return [
|
|
131
|
+
['users', state.call.users.length ?? 0],
|
|
132
|
+
[
|
|
133
|
+
'*self* ' + (self?.name ?? truncateKey(self!.id, 8)),
|
|
134
|
+
self?.tracks?.audio && state.media.pushedAudioTrack ? 'AUD ✅' : 'AUD ❌',
|
|
135
|
+
self?.tracks?.video && state.media.pushedVideoTrack ? 'VID ✅' : 'VID ❌',
|
|
136
|
+
self?.tracks?.screenshareEnabled
|
|
137
|
+
? self.tracks.screenshareEnabled && state.media.pushedScreenshareTrack
|
|
138
|
+
? 'SCR ✅'
|
|
139
|
+
: 'SCR ❌'
|
|
140
|
+
: undefined,
|
|
141
|
+
],
|
|
142
|
+
|
|
143
|
+
...users.map((user) => [
|
|
144
|
+
user.name ?? truncateKey(user.id, 8),
|
|
145
|
+
user.isOk.audio ? 'AUD ✅' : 'AUD ❌',
|
|
146
|
+
user.isOk.video ? 'VID ✅' : 'VID ❌',
|
|
147
|
+
user.tracks?.screenshareEnabled ? (user.isOk.screenshare ? 'SCR ✅' : 'SCR ❌') : undefined,
|
|
148
|
+
]),
|
|
149
|
+
['ICE', state.media.peer?.session?.peerConnection.iceConnectionState ?? 'no connection'],
|
|
150
|
+
];
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export namespace Unit {
|
|
154
|
+
export const KB = (n?: number) => ((n ?? 0) / 1_000).toFixed(2);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type TableProps = {
|
|
158
|
+
rows: (string | number | undefined)[][];
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const Table = ({ rows }: TableProps) => {
|
|
162
|
+
return (
|
|
163
|
+
<div className='w-full text-xs font-mono'>
|
|
164
|
+
{rows.map(([prefix, label, value, unit], i) => (
|
|
165
|
+
<div key={i} className='grid grid-cols-[3fr_1fr_1fr_1fr]'>
|
|
166
|
+
<div className='p-1'>{prefix}</div>
|
|
167
|
+
<div className='p-1'>{label}</div>
|
|
168
|
+
<div className='p-1'>{value}</div>
|
|
169
|
+
<div className='p-1'>{unit}</div>
|
|
170
|
+
</div>
|
|
171
|
+
))}
|
|
172
|
+
</div>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
@@ -6,9 +6,10 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { useCapability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import { ChannelContainer } from './ChannelContainer';
|
|
10
9
|
import { ThreadCapabilities } from '../capabilities';
|
|
11
10
|
|
|
11
|
+
import { ChannelContainer } from './ChannelContainer';
|
|
12
|
+
|
|
12
13
|
export const CallSidebar = () => {
|
|
13
14
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
14
15
|
return <ChannelContainer roomId={call.roomId} />;
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -11,18 +9,20 @@ import { contributes } from '@dxos/app-framework';
|
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
10
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
11
|
import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
14
13
|
import { DataType } from '@dxos/schema';
|
|
15
|
-
import {
|
|
14
|
+
import { render } from '@dxos/storybook-utils';
|
|
16
15
|
|
|
17
|
-
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
18
16
|
import { createThreadPlugins } from '../testing';
|
|
19
17
|
import { translations } from '../translations';
|
|
20
|
-
import {
|
|
18
|
+
import { Channel, Thread } from '../types';
|
|
19
|
+
|
|
20
|
+
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
21
21
|
|
|
22
22
|
// TODO(wittjosiah): Channel doesn't render full height.
|
|
23
|
-
const
|
|
23
|
+
const DefaultStory = ({ roomId }: ChannelContainerProps) => {
|
|
24
24
|
const space = useSpace();
|
|
25
|
-
const [channel] = useQuery(space, Query.type(
|
|
25
|
+
const [channel] = useQuery(space, Query.type(Channel.Channel));
|
|
26
26
|
if (!channel) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
@@ -30,25 +30,26 @@ const Story = ({ roomId }: ChannelContainerProps) => {
|
|
|
30
30
|
return <ChannelContainer channel={channel} roomId={roomId} />;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const meta
|
|
33
|
+
const meta = {
|
|
34
34
|
title: 'plugins/plugin-thread/ChannelContainer',
|
|
35
35
|
component: ChannelContainer,
|
|
36
|
-
render: (
|
|
36
|
+
render: render(DefaultStory),
|
|
37
37
|
decorators: [
|
|
38
|
+
withTheme,
|
|
39
|
+
withLayout({ container: 'column' }),
|
|
38
40
|
withPluginManager({
|
|
39
41
|
plugins: [...(await createThreadPlugins())],
|
|
40
|
-
capabilities: [contributes(ClientCapabilities.Schema, [
|
|
42
|
+
capabilities: [contributes(ClientCapabilities.Schema, [Channel.Channel, Thread.Thread, DataType.Message])],
|
|
41
43
|
}),
|
|
42
|
-
withLayout({ Container: ColumnContainer, classNames: 'w-[40rem] overflow-hidden' }),
|
|
43
44
|
],
|
|
44
45
|
parameters: {
|
|
45
46
|
translations,
|
|
46
47
|
},
|
|
47
|
-
}
|
|
48
|
+
} satisfies Meta<typeof ChannelContainer>;
|
|
48
49
|
|
|
49
50
|
export default meta;
|
|
50
51
|
|
|
51
|
-
type Story = StoryObj<
|
|
52
|
+
type Story = StoryObj<typeof meta>;
|
|
52
53
|
|
|
53
54
|
export const Default: Story = {
|
|
54
55
|
args: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import React, { useCallback, useEffect, useMemo, useState
|
|
6
|
+
import React, { type ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { useCapabilities, useCapability } from '@dxos/app-framework';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
@@ -12,20 +12,23 @@ import { log } from '@dxos/log';
|
|
|
12
12
|
import { useClient } from '@dxos/react-client';
|
|
13
13
|
import { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
|
|
14
14
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
15
|
-
import {
|
|
16
|
-
import { ControlGroup,
|
|
17
|
-
import {
|
|
15
|
+
import { ElevationProvider, Input, useTranslation } from '@dxos/react-ui';
|
|
16
|
+
import { ControlGroup, ControlGroupButton, ControlItemInput } from '@dxos/react-ui-form';
|
|
17
|
+
import { MenuProvider, ToolbarMenu, createMenuAction, createMenuItemGroup, useMenuActions } from '@dxos/react-ui-menu';
|
|
18
18
|
import { useSoundEffect } from '@dxos/react-ui-sfx';
|
|
19
19
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
20
20
|
|
|
21
|
-
import { Call } from './Call';
|
|
22
|
-
import ChatContainer from './ChatContainer';
|
|
23
21
|
import { ThreadCapabilities } from '../capabilities';
|
|
24
22
|
import { meta } from '../meta';
|
|
25
|
-
import { type
|
|
23
|
+
import { type Channel } from '../types';
|
|
24
|
+
|
|
25
|
+
import { Call } from './Call';
|
|
26
|
+
import ChatContainer from './ChatContainer';
|
|
27
|
+
|
|
28
|
+
// TODO(burdon): Create Radix style layout.
|
|
26
29
|
|
|
27
30
|
export type ChannelContainerProps = {
|
|
28
|
-
channel?:
|
|
31
|
+
channel?: Channel.Channel;
|
|
29
32
|
roomId?: string;
|
|
30
33
|
role?: string;
|
|
31
34
|
fullscreen?: boolean;
|
|
@@ -37,7 +40,8 @@ export type ChannelContainerProps = {
|
|
|
37
40
|
export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }: ChannelContainerProps) => {
|
|
38
41
|
const space = getSpace(channel);
|
|
39
42
|
const callManager = useCapability(ThreadCapabilities.CallManager);
|
|
40
|
-
const
|
|
43
|
+
const attendableId = fullyQualifiedId(channel);
|
|
44
|
+
const roomId = _roomId ?? (channel ? attendableId : failUndefined());
|
|
41
45
|
const identity = useIdentity();
|
|
42
46
|
const isNamed = !!identity?.profile?.displayName;
|
|
43
47
|
const joinSound = useSoundEffect('JoinCall');
|
|
@@ -113,7 +117,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
|
|
|
113
117
|
const isJoined = callManager.joined && callManager.roomId === roomId;
|
|
114
118
|
|
|
115
119
|
return (
|
|
116
|
-
<StackItem.Content
|
|
120
|
+
<StackItem.Content classNames={isJoined && 'bs-full'} toolbar={!isJoined}>
|
|
117
121
|
{isJoined && !isNamed && <DisplayNameMissing />}
|
|
118
122
|
{isJoined && isNamed && (
|
|
119
123
|
<Call.Root>
|
|
@@ -123,8 +127,8 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
|
|
|
123
127
|
)}
|
|
124
128
|
{!isJoined && channel && channel.defaultThread.target && space && (
|
|
125
129
|
<>
|
|
126
|
-
<ChannelToolbar attendableId={
|
|
127
|
-
<ChatContainer space={space} thread={channel.defaultThread.target} />
|
|
130
|
+
<ChannelToolbar attendableId={attendableId} role={role} onJoinCall={handleJoin} />
|
|
131
|
+
<ChatContainer space={space} thread={channel.defaultThread.target} classNames='container-max-width' />
|
|
128
132
|
</>
|
|
129
133
|
)}
|
|
130
134
|
</StackItem.Content>
|
|
@@ -181,19 +185,19 @@ const useChannelToolbarActions = (onJoinCall?: () => void) => {
|
|
|
181
185
|
return useMenuActions(creator);
|
|
182
186
|
};
|
|
183
187
|
|
|
184
|
-
type ChannelToolbarProps =
|
|
188
|
+
type ChannelToolbarProps = {
|
|
185
189
|
attendableId?: string;
|
|
186
190
|
role?: string;
|
|
187
191
|
onJoinCall?: () => void;
|
|
188
|
-
}
|
|
192
|
+
};
|
|
189
193
|
|
|
190
|
-
const ChannelToolbar = ({ attendableId, role, onJoinCall
|
|
194
|
+
const ChannelToolbar = ({ attendableId, role, onJoinCall }: ChannelToolbarProps) => {
|
|
191
195
|
const menuProps = useChannelToolbarActions(onJoinCall);
|
|
192
196
|
|
|
193
197
|
return (
|
|
194
198
|
<ElevationProvider elevation={role === 'section' ? 'positioned' : 'base'}>
|
|
195
199
|
<MenuProvider {...menuProps} attendableId={attendableId}>
|
|
196
|
-
<ToolbarMenu
|
|
200
|
+
<ToolbarMenu textBlockWidth />
|
|
197
201
|
</MenuProvider>
|
|
198
202
|
</ElevationProvider>
|
|
199
203
|
);
|