@dxos/plugin-thread 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae
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/CallDebugPanel-FGCTY7Q4.mjs +182 -0
- package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs.map +7 -0
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs +33 -0
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs.map +7 -0
- package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs +15 -0
- package/dist/lib/browser/ChatContainer-2243UD2M.mjs +14 -0
- package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs +204 -0
- package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs.map +7 -0
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs +20 -0
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs +191 -0
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs +27 -0
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZCEU5K23.mjs → chunk-ERK254BS.mjs} +207 -287
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
- package/dist/lib/browser/chunk-G6FJBSXX.mjs +1123 -0
- package/dist/lib/browser/chunk-G6FJBSXX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HDEQRBOC.mjs → chunk-HDLDMR54.mjs} +79 -76
- package/dist/lib/browser/chunk-HDLDMR54.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XYUJXHYV.mjs → chunk-ISCHODBV.mjs} +1 -1
- package/dist/lib/browser/{chunk-XYUJXHYV.mjs.map → chunk-ISCHODBV.mjs.map} +2 -2
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-LUK4UNFA.mjs +20 -0
- package/dist/lib/browser/chunk-LUK4UNFA.mjs.map +7 -0
- package/dist/lib/browser/chunk-PDHCY236.mjs +223 -0
- package/dist/lib/browser/chunk-PDHCY236.mjs.map +7 -0
- package/dist/lib/browser/chunk-PL5LIVP4.mjs +105 -0
- package/dist/lib/browser/chunk-PL5LIVP4.mjs.map +7 -0
- package/dist/lib/browser/chunk-U32R23JO.mjs +277 -0
- package/dist/lib/browser/chunk-U32R23JO.mjs.map +7 -0
- package/dist/lib/browser/chunk-UVUCB7QO.mjs +125 -0
- package/dist/lib/browser/chunk-UVUCB7QO.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +138 -141
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-GRRPCZHJ.mjs +210 -0
- package/dist/lib/browser/markdown-GRRPCZHJ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs +442 -0
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs.map +7 -0
- package/dist/lib/browser/react-root-7UFFPPRD.mjs +26 -0
- package/dist/lib/browser/react-root-7UFFPPRD.mjs.map +7 -0
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs +113 -0
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs.map +7 -0
- package/dist/lib/browser/repair-TBU45SBG.mjs +40 -0
- package/dist/lib/browser/repair-TBU45SBG.mjs.map +7 -0
- package/dist/lib/browser/settings-Y75FG6XR.mjs +35 -0
- package/dist/lib/browser/settings-Y75FG6XR.mjs.map +7 -0
- package/dist/lib/browser/state-OBTMMEUZ.mjs +25 -0
- package/dist/lib/browser/state-OBTMMEUZ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +11 -12
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs +183 -0
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs.map +7 -0
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs +34 -0
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs.map +7 -0
- package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs +16 -0
- package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs.map +7 -0
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs +15 -0
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs.map +7 -0
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs +205 -0
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs.map +7 -0
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs +21 -0
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs +192 -0
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs +28 -0
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs +107 -0
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7SZBKQUU.mjs +224 -0
- package/dist/lib/node-esm/chunk-7SZBKQUU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OBVAURUU.mjs → chunk-GPPP2MZ3.mjs} +7 -2
- package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs +1124 -0
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-TIPIOH2J.mjs → chunk-QP3KQOPQ.mjs} +207 -287
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs +278 -0
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs +126 -0
- package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs → chunk-VBI32FGI.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs.map → chunk-VBI32FGI.mjs.map} +2 -2
- package/dist/lib/node-esm/{chunk-2MMJF7DW.mjs → chunk-YN2Y7GPW.mjs} +79 -76
- package/dist/lib/node-esm/chunk-YN2Y7GPW.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +138 -141
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs +211 -0
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs +443 -0
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs +27 -0
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs +114 -0
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs.map +7 -0
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs +41 -0
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs.map +7 -0
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs +36 -0
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs.map +7 -0
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs +26 -0
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +11 -12
- 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 +4 -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 +6 -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 -16
- 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 +6 -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 +2 -2
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +5 -5
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts +2 -2
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +8 -8
- 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 +6 -5
- 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/ResponsiveGrid/ResponsiveContainer.stories.d.ts +5 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +5 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +3 -3
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/{components → containers/CallDebugPanel}/CallDebugPanel.d.ts +1 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +1 -0
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +3 -0
- package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/CallSidebar}/CallSidebar.d.ts +0 -1
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +1 -0
- package/dist/types/src/containers/CallSidebar/index.d.ts +3 -0
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +12 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ChannelContainer}/ChannelContainer.stories.d.ts +77 -7
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +17 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/{components/Chat.stories.d.ts → containers/ChatContainer/ChatContainer.stories.d.ts} +77 -6
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +5 -0
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +3 -0
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts +8 -0
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadSettings/index.d.ts +3 -0
- package/dist/types/src/containers/ThreadSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +8 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- 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 +13 -0
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +14 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/hooks/analytics.d.ts +2 -3
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.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/translations.d.ts +76 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +711 -0
- package/dist/types/src/types/Channel.d.ts.map +1 -0
- 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 +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3294 -446
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +87 -64
- package/src/ThreadPlugin.tsx +68 -107
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +40 -0
- package/src/calls/call-manager.ts +76 -52
- package/src/calls/call-swarm-synchronizer.ts +2 -2
- package/src/calls/media-manager.ts +10 -7
- package/src/calls/util/calls-service.ts +1 -1
- package/src/calls/util/stub-media-streams.ts +2 -2
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/calls-service.stories.tsx +2 -2
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +202 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -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 -13
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +82 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +399 -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 +98 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/repair/repair.ts +55 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +34 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +22 -0
- package/src/components/Call/Call.tsx +8 -4
- package/src/components/Call/Toolbar.tsx +36 -29
- package/src/components/Comments.stories.tsx +31 -30
- package/src/components/CommentsContainer.tsx +14 -15
- package/src/components/CommentsThreadContainer.tsx +42 -39
- package/src/components/Lobby/Lobby.tsx +9 -7
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.stories.tsx +3 -3
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessageContainer.tsx +62 -31
- package/src/components/Participant/Participant.tsx +32 -19
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +3 -3
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +3 -3
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +7 -4
- package/src/components/command-extension.ts +3 -3
- package/src/components/index.ts +0 -10
- package/src/components/testing.ts +7 -9
- package/src/{components → containers/CallDebugPanel}/CallDebugPanel.tsx +13 -15
- package/src/containers/CallDebugPanel/index.ts +7 -0
- package/src/containers/CallSidebar/CallSidebar.tsx +17 -0
- package/src/containers/CallSidebar/index.ts +7 -0
- package/src/{components → containers/ChannelContainer}/ChannelContainer.stories.tsx +16 -15
- package/src/{components → containers/ChannelContainer}/ChannelContainer.tsx +75 -59
- package/src/containers/ChannelContainer/index.ts +7 -0
- package/src/{components/Chat.stories.tsx → containers/ChatContainer/ChatContainer.stories.tsx} +23 -26
- package/src/{components → containers/ChatContainer}/ChatContainer.tsx +56 -52
- package/src/containers/ChatContainer/index.ts +7 -0
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +197 -0
- package/src/containers/ThreadCompanion/index.ts +7 -0
- package/src/containers/ThreadSettings/ThreadSettings.tsx +22 -0
- package/src/containers/ThreadSettings/index.ts +7 -0
- package/src/containers/index.ts +12 -0
- package/src/extensions/threads.ts +86 -42
- package/src/functions/create-proposals.ts +57 -0
- package/src/functions/index.ts +9 -0
- package/src/hooks/analytics.ts +22 -21
- package/src/hooks/index.ts +3 -2
- package/src/index.ts +1 -1
- package/src/meta.ts +8 -3
- package/src/testing/stories.ts +17 -15
- package/src/translations.ts +6 -3
- package/src/types/Channel.ts +30 -0
- package/src/types/capabilities.ts +34 -0
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +167 -88
- package/dist/lib/browser/ChannelContainer-BGDGZHV4.mjs +0 -16
- package/dist/lib/browser/ChatContainer-75KJZ4XR.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-ODKIAXR7.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-ODKIAXR7.mjs.map +0 -7
- package/dist/lib/browser/call-manager-BCKLI4QD.mjs +0 -24
- package/dist/lib/browser/call-manager-BCKLI4QD.mjs.map +0 -7
- package/dist/lib/browser/chunk-2MUYQOQE.mjs +0 -23
- package/dist/lib/browser/chunk-2MUYQOQE.mjs.map +0 -7
- package/dist/lib/browser/chunk-B7YQ7QR2.mjs +0 -376
- package/dist/lib/browser/chunk-B7YQ7QR2.mjs.map +0 -7
- package/dist/lib/browser/chunk-CMCVHULC.mjs +0 -986
- package/dist/lib/browser/chunk-CMCVHULC.mjs.map +0 -7
- package/dist/lib/browser/chunk-HDEQRBOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-L326LSNS.mjs +0 -18
- package/dist/lib/browser/chunk-L326LSNS.mjs.map +0 -7
- package/dist/lib/browser/chunk-T4KJ5JR4.mjs +0 -15
- package/dist/lib/browser/chunk-T4KJ5JR4.mjs.map +0 -7
- package/dist/lib/browser/chunk-VJMKS4CZ.mjs +0 -619
- package/dist/lib/browser/chunk-VJMKS4CZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-VTYX3SIM.mjs +0 -147
- package/dist/lib/browser/chunk-VTYX3SIM.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZCEU5K23.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-VOQD3TQ2.mjs +0 -427
- package/dist/lib/browser/intent-resolver-VOQD3TQ2.mjs.map +0 -7
- package/dist/lib/browser/markdown-R6MGRIA6.mjs +0 -169
- package/dist/lib/browser/markdown-R6MGRIA6.mjs.map +0 -7
- package/dist/lib/browser/react-root-UMSBTN6H.mjs +0 -28
- package/dist/lib/browser/react-root-UMSBTN6H.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SXMQEWKE.mjs +0 -109
- package/dist/lib/browser/react-surface-SXMQEWKE.mjs.map +0 -7
- package/dist/lib/browser/settings-TCNF54PN.mjs +0 -22
- package/dist/lib/browser/settings-TCNF54PN.mjs.map +0 -7
- package/dist/lib/browser/state-ZQ4IPOJT.mjs +0 -34
- package/dist/lib/browser/state-ZQ4IPOJT.mjs.map +0 -7
- package/dist/lib/browser/toolkit-JF4B4QIO.mjs +0 -84
- package/dist/lib/browser/toolkit-JF4B4QIO.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-OXC6BTU7.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-SH6LTFQL.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-DMPT3MY6.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-DMPT3MY6.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-Q7RY2YP4.mjs +0 -25
- package/dist/lib/node-esm/call-manager-Q7RY2YP4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2KZ4ODHU.mjs +0 -987
- package/dist/lib/node-esm/chunk-2KZ4ODHU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BAMZXJS4.mjs +0 -148
- package/dist/lib/node-esm/chunk-BAMZXJS4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BTGKI5IK.mjs +0 -377
- package/dist/lib/node-esm/chunk-BTGKI5IK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GZ4WL2IS.mjs +0 -25
- package/dist/lib/node-esm/chunk-GZ4WL2IS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LCHTNRK7.mjs +0 -19
- package/dist/lib/node-esm/chunk-LCHTNRK7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NHSIAEDW.mjs +0 -620
- package/dist/lib/node-esm/chunk-NHSIAEDW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OBVAURUU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TIPIOH2J.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-AKVH66PH.mjs +0 -428
- package/dist/lib/node-esm/intent-resolver-AKVH66PH.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-MYGTDXT6.mjs +0 -170
- package/dist/lib/node-esm/markdown-MYGTDXT6.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-W6AVTL5M.mjs +0 -29
- package/dist/lib/node-esm/react-root-W6AVTL5M.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-NLSZJGMO.mjs +0 -110
- package/dist/lib/node-esm/react-surface-NLSZJGMO.mjs.map +0 -7
- package/dist/lib/node-esm/settings-ZQHGVFBY.mjs +0 -23
- package/dist/lib/node-esm/settings-ZQHGVFBY.mjs.map +0 -7
- package/dist/lib/node-esm/state-FSLLJ5TZ.mjs +0 -35
- package/dist/lib/node-esm/state-FSLLJ5TZ.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-DHPKJITO.mjs +0 -85
- package/dist/lib/node-esm/toolkit-DHPKJITO.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/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/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/capabilities/toolkit.d.ts +0 -6
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/CallDebugPanel.d.ts.map +0 -1
- 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.map +0 -1
- 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/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/types/schema.d.ts +0 -179
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -184
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -348
- package/src/capabilities/markdown.ts +0 -69
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/react-surface.tsx +0 -89
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -26
- package/src/capabilities/toolkit.ts +0 -82
- package/src/components/CallSidebar.tsx +0 -18
- package/src/components/ThreadComplementary.tsx +0 -181
- package/src/components/ThreadSettings.tsx +0 -16
- package/src/types/schema.ts +0 -33
- /package/dist/lib/browser/{ChannelContainer-BGDGZHV4.mjs.map → ChannelContainer-EPYG4QAC.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-75KJZ4XR.mjs.map → ChatContainer-2243UD2M.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChannelContainer-OXC6BTU7.mjs.map → browser/blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChatContainer-SH6LTFQL.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
6
6
|
|
|
7
7
|
import { Event, synchronized } from '@dxos/async';
|
|
8
8
|
import { type Client } from '@dxos/client';
|
|
9
9
|
import { Resource } from '@dxos/context';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
11
|
-
import { live } from '@dxos/live-object';
|
|
12
11
|
import { type Tracks } from '@dxos/protocols/proto/dxos/edge/calls';
|
|
13
12
|
import { isNonNullable } from '@dxos/util';
|
|
14
13
|
|
|
@@ -31,84 +30,103 @@ export class CallManager extends Resource {
|
|
|
31
30
|
public readonly left = new Event<string>();
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
33
|
+
* Atom-based state. Updated via `_updateState()`.
|
|
35
34
|
* CAUTION: Do not change directly.
|
|
36
35
|
*/
|
|
37
|
-
private readonly
|
|
36
|
+
private readonly _stateAtom = Atom.make<GlobalState>({
|
|
38
37
|
call: {},
|
|
39
38
|
media: { pulledAudioTracks: {}, pulledVideoStreams: {} },
|
|
40
39
|
});
|
|
41
40
|
|
|
42
|
-
//
|
|
43
|
-
private readonly
|
|
44
|
-
private readonly
|
|
45
|
-
private readonly
|
|
41
|
+
// Derived atoms for reactive subscriptions.
|
|
42
|
+
private readonly _roomIdAtom = Atom.make((get) => get(this._stateAtom).call.roomId);
|
|
43
|
+
private readonly _raisedHandAtom = Atom.make((get) => get(this._stateAtom).call.raisedHand ?? false);
|
|
44
|
+
private readonly _speakingAtom = Atom.make((get) => get(this._stateAtom).call.speaking ?? false);
|
|
45
|
+
private readonly _joinedAtom = Atom.make((get) => get(this._stateAtom).call.joined ?? false);
|
|
46
|
+
private readonly _selfAtom = Atom.make((get) => get(this._stateAtom).call.self ?? {});
|
|
47
|
+
private readonly _tracksAtom = Atom.make((get) => get(this._stateAtom).call.tracks ?? {});
|
|
48
|
+
private readonly _usersAtom = Atom.make((get) => get(this._stateAtom).call.users ?? []);
|
|
49
|
+
private readonly _mediaAtom = Atom.make((get) => get(this._stateAtom).media);
|
|
50
|
+
private readonly _audioTracksToPlayAtom = Atom.make((get) => {
|
|
51
|
+
const state = get(this._stateAtom);
|
|
52
|
+
return (state.call.users ?? [])
|
|
53
|
+
.map((user: UserState) => (user.tracks?.audioEnabled ? user.tracks?.audio : undefined))
|
|
54
|
+
.filter(isNonNullable)
|
|
55
|
+
.map((track: string) => state.media.pulledAudioTracks[track as EncodedTrackName]?.track)
|
|
56
|
+
.filter(isNonNullable);
|
|
57
|
+
});
|
|
58
|
+
private readonly _videoStreamAtomFamily = Atom.family<EncodedTrackName, Atom.Atom<MediaStream | undefined>>((name) =>
|
|
59
|
+
Atom.make((get) => get(this._stateAtom).media.pulledVideoStreams[name]?.stream),
|
|
60
|
+
);
|
|
61
|
+
private readonly _activityAtomFamily = Atom.family<string, Atom.Atom<ActivityState | undefined>>((key) =>
|
|
62
|
+
Atom.make((get) => get(this._stateAtom).call.activities?.[key]),
|
|
63
|
+
);
|
|
46
64
|
|
|
47
65
|
private readonly _swarmSynchronizer: CallSwarmSynchronizer;
|
|
48
66
|
private readonly _mediaManager: MediaManager;
|
|
49
67
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
68
|
+
//
|
|
69
|
+
// Derived atoms for reactive UI subscriptions.
|
|
70
|
+
//
|
|
71
|
+
|
|
72
|
+
/** Derived atom for roomId. */
|
|
73
|
+
get roomIdAtom(): Atom.Atom<string | undefined> {
|
|
74
|
+
return this._roomIdAtom;
|
|
53
75
|
}
|
|
54
76
|
|
|
55
|
-
/**
|
|
56
|
-
get
|
|
57
|
-
return this.
|
|
77
|
+
/** Derived atom for raisedHand. */
|
|
78
|
+
get raisedHandAtom(): Atom.Atom<boolean> {
|
|
79
|
+
return this._raisedHandAtom;
|
|
58
80
|
}
|
|
59
81
|
|
|
60
|
-
/**
|
|
61
|
-
get
|
|
62
|
-
return this.
|
|
82
|
+
/** Derived atom for speaking. */
|
|
83
|
+
get speakingAtom(): Atom.Atom<boolean> {
|
|
84
|
+
return this._speakingAtom;
|
|
63
85
|
}
|
|
64
86
|
|
|
65
|
-
/**
|
|
66
|
-
get
|
|
67
|
-
return this.
|
|
87
|
+
/** Derived atom for joined. */
|
|
88
|
+
get joinedAtom(): Atom.Atom<boolean> {
|
|
89
|
+
return this._joinedAtom;
|
|
68
90
|
}
|
|
69
91
|
|
|
70
|
-
/**
|
|
71
|
-
get
|
|
72
|
-
return this.
|
|
92
|
+
/** Derived atom for self. */
|
|
93
|
+
get selfAtom(): Atom.Atom<UserState> {
|
|
94
|
+
return this._selfAtom;
|
|
73
95
|
}
|
|
74
96
|
|
|
75
|
-
/**
|
|
76
|
-
get
|
|
77
|
-
return this.
|
|
97
|
+
/** Derived atom for tracks. */
|
|
98
|
+
get tracksAtom(): Atom.Atom<Tracks> {
|
|
99
|
+
return this._tracksAtom;
|
|
78
100
|
}
|
|
79
101
|
|
|
80
|
-
/**
|
|
81
|
-
get
|
|
82
|
-
return this.
|
|
102
|
+
/** Derived atom for users. */
|
|
103
|
+
get usersAtom(): Atom.Atom<UserState[]> {
|
|
104
|
+
return this._usersAtom;
|
|
83
105
|
}
|
|
84
106
|
|
|
85
|
-
/**
|
|
86
|
-
get
|
|
87
|
-
return this.
|
|
107
|
+
/** Derived atom for media. */
|
|
108
|
+
get mediaAtom(): Atom.Atom<MediaState> {
|
|
109
|
+
return this._mediaAtom;
|
|
88
110
|
}
|
|
89
111
|
|
|
90
|
-
/**
|
|
91
|
-
get
|
|
92
|
-
return
|
|
93
|
-
.map((user) => (user.tracks?.audioEnabled ? user.tracks?.audio : undefined))
|
|
94
|
-
.filter(isNonNullable)
|
|
95
|
-
.map((track) => this._state.media.pulledAudioTracks[track as EncodedTrackName]?.track)
|
|
96
|
-
.filter(isNonNullable);
|
|
112
|
+
/** Derived atom for audioTracksToPlay. */
|
|
113
|
+
get audioTracksToPlayAtom(): Atom.Atom<MediaStreamTrack[]> {
|
|
114
|
+
return this._audioTracksToPlayAtom;
|
|
97
115
|
}
|
|
98
116
|
|
|
99
|
-
/**
|
|
100
|
-
get
|
|
101
|
-
return this.
|
|
117
|
+
/** Returns the full state atom for reactive subscriptions. */
|
|
118
|
+
get stateAtom(): Atom.Atom<GlobalState> {
|
|
119
|
+
return this._stateAtom;
|
|
102
120
|
}
|
|
103
121
|
|
|
104
|
-
/**
|
|
105
|
-
|
|
106
|
-
return
|
|
122
|
+
/** Returns a derived atom for a video stream by name. */
|
|
123
|
+
videoStreamAtom(name: EncodedTrackName): Atom.Atom<MediaStream | undefined> {
|
|
124
|
+
return this._videoStreamAtomFamily(name);
|
|
107
125
|
}
|
|
108
126
|
|
|
109
|
-
/**
|
|
110
|
-
|
|
111
|
-
return this.
|
|
127
|
+
/** Returns a derived atom for an activity by key. */
|
|
128
|
+
activityAtom(key: string): Atom.Atom<ActivityState | undefined> {
|
|
129
|
+
return this._activityAtomFamily(key);
|
|
112
130
|
}
|
|
113
131
|
|
|
114
132
|
setRoomId(roomId: string): void {
|
|
@@ -152,7 +170,10 @@ export class CallManager extends Resource {
|
|
|
152
170
|
}
|
|
153
171
|
|
|
154
172
|
// TODO(burdon): Can this be mocked?
|
|
155
|
-
constructor(
|
|
173
|
+
constructor(
|
|
174
|
+
private readonly _client: Client,
|
|
175
|
+
private readonly _registry: Registry.Registry,
|
|
176
|
+
) {
|
|
156
177
|
super();
|
|
157
178
|
this._client.config.getOrThrow('runtime.services.edge.url');
|
|
158
179
|
const networkService = this._client.services.services.NetworkService;
|
|
@@ -205,7 +226,8 @@ export class CallManager extends Resource {
|
|
|
205
226
|
this._swarmSynchronizer.setJoined(false);
|
|
206
227
|
await this._swarmSynchronizer.leave();
|
|
207
228
|
await this._mediaManager.leave();
|
|
208
|
-
|
|
229
|
+
const roomId = this._registry.get(this._roomIdAtom);
|
|
230
|
+
roomId && this.left.emit(roomId);
|
|
209
231
|
}
|
|
210
232
|
|
|
211
233
|
private _onCallStateUpdated(state: CallState): void {
|
|
@@ -240,7 +262,9 @@ export class CallManager extends Resource {
|
|
|
240
262
|
* Only this method is allowed to change state.
|
|
241
263
|
*/
|
|
242
264
|
private _updateState(): void {
|
|
243
|
-
this.
|
|
244
|
-
|
|
265
|
+
this._registry.set(this._stateAtom, {
|
|
266
|
+
call: this._swarmSynchronizer._getState(),
|
|
267
|
+
media: this._mediaManager._getState(),
|
|
268
|
+
});
|
|
245
269
|
}
|
|
246
270
|
}
|
|
@@ -50,7 +50,7 @@ export type CallState = {
|
|
|
50
50
|
tracks?: UserState['tracks'];
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
export type
|
|
53
|
+
export type CallSwarmSynchronizerProps = { networkService: NetworkService };
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Period for peer to reconnect to the call swarm gracefully if connection was lost abruptly.
|
|
@@ -76,7 +76,7 @@ export class CallSwarmSynchronizer extends Resource {
|
|
|
76
76
|
|
|
77
77
|
private _sendStateTask?: DeferredTask = undefined;
|
|
78
78
|
|
|
79
|
-
constructor({ networkService }:
|
|
79
|
+
constructor({ networkService }: CallSwarmSynchronizerProps) {
|
|
80
80
|
super();
|
|
81
81
|
this._networkService = networkService;
|
|
82
82
|
}
|
|
@@ -51,7 +51,7 @@ const MAX_WEB_CAM_FRAMERATE = 24;
|
|
|
51
51
|
const MAX_WEB_CAM_BITRATE = 120_0000;
|
|
52
52
|
const RETRY_INTERVAL = 100;
|
|
53
53
|
|
|
54
|
-
export type
|
|
54
|
+
export type MediaManagerProps = {
|
|
55
55
|
serviceConfig: CallsServiceConfig;
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -59,9 +59,13 @@ const USE_INAUDIBLE_AUDIO = true;
|
|
|
59
59
|
|
|
60
60
|
export class MediaManager extends Resource {
|
|
61
61
|
public readonly stateUpdated = new Event<MediaState>();
|
|
62
|
-
private readonly _state: MediaState = { pulledVideoStreams: {}, pulledAudioTracks: {} };
|
|
63
|
-
private _speakingMonitor?: SpeakingMonitor = undefined;
|
|
64
62
|
|
|
63
|
+
private readonly _state: MediaState = {
|
|
64
|
+
pulledVideoStreams: {},
|
|
65
|
+
pulledAudioTracks: {},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
private _speakingMonitor?: SpeakingMonitor = undefined;
|
|
65
69
|
private _trackToReconcile: EncodedTrackName[] = [];
|
|
66
70
|
private _blackCanvasStreamTrack?: MediaStreamTrack = undefined;
|
|
67
71
|
private _inaudibleAudioStreamTrack?: MediaStreamTrack = undefined;
|
|
@@ -85,6 +89,7 @@ export class MediaManager extends Resource {
|
|
|
85
89
|
width: VIDEO_WIDTH,
|
|
86
90
|
height: VIDEO_HEIGHT,
|
|
87
91
|
});
|
|
92
|
+
|
|
88
93
|
this._state.videoTrack = this._blackCanvasStreamTrack;
|
|
89
94
|
this._state.videoStream = new MediaStream();
|
|
90
95
|
this._state.videoStream.addTrack(this._state.videoTrack);
|
|
@@ -137,6 +142,7 @@ export class MediaManager extends Resource {
|
|
|
137
142
|
this._state.videoStream!.removeTrack(this._state.videoTrack!);
|
|
138
143
|
this._state.videoTrack = await getUserMediaTrack('videoinput', { width: VIDEO_WIDTH, height: VIDEO_HEIGHT });
|
|
139
144
|
this._state.videoStream!.addTrack(this._state.videoTrack);
|
|
145
|
+
|
|
140
146
|
this._state.videoEnabled = true;
|
|
141
147
|
this.stateUpdated.emit(this._state);
|
|
142
148
|
this._pushTracksTask!.schedule();
|
|
@@ -226,7 +232,6 @@ export class MediaManager extends Resource {
|
|
|
226
232
|
// Wait for cloudflare to process the track.
|
|
227
233
|
await cancelWithContext(this._ctx, sleep(800));
|
|
228
234
|
const trackNames = this._trackToReconcile;
|
|
229
|
-
|
|
230
235
|
const tracksToPull = trackNames.filter(
|
|
231
236
|
(name) => !this._state.pulledAudioTracks[name] && !this._state.pulledVideoStreams[name],
|
|
232
237
|
);
|
|
@@ -258,8 +263,8 @@ export class MediaManager extends Resource {
|
|
|
258
263
|
currentAudioTracks: Object.keys(this._state.pulledAudioTracks),
|
|
259
264
|
currentVideoStreams: Object.keys(this._state.pulledVideoStreams),
|
|
260
265
|
});
|
|
261
|
-
this.stateUpdated.emit(this._state);
|
|
262
266
|
|
|
267
|
+
this.stateUpdated.emit(this._state);
|
|
263
268
|
if (pullResults.some(({ shouldRetry }) => shouldRetry)) {
|
|
264
269
|
await cancelWithContext(this._ctx, sleep(RETRY_INTERVAL));
|
|
265
270
|
log.info('retrying pull tracks', { tracksToPull });
|
|
@@ -296,7 +301,6 @@ export class MediaManager extends Resource {
|
|
|
296
301
|
}
|
|
297
302
|
|
|
298
303
|
const shouldRetry = pushVideoResult.shouldRetry || pushAudioResult.shouldRetry || pushScreenshareResult.shouldRetry;
|
|
299
|
-
|
|
300
304
|
if (updated) {
|
|
301
305
|
this.stateUpdated.emit(this._state);
|
|
302
306
|
}
|
|
@@ -356,7 +360,6 @@ export class MediaManager extends Resource {
|
|
|
356
360
|
}
|
|
357
361
|
|
|
358
362
|
const ctx = this._ctx.derive();
|
|
359
|
-
|
|
360
363
|
try {
|
|
361
364
|
return {
|
|
362
365
|
track: await this._state.peer!.pushTrack({
|
|
@@ -60,13 +60,12 @@ const userGestureEvents = [
|
|
|
60
60
|
*/
|
|
61
61
|
export const createInaudibleAudioStreamTrack = async ({ ctx }: { ctx: Context }): Promise<MediaStreamTrack> => {
|
|
62
62
|
const audioContext = new window.AudioContext();
|
|
63
|
+
|
|
63
64
|
const oscillator = audioContext.createOscillator();
|
|
64
65
|
oscillator.type = 'triangle';
|
|
65
|
-
// roughly sounds like a box fan
|
|
66
66
|
oscillator.frequency.setValueAtTime(20, audioContext.currentTime);
|
|
67
67
|
|
|
68
68
|
const gainNode = audioContext.createGain();
|
|
69
|
-
// even w/ gain at 0 some packets are sent
|
|
70
69
|
gainNode.gain.setValueAtTime(0, audioContext.currentTime);
|
|
71
70
|
oscillator.connect(gainNode);
|
|
72
71
|
|
|
@@ -85,6 +84,7 @@ export const createInaudibleAudioStreamTrack = async ({ ctx }: { ctx: Context })
|
|
|
85
84
|
audioContextStartedPreviously = true;
|
|
86
85
|
ensureOscillatorStarted();
|
|
87
86
|
}
|
|
87
|
+
|
|
88
88
|
if (audioContext.state === 'suspended' || (audioContext.state as string) === 'interrupted') {
|
|
89
89
|
resumeAudioContext();
|
|
90
90
|
}
|
|
@@ -27,8 +27,8 @@ export class FIFOScheduler {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// TODO(mykola): Reconcile with @dxos/async task scheduling.
|
|
30
|
-
export class BulkRequestDispatcher<
|
|
31
|
-
#currentBatch:
|
|
30
|
+
export class BulkRequestDispatcher<RequestEntryProps, BulkResponse> {
|
|
31
|
+
#currentBatch: RequestEntryProps[];
|
|
32
32
|
#currentBulkResponse: Promise<BulkResponse> | null;
|
|
33
33
|
#batchSizeLimit: number;
|
|
34
34
|
|
|
@@ -43,8 +43,8 @@ export class BulkRequestDispatcher<RequestEntryParams, BulkResponse> {
|
|
|
43
43
|
* At the event loop iteration end, the accumulated entries will be dispatched as a bulk request.
|
|
44
44
|
*/
|
|
45
45
|
doBulkRequest(
|
|
46
|
-
params:
|
|
47
|
-
bulkRequestFunc: (bulkCopy:
|
|
46
|
+
params: RequestEntryProps,
|
|
47
|
+
bulkRequestFunc: (bulkCopy: RequestEntryProps[]) => Promise<BulkResponse>,
|
|
48
48
|
): Promise<BulkResponse> {
|
|
49
49
|
if (this.#currentBatch.length >= this.#batchSizeLimit) {
|
|
50
50
|
// If it reaches the batch size limit, we make another bulk request.
|
|
@@ -172,10 +172,10 @@ const DefaultStory = ({ source }: StoryProps) => {
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
const meta = {
|
|
175
|
-
title: 'plugins/plugin-thread/
|
|
175
|
+
title: 'plugins/plugin-thread/experimental/Calls',
|
|
176
176
|
render: DefaultStory,
|
|
177
177
|
decorators: [
|
|
178
|
-
withTheme,
|
|
178
|
+
withTheme(),
|
|
179
179
|
withClientProvider({
|
|
180
180
|
config: new Config({
|
|
181
181
|
runtime: {
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Atom } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Option from 'effect/Option';
|
|
8
|
+
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
11
|
+
import { Obj } from '@dxos/echo';
|
|
12
|
+
import { Operation } from '@dxos/operation';
|
|
13
|
+
import { AttentionCapabilities } from '@dxos/plugin-attention';
|
|
14
|
+
import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
15
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
16
|
+
import { type SelectionManager, type SelectionMode, defaultSelection } from '@dxos/react-ui-attention';
|
|
17
|
+
|
|
18
|
+
import { meta } from '../../meta';
|
|
19
|
+
import { Channel, ThreadCapabilities, ThreadOperation, type ThreadState } from '../../types';
|
|
20
|
+
import { getAnchor } from '../../util';
|
|
21
|
+
|
|
22
|
+
type CommentDisabledParams = {
|
|
23
|
+
stateAtom: Atom.Atom<Atom.Writable<ThreadState>[]>;
|
|
24
|
+
selectionManager: SelectionManager;
|
|
25
|
+
objectId: string;
|
|
26
|
+
commentsType: string;
|
|
27
|
+
selectionMode: SelectionMode | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Atom family to derive whether the comment button should be disabled.
|
|
32
|
+
* Uses a composite key to ensure proper caching.
|
|
33
|
+
*/
|
|
34
|
+
const commentDisabledFamily = Atom.family(
|
|
35
|
+
({ stateAtom, selectionManager, objectId, commentsType, selectionMode }: CommentDisabledParams) =>
|
|
36
|
+
Atom.make((get) => {
|
|
37
|
+
const stateAtoms = get(stateAtom);
|
|
38
|
+
const state = stateAtoms[0] ? get(stateAtoms[0]) : undefined;
|
|
39
|
+
const toolbar = state?.toolbar ?? {};
|
|
40
|
+
const selectionState = get(selectionManager.state);
|
|
41
|
+
const selection =
|
|
42
|
+
selectionState.selections[objectId] ?? (selectionMode ? defaultSelection(selectionMode) : undefined);
|
|
43
|
+
const anchor = getAnchor(selection);
|
|
44
|
+
const invalidSelection = !anchor;
|
|
45
|
+
const overlappingComment = toolbar[objectId];
|
|
46
|
+
return (commentsType === 'anchored' && invalidSelection) || overlappingComment;
|
|
47
|
+
}),
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
/** Match ECHO objects that are NOT Channels (i.e. objects that can have comments). */
|
|
51
|
+
const whenCommentableObject = NodeMatcher.whenAll(
|
|
52
|
+
NodeMatcher.whenEchoObjectMatches,
|
|
53
|
+
NodeMatcher.whenNot(NodeMatcher.whenEchoTypeMatches(Channel.Channel)),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
// TODO(wittjosiah): Highlight active calls in L1.
|
|
57
|
+
// Track active meetings by subscribing to meetings query and polling the swarms of recent meetings in the space.
|
|
58
|
+
export default Capability.makeModule(
|
|
59
|
+
Effect.fnUntraced(function* () {
|
|
60
|
+
const capabilities = yield* Capability.Service;
|
|
61
|
+
|
|
62
|
+
const resolve = (typename: string) =>
|
|
63
|
+
capabilities.getAll(AppCapabilities.Metadata).find(({ id }: { id: string }) => id === typename)?.metadata ?? {};
|
|
64
|
+
|
|
65
|
+
const extensions = yield* Effect.all([
|
|
66
|
+
GraphBuilder.createExtension({
|
|
67
|
+
id: `${meta.id}/active-call`,
|
|
68
|
+
match: NodeMatcher.whenRoot,
|
|
69
|
+
connector: (node, get) => {
|
|
70
|
+
const callManagerAtom = capabilities.atom(ThreadCapabilities.CallManager);
|
|
71
|
+
const [call] = get(callManagerAtom);
|
|
72
|
+
if (!call) {
|
|
73
|
+
return Effect.succeed([]);
|
|
74
|
+
}
|
|
75
|
+
// Use derived joinedAtom for efficient subscription.
|
|
76
|
+
const joined = get(call.joinedAtom);
|
|
77
|
+
return Effect.succeed(
|
|
78
|
+
joined
|
|
79
|
+
? [
|
|
80
|
+
{
|
|
81
|
+
id: `${node.id}${ATTENDABLE_PATH_SEPARATOR}active-call`,
|
|
82
|
+
type: DECK_COMPANION_TYPE,
|
|
83
|
+
data: null,
|
|
84
|
+
properties: {
|
|
85
|
+
label: ['call panel label', { ns: meta.id }],
|
|
86
|
+
icon: 'ph--video-conference--regular',
|
|
87
|
+
position: 'hoist',
|
|
88
|
+
disposition: 'hidden',
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
]
|
|
92
|
+
: [],
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
GraphBuilder.createTypeExtension({
|
|
97
|
+
id: `${meta.id}/channel-chat-companion`,
|
|
98
|
+
type: Channel.Channel,
|
|
99
|
+
connector: (channel, get) => {
|
|
100
|
+
const callManager = capabilities.get(ThreadCapabilities.CallManager);
|
|
101
|
+
// Use derived atoms for efficient subscription.
|
|
102
|
+
const joined = get(callManager.joinedAtom);
|
|
103
|
+
const roomId = get(callManager.roomIdAtom);
|
|
104
|
+
const isActive = joined && roomId === Obj.getDXN(channel).toString();
|
|
105
|
+
if (!isActive) {
|
|
106
|
+
return Effect.succeed([]);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return Effect.succeed([
|
|
110
|
+
{
|
|
111
|
+
id: `${Obj.getDXN(channel).toString()}${ATTENDABLE_PATH_SEPARATOR}chat`,
|
|
112
|
+
type: PLANK_COMPANION_TYPE,
|
|
113
|
+
data: 'chat',
|
|
114
|
+
properties: {
|
|
115
|
+
label: ['channel companion label', { ns: meta.id }],
|
|
116
|
+
icon: 'ph--hash--regular',
|
|
117
|
+
position: 'hoist',
|
|
118
|
+
disposition: 'hidden',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
]);
|
|
122
|
+
},
|
|
123
|
+
}),
|
|
124
|
+
GraphBuilder.createExtension({
|
|
125
|
+
id: `${meta.id}/comments-companion`,
|
|
126
|
+
match: (node) => {
|
|
127
|
+
if (!Obj.isObject(node.data) || Option.isNone(whenCommentableObject(node))) {
|
|
128
|
+
return Option.none();
|
|
129
|
+
}
|
|
130
|
+
const metadata = resolve(Obj.getTypename(node.data)!);
|
|
131
|
+
return typeof metadata.comments === 'string' ? Option.some(node) : Option.none();
|
|
132
|
+
},
|
|
133
|
+
connector: (node) =>
|
|
134
|
+
Effect.succeed([
|
|
135
|
+
{
|
|
136
|
+
id: [node.id, 'comments'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
137
|
+
type: PLANK_COMPANION_TYPE,
|
|
138
|
+
data: 'comments',
|
|
139
|
+
properties: {
|
|
140
|
+
label: ['comments label', { ns: meta.id }],
|
|
141
|
+
icon: 'ph--chat-text--regular',
|
|
142
|
+
disposition: 'hidden',
|
|
143
|
+
position: 'hoist',
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
]),
|
|
147
|
+
}),
|
|
148
|
+
GraphBuilder.createExtension({
|
|
149
|
+
id: `${meta.id}/comment-toolbar`,
|
|
150
|
+
match: (node) => {
|
|
151
|
+
if (!Obj.isObject(node.data) || Option.isNone(whenCommentableObject(node))) {
|
|
152
|
+
return Option.none();
|
|
153
|
+
}
|
|
154
|
+
const metadata = resolve(Obj.getTypename(node.data)!);
|
|
155
|
+
return typeof metadata.comments === 'string' ? Option.some(node.data) : Option.none();
|
|
156
|
+
},
|
|
157
|
+
actions: (object, get) => {
|
|
158
|
+
const stateAtom = capabilities.atom(ThreadCapabilities.State);
|
|
159
|
+
const selectionManager = capabilities.get(AttentionCapabilities.Selection);
|
|
160
|
+
const objectId = Obj.getDXN(object).toString();
|
|
161
|
+
const metadata = resolve(Obj.getTypename(object)!);
|
|
162
|
+
|
|
163
|
+
const disabled = get(
|
|
164
|
+
commentDisabledFamily({
|
|
165
|
+
stateAtom,
|
|
166
|
+
selectionManager,
|
|
167
|
+
objectId,
|
|
168
|
+
commentsType: metadata.comments as string,
|
|
169
|
+
selectionMode: metadata.selectionMode,
|
|
170
|
+
}),
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
return Effect.succeed([
|
|
174
|
+
{
|
|
175
|
+
id: `${Obj.getDXN(object).toString()}/comment`,
|
|
176
|
+
data: Effect.fnUntraced(function* () {
|
|
177
|
+
const metadata = resolve(Obj.getTypename(object)!);
|
|
178
|
+
const selection = selectionManager.getSelection(Obj.getDXN(object).toString());
|
|
179
|
+
const anchor = metadata.comments === 'anchored' ? getAnchor(selection) : Date.now().toString();
|
|
180
|
+
const name = metadata.getAnchorLabel?.(object, anchor);
|
|
181
|
+
yield* Operation.invoke(ThreadOperation.Create, {
|
|
182
|
+
anchor,
|
|
183
|
+
name,
|
|
184
|
+
subject: object,
|
|
185
|
+
});
|
|
186
|
+
}),
|
|
187
|
+
properties: {
|
|
188
|
+
label: ['add comment label', { ns: meta.id }],
|
|
189
|
+
icon: 'ph--chat-text--regular',
|
|
190
|
+
disposition: 'toolbar',
|
|
191
|
+
disabled,
|
|
192
|
+
testId: 'thread.comment.add',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
]);
|
|
196
|
+
},
|
|
197
|
+
}),
|
|
198
|
+
]);
|
|
199
|
+
|
|
200
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
201
|
+
}),
|
|
202
|
+
);
|
|
@@ -0,0 +1,17 @@
|
|
|
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 } from '@dxos/app-toolkit';
|
|
9
|
+
|
|
10
|
+
import { ThreadBlueprint } from '../../blueprints';
|
|
11
|
+
|
|
12
|
+
const blueprintDefinition = Capability.makeModule<
|
|
13
|
+
[],
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
15
|
+
>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, ThreadBlueprint)]));
|
|
16
|
+
|
|
17
|
+
export default blueprintDefinition;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { ClientCapabilities } from '@dxos/plugin-client';
|
|
9
|
+
|
|
10
|
+
import { CallManager } from '../../calls';
|
|
11
|
+
import { ThreadCapabilities } from '../../types';
|
|
12
|
+
|
|
13
|
+
export default Capability.makeModule(
|
|
14
|
+
Effect.fnUntraced(function* () {
|
|
15
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
16
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
17
|
+
const callManager = new CallManager(client, registry);
|
|
18
|
+
yield* Effect.tryPromise(() => callManager.open());
|
|
19
|
+
|
|
20
|
+
return Capability.contributes(ThreadCapabilities.CallManager, callManager, () =>
|
|
21
|
+
Effect.sync(() => {
|
|
22
|
+
void callManager.close();
|
|
23
|
+
}),
|
|
24
|
+
);
|
|
25
|
+
}),
|
|
26
|
+
);
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export const Toolkit = lazy(() => import('./toolkit'));
|
|
16
|
-
|
|
17
|
-
export * from './capabilities';
|
|
5
|
+
export * from './app-graph-builder';
|
|
6
|
+
export * from './blueprint-definition';
|
|
7
|
+
export * from './call-manager';
|
|
8
|
+
export * from './markdown';
|
|
9
|
+
export * from './operation-resolver';
|
|
10
|
+
export * from './react-root';
|
|
11
|
+
export * from './react-surface';
|
|
12
|
+
export * from './repair';
|
|
13
|
+
export * from './settings';
|
|
14
|
+
export * from './state';
|