collabmd 0.1.23 → 0.1.26

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 (681) hide show
  1. package/README.md +8 -5
  2. package/dist/client/assets/CodeMirrorEditor-UCMRAMCV-C5yVpm45.js +1 -0
  3. package/dist/client/assets/_basePickBy-Dr0N-hVE.js +1 -0
  4. package/dist/client/assets/_baseUniq-BddJc3B1.js +1 -0
  5. package/dist/client/assets/apl-CJPt5sW7.js +1 -0
  6. package/dist/client/assets/ar-SA-NXDWD63E-C3GLfrYV.js +8 -0
  7. package/dist/client/assets/arc-fx_D7wYg.js +1 -0
  8. package/dist/client/assets/architecture-PBZL5I3N-C1Yv7agI.js +1 -0
  9. package/dist/client/assets/architectureDiagram-2XIMDMQ5-T__yxKk2.js +36 -0
  10. package/dist/client/assets/array-e43ctQmx.js +1 -0
  11. package/dist/client/assets/asciiarmor-D0oCypDs.js +1 -0
  12. package/dist/client/assets/asn1-8xgVfRoq.js +1 -0
  13. package/dist/client/assets/asterisk-B5kv5AQp.js +1 -0
  14. package/dist/client/assets/az-AZ-MXSORGZV-BJ2t-y-C.js +1 -0
  15. package/dist/client/assets/bg-BG-O6MV2KSF-Cd3kEZI-.js +5 -0
  16. package/dist/client/assets/blockDiagram-WCTKOSBZ-BivLpsk_.js +132 -0
  17. package/dist/client/assets/bn-BD-T2VJNT7N-BFCx9nbZ.js +3 -0
  18. package/dist/client/assets/bn-IN-MMW2ORAC-Dn9W9dUT.js +3 -0
  19. package/dist/client/assets/brainfuck-Dh7M1Ucz.js +1 -0
  20. package/dist/client/assets/c4Diagram-IC4MRINW-nVzPTZmV.js +10 -0
  21. package/dist/client/assets/ca-ES-MKBCGNOG-D_BNlrmg.js +8 -0
  22. package/dist/client/assets/channel-DBZin7O0.js +1 -0
  23. package/dist/client/assets/chunk-27N2SPOM-CyIruM79.js +34 -0
  24. package/dist/client/assets/chunk-3PELD44J-D4qJ8fq7.js +1 -0
  25. package/dist/client/assets/chunk-4BX2VUAB-n_yl-toC.js +1 -0
  26. package/dist/client/assets/chunk-55IACEB6-CJ9i_5Da.js +1 -0
  27. package/dist/client/assets/chunk-7E7YKBS2-CebEBDsj.js +1 -0
  28. package/dist/client/assets/chunk-7R4GIKGN-BXNhzFkP.js +80 -0
  29. package/{public/assets/js/chunks/chunk-IR2DOYV4.js → dist/client/assets/chunk-A66AFZZU-CJuwmF1m.js} +2 -2
  30. package/dist/client/assets/chunk-C72U2L5F-Cck8MvGP.js +1 -0
  31. package/dist/client/assets/chunk-D-fkvfCP.js +1 -0
  32. package/dist/client/assets/chunk-EGIJ26TM-BDQ7tRV-.js +1 -0
  33. package/dist/client/assets/chunk-ETSVUAFD-C8C1JDu2.js +12 -0
  34. package/{public/assets/js/chunks/chunk-U6APNHAF.js → dist/client/assets/chunk-FMBD7UC4-DAcjCJR-.js} +2 -2
  35. package/dist/client/assets/chunk-GEFDOKGD-CYSNVsp-.js +2 -0
  36. package/dist/client/assets/chunk-GLR3WWYH-FplqAopN.js +2 -0
  37. package/dist/client/assets/chunk-HHEYEP7N-Bv_FKHmu.js +1 -0
  38. package/dist/client/assets/chunk-JSJVCQXG-CLgStmEI.js +1 -0
  39. package/dist/client/assets/chunk-KX2RTZJC-B__vUl1o.js +1 -0
  40. package/dist/client/assets/chunk-KYZI473N-BpfobHkp.js +53 -0
  41. package/dist/client/assets/chunk-L3YUKLVL-B7jdwbRL.js +1 -0
  42. package/dist/client/assets/chunk-MX3YWQON-DNcuP5dS.js +1 -0
  43. package/dist/client/assets/chunk-NQ4KR5QH-oaq5iS2W.js +220 -0
  44. package/dist/client/assets/chunk-O4XLMI2P-NI4OcSZ6.js +7 -0
  45. package/dist/client/assets/chunk-OZEHJAEY-BevHLeQ0.js +1 -0
  46. package/dist/client/assets/chunk-PQ6SQG4A-fQ_Oml5n.js +1 -0
  47. package/dist/client/assets/chunk-PU5JKC2W-Bp4H-mwZ.js +70 -0
  48. package/dist/client/assets/chunk-QZHKN3VN-Blawx8vd.js +1 -0
  49. package/dist/client/assets/chunk-R5LLSJPH-CZzZlfdI.js +1 -0
  50. package/dist/client/assets/chunk-SRAX5OIU-CtUYAya6.js +1 -0
  51. package/dist/client/assets/chunk-WL4C6EOR-DnV9nMco.js +189 -0
  52. package/dist/client/assets/chunk-XIRO2GV7-BnkmoLpc.js +1 -0
  53. package/dist/client/assets/chunk-XPW4576I-DOk6pMat.js +32 -0
  54. package/dist/client/assets/chunk-XZSTWKYB-DZzfqgVn.js +94 -0
  55. package/dist/client/assets/chunk-YBOYWFTD-CrI5WFnC.js +1 -0
  56. package/dist/client/assets/chunk-Z5NKEFVG-EGvolisB.js +22 -0
  57. package/dist/client/assets/classDiagram-VBA2DB6C-CreQafQu.js +1 -0
  58. package/dist/client/assets/classDiagram-v2-RAHNMMFH-BIYHzbiv.js +1 -0
  59. package/dist/client/assets/clike-zYz_LEkw.js +1 -0
  60. package/dist/client/assets/clojure-CdWlIeQh.js +1 -0
  61. package/dist/client/assets/clone-C3ajWNce.js +1 -0
  62. package/dist/client/assets/cmake-wWuF5ifR.js +1 -0
  63. package/dist/client/assets/cobol-D3WLbLVy.js +1 -0
  64. package/dist/client/assets/coffeescript-DRtt-5a2.js +1 -0
  65. package/dist/client/assets/commonlisp-DJV75lsU.js +1 -0
  66. package/dist/client/assets/cose-bilkent-S5V4N54A-PcMOD_rX.js +1 -0
  67. package/dist/client/assets/crystal-C7mEw92C.js +1 -0
  68. package/dist/client/assets/cs-CZ-V77HGUP7-gpioT6mv.js +7 -0
  69. package/dist/client/assets/css-_6KgQwpu.js +1 -0
  70. package/dist/client/assets/cypher-B3uWx7jm.js +1 -0
  71. package/dist/client/assets/cytoscape.esm-BbbuX1pV.js +321 -0
  72. package/dist/client/assets/d-D3kOh3JF.js +1 -0
  73. package/dist/client/assets/da-DK-I5RFNTM4-CVv-_qu9.js +2 -0
  74. package/dist/client/assets/dagre-BD9xHP_z.js +1 -0
  75. package/dist/client/assets/dagre-KLK3FWXG-Ct1xwvCC.js +4 -0
  76. package/dist/client/assets/de-CH-WLRDEVBV-CL0gsFEp.js +7 -0
  77. package/dist/client/assets/de-DE-DTI4WUSC-BQO1SHIK.js +7 -0
  78. package/dist/client/assets/defaultLocale-DTn6RiRA.js +1 -0
  79. package/dist/client/assets/diagram-E7M64L7V-DkHzt94k.js +24 -0
  80. package/dist/client/assets/diagram-IFDJBPK2-D4g8afpU.js +43 -0
  81. package/dist/client/assets/diagram-P4PSJMXO-DVwwx6ED.js +24 -0
  82. package/dist/client/assets/diff-CoamybWh.js +1 -0
  83. package/dist/client/assets/dist-2HWwyMLA.js +1 -0
  84. package/dist/client/assets/dist-60g3bzYH.js +11 -0
  85. package/dist/client/assets/dist-B2pRSR5A.js +23 -0
  86. package/dist/client/assets/dist-BQhICHxD.js +2 -0
  87. package/dist/client/assets/dist-BS6yAJ9F.js +1 -0
  88. package/dist/client/assets/dist-BUnp4fHW.js +1 -0
  89. package/dist/client/assets/dist-BWEDjv8G.js +1 -0
  90. package/dist/client/assets/dist-BZc5d15t.js +1 -0
  91. package/dist/client/assets/dist-BdtPRC1F.js +1 -0
  92. package/dist/client/assets/dist-BiFbHWxc.js +1 -0
  93. package/dist/client/assets/dist-BlhsMbAl.js +1 -0
  94. package/dist/client/assets/dist-CLsz2DCg.js +1 -0
  95. package/dist/client/assets/dist-Ciw3BJA2.js +1 -0
  96. package/dist/client/assets/dist-CvMToPSN.js +1 -0
  97. package/dist/client/assets/dist-D2m8lD1h.js +6 -0
  98. package/dist/client/assets/dist-DAwSRqIJ.js +1 -0
  99. package/dist/client/assets/dist-DZD5y4h6.js +1 -0
  100. package/dist/client/assets/dist-DhzldYic.js +9 -0
  101. package/dist/client/assets/dist-DrNF924C.js +1 -0
  102. package/dist/client/assets/dist-DzArd_Bk.js +1 -0
  103. package/dist/client/assets/dist-EPRNBXHp.js +1 -0
  104. package/dist/client/assets/dist-Q6uG0wie.js +1 -0
  105. package/dist/client/assets/dist-U9MIFRLF.js +1 -0
  106. package/dist/client/assets/dist-WrbPKwPQ.js +1 -0
  107. package/dist/client/assets/dist-_L_gn5XE.js +1 -0
  108. package/dist/client/assets/dist-a6bFAbQd.js +1 -0
  109. package/dist/client/assets/dist-fkQ6urpt.js +1 -0
  110. package/dist/client/assets/dist-lbtQBzLu.js +1 -0
  111. package/dist/client/assets/dist-naAaVPPS.js +1 -0
  112. package/dist/client/assets/dist-yRVuIDKu.js +13 -0
  113. package/dist/client/assets/dockerfile-Ci0-ApQC.js +1 -0
  114. package/dist/client/assets/drawio-editor-BW2z4NH2.js +9 -0
  115. package/dist/client/assets/drawio-room-D6352KkV.js +1 -0
  116. package/dist/client/assets/drawioEditor-DgoA4Zqi.js +2 -0
  117. package/dist/client/assets/dtd-BjGQwMWL.js +1 -0
  118. package/dist/client/assets/dylan-B9W3X2GI.js +1 -0
  119. package/dist/client/assets/ebnf-d5D0otVn.js +1 -0
  120. package/dist/client/assets/ecl-C5Q_IBPt.js +1 -0
  121. package/dist/client/assets/editor-session-xPvmulmt.js +16 -0
  122. package/dist/client/assets/eiffel-BQA_6I3b.js +1 -0
  123. package/dist/client/assets/el-GR-ZXDJ2OS4-DGa9DqWI.js +7 -0
  124. package/dist/client/assets/elm-unPS17vB.js +1 -0
  125. package/dist/client/assets/en-CTDJDZ6K-DC-4I8h8.js +1 -0
  126. package/dist/client/assets/erDiagram-INFDFZHY-Dnub3poK.js +70 -0
  127. package/dist/client/assets/erlang-R8nOsUTx.js +1 -0
  128. package/dist/client/assets/es-ES-DYQHAD43-Cox3GUnj.js +7 -0
  129. package/dist/client/assets/eu-ES-QDSYU5Y3-DrPM2uSX.js +7 -0
  130. package/dist/client/assets/excalidraw-editor-BAYca95w.js +182 -0
  131. package/dist/client/assets/excalidraw-editor-D8O7A69r.css +1 -0
  132. package/dist/client/assets/excalidraw-mermaid-stub-BJq3n7pR.js +1 -0
  133. package/dist/client/assets/excalidraw-mermaid-stub-LpuTrLnr.js +1 -0
  134. package/dist/client/assets/excalidrawEditor-BY5rq_Bn.js +2 -0
  135. package/dist/client/assets/fa-IR-26LZG4PM-ViTdxAWX.js +9 -0
  136. package/dist/client/assets/factor-DMvifS-k.js +1 -0
  137. package/dist/client/assets/fcl-CVAfW9wK.js +1 -0
  138. package/dist/client/assets/fi-FI-6YS4KDE4-BTBRGd69.js +6 -0
  139. package/dist/client/assets/flowDiagram-PKNHOUZH-DF4dDV_8.js +162 -0
  140. package/dist/client/assets/forth-DHbsK8X8.js +1 -0
  141. package/dist/client/assets/fortran-4jMwxW9-.js +1 -0
  142. package/dist/client/assets/fr-FR-BRLLPTZC-z-POHcHJ.js +12 -0
  143. package/dist/client/assets/ganttDiagram-A5KZAMGK-CwrN53Gu.js +292 -0
  144. package/dist/client/assets/gas-zC_XGrQT.js +1 -0
  145. package/dist/client/assets/gherkin-CPBQou3u.js +1 -0
  146. package/dist/client/assets/gitGraph-HDMCJU4V-DbS2XnWK.js +1 -0
  147. package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-BV9w0K-N.js +65 -0
  148. package/dist/client/assets/github-dark.min-Z5exjX_n.css +1 -0
  149. package/dist/client/assets/github.min-D2BCvnWf.css +1 -0
  150. package/dist/client/assets/gl-ES-OKUZTLYG-BQtfDFNk.js +6 -0
  151. package/dist/client/assets/graphlib-B7v-yqry.js +1 -0
  152. package/dist/client/assets/groovy-Cqopym0q.js +1 -0
  153. package/dist/client/assets/haskell-imzbNPgF.js +1 -0
  154. package/dist/client/assets/haxe-Doh225Ku.js +1 -0
  155. package/dist/client/assets/he-IL-26MGYIU7-Dyw-xS4W.js +8 -0
  156. package/dist/client/assets/hi-IN-Q4ZOGTP2-BqENUkZA.js +3 -0
  157. package/dist/client/assets/http-j4R5uEso.js +1 -0
  158. package/dist/client/assets/hu-HU-P2OXPSN5-D1HGK0_M.js +3 -0
  159. package/dist/client/assets/id-ID-2EIKXYN6-BEjyfllL.js +8 -0
  160. package/dist/client/assets/idl-l9d1__Hj.js +1 -0
  161. package/dist/client/assets/image-32MOCVDX-BBXPyAeU.js +1 -0
  162. package/dist/client/assets/image-blob-reduce.esm-CQfEe3_g.js +2 -0
  163. package/dist/client/assets/index-C95nV7Tl.css +1 -0
  164. package/dist/client/assets/index-GE56R5t4.js +2 -0
  165. package/dist/client/assets/info-3K5VOQVL-Bre4VStM.js +1 -0
  166. package/dist/client/assets/infoDiagram-LFFYTUFH-CuUbZqrG.js +2 -0
  167. package/dist/client/assets/init-207s1ipc.js +1 -0
  168. package/dist/client/assets/isArrayLikeObject-ZCMZRndo.js +1 -0
  169. package/dist/client/assets/isEmpty-CLDc0Kt_.js +1 -0
  170. package/dist/client/assets/ishikawaDiagram-PHBUUO56-CmO_FyHY.js +70 -0
  171. package/dist/client/assets/it-IT-4CFKVXI2-C24G-VcQ.js +12 -0
  172. package/dist/client/assets/ja-JP-MAND2Z4V-DLhvsdYk.js +7 -0
  173. package/dist/client/assets/javascript-9dQYqEHJ.js +1 -0
  174. package/dist/client/assets/javascript-DdEc60Aj.js +1 -0
  175. package/dist/client/assets/journeyDiagram-4ABVD52K-DF4HAYLk.js +139 -0
  176. package/dist/client/assets/jsx-runtime-DJkgQklN.js +1 -0
  177. package/dist/client/assets/julia-ByGjwiLn.js +1 -0
  178. package/dist/client/assets/kaa-HQRTCXTJ-DC8l3BuJ.js +1 -0
  179. package/dist/client/assets/kab-KAB-JKIKKTGH-DVFog4hd.js +4 -0
  180. package/dist/client/assets/kanban-definition-K7BYSVSG-nQoJJABn.js +89 -0
  181. package/dist/client/assets/katex-XOVNa2d9.js +261 -0
  182. package/dist/client/assets/kk-KZ-HXQ63ZFC-CULUfwMg.js +1 -0
  183. package/dist/client/assets/km-KH-PKL3LSGX-CnLlEv7i.js +7 -0
  184. package/dist/client/assets/ko-KR-KXLREZX3-DNKXAYCx.js +5 -0
  185. package/dist/client/assets/ku-TR-MJ4IER3X-DLUiMa4h.js +6 -0
  186. package/dist/client/assets/line-DvLjT0Gv.js +1 -0
  187. package/dist/client/assets/linear-CEb8O7zv.js +1 -0
  188. package/dist/client/assets/livescript-B8l2m7xO.js +1 -0
  189. package/dist/client/assets/lt-LT-H6WFQ6FJ-CoFiurzb.js +3 -0
  190. package/dist/client/assets/lua-DrfAKnQQ.js +1 -0
  191. package/dist/client/assets/lv-LV-GOCK6SJW-DzeEvHxX.js +4 -0
  192. package/dist/client/assets/main-AejRWvom.js +600 -0
  193. package/dist/client/assets/math-BlD6rf4Z.js +1 -0
  194. package/dist/client/assets/mathematica-DYk_2Ik_.js +1 -0
  195. package/dist/client/assets/mbox-BOzVHzVt.js +1 -0
  196. package/dist/client/assets/mermaid-parser.core-DllATXd7.js +4 -0
  197. package/dist/client/assets/mermaid-runtime-DbCLD8Ih.js +11 -0
  198. package/dist/client/assets/mindmap-definition-YRQLILUH-DaMULsE9.js +68 -0
  199. package/dist/client/assets/mirc-DStbUCmv.js +1 -0
  200. package/dist/client/assets/mllike-BmhQglqS.js +1 -0
  201. package/dist/client/assets/modelica-ZElxtbqD.js +1 -0
  202. package/dist/client/assets/mr-IN-IXVLDMEQ-C5i5R9H5.js +9 -0
  203. package/dist/client/assets/mscgen-f-YxHPr0.js +1 -0
  204. package/dist/client/assets/mumps-B79RJJhR.js +1 -0
  205. package/dist/client/assets/my-MM-YG6MYTTD-DvwceqO-.js +1 -0
  206. package/dist/client/assets/nb-NO-XGWJISD2-BUhX8hX0.js +8 -0
  207. package/dist/client/assets/nginx-c--axfuP.js +1 -0
  208. package/dist/client/assets/nl-NL-XVDVCPNC-BV6Y0-Q0.js +13 -0
  209. package/dist/client/assets/nn-NO-EMX5MJX5-CF_bB9Jq.js +4 -0
  210. package/dist/client/assets/nsis-42hkxqLx.js +1 -0
  211. package/dist/client/assets/ntriples-CgD4YZZC.js +1 -0
  212. package/dist/client/assets/oc-FR-ROEINTVO-CiNI8fg8.js +4 -0
  213. package/dist/client/assets/octave-BQk-bCrp.js +1 -0
  214. package/dist/client/assets/ordinal-fW5lWpNM.js +1 -0
  215. package/dist/client/assets/oz-DPCSPrx5.js +1 -0
  216. package/dist/client/assets/pa-IN-ZYN6SUDY-CsbIU150.js +4 -0
  217. package/dist/client/assets/packet-RMMSAZCW-B7lnOkip.js +1 -0
  218. package/dist/client/assets/pascal-C1iGzZ53.js +1 -0
  219. package/dist/client/assets/path-CDSE7Nw0.js +1 -0
  220. package/dist/client/assets/percentages-5DKR754L-Dp1vwDEq.js +1 -0
  221. package/dist/client/assets/perl-DQ3L8ffg.js +1 -0
  222. package/dist/client/assets/pica-BbcTjVoI.js +2 -0
  223. package/dist/client/assets/pie-UPGHQEXC-D0gHdMgb.js +1 -0
  224. package/dist/client/assets/pieDiagram-SKSYHLDU-BPFp1WBd.js +30 -0
  225. package/dist/client/assets/pig-B4S8acys.js +1 -0
  226. package/dist/client/assets/pl-PL-6VTG7PHC-D1Nnx7R3.js +12 -0
  227. package/dist/client/assets/powershell-BhSVdaeY.js +1 -0
  228. package/dist/client/assets/preload-helper-I1wKxk_B.js +1 -0
  229. package/dist/client/assets/preview-render-compiler-BYiRMsPq.js +1 -0
  230. package/dist/client/assets/preview-render-profile-DQsam_Ol.js +23 -0
  231. package/dist/client/assets/preview-render-worker-CcASh3y3.js +23 -0
  232. package/dist/client/assets/properties-B2nfdtxE.js +1 -0
  233. package/dist/client/assets/protobuf-BFW_iwVN.js +1 -0
  234. package/dist/client/assets/pt-BR-5YFKRR5G-DEDTeWEP.js +6 -0
  235. package/dist/client/assets/pt-PT-GEIXXZ67-BpqPVZom.js +8 -0
  236. package/dist/client/assets/pug-BANqyQJ9.js +1 -0
  237. package/dist/client/assets/puppet-C1-CkyhQ.js +1 -0
  238. package/dist/client/assets/python-CYXPDD4I.js +1 -0
  239. package/dist/client/assets/q-Bub5Xmxm.js +1 -0
  240. package/dist/client/assets/quadrantDiagram-337W2JSQ-DjPGrcJM.js +7 -0
  241. package/dist/client/assets/quick-switcher-controller-n6Jhu3Z9.js +5 -0
  242. package/dist/client/assets/r-C59ONZO2.js +1 -0
  243. package/dist/client/assets/radar-KQ55EAFF-D48du2CB.js +1 -0
  244. package/dist/client/assets/requirementDiagram-Z7DCOOCP-BmiYAMKV.js +73 -0
  245. package/dist/client/assets/ro-RO-E2P6TFZI-4vRM1jVT.js +12 -0
  246. package/dist/client/assets/room-DyhEnogt.js +4 -0
  247. package/dist/client/assets/rough.esm-xhKrnp4d.js +1 -0
  248. package/dist/client/assets/roundRect-CTz-kxJH.js +1 -0
  249. package/dist/client/assets/rpm-DiM-R-wd.js +1 -0
  250. package/dist/client/assets/ru-RU-YBIIY43T-Cfbhz4Ew.js +10 -0
  251. package/dist/client/assets/ruby-DTqG95KX.js +1 -0
  252. package/dist/client/assets/runtime-config-loader-DwWsKc1-.js +1 -0
  253. package/dist/client/assets/sankeyDiagram-WA2Y5GQK-BEoPAlcC.js +10 -0
  254. package/dist/client/assets/sas-BjdhmGHX.js +1 -0
  255. package/dist/client/assets/scheme-CWNdoI17.js +1 -0
  256. package/dist/client/assets/sequenceDiagram-2WXFIKYE-BXqojuDS.js +145 -0
  257. package/dist/client/assets/shell-iaorleRB.js +1 -0
  258. package/dist/client/assets/si-LK-673C2CI2-0muNkOEn.js +1 -0
  259. package/dist/client/assets/sieve-D8m9Etmd.js +1 -0
  260. package/dist/client/assets/simple-mode-kdHrpFjq.js +1 -0
  261. package/dist/client/assets/sk-SK-CKZHQ4AP-EnLgxyJL.js +7 -0
  262. package/dist/client/assets/sl-SI-557H2GWM-BN6npqVj.js +6 -0
  263. package/dist/client/assets/smalltalk-28WS1mUj.js +1 -0
  264. package/dist/client/assets/solr-x8qQ6eAP.js +1 -0
  265. package/dist/client/assets/sparql-BvLmi7B6.js +1 -0
  266. package/dist/client/assets/spreadsheet-BuqSwScP.js +1 -0
  267. package/dist/client/assets/sql-B8tBavZM.js +1 -0
  268. package/dist/client/assets/src-DUDi_GeV.js +1 -0
  269. package/dist/client/assets/stateDiagram-RAJIS63D-DTR2sQs8.js +1 -0
  270. package/dist/client/assets/stateDiagram-v2-FVOUBMTO-BwVII-kJ.js +1 -0
  271. package/dist/client/assets/stex-Bx4bLPxI.js +1 -0
  272. package/dist/client/assets/stylus-CMEhEjuV.js +1 -0
  273. package/dist/client/assets/subset-shared.chunk-C6pUl_Oh.js +1 -0
  274. package/dist/client/assets/subset-worker.chunk-1FoL7eL0.js +1 -0
  275. package/dist/client/assets/sv-SE-XOPKKDWS-D3VSs2SQ.js +8 -0
  276. package/dist/client/assets/swift-wY9II8hY.js +1 -0
  277. package/dist/client/assets/ta-IN-XBH7DQI3-BKR1mqfo.js +6 -0
  278. package/dist/client/assets/tcl-BGywDEsi.js +1 -0
  279. package/dist/client/assets/textile-K_mvsehZ.js +1 -0
  280. package/dist/client/assets/th-TH-TOCWH3R4-Bek1dQcW.js +1 -0
  281. package/dist/client/assets/tiddlywiki-BrpeQ34q.js +1 -0
  282. package/dist/client/assets/tiki-z2eQQPgI.js +1 -0
  283. package/dist/client/assets/timeline-definition-YZTLITO2-BP09qqIh.js +61 -0
  284. package/dist/client/assets/toml-Dcu7S7XA.js +1 -0
  285. package/dist/client/assets/tr-TR-GXW6CYY5-xdLb7Dgi.js +4 -0
  286. package/dist/client/assets/treemap-KZPCXAKY-BBRObSiT.js +1 -0
  287. package/dist/client/assets/troff-Djlumm7T.js +1 -0
  288. package/dist/client/assets/ttcn-XqU6tthJ.js +1 -0
  289. package/dist/client/assets/ttcn-cfg-BzD0wr3i.js +1 -0
  290. package/dist/client/assets/turtle-DcjXkx6M.js +1 -0
  291. package/dist/client/assets/uk-UA-IJKTNUDG-Cd0AhTti.js +6 -0
  292. package/dist/client/assets/uz-UZ-TBZZEA4V-DQH4e-QC.js +1 -0
  293. package/dist/client/assets/vault-api-client-fFJfUVXM.js +188 -0
  294. package/dist/client/assets/vault-utils-BM4i-Ofm.js +1 -0
  295. package/dist/client/assets/vb-DV4y2QrD.js +1 -0
  296. package/dist/client/assets/vbscript-BS8DsYJ_.js +1 -0
  297. package/dist/client/assets/velocity-CS6Ly2yV.js +1 -0
  298. package/dist/client/assets/vennDiagram-LZ73GAT5-BvSlhnT0.js +34 -0
  299. package/dist/client/assets/verilog-DbEC7ose.js +1 -0
  300. package/dist/client/assets/vhdl-DBLrW9bF.js +1 -0
  301. package/dist/client/assets/vi-VN-MULSGNVB-BYDcPrAo.js +7 -0
  302. package/dist/client/assets/webidl-CnE8KY-y.js +1 -0
  303. package/dist/client/assets/xquery--K5Za5EW.js +1 -0
  304. package/dist/client/assets/xychartDiagram-JWTSCODW-BvZ78F0j.js +7 -0
  305. package/dist/client/assets/yacas-ClQfYBmX.js +1 -0
  306. package/dist/client/assets/yjs-provider-reset-guard-Cj00kgyM.js +4 -0
  307. package/dist/client/assets/z80-Dr2oR3X2.js +1 -0
  308. package/dist/client/assets/zh-CN-MVX3E32U-BqZQ-18-.js +11 -0
  309. package/dist/client/assets/zh-HK-JNU5RLIE-CbF8Agwa.js +1 -0
  310. package/dist/client/assets/zh-TW-LENVCA6T-CepoVycx.js +9 -0
  311. package/dist/client/drawio-editor.html +38 -0
  312. package/dist/client/excalidraw-editor.html +31 -0
  313. package/{public → dist/client}/index.html +75 -188
  314. package/package.json +13 -7
  315. package/src/client/app/drawio-editor-entry.js +4 -0
  316. package/src/client/app/drawio-editor.html +36 -0
  317. package/src/client/app/excalidraw-editor-entry.js +4 -0
  318. package/{public → src/client/app}/excalidraw-editor.html +1 -3
  319. package/src/client/app/index.html +463 -0
  320. package/src/client/app/main-entry.js +24 -0
  321. package/src/client/application/app-shell/git-feature.js +21 -23
  322. package/src/client/application/app-shell/ui-feature-identity.js +173 -0
  323. package/src/client/application/app-shell/ui-feature-shell.js +445 -0
  324. package/src/client/application/app-shell/ui-feature-sidebar.js +98 -0
  325. package/src/client/application/app-shell/ui-feature-tab-activity.js +128 -0
  326. package/src/client/application/app-shell/ui-feature-toolbar.js +520 -0
  327. package/src/client/application/app-shell/ui-feature.js +10 -706
  328. package/src/client/application/app-shell/workspace-feature.js +9 -0
  329. package/src/client/application/app-shell-elements.js +2 -0
  330. package/src/client/application/preview-render-compiler.js +18 -1
  331. package/src/client/application/preview-render-profile.js +5 -1
  332. package/src/client/application/workspace-chrome-controller.js +6 -0
  333. package/src/client/application/workspace-coordinator.js +12 -4
  334. package/src/client/application/workspace-preview-controller.js +65 -3
  335. package/src/client/application/workspace-route-controller.js +6 -3
  336. package/src/client/bootstrap/collabmd-app-shell.js +29 -0
  337. package/src/client/domain/markdown-formatting.js +197 -52
  338. package/src/client/domain/markdown-toolbar-actions.js +191 -0
  339. package/src/client/domain/runtime-paths.js +11 -0
  340. package/src/client/domain/vault-paths.js +24 -0
  341. package/src/client/domain/workspace-request-id.js +7 -0
  342. package/src/client/drawio-editor.js +479 -0
  343. package/src/client/excalidraw-editor.js +0 -2
  344. package/src/client/infrastructure/app-version-monitor.js +114 -0
  345. package/src/client/infrastructure/browser-navigation-port.js +2 -2
  346. package/src/client/infrastructure/drawio-lease-client.js +345 -0
  347. package/src/client/infrastructure/runtime-config-loader.js +56 -0
  348. package/src/client/infrastructure/runtime-config.js +5 -1
  349. package/src/client/infrastructure/vault-api-client.js +50 -7
  350. package/src/client/presentation/backlinks-panel.js +42 -9
  351. package/src/client/presentation/comment-ui/comment-ui-card.js +632 -0
  352. package/src/client/presentation/comment-ui/comment-ui-layout.js +452 -0
  353. package/src/client/presentation/comment-ui/comment-ui-render.js +149 -0
  354. package/src/client/presentation/comment-ui/comment-ui-shared.js +297 -0
  355. package/src/client/presentation/comment-ui/comment-ui-state.js +268 -0
  356. package/src/client/presentation/comment-ui-controller.js +13 -1585
  357. package/src/client/presentation/comments-panel.js +2 -2
  358. package/src/client/presentation/create-menu-presenter.js +274 -0
  359. package/src/client/presentation/drawio-embed-controller.js +500 -0
  360. package/src/client/presentation/file-action-controller.js +321 -48
  361. package/src/client/presentation/file-explorer-controller.js +17 -2
  362. package/src/client/presentation/file-explorer-view.js +258 -9
  363. package/src/client/presentation/file-tree-state.js +101 -5
  364. package/src/client/presentation/theme-controller.js +21 -4
  365. package/src/client/presentation/toast-controller.js +49 -6
  366. package/src/client/styles/components/feedback.css +28 -0
  367. package/src/client/styles/components/navigation.css +24 -0
  368. package/src/client/styles/features/backlinks.css +5 -0
  369. package/src/client/styles/features/diagram-preview.css +119 -1
  370. package/src/client/styles/layout/editor-page.css +108 -8
  371. package/src/client/styles/layout/responsive.css +158 -9
  372. package/src/client/styles/layout/shell.css +41 -0
  373. package/src/client/styles/layout/sidebar.css +224 -0
  374. package/src/client/styles/layout/view-modes.css +1 -0
  375. package/src/client/styles/primitives/controls.css +3 -2
  376. package/src/domain/drawio-room.js +47 -0
  377. package/src/domain/file-kind.js +13 -2
  378. package/src/server/config/build-info.js +76 -0
  379. package/src/server/config/env.js +14 -1
  380. package/src/server/create-app-server.js +4 -2
  381. package/src/server/domain/collaboration/collaboration-document-store.js +11 -0
  382. package/src/server/domain/collaboration/collaboration-room.js +5 -0
  383. package/src/server/infrastructure/http/create-static-handler.js +13 -2
  384. package/src/server/infrastructure/http/create-vault-api-command-handler.js +72 -0
  385. package/src/server/infrastructure/http/create-vault-api-query-handler.js +5 -0
  386. package/src/server/infrastructure/persistence/path-utils.js +12 -1
  387. package/src/server/infrastructure/persistence/vault-content-adapter.js +6 -0
  388. package/src/server/infrastructure/persistence/vault-file-store.js +166 -3
  389. package/src/server/infrastructure/workspace/workspace-mutation-coordinator.js +84 -3
  390. package/public/assets/css/base.css +0 -1
  391. package/public/assets/css/style.css +0 -1
  392. package/public/assets/js/chunks/CodeMirrorEditor-UCMRAMCV-MAKZFDBE.js +0 -12
  393. package/public/assets/js/chunks/apl-C5P5JBDI.js +0 -1
  394. package/public/assets/js/chunks/ar-SA-NXDWD63E-MF6HMEA4.js +0 -8
  395. package/public/assets/js/chunks/architecture-PBZL5I3N-55LDZ5WS.js +0 -1
  396. package/public/assets/js/chunks/architectureDiagram-2XIMDMQ5-2VP562X7.js +0 -36
  397. package/public/assets/js/chunks/asciiarmor-3NCLLELT.js +0 -1
  398. package/public/assets/js/chunks/asn1-KF4WXU3M.js +0 -1
  399. package/public/assets/js/chunks/asterisk-EA3VIN65.js +0 -1
  400. package/public/assets/js/chunks/az-AZ-MXSORGZV-AIGO4TNU.js +0 -1
  401. package/public/assets/js/chunks/bg-BG-O6MV2KSF-X6AVO2AF.js +0 -5
  402. package/public/assets/js/chunks/blockDiagram-WCTKOSBZ-KM56WWDE.js +0 -132
  403. package/public/assets/js/chunks/bn-BD-T2VJNT7N-7OMHRIGC.js +0 -3
  404. package/public/assets/js/chunks/bn-IN-MMW2ORAC-EPKMNKG7.js +0 -3
  405. package/public/assets/js/chunks/brainfuck-A3CTQVFD.js +0 -1
  406. package/public/assets/js/chunks/c4Diagram-IC4MRINW-KX6UEGQZ.js +0 -10
  407. package/public/assets/js/chunks/ca-ES-MKBCGNOG-U44SUUTN.js +0 -8
  408. package/public/assets/js/chunks/chunk-2NTQWLZD.js +0 -25
  409. package/public/assets/js/chunks/chunk-2YRP2AWD.js +0 -1
  410. package/public/assets/js/chunks/chunk-3BUCGSSJ.js +0 -1
  411. package/public/assets/js/chunks/chunk-47L7JGE3.js +0 -1
  412. package/public/assets/js/chunks/chunk-4BCHPULB.js +0 -1
  413. package/public/assets/js/chunks/chunk-4NKM6YFO.js +0 -161
  414. package/public/assets/js/chunks/chunk-4WGMPBK5.js +0 -1
  415. package/public/assets/js/chunks/chunk-55WF6Y2Q.js +0 -1
  416. package/public/assets/js/chunks/chunk-5QRWYPYT.js +0 -25
  417. package/public/assets/js/chunks/chunk-775E65SU.js +0 -1
  418. package/public/assets/js/chunks/chunk-AJRGTECU.js +0 -70
  419. package/public/assets/js/chunks/chunk-B2J3PHGY.js +0 -1
  420. package/public/assets/js/chunks/chunk-B4JKB3BC.js +0 -1
  421. package/public/assets/js/chunks/chunk-CGVY4PKT.js +0 -13
  422. package/public/assets/js/chunks/chunk-CVTRX3TE.js +0 -220
  423. package/public/assets/js/chunks/chunk-CYK7KO7W.js +0 -9
  424. package/public/assets/js/chunks/chunk-DW6KK6VF.js +0 -1
  425. package/public/assets/js/chunks/chunk-E2HMNOQL.js +0 -189
  426. package/public/assets/js/chunks/chunk-EPTJZP5H.js +0 -7
  427. package/public/assets/js/chunks/chunk-G7NUGGE7.js +0 -13
  428. package/public/assets/js/chunks/chunk-GFDM7YCF.js +0 -1
  429. package/public/assets/js/chunks/chunk-GI7LBIBP.js +0 -1
  430. package/public/assets/js/chunks/chunk-GXRL27M7.js +0 -1
  431. package/public/assets/js/chunks/chunk-H6EYDHRW.js +0 -1
  432. package/public/assets/js/chunks/chunk-HOCBCDA5.js +0 -1
  433. package/public/assets/js/chunks/chunk-HS2CUOC6.js +0 -1
  434. package/public/assets/js/chunks/chunk-HUAS4BYI.js +0 -12
  435. package/public/assets/js/chunks/chunk-HVNNEPP5.js +0 -2
  436. package/public/assets/js/chunks/chunk-I2GVZI7W.js +0 -38
  437. package/public/assets/js/chunks/chunk-I6PVWGBN.js +0 -14
  438. package/public/assets/js/chunks/chunk-IZ3V3F2A.js +0 -1
  439. package/public/assets/js/chunks/chunk-KPAQHIOI.js +0 -1
  440. package/public/assets/js/chunks/chunk-M3EW4V74.js +0 -1
  441. package/public/assets/js/chunks/chunk-MK3AFU3C.js +0 -90
  442. package/public/assets/js/chunks/chunk-NM6J3ND7.js +0 -1
  443. package/public/assets/js/chunks/chunk-NO7UPWTU.js +0 -1
  444. package/public/assets/js/chunks/chunk-OHGDMMWM.js +0 -1
  445. package/public/assets/js/chunks/chunk-OOT2HALX.js +0 -1
  446. package/public/assets/js/chunks/chunk-OQLLZFFN.js +0 -1
  447. package/public/assets/js/chunks/chunk-PF6TP4EI.js +0 -1
  448. package/public/assets/js/chunks/chunk-PMOZMECZ.js +0 -85
  449. package/public/assets/js/chunks/chunk-QBGS6DJR.js +0 -1
  450. package/public/assets/js/chunks/chunk-QF3ZQ6UQ.js +0 -1
  451. package/public/assets/js/chunks/chunk-QFXMAUW4.js +0 -1
  452. package/public/assets/js/chunks/chunk-QYKIT2IH.js +0 -41
  453. package/public/assets/js/chunks/chunk-S75BI2UQ.js +0 -1
  454. package/public/assets/js/chunks/chunk-SKEZZ3H6.js +0 -1
  455. package/public/assets/js/chunks/chunk-SO6QBCB6.js +0 -1
  456. package/public/assets/js/chunks/chunk-TFP6LRYJ.js +0 -53
  457. package/public/assets/js/chunks/chunk-VOODXHXA.js +0 -1
  458. package/public/assets/js/chunks/chunk-W7WJUTSA.js +0 -3
  459. package/public/assets/js/chunks/chunk-WNXFO2F2.js +0 -1
  460. package/public/assets/js/chunks/chunk-X6EEYWV4.js +0 -6
  461. package/public/assets/js/chunks/chunk-YVW3ZETS.js +0 -1
  462. package/public/assets/js/chunks/chunk-ZR2QRTBG.js +0 -339
  463. package/public/assets/js/chunks/chunk-ZZJX4LQ2.js +0 -1
  464. package/public/assets/js/chunks/classDiagram-VBA2DB6C-IYW4O2RM.js +0 -1
  465. package/public/assets/js/chunks/classDiagram-v2-RAHNMMFH-DNKVN2WD.js +0 -1
  466. package/public/assets/js/chunks/clike-RTBH33GE.js +0 -1
  467. package/public/assets/js/chunks/clojure-BR2VJ2JI.js +0 -1
  468. package/public/assets/js/chunks/cmake-2HEWVFEE.js +0 -1
  469. package/public/assets/js/chunks/cobol-V6EIK6DN.js +0 -1
  470. package/public/assets/js/chunks/coffeescript-JW3ZOGMD.js +0 -1
  471. package/public/assets/js/chunks/commonlisp-UCWSIHYK.js +0 -1
  472. package/public/assets/js/chunks/cose-bilkent-S5V4N54A-QVYRFFNC.js +0 -1
  473. package/public/assets/js/chunks/crystal-GR4VLC3M.js +0 -1
  474. package/public/assets/js/chunks/cs-CZ-V77HGUP7-OLBAKFG5.js +0 -7
  475. package/public/assets/js/chunks/css-C5DVWGB4.js +0 -1
  476. package/public/assets/js/chunks/cypher-K7FZM5GC.js +0 -1
  477. package/public/assets/js/chunks/d-CF3QNNH5.js +0 -1
  478. package/public/assets/js/chunks/da-DK-I5RFNTM4-QJIG2SEZ.js +0 -2
  479. package/public/assets/js/chunks/dagre-KLK3FWXG-KVNBUDOY.js +0 -4
  480. package/public/assets/js/chunks/de-CH-WLRDEVBV-4MMJDMVD.js +0 -7
  481. package/public/assets/js/chunks/de-DE-DTI4WUSC-ML7C46TT.js +0 -7
  482. package/public/assets/js/chunks/diagram-E7M64L7V-ZP33VRUC.js +0 -24
  483. package/public/assets/js/chunks/diagram-IFDJBPK2-ZG35YWOD.js +0 -43
  484. package/public/assets/js/chunks/diagram-P4PSJMXO-ZGIGM7D2.js +0 -24
  485. package/public/assets/js/chunks/diff-KOMSZU7O.js +0 -1
  486. package/public/assets/js/chunks/dist-7RQKSOUX.js +0 -7
  487. package/public/assets/js/chunks/dist-ARWGZ6MN.js +0 -1
  488. package/public/assets/js/chunks/dist-DPBSGC3Y.js +0 -2
  489. package/public/assets/js/chunks/dist-E36PJE5M.js +0 -1
  490. package/public/assets/js/chunks/dist-E5NM7OBW.js +0 -1
  491. package/public/assets/js/chunks/dist-ERADYPEK.js +0 -1
  492. package/public/assets/js/chunks/dist-F43RIHBZ.js +0 -1
  493. package/public/assets/js/chunks/dist-HAB5NIXI.js +0 -1
  494. package/public/assets/js/chunks/dist-HG23OLRA.js +0 -1
  495. package/public/assets/js/chunks/dist-IEJXBSDJ.js +0 -1
  496. package/public/assets/js/chunks/dist-IQA4KVJK.js +0 -1
  497. package/public/assets/js/chunks/dist-OIQTNVT2.js +0 -3
  498. package/public/assets/js/chunks/dist-PMZJ734S.js +0 -1
  499. package/public/assets/js/chunks/dist-RCQFQRLD.js +0 -1
  500. package/public/assets/js/chunks/dist-RQLC4GVI.js +0 -1
  501. package/public/assets/js/chunks/dist-RSJGLSKC.js +0 -1
  502. package/public/assets/js/chunks/dist-SGNQZVVX.js +0 -1
  503. package/public/assets/js/chunks/dist-VCFTF7Z6.js +0 -1
  504. package/public/assets/js/chunks/dist-VTO23SHH.js +0 -1
  505. package/public/assets/js/chunks/dist-XOODBV4L.js +0 -1
  506. package/public/assets/js/chunks/dist-ZFZNCRZY.js +0 -1
  507. package/public/assets/js/chunks/dockerfile-XCIKYOSI.js +0 -1
  508. package/public/assets/js/chunks/dtd-3XFH7W6Z.js +0 -1
  509. package/public/assets/js/chunks/dylan-3UWPKVOR.js +0 -1
  510. package/public/assets/js/chunks/ebnf-OLHTL3VN.js +0 -1
  511. package/public/assets/js/chunks/ecl-43LZ3ZRM.js +0 -1
  512. package/public/assets/js/chunks/editor-session-S5AT7BMV.js +0 -22
  513. package/public/assets/js/chunks/eiffel-ISPO2UJF.js +0 -1
  514. package/public/assets/js/chunks/el-GR-ZXDJ2OS4-WSCEIO6J.js +0 -7
  515. package/public/assets/js/chunks/elm-CLK576PK.js +0 -1
  516. package/public/assets/js/chunks/en-CTDJDZ6K-IC3QAUOI.js +0 -1
  517. package/public/assets/js/chunks/erDiagram-INFDFZHY-ZMS6H2TH.js +0 -70
  518. package/public/assets/js/chunks/erlang-AVQXQFOT.js +0 -1
  519. package/public/assets/js/chunks/es-ES-DYQHAD43-XGB5X5IM.js +0 -7
  520. package/public/assets/js/chunks/eu-ES-QDSYU5Y3-LA3JTIJ2.js +0 -7
  521. package/public/assets/js/chunks/excalidraw-mermaid-stub-NYXTOJ4H.js +0 -1
  522. package/public/assets/js/chunks/fa-IR-26LZG4PM-PFALMEDX.js +0 -9
  523. package/public/assets/js/chunks/factor-CRTVBD6Q.js +0 -1
  524. package/public/assets/js/chunks/fcl-FX24LKTH.js +0 -1
  525. package/public/assets/js/chunks/fi-FI-6YS4KDE4-ES5MV6P4.js +0 -6
  526. package/public/assets/js/chunks/flowDiagram-PKNHOUZH-QD4L5IE5.js +0 -162
  527. package/public/assets/js/chunks/forth-YKDKCTVS.js +0 -1
  528. package/public/assets/js/chunks/fortran-UJWC6SLU.js +0 -1
  529. package/public/assets/js/chunks/fr-FR-BRLLPTZC-VMFE22YV.js +0 -12
  530. package/public/assets/js/chunks/ganttDiagram-A5KZAMGK-VTMTQESP.js +0 -292
  531. package/public/assets/js/chunks/gas-MYEMWGRE.js +0 -1
  532. package/public/assets/js/chunks/gherkin-JWHAU2YG.js +0 -1
  533. package/public/assets/js/chunks/gitGraph-HDMCJU4V-YPHS74XX.js +0 -1
  534. package/public/assets/js/chunks/gitGraphDiagram-K3NZZRJ6-Z3EZ634T.js +0 -65
  535. package/public/assets/js/chunks/gl-ES-OKUZTLYG-GPT42ZHV.js +0 -6
  536. package/public/assets/js/chunks/groovy-QZIZQIAK.js +0 -1
  537. package/public/assets/js/chunks/haskell-JR3G7YNW.js +0 -1
  538. package/public/assets/js/chunks/haxe-TVLAIYEN.js +0 -1
  539. package/public/assets/js/chunks/he-IL-26MGYIU7-VQ5XQYYY.js +0 -8
  540. package/public/assets/js/chunks/hi-IN-Q4ZOGTP2-2Z766MXA.js +0 -3
  541. package/public/assets/js/chunks/http-YXQRE77G.js +0 -1
  542. package/public/assets/js/chunks/hu-HU-P2OXPSN5-6XDVPGTE.js +0 -3
  543. package/public/assets/js/chunks/id-ID-2EIKXYN6-J5GWSY2S.js +0 -8
  544. package/public/assets/js/chunks/idl-RAQGJ6LJ.js +0 -1
  545. package/public/assets/js/chunks/image-32MOCVDX-JN2EUMQG.js +0 -1
  546. package/public/assets/js/chunks/image-blob-reduce.esm-K5OWL55S.js +0 -13
  547. package/public/assets/js/chunks/info-3K5VOQVL-CXJSPNNP.js +0 -1
  548. package/public/assets/js/chunks/infoDiagram-LFFYTUFH-WQ34MUJA.js +0 -2
  549. package/public/assets/js/chunks/ishikawaDiagram-PHBUUO56-4IARWKJK.js +0 -70
  550. package/public/assets/js/chunks/it-IT-4CFKVXI2-NMBWUWFF.js +0 -12
  551. package/public/assets/js/chunks/ja-JP-MAND2Z4V-GQZYXXOC.js +0 -7
  552. package/public/assets/js/chunks/javascript-NM7KDJUE.js +0 -1
  553. package/public/assets/js/chunks/journeyDiagram-4ABVD52K-FJ4LF4SX.js +0 -139
  554. package/public/assets/js/chunks/julia-LG3BH25B.js +0 -1
  555. package/public/assets/js/chunks/kaa-HQRTCXTJ-7D6PAKDJ.js +0 -1
  556. package/public/assets/js/chunks/kab-KAB-JKIKKTGH-TNKFXNAX.js +0 -4
  557. package/public/assets/js/chunks/kanban-definition-K7BYSVSG-TY4EVYI3.js +0 -89
  558. package/public/assets/js/chunks/katex-5YJCUCFD.js +0 -261
  559. package/public/assets/js/chunks/kk-KZ-HXQ63ZFC-T4HCMWED.js +0 -1
  560. package/public/assets/js/chunks/km-KH-PKL3LSGX-HTLHEJV6.js +0 -7
  561. package/public/assets/js/chunks/ko-KR-KXLREZX3-QMR52QVI.js +0 -5
  562. package/public/assets/js/chunks/ku-TR-MJ4IER3X-K5CNY4UO.js +0 -6
  563. package/public/assets/js/chunks/livescript-4CVWVI4M.js +0 -1
  564. package/public/assets/js/chunks/lt-LT-H6WFQ6FJ-IW25FAGX.js +0 -3
  565. package/public/assets/js/chunks/lua-VWGE7DQ7.js +0 -1
  566. package/public/assets/js/chunks/lv-LV-GOCK6SJW-KTDFW5OH.js +0 -4
  567. package/public/assets/js/chunks/mathematica-D7APQSEU.js +0 -1
  568. package/public/assets/js/chunks/mbox-BN3XQBYX.js +0 -1
  569. package/public/assets/js/chunks/mermaid-runtime-BIFNJ2CT.js +0 -18
  570. package/public/assets/js/chunks/mindmap-definition-YRQLILUH-5B565RNP.js +0 -68
  571. package/public/assets/js/chunks/mirc-565WBI76.js +0 -1
  572. package/public/assets/js/chunks/mllike-VV3KS46B.js +0 -1
  573. package/public/assets/js/chunks/modelica-EGX44FZV.js +0 -1
  574. package/public/assets/js/chunks/mr-IN-IXVLDMEQ-PHM5DT7Q.js +0 -9
  575. package/public/assets/js/chunks/mscgen-GFGTHENT.js +0 -1
  576. package/public/assets/js/chunks/mumps-POZYWSMI.js +0 -1
  577. package/public/assets/js/chunks/my-MM-YG6MYTTD-ZHLCMEVA.js +0 -1
  578. package/public/assets/js/chunks/nb-NO-XGWJISD2-KSDFG6YU.js +0 -8
  579. package/public/assets/js/chunks/nginx-JUBX55EU.js +0 -1
  580. package/public/assets/js/chunks/nl-NL-XVDVCPNC-KVF3ZO2R.js +0 -13
  581. package/public/assets/js/chunks/nn-NO-EMX5MJX5-34QKSHNR.js +0 -4
  582. package/public/assets/js/chunks/nsis-RC4CREGM.js +0 -1
  583. package/public/assets/js/chunks/ntriples-4WK6CNVE.js +0 -1
  584. package/public/assets/js/chunks/oc-FR-ROEINTVO-5GP4AOYO.js +0 -4
  585. package/public/assets/js/chunks/octave-GOKFN2V7.js +0 -1
  586. package/public/assets/js/chunks/oz-OQUMNC63.js +0 -1
  587. package/public/assets/js/chunks/pa-IN-ZYN6SUDY-MVL7O44W.js +0 -4
  588. package/public/assets/js/chunks/packet-RMMSAZCW-D7XTR5TT.js +0 -1
  589. package/public/assets/js/chunks/pascal-BBWQWWWD.js +0 -1
  590. package/public/assets/js/chunks/percentages-5DKR754L-DG7W23CV.js +0 -1
  591. package/public/assets/js/chunks/perl-KTPJTTAM.js +0 -1
  592. package/public/assets/js/chunks/pica-6G3NROWT.js +0 -17
  593. package/public/assets/js/chunks/pie-UPGHQEXC-KGC3O6LN.js +0 -1
  594. package/public/assets/js/chunks/pieDiagram-SKSYHLDU-KWKRDEZS.js +0 -30
  595. package/public/assets/js/chunks/pig-IJMBS4FZ.js +0 -1
  596. package/public/assets/js/chunks/pl-PL-6VTG7PHC-VADRWSX4.js +0 -12
  597. package/public/assets/js/chunks/powershell-6YGCBHDP.js +0 -1
  598. package/public/assets/js/chunks/preview-render-compiler-6Y7TKXFJ.js +0 -1
  599. package/public/assets/js/chunks/properties-5QTD3364.js +0 -1
  600. package/public/assets/js/chunks/protobuf-LTRWBIK3.js +0 -1
  601. package/public/assets/js/chunks/pt-BR-5YFKRR5G-HHF4UPO4.js +0 -6
  602. package/public/assets/js/chunks/pt-PT-GEIXXZ67-TUTAUZJK.js +0 -8
  603. package/public/assets/js/chunks/pug-U4PV3WLG.js +0 -1
  604. package/public/assets/js/chunks/puppet-WGYJPR3Y.js +0 -1
  605. package/public/assets/js/chunks/python-6YGH4S47.js +0 -1
  606. package/public/assets/js/chunks/q-VIG4IJLI.js +0 -1
  607. package/public/assets/js/chunks/quadrantDiagram-337W2JSQ-GWQRUFHQ.js +0 -7
  608. package/public/assets/js/chunks/quick-switcher-controller-A6SKH5HI.js +0 -5
  609. package/public/assets/js/chunks/r-NVPCXGTR.js +0 -1
  610. package/public/assets/js/chunks/radar-KQ55EAFF-OPO64DRI.js +0 -1
  611. package/public/assets/js/chunks/requirementDiagram-Z7DCOOCP-ASW7IPJL.js +0 -73
  612. package/public/assets/js/chunks/ro-RO-E2P6TFZI-RJFCULYF.js +0 -12
  613. package/public/assets/js/chunks/roundRect-Z3DX3W5S.js +0 -1
  614. package/public/assets/js/chunks/rpm-UEA257HD.js +0 -1
  615. package/public/assets/js/chunks/ru-RU-YBIIY43T-BF27TNVK.js +0 -10
  616. package/public/assets/js/chunks/ruby-KPQRAJGE.js +0 -1
  617. package/public/assets/js/chunks/sankeyDiagram-WA2Y5GQK-W6BBWCLW.js +0 -10
  618. package/public/assets/js/chunks/sas-L7VATVH5.js +0 -1
  619. package/public/assets/js/chunks/scheme-T2NOWR3P.js +0 -1
  620. package/public/assets/js/chunks/sequenceDiagram-2WXFIKYE-H4G3ISLN.js +0 -145
  621. package/public/assets/js/chunks/shell-DLVDUNFA.js +0 -1
  622. package/public/assets/js/chunks/si-LK-673C2CI2-IOFGU4U2.js +0 -1
  623. package/public/assets/js/chunks/sieve-BKBZYDBU.js +0 -1
  624. package/public/assets/js/chunks/sk-SK-CKZHQ4AP-6O5JGN26.js +0 -7
  625. package/public/assets/js/chunks/sl-SI-557H2GWM-2NEHLV7W.js +0 -6
  626. package/public/assets/js/chunks/smalltalk-WRJQKJSD.js +0 -1
  627. package/public/assets/js/chunks/solr-66B3BIDL.js +0 -1
  628. package/public/assets/js/chunks/sparql-S25Z47JG.js +0 -1
  629. package/public/assets/js/chunks/spreadsheet-B272EF7Y.js +0 -1
  630. package/public/assets/js/chunks/sql-BPLIIUYC.js +0 -1
  631. package/public/assets/js/chunks/stateDiagram-RAJIS63D-OF5XXRUS.js +0 -1
  632. package/public/assets/js/chunks/stateDiagram-v2-FVOUBMTO-IV2CSQSQ.js +0 -1
  633. package/public/assets/js/chunks/stex-4IJY64QX.js +0 -1
  634. package/public/assets/js/chunks/stylus-PJUHLGPT.js +0 -1
  635. package/public/assets/js/chunks/subset-shared.chunk-4NMWHS4D.js +0 -1
  636. package/public/assets/js/chunks/subset-worker.chunk-NTLP7Y66.js +0 -1
  637. package/public/assets/js/chunks/sv-SE-XOPKKDWS-Q2L6KGFV.js +0 -8
  638. package/public/assets/js/chunks/swift-UYHTO4SX.js +0 -1
  639. package/public/assets/js/chunks/ta-IN-XBH7DQI3-ISSUGZAK.js +0 -6
  640. package/public/assets/js/chunks/tcl-OQ5J3VO2.js +0 -1
  641. package/public/assets/js/chunks/textile-NOGVBEYF.js +0 -1
  642. package/public/assets/js/chunks/th-TH-TOCWH3R4-TABEAMJA.js +0 -1
  643. package/public/assets/js/chunks/tiddlywiki-SYTK4QUE.js +0 -1
  644. package/public/assets/js/chunks/tiki-P7K4ZLOM.js +0 -1
  645. package/public/assets/js/chunks/timeline-definition-YZTLITO2-HBCANIUC.js +0 -61
  646. package/public/assets/js/chunks/toml-AUZYRP36.js +0 -1
  647. package/public/assets/js/chunks/tr-TR-GXW6CYY5-5NQRN52Y.js +0 -4
  648. package/public/assets/js/chunks/treemap-KZPCXAKY-WYMCT5F7.js +0 -1
  649. package/public/assets/js/chunks/troff-XFYJNQOJ.js +0 -1
  650. package/public/assets/js/chunks/ttcn-AK2IXWU6.js +0 -1
  651. package/public/assets/js/chunks/ttcn-cfg-3IDPIYPU.js +0 -1
  652. package/public/assets/js/chunks/turtle-OIDMF46P.js +0 -1
  653. package/public/assets/js/chunks/uk-UA-IJKTNUDG-2IIL3TO5.js +0 -6
  654. package/public/assets/js/chunks/uz-UZ-TBZZEA4V-X22KVKBP.js +0 -1
  655. package/public/assets/js/chunks/vb-J6K4XVA2.js +0 -1
  656. package/public/assets/js/chunks/vbscript-FM7DDZZE.js +0 -1
  657. package/public/assets/js/chunks/velocity-6KZFEOFD.js +0 -1
  658. package/public/assets/js/chunks/vennDiagram-LZ73GAT5-EBRF3MZR.js +0 -34
  659. package/public/assets/js/chunks/verilog-EWWQPMNN.js +0 -1
  660. package/public/assets/js/chunks/vhdl-CJ3M4IHI.js +0 -1
  661. package/public/assets/js/chunks/vi-VN-MULSGNVB-TENM65C7.js +0 -7
  662. package/public/assets/js/chunks/webidl-XVBHXCRV.js +0 -1
  663. package/public/assets/js/chunks/xquery-7WZOZ4UK.js +0 -1
  664. package/public/assets/js/chunks/xychartDiagram-JWTSCODW-WIFVRQPR.js +0 -7
  665. package/public/assets/js/chunks/yacas-MZ2ZZPF3.js +0 -1
  666. package/public/assets/js/chunks/z80-I447CBF7.js +0 -1
  667. package/public/assets/js/chunks/zh-CN-MVX3E32U-S5VA2BA5.js +0 -11
  668. package/public/assets/js/chunks/zh-HK-JNU5RLIE-A4VUKZFV.js +0 -1
  669. package/public/assets/js/chunks/zh-TW-LENVCA6T-KFB6KHMM.js +0 -9
  670. package/public/assets/js/excalidraw-editor-5YWMGLKF.js +0 -430
  671. package/public/assets/js/excalidraw-editor-7ORML5YA.css +0 -1
  672. package/public/assets/js/excalidraw-editor.css +0 -1
  673. package/public/assets/js/excalidraw-editor.js +0 -1
  674. package/public/assets/js/main.js +0 -702
  675. package/public/assets/js/preview-render-worker.js +0 -30
  676. /package/{public/assets/js/assets/Assistant-Bold-ZDZZ6JHA.woff2 → dist/client/assets/Assistant-Bold-gm-uSS1B.woff2} +0 -0
  677. /package/{public/assets/js/assets/Assistant-Medium-DZ25RZU3.woff2 → dist/client/assets/Assistant-Medium-DrcxCXg3.woff2} +0 -0
  678. /package/{public/assets/js/assets/Assistant-Regular-PLF2XOGW.woff2 → dist/client/assets/Assistant-Regular-DVxZuzxb.woff2} +0 -0
  679. /package/{public/assets/js/assets/Assistant-SemiBold-CZ5MX6FK.woff2 → dist/client/assets/Assistant-SemiBold-SCI4bEL9.woff2} +0 -0
  680. /package/{public → src/client}/assets/vendor/highlight/github-dark.min.css +0 -0
  681. /package/{public → src/client}/assets/vendor/highlight/github.min.css +0 -0
@@ -1,298 +1,8 @@
1
- import {
2
- COMMENT_BODY_MAX_LENGTH,
3
- normalizeCommentQuoteForComparison,
4
- } from '../../domain/comment-threads.js';
5
- import { renderCommentMarkdownToHtml } from './comment-markdown-renderer.js';
6
-
7
- const COMMENT_CARD_OFFSET = 14;
8
- const COMMENT_CARD_WIDTH = 520;
9
- const COMMENT_SELECTION_REVEAL_DELAY_MS = 150;
10
- const COMMENT_SELECTION_CHIP_GAP = 12;
11
- const COMMENT_CONTROL_SLOT_HEIGHT = 36;
12
- const COMMENT_PREVIEW_BADGE_MIN_WIDTH = 28;
13
- const COMMENT_PREVIEW_RAIL_SLOT_HEIGHT = 30;
14
- const COMMENT_PREVIEW_RAIL_MIN_WIDTH = 400;
15
- const COMMENT_PREVIEW_RAIL_BREAKPOINT = 769;
16
- const COMMENT_REACTION_PRESET_EMOJIS = Object.freeze(['👍', '❤️', '🎉', '👀', '🚀']);
17
- const COMMENT_REACTION_MORE_EMOJIS = Object.freeze(['😂', '🔥', '✅', '🙏', '💡', '🤔', '👏', '😄', '🎯', '🙌']);
18
-
19
- function clamp(value, min, max) {
20
- return Math.min(Math.max(value, min), max);
21
- }
22
-
23
- function sortThreads(threads = []) {
24
- return [...threads].sort((left, right) => (
25
- (left.anchor?.startLine ?? 0) - (right.anchor?.startLine ?? 0)
26
- || left.createdAt - right.createdAt
27
- ));
28
- }
29
-
30
- function getAnchorKind(anchor) {
31
- return anchor?.anchorKind || anchor?.kind || 'line';
32
- }
33
-
34
- function isTextSelectionAnchor(anchor) {
35
- return getAnchorKind(anchor) === 'text'
36
- && Number.isFinite(anchor?.startIndex)
37
- && Number.isFinite(anchor?.endIndex)
38
- && anchor.endIndex > anchor.startIndex;
39
- }
40
-
41
- function areAnchorsEqual(left, right) {
42
- if (left === right) {
43
- return true;
44
- }
45
- if (!left || !right) {
46
- return false;
47
- }
48
-
49
- return getAnchorKind(left) === getAnchorKind(right)
50
- && (left.startIndex ?? null) === (right.startIndex ?? null)
51
- && (left.endIndex ?? null) === (right.endIndex ?? null)
52
- && (left.startLine ?? null) === (right.startLine ?? null)
53
- && (left.endLine ?? null) === (right.endLine ?? null)
54
- && (left.anchorQuote ?? left.quote ?? '') === (right.anchorQuote ?? right.quote ?? '');
55
- }
56
-
57
- function formatAnchorLabel(anchor) {
58
- if (!anchor) {
59
- return 'No source anchor';
60
- }
61
-
62
- if ((anchor.kind || anchor.anchorKind) === 'text' && anchor.quote) {
63
- return anchor.startLine === anchor.endLine
64
- ? `Line ${anchor.startLine}`
65
- : `Lines ${anchor.startLine}-${anchor.endLine}`;
66
- }
67
-
68
- return anchor.startLine === anchor.endLine
69
- ? `Line ${anchor.startLine}`
70
- : `Lines ${anchor.startLine}-${anchor.endLine}`;
71
- }
72
-
73
- function getAnchorGroupKey(anchor = {}) {
74
- return [
75
- anchor.kind || anchor.anchorKind || 'line',
76
- anchor.startLine ?? 0,
77
- anchor.endLine ?? 0,
78
- anchor.quote || '',
79
- ].join('::');
80
- }
81
-
82
- function isLeafSourceBlock(element) {
83
- return element && !element.querySelector('[data-source-line]');
84
- }
85
-
86
- function parseLineNumber(value) {
87
- const parsed = Number.parseInt(value || '', 10);
88
- return Number.isFinite(parsed) ? parsed : null;
89
- }
90
-
91
- function getLatestMessage(messages = []) {
92
- return messages.reduce((latest, message) => {
93
- if (!latest) {
94
- return message;
95
- }
96
-
97
- return (message?.createdAt ?? 0) >= (latest?.createdAt ?? 0)
98
- ? message
99
- : latest;
100
- }, null);
101
- }
102
-
103
- function getLatestGroupMessage(group) {
104
- return group?.threads?.reduce((latest, thread) => {
105
- const next = getLatestMessage(thread?.messages ?? []);
106
- if (!next) {
107
- return latest;
108
- }
109
-
110
- return (next.createdAt ?? 0) >= (latest?.createdAt ?? 0)
111
- ? next
112
- : latest;
113
- }, null);
114
- }
115
-
116
- function createRenderedCommentBody(body, className = 'comment-markdown') {
117
- const container = document.createElement('div');
118
- container.className = className;
119
- container.innerHTML = renderCommentMarkdownToHtml(body);
120
- return container;
121
- }
122
-
123
- function hasLocalReaction(reaction, localUserId) {
124
- return Boolean(localUserId && reaction?.users?.some((user) => user?.userId === localUserId));
125
- }
126
-
127
- function formatReactionCount(reaction) {
128
- return String(Array.isArray(reaction?.users) ? reaction.users.length : 0);
129
- }
130
-
131
- function isReactionPickerOpen(reactionPicker, threadId, messageId) {
132
- return reactionPicker?.threadId === threadId && reactionPicker?.messageId === messageId;
133
- }
134
-
135
- function getReactionPickerBounds(card) {
136
- const picker = card?.querySelector?.('.comment-reaction-picker');
137
- const wrap = picker?.closest?.('.comment-reaction-picker-wrap');
138
- const scroll = card?.querySelector?.('.comment-card-scroll');
139
- if (!(picker instanceof HTMLElement) || !(wrap instanceof HTMLElement) || !(scroll instanceof HTMLElement)) {
140
- return null;
141
- }
142
-
143
- return { picker, scroll, wrap };
144
- }
145
-
146
- function overlapsAnchorRange(element, anchor) {
147
- const startLine = parseLineNumber(element?.getAttribute?.('data-source-line'));
148
- const endLine = parseLineNumber(element?.getAttribute?.('data-source-line-end')) ?? startLine;
149
- if (!startLine || !endLine || !anchor) {
150
- return false;
151
- }
152
-
153
- return anchor.startLine <= endLine && anchor.endLine >= startLine;
154
- }
155
-
156
- function createNormalizedTextIndex(root) {
157
- const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
158
- let normalized = '';
159
- const map = [];
160
- let lastWasWhitespace = true;
161
-
162
- while (walker.nextNode()) {
163
- const node = walker.currentNode;
164
- const text = node.textContent || '';
165
- for (let index = 0; index < text.length; index += 1) {
166
- const char = text[index];
167
- const isWhitespace = /\s/.test(char);
168
- if (isWhitespace) {
169
- if (lastWasWhitespace) {
170
- continue;
171
- }
172
-
173
- normalized += ' ';
174
- map.push({ node, offset: index });
175
- lastWasWhitespace = true;
176
- continue;
177
- }
178
-
179
- normalized += char;
180
- map.push({ node, offset: index });
181
- lastWasWhitespace = false;
182
- }
183
- }
184
-
185
- while (normalized.endsWith(' ')) {
186
- normalized = normalized.slice(0, -1);
187
- map.pop();
188
- }
189
-
190
- return { map, normalized };
191
- }
192
-
193
- function findUniqueQuoteRange(root, quote) {
194
- const normalizedQuote = normalizeCommentQuoteForComparison(quote);
195
- if (!root || !normalizedQuote) {
196
- return null;
197
- }
198
-
199
- const index = createNormalizedTextIndex(root);
200
- if (!index.normalized) {
201
- return null;
202
- }
203
-
204
- const matchIndex = index.normalized.indexOf(normalizedQuote);
205
- if (matchIndex < 0) {
206
- return null;
207
- }
208
- if (index.normalized.indexOf(normalizedQuote, matchIndex + 1) >= 0) {
209
- return null;
210
- }
211
-
212
- const start = index.map[matchIndex];
213
- const end = index.map[matchIndex + normalizedQuote.length - 1];
214
- if (!start || !end) {
215
- return null;
216
- }
217
-
218
- const range = document.createRange();
219
- range.setStart(start.node, start.offset);
220
- range.setEnd(end.node, end.offset + 1);
221
- return range;
222
- }
223
-
224
- function toRelativeRect(rect, containerRect) {
225
- return {
226
- bottom: rect.bottom - containerRect.top,
227
- height: rect.height,
228
- left: rect.left - containerRect.left,
229
- right: rect.right - containerRect.left,
230
- top: rect.top - containerRect.top,
231
- width: rect.width,
232
- };
233
- }
234
-
235
- function createRectFromRects(rects = []) {
236
- if (!Array.isArray(rects) || rects.length === 0) {
237
- return null;
238
- }
239
-
240
- const left = Math.min(...rects.map((rect) => rect.left));
241
- const top = Math.min(...rects.map((rect) => rect.top));
242
- const right = Math.max(...rects.map((rect) => rect.right));
243
- const bottom = Math.max(...rects.map((rect) => rect.bottom));
244
-
245
- return {
246
- bottom,
247
- height: bottom - top,
248
- left,
249
- right,
250
- top,
251
- width: right - left,
252
- };
253
- }
254
-
255
- function pointIntersectsRect(x, y, rect) {
256
- if (!rect) {
257
- return false;
258
- }
259
-
260
- return x >= rect.left
261
- && x <= rect.right
262
- && y >= rect.top
263
- && y <= rect.bottom;
264
- }
265
-
266
- function normalizeGroupKeys(keys = []) {
267
- return [...new Set(keys.filter(Boolean))].sort();
268
- }
269
-
270
- function serializeGroupKeys(keys = []) {
271
- return normalizeGroupKeys(keys).join(' ');
272
- }
273
-
274
- function createCommentMarkerContent(count) {
275
- const fragment = document.createDocumentFragment();
276
-
277
- const icon = document.createElement('span');
278
- icon.className = 'comment-marker-icon';
279
- icon.setAttribute('aria-hidden', 'true');
280
- icon.innerHTML = `
281
- <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
282
- <path d="M3 4.75A1.75 1.75 0 0 1 4.75 3h6.5A1.75 1.75 0 0 1 13 4.75v4.5A1.75 1.75 0 0 1 11.25 11H8.9L6.5 13v-2H4.75A1.75 1.75 0 0 1 3 9.25v-4.5Z" stroke="currentColor" stroke-width="1.35" stroke-linejoin="round"/>
283
- </svg>
284
- `;
285
- fragment.appendChild(icon);
286
-
287
- if (count > 1) {
288
- const countBadge = document.createElement('span');
289
- countBadge.className = 'comment-marker-count';
290
- countBadge.textContent = String(count);
291
- fragment.appendChild(countBadge);
292
- }
293
-
294
- return fragment;
295
- }
1
+ import { commentUiCardMethods } from './comment-ui/comment-ui-card.js';
2
+ import { commentUiLayoutMethods } from './comment-ui/comment-ui-layout.js';
3
+ import { commentUiRenderMethods } from './comment-ui/comment-ui-render.js';
4
+ import { commentUiStateMethods } from './comment-ui/comment-ui-state.js';
5
+ import { isTextSelectionAnchor } from './comment-ui/comment-ui-shared.js';
296
6
 
297
7
  export class CommentUiController {
298
8
  constructor({
@@ -517,1294 +227,12 @@ export class CommentUiController {
517
227
  this.previewLayer?.remove();
518
228
  this.pendingCardFocusElement = null;
519
229
  }
230
+ }
520
231
 
521
- attachSession(session) {
522
- this.session?.getScrollContainer?.()?.removeEventListener('scroll', this.handleEditorScroll);
523
- this.session = session;
524
- this.selectionAnchor = session?.getCurrentSelectionCommentAnchor?.() ?? null;
525
- this.pendingSelectionAnchor = null;
526
- this.committedSelectionAnchor = null;
527
- this.reactionPicker = null;
528
- this.clearSelectionRevealTimer();
529
- this.pointerSelecting = false;
530
- session?.getScrollContainer?.()?.addEventListener('scroll', this.handleEditorScroll, { passive: true });
531
- this.render();
532
- }
533
-
534
- setCurrentFile(filePath, { fileKind = 'markdown', supported = false } = {}) {
535
- const didChangeFile = this.currentFile !== filePath;
536
- this.currentFile = filePath;
537
- this.fileKind = fileKind;
538
- this.supported = Boolean(filePath && supported);
539
- if (didChangeFile) {
540
- this.drawerOpen = false;
541
- this.threads = [];
542
- this.selectionAnchor = null;
543
- this.pendingSelectionAnchor = null;
544
- this.committedSelectionAnchor = null;
545
- this.clearSelectionRevealTimer();
546
- this.pointerSelecting = false;
547
- this.activeCard = null;
548
- this.updateHoveredEditorGroups([]);
549
- this.updateHoveredPreviewGroups([]);
550
- this.previewHoverRegions = [];
551
- this.lastPreviewPointerPosition = null;
552
- this.reactionPicker = null;
553
- }
554
- if (!this.supported) {
555
- this.drawerOpen = false;
556
- this.activeCard = null;
557
- this.threads = [];
558
- this.selectionAnchor = null;
559
- this.pendingSelectionAnchor = null;
560
- this.committedSelectionAnchor = null;
561
- this.clearSelectionRevealTimer();
562
- this.pointerSelecting = false;
563
- this.updateHoveredEditorGroups([]);
564
- this.updateHoveredPreviewGroups([]);
565
- this.previewHoverRegions = [];
566
- this.lastPreviewPointerPosition = null;
567
- this.reactionPicker = null;
568
- }
569
- this.render();
570
- }
571
-
572
- setSelectionAnchor(anchor) {
573
- this.selectionAnchor = this.supported ? anchor : null;
574
- if (!this.supported || !this.selectionAnchor) {
575
- this.pendingSelectionAnchor = null;
576
- this.committedSelectionAnchor = null;
577
- this.clearSelectionRevealTimer();
578
- this.renderToolbar();
579
- this.scheduleLayoutRefresh();
580
- return;
581
- }
582
-
583
- if (!isTextSelectionAnchor(this.selectionAnchor)) {
584
- this.pendingSelectionAnchor = null;
585
- this.committedSelectionAnchor = null;
586
- this.clearSelectionRevealTimer();
587
- this.renderToolbar();
588
- this.scheduleLayoutRefresh();
589
- return;
590
- }
591
-
592
- this.pendingSelectionAnchor = this.selectionAnchor;
593
- if (this.activeCard?.mode === 'create') {
594
- this.clearSelectionRevealTimer();
595
- this.renderToolbar();
596
- this.scheduleLayoutRefresh();
597
- return;
598
- }
599
-
600
- if (this.pointerSelecting) {
601
- this.clearSelectionRevealTimer();
602
- this.committedSelectionAnchor = null;
603
- this.renderToolbar();
604
- this.scheduleLayoutRefresh();
605
- return;
606
- }
607
-
608
- if (areAnchorsEqual(this.committedSelectionAnchor, this.selectionAnchor)) {
609
- this.renderToolbar();
610
- this.scheduleLayoutRefresh();
611
- return;
612
- }
613
-
614
- this.scheduleSelectionReveal(this.selectionAnchor);
615
- this.renderToolbar();
616
- this.scheduleLayoutRefresh();
617
- }
618
-
619
- handleEditorContentChange() {
620
- if (this.activeCard?.mode === 'create') {
621
- return;
622
- }
623
-
624
- this.clearSelectionRevealTimer();
625
- this.pendingSelectionAnchor = null;
626
- this.committedSelectionAnchor = null;
627
- this.scheduleLayoutRefresh();
628
- }
629
-
630
- setThreads(threads = []) {
631
- this.threads = sortThreads(threads);
632
- if (
633
- this.activeCard?.mode === 'group'
634
- && !this.getThreadGroups().some((group) => group.key === this.activeCard.groupKey)
635
- ) {
636
- this.activeCard = null;
637
- }
638
- if (
639
- this.reactionPicker
640
- && !this.threads.some((thread) => (
641
- thread.id === this.reactionPicker.threadId
642
- && thread.messages?.some((message) => message.id === this.reactionPicker.messageId)
643
- ))
644
- ) {
645
- this.reactionPicker = null;
646
- }
647
- this.render();
648
- }
649
-
650
- setDrawerOpen(nextState) {
651
- const normalizedState = Boolean(nextState);
652
- if (normalizedState === this.drawerOpen) {
653
- return;
654
- }
655
-
656
- if (normalizedState) {
657
- this.onWillOpenDrawer?.();
658
- }
659
-
660
- this.drawerOpen = normalizedState;
661
- this.render();
662
- }
663
-
664
- closeDrawer() {
665
- this.setDrawerOpen(false);
666
- }
667
-
668
- refreshLayout() {
669
- this.renderEditorLayer();
670
- this.renderPreviewLayer();
671
- this.repositionActiveCard();
672
- }
673
-
674
- syncPreviewRailLayout(maxBubbleWidth = 0) {
675
- if (!this.previewElement) {
676
- return false;
677
- }
678
-
679
- const shouldShowRail = this.supported && maxBubbleWidth > 0;
680
- const nextReserved = 0;
681
- const nextOffset = 0;
682
- let reserved = nextReserved;
683
- let offset = nextOffset;
684
-
685
- if (shouldShowRail) {
686
- const previewStyle = getComputedStyle(this.previewElement);
687
- const currentReserved = Number.parseFloat(
688
- previewStyle.getPropertyValue('--preview-comment-rail-reserved'),
689
- ) || 0;
690
- const currentPaddingRight = Number.parseFloat(previewStyle.paddingRight) || 0;
691
- const railInset = Number.parseFloat(
692
- previewStyle.getPropertyValue('--preview-comment-rail-inset'),
693
- ) || 0;
694
- const basePaddingRight = Math.max(currentPaddingRight - currentReserved, 0);
695
- const requiredRail = Math.max(maxBubbleWidth + railInset - basePaddingRight, 0);
696
- const previewContainerRect = this.previewContainer?.getBoundingClientRect();
697
- const previewRect = this.previewElement.getBoundingClientRect();
698
- const availableRightGutter = previewContainerRect
699
- ? Math.max(previewContainerRect.right - previewRect.right, 0)
700
- : 0;
701
-
702
- offset = Math.min(availableRightGutter, requiredRail);
703
- reserved = Math.max(requiredRail - offset, 0);
704
- }
705
-
706
- const nextReservedValue = `${Math.ceil(reserved)}px`;
707
- const nextOffsetValue = `${Math.floor(offset)}px`;
708
- const didChange = this.previewElement.style.getPropertyValue('--preview-comment-rail-reserved') !== nextReservedValue
709
- || this.previewElement.style.getPropertyValue('--preview-comment-rail-offset') !== nextOffsetValue;
710
-
711
- if (didChange) {
712
- this.previewElement.style.setProperty('--preview-comment-rail-reserved', nextReservedValue);
713
- this.previewElement.style.setProperty('--preview-comment-rail-offset', nextOffsetValue);
714
- }
715
-
716
- return didChange;
717
- }
718
-
719
- scheduleLayoutRefresh() {
720
- if (this.layoutFrame) {
721
- return;
722
- }
723
-
724
- this.layoutFrame = requestAnimationFrame(() => {
725
- this.layoutFrame = 0;
726
- this.refreshLayout();
727
- });
728
- }
729
-
730
- render() {
731
- this.renderToolbar();
732
- this.renderDrawer();
733
- this.renderCard();
734
- this.scheduleLayoutRefresh();
735
- }
736
-
737
- renderToolbar() {
738
- const totalCount = this.threads.length;
739
- const showControls = this.supported && Boolean(this.session);
740
- this.commentSelectionButton?.classList.toggle('hidden', !showControls);
741
- this.commentsToggleButton?.classList.toggle('hidden', !this.supported);
742
- if (this.commentSelectionButton) {
743
- this.commentSelectionButton.disabled = !this.selectionAnchor;
744
- }
745
- if (this.commentsToggleButton) {
746
- this.commentsToggleButton.classList.toggle('active', this.drawerOpen);
747
- this.commentsToggleButton.setAttribute('aria-expanded', String(this.drawerOpen));
748
- const label = totalCount > 0 ? `Comments ${totalCount}` : 'Comments';
749
- const labelElement = this.commentsToggleButton.querySelector('.ui-action-label');
750
- if (labelElement) {
751
- labelElement.textContent = label;
752
- } else {
753
- this.commentsToggleButton.textContent = label;
754
- }
755
- }
756
- }
757
-
758
- renderDrawer() {
759
- if (!this.commentsDrawer || !this.commentsDrawerList) {
760
- return;
761
- }
762
-
763
- this.commentsDrawer.classList.toggle('hidden', !this.supported || !this.drawerOpen);
764
- this.commentsDrawerList.replaceChildren();
765
- const groups = this.getThreadGroups();
766
- this.commentsDrawerEmpty?.classList.toggle('hidden', groups.length > 0);
767
- if (!this.supported || groups.length === 0) {
768
- return;
769
- }
770
-
771
- const fragment = document.createDocumentFragment();
772
- groups.forEach((group) => {
773
- const button = document.createElement('button');
774
- button.type = 'button';
775
- button.className = 'ui-record-surface comments-drawer-item';
776
- button.classList.toggle('is-active', this.activeCard?.groupKey === group.key);
777
- button.addEventListener('pointerdown', (event) => {
778
- event.preventDefault();
779
- });
780
- button.addEventListener('click', () => {
781
- this.openThreadGroup(group, {
782
- anchor: group.anchor,
783
- origin: 'drawer',
784
- sourceRect: button.getBoundingClientRect(),
785
- });
786
- });
787
-
788
- const header = document.createElement('div');
789
- header.className = 'ui-record-header comments-drawer-item-header';
790
-
791
- const title = document.createElement('span');
792
- title.className = 'comments-drawer-item-title';
793
- title.textContent = formatAnchorLabel(group.anchor);
794
-
795
- const count = document.createElement('span');
796
- count.className = 'ui-pill-badge ui-pill-badge--count ui-pill-badge--accent comments-drawer-item-count';
797
- count.textContent = String(group.threads.length);
798
-
799
- header.append(title, count);
800
-
801
- const quote = document.createElement('p');
802
- quote.className = 'comments-drawer-item-quote';
803
- quote.textContent = group.anchor.quote || group.anchor.excerpt || 'Source anchored comment';
804
-
805
- const latestMessage = getLatestGroupMessage(group);
806
- const preview = createRenderedCommentBody(
807
- latestMessage?.body || '',
808
- 'comment-markdown comments-drawer-item-preview',
809
- );
810
-
811
- const footer = document.createElement('div');
812
- footer.className = 'ui-record-meta comments-drawer-item-footer';
813
- const countLabel = document.createElement('span');
814
- countLabel.textContent = `${group.threads.length} thread${group.threads.length === 1 ? '' : 's'}`;
815
-
816
- const updatedLabel = document.createElement('span');
817
- updatedLabel.className = 'comments-drawer-item-updated';
818
- updatedLabel.textContent = latestMessage
819
- ? `${latestMessage.userName} • ${this.formatTimestamp(latestMessage.createdAt)}`
820
- : '';
821
-
822
- footer.append(countLabel, updatedLabel);
823
-
824
- button.append(header, quote, preview, footer);
825
- fragment.appendChild(button);
826
- });
827
-
828
- this.commentsDrawerList.appendChild(fragment);
829
- }
830
-
831
- ensureEditorLayer() {
832
- if (this.editorLayer?.isConnected && this.editorLayer.parentElement === this.editorContainer) {
833
- return this.editorLayer;
834
- }
835
-
836
- const layer = document.createElement('div');
837
- layer.className = 'comment-editor-layer';
838
- this.editorContainer?.appendChild(layer);
839
- this.editorLayer = layer;
840
- return layer;
841
- }
842
-
843
- renderEditorLayer() {
844
- const layer = this.ensureEditorLayer();
845
- layer.replaceChildren();
846
-
847
- if (!this.supported || !this.session) {
848
- return;
849
- }
850
-
851
- const containerRect = this.editorContainer?.getBoundingClientRect?.();
852
- if (!containerRect) {
853
- return;
854
- }
855
-
856
- const groups = this.getThreadGroups();
857
- const occupiedTops = [];
858
- groups.forEach((group) => {
859
- const rect = this.session.getCommentAnchorClientRect?.(group.anchor);
860
- if (!rect) {
861
- return;
862
- }
863
-
864
- const relativeRect = toRelativeRect(rect, containerRect);
865
- if (relativeRect.bottom < 0 || relativeRect.top > containerRect.height) {
866
- return;
867
- }
868
-
869
- const button = document.createElement('button');
870
- button.type = 'button';
871
- button.className = 'ui-state-marker ui-state-marker--comment comment-editor-badge';
872
- button.dataset.count = String(group.threads.length);
873
- const isActive = this.activeCard?.groupKey === group.key;
874
- const isHovered = this.hoveredEditorGroupKeys.includes(group.key);
875
- button.classList.toggle('is-active', isActive);
876
- button.classList.toggle('is-hovered', isHovered);
877
- button.classList.toggle('is-passive', !isActive && !isHovered);
878
- button.setAttribute('aria-label', `${group.threads.length} comment thread${group.threads.length === 1 ? '' : 's'}`);
879
- button.appendChild(createCommentMarkerContent(group.threads.length));
880
- const top = Math.max(relativeRect.top, 8);
881
- button.style.top = `${top}px`;
882
- button.style.left = `${Math.max(containerRect.width - 36, 8)}px`;
883
- button.title = `${group.threads.length} comment${group.threads.length === 1 ? '' : 's'}`;
884
- button.addEventListener('pointerdown', (event) => {
885
- event.preventDefault();
886
- });
887
- button.addEventListener('pointerenter', () => {
888
- this.updateHoveredEditorGroups([group.key]);
889
- });
890
- button.addEventListener('pointerleave', () => {
891
- this.updateHoveredEditorGroups([]);
892
- });
893
- button.addEventListener('focusin', () => {
894
- this.updateHoveredEditorGroups([group.key]);
895
- });
896
- button.addEventListener('focusout', () => {
897
- this.updateHoveredEditorGroups([]);
898
- });
899
- button.addEventListener('click', () => {
900
- this.openThreadGroup(group, {
901
- anchor: group.anchor,
902
- origin: 'editor',
903
- sourceRect: rect,
904
- });
905
- });
906
- layer.appendChild(button);
907
- occupiedTops.push(top);
908
- });
909
-
910
- if (!this.committedSelectionAnchor || this.activeCard?.mode === 'create') {
911
- return;
912
- }
913
-
914
- const rect = this.session.getCommentAnchorClientRect?.(this.committedSelectionAnchor);
915
- const chipRect = this.session.getSelectionChipClientRect?.(this.committedSelectionAnchor) ?? rect;
916
- if (!chipRect) {
917
- return;
918
- }
919
-
920
- const relativeRect = toRelativeRect(chipRect, containerRect);
921
- if (relativeRect.bottom < 0 || relativeRect.top > containerRect.height) {
922
- return;
923
- }
924
-
925
- let chipTop = clamp(relativeRect.top, 8, Math.max(containerRect.height - COMMENT_CONTROL_SLOT_HEIGHT, 8));
926
- while (occupiedTops.some((top) => Math.abs(top - chipTop) < (COMMENT_CONTROL_SLOT_HEIGHT - 4))) {
927
- chipTop = clamp(
928
- chipTop + COMMENT_CONTROL_SLOT_HEIGHT,
929
- 8,
930
- Math.max(containerRect.height - COMMENT_CONTROL_SLOT_HEIGHT, 8),
931
- );
932
- }
933
- const button = document.createElement('button');
934
- button.type = 'button';
935
- button.className = 'ui-selection-pill ui-selection-pill--comment comment-selection-chip';
936
- button.textContent = 'Comment';
937
- button.style.top = `${chipTop}px`;
938
- button.style.right = `${COMMENT_SELECTION_CHIP_GAP}px`;
939
- button.addEventListener('pointerdown', (event) => {
940
- event.preventDefault();
941
- event.stopPropagation();
942
- this.openComposerForSelection('editor', button.getBoundingClientRect());
943
- });
944
- layer.appendChild(button);
945
- }
946
-
947
- ensurePreviewLayer() {
948
- if (this.previewLayer?.isConnected && this.previewLayer.parentElement === this.previewElement) {
949
- return this.previewLayer;
950
- }
951
-
952
- const highlightLayer = document.createElement('div');
953
- highlightLayer.className = 'comment-preview-highlights';
954
- const markerLayer = document.createElement('div');
955
- markerLayer.className = 'comment-preview-layer';
956
- this.previewElement?.append(highlightLayer, markerLayer);
957
- this.previewHighlightLayer = highlightLayer;
958
- this.previewLayer = markerLayer;
959
- return markerLayer;
960
- }
961
-
962
- renderPreviewLayer() {
963
- this.ensurePreviewLayer();
964
- this.previewLayer?.replaceChildren();
965
- this.previewHighlightLayer?.replaceChildren();
966
-
967
- if (!this.supported || !this.previewElement) {
968
- this.previewHoverRegions = [];
969
- this.syncPreviewRailLayout(0);
970
- return;
971
- }
972
-
973
- const previewRect = this.previewElement.getBoundingClientRect();
974
- const groups = this.getThreadGroups();
975
- const occupiedTops = [];
976
- const hoverRegions = [];
977
- const showPassiveMarkers = this.shouldRenderPassivePreviewMarkers();
978
- const previewBubbles = [];
979
- groups.forEach((group) => {
980
- const target = this.resolvePreviewTarget(group.anchor);
981
- if (!target?.bubbleRect) {
982
- return;
983
- }
984
-
985
- hoverRegions.push({
986
- key: group.key,
987
- rects: target.hoverRects?.length > 0 ? target.hoverRects : [target.bubbleRect],
988
- });
989
-
990
- const isActive = this.activeCard?.groupKey === group.key;
991
- const isHovered = this.hoveredPreviewGroupKeys.includes(group.key);
992
- const isEmphasized = isActive || isHovered;
993
-
994
- target.highlightRects?.forEach((rect) => {
995
- const highlight = document.createElement('div');
996
- highlight.className = 'comment-preview-highlight';
997
- highlight.classList.toggle('is-active', isActive);
998
- highlight.classList.toggle('is-hovered', isHovered);
999
- highlight.classList.toggle('is-passive', !isEmphasized);
1000
- highlight.style.left = `${rect.left - previewRect.left}px`;
1001
- highlight.style.top = `${rect.top - previewRect.top}px`;
1002
- highlight.style.width = `${rect.width}px`;
1003
- highlight.style.height = `${rect.height}px`;
1004
- this.previewHighlightLayer?.appendChild(highlight);
1005
- });
1006
-
1007
- if (!showPassiveMarkers && !isEmphasized) {
1008
- return;
1009
- }
1010
-
1011
- const bubble = document.createElement('button');
1012
- bubble.type = 'button';
1013
- bubble.className = 'ui-state-marker ui-state-marker--comment comment-preview-badge';
1014
- bubble.dataset.commentPreviewGroupKeys = group.key;
1015
- bubble.classList.toggle('is-active', isActive);
1016
- bubble.classList.toggle('is-hovered', isHovered);
1017
- bubble.classList.toggle('is-passive', !isEmphasized);
1018
- bubble.setAttribute('aria-label', `${group.threads.length} comment thread${group.threads.length === 1 ? '' : 's'}`);
1019
- bubble.appendChild(createCommentMarkerContent(group.threads.length));
1020
- let bubbleTop = clamp(
1021
- target.bubbleRect.top - previewRect.top,
1022
- 6,
1023
- Math.max(this.previewElement.clientHeight - COMMENT_PREVIEW_RAIL_SLOT_HEIGHT, 6),
1024
- );
1025
- while (occupiedTops.some((top) => Math.abs(top - bubbleTop) < (COMMENT_PREVIEW_RAIL_SLOT_HEIGHT - 4))) {
1026
- bubbleTop = clamp(
1027
- bubbleTop + COMMENT_PREVIEW_RAIL_SLOT_HEIGHT,
1028
- 6,
1029
- Math.max(this.previewElement.clientHeight - COMMENT_PREVIEW_RAIL_SLOT_HEIGHT, 6),
1030
- );
1031
- }
1032
- bubble.style.top = `${bubbleTop}px`;
1033
- bubble.title = `${group.threads.length} comment${group.threads.length === 1 ? '' : 's'}`;
1034
- bubble.addEventListener('pointerdown', (event) => {
1035
- event.preventDefault();
1036
- });
1037
- bubble.addEventListener('click', () => {
1038
- this.openThreadGroup(group, {
1039
- anchor: group.anchor,
1040
- origin: 'preview',
1041
- sourceRect: bubble.getBoundingClientRect(),
1042
- });
1043
- });
1044
- this.previewLayer?.appendChild(bubble);
1045
- occupiedTops.push(bubbleTop);
1046
- previewBubbles.push(bubble);
1047
- });
1048
-
1049
- this.previewHoverRegions = hoverRegions;
1050
- const maxBubbleWidth = previewBubbles.reduce(
1051
- (maxWidth, bubble) => Math.max(maxWidth, bubble.offsetWidth || COMMENT_PREVIEW_BADGE_MIN_WIDTH),
1052
- 0,
1053
- );
1054
- if (this.syncPreviewRailLayout(maxBubbleWidth)) {
1055
- this.scheduleLayoutRefresh();
1056
- }
1057
- if (this.lastPreviewPointerPosition) {
1058
- this.updateHoveredPreviewGroups(
1059
- this.getPreviewGroupKeysAtPoint(this.lastPreviewPointerPosition.x, this.lastPreviewPointerPosition.y),
1060
- );
1061
- }
1062
- }
1063
-
1064
- resolvePreviewTarget(anchor) {
1065
- if (!this.previewElement || !anchor) {
1066
- return null;
1067
- }
1068
-
1069
- const diagramShell = Array.from(this.previewElement.querySelectorAll('.mermaid-shell, .plantuml-shell'))
1070
- .find((element) => overlapsAnchorRange(element, anchor));
1071
- if (diagramShell) {
1072
- return {
1073
- bubbleRect: diagramShell.getBoundingClientRect(),
1074
- highlightRects: [],
1075
- hoverRects: [diagramShell.getBoundingClientRect()],
1076
- };
1077
- }
1078
-
1079
- const candidates = Array.from(this.previewElement.querySelectorAll('[data-source-line]'))
1080
- .filter((element) => isLeafSourceBlock(element) && overlapsAnchorRange(element, anchor));
1081
-
1082
- if (anchor.kind === 'text' && anchor.quote) {
1083
- const matches = candidates
1084
- .map((element) => ({ element, range: findUniqueQuoteRange(element, anchor.quote) }))
1085
- .filter((candidate) => candidate.range);
1086
- if (matches.length === 1) {
1087
- const rects = Array.from(matches[0].range.getClientRects());
1088
- const bubbleRect = createRectFromRects(rects) || matches[0].element.getBoundingClientRect();
1089
- return {
1090
- bubbleRect,
1091
- highlightRects: rects,
1092
- hoverRects: rects,
1093
- };
1094
- }
1095
- }
1096
-
1097
- const fallback = candidates[0];
1098
- if (!fallback) {
1099
- return null;
1100
- }
1101
-
1102
- return {
1103
- bubbleRect: fallback.getBoundingClientRect(),
1104
- highlightRects: [],
1105
- hoverRects: [fallback.getBoundingClientRect()],
1106
- };
1107
- }
1108
-
1109
- ensureCardRoot() {
1110
- if (this.cardRoot?.isConnected && this.cardRoot.parentElement === document.body) {
1111
- return this.cardRoot;
1112
- }
1113
-
1114
- const root = document.createElement('div');
1115
- root.className = 'comment-card-root hidden';
1116
- document.body.appendChild(root);
1117
- this.cardRoot = root;
1118
- return root;
1119
- }
1120
-
1121
- openComposerForSelection(origin = 'editor', sourceRect = null) {
1122
- const anchor = this.session?.getCurrentSelectionCommentAnchor?.();
1123
- if (!anchor) {
1124
- return;
1125
- }
1126
-
1127
- this.selectionAnchor = anchor;
1128
- this.reactionPicker = null;
1129
- const nextOrigin = origin === 'editor' && sourceRect ? 'editor-chip' : origin;
1130
- const nextSourceRect = sourceRect ?? (origin === 'toolbar'
1131
- ? this.commentSelectionButton?.getBoundingClientRect?.()
1132
- : this.session?.getCommentAnchorClientRect?.(anchor));
1133
- this.activeCard = {
1134
- anchor,
1135
- mode: 'create',
1136
- origin: nextOrigin,
1137
- replyThreadId: null,
1138
- sourceRect: nextSourceRect,
1139
- };
1140
- this.render();
1141
- }
1142
-
1143
- openThreadGroup(group, { anchor, origin, sourceRect }) {
1144
- this.reactionPicker = null;
1145
- this.activeCard = {
1146
- anchor,
1147
- groupKey: group.key,
1148
- mode: 'group',
1149
- origin,
1150
- replyThreadId: null,
1151
- sourceRect,
1152
- };
1153
- this.renderDrawer();
1154
- this.renderCard();
1155
- }
1156
-
1157
- closeCard() {
1158
- this.activeCard = null;
1159
- this.pendingCardFocusElement = null;
1160
- this.reactionPicker = null;
1161
- this.renderCard();
1162
- this.scheduleLayoutRefresh();
1163
- }
1164
-
1165
- getThreadGroups() {
1166
- const groups = new Map();
1167
- this.threads.forEach((thread) => {
1168
- const key = getAnchorGroupKey(thread.anchor);
1169
- const existing = groups.get(key);
1170
- if (existing) {
1171
- existing.threads.push(thread);
1172
- return;
1173
- }
1174
-
1175
- groups.set(key, {
1176
- anchor: thread.anchor,
1177
- key,
1178
- threads: [thread],
1179
- });
1180
- });
1181
-
1182
- return Array.from(groups.values()).sort((left, right) => (
1183
- (left.anchor?.startLine ?? 0) - (right.anchor?.startLine ?? 0)
1184
- ));
1185
- }
1186
-
1187
- updateCardSourceRect() {
1188
- if (!this.activeCard) {
1189
- return null;
1190
- }
1191
-
1192
- if (this.activeCard.origin === 'editor') {
1193
- return this.session?.getCommentAnchorClientRect?.(this.activeCard.anchor) ?? this.activeCard.sourceRect;
1194
- }
1195
- if (this.activeCard.origin === 'editor-chip') {
1196
- return this.activeCard.sourceRect;
1197
- }
1198
- if (this.activeCard.origin === 'preview') {
1199
- return this.resolvePreviewTarget(this.activeCard.anchor)?.bubbleRect ?? this.activeCard.sourceRect;
1200
- }
1201
- if (this.activeCard.origin === 'toolbar') {
1202
- return this.commentSelectionButton?.getBoundingClientRect?.() ?? this.activeCard.sourceRect;
1203
- }
1204
-
1205
- return this.activeCard.sourceRect;
1206
- }
1207
-
1208
- renderCard() {
1209
- const root = this.ensureCardRoot();
1210
- root.replaceChildren();
1211
- root.classList.toggle('hidden', !this.activeCard);
1212
- if (!this.activeCard) {
1213
- this.pendingCardFocusElement = null;
1214
- root.style.visibility = '';
1215
- return;
1216
- }
1217
-
1218
- this.pendingCardFocusElement = null;
1219
-
1220
- const card = document.createElement('section');
1221
- card.className = 'comment-card';
1222
- card.addEventListener('click', (event) => {
1223
- if (
1224
- !this.reactionPicker
1225
- || event.target?.closest?.('.comment-reaction-picker-wrap')
1226
- ) {
1227
- return;
1228
- }
1229
-
1230
- this.reactionPicker = null;
1231
- requestAnimationFrame(() => {
1232
- if (this.activeCard) {
1233
- this.renderCard();
1234
- }
1235
- });
1236
- });
1237
-
1238
- const header = document.createElement('div');
1239
- header.className = 'ui-record-header comment-card-header';
1240
-
1241
- const titleWrap = document.createElement('div');
1242
- titleWrap.className = 'comment-card-title-wrap';
1243
-
1244
- const title = document.createElement('h3');
1245
- title.className = 'comment-card-title';
1246
- title.textContent = this.activeCard.mode === 'create' ? 'New comment' : 'Comment threads';
1247
-
1248
- const meta = document.createElement('p');
1249
- meta.className = 'comment-card-meta';
1250
- meta.textContent = formatAnchorLabel(this.activeCard.anchor);
1251
-
1252
- titleWrap.append(title, meta);
1253
-
1254
- const closeButton = document.createElement('button');
1255
- closeButton.type = 'button';
1256
- closeButton.className = 'ui-button ui-button--compact btn btn-ghost ui-pill-button ui-action-pill comment-card-close';
1257
- closeButton.setAttribute('aria-label', 'Close comments');
1258
- closeButton.textContent = 'Close';
1259
- closeButton.addEventListener('click', () => this.closeCard());
1260
-
1261
- header.append(titleWrap, closeButton);
1262
- card.appendChild(header);
1263
-
1264
- const content = document.createElement('div');
1265
- content.className = 'comment-card-scroll';
1266
-
1267
- if (this.activeCard.anchor?.quote) {
1268
- const quote = document.createElement('p');
1269
- quote.className = 'comment-card-quote';
1270
- quote.textContent = this.activeCard.anchor.quote;
1271
- content.appendChild(quote);
1272
- }
1273
-
1274
- if (this.activeCard.mode === 'create') {
1275
- content.appendChild(this.createComposer());
1276
- } else {
1277
- const group = this.getThreadGroups().find((entry) => entry.key === this.activeCard.groupKey);
1278
- if (!group) {
1279
- this.closeCard();
1280
- return;
1281
- }
1282
-
1283
- group.threads.forEach((thread) => {
1284
- content.appendChild(this.createThreadElement(thread));
1285
- });
1286
- }
1287
-
1288
- root.style.visibility = 'hidden';
1289
- card.appendChild(content);
1290
- root.appendChild(card);
1291
- this.updateReactionPickerPosition(card);
1292
- this.positionCard(card);
1293
- root.style.visibility = '';
1294
- this.flushPendingCardFocus();
1295
- this.scheduleLayoutRefresh();
1296
- }
1297
-
1298
- getPreviewGroupKeysForTarget(target) {
1299
- if (!(target instanceof Node)) {
1300
- return [];
1301
- }
1302
-
1303
- const keyCarrier = target.closest?.('[data-comment-preview-group-keys]');
1304
- return serializeGroupKeys(
1305
- String(keyCarrier?.dataset?.commentPreviewGroupKeys ?? '')
1306
- .split(/\s+/)
1307
- .filter(Boolean),
1308
- ).split(' ').filter(Boolean);
1309
- }
1310
-
1311
- getPreviewGroupKeysAtPoint(x, y) {
1312
- if (!Number.isFinite(x) || !Number.isFinite(y)) {
1313
- return [];
1314
- }
1315
-
1316
- const targetAtPoint = document.elementFromPoint(x, y);
1317
- const targetKeys = this.getPreviewGroupKeysForTarget(targetAtPoint);
1318
- if (targetKeys.length > 0) {
1319
- return targetKeys;
1320
- }
1321
-
1322
- const matchingKeys = this.previewHoverRegions
1323
- .filter((region) => region.rects.some((rect) => pointIntersectsRect(x, y, rect)))
1324
- .map((region) => region.key);
1325
- return normalizeGroupKeys(matchingKeys);
1326
- }
1327
-
1328
- updateHoveredPreviewGroups(nextKeys = []) {
1329
- const normalizedKeys = normalizeGroupKeys(nextKeys);
1330
- const signature = normalizedKeys.join(' ');
1331
- if (signature === this.hoveredPreviewGroupKeysSignature) {
1332
- return;
1333
- }
1334
-
1335
- this.hoveredPreviewGroupKeys = normalizedKeys;
1336
- this.hoveredPreviewGroupKeysSignature = signature;
1337
- this.scheduleLayoutRefresh();
1338
- }
1339
-
1340
- updateHoveredEditorGroups(nextKeys = []) {
1341
- const normalizedKeys = normalizeGroupKeys(nextKeys);
1342
- const signature = normalizedKeys.join(' ');
1343
- if (signature === this.hoveredEditorGroupKeysSignature) {
1344
- return;
1345
- }
1346
-
1347
- this.hoveredEditorGroupKeys = normalizedKeys;
1348
- this.hoveredEditorGroupKeysSignature = signature;
1349
- this.scheduleLayoutRefresh();
1350
- }
1351
-
1352
- syncHoveredPreviewGroupsFromTarget(target) {
1353
- this.updateHoveredPreviewGroups(this.getPreviewGroupKeysForTarget(target));
1354
- }
1355
-
1356
- shouldRenderPassivePreviewMarkers() {
1357
- const previewWidth = this.previewContainer?.clientWidth ?? this.previewElement?.clientWidth ?? 0;
1358
- return window.innerWidth >= COMMENT_PREVIEW_RAIL_BREAKPOINT && previewWidth >= COMMENT_PREVIEW_RAIL_MIN_WIDTH;
1359
- }
1360
-
1361
- updateReactionPickerPosition(card) {
1362
- const bounds = getReactionPickerBounds(card);
1363
- if (!bounds) {
1364
- return;
1365
- }
1366
-
1367
- const { picker, scroll, wrap } = bounds;
1368
- picker.classList.remove('is-upward');
1369
- picker.style.maxHeight = '';
1370
-
1371
- const wrapRect = wrap.getBoundingClientRect();
1372
- const scrollRect = scroll.getBoundingClientRect();
1373
- const pickerRect = picker.getBoundingClientRect();
1374
- const safeViewportTop = 12;
1375
- const safeViewportBottom = window.innerHeight - 12;
1376
- const lowerBoundary = Math.min(scrollRect.bottom, safeViewportBottom);
1377
- const upperBoundary = Math.max(scrollRect.top, safeViewportTop);
1378
- const availableBelow = Math.max(lowerBoundary - wrapRect.bottom - 8, 0);
1379
- const availableAbove = Math.max(wrapRect.top - upperBoundary - 8, 0);
1380
- const shouldOpenUpward = pickerRect.height > availableBelow && availableAbove > availableBelow;
1381
- const maxHeight = Math.max((shouldOpenUpward ? availableAbove : availableBelow), 120);
1382
-
1383
- picker.classList.toggle('is-upward', shouldOpenUpward);
1384
- picker.style.maxHeight = `${maxHeight}px`;
1385
- }
1386
-
1387
- repositionActiveCard() {
1388
- const card = this.cardRoot?.firstElementChild;
1389
- if (!card || !this.activeCard) {
1390
- if (this.cardRoot) {
1391
- this.cardRoot.style.visibility = '';
1392
- }
1393
- return;
1394
- }
1395
-
1396
- this.positionCard(card);
1397
- this.cardRoot.style.visibility = '';
1398
- this.flushPendingCardFocus();
1399
- }
1400
-
1401
- createComposer() {
1402
- const form = document.createElement('form');
1403
- form.className = 'comment-card-form';
1404
-
1405
- const textarea = document.createElement('textarea');
1406
- textarea.className = 'input comment-card-input';
1407
- textarea.rows = 4;
1408
- textarea.maxLength = COMMENT_BODY_MAX_LENGTH;
1409
- textarea.placeholder = 'Add context, feedback, or a question...';
1410
-
1411
- const actions = document.createElement('div');
1412
- actions.className = 'ui-record-actions comment-card-actions';
1413
-
1414
- const cancel = document.createElement('button');
1415
- cancel.type = 'button';
1416
- cancel.className = 'ui-button btn btn-secondary';
1417
- cancel.textContent = 'Cancel';
1418
- cancel.addEventListener('click', () => this.closeCard());
1419
-
1420
- const submit = document.createElement('button');
1421
- submit.type = 'submit';
1422
- submit.className = 'ui-button btn btn-primary';
1423
- submit.textContent = 'Post comment';
1424
-
1425
- actions.append(cancel, submit);
1426
- form.append(textarea, actions);
1427
-
1428
- form.addEventListener('submit', async (event) => {
1429
- event.preventDefault();
1430
- const threadId = await this.onCreateThread?.({
1431
- anchor: this.activeCard?.anchor,
1432
- body: textarea.value,
1433
- });
1434
- if (!threadId) {
1435
- textarea.focus();
1436
- return;
1437
- }
1438
-
1439
- this.closeCard();
1440
- });
1441
-
1442
- this.pendingCardFocusElement = textarea;
1443
- return form;
1444
- }
1445
-
1446
- createThreadElement(thread) {
1447
- const article = document.createElement('article');
1448
- article.className = 'comment-thread-card';
1449
-
1450
- const header = document.createElement('div');
1451
- header.className = 'ui-record-header comment-thread-card-header';
1452
-
1453
- const heading = document.createElement('div');
1454
- heading.className = 'comment-thread-card-heading';
1455
-
1456
- const author = document.createElement('span');
1457
- author.className = 'comment-thread-card-author';
1458
- author.textContent = thread.createdByName;
1459
-
1460
- const time = document.createElement('span');
1461
- time.className = 'comment-thread-card-time';
1462
- time.textContent = this.formatTimestamp(thread.createdAt);
1463
-
1464
- const actions = document.createElement('div');
1465
- actions.className = 'ui-record-actions comment-thread-card-actions';
1466
-
1467
- const jump = document.createElement('button');
1468
- jump.type = 'button';
1469
- jump.className = 'ui-button ui-button--compact btn btn-ghost ui-pill-button ui-action-pill comment-thread-card-action';
1470
- jump.textContent = 'Jump';
1471
- jump.addEventListener('click', () => this.onNavigateToLine?.(thread.anchor?.startLine ?? 1));
1472
-
1473
- const reply = document.createElement('button');
1474
- reply.type = 'button';
1475
- reply.className = 'ui-button ui-button--compact btn btn-ghost ui-pill-button ui-action-pill comment-thread-card-action';
1476
- const isReplying = this.activeCard?.replyThreadId === thread.id;
1477
- reply.classList.toggle('is-active', isReplying);
1478
- reply.textContent = 'Reply';
1479
- reply.setAttribute('aria-pressed', String(isReplying));
1480
- reply.setAttribute('aria-label', isReplying ? 'Cancel reply' : 'Reply to thread');
1481
- reply.title = isReplying ? 'Cancel reply' : 'Reply to thread';
1482
- reply.addEventListener('click', () => {
1483
- this.activeCard = {
1484
- ...this.activeCard,
1485
- replyThreadId: isReplying ? null : thread.id,
1486
- };
1487
- this.renderCard();
1488
- });
1489
-
1490
- const resolve = document.createElement('button');
1491
- resolve.type = 'button';
1492
- resolve.className = 'ui-button ui-button--compact btn btn-ghost ui-pill-button ui-action-pill comment-thread-card-action is-danger';
1493
- resolve.textContent = 'Resolve';
1494
- resolve.addEventListener('click', async () => {
1495
- await this.onResolveThread?.(thread.id);
1496
- });
1497
-
1498
- actions.append(jump, reply, resolve);
1499
- heading.append(author, time);
1500
- header.append(heading, actions);
1501
-
1502
- article.append(header);
1503
-
1504
- thread.messages.forEach((message) => {
1505
- article.appendChild(this.createMessageElement(thread, message));
1506
- });
1507
-
1508
- if (this.activeCard?.replyThreadId === thread.id) {
1509
- article.appendChild(this.createReplyComposer(thread));
1510
- }
1511
-
1512
- return article;
1513
- }
1514
-
1515
- createMessageElement(thread, message) {
1516
- const container = document.createElement('div');
1517
- container.className = 'comment-message-card';
1518
-
1519
- const meta = document.createElement('div');
1520
- meta.className = 'ui-record-meta comment-message-card-meta';
1521
-
1522
- const author = document.createElement('span');
1523
- author.className = 'comment-message-card-author';
1524
- author.textContent = message.userName;
1525
-
1526
- const time = document.createElement('span');
1527
- time.className = 'comment-message-card-time';
1528
- time.textContent = this.formatTimestamp(message.createdAt);
1529
-
1530
- const renderedBody = createRenderedCommentBody(
1531
- message.body,
1532
- 'comment-message-card-body comment-markdown',
1533
- );
1534
-
1535
- meta.append(author, time);
1536
- container.append(meta, renderedBody);
1537
- container.appendChild(this.createReactionBar(thread, message));
1538
- return container;
1539
- }
1540
-
1541
- createReactionBar(thread, message) {
1542
- const localUserId = this.session?.getLocalUser?.()?.userId ?? '';
1543
- const wrap = document.createElement('div');
1544
- wrap.className = 'comment-reaction-bar';
1545
-
1546
- const existingReactionEmojis = new Set((message.reactions ?? []).map((reaction) => reaction.emoji));
1547
-
1548
- const chips = document.createElement('div');
1549
- chips.className = 'comment-reaction-chips';
1550
-
1551
- (message.reactions ?? []).forEach((reaction) => {
1552
- const chip = document.createElement('button');
1553
- chip.type = 'button';
1554
- chip.className = 'ui-chip-button ui-chip-button--comment comment-reaction-chip';
1555
- chip.classList.toggle('is-active', hasLocalReaction(reaction, localUserId));
1556
- chip.setAttribute('aria-pressed', String(hasLocalReaction(reaction, localUserId)));
1557
- chip.title = reaction.users?.map((user) => user.userName).join(', ') || reaction.emoji;
1558
-
1559
- const emoji = document.createElement('span');
1560
- emoji.className = 'comment-reaction-chip-emoji';
1561
- emoji.textContent = reaction.emoji;
1562
-
1563
- const count = document.createElement('span');
1564
- count.className = 'comment-reaction-chip-count';
1565
- count.textContent = formatReactionCount(reaction);
1566
-
1567
- chip.append(emoji, count);
1568
- chip.addEventListener('click', async () => {
1569
- await this.onToggleReaction?.(thread.id, message.id, reaction.emoji);
1570
- });
1571
- chips.appendChild(chip);
1572
- });
1573
-
1574
- const actions = document.createElement('div');
1575
- actions.className = 'comment-reaction-actions';
1576
-
1577
- COMMENT_REACTION_PRESET_EMOJIS
1578
- .filter((emoji) => !existingReactionEmojis.has(emoji))
1579
- .forEach((emoji) => {
1580
- actions.appendChild(this.createQuickReactionButton(thread, message, emoji));
1581
- });
1582
-
1583
- const pickerWrap = document.createElement('div');
1584
- pickerWrap.className = 'comment-reaction-picker-wrap';
1585
-
1586
- const moreButton = document.createElement('button');
1587
- moreButton.type = 'button';
1588
- moreButton.className = 'ui-chip-button ui-chip-button--comment comment-reaction-more-trigger';
1589
- moreButton.dataset.reactionPickerToggle = 'true';
1590
- moreButton.setAttribute('aria-expanded', String(
1591
- isReactionPickerOpen(this.reactionPicker, thread.id, message.id),
1592
- ));
1593
- moreButton.textContent = 'More';
1594
- moreButton.addEventListener('click', () => {
1595
- const isOpen = isReactionPickerOpen(this.reactionPicker, thread.id, message.id);
1596
- this.reactionPicker = isOpen
1597
- ? null
1598
- : {
1599
- messageId: message.id,
1600
- threadId: thread.id,
1601
- };
1602
- this.renderCard();
1603
- });
1604
-
1605
- pickerWrap.appendChild(moreButton);
1606
-
1607
- if (isReactionPickerOpen(this.reactionPicker, thread.id, message.id)) {
1608
- pickerWrap.appendChild(this.createReactionPicker(thread, message));
1609
- }
1610
-
1611
- actions.appendChild(pickerWrap);
1612
- wrap.append(chips, actions);
1613
- return wrap;
1614
- }
1615
-
1616
- createQuickReactionButton(thread, message, emoji) {
1617
- const button = document.createElement('button');
1618
- button.type = 'button';
1619
- button.className = 'ui-icon-chip ui-icon-chip--comment comment-reaction-quick-add';
1620
- button.textContent = emoji;
1621
- button.title = `React with ${emoji}`;
1622
- button.addEventListener('click', async () => {
1623
- await this.onToggleReaction?.(thread.id, message.id, emoji);
1624
- });
1625
- return button;
1626
- }
1627
-
1628
- createReactionPicker(thread, message) {
1629
- const picker = document.createElement('div');
1630
- picker.className = 'comment-reaction-picker';
1631
- const moreGrid = document.createElement('div');
1632
- moreGrid.className = 'comment-reaction-picker-grid';
1633
- COMMENT_REACTION_MORE_EMOJIS.forEach((emoji) => {
1634
- moreGrid.appendChild(this.createReactionPickerButton(thread, message, emoji));
1635
- });
1636
- picker.appendChild(moreGrid);
1637
-
1638
- return picker;
1639
- }
1640
-
1641
- createReactionPickerButton(thread, message, emoji) {
1642
- const button = document.createElement('button');
1643
- button.type = 'button';
1644
- button.className = 'ui-icon-chip ui-icon-chip--comment comment-reaction-picker-btn';
1645
- button.textContent = emoji;
1646
- button.title = `React with ${emoji}`;
1647
- button.addEventListener('click', async () => {
1648
- const didToggle = await this.onToggleReaction?.(thread.id, message.id, emoji);
1649
- if (didToggle) {
1650
- this.reactionPicker = null;
1651
- this.renderCard();
1652
- }
1653
- });
1654
- return button;
1655
- }
1656
-
1657
- createReplyComposer(thread) {
1658
- const form = document.createElement('form');
1659
- form.className = 'comment-reply-form';
1660
-
1661
- const textarea = document.createElement('textarea');
1662
- textarea.className = 'input comment-card-input';
1663
- textarea.rows = 3;
1664
- textarea.maxLength = COMMENT_BODY_MAX_LENGTH;
1665
- textarea.placeholder = 'Reply to thread...';
1666
-
1667
- const actions = document.createElement('div');
1668
- actions.className = 'ui-record-actions comment-card-actions';
1669
-
1670
- const cancel = document.createElement('button');
1671
- cancel.type = 'button';
1672
- cancel.className = 'ui-button btn btn-secondary';
1673
- cancel.textContent = 'Cancel';
1674
- cancel.addEventListener('click', () => {
1675
- this.activeCard = {
1676
- ...this.activeCard,
1677
- replyThreadId: null,
1678
- };
1679
- this.renderCard();
1680
- });
1681
-
1682
- const submit = document.createElement('button');
1683
- submit.type = 'submit';
1684
- submit.className = 'ui-button btn btn-primary';
1685
- submit.textContent = 'Reply';
1686
-
1687
- actions.append(cancel, submit);
1688
- form.append(textarea, actions);
1689
- this.pendingCardFocusElement = textarea;
1690
-
1691
- form.addEventListener('submit', async (event) => {
1692
- event.preventDefault();
1693
- const messageId = await this.onReplyToThread?.(thread.id, textarea.value);
1694
- if (!messageId) {
1695
- textarea.focus();
1696
- return;
1697
- }
1698
-
1699
- this.activeCard = {
1700
- ...this.activeCard,
1701
- replyThreadId: null,
1702
- };
1703
- this.renderCard();
1704
- });
1705
-
1706
- return form;
1707
- }
1708
-
1709
- positionCard(card) {
1710
- const sourceRect = this.updateCardSourceRect();
1711
- const viewportWidth = window.innerWidth;
1712
- const viewportHeight = window.innerHeight;
1713
- const cardRect = card.getBoundingClientRect();
1714
- const fallbackLeft = clamp((viewportWidth - cardRect.width) / 2, 16, viewportWidth - cardRect.width - 16);
1715
- const fallbackTop = clamp((viewportHeight - cardRect.height) / 4, 16, viewportHeight - cardRect.height - 16);
1716
-
1717
- let left = fallbackLeft;
1718
- let top = fallbackTop;
1719
-
1720
- if (sourceRect) {
1721
- left = clamp(
1722
- sourceRect.left,
1723
- 16,
1724
- viewportWidth - Math.min(cardRect.width, COMMENT_CARD_WIDTH) - 16,
1725
- );
1726
- top = sourceRect.bottom + COMMENT_CARD_OFFSET;
1727
- if (top + cardRect.height > viewportHeight - 16) {
1728
- top = Math.max(sourceRect.top - cardRect.height - COMMENT_CARD_OFFSET, 16);
1729
- }
1730
- }
1731
-
1732
- this.cardRoot.style.left = `${left}px`;
1733
- this.cardRoot.style.top = `${top}px`;
1734
- this.cardRoot.style.width = `${Math.min(Math.max(cardRect.width, COMMENT_CARD_WIDTH), viewportWidth - 32)}px`;
1735
- }
1736
-
1737
- formatTimestamp(value) {
1738
- if (!Number.isFinite(value)) {
1739
- return '';
1740
- }
1741
-
1742
- try {
1743
- return this.timeFormatter.format(new Date(value));
1744
- } catch {
1745
- return '';
1746
- }
1747
- }
1748
-
1749
- flushPendingCardFocus() {
1750
- const element = this.pendingCardFocusElement;
1751
- if (!(element instanceof HTMLElement) || !element.isConnected) {
1752
- this.pendingCardFocusElement = null;
1753
- return;
1754
- }
1755
-
1756
- this.pendingCardFocusElement = null;
1757
- const focusElement = () => {
1758
- if (!element.isConnected) {
1759
- return;
1760
- }
1761
-
1762
- const activeElement = document.activeElement;
1763
- if (activeElement instanceof HTMLElement && this.editorContainer?.contains(activeElement)) {
1764
- activeElement.blur();
1765
- }
1766
-
1767
- element.focus({ preventScroll: true });
1768
- };
1769
-
1770
- focusElement();
1771
- if (document.activeElement === element) {
1772
- return;
1773
- }
1774
-
1775
- requestAnimationFrame(() => {
1776
- focusElement();
1777
- if (document.activeElement !== element) {
1778
- setTimeout(() => {
1779
- focusElement();
1780
- }, 50);
1781
- }
1782
- });
1783
- }
1784
-
1785
- clearSelectionRevealTimer() {
1786
- if (!this.selectionRevealTimer) {
1787
- return;
1788
- }
1789
-
1790
- clearTimeout(this.selectionRevealTimer);
1791
- this.selectionRevealTimer = 0;
1792
- }
1793
-
1794
- scheduleSelectionReveal(anchor) {
1795
- this.clearSelectionRevealTimer();
1796
- this.selectionRevealTimer = window.setTimeout(() => {
1797
- this.selectionRevealTimer = 0;
1798
- if (
1799
- this.pointerSelecting
1800
- || this.activeCard?.mode === 'create'
1801
- || !areAnchorsEqual(this.pendingSelectionAnchor, anchor)
1802
- ) {
1803
- return;
1804
- }
1805
-
1806
- this.committedSelectionAnchor = anchor;
1807
- this.scheduleLayoutRefresh();
1808
- }, COMMENT_SELECTION_REVEAL_DELAY_MS);
1809
- }
1810
- }
232
+ Object.assign(
233
+ CommentUiController.prototype,
234
+ commentUiStateMethods,
235
+ commentUiRenderMethods,
236
+ commentUiLayoutMethods,
237
+ commentUiCardMethods,
238
+ );