@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
10
|
+
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
|
+
import { Channel } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
export default Capability.makeModule(
|
|
14
|
+
Effect.fnUntraced(function* () {
|
|
15
|
+
return Capability.contributes(SpaceCapabilities.CreateObjectEntry, {
|
|
16
|
+
id: Channel.Channel.typename,
|
|
17
|
+
createObject: (props, options) =>
|
|
18
|
+
Effect.gen(function* () {
|
|
19
|
+
const object = Channel.make(props);
|
|
20
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
21
|
+
object,
|
|
22
|
+
target: options.target,
|
|
23
|
+
hidden: true,
|
|
24
|
+
targetNodeId: options.targetNodeId,
|
|
25
|
+
});
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
@@ -8,13 +8,12 @@ import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
|
8
8
|
|
|
9
9
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
10
10
|
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
11
|
-
export const
|
|
11
|
+
export const CreateObject = Capability.lazy('CreateObject', () => import('./create-object'));
|
|
12
12
|
export const Markdown = Capability.lazy('Markdown', () => import('./markdown'));
|
|
13
13
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
14
14
|
'OperationHandler',
|
|
15
15
|
() => import('./operation-handler'),
|
|
16
16
|
);
|
|
17
|
-
export const ReactRoot = Capability.lazy('ReactRoot', () => import('./react-root'));
|
|
18
17
|
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
19
18
|
export const ThreadSettings = Capability.lazy('ThreadSettings', () => import('./settings'));
|
|
20
19
|
export const ThreadState = Capability.lazy('ThreadState', () => import('./state'));
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
10
|
-
import { MarkdownCapabilities } from '@dxos/plugin-markdown
|
|
10
|
+
import { MarkdownCapabilities } from '@dxos/plugin-markdown';
|
|
11
11
|
import { linkedSegment } from '@dxos/react-ui-attention';
|
|
12
12
|
import { type EditorState, commentClickedEffect, commentsState, documentId, overlap } from '@dxos/ui-editor';
|
|
13
13
|
|
|
@@ -2,27 +2,19 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { useAtomValue } from '@effect-atom/atom-react';
|
|
6
5
|
import * as Effect from 'effect/Effect';
|
|
7
6
|
import React from 'react';
|
|
8
7
|
|
|
9
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
10
|
-
import { Surface,
|
|
9
|
+
import { Surface, useSettingsState } from '@dxos/app-framework/ui';
|
|
11
10
|
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
12
11
|
import { getSpace } from '@dxos/react-client/echo';
|
|
13
12
|
import { Channel, Thread } from '@dxos/types';
|
|
14
13
|
|
|
15
14
|
import { ThreadSettings } from '#components';
|
|
16
|
-
import {
|
|
17
|
-
CallDebugPanel,
|
|
18
|
-
CallSidebar,
|
|
19
|
-
ChannelChat,
|
|
20
|
-
ChannelContainer,
|
|
21
|
-
ThreadCompanion,
|
|
22
|
-
ThreadContainer,
|
|
23
|
-
} from '#containers';
|
|
15
|
+
import { ChannelChat, ChannelArticle, ThreadCompanion, ThreadContainer } from '#containers';
|
|
24
16
|
import { meta } from '#meta';
|
|
25
|
-
import {
|
|
17
|
+
import { type Settings } from '#types';
|
|
26
18
|
|
|
27
19
|
export default Capability.makeModule(() =>
|
|
28
20
|
Effect.succeed(
|
|
@@ -31,7 +23,7 @@ export default Capability.makeModule(() =>
|
|
|
31
23
|
id: 'channel',
|
|
32
24
|
filter: AppSurface.object(AppSurface.Article, Channel.Channel),
|
|
33
25
|
component: ({ data: { subject, attendableId }, role }) => (
|
|
34
|
-
<
|
|
26
|
+
<ChannelArticle role={role} subject={subject} attendableId={attendableId} />
|
|
35
27
|
),
|
|
36
28
|
}),
|
|
37
29
|
Surface.create({
|
|
@@ -78,20 +70,6 @@ export default Capability.makeModule(() =>
|
|
|
78
70
|
return <ThreadSettings settings={settings} onSettingsChange={updateSettings} />;
|
|
79
71
|
},
|
|
80
72
|
}),
|
|
81
|
-
Surface.create({
|
|
82
|
-
id: 'assistant',
|
|
83
|
-
role: 'deck-companion--active-call',
|
|
84
|
-
component: () => <CallSidebar />,
|
|
85
|
-
}),
|
|
86
|
-
Surface.create({
|
|
87
|
-
id: 'devtools-overview',
|
|
88
|
-
role: 'devtools-overview',
|
|
89
|
-
component: () => {
|
|
90
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
91
|
-
const state = useAtomValue(call.stateAtom);
|
|
92
|
-
return <CallDebugPanel state={state} />;
|
|
93
|
-
},
|
|
94
|
-
}),
|
|
95
73
|
]),
|
|
96
74
|
),
|
|
97
75
|
);
|
|
@@ -9,9 +9,7 @@ import { AppCapabilities } from '@dxos/app-toolkit';
|
|
|
9
9
|
import { createKvsStore } from '@dxos/effect';
|
|
10
10
|
|
|
11
11
|
import { meta } from '#meta';
|
|
12
|
-
import { Settings } from '#types';
|
|
13
|
-
|
|
14
|
-
import { ThreadCapabilities } from '../types/capabilities';
|
|
12
|
+
import { Settings, ThreadCapabilities } from '#types';
|
|
15
13
|
|
|
16
14
|
export default Capability.makeModule(() =>
|
|
17
15
|
Effect.sync(() => {
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
8
8
|
|
|
9
9
|
import { meta } from '#meta';
|
|
10
|
-
import { ThreadOperation } from '#
|
|
10
|
+
import { ThreadOperation } from '#types';
|
|
11
11
|
|
|
12
12
|
export default Capability.makeModule(
|
|
13
13
|
Effect.fnUntraced(function* () {
|
|
@@ -51,6 +51,13 @@ export type ChatProps = ThemedClassName<
|
|
|
51
51
|
* scrolling above it. Suitable for full-panel multi-party chat.
|
|
52
52
|
*/
|
|
53
53
|
orientation?: ChatOrientation;
|
|
54
|
+
/**
|
|
55
|
+
* When true, hide the composer textbox and activity indicator. Used for
|
|
56
|
+
* channels whose source-of-truth lives elsewhere (e.g. externally-synced
|
|
57
|
+
* Slack/Discord channels keyed by a foreign id) — sending isn't meaningful
|
|
58
|
+
* because there is no local-write path back to the source.
|
|
59
|
+
*/
|
|
60
|
+
readOnly?: boolean;
|
|
54
61
|
} & Pick<ThreadRootProps, 'current'>
|
|
55
62
|
>;
|
|
56
63
|
|
|
@@ -61,11 +68,23 @@ export type ChatOrientation = 'top' | 'bottom';
|
|
|
61
68
|
* Owns its own UI state (textbox content, scroll position, editor extensions) but
|
|
62
69
|
* does not load data or invoke operations — the caller passes messages and an
|
|
63
70
|
* `onSend` callback. Used by both `ThreadContainer` (AutoMerge `Thread`) and
|
|
64
|
-
* `
|
|
71
|
+
* `ChannelArticle`'s feed-backed channel chat.
|
|
65
72
|
*/
|
|
66
73
|
export const Chat = composable<HTMLDivElement, ChatProps>(
|
|
67
74
|
(
|
|
68
|
-
{
|
|
75
|
+
{
|
|
76
|
+
id,
|
|
77
|
+
identity,
|
|
78
|
+
members,
|
|
79
|
+
messages,
|
|
80
|
+
activity,
|
|
81
|
+
onSend,
|
|
82
|
+
autoFocusTextbox,
|
|
83
|
+
current,
|
|
84
|
+
orientation = 'top',
|
|
85
|
+
readOnly,
|
|
86
|
+
...props
|
|
87
|
+
},
|
|
69
88
|
forwardedRef,
|
|
70
89
|
) => {
|
|
71
90
|
const { t } = useTranslation(meta.id);
|
|
@@ -129,6 +148,7 @@ export const Chat = composable<HTMLDivElement, ChatProps>(
|
|
|
129
148
|
textboxMetadata,
|
|
130
149
|
scrollRef,
|
|
131
150
|
sentinelRef,
|
|
151
|
+
readOnly,
|
|
132
152
|
};
|
|
133
153
|
|
|
134
154
|
return orientation === 'bottom' ? (
|
|
@@ -164,6 +184,7 @@ type ChatRenderState = {
|
|
|
164
184
|
textboxMetadata: MessageMetadata;
|
|
165
185
|
scrollRef: RefObject<HTMLDivElement | null>;
|
|
166
186
|
sentinelRef: RefObject<HTMLDivElement | null>;
|
|
187
|
+
readOnly?: boolean;
|
|
167
188
|
};
|
|
168
189
|
|
|
169
190
|
type LayoutProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -175,20 +196,25 @@ type LayoutProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
175
196
|
const ThreadLayout = React.forwardRef<HTMLDivElement, LayoutProps & Pick<ThreadRootProps, 'current'>>(
|
|
176
197
|
({ id, current, state, ...props }, ref) => {
|
|
177
198
|
const { t } = useTranslation(meta.id);
|
|
178
|
-
const { messages, members, activity, extensions, autoFocus, handleSend, textboxMetadata, sentinelRef } =
|
|
199
|
+
const { messages, members, activity, extensions, autoFocus, handleSend, textboxMetadata, sentinelRef, readOnly } =
|
|
200
|
+
state;
|
|
179
201
|
return (
|
|
180
202
|
<ThreadComponent.Root {...props} id={id} current={current} ref={ref}>
|
|
181
203
|
<ScrollArea.Root classNames='col-span-2' orientation='vertical'>
|
|
182
204
|
<ScrollArea.Viewport ref={sentinelRef}>
|
|
183
|
-
<div
|
|
205
|
+
<div className={mx(threadLayout, 'place-self-end')}>
|
|
184
206
|
{messages.map((message) => (
|
|
185
207
|
<MessagePanel key={message.id} message={message} members={members} />
|
|
186
208
|
))}
|
|
187
209
|
</div>
|
|
188
210
|
</ScrollArea.Viewport>
|
|
189
211
|
</ScrollArea.Root>
|
|
190
|
-
|
|
191
|
-
|
|
212
|
+
{!readOnly && (
|
|
213
|
+
<>
|
|
214
|
+
<MessageTextbox extensions={extensions} autoFocus={autoFocus} onSend={handleSend} {...textboxMetadata} />
|
|
215
|
+
<ThreadComponent.Status activity={activity}>{t('activity.message')}</ThreadComponent.Status>
|
|
216
|
+
</>
|
|
217
|
+
)}
|
|
192
218
|
</ThreadComponent.Root>
|
|
193
219
|
);
|
|
194
220
|
},
|
|
@@ -197,8 +223,18 @@ const ThreadLayout = React.forwardRef<HTMLDivElement, LayoutProps & Pick<ThreadR
|
|
|
197
223
|
/** Channel layout — composer pinned to the bottom, messages scroll above it. */
|
|
198
224
|
const ChannelLayout = React.forwardRef<HTMLDivElement, LayoutProps>(({ id, state, ...props }, ref) => {
|
|
199
225
|
const { t } = useTranslation(meta.id);
|
|
200
|
-
const {
|
|
201
|
-
|
|
226
|
+
const {
|
|
227
|
+
messages,
|
|
228
|
+
members,
|
|
229
|
+
activity,
|
|
230
|
+
extensions,
|
|
231
|
+
autoFocus,
|
|
232
|
+
handleSend,
|
|
233
|
+
textboxMetadata,
|
|
234
|
+
scrollRef,
|
|
235
|
+
sentinelRef,
|
|
236
|
+
readOnly,
|
|
237
|
+
} = state;
|
|
202
238
|
return (
|
|
203
239
|
<div {...props} id={id} ref={ref}>
|
|
204
240
|
<div ref={scrollRef} className='flex-1 min-h-0 overflow-y-auto'>
|
|
@@ -209,10 +245,14 @@ const ChannelLayout = React.forwardRef<HTMLDivElement, LayoutProps>(({ id, state
|
|
|
209
245
|
))}
|
|
210
246
|
<div ref={sentinelRef} />
|
|
211
247
|
</div>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
248
|
+
{!readOnly && (
|
|
249
|
+
<>
|
|
250
|
+
<div className='shrink-0 grid grid-cols-[var(--dx-rail-size)_1fr]'>
|
|
251
|
+
<MessageTextbox extensions={extensions} autoFocus={autoFocus} onSend={handleSend} {...textboxMetadata} />
|
|
252
|
+
</div>
|
|
253
|
+
<div className='shrink-0 px-2 pb-1 text-xs text-description'>{activity ? t('activity.message') : null}</div>
|
|
254
|
+
</>
|
|
255
|
+
)}
|
|
216
256
|
</div>
|
|
217
257
|
);
|
|
218
258
|
});
|
|
@@ -10,7 +10,7 @@ import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
11
|
import { Obj, Query, Relation } from '@dxos/echo';
|
|
12
12
|
import { TestSchema } from '@dxos/echo/testing';
|
|
13
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
13
|
+
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
14
14
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
15
15
|
import { random } from '@dxos/random';
|
|
16
16
|
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
@@ -41,19 +41,19 @@ export const CommentsPanel = ({ anchors, currentId, showResolvedThreads, ...prop
|
|
|
41
41
|
|
|
42
42
|
if (filteredAnchors.length === 0) {
|
|
43
43
|
return (
|
|
44
|
-
<div
|
|
44
|
+
<div className='p-form-padding'>
|
|
45
45
|
<Message.Root>
|
|
46
|
-
<Message.
|
|
46
|
+
<Message.Content>
|
|
47
47
|
<Trans
|
|
48
48
|
{...{
|
|
49
49
|
t,
|
|
50
50
|
i18nKey: 'no-comments.message',
|
|
51
51
|
components: {
|
|
52
|
-
commentIcon: <Icon icon='ph--chat-text--regular' size={4} classNames='
|
|
52
|
+
commentIcon: <Icon icon='ph--chat-text--regular' size={4} classNames='dx-icon-inline' />,
|
|
53
53
|
},
|
|
54
54
|
}}
|
|
55
55
|
/>
|
|
56
|
-
</Message.
|
|
56
|
+
</Message.Content>
|
|
57
57
|
</Message.Root>
|
|
58
58
|
</div>
|
|
59
59
|
);
|
|
@@ -104,7 +104,6 @@ export const CommentsThread = ({
|
|
|
104
104
|
onFocusCapture={handleAttend}
|
|
105
105
|
>
|
|
106
106
|
<div
|
|
107
|
-
role='none'
|
|
108
107
|
className={mx(
|
|
109
108
|
'col-span-2 grid grid-cols-[var(--dx-rail-size)_1fr_min-content]',
|
|
110
109
|
hoverableControls,
|
|
@@ -118,7 +117,7 @@ export const CommentsThread = ({
|
|
|
118
117
|
) : (
|
|
119
118
|
<ThreadComponent.Header>{thread.name}</ThreadComponent.Header>
|
|
120
119
|
)}
|
|
121
|
-
<div
|
|
120
|
+
<div className={buttonGroupClassNames}>
|
|
122
121
|
{thread.status === 'staged' && <Tag palette='neutral'>{t('draft.button')}</Tag>}
|
|
123
122
|
{onResolve && !(thread?.status === 'staged') && (
|
|
124
123
|
<IconButton
|
|
@@ -166,7 +165,7 @@ export const CommentsThread = ({
|
|
|
166
165
|
|
|
167
166
|
<ThreadComponent.Status activity={activity}>{t('activity.message')}</ThreadComponent.Status>
|
|
168
167
|
|
|
169
|
-
<div
|
|
168
|
+
<div className='h-px -mt-px' ref={threadScrollRef} />
|
|
170
169
|
</ThreadComponent.Root>
|
|
171
170
|
);
|
|
172
171
|
};
|
|
@@ -82,7 +82,10 @@ export const MessagePanel = ({
|
|
|
82
82
|
(message.sender.identityDid && member.identity.did === message.sender.identityDid) ||
|
|
83
83
|
(message.sender.identityKey && PublicKey.equals(member.identity.identityKey, message.sender.identityKey)),
|
|
84
84
|
)?.identity;
|
|
85
|
-
|
|
85
|
+
// Pass `message.sender` as the fallback so externally-synced messages
|
|
86
|
+
// (Slack, etc.) display the source-side sender name instead of "Anonymous"
|
|
87
|
+
// when no DXOS identity matches.
|
|
88
|
+
const messageMetadata = getMessageMetadata(message.id, senderIdentity, message.sender);
|
|
86
89
|
const userIsAuthor = identity?.did === messageMetadata.authorId;
|
|
87
90
|
const proposalBlock = message.blocks.find((block) => block._tag === 'proposal');
|
|
88
91
|
const references = message.blocks.filter((block) => block._tag === 'reference').map((block) => block.reference);
|
|
@@ -90,7 +93,7 @@ export const MessagePanel = ({
|
|
|
90
93
|
return (
|
|
91
94
|
<MessageRoot {...messageMetadata} classNames={[hoverableControls, hoverableFocusedWithinControls]}>
|
|
92
95
|
<MessageHeading authorName={messageMetadata.authorName} timestamp={messageMetadata.timestamp}>
|
|
93
|
-
<div
|
|
96
|
+
<div className={buttonGroupClassNames}>
|
|
94
97
|
{userIsAuthor && editable && (
|
|
95
98
|
<IconButton
|
|
96
99
|
data-testid={editing ? 'thread.message.save' : 'thread.message.edit'}
|
|
@@ -188,15 +191,11 @@ const TextboxBlock = ({
|
|
|
188
191
|
editing && view?.focus();
|
|
189
192
|
}, [editing, view]);
|
|
190
193
|
|
|
191
|
-
return <div
|
|
194
|
+
return <div ref={parentRef} className='me-4' {...focusAttributes} />;
|
|
192
195
|
};
|
|
193
196
|
|
|
194
197
|
const ProposalBlock = ({ block }: { block: ContentBlock.Proposal }) => {
|
|
195
|
-
return
|
|
196
|
-
<div role='none' className='me-4 italic'>
|
|
197
|
-
{block.text}
|
|
198
|
-
</div>
|
|
199
|
-
);
|
|
198
|
+
return <div className='me-4 italic'>{block.text}</div>;
|
|
200
199
|
};
|
|
201
200
|
|
|
202
201
|
const MessageBlockObjectTile = forwardRef<HTMLDivElement, { subject: Obj.Unknown }>(({ subject }, forwardedRef) => {
|
|
@@ -13,7 +13,6 @@ import { type Settings } from '#types';
|
|
|
13
13
|
|
|
14
14
|
export type ThreadSettingsProps = AppSurface.SettingsArticleProps<Settings.Settings>;
|
|
15
15
|
|
|
16
|
-
// TODO(burdon): Settings.
|
|
17
16
|
export const ThreadSettings = ({ settings: _settings }: ThreadSettingsProps) => {
|
|
18
17
|
const { t: _t } = useTranslation(meta.id);
|
|
19
18
|
return <SettingsForm.Viewport></SettingsForm.Viewport>;
|
package/src/components/index.ts
CHANGED
|
@@ -9,36 +9,36 @@ import React from 'react';
|
|
|
9
9
|
import { Capability } from '@dxos/app-framework';
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
11
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
12
|
-
import { Feed } from '@dxos/echo';
|
|
12
|
+
import { Feed, Query } from '@dxos/echo';
|
|
13
13
|
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
14
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
14
|
+
import { ClientPlugin } from '@dxos/plugin-client/testing';
|
|
15
15
|
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
16
|
-
import { SpacePlugin } from '@dxos/plugin-space';
|
|
16
|
+
import { SpacePlugin } from '@dxos/plugin-space/testing';
|
|
17
17
|
import { corePlugins } from '@dxos/plugin-testing';
|
|
18
18
|
import { Config } from '@dxos/react-client';
|
|
19
|
-
import {
|
|
19
|
+
import { useQuery, useSpaces } from '@dxos/react-client/echo';
|
|
20
20
|
import { withLayout, withTheme, Loading } from '@dxos/react-ui/testing';
|
|
21
21
|
import { Channel, Message, Thread } from '@dxos/types';
|
|
22
22
|
|
|
23
23
|
import { translations } from '#translations';
|
|
24
24
|
|
|
25
25
|
import { ThreadPlugin } from '../../ThreadPlugin';
|
|
26
|
-
import {
|
|
26
|
+
import { ChannelArticle, type ChannelArticleProps } from './ChannelArticle';
|
|
27
27
|
|
|
28
28
|
// TODO(wittjosiah): Channel doesn't render full height.
|
|
29
|
-
const DefaultStory = ({ roomId }:
|
|
29
|
+
const DefaultStory = ({ roomId }: ChannelArticleProps) => {
|
|
30
30
|
const [space] = useSpaces();
|
|
31
31
|
const [channel] = useQuery(space?.db, Query.type(Channel.Channel));
|
|
32
32
|
if (!channel) {
|
|
33
33
|
return <Loading data={{ channel }} />;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
return <
|
|
36
|
+
return <ChannelArticle subject={channel} attendableId='story' roomId={roomId} role='article' />;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
const meta = {
|
|
40
|
-
title: 'plugins/plugin-thread/containers/
|
|
41
|
-
component:
|
|
40
|
+
title: 'plugins/plugin-thread/containers/ChannelArticle',
|
|
41
|
+
component: ChannelArticle,
|
|
42
42
|
render: DefaultStory,
|
|
43
43
|
decorators: [
|
|
44
44
|
withTheme(),
|
|
@@ -88,7 +88,7 @@ const meta = {
|
|
|
88
88
|
parameters: {
|
|
89
89
|
translations,
|
|
90
90
|
},
|
|
91
|
-
} satisfies Meta<typeof
|
|
91
|
+
} satisfies Meta<typeof ChannelArticle>;
|
|
92
92
|
|
|
93
93
|
export default meta;
|
|
94
94
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
9
|
+
import { Panel } from '@dxos/react-ui';
|
|
10
|
+
import { type Channel } from '@dxos/types';
|
|
11
|
+
|
|
12
|
+
import { ChannelChat } from '../ChannelChat';
|
|
13
|
+
|
|
14
|
+
export type ChannelArticleProps = AppSurface.ObjectArticleProps<
|
|
15
|
+
Channel.Channel | undefined,
|
|
16
|
+
{
|
|
17
|
+
roomId?: string;
|
|
18
|
+
fullscreen?: boolean;
|
|
19
|
+
}
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Renders the channel chat. The "Start video call" action and the in-call surface
|
|
24
|
+
* are contributed by plugin-calls — this container is call-agnostic.
|
|
25
|
+
*/
|
|
26
|
+
// TODO(burdon): Create Radix style layout.
|
|
27
|
+
// TODO(burdon): Restore graph-driven toolbar so plugin-calls can contribute a "Start video call" action (F-1.1).
|
|
28
|
+
export const ChannelArticle = ({ subject: channel }: ChannelArticleProps) => {
|
|
29
|
+
const space = getSpace(channel);
|
|
30
|
+
|
|
31
|
+
if (channel && space) {
|
|
32
|
+
return (
|
|
33
|
+
<Panel.Root classNames='dx-document'>
|
|
34
|
+
<Panel.Content asChild>
|
|
35
|
+
<ChannelChat classNames='border' space={space} channel={channel} />
|
|
36
|
+
</Panel.Content>
|
|
37
|
+
</Panel.Root>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
@@ -13,7 +13,7 @@ import { composable, composableProps } from '@dxos/ui-theme';
|
|
|
13
13
|
|
|
14
14
|
import { Chat } from '#components';
|
|
15
15
|
import { useStatus } from '#hooks';
|
|
16
|
-
import { ThreadOperation } from '#
|
|
16
|
+
import { ThreadOperation } from '#types';
|
|
17
17
|
|
|
18
18
|
export type ChannelChatProps = {
|
|
19
19
|
space: Space;
|
|
@@ -24,6 +24,10 @@ export type ChannelChatProps = {
|
|
|
24
24
|
* Channel chat: composer pinned to the bottom of the panel, messages scrolling
|
|
25
25
|
* above it (newest at the bottom). Threading via `Message.threadId` is
|
|
26
26
|
* intentionally not reconstructed in this round.
|
|
27
|
+
*
|
|
28
|
+
* Externally-synced channels (any Channel carrying foreign-key `Obj.Meta`,
|
|
29
|
+
* e.g. Slack/Discord-sourced rooms) render read-only — the composer is
|
|
30
|
+
* suppressed because there's no local-write path back to the source.
|
|
27
31
|
*/
|
|
28
32
|
export const ChannelChat = composable<HTMLDivElement, ChannelChatProps>(
|
|
29
33
|
({ space, channel, ...props }, forwardedRef) => {
|
|
@@ -37,9 +41,14 @@ export const ChannelChat = composable<HTMLDivElement, ChannelChatProps>(
|
|
|
37
41
|
const messages = useQuery(
|
|
38
42
|
space.db,
|
|
39
43
|
feed ? Query.select(Filter.type(Message.Message)).from(feed) : Query.select(Filter.nothing()),
|
|
40
|
-
)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const readOnly = Obj.getMeta(channel).keys.length > 0;
|
|
41
47
|
|
|
42
48
|
const handleSend = (text: string) => {
|
|
49
|
+
if (readOnly) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
43
52
|
void invokePromise(ThreadOperation.AppendChannelMessage, {
|
|
44
53
|
channel,
|
|
45
54
|
sender: { identityDid: identity.did },
|
|
@@ -58,6 +67,7 @@ export const ChannelChat = composable<HTMLDivElement, ChannelChatProps>(
|
|
|
58
67
|
activity={activity}
|
|
59
68
|
onSend={handleSend}
|
|
60
69
|
orientation='bottom'
|
|
70
|
+
readOnly={readOnly}
|
|
61
71
|
ref={forwardedRef}
|
|
62
72
|
/>
|
|
63
73
|
);
|
|
@@ -6,11 +6,11 @@ import { useAtomValue } from '@effect-atom/atom-react';
|
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Capabilities } from '@dxos/app-framework';
|
|
9
|
-
import { useCapabilities, useCapability, useOperationInvoker
|
|
9
|
+
import { useCapabilities, useCapability, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
10
10
|
import { AppCapabilities, CollaborationOperation, LayoutOperation } from '@dxos/app-toolkit';
|
|
11
11
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
12
|
-
import { Filter, Obj, Query, Relation } from '@dxos/echo';
|
|
13
|
-
import {
|
|
12
|
+
import { Filter, Obj, Query, Ref, Relation } from '@dxos/echo';
|
|
13
|
+
import { useQuery } from '@dxos/react-client/echo';
|
|
14
14
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
15
15
|
import { Panel, ScrollArea, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
16
16
|
import { getParentId, useAttention } from '@dxos/react-ui-attention';
|
|
@@ -19,7 +19,7 @@ import { AnchoredTo, Thread } from '@dxos/types';
|
|
|
19
19
|
|
|
20
20
|
import { CommentsPanel, type CommentsPanelProps } from '#components';
|
|
21
21
|
import { meta } from '#meta';
|
|
22
|
-
import { ThreadOperation } from '#
|
|
22
|
+
import { ThreadOperation } from '#types';
|
|
23
23
|
import { ThreadCapabilities, type ViewState } from '#types';
|
|
24
24
|
|
|
25
25
|
const initialViewState: ViewState = { showResolvedThreads: false };
|
|
@@ -33,7 +33,6 @@ export type ThreadCompanionProps = AppSurface.ObjectArticleProps<
|
|
|
33
33
|
|
|
34
34
|
export const ThreadCompanion = ({ attendableId, subject }: ThreadCompanionProps) => {
|
|
35
35
|
const { t } = useTranslation(meta.id);
|
|
36
|
-
const manager = usePluginManager();
|
|
37
36
|
const { invokePromise } = useOperationInvoker();
|
|
38
37
|
const identity = useIdentity();
|
|
39
38
|
const subjectId = Obj.getDXN(subject).toString();
|
|
@@ -66,6 +65,7 @@ export const ThreadCompanion = ({ attendableId, subject }: ThreadCompanionProps)
|
|
|
66
65
|
[registry, viewStoreAtom, subjectId],
|
|
67
66
|
);
|
|
68
67
|
|
|
68
|
+
const commentConfigs = useCapabilities(AppCapabilities.CommentConfig);
|
|
69
69
|
const anchorSorts = useCapabilities(AppCapabilities.AnchorSort);
|
|
70
70
|
const sort = useMemo(
|
|
71
71
|
() => anchorSorts.find(({ key }) => key === Obj.getTypename(subject))?.sort,
|
|
@@ -93,14 +93,12 @@ export const ThreadCompanion = ({ attendableId, subject }: ThreadCompanionProps)
|
|
|
93
93
|
// Scroll plank into view (deck handler).
|
|
94
94
|
void invokePromise(LayoutOperation.ScrollIntoView, { subject: parentId });
|
|
95
95
|
|
|
96
|
-
// Scroll within content to anchor (
|
|
96
|
+
// Scroll within content to anchor (comment config per typename).
|
|
97
97
|
if (anchor.anchor && parentId) {
|
|
98
98
|
const typename = Obj.getTypename(subject);
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
.
|
|
102
|
-
if (metadata?.scrollToAnchor) {
|
|
103
|
-
void invokePromise(metadata.scrollToAnchor, {
|
|
99
|
+
const commentConfig = commentConfigs.find(({ id }) => id === typename);
|
|
100
|
+
if (commentConfig?.scrollToAnchor) {
|
|
101
|
+
void invokePromise(commentConfig.scrollToAnchor, {
|
|
104
102
|
subject: parentId,
|
|
105
103
|
cursor: anchor.anchor,
|
|
106
104
|
ref: threadId,
|
|
@@ -109,7 +107,7 @@ export const ThreadCompanion = ({ attendableId, subject }: ThreadCompanionProps)
|
|
|
109
107
|
}
|
|
110
108
|
}
|
|
111
109
|
},
|
|
112
|
-
[state.current, invokePromise, registry, stateAtom, parentId, subject,
|
|
110
|
+
[state.current, invokePromise, registry, stateAtom, parentId, subject, commentConfigs],
|
|
113
111
|
);
|
|
114
112
|
|
|
115
113
|
const handleComment = useCallback(
|
package/src/containers/index.ts
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { type ComponentType, lazy } from 'react';
|
|
6
6
|
|
|
7
|
-
export const CallDebugPanel: ComponentType<any> = lazy(() => import('./CallDebugPanel'));
|
|
8
|
-
export const CallSidebar: ComponentType<any> = lazy(() => import('./CallSidebar'));
|
|
9
7
|
export const ChannelChat: ComponentType<any> = lazy(() => import('./ChannelChat'));
|
|
10
|
-
export const
|
|
8
|
+
export const ChannelArticle: ComponentType<any> = lazy(() => import('./ChannelArticle'));
|
|
11
9
|
export const ThreadContainer: ComponentType<any> = lazy(() => import('./ThreadContainer'));
|
|
12
10
|
export const ThreadCompanion: ComponentType<any> = lazy(() => import('./ThreadCompanion'));
|
|
@@ -29,7 +29,7 @@ const parser = StreamLanguage.define<{ count: number }>({
|
|
|
29
29
|
const styles = HighlightStyle.define([
|
|
30
30
|
{
|
|
31
31
|
tag: tags.tagName,
|
|
32
|
-
class: mx('dx-tag dx-tag--indigo text-base-
|
|
32
|
+
class: mx('dx-tag dx-tag--indigo text-base-foreground font-medium'),
|
|
33
33
|
},
|
|
34
34
|
]);
|
|
35
35
|
|
|
@@ -9,11 +9,11 @@ import { type Atom, type Registry } from '@effect-atom/atom-react';
|
|
|
9
9
|
import { Filter, Obj, Query, Relation } from '@dxos/echo';
|
|
10
10
|
import { createDocAccessor, getTextInRange } from '@dxos/echo-db';
|
|
11
11
|
import { OperationInvoker } from '@dxos/operation';
|
|
12
|
-
import { type Markdown } from '@dxos/plugin-markdown
|
|
12
|
+
import { type Markdown } from '@dxos/plugin-markdown';
|
|
13
13
|
import { AnchoredTo, Thread } from '@dxos/types';
|
|
14
14
|
import { comments, createExternalCommentSync } from '@dxos/ui-editor';
|
|
15
15
|
|
|
16
|
-
import { ThreadOperation } from '#
|
|
16
|
+
import { ThreadOperation } from '#types';
|
|
17
17
|
import { type ThreadState } from '#types';
|
|
18
18
|
|
|
19
19
|
// TODO(burdon): Factor out.
|
package/src/hooks/analytics.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { useCallback } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { useOperationInvoker } from '@dxos/app-framework/ui';
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
9
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
10
10
|
import { useOnTransition } from '@dxos/react-ui';
|
|
11
11
|
import { type ContentBlock } from '@dxos/types';
|
|
12
12
|
|