@dxos/plugin-thread 0.8.4-main.5acf9ea → 0.8.4-main.66e292d
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-L7MKV7DS.mjs +17 -0
- package/dist/lib/browser/ChatContainer-KPY4BAUE.mjs +16 -0
- package/dist/lib/browser/{app-graph-builder-N7BE5TYW.mjs → app-graph-builder-TWJ2UCOZ.mjs} +33 -33
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-TQ4JFMZZ.mjs +101 -0
- package/dist/lib/browser/blueprint-definition-TQ4JFMZZ.mjs.map +7 -0
- package/dist/lib/browser/{call-manager-NIPDYUVD.mjs → call-manager-4YFT4XA6.mjs} +8 -7
- package/dist/lib/browser/call-manager-4YFT4XA6.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KWPRNHTK.mjs → chunk-ALZKJOZK.mjs} +251 -246
- package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +7 -0
- package/dist/lib/browser/chunk-ANTFU4JB.mjs +25 -0
- package/dist/lib/browser/chunk-ANTFU4JB.mjs.map +7 -0
- package/dist/lib/browser/chunk-CFC7LEPD.mjs +18 -0
- package/dist/lib/browser/chunk-CFC7LEPD.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-6NSMBO3B.mjs → chunk-ISCHODBV.mjs} +55 -5
- package/dist/lib/browser/chunk-ISCHODBV.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-JDJPMI7V.mjs +143 -0
- package/dist/lib/browser/chunk-JDJPMI7V.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-NPT5S6N4.mjs +611 -0
- package/dist/lib/browser/chunk-NPT5S6N4.mjs.map +7 -0
- package/dist/lib/browser/chunk-QM34EZQK.mjs +20 -0
- package/dist/lib/browser/chunk-QM34EZQK.mjs.map +7 -0
- package/dist/lib/browser/chunk-TLOOZTRD.mjs +377 -0
- package/dist/lib/browser/chunk-TLOOZTRD.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/index.mjs +61 -53
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-JFGLZ6VI.mjs → intent-resolver-G33FT3NO.mjs} +41 -55
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs.map +7 -0
- package/dist/lib/browser/{markdown-M3FMR7OD.mjs → markdown-WFZFYJBQ.mjs} +30 -27
- package/dist/lib/browser/markdown-WFZFYJBQ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-ED7PHA44.mjs +29 -0
- package/dist/lib/browser/react-root-ED7PHA44.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-XWS6GIZY.mjs → react-surface-AUQQSQQC.mjs} +38 -36
- package/dist/lib/browser/react-surface-AUQQSQQC.mjs.map +7 -0
- package/dist/lib/browser/repair-JFJLEM2O.mjs +35 -0
- package/dist/lib/browser/repair-JFJLEM2O.mjs.map +7 -0
- package/dist/lib/browser/{settings-E32MTL7A.mjs → settings-E6IOLK46.mjs} +6 -5
- package/dist/lib/{node-esm/settings-SJ24YG7M.mjs.map → browser/settings-E6IOLK46.mjs.map} +1 -1
- package/dist/lib/browser/{state-H6CYONWE.mjs → state-UYPLBGZJ.mjs} +6 -5
- package/dist/lib/browser/state-UYPLBGZJ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +7 -10
- package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs +18 -0
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs +17 -0
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-VCW76Z6V.mjs → app-graph-builder-VD6I2V5H.mjs} +33 -33
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-TSX5HHW7.mjs +102 -0
- package/dist/lib/node-esm/blueprint-definition-TSX5HHW7.mjs.map +7 -0
- package/dist/lib/node-esm/{call-manager-D6O5ZJJ4.mjs → call-manager-UMUXEYH5.mjs} +8 -7
- package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs +22 -0
- package/dist/lib/node-esm/chunk-2AEIN5MI.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-C3XFMUAY.mjs → chunk-AB42KYF3.mjs} +251 -246
- package/dist/lib/node-esm/chunk-AB42KYF3.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-ATNY37UV.mjs +27 -0
- package/dist/lib/node-esm/chunk-ATNY37UV.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs +378 -0
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-FF3QVPY4.mjs +612 -0
- package/dist/lib/node-esm/chunk-FF3QVPY4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-P2M364TO.mjs +144 -0
- package/dist/lib/node-esm/chunk-P2M364TO.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-RT6NRL2I.mjs +19 -0
- package/dist/lib/node-esm/chunk-RT6NRL2I.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/index.mjs +61 -53
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-OXGNQ44Y.mjs → intent-resolver-4PX3WXQG.mjs} +41 -55
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-INKTE4MH.mjs → markdown-CSR5MAPZ.mjs} +30 -27
- package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-root-DZN324JA.mjs +30 -0
- package/dist/lib/node-esm/react-root-DZN324JA.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-MJ33KPYE.mjs → react-surface-AMVESEF4.mjs} +38 -36
- package/dist/lib/node-esm/react-surface-AMVESEF4.mjs.map +7 -0
- package/dist/lib/node-esm/repair-RMLR24YR.mjs +36 -0
- package/dist/lib/node-esm/repair-RMLR24YR.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SJ24YG7M.mjs → settings-RGZHWDSO.mjs} +6 -5
- package/dist/lib/{browser/settings-E32MTL7A.mjs.map → node-esm/settings-RGZHWDSO.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-D7WNDT3N.mjs → state-XNWOLBNE.mjs} +6 -5
- package/dist/lib/node-esm/state-XNWOLBNE.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +7 -10
- 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 +12 -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/repair.d.ts +4 -0
- package/dist/types/src/capabilities/repair.d.ts.map +1 -0
- 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 +159 -5
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts +162 -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 +160 -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 +8 -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 +159 -3
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +161 -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/ThreadCompanion.d.ts +5 -0
- package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -0
- 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 +3 -3
- 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/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 +79 -7
- 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/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +236 -265
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +69 -63
- package/src/ThreadPlugin.tsx +137 -129
- 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 +47 -33
- 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 +2 -0
- package/src/capabilities/intent-resolver.ts +32 -35
- package/src/capabilities/markdown.ts +9 -6
- package/src/capabilities/react-root.tsx +2 -2
- package/src/capabilities/react-surface.tsx +29 -26
- package/src/capabilities/repair.ts +40 -0
- 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 +112 -55
- 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 +35 -23
- package/src/components/Comments.stories.tsx +39 -41
- package/src/components/CommentsContainer.tsx +7 -8
- package/src/components/CommentsThreadContainer.tsx +39 -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 +53 -17
- 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 +6 -6
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +7 -4
- package/src/components/{ThreadComplementary.tsx → ThreadCompanion.tsx} +72 -35
- package/src/components/ThreadSettings.tsx +6 -7
- package/src/components/command-extension.ts +5 -2
- package/src/components/index.ts +4 -4
- package/src/components/testing.ts +26 -6
- package/src/extensions/threads.ts +31 -21
- package/src/functions/create-proposals.ts +56 -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 +9 -4
- package/src/types/Channel.ts +26 -0
- package/src/types/index.ts +1 -1
- package/src/types/types.ts +31 -30
- 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-FR7KJPNY.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-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/ChatContainer-IQUWU426.mjs +0 -16
- 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-2CXOK2TD.mjs +0 -23
- package/dist/lib/node-esm/chunk-2CXOK2TD.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-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/components/ThreadComplementary.d.ts +0 -5
- package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
- 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-L7MKV7DS.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-AIGIWAUG.mjs.map → ChatContainer-KPY4BAUE.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChannelContainer-7FXCKO7X.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs.map → ChannelContainer-FYONOOZ6.mjs.map} +0 -0
|
@@ -2,32 +2,36 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createIntent, createResolver
|
|
7
|
+
import { Capabilities, type PluginContext, contributes, createIntent, createResolver } from '@dxos/app-framework';
|
|
8
8
|
import { sleep } from '@dxos/async';
|
|
9
9
|
import { Obj, Relation, Type } from '@dxos/echo';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
11
11
|
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
12
12
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
14
|
+
import { Ref, getSpace } from '@dxos/react-client/echo';
|
|
15
|
+
import { Collection } from '@dxos/schema';
|
|
16
|
+
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
17
|
+
|
|
18
|
+
import { meta } from '../meta';
|
|
19
|
+
import { Channel, ThreadAction } from '../types';
|
|
16
20
|
|
|
17
21
|
import { ThreadCapabilities } from './capabilities';
|
|
18
|
-
import { THREAD_PLUGIN } from '../meta';
|
|
19
|
-
import { ChannelType, ThreadAction, ThreadType } from '../types';
|
|
20
22
|
|
|
21
23
|
export default (context: PluginContext) =>
|
|
22
24
|
contributes(Capabilities.IntentResolver, [
|
|
23
25
|
createResolver({
|
|
24
|
-
intent: ThreadAction.
|
|
25
|
-
resolve: ({ space, rootCollection }) =>
|
|
26
|
+
intent: ThreadAction.OnCreateSpace,
|
|
27
|
+
resolve: ({ space, isDefault, rootCollection }) =>
|
|
26
28
|
Effect.gen(function* () {
|
|
29
|
+
if (isDefault) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
28
|
-
const {
|
|
29
|
-
createIntent(CollectionAction.CreateQueryCollection, { typename: Type.getTypename(ChannelType) }),
|
|
30
|
-
);
|
|
34
|
+
const collection = Collection.makeManaged({ key: Type.getTypename(Channel.Channel) });
|
|
31
35
|
rootCollection.objects.push(Ref.make(collection));
|
|
32
36
|
|
|
33
37
|
const { object: channel } = yield* dispatch(
|
|
@@ -40,18 +44,14 @@ export default (context: PluginContext) =>
|
|
|
40
44
|
intent: ThreadAction.CreateChannel,
|
|
41
45
|
resolve: ({ name }) => ({
|
|
42
46
|
data: {
|
|
43
|
-
object:
|
|
44
|
-
name,
|
|
45
|
-
defaultThread: Ref.make(Obj.make(ThreadType, { messages: [], status: 'active' })),
|
|
46
|
-
threads: [],
|
|
47
|
-
}),
|
|
47
|
+
object: Channel.make({ name }),
|
|
48
48
|
},
|
|
49
49
|
}),
|
|
50
50
|
}),
|
|
51
51
|
createResolver({
|
|
52
52
|
intent: ThreadAction.CreateChannelThread,
|
|
53
53
|
resolve: ({ channel }) => {
|
|
54
|
-
const thread =
|
|
54
|
+
const thread = Thread.make({ status: 'active' });
|
|
55
55
|
channel.threads.push(Ref.make(thread));
|
|
56
56
|
return {
|
|
57
57
|
data: {
|
|
@@ -64,13 +64,10 @@ export default (context: PluginContext) =>
|
|
|
64
64
|
createResolver({
|
|
65
65
|
intent: ThreadAction.Create,
|
|
66
66
|
resolve: ({ name, anchor: _anchor, subject }) => {
|
|
67
|
-
const space = getSpace(subject);
|
|
68
|
-
invariant(space, 'Space not found');
|
|
69
|
-
|
|
70
67
|
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
71
|
-
const subjectId =
|
|
72
|
-
const thread =
|
|
73
|
-
const anchor = Relation.make(AnchoredTo, {
|
|
68
|
+
const subjectId = Obj.getDXN(subject).toString();
|
|
69
|
+
const thread = Thread.make({ name });
|
|
70
|
+
const anchor = Relation.make(AnchoredTo.AnchoredTo, {
|
|
74
71
|
[Relation.Source]: thread,
|
|
75
72
|
[Relation.Target]: subject,
|
|
76
73
|
anchor: _anchor,
|
|
@@ -85,7 +82,7 @@ export default (context: PluginContext) =>
|
|
|
85
82
|
|
|
86
83
|
return {
|
|
87
84
|
intents: [
|
|
88
|
-
createIntent(ThreadAction.Select, { current:
|
|
85
|
+
createIntent(ThreadAction.Select, { current: Obj.getDXN(thread).toString() }),
|
|
89
86
|
createIntent(DeckAction.ChangeCompanion, {
|
|
90
87
|
primary: subjectId,
|
|
91
88
|
companion: `${subjectId}${ATTENDABLE_PATH_SEPARATOR}comments`,
|
|
@@ -130,9 +127,9 @@ export default (context: PluginContext) =>
|
|
|
130
127
|
createResolver({
|
|
131
128
|
intent: ThreadAction.Delete,
|
|
132
129
|
resolve: async ({ subject, anchor, thread: _thread }, undo) => {
|
|
133
|
-
const thread = _thread ?? (Relation.getSource(anchor) as
|
|
130
|
+
const thread = _thread ?? (Relation.getSource(anchor) as Thread.Thread);
|
|
134
131
|
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
135
|
-
const subjectId =
|
|
132
|
+
const subjectId = Obj.getDXN(subject).toString();
|
|
136
133
|
const draft = state.drafts[subjectId];
|
|
137
134
|
if (draft) {
|
|
138
135
|
// Check if we're deleting a draft; if so, remo ve it.
|
|
@@ -156,7 +153,7 @@ export default (context: PluginContext) =>
|
|
|
156
153
|
|
|
157
154
|
return {
|
|
158
155
|
undoable: {
|
|
159
|
-
message: ['thread deleted label', { ns:
|
|
156
|
+
message: ['thread deleted label', { ns: meta.id }],
|
|
160
157
|
data: { thread, anchor },
|
|
161
158
|
},
|
|
162
159
|
intents: [
|
|
@@ -192,14 +189,13 @@ export default (context: PluginContext) =>
|
|
|
192
189
|
createResolver({
|
|
193
190
|
intent: ThreadAction.AddMessage,
|
|
194
191
|
resolve: ({ anchor, subject, sender, text }) => {
|
|
195
|
-
const thread = Relation.getSource(anchor) as
|
|
192
|
+
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
196
193
|
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
197
|
-
const subjectId =
|
|
194
|
+
const subjectId = Obj.getDXN(subject).toString();
|
|
198
195
|
const space = getSpace(subject);
|
|
199
196
|
invariant(space, 'Space not found');
|
|
200
|
-
const intents = [];
|
|
201
197
|
|
|
202
|
-
const message = Obj.make(
|
|
198
|
+
const message = Obj.make(Message.Message, {
|
|
203
199
|
created: new Date().toISOString(),
|
|
204
200
|
sender,
|
|
205
201
|
blocks: [{ _tag: 'text', text }],
|
|
@@ -208,6 +204,7 @@ export default (context: PluginContext) =>
|
|
|
208
204
|
});
|
|
209
205
|
thread.messages.push(Ref.make(message));
|
|
210
206
|
|
|
207
|
+
const intents = [];
|
|
211
208
|
const draft = state.drafts[subjectId]?.find((a) => a.id === anchor.id);
|
|
212
209
|
if (draft) {
|
|
213
210
|
// Move draft to document.
|
|
@@ -218,7 +215,7 @@ export default (context: PluginContext) =>
|
|
|
218
215
|
intents.push(
|
|
219
216
|
createIntent(SpaceAction.AddRelation, {
|
|
220
217
|
space,
|
|
221
|
-
schema: AnchoredTo,
|
|
218
|
+
schema: AnchoredTo.AnchoredTo,
|
|
222
219
|
source: thread,
|
|
223
220
|
target: subject,
|
|
224
221
|
fields: { anchor: draft.anchor },
|
|
@@ -254,7 +251,7 @@ export default (context: PluginContext) =>
|
|
|
254
251
|
createResolver({
|
|
255
252
|
intent: ThreadAction.DeleteMessage,
|
|
256
253
|
resolve: ({ subject, anchor, messageId, message, messageIndex }, undo) => {
|
|
257
|
-
const thread = Relation.getSource(anchor) as
|
|
254
|
+
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
258
255
|
const space = getSpace(subject);
|
|
259
256
|
invariant(space, 'Space not found');
|
|
260
257
|
|
|
@@ -276,7 +273,7 @@ export default (context: PluginContext) =>
|
|
|
276
273
|
|
|
277
274
|
return {
|
|
278
275
|
undoable: {
|
|
279
|
-
message: ['message deleted label', { ns:
|
|
276
|
+
message: ['message deleted label', { ns: meta.id }],
|
|
280
277
|
data: { message, messageIndex },
|
|
281
278
|
},
|
|
282
279
|
intents: [
|
|
@@ -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,39 @@
|
|
|
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';
|
|
12
|
+
import { Thread } from '@dxos/types';
|
|
11
13
|
|
|
12
|
-
import { ThreadCapabilities } from './capabilities';
|
|
13
14
|
import {
|
|
14
|
-
CallSidebar,
|
|
15
15
|
CallDebugPanel,
|
|
16
|
+
CallSidebar,
|
|
16
17
|
ChannelContainer,
|
|
17
|
-
ThreadComplementary,
|
|
18
|
-
ThreadSettings,
|
|
19
18
|
ChatContainer,
|
|
19
|
+
ThreadCompanion,
|
|
20
|
+
ThreadSettings,
|
|
20
21
|
} from '../components';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
22
|
+
import { meta } from '../meta';
|
|
23
|
+
import { Channel, type ThreadSettingsProps } from '../types';
|
|
24
|
+
|
|
25
|
+
import { ThreadCapabilities } from './capabilities';
|
|
23
26
|
|
|
24
27
|
export default () =>
|
|
25
28
|
contributes(Capabilities.ReactSurface, [
|
|
26
29
|
createSurface({
|
|
27
|
-
id: `${
|
|
30
|
+
id: `${meta.id}/channel`,
|
|
28
31
|
role: 'article',
|
|
29
|
-
filter: (data): data is { subject:
|
|
30
|
-
component: ({ data: { subject
|
|
32
|
+
filter: (data): data is { subject: Channel.Channel } => Obj.instanceOf(Channel.Channel, data.subject),
|
|
33
|
+
component: ({ data: { subject }, role }) => <ChannelContainer channel={subject} role={role} />,
|
|
31
34
|
}),
|
|
32
35
|
createSurface({
|
|
33
|
-
id: `${
|
|
36
|
+
id: `${meta.id}/chat-companion`,
|
|
34
37
|
role: 'article',
|
|
35
|
-
filter: (data): data is { companionTo:
|
|
36
|
-
Obj.instanceOf(
|
|
38
|
+
filter: (data): data is { companionTo: Channel.Channel; subject: 'chat' } =>
|
|
39
|
+
Obj.instanceOf(Channel.Channel, data.companionTo) && data.subject === 'chat',
|
|
37
40
|
component: ({ data: { companionTo: channel } }) => {
|
|
38
41
|
const space = getSpace(channel);
|
|
39
42
|
const thread = channel.defaultThread.target;
|
|
@@ -45,40 +48,40 @@ export default () =>
|
|
|
45
48
|
},
|
|
46
49
|
}),
|
|
47
50
|
createSurface({
|
|
48
|
-
id: `${
|
|
51
|
+
id: `${meta.id}/thread`,
|
|
49
52
|
role: 'article',
|
|
50
|
-
filter: (data): data is { subject:
|
|
51
|
-
component: ({ data: { subject
|
|
52
|
-
const space = getSpace(
|
|
53
|
-
if (!space || !
|
|
53
|
+
filter: (data): data is { subject: Thread.Thread } => Obj.instanceOf(Thread.Thread, data.subject),
|
|
54
|
+
component: ({ data: { subject } }) => {
|
|
55
|
+
const space = getSpace(subject);
|
|
56
|
+
if (!space || !subject) {
|
|
54
57
|
return null;
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
return <ChatContainer thread={
|
|
60
|
+
return <ChatContainer thread={subject} space={space} />;
|
|
58
61
|
},
|
|
59
62
|
}),
|
|
60
63
|
createSurface({
|
|
61
|
-
id: `${
|
|
64
|
+
id: `${meta.id}/comments`,
|
|
62
65
|
role: 'article',
|
|
63
|
-
filter: (data): data is { companionTo: { threads: Ref.Ref<
|
|
66
|
+
filter: (data): data is { companionTo: { threads: Ref.Ref<Thread.Thread>[] } } =>
|
|
64
67
|
data.subject === 'comments' && Obj.isObject(data.companionTo),
|
|
65
68
|
// TODO(wittjosiah): This isn't scrolling properly in a plank.
|
|
66
|
-
component: ({ data }) => <
|
|
69
|
+
component: ({ data }) => <ThreadCompanion subject={data.companionTo} />,
|
|
67
70
|
}),
|
|
68
71
|
createSurface({
|
|
69
|
-
id: `${
|
|
72
|
+
id: `${meta.id}/plugin-settings`,
|
|
70
73
|
role: 'article',
|
|
71
74
|
filter: (data): data is { subject: SettingsStore<ThreadSettingsProps> } =>
|
|
72
|
-
data.subject instanceof SettingsStore && data.subject.prefix ===
|
|
75
|
+
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
73
76
|
component: ({ data: { subject } }) => <ThreadSettings settings={subject.value} />,
|
|
74
77
|
}),
|
|
75
78
|
createSurface({
|
|
76
|
-
id: `${
|
|
79
|
+
id: `${meta.id}/assistant`,
|
|
77
80
|
role: 'deck-companion--active-call',
|
|
78
81
|
component: () => <CallSidebar />,
|
|
79
82
|
}),
|
|
80
83
|
createSurface({
|
|
81
|
-
id: `${
|
|
84
|
+
id: `${meta.id}/devtools-overview`,
|
|
82
85
|
role: 'devtools-overview',
|
|
83
86
|
component: () => {
|
|
84
87
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { contributes } from '@dxos/app-framework';
|
|
6
|
+
import { Obj, Ref, Type } from '@dxos/echo';
|
|
7
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
8
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
9
|
+
import { Collection } from '@dxos/schema';
|
|
10
|
+
|
|
11
|
+
import { Channel } from '../types';
|
|
12
|
+
|
|
13
|
+
export default () =>
|
|
14
|
+
contributes(SpaceCapabilities.Repair, async ({ space, isDefault }) => {
|
|
15
|
+
if (isDefault) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
await ensureSystemCollection(space);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Ensure the root collection has a system collection for Channels.
|
|
24
|
+
*/
|
|
25
|
+
const ensureSystemCollection = async (space: Space) => {
|
|
26
|
+
const rootCollection: Collection.Collection = await space.properties[Collection.Collection.typename]?.load();
|
|
27
|
+
if (!rootCollection) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const objects = await Promise.all(rootCollection.objects.map((ref) => ref.load()));
|
|
32
|
+
const channels = objects.find(
|
|
33
|
+
(object) => Obj.instanceOf(Collection.Managed, object) && object.key === Type.getTypename(Channel.Channel),
|
|
34
|
+
);
|
|
35
|
+
if (channels) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
rootCollection.objects.push(Ref.make(Collection.makeManaged({ key: Type.getTypename(Channel.Channel) })));
|
|
40
|
+
};
|
|
@@ -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
|
};
|