@dxos/plugin-thread 0.8.3 → 0.8.4-main.1f223c7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/ChannelContainer-4PYFOIDK.mjs +16 -0
- package/dist/lib/browser/ChatContainer-EXNNREYB.mjs +15 -0
- package/dist/lib/browser/{app-graph-builder-OY7R7EJP.mjs → app-graph-builder-FHAOPO57.mjs} +8 -8
- package/dist/lib/browser/app-graph-builder-FHAOPO57.mjs.map +7 -0
- package/dist/lib/browser/{call-manager-APQAZWHT.mjs → call-manager-RMPTWSTF.mjs} +6 -5
- package/dist/lib/browser/call-manager-RMPTWSTF.mjs.map +7 -0
- package/dist/lib/browser/{chunk-R5MDLUPC.mjs → chunk-4APCDRSH.mjs} +3 -3
- package/dist/lib/browser/{chunk-R5MDLUPC.mjs.map → chunk-4APCDRSH.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-XZKBN3NS.mjs → chunk-7W7QK5ZP.mjs} +253 -250
- package/dist/lib/browser/chunk-7W7QK5ZP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IIUTBDVB.mjs → chunk-EV4JWI7L.mjs} +2 -2
- package/dist/lib/browser/chunk-G4CNILRR.mjs +23 -0
- package/dist/lib/browser/{chunk-6NBVNXTM.mjs.map → chunk-G4CNILRR.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-JKQUJOTX.mjs → chunk-GERVMFQW.mjs} +2 -2
- package/dist/lib/browser/{chunk-AEXWNS6Z.mjs → chunk-KTWYVC5X.mjs} +34 -15
- package/dist/lib/browser/chunk-KTWYVC5X.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TAFSCSUR.mjs → chunk-PBMNFG3B.mjs} +97 -72
- package/dist/lib/browser/chunk-PBMNFG3B.mjs.map +7 -0
- package/dist/lib/browser/chunk-RI3Z6MK3.mjs +181 -0
- package/dist/lib/browser/chunk-RI3Z6MK3.mjs.map +7 -0
- package/dist/lib/browser/chunk-XYUJXHYV.mjs +106 -0
- package/dist/lib/browser/chunk-XYUJXHYV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4H4A264L.mjs → chunk-ZCEU5K23.mjs} +490 -308
- package/dist/lib/browser/chunk-ZCEU5K23.mjs.map +7 -0
- package/dist/lib/browser/{chunk-PG5CTFKK.mjs → chunk-ZH2WPTNP.mjs} +226 -158
- package/dist/lib/browser/chunk-ZH2WPTNP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +49 -44
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-FK2MDVDT.mjs → intent-resolver-J7OCP2P6.mjs} +90 -16
- package/dist/lib/browser/intent-resolver-J7OCP2P6.mjs.map +7 -0
- package/dist/lib/browser/{markdown-TE5SWWNJ.mjs → markdown-Z677YORA.mjs} +8 -8
- package/dist/lib/browser/markdown-Z677YORA.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-XKOD4KRB.mjs +28 -0
- package/dist/lib/browser/{react-surface-VXUJKSOG.mjs → react-surface-GVGZRBDK.mjs} +12 -11
- package/dist/lib/browser/react-surface-GVGZRBDK.mjs.map +7 -0
- package/dist/lib/browser/{settings-RB2RSLXV.mjs → settings-GRKEID73.mjs} +4 -4
- package/dist/lib/browser/{state-RKL5MSDP.mjs → state-2T4KDWBX.mjs} +4 -4
- package/dist/lib/browser/{state-RKL5MSDP.mjs.map → state-2T4KDWBX.mjs.map} +2 -2
- package/dist/lib/browser/toolkit-KUPIIFC6.mjs +80 -0
- package/dist/lib/browser/toolkit-KUPIIFC6.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/ChannelContainer-KQQEZWUN.mjs +17 -0
- package/dist/lib/node-esm/{ChatContainer-F6CSADV7.mjs → ChatContainer-QVQKFBWA.mjs} +6 -5
- package/dist/lib/node-esm/{app-graph-builder-BAHBHYWI.mjs → app-graph-builder-XEYWX5FC.mjs} +8 -8
- package/dist/lib/node-esm/app-graph-builder-XEYWX5FC.mjs.map +7 -0
- package/dist/lib/node-esm/{call-manager-UUYXLF4T.mjs → call-manager-QAREJFVX.mjs} +6 -5
- package/dist/lib/node-esm/call-manager-QAREJFVX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs +108 -0
- package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4T45PCKP.mjs +25 -0
- package/dist/lib/node-esm/{chunk-O63QJPQX.mjs.map → chunk-4T45PCKP.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-PGRP3O4O.mjs → chunk-57XR3LEF.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-P6RLFCNT.mjs → chunk-DKCQCENK.mjs} +97 -72
- package/dist/lib/node-esm/chunk-DKCQCENK.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-ESQC6SYE.mjs → chunk-GRLRWTRU.mjs} +2 -2
- package/dist/lib/node-esm/chunk-JNPKMT7O.mjs +182 -0
- package/dist/lib/node-esm/chunk-JNPKMT7O.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UZWVVFT3.mjs → chunk-LE2LIYGX.mjs} +226 -158
- package/dist/lib/node-esm/chunk-LE2LIYGX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UJMPYKT3.mjs → chunk-P6E247RF.mjs} +34 -15
- package/dist/lib/node-esm/chunk-P6E247RF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-K4KAUOKT.mjs → chunk-PYTVBN5J.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-K4KAUOKT.mjs.map → chunk-PYTVBN5J.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-2RNIPFDA.mjs → chunk-SNKFZQST.mjs} +253 -250
- package/dist/lib/node-esm/chunk-SNKFZQST.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-WXNPD542.mjs → chunk-TIPIOH2J.mjs} +489 -308
- package/dist/lib/node-esm/chunk-TIPIOH2J.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +49 -44
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-BU73VYW3.mjs → intent-resolver-SR2LW4HF.mjs} +90 -16
- package/dist/lib/node-esm/intent-resolver-SR2LW4HF.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-HJUWNBLS.mjs → markdown-FL4IXLRP.mjs} +8 -8
- package/dist/lib/node-esm/markdown-FL4IXLRP.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-root-RUXOAQNW.mjs → react-root-4JWDRIQB.mjs} +12 -11
- package/dist/lib/{browser/react-root-NK3A4VG7.mjs.map → node-esm/react-root-4JWDRIQB.mjs.map} +1 -1
- package/dist/lib/node-esm/{react-surface-ELXFYKP6.mjs → react-surface-WLQUVRAX.mjs} +12 -11
- package/dist/lib/node-esm/react-surface-WLQUVRAX.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-EA7DFSM6.mjs → settings-F2ODVNNW.mjs} +4 -4
- package/dist/lib/node-esm/{state-6AUTNROZ.mjs → state-62TQKQVB.mjs} +4 -4
- package/dist/lib/node-esm/{state-6AUTNROZ.mjs.map → state-62TQKQVB.mjs.map} +2 -2
- package/dist/lib/node-esm/toolkit-KZIS7G36.mjs +81 -0
- package/dist/lib/node-esm/toolkit-KZIS7G36.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/calls/call-manager.d.ts +1 -1
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- 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/types.d.ts +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +8 -3
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
- package/dist/types/src/calls-service.stories.d.ts +24 -0
- package/dist/types/src/calls-service.stories.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +2 -2
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +11 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +5 -0
- package/dist/types/src/capabilities/toolkit.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/CallDebugPanel.d.ts +7 -0
- package/dist/types/src/components/CallDebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +89 -4
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts +90 -3
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +2 -2
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +156 -3
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts +4 -4
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +14 -0
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -0
- 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 +15 -3
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +4 -1
- 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/Participant/ParticipantGrid.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +154 -2
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +156 -3
- 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/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/components/command-extension.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +1 -0
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +2 -2
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +3 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +2 -0
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +1 -0
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts +2 -0
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts.map +1 -0
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +3 -0
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -0
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +76 -194
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +125 -81
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +270 -139
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +17 -2
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +56 -53
- package/src/ThreadPlugin.tsx +16 -24
- package/src/calls/call-manager.ts +8 -4
- package/src/calls/call-swarm-synchronizer.ts +1 -1
- package/src/calls/media-manager.ts +70 -37
- package/src/calls/types.ts +8 -4
- package/src/calls/util/calls-service.ts +72 -18
- package/src/calls/util/stub-media-streams.ts +62 -8
- package/src/calls-service.stories.tsx +232 -0
- package/src/capabilities/app-graph-builder.ts +8 -5
- package/src/capabilities/call-manager.ts +3 -2
- package/src/capabilities/capabilities.ts +2 -2
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +60 -8
- package/src/capabilities/markdown.ts +4 -3
- package/src/capabilities/react-surface.tsx +5 -4
- package/src/capabilities/state.ts +2 -1
- package/src/capabilities/toolkit.ts +78 -0
- package/src/components/Call/Call.tsx +4 -3
- package/src/components/Call/Toolbar.tsx +8 -8
- package/src/components/CallDebugPanel.tsx +110 -51
- package/src/components/CallSidebar.tsx +2 -1
- package/src/components/ChannelContainer.stories.tsx +11 -10
- package/src/components/ChannelContainer.tsx +13 -11
- package/src/components/Chat.stories.tsx +29 -27
- package/src/components/ChatContainer.tsx +20 -15
- package/src/components/Comments.stories.tsx +52 -41
- package/src/components/CommentsContainer.tsx +17 -11
- package/src/components/{CommentContainer.tsx → CommentsThreadContainer.tsx} +53 -82
- package/src/components/Lobby/Lobby.tsx +1 -1
- package/src/components/Media/VideoObject.stories.tsx +30 -27
- package/src/components/MessageContainer.tsx +65 -47
- package/src/components/Participant/Participant.tsx +13 -7
- package/src/components/Participant/ParticipantGrid.tsx +2 -1
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +7 -6
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +42 -39
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +4 -4
- package/src/components/ThreadComplementary.tsx +40 -10
- package/src/components/ThreadSettings.tsx +4 -4
- package/src/components/command-extension.ts +5 -2
- package/src/components/index.ts +1 -1
- package/src/components/testing.ts +24 -2
- package/src/extensions/threads.ts +6 -6
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useBlackCanvasStreamTrack.tsx +27 -0
- package/src/hooks/useDebugMode.ts +1 -1
- package/src/hooks/useInaudibleAudioStreamTrack.tsx +27 -0
- package/src/hooks/useVideoStreamTrack.tsx +36 -0
- package/src/testing/stories.ts +7 -3
- package/src/translations.ts +14 -9
- package/src/types/types.ts +28 -11
- package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
- package/src/typings.d.ts +8 -0
- package/dist/lib/browser/ChannelContainer-PKFBVENP.mjs +0 -15
- package/dist/lib/browser/ChatContainer-RSOKYAMK.mjs +0 -14
- package/dist/lib/browser/app-graph-builder-OY7R7EJP.mjs.map +0 -7
- package/dist/lib/browser/call-manager-APQAZWHT.mjs.map +0 -7
- package/dist/lib/browser/chunk-4H4A264L.mjs.map +0 -7
- package/dist/lib/browser/chunk-5P5BH5GE.mjs +0 -88
- package/dist/lib/browser/chunk-5P5BH5GE.mjs.map +0 -7
- package/dist/lib/browser/chunk-6NBVNXTM.mjs +0 -21
- package/dist/lib/browser/chunk-AEXWNS6Z.mjs.map +0 -7
- package/dist/lib/browser/chunk-PG5CTFKK.mjs.map +0 -7
- package/dist/lib/browser/chunk-TAFSCSUR.mjs.map +0 -7
- package/dist/lib/browser/chunk-XZKBN3NS.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-FK2MDVDT.mjs.map +0 -7
- package/dist/lib/browser/markdown-TE5SWWNJ.mjs.map +0 -7
- package/dist/lib/browser/react-root-NK3A4VG7.mjs +0 -27
- package/dist/lib/browser/react-surface-VXUJKSOG.mjs.map +0 -7
- package/dist/lib/node/ChannelContainer-YS5YT2ML.cjs +0 -36
- package/dist/lib/node/ChannelContainer-YS5YT2ML.cjs.map +0 -7
- package/dist/lib/node/ChatContainer-GCOM3M56.cjs +0 -35
- package/dist/lib/node/ChatContainer-GCOM3M56.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-PBHJNDQY.cjs +0 -179
- package/dist/lib/node/app-graph-builder-PBHJNDQY.cjs.map +0 -7
- package/dist/lib/node/call-manager-HV2XJW5O.cjs +0 -37
- package/dist/lib/node/call-manager-HV2XJW5O.cjs.map +0 -7
- package/dist/lib/node/chunk-44I33JDT.cjs +0 -1731
- package/dist/lib/node/chunk-44I33JDT.cjs.map +0 -7
- package/dist/lib/node/chunk-4YSNVPWU.cjs +0 -37
- package/dist/lib/node/chunk-4YSNVPWU.cjs.map +0 -7
- package/dist/lib/node/chunk-E3WBZTTI.cjs +0 -371
- package/dist/lib/node/chunk-E3WBZTTI.cjs.map +0 -7
- package/dist/lib/node/chunk-ERG7G6FF.cjs +0 -59
- package/dist/lib/node/chunk-ERG7G6FF.cjs.map +0 -7
- package/dist/lib/node/chunk-FUXJAVFZ.cjs +0 -108
- package/dist/lib/node/chunk-FUXJAVFZ.cjs.map +0 -7
- package/dist/lib/node/chunk-HLMCEE5K.cjs +0 -41
- package/dist/lib/node/chunk-HLMCEE5K.cjs.map +0 -7
- package/dist/lib/node/chunk-IP533AMV.cjs +0 -554
- package/dist/lib/node/chunk-IP533AMV.cjs.map +0 -7
- package/dist/lib/node/chunk-LR5NENBE.cjs +0 -54
- package/dist/lib/node/chunk-LR5NENBE.cjs.map +0 -7
- package/dist/lib/node/chunk-UM36TPCT.cjs +0 -984
- package/dist/lib/node/chunk-UM36TPCT.cjs.map +0 -7
- package/dist/lib/node/chunk-ZGDN3XBR.cjs +0 -149
- package/dist/lib/node/chunk-ZGDN3XBR.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -310
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-SYSJ5SJG.cjs +0 -363
- package/dist/lib/node/intent-resolver-SYSJ5SJG.cjs.map +0 -7
- package/dist/lib/node/markdown-GQIPJS2F.cjs +0 -178
- package/dist/lib/node/markdown-GQIPJS2F.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-root-6HHDMULJ.cjs +0 -51
- package/dist/lib/node/react-root-6HHDMULJ.cjs.map +0 -7
- package/dist/lib/node/react-surface-NBH42NN2.cjs +0 -122
- package/dist/lib/node/react-surface-NBH42NN2.cjs.map +0 -7
- package/dist/lib/node/settings-4LQSFEDK.cjs +0 -36
- package/dist/lib/node/settings-4LQSFEDK.cjs.map +0 -7
- package/dist/lib/node/state-IY5XX3H2.cjs +0 -50
- package/dist/lib/node/state-IY5XX3H2.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -38
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-O4QJII2P.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-BAHBHYWI.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-UUYXLF4T.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2RNIPFDA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-O3V45YJP.mjs +0 -90
- package/dist/lib/node-esm/chunk-O3V45YJP.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-O63QJPQX.mjs +0 -23
- package/dist/lib/node-esm/chunk-P6RLFCNT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UJMPYKT3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UZWVVFT3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WXNPD542.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-BU73VYW3.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-HJUWNBLS.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-ELXFYKP6.mjs.map +0 -7
- package/dist/types/src/components/CommentContainer.d.ts +0 -13
- package/dist/types/src/components/CommentContainer.d.ts.map +0 -1
- package/dist/types/src/peers.stories.d.ts +0 -11
- package/dist/types/src/peers.stories.d.ts.map +0 -1
- package/src/peers.stories.tsx +0 -189
- /package/dist/lib/browser/{ChannelContainer-PKFBVENP.mjs.map → ChannelContainer-4PYFOIDK.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-RSOKYAMK.mjs.map → ChatContainer-EXNNREYB.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-IIUTBDVB.mjs.map → chunk-EV4JWI7L.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-JKQUJOTX.mjs.map → chunk-GERVMFQW.mjs.map} +0 -0
- /package/dist/lib/{node-esm/react-root-RUXOAQNW.mjs.map → browser/react-root-XKOD4KRB.mjs.map} +0 -0
- /package/dist/lib/browser/{settings-RB2RSLXV.mjs.map → settings-GRKEID73.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChannelContainer-O4QJII2P.mjs.map → ChannelContainer-KQQEZWUN.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-F6CSADV7.mjs.map → ChatContainer-QVQKFBWA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-PGRP3O4O.mjs.map → chunk-57XR3LEF.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-ESQC6SYE.mjs.map → chunk-GRLRWTRU.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-EA7DFSM6.mjs.map → settings-F2ODVNNW.mjs.map} +0 -0
|
@@ -2,22 +2,41 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Effect } from 'effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, type PluginContext, contributes, createIntent, createResolver } from '@dxos/app-framework';
|
|
6
8
|
import { sleep } from '@dxos/async';
|
|
7
|
-
import { Obj, Relation } from '@dxos/echo';
|
|
9
|
+
import { Obj, Relation, Type } from '@dxos/echo';
|
|
8
10
|
import { invariant } from '@dxos/invariant';
|
|
9
11
|
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
10
12
|
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
11
|
-
import { SpaceAction } from '@dxos/plugin-space/types';
|
|
12
|
-
import { fullyQualifiedId, getSpace
|
|
13
|
+
import { CollectionAction, SpaceAction } from '@dxos/plugin-space/types';
|
|
14
|
+
import { Ref, fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
|
|
13
15
|
import { AnchoredTo, DataType } from '@dxos/schema';
|
|
14
16
|
|
|
15
|
-
import { ThreadCapabilities } from './capabilities';
|
|
16
17
|
import { THREAD_PLUGIN } from '../meta';
|
|
17
18
|
import { ChannelType, ThreadAction, ThreadType } from '../types';
|
|
18
19
|
|
|
20
|
+
import { ThreadCapabilities } from './capabilities';
|
|
21
|
+
|
|
19
22
|
export default (context: PluginContext) =>
|
|
20
23
|
contributes(Capabilities.IntentResolver, [
|
|
24
|
+
createResolver({
|
|
25
|
+
intent: ThreadAction.OnSpaceCreated,
|
|
26
|
+
resolve: ({ space, rootCollection }) =>
|
|
27
|
+
Effect.gen(function* () {
|
|
28
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
29
|
+
const { object: collection } = yield* dispatch(
|
|
30
|
+
createIntent(CollectionAction.CreateQueryCollection, { typename: Type.getTypename(ChannelType) }),
|
|
31
|
+
);
|
|
32
|
+
rootCollection.objects.push(Ref.make(collection));
|
|
33
|
+
|
|
34
|
+
const { object: channel } = yield* dispatch(
|
|
35
|
+
createIntent(ThreadAction.CreateChannel, { name: 'General', spaceId: space.id }),
|
|
36
|
+
);
|
|
37
|
+
space.db.add(channel);
|
|
38
|
+
}),
|
|
39
|
+
}),
|
|
21
40
|
createResolver({
|
|
22
41
|
intent: ThreadAction.CreateChannel,
|
|
23
42
|
resolve: ({ name }) => ({
|
|
@@ -76,6 +95,39 @@ export default (context: PluginContext) =>
|
|
|
76
95
|
};
|
|
77
96
|
},
|
|
78
97
|
}),
|
|
98
|
+
createResolver({
|
|
99
|
+
intent: ThreadAction.AddProposal,
|
|
100
|
+
resolve: ({ text, anchor, sender, subject }) => {
|
|
101
|
+
const space = getSpace(subject);
|
|
102
|
+
invariant(space, 'Space not found');
|
|
103
|
+
|
|
104
|
+
const subjectId = fullyQualifiedId(subject);
|
|
105
|
+
const proposal = Obj.make(DataType.Message, {
|
|
106
|
+
created: new Date().toISOString(),
|
|
107
|
+
sender,
|
|
108
|
+
blocks: [{ _tag: 'proposal', text }],
|
|
109
|
+
});
|
|
110
|
+
const thread = Obj.make(ThreadType, { name: 'Proposal', messages: [Ref.make(proposal)], status: 'active' });
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
intents: [
|
|
114
|
+
createIntent(SpaceAction.AddObject, { object: thread, target: space, hidden: true }),
|
|
115
|
+
createIntent(SpaceAction.AddRelation, {
|
|
116
|
+
space,
|
|
117
|
+
schema: AnchoredTo,
|
|
118
|
+
source: thread,
|
|
119
|
+
target: subject,
|
|
120
|
+
fields: { anchor },
|
|
121
|
+
}),
|
|
122
|
+
createIntent(ThreadAction.Select, { current: fullyQualifiedId(thread) }),
|
|
123
|
+
createIntent(DeckAction.ChangeCompanion, {
|
|
124
|
+
primary: subjectId,
|
|
125
|
+
companion: `${subjectId}${ATTENDABLE_PATH_SEPARATOR}comments`,
|
|
126
|
+
}),
|
|
127
|
+
],
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
}),
|
|
79
131
|
createResolver({
|
|
80
132
|
intent: ThreadAction.Select,
|
|
81
133
|
resolve: ({ current }) => {
|
|
@@ -179,17 +231,17 @@ export default (context: PluginContext) =>
|
|
|
179
231
|
const subjectId = fullyQualifiedId(subject);
|
|
180
232
|
const space = getSpace(subject);
|
|
181
233
|
invariant(space, 'Space not found');
|
|
182
|
-
const intents = [];
|
|
183
234
|
|
|
184
235
|
const message = Obj.make(DataType.Message, {
|
|
185
|
-
sender,
|
|
186
236
|
created: new Date().toISOString(),
|
|
187
|
-
|
|
237
|
+
sender,
|
|
238
|
+
blocks: [{ _tag: 'text', text }],
|
|
188
239
|
// TODO(wittjosiah): Context based on attention.
|
|
189
240
|
// context: context ? Ref.make(context) : undefined,
|
|
190
241
|
});
|
|
191
242
|
thread.messages.push(Ref.make(message));
|
|
192
243
|
|
|
244
|
+
const intents = [];
|
|
193
245
|
const draft = state.drafts[subjectId]?.find((a) => a.id === anchor.id);
|
|
194
246
|
if (draft) {
|
|
195
247
|
// Move draft to document.
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import { EditorView } from '@codemirror/view';
|
|
6
6
|
|
|
7
|
-
import { Capabilities, contributes, createIntent
|
|
7
|
+
import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
8
8
|
import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
|
|
9
9
|
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
10
10
|
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
11
|
-
import { commentClickedEffect, commentsState,
|
|
11
|
+
import { type EditorState, commentClickedEffect, commentsState, overlap } from '@dxos/react-ui-editor';
|
|
12
12
|
|
|
13
|
-
import { ThreadCapabilities } from './capabilities';
|
|
14
13
|
import { threads } from '../extensions';
|
|
15
14
|
|
|
15
|
+
import { ThreadCapabilities } from './capabilities';
|
|
16
|
+
|
|
16
17
|
export default (context: PluginContext) =>
|
|
17
18
|
contributes(MarkdownCapabilities.Extensions, [
|
|
18
19
|
({ document: doc }) => {
|
|
@@ -9,17 +9,18 @@ import { Obj, type Ref } from '@dxos/echo';
|
|
|
9
9
|
import { SettingsStore } from '@dxos/local-storage';
|
|
10
10
|
import { getSpace } from '@dxos/react-client/echo';
|
|
11
11
|
|
|
12
|
-
import { ThreadCapabilities } from './capabilities';
|
|
13
12
|
import {
|
|
14
|
-
CallSidebar,
|
|
15
13
|
CallDebugPanel,
|
|
14
|
+
CallSidebar,
|
|
16
15
|
ChannelContainer,
|
|
16
|
+
ChatContainer,
|
|
17
17
|
ThreadComplementary,
|
|
18
18
|
ThreadSettings,
|
|
19
|
-
ChatContainer,
|
|
20
19
|
} from '../components';
|
|
21
20
|
import { THREAD_PLUGIN } from '../meta';
|
|
22
|
-
import { ChannelType,
|
|
21
|
+
import { ChannelType, type ThreadSettingsProps, ThreadType } from '../types';
|
|
22
|
+
|
|
23
|
+
import { ThreadCapabilities } from './capabilities';
|
|
23
24
|
|
|
24
25
|
export default () =>
|
|
25
26
|
contributes(Capabilities.ReactSurface, [
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import { contributes } from '@dxos/app-framework';
|
|
6
6
|
import { live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
|
-
import { ThreadCapabilities } from './capabilities';
|
|
9
8
|
import { type ThreadState, type ViewStore } from '../types';
|
|
10
9
|
|
|
10
|
+
import { ThreadCapabilities } from './capabilities';
|
|
11
|
+
|
|
11
12
|
const initialViewState = { showResolvedThreads: false };
|
|
12
13
|
|
|
13
14
|
export default () => {
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { AiTool, AiToolkit } from '@effect/ai';
|
|
6
|
+
import { Array, Effect, Schema, pipe } from 'effect';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
|
|
9
|
+
import { ArtifactId, computeDiffsWithCursors } from '@dxos/assistant';
|
|
10
|
+
import { type SpaceId } from '@dxos/keys';
|
|
11
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
12
|
+
import { type Markdown } from '@dxos/plugin-markdown/types';
|
|
13
|
+
import { createDocAccessor } from '@dxos/react-client/echo';
|
|
14
|
+
import { trim } from '@dxos/util';
|
|
15
|
+
|
|
16
|
+
import { ThreadAction } from '../types';
|
|
17
|
+
|
|
18
|
+
// TODO(wittjosiah): How to make this work for more than Documents?
|
|
19
|
+
class Toolkit extends AiToolkit.make(
|
|
20
|
+
AiTool.make('add-proposals', {
|
|
21
|
+
description: trim`
|
|
22
|
+
Proposes a set of changes to a document.
|
|
23
|
+
`,
|
|
24
|
+
parameters: {
|
|
25
|
+
id: ArtifactId,
|
|
26
|
+
diffs: Schema.Array(Schema.String).annotations({
|
|
27
|
+
description: 'The diffs to propose for the document.',
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
success: Schema.Any,
|
|
31
|
+
failure: Schema.Never,
|
|
32
|
+
}),
|
|
33
|
+
) {
|
|
34
|
+
static layer = (context: PluginContext) =>
|
|
35
|
+
Toolkit.toLayer({
|
|
36
|
+
'add-proposals': ({ id, diffs: _diffs }) =>
|
|
37
|
+
Effect.gen(function* () {
|
|
38
|
+
// TODO(wittjosiah): Get capabilities via layers.
|
|
39
|
+
const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
40
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
41
|
+
const state = context.getCapability(Capabilities.Layout);
|
|
42
|
+
|
|
43
|
+
const dxn = ArtifactId.toDXN(id, state.workspace as SpaceId);
|
|
44
|
+
|
|
45
|
+
const echoDxn = dxn.asEchoDXN();
|
|
46
|
+
if (!echoDxn) {
|
|
47
|
+
throw new Error(`Invalid object ID: ${id}`);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const space = client.spaces.get(echoDxn.spaceId!);
|
|
51
|
+
const object = space?.db.getObjectById<Markdown.Document>(echoDxn.echoId);
|
|
52
|
+
if (!object) {
|
|
53
|
+
throw new Error(`Object not found: ${id}`);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const content = yield* Effect.promise(() => object.content.load());
|
|
57
|
+
const accessor = createDocAccessor(content, ['content']);
|
|
58
|
+
yield* pipe(
|
|
59
|
+
computeDiffsWithCursors(accessor, _diffs),
|
|
60
|
+
Array.map(({ cursor, text }) =>
|
|
61
|
+
createIntent(ThreadAction.AddProposal, {
|
|
62
|
+
subject: object,
|
|
63
|
+
sender: { role: 'assistant' },
|
|
64
|
+
anchor: cursor,
|
|
65
|
+
text,
|
|
66
|
+
}),
|
|
67
|
+
),
|
|
68
|
+
Array.map(dispatch),
|
|
69
|
+
Effect.allWith({ concurrency: 'unbounded' }),
|
|
70
|
+
);
|
|
71
|
+
}).pipe(Effect.orDie),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default (context: PluginContext) => [
|
|
76
|
+
contributes(Capabilities.Toolkit, Toolkit),
|
|
77
|
+
contributes(Capabilities.ToolkitHandler, Toolkit.layer(context)),
|
|
78
|
+
];
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { type
|
|
5
|
+
import React, { type FC, type PropsWithChildren } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useCapability } from '@dxos/app-framework';
|
|
8
8
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
|
-
import { Toolbar, type ToolbarProps } from './Toolbar';
|
|
11
10
|
import { ThreadCapabilities } from '../../capabilities';
|
|
12
11
|
import { useDebugMode } from '../../hooks';
|
|
13
12
|
import { AudioStream } from '../Media';
|
|
14
13
|
import { ParticipantGrid } from '../Participant';
|
|
15
14
|
|
|
15
|
+
import { Toolbar, type ToolbarProps } from './Toolbar';
|
|
16
|
+
|
|
16
17
|
//
|
|
17
18
|
// Root
|
|
18
19
|
//
|
|
@@ -34,7 +35,7 @@ type CallAudioProps = {};
|
|
|
34
35
|
const CallAudio: FC<CallAudioProps> = () => {
|
|
35
36
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
36
37
|
|
|
37
|
-
return <AudioStream tracks={call.
|
|
38
|
+
return <AudioStream tracks={call.audioTracksToPlay} />;
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
CallAudio.displayName = 'CallAudio';
|
|
@@ -5,21 +5,21 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { useAppGraph, useCapability } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { useActions, useNode } from '@dxos/plugin-graph';
|
|
9
9
|
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
10
10
|
import {
|
|
11
11
|
Icon,
|
|
12
12
|
IconButton,
|
|
13
13
|
type IconButtonProps,
|
|
14
|
+
Toolbar as NaturalToolbar,
|
|
14
15
|
type ThemedClassName,
|
|
15
|
-
Toolbar as NativeToolbar,
|
|
16
16
|
toLocalizedString,
|
|
17
17
|
useTranslation,
|
|
18
18
|
} from '@dxos/react-ui';
|
|
19
19
|
import { groupHoverControlItemWithTransition, mx } from '@dxos/react-ui-theme';
|
|
20
20
|
|
|
21
21
|
import { ThreadCapabilities } from '../../capabilities';
|
|
22
|
-
import {
|
|
22
|
+
import { meta } from '../../meta';
|
|
23
23
|
import { type ChannelType } from '../../types';
|
|
24
24
|
|
|
25
25
|
export type ToolbarProps = ThemedClassName<{
|
|
@@ -40,7 +40,7 @@ export const Toolbar = ({
|
|
|
40
40
|
onJoin,
|
|
41
41
|
onLeave,
|
|
42
42
|
}: ToolbarProps) => {
|
|
43
|
-
const { t } = useTranslation(
|
|
43
|
+
const { t } = useTranslation(meta.id);
|
|
44
44
|
const { graph } = useAppGraph();
|
|
45
45
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
46
46
|
|
|
@@ -56,7 +56,7 @@ export const Toolbar = ({
|
|
|
56
56
|
// TODO(wittjosiah): In order to use toolbar, need to update to actually use the graph action callbacks directly.
|
|
57
57
|
return (
|
|
58
58
|
<div className={mx('z-20 flex justify-center m-8', autoHideControls && groupHoverControlItemWithTransition)}>
|
|
59
|
-
<
|
|
59
|
+
<NaturalToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', classNames]}>
|
|
60
60
|
<ToggleButton
|
|
61
61
|
active={call.media.audioEnabled}
|
|
62
62
|
state={{
|
|
@@ -95,7 +95,7 @@ export const Toolbar = ({
|
|
|
95
95
|
<Icon icon='ph--users--regular' size={4} />
|
|
96
96
|
<div>{participants}</div>
|
|
97
97
|
</div>
|
|
98
|
-
)) || <
|
|
98
|
+
)) || <NaturalToolbar.Separator variant='gap' />}
|
|
99
99
|
|
|
100
100
|
{call.joined && (
|
|
101
101
|
<>
|
|
@@ -151,7 +151,7 @@ export const Toolbar = ({
|
|
|
151
151
|
) : (
|
|
152
152
|
<IconButton variant='primary' icon='ph--phone-incoming--regular' label={t('join call')} onClick={onJoin} />
|
|
153
153
|
)}
|
|
154
|
-
</
|
|
154
|
+
</NaturalToolbar.Root>
|
|
155
155
|
</div>
|
|
156
156
|
);
|
|
157
157
|
};
|
|
@@ -174,7 +174,7 @@ const defaultButtonProps: Partial<IconButtonProps> = {
|
|
|
174
174
|
const ToggleButton = ({ active, state }: ToolbarButtonProps) => (
|
|
175
175
|
<IconButton
|
|
176
176
|
{...defaultButtonProps}
|
|
177
|
-
classNames={[active ? state.on.classNames ?? 'bg-callActive' : state.off.classNames]}
|
|
177
|
+
classNames={[active ? (state.on.classNames ?? 'bg-callActive') : state.off.classNames]}
|
|
178
178
|
icon={active ? state.on.icon : state.off.icon}
|
|
179
179
|
label={active ? state.on.label : state.off.label}
|
|
180
180
|
onClick={active ? state.on.onClick : state.off.onClick}
|
|
@@ -2,28 +2,33 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { WebRTCStats } from '@peermetrics/webrtc-stats';
|
|
5
|
+
import { WebRTCStats, type WebRTCStatsEvent } from '@peermetrics/webrtc-stats';
|
|
6
6
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { truncateKey } from '@dxos/debug';
|
|
9
|
+
import { JsonView, Panel } from '@dxos/devtools';
|
|
9
10
|
import { log } from '@dxos/log';
|
|
10
|
-
import {
|
|
11
|
-
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
11
|
+
import { IconButton, Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
|
|
13
|
-
import { type GlobalState } from '../calls';
|
|
14
|
-
import {
|
|
13
|
+
import { type EncodedTrackName, type GlobalState } from '../calls';
|
|
14
|
+
import { meta } from '../meta';
|
|
15
15
|
|
|
16
16
|
export type CallDebugPanelProps = ThemedClassName<{
|
|
17
17
|
state?: GlobalState;
|
|
18
18
|
}>;
|
|
19
19
|
|
|
20
20
|
export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
21
|
-
const
|
|
22
|
-
const self = state?.call?.self;
|
|
23
|
-
const { t } = useTranslation(THREAD_PLUGIN);
|
|
21
|
+
const { t } = useTranslation(meta.id);
|
|
24
22
|
|
|
25
23
|
const [open, setOpen] = useState(false);
|
|
26
24
|
const handleToggle = () => setOpen(!open);
|
|
25
|
+
const [showServiceHistory, setShowServiceHistory] = useState(false);
|
|
26
|
+
const handleToggleServiceHistory = () => setShowServiceHistory(!showServiceHistory);
|
|
27
|
+
|
|
28
|
+
const handleCopyRaw = async () => {
|
|
29
|
+
await navigator.clipboard.writeText(JSON.stringify({ users: state?.call?.users, stats }, null, 2));
|
|
30
|
+
};
|
|
31
|
+
|
|
27
32
|
const [showDetailedWebRTCStats, setShowDetailedWebRTCStats] = useState(false);
|
|
28
33
|
const handleShowDetailedWebRTCStats = () => setShowDetailedWebRTCStats(!showDetailedWebRTCStats);
|
|
29
34
|
|
|
@@ -34,22 +39,24 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
|
34
39
|
}),
|
|
35
40
|
[],
|
|
36
41
|
);
|
|
42
|
+
const [stats, setStats] = useState<WebRTCStatsEvent['data']>();
|
|
37
43
|
|
|
38
|
-
const [stats, setStats] = useState<Record<string, any>>({});
|
|
39
44
|
useEffect(() => {
|
|
40
45
|
const pc = state?.media.peer?.session?.peerConnection;
|
|
41
|
-
const handleStats = (stats:
|
|
46
|
+
const handleStats = (stats: WebRTCStatsEvent) => {
|
|
47
|
+
setStats(stats.data);
|
|
48
|
+
};
|
|
42
49
|
let added = false;
|
|
43
50
|
if (pc && showDetailedWebRTCStats) {
|
|
44
51
|
webrtcStats.addConnection({ pc, peerId: 1, connectionId: '1' });
|
|
45
|
-
webrtcStats.on('stats', handleStats);
|
|
52
|
+
webrtcStats.on('stats', handleStats as never);
|
|
46
53
|
added = true;
|
|
47
54
|
}
|
|
48
55
|
return () => {
|
|
49
56
|
try {
|
|
50
57
|
if (pc && added) {
|
|
51
58
|
webrtcStats.removeConnection({ pc });
|
|
52
|
-
webrtcStats.removeListener('stats', handleStats);
|
|
59
|
+
webrtcStats.removeListener('stats', handleStats as never);
|
|
53
60
|
}
|
|
54
61
|
} catch (error) {
|
|
55
62
|
log.error('error removing webrtc stats', { error, pc, peerId: 1, connectionId: '1' });
|
|
@@ -57,6 +64,8 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
|
57
64
|
};
|
|
58
65
|
}, [state?.media.peer?.session?.peerConnection, showDetailedWebRTCStats]);
|
|
59
66
|
|
|
67
|
+
const rows = useMemo(() => getCallStatusTable(state), [state?.call.users, state?.media.pulledAudioTracks]);
|
|
68
|
+
|
|
60
69
|
return (
|
|
61
70
|
<Panel
|
|
62
71
|
id='meeting-status'
|
|
@@ -65,51 +74,101 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
|
65
74
|
onToggle={handleToggle}
|
|
66
75
|
title={t('meeting status title')}
|
|
67
76
|
maxHeight={false}
|
|
68
|
-
info={
|
|
69
|
-
<div className='flex items-center gap-2'>
|
|
70
|
-
<span title='Joined'>{self?.joined ? 'Active' : 'Inactive'}</span>
|
|
71
|
-
{users?.length !== undefined && <span title='Users'>{users?.length ?? 0} User(s)</span>}
|
|
72
|
-
</div>
|
|
73
|
-
}
|
|
77
|
+
info={<div className='flex items-center gap-2'> {state?.call.joined ? 'Active' : 'Inactive'}</div>}
|
|
74
78
|
>
|
|
75
|
-
<div className='flex flex-col gap-2
|
|
76
|
-
<div className='flex items-
|
|
79
|
+
<div className='flex flex-col w-full gap-2 text-xs'>
|
|
80
|
+
<div className='flex items-center gap-2'>
|
|
77
81
|
<Input.Root>
|
|
78
82
|
<Input.Label classNames={'text-sm'}>{t('show webrtc stats title')}</Input.Label>
|
|
79
83
|
<Input.Checkbox checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
|
|
80
84
|
</Input.Root>
|
|
81
85
|
</div>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
: {}),
|
|
96
|
-
tracks: state?.media.peer?.session?.peerConnection.getTransceivers().map((transceiver) => {
|
|
97
|
-
const track =
|
|
98
|
-
transceiver.direction === 'recvonly' ? transceiver.receiver.track : transceiver.sender.track;
|
|
99
|
-
return {
|
|
100
|
-
id: track?.id,
|
|
101
|
-
kind: track?.kind,
|
|
102
|
-
direction: transceiver.direction,
|
|
103
|
-
enabled: track?.enabled,
|
|
104
|
-
muted: track?.muted,
|
|
105
|
-
readyState: track?.readyState,
|
|
106
|
-
settings: track?.getSettings(),
|
|
107
|
-
};
|
|
108
|
-
}),
|
|
109
|
-
callsServiceHistory: state?.media.peer?.history.get(),
|
|
110
|
-
}}
|
|
111
|
-
/>
|
|
86
|
+
<div className='flex items-center gap-2'>
|
|
87
|
+
<Input.Root>
|
|
88
|
+
<Input.Label classNames={'text-sm'}>{t('show calls history title')}</Input.Label>
|
|
89
|
+
<Input.Checkbox checked={showServiceHistory} onCheckedChange={handleToggleServiceHistory} />
|
|
90
|
+
</Input.Root>
|
|
91
|
+
</div>
|
|
92
|
+
<div className='flex items-center gap-2'>
|
|
93
|
+
<IconButton classNames={'text-sm'} icon='ph--copy--regular' label={'copy raw'} onClick={handleCopyRaw} />
|
|
94
|
+
</div>
|
|
95
|
+
<Table rows={rows} />
|
|
96
|
+
{showDetailedWebRTCStats && <JsonView data={{ stats }} />}
|
|
97
|
+
{showServiceHistory && <JsonView data={{ history: state?.media.peer?.history.get() }} />}
|
|
112
98
|
</div>
|
|
113
99
|
</Panel>
|
|
114
100
|
);
|
|
115
101
|
};
|
|
102
|
+
|
|
103
|
+
const getCallStatusTable = (state?: GlobalState): TableProps['rows'] => {
|
|
104
|
+
if (!state || !state.call?.users) {
|
|
105
|
+
return [];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const self = state.call.self;
|
|
109
|
+
const users = state.call.users
|
|
110
|
+
.filter((user) => user.id !== self!.id)
|
|
111
|
+
.map((user) => {
|
|
112
|
+
const isOk = {
|
|
113
|
+
audio:
|
|
114
|
+
user.tracks?.audio &&
|
|
115
|
+
state.media.pulledAudioTracks[user.tracks?.audio as EncodedTrackName]?.ctx.disposed === false,
|
|
116
|
+
video:
|
|
117
|
+
user.tracks?.video &&
|
|
118
|
+
state.media.pulledVideoStreams[user.tracks?.video as EncodedTrackName]?.ctx.disposed === false,
|
|
119
|
+
screenshare:
|
|
120
|
+
user.tracks?.screenshare &&
|
|
121
|
+
state.media.pulledVideoStreams[user.tracks?.screenshare as EncodedTrackName]?.ctx.disposed === false,
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
...user,
|
|
126
|
+
isOk,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
return [
|
|
131
|
+
['users', state.call.users.length ?? 0],
|
|
132
|
+
[
|
|
133
|
+
'*self* ' + (self?.name ?? truncateKey(self!.id, 8)),
|
|
134
|
+
self?.tracks?.audio && state.media.pushedAudioTrack ? 'AUD ✅' : 'AUD ❌',
|
|
135
|
+
self?.tracks?.video && state.media.pushedVideoTrack ? 'VID ✅' : 'VID ❌',
|
|
136
|
+
self?.tracks?.screenshareEnabled
|
|
137
|
+
? self.tracks.screenshareEnabled && state.media.pushedScreenshareTrack
|
|
138
|
+
? 'SCR ✅'
|
|
139
|
+
: 'SCR ❌'
|
|
140
|
+
: undefined,
|
|
141
|
+
],
|
|
142
|
+
|
|
143
|
+
...users.map((user) => [
|
|
144
|
+
user.name ?? truncateKey(user.id, 8),
|
|
145
|
+
user.isOk.audio ? 'AUD ✅' : 'AUD ❌',
|
|
146
|
+
user.isOk.video ? 'VID ✅' : 'VID ❌',
|
|
147
|
+
user.tracks?.screenshareEnabled ? (user.isOk.screenshare ? 'SCR ✅' : 'SCR ❌') : undefined,
|
|
148
|
+
]),
|
|
149
|
+
['ICE', state.media.peer?.session?.peerConnection.iceConnectionState ?? 'no connection'],
|
|
150
|
+
];
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export namespace Unit {
|
|
154
|
+
export const KB = (n?: number) => ((n ?? 0) / 1_000).toFixed(2);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type TableProps = {
|
|
158
|
+
rows: (string | number | undefined)[][];
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export const Table = ({ rows }: TableProps) => {
|
|
162
|
+
return (
|
|
163
|
+
<div className='w-full text-xs font-mono'>
|
|
164
|
+
{rows.map(([prefix, label, value, unit], i) => (
|
|
165
|
+
<div key={i} className='grid grid-cols-[3fr_1fr_1fr_1fr]'>
|
|
166
|
+
<div className='p-1'>{prefix}</div>
|
|
167
|
+
<div className='p-1'>{label}</div>
|
|
168
|
+
<div className='p-1'>{value}</div>
|
|
169
|
+
<div className='p-1'>{unit}</div>
|
|
170
|
+
</div>
|
|
171
|
+
))}
|
|
172
|
+
</div>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
@@ -6,9 +6,10 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { useCapability } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
|
-
import { ChannelContainer } from './ChannelContainer';
|
|
10
9
|
import { ThreadCapabilities } from '../capabilities';
|
|
11
10
|
|
|
11
|
+
import { ChannelContainer } from './ChannelContainer';
|
|
12
|
+
|
|
12
13
|
export const CallSidebar = () => {
|
|
13
14
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
14
15
|
return <ChannelContainer roomId={call.roomId} />;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
|
-
import { type Meta, type StoryObj } from '@storybook/react';
|
|
7
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { contributes } from '@dxos/app-framework';
|
|
@@ -12,28 +12,29 @@ import { withPluginManager } from '@dxos/app-framework/testing';
|
|
|
12
12
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
13
|
import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
14
14
|
import { DataType } from '@dxos/schema';
|
|
15
|
-
import {
|
|
15
|
+
import { ColumnContainer, withLayout } from '@dxos/storybook-utils';
|
|
16
16
|
|
|
17
|
-
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
18
17
|
import { createThreadPlugins } from '../testing';
|
|
19
|
-
import translations from '../translations';
|
|
18
|
+
import { translations } from '../translations';
|
|
20
19
|
import { ChannelType, ThreadType } from '../types';
|
|
21
20
|
|
|
21
|
+
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
22
|
+
|
|
22
23
|
// TODO(wittjosiah): Channel doesn't render full height.
|
|
23
|
-
const Story = () => {
|
|
24
|
+
const Story = ({ roomId }: ChannelContainerProps) => {
|
|
24
25
|
const space = useSpace();
|
|
25
26
|
const [channel] = useQuery(space, Query.type(ChannelType));
|
|
26
27
|
if (!channel) {
|
|
27
28
|
return null;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
return <ChannelContainer channel={channel} />;
|
|
31
|
+
return <ChannelContainer channel={channel} roomId={roomId} />;
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
const meta
|
|
34
|
+
const meta = {
|
|
34
35
|
title: 'plugins/plugin-thread/ChannelContainer',
|
|
35
36
|
component: ChannelContainer,
|
|
36
|
-
render: () => <Story />,
|
|
37
|
+
render: (args) => <Story {...args} />,
|
|
37
38
|
decorators: [
|
|
38
39
|
withPluginManager({
|
|
39
40
|
plugins: [...(await createThreadPlugins())],
|
|
@@ -44,11 +45,11 @@ const meta: Meta<ChannelContainerProps> = {
|
|
|
44
45
|
parameters: {
|
|
45
46
|
translations,
|
|
46
47
|
},
|
|
47
|
-
}
|
|
48
|
+
} satisfies Meta<typeof ChannelContainer>;
|
|
48
49
|
|
|
49
50
|
export default meta;
|
|
50
51
|
|
|
51
|
-
type Story = StoryObj<
|
|
52
|
+
type Story = StoryObj<typeof meta>;
|
|
52
53
|
|
|
53
54
|
export const Default: Story = {
|
|
54
55
|
args: {
|