@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,7 +1,8 @@
1
1
  import { PropType } from "vue";
2
- import { MarkdownProps } from "@comark/vue";
2
+ import { MarkdownDocumentProps, MarkdownProps } from "@comark/vue";
3
3
  //#region src/components/markdown.d.ts
4
- declare const Markdown$1: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ export type MarkdownValue = string | NonNullable<MarkdownDocumentProps["value"]>;
5
+ export declare const Markdown: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
6
  components: {
6
7
  type: PropType<MarkdownProps["components"]>;
7
8
  };
@@ -17,7 +18,7 @@ declare const Markdown$1: import("vue").DefineComponent<import("vue").ExtractPro
17
18
  };
18
19
  value: {
19
20
  default: string;
20
- type: StringConstructor;
21
+ type: PropType<MarkdownValue>;
21
22
  };
22
23
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
23
24
  [key: string]: any;
@@ -37,11 +38,10 @@ declare const Markdown$1: import("vue").DefineComponent<import("vue").ExtractPro
37
38
  };
38
39
  value: {
39
40
  default: string;
40
- type: StringConstructor;
41
+ type: PropType<MarkdownValue>;
41
42
  };
42
43
  }>> & Readonly<{}>, {
44
+ value: MarkdownValue;
43
45
  streaming: boolean;
44
- value: string;
45
46
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
46
- //#endregion
47
- export { Markdown$1 as t };
47
+ //#endregion
@@ -0,0 +1,47 @@
1
+ import { i as useViteHubUI } from "../../config-Dk67emQt.js";
2
+ import { Suspense, defineAsyncComponent, defineComponent, getCurrentInstance, h } from "vue";
3
+ //#region src/components/markdown.ts
4
+ const MarkdownRenderer = defineAsyncComponent(() => import("./markdown-renderer.js").then((module) => module.MarkdownRenderer));
5
+ const Markdown = defineComponent({
6
+ name: "Markdown",
7
+ inheritAttrs: false,
8
+ props: {
9
+ components: { type: Object },
10
+ options: { type: Object },
11
+ plugins: { type: Array },
12
+ streaming: {
13
+ default: false,
14
+ type: Boolean
15
+ },
16
+ value: {
17
+ default: "",
18
+ type: [String, Object]
19
+ }
20
+ },
21
+ setup(props, { attrs }) {
22
+ const instance = getCurrentInstance();
23
+ const hasParentSuspense = Boolean(instance && "suspense" in instance && instance.suspense);
24
+ const defaults = useViteHubUI();
25
+ return () => {
26
+ const markdown = () => h(MarkdownRenderer, {
27
+ ...attrs,
28
+ class: [defaults.markdown.class, attrs.class],
29
+ components: props.components,
30
+ options: props.options,
31
+ plugins: props.plugins,
32
+ streaming: props.streaming,
33
+ value: props.value
34
+ });
35
+ if (hasParentSuspense) return markdown();
36
+ return h(Suspense, null, {
37
+ default: markdown,
38
+ fallback: () => h("div", {
39
+ ...attrs,
40
+ class: [defaults.markdown.class, attrs.class]
41
+ }, typeof props.value === "string" ? props.value : "")
42
+ });
43
+ };
44
+ }
45
+ });
46
+ //#endregion
47
+ export { Markdown };
@@ -1,7 +1,7 @@
1
1
  import { PropType } from "vue";
2
2
  //#region src/components/marker.d.ts
3
- type MarkerVariant = "default" | "border" | "separator";
4
- declare const Marker: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ export type MarkerVariant = "default" | "border" | "separator";
4
+ export declare const Marker: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  as: {
6
6
  default: string;
7
7
  type: PropType<string | import("vue").Component>;
@@ -22,14 +22,13 @@ declare const Marker: import("vue").DefineComponent<import("vue").ExtractPropTyp
22
22
  type: PropType<MarkerVariant>;
23
23
  };
24
24
  }>> & Readonly<{}>, {
25
- as: string | import("vue").Component;
26
25
  variant: MarkerVariant;
26
+ as: string | import("vue").Component;
27
27
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
- declare const MarkerIcon: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
28
+ export declare const MarkerIcon: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
29
29
  [key: string]: any;
30
30
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
31
- declare const MarkerContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
31
+ export declare const MarkerContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
32
32
  [key: string]: any;
33
33
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
34
- //#endregion
35
- export { MarkerVariant as i, MarkerContent as n, MarkerIcon as r, Marker as t };
34
+ //#endregion
@@ -1,4 +1,4 @@
1
- import { n as slotPart, t as asProp } from "./slot-part-C7Ocxn3b.js";
1
+ import { r as slotPart, t as asProp } from "../../slot-part-Doic71uh.js";
2
2
  import { defineComponent, h } from "vue";
3
3
  //#region src/components/marker.ts
4
4
  const Marker = defineComponent({
@@ -20,4 +20,4 @@ const Marker = defineComponent({
20
20
  const MarkerIcon = slotPart("MarkerIcon", "marker-icon", "span", { "aria-hidden": "true" });
21
21
  const MarkerContent = slotPart("MarkerContent", "marker-content", "span");
22
22
  //#endregion
23
- export { MarkerContent as n, MarkerIcon as r, Marker as t };
23
+ export { Marker, MarkerContent, MarkerIcon };
@@ -1,7 +1,7 @@
1
1
  import { PropType } from "vue";
2
2
  import { UIMessage } from "ai";
3
3
  //#region src/components/message-parts.d.ts
4
- declare const MessageParts: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ export declare const MessageParts: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  parts: {
6
6
  required: true;
7
7
  type: PropType<UIMessage["parts"]>;
@@ -24,5 +24,4 @@ declare const MessageParts: import("vue").DefineComponent<import("vue").ExtractP
24
24
  }>> & Readonly<{}>, {
25
25
  streaming: boolean;
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
27
- //#endregion
28
- export { MessageParts as t };
27
+ //#endregion
@@ -1,9 +1,9 @@
1
- import { t as ImagePreview } from "./image-preview-VfknBEFu.js";
2
- import { t as Markdown } from "./markdown-BoLBN0qH.js";
1
+ import { Markdown } from "./markdown.js";
2
+ import { t as ImagePreview } from "../../image-preview-C9tdkmEj.js";
3
3
  import { defineComponent, h } from "vue";
4
- import { MessageParts } from "comark-chat/vue";
4
+ import { MessageParts as MessageParts$1 } from "comark-chat/vue";
5
5
  //#region src/components/message-parts.ts
6
- const MessageParts$1 = defineComponent({
6
+ const MessageParts = defineComponent({
7
7
  name: "MessageParts",
8
8
  props: {
9
9
  parts: {
@@ -16,7 +16,7 @@ const MessageParts$1 = defineComponent({
16
16
  }
17
17
  },
18
18
  setup(props, { slots }) {
19
- return () => h(MessageParts, {
19
+ return () => h(MessageParts$1, {
20
20
  class: "vh-message-parts",
21
21
  "data-slot": "message-parts",
22
22
  parts: props.parts,
@@ -35,4 +35,4 @@ const MessageParts$1 = defineComponent({
35
35
  }
36
36
  });
37
37
  //#endregion
38
- export { MessageParts$1 as t };
38
+ export { MessageParts };
@@ -1,10 +1,10 @@
1
1
  import { PropType } from "vue";
2
2
  //#region src/components/message.d.ts
3
- type MessageAlign = "start" | "end";
4
- declare const MessageGroup: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
3
+ export type MessageAlign = "start" | "end";
4
+ export declare const MessageGroup: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
5
5
  [key: string]: any;
6
6
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
- declare const Message: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ export declare const Message: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
8
  align: {
9
9
  default: string;
10
10
  type: PropType<MessageAlign>;
@@ -19,17 +19,16 @@ declare const Message: import("vue").DefineComponent<import("vue").ExtractPropTy
19
19
  }>> & Readonly<{}>, {
20
20
  align: MessageAlign;
21
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
- declare const MessageAvatar: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
22
+ export declare const MessageAvatar: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
23
23
  [key: string]: any;
24
24
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
25
- declare const MessageContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
25
+ export declare const MessageContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
26
  [key: string]: any;
27
27
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
28
- declare const MessageHeader: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
28
+ export declare const MessageHeader: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
29
29
  [key: string]: any;
30
30
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
31
- declare const MessageFooter: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
31
+ export declare const MessageFooter: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
32
32
  [key: string]: any;
33
33
  }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
34
- //#endregion
35
- export { MessageFooter as a, MessageContent as i, MessageAlign as n, MessageGroup as o, MessageAvatar as r, MessageHeader as s, Message as t };
34
+ //#endregion
@@ -1,4 +1,4 @@
1
- import { n as slotPart } from "./slot-part-C7Ocxn3b.js";
1
+ import { r as slotPart } from "../../slot-part-Doic71uh.js";
2
2
  import { defineComponent, h } from "vue";
3
3
  //#region src/components/message.ts
4
4
  const MessageGroup = slotPart("MessageGroup", "message-group");
@@ -20,4 +20,4 @@ const MessageContent = slotPart("MessageContent", "message-content");
20
20
  const MessageHeader = slotPart("MessageHeader", "message-header");
21
21
  const MessageFooter = slotPart("MessageFooter", "message-footer");
22
22
  //#endregion
23
- export { MessageGroup as a, MessageFooter as i, MessageAvatar as n, MessageHeader as o, MessageContent as r, Message as t };
23
+ export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
@@ -0,0 +1,2 @@
1
+ import { n as parseDiffFromFile, r as getSingularPatch, t as parsePatchFiles } from "../../index-CNY1uNTh.js";
2
+ export { getSingularPatch, parseDiffFromFile, parsePatchFiles };
@@ -0,0 +1,2 @@
1
+ import { a as parsePatchFiles, n as parseDiffFromFile, t as getSingularPatch } from "../../getSingularPatch-Dsb8EgxR.js";
2
+ export { getSingularPatch, parseDiffFromFile, parsePatchFiles };
@@ -1,11 +1,11 @@
1
1
  import { PropType } from "vue";
2
2
  import { ChatStatus, FileUIPart } from "ai";
3
3
  //#region src/components/prompt-input.d.ts
4
- interface PromptInputSubmit {
4
+ export interface PromptInputSubmit {
5
5
  files: readonly FileUIPart[];
6
6
  text: string;
7
7
  }
8
- declare const PromptInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ export declare const PromptInput: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
9
9
  accept: {
10
10
  type: StringConstructor;
11
11
  };
@@ -13,13 +13,33 @@ declare const PromptInput: import("vue").DefineComponent<import("vue").ExtractPr
13
13
  default: boolean;
14
14
  type: BooleanConstructor;
15
15
  };
16
+ /** The attach button's look: `outline`, or `ghost` for a muted icon in a box that has its own frame. */
17
+ attachVariant: {
18
+ default: string;
19
+ type: PropType<"outline" | "ghost">;
20
+ };
21
+ /** The prompt takes no input: the field, the attach button, Send, and Retry are disabled. Stop stays pressable. */
22
+ disabled: {
23
+ default: boolean;
24
+ type: BooleanConstructor;
25
+ };
16
26
  files: {
17
27
  default: () => never[];
18
28
  type: PropType<readonly FileUIPart[]>;
19
29
  };
30
+ /** Prevent adding and removing files while a consumer submits them. Text stays editable. */
31
+ filesDisabled: {
32
+ default: boolean;
33
+ type: BooleanConstructor;
34
+ };
20
35
  filterFiles: {
21
36
  type: PropType<(files: readonly File[]) => readonly File[]>;
22
37
  };
38
+ /** The text is being sent: the field is read-only, Enter does nothing, and Send shows a spinner. */
39
+ readonly: {
40
+ default: boolean;
41
+ type: BooleanConstructor;
42
+ };
23
43
  modelValue: {
24
44
  default: string;
25
45
  type: StringConstructor;
@@ -41,7 +61,7 @@ declare const PromptInput: import("vue").DefineComponent<import("vue").ExtractPr
41
61
  };
42
62
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
43
63
  [key: string]: any;
44
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("error" | "submit" | "reload" | "stop" | "update:files" | "update:modelValue")[], "error" | "submit" | "reload" | "stop" | "update:files" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
64
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("error" | "submit" | "stop" | "update:modelValue" | "reload" | "update:files")[], "error" | "submit" | "stop" | "update:modelValue" | "reload" | "update:files", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
45
65
  accept: {
46
66
  type: StringConstructor;
47
67
  };
@@ -49,13 +69,33 @@ declare const PromptInput: import("vue").DefineComponent<import("vue").ExtractPr
49
69
  default: boolean;
50
70
  type: BooleanConstructor;
51
71
  };
72
+ /** The attach button's look: `outline`, or `ghost` for a muted icon in a box that has its own frame. */
73
+ attachVariant: {
74
+ default: string;
75
+ type: PropType<"outline" | "ghost">;
76
+ };
77
+ /** The prompt takes no input: the field, the attach button, Send, and Retry are disabled. Stop stays pressable. */
78
+ disabled: {
79
+ default: boolean;
80
+ type: BooleanConstructor;
81
+ };
52
82
  files: {
53
83
  default: () => never[];
54
84
  type: PropType<readonly FileUIPart[]>;
55
85
  };
86
+ /** Prevent adding and removing files while a consumer submits them. Text stays editable. */
87
+ filesDisabled: {
88
+ default: boolean;
89
+ type: BooleanConstructor;
90
+ };
56
91
  filterFiles: {
57
92
  type: PropType<(files: readonly File[]) => readonly File[]>;
58
93
  };
94
+ /** The text is being sent: the field is read-only, Enter does nothing, and Send shows a spinner. */
95
+ readonly: {
96
+ default: boolean;
97
+ type: BooleanConstructor;
98
+ };
59
99
  modelValue: {
60
100
  default: string;
61
101
  type: StringConstructor;
@@ -78,16 +118,19 @@ declare const PromptInput: import("vue").DefineComponent<import("vue").ExtractPr
78
118
  }>> & Readonly<{
79
119
  onError?: ((...args: any[]) => any) | undefined;
80
120
  onSubmit?: ((...args: any[]) => any) | undefined;
81
- onReload?: ((...args: any[]) => any) | undefined;
82
- onStop?: ((...args: any[]) => any) | undefined;
83
- "onUpdate:files"?: ((...args: any[]) => any) | undefined;
84
121
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
122
+ "onUpdate:files"?: ((...args: any[]) => any) | undefined;
123
+ onStop?: ((...args: any[]) => any) | undefined;
124
+ onReload?: ((...args: any[]) => any) | undefined;
85
125
  }>, {
126
+ disabled: boolean;
127
+ modelValue: string;
86
128
  status: ChatStatus;
129
+ multiple: boolean;
130
+ readonly: boolean;
87
131
  attachments: boolean;
88
132
  files: readonly FileUIPart[];
89
- modelValue: string;
90
- multiple: boolean;
133
+ attachVariant: "ghost" | "outline";
134
+ filesDisabled: boolean;
91
135
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
92
- //#endregion
93
- export { PromptInputSubmit as n, PromptInput as t };
136
+ //#endregion
@@ -1,93 +1,9 @@
1
- import { t as uiErrorDiagnostics } from "./error-diagnostics-B4hMpJRL.js";
2
- import { t as ImagePreview } from "./image-preview-VfknBEFu.js";
3
- import { c as AttachmentTitle, i as AttachmentContent, n as AttachmentAction, o as AttachmentGroup, r as AttachmentActions, s as AttachmentMedia, t as Attachment } from "./attachment-B3dXC7jM.js";
4
- import { computed, defineComponent, h, onBeforeUnmount, onScopeDispose, ref, resolveComponent } from "vue";
5
- //#region src/composables/attachments.ts
6
- function matchesAccept(file, accept) {
7
- if (!accept) return true;
8
- return accept.split(",").some((entry) => {
9
- const value = entry.trim();
10
- if (value.startsWith(".")) return file.name.toLowerCase().endsWith(value.toLowerCase());
11
- if (value.endsWith("/*")) return file.type.startsWith(value.slice(0, -1));
12
- return file.type === value;
13
- });
14
- }
15
- function fileToDataUrl(file) {
16
- return new Promise((resolve, reject) => {
17
- const reader = new FileReader();
18
- reader.onerror = () => reject(reader.error ?? uiErrorDiagnostics.UI_R0001({ message: `Could not read ${file.name}.` }));
19
- reader.onload = () => resolve(String(reader.result));
20
- reader.readAsDataURL(file);
21
- });
22
- }
23
- async function fileToUIPart(file) {
24
- return {
25
- filename: file.name,
26
- mediaType: file.type || "application/octet-stream",
27
- type: "file",
28
- url: await fileToDataUrl(file)
29
- };
30
- }
31
- function useAgentAttachments(options = {}) {
32
- const files = ref([]);
33
- const accept = computed(() => options.accept);
34
- const revoke = (attachment) => {
35
- if (attachment.previewUrl?.startsWith("blob:")) URL.revokeObjectURL(attachment.previewUrl);
36
- };
37
- const remove = (id) => {
38
- const attachment = files.value.find((item) => item.id === id);
39
- if (attachment) revoke(attachment);
40
- files.value = files.value.filter((item) => item.id !== id);
41
- };
42
- const clear = () => {
43
- files.value.forEach(revoke);
44
- files.value = [];
45
- };
46
- const add = (input) => {
47
- for (const file of Array.from(input)) {
48
- if (!matchesAccept(file, options.accept)) {
49
- options.onReject?.(file, "type");
50
- continue;
51
- }
52
- if (options.maxSize !== void 0 && file.size > options.maxSize) {
53
- options.onReject?.(file, "size");
54
- continue;
55
- }
56
- if (options.multiple === false && files.value.length > 0 || options.maxFiles !== void 0 && files.value.length >= options.maxFiles) {
57
- options.onReject?.(file, "count");
58
- continue;
59
- }
60
- const previewUrl = file.type.startsWith("image/") && typeof URL.createObjectURL === "function" ? URL.createObjectURL(file) : void 0;
61
- files.value.push({
62
- file,
63
- id: globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${file.name}`,
64
- previewUrl
65
- });
66
- }
67
- };
68
- onScopeDispose(clear);
69
- return {
70
- accept,
71
- add,
72
- clear,
73
- files,
74
- inputProps: computed(() => ({
75
- accept: options.accept,
76
- multiple: options.multiple ?? true,
77
- type: "file"
78
- })),
79
- remove,
80
- async toFileParts() {
81
- return Promise.all(files.value.map(({ file }) => fileToUIPart(file)));
82
- }
83
- };
84
- }
85
- //#endregion
86
- //#region src/internal/prompt-files.ts
87
- function nextPromptFiles(current, selected, multiple) {
88
- return multiple ? [...current, ...selected] : selected.slice(-1);
89
- }
90
- //#endregion
1
+ import { r as useUIComponent } from "../../nuxt-ui-DSQFzq3s.js";
2
+ import { a as useViteHubUIIcons } from "../../config-Dk67emQt.js";
3
+ import { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentGroup, AttachmentMedia, AttachmentTitle } from "./attachment.js";
4
+ import { t as ImagePreview } from "../../image-preview-C9tdkmEj.js";
5
+ import { a as nextPromptFiles, n as fileToUIPart } from "../../attachments-BzTwqRTU.js";
6
+ import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref } from "vue";
91
7
  //#region src/components/prompt-input.ts
92
8
  const submitLabels = {
93
9
  error: "Retry prompt",
@@ -96,10 +12,10 @@ const submitLabels = {
96
12
  submitted: "Stop response"
97
13
  };
98
14
  const submitIcons = {
99
- error: "i-ph-arrow-clockwise",
100
- ready: "i-ph-arrow-up",
101
- streaming: "i-ph-stop-fill",
102
- submitted: "i-ph-stop-fill"
15
+ error: "reload",
16
+ ready: "arrowUp",
17
+ streaming: "stop",
18
+ submitted: "stop"
103
19
  };
104
20
  /** Whether the device has only coarse pointers, such as a phone. A tablet with a trackpad or a mouse is not touch only. */
105
21
  function touchOnly() {
@@ -114,11 +30,31 @@ const PromptInput = defineComponent({
114
30
  default: true,
115
31
  type: Boolean
116
32
  },
33
+ /** The attach button's look: `outline`, or `ghost` for a muted icon in a box that has its own frame. */
34
+ attachVariant: {
35
+ default: "outline",
36
+ type: String
37
+ },
38
+ /** The prompt takes no input: the field, the attach button, Send, and Retry are disabled. Stop stays pressable. */
39
+ disabled: {
40
+ default: false,
41
+ type: Boolean
42
+ },
117
43
  files: {
118
44
  default: () => [],
119
45
  type: Array
120
46
  },
47
+ /** Prevent adding and removing files while a consumer submits them. Text stays editable. */
48
+ filesDisabled: {
49
+ default: false,
50
+ type: Boolean
51
+ },
121
52
  filterFiles: { type: Function },
53
+ /** The text is being sent: the field is read-only, Enter does nothing, and Send shows a spinner. */
54
+ readonly: {
55
+ default: false,
56
+ type: Boolean
57
+ },
122
58
  modelValue: {
123
59
  default: "",
124
60
  type: String
@@ -148,17 +84,26 @@ const PromptInput = defineComponent({
148
84
  const form = ref(null);
149
85
  const pendingFiles = ref(0);
150
86
  const preparingFiles = computed(() => pendingFiles.value > 0);
151
- const canSubmit = computed(() => props.status === "ready" && !preparingFiles.value && (props.modelValue.trim().length > 0 || props.files.length > 0));
87
+ const canSubmit = computed(() => props.status === "ready" && !props.disabled && !props.readonly && !preparingFiles.value && (props.modelValue.trim().length > 0 || props.files.length > 0));
88
+ const touch = ref(false);
89
+ onMounted(() => {
90
+ touch.value = touchOnly();
91
+ });
152
92
  let disposed = false;
153
93
  let nextBatch = 0;
154
94
  const convertedBatches = /* @__PURE__ */ new Map();
155
95
  onBeforeUnmount(() => {
156
96
  disposed = true;
157
97
  });
158
- const UButton = resolveComponent("UButton");
159
- const UIcon = resolveComponent("UIcon");
160
- const remove = (index) => emit("update:files", props.files.filter((_, current) => current !== index));
98
+ const UButton = useUIComponent("UButton");
99
+ const UIcon = useUIComponent("UIcon");
100
+ const icons = useViteHubUIIcons();
101
+ const filesDisabled = computed(() => props.disabled || props.filesDisabled);
102
+ const remove = (index) => {
103
+ if (!filesDisabled.value) emit("update:files", props.files.filter((_, current) => current !== index));
104
+ };
161
105
  const addFiles = async (input, onAccepted) => {
106
+ if (filesDisabled.value) return;
162
107
  const batch = nextBatch++;
163
108
  pendingFiles.value++;
164
109
  try {
@@ -211,11 +156,12 @@ const PromptInput = defineComponent({
211
156
  alt: label,
212
157
  compact: true,
213
158
  src: file.url
214
- }) : h(UIcon, { name: "i-ph-file-light" })),
159
+ }) : h(UIcon, { name: icons.value.file })),
215
160
  h(AttachmentContent, () => h(AttachmentTitle, () => label)),
216
161
  h(AttachmentActions, () => h(AttachmentAction, {
217
162
  "aria-label": `Remove ${file.filename ?? "attachment"}`,
218
- icon: "i-ph-x-light",
163
+ disabled: filesDisabled.value,
164
+ icon: icons.value.close,
219
165
  onClick: () => remove(index)
220
166
  }))
221
167
  ]);
@@ -225,7 +171,10 @@ const PromptInput = defineComponent({
225
171
  "data-slot": "prompt-input",
226
172
  onSubmit: submit,
227
173
  ref: form
228
- }, [h("div", { "data-slot": "prompt-input-group" }, [
174
+ }, [h("div", {
175
+ "data-focus-frame": "",
176
+ "data-slot": "prompt-input-group"
177
+ }, [
229
178
  props.files.length > 0 || slots.files ? slots.files?.({
230
179
  files: props.files,
231
180
  remove
@@ -233,15 +182,19 @@ const PromptInput = defineComponent({
233
182
  h("textarea", {
234
183
  "aria-label": attrs["aria-label"] ?? "Message",
235
184
  "data-slot": "prompt-input-textarea",
185
+ enterkeyhint: touch.value ? "enter" : "send",
236
186
  onInput: (event) => emit("update:modelValue", event.target.value),
237
187
  onKeydown: (event) => {
238
188
  if (event.key !== "Enter" || event.shiftKey || event.ctrlKey || event.metaKey || event.altKey || event.isComposing) return;
239
189
  if (touchOnly()) return;
240
190
  event.preventDefault();
241
- if (props.status === "ready") form.value?.requestSubmit();
191
+ if (props.status === "ready" && !props.disabled && !props.readonly) form.value?.requestSubmit();
242
192
  },
243
193
  onPaste: paste,
244
194
  placeholder: props.placeholder,
195
+ "aria-busy": props.readonly ? "true" : void 0,
196
+ disabled: props.disabled,
197
+ readonly: props.readonly,
245
198
  rows: 1,
246
199
  value: props.modelValue
247
200
  }),
@@ -249,7 +202,8 @@ const PromptInput = defineComponent({
249
202
  props.attachments && h("input", {
250
203
  accept: props.accept,
251
204
  "aria-label": "Add attachment",
252
- class: "vh-visually-hidden",
205
+ "data-slot": "visually-hidden",
206
+ disabled: filesDisabled.value,
253
207
  multiple: props.multiple,
254
208
  onChange: async (event) => {
255
209
  const target = event.currentTarget;
@@ -263,14 +217,15 @@ const PromptInput = defineComponent({
263
217
  }),
264
218
  slots.actions?.() ?? (props.attachments && h(UButton, {
265
219
  "aria-label": "Add attachment",
266
- class: "rounded-full",
220
+ class: props.attachVariant === "ghost" ? "rounded-full text-muted hover:text-default" : "rounded-full",
267
221
  color: "neutral",
268
- icon: "i-ph-plus",
222
+ disabled: filesDisabled.value,
223
+ icon: icons.value.plus,
269
224
  onClick: () => input.value?.click(),
270
225
  size: "sm",
271
226
  square: true,
272
227
  type: "button",
273
- variant: "outline"
228
+ variant: props.attachVariant
274
229
  })),
275
230
  slots["footer-leading"]?.(),
276
231
  h("span", { "data-slot": "prompt-input-spacer" }),
@@ -282,18 +237,18 @@ const PromptInput = defineComponent({
282
237
  "aria-label": props.status === "ready" && props.submitLabel ? props.submitLabel : submitLabels[props.status],
283
238
  class: "rounded-full",
284
239
  color: "neutral",
285
- disabled: props.status === "ready" && !canSubmit.value,
286
- icon: submitIcons[props.status],
287
- loading: props.status === "ready" && preparingFiles.value,
240
+ disabled: props.status === "ready" && !canSubmit.value || props.disabled && props.status === "error",
241
+ icon: icons.value[submitIcons[props.status]],
242
+ loading: props.status === "ready" && (preparingFiles.value || props.readonly),
288
243
  onClick: pressSubmit,
289
244
  size: "sm",
290
245
  square: true,
291
246
  type: "button",
292
- variant: "solid"
247
+ variant: props.status === "ready" && !canSubmit.value ? "soft" : "solid"
293
248
  })
294
249
  ])
295
250
  ])]);
296
251
  }
297
252
  });
298
253
  //#endregion
299
- export { useAgentAttachments as i, fileToDataUrl as n, fileToUIPart as r, PromptInput as t };
254
+ export { PromptInput };