@dxos/plugin-thread 0.8.4-main.7ace549 → 0.8.4-main.937b3ca

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 (337) hide show
  1. package/dist/lib/browser/app-graph-builder-SPAZN5XL.mjs +188 -0
  2. package/dist/lib/browser/app-graph-builder-SPAZN5XL.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-YBRTG6T3.mjs +26 -0
  7. package/dist/lib/browser/call-manager-YBRTG6T3.mjs.map +7 -0
  8. package/dist/lib/browser/{chunk-KOBXMDCI.mjs → chunk-DLO2G3DM.mjs} +14 -12
  9. package/dist/lib/browser/chunk-DLO2G3DM.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-ZCW3NSDZ.mjs → chunk-ERK254BS.mjs} +68 -51
  11. package/dist/lib/browser/chunk-ERK254BS.mjs.map +7 -0
  12. package/dist/lib/browser/chunk-TAWDJPMD.mjs +293 -0
  13. package/dist/lib/browser/chunk-TAWDJPMD.mjs.map +7 -0
  14. package/dist/lib/browser/chunk-VZICDGBW.mjs +1813 -0
  15. package/dist/lib/browser/chunk-VZICDGBW.mjs.map +7 -0
  16. package/dist/lib/browser/{blueprint-definition-TQ4JFMZZ.mjs → chunk-ZFLSTQSE.mjs} +39 -34
  17. package/dist/lib/browser/chunk-ZFLSTQSE.mjs.map +7 -0
  18. package/dist/lib/browser/index.mjs +100 -90
  19. package/dist/lib/browser/index.mjs.map +4 -4
  20. package/dist/lib/browser/markdown-TSXOA3GV.mjs +210 -0
  21. package/dist/lib/browser/markdown-TSXOA3GV.mjs.map +7 -0
  22. package/dist/lib/browser/meta.json +1 -1
  23. package/dist/lib/browser/operation-resolver-MDMEBYH2.mjs +441 -0
  24. package/dist/lib/browser/operation-resolver-MDMEBYH2.mjs.map +7 -0
  25. package/dist/lib/browser/react-root-Q7U5D3DA.mjs +25 -0
  26. package/dist/lib/browser/react-root-Q7U5D3DA.mjs.map +7 -0
  27. package/dist/lib/browser/{react-surface-AUQQSQQC.mjs → react-surface-WDZQSDWH.mjs} +32 -33
  28. package/dist/lib/browser/react-surface-WDZQSDWH.mjs.map +7 -0
  29. package/dist/lib/browser/{repair-JFJLEM2O.mjs → repair-TDKAFAGH.mjs} +12 -9
  30. package/dist/lib/browser/repair-TDKAFAGH.mjs.map +7 -0
  31. package/dist/lib/browser/settings-OOKKVXV7.mjs +32 -0
  32. package/dist/lib/browser/settings-OOKKVXV7.mjs.map +7 -0
  33. package/dist/lib/browser/state-3LKZHDRI.mjs +24 -0
  34. package/dist/lib/browser/state-3LKZHDRI.mjs.map +7 -0
  35. package/dist/lib/browser/types/index.mjs +5 -4
  36. package/dist/lib/node-esm/app-graph-builder-3LJAPDUW.mjs +189 -0
  37. package/dist/lib/node-esm/app-graph-builder-3LJAPDUW.mjs.map +7 -0
  38. package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs +18 -0
  39. package/dist/lib/node-esm/blueprint-definition-MZZXXL37.mjs.map +7 -0
  40. package/dist/lib/node-esm/blueprints/index.mjs +9 -0
  41. package/dist/lib/node-esm/call-manager-MMCTNFOH.mjs +27 -0
  42. package/dist/lib/node-esm/call-manager-MMCTNFOH.mjs.map +7 -0
  43. package/dist/lib/node-esm/chunk-3RD3IVVD.mjs +1814 -0
  44. package/dist/lib/node-esm/chunk-3RD3IVVD.mjs.map +7 -0
  45. package/dist/lib/node-esm/{blueprint-definition-TSX5HHW7.mjs → chunk-AQHPP6ZX.mjs} +39 -34
  46. package/dist/lib/node-esm/chunk-AQHPP6ZX.mjs.map +7 -0
  47. package/dist/lib/node-esm/chunk-ARTUUKTM.mjs +294 -0
  48. package/dist/lib/node-esm/chunk-ARTUUKTM.mjs.map +7 -0
  49. package/dist/lib/node-esm/{chunk-PZH2EDU5.mjs → chunk-KRBZBJRI.mjs} +14 -12
  50. package/dist/lib/node-esm/chunk-KRBZBJRI.mjs.map +7 -0
  51. package/dist/lib/node-esm/{chunk-7KZWZS2U.mjs → chunk-QP3KQOPQ.mjs} +68 -51
  52. package/dist/lib/node-esm/chunk-QP3KQOPQ.mjs.map +7 -0
  53. package/dist/lib/node-esm/index.mjs +100 -90
  54. package/dist/lib/node-esm/index.mjs.map +4 -4
  55. package/dist/lib/node-esm/markdown-N2UJ3D6L.mjs +211 -0
  56. package/dist/lib/node-esm/markdown-N2UJ3D6L.mjs.map +7 -0
  57. package/dist/lib/node-esm/meta.json +1 -1
  58. package/dist/lib/node-esm/operation-resolver-7PHDJZA2.mjs +442 -0
  59. package/dist/lib/node-esm/operation-resolver-7PHDJZA2.mjs.map +7 -0
  60. package/dist/lib/node-esm/react-root-SZIGQRDZ.mjs +26 -0
  61. package/dist/lib/node-esm/react-root-SZIGQRDZ.mjs.map +7 -0
  62. package/dist/lib/node-esm/{react-surface-AMVESEF4.mjs → react-surface-24PNWUDX.mjs} +32 -33
  63. package/dist/lib/node-esm/react-surface-24PNWUDX.mjs.map +7 -0
  64. package/dist/lib/node-esm/{repair-RMLR24YR.mjs → repair-LHLLGXKF.mjs} +12 -9
  65. package/dist/lib/node-esm/repair-LHLLGXKF.mjs.map +7 -0
  66. package/dist/lib/node-esm/settings-LXZQXSPL.mjs +33 -0
  67. package/dist/lib/node-esm/settings-LXZQXSPL.mjs.map +7 -0
  68. package/dist/lib/node-esm/state-YYAK5ENM.mjs +25 -0
  69. package/dist/lib/node-esm/state-YYAK5ENM.mjs.map +7 -0
  70. package/dist/lib/node-esm/types/index.mjs +5 -4
  71. package/dist/types/src/ThreadPlugin.d.ts +2 -1
  72. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  73. package/dist/types/src/blueprints/index.d.ts +2 -0
  74. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  75. package/dist/types/src/blueprints/thread-blueprint.d.ts +21 -0
  76. package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -0
  77. package/dist/types/src/calls/call-manager.d.ts +40 -30
  78. package/dist/types/src/calls/call-manager.d.ts.map +1 -1
  79. package/dist/types/src/calls/call-swarm-synchronizer.d.ts +2 -2
  80. package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
  81. package/dist/types/src/calls/media-manager.d.ts +1 -1
  82. package/dist/types/src/calls/media-manager.d.ts.map +1 -1
  83. package/dist/types/src/calls/util/calls-service.d.ts +1 -1
  84. package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
  85. package/dist/types/src/calls/util/task-scheduling.d.ts +2 -2
  86. package/dist/types/src/calls/util/task-scheduling.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  88. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  90. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +9 -0
  92. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
  94. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/call-manager/call-manager.d.ts +6 -0
  96. package/dist/types/src/capabilities/call-manager/call-manager.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/call-manager/index.d.ts +3 -0
  98. package/dist/types/src/capabilities/call-manager/index.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/index.d.ts +10 -17
  100. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  101. package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
  102. package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
  104. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  106. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  108. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  110. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/react-root/react-root.d.ts +9 -0
  112. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  113. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  114. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  115. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  116. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  117. package/dist/types/src/capabilities/repair/index.d.ts +3 -0
  118. package/dist/types/src/capabilities/repair/index.d.ts.map +1 -0
  119. package/dist/types/src/capabilities/repair/repair.d.ts +6 -0
  120. package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -0
  121. package/dist/types/src/capabilities/settings/index.d.ts +3 -0
  122. package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
  123. package/dist/types/src/capabilities/settings/settings.d.ts +5 -0
  124. package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
  125. package/dist/types/src/capabilities/state/index.d.ts +3 -0
  126. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  127. package/dist/types/src/capabilities/state/state.d.ts +7 -0
  128. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  129. package/dist/types/src/components/Call/Call.d.ts.map +1 -1
  130. package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
  131. package/dist/types/src/components/CallSidebar.d.ts.map +1 -1
  132. package/dist/types/src/components/ChannelContainer.d.ts +4 -5
  133. package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
  134. package/dist/types/src/components/ChannelContainer.stories.d.ts +1 -1
  135. package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
  136. package/dist/types/src/components/ChatContainer.d.ts +1 -1
  137. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  138. package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
  139. package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
  140. package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
  141. package/dist/types/src/components/Media/VideoObject.d.ts +1 -1
  142. package/dist/types/src/components/Media/VideoObject.stories.d.ts +1 -1
  143. package/dist/types/src/components/MessageContainer.d.ts +3 -4
  144. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  145. package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
  146. package/dist/types/src/components/ThreadCompanion.d.ts.map +1 -1
  147. package/dist/types/src/components/ThreadSettings.d.ts +4 -2
  148. package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
  149. package/dist/types/src/components/index.d.ts +2 -2
  150. package/dist/types/src/components/index.d.ts.map +1 -1
  151. package/dist/types/src/extensions/threads.d.ts +7 -2
  152. package/dist/types/src/extensions/threads.d.ts.map +1 -1
  153. package/dist/types/src/functions/create-proposals.d.ts.map +1 -1
  154. package/dist/types/src/hooks/analytics.d.ts +1 -2
  155. package/dist/types/src/hooks/analytics.d.ts.map +1 -1
  156. package/dist/types/src/index.d.ts +1 -1
  157. package/dist/types/src/index.d.ts.map +1 -1
  158. package/dist/types/src/meta.d.ts +2 -2
  159. package/dist/types/src/meta.d.ts.map +1 -1
  160. package/dist/types/src/testing/stories.d.ts +2 -1
  161. package/dist/types/src/testing/stories.d.ts.map +1 -1
  162. package/dist/types/src/types/Channel.d.ts +691 -12
  163. package/dist/types/src/types/Channel.d.ts.map +1 -1
  164. package/dist/types/src/types/capabilities.d.ts +23 -0
  165. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  166. package/dist/types/src/types/index.d.ts +1 -0
  167. package/dist/types/src/types/index.d.ts.map +1 -1
  168. package/dist/types/src/types/types.d.ts +3182 -295
  169. package/dist/types/src/types/types.d.ts.map +1 -1
  170. package/dist/types/tsconfig.tsbuildinfo +1 -1
  171. package/package.json +86 -69
  172. package/src/ThreadPlugin.tsx +50 -80
  173. package/src/blueprints/index.ts +5 -0
  174. package/src/blueprints/thread-blueprint.ts +32 -0
  175. package/src/calls/call-manager.ts +76 -52
  176. package/src/calls/call-swarm-synchronizer.ts +2 -2
  177. package/src/calls/media-manager.ts +1 -1
  178. package/src/calls/util/calls-service.ts +1 -1
  179. package/src/calls/util/task-scheduling.ts +4 -4
  180. package/src/capabilities/app-graph-builder/app-graph-builder.ts +201 -0
  181. package/src/capabilities/app-graph-builder/index.ts +7 -0
  182. package/src/capabilities/blueprint-definition/blueprint-definition.ts +23 -0
  183. package/src/capabilities/blueprint-definition/index.ts +7 -0
  184. package/src/capabilities/call-manager/call-manager.ts +26 -0
  185. package/src/capabilities/call-manager/index.ts +7 -0
  186. package/src/capabilities/index.ts +10 -14
  187. package/src/capabilities/markdown/index.ts +7 -0
  188. package/src/capabilities/markdown/markdown.ts +83 -0
  189. package/src/capabilities/operation-resolver/index.ts +7 -0
  190. package/src/capabilities/operation-resolver/operation-resolver.ts +400 -0
  191. package/src/capabilities/react-root/index.ts +7 -0
  192. package/src/capabilities/react-root/react-root.tsx +20 -0
  193. package/src/capabilities/react-surface/index.ts +7 -0
  194. package/src/capabilities/react-surface/react-surface.tsx +97 -0
  195. package/src/capabilities/repair/index.ts +7 -0
  196. package/src/capabilities/{repair.ts → repair/repair.ts} +21 -10
  197. package/src/capabilities/settings/index.ts +7 -0
  198. package/src/capabilities/settings/settings.ts +33 -0
  199. package/src/capabilities/state/index.ts +7 -0
  200. package/src/capabilities/state/state.ts +22 -0
  201. package/src/components/Call/Call.tsx +7 -3
  202. package/src/components/Call/Toolbar.tsx +28 -20
  203. package/src/components/CallSidebar.tsx +4 -2
  204. package/src/components/ChannelContainer.stories.tsx +10 -8
  205. package/src/components/ChannelContainer.tsx +18 -16
  206. package/src/components/Chat.stories.tsx +6 -6
  207. package/src/components/ChatContainer.tsx +7 -7
  208. package/src/components/Comments.stories.tsx +21 -18
  209. package/src/components/CommentsThreadContainer.tsx +9 -9
  210. package/src/components/Lobby/Lobby.tsx +8 -6
  211. package/src/components/Media/AudioStream.tsx +2 -2
  212. package/src/components/Media/VideoObject.tsx +1 -1
  213. package/src/components/MessageContainer.tsx +53 -24
  214. package/src/components/Participant/Participant.tsx +31 -18
  215. package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +1 -1
  216. package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
  217. package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +1 -1
  218. package/src/components/ThreadCompanion.tsx +69 -64
  219. package/src/components/ThreadSettings.tsx +6 -1
  220. package/src/components/command-extension.ts +2 -2
  221. package/src/components/index.ts +2 -5
  222. package/src/extensions/threads.ts +75 -41
  223. package/src/functions/create-proposals.ts +5 -4
  224. package/src/hooks/analytics.ts +23 -20
  225. package/src/index.ts +1 -1
  226. package/src/meta.ts +2 -2
  227. package/src/testing/stories.ts +15 -11
  228. package/src/types/Channel.ts +9 -5
  229. package/src/types/capabilities.ts +34 -0
  230. package/src/types/index.ts +1 -0
  231. package/src/types/types.ts +160 -73
  232. package/dist/lib/browser/ChannelContainer-L7MKV7DS.mjs +0 -17
  233. package/dist/lib/browser/ChatContainer-KPY4BAUE.mjs +0 -16
  234. package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs +0 -171
  235. package/dist/lib/browser/app-graph-builder-TWJ2UCOZ.mjs.map +0 -7
  236. package/dist/lib/browser/blueprint-definition-TQ4JFMZZ.mjs.map +0 -7
  237. package/dist/lib/browser/call-manager-4YFT4XA6.mjs +0 -25
  238. package/dist/lib/browser/call-manager-4YFT4XA6.mjs.map +0 -7
  239. package/dist/lib/browser/chunk-ALZKJOZK.mjs +0 -989
  240. package/dist/lib/browser/chunk-ALZKJOZK.mjs.map +0 -7
  241. package/dist/lib/browser/chunk-ANTFU4JB.mjs +0 -25
  242. package/dist/lib/browser/chunk-ANTFU4JB.mjs.map +0 -7
  243. package/dist/lib/browser/chunk-CFC7LEPD.mjs +0 -18
  244. package/dist/lib/browser/chunk-CFC7LEPD.mjs.map +0 -7
  245. package/dist/lib/browser/chunk-JDJPMI7V.mjs +0 -143
  246. package/dist/lib/browser/chunk-JDJPMI7V.mjs.map +0 -7
  247. package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +0 -7
  248. package/dist/lib/browser/chunk-NPT5S6N4.mjs +0 -611
  249. package/dist/lib/browser/chunk-NPT5S6N4.mjs.map +0 -7
  250. package/dist/lib/browser/chunk-QM34EZQK.mjs +0 -20
  251. package/dist/lib/browser/chunk-QM34EZQK.mjs.map +0 -7
  252. package/dist/lib/browser/chunk-TLOOZTRD.mjs +0 -377
  253. package/dist/lib/browser/chunk-TLOOZTRD.mjs.map +0 -7
  254. package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +0 -7
  255. package/dist/lib/browser/intent-resolver-G33FT3NO.mjs +0 -355
  256. package/dist/lib/browser/intent-resolver-G33FT3NO.mjs.map +0 -7
  257. package/dist/lib/browser/markdown-WFZFYJBQ.mjs +0 -172
  258. package/dist/lib/browser/markdown-WFZFYJBQ.mjs.map +0 -7
  259. package/dist/lib/browser/react-root-ED7PHA44.mjs +0 -29
  260. package/dist/lib/browser/react-root-ED7PHA44.mjs.map +0 -7
  261. package/dist/lib/browser/react-surface-AUQQSQQC.mjs.map +0 -7
  262. package/dist/lib/browser/repair-JFJLEM2O.mjs.map +0 -7
  263. package/dist/lib/browser/settings-E6IOLK46.mjs +0 -23
  264. package/dist/lib/browser/settings-E6IOLK46.mjs.map +0 -7
  265. package/dist/lib/browser/state-UYPLBGZJ.mjs +0 -35
  266. package/dist/lib/browser/state-UYPLBGZJ.mjs.map +0 -7
  267. package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs +0 -18
  268. package/dist/lib/node-esm/ChannelContainer-FYONOOZ6.mjs.map +0 -7
  269. package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs +0 -17
  270. package/dist/lib/node-esm/ChatContainer-TLQG23K7.mjs.map +0 -7
  271. package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs +0 -172
  272. package/dist/lib/node-esm/app-graph-builder-VD6I2V5H.mjs.map +0 -7
  273. package/dist/lib/node-esm/blueprint-definition-TSX5HHW7.mjs.map +0 -7
  274. package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs +0 -26
  275. package/dist/lib/node-esm/call-manager-UMUXEYH5.mjs.map +0 -7
  276. package/dist/lib/node-esm/chunk-2AEIN5MI.mjs +0 -22
  277. package/dist/lib/node-esm/chunk-2AEIN5MI.mjs.map +0 -7
  278. package/dist/lib/node-esm/chunk-7KZWZS2U.mjs.map +0 -7
  279. package/dist/lib/node-esm/chunk-AB42KYF3.mjs +0 -990
  280. package/dist/lib/node-esm/chunk-AB42KYF3.mjs.map +0 -7
  281. package/dist/lib/node-esm/chunk-ATNY37UV.mjs +0 -27
  282. package/dist/lib/node-esm/chunk-ATNY37UV.mjs.map +0 -7
  283. package/dist/lib/node-esm/chunk-E5HNHFYH.mjs +0 -378
  284. package/dist/lib/node-esm/chunk-E5HNHFYH.mjs.map +0 -7
  285. package/dist/lib/node-esm/chunk-FF3QVPY4.mjs +0 -612
  286. package/dist/lib/node-esm/chunk-FF3QVPY4.mjs.map +0 -7
  287. package/dist/lib/node-esm/chunk-P2M364TO.mjs +0 -144
  288. package/dist/lib/node-esm/chunk-P2M364TO.mjs.map +0 -7
  289. package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-RT6NRL2I.mjs +0 -19
  291. package/dist/lib/node-esm/chunk-RT6NRL2I.mjs.map +0 -7
  292. package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs +0 -356
  293. package/dist/lib/node-esm/intent-resolver-4PX3WXQG.mjs.map +0 -7
  294. package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs +0 -173
  295. package/dist/lib/node-esm/markdown-CSR5MAPZ.mjs.map +0 -7
  296. package/dist/lib/node-esm/react-root-DZN324JA.mjs +0 -30
  297. package/dist/lib/node-esm/react-root-DZN324JA.mjs.map +0 -7
  298. package/dist/lib/node-esm/react-surface-AMVESEF4.mjs.map +0 -7
  299. package/dist/lib/node-esm/repair-RMLR24YR.mjs.map +0 -7
  300. package/dist/lib/node-esm/settings-RGZHWDSO.mjs +0 -24
  301. package/dist/lib/node-esm/settings-RGZHWDSO.mjs.map +0 -7
  302. package/dist/lib/node-esm/state-XNWOLBNE.mjs +0 -36
  303. package/dist/lib/node-esm/state-XNWOLBNE.mjs.map +0 -7
  304. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  305. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  306. package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
  307. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
  308. package/dist/types/src/capabilities/call-manager.d.ts +0 -5
  309. package/dist/types/src/capabilities/call-manager.d.ts.map +0 -1
  310. package/dist/types/src/capabilities/capabilities.d.ts +0 -27
  311. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  312. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  313. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  314. package/dist/types/src/capabilities/markdown.d.ts +0 -4
  315. package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
  316. package/dist/types/src/capabilities/react-root.d.ts +0 -7
  317. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  318. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  319. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  320. package/dist/types/src/capabilities/repair.d.ts +0 -4
  321. package/dist/types/src/capabilities/repair.d.ts.map +0 -1
  322. package/dist/types/src/capabilities/settings.d.ts +0 -4
  323. package/dist/types/src/capabilities/settings.d.ts.map +0 -1
  324. package/dist/types/src/capabilities/state.d.ts +0 -7
  325. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  326. package/src/capabilities/app-graph-builder.ts +0 -194
  327. package/src/capabilities/blueprint-definition.ts +0 -38
  328. package/src/capabilities/call-manager.ts +0 -20
  329. package/src/capabilities/capabilities.ts +0 -33
  330. package/src/capabilities/intent-resolver.ts +0 -311
  331. package/src/capabilities/markdown.ts +0 -71
  332. package/src/capabilities/react-root.tsx +0 -17
  333. package/src/capabilities/react-surface.tsx +0 -91
  334. package/src/capabilities/settings.ts +0 -19
  335. package/src/capabilities/state.ts +0 -26
  336. /package/dist/lib/browser/{ChannelContainer-L7MKV7DS.mjs.map → blueprints/index.mjs.map} +0 -0
  337. /package/dist/lib/{browser/ChatContainer-KPY4BAUE.mjs.map → node-esm/blueprints/index.mjs.map} +0 -0
@@ -2,13 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { useAtomValue } from '@effect-atom/atom-react';
5
6
  import React, { type FC, type PropsWithChildren } from 'react';
6
7
 
7
8
  import { useCapability } from '@dxos/app-framework/react';
8
9
  import { type ThemedClassName } from '@dxos/react-ui';
9
10
 
10
- import { ThreadCapabilities } from '../../capabilities';
11
11
  import { useDebugMode } from '../../hooks';
12
+ import { ThreadCapabilities } from '../../types';
12
13
  import { AudioStream } from '../Media';
13
14
  import { ParticipantGrid } from '../Participant';
14
15
 
@@ -34,8 +35,9 @@ type CallAudioProps = {};
34
35
 
35
36
  const CallAudio: FC<CallAudioProps> = () => {
36
37
  const call = useCapability(ThreadCapabilities.CallManager);
38
+ const audioTracksToPlay = useAtomValue(call.audioTracksToPlayAtom);
37
39
 
38
- return <AudioStream tracks={call.audioTracksToPlay} />;
40
+ return <AudioStream tracks={audioTracksToPlay} />;
39
41
  };
40
42
 
41
43
  CallAudio.displayName = 'CallAudio';
@@ -51,10 +53,12 @@ type CallGridProps = {
51
53
  const CallGrid: FC<CallGridProps> = ({ fullscreen }) => {
52
54
  const debug = useDebugMode();
53
55
  const call = useCapability(ThreadCapabilities.CallManager);
56
+ const self = useAtomValue(call.selfAtom);
57
+ const users = useAtomValue(call.usersAtom);
54
58
 
55
59
  return (
56
60
  <div className='grid grow p-4 dark:bg-neutral-900'>
57
- <ParticipantGrid self={call.self} users={call.users} debug={debug} fullscreen={fullscreen} />
61
+ <ParticipantGrid self={self} users={users} debug={debug} fullscreen={fullscreen} />
58
62
  </div>
59
63
  );
60
64
  };
@@ -2,10 +2,12 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { useAtomValue } from '@effect-atom/atom-react';
5
6
  import React from 'react';
6
7
 
7
8
  import { useAppGraph, useCapability } from '@dxos/app-framework/react';
8
9
  import { Obj } from '@dxos/echo';
10
+ import { Node, useActionRunner } from '@dxos/plugin-graph';
9
11
  import { useActions, useNode } from '@dxos/plugin-graph';
10
12
  import {
11
13
  Icon,
@@ -16,10 +18,10 @@ import {
16
18
  toLocalizedString,
17
19
  useTranslation,
18
20
  } from '@dxos/react-ui';
19
- import { groupHoverControlItemWithTransition, mx } from '@dxos/react-ui-theme';
21
+ import { groupHoverControlItemWithTransition, mx } from '@dxos/ui-theme';
20
22
 
21
- import { ThreadCapabilities } from '../../capabilities';
22
23
  import { meta } from '../../meta';
24
+ import { ThreadCapabilities } from '../../types';
23
25
  import { type Channel } from '../../types';
24
26
 
25
27
  export type ToolbarProps = ThemedClassName<{
@@ -42,14 +44,18 @@ export const Toolbar = ({
42
44
  }: ToolbarProps) => {
43
45
  const { t } = useTranslation(meta.id);
44
46
  const { graph } = useAppGraph();
47
+ const runAction = useActionRunner();
45
48
  const call = useCapability(ThreadCapabilities.CallManager);
49
+ const media = useAtomValue(call.mediaAtom);
50
+ const joined = useAtomValue(call.joinedAtom);
51
+ const raisedHand = useAtomValue(call.raisedHandAtom);
46
52
 
47
53
  // Channel app graph node.
48
54
  const node = useNode(graph, channel && Obj.getDXN(channel).toString());
49
55
  const actions = useActions(graph, node?.id).filter((action) => action.properties.disposition === 'toolbar');
50
56
 
51
57
  // Screen sharing.
52
- const isScreensharing = call.media.screenshareTrack !== undefined;
58
+ const isScreensharing = media.screenshareTrack !== undefined;
53
59
  const canSharescreen =
54
60
  typeof navigator.mediaDevices !== 'undefined' && navigator.mediaDevices.getDisplayMedia !== undefined;
55
61
 
@@ -58,7 +64,7 @@ export const Toolbar = ({
58
64
  <div className={mx('z-20 flex justify-center m-8', autoHideControls && groupHoverControlItemWithTransition)}>
59
65
  <NaturalToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', classNames]}>
60
66
  <ToggleButton
61
- active={call.media.audioEnabled}
67
+ active={media.audioEnabled}
62
68
  state={{
63
69
  on: {
64
70
  icon: 'ph--microphone--regular',
@@ -70,12 +76,12 @@ export const Toolbar = ({
70
76
  icon: 'ph--microphone-slash--duotone',
71
77
  label: t('mic on'),
72
78
  onClick: () => call.turnAudioOn(),
73
- classNames: [call.joined && 'bg-callAlert'],
79
+ classNames: [joined && 'bg-callAlert'],
74
80
  },
75
81
  }}
76
82
  />
77
83
  <ToggleButton
78
- active={call.media.videoEnabled}
84
+ active={media.videoEnabled}
79
85
  state={{
80
86
  on: {
81
87
  icon: 'ph--video-camera--regular',
@@ -97,7 +103,7 @@ export const Toolbar = ({
97
103
  </div>
98
104
  )) || <NaturalToolbar.Separator variant='gap' />}
99
105
 
100
- {call.joined && (
106
+ {joined && (
101
107
  <>
102
108
  <ToggleButton
103
109
  disabled={!canSharescreen}
@@ -117,25 +123,27 @@ export const Toolbar = ({
117
123
  />
118
124
 
119
125
  {/* Companion actions. */}
120
- {actions.map((action) => (
121
- <IconButton
122
- key={action.id}
123
- {...defaultButtonProps}
124
- icon={action.properties.icon}
125
- label={toLocalizedString(action.properties.label, t)}
126
- classNames={action.properties.classNames}
127
- onClick={() => action.data({ node })}
128
- />
129
- ))}
126
+ {actions
127
+ .filter((action): action is Node.Action => Node.isAction(action))
128
+ .map((action) => (
129
+ <IconButton
130
+ key={action.id}
131
+ {...defaultButtonProps}
132
+ icon={action.properties.icon}
133
+ label={toLocalizedString(action.properties.label, t)}
134
+ classNames={action.properties.classNames}
135
+ onClick={() => node && void runAction(action, { parent: node })}
136
+ />
137
+ ))}
130
138
 
131
139
  <ToggleButton
132
- active={call.raisedHand}
140
+ active={raisedHand}
133
141
  state={{
134
142
  on: {
135
143
  icon: 'ph--hand-waving--regular',
136
144
  label: t('lower hand'),
137
145
  onClick: () => call.setRaisedHand(false),
138
- classNames: [call.joined && 'bg-callAlert'],
146
+ classNames: [joined && 'bg-callAlert'],
139
147
  },
140
148
  off: {
141
149
  icon: 'ph--hand-palm--duotone',
@@ -146,7 +154,7 @@ export const Toolbar = ({
146
154
  />
147
155
  </>
148
156
  )}
149
- {call.joined ? (
157
+ {joined ? (
150
158
  <IconButton variant='destructive' icon='ph--phone-x--regular' label={t('leave call')} onClick={onLeave} />
151
159
  ) : (
152
160
  <IconButton variant='primary' icon='ph--phone-incoming--regular' label={t('join call')} onClick={onJoin} />
@@ -2,17 +2,19 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { useAtomValue } from '@effect-atom/atom-react';
5
6
  import React from 'react';
6
7
 
7
8
  import { useCapability } from '@dxos/app-framework/react';
8
9
 
9
- import { ThreadCapabilities } from '../capabilities';
10
+ import { ThreadCapabilities } from '../types';
10
11
 
11
12
  import { ChannelContainer } from './ChannelContainer';
12
13
 
13
14
  export const CallSidebar = () => {
14
15
  const call = useCapability(ThreadCapabilities.CallManager);
15
- return <ChannelContainer roomId={call.roomId} />;
16
+ const roomId = useAtomValue(call.roomIdAtom);
17
+ return <ChannelContainer subject={undefined} roomId={roomId} />;
16
18
  };
17
19
 
18
20
  export default CallSidebar;
@@ -5,10 +5,9 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React from 'react';
7
7
 
8
- import { contributes } from '@dxos/app-framework';
8
+ import { Capability, Common } from '@dxos/app-framework';
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { ClientCapabilities } from '@dxos/plugin-client';
11
- import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
10
+ import { Query, useDatabase, useQuery } from '@dxos/react-client/echo';
12
11
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
13
12
  import { render } from '@dxos/storybook-utils';
14
13
  import { Message, Thread } from '@dxos/types';
@@ -21,13 +20,13 @@ import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer
21
20
 
22
21
  // TODO(wittjosiah): Channel doesn't render full height.
23
22
  const DefaultStory = ({ roomId }: ChannelContainerProps) => {
24
- const space = useSpace();
25
- const [channel] = useQuery(space, Query.type(Channel.Channel));
23
+ const db = useDatabase();
24
+ const [channel] = useQuery(db, Query.type(Channel.Channel));
26
25
  if (!channel) {
27
26
  return null;
28
27
  }
29
28
 
30
- return <ChannelContainer channel={channel} roomId={roomId} />;
29
+ return <ChannelContainer subject={channel} roomId={roomId} />;
31
30
  };
32
31
 
33
32
  const meta = {
@@ -36,10 +35,12 @@ const meta = {
36
35
  render: render(DefaultStory),
37
36
  decorators: [
38
37
  withTheme,
39
- withLayout({ container: 'column' }),
38
+ withLayout({ layout: 'column' }),
40
39
  withPluginManager({
41
40
  plugins: [...(await createThreadPlugins())],
42
- capabilities: [contributes(ClientCapabilities.Schema, [Channel.Channel, Thread.Thread, Message.Message])],
41
+ capabilities: [
42
+ Capability.contributes(Common.Capability.Schema, [Channel.Channel, Thread.Thread, Message.Message]),
43
+ ],
43
44
  }),
44
45
  ],
45
46
  parameters: {
@@ -54,6 +55,7 @@ type Story = StoryObj<typeof meta>;
54
55
  export const Default: Story = {
55
56
  args: {
56
57
  // Fixed room for testing.
58
+ subject: undefined,
57
59
  roomId: '04a1d1911703b8e929d0649021a965',
58
60
  },
59
61
  };
@@ -2,10 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Atom } from '@effect-atom/atom-react';
5
+ import { Atom, useAtomValue } from '@effect-atom/atom-react';
6
6
  import React, { type ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react';
7
7
 
8
- import { useCapabilities, useCapability } from '@dxos/app-framework/react';
8
+ import { type SurfaceComponentProps, useCapabilities, useCapability } from '@dxos/app-framework/react';
9
9
  import { Context } from '@dxos/context';
10
10
  import { failUndefined } from '@dxos/debug';
11
11
  import { Obj } from '@dxos/echo';
@@ -19,30 +19,32 @@ import { MenuProvider, ToolbarMenu, createMenuAction, createMenuItemGroup, useMe
19
19
  import { useSoundEffect } from '@dxos/react-ui-sfx';
20
20
  import { StackItem } from '@dxos/react-ui-stack';
21
21
 
22
- import { ThreadCapabilities } from '../capabilities';
23
22
  import { meta } from '../meta';
23
+ import { ThreadCapabilities } from '../types';
24
24
  import { type Channel } from '../types';
25
25
 
26
26
  import { Call } from './Call';
27
27
  import ChatContainer from './ChatContainer';
28
28
 
29
- // TODO(burdon): Create Radix style layout.
30
-
31
- export type ChannelContainerProps = {
32
- channel?: Channel.Channel;
33
- roomId?: string;
34
- role?: string;
35
- fullscreen?: boolean;
36
- };
29
+ export type ChannelContainerProps = SurfaceComponentProps<
30
+ Channel.Channel | undefined,
31
+ {
32
+ roomId?: string;
33
+ fullscreen?: boolean;
34
+ }
35
+ >;
37
36
 
38
37
  /**
39
38
  * Renders a call when active, otherwise renders the channel chat.
40
39
  */
41
- export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }: ChannelContainerProps) => {
40
+ // TODO(burdon): Create Radix style layout.
41
+ export const ChannelContainer = ({ role, subject: channel, roomId: roomIdProp, fullscreen }: ChannelContainerProps) => {
42
42
  const space = getSpace(channel);
43
43
  const callManager = useCapability(ThreadCapabilities.CallManager);
44
+ const joined = useAtomValue(callManager.joinedAtom);
45
+ const currentRoomId = useAtomValue(callManager.roomIdAtom);
44
46
  const attendableId = channel ? Obj.getDXN(channel).toString() : undefined;
45
- const roomId = _roomId ?? attendableId ?? failUndefined();
47
+ const roomId = roomIdProp ?? attendableId ?? failUndefined();
46
48
  const identity = useIdentity();
47
49
  const isNamed = !!identity?.profile?.displayName;
48
50
  const joinSound = useSoundEffect('JoinCall');
@@ -83,7 +85,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
83
85
  return;
84
86
  }
85
87
 
86
- if (callManager.joined) {
88
+ if (joined) {
87
89
  await callManager.leave();
88
90
  }
89
91
 
@@ -96,7 +98,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
96
98
  // TODO(burdon): Error sound.
97
99
  log.catch(err);
98
100
  }
99
- }, [extensions, channel, roomId]);
101
+ }, [extensions, channel, roomId, joined]);
100
102
 
101
103
  /**
102
104
  * Leave the call.
@@ -115,7 +117,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
115
117
  }
116
118
  }, [extensions, roomId]);
117
119
 
118
- const isJoined = callManager.joined && callManager.roomId === roomId;
120
+ const isJoined = joined && currentRoomId === roomId;
119
121
 
120
122
  return (
121
123
  <StackItem.Content classNames={isJoined && 'bs-full'} toolbar={!isJoined}>
@@ -5,7 +5,7 @@
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React, { useState } from 'react';
7
7
 
8
- import { Capabilities, IntentPlugin, contributes, createSurface } from '@dxos/app-framework';
8
+ import { Capability, Common, OperationPlugin } from '@dxos/app-framework';
9
9
  import { withPluginManager } from '@dxos/app-framework/testing';
10
10
  import { faker } from '@dxos/random';
11
11
  import { useClient } from '@dxos/react-client';
@@ -45,7 +45,7 @@ const DefaultStory = () => {
45
45
  }
46
46
 
47
47
  return (
48
- <main className='is-full max-is-prose mli-auto bs-dvh overflow-hidden'>
48
+ <main className='is-full max-is-proseMaxWidth mli-auto bs-full overflow-hidden'>
49
49
  <ChatContainer space={space} thread={channel.defaultThread.target} />
50
50
  </main>
51
51
  );
@@ -58,11 +58,11 @@ const meta = {
58
58
  decorators: [
59
59
  withTheme,
60
60
  withPluginManager({
61
- plugins: [IntentPlugin()],
61
+ plugins: [OperationPlugin()],
62
62
  capabilities: [
63
- contributes(
64
- Capabilities.ReactSurface,
65
- createSurface({
63
+ Capability.contributes(
64
+ Common.Capability.ReactSurface,
65
+ Common.createSurface({
66
66
  id: 'test',
67
67
  role: 'card',
68
68
  component: ({ role }) => <span>{JSON.stringify({ role })}</span>,
@@ -8,9 +8,7 @@ import { Obj, Ref } from '@dxos/echo';
8
8
  import { type Space, useMembers } from '@dxos/react-client/echo';
9
9
  import { useIdentity } from '@dxos/react-client/halo';
10
10
  import { Icon, ScrollArea, type ThemedClassName, useThemeContext, useTranslation } from '@dxos/react-ui';
11
- import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
12
11
  import { StackItem } from '@dxos/react-ui-stack';
13
- import { mx } from '@dxos/react-ui-theme';
14
12
  import {
15
13
  MessageTextbox,
16
14
  type MessageTextboxProps,
@@ -19,6 +17,8 @@ import {
19
17
  threadLayout,
20
18
  } from '@dxos/react-ui-thread';
21
19
  import { Message, type Thread } from '@dxos/types';
20
+ import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/ui-editor';
21
+ import { mx } from '@dxos/ui-theme';
22
22
  import { isNonNullable } from '@dxos/util';
23
23
 
24
24
  import { useStatus } from '../hooks';
@@ -44,7 +44,7 @@ export type ChatContainerProps = ThemedClassName<
44
44
  {
45
45
  space: Space;
46
46
  thread: Thread.Thread;
47
- context?: Obj.Any;
47
+ context?: Obj.Unknown;
48
48
  autoFocusTextbox?: boolean;
49
49
  } & Pick<ThreadRootProps, 'current'>
50
50
  >;
@@ -60,7 +60,7 @@ export const ChatContainer = ({
60
60
  const { t } = useTranslation(meta.id);
61
61
  const id = Obj.getDXN(thread).toString();
62
62
  const identity = useIdentity()!;
63
- const members = useMembers(space?.key);
63
+ const members = useMembers(space?.id);
64
64
  const activity = useStatus(space, id);
65
65
  // TODO(wittjosiah): This is a hack to reset the editor after a message is sent.
66
66
  const [_count, _setCount] = useState(0);
@@ -138,10 +138,10 @@ export const ChatContainer = ({
138
138
  </div>
139
139
  {/* NOTE(thure): This can’t also be the `overflow-anchor` because `ScrollArea` injects an interceding node that contains this necessary ref’d element. */}
140
140
  <div role='none' className='bs-px -mbs-px' ref={threadScrollRef} />
141
- <ScrollArea.Scrollbar>
142
- <ScrollArea.Thumb />
143
- </ScrollArea.Scrollbar>
144
141
  </ScrollArea.Viewport>
142
+ <ScrollArea.Scrollbar>
143
+ <ScrollArea.Thumb />
144
+ </ScrollArea.Scrollbar>
145
145
  </ScrollArea.Root>
146
146
 
147
147
  <MessageTextbox extensions={extensions} autoFocus={autoFocus} onSend={handleCreate} {...textboxMetadata} />
@@ -3,14 +3,16 @@
3
3
  //
4
4
 
5
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import * as Effect from 'effect/Effect';
6
7
  import React from 'react';
7
8
 
8
- import { IntentPlugin } from '@dxos/app-framework';
9
+ import { OperationPlugin } from '@dxos/app-framework';
9
10
  import { withPluginManager } from '@dxos/app-framework/testing';
10
- import { Obj, Query, Relation, Type } from '@dxos/echo';
11
+ import { Obj, Query, Relation } from '@dxos/echo';
12
+ import { TestSchema } from '@dxos/echo/testing';
11
13
  import { ClientPlugin } from '@dxos/plugin-client';
12
14
  import { faker } from '@dxos/random';
13
- import { useQuery, useSpace } from '@dxos/react-client/echo';
15
+ import { useDatabase, useQuery } from '@dxos/react-client/echo';
14
16
  import { useIdentity } from '@dxos/react-client/halo';
15
17
  import { useAsyncEffect } from '@dxos/react-ui';
16
18
  import { withLayout, withTheme } from '@dxos/react-ui/testing';
@@ -26,22 +28,22 @@ faker.seed(1);
26
28
 
27
29
  const DefaultStory = () => {
28
30
  const identity = useIdentity();
29
- const space = useSpace();
30
- const anchors = useQuery(space, Query.type(AnchoredTo.AnchoredTo));
31
+ const db = useDatabase();
32
+ const anchors = useQuery(db, Query.type(AnchoredTo.AnchoredTo));
31
33
 
32
34
  useAsyncEffect(async () => {
33
- if (identity && space) {
34
- const object = space.db.add(Obj.make(Type.Expando, {}));
35
- const thread1 = space.db.add(createCommentThread(identity));
36
- const thread2 = space.db.add(createProposalThread(identity));
37
- space.db.add(
35
+ if (identity && db) {
36
+ const object = db.add(Obj.make(TestSchema.Expando, {}));
37
+ const thread1 = db.add(createCommentThread(identity));
38
+ const thread2 = db.add(createProposalThread(identity));
39
+ db.add(
38
40
  Relation.make(AnchoredTo.AnchoredTo, {
39
41
  [Relation.Source]: thread1,
40
42
  [Relation.Target]: object,
41
43
  anchor: 'test',
42
44
  }),
43
45
  );
44
- space.db.add(
46
+ db.add(
45
47
  Relation.make(AnchoredTo.AnchoredTo, {
46
48
  [Relation.Source]: thread2,
47
49
  [Relation.Target]: object,
@@ -49,9 +51,9 @@ const DefaultStory = () => {
49
51
  }),
50
52
  );
51
53
  }
52
- }, [identity, space]);
54
+ }, [identity, db]);
53
55
 
54
- if (!identity || !space || !anchors) {
56
+ if (!identity || !db || !anchors) {
55
57
  return null;
56
58
  }
57
59
 
@@ -63,17 +65,18 @@ const meta = {
63
65
  render: render(DefaultStory),
64
66
  decorators: [
65
67
  withTheme,
66
- withLayout({ container: 'column', scroll: true }),
68
+ withLayout({ layout: 'column', scroll: true }),
67
69
  // TODO(wittjosiah): This shouldn't depend on app framework (use withClientProvider instead).
68
70
  // Currently this is required due to useOnEditAnalytics.
69
71
  withPluginManager({
70
72
  plugins: [
71
- IntentPlugin(),
73
+ OperationPlugin(),
72
74
  ClientPlugin({
73
75
  types: [Message.Message, Thread.Thread, AnchoredTo.AnchoredTo],
74
- onClientInitialized: async ({ client }) => {
75
- await client.halo.createIdentity();
76
- },
76
+ onClientInitialized: ({ client }) =>
77
+ Effect.gen(function* () {
78
+ yield* Effect.promise(() => client.halo.createIdentity());
79
+ }),
77
80
  }),
78
81
  ],
79
82
  }),
@@ -4,12 +4,11 @@
4
4
 
5
5
  import React, { useCallback, useMemo, useRef, useState } from 'react';
6
6
 
7
- import { Obj, Ref, Relation } from '@dxos/echo';
7
+ import { Obj, Relation } from '@dxos/echo';
8
+ import { useObject } from '@dxos/echo-react';
8
9
  import { getSpace, useMembers } from '@dxos/react-client/echo';
9
10
  import { useIdentity } from '@dxos/react-client/halo';
10
11
  import { IconButton, Tag, Tooltip, useThemeContext, useTranslation } from '@dxos/react-ui';
11
- import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
12
- import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/react-ui-theme';
13
12
  import {
14
13
  MessageTextbox,
15
14
  type MessageTextboxProps,
@@ -17,7 +16,8 @@ import {
17
16
  type ThreadRootProps,
18
17
  } from '@dxos/react-ui-thread';
19
18
  import { type AnchoredTo, type Thread } from '@dxos/types';
20
- import { isNonNullable } from '@dxos/util';
19
+ import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/ui-editor';
20
+ import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/ui-theme';
21
21
 
22
22
  import { useStatus } from '../hooks';
23
23
  import { meta } from '../meta';
@@ -50,9 +50,10 @@ export const CommentsThreadContainer = ({
50
50
  const { t } = useTranslation(meta.id);
51
51
  const identity = useIdentity()!;
52
52
  const space = getSpace(anchor);
53
- const members = useMembers(space?.key);
53
+ const members = useMembers(space?.id);
54
54
  const detached = !anchor.anchor;
55
55
  const thread = Relation.getSource(anchor) as Thread.Thread;
56
+ const [messages] = useObject(thread, 'messages');
56
57
  const activity = useStatus(space, Obj.getDXN(thread).toString());
57
58
  const threadScrollRef = useRef<HTMLDivElement | null>(null);
58
59
 
@@ -144,12 +145,11 @@ export const CommentsThreadContainer = ({
144
145
  </div>
145
146
  </div>
146
147
 
147
- {/** TODO(dmaretskyi): How's `thread.messages` undefined? */}
148
- {Ref.Array.targets(thread.messages?.filter(isNonNullable) ?? []).map((message) => (
148
+ {messages?.map((ref) => (
149
149
  <MessageContainer
150
- key={message.id}
150
+ key={ref.dxn.toString()}
151
151
  editable
152
- message={message}
152
+ message={ref}
153
153
  members={members}
154
154
  onDelete={handleMessageDelete}
155
155
  onAcceptProposal={handleAcceptProposal}
@@ -2,14 +2,15 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { useAtomValue } from '@effect-atom/atom-react';
5
6
  import React, { type FC, type PropsWithChildren, useEffect, useState } from 'react';
6
7
 
7
8
  import { useCapability } from '@dxos/app-framework/react';
8
9
  import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
9
- import { mx } from '@dxos/react-ui-theme';
10
+ import { mx } from '@dxos/ui-theme';
10
11
 
11
- import { ThreadCapabilities } from '../../capabilities';
12
12
  import { meta } from '../../meta';
13
+ import { ThreadCapabilities } from '../../types';
13
14
  import { Toolbar, type ToolbarProps } from '../Call';
14
15
  import { VideoObject } from '../Media';
15
16
  import { ResponsiveContainer } from '../ResponsiveGrid';
@@ -39,9 +40,10 @@ type LobbyPreviewProps = {};
39
40
  const LobbyPreview: FC<LobbyPreviewProps> = () => {
40
41
  const { t } = useTranslation(meta.id);
41
42
  const call = useCapability(ThreadCapabilities.CallManager);
43
+ const media = useAtomValue(call.mediaAtom);
42
44
  const [classNames, setClassNames] = useState('');
43
45
  useEffect(() => {
44
- if (!call.media.videoEnabled) {
46
+ if (!media.videoEnabled) {
45
47
  setClassNames('');
46
48
  return;
47
49
  }
@@ -52,14 +54,14 @@ const LobbyPreview: FC<LobbyPreviewProps> = () => {
52
54
  }, 500);
53
55
 
54
56
  return () => clearTimeout(timeout);
55
- }, [call.media.videoEnabled]);
57
+ }, [media.videoEnabled]);
56
58
 
57
59
  return (
58
60
  <div className='grid grow p-4'>
59
61
  <ResponsiveContainer>
60
- {(call.media.videoEnabled && (
62
+ {(media.videoEnabled && (
61
63
  <VideoObject
62
- videoStream={call.media.videoStream}
64
+ videoStream={media.videoStream}
63
65
  flip
64
66
  muted
65
67
  classNames={mx(
@@ -46,13 +46,13 @@ export const AudioStream: FC<AudioStreamProps> = ({ tracks }) => {
46
46
  );
47
47
  };
48
48
 
49
- type AudioTrackProps = {
49
+ type AudioTrackParams = {
50
50
  track: MediaStreamTrack;
51
51
  mediaStream: MediaStream;
52
52
  resetSrcObject: () => void;
53
53
  };
54
54
 
55
- const AudioTrack = ({ track, mediaStream, resetSrcObject }: AudioTrackProps) => {
55
+ const AudioTrack = ({ track, mediaStream, resetSrcObject }: AudioTrackParams) => {
56
56
  useEffect(() => {
57
57
  const currentTrack = track;
58
58
  mediaStream.addTrack(currentTrack);
@@ -5,7 +5,7 @@
5
5
  import React, { type JSX, forwardRef, memo, useEffect, useRef } from 'react';
6
6
 
7
7
  import { type ThemedClassName } from '@dxos/react-ui';
8
- import { mx } from '@dxos/react-ui-theme';
8
+ import { mx } from '@dxos/ui-theme';
9
9
 
10
10
  export type VideoObjectProps = Omit<JSX.IntrinsicElements['video'], 'className' | 'ref'> &
11
11
  ThemedClassName<{