@dxos/plugin-thread 0.8.4-main.7ace549 → 0.8.4-main.9735255
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/app-graph-builder-7C2QW32W.mjs +188 -0
- package/dist/lib/browser/app-graph-builder-7C2QW32W.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/call-manager-4P536YNX.mjs +26 -0
- package/dist/lib/browser/call-manager-4P536YNX.mjs.map +7 -0
- package/dist/lib/browser/chunk-2FIHSX35.mjs +293 -0
- package/dist/lib/browser/chunk-2FIHSX35.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KOBXMDCI.mjs → chunk-DLO2G3DM.mjs} +14 -12
- package/dist/lib/browser/chunk-DLO2G3DM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZCW3NSDZ.mjs → chunk-ERK254BS.mjs} +68 -51
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs +1815 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-TQ4JFMZZ.mjs → chunk-ZFLSTQSE.mjs} +39 -34
- package/dist/lib/browser/chunk-ZFLSTQSE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +100 -90
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-QMJLRR6R.mjs +210 -0
- package/dist/lib/browser/markdown-QMJLRR6R.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-T63EP5TY.mjs +441 -0
- package/dist/lib/browser/operation-resolver-T63EP5TY.mjs.map +7 -0
- package/dist/lib/browser/react-root-56MJI77R.mjs +25 -0
- package/dist/lib/browser/react-root-56MJI77R.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-AUQQSQQC.mjs → react-surface-DMBHQOXJ.mjs} +32 -33
- package/dist/lib/browser/react-surface-DMBHQOXJ.mjs.map +7 -0
- package/dist/lib/browser/{repair-JFJLEM2O.mjs → repair-6OZ75AUU.mjs} +12 -9
- package/dist/lib/browser/repair-6OZ75AUU.mjs.map +7 -0
- package/dist/lib/browser/settings-WZMJMML3.mjs +32 -0
- package/dist/lib/browser/settings-WZMJMML3.mjs.map +7 -0
- package/dist/lib/browser/state-SJR2GL5G.mjs +24 -0
- package/dist/lib/browser/state-SJR2GL5G.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -4
- package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.mjs +189 -0
- package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/call-manager-FMLRR5S5.mjs +27 -0
- package/dist/lib/node-esm/call-manager-FMLRR5S5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7XQLXMX7.mjs +1816 -0
- package/dist/lib/node-esm/chunk-7XQLXMX7.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-TSX5HHW7.mjs → chunk-AQHPP6ZX.mjs} +39 -34
- package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PZH2EDU5.mjs → chunk-KRBZBJRI.mjs} +14 -12
- package/dist/lib/node-esm/chunk-KRBZBJRI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7KZWZS2U.mjs → chunk-QP3KQOPQ.mjs} +68 -51
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WMWUXWAS.mjs +294 -0
- package/dist/lib/node-esm/chunk-WMWUXWAS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +100 -90
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-L6LLQLIN.mjs +211 -0
- package/dist/lib/node-esm/markdown-L6LLQLIN.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs +442 -0
- package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-V4W4X5GL.mjs +26 -0
- package/dist/lib/node-esm/react-root-V4W4X5GL.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-AMVESEF4.mjs → react-surface-ELDSTUA3.mjs} +32 -33
- package/dist/lib/node-esm/react-surface-ELDSTUA3.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-RMLR24YR.mjs → repair-6777EPOM.mjs} +12 -9
- package/dist/lib/node-esm/repair-6777EPOM.mjs.map +7 -0
- package/dist/lib/node-esm/settings-37CO3SNR.mjs +33 -0
- package/dist/lib/node-esm/settings-37CO3SNR.mjs.map +7 -0
- package/dist/lib/node-esm/state-5R3TZJQE.mjs +25 -0
- package/dist/lib/node-esm/state-5R3TZJQE.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +5 -4
- package/dist/types/src/ThreadPlugin.d.ts +2 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts +21 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
- package/dist/types/src/calls/call-manager.d.ts +40 -30
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +9 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts +6 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts +3 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -17
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
- package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +3 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +5 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +3 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +7 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/components/Call/Call.d.ts.map +1 -1
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts +4 -5
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +1 -1
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +3 -4
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
- package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts +4 -2
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +7 -2
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts +1 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/stories.d.ts +2 -1
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +691 -12
- package/dist/types/src/types/Channel.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +23 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3182 -295
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +86 -69
- package/src/ThreadPlugin.tsx +50 -80
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +32 -0
- package/src/calls/call-manager.ts +76 -52
- package/src/calls/call-swarm-synchronizer.ts +2 -2
- package/src/calls/media-manager.ts +1 -1
- package/src/calls/util/calls-service.ts +1 -1
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +201 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +23 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/call-manager/call-manager.ts +26 -0
- package/src/capabilities/call-manager/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +83 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +400 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +20 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +97 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/{repair.ts → repair/repair.ts} +21 -10
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +33 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +22 -0
- package/src/components/Call/Call.tsx +7 -3
- package/src/components/Call/Toolbar.tsx +28 -20
- package/src/components/CallSidebar.tsx +4 -2
- package/src/components/ChannelContainer.stories.tsx +10 -8
- package/src/components/ChannelContainer.tsx +18 -16
- package/src/components/Chat.stories.tsx +6 -6
- package/src/components/ChatContainer.tsx +19 -17
- package/src/components/Comments.stories.tsx +21 -18
- package/src/components/CommentsThreadContainer.tsx +9 -9
- package/src/components/Lobby/Lobby.tsx +8 -6
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessageContainer.tsx +53 -24
- package/src/components/Participant/Participant.tsx +31 -18
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +1 -1
- package/src/components/ThreadCompanion.tsx +69 -64
- package/src/components/ThreadSettings.tsx +6 -1
- package/src/components/command-extension.ts +2 -2
- package/src/components/index.ts +2 -5
- package/src/extensions/threads.ts +75 -41
- package/src/functions/create-proposals.ts +5 -4
- package/src/hooks/analytics.ts +23 -20
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/testing/stories.ts +15 -11
- package/src/types/Channel.ts +10 -6
- package/src/types/capabilities.ts +34 -0
- package/src/types/index.ts +1 -0
- package/src/types/types.ts +160 -73
- package/dist/lib/browser/ChannelContainer-L7MKV7DS.mjs +0 -17
- package/dist/lib/browser/ChatContainer-KPY4BAUE.mjs +0 -16
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-TQ4JFMZZ.mjs.map +0 -7
- package/dist/lib/browser/call-manager-4YFT4XA6.mjs +0 -25
- package/dist/lib/browser/call-manager-4YFT4XA6.mjs.map +0 -7
- package/dist/lib/browser/chunk-ALZKJOZK.mjs +0 -989
- package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +0 -7
- package/dist/lib/browser/chunk-ANTFU4JB.mjs +0 -25
- package/dist/lib/browser/chunk-ANTFU4JB.mjs.map +0 -7
- package/dist/lib/browser/chunk-CFC7LEPD.mjs +0 -18
- package/dist/lib/browser/chunk-CFC7LEPD.mjs.map +0 -7
- package/dist/lib/browser/chunk-JDJPMI7V.mjs +0 -143
- package/dist/lib/browser/chunk-JDJPMI7V.mjs.map +0 -7
- package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +0 -7
- package/dist/lib/browser/chunk-NPT5S6N4.mjs +0 -611
- package/dist/lib/browser/chunk-NPT5S6N4.mjs.map +0 -7
- package/dist/lib/browser/chunk-QM34EZQK.mjs +0 -20
- package/dist/lib/browser/chunk-QM34EZQK.mjs.map +0 -7
- package/dist/lib/browser/chunk-TLOOZTRD.mjs +0 -377
- package/dist/lib/browser/chunk-TLOOZTRD.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs +0 -355
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs.map +0 -7
- package/dist/lib/browser/markdown-WFZFYJBQ.mjs +0 -172
- package/dist/lib/browser/markdown-WFZFYJBQ.mjs.map +0 -7
- package/dist/lib/browser/react-root-ED7PHA44.mjs +0 -29
- package/dist/lib/browser/react-root-ED7PHA44.mjs.map +0 -7
- package/dist/lib/browser/react-surface-AUQQSQQC.mjs.map +0 -7
- package/dist/lib/browser/repair-JFJLEM2O.mjs.map +0 -7
- package/dist/lib/browser/settings-E6IOLK46.mjs +0 -23
- package/dist/lib/browser/settings-E6IOLK46.mjs.map +0 -7
- package/dist/lib/browser/state-UYPLBGZJ.mjs +0 -35
- package/dist/lib/browser/state-UYPLBGZJ.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs +0 -18
- package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-TSX5HHW7.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs +0 -26
- package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs +0 -22
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7KZWZS2U.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AB42KYF3.mjs +0 -990
- package/dist/lib/node-esm/chunk-AB42KYF3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ATNY37UV.mjs +0 -27
- package/dist/lib/node-esm/chunk-ATNY37UV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs +0 -378
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FF3QVPY4.mjs +0 -612
- package/dist/lib/node-esm/chunk-FF3QVPY4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P2M364TO.mjs +0 -144
- package/dist/lib/node-esm/chunk-P2M364TO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs +0 -19
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs +0 -356
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs +0 -173
- package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-DZN324JA.mjs +0 -30
- package/dist/lib/node-esm/react-root-DZN324JA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-AMVESEF4.mjs.map +0 -7
- package/dist/lib/node-esm/repair-RMLR24YR.mjs.map +0 -7
- package/dist/lib/node-esm/settings-RGZHWDSO.mjs +0 -24
- package/dist/lib/node-esm/settings-RGZHWDSO.mjs.map +0 -7
- package/dist/lib/node-esm/state-XNWOLBNE.mjs +0 -36
- package/dist/lib/node-esm/state-XNWOLBNE.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.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/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair.d.ts +0 -4
- package/dist/types/src/capabilities/repair.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/src/capabilities/app-graph-builder.ts +0 -194
- package/src/capabilities/blueprint-definition.ts +0 -38
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -311
- package/src/capabilities/markdown.ts +0 -71
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/react-surface.tsx +0 -91
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -26
- /package/dist/lib/browser/{ChannelContainer-L7MKV7DS.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{browser/ChatContainer-KPY4BAUE.mjs.map → node-esm/blueprints/index.mjs.map} +0 -0
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
5
6
|
import React, { type FC, type PropsWithChildren } from 'react';
|
|
6
7
|
|
|
7
8
|
import { useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
9
10
|
|
|
10
|
-
import { ThreadCapabilities } from '../../capabilities';
|
|
11
11
|
import { useDebugMode } from '../../hooks';
|
|
12
|
+
import { ThreadCapabilities } from '../../types';
|
|
12
13
|
import { AudioStream } from '../Media';
|
|
13
14
|
import { ParticipantGrid } from '../Participant';
|
|
14
15
|
|
|
@@ -34,8 +35,9 @@ type CallAudioProps = {};
|
|
|
34
35
|
|
|
35
36
|
const CallAudio: FC<CallAudioProps> = () => {
|
|
36
37
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
38
|
+
const audioTracksToPlay = useAtomValue(call.audioTracksToPlayAtom);
|
|
37
39
|
|
|
38
|
-
return <AudioStream tracks={
|
|
40
|
+
return <AudioStream tracks={audioTracksToPlay} />;
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
CallAudio.displayName = 'CallAudio';
|
|
@@ -51,10 +53,12 @@ type CallGridProps = {
|
|
|
51
53
|
const CallGrid: FC<CallGridProps> = ({ fullscreen }) => {
|
|
52
54
|
const debug = useDebugMode();
|
|
53
55
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
56
|
+
const self = useAtomValue(call.selfAtom);
|
|
57
|
+
const users = useAtomValue(call.usersAtom);
|
|
54
58
|
|
|
55
59
|
return (
|
|
56
60
|
<div className='grid grow p-4 dark:bg-neutral-900'>
|
|
57
|
-
<ParticipantGrid self={
|
|
61
|
+
<ParticipantGrid self={self} users={users} debug={debug} fullscreen={fullscreen} />
|
|
58
62
|
</div>
|
|
59
63
|
);
|
|
60
64
|
};
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
7
8
|
import { useAppGraph, useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
import { Obj } from '@dxos/echo';
|
|
10
|
+
import { Node, useActionRunner } from '@dxos/plugin-graph';
|
|
9
11
|
import { useActions, useNode } from '@dxos/plugin-graph';
|
|
10
12
|
import {
|
|
11
13
|
Icon,
|
|
@@ -16,10 +18,10 @@ import {
|
|
|
16
18
|
toLocalizedString,
|
|
17
19
|
useTranslation,
|
|
18
20
|
} from '@dxos/react-ui';
|
|
19
|
-
import { groupHoverControlItemWithTransition, mx } from '@dxos/
|
|
21
|
+
import { groupHoverControlItemWithTransition, mx } from '@dxos/ui-theme';
|
|
20
22
|
|
|
21
|
-
import { ThreadCapabilities } from '../../capabilities';
|
|
22
23
|
import { meta } from '../../meta';
|
|
24
|
+
import { ThreadCapabilities } from '../../types';
|
|
23
25
|
import { type Channel } from '../../types';
|
|
24
26
|
|
|
25
27
|
export type ToolbarProps = ThemedClassName<{
|
|
@@ -42,14 +44,18 @@ export const Toolbar = ({
|
|
|
42
44
|
}: ToolbarProps) => {
|
|
43
45
|
const { t } = useTranslation(meta.id);
|
|
44
46
|
const { graph } = useAppGraph();
|
|
47
|
+
const runAction = useActionRunner();
|
|
45
48
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
49
|
+
const media = useAtomValue(call.mediaAtom);
|
|
50
|
+
const joined = useAtomValue(call.joinedAtom);
|
|
51
|
+
const raisedHand = useAtomValue(call.raisedHandAtom);
|
|
46
52
|
|
|
47
53
|
// Channel app graph node.
|
|
48
54
|
const node = useNode(graph, channel && Obj.getDXN(channel).toString());
|
|
49
55
|
const actions = useActions(graph, node?.id).filter((action) => action.properties.disposition === 'toolbar');
|
|
50
56
|
|
|
51
57
|
// Screen sharing.
|
|
52
|
-
const isScreensharing =
|
|
58
|
+
const isScreensharing = media.screenshareTrack !== undefined;
|
|
53
59
|
const canSharescreen =
|
|
54
60
|
typeof navigator.mediaDevices !== 'undefined' && navigator.mediaDevices.getDisplayMedia !== undefined;
|
|
55
61
|
|
|
@@ -58,7 +64,7 @@ export const Toolbar = ({
|
|
|
58
64
|
<div className={mx('z-20 flex justify-center m-8', autoHideControls && groupHoverControlItemWithTransition)}>
|
|
59
65
|
<NaturalToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', classNames]}>
|
|
60
66
|
<ToggleButton
|
|
61
|
-
active={
|
|
67
|
+
active={media.audioEnabled}
|
|
62
68
|
state={{
|
|
63
69
|
on: {
|
|
64
70
|
icon: 'ph--microphone--regular',
|
|
@@ -70,12 +76,12 @@ export const Toolbar = ({
|
|
|
70
76
|
icon: 'ph--microphone-slash--duotone',
|
|
71
77
|
label: t('mic on'),
|
|
72
78
|
onClick: () => call.turnAudioOn(),
|
|
73
|
-
classNames: [
|
|
79
|
+
classNames: [joined && 'bg-callAlert'],
|
|
74
80
|
},
|
|
75
81
|
}}
|
|
76
82
|
/>
|
|
77
83
|
<ToggleButton
|
|
78
|
-
active={
|
|
84
|
+
active={media.videoEnabled}
|
|
79
85
|
state={{
|
|
80
86
|
on: {
|
|
81
87
|
icon: 'ph--video-camera--regular',
|
|
@@ -97,7 +103,7 @@ export const Toolbar = ({
|
|
|
97
103
|
</div>
|
|
98
104
|
)) || <NaturalToolbar.Separator variant='gap' />}
|
|
99
105
|
|
|
100
|
-
{
|
|
106
|
+
{joined && (
|
|
101
107
|
<>
|
|
102
108
|
<ToggleButton
|
|
103
109
|
disabled={!canSharescreen}
|
|
@@ -117,25 +123,27 @@ export const Toolbar = ({
|
|
|
117
123
|
/>
|
|
118
124
|
|
|
119
125
|
{/* Companion actions. */}
|
|
120
|
-
{actions
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
{actions
|
|
127
|
+
.filter((action): action is Node.Action => Node.isAction(action))
|
|
128
|
+
.map((action) => (
|
|
129
|
+
<IconButton
|
|
130
|
+
key={action.id}
|
|
131
|
+
{...defaultButtonProps}
|
|
132
|
+
icon={action.properties.icon}
|
|
133
|
+
label={toLocalizedString(action.properties.label, t)}
|
|
134
|
+
classNames={action.properties.classNames}
|
|
135
|
+
onClick={() => node && void runAction(action, { parent: node })}
|
|
136
|
+
/>
|
|
137
|
+
))}
|
|
130
138
|
|
|
131
139
|
<ToggleButton
|
|
132
|
-
active={
|
|
140
|
+
active={raisedHand}
|
|
133
141
|
state={{
|
|
134
142
|
on: {
|
|
135
143
|
icon: 'ph--hand-waving--regular',
|
|
136
144
|
label: t('lower hand'),
|
|
137
145
|
onClick: () => call.setRaisedHand(false),
|
|
138
|
-
classNames: [
|
|
146
|
+
classNames: [joined && 'bg-callAlert'],
|
|
139
147
|
},
|
|
140
148
|
off: {
|
|
141
149
|
icon: 'ph--hand-palm--duotone',
|
|
@@ -146,7 +154,7 @@ export const Toolbar = ({
|
|
|
146
154
|
/>
|
|
147
155
|
</>
|
|
148
156
|
)}
|
|
149
|
-
{
|
|
157
|
+
{joined ? (
|
|
150
158
|
<IconButton variant='destructive' icon='ph--phone-x--regular' label={t('leave call')} onClick={onLeave} />
|
|
151
159
|
) : (
|
|
152
160
|
<IconButton variant='primary' icon='ph--phone-incoming--regular' label={t('join call')} onClick={onJoin} />
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
|
|
7
8
|
import { useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
|
|
9
|
-
import { ThreadCapabilities } from '../
|
|
10
|
+
import { ThreadCapabilities } from '../types';
|
|
10
11
|
|
|
11
12
|
import { ChannelContainer } from './ChannelContainer';
|
|
12
13
|
|
|
13
14
|
export const CallSidebar = () => {
|
|
14
15
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
15
|
-
|
|
16
|
+
const roomId = useAtomValue(call.roomIdAtom);
|
|
17
|
+
return <ChannelContainer subject={undefined} roomId={roomId} />;
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
export default CallSidebar;
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Capability, Common } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import {
|
|
11
|
-
import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
10
|
+
import { Query, useDatabase, useQuery } from '@dxos/react-client/echo';
|
|
12
11
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
13
12
|
import { render } from '@dxos/storybook-utils';
|
|
14
13
|
import { Message, Thread } from '@dxos/types';
|
|
@@ -21,13 +20,13 @@ import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer
|
|
|
21
20
|
|
|
22
21
|
// TODO(wittjosiah): Channel doesn't render full height.
|
|
23
22
|
const DefaultStory = ({ roomId }: ChannelContainerProps) => {
|
|
24
|
-
const
|
|
25
|
-
const [channel] = useQuery(
|
|
23
|
+
const db = useDatabase();
|
|
24
|
+
const [channel] = useQuery(db, Query.type(Channel.Channel));
|
|
26
25
|
if (!channel) {
|
|
27
26
|
return null;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
return <ChannelContainer
|
|
29
|
+
return <ChannelContainer subject={channel} roomId={roomId} />;
|
|
31
30
|
};
|
|
32
31
|
|
|
33
32
|
const meta = {
|
|
@@ -36,10 +35,12 @@ const meta = {
|
|
|
36
35
|
render: render(DefaultStory),
|
|
37
36
|
decorators: [
|
|
38
37
|
withTheme,
|
|
39
|
-
withLayout({
|
|
38
|
+
withLayout({ layout: 'column' }),
|
|
40
39
|
withPluginManager({
|
|
41
40
|
plugins: [...(await createThreadPlugins())],
|
|
42
|
-
capabilities: [
|
|
41
|
+
capabilities: [
|
|
42
|
+
Capability.contributes(Common.Capability.Schema, [Channel.Channel, Thread.Thread, Message.Message]),
|
|
43
|
+
],
|
|
43
44
|
}),
|
|
44
45
|
],
|
|
45
46
|
parameters: {
|
|
@@ -54,6 +55,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
54
55
|
export const Default: Story = {
|
|
55
56
|
args: {
|
|
56
57
|
// Fixed room for testing.
|
|
58
|
+
subject: undefined,
|
|
57
59
|
roomId: '04a1d1911703b8e929d0649021a965',
|
|
58
60
|
},
|
|
59
61
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Atom } from '@effect-atom/atom-react';
|
|
5
|
+
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
6
|
import React, { type ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import { useCapabilities, useCapability } from '@dxos/app-framework/react';
|
|
8
|
+
import { type SurfaceComponentProps, useCapabilities, useCapability } from '@dxos/app-framework/react';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
10
10
|
import { failUndefined } from '@dxos/debug';
|
|
11
11
|
import { Obj } from '@dxos/echo';
|
|
@@ -19,30 +19,32 @@ import { MenuProvider, ToolbarMenu, createMenuAction, createMenuItemGroup, useMe
|
|
|
19
19
|
import { useSoundEffect } from '@dxos/react-ui-sfx';
|
|
20
20
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
21
21
|
|
|
22
|
-
import { ThreadCapabilities } from '../capabilities';
|
|
23
22
|
import { meta } from '../meta';
|
|
23
|
+
import { ThreadCapabilities } from '../types';
|
|
24
24
|
import { type Channel } from '../types';
|
|
25
25
|
|
|
26
26
|
import { Call } from './Call';
|
|
27
27
|
import ChatContainer from './ChatContainer';
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
29
|
+
export type ChannelContainerProps = SurfaceComponentProps<
|
|
30
|
+
Channel.Channel | undefined,
|
|
31
|
+
{
|
|
32
|
+
roomId?: string;
|
|
33
|
+
fullscreen?: boolean;
|
|
34
|
+
}
|
|
35
|
+
>;
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
38
|
* Renders a call when active, otherwise renders the channel chat.
|
|
40
39
|
*/
|
|
41
|
-
|
|
40
|
+
// TODO(burdon): Create Radix style layout.
|
|
41
|
+
export const ChannelContainer = ({ role, subject: channel, roomId: roomIdProp, fullscreen }: ChannelContainerProps) => {
|
|
42
42
|
const space = getSpace(channel);
|
|
43
43
|
const callManager = useCapability(ThreadCapabilities.CallManager);
|
|
44
|
+
const joined = useAtomValue(callManager.joinedAtom);
|
|
45
|
+
const currentRoomId = useAtomValue(callManager.roomIdAtom);
|
|
44
46
|
const attendableId = channel ? Obj.getDXN(channel).toString() : undefined;
|
|
45
|
-
const roomId =
|
|
47
|
+
const roomId = roomIdProp ?? attendableId ?? failUndefined();
|
|
46
48
|
const identity = useIdentity();
|
|
47
49
|
const isNamed = !!identity?.profile?.displayName;
|
|
48
50
|
const joinSound = useSoundEffect('JoinCall');
|
|
@@ -83,7 +85,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
|
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
if (
|
|
88
|
+
if (joined) {
|
|
87
89
|
await callManager.leave();
|
|
88
90
|
}
|
|
89
91
|
|
|
@@ -96,7 +98,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
|
|
|
96
98
|
// TODO(burdon): Error sound.
|
|
97
99
|
log.catch(err);
|
|
98
100
|
}
|
|
99
|
-
}, [extensions, channel, roomId]);
|
|
101
|
+
}, [extensions, channel, roomId, joined]);
|
|
100
102
|
|
|
101
103
|
/**
|
|
102
104
|
* Leave the call.
|
|
@@ -115,7 +117,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
|
|
|
115
117
|
}
|
|
116
118
|
}, [extensions, roomId]);
|
|
117
119
|
|
|
118
|
-
const isJoined =
|
|
120
|
+
const isJoined = joined && currentRoomId === roomId;
|
|
119
121
|
|
|
120
122
|
return (
|
|
121
123
|
<StackItem.Content classNames={isJoined && 'bs-full'} toolbar={!isJoined}>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React, { useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Capability, Common, OperationPlugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { faker } from '@dxos/random';
|
|
11
11
|
import { useClient } from '@dxos/react-client';
|
|
@@ -45,7 +45,7 @@ const DefaultStory = () => {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
<main className='is-full max-is-
|
|
48
|
+
<main className='is-full max-is-proseMaxWidth mli-auto bs-full overflow-hidden'>
|
|
49
49
|
<ChatContainer space={space} thread={channel.defaultThread.target} />
|
|
50
50
|
</main>
|
|
51
51
|
);
|
|
@@ -58,11 +58,11 @@ const meta = {
|
|
|
58
58
|
decorators: [
|
|
59
59
|
withTheme,
|
|
60
60
|
withPluginManager({
|
|
61
|
-
plugins: [
|
|
61
|
+
plugins: [OperationPlugin()],
|
|
62
62
|
capabilities: [
|
|
63
|
-
contributes(
|
|
64
|
-
|
|
65
|
-
createSurface({
|
|
63
|
+
Capability.contributes(
|
|
64
|
+
Common.Capability.ReactSurface,
|
|
65
|
+
Common.createSurface({
|
|
66
66
|
id: 'test',
|
|
67
67
|
role: 'card',
|
|
68
68
|
component: ({ role }) => <span>{JSON.stringify({ role })}</span>,
|
|
@@ -8,9 +8,7 @@ import { Obj, Ref } from '@dxos/echo';
|
|
|
8
8
|
import { type Space, useMembers } from '@dxos/react-client/echo';
|
|
9
9
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
10
10
|
import { Icon, ScrollArea, type ThemedClassName, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
|
|
12
11
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
13
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
14
12
|
import {
|
|
15
13
|
MessageTextbox,
|
|
16
14
|
type MessageTextboxProps,
|
|
@@ -19,6 +17,8 @@ import {
|
|
|
19
17
|
threadLayout,
|
|
20
18
|
} from '@dxos/react-ui-thread';
|
|
21
19
|
import { Message, type Thread } from '@dxos/types';
|
|
20
|
+
import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/ui-editor';
|
|
21
|
+
import { mx } from '@dxos/ui-theme';
|
|
22
22
|
import { isNonNullable } from '@dxos/util';
|
|
23
23
|
|
|
24
24
|
import { useStatus } from '../hooks';
|
|
@@ -44,7 +44,7 @@ export type ChatContainerProps = ThemedClassName<
|
|
|
44
44
|
{
|
|
45
45
|
space: Space;
|
|
46
46
|
thread: Thread.Thread;
|
|
47
|
-
context?: Obj.
|
|
47
|
+
context?: Obj.Unknown;
|
|
48
48
|
autoFocusTextbox?: boolean;
|
|
49
49
|
} & Pick<ThreadRootProps, 'current'>
|
|
50
50
|
>;
|
|
@@ -60,7 +60,7 @@ export const ChatContainer = ({
|
|
|
60
60
|
const { t } = useTranslation(meta.id);
|
|
61
61
|
const id = Obj.getDXN(thread).toString();
|
|
62
62
|
const identity = useIdentity()!;
|
|
63
|
-
const members = useMembers(space?.
|
|
63
|
+
const members = useMembers(space?.id);
|
|
64
64
|
const activity = useStatus(space, id);
|
|
65
65
|
// TODO(wittjosiah): This is a hack to reset the editor after a message is sent.
|
|
66
66
|
const [_count, _setCount] = useState(0);
|
|
@@ -98,16 +98,18 @@ export const ChatContainer = ({
|
|
|
98
98
|
return false;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
Obj.change(thread, (t) => {
|
|
102
|
+
t.messages.push(
|
|
103
|
+
Ref.make(
|
|
104
|
+
Obj.make(Message.Message, {
|
|
105
|
+
created: new Date().toISOString(),
|
|
106
|
+
sender: { identityDid: identity.did },
|
|
107
|
+
blocks: [{ _tag: 'text', text: messageRef.current }],
|
|
108
|
+
properties: context ? { context: Ref.make(context) } : undefined,
|
|
109
|
+
}),
|
|
110
|
+
),
|
|
111
|
+
);
|
|
112
|
+
});
|
|
111
113
|
|
|
112
114
|
messageRef.current = '';
|
|
113
115
|
setAutoFocus(true);
|
|
@@ -138,10 +140,10 @@ export const ChatContainer = ({
|
|
|
138
140
|
</div>
|
|
139
141
|
{/* NOTE(thure): This can’t also be the `overflow-anchor` because `ScrollArea` injects an interceding node that contains this necessary ref’d element. */}
|
|
140
142
|
<div role='none' className='bs-px -mbs-px' ref={threadScrollRef} />
|
|
141
|
-
<ScrollArea.Scrollbar>
|
|
142
|
-
<ScrollArea.Thumb />
|
|
143
|
-
</ScrollArea.Scrollbar>
|
|
144
143
|
</ScrollArea.Viewport>
|
|
144
|
+
<ScrollArea.Scrollbar>
|
|
145
|
+
<ScrollArea.Thumb />
|
|
146
|
+
</ScrollArea.Scrollbar>
|
|
145
147
|
</ScrollArea.Root>
|
|
146
148
|
|
|
147
149
|
<MessageTextbox extensions={extensions} autoFocus={autoFocus} onSend={handleCreate} {...textboxMetadata} />
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
6
7
|
import React from 'react';
|
|
7
8
|
|
|
8
|
-
import {
|
|
9
|
+
import { OperationPlugin } from '@dxos/app-framework';
|
|
9
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { Obj, Query, Relation
|
|
11
|
+
import { Obj, Query, Relation } from '@dxos/echo';
|
|
12
|
+
import { TestSchema } from '@dxos/echo/testing';
|
|
11
13
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
12
14
|
import { faker } from '@dxos/random';
|
|
13
|
-
import {
|
|
15
|
+
import { useDatabase, useQuery } from '@dxos/react-client/echo';
|
|
14
16
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
15
17
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
16
18
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
@@ -26,22 +28,22 @@ faker.seed(1);
|
|
|
26
28
|
|
|
27
29
|
const DefaultStory = () => {
|
|
28
30
|
const identity = useIdentity();
|
|
29
|
-
const
|
|
30
|
-
const anchors = useQuery(
|
|
31
|
+
const db = useDatabase();
|
|
32
|
+
const anchors = useQuery(db, Query.type(AnchoredTo.AnchoredTo));
|
|
31
33
|
|
|
32
34
|
useAsyncEffect(async () => {
|
|
33
|
-
if (identity &&
|
|
34
|
-
const object =
|
|
35
|
-
const thread1 =
|
|
36
|
-
const thread2 =
|
|
37
|
-
|
|
35
|
+
if (identity && db) {
|
|
36
|
+
const object = db.add(Obj.make(TestSchema.Expando, {}));
|
|
37
|
+
const thread1 = db.add(createCommentThread(identity));
|
|
38
|
+
const thread2 = db.add(createProposalThread(identity));
|
|
39
|
+
db.add(
|
|
38
40
|
Relation.make(AnchoredTo.AnchoredTo, {
|
|
39
41
|
[Relation.Source]: thread1,
|
|
40
42
|
[Relation.Target]: object,
|
|
41
43
|
anchor: 'test',
|
|
42
44
|
}),
|
|
43
45
|
);
|
|
44
|
-
|
|
46
|
+
db.add(
|
|
45
47
|
Relation.make(AnchoredTo.AnchoredTo, {
|
|
46
48
|
[Relation.Source]: thread2,
|
|
47
49
|
[Relation.Target]: object,
|
|
@@ -49,9 +51,9 @@ const DefaultStory = () => {
|
|
|
49
51
|
}),
|
|
50
52
|
);
|
|
51
53
|
}
|
|
52
|
-
}, [identity,
|
|
54
|
+
}, [identity, db]);
|
|
53
55
|
|
|
54
|
-
if (!identity || !
|
|
56
|
+
if (!identity || !db || !anchors) {
|
|
55
57
|
return null;
|
|
56
58
|
}
|
|
57
59
|
|
|
@@ -63,17 +65,18 @@ const meta = {
|
|
|
63
65
|
render: render(DefaultStory),
|
|
64
66
|
decorators: [
|
|
65
67
|
withTheme,
|
|
66
|
-
withLayout({
|
|
68
|
+
withLayout({ layout: 'column', scroll: true }),
|
|
67
69
|
// TODO(wittjosiah): This shouldn't depend on app framework (use withClientProvider instead).
|
|
68
70
|
// Currently this is required due to useOnEditAnalytics.
|
|
69
71
|
withPluginManager({
|
|
70
72
|
plugins: [
|
|
71
|
-
|
|
73
|
+
OperationPlugin(),
|
|
72
74
|
ClientPlugin({
|
|
73
75
|
types: [Message.Message, Thread.Thread, AnchoredTo.AnchoredTo],
|
|
74
|
-
onClientInitialized:
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
onClientInitialized: ({ client }) =>
|
|
77
|
+
Effect.gen(function* () {
|
|
78
|
+
yield* Effect.promise(() => client.halo.createIdentity());
|
|
79
|
+
}),
|
|
77
80
|
}),
|
|
78
81
|
],
|
|
79
82
|
}),
|
|
@@ -4,12 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Obj,
|
|
7
|
+
import { Obj, Relation } from '@dxos/echo';
|
|
8
|
+
import { useObject } from '@dxos/echo-react';
|
|
8
9
|
import { getSpace, useMembers } from '@dxos/react-client/echo';
|
|
9
10
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
10
11
|
import { IconButton, Tag, Tooltip, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
|
|
12
|
-
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/react-ui-theme';
|
|
13
12
|
import {
|
|
14
13
|
MessageTextbox,
|
|
15
14
|
type MessageTextboxProps,
|
|
@@ -17,7 +16,8 @@ import {
|
|
|
17
16
|
type ThreadRootProps,
|
|
18
17
|
} from '@dxos/react-ui-thread';
|
|
19
18
|
import { type AnchoredTo, type Thread } from '@dxos/types';
|
|
20
|
-
import {
|
|
19
|
+
import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/ui-editor';
|
|
20
|
+
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';
|
|
21
21
|
|
|
22
22
|
import { useStatus } from '../hooks';
|
|
23
23
|
import { meta } from '../meta';
|
|
@@ -50,9 +50,10 @@ export const CommentsThreadContainer = ({
|
|
|
50
50
|
const { t } = useTranslation(meta.id);
|
|
51
51
|
const identity = useIdentity()!;
|
|
52
52
|
const space = getSpace(anchor);
|
|
53
|
-
const members = useMembers(space?.
|
|
53
|
+
const members = useMembers(space?.id);
|
|
54
54
|
const detached = !anchor.anchor;
|
|
55
55
|
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
56
|
+
const [messages] = useObject(thread, 'messages');
|
|
56
57
|
const activity = useStatus(space, Obj.getDXN(thread).toString());
|
|
57
58
|
const threadScrollRef = useRef<HTMLDivElement | null>(null);
|
|
58
59
|
|
|
@@ -144,12 +145,11 @@ export const CommentsThreadContainer = ({
|
|
|
144
145
|
</div>
|
|
145
146
|
</div>
|
|
146
147
|
|
|
147
|
-
{
|
|
148
|
-
{Ref.Array.targets(thread.messages?.filter(isNonNullable) ?? []).map((message) => (
|
|
148
|
+
{messages?.map((ref) => (
|
|
149
149
|
<MessageContainer
|
|
150
|
-
key={
|
|
150
|
+
key={ref.dxn.toString()}
|
|
151
151
|
editable
|
|
152
|
-
message={
|
|
152
|
+
message={ref}
|
|
153
153
|
members={members}
|
|
154
154
|
onDelete={handleMessageDelete}
|
|
155
155
|
onAcceptProposal={handleAcceptProposal}
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
5
6
|
import React, { type FC, type PropsWithChildren, useEffect, useState } from 'react';
|
|
6
7
|
|
|
7
8
|
import { useCapability } from '@dxos/app-framework/react';
|
|
8
9
|
import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
|
-
import { mx } from '@dxos/
|
|
10
|
+
import { mx } from '@dxos/ui-theme';
|
|
10
11
|
|
|
11
|
-
import { ThreadCapabilities } from '../../capabilities';
|
|
12
12
|
import { meta } from '../../meta';
|
|
13
|
+
import { ThreadCapabilities } from '../../types';
|
|
13
14
|
import { Toolbar, type ToolbarProps } from '../Call';
|
|
14
15
|
import { VideoObject } from '../Media';
|
|
15
16
|
import { ResponsiveContainer } from '../ResponsiveGrid';
|
|
@@ -39,9 +40,10 @@ type LobbyPreviewProps = {};
|
|
|
39
40
|
const LobbyPreview: FC<LobbyPreviewProps> = () => {
|
|
40
41
|
const { t } = useTranslation(meta.id);
|
|
41
42
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
43
|
+
const media = useAtomValue(call.mediaAtom);
|
|
42
44
|
const [classNames, setClassNames] = useState('');
|
|
43
45
|
useEffect(() => {
|
|
44
|
-
if (!
|
|
46
|
+
if (!media.videoEnabled) {
|
|
45
47
|
setClassNames('');
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
@@ -52,14 +54,14 @@ const LobbyPreview: FC<LobbyPreviewProps> = () => {
|
|
|
52
54
|
}, 500);
|
|
53
55
|
|
|
54
56
|
return () => clearTimeout(timeout);
|
|
55
|
-
}, [
|
|
57
|
+
}, [media.videoEnabled]);
|
|
56
58
|
|
|
57
59
|
return (
|
|
58
60
|
<div className='grid grow p-4'>
|
|
59
61
|
<ResponsiveContainer>
|
|
60
|
-
{(
|
|
62
|
+
{(media.videoEnabled && (
|
|
61
63
|
<VideoObject
|
|
62
|
-
videoStream={
|
|
64
|
+
videoStream={media.videoStream}
|
|
63
65
|
flip
|
|
64
66
|
muted
|
|
65
67
|
classNames={mx(
|
|
@@ -46,13 +46,13 @@ export const AudioStream: FC<AudioStreamProps> = ({ tracks }) => {
|
|
|
46
46
|
);
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
type
|
|
49
|
+
type AudioTrackParams = {
|
|
50
50
|
track: MediaStreamTrack;
|
|
51
51
|
mediaStream: MediaStream;
|
|
52
52
|
resetSrcObject: () => void;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
const AudioTrack = ({ track, mediaStream, resetSrcObject }:
|
|
55
|
+
const AudioTrack = ({ track, mediaStream, resetSrcObject }: AudioTrackParams) => {
|
|
56
56
|
useEffect(() => {
|
|
57
57
|
const currentTrack = track;
|
|
58
58
|
mediaStream.addTrack(currentTrack);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { type JSX, forwardRef, memo, useEffect, useRef } from 'react';
|
|
6
6
|
|
|
7
7
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
8
|
-
import { mx } from '@dxos/
|
|
8
|
+
import { mx } from '@dxos/ui-theme';
|
|
9
9
|
|
|
10
10
|
export type VideoObjectProps = Omit<JSX.IntrinsicElements['video'], 'className' | 'ref'> &
|
|
11
11
|
ThemedClassName<{
|