@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
@@ -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
- import { useCapability } from '@dxos/app-framework';
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,11 +2,13 @@
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
- import { useAppGraph, useCapability } from '@dxos/app-framework';
8
+ import { useAppGraph, useCapability } from '@dxos/app-framework/react';
9
+ import { Obj } from '@dxos/echo';
10
+ import { Node, useActionRunner } from '@dxos/plugin-graph';
8
11
  import { useActions, useNode } from '@dxos/plugin-graph';
9
- import { fullyQualifiedId } from '@dxos/react-client/echo';
10
12
  import {
11
13
  Icon,
12
14
  IconButton,
@@ -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
- const node = useNode(graph, channel && fullyQualifiedId(channel));
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} />
@@ -13,9 +13,7 @@ import { IconButton, Input, type ThemedClassName, useTranslation } from '@dxos/r
13
13
  import { type EncodedTrackName, type GlobalState } from '../calls';
14
14
  import { meta } from '../meta';
15
15
 
16
- export type CallDebugPanelProps = ThemedClassName<{
17
- state?: GlobalState;
18
- }>;
16
+ export type CallDebugPanelProps = ThemedClassName<{ state?: GlobalState }>;
19
17
 
20
18
  export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
21
19
  const { t } = useTranslation(meta.id);
@@ -73,24 +71,24 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
73
71
  open={open}
74
72
  onToggle={handleToggle}
75
73
  title={t('meeting status title')}
76
- maxHeight={false}
77
74
  info={<div className='flex items-center gap-2'> {state?.call.joined ? 'Active' : 'Inactive'}</div>}
75
+ maxHeight={0}
78
76
  >
79
- <div className='flex flex-col w-full gap-2 text-xs'>
80
- <div className='flex items-center gap-2'>
77
+ <div className='flex flex-col is-full text-xs'>
78
+ <div className='flex items-center gap-2 items-center'>
81
79
  <Input.Root>
82
- <Input.Label classNames={'text-sm'}>{t('show webrtc stats title')}</Input.Label>
83
- <Input.Checkbox checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
80
+ <Input.Switch checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
81
+ <Input.Label>{t('show webrtc stats title')}</Input.Label>
84
82
  </Input.Root>
85
83
  </div>
86
- <div className='flex items-center gap-2'>
84
+ <div className='flex items-center gap-2 items-center'>
87
85
  <Input.Root>
88
- <Input.Label classNames={'text-sm'}>{t('show calls history title')}</Input.Label>
89
- <Input.Checkbox checked={showServiceHistory} onCheckedChange={handleToggleServiceHistory} />
86
+ <Input.Switch checked={showServiceHistory} onCheckedChange={handleToggleServiceHistory} />
87
+ <Input.Label>{t('show calls history title')}</Input.Label>
90
88
  </Input.Root>
91
89
  </div>
92
- <div className='flex items-center gap-2'>
93
- <IconButton classNames={'text-sm'} icon='ph--copy--regular' label={'copy raw'} onClick={handleCopyRaw} />
90
+ <div className='flex items-center gap-2 items-center'>
91
+ <IconButton icon='ph--copy--regular' label={'copy raw'} onClick={handleCopyRaw} />
94
92
  </div>
95
93
  <Table rows={rows} />
96
94
  {showDetailedWebRTCStats && <JsonView data={{ stats }} />}
@@ -160,7 +158,7 @@ export type TableProps = {
160
158
 
161
159
  export const Table = ({ rows }: TableProps) => {
162
160
  return (
163
- <div className='w-full text-xs font-mono'>
161
+ <div className='is-full text-xs font-mono'>
164
162
  {rows.map(([prefix, label, value, unit], i) => (
165
163
  <div key={i} className='grid grid-cols-[3fr_1fr_1fr_1fr]'>
166
164
  <div className='p-1'>{prefix}</div>
@@ -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
- import { useCapability } from '@dxos/app-framework';
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,29 +5,28 @@
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
- import { DataType } from '@dxos/schema';
14
12
  import { render } from '@dxos/storybook-utils';
13
+ import { Message, Thread } from '@dxos/types';
15
14
 
16
15
  import { createThreadPlugins } from '../testing';
17
16
  import { translations } from '../translations';
18
- import { Channel, Thread } from '../types';
17
+ import { Channel } from '../types';
19
18
 
20
19
  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, DataType.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,15 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Rx } from '@effect-rx/rx-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';
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
+ import { Obj } from '@dxos/echo';
11
12
  import { log } from '@dxos/log';
12
13
  import { useClient } from '@dxos/react-client';
13
- import { fullyQualifiedId, getSpace } from '@dxos/react-client/echo';
14
+ import { getSpace } from '@dxos/react-client/echo';
14
15
  import { useIdentity } from '@dxos/react-client/halo';
15
16
  import { ElevationProvider, Input, useTranslation } from '@dxos/react-ui';
16
17
  import { ControlGroup, ControlGroupButton, ControlItemInput } from '@dxos/react-ui-form';
@@ -18,30 +19,32 @@ import { MenuProvider, ToolbarMenu, createMenuAction, createMenuItemGroup, useMe
18
19
  import { useSoundEffect } from '@dxos/react-ui-sfx';
19
20
  import { StackItem } from '@dxos/react-ui-stack';
20
21
 
21
- import { ThreadCapabilities } from '../capabilities';
22
22
  import { meta } from '../meta';
23
+ import { ThreadCapabilities } from '../types';
23
24
  import { type Channel } from '../types';
24
25
 
25
26
  import { Call } from './Call';
26
27
  import ChatContainer from './ChatContainer';
27
28
 
28
- // TODO(burdon): Create Radix style layout.
29
-
30
- export type ChannelContainerProps = {
31
- channel?: Channel.Channel;
32
- roomId?: string;
33
- role?: string;
34
- fullscreen?: boolean;
35
- };
29
+ export type ChannelContainerProps = SurfaceComponentProps<
30
+ Channel.Channel | undefined,
31
+ {
32
+ roomId?: string;
33
+ fullscreen?: boolean;
34
+ }
35
+ >;
36
36
 
37
37
  /**
38
38
  * Renders a call when active, otherwise renders the channel chat.
39
39
  */
40
- 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) => {
41
42
  const space = getSpace(channel);
42
43
  const callManager = useCapability(ThreadCapabilities.CallManager);
43
- const attendableId = fullyQualifiedId(channel);
44
- const roomId = _roomId ?? (channel ? attendableId : failUndefined());
44
+ const joined = useAtomValue(callManager.joinedAtom);
45
+ const currentRoomId = useAtomValue(callManager.roomIdAtom);
46
+ const attendableId = channel ? Obj.getDXN(channel).toString() : undefined;
47
+ const roomId = roomIdProp ?? attendableId ?? failUndefined();
45
48
  const identity = useIdentity();
46
49
  const isNamed = !!identity?.profile?.displayName;
47
50
  const joinSound = useSoundEffect('JoinCall');
@@ -82,7 +85,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
82
85
  return;
83
86
  }
84
87
 
85
- if (callManager.joined) {
88
+ if (joined) {
86
89
  await callManager.leave();
87
90
  }
88
91
 
@@ -95,7 +98,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
95
98
  // TODO(burdon): Error sound.
96
99
  log.catch(err);
97
100
  }
98
- }, [extensions, channel, roomId]);
101
+ }, [extensions, channel, roomId, joined]);
99
102
 
100
103
  /**
101
104
  * Leave the call.
@@ -114,7 +117,7 @@ export const ChannelContainer = ({ channel, roomId: _roomId, role, fullscreen }:
114
117
  }
115
118
  }, [extensions, roomId]);
116
119
 
117
- const isJoined = callManager.joined && callManager.roomId === roomId;
120
+ const isJoined = joined && currentRoomId === roomId;
118
121
 
119
122
  return (
120
123
  <StackItem.Content classNames={isJoined && 'bs-full'} toolbar={!isJoined}>
@@ -164,7 +167,7 @@ const DisplayNameMissing = () => {
164
167
  const useChannelToolbarActions = (onJoinCall?: () => void) => {
165
168
  const creator = useMemo(
166
169
  () =>
167
- Rx.make(() => {
170
+ Atom.make(() => {
168
171
  return {
169
172
  nodes: [
170
173
  createMenuItemGroup('root', {
@@ -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';
@@ -15,11 +15,11 @@ import { withClientProvider } from '@dxos/react-client/testing';
15
15
  import { useAsyncEffect } from '@dxos/react-ui';
16
16
  import { withTheme } from '@dxos/react-ui/testing';
17
17
  import { Thread as ThreadComponent } from '@dxos/react-ui-thread';
18
- import { DataType } from '@dxos/schema';
19
18
  import { render } from '@dxos/storybook-utils';
19
+ import { Message, Thread } from '@dxos/types';
20
20
 
21
21
  import { translations } from '../translations';
22
- import { Channel, Thread } from '../types';
22
+ import { Channel } from '../types';
23
23
 
24
24
  import { ChatContainer } from './ChatContainer';
25
25
 
@@ -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>,
@@ -70,7 +70,7 @@ const meta = {
70
70
  ),
71
71
  ],
72
72
  }),
73
- withClientProvider({ createSpace: true, types: [Thread.Thread, Channel.Channel, DataType.Message] }),
73
+ withClientProvider({ createSpace: true, types: [Thread.Thread, Channel.Channel, Message.Message] }),
74
74
  ],
75
75
  parameters: {
76
76
  layout: 'fullscreen',
@@ -5,12 +5,10 @@
5
5
  import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';
6
6
 
7
7
  import { Obj, Ref } from '@dxos/echo';
8
- import { type Space, fullyQualifiedId, useMembers } from '@dxos/react-client/echo';
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,
@@ -18,12 +16,13 @@ import {
18
16
  type ThreadRootProps,
19
17
  threadLayout,
20
18
  } from '@dxos/react-ui-thread';
21
- import { DataType } from '@dxos/schema';
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';
25
25
  import { meta } from '../meta';
26
- import { type Thread } from '../types';
27
26
  import { getMessageMetadata } from '../util';
28
27
 
29
28
  import { command } from './command-extension';
@@ -45,7 +44,7 @@ export type ChatContainerProps = ThemedClassName<
45
44
  {
46
45
  space: Space;
47
46
  thread: Thread.Thread;
48
- context?: Obj.Any;
47
+ context?: Obj.Unknown;
49
48
  autoFocusTextbox?: boolean;
50
49
  } & Pick<ThreadRootProps, 'current'>
51
50
  >;
@@ -59,9 +58,9 @@ export const ChatContainer = ({
59
58
  autoFocusTextbox,
60
59
  }: ChatContainerProps) => {
61
60
  const { t } = useTranslation(meta.id);
62
- const id = fullyQualifiedId(thread);
61
+ const id = Obj.getDXN(thread).toString();
63
62
  const identity = useIdentity()!;
64
- const members = useMembers(space?.key);
63
+ const members = useMembers(space?.id);
65
64
  const activity = useStatus(space, id);
66
65
  // TODO(wittjosiah): This is a hack to reset the editor after a message is sent.
67
66
  const [_count, _setCount] = useState(0);
@@ -99,16 +98,18 @@ export const ChatContainer = ({
99
98
  return false;
100
99
  }
101
100
 
102
- thread.messages.push(
103
- Ref.make(
104
- Obj.make(DataType.Message, {
105
- created: new Date().toISOString(),
106
- sender: { identityDid: identity.did },
107
- blocks: [{ _tag: 'text', text: messageRef.current }],
108
- properties: context ? { context: Ref.make(context) } : undefined,
109
- }),
110
- ),
111
- );
101
+ Obj.change(thread, (t) => {
102
+ t.messages.push(
103
+ Ref.make(
104
+ Obj.make(Message.Message, {
105
+ created: new Date().toISOString(),
106
+ sender: { identityDid: identity.did },
107
+ blocks: [{ _tag: 'text', text: messageRef.current }],
108
+ properties: context ? { context: Ref.make(context) } : undefined,
109
+ }),
110
+ ),
111
+ );
112
+ });
112
113
 
113
114
  messageRef.current = '';
114
115
  setAutoFocus(true);
@@ -139,10 +140,10 @@ export const ChatContainer = ({
139
140
  </div>
140
141
  {/* NOTE(thure): This can’t also be the `overflow-anchor` because `ScrollArea` injects an interceding node that contains this necessary ref’d element. */}
141
142
  <div role='none' className='bs-px -mbs-px' ref={threadScrollRef} />
142
- <ScrollArea.Scrollbar>
143
- <ScrollArea.Thumb />
144
- </ScrollArea.Scrollbar>
145
143
  </ScrollArea.Viewport>
144
+ <ScrollArea.Scrollbar>
145
+ <ScrollArea.Thumb />
146
+ </ScrollArea.Scrollbar>
146
147
  </ScrollArea.Root>
147
148
 
148
149
  <MessageTextbox extensions={extensions} autoFocus={autoFocus} onSend={handleCreate} {...textboxMetadata} />
@@ -3,22 +3,23 @@
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';
17
- import { AnchoredTo, DataType } from '@dxos/schema';
18
19
  import { render } from '@dxos/storybook-utils';
20
+ import { AnchoredTo, Message, Thread } from '@dxos/types';
19
21
 
20
22
  import { translations } from '../translations';
21
- import { Thread } from '../types';
22
23
 
23
24
  import { CommentsContainer } from './CommentsContainer';
24
25
  import { createCommentThread, createProposalThread } from './testing';
@@ -27,32 +28,32 @@ faker.seed(1);
27
28
 
28
29
  const DefaultStory = () => {
29
30
  const identity = useIdentity();
30
- const space = useSpace();
31
- const anchors = useQuery(space, Query.type(AnchoredTo));
31
+ const db = useDatabase();
32
+ const anchors = useQuery(db, Query.type(AnchoredTo.AnchoredTo));
32
33
 
33
34
  useAsyncEffect(async () => {
34
- if (identity && space) {
35
- const object = space.db.add(Obj.make(Type.Expando, {}));
36
- const thread1 = space.db.add(createCommentThread(identity));
37
- const thread2 = space.db.add(createProposalThread(identity));
38
- space.db.add(
39
- Relation.make(AnchoredTo, {
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(
40
+ Relation.make(AnchoredTo.AnchoredTo, {
40
41
  [Relation.Source]: thread1,
41
42
  [Relation.Target]: object,
42
43
  anchor: 'test',
43
44
  }),
44
45
  );
45
- space.db.add(
46
- Relation.make(AnchoredTo, {
46
+ db.add(
47
+ Relation.make(AnchoredTo.AnchoredTo, {
47
48
  [Relation.Source]: thread2,
48
49
  [Relation.Target]: object,
49
50
  anchor: 'test',
50
51
  }),
51
52
  );
52
53
  }
53
- }, [identity, space]);
54
+ }, [identity, db]);
54
55
 
55
- if (!identity || !space || !anchors) {
56
+ if (!identity || !db || !anchors) {
56
57
  return null;
57
58
  }
58
59
 
@@ -64,17 +65,18 @@ const meta = {
64
65
  render: render(DefaultStory),
65
66
  decorators: [
66
67
  withTheme,
67
- withLayout({ container: 'column', scroll: true }),
68
+ withLayout({ layout: 'column', scroll: true }),
68
69
  // TODO(wittjosiah): This shouldn't depend on app framework (use withClientProvider instead).
69
70
  // Currently this is required due to useOnEditAnalytics.
70
71
  withPluginManager({
71
72
  plugins: [
72
- IntentPlugin(),
73
+ OperationPlugin(),
73
74
  ClientPlugin({
74
- types: [DataType.Message, Thread.Thread, AnchoredTo],
75
- onClientInitialized: async ({ client }) => {
76
- await client.halo.createIdentity();
77
- },
75
+ types: [Message.Message, Thread.Thread, AnchoredTo.AnchoredTo],
76
+ onClientInitialized: ({ client }) =>
77
+ Effect.gen(function* () {
78
+ yield* Effect.promise(() => client.halo.createIdentity());
79
+ }),
78
80
  }),
79
81
  ],
80
82
  }),