@dxos/plugin-thread 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/ChannelArticle-ACZD7YFT.mjs +28 -0
- package/dist/lib/neutral/ChannelArticle-ACZD7YFT.mjs.map +7 -0
- package/dist/lib/neutral/ChannelChat-6YTD5HWL.mjs +10 -0
- package/dist/lib/neutral/ThreadCompanion-NQWPS2H6.mjs +208 -0
- package/dist/lib/neutral/ThreadCompanion-NQWPS2H6.mjs.map +7 -0
- package/dist/lib/neutral/ThreadContainer-XYEPEOSD.mjs +61 -0
- package/dist/lib/neutral/ThreadContainer-XYEPEOSD.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.mjs +80 -0
- package/dist/lib/neutral/ThreadPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs +40 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs +24 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs +15 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs.map +7 -0
- package/dist/lib/{browser/add-message-LRVGIHDH.mjs → neutral/add-message-FBIROBEZ.mjs} +8 -10
- package/dist/lib/neutral/add-message-FBIROBEZ.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-7Q6MA6RT.mjs +120 -0
- package/dist/lib/neutral/app-graph-builder-7Q6MA6RT.mjs.map +7 -0
- package/dist/lib/{browser/append-channel-message-CO3M6FSA.mjs → neutral/append-channel-message-FTFAD3PK.mjs} +5 -5
- package/dist/lib/neutral/append-channel-message-FTFAD3PK.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +25 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-5T5LPLBN.mjs} +4 -5
- package/dist/lib/neutral/chunk-5T5LPLBN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7GHUS3IX.mjs +20 -0
- package/dist/lib/neutral/chunk-7GHUS3IX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-D5LGFCUY.mjs +55 -0
- package/dist/lib/neutral/chunk-D5LGFCUY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JLY4NVTA.mjs +38 -0
- package/dist/lib/neutral/chunk-JLY4NVTA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KRXHIW4P.mjs +164 -0
- package/dist/lib/neutral/chunk-KRXHIW4P.mjs.map +7 -0
- package/dist/lib/{browser/chunk-TPNZ43NB.mjs → neutral/chunk-PE7IH7EL.mjs} +86 -73
- package/dist/lib/neutral/chunk-PE7IH7EL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs +69 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QMLVLKE3.mjs +8 -0
- package/dist/lib/neutral/chunk-QMLVLKE3.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +539 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +15 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/{browser/create-BTGLHLBA.mjs → neutral/create-OAQJ6LXN.mjs} +7 -10
- package/dist/lib/neutral/create-OAQJ6LXN.mjs.map +7 -0
- package/dist/lib/{browser/create-channel-ZXKSLHGN.mjs → neutral/create-channel-3E4FJ662.mjs} +4 -4
- package/dist/lib/neutral/create-channel-3E4FJ662.mjs.map +7 -0
- package/dist/lib/neutral/create-object-HIEWSBZB.mjs +27 -0
- package/dist/lib/neutral/create-object-HIEWSBZB.mjs.map +7 -0
- package/dist/lib/{browser/create-proposals-AV5CREPV.mjs → neutral/create-proposals-GRYZXRMV.mjs} +4 -4
- package/dist/lib/neutral/create-proposals-GRYZXRMV.mjs.map +7 -0
- package/dist/lib/{browser/delete-GLYEP7NE.mjs → neutral/delete-HCCG5RVR.mjs} +7 -9
- package/dist/lib/neutral/delete-HCCG5RVR.mjs.map +7 -0
- package/dist/lib/{browser/delete-message-RQ72ZY5D.mjs → neutral/delete-message-DHFRACB4.mjs} +6 -7
- package/dist/lib/neutral/delete-message-DHFRACB4.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +10 -0
- package/dist/lib/neutral/index.mjs +28 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/markdown-BUORNCPG.mjs +83 -0
- package/dist/lib/neutral/markdown-BUORNCPG.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/{browser/on-create-space-SPE3QVFZ.mjs → neutral/on-create-space-OEBRKOAM.mjs} +5 -6
- package/dist/lib/neutral/on-create-space-OEBRKOAM.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs +13 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-XY23GVZH.mjs +76 -0
- package/dist/lib/neutral/react-surface-XY23GVZH.mjs.map +7 -0
- package/dist/lib/{browser/restore-VX7FLZOZ.mjs → neutral/restore-P4ZLXLF7.mjs} +5 -5
- package/dist/lib/neutral/restore-P4ZLXLF7.mjs.map +7 -0
- package/dist/lib/{browser/restore-message-D65NSWUA.mjs → neutral/restore-message-AUBOP2DF.mjs} +5 -5
- package/dist/lib/neutral/restore-message-AUBOP2DF.mjs.map +7 -0
- package/dist/lib/{browser/select-AT4L7EBU.mjs → neutral/select-LIVAMBCE.mjs} +6 -8
- package/dist/lib/neutral/select-LIVAMBCE.mjs.map +7 -0
- package/dist/lib/neutral/settings-HK4EB6TF.mjs +30 -0
- package/dist/lib/neutral/settings-HK4EB6TF.mjs.map +7 -0
- package/dist/lib/neutral/state-UU7VEAKV.mjs +22 -0
- package/dist/lib/neutral/state-UU7VEAKV.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +58 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/{browser/toggle-resolved-JD3D4WBZ.mjs → neutral/toggle-resolved-RQBDQZSV.mjs} +5 -5
- package/dist/lib/neutral/toggle-resolved-RQBDQZSV.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/translations.mjs +2 -2
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +12 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs +54 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs.map +7 -0
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +8 -1
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -1
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +13 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{ChannelContainer/ChannelContainer.stories.d.ts → ChannelArticle/ChannelArticle.stories.d.ts} +4 -4
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/index.d.ts +2 -0
- package/dist/types/src/containers/{CallDebugPanel → ChannelArticle}/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts +4 -0
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +1 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +1 -1
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-message.d.ts +2 -2
- package/dist/types/src/operations/add-message.d.ts.map +1 -1
- package/dist/types/src/operations/append-channel-message.d.ts +2 -2
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -1
- package/dist/types/src/operations/create-channel.d.ts +2 -2
- package/dist/types/src/operations/create-channel.d.ts.map +1 -1
- package/dist/types/src/operations/create-proposals.d.ts +2 -2
- package/dist/types/src/operations/create-proposals.d.ts.map +1 -1
- package/dist/types/src/operations/create.d.ts +2 -2
- package/dist/types/src/operations/create.d.ts.map +1 -1
- package/dist/types/src/operations/delete-message.d.ts +2 -2
- package/dist/types/src/operations/delete-message.d.ts.map +1 -1
- package/dist/types/src/operations/delete.d.ts +2 -2
- package/dist/types/src/operations/delete.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +0 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/on-create-space.d.ts +2 -2
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -1
- package/dist/types/src/operations/restore-message.d.ts +2 -2
- package/dist/types/src/operations/restore-message.d.ts.map +1 -1
- package/dist/types/src/operations/restore.d.ts +2 -2
- package/dist/types/src/operations/restore.d.ts.map +1 -1
- package/dist/types/src/operations/select.d.ts +2 -2
- package/dist/types/src/operations/select.d.ts.map +1 -1
- package/dist/types/src/operations/toggle-resolved.d.ts +2 -2
- package/dist/types/src/operations/toggle-resolved.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ThreadCapabilities.d.ts +13 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/ThreadOperation.d.ts} +1 -1
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +4 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +123 -99
- package/src/ThreadPlugin.node.ts +5 -50
- package/src/ThreadPlugin.test.ts +3 -3
- package/src/ThreadPlugin.tsx +6 -59
- package/src/ThreadPlugin.workerd.ts +20 -0
- package/src/blueprints/thread-blueprint.ts +1 -1
- package/src/capabilities/app-graph-builder.ts +18 -69
- package/src/capabilities/create-object.ts +29 -0
- package/src/capabilities/index.ts +1 -2
- package/src/capabilities/markdown.ts +1 -1
- package/src/capabilities/react-surface.tsx +4 -26
- package/src/capabilities/settings.ts +1 -3
- package/src/capabilities/undo-mappings.ts +1 -1
- package/src/components/Chat/Chat.tsx +52 -12
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +1 -1
- package/src/components/CommentsPanel/CommentsPanel.tsx +4 -4
- package/src/components/CommentsPanel/CommentsThread.tsx +2 -3
- package/src/components/MessagePanel/MessagePanel.tsx +7 -8
- package/src/components/ThreadSettings/ThreadSettings.tsx +0 -1
- package/src/components/index.ts +0 -1
- package/src/containers/{ChannelContainer/ChannelContainer.stories.tsx → ChannelArticle/ChannelArticle.stories.tsx} +10 -10
- package/src/containers/ChannelArticle/ChannelArticle.tsx +42 -0
- package/src/containers/ChannelArticle/index.ts +5 -0
- package/src/containers/ChannelChat/ChannelChat.tsx +12 -2
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +10 -12
- package/src/containers/index.ts +1 -3
- package/src/extensions/command.ts +1 -1
- package/src/extensions/threads.ts +2 -2
- package/src/hooks/analytics.ts +1 -1
- package/src/hooks/index.ts +0 -5
- package/src/index.ts +3 -10
- package/src/meta.ts +1 -2
- package/src/operations/add-message.ts +4 -4
- package/src/operations/append-channel-message.ts +20 -19
- package/src/operations/create-channel.ts +2 -2
- package/src/operations/create-proposals.ts +2 -2
- package/src/operations/create.ts +3 -3
- package/src/operations/delete-message.ts +4 -4
- package/src/operations/delete.ts +3 -3
- package/src/operations/index.ts +0 -2
- package/src/operations/on-create-space.ts +3 -3
- package/src/operations/restore-message.ts +3 -3
- package/src/operations/restore.ts +3 -3
- package/src/operations/select.ts +2 -2
- package/src/operations/toggle-resolved.ts +3 -3
- package/src/plugin.ts +11 -0
- package/src/translations.ts +2 -2
- package/src/types/ThreadCapabilities.ts +26 -0
- package/src/{operations/definitions.ts → types/ThreadOperation.ts} +5 -4
- package/src/types/index.ts +4 -1
- package/src/types/types.ts +0 -2
- package/src/util.ts +36 -4
- package/dist/lib/browser/add-message-LRVGIHDH.mjs.map +0 -7
- package/dist/lib/browser/append-channel-message-CO3M6FSA.mjs.map +0 -7
- package/dist/lib/browser/blueprints/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-E4GG3NX2.mjs +0 -29
- package/dist/lib/browser/chunk-E4GG3NX2.mjs.map +0 -7
- package/dist/lib/browser/chunk-TPNZ43NB.mjs.map +0 -7
- package/dist/lib/browser/create-BTGLHLBA.mjs.map +0 -7
- package/dist/lib/browser/create-channel-ZXKSLHGN.mjs.map +0 -7
- package/dist/lib/browser/create-proposals-AV5CREPV.mjs.map +0 -7
- package/dist/lib/browser/delete-GLYEP7NE.mjs.map +0 -7
- package/dist/lib/browser/delete-message-RQ72ZY5D.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -1821
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/on-create-space-SPE3QVFZ.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/restore-VX7FLZOZ.mjs.map +0 -7
- package/dist/lib/browser/restore-message-D65NSWUA.mjs.map +0 -7
- package/dist/lib/browser/select-AT4L7EBU.mjs.map +0 -7
- package/dist/lib/browser/toggle-resolved-JD3D4WBZ.mjs.map +0 -7
- package/dist/lib/browser/translations.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node-esm/add-message-4EAQ2ZPI.mjs +0 -90
- package/dist/lib/node-esm/add-message-4EAQ2ZPI.mjs.map +0 -7
- package/dist/lib/node-esm/append-channel-message-F7KGBSWP.mjs +0 -41
- package/dist/lib/node-esm/append-channel-message-F7KGBSWP.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -38
- package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BVEZBGIY.mjs +0 -30
- package/dist/lib/node-esm/chunk-BVEZBGIY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-XKUMDYGR.mjs +0 -259
- package/dist/lib/node-esm/chunk-XKUMDYGR.mjs.map +0 -7
- package/dist/lib/node-esm/create-DEZFPN2Y.mjs +0 -56
- package/dist/lib/node-esm/create-DEZFPN2Y.mjs.map +0 -7
- package/dist/lib/node-esm/create-channel-6VHTC2OR.mjs +0 -20
- package/dist/lib/node-esm/create-channel-6VHTC2OR.mjs.map +0 -7
- package/dist/lib/node-esm/create-proposals-P5O2ICOL.mjs +0 -57
- package/dist/lib/node-esm/create-proposals-P5O2ICOL.mjs.map +0 -7
- package/dist/lib/node-esm/delete-QG45QLPY.mjs +0 -60
- package/dist/lib/node-esm/delete-QG45QLPY.mjs.map +0 -7
- package/dist/lib/node-esm/delete-message-PGNLB6TL.mjs +0 -56
- package/dist/lib/node-esm/delete-message-PGNLB6TL.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -1822
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/on-create-space-TFBSHWQ4.mjs +0 -25
- package/dist/lib/node-esm/on-create-space-TFBSHWQ4.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/restore-E27OAIFJ.mjs +0 -33
- package/dist/lib/node-esm/restore-E27OAIFJ.mjs.map +0 -7
- package/dist/lib/node-esm/restore-message-J3CH6NGI.mjs +0 -34
- package/dist/lib/node-esm/restore-message-J3CH6NGI.mjs.map +0 -7
- package/dist/lib/node-esm/select-UU6Q2XAB.mjs +0 -27
- package/dist/lib/node-esm/select-UU6Q2XAB.mjs.map +0 -7
- package/dist/lib/node-esm/toggle-resolved-VS6NKXL3.mjs +0 -37
- package/dist/lib/node-esm/toggle-resolved-VS6NKXL3.mjs.map +0 -7
- package/dist/lib/node-esm/translations.mjs +0 -91
- package/dist/lib/node-esm/translations.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- package/dist/types/src/calls/call-manager.d.ts +0 -87
- package/dist/types/src/calls/call-manager.d.ts.map +0 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +0 -66
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +0 -1
- package/dist/types/src/calls/index.d.ts +0 -7
- package/dist/types/src/calls/index.d.ts.map +0 -1
- package/dist/types/src/calls/media-manager.d.ts +0 -60
- package/dist/types/src/calls/media-manager.d.ts.map +0 -1
- package/dist/types/src/calls/speaking-monitor.d.ts +0 -21
- package/dist/types/src/calls/speaking-monitor.d.ts.map +0 -1
- package/dist/types/src/calls/types.d.ts +0 -45
- package/dist/types/src/calls/types.d.ts.map +0 -1
- package/dist/types/src/calls/util/audio.d.ts +0 -6
- package/dist/types/src/calls/util/audio.d.ts.map +0 -1
- package/dist/types/src/calls/util/calls-service.d.ts +0 -77
- package/dist/types/src/calls/util/calls-service.d.ts.map +0 -1
- package/dist/types/src/calls/util/history-cache.d.ts +0 -11
- package/dist/types/src/calls/util/history-cache.d.ts.map +0 -1
- package/dist/types/src/calls/util/index.d.ts +0 -5
- package/dist/types/src/calls/util/index.d.ts.map +0 -1
- package/dist/types/src/calls/util/media.d.ts +0 -6
- package/dist/types/src/calls/util/media.d.ts.map +0 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts +0 -18
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +0 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +0 -17
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +0 -1
- package/dist/types/src/calls-service.stories.d.ts +0 -23
- package/dist/types/src/calls-service.stories.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager.d.ts +0 -6
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -9
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/components/Call/Call.d.ts +0 -45
- package/dist/types/src/components/Call/Call.d.ts.map +0 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +0 -16
- package/dist/types/src/components/Call/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Call/index.d.ts +0 -3
- package/dist/types/src/components/Call/index.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts +0 -36
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/index.d.ts +0 -2
- package/dist/types/src/components/Lobby/index.d.ts.map +0 -1
- package/dist/types/src/components/Media/AudioStream.d.ts +0 -6
- package/dist/types/src/components/Media/AudioStream.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +0 -15
- package/dist/types/src/components/Media/VideoObject.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +0 -22
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +0 -1
- package/dist/types/src/components/Media/index.d.ts +0 -3
- package/dist/types/src/components/Media/index.d.ts.map +0 -1
- package/dist/types/src/components/Participant/Participant.d.ts +0 -6
- package/dist/types/src/components/Participant/Participant.d.ts.map +0 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts +0 -11
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +0 -1
- package/dist/types/src/components/Participant/index.d.ts +0 -3
- package/dist/types/src/components/Participant/index.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts +0 -32
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +0 -178
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts +0 -21
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts +0 -12
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts +0 -164
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +0 -4
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +0 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts +0 -15
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +0 -1
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +0 -2
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts +0 -3
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +0 -1
- package/dist/types/src/containers/CallSidebar/index.d.ts +0 -2
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +0 -12
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/index.d.ts +0 -2
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useDebugMode.d.ts +0 -2
- package/dist/types/src/hooks/useDebugMode.d.ts.map +0 -1
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +0 -3
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -25
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/src/calls/call-manager.ts +0 -270
- package/src/calls/call-swarm-synchronizer.ts +0 -350
- package/src/calls/index.ts +0 -10
- package/src/calls/media-manager.ts +0 -378
- package/src/calls/speaking-monitor.ts +0 -85
- package/src/calls/types.ts +0 -74
- package/src/calls/util/audio.ts +0 -58
- package/src/calls/util/calls-service.ts +0 -582
- package/src/calls/util/history-cache.ts +0 -27
- package/src/calls/util/index.ts +0 -8
- package/src/calls/util/media.ts +0 -52
- package/src/calls/util/stub-media-streams.ts +0 -129
- package/src/calls/util/task-scheduling.ts +0 -92
- package/src/calls-service.stories.tsx +0 -230
- package/src/capabilities/call-manager.ts +0 -27
- package/src/capabilities/react-root.tsx +0 -20
- package/src/components/Call/Call.tsx +0 -93
- package/src/components/Call/Toolbar.tsx +0 -199
- package/src/components/Call/index.ts +0 -6
- package/src/components/Lobby/Lobby.tsx +0 -123
- package/src/components/Lobby/index.ts +0 -5
- package/src/components/Media/AudioStream.tsx +0 -67
- package/src/components/Media/VideoObject.stories.tsx +0 -59
- package/src/components/Media/VideoObject.tsx +0 -58
- package/src/components/Media/index.ts +0 -6
- package/src/components/Participant/Participant.tsx +0 -77
- package/src/components/Participant/ParticipantGrid.tsx +0 -88
- package/src/components/Participant/index.ts +0 -6
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +0 -158
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +0 -341
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +0 -134
- package/src/components/ResponsiveGrid/ResponsivePanel.stories.tsx +0 -54
- package/src/components/ResponsiveGrid/ResponsivePanel.tsx +0 -31
- package/src/components/ResponsiveGrid/index.ts +0 -7
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +0 -173
- package/src/containers/CallDebugPanel/index.ts +0 -5
- package/src/containers/CallSidebar/CallSidebar.tsx +0 -18
- package/src/containers/CallSidebar/index.ts +0 -5
- package/src/containers/ChannelContainer/ChannelContainer.tsx +0 -223
- package/src/containers/ChannelContainer/index.ts +0 -5
- package/src/hooks/useBlackCanvasStreamTrack.tsx +0 -27
- package/src/hooks/useDebugMode.ts +0 -25
- package/src/hooks/useInaudibleAudioStreamTrack.tsx +0 -27
- package/src/hooks/useVideoStreamTrack.tsx +0 -36
- package/src/types/capabilities.ts +0 -37
- package/src/typings/peermetrics-webrtc-stats.d.ts +0 -46
- package/src/typings.d.ts +0 -8
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ChannelChat-6YTD5HWL.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { type PropsWithChildren } from 'react';
|
|
6
|
-
|
|
7
|
-
import { mx } from '@dxos/ui-theme';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* A container component that maintains the child's aspect ratio while centering its content.
|
|
11
|
-
* The container will scale to fit within its parent's bounds while preserving the aspect ratio.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* <ResponsivePanel>
|
|
15
|
-
* <VideoObject />
|
|
16
|
-
* </ResponsivePanel>
|
|
17
|
-
*/
|
|
18
|
-
export const ResponsivePanel = ({ children }: PropsWithChildren) => {
|
|
19
|
-
return (
|
|
20
|
-
// Outer container that takes full size of parent.
|
|
21
|
-
<div role='none' className='dx-expander relative flex'>
|
|
22
|
-
{/* Absolute positioning layer for centering content. */}
|
|
23
|
-
<div role='none' className='absolute inset-0 flex justify-center items-center'>
|
|
24
|
-
{/* Content container that maintains given aspect ratio and proper scaling. */}
|
|
25
|
-
<div role='none' className={mx('max-h-full max-w-full w-auto h-auto aspect-video')}>
|
|
26
|
-
{children}
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { WebRTCStats, type WebRTCStatsEvent } from '@peermetrics/webrtc-stats';
|
|
6
|
-
import React, { useEffect, useMemo, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
import { truncateKey } from '@dxos/debug';
|
|
9
|
-
import { JsonView, Panel } from '@dxos/devtools';
|
|
10
|
-
import { log } from '@dxos/log';
|
|
11
|
-
import { IconButton, Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
12
|
-
|
|
13
|
-
import { meta } from '#meta';
|
|
14
|
-
|
|
15
|
-
import { type EncodedTrackName, type GlobalState } from '../../calls';
|
|
16
|
-
|
|
17
|
-
export type CallDebugPanelProps = ThemedClassName<{ state?: GlobalState }>;
|
|
18
|
-
|
|
19
|
-
export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
20
|
-
const { t } = useTranslation(meta.id);
|
|
21
|
-
|
|
22
|
-
const [open, setOpen] = useState(false);
|
|
23
|
-
const handleToggle = () => setOpen(!open);
|
|
24
|
-
const [showServiceHistory, setShowServiceHistory] = useState(false);
|
|
25
|
-
const handleToggleServiceHistory = () => setShowServiceHistory(!showServiceHistory);
|
|
26
|
-
|
|
27
|
-
const handleCopyRaw = async () => {
|
|
28
|
-
await navigator.clipboard.writeText(JSON.stringify({ users: state?.call?.users, stats }, null, 2));
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const [showDetailedWebRTCStats, setShowDetailedWebRTCStats] = useState(false);
|
|
32
|
-
const handleShowDetailedWebRTCStats = () => setShowDetailedWebRTCStats(!showDetailedWebRTCStats);
|
|
33
|
-
|
|
34
|
-
const webrtcStats = useMemo(
|
|
35
|
-
() =>
|
|
36
|
-
new WebRTCStats({
|
|
37
|
-
getStatsInterval: 1000,
|
|
38
|
-
}),
|
|
39
|
-
[],
|
|
40
|
-
);
|
|
41
|
-
const [stats, setStats] = useState<WebRTCStatsEvent['data']>();
|
|
42
|
-
|
|
43
|
-
useEffect(() => {
|
|
44
|
-
const pc = state?.media.peer?.session?.peerConnection;
|
|
45
|
-
const handleStats = (stats: WebRTCStatsEvent) => {
|
|
46
|
-
setStats(stats.data);
|
|
47
|
-
};
|
|
48
|
-
let added = false;
|
|
49
|
-
if (pc && showDetailedWebRTCStats) {
|
|
50
|
-
webrtcStats.addConnection({ pc, peerId: 1, connectionId: '1' });
|
|
51
|
-
webrtcStats.on('stats', handleStats as never);
|
|
52
|
-
added = true;
|
|
53
|
-
}
|
|
54
|
-
return () => {
|
|
55
|
-
try {
|
|
56
|
-
if (pc && added) {
|
|
57
|
-
webrtcStats.removeConnection({ pc });
|
|
58
|
-
webrtcStats.removeListener('stats', handleStats as never);
|
|
59
|
-
}
|
|
60
|
-
} catch (error) {
|
|
61
|
-
log.error('error removing webrtc stats', { error, pc, peerId: 1, connectionId: '1' });
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}, [state?.media.peer?.session?.peerConnection, showDetailedWebRTCStats]);
|
|
65
|
-
|
|
66
|
-
const rows = useMemo(() => getCallStatusTable(state), [state?.call.users, state?.media.pulledAudioTracks]);
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<Panel
|
|
70
|
-
id='meeting-status'
|
|
71
|
-
icon='ph--video-conference--regular'
|
|
72
|
-
open={open}
|
|
73
|
-
onToggle={handleToggle}
|
|
74
|
-
title={t('meeting-status.title')}
|
|
75
|
-
info={<div className='flex items-center gap-2'> {state?.call.joined ? 'Active' : 'Inactive'}</div>}
|
|
76
|
-
maxHeight={0}
|
|
77
|
-
>
|
|
78
|
-
<div className='flex flex-col w-full text-xs'>
|
|
79
|
-
<div className='flex items-center gap-2 items-center'>
|
|
80
|
-
<Input.Root>
|
|
81
|
-
<Input.Switch checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
|
|
82
|
-
<Input.Label>{t('show-webrtc-stats.title')}</Input.Label>
|
|
83
|
-
</Input.Root>
|
|
84
|
-
</div>
|
|
85
|
-
<div className='flex items-center gap-2 items-center'>
|
|
86
|
-
<Input.Root>
|
|
87
|
-
<Input.Switch checked={showServiceHistory} onCheckedChange={handleToggleServiceHistory} />
|
|
88
|
-
<Input.Label>{t('show-calls-history.title')}</Input.Label>
|
|
89
|
-
</Input.Root>
|
|
90
|
-
</div>
|
|
91
|
-
<div className='flex items-center gap-2 items-center'>
|
|
92
|
-
<IconButton icon='ph--copy--regular' label={'copy raw'} onClick={handleCopyRaw} />
|
|
93
|
-
</div>
|
|
94
|
-
<Table rows={rows} />
|
|
95
|
-
{showDetailedWebRTCStats && <JsonView data={{ stats }} />}
|
|
96
|
-
{showServiceHistory && <JsonView data={{ history: state?.media.peer?.history.get() }} />}
|
|
97
|
-
</div>
|
|
98
|
-
</Panel>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const getCallStatusTable = (state?: GlobalState): TableProps['rows'] => {
|
|
103
|
-
if (!state || !state.call?.users) {
|
|
104
|
-
return [];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const self = state.call.self;
|
|
108
|
-
const users = state.call.users
|
|
109
|
-
.filter((user) => user.id !== self!.id)
|
|
110
|
-
.map((user) => {
|
|
111
|
-
const isOk = {
|
|
112
|
-
audio:
|
|
113
|
-
user.tracks?.audio &&
|
|
114
|
-
state.media.pulledAudioTracks[user.tracks?.audio as EncodedTrackName]?.ctx.disposed === false,
|
|
115
|
-
video:
|
|
116
|
-
user.tracks?.video &&
|
|
117
|
-
state.media.pulledVideoStreams[user.tracks?.video as EncodedTrackName]?.ctx.disposed === false,
|
|
118
|
-
screenshare:
|
|
119
|
-
user.tracks?.screenshare &&
|
|
120
|
-
state.media.pulledVideoStreams[user.tracks?.screenshare as EncodedTrackName]?.ctx.disposed === false,
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
...user,
|
|
125
|
-
isOk,
|
|
126
|
-
};
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
return [
|
|
130
|
-
['users', state.call.users.length ?? 0],
|
|
131
|
-
[
|
|
132
|
-
'*self* ' + (self?.name ?? truncateKey(self!.id, 8)),
|
|
133
|
-
self?.tracks?.audio && state.media.pushedAudioTrack ? 'AUD ✅' : 'AUD ❌',
|
|
134
|
-
self?.tracks?.video && state.media.pushedVideoTrack ? 'VID ✅' : 'VID ❌',
|
|
135
|
-
self?.tracks?.screenshareEnabled
|
|
136
|
-
? self.tracks.screenshareEnabled && state.media.pushedScreenshareTrack
|
|
137
|
-
? 'SCR ✅'
|
|
138
|
-
: 'SCR ❌'
|
|
139
|
-
: undefined,
|
|
140
|
-
],
|
|
141
|
-
|
|
142
|
-
...users.map((user) => [
|
|
143
|
-
user.name ?? truncateKey(user.id, 8),
|
|
144
|
-
user.isOk.audio ? 'AUD ✅' : 'AUD ❌',
|
|
145
|
-
user.isOk.video ? 'VID ✅' : 'VID ❌',
|
|
146
|
-
user.tracks?.screenshareEnabled ? (user.isOk.screenshare ? 'SCR ✅' : 'SCR ❌') : undefined,
|
|
147
|
-
]),
|
|
148
|
-
['ICE', state.media.peer?.session?.peerConnection.iceConnectionState ?? 'no connection'],
|
|
149
|
-
];
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export namespace Unit {
|
|
153
|
-
export const KB = (n?: number) => ((n ?? 0) / 1_000).toFixed(2);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export type TableProps = {
|
|
157
|
-
rows: (string | number | undefined)[][];
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export const Table = ({ rows }: TableProps) => {
|
|
161
|
-
return (
|
|
162
|
-
<div className='w-full text-xs font-mono'>
|
|
163
|
-
{rows.map(([prefix, label, value, unit], i) => (
|
|
164
|
-
<div key={i} className='grid grid-cols-[3fr_1fr_1fr_1fr]'>
|
|
165
|
-
<div className='p-1'>{prefix}</div>
|
|
166
|
-
<div className='p-1'>{label}</div>
|
|
167
|
-
<div className='p-1'>{value}</div>
|
|
168
|
-
<div className='p-1'>{unit}</div>
|
|
169
|
-
</div>
|
|
170
|
-
))}
|
|
171
|
-
</div>
|
|
172
|
-
);
|
|
173
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { useCapability } from '@dxos/app-framework/ui';
|
|
9
|
-
|
|
10
|
-
import { ThreadCapabilities } from '#types';
|
|
11
|
-
|
|
12
|
-
import ChannelContainer from '../ChannelContainer';
|
|
13
|
-
|
|
14
|
-
export const CallSidebar = () => {
|
|
15
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
16
|
-
const roomId = useAtomValue(call.roomIdAtom);
|
|
17
|
-
return <ChannelContainer subject={undefined} attendableId={roomId ?? ''} roomId={roomId} role='article' />;
|
|
18
|
-
};
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Atom, useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
-
import React, { type ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
import { useCapabilities, useCapability } from '@dxos/app-framework/ui';
|
|
9
|
-
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
|
-
import { Context } from '@dxos/context';
|
|
11
|
-
import { failUndefined } from '@dxos/debug';
|
|
12
|
-
import { log } from '@dxos/log';
|
|
13
|
-
import { useClient } from '@dxos/react-client';
|
|
14
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
15
|
-
import { useIdentity } from '@dxos/react-client/halo';
|
|
16
|
-
import { Button, ElevationProvider, Input, Panel, useTranslation } from '@dxos/react-ui';
|
|
17
|
-
import { Settings } from '@dxos/react-ui-form';
|
|
18
|
-
import { Menu, MenuRootProps, createMenuAction, createMenuItemGroup, useMenuActions } from '@dxos/react-ui-menu';
|
|
19
|
-
import { useSoundEffect } from '@dxos/react-ui-sfx';
|
|
20
|
-
import { type Channel } from '@dxos/types';
|
|
21
|
-
import { composable, composableProps } from '@dxos/ui-theme';
|
|
22
|
-
|
|
23
|
-
import { Call } from '#components';
|
|
24
|
-
import { meta } from '#meta';
|
|
25
|
-
import { ThreadCapabilities } from '#types';
|
|
26
|
-
|
|
27
|
-
import { ChannelChat } from '../ChannelChat';
|
|
28
|
-
|
|
29
|
-
export type ChannelContainerProps = AppSurface.ObjectArticleProps<
|
|
30
|
-
Channel.Channel | undefined,
|
|
31
|
-
{
|
|
32
|
-
roomId?: string;
|
|
33
|
-
fullscreen?: boolean;
|
|
34
|
-
}
|
|
35
|
-
>;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Renders a call when active, otherwise renders the channel chat.
|
|
39
|
-
*/
|
|
40
|
-
// TODO(burdon): Create Radix style layout.
|
|
41
|
-
export const ChannelContainer = ({
|
|
42
|
-
role,
|
|
43
|
-
subject: channel,
|
|
44
|
-
attendableId,
|
|
45
|
-
roomId: roomIdProp,
|
|
46
|
-
fullscreen,
|
|
47
|
-
}: ChannelContainerProps) => {
|
|
48
|
-
const space = getSpace(channel);
|
|
49
|
-
const callManager = useCapability(ThreadCapabilities.CallManager);
|
|
50
|
-
const extensions = useCapabilities(ThreadCapabilities.CallExtension);
|
|
51
|
-
const joined = useAtomValue(callManager.joinedAtom);
|
|
52
|
-
const currentRoomId = useAtomValue(callManager.roomIdAtom);
|
|
53
|
-
const roomId = roomIdProp ?? attendableId ?? failUndefined();
|
|
54
|
-
const identity = useIdentity();
|
|
55
|
-
const isNamed = !!identity?.profile?.displayName;
|
|
56
|
-
const joinSound = useSoundEffect('JoinCall');
|
|
57
|
-
const leaveSound = useSoundEffect('LeaveCall');
|
|
58
|
-
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
const ctx = new Context();
|
|
61
|
-
callManager.left.on(ctx, (roomId) => {
|
|
62
|
-
extensions.forEach((extension) => {
|
|
63
|
-
void extension.onLeave?.(roomId);
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
callManager.callStateUpdated.on(ctx, (state) => {
|
|
68
|
-
extensions.forEach((extension) => {
|
|
69
|
-
void extension.onCallStateUpdated?.(state);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
callManager.mediaStateUpdated.on(ctx, (state) => {
|
|
74
|
-
extensions.forEach((extension) => {
|
|
75
|
-
void extension.onMediaStateUpdated?.(state);
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
return () => {
|
|
80
|
-
void ctx.dispose();
|
|
81
|
-
};
|
|
82
|
-
}, [callManager, extensions]);
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Join the call.
|
|
86
|
-
*/
|
|
87
|
-
// TODO(wittjosiah): Show preview before joining?
|
|
88
|
-
const handleJoin = useCallback(async () => {
|
|
89
|
-
if (!roomId || !channel) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (joined) {
|
|
94
|
-
await callManager.leave();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
try {
|
|
98
|
-
void joinSound.play();
|
|
99
|
-
callManager.setRoomId(roomId);
|
|
100
|
-
await callManager.join();
|
|
101
|
-
await Promise.all(extensions.map((extension) => extension.onJoin?.({ channel, roomId })));
|
|
102
|
-
} catch (err) {
|
|
103
|
-
// TODO(burdon): Error sound.
|
|
104
|
-
log.catch(err);
|
|
105
|
-
}
|
|
106
|
-
}, [extensions, channel, roomId, joined]);
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Leave the call.
|
|
110
|
-
*/
|
|
111
|
-
const handleLeave = useCallback(async () => {
|
|
112
|
-
try {
|
|
113
|
-
void leaveSound.play();
|
|
114
|
-
} catch (err) {
|
|
115
|
-
// TODO(burdon): Error sound.
|
|
116
|
-
log.catch(err);
|
|
117
|
-
} finally {
|
|
118
|
-
void callManager.turnAudioOff();
|
|
119
|
-
void callManager.turnVideoOff();
|
|
120
|
-
void callManager.turnScreenshareOff();
|
|
121
|
-
void callManager.leave();
|
|
122
|
-
}
|
|
123
|
-
}, [extensions, roomId]);
|
|
124
|
-
|
|
125
|
-
const isJoined = joined && currentRoomId === roomId;
|
|
126
|
-
if (isJoined) {
|
|
127
|
-
return (
|
|
128
|
-
<Panel.Root>
|
|
129
|
-
<Panel.Content>
|
|
130
|
-
{isNamed ? (
|
|
131
|
-
<Call.Root>
|
|
132
|
-
<Call.Grid fullscreen={fullscreen} />
|
|
133
|
-
<Call.Toolbar channel={channel} onLeave={handleLeave} />
|
|
134
|
-
</Call.Root>
|
|
135
|
-
) : (
|
|
136
|
-
<DisplayNameMissing />
|
|
137
|
-
)}
|
|
138
|
-
</Panel.Content>
|
|
139
|
-
</Panel.Root>
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (channel && space) {
|
|
144
|
-
return (
|
|
145
|
-
<Panel.Root classNames='dx-document'>
|
|
146
|
-
<Panel.Toolbar asChild>
|
|
147
|
-
<ChannelToolbar attendableId={attendableId} role={role} onJoinCall={handleJoin} />
|
|
148
|
-
</Panel.Toolbar>
|
|
149
|
-
<Panel.Content asChild>
|
|
150
|
-
<ChannelChat space={space} channel={channel} />
|
|
151
|
-
</Panel.Content>
|
|
152
|
-
</Panel.Root>
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return null;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
const DisplayNameMissing = () => {
|
|
160
|
-
const { t } = useTranslation(meta.id);
|
|
161
|
-
const client = useClient();
|
|
162
|
-
const [displayName, setDisplayName] = useState('');
|
|
163
|
-
const handleChange = useCallback((event: ChangeEvent<HTMLInputElement>) => setDisplayName(event.target.value), []);
|
|
164
|
-
const handleSave = useCallback(() => client.halo.updateProfile({ displayName }), [client, displayName]);
|
|
165
|
-
|
|
166
|
-
return (
|
|
167
|
-
<div className='space-y-trim-md p-4 place-content-center'>
|
|
168
|
-
<Settings.Item title={t('display-name.label')} description={t('display-name.description')}>
|
|
169
|
-
<Input.TextInput
|
|
170
|
-
value={displayName}
|
|
171
|
-
onChange={handleChange}
|
|
172
|
-
placeholder={t('display-name-input.placeholder')}
|
|
173
|
-
classNames='md:min-w-64'
|
|
174
|
-
/>
|
|
175
|
-
</Settings.Item>
|
|
176
|
-
<Button classNames='md:col-span-2' disabled={!displayName} onClick={handleSave}>
|
|
177
|
-
{t('set-display-name.label')}
|
|
178
|
-
</Button>
|
|
179
|
-
</div>
|
|
180
|
-
);
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
const useChannelToolbarActions = (onJoinCall?: () => void) => {
|
|
184
|
-
const creator = useMemo(
|
|
185
|
-
() =>
|
|
186
|
-
Atom.make(() => {
|
|
187
|
-
return {
|
|
188
|
-
nodes: [
|
|
189
|
-
createMenuItemGroup('root', {
|
|
190
|
-
label: ['channel-toolbar.title', { ns: meta.id }],
|
|
191
|
-
}),
|
|
192
|
-
createMenuAction('video-call', () => onJoinCall?.(), {
|
|
193
|
-
label: ['start-video-call.menu', { ns: meta.id }],
|
|
194
|
-
icon: 'ph--video-camera--regular',
|
|
195
|
-
type: 'video-call',
|
|
196
|
-
}),
|
|
197
|
-
],
|
|
198
|
-
edges: [{ source: 'root', target: 'video-call', relation: 'child' }],
|
|
199
|
-
};
|
|
200
|
-
}),
|
|
201
|
-
[],
|
|
202
|
-
);
|
|
203
|
-
|
|
204
|
-
return useMenuActions(creator);
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
type ChannelToolbarProps = Pick<MenuRootProps, 'attendableId'> & {
|
|
208
|
-
onJoinCall?: () => void;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
const ChannelToolbar = composable<HTMLDivElement, ChannelToolbarProps>(
|
|
212
|
-
({ attendableId, role, onJoinCall, ...props }, forwardedRef) => {
|
|
213
|
-
const menuActions = useChannelToolbarActions(onJoinCall);
|
|
214
|
-
|
|
215
|
-
return (
|
|
216
|
-
<ElevationProvider elevation={role === 'section' ? 'positioned' : 'base'}>
|
|
217
|
-
<Menu.Root {...menuActions} attendableId={attendableId}>
|
|
218
|
-
<Menu.Toolbar {...composableProps(props)} ref={forwardedRef} />
|
|
219
|
-
</Menu.Root>
|
|
220
|
-
</ElevationProvider>
|
|
221
|
-
);
|
|
222
|
-
},
|
|
223
|
-
);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { useEffect, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { scheduleTask } from '@dxos/async';
|
|
8
|
-
import { Context } from '@dxos/context';
|
|
9
|
-
|
|
10
|
-
import { createBlackCanvasStreamTrack } from '../calls/util/stub-media-streams';
|
|
11
|
-
|
|
12
|
-
export const useBlackCanvasStreamTrack = () => {
|
|
13
|
-
const [blackCanvasStreamTrack, setBlackCanvasStreamTrack] = useState<MediaStreamTrack | undefined>(undefined);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
const ctx = new Context();
|
|
16
|
-
scheduleTask(ctx, async () => {
|
|
17
|
-
const blackCanvasStreamTrack = await createBlackCanvasStreamTrack({ ctx, width: 720, height: 480 });
|
|
18
|
-
setBlackCanvasStreamTrack(blackCanvasStreamTrack);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return () => {
|
|
22
|
-
void ctx.dispose();
|
|
23
|
-
};
|
|
24
|
-
}, []);
|
|
25
|
-
|
|
26
|
-
return blackCanvasStreamTrack;
|
|
27
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { useEffect, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
// TODO(burdon): Standardize across plugins/composer.
|
|
8
|
-
export const useDebugMode = () => {
|
|
9
|
-
const [enabled, setEnabled] = useState(false);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const handler = (ev: KeyboardEvent) => {
|
|
12
|
-
if (ev.key.toLowerCase() === 'd' && ev.ctrlKey) {
|
|
13
|
-
ev.preventDefault();
|
|
14
|
-
setEnabled(!enabled);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
document.addEventListener('keypress', handler);
|
|
19
|
-
return () => {
|
|
20
|
-
document.removeEventListener('keypress', handler);
|
|
21
|
-
};
|
|
22
|
-
}, [enabled]);
|
|
23
|
-
|
|
24
|
-
return enabled;
|
|
25
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { useEffect, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
import { scheduleTask } from '@dxos/async';
|
|
8
|
-
import { Context } from '@dxos/context';
|
|
9
|
-
|
|
10
|
-
import { createInaudibleAudioStreamTrack } from '../calls/util/stub-media-streams';
|
|
11
|
-
|
|
12
|
-
export const useInaudibleAudioStreamTrack = () => {
|
|
13
|
-
const [audioStreamTrack, setAudioStreamTrack] = useState<MediaStreamTrack | undefined>(undefined);
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
const ctx = new Context();
|
|
16
|
-
scheduleTask(ctx, async () => {
|
|
17
|
-
const audioStreamTrack = await createInaudibleAudioStreamTrack({ ctx });
|
|
18
|
-
setAudioStreamTrack(audioStreamTrack);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return () => {
|
|
22
|
-
void ctx.dispose();
|
|
23
|
-
};
|
|
24
|
-
}, []);
|
|
25
|
-
|
|
26
|
-
return audioStreamTrack;
|
|
27
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type RefObject, useEffect, useRef, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
export const useVideoStreamTrack = (videoElement: RefObject<HTMLVideoElement | null>, videoSrc: string) => {
|
|
8
|
-
// Get video stream track.
|
|
9
|
-
const [videoStreamTrack, setVideoStreamTrack] = useState<MediaStreamTrack | undefined>(undefined);
|
|
10
|
-
const hadRun = useRef(false);
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
// This is done to capture only one video stream.
|
|
13
|
-
if (!videoElement.current || hadRun.current || !videoSrc) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
hadRun.current = true;
|
|
17
|
-
videoElement.current.addEventListener('playing', () => {
|
|
18
|
-
if (videoStreamTrack) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const stream = (videoElement.current as any).captureStream();
|
|
22
|
-
const track = stream.getTracks()[0];
|
|
23
|
-
if (track && !videoStreamTrack) {
|
|
24
|
-
setVideoStreamTrack(track);
|
|
25
|
-
}
|
|
26
|
-
stream.onaddtrack = (event: MediaStreamTrackEvent) => {
|
|
27
|
-
if (event.track.kind === 'video' && !videoStreamTrack) {
|
|
28
|
-
setVideoStreamTrack(event.track);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
videoElement.current.src = videoSrc;
|
|
33
|
-
}, [videoElement.current, videoSrc]);
|
|
34
|
-
|
|
35
|
-
return videoStreamTrack;
|
|
36
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Atom } from '@effect-atom/atom-react';
|
|
6
|
-
|
|
7
|
-
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { type Channel } from '@dxos/types';
|
|
9
|
-
|
|
10
|
-
import { meta } from '#meta';
|
|
11
|
-
|
|
12
|
-
import { type CallManager, type CallState, type MediaState } from '../calls';
|
|
13
|
-
import { type ThreadState, type ViewStore } from '../types';
|
|
14
|
-
import * as Settings from './Settings';
|
|
15
|
-
|
|
16
|
-
export namespace ThreadCapabilities {
|
|
17
|
-
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);
|
|
18
|
-
export const CallManager = Capability.make<CallManager>(`${meta.id}.capability.call-manager`);
|
|
19
|
-
|
|
20
|
-
// TODO(burdon): Better way to define specific extensions for meeting companions.
|
|
21
|
-
// TODO(burdon): This brings in deps from ../calls; how should we manage/minimize explicit type exposure to other plugins?
|
|
22
|
-
// TODO(wittjosiah): These callbacks could be intents once we support broadcast.
|
|
23
|
-
export type CallProperties = {
|
|
24
|
-
onJoin: (state: { channel?: Channel.Channel; roomId?: string }) => Promise<void>;
|
|
25
|
-
onLeave: (roomId?: string) => Promise<void>;
|
|
26
|
-
onCallStateUpdated: (callState: CallState) => Promise<void>;
|
|
27
|
-
onMediaStateUpdated: ([mediaState, isSpeaking]: [MediaState, boolean]) => Promise<void>;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const CallExtension = Capability.make<CallProperties>(`${meta.id}.capability.call-extension`);
|
|
31
|
-
|
|
32
|
-
/** Thread state (drafts, toolbar state, current selection). */
|
|
33
|
-
export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}.capability.state`);
|
|
34
|
-
|
|
35
|
-
/** Per-subject view state (e.g., showResolvedThreads). */
|
|
36
|
-
export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}.capability.view-state`);
|
|
37
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
declare module '@peermetrics/webrtc-stats' {
|
|
6
|
-
import { EventEmitter } from 'events';
|
|
7
|
-
|
|
8
|
-
export interface WebRTCStatsConstructorOptions {
|
|
9
|
-
getStatsInterval?: number;
|
|
10
|
-
rawStats?: boolean;
|
|
11
|
-
statsObject?: boolean;
|
|
12
|
-
filteredStats?: boolean;
|
|
13
|
-
wrapGetUserMedia?: boolean;
|
|
14
|
-
debug?: boolean;
|
|
15
|
-
remote?: boolean;
|
|
16
|
-
logLevel?: LogLevel;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface ConnectionInfo {
|
|
20
|
-
pc: RTCPeerConnection;
|
|
21
|
-
peerId: number | string;
|
|
22
|
-
connectionId: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type TrackStats = {
|
|
26
|
-
id: string;
|
|
27
|
-
kind: 'audio' | 'video';
|
|
28
|
-
codecId: string;
|
|
29
|
-
mid: string;
|
|
30
|
-
bytesSent: number;
|
|
31
|
-
bytesReceived: number;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type WebRTCStatsEvent = {
|
|
35
|
-
data: {
|
|
36
|
-
audio: { inbound: TrackStats[]; outbound: TrackStats[] };
|
|
37
|
-
video: { inbound: TrackStats[]; outbound: TrackStats[] };
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export class WebRTCStats extends EventEmitter<{ stats: WebRTCStatsEvent }> {
|
|
42
|
-
constructor(options: WebRTCStatsConstructorOptions);
|
|
43
|
-
addConnection(info: ConnectionInfo): void;
|
|
44
|
-
removeConnection(info: Pick<ConnectionInfo, 'pc'>): void;
|
|
45
|
-
}
|
|
46
|
-
}
|