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