@dxos/plugin-thread 0.8.4-main.fcfe5033a5 → 0.8.4-staging.60fe92afc8
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/LICENSE +102 -5
- package/PLUGIN.mdl +75 -0
- package/README.md +1 -1
- package/dist/lib/neutral/ChannelArticle-H633OM3U.mjs +57 -0
- package/dist/lib/neutral/ChannelArticle-H633OM3U.mjs.map +7 -0
- package/dist/lib/neutral/ChannelCreatePanel-NUXXKHZQ.mjs +38 -0
- package/dist/lib/neutral/ChannelCreatePanel-NUXXKHZQ.mjs.map +7 -0
- package/dist/lib/neutral/ThreadArticle-ROQXQLEZ.mjs +57 -0
- package/dist/lib/neutral/ThreadArticle-ROQXQLEZ.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.mjs +67 -0
- package/dist/lib/neutral/ThreadPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs +29 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs +27 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-OLKN3VTB.mjs +50 -0
- package/dist/lib/neutral/app-graph-builder-OLKN3VTB.mjs.map +7 -0
- package/dist/lib/neutral/append-channel-message-J6DXDPBH.mjs +34 -0
- package/dist/lib/neutral/append-channel-message-J6DXDPBH.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +19 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/channel-backend-feed-FCXGAIEC.mjs +58 -0
- package/dist/lib/neutral/channel-backend-feed-FCXGAIEC.mjs.map +7 -0
- package/dist/lib/neutral/chunk-AWAQTEU6.mjs +10 -0
- package/dist/lib/neutral/chunk-AWAQTEU6.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HJHK5O6F.mjs +109 -0
- package/dist/lib/neutral/chunk-HJHK5O6F.mjs.map +7 -0
- package/dist/lib/neutral/chunk-OOC6EQ7X.mjs +36 -0
- package/dist/lib/neutral/chunk-OOC6EQ7X.mjs.map +7 -0
- package/dist/lib/neutral/chunk-P4RSGFS4.mjs +69 -0
- package/dist/lib/neutral/chunk-P4RSGFS4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SZXFLBZL.mjs +8 -0
- package/dist/lib/neutral/chunk-SZXFLBZL.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +93 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-channel-UW2LSL4G.mjs +41 -0
- package/dist/lib/neutral/create-channel-UW2LSL4G.mjs.map +7 -0
- package/dist/lib/neutral/create-object-RLCOUVAW.mjs +46 -0
- package/dist/lib/neutral/create-object-RLCOUVAW.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +11 -0
- package/dist/lib/neutral/index.mjs +34 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/navigation-resolver-4X4HCQYX.mjs +14 -0
- package/dist/lib/neutral/navigation-resolver-4X4HCQYX.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs +13 -0
- package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-G6KT7TSU.mjs +48 -0
- package/dist/lib/neutral/react-surface-G6KT7TSU.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +91 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +16 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/ThreadPlugin.d.ts +1 -0
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.test.d.ts +2 -0
- package/dist/types/src/ThreadPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ThreadPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/channel-backend-feed.d.ts +13 -0
- package/dist/types/src/capabilities/channel-backend-feed.d.ts.map +1 -0
- package/dist/types/src/capabilities/create-object.d.ts +11 -0
- package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +8 -10
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-resolver.d.ts +6 -0
- package/dist/types/src/capabilities/navigation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +43 -0
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
- package/dist/types/src/components/Chat/index.d.ts +2 -0
- package/dist/types/src/components/Chat/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +19 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -0
- package/dist/types/src/{components/CommentsPanel/CommentsPanel.stories.d.ts → containers/ChannelArticle/ChannelArticle.stories.d.ts} +74 -72
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelArticle/index.d.ts +2 -0
- package/dist/types/src/{components/ThreadSettings → containers/ChannelArticle}/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts +11 -0
- package/dist/types/src/containers/ChannelCreatePanel/ChannelCreatePanel.d.ts.map +1 -0
- package/dist/types/src/containers/ChannelCreatePanel/index.d.ts +2 -0
- package/dist/types/src/containers/ChannelCreatePanel/index.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts +20 -0
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{ChatContainer/ChatContainer.stories.d.ts → ThreadArticle/ThreadArticle.stories.d.ts} +71 -71
- package/dist/types/src/containers/ThreadArticle/ThreadArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ThreadArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ThreadArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -5
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useMessages.d.ts +4 -0
- package/dist/types/src/hooks/useMessages.d.ts.map +1 -0
- package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/append-channel-message.d.ts +5 -0
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -0
- package/dist/types/src/operations/create-channel.d.ts +3 -3
- package/dist/types/src/operations/create-channel.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/paths.d.ts +3 -0
- package/dist/types/src/paths.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +70 -70
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/ThreadCapabilities.d.ts +37 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/ThreadOperation.d.ts +91 -0
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
- package/dist/types/src/types/channel-backend.d.ts +16 -0
- package/dist/types/src/types/channel-backend.d.ts.map +1 -0
- package/dist/types/src/types/channel-backend.test.d.ts +2 -0
- package/dist/types/src/types/channel-backend.test.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -3
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +4 -20
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +96 -114
- package/src/ThreadPlugin.node.ts +26 -0
- package/src/ThreadPlugin.test.ts +27 -0
- package/src/ThreadPlugin.tsx +23 -105
- package/src/ThreadPlugin.workerd.ts +25 -0
- package/src/capabilities/app-graph-builder.ts +25 -167
- package/src/capabilities/channel-backend-feed.ts +60 -0
- package/src/capabilities/create-object.ts +46 -0
- package/src/capabilities/index.ts +4 -8
- package/src/capabilities/navigation-resolver.ts +18 -0
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +8 -50
- package/src/components/Chat/Chat.tsx +119 -0
- package/src/components/Chat/index.ts +5 -0
- package/src/components/index.ts +1 -7
- package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +108 -0
- package/src/containers/ChannelArticle/ChannelArticle.tsx +83 -0
- package/src/containers/ChannelArticle/index.ts +5 -0
- package/src/containers/ChannelCreatePanel/ChannelCreatePanel.tsx +52 -0
- package/src/containers/ChannelCreatePanel/index.ts +5 -0
- package/src/containers/{ChatContainer/ChatContainer.stories.tsx → ThreadArticle/ThreadArticle.stories.tsx} +11 -12
- package/src/containers/ThreadArticle/ThreadArticle.tsx +75 -0
- package/src/containers/ThreadArticle/index.ts +5 -0
- package/src/containers/index.ts +3 -5
- package/src/hooks/index.ts +1 -6
- package/src/hooks/useMessages.ts +37 -0
- package/src/index.ts +4 -4
- package/src/meta.ts +22 -8
- package/src/operations/append-channel-message.ts +31 -0
- package/src/operations/create-channel.ts +18 -8
- package/src/operations/index.ts +2 -14
- package/src/paths.ts +10 -0
- package/src/plugin.ts +11 -0
- package/src/translations.ts +2 -1
- package/src/types/ThreadCapabilities.ts +47 -0
- package/src/types/ThreadOperation.ts +49 -0
- package/src/types/channel-backend.test.ts +48 -0
- package/src/types/channel-backend.ts +54 -0
- package/src/types/index.ts +3 -3
- package/src/util.ts +35 -18
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/add-message-VPPFFLFL.mjs +0 -97
- package/dist/lib/browser/add-message-VPPFFLFL.mjs.map +0 -7
- package/dist/lib/browser/blueprints/index.mjs +0 -37
- package/dist/lib/browser/blueprints/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-MESW3R4Q.mjs +0 -61
- package/dist/lib/browser/chunk-MESW3R4Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-VPM44Z35.mjs +0 -259
- package/dist/lib/browser/chunk-VPM44Z35.mjs.map +0 -7
- package/dist/lib/browser/create-OQKG4S47.mjs +0 -55
- package/dist/lib/browser/create-OQKG4S47.mjs.map +0 -7
- package/dist/lib/browser/create-channel-EF67LCS6.mjs +0 -21
- package/dist/lib/browser/create-channel-EF67LCS6.mjs.map +0 -7
- package/dist/lib/browser/create-channel-thread-CCZTSWQ6.mjs +0 -28
- package/dist/lib/browser/create-channel-thread-CCZTSWQ6.mjs.map +0 -7
- package/dist/lib/browser/create-proposals-CMK7S7VS.mjs +0 -57
- package/dist/lib/browser/create-proposals-CMK7S7VS.mjs.map +0 -7
- package/dist/lib/browser/delete-FSFVU6ZA.mjs +0 -59
- package/dist/lib/browser/delete-FSFVU6ZA.mjs.map +0 -7
- package/dist/lib/browser/delete-message-XL5M5J33.mjs +0 -64
- package/dist/lib/browser/delete-message-XL5M5J33.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -2334
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/on-create-space-VYS2JGVT.mjs +0 -25
- package/dist/lib/browser/on-create-space-VYS2JGVT.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -14
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/restore-2ZGMKUSD.mjs +0 -33
- package/dist/lib/browser/restore-2ZGMKUSD.mjs.map +0 -7
- package/dist/lib/browser/restore-message-OYEGWPII.mjs +0 -42
- package/dist/lib/browser/restore-message-OYEGWPII.mjs.map +0 -7
- package/dist/lib/browser/select-VG2XLULE.mjs +0 -26
- package/dist/lib/browser/select-VG2XLULE.mjs.map +0 -7
- package/dist/lib/browser/toggle-resolved-MM6YC5BU.mjs +0 -45
- package/dist/lib/browser/toggle-resolved-MM6YC5BU.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -12
- package/dist/lib/node-esm/add-message-XWKHLNS6.mjs +0 -98
- package/dist/lib/node-esm/add-message-XWKHLNS6.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -38
- package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-JTHXNWKJ.mjs +0 -260
- package/dist/lib/node-esm/chunk-JTHXNWKJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SDRAQNSQ.mjs +0 -62
- package/dist/lib/node-esm/chunk-SDRAQNSQ.mjs.map +0 -7
- package/dist/lib/node-esm/create-6ZOFMMYA.mjs +0 -56
- package/dist/lib/node-esm/create-6ZOFMMYA.mjs.map +0 -7
- package/dist/lib/node-esm/create-channel-UYWUNB3L.mjs +0 -22
- package/dist/lib/node-esm/create-channel-UYWUNB3L.mjs.map +0 -7
- package/dist/lib/node-esm/create-channel-thread-UQF2SBHS.mjs +0 -29
- package/dist/lib/node-esm/create-channel-thread-UQF2SBHS.mjs.map +0 -7
- package/dist/lib/node-esm/create-proposals-5FJNURKH.mjs +0 -58
- package/dist/lib/node-esm/create-proposals-5FJNURKH.mjs.map +0 -7
- package/dist/lib/node-esm/delete-WRODXR3E.mjs +0 -60
- package/dist/lib/node-esm/delete-WRODXR3E.mjs.map +0 -7
- package/dist/lib/node-esm/delete-message-TAHCYTW2.mjs +0 -65
- package/dist/lib/node-esm/delete-message-TAHCYTW2.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -2335
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/on-create-space-XDY2YXPV.mjs +0 -26
- package/dist/lib/node-esm/on-create-space-XDY2YXPV.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -15
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/restore-T3QA7TSL.mjs +0 -34
- package/dist/lib/node-esm/restore-T3QA7TSL.mjs.map +0 -7
- package/dist/lib/node-esm/restore-message-WFTEVBEV.mjs +0 -43
- package/dist/lib/node-esm/restore-message-WFTEVBEV.mjs.map +0 -7
- package/dist/lib/node-esm/select-Q4UDWJJF.mjs +0 -27
- package/dist/lib/node-esm/select-Q4UDWJJF.mjs.map +0 -7
- package/dist/lib/node-esm/toggle-resolved-33XTAK2H.mjs +0 -46
- package/dist/lib/node-esm/toggle-resolved-33XTAK2H.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -13
- package/dist/types/src/blueprints/index.d.ts +0 -2
- package/dist/types/src/blueprints/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/thread-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/thread-blueprint.d.ts.map +0 -1
- package/dist/types/src/calls/call-manager.d.ts +0 -87
- package/dist/types/src/calls/call-manager.d.ts.map +0 -1
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts +0 -66
- package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +0 -1
- package/dist/types/src/calls/index.d.ts +0 -7
- package/dist/types/src/calls/index.d.ts.map +0 -1
- package/dist/types/src/calls/media-manager.d.ts +0 -60
- package/dist/types/src/calls/media-manager.d.ts.map +0 -1
- package/dist/types/src/calls/speaking-monitor.d.ts +0 -24
- package/dist/types/src/calls/speaking-monitor.d.ts.map +0 -1
- package/dist/types/src/calls/types.d.ts +0 -45
- package/dist/types/src/calls/types.d.ts.map +0 -1
- package/dist/types/src/calls/util/audio.d.ts +0 -6
- package/dist/types/src/calls/util/audio.d.ts.map +0 -1
- package/dist/types/src/calls/util/calls-service.d.ts +0 -77
- package/dist/types/src/calls/util/calls-service.d.ts.map +0 -1
- package/dist/types/src/calls/util/history-cache.d.ts +0 -11
- package/dist/types/src/calls/util/history-cache.d.ts.map +0 -1
- package/dist/types/src/calls/util/index.d.ts +0 -5
- package/dist/types/src/calls/util/index.d.ts.map +0 -1
- package/dist/types/src/calls/util/media.d.ts +0 -6
- package/dist/types/src/calls/util/media.d.ts.map +0 -1
- package/dist/types/src/calls/util/stub-media-streams.d.ts +0 -18
- package/dist/types/src/calls/util/stub-media-streams.d.ts.map +0 -1
- package/dist/types/src/calls/util/task-scheduling.d.ts +0 -17
- package/dist/types/src/calls/util/task-scheduling.d.ts.map +0 -1
- package/dist/types/src/calls-service.stories.d.ts +0 -23
- package/dist/types/src/calls-service.stories.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/call-manager.d.ts +0 -6
- package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -5
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root.d.ts +0 -9
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -7
- 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/undo-mappings.d.ts +0 -5
- package/dist/types/src/capabilities/undo-mappings.d.ts.map +0 -1
- package/dist/types/src/components/Call/Call.d.ts +0 -17
- package/dist/types/src/components/Call/Call.d.ts.map +0 -1
- package/dist/types/src/components/Call/Toolbar.d.ts +0 -16
- package/dist/types/src/components/Call/Toolbar.d.ts.map +0 -1
- package/dist/types/src/components/Call/index.d.ts +0 -3
- package/dist/types/src/components/Call/index.d.ts.map +0 -1
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts +0 -13
- package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts.map +0 -1
- package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts.map +0 -1
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts +0 -14
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +0 -1
- package/dist/types/src/components/CommentsPanel/index.d.ts +0 -3
- package/dist/types/src/components/CommentsPanel/index.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/Lobby.d.ts +0 -15
- package/dist/types/src/components/Lobby/Lobby.d.ts.map +0 -1
- package/dist/types/src/components/Lobby/index.d.ts +0 -2
- package/dist/types/src/components/Lobby/index.d.ts.map +0 -1
- package/dist/types/src/components/Media/AudioStream.d.ts +0 -6
- package/dist/types/src/components/Media/AudioStream.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.d.ts +0 -15
- package/dist/types/src/components/Media/VideoObject.d.ts.map +0 -1
- package/dist/types/src/components/Media/VideoObject.stories.d.ts +0 -22
- package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +0 -1
- package/dist/types/src/components/Media/index.d.ts +0 -3
- package/dist/types/src/components/Media/index.d.ts.map +0 -1
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts +0 -15
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +0 -1
- package/dist/types/src/components/MessagePanel/index.d.ts +0 -2
- package/dist/types/src/components/MessagePanel/index.d.ts.map +0 -1
- package/dist/types/src/components/Participant/Participant.d.ts +0 -6
- package/dist/types/src/components/Participant/Participant.d.ts.map +0 -1
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts +0 -11
- package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +0 -1
- package/dist/types/src/components/Participant/index.d.ts +0 -3
- package/dist/types/src/components/Participant/index.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts +0 -32
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +0 -178
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts +0 -21
- package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts +0 -12
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts +0 -164
- package/dist/types/src/components/ResponsiveGrid/ResponsivePanel.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResponsiveGrid/index.d.ts +0 -4
- package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +0 -1
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts +0 -6
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +0 -1
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts +0 -161
- package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts.map +0 -1
- package/dist/types/src/components/ThreadSettings/index.d.ts +0 -2
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts +0 -15
- package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +0 -1
- package/dist/types/src/containers/CallDebugPanel/index.d.ts +0 -2
- package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +0 -1
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts +0 -3
- package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +0 -1
- package/dist/types/src/containers/CallSidebar/index.d.ts +0 -2
- package/dist/types/src/containers/CallSidebar/index.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts +0 -12
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts +0 -162
- package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChannelContainer/index.d.ts +0 -2
- package/dist/types/src/containers/ChannelContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts +0 -16
- package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +0 -1
- package/dist/types/src/containers/ChatContainer/index.d.ts +0 -4
- package/dist/types/src/containers/ChatContainer/index.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +0 -8
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +0 -1
- package/dist/types/src/containers/ThreadCompanion/index.d.ts +0 -2
- package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +0 -1
- package/dist/types/src/extensions/command.d.ts +0 -3
- package/dist/types/src/extensions/command.d.ts.map +0 -1
- package/dist/types/src/extensions/index.d.ts +0 -3
- package/dist/types/src/extensions/index.d.ts.map +0 -1
- package/dist/types/src/extensions/threads.d.ts +0 -14
- package/dist/types/src/extensions/threads.d.ts.map +0 -1
- package/dist/types/src/hooks/analytics.d.ts +0 -3
- package/dist/types/src/hooks/analytics.d.ts.map +0 -1
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useDebugMode.d.ts +0 -2
- package/dist/types/src/hooks/useDebugMode.d.ts.map +0 -1
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts +0 -2
- package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts +0 -3
- package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +0 -1
- package/dist/types/src/operations/add-message.d.ts +0 -5
- package/dist/types/src/operations/add-message.d.ts.map +0 -1
- package/dist/types/src/operations/create-channel-thread.d.ts +0 -5
- package/dist/types/src/operations/create-channel-thread.d.ts.map +0 -1
- package/dist/types/src/operations/create-proposals.d.ts +0 -5
- package/dist/types/src/operations/create-proposals.d.ts.map +0 -1
- package/dist/types/src/operations/create.d.ts +0 -5
- package/dist/types/src/operations/create.d.ts.map +0 -1
- package/dist/types/src/operations/definitions.d.ts +0 -2804
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
- package/dist/types/src/operations/delete-message.d.ts +0 -5
- package/dist/types/src/operations/delete-message.d.ts.map +0 -1
- package/dist/types/src/operations/delete.d.ts +0 -5
- package/dist/types/src/operations/delete.d.ts.map +0 -1
- package/dist/types/src/operations/on-create-space.d.ts +0 -5
- package/dist/types/src/operations/on-create-space.d.ts.map +0 -1
- package/dist/types/src/operations/restore-message.d.ts +0 -5
- package/dist/types/src/operations/restore-message.d.ts.map +0 -1
- package/dist/types/src/operations/restore.d.ts +0 -5
- package/dist/types/src/operations/restore.d.ts.map +0 -1
- package/dist/types/src/operations/select.d.ts +0 -5
- package/dist/types/src/operations/select.d.ts.map +0 -1
- package/dist/types/src/operations/toggle-resolved.d.ts +0 -5
- package/dist/types/src/operations/toggle-resolved.d.ts.map +0 -1
- package/dist/types/src/testing/data.d.ts +0 -5
- package/dist/types/src/testing/data.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/stories.d.ts +0 -3
- package/dist/types/src/testing/stories.d.ts.map +0 -1
- package/dist/types/src/types/Channel.d.ts +0 -715
- package/dist/types/src/types/Channel.d.ts.map +0 -1
- package/dist/types/src/types/Settings.d.ts +0 -5
- package/dist/types/src/types/Settings.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -24
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -18
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/blueprints/index.ts +0 -5
- package/src/blueprints/thread-blueprint.ts +0 -37
- package/src/calls/call-manager.ts +0 -270
- package/src/calls/call-swarm-synchronizer.ts +0 -350
- package/src/calls/index.ts +0 -10
- package/src/calls/media-manager.ts +0 -378
- package/src/calls/speaking-monitor.ts +0 -85
- package/src/calls/types.ts +0 -74
- package/src/calls/util/audio.ts +0 -58
- package/src/calls/util/calls-service.ts +0 -580
- package/src/calls/util/history-cache.ts +0 -27
- package/src/calls/util/index.ts +0 -8
- package/src/calls/util/media.ts +0 -52
- package/src/calls/util/stub-media-streams.ts +0 -127
- package/src/calls/util/task-scheduling.ts +0 -92
- package/src/calls-service.stories.tsx +0 -230
- package/src/capabilities/blueprint-definition.ts +0 -17
- package/src/capabilities/call-manager.ts +0 -27
- package/src/capabilities/markdown.ts +0 -82
- package/src/capabilities/react-root.tsx +0 -20
- package/src/capabilities/settings.ts +0 -35
- package/src/capabilities/state.ts +0 -22
- package/src/capabilities/undo-mappings.ts +0 -46
- package/src/components/Call/Call.tsx +0 -93
- package/src/components/Call/Toolbar.tsx +0 -199
- package/src/components/Call/index.ts +0 -6
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +0 -93
- package/src/components/CommentsPanel/CommentsPanel.tsx +0 -71
- package/src/components/CommentsPanel/CommentsThread.tsx +0 -172
- package/src/components/CommentsPanel/index.ts +0 -6
- package/src/components/Lobby/Lobby.tsx +0 -122
- package/src/components/Lobby/index.ts +0 -5
- package/src/components/Media/AudioStream.tsx +0 -67
- package/src/components/Media/VideoObject.stories.tsx +0 -59
- package/src/components/Media/VideoObject.tsx +0 -58
- package/src/components/Media/index.ts +0 -6
- package/src/components/MessagePanel/MessagePanel.tsx +0 -222
- package/src/components/MessagePanel/index.ts +0 -5
- package/src/components/Participant/Participant.tsx +0 -77
- package/src/components/Participant/ParticipantGrid.tsx +0 -88
- package/src/components/Participant/index.ts +0 -6
- package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +0 -157
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +0 -341
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +0 -134
- package/src/components/ResponsiveGrid/ResponsivePanel.stories.tsx +0 -53
- package/src/components/ResponsiveGrid/ResponsivePanel.tsx +0 -31
- package/src/components/ResponsiveGrid/index.ts +0 -7
- package/src/components/ThreadSettings/ThreadSettings.stories.tsx +0 -31
- package/src/components/ThreadSettings/ThreadSettings.tsx +0 -20
- package/src/components/ThreadSettings/index.ts +0 -5
- package/src/containers/CallDebugPanel/CallDebugPanel.tsx +0 -173
- package/src/containers/CallDebugPanel/index.ts +0 -5
- package/src/containers/CallSidebar/CallSidebar.tsx +0 -18
- package/src/containers/CallSidebar/index.ts +0 -5
- package/src/containers/ChannelContainer/ChannelContainer.stories.tsx +0 -61
- package/src/containers/ChannelContainer/ChannelContainer.tsx +0 -223
- package/src/containers/ChannelContainer/index.ts +0 -5
- package/src/containers/ChatContainer/ChatContainer.tsx +0 -131
- package/src/containers/ChatContainer/index.ts +0 -8
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +0 -217
- package/src/containers/ThreadCompanion/index.ts +0 -5
- package/src/extensions/command.ts +0 -36
- package/src/extensions/index.ts +0 -6
- package/src/extensions/threads.ts +0 -171
- package/src/hooks/analytics.ts +0 -41
- package/src/hooks/useBlackCanvasStreamTrack.tsx +0 -27
- package/src/hooks/useDebugMode.ts +0 -25
- package/src/hooks/useInaudibleAudioStreamTrack.tsx +0 -27
- package/src/hooks/useVideoStreamTrack.tsx +0 -36
- package/src/operations/add-message.ts +0 -81
- package/src/operations/create-channel-thread.ts +0 -26
- package/src/operations/create-proposals.ts +0 -49
- package/src/operations/create.ts +0 -48
- package/src/operations/definitions.ts +0 -177
- package/src/operations/delete-message.ts +0 -53
- package/src/operations/delete.ts +0 -63
- package/src/operations/on-create-space.ts +0 -27
- package/src/operations/restore-message.ts +0 -38
- package/src/operations/restore.ts +0 -38
- package/src/operations/select.ts +0 -24
- package/src/operations/toggle-resolved.ts +0 -41
- package/src/testing/data.ts +0 -49
- package/src/testing/index.ts +0 -5
- package/src/testing/stories.ts +0 -51
- package/src/types/Channel.ts +0 -37
- package/src/types/Settings.ts +0 -10
- package/src/types/capabilities.ts +0 -36
- package/src/types/types.ts +0 -24
- package/src/typings/peermetrics-webrtc-stats.d.ts +0 -46
- package/src/typings.d.ts +0 -8
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral/hooks}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Schema from 'effect/Schema';
|
|
6
|
-
|
|
7
|
-
import { Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Database, Key, Obj, Ref } from '@dxos/echo';
|
|
9
|
-
import { Collection } from '@dxos/echo';
|
|
10
|
-
import { Operation } from '@dxos/operation';
|
|
11
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
12
|
-
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
13
|
-
import { Actor, AnchoredTo, Message, Thread } from '@dxos/types';
|
|
14
|
-
|
|
15
|
-
import { meta } from '#meta';
|
|
16
|
-
|
|
17
|
-
import { Channel } from '../types';
|
|
18
|
-
|
|
19
|
-
const THREAD_OPERATION = `${meta.id}.operation`;
|
|
20
|
-
|
|
21
|
-
export const OnCreateSpace = Operation.make({
|
|
22
|
-
meta: { key: `${THREAD_OPERATION}.on-create-space`, name: 'On Create Space' },
|
|
23
|
-
services: [Capability.Service],
|
|
24
|
-
input: Schema.Struct({
|
|
25
|
-
space: SpaceSchema,
|
|
26
|
-
rootCollection: Collection.Collection,
|
|
27
|
-
isDefault: Schema.Boolean.pipe(Schema.optional),
|
|
28
|
-
}),
|
|
29
|
-
output: Schema.Void,
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export const CreateChannel = Operation.make({
|
|
33
|
-
meta: { key: `${THREAD_OPERATION}.create-channel`, name: 'Create Channel' },
|
|
34
|
-
services: [Capability.Service],
|
|
35
|
-
input: Schema.Struct({
|
|
36
|
-
spaceId: Key.SpaceId,
|
|
37
|
-
name: Schema.optional(Schema.String),
|
|
38
|
-
}),
|
|
39
|
-
output: Schema.Struct({
|
|
40
|
-
object: Channel.Channel,
|
|
41
|
-
}),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export const CreateChannelThread = Operation.make({
|
|
45
|
-
meta: { key: `${THREAD_OPERATION}.create-channel-thread`, name: 'Create Channel Thread' },
|
|
46
|
-
services: [Capability.Service],
|
|
47
|
-
input: Schema.Struct({
|
|
48
|
-
channel: Channel.Channel,
|
|
49
|
-
}),
|
|
50
|
-
output: Schema.Struct({
|
|
51
|
-
object: Thread.Thread,
|
|
52
|
-
}),
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export const Create = Operation.make({
|
|
56
|
-
meta: { key: `${THREAD_OPERATION}.create`, name: 'Create Thread' },
|
|
57
|
-
services: [Capability.Service],
|
|
58
|
-
input: Schema.Struct({
|
|
59
|
-
name: Schema.optional(Schema.String),
|
|
60
|
-
anchor: Schema.optional(Schema.String),
|
|
61
|
-
subject: Obj.Unknown,
|
|
62
|
-
}),
|
|
63
|
-
output: Schema.Void,
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
export const DeleteOutput = Schema.Struct({
|
|
67
|
-
thread: Thread.Thread.annotations({ description: 'The deleted thread.' }),
|
|
68
|
-
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The deleted anchor.' }),
|
|
69
|
-
}).pipe(Schema.partial);
|
|
70
|
-
|
|
71
|
-
export type DeleteOutput = Schema.Schema.Type<typeof DeleteOutput>;
|
|
72
|
-
|
|
73
|
-
export const Delete = Operation.make({
|
|
74
|
-
meta: { key: `${THREAD_OPERATION}.delete`, name: 'Delete Thread' },
|
|
75
|
-
services: [Capability.Service],
|
|
76
|
-
input: Schema.Struct({
|
|
77
|
-
anchor: AnchoredTo.AnchoredTo,
|
|
78
|
-
subject: Obj.Unknown,
|
|
79
|
-
thread: Schema.optional(Thread.Thread),
|
|
80
|
-
}),
|
|
81
|
-
output: DeleteOutput,
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
export const Select = Operation.make({
|
|
85
|
-
meta: { key: `${THREAD_OPERATION}.select`, name: 'Select Thread' },
|
|
86
|
-
services: [Capability.Service],
|
|
87
|
-
input: Schema.Struct({
|
|
88
|
-
current: Schema.String,
|
|
89
|
-
}),
|
|
90
|
-
output: Schema.Void,
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
export const ToggleResolved = Operation.make({
|
|
94
|
-
meta: { key: `${THREAD_OPERATION}.toggle-resolved`, name: 'Toggle Resolved' },
|
|
95
|
-
services: [Capability.Service],
|
|
96
|
-
input: Schema.Struct({
|
|
97
|
-
thread: Thread.Thread,
|
|
98
|
-
}),
|
|
99
|
-
output: Schema.Void,
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
export const AddMessage = Operation.make({
|
|
103
|
-
meta: { key: `${THREAD_OPERATION}.add-message`, name: 'Add Message' },
|
|
104
|
-
services: [Capability.Service],
|
|
105
|
-
input: Schema.Struct({
|
|
106
|
-
subject: Obj.Unknown,
|
|
107
|
-
anchor: AnchoredTo.AnchoredTo,
|
|
108
|
-
sender: Actor.Actor,
|
|
109
|
-
text: Schema.String,
|
|
110
|
-
}),
|
|
111
|
-
output: Schema.Void,
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
export const DeleteMessageOutput = Schema.partial(
|
|
115
|
-
Schema.Struct({
|
|
116
|
-
message: Message.Message.annotations({ description: 'The deleted message.' }),
|
|
117
|
-
messageIndex: Schema.Number.annotations({ description: 'The index the message was at.' }),
|
|
118
|
-
}),
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
export type DeleteMessageOutput = Schema.Schema.Type<typeof DeleteMessageOutput>;
|
|
122
|
-
|
|
123
|
-
export const DeleteMessage = Operation.make({
|
|
124
|
-
meta: { key: `${THREAD_OPERATION}.delete-message`, name: 'Delete Message' },
|
|
125
|
-
services: [Capability.Service],
|
|
126
|
-
input: Schema.Struct({
|
|
127
|
-
anchor: AnchoredTo.AnchoredTo,
|
|
128
|
-
subject: Obj.Unknown,
|
|
129
|
-
messageId: Schema.String,
|
|
130
|
-
}),
|
|
131
|
-
output: DeleteMessageOutput,
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Restore a deleted thread (inverse of Delete).
|
|
136
|
-
*/
|
|
137
|
-
export const Restore = Operation.make({
|
|
138
|
-
meta: { key: `${THREAD_OPERATION}.restore`, name: 'Restore Thread' },
|
|
139
|
-
services: [Capability.Service],
|
|
140
|
-
input: Schema.Struct({
|
|
141
|
-
thread: Thread.Thread.annotations({ description: 'The thread to restore.' }),
|
|
142
|
-
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor relation to restore.' }),
|
|
143
|
-
}),
|
|
144
|
-
output: Schema.Void,
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Restore a deleted message (inverse of DeleteMessage).
|
|
149
|
-
*/
|
|
150
|
-
export const RestoreMessage = Operation.make({
|
|
151
|
-
meta: { key: `${THREAD_OPERATION}.restore-message`, name: 'Restore Message' },
|
|
152
|
-
services: [Capability.Service],
|
|
153
|
-
input: Schema.Struct({
|
|
154
|
-
anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor of the thread.' }),
|
|
155
|
-
message: Message.Message.annotations({ description: 'The message to restore.' }),
|
|
156
|
-
messageIndex: Schema.Number.annotations({ description: 'The index to restore the message at.' }),
|
|
157
|
-
}),
|
|
158
|
-
output: Schema.Void,
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
export const CreateProposals = Operation.make({
|
|
162
|
-
meta: {
|
|
163
|
-
key: 'org.dxos.function.thread.create-proposals',
|
|
164
|
-
name: 'Create Proposals',
|
|
165
|
-
description: 'Proposes a set of changes to a document.',
|
|
166
|
-
},
|
|
167
|
-
input: Schema.Struct({
|
|
168
|
-
doc: Ref.Ref(Markdown.Document).annotations({
|
|
169
|
-
description: 'The ID of the document.',
|
|
170
|
-
}),
|
|
171
|
-
diffs: Schema.Array(Schema.String).annotations({
|
|
172
|
-
description: 'The diffs to propose for the document.',
|
|
173
|
-
}),
|
|
174
|
-
}),
|
|
175
|
-
output: Schema.Void,
|
|
176
|
-
services: [Database.Service],
|
|
177
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Obj, Relation } from '@dxos/echo';
|
|
8
|
-
import { invariant } from '@dxos/invariant';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
11
|
-
import { Thread } from '@dxos/types';
|
|
12
|
-
|
|
13
|
-
import { Delete, DeleteMessage } from './definitions';
|
|
14
|
-
|
|
15
|
-
const handler: Operation.WithHandler<typeof DeleteMessage> = DeleteMessage.pipe(
|
|
16
|
-
Operation.withHandler(
|
|
17
|
-
Effect.fnUntraced(function* ({ subject, anchor, messageId }) {
|
|
18
|
-
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
19
|
-
const db = Obj.getDatabase(subject);
|
|
20
|
-
invariant(db, 'Database not found');
|
|
21
|
-
|
|
22
|
-
const msgIndex = thread.messages.findIndex((ref) => ref.target?.id === messageId);
|
|
23
|
-
const msg = thread.messages[msgIndex]?.target;
|
|
24
|
-
if (!msg) {
|
|
25
|
-
return { messageIndex: -1 };
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (msgIndex === 0 && thread.messages.length === 1) {
|
|
29
|
-
// TODO(wittjosiah): This doesn't support restoring the thread.
|
|
30
|
-
yield* Operation.invoke(Delete, { subject, anchor });
|
|
31
|
-
return { messageIndex: -1 };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
Obj.change(thread, (thread) => {
|
|
35
|
-
thread.messages.splice(msgIndex, 1);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
39
|
-
name: 'threads.message.delete',
|
|
40
|
-
properties: {
|
|
41
|
-
spaceId: db.spaceId,
|
|
42
|
-
threadId: thread.id,
|
|
43
|
-
threadLength: thread.messages.length,
|
|
44
|
-
messageId,
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return { message: msg, messageIndex: msgIndex };
|
|
49
|
-
}),
|
|
50
|
-
),
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
export default handler;
|
package/src/operations/delete.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import { sleep } from '@dxos/async';
|
|
9
|
-
import { Obj, Relation } from '@dxos/echo';
|
|
10
|
-
import { Operation } from '@dxos/operation';
|
|
11
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
12
|
-
import { Thread } from '@dxos/types';
|
|
13
|
-
|
|
14
|
-
import { ThreadCapabilities } from '../types';
|
|
15
|
-
import { Delete } from './definitions';
|
|
16
|
-
|
|
17
|
-
const handler: Operation.WithHandler<typeof Delete> = Delete.pipe(
|
|
18
|
-
Operation.withHandler(
|
|
19
|
-
Effect.fnUntraced(function* ({ subject, anchor, thread: _thread }) {
|
|
20
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
21
|
-
const stateAtom = yield* Capability.get(ThreadCapabilities.State);
|
|
22
|
-
const thread = _thread ?? (Relation.getSource(anchor) as Thread.Thread);
|
|
23
|
-
const subjectId = Obj.getDXN(subject).toString();
|
|
24
|
-
const state = registry.get(stateAtom);
|
|
25
|
-
const draft = state.drafts[subjectId];
|
|
26
|
-
if (draft) {
|
|
27
|
-
const index = draft.findIndex((a: { id: string }) => a.id === anchor.id);
|
|
28
|
-
if (index !== -1) {
|
|
29
|
-
registry.set(stateAtom, {
|
|
30
|
-
...state,
|
|
31
|
-
drafts: {
|
|
32
|
-
...state.drafts,
|
|
33
|
-
[subjectId]: state.drafts[subjectId]?.filter((_, i) => i !== index),
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
return {};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const db = Obj.getDatabase(thread);
|
|
41
|
-
if (!db) {
|
|
42
|
-
return {};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// TODO(wittjosiah): Without sleep, rendering crashes at `Relation.setSource(anchor)`.
|
|
46
|
-
db.remove(anchor);
|
|
47
|
-
yield* Effect.promise(() => sleep(100));
|
|
48
|
-
db.remove(thread);
|
|
49
|
-
|
|
50
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
51
|
-
name: 'threads.delete',
|
|
52
|
-
properties: {
|
|
53
|
-
spaceId: db.spaceId,
|
|
54
|
-
threadId: thread.id,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
return { thread, anchor };
|
|
59
|
-
}),
|
|
60
|
-
),
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
export default handler;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Operation } from '@dxos/operation';
|
|
8
|
-
|
|
9
|
-
import { CreateChannel, OnCreateSpace } from './definitions';
|
|
10
|
-
|
|
11
|
-
const handler: Operation.WithHandler<typeof OnCreateSpace> = OnCreateSpace.pipe(
|
|
12
|
-
Operation.withHandler(
|
|
13
|
-
Effect.fnUntraced(function* ({ space, isDefault }) {
|
|
14
|
-
if (isDefault) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const { object: channel } = yield* Operation.invoke(CreateChannel, {
|
|
19
|
-
name: 'General',
|
|
20
|
-
spaceId: space.id,
|
|
21
|
-
});
|
|
22
|
-
space.db.add(channel);
|
|
23
|
-
}),
|
|
24
|
-
),
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export default handler;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Obj, Ref, Relation } from '@dxos/echo';
|
|
8
|
-
import { invariant } from '@dxos/invariant';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
11
|
-
import { Thread } from '@dxos/types';
|
|
12
|
-
|
|
13
|
-
import { RestoreMessage } from './definitions';
|
|
14
|
-
|
|
15
|
-
const handler: Operation.WithHandler<typeof RestoreMessage> = RestoreMessage.pipe(
|
|
16
|
-
Operation.withHandler(
|
|
17
|
-
Effect.fnUntraced(function* ({ anchor, message, messageIndex }) {
|
|
18
|
-
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
19
|
-
const db = Obj.getDatabase(thread);
|
|
20
|
-
invariant(db, 'Database not found');
|
|
21
|
-
|
|
22
|
-
Obj.change(thread, (thread) => {
|
|
23
|
-
thread.messages.splice(messageIndex, 0, Ref.make(message));
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
27
|
-
name: 'threads.message.undo-delete',
|
|
28
|
-
properties: {
|
|
29
|
-
spaceId: db.spaceId,
|
|
30
|
-
threadId: thread.id,
|
|
31
|
-
messageId: message.id,
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
}),
|
|
35
|
-
),
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default handler;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { sleep } from '@dxos/async';
|
|
8
|
-
import { Obj } from '@dxos/echo';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
11
|
-
|
|
12
|
-
import { Restore } from './definitions';
|
|
13
|
-
|
|
14
|
-
const handler: Operation.WithHandler<typeof Restore> = Restore.pipe(
|
|
15
|
-
Operation.withHandler(
|
|
16
|
-
Effect.fnUntraced(function* ({ thread, anchor }) {
|
|
17
|
-
const db = Obj.getDatabase(thread);
|
|
18
|
-
if (!db) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// TODO(wittjosiah): Without sleep, rendering crashes at `Relation.setSource(anchor)`.
|
|
23
|
-
db.add(thread);
|
|
24
|
-
yield* Effect.promise(() => sleep(100));
|
|
25
|
-
db.add(anchor);
|
|
26
|
-
|
|
27
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
28
|
-
name: 'threads.undo-delete',
|
|
29
|
-
properties: {
|
|
30
|
-
spaceId: db.spaceId,
|
|
31
|
-
threadId: thread.id,
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
}),
|
|
35
|
-
),
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default handler;
|
package/src/operations/select.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import { Operation } from '@dxos/operation';
|
|
9
|
-
|
|
10
|
-
import { ThreadCapabilities } from '../types';
|
|
11
|
-
import { Select } from './definitions';
|
|
12
|
-
|
|
13
|
-
const handler: Operation.WithHandler<typeof Select> = Select.pipe(
|
|
14
|
-
Operation.withHandler(
|
|
15
|
-
Effect.fnUntraced(function* (input) {
|
|
16
|
-
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
17
|
-
const stateAtom = yield* Capability.get(ThreadCapabilities.State);
|
|
18
|
-
const current = registry.get(stateAtom);
|
|
19
|
-
registry.set(stateAtom, { ...current, current: input.current });
|
|
20
|
-
}),
|
|
21
|
-
),
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
export default handler;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { Obj } from '@dxos/echo';
|
|
8
|
-
import { invariant } from '@dxos/invariant';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
11
|
-
|
|
12
|
-
import { ToggleResolved } from './definitions';
|
|
13
|
-
|
|
14
|
-
const handler: Operation.WithHandler<typeof ToggleResolved> = ToggleResolved.pipe(
|
|
15
|
-
Operation.withHandler(
|
|
16
|
-
Effect.fnUntraced(function* (input) {
|
|
17
|
-
const thread = input.thread;
|
|
18
|
-
|
|
19
|
-
Obj.change(thread, (thread) => {
|
|
20
|
-
if (thread.status === 'active' || thread.status === undefined) {
|
|
21
|
-
thread.status = 'resolved';
|
|
22
|
-
} else if (thread.status === 'resolved') {
|
|
23
|
-
thread.status = 'active';
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const db = Obj.getDatabase(thread);
|
|
28
|
-
invariant(db, 'Database not found');
|
|
29
|
-
|
|
30
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
31
|
-
name: 'threads.toggle-resolved',
|
|
32
|
-
properties: {
|
|
33
|
-
spaceId: db.spaceId,
|
|
34
|
-
threadId: thread.id,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
}),
|
|
38
|
-
),
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export default handler;
|
package/src/testing/data.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
6
|
-
import { IdentityDid } from '@dxos/keys';
|
|
7
|
-
import { random } from '@dxos/random';
|
|
8
|
-
import { type Identity } from '@dxos/react-client/halo';
|
|
9
|
-
import { Message, Thread } from '@dxos/types';
|
|
10
|
-
|
|
11
|
-
export const createCommentThread = (identity: Identity): Thread.Thread => {
|
|
12
|
-
return Thread.make({
|
|
13
|
-
name: 'Comment',
|
|
14
|
-
messages: random.helpers.multiple(
|
|
15
|
-
() =>
|
|
16
|
-
Ref.make(
|
|
17
|
-
Obj.make(Message.Message, {
|
|
18
|
-
created: new Date().toISOString(),
|
|
19
|
-
sender: {
|
|
20
|
-
identityDid: random.datatype.boolean() ? identity.did : IdentityDid.random(),
|
|
21
|
-
},
|
|
22
|
-
blocks: [{ _tag: 'text', text: random.lorem.sentences(3) }],
|
|
23
|
-
}),
|
|
24
|
-
),
|
|
25
|
-
{ count: { min: 2, max: 3 } },
|
|
26
|
-
),
|
|
27
|
-
status: 'active',
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const createProposalThread = (identity: Identity): Thread.Thread => {
|
|
32
|
-
return Thread.make({
|
|
33
|
-
name: 'Proposal',
|
|
34
|
-
messages: random.helpers.multiple(
|
|
35
|
-
() =>
|
|
36
|
-
Ref.make(
|
|
37
|
-
Obj.make(Message.Message, {
|
|
38
|
-
created: new Date().toISOString(),
|
|
39
|
-
sender: {
|
|
40
|
-
identityDid: random.datatype.boolean() ? identity.did : IdentityDid.random(),
|
|
41
|
-
},
|
|
42
|
-
blocks: [{ _tag: 'proposal', text: random.lorem.sentences(3) }],
|
|
43
|
-
}),
|
|
44
|
-
),
|
|
45
|
-
{ count: { min: 1, max: 1 } },
|
|
46
|
-
),
|
|
47
|
-
status: 'active',
|
|
48
|
-
});
|
|
49
|
-
};
|
package/src/testing/index.ts
DELETED
package/src/testing/stories.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Effect from 'effect/Effect';
|
|
6
|
-
|
|
7
|
-
import { type Plugin } from '@dxos/app-framework';
|
|
8
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
9
|
-
import { SpacePlugin } from '@dxos/plugin-space';
|
|
10
|
-
import { corePlugins } from '@dxos/plugin-testing';
|
|
11
|
-
import { Config } from '@dxos/react-client';
|
|
12
|
-
|
|
13
|
-
import { Channel } from '#types';
|
|
14
|
-
|
|
15
|
-
import { ThreadPlugin } from '../ThreadPlugin';
|
|
16
|
-
|
|
17
|
-
export const createThreadPlugins = async (): Promise<Array<Plugin.Plugin>> => [
|
|
18
|
-
...corePlugins(),
|
|
19
|
-
ClientPlugin({
|
|
20
|
-
onClientInitialized: ({ client }) =>
|
|
21
|
-
Effect.gen(function* () {
|
|
22
|
-
yield* Effect.promise(() => client.halo.createIdentity({ displayName: 'Test User' }));
|
|
23
|
-
}),
|
|
24
|
-
onSpacesReady: ({ client }) =>
|
|
25
|
-
Effect.gen(function* () {
|
|
26
|
-
const space = client.spaces.get()[0];
|
|
27
|
-
space.db.add(Channel.make());
|
|
28
|
-
}),
|
|
29
|
-
config: new Config({
|
|
30
|
-
runtime: {
|
|
31
|
-
client: {
|
|
32
|
-
edgeFeatures: {
|
|
33
|
-
signaling: true,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
services: {
|
|
37
|
-
edge: {
|
|
38
|
-
url: 'https://edge.dxos.workers.dev/',
|
|
39
|
-
},
|
|
40
|
-
iceProviders: [
|
|
41
|
-
{
|
|
42
|
-
urls: 'https://edge.dxos.workers.dev/ice',
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
}),
|
|
48
|
-
}),
|
|
49
|
-
SpacePlugin({}),
|
|
50
|
-
ThreadPlugin(),
|
|
51
|
-
];
|
package/src/types/Channel.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// @import-as-namespace
|
|
6
|
-
|
|
7
|
-
import * as Schema from 'effect/Schema';
|
|
8
|
-
|
|
9
|
-
import { Annotation, Obj, Ref, Type } from '@dxos/echo';
|
|
10
|
-
import { FormInputAnnotation } from '@dxos/echo/internal';
|
|
11
|
-
import { Thread } from '@dxos/types';
|
|
12
|
-
|
|
13
|
-
// TODO(burdon): What is the difference between Thread and Channel.
|
|
14
|
-
export const Channel = Schema.Struct({
|
|
15
|
-
name: Schema.optional(Schema.String),
|
|
16
|
-
defaultThread: Ref.Ref(Thread.Thread).pipe(FormInputAnnotation.set(false)),
|
|
17
|
-
// TODO(wittjosiah): Should be an "ordered collection".
|
|
18
|
-
threads: Ref.Ref(Thread.Thread).pipe(Schema.Array, FormInputAnnotation.set(false)),
|
|
19
|
-
}).pipe(
|
|
20
|
-
Type.object({
|
|
21
|
-
typename: 'org.dxos.type.channel',
|
|
22
|
-
version: '0.1.0',
|
|
23
|
-
}),
|
|
24
|
-
Annotation.IconAnnotation.set({
|
|
25
|
-
icon: 'ph--hash--regular',
|
|
26
|
-
hue: 'rose',
|
|
27
|
-
}),
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
export interface Channel extends Schema.Schema.Type<typeof Channel> {}
|
|
31
|
-
|
|
32
|
-
export const make = (props: Pick<Obj.MakeProps<typeof Channel>, 'name'> = {}) =>
|
|
33
|
-
Obj.make(Channel, {
|
|
34
|
-
...props,
|
|
35
|
-
defaultThread: Ref.make(Obj.make(Thread.Thread, { messages: [], status: 'active' })),
|
|
36
|
-
threads: [],
|
|
37
|
-
});
|
package/src/types/Settings.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
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 { meta } from '#meta';
|
|
10
|
-
|
|
11
|
-
import { type CallManager, type CallState, type MediaState } from '../calls';
|
|
12
|
-
import { type Channel, type ThreadState, type ViewStore } from '../types';
|
|
13
|
-
import * as Settings from './Settings';
|
|
14
|
-
|
|
15
|
-
export namespace ThreadCapabilities {
|
|
16
|
-
export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);
|
|
17
|
-
export const CallManager = Capability.make<CallManager>(`${meta.id}.capability.call-manager`);
|
|
18
|
-
|
|
19
|
-
// TODO(burdon): Better way to define specific extensions for meeting companions.
|
|
20
|
-
// TODO(burdon): This brings in deps from ../calls; how should we manage/minimize explicit type exposure to other plugins?
|
|
21
|
-
// TODO(wittjosiah): These callbacks could be intents once we support broadcast.
|
|
22
|
-
export type CallProperties = {
|
|
23
|
-
onJoin: (state: { channel?: Channel.Channel; roomId?: string }) => Promise<void>;
|
|
24
|
-
onLeave: (roomId?: string) => Promise<void>;
|
|
25
|
-
onCallStateUpdated: (callState: CallState) => Promise<void>;
|
|
26
|
-
onMediaStateUpdated: ([mediaState, isSpeaking]: [MediaState, boolean]) => Promise<void>;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const CallExtension = Capability.make<CallProperties>(`${meta.id}.capability.call-extension`);
|
|
30
|
-
|
|
31
|
-
/** Thread state (drafts, toolbar state, current selection). */
|
|
32
|
-
export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}.capability.state`);
|
|
33
|
-
|
|
34
|
-
/** Per-subject view state (e.g., showResolvedThreads). */
|
|
35
|
-
export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}.capability.view-state`);
|
|
36
|
-
}
|
package/src/types/types.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { AnchoredTo, Thread } from '@dxos/types';
|
|
6
|
-
|
|
7
|
-
export * as Settings from './Settings';
|
|
8
|
-
|
|
9
|
-
export interface ThreadModel {
|
|
10
|
-
root: Thread.Thread;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type SubjectId = string;
|
|
14
|
-
export type ViewState = { showResolvedThreads: boolean };
|
|
15
|
-
export type ViewStore = Record<SubjectId, ViewState>;
|
|
16
|
-
|
|
17
|
-
export type ThreadState = {
|
|
18
|
-
/** Object toolbar state. */
|
|
19
|
-
toolbar: Record<string, boolean>;
|
|
20
|
-
/** In-memory draft threads. */
|
|
21
|
-
// TODO(burdon): Drafts are getting lost.
|
|
22
|
-
drafts: Record<string, AnchoredTo.AnchoredTo[]>;
|
|
23
|
-
current?: string | undefined;
|
|
24
|
-
};
|