@dxos/plugin-thread 0.8.4-main.ae835ea → 0.8.4-main.bcb3aa67d6
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-RNUQFJTH.mjs +97 -0
- package/dist/lib/browser/add-message-RNUQFJTH.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-BHQ62SKT.mjs +259 -0
- package/dist/lib/browser/chunk-BHQ62SKT.mjs.map +7 -0
- package/dist/lib/browser/chunk-H32XEGIV.mjs +61 -0
- package/dist/lib/browser/chunk-H32XEGIV.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/create-UWYTS35R.mjs +55 -0
- package/dist/lib/browser/create-UWYTS35R.mjs.map +7 -0
- package/dist/lib/browser/create-channel-7RX3G7QV.mjs +21 -0
- package/dist/lib/browser/create-channel-7RX3G7QV.mjs.map +7 -0
- package/dist/lib/browser/create-channel-thread-ZA7IVGTL.mjs +28 -0
- package/dist/lib/browser/create-channel-thread-ZA7IVGTL.mjs.map +7 -0
- package/dist/lib/browser/create-proposals-74FZ3XTC.mjs +57 -0
- package/dist/lib/browser/create-proposals-74FZ3XTC.mjs.map +7 -0
- package/dist/lib/browser/delete-SJBDYXW3.mjs +59 -0
- package/dist/lib/browser/delete-SJBDYXW3.mjs.map +7 -0
- package/dist/lib/browser/delete-message-AHSDDYXK.mjs +64 -0
- package/dist/lib/browser/delete-message-AHSDDYXK.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +2250 -229
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-YNZHJSZ5.mjs +25 -0
- package/dist/lib/browser/on-create-space-YNZHJSZ5.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-X2K3ZKFD.mjs +33 -0
- package/dist/lib/browser/restore-X2K3ZKFD.mjs.map +7 -0
- package/dist/lib/browser/restore-message-EHSQSLM3.mjs +42 -0
- package/dist/lib/browser/restore-message-EHSQSLM3.mjs.map +7 -0
- package/dist/lib/browser/select-GKW3QALS.mjs +26 -0
- package/dist/lib/browser/select-GKW3QALS.mjs.map +7 -0
- package/dist/lib/browser/toggle-resolved-Y5KJLQO3.mjs +45 -0
- package/dist/lib/browser/toggle-resolved-Y5KJLQO3.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +6 -8
- package/dist/lib/node-esm/add-message-R3XLXRZ5.mjs +98 -0
- package/dist/lib/node-esm/add-message-R3XLXRZ5.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-BAKHDRSB.mjs +260 -0
- package/dist/lib/node-esm/chunk-BAKHDRSB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-M6EZRL5B.mjs +62 -0
- package/dist/lib/node-esm/chunk-M6EZRL5B.mjs.map +7 -0
- package/dist/lib/node-esm/create-SKEKGLSD.mjs +56 -0
- package/dist/lib/node-esm/create-SKEKGLSD.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-4UICXKGI.mjs +22 -0
- package/dist/lib/node-esm/create-channel-4UICXKGI.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-thread-EWDR3J44.mjs +29 -0
- package/dist/lib/node-esm/create-channel-thread-EWDR3J44.mjs.map +7 -0
- package/dist/lib/node-esm/create-proposals-SASCDSNZ.mjs +58 -0
- package/dist/lib/node-esm/create-proposals-SASCDSNZ.mjs.map +7 -0
- package/dist/lib/node-esm/delete-IGQXPUHX.mjs +60 -0
- package/dist/lib/node-esm/delete-IGQXPUHX.mjs.map +7 -0
- package/dist/lib/node-esm/delete-message-IEJYQNZY.mjs +65 -0
- package/dist/lib/node-esm/delete-message-IEJYQNZY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +2250 -229
- 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-UGALNIWK.mjs +26 -0
- package/dist/lib/node-esm/on-create-space-UGALNIWK.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-4EAMGSOF.mjs +34 -0
- package/dist/lib/node-esm/restore-4EAMGSOF.mjs.map +7 -0
- package/dist/lib/node-esm/restore-message-2Z6KR3RJ.mjs +43 -0
- package/dist/lib/node-esm/restore-message-2Z6KR3RJ.mjs.map +7 -0
- package/dist/lib/node-esm/select-MLVUUPYK.mjs +27 -0
- package/dist/lib/node-esm/select-MLVUUPYK.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-resolved-Y2FRSWZ3.mjs +46 -0
- package/dist/lib/node-esm/toggle-resolved-Y2FRSWZ3.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +6 -8
- 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 +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +1 -1
- package/dist/types/src/calls/util/calls-service.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 +2 -2
- 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 -14
- 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 +4 -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 +1 -1
- 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 +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +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/ResponsiveGrid/ResponsiveGrid.stories.d.ts +142 -140
- 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 +3 -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/{components → containers/CallDebugPanel}/CallDebugPanel.d.ts +1 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +1 -0
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +3 -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 +3 -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 +3 -0
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +20 -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 +3 -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 -2
- package/dist/types/src/hooks/index.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 +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-message.d.ts +5 -0
- package/dist/types/src/operations/add-message.d.ts.map +1 -0
- package/dist/types/src/operations/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 +2789 -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} +2 -2
- 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 +140 -138
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +707 -12
- package/dist/types/src/types/Channel.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +4 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +23 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3 -443
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +108 -65
- package/src/ThreadPlugin.tsx +78 -112
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +37 -0
- package/src/calls/call-manager.ts +76 -52
- package/src/calls/call-swarm-synchronizer.ts +2 -2
- package/src/calls/media-manager.ts +10 -7
- package/src/calls/util/calls-service.ts +1 -1
- package/src/calls/util/stub-media-streams.ts +2 -2
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/calls-service.stories.tsx +8 -8
- package/src/capabilities/app-graph-builder.ts +171 -165
- package/src/capabilities/blueprint-definition.ts +17 -0
- package/src/capabilities/call-manager.ts +18 -12
- package/src/capabilities/index.ts +15 -12
- package/src/capabilities/markdown.ts +49 -37
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-root.tsx +12 -9
- package/src/capabilities/react-surface.tsx +83 -77
- package/src/capabilities/settings.ts +27 -12
- package/src/capabilities/state.ts +14 -18
- package/src/capabilities/undo-mappings.ts +46 -0
- package/src/components/Call/Call.tsx +10 -6
- package/src/components/Call/Toolbar.tsx +57 -40
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +94 -0
- package/src/components/{CommentsContainer.tsx → CommentsPanel/CommentsPanel.tsx} +19 -20
- package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +43 -45
- package/src/components/CommentsPanel/index.ts +6 -0
- package/src/components/Lobby/Lobby.tsx +14 -12
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.stories.tsx +6 -6
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/{MessageContainer.tsx → MessagePanel/MessagePanel.tsx} +71 -40
- package/src/components/MessagePanel/index.ts +5 -0
- package/src/components/Participant/Participant.tsx +32 -19
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +5 -5
- 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} +7 -7
- 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 +32 -0
- package/src/components/ThreadSettings/ThreadSettings.tsx +20 -0
- package/src/components/ThreadSettings/index.ts +7 -0
- package/src/components/index.ts +5 -12
- package/src/{components → containers/CallDebugPanel}/CallDebugPanel.tsx +14 -16
- package/src/containers/CallDebugPanel/index.ts +7 -0
- package/src/containers/CallSidebar/CallSidebar.tsx +17 -0
- package/src/containers/CallSidebar/index.ts +7 -0
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +59 -0
- package/src/{components → containers/ChannelContainer}/ChannelContainer.tsx +94 -76
- package/src/containers/ChannelContainer/index.ts +7 -0
- package/src/{components/Chat.stories.tsx → containers/ChatContainer/ChatContainer.stories.tsx} +21 -19
- package/src/containers/ChatContainer/ChatContainer.tsx +130 -0
- package/src/containers/ChatContainer/index.ts +8 -0
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +217 -0
- package/src/containers/ThreadCompanion/index.ts +7 -0
- package/src/containers/index.ts +11 -0
- package/src/{components/command-extension.ts → extensions/command.ts} +3 -3
- package/src/extensions/index.ts +1 -0
- package/src/extensions/threads.ts +83 -38
- package/src/hooks/analytics.ts +22 -21
- package/src/hooks/index.ts +3 -2
- package/src/index.ts +1 -1
- package/src/meta.ts +4 -4
- package/src/operations/add-message.ts +82 -0
- package/src/operations/create-channel-thread.ts +26 -0
- package/src/operations/create-channel.ts +21 -0
- package/src/operations/create-proposals.ts +49 -0
- package/src/operations/create.ts +49 -0
- package/src/operations/definitions.ts +177 -0
- package/src/operations/delete-message.ts +53 -0
- package/src/operations/delete.ts +64 -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 +25 -0
- package/src/operations/toggle-resolved.ts +41 -0
- package/src/{components/testing.ts → testing/data.ts} +3 -5
- package/src/testing/stories.ts +16 -17
- package/src/translations.ts +72 -74
- package/src/types/Channel.ts +21 -11
- package/src/types/Settings.ts +10 -0
- package/src/types/capabilities.ts +35 -0
- package/src/types/index.ts +1 -1
- package/src/types/types.ts +4 -108
- package/src/util.ts +1 -1
- package/dist/lib/browser/ChannelContainer-SVV4ZX5T.mjs +0 -16
- package/dist/lib/browser/ChatContainer-ALFWQ65B.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs.map +0 -7
- package/dist/lib/browser/call-manager-P3MYR2JS.mjs +0 -24
- package/dist/lib/browser/call-manager-P3MYR2JS.mjs.map +0 -7
- package/dist/lib/browser/chunk-6CUDBEYP.mjs +0 -377
- package/dist/lib/browser/chunk-6CUDBEYP.mjs.map +0 -7
- package/dist/lib/browser/chunk-BBTXGRIR.mjs +0 -18
- package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +0 -7
- package/dist/lib/browser/chunk-CP7E2HRE.mjs +0 -31
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +0 -7
- package/dist/lib/browser/chunk-DJOUMWEL.mjs +0 -988
- package/dist/lib/browser/chunk-DJOUMWEL.mjs.map +0 -7
- package/dist/lib/browser/chunk-HDEQRBOC.mjs +0 -181
- package/dist/lib/browser/chunk-HDEQRBOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQSXEHOW.mjs +0 -618
- package/dist/lib/browser/chunk-IQSXEHOW.mjs.map +0 -7
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs +0 -27
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-L6F2AG6W.mjs +0 -23
- package/dist/lib/browser/chunk-L6F2AG6W.mjs.map +0 -7
- package/dist/lib/browser/chunk-US5ZQYC3.mjs +0 -1793
- package/dist/lib/browser/chunk-US5ZQYC3.mjs.map +0 -7
- package/dist/lib/browser/chunk-UTSLSZED.mjs +0 -178
- package/dist/lib/browser/chunk-UTSLSZED.mjs.map +0 -7
- package/dist/lib/browser/chunk-XYUJXHYV.mjs +0 -106
- package/dist/lib/browser/chunk-XYUJXHYV.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5POQTZ24.mjs +0 -419
- package/dist/lib/browser/intent-resolver-5POQTZ24.mjs.map +0 -7
- package/dist/lib/browser/markdown-L7LDNF56.mjs +0 -169
- package/dist/lib/browser/markdown-L7LDNF56.mjs.map +0 -7
- package/dist/lib/browser/react-root-RCJLK4EP.mjs +0 -28
- package/dist/lib/browser/react-root-RCJLK4EP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IC576W2W.mjs +0 -109
- package/dist/lib/browser/react-surface-IC576W2W.mjs.map +0 -7
- package/dist/lib/browser/settings-5FYGBOGI.mjs +0 -22
- package/dist/lib/browser/settings-5FYGBOGI.mjs.map +0 -7
- package/dist/lib/browser/state-36REWXO5.mjs +0 -34
- package/dist/lib/browser/state-36REWXO5.mjs.map +0 -7
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs +0 -74
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs +0 -17
- package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-MFKPXMIK.mjs +0 -16
- package/dist/lib/node-esm/ChatContainer-MFKPXMIK.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs +0 -25
- package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2MMJF7DW.mjs +0 -182
- package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs +0 -108
- package/dist/lib/node-esm/chunk-2V3WSLUZ.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-AFDO2SUZ.mjs +0 -25
- package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs +0 -1794
- package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs +0 -378
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs +0 -619
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QCQAAU6J.mjs +0 -989
- package/dist/lib/node-esm/chunk-QCQAAU6J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs +0 -179
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs +0 -28
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +0 -19
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs +0 -420
- package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs +0 -170
- package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs +0 -29
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs +0 -110
- package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-EOBQUZSW.mjs +0 -23
- package/dist/lib/node-esm/settings-EOBQUZSW.mjs.map +0 -7
- package/dist/lib/node-esm/state-X3W67GTL.mjs +0 -35
- package/dist/lib/node-esm/state-X3W67GTL.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs +0 -75
- package/dist/lib/node-esm/toolkit-X2KA4FNC.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/capabilities/toolkit.d.ts +0 -24
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- 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 -160
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chat.stories.d.ts +0 -160
- package/dist/types/src/components/Chat.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChatContainer.d.ts +0 -18
- package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -158
- package/dist/types/src/components/Comments.stories.d.ts.map +0 -1
- package/dist/types/src/components/CommentsContainer.d.ts +0 -13
- package/dist/types/src/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +0 -14
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/MessageContainer.d.ts +0 -14
- package/dist/types/src/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -162
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/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.map +0 -1
- package/dist/types/src/types/Thread.d.ts +0 -167
- package/dist/types/src/types/Thread.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -344
- package/src/capabilities/toolkit.ts +0 -85
- package/src/components/CallSidebar.tsx +0 -18
- package/src/components/ChannelContainer.stories.tsx +0 -59
- package/src/components/ChatContainer.tsx +0 -154
- package/src/components/Comments.stories.tsx +0 -91
- package/src/components/ThreadComplementary.tsx +0 -181
- package/src/components/ThreadSettings.tsx +0 -16
- package/src/types/Thread.ts +0 -26
- /package/dist/lib/browser/{ChannelContainer-SVV4ZX5T.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/ChatContainer-ALFWQ65B.mjs.map → node-esm/chunk-HSLMI22Q.mjs.map} +0 -0
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
5
6
|
import React, { memo, useMemo } from 'react';
|
|
6
7
|
|
|
7
|
-
import { useCapability } from '@dxos/app-framework';
|
|
8
|
+
import { useCapability } from '@dxos/app-framework/ui';
|
|
8
9
|
|
|
9
10
|
import { type EncodedTrackName, type UserState } from '../../calls';
|
|
10
|
-
import { ThreadCapabilities } from '
|
|
11
|
+
import { ThreadCapabilities } from '#types';
|
|
11
12
|
import { VideoObject } from '../Media';
|
|
12
13
|
import { ResponsiveGridItem, type ResponsiveGridItemProps } from '../ResponsiveGrid';
|
|
13
14
|
|
|
@@ -15,27 +16,39 @@ export const SCREENSHARE_SUFFIX = '_screenshare';
|
|
|
15
16
|
|
|
16
17
|
export const Participant = memo(({ item: user, debug, ...props }: ResponsiveGridItemProps<UserState>) => {
|
|
17
18
|
const call = useCapability(ThreadCapabilities.CallManager);
|
|
18
|
-
const
|
|
19
|
+
const self = useAtomValue(call.selfAtom);
|
|
20
|
+
const media = useAtomValue(call.mediaAtom);
|
|
21
|
+
const isSelf: boolean = self.id !== undefined && user.id !== undefined && user.id.startsWith(self.id);
|
|
19
22
|
const isScreenshare = user.id?.endsWith(SCREENSHARE_SUFFIX);
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
// Get pulled video stream for non-self users.
|
|
25
|
+
const pulledVideoStream = useMemo<MediaStream | undefined>(() => {
|
|
26
|
+
if (isSelf) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
const trackName =
|
|
30
|
+
isScreenshare && user.tracks?.screenshareEnabled
|
|
31
|
+
? (user.tracks?.screenshare as EncodedTrackName)
|
|
32
|
+
: !isScreenshare && user.tracks?.videoEnabled
|
|
33
|
+
? (user.tracks?.video as EncodedTrackName)
|
|
34
|
+
: undefined;
|
|
35
|
+
return trackName ? media.pulledVideoStreams[trackName]?.stream : undefined;
|
|
36
|
+
}, [
|
|
37
|
+
isSelf,
|
|
38
|
+
isScreenshare,
|
|
39
|
+
media.pulledVideoStreams,
|
|
40
|
+
user.tracks?.screenshare,
|
|
41
|
+
user.tracks?.video,
|
|
42
|
+
user.tracks?.screenshareEnabled,
|
|
43
|
+
user.tracks?.videoEnabled,
|
|
44
|
+
]);
|
|
27
45
|
|
|
28
46
|
const videoStream = useMemo<MediaStream | undefined>(() => {
|
|
29
47
|
if (isSelf) {
|
|
30
|
-
|
|
31
|
-
return call.media.screenshareVideoStream;
|
|
32
|
-
} else if (!isScreenshare) {
|
|
33
|
-
return call.media.videoStream;
|
|
34
|
-
}
|
|
35
|
-
} else if (!isSelf) {
|
|
36
|
-
return pulledVideoStream;
|
|
48
|
+
return isScreenshare ? media.screenshareVideoStream : media.videoStream;
|
|
37
49
|
}
|
|
38
|
-
|
|
50
|
+
return pulledVideoStream;
|
|
51
|
+
}, [isSelf, isScreenshare, media.videoStream, media.screenshareVideoStream, pulledVideoStream]);
|
|
39
52
|
|
|
40
53
|
return (
|
|
41
54
|
<ResponsiveGridItem
|
|
@@ -43,8 +56,8 @@ export const Participant = memo(({ item: user, debug, ...props }: ResponsiveGrid
|
|
|
43
56
|
item={user}
|
|
44
57
|
name={user.name}
|
|
45
58
|
self={isSelf}
|
|
46
|
-
screenshare={!!
|
|
47
|
-
video={
|
|
59
|
+
screenshare={!!media.screenshareVideoStream}
|
|
60
|
+
video={media.videoEnabled}
|
|
48
61
|
mute={user ? !user.tracks?.audioEnabled : false}
|
|
49
62
|
wave={user.raisedHand}
|
|
50
63
|
speaking={user.speaking}
|
|
@@ -6,7 +6,7 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
|
6
6
|
import React, { useEffect, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { faker } from '@dxos/random';
|
|
9
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
9
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
10
10
|
|
|
11
11
|
import { translations } from '../../translations';
|
|
12
12
|
|
|
@@ -53,9 +53,9 @@ const TestCell = ({ item, ...props }: ResponsiveGridItemProps<TestItem>) => {
|
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
type
|
|
56
|
+
type DefaultStoryProps = ResponsiveGridProps<TestItem> & { random?: boolean; autoHideGallery?: boolean };
|
|
57
57
|
|
|
58
|
-
const DefaultStory = (props:
|
|
58
|
+
const DefaultStory = (props: DefaultStoryProps) => {
|
|
59
59
|
const [pinned, setPinned] = useState<string | undefined>(
|
|
60
60
|
(props.pinned ?? props.items.length > 1) ? props.items[0]?.id : undefined,
|
|
61
61
|
);
|
|
@@ -89,10 +89,10 @@ const DefaultStory = (props: StoryProps) => {
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
const meta = {
|
|
92
|
-
title: 'plugins/plugin-thread/ResponsiveGrid',
|
|
92
|
+
title: 'plugins/plugin-thread/components/ResponsiveGrid',
|
|
93
93
|
component: ResponsiveGrid as any,
|
|
94
94
|
render: DefaultStory,
|
|
95
|
-
decorators: [withTheme],
|
|
95
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
96
96
|
parameters: {
|
|
97
97
|
layout: 'fullscreen',
|
|
98
98
|
translations,
|
|
@@ -8,9 +8,9 @@ import { useResizeDetector } from 'react-resize-detector';
|
|
|
8
8
|
import { invariant } from '@dxos/invariant';
|
|
9
9
|
import { type ThemedClassName } from '@dxos/react-ui';
|
|
10
10
|
import { type Size } from '@dxos/react-ui-dnd';
|
|
11
|
-
import { mx } from '@dxos/
|
|
11
|
+
import { mx } from '@dxos/ui-theme';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { ResponsivePanel } from './ResponsivePanel';
|
|
14
14
|
import { type ResponsiveGridItemProps } from './ResponsiveGridItem';
|
|
15
15
|
|
|
16
16
|
const ASPECT_RATIO = 16 / 9;
|
|
@@ -136,7 +136,7 @@ export const ResponsiveGrid = <T extends object = any>({
|
|
|
136
136
|
);
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
|
-
<div ref={containerRef} className={mx('
|
|
139
|
+
<div ref={containerRef} className={mx('dx-expander relative', classNames)}>
|
|
140
140
|
{/* Placeholder elements to calculate layout. */}
|
|
141
141
|
<div className='absolute inset-0 flex flex-col grow gap-2'>
|
|
142
142
|
{/* Pinned item. */}
|
|
@@ -206,7 +206,7 @@ export const ResponsiveGrid = <T extends object = any>({
|
|
|
206
206
|
|
|
207
207
|
const SoloItem: FC<Pick<ResponsiveGridProps, 'debug'> & { id: string }> = ({ debug, id }) => {
|
|
208
208
|
return (
|
|
209
|
-
<
|
|
209
|
+
<ResponsivePanel>
|
|
210
210
|
<div
|
|
211
211
|
{...{ 'data-grid-item': id }}
|
|
212
212
|
className={mx('aspect-video overflow-hidden', debug && 'z-20 border-2 border-primary-500')}
|
|
@@ -214,7 +214,7 @@ const SoloItem: FC<Pick<ResponsiveGridProps, 'debug'> & { id: string }> = ({ deb
|
|
|
214
214
|
{/* Maximum size placeholder image forces aspect ratio. */}
|
|
215
215
|
<img alt='placeholder video' className={mx('opacity-0', maxImageSize)} />
|
|
216
216
|
</div>
|
|
217
|
-
</
|
|
217
|
+
</ResponsivePanel>
|
|
218
218
|
);
|
|
219
219
|
};
|
|
220
220
|
|
|
@@ -6,9 +6,9 @@ import React, { type CSSProperties, type PropsWithChildren, useEffect, useState
|
|
|
6
6
|
|
|
7
7
|
import { Icon, IconButton, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
import { Waveform } from '@dxos/react-ui-sfx';
|
|
9
|
-
import { groupHoverControlItemWithTransition, mx } from '@dxos/
|
|
9
|
+
import { groupHoverControlItemWithTransition, mx } from '@dxos/ui-theme';
|
|
10
10
|
|
|
11
|
-
import { meta } from '
|
|
11
|
+
import { meta } from '#meta';
|
|
12
12
|
|
|
13
13
|
export type ResponsiveGridItemProps<T extends object = any> = PropsWithChildren<
|
|
14
14
|
ThemedClassName<{
|
|
@@ -49,12 +49,12 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
49
49
|
const iconProps: Record<string, { icon: string; label: string; classNames?: string }> = {
|
|
50
50
|
wave: {
|
|
51
51
|
icon: 'ph--hand-waving--duotone',
|
|
52
|
-
label: t('icon
|
|
52
|
+
label: t('icon-wave.label'),
|
|
53
53
|
classNames: 'animate-pulse bg-orange-500',
|
|
54
54
|
},
|
|
55
55
|
mute: {
|
|
56
56
|
icon: 'ph--microphone-slash--regular',
|
|
57
|
-
label: t('icon
|
|
57
|
+
label: t('icon-muted.label'),
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
60
|
|
|
@@ -76,7 +76,7 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
76
76
|
return (
|
|
77
77
|
<div
|
|
78
78
|
className={mx(
|
|
79
|
-
'
|
|
79
|
+
'dx-expander relative group',
|
|
80
80
|
'rounded-md outline outline-2 outline-neutral-900 transition-[outline-color] duration-500',
|
|
81
81
|
speakingIndicator ? 'outline-green-500' : !video && 'outline-separator',
|
|
82
82
|
classNames,
|
|
@@ -89,11 +89,11 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
89
89
|
{onClick && (
|
|
90
90
|
<div className='z-10 absolute top-1 right-1 flex'>
|
|
91
91
|
<IconButton
|
|
92
|
-
classNames={mx('p-1 min-
|
|
92
|
+
classNames={mx('p-1 min-h-1 rounded-sm', groupHoverControlItemWithTransition)}
|
|
93
93
|
iconOnly
|
|
94
94
|
icon={pinned ? 'ph--x--regular' : 'ph--arrows-out--regular'}
|
|
95
95
|
size={pinned ? 5 : 4}
|
|
96
|
-
label={pinned ? t('icon
|
|
96
|
+
label={pinned ? t('icon-unpin.label') : t('icon-pin.label')}
|
|
97
97
|
onClick={() => onClick?.(item)}
|
|
98
98
|
/>
|
|
99
99
|
</div>
|
|
@@ -106,7 +106,10 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
106
106
|
{/* {self && <Icon icon='ph--asterisk--regular' size={pinned ? 5 : 4} />} */}
|
|
107
107
|
{screenshare && <Icon icon='ph--broadcast--regular' size={pinned ? 5 : 4} />}
|
|
108
108
|
<div
|
|
109
|
-
className={mx(
|
|
109
|
+
className={mx(
|
|
110
|
+
'bg-neutral-800 text-neutral-100 py-0.5 truncate rounded-sm',
|
|
111
|
+
pinned ? 'px-2' : 'px-1 text-xs',
|
|
112
|
+
)}
|
|
110
113
|
>
|
|
111
114
|
{name}
|
|
112
115
|
</div>
|
|
@@ -118,7 +121,7 @@ export const ResponsiveGridItem = <T extends object = any>({
|
|
|
118
121
|
{(speaking && <Waveform active size={pinned ? 5 : 4} />) ||
|
|
119
122
|
(props && (
|
|
120
123
|
<IconButton
|
|
121
|
-
classNames={mx('p-1 min-
|
|
124
|
+
classNames={mx('p-1 min-h-1 rounded-sm', props?.classNames)}
|
|
122
125
|
icon={props?.icon}
|
|
123
126
|
label={props?.label}
|
|
124
127
|
size={pinned ? 5 : 4}
|
|
@@ -5,26 +5,26 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
8
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
9
|
|
|
10
10
|
import { translations } from '../../translations';
|
|
11
11
|
import { VideoObject as VideoObjectComponent } from '../Media';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { ResponsivePanel } from './ResponsivePanel';
|
|
14
14
|
|
|
15
15
|
const meta = {
|
|
16
|
-
title: 'plugins/plugin-thread/
|
|
17
|
-
component:
|
|
18
|
-
decorators: [withTheme],
|
|
16
|
+
title: 'plugins/plugin-thread/components/ResponsivePanel',
|
|
17
|
+
component: ResponsivePanel,
|
|
18
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
19
19
|
parameters: {
|
|
20
20
|
layout: 'fullscreen',
|
|
21
21
|
translations,
|
|
22
22
|
},
|
|
23
|
-
} satisfies Meta<typeof
|
|
23
|
+
} satisfies Meta<typeof ResponsivePanel>;
|
|
24
24
|
|
|
25
25
|
export default meta;
|
|
26
26
|
|
|
27
|
-
type Story = StoryObj<typeof
|
|
27
|
+
type Story = StoryObj<typeof ResponsivePanel>;
|
|
28
28
|
|
|
29
29
|
export const Image: Story = {
|
|
30
30
|
args: {
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type PropsWithChildren } from 'react';
|
|
6
6
|
|
|
7
|
-
import { mx } from '@dxos/
|
|
7
|
+
import { mx } from '@dxos/ui-theme';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* A container component that maintains the child's aspect ratio while centering its content.
|
|
11
11
|
* The container will scale to fit within its parent's bounds while preserving the aspect ratio.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
* <
|
|
14
|
+
* <ResponsivePanel>
|
|
15
15
|
* <VideoObject />
|
|
16
|
-
* </
|
|
16
|
+
* </ResponsivePanel>
|
|
17
17
|
*/
|
|
18
|
-
export const
|
|
18
|
+
export const ResponsivePanel = ({ children }: PropsWithChildren) => {
|
|
19
19
|
return (
|
|
20
20
|
// Outer container that takes full size of parent.
|
|
21
|
-
<div role='none' className='relative flex
|
|
21
|
+
<div role='none' className='dx-expander relative flex'>
|
|
22
22
|
{/* Absolute positioning layer for centering content. */}
|
|
23
23
|
<div role='none' className='absolute inset-0 flex justify-center items-center'>
|
|
24
24
|
{/* Content container that maintains given aspect ratio and proper scaling. */}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
|
|
7
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
8
|
+
|
|
9
|
+
import { translations } from '../../translations';
|
|
10
|
+
|
|
11
|
+
import { ThreadSettings } from './ThreadSettings';
|
|
12
|
+
|
|
13
|
+
const meta = {
|
|
14
|
+
title: 'plugins/plugin-thread/components/ThreadSettings',
|
|
15
|
+
component: ThreadSettings,
|
|
16
|
+
tags: ['settings'],
|
|
17
|
+
decorators: [withTheme(), withLayout({ layout: 'fullscreen' })],
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: 'fullscreen',
|
|
20
|
+
translations,
|
|
21
|
+
},
|
|
22
|
+
} satisfies Meta<typeof ThreadSettings>;
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
|
|
28
|
+
export const Default: Story = {
|
|
29
|
+
args: {
|
|
30
|
+
settings: {},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { type SettingsSurfaceProps } from '@dxos/app-toolkit/ui';
|
|
8
|
+
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
+
import { Settings as SettingsForm } from '@dxos/react-ui-form';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { type Settings } from '#types';
|
|
13
|
+
|
|
14
|
+
export type ThreadSettingsProps = SettingsSurfaceProps<Settings.Settings>;
|
|
15
|
+
|
|
16
|
+
// TODO(burdon): Settings.
|
|
17
|
+
export const ThreadSettings = ({ settings: _settings }: ThreadSettingsProps) => {
|
|
18
|
+
const { t: _t } = useTranslation(meta.id);
|
|
19
|
+
return <SettingsForm.Viewport></SettingsForm.Viewport>;
|
|
20
|
+
};
|
package/src/components/index.ts
CHANGED
|
@@ -2,17 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { lazy } from 'react';
|
|
5
|
+
import { type ComponentType, lazy } from 'react';
|
|
6
6
|
|
|
7
|
-
export const ChannelContainer = lazy(() => import('./ChannelContainer'));
|
|
8
|
-
export const ChatContainer = lazy(() => import('./ChatContainer'));
|
|
9
|
-
|
|
10
|
-
// TODO(wittjosiah): Suspense boundary for sidebar?
|
|
11
7
|
export * from './Call';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export * from './MessageContainer';
|
|
17
|
-
export * from './ThreadComplementary';
|
|
18
|
-
export * from './ThreadSettings';
|
|
8
|
+
export * from './CommentsPanel';
|
|
9
|
+
export * from './MessagePanel';
|
|
10
|
+
|
|
11
|
+
export const ThreadSettings: ComponentType<any> = lazy(() => import('./ThreadSettings'));
|
|
@@ -10,12 +10,10 @@ import { JsonView, Panel } from '@dxos/devtools';
|
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
import { IconButton, Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
|
|
13
|
-
import { type EncodedTrackName, type GlobalState } from '
|
|
14
|
-
import { meta } from '
|
|
13
|
+
import { type EncodedTrackName, type GlobalState } from '../../calls';
|
|
14
|
+
import { meta } from '#meta';
|
|
15
15
|
|
|
16
|
-
export type CallDebugPanelProps = ThemedClassName<{
|
|
17
|
-
state?: GlobalState;
|
|
18
|
-
}>;
|
|
16
|
+
export type CallDebugPanelProps = ThemedClassName<{ state?: GlobalState }>;
|
|
19
17
|
|
|
20
18
|
export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
21
19
|
const { t } = useTranslation(meta.id);
|
|
@@ -72,25 +70,25 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
|
|
|
72
70
|
icon='ph--video-conference--regular'
|
|
73
71
|
open={open}
|
|
74
72
|
onToggle={handleToggle}
|
|
75
|
-
title={t('meeting
|
|
76
|
-
maxHeight={false}
|
|
73
|
+
title={t('meeting-status.title')}
|
|
77
74
|
info={<div className='flex items-center gap-2'> {state?.call.joined ? 'Active' : 'Inactive'}</div>}
|
|
75
|
+
maxHeight={0}
|
|
78
76
|
>
|
|
79
|
-
<div className='flex flex-col w-full
|
|
80
|
-
<div className='flex items-center gap-2'>
|
|
77
|
+
<div className='flex flex-col w-full text-xs'>
|
|
78
|
+
<div className='flex items-center gap-2 items-center'>
|
|
81
79
|
<Input.Root>
|
|
82
|
-
<Input.
|
|
83
|
-
<Input.
|
|
80
|
+
<Input.Switch checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
|
|
81
|
+
<Input.Label>{t('show-webrtc-stats.title')}</Input.Label>
|
|
84
82
|
</Input.Root>
|
|
85
83
|
</div>
|
|
86
|
-
<div className='flex items-center gap-2'>
|
|
84
|
+
<div className='flex items-center gap-2 items-center'>
|
|
87
85
|
<Input.Root>
|
|
88
|
-
<Input.
|
|
89
|
-
<Input.
|
|
86
|
+
<Input.Switch checked={showServiceHistory} onCheckedChange={handleToggleServiceHistory} />
|
|
87
|
+
<Input.Label>{t('show-calls-history.title')}</Input.Label>
|
|
90
88
|
</Input.Root>
|
|
91
89
|
</div>
|
|
92
|
-
<div className='flex items-center gap-2'>
|
|
93
|
-
<IconButton
|
|
90
|
+
<div className='flex items-center gap-2 items-center'>
|
|
91
|
+
<IconButton icon='ph--copy--regular' label={'copy raw'} onClick={handleCopyRaw} />
|
|
94
92
|
</div>
|
|
95
93
|
<Table rows={rows} />
|
|
96
94
|
{showDetailedWebRTCStats && <JsonView data={{ stats }} />}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useAtomValue } from '@effect-atom/atom-react';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { useCapability } from '@dxos/app-framework/ui';
|
|
9
|
+
|
|
10
|
+
import { ThreadCapabilities } from '#types';
|
|
11
|
+
import ChannelContainer from '../ChannelContainer';
|
|
12
|
+
|
|
13
|
+
export const CallSidebar = () => {
|
|
14
|
+
const call = useCapability(ThreadCapabilities.CallManager);
|
|
15
|
+
const roomId = useAtomValue(call.roomIdAtom);
|
|
16
|
+
return <ChannelContainer subject={undefined} attendableId={roomId ?? ''} roomId={roomId} />;
|
|
17
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
11
|
+
import { Query, useDatabase, useQuery } from '@dxos/react-client/echo';
|
|
12
|
+
import { withLayout, withTheme, Loading } from '@dxos/react-ui/testing';
|
|
13
|
+
import { Message, Thread } from '@dxos/types';
|
|
14
|
+
|
|
15
|
+
import { createThreadPlugins } from '#testing';
|
|
16
|
+
import { translations } from '../../translations';
|
|
17
|
+
import { Channel } from '#types';
|
|
18
|
+
|
|
19
|
+
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
20
|
+
|
|
21
|
+
// TODO(wittjosiah): Channel doesn't render full height.
|
|
22
|
+
const DefaultStory = ({ roomId }: ChannelContainerProps) => {
|
|
23
|
+
const db = useDatabase();
|
|
24
|
+
const [channel] = useQuery(db, Query.type(Channel.Channel));
|
|
25
|
+
if (!channel) {
|
|
26
|
+
return <Loading data={{ db: !!db, channel: !!channel }} />;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return <ChannelContainer subject={channel} roomId={roomId} />;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const meta = {
|
|
33
|
+
title: 'plugins/plugin-thread/containers/ChannelContainer',
|
|
34
|
+
component: ChannelContainer,
|
|
35
|
+
render: DefaultStory,
|
|
36
|
+
decorators: [
|
|
37
|
+
withTheme(),
|
|
38
|
+
withLayout({ layout: 'column' }),
|
|
39
|
+
withPluginManager({
|
|
40
|
+
plugins: [...(await createThreadPlugins())],
|
|
41
|
+
capabilities: [Capability.contributes(AppCapabilities.Schema, [Channel.Channel, Thread.Thread, Message.Message])],
|
|
42
|
+
}),
|
|
43
|
+
],
|
|
44
|
+
parameters: {
|
|
45
|
+
translations,
|
|
46
|
+
},
|
|
47
|
+
} satisfies Meta<typeof ChannelContainer>;
|
|
48
|
+
|
|
49
|
+
export default meta;
|
|
50
|
+
|
|
51
|
+
type Story = StoryObj<typeof meta>;
|
|
52
|
+
|
|
53
|
+
export const Default: Story = {
|
|
54
|
+
args: {
|
|
55
|
+
// Fixed room for testing.
|
|
56
|
+
subject: undefined,
|
|
57
|
+
roomId: '04a1d1911703b8e929d0649021a965',
|
|
58
|
+
},
|
|
59
|
+
};
|