@dxos/plugin-thread 0.8.4-main.66e292d → 0.8.4-main.69d29f4
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/app-graph-builder-7C2QW32W.mjs +188 -0
- package/dist/lib/browser/app-graph-builder-7C2QW32W.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/call-manager-4P536YNX.mjs +26 -0
- package/dist/lib/browser/call-manager-4P536YNX.mjs.map +7 -0
- package/dist/lib/browser/chunk-2FIHSX35.mjs +293 -0
- package/dist/lib/browser/chunk-2FIHSX35.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KOBXMDCI.mjs → chunk-DLO2G3DM.mjs} +14 -12
- package/dist/lib/browser/chunk-DLO2G3DM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZCW3NSDZ.mjs → chunk-ERK254BS.mjs} +68 -51
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs +1815 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs.map +7 -0
- package/dist/lib/browser/{blueprint-definition-TQ4JFMZZ.mjs → chunk-ZFLSTQSE.mjs} +39 -34
- package/dist/lib/browser/chunk-ZFLSTQSE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +100 -90
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/markdown-QMJLRR6R.mjs +210 -0
- package/dist/lib/browser/markdown-QMJLRR6R.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-T63EP5TY.mjs +441 -0
- package/dist/lib/browser/operation-resolver-T63EP5TY.mjs.map +7 -0
- package/dist/lib/browser/react-root-56MJI77R.mjs +25 -0
- package/dist/lib/browser/react-root-56MJI77R.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-AUQQSQQC.mjs → react-surface-DMBHQOXJ.mjs} +32 -33
- package/dist/lib/browser/react-surface-DMBHQOXJ.mjs.map +7 -0
- package/dist/lib/browser/{repair-JFJLEM2O.mjs → repair-6OZ75AUU.mjs} +12 -9
- package/dist/lib/browser/repair-6OZ75AUU.mjs.map +7 -0
- package/dist/lib/browser/settings-WZMJMML3.mjs +32 -0
- package/dist/lib/browser/settings-WZMJMML3.mjs.map +7 -0
- package/dist/lib/browser/state-SJR2GL5G.mjs +24 -0
- package/dist/lib/browser/state-SJR2GL5G.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +5 -4
- package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.mjs +189 -0
- package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/call-manager-FMLRR5S5.mjs +27 -0
- package/dist/lib/node-esm/call-manager-FMLRR5S5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-7XQLXMX7.mjs +1816 -0
- package/dist/lib/node-esm/chunk-7XQLXMX7.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-TSX5HHW7.mjs → chunk-AQHPP6ZX.mjs} +39 -34
- package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PZH2EDU5.mjs → chunk-KRBZBJRI.mjs} +14 -12
- package/dist/lib/node-esm/chunk-KRBZBJRI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-7KZWZS2U.mjs → chunk-QP3KQOPQ.mjs} +68 -51
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WMWUXWAS.mjs +294 -0
- package/dist/lib/node-esm/chunk-WMWUXWAS.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +100 -90
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/markdown-L6LLQLIN.mjs +211 -0
- package/dist/lib/node-esm/markdown-L6LLQLIN.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs +442 -0
- package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs.map +7 -0
- package/dist/lib/node-esm/react-root-V4W4X5GL.mjs +26 -0
- package/dist/lib/node-esm/react-root-V4W4X5GL.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-AMVESEF4.mjs → react-surface-ELDSTUA3.mjs} +32 -33
- package/dist/lib/node-esm/react-surface-ELDSTUA3.mjs.map +7 -0
- package/dist/lib/node-esm/{repair-RMLR24YR.mjs → repair-6777EPOM.mjs} +12 -9
- package/dist/lib/node-esm/repair-6777EPOM.mjs.map +7 -0
- package/dist/lib/node-esm/settings-37CO3SNR.mjs +33 -0
- package/dist/lib/node-esm/settings-37CO3SNR.mjs.map +7 -0
- package/dist/lib/node-esm/state-5R3TZJQE.mjs +25 -0
- package/dist/lib/node-esm/state-5R3TZJQE.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +5 -4
- package/dist/types/src/ThreadPlugin.d.ts +2 -1
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts +21 -0
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
- package/dist/types/src/calls/call-manager.d.ts +40 -30
- package/dist/types/src/calls/call-manager.d.ts.map +1 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
- package/dist/types/src/calls/media-manager.d.ts +1 -1
- package/dist/types/src/calls/media-manager.d.ts.map +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts +1 -1
- package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +9 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts +6 -0
- package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +1 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts +3 -0
- package/dist/types/src/capabilities/call-manager/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -17
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
- package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/index.d.ts +3 -0
- package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
- package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +3 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +5 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +3 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +7 -0
- package/dist/types/src/capabilities/state/state.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/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts +4 -5
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +1 -1
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
- 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 +1 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
- package/dist/types/src/components/MessageContainer.d.ts +3 -4
- 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/ThreadCompanion.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings.d.ts +4 -2
- package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +7 -2
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/functions/create-proposals.d.ts.map +1 -1
- package/dist/types/src/hooks/analytics.d.ts +1 -2
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/stories.d.ts +2 -1
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/types/Channel.d.ts +691 -12
- package/dist/types/src/types/Channel.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +23 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3182 -295
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +86 -69
- package/src/ThreadPlugin.tsx +50 -80
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/thread-blueprint.ts +32 -0
- package/src/calls/call-manager.ts +76 -52
- package/src/calls/call-swarm-synchronizer.ts +2 -2
- package/src/calls/media-manager.ts +1 -1
- package/src/calls/util/calls-service.ts +1 -1
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +201 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +23 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/call-manager/call-manager.ts +26 -0
- package/src/capabilities/call-manager/index.ts +7 -0
- package/src/capabilities/index.ts +10 -14
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +83 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +400 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +20 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +97 -0
- package/src/capabilities/repair/index.ts +7 -0
- package/src/capabilities/{repair.ts → repair/repair.ts} +21 -10
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +33 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +22 -0
- package/src/components/Call/Call.tsx +7 -3
- package/src/components/Call/Toolbar.tsx +28 -20
- package/src/components/CallSidebar.tsx +4 -2
- package/src/components/ChannelContainer.stories.tsx +10 -8
- package/src/components/ChannelContainer.tsx +18 -16
- package/src/components/Chat.stories.tsx +6 -6
- package/src/components/ChatContainer.tsx +19 -17
- package/src/components/Comments.stories.tsx +21 -18
- package/src/components/CommentsThreadContainer.tsx +9 -9
- package/src/components/Lobby/Lobby.tsx +8 -6
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.tsx +1 -1
- package/src/components/MessageContainer.tsx +53 -24
- package/src/components/Participant/Participant.tsx +31 -18
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +1 -1
- package/src/components/ThreadCompanion.tsx +69 -64
- package/src/components/ThreadSettings.tsx +6 -1
- package/src/components/command-extension.ts +2 -2
- package/src/components/index.ts +2 -5
- package/src/extensions/threads.ts +75 -41
- package/src/functions/create-proposals.ts +5 -4
- package/src/hooks/analytics.ts +23 -20
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/testing/stories.ts +15 -11
- package/src/types/Channel.ts +10 -6
- package/src/types/capabilities.ts +34 -0
- package/src/types/index.ts +1 -0
- package/src/types/types.ts +160 -73
- package/dist/lib/browser/ChannelContainer-L7MKV7DS.mjs +0 -17
- package/dist/lib/browser/ChatContainer-KPY4BAUE.mjs +0 -16
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-TQ4JFMZZ.mjs.map +0 -7
- package/dist/lib/browser/call-manager-4YFT4XA6.mjs +0 -25
- package/dist/lib/browser/call-manager-4YFT4XA6.mjs.map +0 -7
- package/dist/lib/browser/chunk-ALZKJOZK.mjs +0 -989
- package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +0 -7
- package/dist/lib/browser/chunk-ANTFU4JB.mjs +0 -25
- package/dist/lib/browser/chunk-ANTFU4JB.mjs.map +0 -7
- package/dist/lib/browser/chunk-CFC7LEPD.mjs +0 -18
- package/dist/lib/browser/chunk-CFC7LEPD.mjs.map +0 -7
- package/dist/lib/browser/chunk-JDJPMI7V.mjs +0 -143
- package/dist/lib/browser/chunk-JDJPMI7V.mjs.map +0 -7
- package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +0 -7
- package/dist/lib/browser/chunk-NPT5S6N4.mjs +0 -611
- package/dist/lib/browser/chunk-NPT5S6N4.mjs.map +0 -7
- package/dist/lib/browser/chunk-QM34EZQK.mjs +0 -20
- package/dist/lib/browser/chunk-QM34EZQK.mjs.map +0 -7
- package/dist/lib/browser/chunk-TLOOZTRD.mjs +0 -377
- package/dist/lib/browser/chunk-TLOOZTRD.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs +0 -355
- package/dist/lib/browser/intent-resolver-G33FT3NO.mjs.map +0 -7
- package/dist/lib/browser/markdown-WFZFYJBQ.mjs +0 -172
- package/dist/lib/browser/markdown-WFZFYJBQ.mjs.map +0 -7
- package/dist/lib/browser/react-root-ED7PHA44.mjs +0 -29
- package/dist/lib/browser/react-root-ED7PHA44.mjs.map +0 -7
- package/dist/lib/browser/react-surface-AUQQSQQC.mjs.map +0 -7
- package/dist/lib/browser/repair-JFJLEM2O.mjs.map +0 -7
- package/dist/lib/browser/settings-E6IOLK46.mjs +0 -23
- package/dist/lib/browser/settings-E6IOLK46.mjs.map +0 -7
- package/dist/lib/browser/state-UYPLBGZJ.mjs +0 -35
- package/dist/lib/browser/state-UYPLBGZJ.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs +0 -18
- package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs.map +0 -7
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-TSX5HHW7.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs +0 -26
- package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs +0 -22
- package/dist/lib/node-esm/chunk-2AEIN5MI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7KZWZS2U.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AB42KYF3.mjs +0 -990
- package/dist/lib/node-esm/chunk-AB42KYF3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ATNY37UV.mjs +0 -27
- package/dist/lib/node-esm/chunk-ATNY37UV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs +0 -378
- package/dist/lib/node-esm/chunk-E5HNHFYH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FF3QVPY4.mjs +0 -612
- package/dist/lib/node-esm/chunk-FF3QVPY4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P2M364TO.mjs +0 -144
- package/dist/lib/node-esm/chunk-P2M364TO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs +0 -19
- package/dist/lib/node-esm/chunk-RT6NRL2I.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs +0 -356
- package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs +0 -173
- package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-DZN324JA.mjs +0 -30
- package/dist/lib/node-esm/react-root-DZN324JA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-AMVESEF4.mjs.map +0 -7
- package/dist/lib/node-esm/repair-RMLR24YR.mjs.map +0 -7
- package/dist/lib/node-esm/settings-RGZHWDSO.mjs +0 -24
- package/dist/lib/node-esm/settings-RGZHWDSO.mjs.map +0 -7
- package/dist/lib/node-esm/state-XNWOLBNE.mjs +0 -36
- package/dist/lib/node-esm/state-XNWOLBNE.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager.d.ts +0 -5
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -27
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -4
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -7
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/repair.d.ts +0 -4
- package/dist/types/src/capabilities/repair.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -7
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -194
- package/src/capabilities/blueprint-definition.ts +0 -38
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -311
- package/src/capabilities/markdown.ts +0 -71
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/react-surface.tsx +0 -91
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -26
- /package/dist/lib/browser/{ChannelContainer-L7MKV7DS.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{browser/ChatContainer-KPY4BAUE.mjs.map → node-esm/blueprints/index.mjs.map} +0 -0
|
@@ -1,611 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChannelContainer
|
|
3
|
-
} from "./chunk-ALZKJOZK.mjs";
|
|
4
|
-
import {
|
|
5
|
-
ThreadAction
|
|
6
|
-
} from "./chunk-JDJPMI7V.mjs";
|
|
7
|
-
import {
|
|
8
|
-
ThreadCapabilities
|
|
9
|
-
} from "./chunk-CFC7LEPD.mjs";
|
|
10
|
-
import {
|
|
11
|
-
MessageContainer,
|
|
12
|
-
buttonClassNames,
|
|
13
|
-
buttonGroupClassNames,
|
|
14
|
-
command
|
|
15
|
-
} from "./chunk-TLOOZTRD.mjs";
|
|
16
|
-
import {
|
|
17
|
-
useStatus
|
|
18
|
-
} from "./chunk-KOBXMDCI.mjs";
|
|
19
|
-
import {
|
|
20
|
-
getMessageMetadata
|
|
21
|
-
} from "./chunk-CP7E2HRE.mjs";
|
|
22
|
-
import {
|
|
23
|
-
meta
|
|
24
|
-
} from "./chunk-QM34EZQK.mjs";
|
|
25
|
-
|
|
26
|
-
// src/components/CallDebugPanel.tsx
|
|
27
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
28
|
-
import { WebRTCStats } from "@peermetrics/webrtc-stats";
|
|
29
|
-
import React, { useEffect, useMemo, useState } from "react";
|
|
30
|
-
import { truncateKey } from "@dxos/debug";
|
|
31
|
-
import { JsonView, Panel } from "@dxos/devtools";
|
|
32
|
-
import { log } from "@dxos/log";
|
|
33
|
-
import { IconButton, Input, useTranslation } from "@dxos/react-ui";
|
|
34
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-thread/src/components/CallDebugPanel.tsx";
|
|
35
|
-
var CallDebugPanel = ({ state }) => {
|
|
36
|
-
var _effect = _useSignals();
|
|
37
|
-
try {
|
|
38
|
-
const { t } = useTranslation(meta.id);
|
|
39
|
-
const [open, setOpen] = useState(false);
|
|
40
|
-
const handleToggle = () => setOpen(!open);
|
|
41
|
-
const [showServiceHistory, setShowServiceHistory] = useState(false);
|
|
42
|
-
const handleToggleServiceHistory = () => setShowServiceHistory(!showServiceHistory);
|
|
43
|
-
const handleCopyRaw = async () => {
|
|
44
|
-
await navigator.clipboard.writeText(JSON.stringify({
|
|
45
|
-
users: state?.call?.users,
|
|
46
|
-
stats
|
|
47
|
-
}, null, 2));
|
|
48
|
-
};
|
|
49
|
-
const [showDetailedWebRTCStats, setShowDetailedWebRTCStats] = useState(false);
|
|
50
|
-
const handleShowDetailedWebRTCStats = () => setShowDetailedWebRTCStats(!showDetailedWebRTCStats);
|
|
51
|
-
const webrtcStats = useMemo(() => new WebRTCStats({
|
|
52
|
-
getStatsInterval: 1e3
|
|
53
|
-
}), []);
|
|
54
|
-
const [stats, setStats] = useState();
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
const pc = state?.media.peer?.session?.peerConnection;
|
|
57
|
-
const handleStats = (stats2) => {
|
|
58
|
-
setStats(stats2.data);
|
|
59
|
-
};
|
|
60
|
-
let added = false;
|
|
61
|
-
if (pc && showDetailedWebRTCStats) {
|
|
62
|
-
webrtcStats.addConnection({
|
|
63
|
-
pc,
|
|
64
|
-
peerId: 1,
|
|
65
|
-
connectionId: "1"
|
|
66
|
-
});
|
|
67
|
-
webrtcStats.on("stats", handleStats);
|
|
68
|
-
added = true;
|
|
69
|
-
}
|
|
70
|
-
return () => {
|
|
71
|
-
try {
|
|
72
|
-
if (pc && added) {
|
|
73
|
-
webrtcStats.removeConnection({
|
|
74
|
-
pc
|
|
75
|
-
});
|
|
76
|
-
webrtcStats.removeListener("stats", handleStats);
|
|
77
|
-
}
|
|
78
|
-
} catch (error) {
|
|
79
|
-
log.error("error removing webrtc stats", {
|
|
80
|
-
error,
|
|
81
|
-
pc,
|
|
82
|
-
peerId: 1,
|
|
83
|
-
connectionId: "1"
|
|
84
|
-
}, {
|
|
85
|
-
F: __dxlog_file,
|
|
86
|
-
L: 60,
|
|
87
|
-
S: void 0,
|
|
88
|
-
C: (f, a) => f(...a)
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
}, [
|
|
93
|
-
state?.media.peer?.session?.peerConnection,
|
|
94
|
-
showDetailedWebRTCStats
|
|
95
|
-
]);
|
|
96
|
-
const rows = useMemo(() => getCallStatusTable(state), [
|
|
97
|
-
state?.call.users,
|
|
98
|
-
state?.media.pulledAudioTracks
|
|
99
|
-
]);
|
|
100
|
-
return /* @__PURE__ */ React.createElement(Panel, {
|
|
101
|
-
id: "meeting-status",
|
|
102
|
-
icon: "ph--video-conference--regular",
|
|
103
|
-
open,
|
|
104
|
-
onToggle: handleToggle,
|
|
105
|
-
title: t("meeting status title"),
|
|
106
|
-
info: /* @__PURE__ */ React.createElement("div", {
|
|
107
|
-
className: "flex items-center gap-2"
|
|
108
|
-
}, " ", state?.call.joined ? "Active" : "Inactive"),
|
|
109
|
-
maxHeight: 0
|
|
110
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
111
|
-
className: "flex flex-col is-full text-xs"
|
|
112
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
113
|
-
className: "flex items-center gap-2 items-center"
|
|
114
|
-
}, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
115
|
-
checked: showDetailedWebRTCStats,
|
|
116
|
-
onCheckedChange: handleShowDetailedWebRTCStats
|
|
117
|
-
}), /* @__PURE__ */ React.createElement(Input.Label, null, t("show webrtc stats title")))), /* @__PURE__ */ React.createElement("div", {
|
|
118
|
-
className: "flex items-center gap-2 items-center"
|
|
119
|
-
}, /* @__PURE__ */ React.createElement(Input.Root, null, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
120
|
-
checked: showServiceHistory,
|
|
121
|
-
onCheckedChange: handleToggleServiceHistory
|
|
122
|
-
}), /* @__PURE__ */ React.createElement(Input.Label, null, t("show calls history title")))), /* @__PURE__ */ React.createElement("div", {
|
|
123
|
-
className: "flex items-center gap-2 items-center"
|
|
124
|
-
}, /* @__PURE__ */ React.createElement(IconButton, {
|
|
125
|
-
icon: "ph--copy--regular",
|
|
126
|
-
label: "copy raw",
|
|
127
|
-
onClick: handleCopyRaw
|
|
128
|
-
})), /* @__PURE__ */ React.createElement(Table, {
|
|
129
|
-
rows
|
|
130
|
-
}), showDetailedWebRTCStats && /* @__PURE__ */ React.createElement(JsonView, {
|
|
131
|
-
data: {
|
|
132
|
-
stats
|
|
133
|
-
}
|
|
134
|
-
}), showServiceHistory && /* @__PURE__ */ React.createElement(JsonView, {
|
|
135
|
-
data: {
|
|
136
|
-
history: state?.media.peer?.history.get()
|
|
137
|
-
}
|
|
138
|
-
})));
|
|
139
|
-
} finally {
|
|
140
|
-
_effect.f();
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
var getCallStatusTable = (state) => {
|
|
144
|
-
if (!state || !state.call?.users) {
|
|
145
|
-
return [];
|
|
146
|
-
}
|
|
147
|
-
const self = state.call.self;
|
|
148
|
-
const users = state.call.users.filter((user) => user.id !== self.id).map((user) => {
|
|
149
|
-
const isOk = {
|
|
150
|
-
audio: user.tracks?.audio && state.media.pulledAudioTracks[user.tracks?.audio]?.ctx.disposed === false,
|
|
151
|
-
video: user.tracks?.video && state.media.pulledVideoStreams[user.tracks?.video]?.ctx.disposed === false,
|
|
152
|
-
screenshare: user.tracks?.screenshare && state.media.pulledVideoStreams[user.tracks?.screenshare]?.ctx.disposed === false
|
|
153
|
-
};
|
|
154
|
-
return {
|
|
155
|
-
...user,
|
|
156
|
-
isOk
|
|
157
|
-
};
|
|
158
|
-
});
|
|
159
|
-
return [
|
|
160
|
-
[
|
|
161
|
-
"users",
|
|
162
|
-
state.call.users.length ?? 0
|
|
163
|
-
],
|
|
164
|
-
[
|
|
165
|
-
"*self* " + (self?.name ?? truncateKey(self.id, 8)),
|
|
166
|
-
self?.tracks?.audio && state.media.pushedAudioTrack ? "AUD \u2705" : "AUD \u274C",
|
|
167
|
-
self?.tracks?.video && state.media.pushedVideoTrack ? "VID \u2705" : "VID \u274C",
|
|
168
|
-
self?.tracks?.screenshareEnabled ? self.tracks.screenshareEnabled && state.media.pushedScreenshareTrack ? "SCR \u2705" : "SCR \u274C" : void 0
|
|
169
|
-
],
|
|
170
|
-
...users.map((user) => [
|
|
171
|
-
user.name ?? truncateKey(user.id, 8),
|
|
172
|
-
user.isOk.audio ? "AUD \u2705" : "AUD \u274C",
|
|
173
|
-
user.isOk.video ? "VID \u2705" : "VID \u274C",
|
|
174
|
-
user.tracks?.screenshareEnabled ? user.isOk.screenshare ? "SCR \u2705" : "SCR \u274C" : void 0
|
|
175
|
-
]),
|
|
176
|
-
[
|
|
177
|
-
"ICE",
|
|
178
|
-
state.media.peer?.session?.peerConnection.iceConnectionState ?? "no connection"
|
|
179
|
-
]
|
|
180
|
-
];
|
|
181
|
-
};
|
|
182
|
-
(function(Unit2) {
|
|
183
|
-
Unit2.KB = (n) => ((n ?? 0) / 1e3).toFixed(2);
|
|
184
|
-
})(Unit || (Unit = {}));
|
|
185
|
-
var Table = ({ rows }) => {
|
|
186
|
-
var _effect = _useSignals();
|
|
187
|
-
try {
|
|
188
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
189
|
-
className: "is-full text-xs font-mono"
|
|
190
|
-
}, rows.map(([prefix, label, value, unit], i) => /* @__PURE__ */ React.createElement("div", {
|
|
191
|
-
key: i,
|
|
192
|
-
className: "grid grid-cols-[3fr_1fr_1fr_1fr]"
|
|
193
|
-
}, /* @__PURE__ */ React.createElement("div", {
|
|
194
|
-
className: "p-1"
|
|
195
|
-
}, prefix), /* @__PURE__ */ React.createElement("div", {
|
|
196
|
-
className: "p-1"
|
|
197
|
-
}, label), /* @__PURE__ */ React.createElement("div", {
|
|
198
|
-
className: "p-1"
|
|
199
|
-
}, value), /* @__PURE__ */ React.createElement("div", {
|
|
200
|
-
className: "p-1"
|
|
201
|
-
}, unit))));
|
|
202
|
-
} finally {
|
|
203
|
-
_effect.f();
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
var Unit;
|
|
207
|
-
|
|
208
|
-
// src/components/CallSidebar.tsx
|
|
209
|
-
import { useSignals as _useSignals2 } from "@preact-signals/safe-react/tracking";
|
|
210
|
-
import React2 from "react";
|
|
211
|
-
import { useCapability } from "@dxos/app-framework/react";
|
|
212
|
-
var CallSidebar = () => {
|
|
213
|
-
var _effect = _useSignals2();
|
|
214
|
-
try {
|
|
215
|
-
const call = useCapability(ThreadCapabilities.CallManager);
|
|
216
|
-
return /* @__PURE__ */ React2.createElement(ChannelContainer, {
|
|
217
|
-
roomId: call.roomId
|
|
218
|
-
});
|
|
219
|
-
} finally {
|
|
220
|
-
_effect.f();
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
// src/components/ThreadCompanion.tsx
|
|
225
|
-
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
226
|
-
import React6, { useCallback as useCallback2, useMemo as useMemo3 } from "react";
|
|
227
|
-
import { Capabilities, CollaborationActions, LayoutAction, createIntent } from "@dxos/app-framework";
|
|
228
|
-
import { useCapabilities, useCapability as useCapability2, useIntentDispatcher } from "@dxos/app-framework/react";
|
|
229
|
-
import { Filter, Obj as Obj3, Query, Relation as Relation3 } from "@dxos/echo";
|
|
230
|
-
import { Ref as Ref2, getSpace as getSpace2, useQuery } from "@dxos/react-client/echo";
|
|
231
|
-
import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
|
|
232
|
-
import { useTranslation as useTranslation5 } from "@dxos/react-ui";
|
|
233
|
-
import { useAttended } from "@dxos/react-ui-attention";
|
|
234
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
235
|
-
import { Tabs } from "@dxos/react-ui-tabs";
|
|
236
|
-
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
237
|
-
import { AnchoredTo, Thread } from "@dxos/types";
|
|
238
|
-
|
|
239
|
-
// src/components/index.ts
|
|
240
|
-
import { lazy } from "react";
|
|
241
|
-
|
|
242
|
-
// src/components/CommentsContainer.tsx
|
|
243
|
-
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
244
|
-
import React4, { useEffect as useEffect2 } from "react";
|
|
245
|
-
import { Obj as Obj2, Relation as Relation2 } from "@dxos/echo";
|
|
246
|
-
import { Callout, Icon, Trans, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
247
|
-
|
|
248
|
-
// src/components/CommentsThreadContainer.tsx
|
|
249
|
-
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
250
|
-
import React3, { useCallback, useMemo as useMemo2, useRef, useState as useState2 } from "react";
|
|
251
|
-
import { Obj, Ref, Relation } from "@dxos/echo";
|
|
252
|
-
import { getSpace, useMembers } from "@dxos/react-client/echo";
|
|
253
|
-
import { useIdentity } from "@dxos/react-client/halo";
|
|
254
|
-
import { IconButton as IconButton2, Tag, Tooltip, useThemeContext, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
255
|
-
import { createBasicExtensions, createThemeExtensions, listener } from "@dxos/react-ui-editor";
|
|
256
|
-
import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from "@dxos/react-ui-theme";
|
|
257
|
-
import { MessageTextbox, Thread as ThreadComponent } from "@dxos/react-ui-thread";
|
|
258
|
-
import { isNonNullable } from "@dxos/util";
|
|
259
|
-
var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve, onMessageDelete, onThreadDelete, onAcceptProposal }) => {
|
|
260
|
-
var _effect = _useSignals3();
|
|
261
|
-
try {
|
|
262
|
-
const { themeMode } = useThemeContext();
|
|
263
|
-
const { t } = useTranslation2(meta.id);
|
|
264
|
-
const identity = useIdentity();
|
|
265
|
-
const space = getSpace(anchor);
|
|
266
|
-
const members = useMembers(space?.key);
|
|
267
|
-
const detached = !anchor.anchor;
|
|
268
|
-
const thread = Relation.getSource(anchor);
|
|
269
|
-
const activity = useStatus(space, Obj.getDXN(thread).toString());
|
|
270
|
-
const threadScrollRef = useRef(null);
|
|
271
|
-
const textboxMetadata = getMessageMetadata(Obj.getDXN(thread).toString(), identity);
|
|
272
|
-
const [state, setState] = useState2({});
|
|
273
|
-
const messageRef = useRef("");
|
|
274
|
-
const extensions = useMemo2(() => [
|
|
275
|
-
createBasicExtensions({
|
|
276
|
-
placeholder: t("message placeholder")
|
|
277
|
-
}),
|
|
278
|
-
createThemeExtensions({
|
|
279
|
-
themeMode
|
|
280
|
-
}),
|
|
281
|
-
listener({
|
|
282
|
-
onChange: ({ text }) => messageRef.current = text
|
|
283
|
-
}),
|
|
284
|
-
command
|
|
285
|
-
], [
|
|
286
|
-
state
|
|
287
|
-
]);
|
|
288
|
-
const scrollToEnd = (behavior) => setTimeout(() => threadScrollRef.current?.scrollIntoView({
|
|
289
|
-
behavior,
|
|
290
|
-
block: "end"
|
|
291
|
-
}), 10);
|
|
292
|
-
const handleAttend = useCallback(() => onAttend?.(anchor), [
|
|
293
|
-
onAttend,
|
|
294
|
-
anchor
|
|
295
|
-
]);
|
|
296
|
-
const handleResolve = useCallback(() => onResolve?.(anchor), [
|
|
297
|
-
onResolve,
|
|
298
|
-
anchor
|
|
299
|
-
]);
|
|
300
|
-
const handleMessageDelete = useCallback((id) => onMessageDelete?.(anchor, id), [
|
|
301
|
-
onMessageDelete,
|
|
302
|
-
anchor
|
|
303
|
-
]);
|
|
304
|
-
const handleThreadDelete = useCallback(() => onThreadDelete?.(anchor), [
|
|
305
|
-
onThreadDelete,
|
|
306
|
-
anchor
|
|
307
|
-
]);
|
|
308
|
-
const handleAcceptProposal = useCallback((id) => onAcceptProposal?.(anchor, id), [
|
|
309
|
-
onAcceptProposal,
|
|
310
|
-
anchor
|
|
311
|
-
]);
|
|
312
|
-
const handleComment = useCallback(() => {
|
|
313
|
-
if (!messageRef.current) {
|
|
314
|
-
return false;
|
|
315
|
-
}
|
|
316
|
-
onComment?.(anchor, messageRef.current);
|
|
317
|
-
messageRef.current = "";
|
|
318
|
-
scrollToEnd("instant");
|
|
319
|
-
setState({});
|
|
320
|
-
return true;
|
|
321
|
-
}, [
|
|
322
|
-
anchor,
|
|
323
|
-
identity
|
|
324
|
-
]);
|
|
325
|
-
return /* @__PURE__ */ React3.createElement(ThreadComponent.Root, {
|
|
326
|
-
id: Obj.getDXN(thread).toString(),
|
|
327
|
-
classNames: "pbs-2 border-be border-subduedSeparator last:border-none",
|
|
328
|
-
current,
|
|
329
|
-
onClickCapture: handleAttend,
|
|
330
|
-
onFocusCapture: handleAttend
|
|
331
|
-
}, /* @__PURE__ */ React3.createElement("div", {
|
|
332
|
-
role: "none",
|
|
333
|
-
className: mx("col-span-2 grid grid-cols-[var(--rail-size)_1fr_min-content]", hoverableControls, hoverableFocusedWithinControls)
|
|
334
|
-
}, detached ? /* @__PURE__ */ React3.createElement(Tooltip.Trigger, {
|
|
335
|
-
asChild: true,
|
|
336
|
-
content: t("detached thread label"),
|
|
337
|
-
side: "top"
|
|
338
|
-
}, /* @__PURE__ */ React3.createElement(ThreadComponent.Header, {
|
|
339
|
-
detached: true
|
|
340
|
-
}, thread.name)) : /* @__PURE__ */ React3.createElement(ThreadComponent.Header, null, thread.name), /* @__PURE__ */ React3.createElement("div", {
|
|
341
|
-
role: "none",
|
|
342
|
-
className: buttonGroupClassNames
|
|
343
|
-
}, thread.status === "staged" && /* @__PURE__ */ React3.createElement(Tag, {
|
|
344
|
-
palette: "neutral"
|
|
345
|
-
}, t("draft button")), onResolve && !(thread?.status === "staged") && /* @__PURE__ */ React3.createElement(IconButton2, {
|
|
346
|
-
"data-testid": "thread.resolve",
|
|
347
|
-
variant: "ghost",
|
|
348
|
-
icon: thread?.status === "resolved" ? "ph--check--fill" : "ph--check--regular",
|
|
349
|
-
iconOnly: true,
|
|
350
|
-
label: t("resolve thread label"),
|
|
351
|
-
classNames: [
|
|
352
|
-
buttonClassNames,
|
|
353
|
-
thread?.status !== "resolved" && hoverableControlItem
|
|
354
|
-
],
|
|
355
|
-
onClick: handleResolve
|
|
356
|
-
}), onThreadDelete && /* @__PURE__ */ React3.createElement(IconButton2, {
|
|
357
|
-
"data-testid": "thread.delete",
|
|
358
|
-
variant: "ghost",
|
|
359
|
-
icon: "ph--x--regular",
|
|
360
|
-
iconOnly: true,
|
|
361
|
-
label: t("delete thread label"),
|
|
362
|
-
classNames: [
|
|
363
|
-
buttonClassNames,
|
|
364
|
-
hoverableControlItem
|
|
365
|
-
],
|
|
366
|
-
onClick: handleThreadDelete
|
|
367
|
-
}))), Ref.Array.targets(thread.messages?.filter(isNonNullable) ?? []).map((message) => /* @__PURE__ */ React3.createElement(MessageContainer, {
|
|
368
|
-
key: message.id,
|
|
369
|
-
editable: true,
|
|
370
|
-
message,
|
|
371
|
-
members,
|
|
372
|
-
onDelete: handleMessageDelete,
|
|
373
|
-
onAcceptProposal: handleAcceptProposal
|
|
374
|
-
})), /* @__PURE__ */ React3.createElement(MessageTextbox, {
|
|
375
|
-
extensions,
|
|
376
|
-
onSend: handleComment,
|
|
377
|
-
...textboxMetadata
|
|
378
|
-
}), /* @__PURE__ */ React3.createElement(ThreadComponent.Status, {
|
|
379
|
-
activity
|
|
380
|
-
}, t("activity message")), /* @__PURE__ */ React3.createElement("div", {
|
|
381
|
-
role: "none",
|
|
382
|
-
className: "bs-px -mbs-px",
|
|
383
|
-
ref: threadScrollRef
|
|
384
|
-
}));
|
|
385
|
-
} finally {
|
|
386
|
-
_effect.f();
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
// src/components/CommentsContainer.tsx
|
|
391
|
-
var CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...props }) => {
|
|
392
|
-
var _effect = _useSignals4();
|
|
393
|
-
try {
|
|
394
|
-
const { t } = useTranslation3(meta.id);
|
|
395
|
-
const filteredAnchors = showResolvedThreads ? anchors.filter((anchor) => !!Relation2.getSource(anchor)) : anchors.filter((anchor) => {
|
|
396
|
-
const thread = Relation2.getSource(anchor);
|
|
397
|
-
return thread && thread.status !== "resolved";
|
|
398
|
-
});
|
|
399
|
-
useEffect2(() => {
|
|
400
|
-
if (currentId) {
|
|
401
|
-
document.getElementById(currentId)?.scrollIntoView({
|
|
402
|
-
behavior: "smooth",
|
|
403
|
-
block: "end"
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
}, [
|
|
407
|
-
currentId
|
|
408
|
-
]);
|
|
409
|
-
if (filteredAnchors.length === 0) {
|
|
410
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
411
|
-
role: "none",
|
|
412
|
-
className: "plb-cardSpacingBlock pli-cardSpacingInline"
|
|
413
|
-
}, /* @__PURE__ */ React4.createElement(Callout.Root, null, /* @__PURE__ */ React4.createElement(Callout.Title, null, /* @__PURE__ */ React4.createElement(Trans, {
|
|
414
|
-
t,
|
|
415
|
-
i18nKey: "no comments message",
|
|
416
|
-
components: {
|
|
417
|
-
commentIcon: /* @__PURE__ */ React4.createElement(Icon, {
|
|
418
|
-
icon: "ph--chat-text--regular",
|
|
419
|
-
size: 4,
|
|
420
|
-
classNames: "inline-block"
|
|
421
|
-
})
|
|
422
|
-
}
|
|
423
|
-
}))));
|
|
424
|
-
}
|
|
425
|
-
return /* @__PURE__ */ React4.createElement("div", null, filteredAnchors.map((anchor) => {
|
|
426
|
-
const thread = Relation2.getSource(anchor);
|
|
427
|
-
const threadId = Obj2.getDXN(thread).toString();
|
|
428
|
-
return /* @__PURE__ */ React4.createElement(CommentsThreadContainer, {
|
|
429
|
-
key: threadId,
|
|
430
|
-
anchor,
|
|
431
|
-
current: currentId === threadId,
|
|
432
|
-
...props
|
|
433
|
-
});
|
|
434
|
-
}));
|
|
435
|
-
} finally {
|
|
436
|
-
_effect.f();
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
// src/components/ThreadSettings.tsx
|
|
441
|
-
import { useSignals as _useSignals5 } from "@preact-signals/safe-react/tracking";
|
|
442
|
-
import React5 from "react";
|
|
443
|
-
import { useTranslation as useTranslation4 } from "@dxos/react-ui";
|
|
444
|
-
import { ControlPage } from "@dxos/react-ui-form";
|
|
445
|
-
var ThreadSettings = ({ settings: _settings }) => {
|
|
446
|
-
var _effect = _useSignals5();
|
|
447
|
-
try {
|
|
448
|
-
const { t: _t } = useTranslation4(meta.id);
|
|
449
|
-
return /* @__PURE__ */ React5.createElement(ControlPage, null);
|
|
450
|
-
} finally {
|
|
451
|
-
_effect.f();
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
// src/components/index.ts
|
|
456
|
-
var ChannelContainer2 = lazy(() => import("./ChannelContainer-L7MKV7DS.mjs"));
|
|
457
|
-
var ChatContainer = lazy(() => import("./ChatContainer-KPY4BAUE.mjs"));
|
|
458
|
-
|
|
459
|
-
// src/components/ThreadCompanion.tsx
|
|
460
|
-
var ThreadCompanion = ({ subject }) => {
|
|
461
|
-
var _effect = _useSignals6();
|
|
462
|
-
try {
|
|
463
|
-
const { t } = useTranslation5(meta.id);
|
|
464
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
465
|
-
const identity = useIdentity2();
|
|
466
|
-
const subjectId = Obj3.getDXN(subject).toString();
|
|
467
|
-
const { state, getViewState } = useCapability2(ThreadCapabilities.MutableState);
|
|
468
|
-
const drafts = state.drafts[subjectId];
|
|
469
|
-
const viewState = useMemo3(() => getViewState(subjectId), [
|
|
470
|
-
getViewState,
|
|
471
|
-
subjectId
|
|
472
|
-
]);
|
|
473
|
-
const { showResolvedThreads } = viewState;
|
|
474
|
-
const onChangeViewState = useCallback2((nextValue) => {
|
|
475
|
-
viewState.showResolvedThreads = nextValue === "all";
|
|
476
|
-
}, [
|
|
477
|
-
viewState
|
|
478
|
-
]);
|
|
479
|
-
const anchorSorts = useCapabilities(Capabilities.AnchorSort);
|
|
480
|
-
const sort = useMemo3(() => anchorSorts.find(({ key }) => key === Obj3.getTypename(subject))?.sort, [
|
|
481
|
-
anchorSorts,
|
|
482
|
-
subject
|
|
483
|
-
]);
|
|
484
|
-
const space = getSpace2(subject);
|
|
485
|
-
const objectsAnchoredTo = useQuery(space, Query.select(Filter.ids(subject.id)).targetOf(AnchoredTo.AnchoredTo));
|
|
486
|
-
const anchors = objectsAnchoredTo.toSorted((a, b) => sort?.(a, b) ?? 0).filter((anchor) => Obj3.instanceOf(Thread.Thread, Relation3.getSource(anchor))).concat(drafts ?? []);
|
|
487
|
-
const attended = useAttended();
|
|
488
|
-
const handleAttend = useCallback2((anchor) => {
|
|
489
|
-
const thread = Relation3.getSource(anchor);
|
|
490
|
-
const threadId = Obj3.getDXN(thread).toString();
|
|
491
|
-
if (state.current !== threadId) {
|
|
492
|
-
state.current = threadId;
|
|
493
|
-
void dispatch(createIntent(LayoutAction.ScrollIntoView, {
|
|
494
|
-
part: "current",
|
|
495
|
-
subject: Obj3.getDXN(subject).toString(),
|
|
496
|
-
options: {
|
|
497
|
-
cursor: anchor.anchor,
|
|
498
|
-
ref: threadId
|
|
499
|
-
}
|
|
500
|
-
}));
|
|
501
|
-
}
|
|
502
|
-
}, [
|
|
503
|
-
state.current,
|
|
504
|
-
dispatch,
|
|
505
|
-
subject
|
|
506
|
-
]);
|
|
507
|
-
const handleComment = useCallback2(async (anchor, text) => {
|
|
508
|
-
await dispatch(createIntent(ThreadAction.AddMessage, {
|
|
509
|
-
anchor,
|
|
510
|
-
subject,
|
|
511
|
-
sender: {
|
|
512
|
-
identityDid: identity?.did
|
|
513
|
-
},
|
|
514
|
-
text
|
|
515
|
-
}));
|
|
516
|
-
const thread = Relation3.getSource(anchor);
|
|
517
|
-
state.current = Obj3.getDXN(thread).toString();
|
|
518
|
-
}, [
|
|
519
|
-
dispatch,
|
|
520
|
-
identity,
|
|
521
|
-
subject
|
|
522
|
-
]);
|
|
523
|
-
const handleResolve = useCallback2((anchor) => dispatch(createIntent(ThreadAction.ToggleResolved, {
|
|
524
|
-
thread: Relation3.getSource(anchor)
|
|
525
|
-
})), [
|
|
526
|
-
dispatch
|
|
527
|
-
]);
|
|
528
|
-
const handleThreadDelete = useCallback2((anchor) => dispatch(createIntent(ThreadAction.Delete, {
|
|
529
|
-
anchor,
|
|
530
|
-
subject
|
|
531
|
-
})), [
|
|
532
|
-
dispatch,
|
|
533
|
-
subject
|
|
534
|
-
]);
|
|
535
|
-
const handleMessageDelete = useCallback2((anchor, messageId) => dispatch(createIntent(ThreadAction.DeleteMessage, {
|
|
536
|
-
anchor,
|
|
537
|
-
subject,
|
|
538
|
-
messageId
|
|
539
|
-
})), [
|
|
540
|
-
dispatch,
|
|
541
|
-
subject
|
|
542
|
-
]);
|
|
543
|
-
const handleAcceptProposal = useCallback2(async (anchor, messageId) => {
|
|
544
|
-
const thread = Relation3.getSource(anchor);
|
|
545
|
-
const messageIndex = thread.messages.findIndex(Ref2.hasObjectId(messageId));
|
|
546
|
-
const message = thread.messages[messageIndex]?.target;
|
|
547
|
-
const proposal = message?.blocks.find((block) => block._tag === "proposal");
|
|
548
|
-
if (!proposal || !anchor.anchor) {
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
await dispatch(createIntent(CollaborationActions.AcceptProposal, {
|
|
552
|
-
subject,
|
|
553
|
-
anchor: anchor.anchor,
|
|
554
|
-
proposal
|
|
555
|
-
}));
|
|
556
|
-
await dispatch(createIntent(ThreadAction.ToggleResolved, {
|
|
557
|
-
thread
|
|
558
|
-
}));
|
|
559
|
-
}, [
|
|
560
|
-
dispatch,
|
|
561
|
-
subject
|
|
562
|
-
]);
|
|
563
|
-
const comments = /* @__PURE__ */ React6.createElement(CommentsContainer, {
|
|
564
|
-
anchors,
|
|
565
|
-
currentId: attended.includes(subjectId) ? state.current : void 0,
|
|
566
|
-
showResolvedThreads,
|
|
567
|
-
onAttend: handleAttend,
|
|
568
|
-
onComment: handleComment,
|
|
569
|
-
onResolve: handleResolve,
|
|
570
|
-
onMessageDelete: handleMessageDelete,
|
|
571
|
-
onThreadDelete: handleThreadDelete,
|
|
572
|
-
onAcceptProposal: handleAcceptProposal
|
|
573
|
-
});
|
|
574
|
-
return /* @__PURE__ */ React6.createElement(StackItem.Content, {
|
|
575
|
-
toolbar: true
|
|
576
|
-
}, /* @__PURE__ */ React6.createElement(Tabs.Root, {
|
|
577
|
-
value: showResolvedThreads ? "all" : "unresolved",
|
|
578
|
-
orientation: "horizontal",
|
|
579
|
-
classNames: [
|
|
580
|
-
'contents [&_[role="tabpanel"]]:min-bs-0 [&_[role="tabpanel"]]:overflow-y-auto [&_[role="tabpanel"]]:scrollbar-thin'
|
|
581
|
-
],
|
|
582
|
-
onValueChange: onChangeViewState
|
|
583
|
-
}, /* @__PURE__ */ React6.createElement(Tabs.Tablist, {
|
|
584
|
-
classNames: mx2("bg-toolbarSurface border-be border-subduedSeparator")
|
|
585
|
-
}, /* @__PURE__ */ React6.createElement(Tabs.Tab, {
|
|
586
|
-
value: "unresolved",
|
|
587
|
-
classNames: "text-sm"
|
|
588
|
-
}, t("show unresolved label")), /* @__PURE__ */ React6.createElement(Tabs.Tab, {
|
|
589
|
-
value: "all",
|
|
590
|
-
classNames: "text-sm"
|
|
591
|
-
}, t("show all label"))), /* @__PURE__ */ React6.createElement("div", {
|
|
592
|
-
className: "overflow-y-auto"
|
|
593
|
-
}, /* @__PURE__ */ React6.createElement(Tabs.Tabpanel, {
|
|
594
|
-
value: "all"
|
|
595
|
-
}, showResolvedThreads && comments), /* @__PURE__ */ React6.createElement(Tabs.Tabpanel, {
|
|
596
|
-
value: "unresolved"
|
|
597
|
-
}, !showResolvedThreads && comments))));
|
|
598
|
-
} finally {
|
|
599
|
-
_effect.f();
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
|
|
603
|
-
export {
|
|
604
|
-
CallDebugPanel,
|
|
605
|
-
CallSidebar,
|
|
606
|
-
ThreadCompanion,
|
|
607
|
-
ThreadSettings,
|
|
608
|
-
ChannelContainer2 as ChannelContainer,
|
|
609
|
-
ChatContainer
|
|
610
|
-
};
|
|
611
|
-
//# sourceMappingURL=chunk-NPT5S6N4.mjs.map
|