@dxos/plugin-thread 0.8.4-main.ae835ea → 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.
Files changed (571) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/neutral/ChannelArticle-ACZD7YFT.mjs +28 -0
  4. package/dist/lib/neutral/ChannelArticle-ACZD7YFT.mjs.map +7 -0
  5. package/dist/lib/neutral/ChannelChat-6YTD5HWL.mjs +10 -0
  6. package/dist/lib/neutral/ThreadCompanion-NQWPS2H6.mjs +208 -0
  7. package/dist/lib/neutral/ThreadCompanion-NQWPS2H6.mjs.map +7 -0
  8. package/dist/lib/neutral/ThreadContainer-XYEPEOSD.mjs +61 -0
  9. package/dist/lib/neutral/ThreadContainer-XYEPEOSD.mjs.map +7 -0
  10. package/dist/lib/neutral/ThreadPlugin.mjs +80 -0
  11. package/dist/lib/neutral/ThreadPlugin.mjs.map +7 -0
  12. package/dist/lib/neutral/ThreadPlugin.node.mjs +40 -0
  13. package/dist/lib/neutral/ThreadPlugin.node.mjs.map +7 -0
  14. package/dist/lib/neutral/ThreadPlugin.workerd.mjs +24 -0
  15. package/dist/lib/neutral/ThreadPlugin.workerd.mjs.map +7 -0
  16. package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs +15 -0
  17. package/dist/lib/neutral/ThreadSettings-5MKTDK3A.mjs.map +7 -0
  18. package/dist/lib/neutral/add-message-FBIROBEZ.mjs +87 -0
  19. package/dist/lib/neutral/add-message-FBIROBEZ.mjs.map +7 -0
  20. package/dist/lib/neutral/app-graph-builder-7Q6MA6RT.mjs +120 -0
  21. package/dist/lib/neutral/app-graph-builder-7Q6MA6RT.mjs.map +7 -0
  22. package/dist/lib/neutral/append-channel-message-FTFAD3PK.mjs +40 -0
  23. package/dist/lib/neutral/append-channel-message-FTFAD3PK.mjs.map +7 -0
  24. package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs +15 -0
  25. package/dist/lib/neutral/blueprint-definition-S3EBOH4R.mjs.map +7 -0
  26. package/dist/lib/neutral/blueprints/index.mjs +8 -0
  27. package/dist/lib/neutral/capabilities/index.mjs +25 -0
  28. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  29. package/dist/lib/neutral/chunk-5T5LPLBN.mjs +36 -0
  30. package/dist/lib/neutral/chunk-5T5LPLBN.mjs.map +7 -0
  31. package/dist/lib/{browser/chunk-K2DUJRFJ.mjs → neutral/chunk-7GHUS3IX.mjs} +4 -11
  32. package/dist/lib/neutral/chunk-7GHUS3IX.mjs.map +7 -0
  33. package/dist/lib/neutral/chunk-D5LGFCUY.mjs +55 -0
  34. package/dist/lib/neutral/chunk-D5LGFCUY.mjs.map +7 -0
  35. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  36. package/dist/lib/{browser/chunk-CP7E2HRE.mjs → neutral/chunk-JLY4NVTA.mjs} +12 -5
  37. package/dist/lib/neutral/chunk-JLY4NVTA.mjs.map +7 -0
  38. package/dist/lib/neutral/chunk-KRXHIW4P.mjs +164 -0
  39. package/dist/lib/neutral/chunk-KRXHIW4P.mjs.map +7 -0
  40. package/dist/lib/neutral/chunk-PE7IH7EL.mjs +271 -0
  41. package/dist/lib/neutral/chunk-PE7IH7EL.mjs.map +7 -0
  42. package/dist/lib/neutral/chunk-QFDT33VT.mjs +69 -0
  43. package/dist/lib/neutral/chunk-QFDT33VT.mjs.map +7 -0
  44. package/dist/lib/neutral/chunk-QMLVLKE3.mjs +8 -0
  45. package/dist/lib/neutral/chunk-QMLVLKE3.mjs.map +7 -0
  46. package/dist/lib/neutral/components/index.mjs +539 -0
  47. package/dist/lib/neutral/components/index.mjs.map +7 -0
  48. package/dist/lib/neutral/containers/index.mjs +15 -0
  49. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  50. package/dist/lib/neutral/create-OAQJ6LXN.mjs +52 -0
  51. package/dist/lib/neutral/create-OAQJ6LXN.mjs.map +7 -0
  52. package/dist/lib/neutral/create-channel-3E4FJ662.mjs +19 -0
  53. package/dist/lib/neutral/create-channel-3E4FJ662.mjs.map +7 -0
  54. package/dist/lib/neutral/create-object-HIEWSBZB.mjs +27 -0
  55. package/dist/lib/neutral/create-object-HIEWSBZB.mjs.map +7 -0
  56. package/dist/lib/neutral/create-proposals-GRYZXRMV.mjs +56 -0
  57. package/dist/lib/neutral/create-proposals-GRYZXRMV.mjs.map +7 -0
  58. package/dist/lib/neutral/delete-HCCG5RVR.mjs +57 -0
  59. package/dist/lib/neutral/delete-HCCG5RVR.mjs.map +7 -0
  60. package/dist/lib/neutral/delete-message-DHFRACB4.mjs +54 -0
  61. package/dist/lib/neutral/delete-message-DHFRACB4.mjs.map +7 -0
  62. package/dist/lib/neutral/hooks/index.mjs +10 -0
  63. package/dist/lib/neutral/index.mjs +28 -0
  64. package/dist/lib/neutral/markdown-BUORNCPG.mjs +83 -0
  65. package/dist/lib/neutral/markdown-BUORNCPG.mjs.map +7 -0
  66. package/dist/lib/neutral/meta.json +1 -0
  67. package/dist/lib/neutral/meta.mjs +10 -0
  68. package/dist/lib/neutral/on-create-space-OEBRKOAM.mjs +23 -0
  69. package/dist/lib/neutral/on-create-space-OEBRKOAM.mjs.map +7 -0
  70. package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs +13 -0
  71. package/dist/lib/neutral/operation-handler-RU6K2S4L.mjs.map +7 -0
  72. package/dist/lib/neutral/operations/index.mjs +8 -0
  73. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  74. package/dist/lib/neutral/plugin.mjs +16 -0
  75. package/dist/lib/neutral/plugin.mjs.map +7 -0
  76. package/dist/lib/neutral/react-surface-XY23GVZH.mjs +76 -0
  77. package/dist/lib/neutral/react-surface-XY23GVZH.mjs.map +7 -0
  78. package/dist/lib/neutral/restore-P4ZLXLF7.mjs +32 -0
  79. package/dist/lib/neutral/restore-P4ZLXLF7.mjs.map +7 -0
  80. package/dist/lib/neutral/restore-message-AUBOP2DF.mjs +33 -0
  81. package/dist/lib/neutral/restore-message-AUBOP2DF.mjs.map +7 -0
  82. package/dist/lib/neutral/select-LIVAMBCE.mjs +24 -0
  83. package/dist/lib/neutral/select-LIVAMBCE.mjs.map +7 -0
  84. package/dist/lib/neutral/settings-HK4EB6TF.mjs +30 -0
  85. package/dist/lib/neutral/settings-HK4EB6TF.mjs.map +7 -0
  86. package/dist/lib/neutral/state-UU7VEAKV.mjs +22 -0
  87. package/dist/lib/neutral/state-UU7VEAKV.mjs.map +7 -0
  88. package/dist/lib/neutral/testing/index.mjs +58 -0
  89. package/dist/lib/neutral/testing/index.mjs.map +7 -0
  90. package/dist/lib/neutral/toggle-resolved-RQBDQZSV.mjs +36 -0
  91. package/dist/lib/neutral/toggle-resolved-RQBDQZSV.mjs.map +7 -0
  92. package/dist/lib/neutral/translations.mjs +90 -0
  93. package/dist/lib/neutral/translations.mjs.map +7 -0
  94. package/dist/lib/neutral/types/index.mjs +12 -0
  95. package/dist/lib/neutral/types/index.mjs.map +7 -0
  96. package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs +54 -0
  97. package/dist/lib/neutral/undo-mappings-HOKL2L3M.mjs.map +7 -0
  98. package/dist/types/src/ThreadPlugin.d.ts +3 -1
  99. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  100. package/dist/types/src/ThreadPlugin.node.d.ts +4 -0
  101. package/dist/types/src/ThreadPlugin.node.d.ts.map +1 -0
  102. package/dist/types/src/ThreadPlugin.test.d.ts +2 -0
  103. package/dist/types/src/ThreadPlugin.test.d.ts.map +1 -0
  104. package/dist/types/src/ThreadPlugin.workerd.d.ts +4 -0
  105. package/dist/types/src/ThreadPlugin.workerd.d.ts.map +1 -0
  106. package/dist/types/src/blueprints/index.d.ts +2 -0
  107. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  108. package/dist/types/src/blueprints/thread-blueprint.d.ts +4 -0
  109. package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
  110. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  111. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  112. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  113. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  114. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  115. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  116. package/dist/types/src/capabilities/index.d.ts +15 -15
  117. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/markdown.d.ts +3 -2
  119. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  120. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  121. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  122. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  123. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  124. package/dist/types/src/capabilities/settings.d.ts +5 -2
  125. package/dist/types/src/capabilities/settings.d.ts.map +1 -1
  126. package/dist/types/src/capabilities/state.d.ts +5 -5
  127. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  128. package/dist/types/src/capabilities/undo-mappings.d.ts +5 -0
  129. package/dist/types/src/capabilities/undo-mappings.d.ts.map +1 -0
  130. package/dist/types/src/components/Chat/Chat.d.ts +51 -0
  131. package/dist/types/src/components/Chat/Chat.d.ts.map +1 -0
  132. package/dist/types/src/components/Chat/index.d.ts +2 -0
  133. package/dist/types/src/components/Chat/index.d.ts.map +1 -0
  134. package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts +13 -0
  135. package/dist/types/src/components/CommentsPanel/CommentsPanel.d.ts.map +1 -0
  136. package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts +160 -0
  137. package/dist/types/src/components/CommentsPanel/CommentsPanel.stories.d.ts.map +1 -0
  138. package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts +14 -0
  139. package/dist/types/src/components/CommentsPanel/CommentsThread.d.ts.map +1 -0
  140. package/dist/types/src/components/CommentsPanel/index.d.ts +3 -0
  141. package/dist/types/src/components/CommentsPanel/index.d.ts.map +1 -0
  142. package/dist/types/src/components/MessagePanel/MessagePanel.d.ts +15 -0
  143. package/dist/types/src/components/MessagePanel/MessagePanel.d.ts.map +1 -0
  144. package/dist/types/src/components/MessagePanel/index.d.ts +2 -0
  145. package/dist/types/src/components/MessagePanel/index.d.ts.map +1 -0
  146. package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts +6 -0
  147. package/dist/types/src/components/ThreadSettings/ThreadSettings.d.ts.map +1 -0
  148. package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts +161 -0
  149. package/dist/types/src/components/ThreadSettings/ThreadSettings.stories.d.ts.map +1 -0
  150. package/dist/types/src/components/ThreadSettings/index.d.ts +2 -0
  151. package/dist/types/src/components/ThreadSettings/index.d.ts.map +1 -0
  152. package/dist/types/src/components/index.d.ts +5 -10
  153. package/dist/types/src/components/index.d.ts.map +1 -1
  154. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts +13 -0
  155. package/dist/types/src/containers/ChannelArticle/ChannelArticle.d.ts.map +1 -0
  156. package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts +162 -0
  157. package/dist/types/src/containers/ChannelArticle/ChannelArticle.stories.d.ts.map +1 -0
  158. package/dist/types/src/containers/ChannelArticle/index.d.ts +2 -0
  159. package/dist/types/src/containers/ChannelArticle/index.d.ts.map +1 -0
  160. package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts +20 -0
  161. package/dist/types/src/containers/ChannelChat/ChannelChat.d.ts.map +1 -0
  162. package/dist/types/src/containers/ChannelChat/index.d.ts +4 -0
  163. package/dist/types/src/containers/ChannelChat/index.d.ts.map +1 -0
  164. package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts +8 -0
  165. package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -0
  166. package/dist/types/src/containers/ThreadCompanion/index.d.ts +2 -0
  167. package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +1 -0
  168. package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts +20 -0
  169. package/dist/types/src/containers/ThreadContainer/ThreadContainer.d.ts.map +1 -0
  170. package/dist/types/src/containers/ThreadContainer/ThreadContainer.stories.d.ts +162 -0
  171. package/dist/types/src/containers/ThreadContainer/ThreadContainer.stories.d.ts.map +1 -0
  172. package/dist/types/src/containers/ThreadContainer/index.d.ts +4 -0
  173. package/dist/types/src/containers/ThreadContainer/index.d.ts.map +1 -0
  174. package/dist/types/src/containers/index.d.ts +6 -0
  175. package/dist/types/src/containers/index.d.ts.map +1 -0
  176. package/dist/types/src/{components/command-extension.d.ts → extensions/command.d.ts} +1 -1
  177. package/dist/types/src/extensions/command.d.ts.map +1 -0
  178. package/dist/types/src/extensions/index.d.ts +1 -0
  179. package/dist/types/src/extensions/index.d.ts.map +1 -1
  180. package/dist/types/src/extensions/threads.d.ts +9 -4
  181. package/dist/types/src/extensions/threads.d.ts.map +1 -1
  182. package/dist/types/src/hooks/analytics.d.ts +2 -3
  183. package/dist/types/src/hooks/analytics.d.ts.map +1 -1
  184. package/dist/types/src/hooks/index.d.ts +0 -4
  185. package/dist/types/src/hooks/index.d.ts.map +1 -1
  186. package/dist/types/src/hooks/useStatus.d.ts.map +1 -1
  187. package/dist/types/src/index.d.ts +2 -3
  188. package/dist/types/src/index.d.ts.map +1 -1
  189. package/dist/types/src/meta.d.ts +2 -2
  190. package/dist/types/src/meta.d.ts.map +1 -1
  191. package/dist/types/src/operations/add-message.d.ts +5 -0
  192. package/dist/types/src/operations/add-message.d.ts.map +1 -0
  193. package/dist/types/src/operations/append-channel-message.d.ts +5 -0
  194. package/dist/types/src/operations/append-channel-message.d.ts.map +1 -0
  195. package/dist/types/src/operations/create-channel.d.ts +5 -0
  196. package/dist/types/src/operations/create-channel.d.ts.map +1 -0
  197. package/dist/types/src/operations/create-proposals.d.ts +5 -0
  198. package/dist/types/src/operations/create-proposals.d.ts.map +1 -0
  199. package/dist/types/src/operations/create.d.ts +5 -0
  200. package/dist/types/src/operations/create.d.ts.map +1 -0
  201. package/dist/types/src/operations/delete-message.d.ts +5 -0
  202. package/dist/types/src/operations/delete-message.d.ts.map +1 -0
  203. package/dist/types/src/operations/delete.d.ts +5 -0
  204. package/dist/types/src/operations/delete.d.ts.map +1 -0
  205. package/dist/types/src/operations/index.d.ts +3 -0
  206. package/dist/types/src/operations/index.d.ts.map +1 -0
  207. package/dist/types/src/operations/on-create-space.d.ts +5 -0
  208. package/dist/types/src/operations/on-create-space.d.ts.map +1 -0
  209. package/dist/types/src/operations/restore-message.d.ts +5 -0
  210. package/dist/types/src/operations/restore-message.d.ts.map +1 -0
  211. package/dist/types/src/operations/restore.d.ts +5 -0
  212. package/dist/types/src/operations/restore.d.ts.map +1 -0
  213. package/dist/types/src/operations/select.d.ts +5 -0
  214. package/dist/types/src/operations/select.d.ts.map +1 -0
  215. package/dist/types/src/operations/toggle-resolved.d.ts +5 -0
  216. package/dist/types/src/operations/toggle-resolved.d.ts.map +1 -0
  217. package/dist/types/src/plugin.d.ts +4 -0
  218. package/dist/types/src/plugin.d.ts.map +1 -0
  219. package/dist/types/src/{components/testing.d.ts → testing/data.d.ts} +2 -2
  220. package/dist/types/src/testing/data.d.ts.map +1 -0
  221. package/dist/types/src/testing/index.d.ts +1 -1
  222. package/dist/types/src/testing/index.d.ts.map +1 -1
  223. package/dist/types/src/translations.d.ts +140 -138
  224. package/dist/types/src/translations.d.ts.map +1 -1
  225. package/dist/types/src/types/Settings.d.ts +5 -0
  226. package/dist/types/src/types/Settings.d.ts.map +1 -0
  227. package/dist/types/src/types/ThreadCapabilities.d.ts +13 -0
  228. package/dist/types/src/types/ThreadCapabilities.d.ts.map +1 -0
  229. package/dist/types/src/types/ThreadOperation.d.ts +1995 -0
  230. package/dist/types/src/types/ThreadOperation.d.ts.map +1 -0
  231. package/dist/types/src/types/index.d.ts +3 -2
  232. package/dist/types/src/types/index.d.ts.map +1 -1
  233. package/dist/types/src/types/types.d.ts +2 -442
  234. package/dist/types/src/types/types.d.ts.map +1 -1
  235. package/dist/types/src/util.d.ts +6 -3
  236. package/dist/types/src/util.d.ts.map +1 -1
  237. package/dist/types/tsconfig.tsbuildinfo +1 -1
  238. package/package.json +151 -86
  239. package/src/ThreadPlugin.node.ts +39 -0
  240. package/src/ThreadPlugin.test.ts +37 -0
  241. package/src/ThreadPlugin.tsx +43 -130
  242. package/src/ThreadPlugin.workerd.ts +20 -0
  243. package/src/blueprints/index.ts +5 -0
  244. package/src/blueprints/thread-blueprint.ts +36 -0
  245. package/src/capabilities/app-graph-builder.ts +124 -167
  246. package/src/capabilities/blueprint-definition.ts +19 -0
  247. package/src/capabilities/create-object.ts +29 -0
  248. package/src/capabilities/index.ts +15 -12
  249. package/src/capabilities/markdown.ts +53 -36
  250. package/src/capabilities/operation-handler.ts +16 -0
  251. package/src/capabilities/react-surface.tsx +64 -78
  252. package/src/capabilities/settings.ts +26 -12
  253. package/src/capabilities/state.ts +14 -18
  254. package/src/capabilities/undo-mappings.ts +46 -0
  255. package/src/components/Chat/Chat.tsx +258 -0
  256. package/src/components/Chat/index.ts +5 -0
  257. package/src/components/CommentsPanel/CommentsPanel.stories.tsx +95 -0
  258. package/src/components/{CommentsContainer.tsx → CommentsPanel/CommentsPanel.tsx} +19 -20
  259. package/src/components/{CommentsThreadContainer.tsx → CommentsPanel/CommentsThread.tsx} +44 -47
  260. package/src/components/CommentsPanel/index.ts +6 -0
  261. package/src/components/{MessageContainer.tsx → MessagePanel/MessagePanel.tsx} +83 -47
  262. package/src/components/MessagePanel/index.ts +5 -0
  263. package/src/components/ThreadSettings/ThreadSettings.stories.tsx +32 -0
  264. package/src/components/ThreadSettings/ThreadSettings.tsx +19 -0
  265. package/src/components/ThreadSettings/index.ts +5 -0
  266. package/src/components/index.ts +5 -12
  267. package/src/containers/ChannelArticle/ChannelArticle.stories.tsx +105 -0
  268. package/src/containers/ChannelArticle/ChannelArticle.tsx +42 -0
  269. package/src/containers/ChannelArticle/index.ts +5 -0
  270. package/src/containers/ChannelChat/ChannelChat.tsx +75 -0
  271. package/src/containers/ChannelChat/index.ts +8 -0
  272. package/src/containers/ThreadCompanion/ThreadCompanion.tsx +215 -0
  273. package/src/containers/ThreadCompanion/index.ts +5 -0
  274. package/src/{components/Chat.stories.tsx → containers/ThreadContainer/ThreadContainer.stories.tsx} +27 -26
  275. package/src/containers/ThreadContainer/ThreadContainer.tsx +75 -0
  276. package/src/containers/ThreadContainer/index.ts +8 -0
  277. package/src/containers/index.ts +10 -0
  278. package/src/{components/command-extension.ts → extensions/command.ts} +3 -3
  279. package/src/extensions/index.ts +1 -0
  280. package/src/extensions/threads.ts +84 -39
  281. package/src/hooks/analytics.ts +22 -21
  282. package/src/hooks/index.ts +0 -4
  283. package/src/index.ts +4 -4
  284. package/src/meta.ts +5 -6
  285. package/src/operations/add-message.ts +81 -0
  286. package/src/operations/append-channel-message.ts +37 -0
  287. package/src/operations/create-channel.ts +20 -0
  288. package/src/operations/create-proposals.ts +49 -0
  289. package/src/operations/create.ts +48 -0
  290. package/src/operations/delete-message.ts +53 -0
  291. package/src/operations/delete.ts +63 -0
  292. package/src/operations/index.ts +20 -0
  293. package/src/operations/on-create-space.ts +27 -0
  294. package/src/operations/restore-message.ts +38 -0
  295. package/src/operations/restore.ts +38 -0
  296. package/src/operations/select.ts +24 -0
  297. package/src/operations/toggle-resolved.ts +41 -0
  298. package/src/plugin.ts +11 -0
  299. package/src/{components/testing.ts → testing/data.ts} +10 -12
  300. package/src/testing/index.ts +1 -1
  301. package/src/translations.ts +74 -76
  302. package/src/types/Settings.ts +10 -0
  303. package/src/types/ThreadCapabilities.ts +26 -0
  304. package/src/types/ThreadOperation.ts +178 -0
  305. package/src/types/index.ts +4 -2
  306. package/src/types/types.ts +3 -109
  307. package/src/util.ts +37 -5
  308. package/dist/lib/browser/ChannelContainer-SVV4ZX5T.mjs +0 -16
  309. package/dist/lib/browser/ChatContainer-ALFWQ65B.mjs +0 -15
  310. package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs +0 -171
  311. package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs.map +0 -7
  312. package/dist/lib/browser/call-manager-P3MYR2JS.mjs +0 -24
  313. package/dist/lib/browser/call-manager-P3MYR2JS.mjs.map +0 -7
  314. package/dist/lib/browser/chunk-6CUDBEYP.mjs +0 -377
  315. package/dist/lib/browser/chunk-6CUDBEYP.mjs.map +0 -7
  316. package/dist/lib/browser/chunk-BBTXGRIR.mjs +0 -18
  317. package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +0 -7
  318. package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +0 -7
  319. package/dist/lib/browser/chunk-DJOUMWEL.mjs +0 -988
  320. package/dist/lib/browser/chunk-DJOUMWEL.mjs.map +0 -7
  321. package/dist/lib/browser/chunk-HDEQRBOC.mjs +0 -181
  322. package/dist/lib/browser/chunk-HDEQRBOC.mjs.map +0 -7
  323. package/dist/lib/browser/chunk-IQSXEHOW.mjs +0 -618
  324. package/dist/lib/browser/chunk-IQSXEHOW.mjs.map +0 -7
  325. package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +0 -7
  326. package/dist/lib/browser/chunk-L6F2AG6W.mjs +0 -23
  327. package/dist/lib/browser/chunk-L6F2AG6W.mjs.map +0 -7
  328. package/dist/lib/browser/chunk-US5ZQYC3.mjs +0 -1793
  329. package/dist/lib/browser/chunk-US5ZQYC3.mjs.map +0 -7
  330. package/dist/lib/browser/chunk-UTSLSZED.mjs +0 -178
  331. package/dist/lib/browser/chunk-UTSLSZED.mjs.map +0 -7
  332. package/dist/lib/browser/chunk-XYUJXHYV.mjs +0 -106
  333. package/dist/lib/browser/chunk-XYUJXHYV.mjs.map +0 -7
  334. package/dist/lib/browser/index.mjs +0 -313
  335. package/dist/lib/browser/index.mjs.map +0 -7
  336. package/dist/lib/browser/intent-resolver-5POQTZ24.mjs +0 -419
  337. package/dist/lib/browser/intent-resolver-5POQTZ24.mjs.map +0 -7
  338. package/dist/lib/browser/markdown-L7LDNF56.mjs +0 -169
  339. package/dist/lib/browser/markdown-L7LDNF56.mjs.map +0 -7
  340. package/dist/lib/browser/meta.json +0 -1
  341. package/dist/lib/browser/react-root-RCJLK4EP.mjs +0 -28
  342. package/dist/lib/browser/react-root-RCJLK4EP.mjs.map +0 -7
  343. package/dist/lib/browser/react-surface-IC576W2W.mjs +0 -109
  344. package/dist/lib/browser/react-surface-IC576W2W.mjs.map +0 -7
  345. package/dist/lib/browser/settings-5FYGBOGI.mjs +0 -22
  346. package/dist/lib/browser/settings-5FYGBOGI.mjs.map +0 -7
  347. package/dist/lib/browser/state-36REWXO5.mjs +0 -34
  348. package/dist/lib/browser/state-36REWXO5.mjs.map +0 -7
  349. package/dist/lib/browser/toolkit-PXASLYEQ.mjs +0 -74
  350. package/dist/lib/browser/toolkit-PXASLYEQ.mjs.map +0 -7
  351. package/dist/lib/browser/types/index.mjs +0 -14
  352. package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs +0 -17
  353. package/dist/lib/node-esm/ChatContainer-MFKPXMIK.mjs +0 -16
  354. package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs +0 -172
  355. package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs.map +0 -7
  356. package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs +0 -25
  357. package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs.map +0 -7
  358. package/dist/lib/node-esm/chunk-2MMJF7DW.mjs +0 -182
  359. package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +0 -7
  360. package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs +0 -108
  361. package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs.map +0 -7
  362. package/dist/lib/node-esm/chunk-ABUFOZVX.mjs +0 -33
  363. package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +0 -7
  364. package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs +0 -25
  365. package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs.map +0 -7
  366. package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs +0 -1794
  367. package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs.map +0 -7
  368. package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs +0 -378
  369. package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs.map +0 -7
  370. package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs +0 -619
  371. package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs.map +0 -7
  372. package/dist/lib/node-esm/chunk-QCQAAU6J.mjs +0 -989
  373. package/dist/lib/node-esm/chunk-QCQAAU6J.mjs.map +0 -7
  374. package/dist/lib/node-esm/chunk-TYLLHI46.mjs +0 -179
  375. package/dist/lib/node-esm/chunk-TYLLHI46.mjs.map +0 -7
  376. package/dist/lib/node-esm/chunk-XI45H4IV.mjs +0 -28
  377. package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +0 -7
  378. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +0 -19
  379. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +0 -7
  380. package/dist/lib/node-esm/index.mjs +0 -314
  381. package/dist/lib/node-esm/index.mjs.map +0 -7
  382. package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs +0 -420
  383. package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs.map +0 -7
  384. package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs +0 -170
  385. package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs.map +0 -7
  386. package/dist/lib/node-esm/meta.json +0 -1
  387. package/dist/lib/node-esm/react-root-4IDB2SN2.mjs +0 -29
  388. package/dist/lib/node-esm/react-root-4IDB2SN2.mjs.map +0 -7
  389. package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs +0 -110
  390. package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs.map +0 -7
  391. package/dist/lib/node-esm/settings-EOBQUZSW.mjs +0 -23
  392. package/dist/lib/node-esm/settings-EOBQUZSW.mjs.map +0 -7
  393. package/dist/lib/node-esm/state-X3W67GTL.mjs +0 -35
  394. package/dist/lib/node-esm/state-X3W67GTL.mjs.map +0 -7
  395. package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs +0 -75
  396. package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs.map +0 -7
  397. package/dist/lib/node-esm/types/index.mjs +0 -15
  398. package/dist/types/src/calls/call-manager.d.ts +0 -77
  399. package/dist/types/src/calls/call-manager.d.ts.map +0 -1
  400. package/dist/types/src/calls/call-swarm-synchronizer.d.ts +0 -66
  401. package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +0 -1
  402. package/dist/types/src/calls/index.d.ts +0 -7
  403. package/dist/types/src/calls/index.d.ts.map +0 -1
  404. package/dist/types/src/calls/media-manager.d.ts +0 -60
  405. package/dist/types/src/calls/media-manager.d.ts.map +0 -1
  406. package/dist/types/src/calls/speaking-monitor.d.ts +0 -24
  407. package/dist/types/src/calls/speaking-monitor.d.ts.map +0 -1
  408. package/dist/types/src/calls/types.d.ts +0 -45
  409. package/dist/types/src/calls/types.d.ts.map +0 -1
  410. package/dist/types/src/calls/util/audio.d.ts +0 -6
  411. package/dist/types/src/calls/util/audio.d.ts.map +0 -1
  412. package/dist/types/src/calls/util/calls-service.d.ts +0 -77
  413. package/dist/types/src/calls/util/calls-service.d.ts.map +0 -1
  414. package/dist/types/src/calls/util/history-cache.d.ts +0 -11
  415. package/dist/types/src/calls/util/history-cache.d.ts.map +0 -1
  416. package/dist/types/src/calls/util/index.d.ts +0 -5
  417. package/dist/types/src/calls/util/index.d.ts.map +0 -1
  418. package/dist/types/src/calls/util/media.d.ts +0 -6
  419. package/dist/types/src/calls/util/media.d.ts.map +0 -1
  420. package/dist/types/src/calls/util/stub-media-streams.d.ts +0 -18
  421. package/dist/types/src/calls/util/stub-media-streams.d.ts.map +0 -1
  422. package/dist/types/src/calls/util/task-scheduling.d.ts +0 -17
  423. package/dist/types/src/calls/util/task-scheduling.d.ts.map +0 -1
  424. package/dist/types/src/calls-service.stories.d.ts +0 -23
  425. package/dist/types/src/calls-service.stories.d.ts.map +0 -1
  426. package/dist/types/src/capabilities/call-manager.d.ts +0 -5
  427. package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
  428. package/dist/types/src/capabilities/capabilities.d.ts +0 -27
  429. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  430. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  431. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  432. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  433. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  434. package/dist/types/src/capabilities/toolkit.d.ts +0 -24
  435. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  436. package/dist/types/src/components/Call/Call.d.ts +0 -17
  437. package/dist/types/src/components/Call/Call.d.ts.map +0 -1
  438. package/dist/types/src/components/Call/Toolbar.d.ts +0 -16
  439. package/dist/types/src/components/Call/Toolbar.d.ts.map +0 -1
  440. package/dist/types/src/components/Call/index.d.ts +0 -3
  441. package/dist/types/src/components/Call/index.d.ts.map +0 -1
  442. package/dist/types/src/components/CallDebugPanel.d.ts +0 -15
  443. package/dist/types/src/components/CallDebugPanel.d.ts.map +0 -1
  444. package/dist/types/src/components/CallSidebar.d.ts +0 -4
  445. package/dist/types/src/components/CallSidebar.d.ts.map +0 -1
  446. package/dist/types/src/components/ChannelContainer.d.ts +0 -14
  447. package/dist/types/src/components/ChannelContainer.d.ts.map +0 -1
  448. package/dist/types/src/components/ChannelContainer.stories.d.ts +0 -160
  449. package/dist/types/src/components/ChannelContainer.stories.d.ts.map +0 -1
  450. package/dist/types/src/components/Chat.stories.d.ts +0 -160
  451. package/dist/types/src/components/Chat.stories.d.ts.map +0 -1
  452. package/dist/types/src/components/ChatContainer.d.ts +0 -18
  453. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  454. package/dist/types/src/components/Comments.stories.d.ts +0 -158
  455. package/dist/types/src/components/Comments.stories.d.ts.map +0 -1
  456. package/dist/types/src/components/CommentsContainer.d.ts +0 -13
  457. package/dist/types/src/components/CommentsContainer.d.ts.map +0 -1
  458. package/dist/types/src/components/CommentsThreadContainer.d.ts +0 -14
  459. package/dist/types/src/components/CommentsThreadContainer.d.ts.map +0 -1
  460. package/dist/types/src/components/Lobby/Lobby.d.ts +0 -15
  461. package/dist/types/src/components/Lobby/Lobby.d.ts.map +0 -1
  462. package/dist/types/src/components/Lobby/index.d.ts +0 -2
  463. package/dist/types/src/components/Lobby/index.d.ts.map +0 -1
  464. package/dist/types/src/components/Media/AudioStream.d.ts +0 -6
  465. package/dist/types/src/components/Media/AudioStream.d.ts.map +0 -1
  466. package/dist/types/src/components/Media/VideoObject.d.ts +0 -15
  467. package/dist/types/src/components/Media/VideoObject.d.ts.map +0 -1
  468. package/dist/types/src/components/Media/VideoObject.stories.d.ts +0 -22
  469. package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +0 -1
  470. package/dist/types/src/components/Media/index.d.ts +0 -3
  471. package/dist/types/src/components/Media/index.d.ts.map +0 -1
  472. package/dist/types/src/components/MessageContainer.d.ts +0 -14
  473. package/dist/types/src/components/MessageContainer.d.ts.map +0 -1
  474. package/dist/types/src/components/Participant/Participant.d.ts +0 -6
  475. package/dist/types/src/components/Participant/Participant.d.ts.map +0 -1
  476. package/dist/types/src/components/Participant/ParticipantGrid.d.ts +0 -11
  477. package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +0 -1
  478. package/dist/types/src/components/Participant/index.d.ts +0 -3
  479. package/dist/types/src/components/Participant/index.d.ts.map +0 -1
  480. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts +0 -12
  481. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.d.ts.map +0 -1
  482. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +0 -162
  483. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +0 -1
  484. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts +0 -32
  485. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.d.ts.map +0 -1
  486. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +0 -176
  487. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +0 -1
  488. package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts +0 -21
  489. package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +0 -1
  490. package/dist/types/src/components/ResponsiveGrid/index.d.ts +0 -4
  491. package/dist/types/src/components/ResponsiveGrid/index.d.ts.map +0 -1
  492. package/dist/types/src/components/ThreadComplementary.d.ts +0 -5
  493. package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
  494. package/dist/types/src/components/ThreadSettings.d.ts +0 -6
  495. package/dist/types/src/components/ThreadSettings.d.ts.map +0 -1
  496. package/dist/types/src/components/command-extension.d.ts.map +0 -1
  497. package/dist/types/src/components/testing.d.ts.map +0 -1
  498. package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +0 -2
  499. package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +0 -1
  500. package/dist/types/src/hooks/useDebugMode.d.ts +0 -2
  501. package/dist/types/src/hooks/useDebugMode.d.ts.map +0 -1
  502. package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts +0 -2
  503. package/dist/types/src/hooks/useInaudibleAudioStreamTrack.d.ts.map +0 -1
  504. package/dist/types/src/hooks/useVideoStreamTrack.d.ts +0 -3
  505. package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +0 -1
  506. package/dist/types/src/testing/stories.d.ts +0 -2
  507. package/dist/types/src/testing/stories.d.ts.map +0 -1
  508. package/dist/types/src/types/Channel.d.ts +0 -16
  509. package/dist/types/src/types/Channel.d.ts.map +0 -1
  510. package/dist/types/src/types/Thread.d.ts +0 -167
  511. package/dist/types/src/types/Thread.d.ts.map +0 -1
  512. package/src/calls/call-manager.ts +0 -246
  513. package/src/calls/call-swarm-synchronizer.ts +0 -350
  514. package/src/calls/index.ts +0 -10
  515. package/src/calls/media-manager.ts +0 -375
  516. package/src/calls/speaking-monitor.ts +0 -85
  517. package/src/calls/types.ts +0 -74
  518. package/src/calls/util/audio.ts +0 -58
  519. package/src/calls/util/calls-service.ts +0 -581
  520. package/src/calls/util/history-cache.ts +0 -27
  521. package/src/calls/util/index.ts +0 -8
  522. package/src/calls/util/media.ts +0 -52
  523. package/src/calls/util/stub-media-streams.ts +0 -127
  524. package/src/calls/util/task-scheduling.ts +0 -92
  525. package/src/calls-service.stories.tsx +0 -229
  526. package/src/capabilities/call-manager.ts +0 -20
  527. package/src/capabilities/capabilities.ts +0 -33
  528. package/src/capabilities/intent-resolver.ts +0 -344
  529. package/src/capabilities/react-root.tsx +0 -17
  530. package/src/capabilities/toolkit.ts +0 -85
  531. package/src/components/Call/Call.tsx +0 -89
  532. package/src/components/Call/Toolbar.tsx +0 -182
  533. package/src/components/Call/index.ts +0 -6
  534. package/src/components/CallDebugPanel.tsx +0 -174
  535. package/src/components/CallSidebar.tsx +0 -18
  536. package/src/components/ChannelContainer.stories.tsx +0 -59
  537. package/src/components/ChannelContainer.tsx +0 -204
  538. package/src/components/ChatContainer.tsx +0 -154
  539. package/src/components/Comments.stories.tsx +0 -91
  540. package/src/components/Lobby/Lobby.tsx +0 -119
  541. package/src/components/Lobby/index.ts +0 -5
  542. package/src/components/Media/AudioStream.tsx +0 -67
  543. package/src/components/Media/VideoObject.stories.tsx +0 -60
  544. package/src/components/Media/VideoObject.tsx +0 -58
  545. package/src/components/Media/index.ts +0 -6
  546. package/src/components/Participant/Participant.tsx +0 -63
  547. package/src/components/Participant/ParticipantGrid.tsx +0 -89
  548. package/src/components/Participant/index.ts +0 -6
  549. package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +0 -54
  550. package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +0 -31
  551. package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +0 -158
  552. package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +0 -341
  553. package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +0 -131
  554. package/src/components/ResponsiveGrid/index.ts +0 -7
  555. package/src/components/ThreadComplementary.tsx +0 -181
  556. package/src/components/ThreadSettings.tsx +0 -16
  557. package/src/hooks/useBlackCanvasStreamTrack.tsx +0 -27
  558. package/src/hooks/useDebugMode.ts +0 -25
  559. package/src/hooks/useInaudibleAudioStreamTrack.tsx +0 -27
  560. package/src/hooks/useVideoStreamTrack.tsx +0 -36
  561. package/src/testing/stories.ts +0 -51
  562. package/src/types/Channel.ts +0 -27
  563. package/src/types/Thread.ts +0 -26
  564. package/src/typings/peermetrics-webrtc-stats.d.ts +0 -46
  565. package/src/typings.d.ts +0 -8
  566. /package/dist/lib/{browser/ChannelContainer-SVV4ZX5T.mjs.map → neutral/ChannelChat-6YTD5HWL.mjs.map} +0 -0
  567. /package/dist/lib/{browser/types → neutral/blueprints}/index.mjs.map +0 -0
  568. /package/dist/lib/{browser/ChatContainer-ALFWQ65B.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  569. /package/dist/lib/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
  570. /package/dist/lib/{node-esm/ChannelContainer-63GMQ753.mjs.map → neutral/index.mjs.map} +0 -0
  571. /package/dist/lib/{node-esm/ChatContainer-MFKPXMIK.mjs.map → neutral/meta.mjs.map} +0 -0
@@ -4,16 +4,17 @@
4
4
 
5
5
  import { type Extension } from '@codemirror/state';
6
6
  import { EditorView } from '@codemirror/view';
7
- import { computed, effect } from '@preact/signals-core';
7
+ import { type Atom, type Registry } from '@effect-atom/atom-react';
8
8
 
9
- import { type PromiseIntentDispatcher, createIntent } from '@dxos/app-framework';
10
9
  import { Filter, Obj, Query, Relation } from '@dxos/echo';
11
- import { type Markdown } from '@dxos/plugin-markdown/types';
12
- import { createDocAccessor, fullyQualifiedId, getSource, getSpace, getTextInRange } from '@dxos/react-client/echo';
13
- import { comments, createExternalCommentSync } from '@dxos/react-ui-editor';
14
- import { AnchoredTo } from '@dxos/schema';
10
+ import { createDocAccessor, getTextInRange } from '@dxos/echo-db';
11
+ import { OperationInvoker } from '@dxos/operation';
12
+ import { type Markdown } from '@dxos/plugin-markdown';
13
+ import { AnchoredTo, Thread } from '@dxos/types';
14
+ import { comments, createExternalCommentSync } from '@dxos/ui-editor';
15
15
 
16
- import { Thread, ThreadAction, type ThreadState } from '../types';
16
+ import { ThreadOperation } from '#types';
17
+ import { type ThreadState } from '#types';
17
18
 
18
19
  // TODO(burdon): Factor out.
19
20
  const getName = (doc: Markdown.Document, anchor: string): string | undefined => {
@@ -23,46 +24,58 @@ const getName = (doc: Markdown.Document, anchor: string): string | undefined =>
23
24
  }
24
25
  };
25
26
 
27
+ export type ThreadStore = {
28
+ registry: Registry.Registry;
29
+ stateAtom: Atom.Writable<ThreadState>;
30
+ };
31
+
26
32
  /**
27
33
  * Construct plugins.
28
34
  */
29
- export const threads = (state: ThreadState, doc?: Markdown.Document, dispatch?: PromiseIntentDispatcher): Extension => {
30
- const space = doc && getSpace(doc);
31
- if (!doc || !space || !dispatch) {
35
+ export const threads = (
36
+ store: ThreadStore,
37
+ doc?: Markdown.Document,
38
+ invokePromise?: OperationInvoker.OperationInvoker['invokePromise'],
39
+ ): Extension => {
40
+ const db = doc && Obj.getDatabase(doc);
41
+ if (!doc || !db || !invokePromise) {
32
42
  // Include no-op comments extension here to ensure that the facets are always present when they are expected.
33
43
  // TODO(wittjosiah): The Editor should only look for these facets when comments are available.
34
44
  return [comments()];
35
45
  }
36
46
 
37
- const query = space.db.query(Query.select(Filter.ids(doc.id)).targetOf(AnchoredTo));
38
- const unsubscribe = query.subscribe();
47
+ const { registry, stateAtom } = store;
48
+ const objectId = Obj.getDXN(doc).toString();
49
+ const query = db.query(Query.select(Filter.id(doc.id)).targetOf(AnchoredTo.AnchoredTo));
39
50
 
40
- const anchors = computed(() =>
41
- query.objects
51
+ // Get current anchors by combining query results with store drafts.
52
+ const getAnchors = () =>
53
+ query.results
42
54
  .filter((anchor) => {
43
55
  const thread = Relation.getSource(anchor);
44
56
  return Obj.instanceOf(Thread.Thread, thread) && thread.status !== 'resolved';
45
57
  })
46
- .concat(state.drafts[fullyQualifiedId(doc)] ?? []),
47
- );
58
+ .concat(registry.get(stateAtom).drafts[objectId] ?? []);
48
59
 
49
60
  return [
50
61
  EditorView.domEventHandlers({
51
62
  destroy: () => {
52
- unsubscribe();
63
+ // Note: cleanup functions for subscriptions are handled by createExternalCommentSync.
53
64
  },
54
65
  }),
55
66
 
56
67
  EditorView.updateListener.of((update) => {
57
68
  if (update.docChanged) {
58
- anchors.value.forEach((anchor) => {
69
+ getAnchors().forEach((anchor) => {
59
70
  if (anchor.anchor) {
60
71
  // Only update if the name has changed, otherwise this will cause an infinite loop.
61
72
  // Skip if the name is empty; this means comment text was deleted, but thread name should remain.
62
73
  const name = getName(doc, anchor.anchor);
63
74
  const thread = Relation.getSource(anchor) as Thread.Thread;
64
75
  if (name && name !== thread.name) {
65
- thread.name = name;
76
+ Obj.update(thread, (thread) => {
77
+ thread.name = name;
78
+ });
66
79
  }
67
80
  }
68
81
  });
@@ -70,55 +83,87 @@ export const threads = (state: ThreadState, doc?: Markdown.Document, dispatch?:
70
83
  }),
71
84
 
72
85
  createExternalCommentSync(
73
- fullyQualifiedId(doc),
74
- (sink) => effect(() => sink()),
86
+ objectId,
87
+ (sink) => {
88
+ // Subscribe to both query changes and store state changes.
89
+ const unsubQuery = query.subscribe(sink);
90
+ const unsubStore = registry.subscribe(stateAtom, sink);
91
+ return () => {
92
+ unsubQuery();
93
+ unsubStore();
94
+ };
95
+ },
75
96
  () =>
76
- anchors.value
97
+ getAnchors()
77
98
  .filter((anchor) => anchor.anchor)
78
- .map((anchor) => ({ id: fullyQualifiedId(Relation.getSource(anchor)), cursor: anchor.anchor })),
99
+ .map((anchor) => ({
100
+ id: Obj.getDXN(Relation.getSource(anchor)).toString(),
101
+ cursor: anchor.anchor,
102
+ })),
79
103
  ),
80
104
 
81
105
  comments({
82
- id: fullyQualifiedId(doc),
106
+ id: objectId,
83
107
  onCreate: ({ cursor }) => {
84
108
  const name = getName(doc, cursor);
85
- void dispatch(createIntent(ThreadAction.Create, { anchor: cursor, name, subject: doc }));
109
+ void invokePromise(ThreadOperation.Create, {
110
+ anchor: cursor,
111
+ name,
112
+ subject: doc,
113
+ });
86
114
  },
87
115
  onDelete: ({ id }) => {
88
- const draft = state.drafts[fullyQualifiedId(doc)];
89
- if (draft) {
90
- const index = draft.findIndex((thread) => fullyQualifiedId(thread) === id);
116
+ const drafts = registry.get(stateAtom).drafts[objectId];
117
+ if (drafts) {
118
+ const index = drafts.findIndex((draft) => Relation.getDXN(draft).toString() === id);
91
119
  if (index !== -1) {
92
- draft.splice(index, 1);
120
+ const current = registry.get(stateAtom);
121
+ registry.set(stateAtom, {
122
+ ...current,
123
+ drafts: {
124
+ ...current.drafts,
125
+ [objectId]: current.drafts[objectId]?.filter((_, i) => i !== index),
126
+ },
127
+ });
93
128
  }
94
129
  }
95
130
 
96
- const thread = query.objects.find((object) => getSource(object).id === id);
131
+ const thread = query.results.find((object) => Relation.getSource(object).id === id);
97
132
  if (thread) {
98
- thread.anchor = undefined;
133
+ Relation.update(thread, (thread) => {
134
+ thread.anchor = undefined;
135
+ });
99
136
  }
100
137
  },
101
138
  onUpdate: ({ id, cursor }) => {
102
- const draft = state.drafts[fullyQualifiedId(doc)]?.find((thread) => fullyQualifiedId(thread) === id);
139
+ const draft = registry.get(stateAtom).drafts[objectId]?.find((d) => Relation.getDXN(d).toString() === id);
103
140
  if (draft) {
104
141
  const thread = Relation.getSource(draft) as Thread.Thread;
105
- thread.name = getName(doc, cursor);
106
- draft.anchor = cursor;
142
+ Obj.update(thread, (thread) => {
143
+ thread.name = getName(doc, cursor);
144
+ });
145
+ Relation.update(draft, (draft) => {
146
+ draft.anchor = cursor;
147
+ });
107
148
  }
108
149
 
109
- const relation = query.objects.find((object) => getSource(object).id === id);
150
+ const relation = query.results.find((object) => Relation.getSource(object).id === id);
110
151
  if (relation) {
111
- const thread = getSource(relation);
152
+ const thread = Relation.getSource(relation);
112
153
  if (Obj.instanceOf(Thread.Thread, thread)) {
113
- thread.name = getName(doc, cursor);
114
- relation.anchor = cursor;
154
+ Obj.update(thread, (thread) => {
155
+ thread.name = getName(doc, cursor);
156
+ });
157
+ Relation.update(relation, (relation) => {
158
+ relation.anchor = cursor;
159
+ });
115
160
  }
116
161
  }
117
162
  },
118
163
  onSelect: ({ selection }) => {
119
164
  const current = selection.current ?? selection.closest;
120
165
  if (current) {
121
- void dispatch(createIntent(ThreadAction.Select, { current }));
166
+ void invokePromise(ThreadOperation.Select, { current });
122
167
  }
123
168
  },
124
169
  }),
@@ -4,37 +4,38 @@
4
4
 
5
5
  import { useCallback } from 'react';
6
6
 
7
- import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
8
- import { type Live } from '@dxos/live-object';
9
- import { ObservabilityAction } from '@dxos/plugin-observability/types';
10
- import { getSpace } from '@dxos/react-client/echo';
7
+ import { useOperationInvoker } from '@dxos/app-framework/ui';
8
+ import { Obj } from '@dxos/echo';
9
+ import { ObservabilityOperation } from '@dxos/plugin-observability';
11
10
  import { useOnTransition } from '@dxos/react-ui';
12
- import { type DataType } from '@dxos/schema';
11
+ import { type ContentBlock } from '@dxos/types';
13
12
 
14
13
  export const useOnEditAnalytics = (
15
- message: Live<any>,
16
- textBlock: DataType.MessageBlock.Text | undefined,
14
+ message: any | undefined,
15
+ textBlock: ContentBlock.Text | undefined,
17
16
  editing: boolean,
18
17
  ) => {
19
- const { dispatchPromise: dispatch } = useIntentDispatcher();
18
+ const { invokePromise } = useOperationInvoker();
20
19
 
21
20
  const onEdit = useCallback(() => {
22
- const space = getSpace(message);
23
- if (!space || !textBlock) {
21
+ if (!message || !textBlock) {
24
22
  return;
25
23
  }
26
24
 
27
- void dispatch(
28
- createIntent(ObservabilityAction.SendEvent, {
29
- name: 'threads.message.update',
30
- properties: {
31
- spaceId: space.id,
32
- messageId: message.id,
33
- messageLength: textBlock?.text.length,
34
- },
35
- }),
36
- );
37
- }, [dispatch, message, textBlock]);
25
+ const db = Obj.getDatabase(message);
26
+ if (!db) {
27
+ return;
28
+ }
29
+
30
+ void invokePromise(ObservabilityOperation.SendEvent, {
31
+ name: 'threads.message.update',
32
+ properties: {
33
+ spaceId: db.spaceId,
34
+ messageId: message.id,
35
+ messageLength: textBlock?.text.length,
36
+ },
37
+ });
38
+ }, [invokePromise, message, textBlock]);
38
39
 
39
40
  useOnTransition(editing, true, false, onEdit);
40
41
  };
@@ -3,8 +3,4 @@
3
3
  //
4
4
 
5
5
  export * from './analytics';
6
- export * from './useDebugMode';
7
6
  export * from './useStatus';
8
- export * from './useVideoStreamTrack';
9
- export * from './useInaudibleAudioStreamTrack';
10
- export * from './useBlackCanvasStreamTrack';
package/src/index.ts CHANGED
@@ -2,9 +2,9 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export { ThreadCapabilities } from './capabilities';
6
- export * from './calls';
5
+ export * from './blueprints';
6
+ // TODO(wittjosiah): Hooks should not be exported from the plugin package at all.
7
+ // Either refactor callers to not need them or factor them out to a shared package.
7
8
  export * from './hooks';
8
9
  export * from './meta';
9
-
10
- export * from './ThreadPlugin';
10
+ export * from './types';
package/src/meta.ts CHANGED
@@ -2,13 +2,12 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
- // TODO(wittjosiah): Needs screenshots.
9
- export const meta: PluginMeta = {
10
- id: 'dxos.org/plugin/thread',
11
- name: 'Chat',
8
+ export const meta: Plugin.Meta = {
9
+ id: 'org.dxos.plugin.thread',
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.
@@ -18,4 +17,4 @@ export const meta: PluginMeta = {
18
17
  source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-thread',
19
18
  };
20
19
 
21
- export const THREAD_ITEM = `${meta.id}/item`;
20
+ export const THREAD_ITEM = `${meta.id}.item`;
@@ -0,0 +1,81 @@
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/compute';
9
+ import { Obj, Ref, Relation } from '@dxos/echo';
10
+ import { invariant } from '@dxos/invariant';
11
+ import { ObservabilityOperation } from '@dxos/plugin-observability';
12
+ import { SpaceOperation } from '@dxos/plugin-space';
13
+ import { AnchoredTo, Message, Thread } from '@dxos/types';
14
+
15
+ import { ThreadCapabilities } from '../types';
16
+ import { ThreadOperation } from '../types';
17
+
18
+ const handler: Operation.WithHandler<typeof ThreadOperation.AddMessage> = ThreadOperation.AddMessage.pipe(
19
+ Operation.withHandler(
20
+ Effect.fnUntraced(function* ({ anchor, subject, sender, text }) {
21
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
22
+ const stateAtom = yield* Capability.get(ThreadCapabilities.State);
23
+ const thread = Relation.getSource(anchor) as Thread.Thread;
24
+ const subjectId = Obj.getDXN(subject).toString();
25
+ const db = Obj.getDatabase(subject);
26
+ invariant(db, 'Database not found');
27
+
28
+ const message = Obj.make(Message.Message, {
29
+ created: new Date().toISOString(),
30
+ sender,
31
+ blocks: [{ _tag: 'text', text }],
32
+ });
33
+ Obj.update(thread, (thread) => {
34
+ thread.messages.push(Ref.make(message));
35
+ });
36
+
37
+ const state = registry.get(stateAtom);
38
+ const draft = state.drafts[subjectId]?.find((a: { id: string }) => a.id === anchor.id);
39
+ if (draft) {
40
+ Obj.update(thread, (thread) => {
41
+ thread.status = 'active';
42
+ });
43
+ registry.set(stateAtom, {
44
+ ...state,
45
+ drafts: {
46
+ ...state.drafts,
47
+ [subjectId]: state.drafts[subjectId]?.filter((a: { id: string }) => a.id !== anchor.id),
48
+ },
49
+ });
50
+ yield* Operation.invoke(SpaceOperation.AddObject, { object: thread, target: db, hidden: true });
51
+ yield* Operation.invoke(SpaceOperation.AddRelation, {
52
+ db,
53
+ schema: AnchoredTo.AnchoredTo,
54
+ source: thread,
55
+ target: subject,
56
+ fields: { anchor: draft.anchor },
57
+ });
58
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
59
+ name: 'threads.create',
60
+ properties: {
61
+ spaceId: db.spaceId,
62
+ threadId: thread.id,
63
+ },
64
+ });
65
+ }
66
+
67
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, {
68
+ name: 'threads.message.add',
69
+ properties: {
70
+ spaceId: db.spaceId,
71
+ threadId: thread.id,
72
+ threadLength: thread.messages.length,
73
+ messageId: message.id,
74
+ messageLength: text.length,
75
+ },
76
+ });
77
+ }),
78
+ ),
79
+ );
80
+
81
+ export default handler;
@@ -0,0 +1,37 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/compute';
9
+ import { Database, Feed, Obj } from '@dxos/echo';
10
+ import { createFeedServiceLayer } from '@dxos/echo-db';
11
+ import { invariant } from '@dxos/invariant';
12
+ import { ClientCapabilities } from '@dxos/plugin-client';
13
+ import { Message } from '@dxos/types';
14
+
15
+ import { ThreadOperation } from '../types';
16
+
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');
26
+
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
+ );
36
+
37
+ export default handler;
@@ -0,0 +1,20 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Channel } from '@dxos/types';
9
+
10
+ import { ThreadOperation } from '../types';
11
+
12
+ const handler: Operation.WithHandler<typeof ThreadOperation.CreateChannel> = ThreadOperation.CreateChannel.pipe(
13
+ Operation.withHandler((input) =>
14
+ Effect.sync(() => ({
15
+ object: Channel.make({ name: input.name }),
16
+ })),
17
+ ),
18
+ );
19
+
20
+ export default handler;
@@ -0,0 +1,49 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Array from 'effect/Array';
6
+ import * as Effect from 'effect/Effect';
7
+ import * as Function from 'effect/Function';
8
+
9
+ import { computeDiffsWithCursors } from '@dxos/assistant';
10
+ import { Operation } from '@dxos/compute';
11
+ import { Database, Obj, Ref, Relation } from '@dxos/echo';
12
+ import { createDocAccessor } from '@dxos/echo-db';
13
+ import { AnchoredTo, Message, Thread } from '@dxos/types';
14
+
15
+ import { ThreadOperation } from '../types';
16
+
17
+ const handler: Operation.WithHandler<typeof ThreadOperation.CreateProposals> = ThreadOperation.CreateProposals.pipe(
18
+ Operation.withHandler(
19
+ Effect.fn(function* ({ doc, diffs }) {
20
+ const object = yield* Database.load(doc);
21
+ const content = yield* Effect.promise(() => object.content.load());
22
+ const accessor = createDocAccessor(content, ['content']);
23
+
24
+ yield* Function.pipe(
25
+ computeDiffsWithCursors(accessor, diffs),
26
+ Array.map(
27
+ Effect.fnUntraced(function* ({ cursor, text }) {
28
+ const proposal = Obj.make(Message.Message, {
29
+ created: new Date().toISOString(),
30
+ sender: { role: 'assistant' },
31
+ blocks: [{ _tag: 'proposal', text }],
32
+ });
33
+ const thread = Thread.make({ name: 'Proposal', messages: [Ref.make(proposal)], status: 'active' });
34
+ const relation = Relation.make(AnchoredTo.AnchoredTo, {
35
+ [Relation.Source]: thread,
36
+ [Relation.Target]: object,
37
+ anchor: cursor,
38
+ });
39
+ yield* Database.add(thread);
40
+ yield* Database.add(relation);
41
+ }),
42
+ ),
43
+ Effect.allWith({ concurrency: 'unbounded' }),
44
+ );
45
+ }),
46
+ ),
47
+ );
48
+
49
+ export default handler;
@@ -0,0 +1,48 @@
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 { LayoutOperation } from '@dxos/app-toolkit';
9
+ import { Operation } from '@dxos/compute';
10
+ import { Obj, Relation } from '@dxos/echo';
11
+ import { linkedSegment } from '@dxos/react-ui-attention';
12
+ import { AnchoredTo, Thread } from '@dxos/types';
13
+
14
+ import { ThreadCapabilities } from '../types';
15
+ import { ThreadOperation } from '../types';
16
+
17
+ const handler: Operation.WithHandler<typeof ThreadOperation.Create> = ThreadOperation.Create.pipe(
18
+ Operation.withHandler(
19
+ Effect.fnUntraced(function* ({ name, anchor: _anchor, subject }) {
20
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
21
+ const stateAtom = yield* Capability.get(ThreadCapabilities.State);
22
+ const subjectId = Obj.getDXN(subject).toString();
23
+ const thread = Thread.make({ name });
24
+ const anchor = Relation.make(AnchoredTo.AnchoredTo, {
25
+ [Relation.Source]: thread,
26
+ [Relation.Target]: subject,
27
+ anchor: _anchor,
28
+ });
29
+
30
+ const state = registry.get(stateAtom);
31
+ const existingDrafts = state.drafts[subjectId];
32
+ registry.set(stateAtom, {
33
+ ...state,
34
+ drafts: {
35
+ ...state.drafts,
36
+ [subjectId]: existingDrafts ? [...existingDrafts, anchor] : [anchor],
37
+ },
38
+ });
39
+
40
+ yield* Operation.invoke(ThreadOperation.Select, { current: Obj.getDXN(thread).toString() });
41
+ yield* Operation.invoke(LayoutOperation.UpdateCompanion, {
42
+ subject: linkedSegment('comments'),
43
+ });
44
+ }),
45
+ ),
46
+ );
47
+
48
+ export default handler;
@@ -0,0 +1,53 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Operation } from '@dxos/compute';
8
+ import { Obj, Relation } from '@dxos/echo';
9
+ import { invariant } from '@dxos/invariant';
10
+ import { ObservabilityOperation } from '@dxos/plugin-observability';
11
+ import { Thread } from '@dxos/types';
12
+
13
+ import { ThreadOperation } from '../types';
14
+
15
+ const handler: Operation.WithHandler<typeof ThreadOperation.DeleteMessage> = ThreadOperation.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(ThreadOperation.Delete, { subject, anchor });
31
+ return { messageIndex: -1 };
32
+ }
33
+
34
+ Obj.update(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;
@@ -0,0 +1,63 @@
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 { Operation } from '@dxos/compute';
10
+ import { Obj, Relation } from '@dxos/echo';
11
+ import { ObservabilityOperation } from '@dxos/plugin-observability';
12
+ import { Thread } from '@dxos/types';
13
+
14
+ import { ThreadCapabilities } from '../types';
15
+ import { ThreadOperation } from '../types';
16
+
17
+ const handler: Operation.WithHandler<typeof ThreadOperation.Delete> = ThreadOperation.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;