@dxos/plugin-thread 0.8.4-main.4a85c3132b → 0.8.4-main.51f1e5ca51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/add-message-OC4QB4I2.mjs +89 -0
- package/dist/lib/browser/add-message-OC4QB4I2.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +32 -3
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-J67QAUIW.mjs +61 -0
- package/dist/lib/browser/chunk-J67QAUIW.mjs.map +7 -0
- package/dist/lib/browser/chunk-KCMJ7H7F.mjs +259 -0
- package/dist/lib/browser/chunk-KCMJ7H7F.mjs.map +7 -0
- package/dist/lib/browser/create-IUWQEW74.mjs +55 -0
- package/dist/lib/browser/create-IUWQEW74.mjs.map +7 -0
- package/dist/lib/browser/create-channel-CBC5WEFG.mjs +21 -0
- package/dist/lib/browser/create-channel-CBC5WEFG.mjs.map +7 -0
- package/dist/lib/browser/create-channel-thread-JJ5LQ3OZ.mjs +28 -0
- package/dist/lib/browser/create-channel-thread-JJ5LQ3OZ.mjs.map +7 -0
- package/dist/lib/browser/create-proposals-RHLVRJZ4.mjs +57 -0
- package/dist/lib/browser/create-proposals-RHLVRJZ4.mjs.map +7 -0
- package/dist/lib/browser/delete-PVIEGTTY.mjs +59 -0
- package/dist/lib/browser/delete-PVIEGTTY.mjs.map +7 -0
- package/dist/lib/browser/delete-message-TLVRPLJF.mjs +56 -0
- package/dist/lib/browser/delete-message-TLVRPLJF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1811 -171
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-KRTKYRFU.mjs +25 -0
- package/dist/lib/browser/on-create-space-KRTKYRFU.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/restore-AVE55SJF.mjs +33 -0
- package/dist/lib/browser/restore-AVE55SJF.mjs.map +7 -0
- package/dist/lib/browser/restore-message-F57RMGDJ.mjs +34 -0
- package/dist/lib/browser/restore-message-F57RMGDJ.mjs.map +7 -0
- package/dist/lib/browser/select-BJDZJI64.mjs +26 -0
- package/dist/lib/browser/select-BJDZJI64.mjs.map +7 -0
- package/dist/lib/browser/toggle-resolved-HQE5P7BV.mjs +37 -0
- package/dist/lib/browser/toggle-resolved-HQE5P7BV.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +90 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -8
- package/dist/lib/node-esm/add-message-HJXNAILW.mjs +90 -0
- package/dist/lib/node-esm/add-message-HJXNAILW.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +32 -3
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-2Q6V7NGK.mjs +62 -0
- package/dist/lib/node-esm/chunk-2Q6V7NGK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4KRVIOPC.mjs +260 -0
- package/dist/lib/node-esm/chunk-4KRVIOPC.mjs.map +7 -0
- package/dist/lib/node-esm/create-NALJT67D.mjs +56 -0
- package/dist/lib/node-esm/create-NALJT67D.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-CS2EAYJF.mjs +22 -0
- package/dist/lib/node-esm/create-channel-CS2EAYJF.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-thread-KZZFZDTU.mjs +29 -0
- package/dist/lib/node-esm/create-channel-thread-KZZFZDTU.mjs.map +7 -0
- package/dist/lib/node-esm/create-proposals-AFAYZQBI.mjs +58 -0
- package/dist/lib/node-esm/create-proposals-AFAYZQBI.mjs.map +7 -0
- package/dist/lib/node-esm/delete-HQJVZY7Q.mjs +60 -0
- package/dist/lib/node-esm/delete-HQJVZY7Q.mjs.map +7 -0
- package/dist/lib/node-esm/delete-message-VVPEYLV4.mjs +57 -0
- package/dist/lib/node-esm/delete-message-VVPEYLV4.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1811 -171
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/on-create-space-2UX7Z5EQ.mjs +26 -0
- package/dist/lib/node-esm/on-create-space-2UX7Z5EQ.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/restore-FMIWJR5T.mjs +34 -0
- package/dist/lib/node-esm/restore-FMIWJR5T.mjs.map +7 -0
- package/dist/lib/node-esm/restore-message-3L7AMQMG.mjs +35 -0
- package/dist/lib/node-esm/restore-message-3L7AMQMG.mjs.map +7 -0
- package/dist/lib/node-esm/select-VCAFISBK.mjs +27 -0
- package/dist/lib/node-esm/select-VCAFISBK.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-resolved-JDZZ257P.mjs +38 -0
- package/dist/lib/node-esm/toggle-resolved-JDZZ257P.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +91 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +5 -8
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/thread-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -1
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/speaking-monitor.d.ts +0 -3
- package/dist/types/src/calls/speaking-monitor.d.ts.map +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/audio.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +2 -2
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/history-cache.d.ts.map +1 -1
- package/dist/types/src/calls/util/media.d.ts.map +1 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
- package/dist/types/src/calls-service.stories.d.ts +2 -2
- package/dist/types/src/calls-service.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/{call-manager/call-manager.d.ts → call-manager.d.ts} +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +15 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/{markdown/markdown.d.ts → markdown.d.ts} +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- 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-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- 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/Call/Call.d.ts +32 -4
- package/dist/types/src/components/Call/Call.d.ts.map +1 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +5 -5
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- 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/Lobby/Lobby.d.ts +24 -3
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- package/dist/types/src/components/{MessageContainer.d.ts → MessagePanel/MessagePanel.d.ts} +3 -3
- 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/Participant/Participant.d.ts.map +1 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +142 -144
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/{ResponsiveContainer.d.ts → ResponsivePanel.d.ts} +4 -4
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts +164 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +1 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +1 -1
- 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 +4 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +1 -1
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +1 -2
- package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/containers/CallSidebar/index.d.ts +1 -2
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +4 -4
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts +142 -144
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelContainer/index.d.ts +1 -2
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +3 -4
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts +141 -143
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +6 -3
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +1 -2
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +0 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- 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 +3 -3
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/hooks/useVideoStreamTrack.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/create-channel-thread.d.ts +5 -0
- package/dist/types/src/operations/create-channel-thread.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/definitions.d.ts +2804 -0
- package/dist/types/src/operations/definitions.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 +4 -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/{components/testing.d.ts → testing/data.d.ts} +1 -1
- 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 -142
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +181 -177
- package/dist/types/src/types/Channel.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/capabilities.d.ts +2 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -3304
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +2 -2
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +79 -67
- package/src/ThreadPlugin.tsx +30 -22
- package/src/blueprints/thread-blueprint.ts +5 -9
- package/src/calls/util/calls-service.ts +3 -2
- package/src/calls/util/stub-media-streams.ts +3 -1
- package/src/calls-service.stories.tsx +8 -7
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +40 -49
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +1 -1
- package/src/capabilities/{call-manager/call-manager.ts → call-manager.ts} +4 -3
- package/src/capabilities/index.ts +16 -10
- package/src/capabilities/{markdown/markdown.ts → markdown.ts} +17 -13
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +2 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +28 -35
- package/src/capabilities/{settings/settings.ts → settings.ts} +6 -5
- package/src/capabilities/{state/state.ts → state.ts} +1 -1
- package/src/capabilities/undo-mappings.ts +46 -0
- package/src/components/Call/Call.tsx +9 -9
- package/src/components/Call/Toolbar.tsx +24 -14
- package/src/components/{Comments.stories.tsx → CommentsPanel/CommentsPanel.stories.tsx} +14 -13
- package/src/components/{CommentsContainer.tsx → CommentsPanel/CommentsPanel.tsx} +6 -6
- package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +16 -16
- package/src/components/CommentsPanel/index.ts +6 -0
- package/src/components/Lobby/Lobby.tsx +12 -10
- package/src/components/Media/VideoObject.stories.tsx +3 -4
- package/src/components/{MessageContainer.tsx → MessagePanel/MessagePanel.tsx} +16 -10
- package/src/components/MessagePanel/index.ts +5 -0
- package/src/components/Participant/Participant.tsx +2 -1
- package/src/components/Participant/ParticipantGrid.tsx +0 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +7 -7
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +4 -4
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +5 -5
- package/src/components/ResponsiveGrid/{ResponsiveContainer.stories.tsx → ResponsivePanel.stories.tsx} +7 -7
- package/src/components/ResponsiveGrid/{ResponsiveContainer.tsx → ResponsivePanel.tsx} +4 -4
- package/src/components/ResponsiveGrid/index.ts +1 -1
- package/src/components/ThreadSettings/ThreadSettings.stories.tsx +32 -0
- package/src/components/ThreadSettings/ThreadSettings.tsx +20 -0
- package/src/components/ThreadSettings/index.ts +5 -0
- package/src/components/index.ts +6 -3
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +5 -4
- package/src/containers/CallDebugPanel/index.ts +1 -3
- package/src/containers/CallSidebar/CallSidebar.tsx +3 -2
- package/src/containers/CallSidebar/index.ts +1 -3
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +45 -12
- package/src/containers/ChannelContainer/ChannelContainer.tsx +42 -36
- package/src/containers/ChannelContainer/index.ts +1 -3
- package/src/containers/ChatContainer/ChatContainer.stories.tsx +10 -11
- package/src/containers/ChatContainer/ChatContainer.tsx +95 -118
- package/src/containers/ChatContainer/index.ts +1 -0
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +48 -28
- package/src/containers/ThreadCompanion/index.ts +1 -3
- package/src/containers/index.ts +0 -1
- package/src/extensions/index.ts +1 -0
- package/src/extensions/threads.ts +15 -14
- package/src/hooks/analytics.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/operations/add-message.ts +81 -0
- package/src/operations/create-channel-thread.ts +26 -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/definitions.ts +177 -0
- package/src/operations/delete-message.ts +53 -0
- package/src/operations/delete.ts +63 -0
- package/src/operations/index.ts +22 -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/{components/testing.ts → testing/data.ts} +7 -7
- package/src/testing/index.ts +1 -1
- package/src/translations.ts +72 -76
- package/src/types/Channel.ts +9 -2
- package/src/types/Settings.ts +10 -0
- package/src/types/capabilities.ts +9 -7
- package/src/types/types.ts +2 -184
- package/src/util.ts +1 -1
- package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs +0 -182
- package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs.map +0 -7
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs +0 -33
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs.map +0 -7
- package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs +0 -15
- package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-2243UD2M.mjs +0 -14
- package/dist/lib/browser/ChatContainer-2243UD2M.mjs.map +0 -7
- package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs +0 -204
- package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs.map +0 -7
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs +0 -20
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs +0 -191
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs +0 -17
- package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs.map +0 -7
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs +0 -27
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-CP7E2HRE.mjs +0 -31
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERK254BS.mjs +0 -1810
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +0 -7
- package/dist/lib/browser/chunk-G6FJBSXX.mjs +0 -1123
- package/dist/lib/browser/chunk-G6FJBSXX.mjs.map +0 -7
- package/dist/lib/browser/chunk-HDLDMR54.mjs +0 -184
- package/dist/lib/browser/chunk-HDLDMR54.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-LUK4UNFA.mjs +0 -20
- package/dist/lib/browser/chunk-LUK4UNFA.mjs.map +0 -7
- package/dist/lib/browser/chunk-PDHCY236.mjs +0 -223
- package/dist/lib/browser/chunk-PDHCY236.mjs.map +0 -7
- package/dist/lib/browser/chunk-PL5LIVP4.mjs +0 -105
- package/dist/lib/browser/chunk-PL5LIVP4.mjs.map +0 -7
- package/dist/lib/browser/chunk-U32R23JO.mjs +0 -277
- package/dist/lib/browser/chunk-U32R23JO.mjs.map +0 -7
- package/dist/lib/browser/chunk-UVUCB7QO.mjs +0 -125
- package/dist/lib/browser/chunk-UVUCB7QO.mjs.map +0 -7
- package/dist/lib/browser/markdown-GRRPCZHJ.mjs +0 -210
- package/dist/lib/browser/markdown-GRRPCZHJ.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs +0 -442
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs.map +0 -7
- package/dist/lib/browser/react-root-7UFFPPRD.mjs +0 -26
- package/dist/lib/browser/react-root-7UFFPPRD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs +0 -113
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs.map +0 -7
- package/dist/lib/browser/repair-TBU45SBG.mjs +0 -40
- package/dist/lib/browser/repair-TBU45SBG.mjs.map +0 -7
- package/dist/lib/browser/settings-Y75FG6XR.mjs +0 -35
- package/dist/lib/browser/settings-Y75FG6XR.mjs.map +0 -7
- package/dist/lib/browser/state-OBTMMEUZ.mjs +0 -25
- package/dist/lib/browser/state-OBTMMEUZ.mjs.map +0 -7
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs +0 -183
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs.map +0 -7
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs +0 -34
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs +0 -16
- package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs +0 -15
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs.map +0 -7
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs +0 -205
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs.map +0 -7
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs +0 -21
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs +0 -192
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs +0 -18
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs +0 -28
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs +0 -107
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7SZBKQUU.mjs +0 -224
- package/dist/lib/node-esm/chunk-7SZBKQUU.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-GPPP2MZ3.mjs +0 -22
- package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs +0 -1124
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs +0 -1811
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs +0 -278
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs +0 -126
- package/dist/lib/node-esm/chunk-V2GXQ2UB.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-YN2Y7GPW.mjs +0 -185
- package/dist/lib/node-esm/chunk-YN2Y7GPW.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs +0 -211
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs +0 -443
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs +0 -27
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs +0 -114
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs.map +0 -7
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs +0 -41
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs +0 -36
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs.map +0 -7
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs +0 -26
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager/index.d.ts +0 -3
- package/dist/types/src/capabilities/call-manager/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +0 -3
- package/dist/types/src/capabilities/markdown/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/index.d.ts +0 -3
- package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
- package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -3
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -162
- 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/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -166
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.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/containers/ThreadSettings/ThreadSettings.d.ts +0 -8
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadSettings/index.d.ts +0 -3
- package/dist/types/src/containers/ThreadSettings/index.d.ts.map +0 -1
- package/dist/types/src/functions/create-proposals.d.ts +0 -13
- package/dist/types/src/functions/create-proposals.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -14
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/testing/stories.d.ts +0 -3
- package/dist/types/src/testing/stories.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/call-manager/index.ts +0 -7
- package/src/capabilities/markdown/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -399
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/repair/index.ts +0 -7
- package/src/capabilities/repair/repair.ts +0 -55
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/containers/ThreadSettings/ThreadSettings.tsx +0 -22
- package/src/containers/ThreadSettings/index.ts +0 -7
- package/src/functions/create-proposals.ts +0 -57
- package/src/functions/index.ts +0 -9
- package/src/testing/stories.ts +0 -56
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/src/{components/command-extension.ts → extensions/command.ts} +0 -0
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, Capability, UndoMapping } from '@dxos/app-framework';
|
|
8
|
-
import { sleep } from '@dxos/async';
|
|
9
|
-
import { Obj, Relation, Type } from '@dxos/echo';
|
|
10
|
-
import { invariant } from '@dxos/invariant';
|
|
11
|
-
import { OperationResolver } from '@dxos/operation';
|
|
12
|
-
import { Operation } from '@dxos/operation';
|
|
13
|
-
import { ATTENDABLE_PATH_SEPARATOR, DeckOperation } from '@dxos/plugin-deck/types';
|
|
14
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability/types';
|
|
15
|
-
import { SpaceOperation } from '@dxos/plugin-space/types';
|
|
16
|
-
import { Ref } from '@dxos/react-client/echo';
|
|
17
|
-
import { ManagedCollection } from '@dxos/schema';
|
|
18
|
-
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
19
|
-
|
|
20
|
-
import { meta } from '../../meta';
|
|
21
|
-
import { Channel, ThreadCapabilities, ThreadOperation } from '../../types';
|
|
22
|
-
|
|
23
|
-
export default Capability.makeModule(
|
|
24
|
-
Effect.fnUntraced(function* () {
|
|
25
|
-
return [
|
|
26
|
-
Capability.contributes(Capabilities.UndoMapping, [
|
|
27
|
-
UndoMapping.make({
|
|
28
|
-
operation: ThreadOperation.Delete,
|
|
29
|
-
inverse: ThreadOperation.Restore,
|
|
30
|
-
deriveContext: (_input, output) => {
|
|
31
|
-
// Return undefined if not undoable (e.g., draft deletion or no db).
|
|
32
|
-
if (!output.thread || !output.anchor) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
thread: output.thread,
|
|
37
|
-
anchor: output.anchor,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
message: ['thread deleted label', { ns: meta.id }],
|
|
41
|
-
}),
|
|
42
|
-
UndoMapping.make({
|
|
43
|
-
operation: ThreadOperation.DeleteMessage,
|
|
44
|
-
inverse: ThreadOperation.RestoreMessage,
|
|
45
|
-
deriveContext: (input, output) => {
|
|
46
|
-
// Return undefined if not undoable (e.g., message not found or thread deleted).
|
|
47
|
-
if (!output.message || output.messageIndex === undefined) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
anchor: input.anchor,
|
|
52
|
-
message: output.message,
|
|
53
|
-
messageIndex: output.messageIndex,
|
|
54
|
-
};
|
|
55
|
-
},
|
|
56
|
-
message: ['message deleted label', { ns: meta.id }],
|
|
57
|
-
}),
|
|
58
|
-
]),
|
|
59
|
-
Capability.contributes(Capabilities.OperationResolver, [
|
|
60
|
-
//
|
|
61
|
-
// CreateChannel
|
|
62
|
-
//
|
|
63
|
-
OperationResolver.make({
|
|
64
|
-
operation: ThreadOperation.CreateChannel,
|
|
65
|
-
handler: (input) =>
|
|
66
|
-
Effect.sync(() => ({
|
|
67
|
-
object: Channel.make({ name: input.name }),
|
|
68
|
-
})),
|
|
69
|
-
}),
|
|
70
|
-
|
|
71
|
-
//
|
|
72
|
-
// CreateChannelThread
|
|
73
|
-
//
|
|
74
|
-
OperationResolver.make({
|
|
75
|
-
operation: ThreadOperation.CreateChannelThread,
|
|
76
|
-
handler: (input) =>
|
|
77
|
-
Effect.sync(() => {
|
|
78
|
-
const thread = Thread.make({ status: 'active' });
|
|
79
|
-
const threadRef = Ref.make(thread);
|
|
80
|
-
Obj.change(input.channel, (c) => {
|
|
81
|
-
c.threads.push(threadRef);
|
|
82
|
-
});
|
|
83
|
-
return { object: thread };
|
|
84
|
-
}),
|
|
85
|
-
}),
|
|
86
|
-
|
|
87
|
-
//
|
|
88
|
-
// Select
|
|
89
|
-
//
|
|
90
|
-
OperationResolver.make({
|
|
91
|
-
operation: ThreadOperation.Select,
|
|
92
|
-
handler: Effect.fnUntraced(function* (input) {
|
|
93
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
94
|
-
const stateAtom = yield* Capability.get(ThreadCapabilities.State);
|
|
95
|
-
const current = registry.get(stateAtom);
|
|
96
|
-
registry.set(stateAtom, { ...current, current: input.current });
|
|
97
|
-
}),
|
|
98
|
-
}),
|
|
99
|
-
|
|
100
|
-
//
|
|
101
|
-
// ToggleResolved
|
|
102
|
-
//
|
|
103
|
-
OperationResolver.make({
|
|
104
|
-
operation: ThreadOperation.ToggleResolved,
|
|
105
|
-
handler: Effect.fnUntraced(function* (input) {
|
|
106
|
-
const thread = input.thread;
|
|
107
|
-
|
|
108
|
-
Obj.change(thread, (t) => {
|
|
109
|
-
if (t.status === 'active' || t.status === undefined) {
|
|
110
|
-
t.status = 'resolved';
|
|
111
|
-
} else if (t.status === 'resolved') {
|
|
112
|
-
t.status = 'active';
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
const db = Obj.getDatabase(thread);
|
|
117
|
-
invariant(db, 'Database not found');
|
|
118
|
-
|
|
119
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
120
|
-
name: 'threads.toggle-resolved',
|
|
121
|
-
properties: {
|
|
122
|
-
spaceId: db.spaceId,
|
|
123
|
-
threadId: thread.id,
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
}),
|
|
127
|
-
}),
|
|
128
|
-
|
|
129
|
-
//
|
|
130
|
-
// OnCreateSpace
|
|
131
|
-
//
|
|
132
|
-
OperationResolver.make({
|
|
133
|
-
operation: ThreadOperation.OnCreateSpace,
|
|
134
|
-
handler: Effect.fnUntraced(function* ({ space, isDefault, rootCollection }) {
|
|
135
|
-
if (isDefault) {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const collection = ManagedCollection.makeManagedCollection({ key: Type.getTypename(Channel.Channel) });
|
|
140
|
-
Obj.change(rootCollection, (c) => {
|
|
141
|
-
c.objects.push(Ref.make(collection));
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
const { object: channel } = yield* Operation.invoke(ThreadOperation.CreateChannel, {
|
|
145
|
-
name: 'General',
|
|
146
|
-
spaceId: space.id,
|
|
147
|
-
});
|
|
148
|
-
space.db.add(channel);
|
|
149
|
-
}),
|
|
150
|
-
}),
|
|
151
|
-
|
|
152
|
-
//
|
|
153
|
-
// Create
|
|
154
|
-
//
|
|
155
|
-
OperationResolver.make({
|
|
156
|
-
operation: ThreadOperation.Create,
|
|
157
|
-
handler: Effect.fnUntraced(function* ({ name, anchor: _anchor, subject }) {
|
|
158
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
159
|
-
const stateAtom = yield* Capability.get(ThreadCapabilities.State);
|
|
160
|
-
const subjectId = Obj.getDXN(subject).toString();
|
|
161
|
-
const thread = Thread.make({ name });
|
|
162
|
-
const anchor = Relation.make(AnchoredTo.AnchoredTo, {
|
|
163
|
-
[Relation.Source]: thread,
|
|
164
|
-
[Relation.Target]: subject,
|
|
165
|
-
anchor: _anchor,
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
const state = registry.get(stateAtom);
|
|
169
|
-
const existingDrafts = state.drafts[subjectId];
|
|
170
|
-
registry.set(stateAtom, {
|
|
171
|
-
...state,
|
|
172
|
-
drafts: {
|
|
173
|
-
...state.drafts,
|
|
174
|
-
[subjectId]: existingDrafts ? [...existingDrafts, anchor] : [anchor],
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// Follow-up operations.
|
|
179
|
-
yield* Operation.invoke(ThreadOperation.Select, { current: Obj.getDXN(thread).toString() });
|
|
180
|
-
yield* Operation.invoke(DeckOperation.ChangeCompanion, {
|
|
181
|
-
companion: `${subjectId}${ATTENDABLE_PATH_SEPARATOR}comments`,
|
|
182
|
-
});
|
|
183
|
-
}),
|
|
184
|
-
}),
|
|
185
|
-
|
|
186
|
-
//
|
|
187
|
-
// Delete
|
|
188
|
-
//
|
|
189
|
-
OperationResolver.make({
|
|
190
|
-
operation: ThreadOperation.Delete,
|
|
191
|
-
handler: Effect.fnUntraced(function* ({ subject, anchor, thread: _thread }) {
|
|
192
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
193
|
-
const stateAtom = yield* Capability.get(ThreadCapabilities.State);
|
|
194
|
-
const thread = _thread ?? (Relation.getSource(anchor) as Thread.Thread);
|
|
195
|
-
const subjectId = Obj.getDXN(subject).toString();
|
|
196
|
-
const state = registry.get(stateAtom);
|
|
197
|
-
const draft = state.drafts[subjectId];
|
|
198
|
-
if (draft) {
|
|
199
|
-
// Check if we're deleting a draft; if so, remove it.
|
|
200
|
-
const index = draft.findIndex((a: { id: string }) => a.id === anchor.id);
|
|
201
|
-
if (index !== -1) {
|
|
202
|
-
registry.set(stateAtom, {
|
|
203
|
-
...state,
|
|
204
|
-
drafts: {
|
|
205
|
-
...state.drafts,
|
|
206
|
-
[subjectId]: state.drafts[subjectId]?.filter((_, i) => i !== index),
|
|
207
|
-
},
|
|
208
|
-
});
|
|
209
|
-
// Draft deletion is not undoable.
|
|
210
|
-
return {};
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
const db = Obj.getDatabase(thread);
|
|
215
|
-
if (!db) {
|
|
216
|
-
return {};
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// TODO(wittjosiah): Without sleep, rendering crashes at `Relation.setSource(anchor)`.
|
|
220
|
-
db.remove(anchor);
|
|
221
|
-
yield* Effect.promise(() => sleep(100));
|
|
222
|
-
db.remove(thread);
|
|
223
|
-
|
|
224
|
-
// Schedule analytics event as followup (doesn't block return).
|
|
225
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
226
|
-
name: 'threads.delete',
|
|
227
|
-
properties: {
|
|
228
|
-
spaceId: db.spaceId,
|
|
229
|
-
threadId: thread.id,
|
|
230
|
-
},
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
// Return data needed for undo.
|
|
234
|
-
return { thread, anchor };
|
|
235
|
-
}),
|
|
236
|
-
}),
|
|
237
|
-
|
|
238
|
-
//
|
|
239
|
-
// AddMessage
|
|
240
|
-
//
|
|
241
|
-
OperationResolver.make({
|
|
242
|
-
operation: ThreadOperation.AddMessage,
|
|
243
|
-
handler: Effect.fnUntraced(function* ({ anchor, subject, sender, text }) {
|
|
244
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
245
|
-
const stateAtom = yield* Capability.get(ThreadCapabilities.State);
|
|
246
|
-
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
247
|
-
const subjectId = Obj.getDXN(subject).toString();
|
|
248
|
-
const db = Obj.getDatabase(subject);
|
|
249
|
-
invariant(db, 'Database not found');
|
|
250
|
-
|
|
251
|
-
const message = Obj.make(Message.Message, {
|
|
252
|
-
created: new Date().toISOString(),
|
|
253
|
-
sender,
|
|
254
|
-
blocks: [{ _tag: 'text', text }],
|
|
255
|
-
});
|
|
256
|
-
Obj.change(thread, (t) => {
|
|
257
|
-
t.messages.push(Ref.make(message));
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
const state = registry.get(stateAtom);
|
|
261
|
-
const draft = state.drafts[subjectId]?.find((a: { id: string }) => a.id === anchor.id);
|
|
262
|
-
if (draft) {
|
|
263
|
-
// Move draft to document.
|
|
264
|
-
Obj.change(thread, (t) => {
|
|
265
|
-
t.status = 'active';
|
|
266
|
-
});
|
|
267
|
-
registry.set(stateAtom, {
|
|
268
|
-
...state,
|
|
269
|
-
drafts: {
|
|
270
|
-
...state.drafts,
|
|
271
|
-
[subjectId]: state.drafts[subjectId]?.filter((a: { id: string }) => a.id !== anchor.id),
|
|
272
|
-
},
|
|
273
|
-
});
|
|
274
|
-
yield* Operation.invoke(SpaceOperation.AddObject, { object: thread, target: db, hidden: true });
|
|
275
|
-
yield* Operation.invoke(SpaceOperation.AddRelation, {
|
|
276
|
-
db,
|
|
277
|
-
schema: AnchoredTo.AnchoredTo,
|
|
278
|
-
source: thread,
|
|
279
|
-
target: subject,
|
|
280
|
-
fields: { anchor: draft.anchor },
|
|
281
|
-
});
|
|
282
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
283
|
-
name: 'threads.create',
|
|
284
|
-
properties: {
|
|
285
|
-
spaceId: db.spaceId,
|
|
286
|
-
threadId: thread.id,
|
|
287
|
-
},
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
292
|
-
name: 'threads.message.add',
|
|
293
|
-
properties: {
|
|
294
|
-
spaceId: db.spaceId,
|
|
295
|
-
threadId: thread.id,
|
|
296
|
-
threadLength: thread.messages.length,
|
|
297
|
-
messageId: message.id,
|
|
298
|
-
messageLength: text.length,
|
|
299
|
-
},
|
|
300
|
-
});
|
|
301
|
-
}),
|
|
302
|
-
}),
|
|
303
|
-
|
|
304
|
-
//
|
|
305
|
-
// DeleteMessage
|
|
306
|
-
//
|
|
307
|
-
OperationResolver.make({
|
|
308
|
-
operation: ThreadOperation.DeleteMessage,
|
|
309
|
-
handler: Effect.fnUntraced(function* ({ subject, anchor, messageId }) {
|
|
310
|
-
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
311
|
-
const db = Obj.getDatabase(subject);
|
|
312
|
-
invariant(db, 'Database not found');
|
|
313
|
-
|
|
314
|
-
const msgIndex = thread.messages.findIndex((ref) => ref.target?.id === messageId);
|
|
315
|
-
const msg = thread.messages[msgIndex]?.target;
|
|
316
|
-
if (!msg) {
|
|
317
|
-
return { messageIndex: -1 };
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
if (msgIndex === 0 && thread.messages.length === 1) {
|
|
321
|
-
// TODO(wittjosiah): This doesn't support restoring the thread.
|
|
322
|
-
yield* Operation.invoke(ThreadOperation.Delete, { subject, anchor });
|
|
323
|
-
return { messageIndex: -1 };
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
Obj.change(thread, (t) => {
|
|
327
|
-
t.messages.splice(msgIndex, 1);
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
331
|
-
name: 'threads.message.delete',
|
|
332
|
-
properties: {
|
|
333
|
-
spaceId: db.spaceId,
|
|
334
|
-
threadId: thread.id,
|
|
335
|
-
threadLength: thread.messages.length,
|
|
336
|
-
messageId,
|
|
337
|
-
},
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
// Return data needed for undo.
|
|
341
|
-
return { message: msg, messageIndex: msgIndex };
|
|
342
|
-
}),
|
|
343
|
-
}),
|
|
344
|
-
|
|
345
|
-
//
|
|
346
|
-
// Restore (inverse of Delete)
|
|
347
|
-
//
|
|
348
|
-
OperationResolver.make({
|
|
349
|
-
operation: ThreadOperation.Restore,
|
|
350
|
-
handler: Effect.fnUntraced(function* ({ thread, anchor }) {
|
|
351
|
-
const db = Obj.getDatabase(thread);
|
|
352
|
-
if (!db) {
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// TODO(wittjosiah): Without sleep, rendering crashes at `Relation.setSource(anchor)`.
|
|
357
|
-
db.add(thread);
|
|
358
|
-
yield* Effect.promise(() => sleep(100));
|
|
359
|
-
db.add(anchor);
|
|
360
|
-
|
|
361
|
-
// Schedule analytics event as followup (doesn't block return).
|
|
362
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
363
|
-
name: 'threads.undo-delete',
|
|
364
|
-
properties: {
|
|
365
|
-
spaceId: db.spaceId,
|
|
366
|
-
threadId: thread.id,
|
|
367
|
-
},
|
|
368
|
-
});
|
|
369
|
-
}),
|
|
370
|
-
}),
|
|
371
|
-
|
|
372
|
-
//
|
|
373
|
-
// RestoreMessage (inverse of DeleteMessage)
|
|
374
|
-
//
|
|
375
|
-
OperationResolver.make({
|
|
376
|
-
operation: ThreadOperation.RestoreMessage,
|
|
377
|
-
handler: Effect.fnUntraced(function* ({ anchor, message, messageIndex }) {
|
|
378
|
-
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
379
|
-
const db = Obj.getDatabase(thread);
|
|
380
|
-
invariant(db, 'Database not found');
|
|
381
|
-
|
|
382
|
-
Obj.change(thread, (t) => {
|
|
383
|
-
t.messages.splice(messageIndex, 0, Ref.make(message));
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
387
|
-
name: 'threads.message.undo-delete',
|
|
388
|
-
properties: {
|
|
389
|
-
spaceId: db.spaceId,
|
|
390
|
-
threadId: thread.id,
|
|
391
|
-
messageId: message.id,
|
|
392
|
-
},
|
|
393
|
-
});
|
|
394
|
-
}),
|
|
395
|
-
}),
|
|
396
|
-
]),
|
|
397
|
-
];
|
|
398
|
-
}),
|
|
399
|
-
);
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Obj, Ref, Type } from '@dxos/echo';
|
|
9
|
-
import { Collection } from '@dxos/echo';
|
|
10
|
-
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
11
|
-
import { type Space } from '@dxos/react-client/echo';
|
|
12
|
-
import { ManagedCollection } from '@dxos/schema';
|
|
13
|
-
|
|
14
|
-
import { Channel } from '../../types';
|
|
15
|
-
|
|
16
|
-
export default Capability.makeModule(() =>
|
|
17
|
-
Effect.succeed(
|
|
18
|
-
Capability.contributes(
|
|
19
|
-
SpaceCapabilities.Repair,
|
|
20
|
-
async ({ space, isDefault }: { space: Space; isDefault: boolean }) => {
|
|
21
|
-
if (isDefault) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
await ensureSystemCollection(space);
|
|
26
|
-
},
|
|
27
|
-
),
|
|
28
|
-
),
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Ensure the root collection has a system collection for Channels.
|
|
33
|
-
*/
|
|
34
|
-
const ensureSystemCollection = async (space: Space) => {
|
|
35
|
-
const rootCollection: Collection.Collection = await space.properties[Collection.Collection.typename]?.load();
|
|
36
|
-
if (!rootCollection) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const objects = await Promise.all(rootCollection.objects.map((ref) => ref.load()));
|
|
41
|
-
const channels = objects.find(
|
|
42
|
-
(object) =>
|
|
43
|
-
Obj.instanceOf(ManagedCollection.ManagedCollection, object) && object.key === Type.getTypename(Channel.Channel),
|
|
44
|
-
);
|
|
45
|
-
if (channels) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const channelCollectionRef = Ref.make(
|
|
50
|
-
ManagedCollection.makeManagedCollection({ key: Type.getTypename(Channel.Channel) }),
|
|
51
|
-
);
|
|
52
|
-
Obj.change(rootCollection, (c) => {
|
|
53
|
-
c.objects.push(channelCollectionRef);
|
|
54
|
-
});
|
|
55
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import { Settings } from '@dxos/react-ui-form';
|
|
9
|
-
|
|
10
|
-
import { meta } from '../../meta';
|
|
11
|
-
import type { ThreadSettingsProps } from '../../types';
|
|
12
|
-
|
|
13
|
-
export type ThreadSettingsComponentProps = {
|
|
14
|
-
settings: ThreadSettingsProps;
|
|
15
|
-
onSettingsChange: (fn: (current: ThreadSettingsProps) => ThreadSettingsProps) => void;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// TODO(burdon): Settings.
|
|
19
|
-
export const ThreadSettings = ({ settings: _settings }: ThreadSettingsComponentProps) => {
|
|
20
|
-
const { t: _t } = useTranslation(meta.id);
|
|
21
|
-
return <Settings.Root></Settings.Root>;
|
|
22
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Array from 'effect/Array';
|
|
6
|
-
import * as Effect from 'effect/Effect';
|
|
7
|
-
import * as Function from 'effect/Function';
|
|
8
|
-
import * as Schema from 'effect/Schema';
|
|
9
|
-
|
|
10
|
-
import { computeDiffsWithCursors } from '@dxos/assistant';
|
|
11
|
-
import { Database, Obj, Ref, Relation } from '@dxos/echo';
|
|
12
|
-
import { createDocAccessor } from '@dxos/echo-db';
|
|
13
|
-
import { defineFunction } from '@dxos/functions';
|
|
14
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
15
|
-
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
16
|
-
|
|
17
|
-
export default defineFunction({
|
|
18
|
-
key: 'dxos.org/function/thread/create-proposals',
|
|
19
|
-
name: 'Create Proposals',
|
|
20
|
-
description: 'Proposes a set of changes to a document.',
|
|
21
|
-
inputSchema: Schema.Struct({
|
|
22
|
-
doc: Ref.Ref(Markdown.Document).annotations({
|
|
23
|
-
description: 'The ID of the document.',
|
|
24
|
-
}),
|
|
25
|
-
diffs: Schema.Array(Schema.String).annotations({
|
|
26
|
-
description: 'The diffs to propose for the document.',
|
|
27
|
-
}),
|
|
28
|
-
}),
|
|
29
|
-
outputSchema: Schema.Void,
|
|
30
|
-
handler: Effect.fn(function* ({ data: { doc, diffs: _diffs } }) {
|
|
31
|
-
const object = yield* Database.load(doc);
|
|
32
|
-
const content = yield* Effect.promise(() => object.content.load());
|
|
33
|
-
const accessor = createDocAccessor(content, ['content']);
|
|
34
|
-
|
|
35
|
-
yield* Function.pipe(
|
|
36
|
-
computeDiffsWithCursors(accessor, _diffs),
|
|
37
|
-
Array.map(
|
|
38
|
-
Effect.fnUntraced(function* ({ cursor, text }) {
|
|
39
|
-
const proposal = Obj.make(Message.Message, {
|
|
40
|
-
created: new Date().toISOString(),
|
|
41
|
-
sender: { role: 'assistant' },
|
|
42
|
-
blocks: [{ _tag: 'proposal', text }],
|
|
43
|
-
});
|
|
44
|
-
const thread = Thread.make({ name: 'Proposal', messages: [Ref.make(proposal)], status: 'active' });
|
|
45
|
-
const relation = Relation.make(AnchoredTo.AnchoredTo, {
|
|
46
|
-
[Relation.Source]: thread,
|
|
47
|
-
[Relation.Target]: object,
|
|
48
|
-
anchor: cursor,
|
|
49
|
-
});
|
|
50
|
-
yield* Database.add(thread);
|
|
51
|
-
yield* Database.add(relation);
|
|
52
|
-
}),
|
|
53
|
-
),
|
|
54
|
-
Effect.allWith({ concurrency: 'unbounded' }),
|
|
55
|
-
);
|
|
56
|
-
}),
|
|
57
|
-
});
|
package/src/functions/index.ts
DELETED
package/src/testing/stories.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { OperationPlugin, type Plugin } from '@dxos/app-framework';
|
|
8
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
9
|
-
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
10
|
-
import { SettingsPlugin } from '@dxos/plugin-settings';
|
|
11
|
-
import { SpacePlugin } from '@dxos/plugin-space';
|
|
12
|
-
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
13
|
-
import { Config } from '@dxos/react-client';
|
|
14
|
-
import { defaultTx } from '@dxos/ui-theme';
|
|
15
|
-
|
|
16
|
-
import { ThreadPlugin } from '../ThreadPlugin';
|
|
17
|
-
import { Channel } from '../types';
|
|
18
|
-
|
|
19
|
-
export const createThreadPlugins = async (): Promise<Array<Plugin.Plugin>> => [
|
|
20
|
-
ThemePlugin({ tx: defaultTx }),
|
|
21
|
-
ClientPlugin({
|
|
22
|
-
onClientInitialized: ({ client }) =>
|
|
23
|
-
Effect.gen(function* () {
|
|
24
|
-
yield* Effect.promise(() => client.halo.createIdentity({ displayName: 'Test User' }));
|
|
25
|
-
}),
|
|
26
|
-
onSpacesReady: ({ client }) =>
|
|
27
|
-
Effect.gen(function* () {
|
|
28
|
-
yield* Effect.promise(() => client.spaces.default.waitUntilReady());
|
|
29
|
-
client.spaces.default.db.add(Channel.make());
|
|
30
|
-
}),
|
|
31
|
-
config: new Config({
|
|
32
|
-
runtime: {
|
|
33
|
-
client: {
|
|
34
|
-
edgeFeatures: {
|
|
35
|
-
signaling: true,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
services: {
|
|
39
|
-
edge: {
|
|
40
|
-
url: 'https://edge.dxos.workers.dev/',
|
|
41
|
-
},
|
|
42
|
-
iceProviders: [
|
|
43
|
-
{
|
|
44
|
-
urls: 'https://edge.dxos.workers.dev/ice',
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
}),
|
|
50
|
-
}),
|
|
51
|
-
SpacePlugin({}),
|
|
52
|
-
OperationPlugin(),
|
|
53
|
-
SettingsPlugin(),
|
|
54
|
-
GraphPlugin(),
|
|
55
|
-
ThreadPlugin(),
|
|
56
|
-
];
|
|
File without changes
|
|
File without changes
|
/package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|