@dxos/plugin-thread 0.8.4-main.72ec0f3 → 0.8.4-main.765dc60934
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/ThreadSettings-5MKTDK3A.mjs +15 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs.map +7 -0
- package/dist/lib/neutral/add-message-FBIROBEZ.mjs +87 -0
- 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/neutral/append-channel-message-FTFAD3PK.mjs +40 -0
- 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/neutral/chunk-5T5LPLBN.mjs +36 -0
- package/dist/lib/neutral/chunk-5T5LPLBN.mjs.map +7 -0
- package/dist/lib/{browser/chunk-K2DUJRFJ.mjs → neutral/chunk-7GHUS3IX.mjs} +4 -11
- 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-J5LGTIGS.mjs +10 -0
- package/dist/lib/{browser/chunk-CP7E2HRE.mjs → neutral/chunk-JLY4NVTA.mjs} +12 -5
- 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/neutral/chunk-PE7IH7EL.mjs +271 -0
- 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-QK4QZUR5.mjs +8 -0
- package/dist/lib/neutral/chunk-QK4QZUR5.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/neutral/create-OAQJ6LXN.mjs +52 -0
- package/dist/lib/neutral/create-OAQJ6LXN.mjs.map +7 -0
- package/dist/lib/neutral/create-channel-3E4FJ662.mjs +19 -0
- 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/neutral/create-proposals-GRYZXRMV.mjs +56 -0
- package/dist/lib/neutral/create-proposals-GRYZXRMV.mjs.map +7 -0
- package/dist/lib/neutral/delete-HCCG5RVR.mjs +57 -0
- package/dist/lib/neutral/delete-HCCG5RVR.mjs.map +7 -0
- package/dist/lib/neutral/delete-message-DHFRACB4.mjs +54 -0
- 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/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/on-create-space-OEBRKOAM.mjs +23 -0
- 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/neutral/restore-P4ZLXLF7.mjs +32 -0
- package/dist/lib/neutral/restore-P4ZLXLF7.mjs.map +7 -0
- package/dist/lib/neutral/restore-message-AUBOP2DF.mjs +33 -0
- package/dist/lib/neutral/restore-message-AUBOP2DF.mjs.map +7 -0
- package/dist/lib/neutral/select-LIVAMBCE.mjs +24 -0
- 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/neutral/toggle-resolved-RQBDQZSV.mjs +36 -0
- package/dist/lib/neutral/toggle-resolved-RQBDQZSV.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +90 -0
- 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 +3 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.test.d.ts +2 -0
- package/dist/types/src/ThreadPlugin.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -4
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- 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 +15 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +3 -2
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +5 -2
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +5 -5
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/Chat/Chat.d.ts +51 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +2 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts +13 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts +160 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts.map +1 -0
- package/dist/types/src/components/{CommentsThreadContainer.d.ts → CommentsPanel/CommentsThread.d.ts} +3 -3
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts +3 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts +15 -0
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -0
- package/dist/types/src/components/MessagePanel/index.d.ts +2 -0
- package/dist/types/src/components/MessagePanel/index.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts +6 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts +161 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/index.d.ts +2 -0
- package/dist/types/src/components/ThreadSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +5 -10
- 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/ChannelArticle/ChannelArticle.stories.d.ts +162 -0
- 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/ChannelArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts +20 -0
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelChat/index.d.ts +4 -0
- package/dist/types/src/containers/ChannelChat/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +8 -0
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +2 -0
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts +20 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.stories.d.ts +162 -0
- package/dist/types/src/containers/ThreadContainer/ThreadContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadContainer/index.d.ts +4 -0
- package/dist/types/src/containers/ThreadContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +6 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/{components/command-extension.d.ts → extensions/command.d.ts} +1 -1
- package/dist/types/src/extensions/command.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +1 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +9 -4
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts +1 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-message.d.ts +5 -0
- package/dist/types/src/operations/add-message.d.ts.map +1 -0
- package/dist/types/src/operations/append-channel-message.d.ts +5 -0
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -0
- package/dist/types/src/operations/create-channel.d.ts +5 -0
- package/dist/types/src/operations/create-channel.d.ts.map +1 -0
- package/dist/types/src/operations/create-proposals.d.ts +5 -0
- package/dist/types/src/operations/create-proposals.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/delete-message.d.ts +5 -0
- package/dist/types/src/operations/delete-message.d.ts.map +1 -0
- package/dist/types/src/operations/delete.d.ts +5 -0
- package/dist/types/src/operations/delete.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/on-create-space.d.ts +5 -0
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/restore-message.d.ts +5 -0
- package/dist/types/src/operations/restore-message.d.ts.map +1 -0
- package/dist/types/src/operations/restore.d.ts +5 -0
- package/dist/types/src/operations/restore.d.ts.map +1 -0
- package/dist/types/src/operations/select.d.ts +5 -0
- package/dist/types/src/operations/select.d.ts.map +1 -0
- package/dist/types/src/operations/toggle-resolved.d.ts +5 -0
- package/dist/types/src/operations/toggle-resolved.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/{components/testing.d.ts → testing/data.d.ts} +2 -2
- package/dist/types/src/testing/data.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +140 -138
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +5 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- 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/types/ThreadOperation.d.ts +1995 -0
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -368
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +6 -3
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +149 -90
- package/src/ThreadPlugin.node.ts +39 -0
- package/src/ThreadPlugin.test.ts +37 -0
- package/src/ThreadPlugin.tsx +42 -133
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +36 -0
- package/src/capabilities/app-graph-builder.ts +123 -174
- package/src/capabilities/blueprint-definition.ts +11 -30
- package/src/capabilities/create-object.ts +29 -0
- package/src/capabilities/index.ts +15 -12
- package/src/capabilities/markdown.ts +53 -38
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +64 -79
- package/src/capabilities/settings.ts +26 -12
- package/src/capabilities/state.ts +14 -18
- package/src/capabilities/undo-mappings.ts +46 -0
- package/src/components/Chat/Chat.tsx +258 -0
- package/src/components/Chat/index.ts +5 -0
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +95 -0
- package/src/components/{CommentsContainer.tsx → CommentsPanel/CommentsPanel.tsx} +16 -16
- package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +30 -33
- package/src/components/CommentsPanel/index.ts +6 -0
- package/src/components/{MessageContainer.tsx → MessagePanel/MessagePanel.tsx} +81 -45
- package/src/components/MessagePanel/index.ts +5 -0
- package/src/components/ThreadSettings/ThreadSettings.stories.tsx +32 -0
- package/src/components/ThreadSettings/ThreadSettings.tsx +19 -0
- package/src/components/ThreadSettings/index.ts +5 -0
- package/src/components/index.ts +5 -12
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +105 -0
- package/src/containers/ChannelArticle/ChannelArticle.tsx +42 -0
- package/src/containers/ChannelArticle/index.ts +5 -0
- package/src/containers/ChannelChat/ChannelChat.tsx +75 -0
- package/src/containers/ChannelChat/index.ts +8 -0
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +215 -0
- package/src/containers/ThreadCompanion/index.ts +5 -0
- package/src/{components/Chat.stories.tsx → containers/ThreadContainer/ThreadContainer.stories.tsx} +27 -26
- package/src/containers/ThreadContainer/ThreadContainer.tsx +75 -0
- package/src/containers/ThreadContainer/index.ts +8 -0
- package/src/containers/index.ts +10 -0
- package/src/{components/command-extension.ts → extensions/command.ts} +3 -3
- package/src/extensions/index.ts +1 -0
- package/src/extensions/threads.ts +80 -44
- package/src/hooks/analytics.ts +24 -20
- package/src/hooks/index.ts +0 -5
- package/src/index.ts +4 -4
- package/src/meta.ts +5 -6
- package/src/operations/add-message.ts +81 -0
- package/src/operations/append-channel-message.ts +37 -0
- package/src/operations/create-channel.ts +20 -0
- package/src/operations/create-proposals.ts +49 -0
- package/src/operations/create.ts +48 -0
- package/src/operations/delete-message.ts +53 -0
- package/src/operations/delete.ts +63 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/on-create-space.ts +27 -0
- package/src/operations/restore-message.ts +38 -0
- package/src/operations/restore.ts +38 -0
- package/src/operations/select.ts +24 -0
- package/src/operations/toggle-resolved.ts +41 -0
- package/src/plugin.ts +11 -0
- package/src/{components/testing.ts → testing/data.ts} +8 -10
- package/src/testing/index.ts +1 -1
- package/src/translations.ts +74 -76
- package/src/types/Settings.ts +10 -0
- package/src/types/ThreadCapabilities.ts +26 -0
- package/src/types/ThreadOperation.ts +178 -0
- package/src/types/index.ts +4 -2
- package/src/types/types.ts +2 -99
- package/src/util.ts +37 -5
- package/dist/lib/browser/ChannelContainer-MX5ABVGC.mjs +0 -16
- package/dist/lib/browser/ChatContainer-7F5Y6GXJ.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-HNYLII5E.mjs +0 -170
- package/dist/lib/browser/app-graph-builder-HNYLII5E.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-6BKYTMJS.mjs +0 -104
- package/dist/lib/browser/blueprint-definition-6BKYTMJS.mjs.map +0 -7
- package/dist/lib/browser/call-manager-MAXQLMMS.mjs +0 -24
- package/dist/lib/browser/call-manager-MAXQLMMS.mjs.map +0 -7
- package/dist/lib/browser/chunk-BBTXGRIR.mjs +0 -18
- package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +0 -7
- package/dist/lib/browser/chunk-BQWQFTWT.mjs +0 -612
- package/dist/lib/browser/chunk-BQWQFTWT.mjs.map +0 -7
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +0 -7
- package/dist/lib/browser/chunk-FR6MEAZI.mjs +0 -377
- package/dist/lib/browser/chunk-FR6MEAZI.mjs.map +0 -7
- package/dist/lib/browser/chunk-INQVAYPN.mjs +0 -989
- package/dist/lib/browser/chunk-INQVAYPN.mjs.map +0 -7
- package/dist/lib/browser/chunk-ISCHODBV.mjs +0 -106
- package/dist/lib/browser/chunk-ISCHODBV.mjs.map +0 -7
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-KOBXMDCI.mjs +0 -182
- package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +0 -7
- package/dist/lib/browser/chunk-NMJEVD36.mjs +0 -168
- package/dist/lib/browser/chunk-NMJEVD36.mjs.map +0 -7
- package/dist/lib/browser/chunk-OOUDK7Q7.mjs +0 -23
- package/dist/lib/browser/chunk-OOUDK7Q7.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZCW3NSDZ.mjs +0 -1793
- package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -312
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-BOUT4WGY.mjs +0 -361
- package/dist/lib/browser/intent-resolver-BOUT4WGY.mjs.map +0 -7
- package/dist/lib/browser/markdown-74EUSQGV.mjs +0 -171
- package/dist/lib/browser/markdown-74EUSQGV.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-root-BVG7B2LW.mjs +0 -28
- package/dist/lib/browser/react-root-BVG7B2LW.mjs.map +0 -7
- package/dist/lib/browser/react-surface-BCD5ODQ6.mjs +0 -110
- package/dist/lib/browser/react-surface-BCD5ODQ6.mjs.map +0 -7
- package/dist/lib/browser/settings-LGQUZITB.mjs +0 -22
- package/dist/lib/browser/settings-LGQUZITB.mjs.map +0 -7
- package/dist/lib/browser/state-36REWXO5.mjs +0 -34
- package/dist/lib/browser/state-36REWXO5.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -14
- package/dist/lib/node-esm/ChannelContainer-2JJJ3IDK.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-C526R4DI.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-SOCKP4ST.mjs +0 -171
- package/dist/lib/node-esm/app-graph-builder-SOCKP4ST.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-6LEAWSC7.mjs +0 -105
- package/dist/lib/node-esm/blueprint-definition-6LEAWSC7.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-LC4OS2KD.mjs +0 -25
- package/dist/lib/node-esm/call-manager-LC4OS2KD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5DLH4MWN.mjs +0 -25
- package/dist/lib/node-esm/chunk-5DLH4MWN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7KZWZS2U.mjs +0 -1794
- package/dist/lib/node-esm/chunk-7KZWZS2U.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs +0 -33
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JF7THR7F.mjs +0 -990
- package/dist/lib/node-esm/chunk-JF7THR7F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JJW6YMLC.mjs +0 -613
- package/dist/lib/node-esm/chunk-JJW6YMLC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PZH2EDU5.mjs +0 -183
- package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TJKM5JZT.mjs +0 -169
- package/dist/lib/node-esm/chunk-TJKM5JZT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TWKGDFCS.mjs +0 -378
- package/dist/lib/node-esm/chunk-TWKGDFCS.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs +0 -108
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs +0 -28
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +0 -19
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -313
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-45PLIFCJ.mjs +0 -362
- package/dist/lib/node-esm/intent-resolver-45PLIFCJ.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-566XXB55.mjs +0 -172
- package/dist/lib/node-esm/markdown-566XXB55.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-root-DCY6DKLC.mjs +0 -29
- package/dist/lib/node-esm/react-root-DCY6DKLC.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-WZH7OAO3.mjs +0 -111
- package/dist/lib/node-esm/react-surface-WZH7OAO3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-WKLJSP6R.mjs +0 -23
- package/dist/lib/node-esm/settings-WKLJSP6R.mjs.map +0 -7
- package/dist/lib/node-esm/state-X3W67GTL.mjs +0 -35
- package/dist/lib/node-esm/state-X3W67GTL.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -15
- package/dist/types/src/calls/call-manager.d.ts +0 -77
- 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 -24
- 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 -5
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -27
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/components/Call/Call.d.ts +0 -17
- 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/CallDebugPanel.d.ts +0 -15
- package/dist/types/src/components/CallDebugPanel.d.ts.map +0 -1
- package/dist/types/src/components/CallSidebar.d.ts +0 -4
- package/dist/types/src/components/CallSidebar.d.ts.map +0 -1
- package/dist/types/src/components/ChannelContainer.d.ts +0 -14
- package/dist/types/src/components/ChannelContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +0 -160
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chat.stories.d.ts +0 -160
- package/dist/types/src/components/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -18
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -158
- package/dist/types/src/components/Comments.stories.d.ts.map +0 -1
- package/dist/types/src/components/CommentsContainer.d.ts +0 -13
- package/dist/types/src/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts +0 -15
- 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/MessageContainer.d.ts +0 -14
- package/dist/types/src/components/MessageContainer.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/ResponsiveContainer.d.ts +0 -12
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -162
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.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 -176
- 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/index.d.ts +0 -4
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +0 -1
- package/dist/types/src/components/ThreadCompanion.d.ts +0 -5
- package/dist/types/src/components/ThreadCompanion.d.ts.map +0 -1
- package/dist/types/src/components/ThreadSettings.d.ts +0 -6
- package/dist/types/src/components/ThreadSettings.d.ts.map +0 -1
- package/dist/types/src/components/command-extension.d.ts.map +0 -1
- package/dist/types/src/components/testing.d.ts.map +0 -1
- package/dist/types/src/functions/create-proposals.d.ts +0 -6
- package/dist/types/src/functions/create-proposals.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -2
- package/dist/types/src/functions/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/testing/stories.d.ts +0 -2
- package/dist/types/src/testing/stories.d.ts.map +0 -1
- package/dist/types/src/types/Channel.d.ts +0 -16
- package/dist/types/src/types/Channel.d.ts.map +0 -1
- package/dist/types/src/types/Thread.d.ts +0 -167
- package/dist/types/src/types/Thread.d.ts.map +0 -1
- package/src/calls/call-manager.ts +0 -246
- 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 -581
- 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 -127
- package/src/calls/util/task-scheduling.ts +0 -92
- package/src/calls-service.stories.tsx +0 -229
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -311
- package/src/capabilities/react-root.tsx +0 -17
- package/src/components/Call/Call.tsx +0 -89
- package/src/components/Call/Toolbar.tsx +0 -182
- package/src/components/Call/index.ts +0 -6
- package/src/components/CallDebugPanel.tsx +0 -172
- package/src/components/CallSidebar.tsx +0 -18
- package/src/components/ChannelContainer.stories.tsx +0 -59
- package/src/components/ChannelContainer.tsx +0 -205
- package/src/components/ChatContainer.tsx +0 -154
- package/src/components/Comments.stories.tsx +0 -91
- package/src/components/Lobby/Lobby.tsx +0 -119
- package/src/components/Lobby/index.ts +0 -5
- package/src/components/Media/AudioStream.tsx +0 -67
- package/src/components/Media/VideoObject.stories.tsx +0 -60
- package/src/components/Media/VideoObject.tsx +0 -58
- package/src/components/Media/index.ts +0 -6
- package/src/components/Participant/Participant.tsx +0 -63
- package/src/components/Participant/ParticipantGrid.tsx +0 -89
- package/src/components/Participant/index.ts +0 -6
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +0 -54
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +0 -31
- 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/index.ts +0 -7
- package/src/components/ThreadCompanion.tsx +0 -188
- package/src/components/ThreadSettings.tsx +0 -16
- package/src/functions/create-proposals.ts +0 -58
- package/src/functions/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/testing/stories.ts +0 -51
- package/src/types/Channel.ts +0 -27
- package/src/types/Thread.ts +0 -26
- package/src/typings/peermetrics-webrtc-stats.d.ts +0 -46
- package/src/typings.d.ts +0 -8
- /package/dist/lib/{browser/ChannelContainer-MX5ABVGC.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/ChatContainer-7F5Y6GXJ.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/ChannelContainer-2JJJ3IDK.mjs.map → neutral/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChatContainer-C526R4DI.mjs.map → neutral/meta.mjs.map} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
|
+
|
|
7
|
+
export const ThreadOperationHandlerSet = OperationHandlerSet.lazy(
|
|
8
|
+
() => import('./add-message'),
|
|
9
|
+
() => import('./append-channel-message'),
|
|
10
|
+
() => import('./create'),
|
|
11
|
+
() => import('./create-channel'),
|
|
12
|
+
() => import('./create-proposals'),
|
|
13
|
+
() => import('./delete'),
|
|
14
|
+
() => import('./delete-message'),
|
|
15
|
+
() => import('./on-create-space'),
|
|
16
|
+
() => import('./restore'),
|
|
17
|
+
() => import('./restore-message'),
|
|
18
|
+
() => import('./select'),
|
|
19
|
+
() => import('./toggle-resolved'),
|
|
20
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
|
|
9
|
+
import { ThreadOperation } from '../types';
|
|
10
|
+
|
|
11
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.OnCreateSpace> = ThreadOperation.OnCreateSpace.pipe(
|
|
12
|
+
Operation.withHandler(
|
|
13
|
+
Effect.fnUntraced(function* ({ space, isDefault }) {
|
|
14
|
+
if (isDefault) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const { object: channel } = yield* Operation.invoke(ThreadOperation.CreateChannel, {
|
|
19
|
+
name: 'General',
|
|
20
|
+
spaceId: space.id,
|
|
21
|
+
});
|
|
22
|
+
space.db.add(channel);
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export default handler;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Obj, Ref, Relation } from '@dxos/echo';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
|
+
import { Thread } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { ThreadOperation } from '../types';
|
|
14
|
+
|
|
15
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.RestoreMessage> = ThreadOperation.RestoreMessage.pipe(
|
|
16
|
+
Operation.withHandler(
|
|
17
|
+
Effect.fnUntraced(function* ({ anchor, message, messageIndex }) {
|
|
18
|
+
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
19
|
+
const db = Obj.getDatabase(thread);
|
|
20
|
+
invariant(db, 'Database not found');
|
|
21
|
+
|
|
22
|
+
Obj.update(thread, (thread) => {
|
|
23
|
+
thread.messages.splice(messageIndex, 0, Ref.make(message));
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
27
|
+
name: 'threads.message.undo-delete',
|
|
28
|
+
properties: {
|
|
29
|
+
spaceId: db.spaceId,
|
|
30
|
+
threadId: thread.id,
|
|
31
|
+
messageId: message.id,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}),
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export default handler;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { sleep } from '@dxos/async';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Obj } from '@dxos/echo';
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
|
+
|
|
12
|
+
import { ThreadOperation } from '../types';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.Restore> = ThreadOperation.Restore.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* ({ thread, anchor }) {
|
|
17
|
+
const db = Obj.getDatabase(thread);
|
|
18
|
+
if (!db) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// TODO(wittjosiah): Without sleep, rendering crashes at `Relation.setSource(anchor)`.
|
|
23
|
+
db.add(thread);
|
|
24
|
+
yield* Effect.promise(() => sleep(100));
|
|
25
|
+
db.add(anchor);
|
|
26
|
+
|
|
27
|
+
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
28
|
+
name: 'threads.undo-delete',
|
|
29
|
+
properties: {
|
|
30
|
+
spaceId: db.spaceId,
|
|
31
|
+
threadId: thread.id,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}),
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export default handler;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { ThreadCapabilities } from '../types';
|
|
11
|
+
import { ThreadOperation } from '../types';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.Select> = ThreadOperation.Select.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (input) {
|
|
16
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
17
|
+
const stateAtom = yield* Capability.get(ThreadCapabilities.State);
|
|
18
|
+
const current = registry.get(stateAtom);
|
|
19
|
+
registry.set(stateAtom, { ...current, current: input.current });
|
|
20
|
+
}),
|
|
21
|
+
),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default handler;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Obj } from '@dxos/echo';
|
|
9
|
+
import { invariant } from '@dxos/invariant';
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
|
+
|
|
12
|
+
import { ThreadOperation } from '../types';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.ToggleResolved> = ThreadOperation.ToggleResolved.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* (input) {
|
|
17
|
+
const thread = input.thread;
|
|
18
|
+
|
|
19
|
+
Obj.update(thread, (thread) => {
|
|
20
|
+
if (thread.status === 'active' || thread.status === undefined) {
|
|
21
|
+
thread.status = 'resolved';
|
|
22
|
+
} else if (thread.status === 'resolved') {
|
|
23
|
+
thread.status = 'active';
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const db = Obj.getDatabase(thread);
|
|
28
|
+
invariant(db, 'Database not found');
|
|
29
|
+
|
|
30
|
+
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
31
|
+
name: 'threads.toggle-resolved',
|
|
32
|
+
properties: {
|
|
33
|
+
spaceId: db.spaceId,
|
|
34
|
+
threadId: thread.id,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}),
|
|
38
|
+
),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export default handler;
|
package/src/plugin.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const ThreadPlugin = Plugin.lazy(meta, () => import('#plugin'));
|
|
10
|
+
|
|
11
|
+
export { ThreadOperationHandlerSet } from './operations';
|
|
@@ -4,24 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
import { Obj, Ref } from '@dxos/echo';
|
|
6
6
|
import { IdentityDid } from '@dxos/keys';
|
|
7
|
-
import {
|
|
7
|
+
import { random } from '@dxos/random';
|
|
8
8
|
import { type Identity } from '@dxos/react-client/halo';
|
|
9
|
-
import { Message } from '@dxos/types';
|
|
10
|
-
|
|
11
|
-
import { Thread } from '../types';
|
|
9
|
+
import { Message, Thread } from '@dxos/types';
|
|
12
10
|
|
|
13
11
|
export const createCommentThread = (identity: Identity): Thread.Thread => {
|
|
14
12
|
return Thread.make({
|
|
15
13
|
name: 'Comment',
|
|
16
|
-
messages:
|
|
14
|
+
messages: random.helpers.multiple(
|
|
17
15
|
() =>
|
|
18
16
|
Ref.make(
|
|
19
17
|
Obj.make(Message.Message, {
|
|
20
18
|
created: new Date().toISOString(),
|
|
21
19
|
sender: {
|
|
22
|
-
identityDid:
|
|
20
|
+
identityDid: random.datatype.boolean() ? identity.did : IdentityDid.random(),
|
|
23
21
|
},
|
|
24
|
-
blocks: [{ _tag: 'text', text:
|
|
22
|
+
blocks: [{ _tag: 'text', text: random.lorem.sentences(3) }],
|
|
25
23
|
}),
|
|
26
24
|
),
|
|
27
25
|
{ count: { min: 2, max: 3 } },
|
|
@@ -33,15 +31,15 @@ export const createCommentThread = (identity: Identity): Thread.Thread => {
|
|
|
33
31
|
export const createProposalThread = (identity: Identity): Thread.Thread => {
|
|
34
32
|
return Thread.make({
|
|
35
33
|
name: 'Proposal',
|
|
36
|
-
messages:
|
|
34
|
+
messages: random.helpers.multiple(
|
|
37
35
|
() =>
|
|
38
36
|
Ref.make(
|
|
39
37
|
Obj.make(Message.Message, {
|
|
40
38
|
created: new Date().toISOString(),
|
|
41
39
|
sender: {
|
|
42
|
-
identityDid:
|
|
40
|
+
identityDid: random.datatype.boolean() ? identity.did : IdentityDid.random(),
|
|
43
41
|
},
|
|
44
|
-
blocks: [{ _tag: 'proposal', text:
|
|
42
|
+
blocks: [{ _tag: 'proposal', text: random.lorem.sentences(3) }],
|
|
45
43
|
}),
|
|
46
44
|
),
|
|
47
45
|
{ count: { min: 1, max: 1 } },
|
package/src/testing/index.ts
CHANGED
package/src/translations.ts
CHANGED
|
@@ -2,97 +2,95 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Type } from '@dxos/echo';
|
|
6
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
|
+
import { Channel } from '@dxos/types';
|
|
7
7
|
|
|
8
|
-
import { meta } from '
|
|
9
|
-
import { Channel } from './types';
|
|
8
|
+
import { meta } from '#meta';
|
|
10
9
|
|
|
11
10
|
export const translations = [
|
|
12
11
|
{
|
|
13
12
|
'en-US': {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'typename
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
13
|
+
// TODO(burdon): Thread.
|
|
14
|
+
[Channel.Channel.typename]: {
|
|
15
|
+
'typename.label': 'Channel',
|
|
16
|
+
'typename.label_zero': 'Channels',
|
|
17
|
+
'typename.label_one': 'Channel',
|
|
18
|
+
'typename.label_other': 'Channels',
|
|
19
|
+
'object-name.placeholder': 'New channel',
|
|
20
|
+
'add-object.label': 'Add channel',
|
|
21
|
+
'rename-object.label': 'Rename channel',
|
|
22
|
+
'delete-object.label': 'Delete channel',
|
|
23
|
+
'object-deleted.label': 'Channel deleted',
|
|
22
24
|
},
|
|
23
25
|
[meta.id]: {
|
|
24
|
-
'plugin
|
|
25
|
-
'channel
|
|
26
|
-
'message
|
|
27
|
-
'activity
|
|
28
|
-
'anonymous
|
|
29
|
-
'delete
|
|
30
|
-
'detached
|
|
31
|
-
'delete
|
|
32
|
-
'resolve
|
|
33
|
-
'thread
|
|
34
|
-
'message
|
|
35
|
-
'comments
|
|
36
|
-
'chat
|
|
37
|
-
'draft
|
|
38
|
-
'no
|
|
39
|
-
'no
|
|
26
|
+
'plugin.name': 'Chat',
|
|
27
|
+
'channel-title.label': 'Title',
|
|
28
|
+
'message.placeholder': 'Reply…',
|
|
29
|
+
'activity.message': 'Processing…',
|
|
30
|
+
'anonymous.label': 'Anonymous',
|
|
31
|
+
'delete-message-block.label': 'Delete message block',
|
|
32
|
+
'detached-thread.label': 'Referenced content was removed',
|
|
33
|
+
'delete-thread.label': 'Delete thread',
|
|
34
|
+
'resolve-thread.label': 'Resolve thread',
|
|
35
|
+
'thread-deleted.label': 'Thread deleted',
|
|
36
|
+
'message-deleted.label': 'Message deleted',
|
|
37
|
+
'comments.heading': 'Comments',
|
|
38
|
+
'chat.heading': 'Chat',
|
|
39
|
+
'draft.button': 'DRAFT',
|
|
40
|
+
'no-comments.title': 'Comments',
|
|
41
|
+
'no-comments.message':
|
|
40
42
|
'Click on the <commentIcon></commentIcon> button in the document toolbar to create a comment thread on the selected text.',
|
|
41
|
-
'toggle
|
|
42
|
-
'unnamed
|
|
43
|
-
'mark
|
|
44
|
-
'mark
|
|
45
|
-
'save
|
|
46
|
-
'edit
|
|
47
|
-
'delete
|
|
48
|
-
'accept
|
|
49
|
-
'open
|
|
50
|
-
'comments
|
|
51
|
-
'show
|
|
52
|
-
'show
|
|
43
|
+
'toggle-show-resolved.label': 'Show resolved',
|
|
44
|
+
'unnamed-object-threads.label': 'Threads',
|
|
45
|
+
'mark-as-resolved.label': 'Mark as resolved',
|
|
46
|
+
'mark-as-unresolved.label': 'Mark as unresolved',
|
|
47
|
+
'save-message.label': 'Save',
|
|
48
|
+
'edit-message.label': 'Edit',
|
|
49
|
+
'delete-message.label': 'Delete message',
|
|
50
|
+
'accept-proposal.label': 'Accept proposal',
|
|
51
|
+
'open-comments-panel.label': 'Show Comments',
|
|
52
|
+
'comments.label': 'Comments',
|
|
53
|
+
'show-all.label': 'All comments',
|
|
54
|
+
'show-unresolved.label': 'Unresolved comments',
|
|
55
|
+
'add-comment.label': 'Add comment',
|
|
53
56
|
|
|
54
|
-
'channel
|
|
55
|
-
'call
|
|
57
|
+
'channel-companion.label': 'Channel',
|
|
58
|
+
'call-panel.label': 'Active Call',
|
|
56
59
|
|
|
57
|
-
'display
|
|
58
|
-
'display
|
|
59
|
-
'display
|
|
60
|
-
'set
|
|
60
|
+
'display-name.label': 'Display name',
|
|
61
|
+
'display-name.description': 'Set your display name before joining a meeting.',
|
|
62
|
+
'display-name-input.placeholder': 'Enter your name',
|
|
63
|
+
'set-display-name.label': 'Continue',
|
|
61
64
|
|
|
62
|
-
'call
|
|
63
|
-
'meeting
|
|
64
|
-
'share
|
|
65
|
-
'show
|
|
66
|
-
'show
|
|
65
|
+
'call-tab.label': 'Call',
|
|
66
|
+
'meeting-status.title': 'Calls',
|
|
67
|
+
'share-meeting-link.label': 'Share meeting',
|
|
68
|
+
'show-webrtc-stats.title': 'WebRTC Stats',
|
|
69
|
+
'show-calls-history.title': 'Service History',
|
|
67
70
|
|
|
68
|
-
'meeting
|
|
69
|
-
'summarize
|
|
70
|
-
'summarizing
|
|
71
|
-
'create
|
|
71
|
+
'meeting-summary.label': 'Summary',
|
|
72
|
+
'summarize.label': 'Summarize',
|
|
73
|
+
'summarizing.label': 'Creating summary...',
|
|
74
|
+
'create-summary.message': 'A summary doesn’t exist for this meeting yet. Create one now?',
|
|
72
75
|
|
|
73
|
-
'
|
|
74
|
-
'
|
|
76
|
+
'icon-pin.label': 'Pin video',
|
|
77
|
+
'icon-unpin.label': 'Unpin video',
|
|
78
|
+
'icon-wave.label': 'Waving',
|
|
79
|
+
'icon-muted.label': 'Muted',
|
|
80
|
+
'join-call.button': 'Join',
|
|
81
|
+
'leave-call.button': 'Leave',
|
|
82
|
+
'mic-on.button': 'Unmute',
|
|
83
|
+
'mic-off.button': 'Mute',
|
|
84
|
+
'camera-on.button': 'Turn camera on',
|
|
85
|
+
'camera-off.button': 'Turn camera off',
|
|
86
|
+
'camera-off.label': 'Camera off',
|
|
87
|
+
'raise-hand.button': 'Raise hand',
|
|
88
|
+
'lower-hand.button': 'Lower hand',
|
|
89
|
+
'screenshare-on.button': 'Share screen',
|
|
90
|
+
'screenshare-off.button': 'Stop streaming',
|
|
75
91
|
|
|
76
|
-
'
|
|
77
|
-
'
|
|
78
|
-
'lobby participants_other': '{{count}} participants',
|
|
79
|
-
|
|
80
|
-
'icon pin': 'Pin video',
|
|
81
|
-
'icon unpin': 'Unpin video',
|
|
82
|
-
'icon wave': 'Waving',
|
|
83
|
-
'icon muted': 'Muted',
|
|
84
|
-
'icon speaking': 'Speaking',
|
|
85
|
-
|
|
86
|
-
'mic on': 'Unmute',
|
|
87
|
-
'mic off': 'Mute',
|
|
88
|
-
'camera on': 'Turn camera on',
|
|
89
|
-
'camera off': 'Turn camera off',
|
|
90
|
-
'camera off label': 'Camera off',
|
|
91
|
-
|
|
92
|
-
'raise hand': 'Raise hand',
|
|
93
|
-
'lower hand': 'Lower hand',
|
|
94
|
-
'screenshare on': 'Share screen',
|
|
95
|
-
'screenshare off': 'Stop streaming',
|
|
92
|
+
'channel-toolbar.title': 'Channel actions',
|
|
93
|
+
'start-video-call.menu': 'Start video call',
|
|
96
94
|
},
|
|
97
95
|
},
|
|
98
96
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
8
|
+
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
import { type ThreadState, type ViewStore } from '../types';
|
|
15
|
+
|
|
16
|
+
export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);
|
|
17
|
+
|
|
18
|
+
/** Comment configuration contributed per typename by plugins that support commenting. */
|
|
19
|
+
export type CommentConfig = AppCapabilities.CommentConfig;
|
|
20
|
+
export const CommentConfig: Capability.InterfaceDef<AppCapabilities.CommentConfig> = AppCapabilities.CommentConfig;
|
|
21
|
+
|
|
22
|
+
/** Thread state (drafts, toolbar state, current selection). */
|
|
23
|
+
export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}.capability.state`);
|
|
24
|
+
|
|
25
|
+
/** Per-subject view state (e.g., showResolvedThreads). */
|
|
26
|
+
export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}.capability.view-state`);
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { SpaceSchema } from '@dxos/client-protocol';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Collection, Database, Key, Obj, Ref } from '@dxos/echo';
|
|
13
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
14
|
+
import { Actor, AnchoredTo, Channel, Message, Thread } from '@dxos/types';
|
|
15
|
+
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
|
|
18
|
+
const THREAD_OPERATION = `${meta.id}.operation`;
|
|
19
|
+
|
|
20
|
+
export const OnCreateSpace = Operation.make({
|
|
21
|
+
meta: { key: `${THREAD_OPERATION}.on-create-space`, name: 'On Create Space' },
|
|
22
|
+
services: [Capability.Service],
|
|
23
|
+
input: Schema.Struct({
|
|
24
|
+
space: SpaceSchema,
|
|
25
|
+
rootCollection: Collection.Collection,
|
|
26
|
+
isDefault: Schema.Boolean.pipe(Schema.optional),
|
|
27
|
+
}),
|
|
28
|
+
output: Schema.Void,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const CreateChannel = Operation.make({
|
|
32
|
+
meta: { key: `${THREAD_OPERATION}.create-channel`, name: 'Create Channel' },
|
|
33
|
+
services: [Capability.Service],
|
|
34
|
+
input: Schema.Struct({
|
|
35
|
+
spaceId: Key.SpaceId,
|
|
36
|
+
name: Schema.optional(Schema.String),
|
|
37
|
+
}),
|
|
38
|
+
output: Schema.Struct({
|
|
39
|
+
object: Channel.Channel,
|
|
40
|
+
}),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const AppendChannelMessage = Operation.make({
|
|
44
|
+
meta: { key: `${THREAD_OPERATION}.append-channel-message`, name: 'Append Channel Message' },
|
|
45
|
+
// Note: Feed.FeedService is provided inside the handler from space.queues, not at the
|
|
46
|
+
// operation level — the runtime can't fulfill it without a space context.
|
|
47
|
+
services: [Capability.Service],
|
|
48
|
+
input: Schema.Struct({
|
|
49
|
+
channel: Channel.Channel,
|
|
50
|
+
sender: Actor.Actor,
|
|
51
|
+
text: Schema.String,
|
|
52
|
+
}),
|
|
53
|
+
output: Schema.Void,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export const Create = Operation.make({
|
|
57
|
+
meta: { key: `${THREAD_OPERATION}.create`, name: 'Create Thread' },
|
|
58
|
+
services: [Capability.Service],
|
|
59
|
+
input: Schema.Struct({
|
|
60
|
+
name: Schema.optional(Schema.String),
|
|
61
|
+
anchor: Schema.optional(Schema.String),
|
|
62
|
+
subject: Obj.Unknown,
|
|
63
|
+
}),
|
|
64
|
+
output: Schema.Void,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export const DeleteOutput = Schema.Struct({
|
|
68
|
+
thread: Thread.Thread.annotations({ description: 'The deleted thread.' }),
|
|
69
|
+
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The deleted anchor.' }),
|
|
70
|
+
}).pipe(Schema.partial);
|
|
71
|
+
|
|
72
|
+
export type DeleteOutput = Schema.Schema.Type<typeof DeleteOutput>;
|
|
73
|
+
|
|
74
|
+
export const Delete = Operation.make({
|
|
75
|
+
meta: { key: `${THREAD_OPERATION}.delete`, name: 'Delete Thread' },
|
|
76
|
+
services: [Capability.Service],
|
|
77
|
+
input: Schema.Struct({
|
|
78
|
+
anchor: AnchoredTo.AnchoredTo,
|
|
79
|
+
subject: Obj.Unknown,
|
|
80
|
+
thread: Schema.optional(Thread.Thread),
|
|
81
|
+
}),
|
|
82
|
+
output: DeleteOutput,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export const Select = Operation.make({
|
|
86
|
+
meta: { key: `${THREAD_OPERATION}.select`, name: 'Select Thread' },
|
|
87
|
+
services: [Capability.Service],
|
|
88
|
+
input: Schema.Struct({
|
|
89
|
+
current: Schema.String,
|
|
90
|
+
}),
|
|
91
|
+
output: Schema.Void,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export const ToggleResolved = Operation.make({
|
|
95
|
+
meta: { key: `${THREAD_OPERATION}.toggle-resolved`, name: 'Toggle Resolved' },
|
|
96
|
+
services: [Capability.Service],
|
|
97
|
+
input: Schema.Struct({
|
|
98
|
+
thread: Thread.Thread,
|
|
99
|
+
}),
|
|
100
|
+
output: Schema.Void,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const AddMessage = Operation.make({
|
|
104
|
+
meta: { key: `${THREAD_OPERATION}.add-message`, name: 'Add Message' },
|
|
105
|
+
services: [Capability.Service],
|
|
106
|
+
input: Schema.Struct({
|
|
107
|
+
subject: Obj.Unknown,
|
|
108
|
+
anchor: AnchoredTo.AnchoredTo,
|
|
109
|
+
sender: Actor.Actor,
|
|
110
|
+
text: Schema.String,
|
|
111
|
+
}),
|
|
112
|
+
output: Schema.Void,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const DeleteMessageOutput = Schema.partial(
|
|
116
|
+
Schema.Struct({
|
|
117
|
+
message: Message.Message.annotations({ description: 'The deleted message.' }),
|
|
118
|
+
messageIndex: Schema.Number.annotations({ description: 'The index the message was at.' }),
|
|
119
|
+
}),
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
export type DeleteMessageOutput = Schema.Schema.Type<typeof DeleteMessageOutput>;
|
|
123
|
+
|
|
124
|
+
export const DeleteMessage = Operation.make({
|
|
125
|
+
meta: { key: `${THREAD_OPERATION}.delete-message`, name: 'Delete Message' },
|
|
126
|
+
services: [Capability.Service],
|
|
127
|
+
input: Schema.Struct({
|
|
128
|
+
anchor: AnchoredTo.AnchoredTo,
|
|
129
|
+
subject: Obj.Unknown,
|
|
130
|
+
messageId: Schema.String,
|
|
131
|
+
}),
|
|
132
|
+
output: DeleteMessageOutput,
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Restore a deleted thread (inverse of Delete).
|
|
137
|
+
*/
|
|
138
|
+
export const Restore = Operation.make({
|
|
139
|
+
meta: { key: `${THREAD_OPERATION}.restore`, name: 'Restore Thread' },
|
|
140
|
+
services: [Capability.Service],
|
|
141
|
+
input: Schema.Struct({
|
|
142
|
+
thread: Thread.Thread.annotations({ description: 'The thread to restore.' }),
|
|
143
|
+
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor relation to restore.' }),
|
|
144
|
+
}),
|
|
145
|
+
output: Schema.Void,
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Restore a deleted message (inverse of DeleteMessage).
|
|
150
|
+
*/
|
|
151
|
+
export const RestoreMessage = Operation.make({
|
|
152
|
+
meta: { key: `${THREAD_OPERATION}.restore-message`, name: 'Restore Message' },
|
|
153
|
+
services: [Capability.Service],
|
|
154
|
+
input: Schema.Struct({
|
|
155
|
+
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor of the thread.' }),
|
|
156
|
+
message: Message.Message.annotations({ description: 'The message to restore.' }),
|
|
157
|
+
messageIndex: Schema.Number.annotations({ description: 'The index to restore the message at.' }),
|
|
158
|
+
}),
|
|
159
|
+
output: Schema.Void,
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
export const CreateProposals = Operation.make({
|
|
163
|
+
meta: {
|
|
164
|
+
key: 'org.dxos.function.thread.create-proposals',
|
|
165
|
+
name: 'Create Proposals',
|
|
166
|
+
description: 'Proposes a set of changes to a document.',
|
|
167
|
+
},
|
|
168
|
+
input: Schema.Struct({
|
|
169
|
+
doc: Ref.Ref(Markdown.Document).annotations({
|
|
170
|
+
description: 'The ID of the document.',
|
|
171
|
+
}),
|
|
172
|
+
diffs: Schema.Array(Schema.String).annotations({
|
|
173
|
+
description: 'The diffs to propose for the document.',
|
|
174
|
+
}),
|
|
175
|
+
}),
|
|
176
|
+
output: Schema.Void,
|
|
177
|
+
services: [Database.Service],
|
|
178
|
+
});
|
package/src/types/index.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * as Channel from './Channel';
|
|
6
|
-
export * as Thread from './Thread';
|
|
7
5
|
export * from './types';
|
|
6
|
+
|
|
7
|
+
export * as Settings from './Settings';
|
|
8
|
+
export * as ThreadCapabilities from './ThreadCapabilities';
|
|
9
|
+
export * as ThreadOperation from './ThreadOperation';
|