@dxos/plugin-thread 0.8.4-main.2e9d522 → 0.8.4-main.548089c
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-56QROCE4.mjs +16 -0
- package/dist/lib/browser/ChatContainer-7F5Y6GXJ.mjs +15 -0
- package/dist/lib/browser/{app-graph-builder-N7BE5TYW.mjs → app-graph-builder-USFBLGFG.mjs} +30 -31
- package/dist/lib/browser/app-graph-builder-USFBLGFG.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-6BKYTMJS.mjs +104 -0
- package/dist/lib/browser/blueprint-definition-6BKYTMJS.mjs.map +7 -0
- package/dist/lib/browser/{call-manager-NIPDYUVD.mjs → call-manager-MAXQLMMS.mjs} +7 -7
- package/dist/lib/browser/call-manager-MAXQLMMS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KWPRNHTK.mjs → chunk-44S2SB4N.mjs} +250 -245
- package/dist/lib/browser/chunk-44S2SB4N.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-FR6MEAZI.mjs +377 -0
- package/dist/lib/browser/chunk-FR6MEAZI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6NSMBO3B.mjs → chunk-ISCHODBV.mjs} +55 -5
- package/dist/lib/browser/chunk-ISCHODBV.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-ERWASUQK.mjs → chunk-KOBXMDCI.mjs} +74 -41
- package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +7 -0
- package/dist/lib/browser/chunk-NMJEVD36.mjs +168 -0
- package/dist/lib/browser/chunk-NMJEVD36.mjs.map +7 -0
- package/dist/lib/browser/chunk-NSREO7OX.mjs +23 -0
- package/dist/lib/browser/chunk-NSREO7OX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZE7KWN36.mjs → chunk-ZCW3NSDZ.mjs} +310 -186
- package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZO5ZGDN5.mjs +617 -0
- package/dist/lib/browser/chunk-ZO5ZGDN5.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +47 -37
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-JFGLZ6VI.mjs → intent-resolver-BOUT4WGY.mjs} +33 -41
- package/dist/lib/browser/intent-resolver-BOUT4WGY.mjs.map +7 -0
- package/dist/lib/browser/{markdown-GEXBVJYN.mjs → markdown-74EUSQGV.mjs} +24 -22
- package/dist/lib/browser/markdown-74EUSQGV.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-2VRIT2HF.mjs +28 -0
- package/dist/lib/browser/react-root-2VRIT2HF.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-YCYEFBPM.mjs → react-surface-UOECBYHE.mjs} +29 -28
- package/dist/lib/browser/react-surface-UOECBYHE.mjs.map +7 -0
- package/dist/lib/browser/{settings-E32MTL7A.mjs → settings-LGQUZITB.mjs} +5 -5
- package/dist/lib/browser/{settings-E32MTL7A.mjs.map → settings-LGQUZITB.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/types/index.mjs +7 -9
- package/dist/lib/node-esm/ChannelContainer-4SV22AKC.mjs +17 -0
- package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs → ChatContainer-C526R4DI.mjs} +6 -6
- package/dist/lib/node-esm/{app-graph-builder-VCW76Z6V.mjs → app-graph-builder-DWYGNENL.mjs} +30 -31
- package/dist/lib/node-esm/app-graph-builder-DWYGNENL.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-6LEAWSC7.mjs +105 -0
- package/dist/lib/node-esm/blueprint-definition-6LEAWSC7.mjs.map +7 -0
- package/dist/lib/node-esm/{call-manager-D6O5ZJJ4.mjs → call-manager-LC4OS2KD.mjs} +7 -7
- package/dist/lib/node-esm/call-manager-LC4OS2KD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IHDNQLLR.mjs → chunk-7KZWZS2U.mjs} +310 -186
- package/dist/lib/node-esm/chunk-7KZWZS2U.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-KE6SKBPO.mjs +618 -0
- package/dist/lib/node-esm/chunk-KE6SKBPO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-C3XFMUAY.mjs → chunk-NEGIPZTJ.mjs} +250 -245
- package/dist/lib/node-esm/chunk-NEGIPZTJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-25ABSYP2.mjs → chunk-PZH2EDU5.mjs} +74 -41
- package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TJKM5JZT.mjs +169 -0
- package/dist/lib/node-esm/chunk-TJKM5JZT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TWKGDFCS.mjs +378 -0
- package/dist/lib/node-esm/chunk-TWKGDFCS.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OU5BYIDO.mjs → chunk-VBI32FGI.mjs} +55 -5
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VM6WD3YY.mjs +25 -0
- package/dist/lib/node-esm/chunk-VM6WD3YY.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 +47 -37
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-OXGNQ44Y.mjs → intent-resolver-45PLIFCJ.mjs} +33 -41
- package/dist/lib/node-esm/intent-resolver-45PLIFCJ.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-LIJZDK2J.mjs → markdown-566XXB55.mjs} +24 -22
- package/dist/lib/node-esm/markdown-566XXB55.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-root-JAE2VI2D.mjs +29 -0
- package/dist/lib/node-esm/react-root-JAE2VI2D.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-IRSEKM42.mjs → react-surface-BYKXK5YA.mjs} +29 -28
- package/dist/lib/node-esm/react-surface-BYKXK5YA.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SJ24YG7M.mjs → settings-WKLJSP6R.mjs} +5 -5
- package/dist/lib/node-esm/{settings-SJ24YG7M.mjs.map → settings-WKLJSP6R.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/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/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- 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/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 +2 -2
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +9 -9
- 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 +6 -3
- 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 +2 -2
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/functions/create-proposals.d.ts +6 -0
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/hooks/analytics.d.ts +2 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/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 +207 -208
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +67 -59
- package/src/ThreadPlugin.tsx +141 -127
- package/src/calls/call-manager.ts +2 -2
- package/src/calls/call-swarm-synchronizer.ts +1 -1
- package/src/calls/media-manager.ts +66 -37
- package/src/calls/types.ts +8 -4
- package/src/calls/util/calls-service.ts +65 -14
- package/src/calls/util/stub-media-streams.ts +64 -7
- package/src/calls-service.stories.tsx +78 -65
- package/src/capabilities/app-graph-builder.ts +45 -31
- package/src/capabilities/blueprint-definition.ts +38 -0
- 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 +25 -28
- package/src/capabilities/markdown.ts +9 -6
- package/src/capabilities/react-root.tsx +2 -2
- package/src/capabilities/react-surface.tsx +21 -19
- package/src/capabilities/state.ts +2 -1
- package/src/components/Call/Call.tsx +4 -3
- package/src/components/Call/Toolbar.tsx +10 -10
- package/src/components/CallDebugPanel.tsx +108 -49
- package/src/components/CallSidebar.tsx +3 -2
- package/src/components/ChannelContainer.stories.tsx +15 -14
- package/src/components/ChannelContainer.tsx +25 -20
- package/src/components/Chat.stories.tsx +33 -36
- package/src/components/ChatContainer.tsx +36 -23
- package/src/components/Comments.stories.tsx +40 -41
- package/src/components/CommentsContainer.tsx +8 -8
- package/src/components/CommentsThreadContainer.tsx +40 -33
- package/src/components/Lobby/Lobby.tsx +2 -2
- package/src/components/Media/VideoObject.stories.tsx +36 -28
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessageContainer.tsx +48 -14
- package/src/components/Participant/Participant.tsx +14 -8
- package/src/components/Participant/ParticipantGrid.tsx +2 -1
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +8 -8
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +2 -2
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +45 -43
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +5 -5
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +7 -4
- package/src/components/ThreadComplementary.tsx +71 -34
- package/src/components/ThreadSettings.tsx +6 -7
- package/src/components/command-extension.ts +5 -2
- package/src/components/testing.ts +27 -5
- package/src/extensions/threads.ts +29 -20
- package/src/functions/create-proposals.ts +58 -0
- package/src/functions/index.ts +5 -0
- package/src/hooks/analytics.ts +4 -7
- package/src/hooks/index.ts +3 -1
- 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 +29 -28
- 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-IY2UIRLF.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-4OYAYON2.mjs +0 -21
- package/dist/lib/browser/chunk-4OYAYON2.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-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-XLPJXUKO.mjs +0 -367
- package/dist/lib/browser/chunk-XLPJXUKO.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-GEXBVJYN.mjs.map +0 -7
- package/dist/lib/browser/react-root-X4UIVGTX.mjs +0 -28
- package/dist/lib/browser/react-root-X4UIVGTX.mjs.map +0 -7
- package/dist/lib/browser/react-surface-YCYEFBPM.mjs.map +0 -7
- package/dist/lib/browser/state-H6CYONWE.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-DET6T5N2.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-25ABSYP2.mjs.map +0 -7
- 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-GRLRWTRU.mjs +0 -19
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GW37AAM4.mjs +0 -23
- package/dist/lib/node-esm/chunk-GW37AAM4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IHDNQLLR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J4NSON5Q.mjs +0 -368
- package/dist/lib/node-esm/chunk-J4NSON5Q.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-LIJZDK2J.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-M7J6PZVW.mjs +0 -29
- package/dist/lib/node-esm/react-root-M7J6PZVW.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-IRSEKM42.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-IY2UIRLF.mjs.map → ChannelContainer-56QROCE4.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-AIGIWAUG.mjs.map → ChatContainer-7F5Y6GXJ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChannelContainer-DET6T5N2.mjs.map → ChannelContainer-4SV22AKC.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs.map → ChatContainer-C526R4DI.mjs.map} +0 -0
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import { EditorView } from '@codemirror/view';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createIntent
|
|
7
|
+
import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
8
9
|
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
9
10
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
10
|
-
import {
|
|
11
|
-
import { commentClickedEffect, commentsState, type EditorState, overlap } from '@dxos/react-ui-editor';
|
|
11
|
+
import { type EditorState, commentClickedEffect, commentsState, overlap } from '@dxos/react-ui-editor';
|
|
12
12
|
|
|
13
|
-
import { ThreadCapabilities } from './capabilities';
|
|
14
13
|
import { threads } from '../extensions';
|
|
15
14
|
|
|
15
|
+
import { ThreadCapabilities } from './capabilities';
|
|
16
|
+
|
|
16
17
|
export default (context: PluginContext) =>
|
|
17
18
|
contributes(MarkdownCapabilities.Extensions, [
|
|
18
19
|
({ document: doc }) => {
|
|
@@ -21,17 +22,19 @@ export default (context: PluginContext) =>
|
|
|
21
22
|
return threads(state, doc, dispatch);
|
|
22
23
|
},
|
|
23
24
|
({ document: doc }) => {
|
|
25
|
+
if (!doc) return [];
|
|
24
26
|
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
25
27
|
|
|
26
28
|
return EditorView.updateListener.of((update) => {
|
|
27
29
|
if (update.docChanged || update.selectionSet) {
|
|
28
|
-
state.toolbar[
|
|
30
|
+
state.toolbar[Obj.getDXN(doc).toString()] = selectionOverlapsComment(update.state);
|
|
29
31
|
}
|
|
30
32
|
});
|
|
31
33
|
},
|
|
32
34
|
({ document: doc }) => {
|
|
35
|
+
if (!doc) return [];
|
|
33
36
|
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
34
|
-
const id =
|
|
37
|
+
const id = Obj.getDXN(doc).toString();
|
|
35
38
|
|
|
36
39
|
return EditorView.updateListener.of((update) => {
|
|
37
40
|
update.transactions.forEach((transaction) => {
|
|
@@ -7,11 +7,11 @@ import React from 'react';
|
|
|
7
7
|
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
9
|
import { Call } from '../components';
|
|
10
|
-
import {
|
|
10
|
+
import { meta } from '../meta';
|
|
11
11
|
|
|
12
12
|
export default () => {
|
|
13
13
|
return contributes(Capabilities.ReactRoot, {
|
|
14
|
-
id:
|
|
14
|
+
id: meta.id,
|
|
15
15
|
root: () => <Call.Audio />,
|
|
16
16
|
});
|
|
17
17
|
};
|
|
@@ -4,36 +4,38 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createSurface
|
|
7
|
+
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
import { Obj, type Ref } from '@dxos/echo';
|
|
9
10
|
import { SettingsStore } from '@dxos/local-storage';
|
|
10
11
|
import { getSpace } from '@dxos/react-client/echo';
|
|
11
12
|
|
|
12
|
-
import { ThreadCapabilities } from './capabilities';
|
|
13
13
|
import {
|
|
14
|
-
CallSidebar,
|
|
15
14
|
CallDebugPanel,
|
|
15
|
+
CallSidebar,
|
|
16
16
|
ChannelContainer,
|
|
17
|
+
ChatContainer,
|
|
17
18
|
ThreadComplementary,
|
|
18
19
|
ThreadSettings,
|
|
19
|
-
ChatContainer,
|
|
20
20
|
} from '../components';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { meta } from '../meta';
|
|
22
|
+
import { Channel, Thread, type ThreadSettingsProps } from '../types';
|
|
23
|
+
|
|
24
|
+
import { ThreadCapabilities } from './capabilities';
|
|
23
25
|
|
|
24
26
|
export default () =>
|
|
25
27
|
contributes(Capabilities.ReactSurface, [
|
|
26
28
|
createSurface({
|
|
27
|
-
id: `${
|
|
29
|
+
id: `${meta.id}/channel`,
|
|
28
30
|
role: 'article',
|
|
29
|
-
filter: (data): data is { subject:
|
|
31
|
+
filter: (data): data is { subject: Channel.Channel } => Obj.instanceOf(Channel.Channel, data.subject),
|
|
30
32
|
component: ({ data: { subject: channel }, role }) => <ChannelContainer channel={channel} role={role} />,
|
|
31
33
|
}),
|
|
32
34
|
createSurface({
|
|
33
|
-
id: `${
|
|
35
|
+
id: `${meta.id}/chat-companion`,
|
|
34
36
|
role: 'article',
|
|
35
|
-
filter: (data): data is { companionTo:
|
|
36
|
-
Obj.instanceOf(
|
|
37
|
+
filter: (data): data is { companionTo: Channel.Channel; subject: 'chat' } =>
|
|
38
|
+
Obj.instanceOf(Channel.Channel, data.companionTo) && data.subject === 'chat',
|
|
37
39
|
component: ({ data: { companionTo: channel } }) => {
|
|
38
40
|
const space = getSpace(channel);
|
|
39
41
|
const thread = channel.defaultThread.target;
|
|
@@ -45,9 +47,9 @@ export default () =>
|
|
|
45
47
|
},
|
|
46
48
|
}),
|
|
47
49
|
createSurface({
|
|
48
|
-
id: `${
|
|
50
|
+
id: `${meta.id}/thread`,
|
|
49
51
|
role: 'article',
|
|
50
|
-
filter: (data): data is { subject:
|
|
52
|
+
filter: (data): data is { subject: Thread.Thread } => Obj.instanceOf(Thread.Thread, data.subject),
|
|
51
53
|
component: ({ data: { subject: thread } }) => {
|
|
52
54
|
const space = getSpace(thread);
|
|
53
55
|
if (!space || !thread) {
|
|
@@ -58,27 +60,27 @@ export default () =>
|
|
|
58
60
|
},
|
|
59
61
|
}),
|
|
60
62
|
createSurface({
|
|
61
|
-
id: `${
|
|
63
|
+
id: `${meta.id}/comments`,
|
|
62
64
|
role: 'article',
|
|
63
|
-
filter: (data): data is { companionTo: { threads: Ref.Ref<
|
|
65
|
+
filter: (data): data is { companionTo: { threads: Ref.Ref<Thread.Thread>[] } } =>
|
|
64
66
|
data.subject === 'comments' && Obj.isObject(data.companionTo),
|
|
65
67
|
// TODO(wittjosiah): This isn't scrolling properly in a plank.
|
|
66
68
|
component: ({ data }) => <ThreadComplementary subject={data.companionTo} />,
|
|
67
69
|
}),
|
|
68
70
|
createSurface({
|
|
69
|
-
id: `${
|
|
71
|
+
id: `${meta.id}/plugin-settings`,
|
|
70
72
|
role: 'article',
|
|
71
73
|
filter: (data): data is { subject: SettingsStore<ThreadSettingsProps> } =>
|
|
72
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
74
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
73
75
|
component: ({ data: { subject } }) => <ThreadSettings settings={subject.value} />,
|
|
74
76
|
}),
|
|
75
77
|
createSurface({
|
|
76
|
-
id: `${
|
|
78
|
+
id: `${meta.id}/assistant`,
|
|
77
79
|
role: 'deck-companion--active-call',
|
|
78
80
|
component: () => <CallSidebar />,
|
|
79
81
|
}),
|
|
80
82
|
createSurface({
|
|
81
|
-
id: `${
|
|
83
|
+
id: `${meta.id}/devtools-overview`,
|
|
82
84
|
role: 'devtools-overview',
|
|
83
85
|
component: () => {
|
|
84
86
|
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 () => {
|
|
@@ -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
|
-
import { useCapability } from '@dxos/app-framework';
|
|
7
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
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
|
//
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { useAppGraph, useCapability } from '@dxos/app-framework/react';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { useActions, useNode } from '@dxos/plugin-graph';
|
|
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;
|
|
@@ -45,7 +45,7 @@ export const Toolbar = ({
|
|
|
45
45
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
46
46
|
|
|
47
47
|
// Channel app graph node.
|
|
48
|
-
const node = useNode(graph, channel &&
|
|
48
|
+
const node = useNode(graph, channel && Obj.getDXN(channel).toString());
|
|
49
49
|
const actions = useActions(graph, node?.id).filter((action) => action.properties.disposition === 'toolbar');
|
|
50
50
|
|
|
51
51
|
// Screen sharing.
|
|
@@ -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 is-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='is-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
|
+
};
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { useCapability } from '@dxos/app-framework';
|
|
7
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
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';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
13
|
+
import { render } from '@dxos/storybook-utils';
|
|
14
|
+
import { Message } from '@dxos/types';
|
|
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, Message.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: {
|