@dxos/plugin-thread 0.8.4-main.ae835ea → 0.8.4-main.bc674ce
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-HDEQRBOC.mjs → chunk-DLO2G3DM.mjs} +79 -76
- package/dist/lib/browser/chunk-DLO2G3DM.mjs.map +7 -0
- package/dist/lib/browser/{chunk-US5ZQYC3.mjs → chunk-ERK254BS.mjs} +78 -61
- package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-XYUJXHYV.mjs → chunk-ISCHODBV.mjs} +1 -1
- package/dist/lib/browser/{chunk-XYUJXHYV.mjs.map → chunk-ISCHODBV.mjs.map} +2 -2
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs +1815 -0
- package/dist/lib/browser/chunk-YSHXWAL3.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZFLSTQSE.mjs +106 -0
- package/dist/lib/browser/chunk-ZFLSTQSE.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +121 -114
- 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-IC576W2W.mjs → react-surface-DMBHQOXJ.mjs} +43 -42
- package/dist/lib/browser/react-surface-DMBHQOXJ.mjs.map +7 -0
- package/dist/lib/browser/repair-6OZ75AUU.mjs +38 -0
- 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 +7 -7
- 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/chunk-AQHPP6ZX.mjs +107 -0
- package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/{chunk-2MMJF7DW.mjs → chunk-KRBZBJRI.mjs} +79 -76
- package/dist/lib/node-esm/chunk-KRBZBJRI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-KGYDYYKJ.mjs → chunk-QP3KQOPQ.mjs} +78 -61
- package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs → chunk-VBI32FGI.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs.map → chunk-VBI32FGI.mjs.map} +2 -2
- 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 +121 -114
- 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-O4LGTAZ3.mjs → react-surface-ELDSTUA3.mjs} +43 -42
- package/dist/lib/node-esm/react-surface-ELDSTUA3.mjs.map +7 -0
- package/dist/lib/node-esm/repair-6777EPOM.mjs +39 -0
- 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 +7 -7
- 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 -16
- 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/CallDebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.d.ts +4 -5
- package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChannelContainer.stories.d.ts +6 -2
- package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/Chat.stories.d.ts +5 -1
- package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
- package/dist/types/src/components/ChatContainer.d.ts +2 -2
- package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
- package/dist/types/src/components/Comments.stories.d.ts +5 -1
- 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/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 +4 -3
- 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/ResponsiveGrid/ResponsiveContainer.stories.d.ts +5 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +5 -1
- 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 +4 -2
- 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 +1 -1
- package/dist/types/src/components/testing.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 +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 -3
- package/dist/types/src/hooks/analytics.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/stories.d.ts +2 -1
- package/dist/types/src/testing/stories.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +5 -1
- package/dist/types/src/translations.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 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +3216 -430
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +86 -65
- package/src/ThreadPlugin.tsx +56 -88
- 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 +10 -7
- package/src/calls/util/calls-service.ts +1 -1
- package/src/calls/util/stub-media-streams.ts +2 -2
- package/src/calls/util/task-scheduling.ts +4 -4
- package/src/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 -13
- 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/repair.ts +51 -0
- 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 +8 -4
- package/src/components/Call/Toolbar.tsx +31 -23
- package/src/components/CallDebugPanel.tsx +12 -14
- package/src/components/CallSidebar.tsx +5 -3
- package/src/components/ChannelContainer.stories.tsx +12 -10
- package/src/components/ChannelContainer.tsx +22 -19
- package/src/components/Chat.stories.tsx +9 -9
- package/src/components/ChatContainer.tsx +22 -21
- package/src/components/Comments.stories.tsx +25 -23
- package/src/components/CommentsContainer.tsx +4 -6
- package/src/components/CommentsThreadContainer.tsx +21 -22
- package/src/components/Lobby/Lobby.tsx +9 -7
- package/src/components/Media/AudioStream.tsx +2 -2
- package/src/components/Media/VideoObject.tsx +2 -2
- package/src/components/MessageContainer.tsx +59 -28
- package/src/components/Participant/Participant.tsx +32 -19
- package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +3 -3
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +1 -1
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +6 -6
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +6 -3
- package/src/components/{ThreadComplementary.tsx → ThreadCompanion.tsx} +79 -67
- package/src/components/ThreadSettings.tsx +6 -1
- package/src/components/command-extension.ts +2 -2
- package/src/components/index.ts +4 -7
- package/src/components/testing.ts +3 -5
- package/src/extensions/threads.ts +82 -38
- package/src/functions/create-proposals.ts +57 -0
- package/src/functions/index.ts +5 -0
- package/src/hooks/analytics.ts +21 -21
- package/src/hooks/index.ts +3 -2
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/testing/stories.ts +15 -11
- package/src/translations.ts +3 -1
- package/src/types/Channel.ts +13 -10
- package/src/types/capabilities.ts +34 -0
- package/src/types/index.ts +1 -1
- package/src/types/types.ts +163 -85
- package/dist/lib/browser/ChannelContainer-SVV4ZX5T.mjs +0 -16
- package/dist/lib/browser/ChatContainer-ALFWQ65B.mjs +0 -15
- package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs +0 -171
- package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs.map +0 -7
- package/dist/lib/browser/call-manager-P3MYR2JS.mjs +0 -24
- package/dist/lib/browser/call-manager-P3MYR2JS.mjs.map +0 -7
- package/dist/lib/browser/chunk-6CUDBEYP.mjs +0 -377
- package/dist/lib/browser/chunk-6CUDBEYP.mjs.map +0 -7
- package/dist/lib/browser/chunk-BBTXGRIR.mjs +0 -18
- package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +0 -7
- package/dist/lib/browser/chunk-DJOUMWEL.mjs +0 -988
- package/dist/lib/browser/chunk-DJOUMWEL.mjs.map +0 -7
- package/dist/lib/browser/chunk-HDEQRBOC.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQSXEHOW.mjs +0 -618
- package/dist/lib/browser/chunk-IQSXEHOW.mjs.map +0 -7
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs +0 -27
- package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-L6F2AG6W.mjs +0 -23
- package/dist/lib/browser/chunk-L6F2AG6W.mjs.map +0 -7
- package/dist/lib/browser/chunk-US5ZQYC3.mjs.map +0 -7
- package/dist/lib/browser/chunk-UTSLSZED.mjs +0 -178
- package/dist/lib/browser/chunk-UTSLSZED.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-5POQTZ24.mjs +0 -419
- package/dist/lib/browser/intent-resolver-5POQTZ24.mjs.map +0 -7
- package/dist/lib/browser/markdown-L7LDNF56.mjs +0 -169
- package/dist/lib/browser/markdown-L7LDNF56.mjs.map +0 -7
- package/dist/lib/browser/react-root-RCJLK4EP.mjs +0 -28
- package/dist/lib/browser/react-root-RCJLK4EP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IC576W2W.mjs.map +0 -7
- package/dist/lib/browser/settings-5FYGBOGI.mjs +0 -22
- package/dist/lib/browser/settings-5FYGBOGI.mjs.map +0 -7
- package/dist/lib/browser/state-36REWXO5.mjs +0 -34
- package/dist/lib/browser/state-36REWXO5.mjs.map +0 -7
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs +0 -74
- package/dist/lib/browser/toolkit-PXASLYEQ.mjs.map +0 -7
- package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs +0 -17
- package/dist/lib/node-esm/ChatContainer-MFKPXMIK.mjs +0 -16
- package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs +0 -172
- package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs.map +0 -7
- package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs +0 -25
- package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs +0 -25
- package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs +0 -378
- package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs +0 -619
- package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QCQAAU6J.mjs +0 -989
- package/dist/lib/node-esm/chunk-QCQAAU6J.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs +0 -179
- package/dist/lib/node-esm/chunk-TYLLHI46.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs +0 -28
- package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +0 -19
- package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs +0 -420
- package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs.map +0 -7
- package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs +0 -170
- package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs.map +0 -7
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs +0 -29
- package/dist/lib/node-esm/react-root-4IDB2SN2.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs.map +0 -7
- package/dist/lib/node-esm/settings-EOBQUZSW.mjs +0 -23
- package/dist/lib/node-esm/settings-EOBQUZSW.mjs.map +0 -7
- package/dist/lib/node-esm/state-X3W67GTL.mjs +0 -35
- package/dist/lib/node-esm/state-X3W67GTL.mjs.map +0 -7
- package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs +0 -75
- package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs.map +0 -7
- package/dist/types/src/capabilities/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/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/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/dist/types/src/capabilities/toolkit.d.ts +0 -24
- package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
- package/dist/types/src/components/ThreadComplementary.d.ts +0 -5
- package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
- package/dist/types/src/types/Thread.d.ts +0 -167
- package/dist/types/src/types/Thread.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -186
- package/src/capabilities/call-manager.ts +0 -20
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -344
- package/src/capabilities/markdown.ts +0 -69
- package/src/capabilities/react-root.tsx +0 -17
- package/src/capabilities/react-surface.tsx +0 -89
- package/src/capabilities/settings.ts +0 -19
- package/src/capabilities/state.ts +0 -26
- package/src/capabilities/toolkit.ts +0 -85
- package/src/types/Thread.ts +0 -26
- /package/dist/lib/browser/{ChannelContainer-SVV4ZX5T.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/browser/{ChatContainer-ALFWQ65B.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChannelContainer-63GMQ753.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{ChatContainer-MFKPXMIK.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
package/src/meta.ts
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
// TODO(wittjosiah): Needs screenshots.
|
|
9
|
-
export const meta:
|
|
9
|
+
export const meta: Plugin.Meta = {
|
|
10
10
|
id: 'dxos.org/plugin/thread',
|
|
11
11
|
name: 'Chat',
|
|
12
12
|
description: trim`
|
package/src/testing/stories.ts
CHANGED
|
@@ -2,27 +2,31 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { OperationPlugin, type Plugin, SettingsPlugin } from '@dxos/app-framework';
|
|
6
8
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
7
9
|
import { GraphPlugin } from '@dxos/plugin-graph';
|
|
8
10
|
import { SpacePlugin } from '@dxos/plugin-space';
|
|
9
11
|
import { ThemePlugin } from '@dxos/plugin-theme';
|
|
10
12
|
import { Config } from '@dxos/react-client';
|
|
11
|
-
import { defaultTx } from '@dxos/
|
|
13
|
+
import { defaultTx } from '@dxos/ui-theme';
|
|
12
14
|
|
|
13
15
|
import { ThreadPlugin } from '../ThreadPlugin';
|
|
14
16
|
import { Channel } from '../types';
|
|
15
17
|
|
|
16
|
-
export const createThreadPlugins = async () => [
|
|
18
|
+
export const createThreadPlugins = async (): Promise<Array<Plugin.Plugin>> => [
|
|
17
19
|
ThemePlugin({ tx: defaultTx }),
|
|
18
20
|
ClientPlugin({
|
|
19
|
-
onClientInitialized:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
onClientInitialized: ({ client }) =>
|
|
22
|
+
Effect.gen(function* () {
|
|
23
|
+
yield* Effect.promise(() => client.halo.createIdentity({ displayName: 'Test User' }));
|
|
24
|
+
}),
|
|
25
|
+
onSpacesReady: ({ client }) =>
|
|
26
|
+
Effect.gen(function* () {
|
|
27
|
+
yield* Effect.promise(() => client.spaces.default.waitUntilReady());
|
|
28
|
+
client.spaces.default.db.add(Channel.make());
|
|
29
|
+
}),
|
|
26
30
|
config: new Config({
|
|
27
31
|
runtime: {
|
|
28
32
|
client: {
|
|
@@ -44,7 +48,7 @@ export const createThreadPlugins = async () => [
|
|
|
44
48
|
}),
|
|
45
49
|
}),
|
|
46
50
|
SpacePlugin({}),
|
|
47
|
-
|
|
51
|
+
OperationPlugin(),
|
|
48
52
|
SettingsPlugin(),
|
|
49
53
|
GraphPlugin(),
|
|
50
54
|
ThreadPlugin(),
|
package/src/translations.ts
CHANGED
|
@@ -19,6 +19,7 @@ export const translations = [
|
|
|
19
19
|
'object name placeholder': 'New channel',
|
|
20
20
|
'rename object label': 'Rename channel',
|
|
21
21
|
'delete object label': 'Delete channel',
|
|
22
|
+
'object deleted label': 'Channel deleted',
|
|
22
23
|
},
|
|
23
24
|
[meta.id]: {
|
|
24
25
|
'plugin name': 'Chat',
|
|
@@ -50,6 +51,7 @@ export const translations = [
|
|
|
50
51
|
'comments label': 'Comments',
|
|
51
52
|
'show all label': 'All comments',
|
|
52
53
|
'show unresolved label': 'Unresolved comments',
|
|
54
|
+
'add comment label': 'Add comment',
|
|
53
55
|
|
|
54
56
|
'channel companion label': 'Channel',
|
|
55
57
|
'call panel label': 'Active Call',
|
|
@@ -60,7 +62,7 @@ export const translations = [
|
|
|
60
62
|
'set display name label': 'Continue',
|
|
61
63
|
|
|
62
64
|
'call tab label': 'Call',
|
|
63
|
-
'meeting status title': '
|
|
65
|
+
'meeting status title': 'Calls',
|
|
64
66
|
'share meeting link label': 'Share meeting',
|
|
65
67
|
'show webrtc stats title': 'WebRTC Stats',
|
|
66
68
|
'show calls history title': 'Service History',
|
package/src/types/Channel.ts
CHANGED
|
@@ -5,19 +5,22 @@
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
7
|
import { Obj, Ref, Type } from '@dxos/echo';
|
|
8
|
-
import {
|
|
8
|
+
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
9
|
+
import { Thread } from '@dxos/types';
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const _Channel = Schema.Struct({
|
|
11
|
+
export const Channel = Schema.Struct({
|
|
13
12
|
name: Schema.optional(Schema.String),
|
|
14
|
-
defaultThread: Type.Ref(Thread.Thread).pipe(
|
|
13
|
+
defaultThread: Type.Ref(Thread.Thread).pipe(FormInputAnnotation.set(false)),
|
|
15
14
|
// TODO(wittjosiah): Should be an "ordered collection".
|
|
16
|
-
threads: Type.Ref(Thread.Thread).pipe(Schema.Array,
|
|
17
|
-
}).pipe(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
threads: Type.Ref(Thread.Thread).pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
16
|
+
}).pipe(
|
|
17
|
+
Type.object({
|
|
18
|
+
typename: 'dxos.org/type/Channel',
|
|
19
|
+
version: '0.1.0',
|
|
20
|
+
}),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export interface Channel extends Schema.Schema.Type<typeof Channel> {}
|
|
21
24
|
|
|
22
25
|
export const make = (props: Pick<Obj.MakeProps<typeof Channel>, 'name'> = {}) =>
|
|
23
26
|
Obj.make(Channel, {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { type CallManager, type CallState, type MediaState } from '../calls';
|
|
10
|
+
import { meta } from '../meta';
|
|
11
|
+
import { type Channel, type ThreadSettingsProps, type ThreadState, type ViewStore } from '../types';
|
|
12
|
+
|
|
13
|
+
export namespace ThreadCapabilities {
|
|
14
|
+
export const Settings = Capability.make<Atom.Writable<ThreadSettingsProps>>(`${meta.id}/capability/settings`);
|
|
15
|
+
export const CallManager = Capability.make<CallManager>(`${meta.id}/capability/call-manager`);
|
|
16
|
+
|
|
17
|
+
// TODO(burdon): Better way to define specific extensions for meeting companions.
|
|
18
|
+
// TODO(burdon): This brings in deps from ../calls; how should we manage/minimize explicit type exposure to other plugins?
|
|
19
|
+
// TODO(wittjosiah): These callbacks could be intents once we support broadcast.
|
|
20
|
+
export type CallProperties = {
|
|
21
|
+
onJoin: (state: { channel?: Channel.Channel; roomId?: string }) => Promise<void>;
|
|
22
|
+
onLeave: (roomId?: string) => Promise<void>;
|
|
23
|
+
onCallStateUpdated: (callState: CallState) => Promise<void>;
|
|
24
|
+
onMediaStateUpdated: ([mediaState, isSpeaking]: [MediaState, boolean]) => Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const CallExtension = Capability.make<CallProperties>(`${meta.id}/capability/call-extension`);
|
|
28
|
+
|
|
29
|
+
/** Thread state (drafts, toolbar state, current selection). */
|
|
30
|
+
export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}/capability/state`);
|
|
31
|
+
|
|
32
|
+
/** Per-subject view state (e.g., showResolvedThreads). */
|
|
33
|
+
export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}/capability/view-state`);
|
|
34
|
+
}
|
package/src/types/index.ts
CHANGED
package/src/types/types.ts
CHANGED
|
@@ -4,37 +4,55 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from 'effect/Schema';
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { Key, Type } from '@dxos/echo';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
11
|
+
import { Collection } from '@dxos/schema';
|
|
12
|
+
import { Actor, AnchoredTo, Message, Thread } from '@dxos/types';
|
|
10
13
|
|
|
11
14
|
import { meta } from '../meta';
|
|
12
15
|
|
|
13
16
|
import * as Channel from './Channel';
|
|
14
|
-
import * as Thread from './Thread';
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const THREAD_OPERATION = `${meta.id}/operation`;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Operations for the Thread plugin.
|
|
22
|
+
* Note: Complex ECHO types are typed as Schema.Any to avoid serialization issues.
|
|
23
|
+
*/
|
|
24
|
+
export namespace ThreadOperation {
|
|
25
|
+
export const OnCreateSpace = Operation.make({
|
|
26
|
+
meta: { key: `${THREAD_OPERATION}/on-create-space`, name: 'On Create Space' },
|
|
27
|
+
services: [Capability.Service],
|
|
28
|
+
schema: {
|
|
29
|
+
input: Schema.Struct({
|
|
30
|
+
space: SpaceSchema,
|
|
31
|
+
rootCollection: Collection.Collection,
|
|
32
|
+
isDefault: Schema.Boolean.pipe(Schema.optional),
|
|
33
|
+
}),
|
|
34
|
+
output: Schema.Void,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
24
37
|
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
export const CreateChannel = Operation.make({
|
|
39
|
+
meta: { key: `${THREAD_OPERATION}/create-channel`, name: 'Create Channel' },
|
|
40
|
+
services: [Capability.Service],
|
|
41
|
+
schema: {
|
|
42
|
+
input: Schema.Struct({
|
|
43
|
+
spaceId: Key.SpaceId,
|
|
44
|
+
name: Schema.optional(Schema.String),
|
|
45
|
+
}),
|
|
46
|
+
output: Schema.Struct({
|
|
47
|
+
object: Channel.Channel,
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
});
|
|
34
51
|
|
|
35
|
-
export
|
|
36
|
-
`${
|
|
37
|
-
|
|
52
|
+
export const CreateChannelThread = Operation.make({
|
|
53
|
+
meta: { key: `${THREAD_OPERATION}/create-channel-thread`, name: 'Create Channel Thread' },
|
|
54
|
+
services: [Capability.Service],
|
|
55
|
+
schema: {
|
|
38
56
|
input: Schema.Struct({
|
|
39
57
|
channel: Channel.Channel,
|
|
40
58
|
}),
|
|
@@ -42,70 +60,129 @@ export namespace ThreadAction {
|
|
|
42
60
|
object: Thread.Thread,
|
|
43
61
|
}),
|
|
44
62
|
},
|
|
45
|
-
)
|
|
63
|
+
});
|
|
46
64
|
|
|
47
|
-
export
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
subject: EchoObjectSchema,
|
|
60
|
-
thread: Schema.optional(Thread.Thread),
|
|
61
|
-
}),
|
|
62
|
-
output: Schema.Void,
|
|
63
|
-
}) {}
|
|
65
|
+
export const Create = Operation.make({
|
|
66
|
+
meta: { key: `${THREAD_OPERATION}/create`, name: 'Create Thread' },
|
|
67
|
+
services: [Capability.Service],
|
|
68
|
+
schema: {
|
|
69
|
+
input: Schema.Struct({
|
|
70
|
+
name: Schema.optional(Schema.String),
|
|
71
|
+
anchor: Schema.optional(Schema.String),
|
|
72
|
+
subject: Type.Obj,
|
|
73
|
+
}),
|
|
74
|
+
output: Schema.Void,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
64
77
|
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
output: Schema.Void,
|
|
70
|
-
}) {}
|
|
78
|
+
export const DeleteOutput = Schema.Struct({
|
|
79
|
+
thread: Thread.Thread.annotations({ description: 'The deleted thread.' }),
|
|
80
|
+
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The deleted anchor.' }),
|
|
81
|
+
}).pipe(Schema.partial);
|
|
71
82
|
|
|
72
|
-
export
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
83
|
+
export type DeleteOutput = Schema.Schema.Type<typeof DeleteOutput>;
|
|
84
|
+
|
|
85
|
+
export const Delete = Operation.make({
|
|
86
|
+
meta: { key: `${THREAD_OPERATION}/delete`, name: 'Delete Thread' },
|
|
87
|
+
services: [Capability.Service],
|
|
88
|
+
schema: {
|
|
89
|
+
input: Schema.Struct({
|
|
90
|
+
anchor: AnchoredTo.AnchoredTo,
|
|
91
|
+
subject: Type.Obj,
|
|
92
|
+
thread: Schema.optional(Thread.Thread),
|
|
93
|
+
}),
|
|
94
|
+
output: DeleteOutput,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export const Select = Operation.make({
|
|
99
|
+
meta: { key: `${THREAD_OPERATION}/select`, name: 'Select Thread' },
|
|
100
|
+
services: [Capability.Service],
|
|
101
|
+
schema: {
|
|
102
|
+
input: Schema.Struct({
|
|
103
|
+
current: Schema.String,
|
|
104
|
+
}),
|
|
105
|
+
output: Schema.Void,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export const ToggleResolved = Operation.make({
|
|
110
|
+
meta: { key: `${THREAD_OPERATION}/toggle-resolved`, name: 'Toggle Resolved' },
|
|
111
|
+
services: [Capability.Service],
|
|
112
|
+
schema: {
|
|
113
|
+
input: Schema.Struct({
|
|
114
|
+
thread: Thread.Thread,
|
|
115
|
+
}),
|
|
116
|
+
output: Schema.Void,
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export const AddMessage = Operation.make({
|
|
121
|
+
meta: { key: `${THREAD_OPERATION}/add-message`, name: 'Add Message' },
|
|
122
|
+
services: [Capability.Service],
|
|
123
|
+
schema: {
|
|
124
|
+
input: Schema.Struct({
|
|
125
|
+
subject: Type.Obj,
|
|
126
|
+
anchor: AnchoredTo.AnchoredTo,
|
|
127
|
+
sender: Actor.Actor,
|
|
128
|
+
text: Schema.String,
|
|
129
|
+
}),
|
|
130
|
+
output: Schema.Void,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export const DeleteMessageOutput = Schema.partial(
|
|
135
|
+
Schema.Struct({
|
|
136
|
+
message: Message.Message.annotations({ description: 'The deleted message.' }),
|
|
137
|
+
messageIndex: Schema.Number.annotations({ description: 'The index the message was at.' }),
|
|
106
138
|
}),
|
|
107
|
-
|
|
108
|
-
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
export type DeleteMessageOutput = Schema.Schema.Type<typeof DeleteMessageOutput>;
|
|
142
|
+
|
|
143
|
+
export const DeleteMessage = Operation.make({
|
|
144
|
+
meta: { key: `${THREAD_OPERATION}/delete-message`, name: 'Delete Message' },
|
|
145
|
+
services: [Capability.Service],
|
|
146
|
+
schema: {
|
|
147
|
+
input: Schema.Struct({
|
|
148
|
+
anchor: AnchoredTo.AnchoredTo,
|
|
149
|
+
subject: Type.Obj,
|
|
150
|
+
messageId: Schema.String,
|
|
151
|
+
}),
|
|
152
|
+
output: DeleteMessageOutput,
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Restore a deleted thread (inverse of Delete).
|
|
158
|
+
*/
|
|
159
|
+
export const Restore = Operation.make({
|
|
160
|
+
meta: { key: `${THREAD_OPERATION}/restore`, name: 'Restore Thread' },
|
|
161
|
+
services: [Capability.Service],
|
|
162
|
+
schema: {
|
|
163
|
+
input: Schema.Struct({
|
|
164
|
+
thread: Thread.Thread.annotations({ description: 'The thread to restore.' }),
|
|
165
|
+
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor relation to restore.' }),
|
|
166
|
+
}),
|
|
167
|
+
output: Schema.Void,
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Restore a deleted message (inverse of DeleteMessage).
|
|
173
|
+
*/
|
|
174
|
+
export const RestoreMessage = Operation.make({
|
|
175
|
+
meta: { key: `${THREAD_OPERATION}/restore-message`, name: 'Restore Message' },
|
|
176
|
+
services: [Capability.Service],
|
|
177
|
+
schema: {
|
|
178
|
+
input: Schema.Struct({
|
|
179
|
+
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor of the thread.' }),
|
|
180
|
+
message: Message.Message.annotations({ description: 'The message to restore.' }),
|
|
181
|
+
messageIndex: Schema.Number.annotations({ description: 'The index to restore the message at.' }),
|
|
182
|
+
}),
|
|
183
|
+
output: Schema.Void,
|
|
184
|
+
},
|
|
185
|
+
});
|
|
109
186
|
}
|
|
110
187
|
|
|
111
188
|
export const ThreadSettingsSchema = Schema.mutable(Schema.Struct({}));
|
|
@@ -123,6 +200,7 @@ export type ThreadState = {
|
|
|
123
200
|
/** Object toolbar state. */
|
|
124
201
|
toolbar: Record<string, boolean>;
|
|
125
202
|
/** In-memory draft threads. */
|
|
126
|
-
|
|
203
|
+
// TODO(burdon): Drafts are getting lost.
|
|
204
|
+
drafts: Record<string, AnchoredTo.AnchoredTo[]>;
|
|
127
205
|
current?: string | undefined;
|
|
128
206
|
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChannelContainer,
|
|
3
|
-
ChannelContainer_default
|
|
4
|
-
} from "./chunk-DJOUMWEL.mjs";
|
|
5
|
-
import "./chunk-L6F2AG6W.mjs";
|
|
6
|
-
import "./chunk-BBTXGRIR.mjs";
|
|
7
|
-
import "./chunk-6CUDBEYP.mjs";
|
|
8
|
-
import "./chunk-HDEQRBOC.mjs";
|
|
9
|
-
import "./chunk-CP7E2HRE.mjs";
|
|
10
|
-
import "./chunk-XYUJXHYV.mjs";
|
|
11
|
-
import "./chunk-K2DUJRFJ.mjs";
|
|
12
|
-
export {
|
|
13
|
-
ChannelContainer,
|
|
14
|
-
ChannelContainer_default as default
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=ChannelContainer-SVV4ZX5T.mjs.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChatContainer,
|
|
3
|
-
ChatContainer_default,
|
|
4
|
-
ChatHeading
|
|
5
|
-
} from "./chunk-6CUDBEYP.mjs";
|
|
6
|
-
import "./chunk-HDEQRBOC.mjs";
|
|
7
|
-
import "./chunk-CP7E2HRE.mjs";
|
|
8
|
-
import "./chunk-XYUJXHYV.mjs";
|
|
9
|
-
import "./chunk-K2DUJRFJ.mjs";
|
|
10
|
-
export {
|
|
11
|
-
ChatContainer,
|
|
12
|
-
ChatHeading,
|
|
13
|
-
ChatContainer_default as default
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=ChatContainer-ALFWQ65B.mjs.map
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Channel_exports,
|
|
3
|
-
ThreadAction
|
|
4
|
-
} from "./chunk-UTSLSZED.mjs";
|
|
5
|
-
import {
|
|
6
|
-
ThreadCapabilities
|
|
7
|
-
} from "./chunk-BBTXGRIR.mjs";
|
|
8
|
-
import {
|
|
9
|
-
getAnchor
|
|
10
|
-
} from "./chunk-CP7E2HRE.mjs";
|
|
11
|
-
import {
|
|
12
|
-
meta
|
|
13
|
-
} from "./chunk-K2DUJRFJ.mjs";
|
|
14
|
-
|
|
15
|
-
// src/capabilities/app-graph-builder.ts
|
|
16
|
-
import { Rx } from "@effect-rx/rx-react";
|
|
17
|
-
import * as Function from "effect/Function";
|
|
18
|
-
import * as Option from "effect/Option";
|
|
19
|
-
import { Capabilities, contributes, createIntent } from "@dxos/app-framework";
|
|
20
|
-
import { Obj } from "@dxos/echo";
|
|
21
|
-
import { AttentionCapabilities } from "@dxos/plugin-attention";
|
|
22
|
-
import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
|
|
23
|
-
import { ROOT_ID, createExtension, rxFromSignal } from "@dxos/plugin-graph";
|
|
24
|
-
import { fullyQualifiedId } from "@dxos/react-client/echo";
|
|
25
|
-
var app_graph_builder_default = ((context) => {
|
|
26
|
-
const resolve = (typename) => context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
|
|
27
|
-
return contributes(Capabilities.AppGraphBuilder, [
|
|
28
|
-
createExtension({
|
|
29
|
-
id: `${meta.id}/active-call`,
|
|
30
|
-
connector: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map((node2) => {
|
|
31
|
-
const [call] = get(context.capabilities(ThreadCapabilities.CallManager));
|
|
32
|
-
return get(rxFromSignal(() => call?.joined ? [
|
|
33
|
-
{
|
|
34
|
-
id: `${node2.id}${ATTENDABLE_PATH_SEPARATOR}active-call`,
|
|
35
|
-
type: DECK_COMPANION_TYPE,
|
|
36
|
-
data: null,
|
|
37
|
-
properties: {
|
|
38
|
-
label: [
|
|
39
|
-
"call panel label",
|
|
40
|
-
{
|
|
41
|
-
ns: meta.id
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
icon: "ph--video-conference--regular",
|
|
45
|
-
position: "hoist",
|
|
46
|
-
disposition: "hidden"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
] : []));
|
|
50
|
-
}), Option.getOrElse(() => [])))
|
|
51
|
-
}),
|
|
52
|
-
// TODO(wittjosiah): The channel shouldn't become the companion during a call.
|
|
53
|
-
// Alternative: the call/meeting/thread should be a child node of the channel and that should be opened.
|
|
54
|
-
createExtension({
|
|
55
|
-
id: `${meta.id}/channel-chat-companion`,
|
|
56
|
-
connector: (node) => {
|
|
57
|
-
return Rx.make((get) => {
|
|
58
|
-
return Function.pipe(get(node), Option.flatMap((node2) => Obj.instanceOf(Channel_exports.Channel, node2.data) ? Option.some(node2.data) : Option.none()), Option.map((channel) => {
|
|
59
|
-
const callManager = context.getCapability(ThreadCapabilities.CallManager);
|
|
60
|
-
const joined = get(rxFromSignal(() => callManager.joined && callManager.roomId === fullyQualifiedId(channel)));
|
|
61
|
-
if (!joined) {
|
|
62
|
-
return [];
|
|
63
|
-
}
|
|
64
|
-
return [
|
|
65
|
-
{
|
|
66
|
-
id: `${fullyQualifiedId(channel)}${ATTENDABLE_PATH_SEPARATOR}chat`,
|
|
67
|
-
type: PLANK_COMPANION_TYPE,
|
|
68
|
-
data: "chat",
|
|
69
|
-
properties: {
|
|
70
|
-
label: [
|
|
71
|
-
"channel companion label",
|
|
72
|
-
{
|
|
73
|
-
ns: meta.id
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
icon: "ph--hash--regular",
|
|
77
|
-
position: "hoist",
|
|
78
|
-
disposition: "hidden"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
];
|
|
82
|
-
}), Option.getOrElse(() => []));
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
}),
|
|
86
|
-
createExtension({
|
|
87
|
-
id: `${meta.id}/comments-companion`,
|
|
88
|
-
connector: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => {
|
|
89
|
-
if (!Obj.isObject(node2.data) || Obj.instanceOf(Channel_exports.Channel, node2.data)) {
|
|
90
|
-
return Option.none();
|
|
91
|
-
}
|
|
92
|
-
const metadata = resolve(Obj.getTypename(node2.data));
|
|
93
|
-
return typeof metadata.comments === "string" ? Option.some(node2) : Option.none();
|
|
94
|
-
}), Option.map((node2) => [
|
|
95
|
-
{
|
|
96
|
-
id: [
|
|
97
|
-
node2.id,
|
|
98
|
-
"comments"
|
|
99
|
-
].join(ATTENDABLE_PATH_SEPARATOR),
|
|
100
|
-
type: PLANK_COMPANION_TYPE,
|
|
101
|
-
data: "comments",
|
|
102
|
-
properties: {
|
|
103
|
-
label: [
|
|
104
|
-
"comments label",
|
|
105
|
-
{
|
|
106
|
-
ns: meta.id
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
icon: "ph--chat-text--regular",
|
|
110
|
-
disposition: "hidden",
|
|
111
|
-
position: "hoist"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
]), Option.getOrElse(() => [])))
|
|
115
|
-
}),
|
|
116
|
-
createExtension({
|
|
117
|
-
id: `${meta.id}/comment-toolbar`,
|
|
118
|
-
actions: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => {
|
|
119
|
-
if (!Obj.isObject(node2.data) || Obj.instanceOf(Channel_exports.Channel, node2.data)) {
|
|
120
|
-
return Option.none();
|
|
121
|
-
}
|
|
122
|
-
const metadata = resolve(Obj.getTypename(node2.data));
|
|
123
|
-
return typeof metadata.comments === "string" ? Option.some(node2.data) : Option.none();
|
|
124
|
-
}), Option.map((object) => {
|
|
125
|
-
const selectionManager = context.getCapability(AttentionCapabilities.Selection);
|
|
126
|
-
const toolbar = get(context.capabilities(ThreadCapabilities.State))[0]?.state.toolbar ?? {};
|
|
127
|
-
const disabled = get(rxFromSignal(() => {
|
|
128
|
-
const metadata = resolve(Obj.getTypename(object));
|
|
129
|
-
const selection = selectionManager.getSelection(fullyQualifiedId(object), metadata.selectionMode);
|
|
130
|
-
const anchor = getAnchor(selection);
|
|
131
|
-
const invalidSelection = !anchor;
|
|
132
|
-
const overlappingComment = toolbar[fullyQualifiedId(object)];
|
|
133
|
-
return metadata.comments === "anchored" && invalidSelection || overlappingComment;
|
|
134
|
-
}));
|
|
135
|
-
return [
|
|
136
|
-
{
|
|
137
|
-
id: `${fullyQualifiedId(object)}/comment`,
|
|
138
|
-
data: () => {
|
|
139
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
140
|
-
const metadata = resolve(Obj.getTypename(object));
|
|
141
|
-
const selection = selectionManager.getSelection(fullyQualifiedId(object));
|
|
142
|
-
const anchor = metadata.comments === "anchored" ? getAnchor(selection) : Date.now().toString();
|
|
143
|
-
const name = metadata.getAnchorLabel?.(object, anchor);
|
|
144
|
-
void dispatch(createIntent(ThreadAction.Create, {
|
|
145
|
-
anchor,
|
|
146
|
-
name,
|
|
147
|
-
subject: object
|
|
148
|
-
}));
|
|
149
|
-
},
|
|
150
|
-
properties: {
|
|
151
|
-
label: [
|
|
152
|
-
"add comment label",
|
|
153
|
-
{
|
|
154
|
-
ns: meta.id
|
|
155
|
-
}
|
|
156
|
-
],
|
|
157
|
-
icon: "ph--chat-text--regular",
|
|
158
|
-
disposition: "toolbar",
|
|
159
|
-
disabled,
|
|
160
|
-
testId: "thread.comment.add"
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
];
|
|
164
|
-
}), Option.getOrElse(() => [])))
|
|
165
|
-
})
|
|
166
|
-
]);
|
|
167
|
-
});
|
|
168
|
-
export {
|
|
169
|
-
app_graph_builder_default as default
|
|
170
|
-
};
|
|
171
|
-
//# sourceMappingURL=app-graph-builder-ACBXRBOS.mjs.map
|