@vite-hub/ui 0.6.1 → 0.8.0

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 (319) hide show
  1. package/README.md +106 -46
  2. package/dist/AttachmentTitle-BWw0ck0T.js +110 -0
  3. package/dist/BubbleContent-B1a4e3vE.js +45 -0
  4. package/dist/Chat-CuSthJVg.js +112 -0
  5. package/dist/ChatMessage-CFQs0v4N.js +94 -0
  6. package/dist/CodeBlockContent-BjXJm8lO.js +92 -0
  7. package/dist/CodeBlockTitle-DIu8Ef3V.js +99 -0
  8. package/dist/CommentRow-XY3FNp30.js +86 -0
  9. package/dist/CopyButton-Bs6DT-Z8.js +188 -0
  10. package/dist/Markdown-Da5t-931.js +70 -0
  11. package/dist/MarkdownCodeBlock-BWDLOWPO.js +127 -0
  12. package/dist/MarkdownImage-CJN3myt4.js +111 -0
  13. package/dist/MessageHeader-CJ9eBHSS.js +61 -0
  14. package/dist/MessageParts-CyJLG34y.js +57 -0
  15. package/dist/MessageScrollerViewport-BaTlWLki.js +142 -0
  16. package/dist/MorphText-B6MWdeIv.js +36 -0
  17. package/dist/RollNumber-CnF52zJM.js +49 -0
  18. package/dist/SwapIcon-CUIq1TU5.js +67 -0
  19. package/dist/TraceTitle-Cp0y7RRD.js +133 -0
  20. package/dist/agent-session-2j2gbGpp.js +875 -0
  21. package/dist/agent-session-BwZSMi4S.d.ts +312 -0
  22. package/dist/appendItems-hQ4aBd9Q.js +4047 -0
  23. package/dist/attachment-BllgHx9Q.d.ts +124 -0
  24. package/dist/attachment-DQMJNfj0.js +35 -0
  25. package/dist/avatar-stack-Bj1xUkzY.d.ts +4 -0
  26. package/dist/avatar-stack-CoLlsmwJ.js +72 -0
  27. package/dist/bubble-D3M2_InY.js +32 -0
  28. package/dist/bubble-DmplVxLr.d.ts +64 -0
  29. package/dist/chat-DWdyMSuj.d.ts +13 -0
  30. package/dist/chat-message-QLHnX_ED.d.ts +11 -0
  31. package/dist/chat-session-BOj5L3Ey.d.ts +29 -0
  32. package/dist/chat-session-cxUzvwdj.js +43 -0
  33. package/dist/choices-input-DqgXl5a-.d.ts +97 -0
  34. package/dist/{vue-d2Td6uu2.js → client-BG-oCUtv-5i4sRwXP.js} +4156 -4156
  35. package/dist/code-block-BqOEVWPh.d.ts +182 -0
  36. package/dist/code-block-CMERLfew.js +14 -0
  37. package/dist/code-view-26RY6dX8.js +137 -0
  38. package/dist/code-view-D8yYdFUc.d.ts +184 -0
  39. package/dist/{comment-composer-DmDM3XYP.d.ts → comment-composer-CsVOvG9j.d.ts} +6 -6
  40. package/dist/{comment-composer-X7vJKh5b.js → comment-composer-D_mcH3Ts.js} +175 -37
  41. package/dist/{comment-layer-KnnVfdRV.d.ts → comment-layer-C3xmg-0_.d.ts} +14 -5
  42. package/dist/comment-layer-Ci6ipGi2.js +1206 -0
  43. package/dist/{comment-panel-DoLDOw3E.d.ts → comment-panel-DxN21VoY.d.ts} +24 -17
  44. package/dist/comment-selection-bar-B_bchB2O.d.ts +33 -0
  45. package/dist/comment-selection-bar-DZAtiRZ9.js +144 -0
  46. package/dist/{comment-thread-DPV2kqA4.d.ts → comment-thread-BmsqcjVQ.d.ts} +9 -8
  47. package/dist/{comment-thread-jqPx6aJ8.js → comment-thread-BzOZVqF2.js} +74 -49
  48. package/dist/comments-BU8cTt5o.d.ts +50 -0
  49. package/dist/{comments-9MDSNm-9.js → comments-BaSrroRV.js} +32 -4
  50. package/dist/{comments-OWjNidkP.d.ts → comments-ZfV6IZs8.d.ts} +9 -2
  51. package/dist/components-B_2Q0dJ3.js +269 -0
  52. package/dist/{config-LRonN53j.js → config-BDQYUjjp.js} +10 -29
  53. package/dist/{config-COSdO-ay.d.ts → config-JmsTI7gs.d.ts} +20 -33
  54. package/dist/connection-status-BVSH2ZVo.js +72 -0
  55. package/dist/connection-status-g62BTn44.d.ts +37 -0
  56. package/dist/copy-button-CRiXUFsl.d.ts +17 -0
  57. package/dist/device-frame-BW6IjB6P.d.ts +78 -0
  58. package/dist/device-frame-DDWoyB-G.js +515 -0
  59. package/dist/diffs-BTKaVnsb.d.ts +272 -0
  60. package/dist/diffs.d.ts +3 -0
  61. package/dist/{pierre-code-view-C49BVDrc.js → diffs.js} +147 -4223
  62. package/dist/drop-field-C0bXv1J-.d.ts +35 -0
  63. package/dist/drop-field-DeIvKoJs.js +77 -0
  64. package/dist/editor-BsOTjnnN.d.ts +540 -0
  65. package/dist/{markdown-editor-D1irG9Xl.js → editor-hXea1i46.js} +833 -106
  66. package/dist/editor.d.ts +2 -0
  67. package/dist/editor.js +3 -0
  68. package/dist/element-BpjNQvZ0.js +6 -0
  69. package/dist/{file-tree-CRFIdtzw.js → file-tree-B4JKbp4r.js} +19 -18
  70. package/dist/{file-tree-DOtkeBaq.d.ts → file-tree-BdnKA6UA.d.ts} +33 -8
  71. package/dist/file-tree-DDSIafDn.d.ts +22 -0
  72. package/dist/file-tree-DS5shGSL.js +46 -0
  73. package/dist/file-tree.d.ts +2 -0
  74. package/dist/file-tree.js +1 -0
  75. package/dist/files-cuVXzWlx.js +30 -0
  76. package/dist/filter-search-C9e6sGij.d.ts +28 -0
  77. package/dist/filter-search-COZsoRiR.js +73 -0
  78. package/dist/formatCSSVariablePrefix-DLS1Ed1_.js +5 -0
  79. package/dist/headless-2IcUWHMq.d.ts +51 -0
  80. package/dist/headless.d.ts +7 -4
  81. package/dist/headless.js +5 -3
  82. package/dist/highlight.d.ts +2 -0
  83. package/dist/highlight.js +1 -0
  84. package/dist/{highlights-C2AbEdDI.js → highlights-8Al0-h-v.js} +3 -2
  85. package/dist/{hold-to-delete-BSMrpE-i.d.ts → hold-to-delete-CQc1JaG_.d.ts} +7 -0
  86. package/dist/{hold-to-delete-Cludb56v.js → hold-to-delete-D1Vy40w5.js} +138 -20
  87. package/dist/hold-to-delete-DazElJT2.js +85 -0
  88. package/dist/hold-to-delete-ksBE7wxc.d.ts +58 -0
  89. package/dist/index-CffOzibW.d.ts +77 -0
  90. package/dist/{index-B2cbt3py.d.ts → index-D3-uYBqH.d.ts} +1 -1
  91. package/dist/index.d.ts +165 -52
  92. package/dist/index.js +126 -670
  93. package/dist/markdown-BLALLOc0.d.ts +45 -0
  94. package/dist/{parts/components/markdown-renderer.d.ts → markdown-DkDxdpMU.d.ts} +10 -7
  95. package/dist/{markdown-renderer-DMyYKeil.js → markdown-_0HhbsOo.js} +125 -127
  96. package/dist/markdown-editor.d.ts +51 -98
  97. package/dist/markdown-editor.js +70 -3
  98. package/dist/markdown.d.ts +2 -0
  99. package/dist/markdown.js +1 -0
  100. package/dist/marker-CvcWZ3Zp.d.ts +59 -0
  101. package/dist/marker-DNL6QR3L.js +63 -0
  102. package/dist/message-BwivYIEl.js +13 -0
  103. package/dist/message-DEq4K5cQ.d.ts +72 -0
  104. package/dist/message-parts-B1BZFVKe.d.ts +3 -0
  105. package/dist/message-parts-CG3gNWn8.d.ts +11 -0
  106. package/dist/message-parts.d.ts +2 -0
  107. package/dist/message-parts.js +1 -0
  108. package/dist/message-scroller-D7AvM31v.d.ts +41 -0
  109. package/dist/motion/core.d.ts +4 -4
  110. package/dist/motion/core.js +5 -11
  111. package/dist/motion-BH6ShUam.d.ts +12 -0
  112. package/dist/{install-C4LwcJda.js → motion-BhARaNBB.js} +1 -1
  113. package/dist/{effects-C1zYpSpg.js → motion-core-JZZiPKEk.js} +1829 -120
  114. package/dist/{motion-core-Dh20n5Se.d.ts → motion-core-gfsTPLbh.d.ts} +35 -74
  115. package/dist/motion-list-9vD1hSS0.js +49 -0
  116. package/dist/motion.d.ts +5 -14
  117. package/dist/motion.js +6 -13
  118. package/dist/nuxt-ui-D3Qda35W.js +22 -0
  119. package/dist/nuxt.d.ts +9 -5
  120. package/dist/nuxt.js +28 -33
  121. package/dist/parts/components/agent-session.d.ts +2 -295
  122. package/dist/parts/components/agent-session.js +1 -659
  123. package/dist/parts/components/attachment.d.ts +2 -85
  124. package/dist/parts/components/attachment.js +3 -72
  125. package/dist/parts/components/avatar-stack.d.ts +3 -2
  126. package/dist/parts/components/avatar-stack.js +1 -60
  127. package/dist/parts/components/bubble.d.ts +2 -69
  128. package/dist/parts/components/bubble.js +3 -52
  129. package/dist/parts/components/chat-message.d.ts +3 -25
  130. package/dist/parts/components/chat-message.js +1 -50
  131. package/dist/parts/components/chat-session.d.ts +2 -26
  132. package/dist/parts/components/chat-session.js +1 -37
  133. package/dist/parts/components/chat.d.ts +3 -52
  134. package/dist/parts/components/chat.js +1 -105
  135. package/dist/parts/components/code-block.d.ts +2 -102
  136. package/dist/parts/components/code-block.js +4 -109
  137. package/dist/parts/components/code-view.d.ts +3 -268
  138. package/dist/parts/components/code-view.js +1 -1
  139. package/dist/parts/components/comment-composer.d.ts +1 -1
  140. package/dist/parts/components/comment-composer.js +1 -1
  141. package/dist/parts/components/comment-layer.d.ts +1 -1
  142. package/dist/parts/components/comment-layer.js +1 -634
  143. package/dist/parts/components/comment-panel.d.ts +2 -2
  144. package/dist/parts/components/comment-panel.js +22 -16
  145. package/dist/parts/components/comment-selection-bar.d.ts +2 -2
  146. package/dist/parts/components/comment-selection-bar.js +1 -116
  147. package/dist/parts/components/comment-thread.d.ts +1 -1
  148. package/dist/parts/components/comment-thread.js +1 -3
  149. package/dist/parts/components/comments.d.ts +8 -9
  150. package/dist/parts/components/comments.js +5 -9
  151. package/dist/parts/components/connection-status.d.ts +2 -36
  152. package/dist/parts/components/connection-status.js +1 -64
  153. package/dist/parts/components/copy-button.d.ts +3 -126
  154. package/dist/parts/components/copy-button.js +1 -226
  155. package/dist/parts/components/device-frame.d.ts +2 -128
  156. package/dist/parts/components/device-frame.js +1 -470
  157. package/dist/parts/components/drop-field.d.ts +2 -67
  158. package/dist/parts/components/drop-field.js +1 -76
  159. package/dist/parts/components/file-tree.d.ts +3 -2
  160. package/dist/parts/components/file-tree.js +3 -1
  161. package/dist/parts/components/filter-search.d.ts +2 -45
  162. package/dist/parts/components/filter-search.js +1 -57
  163. package/dist/parts/components/hold-to-delete.d.ts +2 -80
  164. package/dist/parts/components/hold-to-delete.js +1 -75
  165. package/dist/parts/components/markdown.d.ts +3 -45
  166. package/dist/parts/components/markdown.js +1 -46
  167. package/dist/parts/components/marker.d.ts +2 -32
  168. package/dist/parts/components/marker.js +1 -22
  169. package/dist/parts/components/message-parts.d.ts +3 -25
  170. package/dist/parts/components/message-parts.js +1 -45
  171. package/dist/parts/components/message.d.ts +2 -32
  172. package/dist/parts/components/message.js +3 -22
  173. package/dist/parts/components/motion-list.d.ts +2 -40
  174. package/dist/parts/components/motion-list.js +1 -41
  175. package/dist/parts/components/motion.d.ts +5 -118
  176. package/dist/parts/components/motion.js +5 -163
  177. package/dist/parts/components/patch-parsers.d.ts +1 -1
  178. package/dist/parts/components/progress.d.ts +2 -39
  179. package/dist/parts/components/progress.js +1 -53
  180. package/dist/parts/components/prompt-input.d.ts +2 -134
  181. package/dist/parts/components/prompt-input.js +1 -253
  182. package/dist/parts/components/relative-time.d.ts +2 -71
  183. package/dist/parts/components/relative-time.js +1 -1
  184. package/dist/parts/components/status.d.ts +2 -58
  185. package/dist/parts/components/status.js +1 -47
  186. package/dist/parts/components/sync-status.d.ts +2 -22
  187. package/dist/parts/components/sync-status.js +1 -48
  188. package/dist/parts/components/tool-list.d.ts +2 -28
  189. package/dist/parts/components/tool-list.js +1 -118
  190. package/dist/parts/components/trace-run.d.ts +2 -25
  191. package/dist/parts/components/trace-run.js +1 -89
  192. package/dist/parts/components/trace.d.ts +2 -59
  193. package/dist/parts/components/trace.js +1 -76
  194. package/dist/parts/composables/attachments.js +75 -1
  195. package/dist/parts/headless/choices-input.d.ts +2 -2
  196. package/dist/parts/headless/choices-input.js +49 -37
  197. package/dist/parts/headless/comments.d.ts +1 -1
  198. package/dist/parts/headless/comments.js +1 -1
  199. package/dist/parts/headless/message-scroller.d.ts +2 -2
  200. package/dist/parts/headless/message-scroller.js +211 -309
  201. package/dist/parts/headless/relative-time.d.ts +2 -0
  202. package/dist/parts/headless/relative-time.js +1 -0
  203. package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
  204. package/dist/parts/workspace/browser-support-notice.js +6 -5
  205. package/dist/parts/workspace/connect-panel.js +1 -1
  206. package/dist/parts/workspace/runners/web-container.js +2 -2
  207. package/dist/parts/workspace/workspace-bar.d.ts +1 -1
  208. package/dist/parts/workspace/workspace-bar.js +1 -1
  209. package/dist/parts/workspace/workspace-boot-status.d.ts +1 -1
  210. package/dist/parts/workspace/workspace-boot-status.js +1 -206
  211. package/dist/parts/workspace/workspace-editor-head.d.ts +1 -1
  212. package/dist/parts/workspace/workspace-editor-head.js +1 -1
  213. package/dist/parts/workspace/workspace-editor.d.ts +2 -2
  214. package/dist/parts/workspace/workspace-examples.js +1 -1
  215. package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
  216. package/dist/parts/workspace/workspace-file-tree.js +3 -2
  217. package/dist/parts/workspace/workspace-guide.d.ts +1 -1
  218. package/dist/parts/workspace/workspace-guide.js +1 -1
  219. package/dist/parts/workspace/workspace-preview.d.ts +1 -1
  220. package/dist/parts/workspace/workspace-preview.js +14 -12
  221. package/dist/parts/workspace/workspace-shell.d.ts +1 -1
  222. package/dist/parts/workspace/workspace-shell.js +11 -11
  223. package/dist/parts/workspace/workspace-sidebar.d.ts +2 -2
  224. package/dist/parts/workspace/workspace-sidebar.js +2 -2
  225. package/dist/parts/workspace/workspace-start.d.ts +1 -1
  226. package/dist/parts/workspace/workspace-start.js +1 -1
  227. package/dist/parts/workspace/workspace-steps.js +1 -1
  228. package/dist/parts/workspace/workspace.d.ts +3 -3
  229. package/dist/parts/workspace/workspace.js +5 -5
  230. package/dist/press-BuEC-XvZ.d.ts +83 -0
  231. package/dist/progress-8P8RLYMy.js +47 -0
  232. package/dist/progress-Ch0fA-bf.d.ts +8 -0
  233. package/dist/prompt-input-CRXEJBAK.js +412 -0
  234. package/dist/prompt-input-j4OFTF5p.d.ts +116 -0
  235. package/dist/relative-time-BnJfjeEm.js +131 -0
  236. package/dist/relative-time-BuP-Gvzn.d.ts +43 -0
  237. package/dist/{relative-time-DJnw45tr.js → relative-time-Dz2DR4eb.js} +64 -114
  238. package/dist/relative-time-grHFu1kY.d.ts +11 -0
  239. package/dist/{ring-GaJsg32c.js → ring-B0nZBnU0.js} +1 -2
  240. package/dist/runtime/nuxt-plugin.js +2 -5
  241. package/dist/{shiki-CbfEu_Az.js → shiki-CxzM_xNo.js} +3 -2
  242. package/dist/stand-ins-CuKM1UH1.js +339 -0
  243. package/dist/status-B2Yhrwv8.js +67 -0
  244. package/dist/status-ySiRa-8O.d.ts +38 -0
  245. package/dist/{stream-tokenizer-ByC3l0HQ.js → stream-tokenizer-BsjV6wxW.js} +1 -1
  246. package/dist/styles.css +4348 -3410
  247. package/dist/sync-status-B29eG_n-.js +59 -0
  248. package/dist/sync-status-D4KdGO6y.d.ts +35 -0
  249. package/dist/theme.css +3 -0
  250. package/dist/theme.d.ts +14 -0
  251. package/dist/theme.js +19 -8
  252. package/dist/{themes-DKugPHlg.js → themes-B0_ioVT0.js} +1 -1
  253. package/dist/tool-list-DDaCqpR6.js +209 -0
  254. package/dist/tool-list-DMRPM0Yi.d.ts +50 -0
  255. package/dist/trace-KCBvOsw_.d.ts +113 -0
  256. package/dist/trace-run-Dk962P5a.d.ts +49 -0
  257. package/dist/trace-run-nh6FIsl6.js +202 -0
  258. package/dist/{opt-out-D66l60sg.js → tween-1W-LlKk9.js} +65 -2
  259. package/dist/types-CMU8Vmew.d.ts +71 -0
  260. package/dist/types-CTk3aNb5.d.ts +15 -0
  261. package/dist/types-D0a3i4Fw.d.ts +21 -0
  262. package/dist/types-DTecvcsZ.d.ts +35 -0
  263. package/dist/types-D_BWab7g.d.ts +75 -0
  264. package/dist/types-RHaQ4gj1.d.ts +27 -0
  265. package/dist/ui-components-CKQAPI-W.js +7 -0
  266. package/dist/unwrapDefault-CExq-4rm.js +5 -0
  267. package/dist/utils-hi9-xROt.js +37 -0
  268. package/dist/vite.d.ts +0 -1
  269. package/dist/vite.js +8 -14
  270. package/dist/{vue-vUGpdMct.js → vue-BdA18K5-.js} +1 -1
  271. package/dist/workspace-boot-status-CyGlJS06.js +216 -0
  272. package/dist/{workspace-shell-ChCwWPyv.d.ts → workspace-shell-B4A7CINd.d.ts} +1 -1
  273. package/dist/workspace.d.ts +1 -1
  274. package/dist/workspace.js +1 -2
  275. package/package.json +46 -15
  276. package/dist/announce-B0DLwflT.js +0 -31
  277. package/dist/attachments-DgwoQZKY.js +0 -88
  278. package/dist/avatar-stack-C0IKwj6g.d.ts +0 -57
  279. package/dist/choices-input-BUf-QqGj.d.ts +0 -92
  280. package/dist/code-view-Cg4nyTNA.js +0 -172
  281. package/dist/comment-attachments-DAzUbRmJ.js +0 -23
  282. package/dist/comment-list-ncwaCSVX.d.ts +0 -60
  283. package/dist/comment-person-D_IyIjXo.js +0 -39
  284. package/dist/comment-pin-hBJFiSYW.d.ts +0 -66
  285. package/dist/comment-row-DPMWI5Z0.js +0 -38
  286. package/dist/comment-selection-bar-CVuS-FNL.d.ts +0 -40
  287. package/dist/comment-send-CUkL3TbZ.js +0 -275
  288. package/dist/comment-send-MmxFsOQf.d.ts +0 -23
  289. package/dist/comment-send.css +0 -267
  290. package/dist/comment-status-nsCdrRk_.js +0 -20
  291. package/dist/drop-field-CNZgwFVO.js +0 -162
  292. package/dist/editor-Dmk3k6f6.js +0 -620
  293. package/dist/format-CPipR1FP.js +0 -19
  294. package/dist/handlers-CnbkvXjX.js +0 -181
  295. package/dist/icon-XZaCUZTG.d.ts +0 -29
  296. package/dist/image-preview-BKVUtfwQ.js +0 -104
  297. package/dist/index-B_PSX-5h.d.ts +0 -69
  298. package/dist/list-DUTAo0uC.js +0 -270
  299. package/dist/markdown-editor-B7gD60tp.d.ts +0 -189
  300. package/dist/message-scroller-BZqS63IX.d.ts +0 -173
  301. package/dist/nuxt-ui-7ByUrymx.js +0 -43
  302. package/dist/parts/components/comment-list.d.ts +0 -2
  303. package/dist/parts/components/comment-list.js +0 -173
  304. package/dist/parts/components/comment-pin.d.ts +0 -2
  305. package/dist/parts/components/comment-pin.js +0 -74
  306. package/dist/parts/components/comment-send.d.ts +0 -2
  307. package/dist/parts/components/comment-send.js +0 -1
  308. package/dist/parts/components/markdown-editor.d.ts +0 -2
  309. package/dist/parts/components/markdown-editor.js +0 -1
  310. package/dist/parts/components/markdown-renderer.js +0 -1
  311. package/dist/payload-text-DQNRbJY5.js +0 -31
  312. package/dist/progress-DL9k-ERG.js +0 -265
  313. package/dist/registry-DAIjCjWd.js +0 -77
  314. package/dist/slot-part-BWHvQ3mK.js +0 -25
  315. package/dist/text-gacox6bp.js +0 -822
  316. package/dist/travel-BliEidau.js +0 -180
  317. package/dist/tween-Dv3IIIQG.js +0 -61
  318. package/dist/types-Ceh7h7NT.d.ts +0 -31
  319. package/dist/visual-copy-CHHBfJ6O.js +0 -14
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![license](https://img.shields.io/static/v1?label=license&message=Apache-2.0&color=blue)](https://github.com/vite-hub/vitehub/blob/main/LICENSE)
6
6
  [![docs](https://img.shields.io/static/v1?label=docs&message=vitehub.dev&color=blue)](https://vitehub.dev/docs)
7
7
 
8
- Vue primitives for AI chat, traces, diffs, and file trees. The styled components compose [Nuxt UI](https://ui.nuxt.com/) and render [AI SDK](https://ai-sdk.dev/) message contracts; the headless entry point provides message-scrolling behavior without the styled component layer.
8
+ Vue primitives for AI chat, traces, diffs, and file trees. The styled components render [ui-sdk](https://ui-sdk.dev) components by default, or the [Nuxt UI](https://ui.nuxt.com/) ones that an app passes, and render [AI SDK](https://ai-sdk.dev/) message contracts; the headless entry point provides message-scrolling behavior without the styled component layer.
9
9
 
10
10
  `Markdown` accepts a string or a parsed Content page. Comark UI block components and document styles are bundled, so readers do not install Comark packages or assemble a component map. `vite-hub/nuxt` auto-imports the primitive; Vite apps import it from `@vite-hub/ui`.
11
11
 
@@ -18,28 +18,31 @@ Markdown images and image attachments use compact thumbnails with an expanded pr
18
18
  | `@vite-hub/ui` | Every styled component: chat, prompt, Markdown, session, trace, diff, file tree, comments, and the shadcn/ui part families | State, transport, persistence, routes, and authorization |
19
19
  | `@vite-hub/ui/headless` | Message viewport, live-edge following, prepend preservation, message jumps, `useComments()`, and the Choices input parts | Markup and styles; Nuxt UI is not required |
20
20
  | `@vite-hub/ui/markdown-editor` | `MarkdownEditor`, with Tiptap | Uploads and where the Markdown is saved |
21
+ | `@vite-hub/ui/markdown` | `MarkdownRenderer`, the Comark renderer that the `markdown` item wraps. No Nuxt UI | The component map and the plugins |
22
+ | `@vite-hub/ui/message-parts` | `MessagePartsRenderer`, the comark-chat renderer that the `message-parts` item wraps. No Nuxt UI | The Markdown and file slots |
23
+ | `@vite-hub/ui/editor` | `useMarkdownEditor()`, `blobUpload()`, the editor handlers, and the ui-sdk editor menus that the `markdown-editor` item uses. No Nuxt UI | Uploads and where the Markdown is saved |
21
24
  | `@vite-hub/ui/workspace` | A live app in the browser: editor, terminal, preview, boot checklist, Connect, and `Workspace` with the `webContainer()` and `render()` runners, with CodeMirror and xterm | Files, tokens, and the cross-origin isolated route |
22
25
  | `@vite-hub/ui/motion` | The motion layer: press, toggle, select, drag, and appear motion by role, the shared spring engine, and reduced motion. No Vue, so a plain TypeScript page or a shadow root can use it | Nothing: `createViteHubUI()` and the Nuxt module install it |
23
26
  | `@vite-hub/ui/motion/core` | The same layer, where `installMotion(root, { effects })` runs only the effects that you list, such as `pressEffect`, so a small script bundles only those | Which effects the script runs |
24
27
  | `@vite-hub/ui/playground` | Share links and zips for any playground, with no UI. It runs in Node too | Where the links and zips go |
25
28
  | `@vite-hub/ui/theme` and `@vite-hub/ui/theme.css` | `vitehubTheme`, the Nuxt UI app config, and the tokens and focus ring. The tokens use shadcn/ui names, such as `--background` and `--radius`, which an app can override. Import the theme in `nuxt.config` or `app.config` | Loading Nuxt UI and Tailwind CSS |
26
- | `@vite-hub/ui/vite` | Vue with Vite setup | Configures the Nuxt UI and Comark Vite plugins |
27
- | `@vite-hub/ui/styles.css` | The styles of every part | Tailwind CSS and the Nuxt UI imports |
29
+ | `@vite-hub/ui/vite` | Vue with Vite setup | Configures the Comark Vite plugin |
30
+ | `@vite-hub/ui/styles.css` | The styles of every part | The `@vite-hub/kit` style family, or Tailwind CSS and Nuxt UI when the app passes Nuxt UI components |
28
31
  | `@vite-hub/ui/comment-marks.css` | Comment pins, areas, and text highlights in plain CSS, for a page or a shadow root without Vue. `styles.css` includes it | Rendering the marks with their data attributes |
29
32
 
30
33
  Import components from the root. A production build keeps only the components that the app imports. `markdown-editor` and `workspace` have their own entries because their dependencies are large, and a chat page must not load them. The components do not need a ViteHub Agent: `Chat` and `PromptInput` render the messages and status of any AI SDK chat, such as `new Chat()` of `@ai-sdk/vue` on a route that returns `streamText().toUIMessageStreamResponse()`.
31
34
 
32
35
  `vite-hub/nuxt` registers the `vitehub` Iconify collection, so `i-vitehub-kv` works in `UIcon`. The icon rail of ViteHub docs and the Console is in `@vite-hub/docs/primitive-rail`. Its styles stay in `@vite-hub/ui/styles.css`.
33
36
 
34
- The parts `Message`, `Bubble`, `Marker`, `Trace`, and `Attachment` follow the [shadcn/ui agentic components](https://ui.shadcn.com/docs/changelog/2026-10-ai-elements): the same part names, props, and `data-slot` attributes. Their default styles map shadcn/ui tokens to Nuxt UI tokens and live in the `components` layer of `styles.css`, so Tailwind utility classes on a part override them. Import them under another name, for example `import { Message as VhMessage } from "@vite-hub/ui"`, when the application already has a `Message` or `Trace` component.
37
+ The parts `Message`, `Bubble`, `Marker`, `Trace`, and `Attachment` follow the [shadcn/ui agentic components](https://ui.shadcn.com/docs/changelog/2026-10-ai-elements): the same part names and `data-slot` attributes. `Message`, `Bubble`, `Attachment`, and `PromptInput` are also `@vitehub` registry items, with the props of the ViteHub contract. Their default styles map shadcn/ui tokens to Nuxt UI tokens and live in the `components` layer of `styles.css`, so Tailwind utility classes on a part override them. Import them under another name, for example `import { Message as VhMessage } from "@vite-hub/ui"`, when the application already has a `Message` or `Trace` component.
35
38
 
36
- The package currently declares `vue` and `ai` as required peers. Styled components also require `@nuxt/ui` and Tailwind CSS. The Vite integration requires `vite`; `@nuxt/ui` and `vite` are optional peers only so applications using another entry point do not have to install them.
39
+ The package declares `vue` and `ai` as required peers. The Vite integration requires `vite`, an optional peer. The styled components need no Nuxt UI: they render the ui-sdk components unless the app passes others (see [the ui-sdk set](#the-ui-sdk-set)).
37
40
 
38
- `RelativeTime` uses Nuxt UI tooltips when a Reka `TooltipProvider` is present, such as inside `UApp`. Otherwise it uses the native `title` attribute, including in apps that provide a Nuxt UI locale.
41
+ `RelativeTime` shows the full date in a ui-sdk tooltip, the `@vitehub/tooltip` item, once it mounts. Set `plain` to leave it out.
39
42
 
40
43
  ## Edit Markdown
41
44
 
42
- `MarkdownEditor` from `@vite-hub/ui/markdown-editor` edits Markdown with [comark-ui's editor](https://comark-ui.onmax.me/guide/editor/), a bubble toolbar, a "/" menu, and a drag handle: Nuxt UI's, or the ui-sdk ones of [the ui-sdk set](#the-ui-sdk-set). Bind the Markdown with `v-model`, or pass `editor` with a Tiptap editor the app made, such as a Realtime room's. A document that the editor can't save unchanged opens read-only.
45
+ `MarkdownEditor` from `@vite-hub/ui/markdown-editor` edits Markdown with [comark-ui's editor](https://comark-ui.onmax.me/guide/editor/), a bubble toolbar, a "/" menu, and a drag handle. The editor uses ui-sdk parts unless the app overrides them. Bind the Markdown with `v-model`, or pass `editor` with a Tiptap editor the app made, such as a Realtime room's. A document that the editor can't save unchanged opens read-only.
43
46
 
44
47
  Pass `upload` to take pasted and dropped images, video, and audio, and to add Image to the "/" menu, which opens the file picker. Each file shows a placeholder with its percentage only on your screen, so a collaborative room never holds a half-uploaded file. A string is a route that returns `blob.handleUpload()`, and the store must be served (`blob.serve`) so the file has a URL:
45
48
 
@@ -52,12 +55,12 @@ const markdown = ref("# Release notes\n");
52
55
  </script>
53
56
 
54
57
  <template>
55
- <MarkdownEditor v-model="markdown" upload="/api/uploads" @upload-error="(error, file) => console.error(file.name, error)" />
58
+ <MarkdownEditor v-model="markdown" upload="/api/uploads" @error="({ error, file }) => console.error(file.name, error)" />
56
59
  </template>
57
60
  ```
58
61
 
59
62
  ```ts [server/api/uploads.post.ts]
60
- import { defineEventHandler } from "h3";
63
+ import { defineEventHandler } from "nitro/h3";
61
64
  import { blob } from "vite-hub/blob";
62
65
 
63
66
  // Check who may upload before this call
@@ -71,7 +74,7 @@ export default defineEventHandler(async (event) => {
71
74
  });
72
75
  ```
73
76
 
74
- `upload` also takes a function, `(file, progress) => Promise<url>`, for any other storage; `blobUpload(route)` is the one a string uses. The default slot receives `{ editor }` for more menus. The entry isn't in the root barrel, so pages that only render Markdown don't load Tiptap. It needs the Tiptap packages that Nuxt UI's editor uses: `@tiptap/core`, `@tiptap/pm`, `@tiptap/vue-3`, `@tiptap/starter-kit`, `@tiptap/extension-image`, `@tiptap/extension-list`, and `@tiptap/extension-table`. With the ui-sdk set, also install `@tiptap/extension-drag-handle`, `@tiptap/extension-drag-handle-vue-3`, and `@floating-ui/dom`, which Nuxt UI otherwise brings.
77
+ `upload` also takes a function, `(file, progress) => Promise<url>`, for any other storage; `blobUpload(route)` is the one a string uses. The default slot receives `{ editor }` for more menus. The entry isn't in the root barrel, so pages that only render Markdown don't load Tiptap. It needs these Tiptap packages: `@tiptap/core`, `@tiptap/pm`, `@tiptap/vue-3`, `@tiptap/starter-kit`, `@tiptap/extension-image`, `@tiptap/extension-list`, `@tiptap/extension-table`, `@tiptap/extension-drag-handle`, `@tiptap/extension-drag-handle-vue-3`, and `@floating-ui/dom`. The `@vitehub/markdown-editor` item adds them to the app. Start without `v-model` with `defaultValue`. A failed upload emits `error` with `{ error, file }`.
75
78
 
76
79
  The menus run each item's `kind`, such as `{ kind: "heading", level: 2 }`, through the handlers that the editor provides. `createEditorHandlers()` returns them, and `mapEditorItems(editor, items)` turns editor items into dropdown entries with `active`, `disabled`, and `onSelect`, as Nuxt UI's `mapEditorItems()` does. Provide your own under `editorHandlersKey` to add kinds; both sets read them.
77
80
 
@@ -203,16 +206,18 @@ Load Tailwind, Nuxt UI, and the package styles in that order:
203
206
  @import "@vite-hub/ui/styles.css";
204
207
  ```
205
208
 
206
- `vite-hub/nuxt` gives the components Nuxt UI's Nuxt icon and adds the icons that they use to the `@nuxt/icon` client bundle, because `@nuxt/icon` does not scan dependencies. It also registers the `vitehub` collection, so names such as `<UIcon name="i-vitehub-kv" />` keep working. The Lucide collection must be installed in the application. It auto-imports public components such as `Chat`, `Markdown`, and `TraceRun`. No separate Vue plugin registration is needed. The stylesheet stays an explicit import.
209
+ The parts render the ui-sdk components by default. To keep Nuxt UI's look, pass the Nuxt UI components in a plugin, as [Nuxt UI apps](#nuxt-ui-apps) shows.
210
+
211
+ `vite-hub/nuxt` gives the components their icon names and adds the icons that they use to the `@nuxt/icon` client bundle, because `@nuxt/icon` does not scan dependencies. It also registers the `vitehub` collection, so names such as `<UIcon name="i-vitehub-kv" />` keep working. The Lucide collection must be installed in the application. It auto-imports public components such as `Chat`, `Markdown`, and `TraceRun`. No separate Vue plugin registration is needed. The stylesheet stays an explicit import.
207
212
 
208
213
  `@vite-hub/ui/nuxt` is internal. `vite-hub/nuxt` and `@vite-hub/docs/nuxt` load it, and it can change in any release. Do not add it to Nuxt `modules`.
209
214
 
210
215
  ## Vue with Vite
211
216
 
212
- Add the runtime peers to an existing Vue and Vite application:
217
+ Add the runtime peers and the kit style family to an existing Vue and Vite application:
213
218
 
214
219
  ```bash
215
- pnpm add @vite-hub/ui @nuxt/ui ai tailwindcss vue
220
+ pnpm add @vite-hub/ui @vite-hub/kit ai vue
216
221
  pnpm add -D vite @vitejs/plugin-vue
217
222
  ```
218
223
 
@@ -229,36 +234,42 @@ export default defineConfig({
229
234
  });
230
235
  ```
231
236
 
232
- Register the Nuxt UI and ViteHub UI Vue plugins:
237
+ Register the ViteHub UI Vue plugin:
233
238
 
234
239
  ```ts
235
240
  // src/main.ts
236
- import NuxtUI from "@nuxt/ui/vue-plugin";
237
241
  import { createViteHubUI } from "@vite-hub/ui";
238
242
  import { createApp } from "vue";
239
243
  import App from "./App.vue";
240
244
  import "./assets/main.css";
241
245
 
242
- createApp(App).use(NuxtUI).use(createViteHubUI()).mount("#app");
246
+ createApp(App).use(createViteHubUI()).mount("#app");
243
247
  ```
244
248
 
245
- Load Tailwind, Nuxt UI, and the package styles in that order:
249
+ Load the kit style family before the package styles:
246
250
 
247
251
  ```css
248
252
  /* src/assets/main.css */
249
- @import "tailwindcss";
250
- @import "@nuxt/ui";
253
+ @layer theme, base, kit, comark, components, utilities;
254
+ @import "@vite-hub/kit/styles/tokens.css";
255
+ @import "@vite-hub/kit/styles/default.css" layer(kit);
251
256
  @import "@vite-hub/ui/styles.css";
252
257
  ```
253
258
 
259
+ For Nuxt UI's look, see [Nuxt UI apps](#nuxt-ui-apps).
260
+
254
261
  Unlike `vite-hub/nuxt`, the Vite integration does not auto-register ViteHub UI components. Import them from `@vite-hub/ui` in each component or use the application's component-registration convention.
255
262
 
256
263
  ## Motion
257
264
 
258
- Controls get the same motion from what a person does with them, not from code of their own (see [docs/design/motion.md](../../docs/design/motion.md)). `createViteHubUI()` installs the motion layer in the browser, and the Nuxt module does it through the same plugin. A pressed `button`, link, tab, radio, option, menu item, or checkbox squashes and springs back past rest. A pressed switch grows its knob instead of squashing the whole control. Non-transformable inline controls, such as links in running text, keep their layout and do not squash. A pointer press near the edge of a control stays still if a squash would risk missing the click. Under `prefers-reduced-motion`, the press stays still.
265
+ Controls get the same motion from what a person does with them, not from code of their own (see [docs/design/motion.md](../../docs/design/motion.md)). `createViteHubUI()` installs the motion layer in the browser, and the Nuxt module does it through the same plugin. By default (press mode `"buttons"`), only compact native buttons squash on a pointer press: a `button` or an `input` of type `button`, `submit`, or `reset`. The control must have no `role` or `role="button"`, be under 48px high, and be at most four times as wide as it is high. Links, tabs, radios, options, menu items, `summary`, checkboxes, wide buttons, and `[role=button]` on other elements stay still. At its settled pressed scale, the control shrinks by at most 6px along its longer side in untransformed layout. The spring can briefly squash farther. An icon-only control squashes its icon by 15% and keeps its background still. Space and Enter do not squash. A pressed switch still grows its knob on a pointer or key press instead of squashing the whole control. Non-transformable inline controls keep their layout and do not squash, and a pointer press near the edge of a control stays still if a squash would risk missing the click. Under `prefers-reduced-motion`, the press stays still.
259
266
 
260
- - Turn the layer off for one subtree with `data-motion="none"`, such as a canvas or an animated figure that draws its own motion.
261
- - Turn it off for the app with `createViteHubUI({ motion: false })`.
267
+ - Opt any element into press squash with `data-motion-press`, or squash only its icon with `data-motion-press="icon"`. An opt-in does not pass down to children.
268
+ - Turn press squash off on an element or a subtree with `data-motion-press="none"`. An element's own `data-motion-press` beats `"none"` on an ancestor.
269
+ - Set the app press mode with `createViteHubUI({ motion: { press: "buttons" | "opt-in" | "all" } })`. `"buttons"` is the default, `"opt-in"` squashes only elements with `data-motion-press`, and `"all"` squashes every control role.
270
+ - Turn the whole layer off for one subtree with `data-motion="none"`, such as a canvas or an animated figure that draws its own motion.
271
+ - Turn the layer off for the app with `createViteHubUI({ motion: false })`.
272
+ - Without Vue, set the press mode with `setMotionPressMode("opt-in")` from `@vite-hub/ui/motion` before or after `installMotion()`.
262
273
  - Without Vue, call it yourself. With no argument it covers the document. A surface on someone else's page, such as a bar in a shadow root, passes its host element and its shadow roots instead, so the page around it does not move:
263
274
 
264
275
  ```ts
@@ -281,13 +292,16 @@ const uninstall = installMotion(bar.attachShadow({ mode: "open" }), { effects: [
281
292
 
282
293
  Four parts move with the helpers of the motion layer, for events that only the component knows:
283
294
 
284
- - `MotionList` replaces `<TransitionGroup>`. Render keyed items in its slot: neighbors spring to their new place, a new item grows from `origin` (the row it duplicates) or from its slot, and a removed item folds away.
295
+ - `MotionList` replaces `<TransitionGroup>`. Render keyed items in its slot: neighbors spring to their new place, a new item grows from `origin` (the row it duplicates) or from its slot, and a removed item folds away. It renders a `div` with `data-slot="motion-list"`. The `#render` slot renders a `ul` or an `ol`.
285
296
  - `Progress` shows work that runs: `value` from 0 to 1 fills the bar with a head, `null` shows a wave while the total is not known, and `done` draws a dot into a check. It has `role="progressbar"` and `aria-valuenow`.
286
- - `DropField` is a label around a file input. The dots behind its text lean toward a dragged file. A click and the keyboard open the file picker. It emits `files`.
287
- - `HoldToDelete` is a button that deletes when it is held. It emits `delete` (hide the item), shows Undo for `undoFor` ms (emits `undo`), and only then calls `commit`. Unmounting it during the Undo window commits. A click from a screen reader asks `confirm` first.
297
+ - `DropField` is a label around a file input. The dots behind its text lean toward a dragged file. A click and the keyboard open the file picker. It emits `select` with `{ files }`.
298
+ - `HoldToDelete` is a button that deletes when it is held. It emits `delete` (hide the item), shows Undo for `undoFor` ms (emits `undo`), and only then calls `commit`. Unmounting it during the Undo window commits. A click from a screen reader asks `confirm` first. `change` gets `{ status }` when its phase changes, and `error` gets `{ error }`.
288
299
 
289
300
  ```vue
290
- <MotionList tag="ul">
301
+ <MotionList>
302
+ <template #render="{ props, children }">
303
+ <ul v-bind="props"><component :is="children" /></ul>
304
+ </template>
291
305
  <li v-for="file in files" :key="file.id">{{ file.name }}</li>
292
306
  </MotionList>
293
307
  <Progress :value="upload.progress" :done="upload.done" label="Upload cover.png" />
@@ -305,7 +319,7 @@ For everything else, use the component or the helper:
305
319
  | Vue | Helper in `@vite-hub/ui/motion` | Use it for |
306
320
  | --- | --- | --- |
307
321
  | `<MorphText :text="copied ? 'Copied' : 'Copy link'" />` | `morphText(element, text)` | A label outside a `UButton` |
308
- | `<SwapIcon :name="icon" enter="draw" />` | `swapIcon(container, icon, { exit, enter })` | An icon that says what happened: `exit: "right"` for an arrow that leaves the way it points, `enter: "draw"` for a check or a spinner |
322
+ | `<SwapIcon :name="icon" enter="draw" v-slot="{ name }"><UIcon :name="name" /></SwapIcon>` | `swapIcon(container, icon, { exit, enter })` | An icon that says what happened: `exit: "right"` for an arrow that leaves the way it points, `enter: "draw"` for a check or a spinner |
309
323
  | `<RollNumber :value="count" />` | `rollNumber(element, value, format?)` | A count: only the changed digits roll, up when it grows, down when it shrinks |
310
324
  | `<UButton v-ring="saved" />` | `ring(element)` | A finished action, such as saved or copied: a ring in the border color grows once and fades. A button joined to others in a `UFieldGroup` rings the whole group |
311
325
 
@@ -315,33 +329,79 @@ The entry also has the spring engine (`createSpring`, `springs.snappy`, `springs
315
329
 
316
330
  ## The ui-sdk set
317
331
 
318
- The styled parts render a few Nuxt UI components by name: `UButton`, `UIcon`, `UInput`, `UModal`, `UTabs`, `UDropdownMenu`, and the editor parts `UEditorToolbar`, `UEditorSuggestionMenu`, and `UEditorDragHandle`. `uiSdkComponents` holds the same names built on [ui-sdk](https://ui-sdk.dev), styled by the `@vite-hub/kit` style family. Give it to `createViteHubUI()`, and a page with these parts loads no Nuxt UI component:
319
-
320
- ```ts
321
- // src/main.ts
322
- import { createViteHubUI, uiSdkComponents } from "@vite-hub/ui";
323
- import { createApp } from "vue";
324
- import App from "./App.vue";
325
- import "./assets/main.css";
326
-
327
- createApp(App).use(createViteHubUI({ components: uiSdkComponents })).mount("#app");
328
- ```
332
+ The styled parts render a few components by Nuxt UI's names: `UButton`, `UIcon`, `UInput`, `UModal`, `UTabs`, `UTooltip`, and `UDropdownMenu`. By default they render `uiSdkComponents`, the same names built on [ui-sdk](https://ui-sdk.dev) and styled by the `@vite-hub/kit` style family. The editor's `UEditorToolbar`, `UEditorSuggestionMenu`, and `UEditorDragHandle` defaults live in the editor entry so other parts do not pull in Tiptap. Load the kit styles:
329
333
 
330
334
  ```css
331
335
  /* src/assets/main.css */
332
- @layer theme, base, comark, ui-sdk, components, utilities;
336
+ @layer theme, base, kit, comark, components, utilities;
333
337
  @import "@vite-hub/kit/styles/tokens.css";
334
- @import "@vite-hub/kit/styles/default.css";
338
+ @import "@vite-hub/kit/styles/default.css" layer(kit);
335
339
  @import "@vite-hub/ui/styles.css";
336
340
  ```
337
341
 
338
- - `UIcon` draws the Lucide icons that the parts use. To show other names, such as your own in `createViteHubUI({ icons })`, pass your own `UIcon` too: `{ ...uiSdkComponents, UIcon: MyIcon }`.
342
+ - `UIcon` draws the Lucide icons that the parts use. To show other names, such as your own in `createViteHubUI({ icons })`, pass your own: `createViteHubUI({ components: { UIcon: MyIcon } })`.
339
343
  - The buttons and fields keep the kit's `data-slot` (`button`, `input`), so a part's own name moves to `data-part`, for example `data-part="copy-button"`.
340
- - The parts still import Nuxt UI with `import()` for a name that no component replaces, so the build must resolve `@nuxt/ui`. Install it, or resolve `@nuxt/ui/*` to an empty module. The page never loads it.
344
+ - `UTooltip` puts ui-sdk's `Tooltip` on the trigger. The content opens on hover and focus, above the trigger by default.
341
345
  - The set also replaces the editor parts of `MarkdownEditor`: `UEditorToolbar` on ui-sdk's `Toolbar` and `Toggle`, which says the pressed state with `aria-pressed`, `UEditorSuggestionMenu` on ui-sdk's `TriggerMenu`, a listbox at the caret while focus stays in the editor, and `UEditorDragHandle` on Tiptap's drag handle. They take the props, slots, and events of Nuxt UI's, and load on first render.
342
346
  - In the "/" menu, Escape closes the list until the trigger is typed again or Control+Space reopens it, and a disabled item can be highlighted but not chosen, as the listbox pattern asks.
343
347
 
344
- `pnpm --filter @vite-hub/ui test:ui-sdk` renders every part that uses these names with the set and drives each one with the keyboard. `pnpm --filter @vite-hub/ui test:editor` drives the editor parts with the keyboard and the pointer, with Nuxt UI's parts and with the set.
348
+ A part uses a component given to `createViteHubUI({ components })` first, then a global one with the same name from `app.component()`, then the ui-sdk one.
349
+
350
+ ### Nuxt UI apps
351
+
352
+ A Nuxt UI app keeps Nuxt UI's look when it passes the Nuxt UI components by name. The ViteHub Console and the docs do this for now. `@nuxt/ui/vue-plugin` registers no components, so pass them:
353
+
354
+ In Nuxt, [register the overrides globally](https://vitehub.dev/docs/ui/installation#nuxt-ui-components) without reinstalling the ViteHub UI plugin. In Vue with Vite, pass the overrides when you install the plugin in `src/main.ts`:
355
+
356
+ ```ts fragment
357
+ import { createViteHubUI } from "@vite-hub/ui";
358
+ import { defineAsyncComponent } from "vue";
359
+
360
+ app.use(createViteHubUI({
361
+ components: {
362
+ UButton: defineAsyncComponent(() => import("@nuxt/ui/components/Button.vue")),
363
+ UDropdownMenu: defineAsyncComponent(() => import("@nuxt/ui/components/DropdownMenu.vue")),
364
+ UIcon: defineAsyncComponent(() => import("@nuxt/ui/components/Icon.vue")),
365
+ UInput: defineAsyncComponent(() => import("@nuxt/ui/components/Input.vue")),
366
+ UModal: defineAsyncComponent(() => import("@nuxt/ui/components/Modal.vue")),
367
+ UTabs: defineAsyncComponent(() => import("@nuxt/ui/components/Tabs.vue")),
368
+ UTooltip: defineAsyncComponent(() => import("@nuxt/ui/components/Tooltip.vue")),
369
+ },
370
+ }));
371
+ ```
372
+
373
+ Add `UEditorToolbar`, `UEditorSuggestionMenu`, and `UEditorDragHandle` for `MarkdownEditor`. Load Tailwind CSS and `@nuxt/ui` before `@vite-hub/ui/styles.css`, and do not load the kit's `default.css` next to Nuxt UI. In Vue with Vite, add `@nuxt/ui/vite` to the plugins before `viteHubUI()`.
374
+
375
+ `pnpm --filter @vite-hub/ui test:ui-sdk` renders every part that uses these names with the default set and drives each one with the keyboard. `pnpm --filter @vite-hub/ui test:editor` drives the editor parts with the keyboard and the pointer, with Nuxt UI's parts and with the set.
376
+
377
+ ## Registry
378
+
379
+ The `@vitehub` registry in the shadcn-vue format is built from the same files as the npm package. Each item lives in `registry/<item>/`. `src/` re-exports the components from there, so `@vite-hub/ui` and `shadcn-vue add` ship the same `.vue` files.
380
+
381
+ `pnpm --filter @vite-hub/ui build:registry` writes the registry to `docs/public/r/`, which vitehub.dev serves at `https://vitehub.dev/r/{name}.json`. Git ignores that folder. The docs site writes it again each time `nuxi dev`, `nuxi build`, or `nuxi prepare` starts. `test/registry.test.ts` fails when the built files do not match the vendored shadcn-vue 2.9.0 schema.
382
+
383
+ The builder reads `registry/registry.json`. An item without `files` publishes every file in `registry/<item>/` to `components/vitehub/<item>/`. It derives the rest from the imports:
384
+
385
+ - `../<name>` becomes the registry dependency `@vitehub/<name>`. An item can depend only on `@vitehub` items, because a stock shadcn-vue item installs Reka UI.
386
+ - A bare import, static or dynamic, becomes an npm dependency. `@ui-sdk/*` is pinned to the exact version in `package.json`. Imports of `@vite-hub/ui/highlight`, `@vite-hub/ui/diffs`, `@vite-hub/ui/file-tree`, `@vite-hub/ui/markdown`, `@vite-hub/ui/message-parts`, or `@vite-hub/ui/editor` require `@vite-hub/ui` at `>=0.6.2 <1.0.0`. Other `@vite-hub/ui` imports, such as `@vite-hub/ui/motion`, use `^0.6.1`. Inside this package `registrySourceStyles()` resolves those imports to `src/`.
387
+ - `registry.json` carries no file content. Each `<item>.json` does.
388
+
389
+ | Item | Type | What `shadcn-vue add` writes |
390
+ | --- | --- | --- |
391
+ | `base` | `registry:base` | The preset for `shadcn-vue init --preset https://vitehub.dev/r/base.json`: Lucide icons, the `@vitehub` registry, `theme`, and `core` |
392
+ | `theme` | `registry:theme` | The tokens from `@vite-hub/kit`, light and dark, into the app's CSS |
393
+ | `core` | `registry:file` | `vitehub.css` (ui-sdk's `web.css`, the `--ui-*` and `--vh-*` aliases), the live region helper, and one `@layer components` rule in the app's CSS |
394
+ | `status`, `copy-button`, `motion`, `sync-status`, `connection-status`, `progress`, `drop-field`, `hold-to-delete`, `avatar-stack`, `marker`, `relative-time`, `filter-search`, `device-frame`, `message`, `bubble`, `attachment`, `prompt-input`, `code-block`, `code-view`, `file-tree`, `markdown`, `markdown-editor`, `comments`, `chat`, `chat-message`, `message-parts`, `tool-list`, `chat-session`, `trace`, `trace-run`, `agent-session` | `registry:component` | The component and its CSS in `components/vitehub/<item>/` |
395
+ | `example-<item>` | `registry:block` | One page that uses the item |
396
+ | `chat-app` | `registry:block` | A chat page with a session list, `chat-session`, and `prompt-input` |
397
+
398
+ `AppShell` closes its mobile sidebar when `current` changes. When you pass a custom `link` component, set `current` from the committed route, not from the click. `SidebarProvider` handles Ctrl+B or Command+B when focus is inside the provider and outside an editable field.
399
+
400
+ An item component follows one contract: compound parts, `data-slot` on the root, `variant`, `size`, and `tone` as `data-<prop>`, boolean props as presence attributes, label props with English defaults, and icon slots with `@lucide/vue` defaults. Its CSS is in `@layer components`. The npm build replaces the CSS imports of the item files with an empty module and puts the item CSS in `styles.css`, because `core` imports ui-sdk's `web.css`, which styles `a`, `kbd`, and `button` and sets the same `--ui-*` names as Nuxt UI.
401
+
402
+ `core` also writes `:where([data-slot]) { box-sizing: border-box }` in `@layer components` into the app's CSS. That rule changes nothing, but it keeps the `components` layer after `base`. Without it, Tailwind 4 emits an empty `components` layer as the statement `@layer components;`, and when the app's CSS keeps an external `@import`, such as the Google Fonts line from `shadcn-vue init`, Vite's postcss-import (16.2.0 in Vite 8.4) moves that statement to the top. Then `components` is the first layer, and Tailwind's Preflight in `base` removes the padding and background of a button.
403
+
404
+ `node --test test/registry-install/install.mjs` (from the repository root) runs `build:registry` and serves `docs/public/r/` on a local port and makes four apps: Vite + Vue + Tailwind 4 from `init --preset`, Nuxt 5, Vite with stock shadcn-vue and Reka UI, and Nuxt 5 with Nuxt UI. It runs `shadcn-vue@2.9.0 add` for every item, installs `@vite-hub/ui` and `@vite-hub/comments` packed from this checkout, builds each app, and renders every example in Chromium. Build UI and its workspace dependencies first with `corepack pnpm exec vp run --cache -t @vite-hub/ui#build`. The check fails on a console error, a root without `data-slot`, a copy button that lost its padding or background to Preflight, or Reka UI in the item files of the first two apps. It needs the npm registry. `REGISTRY_APPS=vite-vue,nuxt` runs some apps, `REGISTRY_INSTALL_DIR` keeps them, and `REGISTRY_SCREENSHOTS` saves a screenshot of each.
345
405
 
346
406
  ## Verify the setup
347
407
 
@@ -363,9 +423,9 @@ The page displays **ViteHub UI is ready.** in bold. This confirms the public com
363
423
 
364
424
  - Published builds require Node.js 24.15 or newer. The package is pre-1.0, so pin its version and review changes before upgrading.
365
425
  - The components render state supplied by the application. They do not send messages, fetch Agent Invocations, choose routes, persist sessions, or authorize access to instruction and trace data.
366
- - `PromptInput` submits only in the ready state after attachment conversion finishes. It preserves the draft while blocked; Stop and Retry remain separate actions. Custom submit slots receive `canSubmit` and `preparingFiles`. The application owns draft recovery and clearing after a send; unmount the prompt when switching sessions with pending file reads.
426
+ - `PromptInput` submits only in the ready state after attachment conversion finishes. It preserves the draft while blocked; Stop and Retry remain separate actions. The default slot of `PromptInput` receives `canSubmit` and `preparing` for a custom submit button. The application owns draft recovery and clearing after a send; unmount the prompt when switching sessions with pending file reads.
367
427
  - Primary chat and trace output supports Vue server rendering. Scrolling observers, clipboard actions, and attachment conversion use browser APIs and become interactive after hydration. Upload and persist raw files yourself when data URLs are not appropriate.
368
- - The styled components depend on Nuxt UI components and tokens. `@vite-hub/ui/styles.css` adds ViteHub presentation but is not a replacement for the Tailwind and Nuxt UI imports.
428
+ - The styled components depend on the ui-sdk components and the kit tokens, or on the Nuxt UI components and tokens that the app passes. `@vite-hub/ui/styles.css` adds ViteHub presentation but does not replace those styles.
369
429
  - The package supplies accessible defaults for its message log, prompt, scroll controls, lists, and built-in actions. The application remains responsible for accessible names on custom controls and slots, meaningful status and error copy, focus behavior around application-owned navigation, and testing the completed interface.
370
430
  - `FileTree` names its search input **Search files** by default. Pass `search-label` for a localized or context-specific accessible name.
371
431
  - The headless entry point owns scrolling behavior, not appearance. Importing `@vite-hub/ui/headless` does not load the stylesheet or register Nuxt UI components.
@@ -383,4 +443,4 @@ The page displays **ViteHub UI is ready.** in bold. This confirms the public com
383
443
 
384
444
  ## Console views
385
445
 
386
- The Agent Invocation list, view, inspector, timeline, and Capability inspector render ViteHub runtime records, so they live in the Console in `vite-hub`. Import `AgentInvocationList`, `AgentInvocation`, `AgentInvocationInspector`, and `AgentCapabilityInspector` from `vite-hub/console/ui`. Build an application-owned inspection page from the parts, such as `Trace` and `CodeBlock`, and from `ToolList`, which also documents Capability tool contracts. `ToolList` emits `select` with the tool name when a viewer chooses one. The model maker and provider marks of the Console come from [Lobe Icons](https://github.com/lobehub/lobe-icons) (MIT).
446
+ The Agent Invocation list, view, inspector, timeline, and Capability inspector render ViteHub runtime records, so they live in the Console in `vite-hub`. Import `AgentInvocationList`, `AgentInvocation`, `AgentInvocationInspector`, and `AgentCapabilityInspector` from `vite-hub/console/ui`. Build an application-owned inspection page from the parts, such as `Trace` and `CodeBlock`, and from `ToolList`, which also documents Capability tool contracts. `ToolList` emits `select` with `{ tool }` when a viewer chooses one, and draws icons through its `icon` slot. The model maker and provider marks of the Console come from [Lobe Icons](https://github.com/lobehub/lobe-icons) (MIT).
@@ -0,0 +1,110 @@
1
+ import { createElementBlock, createVNode, defineComponent, openBlock, renderSlot, unref } from "vue";
2
+ import { X } from "@lucide/vue";
3
+ // registry/attachment/Attachment.vue?vue&type=script&setup=true&lang.ts
4
+ const _hoisted_1$6 = [
5
+ "data-status",
6
+ "data-size",
7
+ "data-orientation"
8
+ ];
9
+ // registry/attachment/Attachment.vue
10
+ var Attachment_default = /* @__PURE__ */ defineComponent({
11
+ __name: "Attachment",
12
+ props: {
13
+ status: { default: "done" },
14
+ size: { default: "md" },
15
+ orientation: { default: "horizontal" }
16
+ },
17
+ setup(__props) {
18
+ return (_ctx, _cache) => {
19
+ return openBlock(), createElementBlock("div", {
20
+ "data-slot": "attachment",
21
+ "data-status": __props.status,
22
+ "data-size": __props.size,
23
+ "data-orientation": __props.orientation
24
+ }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$6);
25
+ };
26
+ }
27
+ });
28
+ // registry/attachment/AttachmentAction.vue?vue&type=script&setup=true&lang.ts
29
+ const _hoisted_1$5 = ["aria-label", "disabled"];
30
+ // registry/attachment/AttachmentAction.vue
31
+ var AttachmentAction_default = /* @__PURE__ */ defineComponent({
32
+ __name: "AttachmentAction",
33
+ props: {
34
+ label: { default: "Remove" },
35
+ disabled: {
36
+ type: Boolean,
37
+ default: false
38
+ }
39
+ },
40
+ setup(__props) {
41
+ return (_ctx, _cache) => {
42
+ return openBlock(), createElementBlock("button", {
43
+ type: "button",
44
+ "data-slot": "attachment-action",
45
+ "aria-label": __props.label,
46
+ disabled: __props.disabled
47
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(X), { "aria-hidden": "true" })])], 8, _hoisted_1$5);
48
+ };
49
+ }
50
+ });
51
+ // registry/attachment/AttachmentActions.vue?vue&type=script&setup=true&lang.ts
52
+ const _hoisted_1$4 = { "data-slot": "attachment-actions" };
53
+ // registry/attachment/AttachmentActions.vue
54
+ var AttachmentActions_default = /* @__PURE__ */ defineComponent({
55
+ __name: "AttachmentActions",
56
+ setup(__props) {
57
+ return (_ctx, _cache) => {
58
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [renderSlot(_ctx.$slots, "default")]);
59
+ };
60
+ }
61
+ });
62
+ // registry/attachment/AttachmentContent.vue?vue&type=script&setup=true&lang.ts
63
+ const _hoisted_1$3 = { "data-slot": "attachment-content" };
64
+ // registry/attachment/AttachmentContent.vue
65
+ var AttachmentContent_default = /* @__PURE__ */ defineComponent({
66
+ __name: "AttachmentContent",
67
+ setup(__props) {
68
+ return (_ctx, _cache) => {
69
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [renderSlot(_ctx.$slots, "default")]);
70
+ };
71
+ }
72
+ });
73
+ // registry/attachment/AttachmentGroup.vue?vue&type=script&setup=true&lang.ts
74
+ const _hoisted_1$2 = { "data-slot": "attachment-group" };
75
+ // registry/attachment/AttachmentGroup.vue
76
+ var AttachmentGroup_default = /* @__PURE__ */ defineComponent({
77
+ __name: "AttachmentGroup",
78
+ setup(__props) {
79
+ return (_ctx, _cache) => {
80
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [renderSlot(_ctx.$slots, "default")]);
81
+ };
82
+ }
83
+ });
84
+ // registry/attachment/AttachmentMedia.vue?vue&type=script&setup=true&lang.ts
85
+ const _hoisted_1$1 = ["data-kind"];
86
+ // registry/attachment/AttachmentMedia.vue
87
+ var AttachmentMedia_default = /* @__PURE__ */ defineComponent({
88
+ __name: "AttachmentMedia",
89
+ props: { kind: { default: "icon" } },
90
+ setup(__props) {
91
+ return (_ctx, _cache) => {
92
+ return openBlock(), createElementBlock("div", {
93
+ "data-slot": "attachment-media",
94
+ "data-kind": __props.kind
95
+ }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$1);
96
+ };
97
+ }
98
+ });
99
+ // registry/attachment/AttachmentTitle.vue?vue&type=script&setup=true&lang.ts
100
+ const _hoisted_1 = { "data-slot": "attachment-title" };
101
+ // registry/attachment/AttachmentTitle.vue
102
+ var AttachmentTitle_default = /* @__PURE__ */ defineComponent({
103
+ __name: "AttachmentTitle",
104
+ setup(__props) {
105
+ return (_ctx, _cache) => {
106
+ return openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "default")]);
107
+ };
108
+ }
109
+ });
110
+ export { AttachmentActions_default as a, AttachmentContent_default as i, AttachmentMedia_default as n, AttachmentAction_default as o, AttachmentGroup_default as r, Attachment_default as s, AttachmentTitle_default as t };
@@ -0,0 +1,45 @@
1
+ import { createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, renderSlot, useSlots } from "vue";
2
+ // registry/bubble/Bubble.vue?vue&type=script&setup=true&lang.ts
3
+ const _hoisted_1 = [
4
+ "data-align",
5
+ "data-variant",
6
+ "data-tone"
7
+ ];
8
+ // registry/bubble/Bubble.vue
9
+ var Bubble_default = /* @__PURE__ */ defineComponent({
10
+ __name: "Bubble",
11
+ props: {
12
+ align: { default: "start" },
13
+ variant: { default: "solid" },
14
+ tone: { default: "neutral" }
15
+ },
16
+ setup(__props) {
17
+ return (_ctx, _cache) => {
18
+ return openBlock(), createElementBlock("div", {
19
+ "data-slot": "bubble",
20
+ "data-align": __props.align,
21
+ "data-variant": __props.variant,
22
+ "data-tone": __props.tone
23
+ }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1);
24
+ };
25
+ }
26
+ });
27
+ // registry/bubble/BubbleContent.vue
28
+ var BubbleContent_default = /* @__PURE__ */ defineComponent({
29
+ inheritAttrs: false,
30
+ __name: "BubbleContent",
31
+ setup(__props) {
32
+ const slots = useSlots();
33
+ const children = () => slots.default?.();
34
+ return (_ctx, _cache) => {
35
+ return renderSlot(_ctx.$slots, "render", {
36
+ props: {
37
+ ..._ctx.$attrs,
38
+ "data-slot": "bubble-content"
39
+ },
40
+ children
41
+ }, () => [createElementVNode("div", mergeProps(_ctx.$attrs, { "data-slot": "bubble-content" }), [renderSlot(_ctx.$slots, "default")], 16)]);
42
+ };
43
+ }
44
+ });
45
+ export { Bubble_default as n, BubbleContent_default as t };
@@ -0,0 +1,112 @@
1
+ import { t as ChatMessage_default } from "./ChatMessage-CFQs0v4N.js";
2
+ import { a as MessageScroller_default, i as MessageScrollerButton_default, n as MessageScrollerItem_default, r as MessageScrollerContent_default, t as MessageScrollerViewport_default } from "./MessageScrollerViewport-BaTlWLki.js";
3
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, renderList, renderSlot, toDisplayString, unref, useSlots, withCtx } from "vue";
4
+ import { ChevronDown } from "@lucide/vue";
5
+ // registry/chat/activity.ts
6
+ const inProgressTool = /* @__PURE__ */ new Set([
7
+ "approval-requested",
8
+ "approval-responded",
9
+ "input-available",
10
+ "input-streaming"
11
+ ]);
12
+ function showsProgress(part) {
13
+ if (part.type === "text" || part.type === "reasoning") return part.state !== "done";
14
+ return "toolCallId" in part && inProgressTool.has(part.state);
15
+ }
16
+ function chatActivity(messages, status) {
17
+ if (status !== "submitted" && status !== "streaming") return void 0;
18
+ const last = messages.at(-1);
19
+ const part = last?.role === "assistant" ? last.parts.findLast((item) => !item.type.startsWith("data-") && item.type !== "step-start") : void 0;
20
+ return part && showsProgress(part) ? void 0 : "Working";
21
+ }
22
+ // registry/chat/Chat.vue?vue&type=script&setup=true&lang.ts
23
+ const _hoisted_1 = {
24
+ "data-slot": "chat-status",
25
+ role: "status"
26
+ };
27
+ const _hoisted_2 = { "data-slot": "chat-status-label" };
28
+ const _hoisted_3 = {
29
+ key: 0,
30
+ "data-slot": "chat-composer"
31
+ };
32
+ // registry/chat/Chat.vue
33
+ var Chat_default = /* @__PURE__ */ defineComponent({
34
+ name: "Chat",
35
+ inheritAttrs: false,
36
+ __name: "Chat",
37
+ props: {
38
+ messages: { default: () => [] },
39
+ status: { default: "ready" },
40
+ scrollButtonLabel: { default: "Scroll to end" },
41
+ edgeThreshold: { default: 8 },
42
+ previousItemPeek: { default: 64 }
43
+ },
44
+ setup(__props) {
45
+ const slots = useSlots();
46
+ const own = /* @__PURE__ */ new Set([
47
+ "composer",
48
+ "default",
49
+ "message",
50
+ "scroll-button",
51
+ "scroll-button-icon",
52
+ "status"
53
+ ]);
54
+ const messageSlots = () => Object.keys(slots).filter((name) => !own.has(name));
55
+ const busy = computed(() => __props.status === "streaming" || __props.status === "submitted");
56
+ const activity = computed(() => chatActivity(__props.messages, __props.status));
57
+ const ids = computed(() => __props.messages.map((message) => message.id));
58
+ return (_ctx, _cache) => {
59
+ return openBlock(), createBlock(MessageScroller_default, {
60
+ "edge-threshold": __props.edgeThreshold,
61
+ "previous-item-peek": __props.previousItemPeek
62
+ }, {
63
+ render: withCtx(({ props: part }) => [createElementVNode("div", mergeProps({
64
+ ...part,
65
+ ..._ctx.$attrs
66
+ }, { "data-slot": "chat" }), [
67
+ createVNode(MessageScrollerViewport_default, null, {
68
+ default: withCtx(() => [createVNode(MessageScrollerContent_default, {
69
+ "aria-busy": busy.value ? "true" : void 0,
70
+ items: ids.value
71
+ }, {
72
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.messages, (message, index) => {
73
+ return openBlock(), createBlock(MessageScrollerItem_default, {
74
+ key: message.id,
75
+ "message-id": message.id,
76
+ "scroll-anchor": message.role === "user" && index === __props.messages.length - 1 && __props.status !== "submitted"
77
+ }, {
78
+ default: withCtx(() => [renderSlot(_ctx.$slots, "message", {
79
+ message,
80
+ index
81
+ }, () => [createVNode(unref(ChatMessage_default), {
82
+ message,
83
+ streaming: index === __props.messages.length - 1 && busy.value
84
+ }, createSlots({ _: 2 }, [renderList(messageSlots(), (name) => {
85
+ return {
86
+ name,
87
+ fn: withCtx((scope) => [renderSlot(_ctx.$slots, name, mergeProps({ ref_for: true }, scope))])
88
+ };
89
+ })]), 1032, ["message", "streaming"])])]),
90
+ _: 2
91
+ }, 1032, ["message-id", "scroll-anchor"]);
92
+ }), 128)), activity.value ? renderSlot(_ctx.$slots, "status", { label: activity.value }, () => [createElementVNode("p", _hoisted_1, [_cache[0] || (_cache[0] = createElementVNode("span", {
93
+ "aria-hidden": "true",
94
+ "data-slot": "chat-status-dot"
95
+ }, null, -1)), createElementVNode("span", _hoisted_2, toDisplayString(activity.value), 1)])], void 0, 0) : createCommentVNode("v-if", true)]),
96
+ _: 3
97
+ }, 8, ["aria-busy", "items"])]),
98
+ _: 3
99
+ }),
100
+ createVNode(MessageScrollerButton_default, { "aria-label": __props.scrollButtonLabel }, {
101
+ default: withCtx(() => [renderSlot(_ctx.$slots, "scroll-button-icon", {}, () => [createVNode(unref(ChevronDown), { "aria-hidden": "true" })]), renderSlot(_ctx.$slots, "scroll-button", {}, () => [createTextVNode(toDisplayString(__props.scrollButtonLabel), 1)])]),
102
+ _: 3
103
+ }, 8, ["aria-label"]),
104
+ slots.composer ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "composer")])) : createCommentVNode("v-if", true),
105
+ renderSlot(_ctx.$slots, "default")
106
+ ], 16)]),
107
+ _: 3
108
+ }, 8, ["edge-threshold", "previous-item-peek"]);
109
+ };
110
+ }
111
+ });
112
+ export { chatActivity as n, Chat_default as t };