@dxos/plugin-thread 0.8.4-main.4a85c3132b → 0.8.4-main.51f1e5ca51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/add-message-OC4QB4I2.mjs +89 -0
- package/dist/lib/browser/add-message-OC4QB4I2.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +32 -3
- package/dist/lib/browser/blueprints/index.mjs.map +4 -4
- package/dist/lib/browser/chunk-J67QAUIW.mjs +61 -0
- package/dist/lib/browser/chunk-J67QAUIW.mjs.map +7 -0
- package/dist/lib/browser/chunk-KCMJ7H7F.mjs +259 -0
- package/dist/lib/browser/chunk-KCMJ7H7F.mjs.map +7 -0
- package/dist/lib/browser/create-IUWQEW74.mjs +55 -0
- package/dist/lib/browser/create-IUWQEW74.mjs.map +7 -0
- package/dist/lib/browser/create-channel-CBC5WEFG.mjs +21 -0
- package/dist/lib/browser/create-channel-CBC5WEFG.mjs.map +7 -0
- package/dist/lib/browser/create-channel-thread-JJ5LQ3OZ.mjs +28 -0
- package/dist/lib/browser/create-channel-thread-JJ5LQ3OZ.mjs.map +7 -0
- package/dist/lib/browser/create-proposals-RHLVRJZ4.mjs +57 -0
- package/dist/lib/browser/create-proposals-RHLVRJZ4.mjs.map +7 -0
- package/dist/lib/browser/delete-PVIEGTTY.mjs +59 -0
- package/dist/lib/browser/delete-PVIEGTTY.mjs.map +7 -0
- package/dist/lib/browser/delete-message-TLVRPLJF.mjs +56 -0
- package/dist/lib/browser/delete-message-TLVRPLJF.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1811 -171
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/on-create-space-KRTKYRFU.mjs +25 -0
- package/dist/lib/browser/on-create-space-KRTKYRFU.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +14 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/restore-AVE55SJF.mjs +33 -0
- package/dist/lib/browser/restore-AVE55SJF.mjs.map +7 -0
- package/dist/lib/browser/restore-message-F57RMGDJ.mjs +34 -0
- package/dist/lib/browser/restore-message-F57RMGDJ.mjs.map +7 -0
- package/dist/lib/browser/select-BJDZJI64.mjs +26 -0
- package/dist/lib/browser/select-BJDZJI64.mjs.map +7 -0
- package/dist/lib/browser/toggle-resolved-HQE5P7BV.mjs +37 -0
- package/dist/lib/browser/toggle-resolved-HQE5P7BV.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +90 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -8
- package/dist/lib/node-esm/add-message-HJXNAILW.mjs +90 -0
- package/dist/lib/node-esm/add-message-HJXNAILW.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +32 -3
- package/dist/lib/node-esm/blueprints/index.mjs.map +4 -4
- package/dist/lib/node-esm/chunk-2Q6V7NGK.mjs +62 -0
- package/dist/lib/node-esm/chunk-2Q6V7NGK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4KRVIOPC.mjs +260 -0
- package/dist/lib/node-esm/chunk-4KRVIOPC.mjs.map +7 -0
- package/dist/lib/node-esm/create-NALJT67D.mjs +56 -0
- package/dist/lib/node-esm/create-NALJT67D.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-CS2EAYJF.mjs +22 -0
- package/dist/lib/node-esm/create-channel-CS2EAYJF.mjs.map +7 -0
- package/dist/lib/node-esm/create-channel-thread-KZZFZDTU.mjs +29 -0
- package/dist/lib/node-esm/create-channel-thread-KZZFZDTU.mjs.map +7 -0
- package/dist/lib/node-esm/create-proposals-AFAYZQBI.mjs +58 -0
- package/dist/lib/node-esm/create-proposals-AFAYZQBI.mjs.map +7 -0
- package/dist/lib/node-esm/delete-HQJVZY7Q.mjs +60 -0
- package/dist/lib/node-esm/delete-HQJVZY7Q.mjs.map +7 -0
- package/dist/lib/node-esm/delete-message-VVPEYLV4.mjs +57 -0
- package/dist/lib/node-esm/delete-message-VVPEYLV4.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1811 -171
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/on-create-space-2UX7Z5EQ.mjs +26 -0
- package/dist/lib/node-esm/on-create-space-2UX7Z5EQ.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +15 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/restore-FMIWJR5T.mjs +34 -0
- package/dist/lib/node-esm/restore-FMIWJR5T.mjs.map +7 -0
- package/dist/lib/node-esm/restore-message-3L7AMQMG.mjs +35 -0
- package/dist/lib/node-esm/restore-message-3L7AMQMG.mjs.map +7 -0
- package/dist/lib/node-esm/select-VCAFISBK.mjs +27 -0
- package/dist/lib/node-esm/select-VCAFISBK.mjs.map +7 -0
- package/dist/lib/node-esm/toggle-resolved-JDZZ257P.mjs +38 -0
- package/dist/lib/node-esm/toggle-resolved-JDZZ257P.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +91 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +5 -8
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/thread-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -1
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/speaking-monitor.d.ts +0 -3
- package/dist/types/src/calls/speaking-monitor.d.ts.map +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/audio.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +2 -2
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/history-cache.d.ts.map +1 -1
- package/dist/types/src/calls/util/media.d.ts.map +1 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
- package/dist/types/src/calls-service.stories.d.ts +2 -2
- package/dist/types/src/calls-service.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/{call-manager/call-manager.d.ts → call-manager.d.ts} +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +15 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/{markdown/markdown.d.ts → markdown.d.ts} +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{settings/settings.d.ts → settings.d.ts} +2 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
- package/dist/types/src/components/Call/Call.d.ts +32 -4
- package/dist/types/src/components/Call/Call.d.ts.map +1 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +5 -5
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts +13 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts +160 -0
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts.map +1 -0
- package/dist/types/src/components/{CommentsThreadContainer.d.ts → CommentsPanel/CommentsThread.d.ts} +3 -3
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts +3 -0
- package/dist/types/src/components/CommentsPanel/index.d.ts.map +1 -0
- package/dist/types/src/components/Lobby/Lobby.d.ts +24 -3
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- package/dist/types/src/components/{MessageContainer.d.ts → MessagePanel/MessagePanel.d.ts} +3 -3
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -0
- package/dist/types/src/components/MessagePanel/index.d.ts +2 -0
- package/dist/types/src/components/MessagePanel/index.d.ts.map +1 -0
- package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +142 -144
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/{ResponsiveContainer.d.ts → ResponsivePanel.d.ts} +4 -4
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts +164 -0
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts.map +1 -0
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +1 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts +6 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts +161 -0
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts.map +1 -0
- package/dist/types/src/components/ThreadSettings/index.d.ts +2 -0
- package/dist/types/src/components/ThreadSettings/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +4 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +1 -1
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +1 -2
- package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +1 -1
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/containers/CallSidebar/index.d.ts +1 -2
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +4 -4
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts +142 -144
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelContainer/index.d.ts +1 -2
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +3 -4
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts +141 -143
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +1 -0
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +6 -3
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +1 -2
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +0 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/{components/command-extension.d.ts → extensions/command.d.ts} +1 -1
- package/dist/types/src/extensions/command.d.ts.map +1 -0
- package/dist/types/src/extensions/index.d.ts +1 -0
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +3 -3
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -1
- package/dist/types/src/operations/add-message.d.ts +5 -0
- package/dist/types/src/operations/add-message.d.ts.map +1 -0
- package/dist/types/src/operations/create-channel-thread.d.ts +5 -0
- package/dist/types/src/operations/create-channel-thread.d.ts.map +1 -0
- package/dist/types/src/operations/create-channel.d.ts +5 -0
- package/dist/types/src/operations/create-channel.d.ts.map +1 -0
- package/dist/types/src/operations/create-proposals.d.ts +5 -0
- package/dist/types/src/operations/create-proposals.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +2804 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/delete-message.d.ts +5 -0
- package/dist/types/src/operations/delete-message.d.ts.map +1 -0
- package/dist/types/src/operations/delete.d.ts +5 -0
- package/dist/types/src/operations/delete.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/on-create-space.d.ts +5 -0
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
- package/dist/types/src/operations/restore-message.d.ts +5 -0
- package/dist/types/src/operations/restore-message.d.ts.map +1 -0
- package/dist/types/src/operations/restore.d.ts +5 -0
- package/dist/types/src/operations/restore.d.ts.map +1 -0
- package/dist/types/src/operations/select.d.ts +5 -0
- package/dist/types/src/operations/select.d.ts.map +1 -0
- package/dist/types/src/operations/toggle-resolved.d.ts +5 -0
- package/dist/types/src/operations/toggle-resolved.d.ts.map +1 -0
- package/dist/types/src/{components/testing.d.ts → testing/data.d.ts} +1 -1
- package/dist/types/src/testing/data.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -1
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +140 -142
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +181 -177
- package/dist/types/src/types/Channel.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +5 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/capabilities.d.ts +2 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -3304
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +2 -2
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +79 -67
- package/src/ThreadPlugin.tsx +30 -22
- package/src/blueprints/thread-blueprint.ts +5 -9
- package/src/calls/util/calls-service.ts +3 -2
- package/src/calls/util/stub-media-streams.ts +3 -1
- package/src/calls-service.stories.tsx +8 -7
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +40 -49
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +1 -1
- package/src/capabilities/{call-manager/call-manager.ts → call-manager.ts} +4 -3
- package/src/capabilities/index.ts +16 -10
- package/src/capabilities/{markdown/markdown.ts → markdown.ts} +17 -13
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +2 -2
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +28 -35
- package/src/capabilities/{settings/settings.ts → settings.ts} +6 -5
- package/src/capabilities/{state/state.ts → state.ts} +1 -1
- package/src/capabilities/undo-mappings.ts +46 -0
- package/src/components/Call/Call.tsx +9 -9
- package/src/components/Call/Toolbar.tsx +24 -14
- package/src/components/{Comments.stories.tsx → CommentsPanel/CommentsPanel.stories.tsx} +14 -13
- package/src/components/{CommentsContainer.tsx → CommentsPanel/CommentsPanel.tsx} +6 -6
- package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +16 -16
- package/src/components/CommentsPanel/index.ts +6 -0
- package/src/components/Lobby/Lobby.tsx +12 -10
- package/src/components/Media/VideoObject.stories.tsx +3 -4
- package/src/components/{MessageContainer.tsx → MessagePanel/MessagePanel.tsx} +16 -10
- package/src/components/MessagePanel/index.ts +5 -0
- package/src/components/Participant/Participant.tsx +2 -1
- package/src/components/Participant/ParticipantGrid.tsx +0 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +7 -7
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +4 -4
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +5 -5
- package/src/components/ResponsiveGrid/{ResponsiveContainer.stories.tsx → ResponsivePanel.stories.tsx} +7 -7
- package/src/components/ResponsiveGrid/{ResponsiveContainer.tsx → ResponsivePanel.tsx} +4 -4
- package/src/components/ResponsiveGrid/index.ts +1 -1
- package/src/components/ThreadSettings/ThreadSettings.stories.tsx +32 -0
- package/src/components/ThreadSettings/ThreadSettings.tsx +20 -0
- package/src/components/ThreadSettings/index.ts +5 -0
- package/src/components/index.ts +6 -3
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +5 -4
- package/src/containers/CallDebugPanel/index.ts +1 -3
- package/src/containers/CallSidebar/CallSidebar.tsx +3 -2
- package/src/containers/CallSidebar/index.ts +1 -3
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +45 -12
- package/src/containers/ChannelContainer/ChannelContainer.tsx +42 -36
- package/src/containers/ChannelContainer/index.ts +1 -3
- package/src/containers/ChatContainer/ChatContainer.stories.tsx +10 -11
- package/src/containers/ChatContainer/ChatContainer.tsx +95 -118
- package/src/containers/ChatContainer/index.ts +1 -0
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +48 -28
- package/src/containers/ThreadCompanion/index.ts +1 -3
- package/src/containers/index.ts +0 -1
- package/src/extensions/index.ts +1 -0
- package/src/extensions/threads.ts +15 -14
- package/src/hooks/analytics.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/operations/add-message.ts +81 -0
- package/src/operations/create-channel-thread.ts +26 -0
- package/src/operations/create-channel.ts +20 -0
- package/src/operations/create-proposals.ts +49 -0
- package/src/operations/create.ts +48 -0
- package/src/operations/definitions.ts +177 -0
- package/src/operations/delete-message.ts +53 -0
- package/src/operations/delete.ts +63 -0
- package/src/operations/index.ts +22 -0
- package/src/operations/on-create-space.ts +27 -0
- package/src/operations/restore-message.ts +38 -0
- package/src/operations/restore.ts +38 -0
- package/src/operations/select.ts +24 -0
- package/src/operations/toggle-resolved.ts +41 -0
- package/src/{components/testing.ts → testing/data.ts} +7 -7
- package/src/testing/index.ts +1 -1
- package/src/translations.ts +72 -76
- package/src/types/Channel.ts +9 -2
- package/src/types/Settings.ts +10 -0
- package/src/types/capabilities.ts +9 -7
- package/src/types/types.ts +2 -184
- package/src/util.ts +1 -1
- package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs +0 -182
- package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs.map +0 -7
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs +0 -33
- package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs.map +0 -7
- package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs +0 -15
- package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs.map +0 -7
- package/dist/lib/browser/ChatContainer-2243UD2M.mjs +0 -14
- package/dist/lib/browser/ChatContainer-2243UD2M.mjs.map +0 -7
- package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs +0 -204
- package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs.map +0 -7
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs +0 -20
- package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs +0 -191
- package/dist/lib/browser/app-graph-builder-5LCAM746.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs +0 -17
- package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs.map +0 -7
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs +0 -27
- package/dist/lib/browser/call-manager-2PRP4QVZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-CP7E2HRE.mjs +0 -31
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERK254BS.mjs +0 -1810
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +0 -7
- package/dist/lib/browser/chunk-G6FJBSXX.mjs +0 -1123
- package/dist/lib/browser/chunk-G6FJBSXX.mjs.map +0 -7
- package/dist/lib/browser/chunk-HDLDMR54.mjs +0 -184
- package/dist/lib/browser/chunk-HDLDMR54.mjs.map +0 -7
- package/dist/lib/browser/chunk-ISCHODBV.mjs +0 -106
- package/dist/lib/browser/chunk-ISCHODBV.mjs.map +0 -7
- package/dist/lib/browser/chunk-LUK4UNFA.mjs +0 -20
- package/dist/lib/browser/chunk-LUK4UNFA.mjs.map +0 -7
- package/dist/lib/browser/chunk-PDHCY236.mjs +0 -223
- package/dist/lib/browser/chunk-PDHCY236.mjs.map +0 -7
- package/dist/lib/browser/chunk-PL5LIVP4.mjs +0 -105
- package/dist/lib/browser/chunk-PL5LIVP4.mjs.map +0 -7
- package/dist/lib/browser/chunk-U32R23JO.mjs +0 -277
- package/dist/lib/browser/chunk-U32R23JO.mjs.map +0 -7
- package/dist/lib/browser/chunk-UVUCB7QO.mjs +0 -125
- package/dist/lib/browser/chunk-UVUCB7QO.mjs.map +0 -7
- package/dist/lib/browser/markdown-GRRPCZHJ.mjs +0 -210
- package/dist/lib/browser/markdown-GRRPCZHJ.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs +0 -442
- package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs.map +0 -7
- package/dist/lib/browser/react-root-7UFFPPRD.mjs +0 -26
- package/dist/lib/browser/react-root-7UFFPPRD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs +0 -113
- package/dist/lib/browser/react-surface-TIHBSZPD.mjs.map +0 -7
- package/dist/lib/browser/repair-TBU45SBG.mjs +0 -40
- package/dist/lib/browser/repair-TBU45SBG.mjs.map +0 -7
- package/dist/lib/browser/settings-Y75FG6XR.mjs +0 -35
- package/dist/lib/browser/settings-Y75FG6XR.mjs.map +0 -7
- package/dist/lib/browser/state-OBTMMEUZ.mjs +0 -25
- package/dist/lib/browser/state-OBTMMEUZ.mjs.map +0 -7
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs +0 -183
- package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs.map +0 -7
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs +0 -34
- package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs +0 -16
- package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs +0 -15
- package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs.map +0 -7
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs +0 -205
- package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs.map +0 -7
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs +0 -21
- package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs +0 -192
- package/dist/lib/node-esm/app-graph-builder-VBLHLX75.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs +0 -18
- package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs +0 -28
- package/dist/lib/node-esm/call-manager-BLQCEM2F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs +0 -107
- package/dist/lib/node-esm/chunk-6K5ACCGB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7SZBKQUU.mjs +0 -224
- package/dist/lib/node-esm/chunk-7SZBKQUU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs +0 -33
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs +0 -22
- package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs +0 -1124
- package/dist/lib/node-esm/chunk-IQUV7DR6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs +0 -1811
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs +0 -278
- package/dist/lib/node-esm/chunk-QYAVWNVM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs +0 -126
- package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs +0 -108
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YN2Y7GPW.mjs +0 -185
- package/dist/lib/node-esm/chunk-YN2Y7GPW.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs +0 -211
- package/dist/lib/node-esm/markdown-WHWUESF7.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs +0 -443
- package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs +0 -27
- package/dist/lib/node-esm/react-root-D7CWS5XP.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs +0 -114
- package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs.map +0 -7
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs +0 -41
- package/dist/lib/node-esm/repair-7JEKRNR3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs +0 -36
- package/dist/lib/node-esm/settings-W4JN2YKJ.mjs.map +0 -7
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs +0 -26
- package/dist/lib/node-esm/state-7UWCSIWQ.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager/index.d.ts +0 -3
- package/dist/types/src/capabilities/call-manager/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +0 -3
- package/dist/types/src/capabilities/markdown/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/index.d.ts +0 -3
- package/dist/types/src/capabilities/repair/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair/repair.d.ts +0 -6
- package/dist/types/src/capabilities/repair/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/index.d.ts +0 -3
- package/dist/types/src/capabilities/settings/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -3
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/Comments.stories.d.ts +0 -162
- package/dist/types/src/components/Comments.stories.d.ts.map +0 -1
- package/dist/types/src/components/CommentsContainer.d.ts +0 -13
- package/dist/types/src/components/CommentsContainer.d.ts.map +0 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
- package/dist/types/src/components/MessageContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -166
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/command-extension.d.ts.map +0 -1
- package/dist/types/src/components/testing.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts +0 -8
- package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadSettings/index.d.ts +0 -3
- package/dist/types/src/containers/ThreadSettings/index.d.ts.map +0 -1
- package/dist/types/src/functions/create-proposals.d.ts +0 -13
- package/dist/types/src/functions/create-proposals.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -14
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/testing/stories.d.ts +0 -3
- package/dist/types/src/testing/stories.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/call-manager/index.ts +0 -7
- package/src/capabilities/markdown/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -399
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/repair/index.ts +0 -7
- package/src/capabilities/repair/repair.ts +0 -55
- package/src/capabilities/settings/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/containers/ThreadSettings/ThreadSettings.tsx +0 -22
- package/src/containers/ThreadSettings/index.ts +0 -7
- package/src/functions/create-proposals.ts +0 -57
- package/src/functions/index.ts +0 -9
- package/src/testing/stories.ts +0 -56
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/src/{components/command-extension.ts → extensions/command.ts} +0 -0
|
@@ -1,1123 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useDebugMode,
|
|
3
|
-
useOnEditAnalytics,
|
|
4
|
-
useStatus
|
|
5
|
-
} from "./chunk-HDLDMR54.mjs";
|
|
6
|
-
import {
|
|
7
|
-
getMessageMetadata
|
|
8
|
-
} from "./chunk-CP7E2HRE.mjs";
|
|
9
|
-
import {
|
|
10
|
-
ThreadCapabilities
|
|
11
|
-
} from "./chunk-U32R23JO.mjs";
|
|
12
|
-
import {
|
|
13
|
-
meta
|
|
14
|
-
} from "./chunk-LUK4UNFA.mjs";
|
|
15
|
-
|
|
16
|
-
// src/components/Call/Call.tsx
|
|
17
|
-
import { useAtomValue as useAtomValue3 } from "@effect-atom/atom-react";
|
|
18
|
-
import React9 from "react";
|
|
19
|
-
import { useCapability as useCapability3 } from "@dxos/app-framework/ui";
|
|
20
|
-
|
|
21
|
-
// src/components/Media/AudioStream.tsx
|
|
22
|
-
import React, { useEffect, useRef } from "react";
|
|
23
|
-
var AudioStream = ({ tracks }) => {
|
|
24
|
-
const mediaStreamRef = useRef(new MediaStream());
|
|
25
|
-
const ref = useRef(null);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
const audio = ref.current;
|
|
28
|
-
if (!audio) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const mediaStream = mediaStreamRef.current;
|
|
32
|
-
audio.srcObject = mediaStream;
|
|
33
|
-
}, []);
|
|
34
|
-
const resetSrcObject = () => {
|
|
35
|
-
const audio = ref.current;
|
|
36
|
-
const mediaStream = mediaStreamRef.current;
|
|
37
|
-
if (!audio || !mediaStream) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
audio.addEventListener("canplay", () => audio.play(), {
|
|
41
|
-
once: true
|
|
42
|
-
});
|
|
43
|
-
audio.srcObject = mediaStream;
|
|
44
|
-
};
|
|
45
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("audio", {
|
|
46
|
-
ref,
|
|
47
|
-
autoPlay: true
|
|
48
|
-
}), tracks.map((track) => /* @__PURE__ */ React.createElement(AudioTrack, {
|
|
49
|
-
key: track.id,
|
|
50
|
-
track,
|
|
51
|
-
mediaStream: mediaStreamRef.current,
|
|
52
|
-
resetSrcObject
|
|
53
|
-
})));
|
|
54
|
-
};
|
|
55
|
-
var AudioTrack = ({ track, mediaStream, resetSrcObject }) => {
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
const currentTrack = track;
|
|
58
|
-
mediaStream.addTrack(currentTrack);
|
|
59
|
-
resetSrcObject();
|
|
60
|
-
return () => {
|
|
61
|
-
mediaStream.removeTrack(currentTrack);
|
|
62
|
-
resetSrcObject();
|
|
63
|
-
};
|
|
64
|
-
}, [
|
|
65
|
-
track,
|
|
66
|
-
mediaStream
|
|
67
|
-
]);
|
|
68
|
-
return null;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
// src/components/Media/VideoObject.tsx
|
|
72
|
-
import React2, { forwardRef, memo, useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
73
|
-
import { mx } from "@dxos/ui-theme";
|
|
74
|
-
var VideoObject = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef(({ videoStream, classNames, flip, contain, ...rest }, ref) => {
|
|
75
|
-
const internalRef = useRef2(null);
|
|
76
|
-
useEffect2(() => {
|
|
77
|
-
const video = internalRef.current;
|
|
78
|
-
if (video && videoStream) {
|
|
79
|
-
video.srcObject = videoStream;
|
|
80
|
-
video.setAttribute("autoplay", "true");
|
|
81
|
-
video.setAttribute("playsinline", "true");
|
|
82
|
-
}
|
|
83
|
-
}, [
|
|
84
|
-
videoStream,
|
|
85
|
-
internalRef.current
|
|
86
|
-
]);
|
|
87
|
-
return /* @__PURE__ */ React2.createElement("video", {
|
|
88
|
-
className: mx("w-full aspect-video", flip && "scale-x-[-1]", contain ? "object-contain" : "object-cover", classNames),
|
|
89
|
-
ref: (v) => {
|
|
90
|
-
internalRef.current = v;
|
|
91
|
-
if (ref === null) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
if (typeof ref === "function") {
|
|
95
|
-
ref(v);
|
|
96
|
-
} else {
|
|
97
|
-
ref.current = v;
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
...rest
|
|
101
|
-
});
|
|
102
|
-
}));
|
|
103
|
-
VideoObject.displayName = "VideoObject";
|
|
104
|
-
|
|
105
|
-
// src/components/Participant/Participant.tsx
|
|
106
|
-
import { useAtomValue } from "@effect-atom/atom-react";
|
|
107
|
-
import React6, { memo as memo2, useMemo as useMemo2 } from "react";
|
|
108
|
-
import { useCapability } from "@dxos/app-framework/ui";
|
|
109
|
-
|
|
110
|
-
// src/components/ResponsiveGrid/ResponsiveContainer.tsx
|
|
111
|
-
import React3 from "react";
|
|
112
|
-
import { mx as mx2 } from "@dxos/ui-theme";
|
|
113
|
-
var ResponsiveContainer = ({ children }) => {
|
|
114
|
-
return (
|
|
115
|
-
// Outer container that takes full size of parent.
|
|
116
|
-
/* @__PURE__ */ React3.createElement("div", {
|
|
117
|
-
role: "none",
|
|
118
|
-
className: "relative flex w-full h-full"
|
|
119
|
-
}, /* @__PURE__ */ React3.createElement("div", {
|
|
120
|
-
role: "none",
|
|
121
|
-
className: "absolute inset-0 flex justify-center items-center"
|
|
122
|
-
}, /* @__PURE__ */ React3.createElement("div", {
|
|
123
|
-
role: "none",
|
|
124
|
-
className: mx2("max-h-full max-w-full w-auto h-auto aspect-video")
|
|
125
|
-
}, children)))
|
|
126
|
-
);
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
// src/components/ResponsiveGrid/ResponsiveGrid.tsx
|
|
130
|
-
import React4, { useCallback, useEffect as useEffect3, useLayoutEffect, useMemo, useState } from "react";
|
|
131
|
-
import { useResizeDetector } from "react-resize-detector";
|
|
132
|
-
import { invariant } from "@dxos/invariant";
|
|
133
|
-
import { mx as mx3 } from "@dxos/ui-theme";
|
|
134
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-thread/src/components/ResponsiveGrid/ResponsiveGrid.tsx";
|
|
135
|
-
var ASPECT_RATIO = 16 / 9;
|
|
136
|
-
var MIN_GALLERY_HEIGHT = 250;
|
|
137
|
-
var DEFAULT_GAP = 8;
|
|
138
|
-
var maxImageSize = "w-[2560px] h-[1440px]";
|
|
139
|
-
var defaultGetId = (item) => item.id;
|
|
140
|
-
var ResponsiveGrid = ({ classNames, Cell, gap = DEFAULT_GAP, getId: getId2 = defaultGetId, items, pinned, autoHideGallery = false, debug, onPinnedChange }) => {
|
|
141
|
-
const { width: containerWidth = 0, height: containerHeight = 0, ref: containerRef } = useResizeDetector({
|
|
142
|
-
refreshRate: 100
|
|
143
|
-
});
|
|
144
|
-
const [dividerHeight, setDividerHeight] = useState(0);
|
|
145
|
-
useEffect3(() => {
|
|
146
|
-
if (containerWidth && containerHeight) {
|
|
147
|
-
const { height: height2 } = fitAspectRatio(containerWidth, containerHeight, ASPECT_RATIO);
|
|
148
|
-
setDividerHeight(Math.min(height2, containerHeight - MIN_GALLERY_HEIGHT));
|
|
149
|
-
}
|
|
150
|
-
}, [
|
|
151
|
-
containerWidth,
|
|
152
|
-
containerHeight
|
|
153
|
-
]);
|
|
154
|
-
const pinnedItem = useMemo(() => items.find((item) => getId2(item) === pinned), [
|
|
155
|
-
items,
|
|
156
|
-
pinned
|
|
157
|
-
]);
|
|
158
|
-
const mainItems = useMemo(() => items.filter((item) => getId2(item) !== pinned), [
|
|
159
|
-
items,
|
|
160
|
-
pinned
|
|
161
|
-
]);
|
|
162
|
-
const hideGallery = autoHideGallery && pinnedItem !== void 0;
|
|
163
|
-
const [{ time, columns, cellWidth }, setLayout] = useState({
|
|
164
|
-
time: 0,
|
|
165
|
-
columns: 0,
|
|
166
|
-
cellWidth: 0
|
|
167
|
-
});
|
|
168
|
-
const { width = 0, height = 0, ref: gridContainerRef } = useResizeDetector({
|
|
169
|
-
refreshRate: 200
|
|
170
|
-
});
|
|
171
|
-
useEffect3(() => {
|
|
172
|
-
if (containerHeight && width && height) {
|
|
173
|
-
const layout = calculateLayout(width, height, mainItems.length, gap);
|
|
174
|
-
setLayout({
|
|
175
|
-
time: Date.now(),
|
|
176
|
-
...layout
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
}, [
|
|
180
|
-
containerHeight,
|
|
181
|
-
width,
|
|
182
|
-
height,
|
|
183
|
-
mainItems.length,
|
|
184
|
-
gap,
|
|
185
|
-
pinned
|
|
186
|
-
]);
|
|
187
|
-
const [bounds, setBounds] = useState([]);
|
|
188
|
-
useLayoutEffect(() => {
|
|
189
|
-
if (!hideGallery && !gridContainerRef.current || !containerHeight) {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
const t = setTimeout(() => {
|
|
193
|
-
setBounds(items.filter((item) => !hideGallery || item === pinnedItem).map((item) => {
|
|
194
|
-
invariant(containerRef.current, void 0, {
|
|
195
|
-
F: __dxlog_file,
|
|
196
|
-
L: 117,
|
|
197
|
-
S: void 0,
|
|
198
|
-
A: [
|
|
199
|
-
"containerRef.current",
|
|
200
|
-
""
|
|
201
|
-
]
|
|
202
|
-
});
|
|
203
|
-
const el = containerRef.current.querySelector(`[data-grid-item="${getId2(item)}"]`);
|
|
204
|
-
if (!el) {
|
|
205
|
-
return null;
|
|
206
|
-
}
|
|
207
|
-
const bounds2 = getRelativeBounds(containerRef.current, el);
|
|
208
|
-
return [
|
|
209
|
-
item,
|
|
210
|
-
bounds2
|
|
211
|
-
];
|
|
212
|
-
}).filter((item) => item !== null));
|
|
213
|
-
});
|
|
214
|
-
return () => clearTimeout(t);
|
|
215
|
-
}, [
|
|
216
|
-
containerHeight,
|
|
217
|
-
items,
|
|
218
|
-
pinnedItem,
|
|
219
|
-
hideGallery,
|
|
220
|
-
time
|
|
221
|
-
]);
|
|
222
|
-
const handleClick = useCallback((item) => onPinnedChange?.(getId2(item) === pinned ? void 0 : getId2(item)), [
|
|
223
|
-
pinned,
|
|
224
|
-
onPinnedChange
|
|
225
|
-
]);
|
|
226
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
227
|
-
ref: containerRef,
|
|
228
|
-
className: mx3("relative w-full h-full", classNames)
|
|
229
|
-
}, /* @__PURE__ */ React4.createElement("div", {
|
|
230
|
-
className: "absolute inset-0 flex flex-col grow gap-2"
|
|
231
|
-
}, pinnedItem && /* @__PURE__ */ React4.createElement("div", {
|
|
232
|
-
className: mx3("flex grow-[2] shrink overflow-hidden justify-center items-center", hideGallery && "h-full"),
|
|
233
|
-
style: hideGallery ? {} : {
|
|
234
|
-
height: dividerHeight
|
|
235
|
-
}
|
|
236
|
-
}, /* @__PURE__ */ React4.createElement(SoloItem, {
|
|
237
|
-
id: getId2(pinnedItem),
|
|
238
|
-
debug
|
|
239
|
-
})), !hideGallery && /* @__PURE__ */ React4.createElement("div", {
|
|
240
|
-
ref: gridContainerRef,
|
|
241
|
-
className: "flex grow-[1] overflow-hidden justify-center items-center",
|
|
242
|
-
style: hideGallery ? {} : {
|
|
243
|
-
minHeight: MIN_GALLERY_HEIGHT
|
|
244
|
-
}
|
|
245
|
-
}, mainItems.length === 1 && /* @__PURE__ */ React4.createElement("div", {
|
|
246
|
-
style: {
|
|
247
|
-
width: cellWidth
|
|
248
|
-
},
|
|
249
|
-
className: "flex h-full"
|
|
250
|
-
}, /* @__PURE__ */ React4.createElement(SoloItem, {
|
|
251
|
-
id: getId2(mainItems[0]),
|
|
252
|
-
debug
|
|
253
|
-
})), mainItems.length > 1 && columns > 0 && /* @__PURE__ */ React4.createElement("div", {
|
|
254
|
-
role: "grid",
|
|
255
|
-
style: {
|
|
256
|
-
display: "grid",
|
|
257
|
-
gridTemplateColumns: `repeat(${columns}, ${cellWidth}px)`,
|
|
258
|
-
gap: `${gap}px`
|
|
259
|
-
}
|
|
260
|
-
}, mainItems.map((item) => /* @__PURE__ */ React4.createElement("div", {
|
|
261
|
-
key: getId2(item),
|
|
262
|
-
"data-grid-item": getId2(item),
|
|
263
|
-
className: mx3("aspect-video max-h-full max-w-full w-auto h-auto", debug && "border border-primary-500")
|
|
264
|
-
}))))), /* @__PURE__ */ React4.createElement("div", {
|
|
265
|
-
className: mx3(debug && "opacity-10")
|
|
266
|
-
}, bounds.map(([item, bounds2]) => /* @__PURE__ */ React4.createElement(Cell, {
|
|
267
|
-
key: getId2(item),
|
|
268
|
-
classNames: "absolute transition-all duration-500",
|
|
269
|
-
item,
|
|
270
|
-
style: bounds2,
|
|
271
|
-
pinned: getId2(item) === pinned,
|
|
272
|
-
onClick: items.length > 1 ? handleClick : void 0
|
|
273
|
-
}))));
|
|
274
|
-
};
|
|
275
|
-
var SoloItem = ({ debug, id }) => {
|
|
276
|
-
return /* @__PURE__ */ React4.createElement(ResponsiveContainer, null, /* @__PURE__ */ React4.createElement("div", {
|
|
277
|
-
"data-grid-item": id,
|
|
278
|
-
className: mx3("aspect-video overflow-hidden", debug && "z-20 border-2 border-primary-500")
|
|
279
|
-
}, /* @__PURE__ */ React4.createElement("img", {
|
|
280
|
-
alt: "placeholder video",
|
|
281
|
-
className: mx3("opacity-0", maxImageSize)
|
|
282
|
-
})));
|
|
283
|
-
};
|
|
284
|
-
var getRelativeBounds = (container, el) => {
|
|
285
|
-
const containerRect = container.getBoundingClientRect();
|
|
286
|
-
const elementRect = el.getBoundingClientRect();
|
|
287
|
-
return {
|
|
288
|
-
top: elementRect.top - containerRect.top,
|
|
289
|
-
left: elementRect.left - containerRect.left,
|
|
290
|
-
width: elementRect.width,
|
|
291
|
-
height: elementRect.height
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
var calculateLayout = (containerWidth, containerHeight, count, gap, aspectRatio = ASPECT_RATIO) => {
|
|
295
|
-
if (count === 0) {
|
|
296
|
-
return {
|
|
297
|
-
columns: 1,
|
|
298
|
-
cellWidth: 1
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
let minWastedSpace = Infinity;
|
|
302
|
-
let bestColumns = 1;
|
|
303
|
-
let cellWidth = 0;
|
|
304
|
-
for (let rows = 1; rows <= count; rows++) {
|
|
305
|
-
const cols = Math.ceil(count / rows);
|
|
306
|
-
const { width: itemWidth, height: itemHeight } = fitItemsToGrid(containerWidth, containerHeight, cols, rows, aspectRatio, gap);
|
|
307
|
-
const usedWidth = itemWidth * cols + gap * cols - 1;
|
|
308
|
-
const usedHeight = itemHeight * rows + gap * rows - 1;
|
|
309
|
-
const wastedSpace = containerWidth * containerHeight - usedWidth * usedHeight;
|
|
310
|
-
if (wastedSpace < minWastedSpace) {
|
|
311
|
-
minWastedSpace = wastedSpace;
|
|
312
|
-
bestColumns = cols;
|
|
313
|
-
cellWidth = itemWidth;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
return {
|
|
317
|
-
columns: bestColumns,
|
|
318
|
-
cellWidth
|
|
319
|
-
};
|
|
320
|
-
};
|
|
321
|
-
var fitItemsToGrid = (outerWidth, outerHeight, numCols, numRows, aspectRatio, gap) => {
|
|
322
|
-
const availableWidth = outerWidth - gap * (numCols - 1);
|
|
323
|
-
const availableHeight = outerHeight - gap * (numRows - 1);
|
|
324
|
-
const maxCellWidth = availableWidth / numCols;
|
|
325
|
-
const maxCellHeight = availableHeight / numRows;
|
|
326
|
-
return fitAspectRatio(maxCellWidth, maxCellHeight, aspectRatio);
|
|
327
|
-
};
|
|
328
|
-
var fitAspectRatio = (outerWidth, outerHeight, aspectRatio) => {
|
|
329
|
-
if (outerWidth <= 0 || outerHeight <= 0 || aspectRatio <= 0) {
|
|
330
|
-
return {
|
|
331
|
-
width: 0,
|
|
332
|
-
height: 0
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
let width = outerWidth;
|
|
336
|
-
let height = width / aspectRatio;
|
|
337
|
-
if (height > outerHeight) {
|
|
338
|
-
height = outerHeight;
|
|
339
|
-
width = height * aspectRatio;
|
|
340
|
-
}
|
|
341
|
-
return {
|
|
342
|
-
width,
|
|
343
|
-
height
|
|
344
|
-
};
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
// src/components/ResponsiveGrid/ResponsiveGridItem.tsx
|
|
348
|
-
import React5, { useEffect as useEffect4, useState as useState2 } from "react";
|
|
349
|
-
import { Icon, IconButton, useTranslation } from "@dxos/react-ui";
|
|
350
|
-
import { Waveform } from "@dxos/react-ui-sfx";
|
|
351
|
-
import { groupHoverControlItemWithTransition, mx as mx4 } from "@dxos/ui-theme";
|
|
352
|
-
var ResponsiveGridItem = ({ children, classNames, item, style, name, self, pinned, screenshare, video, mute, wave, speaking, onClick }) => {
|
|
353
|
-
const { t } = useTranslation(meta.id);
|
|
354
|
-
const iconProps = {
|
|
355
|
-
wave: {
|
|
356
|
-
icon: "ph--hand-waving--duotone",
|
|
357
|
-
label: t("icon wave"),
|
|
358
|
-
classNames: "animate-pulse bg-orange-500"
|
|
359
|
-
},
|
|
360
|
-
mute: {
|
|
361
|
-
icon: "ph--microphone-slash--regular",
|
|
362
|
-
label: t("icon muted")
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
const props = wave && !pinned ? iconProps.wave : mute ? iconProps.mute : speaking ? iconProps.speaking : void 0;
|
|
366
|
-
const [speakingIndicator, setSpeakingIndicator] = useState2(speaking);
|
|
367
|
-
useEffect4(() => {
|
|
368
|
-
if (speaking) {
|
|
369
|
-
setSpeakingIndicator(true);
|
|
370
|
-
} else {
|
|
371
|
-
const timeout = setTimeout(() => {
|
|
372
|
-
setSpeakingIndicator(false);
|
|
373
|
-
}, 1e3);
|
|
374
|
-
return () => clearTimeout(timeout);
|
|
375
|
-
}
|
|
376
|
-
}, [
|
|
377
|
-
speaking
|
|
378
|
-
]);
|
|
379
|
-
return /* @__PURE__ */ React5.createElement("div", {
|
|
380
|
-
className: mx4("relative w-full h-full group", "rounded-md outline outline-2 outline-neutral-900 transition-[outline-color] duration-500", speakingIndicator ? "outline-green-500" : !video && "outline-separator", classNames),
|
|
381
|
-
style
|
|
382
|
-
}, children, onClick && /* @__PURE__ */ React5.createElement("div", {
|
|
383
|
-
className: "z-10 absolute top-1 right-1 flex"
|
|
384
|
-
}, /* @__PURE__ */ React5.createElement(IconButton, {
|
|
385
|
-
classNames: mx4("p-1 min-h-1 rounded-sm", groupHoverControlItemWithTransition),
|
|
386
|
-
iconOnly: true,
|
|
387
|
-
icon: pinned ? "ph--x--regular" : "ph--arrows-out--regular",
|
|
388
|
-
size: pinned ? 5 : 4,
|
|
389
|
-
label: pinned ? t("icon unpin") : t("icon pin"),
|
|
390
|
-
onClick: () => onClick?.(item)
|
|
391
|
-
})), name && /* @__PURE__ */ React5.createElement("div", {
|
|
392
|
-
className: "z-10 absolute bottom-1 left-8 right-1 flex justify-end gap-1 items-center"
|
|
393
|
-
}, screenshare && /* @__PURE__ */ React5.createElement(Icon, {
|
|
394
|
-
icon: "ph--broadcast--regular",
|
|
395
|
-
size: pinned ? 5 : 4
|
|
396
|
-
}), /* @__PURE__ */ React5.createElement("div", {
|
|
397
|
-
className: mx4("bg-neutral-800 text-neutral-100 py-0.5 truncate rounded-sm", pinned ? "px-2" : "px-1 text-xs")
|
|
398
|
-
}, name)), /* @__PURE__ */ React5.createElement("div", {
|
|
399
|
-
className: "z-10 absolute bottom-1 left-1 flex"
|
|
400
|
-
}, speaking && /* @__PURE__ */ React5.createElement(Waveform, {
|
|
401
|
-
active: true,
|
|
402
|
-
size: pinned ? 5 : 4
|
|
403
|
-
}) || props && /* @__PURE__ */ React5.createElement(IconButton, {
|
|
404
|
-
classNames: mx4("p-1 min-h-1 rounded-sm", props?.classNames),
|
|
405
|
-
icon: props?.icon,
|
|
406
|
-
label: props?.label,
|
|
407
|
-
size: pinned ? 5 : 4,
|
|
408
|
-
iconOnly: true
|
|
409
|
-
})));
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
// src/components/Participant/Participant.tsx
|
|
413
|
-
var SCREENSHARE_SUFFIX = "_screenshare";
|
|
414
|
-
var Participant = /* @__PURE__ */ memo2(({ item: user, debug, ...props }) => {
|
|
415
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
416
|
-
const self = useAtomValue(call.selfAtom);
|
|
417
|
-
const media = useAtomValue(call.mediaAtom);
|
|
418
|
-
const isSelf = self.id !== void 0 && user.id !== void 0 && user.id.startsWith(self.id);
|
|
419
|
-
const isScreenshare = user.id?.endsWith(SCREENSHARE_SUFFIX);
|
|
420
|
-
const pulledVideoStream = useMemo2(() => {
|
|
421
|
-
if (isSelf) {
|
|
422
|
-
return void 0;
|
|
423
|
-
}
|
|
424
|
-
const trackName = isScreenshare && user.tracks?.screenshareEnabled ? user.tracks?.screenshare : !isScreenshare && user.tracks?.videoEnabled ? user.tracks?.video : void 0;
|
|
425
|
-
return trackName ? media.pulledVideoStreams[trackName]?.stream : void 0;
|
|
426
|
-
}, [
|
|
427
|
-
isSelf,
|
|
428
|
-
isScreenshare,
|
|
429
|
-
media.pulledVideoStreams,
|
|
430
|
-
user.tracks?.screenshare,
|
|
431
|
-
user.tracks?.video,
|
|
432
|
-
user.tracks?.screenshareEnabled,
|
|
433
|
-
user.tracks?.videoEnabled
|
|
434
|
-
]);
|
|
435
|
-
const videoStream = useMemo2(() => {
|
|
436
|
-
if (isSelf) {
|
|
437
|
-
return isScreenshare ? media.screenshareVideoStream : media.videoStream;
|
|
438
|
-
}
|
|
439
|
-
return pulledVideoStream;
|
|
440
|
-
}, [
|
|
441
|
-
isSelf,
|
|
442
|
-
isScreenshare,
|
|
443
|
-
media.videoStream,
|
|
444
|
-
media.screenshareVideoStream,
|
|
445
|
-
pulledVideoStream
|
|
446
|
-
]);
|
|
447
|
-
return /* @__PURE__ */ React6.createElement(ResponsiveGridItem, {
|
|
448
|
-
...props,
|
|
449
|
-
item: user,
|
|
450
|
-
name: user.name,
|
|
451
|
-
self: isSelf,
|
|
452
|
-
screenshare: !!media.screenshareVideoStream,
|
|
453
|
-
video: media.videoEnabled,
|
|
454
|
-
mute: user ? !user.tracks?.audioEnabled : false,
|
|
455
|
-
wave: user.raisedHand,
|
|
456
|
-
speaking: user.speaking,
|
|
457
|
-
debug
|
|
458
|
-
}, /* @__PURE__ */ React6.createElement(VideoObject, {
|
|
459
|
-
videoStream,
|
|
460
|
-
flip: isSelf && !isScreenshare,
|
|
461
|
-
contain: !!isScreenshare,
|
|
462
|
-
classNames: "rounded-md"
|
|
463
|
-
}));
|
|
464
|
-
});
|
|
465
|
-
Participant.displayName = "Participant";
|
|
466
|
-
|
|
467
|
-
// src/components/Participant/ParticipantGrid.tsx
|
|
468
|
-
import React7, { useEffect as useEffect5, useMemo as useMemo3, useState as useState3 } from "react";
|
|
469
|
-
var getId = (user) => user.id;
|
|
470
|
-
var ParticipantGrid = ({ classNames, self, users, fullscreen, debug }) => {
|
|
471
|
-
const [pinned, setPinned] = useState3();
|
|
472
|
-
const allUsers = useMemo3(() => {
|
|
473
|
-
const allUsers2 = [];
|
|
474
|
-
users.forEach((user) => {
|
|
475
|
-
if (!user.joined) {
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
allUsers2.push({
|
|
479
|
-
...user,
|
|
480
|
-
isSelf: user.id === self.id
|
|
481
|
-
});
|
|
482
|
-
if (user.tracks?.screenshareEnabled) {
|
|
483
|
-
const screenshare = {
|
|
484
|
-
...user,
|
|
485
|
-
id: user.id + SCREENSHARE_SUFFIX,
|
|
486
|
-
tracks: {
|
|
487
|
-
...user.tracks,
|
|
488
|
-
video: user.tracks.screenshare,
|
|
489
|
-
videoEnabled: user.tracks.screenshareEnabled
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
allUsers2.push(screenshare);
|
|
493
|
-
}
|
|
494
|
-
});
|
|
495
|
-
return allUsers2;
|
|
496
|
-
}, [
|
|
497
|
-
self,
|
|
498
|
-
users
|
|
499
|
-
]);
|
|
500
|
-
useEffect5(() => {
|
|
501
|
-
if (pinned) {
|
|
502
|
-
if (!allUsers.find((user) => user.id === pinned)) {
|
|
503
|
-
setPinned(void 0);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}, [
|
|
507
|
-
pinned,
|
|
508
|
-
allUsers
|
|
509
|
-
]);
|
|
510
|
-
const sortedUsers = allUsers.sort((a, b) => {
|
|
511
|
-
if (a.isSelf) {
|
|
512
|
-
return 1;
|
|
513
|
-
} else if (b.isSelf) {
|
|
514
|
-
return -1;
|
|
515
|
-
} else if (a.tracks?.screenshareEnabled) {
|
|
516
|
-
return -1;
|
|
517
|
-
} else if (b.tracks?.screenshareEnabled) {
|
|
518
|
-
return 1;
|
|
519
|
-
} else {
|
|
520
|
-
return 0;
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
return /* @__PURE__ */ React7.createElement(ResponsiveGrid, {
|
|
524
|
-
classNames,
|
|
525
|
-
Cell: Participant,
|
|
526
|
-
debug,
|
|
527
|
-
getId,
|
|
528
|
-
items: sortedUsers,
|
|
529
|
-
pinned,
|
|
530
|
-
autoHideGallery: fullscreen,
|
|
531
|
-
onPinnedChange: setPinned
|
|
532
|
-
});
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
// src/components/Call/Toolbar.tsx
|
|
536
|
-
import { useAtomValue as useAtomValue2 } from "@effect-atom/atom-react";
|
|
537
|
-
import React8 from "react";
|
|
538
|
-
import { useCapability as useCapability2 } from "@dxos/app-framework/ui";
|
|
539
|
-
import { useAppGraph } from "@dxos/app-toolkit/ui";
|
|
540
|
-
import { Obj } from "@dxos/echo";
|
|
541
|
-
import { Node, useActionRunner } from "@dxos/plugin-graph";
|
|
542
|
-
import { useActions, useNode } from "@dxos/plugin-graph";
|
|
543
|
-
import { Icon as Icon2, IconButton as IconButton2, Toolbar as NaturalToolbar, toLocalizedString, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
544
|
-
import { groupHoverControlItemWithTransition as groupHoverControlItemWithTransition2, mx as mx5 } from "@dxos/ui-theme";
|
|
545
|
-
var Toolbar = ({ classNames, channel, participants, autoHideControls = true, onJoin, onLeave }) => {
|
|
546
|
-
const { t } = useTranslation2(meta.id);
|
|
547
|
-
const { graph } = useAppGraph();
|
|
548
|
-
const runAction = useActionRunner();
|
|
549
|
-
const call = useCapability2(ThreadCapabilities.CallManager);
|
|
550
|
-
const media = useAtomValue2(call.mediaAtom);
|
|
551
|
-
const joined = useAtomValue2(call.joinedAtom);
|
|
552
|
-
const raisedHand = useAtomValue2(call.raisedHandAtom);
|
|
553
|
-
const node = useNode(graph, channel && Obj.getDXN(channel).toString());
|
|
554
|
-
const actions = useActions(graph, node?.id).filter((action) => action.properties.disposition === "toolbar");
|
|
555
|
-
const isScreensharing = media.screenshareTrack !== void 0;
|
|
556
|
-
const canSharescreen = typeof navigator.mediaDevices !== "undefined" && navigator.mediaDevices.getDisplayMedia !== void 0;
|
|
557
|
-
return /* @__PURE__ */ React8.createElement("div", {
|
|
558
|
-
className: mx5("z-20 flex justify-center m-8", autoHideControls && groupHoverControlItemWithTransition2)
|
|
559
|
-
}, /* @__PURE__ */ React8.createElement(NaturalToolbar.Root, {
|
|
560
|
-
classNames: [
|
|
561
|
-
"p-2 bg-modal-surface rounded-md shadow-md",
|
|
562
|
-
classNames
|
|
563
|
-
]
|
|
564
|
-
}, /* @__PURE__ */ React8.createElement(ToggleButton, {
|
|
565
|
-
active: media.audioEnabled,
|
|
566
|
-
state: {
|
|
567
|
-
on: {
|
|
568
|
-
icon: "ph--microphone--regular",
|
|
569
|
-
label: t("mic off"),
|
|
570
|
-
onClick: () => call.turnAudioOff(),
|
|
571
|
-
classNames: "bg-call-active"
|
|
572
|
-
},
|
|
573
|
-
off: {
|
|
574
|
-
icon: "ph--microphone-slash--duotone",
|
|
575
|
-
label: t("mic on"),
|
|
576
|
-
onClick: () => call.turnAudioOn()
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}), /* @__PURE__ */ React8.createElement(ToggleButton, {
|
|
580
|
-
active: media.videoEnabled,
|
|
581
|
-
state: {
|
|
582
|
-
on: {
|
|
583
|
-
icon: "ph--video-camera--regular",
|
|
584
|
-
label: t("camera off"),
|
|
585
|
-
onClick: () => call.turnVideoOff()
|
|
586
|
-
},
|
|
587
|
-
off: {
|
|
588
|
-
icon: "ph--video-camera-slash--duotone",
|
|
589
|
-
label: t("camera on"),
|
|
590
|
-
onClick: () => call.turnVideoOn()
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
}), participants !== void 0 && /* @__PURE__ */ React8.createElement("div", {
|
|
594
|
-
className: "flex justify-center items-center gap-2 w-[5rem] text-xs text-subdued"
|
|
595
|
-
}, /* @__PURE__ */ React8.createElement(Icon2, {
|
|
596
|
-
icon: "ph--users--regular",
|
|
597
|
-
size: 4
|
|
598
|
-
}), /* @__PURE__ */ React8.createElement("div", null, participants)) || /* @__PURE__ */ React8.createElement(NaturalToolbar.Separator, {
|
|
599
|
-
variant: "gap"
|
|
600
|
-
}), joined && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(ToggleButton, {
|
|
601
|
-
disabled: !canSharescreen,
|
|
602
|
-
active: isScreensharing,
|
|
603
|
-
state: {
|
|
604
|
-
on: {
|
|
605
|
-
icon: "ph--monitor--regular",
|
|
606
|
-
label: t("screenshare off"),
|
|
607
|
-
onClick: () => call.turnScreenshareOff()
|
|
608
|
-
},
|
|
609
|
-
off: {
|
|
610
|
-
icon: "ph--monitor-arrow-up--duotone",
|
|
611
|
-
label: t("screenshare on"),
|
|
612
|
-
onClick: () => call.turnScreenshareOn()
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}), actions.filter((action) => Node.isAction(action)).map((action) => /* @__PURE__ */ React8.createElement(IconButton2, {
|
|
616
|
-
key: action.id,
|
|
617
|
-
...defaultButtonProps,
|
|
618
|
-
icon: action.properties.icon,
|
|
619
|
-
label: toLocalizedString(action.properties.label, t),
|
|
620
|
-
classNames: action.properties.classNames,
|
|
621
|
-
onClick: () => node && void runAction(action, {
|
|
622
|
-
parent: node
|
|
623
|
-
})
|
|
624
|
-
})), /* @__PURE__ */ React8.createElement(ToggleButton, {
|
|
625
|
-
active: raisedHand,
|
|
626
|
-
state: {
|
|
627
|
-
on: {
|
|
628
|
-
icon: "ph--hand-waving--regular",
|
|
629
|
-
label: t("lower hand"),
|
|
630
|
-
onClick: () => call.setRaisedHand(false)
|
|
631
|
-
},
|
|
632
|
-
off: {
|
|
633
|
-
icon: "ph--hand-palm--duotone",
|
|
634
|
-
label: t("raise hand"),
|
|
635
|
-
onClick: () => call.setRaisedHand(true)
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
})), joined ? /* @__PURE__ */ React8.createElement(IconButton2, {
|
|
639
|
-
variant: "destructive",
|
|
640
|
-
icon: "ph--phone-x--regular",
|
|
641
|
-
label: t("leave call"),
|
|
642
|
-
onClick: onLeave
|
|
643
|
-
}) : /* @__PURE__ */ React8.createElement(IconButton2, {
|
|
644
|
-
variant: "primary",
|
|
645
|
-
icon: "ph--phone-incoming--regular",
|
|
646
|
-
label: t("join call"),
|
|
647
|
-
onClick: onJoin
|
|
648
|
-
})));
|
|
649
|
-
};
|
|
650
|
-
Toolbar.displayName = "MeetingToolbar";
|
|
651
|
-
var defaultButtonProps = {
|
|
652
|
-
size: 5,
|
|
653
|
-
iconOnly: true
|
|
654
|
-
};
|
|
655
|
-
var ToggleButton = ({ active, state }) => /* @__PURE__ */ React8.createElement(IconButton2, {
|
|
656
|
-
...defaultButtonProps,
|
|
657
|
-
classNames: [
|
|
658
|
-
active ? state.on.classNames ?? "bg-call-active" : state.off.classNames
|
|
659
|
-
],
|
|
660
|
-
icon: active ? state.on.icon : state.off.icon,
|
|
661
|
-
label: active ? state.on.label : state.off.label,
|
|
662
|
-
onClick: active ? state.on.onClick : state.off.onClick
|
|
663
|
-
});
|
|
664
|
-
|
|
665
|
-
// src/components/Call/Call.tsx
|
|
666
|
-
var CallRoot = ({ children }) => {
|
|
667
|
-
return /* @__PURE__ */ React9.createElement("div", {
|
|
668
|
-
className: "relative flex flex-col grow overflow-hidden"
|
|
669
|
-
}, children);
|
|
670
|
-
};
|
|
671
|
-
CallRoot.displayName = "CallRoot";
|
|
672
|
-
var CallAudio = () => {
|
|
673
|
-
const call = useCapability3(ThreadCapabilities.CallManager);
|
|
674
|
-
const audioTracksToPlay = useAtomValue3(call.audioTracksToPlayAtom);
|
|
675
|
-
return /* @__PURE__ */ React9.createElement(AudioStream, {
|
|
676
|
-
tracks: audioTracksToPlay
|
|
677
|
-
});
|
|
678
|
-
};
|
|
679
|
-
CallAudio.displayName = "CallAudio";
|
|
680
|
-
var CallGrid = ({ fullscreen }) => {
|
|
681
|
-
const debug = useDebugMode();
|
|
682
|
-
const call = useCapability3(ThreadCapabilities.CallManager);
|
|
683
|
-
const self = useAtomValue3(call.selfAtom);
|
|
684
|
-
const users = useAtomValue3(call.usersAtom);
|
|
685
|
-
return /* @__PURE__ */ React9.createElement("div", {
|
|
686
|
-
className: "grid grow p-4 dark:bg-neutral-900"
|
|
687
|
-
}, /* @__PURE__ */ React9.createElement(ParticipantGrid, {
|
|
688
|
-
self,
|
|
689
|
-
users,
|
|
690
|
-
debug,
|
|
691
|
-
fullscreen
|
|
692
|
-
}));
|
|
693
|
-
};
|
|
694
|
-
CallGrid.displayName = "CallGrid";
|
|
695
|
-
var CallToolbar = (props) => {
|
|
696
|
-
return /* @__PURE__ */ React9.createElement("div", {
|
|
697
|
-
className: "absolute bottom-0 left-0 right-0 flex justify-center"
|
|
698
|
-
}, /* @__PURE__ */ React9.createElement(Toolbar, {
|
|
699
|
-
isInRoom: true,
|
|
700
|
-
...props
|
|
701
|
-
}));
|
|
702
|
-
};
|
|
703
|
-
CallToolbar.displayName = "CallToolbar";
|
|
704
|
-
var Call = {
|
|
705
|
-
Root: CallRoot,
|
|
706
|
-
Grid: CallGrid,
|
|
707
|
-
Audio: CallAudio,
|
|
708
|
-
Toolbar: CallToolbar
|
|
709
|
-
};
|
|
710
|
-
|
|
711
|
-
// src/components/CommentsContainer.tsx
|
|
712
|
-
import React12, { useEffect as useEffect7 } from "react";
|
|
713
|
-
import { Obj as Obj3, Relation as Relation2 } from "@dxos/echo";
|
|
714
|
-
import { Icon as Icon3, Message, Trans, useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
715
|
-
|
|
716
|
-
// src/components/CommentsThreadContainer.tsx
|
|
717
|
-
import React11, { useCallback as useCallback3, useMemo as useMemo4, useRef as useRef4, useState as useState5 } from "react";
|
|
718
|
-
import { Obj as Obj2, Relation } from "@dxos/echo";
|
|
719
|
-
import { useObject as useObject2 } from "@dxos/echo-react";
|
|
720
|
-
import { getSpace, useMembers } from "@dxos/react-client/echo";
|
|
721
|
-
import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
|
|
722
|
-
import { IconButton as IconButton4, Tag, Tooltip, useThemeContext as useThemeContext2, useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
723
|
-
import { MessageTextbox, Thread as ThreadComponent } from "@dxos/react-ui-thread";
|
|
724
|
-
import { createBasicExtensions as createBasicExtensions2, createThemeExtensions as createThemeExtensions2, listener } from "@dxos/ui-editor";
|
|
725
|
-
import { hoverableControlItem as hoverableControlItem2, hoverableControls as hoverableControls2, hoverableFocusedWithinControls as hoverableFocusedWithinControls2, mx as mx8 } from "@dxos/ui-theme";
|
|
726
|
-
|
|
727
|
-
// src/components/command-extension.ts
|
|
728
|
-
import { HighlightStyle, StreamLanguage, syntaxHighlighting } from "@codemirror/language";
|
|
729
|
-
import { tags } from "@dxos/ui-editor";
|
|
730
|
-
import { mx as mx6 } from "@dxos/ui-theme";
|
|
731
|
-
var parser = StreamLanguage.define({
|
|
732
|
-
startState: () => ({
|
|
733
|
-
count: 0
|
|
734
|
-
}),
|
|
735
|
-
token: (stream, state) => {
|
|
736
|
-
state.count++;
|
|
737
|
-
if (stream.eatSpace()) {
|
|
738
|
-
return null;
|
|
739
|
-
}
|
|
740
|
-
if (state.count === 1 && stream.match(/^(\/\w+)/)) {
|
|
741
|
-
return "tagName";
|
|
742
|
-
}
|
|
743
|
-
stream.next();
|
|
744
|
-
return null;
|
|
745
|
-
}
|
|
746
|
-
});
|
|
747
|
-
var styles = HighlightStyle.define([
|
|
748
|
-
{
|
|
749
|
-
tag: tags.tagName,
|
|
750
|
-
class: mx6("dx-tag dx-tag--indigo text-base-surface-text font-medium")
|
|
751
|
-
}
|
|
752
|
-
]);
|
|
753
|
-
var command = [
|
|
754
|
-
parser,
|
|
755
|
-
syntaxHighlighting(styles)
|
|
756
|
-
];
|
|
757
|
-
|
|
758
|
-
// src/components/MessageContainer.tsx
|
|
759
|
-
import { EditorView } from "@codemirror/view";
|
|
760
|
-
import React10, { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect6, useRef as useRef3, useState as useState4 } from "react";
|
|
761
|
-
import { Surface } from "@dxos/app-framework/ui";
|
|
762
|
-
import { Ref } from "@dxos/echo";
|
|
763
|
-
import { useObject } from "@dxos/echo-react";
|
|
764
|
-
import { PublicKey } from "@dxos/react-client";
|
|
765
|
-
import { useIdentity } from "@dxos/react-client/halo";
|
|
766
|
-
import { IconButton as IconButton3, useOnTransition, useThemeContext, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
767
|
-
import { Card } from "@dxos/react-ui";
|
|
768
|
-
import { useTextEditor } from "@dxos/react-ui-editor";
|
|
769
|
-
import { MessageHeading, MessageRoot } from "@dxos/react-ui-thread";
|
|
770
|
-
import { createBasicExtensions, createThemeExtensions } from "@dxos/ui-editor";
|
|
771
|
-
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx as mx7 } from "@dxos/ui-theme";
|
|
772
|
-
var buttonGroupClassNames = "flex flex-row items-center gap-0.5 pe-2";
|
|
773
|
-
var buttonClassNames = "p-1! transition-opacity";
|
|
774
|
-
var MessageContainer = ({ message: messageOrRef, members, editable = false, onDelete, onAcceptProposal }) => {
|
|
775
|
-
const { t } = useTranslation3(meta.id);
|
|
776
|
-
const [message, updateMessage] = useObject(messageOrRef);
|
|
777
|
-
const identity = useIdentity();
|
|
778
|
-
const [editing, setEditing] = useState4(false);
|
|
779
|
-
const textBlockIndex = message?.blocks.findIndex((block) => block._tag === "text") ?? -1;
|
|
780
|
-
const handleEdit = useCallback2(() => setEditing((editing2) => !editing2), []);
|
|
781
|
-
const handleDelete = useCallback2(() => message && onDelete?.(message.id), [
|
|
782
|
-
message,
|
|
783
|
-
onDelete
|
|
784
|
-
]);
|
|
785
|
-
const handleAcceptProposal = useCallback2(() => message && onAcceptProposal?.(message.id), [
|
|
786
|
-
message,
|
|
787
|
-
onAcceptProposal
|
|
788
|
-
]);
|
|
789
|
-
const handleTextBlockChange = useCallback2((newText) => {
|
|
790
|
-
updateMessage((m) => {
|
|
791
|
-
const targetBlock = m.blocks[textBlockIndex];
|
|
792
|
-
if (targetBlock && targetBlock._tag === "text") {
|
|
793
|
-
targetBlock.text = newText;
|
|
794
|
-
}
|
|
795
|
-
});
|
|
796
|
-
}, [
|
|
797
|
-
updateMessage,
|
|
798
|
-
textBlockIndex
|
|
799
|
-
]);
|
|
800
|
-
const textBlock = message && textBlockIndex !== -1 ? message.blocks[textBlockIndex] : void 0;
|
|
801
|
-
useOnEditAnalytics(message, textBlock, !!editing);
|
|
802
|
-
if (!message) {
|
|
803
|
-
return null;
|
|
804
|
-
}
|
|
805
|
-
const senderIdentity = members.find((member) => message.sender.identityDid && member.identity.did === message.sender.identityDid || message.sender.identityKey && PublicKey.equals(member.identity.identityKey, message.sender.identityKey))?.identity;
|
|
806
|
-
const messageMetadata = getMessageMetadata(message.id, senderIdentity);
|
|
807
|
-
const userIsAuthor = identity?.did === messageMetadata.authorId;
|
|
808
|
-
const proposalBlock = message.blocks.find((block) => block._tag === "proposal");
|
|
809
|
-
const references = message.blocks.filter((block) => block._tag === "reference").map((block) => block.reference);
|
|
810
|
-
return /* @__PURE__ */ React10.createElement(MessageRoot, {
|
|
811
|
-
...messageMetadata,
|
|
812
|
-
classNames: [
|
|
813
|
-
hoverableControls,
|
|
814
|
-
hoverableFocusedWithinControls
|
|
815
|
-
]
|
|
816
|
-
}, /* @__PURE__ */ React10.createElement(MessageHeading, {
|
|
817
|
-
authorName: messageMetadata.authorName,
|
|
818
|
-
timestamp: messageMetadata.timestamp
|
|
819
|
-
}, /* @__PURE__ */ React10.createElement("div", {
|
|
820
|
-
role: "none",
|
|
821
|
-
className: buttonGroupClassNames
|
|
822
|
-
}, userIsAuthor && editable && /* @__PURE__ */ React10.createElement(IconButton3, {
|
|
823
|
-
"data-testid": editing ? "thread.message.save" : "thread.message.edit",
|
|
824
|
-
variant: "ghost",
|
|
825
|
-
icon: editing ? "ph--check--regular" : "ph--pencil-simple--regular",
|
|
826
|
-
iconOnly: true,
|
|
827
|
-
label: t(editing ? "save message label" : "edit message label"),
|
|
828
|
-
classNames: [
|
|
829
|
-
buttonClassNames,
|
|
830
|
-
hoverableControlItem
|
|
831
|
-
],
|
|
832
|
-
onClick: handleEdit
|
|
833
|
-
}), proposalBlock && onAcceptProposal && /* @__PURE__ */ React10.createElement(IconButton3, {
|
|
834
|
-
"data-testid": "thread.message.accept",
|
|
835
|
-
variant: "ghost",
|
|
836
|
-
icon: "ph--check--regular",
|
|
837
|
-
iconOnly: true,
|
|
838
|
-
label: t("accept proposal label"),
|
|
839
|
-
classNames: [
|
|
840
|
-
buttonClassNames,
|
|
841
|
-
hoverableControlItem
|
|
842
|
-
],
|
|
843
|
-
onClick: handleAcceptProposal
|
|
844
|
-
}), onDelete && /* @__PURE__ */ React10.createElement(IconButton3, {
|
|
845
|
-
"data-testid": "thread.message.delete",
|
|
846
|
-
variant: "ghost",
|
|
847
|
-
icon: "ph--x--regular",
|
|
848
|
-
iconOnly: true,
|
|
849
|
-
label: t("delete message label"),
|
|
850
|
-
classNames: [
|
|
851
|
-
buttonClassNames,
|
|
852
|
-
hoverableControlItem
|
|
853
|
-
],
|
|
854
|
-
onClick: handleDelete
|
|
855
|
-
}))), textBlock && /* @__PURE__ */ React10.createElement(TextboxBlock, {
|
|
856
|
-
block: textBlock,
|
|
857
|
-
isAuthor: userIsAuthor,
|
|
858
|
-
editing,
|
|
859
|
-
onSave: handleTextBlockChange
|
|
860
|
-
}), proposalBlock && /* @__PURE__ */ React10.createElement(ProposalBlock, {
|
|
861
|
-
block: proposalBlock
|
|
862
|
-
}), Ref.Array.targets(references).map((reference, index) => /* @__PURE__ */ React10.createElement(MessagePart, {
|
|
863
|
-
key: index,
|
|
864
|
-
part: reference
|
|
865
|
-
})));
|
|
866
|
-
};
|
|
867
|
-
var MessagePart = ({ part }) => {
|
|
868
|
-
return /* @__PURE__ */ React10.createElement(MessageBlockObjectTile, {
|
|
869
|
-
subject: part
|
|
870
|
-
});
|
|
871
|
-
};
|
|
872
|
-
var TextboxBlock = ({ block, isAuthor, editing, onSave }) => {
|
|
873
|
-
const { themeMode } = useThemeContext();
|
|
874
|
-
const inMemoryContentRef = useRef3(block.text);
|
|
875
|
-
const handleDocumentChange = useCallback2((newState) => {
|
|
876
|
-
inMemoryContentRef.current = newState;
|
|
877
|
-
}, []);
|
|
878
|
-
const saveDocumentChange = useCallback2(() => {
|
|
879
|
-
onSave?.(inMemoryContentRef.current);
|
|
880
|
-
}, [
|
|
881
|
-
onSave
|
|
882
|
-
]);
|
|
883
|
-
useOnTransition(editing, true, false, saveDocumentChange);
|
|
884
|
-
const { parentRef, focusAttributes, view } = useTextEditor(() => ({
|
|
885
|
-
initialValue: block.text,
|
|
886
|
-
extensions: [
|
|
887
|
-
createBasicExtensions({
|
|
888
|
-
readOnly: !isAuthor || !editing
|
|
889
|
-
}),
|
|
890
|
-
createThemeExtensions({
|
|
891
|
-
themeMode
|
|
892
|
-
}),
|
|
893
|
-
command,
|
|
894
|
-
EditorView.updateListener.of((update) => {
|
|
895
|
-
if (update.docChanged) {
|
|
896
|
-
handleDocumentChange(update.state.doc.toString());
|
|
897
|
-
}
|
|
898
|
-
})
|
|
899
|
-
]
|
|
900
|
-
}), [
|
|
901
|
-
block.text,
|
|
902
|
-
editing,
|
|
903
|
-
isAuthor,
|
|
904
|
-
themeMode,
|
|
905
|
-
handleDocumentChange
|
|
906
|
-
]);
|
|
907
|
-
useEffect6(() => {
|
|
908
|
-
editing && view?.focus();
|
|
909
|
-
}, [
|
|
910
|
-
editing,
|
|
911
|
-
view
|
|
912
|
-
]);
|
|
913
|
-
return /* @__PURE__ */ React10.createElement("div", {
|
|
914
|
-
role: "none",
|
|
915
|
-
ref: parentRef,
|
|
916
|
-
className: "me-4",
|
|
917
|
-
...focusAttributes
|
|
918
|
-
});
|
|
919
|
-
};
|
|
920
|
-
var ProposalBlock = ({ block }) => {
|
|
921
|
-
return /* @__PURE__ */ React10.createElement("div", {
|
|
922
|
-
role: "none",
|
|
923
|
-
className: "me-4 italic"
|
|
924
|
-
}, block.text);
|
|
925
|
-
};
|
|
926
|
-
var MessageBlockObjectTile = /* @__PURE__ */ forwardRef2(({ subject }, forwardedRef) => {
|
|
927
|
-
let title = subject.name ?? subject.title ?? subject.type ?? "Object";
|
|
928
|
-
if (typeof title !== "string") {
|
|
929
|
-
title = title?.content ?? "";
|
|
930
|
-
}
|
|
931
|
-
return /* @__PURE__ */ React10.createElement(Card.Root, {
|
|
932
|
-
className: mx7("grid col-span-3 py-1 pr-4", hoverableControls, hoverableFocusedWithinControls),
|
|
933
|
-
ref: forwardedRef
|
|
934
|
-
}, /* @__PURE__ */ React10.createElement(Surface.Surface, {
|
|
935
|
-
role: "card--content",
|
|
936
|
-
limit: 1,
|
|
937
|
-
data: {
|
|
938
|
-
subject
|
|
939
|
-
},
|
|
940
|
-
fallback: title
|
|
941
|
-
}));
|
|
942
|
-
});
|
|
943
|
-
|
|
944
|
-
// src/components/CommentsThreadContainer.tsx
|
|
945
|
-
var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve, onMessageDelete, onThreadDelete, onAcceptProposal }) => {
|
|
946
|
-
const { themeMode } = useThemeContext2();
|
|
947
|
-
const { t } = useTranslation4(meta.id);
|
|
948
|
-
const identity = useIdentity2();
|
|
949
|
-
const space = getSpace(anchor);
|
|
950
|
-
const members = useMembers(space?.id);
|
|
951
|
-
const detached = !anchor.anchor;
|
|
952
|
-
const thread = Relation.getSource(anchor);
|
|
953
|
-
const [messages] = useObject2(thread, "messages");
|
|
954
|
-
const activity = useStatus(space, Obj2.getDXN(thread).toString());
|
|
955
|
-
const threadScrollRef = useRef4(null);
|
|
956
|
-
const textboxMetadata = getMessageMetadata(Obj2.getDXN(thread).toString(), identity);
|
|
957
|
-
const [state, setState] = useState5({});
|
|
958
|
-
const messageRef = useRef4("");
|
|
959
|
-
const extensions = useMemo4(() => [
|
|
960
|
-
createBasicExtensions2({
|
|
961
|
-
placeholder: t("message placeholder")
|
|
962
|
-
}),
|
|
963
|
-
createThemeExtensions2({
|
|
964
|
-
themeMode
|
|
965
|
-
}),
|
|
966
|
-
listener({
|
|
967
|
-
onChange: ({ text }) => messageRef.current = text
|
|
968
|
-
}),
|
|
969
|
-
command
|
|
970
|
-
], [
|
|
971
|
-
state
|
|
972
|
-
]);
|
|
973
|
-
const scrollToEnd = (behavior) => setTimeout(() => threadScrollRef.current?.scrollIntoView({
|
|
974
|
-
behavior,
|
|
975
|
-
block: "end"
|
|
976
|
-
}), 10);
|
|
977
|
-
const handleAttend = useCallback3(() => onAttend?.(anchor), [
|
|
978
|
-
onAttend,
|
|
979
|
-
anchor
|
|
980
|
-
]);
|
|
981
|
-
const handleResolve = useCallback3(() => onResolve?.(anchor), [
|
|
982
|
-
onResolve,
|
|
983
|
-
anchor
|
|
984
|
-
]);
|
|
985
|
-
const handleMessageDelete = useCallback3((id) => onMessageDelete?.(anchor, id), [
|
|
986
|
-
onMessageDelete,
|
|
987
|
-
anchor
|
|
988
|
-
]);
|
|
989
|
-
const handleThreadDelete = useCallback3(() => onThreadDelete?.(anchor), [
|
|
990
|
-
onThreadDelete,
|
|
991
|
-
anchor
|
|
992
|
-
]);
|
|
993
|
-
const handleAcceptProposal = useCallback3((id) => onAcceptProposal?.(anchor, id), [
|
|
994
|
-
onAcceptProposal,
|
|
995
|
-
anchor
|
|
996
|
-
]);
|
|
997
|
-
const handleComment = useCallback3(() => {
|
|
998
|
-
if (!messageRef.current) {
|
|
999
|
-
return false;
|
|
1000
|
-
}
|
|
1001
|
-
onComment?.(anchor, messageRef.current);
|
|
1002
|
-
messageRef.current = "";
|
|
1003
|
-
scrollToEnd("instant");
|
|
1004
|
-
setState({});
|
|
1005
|
-
return true;
|
|
1006
|
-
}, [
|
|
1007
|
-
anchor,
|
|
1008
|
-
identity
|
|
1009
|
-
]);
|
|
1010
|
-
return /* @__PURE__ */ React11.createElement(ThreadComponent.Root, {
|
|
1011
|
-
id: Obj2.getDXN(thread).toString(),
|
|
1012
|
-
classNames: "pt-2 border-b border-subdued-separator last:border-none",
|
|
1013
|
-
current,
|
|
1014
|
-
onClickCapture: handleAttend,
|
|
1015
|
-
onFocusCapture: handleAttend
|
|
1016
|
-
}, /* @__PURE__ */ React11.createElement("div", {
|
|
1017
|
-
role: "none",
|
|
1018
|
-
className: mx8("col-span-2 grid grid-cols-[var(--dx-rail-size)_1fr_min-content]", hoverableControls2, hoverableFocusedWithinControls2)
|
|
1019
|
-
}, detached ? /* @__PURE__ */ React11.createElement(Tooltip.Trigger, {
|
|
1020
|
-
asChild: true,
|
|
1021
|
-
content: t("detached thread label"),
|
|
1022
|
-
side: "top"
|
|
1023
|
-
}, /* @__PURE__ */ React11.createElement(ThreadComponent.Header, {
|
|
1024
|
-
detached: true
|
|
1025
|
-
}, thread.name)) : /* @__PURE__ */ React11.createElement(ThreadComponent.Header, null, thread.name), /* @__PURE__ */ React11.createElement("div", {
|
|
1026
|
-
role: "none",
|
|
1027
|
-
className: buttonGroupClassNames
|
|
1028
|
-
}, thread.status === "staged" && /* @__PURE__ */ React11.createElement(Tag, {
|
|
1029
|
-
palette: "neutral"
|
|
1030
|
-
}, t("draft button")), onResolve && !(thread?.status === "staged") && /* @__PURE__ */ React11.createElement(IconButton4, {
|
|
1031
|
-
"data-testid": "thread.resolve",
|
|
1032
|
-
variant: "ghost",
|
|
1033
|
-
icon: thread?.status === "resolved" ? "ph--check--fill" : "ph--check--regular",
|
|
1034
|
-
iconOnly: true,
|
|
1035
|
-
label: t("resolve thread label"),
|
|
1036
|
-
classNames: [
|
|
1037
|
-
buttonClassNames,
|
|
1038
|
-
thread?.status !== "resolved" && hoverableControlItem2
|
|
1039
|
-
],
|
|
1040
|
-
onClick: handleResolve
|
|
1041
|
-
}), onThreadDelete && /* @__PURE__ */ React11.createElement(IconButton4, {
|
|
1042
|
-
"data-testid": "thread.delete",
|
|
1043
|
-
variant: "ghost",
|
|
1044
|
-
icon: "ph--x--regular",
|
|
1045
|
-
iconOnly: true,
|
|
1046
|
-
label: t("delete thread label"),
|
|
1047
|
-
classNames: [
|
|
1048
|
-
buttonClassNames,
|
|
1049
|
-
hoverableControlItem2
|
|
1050
|
-
],
|
|
1051
|
-
onClick: handleThreadDelete
|
|
1052
|
-
}))), messages?.map((ref) => /* @__PURE__ */ React11.createElement(MessageContainer, {
|
|
1053
|
-
key: ref.dxn.toString(),
|
|
1054
|
-
editable: true,
|
|
1055
|
-
message: ref,
|
|
1056
|
-
members,
|
|
1057
|
-
onDelete: handleMessageDelete,
|
|
1058
|
-
onAcceptProposal: handleAcceptProposal
|
|
1059
|
-
})), /* @__PURE__ */ React11.createElement(MessageTextbox, {
|
|
1060
|
-
extensions,
|
|
1061
|
-
onSend: handleComment,
|
|
1062
|
-
...textboxMetadata
|
|
1063
|
-
}), /* @__PURE__ */ React11.createElement(ThreadComponent.Status, {
|
|
1064
|
-
activity
|
|
1065
|
-
}, t("activity message")), /* @__PURE__ */ React11.createElement("div", {
|
|
1066
|
-
role: "none",
|
|
1067
|
-
className: "h-px -mt-px",
|
|
1068
|
-
ref: threadScrollRef
|
|
1069
|
-
}));
|
|
1070
|
-
};
|
|
1071
|
-
|
|
1072
|
-
// src/components/CommentsContainer.tsx
|
|
1073
|
-
var CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...props }) => {
|
|
1074
|
-
const { t } = useTranslation5(meta.id);
|
|
1075
|
-
const filteredAnchors = showResolvedThreads ? anchors.filter((anchor) => !!Relation2.getSource(anchor)) : anchors.filter((anchor) => {
|
|
1076
|
-
const thread = Relation2.getSource(anchor);
|
|
1077
|
-
return thread && thread.status !== "resolved";
|
|
1078
|
-
});
|
|
1079
|
-
useEffect7(() => {
|
|
1080
|
-
if (currentId) {
|
|
1081
|
-
document.getElementById(currentId)?.scrollIntoView({
|
|
1082
|
-
behavior: "smooth",
|
|
1083
|
-
block: "end"
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
}, [
|
|
1087
|
-
currentId
|
|
1088
|
-
]);
|
|
1089
|
-
if (filteredAnchors.length === 0) {
|
|
1090
|
-
return /* @__PURE__ */ React12.createElement("div", {
|
|
1091
|
-
role: "none",
|
|
1092
|
-
className: "p-form-padding"
|
|
1093
|
-
}, /* @__PURE__ */ React12.createElement(Message.Root, null, /* @__PURE__ */ React12.createElement(Message.Title, null, /* @__PURE__ */ React12.createElement(Trans, {
|
|
1094
|
-
t,
|
|
1095
|
-
i18nKey: "no comments message",
|
|
1096
|
-
components: {
|
|
1097
|
-
commentIcon: /* @__PURE__ */ React12.createElement(Icon3, {
|
|
1098
|
-
icon: "ph--chat-text--regular",
|
|
1099
|
-
size: 4,
|
|
1100
|
-
classNames: "w-block"
|
|
1101
|
-
})
|
|
1102
|
-
}
|
|
1103
|
-
}))));
|
|
1104
|
-
}
|
|
1105
|
-
return /* @__PURE__ */ React12.createElement("div", null, filteredAnchors.map((anchor) => {
|
|
1106
|
-
const thread = Relation2.getSource(anchor);
|
|
1107
|
-
const threadId = Obj3.getDXN(thread).toString();
|
|
1108
|
-
return /* @__PURE__ */ React12.createElement(CommentsThreadContainer, {
|
|
1109
|
-
key: threadId,
|
|
1110
|
-
anchor,
|
|
1111
|
-
current: currentId === threadId,
|
|
1112
|
-
...props
|
|
1113
|
-
});
|
|
1114
|
-
}));
|
|
1115
|
-
};
|
|
1116
|
-
|
|
1117
|
-
export {
|
|
1118
|
-
Call,
|
|
1119
|
-
command,
|
|
1120
|
-
MessageContainer,
|
|
1121
|
-
CommentsContainer
|
|
1122
|
-
};
|
|
1123
|
-
//# sourceMappingURL=chunk-G6FJBSXX.mjs.map
|