@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
@@ -0,0 +1,176 @@
1
+ import { n as AvatarStackPerson } from "./avatar-stack-DPRFuezh.js";
2
+ import { r as CommentComposerSize } from "./comment-composer-fINL5bxo.js";
3
+ import { s as CommentsState, t as CommentCan } from "./comments-D8hulVPy.js";
4
+ import { n as CommentAttachmentUrl } from "./comment-thread-DKJjmWN0.js";
5
+ import { c as CommentUpload } from "./comment-panel-CfvdRUMX.js";
6
+ import { PropType } from "vue";
7
+ import { CommentSubject, CommentUser, CommentsClient } from "@vite-hub/comments/client";
8
+ //#region src/components/comment-layer.d.ts
9
+ /** Where a thread opens: in a card beside its pin, or in a column of cards on the right edge of the screen. */
10
+ type CommentPlacement = "pin" | "margin";
11
+ declare const CommentLayer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
12
+ client: {
13
+ type: PropType<CommentsClient>;
14
+ };
15
+ /** What the threads of this page are about. For a page, `{ kind: "page", id: "/pricing" }`. */
16
+ subject: {
17
+ type: PropType<CommentSubject>;
18
+ };
19
+ /** The signed-in user. Defaults to the client's user. */
20
+ user: {
21
+ type: PropType<CommentUser>;
22
+ };
23
+ /** A state from `useComments()`, instead of `client` and `subject`. */
24
+ comments: {
25
+ type: PropType<CommentsState>;
26
+ };
27
+ /** The people on this page, shown in the toolbar. */
28
+ people: {
29
+ default: () => never[];
30
+ type: PropType<AvatarStackPerson[]>;
31
+ };
32
+ /** The key that toggles comment mode. `false` turns it off. */
33
+ hotkey: {
34
+ default: string;
35
+ type: PropType<string | false>;
36
+ };
37
+ /** Hide thread mutation controls when the viewer may only read. */
38
+ readOnly: {
39
+ default: boolean;
40
+ type: BooleanConstructor;
41
+ };
42
+ /** The URL of the page that a subject lives on, for the links of threads that are not page threads. */
43
+ subjectUrl: {
44
+ type: PropType<(subject: CommentSubject) => string | undefined>;
45
+ };
46
+ /** Navigates to the page of a thread from the list. Defaults to `location.assign`. */
47
+ navigate: {
48
+ type: PropType<(href: string) => void>;
49
+ };
50
+ /** What the signed-in user may do in a thread. Defaults to the `can` of the comments state. */
51
+ can: {
52
+ type: PropType<CommentCan>;
53
+ };
54
+ /** Turns attached files into attachment keys before the comment is saved or sent. */
55
+ upload: {
56
+ type: PropType<CommentUpload>;
57
+ };
58
+ /** Save raw files with outbox entries. Set only when the server accepts file uploads. `upload` takes precedence. */
59
+ queueFiles: {
60
+ default: boolean;
61
+ type: BooleanConstructor;
62
+ };
63
+ /** The file types that the boxes take, such as `image/*`. */
64
+ accept: {
65
+ type: StringConstructor;
66
+ };
67
+ /** Gives the URL of an attachment key. With it, image attachments show as thumbnails. */
68
+ attachmentUrl: {
69
+ type: PropType<CommentAttachmentUrl>;
70
+ };
71
+ /**
72
+ * Where threads open. `"pin"` opens a thread in a card beside its pin. `"margin"` shows every thread as a card in a
73
+ * column on the right edge of the screen, level with its pin, and opens it in that card, with the reply box there.
74
+ * A new comment is written there too. On a screen narrower than 900px, `"margin"` works as `"pin"`.
75
+ */
76
+ placement: {
77
+ default: string;
78
+ type: PropType<CommentPlacement>;
79
+ };
80
+ /**
81
+ * The size of the thread cards and of the box for a new comment. `"sm"`, the default, is Drop's floating card: 14px
82
+ * text, tight rows, and Edit and Delete over the name's row. `"md"` is the size of a thread in a panel.
83
+ */
84
+ size: {
85
+ default: string;
86
+ type: PropType<CommentComposerSize>;
87
+ };
88
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
89
+ [key: string]: any;
90
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
91
+ client: {
92
+ type: PropType<CommentsClient>;
93
+ };
94
+ /** What the threads of this page are about. For a page, `{ kind: "page", id: "/pricing" }`. */
95
+ subject: {
96
+ type: PropType<CommentSubject>;
97
+ };
98
+ /** The signed-in user. Defaults to the client's user. */
99
+ user: {
100
+ type: PropType<CommentUser>;
101
+ };
102
+ /** A state from `useComments()`, instead of `client` and `subject`. */
103
+ comments: {
104
+ type: PropType<CommentsState>;
105
+ };
106
+ /** The people on this page, shown in the toolbar. */
107
+ people: {
108
+ default: () => never[];
109
+ type: PropType<AvatarStackPerson[]>;
110
+ };
111
+ /** The key that toggles comment mode. `false` turns it off. */
112
+ hotkey: {
113
+ default: string;
114
+ type: PropType<string | false>;
115
+ };
116
+ /** Hide thread mutation controls when the viewer may only read. */
117
+ readOnly: {
118
+ default: boolean;
119
+ type: BooleanConstructor;
120
+ };
121
+ /** The URL of the page that a subject lives on, for the links of threads that are not page threads. */
122
+ subjectUrl: {
123
+ type: PropType<(subject: CommentSubject) => string | undefined>;
124
+ };
125
+ /** Navigates to the page of a thread from the list. Defaults to `location.assign`. */
126
+ navigate: {
127
+ type: PropType<(href: string) => void>;
128
+ };
129
+ /** What the signed-in user may do in a thread. Defaults to the `can` of the comments state. */
130
+ can: {
131
+ type: PropType<CommentCan>;
132
+ };
133
+ /** Turns attached files into attachment keys before the comment is saved or sent. */
134
+ upload: {
135
+ type: PropType<CommentUpload>;
136
+ };
137
+ /** Save raw files with outbox entries. Set only when the server accepts file uploads. `upload` takes precedence. */
138
+ queueFiles: {
139
+ default: boolean;
140
+ type: BooleanConstructor;
141
+ };
142
+ /** The file types that the boxes take, such as `image/*`. */
143
+ accept: {
144
+ type: StringConstructor;
145
+ };
146
+ /** Gives the URL of an attachment key. With it, image attachments show as thumbnails. */
147
+ attachmentUrl: {
148
+ type: PropType<CommentAttachmentUrl>;
149
+ };
150
+ /**
151
+ * Where threads open. `"pin"` opens a thread in a card beside its pin. `"margin"` shows every thread as a card in a
152
+ * column on the right edge of the screen, level with its pin, and opens it in that card, with the reply box there.
153
+ * A new comment is written there too. On a screen narrower than 900px, `"margin"` works as `"pin"`.
154
+ */
155
+ placement: {
156
+ default: string;
157
+ type: PropType<CommentPlacement>;
158
+ };
159
+ /**
160
+ * The size of the thread cards and of the box for a new comment. `"sm"`, the default, is Drop's floating card: 14px
161
+ * text, tight rows, and Edit and Delete over the name's row. `"md"` is the size of a thread in a panel.
162
+ */
163
+ size: {
164
+ default: string;
165
+ type: PropType<CommentComposerSize>;
166
+ };
167
+ }>> & Readonly<{}>, {
168
+ size: CommentComposerSize;
169
+ people: AvatarStackPerson[];
170
+ hotkey: string | false;
171
+ readOnly: boolean;
172
+ queueFiles: boolean;
173
+ placement: CommentPlacement;
174
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
175
+ //#endregion
176
+ export { CommentPlacement as n, CommentLayer as t };
@@ -0,0 +1,62 @@
1
+ import { n as AvatarStackPerson } from "./avatar-stack-DPRFuezh.js";
2
+ import { s as CommentsState } from "./comments-D8hulVPy.js";
3
+ import { s as CommentRowSlots } from "./comment-panel-CfvdRUMX.js";
4
+ import { PropType, SlotsType } from "vue";
5
+ //#region src/components/comment-list.d.ts
6
+ declare const CommentFilters: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ comments: {
8
+ type: PropType<CommentsState>;
9
+ };
10
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
11
+ [key: string]: any;
12
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
+ comments: {
14
+ type: PropType<CommentsState>;
15
+ };
16
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
17
+ declare const CommentList: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
18
+ comments: {
19
+ type: PropType<CommentsState>;
20
+ };
21
+ /** Goes to the page of a thread that is not on this page. Defaults to `location.assign`. */
22
+ navigate: {
23
+ type: PropType<(href: string) => void>;
24
+ };
25
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
+ [key: string]: any;
27
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "select"[], "select", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
28
+ comments: {
29
+ type: PropType<CommentsState>;
30
+ };
31
+ /** Goes to the page of a thread that is not on this page. Defaults to `location.assign`. */
32
+ navigate: {
33
+ type: PropType<(href: string) => void>;
34
+ };
35
+ }>> & Readonly<{
36
+ onSelect?: ((...args: any[]) => any) | undefined;
37
+ }>, {}, SlotsType<CommentRowSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
+ declare const CommentToolbar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
39
+ comments: {
40
+ type: PropType<CommentsState>;
41
+ };
42
+ /** The people on this page, from Realtime. Shown as a stack of avatars. */
43
+ people: {
44
+ default: () => never[];
45
+ type: PropType<AvatarStackPerson[]>;
46
+ };
47
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
48
+ [key: string]: any;
49
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
50
+ comments: {
51
+ type: PropType<CommentsState>;
52
+ };
53
+ /** The people on this page, from Realtime. Shown as a stack of avatars. */
54
+ people: {
55
+ default: () => never[];
56
+ type: PropType<AvatarStackPerson[]>;
57
+ };
58
+ }>> & Readonly<{}>, {
59
+ people: AvatarStackPerson[];
60
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
61
+ //#endregion
62
+ export { CommentList as n, CommentToolbar as r, CommentFilters as t };
@@ -0,0 +1,234 @@
1
+ /*
2
+ * Comment marks: the pins, the areas, and the text highlights that show where the comments of a page are. This is plain
3
+ * CSS with no framework, so the comment parts of @vite-hub/ui, the ViteHub pill, and Drop's page frame draw them the
4
+ * same way. Load it in the page or in a shadow root. `styles.css` imports it into its components layer.
5
+ *
6
+ * A mark is an element with a data-slot:
7
+ * - `comment-mark-pin`: a 28px pin. `data-shape="point"` is a drop whose small bottom-left corner is the spot, and
8
+ * `data-shape="round"` is a circle, for an area or an image. An `<img>` child fills it. `data-active="true"` makes it
9
+ * larger, and `data-status="resolved"` makes it faded and grey.
10
+ * - `comment-mark-area`: a 1px neutral line, a 22% tint of the ink, with no fill. `data-active="true"` makes the line
11
+ * firmer (45%), `data-status="resolved"` makes it dashed and grey, and `data-draft="true"` is the area being drawn or
12
+ * written on: 2px comment blue with a fill. Its `comment-mark-handle` children, with `data-corner="top-left"` and the
13
+ * other three corners, are round handles.
14
+ * - `data-leaving="true"` on a pin or an area: it shrinks and fades out in 130ms (`commentLeaveMs` of `vite-hub/ui/headless`), then the page removes it.
15
+ * The page places a pin with `left` and `top`, and an area with `left`, `top`, `width`, and `height`.
16
+ * Commented text uses the CSS Custom Highlight API with the names `vh-comment`, `vh-comment-resolved`,
17
+ * `vh-comment-active`, and `vh-comment-draft`.
18
+ */
19
+
20
+ /*
21
+ * The tokens. A page changes one with `--vh-ui-comment-*` on any element around the marks, such as the root or a shadow
22
+ * host. Without that, a mark takes the ViteHub theme tokens where it renders, when the page has them, else the theme's
23
+ * own values below. The dark values apply under `.dark` or `[data-theme="dark"]` on the root or on the shadow host, and
24
+ * on a root without a scheme when the system is dark.
25
+ */
26
+ :root,
27
+ :host {
28
+ --vh-comment-default-mark: oklch(0.588 0.158 241.966);
29
+ --vh-comment-default-pin: oklch(0.205 0 0);
30
+ --vh-comment-default-pin-text: oklch(0.985 0 0);
31
+ --vh-comment-default-surface: oklch(1 0 0);
32
+ --vh-comment-default-muted: oklch(0.5 0 0);
33
+ --vh-comment-default-ink: oklch(0.205 0 0);
34
+ --vh-comment-shadow: oklch(0 0 0 / 18%);
35
+ }
36
+
37
+ /* Each mark resolves the tokens itself, so an override or a theme on an element around it reaches it. */
38
+ :root,
39
+ :host,
40
+ :where([data-slot^="comment-mark"], [data-slot="comment-pin"], [data-slot^="comment-layer-area"]) {
41
+ /* The comment blue of the area being drawn and of quotes. It is the focus blue of the theme, which shows on light and dark pages and on images. */
42
+ --vh-comment-mark: var(--vh-ui-comment-mark, var(--vh-focus, var(--vh-comment-default-mark)));
43
+ /* The face of a pin without an avatar, and its initials. */
44
+ --vh-comment-pin: var(--vh-ui-comment-pin, var(--vh-primary, var(--vh-comment-default-pin)));
45
+ --vh-comment-pin-text: var(--vh-ui-comment-pin-text, var(--vh-inverted, var(--vh-comment-default-pin-text)));
46
+ /* The page color: the ring that keeps a pin apart from what is under it, and the fill of a handle. */
47
+ --vh-comment-surface: var(--vh-ui-comment-surface, var(--vh-bg, var(--vh-comment-default-surface)));
48
+ /* The grey of resolved marks. */
49
+ --vh-comment-muted: var(--vh-ui-comment-muted, var(--vh-muted, var(--vh-comment-default-muted)));
50
+ /* The text color that highlights and saved areas tint. */
51
+ --vh-comment-ink: var(--vh-ui-comment-ink, var(--vh-highlighted, var(--vh-comment-default-ink)));
52
+ --vh-comment-pin-size: var(--vh-ui-comment-pin-size, 28px);
53
+ }
54
+
55
+ :root.dark,
56
+ :root[data-theme="dark"],
57
+ :host(.dark),
58
+ :host([data-theme="dark"]) {
59
+ --vh-comment-default-mark: oklch(0.746 0.16 232.661);
60
+ --vh-comment-default-pin: oklch(0.985 0 0);
61
+ --vh-comment-default-pin-text: oklch(0.205 0 0);
62
+ --vh-comment-default-surface: oklch(0.145 0 0);
63
+ --vh-comment-default-muted: oklch(0.708 0 0);
64
+ --vh-comment-default-ink: oklch(0.985 0 0);
65
+ }
66
+
67
+ @media (prefers-color-scheme: dark) {
68
+ :root:not(.light, .dark, [data-theme]) {
69
+ --vh-comment-default-mark: oklch(0.746 0.16 232.661);
70
+ --vh-comment-default-pin: oklch(0.985 0 0);
71
+ --vh-comment-default-pin-text: oklch(0.205 0 0);
72
+ --vh-comment-default-surface: oklch(0.145 0 0);
73
+ --vh-comment-default-muted: oklch(0.708 0 0);
74
+ --vh-comment-default-ink: oklch(0.985 0 0);
75
+ }
76
+ }
77
+
78
+ /*
79
+ * A pin. `comment-pin` is the CommentPin part of @vite-hub/ui, which takes the same look. `--vh-comment-zoom` keeps a
80
+ * mark its size on screen inside a scaled layer: set it to the inverse of the layer's scale.
81
+ */
82
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"]) {
83
+ background: var(--vh-comment-pin);
84
+ border: 0;
85
+ border-radius: calc(var(--vh-comment-pin-size) / 2) calc(var(--vh-comment-pin-size) / 2) calc(var(--vh-comment-pin-size) / 2) 4px;
86
+ box-shadow: 0 0 0 2px var(--vh-comment-surface), 0 2px 8px var(--vh-comment-shadow);
87
+ box-sizing: border-box;
88
+ color: var(--vh-comment-pin-text);
89
+ cursor: pointer;
90
+ display: grid;
91
+ font-size: 11px;
92
+ font-weight: 600;
93
+ height: var(--vh-comment-pin-size);
94
+ letter-spacing: 0.02em;
95
+ line-height: 1;
96
+ padding: 0;
97
+ place-items: center;
98
+ position: absolute;
99
+ scale: var(--vh-comment-zoom, 1);
100
+ transform-origin: 0 100%;
101
+ transition: scale 120ms ease-out, opacity 150ms ease-out;
102
+ width: var(--vh-comment-pin-size);
103
+ }
104
+
105
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"])[data-shape="round"] {
106
+ border-radius: calc(var(--vh-comment-pin-size) / 2);
107
+ transform-origin: 50% 50%;
108
+ }
109
+
110
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"]) > img {
111
+ border-radius: inherit;
112
+ display: block;
113
+ height: 100%;
114
+ object-fit: cover;
115
+ width: 100%;
116
+ }
117
+
118
+ /* The pin stays 28px, and its hit area is 44px. */
119
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"])::before {
120
+ border-radius: 50%;
121
+ content: "";
122
+ inset: -8px;
123
+ position: absolute;
124
+ }
125
+
126
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"]):is(:hover, :focus-visible, [data-active="true"]) {
127
+ scale: calc(var(--vh-comment-zoom, 1) * 1.06);
128
+ }
129
+
130
+ /* A tap must not leave the pin grown, so only a fine pointer grows it on hover. */
131
+ @media not ((hover: hover) and (pointer: fine)) {
132
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"]):hover:not(:focus-visible, [data-active="true"]) {
133
+ scale: var(--vh-comment-zoom, 1);
134
+ }
135
+ }
136
+
137
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"])[data-status="resolved"] {
138
+ filter: grayscale(1);
139
+ opacity: 0.55;
140
+ }
141
+
142
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"])[data-status="resolved"]:not(:has(img)) {
143
+ background: var(--vh-comment-muted);
144
+ }
145
+
146
+ /*
147
+ * An area. A page with many of them stays readable, so a saved area is a thin neutral line with no fill, a tint of the
148
+ * ink as commented text is. Only the area being drawn is comment blue. `comment-layer-area` is the area that a drag in
149
+ * CommentLayer's comment mode draws.
150
+ */
151
+ :is([data-slot="comment-mark-area"], [data-slot="comment-layer-area"]) {
152
+ border: calc(1px * var(--vh-comment-zoom, 1)) solid color-mix(in oklab, var(--vh-comment-ink) 22%, transparent);
153
+ border-radius: 4px;
154
+ box-sizing: border-box;
155
+ pointer-events: none;
156
+ position: absolute;
157
+ transition: border-color 120ms ease-out, background-color 120ms ease-out;
158
+ }
159
+
160
+ [data-slot="comment-mark-area"][data-status="resolved"] {
161
+ border-color: color-mix(in oklab, var(--vh-comment-muted) 50%, transparent);
162
+ border-style: dashed;
163
+ }
164
+
165
+ [data-slot="comment-mark-area"][data-active="true"] {
166
+ border-color: color-mix(in oklab, var(--vh-comment-ink) 45%, transparent);
167
+ border-style: solid;
168
+ }
169
+
170
+ :is([data-slot="comment-mark-area"][data-draft="true"], [data-slot="comment-layer-area"]) {
171
+ background: color-mix(in oklab, var(--vh-comment-mark) 16%, transparent);
172
+ border: calc(2px * var(--vh-comment-zoom, 1)) solid var(--vh-comment-mark);
173
+ border-radius: 3px;
174
+ }
175
+
176
+ :is([data-slot="comment-mark-handle"], [data-slot="comment-layer-area-handle"]) {
177
+ background: var(--vh-comment-surface);
178
+ border: 1.5px solid var(--vh-comment-mark);
179
+ border-radius: 50%;
180
+ box-sizing: border-box;
181
+ height: 8px;
182
+ position: absolute;
183
+ width: 8px;
184
+ }
185
+
186
+ :is([data-slot="comment-mark-handle"], [data-slot="comment-layer-area-handle"])[data-corner^="top"] { top: -5px; }
187
+ :is([data-slot="comment-mark-handle"], [data-slot="comment-layer-area-handle"])[data-corner^="bottom"] { bottom: -5px; }
188
+ :is([data-slot="comment-mark-handle"], [data-slot="comment-layer-area-handle"])[data-corner$="left"] { left: -5px; }
189
+ :is([data-slot="comment-mark-handle"], [data-slot="comment-layer-area-handle"])[data-corner$="right"] { right: -5px; }
190
+
191
+ /* A mark that goes, such as the others when one comment shows on its own: it shrinks and fades. */
192
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-mark-area"])[data-leaving="true"],
193
+ [data-slot="comment-layer-item"][data-leaving="true"] > * {
194
+ animation: vh-comment-mark-leave 130ms cubic-bezier(0.4, 0, 1, 1) forwards;
195
+ pointer-events: none;
196
+ }
197
+
198
+ [data-slot="comment-mark-area"][data-leaving="true"] {
199
+ animation-name: vh-comment-mark-leave-area;
200
+ }
201
+
202
+ @keyframes vh-comment-mark-leave {
203
+ to { opacity: 0; scale: calc(var(--vh-comment-zoom, 1) * 0.8); }
204
+ }
205
+
206
+ @keyframes vh-comment-mark-leave-area {
207
+ to { opacity: 0; scale: 0.97; }
208
+ }
209
+
210
+ @media (prefers-reduced-motion: reduce) {
211
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-pin"], [data-slot="comment-mark-area"], [data-slot="comment-layer-area"]) {
212
+ transition: none;
213
+ }
214
+
215
+ :is([data-slot="comment-mark-pin"], [data-slot="comment-mark-area"])[data-leaving="true"],
216
+ [data-slot="comment-layer-item"][data-leaving="true"] > * {
217
+ animation: none;
218
+ opacity: 0;
219
+ }
220
+ }
221
+
222
+ /* Commented text: a tint of the text color, so it shows on light and dark pages. The open, hovered, or new comment is darker. */
223
+ ::highlight(vh-comment) {
224
+ background-color: color-mix(in oklab, var(--vh-comment-ink) 13%, transparent);
225
+ }
226
+
227
+ ::highlight(vh-comment-resolved) {
228
+ background-color: color-mix(in oklab, var(--vh-comment-ink) 6%, transparent);
229
+ }
230
+
231
+ ::highlight(vh-comment-active),
232
+ ::highlight(vh-comment-draft) {
233
+ background-color: color-mix(in oklab, var(--vh-comment-ink) 26%, transparent);
234
+ }
@@ -0,0 +1,208 @@
1
+ import { s as CommentsState, t as CommentCan } from "./comments-D8hulVPy.js";
2
+ import { l as CommentThreadSlots, n as CommentAttachmentUrl } from "./comment-thread-DKJjmWN0.js";
3
+ import { PropType, SlotsType, VNode } from "vue";
4
+ import { CommentStatus, CommentSubject, CommentThread, CommentUser, CommentsClient } from "@vite-hub/comments/client";
5
+ //#region src/components/comment-panel.d.ts
6
+ type CommentPanelVariant = "docked" | "floating";
7
+ /** Turns files into attachment keys, such as Blob keys, before a comment or a reply is sent. */
8
+ type CommentUpload = (files: File[]) => Promise<string[]>;
9
+ /** The scope of the `row` and `preview` slots of `CommentPanel` and `CommentList`. */
10
+ interface CommentRowSlotScope {
11
+ thread: CommentThread;
12
+ /** The text that the row shows without a `preview` slot: the first message as plain text, else the quoted text. */
13
+ text: string;
14
+ }
15
+ /** The scope of the `group-header` slot: the label that `group` gave, and the threads under it. */
16
+ interface CommentGroupSlotScope {
17
+ group: string;
18
+ threads: CommentThread[];
19
+ }
20
+ type CommentRowSlots = {
21
+ /** The inside of one row of the list. Replaces the number, avatar, text, and facts. */
22
+ row?: (scope: CommentRowSlotScope) => VNode[];
23
+ /** The text of one row. Replaces the start of the first message, as plain text. Render `text` to keep it for some rows. */
24
+ preview?: (scope: CommentRowSlotScope) => VNode[];
25
+ };
26
+ type CommentPanelSlots = CommentThreadSlots & CommentRowSlots & {
27
+ /** The heading of a group of rows. Replaces the label that `group` gave. */
28
+ "group-header"?: (scope: CommentGroupSlotScope) => VNode[];
29
+ /** Buttons at the end of the list's top row, beside Open and Resolved, such as Close. */
30
+ "list-actions"?: () => VNode[];
31
+ };
32
+ /** Puts a thread under a heading of the list, such as `"From earlier versions"`. `undefined` keeps it in the first, unnamed group. */
33
+ type CommentGroup = (thread: CommentThread) => string | undefined;
34
+ declare const CommentPanel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
35
+ /** A state from `useComments()`. Defaults to the state of the nearest `CommentLayer` or `provideComments()`. */
36
+ comments: {
37
+ type: PropType<CommentsState>;
38
+ };
39
+ /** The client, for a panel that is not inside a `CommentLayer`. Give it with `subject`. */
40
+ client: {
41
+ type: PropType<CommentsClient>;
42
+ };
43
+ /** What the threads are about, with `client`. */
44
+ subject: {
45
+ type: PropType<CommentSubject>;
46
+ };
47
+ /** The signed-in user, with `client`. Defaults to the client's user. */
48
+ user: {
49
+ type: PropType<CommentUser>;
50
+ };
51
+ /** `docked` fills its container, such as a side column. `floating` is a card over the page. */
52
+ variant: {
53
+ default: string;
54
+ type: PropType<CommentPanelVariant>;
55
+ };
56
+ /** The id of the open thread. Use `v-model:thread`. `null` shows the list. */
57
+ thread: {
58
+ default: undefined;
59
+ type: PropType<string | null>;
60
+ };
61
+ /** Which threads the list shows. Use `v-model:status`. */
62
+ status: {
63
+ type: PropType<CommentStatus>;
64
+ };
65
+ /** The heading of the list. */
66
+ title: {
67
+ default: string;
68
+ type: StringConstructor;
69
+ };
70
+ /** Hide the page box and every reply, edit, delete, and status control. */
71
+ readOnly: {
72
+ default: boolean;
73
+ type: BooleanConstructor;
74
+ };
75
+ /** Turns attached files into attachment keys before the comment is saved or sent. */
76
+ upload: {
77
+ type: PropType<CommentUpload>;
78
+ };
79
+ /** Save raw files with outbox entries. Set only when the server accepts file uploads. `upload` takes precedence. */
80
+ queueFiles: {
81
+ default: boolean;
82
+ type: BooleanConstructor;
83
+ };
84
+ /** The file types that the boxes take, such as `image/*`. */
85
+ accept: {
86
+ type: StringConstructor;
87
+ };
88
+ /** Gives the URL of an attachment key. With it, image attachments show as thumbnails. */
89
+ attachmentUrl: {
90
+ type: PropType<CommentAttachmentUrl>;
91
+ };
92
+ /** Send a new page comment that has files and no text. */
93
+ allowEmpty: {
94
+ default: boolean;
95
+ type: BooleanConstructor;
96
+ };
97
+ /** People that messages may mention, on top of the people that the comments state knows. */
98
+ people: {
99
+ default: () => never[];
100
+ type: PropType<CommentUser[]>;
101
+ };
102
+ /** What the signed-in user may do in a thread. Defaults to the `can` of the comments state. */
103
+ can: {
104
+ type: PropType<CommentCan>;
105
+ };
106
+ /**
107
+ * Groups the rows under headings, in the order the groups first appear. Threads without a group come first. Without a
108
+ * group callback, a resolved thread that Open lists for a later reply goes under "Replied since resolved".
109
+ */
110
+ group: {
111
+ type: PropType<CommentGroup>;
112
+ };
113
+ }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
114
+ [key: string]: any;
115
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:thread" | "update:status")[], "select" | "update:thread" | "update:status", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
116
+ /** A state from `useComments()`. Defaults to the state of the nearest `CommentLayer` or `provideComments()`. */
117
+ comments: {
118
+ type: PropType<CommentsState>;
119
+ };
120
+ /** The client, for a panel that is not inside a `CommentLayer`. Give it with `subject`. */
121
+ client: {
122
+ type: PropType<CommentsClient>;
123
+ };
124
+ /** What the threads are about, with `client`. */
125
+ subject: {
126
+ type: PropType<CommentSubject>;
127
+ };
128
+ /** The signed-in user, with `client`. Defaults to the client's user. */
129
+ user: {
130
+ type: PropType<CommentUser>;
131
+ };
132
+ /** `docked` fills its container, such as a side column. `floating` is a card over the page. */
133
+ variant: {
134
+ default: string;
135
+ type: PropType<CommentPanelVariant>;
136
+ };
137
+ /** The id of the open thread. Use `v-model:thread`. `null` shows the list. */
138
+ thread: {
139
+ default: undefined;
140
+ type: PropType<string | null>;
141
+ };
142
+ /** Which threads the list shows. Use `v-model:status`. */
143
+ status: {
144
+ type: PropType<CommentStatus>;
145
+ };
146
+ /** The heading of the list. */
147
+ title: {
148
+ default: string;
149
+ type: StringConstructor;
150
+ };
151
+ /** Hide the page box and every reply, edit, delete, and status control. */
152
+ readOnly: {
153
+ default: boolean;
154
+ type: BooleanConstructor;
155
+ };
156
+ /** Turns attached files into attachment keys before the comment is saved or sent. */
157
+ upload: {
158
+ type: PropType<CommentUpload>;
159
+ };
160
+ /** Save raw files with outbox entries. Set only when the server accepts file uploads. `upload` takes precedence. */
161
+ queueFiles: {
162
+ default: boolean;
163
+ type: BooleanConstructor;
164
+ };
165
+ /** The file types that the boxes take, such as `image/*`. */
166
+ accept: {
167
+ type: StringConstructor;
168
+ };
169
+ /** Gives the URL of an attachment key. With it, image attachments show as thumbnails. */
170
+ attachmentUrl: {
171
+ type: PropType<CommentAttachmentUrl>;
172
+ };
173
+ /** Send a new page comment that has files and no text. */
174
+ allowEmpty: {
175
+ default: boolean;
176
+ type: BooleanConstructor;
177
+ };
178
+ /** People that messages may mention, on top of the people that the comments state knows. */
179
+ people: {
180
+ default: () => never[];
181
+ type: PropType<CommentUser[]>;
182
+ };
183
+ /** What the signed-in user may do in a thread. Defaults to the `can` of the comments state. */
184
+ can: {
185
+ type: PropType<CommentCan>;
186
+ };
187
+ /**
188
+ * Groups the rows under headings, in the order the groups first appear. Threads without a group come first. Without a
189
+ * group callback, a resolved thread that Open lists for a later reply goes under "Replied since resolved".
190
+ */
191
+ group: {
192
+ type: PropType<CommentGroup>;
193
+ };
194
+ }>> & Readonly<{
195
+ onSelect?: ((...args: any[]) => any) | undefined;
196
+ "onUpdate:thread"?: ((...args: any[]) => any) | undefined;
197
+ "onUpdate:status"?: ((...args: any[]) => any) | undefined;
198
+ }>, {
199
+ title: string;
200
+ variant: CommentPanelVariant;
201
+ people: CommentUser[];
202
+ readOnly: boolean;
203
+ queueFiles: boolean;
204
+ thread: string | null;
205
+ allowEmpty: boolean;
206
+ }, SlotsType<CommentPanelSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
207
+ //#endregion
208
+ export { CommentPanelVariant as a, CommentUpload as c, CommentPanelSlots as i, CommentGroupSlotScope as n, CommentRowSlotScope as o, CommentPanel as r, CommentRowSlots as s, CommentGroup as t };