@dxos/plugin-thread 0.8.4-main.2e9d522 → 0.8.4-main.548089c

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 (318) hide show
  1. package/dist/lib/browser/ChannelContainer-56QROCE4.mjs +16 -0
  2. package/dist/lib/browser/ChatContainer-7F5Y6GXJ.mjs +15 -0
  3. package/dist/lib/browser/{app-graph-builder-N7BE5TYW.mjs → app-graph-builder-USFBLGFG.mjs} +30 -31
  4. package/dist/lib/browser/app-graph-builder-USFBLGFG.mjs.map +7 -0
  5. package/dist/lib/browser/blueprint-definition-6BKYTMJS.mjs +104 -0
  6. package/dist/lib/browser/blueprint-definition-6BKYTMJS.mjs.map +7 -0
  7. package/dist/lib/browser/{call-manager-NIPDYUVD.mjs → call-manager-MAXQLMMS.mjs} +7 -7
  8. package/dist/lib/browser/call-manager-MAXQLMMS.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-KWPRNHTK.mjs → chunk-44S2SB4N.mjs} +250 -245
  10. package/dist/lib/browser/chunk-44S2SB4N.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-BBTXGRIR.mjs +18 -0
  12. package/dist/lib/browser/chunk-BBTXGRIR.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-GERVMFQW.mjs → chunk-CP7E2HRE.mjs} +2 -2
  14. package/dist/lib/browser/chunk-CP7E2HRE.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-FR6MEAZI.mjs +377 -0
  16. package/dist/lib/browser/chunk-FR6MEAZI.mjs.map +7 -0
  17. package/dist/lib/browser/{chunk-6NSMBO3B.mjs → chunk-ISCHODBV.mjs} +55 -5
  18. package/dist/lib/browser/chunk-ISCHODBV.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-ERWASUQK.mjs → chunk-KOBXMDCI.mjs} +74 -41
  22. package/dist/lib/browser/chunk-KOBXMDCI.mjs.map +7 -0
  23. package/dist/lib/browser/chunk-NMJEVD36.mjs +168 -0
  24. package/dist/lib/browser/chunk-NMJEVD36.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-NSREO7OX.mjs +23 -0
  26. package/dist/lib/browser/chunk-NSREO7OX.mjs.map +7 -0
  27. package/dist/lib/browser/{chunk-ZE7KWN36.mjs → chunk-ZCW3NSDZ.mjs} +310 -186
  28. package/dist/lib/browser/chunk-ZCW3NSDZ.mjs.map +7 -0
  29. package/dist/lib/browser/chunk-ZO5ZGDN5.mjs +617 -0
  30. package/dist/lib/browser/chunk-ZO5ZGDN5.mjs.map +7 -0
  31. package/dist/lib/browser/index.mjs +47 -37
  32. package/dist/lib/browser/index.mjs.map +3 -3
  33. package/dist/lib/browser/{intent-resolver-JFGLZ6VI.mjs → intent-resolver-BOUT4WGY.mjs} +33 -41
  34. package/dist/lib/browser/intent-resolver-BOUT4WGY.mjs.map +7 -0
  35. package/dist/lib/browser/{markdown-GEXBVJYN.mjs → markdown-74EUSQGV.mjs} +24 -22
  36. package/dist/lib/browser/markdown-74EUSQGV.mjs.map +7 -0
  37. package/dist/lib/browser/meta.json +1 -1
  38. package/dist/lib/browser/react-root-2VRIT2HF.mjs +28 -0
  39. package/dist/lib/browser/react-root-2VRIT2HF.mjs.map +7 -0
  40. package/dist/lib/browser/{react-surface-YCYEFBPM.mjs → react-surface-UOECBYHE.mjs} +29 -28
  41. package/dist/lib/browser/react-surface-UOECBYHE.mjs.map +7 -0
  42. package/dist/lib/browser/{settings-E32MTL7A.mjs → settings-LGQUZITB.mjs} +5 -5
  43. package/dist/lib/browser/{settings-E32MTL7A.mjs.map → settings-LGQUZITB.mjs.map} +1 -1
  44. package/dist/lib/browser/{state-H6CYONWE.mjs → state-36REWXO5.mjs} +5 -5
  45. package/dist/lib/browser/state-36REWXO5.mjs.map +7 -0
  46. package/dist/lib/browser/types/index.mjs +7 -9
  47. package/dist/lib/node-esm/ChannelContainer-4SV22AKC.mjs +17 -0
  48. package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs → ChatContainer-C526R4DI.mjs} +6 -6
  49. package/dist/lib/node-esm/{app-graph-builder-VCW76Z6V.mjs → app-graph-builder-DWYGNENL.mjs} +30 -31
  50. package/dist/lib/node-esm/app-graph-builder-DWYGNENL.mjs.map +7 -0
  51. package/dist/lib/node-esm/blueprint-definition-6LEAWSC7.mjs +105 -0
  52. package/dist/lib/node-esm/blueprint-definition-6LEAWSC7.mjs.map +7 -0
  53. package/dist/lib/node-esm/{call-manager-D6O5ZJJ4.mjs → call-manager-LC4OS2KD.mjs} +7 -7
  54. package/dist/lib/node-esm/call-manager-LC4OS2KD.mjs.map +7 -0
  55. package/dist/lib/node-esm/{chunk-IHDNQLLR.mjs → chunk-7KZWZS2U.mjs} +310 -186
  56. package/dist/lib/node-esm/chunk-7KZWZS2U.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-KE6SKBPO.mjs +618 -0
  60. package/dist/lib/node-esm/chunk-KE6SKBPO.mjs.map +7 -0
  61. package/dist/lib/node-esm/{chunk-C3XFMUAY.mjs → chunk-NEGIPZTJ.mjs} +250 -245
  62. package/dist/lib/node-esm/chunk-NEGIPZTJ.mjs.map +7 -0
  63. package/dist/lib/node-esm/{chunk-25ABSYP2.mjs → chunk-PZH2EDU5.mjs} +74 -41
  64. package/dist/lib/node-esm/chunk-PZH2EDU5.mjs.map +7 -0
  65. package/dist/lib/node-esm/chunk-TJKM5JZT.mjs +169 -0
  66. package/dist/lib/node-esm/chunk-TJKM5JZT.mjs.map +7 -0
  67. package/dist/lib/node-esm/chunk-TWKGDFCS.mjs +378 -0
  68. package/dist/lib/node-esm/chunk-TWKGDFCS.mjs.map +7 -0
  69. package/dist/lib/node-esm/{chunk-OU5BYIDO.mjs → chunk-VBI32FGI.mjs} +55 -5
  70. package/dist/lib/node-esm/chunk-VBI32FGI.mjs.map +7 -0
  71. package/dist/lib/node-esm/chunk-VM6WD3YY.mjs +25 -0
  72. package/dist/lib/node-esm/chunk-VM6WD3YY.mjs.map +7 -0
  73. package/dist/lib/node-esm/chunk-XI45H4IV.mjs +28 -0
  74. package/dist/lib/node-esm/chunk-XI45H4IV.mjs.map +7 -0
  75. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs +19 -0
  76. package/dist/lib/node-esm/chunk-ZQAGII7M.mjs.map +7 -0
  77. package/dist/lib/node-esm/index.mjs +47 -37
  78. package/dist/lib/node-esm/index.mjs.map +3 -3
  79. package/dist/lib/node-esm/{intent-resolver-OXGNQ44Y.mjs → intent-resolver-45PLIFCJ.mjs} +33 -41
  80. package/dist/lib/node-esm/intent-resolver-45PLIFCJ.mjs.map +7 -0
  81. package/dist/lib/node-esm/{markdown-LIJZDK2J.mjs → markdown-566XXB55.mjs} +24 -22
  82. package/dist/lib/node-esm/markdown-566XXB55.mjs.map +7 -0
  83. package/dist/lib/node-esm/meta.json +1 -1
  84. package/dist/lib/node-esm/react-root-JAE2VI2D.mjs +29 -0
  85. package/dist/lib/node-esm/react-root-JAE2VI2D.mjs.map +7 -0
  86. package/dist/lib/node-esm/{react-surface-IRSEKM42.mjs → react-surface-BYKXK5YA.mjs} +29 -28
  87. package/dist/lib/node-esm/react-surface-BYKXK5YA.mjs.map +7 -0
  88. package/dist/lib/node-esm/{settings-SJ24YG7M.mjs → settings-WKLJSP6R.mjs} +5 -5
  89. package/dist/lib/node-esm/{settings-SJ24YG7M.mjs.map → settings-WKLJSP6R.mjs.map} +1 -1
  90. package/dist/lib/node-esm/{state-D7WNDT3N.mjs → state-X3W67GTL.mjs} +5 -5
  91. package/dist/lib/node-esm/state-X3W67GTL.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/blueprint-definition.d.ts +5 -0
  109. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  110. package/dist/types/src/capabilities/call-manager.d.ts +1 -1
  111. package/dist/types/src/capabilities/call-manager.d.ts.map +1 -1
  112. package/dist/types/src/capabilities/capabilities.d.ts +3 -3
  113. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  114. package/dist/types/src/capabilities/index.d.ts +11 -10
  115. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  116. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  117. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/markdown.d.ts +1 -1
  119. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  120. package/dist/types/src/capabilities/react-root.d.ts +2 -2
  121. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  122. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  123. package/dist/types/src/capabilities/settings.d.ts +1 -1
  124. package/dist/types/src/capabilities/state.d.ts +2 -2
  125. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  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 +2 -2
  143. package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
  144. package/dist/types/src/components/CommentsThreadContainer.d.ts +9 -9
  145. package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
  146. package/dist/types/src/components/Lobby/Lobby.d.ts.map +1 -1
  147. package/dist/types/src/components/Media/VideoObject.d.ts +2 -2
  148. package/dist/types/src/components/Media/VideoObject.d.ts.map +1 -1
  149. package/dist/types/src/components/Media/VideoObject.stories.d.ts +18 -4
  150. package/dist/types/src/components/Media/VideoObject.stories.d.ts.map +1 -1
  151. package/dist/types/src/components/MessageContainer.d.ts +6 -3
  152. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  153. package/dist/types/src/components/Participant/Participant.d.ts.map +1 -1
  154. package/dist/types/src/components/Participant/ParticipantGrid.d.ts.map +1 -1
  155. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts +155 -3
  156. package/dist/types/src/components/ResponsiveGrid/ResponsiveContainer.stories.d.ts.map +1 -1
  157. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts +157 -4
  158. package/dist/types/src/components/ResponsiveGrid/ResponsiveGrid.stories.d.ts.map +1 -1
  159. package/dist/types/src/components/ResponsiveGrid/ResponsiveGridItem.d.ts.map +1 -1
  160. package/dist/types/src/components/ThreadComplementary.d.ts.map +1 -1
  161. package/dist/types/src/components/ThreadSettings.d.ts +1 -1
  162. package/dist/types/src/components/ThreadSettings.d.ts.map +1 -1
  163. package/dist/types/src/components/command-extension.d.ts.map +1 -1
  164. package/dist/types/src/components/index.d.ts +1 -1
  165. package/dist/types/src/components/index.d.ts.map +1 -1
  166. package/dist/types/src/components/testing.d.ts +3 -2
  167. package/dist/types/src/components/testing.d.ts.map +1 -1
  168. package/dist/types/src/extensions/threads.d.ts +2 -2
  169. package/dist/types/src/extensions/threads.d.ts.map +1 -1
  170. package/dist/types/src/functions/create-proposals.d.ts +6 -0
  171. package/dist/types/src/functions/create-proposals.d.ts.map +1 -0
  172. package/dist/types/src/functions/index.d.ts +2 -0
  173. package/dist/types/src/functions/index.d.ts.map +1 -0
  174. package/dist/types/src/hooks/analytics.d.ts +2 -2
  175. package/dist/types/src/hooks/analytics.d.ts.map +1 -1
  176. package/dist/types/src/hooks/index.d.ts +2 -1
  177. package/dist/types/src/hooks/index.d.ts.map +1 -1
  178. package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts +2 -0
  179. package/dist/types/src/hooks/useBlackCanvasStreamTrack.d.ts.map +1 -0
  180. package/dist/types/src/hooks/useVideoStreamTrack.d.ts +1 -1
  181. package/dist/types/src/hooks/useVideoStreamTrack.d.ts.map +1 -1
  182. package/dist/types/src/meta.d.ts +1 -2
  183. package/dist/types/src/meta.d.ts.map +1 -1
  184. package/dist/types/src/testing/stories.d.ts.map +1 -1
  185. package/dist/types/src/translations.d.ts +74 -6
  186. package/dist/types/src/translations.d.ts.map +1 -1
  187. package/dist/types/src/types/Channel.d.ts +16 -0
  188. package/dist/types/src/types/Channel.d.ts.map +1 -0
  189. package/dist/types/src/types/Thread.d.ts +167 -0
  190. package/dist/types/src/types/Thread.d.ts.map +1 -0
  191. package/dist/types/src/types/index.d.ts +2 -1
  192. package/dist/types/src/types/index.d.ts.map +1 -1
  193. package/dist/types/src/types/types.d.ts +207 -208
  194. package/dist/types/src/types/types.d.ts.map +1 -1
  195. package/dist/types/tsconfig.tsbuildinfo +1 -1
  196. package/package.json +67 -59
  197. package/src/ThreadPlugin.tsx +141 -127
  198. package/src/calls/call-manager.ts +2 -2
  199. package/src/calls/call-swarm-synchronizer.ts +1 -1
  200. package/src/calls/media-manager.ts +66 -37
  201. package/src/calls/types.ts +8 -4
  202. package/src/calls/util/calls-service.ts +65 -14
  203. package/src/calls/util/stub-media-streams.ts +64 -7
  204. package/src/calls-service.stories.tsx +78 -65
  205. package/src/capabilities/app-graph-builder.ts +45 -31
  206. package/src/capabilities/blueprint-definition.ts +38 -0
  207. package/src/capabilities/call-manager.ts +3 -2
  208. package/src/capabilities/capabilities.ts +8 -8
  209. package/src/capabilities/index.ts +1 -0
  210. package/src/capabilities/intent-resolver.ts +25 -28
  211. package/src/capabilities/markdown.ts +9 -6
  212. package/src/capabilities/react-root.tsx +2 -2
  213. package/src/capabilities/react-surface.tsx +21 -19
  214. package/src/capabilities/state.ts +2 -1
  215. package/src/components/Call/Call.tsx +4 -3
  216. package/src/components/Call/Toolbar.tsx +10 -10
  217. package/src/components/CallDebugPanel.tsx +108 -49
  218. package/src/components/CallSidebar.tsx +3 -2
  219. package/src/components/ChannelContainer.stories.tsx +15 -14
  220. package/src/components/ChannelContainer.tsx +25 -20
  221. package/src/components/Chat.stories.tsx +33 -36
  222. package/src/components/ChatContainer.tsx +36 -23
  223. package/src/components/Comments.stories.tsx +40 -41
  224. package/src/components/CommentsContainer.tsx +8 -8
  225. package/src/components/CommentsThreadContainer.tsx +40 -33
  226. package/src/components/Lobby/Lobby.tsx +2 -2
  227. package/src/components/Media/VideoObject.stories.tsx +36 -28
  228. package/src/components/Media/VideoObject.tsx +1 -1
  229. package/src/components/MessageContainer.tsx +48 -14
  230. package/src/components/Participant/Participant.tsx +14 -8
  231. package/src/components/Participant/ParticipantGrid.tsx +2 -1
  232. package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +8 -8
  233. package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +2 -2
  234. package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +45 -43
  235. package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +5 -5
  236. package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +7 -4
  237. package/src/components/ThreadComplementary.tsx +71 -34
  238. package/src/components/ThreadSettings.tsx +6 -7
  239. package/src/components/command-extension.ts +5 -2
  240. package/src/components/testing.ts +27 -5
  241. package/src/extensions/threads.ts +29 -20
  242. package/src/functions/create-proposals.ts +58 -0
  243. package/src/functions/index.ts +5 -0
  244. package/src/hooks/analytics.ts +4 -7
  245. package/src/hooks/index.ts +3 -1
  246. package/src/hooks/useBlackCanvasStreamTrack.tsx +27 -0
  247. package/src/hooks/useDebugMode.ts +1 -1
  248. package/src/hooks/useVideoStreamTrack.tsx +6 -3
  249. package/src/meta.ts +9 -5
  250. package/src/testing/stories.ts +5 -8
  251. package/src/translations.ts +6 -3
  252. package/src/types/Channel.ts +27 -0
  253. package/src/types/Thread.ts +26 -0
  254. package/src/types/index.ts +2 -1
  255. package/src/types/types.ts +29 -28
  256. package/src/typings/peermetrics-webrtc-stats.d.ts +17 -1
  257. package/src/typings.d.ts +8 -0
  258. package/src/util.ts +1 -1
  259. package/dist/lib/browser/ChannelContainer-IY2UIRLF.mjs +0 -16
  260. package/dist/lib/browser/ChatContainer-AIGIWAUG.mjs +0 -15
  261. package/dist/lib/browser/app-graph-builder-N7BE5TYW.mjs.map +0 -7
  262. package/dist/lib/browser/call-manager-NIPDYUVD.mjs.map +0 -7
  263. package/dist/lib/browser/chunk-4OYAYON2.mjs +0 -21
  264. package/dist/lib/browser/chunk-4OYAYON2.mjs.map +0 -7
  265. package/dist/lib/browser/chunk-6NSMBO3B.mjs.map +0 -7
  266. package/dist/lib/browser/chunk-ERWASUQK.mjs.map +0 -7
  267. package/dist/lib/browser/chunk-EV4JWI7L.mjs +0 -17
  268. package/dist/lib/browser/chunk-EV4JWI7L.mjs.map +0 -7
  269. package/dist/lib/browser/chunk-GCLD5ESP.mjs +0 -137
  270. package/dist/lib/browser/chunk-GCLD5ESP.mjs.map +0 -7
  271. package/dist/lib/browser/chunk-GERVMFQW.mjs.map +0 -7
  272. package/dist/lib/browser/chunk-KWPRNHTK.mjs.map +0 -7
  273. package/dist/lib/browser/chunk-LGSDKXPF.mjs +0 -18
  274. package/dist/lib/browser/chunk-LGSDKXPF.mjs.map +0 -7
  275. package/dist/lib/browser/chunk-VUWC4IJM.mjs +0 -479
  276. package/dist/lib/browser/chunk-VUWC4IJM.mjs.map +0 -7
  277. package/dist/lib/browser/chunk-XLPJXUKO.mjs +0 -367
  278. package/dist/lib/browser/chunk-XLPJXUKO.mjs.map +0 -7
  279. package/dist/lib/browser/chunk-ZE7KWN36.mjs.map +0 -7
  280. package/dist/lib/browser/intent-resolver-JFGLZ6VI.mjs.map +0 -7
  281. package/dist/lib/browser/markdown-GEXBVJYN.mjs.map +0 -7
  282. package/dist/lib/browser/react-root-X4UIVGTX.mjs +0 -28
  283. package/dist/lib/browser/react-root-X4UIVGTX.mjs.map +0 -7
  284. package/dist/lib/browser/react-surface-YCYEFBPM.mjs.map +0 -7
  285. package/dist/lib/browser/state-H6CYONWE.mjs.map +0 -7
  286. package/dist/lib/node-esm/ChannelContainer-DET6T5N2.mjs +0 -17
  287. package/dist/lib/node-esm/app-graph-builder-VCW76Z6V.mjs.map +0 -7
  288. package/dist/lib/node-esm/call-manager-D6O5ZJJ4.mjs.map +0 -7
  289. package/dist/lib/node-esm/chunk-25ABSYP2.mjs.map +0 -7
  290. package/dist/lib/node-esm/chunk-2MFNK53T.mjs +0 -480
  291. package/dist/lib/node-esm/chunk-2MFNK53T.mjs.map +0 -7
  292. package/dist/lib/node-esm/chunk-57XR3LEF.mjs.map +0 -7
  293. package/dist/lib/node-esm/chunk-75RJ5DJI.mjs +0 -19
  294. package/dist/lib/node-esm/chunk-75RJ5DJI.mjs.map +0 -7
  295. package/dist/lib/node-esm/chunk-C3XFMUAY.mjs.map +0 -7
  296. package/dist/lib/node-esm/chunk-GRLRWTRU.mjs +0 -19
  297. package/dist/lib/node-esm/chunk-GRLRWTRU.mjs.map +0 -7
  298. package/dist/lib/node-esm/chunk-GW37AAM4.mjs +0 -23
  299. package/dist/lib/node-esm/chunk-GW37AAM4.mjs.map +0 -7
  300. package/dist/lib/node-esm/chunk-IHDNQLLR.mjs.map +0 -7
  301. package/dist/lib/node-esm/chunk-J4NSON5Q.mjs +0 -368
  302. package/dist/lib/node-esm/chunk-J4NSON5Q.mjs.map +0 -7
  303. package/dist/lib/node-esm/chunk-OU5BYIDO.mjs.map +0 -7
  304. package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs +0 -138
  305. package/dist/lib/node-esm/chunk-TDFHTCZZ.mjs.map +0 -7
  306. package/dist/lib/node-esm/intent-resolver-OXGNQ44Y.mjs.map +0 -7
  307. package/dist/lib/node-esm/markdown-LIJZDK2J.mjs.map +0 -7
  308. package/dist/lib/node-esm/react-root-M7J6PZVW.mjs +0 -29
  309. package/dist/lib/node-esm/react-root-M7J6PZVW.mjs.map +0 -7
  310. package/dist/lib/node-esm/react-surface-IRSEKM42.mjs.map +0 -7
  311. package/dist/lib/node-esm/state-D7WNDT3N.mjs.map +0 -7
  312. package/dist/types/src/types/schema.d.ts +0 -162
  313. package/dist/types/src/types/schema.d.ts.map +0 -1
  314. package/src/types/schema.ts +0 -33
  315. /package/dist/lib/browser/{ChannelContainer-IY2UIRLF.mjs.map → ChannelContainer-56QROCE4.mjs.map} +0 -0
  316. /package/dist/lib/browser/{ChatContainer-AIGIWAUG.mjs.map → ChatContainer-7F5Y6GXJ.mjs.map} +0 -0
  317. /package/dist/lib/node-esm/{ChannelContainer-DET6T5N2.mjs.map → ChannelContainer-4SV22AKC.mjs.map} +0 -0
  318. /package/dist/lib/node-esm/{ChatContainer-IQUWU426.mjs.map → ChatContainer-C526R4DI.mjs.map} +0 -0
@@ -4,15 +4,16 @@
4
4
 
5
5
  import { EditorView } from '@codemirror/view';
6
6
 
7
- import { Capabilities, contributes, createIntent, type PluginContext } from '@dxos/app-framework';
7
+ import { Capabilities, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
8
+ import { Obj } from '@dxos/echo';
8
9
  import { ATTENDABLE_PATH_SEPARATOR, DeckAction } from '@dxos/plugin-deck/types';
9
10
  import { MarkdownCapabilities } from '@dxos/plugin-markdown';
10
- import { fullyQualifiedId } from '@dxos/react-client/echo';
11
- import { commentClickedEffect, commentsState, type EditorState, overlap } from '@dxos/react-ui-editor';
11
+ import { type EditorState, commentClickedEffect, commentsState, overlap } from '@dxos/react-ui-editor';
12
12
 
13
- import { ThreadCapabilities } from './capabilities';
14
13
  import { threads } from '../extensions';
15
14
 
15
+ import { ThreadCapabilities } from './capabilities';
16
+
16
17
  export default (context: PluginContext) =>
17
18
  contributes(MarkdownCapabilities.Extensions, [
18
19
  ({ document: doc }) => {
@@ -21,17 +22,19 @@ export default (context: PluginContext) =>
21
22
  return threads(state, doc, dispatch);
22
23
  },
23
24
  ({ document: doc }) => {
25
+ if (!doc) return [];
24
26
  const { state } = context.getCapability(ThreadCapabilities.MutableState);
25
27
 
26
28
  return EditorView.updateListener.of((update) => {
27
29
  if (update.docChanged || update.selectionSet) {
28
- state.toolbar[fullyQualifiedId(doc)] = selectionOverlapsComment(update.state);
30
+ state.toolbar[Obj.getDXN(doc).toString()] = selectionOverlapsComment(update.state);
29
31
  }
30
32
  });
31
33
  },
32
34
  ({ document: doc }) => {
35
+ if (!doc) return [];
33
36
  const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
34
- const id = fullyQualifiedId(doc);
37
+ const id = Obj.getDXN(doc).toString();
35
38
 
36
39
  return EditorView.updateListener.of((update) => {
37
40
  update.transactions.forEach((transaction) => {
@@ -7,11 +7,11 @@ import React from 'react';
7
7
  import { Capabilities, contributes } from '@dxos/app-framework';
8
8
 
9
9
  import { Call } from '../components';
10
- import { THREAD_PLUGIN } from '../meta';
10
+ import { meta } from '../meta';
11
11
 
12
12
  export default () => {
13
13
  return contributes(Capabilities.ReactRoot, {
14
- id: THREAD_PLUGIN,
14
+ id: meta.id,
15
15
  root: () => <Call.Audio />,
16
16
  });
17
17
  };
@@ -4,36 +4,38 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';
7
+ import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
+ import { useCapability } from '@dxos/app-framework/react';
8
9
  import { Obj, type Ref } from '@dxos/echo';
9
10
  import { SettingsStore } from '@dxos/local-storage';
10
11
  import { getSpace } from '@dxos/react-client/echo';
11
12
 
12
- import { ThreadCapabilities } from './capabilities';
13
13
  import {
14
- CallSidebar,
15
14
  CallDebugPanel,
15
+ CallSidebar,
16
16
  ChannelContainer,
17
+ ChatContainer,
17
18
  ThreadComplementary,
18
19
  ThreadSettings,
19
- ChatContainer,
20
20
  } from '../components';
21
- import { THREAD_PLUGIN } from '../meta';
22
- import { ChannelType, ThreadType, type ThreadSettingsProps } from '../types';
21
+ import { meta } from '../meta';
22
+ import { Channel, Thread, type ThreadSettingsProps } from '../types';
23
+
24
+ import { ThreadCapabilities } from './capabilities';
23
25
 
24
26
  export default () =>
25
27
  contributes(Capabilities.ReactSurface, [
26
28
  createSurface({
27
- id: `${THREAD_PLUGIN}/channel`,
29
+ id: `${meta.id}/channel`,
28
30
  role: 'article',
29
- filter: (data): data is { subject: ChannelType } => Obj.instanceOf(ChannelType, data.subject),
31
+ filter: (data): data is { subject: Channel.Channel } => Obj.instanceOf(Channel.Channel, data.subject),
30
32
  component: ({ data: { subject: channel }, role }) => <ChannelContainer channel={channel} role={role} />,
31
33
  }),
32
34
  createSurface({
33
- id: `${THREAD_PLUGIN}/chat-companion`,
35
+ id: `${meta.id}/chat-companion`,
34
36
  role: 'article',
35
- filter: (data): data is { companionTo: ChannelType; subject: 'chat' } =>
36
- Obj.instanceOf(ChannelType, data.companionTo) && data.subject === 'chat',
37
+ filter: (data): data is { companionTo: Channel.Channel; subject: 'chat' } =>
38
+ Obj.instanceOf(Channel.Channel, data.companionTo) && data.subject === 'chat',
37
39
  component: ({ data: { companionTo: channel } }) => {
38
40
  const space = getSpace(channel);
39
41
  const thread = channel.defaultThread.target;
@@ -45,9 +47,9 @@ export default () =>
45
47
  },
46
48
  }),
47
49
  createSurface({
48
- id: `${THREAD_PLUGIN}/thread`,
50
+ id: `${meta.id}/thread`,
49
51
  role: 'article',
50
- filter: (data): data is { subject: ThreadType } => Obj.instanceOf(ThreadType, data.subject),
52
+ filter: (data): data is { subject: Thread.Thread } => Obj.instanceOf(Thread.Thread, data.subject),
51
53
  component: ({ data: { subject: thread } }) => {
52
54
  const space = getSpace(thread);
53
55
  if (!space || !thread) {
@@ -58,27 +60,27 @@ export default () =>
58
60
  },
59
61
  }),
60
62
  createSurface({
61
- id: `${THREAD_PLUGIN}/comments`,
63
+ id: `${meta.id}/comments`,
62
64
  role: 'article',
63
- filter: (data): data is { companionTo: { threads: Ref.Ref<ThreadType>[] } } =>
65
+ filter: (data): data is { companionTo: { threads: Ref.Ref<Thread.Thread>[] } } =>
64
66
  data.subject === 'comments' && Obj.isObject(data.companionTo),
65
67
  // TODO(wittjosiah): This isn't scrolling properly in a plank.
66
68
  component: ({ data }) => <ThreadComplementary subject={data.companionTo} />,
67
69
  }),
68
70
  createSurface({
69
- id: `${THREAD_PLUGIN}/plugin-settings`,
71
+ id: `${meta.id}/plugin-settings`,
70
72
  role: 'article',
71
73
  filter: (data): data is { subject: SettingsStore<ThreadSettingsProps> } =>
72
- data.subject instanceof SettingsStore && data.subject.prefix === THREAD_PLUGIN,
74
+ data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
73
75
  component: ({ data: { subject } }) => <ThreadSettings settings={subject.value} />,
74
76
  }),
75
77
  createSurface({
76
- id: `${THREAD_PLUGIN}/assistant`,
78
+ id: `${meta.id}/assistant`,
77
79
  role: 'deck-companion--active-call',
78
80
  component: () => <CallSidebar />,
79
81
  }),
80
82
  createSurface({
81
- id: `${THREAD_PLUGIN}/devtools-overview`,
83
+ id: `${meta.id}/devtools-overview`,
82
84
  role: 'devtools-overview',
83
85
  component: () => {
84
86
  const call = useCapability(ThreadCapabilities.CallManager);
@@ -5,9 +5,10 @@
5
5
  import { contributes } from '@dxos/app-framework';
6
6
  import { live } from '@dxos/live-object';
7
7
 
8
- import { ThreadCapabilities } from './capabilities';
9
8
  import { type ThreadState, type ViewStore } from '../types';
10
9
 
10
+ import { ThreadCapabilities } from './capabilities';
11
+
11
12
  const initialViewState = { showResolvedThreads: false };
12
13
 
13
14
  export default () => {
@@ -2,17 +2,18 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import React, { type PropsWithChildren, type FC } from 'react';
5
+ import React, { type FC, type PropsWithChildren } from 'react';
6
6
 
7
- import { useCapability } from '@dxos/app-framework';
7
+ import { useCapability } from '@dxos/app-framework/react';
8
8
  import { type ThemedClassName } from '@dxos/react-ui';
9
9
 
10
- import { Toolbar, type ToolbarProps } from './Toolbar';
11
10
  import { ThreadCapabilities } from '../../capabilities';
12
11
  import { useDebugMode } from '../../hooks';
13
12
  import { AudioStream } from '../Media';
14
13
  import { ParticipantGrid } from '../Participant';
15
14
 
15
+ import { Toolbar, type ToolbarProps } from './Toolbar';
16
+
16
17
  //
17
18
  // Root
18
19
  //
@@ -4,15 +4,15 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { useAppGraph, useCapability } from '@dxos/app-framework';
8
- import { useNode, useActions } from '@dxos/plugin-graph';
9
- import { fullyQualifiedId } from '@dxos/react-client/echo';
7
+ import { useAppGraph, useCapability } from '@dxos/app-framework/react';
8
+ import { Obj } from '@dxos/echo';
9
+ import { useActions, useNode } from '@dxos/plugin-graph';
10
10
  import {
11
11
  Icon,
12
12
  IconButton,
13
13
  type IconButtonProps,
14
+ Toolbar as NaturalToolbar,
14
15
  type ThemedClassName,
15
- Toolbar as NativeToolbar,
16
16
  toLocalizedString,
17
17
  useTranslation,
18
18
  } from '@dxos/react-ui';
@@ -20,10 +20,10 @@ import { groupHoverControlItemWithTransition, mx } from '@dxos/react-ui-theme';
20
20
 
21
21
  import { ThreadCapabilities } from '../../capabilities';
22
22
  import { meta } from '../../meta';
23
- import { type ChannelType } from '../../types';
23
+ import { type Channel } from '../../types';
24
24
 
25
25
  export type ToolbarProps = ThemedClassName<{
26
- channel?: ChannelType;
26
+ channel?: Channel.Channel;
27
27
  participants?: number;
28
28
  autoHideControls?: boolean;
29
29
  isInRoom?: boolean;
@@ -45,7 +45,7 @@ export const Toolbar = ({
45
45
  const call = useCapability(ThreadCapabilities.CallManager);
46
46
 
47
47
  // Channel app graph node.
48
- const node = useNode(graph, channel && fullyQualifiedId(channel));
48
+ const node = useNode(graph, channel && Obj.getDXN(channel).toString());
49
49
  const actions = useActions(graph, node?.id).filter((action) => action.properties.disposition === 'toolbar');
50
50
 
51
51
  // Screen sharing.
@@ -56,7 +56,7 @@ export const Toolbar = ({
56
56
  // TODO(wittjosiah): In order to use toolbar, need to update to actually use the graph action callbacks directly.
57
57
  return (
58
58
  <div className={mx('z-20 flex justify-center m-8', autoHideControls && groupHoverControlItemWithTransition)}>
59
- <NativeToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', classNames]}>
59
+ <NaturalToolbar.Root classNames={['p-2 bg-modalSurface rounded-md shadow-md', classNames]}>
60
60
  <ToggleButton
61
61
  active={call.media.audioEnabled}
62
62
  state={{
@@ -95,7 +95,7 @@ export const Toolbar = ({
95
95
  <Icon icon='ph--users--regular' size={4} />
96
96
  <div>{participants}</div>
97
97
  </div>
98
- )) || <NativeToolbar.Separator variant='gap' />}
98
+ )) || <NaturalToolbar.Separator variant='gap' />}
99
99
 
100
100
  {call.joined && (
101
101
  <>
@@ -151,7 +151,7 @@ export const Toolbar = ({
151
151
  ) : (
152
152
  <IconButton variant='primary' icon='ph--phone-incoming--regular' label={t('join call')} onClick={onJoin} />
153
153
  )}
154
- </NativeToolbar.Root>
154
+ </NaturalToolbar.Root>
155
155
  </div>
156
156
  );
157
157
  };
@@ -2,15 +2,15 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { WebRTCStats } from '@peermetrics/webrtc-stats';
5
+ import { WebRTCStats, type WebRTCStatsEvent } from '@peermetrics/webrtc-stats';
6
6
  import React, { useEffect, useMemo, useState } from 'react';
7
7
 
8
- import { Panel } from '@dxos/devtools';
8
+ import { truncateKey } from '@dxos/debug';
9
+ import { JsonView, Panel } from '@dxos/devtools';
9
10
  import { log } from '@dxos/log';
10
- import { Input, useTranslation, type ThemedClassName } from '@dxos/react-ui';
11
- import { Json } from '@dxos/react-ui-syntax-highlighter';
11
+ import { IconButton, Input, type ThemedClassName, useTranslation } from '@dxos/react-ui';
12
12
 
13
- import { type GlobalState } from '../calls';
13
+ import { type EncodedTrackName, type GlobalState } from '../calls';
14
14
  import { meta } from '../meta';
15
15
 
16
16
  export type CallDebugPanelProps = ThemedClassName<{
@@ -19,11 +19,16 @@ export type CallDebugPanelProps = ThemedClassName<{
19
19
 
20
20
  export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
21
21
  const { t } = useTranslation(meta.id);
22
- const users = state?.call?.users;
23
- const self = state?.call?.self;
24
22
 
25
23
  const [open, setOpen] = useState(false);
26
24
  const handleToggle = () => setOpen(!open);
25
+ const [showServiceHistory, setShowServiceHistory] = useState(false);
26
+ const handleToggleServiceHistory = () => setShowServiceHistory(!showServiceHistory);
27
+
28
+ const handleCopyRaw = async () => {
29
+ await navigator.clipboard.writeText(JSON.stringify({ users: state?.call?.users, stats }, null, 2));
30
+ };
31
+
27
32
  const [showDetailedWebRTCStats, setShowDetailedWebRTCStats] = useState(false);
28
33
  const handleShowDetailedWebRTCStats = () => setShowDetailedWebRTCStats(!showDetailedWebRTCStats);
29
34
 
@@ -34,22 +39,24 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
34
39
  }),
35
40
  [],
36
41
  );
42
+ const [stats, setStats] = useState<WebRTCStatsEvent['data']>();
37
43
 
38
- const [stats, setStats] = useState<Record<string, any>>({});
39
44
  useEffect(() => {
40
45
  const pc = state?.media.peer?.session?.peerConnection;
41
- const handleStats = (stats: Record<string, any>) => setStats(stats.data);
46
+ const handleStats = (stats: WebRTCStatsEvent) => {
47
+ setStats(stats.data);
48
+ };
42
49
  let added = false;
43
50
  if (pc && showDetailedWebRTCStats) {
44
51
  webrtcStats.addConnection({ pc, peerId: 1, connectionId: '1' });
45
- webrtcStats.on('stats', handleStats);
52
+ webrtcStats.on('stats', handleStats as never);
46
53
  added = true;
47
54
  }
48
55
  return () => {
49
56
  try {
50
57
  if (pc && added) {
51
58
  webrtcStats.removeConnection({ pc });
52
- webrtcStats.removeListener('stats', handleStats);
59
+ webrtcStats.removeListener('stats', handleStats as never);
53
60
  }
54
61
  } catch (error) {
55
62
  log.error('error removing webrtc stats', { error, pc, peerId: 1, connectionId: '1' });
@@ -57,6 +64,8 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
57
64
  };
58
65
  }, [state?.media.peer?.session?.peerConnection, showDetailedWebRTCStats]);
59
66
 
67
+ const rows = useMemo(() => getCallStatusTable(state), [state?.call.users, state?.media.pulledAudioTracks]);
68
+
60
69
  return (
61
70
  <Panel
62
71
  id='meeting-status'
@@ -65,51 +74,101 @@ export const CallDebugPanel = ({ state }: CallDebugPanelProps) => {
65
74
  onToggle={handleToggle}
66
75
  title={t('meeting status title')}
67
76
  maxHeight={false}
68
- info={
69
- <div className='flex items-center gap-2'>
70
- <span title='Joined'>{self?.joined ? 'Active' : 'Inactive'}</span>
71
- {users?.length !== undefined && <span title='Users'>{users?.length ?? 0} User(s)</span>}
72
- </div>
73
- }
77
+ info={<div className='flex items-center gap-2'> {state?.call.joined ? 'Active' : 'Inactive'}</div>}
74
78
  >
75
- <div className='flex flex-col gap-2 overflow-y-auto'>
76
- <div className='flex items-row gap-2'>
79
+ <div className='flex flex-col is-full gap-2 text-xs'>
80
+ <div className='flex items-center gap-2'>
77
81
  <Input.Root>
78
82
  <Input.Label classNames={'text-sm'}>{t('show webrtc stats title')}</Input.Label>
79
83
  <Input.Checkbox checked={showDetailedWebRTCStats} onCheckedChange={handleShowDetailedWebRTCStats} />
80
84
  </Input.Root>
81
85
  </div>
82
- <Json
83
- classNames='text-sm'
84
- data={{
85
- users,
86
- activities: state?.call?.activities,
87
- ...(showDetailedWebRTCStats
88
- ? {
89
- webrtc: {
90
- connectionState: state?.media.peer?.session?.peerConnection.connectionState,
91
- iceConnectionState: state?.media.peer?.session?.peerConnection.iceConnectionState,
92
- stats,
93
- },
94
- }
95
- : {}),
96
- tracks: state?.media.peer?.session?.peerConnection.getTransceivers().map((transceiver) => {
97
- const track =
98
- transceiver.direction === 'recvonly' ? transceiver.receiver.track : transceiver.sender.track;
99
- return {
100
- id: track?.id,
101
- kind: track?.kind,
102
- direction: transceiver.direction,
103
- enabled: track?.enabled,
104
- muted: track?.muted,
105
- readyState: track?.readyState,
106
- settings: track?.getSettings(),
107
- };
108
- }),
109
- callsServiceHistory: state?.media.peer?.history.get(),
110
- }}
111
- />
86
+ <div className='flex items-center gap-2'>
87
+ <Input.Root>
88
+ <Input.Label classNames={'text-sm'}>{t('show calls history title')}</Input.Label>
89
+ <Input.Checkbox checked={showServiceHistory} onCheckedChange={handleToggleServiceHistory} />
90
+ </Input.Root>
91
+ </div>
92
+ <div className='flex items-center gap-2'>
93
+ <IconButton classNames={'text-sm'} icon='ph--copy--regular' label={'copy raw'} onClick={handleCopyRaw} />
94
+ </div>
95
+ <Table rows={rows} />
96
+ {showDetailedWebRTCStats && <JsonView data={{ stats }} />}
97
+ {showServiceHistory && <JsonView data={{ history: state?.media.peer?.history.get() }} />}
112
98
  </div>
113
99
  </Panel>
114
100
  );
115
101
  };
102
+
103
+ const getCallStatusTable = (state?: GlobalState): TableProps['rows'] => {
104
+ if (!state || !state.call?.users) {
105
+ return [];
106
+ }
107
+
108
+ const self = state.call.self;
109
+ const users = state.call.users
110
+ .filter((user) => user.id !== self!.id)
111
+ .map((user) => {
112
+ const isOk = {
113
+ audio:
114
+ user.tracks?.audio &&
115
+ state.media.pulledAudioTracks[user.tracks?.audio as EncodedTrackName]?.ctx.disposed === false,
116
+ video:
117
+ user.tracks?.video &&
118
+ state.media.pulledVideoStreams[user.tracks?.video as EncodedTrackName]?.ctx.disposed === false,
119
+ screenshare:
120
+ user.tracks?.screenshare &&
121
+ state.media.pulledVideoStreams[user.tracks?.screenshare as EncodedTrackName]?.ctx.disposed === false,
122
+ };
123
+
124
+ return {
125
+ ...user,
126
+ isOk,
127
+ };
128
+ });
129
+
130
+ return [
131
+ ['users', state.call.users.length ?? 0],
132
+ [
133
+ '*self* ' + (self?.name ?? truncateKey(self!.id, 8)),
134
+ self?.tracks?.audio && state.media.pushedAudioTrack ? 'AUD ✅' : 'AUD ❌',
135
+ self?.tracks?.video && state.media.pushedVideoTrack ? 'VID ✅' : 'VID ❌',
136
+ self?.tracks?.screenshareEnabled
137
+ ? self.tracks.screenshareEnabled && state.media.pushedScreenshareTrack
138
+ ? 'SCR ✅'
139
+ : 'SCR ❌'
140
+ : undefined,
141
+ ],
142
+
143
+ ...users.map((user) => [
144
+ user.name ?? truncateKey(user.id, 8),
145
+ user.isOk.audio ? 'AUD ✅' : 'AUD ❌',
146
+ user.isOk.video ? 'VID ✅' : 'VID ❌',
147
+ user.tracks?.screenshareEnabled ? (user.isOk.screenshare ? 'SCR ✅' : 'SCR ❌') : undefined,
148
+ ]),
149
+ ['ICE', state.media.peer?.session?.peerConnection.iceConnectionState ?? 'no connection'],
150
+ ];
151
+ };
152
+
153
+ export namespace Unit {
154
+ export const KB = (n?: number) => ((n ?? 0) / 1_000).toFixed(2);
155
+ }
156
+
157
+ export type TableProps = {
158
+ rows: (string | number | undefined)[][];
159
+ };
160
+
161
+ export const Table = ({ rows }: TableProps) => {
162
+ return (
163
+ <div className='is-full text-xs font-mono'>
164
+ {rows.map(([prefix, label, value, unit], i) => (
165
+ <div key={i} className='grid grid-cols-[3fr_1fr_1fr_1fr]'>
166
+ <div className='p-1'>{prefix}</div>
167
+ <div className='p-1'>{label}</div>
168
+ <div className='p-1'>{value}</div>
169
+ <div className='p-1'>{unit}</div>
170
+ </div>
171
+ ))}
172
+ </div>
173
+ );
174
+ };
@@ -4,11 +4,12 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { useCapability } from '@dxos/app-framework';
7
+ import { useCapability } from '@dxos/app-framework/react';
8
8
 
9
- import { ChannelContainer } from './ChannelContainer';
10
9
  import { ThreadCapabilities } from '../capabilities';
11
10
 
11
+ import { ChannelContainer } from './ChannelContainer';
12
+
12
13
  export const CallSidebar = () => {
13
14
  const call = useCapability(ThreadCapabilities.CallManager);
14
15
  return <ChannelContainer roomId={call.roomId} />;
@@ -2,8 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
5
  import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import React from 'react';
9
7
 
@@ -11,18 +9,20 @@ import { contributes } from '@dxos/app-framework';
11
9
  import { withPluginManager } from '@dxos/app-framework/testing';
12
10
  import { ClientCapabilities } from '@dxos/plugin-client';
13
11
  import { Query, useQuery, useSpace } from '@dxos/react-client/echo';
14
- import { DataType } from '@dxos/schema';
15
- import { withLayout, ColumnContainer } from '@dxos/storybook-utils';
12
+ import { withLayout, withTheme } from '@dxos/react-ui/testing';
13
+ import { render } from '@dxos/storybook-utils';
14
+ import { Message } from '@dxos/types';
16
15
 
17
- import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
18
16
  import { createThreadPlugins } from '../testing';
19
17
  import { translations } from '../translations';
20
- import { ChannelType, ThreadType } from '../types';
18
+ import { Channel, Thread } from '../types';
19
+
20
+ import { ChannelContainer, type ChannelContainerProps } from './ChannelContainer';
21
21
 
22
22
  // TODO(wittjosiah): Channel doesn't render full height.
23
- const Story = ({ roomId }: ChannelContainerProps) => {
23
+ const DefaultStory = ({ roomId }: ChannelContainerProps) => {
24
24
  const space = useSpace();
25
- const [channel] = useQuery(space, Query.type(ChannelType));
25
+ const [channel] = useQuery(space, Query.type(Channel.Channel));
26
26
  if (!channel) {
27
27
  return null;
28
28
  }
@@ -30,25 +30,26 @@ const Story = ({ roomId }: ChannelContainerProps) => {
30
30
  return <ChannelContainer channel={channel} roomId={roomId} />;
31
31
  };
32
32
 
33
- const meta: Meta<ChannelContainerProps> = {
33
+ const meta = {
34
34
  title: 'plugins/plugin-thread/ChannelContainer',
35
35
  component: ChannelContainer,
36
- render: (args) => <Story {...args} />,
36
+ render: render(DefaultStory),
37
37
  decorators: [
38
+ withTheme,
39
+ withLayout({ container: 'column' }),
38
40
  withPluginManager({
39
41
  plugins: [...(await createThreadPlugins())],
40
- capabilities: [contributes(ClientCapabilities.Schema, [ChannelType, ThreadType, DataType.Message])],
42
+ capabilities: [contributes(ClientCapabilities.Schema, [Channel.Channel, Thread.Thread, Message.Message])],
41
43
  }),
42
- withLayout({ Container: ColumnContainer, classNames: 'w-[40rem] overflow-hidden' }),
43
44
  ],
44
45
  parameters: {
45
46
  translations,
46
47
  },
47
- };
48
+ } satisfies Meta<typeof ChannelContainer>;
48
49
 
49
50
  export default meta;
50
51
 
51
- type Story = StoryObj<ChannelContainerProps>;
52
+ type Story = StoryObj<typeof meta>;
52
53
 
53
54
  export const Default: Story = {
54
55
  args: {