@dxos/plugin-thread 0.8.4-main.67995b8 → 0.8.4-main.ae835ea

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 (302) hide show
  1. package/dist/lib/browser/ChannelContainer-SVV4ZX5T.mjs +16 -0
  2. package/dist/lib/browser/ChatContainer-ALFWQ65B.mjs +15 -0
  3. package/dist/lib/browser/{app-graph-builder-N7BE5TYW.mjs → app-graph-builder-ACBXRBOS.mjs} +22 -22
  4. package/dist/lib/browser/app-graph-builder-ACBXRBOS.mjs.map +7 -0
  5. package/dist/lib/browser/{call-manager-NIPDYUVD.mjs → call-manager-P3MYR2JS.mjs} +7 -7
  6. package/dist/lib/browser/call-manager-P3MYR2JS.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-6CUDBEYP.mjs +377 -0
  8. package/dist/lib/browser/chunk-6CUDBEYP.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-BBTXGRIR.mjs +18 -0
  10. package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-GERVMFQW.mjs → chunk-CP7E2HRE.mjs} +2 -2
  12. package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-KWPRNHTK.mjs → chunk-DJOUMWEL.mjs} +242 -238
  14. package/dist/lib/browser/chunk-DJOUMWEL.mjs.map +7 -0
  15. package/dist/lib/browser/{chunk-ERWASUQK.mjs → chunk-HDEQRBOC.mjs} +38 -6
  16. package/dist/lib/{node-esm/chunk-25ABSYP2.mjs.map → browser/chunk-HDEQRBOC.mjs.map} +4 -4
  17. package/dist/lib/browser/chunk-IQSXEHOW.mjs +618 -0
  18. package/dist/lib/browser/chunk-IQSXEHOW.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-K2DUJRFJ.mjs +27 -0
  20. package/dist/lib/browser/chunk-K2DUJRFJ.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-L6F2AG6W.mjs +23 -0
  22. package/dist/lib/browser/{chunk-FR7KJPNY.mjs.map → chunk-L6F2AG6W.mjs.map} +3 -3
  23. package/dist/lib/browser/{chunk-ZE7KWN36.mjs → chunk-US5ZQYC3.mjs} +310 -186
  24. package/dist/lib/browser/chunk-US5ZQYC3.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-UTSLSZED.mjs +178 -0
  26. package/dist/lib/browser/chunk-UTSLSZED.mjs.map +7 -0
  27. package/dist/lib/browser/{chunk-6NSMBO3B.mjs → chunk-XYUJXHYV.mjs} +55 -5
  28. package/dist/lib/browser/chunk-XYUJXHYV.mjs.map +7 -0
  29. package/dist/lib/browser/index.mjs +35 -24
  30. package/dist/lib/browser/index.mjs.map +3 -3
  31. package/dist/lib/browser/{intent-resolver-JFGLZ6VI.mjs → intent-resolver-5POQTZ24.mjs} +83 -33
  32. package/dist/lib/browser/intent-resolver-5POQTZ24.mjs.map +7 -0
  33. package/dist/lib/browser/{markdown-M3FMR7OD.mjs → markdown-L7LDNF56.mjs} +10 -10
  34. package/dist/lib/browser/markdown-L7LDNF56.mjs.map +7 -0
  35. package/dist/lib/browser/meta.json +1 -1
  36. package/dist/lib/browser/react-root-RCJLK4EP.mjs +28 -0
  37. package/dist/lib/browser/react-root-RCJLK4EP.mjs.map +7 -0
  38. package/dist/lib/browser/{react-surface-XWS6GIZY.mjs → react-surface-IC576W2W.mjs} +27 -27
  39. package/dist/lib/browser/react-surface-IC576W2W.mjs.map +7 -0
  40. package/dist/lib/browser/{settings-E32MTL7A.mjs → settings-5FYGBOGI.mjs} +5 -5
  41. package/dist/lib/browser/{settings-E32MTL7A.mjs.map → settings-5FYGBOGI.mjs.map} +1 -1
  42. package/dist/lib/browser/{state-H6CYONWE.mjs → state-36REWXO5.mjs} +5 -5
  43. package/dist/lib/browser/state-36REWXO5.mjs.map +7 -0
  44. package/dist/lib/browser/toolkit-PXASLYEQ.mjs +74 -0
  45. package/dist/lib/browser/toolkit-PXASLYEQ.mjs.map +7 -0
  46. package/dist/lib/browser/types/index.mjs +7 -9
  47. package/dist/lib/node-esm/ChannelContainer-63GMQ753.mjs +17 -0
  48. package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs → ChatContainer-MFKPXMIK.mjs} +6 -6
  49. package/dist/lib/node-esm/{app-graph-builder-VCW76Z6V.mjs → app-graph-builder-JXD7KY3G.mjs} +22 -22
  50. package/dist/lib/node-esm/app-graph-builder-JXD7KY3G.mjs.map +7 -0
  51. package/dist/lib/node-esm/{call-manager-D6O5ZJJ4.mjs → call-manager-FCEFP7EJ.mjs} +7 -7
  52. package/dist/lib/node-esm/call-manager-FCEFP7EJ.mjs.map +7 -0
  53. package/dist/lib/node-esm/{chunk-25ABSYP2.mjs → chunk-2MMJF7DW.mjs} +38 -6
  54. package/dist/lib/node-esm/chunk-2MMJF7DW.mjs.map +7 -0
  55. package/dist/lib/node-esm/{chunk-OU5BYIDO.mjs → chunk-2V3WSLUZ.mjs} +55 -5
  56. package/dist/lib/node-esm/chunk-2V3WSLUZ.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-57XR3LEF.mjs → chunk-ABUFOZVX.mjs} +2 -2
  58. package/dist/lib/node-esm/chunk-ABUFOZVX.mjs.map +7 -0
  59. package/dist/lib/node-esm/chunk-AFDO2SUZ.mjs +25 -0
  60. package/dist/lib/node-esm/{chunk-2CXOK2TD.mjs.map → chunk-AFDO2SUZ.mjs.map} +3 -3
  61. package/dist/lib/node-esm/{chunk-IHDNQLLR.mjs → chunk-KGYDYYKJ.mjs} +310 -186
  62. package/dist/lib/node-esm/chunk-KGYDYYKJ.mjs.map +7 -0
  63. package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs +378 -0
  64. package/dist/lib/node-esm/chunk-NWUUMKVQ.mjs.map +7 -0
  65. package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs +619 -0
  66. package/dist/lib/node-esm/chunk-Q7AKKZNY.mjs.map +7 -0
  67. package/dist/lib/node-esm/{chunk-C3XFMUAY.mjs → chunk-QCQAAU6J.mjs} +242 -238
  68. package/dist/lib/node-esm/chunk-QCQAAU6J.mjs.map +7 -0
  69. package/dist/lib/node-esm/chunk-TYLLHI46.mjs +179 -0
  70. package/dist/lib/node-esm/chunk-TYLLHI46.mjs.map +7 -0
  71. package/dist/lib/node-esm/chunk-XI45H4IV.mjs +28 -0
  72. package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +7 -0
  73. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +19 -0
  74. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +7 -0
  75. package/dist/lib/node-esm/index.mjs +35 -24
  76. package/dist/lib/node-esm/index.mjs.map +3 -3
  77. package/dist/lib/node-esm/{intent-resolver-OXGNQ44Y.mjs → intent-resolver-63NV3XD2.mjs} +83 -33
  78. package/dist/lib/node-esm/intent-resolver-63NV3XD2.mjs.map +7 -0
  79. package/dist/lib/node-esm/{markdown-INKTE4MH.mjs → markdown-ZQW7MI5U.mjs} +10 -10
  80. package/dist/lib/node-esm/markdown-ZQW7MI5U.mjs.map +7 -0
  81. package/dist/lib/node-esm/meta.json +1 -1
  82. package/dist/lib/node-esm/react-root-4IDB2SN2.mjs +29 -0
  83. package/dist/lib/node-esm/react-root-4IDB2SN2.mjs.map +7 -0
  84. package/dist/lib/node-esm/{react-surface-MJ33KPYE.mjs → react-surface-O4LGTAZ3.mjs} +27 -27
  85. package/dist/lib/node-esm/react-surface-O4LGTAZ3.mjs.map +7 -0
  86. package/dist/lib/node-esm/{settings-SJ24YG7M.mjs → settings-EOBQUZSW.mjs} +5 -5
  87. package/dist/lib/node-esm/{settings-SJ24YG7M.mjs.map → settings-EOBQUZSW.mjs.map} +1 -1
  88. package/dist/lib/node-esm/{state-D7WNDT3N.mjs → state-X3W67GTL.mjs} +5 -5
  89. package/dist/lib/node-esm/state-X3W67GTL.mjs.map +7 -0
  90. package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs +75 -0
  91. package/dist/lib/node-esm/toolkit-X2KA4FNC.mjs.map +7 -0
  92. package/dist/lib/node-esm/types/index.mjs +7 -9
  93. package/dist/types/src/ThreadPlugin.d.ts +1 -1
  94. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  95. package/dist/types/src/calls/call-manager.d.ts.map +1 -1
  96. package/dist/types/src/calls/call-swarm-synchronizer.d.ts.map +1 -1
  97. package/dist/types/src/calls/media-manager.d.ts +1 -1
  98. package/dist/types/src/calls/media-manager.d.ts.map +1 -1
  99. package/dist/types/src/calls/types.d.ts +1 -1
  100. package/dist/types/src/calls/types.d.ts.map +1 -1
  101. package/dist/types/src/calls/util/calls-service.d.ts +4 -2
  102. package/dist/types/src/calls/util/calls-service.d.ts.map +1 -1
  103. package/dist/types/src/calls/util/stub-media-streams.d.ts.map +1 -1
  104. package/dist/types/src/calls-service.stories.d.ts +10 -9
  105. package/dist/types/src/calls-service.stories.d.ts.map +1 -1
  106. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  107. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  108. package/dist/types/src/capabilities/call-manager.d.ts +1 -1
  109. package/dist/types/src/capabilities/call-manager.d.ts.map +1 -1
  110. package/dist/types/src/capabilities/capabilities.d.ts +3 -3
  111. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  112. package/dist/types/src/capabilities/index.d.ts +11 -10
  113. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  114. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  115. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  116. package/dist/types/src/capabilities/markdown.d.ts +1 -1
  117. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/react-root.d.ts +2 -2
  119. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  120. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  121. package/dist/types/src/capabilities/settings.d.ts +1 -1
  122. package/dist/types/src/capabilities/state.d.ts +2 -2
  123. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  124. package/dist/types/src/capabilities/toolkit.d.ts +24 -0
  125. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  126. package/dist/types/src/components/Call/Call.d.ts.map +1 -1
  127. package/dist/types/src/components/Call/Toolbar.d.ts +2 -2
  128. package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
  129. package/dist/types/src/components/CallDebugPanel.d.ts +7 -0
  130. package/dist/types/src/components/CallDebugPanel.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 +2 -2
  133. package/dist/types/src/components/ChannelContainer.d.ts.map +1 -1
  134. package/dist/types/src/components/ChannelContainer.stories.d.ts +155 -5
  135. package/dist/types/src/components/ChannelContainer.stories.d.ts.map +1 -1
  136. package/dist/types/src/components/Chat.stories.d.ts +158 -5
  137. package/dist/types/src/components/Chat.stories.d.ts.map +1 -1
  138. package/dist/types/src/components/ChatContainer.d.ts +6 -5
  139. package/dist/types/src/components/ChatContainer.d.ts.map +1 -1
  140. package/dist/types/src/components/Comments.stories.d.ts +156 -4
  141. package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
  142. package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
  143. package/dist/types/src/components/CommentsThreadContainer.d.ts +2 -2
  144. package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
  145. package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
  146. package/dist/types/src/components/Media/VideoObject.d.ts +2 -2
  147. package/dist/types/src/components/Media/VideoObject.d.ts.map +1 -1
  148. package/dist/types/src/components/Media/VideoObject.stories.d.ts +18 -4
  149. package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
  150. package/dist/types/src/components/MessageContainer.d.ts +4 -1
  151. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  152. package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
  153. package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +1 -1
  154. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +155 -3
  155. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
  156. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +157 -4
  157. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
  158. package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
  159. package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
  160. package/dist/types/src/components/ThreadSettings.d.ts +1 -1
  161. package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
  162. package/dist/types/src/components/command-extension.d.ts.map +1 -1
  163. package/dist/types/src/components/index.d.ts +1 -1
  164. package/dist/types/src/components/index.d.ts.map +1 -1
  165. package/dist/types/src/components/testing.d.ts +3 -2
  166. package/dist/types/src/components/testing.d.ts.map +1 -1
  167. package/dist/types/src/extensions/threads.d.ts.map +1 -1
  168. package/dist/types/src/hooks/index.d.ts +1 -0
  169. package/dist/types/src/hooks/index.d.ts.map +1 -1
  170. package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +2 -0
  171. package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +1 -0
  172. package/dist/types/src/hooks/useVideoStreamTrack.d.ts +1 -1
  173. package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -1
  174. package/dist/types/src/meta.d.ts +1 -2
  175. package/dist/types/src/meta.d.ts.map +1 -1
  176. package/dist/types/src/testing/stories.d.ts.map +1 -1
  177. package/dist/types/src/translations.d.ts +74 -6
  178. package/dist/types/src/translations.d.ts.map +1 -1
  179. package/dist/types/src/types/Channel.d.ts +16 -0
  180. package/dist/types/src/types/Channel.d.ts.map +1 -0
  181. package/dist/types/src/types/Thread.d.ts +167 -0
  182. package/dist/types/src/types/Thread.d.ts.map +1 -0
  183. package/dist/types/src/types/index.d.ts +2 -1
  184. package/dist/types/src/types/index.d.ts.map +1 -1
  185. package/dist/types/src/types/types.d.ts +278 -206
  186. package/dist/types/src/types/types.d.ts.map +1 -1
  187. package/dist/types/tsconfig.tsbuildinfo +1 -1
  188. package/package.json +64 -62
  189. package/src/ThreadPlugin.tsx +136 -126
  190. package/src/calls/call-manager.ts +2 -2
  191. package/src/calls/call-swarm-synchronizer.ts +1 -1
  192. package/src/calls/media-manager.ts +60 -34
  193. package/src/calls/types.ts +8 -4
  194. package/src/calls/util/calls-service.ts +65 -14
  195. package/src/calls/util/stub-media-streams.ts +62 -5
  196. package/src/calls-service.stories.tsx +78 -65
  197. package/src/capabilities/app-graph-builder.ts +24 -18
  198. package/src/capabilities/call-manager.ts +3 -2
  199. package/src/capabilities/capabilities.ts +8 -8
  200. package/src/capabilities/index.ts +1 -0
  201. package/src/capabilities/intent-resolver.ts +50 -20
  202. package/src/capabilities/markdown.ts +4 -3
  203. package/src/capabilities/react-root.tsx +2 -2
  204. package/src/capabilities/react-surface.tsx +19 -18
  205. package/src/capabilities/state.ts +2 -1
  206. package/src/capabilities/toolkit.ts +85 -0
  207. package/src/components/Call/Call.tsx +3 -2
  208. package/src/components/Call/Toolbar.tsx +7 -7
  209. package/src/components/CallDebugPanel.tsx +108 -49
  210. package/src/components/CallSidebar.tsx +2 -1
  211. package/src/components/ChannelContainer.stories.tsx +14 -13
  212. package/src/components/ChannelContainer.tsx +20 -16
  213. package/src/components/Chat.stories.tsx +32 -35
  214. package/src/components/ChatContainer.tsx +33 -20
  215. package/src/components/Comments.stories.tsx +38 -39
  216. package/src/components/CommentsContainer.tsx +4 -3
  217. package/src/components/CommentsThreadContainer.tsx +28 -21
  218. package/src/components/Lobby/Lobby.tsx +1 -1
  219. package/src/components/Media/VideoObject.stories.tsx +36 -28
  220. package/src/components/MessageContainer.tsx +43 -9
  221. package/src/components/Participant/Participant.tsx +13 -7
  222. package/src/components/Participant/ParticipantGrid.tsx +2 -1
  223. package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +8 -8
  224. package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +44 -42
  225. package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +1 -1
  226. package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +2 -2
  227. package/src/components/ThreadComplementary.tsx +42 -12
  228. package/src/components/ThreadSettings.tsx +6 -7
  229. package/src/components/command-extension.ts +5 -2
  230. package/src/components/testing.ts +25 -3
  231. package/src/extensions/threads.ts +7 -7
  232. package/src/hooks/index.ts +1 -0
  233. package/src/hooks/useBlackCanvasStreamTrack.tsx +27 -0
  234. package/src/hooks/useDebugMode.ts +1 -1
  235. package/src/hooks/useVideoStreamTrack.tsx +6 -3
  236. package/src/meta.ts +9 -5
  237. package/src/testing/stories.ts +5 -8
  238. package/src/translations.ts +6 -3
  239. package/src/types/Channel.ts +27 -0
  240. package/src/types/Thread.ts +26 -0
  241. package/src/types/index.ts +2 -1
  242. package/src/types/types.ts +30 -20
  243. package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
  244. package/src/typings.d.ts +8 -0
  245. package/src/util.ts +1 -1
  246. package/dist/lib/browser/ChannelContainer-3GIE7ASU.mjs +0 -16
  247. package/dist/lib/browser/ChatContainer-AIGIWAUG.mjs +0 -15
  248. package/dist/lib/browser/app-graph-builder-N7BE5TYW.mjs.map +0 -7
  249. package/dist/lib/browser/call-manager-NIPDYUVD.mjs.map +0 -7
  250. package/dist/lib/browser/chunk-3SGRT4NM.mjs +0 -367
  251. package/dist/lib/browser/chunk-3SGRT4NM.mjs.map +0 -7
  252. package/dist/lib/browser/chunk-6NSMBO3B.mjs.map +0 -7
  253. package/dist/lib/browser/chunk-ERWASUQK.mjs.map +0 -7
  254. package/dist/lib/browser/chunk-EV4JWI7L.mjs +0 -17
  255. package/dist/lib/browser/chunk-EV4JWI7L.mjs.map +0 -7
  256. package/dist/lib/browser/chunk-FR7KJPNY.mjs +0 -21
  257. package/dist/lib/browser/chunk-GCLD5ESP.mjs +0 -137
  258. package/dist/lib/browser/chunk-GCLD5ESP.mjs.map +0 -7
  259. package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
  260. package/dist/lib/browser/chunk-KWPRNHTK.mjs.map +0 -7
  261. package/dist/lib/browser/chunk-LGSDKXPF.mjs +0 -18
  262. package/dist/lib/browser/chunk-LGSDKXPF.mjs.map +0 -7
  263. package/dist/lib/browser/chunk-VUWC4IJM.mjs +0 -479
  264. package/dist/lib/browser/chunk-VUWC4IJM.mjs.map +0 -7
  265. package/dist/lib/browser/chunk-ZE7KWN36.mjs.map +0 -7
  266. package/dist/lib/browser/intent-resolver-JFGLZ6VI.mjs.map +0 -7
  267. package/dist/lib/browser/markdown-M3FMR7OD.mjs.map +0 -7
  268. package/dist/lib/browser/react-root-JEUSQXI6.mjs +0 -28
  269. package/dist/lib/browser/react-root-JEUSQXI6.mjs.map +0 -7
  270. package/dist/lib/browser/react-surface-XWS6GIZY.mjs.map +0 -7
  271. package/dist/lib/browser/state-H6CYONWE.mjs.map +0 -7
  272. package/dist/lib/node-esm/ChannelContainer-7FXCKO7X.mjs +0 -17
  273. package/dist/lib/node-esm/app-graph-builder-VCW76Z6V.mjs.map +0 -7
  274. package/dist/lib/node-esm/call-manager-D6O5ZJJ4.mjs.map +0 -7
  275. package/dist/lib/node-esm/chunk-2CXOK2TD.mjs +0 -23
  276. package/dist/lib/node-esm/chunk-2MFNK53T.mjs +0 -480
  277. package/dist/lib/node-esm/chunk-2MFNK53T.mjs.map +0 -7
  278. package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
  279. package/dist/lib/node-esm/chunk-75RJ5DJI.mjs +0 -19
  280. package/dist/lib/node-esm/chunk-75RJ5DJI.mjs.map +0 -7
  281. package/dist/lib/node-esm/chunk-C3XFMUAY.mjs.map +0 -7
  282. package/dist/lib/node-esm/chunk-FLBFYGBK.mjs +0 -368
  283. package/dist/lib/node-esm/chunk-FLBFYGBK.mjs.map +0 -7
  284. package/dist/lib/node-esm/chunk-GRLRWTRU.mjs +0 -19
  285. package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
  286. package/dist/lib/node-esm/chunk-IHDNQLLR.mjs.map +0 -7
  287. package/dist/lib/node-esm/chunk-OU5BYIDO.mjs.map +0 -7
  288. package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs +0 -138
  289. package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs.map +0 -7
  290. package/dist/lib/node-esm/intent-resolver-OXGNQ44Y.mjs.map +0 -7
  291. package/dist/lib/node-esm/markdown-INKTE4MH.mjs.map +0 -7
  292. package/dist/lib/node-esm/react-root-XYYY2JXZ.mjs +0 -29
  293. package/dist/lib/node-esm/react-root-XYYY2JXZ.mjs.map +0 -7
  294. package/dist/lib/node-esm/react-surface-MJ33KPYE.mjs.map +0 -7
  295. package/dist/lib/node-esm/state-D7WNDT3N.mjs.map +0 -7
  296. package/dist/types/src/types/schema.d.ts +0 -162
  297. package/dist/types/src/types/schema.d.ts.map +0 -1
  298. package/src/types/schema.ts +0 -33
  299. /package/dist/lib/browser/{ChannelContainer-3GIE7ASU.mjs.map → ChannelContainer-SVV4ZX5T.mjs.map} +0 -0
  300. /package/dist/lib/browser/{ChatContainer-AIGIWAUG.mjs.map → ChatContainer-ALFWQ65B.mjs.map} +0 -0
  301. /package/dist/lib/node-esm/{ChannelContainer-7FXCKO7X.mjs.map → ChannelContainer-63GMQ753.mjs.map} +0 -0
  302. /package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs.map → ChatContainer-MFKPXMIK.mjs.map} +0 -0
@@ -2,48 +2,41 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React, { useState } from 'react';
6
7
 
7
- import { type Meta } from '@storybook/react-vite';
8
- import React, { useEffect, useState } from 'react';
9
-
10
- import { Capabilities, contributes, createSurface, IntentPlugin } from '@dxos/app-framework';
8
+ import { Capabilities, IntentPlugin, contributes, createSurface } from '@dxos/app-framework';
11
9
  import { withPluginManager } from '@dxos/app-framework/testing';
12
- import { Obj, Ref } from '@dxos/echo';
13
10
  import { faker } from '@dxos/random';
14
11
  import { useClient } from '@dxos/react-client';
15
12
  import { type Space } from '@dxos/react-client/echo';
16
13
  import { useIdentity } from '@dxos/react-client/halo';
17
14
  import { withClientProvider } from '@dxos/react-client/testing';
18
- import { Thread } from '@dxos/react-ui-thread';
15
+ import { useAsyncEffect } from '@dxos/react-ui';
16
+ import { withTheme } from '@dxos/react-ui/testing';
17
+ import { Thread as ThreadComponent } from '@dxos/react-ui-thread';
19
18
  import { DataType } from '@dxos/schema';
20
- import { withLayout, withTheme } from '@dxos/storybook-utils';
19
+ import { render } from '@dxos/storybook-utils';
21
20
 
22
- import { ChatContainer } from './ChatContainer';
23
21
  import { translations } from '../translations';
24
- import { ChannelType, ThreadType } from '../types';
22
+ import { Channel, Thread } from '../types';
23
+
24
+ import { ChatContainer } from './ChatContainer';
25
25
 
26
26
  faker.seed(1);
27
27
 
28
- const Story = () => {
28
+ const DefaultStory = () => {
29
29
  const client = useClient();
30
30
  const identity = useIdentity();
31
31
  const [space, setSpace] = useState<Space>();
32
- const [channel, setChannel] = useState<ChannelType | null>();
32
+ const [channel, setChannel] = useState<Channel.Channel | null>();
33
33
 
34
- useEffect(() => {
34
+ useAsyncEffect(async () => {
35
35
  if (identity) {
36
- setTimeout(async () => {
37
- const space = await client.spaces.create();
38
- const channel = space.db.add(
39
- Obj.make(ChannelType, {
40
- defaultThread: Ref.make(Obj.make(ThreadType, { messages: [], status: 'active' })),
41
- threads: [],
42
- }),
43
- );
44
- setSpace(space);
45
- setChannel(channel);
46
- });
36
+ const space = await client.spaces.create();
37
+ const channel = space.db.add(Channel.make());
38
+ setSpace(space);
39
+ setChannel(channel);
47
40
  }
48
41
  }, [identity]);
49
42
 
@@ -52,19 +45,18 @@ const Story = () => {
52
45
  }
53
46
 
54
47
  return (
55
- <main className='max-is-prose mli-auto bs-dvh overflow-hidden'>
48
+ <main className='is-full max-is-prose mli-auto bs-dvh overflow-hidden'>
56
49
  <ChatContainer space={space} thread={channel.defaultThread.target} />
57
50
  </main>
58
51
  );
59
52
  };
60
53
 
61
- export const Default = {};
62
-
63
- const meta: Meta<typeof Thread.Root> = {
54
+ const meta = {
64
55
  title: 'plugins/plugin-thread/Chat',
65
- component: Thread.Root,
66
- render: () => <Story />,
56
+ component: ThreadComponent.Root as any,
57
+ render: render(DefaultStory),
67
58
  decorators: [
59
+ withTheme,
68
60
  withPluginManager({
69
61
  plugins: [IntentPlugin()],
70
62
  capabilities: [
@@ -78,11 +70,16 @@ const meta: Meta<typeof Thread.Root> = {
78
70
  ),
79
71
  ],
80
72
  }),
81
- withTheme,
82
- withLayout({ fullscreen: true }),
83
- withClientProvider({ createSpace: true, types: [ThreadType, DataType.Message] }),
73
+ withClientProvider({ createSpace: true, types: [Thread.Thread, Channel.Channel, DataType.Message] }),
84
74
  ],
85
- parameters: { translations },
86
- };
75
+ parameters: {
76
+ layout: 'fullscreen',
77
+ translations,
78
+ },
79
+ } satisfies Meta<typeof DefaultStory>;
87
80
 
88
81
  export default meta;
82
+
83
+ type Story = StoryObj<typeof meta>;
84
+
85
+ export const Default: Story = {};
@@ -5,29 +5,30 @@
5
5
  import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';
6
6
 
7
7
  import { Obj, Ref } from '@dxos/echo';
8
- import { fullyQualifiedId, type Space, useMembers } from '@dxos/react-client/echo';
8
+ import { type Space, fullyQualifiedId, useMembers } from '@dxos/react-client/echo';
9
9
  import { useIdentity } from '@dxos/react-client/halo';
10
- import { Icon, ScrollArea, useThemeContext, useTranslation } from '@dxos/react-ui';
10
+ import { Icon, ScrollArea, type ThemedClassName, useThemeContext, useTranslation } from '@dxos/react-ui';
11
11
  import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
12
12
  import { StackItem } from '@dxos/react-ui-stack';
13
13
  import { mx } from '@dxos/react-ui-theme';
14
14
  import {
15
15
  MessageTextbox,
16
16
  type MessageTextboxProps,
17
- Thread,
17
+ Thread as ThreadComponent,
18
18
  type ThreadRootProps,
19
19
  threadLayout,
20
20
  } from '@dxos/react-ui-thread';
21
21
  import { DataType } from '@dxos/schema';
22
22
  import { isNonNullable } from '@dxos/util';
23
23
 
24
- import { MessageContainer } from './MessageContainer';
25
- import { command } from './command-extension';
26
24
  import { useStatus } from '../hooks';
27
25
  import { meta } from '../meta';
28
- import { type ThreadType } from '../types';
26
+ import { type Thread } from '../types';
29
27
  import { getMessageMetadata } from '../util';
30
28
 
29
+ import { command } from './command-extension';
30
+ import { MessageContainer } from './MessageContainer';
31
+
31
32
  export const ChatHeading = ({ attendableId }: { attendableId?: string }) => {
32
33
  const { t } = useTranslation(meta.id);
33
34
  return (
@@ -40,14 +41,23 @@ export const ChatHeading = ({ attendableId }: { attendableId?: string }) => {
40
41
  );
41
42
  };
42
43
 
43
- export type ChatContainerProps = {
44
- space: Space;
45
- thread: ThreadType;
46
- context?: Obj.Any;
47
- autoFocusTextbox?: boolean;
48
- } & Pick<ThreadRootProps, 'current'>;
49
-
50
- export const ChatContainer = ({ space, thread, context, current, autoFocusTextbox }: ChatContainerProps) => {
44
+ export type ChatContainerProps = ThemedClassName<
45
+ {
46
+ space: Space;
47
+ thread: Thread.Thread;
48
+ context?: Obj.Any;
49
+ autoFocusTextbox?: boolean;
50
+ } & Pick<ThreadRootProps, 'current'>
51
+ >;
52
+
53
+ export const ChatContainer = ({
54
+ classNames,
55
+ space,
56
+ thread,
57
+ context,
58
+ current,
59
+ autoFocusTextbox,
60
+ }: ChatContainerProps) => {
51
61
  const { t } = useTranslation(meta.id);
52
62
  const id = fullyQualifiedId(thread);
53
63
  const identity = useIdentity()!;
@@ -66,7 +76,7 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
66
76
  () => [
67
77
  createBasicExtensions({ placeholder: t('message placeholder') }),
68
78
  createThemeExtensions({ themeMode }),
69
- listener({ onChange: (text) => (messageRef.current = text) }),
79
+ listener({ onChange: ({ text }) => (messageRef.current = text) }),
70
80
  command,
71
81
  ],
72
82
  [themeMode, _count],
@@ -108,10 +118,14 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
108
118
  };
109
119
 
110
120
  return (
111
- <Thread.Root
121
+ <ThreadComponent.Root
112
122
  current={current}
113
123
  id={id}
114
- classNames='bs-full grid-rows-[1fr_min-content_min-content] overflow-hidden transition-[padding-block-end] [[data-sidebar-inline-start-state=open]_&]:lg:pbe-0'
124
+ classNames={[
125
+ 'bs-full grid-rows-[1fr_min-content_min-content] overflow-hidden',
126
+ 'transition-[padding-block-end] [[data-sidebar-inline-start-state=open]_&]:lg:pbe-0',
127
+ classNames,
128
+ ]}
115
129
  >
116
130
  <ScrollArea.Root classNames='col-span-2'>
117
131
  <ScrollArea.Viewport classNames='overflow-anchored after:overflow-anchor after:block after:bs-px after:-mbs-px [&>div]:min-bs-full [&>div]:!grid [&>div]:grid-rows-[1fr_0]'>
@@ -132,9 +146,8 @@ export const ChatContainer = ({ space, thread, context, current, autoFocusTextbo
132
146
  </ScrollArea.Root>
133
147
 
134
148
  <MessageTextbox extensions={extensions} autoFocus={autoFocus} onSend={handleCreate} {...textboxMetadata} />
135
-
136
- <Thread.Status activity={activity}>{t('activity message')}</Thread.Status>
137
- </Thread.Root>
149
+ <ThreadComponent.Status activity={activity}>{t('activity message')}</ThreadComponent.Status>
150
+ </ThreadComponent.Root>
138
151
  );
139
152
  };
140
153
 
@@ -2,10 +2,8 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
- import { type Meta } from '@storybook/react-vite';
8
- import React, { useEffect } from 'react';
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React from 'react';
9
7
 
10
8
  import { IntentPlugin } from '@dxos/app-framework';
11
9
  import { withPluginManager } from '@dxos/app-framework/testing';
@@ -14,13 +12,16 @@ import { ClientPlugin } from '@dxos/plugin-client';
14
12
  import { faker } from '@dxos/random';
15
13
  import { useQuery, useSpace } from '@dxos/react-client/echo';
16
14
  import { useIdentity } from '@dxos/react-client/halo';
15
+ import { useAsyncEffect } from '@dxos/react-ui';
16
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
17
17
  import { AnchoredTo, DataType } from '@dxos/schema';
18
- import { layoutCentered, render, withLayout, withTheme } from '@dxos/storybook-utils';
18
+ import { render } from '@dxos/storybook-utils';
19
19
 
20
- import { CommentsContainer } from './CommentsContainer';
21
- import { createCommentThread } from './testing';
22
20
  import { translations } from '../translations';
23
- import { ThreadType } from '../types';
21
+ import { Thread } from '../types';
22
+
23
+ import { CommentsContainer } from './CommentsContainer';
24
+ import { createCommentThread, createProposalThread } from './testing';
24
25
 
25
26
  faker.seed(1);
26
27
 
@@ -29,27 +30,25 @@ const DefaultStory = () => {
29
30
  const space = useSpace();
30
31
  const anchors = useQuery(space, Query.type(AnchoredTo));
31
32
 
32
- useEffect(() => {
33
+ useAsyncEffect(async () => {
33
34
  if (identity && space) {
34
- const t = setTimeout(async () => {
35
- const object = space.db.add(Obj.make(Type.Expando, {}));
36
- const thread1 = space.db.add(createCommentThread(identity));
37
- const thread2 = space.db.add(createCommentThread(identity));
38
- space.db.add(
39
- Relation.make(AnchoredTo, {
40
- [Relation.Source]: thread1,
41
- [Relation.Target]: object,
42
- }),
43
- );
44
- space.db.add(
45
- Relation.make(AnchoredTo, {
46
- [Relation.Source]: thread2,
47
- [Relation.Target]: object,
48
- }),
49
- );
50
- });
51
-
52
- return () => clearTimeout(t);
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, {
40
+ [Relation.Source]: thread1,
41
+ [Relation.Target]: object,
42
+ anchor: 'test',
43
+ }),
44
+ );
45
+ space.db.add(
46
+ Relation.make(AnchoredTo, {
47
+ [Relation.Source]: thread2,
48
+ [Relation.Target]: object,
49
+ anchor: 'test',
50
+ }),
51
+ );
53
52
  }
54
53
  }, [identity, space]);
55
54
 
@@ -57,25 +56,23 @@ const DefaultStory = () => {
57
56
  return null;
58
57
  }
59
58
 
60
- return (
61
- <div className='w-[30rem] overflow-y-auto bg-baseSurface'>
62
- <CommentsContainer anchors={anchors} onThreadDelete={console.log} />
63
- </div>
64
- );
59
+ return <CommentsContainer anchors={anchors} onThreadDelete={console.log} onAcceptProposal={console.log} />;
65
60
  };
66
61
 
67
- const meta: Meta = {
62
+ const meta = {
68
63
  title: 'plugins/plugin-thread/Comments',
69
64
  render: render(DefaultStory),
70
65
  decorators: [
71
66
  withTheme,
72
- withLayout({ fullscreen: true, classNames: layoutCentered }),
67
+ withLayout({ container: 'column', scroll: true }),
68
+ // TODO(wittjosiah): This shouldn't depend on app framework (use withClientProvider instead).
69
+ // Currently this is required due to useOnEditAnalytics.
73
70
  withPluginManager({
74
71
  plugins: [
75
72
  IntentPlugin(),
76
73
  ClientPlugin({
77
- types: [DataType.Message, ThreadType, AnchoredTo],
78
- onClientInitialized: async (_, client) => {
74
+ types: [DataType.Message, Thread.Thread, AnchoredTo],
75
+ onClientInitialized: async ({ client }) => {
79
76
  await client.halo.createIdentity();
80
77
  },
81
78
  }),
@@ -85,8 +82,10 @@ const meta: Meta = {
85
82
  parameters: {
86
83
  translations,
87
84
  },
88
- };
85
+ } satisfies Meta<typeof DefaultStory>;
89
86
 
90
87
  export default meta;
91
88
 
92
- export const Default = {};
89
+ type Story = StoryObj<typeof meta>;
90
+
91
+ export const Default: Story = {};
@@ -9,9 +9,10 @@ import { fullyQualifiedId } from '@dxos/react-client/echo';
9
9
  import { Callout, Icon, Trans, useTranslation } from '@dxos/react-ui';
10
10
  import { type AnchoredTo } from '@dxos/schema';
11
11
 
12
- import { CommentsThreadContainer, type CommentsThreadContainerProps } from './CommentsThreadContainer';
13
12
  import { meta } from '../meta';
14
- import { type ThreadType } from '../types';
13
+ import { type Thread } from '../types';
14
+
15
+ import { CommentsThreadContainer, type CommentsThreadContainerProps } from './CommentsThreadContainer';
15
16
 
16
17
  export type CommentsContainerProps = Omit<CommentsThreadContainerProps, 'anchor' | 'current'> & {
17
18
  anchors: AnchoredTo[];
@@ -62,7 +63,7 @@ export const CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...
62
63
  return (
63
64
  <div>
64
65
  {filteredAnchors.map((anchor) => {
65
- const thread = Relation.getSource(anchor) as ThreadType;
66
+ const thread = Relation.getSource(anchor) as Thread.Thread;
66
67
  const threadId = fullyQualifiedId(thread);
67
68
  return <CommentsThreadContainer key={threadId} anchor={anchor} current={currentId === threadId} {...props} />;
68
69
  })}
@@ -10,19 +10,22 @@ import { useIdentity } from '@dxos/react-client/halo';
10
10
  import { IconButton, Tag, Tooltip, useThemeContext, useTranslation } from '@dxos/react-ui';
11
11
  import { createBasicExtensions, createThemeExtensions, listener } from '@dxos/react-ui-editor';
12
12
  import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx } from '@dxos/react-ui-theme';
13
- import { MessageTextbox, type MessageTextboxProps, Thread, type ThreadRootProps } from '@dxos/react-ui-thread';
13
+ import {
14
+ MessageTextbox,
15
+ type MessageTextboxProps,
16
+ Thread as ThreadComponent,
17
+ type ThreadRootProps,
18
+ } from '@dxos/react-ui-thread';
14
19
  import { type AnchoredTo } from '@dxos/schema';
15
20
  import { isNonNullable } from '@dxos/util';
16
21
 
17
- import { MessageContainer } from './MessageContainer';
18
- import { command } from './command-extension';
19
22
  import { useStatus } from '../hooks';
20
23
  import { meta } from '../meta';
21
- import { type ThreadType } from '../types';
24
+ import { type Thread } from '../types';
22
25
  import { getMessageMetadata } from '../util';
23
26
 
24
- // TODO(burdon): Remove need for p-1.
25
- export const commentControlClassNames = '!p-1 transition-opacity';
27
+ import { command } from './command-extension';
28
+ import { MessageContainer, buttonClassNames, buttonGroupClassNames } from './MessageContainer';
26
29
 
27
30
  export type CommentsThreadContainerProps = {
28
31
  anchor: AnchoredTo;
@@ -31,6 +34,7 @@ export type CommentsThreadContainerProps = {
31
34
  onResolve?: (anchor: AnchoredTo) => void;
32
35
  onMessageDelete?: (anchor: AnchoredTo, messageId: string) => void;
33
36
  onThreadDelete?: (anchor: AnchoredTo) => void;
37
+ onAcceptProposal?: (anchor: AnchoredTo, messageId: string) => void;
34
38
  } & Pick<ThreadRootProps, 'current'>;
35
39
 
36
40
  export const CommentsThreadContainer = ({
@@ -41,30 +45,31 @@ export const CommentsThreadContainer = ({
41
45
  onResolve,
42
46
  onMessageDelete,
43
47
  onThreadDelete,
48
+ onAcceptProposal,
44
49
  }: CommentsThreadContainerProps) => {
50
+ const { themeMode } = useThemeContext();
45
51
  const { t } = useTranslation(meta.id);
46
52
  const identity = useIdentity()!;
47
53
  const space = getSpace(anchor);
48
54
  const members = useMembers(space?.key);
49
55
  const detached = !anchor.anchor;
50
- const thread = Relation.getSource(anchor) as ThreadType;
56
+ const thread = Relation.getSource(anchor) as Thread.Thread;
51
57
  const activity = useStatus(space, fullyQualifiedId(thread));
52
58
  const threadScrollRef = useRef<HTMLDivElement | null>(null);
53
- const { themeMode } = useThemeContext();
54
59
 
55
60
  const textboxMetadata = getMessageMetadata(fullyQualifiedId(thread), identity);
61
+
56
62
  // TODO(wittjosiah): This is a hack to reset the editor after a message is sent.
57
- const [_count, _setCount] = useState(0);
58
- const rerenderEditor = () => _setCount((count) => count + 1);
63
+ const [state, setState] = useState({});
59
64
  const messageRef = useRef('');
60
65
  const extensions = useMemo(
61
66
  () => [
62
67
  createBasicExtensions({ placeholder: t('message placeholder') }),
63
68
  createThemeExtensions({ themeMode }),
64
- listener({ onChange: (text) => (messageRef.current = text) }),
69
+ listener({ onChange: ({ text }) => (messageRef.current = text) }),
65
70
  command,
66
71
  ],
67
- [_count],
72
+ [state],
68
73
  );
69
74
 
70
75
  // TODO(thure): Factor out.
@@ -75,6 +80,7 @@ export const CommentsThreadContainer = ({
75
80
  const handleResolve = useCallback(() => onResolve?.(anchor), [onResolve, anchor]);
76
81
  const handleMessageDelete = useCallback((id: string) => onMessageDelete?.(anchor, id), [onMessageDelete, anchor]);
77
82
  const handleThreadDelete = useCallback(() => onThreadDelete?.(anchor), [onThreadDelete, anchor]);
83
+ const handleAcceptProposal = useCallback((id: string) => onAcceptProposal?.(anchor, id), [onAcceptProposal, anchor]);
78
84
 
79
85
  const handleComment: MessageTextboxProps['onSend'] = useCallback(() => {
80
86
  if (!messageRef.current) {
@@ -84,13 +90,13 @@ export const CommentsThreadContainer = ({
84
90
  onComment?.(anchor, messageRef.current);
85
91
  messageRef.current = '';
86
92
  scrollToEnd('instant');
87
- rerenderEditor();
93
+ setState({});
88
94
 
89
95
  return true;
90
96
  }, [anchor, identity]);
91
97
 
92
98
  return (
93
- <Thread.Root
99
+ <ThreadComponent.Root
94
100
  id={fullyQualifiedId(thread)}
95
101
  classNames='pbs-2 border-be border-subduedSeparator last:border-none'
96
102
  current={current}
@@ -107,12 +113,12 @@ export const CommentsThreadContainer = ({
107
113
  >
108
114
  {detached ? (
109
115
  <Tooltip.Trigger asChild content={t('detached thread label')} side='top'>
110
- <Thread.Header detached>{thread.name}</Thread.Header>
116
+ <ThreadComponent.Header detached>{thread.name}</ThreadComponent.Header>
111
117
  </Tooltip.Trigger>
112
118
  ) : (
113
- <Thread.Header>{thread.name}</Thread.Header>
119
+ <ThreadComponent.Header>{thread.name}</ThreadComponent.Header>
114
120
  )}
115
- <div className='flex flex-row items-center gap-0.5'>
121
+ <div role='none' className={buttonGroupClassNames}>
116
122
  {thread.status === 'staged' && <Tag palette='neutral'>{t('draft button')}</Tag>}
117
123
  {onResolve && !(thread?.status === 'staged') && (
118
124
  <IconButton
@@ -121,7 +127,7 @@ export const CommentsThreadContainer = ({
121
127
  icon={thread?.status === 'resolved' ? 'ph--check--fill' : 'ph--check--regular'}
122
128
  iconOnly
123
129
  label={t('resolve thread label')}
124
- classNames={[commentControlClassNames, thread?.status !== 'resolved' && hoverableControlItem]}
130
+ classNames={[buttonClassNames, thread?.status !== 'resolved' && hoverableControlItem]}
125
131
  onClick={handleResolve}
126
132
  />
127
133
  )}
@@ -132,7 +138,7 @@ export const CommentsThreadContainer = ({
132
138
  icon='ph--x--regular'
133
139
  iconOnly
134
140
  label={t('delete thread label')}
135
- classNames={[commentControlClassNames, hoverableControlItem]}
141
+ classNames={[buttonClassNames, hoverableControlItem]}
136
142
  onClick={handleThreadDelete}
137
143
  />
138
144
  )}
@@ -147,6 +153,7 @@ export const CommentsThreadContainer = ({
147
153
  message={message}
148
154
  members={members}
149
155
  onDelete={handleMessageDelete}
156
+ onAcceptProposal={handleAcceptProposal}
150
157
  />
151
158
  ))}
152
159
 
@@ -158,10 +165,10 @@ export const CommentsThreadContainer = ({
158
165
  */}
159
166
  <MessageTextbox extensions={extensions} onSend={handleComment} {...textboxMetadata} />
160
167
 
161
- <Thread.Status activity={activity}>{t('activity message')}</Thread.Status>
168
+ <ThreadComponent.Status activity={activity}>{t('activity message')}</ThreadComponent.Status>
162
169
 
163
170
  {/* NOTE(thure): This can’t also be the `overflow-anchor` because `ScrollArea` injects an interceding node that contains this necessary ref’d element. */}
164
171
  <div role='none' className='bs-px -mbs-px' ref={threadScrollRef} />
165
- </Thread.Root>
172
+ </ThreadComponent.Root>
166
173
  );
167
174
  };
@@ -5,7 +5,7 @@
5
5
  import React, { type FC, type PropsWithChildren, useEffect, useState } from 'react';
6
6
 
7
7
  import { useCapability } from '@dxos/app-framework';
8
- import { useTranslation, type ThemedClassName } from '@dxos/react-ui';
8
+ import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
9
9
  import { mx } from '@dxos/react-ui-theme';
10
10
 
11
11
  import { ThreadCapabilities } from '../../capabilities';
@@ -2,47 +2,55 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
5
+ import { type StoryObj } from '@storybook/react-vite';
8
6
  import React, { useEffect, useState } from 'react';
9
7
 
10
8
  import { scheduleTask } from '@dxos/async';
11
9
  import { Context } from '@dxos/context';
12
10
  import { log } from '@dxos/log';
13
- import { withTheme, withLayout } from '@dxos/storybook-utils';
11
+ import { withTheme } from '@dxos/react-ui/testing';
14
12
 
15
- import { VideoObject } from './VideoObject';
16
13
  import { getUserMediaTrack } from '../../calls';
17
14
  import { ResponsiveContainer } from '../ResponsiveGrid';
18
15
 
19
- const meta: Meta<typeof VideoObject> = {
20
- title: 'plugins/plugin-thread/VideoObject',
21
- component: VideoObject,
22
- render: (args) => {
23
- log.info('render');
24
- const [videoStream, setVideoStream] = useState<MediaStream>();
25
- useEffect(() => {
26
- const ctx = new Context();
27
- scheduleTask(ctx, async () => {
16
+ import { VideoObject, type VideoObjectProps } from './VideoObject';
17
+
18
+ const DefaultStory = (props: VideoObjectProps) => {
19
+ log.info('render');
20
+ const [videoStream, setVideoStream] = useState<MediaStream>();
21
+ useEffect(() => {
22
+ const ctx = new Context();
23
+ scheduleTask(ctx, async () => {
24
+ try {
28
25
  const stream = new MediaStream();
29
26
  stream.addTrack(await getUserMediaTrack('videoinput'));
30
27
  setVideoStream(stream);
31
- });
32
-
33
- return () => {
34
- void ctx.dispose();
35
- videoStream?.getTracks().forEach((track) => track.stop());
36
- };
37
- }, []);
38
-
39
- return (
40
- <ResponsiveContainer>
41
- <VideoObject videoStream={videoStream} {...args} flip />
42
- </ResponsiveContainer>
43
- );
28
+ } catch (err) {
29
+ log.catch(err);
30
+ }
31
+ });
32
+
33
+ return () => {
34
+ void ctx.dispose();
35
+ videoStream?.getTracks().forEach((track) => track.stop());
36
+ };
37
+ }, []);
38
+
39
+ return (
40
+ <ResponsiveContainer>
41
+ <VideoObject videoStream={videoStream} flip {...props} />
42
+ </ResponsiveContainer>
43
+ );
44
+ };
45
+
46
+ const meta = {
47
+ title: 'plugins/plugin-thread/VideoObject',
48
+ component: VideoObject,
49
+ render: DefaultStory,
50
+ decorators: [withTheme],
51
+ parameters: {
52
+ layout: 'fullscreen',
44
53
  },
45
- decorators: [withTheme, withLayout({ fullscreen: true, classNames: 'justify-center' })],
46
54
  };
47
55
 
48
56
  export default meta;