@vite-hub/ui 0.1.0 → 0.4.1

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 (314) hide show
  1. package/README.md +247 -21
  2. package/dist/attachments-BzTwqRTU.js +90 -0
  3. package/dist/{avatar-stack-DXmCQhxd.d.ts → avatar-stack-DPRFuezh.d.ts} +1 -1
  4. package/dist/choices-input-ByXJvDn1.d.ts +94 -0
  5. package/dist/{code-view-J4OsgEdh.js → code-view-DsU-xzic.js} +20 -4
  6. package/dist/colors-BghReA9C-CjF9gnmy.js +28 -0
  7. package/dist/comment-attachments-C4yNbcx5.js +20 -0
  8. package/dist/comment-composer-fINL5bxo.d.ts +243 -0
  9. package/dist/comment-composer-jYv2ULNP.js +591 -0
  10. package/dist/comment-layer-C_sbPIR5.d.ts +176 -0
  11. package/dist/comment-list-BcSaLngS.d.ts +62 -0
  12. package/dist/comment-marks.css +234 -0
  13. package/dist/comment-panel-CfvdRUMX.d.ts +208 -0
  14. package/dist/comment-person-CLPlW_SS.js +40 -0
  15. package/dist/comment-pin-DHOdRvUw.d.ts +68 -0
  16. package/dist/comment-row-Bn3nr8l5.js +39 -0
  17. package/dist/comment-selection-bar-CyVBNYl9.d.ts +42 -0
  18. package/dist/comment-thread-DKJjmWN0.d.ts +385 -0
  19. package/dist/comment-visibility-DsVuVndP.d.ts +40 -0
  20. package/dist/{comments-C08J3z4e.js → comments-D0d26ghV.js} +210 -59
  21. package/dist/comments-D8hulVPy.d.ts +198 -0
  22. package/dist/comments-context-C2lOZyQ5.js +38 -0
  23. package/dist/config-DgxBW013.d.ts +80 -0
  24. package/dist/config-Dk67emQt.js +63 -0
  25. package/dist/copy-button-CRN3kmSD.js +253 -0
  26. package/dist/draw-DzSmD7uo-Dwz8zoH2.js +72976 -0
  27. package/dist/editor-C_wt4RRV.js +582 -0
  28. package/dist/error-diagnostics-SXtnk6bz.js +38 -0
  29. package/dist/{file-tree-C1pv4_AI.js → file-tree-C4OYgbV-.js} +292 -145
  30. package/dist/{file-tree-Ctb8hZ_g.d.ts → file-tree-DlT9RGhu.d.ts} +51 -15
  31. package/dist/format-orwcdZL_.js +39 -0
  32. package/dist/handlers-DMl-Na3x.js +182 -0
  33. package/dist/headless.d.ts +5 -176
  34. package/dist/headless.js +5 -3
  35. package/dist/icon-swap.css +69 -0
  36. package/dist/{image-preview-VfknBEFu.js → image-preview-C9tdkmEj.js} +8 -5
  37. package/dist/{index-DcH0QSI5.d.ts → index-BYRFQfCd.d.ts} +14 -0
  38. package/dist/{code-view-vDM-hph-.d.ts → index-CNY1uNTh.d.ts} +14 -228
  39. package/dist/index.d.ts +55 -57
  40. package/dist/index.js +678 -25
  41. package/dist/markdown-editor-CMbNZOdN.js +2394 -0
  42. package/dist/markdown-editor-wQF0yD5o.d.ts +195 -0
  43. package/dist/markdown-editor.d.ts +108 -0
  44. package/dist/markdown-editor.js +3 -0
  45. package/dist/message-scroller-jrYN9dG9.d.ts +175 -0
  46. package/dist/nuxt-ui-DSQFzq3s.js +38 -0
  47. package/dist/nuxt.d.ts +84 -2
  48. package/dist/nuxt.js +243 -35
  49. package/dist/parts/components/agent-session.d.ts +254 -0
  50. package/dist/parts/components/agent-session.js +640 -0
  51. package/dist/{attachment-BBndG9_P.d.ts → parts/components/attachment.d.ts} +14 -15
  52. package/dist/{attachment-B3dXC7jM.js → parts/components/attachment.js} +6 -4
  53. package/dist/{avatar-stack.d.ts → parts/components/avatar-stack.d.ts} +1 -1
  54. package/dist/{avatar-stack-DM6HRnc0.js → parts/components/avatar-stack.js} +2 -5
  55. package/dist/{bubble-BJH2rfii.d.ts → parts/components/bubble.d.ts} +7 -8
  56. package/dist/{bubble-BPyFQlW7.js → parts/components/bubble.js} +2 -2
  57. package/dist/{chat-message-mpDmZbIC.d.ts → parts/components/chat-message.d.ts} +2 -3
  58. package/dist/{chat-message-BNK9G7xF.js → parts/components/chat-message.js} +4 -4
  59. package/dist/{chat-session-D6C7VJBR.d.ts → parts/components/chat-session.d.ts} +3 -4
  60. package/dist/{chat-session-DYEHB1HC.js → parts/components/chat-session.js} +2 -2
  61. package/dist/{chat-B9HlZWA2.d.ts → parts/components/chat.d.ts} +8 -4
  62. package/dist/{chat-BoFHlu9V.js → parts/components/chat.js} +42 -9
  63. package/dist/{highlighted-code-Dzf6o54i.d.ts → parts/components/code-block.d.ts} +15 -23
  64. package/dist/{code-block-Br-02hn-.js → parts/components/code-block.js} +9 -38
  65. package/dist/parts/components/code-view.d.ts +270 -0
  66. package/dist/parts/components/code-view.js +2 -0
  67. package/dist/parts/components/comment-composer.d.ts +2 -0
  68. package/dist/parts/components/comment-composer.js +2 -0
  69. package/dist/parts/components/comment-layer.d.ts +2 -0
  70. package/dist/parts/components/comment-layer.js +631 -0
  71. package/dist/parts/components/comment-list.d.ts +2 -0
  72. package/dist/parts/components/comment-list.js +168 -0
  73. package/dist/parts/components/comment-panel.d.ts +2 -0
  74. package/dist/parts/components/comment-panel.js +311 -0
  75. package/dist/parts/components/comment-pin.d.ts +2 -0
  76. package/dist/parts/components/comment-pin.js +75 -0
  77. package/dist/parts/components/comment-selection-bar.d.ts +2 -0
  78. package/dist/parts/components/comment-selection-bar.js +116 -0
  79. package/dist/parts/components/comment-thread.d.ts +2 -0
  80. package/dist/parts/components/comment-thread.js +598 -0
  81. package/dist/parts/components/comments.d.ts +8 -0
  82. package/dist/parts/components/comments.js +9 -0
  83. package/dist/{connection-status-DjGBw6xX.d.ts → parts/components/connection-status.d.ts} +6 -7
  84. package/dist/{connection-status-CzuWBENf.js → parts/components/connection-status.js} +1 -1
  85. package/dist/parts/components/copy-button.d.ts +118 -0
  86. package/dist/parts/components/copy-button.js +2 -0
  87. package/dist/parts/components/device-frame.d.ts +130 -0
  88. package/dist/parts/components/device-frame.js +471 -0
  89. package/dist/parts/components/file-tree.d.ts +2 -0
  90. package/dist/parts/components/file-tree.js +2 -0
  91. package/dist/parts/components/filter-search.d.ts +47 -0
  92. package/dist/parts/components/filter-search.js +58 -0
  93. package/dist/parts/components/markdown-editor.d.ts +2 -0
  94. package/dist/parts/components/markdown-editor.js +2 -0
  95. package/dist/parts/components/markdown-renderer.d.ts +52 -0
  96. package/dist/parts/components/markdown-renderer.js +23077 -0
  97. package/dist/{markdown-Dse5ldJe.d.ts → parts/components/markdown.d.ts} +7 -7
  98. package/dist/parts/components/markdown.js +47 -0
  99. package/dist/{marker-ea-tvx-J.d.ts → parts/components/marker.d.ts} +6 -7
  100. package/dist/{marker-Di2ZG_k1.js → parts/components/marker.js} +2 -2
  101. package/dist/{message-parts-BBFUkluC.d.ts → parts/components/message-parts.d.ts} +2 -3
  102. package/dist/{message-parts-DQnfioAH.js → parts/components/message-parts.js} +6 -6
  103. package/dist/{message-CW_paC1k.d.ts → parts/components/message.d.ts} +8 -9
  104. package/dist/{message-DiyBthIq.js → parts/components/message.js} +2 -2
  105. package/dist/parts/components/patch-parsers.d.ts +2 -0
  106. package/dist/parts/components/patch-parsers.js +2 -0
  107. package/dist/{prompt-input-Cy_Ue6B5.d.ts → parts/components/prompt-input.d.ts} +53 -10
  108. package/dist/{prompt-input-BbnCb80O.js → parts/components/prompt-input.js} +66 -111
  109. package/dist/parts/components/relative-time.d.ts +73 -0
  110. package/dist/parts/components/relative-time.js +2 -0
  111. package/dist/parts/components/status.d.ts +60 -0
  112. package/dist/parts/components/status.js +48 -0
  113. package/dist/{sync-status-refELOZn.d.ts → parts/components/sync-status.d.ts} +5 -6
  114. package/dist/{sync-status-BpxYdZIJ.js → parts/components/sync-status.js} +1 -1
  115. package/dist/{tool-list-E7CA52rz.d.ts → parts/components/tool-list.d.ts} +3 -4
  116. package/dist/{tool-list-BdSr5CT4.js → parts/components/tool-list.js} +7 -38
  117. package/dist/{trace-run-COeXn46Z.d.ts → parts/components/trace-run.d.ts} +3 -4
  118. package/dist/{trace-run-BIQ17CED.js → parts/components/trace-run.js} +15 -23
  119. package/dist/{trace-V7rM3Pyd.d.ts → parts/components/trace.d.ts} +11 -12
  120. package/dist/{trace-llBCDiSW.js → parts/components/trace.js} +20 -13
  121. package/dist/parts/composables/attachments.d.ts +32 -0
  122. package/dist/parts/composables/attachments.js +2 -0
  123. package/dist/parts/composables/highlighted-code.d.ts +9 -0
  124. package/dist/{highlighted-code-Ck4zexJX.js → parts/composables/highlighted-code.js} +5 -2
  125. package/dist/parts/headless/choices-input.d.ts +2 -0
  126. package/dist/parts/headless/choices-input.js +162 -0
  127. package/dist/parts/headless/comment-visibility.d.ts +2 -0
  128. package/dist/parts/headless/comment-visibility.js +128 -0
  129. package/dist/parts/headless/comments.d.ts +2 -0
  130. package/dist/parts/headless/comments.js +2 -0
  131. package/dist/parts/headless/message-scroller.d.ts +2 -0
  132. package/dist/{message-scroller-CX6NJTdm.js → parts/headless/message-scroller.js} +2 -2
  133. package/dist/parts/playground/highlight.d.ts +5 -0
  134. package/dist/parts/playground/highlight.js +23 -0
  135. package/dist/parts/playground/paths.d.ts +4 -0
  136. package/dist/parts/playground/paths.js +7 -0
  137. package/dist/parts/playground/playground-render.d.ts +126 -0
  138. package/dist/parts/playground/playground-render.js +356 -0
  139. package/dist/parts/playground/share.d.ts +2 -0
  140. package/dist/parts/playground/share.js +92 -0
  141. package/dist/parts/playground/zip.d.ts +6 -0
  142. package/dist/parts/playground/zip.js +76 -0
  143. package/dist/parts/workspace/browser-support-notice.d.ts +76 -0
  144. package/dist/parts/workspace/browser-support-notice.js +105 -0
  145. package/dist/parts/workspace/codemirror.d.ts +16 -0
  146. package/dist/parts/workspace/codemirror.js +243 -0
  147. package/dist/parts/workspace/connect-panel.d.ts +129 -0
  148. package/dist/parts/workspace/connect-panel.js +285 -0
  149. package/dist/parts/workspace/connect-store.d.ts +26 -0
  150. package/dist/parts/workspace/connect-store.js +59 -0
  151. package/dist/parts/workspace/icons.d.ts +34 -0
  152. package/dist/parts/workspace/icons.js +46 -0
  153. package/dist/parts/workspace/playground-container.d.ts +192 -0
  154. package/dist/parts/workspace/playground-container.js +603 -0
  155. package/dist/parts/workspace/workspace-boot-status.d.ts +75 -0
  156. package/dist/parts/workspace/workspace-boot-status.js +207 -0
  157. package/dist/parts/workspace/workspace-editor.d.ts +43 -0
  158. package/dist/parts/workspace/workspace-editor.js +54 -0
  159. package/dist/parts/workspace/workspace-file-tree.d.ts +53 -0
  160. package/dist/parts/workspace/workspace-file-tree.js +68 -0
  161. package/dist/parts/workspace/workspace-preview.d.ts +72 -0
  162. package/dist/parts/workspace/workspace-preview.js +307 -0
  163. package/dist/parts/workspace/workspace-shell.d.ts +88 -0
  164. package/dist/parts/workspace/workspace-shell.js +291 -0
  165. package/dist/parts/workspace/workspace-terminal.d.ts +39 -0
  166. package/dist/parts/workspace/workspace-terminal.js +130 -0
  167. package/dist/payload-text-sjkYAwvw.js +32 -0
  168. package/dist/{pierre-code-view-T7V67hwT.js → pierre-code-view-NE35tkmR.js} +245 -102
  169. package/dist/{pierre-dark-DDWDl8g6.js → pierre-dark-CzUmjETS.js} +3 -1
  170. package/dist/{pierre-light-CWhW4NrH.js → pierre-light-Dn6E0sWv.js} +3 -1
  171. package/dist/playground.d.ts +4 -0
  172. package/dist/playground.js +4 -0
  173. package/dist/relative-time-BVmjOsYG.js +309 -0
  174. package/dist/rolldown-runtime-C9mWXvCC.js +29 -0
  175. package/dist/runtime/nuxt-plugin.js +23 -4
  176. package/dist/sankey-CAYwt82B-D4uDQoMR.js +2887 -0
  177. package/dist/share-DM4eNy4q.d.ts +37 -0
  178. package/dist/{slot-part-C7Ocxn3b.js → slot-part-Doic71uh.js} +7 -1
  179. package/dist/styles.css +2609 -620
  180. package/dist/temml-BilSAAws.js +12362 -0
  181. package/dist/theme-focus-ring.css +42 -0
  182. package/dist/theme.css +376 -0
  183. package/dist/theme.d.ts +355 -0
  184. package/dist/theme.js +265 -0
  185. package/dist/{types-CqDwuJAm.d.ts → types-Dj7vp0lZ.d.ts} +1 -1
  186. package/dist/vue-BDmSCtay.js +30779 -0
  187. package/dist/vue-DGstVdGn.js +2492 -0
  188. package/dist/workspace.d.ts +15 -0
  189. package/dist/workspace.js +12 -0
  190. package/package.json +135 -149
  191. package/dist/andromeeda-BASpqCeJ.js +0 -4
  192. package/dist/attachment.d.ts +0 -2
  193. package/dist/attachment.js +0 -2
  194. package/dist/aurora-x-DugsLcii.js +0 -4
  195. package/dist/avatar-stack.js +0 -2
  196. package/dist/ayu-dark-BT3qdi3o.js +0 -4
  197. package/dist/ayu-light-BVZyHoh9.js +0 -4
  198. package/dist/ayu-mirage-XFwUVZQZ.js +0 -4
  199. package/dist/bubble.d.ts +0 -2
  200. package/dist/bubble.js +0 -2
  201. package/dist/catppuccin-frappe-D20KODDN.js +0 -4
  202. package/dist/catppuccin-latte-eGLVHIUJ.js +0 -4
  203. package/dist/catppuccin-macchiato-bQGch4PY.js +0 -4
  204. package/dist/catppuccin-mocha-Bes8-0Mr.js +0 -4
  205. package/dist/chat-message.d.ts +0 -2
  206. package/dist/chat-message.js +0 -2
  207. package/dist/chat-session.d.ts +0 -2
  208. package/dist/chat-session.js +0 -2
  209. package/dist/chat.d.ts +0 -2
  210. package/dist/chat.js +0 -2
  211. package/dist/code-block.d.ts +0 -2
  212. package/dist/code-block.js +0 -3
  213. package/dist/code-view.d.ts +0 -2
  214. package/dist/code-view.js +0 -2
  215. package/dist/comment-layer-CBlxJ8eK.js +0 -1113
  216. package/dist/comments-ChNJkV1d.d.ts +0 -108
  217. package/dist/comments-Cq5eewsu.d.ts +0 -537
  218. package/dist/comments.d.ts +0 -2
  219. package/dist/comments.js +0 -2
  220. package/dist/config-Bux_AJzm.d.ts +0 -29
  221. package/dist/config-bHqE4JOs.js +0 -38
  222. package/dist/connection-status.d.ts +0 -2
  223. package/dist/connection-status.js +0 -2
  224. package/dist/dark-plus-BGuiqa1B.js +0 -4
  225. package/dist/dracula-0CVA2XY5.js +0 -4
  226. package/dist/dracula-soft-Dk9bpbVU.js +0 -4
  227. package/dist/error-diagnostics-B4hMpJRL.js +0 -13
  228. package/dist/everforest-dark-CRjTbhh5.js +0 -4
  229. package/dist/everforest-light-CEeYFLn8.js +0 -4
  230. package/dist/file-diff.d.ts +0 -2
  231. package/dist/file-diff.js +0 -2
  232. package/dist/file-tree.d.ts +0 -2
  233. package/dist/file-tree.js +0 -2
  234. package/dist/file-view.d.ts +0 -2
  235. package/dist/file-view.js +0 -2
  236. package/dist/github-dark-BXgKmOw_.js +0 -4
  237. package/dist/github-dark-default-DzJQXksd.js +0 -4
  238. package/dist/github-dark-dimmed-B1pEmGtS.js +0 -4
  239. package/dist/github-dark-high-contrast-BkHIa6jc.js +0 -4
  240. package/dist/github-light-BKRlUbaB.js +0 -4
  241. package/dist/github-light-default-BU3eYkzs.js +0 -4
  242. package/dist/github-light-high-contrast-B3MumDcI.js +0 -4
  243. package/dist/gruvbox-dark-hard-B0ecF443.js +0 -4
  244. package/dist/gruvbox-dark-medium-BQnpC39k.js +0 -4
  245. package/dist/gruvbox-dark-soft-DFZUgESr.js +0 -4
  246. package/dist/gruvbox-light-hard-CuB_LOJr.js +0 -4
  247. package/dist/gruvbox-light-medium-idDHgxjs.js +0 -4
  248. package/dist/gruvbox-light-soft-CfWH49MY.js +0 -4
  249. package/dist/horizon-bright-Ba6M8QSV.js +0 -4
  250. package/dist/horizon-h92C5OlZ.js +0 -4
  251. package/dist/houston-EQnPegWq.js +0 -4
  252. package/dist/kanagawa-dragon-DgDvwi3B.js +0 -4
  253. package/dist/kanagawa-lotus-BgoQro20.js +0 -4
  254. package/dist/kanagawa-wave-DgXEowHs.js +0 -4
  255. package/dist/laserwave-IxBH_3yW.js +0 -4
  256. package/dist/light-plus-S8JBx6is.js +0 -4
  257. package/dist/markdown-BoLBN0qH.js +0 -197
  258. package/dist/markdown.d.ts +0 -2
  259. package/dist/markdown.js +0 -2
  260. package/dist/marker.d.ts +0 -2
  261. package/dist/marker.js +0 -2
  262. package/dist/material-theme-D1f3HBq-.js +0 -4
  263. package/dist/material-theme-darker-ExzYhT0j.js +0 -4
  264. package/dist/material-theme-lighter-D6gH9nnA.js +0 -4
  265. package/dist/material-theme-ocean-D1w5BPAa.js +0 -4
  266. package/dist/material-theme-palenight-CkqWmVpF.js +0 -4
  267. package/dist/message-parts.d.ts +0 -2
  268. package/dist/message-parts.js +0 -2
  269. package/dist/message.d.ts +0 -2
  270. package/dist/message.js +0 -2
  271. package/dist/min-dark-npsJH98j.js +0 -4
  272. package/dist/min-light-DUk1XsVt.js +0 -4
  273. package/dist/monokai-CfFRWUNl.js +0 -4
  274. package/dist/multi-file-diff.d.ts +0 -2
  275. package/dist/multi-file-diff.js +0 -2
  276. package/dist/night-owl-BS7V-av_.js +0 -4
  277. package/dist/night-owl-light-CZtRawYE.js +0 -4
  278. package/dist/nord-BFh54Nqz.js +0 -4
  279. package/dist/one-dark-pro-zDovGosB.js +0 -4
  280. package/dist/one-light-gmHK3iK6.js +0 -4
  281. package/dist/patch-diff.d.ts +0 -2
  282. package/dist/patch-diff.js +0 -2
  283. package/dist/plastic-DtdaCjub.js +0 -4
  284. package/dist/poimandres-Hdda6aHK.js +0 -4
  285. package/dist/primitive-rail.d.ts +0 -222
  286. package/dist/primitive-rail.js +0 -348
  287. package/dist/prompt-input.d.ts +0 -2
  288. package/dist/prompt-input.js +0 -2
  289. package/dist/red-VqZFRByZ.js +0 -4
  290. package/dist/rose-pine-DiTkEueR.js +0 -4
  291. package/dist/rose-pine-dawn-tfo5y2X0.js +0 -4
  292. package/dist/rose-pine-moon-C0gON9XN.js +0 -4
  293. package/dist/runtime-type-DlCscMfw.js +0 -59
  294. package/dist/slack-dark-v8P_eXr6.js +0 -4
  295. package/dist/slack-ochin-D8SyEdKz.js +0 -4
  296. package/dist/snazzy-light-BtkQkvXb.js +0 -4
  297. package/dist/solarized-dark-B8nAdMfM.js +0 -4
  298. package/dist/solarized-light-B-3F1INj.js +0 -4
  299. package/dist/sync-status.d.ts +0 -2
  300. package/dist/sync-status.js +0 -2
  301. package/dist/synthwave-84-DcsXCF_c.js +0 -4
  302. package/dist/tokyo-night-Bvpqduda.js +0 -4
  303. package/dist/tool-list.d.ts +0 -2
  304. package/dist/tool-list.js +0 -2
  305. package/dist/trace-run.d.ts +0 -2
  306. package/dist/trace-run.js +0 -2
  307. package/dist/trace.d.ts +0 -2
  308. package/dist/trace.js +0 -2
  309. package/dist/unresolved-file.d.ts +0 -2
  310. package/dist/unresolved-file.js +0 -2
  311. package/dist/vesper-CfxmMOy3.js +0 -4
  312. package/dist/vitesse-black-D9-_1mjV.js +0 -4
  313. package/dist/vitesse-dark-DlSMLlr9.js +0 -4
  314. package/dist/vitesse-light-KRWWWztf.js +0 -4
@@ -1,108 +0,0 @@
1
- import { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef } from "vue";
2
- import { AnchorPoint, AnchorPosition, AnchorTarget, CommentAnchor, CommentSubject, CommentThread, CommentUser, CommentsClient, CommentsClientStatus, CreateAnchorOptions } from "@vite-hub/comments/client";
3
- //#region src/headless/comments.d.ts
4
- /** Each switch shows one kind of thread. Resolved threads stay hidden until `resolved` is on. */
5
- interface CommentFilterState {
6
- open: boolean;
7
- resolved: boolean;
8
- /** Only threads that the signed-in user started. */
9
- mine: boolean;
10
- }
11
- /** `page` lists the threads of this page. `site` lists the threads of every page. */
12
- type CommentScope = "page" | "site";
13
- /** A comment that is being written. It becomes a thread when it is sent. */
14
- interface CommentDraft {
15
- anchor: CommentAnchor;
16
- /** Where the click landed in client coordinates. The pin sits here until its element is measured. */
17
- point: AnchorPoint;
18
- body: string;
19
- mentions: string[];
20
- busy: boolean;
21
- error: string | undefined;
22
- }
23
- interface UseCommentsOptions {
24
- client: CommentsClient;
25
- /** What the threads of this page are about. For a page, `{ kind: "page", id: location.pathname }`. */
26
- subject: MaybeRefOrGetter<CommentSubject>;
27
- /** The signed-in user. Defaults to `client.user`. */
28
- user?: MaybeRefOrGetter<CommentUser | undefined>;
29
- /** Where anchors are looked up. Defaults to the document. */
30
- root?: MaybeRefOrGetter<ParentNode | undefined>;
31
- /** The query parameter that deep-links a thread. Default `"comment"`. */
32
- param?: string;
33
- /** The key that toggles comment mode. Default `"c"`. `false` turns the key off. */
34
- hotkey?: string | false;
35
- /** Elements that anchors skip. Defaults to the comment UI. */
36
- ignore?: (element: Element) => boolean;
37
- /** Where the comment UI lives: the document, or the shadow root of the overlay. Composers are looked up there. Defaults to the document. */
38
- uiRoot?: MaybeRefOrGetter<ParentNode | undefined>;
39
- /** The URL of the page that a subject lives on, for a link to a thread. Page subjects use their id as the path. Other subjects need this, or their link is the current page. */
40
- subjectUrl?: (subject: CommentSubject) => string | undefined;
41
- /** Where the deep link is read. Defaults to `window.location`. */
42
- location?: () => Pick<Location, "href" | "origin" | "search">;
43
- /** Load the threads and listen for keys when the component mounts. Default `true`. Call `start()` yourself when `false`. */
44
- autoStart?: boolean;
45
- }
46
- interface CommentsState {
47
- readonly client: CommentsClient;
48
- readonly subject: ComputedRef<CommentSubject>;
49
- readonly user: ComputedRef<CommentUser | undefined>;
50
- /** Comment mode: a click drops a pin. */
51
- readonly active: Ref<boolean>;
52
- readonly scope: Ref<CommentScope>;
53
- readonly filters: CommentFilterState;
54
- readonly status: Ref<CommentsClientStatus>;
55
- /** Every thread that the client holds. */
56
- readonly threads: ShallowRef<readonly CommentThread[]>;
57
- /** The threads of this page that pass the filters. They get pins. */
58
- readonly pageThreads: ComputedRef<CommentThread[]>;
59
- /** The threads that pass the filters, for the page or the whole site as `scope` says. The list shows them. */
60
- readonly listed: ComputedRef<CommentThread[]>;
61
- readonly counts: ComputedRef<{
62
- open: number;
63
- resolved: number;
64
- }>;
65
- /** Pin positions by thread id, and `"draft"` for the comment being written. */
66
- readonly positions: ShallowRef<ReadonlyMap<string, AnchorPosition>>;
67
- readonly draft: Ref<CommentDraft | null>;
68
- readonly openId: Ref<string | null>;
69
- readonly hoverId: Ref<string | null>;
70
- readonly opened: ComputedRef<CommentThread | undefined>;
71
- readonly listOpen: Ref<boolean>;
72
- /** Goes up when a composer with text stopped a click or a key. The composer shakes by itself. */
73
- readonly blocked: Ref<number>;
74
- enter: () => void;
75
- exit: () => void;
76
- toggle: () => void;
77
- /** Starts a draft on a point, an element, a selection, or `"page"`. Ends an empty draft first, and keeps one with text. A pin has no number until the server assigns one. */
78
- startDraft: (target: AnchorTarget, options?: CreateAnchorOptions) => void;
79
- cancelDraft: () => void;
80
- /** Sends the draft. Resolves with the new thread, or `undefined` when there is nothing to send or the send failed. */
81
- send: () => Promise<CommentThread | undefined>;
82
- open: (thread: CommentThread | string, options?: {
83
- scroll?: boolean;
84
- }) => void;
85
- /** Closes the thread, returning false when unsent text prevents closing or navigation. */
86
- close: () => boolean;
87
- reply: (threadId: string, body: string, mentions?: string[]) => Promise<CommentThread>;
88
- edit: (threadId: string, messageId: string, body: string, mentions?: string[]) => Promise<CommentThread>;
89
- remove: (threadId: string, messageId?: string) => Promise<CommentThread | null>;
90
- resolve: (threadId: string) => Promise<CommentThread>;
91
- reopen: (threadId: string) => Promise<CommentThread>;
92
- users: (query: string) => Promise<CommentUser[]>;
93
- /** The URL that opens the thread: its page with `?comment=<n>`. */
94
- link: (thread: CommentThread) => string;
95
- /** Measures every pin again. The state does it on scroll, resize, and DOM changes. */
96
- measure: () => void;
97
- /** Loads the threads and starts the key, layout, and deep-link handling. Returns a function that stops them. */
98
- start: () => () => void;
99
- }
100
- declare const draftPositionKey = "draft";
101
- /** The comment state of one page. The styled parts, `CommentLayer` and the others, are built on it. */
102
- declare function useComments(options: UseCommentsOptions): CommentsState;
103
- /** Makes `state` the one that `CommentToolbar`, `CommentList`, and `CommentFilters` use inside this component tree. */
104
- declare function provideComments(state: CommentsState): void;
105
- /** The state that a comment part uses: the one you pass, else the one of the nearest `CommentLayer` or `provideComments()`. Call it in `setup()`. */
106
- declare function useCommentsContext(state?: CommentsState): CommentsState;
107
- //#endregion
108
- export { UseCommentsOptions as a, useComments as c, CommentsState as i, useCommentsContext as l, CommentFilterState as n, draftPositionKey as o, CommentScope as r, provideComments as s, CommentDraft as t };
@@ -1,537 +0,0 @@
1
- import { n as AvatarStackPerson } from "./avatar-stack-DXmCQhxd.js";
2
- import { i as CommentsState } from "./comments-ChNJkV1d.js";
3
- import { PropType } from "vue";
4
- import { CommentMessage, CommentStatus, CommentSubject, CommentThread, CommentUser, CommentsClient } from "@vite-hub/comments/client";
5
- //#region src/components/comment-composer.d.ts
6
- type CommentComposerVariant = "comment" | "reply" | "edit";
7
- /** What `submit` sends: the text and the ids of the people mentioned in it. */
8
- interface CommentComposerSubmit {
9
- body: string;
10
- mentions: string[];
11
- }
12
- declare const CommentComposer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
13
- modelValue: {
14
- default: string;
15
- type: StringConstructor;
16
- };
17
- /** The ids of the people mentioned so far. */
18
- mentions: {
19
- default: () => never[];
20
- type: PropType<string[]>;
21
- };
22
- /** Whose avatar shows beside the box. */
23
- user: {
24
- type: PropType<CommentUser>;
25
- };
26
- variant: {
27
- default: string;
28
- type: PropType<CommentComposerVariant>;
29
- };
30
- placeholder: {
31
- type: StringConstructor;
32
- };
33
- /** A send is running. The box keeps its text and cannot send again. */
34
- busy: {
35
- default: boolean;
36
- type: BooleanConstructor;
37
- };
38
- /** Why the last send failed. */
39
- error: {
40
- type: StringConstructor;
41
- };
42
- /** Focus the box when it appears. */
43
- autofocus: {
44
- default: boolean;
45
- type: BooleanConstructor;
46
- };
47
- /** Treat a click outside as a close, or as a shake when there is text. Turn it off when the parent decides. */
48
- guard: {
49
- default: boolean;
50
- type: BooleanConstructor;
51
- };
52
- /** People whose names the text may hold, such as the authors of a thread. Only mentions of a person whose `@name` is still in the text are sent. */
53
- people: {
54
- default: () => never[];
55
- type: PropType<CommentUser[]>;
56
- };
57
- /** Finds people for `@mentions`. Without it the box has no mention menu. */
58
- users: {
59
- type: PropType<(query: string) => Promise<CommentUser[]>>;
60
- };
61
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
62
- [key: string]: any;
63
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "submit" | "update:modelValue" | "update:mentions")[], "cancel" | "submit" | "update:modelValue" | "update:mentions", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
64
- modelValue: {
65
- default: string;
66
- type: StringConstructor;
67
- };
68
- /** The ids of the people mentioned so far. */
69
- mentions: {
70
- default: () => never[];
71
- type: PropType<string[]>;
72
- };
73
- /** Whose avatar shows beside the box. */
74
- user: {
75
- type: PropType<CommentUser>;
76
- };
77
- variant: {
78
- default: string;
79
- type: PropType<CommentComposerVariant>;
80
- };
81
- placeholder: {
82
- type: StringConstructor;
83
- };
84
- /** A send is running. The box keeps its text and cannot send again. */
85
- busy: {
86
- default: boolean;
87
- type: BooleanConstructor;
88
- };
89
- /** Why the last send failed. */
90
- error: {
91
- type: StringConstructor;
92
- };
93
- /** Focus the box when it appears. */
94
- autofocus: {
95
- default: boolean;
96
- type: BooleanConstructor;
97
- };
98
- /** Treat a click outside as a close, or as a shake when there is text. Turn it off when the parent decides. */
99
- guard: {
100
- default: boolean;
101
- type: BooleanConstructor;
102
- };
103
- /** People whose names the text may hold, such as the authors of a thread. Only mentions of a person whose `@name` is still in the text are sent. */
104
- people: {
105
- default: () => never[];
106
- type: PropType<CommentUser[]>;
107
- };
108
- /** Finds people for `@mentions`. Without it the box has no mention menu. */
109
- users: {
110
- type: PropType<(query: string) => Promise<CommentUser[]>>;
111
- };
112
- }>> & Readonly<{
113
- onCancel?: ((...args: any[]) => any) | undefined;
114
- onSubmit?: ((...args: any[]) => any) | undefined;
115
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
116
- "onUpdate:mentions"?: ((...args: any[]) => any) | undefined;
117
- }>, {
118
- people: CommentUser[];
119
- variant: CommentComposerVariant;
120
- modelValue: string;
121
- mentions: string[];
122
- busy: boolean;
123
- autofocus: boolean;
124
- guard: boolean;
125
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
126
- //#endregion
127
- //#region src/components/comment-layer.d.ts
128
- declare const CommentLayer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
129
- client: {
130
- type: PropType<CommentsClient>;
131
- };
132
- /** What the threads of this page are about. For a page, `{ kind: "page", id: "/pricing" }`. */
133
- subject: {
134
- type: PropType<CommentSubject>;
135
- };
136
- /** The signed-in user. Defaults to the client's user. */
137
- user: {
138
- type: PropType<CommentUser>;
139
- };
140
- /** A state from `useComments()`, instead of `client` and `subject`. */
141
- comments: {
142
- type: PropType<CommentsState>;
143
- };
144
- /** The people on this page, shown in the toolbar. */
145
- people: {
146
- default: () => never[];
147
- type: PropType<AvatarStackPerson[]>;
148
- };
149
- /** The key that toggles comment mode. `false` turns it off. */
150
- hotkey: {
151
- default: string;
152
- type: PropType<string | false>;
153
- };
154
- /** Hide thread mutation controls when the viewer may only read. */
155
- readOnly: {
156
- default: boolean;
157
- type: BooleanConstructor;
158
- };
159
- /** The URL of the page that a subject lives on, for the links of threads that are not page threads. */
160
- subjectUrl: {
161
- type: PropType<(subject: CommentSubject) => string | undefined>;
162
- };
163
- /** Navigates to the page of a thread from the list. Defaults to `location.assign`. */
164
- navigate: {
165
- type: PropType<(href: string) => void>;
166
- };
167
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
168
- [key: string]: any;
169
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
170
- client: {
171
- type: PropType<CommentsClient>;
172
- };
173
- /** What the threads of this page are about. For a page, `{ kind: "page", id: "/pricing" }`. */
174
- subject: {
175
- type: PropType<CommentSubject>;
176
- };
177
- /** The signed-in user. Defaults to the client's user. */
178
- user: {
179
- type: PropType<CommentUser>;
180
- };
181
- /** A state from `useComments()`, instead of `client` and `subject`. */
182
- comments: {
183
- type: PropType<CommentsState>;
184
- };
185
- /** The people on this page, shown in the toolbar. */
186
- people: {
187
- default: () => never[];
188
- type: PropType<AvatarStackPerson[]>;
189
- };
190
- /** The key that toggles comment mode. `false` turns it off. */
191
- hotkey: {
192
- default: string;
193
- type: PropType<string | false>;
194
- };
195
- /** Hide thread mutation controls when the viewer may only read. */
196
- readOnly: {
197
- default: boolean;
198
- type: BooleanConstructor;
199
- };
200
- /** The URL of the page that a subject lives on, for the links of threads that are not page threads. */
201
- subjectUrl: {
202
- type: PropType<(subject: CommentSubject) => string | undefined>;
203
- };
204
- /** Navigates to the page of a thread from the list. Defaults to `location.assign`. */
205
- navigate: {
206
- type: PropType<(href: string) => void>;
207
- };
208
- }>> & Readonly<{}>, {
209
- people: AvatarStackPerson[];
210
- readOnly: boolean;
211
- hotkey: string | false;
212
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
213
- //#endregion
214
- //#region src/components/comment-list.d.ts
215
- declare const CommentFilters: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
216
- comments: {
217
- type: PropType<CommentsState>;
218
- };
219
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
220
- [key: string]: any;
221
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
222
- comments: {
223
- type: PropType<CommentsState>;
224
- };
225
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
226
- declare const CommentList: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
227
- comments: {
228
- type: PropType<CommentsState>;
229
- };
230
- /** Goes to the page of a thread that is not on this page. Defaults to `location.assign`. */
231
- navigate: {
232
- type: PropType<(href: string) => void>;
233
- };
234
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
235
- [key: string]: any;
236
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "select"[], "select", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
237
- comments: {
238
- type: PropType<CommentsState>;
239
- };
240
- /** Goes to the page of a thread that is not on this page. Defaults to `location.assign`. */
241
- navigate: {
242
- type: PropType<(href: string) => void>;
243
- };
244
- }>> & Readonly<{
245
- onSelect?: ((...args: any[]) => any) | undefined;
246
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
247
- declare const CommentToolbar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
248
- comments: {
249
- type: PropType<CommentsState>;
250
- };
251
- /** The people on this page, from Realtime. Shown as a stack of avatars. */
252
- people: {
253
- default: () => never[];
254
- type: PropType<AvatarStackPerson[]>;
255
- };
256
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
257
- [key: string]: any;
258
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
259
- comments: {
260
- type: PropType<CommentsState>;
261
- };
262
- /** The people on this page, from Realtime. Shown as a stack of avatars. */
263
- people: {
264
- default: () => never[];
265
- type: PropType<AvatarStackPerson[]>;
266
- };
267
- }>> & Readonly<{}>, {
268
- people: AvatarStackPerson[];
269
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
270
- //#endregion
271
- //#region src/components/comment-pin.d.ts
272
- declare const CommentPin: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
273
- /** The thread number. A draft has none. */
274
- n: {
275
- type: NumberConstructor;
276
- };
277
- author: {
278
- type: PropType<CommentUser>;
279
- };
280
- status: {
281
- default: string;
282
- type: PropType<CommentStatus>;
283
- };
284
- /** A short piece of the comment. It is part of the label that a screen reader says. */
285
- excerpt: {
286
- type: StringConstructor;
287
- };
288
- /** The thread of this pin is open. */
289
- active: {
290
- default: boolean;
291
- type: BooleanConstructor;
292
- };
293
- /** The comment is still being written. */
294
- draft: {
295
- default: boolean;
296
- type: BooleanConstructor;
297
- };
298
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
299
- [key: string]: any;
300
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "hover" | "leave")[], "select" | "hover" | "leave", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
301
- /** The thread number. A draft has none. */
302
- n: {
303
- type: NumberConstructor;
304
- };
305
- author: {
306
- type: PropType<CommentUser>;
307
- };
308
- status: {
309
- default: string;
310
- type: PropType<CommentStatus>;
311
- };
312
- /** A short piece of the comment. It is part of the label that a screen reader says. */
313
- excerpt: {
314
- type: StringConstructor;
315
- };
316
- /** The thread of this pin is open. */
317
- active: {
318
- default: boolean;
319
- type: BooleanConstructor;
320
- };
321
- /** The comment is still being written. */
322
- draft: {
323
- default: boolean;
324
- type: BooleanConstructor;
325
- };
326
- }>> & Readonly<{
327
- onSelect?: ((...args: any[]) => any) | undefined;
328
- onHover?: ((...args: any[]) => any) | undefined;
329
- onLeave?: ((...args: any[]) => any) | undefined;
330
- }>, {
331
- status: CommentStatus;
332
- active: boolean;
333
- draft: boolean;
334
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
335
- //#endregion
336
- //#region src/components/comment-thread.d.ts
337
- type Done = Promise<unknown> | void;
338
- declare const CommentReply: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
339
- message: {
340
- required: true;
341
- type: PropType<CommentMessage>;
342
- };
343
- /** The signed-in user may edit and delete this message. */
344
- editable: {
345
- default: boolean;
346
- type: BooleanConstructor;
347
- };
348
- /** The message, and its author, show in one line without actions. */
349
- compact: {
350
- default: boolean;
351
- type: BooleanConstructor;
352
- };
353
- /** Deleting asks first. Deleting the first message of a thread deletes the whole thread, so a thread sets it there. */
354
- confirmDelete: {
355
- default: boolean;
356
- type: BooleanConstructor;
357
- };
358
- /** People whose `@name` the message may hold, so an edit keeps their mentions. */
359
- people: {
360
- default: () => never[];
361
- type: PropType<CommentUser[]>;
362
- };
363
- users: {
364
- type: PropType<(query: string) => Promise<CommentUser[]>>;
365
- };
366
- /** Saves an edit. Gets `(messageId, body, mentions)`. */
367
- onEdit: {
368
- type: PropType<(messageId: string, body: string, mentions: string[]) => Done>;
369
- };
370
- /** Deletes the message. Gets `(messageId)`. */
371
- onDelete: {
372
- type: PropType<(messageId: string) => Done>;
373
- };
374
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
375
- [key: string]: any;
376
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
377
- message: {
378
- required: true;
379
- type: PropType<CommentMessage>;
380
- };
381
- /** The signed-in user may edit and delete this message. */
382
- editable: {
383
- default: boolean;
384
- type: BooleanConstructor;
385
- };
386
- /** The message, and its author, show in one line without actions. */
387
- compact: {
388
- default: boolean;
389
- type: BooleanConstructor;
390
- };
391
- /** Deleting asks first. Deleting the first message of a thread deletes the whole thread, so a thread sets it there. */
392
- confirmDelete: {
393
- default: boolean;
394
- type: BooleanConstructor;
395
- };
396
- /** People whose `@name` the message may hold, so an edit keeps their mentions. */
397
- people: {
398
- default: () => never[];
399
- type: PropType<CommentUser[]>;
400
- };
401
- users: {
402
- type: PropType<(query: string) => Promise<CommentUser[]>>;
403
- };
404
- /** Saves an edit. Gets `(messageId, body, mentions)`. */
405
- onEdit: {
406
- type: PropType<(messageId: string, body: string, mentions: string[]) => Done>;
407
- };
408
- /** Deletes the message. Gets `(messageId)`. */
409
- onDelete: {
410
- type: PropType<(messageId: string) => Done>;
411
- };
412
- }>> & Readonly<{}>, {
413
- compact: boolean;
414
- people: CommentUser[];
415
- editable: boolean;
416
- confirmDelete: boolean;
417
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
418
- declare const CommentThread$1: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
419
- thread: {
420
- required: true;
421
- type: PropType<CommentThread>;
422
- };
423
- /** The signed-in user. Their messages can be edited and deleted. */
424
- user: {
425
- type: PropType<CommentUser>;
426
- };
427
- /** A read-only card for hovering a pin. */
428
- preview: {
429
- default: boolean;
430
- type: BooleanConstructor;
431
- };
432
- /** Keep the full thread readable without reply, edit, delete, or status controls. */
433
- readOnly: {
434
- default: boolean;
435
- type: BooleanConstructor;
436
- };
437
- /** Show a reply as being sent, on top of the thread's own tracking. */
438
- busy: {
439
- default: boolean;
440
- type: BooleanConstructor;
441
- };
442
- /** An error to show, on top of the ones from the handlers. */
443
- error: {
444
- type: StringConstructor;
445
- };
446
- /** The thread is no longer on the page, so no pin shows where it was. */
447
- detached: {
448
- default: boolean;
449
- type: BooleanConstructor;
450
- };
451
- users: {
452
- type: PropType<(query: string) => Promise<CommentUser[]>>;
453
- };
454
- /** Sends a reply. Gets `(body, mentions)`. */
455
- onReply: {
456
- type: PropType<(body: string, mentions: string[]) => Done>;
457
- };
458
- /** Saves an edited message. Gets `(messageId, body, mentions)`. */
459
- onEdit: {
460
- type: PropType<(messageId: string, body: string, mentions: string[]) => Done>;
461
- };
462
- /** Deletes a message. Gets `(messageId)`. Deleting the first message deletes the thread. */
463
- onDelete: {
464
- type: PropType<(messageId: string) => Done>;
465
- };
466
- onResolve: {
467
- type: PropType<() => Done>;
468
- };
469
- onReopen: {
470
- type: PropType<() => Done>;
471
- };
472
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
473
- [key: string]: any;
474
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
475
- thread: {
476
- required: true;
477
- type: PropType<CommentThread>;
478
- };
479
- /** The signed-in user. Their messages can be edited and deleted. */
480
- user: {
481
- type: PropType<CommentUser>;
482
- };
483
- /** A read-only card for hovering a pin. */
484
- preview: {
485
- default: boolean;
486
- type: BooleanConstructor;
487
- };
488
- /** Keep the full thread readable without reply, edit, delete, or status controls. */
489
- readOnly: {
490
- default: boolean;
491
- type: BooleanConstructor;
492
- };
493
- /** Show a reply as being sent, on top of the thread's own tracking. */
494
- busy: {
495
- default: boolean;
496
- type: BooleanConstructor;
497
- };
498
- /** An error to show, on top of the ones from the handlers. */
499
- error: {
500
- type: StringConstructor;
501
- };
502
- /** The thread is no longer on the page, so no pin shows where it was. */
503
- detached: {
504
- default: boolean;
505
- type: BooleanConstructor;
506
- };
507
- users: {
508
- type: PropType<(query: string) => Promise<CommentUser[]>>;
509
- };
510
- /** Sends a reply. Gets `(body, mentions)`. */
511
- onReply: {
512
- type: PropType<(body: string, mentions: string[]) => Done>;
513
- };
514
- /** Saves an edited message. Gets `(messageId, body, mentions)`. */
515
- onEdit: {
516
- type: PropType<(messageId: string, body: string, mentions: string[]) => Done>;
517
- };
518
- /** Deletes a message. Gets `(messageId)`. Deleting the first message deletes the thread. */
519
- onDelete: {
520
- type: PropType<(messageId: string) => Done>;
521
- };
522
- onResolve: {
523
- type: PropType<() => Done>;
524
- };
525
- onReopen: {
526
- type: PropType<() => Done>;
527
- };
528
- }>> & Readonly<{
529
- onClose?: ((...args: any[]) => any) | undefined;
530
- }>, {
531
- busy: boolean;
532
- preview: boolean;
533
- readOnly: boolean;
534
- detached: boolean;
535
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
536
- //#endregion
537
- export { CommentList as a, CommentComposer as c, CommentFilters as i, CommentComposerSubmit as l, CommentThread$1 as n, CommentToolbar as o, CommentPin as r, CommentLayer as s, CommentReply as t, CommentComposerVariant as u };
@@ -1,2 +0,0 @@
1
- import { a as CommentList, c as CommentComposer, i as CommentFilters, l as CommentComposerSubmit, n as CommentThread, o as CommentToolbar, r as CommentPin, s as CommentLayer, t as CommentReply, u as CommentComposerVariant } from "./comments-Cq5eewsu.js";
2
- export { CommentComposer, CommentComposerSubmit, CommentComposerVariant, CommentFilters, CommentLayer, CommentList, CommentPin, CommentReply, CommentThread, CommentToolbar };
package/dist/comments.js DELETED
@@ -1,2 +0,0 @@
1
- import { a as CommentFilters, c as CommentComposer, i as CommentPin, n as CommentReply, o as CommentList, r as CommentThread, s as CommentToolbar, t as CommentLayer } from "./comment-layer-CBlxJ8eK.js";
2
- export { CommentComposer, CommentFilters, CommentLayer, CommentList, CommentPin, CommentReply, CommentThread, CommentToolbar };
@@ -1,29 +0,0 @@
1
- import { InjectionKey, Plugin } from "vue";
2
- //#region src/config.d.ts
3
- interface ViteHubUIDefaults {
4
- markdown?: {
5
- class?: string;
6
- };
7
- messageScroller?: {
8
- edgeThreshold?: number;
9
- previousItemPeek?: number;
10
- };
11
- }
12
- interface ViteHubUIOptions {
13
- defaults?: ViteHubUIDefaults;
14
- }
15
- interface ResolvedViteHubUIDefaults {
16
- markdown: {
17
- class: string;
18
- };
19
- messageScroller: {
20
- edgeThreshold: number;
21
- previousItemPeek: number;
22
- };
23
- }
24
- declare const ViteHubUIInjectionKey: InjectionKey<ResolvedViteHubUIDefaults>;
25
- declare function resolveViteHubUIDefaults(options?: ViteHubUIOptions): ResolvedViteHubUIDefaults;
26
- declare function useViteHubUI(): ResolvedViteHubUIDefaults;
27
- declare function createViteHubUI(options?: ViteHubUIOptions): Plugin;
28
- //#endregion
29
- export { createViteHubUI as a, ViteHubUIOptions as i, ViteHubUIDefaults as n, resolveViteHubUIDefaults as o, ViteHubUIInjectionKey as r, useViteHubUI as s, ResolvedViteHubUIDefaults as t };