@dxos/plugin-thread 0.8.2-main.f11618f → 0.8.2-staging.42af850
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-LGYSQMC7.mjs +15 -0
- package/dist/lib/browser/ChatContainer-JWRI73OG.mjs +14 -0
- package/dist/lib/browser/app-graph-builder-K3CFBN7V.mjs +171 -0
- package/dist/lib/browser/app-graph-builder-K3CFBN7V.mjs.map +7 -0
- package/dist/lib/browser/call-manager-APQAZWHT.mjs +23 -0
- package/dist/lib/browser/call-manager-APQAZWHT.mjs.map +7 -0
- package/dist/lib/browser/chunk-4H4A264L.mjs +1708 -0
- package/dist/lib/browser/chunk-4H4A264L.mjs.map +7 -0
- package/dist/lib/browser/{chunk-AYNXYEKP.mjs → chunk-5P5BH5GE.mjs} +57 -35
- package/dist/lib/browser/chunk-5P5BH5GE.mjs.map +7 -0
- package/dist/lib/browser/chunk-5PGLGDIP.mjs +983 -0
- package/dist/lib/browser/chunk-5PGLGDIP.mjs.map +7 -0
- package/dist/lib/browser/chunk-CF2MXRCH.mjs +21 -0
- package/dist/lib/browser/chunk-CF2MXRCH.mjs.map +7 -0
- package/dist/lib/browser/chunk-G3TS64FP.mjs +351 -0
- package/dist/lib/browser/chunk-G3TS64FP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WBJLUUOK.mjs → chunk-IIUTBDVB.mjs} +4 -4
- package/dist/lib/browser/chunk-IIUTBDVB.mjs.map +7 -0
- package/dist/lib/browser/chunk-JKQUJOTX.mjs +31 -0
- package/dist/lib/browser/chunk-JKQUJOTX.mjs.map +7 -0
- package/dist/lib/browser/chunk-KMVGJG23.mjs +545 -0
- package/dist/lib/browser/chunk-KMVGJG23.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EP6MRLY7.mjs → chunk-R5MDLUPC.mjs} +5 -3
- package/dist/lib/browser/chunk-R5MDLUPC.mjs.map +7 -0
- package/dist/lib/browser/chunk-WDOQXTI2.mjs +126 -0
- package/dist/lib/browser/chunk-WDOQXTI2.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +107 -41
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-3UW6ROYT.mjs → intent-resolver-YUYZCTLF.mjs} +100 -72
- package/dist/lib/browser/intent-resolver-YUYZCTLF.mjs.map +7 -0
- package/dist/lib/browser/markdown-4EC3OCF2.mjs +169 -0
- package/dist/lib/browser/markdown-4EC3OCF2.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-EECCWHCW.mjs +27 -0
- package/dist/lib/browser/react-root-EECCWHCW.mjs.map +7 -0
- package/dist/lib/browser/react-surface-5QLZAFDL.mjs +108 -0
- package/dist/lib/browser/react-surface-5QLZAFDL.mjs.map +7 -0
- package/dist/lib/browser/{settings-2VZ7S4SK.mjs → settings-KVBQQSO5.mjs} +3 -3
- package/dist/lib/browser/{state-KBGI3QTR.mjs → state-RKL5MSDP.mjs} +4 -4
- package/dist/lib/browser/{state-KBGI3QTR.mjs.map → state-RKL5MSDP.mjs.map} +3 -3
- package/dist/lib/browser/types/index.mjs +16 -0
- package/dist/lib/browser/types/index.mjs.map +7 -0
- package/dist/lib/node/ChannelContainer-5EKNEH56.cjs +36 -0
- package/dist/lib/node/ChannelContainer-5EKNEH56.cjs.map +7 -0
- package/dist/lib/node/ChatContainer-EE3FPSYO.cjs +35 -0
- package/dist/lib/node/ChatContainer-EE3FPSYO.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-IRE3GYKE.cjs +179 -0
- package/dist/lib/node/app-graph-builder-IRE3GYKE.cjs.map +7 -0
- package/dist/lib/node/call-manager-HV2XJW5O.cjs +37 -0
- package/dist/lib/node/call-manager-HV2XJW5O.cjs.map +7 -0
- package/dist/lib/node/chunk-44I33JDT.cjs +1731 -0
- package/dist/lib/node/chunk-44I33JDT.cjs.map +7 -0
- package/dist/lib/node/chunk-4B3PPXA6.cjs +371 -0
- package/dist/lib/node/chunk-4B3PPXA6.cjs.map +7 -0
- package/dist/lib/node/{chunk-NQ5DTPOY.cjs → chunk-4YSNVPWU.cjs} +10 -8
- package/dist/lib/node/chunk-4YSNVPWU.cjs.map +7 -0
- package/dist/lib/node/chunk-6B3M6XRE.cjs +984 -0
- package/dist/lib/node/chunk-6B3M6XRE.cjs.map +7 -0
- package/dist/lib/node/{chunk-W25MBII2.cjs → chunk-FUXJAVFZ.cjs} +50 -29
- package/dist/lib/node/chunk-FUXJAVFZ.cjs.map +7 -0
- package/dist/lib/node/{chunk-ONLWOUYZ.cjs → chunk-HLMCEE5K.cjs} +7 -7
- package/dist/lib/node/{chunk-ONLWOUYZ.cjs.map → chunk-HLMCEE5K.cjs.map} +2 -2
- package/dist/lib/node/chunk-JLHENFGK.cjs +549 -0
- package/dist/lib/node/chunk-JLHENFGK.cjs.map +7 -0
- package/dist/lib/node/chunk-LR5NENBE.cjs +54 -0
- package/dist/lib/node/chunk-LR5NENBE.cjs.map +7 -0
- package/dist/lib/node/chunk-TKHJVC2C.cjs +147 -0
- package/dist/lib/node/chunk-TKHJVC2C.cjs.map +7 -0
- package/dist/lib/node/{chunk-IX63EKGL.cjs → chunk-U7NOIXN6.cjs} +16 -10
- package/dist/lib/node/chunk-U7NOIXN6.cjs.map +7 -0
- package/dist/lib/node/index.cjs +142 -80
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-DC6HDNTX.cjs → intent-resolver-MZ3HADNY.cjs} +108 -82
- package/dist/lib/node/intent-resolver-MZ3HADNY.cjs.map +7 -0
- package/dist/lib/node/markdown-NJDPXIKD.cjs +178 -0
- package/dist/lib/node/markdown-NJDPXIKD.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-root-IAYQ2DBO.cjs +51 -0
- package/dist/lib/node/react-root-IAYQ2DBO.cjs.map +7 -0
- package/dist/lib/node/react-surface-AVC5VVIS.cjs +122 -0
- package/dist/lib/node/react-surface-AVC5VVIS.cjs.map +7 -0
- package/dist/lib/node/{settings-7MGTJ46L.cjs → settings-H45P5YO2.cjs} +8 -8
- package/dist/lib/node/{state-FOHMAVSU.cjs → state-IY5XX3H2.cjs} +8 -8
- package/dist/lib/node/{state-FOHMAVSU.cjs.map → state-IY5XX3H2.cjs.map} +3 -3
- package/dist/lib/node/{types.cjs → types/index.cjs} +12 -6
- package/dist/lib/node/types/index.cjs.map +7 -0
- package/dist/lib/node-esm/ChannelContainer-KFS2RWWW.mjs +16 -0
- package/dist/lib/node-esm/ChannelContainer-KFS2RWWW.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-UJYPQMLV.mjs +15 -0
- package/dist/lib/node-esm/ChatContainer-UJYPQMLV.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-I5VMPLE4.mjs +172 -0
- package/dist/lib/node-esm/app-graph-builder-I5VMPLE4.mjs.map +7 -0
- package/dist/lib/node-esm/call-manager-UUYXLF4T.mjs +24 -0
- package/dist/lib/node-esm/call-manager-UUYXLF4T.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-42F2DTMM.mjs → chunk-ESQC6SYE.mjs} +4 -4
- package/dist/lib/node-esm/chunk-ESQC6SYE.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J323VQ4P.mjs +127 -0
- package/dist/lib/node-esm/chunk-J323VQ4P.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WLY2HMDB.mjs → chunk-K4KAUOKT.mjs} +5 -3
- package/dist/lib/node-esm/chunk-K4KAUOKT.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MNJ3V4XM.mjs +546 -0
- package/dist/lib/node-esm/chunk-MNJ3V4XM.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-T6E5EY7Z.mjs → chunk-O3V45YJP.mjs} +57 -35
- package/dist/lib/node-esm/chunk-O3V45YJP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ODUB4GAB.mjs +23 -0
- package/dist/lib/node-esm/chunk-ODUB4GAB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PGRP3O4O.mjs +33 -0
- package/dist/lib/node-esm/chunk-PGRP3O4O.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-POKXRTII.mjs +352 -0
- package/dist/lib/node-esm/chunk-POKXRTII.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WXNPD542.mjs +1710 -0
- package/dist/lib/node-esm/chunk-WXNPD542.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-X6AUQDTE.mjs +984 -0
- package/dist/lib/node-esm/chunk-X6AUQDTE.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +107 -41
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-OAMDKGAA.mjs → intent-resolver-CU22OPAH.mjs} +100 -72
- package/dist/lib/node-esm/intent-resolver-CU22OPAH.mjs.map +7 -0
- package/dist/lib/node-esm/markdown-HRGGO7IA.mjs +170 -0
- package/dist/lib/node-esm/markdown-HRGGO7IA.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-root-NQMUEI6Z.mjs +28 -0
- package/dist/lib/node-esm/react-root-NQMUEI6Z.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-Z4X5VLMY.mjs +109 -0
- package/dist/lib/node-esm/react-surface-Z4X5VLMY.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-AJAZ3O47.mjs → settings-IJGUOU3F.mjs} +3 -3
- package/dist/lib/node-esm/{state-IRLEO2SB.mjs → state-6AUTNROZ.mjs} +4 -4
- package/dist/lib/node-esm/{state-IRLEO2SB.mjs.map → state-6AUTNROZ.mjs.map} +3 -3
- package/dist/lib/node-esm/types/index.mjs +17 -0
- package/dist/lib/node-esm/types/index.mjs.map +7 -0
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/calls/call-manager.d.ts +77 -0
- package/dist/types/src/calls/call-manager.d.ts.map +1 -0
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +66 -0
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -0
- package/dist/types/src/calls/index.d.ts +7 -0
- package/dist/types/src/calls/index.d.ts.map +1 -0
- package/dist/types/src/calls/media-manager.d.ts +60 -0
- package/dist/types/src/calls/media-manager.d.ts.map +1 -0
- package/dist/types/src/calls/speaking-monitor.d.ts +24 -0
- package/dist/types/src/calls/speaking-monitor.d.ts.map +1 -0
- package/dist/types/src/calls/types.d.ts +45 -0
- package/dist/types/src/calls/types.d.ts.map +1 -0
- package/dist/types/src/calls/util/audio.d.ts +6 -0
- package/dist/types/src/calls/util/audio.d.ts.map +1 -0
- package/dist/types/src/calls/util/calls-service.d.ts +72 -0
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -0
- package/dist/types/src/calls/util/history-cache.d.ts +11 -0
- package/dist/types/src/calls/util/history-cache.d.ts.map +1 -0
- package/dist/types/src/calls/util/index.d.ts +5 -0
- package/dist/types/src/calls/util/index.d.ts.map +1 -0
- package/dist/types/src/calls/util/media.d.ts +6 -0
- package/dist/types/src/calls/util/media.d.ts.map +1 -0
- package/dist/types/src/calls/util/stub-media-streams.d.ts +18 -0
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -0
- package/dist/types/src/calls/util/task-scheduling.d.ts +17 -0
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts +5 -0
- package/dist/types/src/capabilities/call-manager.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +13 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -179
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +2 -2
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +7 -0
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Call/Call.d.ts +17 -0
- package/dist/types/src/components/Call/Call.d.ts.map +1 -0
- package/dist/types/src/components/Call/Toolbar.d.ts +16 -0
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -0
- package/dist/types/src/components/Call/index.d.ts +3 -0
- package/dist/types/src/components/Call/index.d.ts.map +1 -0
- package/dist/types/src/components/CallDebugPanel.d.ts +8 -0
- package/dist/types/src/components/CallDebugPanel.d.ts.map +1 -0
- package/dist/types/src/components/CallSidebar.d.ts +4 -0
- package/dist/types/src/components/CallSidebar.d.ts.map +1 -0
- package/dist/types/src/components/ChannelContainer.d.ts +14 -0
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -0
- package/dist/types/src/components/ChannelContainer.stories.d.ts +10 -0
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +9 -7
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentContainer.d.ts +11 -2
- package/dist/types/src/components/CommentContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +1 -1
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts +5 -9
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts +15 -0
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -0
- package/dist/types/src/components/Lobby/index.d.ts +2 -0
- package/dist/types/src/components/Lobby/index.d.ts.map +1 -0
- package/dist/types/src/components/Media/AudioStream.d.ts +6 -0
- package/dist/types/src/components/Media/AudioStream.d.ts.map +1 -0
- package/dist/types/src/components/Media/VideoObject.d.ts +15 -0
- package/dist/types/src/components/Media/VideoObject.d.ts.map +1 -0
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +8 -0
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -0
- package/dist/types/src/components/Media/index.d.ts +3 -0
- package/dist/types/src/components/Media/index.d.ts.map +1 -0
- package/dist/types/src/components/MessageContainer.d.ts +5 -4
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/Participant/Participant.d.ts +6 -0
- package/dist/types/src/components/Participant/Participant.d.ts.map +1 -0
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts +11 -0
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +1 -0
- package/dist/types/src/components/Participant/index.d.ts +3 -0
- package/dist/types/src/components/Participant/index.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts +12 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +10 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts +32 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +23 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts +21 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +4 -0
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +1 -0
- package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +5 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +54 -119
- 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/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/useDebugMode.d.ts +2 -0
- package/dist/types/src/hooks/useDebugMode.d.ts.map +1 -0
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/peers.stories.d.ts +11 -0
- package/dist/types/src/peers.stories.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/stories.d.ts +2 -0
- package/dist/types/src/testing/stories.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +35 -56
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +317 -0
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +1015 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/util.d.ts +2 -0
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +60 -40
- package/src/ThreadPlugin.tsx +33 -14
- package/src/calls/call-manager.ts +242 -0
- package/src/calls/call-swarm-synchronizer.ts +350 -0
- package/src/calls/index.ts +10 -0
- package/src/calls/media-manager.ts +342 -0
- package/src/calls/speaking-monitor.ts +85 -0
- package/src/calls/types.ts +70 -0
- package/src/calls/util/audio.ts +58 -0
- package/src/calls/util/calls-service.ts +527 -0
- package/src/calls/util/history-cache.ts +27 -0
- package/src/calls/util/index.ts +8 -0
- package/src/calls/util/media.ts +52 -0
- package/src/calls/util/stub-media-streams.ts +73 -0
- package/src/calls/util/task-scheduling.ts +92 -0
- package/src/capabilities/app-graph-builder.ts +171 -25
- package/src/capabilities/call-manager.ts +19 -0
- package/src/capabilities/capabilities.ts +15 -1
- package/src/capabilities/index.ts +2 -0
- package/src/capabilities/intent-resolver.ts +76 -55
- package/src/capabilities/markdown.ts +54 -4
- package/src/capabilities/react-root.tsx +17 -0
- package/src/capabilities/react-surface.tsx +52 -27
- package/src/capabilities/state.ts +1 -1
- package/src/components/Call/Call.tsx +88 -0
- package/src/components/Call/Toolbar.tsx +182 -0
- package/src/components/Call/index.ts +6 -0
- package/src/components/CallDebugPanel.tsx +115 -0
- package/src/components/CallSidebar.tsx +17 -0
- package/src/components/ChannelContainer.stories.tsx +58 -0
- package/src/components/ChannelContainer.tsx +203 -0
- package/src/components/Chat.stories.tsx +9 -10
- package/src/components/ChatContainer.tsx +37 -25
- package/src/components/CommentContainer.tsx +56 -61
- package/src/components/Comments.stories.tsx +20 -16
- package/src/components/CommentsContainer.tsx +18 -28
- package/src/components/Lobby/Lobby.tsx +119 -0
- package/src/components/Lobby/index.ts +5 -0
- package/src/components/Media/AudioStream.tsx +67 -0
- package/src/components/Media/VideoObject.stories.tsx +52 -0
- package/src/components/Media/VideoObject.tsx +58 -0
- package/src/components/Media/index.ts +6 -0
- package/src/components/MessageContainer.tsx +31 -50
- package/src/components/Participant/Participant.tsx +57 -0
- package/src/components/Participant/ParticipantGrid.tsx +88 -0
- package/src/components/Participant/index.ts +6 -0
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +54 -0
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +31 -0
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +156 -0
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +341 -0
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +131 -0
- package/src/components/ResponsiveGrid/index.ts +7 -0
- package/src/components/ThreadComplementary.tsx +37 -42
- package/src/components/index.ts +4 -0
- package/src/components/testing.ts +4 -3
- package/src/extensions/threads.ts +42 -24
- package/src/hooks/analytics.ts +6 -2
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useDebugMode.ts +25 -0
- package/src/index.ts +1 -1
- package/src/meta.ts +4 -3
- package/src/peers.stories.tsx +189 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/stories.ts +50 -0
- package/src/translations.ts +46 -5
- package/src/types/index.ts +6 -0
- package/src/types/schema.ts +29 -0
- package/src/types/types.ts +110 -0
- package/src/typings/peermetrics-webrtc-stats.d.ts +30 -0
- package/src/util.ts +12 -0
- package/dist/lib/browser/ChatContainer-WC6KQDDU.mjs +0 -138
- package/dist/lib/browser/ChatContainer-WC6KQDDU.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-6W4UKJDI.mjs +0 -41
- package/dist/lib/browser/app-graph-builder-6W4UKJDI.mjs.map +0 -7
- package/dist/lib/browser/chunk-AYNXYEKP.mjs.map +0 -7
- package/dist/lib/browser/chunk-EP6MRLY7.mjs.map +0 -7
- package/dist/lib/browser/chunk-FY5OCUP6.mjs +0 -207
- package/dist/lib/browser/chunk-FY5OCUP6.mjs.map +0 -7
- package/dist/lib/browser/chunk-Q66FBBJD.mjs +0 -17
- package/dist/lib/browser/chunk-Q66FBBJD.mjs.map +0 -7
- package/dist/lib/browser/chunk-WBJLUUOK.mjs.map +0 -7
- package/dist/lib/browser/chunk-WOG72DWE.mjs +0 -93
- package/dist/lib/browser/chunk-WOG72DWE.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3UW6ROYT.mjs.map +0 -7
- package/dist/lib/browser/markdown-7KXBXCUS.mjs +0 -111
- package/dist/lib/browser/markdown-7KXBXCUS.mjs.map +0 -7
- package/dist/lib/browser/react-surface-F2AIYIUH.mjs +0 -437
- package/dist/lib/browser/react-surface-F2AIYIUH.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -10
- package/dist/lib/node/ChatContainer-LVYQ67PJ.cjs +0 -163
- package/dist/lib/node/ChatContainer-LVYQ67PJ.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-HZNWT4QU.cjs +0 -57
- package/dist/lib/node/app-graph-builder-HZNWT4QU.cjs.map +0 -7
- package/dist/lib/node/chunk-46BSFPBV.cjs +0 -113
- package/dist/lib/node/chunk-46BSFPBV.cjs.map +0 -7
- package/dist/lib/node/chunk-IX63EKGL.cjs.map +0 -7
- package/dist/lib/node/chunk-NQ5DTPOY.cjs.map +0 -7
- package/dist/lib/node/chunk-RIYLEDQ7.cjs +0 -232
- package/dist/lib/node/chunk-RIYLEDQ7.cjs.map +0 -7
- package/dist/lib/node/chunk-W25MBII2.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-DC6HDNTX.cjs.map +0 -7
- package/dist/lib/node/markdown-L2WMCQKM.cjs +0 -121
- package/dist/lib/node/markdown-L2WMCQKM.cjs.map +0 -7
- package/dist/lib/node/react-surface-GP5IH5LN.cjs +0 -439
- package/dist/lib/node/react-surface-GP5IH5LN.cjs.map +0 -7
- package/dist/lib/node/types.cjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-WMOPMK5H.mjs +0 -139
- package/dist/lib/node-esm/ChatContainer-WMOPMK5H.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-M3KK5QJH.mjs +0 -42
- package/dist/lib/node-esm/app-graph-builder-M3KK5QJH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-42F2DTMM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7DOPZH6Y.mjs +0 -208
- package/dist/lib/node-esm/chunk-7DOPZH6Y.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E446MGLP.mjs +0 -94
- package/dist/lib/node-esm/chunk-E446MGLP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QUTIMZJ4.mjs +0 -19
- package/dist/lib/node-esm/chunk-QUTIMZJ4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-T6E5EY7Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WLY2HMDB.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-OAMDKGAA.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-ZKU23UVD.mjs +0 -112
- package/dist/lib/node-esm/markdown-ZKU23UVD.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-45GRKLWG.mjs +0 -438
- package/dist/lib/node-esm/react-surface-45GRKLWG.mjs.map +0 -7
- package/dist/lib/node-esm/types.mjs +0 -11
- package/dist/types/src/components/types.d.ts +0 -28
- package/dist/types/src/components/types.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/types.d.ts +0 -231
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/components/types.ts +0 -32
- package/src/events.ts +0 -11
- package/src/types.ts +0 -100
- /package/dist/lib/browser/{types.mjs.map → ChannelContainer-LGYSQMC7.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types.mjs.map → browser/ChatContainer-JWRI73OG.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-2VZ7S4SK.mjs.map → settings-KVBQQSO5.mjs.map} +0 -0
- /package/dist/lib/node/{settings-7MGTJ46L.cjs.map → settings-H45P5YO2.cjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-AJAZ3O47.mjs.map → settings-IJGUOU3F.mjs.map} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { Call } from '../components';
|
|
10
|
+
import { THREAD_PLUGIN } from '../meta';
|
|
11
|
+
|
|
12
|
+
export default () => {
|
|
13
|
+
return contributes(Capabilities.ReactRoot, {
|
|
14
|
+
id: THREAD_PLUGIN,
|
|
15
|
+
root: () => <Call.Audio />,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
@@ -4,55 +4,67 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createSurface,
|
|
8
|
-
import { type Ref } from '@dxos/echo-schema';
|
|
9
|
-
import { DXN } from '@dxos/keys';
|
|
7
|
+
import { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { isInstanceOf, type Ref } from '@dxos/echo-schema';
|
|
10
9
|
import { SettingsStore } from '@dxos/local-storage';
|
|
11
|
-
import {
|
|
12
|
-
import { getSpace, isSpace, type Space } from '@dxos/react-client/echo';
|
|
10
|
+
import { getSpace, isEchoObject } from '@dxos/react-client/echo';
|
|
13
11
|
|
|
14
|
-
import {
|
|
12
|
+
import { ThreadCapabilities } from './capabilities';
|
|
13
|
+
import {
|
|
14
|
+
CallSidebar,
|
|
15
|
+
CallDebugPanel,
|
|
16
|
+
ChannelContainer,
|
|
17
|
+
ThreadComplementary,
|
|
18
|
+
ThreadSettings,
|
|
19
|
+
ChatContainer,
|
|
20
|
+
} from '../components';
|
|
15
21
|
import { THREAD_PLUGIN } from '../meta';
|
|
16
|
-
import { type ThreadSettingsProps } from '../types';
|
|
22
|
+
import { ChannelType, ThreadType, type ThreadSettingsProps } from '../types';
|
|
17
23
|
|
|
18
24
|
export default () =>
|
|
19
25
|
contributes(Capabilities.ReactSurface, [
|
|
20
26
|
createSurface({
|
|
21
27
|
id: `${THREAD_PLUGIN}/channel`,
|
|
22
28
|
role: 'article',
|
|
23
|
-
filter: (data): data is { subject: ChannelType } => data.subject
|
|
24
|
-
component: ({ data: { subject: channel }, role }) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
filter: (data): data is { subject: ChannelType } => isInstanceOf(ChannelType, data.subject),
|
|
30
|
+
component: ({ data: { subject: channel }, role }) => <ChannelContainer channel={channel} role={role} />,
|
|
31
|
+
}),
|
|
32
|
+
createSurface({
|
|
33
|
+
id: `${THREAD_PLUGIN}/chat-companion`,
|
|
34
|
+
role: 'article',
|
|
35
|
+
filter: (data): data is { companionTo: ChannelType; subject: 'chat' } =>
|
|
36
|
+
isInstanceOf(ChannelType, data.companionTo) && data.subject === 'chat',
|
|
37
|
+
component: ({ data: { companionTo: channel } }) => {
|
|
29
38
|
const space = getSpace(channel);
|
|
30
|
-
|
|
39
|
+
const thread = channel.defaultThread.target;
|
|
40
|
+
if (!space || !thread) {
|
|
31
41
|
return null;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
return <ChatContainer
|
|
44
|
+
return <ChatContainer thread={thread} space={space} />;
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
createSurface({
|
|
48
|
+
id: `${THREAD_PLUGIN}/thread`,
|
|
49
|
+
role: 'article',
|
|
50
|
+
filter: (data): data is { subject: ThreadType } => isInstanceOf(ThreadType, data.subject),
|
|
51
|
+
component: ({ data: { subject: thread } }) => {
|
|
52
|
+
const space = getSpace(thread);
|
|
53
|
+
if (!space || !thread) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return <ChatContainer thread={thread} space={space} />;
|
|
35
58
|
},
|
|
36
59
|
}),
|
|
37
60
|
createSurface({
|
|
38
61
|
id: `${THREAD_PLUGIN}/comments`,
|
|
39
62
|
role: 'article',
|
|
40
63
|
filter: (data): data is { companionTo: { threads: Ref<ThreadType>[] } } =>
|
|
41
|
-
data.subject === 'comments' &&
|
|
42
|
-
!!data.companionTo &&
|
|
43
|
-
typeof data.companionTo === 'object' &&
|
|
44
|
-
'threads' in data.companionTo &&
|
|
45
|
-
Array.isArray(data.companionTo.threads),
|
|
64
|
+
data.subject === 'comments' && isEchoObject(data.companionTo),
|
|
46
65
|
// TODO(wittjosiah): This isn't scrolling properly in a plank.
|
|
47
66
|
component: ({ data }) => <ThreadComplementary subject={data.companionTo} />,
|
|
48
67
|
}),
|
|
49
|
-
createSurface({
|
|
50
|
-
id: `${THREAD_PLUGIN}/tabpanel`,
|
|
51
|
-
role: 'tabpanel',
|
|
52
|
-
filter: (data): data is { subject: DXN; space: Space } =>
|
|
53
|
-
data.subject instanceof DXN && data.type === 'chat' && isSpace(data.space),
|
|
54
|
-
component: ({ data: { subject: dxn, space } }) => <ChatContainer dxn={dxn} space={space} />,
|
|
55
|
-
}),
|
|
56
68
|
createSurface({
|
|
57
69
|
id: `${THREAD_PLUGIN}/plugin-settings`,
|
|
58
70
|
role: 'article',
|
|
@@ -60,4 +72,17 @@ export default () =>
|
|
|
60
72
|
data.subject instanceof SettingsStore && data.subject.prefix === THREAD_PLUGIN,
|
|
61
73
|
component: ({ data: { subject } }) => <ThreadSettings settings={subject.value} />,
|
|
62
74
|
}),
|
|
75
|
+
createSurface({
|
|
76
|
+
id: `${THREAD_PLUGIN}/assistant`,
|
|
77
|
+
role: 'deck-companion--active-call',
|
|
78
|
+
component: () => <CallSidebar />,
|
|
79
|
+
}),
|
|
80
|
+
createSurface({
|
|
81
|
+
id: `${THREAD_PLUGIN}/devtools-overview`,
|
|
82
|
+
role: 'devtools-overview',
|
|
83
|
+
component: () => {
|
|
84
|
+
const call = useCapability(ThreadCapabilities.CallManager);
|
|
85
|
+
return <CallDebugPanel state={call.state} />;
|
|
86
|
+
},
|
|
87
|
+
}),
|
|
63
88
|
]);
|
|
@@ -11,7 +11,7 @@ import { type ThreadState, type ViewStore } from '../types';
|
|
|
11
11
|
const initialViewState = { showResolvedThreads: false };
|
|
12
12
|
|
|
13
13
|
export default () => {
|
|
14
|
-
const state = live<ThreadState>({
|
|
14
|
+
const state = live<ThreadState>({ toolbar: {}, drafts: {} });
|
|
15
15
|
const viewStore = live<ViewStore>({});
|
|
16
16
|
|
|
17
17
|
const getViewState = (subjectId: string) => {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { type PropsWithChildren, type FC } from 'react';
|
|
6
|
+
|
|
7
|
+
import { useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { type ThemedClassName } from '@dxos/react-ui';
|
|
9
|
+
|
|
10
|
+
import { Toolbar, type ToolbarProps } from './Toolbar';
|
|
11
|
+
import { ThreadCapabilities } from '../../capabilities';
|
|
12
|
+
import { useDebugMode } from '../../hooks';
|
|
13
|
+
import { AudioStream } from '../Media';
|
|
14
|
+
import { ParticipantGrid } from '../Participant';
|
|
15
|
+
|
|
16
|
+
//
|
|
17
|
+
// Root
|
|
18
|
+
//
|
|
19
|
+
|
|
20
|
+
type CallRootProps = PropsWithChildren<ThemedClassName>;
|
|
21
|
+
|
|
22
|
+
const CallRoot: FC<CallRootProps> = ({ children }) => {
|
|
23
|
+
return <div className='relative flex flex-col grow overflow-hidden'>{children}</div>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
CallRoot.displayName = 'CallRoot';
|
|
27
|
+
|
|
28
|
+
//
|
|
29
|
+
// Audio
|
|
30
|
+
//
|
|
31
|
+
|
|
32
|
+
type CallAudioProps = {};
|
|
33
|
+
|
|
34
|
+
const CallAudio: FC<CallAudioProps> = () => {
|
|
35
|
+
const call = useCapability(ThreadCapabilities.CallManager);
|
|
36
|
+
|
|
37
|
+
return <AudioStream tracks={call.pulledAudioTracks} />;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
CallAudio.displayName = 'CallAudio';
|
|
41
|
+
|
|
42
|
+
//
|
|
43
|
+
// Room
|
|
44
|
+
//
|
|
45
|
+
|
|
46
|
+
type CallGridProps = {
|
|
47
|
+
fullscreen?: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const CallGrid: FC<CallGridProps> = ({ fullscreen }) => {
|
|
51
|
+
const debug = useDebugMode();
|
|
52
|
+
const call = useCapability(ThreadCapabilities.CallManager);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div className='grid grow p-4 dark:bg-neutral-900'>
|
|
56
|
+
<ParticipantGrid self={call.self} users={call.users} debug={debug} fullscreen={fullscreen} />
|
|
57
|
+
</div>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
CallGrid.displayName = 'CallGrid';
|
|
62
|
+
|
|
63
|
+
//
|
|
64
|
+
// Toolbar
|
|
65
|
+
//
|
|
66
|
+
|
|
67
|
+
type CallToolbarProps = Pick<ToolbarProps, 'channel' | 'onLeave'>;
|
|
68
|
+
|
|
69
|
+
const CallToolbar: FC<CallToolbarProps> = (props) => {
|
|
70
|
+
return (
|
|
71
|
+
<div className='absolute bottom-0 left-0 right-0 flex justify-center'>
|
|
72
|
+
<Toolbar isInRoom {...props} />
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
CallToolbar.displayName = 'CallToolbar';
|
|
78
|
+
|
|
79
|
+
//
|
|
80
|
+
// Export
|
|
81
|
+
//
|
|
82
|
+
|
|
83
|
+
export const Call = {
|
|
84
|
+
Root: CallRoot,
|
|
85
|
+
Grid: CallGrid,
|
|
86
|
+
Audio: CallAudio,
|
|
87
|
+
Toolbar: CallToolbar,
|
|
88
|
+
};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { useNode, useActions } from '@dxos/plugin-graph';
|
|
9
|
+
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
|
+
import {
|
|
11
|
+
Icon,
|
|
12
|
+
IconButton,
|
|
13
|
+
type IconButtonProps,
|
|
14
|
+
type ThemedClassName,
|
|
15
|
+
Toolbar as NativeToolbar,
|
|
16
|
+
toLocalizedString,
|
|
17
|
+
useTranslation,
|
|
18
|
+
} from '@dxos/react-ui';
|
|
19
|
+
import { hoverableHidden, mx } from '@dxos/react-ui-theme';
|
|
20
|
+
|
|
21
|
+
import { ThreadCapabilities } from '../../capabilities';
|
|
22
|
+
import { THREAD_PLUGIN } from '../../meta';
|
|
23
|
+
import { type ChannelType } from '../../types';
|
|
24
|
+
|
|
25
|
+
export type ToolbarProps = ThemedClassName<{
|
|
26
|
+
channel?: ChannelType;
|
|
27
|
+
participants?: number;
|
|
28
|
+
autoHideControls?: boolean;
|
|
29
|
+
isInRoom?: boolean;
|
|
30
|
+
onJoin?: () => void;
|
|
31
|
+
onLeave?: () => void;
|
|
32
|
+
}>;
|
|
33
|
+
|
|
34
|
+
// TODO(wittjosiah): Use ToolbarMenu.
|
|
35
|
+
export const Toolbar = ({
|
|
36
|
+
classNames,
|
|
37
|
+
channel,
|
|
38
|
+
participants,
|
|
39
|
+
autoHideControls = true,
|
|
40
|
+
onJoin,
|
|
41
|
+
onLeave,
|
|
42
|
+
}: ToolbarProps) => {
|
|
43
|
+
const { t } = useTranslation(THREAD_PLUGIN);
|
|
44
|
+
const { graph } = useAppGraph();
|
|
45
|
+
const call = useCapability(ThreadCapabilities.CallManager);
|
|
46
|
+
|
|
47
|
+
// Channel app graph node.
|
|
48
|
+
const node = useNode(graph, channel && fullyQualifiedId(channel));
|
|
49
|
+
const actions = useActions(graph, node?.id).filter((action) => action.properties.disposition === 'toolbar');
|
|
50
|
+
|
|
51
|
+
// Screen sharing.
|
|
52
|
+
const isScreensharing = call.media.screenshareTrack !== undefined;
|
|
53
|
+
const canSharescreen =
|
|
54
|
+
typeof navigator.mediaDevices !== 'undefined' && navigator.mediaDevices.getDisplayMedia !== undefined;
|
|
55
|
+
|
|
56
|
+
// TODO(wittjosiah): In order to use toolbar, need to update to actually use the graph action callbacks directly.
|
|
57
|
+
return (
|
|
58
|
+
<div className={mx('z-20 flex justify-center m-8', autoHideControls && hoverableHidden)}>
|
|
59
|
+
<NativeToolbar.Root classNames={['p-2 bg-modalSurface rounded-lg shadow-lg', classNames]}>
|
|
60
|
+
<ToggleButton
|
|
61
|
+
active={call.media.audioEnabled}
|
|
62
|
+
state={{
|
|
63
|
+
on: {
|
|
64
|
+
icon: 'ph--microphone--regular',
|
|
65
|
+
label: t('mic off'),
|
|
66
|
+
onClick: () => call.turnAudioOff(),
|
|
67
|
+
classNames: 'bg-callActive',
|
|
68
|
+
},
|
|
69
|
+
off: {
|
|
70
|
+
icon: 'ph--microphone-slash--duotone',
|
|
71
|
+
label: t('mic on'),
|
|
72
|
+
onClick: () => call.turnAudioOn(),
|
|
73
|
+
classNames: [call.joined && 'bg-callAlert'],
|
|
74
|
+
},
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
<ToggleButton
|
|
78
|
+
active={call.media.videoEnabled}
|
|
79
|
+
state={{
|
|
80
|
+
on: {
|
|
81
|
+
icon: 'ph--video-camera--regular',
|
|
82
|
+
label: t('camera off'),
|
|
83
|
+
onClick: () => call.turnVideoOff(),
|
|
84
|
+
},
|
|
85
|
+
off: {
|
|
86
|
+
icon: 'ph--video-camera-slash--duotone',
|
|
87
|
+
label: t('camera on'),
|
|
88
|
+
onClick: () => call.turnVideoOn(),
|
|
89
|
+
},
|
|
90
|
+
}}
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
{(participants !== undefined && (
|
|
94
|
+
<div className='flex justify-center items-center gap-2 is-[5rem] text-xs text-subdued'>
|
|
95
|
+
<Icon icon='ph--users--regular' size={4} />
|
|
96
|
+
<div>{participants}</div>
|
|
97
|
+
</div>
|
|
98
|
+
)) || <NativeToolbar.Separator variant='gap' />}
|
|
99
|
+
|
|
100
|
+
{call.joined && (
|
|
101
|
+
<>
|
|
102
|
+
<ToggleButton
|
|
103
|
+
disabled={!canSharescreen}
|
|
104
|
+
active={isScreensharing}
|
|
105
|
+
state={{
|
|
106
|
+
on: {
|
|
107
|
+
icon: 'ph--monitor--regular',
|
|
108
|
+
label: t('screenshare off'),
|
|
109
|
+
onClick: () => call.turnScreenshareOff(),
|
|
110
|
+
},
|
|
111
|
+
off: {
|
|
112
|
+
icon: 'ph--monitor-arrow-up--duotone',
|
|
113
|
+
label: t('screenshare on'),
|
|
114
|
+
onClick: () => call.turnScreenshareOn(),
|
|
115
|
+
},
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
|
|
119
|
+
{/* Companion actions. */}
|
|
120
|
+
{actions.map((action) => (
|
|
121
|
+
<IconButton
|
|
122
|
+
key={action.id}
|
|
123
|
+
{...defaultButtonProps}
|
|
124
|
+
icon={action.properties.icon}
|
|
125
|
+
label={toLocalizedString(action.properties.label, t)}
|
|
126
|
+
classNames={action.properties.classNames}
|
|
127
|
+
onClick={() => action.data({ node })}
|
|
128
|
+
/>
|
|
129
|
+
))}
|
|
130
|
+
|
|
131
|
+
<ToggleButton
|
|
132
|
+
active={call.raisedHand}
|
|
133
|
+
state={{
|
|
134
|
+
on: {
|
|
135
|
+
icon: 'ph--hand-waving--regular',
|
|
136
|
+
label: t('lower hand'),
|
|
137
|
+
onClick: () => call.setRaisedHand(false),
|
|
138
|
+
classNames: [call.joined && 'bg-callAlert'],
|
|
139
|
+
},
|
|
140
|
+
off: {
|
|
141
|
+
icon: 'ph--hand-palm--duotone',
|
|
142
|
+
label: t('raise hand'),
|
|
143
|
+
onClick: () => call.setRaisedHand(true),
|
|
144
|
+
},
|
|
145
|
+
}}
|
|
146
|
+
/>
|
|
147
|
+
</>
|
|
148
|
+
)}
|
|
149
|
+
{call.joined ? (
|
|
150
|
+
<IconButton variant='destructive' icon='ph--phone-x--regular' label={t('leave call')} onClick={onLeave} />
|
|
151
|
+
) : (
|
|
152
|
+
<IconButton variant='primary' icon='ph--phone-incoming--regular' label={t('join call')} onClick={onJoin} />
|
|
153
|
+
)}
|
|
154
|
+
</NativeToolbar.Root>
|
|
155
|
+
</div>
|
|
156
|
+
);
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
Toolbar.displayName = 'MeetingToolbar';
|
|
160
|
+
|
|
161
|
+
type ToolbarButtonProps = Pick<IconButtonProps, 'disabled'> & {
|
|
162
|
+
active?: boolean;
|
|
163
|
+
state: {
|
|
164
|
+
on: Pick<IconButtonProps, 'icon' | 'label' | 'onClick' | 'classNames'>;
|
|
165
|
+
off: Pick<IconButtonProps, 'icon' | 'label' | 'onClick' | 'classNames'>;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const defaultButtonProps: Partial<IconButtonProps> = {
|
|
170
|
+
size: 5,
|
|
171
|
+
iconOnly: true,
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const ToggleButton = ({ active, state }: ToolbarButtonProps) => (
|
|
175
|
+
<IconButton
|
|
176
|
+
{...defaultButtonProps}
|
|
177
|
+
classNames={[active ? state.on.classNames ?? 'bg-callActive' : state.off.classNames]}
|
|
178
|
+
icon={active ? state.on.icon : state.off.icon}
|
|
179
|
+
label={active ? state.on.label : state.off.label}
|
|
180
|
+
onClick={active ? state.on.onClick : state.off.onClick}
|
|
181
|
+
/>
|
|
182
|
+
);
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { WebRTCStats } from '@peermetrics/webrtc-stats';
|
|
6
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { Panel } from '@dxos/devtools';
|
|
9
|
+
import { log } from '@dxos/log';
|
|
10
|
+
import { Input, useTranslation, type ThemedClassName } from '@dxos/react-ui';
|
|
11
|
+
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
12
|
+
|
|
13
|
+
import { type GlobalState } from '../calls';
|
|
14
|
+
import { THREAD_PLUGIN } from '../meta';
|
|
15
|
+
|
|
16
|
+
export type CallDebugPanelProps = ThemedClassName<{
|
|
17
|
+
state?: GlobalState;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
21
|
+
const users = state?.call?.users;
|
|
22
|
+
const self = state?.call?.self;
|
|
23
|
+
const { t } = useTranslation(THREAD_PLUGIN);
|
|
24
|
+
|
|
25
|
+
const [open, setOpen] = useState(false);
|
|
26
|
+
const handleToggle = () => setOpen(!open);
|
|
27
|
+
const [showDetailedWebRTCStats, setShowDetailedWebRTCStats] = useState(false);
|
|
28
|
+
const handleShowDetailedWebRTCStats = () => setShowDetailedWebRTCStats(!showDetailedWebRTCStats);
|
|
29
|
+
|
|
30
|
+
const webrtcStats = useMemo(
|
|
31
|
+
() =>
|
|
32
|
+
new WebRTCStats({
|
|
33
|
+
getStatsInterval: 1000,
|
|
34
|
+
}),
|
|
35
|
+
[],
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const [stats, setStats] = useState<Record<string, any>>({});
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const pc = state?.media.peer?.session?.peerConnection;
|
|
41
|
+
const handleStats = (stats: Record<string, any>) => setStats(stats.data);
|
|
42
|
+
let added = false;
|
|
43
|
+
if (pc && showDetailedWebRTCStats) {
|
|
44
|
+
webrtcStats.addConnection({ pc, peerId: 1, connectionId: '1' });
|
|
45
|
+
webrtcStats.on('stats', handleStats);
|
|
46
|
+
added = true;
|
|
47
|
+
}
|
|
48
|
+
return () => {
|
|
49
|
+
try {
|
|
50
|
+
if (pc && added) {
|
|
51
|
+
webrtcStats.removeConnection({ pc });
|
|
52
|
+
webrtcStats.removeListener('stats', handleStats);
|
|
53
|
+
}
|
|
54
|
+
} catch (error) {
|
|
55
|
+
log.error('error removing webrtc stats', { error, pc, peerId: 1, connectionId: '1' });
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}, [state?.media.peer?.session?.peerConnection, showDetailedWebRTCStats]);
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<Panel
|
|
62
|
+
id='meeting-status'
|
|
63
|
+
icon='ph--video-conference--regular'
|
|
64
|
+
open={open}
|
|
65
|
+
onToggle={handleToggle}
|
|
66
|
+
title={t('meeting status title')}
|
|
67
|
+
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
|
+
}
|
|
74
|
+
>
|
|
75
|
+
<div className='flex flex-col gap-2 overflow-y-auto'>
|
|
76
|
+
<div className='flex items-row gap-2'>
|
|
77
|
+
<Input.Root>
|
|
78
|
+
<Input.Label classNames={'text-sm'}>{t('show webrtc stats title')}</Input.Label>
|
|
79
|
+
<Input.Checkbox checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
|
|
80
|
+
</Input.Root>
|
|
81
|
+
</div>
|
|
82
|
+
<Json
|
|
83
|
+
classNames='text-sm'
|
|
84
|
+
data={{
|
|
85
|
+
users,
|
|
86
|
+
activities: state?.call?.activities,
|
|
87
|
+
...(showDetailedWebRTCStats
|
|
88
|
+
? {
|
|
89
|
+
webrtc: {
|
|
90
|
+
connectionState: state?.media.peer?.session?.peerConnection.connectionState,
|
|
91
|
+
iceConnectionState: state?.media.peer?.session?.peerConnection.iceConnectionState,
|
|
92
|
+
stats,
|
|
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
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</Panel>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { useCapability } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { ChannelContainer } from './ChannelContainer';
|
|
10
|
+
import { ThreadCapabilities } from '../capabilities';
|
|
11
|
+
|
|
12
|
+
export const CallSidebar = () => {
|
|
13
|
+
const call = useCapability(ThreadCapabilities.CallManager);
|
|
14
|
+
return <ChannelContainer roomId={call.roomId} />;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default CallSidebar;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import '@dxos-theme';
|
|
6
|
+
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
import { contributes } from '@dxos/app-framework';
|
|
11
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
|
+
import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
14
|
+
import { DataType } from '@dxos/schema';
|
|
15
|
+
import { withLayout, ColumnContainer } from '@dxos/storybook-utils';
|
|
16
|
+
|
|
17
|
+
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
18
|
+
import { createThreadPlugins } from '../testing';
|
|
19
|
+
import translations from '../translations';
|
|
20
|
+
import { ChannelType, ThreadType } from '../types';
|
|
21
|
+
|
|
22
|
+
// TODO(wittjosiah): Channel doesn't render full height.
|
|
23
|
+
const Story = () => {
|
|
24
|
+
const space = useSpace();
|
|
25
|
+
const [channel] = useQuery(space, Query.type(ChannelType));
|
|
26
|
+
if (!channel) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return <ChannelContainer channel={channel} />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const meta: Meta<ChannelContainerProps> = {
|
|
34
|
+
title: 'plugins/plugin-thread/ChannelContainer',
|
|
35
|
+
component: ChannelContainer,
|
|
36
|
+
render: () => <Story />,
|
|
37
|
+
decorators: [
|
|
38
|
+
withPluginManager({
|
|
39
|
+
plugins: [...(await createThreadPlugins())],
|
|
40
|
+
capabilities: [contributes(ClientCapabilities.Schema, [ChannelType, ThreadType, DataType.Message])],
|
|
41
|
+
}),
|
|
42
|
+
withLayout({ Container: ColumnContainer, classNames: 'w-[40rem] overflow-hidden' }),
|
|
43
|
+
],
|
|
44
|
+
parameters: {
|
|
45
|
+
translations,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default meta;
|
|
50
|
+
|
|
51
|
+
type Story = StoryObj<ChannelContainerProps>;
|
|
52
|
+
|
|
53
|
+
export const Default: Story = {
|
|
54
|
+
args: {
|
|
55
|
+
// Fixed room for testing.
|
|
56
|
+
roomId: '04a1d1911703b8e929d0649021a965',
|
|
57
|
+
},
|
|
58
|
+
};
|