@dxos/plugin-thread 0.8.4-main.ae835ea → 0.8.4-main.bc674ce

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/dist/lib/browser/app-graph-builder-7C2QW32W.mjs +188 -0
  2. package/dist/lib/browser/app-graph-builder-7C2QW32W.mjs.map +7 -0
  3. package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs +17 -0
  4. package/dist/lib/browser/blueprint-definition-UQ63QKQG.mjs.map +7 -0
  5. package/dist/lib/browser/blueprints/index.mjs +8 -0
  6. package/dist/lib/browser/call-manager-4P536YNX.mjs +26 -0
  7. package/dist/lib/browser/call-manager-4P536YNX.mjs.map +7 -0
  8. package/dist/lib/browser/chunk-2FIHSX35.mjs +293 -0
  9. package/dist/lib/browser/chunk-2FIHSX35.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-HDEQRBOC.mjs → chunk-DLO2G3DM.mjs} +79 -76
  11. package/dist/lib/browser/chunk-DLO2G3DM.mjs.map +7 -0
  12. package/dist/lib/browser/{chunk-US5ZQYC3.mjs → chunk-ERK254BS.mjs} +78 -61
  13. package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
  14. package/dist/lib/browser/{chunk-XYUJXHYV.mjs → chunk-ISCHODBV.mjs} +1 -1
  15. package/dist/lib/browser/{chunk-XYUJXHYV.mjs.map → chunk-ISCHODBV.mjs.map} +2 -2
  16. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  17. package/dist/lib/browser/chunk-YSHXWAL3.mjs +1815 -0
  18. package/dist/lib/browser/chunk-YSHXWAL3.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-ZFLSTQSE.mjs +106 -0
  20. package/dist/lib/browser/chunk-ZFLSTQSE.mjs.map +7 -0
  21. package/dist/lib/browser/index.mjs +121 -114
  22. package/dist/lib/browser/index.mjs.map +4 -4
  23. package/dist/lib/browser/markdown-QMJLRR6R.mjs +210 -0
  24. package/dist/lib/browser/markdown-QMJLRR6R.mjs.map +7 -0
  25. package/dist/lib/browser/meta.json +1 -1
  26. package/dist/lib/browser/operation-resolver-T63EP5TY.mjs +441 -0
  27. package/dist/lib/browser/operation-resolver-T63EP5TY.mjs.map +7 -0
  28. package/dist/lib/browser/react-root-56MJI77R.mjs +25 -0
  29. package/dist/lib/browser/react-root-56MJI77R.mjs.map +7 -0
  30. package/dist/lib/browser/{react-surface-IC576W2W.mjs → react-surface-DMBHQOXJ.mjs} +43 -42
  31. package/dist/lib/browser/react-surface-DMBHQOXJ.mjs.map +7 -0
  32. package/dist/lib/browser/repair-6OZ75AUU.mjs +38 -0
  33. package/dist/lib/browser/repair-6OZ75AUU.mjs.map +7 -0
  34. package/dist/lib/browser/settings-WZMJMML3.mjs +32 -0
  35. package/dist/lib/browser/settings-WZMJMML3.mjs.map +7 -0
  36. package/dist/lib/browser/state-SJR2GL5G.mjs +24 -0
  37. package/dist/lib/browser/state-SJR2GL5G.mjs.map +7 -0
  38. package/dist/lib/browser/types/index.mjs +7 -7
  39. package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.mjs +189 -0
  40. package/dist/lib/node-esm/app-graph-builder-JCSVFRVY.mjs.map +7 -0
  41. package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs +18 -0
  42. package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs.map +7 -0
  43. package/dist/lib/node-esm/blueprints/index.mjs +9 -0
  44. package/dist/lib/node-esm/call-manager-FMLRR5S5.mjs +27 -0
  45. package/dist/lib/node-esm/call-manager-FMLRR5S5.mjs.map +7 -0
  46. package/dist/lib/node-esm/chunk-7XQLXMX7.mjs +1816 -0
  47. package/dist/lib/node-esm/chunk-7XQLXMX7.mjs.map +7 -0
  48. package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs +107 -0
  49. package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs.map +7 -0
  50. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  51. package/dist/lib/node-esm/{chunk-2MMJF7DW.mjs → chunk-KRBZBJRI.mjs} +79 -76
  52. package/dist/lib/node-esm/chunk-KRBZBJRI.mjs.map +7 -0
  53. package/dist/lib/node-esm/{chunk-KGYDYYKJ.mjs → chunk-QP3KQOPQ.mjs} +78 -61
  54. package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
  55. package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs → chunk-VBI32FGI.mjs} +1 -1
  56. package/dist/lib/node-esm/{chunk-2V3WSLUZ.mjs.map → chunk-VBI32FGI.mjs.map} +2 -2
  57. package/dist/lib/node-esm/chunk-WMWUXWAS.mjs +294 -0
  58. package/dist/lib/node-esm/chunk-WMWUXWAS.mjs.map +7 -0
  59. package/dist/lib/node-esm/index.mjs +121 -114
  60. package/dist/lib/node-esm/index.mjs.map +4 -4
  61. package/dist/lib/node-esm/markdown-L6LLQLIN.mjs +211 -0
  62. package/dist/lib/node-esm/markdown-L6LLQLIN.mjs.map +7 -0
  63. package/dist/lib/node-esm/meta.json +1 -1
  64. package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs +442 -0
  65. package/dist/lib/node-esm/operation-resolver-G6GZPBRP.mjs.map +7 -0
  66. package/dist/lib/node-esm/react-root-V4W4X5GL.mjs +26 -0
  67. package/dist/lib/node-esm/react-root-V4W4X5GL.mjs.map +7 -0
  68. package/dist/lib/node-esm/{react-surface-O4LGTAZ3.mjs → react-surface-ELDSTUA3.mjs} +43 -42
  69. package/dist/lib/node-esm/react-surface-ELDSTUA3.mjs.map +7 -0
  70. package/dist/lib/node-esm/repair-6777EPOM.mjs +39 -0
  71. package/dist/lib/node-esm/repair-6777EPOM.mjs.map +7 -0
  72. package/dist/lib/node-esm/settings-37CO3SNR.mjs +33 -0
  73. package/dist/lib/node-esm/settings-37CO3SNR.mjs.map +7 -0
  74. package/dist/lib/node-esm/state-5R3TZJQE.mjs +25 -0
  75. package/dist/lib/node-esm/state-5R3TZJQE.mjs.map +7 -0
  76. package/dist/lib/node-esm/types/index.mjs +7 -7
  77. package/dist/types/src/ThreadPlugin.d.ts +2 -1
  78. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  79. package/dist/types/src/blueprints/index.d.ts +2 -0
  80. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  81. package/dist/types/src/blueprints/thread-blueprint.d.ts +21 -0
  82. package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
  83. package/dist/types/src/calls/call-manager.d.ts +40 -30
  84. package/dist/types/src/calls/call-manager.d.ts.map +1 -1
  85. package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
  86. package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
  87. package/dist/types/src/calls/media-manager.d.ts +1 -1
  88. package/dist/types/src/calls/media-manager.d.ts.map +1 -1
  89. package/dist/types/src/calls/util/calls-service.d.ts +1 -1
  90. package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
  91. package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
  92. package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  94. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  96. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +9 -0
  98. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
  100. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/call-manager/call-manager.d.ts +6 -0
  102. package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/call-manager/index.d.ts +3 -0
  104. package/dist/types/src/capabilities/call-manager/index.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/index.d.ts +10 -16
  106. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  107. package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
  108. package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
  110. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  112. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  114. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  116. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  118. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  120. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  121. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  122. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  123. package/dist/types/src/capabilities/repair/index.d.ts +3 -0
  124. package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
  125. package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
  126. package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/settings/index.d.ts +3 -0
  128. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  129. package/dist/types/src/capabilities/settings/settings.d.ts +5 -0
  130. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  131. package/dist/types/src/capabilities/state/index.d.ts +3 -0
  132. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/state/state.d.ts +7 -0
  134. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  135. package/dist/types/src/components/Call/Call.d.ts.map +1 -1
  136. package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
  137. package/dist/types/src/components/CallDebugPanel.d.ts.map +1 -1
  138. package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
  139. package/dist/types/src/components/ChannelContainer.d.ts +4 -5
  140. package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
  141. package/dist/types/src/components/ChannelContainer.stories.d.ts +6 -2
  142. package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
  143. package/dist/types/src/components/Chat.stories.d.ts +5 -1
  144. package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
  145. package/dist/types/src/components/ChatContainer.d.ts +2 -2
  146. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  147. package/dist/types/src/components/Comments.stories.d.ts +5 -1
  148. package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
  149. package/dist/types/src/components/CommentsContainer.d.ts +2 -2
  150. package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
  151. package/dist/types/src/components/CommentsThreadContainer.d.ts +8 -8
  152. package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
  153. package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
  154. package/dist/types/src/components/Media/VideoObject.d.ts +1 -1
  155. package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
  156. package/dist/types/src/components/MessageContainer.d.ts +4 -3
  157. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  158. package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
  159. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +5 -1
  160. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
  161. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +5 -1
  162. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
  163. package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
  164. package/dist/types/src/components/ThreadCompanion.d.ts +5 -0
  165. package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -0
  166. package/dist/types/src/components/ThreadSettings.d.ts +4 -2
  167. package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
  168. package/dist/types/src/components/index.d.ts +3 -3
  169. package/dist/types/src/components/index.d.ts.map +1 -1
  170. package/dist/types/src/components/testing.d.ts +1 -1
  171. package/dist/types/src/components/testing.d.ts.map +1 -1
  172. package/dist/types/src/extensions/threads.d.ts +7 -2
  173. package/dist/types/src/extensions/threads.d.ts.map +1 -1
  174. package/dist/types/src/functions/create-proposals.d.ts +6 -0
  175. package/dist/types/src/functions/create-proposals.d.ts.map +1 -0
  176. package/dist/types/src/functions/index.d.ts +2 -0
  177. package/dist/types/src/functions/index.d.ts.map +1 -0
  178. package/dist/types/src/hooks/analytics.d.ts +2 -3
  179. package/dist/types/src/hooks/analytics.d.ts.map +1 -1
  180. package/dist/types/src/hooks/index.d.ts +2 -2
  181. package/dist/types/src/hooks/index.d.ts.map +1 -1
  182. package/dist/types/src/index.d.ts +1 -1
  183. package/dist/types/src/index.d.ts.map +1 -1
  184. package/dist/types/src/meta.d.ts +2 -2
  185. package/dist/types/src/meta.d.ts.map +1 -1
  186. package/dist/types/src/testing/stories.d.ts +2 -1
  187. package/dist/types/src/testing/stories.d.ts.map +1 -1
  188. package/dist/types/src/translations.d.ts +5 -1
  189. package/dist/types/src/translations.d.ts.map +1 -1
  190. package/dist/types/src/types/Channel.d.ts +691 -12
  191. package/dist/types/src/types/Channel.d.ts.map +1 -1
  192. package/dist/types/src/types/capabilities.d.ts +23 -0
  193. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  194. package/dist/types/src/types/index.d.ts +1 -1
  195. package/dist/types/src/types/index.d.ts.map +1 -1
  196. package/dist/types/src/types/types.d.ts +3216 -430
  197. package/dist/types/src/types/types.d.ts.map +1 -1
  198. package/dist/types/tsconfig.tsbuildinfo +1 -1
  199. package/package.json +86 -65
  200. package/src/ThreadPlugin.tsx +56 -88
  201. package/src/blueprints/index.ts +5 -0
  202. package/src/blueprints/thread-blueprint.ts +32 -0
  203. package/src/calls/call-manager.ts +76 -52
  204. package/src/calls/call-swarm-synchronizer.ts +2 -2
  205. package/src/calls/media-manager.ts +10 -7
  206. package/src/calls/util/calls-service.ts +1 -1
  207. package/src/calls/util/stub-media-streams.ts +2 -2
  208. package/src/calls/util/task-scheduling.ts +4 -4
  209. package/src/capabilities/app-graph-builder/app-graph-builder.ts +201 -0
  210. package/src/capabilities/app-graph-builder/index.ts +7 -0
  211. package/src/capabilities/blueprint-definition/blueprint-definition.ts +23 -0
  212. package/src/capabilities/blueprint-definition/index.ts +7 -0
  213. package/src/capabilities/call-manager/call-manager.ts +26 -0
  214. package/src/capabilities/call-manager/index.ts +7 -0
  215. package/src/capabilities/index.ts +10 -13
  216. package/src/capabilities/markdown/index.ts +7 -0
  217. package/src/capabilities/markdown/markdown.ts +83 -0
  218. package/src/capabilities/operation-resolver/index.ts +7 -0
  219. package/src/capabilities/operation-resolver/operation-resolver.ts +400 -0
  220. package/src/capabilities/react-root/index.ts +7 -0
  221. package/src/capabilities/react-root/react-root.tsx +20 -0
  222. package/src/capabilities/react-surface/index.ts +7 -0
  223. package/src/capabilities/react-surface/react-surface.tsx +97 -0
  224. package/src/capabilities/repair/index.ts +7 -0
  225. package/src/capabilities/repair/repair.ts +51 -0
  226. package/src/capabilities/settings/index.ts +7 -0
  227. package/src/capabilities/settings/settings.ts +33 -0
  228. package/src/capabilities/state/index.ts +7 -0
  229. package/src/capabilities/state/state.ts +22 -0
  230. package/src/components/Call/Call.tsx +8 -4
  231. package/src/components/Call/Toolbar.tsx +31 -23
  232. package/src/components/CallDebugPanel.tsx +12 -14
  233. package/src/components/CallSidebar.tsx +5 -3
  234. package/src/components/ChannelContainer.stories.tsx +12 -10
  235. package/src/components/ChannelContainer.tsx +22 -19
  236. package/src/components/Chat.stories.tsx +9 -9
  237. package/src/components/ChatContainer.tsx +22 -21
  238. package/src/components/Comments.stories.tsx +25 -23
  239. package/src/components/CommentsContainer.tsx +4 -6
  240. package/src/components/CommentsThreadContainer.tsx +21 -22
  241. package/src/components/Lobby/Lobby.tsx +9 -7
  242. package/src/components/Media/AudioStream.tsx +2 -2
  243. package/src/components/Media/VideoObject.tsx +2 -2
  244. package/src/components/MessageContainer.tsx +59 -28
  245. package/src/components/Participant/Participant.tsx +32 -19
  246. package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +3 -3
  247. package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +1 -1
  248. package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +6 -6
  249. package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +6 -3
  250. package/src/components/{ThreadComplementary.tsx → ThreadCompanion.tsx} +79 -67
  251. package/src/components/ThreadSettings.tsx +6 -1
  252. package/src/components/command-extension.ts +2 -2
  253. package/src/components/index.ts +4 -7
  254. package/src/components/testing.ts +3 -5
  255. package/src/extensions/threads.ts +82 -38
  256. package/src/functions/create-proposals.ts +57 -0
  257. package/src/functions/index.ts +5 -0
  258. package/src/hooks/analytics.ts +21 -21
  259. package/src/hooks/index.ts +3 -2
  260. package/src/index.ts +1 -1
  261. package/src/meta.ts +2 -2
  262. package/src/testing/stories.ts +15 -11
  263. package/src/translations.ts +3 -1
  264. package/src/types/Channel.ts +13 -10
  265. package/src/types/capabilities.ts +34 -0
  266. package/src/types/index.ts +1 -1
  267. package/src/types/types.ts +163 -85
  268. package/dist/lib/browser/ChannelContainer-SVV4ZX5T.mjs +0 -16
  269. package/dist/lib/browser/ChatContainer-ALFWQ65B.mjs +0 -15
  270. package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs +0 -171
  271. package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs.map +0 -7
  272. package/dist/lib/browser/call-manager-P3MYR2JS.mjs +0 -24
  273. package/dist/lib/browser/call-manager-P3MYR2JS.mjs.map +0 -7
  274. package/dist/lib/browser/chunk-6CUDBEYP.mjs +0 -377
  275. package/dist/lib/browser/chunk-6CUDBEYP.mjs.map +0 -7
  276. package/dist/lib/browser/chunk-BBTXGRIR.mjs +0 -18
  277. package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +0 -7
  278. package/dist/lib/browser/chunk-DJOUMWEL.mjs +0 -988
  279. package/dist/lib/browser/chunk-DJOUMWEL.mjs.map +0 -7
  280. package/dist/lib/browser/chunk-HDEQRBOC.mjs.map +0 -7
  281. package/dist/lib/browser/chunk-IQSXEHOW.mjs +0 -618
  282. package/dist/lib/browser/chunk-IQSXEHOW.mjs.map +0 -7
  283. package/dist/lib/browser/chunk-K2DUJRFJ.mjs +0 -27
  284. package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +0 -7
  285. package/dist/lib/browser/chunk-L6F2AG6W.mjs +0 -23
  286. package/dist/lib/browser/chunk-L6F2AG6W.mjs.map +0 -7
  287. package/dist/lib/browser/chunk-US5ZQYC3.mjs.map +0 -7
  288. package/dist/lib/browser/chunk-UTSLSZED.mjs +0 -178
  289. package/dist/lib/browser/chunk-UTSLSZED.mjs.map +0 -7
  290. package/dist/lib/browser/intent-resolver-5POQTZ24.mjs +0 -419
  291. package/dist/lib/browser/intent-resolver-5POQTZ24.mjs.map +0 -7
  292. package/dist/lib/browser/markdown-L7LDNF56.mjs +0 -169
  293. package/dist/lib/browser/markdown-L7LDNF56.mjs.map +0 -7
  294. package/dist/lib/browser/react-root-RCJLK4EP.mjs +0 -28
  295. package/dist/lib/browser/react-root-RCJLK4EP.mjs.map +0 -7
  296. package/dist/lib/browser/react-surface-IC576W2W.mjs.map +0 -7
  297. package/dist/lib/browser/settings-5FYGBOGI.mjs +0 -22
  298. package/dist/lib/browser/settings-5FYGBOGI.mjs.map +0 -7
  299. package/dist/lib/browser/state-36REWXO5.mjs +0 -34
  300. package/dist/lib/browser/state-36REWXO5.mjs.map +0 -7
  301. package/dist/lib/browser/toolkit-PXASLYEQ.mjs +0 -74
  302. package/dist/lib/browser/toolkit-PXASLYEQ.mjs.map +0 -7
  303. package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs +0 -17
  304. package/dist/lib/node-esm/ChatContainer-MFKPXMIK.mjs +0 -16
  305. package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs +0 -172
  306. package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs.map +0 -7
  307. package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs +0 -25
  308. package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs.map +0 -7
  309. package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +0 -7
  310. package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs +0 -25
  311. package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs.map +0 -7
  312. package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs.map +0 -7
  313. package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs +0 -378
  314. package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs.map +0 -7
  315. package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs +0 -619
  316. package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs.map +0 -7
  317. package/dist/lib/node-esm/chunk-QCQAAU6J.mjs +0 -989
  318. package/dist/lib/node-esm/chunk-QCQAAU6J.mjs.map +0 -7
  319. package/dist/lib/node-esm/chunk-TYLLHI46.mjs +0 -179
  320. package/dist/lib/node-esm/chunk-TYLLHI46.mjs.map +0 -7
  321. package/dist/lib/node-esm/chunk-XI45H4IV.mjs +0 -28
  322. package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +0 -7
  323. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +0 -19
  324. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +0 -7
  325. package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs +0 -420
  326. package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs.map +0 -7
  327. package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs +0 -170
  328. package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs.map +0 -7
  329. package/dist/lib/node-esm/react-root-4IDB2SN2.mjs +0 -29
  330. package/dist/lib/node-esm/react-root-4IDB2SN2.mjs.map +0 -7
  331. package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs.map +0 -7
  332. package/dist/lib/node-esm/settings-EOBQUZSW.mjs +0 -23
  333. package/dist/lib/node-esm/settings-EOBQUZSW.mjs.map +0 -7
  334. package/dist/lib/node-esm/state-X3W67GTL.mjs +0 -35
  335. package/dist/lib/node-esm/state-X3W67GTL.mjs.map +0 -7
  336. package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs +0 -75
  337. package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs.map +0 -7
  338. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  339. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  340. package/dist/types/src/capabilities/call-manager.d.ts +0 -5
  341. package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
  342. package/dist/types/src/capabilities/capabilities.d.ts +0 -27
  343. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  344. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  345. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  346. package/dist/types/src/capabilities/markdown.d.ts +0 -4
  347. package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
  348. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  349. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  350. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  351. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  352. package/dist/types/src/capabilities/settings.d.ts +0 -4
  353. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  354. package/dist/types/src/capabilities/state.d.ts +0 -7
  355. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  356. package/dist/types/src/capabilities/toolkit.d.ts +0 -24
  357. package/dist/types/src/capabilities/toolkit.d.ts.map +0 -1
  358. package/dist/types/src/components/ThreadComplementary.d.ts +0 -5
  359. package/dist/types/src/components/ThreadComplementary.d.ts.map +0 -1
  360. package/dist/types/src/types/Thread.d.ts +0 -167
  361. package/dist/types/src/types/Thread.d.ts.map +0 -1
  362. package/src/capabilities/app-graph-builder.ts +0 -186
  363. package/src/capabilities/call-manager.ts +0 -20
  364. package/src/capabilities/capabilities.ts +0 -33
  365. package/src/capabilities/intent-resolver.ts +0 -344
  366. package/src/capabilities/markdown.ts +0 -69
  367. package/src/capabilities/react-root.tsx +0 -17
  368. package/src/capabilities/react-surface.tsx +0 -89
  369. package/src/capabilities/settings.ts +0 -19
  370. package/src/capabilities/state.ts +0 -26
  371. package/src/capabilities/toolkit.ts +0 -85
  372. package/src/types/Thread.ts +0 -26
  373. /package/dist/lib/browser/{ChannelContainer-SVV4ZX5T.mjs.map → blueprints/index.mjs.map} +0 -0
  374. /package/dist/lib/browser/{ChatContainer-ALFWQ65B.mjs.map → chunk-J5LGTIGS.mjs.map} +0 -0
  375. /package/dist/lib/node-esm/{ChannelContainer-63GMQ753.mjs.map → blueprints/index.mjs.map} +0 -0
  376. /package/dist/lib/node-esm/{ChatContainer-MFKPXMIK.mjs.map → chunk-HSLMI22Q.mjs.map} +0 -0
package/src/meta.ts CHANGED
@@ -2,11 +2,11 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
8
  // TODO(wittjosiah): Needs screenshots.
9
- export const meta: PluginMeta = {
9
+ export const meta: Plugin.Meta = {
10
10
  id: 'dxos.org/plugin/thread',
11
11
  name: 'Chat',
12
12
  description: trim`
@@ -2,27 +2,31 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { IntentPlugin, SettingsPlugin } from '@dxos/app-framework';
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { OperationPlugin, type Plugin, SettingsPlugin } from '@dxos/app-framework';
6
8
  import { ClientPlugin } from '@dxos/plugin-client';
7
9
  import { GraphPlugin } from '@dxos/plugin-graph';
8
10
  import { SpacePlugin } from '@dxos/plugin-space';
9
11
  import { ThemePlugin } from '@dxos/plugin-theme';
10
12
  import { Config } from '@dxos/react-client';
11
- import { defaultTx } from '@dxos/react-ui-theme';
13
+ import { defaultTx } from '@dxos/ui-theme';
12
14
 
13
15
  import { ThreadPlugin } from '../ThreadPlugin';
14
16
  import { Channel } from '../types';
15
17
 
16
- export const createThreadPlugins = async () => [
18
+ export const createThreadPlugins = async (): Promise<Array<Plugin.Plugin>> => [
17
19
  ThemePlugin({ tx: defaultTx }),
18
20
  ClientPlugin({
19
- onClientInitialized: async ({ client }) => {
20
- await client.halo.createIdentity({ displayName: 'Test User' });
21
- },
22
- onSpacesReady: async ({ client }) => {
23
- await client.spaces.default.waitUntilReady();
24
- client.spaces.default.db.add(Channel.make());
25
- },
21
+ onClientInitialized: ({ client }) =>
22
+ Effect.gen(function* () {
23
+ yield* Effect.promise(() => client.halo.createIdentity({ displayName: 'Test User' }));
24
+ }),
25
+ onSpacesReady: ({ client }) =>
26
+ Effect.gen(function* () {
27
+ yield* Effect.promise(() => client.spaces.default.waitUntilReady());
28
+ client.spaces.default.db.add(Channel.make());
29
+ }),
26
30
  config: new Config({
27
31
  runtime: {
28
32
  client: {
@@ -44,7 +48,7 @@ export const createThreadPlugins = async () => [
44
48
  }),
45
49
  }),
46
50
  SpacePlugin({}),
47
- IntentPlugin(),
51
+ OperationPlugin(),
48
52
  SettingsPlugin(),
49
53
  GraphPlugin(),
50
54
  ThreadPlugin(),
@@ -19,6 +19,7 @@ export const translations = [
19
19
  'object name placeholder': 'New channel',
20
20
  'rename object label': 'Rename channel',
21
21
  'delete object label': 'Delete channel',
22
+ 'object deleted label': 'Channel deleted',
22
23
  },
23
24
  [meta.id]: {
24
25
  'plugin name': 'Chat',
@@ -50,6 +51,7 @@ export const translations = [
50
51
  'comments label': 'Comments',
51
52
  'show all label': 'All comments',
52
53
  'show unresolved label': 'Unresolved comments',
54
+ 'add comment label': 'Add comment',
53
55
 
54
56
  'channel companion label': 'Channel',
55
57
  'call panel label': 'Active Call',
@@ -60,7 +62,7 @@ export const translations = [
60
62
  'set display name label': 'Continue',
61
63
 
62
64
  'call tab label': 'Call',
63
- 'meeting status title': 'Meeting',
65
+ 'meeting status title': 'Calls',
64
66
  'share meeting link label': 'Share meeting',
65
67
  'show webrtc stats title': 'WebRTC Stats',
66
68
  'show calls history title': 'Service History',
@@ -5,19 +5,22 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
7
  import { Obj, Ref, Type } from '@dxos/echo';
8
- import { FormAnnotation } from '@dxos/echo/internal';
8
+ import { FormInputAnnotation } from '@dxos/echo/internal';
9
+ import { Thread } from '@dxos/types';
9
10
 
10
- import * as Thread from './Thread';
11
-
12
- const _Channel = Schema.Struct({
11
+ export const Channel = Schema.Struct({
13
12
  name: Schema.optional(Schema.String),
14
- defaultThread: Type.Ref(Thread.Thread).pipe(FormAnnotation.set(false)),
13
+ defaultThread: Type.Ref(Thread.Thread).pipe(FormInputAnnotation.set(false)),
15
14
  // TODO(wittjosiah): Should be an "ordered collection".
16
- threads: Type.Ref(Thread.Thread).pipe(Schema.Array, Schema.mutable, FormAnnotation.set(false)),
17
- }).pipe(Type.Obj({ typename: 'dxos.org/type/Channel', version: '0.1.0' }));
18
- export interface Channel extends Schema.Schema.Type<typeof _Channel> {}
19
- export interface ChannelEncoded extends Schema.Schema.Encoded<typeof _Channel> {}
20
- export const Channel: Schema.Schema<Channel, ChannelEncoded> = _Channel;
15
+ threads: Type.Ref(Thread.Thread).pipe(Schema.Array, FormInputAnnotation.set(false)),
16
+ }).pipe(
17
+ Type.object({
18
+ typename: 'dxos.org/type/Channel',
19
+ version: '0.1.0',
20
+ }),
21
+ );
22
+
23
+ export interface Channel extends Schema.Schema.Type<typeof Channel> {}
21
24
 
22
25
  export const make = (props: Pick<Obj.MakeProps<typeof Channel>, 'name'> = {}) =>
23
26
  Obj.make(Channel, {
@@ -0,0 +1,34 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Atom } from '@effect-atom/atom-react';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+
9
+ import { type CallManager, type CallState, type MediaState } from '../calls';
10
+ import { meta } from '../meta';
11
+ import { type Channel, type ThreadSettingsProps, type ThreadState, type ViewStore } from '../types';
12
+
13
+ export namespace ThreadCapabilities {
14
+ export const Settings = Capability.make<Atom.Writable<ThreadSettingsProps>>(`${meta.id}/capability/settings`);
15
+ export const CallManager = Capability.make<CallManager>(`${meta.id}/capability/call-manager`);
16
+
17
+ // TODO(burdon): Better way to define specific extensions for meeting companions.
18
+ // TODO(burdon): This brings in deps from ../calls; how should we manage/minimize explicit type exposure to other plugins?
19
+ // TODO(wittjosiah): These callbacks could be intents once we support broadcast.
20
+ export type CallProperties = {
21
+ onJoin: (state: { channel?: Channel.Channel; roomId?: string }) => Promise<void>;
22
+ onLeave: (roomId?: string) => Promise<void>;
23
+ onCallStateUpdated: (callState: CallState) => Promise<void>;
24
+ onMediaStateUpdated: ([mediaState, isSpeaking]: [MediaState, boolean]) => Promise<void>;
25
+ };
26
+
27
+ export const CallExtension = Capability.make<CallProperties>(`${meta.id}/capability/call-extension`);
28
+
29
+ /** Thread state (drafts, toolbar state, current selection). */
30
+ export const State = Capability.make<Atom.Writable<ThreadState>>(`${meta.id}/capability/state`);
31
+
32
+ /** Per-subject view state (e.g., showResolvedThreads). */
33
+ export const ViewState = Capability.make<Atom.Writable<ViewStore>>(`${meta.id}/capability/view-state`);
34
+ }
@@ -2,6 +2,6 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ export * from './capabilities';
5
6
  export * as Channel from './Channel';
6
- export * as Thread from './Thread';
7
7
  export * from './types';
@@ -4,37 +4,55 @@
4
4
 
5
5
  import * as Schema from 'effect/Schema';
6
6
 
7
- import { Type } from '@dxos/echo';
8
- import { EchoObjectSchema, SpaceSchema } from '@dxos/react-client/echo';
9
- import { AnchoredTo, DataType } from '@dxos/schema';
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Key, Type } from '@dxos/echo';
9
+ import { Operation } from '@dxos/operation';
10
+ import { SpaceSchema } from '@dxos/react-client/echo';
11
+ import { Collection } from '@dxos/schema';
12
+ import { Actor, AnchoredTo, Message, Thread } from '@dxos/types';
10
13
 
11
14
  import { meta } from '../meta';
12
15
 
13
16
  import * as Channel from './Channel';
14
- import * as Thread from './Thread';
15
17
 
16
- export namespace ThreadAction {
17
- export class onCreateSpace extends Schema.TaggedClass<onCreateSpace>()(`${meta.id}/action/on-space-created`, {
18
- input: Schema.Struct({
19
- space: SpaceSchema,
20
- rootCollection: DataType.Collection,
21
- }),
22
- output: Schema.Void,
23
- }) {}
18
+ const THREAD_OPERATION = `${meta.id}/operation`;
19
+
20
+ /**
21
+ * Operations for the Thread plugin.
22
+ * Note: Complex ECHO types are typed as Schema.Any to avoid serialization issues.
23
+ */
24
+ export namespace ThreadOperation {
25
+ export const OnCreateSpace = Operation.make({
26
+ meta: { key: `${THREAD_OPERATION}/on-create-space`, name: 'On Create Space' },
27
+ services: [Capability.Service],
28
+ schema: {
29
+ input: Schema.Struct({
30
+ space: SpaceSchema,
31
+ rootCollection: Collection.Collection,
32
+ isDefault: Schema.Boolean.pipe(Schema.optional),
33
+ }),
34
+ output: Schema.Void,
35
+ },
36
+ });
24
37
 
25
- export class CreateChannel extends Schema.TaggedClass<CreateChannel>()(`${meta.id}/action/create-channel`, {
26
- input: Schema.Struct({
27
- spaceId: Type.SpaceId,
28
- name: Schema.optional(Schema.String),
29
- }),
30
- output: Schema.Struct({
31
- object: Channel.Channel,
32
- }),
33
- }) {}
38
+ export const CreateChannel = Operation.make({
39
+ meta: { key: `${THREAD_OPERATION}/create-channel`, name: 'Create Channel' },
40
+ services: [Capability.Service],
41
+ schema: {
42
+ input: Schema.Struct({
43
+ spaceId: Key.SpaceId,
44
+ name: Schema.optional(Schema.String),
45
+ }),
46
+ output: Schema.Struct({
47
+ object: Channel.Channel,
48
+ }),
49
+ },
50
+ });
34
51
 
35
- export class CreateChannelThread extends Schema.TaggedClass<CreateChannelThread>()(
36
- `${meta.id}/action/create-channel-thread`,
37
- {
52
+ export const CreateChannelThread = Operation.make({
53
+ meta: { key: `${THREAD_OPERATION}/create-channel-thread`, name: 'Create Channel Thread' },
54
+ services: [Capability.Service],
55
+ schema: {
38
56
  input: Schema.Struct({
39
57
  channel: Channel.Channel,
40
58
  }),
@@ -42,70 +60,129 @@ export namespace ThreadAction {
42
60
  object: Thread.Thread,
43
61
  }),
44
62
  },
45
- ) {}
63
+ });
46
64
 
47
- export class Create extends Schema.TaggedClass<Create>()(`${meta.id}/action/create`, {
48
- input: Schema.Struct({
49
- name: Schema.optional(Schema.String),
50
- anchor: Schema.optional(Schema.String),
51
- subject: EchoObjectSchema,
52
- }),
53
- output: Schema.Void,
54
- }) {}
55
-
56
- export class Delete extends Schema.TaggedClass<Delete>()(`${meta.id}/action/delete`, {
57
- input: Schema.Struct({
58
- anchor: AnchoredTo,
59
- subject: EchoObjectSchema,
60
- thread: Schema.optional(Thread.Thread),
61
- }),
62
- output: Schema.Void,
63
- }) {}
65
+ export const Create = Operation.make({
66
+ meta: { key: `${THREAD_OPERATION}/create`, name: 'Create Thread' },
67
+ services: [Capability.Service],
68
+ schema: {
69
+ input: Schema.Struct({
70
+ name: Schema.optional(Schema.String),
71
+ anchor: Schema.optional(Schema.String),
72
+ subject: Type.Obj,
73
+ }),
74
+ output: Schema.Void,
75
+ },
76
+ });
64
77
 
65
- export class Select extends Schema.TaggedClass<Select>()(`${meta.id}/action/select`, {
66
- input: Schema.Struct({
67
- current: Schema.String,
68
- }),
69
- output: Schema.Void,
70
- }) {}
78
+ export const DeleteOutput = Schema.Struct({
79
+ thread: Thread.Thread.annotations({ description: 'The deleted thread.' }),
80
+ anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The deleted anchor.' }),
81
+ }).pipe(Schema.partial);
71
82
 
72
- export class ToggleResolved extends Schema.TaggedClass<ToggleResolved>()(`${meta.id}/action/toggle-resolved`, {
73
- input: Schema.Struct({
74
- thread: Thread.Thread,
75
- }),
76
- output: Schema.Void,
77
- }) {}
78
-
79
- export class AddProposal extends Schema.TaggedClass<AddProposal>()(`${meta.id}/action/add-proposal`, {
80
- input: Schema.Struct({
81
- text: Schema.String,
82
- anchor: Schema.String,
83
- sender: DataType.Actor,
84
- subject: EchoObjectSchema,
85
- }),
86
- output: Schema.Void,
87
- }) {}
88
-
89
- export class AddMessage extends Schema.TaggedClass<AddMessage>()(`${meta.id}/action/add-message`, {
90
- input: Schema.Struct({
91
- subject: EchoObjectSchema,
92
- anchor: AnchoredTo,
93
- sender: DataType.Actor,
94
- text: Schema.String,
95
- }),
96
- output: Schema.Void,
97
- }) {}
98
-
99
- export class DeleteMessage extends Schema.TaggedClass<DeleteMessage>()(`${meta.id}/action/delete-message`, {
100
- input: Schema.Struct({
101
- anchor: AnchoredTo,
102
- subject: EchoObjectSchema,
103
- messageId: Schema.String,
104
- message: Schema.optional(DataType.Message),
105
- messageIndex: Schema.optional(Schema.Number),
83
+ export type DeleteOutput = Schema.Schema.Type<typeof DeleteOutput>;
84
+
85
+ export const Delete = Operation.make({
86
+ meta: { key: `${THREAD_OPERATION}/delete`, name: 'Delete Thread' },
87
+ services: [Capability.Service],
88
+ schema: {
89
+ input: Schema.Struct({
90
+ anchor: AnchoredTo.AnchoredTo,
91
+ subject: Type.Obj,
92
+ thread: Schema.optional(Thread.Thread),
93
+ }),
94
+ output: DeleteOutput,
95
+ },
96
+ });
97
+
98
+ export const Select = Operation.make({
99
+ meta: { key: `${THREAD_OPERATION}/select`, name: 'Select Thread' },
100
+ services: [Capability.Service],
101
+ schema: {
102
+ input: Schema.Struct({
103
+ current: Schema.String,
104
+ }),
105
+ output: Schema.Void,
106
+ },
107
+ });
108
+
109
+ export const ToggleResolved = Operation.make({
110
+ meta: { key: `${THREAD_OPERATION}/toggle-resolved`, name: 'Toggle Resolved' },
111
+ services: [Capability.Service],
112
+ schema: {
113
+ input: Schema.Struct({
114
+ thread: Thread.Thread,
115
+ }),
116
+ output: Schema.Void,
117
+ },
118
+ });
119
+
120
+ export const AddMessage = Operation.make({
121
+ meta: { key: `${THREAD_OPERATION}/add-message`, name: 'Add Message' },
122
+ services: [Capability.Service],
123
+ schema: {
124
+ input: Schema.Struct({
125
+ subject: Type.Obj,
126
+ anchor: AnchoredTo.AnchoredTo,
127
+ sender: Actor.Actor,
128
+ text: Schema.String,
129
+ }),
130
+ output: Schema.Void,
131
+ },
132
+ });
133
+
134
+ export const DeleteMessageOutput = Schema.partial(
135
+ Schema.Struct({
136
+ message: Message.Message.annotations({ description: 'The deleted message.' }),
137
+ messageIndex: Schema.Number.annotations({ description: 'The index the message was at.' }),
106
138
  }),
107
- output: Schema.Void,
108
- }) {}
139
+ );
140
+
141
+ export type DeleteMessageOutput = Schema.Schema.Type<typeof DeleteMessageOutput>;
142
+
143
+ export const DeleteMessage = Operation.make({
144
+ meta: { key: `${THREAD_OPERATION}/delete-message`, name: 'Delete Message' },
145
+ services: [Capability.Service],
146
+ schema: {
147
+ input: Schema.Struct({
148
+ anchor: AnchoredTo.AnchoredTo,
149
+ subject: Type.Obj,
150
+ messageId: Schema.String,
151
+ }),
152
+ output: DeleteMessageOutput,
153
+ },
154
+ });
155
+
156
+ /**
157
+ * Restore a deleted thread (inverse of Delete).
158
+ */
159
+ export const Restore = Operation.make({
160
+ meta: { key: `${THREAD_OPERATION}/restore`, name: 'Restore Thread' },
161
+ services: [Capability.Service],
162
+ schema: {
163
+ input: Schema.Struct({
164
+ thread: Thread.Thread.annotations({ description: 'The thread to restore.' }),
165
+ anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor relation to restore.' }),
166
+ }),
167
+ output: Schema.Void,
168
+ },
169
+ });
170
+
171
+ /**
172
+ * Restore a deleted message (inverse of DeleteMessage).
173
+ */
174
+ export const RestoreMessage = Operation.make({
175
+ meta: { key: `${THREAD_OPERATION}/restore-message`, name: 'Restore Message' },
176
+ services: [Capability.Service],
177
+ schema: {
178
+ input: Schema.Struct({
179
+ anchor: AnchoredTo.AnchoredTo.annotations({ description: 'The anchor of the thread.' }),
180
+ message: Message.Message.annotations({ description: 'The message to restore.' }),
181
+ messageIndex: Schema.Number.annotations({ description: 'The index to restore the message at.' }),
182
+ }),
183
+ output: Schema.Void,
184
+ },
185
+ });
109
186
  }
110
187
 
111
188
  export const ThreadSettingsSchema = Schema.mutable(Schema.Struct({}));
@@ -123,6 +200,7 @@ export type ThreadState = {
123
200
  /** Object toolbar state. */
124
201
  toolbar: Record<string, boolean>;
125
202
  /** In-memory draft threads. */
126
- drafts: Record<string, AnchoredTo[]>;
203
+ // TODO(burdon): Drafts are getting lost.
204
+ drafts: Record<string, AnchoredTo.AnchoredTo[]>;
127
205
  current?: string | undefined;
128
206
  };
@@ -1,16 +0,0 @@
1
- import {
2
- ChannelContainer,
3
- ChannelContainer_default
4
- } from "./chunk-DJOUMWEL.mjs";
5
- import "./chunk-L6F2AG6W.mjs";
6
- import "./chunk-BBTXGRIR.mjs";
7
- import "./chunk-6CUDBEYP.mjs";
8
- import "./chunk-HDEQRBOC.mjs";
9
- import "./chunk-CP7E2HRE.mjs";
10
- import "./chunk-XYUJXHYV.mjs";
11
- import "./chunk-K2DUJRFJ.mjs";
12
- export {
13
- ChannelContainer,
14
- ChannelContainer_default as default
15
- };
16
- //# sourceMappingURL=ChannelContainer-SVV4ZX5T.mjs.map
@@ -1,15 +0,0 @@
1
- import {
2
- ChatContainer,
3
- ChatContainer_default,
4
- ChatHeading
5
- } from "./chunk-6CUDBEYP.mjs";
6
- import "./chunk-HDEQRBOC.mjs";
7
- import "./chunk-CP7E2HRE.mjs";
8
- import "./chunk-XYUJXHYV.mjs";
9
- import "./chunk-K2DUJRFJ.mjs";
10
- export {
11
- ChatContainer,
12
- ChatHeading,
13
- ChatContainer_default as default
14
- };
15
- //# sourceMappingURL=ChatContainer-ALFWQ65B.mjs.map
@@ -1,171 +0,0 @@
1
- import {
2
- Channel_exports,
3
- ThreadAction
4
- } from "./chunk-UTSLSZED.mjs";
5
- import {
6
- ThreadCapabilities
7
- } from "./chunk-BBTXGRIR.mjs";
8
- import {
9
- getAnchor
10
- } from "./chunk-CP7E2HRE.mjs";
11
- import {
12
- meta
13
- } from "./chunk-K2DUJRFJ.mjs";
14
-
15
- // src/capabilities/app-graph-builder.ts
16
- import { Rx } from "@effect-rx/rx-react";
17
- import * as Function from "effect/Function";
18
- import * as Option from "effect/Option";
19
- import { Capabilities, contributes, createIntent } from "@dxos/app-framework";
20
- import { Obj } from "@dxos/echo";
21
- import { AttentionCapabilities } from "@dxos/plugin-attention";
22
- import { ATTENDABLE_PATH_SEPARATOR, DECK_COMPANION_TYPE, PLANK_COMPANION_TYPE } from "@dxos/plugin-deck/types";
23
- import { ROOT_ID, createExtension, rxFromSignal } from "@dxos/plugin-graph";
24
- import { fullyQualifiedId } from "@dxos/react-client/echo";
25
- var app_graph_builder_default = ((context) => {
26
- const resolve = (typename) => context.getCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
27
- return contributes(Capabilities.AppGraphBuilder, [
28
- createExtension({
29
- id: `${meta.id}/active-call`,
30
- connector: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.id === ROOT_ID ? Option.some(node2) : Option.none()), Option.map((node2) => {
31
- const [call] = get(context.capabilities(ThreadCapabilities.CallManager));
32
- return get(rxFromSignal(() => call?.joined ? [
33
- {
34
- id: `${node2.id}${ATTENDABLE_PATH_SEPARATOR}active-call`,
35
- type: DECK_COMPANION_TYPE,
36
- data: null,
37
- properties: {
38
- label: [
39
- "call panel label",
40
- {
41
- ns: meta.id
42
- }
43
- ],
44
- icon: "ph--video-conference--regular",
45
- position: "hoist",
46
- disposition: "hidden"
47
- }
48
- }
49
- ] : []));
50
- }), Option.getOrElse(() => [])))
51
- }),
52
- // TODO(wittjosiah): The channel shouldn't become the companion during a call.
53
- // Alternative: the call/meeting/thread should be a child node of the channel and that should be opened.
54
- createExtension({
55
- id: `${meta.id}/channel-chat-companion`,
56
- connector: (node) => {
57
- return Rx.make((get) => {
58
- return Function.pipe(get(node), Option.flatMap((node2) => Obj.instanceOf(Channel_exports.Channel, node2.data) ? Option.some(node2.data) : Option.none()), Option.map((channel) => {
59
- const callManager = context.getCapability(ThreadCapabilities.CallManager);
60
- const joined = get(rxFromSignal(() => callManager.joined && callManager.roomId === fullyQualifiedId(channel)));
61
- if (!joined) {
62
- return [];
63
- }
64
- return [
65
- {
66
- id: `${fullyQualifiedId(channel)}${ATTENDABLE_PATH_SEPARATOR}chat`,
67
- type: PLANK_COMPANION_TYPE,
68
- data: "chat",
69
- properties: {
70
- label: [
71
- "channel companion label",
72
- {
73
- ns: meta.id
74
- }
75
- ],
76
- icon: "ph--hash--regular",
77
- position: "hoist",
78
- disposition: "hidden"
79
- }
80
- }
81
- ];
82
- }), Option.getOrElse(() => []));
83
- });
84
- }
85
- }),
86
- createExtension({
87
- id: `${meta.id}/comments-companion`,
88
- connector: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => {
89
- if (!Obj.isObject(node2.data) || Obj.instanceOf(Channel_exports.Channel, node2.data)) {
90
- return Option.none();
91
- }
92
- const metadata = resolve(Obj.getTypename(node2.data));
93
- return typeof metadata.comments === "string" ? Option.some(node2) : Option.none();
94
- }), Option.map((node2) => [
95
- {
96
- id: [
97
- node2.id,
98
- "comments"
99
- ].join(ATTENDABLE_PATH_SEPARATOR),
100
- type: PLANK_COMPANION_TYPE,
101
- data: "comments",
102
- properties: {
103
- label: [
104
- "comments label",
105
- {
106
- ns: meta.id
107
- }
108
- ],
109
- icon: "ph--chat-text--regular",
110
- disposition: "hidden",
111
- position: "hoist"
112
- }
113
- }
114
- ]), Option.getOrElse(() => [])))
115
- }),
116
- createExtension({
117
- id: `${meta.id}/comment-toolbar`,
118
- actions: (node) => Rx.make((get) => Function.pipe(get(node), Option.flatMap((node2) => {
119
- if (!Obj.isObject(node2.data) || Obj.instanceOf(Channel_exports.Channel, node2.data)) {
120
- return Option.none();
121
- }
122
- const metadata = resolve(Obj.getTypename(node2.data));
123
- return typeof metadata.comments === "string" ? Option.some(node2.data) : Option.none();
124
- }), Option.map((object) => {
125
- const selectionManager = context.getCapability(AttentionCapabilities.Selection);
126
- const toolbar = get(context.capabilities(ThreadCapabilities.State))[0]?.state.toolbar ?? {};
127
- const disabled = get(rxFromSignal(() => {
128
- const metadata = resolve(Obj.getTypename(object));
129
- const selection = selectionManager.getSelection(fullyQualifiedId(object), metadata.selectionMode);
130
- const anchor = getAnchor(selection);
131
- const invalidSelection = !anchor;
132
- const overlappingComment = toolbar[fullyQualifiedId(object)];
133
- return metadata.comments === "anchored" && invalidSelection || overlappingComment;
134
- }));
135
- return [
136
- {
137
- id: `${fullyQualifiedId(object)}/comment`,
138
- data: () => {
139
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
140
- const metadata = resolve(Obj.getTypename(object));
141
- const selection = selectionManager.getSelection(fullyQualifiedId(object));
142
- const anchor = metadata.comments === "anchored" ? getAnchor(selection) : Date.now().toString();
143
- const name = metadata.getAnchorLabel?.(object, anchor);
144
- void dispatch(createIntent(ThreadAction.Create, {
145
- anchor,
146
- name,
147
- subject: object
148
- }));
149
- },
150
- properties: {
151
- label: [
152
- "add comment label",
153
- {
154
- ns: meta.id
155
- }
156
- ],
157
- icon: "ph--chat-text--regular",
158
- disposition: "toolbar",
159
- disabled,
160
- testId: "thread.comment.add"
161
- }
162
- }
163
- ];
164
- }), Option.getOrElse(() => [])))
165
- })
166
- ]);
167
- });
168
- export {
169
- app_graph_builder_default as default
170
- };
171
- //# sourceMappingURL=app-graph-builder-ACBXRBOS.mjs.map