@dxos/plugin-thread 0.8.4-main.f5c0578 → 0.8.4-main.fcfe5033a5
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-VPPFFLFL.mjs +97 -0
- package/dist/lib/browser/add-message-VPPFFLFL.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +37 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-MESW3R4Q.mjs +61 -0
- package/dist/lib/browser/chunk-MESW3R4Q.mjs.map +7 -0
- package/dist/lib/browser/chunk-VPM44Z35.mjs +259 -0
- package/dist/lib/browser/chunk-VPM44Z35.mjs.map +7 -0
- package/dist/lib/browser/create-OQKG4S47.mjs +55 -0
- package/dist/lib/browser/create-OQKG4S47.mjs.map +7 -0
- package/dist/lib/browser/create-channel-EF67LCS6.mjs +21 -0
- package/dist/lib/browser/create-channel-EF67LCS6.mjs.map +7 -0
- package/dist/lib/browser/create-channel-thread-CCZTSWQ6.mjs +28 -0
- package/dist/lib/browser/create-channel-thread-CCZTSWQ6.mjs.map +7 -0
- package/dist/lib/browser/create-proposals-CMK7S7VS.mjs +57 -0
- package/dist/lib/browser/create-proposals-CMK7S7VS.mjs.map +7 -0
- package/dist/lib/browser/delete-FSFVU6ZA.mjs +59 -0
- package/dist/lib/browser/delete-FSFVU6ZA.mjs.map +7 -0
- package/dist/lib/browser/delete-message-XL5M5J33.mjs +64 -0
- package/dist/lib/browser/delete-message-XL5M5J33.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2253 -221
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-VYS2JGVT.mjs +25 -0
- package/dist/lib/browser/on-create-space-VYS2JGVT.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-2ZGMKUSD.mjs +33 -0
- package/dist/lib/browser/restore-2ZGMKUSD.mjs.map +7 -0
- package/dist/lib/browser/restore-message-OYEGWPII.mjs +42 -0
- package/dist/lib/browser/restore-message-OYEGWPII.mjs.map +7 -0
- package/dist/lib/browser/select-VG2XLULE.mjs +26 -0
- package/dist/lib/browser/select-VG2XLULE.mjs.map +7 -0
- package/dist/lib/browser/toggle-resolved-MM6YC5BU.mjs +45 -0
- package/dist/lib/browser/toggle-resolved-MM6YC5BU.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -12
- package/dist/lib/node-esm/add-message-XWKHLNS6.mjs +98 -0
- package/dist/lib/node-esm/add-message-XWKHLNS6.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +38 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-JTHXNWKJ.mjs +260 -0
- package/dist/lib/node-esm/chunk-JTHXNWKJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SDRAQNSQ.mjs +62 -0
- package/dist/lib/node-esm/chunk-SDRAQNSQ.mjs.map +7 -0
- package/dist/lib/node-esm/create-6ZOFMMYA.mjs +56 -0
- package/dist/lib/node-esm/create-6ZOFMMYA.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-UYWUNB3L.mjs +22 -0
- package/dist/lib/node-esm/create-channel-UYWUNB3L.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-thread-UQF2SBHS.mjs +29 -0
- package/dist/lib/node-esm/create-channel-thread-UQF2SBHS.mjs.map +7 -0
- package/dist/lib/node-esm/create-proposals-5FJNURKH.mjs +58 -0
- package/dist/lib/node-esm/create-proposals-5FJNURKH.mjs.map +7 -0
- package/dist/lib/node-esm/delete-WRODXR3E.mjs +60 -0
- package/dist/lib/node-esm/delete-WRODXR3E.mjs.map +7 -0
- package/dist/lib/node-esm/delete-message-TAHCYTW2.mjs +65 -0
- package/dist/lib/node-esm/delete-message-TAHCYTW2.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2253 -221
- 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-XDY2YXPV.mjs +26 -0
- package/dist/lib/node-esm/on-create-space-XDY2YXPV.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-T3QA7TSL.mjs +34 -0
- package/dist/lib/node-esm/restore-T3QA7TSL.mjs.map +7 -0
- package/dist/lib/node-esm/restore-message-WFTEVBEV.mjs +43 -0
- package/dist/lib/node-esm/restore-message-WFTEVBEV.mjs.map +7 -0
- package/dist/lib/node-esm/select-Q4UDWJJF.mjs +27 -0
- package/dist/lib/node-esm/select-Q4UDWJJF.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-resolved-33XTAK2H.mjs +46 -0
- package/dist/lib/node-esm/toggle-resolved-33XTAK2H.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -12
- package/dist/types/src/ThreadPlugin.d.ts +2 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- 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/calls/call-manager.d.ts +40 -30
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts +2 -2
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +4 -2
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
- package/dist/types/src/calls-service.stories.d.ts +10 -9
- package/dist/types/src/calls-service.stories.d.ts.map +1 -1
- 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 +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager.d.ts +3 -2
- package/dist/types/src/capabilities/call-manager.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +13 -13
- 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-root.d.ts +4 -2
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- 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/Call/Call.d.ts.map +1 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +2 -2
- 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/CommentsPanel/CommentsThread.d.ts +14 -0
- 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.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +3 -3
- package/dist/types/src/components/Media/VideoObject.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +18 -4
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- 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/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 +160 -5
- 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 -9
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts +15 -0
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +1 -0
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +2 -0
- package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/CallSidebar}/CallSidebar.d.ts +0 -1
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +1 -0
- package/dist/types/src/containers/CallSidebar/index.d.ts +2 -0
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +12 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts +162 -0
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +16 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts +162 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts +4 -0
- package/dist/types/src/containers/ChatContainer/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/index.d.ts +7 -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 +8 -3
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts +2 -3
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +2 -0
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +1 -0
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +1 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- 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/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/testing/data.d.ts +5 -0
- package/dist/types/src/testing/data.d.ts.map +1 -0
- package/dist/types/src/testing/stories.d.ts +2 -1
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +142 -72
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +715 -0
- package/dist/types/src/types/Channel.d.ts.map +1 -0
- 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 +24 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +4 -374
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +112 -67
- package/src/ThreadPlugin.tsx +108 -132
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +37 -0
- package/src/calls/call-manager.ts +77 -53
- package/src/calls/call-swarm-synchronizer.ts +2 -2
- package/src/calls/media-manager.ts +65 -36
- package/src/calls/types.ts +7 -3
- package/src/calls/util/calls-service.ts +62 -13
- package/src/calls/util/stub-media-streams.ts +62 -5
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/calls-service.stories.tsx +79 -65
- package/src/capabilities/app-graph-builder.ts +175 -163
- package/src/capabilities/blueprint-definition.ts +17 -0
- package/src/capabilities/call-manager.ts +19 -12
- package/src/capabilities/index.ts +15 -11
- package/src/capabilities/markdown.ts +50 -37
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-root.tsx +12 -9
- package/src/capabilities/react-surface.tsx +80 -78
- package/src/capabilities/settings.ts +28 -12
- package/src/capabilities/state.ts +14 -18
- package/src/capabilities/undo-mappings.ts +46 -0
- package/src/components/Call/Call.tsx +11 -7
- package/src/components/Call/Toolbar.tsx +61 -44
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +93 -0
- package/src/components/CommentsPanel/CommentsPanel.tsx +71 -0
- package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +66 -62
- package/src/components/CommentsPanel/index.ts +6 -0
- package/src/components/Lobby/Lobby.tsx +15 -12
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.stories.tsx +37 -31
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessagePanel/MessagePanel.tsx +222 -0
- package/src/components/MessagePanel/index.ts +5 -0
- package/src/components/Participant/Participant.tsx +35 -15
- package/src/components/Participant/ParticipantGrid.tsx +0 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +48 -48
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +5 -5
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +12 -9
- package/src/components/ResponsiveGrid/{ResponsiveContainer.stories.tsx → ResponsivePanel.stories.tsx} +9 -11
- package/src/components/ResponsiveGrid/{ResponsiveContainer.tsx → ResponsivePanel.tsx} +5 -5
- package/src/components/ResponsiveGrid/index.ts +1 -1
- package/src/components/ThreadSettings/ThreadSettings.stories.tsx +31 -0
- package/src/components/ThreadSettings/ThreadSettings.tsx +20 -0
- package/src/components/ThreadSettings/index.ts +5 -0
- package/src/components/index.ts +5 -12
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +173 -0
- package/src/containers/CallDebugPanel/index.ts +5 -0
- package/src/containers/CallSidebar/CallSidebar.tsx +18 -0
- package/src/containers/CallSidebar/index.ts +5 -0
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +61 -0
- package/src/{components → containers/ChannelContainer}/ChannelContainer.tsx +93 -71
- package/src/containers/ChannelContainer/index.ts +5 -0
- package/src/containers/ChatContainer/ChatContainer.stories.tsx +87 -0
- package/src/containers/ChatContainer/ChatContainer.tsx +131 -0
- package/src/containers/ChatContainer/index.ts +8 -0
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +217 -0
- package/src/containers/ThreadCompanion/index.ts +5 -0
- package/src/containers/index.ts +11 -0
- package/src/{components/command-extension.ts → extensions/command.ts} +6 -3
- package/src/extensions/index.ts +1 -0
- package/src/extensions/threads.ts +87 -42
- package/src/hooks/analytics.ts +22 -21
- package/src/hooks/index.ts +3 -1
- package/src/hooks/useBlackCanvasStreamTrack.tsx +27 -0
- package/src/hooks/useVideoStreamTrack.tsx +6 -3
- package/src/index.ts +1 -1
- package/src/meta.ts +11 -7
- 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/testing/data.ts +49 -0
- package/src/testing/stories.ts +18 -21
- package/src/translations.ts +74 -73
- package/src/types/Channel.ts +37 -0
- package/src/types/Settings.ts +10 -0
- package/src/types/capabilities.ts +36 -0
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +5 -100
- package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
- package/src/util.ts +2 -2
- package/dist/lib/browser/ChannelContainer-O2SFQJU7.mjs +0 -16
- package/dist/lib/browser/ChatContainer-PVT3DUZJ.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-AF3M7UWN.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-AF3M7UWN.mjs.map +0 -7
- package/dist/lib/browser/call-manager-XRRCAVLI.mjs +0 -24
- package/dist/lib/browser/call-manager-XRRCAVLI.mjs.map +0 -7
- package/dist/lib/browser/chunk-2CWJBXBH.mjs +0 -21
- package/dist/lib/browser/chunk-2CWJBXBH.mjs.map +0 -7
- package/dist/lib/browser/chunk-4APCDRSH.mjs +0 -18
- package/dist/lib/browser/chunk-4APCDRSH.mjs.map +0 -7
- package/dist/lib/browser/chunk-DW7JD64V.mjs +0 -137
- package/dist/lib/browser/chunk-DW7JD64V.mjs.map +0 -7
- package/dist/lib/browser/chunk-EV4JWI7L.mjs +0 -17
- package/dist/lib/browser/chunk-EV4JWI7L.mjs.map +0 -7
- package/dist/lib/browser/chunk-FY4ZRD5X.mjs +0 -367
- package/dist/lib/browser/chunk-FY4ZRD5X.mjs.map +0 -7
- package/dist/lib/browser/chunk-GERVMFQW.mjs +0 -31
- package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
- package/dist/lib/browser/chunk-J3JO5NWO.mjs +0 -477
- package/dist/lib/browser/chunk-J3JO5NWO.mjs.map +0 -7
- package/dist/lib/browser/chunk-JGKMMI65.mjs +0 -56
- package/dist/lib/browser/chunk-JGKMMI65.mjs.map +0 -7
- package/dist/lib/browser/chunk-TUFWPOVS.mjs +0 -1698
- package/dist/lib/browser/chunk-TUFWPOVS.mjs.map +0 -7
- package/dist/lib/browser/chunk-X5PIP5YR.mjs +0 -149
- package/dist/lib/browser/chunk-X5PIP5YR.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZJ7QBXK6.mjs +0 -984
- package/dist/lib/browser/chunk-ZJ7QBXK6.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-DCY4P4OX.mjs +0 -369
- package/dist/lib/browser/intent-resolver-DCY4P4OX.mjs.map +0 -7
- package/dist/lib/browser/markdown-WZSXCEZJ.mjs +0 -169
- package/dist/lib/browser/markdown-WZSXCEZJ.mjs.map +0 -7
- package/dist/lib/browser/react-root-QXPALOUQ.mjs +0 -28
- package/dist/lib/browser/react-root-QXPALOUQ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PYAMIADB.mjs +0 -109
- package/dist/lib/browser/react-surface-PYAMIADB.mjs.map +0 -7
- package/dist/lib/browser/settings-AC6YSASL.mjs +0 -22
- package/dist/lib/browser/settings-AC6YSASL.mjs.map +0 -7
- package/dist/lib/browser/state-2T4KDWBX.mjs +0 -34
- package/dist/lib/browser/state-2T4KDWBX.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-B2ZGAE4P.mjs +0 -17
- package/dist/lib/node-esm/ChannelContainer-B2ZGAE4P.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-2CT4PJ7I.mjs +0 -16
- package/dist/lib/node-esm/ChatContainer-2CT4PJ7I.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-OLSJVCWY.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-OLSJVCWY.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-EI7FXRAU.mjs +0 -25
- package/dist/lib/node-esm/call-manager-EI7FXRAU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4TME3BR4.mjs +0 -1699
- package/dist/lib/node-esm/chunk-4TME3BR4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs +0 -33
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6CRHHOST.mjs +0 -23
- package/dist/lib/node-esm/chunk-6CRHHOST.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BF4UKS55.mjs +0 -368
- package/dist/lib/node-esm/chunk-BF4UKS55.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs +0 -19
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PYTVBN5J.mjs +0 -19
- package/dist/lib/node-esm/chunk-PYTVBN5J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QBHKLWGR.mjs +0 -58
- package/dist/lib/node-esm/chunk-QBHKLWGR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SED3O2XO.mjs +0 -150
- package/dist/lib/node-esm/chunk-SED3O2XO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VNG6M2IY.mjs +0 -478
- package/dist/lib/node-esm/chunk-VNG6M2IY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XVKWHTH4.mjs +0 -138
- package/dist/lib/node-esm/chunk-XVKWHTH4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YIDU3DXK.mjs +0 -985
- package/dist/lib/node-esm/chunk-YIDU3DXK.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-QGTPU6QB.mjs +0 -370
- package/dist/lib/node-esm/intent-resolver-QGTPU6QB.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-3MZXUGUA.mjs +0 -170
- package/dist/lib/node-esm/markdown-3MZXUGUA.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-7ZFJYVUZ.mjs +0 -29
- package/dist/lib/node-esm/react-root-7ZFJYVUZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-UJFCSFNO.mjs +0 -110
- package/dist/lib/node-esm/react-surface-UJFCSFNO.mjs.map +0 -7
- package/dist/lib/node-esm/settings-N52O7MLS.mjs +0 -23
- package/dist/lib/node-esm/settings-N52O7MLS.mjs.map +0 -7
- package/dist/lib/node-esm/state-62TQKQVB.mjs +0 -35
- package/dist/lib/node-esm/state-62TQKQVB.mjs.map +0 -7
- 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/components/CallDebugPanel.d.ts +0 -8
- package/dist/types/src/components/CallDebugPanel.d.ts.map +0 -1
- 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 -10
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chat.stories.d.ts +0 -7
- package/dist/types/src/components/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -17
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -6
- 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 +0 -14
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/MessageContainer.d.ts +0 -11
- 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 -10
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ThreadComplementary.d.ts +0 -5
- package/dist/types/src/components/ThreadComplementary.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 +0 -4
- package/dist/types/src/components/testing.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -164
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -315
- package/src/components/CallDebugPanel.tsx +0 -115
- package/src/components/CallSidebar.tsx +0 -18
- package/src/components/ChannelContainer.stories.tsx +0 -59
- package/src/components/Chat.stories.tsx +0 -89
- package/src/components/ChatContainer.tsx +0 -142
- package/src/components/Comments.stories.tsx +0 -93
- package/src/components/CommentsContainer.tsx +0 -72
- package/src/components/MessageContainer.tsx +0 -152
- package/src/components/ThreadComplementary.tsx +0 -151
- package/src/components/ThreadSettings.tsx +0 -17
- package/src/components/testing.ts +0 -29
- package/src/types/schema.ts +0 -33
- /package/dist/lib/browser/{ChannelContainer-O2SFQJU7.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/ChatContainer-PVT3DUZJ.mjs.map → node-esm/chunk-HSLMI22Q.mjs.map} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Obj, Ref, Relation } from '@dxos/echo';
|
|
8
|
+
import { invariant } from '@dxos/invariant';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
11
|
+
import { Thread } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { RestoreMessage } from './definitions';
|
|
14
|
+
|
|
15
|
+
const handler: Operation.WithHandler<typeof RestoreMessage> = 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.change(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 { Obj } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
11
|
+
|
|
12
|
+
import { Restore } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof Restore> = 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/operation';
|
|
9
|
+
|
|
10
|
+
import { ThreadCapabilities } from '../types';
|
|
11
|
+
import { Select } from './definitions';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof Select> = 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 { Obj } from '@dxos/echo';
|
|
8
|
+
import { invariant } from '@dxos/invariant';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
11
|
+
|
|
12
|
+
import { ToggleResolved } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof ToggleResolved> = ToggleResolved.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* (input) {
|
|
17
|
+
const thread = input.thread;
|
|
18
|
+
|
|
19
|
+
Obj.change(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;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Obj, Ref } from '@dxos/echo';
|
|
6
|
+
import { IdentityDid } from '@dxos/keys';
|
|
7
|
+
import { random } from '@dxos/random';
|
|
8
|
+
import { type Identity } from '@dxos/react-client/halo';
|
|
9
|
+
import { Message, Thread } from '@dxos/types';
|
|
10
|
+
|
|
11
|
+
export const createCommentThread = (identity: Identity): Thread.Thread => {
|
|
12
|
+
return Thread.make({
|
|
13
|
+
name: 'Comment',
|
|
14
|
+
messages: random.helpers.multiple(
|
|
15
|
+
() =>
|
|
16
|
+
Ref.make(
|
|
17
|
+
Obj.make(Message.Message, {
|
|
18
|
+
created: new Date().toISOString(),
|
|
19
|
+
sender: {
|
|
20
|
+
identityDid: random.datatype.boolean() ? identity.did : IdentityDid.random(),
|
|
21
|
+
},
|
|
22
|
+
blocks: [{ _tag: 'text', text: random.lorem.sentences(3) }],
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
{ count: { min: 2, max: 3 } },
|
|
26
|
+
),
|
|
27
|
+
status: 'active',
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const createProposalThread = (identity: Identity): Thread.Thread => {
|
|
32
|
+
return Thread.make({
|
|
33
|
+
name: 'Proposal',
|
|
34
|
+
messages: random.helpers.multiple(
|
|
35
|
+
() =>
|
|
36
|
+
Ref.make(
|
|
37
|
+
Obj.make(Message.Message, {
|
|
38
|
+
created: new Date().toISOString(),
|
|
39
|
+
sender: {
|
|
40
|
+
identityDid: random.datatype.boolean() ? identity.did : IdentityDid.random(),
|
|
41
|
+
},
|
|
42
|
+
blocks: [{ _tag: 'proposal', text: random.lorem.sentences(3) }],
|
|
43
|
+
}),
|
|
44
|
+
),
|
|
45
|
+
{ count: { min: 1, max: 1 } },
|
|
46
|
+
),
|
|
47
|
+
status: 'active',
|
|
48
|
+
});
|
|
49
|
+
};
|
package/src/testing/stories.ts
CHANGED
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
7
8
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
8
|
-
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
9
9
|
import { SpacePlugin } from '@dxos/plugin-space';
|
|
10
|
-
import {
|
|
10
|
+
import { corePlugins } from '@dxos/plugin-testing';
|
|
11
11
|
import { Config } from '@dxos/react-client';
|
|
12
|
-
|
|
13
|
-
import {
|
|
12
|
+
|
|
13
|
+
import { Channel } from '#types';
|
|
14
14
|
|
|
15
15
|
import { ThreadPlugin } from '../ThreadPlugin';
|
|
16
|
-
import { ChannelType, ThreadType } from '../types';
|
|
17
16
|
|
|
18
|
-
export const createThreadPlugins = async () => [
|
|
19
|
-
|
|
17
|
+
export const createThreadPlugins = async (): Promise<Array<Plugin.Plugin>> => [
|
|
18
|
+
...corePlugins(),
|
|
20
19
|
ClientPlugin({
|
|
21
|
-
onClientInitialized:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
onClientInitialized: ({ client }) =>
|
|
21
|
+
Effect.gen(function* () {
|
|
22
|
+
yield* Effect.promise(() => client.halo.createIdentity({ displayName: 'Test User' }));
|
|
23
|
+
}),
|
|
24
|
+
onSpacesReady: ({ client }) =>
|
|
25
|
+
Effect.gen(function* () {
|
|
26
|
+
const space = client.spaces.get()[0];
|
|
27
|
+
space.db.add(Channel.make());
|
|
28
|
+
}),
|
|
29
29
|
config: new Config({
|
|
30
30
|
runtime: {
|
|
31
31
|
client: {
|
|
@@ -46,9 +46,6 @@ export const createThreadPlugins = async () => [
|
|
|
46
46
|
},
|
|
47
47
|
}),
|
|
48
48
|
}),
|
|
49
|
-
SpacePlugin(),
|
|
50
|
-
IntentPlugin(),
|
|
51
|
-
SettingsPlugin(),
|
|
52
|
-
GraphPlugin(),
|
|
49
|
+
SpacePlugin({}),
|
|
53
50
|
ThreadPlugin(),
|
|
54
51
|
];
|
package/src/translations.ts
CHANGED
|
@@ -2,94 +2,95 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Type } from '@dxos/echo';
|
|
5
6
|
import { type Resource } from '@dxos/react-ui';
|
|
6
7
|
|
|
7
|
-
import { meta } from '
|
|
8
|
-
import {
|
|
8
|
+
import { meta } from '#meta';
|
|
9
|
+
import { Channel } from '#types';
|
|
9
10
|
|
|
10
11
|
export const translations = [
|
|
11
12
|
{
|
|
12
13
|
'en-US': {
|
|
13
|
-
[
|
|
14
|
-
'typename
|
|
15
|
-
'typename
|
|
16
|
-
'typename
|
|
17
|
-
'typename
|
|
18
|
-
'object
|
|
19
|
-
'
|
|
20
|
-
'
|
|
14
|
+
[Type.getTypename(Channel.Channel)]: {
|
|
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',
|
|
21
24
|
},
|
|
22
25
|
[meta.id]: {
|
|
23
|
-
'plugin
|
|
24
|
-
'channel
|
|
25
|
-
'message
|
|
26
|
-
'activity
|
|
27
|
-
'anonymous
|
|
28
|
-
'delete
|
|
29
|
-
'detached
|
|
30
|
-
'delete
|
|
31
|
-
'resolve
|
|
32
|
-
'thread
|
|
33
|
-
'message
|
|
34
|
-
'comments
|
|
35
|
-
'chat
|
|
36
|
-
'draft
|
|
37
|
-
'no
|
|
38
|
-
'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':
|
|
39
42
|
'Click on the <commentIcon></commentIcon> button in the document toolbar to create a comment thread on the selected text.',
|
|
40
|
-
'toggle
|
|
41
|
-
'unnamed
|
|
42
|
-
'mark
|
|
43
|
-
'mark
|
|
44
|
-
'save
|
|
45
|
-
'edit
|
|
46
|
-
'delete
|
|
47
|
-
'
|
|
48
|
-
'comments
|
|
49
|
-
'
|
|
50
|
-
'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',
|
|
51
56
|
|
|
52
|
-
'channel
|
|
53
|
-
'call
|
|
57
|
+
'channel-companion.label': 'Channel',
|
|
58
|
+
'call-panel.label': 'Active Call',
|
|
54
59
|
|
|
55
|
-
'display
|
|
56
|
-
'display
|
|
57
|
-
'display
|
|
58
|
-
'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',
|
|
59
64
|
|
|
60
|
-
'call
|
|
61
|
-
'meeting
|
|
62
|
-
'share
|
|
63
|
-
'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',
|
|
64
70
|
|
|
65
|
-
'meeting
|
|
66
|
-
'summarize
|
|
67
|
-
'summarizing
|
|
68
|
-
'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?',
|
|
69
75
|
|
|
70
|
-
'
|
|
71
|
-
'
|
|
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',
|
|
72
91
|
|
|
73
|
-
'
|
|
74
|
-
'
|
|
75
|
-
'lobby participants_other': '{{count}} participants',
|
|
76
|
-
|
|
77
|
-
'icon pin': 'Pin video',
|
|
78
|
-
'icon unpin': 'Unpin video',
|
|
79
|
-
'icon wave': 'Waving',
|
|
80
|
-
'icon muted': 'Muted',
|
|
81
|
-
'icon speaking': 'Speaking',
|
|
82
|
-
|
|
83
|
-
'mic on': 'Unmute',
|
|
84
|
-
'mic off': 'Mute',
|
|
85
|
-
'camera on': 'Turn camera on',
|
|
86
|
-
'camera off': 'Turn camera off',
|
|
87
|
-
'camera off label': 'Camera off',
|
|
88
|
-
|
|
89
|
-
'raise hand': 'Raise hand',
|
|
90
|
-
'lower hand': 'Lower hand',
|
|
91
|
-
'screenshare on': 'Share screen',
|
|
92
|
-
'screenshare off': 'Stop streaming',
|
|
92
|
+
'channel-toolbar.title': 'Channel actions',
|
|
93
|
+
'start-video-call.menu': 'Start video call',
|
|
93
94
|
},
|
|
94
95
|
},
|
|
95
96
|
},
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
10
|
+
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
11
|
+
import { Thread } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
// TODO(burdon): What is the difference between Thread and Channel.
|
|
14
|
+
export const Channel = Schema.Struct({
|
|
15
|
+
name: Schema.optional(Schema.String),
|
|
16
|
+
defaultThread: Ref.Ref(Thread.Thread).pipe(FormInputAnnotation.set(false)),
|
|
17
|
+
// TODO(wittjosiah): Should be an "ordered collection".
|
|
18
|
+
threads: Ref.Ref(Thread.Thread).pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
19
|
+
}).pipe(
|
|
20
|
+
Type.object({
|
|
21
|
+
typename: 'org.dxos.type.channel',
|
|
22
|
+
version: '0.1.0',
|
|
23
|
+
}),
|
|
24
|
+
Annotation.IconAnnotation.set({
|
|
25
|
+
icon: 'ph--hash--regular',
|
|
26
|
+
hue: 'rose',
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export interface Channel extends Schema.Schema.Type<typeof Channel> {}
|
|
31
|
+
|
|
32
|
+
export const make = (props: Pick<Obj.MakeProps<typeof Channel>, 'name'> = {}) =>
|
|
33
|
+
Obj.make(Channel, {
|
|
34
|
+
...props,
|
|
35
|
+
defaultThread: Ref.make(Obj.make(Thread.Thread, { messages: [], status: 'active' })),
|
|
36
|
+
threads: [],
|
|
37
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
import { type CallManager, type CallState, type MediaState } from '../calls';
|
|
12
|
+
import { type Channel, type ThreadState, type ViewStore } from '../types';
|
|
13
|
+
import * as Settings from './Settings';
|
|
14
|
+
|
|
15
|
+
export namespace ThreadCapabilities {
|
|
16
|
+
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);
|
|
17
|
+
export const CallManager = Capability.make<CallManager>(`${meta.id}.capability.call-manager`);
|
|
18
|
+
|
|
19
|
+
// TODO(burdon): Better way to define specific extensions for meeting companions.
|
|
20
|
+
// TODO(burdon): This brings in deps from ../calls; how should we manage/minimize explicit type exposure to other plugins?
|
|
21
|
+
// TODO(wittjosiah): These callbacks could be intents once we support broadcast.
|
|
22
|
+
export type CallProperties = {
|
|
23
|
+
onJoin: (state: { channel?: Channel.Channel; roomId?: string }) => Promise<void>;
|
|
24
|
+
onLeave: (roomId?: string) => Promise<void>;
|
|
25
|
+
onCallStateUpdated: (callState: CallState) => Promise<void>;
|
|
26
|
+
onMediaStateUpdated: ([mediaState, isSpeaking]: [MediaState, boolean]) => Promise<void>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const CallExtension = Capability.make<CallProperties>(`${meta.id}.capability.call-extension`);
|
|
30
|
+
|
|
31
|
+
/** Thread state (drafts, toolbar state, current selection). */
|
|
32
|
+
export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}.capability.state`);
|
|
33
|
+
|
|
34
|
+
/** Per-subject view state (e.g., showResolvedThreads). */
|
|
35
|
+
export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}.capability.view-state`);
|
|
36
|
+
}
|
package/src/types/index.ts
CHANGED
package/src/types/types.ts
CHANGED
|
@@ -2,108 +2,12 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { AnchoredTo, Thread } from '@dxos/types';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
import { EchoObjectSchema, SpaceSchema } from '@dxos/react-client/echo';
|
|
9
|
-
import { AnchoredTo, DataType } from '@dxos/schema';
|
|
10
|
-
|
|
11
|
-
import { THREAD_PLUGIN } from '../meta';
|
|
12
|
-
|
|
13
|
-
import { ChannelType, ThreadType } from './schema';
|
|
14
|
-
|
|
15
|
-
export namespace ThreadAction {
|
|
16
|
-
const THREAD_ACTION = `${THREAD_PLUGIN}/action`;
|
|
17
|
-
|
|
18
|
-
export class OnSpaceCreated extends Schema.TaggedClass<OnSpaceCreated>()(`${THREAD_ACTION}/on-space-created`, {
|
|
19
|
-
input: Schema.Struct({
|
|
20
|
-
space: SpaceSchema,
|
|
21
|
-
rootCollection: DataType.Collection,
|
|
22
|
-
}),
|
|
23
|
-
output: Schema.Void,
|
|
24
|
-
}) {}
|
|
25
|
-
|
|
26
|
-
export class CreateChannel extends Schema.TaggedClass<CreateChannel>()(`${THREAD_ACTION}/create-channel`, {
|
|
27
|
-
input: Schema.Struct({
|
|
28
|
-
spaceId: Type.SpaceId,
|
|
29
|
-
name: Schema.optional(Schema.String),
|
|
30
|
-
}),
|
|
31
|
-
output: Schema.Struct({
|
|
32
|
-
object: ChannelType,
|
|
33
|
-
}),
|
|
34
|
-
}) {}
|
|
35
|
-
|
|
36
|
-
export class CreateChannelThread extends Schema.TaggedClass<CreateChannelThread>()(
|
|
37
|
-
`${THREAD_ACTION}/create-channel-thread`,
|
|
38
|
-
{
|
|
39
|
-
input: Schema.Struct({
|
|
40
|
-
channel: ChannelType,
|
|
41
|
-
}),
|
|
42
|
-
output: Schema.Struct({
|
|
43
|
-
object: ThreadType,
|
|
44
|
-
}),
|
|
45
|
-
},
|
|
46
|
-
) {}
|
|
47
|
-
|
|
48
|
-
export class Create extends Schema.TaggedClass<Create>()(`${THREAD_ACTION}/create`, {
|
|
49
|
-
input: Schema.Struct({
|
|
50
|
-
name: Schema.optional(Schema.String),
|
|
51
|
-
anchor: Schema.optional(Schema.String),
|
|
52
|
-
subject: EchoObjectSchema,
|
|
53
|
-
}),
|
|
54
|
-
output: Schema.Void,
|
|
55
|
-
}) {}
|
|
56
|
-
|
|
57
|
-
export class Delete extends Schema.TaggedClass<Delete>()(`${THREAD_ACTION}/delete`, {
|
|
58
|
-
input: Schema.Struct({
|
|
59
|
-
anchor: AnchoredTo,
|
|
60
|
-
subject: EchoObjectSchema,
|
|
61
|
-
thread: Schema.optional(ThreadType),
|
|
62
|
-
}),
|
|
63
|
-
output: Schema.Void,
|
|
64
|
-
}) {}
|
|
65
|
-
|
|
66
|
-
export class Select extends Schema.TaggedClass<Select>()(`${THREAD_ACTION}/select`, {
|
|
67
|
-
input: Schema.Struct({
|
|
68
|
-
current: Schema.String,
|
|
69
|
-
}),
|
|
70
|
-
output: Schema.Void,
|
|
71
|
-
}) {}
|
|
72
|
-
|
|
73
|
-
export class ToggleResolved extends Schema.TaggedClass<ToggleResolved>()(`${THREAD_ACTION}/toggle-resolved`, {
|
|
74
|
-
input: Schema.Struct({
|
|
75
|
-
thread: ThreadType,
|
|
76
|
-
}),
|
|
77
|
-
output: Schema.Void,
|
|
78
|
-
}) {}
|
|
79
|
-
|
|
80
|
-
export class AddMessage extends Schema.TaggedClass<AddMessage>()(`${THREAD_ACTION}/add-message`, {
|
|
81
|
-
input: Schema.Struct({
|
|
82
|
-
subject: EchoObjectSchema,
|
|
83
|
-
anchor: AnchoredTo,
|
|
84
|
-
sender: DataType.Actor,
|
|
85
|
-
text: Schema.String,
|
|
86
|
-
}),
|
|
87
|
-
output: Schema.Void,
|
|
88
|
-
}) {}
|
|
89
|
-
|
|
90
|
-
export class DeleteMessage extends Schema.TaggedClass<DeleteMessage>()(`${THREAD_ACTION}/delete-message`, {
|
|
91
|
-
input: Schema.Struct({
|
|
92
|
-
anchor: AnchoredTo,
|
|
93
|
-
subject: EchoObjectSchema,
|
|
94
|
-
messageId: Schema.String,
|
|
95
|
-
message: Schema.optional(DataType.Message),
|
|
96
|
-
messageIndex: Schema.optional(Schema.Number),
|
|
97
|
-
}),
|
|
98
|
-
output: Schema.Void,
|
|
99
|
-
}) {}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export const ThreadSettingsSchema = Schema.mutable(Schema.Struct({}));
|
|
103
|
-
export type ThreadSettingsProps = Schema.Schema.Type<typeof ThreadSettingsSchema>;
|
|
7
|
+
export * as Settings from './Settings';
|
|
104
8
|
|
|
105
9
|
export interface ThreadModel {
|
|
106
|
-
root:
|
|
10
|
+
root: Thread.Thread;
|
|
107
11
|
}
|
|
108
12
|
|
|
109
13
|
type SubjectId = string;
|
|
@@ -114,6 +18,7 @@ export type ThreadState = {
|
|
|
114
18
|
/** Object toolbar state. */
|
|
115
19
|
toolbar: Record<string, boolean>;
|
|
116
20
|
/** In-memory draft threads. */
|
|
117
|
-
|
|
21
|
+
// TODO(burdon): Drafts are getting lost.
|
|
22
|
+
drafts: Record<string, AnchoredTo.AnchoredTo[]>;
|
|
118
23
|
current?: string | undefined;
|
|
119
24
|
};
|
|
@@ -22,7 +22,23 @@ declare module '@peermetrics/webrtc-stats' {
|
|
|
22
22
|
connectionId: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
type TrackStats = {
|
|
26
|
+
id: string;
|
|
27
|
+
kind: 'audio' | 'video';
|
|
28
|
+
codecId: string;
|
|
29
|
+
mid: string;
|
|
30
|
+
bytesSent: number;
|
|
31
|
+
bytesReceived: number;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type WebRTCStatsEvent = {
|
|
35
|
+
data: {
|
|
36
|
+
audio: { inbound: TrackStats[]; outbound: TrackStats[] };
|
|
37
|
+
video: { inbound: TrackStats[]; outbound: TrackStats[] };
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export class WebRTCStats extends EventEmitter<{ stats: WebRTCStatsEvent }> {
|
|
26
42
|
constructor(options: WebRTCStatsConstructorOptions);
|
|
27
43
|
addConnection(info: ConnectionInfo): void;
|
|
28
44
|
removeConnection(info: Pick<ConnectionInfo, 'pc'>): void;
|