@dxos/plugin-thread 0.8.4-main.5ea62a8 → 0.8.4-main.66e292d
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-L7MKV7DS.mjs +17 -0
- package/dist/lib/browser/ChatContainer-KPY4BAUE.mjs +16 -0
- package/dist/lib/browser/{app-graph-builder-FHAOPO57.mjs → app-graph-builder-TWJ2UCOZ.mjs} +32 -32
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-TQ4JFMZZ.mjs +101 -0
- package/dist/lib/browser/blueprint-definition-TQ4JFMZZ.mjs.map +7 -0
- package/dist/lib/browser/{call-manager-EW2QC6Q4.mjs → call-manager-4YFT4XA6.mjs} +8 -7
- package/dist/lib/{node-esm/call-manager-N3KASRDQ.mjs.map → browser/call-manager-4YFT4XA6.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-TQJYDFBU.mjs → chunk-ALZKJOZK.mjs} +40 -37
- package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +7 -0
- package/dist/lib/browser/chunk-ANTFU4JB.mjs +25 -0
- package/dist/lib/browser/chunk-ANTFU4JB.mjs.map +7 -0
- package/dist/lib/browser/chunk-CFC7LEPD.mjs +18 -0
- package/dist/lib/browser/chunk-CFC7LEPD.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-KEXJGF2R.mjs → chunk-ISCHODBV.mjs} +53 -3
- package/dist/lib/browser/chunk-ISCHODBV.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/{chunk-KTWYVC5X.mjs → chunk-JDJPMI7V.mjs} +47 -51
- package/dist/lib/browser/chunk-JDJPMI7V.mjs.map +7 -0
- package/dist/lib/browser/{chunk-2P3GVRHP.mjs → chunk-KOBXMDCI.mjs} +68 -67
- package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-J26C57ZY.mjs → chunk-NPT5S6N4.mjs} +164 -101
- package/dist/lib/browser/chunk-NPT5S6N4.mjs.map +7 -0
- package/dist/lib/browser/chunk-QM34EZQK.mjs +20 -0
- package/dist/lib/browser/chunk-QM34EZQK.mjs.map +7 -0
- package/dist/lib/browser/{chunk-H63NDV62.mjs → chunk-TLOOZTRD.mjs} +18 -17
- package/dist/lib/browser/chunk-TLOOZTRD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TUSBPMNU.mjs → chunk-ZCW3NSDZ.mjs} +274 -374
- package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +55 -57
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-IB5GYU2D.mjs → intent-resolver-G33FT3NO.mjs} +40 -113
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs.map +7 -0
- package/dist/lib/browser/{markdown-Z677YORA.mjs → markdown-WFZFYJBQ.mjs} +30 -27
- package/dist/lib/browser/markdown-WFZFYJBQ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-root-ED7PHA44.mjs +29 -0
- package/dist/lib/browser/react-root-ED7PHA44.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-X2VB6P37.mjs → react-surface-AUQQSQQC.mjs} +38 -36
- package/dist/lib/browser/react-surface-AUQQSQQC.mjs.map +7 -0
- package/dist/lib/browser/repair-JFJLEM2O.mjs +35 -0
- package/dist/lib/browser/repair-JFJLEM2O.mjs.map +7 -0
- package/dist/lib/browser/{settings-GRKEID73.mjs → settings-E6IOLK46.mjs} +6 -5
- package/dist/lib/{node-esm/settings-F2ODVNNW.mjs.map → browser/settings-E6IOLK46.mjs.map} +1 -1
- package/dist/lib/browser/{state-2T4KDWBX.mjs → state-UYPLBGZJ.mjs} +6 -5
- package/dist/lib/{node-esm/state-62TQKQVB.mjs.map → browser/state-UYPLBGZJ.mjs.map} +1 -1
- package/dist/lib/browser/types/index.mjs +7 -10
- package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs +18 -0
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs +17 -0
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs.map +7 -0
- package/dist/lib/node-esm/{app-graph-builder-XEYWX5FC.mjs → app-graph-builder-VD6I2V5H.mjs} +32 -32
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-TSX5HHW7.mjs +102 -0
- package/dist/lib/node-esm/blueprint-definition-TSX5HHW7.mjs.map +7 -0
- package/dist/lib/node-esm/{call-manager-N3KASRDQ.mjs → call-manager-UMUXEYH5.mjs} +8 -7
- package/dist/lib/{browser/call-manager-EW2QC6Q4.mjs.map → node-esm/call-manager-UMUXEYH5.mjs.map} +1 -1
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs +22 -0
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JR7KESLL.mjs → chunk-7KZWZS2U.mjs} +274 -374
- package/dist/lib/node-esm/chunk-7KZWZS2U.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CCE5LHBE.mjs → chunk-AB42KYF3.mjs} +40 -37
- package/dist/lib/node-esm/chunk-AB42KYF3.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-ATNY37UV.mjs +27 -0
- package/dist/lib/node-esm/chunk-ATNY37UV.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-UHZQTPXU.mjs → chunk-E5HNHFYH.mjs} +18 -17
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-NNKKNW57.mjs → chunk-FF3QVPY4.mjs} +164 -101
- package/dist/lib/node-esm/chunk-FF3QVPY4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-P6E247RF.mjs → chunk-P2M364TO.mjs} +47 -51
- package/dist/lib/node-esm/chunk-P2M364TO.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-CTZ75IFK.mjs → chunk-PZH2EDU5.mjs} +68 -67
- package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs +19 -0
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-S3D7DTBF.mjs → chunk-VBI32FGI.mjs} +53 -3
- package/dist/lib/node-esm/chunk-VBI32FGI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +55 -57
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-VIMI5VLH.mjs → intent-resolver-4PX3WXQG.mjs} +40 -113
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs.map +7 -0
- package/dist/lib/node-esm/{markdown-FL4IXLRP.mjs → markdown-CSR5MAPZ.mjs} +30 -27
- package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-root-DZN324JA.mjs +30 -0
- package/dist/lib/node-esm/react-root-DZN324JA.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-OLN3XNND.mjs → react-surface-AMVESEF4.mjs} +38 -36
- package/dist/lib/node-esm/react-surface-AMVESEF4.mjs.map +7 -0
- package/dist/lib/node-esm/repair-RMLR24YR.mjs +36 -0
- package/dist/lib/node-esm/repair-RMLR24YR.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-F2ODVNNW.mjs → settings-RGZHWDSO.mjs} +6 -5
- package/dist/lib/{browser/settings-GRKEID73.mjs.map → node-esm/settings-RGZHWDSO.mjs.map} +1 -1
- package/dist/lib/node-esm/{state-62TQKQVB.mjs → state-XNWOLBNE.mjs} +6 -5
- package/dist/lib/{browser/state-2T4KDWBX.mjs.map → node-esm/state-XNWOLBNE.mjs.map} +1 -1
- package/dist/lib/node-esm/types/index.mjs +7 -10
- package/dist/types/src/ThreadPlugin.d.ts +1 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/types.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +2 -0
- 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 +0 -1
- package/dist/types/src/calls-service.stories.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- 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/capabilities.d.ts +2 -2
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/repair.d.ts +4 -0
- package/dist/types/src/capabilities/repair.d.ts.map +1 -0
- package/dist/types/src/components/Call/Toolbar.d.ts +2 -2
- package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
- package/dist/types/src/components/CallDebugPanel.d.ts +7 -0
- package/dist/types/src/components/CallDebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts +2 -2
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +79 -9
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts +79 -7
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +6 -5
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +8 -3
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- package/dist/types/src/components/CommentsContainer.d.ts +2 -2
- package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
- package/dist/types/src/components/CommentsThreadContainer.d.ts +8 -8
- package/dist/types/src/components/CommentsThreadContainer.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 +5 -3
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +4 -2
- package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +9 -3
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +9 -3
- 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/ThreadCompanion.d.ts +5 -0
- package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -0
- 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/index.d.ts +3 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/testing.d.ts +3 -3
- 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/functions/create-proposals.d.ts +6 -0
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +2 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/hooks/analytics.d.ts +2 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/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/testing/stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +78 -7
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +16 -0
- package/dist/types/src/types/Channel.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +130 -244
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +64 -60
- package/src/ThreadPlugin.tsx +135 -134
- package/src/calls/call-manager.ts +1 -1
- package/src/calls/media-manager.ts +11 -7
- package/src/calls/types.ts +7 -3
- package/src/calls/util/calls-service.ts +12 -7
- package/src/calls/util/stub-media-streams.ts +61 -3
- package/src/calls-service.stories.tsx +2 -5
- package/src/capabilities/app-graph-builder.ts +41 -30
- package/src/capabilities/blueprint-definition.ts +38 -0
- package/src/capabilities/capabilities.ts +7 -7
- package/src/capabilities/index.ts +2 -1
- package/src/capabilities/intent-resolver.ts +29 -67
- package/src/capabilities/markdown.ts +5 -3
- package/src/capabilities/react-root.tsx +2 -2
- package/src/capabilities/react-surface.tsx +25 -23
- package/src/capabilities/repair.ts +40 -0
- package/src/components/Call/Call.tsx +1 -1
- package/src/components/Call/Toolbar.tsx +9 -9
- package/src/components/CallDebugPanel.tsx +112 -55
- package/src/components/CallSidebar.tsx +1 -1
- package/src/components/ChannelContainer.stories.tsx +10 -10
- package/src/components/ChannelContainer.tsx +19 -15
- package/src/components/Chat.stories.tsx +14 -19
- package/src/components/ChatContainer.tsx +29 -21
- package/src/components/Comments.stories.tsx +11 -17
- package/src/components/CommentsContainer.tsx +5 -7
- package/src/components/CommentsThreadContainer.tsx +31 -27
- package/src/components/Lobby/Lobby.tsx +1 -1
- package/src/components/Media/VideoObject.stories.tsx +12 -7
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessageContainer.tsx +11 -9
- package/src/components/Participant/Participant.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +3 -4
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +2 -2
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +4 -5
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +5 -5
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +5 -2
- package/src/components/{ThreadComplementary.tsx → ThreadCompanion.tsx} +41 -34
- package/src/components/ThreadSettings.tsx +4 -5
- package/src/components/index.ts +4 -4
- package/src/components/testing.ts +7 -9
- package/src/extensions/threads.ts +30 -20
- package/src/functions/create-proposals.ts +56 -0
- package/src/functions/index.ts +5 -0
- package/src/hooks/analytics.ts +4 -7
- package/src/hooks/index.ts +3 -2
- package/src/hooks/useVideoStreamTrack.tsx +1 -1
- package/src/meta.ts +9 -5
- package/src/testing/stories.ts +3 -6
- package/src/translations.ts +8 -4
- package/src/types/Channel.ts +26 -0
- package/src/types/index.ts +1 -1
- package/src/types/types.ts +21 -29
- package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
- package/src/util.ts +1 -1
- package/dist/lib/browser/ChannelContainer-GHDNEZT2.mjs +0 -16
- package/dist/lib/browser/ChatContainer-42ALOWUA.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-FHAOPO57.mjs.map +0 -7
- package/dist/lib/browser/chunk-2I277V52.mjs +0 -23
- package/dist/lib/browser/chunk-2I277V52.mjs.map +0 -7
- package/dist/lib/browser/chunk-2P3GVRHP.mjs.map +0 -7
- package/dist/lib/browser/chunk-4APCDRSH.mjs +0 -18
- package/dist/lib/browser/chunk-4APCDRSH.mjs.map +0 -7
- package/dist/lib/browser/chunk-EV4JWI7L.mjs +0 -17
- package/dist/lib/browser/chunk-EV4JWI7L.mjs.map +0 -7
- package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
- package/dist/lib/browser/chunk-H63NDV62.mjs.map +0 -7
- package/dist/lib/browser/chunk-J26C57ZY.mjs.map +0 -7
- package/dist/lib/browser/chunk-KEXJGF2R.mjs.map +0 -7
- package/dist/lib/browser/chunk-KTWYVC5X.mjs.map +0 -7
- package/dist/lib/browser/chunk-TQJYDFBU.mjs.map +0 -7
- package/dist/lib/browser/chunk-TUSBPMNU.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-IB5GYU2D.mjs.map +0 -7
- package/dist/lib/browser/markdown-Z677YORA.mjs.map +0 -7
- package/dist/lib/browser/react-root-PTTTW2MO.mjs +0 -28
- package/dist/lib/browser/react-root-PTTTW2MO.mjs.map +0 -7
- package/dist/lib/browser/react-surface-X2VB6P37.mjs.map +0 -7
- package/dist/lib/browser/toolkit-KUPIIFC6.mjs +0 -80
- package/dist/lib/browser/toolkit-KUPIIFC6.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-D5E2S6AI.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-4EGHKHIU.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-XEYWX5FC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CCE5LHBE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CTZ75IFK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs +0 -19
- package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JR7KESLL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NNKKNW57.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P6E247RF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PYTVBN5J.mjs +0 -19
- package/dist/lib/node-esm/chunk-PYTVBN5J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-S3D7DTBF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UHZQTPXU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UJ2QNRLS.mjs +0 -25
- package/dist/lib/node-esm/chunk-UJ2QNRLS.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-VIMI5VLH.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-FL4IXLRP.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-2HHRRUME.mjs +0 -29
- package/dist/lib/node-esm/react-root-2HHRRUME.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-OLN3XNND.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-KZIS7G36.mjs +0 -81
- package/dist/lib/node-esm/toolkit-KZIS7G36.mjs.map +0 -7
- package/dist/types/src/capabilities/toolkit.d.ts +0 -5
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/ThreadComplementary.d.ts +0 -5
- package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
- package/dist/types/src/types/schema.d.ts +0 -177
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/toolkit.ts +0 -78
- package/src/types/schema.ts +0 -33
- /package/dist/lib/browser/{ChannelContainer-GHDNEZT2.mjs.map → ChannelContainer-L7MKV7DS.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-42ALOWUA.mjs.map → ChatContainer-KPY4BAUE.mjs.map} +0 -0
- /package/dist/lib/{node-esm/ChannelContainer-D5E2S6AI.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-4EGHKHIU.mjs.map → ChannelContainer-FYONOOZ6.mjs.map} +0 -0
|
@@ -2,26 +2,24 @@
|
|
|
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, { useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { Capabilities, IntentPlugin, contributes, createSurface } from '@dxos/app-framework';
|
|
11
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
12
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
13
10
|
import { faker } from '@dxos/random';
|
|
14
11
|
import { useClient } from '@dxos/react-client';
|
|
15
12
|
import { type Space } from '@dxos/react-client/echo';
|
|
16
13
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
17
14
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
18
15
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { render
|
|
16
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
17
|
+
import { Thread as ThreadComponent } from '@dxos/react-ui-thread';
|
|
18
|
+
import { render } from '@dxos/storybook-utils';
|
|
19
|
+
import { Message, Thread } from '@dxos/types';
|
|
22
20
|
|
|
23
21
|
import { translations } from '../translations';
|
|
24
|
-
import {
|
|
22
|
+
import { Channel } from '../types';
|
|
25
23
|
|
|
26
24
|
import { ChatContainer } from './ChatContainer';
|
|
27
25
|
|
|
@@ -31,17 +29,12 @@ const DefaultStory = () => {
|
|
|
31
29
|
const client = useClient();
|
|
32
30
|
const identity = useIdentity();
|
|
33
31
|
const [space, setSpace] = useState<Space>();
|
|
34
|
-
const [channel, setChannel] = useState<
|
|
32
|
+
const [channel, setChannel] = useState<Channel.Channel | null>();
|
|
35
33
|
|
|
36
34
|
useAsyncEffect(async () => {
|
|
37
35
|
if (identity) {
|
|
38
36
|
const space = await client.spaces.create();
|
|
39
|
-
const channel = space.db.add(
|
|
40
|
-
Obj.make(ChannelType, {
|
|
41
|
-
defaultThread: Ref.make(Obj.make(ThreadType, { messages: [], status: 'active' })),
|
|
42
|
-
threads: [],
|
|
43
|
-
}),
|
|
44
|
-
);
|
|
37
|
+
const channel = space.db.add(Channel.make());
|
|
45
38
|
setSpace(space);
|
|
46
39
|
setChannel(channel);
|
|
47
40
|
}
|
|
@@ -60,9 +53,10 @@ const DefaultStory = () => {
|
|
|
60
53
|
|
|
61
54
|
const meta = {
|
|
62
55
|
title: 'plugins/plugin-thread/Chat',
|
|
63
|
-
component:
|
|
56
|
+
component: ThreadComponent.Root as any,
|
|
64
57
|
render: render(DefaultStory),
|
|
65
58
|
decorators: [
|
|
59
|
+
withTheme,
|
|
66
60
|
withPluginManager({
|
|
67
61
|
plugins: [IntentPlugin()],
|
|
68
62
|
capabilities: [
|
|
@@ -76,11 +70,12 @@ const meta = {
|
|
|
76
70
|
),
|
|
77
71
|
],
|
|
78
72
|
}),
|
|
79
|
-
|
|
80
|
-
withLayout({ fullscreen: true }),
|
|
81
|
-
withClientProvider({ createSpace: true, types: [ThreadType, ChannelType, DataType.Message] }),
|
|
73
|
+
withClientProvider({ createSpace: true, types: [Thread.Thread, Channel.Channel, Message.Message] }),
|
|
82
74
|
],
|
|
83
|
-
parameters: {
|
|
75
|
+
parameters: {
|
|
76
|
+
layout: 'fullscreen',
|
|
77
|
+
translations,
|
|
78
|
+
},
|
|
84
79
|
} satisfies Meta<typeof DefaultStory>;
|
|
85
80
|
|
|
86
81
|
export default meta;
|
|
@@ -5,25 +5,24 @@
|
|
|
5
5
|
import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { Obj, Ref } from '@dxos/echo';
|
|
8
|
-
import { type Space,
|
|
8
|
+
import { type Space, useMembers } from '@dxos/react-client/echo';
|
|
9
9
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
10
|
-
import { Icon, ScrollArea, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { Icon, ScrollArea, type ThemedClassName, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
|
|
12
12
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
13
13
|
import { mx } from '@dxos/react-ui-theme';
|
|
14
14
|
import {
|
|
15
15
|
MessageTextbox,
|
|
16
16
|
type MessageTextboxProps,
|
|
17
|
-
Thread,
|
|
17
|
+
Thread as ThreadComponent,
|
|
18
18
|
type ThreadRootProps,
|
|
19
19
|
threadLayout,
|
|
20
20
|
} from '@dxos/react-ui-thread';
|
|
21
|
-
import {
|
|
21
|
+
import { Message, type Thread } from '@dxos/types';
|
|
22
22
|
import { isNonNullable } from '@dxos/util';
|
|
23
23
|
|
|
24
24
|
import { useStatus } from '../hooks';
|
|
25
25
|
import { meta } from '../meta';
|
|
26
|
-
import { type ThreadType } from '../types';
|
|
27
26
|
import { getMessageMetadata } from '../util';
|
|
28
27
|
|
|
29
28
|
import { command } from './command-extension';
|
|
@@ -41,16 +40,25 @@ export const ChatHeading = ({ attendableId }: { attendableId?: string }) => {
|
|
|
41
40
|
);
|
|
42
41
|
};
|
|
43
42
|
|
|
44
|
-
export type ChatContainerProps =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
export type ChatContainerProps = ThemedClassName<
|
|
44
|
+
{
|
|
45
|
+
space: Space;
|
|
46
|
+
thread: Thread.Thread;
|
|
47
|
+
context?: Obj.Any;
|
|
48
|
+
autoFocusTextbox?: boolean;
|
|
49
|
+
} & Pick<ThreadRootProps, 'current'>
|
|
50
|
+
>;
|
|
51
|
+
|
|
52
|
+
export const ChatContainer = ({
|
|
53
|
+
classNames,
|
|
54
|
+
space,
|
|
55
|
+
thread,
|
|
56
|
+
context,
|
|
57
|
+
current,
|
|
58
|
+
autoFocusTextbox,
|
|
59
|
+
}: ChatContainerProps) => {
|
|
52
60
|
const { t } = useTranslation(meta.id);
|
|
53
|
-
const id =
|
|
61
|
+
const id = Obj.getDXN(thread).toString();
|
|
54
62
|
const identity = useIdentity()!;
|
|
55
63
|
const members = useMembers(space?.key);
|
|
56
64
|
const activity = useStatus(space, id);
|
|
@@ -67,7 +75,7 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
|
|
|
67
75
|
() => [
|
|
68
76
|
createBasicExtensions({ placeholder: t('message placeholder') }),
|
|
69
77
|
createThemeExtensions({ themeMode }),
|
|
70
|
-
listener({ onChange: (text) => (messageRef.current = text) }),
|
|
78
|
+
listener({ onChange: ({ text }) => (messageRef.current = text) }),
|
|
71
79
|
command,
|
|
72
80
|
],
|
|
73
81
|
[themeMode, _count],
|
|
@@ -92,7 +100,7 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
|
|
|
92
100
|
|
|
93
101
|
thread.messages.push(
|
|
94
102
|
Ref.make(
|
|
95
|
-
Obj.make(
|
|
103
|
+
Obj.make(Message.Message, {
|
|
96
104
|
created: new Date().toISOString(),
|
|
97
105
|
sender: { identityDid: identity.did },
|
|
98
106
|
blocks: [{ _tag: 'text', text: messageRef.current }],
|
|
@@ -109,12 +117,13 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
|
|
|
109
117
|
};
|
|
110
118
|
|
|
111
119
|
return (
|
|
112
|
-
<
|
|
120
|
+
<ThreadComponent.Root
|
|
113
121
|
current={current}
|
|
114
122
|
id={id}
|
|
115
123
|
classNames={[
|
|
116
|
-
'bs-full
|
|
124
|
+
'bs-full grid-rows-[1fr_min-content_min-content] overflow-hidden',
|
|
117
125
|
'transition-[padding-block-end] [[data-sidebar-inline-start-state=open]_&]:lg:pbe-0',
|
|
126
|
+
classNames,
|
|
118
127
|
]}
|
|
119
128
|
>
|
|
120
129
|
<ScrollArea.Root classNames='col-span-2'>
|
|
@@ -136,9 +145,8 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
|
|
|
136
145
|
</ScrollArea.Root>
|
|
137
146
|
|
|
138
147
|
<MessageTextbox extensions={extensions} autoFocus={autoFocus} onSend={handleCreate} {...textboxMetadata} />
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
</Thread.Root>
|
|
148
|
+
<ThreadComponent.Status activity={activity}>{t('activity message')}</ThreadComponent.Status>
|
|
149
|
+
</ThreadComponent.Root>
|
|
142
150
|
);
|
|
143
151
|
};
|
|
144
152
|
|
|
@@ -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
|
|
|
@@ -15,11 +13,11 @@ import { faker } from '@dxos/random';
|
|
|
15
13
|
import { useQuery, useSpace } from '@dxos/react-client/echo';
|
|
16
14
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
17
15
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
16
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
17
|
+
import { render } from '@dxos/storybook-utils';
|
|
18
|
+
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
20
19
|
|
|
21
20
|
import { translations } from '../translations';
|
|
22
|
-
import { ThreadType } from '../types';
|
|
23
21
|
|
|
24
22
|
import { CommentsContainer } from './CommentsContainer';
|
|
25
23
|
import { createCommentThread, createProposalThread } from './testing';
|
|
@@ -29,7 +27,7 @@ faker.seed(1);
|
|
|
29
27
|
const DefaultStory = () => {
|
|
30
28
|
const identity = useIdentity();
|
|
31
29
|
const space = useSpace();
|
|
32
|
-
const anchors = useQuery(space, Query.type(AnchoredTo));
|
|
30
|
+
const anchors = useQuery(space, Query.type(AnchoredTo.AnchoredTo));
|
|
33
31
|
|
|
34
32
|
useAsyncEffect(async () => {
|
|
35
33
|
if (identity && space) {
|
|
@@ -37,14 +35,14 @@ const DefaultStory = () => {
|
|
|
37
35
|
const thread1 = space.db.add(createCommentThread(identity));
|
|
38
36
|
const thread2 = space.db.add(createProposalThread(identity));
|
|
39
37
|
space.db.add(
|
|
40
|
-
Relation.make(AnchoredTo, {
|
|
38
|
+
Relation.make(AnchoredTo.AnchoredTo, {
|
|
41
39
|
[Relation.Source]: thread1,
|
|
42
40
|
[Relation.Target]: object,
|
|
43
41
|
anchor: 'test',
|
|
44
42
|
}),
|
|
45
43
|
);
|
|
46
44
|
space.db.add(
|
|
47
|
-
Relation.make(AnchoredTo, {
|
|
45
|
+
Relation.make(AnchoredTo.AnchoredTo, {
|
|
48
46
|
[Relation.Source]: thread2,
|
|
49
47
|
[Relation.Target]: object,
|
|
50
48
|
anchor: 'test',
|
|
@@ -57,11 +55,7 @@ const DefaultStory = () => {
|
|
|
57
55
|
return null;
|
|
58
56
|
}
|
|
59
57
|
|
|
60
|
-
return
|
|
61
|
-
<div className='w-[30rem] overflow-y-auto bg-baseSurface'>
|
|
62
|
-
<CommentsContainer anchors={anchors} onThreadDelete={console.log} onAcceptProposal={console.log} />
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
58
|
+
return <CommentsContainer anchors={anchors} onThreadDelete={console.log} onAcceptProposal={console.log} />;
|
|
65
59
|
};
|
|
66
60
|
|
|
67
61
|
const meta = {
|
|
@@ -69,14 +63,14 @@ const meta = {
|
|
|
69
63
|
render: render(DefaultStory),
|
|
70
64
|
decorators: [
|
|
71
65
|
withTheme,
|
|
72
|
-
withLayout({
|
|
73
|
-
// TODO(wittjosiah): This shouldn't depend on app framework
|
|
74
|
-
//
|
|
66
|
+
withLayout({ container: 'column', scroll: true }),
|
|
67
|
+
// TODO(wittjosiah): This shouldn't depend on app framework (use withClientProvider instead).
|
|
68
|
+
// Currently this is required due to useOnEditAnalytics.
|
|
75
69
|
withPluginManager({
|
|
76
70
|
plugins: [
|
|
77
71
|
IntentPlugin(),
|
|
78
72
|
ClientPlugin({
|
|
79
|
-
types: [
|
|
73
|
+
types: [Message.Message, Thread.Thread, AnchoredTo.AnchoredTo],
|
|
80
74
|
onClientInitialized: async ({ client }) => {
|
|
81
75
|
await client.halo.createIdentity();
|
|
82
76
|
},
|
|
@@ -4,18 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useEffect } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Relation } from '@dxos/echo';
|
|
8
|
-
import { fullyQualifiedId } from '@dxos/react-client/echo';
|
|
7
|
+
import { Obj, Relation } from '@dxos/echo';
|
|
9
8
|
import { Callout, Icon, Trans, useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import { type AnchoredTo } from '@dxos/
|
|
9
|
+
import { type AnchoredTo, type Thread } from '@dxos/types';
|
|
11
10
|
|
|
12
11
|
import { meta } from '../meta';
|
|
13
|
-
import { type ThreadType } from '../types';
|
|
14
12
|
|
|
15
13
|
import { CommentsThreadContainer, type CommentsThreadContainerProps } from './CommentsThreadContainer';
|
|
16
14
|
|
|
17
15
|
export type CommentsContainerProps = Omit<CommentsThreadContainerProps, 'anchor' | 'current'> & {
|
|
18
|
-
anchors: AnchoredTo[];
|
|
16
|
+
anchors: AnchoredTo.AnchoredTo[];
|
|
19
17
|
currentId?: string;
|
|
20
18
|
showResolvedThreads?: boolean;
|
|
21
19
|
};
|
|
@@ -63,8 +61,8 @@ export const CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...
|
|
|
63
61
|
return (
|
|
64
62
|
<div>
|
|
65
63
|
{filteredAnchors.map((anchor) => {
|
|
66
|
-
const thread = Relation.getSource(anchor) as
|
|
67
|
-
const threadId =
|
|
64
|
+
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
65
|
+
const threadId = Obj.getDXN(thread).toString();
|
|
68
66
|
return <CommentsThreadContainer key={threadId} anchor={anchor} current={currentId === threadId} {...props} />;
|
|
69
67
|
})}
|
|
70
68
|
</div>
|
|
@@ -4,32 +4,36 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { Ref, Relation } from '@dxos/echo';
|
|
8
|
-
import {
|
|
7
|
+
import { Obj, Ref, Relation } from '@dxos/echo';
|
|
8
|
+
import { getSpace, useMembers } from '@dxos/react-client/echo';
|
|
9
9
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
10
10
|
import { IconButton, Tag, Tooltip, useThemeContext, useTranslation } from '@dxos/react-ui';
|
|
11
11
|
import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
|
|
12
12
|
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/react-ui-theme';
|
|
13
|
-
import {
|
|
14
|
-
|
|
13
|
+
import {
|
|
14
|
+
MessageTextbox,
|
|
15
|
+
type MessageTextboxProps,
|
|
16
|
+
Thread as ThreadComponent,
|
|
17
|
+
type ThreadRootProps,
|
|
18
|
+
} from '@dxos/react-ui-thread';
|
|
19
|
+
import { type AnchoredTo, type Thread } from '@dxos/types';
|
|
15
20
|
import { isNonNullable } from '@dxos/util';
|
|
16
21
|
|
|
17
22
|
import { useStatus } from '../hooks';
|
|
18
23
|
import { meta } from '../meta';
|
|
19
|
-
import { type ThreadType } from '../types';
|
|
20
24
|
import { getMessageMetadata } from '../util';
|
|
21
25
|
|
|
22
26
|
import { command } from './command-extension';
|
|
23
27
|
import { MessageContainer, buttonClassNames, buttonGroupClassNames } from './MessageContainer';
|
|
24
28
|
|
|
25
29
|
export type CommentsThreadContainerProps = {
|
|
26
|
-
anchor: AnchoredTo;
|
|
27
|
-
onAttend?: (anchor: AnchoredTo) => void;
|
|
28
|
-
onComment?: (anchor: AnchoredTo, message: string) => void;
|
|
29
|
-
onResolve?: (anchor: AnchoredTo) => void;
|
|
30
|
-
onMessageDelete?: (anchor: AnchoredTo, messageId: string) => void;
|
|
31
|
-
onThreadDelete?: (anchor: AnchoredTo) => void;
|
|
32
|
-
onAcceptProposal?: (anchor: AnchoredTo, messageId: string) => void;
|
|
30
|
+
anchor: AnchoredTo.AnchoredTo;
|
|
31
|
+
onAttend?: (anchor: AnchoredTo.AnchoredTo) => void;
|
|
32
|
+
onComment?: (anchor: AnchoredTo.AnchoredTo, message: string) => void;
|
|
33
|
+
onResolve?: (anchor: AnchoredTo.AnchoredTo) => void;
|
|
34
|
+
onMessageDelete?: (anchor: AnchoredTo.AnchoredTo, messageId: string) => void;
|
|
35
|
+
onThreadDelete?: (anchor: AnchoredTo.AnchoredTo) => void;
|
|
36
|
+
onAcceptProposal?: (anchor: AnchoredTo.AnchoredTo, messageId: string) => void;
|
|
33
37
|
} & Pick<ThreadRootProps, 'current'>;
|
|
34
38
|
|
|
35
39
|
export const CommentsThreadContainer = ({
|
|
@@ -42,29 +46,29 @@ export const CommentsThreadContainer = ({
|
|
|
42
46
|
onThreadDelete,
|
|
43
47
|
onAcceptProposal,
|
|
44
48
|
}: CommentsThreadContainerProps) => {
|
|
49
|
+
const { themeMode } = useThemeContext();
|
|
45
50
|
const { t } = useTranslation(meta.id);
|
|
46
51
|
const identity = useIdentity()!;
|
|
47
52
|
const space = getSpace(anchor);
|
|
48
53
|
const members = useMembers(space?.key);
|
|
49
54
|
const detached = !anchor.anchor;
|
|
50
|
-
const thread = Relation.getSource(anchor) as
|
|
51
|
-
const activity = useStatus(space,
|
|
55
|
+
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
56
|
+
const activity = useStatus(space, Obj.getDXN(thread).toString());
|
|
52
57
|
const threadScrollRef = useRef<HTMLDivElement | null>(null);
|
|
53
|
-
const { themeMode } = useThemeContext();
|
|
54
58
|
|
|
55
|
-
const textboxMetadata = getMessageMetadata(
|
|
59
|
+
const textboxMetadata = getMessageMetadata(Obj.getDXN(thread).toString(), identity);
|
|
60
|
+
|
|
56
61
|
// TODO(wittjosiah): This is a hack to reset the editor after a message is sent.
|
|
57
|
-
const [
|
|
58
|
-
const rerenderEditor = () => _setCount((count) => count + 1);
|
|
62
|
+
const [state, setState] = useState({});
|
|
59
63
|
const messageRef = useRef('');
|
|
60
64
|
const extensions = useMemo(
|
|
61
65
|
() => [
|
|
62
66
|
createBasicExtensions({ placeholder: t('message placeholder') }),
|
|
63
67
|
createThemeExtensions({ themeMode }),
|
|
64
|
-
listener({ onChange: (text) => (messageRef.current = text) }),
|
|
68
|
+
listener({ onChange: ({ text }) => (messageRef.current = text) }),
|
|
65
69
|
command,
|
|
66
70
|
],
|
|
67
|
-
[
|
|
71
|
+
[state],
|
|
68
72
|
);
|
|
69
73
|
|
|
70
74
|
// TODO(thure): Factor out.
|
|
@@ -85,14 +89,14 @@ export const CommentsThreadContainer = ({
|
|
|
85
89
|
onComment?.(anchor, messageRef.current);
|
|
86
90
|
messageRef.current = '';
|
|
87
91
|
scrollToEnd('instant');
|
|
88
|
-
|
|
92
|
+
setState({});
|
|
89
93
|
|
|
90
94
|
return true;
|
|
91
95
|
}, [anchor, identity]);
|
|
92
96
|
|
|
93
97
|
return (
|
|
94
|
-
<
|
|
95
|
-
id={
|
|
98
|
+
<ThreadComponent.Root
|
|
99
|
+
id={Obj.getDXN(thread).toString()}
|
|
96
100
|
classNames='pbs-2 border-be border-subduedSeparator last:border-none'
|
|
97
101
|
current={current}
|
|
98
102
|
onClickCapture={handleAttend}
|
|
@@ -108,10 +112,10 @@ export const CommentsThreadContainer = ({
|
|
|
108
112
|
>
|
|
109
113
|
{detached ? (
|
|
110
114
|
<Tooltip.Trigger asChild content={t('detached thread label')} side='top'>
|
|
111
|
-
<
|
|
115
|
+
<ThreadComponent.Header detached>{thread.name}</ThreadComponent.Header>
|
|
112
116
|
</Tooltip.Trigger>
|
|
113
117
|
) : (
|
|
114
|
-
<
|
|
118
|
+
<ThreadComponent.Header>{thread.name}</ThreadComponent.Header>
|
|
115
119
|
)}
|
|
116
120
|
<div role='none' className={buttonGroupClassNames}>
|
|
117
121
|
{thread.status === 'staged' && <Tag palette='neutral'>{t('draft button')}</Tag>}
|
|
@@ -160,10 +164,10 @@ export const CommentsThreadContainer = ({
|
|
|
160
164
|
*/}
|
|
161
165
|
<MessageTextbox extensions={extensions} onSend={handleComment} {...textboxMetadata} />
|
|
162
166
|
|
|
163
|
-
<
|
|
167
|
+
<ThreadComponent.Status activity={activity}>{t('activity message')}</ThreadComponent.Status>
|
|
164
168
|
|
|
165
169
|
{/* NOTE(thure): This can’t also be the `overflow-anchor` because `ScrollArea` injects an interceding node that contains this necessary ref’d element. */}
|
|
166
170
|
<div role='none' className='bs-px -mbs-px' ref={threadScrollRef} />
|
|
167
|
-
</
|
|
171
|
+
</ThreadComponent.Root>
|
|
168
172
|
);
|
|
169
173
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { type FC, type PropsWithChildren, useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { useCapability } from '@dxos/app-framework';
|
|
7
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
8
8
|
import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { mx } from '@dxos/react-ui-theme';
|
|
10
10
|
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import '@dxos-theme';
|
|
6
|
-
|
|
7
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 {
|
|
11
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
12
|
|
|
15
13
|
import { getUserMediaTrack } from '../../calls';
|
|
16
14
|
import { ResponsiveContainer } from '../ResponsiveGrid';
|
|
@@ -23,9 +21,13 @@ const DefaultStory = (props: VideoObjectProps) => {
|
|
|
23
21
|
useEffect(() => {
|
|
24
22
|
const ctx = new Context();
|
|
25
23
|
scheduleTask(ctx, async () => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
try {
|
|
25
|
+
const stream = new MediaStream();
|
|
26
|
+
stream.addTrack(await getUserMediaTrack('videoinput'));
|
|
27
|
+
setVideoStream(stream);
|
|
28
|
+
} catch (err) {
|
|
29
|
+
log.catch(err);
|
|
30
|
+
}
|
|
29
31
|
});
|
|
30
32
|
|
|
31
33
|
return () => {
|
|
@@ -45,7 +47,10 @@ const meta = {
|
|
|
45
47
|
title: 'plugins/plugin-thread/VideoObject',
|
|
46
48
|
component: VideoObject,
|
|
47
49
|
render: DefaultStory,
|
|
48
|
-
decorators: [withTheme
|
|
50
|
+
decorators: [withTheme],
|
|
51
|
+
parameters: {
|
|
52
|
+
layout: 'fullscreen',
|
|
53
|
+
},
|
|
49
54
|
};
|
|
50
55
|
|
|
51
56
|
export default meta;
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { EditorView } from '@codemirror/view';
|
|
6
|
+
import type * as Schema from 'effect/Schema';
|
|
6
7
|
import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
7
8
|
|
|
8
|
-
import { Surface } from '@dxos/app-framework';
|
|
9
|
-
import { type Obj, Ref
|
|
9
|
+
import { Surface } from '@dxos/app-framework/react';
|
|
10
|
+
import { type Obj, Ref } from '@dxos/echo';
|
|
10
11
|
import { PublicKey } from '@dxos/react-client';
|
|
11
12
|
import { type SpaceMember } from '@dxos/react-client/echo';
|
|
12
13
|
import { type Identity, useIdentity } from '@dxos/react-client/halo';
|
|
@@ -14,7 +15,7 @@ import { IconButton, useOnTransition, useThemeContext, useTranslation } from '@d
|
|
|
14
15
|
import { createBasicExtensions, createThemeExtensions, useTextEditor } from '@dxos/react-ui-editor';
|
|
15
16
|
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/react-ui-theme';
|
|
16
17
|
import { MessageHeading, MessageRoot } from '@dxos/react-ui-thread';
|
|
17
|
-
import { type
|
|
18
|
+
import { type ContentBlock, type Message } from '@dxos/types';
|
|
18
19
|
|
|
19
20
|
import { useOnEditAnalytics } from '../hooks';
|
|
20
21
|
import { meta } from '../meta';
|
|
@@ -26,7 +27,8 @@ export const buttonGroupClassNames = 'flex flex-row items-center gap-0.5 pie-2';
|
|
|
26
27
|
export const buttonClassNames = '!p-1 transition-opacity';
|
|
27
28
|
|
|
28
29
|
export type MessageContainerProps = {
|
|
29
|
-
|
|
30
|
+
// TODO(wittjosiah): Find a simpler way to define this type.
|
|
31
|
+
message: Obj.Obj<Schema.Schema.Type<typeof Message.Message>>;
|
|
30
32
|
members: SpaceMember[];
|
|
31
33
|
editable?: boolean;
|
|
32
34
|
onDelete?: (id: string) => void;
|
|
@@ -101,13 +103,13 @@ export const MessageContainer = ({
|
|
|
101
103
|
{textBlock && <TextboxBlock block={textBlock} isAuthor={userIsAuthor} editing={editing} />}
|
|
102
104
|
{proposalBlock && <ProposalBlock block={proposalBlock} />}
|
|
103
105
|
{Ref.Array.targets(references).map((reference, index) => (
|
|
104
|
-
<MessagePart key={index} part={reference} />
|
|
106
|
+
<MessagePart key={index} part={reference as Obj.Any} />
|
|
105
107
|
))}
|
|
106
108
|
</MessageRoot>
|
|
107
109
|
);
|
|
108
110
|
};
|
|
109
111
|
|
|
110
|
-
const MessagePart = ({ part }: { part:
|
|
112
|
+
const MessagePart = ({ part }: { part: Obj.Any }) => {
|
|
111
113
|
return <MessageBlockObjectTile subject={part} />;
|
|
112
114
|
};
|
|
113
115
|
|
|
@@ -116,7 +118,7 @@ const TextboxBlock = ({
|
|
|
116
118
|
isAuthor,
|
|
117
119
|
editing,
|
|
118
120
|
}: {
|
|
119
|
-
block:
|
|
121
|
+
block: ContentBlock.Text;
|
|
120
122
|
editing?: boolean;
|
|
121
123
|
isAuthor?: boolean;
|
|
122
124
|
identity?: Identity;
|
|
@@ -158,7 +160,7 @@ const TextboxBlock = ({
|
|
|
158
160
|
return <div role='none' ref={parentRef} className='mie-4' {...focusAttributes} />;
|
|
159
161
|
};
|
|
160
162
|
|
|
161
|
-
const ProposalBlock = ({ block }: { block:
|
|
163
|
+
const ProposalBlock = ({ block }: { block: ContentBlock.Proposal }) => {
|
|
162
164
|
return (
|
|
163
165
|
<div role='none' className='mie-4 italic'>
|
|
164
166
|
{block.text}
|
|
@@ -176,7 +178,7 @@ const MessageBlockObjectTile = forwardRef<HTMLDivElement, { subject: Obj.Any }>(
|
|
|
176
178
|
return (
|
|
177
179
|
<div
|
|
178
180
|
role='group'
|
|
179
|
-
className={mx('grid col-span-3
|
|
181
|
+
className={mx('grid col-span-3 plb-1 pr-4', hoverableControls, hoverableFocusedWithinControls)}
|
|
180
182
|
ref={forwardedRef}
|
|
181
183
|
>
|
|
182
184
|
<Surface role='card' limit={1} data={{ subject }} fallback={title} />
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { memo, useMemo } from 'react';
|
|
6
6
|
|
|
7
|
-
import { useCapability } from '@dxos/app-framework';
|
|
7
|
+
import { useCapability } from '@dxos/app-framework/react';
|
|
8
8
|
|
|
9
9
|
import { type EncodedTrackName, type UserState } from '../../calls';
|
|
10
10
|
import { ThreadCapabilities } from '../../capabilities';
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
// Copyright 2025 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
|
|
|
10
|
-
import {
|
|
8
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
11
9
|
|
|
12
10
|
import { translations } from '../../translations';
|
|
13
11
|
import { VideoObject as VideoObjectComponent } from '../Media';
|
|
@@ -17,8 +15,9 @@ import { ResponsiveContainer } from './ResponsiveContainer';
|
|
|
17
15
|
const meta = {
|
|
18
16
|
title: 'plugins/plugin-thread/ResponsiveContainer',
|
|
19
17
|
component: ResponsiveContainer,
|
|
20
|
-
decorators: [withTheme
|
|
18
|
+
decorators: [withTheme],
|
|
21
19
|
parameters: {
|
|
20
|
+
layout: 'fullscreen',
|
|
22
21
|
translations,
|
|
23
22
|
},
|
|
24
23
|
} satisfies Meta<typeof ResponsiveContainer>;
|
|
@@ -18,11 +18,11 @@ import { mx } from '@dxos/react-ui-theme';
|
|
|
18
18
|
export const ResponsiveContainer = ({ children }: PropsWithChildren) => {
|
|
19
19
|
return (
|
|
20
20
|
// Outer container that takes full size of parent.
|
|
21
|
-
<div role='none' className='relative flex
|
|
21
|
+
<div role='none' className='relative flex is-full bs-full'>
|
|
22
22
|
{/* Absolute positioning layer for centering content. */}
|
|
23
23
|
<div role='none' className='absolute inset-0 flex justify-center items-center'>
|
|
24
24
|
{/* Content container that maintains given aspect ratio and proper scaling. */}
|
|
25
|
-
<div role='none' className={mx('max-
|
|
25
|
+
<div role='none' className={mx('max-bs-full max-is-full is-auto bs-auto aspect-video')}>
|
|
26
26
|
{children}
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 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, { useEffect, useState } from 'react';
|
|
9
7
|
|
|
10
8
|
import { faker } from '@dxos/random';
|
|
11
|
-
import {
|
|
9
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
10
|
|
|
13
11
|
import { translations } from '../../translations';
|
|
14
12
|
|
|
@@ -43,7 +41,7 @@ const TestCell = ({ item, ...props }: ResponsiveGridItemProps<TestItem>) => {
|
|
|
43
41
|
{item.type === 'image' && <img className='aspect-video object-contain' src={item.imageUrl} />}
|
|
44
42
|
{item.type === 'video' && (
|
|
45
43
|
<video
|
|
46
|
-
className='
|
|
44
|
+
className='is-full aspect-video object-cover rounded-md'
|
|
47
45
|
src={item.videoUrl}
|
|
48
46
|
playsInline
|
|
49
47
|
autoPlay
|
|
@@ -94,8 +92,9 @@ const meta = {
|
|
|
94
92
|
title: 'plugins/plugin-thread/ResponsiveGrid',
|
|
95
93
|
component: ResponsiveGrid as any,
|
|
96
94
|
render: DefaultStory,
|
|
97
|
-
decorators: [withTheme
|
|
95
|
+
decorators: [withTheme],
|
|
98
96
|
parameters: {
|
|
97
|
+
layout: 'fullscreen',
|
|
99
98
|
translations,
|
|
100
99
|
},
|
|
101
100
|
} satisfies Meta<typeof DefaultStory>;
|