@dxos/plugin-thread 0.8.4-main.fd6878d → 0.8.4-staging.60fe92afc8
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
|
@@ -2,180 +2,50 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
properties: {
|
|
44
|
-
label: ['call panel label', { ns: THREAD_PLUGIN }],
|
|
45
|
-
icon: 'ph--video-conference--regular',
|
|
46
|
-
position: 'hoist',
|
|
47
|
-
disposition: 'hidden',
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
]
|
|
51
|
-
: [],
|
|
52
|
-
),
|
|
53
|
-
);
|
|
54
|
-
}),
|
|
55
|
-
Option.getOrElse(() => []),
|
|
56
|
-
),
|
|
57
|
-
),
|
|
58
|
-
}),
|
|
59
|
-
// TODO(wittjosiah): The channel shouldn't become the companion during a call.
|
|
60
|
-
// Alternative: the call/meeting/thread should be a child node of the channel and that should be opened.
|
|
61
|
-
createExtension({
|
|
62
|
-
id: `${THREAD_PLUGIN}/channel-chat-companion`,
|
|
63
|
-
connector: (node) => {
|
|
64
|
-
return Rx.make((get) => {
|
|
65
|
-
return pipe(
|
|
66
|
-
get(node),
|
|
67
|
-
Option.flatMap((node) => (Obj.instanceOf(ChannelType, node.data) ? Option.some(node.data) : Option.none())),
|
|
68
|
-
Option.map((channel) => {
|
|
69
|
-
const callManager = context.getCapability(ThreadCapabilities.CallManager);
|
|
70
|
-
const joined = get(
|
|
71
|
-
rxFromSignal(() => callManager.joined && callManager.roomId === fullyQualifiedId(channel)),
|
|
72
|
-
);
|
|
73
|
-
if (!joined) {
|
|
74
|
-
return [];
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return [
|
|
78
|
-
{
|
|
79
|
-
id: `${fullyQualifiedId(channel)}${ATTENDABLE_PATH_SEPARATOR}chat`,
|
|
80
|
-
type: PLANK_COMPANION_TYPE,
|
|
81
|
-
data: 'chat',
|
|
82
|
-
properties: {
|
|
83
|
-
label: ['channel companion label', { ns: THREAD_PLUGIN }],
|
|
84
|
-
icon: 'ph--hash--regular',
|
|
85
|
-
position: 'hoist',
|
|
86
|
-
disposition: 'hidden',
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
];
|
|
90
|
-
}),
|
|
91
|
-
Option.getOrElse(() => []),
|
|
92
|
-
);
|
|
93
|
-
});
|
|
94
|
-
},
|
|
95
|
-
}),
|
|
96
|
-
createExtension({
|
|
97
|
-
id: `${meta.id}/comments-companion`,
|
|
98
|
-
connector: (node) =>
|
|
99
|
-
Rx.make((get) =>
|
|
100
|
-
pipe(
|
|
101
|
-
get(node),
|
|
102
|
-
Option.flatMap((node) => {
|
|
103
|
-
if (!Obj.isObject(node.data) || Obj.instanceOf(ChannelType, node.data)) {
|
|
104
|
-
return Option.none();
|
|
105
|
-
}
|
|
106
|
-
const metadata = resolve(Obj.getTypename(node.data)!);
|
|
107
|
-
return typeof metadata.comments === 'string' ? Option.some(node) : Option.none();
|
|
108
|
-
}),
|
|
109
|
-
Option.map((node) => [
|
|
110
|
-
{
|
|
111
|
-
id: [node.id, 'comments'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
112
|
-
type: PLANK_COMPANION_TYPE,
|
|
113
|
-
data: 'comments',
|
|
114
|
-
properties: {
|
|
115
|
-
label: ['comments label', { ns: meta.id }],
|
|
116
|
-
icon: 'ph--chat-text--regular',
|
|
117
|
-
disposition: 'hidden',
|
|
118
|
-
position: 'hoist',
|
|
119
|
-
},
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { AppCapabilities, createTypeSectionExtension } from '@dxos/app-toolkit';
|
|
10
|
+
import { isSpace } from '@dxos/client/echo';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Type } from '@dxos/echo';
|
|
13
|
+
import { GraphBuilder, Node } from '@dxos/plugin-graph';
|
|
14
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
15
|
+
import { Channel } from '@dxos/types';
|
|
16
|
+
|
|
17
|
+
const channelTypename = Type.getTypename(Channel.Channel);
|
|
18
|
+
|
|
19
|
+
export default Capability.makeModule(
|
|
20
|
+
Effect.fnUntraced(function* () {
|
|
21
|
+
const extensions = yield* Effect.all([
|
|
22
|
+
createTypeSectionExtension(Channel.Channel),
|
|
23
|
+
|
|
24
|
+
GraphBuilder.createExtension({
|
|
25
|
+
id: 'channelsSectionActions',
|
|
26
|
+
match: (node) => {
|
|
27
|
+
const space = isSpace(node.properties.space) ? node.properties.space : undefined;
|
|
28
|
+
return node.type === channelTypename && space ? Option.some(space) : Option.none();
|
|
29
|
+
},
|
|
30
|
+
actions: (space) =>
|
|
31
|
+
Effect.succeed([
|
|
32
|
+
Node.makeAction({
|
|
33
|
+
id: 'create-channel',
|
|
34
|
+
data: () =>
|
|
35
|
+
Operation.invoke(SpaceOperation.OpenCreateObject, {
|
|
36
|
+
target: space.db,
|
|
37
|
+
typename: channelTypename,
|
|
38
|
+
}),
|
|
39
|
+
properties: {
|
|
40
|
+
label: ['add-object.label', { ns: channelTypename }],
|
|
41
|
+
icon: 'ph--plus--regular',
|
|
42
|
+
disposition: 'list-item-primary',
|
|
120
43
|
},
|
|
121
|
-
]),
|
|
122
|
-
Option.getOrElse(() => []),
|
|
123
|
-
),
|
|
124
|
-
),
|
|
125
|
-
}),
|
|
126
|
-
createExtension({
|
|
127
|
-
id: `${meta.id}/comment-toolbar`,
|
|
128
|
-
actions: (node) =>
|
|
129
|
-
Rx.make((get) =>
|
|
130
|
-
pipe(
|
|
131
|
-
get(node),
|
|
132
|
-
Option.flatMap((node) => {
|
|
133
|
-
if (!Obj.isObject(node.data) || Obj.instanceOf(ChannelType, node.data)) {
|
|
134
|
-
return Option.none();
|
|
135
|
-
}
|
|
136
|
-
const metadata = resolve(Obj.getTypename(node.data)!);
|
|
137
|
-
return typeof metadata.comments === 'string' ? Option.some(node.data) : Option.none();
|
|
138
44
|
}),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const disabled = get(
|
|
143
|
-
rxFromSignal(() => {
|
|
144
|
-
const metadata = resolve(Obj.getTypename(object)!);
|
|
145
|
-
const selection = selectionManager.getSelection(fullyQualifiedId(object), metadata.selectionMode);
|
|
146
|
-
const anchor = getAnchor(selection);
|
|
147
|
-
const invalidSelection = !anchor;
|
|
148
|
-
const overlappingComment = toolbar[fullyQualifiedId(object)];
|
|
149
|
-
return (metadata.comments === 'anchored' && invalidSelection) || overlappingComment;
|
|
150
|
-
}),
|
|
151
|
-
);
|
|
45
|
+
]),
|
|
46
|
+
}),
|
|
47
|
+
]);
|
|
152
48
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
data: () => {
|
|
157
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
158
|
-
const metadata = resolve(Obj.getTypename(object)!);
|
|
159
|
-
const selection = selectionManager.getSelection(fullyQualifiedId(object));
|
|
160
|
-
// TODO(wittjosiah): Use presence of selection to determine if the comment should be anchored.
|
|
161
|
-
// Requires all components which support selection (e.g. table/kanban) to support anchored comments.
|
|
162
|
-
const anchor = metadata.comments === 'anchored' ? getAnchor(selection) : Date.now().toString();
|
|
163
|
-
const name = metadata.getAnchorLabel?.(object, anchor);
|
|
164
|
-
void dispatch(createIntent(ThreadAction.Create, { anchor, name, subject: object }));
|
|
165
|
-
},
|
|
166
|
-
properties: {
|
|
167
|
-
label: ['add comment label', { ns: meta.id }],
|
|
168
|
-
icon: 'ph--chat-text--regular',
|
|
169
|
-
disposition: 'toolbar',
|
|
170
|
-
disabled,
|
|
171
|
-
testId: 'thread.comment.add',
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
];
|
|
175
|
-
}),
|
|
176
|
-
Option.getOrElse(() => []),
|
|
177
|
-
),
|
|
178
|
-
),
|
|
179
|
-
}),
|
|
180
|
-
]);
|
|
181
|
-
};
|
|
49
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Schema from 'effect/Schema';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Feed, Filter, Obj, Query } from '@dxos/echo';
|
|
10
|
+
import { createFeedServiceLayer } from '@dxos/echo-client';
|
|
11
|
+
import { invariant } from '@dxos/invariant';
|
|
12
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
|
+
import { Channel, Message } from '@dxos/types';
|
|
14
|
+
|
|
15
|
+
import { ThreadCapabilities } from '../types';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Default local ECHO-feed-backed channel provider. Stores messages in a `Feed`
|
|
19
|
+
* (`makeConfig` → `Feed.make()`), reads them via a reactive database query, and
|
|
20
|
+
* writes via `Feed.append`. This is the backend `Channel.make()` defaults to.
|
|
21
|
+
*/
|
|
22
|
+
export const feedChannelBackend: ThreadCapabilities.ChannelBackendProvider = {
|
|
23
|
+
kind: Channel.FeedBackendKind,
|
|
24
|
+
label: 'Feed',
|
|
25
|
+
icon: 'ph--rows--regular',
|
|
26
|
+
createFields: Schema.Struct({}),
|
|
27
|
+
makeConfig: () => Feed.make(),
|
|
28
|
+
subscribe: (channel, onMessages) => {
|
|
29
|
+
const feed = Channel.getFeed(channel);
|
|
30
|
+
const db = Obj.getDatabase(channel);
|
|
31
|
+
if (!feed || !db) {
|
|
32
|
+
onMessages([]);
|
|
33
|
+
return () => {};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const result = db.query(Query.select(Filter.type(Message.Message)).from(feed));
|
|
37
|
+
return result.subscribe(() => onMessages(result.results), { fire: true });
|
|
38
|
+
},
|
|
39
|
+
send: (channel, message) =>
|
|
40
|
+
Effect.gen(function* () {
|
|
41
|
+
const db = Obj.getDatabase(channel);
|
|
42
|
+
invariant(db, 'Database not found');
|
|
43
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
44
|
+
const space = client.spaces.get(db.spaceId);
|
|
45
|
+
invariant(space, 'Space not found');
|
|
46
|
+
const feed = Channel.getFeed(channel);
|
|
47
|
+
invariant(feed, 'Channel is not feed-backed');
|
|
48
|
+
yield* Feed.append(feed, [message]).pipe(Effect.provide(createFeedServiceLayer(space.queues)));
|
|
49
|
+
}),
|
|
50
|
+
readOnly: (channel) => Obj.getMeta(channel).keys.length > 0,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** Contributes the default feed-backed channel provider. */
|
|
54
|
+
export const ChannelBackendFeed = Capability.makeModule(
|
|
55
|
+
Effect.fnUntraced(function* () {
|
|
56
|
+
return Capability.contributes(ThreadCapabilities.ChannelBackend, feedChannelBackend);
|
|
57
|
+
}),
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
export default ChannelBackendFeed;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Type } from '@dxos/echo';
|
|
10
|
+
import { SpaceCapabilities, SpaceOperation } from '@dxos/plugin-space';
|
|
11
|
+
import { Channel } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
// Lazily loaded (via the #containers barrel) so the react-ui-form dependency
|
|
14
|
+
// graph isn't pulled into this capability module's evaluation.
|
|
15
|
+
import { ChannelCreatePanel } from '#containers';
|
|
16
|
+
|
|
17
|
+
import { getChannelsPath } from '../paths';
|
|
18
|
+
import { ThreadCapabilities, resolveProvider } from '../types';
|
|
19
|
+
|
|
20
|
+
type CreateOptions = Parameters<SpaceCapabilities.CreateObjectEntry['createObject']>[1];
|
|
21
|
+
|
|
22
|
+
export default Capability.makeModule(
|
|
23
|
+
Effect.fnUntraced(function* () {
|
|
24
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
25
|
+
id: Type.getTypename(Channel.Channel),
|
|
26
|
+
customPanel: ChannelCreatePanel,
|
|
27
|
+
createObject: (
|
|
28
|
+
{ name, kind, options }: { name?: string; kind?: string; options?: Record<string, unknown> },
|
|
29
|
+
opts: CreateOptions,
|
|
30
|
+
) =>
|
|
31
|
+
Effect.gen(function* () {
|
|
32
|
+
const providers = yield* Capability.getAll(ThreadCapabilities.ChannelBackend);
|
|
33
|
+
const provider = kind ? resolveProvider(providers, kind) : undefined;
|
|
34
|
+
const object = provider
|
|
35
|
+
? Channel.make({ name, backend: { kind: provider.kind, config: provider.makeConfig(options ?? {}) } })
|
|
36
|
+
: Channel.make({ name });
|
|
37
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
38
|
+
object,
|
|
39
|
+
target: opts.target,
|
|
40
|
+
hidden: true,
|
|
41
|
+
targetNodeId: opts.targetNodeId ?? getChannelsPath(opts.db.spaceId),
|
|
42
|
+
});
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
}),
|
|
46
|
+
);
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
6
7
|
|
|
7
|
-
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export * from './capabilities';
|
|
8
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
|
+
export const NavigationResolver = Capability.lazy('NavigationResolver', () => import('./navigation-resolver'));
|
|
10
|
+
export const ChannelBackendFeed = Capability.lazy('ChannelBackendFeed', () => import('./channel-backend-feed'));
|
|
11
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
12
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
'OperationHandler',
|
|
14
|
+
() => import('./operation-handler'),
|
|
15
|
+
);
|
|
16
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, createTypeSectionPathResolver } from '@dxos/app-toolkit';
|
|
9
|
+
import { Channel } from '@dxos/types';
|
|
10
|
+
|
|
11
|
+
export default Capability.makeModule(
|
|
12
|
+
Effect.fnUntraced(function* () {
|
|
13
|
+
return Capability.contributes(
|
|
14
|
+
AppCapabilities.NavigationPathResolver,
|
|
15
|
+
createTypeSectionPathResolver(Channel.Channel),
|
|
16
|
+
);
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { ThreadOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, ThreadOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -2,88 +2,48 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
7
|
-
import { Capabilities,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
11
|
import { getSpace } from '@dxos/react-client/echo';
|
|
12
|
+
import { Channel, Thread } from '@dxos/types';
|
|
11
13
|
|
|
12
|
-
import {
|
|
13
|
-
CallDebugPanel,
|
|
14
|
-
CallSidebar,
|
|
15
|
-
ChannelContainer,
|
|
16
|
-
ChatContainer,
|
|
17
|
-
ThreadComplementary,
|
|
18
|
-
ThreadSettings,
|
|
19
|
-
} from '../components';
|
|
20
|
-
import { THREAD_PLUGIN } from '../meta';
|
|
21
|
-
import { ChannelType, type ThreadSettingsProps, ThreadType } from '../types';
|
|
14
|
+
import { ChannelArticle, ThreadArticle } from '#containers';
|
|
22
15
|
|
|
23
|
-
|
|
16
|
+
export default Capability.makeModule(() =>
|
|
17
|
+
Effect.succeed(
|
|
18
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
19
|
+
Surface.create({
|
|
20
|
+
id: 'channel',
|
|
21
|
+
filter: AppSurface.object(AppSurface.Article, Channel.Channel),
|
|
22
|
+
component: ({ data: { subject, attendableId }, role }) => (
|
|
23
|
+
<ChannelArticle role={role} subject={subject} attendableId={attendableId} />
|
|
24
|
+
),
|
|
25
|
+
}),
|
|
26
|
+
Surface.create({
|
|
27
|
+
id: 'chatCompanion',
|
|
28
|
+
filter: AppSurface.allOf(
|
|
29
|
+
AppSurface.literal(AppSurface.Article, 'chat'),
|
|
30
|
+
AppSurface.companion(AppSurface.Article, Channel.Channel),
|
|
31
|
+
),
|
|
32
|
+
component: ({ data: { companionTo: channel } }) => <ChannelArticle subject={channel} />,
|
|
33
|
+
}),
|
|
34
|
+
// TODO(burdon): Disambiguate with Channel.
|
|
35
|
+
Surface.create({
|
|
36
|
+
id: 'thread',
|
|
37
|
+
filter: AppSurface.object(AppSurface.Article, Thread.Thread),
|
|
38
|
+
component: ({ data: { subject } }) => {
|
|
39
|
+
const space = getSpace(subject);
|
|
40
|
+
if (!space || !subject) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
24
43
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
component: ({ data: { subject: channel }, role }) => <ChannelContainer channel={channel} role={role} />,
|
|
32
|
-
}),
|
|
33
|
-
createSurface({
|
|
34
|
-
id: `${THREAD_PLUGIN}/chat-companion`,
|
|
35
|
-
role: 'article',
|
|
36
|
-
filter: (data): data is { companionTo: ChannelType; subject: 'chat' } =>
|
|
37
|
-
Obj.instanceOf(ChannelType, data.companionTo) && data.subject === 'chat',
|
|
38
|
-
component: ({ data: { companionTo: channel } }) => {
|
|
39
|
-
const space = getSpace(channel);
|
|
40
|
-
const thread = channel.defaultThread.target;
|
|
41
|
-
if (!space || !thread) {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return <ChatContainer thread={thread} space={space} />;
|
|
46
|
-
},
|
|
47
|
-
}),
|
|
48
|
-
createSurface({
|
|
49
|
-
id: `${THREAD_PLUGIN}/thread`,
|
|
50
|
-
role: 'article',
|
|
51
|
-
filter: (data): data is { subject: ThreadType } => Obj.instanceOf(ThreadType, data.subject),
|
|
52
|
-
component: ({ data: { subject: thread } }) => {
|
|
53
|
-
const space = getSpace(thread);
|
|
54
|
-
if (!space || !thread) {
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return <ChatContainer thread={thread} space={space} />;
|
|
59
|
-
},
|
|
60
|
-
}),
|
|
61
|
-
createSurface({
|
|
62
|
-
id: `${THREAD_PLUGIN}/comments`,
|
|
63
|
-
role: 'article',
|
|
64
|
-
filter: (data): data is { companionTo: { threads: Ref.Ref<ThreadType>[] } } =>
|
|
65
|
-
data.subject === 'comments' && Obj.isObject(data.companionTo),
|
|
66
|
-
// TODO(wittjosiah): This isn't scrolling properly in a plank.
|
|
67
|
-
component: ({ data }) => <ThreadComplementary subject={data.companionTo} />,
|
|
68
|
-
}),
|
|
69
|
-
createSurface({
|
|
70
|
-
id: `${THREAD_PLUGIN}/plugin-settings`,
|
|
71
|
-
role: 'article',
|
|
72
|
-
filter: (data): data is { subject: SettingsStore<ThreadSettingsProps> } =>
|
|
73
|
-
data.subject instanceof SettingsStore && data.subject.prefix === THREAD_PLUGIN,
|
|
74
|
-
component: ({ data: { subject } }) => <ThreadSettings settings={subject.value} />,
|
|
75
|
-
}),
|
|
76
|
-
createSurface({
|
|
77
|
-
id: `${THREAD_PLUGIN}/assistant`,
|
|
78
|
-
role: 'deck-companion--active-call',
|
|
79
|
-
component: () => <CallSidebar />,
|
|
80
|
-
}),
|
|
81
|
-
createSurface({
|
|
82
|
-
id: `${THREAD_PLUGIN}/devtools-overview`,
|
|
83
|
-
role: 'devtools-overview',
|
|
84
|
-
component: () => {
|
|
85
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
86
|
-
return <CallDebugPanel state={call.state} />;
|
|
87
|
-
},
|
|
88
|
-
}),
|
|
89
|
-
]);
|
|
44
|
+
return <ThreadArticle space={space} thread={subject} />;
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
]),
|
|
48
|
+
),
|
|
49
|
+
);
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { useCallback, useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
8
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
9
|
+
import { PublicKey } from '@dxos/react-client';
|
|
10
|
+
import { type SpaceMember } from '@dxos/react-client/echo';
|
|
11
|
+
import { type Identity } from '@dxos/react-client/halo';
|
|
12
|
+
import { composable, Card, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
13
|
+
import { type ObjectTileComponent, Thread } from '@dxos/react-ui-thread';
|
|
14
|
+
import { type Message } from '@dxos/types';
|
|
15
|
+
import { hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';
|
|
16
|
+
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
|
|
19
|
+
import { getMessageMetadata } from '../../util';
|
|
20
|
+
|
|
21
|
+
export type ChatProps = ThemedClassName<{
|
|
22
|
+
/** Stable id used for the underlying thread root and message metadata. */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Identity used to attribute outgoing messages in the textbox metadata. */
|
|
25
|
+
identity?: Identity;
|
|
26
|
+
/** Space members for rendering sender names/avatars on incoming messages. */
|
|
27
|
+
members: SpaceMember[];
|
|
28
|
+
/** Messages to render in order. */
|
|
29
|
+
messages: readonly Message.Message[];
|
|
30
|
+
/** Activity indicator (e.g. processing) shown beneath the textbox. */
|
|
31
|
+
activity?: boolean;
|
|
32
|
+
/** Autofocus textbox */
|
|
33
|
+
autoFocus?: boolean;
|
|
34
|
+
/** Marks the thread as the current/attended one. */
|
|
35
|
+
current?: boolean | string;
|
|
36
|
+
/**
|
|
37
|
+
* When true, hide the composer textbox and activity indicator. Used for
|
|
38
|
+
* channels whose source-of-truth lives elsewhere (e.g. externally-synced
|
|
39
|
+
* Slack/Discord channels keyed by a foreign id) — sending isn't meaningful
|
|
40
|
+
* because there is no local-write path back to the source.
|
|
41
|
+
*/
|
|
42
|
+
readOnly?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Called with the user's textbox content when they press send.
|
|
45
|
+
* Returning `true` signals the message was accepted; the textbox is then cleared.
|
|
46
|
+
*/
|
|
47
|
+
onSend: (text: string) => boolean;
|
|
48
|
+
}>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Pure chat UI: message list + composer textbox + activity indicator, built on
|
|
52
|
+
* the `@dxos/react-ui-thread` primitives. Does not load data or invoke
|
|
53
|
+
* operations — the caller passes messages and an `onSend` callback. Used by
|
|
54
|
+
* `ChannelArticle` and `ThreadArticle`.
|
|
55
|
+
*/
|
|
56
|
+
export const Chat = composable<HTMLDivElement, ChatProps>(
|
|
57
|
+
({ id, identity, members, messages, activity, onSend, autoFocus, current, readOnly }, forwardedRef) => {
|
|
58
|
+
const { t } = useTranslation(meta.id);
|
|
59
|
+
|
|
60
|
+
const components = useMemo(() => ({ Object: ObjectTile }), []);
|
|
61
|
+
|
|
62
|
+
const textboxMetadata = useMemo(() => getMessageMetadata(id, identity), [id, identity]);
|
|
63
|
+
|
|
64
|
+
const getMetadata = useCallback(
|
|
65
|
+
(message: Message.Message) => {
|
|
66
|
+
// TODO(burdon): Factor out.
|
|
67
|
+
const sender = members.find(
|
|
68
|
+
(member) =>
|
|
69
|
+
(message.sender.identityDid && member.identity.did === message.sender.identityDid) ||
|
|
70
|
+
(message.sender.identityKey && PublicKey.equals(member.identity.identityKey, message.sender.identityKey)),
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
// Pass `message.sender` as the fallback so externally-synced messages
|
|
74
|
+
// (Slack, etc.) display the source-side sender name instead of "Anonymous"
|
|
75
|
+
// when no DXOS identity matches.
|
|
76
|
+
return getMessageMetadata(message.id, sender?.identity, message.sender);
|
|
77
|
+
},
|
|
78
|
+
[members],
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<Thread.Root getMetadata={getMetadata} components={components} identityDid={identity?.did} editable={false}>
|
|
83
|
+
<Thread.Content id={id} current={current} classNames='dx-container' ref={forwardedRef}>
|
|
84
|
+
<Thread.Messages messages={messages} />
|
|
85
|
+
{!readOnly && (
|
|
86
|
+
<>
|
|
87
|
+
<Thread.Textbox
|
|
88
|
+
{...textboxMetadata}
|
|
89
|
+
autoFocus={autoFocus}
|
|
90
|
+
placeholder={t('message.placeholder')}
|
|
91
|
+
onSend={onSend}
|
|
92
|
+
/>
|
|
93
|
+
<Thread.Status activity={activity}>{t('activity.message')}</Thread.Status>
|
|
94
|
+
</>
|
|
95
|
+
)}
|
|
96
|
+
</Thread.Content>
|
|
97
|
+
</Thread.Root>
|
|
98
|
+
);
|
|
99
|
+
},
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Object/reference message-block tile, injected into `Thread.Root` so that
|
|
104
|
+
* `@dxos/react-ui-thread` stays free of `@dxos/app-framework`. Renders the
|
|
105
|
+
* referenced subject via an app-framework `Surface` (the card role).
|
|
106
|
+
*/
|
|
107
|
+
const ObjectTile: ObjectTileComponent = ({ subject }) => {
|
|
108
|
+
const Fallback = useCallback(() => <span className='p-1 text-sm text-description'>{subject.id}</span>, [subject]);
|
|
109
|
+
return (
|
|
110
|
+
<Card.Root className={mx('grid col-span-3 py-1 pr-4', hoverableControls, hoverableFocusedWithinControls)}>
|
|
111
|
+
<Surface.Surface
|
|
112
|
+
type={AppSurface.Card}
|
|
113
|
+
limit={1}
|
|
114
|
+
data={{ subject } satisfies AppSurface.ObjectCardData}
|
|
115
|
+
fallback={Fallback}
|
|
116
|
+
/>
|
|
117
|
+
</Card.Root>
|
|
118
|
+
);
|
|
119
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -2,17 +2,4 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export const ChannelContainer = lazy(() => import('./ChannelContainer'));
|
|
8
|
-
export const ChatContainer = lazy(() => import('./ChatContainer'));
|
|
9
|
-
|
|
10
|
-
// TODO(wittjosiah): Suspense boundary for sidebar?
|
|
11
|
-
export * from './Call';
|
|
12
|
-
export * from './CallDebugPanel';
|
|
13
|
-
export * from './CallSidebar';
|
|
14
|
-
export * from './CommentsContainer';
|
|
15
|
-
export * from './CommentsThreadContainer';
|
|
16
|
-
export * from './MessageContainer';
|
|
17
|
-
export * from './ThreadComplementary';
|
|
18
|
-
export * from './ThreadSettings';
|
|
5
|
+
export * from './Chat';
|