@dxos/plugin-thread 0.8.4-main.fd6878d → 0.9.0
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/LICENSE +102 -5
- package/PLUGIN.mdl +75 -0
- package/README.md +1 -1
- package/dist/lib/neutral/ChannelArticle-H633OM3U.mjs +57 -0
- package/dist/lib/neutral/ChannelArticle-H633OM3U.mjs.map +7 -0
- package/dist/lib/neutral/ChannelCreatePanel-NUXXKHZQ.mjs +38 -0
- package/dist/lib/neutral/ChannelCreatePanel-NUXXKHZQ.mjs.map +7 -0
- package/dist/lib/neutral/ThreadArticle-ROQXQLEZ.mjs +57 -0
- package/dist/lib/neutral/ThreadArticle-ROQXQLEZ.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.mjs +67 -0
- package/dist/lib/neutral/ThreadPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs +29 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs +27 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-OLKN3VTB.mjs +50 -0
- package/dist/lib/neutral/app-graph-builder-OLKN3VTB.mjs.map +7 -0
- package/dist/lib/neutral/append-channel-message-J6DXDPBH.mjs +34 -0
- package/dist/lib/neutral/append-channel-message-J6DXDPBH.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +19 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/channel-backend-feed-FCXGAIEC.mjs +58 -0
- package/dist/lib/neutral/channel-backend-feed-FCXGAIEC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-AWAQTEU6.mjs +10 -0
- package/dist/lib/neutral/chunk-AWAQTEU6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HJHK5O6F.mjs +109 -0
- package/dist/lib/neutral/chunk-HJHK5O6F.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-OOC6EQ7X.mjs +36 -0
- package/dist/lib/neutral/chunk-OOC6EQ7X.mjs.map +7 -0
- package/dist/lib/neutral/chunk-P4RSGFS4.mjs +69 -0
- package/dist/lib/neutral/chunk-P4RSGFS4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SZXFLBZL.mjs +8 -0
- package/dist/lib/neutral/chunk-SZXFLBZL.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +93 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-channel-UW2LSL4G.mjs +41 -0
- package/dist/lib/neutral/create-channel-UW2LSL4G.mjs.map +7 -0
- package/dist/lib/neutral/create-object-RLCOUVAW.mjs +46 -0
- package/dist/lib/neutral/create-object-RLCOUVAW.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +11 -0
- package/dist/lib/neutral/index.mjs +34 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/navigation-resolver-4X4HCQYX.mjs +14 -0
- package/dist/lib/neutral/navigation-resolver-4X4HCQYX.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs +13 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-G6KT7TSU.mjs +48 -0
- package/dist/lib/neutral/react-surface-G6KT7TSU.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +91 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +16 -0
- package/dist/types/src/ThreadPlugin.d.ts +3 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.test.d.ts +2 -0
- package/dist/types/src/ThreadPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/channel-backend-feed.d.ts +13 -0
- package/dist/types/src/capabilities/channel-backend-feed.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +12 -14
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +43 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +2 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -10
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +19 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts +162 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ChannelArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts +11 -0
- package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelCreatePanel/index.d.ts +2 -0
- package/dist/types/src/containers/ChannelCreatePanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts +20 -0
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.stories.d.ts +162 -0
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ThreadArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useMessages.d.ts +4 -0
- package/dist/types/src/hooks/useMessages.d.ts.map +1 -0
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/append-channel-message.d.ts +5 -0
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -0
- package/dist/types/src/operations/create-channel.d.ts +5 -0
- package/dist/types/src/operations/create-channel.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/paths.d.ts +3 -0
- package/dist/types/src/paths.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +142 -72
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ThreadCapabilities.d.ts +37 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/ThreadOperation.d.ts +91 -0
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
- package/dist/types/src/types/channel-backend.d.ts +16 -0
- package/dist/types/src/types/channel-backend.d.ts.map +1 -0
- package/dist/types/src/types/channel-backend.test.d.ts +2 -0
- package/dist/types/src/types/channel-backend.test.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +4 -20
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +108 -81
- package/src/ThreadPlugin.node.ts +26 -0
- package/src/ThreadPlugin.test.ts +27 -0
- package/src/ThreadPlugin.tsx +38 -144
- package/src/ThreadPlugin.workerd.ts +25 -0
- package/src/capabilities/app-graph-builder.ts +44 -174
- package/src/capabilities/channel-backend-feed.ts +60 -0
- package/src/capabilities/create-object.ts +46 -0
- package/src/capabilities/index.ts +11 -11
- package/src/capabilities/navigation-resolver.ts +18 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +39 -79
- package/src/components/Chat/Chat.tsx +119 -0
- package/src/components/Chat/index.ts +5 -0
- package/src/components/index.ts +1 -14
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +108 -0
- package/src/containers/ChannelArticle/ChannelArticle.tsx +83 -0
- package/src/containers/ChannelArticle/index.ts +5 -0
- package/src/containers/ChannelCreatePanel/ChannelCreatePanel.tsx +52 -0
- package/src/containers/ChannelCreatePanel/index.ts +5 -0
- package/src/containers/ThreadArticle/ThreadArticle.stories.tsx +86 -0
- package/src/containers/ThreadArticle/ThreadArticle.tsx +75 -0
- package/src/containers/ThreadArticle/index.ts +5 -0
- package/src/containers/index.ts +9 -0
- package/src/hooks/index.ts +1 -4
- package/src/hooks/useMessages.ts +37 -0
- package/src/index.ts +4 -4
- package/src/meta.ts +27 -9
- package/src/operations/append-channel-message.ts +31 -0
- package/src/operations/create-channel.ts +30 -0
- package/src/operations/index.ts +10 -0
- package/src/paths.ts +10 -0
- package/src/plugin.ts +11 -0
- package/src/translations.ts +75 -73
- package/src/types/ThreadCapabilities.ts +47 -0
- package/src/types/ThreadOperation.ts +49 -0
- package/src/types/channel-backend.test.ts +48 -0
- package/src/types/channel-backend.ts +54 -0
- package/src/types/index.ts +3 -2
- package/src/util.ts +35 -18
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/ChannelContainer-O2SFQJU7.mjs +0 -16
- package/dist/lib/browser/ChatContainer-PVT3DUZJ.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-AF3M7UWN.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-AF3M7UWN.mjs.map +0 -7
- package/dist/lib/browser/call-manager-XRRCAVLI.mjs +0 -24
- package/dist/lib/browser/call-manager-XRRCAVLI.mjs.map +0 -7
- package/dist/lib/browser/chunk-2CWJBXBH.mjs +0 -21
- package/dist/lib/browser/chunk-2CWJBXBH.mjs.map +0 -7
- package/dist/lib/browser/chunk-4APCDRSH.mjs +0 -18
- package/dist/lib/browser/chunk-4APCDRSH.mjs.map +0 -7
- package/dist/lib/browser/chunk-DW7JD64V.mjs +0 -137
- package/dist/lib/browser/chunk-DW7JD64V.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-FY4ZRD5X.mjs +0 -367
- package/dist/lib/browser/chunk-FY4ZRD5X.mjs.map +0 -7
- package/dist/lib/browser/chunk-GERVMFQW.mjs +0 -31
- package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
- package/dist/lib/browser/chunk-J3JO5NWO.mjs +0 -477
- package/dist/lib/browser/chunk-J3JO5NWO.mjs.map +0 -7
- package/dist/lib/browser/chunk-JGKMMI65.mjs +0 -56
- package/dist/lib/browser/chunk-JGKMMI65.mjs.map +0 -7
- package/dist/lib/browser/chunk-TUFWPOVS.mjs +0 -1698
- package/dist/lib/browser/chunk-TUFWPOVS.mjs.map +0 -7
- package/dist/lib/browser/chunk-X5PIP5YR.mjs +0 -149
- package/dist/lib/browser/chunk-X5PIP5YR.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZJ7QBXK6.mjs +0 -984
- package/dist/lib/browser/chunk-ZJ7QBXK6.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -302
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-DCY4P4OX.mjs +0 -369
- package/dist/lib/browser/intent-resolver-DCY4P4OX.mjs.map +0 -7
- package/dist/lib/browser/markdown-WZSXCEZJ.mjs +0 -169
- package/dist/lib/browser/markdown-WZSXCEZJ.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-root-QXPALOUQ.mjs +0 -28
- package/dist/lib/browser/react-root-QXPALOUQ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PYAMIADB.mjs +0 -109
- package/dist/lib/browser/react-surface-PYAMIADB.mjs.map +0 -7
- package/dist/lib/browser/settings-AC6YSASL.mjs +0 -22
- package/dist/lib/browser/settings-AC6YSASL.mjs.map +0 -7
- package/dist/lib/browser/state-2T4KDWBX.mjs +0 -34
- package/dist/lib/browser/state-2T4KDWBX.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -16
- package/dist/lib/node-esm/ChannelContainer-B2ZGAE4P.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-2CT4PJ7I.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-OLSJVCWY.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-OLSJVCWY.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-EI7FXRAU.mjs +0 -25
- package/dist/lib/node-esm/call-manager-EI7FXRAU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4TME3BR4.mjs +0 -1699
- package/dist/lib/node-esm/chunk-4TME3BR4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs +0 -33
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6CRHHOST.mjs +0 -23
- package/dist/lib/node-esm/chunk-6CRHHOST.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BF4UKS55.mjs +0 -368
- package/dist/lib/node-esm/chunk-BF4UKS55.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-PYTVBN5J.mjs +0 -19
- package/dist/lib/node-esm/chunk-PYTVBN5J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QBHKLWGR.mjs +0 -58
- package/dist/lib/node-esm/chunk-QBHKLWGR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SED3O2XO.mjs +0 -150
- package/dist/lib/node-esm/chunk-SED3O2XO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VNG6M2IY.mjs +0 -478
- package/dist/lib/node-esm/chunk-VNG6M2IY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XVKWHTH4.mjs +0 -138
- package/dist/lib/node-esm/chunk-XVKWHTH4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YIDU3DXK.mjs +0 -985
- package/dist/lib/node-esm/chunk-YIDU3DXK.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -303
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-QGTPU6QB.mjs +0 -370
- package/dist/lib/node-esm/intent-resolver-QGTPU6QB.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-3MZXUGUA.mjs +0 -170
- package/dist/lib/node-esm/markdown-3MZXUGUA.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-root-7ZFJYVUZ.mjs +0 -29
- package/dist/lib/node-esm/react-root-7ZFJYVUZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-UJFCSFNO.mjs +0 -110
- package/dist/lib/node-esm/react-surface-UJFCSFNO.mjs.map +0 -7
- package/dist/lib/node-esm/settings-N52O7MLS.mjs +0 -23
- package/dist/lib/node-esm/settings-N52O7MLS.mjs.map +0 -7
- package/dist/lib/node-esm/state-62TQKQVB.mjs +0 -35
- package/dist/lib/node-esm/state-62TQKQVB.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -17
- package/dist/types/src/calls/call-manager.d.ts +0 -77
- package/dist/types/src/calls/call-manager.d.ts.map +0 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +0 -66
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +0 -1
- package/dist/types/src/calls/index.d.ts +0 -7
- package/dist/types/src/calls/index.d.ts.map +0 -1
- package/dist/types/src/calls/media-manager.d.ts +0 -60
- package/dist/types/src/calls/media-manager.d.ts.map +0 -1
- package/dist/types/src/calls/speaking-monitor.d.ts +0 -24
- package/dist/types/src/calls/speaking-monitor.d.ts.map +0 -1
- package/dist/types/src/calls/types.d.ts +0 -45
- package/dist/types/src/calls/types.d.ts.map +0 -1
- package/dist/types/src/calls/util/audio.d.ts +0 -6
- package/dist/types/src/calls/util/audio.d.ts.map +0 -1
- package/dist/types/src/calls/util/calls-service.d.ts +0 -75
- package/dist/types/src/calls/util/calls-service.d.ts.map +0 -1
- package/dist/types/src/calls/util/history-cache.d.ts +0 -11
- package/dist/types/src/calls/util/history-cache.d.ts.map +0 -1
- package/dist/types/src/calls/util/index.d.ts +0 -5
- package/dist/types/src/calls/util/index.d.ts.map +0 -1
- package/dist/types/src/calls/util/media.d.ts +0 -6
- package/dist/types/src/calls/util/media.d.ts.map +0 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts +0 -18
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +0 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +0 -17
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +0 -1
- package/dist/types/src/calls-service.stories.d.ts +0 -22
- package/dist/types/src/calls-service.stories.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager.d.ts +0 -5
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -27
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -4
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -7
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/Call/Call.d.ts +0 -17
- package/dist/types/src/components/Call/Call.d.ts.map +0 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +0 -16
- package/dist/types/src/components/Call/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Call/index.d.ts +0 -3
- package/dist/types/src/components/Call/index.d.ts.map +0 -1
- package/dist/types/src/components/CallDebugPanel.d.ts +0 -8
- package/dist/types/src/components/CallDebugPanel.d.ts.map +0 -1
- package/dist/types/src/components/CallSidebar.d.ts +0 -4
- package/dist/types/src/components/CallSidebar.d.ts.map +0 -1
- package/dist/types/src/components/ChannelContainer.d.ts +0 -14
- package/dist/types/src/components/ChannelContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +0 -10
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chat.stories.d.ts +0 -7
- package/dist/types/src/components/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -17
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -6
- package/dist/types/src/components/Comments.stories.d.ts.map +0 -1
- package/dist/types/src/components/CommentsContainer.d.ts +0 -13
- package/dist/types/src/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +0 -14
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts +0 -15
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/index.d.ts +0 -2
- package/dist/types/src/components/Lobby/index.d.ts.map +0 -1
- package/dist/types/src/components/Media/AudioStream.d.ts +0 -6
- package/dist/types/src/components/Media/AudioStream.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +0 -15
- package/dist/types/src/components/Media/VideoObject.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +0 -8
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +0 -1
- package/dist/types/src/components/Media/index.d.ts +0 -3
- package/dist/types/src/components/Media/index.d.ts.map +0 -1
- package/dist/types/src/components/MessageContainer.d.ts +0 -11
- package/dist/types/src/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/components/Participant/Participant.d.ts +0 -6
- package/dist/types/src/components/Participant/Participant.d.ts.map +0 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts +0 -11
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +0 -1
- package/dist/types/src/components/Participant/index.d.ts +0 -3
- package/dist/types/src/components/Participant/index.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts +0 -12
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -10
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts +0 -32
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +0 -23
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts +0 -21
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +0 -4
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +0 -1
- 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/components/ThreadSettings.d.ts +0 -6
- package/dist/types/src/components/ThreadSettings.d.ts.map +0 -1
- package/dist/types/src/components/command-extension.d.ts +0 -3
- package/dist/types/src/components/command-extension.d.ts.map +0 -1
- package/dist/types/src/components/testing.d.ts +0 -4
- package/dist/types/src/components/testing.d.ts.map +0 -1
- package/dist/types/src/extensions/index.d.ts +0 -2
- package/dist/types/src/extensions/index.d.ts.map +0 -1
- package/dist/types/src/extensions/threads.d.ts +0 -9
- package/dist/types/src/extensions/threads.d.ts.map +0 -1
- package/dist/types/src/hooks/analytics.d.ts +0 -4
- package/dist/types/src/hooks/analytics.d.ts.map +0 -1
- package/dist/types/src/hooks/useDebugMode.d.ts +0 -2
- package/dist/types/src/hooks/useDebugMode.d.ts.map +0 -1
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +0 -3
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/stories.d.ts +0 -2
- package/dist/types/src/testing/stories.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -164
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -388
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/calls/call-manager.ts +0 -246
- package/src/calls/call-swarm-synchronizer.ts +0 -350
- package/src/calls/index.ts +0 -10
- package/src/calls/media-manager.ts +0 -349
- package/src/calls/speaking-monitor.ts +0 -85
- package/src/calls/types.ts +0 -70
- package/src/calls/util/audio.ts +0 -58
- package/src/calls/util/calls-service.ts +0 -531
- package/src/calls/util/history-cache.ts +0 -27
- package/src/calls/util/index.ts +0 -8
- package/src/calls/util/media.ts +0 -52
- package/src/calls/util/stub-media-streams.ts +0 -70
- package/src/calls/util/task-scheduling.ts +0 -92
- package/src/calls-service.stories.tsx +0 -216
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -315
- package/src/capabilities/markdown.ts +0 -69
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -26
- package/src/components/Call/Call.tsx +0 -89
- package/src/components/Call/Toolbar.tsx +0 -182
- package/src/components/Call/index.ts +0 -6
- package/src/components/CallDebugPanel.tsx +0 -115
- package/src/components/CallSidebar.tsx +0 -18
- package/src/components/ChannelContainer.stories.tsx +0 -59
- package/src/components/ChannelContainer.tsx +0 -201
- package/src/components/Chat.stories.tsx +0 -89
- package/src/components/ChatContainer.tsx +0 -142
- package/src/components/Comments.stories.tsx +0 -93
- package/src/components/CommentsContainer.tsx +0 -72
- package/src/components/CommentsThreadContainer.tsx +0 -168
- package/src/components/Lobby/Lobby.tsx +0 -119
- package/src/components/Lobby/index.ts +0 -5
- package/src/components/Media/AudioStream.tsx +0 -67
- package/src/components/Media/VideoObject.stories.tsx +0 -53
- package/src/components/Media/VideoObject.tsx +0 -58
- package/src/components/Media/index.ts +0 -6
- package/src/components/MessageContainer.tsx +0 -152
- package/src/components/Participant/Participant.tsx +0 -57
- package/src/components/Participant/ParticipantGrid.tsx +0 -89
- package/src/components/Participant/index.ts +0 -6
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +0 -55
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +0 -31
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +0 -157
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +0 -341
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +0 -131
- package/src/components/ResponsiveGrid/index.ts +0 -7
- package/src/components/ThreadComplementary.tsx +0 -151
- package/src/components/ThreadSettings.tsx +0 -17
- package/src/components/command-extension.ts +0 -33
- package/src/components/testing.ts +0 -29
- package/src/extensions/index.ts +0 -5
- package/src/extensions/threads.ts +0 -126
- package/src/hooks/analytics.ts +0 -40
- package/src/hooks/useDebugMode.ts +0 -25
- package/src/hooks/useInaudibleAudioStreamTrack.tsx +0 -27
- package/src/hooks/useVideoStreamTrack.tsx +0 -33
- package/src/testing/index.ts +0 -5
- package/src/testing/stories.ts +0 -54
- package/src/types/schema.ts +0 -33
- package/src/types/types.ts +0 -119
- package/src/typings/peermetrics-webrtc-stats.d.ts +0 -30
- package/src/typings.d.ts +0 -8
- /package/dist/lib/{browser/ChannelContainer-O2SFQJU7.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/hooks}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{browser/ChatContainer-PVT3DUZJ.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChannelContainer-B2ZGAE4P.mjs.map → neutral/operations/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChatContainer-2CT4PJ7I.mjs.map → neutral/types/index.mjs.map} +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { EditorView } from '@codemirror/view';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
|
-
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
9
|
-
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
10
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
11
|
-
import { type EditorState, commentClickedEffect, commentsState, overlap } from '@dxos/react-ui-editor';
|
|
12
|
-
|
|
13
|
-
import { threads } from '../extensions';
|
|
14
|
-
|
|
15
|
-
import { ThreadCapabilities } from './capabilities';
|
|
16
|
-
|
|
17
|
-
export default (context: PluginContext) =>
|
|
18
|
-
contributes(MarkdownCapabilities.Extensions, [
|
|
19
|
-
({ document: doc }) => {
|
|
20
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
21
|
-
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
22
|
-
return threads(state, doc, dispatch);
|
|
23
|
-
},
|
|
24
|
-
({ document: doc }) => {
|
|
25
|
-
const { state } = context.getCapability(ThreadCapabilities.MutableState);
|
|
26
|
-
|
|
27
|
-
return EditorView.updateListener.of((update) => {
|
|
28
|
-
if (update.docChanged || update.selectionSet) {
|
|
29
|
-
state.toolbar[fullyQualifiedId(doc)] = selectionOverlapsComment(update.state);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
({ document: doc }) => {
|
|
34
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
35
|
-
const id = fullyQualifiedId(doc);
|
|
36
|
-
|
|
37
|
-
return EditorView.updateListener.of((update) => {
|
|
38
|
-
update.transactions.forEach((transaction) => {
|
|
39
|
-
transaction.effects.forEach(async (effect) => {
|
|
40
|
-
if (effect.is(commentClickedEffect)) {
|
|
41
|
-
void dispatch(
|
|
42
|
-
createIntent(DeckAction.ChangeCompanion, {
|
|
43
|
-
primary: id,
|
|
44
|
-
companion: `${id}${ATTENDABLE_PATH_SEPARATOR}comments`,
|
|
45
|
-
}),
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
]);
|
|
53
|
-
|
|
54
|
-
const selectionOverlapsComment = (state: EditorState): boolean => {
|
|
55
|
-
// May not be defined if thread plugin not installed.
|
|
56
|
-
const commentState = state.field(commentsState, false);
|
|
57
|
-
if (commentState === undefined) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const { selection } = state;
|
|
62
|
-
for (const range of selection.ranges) {
|
|
63
|
-
if (commentState.comments.some(({ range: commentRange }) => overlap(commentRange, range))) {
|
|
64
|
-
return true;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return false;
|
|
69
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
import { type ThreadSettingsProps, ThreadSettingsSchema } from '../types';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const settings = live<ThreadSettingsProps>({});
|
|
13
|
-
|
|
14
|
-
return contributes(Capabilities.Settings, {
|
|
15
|
-
prefix: meta.id,
|
|
16
|
-
schema: ThreadSettingsSchema,
|
|
17
|
-
value: settings,
|
|
18
|
-
});
|
|
19
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { type ThreadState, type ViewStore } from '../types';
|
|
9
|
-
|
|
10
|
-
import { ThreadCapabilities } from './capabilities';
|
|
11
|
-
|
|
12
|
-
const initialViewState = { showResolvedThreads: false };
|
|
13
|
-
|
|
14
|
-
export default () => {
|
|
15
|
-
const state = live<ThreadState>({ toolbar: {}, drafts: {} });
|
|
16
|
-
const viewStore = live<ViewStore>({});
|
|
17
|
-
|
|
18
|
-
const getViewState = (subjectId: string) => {
|
|
19
|
-
if (!viewStore[subjectId]) {
|
|
20
|
-
viewStore[subjectId] = { ...initialViewState };
|
|
21
|
-
}
|
|
22
|
-
return viewStore[subjectId];
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return contributes(ThreadCapabilities.State, { state, getViewState });
|
|
26
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type FC, type PropsWithChildren } from 'react';
|
|
6
|
-
|
|
7
|
-
import { useCapability } from '@dxos/app-framework';
|
|
8
|
-
import { type ThemedClassName } from '@dxos/react-ui';
|
|
9
|
-
|
|
10
|
-
import { ThreadCapabilities } from '../../capabilities';
|
|
11
|
-
import { useDebugMode } from '../../hooks';
|
|
12
|
-
import { AudioStream } from '../Media';
|
|
13
|
-
import { ParticipantGrid } from '../Participant';
|
|
14
|
-
|
|
15
|
-
import { Toolbar, type ToolbarProps } from './Toolbar';
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
// Root
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
type CallRootProps = PropsWithChildren<ThemedClassName>;
|
|
22
|
-
|
|
23
|
-
const CallRoot: FC<CallRootProps> = ({ children }) => {
|
|
24
|
-
return <div className='relative flex flex-col grow overflow-hidden'>{children}</div>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
CallRoot.displayName = 'CallRoot';
|
|
28
|
-
|
|
29
|
-
//
|
|
30
|
-
// Audio
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
type CallAudioProps = {};
|
|
34
|
-
|
|
35
|
-
const CallAudio: FC<CallAudioProps> = () => {
|
|
36
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
37
|
-
|
|
38
|
-
return <AudioStream tracks={call.audioTracksToPlay} />;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
CallAudio.displayName = 'CallAudio';
|
|
42
|
-
|
|
43
|
-
//
|
|
44
|
-
// Room
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
type CallGridProps = {
|
|
48
|
-
fullscreen?: boolean;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const CallGrid: FC<CallGridProps> = ({ fullscreen }) => {
|
|
52
|
-
const debug = useDebugMode();
|
|
53
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<div className='grid grow p-4 dark:bg-neutral-900'>
|
|
57
|
-
<ParticipantGrid self={call.self} users={call.users} debug={debug} fullscreen={fullscreen} />
|
|
58
|
-
</div>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
CallGrid.displayName = 'CallGrid';
|
|
63
|
-
|
|
64
|
-
//
|
|
65
|
-
// Toolbar
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
type CallToolbarProps = Pick<ToolbarProps, 'channel' | 'onLeave'>;
|
|
69
|
-
|
|
70
|
-
const CallToolbar: FC<CallToolbarProps> = (props) => {
|
|
71
|
-
return (
|
|
72
|
-
<div className='absolute bottom-0 left-0 right-0 flex justify-center'>
|
|
73
|
-
<Toolbar isInRoom {...props} />
|
|
74
|
-
</div>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
CallToolbar.displayName = 'CallToolbar';
|
|
79
|
-
|
|
80
|
-
//
|
|
81
|
-
// Export
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
export const Call = {
|
|
85
|
-
Root: CallRoot,
|
|
86
|
-
Grid: CallGrid,
|
|
87
|
-
Audio: CallAudio,
|
|
88
|
-
Toolbar: CallToolbar,
|
|
89
|
-
};
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
8
|
-
import { useActions, useNode } from '@dxos/plugin-graph';
|
|
9
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
|
-
import {
|
|
11
|
-
Icon,
|
|
12
|
-
IconButton,
|
|
13
|
-
type IconButtonProps,
|
|
14
|
-
Toolbar as NativeToolbar,
|
|
15
|
-
type ThemedClassName,
|
|
16
|
-
toLocalizedString,
|
|
17
|
-
useTranslation,
|
|
18
|
-
} from '@dxos/react-ui';
|
|
19
|
-
import { groupHoverControlItemWithTransition, mx } from '@dxos/react-ui-theme';
|
|
20
|
-
|
|
21
|
-
import { ThreadCapabilities } from '../../capabilities';
|
|
22
|
-
import { meta } 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(meta.id);
|
|
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 && groupHoverControlItemWithTransition)}>
|
|
59
|
-
<NativeToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', 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
|
-
);
|
|
@@ -1,115 +0,0 @@
|
|
|
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, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
12
|
-
|
|
13
|
-
import { type GlobalState } from '../calls';
|
|
14
|
-
import { meta } from '../meta';
|
|
15
|
-
|
|
16
|
-
export type CallDebugPanelProps = ThemedClassName<{
|
|
17
|
-
state?: GlobalState;
|
|
18
|
-
}>;
|
|
19
|
-
|
|
20
|
-
export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
21
|
-
const { t } = useTranslation(meta.id);
|
|
22
|
-
const users = state?.call?.users;
|
|
23
|
-
const self = state?.call?.self;
|
|
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
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useCapability } from '@dxos/app-framework';
|
|
8
|
-
|
|
9
|
-
import { ThreadCapabilities } from '../capabilities';
|
|
10
|
-
|
|
11
|
-
import { ChannelContainer } from './ChannelContainer';
|
|
12
|
-
|
|
13
|
-
export const CallSidebar = () => {
|
|
14
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
15
|
-
return <ChannelContainer roomId={call.roomId} />;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default CallSidebar;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
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 { ColumnContainer, withLayout } from '@dxos/storybook-utils';
|
|
16
|
-
|
|
17
|
-
import { createThreadPlugins } from '../testing';
|
|
18
|
-
import { translations } from '../translations';
|
|
19
|
-
import { ChannelType, ThreadType } from '../types';
|
|
20
|
-
|
|
21
|
-
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
22
|
-
|
|
23
|
-
// TODO(wittjosiah): Channel doesn't render full height.
|
|
24
|
-
const Story = ({ roomId }: ChannelContainerProps) => {
|
|
25
|
-
const space = useSpace();
|
|
26
|
-
const [channel] = useQuery(space, Query.type(ChannelType));
|
|
27
|
-
if (!channel) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return <ChannelContainer channel={channel} roomId={roomId} />;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const meta: Meta<ChannelContainerProps> = {
|
|
35
|
-
title: 'plugins/plugin-thread/ChannelContainer',
|
|
36
|
-
component: ChannelContainer,
|
|
37
|
-
render: (args) => <Story {...args} />,
|
|
38
|
-
decorators: [
|
|
39
|
-
withPluginManager({
|
|
40
|
-
plugins: [...(await createThreadPlugins())],
|
|
41
|
-
capabilities: [contributes(ClientCapabilities.Schema, [ChannelType, ThreadType, DataType.Message])],
|
|
42
|
-
}),
|
|
43
|
-
withLayout({ Container: ColumnContainer, classNames: 'w-[40rem] overflow-hidden' }),
|
|
44
|
-
],
|
|
45
|
-
parameters: {
|
|
46
|
-
translations,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default meta;
|
|
51
|
-
|
|
52
|
-
type Story = StoryObj<ChannelContainerProps>;
|
|
53
|
-
|
|
54
|
-
export const Default: Story = {
|
|
55
|
-
args: {
|
|
56
|
-
// Fixed room for testing.
|
|
57
|
-
roomId: '04a1d1911703b8e929d0649021a965',
|
|
58
|
-
},
|
|
59
|
-
};
|