@dxos/plugin-thread 0.8.4-main.abd8ff62ef → 0.8.4-main.bc2380dfbc
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/README.md +1 -1
- package/dist/lib/neutral/ChannelArticle-ACZD7YFT.mjs +28 -0
- package/dist/lib/neutral/ChannelArticle-ACZD7YFT.mjs.map +7 -0
- package/dist/lib/neutral/ChannelChat-6YTD5HWL.mjs +10 -0
- package/dist/lib/neutral/ThreadCompanion-NQWPS2H6.mjs +208 -0
- package/dist/lib/neutral/ThreadCompanion-NQWPS2H6.mjs.map +7 -0
- package/dist/lib/neutral/ThreadContainer-XYEPEOSD.mjs +61 -0
- package/dist/lib/neutral/ThreadContainer-XYEPEOSD.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.mjs +80 -0
- package/dist/lib/neutral/ThreadPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs +40 -0
- package/dist/lib/neutral/ThreadPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs +24 -0
- package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs +15 -0
- package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs.map +7 -0
- package/dist/lib/{browser/add-message-LRVGIHDH.mjs → neutral/add-message-FBIROBEZ.mjs} +8 -10
- package/dist/lib/neutral/add-message-FBIROBEZ.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-7Q6MA6RT.mjs +120 -0
- package/dist/lib/neutral/app-graph-builder-7Q6MA6RT.mjs.map +7 -0
- package/dist/lib/{browser/append-channel-message-CO3M6FSA.mjs → neutral/append-channel-message-FTFAD3PK.mjs} +5 -5
- package/dist/lib/neutral/append-channel-message-FTFAD3PK.mjs.map +7 -0
- package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +25 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-5T5LPLBN.mjs} +4 -5
- package/dist/lib/neutral/chunk-5T5LPLBN.mjs.map +7 -0
- package/dist/lib/neutral/chunk-7GHUS3IX.mjs +20 -0
- package/dist/lib/neutral/chunk-7GHUS3IX.mjs.map +7 -0
- package/dist/lib/neutral/chunk-D5LGFCUY.mjs +55 -0
- package/dist/lib/neutral/chunk-D5LGFCUY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JLY4NVTA.mjs +38 -0
- package/dist/lib/neutral/chunk-JLY4NVTA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KRXHIW4P.mjs +164 -0
- package/dist/lib/neutral/chunk-KRXHIW4P.mjs.map +7 -0
- package/dist/lib/{browser/chunk-TPNZ43NB.mjs → neutral/chunk-PE7IH7EL.mjs} +86 -73
- package/dist/lib/neutral/chunk-PE7IH7EL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs +69 -0
- package/dist/lib/neutral/chunk-QFDT33VT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-QMLVLKE3.mjs +8 -0
- package/dist/lib/neutral/chunk-QMLVLKE3.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +539 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +15 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/{browser/create-BTGLHLBA.mjs → neutral/create-OAQJ6LXN.mjs} +7 -10
- package/dist/lib/neutral/create-OAQJ6LXN.mjs.map +7 -0
- package/dist/lib/{browser/create-channel-ZXKSLHGN.mjs → neutral/create-channel-3E4FJ662.mjs} +4 -4
- package/dist/lib/neutral/create-channel-3E4FJ662.mjs.map +7 -0
- package/dist/lib/neutral/create-object-HIEWSBZB.mjs +27 -0
- package/dist/lib/neutral/create-object-HIEWSBZB.mjs.map +7 -0
- package/dist/lib/{browser/create-proposals-AV5CREPV.mjs → neutral/create-proposals-GRYZXRMV.mjs} +4 -4
- package/dist/lib/neutral/create-proposals-GRYZXRMV.mjs.map +7 -0
- package/dist/lib/{browser/delete-GLYEP7NE.mjs → neutral/delete-HCCG5RVR.mjs} +7 -9
- package/dist/lib/neutral/delete-HCCG5RVR.mjs.map +7 -0
- package/dist/lib/{browser/delete-message-RQ72ZY5D.mjs → neutral/delete-message-DHFRACB4.mjs} +6 -7
- package/dist/lib/neutral/delete-message-DHFRACB4.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +10 -0
- package/dist/lib/neutral/index.mjs +28 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/markdown-BUORNCPG.mjs +83 -0
- package/dist/lib/neutral/markdown-BUORNCPG.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +10 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/{browser/on-create-space-SPE3QVFZ.mjs → neutral/on-create-space-OEBRKOAM.mjs} +5 -6
- package/dist/lib/neutral/on-create-space-OEBRKOAM.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-XY23GVZH.mjs +76 -0
- package/dist/lib/neutral/react-surface-XY23GVZH.mjs.map +7 -0
- package/dist/lib/{browser/restore-VX7FLZOZ.mjs → neutral/restore-P4ZLXLF7.mjs} +5 -5
- package/dist/lib/neutral/restore-P4ZLXLF7.mjs.map +7 -0
- package/dist/lib/{browser/restore-message-D65NSWUA.mjs → neutral/restore-message-AUBOP2DF.mjs} +5 -5
- package/dist/lib/neutral/restore-message-AUBOP2DF.mjs.map +7 -0
- package/dist/lib/{browser/select-AT4L7EBU.mjs → neutral/select-LIVAMBCE.mjs} +6 -8
- package/dist/lib/neutral/select-LIVAMBCE.mjs.map +7 -0
- package/dist/lib/neutral/settings-HK4EB6TF.mjs +30 -0
- package/dist/lib/neutral/settings-HK4EB6TF.mjs.map +7 -0
- package/dist/lib/neutral/state-UU7VEAKV.mjs +22 -0
- package/dist/lib/neutral/state-UU7VEAKV.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +58 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/{browser/toggle-resolved-JD3D4WBZ.mjs → neutral/toggle-resolved-RQBDQZSV.mjs} +5 -5
- package/dist/lib/neutral/toggle-resolved-RQBDQZSV.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/translations.mjs +2 -2
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +12 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs +54 -0
- package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs.map +7 -0
- package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
- package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -1
- 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/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 +7 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/Chat/Chat.d.ts +8 -1
- package/dist/types/src/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -1
- package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -1
- package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +13 -0
- package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -0
- package/dist/types/src/containers/{ChannelContainer/ChannelContainer.stories.d.ts → ChannelArticle/ChannelArticle.stories.d.ts} +4 -4
- 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/containers/{CallDebugPanel → ChannelArticle}/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts +4 -0
- package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts.map +1 -1
- package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +1 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/extensions/threads.d.ts +1 -1
- package/dist/types/src/extensions/threads.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -4
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/add-message.d.ts +2 -2
- package/dist/types/src/operations/add-message.d.ts.map +1 -1
- package/dist/types/src/operations/append-channel-message.d.ts +2 -2
- package/dist/types/src/operations/append-channel-message.d.ts.map +1 -1
- package/dist/types/src/operations/create-channel.d.ts +2 -2
- package/dist/types/src/operations/create-channel.d.ts.map +1 -1
- package/dist/types/src/operations/create-proposals.d.ts +2 -2
- package/dist/types/src/operations/create-proposals.d.ts.map +1 -1
- package/dist/types/src/operations/create.d.ts +2 -2
- package/dist/types/src/operations/create.d.ts.map +1 -1
- package/dist/types/src/operations/delete-message.d.ts +2 -2
- package/dist/types/src/operations/delete-message.d.ts.map +1 -1
- package/dist/types/src/operations/delete.d.ts +2 -2
- package/dist/types/src/operations/delete.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +0 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/on-create-space.d.ts +2 -2
- package/dist/types/src/operations/on-create-space.d.ts.map +1 -1
- package/dist/types/src/operations/restore-message.d.ts +2 -2
- package/dist/types/src/operations/restore-message.d.ts.map +1 -1
- package/dist/types/src/operations/restore.d.ts +2 -2
- package/dist/types/src/operations/restore.d.ts.map +1 -1
- package/dist/types/src/operations/select.d.ts +2 -2
- package/dist/types/src/operations/select.d.ts.map +1 -1
- package/dist/types/src/operations/toggle-resolved.d.ts +2 -2
- package/dist/types/src/operations/toggle-resolved.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/src/types/ThreadCapabilities.d.ts +13 -0
- package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -0
- package/dist/types/src/{operations/definitions.d.ts → types/ThreadOperation.d.ts} +1 -1
- package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +1 -1
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +4 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +123 -99
- package/src/ThreadPlugin.node.ts +5 -50
- package/src/ThreadPlugin.test.ts +3 -3
- package/src/ThreadPlugin.tsx +6 -59
- package/src/ThreadPlugin.workerd.ts +20 -0
- package/src/blueprints/thread-blueprint.ts +1 -1
- package/src/capabilities/app-graph-builder.ts +18 -69
- package/src/capabilities/create-object.ts +29 -0
- package/src/capabilities/index.ts +1 -2
- package/src/capabilities/markdown.ts +1 -1
- package/src/capabilities/react-surface.tsx +4 -26
- package/src/capabilities/settings.ts +1 -3
- package/src/capabilities/undo-mappings.ts +1 -1
- package/src/components/Chat/Chat.tsx +52 -12
- package/src/components/CommentsPanel/CommentsPanel.stories.tsx +1 -1
- package/src/components/CommentsPanel/CommentsPanel.tsx +4 -4
- package/src/components/CommentsPanel/CommentsThread.tsx +2 -3
- package/src/components/MessagePanel/MessagePanel.tsx +7 -8
- package/src/components/ThreadSettings/ThreadSettings.tsx +0 -1
- package/src/components/index.ts +0 -1
- package/src/containers/{ChannelContainer/ChannelContainer.stories.tsx → ChannelArticle/ChannelArticle.stories.tsx} +10 -10
- package/src/containers/ChannelArticle/ChannelArticle.tsx +42 -0
- package/src/containers/ChannelArticle/index.ts +5 -0
- package/src/containers/ChannelChat/ChannelChat.tsx +12 -2
- package/src/containers/ThreadCompanion/ThreadCompanion.tsx +10 -12
- package/src/containers/index.ts +1 -3
- package/src/extensions/command.ts +1 -1
- package/src/extensions/threads.ts +2 -2
- package/src/hooks/analytics.ts +1 -1
- package/src/hooks/index.ts +0 -5
- package/src/index.ts +3 -10
- package/src/meta.ts +1 -2
- package/src/operations/add-message.ts +4 -4
- package/src/operations/append-channel-message.ts +20 -19
- package/src/operations/create-channel.ts +2 -2
- package/src/operations/create-proposals.ts +2 -2
- package/src/operations/create.ts +3 -3
- package/src/operations/delete-message.ts +4 -4
- package/src/operations/delete.ts +3 -3
- package/src/operations/index.ts +0 -2
- package/src/operations/on-create-space.ts +3 -3
- package/src/operations/restore-message.ts +3 -3
- package/src/operations/restore.ts +3 -3
- package/src/operations/select.ts +2 -2
- package/src/operations/toggle-resolved.ts +3 -3
- package/src/plugin.ts +11 -0
- package/src/translations.ts +2 -2
- package/src/types/ThreadCapabilities.ts +26 -0
- package/src/{operations/definitions.ts → types/ThreadOperation.ts} +5 -4
- package/src/types/index.ts +4 -1
- package/src/types/types.ts +0 -2
- package/src/util.ts +36 -4
- package/dist/lib/browser/add-message-LRVGIHDH.mjs.map +0 -7
- package/dist/lib/browser/append-channel-message-CO3M6FSA.mjs.map +0 -7
- package/dist/lib/browser/blueprints/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-E4GG3NX2.mjs +0 -29
- package/dist/lib/browser/chunk-E4GG3NX2.mjs.map +0 -7
- package/dist/lib/browser/chunk-TPNZ43NB.mjs.map +0 -7
- package/dist/lib/browser/create-BTGLHLBA.mjs.map +0 -7
- package/dist/lib/browser/create-channel-ZXKSLHGN.mjs.map +0 -7
- package/dist/lib/browser/create-proposals-AV5CREPV.mjs.map +0 -7
- package/dist/lib/browser/delete-GLYEP7NE.mjs.map +0 -7
- package/dist/lib/browser/delete-message-RQ72ZY5D.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -1821
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/on-create-space-SPE3QVFZ.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/restore-VX7FLZOZ.mjs.map +0 -7
- package/dist/lib/browser/restore-message-D65NSWUA.mjs.map +0 -7
- package/dist/lib/browser/select-AT4L7EBU.mjs.map +0 -7
- package/dist/lib/browser/toggle-resolved-JD3D4WBZ.mjs.map +0 -7
- package/dist/lib/browser/translations.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node-esm/add-message-4EAQ2ZPI.mjs +0 -90
- package/dist/lib/node-esm/add-message-4EAQ2ZPI.mjs.map +0 -7
- package/dist/lib/node-esm/append-channel-message-F7KGBSWP.mjs +0 -41
- package/dist/lib/node-esm/append-channel-message-F7KGBSWP.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-BVEZBGIY.mjs +0 -30
- package/dist/lib/node-esm/chunk-BVEZBGIY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-XKUMDYGR.mjs +0 -259
- package/dist/lib/node-esm/chunk-XKUMDYGR.mjs.map +0 -7
- package/dist/lib/node-esm/create-DEZFPN2Y.mjs +0 -56
- package/dist/lib/node-esm/create-DEZFPN2Y.mjs.map +0 -7
- package/dist/lib/node-esm/create-channel-6VHTC2OR.mjs +0 -20
- package/dist/lib/node-esm/create-channel-6VHTC2OR.mjs.map +0 -7
- package/dist/lib/node-esm/create-proposals-P5O2ICOL.mjs +0 -57
- package/dist/lib/node-esm/create-proposals-P5O2ICOL.mjs.map +0 -7
- package/dist/lib/node-esm/delete-QG45QLPY.mjs +0 -60
- package/dist/lib/node-esm/delete-QG45QLPY.mjs.map +0 -7
- package/dist/lib/node-esm/delete-message-PGNLB6TL.mjs +0 -56
- package/dist/lib/node-esm/delete-message-PGNLB6TL.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -1822
- 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-TFBSHWQ4.mjs +0 -25
- package/dist/lib/node-esm/on-create-space-TFBSHWQ4.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/restore-E27OAIFJ.mjs +0 -33
- package/dist/lib/node-esm/restore-E27OAIFJ.mjs.map +0 -7
- package/dist/lib/node-esm/restore-message-J3CH6NGI.mjs +0 -34
- package/dist/lib/node-esm/restore-message-J3CH6NGI.mjs.map +0 -7
- package/dist/lib/node-esm/select-UU6Q2XAB.mjs +0 -27
- package/dist/lib/node-esm/select-UU6Q2XAB.mjs.map +0 -7
- package/dist/lib/node-esm/toggle-resolved-VS6NKXL3.mjs +0 -37
- package/dist/lib/node-esm/toggle-resolved-VS6NKXL3.mjs.map +0 -7
- package/dist/lib/node-esm/translations.mjs +0 -91
- package/dist/lib/node-esm/translations.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- 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 -21
- 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/call-manager.d.ts +0 -6
- package/dist/types/src/capabilities/call-manager.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/components/Call/Call.d.ts +0 -45
- 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/Lobby/Lobby.d.ts +0 -36
- 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/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/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/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.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/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/definitions.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -25
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- 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 -582
- 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 -129
- package/src/calls/util/task-scheduling.ts +0 -92
- package/src/calls-service.stories.tsx +0 -230
- package/src/capabilities/call-manager.ts +0 -27
- package/src/capabilities/react-root.tsx +0 -20
- 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/Lobby/Lobby.tsx +0 -123
- 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/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 -158
- package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +0 -341
- package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +0 -134
- package/src/components/ResponsiveGrid/ResponsivePanel.stories.tsx +0 -54
- package/src/components/ResponsiveGrid/ResponsivePanel.tsx +0 -31
- package/src/components/ResponsiveGrid/index.ts +0 -7
- 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.tsx +0 -223
- package/src/containers/ChannelContainer/index.ts +0 -5
- 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/types/capabilities.ts +0 -37
- package/src/typings/peermetrics-webrtc-stats.d.ts +0 -46
- package/src/typings.d.ts +0 -8
- /package/dist/lib/{browser/chunk-J5LGTIGS.mjs.map → neutral/ChannelChat-6YTD5HWL.mjs.map} +0 -0
- /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
- /package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- /package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
package/src/hooks/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -2,16 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { meta } from './meta';
|
|
8
|
-
|
|
9
|
-
export const ThreadPlugin = Plugin.lazy(meta, () => import('#plugin'));
|
|
10
|
-
|
|
11
|
-
export * from './meta';
|
|
12
|
-
|
|
13
|
-
export { ThreadCapabilities } from './types';
|
|
14
|
-
export * from './calls';
|
|
5
|
+
export * from './blueprints';
|
|
15
6
|
// TODO(wittjosiah): Hooks should not be exported from the plugin package at all.
|
|
16
7
|
// Either refactor callers to not need them or factor them out to a shared package.
|
|
17
8
|
export * from './hooks';
|
|
9
|
+
export * from './meta';
|
|
10
|
+
export * from './types';
|
package/src/meta.ts
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
import { type Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
|
-
// TODO(wittjosiah): Needs screenshots.
|
|
9
8
|
export const meta: Plugin.Meta = {
|
|
10
9
|
id: 'org.dxos.plugin.thread',
|
|
11
|
-
name: '
|
|
10
|
+
name: 'Threads',
|
|
12
11
|
description: trim`
|
|
13
12
|
Multi-modal communication platform supporting text chat, voice, and video conferencing.
|
|
14
13
|
Create threaded conversations and add contextual comments directly on any workspace object.
|
|
@@ -8,14 +8,14 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { Obj, Ref, Relation } from '@dxos/echo';
|
|
10
10
|
import { invariant } from '@dxos/invariant';
|
|
11
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
12
|
-
import { SpaceOperation } from '@dxos/plugin-space
|
|
11
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
12
|
+
import { SpaceOperation } from '@dxos/plugin-space';
|
|
13
13
|
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
14
14
|
|
|
15
15
|
import { ThreadCapabilities } from '../types';
|
|
16
|
-
import {
|
|
16
|
+
import { ThreadOperation } from '../types';
|
|
17
17
|
|
|
18
|
-
const handler: Operation.WithHandler<typeof AddMessage> = AddMessage.pipe(
|
|
18
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.AddMessage> = ThreadOperation.AddMessage.pipe(
|
|
19
19
|
Operation.withHandler(
|
|
20
20
|
Effect.fnUntraced(function* ({ anchor, subject, sender, text }) {
|
|
21
21
|
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
@@ -9,28 +9,29 @@ import { Operation } from '@dxos/compute';
|
|
|
9
9
|
import { Database, Feed, Obj } from '@dxos/echo';
|
|
10
10
|
import { createFeedServiceLayer } from '@dxos/echo-db';
|
|
11
11
|
import { invariant } from '@dxos/invariant';
|
|
12
|
-
import { ClientCapabilities } from '@dxos/plugin-client
|
|
12
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
13
13
|
import { Message } from '@dxos/types';
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { ThreadOperation } from '../types';
|
|
16
16
|
|
|
17
|
-
const handler: Operation.WithHandler<typeof AppendChannelMessage> =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.AppendChannelMessage> =
|
|
18
|
+
ThreadOperation.AppendChannelMessage.pipe(
|
|
19
|
+
Operation.withHandler(
|
|
20
|
+
Effect.fnUntraced(function* ({ channel, sender, text }) {
|
|
21
|
+
const db = Obj.getDatabase(channel);
|
|
22
|
+
invariant(db, 'Database not found');
|
|
23
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
24
|
+
const space = client.spaces.get(db.spaceId);
|
|
25
|
+
invariant(space, 'Space not found');
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
);
|
|
27
|
+
const feed = yield* Database.load(channel.feed);
|
|
28
|
+
const message = Message.make({
|
|
29
|
+
sender,
|
|
30
|
+
blocks: [{ _tag: 'text', text }],
|
|
31
|
+
});
|
|
32
|
+
yield* Feed.append(feed, [message]).pipe(Effect.provide(createFeedServiceLayer(space.queues)));
|
|
33
|
+
}),
|
|
34
|
+
),
|
|
35
|
+
);
|
|
35
36
|
|
|
36
37
|
export default handler;
|
|
@@ -7,9 +7,9 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Channel } from '@dxos/types';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { ThreadOperation } from '../types';
|
|
11
11
|
|
|
12
|
-
const handler: Operation.WithHandler<typeof CreateChannel> = CreateChannel.pipe(
|
|
12
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.CreateChannel> = ThreadOperation.CreateChannel.pipe(
|
|
13
13
|
Operation.withHandler((input) =>
|
|
14
14
|
Effect.sync(() => ({
|
|
15
15
|
object: Channel.make({ name: input.name }),
|
|
@@ -12,9 +12,9 @@ import { Database, Obj, Ref, Relation } from '@dxos/echo';
|
|
|
12
12
|
import { createDocAccessor } from '@dxos/echo-db';
|
|
13
13
|
import { AnchoredTo, Message, Thread } from '@dxos/types';
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { ThreadOperation } from '../types';
|
|
16
16
|
|
|
17
|
-
const handler: Operation.WithHandler<typeof CreateProposals> = CreateProposals.pipe(
|
|
17
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.CreateProposals> = ThreadOperation.CreateProposals.pipe(
|
|
18
18
|
Operation.withHandler(
|
|
19
19
|
Effect.fn(function* ({ doc, diffs }) {
|
|
20
20
|
const object = yield* Database.load(doc);
|
package/src/operations/create.ts
CHANGED
|
@@ -12,9 +12,9 @@ import { linkedSegment } from '@dxos/react-ui-attention';
|
|
|
12
12
|
import { AnchoredTo, Thread } from '@dxos/types';
|
|
13
13
|
|
|
14
14
|
import { ThreadCapabilities } from '../types';
|
|
15
|
-
import {
|
|
15
|
+
import { ThreadOperation } from '../types';
|
|
16
16
|
|
|
17
|
-
const handler: Operation.WithHandler<typeof Create> = Create.pipe(
|
|
17
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.Create> = ThreadOperation.Create.pipe(
|
|
18
18
|
Operation.withHandler(
|
|
19
19
|
Effect.fnUntraced(function* ({ name, anchor: _anchor, subject }) {
|
|
20
20
|
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
@@ -37,7 +37,7 @@ const handler: Operation.WithHandler<typeof Create> = Create.pipe(
|
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
yield* Operation.invoke(Select, { current: Obj.getDXN(thread).toString() });
|
|
40
|
+
yield* Operation.invoke(ThreadOperation.Select, { current: Obj.getDXN(thread).toString() });
|
|
41
41
|
yield* Operation.invoke(LayoutOperation.UpdateCompanion, {
|
|
42
42
|
subject: linkedSegment('comments'),
|
|
43
43
|
});
|
|
@@ -7,12 +7,12 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Obj, Relation } from '@dxos/echo';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
11
|
import { Thread } from '@dxos/types';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { ThreadOperation } from '../types';
|
|
14
14
|
|
|
15
|
-
const handler: Operation.WithHandler<typeof DeleteMessage> = DeleteMessage.pipe(
|
|
15
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.DeleteMessage> = ThreadOperation.DeleteMessage.pipe(
|
|
16
16
|
Operation.withHandler(
|
|
17
17
|
Effect.fnUntraced(function* ({ subject, anchor, messageId }) {
|
|
18
18
|
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
@@ -27,7 +27,7 @@ const handler: Operation.WithHandler<typeof DeleteMessage> = DeleteMessage.pipe(
|
|
|
27
27
|
|
|
28
28
|
if (msgIndex === 0 && thread.messages.length === 1) {
|
|
29
29
|
// TODO(wittjosiah): This doesn't support restoring the thread.
|
|
30
|
-
yield* Operation.invoke(Delete, { subject, anchor });
|
|
30
|
+
yield* Operation.invoke(ThreadOperation.Delete, { subject, anchor });
|
|
31
31
|
return { messageIndex: -1 };
|
|
32
32
|
}
|
|
33
33
|
|
package/src/operations/delete.ts
CHANGED
|
@@ -8,13 +8,13 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { sleep } from '@dxos/async';
|
|
9
9
|
import { Operation } from '@dxos/compute';
|
|
10
10
|
import { Obj, Relation } from '@dxos/echo';
|
|
11
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
11
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
12
12
|
import { Thread } from '@dxos/types';
|
|
13
13
|
|
|
14
14
|
import { ThreadCapabilities } from '../types';
|
|
15
|
-
import {
|
|
15
|
+
import { ThreadOperation } from '../types';
|
|
16
16
|
|
|
17
|
-
const handler: Operation.WithHandler<typeof Delete> = Delete.pipe(
|
|
17
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.Delete> = ThreadOperation.Delete.pipe(
|
|
18
18
|
Operation.withHandler(
|
|
19
19
|
Effect.fnUntraced(function* ({ subject, anchor, thread: _thread }) {
|
|
20
20
|
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
package/src/operations/index.ts
CHANGED
|
@@ -6,16 +6,16 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { ThreadOperation } from '../types';
|
|
10
10
|
|
|
11
|
-
const handler: Operation.WithHandler<typeof OnCreateSpace> = OnCreateSpace.pipe(
|
|
11
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.OnCreateSpace> = ThreadOperation.OnCreateSpace.pipe(
|
|
12
12
|
Operation.withHandler(
|
|
13
13
|
Effect.fnUntraced(function* ({ space, isDefault }) {
|
|
14
14
|
if (isDefault) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const { object: channel } = yield* Operation.invoke(CreateChannel, {
|
|
18
|
+
const { object: channel } = yield* Operation.invoke(ThreadOperation.CreateChannel, {
|
|
19
19
|
name: 'General',
|
|
20
20
|
spaceId: space.id,
|
|
21
21
|
});
|
|
@@ -7,12 +7,12 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Obj, Ref, Relation } from '@dxos/echo';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
11
|
import { Thread } from '@dxos/types';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { ThreadOperation } from '../types';
|
|
14
14
|
|
|
15
|
-
const handler: Operation.WithHandler<typeof RestoreMessage> = RestoreMessage.pipe(
|
|
15
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.RestoreMessage> = ThreadOperation.RestoreMessage.pipe(
|
|
16
16
|
Operation.withHandler(
|
|
17
17
|
Effect.fnUntraced(function* ({ anchor, message, messageIndex }) {
|
|
18
18
|
const thread = Relation.getSource(anchor) as Thread.Thread;
|
|
@@ -7,11 +7,11 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { sleep } from '@dxos/async';
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { ThreadOperation } from '../types';
|
|
13
13
|
|
|
14
|
-
const handler: Operation.WithHandler<typeof Restore> = Restore.pipe(
|
|
14
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.Restore> = ThreadOperation.Restore.pipe(
|
|
15
15
|
Operation.withHandler(
|
|
16
16
|
Effect.fnUntraced(function* ({ thread, anchor }) {
|
|
17
17
|
const db = Obj.getDatabase(thread);
|
package/src/operations/select.ts
CHANGED
|
@@ -8,9 +8,9 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
|
|
10
10
|
import { ThreadCapabilities } from '../types';
|
|
11
|
-
import {
|
|
11
|
+
import { ThreadOperation } from '../types';
|
|
12
12
|
|
|
13
|
-
const handler: Operation.WithHandler<typeof Select> = Select.pipe(
|
|
13
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.Select> = ThreadOperation.Select.pipe(
|
|
14
14
|
Operation.withHandler(
|
|
15
15
|
Effect.fnUntraced(function* (input) {
|
|
16
16
|
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
@@ -7,11 +7,11 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Obj } from '@dxos/echo';
|
|
9
9
|
import { invariant } from '@dxos/invariant';
|
|
10
|
-
import { ObservabilityOperation } from '@dxos/plugin-observability
|
|
10
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { ThreadOperation } from '../types';
|
|
13
13
|
|
|
14
|
-
const handler: Operation.WithHandler<typeof ToggleResolved> = ToggleResolved.pipe(
|
|
14
|
+
const handler: Operation.WithHandler<typeof ThreadOperation.ToggleResolved> = ThreadOperation.ToggleResolved.pipe(
|
|
15
15
|
Operation.withHandler(
|
|
16
16
|
Effect.fnUntraced(function* (input) {
|
|
17
17
|
const thread = input.thread;
|
package/src/plugin.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const ThreadPlugin = Plugin.lazy(meta, () => import('#plugin'));
|
|
10
|
+
|
|
11
|
+
export { ThreadOperationHandlerSet } from './operations';
|
package/src/translations.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Type } from '@dxos/echo';
|
|
6
5
|
import { type Resource } from '@dxos/react-ui';
|
|
7
6
|
import { Channel } from '@dxos/types';
|
|
8
7
|
|
|
@@ -11,7 +10,8 @@ import { meta } from '#meta';
|
|
|
11
10
|
export const translations = [
|
|
12
11
|
{
|
|
13
12
|
'en-US': {
|
|
14
|
-
|
|
13
|
+
// TODO(burdon): Thread.
|
|
14
|
+
[Channel.Channel.typename]: {
|
|
15
15
|
'typename.label': 'Channel',
|
|
16
16
|
'typename.label_zero': 'Channels',
|
|
17
17
|
'typename.label_one': 'Channel',
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { type Atom } from '@effect-atom/atom-react';
|
|
8
|
+
|
|
9
|
+
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
11
|
+
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
14
|
+
import { type ThreadState, type ViewStore } from '../types';
|
|
15
|
+
|
|
16
|
+
export const Settings = Capability.make<Atom.Writable<import('./Settings').Settings>>(`${meta.id}.capability.settings`);
|
|
17
|
+
|
|
18
|
+
/** Comment configuration contributed per typename by plugins that support commenting. */
|
|
19
|
+
export type CommentConfig = AppCapabilities.CommentConfig;
|
|
20
|
+
export const CommentConfig: Capability.InterfaceDef<AppCapabilities.CommentConfig> = AppCapabilities.CommentConfig;
|
|
21
|
+
|
|
22
|
+
/** Thread state (drafts, toolbar state, current selection). */
|
|
23
|
+
export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}.capability.state`);
|
|
24
|
+
|
|
25
|
+
/** Per-subject view state (e.g., showResolvedThreads). */
|
|
26
|
+
export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}.capability.view-state`);
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
5
7
|
import * as Schema from 'effect/Schema';
|
|
6
8
|
|
|
7
9
|
import { Capability } from '@dxos/app-framework';
|
|
10
|
+
import { SpaceSchema } from '@dxos/client-protocol';
|
|
8
11
|
import { Operation } from '@dxos/compute';
|
|
9
|
-
import { Database, Key, Obj, Ref } from '@dxos/echo';
|
|
10
|
-
import {
|
|
11
|
-
import { Markdown } from '@dxos/plugin-markdown/types';
|
|
12
|
-
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
12
|
+
import { Collection, Database, Key, Obj, Ref } from '@dxos/echo';
|
|
13
|
+
import { Markdown } from '@dxos/plugin-markdown';
|
|
13
14
|
import { Actor, AnchoredTo, Channel, Message, Thread } from '@dxos/types';
|
|
14
15
|
|
|
15
16
|
import { meta } from '#meta';
|
package/src/types/index.ts
CHANGED
package/src/types/types.ts
CHANGED
package/src/util.ts
CHANGED
|
@@ -9,18 +9,50 @@ import { type PublicKey } from '@dxos/react-client';
|
|
|
9
9
|
import { type Identity } from '@dxos/react-client/halo';
|
|
10
10
|
import { type Selection } from '@dxos/react-ui-attention';
|
|
11
11
|
import { type MessageMetadata } from '@dxos/react-ui-thread';
|
|
12
|
-
import { hexToFallback } from '@dxos/util';
|
|
12
|
+
import { hexToFallback, toFallback } from '@dxos/util';
|
|
13
13
|
|
|
14
14
|
export type MessagePropertiesProvider = (identityKey: PublicKey | undefined) => MessageMetadata;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Stable hash for an arbitrary string — used as the avatar-fallback seed for
|
|
18
|
+
* external senders who have no DXOS identity (e.g. Slack/Discord-synced
|
|
19
|
+
* messages). djb2-ish, only stability matters.
|
|
20
|
+
*
|
|
21
|
+
* Coerced to unsigned 32-bit via `>>> 0` because `toFallback` does a plain
|
|
22
|
+
* modulo against `idEmoji.length * idHue.length` and JavaScript's `%`
|
|
23
|
+
* preserves the sign of the dividend — a negative hash would index
|
|
24
|
+
* `idEmoji[-x]` and `idHue[-x]` to `undefined`, causing the avatar to fall
|
|
25
|
+
* through to `Avatar.Content`'s default red/ghost.
|
|
26
|
+
*/
|
|
27
|
+
const hashString = (s: string): number => {
|
|
28
|
+
let h = 0;
|
|
29
|
+
for (let i = 0; i < s.length; i++) {
|
|
30
|
+
h = (h * 31 + s.charCodeAt(i)) | 0;
|
|
31
|
+
}
|
|
32
|
+
return h >>> 0;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const getMessageMetadata = (
|
|
36
|
+
id: string,
|
|
37
|
+
identity?: Identity,
|
|
38
|
+
/**
|
|
39
|
+
* Externally-sourced sender info (Slack/Discord/etc). Used only when no
|
|
40
|
+
* matching DXOS `identity` is available — provides `name`/`email` for the
|
|
41
|
+
* author label and a stable seed for the avatar fallback.
|
|
42
|
+
*/
|
|
43
|
+
fallbackSender?: { name?: string; email?: string },
|
|
44
|
+
): MessageMetadata => {
|
|
45
|
+
const fallback = identity?.identityKey
|
|
46
|
+
? hexToFallback(identity.identityKey.toHex())
|
|
47
|
+
: toFallback(hashString(fallbackSender?.name ?? fallbackSender?.email ?? '0'));
|
|
18
48
|
return {
|
|
19
49
|
id,
|
|
20
50
|
authorId: identity?.did,
|
|
21
51
|
authorName:
|
|
22
52
|
identity?.profile?.displayName ??
|
|
23
|
-
(identity?.identityKey ? generateName(identity.identityKey.toHex()) : undefined)
|
|
53
|
+
(identity?.identityKey ? generateName(identity.identityKey.toHex()) : undefined) ??
|
|
54
|
+
fallbackSender?.name ??
|
|
55
|
+
fallbackSender?.email,
|
|
24
56
|
authorAvatarProps: {
|
|
25
57
|
hue: identity?.profile?.data?.hue ?? fallback.hue,
|
|
26
58
|
emoji: identity?.profile?.data?.emoji ?? fallback.emoji,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/add-message.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Obj, Ref, Relation } from '@dxos/echo';\nimport { invariant } from '@dxos/invariant';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/operations';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\nimport { AnchoredTo, Message, Thread } from '@dxos/types';\n\nimport { ThreadCapabilities } from '../types';\nimport { AddMessage } from './definitions';\n\nconst handler: Operation.WithHandler<typeof AddMessage> = AddMessage.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ anchor, subject, sender, text }) {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const stateAtom = yield* Capability.get(ThreadCapabilities.State);\n const thread = Relation.getSource(anchor) as Thread.Thread;\n const subjectId = Obj.getDXN(subject).toString();\n const db = Obj.getDatabase(subject);\n invariant(db, 'Database not found');\n\n const message = Obj.make(Message.Message, {\n created: new Date().toISOString(),\n sender,\n blocks: [{ _tag: 'text', text }],\n });\n Obj.update(thread, (thread) => {\n thread.messages.push(Ref.make(message));\n });\n\n const state = registry.get(stateAtom);\n const draft = state.drafts[subjectId]?.find((a: { id: string }) => a.id === anchor.id);\n if (draft) {\n Obj.update(thread, (thread) => {\n thread.status = 'active';\n });\n registry.set(stateAtom, {\n ...state,\n drafts: {\n ...state.drafts,\n [subjectId]: state.drafts[subjectId]?.filter((a: { id: string }) => a.id !== anchor.id),\n },\n });\n yield* Operation.invoke(SpaceOperation.AddObject, { object: thread, target: db, hidden: true });\n yield* Operation.invoke(SpaceOperation.AddRelation, {\n db,\n schema: AnchoredTo.AnchoredTo,\n source: thread,\n target: subject,\n fields: { anchor: draft.anchor },\n });\n yield* Operation.schedule(ObservabilityOperation.SendEvent, {\n name: 'threads.create',\n properties: {\n spaceId: db.spaceId,\n threadId: thread.id,\n },\n });\n }\n\n yield* Operation.schedule(ObservabilityOperation.SendEvent, {\n name: 'threads.message.add',\n properties: {\n spaceId: db.spaceId,\n threadId: thread.id,\n threadLength: thread.messages.length,\n messageId: message.id,\n messageLength: text.length,\n },\n });\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,iBAAiB;AAC1B,SAASC,KAAKC,KAAKC,gBAAgB;AACnC,SAASC,iBAAiB;AAC1B,SAASC,8BAA8B;AACvC,SAASC,sBAAsB;AAC/B,SAASC,YAAYC,eAAuB;AAK5C,IAAA,eAA0DC;IAIpD,UAAMC,WAAY,KAAOC,UAAWC,YAAIC,kBAAwB,WAAA,EAAA,QAAA,SAAA,QAAA,KAAA,GAAA;AAChE,QAAMC,WAASC,OAASC,WAAUC,IAAAA,aAAAA,YAAAA;AAClC,QAAMC,YAAYC,OAAIC,WAAOC,IAASC,mBAAQ,KAAA;AAC9C,QAAMC,SAASC,SAAAA,UAAYH,MAAAA;AAC3BI,QAAAA,YAAc,IAAA,OAAA,OAAA,EAAA,SAAA;AAEd,QAAMC,KAAAA,IAAAA,YAAmBC,OAAQA;YAC/BC,IAAS,sBAAsB,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,sBAAA,EAAA,CAAA;QAC/BC,UAAAA,IAAAA,KAAAA,QAAAA,SAAAA;IACAC,UAAQ,oBAAA,KAAA,GAAA,YAAA;;YAAGC;;QAAmB,MAAA;QAAE;MAClC;IACIC;;AAEJ,MAAA,OAAA,QAAA,CAAAlB,YAAA;AAEA,IAAAA,QAAMmB,SAAQC,KAAStB,IAAIF,KAAAA,OAAAA,CAAAA;EAC3B,CAAA;AACA,QAAIyB,QAAO,SAAA,IAAA,SAAA;QACThB,QAAU,MAACL,OAASA,SAAAA,GAAAA,KAAAA,CAAAA,MAAAA,EAAAA,OAAAA,OAAAA,EAAAA;aAClBA;AACF,QAAA,OAAA,QAAA,CAAAA,YAAA;AACAoB,MAAAA,QAASE,SAAI1B;;aAEX2B,IAAQ,WAAA;;cAELnB;QACH,GAAA,MAAA;QACF,CAAA,SAAA,GAAA,MAAA,OAAA,SAAA,GAAA,OAAA,CAAA,MAAA,EAAA,OAAA,OAAA,EAAA;MACA;;WAAoEoB,UAAQf,OAAAA,eAAAA,WAAAA;MAAIgB,QAAQ;MAAK,QAAA;MAC7F,QAAOC;;WAELC,UAAQC,OAAWA,eAAU,aAAA;MAC7BC;MACAL,QAAQjB,WAAAA;MACRuB,QAAQ;cAAE3B;MAAqB,QAAA;QACjC,QAAA,MAAA;MACA;;WAEE4B,UAAY,SAAA,uBAAA,WAAA;YACVC;kBACAC;QACF,SAAA,GAAA;QACF,UAAA,OAAA;MACF;IAEA,CAAA;;SAEEF,UAAY,SAAA,uBAAA,WAAA;UACVC;gBACAC;MACAC,SAAAA,GAAAA;MACAC,UAAAA,OAAWvB;MACXwB,cAAAA,OAAoBC,SAAM;MAC5B,WAAA,QAAA;MACF,eAAA,KAAA;IACF;EAIJ,CAAA;;;",
|
|
6
|
-
"names": ["Effect", "Capabilities", "Capability", "Operation", "Obj", "Ref", "Relation", "invariant", "ObservabilityOperation", "SpaceOperation", "AnchoredTo", "Message", "AddMessage", "stateAtom", "Capability", "get", "ThreadCapabilities", "thread", "Relation", "getSource", "anchor", "subjectId", "Obj", "getDXN", "subject", "toString", "db", "getDatabase", "invariant", "message", "Message", "created", "sender", "blocks", "_tag", "update", "state", "registry", "draft", "set", "drafts", "target", "hidden", "Operation", "schema", "AnchoredTo", "source", "fields", "properties", "spaceId", "threadId", "threadLength", "messageId", "messageLength", "length"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/append-channel-message.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Database, Feed, Obj } from '@dxos/echo';\nimport { createFeedServiceLayer } from '@dxos/echo-db';\nimport { invariant } from '@dxos/invariant';\nimport { ClientCapabilities } from '@dxos/plugin-client/types';\nimport { Message } from '@dxos/types';\n\nimport { AppendChannelMessage } from './definitions';\n\nconst handler: Operation.WithHandler<typeof AppendChannelMessage> = AppendChannelMessage.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ channel, sender, text }) {\n const db = Obj.getDatabase(channel);\n invariant(db, 'Database not found');\n const client = yield* Capability.get(ClientCapabilities.Client);\n const space = client.spaces.get(db.spaceId);\n invariant(space, 'Space not found');\n\n const feed = yield* Database.load(channel.feed);\n const message = Message.make({\n sender,\n blocks: [{ _tag: 'text', text }],\n });\n yield* Feed.append(feed, [message]).pipe(Effect.provide(createFeedServiceLayer(space.queues)));\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,MAAMC,WAAW;AACpC,SAASC,8BAA8B;AACvC,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,eAAe;AAIxB,IAAA,eAAoEC;IAI9DC,UAAUC,qBAAI,KAAA,UAAA,YAAA,kBAAA,WAAA,EAAA,SAAA,QAAA,KAAA,GAAA;AACd,QAAMC,KAAAA,IAAS,YAAOC,OAAWC;AACjC,YAAMC,IAAQH,sBAAqBI,EAAAA,YAAO,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,MAAA,sBAAA,EAAA,CAAA;AAC1CN,QAAAA,SAAUK,OAAO,WAAA,IAAA,mBAAA,MAAA;AAEjB,QAAME,QAAO,OAAOC,OAAAA,IAASC,GAAKC,OAAQH;AAC1C,YAAMI,OAAUC,mBAAa,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,SAAA,mBAAA,EAAA,CAAA;QAC3BC,OAAAA,OAAAA,SAAAA,KAAAA,QAAAA,IAAAA;QACAC,UAAQ,QAAA,KAAA;;YAAGC;;QAAmB,MAAA;QAAE;MAClC;IACA;;SAAwC,KAACC,OAAOC,MAAQC;IAC1D;EAIJ,CAAA,EAAA,KAAeC,eAAQ,uBAAA,MAAA,MAAA,CAAA,CAAA;;;",
|
|
6
|
-
"names": ["Effect", "Capability", "Operation", "Database", "Feed", "Obj", "createFeedServiceLayer", "invariant", "ClientCapabilities", "Message", "AppendChannelMessage", "invariant", "db", "client", "Capability", "get", "space", "spaceId", "feed", "Database", "load", "channel", "message", "Message", "sender", "blocks", "_tag", "Effect", "provide", "createFeedServiceLayer", "handler"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/blueprints/thread-blueprint.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Blueprint, Template } from '@dxos/compute';\nimport { trim } from '@dxos/util';\n\nimport { ThreadOperation } from '#operations';\n\nconst BLUEPRINT_KEY = 'org.dxos.blueprint.thread';\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Thread',\n tools: Blueprint.toolDefinitions({ operations: [ThreadOperation.CreateProposals] }),\n instructions: Template.make({\n // TODO(wittjosiah): Move example to function input schema annotation.\n source: trim`\n You can update markdown documents via proposals.\n For each diff, respond with the smallest possible matching span.\n For example:\n - \"There is a tyop in this sentence.\"\n + \"There is a typo in this sentence.\"\n - \"This id goof.\"\n + \"This is good.\"\n `,\n }),\n });\n\nconst blueprint: Blueprint.Definition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAASA,WAAWC,gBAAgB;AACpC,SAASC,YAAY;AAErB,SAASC,uBAAuB;AAEhC,IAAMC,gBAAgB;AAEtB,IAAMC,OAAO,MACXL,UAAUK,KAAK;EACbC,KAAKF;EACLG,MAAM;EACNC,OAAOR,UAAUS,gBAAgB;IAAEC,YAAY;MAACP,gBAAgBQ;;EAAiB,CAAA;EACjFC,cAAcX,SAASI,KAAK;;IAE1BQ,QAAQX;;;;;;;;;EASV,CAAA;AACF,CAAA;AAEF,IAAMY,YAAkC;EACtCR,KAAKF;EACLC;AACF;AAEA,IAAA,2BAAeS;",
|
|
6
|
-
"names": ["Blueprint", "Template", "trim", "ThreadOperation", "BLUEPRINT_KEY", "make", "key", "name", "tools", "toolDefinitions", "operations", "CreateProposals", "instructions", "source", "blueprint"]
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export
|
|
3
|
-
} from "./chunk-J5LGTIGS.mjs";
|
|
4
|
-
|
|
5
|
-
// src/types/capabilities.ts
|
|
6
|
-
import { Capability } from "@dxos/app-framework";
|
|
7
|
-
import { meta } from "#meta";
|
|
8
|
-
(function(ThreadCapabilities2) {
|
|
9
|
-
ThreadCapabilities2.Settings = Capability.make(`${meta.id}.capability.settings`);
|
|
10
|
-
ThreadCapabilities2.CallManager = Capability.make(`${meta.id}.capability.call-manager`);
|
|
11
|
-
ThreadCapabilities2.CallExtension = Capability.make(`${meta.id}.capability.call-extension`);
|
|
12
|
-
ThreadCapabilities2.State = Capability.make(`${meta.id}.capability.state`);
|
|
13
|
-
ThreadCapabilities2.ViewState = Capability.make(`${meta.id}.capability.view-state`);
|
|
14
|
-
})(ThreadCapabilities || (ThreadCapabilities = {}));
|
|
15
|
-
var ThreadCapabilities;
|
|
16
|
-
|
|
17
|
-
// src/types/Settings.ts
|
|
18
|
-
var Settings_exports = {};
|
|
19
|
-
__export(Settings_exports, {
|
|
20
|
-
Settings: () => Settings
|
|
21
|
-
});
|
|
22
|
-
import * as Schema from "effect/Schema";
|
|
23
|
-
var Settings = Schema.mutable(Schema.Struct({}));
|
|
24
|
-
|
|
25
|
-
export {
|
|
26
|
-
ThreadCapabilities,
|
|
27
|
-
Settings_exports
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=chunk-E4GG3NX2.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types/capabilities.ts", "../../../src/types/Settings.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Channel } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nimport { type CallManager, type CallState, type MediaState } from '../calls';\nimport { type ThreadState, type ViewStore } from '../types';\nimport * as Settings from './Settings';\n\nexport namespace ThreadCapabilities {\n export const Settings = Capability.make<Atom.Writable<Settings.Settings>>(`${meta.id}.capability.settings`);\n export const CallManager = Capability.make<CallManager>(`${meta.id}.capability.call-manager`);\n\n // TODO(burdon): Better way to define specific extensions for meeting companions.\n // TODO(burdon): This brings in deps from ../calls; how should we manage/minimize explicit type exposure to other plugins?\n // TODO(wittjosiah): These callbacks could be intents once we support broadcast.\n export type CallProperties = {\n onJoin: (state: { channel?: Channel.Channel; roomId?: string }) => Promise<void>;\n onLeave: (roomId?: string) => Promise<void>;\n onCallStateUpdated: (callState: CallState) => Promise<void>;\n onMediaStateUpdated: ([mediaState, isSpeaking]: [MediaState, boolean]) => Promise<void>;\n };\n\n export const CallExtension = Capability.make<CallProperties>(`${meta.id}.capability.call-extension`);\n\n /** Thread state (drafts, toolbar state, current selection). */\n export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}.capability.state`);\n\n /** Per-subject view state (e.g., showResolvedThreads). */\n export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}.capability.view-state`);\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nexport const Settings = Schema.mutable(Schema.Struct({}));\nexport interface Settings extends Schema.Schema.Type<typeof Settings> {}\n"],
|
|
5
|
-
"mappings": ";;;;;AAMA,SAASA,kBAAkB;AAG3B,SAASC,YAAY;UAMJC,qBAAAA;sBACFC,WAAWH,WAAWI,KAAuC,GAAGH,KAAKI,EAAE,sBAAsB;sBAC7FC,cAAcN,WAAWI,KAAkB,GAAGH,KAAKI,EAAE,0BAA0B;sBAY/EE,gBAAgBP,WAAWI,KAAqB,GAAGH,KAAKI,EAAE,4BAA4B;sBAGtFG,QAAQR,WAAWI,KAAiC,GAAGH,KAAKI,EAAE,mBAAmB;sBAGjFI,YAAYT,WAAWI,KAA+B,GAAGH,KAAKI,EAAE,wBAAwB;AACvG,GArBiBH,uBAAAA,qBAAAA,CAAAA,EAAAA;;;;ACfjB;;;;AAMA,YAAYQ,YAAY;AAEjB,IAAMC,WAAkBC,eAAeC,cAAO,CAAC,CAAA,CAAA;",
|
|
6
|
-
"names": ["Capability", "meta", "ThreadCapabilities", "Settings", "make", "id", "CallManager", "CallExtension", "State", "ViewState", "Schema", "Settings", "mutable", "Struct"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/definitions.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Database, Key, Obj, Ref } from '@dxos/echo';\nimport { Collection } from '@dxos/echo';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { SpaceSchema } from '@dxos/react-client/echo';\nimport { Actor, AnchoredTo, Channel, Message, Thread } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nconst THREAD_OPERATION = `${meta.id}.operation`;\n\nexport const OnCreateSpace = Operation.make({\n meta: { key: `${THREAD_OPERATION}.on-create-space`, name: 'On Create Space' },\n services: [Capability.Service],\n input: Schema.Struct({\n space: SpaceSchema,\n rootCollection: Collection.Collection,\n isDefault: Schema.Boolean.pipe(Schema.optional),\n }),\n output: Schema.Void,\n});\n\nexport const CreateChannel = Operation.make({\n meta: { key: `${THREAD_OPERATION}.create-channel`, name: 'Create Channel' },\n services: [Capability.Service],\n input: Schema.Struct({\n spaceId: Key.SpaceId,\n name: Schema.optional(Schema.String),\n }),\n output: Schema.Struct({\n object: Channel.Channel,\n }),\n});\n\nexport const AppendChannelMessage = Operation.make({\n meta: { key: `${THREAD_OPERATION}.append-channel-message`, name: 'Append Channel Message' },\n // Note: Feed.FeedService is provided inside the handler from space.queues, not at the\n // operation level — the runtime can't fulfill it without a space context.\n services: [Capability.Service],\n input: Schema.Struct({\n channel: Channel.Channel,\n sender: Actor.Actor,\n text: Schema.String,\n }),\n output: Schema.Void,\n});\n\nexport const Create = Operation.make({\n meta: { key: `${THREAD_OPERATION}.create`, name: 'Create Thread' },\n services: [Capability.Service],\n input: Schema.Struct({\n name: Schema.optional(Schema.String),\n anchor: Schema.optional(Schema.String),\n subject: Obj.Unknown,\n }),\n output: Schema.Void,\n});\n\nexport const DeleteOutput = Schema.Struct({\n thread: Thread.Thread.annotations({ description: 'The deleted thread.' }),\n anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The deleted anchor.' }),\n}).pipe(Schema.partial);\n\nexport type DeleteOutput = Schema.Schema.Type<typeof DeleteOutput>;\n\nexport const Delete = Operation.make({\n meta: { key: `${THREAD_OPERATION}.delete`, name: 'Delete Thread' },\n services: [Capability.Service],\n input: Schema.Struct({\n anchor: AnchoredTo.AnchoredTo,\n subject: Obj.Unknown,\n thread: Schema.optional(Thread.Thread),\n }),\n output: DeleteOutput,\n});\n\nexport const Select = Operation.make({\n meta: { key: `${THREAD_OPERATION}.select`, name: 'Select Thread' },\n services: [Capability.Service],\n input: Schema.Struct({\n current: Schema.String,\n }),\n output: Schema.Void,\n});\n\nexport const ToggleResolved = Operation.make({\n meta: { key: `${THREAD_OPERATION}.toggle-resolved`, name: 'Toggle Resolved' },\n services: [Capability.Service],\n input: Schema.Struct({\n thread: Thread.Thread,\n }),\n output: Schema.Void,\n});\n\nexport const AddMessage = Operation.make({\n meta: { key: `${THREAD_OPERATION}.add-message`, name: 'Add Message' },\n services: [Capability.Service],\n input: Schema.Struct({\n subject: Obj.Unknown,\n anchor: AnchoredTo.AnchoredTo,\n sender: Actor.Actor,\n text: Schema.String,\n }),\n output: Schema.Void,\n});\n\nexport const DeleteMessageOutput = Schema.partial(\n Schema.Struct({\n message: Message.Message.annotations({ description: 'The deleted message.' }),\n messageIndex: Schema.Number.annotations({ description: 'The index the message was at.' }),\n }),\n);\n\nexport type DeleteMessageOutput = Schema.Schema.Type<typeof DeleteMessageOutput>;\n\nexport const DeleteMessage = Operation.make({\n meta: { key: `${THREAD_OPERATION}.delete-message`, name: 'Delete Message' },\n services: [Capability.Service],\n input: Schema.Struct({\n anchor: AnchoredTo.AnchoredTo,\n subject: Obj.Unknown,\n messageId: Schema.String,\n }),\n output: DeleteMessageOutput,\n});\n\n/**\n * Restore a deleted thread (inverse of Delete).\n */\nexport const Restore = Operation.make({\n meta: { key: `${THREAD_OPERATION}.restore`, name: 'Restore Thread' },\n services: [Capability.Service],\n input: Schema.Struct({\n thread: Thread.Thread.annotations({ description: 'The thread to restore.' }),\n anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor relation to restore.' }),\n }),\n output: Schema.Void,\n});\n\n/**\n * Restore a deleted message (inverse of DeleteMessage).\n */\nexport const RestoreMessage = Operation.make({\n meta: { key: `${THREAD_OPERATION}.restore-message`, name: 'Restore Message' },\n services: [Capability.Service],\n input: Schema.Struct({\n anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor of the thread.' }),\n message: Message.Message.annotations({ description: 'The message to restore.' }),\n messageIndex: Schema.Number.annotations({ description: 'The index to restore the message at.' }),\n }),\n output: Schema.Void,\n});\n\nexport const CreateProposals = Operation.make({\n meta: {\n key: 'org.dxos.function.thread.create-proposals',\n name: 'Create Proposals',\n description: 'Proposes a set of changes to a document.',\n },\n input: Schema.Struct({\n doc: Ref.Ref(Markdown.Document).annotations({\n description: 'The ID of the document.',\n }),\n diffs: Schema.Array(Schema.String).annotations({\n description: 'The diffs to propose for the document.',\n }),\n }),\n output: Schema.Void,\n services: [Database.Service],\n});\n"],
|
|
5
|
-
"mappings": ";;;;;AAAA;;;;;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,UAAUC,KAAKC,KAAKC,WAAW;AACxC,SAASC,kBAAkB;AAC3B,SAASC,gBAAgB;AACzB,SAASC,mBAAmB;AAC5B,SAASC,OAAOC,YAAYC,SAASC,SAASC,cAAc;AAE5D,SAASC,YAAY;AAErB,IAAMC,mBAAmB,GAAGD,KAAKE,EAAE;AAE5B,IAAMC,gBAAgBhB,UAAUiB,KAAK;EAC1CJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAAoCK,MAAM;EAAkB;EAC5EC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBC,OAAOjB;IACPkB,gBAAgBpB,WAAWA;IAC3BqB,WAAkBC,eAAQC,KAAYC,eAAQ;EAChD,CAAA;EACAC,QAAeC;AACjB,CAAA;AAEO,IAAMC,gBAAgBhC,UAAUiB,KAAK;EAC1CJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAAmCK,MAAM;EAAiB;EAC1EC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBU,SAAS/B,IAAIgC;IACbf,MAAaU,gBAAgBM,aAAM;EACrC,CAAA;EACAL,QAAeP,cAAO;IACpBa,QAAQ1B,QAAQA;EAClB,CAAA;AACF,CAAA;AAEO,IAAM2B,uBAAuBrC,UAAUiB,KAAK;EACjDJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAA2CK,MAAM;EAAyB;;;EAG1FC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBe,SAAS5B,QAAQA;IACjB6B,QAAQ/B,MAAMA;IACdgC,MAAaL;EACf,CAAA;EACAL,QAAeC;AACjB,CAAA;AAEO,IAAMU,SAASzC,UAAUiB,KAAK;EACnCJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAA2BK,MAAM;EAAgB;EACjEC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBJ,MAAaU,gBAAgBM,aAAM;IACnCO,QAAeb,gBAAgBM,aAAM;IACrCQ,SAASxC,IAAIyC;EACf,CAAA;EACAd,QAAeC;AACjB,CAAA;AAEO,IAAMc,eAAsBtB,cAAO;EACxCuB,QAAQlC,OAAOA,OAAOmC,YAAY;IAAEC,aAAa;EAAsB,CAAA;EACvEN,QAAQjC,WAAWA,WAAWsC,YAAY;IAAEC,aAAa;EAAsB,CAAA;AACjF,CAAA,EAAGpB,KAAYqB,cAAO;AAIf,IAAMC,SAASlD,UAAUiB,KAAK;EACnCJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAA2BK,MAAM;EAAgB;EACjEC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBmB,QAAQjC,WAAWA;IACnBkC,SAASxC,IAAIyC;IACbE,QAAejB,gBAASjB,OAAOA,MAAM;EACvC,CAAA;EACAkB,QAAQe;AACV,CAAA;AAEO,IAAMM,SAASnD,UAAUiB,KAAK;EACnCJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAA2BK,MAAM;EAAgB;EACjEC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnB6B,SAAgBjB;EAClB,CAAA;EACAL,QAAeC;AACjB,CAAA;AAEO,IAAMsB,iBAAiBrD,UAAUiB,KAAK;EAC3CJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAAoCK,MAAM;EAAkB;EAC5EC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBuB,QAAQlC,OAAOA;EACjB,CAAA;EACAkB,QAAeC;AACjB,CAAA;AAEO,IAAMuB,aAAatD,UAAUiB,KAAK;EACvCJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAAgCK,MAAM;EAAc;EACpEC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBoB,SAASxC,IAAIyC;IACbF,QAAQjC,WAAWA;IACnB8B,QAAQ/B,MAAMA;IACdgC,MAAaL;EACf,CAAA;EACAL,QAAeC;AACjB,CAAA;AAEO,IAAMwB,sBAA6BN,eACjC1B,cAAO;EACZiC,SAAS7C,QAAQA,QAAQoC,YAAY;IAAEC,aAAa;EAAuB,CAAA;EAC3ES,cAAqBC,cAAOX,YAAY;IAAEC,aAAa;EAAgC,CAAA;AACzF,CAAA,CAAA;AAKK,IAAMW,gBAAgB3D,UAAUiB,KAAK;EAC1CJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAAmCK,MAAM;EAAiB;EAC1EC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBmB,QAAQjC,WAAWA;IACnBkC,SAASxC,IAAIyC;IACbgB,WAAkBzB;EACpB,CAAA;EACAL,QAAQyB;AACV,CAAA;AAKO,IAAMM,UAAU7D,UAAUiB,KAAK;EACpCJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAA4BK,MAAM;EAAiB;EACnEC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBuB,QAAQlC,OAAOA,OAAOmC,YAAY;MAAEC,aAAa;IAAyB,CAAA;IAC1EN,QAAQjC,WAAWA,WAAWsC,YAAY;MAAEC,aAAa;IAAkC,CAAA;EAC7F,CAAA;EACAlB,QAAeC;AACjB,CAAA;AAKO,IAAM+B,iBAAiB9D,UAAUiB,KAAK;EAC3CJ,MAAM;IAAEK,KAAK,GAAGJ,gBAAAA;IAAoCK,MAAM;EAAkB;EAC5EC,UAAU;IAACrB,WAAWsB;;EACtBC,OAAcC,cAAO;IACnBmB,QAAQjC,WAAWA,WAAWsC,YAAY;MAAEC,aAAa;IAA4B,CAAA;IACrFQ,SAAS7C,QAAQA,QAAQoC,YAAY;MAAEC,aAAa;IAA0B,CAAA;IAC9ES,cAAqBC,cAAOX,YAAY;MAAEC,aAAa;IAAuC,CAAA;EAChG,CAAA;EACAlB,QAAeC;AACjB,CAAA;AAEO,IAAMgC,kBAAkB/D,UAAUiB,KAAK;EAC5CJ,MAAM;IACJK,KAAK;IACLC,MAAM;IACN6B,aAAa;EACf;EACA1B,OAAcC,cAAO;IACnByC,KAAK5D,IAAIA,IAAIE,SAAS2D,QAAQ,EAAElB,YAAY;MAC1CC,aAAa;IACf,CAAA;IACAkB,OAAcC,aAAahC,aAAM,EAAEY,YAAY;MAC7CC,aAAa;IACf,CAAA;EACF,CAAA;EACAlB,QAAeC;EACfX,UAAU;IAACnB,SAASoB;;AACtB,CAAA;",
|
|
6
|
-
"names": ["Schema", "Capability", "Operation", "Database", "Key", "Obj", "Ref", "Collection", "Markdown", "SpaceSchema", "Actor", "AnchoredTo", "Channel", "Message", "Thread", "meta", "THREAD_OPERATION", "id", "OnCreateSpace", "make", "key", "name", "services", "Service", "input", "Struct", "space", "rootCollection", "isDefault", "Boolean", "pipe", "optional", "output", "Void", "CreateChannel", "spaceId", "SpaceId", "String", "object", "AppendChannelMessage", "channel", "sender", "text", "Create", "anchor", "subject", "Unknown", "DeleteOutput", "thread", "annotations", "description", "partial", "Delete", "Select", "current", "ToggleResolved", "AddMessage", "DeleteMessageOutput", "message", "messageIndex", "Number", "DeleteMessage", "messageId", "Restore", "RestoreMessage", "CreateProposals", "doc", "Document", "diffs", "Array"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/create.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Obj, Relation } from '@dxos/echo';\nimport { linkedSegment } from '@dxos/react-ui-attention';\nimport { AnchoredTo, Thread } from '@dxos/types';\n\nimport { ThreadCapabilities } from '../types';\nimport { Create, Select } from './definitions';\n\nconst handler: Operation.WithHandler<typeof Create> = Create.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, anchor: _anchor, subject }) {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const stateAtom = yield* Capability.get(ThreadCapabilities.State);\n const subjectId = Obj.getDXN(subject).toString();\n const thread = Thread.make({ name });\n const anchor = Relation.make(AnchoredTo.AnchoredTo, {\n [Relation.Source]: thread,\n [Relation.Target]: subject,\n anchor: _anchor,\n });\n\n const state = registry.get(stateAtom);\n const existingDrafts = state.drafts[subjectId];\n registry.set(stateAtom, {\n ...state,\n drafts: {\n ...state.drafts,\n [subjectId]: existingDrafts ? [...existingDrafts, anchor] : [anchor],\n },\n });\n\n yield* Operation.invoke(Select, { current: Obj.getDXN(thread).toString() });\n yield* Operation.invoke(LayoutOperation.UpdateCompanion, {\n subject: linkedSegment('comments'),\n });\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAChC,SAASC,iBAAiB;AAC1B,SAASC,KAAKC,gBAAgB;AAC9B,SAASC,qBAAqB;AAC9B,SAASC,YAAYC,cAAc;AAKnC,IAAMC,UAAgDC,OAAOC,KAC3DC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,QAAQC,SAASC,QAAO,GAAE;AAC7D,QAAMC,WAAW,OAAOC,WAAWC,IAAIC,aAAaC,YAAY;AAChE,QAAMC,YAAY,OAAOJ,WAAWC,IAAII,mBAAmBC,KAAK;AAChE,QAAMC,YAAYC,IAAIC,OAAOX,OAAAA,EAASY,SAAQ;AAC9C,QAAMC,SAASC,OAAOC,KAAK;IAAElB;EAAK,CAAA;AAClC,QAAMC,SAASkB,SAASD,KAAKE,WAAWA,YAAY;IAClD,CAACD,SAASE,MAAM,GAAGL;IACnB,CAACG,SAASG,MAAM,GAAGnB;IACnBF,QAAQC;EACV,CAAA;AAEA,QAAMqB,QAAQnB,SAASE,IAAIG,SAAAA;AAC3B,QAAMe,iBAAiBD,MAAME,OAAOb,SAAAA;AACpCR,WAASsB,IAAIjB,WAAW;IACtB,GAAGc;IACHE,QAAQ;MACN,GAAGF,MAAME;MACT,CAACb,SAAAA,GAAYY,iBAAiB;WAAIA;QAAgBvB;UAAU;QAACA;;IAC/D;EACF,CAAA;AAEA,SAAOJ,UAAU8B,OAAOC,QAAQ;IAAEC,SAAShB,IAAIC,OAAOE,MAAAA,EAAQD,SAAQ;EAAG,CAAA;AACzE,SAAOlB,UAAU8B,OAAOG,gBAAgBC,iBAAiB;IACvD5B,SAAS6B,cAAc,UAAA;EACzB,CAAA;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAetC;",
|
|
6
|
-
"names": ["Effect", "Capabilities", "Capability", "LayoutOperation", "Operation", "Obj", "Relation", "linkedSegment", "AnchoredTo", "Thread", "handler", "Create", "pipe", "Operation", "withHandler", "fnUntraced", "name", "anchor", "_anchor", "subject", "registry", "Capability", "get", "Capabilities", "AtomRegistry", "stateAtom", "ThreadCapabilities", "State", "subjectId", "Obj", "getDXN", "toString", "thread", "Thread", "make", "Relation", "AnchoredTo", "Source", "Target", "state", "existingDrafts", "drafts", "set", "invoke", "Select", "current", "LayoutOperation", "UpdateCompanion", "linkedSegment"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/operations/create-channel.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/compute';\nimport { Channel } from '@dxos/types';\n\nimport { CreateChannel } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CreateChannel> = CreateChannel.pipe(\n Operation.withHandler((input) =>\n Effect.sync(() => ({\n object: Channel.make({ name: input.name }),\n })),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AAIxB,IAAMC,UAAuDC,cAAcC,KACzEC,UAAUC,YAAY,CAACC,UACdC,YAAK,OAAO;EACjBC,QAAQC,QAAQC,KAAK;IAAEC,MAAML,MAAMK;EAAK,CAAA;AAC1C,EAAA,CAAA,CAAA;AAIJ,IAAA,yBAAeV;",
|
|
6
|
-
"names": ["Effect", "Operation", "Channel", "handler", "CreateChannel", "pipe", "Operation", "withHandler", "input", "sync", "object", "Channel", "make", "name"]
|
|
7
|
-
}
|