@dxos/plugin-thread 0.8.4-main.67995b8 → 0.8.4-main.c4373fc
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/ChannelContainer-BGDGZHV4.mjs +16 -0
- package/dist/lib/browser/ChatContainer-75KJZ4XR.mjs +15 -0
- package/dist/lib/browser/{app-graph-builder-N7BE5TYW.mjs → app-graph-builder-ODKIAXR7.mjs} +19 -19
- package/dist/lib/browser/app-graph-builder-ODKIAXR7.mjs.map +7 -0
- package/dist/lib/browser/{call-manager-NIPDYUVD.mjs → call-manager-BCKLI4QD.mjs} +7 -7
- package/dist/lib/browser/call-manager-BCKLI4QD.mjs.map +7 -0
- package/dist/lib/browser/chunk-2MUYQOQE.mjs +23 -0
- package/dist/lib/browser/{chunk-FR7KJPNY.mjs.map → chunk-2MUYQOQE.mjs.map} +3 -3
- package/dist/lib/browser/chunk-B7YQ7QR2.mjs +376 -0
- package/dist/lib/browser/chunk-B7YQ7QR2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KWPRNHTK.mjs → chunk-CMCVHULC.mjs} +235 -233
- package/dist/lib/browser/chunk-CMCVHULC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GERVMFQW.mjs → chunk-CP7E2HRE.mjs} +2 -2
- package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ERWASUQK.mjs → chunk-HDEQRBOC.mjs} +38 -6
- package/dist/lib/{node-esm/chunk-25ABSYP2.mjs.map → browser/chunk-HDEQRBOC.mjs.map} +4 -4
- package/dist/lib/browser/chunk-L326LSNS.mjs +18 -0
- package/dist/lib/browser/chunk-L326LSNS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EV4JWI7L.mjs → chunk-T4KJ5JR4.mjs} +5 -7
- package/dist/lib/browser/chunk-T4KJ5JR4.mjs.map +7 -0
- package/dist/lib/browser/chunk-VJMKS4CZ.mjs +619 -0
- package/dist/lib/browser/chunk-VJMKS4CZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-GCLD5ESP.mjs → chunk-VTYX3SIM.mjs} +26 -16
- package/dist/lib/browser/chunk-VTYX3SIM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6NSMBO3B.mjs → chunk-XYUJXHYV.mjs} +55 -5
- package/dist/lib/browser/chunk-XYUJXHYV.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZE7KWN36.mjs → chunk-ZCEU5K23.mjs} +461 -240
- package/dist/lib/browser/chunk-ZCEU5K23.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +23 -14
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-JFGLZ6VI.mjs → intent-resolver-VOQD3TQ2.mjs} +75 -17
- package/dist/lib/browser/intent-resolver-VOQD3TQ2.mjs.map +7 -0
- package/dist/lib/browser/{markdown-M3FMR7OD.mjs → markdown-R6MGRIA6.mjs} +7 -7
- package/dist/lib/browser/markdown-R6MGRIA6.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-UMSBTN6H.mjs +28 -0
- package/dist/lib/browser/react-root-UMSBTN6H.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-XWS6GIZY.mjs → react-surface-SXMQEWKE.mjs} +22 -22
- package/dist/lib/browser/react-surface-SXMQEWKE.mjs.map +7 -0
- package/dist/lib/browser/{settings-E32MTL7A.mjs → settings-TCNF54PN.mjs} +5 -5
- package/dist/lib/browser/{settings-E32MTL7A.mjs.map → settings-TCNF54PN.mjs.map} +1 -1
- package/dist/lib/browser/{state-H6CYONWE.mjs → state-ZQ4IPOJT.mjs} +5 -5
- package/dist/lib/browser/state-ZQ4IPOJT.mjs.map +7 -0
- package/dist/lib/browser/toolkit-JF4B4QIO.mjs +84 -0
- package/dist/lib/browser/toolkit-JF4B4QIO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/ChannelContainer-OXC6BTU7.mjs +17 -0
- package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs → ChatContainer-SH6LTFQL.mjs} +6 -6
- package/dist/lib/node-esm/{app-graph-builder-VCW76Z6V.mjs → app-graph-builder-DMPT3MY6.mjs} +19 -19
- package/dist/lib/node-esm/app-graph-builder-DMPT3MY6.mjs.map +7 -0
- package/dist/lib/node-esm/{call-manager-D6O5ZJJ4.mjs → call-manager-Q7RY2YP4.mjs} +7 -7
- package/dist/lib/node-esm/call-manager-Q7RY2YP4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-C3XFMUAY.mjs → chunk-2KZ4ODHU.mjs} +235 -233
- package/dist/lib/node-esm/chunk-2KZ4ODHU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-25ABSYP2.mjs → chunk-2MMJF7DW.mjs} +38 -6
- package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OU5BYIDO.mjs → chunk-2V3WSLUZ.mjs} +55 -5
- package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-57XR3LEF.mjs → chunk-ABUFOZVX.mjs} +2 -2
- package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-TDFHTCZZ.mjs → chunk-BAMZXJS4.mjs} +26 -16
- package/dist/lib/node-esm/chunk-BAMZXJS4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-BTGKI5IK.mjs +377 -0
- package/dist/lib/node-esm/chunk-BTGKI5IK.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GZ4WL2IS.mjs +25 -0
- package/dist/lib/node-esm/{chunk-2CXOK2TD.mjs.map → chunk-GZ4WL2IS.mjs.map} +3 -3
- package/dist/lib/node-esm/chunk-LCHTNRK7.mjs +19 -0
- package/dist/lib/node-esm/chunk-LCHTNRK7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NHSIAEDW.mjs +620 -0
- package/dist/lib/node-esm/chunk-NHSIAEDW.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GRLRWTRU.mjs → chunk-OBVAURUU.mjs} +5 -7
- package/dist/lib/node-esm/chunk-OBVAURUU.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IHDNQLLR.mjs → chunk-TIPIOH2J.mjs} +461 -240
- package/dist/lib/node-esm/chunk-TIPIOH2J.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +23 -14
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-OXGNQ44Y.mjs → intent-resolver-AKVH66PH.mjs} +75 -17
- package/dist/lib/node-esm/intent-resolver-AKVH66PH.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-INKTE4MH.mjs → markdown-MYGTDXT6.mjs} +7 -7
- package/dist/lib/node-esm/markdown-MYGTDXT6.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-root-W6AVTL5M.mjs +29 -0
- package/dist/lib/node-esm/react-root-W6AVTL5M.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-MJ33KPYE.mjs → react-surface-NLSZJGMO.mjs} +22 -22
- package/dist/lib/node-esm/react-surface-NLSZJGMO.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-SJ24YG7M.mjs → settings-ZQHGVFBY.mjs} +5 -5
- package/dist/lib/node-esm/{settings-SJ24YG7M.mjs.map → settings-ZQHGVFBY.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-D7WNDT3N.mjs → state-FSLLJ5TZ.mjs} +5 -5
- package/dist/lib/node-esm/state-FSLLJ5TZ.mjs.map +7 -0
- package/dist/lib/node-esm/toolkit-DHPKJITO.mjs +85 -0
- package/dist/lib/node-esm/toolkit-DHPKJITO.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/ThreadPlugin.d.ts +1 -1
- package/dist/types/src/ThreadPlugin.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 +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/types.d.ts +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +4 -2
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
- package/dist/types/src/calls-service.stories.d.ts +10 -9
- package/dist/types/src/calls-service.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts +1 -1
- package/dist/types/src/capabilities/call-manager.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +2 -2
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +11 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts +1 -1
- package/dist/types/src/capabilities/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/capabilities/toolkit.d.ts +6 -0
- package/dist/types/src/capabilities/toolkit.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.map +1 -1
- package/dist/types/src/components/CallDebugPanel.d.ts +7 -0
- package/dist/types/src/components/CallDebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +89 -5
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts +91 -5
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +160 -4
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +2 -2
- package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +2 -2
- package/dist/types/src/components/Media/VideoObject.d.ts.map +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +18 -4
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +4 -1
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- 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/ResponsiveContainer.stories.d.ts +155 -3
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +157 -4
- 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/ThreadComplementary.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/command-extension.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +1 -0
- package/dist/types/src/components/testing.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +2 -0
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +1 -0
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +1 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +126 -109
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +259 -172
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +64 -62
- package/src/ThreadPlugin.tsx +130 -124
- package/src/calls/call-manager.ts +2 -2
- package/src/calls/call-swarm-synchronizer.ts +1 -1
- package/src/calls/media-manager.ts +60 -34
- package/src/calls/types.ts +8 -4
- package/src/calls/util/calls-service.ts +65 -14
- package/src/calls/util/stub-media-streams.ts +62 -5
- package/src/calls-service.stories.tsx +78 -65
- package/src/capabilities/app-graph-builder.ts +18 -14
- package/src/capabilities/call-manager.ts +3 -2
- package/src/capabilities/capabilities.ts +7 -7
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +43 -9
- package/src/capabilities/markdown.ts +4 -3
- package/src/capabilities/react-root.tsx +2 -2
- package/src/capabilities/react-surface.tsx +14 -13
- package/src/capabilities/state.ts +2 -1
- package/src/capabilities/toolkit.ts +82 -0
- package/src/components/Call/Call.tsx +3 -2
- package/src/components/Call/Toolbar.tsx +5 -5
- package/src/components/CallDebugPanel.tsx +108 -49
- package/src/components/CallSidebar.tsx +2 -1
- package/src/components/ChannelContainer.stories.tsx +11 -10
- package/src/components/ChannelContainer.tsx +8 -7
- package/src/components/Chat.stories.tsx +34 -31
- package/src/components/ChatContainer.tsx +8 -4
- package/src/components/Comments.stories.tsx +39 -38
- package/src/components/CommentsContainer.tsx +2 -1
- package/src/components/CommentsThreadContainer.tsx +9 -7
- package/src/components/Lobby/Lobby.tsx +1 -1
- package/src/components/Media/VideoObject.stories.tsx +36 -28
- package/src/components/MessageContainer.tsx +43 -9
- package/src/components/Participant/Participant.tsx +13 -7
- package/src/components/Participant/ParticipantGrid.tsx +2 -1
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +8 -8
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +44 -42
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +2 -2
- package/src/components/ThreadComplementary.tsx +37 -7
- package/src/components/ThreadSettings.tsx +6 -7
- package/src/components/command-extension.ts +5 -2
- package/src/components/testing.ts +22 -0
- package/src/extensions/threads.ts +3 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useBlackCanvasStreamTrack.tsx +27 -0
- package/src/hooks/useDebugMode.ts +1 -1
- package/src/hooks/useVideoStreamTrack.tsx +6 -3
- package/src/meta.ts +3 -4
- package/src/testing/stories.ts +3 -3
- package/src/translations.ts +3 -1
- package/src/types/schema.ts +1 -1
- package/src/types/types.ts +22 -13
- package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
- package/src/typings.d.ts +8 -0
- package/src/util.ts +1 -1
- package/dist/lib/browser/ChannelContainer-3GIE7ASU.mjs +0 -16
- package/dist/lib/browser/ChatContainer-AIGIWAUG.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-N7BE5TYW.mjs.map +0 -7
- package/dist/lib/browser/call-manager-NIPDYUVD.mjs.map +0 -7
- package/dist/lib/browser/chunk-3SGRT4NM.mjs +0 -367
- package/dist/lib/browser/chunk-3SGRT4NM.mjs.map +0 -7
- package/dist/lib/browser/chunk-6NSMBO3B.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERWASUQK.mjs.map +0 -7
- package/dist/lib/browser/chunk-EV4JWI7L.mjs.map +0 -7
- package/dist/lib/browser/chunk-FR7KJPNY.mjs +0 -21
- package/dist/lib/browser/chunk-GCLD5ESP.mjs.map +0 -7
- package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
- package/dist/lib/browser/chunk-KWPRNHTK.mjs.map +0 -7
- package/dist/lib/browser/chunk-LGSDKXPF.mjs +0 -18
- package/dist/lib/browser/chunk-LGSDKXPF.mjs.map +0 -7
- package/dist/lib/browser/chunk-VUWC4IJM.mjs +0 -479
- package/dist/lib/browser/chunk-VUWC4IJM.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZE7KWN36.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JFGLZ6VI.mjs.map +0 -7
- package/dist/lib/browser/markdown-M3FMR7OD.mjs.map +0 -7
- package/dist/lib/browser/react-root-JEUSQXI6.mjs +0 -28
- package/dist/lib/browser/react-root-JEUSQXI6.mjs.map +0 -7
- package/dist/lib/browser/react-surface-XWS6GIZY.mjs.map +0 -7
- package/dist/lib/browser/state-H6CYONWE.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-7FXCKO7X.mjs +0 -17
- package/dist/lib/node-esm/app-graph-builder-VCW76Z6V.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-D6O5ZJJ4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2CXOK2TD.mjs +0 -23
- package/dist/lib/node-esm/chunk-2MFNK53T.mjs +0 -480
- package/dist/lib/node-esm/chunk-2MFNK53T.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-75RJ5DJI.mjs +0 -19
- package/dist/lib/node-esm/chunk-75RJ5DJI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C3XFMUAY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FLBFYGBK.mjs +0 -368
- package/dist/lib/node-esm/chunk-FLBFYGBK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IHDNQLLR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OU5BYIDO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-OXGNQ44Y.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-INKTE4MH.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-XYYY2JXZ.mjs +0 -29
- package/dist/lib/node-esm/react-root-XYYY2JXZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-MJ33KPYE.mjs.map +0 -7
- package/dist/lib/node-esm/state-D7WNDT3N.mjs.map +0 -7
- /package/dist/lib/browser/{ChannelContainer-3GIE7ASU.mjs.map → ChannelContainer-BGDGZHV4.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-AIGIWAUG.mjs.map → ChatContainer-75KJZ4XR.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChannelContainer-7FXCKO7X.mjs.map → ChannelContainer-OXC6BTU7.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs.map → ChatContainer-SH6LTFQL.mjs.map} +0 -0
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React from 'react';
|
|
9
7
|
|
|
@@ -11,16 +9,18 @@ import { contributes } from '@dxos/app-framework';
|
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
10
|
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
11
|
import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
|
|
12
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
13
|
import { DataType } from '@dxos/schema';
|
|
15
|
-
import {
|
|
14
|
+
import { render } from '@dxos/storybook-utils';
|
|
16
15
|
|
|
17
|
-
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
18
16
|
import { createThreadPlugins } from '../testing';
|
|
19
17
|
import { translations } from '../translations';
|
|
20
18
|
import { ChannelType, ThreadType } from '../types';
|
|
21
19
|
|
|
20
|
+
import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
|
|
21
|
+
|
|
22
22
|
// TODO(wittjosiah): Channel doesn't render full height.
|
|
23
|
-
const
|
|
23
|
+
const DefaultStory = ({ roomId }: ChannelContainerProps) => {
|
|
24
24
|
const space = useSpace();
|
|
25
25
|
const [channel] = useQuery(space, Query.type(ChannelType));
|
|
26
26
|
if (!channel) {
|
|
@@ -30,25 +30,26 @@ const Story = ({ roomId }: ChannelContainerProps) => {
|
|
|
30
30
|
return <ChannelContainer channel={channel} roomId={roomId} />;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const meta
|
|
33
|
+
const meta = {
|
|
34
34
|
title: 'plugins/plugin-thread/ChannelContainer',
|
|
35
35
|
component: ChannelContainer,
|
|
36
|
-
render: (
|
|
36
|
+
render: render(DefaultStory),
|
|
37
37
|
decorators: [
|
|
38
|
+
withTheme,
|
|
38
39
|
withPluginManager({
|
|
39
40
|
plugins: [...(await createThreadPlugins())],
|
|
40
41
|
capabilities: [contributes(ClientCapabilities.Schema, [ChannelType, ThreadType, DataType.Message])],
|
|
41
42
|
}),
|
|
42
|
-
withLayout({ Container: ColumnContainer, classNames: 'w-[40rem] overflow-hidden' }),
|
|
43
43
|
],
|
|
44
44
|
parameters: {
|
|
45
|
+
layout: 'column',
|
|
45
46
|
translations,
|
|
46
47
|
},
|
|
47
|
-
}
|
|
48
|
+
} satisfies Meta<typeof ChannelContainer>;
|
|
48
49
|
|
|
49
50
|
export default meta;
|
|
50
51
|
|
|
51
|
-
type Story = StoryObj<
|
|
52
|
+
type Story = StoryObj<typeof meta>;
|
|
52
53
|
|
|
53
54
|
export const Default: Story = {
|
|
54
55
|
args: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import React, { useCallback, useEffect, useMemo, useState
|
|
6
|
+
import React, { type ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import { useCapabilities, useCapability } from '@dxos/app-framework';
|
|
9
9
|
import { Context } from '@dxos/context';
|
|
@@ -12,18 +12,19 @@ import { log } from '@dxos/log';
|
|
|
12
12
|
import { useClient } from '@dxos/react-client';
|
|
13
13
|
import { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
|
|
14
14
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
15
|
-
import {
|
|
16
|
-
import { ControlGroup,
|
|
17
|
-
import {
|
|
15
|
+
import { ElevationProvider, Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
16
|
+
import { ControlGroup, ControlGroupButton, ControlItemInput } from '@dxos/react-ui-form';
|
|
17
|
+
import { MenuProvider, ToolbarMenu, createMenuAction, createMenuItemGroup, useMenuActions } from '@dxos/react-ui-menu';
|
|
18
18
|
import { useSoundEffect } from '@dxos/react-ui-sfx';
|
|
19
19
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
20
20
|
|
|
21
|
-
import { Call } from './Call';
|
|
22
|
-
import ChatContainer from './ChatContainer';
|
|
23
21
|
import { ThreadCapabilities } from '../capabilities';
|
|
24
22
|
import { meta } from '../meta';
|
|
25
23
|
import { type ChannelType } from '../types';
|
|
26
24
|
|
|
25
|
+
import { Call } from './Call';
|
|
26
|
+
import ChatContainer from './ChatContainer';
|
|
27
|
+
|
|
27
28
|
export type ChannelContainerProps = {
|
|
28
29
|
channel?: ChannelType;
|
|
29
30
|
roomId?: string;
|
|
@@ -113,7 +114,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
|
|
|
113
114
|
const isJoined = callManager.joined && callManager.roomId === roomId;
|
|
114
115
|
|
|
115
116
|
return (
|
|
116
|
-
<StackItem.Content
|
|
117
|
+
<StackItem.Content classNames={isJoined && 'bs-full'} toolbar={!isJoined}>
|
|
117
118
|
{isJoined && !isNamed && <DisplayNameMissing />}
|
|
118
119
|
{isJoined && isNamed && (
|
|
119
120
|
<Call.Root>
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React, { useState } from 'react';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
import React, { useEffect, useState } from 'react';
|
|
9
|
-
|
|
10
|
-
import { Capabilities, contributes, createSurface, IntentPlugin } from '@dxos/app-framework';
|
|
8
|
+
import { Capabilities, IntentPlugin, contributes, createSurface } from '@dxos/app-framework';
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
10
|
import { Obj, Ref } from '@dxos/echo';
|
|
13
11
|
import { faker } from '@dxos/random';
|
|
@@ -15,35 +13,36 @@ import { useClient } from '@dxos/react-client';
|
|
|
15
13
|
import { type Space } from '@dxos/react-client/echo';
|
|
16
14
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
17
15
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
16
|
+
import { useAsyncEffect } from '@dxos/react-ui';
|
|
17
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
18
18
|
import { Thread } from '@dxos/react-ui-thread';
|
|
19
19
|
import { DataType } from '@dxos/schema';
|
|
20
|
-
import {
|
|
20
|
+
import { render } from '@dxos/storybook-utils';
|
|
21
21
|
|
|
22
|
-
import { ChatContainer } from './ChatContainer';
|
|
23
22
|
import { translations } from '../translations';
|
|
24
23
|
import { ChannelType, ThreadType } from '../types';
|
|
25
24
|
|
|
25
|
+
import { ChatContainer } from './ChatContainer';
|
|
26
|
+
|
|
26
27
|
faker.seed(1);
|
|
27
28
|
|
|
28
|
-
const
|
|
29
|
+
const DefaultStory = () => {
|
|
29
30
|
const client = useClient();
|
|
30
31
|
const identity = useIdentity();
|
|
31
32
|
const [space, setSpace] = useState<Space>();
|
|
32
33
|
const [channel, setChannel] = useState<ChannelType | null>();
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
useAsyncEffect(async () => {
|
|
35
36
|
if (identity) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Obj.make(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
setChannel(channel);
|
|
46
|
-
});
|
|
37
|
+
const space = await client.spaces.create();
|
|
38
|
+
const channel = space.db.add(
|
|
39
|
+
Obj.make(ChannelType, {
|
|
40
|
+
defaultThread: Ref.make(Obj.make(ThreadType, { messages: [], status: 'active' })),
|
|
41
|
+
threads: [],
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
setSpace(space);
|
|
45
|
+
setChannel(channel);
|
|
47
46
|
}
|
|
48
47
|
}, [identity]);
|
|
49
48
|
|
|
@@ -52,19 +51,18 @@ const Story = () => {
|
|
|
52
51
|
}
|
|
53
52
|
|
|
54
53
|
return (
|
|
55
|
-
<main className='max-is-prose mli-auto bs-dvh overflow-hidden'>
|
|
54
|
+
<main className='is-full max-is-prose mli-auto bs-dvh overflow-hidden'>
|
|
56
55
|
<ChatContainer space={space} thread={channel.defaultThread.target} />
|
|
57
56
|
</main>
|
|
58
57
|
);
|
|
59
58
|
};
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const meta: Meta<typeof Thread.Root> = {
|
|
60
|
+
const meta = {
|
|
64
61
|
title: 'plugins/plugin-thread/Chat',
|
|
65
|
-
component: Thread.Root,
|
|
66
|
-
render: ()
|
|
62
|
+
component: Thread.Root as any,
|
|
63
|
+
render: render(DefaultStory),
|
|
67
64
|
decorators: [
|
|
65
|
+
withTheme,
|
|
68
66
|
withPluginManager({
|
|
69
67
|
plugins: [IntentPlugin()],
|
|
70
68
|
capabilities: [
|
|
@@ -78,11 +76,16 @@ const meta: Meta<typeof Thread.Root> = {
|
|
|
78
76
|
),
|
|
79
77
|
],
|
|
80
78
|
}),
|
|
81
|
-
|
|
82
|
-
withLayout({ fullscreen: true }),
|
|
83
|
-
withClientProvider({ createSpace: true, types: [ThreadType, DataType.Message] }),
|
|
79
|
+
withClientProvider({ createSpace: true, types: [ThreadType, ChannelType, DataType.Message] }),
|
|
84
80
|
],
|
|
85
|
-
parameters: {
|
|
86
|
-
|
|
81
|
+
parameters: {
|
|
82
|
+
layout: 'fullscreen',
|
|
83
|
+
translations,
|
|
84
|
+
},
|
|
85
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
87
86
|
|
|
88
87
|
export default meta;
|
|
88
|
+
|
|
89
|
+
type Story = StoryObj<typeof meta>;
|
|
90
|
+
|
|
91
|
+
export const Default: Story = {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Obj, Ref } from '@dxos/echo';
|
|
8
|
-
import {
|
|
8
|
+
import { type Space, fullyQualifiedId, useMembers } from '@dxos/react-client/echo';
|
|
9
9
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
10
10
|
import { Icon, ScrollArea, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
|
|
@@ -21,13 +21,14 @@ import {
|
|
|
21
21
|
import { DataType } from '@dxos/schema';
|
|
22
22
|
import { isNonNullable } from '@dxos/util';
|
|
23
23
|
|
|
24
|
-
import { MessageContainer } from './MessageContainer';
|
|
25
|
-
import { command } from './command-extension';
|
|
26
24
|
import { useStatus } from '../hooks';
|
|
27
25
|
import { meta } from '../meta';
|
|
28
26
|
import { type ThreadType } from '../types';
|
|
29
27
|
import { getMessageMetadata } from '../util';
|
|
30
28
|
|
|
29
|
+
import { command } from './command-extension';
|
|
30
|
+
import { MessageContainer } from './MessageContainer';
|
|
31
|
+
|
|
31
32
|
export const ChatHeading = ({ attendableId }: { attendableId?: string }) => {
|
|
32
33
|
const { t } = useTranslation(meta.id);
|
|
33
34
|
return (
|
|
@@ -111,7 +112,10 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
|
|
|
111
112
|
<Thread.Root
|
|
112
113
|
current={current}
|
|
113
114
|
id={id}
|
|
114
|
-
classNames=
|
|
115
|
+
classNames={[
|
|
116
|
+
'bs-full is-full max-is-prose mli-auto grid-rows-[1fr_min-content_min-content] overflow-hidden',
|
|
117
|
+
'transition-[padding-block-end] [[data-sidebar-inline-start-state=open]_&]:lg:pbe-0',
|
|
118
|
+
]}
|
|
115
119
|
>
|
|
116
120
|
<ScrollArea.Root classNames='col-span-2'>
|
|
117
121
|
<ScrollArea.Viewport classNames='overflow-anchored after:overflow-anchor after:block after:bs-px after:-mbs-px [&>div]:min-bs-full [&>div]:!grid [&>div]:grid-rows-[1fr_0]'>
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type Meta } from '@storybook/react-vite';
|
|
8
|
-
import React, { useEffect } from 'react';
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
9
7
|
|
|
10
8
|
import { IntentPlugin } from '@dxos/app-framework';
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
@@ -14,14 +12,17 @@ import { ClientPlugin } from '@dxos/plugin-client';
|
|
|
14
12
|
import { faker } from '@dxos/random';
|
|
15
13
|
import { useQuery, useSpace } from '@dxos/react-client/echo';
|
|
16
14
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
15
|
+
import { useAsyncEffect } from '@dxos/react-ui';
|
|
16
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
17
17
|
import { AnchoredTo, DataType } from '@dxos/schema';
|
|
18
|
-
import {
|
|
18
|
+
import { render } from '@dxos/storybook-utils';
|
|
19
19
|
|
|
20
|
-
import { CommentsContainer } from './CommentsContainer';
|
|
21
|
-
import { createCommentThread } from './testing';
|
|
22
20
|
import { translations } from '../translations';
|
|
23
21
|
import { ThreadType } from '../types';
|
|
24
22
|
|
|
23
|
+
import { CommentsContainer } from './CommentsContainer';
|
|
24
|
+
import { createCommentThread, createProposalThread } from './testing';
|
|
25
|
+
|
|
25
26
|
faker.seed(1);
|
|
26
27
|
|
|
27
28
|
const DefaultStory = () => {
|
|
@@ -29,27 +30,25 @@ const DefaultStory = () => {
|
|
|
29
30
|
const space = useSpace();
|
|
30
31
|
const anchors = useQuery(space, Query.type(AnchoredTo));
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
useAsyncEffect(async () => {
|
|
33
34
|
if (identity && space) {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Relation.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return () => clearTimeout(t);
|
|
35
|
+
const object = space.db.add(Obj.make(Type.Expando, {}));
|
|
36
|
+
const thread1 = space.db.add(createCommentThread(identity));
|
|
37
|
+
const thread2 = space.db.add(createProposalThread(identity));
|
|
38
|
+
space.db.add(
|
|
39
|
+
Relation.make(AnchoredTo, {
|
|
40
|
+
[Relation.Source]: thread1,
|
|
41
|
+
[Relation.Target]: object,
|
|
42
|
+
anchor: 'test',
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
45
|
+
space.db.add(
|
|
46
|
+
Relation.make(AnchoredTo, {
|
|
47
|
+
[Relation.Source]: thread2,
|
|
48
|
+
[Relation.Target]: object,
|
|
49
|
+
anchor: 'test',
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
53
52
|
}
|
|
54
53
|
}, [identity, space]);
|
|
55
54
|
|
|
@@ -57,25 +56,21 @@ const DefaultStory = () => {
|
|
|
57
56
|
return null;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
return
|
|
61
|
-
<div className='w-[30rem] overflow-y-auto bg-baseSurface'>
|
|
62
|
-
<CommentsContainer anchors={anchors} onThreadDelete={console.log} />
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
59
|
+
return <CommentsContainer anchors={anchors} onThreadDelete={console.log} onAcceptProposal={console.log} />;
|
|
65
60
|
};
|
|
66
61
|
|
|
67
|
-
const meta
|
|
62
|
+
const meta = {
|
|
68
63
|
title: 'plugins/plugin-thread/Comments',
|
|
69
64
|
render: render(DefaultStory),
|
|
70
65
|
decorators: [
|
|
71
|
-
withTheme,
|
|
72
|
-
|
|
66
|
+
withTheme, // TODO(wittjosiah): This shouldn't depend on app framework. Should use withClientProvider instead.
|
|
67
|
+
// Currently this is required due to useOnEditAnalytics.
|
|
73
68
|
withPluginManager({
|
|
74
69
|
plugins: [
|
|
75
70
|
IntentPlugin(),
|
|
76
71
|
ClientPlugin({
|
|
77
72
|
types: [DataType.Message, ThreadType, AnchoredTo],
|
|
78
|
-
onClientInitialized: async (
|
|
73
|
+
onClientInitialized: async ({ client }) => {
|
|
79
74
|
await client.halo.createIdentity();
|
|
80
75
|
},
|
|
81
76
|
}),
|
|
@@ -83,10 +78,16 @@ const meta: Meta = {
|
|
|
83
78
|
}),
|
|
84
79
|
],
|
|
85
80
|
parameters: {
|
|
81
|
+
layout: {
|
|
82
|
+
type: 'column',
|
|
83
|
+
className: 'overflow-y-scroll',
|
|
84
|
+
},
|
|
86
85
|
translations,
|
|
87
86
|
},
|
|
88
|
-
}
|
|
87
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
89
88
|
|
|
90
89
|
export default meta;
|
|
91
90
|
|
|
92
|
-
|
|
91
|
+
type Story = StoryObj<typeof meta>;
|
|
92
|
+
|
|
93
|
+
export const Default: Story = {};
|
|
@@ -9,10 +9,11 @@ import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
|
9
9
|
import { Callout, Icon, Trans, useTranslation } from '@dxos/react-ui';
|
|
10
10
|
import { type AnchoredTo } from '@dxos/schema';
|
|
11
11
|
|
|
12
|
-
import { CommentsThreadContainer, type CommentsThreadContainerProps } from './CommentsThreadContainer';
|
|
13
12
|
import { meta } from '../meta';
|
|
14
13
|
import { type ThreadType } from '../types';
|
|
15
14
|
|
|
15
|
+
import { CommentsThreadContainer, type CommentsThreadContainerProps } from './CommentsThreadContainer';
|
|
16
|
+
|
|
16
17
|
export type CommentsContainerProps = Omit<CommentsThreadContainerProps, 'anchor' | 'current'> & {
|
|
17
18
|
anchors: AnchoredTo[];
|
|
18
19
|
currentId?: string;
|
|
@@ -14,15 +14,13 @@ import { MessageTextbox, type MessageTextboxProps, Thread, type ThreadRootProps
|
|
|
14
14
|
import { type AnchoredTo } from '@dxos/schema';
|
|
15
15
|
import { isNonNullable } from '@dxos/util';
|
|
16
16
|
|
|
17
|
-
import { MessageContainer } from './MessageContainer';
|
|
18
|
-
import { command } from './command-extension';
|
|
19
17
|
import { useStatus } from '../hooks';
|
|
20
18
|
import { meta } from '../meta';
|
|
21
19
|
import { type ThreadType } from '../types';
|
|
22
20
|
import { getMessageMetadata } from '../util';
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
import { command } from './command-extension';
|
|
23
|
+
import { MessageContainer, buttonClassNames, buttonGroupClassNames } from './MessageContainer';
|
|
26
24
|
|
|
27
25
|
export type CommentsThreadContainerProps = {
|
|
28
26
|
anchor: AnchoredTo;
|
|
@@ -31,6 +29,7 @@ export type CommentsThreadContainerProps = {
|
|
|
31
29
|
onResolve?: (anchor: AnchoredTo) => void;
|
|
32
30
|
onMessageDelete?: (anchor: AnchoredTo, messageId: string) => void;
|
|
33
31
|
onThreadDelete?: (anchor: AnchoredTo) => void;
|
|
32
|
+
onAcceptProposal?: (anchor: AnchoredTo, messageId: string) => void;
|
|
34
33
|
} & Pick<ThreadRootProps, 'current'>;
|
|
35
34
|
|
|
36
35
|
export const CommentsThreadContainer = ({
|
|
@@ -41,6 +40,7 @@ export const CommentsThreadContainer = ({
|
|
|
41
40
|
onResolve,
|
|
42
41
|
onMessageDelete,
|
|
43
42
|
onThreadDelete,
|
|
43
|
+
onAcceptProposal,
|
|
44
44
|
}: CommentsThreadContainerProps) => {
|
|
45
45
|
const { t } = useTranslation(meta.id);
|
|
46
46
|
const identity = useIdentity()!;
|
|
@@ -75,6 +75,7 @@ export const CommentsThreadContainer = ({
|
|
|
75
75
|
const handleResolve = useCallback(() => onResolve?.(anchor), [onResolve, anchor]);
|
|
76
76
|
const handleMessageDelete = useCallback((id: string) => onMessageDelete?.(anchor, id), [onMessageDelete, anchor]);
|
|
77
77
|
const handleThreadDelete = useCallback(() => onThreadDelete?.(anchor), [onThreadDelete, anchor]);
|
|
78
|
+
const handleAcceptProposal = useCallback((id: string) => onAcceptProposal?.(anchor, id), [onAcceptProposal, anchor]);
|
|
78
79
|
|
|
79
80
|
const handleComment: MessageTextboxProps['onSend'] = useCallback(() => {
|
|
80
81
|
if (!messageRef.current) {
|
|
@@ -112,7 +113,7 @@ export const CommentsThreadContainer = ({
|
|
|
112
113
|
) : (
|
|
113
114
|
<Thread.Header>{thread.name}</Thread.Header>
|
|
114
115
|
)}
|
|
115
|
-
<div
|
|
116
|
+
<div role='none' className={buttonGroupClassNames}>
|
|
116
117
|
{thread.status === 'staged' && <Tag palette='neutral'>{t('draft button')}</Tag>}
|
|
117
118
|
{onResolve && !(thread?.status === 'staged') && (
|
|
118
119
|
<IconButton
|
|
@@ -121,7 +122,7 @@ export const CommentsThreadContainer = ({
|
|
|
121
122
|
icon={thread?.status === 'resolved' ? 'ph--check--fill' : 'ph--check--regular'}
|
|
122
123
|
iconOnly
|
|
123
124
|
label={t('resolve thread label')}
|
|
124
|
-
classNames={[
|
|
125
|
+
classNames={[buttonClassNames, thread?.status !== 'resolved' && hoverableControlItem]}
|
|
125
126
|
onClick={handleResolve}
|
|
126
127
|
/>
|
|
127
128
|
)}
|
|
@@ -132,7 +133,7 @@ export const CommentsThreadContainer = ({
|
|
|
132
133
|
icon='ph--x--regular'
|
|
133
134
|
iconOnly
|
|
134
135
|
label={t('delete thread label')}
|
|
135
|
-
classNames={[
|
|
136
|
+
classNames={[buttonClassNames, hoverableControlItem]}
|
|
136
137
|
onClick={handleThreadDelete}
|
|
137
138
|
/>
|
|
138
139
|
)}
|
|
@@ -147,6 +148,7 @@ export const CommentsThreadContainer = ({
|
|
|
147
148
|
message={message}
|
|
148
149
|
members={members}
|
|
149
150
|
onDelete={handleMessageDelete}
|
|
151
|
+
onAcceptProposal={handleAcceptProposal}
|
|
150
152
|
/>
|
|
151
153
|
))}
|
|
152
154
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React, { type FC, type PropsWithChildren, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { useCapability } from '@dxos/app-framework';
|
|
8
|
-
import {
|
|
8
|
+
import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
11
11
|
import { ThreadCapabilities } from '../../capabilities';
|
|
@@ -2,47 +2,55 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@
|
|
6
|
-
|
|
7
|
-
import { type StoryObj, type Meta } from '@storybook/react-vite';
|
|
5
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
8
6
|
import React, { useEffect, useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { scheduleTask } from '@dxos/async';
|
|
11
9
|
import { Context } from '@dxos/context';
|
|
12
10
|
import { log } from '@dxos/log';
|
|
13
|
-
import { withTheme
|
|
11
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
12
|
|
|
15
|
-
import { VideoObject } from './VideoObject';
|
|
16
13
|
import { getUserMediaTrack } from '../../calls';
|
|
17
14
|
import { ResponsiveContainer } from '../ResponsiveGrid';
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
render
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
import { VideoObject, type VideoObjectProps } from './VideoObject';
|
|
17
|
+
|
|
18
|
+
const DefaultStory = (props: VideoObjectProps) => {
|
|
19
|
+
log.info('render');
|
|
20
|
+
const [videoStream, setVideoStream] = useState<MediaStream>();
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const ctx = new Context();
|
|
23
|
+
scheduleTask(ctx, async () => {
|
|
24
|
+
try {
|
|
28
25
|
const stream = new MediaStream();
|
|
29
26
|
stream.addTrack(await getUserMediaTrack('videoinput'));
|
|
30
27
|
setVideoStream(stream);
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
} catch (err) {
|
|
29
|
+
log.catch(err);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return () => {
|
|
34
|
+
void ctx.dispose();
|
|
35
|
+
videoStream?.getTracks().forEach((track) => track.stop());
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<ResponsiveContainer>
|
|
41
|
+
<VideoObject videoStream={videoStream} flip {...props} />
|
|
42
|
+
</ResponsiveContainer>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const meta = {
|
|
47
|
+
title: 'plugins/plugin-thread/VideoObject',
|
|
48
|
+
component: VideoObject,
|
|
49
|
+
render: DefaultStory,
|
|
50
|
+
decorators: [withTheme],
|
|
51
|
+
parameters: {
|
|
52
|
+
layout: 'fullscreen',
|
|
44
53
|
},
|
|
45
|
-
decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'justify-center' })],
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
export default meta;
|