@dxos/plugin-thread 0.8.4-main.3eb6e50203 → 0.8.4-main.4a85c3132b

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 (236) hide show
  1. package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs +182 -0
  2. package/dist/lib/browser/CallDebugPanel-FGCTY7Q4.mjs.map +7 -0
  3. package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs +33 -0
  4. package/dist/lib/browser/CallSidebar-PJCMNDIF.mjs.map +7 -0
  5. package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs +15 -0
  6. package/dist/lib/browser/ChannelContainer-EPYG4QAC.mjs.map +7 -0
  7. package/dist/lib/browser/ChatContainer-2243UD2M.mjs +14 -0
  8. package/dist/lib/browser/ChatContainer-2243UD2M.mjs.map +7 -0
  9. package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs +204 -0
  10. package/dist/lib/browser/ThreadCompanion-2CMLJH76.mjs.map +7 -0
  11. package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs +20 -0
  12. package/dist/lib/browser/ThreadSettings-S55YVOGA.mjs.map +7 -0
  13. package/dist/lib/browser/{app-graph-builder-XFGLMIGK.mjs → app-graph-builder-5LCAM746.mjs} +5 -3
  14. package/dist/lib/{node-esm/app-graph-builder-IN6VLJBO.mjs.map → browser/app-graph-builder-5LCAM746.mjs.map} +1 -1
  15. package/dist/lib/browser/{blueprint-definition-ACPH22F7.mjs → blueprint-definition-42M2EJ2Y.mjs} +4 -5
  16. package/dist/lib/browser/blueprint-definition-42M2EJ2Y.mjs.map +7 -0
  17. package/dist/lib/browser/blueprints/index.mjs +3 -3
  18. package/dist/lib/browser/{call-manager-GDGIKJKN.mjs → call-manager-2PRP4QVZ.mjs} +3 -2
  19. package/dist/lib/browser/{chunk-4EUEMHNI.mjs → chunk-G6FJBSXX.mjs} +110 -804
  20. package/dist/lib/browser/chunk-G6FJBSXX.mjs.map +7 -0
  21. package/dist/lib/browser/{chunk-JBB73URQ.mjs → chunk-HDLDMR54.mjs} +1 -1
  22. package/dist/lib/browser/{chunk-JBB73URQ.mjs.map → chunk-HDLDMR54.mjs.map} +2 -2
  23. package/dist/lib/browser/chunk-LUK4UNFA.mjs +20 -0
  24. package/dist/lib/browser/chunk-LUK4UNFA.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-PDHCY236.mjs +223 -0
  26. package/dist/lib/browser/chunk-PDHCY236.mjs.map +7 -0
  27. package/dist/lib/browser/{chunk-RH7XTXSR.mjs → chunk-PL5LIVP4.mjs} +18 -19
  28. package/dist/lib/browser/chunk-PL5LIVP4.mjs.map +7 -0
  29. package/dist/lib/browser/{chunk-2FIHSX35.mjs → chunk-U32R23JO.mjs} +12 -28
  30. package/dist/lib/browser/chunk-U32R23JO.mjs.map +7 -0
  31. package/dist/lib/browser/chunk-UVUCB7QO.mjs +125 -0
  32. package/dist/lib/browser/chunk-UVUCB7QO.mjs.map +7 -0
  33. package/dist/lib/browser/index.mjs +17 -30
  34. package/dist/lib/browser/index.mjs.map +3 -3
  35. package/dist/lib/browser/{markdown-YJCSOWXX.mjs → markdown-GRRPCZHJ.mjs} +3 -3
  36. package/dist/lib/{node-esm/markdown-6LRP3PAP.mjs.map → browser/markdown-GRRPCZHJ.mjs.map} +3 -3
  37. package/dist/lib/browser/meta.json +1 -1
  38. package/dist/lib/browser/{operation-resolver-PROCP5L4.mjs → operation-resolver-EP7FAYEB.mjs} +10 -9
  39. package/dist/lib/browser/operation-resolver-EP7FAYEB.mjs.map +7 -0
  40. package/dist/lib/browser/{react-root-FHK2SVPU.mjs → react-root-7UFFPPRD.mjs} +5 -4
  41. package/dist/lib/browser/{react-surface-7MQA6VSH.mjs → react-surface-TIHBSZPD.mjs} +16 -14
  42. package/dist/lib/browser/react-surface-TIHBSZPD.mjs.map +7 -0
  43. package/dist/lib/browser/{repair-6OZ75AUU.mjs → repair-TBU45SBG.mjs} +7 -5
  44. package/dist/lib/browser/repair-TBU45SBG.mjs.map +7 -0
  45. package/dist/lib/browser/{settings-TWKOTGSU.mjs → settings-Y75FG6XR.mjs} +5 -3
  46. package/dist/lib/{node-esm/settings-5O254B3Z.mjs.map → browser/settings-Y75FG6XR.mjs.map} +1 -1
  47. package/dist/lib/browser/{state-SJR2GL5G.mjs → state-OBTMMEUZ.mjs} +3 -2
  48. package/dist/lib/browser/types/index.mjs +2 -1
  49. package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs +183 -0
  50. package/dist/lib/node-esm/CallDebugPanel-CYACANSP.mjs.map +7 -0
  51. package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs +34 -0
  52. package/dist/lib/node-esm/CallSidebar-XD7J7EQ6.mjs.map +7 -0
  53. package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs +16 -0
  54. package/dist/lib/node-esm/ChannelContainer-NU4LSLB4.mjs.map +7 -0
  55. package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs +15 -0
  56. package/dist/lib/node-esm/ChatContainer-FPNIG33R.mjs.map +7 -0
  57. package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs +205 -0
  58. package/dist/lib/node-esm/ThreadCompanion-TLWTONG6.mjs.map +7 -0
  59. package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs +21 -0
  60. package/dist/lib/node-esm/ThreadSettings-EUH4AGYV.mjs.map +7 -0
  61. package/dist/lib/node-esm/{app-graph-builder-IN6VLJBO.mjs → app-graph-builder-VBLHLX75.mjs} +5 -3
  62. package/dist/lib/{browser/app-graph-builder-XFGLMIGK.mjs.map → node-esm/app-graph-builder-VBLHLX75.mjs.map} +1 -1
  63. package/dist/lib/node-esm/{blueprint-definition-SXVKFUNV.mjs → blueprint-definition-PEXTS56K.mjs} +4 -5
  64. package/dist/lib/node-esm/blueprint-definition-PEXTS56K.mjs.map +7 -0
  65. package/dist/lib/node-esm/blueprints/index.mjs +3 -3
  66. package/dist/lib/node-esm/{call-manager-36UAAQCJ.mjs → call-manager-BLQCEM2F.mjs} +3 -2
  67. package/dist/lib/{browser/call-manager-GDGIKJKN.mjs.map → node-esm/call-manager-BLQCEM2F.mjs.map} +1 -1
  68. package/dist/lib/node-esm/{chunk-OKVE6CLS.mjs → chunk-6K5ACCGB.mjs} +18 -18
  69. package/dist/lib/node-esm/chunk-6K5ACCGB.mjs.map +7 -0
  70. package/dist/lib/node-esm/chunk-7SZBKQUU.mjs +224 -0
  71. package/dist/lib/node-esm/chunk-7SZBKQUU.mjs.map +7 -0
  72. package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs +22 -0
  73. package/dist/lib/node-esm/chunk-GPPP2MZ3.mjs.map +7 -0
  74. package/dist/lib/node-esm/{chunk-RBRWHRHE.mjs → chunk-IQUV7DR6.mjs} +110 -804
  75. package/dist/lib/node-esm/chunk-IQUV7DR6.mjs.map +7 -0
  76. package/dist/lib/node-esm/{chunk-WMWUXWAS.mjs → chunk-QYAVWNVM.mjs} +12 -28
  77. package/dist/lib/node-esm/chunk-QYAVWNVM.mjs.map +7 -0
  78. package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs +126 -0
  79. package/dist/lib/node-esm/chunk-V2GXQ2UB.mjs.map +7 -0
  80. package/dist/lib/node-esm/{chunk-G7PZNN3Z.mjs → chunk-YN2Y7GPW.mjs} +1 -1
  81. package/dist/lib/node-esm/{chunk-G7PZNN3Z.mjs.map → chunk-YN2Y7GPW.mjs.map} +2 -2
  82. package/dist/lib/node-esm/index.mjs +17 -30
  83. package/dist/lib/node-esm/index.mjs.map +3 -3
  84. package/dist/lib/node-esm/{markdown-6LRP3PAP.mjs → markdown-WHWUESF7.mjs} +3 -3
  85. package/dist/lib/node-esm/markdown-WHWUESF7.mjs.map +7 -0
  86. package/dist/lib/node-esm/meta.json +1 -1
  87. package/dist/lib/node-esm/{operation-resolver-LPEPV5BF.mjs → operation-resolver-R7QJW3TW.mjs} +10 -9
  88. package/dist/lib/node-esm/operation-resolver-R7QJW3TW.mjs.map +7 -0
  89. package/dist/lib/node-esm/{react-root-P5P4VGQJ.mjs → react-root-D7CWS5XP.mjs} +5 -4
  90. package/dist/lib/{browser/react-root-FHK2SVPU.mjs.map → node-esm/react-root-D7CWS5XP.mjs.map} +1 -1
  91. package/dist/lib/node-esm/{react-surface-M7VI5XG2.mjs → react-surface-WWZFSK5Y.mjs} +16 -14
  92. package/dist/lib/node-esm/react-surface-WWZFSK5Y.mjs.map +7 -0
  93. package/dist/lib/node-esm/{repair-6777EPOM.mjs → repair-7JEKRNR3.mjs} +7 -5
  94. package/dist/lib/node-esm/repair-7JEKRNR3.mjs.map +7 -0
  95. package/dist/lib/node-esm/{settings-5O254B3Z.mjs → settings-W4JN2YKJ.mjs} +5 -3
  96. package/dist/lib/{browser/settings-TWKOTGSU.mjs.map → node-esm/settings-W4JN2YKJ.mjs.map} +1 -1
  97. package/dist/lib/node-esm/{state-5R3TZJQE.mjs → state-7UWCSIWQ.mjs} +3 -2
  98. package/dist/lib/{browser/state-SJR2GL5G.mjs.map → node-esm/state-7UWCSIWQ.mjs.map} +1 -1
  99. package/dist/lib/node-esm/types/index.mjs +2 -1
  100. package/dist/types/src/ThreadPlugin.d.ts.map +1 -1
  101. package/dist/types/src/blueprints/index.d.ts +1 -1
  102. package/dist/types/src/blueprints/index.d.ts.map +1 -1
  103. package/dist/types/src/blueprints/thread-blueprint.d.ts +3 -20
  104. package/dist/types/src/blueprints/thread-blueprint.d.ts.map +1 -1
  105. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
  106. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +1 -5
  107. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -1
  108. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +1 -1
  109. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -1
  110. package/dist/types/src/capabilities/call-manager/call-manager.d.ts +1 -1
  111. package/dist/types/src/capabilities/markdown/markdown.d.ts +1 -1
  112. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -1
  113. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +1 -1
  114. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
  115. package/dist/types/src/capabilities/react-root/react-root.d.ts +1 -1
  116. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +1 -1
  117. package/dist/types/src/capabilities/repair/repair.d.ts +1 -1
  118. package/dist/types/src/capabilities/repair/repair.d.ts.map +1 -1
  119. package/dist/types/src/capabilities/settings/settings.d.ts +1 -1
  120. package/dist/types/src/capabilities/state/state.d.ts +1 -1
  121. package/dist/types/src/components/Call/Toolbar.d.ts.map +1 -1
  122. package/dist/types/src/components/Comments.stories.d.ts.map +1 -1
  123. package/dist/types/src/components/CommentsContainer.d.ts.map +1 -1
  124. package/dist/types/src/components/CommentsThreadContainer.d.ts.map +1 -1
  125. package/dist/types/src/components/MessageContainer.d.ts +3 -3
  126. package/dist/types/src/components/MessageContainer.d.ts.map +1 -1
  127. package/dist/types/src/components/index.d.ts +0 -6
  128. package/dist/types/src/components/index.d.ts.map +1 -1
  129. package/dist/types/src/{components → containers/CallDebugPanel}/CallDebugPanel.d.ts +1 -1
  130. package/dist/types/src/containers/CallDebugPanel/CallDebugPanel.d.ts.map +1 -0
  131. package/dist/types/src/containers/CallDebugPanel/index.d.ts +3 -0
  132. package/dist/types/src/containers/CallDebugPanel/index.d.ts.map +1 -0
  133. package/dist/types/src/{components → containers/CallSidebar}/CallSidebar.d.ts +0 -1
  134. package/dist/types/src/containers/CallSidebar/CallSidebar.d.ts.map +1 -0
  135. package/dist/types/src/containers/CallSidebar/index.d.ts +3 -0
  136. package/dist/types/src/containers/CallSidebar/index.d.ts.map +1 -0
  137. package/dist/types/src/{components → containers/ChannelContainer}/ChannelContainer.d.ts +2 -3
  138. package/dist/types/src/containers/ChannelContainer/ChannelContainer.d.ts.map +1 -0
  139. package/dist/types/src/{components → containers/ChannelContainer}/ChannelContainer.stories.d.ts +1 -1
  140. package/dist/types/src/containers/ChannelContainer/ChannelContainer.stories.d.ts.map +1 -0
  141. package/dist/types/src/containers/ChannelContainer/index.d.ts +3 -0
  142. package/dist/types/src/containers/ChannelContainer/index.d.ts.map +1 -0
  143. package/dist/types/src/{components → containers/ChatContainer}/ChatContainer.d.ts +0 -1
  144. package/dist/types/src/containers/ChatContainer/ChatContainer.d.ts.map +1 -0
  145. package/dist/types/src/{components/Chat.stories.d.ts → containers/ChatContainer/ChatContainer.stories.d.ts} +1 -1
  146. package/dist/types/src/containers/ChatContainer/ChatContainer.stories.d.ts.map +1 -0
  147. package/dist/types/src/containers/ChatContainer/index.d.ts +3 -0
  148. package/dist/types/src/containers/ChatContainer/index.d.ts.map +1 -0
  149. package/dist/types/src/containers/ThreadCompanion/ThreadCompanion.d.ts.map +1 -0
  150. package/dist/types/src/containers/ThreadCompanion/index.d.ts +3 -0
  151. package/dist/types/src/containers/ThreadCompanion/index.d.ts.map +1 -0
  152. package/dist/types/src/{components → containers/ThreadSettings}/ThreadSettings.d.ts +1 -1
  153. package/dist/types/src/containers/ThreadSettings/ThreadSettings.d.ts.map +1 -0
  154. package/dist/types/src/containers/ThreadSettings/index.d.ts +3 -0
  155. package/dist/types/src/containers/ThreadSettings/index.d.ts.map +1 -0
  156. package/dist/types/src/containers/index.d.ts +8 -0
  157. package/dist/types/src/containers/index.d.ts.map +1 -0
  158. package/dist/types/src/functions/index.d.ts +13 -1
  159. package/dist/types/src/functions/index.d.ts.map +1 -1
  160. package/dist/types/src/hooks/analytics.d.ts.map +1 -1
  161. package/dist/types/src/types/Channel.d.ts +25 -9
  162. package/dist/types/src/types/Channel.d.ts.map +1 -1
  163. package/dist/types/src/types/types.d.ts +171 -94
  164. package/dist/types/src/types/types.d.ts.map +1 -1
  165. package/dist/types/tsconfig.tsbuildinfo +1 -1
  166. package/package.json +57 -57
  167. package/src/ThreadPlugin.tsx +2 -14
  168. package/src/blueprints/index.ts +1 -1
  169. package/src/blueprints/thread-blueprint.ts +14 -6
  170. package/src/calls-service.stories.tsx +1 -1
  171. package/src/capabilities/blueprint-definition/blueprint-definition.ts +4 -11
  172. package/src/capabilities/markdown/markdown.ts +0 -1
  173. package/src/capabilities/operation-resolver/operation-resolver.ts +2 -3
  174. package/src/capabilities/react-surface/react-surface.tsx +1 -1
  175. package/src/capabilities/repair/repair.ts +7 -3
  176. package/src/components/Call/Toolbar.tsx +4 -6
  177. package/src/components/Comments.stories.tsx +4 -3
  178. package/src/components/CommentsContainer.tsx +9 -8
  179. package/src/components/CommentsThreadContainer.tsx +3 -4
  180. package/src/components/Media/VideoObject.stories.tsx +3 -3
  181. package/src/components/Media/VideoObject.tsx +1 -1
  182. package/src/components/MessageContainer.tsx +8 -8
  183. package/src/components/ResponsiveGrid/ResponsiveContainer.stories.tsx +3 -3
  184. package/src/components/ResponsiveGrid/ResponsiveContainer.tsx +2 -2
  185. package/src/components/ResponsiveGrid/ResponsiveGrid.stories.tsx +4 -4
  186. package/src/components/ResponsiveGrid/ResponsiveGrid.tsx +5 -5
  187. package/src/components/ResponsiveGrid/ResponsiveGridItem.tsx +5 -5
  188. package/src/components/command-extension.ts +1 -1
  189. package/src/components/index.ts +0 -7
  190. package/src/{components → containers/CallDebugPanel}/CallDebugPanel.tsx +4 -4
  191. package/src/containers/CallDebugPanel/index.ts +7 -0
  192. package/src/{components → containers/CallSidebar}/CallSidebar.tsx +2 -5
  193. package/src/containers/CallSidebar/index.ts +7 -0
  194. package/src/{components → containers/ChannelContainer}/ChannelContainer.stories.tsx +4 -4
  195. package/src/{components → containers/ChannelContainer}/ChannelContainer.tsx +42 -33
  196. package/src/containers/ChannelContainer/index.ts +7 -0
  197. package/src/{components/Chat.stories.tsx → containers/ChatContainer/ChatContainer.stories.tsx} +14 -12
  198. package/src/{components → containers/ChatContainer}/ChatContainer.tsx +14 -17
  199. package/src/containers/ChatContainer/index.ts +7 -0
  200. package/src/{components → containers/ThreadCompanion}/ThreadCompanion.tsx +33 -30
  201. package/src/containers/ThreadCompanion/index.ts +7 -0
  202. package/src/{components → containers/ThreadSettings}/ThreadSettings.tsx +2 -2
  203. package/src/containers/ThreadSettings/index.ts +7 -0
  204. package/src/containers/index.ts +12 -0
  205. package/src/functions/create-proposals.ts +2 -2
  206. package/src/functions/index.ts +5 -1
  207. package/src/hooks/analytics.ts +1 -0
  208. package/src/types/Channel.ts +2 -2
  209. package/src/types/types.ts +6 -6
  210. package/dist/lib/browser/blueprint-definition-ACPH22F7.mjs.map +0 -7
  211. package/dist/lib/browser/chunk-2FIHSX35.mjs.map +0 -7
  212. package/dist/lib/browser/chunk-4EUEMHNI.mjs.map +0 -7
  213. package/dist/lib/browser/chunk-RH7XTXSR.mjs.map +0 -7
  214. package/dist/lib/browser/markdown-YJCSOWXX.mjs.map +0 -7
  215. package/dist/lib/browser/operation-resolver-PROCP5L4.mjs.map +0 -7
  216. package/dist/lib/browser/react-surface-7MQA6VSH.mjs.map +0 -7
  217. package/dist/lib/browser/repair-6OZ75AUU.mjs.map +0 -7
  218. package/dist/lib/node-esm/blueprint-definition-SXVKFUNV.mjs.map +0 -7
  219. package/dist/lib/node-esm/chunk-OKVE6CLS.mjs.map +0 -7
  220. package/dist/lib/node-esm/chunk-RBRWHRHE.mjs.map +0 -7
  221. package/dist/lib/node-esm/chunk-WMWUXWAS.mjs.map +0 -7
  222. package/dist/lib/node-esm/operation-resolver-LPEPV5BF.mjs.map +0 -7
  223. package/dist/lib/node-esm/react-surface-M7VI5XG2.mjs.map +0 -7
  224. package/dist/lib/node-esm/repair-6777EPOM.mjs.map +0 -7
  225. package/dist/types/src/components/CallDebugPanel.d.ts.map +0 -1
  226. package/dist/types/src/components/CallSidebar.d.ts.map +0 -1
  227. package/dist/types/src/components/ChannelContainer.d.ts.map +0 -1
  228. package/dist/types/src/components/ChannelContainer.stories.d.ts.map +0 -1
  229. package/dist/types/src/components/Chat.stories.d.ts.map +0 -1
  230. package/dist/types/src/components/ChatContainer.d.ts.map +0 -1
  231. package/dist/types/src/components/ThreadCompanion.d.ts.map +0 -1
  232. package/dist/types/src/components/ThreadSettings.d.ts.map +0 -1
  233. /package/dist/lib/{node-esm/call-manager-36UAAQCJ.mjs.map → browser/call-manager-2PRP4QVZ.mjs.map} +0 -0
  234. /package/dist/lib/{node-esm/react-root-P5P4VGQJ.mjs.map → browser/react-root-7UFFPPRD.mjs.map} +0 -0
  235. /package/dist/lib/{node-esm/state-5R3TZJQE.mjs.map → browser/state-OBTMMEUZ.mjs.map} +0 -0
  236. /package/dist/types/src/{components → containers/ThreadCompanion}/ThreadCompanion.d.ts +0 -0
@@ -3,15 +3,16 @@ import {
3
3
  useDebugMode,
4
4
  useOnEditAnalytics,
5
5
  useStatus
6
- } from "./chunk-G7PZNN3Z.mjs";
6
+ } from "./chunk-YN2Y7GPW.mjs";
7
7
  import {
8
8
  getMessageMetadata
9
9
  } from "./chunk-ABUFOZVX.mjs";
10
10
  import {
11
- ThreadCapabilities,
12
- ThreadOperation,
11
+ ThreadCapabilities
12
+ } from "./chunk-QYAVWNVM.mjs";
13
+ import {
13
14
  meta
14
- } from "./chunk-WMWUXWAS.mjs";
15
+ } from "./chunk-GPPP2MZ3.mjs";
15
16
 
16
17
  // src/components/Call/Call.tsx
17
18
  import { useAtomValue as useAtomValue3 } from "@effect-atom/atom-react";
@@ -85,7 +86,7 @@ var VideoObject = /* @__PURE__ */ memo(/* @__PURE__ */ forwardRef(({ videoStream
85
86
  internalRef.current
86
87
  ]);
87
88
  return /* @__PURE__ */ React2.createElement("video", {
88
- className: mx("is-full aspect-video", flip && "scale-x-[-1]", contain ? "object-contain" : "object-cover", classNames),
89
+ className: mx("w-full aspect-video", flip && "scale-x-[-1]", contain ? "object-contain" : "object-cover", classNames),
89
90
  ref: (v) => {
90
91
  internalRef.current = v;
91
92
  if (ref === null) {
@@ -115,13 +116,13 @@ var ResponsiveContainer = ({ children }) => {
115
116
  // Outer container that takes full size of parent.
116
117
  /* @__PURE__ */ React3.createElement("div", {
117
118
  role: "none",
118
- className: "relative flex is-full bs-full"
119
+ className: "relative flex w-full h-full"
119
120
  }, /* @__PURE__ */ React3.createElement("div", {
120
121
  role: "none",
121
122
  className: "absolute inset-0 flex justify-center items-center"
122
123
  }, /* @__PURE__ */ React3.createElement("div", {
123
124
  role: "none",
124
- className: mx2("max-bs-full max-is-full is-auto bs-auto aspect-video")
125
+ className: mx2("max-h-full max-w-full w-auto h-auto aspect-video")
125
126
  }, children)))
126
127
  );
127
128
  };
@@ -135,7 +136,7 @@ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-thread/src/components
135
136
  var ASPECT_RATIO = 16 / 9;
136
137
  var MIN_GALLERY_HEIGHT = 250;
137
138
  var DEFAULT_GAP = 8;
138
- var maxImageSize = "is-[2560px] bs-[1440px]";
139
+ var maxImageSize = "w-[2560px] h-[1440px]";
139
140
  var defaultGetId = (item) => item.id;
140
141
  var ResponsiveGrid = ({ classNames, Cell, gap = DEFAULT_GAP, getId: getId2 = defaultGetId, items, pinned, autoHideGallery = false, debug, onPinnedChange }) => {
141
142
  const { width: containerWidth = 0, height: containerHeight = 0, ref: containerRef } = useResizeDetector({
@@ -225,11 +226,11 @@ var ResponsiveGrid = ({ classNames, Cell, gap = DEFAULT_GAP, getId: getId2 = def
225
226
  ]);
226
227
  return /* @__PURE__ */ React4.createElement("div", {
227
228
  ref: containerRef,
228
- className: mx3("relative is-full bs-full", classNames)
229
+ className: mx3("relative w-full h-full", classNames)
229
230
  }, /* @__PURE__ */ React4.createElement("div", {
230
231
  className: "absolute inset-0 flex flex-col grow gap-2"
231
232
  }, pinnedItem && /* @__PURE__ */ React4.createElement("div", {
232
- className: mx3("flex grow-[2] shrink overflow-hidden justify-center items-center", hideGallery && "bs-full"),
233
+ className: mx3("flex grow-[2] shrink overflow-hidden justify-center items-center", hideGallery && "h-full"),
233
234
  style: hideGallery ? {} : {
234
235
  height: dividerHeight
235
236
  }
@@ -246,7 +247,7 @@ var ResponsiveGrid = ({ classNames, Cell, gap = DEFAULT_GAP, getId: getId2 = def
246
247
  style: {
247
248
  width: cellWidth
248
249
  },
249
- className: "flex bs-full"
250
+ className: "flex h-full"
250
251
  }, /* @__PURE__ */ React4.createElement(SoloItem, {
251
252
  id: getId2(mainItems[0]),
252
253
  debug
@@ -260,7 +261,7 @@ var ResponsiveGrid = ({ classNames, Cell, gap = DEFAULT_GAP, getId: getId2 = def
260
261
  }, mainItems.map((item) => /* @__PURE__ */ React4.createElement("div", {
261
262
  key: getId2(item),
262
263
  "data-grid-item": getId2(item),
263
- className: mx3("aspect-video max-bs-full max-is-full is-auto bs-auto", debug && "border border-primary-500")
264
+ className: mx3("aspect-video max-h-full max-w-full w-auto h-auto", debug && "border border-primary-500")
264
265
  }))))), /* @__PURE__ */ React4.createElement("div", {
265
266
  className: mx3(debug && "opacity-10")
266
267
  }, bounds.map(([item, bounds2]) => /* @__PURE__ */ React4.createElement(Cell, {
@@ -377,12 +378,12 @@ var ResponsiveGridItem = ({ children, classNames, item, style, name, self, pinne
377
378
  speaking
378
379
  ]);
379
380
  return /* @__PURE__ */ React5.createElement("div", {
380
- className: mx4("relative is-full bs-full group", "rounded-md outline outline-2 outline-neutral-900 transition-[outline-color] duration-500", speakingIndicator ? "outline-green-500" : !video && "outline-separator", classNames),
381
+ className: mx4("relative w-full h-full group", "rounded-md outline outline-2 outline-neutral-900 transition-[outline-color] duration-500", speakingIndicator ? "outline-green-500" : !video && "outline-separator", classNames),
381
382
  style
382
383
  }, children, onClick && /* @__PURE__ */ React5.createElement("div", {
383
384
  className: "z-10 absolute top-1 right-1 flex"
384
385
  }, /* @__PURE__ */ React5.createElement(IconButton, {
385
- classNames: mx4("p-1 min-bs-1 rounded", groupHoverControlItemWithTransition),
386
+ classNames: mx4("p-1 min-h-1 rounded-sm", groupHoverControlItemWithTransition),
386
387
  iconOnly: true,
387
388
  icon: pinned ? "ph--x--regular" : "ph--arrows-out--regular",
388
389
  size: pinned ? 5 : 4,
@@ -394,14 +395,14 @@ var ResponsiveGridItem = ({ children, classNames, item, style, name, self, pinne
394
395
  icon: "ph--broadcast--regular",
395
396
  size: pinned ? 5 : 4
396
397
  }), /* @__PURE__ */ React5.createElement("div", {
397
- className: mx4("bg-neutral-800 text-neutral-100 plb-0.5 truncate rounded", pinned ? "pli-2" : "pli-1 text-xs")
398
+ className: mx4("bg-neutral-800 text-neutral-100 py-0.5 truncate rounded-sm", pinned ? "px-2" : "px-1 text-xs")
398
399
  }, name)), /* @__PURE__ */ React5.createElement("div", {
399
400
  className: "z-10 absolute bottom-1 left-1 flex"
400
401
  }, speaking && /* @__PURE__ */ React5.createElement(Waveform, {
401
402
  active: true,
402
403
  size: pinned ? 5 : 4
403
404
  }) || props && /* @__PURE__ */ React5.createElement(IconButton, {
404
- classNames: mx4("p-1 min-bs-1 rounded", props?.classNames),
405
+ classNames: mx4("p-1 min-h-1 rounded-sm", props?.classNames),
405
406
  icon: props?.icon,
406
407
  label: props?.label,
407
408
  size: pinned ? 5 : 4,
@@ -558,7 +559,7 @@ var Toolbar = ({ classNames, channel, participants, autoHideControls = true, onJ
558
559
  className: mx5("z-20 flex justify-center m-8", autoHideControls && groupHoverControlItemWithTransition2)
559
560
  }, /* @__PURE__ */ React8.createElement(NaturalToolbar.Root, {
560
561
  classNames: [
561
- "p-2 bg-modalSurface rounded-md shadow-md",
562
+ "p-2 bg-modal-surface rounded-md shadow-md",
562
563
  classNames
563
564
  ]
564
565
  }, /* @__PURE__ */ React8.createElement(ToggleButton, {
@@ -568,15 +569,12 @@ var Toolbar = ({ classNames, channel, participants, autoHideControls = true, onJ
568
569
  icon: "ph--microphone--regular",
569
570
  label: t("mic off"),
570
571
  onClick: () => call.turnAudioOff(),
571
- classNames: "bg-callActive"
572
+ classNames: "bg-call-active"
572
573
  },
573
574
  off: {
574
575
  icon: "ph--microphone-slash--duotone",
575
576
  label: t("mic on"),
576
- onClick: () => call.turnAudioOn(),
577
- classNames: [
578
- joined && "bg-callAlert"
579
- ]
577
+ onClick: () => call.turnAudioOn()
580
578
  }
581
579
  }
582
580
  }), /* @__PURE__ */ React8.createElement(ToggleButton, {
@@ -594,7 +592,7 @@ var Toolbar = ({ classNames, channel, participants, autoHideControls = true, onJ
594
592
  }
595
593
  }
596
594
  }), participants !== void 0 && /* @__PURE__ */ React8.createElement("div", {
597
- className: "flex justify-center items-center gap-2 is-[5rem] text-xs text-subdued"
595
+ className: "flex justify-center items-center gap-2 w-[5rem] text-xs text-subdued"
598
596
  }, /* @__PURE__ */ React8.createElement(Icon2, {
599
597
  icon: "ph--users--regular",
600
598
  size: 4
@@ -630,10 +628,7 @@ var Toolbar = ({ classNames, channel, participants, autoHideControls = true, onJ
630
628
  on: {
631
629
  icon: "ph--hand-waving--regular",
632
630
  label: t("lower hand"),
633
- onClick: () => call.setRaisedHand(false),
634
- classNames: [
635
- joined && "bg-callAlert"
636
- ]
631
+ onClick: () => call.setRaisedHand(false)
637
632
  },
638
633
  off: {
639
634
  icon: "ph--hand-palm--duotone",
@@ -661,7 +656,7 @@ var defaultButtonProps = {
661
656
  var ToggleButton = ({ active, state }) => /* @__PURE__ */ React8.createElement(IconButton2, {
662
657
  ...defaultButtonProps,
663
658
  classNames: [
664
- active ? state.on.classNames ?? "bg-callActive" : state.off.classNames
659
+ active ? state.on.classNames ?? "bg-call-active" : state.off.classNames
665
660
  ],
666
661
  icon: active ? state.on.icon : state.off.icon,
667
662
  label: active ? state.on.label : state.off.label,
@@ -714,189 +709,21 @@ var Call = {
714
709
  Toolbar: CallToolbar
715
710
  };
716
711
 
717
- // src/components/CallDebugPanel.tsx
718
- import { WebRTCStats } from "@peermetrics/webrtc-stats";
719
- import React10, { useEffect as useEffect6, useMemo as useMemo4, useState as useState4 } from "react";
720
- import { truncateKey } from "@dxos/debug";
721
- import { JsonView, Panel } from "@dxos/devtools";
722
- import { log } from "@dxos/log";
723
- import { IconButton as IconButton3, Input, useTranslation as useTranslation3 } from "@dxos/react-ui";
724
- var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-thread/src/components/CallDebugPanel.tsx";
725
- var CallDebugPanel = ({ state }) => {
726
- const { t } = useTranslation3(meta.id);
727
- const [open, setOpen] = useState4(false);
728
- const handleToggle = () => setOpen(!open);
729
- const [showServiceHistory, setShowServiceHistory] = useState4(false);
730
- const handleToggleServiceHistory = () => setShowServiceHistory(!showServiceHistory);
731
- const handleCopyRaw = async () => {
732
- await navigator.clipboard.writeText(JSON.stringify({
733
- users: state?.call?.users,
734
- stats
735
- }, null, 2));
736
- };
737
- const [showDetailedWebRTCStats, setShowDetailedWebRTCStats] = useState4(false);
738
- const handleShowDetailedWebRTCStats = () => setShowDetailedWebRTCStats(!showDetailedWebRTCStats);
739
- const webrtcStats = useMemo4(() => new WebRTCStats({
740
- getStatsInterval: 1e3
741
- }), []);
742
- const [stats, setStats] = useState4();
743
- useEffect6(() => {
744
- const pc = state?.media.peer?.session?.peerConnection;
745
- const handleStats = (stats2) => {
746
- setStats(stats2.data);
747
- };
748
- let added = false;
749
- if (pc && showDetailedWebRTCStats) {
750
- webrtcStats.addConnection({
751
- pc,
752
- peerId: 1,
753
- connectionId: "1"
754
- });
755
- webrtcStats.on("stats", handleStats);
756
- added = true;
757
- }
758
- return () => {
759
- try {
760
- if (pc && added) {
761
- webrtcStats.removeConnection({
762
- pc
763
- });
764
- webrtcStats.removeListener("stats", handleStats);
765
- }
766
- } catch (error) {
767
- log.error("error removing webrtc stats", {
768
- error,
769
- pc,
770
- peerId: 1,
771
- connectionId: "1"
772
- }, {
773
- F: __dxlog_file2,
774
- L: 60,
775
- S: void 0,
776
- C: (f, a) => f(...a)
777
- });
778
- }
779
- };
780
- }, [
781
- state?.media.peer?.session?.peerConnection,
782
- showDetailedWebRTCStats
783
- ]);
784
- const rows = useMemo4(() => getCallStatusTable(state), [
785
- state?.call.users,
786
- state?.media.pulledAudioTracks
787
- ]);
788
- return /* @__PURE__ */ React10.createElement(Panel, {
789
- id: "meeting-status",
790
- icon: "ph--video-conference--regular",
791
- open,
792
- onToggle: handleToggle,
793
- title: t("meeting status title"),
794
- info: /* @__PURE__ */ React10.createElement("div", {
795
- className: "flex items-center gap-2"
796
- }, " ", state?.call.joined ? "Active" : "Inactive"),
797
- maxHeight: 0
798
- }, /* @__PURE__ */ React10.createElement("div", {
799
- className: "flex flex-col is-full text-xs"
800
- }, /* @__PURE__ */ React10.createElement("div", {
801
- className: "flex items-center gap-2 items-center"
802
- }, /* @__PURE__ */ React10.createElement(Input.Root, null, /* @__PURE__ */ React10.createElement(Input.Switch, {
803
- checked: showDetailedWebRTCStats,
804
- onCheckedChange: handleShowDetailedWebRTCStats
805
- }), /* @__PURE__ */ React10.createElement(Input.Label, null, t("show webrtc stats title")))), /* @__PURE__ */ React10.createElement("div", {
806
- className: "flex items-center gap-2 items-center"
807
- }, /* @__PURE__ */ React10.createElement(Input.Root, null, /* @__PURE__ */ React10.createElement(Input.Switch, {
808
- checked: showServiceHistory,
809
- onCheckedChange: handleToggleServiceHistory
810
- }), /* @__PURE__ */ React10.createElement(Input.Label, null, t("show calls history title")))), /* @__PURE__ */ React10.createElement("div", {
811
- className: "flex items-center gap-2 items-center"
812
- }, /* @__PURE__ */ React10.createElement(IconButton3, {
813
- icon: "ph--copy--regular",
814
- label: "copy raw",
815
- onClick: handleCopyRaw
816
- })), /* @__PURE__ */ React10.createElement(Table, {
817
- rows
818
- }), showDetailedWebRTCStats && /* @__PURE__ */ React10.createElement(JsonView, {
819
- data: {
820
- stats
821
- }
822
- }), showServiceHistory && /* @__PURE__ */ React10.createElement(JsonView, {
823
- data: {
824
- history: state?.media.peer?.history.get()
825
- }
826
- })));
827
- };
828
- var getCallStatusTable = (state) => {
829
- if (!state || !state.call?.users) {
830
- return [];
831
- }
832
- const self = state.call.self;
833
- const users = state.call.users.filter((user) => user.id !== self.id).map((user) => {
834
- const isOk = {
835
- audio: user.tracks?.audio && state.media.pulledAudioTracks[user.tracks?.audio]?.ctx.disposed === false,
836
- video: user.tracks?.video && state.media.pulledVideoStreams[user.tracks?.video]?.ctx.disposed === false,
837
- screenshare: user.tracks?.screenshare && state.media.pulledVideoStreams[user.tracks?.screenshare]?.ctx.disposed === false
838
- };
839
- return {
840
- ...user,
841
- isOk
842
- };
843
- });
844
- return [
845
- [
846
- "users",
847
- state.call.users.length ?? 0
848
- ],
849
- [
850
- "*self* " + (self?.name ?? truncateKey(self.id, 8)),
851
- self?.tracks?.audio && state.media.pushedAudioTrack ? "AUD \u2705" : "AUD \u274C",
852
- self?.tracks?.video && state.media.pushedVideoTrack ? "VID \u2705" : "VID \u274C",
853
- self?.tracks?.screenshareEnabled ? self.tracks.screenshareEnabled && state.media.pushedScreenshareTrack ? "SCR \u2705" : "SCR \u274C" : void 0
854
- ],
855
- ...users.map((user) => [
856
- user.name ?? truncateKey(user.id, 8),
857
- user.isOk.audio ? "AUD \u2705" : "AUD \u274C",
858
- user.isOk.video ? "VID \u2705" : "VID \u274C",
859
- user.tracks?.screenshareEnabled ? user.isOk.screenshare ? "SCR \u2705" : "SCR \u274C" : void 0
860
- ]),
861
- [
862
- "ICE",
863
- state.media.peer?.session?.peerConnection.iceConnectionState ?? "no connection"
864
- ]
865
- ];
866
- };
867
- (function(Unit2) {
868
- Unit2.KB = (n) => ((n ?? 0) / 1e3).toFixed(2);
869
- })(Unit || (Unit = {}));
870
- var Table = ({ rows }) => {
871
- return /* @__PURE__ */ React10.createElement("div", {
872
- className: "is-full text-xs font-mono"
873
- }, rows.map(([prefix, label, value, unit], i) => /* @__PURE__ */ React10.createElement("div", {
874
- key: i,
875
- className: "grid grid-cols-[3fr_1fr_1fr_1fr]"
876
- }, /* @__PURE__ */ React10.createElement("div", {
877
- className: "p-1"
878
- }, prefix), /* @__PURE__ */ React10.createElement("div", {
879
- className: "p-1"
880
- }, label), /* @__PURE__ */ React10.createElement("div", {
881
- className: "p-1"
882
- }, value), /* @__PURE__ */ React10.createElement("div", {
883
- className: "p-1"
884
- }, unit))));
885
- };
886
- var Unit;
712
+ // src/components/CommentsContainer.tsx
713
+ import React12, { useEffect as useEffect7 } from "react";
714
+ import { Obj as Obj3, Relation as Relation2 } from "@dxos/echo";
715
+ import { Icon as Icon3, Message, Trans, useTranslation as useTranslation5 } from "@dxos/react-ui";
887
716
 
888
- // src/components/ChatContainer.tsx
889
- import React12, { useLayoutEffect as useLayoutEffect2, useMemo as useMemo5, useRef as useRef4, useState as useState6 } from "react";
890
- import { Obj as Obj2, Ref as Ref2 } from "@dxos/echo";
891
- import { useMembers } from "@dxos/react-client/echo";
717
+ // src/components/CommentsThreadContainer.tsx
718
+ import React11, { useCallback as useCallback3, useMemo as useMemo4, useRef as useRef4, useState as useState5 } from "react";
719
+ import { Obj as Obj2, Relation } from "@dxos/echo";
720
+ import { useObject as useObject2 } from "@dxos/echo-react";
721
+ import { getSpace, useMembers } from "@dxos/react-client/echo";
892
722
  import { useIdentity as useIdentity2 } from "@dxos/react-client/halo";
893
- import { Icon as Icon3, ScrollArea, useThemeContext as useThemeContext2, useTranslation as useTranslation5 } from "@dxos/react-ui";
894
- import { StackItem } from "@dxos/react-ui-stack";
895
- import { MessageTextbox, Thread as ThreadComponent, threadLayout } from "@dxos/react-ui-thread";
896
- import { Message } from "@dxos/types";
723
+ import { IconButton as IconButton4, Tag, Tooltip, useThemeContext as useThemeContext2, useTranslation as useTranslation4 } from "@dxos/react-ui";
724
+ import { MessageTextbox, Thread as ThreadComponent } from "@dxos/react-ui-thread";
897
725
  import { createBasicExtensions as createBasicExtensions2, createThemeExtensions as createThemeExtensions2, listener } from "@dxos/ui-editor";
898
- import { mx as mx8 } from "@dxos/ui-theme";
899
- import { isNonNullable } from "@dxos/util";
726
+ import { hoverableControlItem as hoverableControlItem2, hoverableControls as hoverableControls2, hoverableFocusedWithinControls as hoverableFocusedWithinControls2, mx as mx8 } from "@dxos/ui-theme";
900
727
 
901
728
  // src/components/command-extension.ts
902
729
  import { HighlightStyle, StreamLanguage, syntaxHighlighting } from "@codemirror/language";
@@ -921,7 +748,7 @@ var parser = StreamLanguage.define({
921
748
  var styles = HighlightStyle.define([
922
749
  {
923
750
  tag: tags.tagName,
924
- class: mx6("dx-tag dx-tag--indigo text-baseText font-medium")
751
+ class: mx6("dx-tag dx-tag--indigo text-base-surface-text font-medium")
925
752
  }
926
753
  ]);
927
754
  var command = [
@@ -931,25 +758,25 @@ var command = [
931
758
 
932
759
  // src/components/MessageContainer.tsx
933
760
  import { EditorView } from "@codemirror/view";
934
- import React11, { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect7, useRef as useRef3, useState as useState5 } from "react";
761
+ import React10, { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect6, useRef as useRef3, useState as useState4 } from "react";
935
762
  import { Surface } from "@dxos/app-framework/ui";
936
763
  import { Ref } from "@dxos/echo";
937
764
  import { useObject } from "@dxos/echo-react";
938
765
  import { PublicKey } from "@dxos/react-client";
939
766
  import { useIdentity } from "@dxos/react-client/halo";
940
- import { IconButton as IconButton4, useOnTransition, useThemeContext, useTranslation as useTranslation4 } from "@dxos/react-ui";
767
+ import { IconButton as IconButton3, useOnTransition, useThemeContext, useTranslation as useTranslation3 } from "@dxos/react-ui";
768
+ import { Card } from "@dxos/react-ui";
941
769
  import { useTextEditor } from "@dxos/react-ui-editor";
942
- import { Card } from "@dxos/react-ui-mosaic";
943
770
  import { MessageHeading, MessageRoot } from "@dxos/react-ui-thread";
944
771
  import { createBasicExtensions, createThemeExtensions } from "@dxos/ui-editor";
945
772
  import { hoverableControlItem, hoverableControls, hoverableFocusedWithinControls, mx as mx7 } from "@dxos/ui-theme";
946
- var buttonGroupClassNames = "flex flex-row items-center gap-0.5 pie-2";
947
- var buttonClassNames = "!p-1 transition-opacity";
773
+ var buttonGroupClassNames = "flex flex-row items-center gap-0.5 pe-2";
774
+ var buttonClassNames = "p-1! transition-opacity";
948
775
  var MessageContainer = ({ message: messageOrRef, members, editable = false, onDelete, onAcceptProposal }) => {
949
- const { t } = useTranslation4(meta.id);
776
+ const { t } = useTranslation3(meta.id);
950
777
  const [message, updateMessage] = useObject(messageOrRef);
951
778
  const identity = useIdentity();
952
- const [editing, setEditing] = useState5(false);
779
+ const [editing, setEditing] = useState4(false);
953
780
  const textBlockIndex = message?.blocks.findIndex((block) => block._tag === "text") ?? -1;
954
781
  const handleEdit = useCallback2(() => setEditing((editing2) => !editing2), []);
955
782
  const handleDelete = useCallback2(() => message && onDelete?.(message.id), [
@@ -981,19 +808,19 @@ var MessageContainer = ({ message: messageOrRef, members, editable = false, onDe
981
808
  const userIsAuthor = identity?.did === messageMetadata.authorId;
982
809
  const proposalBlock = message.blocks.find((block) => block._tag === "proposal");
983
810
  const references = message.blocks.filter((block) => block._tag === "reference").map((block) => block.reference);
984
- return /* @__PURE__ */ React11.createElement(MessageRoot, {
811
+ return /* @__PURE__ */ React10.createElement(MessageRoot, {
985
812
  ...messageMetadata,
986
813
  classNames: [
987
814
  hoverableControls,
988
815
  hoverableFocusedWithinControls
989
816
  ]
990
- }, /* @__PURE__ */ React11.createElement(MessageHeading, {
817
+ }, /* @__PURE__ */ React10.createElement(MessageHeading, {
991
818
  authorName: messageMetadata.authorName,
992
819
  timestamp: messageMetadata.timestamp
993
- }, /* @__PURE__ */ React11.createElement("div", {
820
+ }, /* @__PURE__ */ React10.createElement("div", {
994
821
  role: "none",
995
822
  className: buttonGroupClassNames
996
- }, userIsAuthor && editable && /* @__PURE__ */ React11.createElement(IconButton4, {
823
+ }, userIsAuthor && editable && /* @__PURE__ */ React10.createElement(IconButton3, {
997
824
  "data-testid": editing ? "thread.message.save" : "thread.message.edit",
998
825
  variant: "ghost",
999
826
  icon: editing ? "ph--check--regular" : "ph--pencil-simple--regular",
@@ -1004,7 +831,7 @@ var MessageContainer = ({ message: messageOrRef, members, editable = false, onDe
1004
831
  hoverableControlItem
1005
832
  ],
1006
833
  onClick: handleEdit
1007
- }), proposalBlock && onAcceptProposal && /* @__PURE__ */ React11.createElement(IconButton4, {
834
+ }), proposalBlock && onAcceptProposal && /* @__PURE__ */ React10.createElement(IconButton3, {
1008
835
  "data-testid": "thread.message.accept",
1009
836
  variant: "ghost",
1010
837
  icon: "ph--check--regular",
@@ -1015,7 +842,7 @@ var MessageContainer = ({ message: messageOrRef, members, editable = false, onDe
1015
842
  hoverableControlItem
1016
843
  ],
1017
844
  onClick: handleAcceptProposal
1018
- }), onDelete && /* @__PURE__ */ React11.createElement(IconButton4, {
845
+ }), onDelete && /* @__PURE__ */ React10.createElement(IconButton3, {
1019
846
  "data-testid": "thread.message.delete",
1020
847
  variant: "ghost",
1021
848
  icon: "ph--x--regular",
@@ -1026,20 +853,20 @@ var MessageContainer = ({ message: messageOrRef, members, editable = false, onDe
1026
853
  hoverableControlItem
1027
854
  ],
1028
855
  onClick: handleDelete
1029
- }))), textBlock && /* @__PURE__ */ React11.createElement(TextboxBlock, {
856
+ }))), textBlock && /* @__PURE__ */ React10.createElement(TextboxBlock, {
1030
857
  block: textBlock,
1031
858
  isAuthor: userIsAuthor,
1032
859
  editing,
1033
860
  onSave: handleTextBlockChange
1034
- }), proposalBlock && /* @__PURE__ */ React11.createElement(ProposalBlock, {
861
+ }), proposalBlock && /* @__PURE__ */ React10.createElement(ProposalBlock, {
1035
862
  block: proposalBlock
1036
- }), Ref.Array.targets(references).map((reference, index) => /* @__PURE__ */ React11.createElement(MessagePart, {
863
+ }), Ref.Array.targets(references).map((reference, index) => /* @__PURE__ */ React10.createElement(MessagePart, {
1037
864
  key: index,
1038
865
  part: reference
1039
866
  })));
1040
867
  };
1041
868
  var MessagePart = ({ part }) => {
1042
- return /* @__PURE__ */ React11.createElement(MessageBlockObjectTile, {
869
+ return /* @__PURE__ */ React10.createElement(MessageBlockObjectTile, {
1043
870
  subject: part
1044
871
  });
1045
872
  };
@@ -1078,23 +905,23 @@ var TextboxBlock = ({ block, isAuthor, editing, onSave }) => {
1078
905
  themeMode,
1079
906
  handleDocumentChange
1080
907
  ]);
1081
- useEffect7(() => {
908
+ useEffect6(() => {
1082
909
  editing && view?.focus();
1083
910
  }, [
1084
911
  editing,
1085
912
  view
1086
913
  ]);
1087
- return /* @__PURE__ */ React11.createElement("div", {
914
+ return /* @__PURE__ */ React10.createElement("div", {
1088
915
  role: "none",
1089
916
  ref: parentRef,
1090
- className: "mie-4",
917
+ className: "me-4",
1091
918
  ...focusAttributes
1092
919
  });
1093
920
  };
1094
921
  var ProposalBlock = ({ block }) => {
1095
- return /* @__PURE__ */ React11.createElement("div", {
922
+ return /* @__PURE__ */ React10.createElement("div", {
1096
923
  role: "none",
1097
- className: "mie-4 italic"
924
+ className: "me-4 italic"
1098
925
  }, block.text);
1099
926
  };
1100
927
  var MessageBlockObjectTile = /* @__PURE__ */ forwardRef2(({ subject }, forwardedRef) => {
@@ -1102,11 +929,11 @@ var MessageBlockObjectTile = /* @__PURE__ */ forwardRef2(({ subject }, forwarded
1102
929
  if (typeof title !== "string") {
1103
930
  title = title?.content ?? "";
1104
931
  }
1105
- return /* @__PURE__ */ React11.createElement(Card.Root, {
1106
- className: mx7("grid col-span-3 plb-1 pr-4", hoverableControls, hoverableFocusedWithinControls),
932
+ return /* @__PURE__ */ React10.createElement(Card.Root, {
933
+ className: mx7("grid col-span-3 py-1 pr-4", hoverableControls, hoverableFocusedWithinControls),
1107
934
  ref: forwardedRef
1108
- }, /* @__PURE__ */ React11.createElement(Surface.Surface, {
1109
- role: "card-content",
935
+ }, /* @__PURE__ */ React10.createElement(Surface.Surface, {
936
+ role: "card--content",
1110
937
  limit: 1,
1111
938
  data: {
1112
939
  subject
@@ -1115,21 +942,22 @@ var MessageBlockObjectTile = /* @__PURE__ */ forwardRef2(({ subject }, forwarded
1115
942
  }));
1116
943
  });
1117
944
 
1118
- // src/components/ChatContainer.tsx
1119
- var ChatContainer = ({ classNames, space, thread, context, current, autoFocusTextbox }) => {
1120
- const { t } = useTranslation5(meta.id);
1121
- const id = Obj2.getDXN(thread).toString();
945
+ // src/components/CommentsThreadContainer.tsx
946
+ var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve, onMessageDelete, onThreadDelete, onAcceptProposal }) => {
947
+ const { themeMode } = useThemeContext2();
948
+ const { t } = useTranslation4(meta.id);
1122
949
  const identity = useIdentity2();
950
+ const space = getSpace(anchor);
1123
951
  const members = useMembers(space?.id);
1124
- const activity = useStatus(space, id);
1125
- const [_count, _setCount] = useState6(0);
1126
- const rerenderEditor = () => _setCount((count) => count + 1);
1127
- const [autoFocus, setAutoFocus] = useState6(autoFocusTextbox);
952
+ const detached = !anchor.anchor;
953
+ const thread = Relation.getSource(anchor);
954
+ const [messages] = useObject2(thread, "messages");
955
+ const activity = useStatus(space, Obj2.getDXN(thread).toString());
1128
956
  const threadScrollRef = useRef4(null);
1129
- const { themeMode } = useThemeContext2();
1130
- const textboxMetadata = getMessageMetadata(id, identity);
957
+ const textboxMetadata = getMessageMetadata(Obj2.getDXN(thread).toString(), identity);
958
+ const [state, setState] = useState5({});
1131
959
  const messageRef = useRef4("");
1132
- const extensions = useMemo5(() => [
960
+ const extensions = useMemo4(() => [
1133
961
  createBasicExtensions2({
1134
962
  placeholder: t("message placeholder")
1135
963
  }),
@@ -1140,342 +968,6 @@ var ChatContainer = ({ classNames, space, thread, context, current, autoFocusTex
1140
968
  onChange: ({ text }) => messageRef.current = text
1141
969
  }),
1142
970
  command
1143
- ], [
1144
- themeMode,
1145
- _count
1146
- ]);
1147
- const scrollToEnd = (behavior) => setTimeout(() => threadScrollRef.current?.scrollIntoView({
1148
- behavior,
1149
- block: "end"
1150
- }), 10);
1151
- useLayoutEffect2(() => {
1152
- scrollToEnd("instant");
1153
- }, []);
1154
- const handleCreate = () => {
1155
- if (!messageRef.current?.length) {
1156
- return false;
1157
- }
1158
- Obj2.change(thread, (t2) => {
1159
- t2.messages.push(Ref2.make(Obj2.make(Message.Message, {
1160
- created: (/* @__PURE__ */ new Date()).toISOString(),
1161
- sender: {
1162
- identityDid: identity.did
1163
- },
1164
- blocks: [
1165
- {
1166
- _tag: "text",
1167
- text: messageRef.current
1168
- }
1169
- ],
1170
- properties: context ? {
1171
- context: Ref2.make(context)
1172
- } : void 0
1173
- })));
1174
- });
1175
- messageRef.current = "";
1176
- setAutoFocus(true);
1177
- scrollToEnd("smooth");
1178
- rerenderEditor();
1179
- return true;
1180
- };
1181
- return /* @__PURE__ */ React12.createElement(ThreadComponent.Root, {
1182
- current,
1183
- id,
1184
- classNames: [
1185
- "bs-full grid-rows-[1fr_min-content_min-content] overflow-hidden",
1186
- "transition-[padding-block-end] [[data-sidebar-inline-start-state=open]_&]:lg:pbe-0",
1187
- classNames
1188
- ]
1189
- }, /* @__PURE__ */ React12.createElement(ScrollArea.Root, {
1190
- orientation: "vertical"
1191
- }, /* @__PURE__ */ React12.createElement(ScrollArea.Viewport, {
1192
- classNames: "col-span-2"
1193
- }, /* @__PURE__ */ React12.createElement("div", {
1194
- role: "none",
1195
- className: mx8(threadLayout, "place-self-end")
1196
- }, thread.messages.map((message) => message.target).filter(isNonNullable).map((message) => /* @__PURE__ */ React12.createElement(MessageContainer, {
1197
- key: message.id,
1198
- message,
1199
- members
1200
- }))), /* @__PURE__ */ React12.createElement("div", {
1201
- role: "none",
1202
- className: "bs-px -mbs-px",
1203
- ref: threadScrollRef
1204
- }))), /* @__PURE__ */ React12.createElement(MessageTextbox, {
1205
- extensions,
1206
- autoFocus,
1207
- onSend: handleCreate,
1208
- ...textboxMetadata
1209
- }), /* @__PURE__ */ React12.createElement(ThreadComponent.Status, {
1210
- activity
1211
- }, t("activity message")));
1212
- };
1213
- var ChatContainer_default = ChatContainer;
1214
-
1215
- // src/components/ChannelContainer.tsx
1216
- import { Atom, useAtomValue as useAtomValue4 } from "@effect-atom/atom-react";
1217
- import React13, { useCallback as useCallback3, useEffect as useEffect8, useMemo as useMemo6, useState as useState7 } from "react";
1218
- import { useCapabilities, useCapability as useCapability4 } from "@dxos/app-framework/ui";
1219
- import { Context } from "@dxos/context";
1220
- import { failUndefined } from "@dxos/debug";
1221
- import { Obj as Obj3 } from "@dxos/echo";
1222
- import { log as log2 } from "@dxos/log";
1223
- import { useClient } from "@dxos/react-client";
1224
- import { getSpace } from "@dxos/react-client/echo";
1225
- import { useIdentity as useIdentity3 } from "@dxos/react-client/halo";
1226
- import { ElevationProvider, Input as Input2, useTranslation as useTranslation6 } from "@dxos/react-ui";
1227
- import { Settings } from "@dxos/react-ui-form";
1228
- import { MenuProvider, ToolbarMenu, createMenuAction, createMenuItemGroup, useMenuActions } from "@dxos/react-ui-menu";
1229
- import { useSoundEffect } from "@dxos/react-ui-sfx";
1230
- import { StackItem as StackItem2 } from "@dxos/react-ui-stack";
1231
- var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-thread/src/components/ChannelContainer.tsx";
1232
- var ChannelContainer = ({ role, subject: channel, roomId: roomIdProp, fullscreen }) => {
1233
- const space = getSpace(channel);
1234
- const callManager = useCapability4(ThreadCapabilities.CallManager);
1235
- const joined = useAtomValue4(callManager.joinedAtom);
1236
- const currentRoomId = useAtomValue4(callManager.roomIdAtom);
1237
- const attendableId = channel ? Obj3.getDXN(channel).toString() : void 0;
1238
- const roomId = roomIdProp ?? attendableId ?? failUndefined();
1239
- const identity = useIdentity3();
1240
- const isNamed = !!identity?.profile?.displayName;
1241
- const joinSound = useSoundEffect("JoinCall");
1242
- const leaveSound = useSoundEffect("LeaveCall");
1243
- const extensions = useCapabilities(ThreadCapabilities.CallExtension);
1244
- useEffect8(() => {
1245
- const ctx = new Context(void 0, {
1246
- F: __dxlog_file3,
1247
- L: 56
1248
- });
1249
- callManager.left.on(ctx, (roomId2) => {
1250
- extensions.forEach((extension) => {
1251
- void extension.onLeave?.(roomId2);
1252
- });
1253
- });
1254
- callManager.callStateUpdated.on(ctx, (state) => {
1255
- extensions.forEach((extension) => {
1256
- void extension.onCallStateUpdated?.(state);
1257
- });
1258
- });
1259
- callManager.mediaStateUpdated.on(ctx, (state) => {
1260
- extensions.forEach((extension) => {
1261
- void extension.onMediaStateUpdated?.(state);
1262
- });
1263
- });
1264
- return () => {
1265
- void ctx.dispose();
1266
- };
1267
- }, [
1268
- callManager,
1269
- extensions
1270
- ]);
1271
- const handleJoin = useCallback3(async () => {
1272
- if (!roomId || !channel) {
1273
- return;
1274
- }
1275
- if (joined) {
1276
- await callManager.leave();
1277
- }
1278
- try {
1279
- void joinSound.play();
1280
- callManager.setRoomId(roomId);
1281
- await callManager.join();
1282
- await Promise.all(extensions.map((extension) => extension.onJoin?.({
1283
- channel,
1284
- roomId
1285
- })));
1286
- } catch (err) {
1287
- log2.catch(err, void 0, {
1288
- F: __dxlog_file3,
1289
- L: 100,
1290
- S: void 0,
1291
- C: (f, a) => f(...a)
1292
- });
1293
- }
1294
- }, [
1295
- extensions,
1296
- channel,
1297
- roomId,
1298
- joined
1299
- ]);
1300
- const handleLeave = useCallback3(async () => {
1301
- try {
1302
- void leaveSound.play();
1303
- } catch (err) {
1304
- log2.catch(err, void 0, {
1305
- F: __dxlog_file3,
1306
- L: 112,
1307
- S: void 0,
1308
- C: (f, a) => f(...a)
1309
- });
1310
- } finally {
1311
- void callManager.turnAudioOff();
1312
- void callManager.turnVideoOff();
1313
- void callManager.turnScreenshareOff();
1314
- void callManager.leave();
1315
- }
1316
- }, [
1317
- extensions,
1318
- roomId
1319
- ]);
1320
- const isJoined = joined && currentRoomId === roomId;
1321
- return /* @__PURE__ */ React13.createElement(StackItem2.Content, {
1322
- classNames: isJoined && "bs-full",
1323
- toolbar: !isJoined
1324
- }, isJoined && !isNamed && /* @__PURE__ */ React13.createElement(DisplayNameMissing, null), isJoined && isNamed && /* @__PURE__ */ React13.createElement(Call.Root, null, /* @__PURE__ */ React13.createElement(Call.Grid, {
1325
- fullscreen
1326
- }), /* @__PURE__ */ React13.createElement(Call.Toolbar, {
1327
- channel,
1328
- onLeave: handleLeave
1329
- })), !isJoined && channel && channel.defaultThread.target && space && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(ChannelToolbar, {
1330
- attendableId,
1331
- role,
1332
- onJoinCall: handleJoin
1333
- }), /* @__PURE__ */ React13.createElement(ChatContainer_default, {
1334
- space,
1335
- thread: channel.defaultThread.target,
1336
- classNames: "container-max-width"
1337
- })));
1338
- };
1339
- var DisplayNameMissing = () => {
1340
- const { t } = useTranslation6(meta.id);
1341
- const client = useClient();
1342
- const [displayName, setDisplayName] = useState7("");
1343
- const handleChange = useCallback3((event) => setDisplayName(event.target.value), []);
1344
- const handleSave = useCallback3(() => client.halo.updateProfile({
1345
- displayName
1346
- }), [
1347
- client,
1348
- displayName
1349
- ]);
1350
- return /* @__PURE__ */ React13.createElement(Settings.Group, {
1351
- classNames: "p-4 place-content-center"
1352
- }, /* @__PURE__ */ React13.createElement(Settings.ItemInput, {
1353
- title: t("display name label"),
1354
- description: t("display name description")
1355
- }, /* @__PURE__ */ React13.createElement(Input2.TextInput, {
1356
- value: displayName,
1357
- onChange: handleChange,
1358
- placeholder: t("display name input placeholder"),
1359
- classNames: "md:min-is-64"
1360
- })), /* @__PURE__ */ React13.createElement(Settings.GroupButton, {
1361
- disabled: !displayName,
1362
- onClick: handleSave
1363
- }, t("set display name label")));
1364
- };
1365
- var useChannelToolbarActions = (onJoinCall) => {
1366
- const creator = useMemo6(() => Atom.make(() => {
1367
- return {
1368
- nodes: [
1369
- createMenuItemGroup("root", {
1370
- label: [
1371
- "channel toolbar title",
1372
- {
1373
- ns: meta.id
1374
- }
1375
- ]
1376
- }),
1377
- createMenuAction("video-call", () => onJoinCall?.(), {
1378
- label: [
1379
- "start video call label",
1380
- {
1381
- ns: meta.id
1382
- }
1383
- ],
1384
- icon: "ph--video-camera--regular",
1385
- type: "video-call"
1386
- })
1387
- ],
1388
- edges: [
1389
- {
1390
- source: "root",
1391
- target: "video-call"
1392
- }
1393
- ]
1394
- };
1395
- }), []);
1396
- return useMenuActions(creator);
1397
- };
1398
- var ChannelToolbar = ({ attendableId, role, onJoinCall }) => {
1399
- const menuProps = useChannelToolbarActions(onJoinCall);
1400
- return /* @__PURE__ */ React13.createElement(ElevationProvider, {
1401
- elevation: role === "section" ? "positioned" : "base"
1402
- }, /* @__PURE__ */ React13.createElement(MenuProvider, {
1403
- ...menuProps,
1404
- attendableId
1405
- }, /* @__PURE__ */ React13.createElement(ToolbarMenu, {
1406
- textBlockWidth: true
1407
- })));
1408
- };
1409
-
1410
- // src/components/CallSidebar.tsx
1411
- import { useAtomValue as useAtomValue5 } from "@effect-atom/atom-react";
1412
- import React14 from "react";
1413
- import { useCapability as useCapability5 } from "@dxos/app-framework/ui";
1414
- var CallSidebar = () => {
1415
- const call = useCapability5(ThreadCapabilities.CallManager);
1416
- const roomId = useAtomValue5(call.roomIdAtom);
1417
- return /* @__PURE__ */ React14.createElement(ChannelContainer, {
1418
- subject: void 0,
1419
- roomId
1420
- });
1421
- };
1422
-
1423
- // src/components/ThreadCompanion.tsx
1424
- import { useAtomValue as useAtomValue6 } from "@effect-atom/atom-react";
1425
- import React18, { useCallback as useCallback5, useMemo as useMemo8 } from "react";
1426
- import { Capabilities } from "@dxos/app-framework";
1427
- import { useCapabilities as useCapabilities2, useCapability as useCapability6, useOperationInvoker } from "@dxos/app-framework/ui";
1428
- import { AppCapabilities, CollaborationOperation, LayoutOperation } from "@dxos/app-toolkit";
1429
- import { Filter, Obj as Obj6, Query, Relation as Relation3 } from "@dxos/echo";
1430
- import { Ref as Ref3, useQuery } from "@dxos/react-client/echo";
1431
- import { useIdentity as useIdentity5 } from "@dxos/react-client/halo";
1432
- import { useTranslation as useTranslation10 } from "@dxos/react-ui";
1433
- import { Layout } from "@dxos/react-ui";
1434
- import { useAttended } from "@dxos/react-ui-attention";
1435
- import { Tabs } from "@dxos/react-ui-tabs";
1436
- import { AnchoredTo, Thread } from "@dxos/types";
1437
- import { mx as mx10 } from "@dxos/ui-theme";
1438
-
1439
- // src/components/CommentsContainer.tsx
1440
- import React16, { useEffect as useEffect9 } from "react";
1441
- import { Obj as Obj5, Relation as Relation2 } from "@dxos/echo";
1442
- import { Callout, Icon as Icon4, Trans, useTranslation as useTranslation8 } from "@dxos/react-ui";
1443
-
1444
- // src/components/CommentsThreadContainer.tsx
1445
- import React15, { useCallback as useCallback4, useMemo as useMemo7, useRef as useRef5, useState as useState8 } from "react";
1446
- import { Obj as Obj4, Relation } from "@dxos/echo";
1447
- import { useObject as useObject2 } from "@dxos/echo-react";
1448
- import { getSpace as getSpace2, useMembers as useMembers2 } from "@dxos/react-client/echo";
1449
- import { useIdentity as useIdentity4 } from "@dxos/react-client/halo";
1450
- import { IconButton as IconButton5, Tag, Tooltip, useThemeContext as useThemeContext3, useTranslation as useTranslation7 } from "@dxos/react-ui";
1451
- import { MessageTextbox as MessageTextbox2, Thread as ThreadComponent2 } from "@dxos/react-ui-thread";
1452
- import { createBasicExtensions as createBasicExtensions3, createThemeExtensions as createThemeExtensions3, listener as listener2 } from "@dxos/ui-editor";
1453
- import { hoverableControlItem as hoverableControlItem2, hoverableControls as hoverableControls2, hoverableFocusedWithinControls as hoverableFocusedWithinControls2, mx as mx9 } from "@dxos/ui-theme";
1454
- var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve, onMessageDelete, onThreadDelete, onAcceptProposal }) => {
1455
- const { themeMode } = useThemeContext3();
1456
- const { t } = useTranslation7(meta.id);
1457
- const identity = useIdentity4();
1458
- const space = getSpace2(anchor);
1459
- const members = useMembers2(space?.id);
1460
- const detached = !anchor.anchor;
1461
- const thread = Relation.getSource(anchor);
1462
- const [messages] = useObject2(thread, "messages");
1463
- const activity = useStatus(space, Obj4.getDXN(thread).toString());
1464
- const threadScrollRef = useRef5(null);
1465
- const textboxMetadata = getMessageMetadata(Obj4.getDXN(thread).toString(), identity);
1466
- const [state, setState] = useState8({});
1467
- const messageRef = useRef5("");
1468
- const extensions = useMemo7(() => [
1469
- createBasicExtensions3({
1470
- placeholder: t("message placeholder")
1471
- }),
1472
- createThemeExtensions3({
1473
- themeMode
1474
- }),
1475
- listener2({
1476
- onChange: ({ text }) => messageRef.current = text
1477
- }),
1478
- command
1479
971
  ], [
1480
972
  state
1481
973
  ]);
@@ -1483,27 +975,27 @@ var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve
1483
975
  behavior,
1484
976
  block: "end"
1485
977
  }), 10);
1486
- const handleAttend = useCallback4(() => onAttend?.(anchor), [
978
+ const handleAttend = useCallback3(() => onAttend?.(anchor), [
1487
979
  onAttend,
1488
980
  anchor
1489
981
  ]);
1490
- const handleResolve = useCallback4(() => onResolve?.(anchor), [
982
+ const handleResolve = useCallback3(() => onResolve?.(anchor), [
1491
983
  onResolve,
1492
984
  anchor
1493
985
  ]);
1494
- const handleMessageDelete = useCallback4((id) => onMessageDelete?.(anchor, id), [
986
+ const handleMessageDelete = useCallback3((id) => onMessageDelete?.(anchor, id), [
1495
987
  onMessageDelete,
1496
988
  anchor
1497
989
  ]);
1498
- const handleThreadDelete = useCallback4(() => onThreadDelete?.(anchor), [
990
+ const handleThreadDelete = useCallback3(() => onThreadDelete?.(anchor), [
1499
991
  onThreadDelete,
1500
992
  anchor
1501
993
  ]);
1502
- const handleAcceptProposal = useCallback4((id) => onAcceptProposal?.(anchor, id), [
994
+ const handleAcceptProposal = useCallback3((id) => onAcceptProposal?.(anchor, id), [
1503
995
  onAcceptProposal,
1504
996
  anchor
1505
997
  ]);
1506
- const handleComment = useCallback4(() => {
998
+ const handleComment = useCallback3(() => {
1507
999
  if (!messageRef.current) {
1508
1000
  return false;
1509
1001
  }
@@ -1516,27 +1008,27 @@ var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve
1516
1008
  anchor,
1517
1009
  identity
1518
1010
  ]);
1519
- return /* @__PURE__ */ React15.createElement(ThreadComponent2.Root, {
1520
- id: Obj4.getDXN(thread).toString(),
1521
- classNames: "pbs-2 border-be border-subduedSeparator last:border-none",
1011
+ return /* @__PURE__ */ React11.createElement(ThreadComponent.Root, {
1012
+ id: Obj2.getDXN(thread).toString(),
1013
+ classNames: "pt-2 border-b border-subdued-separator last:border-none",
1522
1014
  current,
1523
1015
  onClickCapture: handleAttend,
1524
1016
  onFocusCapture: handleAttend
1525
- }, /* @__PURE__ */ React15.createElement("div", {
1017
+ }, /* @__PURE__ */ React11.createElement("div", {
1526
1018
  role: "none",
1527
- className: mx9("col-span-2 grid grid-cols-[var(--rail-size)_1fr_min-content]", hoverableControls2, hoverableFocusedWithinControls2)
1528
- }, detached ? /* @__PURE__ */ React15.createElement(Tooltip.Trigger, {
1019
+ className: mx8("col-span-2 grid grid-cols-[var(--dx-rail-size)_1fr_min-content]", hoverableControls2, hoverableFocusedWithinControls2)
1020
+ }, detached ? /* @__PURE__ */ React11.createElement(Tooltip.Trigger, {
1529
1021
  asChild: true,
1530
1022
  content: t("detached thread label"),
1531
1023
  side: "top"
1532
- }, /* @__PURE__ */ React15.createElement(ThreadComponent2.Header, {
1024
+ }, /* @__PURE__ */ React11.createElement(ThreadComponent.Header, {
1533
1025
  detached: true
1534
- }, thread.name)) : /* @__PURE__ */ React15.createElement(ThreadComponent2.Header, null, thread.name), /* @__PURE__ */ React15.createElement("div", {
1026
+ }, thread.name)) : /* @__PURE__ */ React11.createElement(ThreadComponent.Header, null, thread.name), /* @__PURE__ */ React11.createElement("div", {
1535
1027
  role: "none",
1536
1028
  className: buttonGroupClassNames
1537
- }, thread.status === "staged" && /* @__PURE__ */ React15.createElement(Tag, {
1029
+ }, thread.status === "staged" && /* @__PURE__ */ React11.createElement(Tag, {
1538
1030
  palette: "neutral"
1539
- }, t("draft button")), onResolve && !(thread?.status === "staged") && /* @__PURE__ */ React15.createElement(IconButton5, {
1031
+ }, t("draft button")), onResolve && !(thread?.status === "staged") && /* @__PURE__ */ React11.createElement(IconButton4, {
1540
1032
  "data-testid": "thread.resolve",
1541
1033
  variant: "ghost",
1542
1034
  icon: thread?.status === "resolved" ? "ph--check--fill" : "ph--check--regular",
@@ -1547,7 +1039,7 @@ var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve
1547
1039
  thread?.status !== "resolved" && hoverableControlItem2
1548
1040
  ],
1549
1041
  onClick: handleResolve
1550
- }), onThreadDelete && /* @__PURE__ */ React15.createElement(IconButton5, {
1042
+ }), onThreadDelete && /* @__PURE__ */ React11.createElement(IconButton4, {
1551
1043
  "data-testid": "thread.delete",
1552
1044
  variant: "ghost",
1553
1045
  icon: "ph--x--regular",
@@ -1558,34 +1050,34 @@ var CommentsThreadContainer = ({ anchor, current, onAttend, onComment, onResolve
1558
1050
  hoverableControlItem2
1559
1051
  ],
1560
1052
  onClick: handleThreadDelete
1561
- }))), messages?.map((ref) => /* @__PURE__ */ React15.createElement(MessageContainer, {
1053
+ }))), messages?.map((ref) => /* @__PURE__ */ React11.createElement(MessageContainer, {
1562
1054
  key: ref.dxn.toString(),
1563
1055
  editable: true,
1564
1056
  message: ref,
1565
1057
  members,
1566
1058
  onDelete: handleMessageDelete,
1567
1059
  onAcceptProposal: handleAcceptProposal
1568
- })), /* @__PURE__ */ React15.createElement(MessageTextbox2, {
1060
+ })), /* @__PURE__ */ React11.createElement(MessageTextbox, {
1569
1061
  extensions,
1570
1062
  onSend: handleComment,
1571
1063
  ...textboxMetadata
1572
- }), /* @__PURE__ */ React15.createElement(ThreadComponent2.Status, {
1064
+ }), /* @__PURE__ */ React11.createElement(ThreadComponent.Status, {
1573
1065
  activity
1574
- }, t("activity message")), /* @__PURE__ */ React15.createElement("div", {
1066
+ }, t("activity message")), /* @__PURE__ */ React11.createElement("div", {
1575
1067
  role: "none",
1576
- className: "bs-px -mbs-px",
1068
+ className: "h-px -mt-px",
1577
1069
  ref: threadScrollRef
1578
1070
  }));
1579
1071
  };
1580
1072
 
1581
1073
  // src/components/CommentsContainer.tsx
1582
1074
  var CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...props }) => {
1583
- const { t } = useTranslation8(meta.id);
1075
+ const { t } = useTranslation5(meta.id);
1584
1076
  const filteredAnchors = showResolvedThreads ? anchors.filter((anchor) => !!Relation2.getSource(anchor)) : anchors.filter((anchor) => {
1585
1077
  const thread = Relation2.getSource(anchor);
1586
1078
  return thread && thread.status !== "resolved";
1587
1079
  });
1588
- useEffect9(() => {
1080
+ useEffect7(() => {
1589
1081
  if (currentId) {
1590
1082
  document.getElementById(currentId)?.scrollIntoView({
1591
1083
  behavior: "smooth",
@@ -1596,25 +1088,25 @@ var CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...props })
1596
1088
  currentId
1597
1089
  ]);
1598
1090
  if (filteredAnchors.length === 0) {
1599
- return /* @__PURE__ */ React16.createElement("div", {
1091
+ return /* @__PURE__ */ React12.createElement("div", {
1600
1092
  role: "none",
1601
- className: "plb-cardSpacingBlock pli-cardSpacingInline"
1602
- }, /* @__PURE__ */ React16.createElement(Callout.Root, null, /* @__PURE__ */ React16.createElement(Callout.Title, null, /* @__PURE__ */ React16.createElement(Trans, {
1093
+ className: "p-form-padding"
1094
+ }, /* @__PURE__ */ React12.createElement(Message.Root, null, /* @__PURE__ */ React12.createElement(Message.Title, null, /* @__PURE__ */ React12.createElement(Trans, {
1603
1095
  t,
1604
1096
  i18nKey: "no comments message",
1605
1097
  components: {
1606
- commentIcon: /* @__PURE__ */ React16.createElement(Icon4, {
1098
+ commentIcon: /* @__PURE__ */ React12.createElement(Icon3, {
1607
1099
  icon: "ph--chat-text--regular",
1608
1100
  size: 4,
1609
- classNames: "inline-block"
1101
+ classNames: "w-block"
1610
1102
  })
1611
1103
  }
1612
1104
  }))));
1613
1105
  }
1614
- return /* @__PURE__ */ React16.createElement("div", null, filteredAnchors.map((anchor) => {
1106
+ return /* @__PURE__ */ React12.createElement("div", null, filteredAnchors.map((anchor) => {
1615
1107
  const thread = Relation2.getSource(anchor);
1616
- const threadId = Obj5.getDXN(thread).toString();
1617
- return /* @__PURE__ */ React16.createElement(CommentsThreadContainer, {
1108
+ const threadId = Obj3.getDXN(thread).toString();
1109
+ return /* @__PURE__ */ React12.createElement(CommentsThreadContainer, {
1618
1110
  key: threadId,
1619
1111
  anchor,
1620
1112
  current: currentId === threadId,
@@ -1623,196 +1115,10 @@ var CommentsContainer = ({ anchors, currentId, showResolvedThreads, ...props })
1623
1115
  }));
1624
1116
  };
1625
1117
 
1626
- // src/components/ThreadSettings.tsx
1627
- import React17 from "react";
1628
- import { useTranslation as useTranslation9 } from "@dxos/react-ui";
1629
- import { Settings as Settings2 } from "@dxos/react-ui-form";
1630
- var ThreadSettings = ({ settings: _settings }) => {
1631
- const { t: _t } = useTranslation9(meta.id);
1632
- return /* @__PURE__ */ React17.createElement(Settings2.Root, null);
1633
- };
1634
-
1635
- // src/components/ThreadCompanion.tsx
1636
- var initialViewState = {
1637
- showResolvedThreads: false
1638
- };
1639
- var ThreadCompanion = ({ subject }) => {
1640
- const { t } = useTranslation10(meta.id);
1641
- const { invokePromise } = useOperationInvoker();
1642
- const identity = useIdentity5();
1643
- const subjectId = Obj6.getDXN(subject).toString();
1644
- const registry = useCapability6(Capabilities.AtomRegistry);
1645
- const stateAtom = useCapability6(ThreadCapabilities.State);
1646
- const viewStoreAtom = useCapability6(ThreadCapabilities.ViewState);
1647
- const state = useAtomValue6(stateAtom);
1648
- const viewStore = useAtomValue6(viewStoreAtom);
1649
- const drafts = state.drafts[subjectId];
1650
- const viewState = useMemo8(() => {
1651
- if (!viewStore[subjectId]) {
1652
- registry.set(viewStoreAtom, {
1653
- ...viewStore,
1654
- [subjectId]: {
1655
- ...initialViewState
1656
- }
1657
- });
1658
- return initialViewState;
1659
- }
1660
- return viewStore[subjectId];
1661
- }, [
1662
- viewStore,
1663
- subjectId,
1664
- registry,
1665
- viewStoreAtom
1666
- ]);
1667
- const { showResolvedThreads } = viewState;
1668
- const onChangeViewState = useCallback5((nextValue) => {
1669
- registry.set(viewStoreAtom, {
1670
- ...registry.get(viewStoreAtom),
1671
- [subjectId]: {
1672
- ...registry.get(viewStoreAtom)[subjectId],
1673
- showResolvedThreads: nextValue === "all"
1674
- }
1675
- });
1676
- }, [
1677
- registry,
1678
- viewStoreAtom,
1679
- subjectId
1680
- ]);
1681
- const anchorSorts = useCapabilities2(AppCapabilities.AnchorSort);
1682
- const sort = useMemo8(() => anchorSorts.find(({ key }) => key === Obj6.getTypename(subject))?.sort, [
1683
- anchorSorts,
1684
- subject
1685
- ]);
1686
- const db = Obj6.getDatabase(subject);
1687
- const objectsAnchoredTo = useQuery(db, Query.select(Filter.id(subject.id)).targetOf(AnchoredTo.AnchoredTo));
1688
- const anchors = objectsAnchoredTo.toSorted((a, b) => sort?.(a, b) ?? 0).filter((anchor) => Obj6.instanceOf(Thread.Thread, Relation3.getSource(anchor))).concat(drafts ?? []);
1689
- const attended = useAttended();
1690
- const handleAttend = useCallback5((anchor) => {
1691
- const thread = Relation3.getSource(anchor);
1692
- const threadId = Obj6.getDXN(thread).toString();
1693
- if (state.current !== threadId) {
1694
- registry.set(stateAtom, {
1695
- ...registry.get(stateAtom),
1696
- current: threadId
1697
- });
1698
- void invokePromise(LayoutOperation.ScrollIntoView, {
1699
- subject: Obj6.getDXN(subject).toString(),
1700
- cursor: anchor.anchor,
1701
- ref: threadId
1702
- });
1703
- }
1704
- }, [
1705
- state.current,
1706
- invokePromise,
1707
- subject,
1708
- registry,
1709
- stateAtom
1710
- ]);
1711
- const handleComment = useCallback5(async (anchor, text) => {
1712
- await invokePromise(ThreadOperation.AddMessage, {
1713
- anchor,
1714
- subject,
1715
- sender: {
1716
- identityDid: identity?.did
1717
- },
1718
- text
1719
- });
1720
- const thread = Relation3.getSource(anchor);
1721
- registry.set(stateAtom, {
1722
- ...registry.get(stateAtom),
1723
- current: Obj6.getDXN(thread).toString()
1724
- });
1725
- }, [
1726
- invokePromise,
1727
- identity,
1728
- subject,
1729
- registry,
1730
- stateAtom
1731
- ]);
1732
- const handleResolve = useCallback5((anchor) => invokePromise(ThreadOperation.ToggleResolved, {
1733
- thread: Relation3.getSource(anchor)
1734
- }), [
1735
- invokePromise
1736
- ]);
1737
- const handleThreadDelete = useCallback5((anchor) => invokePromise(ThreadOperation.Delete, {
1738
- anchor,
1739
- subject
1740
- }), [
1741
- invokePromise,
1742
- subject
1743
- ]);
1744
- const handleMessageDelete = useCallback5((anchor, messageId) => invokePromise(ThreadOperation.DeleteMessage, {
1745
- anchor,
1746
- subject,
1747
- messageId
1748
- }), [
1749
- invokePromise,
1750
- subject
1751
- ]);
1752
- const handleAcceptProposal = useCallback5(async (anchor, messageId) => {
1753
- const thread = Relation3.getSource(anchor);
1754
- const messageIndex = thread.messages.findIndex(Ref3.hasObjectId(messageId));
1755
- const message = thread.messages[messageIndex]?.target;
1756
- const proposal = message?.blocks.find((block) => block._tag === "proposal");
1757
- if (!proposal || !anchor.anchor) {
1758
- return;
1759
- }
1760
- await invokePromise(CollaborationOperation.AcceptProposal, {
1761
- subject,
1762
- anchor: anchor.anchor,
1763
- proposal
1764
- });
1765
- await invokePromise(ThreadOperation.ToggleResolved, {
1766
- thread
1767
- });
1768
- }, [
1769
- invokePromise,
1770
- subject
1771
- ]);
1772
- const comments = /* @__PURE__ */ React18.createElement(CommentsContainer, {
1773
- anchors,
1774
- currentId: attended.includes(subjectId) ? state.current : void 0,
1775
- showResolvedThreads,
1776
- onAttend: handleAttend,
1777
- onComment: handleComment,
1778
- onResolve: handleResolve,
1779
- onMessageDelete: handleMessageDelete,
1780
- onThreadDelete: handleThreadDelete,
1781
- onAcceptProposal: handleAcceptProposal
1782
- });
1783
- return /* @__PURE__ */ React18.createElement(Layout.Main, {
1784
- toolbar: true
1785
- }, /* @__PURE__ */ React18.createElement(Tabs.Root, {
1786
- value: showResolvedThreads ? "all" : "unresolved",
1787
- orientation: "horizontal",
1788
- classNames: [
1789
- 'contents [&_[role="tabpanel"]]:min-bs-0 [&_[role="tabpanel"]]:overflow-y-auto [&_[role="tabpanel"]]:scrollbar-thin'
1790
- ],
1791
- onValueChange: onChangeViewState
1792
- }, /* @__PURE__ */ React18.createElement(Tabs.Tablist, {
1793
- classNames: mx10("bg-toolbarSurface border-be border-subduedSeparator")
1794
- }, /* @__PURE__ */ React18.createElement(Tabs.Tab, {
1795
- value: "unresolved",
1796
- classNames: "text-sm"
1797
- }, t("show unresolved label")), /* @__PURE__ */ React18.createElement(Tabs.Tab, {
1798
- value: "all",
1799
- classNames: "text-sm"
1800
- }, t("show all label"))), /* @__PURE__ */ React18.createElement("div", {
1801
- className: "overflow-y-auto"
1802
- }, /* @__PURE__ */ React18.createElement(Tabs.Tabpanel, {
1803
- value: "all"
1804
- }, showResolvedThreads && comments), /* @__PURE__ */ React18.createElement(Tabs.Tabpanel, {
1805
- value: "unresolved"
1806
- }, !showResolvedThreads && comments))));
1807
- };
1808
-
1809
1118
  export {
1810
1119
  Call,
1811
- CallDebugPanel,
1812
- ChatContainer,
1813
- ChannelContainer,
1814
- CallSidebar,
1815
- ThreadCompanion,
1816
- ThreadSettings
1120
+ command,
1121
+ MessageContainer,
1122
+ CommentsContainer
1817
1123
  };
1818
- //# sourceMappingURL=chunk-RBRWHRHE.mjs.map
1124
+ //# sourceMappingURL=chunk-IQUV7DR6.mjs.map